From ff11007648e0cb3b2e2b47aa225761ebe3c61532 Mon Sep 17 00:00:00 2001 From: Hyunjee Kim Date: Thu, 31 Jan 2019 11:26:38 +0900 Subject: [PATCH] Imported Upstream version 4.3.0 Change-Id: I804816b05b6b568a9570b332b2d49a3eae444f09 Signed-off-by: Hyunjee Kim --- CHANGES.txt | 46 +- INSTALL.txt | 15 +- MANIFEST.in | 2 +- Makefile | 6 +- PKG-INFO | 37 +- benchmark/benchbase.py | 10 +- buildlibxml.py | 28 +- doc/FAQ.txt | 4 +- doc/api.txt | 5 +- doc/build.txt | 5 +- doc/html/FAQ.html | 1000 - doc/html/api.html | 538 - doc/html/api/abc.ABCMeta-class.html | 449 - doc/html/api/api-objects.txt | 7683 --- doc/html/api/class-tree.html | 1355 - .../api/cssselect.parser.SelectorError-class.html | 217 - ...cssselect.parser.SelectorSyntaxError-class.html | 224 - .../api/cssselect.xpath.ExpressionError-class.html | 216 - doc/html/api/cssselect.xpath.XPathExpr-class.html | 402 - doc/html/api/deprecated-index.html | 168 - doc/html/api/epydoc.css | 322 - doc/html/api/exceptions.AssertionError-class.html | 303 - doc/html/api/frames.html | 17 - doc/html/api/help.html | 279 - doc/html/api/identifier-index-A.html | 293 - doc/html/api/identifier-index-B.html | 241 - doc/html/api/identifier-index-C.html | 502 - doc/html/api/identifier-index-D.html | 401 - doc/html/api/identifier-index-E.html | 732 - doc/html/api/identifier-index-F.html | 351 - doc/html/api/identifier-index-G.html | 232 - doc/html/api/identifier-index-H.html | 330 - doc/html/api/identifier-index-I.html | 517 - doc/html/api/identifier-index-J.html | 160 - doc/html/api/identifier-index-K.html | 177 - doc/html/api/identifier-index-L.html | 254 - doc/html/api/identifier-index-M.html | 223 - doc/html/api/identifier-index-N.html | 248 - doc/html/api/identifier-index-O.html | 199 - doc/html/api/identifier-index-P.html | 326 - doc/html/api/identifier-index-Q.html | 167 - doc/html/api/identifier-index-R.html | 750 - doc/html/api/identifier-index-S.html | 1211 - doc/html/api/identifier-index-T.html | 3878 -- doc/html/api/identifier-index-U.html | 216 - doc/html/api/identifier-index-V.html | 208 - doc/html/api/identifier-index-W.html | 217 - doc/html/api/identifier-index-X.html | 476 - doc/html/api/identifier-index-Y.html | 146 - doc/html/api/identifier-index-Z.html | 146 - doc/html/api/identifier-index-_.html | 2061 - doc/html/api/identifier-index.html | 293 - doc/html/api/index.html | 17 - doc/html/api/lxml-module.html | 261 - doc/html/api/lxml-pysrc.html | 152 - doc/html/api/lxml.ElementInclude-module.html | 307 - doc/html/api/lxml.ElementInclude-pysrc.html | 559 - ...xml.ElementInclude.FatalIncludeError-class.html | 252 - doc/html/api/lxml.builder-module.html | 310 - doc/html/api/lxml.builder-pysrc.html | 457 - doc/html/api/lxml.builder.ElementMaker-class.html | 536 - doc/html/api/lxml.cssselect-module.html | 254 - doc/html/api/lxml.cssselect-pysrc.html | 330 - doc/html/api/lxml.cssselect.CSSSelector-class.html | 331 - .../lxml.cssselect.LxmlHTMLTranslator-class.html | 334 - .../api/lxml.cssselect.LxmlTranslator-class.html | 386 - doc/html/api/lxml.doctestcompare-module.html | 498 - doc/html/api/lxml.doctestcompare-pysrc.html | 1149 - ...ml.doctestcompare.LHTMLOutputChecker-class.html | 252 - ...xml.doctestcompare.LXMLOutputChecker-class.html | 633 - .../lxml.doctestcompare._RestoreChecker-class.html | 372 - doc/html/api/lxml.etree-module.html | 2599 - .../api/lxml.etree.AncestorsIterator-class.html | 256 - ...ree.AttributeBasedElementClassLookup-class.html | 316 - doc/html/api/lxml.etree.C14NError-class.html | 268 - doc/html/api/lxml.etree.CDATA-class.html | 259 - doc/html/api/lxml.etree.CommentBase-class.html | 372 - .../lxml.etree.CustomElementClassLookup-class.html | 295 - doc/html/api/lxml.etree.DTD-class.html | 434 - doc/html/api/lxml.etree.DTDError-class.html | 274 - doc/html/api/lxml.etree.DTDParseError-class.html | 270 - .../api/lxml.etree.DTDValidateError-class.html | 270 - doc/html/api/lxml.etree.DocInfo-class.html | 395 - doc/html/api/lxml.etree.DocumentInvalid-class.html | 270 - .../api/lxml.etree.ETCompatXMLParser-class.html | 348 - doc/html/api/lxml.etree.ETXPath-class.html | 316 - doc/html/api/lxml.etree.ElementBase-class.html | 385 - .../api/lxml.etree.ElementChildIterator-class.html | 256 - .../api/lxml.etree.ElementClassLookup-class.html | 255 - ...lxml.etree.ElementDefaultClassLookup-class.html | 329 - ...lxml.etree.ElementDepthFirstIterator-class.html | 310 - ...ml.etree.ElementNamespaceClassLookup-class.html | 354 - .../api/lxml.etree.ElementTextIterator-class.html | 302 - doc/html/api/lxml.etree.EntityBase-class.html | 373 - doc/html/api/lxml.etree.Error-class.html | 268 - doc/html/api/lxml.etree.ErrorDomains-class.html | 508 - doc/html/api/lxml.etree.ErrorLevels-class.html | 266 - doc/html/api/lxml.etree.ErrorTypes-class.html | 5429 -- ...xml.etree.FallbackElementClassLookup-class.html | 323 - doc/html/api/lxml.etree.HTMLParser-class.html | 370 - doc/html/api/lxml.etree.HTMLPullParser-class.html | 349 - doc/html/api/lxml.etree.LxmlError-class.html | 310 - .../api/lxml.etree.LxmlRegistryError-class.html | 274 - doc/html/api/lxml.etree.LxmlSyntaxError-class.html | 258 - .../lxml.etree.NamespaceRegistryError-class.html | 270 - doc/html/api/lxml.etree.PIBase-class.html | 374 - doc/html/api/lxml.etree.ParseError-class.html | 363 - ....etree.ParserBasedElementClassLookup-class.html | 259 - doc/html/api/lxml.etree.ParserError-class.html | 268 - doc/html/api/lxml.etree.PyErrorLog-class.html | 456 - .../lxml.etree.PythonElementClassLookup-class.html | 312 - doc/html/api/lxml.etree.QName-class.html | 510 - doc/html/api/lxml.etree.RelaxNG-class.html | 406 - doc/html/api/lxml.etree.RelaxNGError-class.html | 274 - .../api/lxml.etree.RelaxNGErrorTypes-class.html | 571 - .../api/lxml.etree.RelaxNGParseError-class.html | 270 - .../api/lxml.etree.RelaxNGValidateError-class.html | 270 - doc/html/api/lxml.etree.Resolver-class.html | 477 - doc/html/api/lxml.etree.Schematron-class.html | 389 - doc/html/api/lxml.etree.SchematronError-class.html | 274 - .../api/lxml.etree.SchematronParseError-class.html | 270 - .../lxml.etree.SchematronValidateError-class.html | 270 - .../api/lxml.etree.SerialisationError-class.html | 274 - .../api/lxml.etree.SiblingsIterator-class.html | 257 - doc/html/api/lxml.etree.TreeBuilder-class.html | 405 - doc/html/api/lxml.etree.XInclude-class.html | 314 - doc/html/api/lxml.etree.XIncludeError-class.html | 268 - doc/html/api/lxml.etree.XMLParser-class.html | 391 - doc/html/api/lxml.etree.XMLPullParser-class.html | 347 - doc/html/api/lxml.etree.XMLSchema-class.html | 350 - doc/html/api/lxml.etree.XMLSchemaError-class.html | 274 - .../api/lxml.etree.XMLSchemaParseError-class.html | 270 - .../lxml.etree.XMLSchemaValidateError-class.html | 270 - doc/html/api/lxml.etree.XMLSyntaxError-class.html | 261 - doc/html/api/lxml.etree.XPath-class.html | 384 - .../lxml.etree.XPathDocumentEvaluator-class.html | 363 - .../lxml.etree.XPathElementEvaluator-class.html | 398 - doc/html/api/lxml.etree.XPathError-class.html | 274 - doc/html/api/lxml.etree.XPathEvalError-class.html | 276 - .../api/lxml.etree.XPathFunctionError-class.html | 272 - .../api/lxml.etree.XPathResultError-class.html | 272 - .../api/lxml.etree.XPathSyntaxError-class.html | 266 - doc/html/api/lxml.etree.XSLT-class.html | 598 - .../api/lxml.etree.XSLTAccessControl-class.html | 451 - doc/html/api/lxml.etree.XSLTApplyError-class.html | 270 - doc/html/api/lxml.etree.XSLTError-class.html | 274 - doc/html/api/lxml.etree.XSLTExtension-class.html | 420 - .../api/lxml.etree.XSLTExtensionError-class.html | 270 - doc/html/api/lxml.etree.XSLTParseError-class.html | 270 - doc/html/api/lxml.etree.XSLTSaveError-class.html | 248 - doc/html/api/lxml.etree._Attrib-class.html | 727 - doc/html/api/lxml.etree._BaseErrorLog-class.html | 369 - doc/html/api/lxml.etree._Comment-class.html | 364 - doc/html/api/lxml.etree._Document-class.html | 250 - doc/html/api/lxml.etree._DomainErrorLog-class.html | 351 - doc/html/api/lxml.etree._Element-class.html | 1665 - .../api/lxml.etree._ElementIterator-class.html | 299 - .../lxml.etree._ElementMatchIterator-class.html | 301 - .../api/lxml.etree._ElementStringResult-class.html | 290 - .../api/lxml.etree._ElementTagMatcher-class.html | 254 - doc/html/api/lxml.etree._ElementTree-class.html | 1101 - .../lxml.etree._ElementUnicodeResult-class.html | 356 - doc/html/api/lxml.etree._Entity-class.html | 379 - doc/html/api/lxml.etree._ErrorLog-class.html | 459 - doc/html/api/lxml.etree._FeedParser-class.html | 400 - doc/html/api/lxml.etree._IDDict-class.html | 505 - doc/html/api/lxml.etree._ListErrorLog-class.html | 593 - doc/html/api/lxml.etree._LogEntry-class.html | 379 - .../lxml.etree._ProcessingInstruction-class.html | 431 - .../api/lxml.etree._RotatingErrorLog-class.html | 351 - .../api/lxml.etree._SaxParserTarget-class.html | 252 - .../api/lxml.etree._TargetParserResult-class.html | 285 - doc/html/api/lxml.etree._Validator-class.html | 369 - .../api/lxml.etree._XPathEvaluatorBase-class.html | 345 - ...xml.etree._XSLTProcessingInstruction-class.html | 413 - doc/html/api/lxml.etree._XSLTResultTree-class.html | 382 - doc/html/api/lxml.etree.htmlfile-class.html | 307 - doc/html/api/lxml.etree.iterparse-class.html | 511 - doc/html/api/lxml.etree.iterwalk-class.html | 392 - doc/html/api/lxml.etree.xmlfile-class.html | 397 - doc/html/api/lxml.html-module.html | 1344 - doc/html/api/lxml.html-pysrc.html | 4077 -- doc/html/api/lxml.html.CheckboxGroup-class.html | 385 - doc/html/api/lxml.html.CheckboxValues-class.html | 563 - doc/html/api/lxml.html.Classes-class.html | 715 - doc/html/api/lxml.html.ElementSoup-module.html | 286 - doc/html/api/lxml.html.ElementSoup-pysrc.html | 143 - doc/html/api/lxml.html.FieldsDict-class.html | 705 - doc/html/api/lxml.html.FormElement-class.html | 450 - doc/html/api/lxml.html.HTMLParser-class.html | 277 - doc/html/api/lxml.html.HtmlComment-class.html | 286 - doc/html/api/lxml.html.HtmlElement-class.html | 392 - .../lxml.html.HtmlElementClassLookup-class.html | 387 - doc/html/api/lxml.html.HtmlEntity-class.html | 287 - doc/html/api/lxml.html.HtmlMixin-class.html | 821 - .../lxml.html.HtmlProcessingInstruction-class.html | 287 - doc/html/api/lxml.html.InputElement-class.html | 428 - doc/html/api/lxml.html.InputGetter-class.html | 454 - doc/html/api/lxml.html.InputMixin-class.html | 302 - doc/html/api/lxml.html.LabelElement-class.html | 334 - .../api/lxml.html.MultipleSelectOptions-class.html | 606 - doc/html/api/lxml.html.RadioGroup-class.html | 384 - doc/html/api/lxml.html.SelectElement-class.html | 399 - doc/html/api/lxml.html.TextareaElement-class.html | 339 - doc/html/api/lxml.html.XHTMLParser-class.html | 289 - doc/html/api/lxml.html._MethodFunc-class.html | 276 - doc/html/api/lxml.html.builder-module.html | 858 - doc/html/api/lxml.html.builder-pysrc.html | 458 - doc/html/api/lxml.html.clean-module.html | 778 - doc/html/api/lxml.html.clean-pysrc.html | 1350 - doc/html/api/lxml.html.clean.Cleaner-class.html | 797 - doc/html/api/lxml.html.defs-module.html | 802 - doc/html/api/lxml.html.defs-pysrc.html | 257 - doc/html/api/lxml.html.diff-module.html | 1434 - doc/html/api/lxml.html.diff-pysrc.html | 1824 - doc/html/api/lxml.html.diff.DEL_END-class.html | 142 - doc/html/api/lxml.html.diff.DEL_START-class.html | 142 - ...html.diff.InsensitiveSequenceMatcher-class.html | 265 - doc/html/api/lxml.html.diff.NoDeletes-class.html | 230 - doc/html/api/lxml.html.diff.href_token-class.html | 348 - doc/html/api/lxml.html.diff.tag_token-class.html | 438 - doc/html/api/lxml.html.diff.token-class.html | 423 - doc/html/api/lxml.html.formfill-module.html | 587 - doc/html/api/lxml.html.formfill-pysrc.html | 816 - ...ml.html.formfill.DefaultErrorCreator-class.html | 326 - .../api/lxml.html.formfill.FormNotFound-class.html | 208 - doc/html/api/lxml.html.html5parser-module.html | 498 - doc/html/api/lxml.html.html5parser-pysrc.html | 694 - .../lxml.html.html5parser.HTMLParser-class.html | 279 - .../lxml.html.html5parser.XHTMLParser-class.html | 162 - doc/html/api/lxml.html.soupparser-module.html | 510 - doc/html/api/lxml.html.soupparser-pysrc.html | 568 - .../api/lxml.html.soupparser._PseudoTag-class.html | 168 - doc/html/api/lxml.html.usedoctest-module.html | 124 - doc/html/api/lxml.html.usedoctest-pysrc.html | 139 - doc/html/api/lxml.includes-module.html | 141 - doc/html/api/lxml.includes-pysrc.html | 123 - doc/html/api/lxml.isoschematron-module.html | 428 - doc/html/api/lxml.isoschematron-pysrc.html | 660 - .../api/lxml.isoschematron.Schematron-class.html | 650 - doc/html/api/lxml.objectify-module.html | 1159 - doc/html/api/lxml.objectify.BoolElement-class.html | 825 - .../api/lxml.objectify.ElementMaker-class.html | 388 - .../api/lxml.objectify.FloatElement-class.html | 414 - doc/html/api/lxml.objectify.IntElement-class.html | 420 - doc/html/api/lxml.objectify.LongElement-class.html | 414 - doc/html/api/lxml.objectify.NoneElement-class.html | 596 - .../api/lxml.objectify.NumberElement-class.html | 1242 - doc/html/api/lxml.objectify.ObjectPath-class.html | 475 - ...xml.objectify.ObjectifiedDataElement-class.html | 432 - .../lxml.objectify.ObjectifiedElement-class.html | 883 - ...bjectify.ObjectifyElementClassLookup-class.html | 299 - doc/html/api/lxml.objectify.PyType-class.html | 469 - .../api/lxml.objectify.StringElement-class.html | 755 - doc/html/api/lxml.pyclasslookup-module.html | 140 - doc/html/api/lxml.pyclasslookup-pysrc.html | 130 - doc/html/api/lxml.sax-module.html | 242 - doc/html/api/lxml.sax-pysrc.html | 599 - .../lxml.sax.ElementTreeContentHandler-class.html | 894 - .../api/lxml.sax.ElementTreeProducer-class.html | 304 - doc/html/api/lxml.sax.SaxError-class.html | 207 - doc/html/api/lxml.tests-module.html | 197 - doc/html/api/lxml.tests-pysrc.html | 125 - doc/html/api/lxml.tests.common_imports-module.html | 560 - doc/html/api/lxml.tests.common_imports-pysrc.html | 630 - ....tests.common_imports.HelperTestCase-class.html | 436 - ...l.tests.common_imports.LargeFileLike-class.html | 195 - ....common_imports.LargeFileLikeUnicode-class.html | 253 - ...l.tests.common_imports.SillyFileLike-class.html | 169 - .../lxml.tests.common_imports.skipif-class.html | 267 - .../api/lxml.tests.dummy_http_server-module.html | 286 - .../api/lxml.tests.dummy_http_server-pysrc.html | 220 - ...mmy_http_server.HTTPRequestCollector-class.html | 269 - ...ml.tests.dummy_http_server.WebServer-class.html | 226 - ...ts.dummy_http_server._RequestHandler-class.html | 353 - doc/html/api/lxml.tests.selftest-module.html | 1200 - doc/html/api/lxml.tests.selftest-pysrc.html | 1536 - doc/html/api/lxml.tests.selftest2-module.html | 699 - doc/html/api/lxml.tests.selftest2-pysrc.html | 659 - doc/html/api/lxml.tests.test_builder-module.html | 244 - doc/html/api/lxml.tests.test_builder-pysrc.html | 281 - ...l.tests.test_builder.BuilderTestCase-class.html | 451 - .../api/lxml.tests.test_classlookup-module.html | 292 - .../api/lxml.tests.test_classlookup-pysrc.html | 1292 - ...test_classlookup.ClassLookupTestCase-class.html | 623 - ...tests.test_classlookup.ProxyTestCase-class.html | 517 - doc/html/api/lxml.tests.test_css-module.html | 254 - doc/html/api/lxml.tests.test_css-pysrc.html | 234 - .../api/lxml.tests.test_css.CSSTestCase-class.html | 368 - .../api/lxml.tests.test_doctestcompare-module.html | 224 - .../api/lxml.tests.test_doctestcompare-pysrc.html | 356 - ...st_doctestcompare.DoctestCompareTest-class.html | 554 - ...tests.test_doctestcompare.DummyInput-class.html | 152 - doc/html/api/lxml.tests.test_dtd-module.html | 246 - doc/html/api/lxml.tests.test_dtd-pysrc.html | 1258 - ...lxml.tests.test_dtd.ETreeDtdTestCase-class.html | 938 - .../api/lxml.tests.test_elementpath-module.html | 250 - .../api/lxml.tests.test_elementpath-pysrc.html | 656 - ...elementpath.EtreeElementPathTestCase-class.html | 472 - .../api/lxml.tests.test_elementtree-module.html | 300 - .../api/lxml.tests.test_elementtree-pysrc.html | 11874 ----- ...est_elementtree.CElementTreeTestCase-class.html | 640 - ...s.test_elementtree.ETreePullTestCase-class.html | 395 - ...tests.test_elementtree.ETreeTestCase-class.html | 674 - ...test_elementtree.ElementTreeTestCase-class.html | 733 - ....test_elementtree._ETreeTestCaseBase-class.html | 4987 -- ....test_elementtree._XMLPullParserTest-class.html | 517 - doc/html/api/lxml.tests.test_errors-module.html | 244 - doc/html/api/lxml.tests.test_errors-pysrc.html | 355 - ...lxml.tests.test_errors.ErrorTestCase-class.html | 451 - doc/html/api/lxml.tests.test_etree-module.html | 314 - doc/html/api/lxml.tests.test_etree-pysrc.html | 12582 ----- ...l.tests.test_etree.ETreeC14NTestCase-class.html | 522 - ...l.tests.test_etree.ETreeErrorLogTest-class.html | 421 - ...l.tests.test_etree.ETreeOnlyTestCase-class.html | 4619 -- ....tests.test_etree.ETreeWriteTestCase-class.html | 489 - ...sts.test_etree.ETreeXIncludeTestCase-class.html | 370 - ...ts.test_etree.ElementIncludeTestCase-class.html | 370 - ...l.tests.test_etree.XMLPullParserTest-class.html | 461 - ...l.tests.test_etree._XIncludeTestCase-class.html | 415 - .../lxml.tests.test_external_document-module.html | 216 - .../lxml.tests.test_external_document-pysrc.html | 299 - ...al_document.ExternalDocumentTestCase-class.html | 437 - .../api/lxml.tests.test_htmlparser-module.html | 255 - doc/html/api/lxml.tests.test_htmlparser-pysrc.html | 2035 - ...s.test_htmlparser.HtmlParserTestCase-class.html | 1311 - doc/html/api/lxml.tests.test_http_io-module.html | 246 - doc/html/api/lxml.tests.test_http_io-pysrc.html | 485 - ...ml.tests.test_http_io.HttpIOTestCase-class.html | 487 - ...lxml.tests.test_incremental_xmlfile-module.html | 288 - .../lxml.tests.test_incremental_xmlfile-pysrc.html | 1392 - ...emental_xmlfile.AsyncXmlFileTestCase-class.html | 438 - ...ental_xmlfile.BytesIOXmlFileTestCase-class.html | 460 - ...incremental_xmlfile.HtmlFileTestCase-class.html | 620 - ...mlfile.SimpleFileLikeXmlFileTestCase-class.html | 571 - ...leLikeXmlFileTestCase.SimpleFileLike-class.html | 264 - ...ntal_xmlfile.TempPathXmlFileTestCase-class.html | 641 - ...remental_xmlfile.TempXmlFileTestCase-class.html | 444 - ...emental_xmlfile._XmlFileTestCaseBase-class.html | 931 - doc/html/api/lxml.tests.test_io-module.html | 261 - doc/html/api/lxml.tests.test_io-pysrc.html | 1189 - .../lxml.tests.test_io.ETreeIOTestCase-class.html | 426 - ....tests.test_io.ElementTreeIOTestCase-class.html | 410 - .../lxml.tests.test_io._IOTestCaseBase-class.html | 765 - .../api/lxml.tests.test_isoschematron-module.html | 246 - .../api/lxml.tests.test_isoschematron-pysrc.html | 1681 - ...chematron.ETreeISOSchematronTestCase-class.html | 713 - doc/html/api/lxml.tests.test_nsclasses-module.html | 247 - doc/html/api/lxml.tests.test_nsclasses-pysrc.html | 636 - ...lasses.ETreeNamespaceClassesTestCase-class.html | 559 - ...NamespaceClassesTestCase.bluff_class-class.html | 267 - ...mespaceClassesTestCase.default_class-class.html | 251 - ...eNamespaceClassesTestCase.maeh_class-class.html | 267 - doc/html/api/lxml.tests.test_objectify-module.html | 564 - doc/html/api/lxml.tests.test_objectify-pysrc.html | 5980 --- ...sts.test_objectify.ObjectifyTestCase-class.html | 3656 -- .../api/lxml.tests.test_pyclasslookup-module.html | 288 - .../api/lxml.tests.test_pyclasslookup-pysrc.html | 925 - ..._pyclasslookup.PyClassLookupTestCase-class.html | 893 - doc/html/api/lxml.tests.test_relaxng-module.html | 261 - doc/html/api/lxml.tests.test_relaxng-pysrc.html | 740 - ...ts.test_relaxng.ETreeRelaxNGTestCase-class.html | 537 - ....test_relaxng.RelaxNGCompactTestCase-class.html | 400 - doc/html/api/lxml.tests.test_sax-module.html | 246 - doc/html/api/lxml.tests.test_sax-pysrc.html | 681 - ...lxml.tests.test_sax.ETreeSaxTestCase-class.html | 699 - .../api/lxml.tests.test_schematron-module.html | 246 - doc/html/api/lxml.tests.test_schematron-pysrc.html | 376 - ...t_schematron.ETreeSchematronTestCase-class.html | 425 - doc/html/api/lxml.tests.test_threading-module.html | 255 - doc/html/api/lxml.tests.test_threading-pysrc.html | 1417 - ...est_threading.ThreadPipelineTestCase-class.html | 544 - ...ipelineTestCase.ParseAndExtendWorker-class.html | 283 - ...ipelineTestCase.ParseAndInjectWorker-class.html | 283 - ...g.ThreadPipelineTestCase.ParseWorker-class.html | 283 - ...ThreadPipelineTestCase.ReverseWorker-class.html | 281 - ....ThreadPipelineTestCase.RotateWorker-class.html | 281 - ...readPipelineTestCase.SerialiseWorker-class.html | 281 - ...ding.ThreadPipelineTestCase.Validate-class.html | 281 - ...eading.ThreadPipelineTestCase.Worker-class.html | 361 - ...sts.test_threading.ThreadingTestCase-class.html | 617 - doc/html/api/lxml.tests.test_unicode-module.html | 312 - doc/html/api/lxml.tests.test_unicode-pysrc.html | 713 - ...tests.test_unicode.EncodingsTestCase-class.html | 523 - ...l.tests.test_unicode.UnicodeTestCase-class.html | 665 - doc/html/api/lxml.tests.test_xmlschema-module.html | 253 - doc/html/api/lxml.tests.test_xmlschema-pysrc.html | 1438 - ...hema.ETreeXMLSchemaResolversTestCase-class.html | 486 - ...emaResolversTestCase.simple_resolver-class.html | 307 - ...est_xmlschema.ETreeXMLSchemaTestCase-class.html | 733 - .../api/lxml.tests.test_xpathevaluator-module.html | 547 - .../api/lxml.tests.test_xpathevaluator-pysrc.html | 2022 - ...hevaluator.ETreeETXPathClassTestCase-class.html | 379 - ...athevaluator.ETreeXPathClassTestCase-class.html | 427 - ...athevaluator.ETreeXPathExsltTestCase-class.html | 429 - ...st_xpathevaluator.ETreeXPathTestCase-class.html | 1051 - doc/html/api/lxml.tests.test_xslt-module.html | 302 - doc/html/api/lxml.tests.test_xslt-pysrc.html | 4522 -- ...l.tests.test_xslt.ETreeEXSLTTestCase-class.html | 523 - ...est_xslt.ETreeXSLTExtElementTestCase-class.html | 603 - ...s.test_xslt.ETreeXSLTExtFuncTestCase-class.html | 427 - ...ml.tests.test_xslt.ETreeXSLTTestCase-class.html | 1319 - ...lxml.tests.test_xslt.Py3XSLTTestCase-class.html | 402 - doc/html/api/lxml.usedoctest-module.html | 123 - doc/html/api/lxml.usedoctest-pysrc.html | 135 - doc/html/api/mimetools.Message-class.html | 386 - doc/html/api/module-tree.html | 182 - doc/html/api/redirect.html | 38 - doc/html/api/str-class.html | 1651 - doc/html/api/toc-everything.html | 1353 - doc/html/api/toc-lxml-module.html | 33 - doc/html/api/toc-lxml.ElementInclude-module.html | 49 - doc/html/api/toc-lxml.builder-module.html | 44 - doc/html/api/toc-lxml.cssselect-module.html | 51 - doc/html/api/toc-lxml.doctestcompare-module.html | 72 - doc/html/api/toc-lxml.etree-module.html | 269 - doc/html/api/toc-lxml.html-module.html | 197 - doc/html/api/toc-lxml.html.ElementSoup-module.html | 39 - doc/html/api/toc-lxml.html.builder-module.html | 126 - doc/html/api/toc-lxml.html.clean-module.html | 114 - doc/html/api/toc-lxml.html.defs-module.html | 50 - doc/html/api/toc-lxml.html.diff-module.html | 193 - doc/html/api/toc-lxml.html.formfill-module.html | 95 - doc/html/api/toc-lxml.html.html5parser-module.html | 48 - doc/html/api/toc-lxml.html.soupparser-module.html | 65 - doc/html/api/toc-lxml.html.usedoctest-module.html | 29 - doc/html/api/toc-lxml.includes-module.html | 31 - doc/html/api/toc-lxml.isoschematron-module.html | 74 - doc/html/api/toc-lxml.objectify-module.html | 82 - doc/html/api/toc-lxml.pyclasslookup-module.html | 31 - doc/html/api/toc-lxml.sax-module.html | 40 - doc/html/api/toc-lxml.tests-module.html | 31 - .../api/toc-lxml.tests.common_imports-module.html | 77 - .../toc-lxml.tests.dummy_http_server-module.html | 40 - doc/html/api/toc-lxml.tests.selftest-module.html | 65 - doc/html/api/toc-lxml.tests.selftest2-module.html | 54 - .../api/toc-lxml.tests.test_builder-module.html | 36 - .../toc-lxml.tests.test_classlookup-module.html | 38 - doc/html/api/toc-lxml.tests.test_css-module.html | 36 - .../toc-lxml.tests.test_doctestcompare-module.html | 37 - doc/html/api/toc-lxml.tests.test_dtd-module.html | 36 - .../toc-lxml.tests.test_elementpath-module.html | 38 - .../toc-lxml.tests.test_elementtree-module.html | 47 - .../api/toc-lxml.tests.test_errors-module.html | 36 - doc/html/api/toc-lxml.tests.test_etree-module.html | 45 - ...c-lxml.tests.test_external_document-module.html | 37 - .../api/toc-lxml.tests.test_htmlparser-module.html | 37 - .../api/toc-lxml.tests.test_http_io-module.html | 36 - ...lxml.tests.test_incremental_xmlfile-module.html | 44 - doc/html/api/toc-lxml.tests.test_io-module.html | 40 - .../toc-lxml.tests.test_isoschematron-module.html | 36 - .../api/toc-lxml.tests.test_nsclasses-module.html | 36 - .../api/toc-lxml.tests.test_objectify-module.html | 49 - .../toc-lxml.tests.test_pyclasslookup-module.html | 37 - .../api/toc-lxml.tests.test_relaxng-module.html | 38 - doc/html/api/toc-lxml.tests.test_sax-module.html | 36 - .../api/toc-lxml.tests.test_schematron-module.html | 36 - .../api/toc-lxml.tests.test_threading-module.html | 37 - .../api/toc-lxml.tests.test_unicode-module.html | 43 - .../api/toc-lxml.tests.test_xmlschema-module.html | 37 - .../toc-lxml.tests.test_xpathevaluator-module.html | 55 - doc/html/api/toc-lxml.tests.test_xslt-module.html | 43 - doc/html/api/toc-lxml.usedoctest-module.html | 29 - doc/html/api/toc-xml.etree.ElementTree-module.html | 73 - doc/html/api/toc.html | 86 - doc/html/api/xml.etree.ElementTree-module.html | 813 - doc/html/api/xml.etree.ElementTree-pysrc.html | 3205 -- .../api/xml.etree.ElementTree.Element-class.html | 752 - .../xml.etree.ElementTree.ElementTree-class.html | 446 - .../xml.etree.ElementTree.ParseError-class.html | 215 - .../api/xml.etree.ElementTree.QName-class.html | 347 - .../xml.etree.ElementTree.TreeBuilder-class.html | 332 - .../api/xml.etree.ElementTree.XMLParser-class.html | 498 - ...etree.ElementTree._IterParseIterator-class.html | 286 - ...etree.ElementTree._SimpleElementPath-class.html | 264 - doc/html/build.html | 323 - doc/html/capi.html | 134 - doc/html/changes-4.2.5.html | 3410 -- doc/html/compatibility.html | 206 - doc/html/credits.html | 95 - doc/html/cssselect.html | 120 - doc/html/element_classes.html | 532 - doc/html/elementsoup.html | 210 - doc/html/extensions.html | 537 - doc/html/html5parser.html | 97 - doc/html/index.html | 241 - doc/html/installation.html | 222 - doc/html/intro.html | 89 - doc/html/lxml-source-howto.html | 293 - doc/html/lxmlhtml.html | 703 - doc/html/objectify.html | 1172 - doc/html/parsing.html | 900 - doc/html/performance.html | 805 - doc/html/resolvers.html | 257 - doc/html/sax.html | 131 - doc/html/sitemap.html | 12 - doc/html/tutorial.html | 1191 - doc/html/validation.html | 563 - doc/html/xpathxslt.html | 639 - doc/intro.txt | 2 +- doc/lxml-source-howto.txt | 4 +- doc/main.txt | 17 +- doc/mklatex.py | 2 +- doc/pdf/pubkey.asc | 36 - doc/rest2latex.py | 2 +- doc/s5/lxml-ep2008.html | 1335 - doc/xpathxslt.txt | 2 +- requirements.txt | 2 +- setup.py | 6 +- setupinfo.py | 8 +- src/lxml.egg-info/PKG-INFO | 37 +- src/lxml.egg-info/SOURCES.txt | 494 +- src/lxml.egg-info/requires.txt | 2 +- src/lxml/_elementpath.c | 5208 +- src/lxml/_elementpath.py | 4 + src/lxml/apihelpers.pxi | 57 +- src/lxml/builder.c | 2476 +- src/lxml/builder.pxd | 1 + src/lxml/builder.py | 4 + src/lxml/classlookup.pxi | 4 +- src/lxml/doctestcompare.py | 13 +- src/lxml/etree.c | 49299 ++++++------------- src/lxml/etree.h | 14 +- src/lxml/etree.pyx | 24 +- src/lxml/etree_api.h | 24 +- src/lxml/html/__init__.py | 1 - src/lxml/html/_setmixin.py | 6 +- src/lxml/html/clean.c | 9705 ++-- src/lxml/html/clean.py | 11 +- src/lxml/html/diff.c | 14468 +++--- src/lxml/html/diff.py | 7 +- src/lxml/html/tests/test_autolink.py | 5 +- src/lxml/html/tests/test_basic.py | 5 +- src/lxml/html/tests/test_clean.py | 9 +- src/lxml/html/tests/test_diff.py | 7 +- src/lxml/html/tests/test_feedparser_data.py | 27 +- src/lxml/html/tests/test_formfill.py | 5 +- src/lxml/html/tests/test_forms.py | 5 +- src/lxml/html/tests/test_html5parser.py | 20 +- src/lxml/html/tests/test_rewritelinks.py | 5 +- src/lxml/html/tests/test_select.py | 2 +- src/lxml/html/tests/test_xhtml.py | 3 +- src/lxml/html/tests/transform_feedparser_data.py | 1 - src/lxml/includes/etree_defs.h | 9 +- src/lxml/includes/lxml-version.h | 2 +- src/lxml/isoschematron/__init__.py | 4 +- .../isoschematron/resources/rng/iso-schematron.rng | 107 +- .../iso-schematron-xslt1/iso_abstract_expand.xsl | 83 +- .../resources/xsl/iso-schematron-xslt1/readme.txt | 167 +- src/lxml/lxml.etree.h | 14 +- src/lxml/lxml.etree_api.h | 24 +- src/lxml/objectify.c | 12305 ++--- src/lxml/objectify.pyx | 7 +- src/lxml/parser.pxi | 6 +- src/lxml/python.pxd | 2 +- src/lxml/sax.c | 14131 ++++++ src/lxml/sax.pxd | 16 + src/lxml/sax.py | 71 +- src/lxml/serializer.pxi | 56 +- src/lxml/tests/dummy_http_server.py | 2 +- src/lxml/tests/selftest.py | 37 +- src/lxml/tests/selftest2.py | 4 +- src/lxml/tests/test.rnc | 8 + src/lxml/tests/test_doctestcompare.py | 4 +- src/lxml/tests/test_elementtree.py | 8 +- src/lxml/tests/test_etree.py | 79 +- src/lxml/tests/test_external_document.py | 5 +- src/lxml/tests/test_http_io.py | 2 +- src/lxml/tests/test_incremental_xmlfile.py | 10 +- src/lxml/tests/test_io.py | 17 +- src/lxml/tests/test_isoschematron.py | 6 +- src/lxml/tests/test_objectify.py | 6 +- src/lxml/tests/test_pyclasslookup.py | 2 +- src/lxml/tests/test_sax.py | 139 + src/lxml/tests/test_threading.py | 9 +- src/lxml/xmlid.pxi | 8 +- src/lxml/xpath.pxi | 2 +- test.py | 4 +- tools/manylinux/build-wheels.sh | 5 - version.txt | 2 +- 580 files changed, 49472 insertions(+), 334675 deletions(-) delete mode 100644 doc/html/FAQ.html delete mode 100644 doc/html/api.html delete mode 100644 doc/html/api/abc.ABCMeta-class.html delete mode 100644 doc/html/api/api-objects.txt delete mode 100644 doc/html/api/class-tree.html delete mode 100644 doc/html/api/cssselect.parser.SelectorError-class.html delete mode 100644 doc/html/api/cssselect.parser.SelectorSyntaxError-class.html delete mode 100644 doc/html/api/cssselect.xpath.ExpressionError-class.html delete mode 100644 doc/html/api/cssselect.xpath.XPathExpr-class.html delete mode 100644 doc/html/api/deprecated-index.html delete mode 100644 doc/html/api/epydoc.css delete mode 100644 doc/html/api/exceptions.AssertionError-class.html delete mode 100644 doc/html/api/frames.html delete mode 100644 doc/html/api/help.html delete mode 100644 doc/html/api/identifier-index-A.html delete mode 100644 doc/html/api/identifier-index-B.html delete mode 100644 doc/html/api/identifier-index-C.html delete mode 100644 doc/html/api/identifier-index-D.html delete mode 100644 doc/html/api/identifier-index-E.html delete mode 100644 doc/html/api/identifier-index-F.html delete mode 100644 doc/html/api/identifier-index-G.html delete mode 100644 doc/html/api/identifier-index-H.html delete mode 100644 doc/html/api/identifier-index-I.html delete mode 100644 doc/html/api/identifier-index-J.html delete mode 100644 doc/html/api/identifier-index-K.html delete mode 100644 doc/html/api/identifier-index-L.html delete mode 100644 doc/html/api/identifier-index-M.html delete mode 100644 doc/html/api/identifier-index-N.html delete mode 100644 doc/html/api/identifier-index-O.html delete mode 100644 doc/html/api/identifier-index-P.html delete mode 100644 doc/html/api/identifier-index-Q.html delete mode 100644 doc/html/api/identifier-index-R.html delete mode 100644 doc/html/api/identifier-index-S.html delete mode 100644 doc/html/api/identifier-index-T.html delete mode 100644 doc/html/api/identifier-index-U.html delete mode 100644 doc/html/api/identifier-index-V.html delete mode 100644 doc/html/api/identifier-index-W.html delete mode 100644 doc/html/api/identifier-index-X.html delete mode 100644 doc/html/api/identifier-index-Y.html delete mode 100644 doc/html/api/identifier-index-Z.html delete mode 100644 doc/html/api/identifier-index-_.html delete mode 100644 doc/html/api/identifier-index.html delete mode 100644 doc/html/api/index.html delete mode 100644 doc/html/api/lxml-module.html delete mode 100644 doc/html/api/lxml-pysrc.html delete mode 100644 doc/html/api/lxml.ElementInclude-module.html delete mode 100644 doc/html/api/lxml.ElementInclude-pysrc.html delete mode 100644 doc/html/api/lxml.ElementInclude.FatalIncludeError-class.html delete mode 100644 doc/html/api/lxml.builder-module.html delete mode 100644 doc/html/api/lxml.builder-pysrc.html delete mode 100644 doc/html/api/lxml.builder.ElementMaker-class.html delete mode 100644 doc/html/api/lxml.cssselect-module.html delete mode 100644 doc/html/api/lxml.cssselect-pysrc.html delete mode 100644 doc/html/api/lxml.cssselect.CSSSelector-class.html delete mode 100644 doc/html/api/lxml.cssselect.LxmlHTMLTranslator-class.html delete mode 100644 doc/html/api/lxml.cssselect.LxmlTranslator-class.html delete mode 100644 doc/html/api/lxml.doctestcompare-module.html delete mode 100644 doc/html/api/lxml.doctestcompare-pysrc.html delete mode 100644 doc/html/api/lxml.doctestcompare.LHTMLOutputChecker-class.html delete mode 100644 doc/html/api/lxml.doctestcompare.LXMLOutputChecker-class.html delete mode 100644 doc/html/api/lxml.doctestcompare._RestoreChecker-class.html delete mode 100644 doc/html/api/lxml.etree-module.html delete mode 100644 doc/html/api/lxml.etree.AncestorsIterator-class.html delete mode 100644 doc/html/api/lxml.etree.AttributeBasedElementClassLookup-class.html delete mode 100644 doc/html/api/lxml.etree.C14NError-class.html delete mode 100644 doc/html/api/lxml.etree.CDATA-class.html delete mode 100644 doc/html/api/lxml.etree.CommentBase-class.html delete mode 100644 doc/html/api/lxml.etree.CustomElementClassLookup-class.html delete mode 100644 doc/html/api/lxml.etree.DTD-class.html delete mode 100644 doc/html/api/lxml.etree.DTDError-class.html delete mode 100644 doc/html/api/lxml.etree.DTDParseError-class.html delete mode 100644 doc/html/api/lxml.etree.DTDValidateError-class.html delete mode 100644 doc/html/api/lxml.etree.DocInfo-class.html delete mode 100644 doc/html/api/lxml.etree.DocumentInvalid-class.html delete mode 100644 doc/html/api/lxml.etree.ETCompatXMLParser-class.html delete mode 100644 doc/html/api/lxml.etree.ETXPath-class.html delete mode 100644 doc/html/api/lxml.etree.ElementBase-class.html delete mode 100644 doc/html/api/lxml.etree.ElementChildIterator-class.html delete mode 100644 doc/html/api/lxml.etree.ElementClassLookup-class.html delete mode 100644 doc/html/api/lxml.etree.ElementDefaultClassLookup-class.html delete mode 100644 doc/html/api/lxml.etree.ElementDepthFirstIterator-class.html delete mode 100644 doc/html/api/lxml.etree.ElementNamespaceClassLookup-class.html delete mode 100644 doc/html/api/lxml.etree.ElementTextIterator-class.html delete mode 100644 doc/html/api/lxml.etree.EntityBase-class.html delete mode 100644 doc/html/api/lxml.etree.Error-class.html delete mode 100644 doc/html/api/lxml.etree.ErrorDomains-class.html delete mode 100644 doc/html/api/lxml.etree.ErrorLevels-class.html delete mode 100644 doc/html/api/lxml.etree.ErrorTypes-class.html delete mode 100644 doc/html/api/lxml.etree.FallbackElementClassLookup-class.html delete mode 100644 doc/html/api/lxml.etree.HTMLParser-class.html delete mode 100644 doc/html/api/lxml.etree.HTMLPullParser-class.html delete mode 100644 doc/html/api/lxml.etree.LxmlError-class.html delete mode 100644 doc/html/api/lxml.etree.LxmlRegistryError-class.html delete mode 100644 doc/html/api/lxml.etree.LxmlSyntaxError-class.html delete mode 100644 doc/html/api/lxml.etree.NamespaceRegistryError-class.html delete mode 100644 doc/html/api/lxml.etree.PIBase-class.html delete mode 100644 doc/html/api/lxml.etree.ParseError-class.html delete mode 100644 doc/html/api/lxml.etree.ParserBasedElementClassLookup-class.html delete mode 100644 doc/html/api/lxml.etree.ParserError-class.html delete mode 100644 doc/html/api/lxml.etree.PyErrorLog-class.html delete mode 100644 doc/html/api/lxml.etree.PythonElementClassLookup-class.html delete mode 100644 doc/html/api/lxml.etree.QName-class.html delete mode 100644 doc/html/api/lxml.etree.RelaxNG-class.html delete mode 100644 doc/html/api/lxml.etree.RelaxNGError-class.html delete mode 100644 doc/html/api/lxml.etree.RelaxNGErrorTypes-class.html delete mode 100644 doc/html/api/lxml.etree.RelaxNGParseError-class.html delete mode 100644 doc/html/api/lxml.etree.RelaxNGValidateError-class.html delete mode 100644 doc/html/api/lxml.etree.Resolver-class.html delete mode 100644 doc/html/api/lxml.etree.Schematron-class.html delete mode 100644 doc/html/api/lxml.etree.SchematronError-class.html delete mode 100644 doc/html/api/lxml.etree.SchematronParseError-class.html delete mode 100644 doc/html/api/lxml.etree.SchematronValidateError-class.html delete mode 100644 doc/html/api/lxml.etree.SerialisationError-class.html delete mode 100644 doc/html/api/lxml.etree.SiblingsIterator-class.html delete mode 100644 doc/html/api/lxml.etree.TreeBuilder-class.html delete mode 100644 doc/html/api/lxml.etree.XInclude-class.html delete mode 100644 doc/html/api/lxml.etree.XIncludeError-class.html delete mode 100644 doc/html/api/lxml.etree.XMLParser-class.html delete mode 100644 doc/html/api/lxml.etree.XMLPullParser-class.html delete mode 100644 doc/html/api/lxml.etree.XMLSchema-class.html delete mode 100644 doc/html/api/lxml.etree.XMLSchemaError-class.html delete mode 100644 doc/html/api/lxml.etree.XMLSchemaParseError-class.html delete mode 100644 doc/html/api/lxml.etree.XMLSchemaValidateError-class.html delete mode 100644 doc/html/api/lxml.etree.XMLSyntaxError-class.html delete mode 100644 doc/html/api/lxml.etree.XPath-class.html delete mode 100644 doc/html/api/lxml.etree.XPathDocumentEvaluator-class.html delete mode 100644 doc/html/api/lxml.etree.XPathElementEvaluator-class.html delete mode 100644 doc/html/api/lxml.etree.XPathError-class.html delete mode 100644 doc/html/api/lxml.etree.XPathEvalError-class.html delete mode 100644 doc/html/api/lxml.etree.XPathFunctionError-class.html delete mode 100644 doc/html/api/lxml.etree.XPathResultError-class.html delete mode 100644 doc/html/api/lxml.etree.XPathSyntaxError-class.html delete mode 100644 doc/html/api/lxml.etree.XSLT-class.html delete mode 100644 doc/html/api/lxml.etree.XSLTAccessControl-class.html delete mode 100644 doc/html/api/lxml.etree.XSLTApplyError-class.html delete mode 100644 doc/html/api/lxml.etree.XSLTError-class.html delete mode 100644 doc/html/api/lxml.etree.XSLTExtension-class.html delete mode 100644 doc/html/api/lxml.etree.XSLTExtensionError-class.html delete mode 100644 doc/html/api/lxml.etree.XSLTParseError-class.html delete mode 100644 doc/html/api/lxml.etree.XSLTSaveError-class.html delete mode 100644 doc/html/api/lxml.etree._Attrib-class.html delete mode 100644 doc/html/api/lxml.etree._BaseErrorLog-class.html delete mode 100644 doc/html/api/lxml.etree._Comment-class.html delete mode 100644 doc/html/api/lxml.etree._Document-class.html delete mode 100644 doc/html/api/lxml.etree._DomainErrorLog-class.html delete mode 100644 doc/html/api/lxml.etree._Element-class.html delete mode 100644 doc/html/api/lxml.etree._ElementIterator-class.html delete mode 100644 doc/html/api/lxml.etree._ElementMatchIterator-class.html delete mode 100644 doc/html/api/lxml.etree._ElementStringResult-class.html delete mode 100644 doc/html/api/lxml.etree._ElementTagMatcher-class.html delete mode 100644 doc/html/api/lxml.etree._ElementTree-class.html delete mode 100644 doc/html/api/lxml.etree._ElementUnicodeResult-class.html delete mode 100644 doc/html/api/lxml.etree._Entity-class.html delete mode 100644 doc/html/api/lxml.etree._ErrorLog-class.html delete mode 100644 doc/html/api/lxml.etree._FeedParser-class.html delete mode 100644 doc/html/api/lxml.etree._IDDict-class.html delete mode 100644 doc/html/api/lxml.etree._ListErrorLog-class.html delete mode 100644 doc/html/api/lxml.etree._LogEntry-class.html delete mode 100644 doc/html/api/lxml.etree._ProcessingInstruction-class.html delete mode 100644 doc/html/api/lxml.etree._RotatingErrorLog-class.html delete mode 100644 doc/html/api/lxml.etree._SaxParserTarget-class.html delete mode 100644 doc/html/api/lxml.etree._TargetParserResult-class.html delete mode 100644 doc/html/api/lxml.etree._Validator-class.html delete mode 100644 doc/html/api/lxml.etree._XPathEvaluatorBase-class.html delete mode 100644 doc/html/api/lxml.etree._XSLTProcessingInstruction-class.html delete mode 100644 doc/html/api/lxml.etree._XSLTResultTree-class.html delete mode 100644 doc/html/api/lxml.etree.htmlfile-class.html delete mode 100644 doc/html/api/lxml.etree.iterparse-class.html delete mode 100644 doc/html/api/lxml.etree.iterwalk-class.html delete mode 100644 doc/html/api/lxml.etree.xmlfile-class.html delete mode 100644 doc/html/api/lxml.html-module.html delete mode 100644 doc/html/api/lxml.html-pysrc.html delete mode 100644 doc/html/api/lxml.html.CheckboxGroup-class.html delete mode 100644 doc/html/api/lxml.html.CheckboxValues-class.html delete mode 100644 doc/html/api/lxml.html.Classes-class.html delete mode 100644 doc/html/api/lxml.html.ElementSoup-module.html delete mode 100644 doc/html/api/lxml.html.ElementSoup-pysrc.html delete mode 100644 doc/html/api/lxml.html.FieldsDict-class.html delete mode 100644 doc/html/api/lxml.html.FormElement-class.html delete mode 100644 doc/html/api/lxml.html.HTMLParser-class.html delete mode 100644 doc/html/api/lxml.html.HtmlComment-class.html delete mode 100644 doc/html/api/lxml.html.HtmlElement-class.html delete mode 100644 doc/html/api/lxml.html.HtmlElementClassLookup-class.html delete mode 100644 doc/html/api/lxml.html.HtmlEntity-class.html delete mode 100644 doc/html/api/lxml.html.HtmlMixin-class.html delete mode 100644 doc/html/api/lxml.html.HtmlProcessingInstruction-class.html delete mode 100644 doc/html/api/lxml.html.InputElement-class.html delete mode 100644 doc/html/api/lxml.html.InputGetter-class.html delete mode 100644 doc/html/api/lxml.html.InputMixin-class.html delete mode 100644 doc/html/api/lxml.html.LabelElement-class.html delete mode 100644 doc/html/api/lxml.html.MultipleSelectOptions-class.html delete mode 100644 doc/html/api/lxml.html.RadioGroup-class.html delete mode 100644 doc/html/api/lxml.html.SelectElement-class.html delete mode 100644 doc/html/api/lxml.html.TextareaElement-class.html delete mode 100644 doc/html/api/lxml.html.XHTMLParser-class.html delete mode 100644 doc/html/api/lxml.html._MethodFunc-class.html delete mode 100644 doc/html/api/lxml.html.builder-module.html delete mode 100644 doc/html/api/lxml.html.builder-pysrc.html delete mode 100644 doc/html/api/lxml.html.clean-module.html delete mode 100644 doc/html/api/lxml.html.clean-pysrc.html delete mode 100644 doc/html/api/lxml.html.clean.Cleaner-class.html delete mode 100644 doc/html/api/lxml.html.defs-module.html delete mode 100644 doc/html/api/lxml.html.defs-pysrc.html delete mode 100644 doc/html/api/lxml.html.diff-module.html delete mode 100644 doc/html/api/lxml.html.diff-pysrc.html delete mode 100644 doc/html/api/lxml.html.diff.DEL_END-class.html delete mode 100644 doc/html/api/lxml.html.diff.DEL_START-class.html delete mode 100644 doc/html/api/lxml.html.diff.InsensitiveSequenceMatcher-class.html delete mode 100644 doc/html/api/lxml.html.diff.NoDeletes-class.html delete mode 100644 doc/html/api/lxml.html.diff.href_token-class.html delete mode 100644 doc/html/api/lxml.html.diff.tag_token-class.html delete mode 100644 doc/html/api/lxml.html.diff.token-class.html delete mode 100644 doc/html/api/lxml.html.formfill-module.html delete mode 100644 doc/html/api/lxml.html.formfill-pysrc.html delete mode 100644 doc/html/api/lxml.html.formfill.DefaultErrorCreator-class.html delete mode 100644 doc/html/api/lxml.html.formfill.FormNotFound-class.html delete mode 100644 doc/html/api/lxml.html.html5parser-module.html delete mode 100644 doc/html/api/lxml.html.html5parser-pysrc.html delete mode 100644 doc/html/api/lxml.html.html5parser.HTMLParser-class.html delete mode 100644 doc/html/api/lxml.html.html5parser.XHTMLParser-class.html delete mode 100644 doc/html/api/lxml.html.soupparser-module.html delete mode 100644 doc/html/api/lxml.html.soupparser-pysrc.html delete mode 100644 doc/html/api/lxml.html.soupparser._PseudoTag-class.html delete mode 100644 doc/html/api/lxml.html.usedoctest-module.html delete mode 100644 doc/html/api/lxml.html.usedoctest-pysrc.html delete mode 100644 doc/html/api/lxml.includes-module.html delete mode 100644 doc/html/api/lxml.includes-pysrc.html delete mode 100644 doc/html/api/lxml.isoschematron-module.html delete mode 100644 doc/html/api/lxml.isoschematron-pysrc.html delete mode 100644 doc/html/api/lxml.isoschematron.Schematron-class.html delete mode 100644 doc/html/api/lxml.objectify-module.html delete mode 100644 doc/html/api/lxml.objectify.BoolElement-class.html delete mode 100644 doc/html/api/lxml.objectify.ElementMaker-class.html delete mode 100644 doc/html/api/lxml.objectify.FloatElement-class.html delete mode 100644 doc/html/api/lxml.objectify.IntElement-class.html delete mode 100644 doc/html/api/lxml.objectify.LongElement-class.html delete mode 100644 doc/html/api/lxml.objectify.NoneElement-class.html delete mode 100644 doc/html/api/lxml.objectify.NumberElement-class.html delete mode 100644 doc/html/api/lxml.objectify.ObjectPath-class.html delete mode 100644 doc/html/api/lxml.objectify.ObjectifiedDataElement-class.html delete mode 100644 doc/html/api/lxml.objectify.ObjectifiedElement-class.html delete mode 100644 doc/html/api/lxml.objectify.ObjectifyElementClassLookup-class.html delete mode 100644 doc/html/api/lxml.objectify.PyType-class.html delete mode 100644 doc/html/api/lxml.objectify.StringElement-class.html delete mode 100644 doc/html/api/lxml.pyclasslookup-module.html delete mode 100644 doc/html/api/lxml.pyclasslookup-pysrc.html delete mode 100644 doc/html/api/lxml.sax-module.html delete mode 100644 doc/html/api/lxml.sax-pysrc.html delete mode 100644 doc/html/api/lxml.sax.ElementTreeContentHandler-class.html delete mode 100644 doc/html/api/lxml.sax.ElementTreeProducer-class.html delete mode 100644 doc/html/api/lxml.sax.SaxError-class.html delete mode 100644 doc/html/api/lxml.tests-module.html delete mode 100644 doc/html/api/lxml.tests-pysrc.html delete mode 100644 doc/html/api/lxml.tests.common_imports-module.html delete mode 100644 doc/html/api/lxml.tests.common_imports-pysrc.html delete mode 100644 doc/html/api/lxml.tests.common_imports.HelperTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.common_imports.LargeFileLike-class.html delete mode 100644 doc/html/api/lxml.tests.common_imports.LargeFileLikeUnicode-class.html delete mode 100644 doc/html/api/lxml.tests.common_imports.SillyFileLike-class.html delete mode 100644 doc/html/api/lxml.tests.common_imports.skipif-class.html delete mode 100644 doc/html/api/lxml.tests.dummy_http_server-module.html delete mode 100644 doc/html/api/lxml.tests.dummy_http_server-pysrc.html delete mode 100644 doc/html/api/lxml.tests.dummy_http_server.HTTPRequestCollector-class.html delete mode 100644 doc/html/api/lxml.tests.dummy_http_server.WebServer-class.html delete mode 100644 doc/html/api/lxml.tests.dummy_http_server._RequestHandler-class.html delete mode 100644 doc/html/api/lxml.tests.selftest-module.html delete mode 100644 doc/html/api/lxml.tests.selftest-pysrc.html delete mode 100644 doc/html/api/lxml.tests.selftest2-module.html delete mode 100644 doc/html/api/lxml.tests.selftest2-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_builder-module.html delete mode 100644 doc/html/api/lxml.tests.test_builder-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_builder.BuilderTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_classlookup-module.html delete mode 100644 doc/html/api/lxml.tests.test_classlookup-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_classlookup.ClassLookupTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_classlookup.ProxyTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_css-module.html delete mode 100644 doc/html/api/lxml.tests.test_css-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_css.CSSTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_doctestcompare-module.html delete mode 100644 doc/html/api/lxml.tests.test_doctestcompare-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_doctestcompare.DoctestCompareTest-class.html delete mode 100644 doc/html/api/lxml.tests.test_doctestcompare.DummyInput-class.html delete mode 100644 doc/html/api/lxml.tests.test_dtd-module.html delete mode 100644 doc/html/api/lxml.tests.test_dtd-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_dtd.ETreeDtdTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_elementpath-module.html delete mode 100644 doc/html/api/lxml.tests.test_elementpath-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_elementpath.EtreeElementPathTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_elementtree-module.html delete mode 100644 doc/html/api/lxml.tests.test_elementtree-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_elementtree.CElementTreeTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_elementtree.ETreePullTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_elementtree.ETreeTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_elementtree.ElementTreeTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_elementtree._ETreeTestCaseBase-class.html delete mode 100644 doc/html/api/lxml.tests.test_elementtree._XMLPullParserTest-class.html delete mode 100644 doc/html/api/lxml.tests.test_errors-module.html delete mode 100644 doc/html/api/lxml.tests.test_errors-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_errors.ErrorTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_etree-module.html delete mode 100644 doc/html/api/lxml.tests.test_etree-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_etree.ETreeC14NTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_etree.ETreeErrorLogTest-class.html delete mode 100644 doc/html/api/lxml.tests.test_etree.ETreeOnlyTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_etree.ETreeWriteTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_etree.ETreeXIncludeTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_etree.ElementIncludeTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_etree.XMLPullParserTest-class.html delete mode 100644 doc/html/api/lxml.tests.test_etree._XIncludeTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_external_document-module.html delete mode 100644 doc/html/api/lxml.tests.test_external_document-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_external_document.ExternalDocumentTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_htmlparser-module.html delete mode 100644 doc/html/api/lxml.tests.test_htmlparser-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_htmlparser.HtmlParserTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_http_io-module.html delete mode 100644 doc/html/api/lxml.tests.test_http_io-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_http_io.HttpIOTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_incremental_xmlfile-module.html delete mode 100644 doc/html/api/lxml.tests.test_incremental_xmlfile-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_incremental_xmlfile.AsyncXmlFileTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_incremental_xmlfile.BytesIOXmlFileTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_incremental_xmlfile.HtmlFileTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase.SimpleFileLike-class.html delete mode 100644 doc/html/api/lxml.tests.test_incremental_xmlfile.TempPathXmlFileTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_incremental_xmlfile.TempXmlFileTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html delete mode 100644 doc/html/api/lxml.tests.test_io-module.html delete mode 100644 doc/html/api/lxml.tests.test_io-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_io.ETreeIOTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_io.ElementTreeIOTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_io._IOTestCaseBase-class.html delete mode 100644 doc/html/api/lxml.tests.test_isoschematron-module.html delete mode 100644 doc/html/api/lxml.tests.test_isoschematron-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_nsclasses-module.html delete mode 100644 doc/html/api/lxml.tests.test_nsclasses-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.bluff_class-class.html delete mode 100644 doc/html/api/lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.default_class-class.html delete mode 100644 doc/html/api/lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.maeh_class-class.html delete mode 100644 doc/html/api/lxml.tests.test_objectify-module.html delete mode 100644 doc/html/api/lxml.tests.test_objectify-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_objectify.ObjectifyTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_pyclasslookup-module.html delete mode 100644 doc/html/api/lxml.tests.test_pyclasslookup-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_relaxng-module.html delete mode 100644 doc/html/api/lxml.tests.test_relaxng-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_relaxng.ETreeRelaxNGTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_relaxng.RelaxNGCompactTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_sax-module.html delete mode 100644 doc/html/api/lxml.tests.test_sax-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_sax.ETreeSaxTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_schematron-module.html delete mode 100644 doc/html/api/lxml.tests.test_schematron-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_schematron.ETreeSchematronTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_threading-module.html delete mode 100644 doc/html/api/lxml.tests.test_threading-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker-class.html delete mode 100644 doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndInjectWorker-class.html delete mode 100644 doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker-class.html delete mode 100644 doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker-class.html delete mode 100644 doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker-class.html delete mode 100644 doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker-class.html delete mode 100644 doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.Validate-class.html delete mode 100644 doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.Worker-class.html delete mode 100644 doc/html/api/lxml.tests.test_threading.ThreadingTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_unicode-module.html delete mode 100644 doc/html/api/lxml.tests.test_unicode-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_unicode.EncodingsTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_unicode.UnicodeTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_xmlschema-module.html delete mode 100644 doc/html/api/lxml.tests.test_xmlschema-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase.simple_resolver-class.html delete mode 100644 doc/html/api/lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_xpathevaluator-module.html delete mode 100644 doc/html/api/lxml.tests.test_xpathevaluator-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_xpathevaluator.ETreeETXPathClassTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_xpathevaluator.ETreeXPathClassTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_xpathevaluator.ETreeXPathExsltTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_xslt-module.html delete mode 100644 doc/html/api/lxml.tests.test_xslt-pysrc.html delete mode 100644 doc/html/api/lxml.tests.test_xslt.ETreeEXSLTTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_xslt.ETreeXSLTExtElementTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_xslt.ETreeXSLTExtFuncTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_xslt.ETreeXSLTTestCase-class.html delete mode 100644 doc/html/api/lxml.tests.test_xslt.Py3XSLTTestCase-class.html delete mode 100644 doc/html/api/lxml.usedoctest-module.html delete mode 100644 doc/html/api/lxml.usedoctest-pysrc.html delete mode 100644 doc/html/api/mimetools.Message-class.html delete mode 100644 doc/html/api/module-tree.html delete mode 100644 doc/html/api/redirect.html delete mode 100644 doc/html/api/str-class.html delete mode 100644 doc/html/api/toc-everything.html delete mode 100644 doc/html/api/toc-lxml-module.html delete mode 100644 doc/html/api/toc-lxml.ElementInclude-module.html delete mode 100644 doc/html/api/toc-lxml.builder-module.html delete mode 100644 doc/html/api/toc-lxml.cssselect-module.html delete mode 100644 doc/html/api/toc-lxml.doctestcompare-module.html delete mode 100644 doc/html/api/toc-lxml.etree-module.html delete mode 100644 doc/html/api/toc-lxml.html-module.html delete mode 100644 doc/html/api/toc-lxml.html.ElementSoup-module.html delete mode 100644 doc/html/api/toc-lxml.html.builder-module.html delete mode 100644 doc/html/api/toc-lxml.html.clean-module.html delete mode 100644 doc/html/api/toc-lxml.html.defs-module.html delete mode 100644 doc/html/api/toc-lxml.html.diff-module.html delete mode 100644 doc/html/api/toc-lxml.html.formfill-module.html delete mode 100644 doc/html/api/toc-lxml.html.html5parser-module.html delete mode 100644 doc/html/api/toc-lxml.html.soupparser-module.html delete mode 100644 doc/html/api/toc-lxml.html.usedoctest-module.html delete mode 100644 doc/html/api/toc-lxml.includes-module.html delete mode 100644 doc/html/api/toc-lxml.isoschematron-module.html delete mode 100644 doc/html/api/toc-lxml.objectify-module.html delete mode 100644 doc/html/api/toc-lxml.pyclasslookup-module.html delete mode 100644 doc/html/api/toc-lxml.sax-module.html delete mode 100644 doc/html/api/toc-lxml.tests-module.html delete mode 100644 doc/html/api/toc-lxml.tests.common_imports-module.html delete mode 100644 doc/html/api/toc-lxml.tests.dummy_http_server-module.html delete mode 100644 doc/html/api/toc-lxml.tests.selftest-module.html delete mode 100644 doc/html/api/toc-lxml.tests.selftest2-module.html delete mode 100644 doc/html/api/toc-lxml.tests.test_builder-module.html delete mode 100644 doc/html/api/toc-lxml.tests.test_classlookup-module.html delete mode 100644 doc/html/api/toc-lxml.tests.test_css-module.html delete mode 100644 doc/html/api/toc-lxml.tests.test_doctestcompare-module.html delete mode 100644 doc/html/api/toc-lxml.tests.test_dtd-module.html delete mode 100644 doc/html/api/toc-lxml.tests.test_elementpath-module.html delete mode 100644 doc/html/api/toc-lxml.tests.test_elementtree-module.html delete mode 100644 doc/html/api/toc-lxml.tests.test_errors-module.html delete mode 100644 doc/html/api/toc-lxml.tests.test_etree-module.html delete mode 100644 doc/html/api/toc-lxml.tests.test_external_document-module.html delete mode 100644 doc/html/api/toc-lxml.tests.test_htmlparser-module.html delete mode 100644 doc/html/api/toc-lxml.tests.test_http_io-module.html delete mode 100644 doc/html/api/toc-lxml.tests.test_incremental_xmlfile-module.html delete mode 100644 doc/html/api/toc-lxml.tests.test_io-module.html delete mode 100644 doc/html/api/toc-lxml.tests.test_isoschematron-module.html delete mode 100644 doc/html/api/toc-lxml.tests.test_nsclasses-module.html delete mode 100644 doc/html/api/toc-lxml.tests.test_objectify-module.html delete mode 100644 doc/html/api/toc-lxml.tests.test_pyclasslookup-module.html delete mode 100644 doc/html/api/toc-lxml.tests.test_relaxng-module.html delete mode 100644 doc/html/api/toc-lxml.tests.test_sax-module.html delete mode 100644 doc/html/api/toc-lxml.tests.test_schematron-module.html delete mode 100644 doc/html/api/toc-lxml.tests.test_threading-module.html delete mode 100644 doc/html/api/toc-lxml.tests.test_unicode-module.html delete mode 100644 doc/html/api/toc-lxml.tests.test_xmlschema-module.html delete mode 100644 doc/html/api/toc-lxml.tests.test_xpathevaluator-module.html delete mode 100644 doc/html/api/toc-lxml.tests.test_xslt-module.html delete mode 100644 doc/html/api/toc-lxml.usedoctest-module.html delete mode 100644 doc/html/api/toc-xml.etree.ElementTree-module.html delete mode 100644 doc/html/api/toc.html delete mode 100644 doc/html/api/xml.etree.ElementTree-module.html delete mode 100644 doc/html/api/xml.etree.ElementTree-pysrc.html delete mode 100644 doc/html/api/xml.etree.ElementTree.Element-class.html delete mode 100644 doc/html/api/xml.etree.ElementTree.ElementTree-class.html delete mode 100644 doc/html/api/xml.etree.ElementTree.ParseError-class.html delete mode 100644 doc/html/api/xml.etree.ElementTree.QName-class.html delete mode 100644 doc/html/api/xml.etree.ElementTree.TreeBuilder-class.html delete mode 100644 doc/html/api/xml.etree.ElementTree.XMLParser-class.html delete mode 100644 doc/html/api/xml.etree.ElementTree._IterParseIterator-class.html delete mode 100644 doc/html/api/xml.etree.ElementTree._SimpleElementPath-class.html delete mode 100644 doc/html/build.html delete mode 100644 doc/html/capi.html delete mode 100644 doc/html/changes-4.2.5.html delete mode 100644 doc/html/compatibility.html delete mode 100644 doc/html/credits.html delete mode 100644 doc/html/cssselect.html delete mode 100644 doc/html/element_classes.html delete mode 100644 doc/html/elementsoup.html delete mode 100644 doc/html/extensions.html delete mode 100644 doc/html/html5parser.html delete mode 100644 doc/html/index.html delete mode 100644 doc/html/installation.html delete mode 100644 doc/html/intro.html delete mode 100644 doc/html/lxml-source-howto.html delete mode 100644 doc/html/lxmlhtml.html delete mode 100644 doc/html/objectify.html delete mode 100644 doc/html/parsing.html delete mode 100644 doc/html/performance.html delete mode 100644 doc/html/resolvers.html delete mode 100644 doc/html/sax.html delete mode 100644 doc/html/sitemap.html delete mode 100644 doc/html/tutorial.html delete mode 100644 doc/html/validation.html delete mode 100644 doc/html/xpathxslt.html delete mode 100644 doc/pdf/pubkey.asc delete mode 100644 doc/s5/lxml-ep2008.html create mode 100644 src/lxml/sax.c create mode 100644 src/lxml/sax.pxd create mode 100644 src/lxml/tests/test.rnc diff --git a/CHANGES.txt b/CHANGES.txt index 7e2814b..f2a2cd4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,44 @@ lxml changelog ============== +4.3.0 (2019-01-04) +================== + +Features added +-------------- + +* The module ``lxml.sax`` is compiled using Cython in order to speed it up. + +* GH#267: ``lxml.sax.ElementTreeProducer`` now preserves the namespace prefixes. + If two prefixes point to the same URI, the first prefix in alphabetical order + is used. Patch by Lennart Regebro. + +* Updated ISO-Schematron implementation to 2013 version (now MIT licensed) + 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. + Patch by hugovk. + +* The minimum dependency versions were raised to libxml2 2.9.2 and libxslt 1.1.27, + which were released in 2014 and 2012 respectively. + +* Built with Cython 0.29.2. + + +4.2.6 (2019-01-02) +================== + +Bugs fixed +---------- + +* LP#1799755: Fix a DeprecationWarning in Py3.7+. + +* Import warnings in Python 3.6+ were resolved. + + 4.2.5 (2018-09-09) ================== @@ -9,7 +47,7 @@ Bugs fixed ---------- * Javascript URLs that used URL escaping were not removed by the HTML cleaner. - Security problem found by Omar Eissa. + Security problem found by Omar Eissa. (CVE-2018-19787) 4.2.4 (2018-08-03) @@ -3867,16 +3905,16 @@ Features added prefix to namespace URI mapping. This will create namespace prefix declarations on these elements and these prefixes will show up in XML serialization. - + Bugs fixed ---------- - + * Killed yet another memory management related bug: trees created using newDoc would not get a libxml2-level dictionary, which caused problems when deallocating these documents later if they contained a node that came from a document with a dictionary. -* Moving namespaced elements between documents was problematic as +* Moving namespaced elements between documents was problematic as references to the original document would remain. This has been fixed by applying xmlReconciliateNs() after each move operation. diff --git a/INSTALL.txt b/INSTALL.txt index 8508fea..94d6a3e 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -41,24 +41,17 @@ see below. Requirements ------------ -You need Python 2.6 or later. +You need Python 2.7 or 3.4+. Unless you are using a static binary distribution (e.g. from a Windows binary installer), lxml requires libxml2 and libxslt to be installed, in particular: -* `libxml2 `_ version 2.7.0 or later. +* `libxml2 `_ version 2.9.2 or later. - * We recommend libxml2 2.9.2 or a later version. +* `libxslt `_ version 1.1.27 or later. - * If you want to use the feed parser interface, especially when - parsing from unicode strings, do not use libxml2 2.7.4 through - 2.7.6. - -* `libxslt `_ version 1.1.23 or later. - - * We recommend libxslt 1.1.28 or later. Version 1.1.25 will not - work due to a missing library symbol. + * We recommend libxslt 1.1.28 or later. Newer versions generally contain fewer bugs and are therefore recommended. XML Schema support is also still worked on in libxml2, diff --git a/MANIFEST.in b/MANIFEST.in index 47abd12..73db322 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -9,7 +9,7 @@ include src/lxml/*.c src/lxml/html/*.c recursive-include src *.pyx *.pxd *.pxi *.py recursive-include src/lxml lxml.etree.h lxml.etree_api.h etree.h etree_api.h etree_defs.h lxml_endian.h recursive-include src/lxml/isoschematron *.rng *.xsl *.txt -recursive-include src/lxml/tests *.rng *.xslt *.xml *.dtd *.xsd *.sch *.html +recursive-include src/lxml/tests *.rng *.rnc *.xslt *.xml *.dtd *.xsd *.sch *.html recursive-include src/lxml/html/tests *.data *.txt recursive-include samples *.xml recursive-include benchmark *.py diff --git a/Makefile b/Makefile index a96133a..161fa4b 100644 --- a/Makefile +++ b/Makefile @@ -12,8 +12,8 @@ PY3_WITH_CYTHON=$(shell $(PYTHON3) -c 'import Cython.Build.Dependencies' >/dev/n CYTHON_WITH_COVERAGE=$(shell $(PYTHON) -c 'import Cython.Coverage; import sys; assert not hasattr(sys, "pypy_version_info")' >/dev/null 2>/dev/null && echo " --coverage" || true) CYTHON3_WITH_COVERAGE=$(shell $(PYTHON3) -c 'import Cython.Coverage; import sys; assert not hasattr(sys, "pypy_version_info")' >/dev/null 2>/dev/null && echo " --coverage" || true) -MANYLINUX_LIBXML2_VERSION=2.9.8 -MANYLINUX_LIBXSLT_VERSION=1.1.32 +MANYLINUX_LIBXML2_VERSION=2.9.9 +MANYLINUX_LIBXSLT_VERSION=1.1.33 MANYLINUX_IMAGE_X86_64=quay.io/pypa/manylinux1_x86_64 MANYLINUX_IMAGE_686=quay.io/pypa/manylinux1_i686 @@ -78,7 +78,7 @@ valgrind_test_inplace: inplace $(PYTHON) test.py gdb_test_inplace: inplace - @echo -e "file $(PYTHON)\nrun test.py" > .gdb.command + @echo "file $(PYTHON)\nrun test.py" > .gdb.command gdb -x .gdb.command -d src -d src/lxml bench_inplace: inplace diff --git a/PKG-INFO b/PKG-INFO index f9bff79..346c362 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: lxml -Version: 4.2.5 +Version: 4.3.0 Summary: Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API. Home-page: http://lxml.de/ Author: lxml dev team @@ -31,21 +31,38 @@ Description: lxml is a Pythonic, mature binding for the libxml2 and libxslt libr After an official release of a new stable series, bug fixes may become available at - https://github.com/lxml/lxml/tree/lxml-4.2 . - Running ``easy_install lxml==4.2bugfix`` will install + https://github.com/lxml/lxml/tree/lxml-4.3 . + Running ``easy_install lxml==4.3bugfix`` will install the unreleased branch state from - https://github.com/lxml/lxml/tarball/lxml-4.2#egg=lxml-4.2bugfix + https://github.com/lxml/lxml/tarball/lxml-4.3#egg=lxml-4.3bugfix 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.2.5 (2018-09-09) + 4.3.0 (2019-01-04) ================== - Bugs fixed - ---------- + Features added + -------------- - * Javascript URLs that used URL escaping were not removed by the HTML cleaner. - Security problem found by Omar Eissa. + * The module ``lxml.sax`` is compiled using Cython in order to speed it up. + + * GH#267: ``lxml.sax.ElementTreeProducer`` now preserves the namespace prefixes. + If two prefixes point to the same URI, the first prefix in alphabetical order + is used. Patch by Lennart Regebro. + + * Updated ISO-Schematron implementation to 2013 version (now MIT licensed) + 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. + Patch by hugovk. + + * The minimum dependency versions were raised to libxml2 2.9.2 and libxslt 1.1.27, + which were released in 2014 and 2012 respectively. + + * Built with Cython 0.29.2. @@ -56,10 +73,8 @@ Classifier: Intended Audience :: Information Technology Classifier: License :: OSI Approved :: BSD License Classifier: Programming Language :: Cython Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.6 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.3 Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 diff --git a/benchmark/benchbase.py b/benchmark/benchbase.py index 6b04cb1..e34e610 100644 --- a/benchmark/benchbase.py +++ b/benchmark/benchbase.py @@ -223,7 +223,7 @@ class TreeBenchMark(object): for i in range(20 * TREE_FACTOR): SubElement(el, tag).tail = text t = current_time() - t - return (root, t) + return root, t def _setup_tree2(self, text, attributes): "tree with 520 * TREE_FACTOR 2nd level and 26 3rd level children" @@ -239,7 +239,7 @@ class TreeBenchMark(object): for ch2 in atoz: SubElement(el, "{cdefg}%s00001" % ch2).tail = text t = current_time() - t - return (root, t) + return root, t def _setup_tree3(self, text, attributes): "tree of depth 8 + TREE_FACTOR with 3 children per node" @@ -255,7 +255,7 @@ class TreeBenchMark(object): child.text = text child.tail = text t = current_time() - t - return (root, t) + return root, t def _setup_tree4(self, text, attributes): "small tree with 26 2nd level and 2 3rd level children" @@ -269,7 +269,7 @@ class TreeBenchMark(object): SubElement(el, "{cdefg}a00001", attributes).tail = text SubElement(el, "{cdefg}z00000", attributes).tail = text t = current_time() - t - return (root, t) + return root, t def benchmarks(self): """Returns a list of all benchmarks. @@ -350,7 +350,7 @@ def buildSuites(benchmark_class, etrees, selected): if match(b[0]) ] ] for bs in benchmarks ] - return (benchmark_suites, benchmarks) + return benchmark_suites, benchmarks def build_treeset_name(trees, tn, an, serialized, children): text = {0:'-', 1:'S', 2:'U'}[tn] diff --git a/buildlibxml.py b/buildlibxml.py index e114eee..2c289df 100644 --- a/buildlibxml.py +++ b/buildlibxml.py @@ -114,9 +114,9 @@ def get_prebuilt_libxml2xslt(download_dir, static_include_dirs, static_library_d ## Routines to download and build libxml2/xslt from sources: -LIBXML2_LOCATION = 'ftp://xmlsoft.org/libxml2/' -LIBICONV_LOCATION = 'ftp://ftp.gnu.org/pub/gnu/libiconv/' -ZLIB_LOCATION = 'http://zlib.net/' +LIBXML2_LOCATION = 'http://xmlsoft.org/sources/' +LIBICONV_LOCATION = 'https://ftp.gnu.org/pub/gnu/libiconv/' +ZLIB_LOCATION = 'https://zlib.net/' match_libfile_version = re.compile('^[^-]*-([.0-9-]+)[.].*').match @@ -137,7 +137,8 @@ def remote_listdir(url): return _list_dir_urllib(url) except IOError: assert url.lower().startswith('ftp://') - print("Requesting with urllib failed. Falling back to ftplib. Proxy argument will be ignored") + print("Requesting with urllib failed. Falling back to ftplib. " + "Proxy argument will be ignored for %s" % url) return _list_dir_ftplib(url) @@ -204,7 +205,8 @@ def tryint(s): def download_libxml2(dest_dir, version=None): """Downloads libxml2, returning the filename where the library was downloaded""" - version_re = re.compile(r'LATEST_LIBXML2_IS_([0-9.]+[0-9](?:-[abrc0-9]+)?)') + #version_re = re.compile(r'LATEST_LIBXML2_IS_([0-9.]+[0-9](?:-[abrc0-9]+)?)') + version_re = re.compile(r'libxml2-([0-9.]+[0-9]).tar.gz') filename = 'libxml2-%s.tar.gz' return download_library(dest_dir, LIBXML2_LOCATION, 'libxml2', version_re, filename, version=version) @@ -212,7 +214,8 @@ def download_libxml2(dest_dir, version=None): def download_libxslt(dest_dir, version=None): """Downloads libxslt, returning the filename where the library was downloaded""" - version_re = re.compile(r'LATEST_LIBXSLT_IS_([0-9.]+[0-9](?:-[abrc0-9]+)?)') + #version_re = re.compile(r'LATEST_LIBXSLT_IS_([0-9.]+[0-9](?:-[abrc0-9]+)?)') + version_re = re.compile(r'libxslt-([0-9.]+[0-9]).tar.gz') filename = 'libxslt-%s.tar.gz' return download_library(dest_dir, LIBXML2_LOCATION, 'libxslt', version_re, filename, version=version) @@ -220,7 +223,7 @@ def download_libxslt(dest_dir, version=None): def download_libiconv(dest_dir, version=None): """Downloads libiconv, returning the filename where the library was downloaded""" - version_re = re.compile(r'^libiconv-([0-9.]+[0-9]).tar.gz$') + version_re = re.compile(r'libiconv-([0-9.]+[0-9]).tar.gz') filename = 'libiconv-%s.tar.gz' return download_library(dest_dir, LIBICONV_LOCATION, 'libiconv', version_re, filename, version=version) @@ -260,7 +263,7 @@ def download_library(dest_dir, location, name, version_re, filename, version=Non if location.startswith('ftp://'): fns = remote_listdir(location) else: - fns = http_listfiles(location, filename.replace('%s', '(?:[0-9.]+[0-9])')) + fns = http_listfiles(location, '(%s)' % filename.replace('%s', '(?:[0-9.]+[0-9])')) version = find_max_version(name, fns, version_re) except IOError: # network failure - maybe we have the files already? @@ -435,11 +438,8 @@ def build_libxml2xslt(download_dir, build_dir, libxslt_configure_cmd = configure_cmd + [ '--without-python', '--with-libxml-prefix=%s' % prefix, - ] - if sys.platform in ('darwin',): - libxslt_configure_cmd += [ - '--without-crypto', - ] + '--without-crypto', + ] cmmi(libxslt_configure_cmd, libxslt_dir, multicore, **call_setup) # collect build setup for lxml @@ -460,4 +460,4 @@ def build_libxml2xslt(download_dir, build_dir, for filename in listdir if lib in filename and filename.endswith('.a')] - return (xml2_config, xslt_config) + return xml2_config, xslt_config diff --git a/doc/FAQ.txt b/doc/FAQ.txt index 1c110e1..873e282 100644 --- a/doc/FAQ.txt +++ b/doc/FAQ.txt @@ -218,8 +218,8 @@ not take advantage of lxml's enhanced feature set. a query framework for XML/HTML, similar to jQuery for JavaScript * `python-docx `_, a package for handling Microsoft's Word OpenXML format -* `Rambler `_, - a meta search engine that aggregates different data sources +* `Rambler `_, + news aggregator on Runet * `rdfadict `_, an RDFa parser with a simple dictionary-like interface. * `xupdate-processor `_, diff --git a/doc/api.txt b/doc/api.txt index d4f2c48..5ebaecd 100644 --- a/doc/api.txt +++ b/doc/api.txt @@ -192,8 +192,7 @@ children. Using the tree defined above, we get: >>> [ child.tag for child in root ] ['a', 'b', 'c', 'd'] -To iterate in the opposite direction, use the builtin ``reversed()`` function -that exists in Python 2.4 and later. +To iterate in the opposite direction, use the builtin ``reversed()`` function. Tree traversal should use the ``element.iter()`` method: @@ -251,7 +250,7 @@ The most common way to traverse an XML tree is depth-first, which traverses the tree in document order. This is implemented by the ``.iter()`` method. While there is no dedicated method for breadth-first traversal, it is almost as simple if you use the -``collections.deque`` type that is available in Python 2.4 and later. +``collections.deque`` type. .. sourcecode:: pycon diff --git a/doc/build.txt b/doc/build.txt index b0499e4..8d375f7 100644 --- a/doc/build.txt +++ b/doc/build.txt @@ -47,8 +47,9 @@ working Cython installation. You can use pip_ to install it:: https://github.com/lxml/lxml/blob/master/requirements.txt -lxml currently requires at least Cython 0.20, later release versions -should work as well. +lxml currently requires at least Cython 0.26.1, later release versions +should work as well. For Python 3.7 support, at least Cython 0.29 is +required. Github, git and hg diff --git a/doc/html/FAQ.html b/doc/html/FAQ.html deleted file mode 100644 index 639826d..0000000 --- a/doc/html/FAQ.html +++ /dev/null @@ -1,1000 +0,0 @@ - - - - - -lxml FAQ - Frequently Asked Questions - - - - - -
-

lxml FAQ - Frequently Asked Questions

- -

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

-
-

Contents

- -
-
-

General Questions

-
-

Is there a tutorial?

-

Read the lxml.etree Tutorial. While this is still work in progress -(just as any good documentation), it provides an overview of the most -important concepts in lxml.etree. If you want to help out, -improving the tutorial is a very good place to start.

-

There is also a tutorial for ElementTree which works for -lxml.etree. The documentation of the extended etree API also -contains many examples for lxml.etree. Fredrik Lundh's element -library contains a lot of nice recipes that show how to solve common -tasks in ElementTree and lxml.etree. To learn using -lxml.objectify, read the objectify documentation.

-

John Shipman has written another tutorial called Python XML -processing with lxml that contains lots of examples. Liza Daly -wrote a nice article about high-performance aspects when parsing -large files with lxml.

-
-
-

Where can I find more documentation about lxml?

-

There is a lot of documentation on the web and also in the Python -standard library documentation, as lxml implements the well-known -ElementTree API and tries to follow its documentation as closely as -possible. The recipes in Fredrik Lundh's element library are -generally worth taking a look at. There are a couple of issues where -lxml cannot keep up compatibility. They are described in the -compatibility documentation.

-

The lxml specific extensions to the API are described by individual -files in the doc directory of the source distribution and on the -web page.

-

The generated API documentation is a comprehensive API reference -for the lxml package.

-
-
-

What standards does lxml implement?

-

The compliance to XML Standards depends on the support in libxml2 and libxslt. -Here is a quote from http://xmlsoft.org/:

-
-In most cases libxml2 tries to implement the specifications in a relatively -strictly compliant way. As of release 2.4.16, libxml2 passed all 1800+ tests -from the OASIS XML Tests Suite.
-

lxml currently supports libxml2 2.6.20 or later, which has even better -support for various XML standards. The important ones are:

-
    -
  • XML 1.0
  • -
  • HTML 4
  • -
  • XML namespaces
  • -
  • XML Schema 1.0
  • -
  • XPath 1.0
  • -
  • XInclude 1.0
  • -
  • XSLT 1.0
  • -
  • EXSLT
  • -
  • XML catalogs
  • -
  • canonical XML
  • -
  • RelaxNG
  • -
  • xml:id
  • -
  • xml:base
  • -
-

Support for XML Schema is currently not 100% complete in libxml2, but -is definitely very close to compliance. Schematron is supported in -two ways, the best being the original ISO Schematron reference -implementation via XSLT. libxml2 also supports loading documents -through HTTP and FTP.

-

For RelaxNG Compact Syntax -support, there is a tool called rnc2rng, -written by David Mertz, which you might be able to use from Python. Failing -that, trang is the 'official' -command line tool (written in Java) to do the conversion.

-
-
-

Who uses lxml?

-

As an XML library, lxml is often used under the hood of in-house -server applications, such as web servers or applications that -facilitate some kind of content management. Many people who deploy -Zope, Plone or Django use it together with lxml in the background, -without speaking publicly about it. Therefore, it is hard to get an -idea of who uses it, and the following list of 'users and projects we -know of' is very far from a complete list of lxml's users.

-

Also note that the compatibility to the ElementTree library does not -require projects to set a hard dependency on lxml - as long as they do -not take advantage of lxml's enhanced feature set.

-
    -
  • cssutils, -a CSS parser and toolkit, can be used with lxml.cssselect
  • -
  • Deliverance, -a content theming tool
  • -
  • Enfold Proxy 4, -a web server accelerator with on-the-fly XSLT processing
  • -
  • Inteproxy, -a secure HTTP proxy
  • -
  • lwebstring, -an XML template engine
  • -
  • openpyxl, -a library to read/write MS Excel 2007 files
  • -
  • OpenXMLlib, -a library for handling OpenXML document meta data
  • -
  • PsychoPy, -psychology software in Python
  • -
  • Pycoon, -a WSGI web development framework based on XML pipelines
  • -
  • pycsw, -an OGC CSW server implementation written in Python
  • -
  • PyQuery, -a query framework for XML/HTML, similar to jQuery for JavaScript
  • -
  • python-docx, -a package for handling Microsoft's Word OpenXML format
  • -
  • Rambler, -a meta search engine that aggregates different data sources
  • -
  • rdfadict, -an RDFa parser with a simple dictionary-like interface.
  • -
  • xupdate-processor, -an XUpdate implementation for lxml.etree
  • -
  • Diazo, -an XSLT-under-the-hood web site theming engine
  • -
-

Zope3 and some of its extensions have good support for lxml:

-
    -
  • gocept.lxml, -Zope3 interface bindings for lxml
  • -
  • z3c.rml, -an implementation of ReportLab's RML format
  • -
  • zif.sedna, -an XQuery based interface to the Sedna OpenSource XML database
  • -
-

And don't miss the quotes by our generally happy users, and other -sites that link to lxml. As Liza Daly puts it: "Many software -products come with the pick-two caveat, meaning that you must choose -only two: speed, flexibility, or readability. When used carefully, -lxml can provide all three."

-
-
-

What is the difference between lxml.etree and lxml.objectify?

-

The two modules provide different ways of handling XML. However, objectify -builds on top of lxml.etree and therefore inherits most of its capabilities -and a large portion of its API.

-
    -
  • lxml.etree is a generic API for XML and HTML handling. It aims for -ElementTree compatibility and supports the entire XML infoset. It is well -suited for both mixed content and data centric XML. Its generality makes it -the best choice for most applications.

    -
  • -
  • lxml.objectify is a specialized API for XML data handling in a Python object -syntax. It provides a very natural way to deal with data fields stored in a -structurally well defined XML format. Data is automatically converted to -Python data types and can be manipulated with normal Python operators. Look -at the examples in the objectify documentation to see what it feels like -to use it.

    -

    Objectify is not well suited for mixed contents or HTML documents. As it is -built on top of lxml.etree, however, it inherits the normal support for -XPath, XSLT or validation.

    -
  • -
-
-
-

How can I make my application run faster?

-

lxml.etree is a very fast library for processing XML. There are, however, a -few caveats involved in the mapping of the powerful libxml2 library to the -simple and convenient ElementTree API. Not all operations are as fast as the -simplicity of the API might suggest, while some use cases can heavily benefit -from finding the right way of doing them. The benchmark page has a -comparison to other ElementTree implementations and a number of tips for -performance tweaking. As with any Python application, the rule of thumb is: -the more of your processing runs in C, the faster your application gets. See -also the section on threading.

-
-
-

What about that trailing text on serialised Elements?

-

The ElementTree tree model defines an Element as a container with a tag name, -contained text, child Elements and a tail text. This means that whenever you -serialise an Element, you will get all parts of that Element:

-
>>> root = etree.XML("<root><tag>text<child/></tag>tail</root>")
->>> print(etree.tostring(root[0]))
-<tag>text<child/></tag>tail
-
-

Here is an example that shows why not serialising the tail would be -even more surprising from an object point of view:

-
>>> root = etree.Element("test")
-
->>> root.text = "TEXT"
->>> print(etree.tostring(root))
-<test>TEXT</test>
-
->>> root.tail = "TAIL"
->>> print(etree.tostring(root))
-<test>TEXT</test>TAIL
-
->>> root.tail = None
->>> print(etree.tostring(root))
-<test>TEXT</test>
-
-

Just imagine a Python list where you append an item and it doesn't -show up when you look at the list.

-

The .tail property is a huge simplification for the tree model as -it avoids text nodes to appear in the list of children and makes -access to them quick and simple. So this is a benefit in most -applications and simplifies many, many XML tree algorithms.

-

However, in document-like XML (and especially HTML), the above result can be -unexpected to new users and can sometimes require a bit more overhead. A good -way to deal with this is to use helper functions that copy the Element without -its tail. The lxml.html package also deals with this in a couple of -places, as most HTML algorithms benefit from a tail-free behaviour.

-
-
-

How can I find out if an Element is a comment or PI?

-
>>> root = etree.XML("<?my PI?><root><!-- empty --></root>")
-
->>> root.tag
-'root'
->>> root.getprevious().tag is etree.PI
-True
->>> root[0].tag is etree.Comment
-True
-
-
-
-

How can I map an XML tree into a dict of dicts?

-

I'm glad you asked.

-
def recursive_dict(element):
-     return element.tag, \
-            dict(map(recursive_dict, element)) or element.text
-
-

Note that this beautiful quick-and-dirty converter expects children -to have unique tag names and will silently overwrite any data that -was contained in preceding siblings with the same name. For any -real-world application of xml-to-dict conversion, you would better -write your own, longer version of this.

-
-
-

Why does lxml sometimes return 'str' values for text in Python 2?

-

In Python 2, lxml's API returns byte strings for plain ASCII text -values, be it for tag names or text in Element content. This is the -same behaviour as known from ElementTree. The reasoning is that ASCII -encoded byte strings are compatible with Unicode strings in Python 2, -but consume less memory (usually by a factor of 2 or 4) and are faster -to create because they do not require decoding. Plain ASCII string -values are very common in XML, so this optimisation is generally worth -it.

-

In Python 3, lxml always returns Unicode strings for text and names, -as does ElementTree. Since Python 3.3, Unicode strings containing -only characters that can be encoded in ASCII or Latin-1 are generally -as efficient as byte strings. In older versions of Python 3, the -above mentioned drawbacks apply.

-
-
-

Why do I get XInclude or DTD lookup failures on some systems but not on others?

-

To avoid network access, external resources are first looked up in -XML catalogues. -Many systems have them installed by default, but some don't. -On Linux systems, the default place to look is the index file -/etc/xml/catalog, which most importantly provides a mapping from -doctype IDs to locally installed DTD files.

-

See the libxml2 catalogue documentation -for further information.

-
-
-

How do namespaces work in lxml?

-

The same as in ElementTree. See the tutorial.

-
-
-
-

Installation

-
-

Which version of libxml2 and libxslt should I use or require?

-

It really depends on your application, but the rule of thumb is: more recent -versions contain less bugs and provide more features.

-
    -
  • Do not use libxml2 2.6.27 if you want to use XPath (including XSLT). You -will get crashes when XPath errors occur during the evaluation (e.g. for -unknown functions). This happens inside the evaluation call to libxml2, so -there is nothing that lxml can do about it.
  • -
  • Try to use versions of both libraries that were released together. At least -the libxml2 version should not be older than the libxslt version.
  • -
  • If you use XML Schema or Schematron which are still under development, the -most recent version of libxml2 is usually a good bet.
  • -
  • The same applies to XPath, where a substantial number of bugs and memory -leaks were fixed over time. If you encounter crashes or memory leaks in -XPath applications, try a more recent version of libxml2.
  • -
  • For parsing and fixing broken HTML, lxml requires at least libxml2 2.6.21.
  • -
  • For the normal tree handling, however, any libxml2 version starting with -2.6.20 should do.
  • -
-

Read the release notes of libxml2 and the release notes of libxslt to -see when (or if) a specific bug has been fixed.

-
-
-

Where are the binary builds?

-

Thanks to the help by Joar Wandborg, we try to make "manylinux" binary -builds for Linux available shortly after each source release, as they -are very frequently used by continuous integration and/or build servers.

-

Thanks to the help by Maximilian Hils and the Appveyor build service, -we also try to serve the frequent requests for binary builds available -for Microsoft Windows in a timely fashion, since users of that platform -usually fail to build lxml themselves. Two of the major design issues -of this operating system make this non-trivial for its users: the lack -of a pre-installed standard compiler and the missing package management.

-

Besides that, Christoph Gohlke generously provides unofficial lxml binary -builds for Windows -that are usually very up to date. Consider using them if you prefer a -binary build over a signed official source release.

-
-
-

Why do I get errors about missing UCS4 symbols when installing lxml?

-

You are using a Python installation that was configured for a different -internal Unicode representation than the lxml package you are trying to -install. CPython versions before 3.3 allowed to switch between two types -at build time: the 32 bit encoding UCS4 and the 16 bit encoding UCS2. -Sadly, both are not compatible, so eggs and other binary distributions -can only support the one they were compiled with.

-

This means that you have to compile lxml from sources for your system. Note -that you do not need Cython for this, the lxml source distribution is directly -compilable on both platform types. See the build instructions on how to do -this.

-
-
-

My C compiler crashes on installation

-

lxml consists of a relatively large amount of (Cython) generated C code -in a single source module. Compiling this module requires a lot of free -memory, usually more than half a GB, which can pose problems especially on -shared/cloud build systems.

-

If your C compiler crashes while building lxml from sources, consider -using one of the binary wheels that we provide. The "manylinux" binaries -should generally work well on most build systems and install substantially -faster than a source build.

-
-
-
-

Contributing

-
-

Why is lxml not written in Python?

-

It almost is.

-

lxml is not written in plain Python, because it interfaces with two C -libraries: libxml2 and libxslt. Accessing them at the C-level is -required for performance reasons.

-

However, to avoid writing plain C-code and caring too much about the -details of built-in types and reference counting, lxml is written in -Cython, a superset of the Python language that translates to C-code. -Chances are that if you know Python, you can write code that Cython -accepts. Again, the C-ish style used in the lxml code is just for -performance optimisations. If you want to contribute, don't bother -with the details, a Python implementation of your contribution is -better than none. And keep in mind that lxml's flexible API often -favours an implementation of features in pure Python, without -bothering with C-code at all. For example, the lxml.html package -is written entirely in Python.

-

Please contact the mailing list if you need any help.

-
-
-

How can I contribute?

-

If you find something that you would like lxml to do (or do better), -then please tell us about it on the mailing list. Pull requests -on github are always appreciated, especially when accompanied by unit -tests and documentation (doctests would be great). See the tests -subdirectories in the lxml source tree (below the src directory) -and the ReST text files in the doc directory.

-

We also have a list of missing features that we would like to -implement but didn't due to lack if time. If you find the time, -patches are very welcome.

-

Besides enhancing the code, there are a lot of places where you can help the -project and its user base. You can

-
    -
  • spread the word and write about lxml. Many users (especially new Python -users) have not yet heard about lxml, although our user base is constantly -growing. If you write your own blog and feel like saying something about -lxml, go ahead and do so. If we think your contribution or criticism is -valuable to other users, we may even put a link or a quote on the project -page.
  • -
  • provide code examples for the general usage of lxml or specific problems -solved with lxml. Readable code is a very good way of showing how a library -can be used and what great things you can do with it. Again, if we hear -about it, we can set a link on the project page.
  • -
  • work on the documentation. The web page is generated from a set of ReST -text files. It is meant both as a representative project page for lxml -and as a site for documenting lxml's API and usage. If you have questions -or an idea how to make it more readable and accessible while you are reading -it, please send a comment to the mailing list.
  • -
  • enhance the web site. We put some work into making the web site -usable, understandable and also easy to find, but there's always -things that can be done better. You may notice that we are not -top-ranked when searching the web for "Python and XML", so maybe you -have an idea how to improve that.
  • -
  • help with the tutorial. A tutorial is the most important starting point for -new users, so it is important for us to provide an easy to understand guide -into lxml. As all documentation, the tutorial is work in progress, so we -appreciate every helping hand.
  • -
  • improve the docstrings. lxml uses docstrings to support Python's integrated -online help() function. However, sometimes these are not sufficient to -grasp the details of the function in question. If you find such a place, -you can try to write up a better description and send it to the mailing -list.
  • -
-
-
-
-

Bugs

-
-

My application crashes!

-

One of the goals of lxml is "no segfaults", so if there is no clear -warning in the documentation that you were doing something potentially -harmful, you have found a bug and we would like to hear about it. -Please report this bug to the mailing list. See the section on bug -reporting to learn how to do that.

-

If your application (or e.g. your web container) uses threads, please -see the FAQ section on threading to check if you touch on one of the -potential pitfalls.

-

In any case, try to reproduce the problem with the latest versions of -libxml2 and libxslt. From time to time, bugs and race conditions are found -in these libraries, so a more recent version might already contain a fix for -your problem.

-

Remember: even if you see lxml appear in a crash stack trace, it is -not necessarily lxml that caused the crash.

-
-
-

My application crashes on MacOS-X!

-

This was a common problem up to lxml 2.1.x. Since lxml 2.2, the only -officially supported way to use it on this platform is through a -static build against freshly downloaded versions of libxml2 and -libxslt. See the build instructions for MacOS-X.

-
-
-

I think I have found a bug in lxml. What should I do?

-

First, you should look at the current developer changelog to see if this -is a known problem that has already been fixed in the master branch since the -release you are using.

-

Also, the 'crash' section above has a few good advices what to try to see if -the problem is really in lxml - and not in your setup. Believe it or not, -that happens more often than you might think, especially when old libraries -or even multiple library versions are installed.

-

You should always try to reproduce the problem with the latest -versions of libxml2 and libxslt - and make sure they are used. -lxml.etree can tell you what it runs with:

-
import sys
-from lxml import etree
-
-print("%-20s: %s" % ('Python',           sys.version_info))
-print("%-20s: %s" % ('lxml.etree',       etree.LXML_VERSION))
-print("%-20s: %s" % ('libxml used',      etree.LIBXML_VERSION))
-print("%-20s: %s" % ('libxml compiled',  etree.LIBXML_COMPILED_VERSION))
-print("%-20s: %s" % ('libxslt used',     etree.LIBXSLT_VERSION))
-print("%-20s: %s" % ('libxslt compiled', etree.LIBXSLT_COMPILED_VERSION))
-
-

If you can figure that the problem is not in lxml but in the -underlying libxml2 or libxslt, you can ask right on the respective -mailing lists, which may considerably reduce the time to find a fix or -work-around. See the next question for some hints on how to do that.

-

Otherwise, we would really like to hear about it. Please report it to -the bug tracker or to the mailing list so that we can fix it. -It is very helpful in this case if you can come up with a short code -snippet that demonstrates your problem. If others can reproduce and -see the problem, it is much easier for them to fix it - and maybe even -easier for you to describe it and get people convinced that it really -is a problem to fix.

-

It is important that you always report the version of lxml, libxml2 -and libxslt that you get from the code snippet above. If we do not -know the library versions you are using, we will ask back, so it will -take longer for you to get a helpful answer.

-

Since as a user of lxml you are likely a programmer, you might find -this article on bug reports an interesting read.

-
-
-

How do I know a bug is really in lxml and not in libxml2?

-

A large part of lxml's functionality is implemented by libxml2 and -libxslt, so problems that you encounter may be in one or the other. -Knowing the right place to ask will reduce the time it takes to fix -the problem, or to find a work-around.

-

Both libxml2 and libxslt come with their own command line frontends, -namely xmllint and xsltproc. If you encounter problems with -XSLT processing for specific stylesheets or with validation for -specific schemas, try to run the XSLT with xsltproc or the -validation with xmllint respectively to find out if it fails there -as well. If it does, please report directly to the mailing lists of -the respective project, namely:

- -

On the other hand, everything that seems to be related to Python code, -including custom resolvers, custom XPath functions, etc. is likely -outside of the scope of libxml2/libxslt. If you encounter problems -here or you are not sure where there the problem may come from, please -ask on the lxml mailing list first.

-

In any case, a good explanation of the problem including some simple -test code and some input data will help us (or the libxml2 developers) -see and understand the problem, which largely increases your chance of -getting help. See the question above for a few hints on what is -helpful here.

-
-
-
-

Threading

-
-

Can I use threads to concurrently access the lxml API?

-

Short answer: yes, if you use lxml 2.2 and later.

-

Since version 1.1, lxml frees the GIL (Python's global interpreter -lock) internally when parsing from disk and memory, as long as you use -either the default parser (which is replicated for each thread) or -create a parser for each thread yourself. lxml also allows -concurrency during validation (RelaxNG and XMLSchema) and XSL -transformation. You can share RelaxNG, XMLSchema and XSLT objects -between threads.

-

While you can also share parsers between threads, this will serialize -the access to each of them, so it is better to .copy() parsers or -to just use the default parser if you do not need any special -configuration. The same applies to the XPath evaluators, which use an -internal lock to protect their prepared evaluation contexts. It is -therefore best to use separate evaluator instances in threads.

-

Warning: Before lxml 2.2, and especially before 2.1, there were -various issues when moving subtrees between different threads, or when -applying XSLT objects from one thread to trees parsed or modified in -another. If you need code to run with older versions, you should -generally avoid modifying trees in other threads than the one it was -generated in. Although this should work in many cases, there are -certain scenarios where the termination of a thread that parsed a tree -can crash the application if subtrees of this tree were moved to other -documents. You should be on the safe side when passing trees between -threads if you either

-
    -
  • do not modify these trees and do not move their elements to other -trees, or
  • -
  • do not terminate threads while the trees they parsed are still in -use (e.g. by using a fixed size thread-pool or long-running threads -in processing chains)
  • -
-

Since lxml 2.2, even multi-thread pipelines are supported. However, -note that it is more efficient to do all tree work inside one thread, -than to let multiple threads work on a tree one after the other. This -is because trees inherit state from the thread that created them, -which must be maintained when the tree is modified inside another -thread.

-
-
-

Does my program run faster if I use threads?

-

Depends. The best way to answer this is timing and profiling.

-

The global interpreter lock (GIL) in Python serializes access to the -interpreter, so if the majority of your processing is done in Python -code (walking trees, modifying elements, etc.), your gain will be -close to zero. The more of your XML processing moves into lxml, -however, the higher your gain. If your application is bound by XML -parsing and serialisation, or by very selective XPath expressions and -complex XSLTs, your speedup on multi-processor machines can be -substantial.

-

See the question above to learn which operations free the GIL to support -multi-threading.

-
-
-

Would my single-threaded program run faster if I turned off threading?

-

Possibly, yes. You can see for yourself by compiling lxml entirely -without threading support. Pass the --without-threading option to -setup.py when building lxml from source. You can also build libxml2 -without pthread support (--without-pthreads option), which may add -another bit of performance. Note that this will leave internal data -structures entirely without thread protection, so make sure you really -do not use lxml outside of the main application thread in this case.

-
-
-

Why can't I reuse XSLT stylesheets in other threads?

-

Since later lxml 2.0 versions, you can do this. There is some -overhead involved as the result document needs an additional cleanup -traversal when the input document and/or the stylesheet were created -in other threads. However, on a multi-processor machine, the gain of -freeing the GIL easily covers this drawback.

-

If you need even the last bit of performance, consider keeping (a copy -of) the stylesheet in thread-local storage, and try creating the input -document(s) in the same thread. And do not forget to benchmark your -code to see if the increased code complexity is really worth it.

-
-
-

My program crashes when run with mod_python/Pyro/Zope/Plone/...

-

These environments can use threads in a way that may not make it obvious when -threads are created and what happens in which thread. This makes it hard to -ensure lxml's threading support is used in a reliable way. Sadly, if problems -arise, they are as diverse as the applications, so it is difficult to provide -any generally applicable solution. Also, these environments are so complex -that problems become hard to debug and even harder to reproduce in a -predictable way. If you encounter crashes in one of these systems, but your -code runs perfectly when started by hand, the following gives you a few hints -for possible approaches to solve your specific problem:

-
    -
  • make sure you use recent versions of libxml2, libxslt and lxml. The -libxml2 developers keep fixing bugs in each release, and lxml also -tries to become more robust against possible pitfalls. So newer -versions might already fix your problem in a reliable way. Version -2.2 of lxml contains many improvements.

    -
  • -
  • make sure the library versions you installed are really used. Do -not rely on what your operating system tells you! Print the version -constants in lxml.etree from within your runtime environment to -make sure it is the case. This is especially a problem under -MacOS-X when newer library versions were installed in addition to -the outdated system libraries. Please read the bugs section -regarding MacOS-X in this FAQ.

    -
  • -
  • if you use mod_python, try setting this option:

    -
    -

    PythonInterpreter main_interpreter

    -
    -

    There was a discussion on the mailing list about this problem:

    -
    -

    http://comments.gmane.org/gmane.comp.python.lxml.devel/2942

    -
    -
  • -
  • in a threaded environment, try to initially import lxml.etree -from the main application thread instead of doing first-time imports -separately in each spawned worker thread. If you cannot control the -thread spawning of your web/application server, an import of -lxml.etree in sitecustomize.py or usercustomize.py may still do -the trick.

    -
  • -
  • compile lxml without threading support by running setup.py with the ---without-threading option. While this might be slower in certain -scenarios on multi-processor systems, it might also keep your application -from crashing, which should be worth more to you than peek performance. -Remember that lxml is fast anyway, so concurrency may not even be worth it.

    -
  • -
  • look out for fancy XSLT stuff like foreign document access or -passing in subtrees trough XSLT variables. This might or might not -work, depending on your specific usage. Again, later versions of -lxml and libxslt provide safer support here.

    -
  • -
  • try copying trees at suspicious places in your code and working with -those instead of a tree shared between threads. Note that the -copying must happen inside the target thread to be effective, not in -the thread that created the tree. Serialising in one thread and -parsing in another is also a simple (and fast) way of separating -thread contexts.

    -
  • -
  • try keeping thread-local copies of XSLT stylesheets, i.e. one per thread, -instead of sharing one. Also see the question above.

    -
  • -
  • you can try to serialise suspicious parts of your code with explicit thread -locks, thus disabling the concurrency of the runtime system.

    -
  • -
  • report back on the mailing list to see if there are other ways to work -around your specific problems. Do not forget to report the version numbers -of lxml, libxml2 and libxslt you are using (see the question on reporting -a bug).

    -
  • -
-

Note that most of these options will degrade performance and/or your -code quality. If you are unsure what to do, please ask on the mailing -list.

-
-
-
-

Parsing and Serialisation

-
-

Why doesn't the pretty_print option reformat my XML output?

-

Pretty printing (or formatting) an XML document means adding white space to -the content. These modifications are harmless if they only impact elements in -the document that do not carry (text) data. They corrupt your data if they -impact elements that contain data. If lxml cannot distinguish between -whitespace and data, it will not alter your data. Whitespace is therefore -only added between nodes that do not contain data. This is always the case -for trees constructed element-by-element, so no problems should be expected -here. For parsed trees, a good way to assure that no conflicting whitespace -is left in the tree is the remove_blank_text option:

-
>>> parser = etree.XMLParser(remove_blank_text=True)
->>> tree = etree.parse(filename, parser)
-
-

This will allow the parser to drop blank text nodes when constructing the -tree. If you now call a serialization function to pretty print this tree, -lxml can add fresh whitespace to the XML tree to indent it.

-

Note that the remove_blank_text option also uses a heuristic if it -has no definite knowledge about the document's ignorable whitespace. -It will keep blank text nodes that appear after non-blank text nodes -at the same level. This is to prevent document-style XML from losing -content.

-

The HTMLParser has this structural knowledge built-in, which means that -most whitespace that appears between tags in HTML documents will not -be removed by this option, except in places where it is truly ignorable, -e.g. in the page header, between table structure tags, etc. Therefore, -it is also safe to use this option with the HTMLParser, as it will keep -content like the following intact (i.e. it will not remove the space -that separates the two words):

-
<p><b>some</b> <em>text</em></p>
-
-

If you want to be sure all blank text is removed from an XML document -(or just more blank text than the parser does by itself), you have to -use either a DTD to tell the parser which whitespace it can safely -ignore, or remove the ignorable whitespace manually after parsing, -e.g. by setting all tail text to None:

-
for element in root.iter():
-    element.tail = None
-
-

Fredrik Lundh also has a Python-level function for indenting XML by -appending whitespace to tags. It can be found on his element -library recipe page.

-
-
-

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

-

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

-

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

-

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

-

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

-

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

-

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

-
-
-

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

-

Technically, yes. However, you likely do not want to do that, because -it is extremely inefficient. The text encoding that libxml2 uses -internally is UTF-8, so parsing from a Unicode file means that Python -first reads a chunk of data from the file, then decodes it into a new -buffer, and then copies it into a new unicode string object, just to -let libxml2 make yet another copy while encoding it down into UTF-8 -in order to parse it. It's clear that this involves a lot more -recoding and copying than when parsing straight from the bytes that -the file contains.

-

If you really know the encoding better than the parser (e.g. when -parsing HTML that lacks a content declaration), then instead of passing -an encoding parameter into the file object when opening it, create a -new instance of an XMLParser or HTMLParser and pass the encoding into -its constructor. Afterwards, use that parser for parsing, e.g. by -passing it into the etree.parse(file, parser) function. Remember -to open the file in binary mode (mode="rb"), or, if possible, prefer -passing the file path directly into parse() instead of an opened -Python file object.

-
-
-

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

-

The str() implementation of the XSLTResultTree class (a subclass of the -ElementTree class) knows about the output method chosen in the stylesheet -(xsl:output), write() doesn't. If you call write(), the result will be a -normal XML tree serialization in the requested encoding. Calling this method -may also fail for XSLT results that are not XML trees (e.g. string results).

-

If you call str(), it will return the serialized result as specified by the -XSL transform. This correctly serializes string results to encoded Python -strings and honours xsl:output options like indent. This almost -certainly does what you want, so you should only use write() if you are -sure that the XSLT result is an XML tree and you want to override the encoding -and indentation options requested by the stylesheet.

-
-
-

Why can't I just delete parents or clear the root node in iterparse()?

-

The iterparse() implementation is based on the libxml2 parser. It -requires the tree to be intact to finish parsing. If you delete or modify -parents of the current node, chances are you modify the structure in a way -that breaks the parser. Normally, this will result in a segfault. Please -refer to the iterparse section of the lxml API documentation to find out -what you can do and what you can't do.

-
-
-

How do I output null characters in XML text?

-

Don't. What you would produce is not well-formed XML. XML parsers -will refuse to parse a document that contains null characters. The -right way to embed binary data in XML is using a text encoding such as -uuencode or base64.

-
-
-

Is lxml vulnerable to XML bombs?

-

This has nothing to do with lxml itself, only with the parser of -libxml2. Since libxml2 version 2.7, the parser imposes hard security -limits on input documents to prevent DoS attacks with forged input -data. Since lxml 2.2.1, you can disable these limits with the -huge_tree parser option if you need to parse really large, -trusted documents. All lxml versions will leave these restrictions -enabled by default.

-

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

-

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

-
-
-

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

-

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

-

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

-

Some of the most famous excessive content expansion attacks -use XML entity references. Luckily, entity expansion is mostly -useless for the data commonly sent through web services and -can simply be disabled, which rules out several types of -denial of service attacks at once. This also involves an attack -that reads local files from the server, as XML entities can be -defined to expand into their content. Consequently, version -1.2 of the SOAP standard explicitly disallows entity references -in the XML stream.

-

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

-

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

-

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

-

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

-

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

-
-
-
-

XPath and Document Traversal

-
-

What are the findall() and xpath() methods on Element(Tree)?

-

findall() is part of the original ElementTree API. It supports a -simple subset of the XPath language, without predicates, conditions and -other advanced features. It is very handy for finding specific tags in a -tree. Another important difference is namespace handling, which uses the -{namespace}tagname notation. This is not supported by XPath. The -findall, find and findtext methods are compatible with other ElementTree -implementations and allow writing portable code that runs on ElementTree, -cElementTree and lxml.etree.

-

xpath(), on the other hand, supports the complete power of the XPath -language, including predicates, XPath functions and Python extension -functions. The syntax is defined by the XPath specification. If you need -the expressiveness and selectivity of XPath, the xpath() method, the -XPath class and the XPathEvaluator are the best choice.

-
-
-

Why doesn't findall() support full XPath expressions?

-

It was decided that it is more important to keep compatibility with -ElementTree to simplify code migration between the libraries. The main -difference compared to XPath is the {namespace}tagname notation used in -findall(), which is not valid XPath.

-

ElementTree and lxml.etree use the same implementation, which assures 100% -compatibility. Note that findall() is so fast in lxml that a native -implementation would not bring any performance benefits.

-
-
-

How can I find out which namespace prefixes are used in a document?

-

You can traverse the document (root.iter()) and collect the prefix -attributes from all Elements into a set. However, it is unlikely that you -really want to do that. You do not need these prefixes, honestly. You only -need the namespace URIs. All namespace comparisons use these, so feel free to -make up your own prefixes when you use XPath expressions or extension -functions.

-

The only place where you might consider specifying prefixes is the -serialization of Elements that were created through the API. Here, you can -specify a prefix mapping through the nsmap argument when creating the root -Element. Its children will then inherit this prefix for serialization.

-
-
-

How can I specify a default namespace for XPath expressions?

-

You can't. In XPath, there is no such thing as a default namespace. Just use -an arbitrary prefix and let the namespace dictionary of the XPath evaluators -map it to your namespace. See also the question above.

-
-
-
- - - \ No newline at end of file diff --git a/doc/html/api.html b/doc/html/api.html deleted file mode 100644 index 30e9512..0000000 --- a/doc/html/api.html +++ /dev/null @@ -1,538 +0,0 @@ - - - - - -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 -new API. This page describes the major differences and a few additions to the -main ElementTree API.

-

For a complete reference of the API, see the generated API -documentation.

-

Separate pages describe the support for parsing XML, executing XPath and -XSLT, validating XML and interfacing with other XML tools through the -SAX-API.

-

lxml is extremely extensible through XPath functions in Python, custom -Python element classes, custom URL resolvers and even at the C-level.

- -
-

lxml.etree

-

lxml.etree tries to follow the ElementTree API wherever it can. There are -however some incompatibilities (see compatibility). The extensions are -documented here.

-

If you need to know which version of lxml is installed, you can access the -lxml.etree.LXML_VERSION attribute to retrieve a version tuple. Note, -however, that it did not exist before version 1.0, so you will get an -AttributeError in older versions. The versions of libxml2 and libxslt are -available through the attributes LIBXML_VERSION and LIBXSLT_VERSION.

-

The following examples usually assume this to be executed first:

-
>>> from lxml import etree
-
-
-
-

Other Element APIs

-

While lxml.etree itself uses the ElementTree API, it is possible to replace -the Element implementation by custom element subclasses. This has been -used to implement well-known XML APIs on top of lxml. For example, lxml ships -with a data-binding implementation called objectify, which is similar to -the Amara bindery tool.

-

lxml.etree comes with a number of different lookup schemes to customize the -mapping between libxml2 nodes and the Element classes used by lxml.etree.

-
-
-

Trees and Documents

-

Compared to the original ElementTree API, lxml.etree has an extended tree -model. It knows about parents and siblings of elements:

-
>>> root = etree.Element("root")
->>> a = etree.SubElement(root, "a")
->>> b = etree.SubElement(root, "b")
->>> c = etree.SubElement(root, "c")
->>> d = etree.SubElement(root, "d")
->>> e = etree.SubElement(d,    "e")
->>> b.getparent() == root
-True
->>> print(b.getnext().tag)
-c
->>> print(c.getprevious().tag)
-b
-
-

Elements always live within a document context in lxml. This implies that -there is also a notion of an absolute document root. You can retrieve an -ElementTree for the root node of a document from any of its elements.

-
>>> tree = d.getroottree()
->>> print(tree.getroot().tag)
-root
-
-

Note that this is different from wrapping an Element in an ElementTree. You -can use ElementTrees to create XML trees with an explicit root node:

-
>>> tree = etree.ElementTree(d)
->>> print(tree.getroot().tag)
-d
->>> etree.tostring(tree)
-b'<d><e/></d>'
-
-

ElementTree objects are serialised as complete documents, including -preceding or trailing processing instructions and comments.

-

All operations that you run on such an ElementTree (like XPath, XSLT, etc.) -will understand the explicitly chosen root as root node of a document. They -will not see any elements outside the ElementTree. However, ElementTrees do -not modify their Elements:

-
>>> element = tree.getroot()
->>> print(element.tag)
-d
->>> print(element.getparent().tag)
-root
->>> print(element.getroottree().getroot().tag)
-root
-
-

The rule is that all operations that are applied to Elements use either the -Element itself as reference point, or the absolute root of the document that -contains this Element (e.g. for absolute XPath expressions). All operations -on an ElementTree use its explicit root node as reference.

-
-
-

Iteration

-

The ElementTree API makes Elements iterable to supports iteration over their -children. Using the tree defined above, we get:

-
>>> [ child.tag for child in root ]
-['a', 'b', 'c', 'd']
-
-

To iterate in the opposite direction, use the builtin reversed() function -that exists in Python 2.4 and later.

-

Tree traversal should use the element.iter() method:

-
>>> [ el.tag for el in root.iter() ]
-['root', 'a', 'b', 'c', 'd', 'e']
-
-

lxml.etree also supports this, but additionally features an extended API for -iteration over the children, following/preceding siblings, ancestors and -descendants of an element, as defined by the respective XPath axis:

-
>>> [ child.tag for child in root.iterchildren() ]
-['a', 'b', 'c', 'd']
->>> [ child.tag for child in root.iterchildren(reversed=True) ]
-['d', 'c', 'b', 'a']
->>> [ sibling.tag for sibling in b.itersiblings() ]
-['c', 'd']
->>> [ sibling.tag for sibling in c.itersiblings(preceding=True) ]
-['b', 'a']
->>> [ ancestor.tag for ancestor in e.iterancestors() ]
-['d', 'root']
->>> [ el.tag for el in root.iterdescendants() ]
-['a', 'b', 'c', 'd', 'e']
-
-

Note how element.iterdescendants() does not include the element -itself, as opposed to element.iter(). The latter effectively -implements the 'descendant-or-self' axis in XPath.

-

All of these iterators support one (or more, since lxml 3.0) additional -arguments that filter the generated elements by tag name:

-
>>> [ child.tag for child in root.iterchildren('a') ]
-['a']
->>> [ child.tag for child in d.iterchildren('a') ]
-[]
->>> [ el.tag for el in root.iterdescendants('d') ]
-['d']
->>> [ el.tag for el in root.iter('d') ]
-['d']
->>> [ el.tag for el in root.iter('d', 'a') ]
-['a', 'd']
-
-

Note that the order of the elements is determined by the iteration order, -which is the document order in most cases (except for preceding siblings -and ancestors, where it is the reversed document order). The order of -the tag selection arguments is irrelevant, as you can see in the last -example.

-

The most common way to traverse an XML tree is depth-first, which -traverses the tree in document order. This is implemented by the -.iter() method. While there is no dedicated method for -breadth-first traversal, it is almost as simple if you use the -collections.deque type that is available in Python 2.4 and later.

-
>>> root = etree.XML('<root><a><b/><c/></a><d><e/></d></root>')
->>> print(etree.tostring(root, pretty_print=True, encoding='unicode'))
-<root>
-  <a>
-    <b/>
-    <c/>
-  </a>
-  <d>
-    <e/>
-  </d>
-</root>
-
->>> queue = deque([root])
->>> while queue:
-...    el = queue.popleft()  # pop next element
-...    queue.extend(el)      # append its children
-...    print(el.tag)
-root
-a
-d
-b
-c
-e
-
-

See also the section on the utility functions iterparse() and -iterwalk() in the parser documentation.

-
-
-

Error handling on exceptions

-

Libxml2 provides error messages for failures, be it during parsing, XPath -evaluation or schema validation. The preferred way of accessing them is -through the local error_log property of the respective evaluator or -transformer object. See their documentation for details.

-

However, lxml also keeps a global error log of all errors that occurred at the -application level. Whenever an exception is raised, you can retrieve the -errors that occurred and "might have" lead to the problem from the error log -copy attached to the exception:

-
>>> etree.clear_error_log()
->>> broken_xml = '''
-... <root>
-...   <a>
-... </root>
-... '''
->>> try:
-...   etree.parse(StringIO(broken_xml))
-... except etree.XMLSyntaxError, e:
-...   pass # just put the exception into e
-
-

Once you have caught this exception, you can access its error_log property -to retrieve the log entries or filter them by a specific type, error domain or -error level:

-
>>> log = e.error_log.filter_from_level(etree.ErrorLevels.FATAL)
->>> print(log)
-<string>:4:8:FATAL:PARSER:ERR_TAG_NAME_MISMATCH: Opening and ending tag mismatch: a line 3 and root
-<string>:5:1:FATAL:PARSER:ERR_TAG_NOT_FINISHED: Premature end of data in tag root line 2
-
-

This might look a little cryptic at first, but it is the information that -libxml2 gives you. At least the message at the end should give you a hint -what went wrong and you can see that the fatal errors (FATAL) happened during -parsing (PARSER) lines 4, column 8 and line 5, column 1 of a string (<string>, -or the filename if available). Here, PARSER is the so-called error domain, -see lxml.etree.ErrorDomains for that. You can get it from a log entry -like this:

-
>>> entry = log[0]
->>> print(entry.domain_name)
-PARSER
->>> print(entry.type_name)
-ERR_TAG_NAME_MISMATCH
->>> print(entry.filename)
-<string>
-
-

There is also a convenience attribute last_error that returns the last -error or fatal error that occurred:

-
>>> entry = e.error_log.last_error
->>> print(entry.domain_name)
-PARSER
->>> print(entry.type_name)
-ERR_TAG_NOT_FINISHED
->>> print(entry.filename)
-<string>
-
-
-
-

Error logging

-

lxml.etree supports logging libxml2 messages to the Python stdlib logging -module. This is done through the etree.PyErrorLog class. It disables the -error reporting from exceptions and forwards log messages to a Python logger. -To use it, see the descriptions of the function etree.useGlobalPythonLog -and the class etree.PyErrorLog for help. Note that this does not affect -the local error logs of XSLT, XMLSchema, etc.

-
-
-

Serialisation

-

lxml.etree has direct support for pretty printing XML output. Functions like -ElementTree.write() and tostring() support it through a keyword -argument:

-
>>> root = etree.XML("<root><test/></root>")
->>> etree.tostring(root)
-b'<root><test/></root>'
-
->>> print(etree.tostring(root, pretty_print=True))
-<root>
-  <test/>
-</root>
-
-

Note the newline that is appended at the end when pretty printing the -output. It was added in lxml 2.0.

-

By default, lxml (just as ElementTree) outputs the XML declaration only if it -is required by the standard:

-
>>> unicode_root = etree.Element( u"t\u3120st" )
->>> unicode_root.text = u"t\u0A0Ast"
->>> etree.tostring(unicode_root, encoding="utf-8")
-b'<t\xe3\x84\xa0st>t\xe0\xa8\x8ast</t\xe3\x84\xa0st>'
-
->>> print(etree.tostring(unicode_root, encoding="iso-8859-1"))
-<?xml version='1.0' encoding='iso-8859-1'?>
-<t&#12576;st>t&#2570;st</t&#12576;st>
-
-

Also see the general remarks on Unicode support.

-

You can enable or disable the declaration explicitly by passing another -keyword argument for the serialisation:

-
>>> print(etree.tostring(root, xml_declaration=True))
-<?xml version='1.0' encoding='ASCII'?>
-<root><test/></root>
-
->>> unicode_root.clear()
->>> etree.tostring(unicode_root, encoding="UTF-16LE",
-...                              xml_declaration=False)
-b'<\x00t\x00 1s\x00t\x00/\x00>\x00'
-
-

Note that a standard compliant XML parser will not consider the last line -well-formed XML if the encoding is not explicitly provided somehow, e.g. in an -underlying transport protocol:

-
>>> notxml = etree.tostring(unicode_root, encoding="UTF-16LE",
-...                                       xml_declaration=False)
->>> root = etree.XML(notxml)        #doctest: +ELLIPSIS
-Traceback (most recent call last):
-  ...
-lxml.etree.XMLSyntaxError: ...
-
-

Since version 2.3, the serialisation can override the internal subset -of the document with a user provided DOCTYPE:

-
>>> xml = '<!DOCTYPE root>\n<root/>'
->>> tree = etree.parse(StringIO(xml))
-
->>> print(etree.tostring(tree))
-<!DOCTYPE root>
-<root/>
-
->>> print(etree.tostring(tree,
-...     doctype='<!DOCTYPE root SYSTEM "/tmp/test.dtd">'))
-<!DOCTYPE root SYSTEM "/tmp/test.dtd">
-<root/>
-
-

The content will be encoded, but otherwise copied verbatim into the -output stream. It is therefore left to the user to take care for a -correct doctype format, including the name of the root node.

-
-
-

Incremental XML generation

-

Since version 3.1, lxml provides an xmlfile API for incrementally -generating XML using the with statement. It's main purpose is to -freely and safely mix surrounding elements with pre-built in-memory -trees, e.g. to write out large documents that consist mostly of -repetitive subtrees (like database dumps). But it can be useful in -many cases where memory consumption matters or where XML is naturally -generated in sequential steps. Since lxml 3.4.1, there is an equivalent -context manager for HTML serialisation called htmlfile.

-

The API can serialise to real files (given as file path or file -object), as well as file-like objects, e.g. io.BytesIO(). -Here is a simple example:

-
->>> f = BytesIO()
->>> with etree.xmlfile(f) as xf:
-...     with xf.element('abc'):
-...         xf.write('text')
-
->>> print(f.getvalue().decode('utf-8'))
-<abc>text</abc>
-
-

xmlfile() accepts a file path as first argument, or a file(-like) -object, as in the example above. In the first case, it takes care to -open and close the file itself, whereas file(-like) objects are not -closed by default. This is left to the code that opened them. Since -lxml 3.4, however, you can pass the argument close=True to make -lxml call the object's .close() method when exiting the xmlfile -context manager.

-

To insert pre-constructed Elements and subtrees, just pass them -into write():

-
->>> f = BytesIO()
->>> with etree.xmlfile(f) as xf:
-...     with xf.element('abc'):
-...         with xf.element('in'):
-...
-...             for value in '123':
-...                 # construct a really complex XML tree
-...                 el = etree.Element('xyz', attr=value)
-...
-...                 xf.write(el)
-...
-...                 # no longer needed, discard it right away!
-...                 el = None
-
->>> print(f.getvalue().decode('utf-8'))
-<abc><in><xyz attr="1"/><xyz attr="2"/><xyz attr="3"/></in></abc>
-
-

It is a common pattern to have one or more nested element() -blocks, and then build in-memory XML subtrees in a loop (using the -ElementTree API, the builder API, XSLT, or whatever) and write them -out into the XML file one after the other. That way, they can be -removed from memory right after their construction, which can largely -reduce the memory footprint of an application, while keeping the -overall XML generation easy, safe and correct.

-

Together with Python coroutines, this can be used to generate XML -in an asynchronous, non-blocking fashion, e.g. for a stream protocol -like the instant messaging protocol -XMPP:

-
-def writer(out_stream):
-    with xmlfile(out_stream) as xf:
-        with xf.element('{http://etherx.jabber.org/streams}stream'):
-            while True:
-                el = (yield)
-                xf.write(el)
-                xf.flush()
-
-w = writer(stream)
-next(w)   # start writing (run up to 'yield')
-
-

Then, whenever XML elements are available for writing, call

-
-w.send(element)
-
-

And when done:

-
-w.close()
-
-

Note the additional xf.flush() call in the example above, which is -available since lxml 3.4. Normally, the output stream is buffered to -avoid excessive I/O calls. Whenever the internal buffer fills up, its -content is written out. In the case above, however, we want to make -sure that each message that we write (i.e. each element subtree) is -written out immediately, so we flush the content explicitly at the -right point.

-

Alternatively, if buffering is not desired at all, it can be disabled -by passing the flag buffered=False into xmlfile() (also since -lxml 3.4).

-

Here is a similar example using an async coroutine in Py3.5 or later, which is -supported since lxml 4.0. The output stream is expected to have methods -async def write(self, data) and async def close(self) in this case.

-
-async def writer(out_stream, xml_messages):
-    async with xmlfile(out_stream) as xf:
-        async with xf.element('{http://etherx.jabber.org/streams}stream'):
-             async for el in xml_messages:
-                  await xf.write(el)
-                  await xf.flush()
-
-
-class DummyAsyncOut(object):
-    async def write(self, data):
-        print(data.decode('utf8'))
-
-    async def close(self):
-         pass
-
-stream = DummyAsyncOut()
-async_writer = writer(stream, async_message_stream)
-
-
-
-

CDATA

-

By default, lxml's parser will strip CDATA sections from the tree and -replace them by their plain text content. As real applications for -CDATA are rare, this is the best way to deal with this issue.

-

However, in some cases, keeping CDATA sections or creating them in a -document is required to adhere to existing XML language definitions. -For these special cases, you can instruct the parser to leave CDATA -sections in the document:

-
>>> parser = etree.XMLParser(strip_cdata=False)
->>> root = etree.XML('<root><![CDATA[test]]></root>', parser)
->>> root.text
-'test'
-
->>> etree.tostring(root)
-b'<root><![CDATA[test]]></root>'
-
-

Note how the .text property does not give any indication that the -text content is wrapped by a CDATA section. If you want to make sure -your data is wrapped by a CDATA block, you can use the CDATA() -text wrapper:

-
>>> root.text = 'test'
-
->>> root.text
-'test'
->>> etree.tostring(root)
-b'<root>test</root>'
-
->>> root.text = etree.CDATA(root.text)
-
->>> root.text
-'test'
->>> etree.tostring(root)
-b'<root><![CDATA[test]]></root>'
-
-
-
-

XInclude and ElementInclude

-

You can let lxml process xinclude statements in a document by calling the -xinclude() method on a tree:

-
>>> data = StringIO('''\
-... <doc xmlns:xi="http://www.w3.org/2001/XInclude">
-... <foo/>
-... <xi:include href="doc/test.xml" />
-... </doc>''')
-
->>> tree = etree.parse(data)
->>> tree.xinclude()
->>> print(etree.tostring(tree.getroot()))
-<doc xmlns:xi="http://www.w3.org/2001/XInclude">
-<foo/>
-<a xml:base="doc/test.xml"/>
-</doc>
-
-

Note that the ElementTree compatible ElementInclude module is also supported -as lxml.ElementInclude. It has the additional advantage of supporting -custom URL resolvers at the Python level. The normal XInclude mechanism -cannot deploy these. If you need ElementTree compatibility or custom -resolvers, you have to stick to the external Python module.

-
-
-

write_c14n on ElementTree

-

The lxml.etree.ElementTree class has a method write_c14n, which takes a file -object as argument. This file object will receive an UTF-8 representation of -the canonicalized form of the XML, following the W3C C14N recommendation. For -example:

-
>>> f = StringIO('<a><b/></a>')
->>> tree = etree.parse(f)
->>> f2 = StringIO()
->>> tree.write_c14n(f2)
->>> print(f2.getvalue().decode("utf-8"))
-<a><b></b></a>
-
-
-
- - - \ No newline at end of file diff --git a/doc/html/api/abc.ABCMeta-class.html b/doc/html/api/abc.ABCMeta-class.html deleted file mode 100644 index 5fdc851..0000000 --- a/doc/html/api/abc.ABCMeta-class.html +++ /dev/null @@ -1,449 +0,0 @@ - - - - - abc.ABCMeta - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - abc :: - ABCMeta :: - Class ABCMeta - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Type ABCMeta

-
-object --+    
-         |    
-      type --+
-             |
-            ABCMeta
-
- -
-

Metaclass for defining Abstract Base Classes (ABCs).

-

Use this metaclass to create an ABC. An ABC can be subclassed -directly, and then acts as a mix-in class. You can also register -unrelated concrete classes (even built-in classes) and unrelated -ABCs as 'virtual subclasses' -- these and their descendants will -be considered subclasses of the registering ABC by the built-in -issubclass() function, but the registering ABC won't show up in -their MRO (Method Resolution Order) nor will method -implementations defined by the registering ABC be callable (not -even via super()).

- - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- bool - - - - - - -
__instancecheck__(cls, - instance)
- Override for isinstance(instance, cls).
- - -
- -
- bool - - - - - - -
__subclasscheck__(cls, - subclass)
- Override for issubclass(subclass, cls).
- - -
- -
-   - - - - - - -
_dump_registry(cls, - file=None)
- Debug helper to print the ABC registry.
- - -
- -
-   - - - - - - -
register(cls, - subclass)
- Register a virtual subclass of an ABC.
- - -
- -
-

Inherited from type: - __call__, - __delattr__, - __eq__, - __ge__, - __getattribute__, - __gt__, - __hash__, - __init__, - __le__, - __lt__, - __ne__, - __repr__, - __setattr__, - __subclasses__, - mro -

-

Inherited from object: - __format__, - __reduce__, - __reduce_ex__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Static Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(mcls, - name, - bases, - namespace) - - -
- -
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - _abc_invalidation_counter = 21 -
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from type: - __abstractmethods__, - __base__, - __bases__, - __basicsize__, - __dictoffset__, - __flags__, - __itemsize__, - __mro__, - __name__, - __weakrefoffset__ -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__instancecheck__(cls, - instance) -

-
  -
- - Override for isinstance(instance, cls). -
-
Returns: bool
-
Overrides: - type.__instancecheck__ -
-
-
-
- -
- -
- - -
-

__new__(mcls, - name, - bases, - namespace) -
Static Method -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

__subclasscheck__(cls, - subclass) -

-
  -
- - Override for issubclass(subclass, cls). -
-
Returns: bool
-
Overrides: - type.__subclasscheck__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/api-objects.txt b/doc/html/api/api-objects.txt deleted file mode 100644 index 9ff67a5..0000000 --- a/doc/html/api/api-objects.txt +++ /dev/null @@ -1,7683 +0,0 @@ -lxml.ElementInclude lxml.ElementInclude-module.html -lxml.ElementInclude.XINCLUDE_INCLUDE lxml.ElementInclude-module.html#XINCLUDE_INCLUDE -lxml.ElementInclude.XINCLUDE_FALLBACK lxml.ElementInclude-module.html#XINCLUDE_FALLBACK -lxml.ElementInclude._include lxml.ElementInclude-module.html#_include -lxml.ElementInclude.__package__ lxml.ElementInclude-module.html#__package__ -lxml.ElementInclude._lxml_default_loader lxml.ElementInclude-module.html#_lxml_default_loader -lxml.ElementInclude.include lxml.ElementInclude-module.html#include -lxml.ElementInclude.XINCLUDE lxml.ElementInclude-module.html#XINCLUDE -lxml.ElementInclude.XINCLUDE_ITER_TAG lxml.ElementInclude-module.html#XINCLUDE_ITER_TAG -lxml.ElementInclude._wrap_et_loader lxml.ElementInclude-module.html#_wrap_et_loader -lxml.ElementInclude.default_loader lxml.ElementInclude-module.html#default_loader -lxml lxml-module.html -lxml.get_include lxml-module.html#get_include -lxml.__package__ lxml-module.html#__package__ -lxml.builder lxml.builder-module.html -lxml.builder.E lxml.builder-module.html#E -lxml.builder.__reduce_cython__ lxml.builder-module.html#__reduce_cython__ -lxml.builder.__pyx_unpickle_ElementMaker lxml.builder-module.html#__pyx_unpickle_ElementMaker -lxml.builder.__package__ lxml.builder-module.html#__package__ -lxml.builder.__pyx_capi__ lxml.builder-module.html#__pyx_capi__ -lxml.builder.__test__ lxml.builder-module.html#__test__ -lxml.builder.__setstate_cython__ lxml.builder-module.html#__setstate_cython__ -lxml.cssselect lxml.cssselect-module.html -lxml.cssselect.ns lxml.cssselect-module.html#ns -lxml.cssselect._make_lower_case lxml.cssselect-module.html#_make_lower_case -lxml.cssselect.__package__ lxml.cssselect-module.html#__package__ -lxml.doctestcompare lxml.doctestcompare-module.html -lxml.doctestcompare._norm_whitespace_re lxml.doctestcompare-module.html#_norm_whitespace_re -lxml.doctestcompare.norm_whitespace lxml.doctestcompare-module.html#norm_whitespace -lxml.doctestcompare.PARSE_XML lxml.doctestcompare-module.html#PARSE_XML -lxml.doctestcompare._IS_PYTHON_3 lxml.doctestcompare-module.html#_IS_PYTHON_3 -lxml.doctestcompare._find_doctest_frame lxml.doctestcompare-module.html#_find_doctest_frame -lxml.doctestcompare.strip lxml.doctestcompare-module.html#strip -lxml.doctestcompare._repr_re lxml.doctestcompare-module.html#_repr_re -lxml.doctestcompare._html_parser lxml.doctestcompare-module.html#_html_parser -lxml.doctestcompare.NOPARSE_MARKUP lxml.doctestcompare-module.html#NOPARSE_MARKUP -lxml.doctestcompare.__package__ lxml.doctestcompare-module.html#__package__ -lxml.doctestcompare.html_fromstring lxml.doctestcompare-module.html#html_fromstring -lxml.doctestcompare.temp_install lxml.doctestcompare-module.html#temp_install -lxml.doctestcompare.__test__ lxml.doctestcompare-module.html#__test__ -lxml.doctestcompare.install lxml.doctestcompare-module.html#install -lxml.doctestcompare.PARSE_HTML lxml.doctestcompare-module.html#PARSE_HTML -lxml.etree lxml.etree-module.html -lxml.etree.XPathEvaluator lxml.etree-module.html#XPathEvaluator -lxml.etree.XMLID lxml.etree-module.html#XMLID -lxml.etree.LIBXSLT_VERSION lxml.etree-module.html#LIBXSLT_VERSION -lxml.etree.XMLDTDID lxml.etree-module.html#XMLDTDID -lxml.etree.ElementTree lxml.etree-module.html#ElementTree -lxml.etree.cleanup_namespaces lxml.etree-module.html#cleanup_namespaces -lxml.etree.set_default_parser lxml.etree-module.html#set_default_parser -lxml.etree.parseid lxml.etree-module.html#parseid -lxml.etree.tostring lxml.etree-module.html#tostring -lxml.etree.iselement lxml.etree-module.html#iselement -lxml.etree.adopt_external_document lxml.etree-module.html#adopt_external_document -lxml.etree.FunctionNamespace lxml.etree-module.html#FunctionNamespace -lxml.etree.strip_attributes lxml.etree-module.html#strip_attributes -lxml.etree.Entity lxml.etree-module.html#Entity -lxml.etree.__package__ lxml.etree-module.html#__package__ -lxml.etree.dump lxml.etree-module.html#dump -lxml.etree.strip_elements lxml.etree-module.html#strip_elements -lxml.etree.HTML lxml.etree-module.html#HTML -lxml.etree.memory_debugger lxml.etree-module.html#memory_debugger -lxml.etree.PI lxml.etree-module.html#PI -lxml.etree.Extension lxml.etree-module.html#Extension -lxml.etree.DEBUG lxml.etree-module.html#DEBUG -lxml.etree.Comment lxml.etree-module.html#Comment -lxml.etree.ProcessingInstruction lxml.etree-module.html#ProcessingInstruction -lxml.etree.LXML_VERSION lxml.etree-module.html#LXML_VERSION -lxml.etree.LIBXML_COMPILED_VERSION lxml.etree-module.html#LIBXML_COMPILED_VERSION -lxml.etree.strip_tags lxml.etree-module.html#strip_tags -lxml.etree.tounicode lxml.etree-module.html#tounicode -lxml.etree.LIBXSLT_COMPILED_VERSION lxml.etree-module.html#LIBXSLT_COMPILED_VERSION -lxml.etree.__pyx_capi__ lxml.etree-module.html#__pyx_capi__ -lxml.etree.XML lxml.etree-module.html#XML -lxml.etree.__test__ lxml.etree-module.html#__test__ -lxml.etree.use_global_python_log lxml.etree-module.html#use_global_python_log -lxml.etree.LIBXML_VERSION lxml.etree-module.html#LIBXML_VERSION -lxml.etree.tostringlist lxml.etree-module.html#tostringlist -lxml.etree.SubElement lxml.etree-module.html#SubElement -lxml.etree.get_default_parser lxml.etree-module.html#get_default_parser -lxml.etree.register_namespace lxml.etree-module.html#register_namespace -lxml.etree.parse lxml.etree-module.html#parse -lxml.etree.set_element_class_lookup lxml.etree-module.html#set_element_class_lookup -lxml.etree.clear_error_log lxml.etree-module.html#clear_error_log -lxml.etree.fromstringlist lxml.etree-module.html#fromstringlist -lxml.etree.Element lxml.etree-module.html#Element -lxml.etree.fromstring lxml.etree-module.html#fromstring -lxml.html.ElementSoup lxml.html.ElementSoup-module.html -lxml.html.ElementSoup.parse lxml.html.ElementSoup-module.html#parse -lxml.html.ElementSoup._parse lxml.html.soupparser-module.html#parse -lxml.html.ElementSoup.convert_tree lxml.html.ElementSoup-module.html#convert_tree -lxml.html.ElementSoup.__doc__ lxml.html.ElementSoup-module.html#__doc__ -lxml.html.ElementSoup.__package__ lxml.html.ElementSoup-module.html#__package__ -lxml.html lxml.html-module.html -lxml.html._rel_links_xpath lxml.html-module.html#_rel_links_xpath -lxml.html._looks_like_full_html_unicode lxml.html-module.html#_looks_like_full_html_unicode -lxml.html._unquote_match lxml.html-module.html#_unquote_match -lxml.html.parse lxml.html-module.html#parse -lxml.html._nons lxml.html-module.html#_nons -lxml.html._iter_css_imports lxml.html-module.html#_iter_css_imports -lxml.html._forms_xpath lxml.html-module.html#_forms_xpath -lxml.html._contains_block_level_tag lxml.html-module.html#_contains_block_level_tag -lxml.html._element_name lxml.html-module.html#_element_name -lxml.html._archive_re lxml.html-module.html#_archive_re -lxml.html.iterlinks lxml.html-module.html#iterlinks -lxml.html.__package__ lxml.html-module.html#__package__ -lxml.html._collect_string_content lxml.html-module.html#_collect_string_content -lxml.html.submit_form lxml.html-module.html#submit_form -lxml.html.xhtml_parser lxml.html-module.html#xhtml_parser -lxml.html.XHTML_NAMESPACE lxml.html-module.html#XHTML_NAMESPACE -lxml.html._id_xpath lxml.html-module.html#_id_xpath -lxml.html.make_links_absolute lxml.html-module.html#make_links_absolute -lxml.html.resolve_base_href lxml.html-module.html#resolve_base_href -lxml.html.__bytes_replace_meta_content_type lxml.html-module.html#__bytes_replace_meta_content_type -lxml.html.rewrite_links lxml.html-module.html#rewrite_links -lxml.html.fragment_fromstring lxml.html-module.html#fragment_fromstring -lxml.html.html_to_xhtml lxml.html-module.html#html_to_xhtml -lxml.html.fragments_fromstring lxml.html-module.html#fragments_fromstring -lxml.html._looks_like_full_html_bytes lxml.html-module.html#_looks_like_full_html_bytes -lxml.html.__str_replace_meta_content_type lxml.html-module.html#__str_replace_meta_content_type -lxml.html._options_xpath lxml.html-module.html#_options_xpath -lxml.html.document_fromstring lxml.html-module.html#document_fromstring -lxml.html.Element lxml.html-module.html#Element -lxml.html.__fix_docstring lxml.html-module.html#__fix_docstring -lxml.html._class_xpath lxml.html-module.html#_class_xpath -lxml.html.tostring lxml.html-module.html#tostring -lxml.html.find_class lxml.html-module.html#find_class -lxml.html.html_parser lxml.html-module.html#html_parser -lxml.html.open_in_browser lxml.html-module.html#open_in_browser -lxml.html._parse_meta_refresh_url lxml.html-module.html#_parse_meta_refresh_url -lxml.html.fromstring lxml.html-module.html#fromstring -lxml.html._label_xpath lxml.html-module.html#_label_xpath -lxml.html._iter_css_urls lxml.html-module.html#_iter_css_urls -lxml.html._transform_result lxml.html-module.html#_transform_result -lxml.html.find_rel_links lxml.html-module.html#find_rel_links -lxml.html.open_http_urllib lxml.html-module.html#open_http_urllib -lxml.html.xhtml_to_html lxml.html-module.html#xhtml_to_html -lxml.html.builder lxml.html.builder-module.html -lxml.html.builder.BLOCKQUOTE lxml.html.builder-module.html#BLOCKQUOTE -lxml.html.builder.OBJECT lxml.html.builder-module.html#OBJECT -lxml.html.builder.LINK lxml.html.builder-module.html#LINK -lxml.html.builder.BR lxml.html.builder-module.html#BR -lxml.html.builder.OPTGROUP lxml.html.builder-module.html#OPTGROUP -lxml.html.builder.__package__ lxml.html.builder-module.html#__package__ -lxml.html.builder.SUB lxml.html.builder-module.html#SUB -lxml.html.builder.PRE lxml.html.builder-module.html#PRE -lxml.html.builder.FRAME lxml.html.builder-module.html#FRAME -lxml.html.builder.BODY lxml.html.builder-module.html#BODY -lxml.html.builder.TH lxml.html.builder-module.html#TH -lxml.html.builder.P lxml.html.builder-module.html#P -lxml.html.builder.BASE lxml.html.builder-module.html#BASE -lxml.html.builder.TFOOT lxml.html.builder-module.html#TFOOT -lxml.html.builder.VAR lxml.html.builder-module.html#VAR -lxml.html.builder.MAP lxml.html.builder-module.html#MAP -lxml.html.builder.OL lxml.html.builder-module.html#OL -lxml.html.builder.TEXTAREA lxml.html.builder-module.html#TEXTAREA -lxml.html.builder.ACRONYM lxml.html.builder-module.html#ACRONYM -lxml.html.builder.MENU lxml.html.builder-module.html#MENU -lxml.html.builder.DT lxml.html.builder-module.html#DT -lxml.html.builder.ADDRESS lxml.html.builder-module.html#ADDRESS -lxml.html.builder.CODE lxml.html.builder-module.html#CODE -lxml.html.builder.HR lxml.html.builder-module.html#HR -lxml.html.builder.ISINDEX lxml.html.builder-module.html#ISINDEX -lxml.html.builder.HEAD lxml.html.builder-module.html#HEAD -lxml.html.builder.LABEL lxml.html.builder-module.html#LABEL -lxml.html.builder.META lxml.html.builder-module.html#META -lxml.html.builder.DEL lxml.html.builder-module.html#DEL -lxml.html.builder.FONT lxml.html.builder-module.html#FONT -lxml.html.builder.SELECT lxml.html.builder-module.html#SELECT -lxml.html.builder.NOFRAMES lxml.html.builder-module.html#NOFRAMES -lxml.html.builder.CENTER lxml.html.builder-module.html#CENTER -lxml.html.builder.KBD lxml.html.builder-module.html#KBD -lxml.html.builder.HTML lxml.html.builder-module.html#HTML -lxml.html.builder.EM lxml.html.builder-module.html#EM -lxml.html.builder.FRAMESET lxml.html.builder-module.html#FRAMESET -lxml.html.builder.FIELDSET lxml.html.builder-module.html#FIELDSET -lxml.html.builder.FOR lxml.html.builder-module.html#FOR -lxml.html.builder.BASEFONT lxml.html.builder-module.html#BASEFONT -lxml.html.builder.BDO lxml.html.builder-module.html#BDO -lxml.html.builder.PARAM lxml.html.builder-module.html#PARAM -lxml.html.builder.S lxml.html.builder-module.html#S -lxml.html.builder.INPUT lxml.html.builder-module.html#INPUT -lxml.html.builder.H2 lxml.html.builder-module.html#H2 -lxml.html.builder.H3 lxml.html.builder-module.html#H3 -lxml.html.builder.BUTTON lxml.html.builder-module.html#BUTTON -lxml.html.builder.SCRIPT lxml.html.builder-module.html#SCRIPT -lxml.html.builder.H6 lxml.html.builder-module.html#H6 -lxml.html.builder.H4 lxml.html.builder-module.html#H4 -lxml.html.builder.INS lxml.html.builder-module.html#INS -lxml.html.builder.UL lxml.html.builder-module.html#UL -lxml.html.builder.STRIKE lxml.html.builder-module.html#STRIKE -lxml.html.builder.OPTION lxml.html.builder-module.html#OPTION -lxml.html.builder.TITLE lxml.html.builder-module.html#TITLE -lxml.html.builder.SUP lxml.html.builder-module.html#SUP -lxml.html.builder.SMALL lxml.html.builder-module.html#SMALL -lxml.html.builder.STRONG lxml.html.builder-module.html#STRONG -lxml.html.builder.COL lxml.html.builder-module.html#COL -lxml.html.builder.AREA lxml.html.builder-module.html#AREA -lxml.html.builder.APPLET lxml.html.builder-module.html#APPLET -lxml.html.builder.TABLE lxml.html.builder-module.html#TABLE -lxml.html.builder.B lxml.html.builder-module.html#B -lxml.html.builder.IMG lxml.html.builder-module.html#IMG -lxml.html.builder.DFN lxml.html.builder-module.html#DFN -lxml.html.builder.SPAN lxml.html.builder-module.html#SPAN -lxml.html.builder.DL lxml.html.builder-module.html#DL -lxml.html.builder.H1 lxml.html.builder-module.html#H1 -lxml.html.builder.DD lxml.html.builder-module.html#DD -lxml.html.builder.TBODY lxml.html.builder-module.html#TBODY -lxml.html.builder.DIV lxml.html.builder-module.html#DIV -lxml.html.builder.H5 lxml.html.builder-module.html#H5 -lxml.html.builder.LEGEND lxml.html.builder-module.html#LEGEND -lxml.html.builder.DIR lxml.html.builder-module.html#DIR -lxml.html.builder.NOSCRIPT lxml.html.builder-module.html#NOSCRIPT -lxml.html.builder.COLGROUP lxml.html.builder-module.html#COLGROUP -lxml.html.builder.BIG lxml.html.builder-module.html#BIG -lxml.html.builder.TT lxml.html.builder-module.html#TT -lxml.html.builder.TR lxml.html.builder-module.html#TR -lxml.html.builder.LI lxml.html.builder-module.html#LI -lxml.html.builder.IFRAME lxml.html.builder-module.html#IFRAME -lxml.html.builder.TD lxml.html.builder-module.html#TD -lxml.html.builder.CLASS lxml.html.builder-module.html#CLASS -lxml.html.builder.A lxml.html.builder-module.html#A -lxml.html.builder.STYLE lxml.html.builder-module.html#STYLE -lxml.html.builder.E lxml.html.builder-module.html#E -lxml.html.builder.FORM lxml.html.builder-module.html#FORM -lxml.html.builder.I lxml.html.builder-module.html#I -lxml.html.builder.Q lxml.html.builder-module.html#Q -lxml.html.builder.CAPTION lxml.html.builder-module.html#CAPTION -lxml.html.builder.U lxml.html.builder-module.html#U -lxml.html.builder.ABBR lxml.html.builder-module.html#ABBR -lxml.html.builder.THEAD lxml.html.builder-module.html#THEAD -lxml.html.builder.SAMP lxml.html.builder-module.html#SAMP -lxml.html.builder.CITE lxml.html.builder-module.html#CITE -lxml.html.clean lxml.html.clean-module.html -lxml.html.clean._css_import_re lxml.html.clean-module.html#_css_import_re -lxml.html.clean.word_break_html lxml.html.clean-module.html#word_break_html -lxml.html.clean._link_regexes lxml.html.clean-module.html#_link_regexes -lxml.html.clean._substitute_whitespace lxml.html.clean-module.html#_substitute_whitespace -lxml.html.clean._find_styled_elements lxml.html.clean-module.html#_find_styled_elements -lxml.html.clean.unichr lxml.html.clean-module.html#unichr -lxml.html.clean._break_text lxml.html.clean-module.html#_break_text -lxml.html.clean.basestring lxml.html.clean-module.html#basestring -lxml.html.clean._avoid_classes lxml.html.clean-module.html#_avoid_classes -lxml.html.clean.__package__ lxml.html.clean-module.html#__package__ -lxml.html.clean._avoid_elements lxml.html.clean-module.html#_avoid_elements -lxml.html.clean._find_external_links lxml.html.clean-module.html#_find_external_links -lxml.html.clean._is_javascript_scheme lxml.html.clean-module.html#_is_javascript_scheme -lxml.html.clean.autolink lxml.html.clean-module.html#autolink -lxml.html.clean._conditional_comment_re lxml.html.clean-module.html#_conditional_comment_re -lxml.html.clean._is_possibly_malicious_scheme lxml.html.clean-module.html#_is_possibly_malicious_scheme -lxml.html.clean._link_text lxml.html.clean-module.html#_link_text -lxml.html.clean._avoid_hosts lxml.html.clean-module.html#_avoid_hosts -lxml.html.clean.autolink_html lxml.html.clean-module.html#autolink_html -lxml.html.clean.__test__ lxml.html.clean-module.html#__test__ -lxml.html.clean.clean_html lxml.html.clean-module.html#clean_html -lxml.html.clean._is_image_dataurl lxml.html.clean-module.html#_is_image_dataurl -lxml.html.clean._avoid_word_break_classes lxml.html.clean-module.html#_avoid_word_break_classes -lxml.html.clean._css_javascript_re lxml.html.clean-module.html#_css_javascript_re -lxml.html.clean.word_break lxml.html.clean-module.html#word_break -lxml.html.clean._insert_break lxml.html.clean-module.html#_insert_break -lxml.html.clean._break_prefer_re lxml.html.clean-module.html#_break_prefer_re -lxml.html.clean.clean lxml.html.clean-module.html#clean -lxml.html.clean._avoid_word_break_elements lxml.html.clean-module.html#_avoid_word_break_elements -lxml.html.defs lxml.html.defs-module.html -lxml.html.defs.block_tags lxml.html.defs-module.html#block_tags -lxml.html.defs.link_attrs lxml.html.defs-module.html#link_attrs -lxml.html.defs.tags lxml.html.defs-module.html#tags -lxml.html.defs.font_style_tags lxml.html.defs-module.html#font_style_tags -lxml.html.defs.event_attrs lxml.html.defs-module.html#event_attrs -lxml.html.defs.safe_attrs lxml.html.defs-module.html#safe_attrs -lxml.html.defs.table_tags lxml.html.defs-module.html#table_tags -lxml.html.defs.__package__ lxml.html.defs-module.html#__package__ -lxml.html.defs.top_level_tags lxml.html.defs-module.html#top_level_tags -lxml.html.defs.html5_tags lxml.html.defs-module.html#html5_tags -lxml.html.defs.form_tags lxml.html.defs-module.html#form_tags -lxml.html.defs.phrase_tags lxml.html.defs-module.html#phrase_tags -lxml.html.defs.deprecated_tags lxml.html.defs-module.html#deprecated_tags -lxml.html.defs.head_tags lxml.html.defs-module.html#head_tags -lxml.html.defs.list_tags lxml.html.defs-module.html#list_tags -lxml.html.defs.special_inline_tags lxml.html.defs-module.html#special_inline_tags -lxml.html.defs.empty_tags lxml.html.defs-module.html#empty_tags -lxml.html.defs.general_block_tags lxml.html.defs-module.html#general_block_tags -lxml.html.defs.frame_tags lxml.html.defs-module.html#frame_tags -lxml.html.defs.nonstandard_tags lxml.html.defs-module.html#nonstandard_tags -lxml.html.diff lxml.html.diff-module.html -lxml.html.diff._move_el_inside_block lxml.html.diff-module.html#_move_el_inside_block -lxml.html.diff.compress_merge_back lxml.html.diff-module.html#compress_merge_back -lxml.html.diff.serialize_html_fragment lxml.html.diff-module.html#serialize_html_fragment -lxml.html.diff.split_delete lxml.html.diff-module.html#split_delete -lxml.html.diff.split_unbalanced lxml.html.diff-module.html#split_unbalanced -lxml.html.diff.tokenize_annotated lxml.html.diff-module.html#tokenize_annotated -lxml.html.diff.is_word lxml.html.diff-module.html#is_word -lxml.html.diff._contains_block_level_tag lxml.html.diff-module.html#_contains_block_level_tag -lxml.html.diff.empty_tags lxml.html.diff-module.html#empty_tags -lxml.html.diff.is_start_tag lxml.html.diff-module.html#is_start_tag -lxml.html.diff.end_tag lxml.html.diff-module.html#end_tag -lxml.html.diff.fixup_chunks lxml.html.diff-module.html#fixup_chunks -lxml.html.diff.html_annotate lxml.html.diff-module.html#html_annotate -lxml.html.diff.cleanup_delete lxml.html.diff-module.html#cleanup_delete -lxml.html.diff.htmldiff lxml.html.diff-module.html#htmldiff -lxml.html.diff._fixup_ins_del_tags lxml.html.diff-module.html#_fixup_ins_del_tags -lxml.html.diff.htmldiff_tokens lxml.html.diff-module.html#htmldiff_tokens -lxml.html.diff.expand_tokens lxml.html.diff-module.html#expand_tokens -lxml.html.diff.__package__ lxml.html.diff-module.html#__package__ -lxml.html.diff.block_level_tags lxml.html.diff-module.html#block_level_tags -lxml.html.diff.compress_tokens lxml.html.diff-module.html#compress_tokens -lxml.html.diff.html_annotate_merge_annotations lxml.html.diff-module.html#html_annotate_merge_annotations -lxml.html.diff._merge_element_contents lxml.html.diff-module.html#_merge_element_contents -lxml.html.diff.split_words lxml.html.diff-module.html#split_words -lxml.html.diff.block_level_container_tags lxml.html.diff-module.html#block_level_container_tags -lxml.html.diff.flatten_el lxml.html.diff-module.html#flatten_el -lxml.html.diff.markup_serialize_tokens lxml.html.diff-module.html#markup_serialize_tokens -lxml.html.diff._body_re lxml.html.diff-module.html#_body_re -lxml.html.diff.locate_unbalanced_start lxml.html.diff-module.html#locate_unbalanced_start -lxml.html.diff.fixup_ins_del_tags lxml.html.diff-module.html#fixup_ins_del_tags -lxml.html.diff.default_markup lxml.html.diff-module.html#default_markup -lxml.html.diff.tokenize lxml.html.diff-module.html#tokenize -lxml.html.diff.__test__ lxml.html.diff-module.html#__test__ -lxml.html.diff.cleanup_html lxml.html.diff-module.html#cleanup_html -lxml.html.diff.split_words_re lxml.html.diff-module.html#split_words_re -lxml.html.diff.parse_html lxml.html.diff-module.html#parse_html -lxml.html.diff.merge_delete lxml.html.diff-module.html#merge_delete -lxml.html.diff.split_trailing_whitespace lxml.html.diff-module.html#split_trailing_whitespace -lxml.html.diff._ins_del_re lxml.html.diff-module.html#_ins_del_re -lxml.html.diff.locate_unbalanced_end lxml.html.diff-module.html#locate_unbalanced_end -lxml.html.diff.start_tag lxml.html.diff-module.html#start_tag -lxml.html.diff._end_body_re lxml.html.diff-module.html#_end_body_re -lxml.html.diff.is_end_tag lxml.html.diff-module.html#is_end_tag -lxml.html.diff.copy_annotations lxml.html.diff-module.html#copy_annotations -lxml.html.diff.merge_insert lxml.html.diff-module.html#merge_insert -lxml.html.diff.end_whitespace_re lxml.html.diff-module.html#end_whitespace_re -lxml.html.diff.start_whitespace_re lxml.html.diff-module.html#start_whitespace_re -lxml.html.formfill lxml.html.formfill-module.html -lxml.html.formfill._fill_single lxml.html.formfill-module.html#_fill_single -lxml.html.formfill._input_xpath lxml.html.formfill-module.html#_input_xpath -lxml.html.formfill._insert_error lxml.html.formfill-module.html#_insert_error -lxml.html.formfill._fill_form lxml.html.formfill-module.html#_fill_form -lxml.html.formfill._check lxml.html.formfill-module.html#_check -lxml.html.formfill._takes_multiple lxml.html.formfill-module.html#_takes_multiple -lxml.html.formfill.__package__ lxml.html.formfill-module.html#__package__ -lxml.html.formfill.insert_errors_html lxml.html.formfill-module.html#insert_errors_html -lxml.html.formfill._form_name_xpath lxml.html.formfill-module.html#_form_name_xpath -lxml.html.formfill._name_xpath lxml.html.formfill-module.html#_name_xpath -lxml.html.formfill.fill_form_html lxml.html.formfill-module.html#fill_form_html -lxml.html.formfill._add_class lxml.html.formfill-module.html#_add_class -lxml.html.formfill.default_error_creator lxml.html.formfill-module.html#default_error_creator -lxml.html.formfill._find_elements_for_name lxml.html.formfill-module.html#_find_elements_for_name -lxml.html.formfill._label_for_xpath lxml.html.formfill-module.html#_label_for_xpath -lxml.html.formfill._fill_multiple lxml.html.formfill-module.html#_fill_multiple -lxml.html.formfill._select lxml.html.formfill-module.html#_select -lxml.html.formfill.fill_form lxml.html.formfill-module.html#fill_form -lxml.html.formfill.insert_errors lxml.html.formfill-module.html#insert_errors -lxml.html.formfill._find_form_ids lxml.html.formfill-module.html#_find_form_ids -lxml.html.formfill._tag lxml.html.formfill-module.html#_tag -lxml.html.formfill._find_form lxml.html.formfill-module.html#_find_form -lxml.html.html5parser lxml.html.html5parser-module.html -lxml.html.html5parser.parse lxml.html.html5parser-module.html#parse -lxml.html.html5parser.html_parser lxml.html.html5parser-module.html#html_parser -lxml.html.html5parser.__package__ lxml.html.html5parser-module.html#__package__ -lxml.html.html5parser.xhtml_parser lxml.html.html5parser-module.html#xhtml_parser -lxml.html.html5parser.fragment_fromstring lxml.html.html5parser-module.html#fragment_fromstring -lxml.html.html5parser.fragments_fromstring lxml.html.html5parser-module.html#fragments_fromstring -lxml.html.html5parser.document_fromstring lxml.html.html5parser-module.html#document_fromstring -lxml.html.html5parser.fromstring lxml.html.html5parser-module.html#fromstring -lxml.html.html5parser._find_tag lxml.html.html5parser-module.html#_find_tag -lxml.html.html5parser._looks_like_url lxml.html.html5parser-module.html#_looks_like_url -lxml.html.soupparser lxml.html.soupparser-module.html -lxml.html.soupparser.parse lxml.html.soupparser-module.html#parse -lxml.html.soupparser.unichr lxml.html.soupparser-module.html#unichr -lxml.html.soupparser.handle_entities lxml.html.soupparser-module.html#handle_entities -lxml.html.soupparser.__package__ lxml.html.soupparser-module.html#__package__ -lxml.html.soupparser._parse_doctype_declaration lxml.html.soupparser-module.html#_parse_doctype_declaration -lxml.html.soupparser.convert_tree lxml.html.soupparser-module.html#convert_tree -lxml.html.soupparser._convert_tree lxml.html.soupparser-module.html#_convert_tree -lxml.html.soupparser._DECLARATION_OR_DOCTYPE lxml.html.soupparser-module.html#_DECLARATION_OR_DOCTYPE -lxml.html.soupparser.unescape lxml.html.soupparser-module.html#unescape -lxml.html.soupparser.fromstring lxml.html.soupparser-module.html#fromstring -lxml.html.soupparser._init_node_converters lxml.html.soupparser-module.html#_init_node_converters -lxml.html.soupparser._parse lxml.html.soupparser-module.html#_parse -lxml.html.usedoctest lxml.html.usedoctest-module.html -lxml.includes lxml.includes-module.html -lxml.includes.__package__ lxml.includes-module.html#__package__ -lxml.isoschematron lxml.isoschematron-module.html -lxml.isoschematron.SVRL_NS lxml.isoschematron-module.html#SVRL_NS -lxml.isoschematron.iso_svrl_for_xslt1 lxml.isoschematron-module.html#iso_svrl_for_xslt1 -lxml.isoschematron._xml_schema_root lxml.isoschematron-module.html#_xml_schema_root -lxml.isoschematron._stylesheet_param_dict lxml.isoschematron-module.html#_stylesheet_param_dict -lxml.isoschematron.svrl_validation_errors lxml.isoschematron-module.html#svrl_validation_errors -lxml.isoschematron.iso_dsdl_include lxml.isoschematron-module.html#iso_dsdl_include -lxml.isoschematron.extract_rng lxml.isoschematron-module.html#extract_rng -lxml.isoschematron._resources_dir lxml.isoschematron-module.html#_resources_dir -lxml.isoschematron.__package__ lxml.isoschematron-module.html#__package__ -lxml.isoschematron.SCHEMATRON_NS lxml.isoschematron-module.html#SCHEMATRON_NS -lxml.isoschematron._schematron_root lxml.isoschematron-module.html#_schematron_root -lxml.isoschematron.extract_xsd lxml.isoschematron-module.html#extract_xsd -lxml.isoschematron.RELAXNG_NS lxml.isoschematron-module.html#RELAXNG_NS -lxml.isoschematron.XML_SCHEMA_NS lxml.isoschematron-module.html#XML_SCHEMA_NS -lxml.isoschematron.schematron_schema_valid lxml.isoschematron-module.html#schematron_schema_valid -lxml.isoschematron.stylesheet_params lxml.isoschematron-module.html#stylesheet_params -lxml.isoschematron.iso_abstract_expand lxml.isoschematron-module.html#iso_abstract_expand -lxml.objectify lxml.objectify-module.html -lxml.objectify.enable_recursive_str lxml.objectify-module.html#enable_recursive_str -lxml.objectify.dump lxml.objectify-module.html#dump -lxml.objectify.__parseBool lxml.objectify-module.html#__parseBool -lxml.objectify.annotate lxml.objectify-module.html#annotate -lxml.objectify.set_default_parser lxml.objectify-module.html#set_default_parser -lxml.objectify.pyannotate lxml.objectify-module.html#pyannotate -lxml.objectify.getRegisteredTypes lxml.objectify-module.html#getRegisteredTypes -lxml.objectify.xsiannotate lxml.objectify-module.html#xsiannotate -lxml.objectify.PYTYPE_ATTRIBUTE lxml.objectify-module.html#PYTYPE_ATTRIBUTE -lxml.objectify.__package__ lxml.objectify-module.html#__package__ -lxml.objectify.pytypename lxml.objectify-module.html#pytypename -lxml.objectify.makeparser lxml.objectify-module.html#makeparser -lxml.objectify.XML lxml.objectify-module.html#XML -lxml.objectify.deannotate lxml.objectify-module.html#deannotate -lxml.objectify.E lxml.objectify-module.html#E -lxml.objectify.Element lxml.objectify-module.html#Element -lxml.objectify.__test__ lxml.objectify-module.html#__test__ -lxml.objectify.__unpickleElementTree lxml.objectify-module.html#__unpickleElementTree -lxml.objectify.__lower_bool lxml.objectify-module.html#__lower_bool -lxml.objectify.parse lxml.objectify-module.html#parse -lxml.objectify.set_pytype_attribute_tag lxml.objectify-module.html#set_pytype_attribute_tag -lxml.objectify.__checkBool lxml.objectify-module.html#__checkBool -lxml.objectify.fromstring lxml.objectify-module.html#fromstring -lxml.objectify.DataElement lxml.objectify-module.html#DataElement -lxml.objectify.SubElement lxml.objectify-module.html#SubElement -lxml.pyclasslookup lxml.pyclasslookup-module.html -lxml.pyclasslookup.__package__ lxml.pyclasslookup-module.html#__package__ -lxml.sax lxml.sax-module.html -lxml.sax.Comment lxml.etree-module.html#Comment -lxml.sax.ProcessingInstruction lxml.etree-module.html#PI -lxml.sax.SubElement lxml.etree-module.html#SubElement -lxml.sax.__package__ lxml.sax-module.html#__package__ -lxml.sax.saxify lxml.sax-module.html#saxify -lxml.sax._getNsTag lxml.sax-module.html#_getNsTag -lxml.sax.ElementTree lxml.etree-module.html#ElementTree -lxml.tests lxml.tests-module.html -lxml.tests.__package__ lxml.tests-module.html#__package__ -lxml.tests.common_imports lxml.tests.common_imports-module.html -lxml.tests.common_imports.make_doctest lxml.tests.common_imports-module.html#make_doctest -lxml.tests.common_imports._str lxml.tests.common_imports-module.html#_str -lxml.tests.common_imports.IS_PYTHON3 lxml.tests.common_imports-module.html#IS_PYTHON3 -lxml.tests.common_imports.IS_PYTHON2 lxml.tests.common_imports-module.html#IS_PYTHON2 -lxml.tests.common_imports._bytes lxml.tests.common_imports-module.html#_bytes -lxml.tests.common_imports.canonicalize lxml.tests.common_imports-module.html#canonicalize -lxml.tests.common_imports._fix_unicode lxml.tests.common_imports-module.html#_fix_unicode -lxml.tests.common_imports.write_to_file lxml.tests.common_imports-module.html#write_to_file -lxml.tests.common_imports.unichr_escape lxml.tests.common_imports-module.html#unichr_escape -lxml.tests.common_imports.__package__ lxml.tests.common_imports-module.html#__package__ -lxml.tests.common_imports.filter_by_version lxml.tests.common_imports-module.html#filter_by_version -lxml.tests.common_imports._get_caller_relative_path lxml.tests.common_imports-module.html#_get_caller_relative_path -lxml.tests.common_imports.unentitify lxml.tests.common_imports-module.html#unentitify -lxml.tests.common_imports.doctest_parser lxml.tests.common_imports-module.html#doctest_parser -lxml.tests.common_imports.fileUrlInTestDir lxml.tests.common_imports-module.html#fileUrlInTestDir -lxml.tests.common_imports._fix_bytes lxml.tests.common_imports-module.html#_fix_bytes -lxml.tests.common_imports.path2url lxml.tests.common_imports-module.html#path2url -lxml.tests.common_imports._fix_exceptions lxml.tests.common_imports-module.html#_fix_exceptions -lxml.tests.common_imports.make_version_tuple lxml.tests.common_imports-module.html#make_version_tuple -lxml.tests.common_imports.ET_VERSION lxml.tests.common_imports-module.html#ET_VERSION -lxml.tests.common_imports.read_file lxml.tests.common_imports-module.html#read_file -lxml.tests.common_imports.fileInTestDir lxml.tests.common_imports-module.html#fileInTestDir -lxml.tests.common_imports.IS_PYPY lxml.tests.common_imports-module.html#IS_PYPY -lxml.tests.common_imports.CET_VERSION lxml.tests.common_imports-module.html#CET_VERSION -lxml.tests.common_imports._fix_traceback lxml.tests.common_imports-module.html#_fix_traceback -lxml.tests.common_imports.readFileInTestDir lxml.tests.common_imports-module.html#readFileInTestDir -lxml.tests.dummy_http_server lxml.tests.dummy_http_server-module.html -lxml.tests.dummy_http_server.build_web_server lxml.tests.dummy_http_server-module.html#build_web_server -lxml.tests.dummy_http_server.webserver lxml.tests.dummy_http_server-module.html#webserver -lxml.tests.dummy_http_server.__package__ lxml.tests.dummy_http_server-module.html#__package__ -lxml.tests.selftest lxml.tests.selftest-module.html -lxml.tests.selftest.bad_find lxml.tests.selftest-module.html#bad_find -lxml.tests.selftest.encoding lxml.tests.selftest-module.html#encoding -lxml.tests.selftest.serialize lxml.tests.selftest-module.html#serialize -lxml.tests.selftest.parseliteral lxml.tests.selftest-module.html#parseliteral -lxml.tests.selftest.check_element lxml.tests.selftest-module.html#check_element -lxml.tests.selftest.ENTITY_XML lxml.tests.selftest-module.html#ENTITY_XML -lxml.tests.selftest.XINCLUDE lxml.tests.selftest-module.html#XINCLUDE -lxml.tests.selftest.find lxml.tests.selftest-module.html#find -lxml.tests.selftest.bug_xmltoolkit28 lxml.tests.selftest-module.html#bug_xmltoolkit28 -lxml.tests.selftest.check_element_tree lxml.tests.selftest-module.html#check_element_tree -lxml.tests.selftest.fix_compatibility lxml.tests.selftest-module.html#fix_compatibility -lxml.tests.selftest.SAMPLE_XML lxml.tests.selftest-module.html#SAMPLE_XML -lxml.tests.selftest.check_string_or_none lxml.tests.selftest-module.html#check_string_or_none -lxml.tests.selftest.stdout lxml.tests.selftest-module.html#stdout -lxml.tests.selftest.namespace lxml.tests.selftest-module.html#namespace -lxml.tests.selftest.bug_xmltoolkit25 lxml.tests.selftest-module.html#bug_xmltoolkit25 -lxml.tests.selftest.__package__ lxml.tests.selftest-module.html#__package__ -lxml.tests.selftest.parsefile lxml.tests.selftest-module.html#parsefile -lxml.tests.selftest.normalize_crlf lxml.tests.selftest-module.html#normalize_crlf -lxml.tests.selftest.summarize_list lxml.tests.selftest-module.html#summarize_list -lxml.tests.selftest.simpleops lxml.tests.selftest-module.html#simpleops -lxml.tests.selftest.xinclude_loader lxml.tests.selftest-module.html#xinclude_loader -lxml.tests.selftest.iterators lxml.tests.selftest-module.html#iterators -lxml.tests.selftest.summarize lxml.tests.selftest-module.html#summarize -lxml.tests.selftest.writefile lxml.tests.selftest-module.html#writefile -lxml.tests.selftest.xinclude_default lxml.tests.selftest-module.html#xinclude_default -lxml.tests.selftest.interface lxml.tests.selftest-module.html#interface -lxml.tests.selftest.check_mapping lxml.tests.selftest-module.html#check_mapping -lxml.tests.selftest.xinclude lxml.tests.selftest-module.html#xinclude -lxml.tests.selftest.writestring lxml.tests.selftest-module.html#writestring -lxml.tests.selftest.check_string lxml.tests.selftest-module.html#check_string -lxml.tests.selftest.qname lxml.tests.selftest-module.html#qname -lxml.tests.selftest.iterparse lxml.tests.selftest-module.html#iterparse -lxml.tests.selftest.xpath_tokenizer lxml.tests.selftest-module.html#xpath_tokenizer -lxml.tests.selftest2 lxml.tests.selftest2-module.html -lxml.tests.selftest2.stdout lxml.tests.selftest2-module.html#stdout -lxml.tests.selftest2.serialize lxml.tests.selftest2-module.html#serialize -lxml.tests.selftest2.check_element lxml.tests.selftest2-module.html#check_element -lxml.tests.selftest2.ENTITY_XML lxml.tests.selftest2-module.html#ENTITY_XML -lxml.tests.selftest2.find lxml.tests.selftest2-module.html#find -lxml.tests.selftest2.summarize lxml.tests.selftest2-module.html#summarize -lxml.tests.selftest2.check_element_tree lxml.tests.selftest2-module.html#check_element_tree -lxml.tests.selftest2.SAMPLE_XML lxml.tests.selftest2-module.html#SAMPLE_XML -lxml.tests.selftest2.encoding lxml.tests.selftest2-module.html#encoding -lxml.tests.selftest2.unserialize lxml.tests.selftest2-module.html#unserialize -lxml.tests.selftest2.__package__ lxml.tests.selftest2-module.html#__package__ -lxml.tests.selftest2.parsefile lxml.tests.selftest2-module.html#parsefile -lxml.tests.selftest2.SAMPLE_XML_NS lxml.tests.selftest2-module.html#SAMPLE_XML_NS -lxml.tests.selftest2.summarize_list lxml.tests.selftest2-module.html#summarize_list -lxml.tests.selftest2.makeelement lxml.tests.selftest2-module.html#makeelement -lxml.tests.selftest2.writefile lxml.tests.selftest2-module.html#writefile -lxml.tests.selftest2.cdata lxml.tests.selftest2-module.html#cdata -lxml.tests.selftest2.check_mapping lxml.tests.selftest2-module.html#check_mapping -lxml.tests.selftest2.copy lxml.tests.selftest2-module.html#copy -lxml.tests.selftest2.check_string lxml.tests.selftest2-module.html#check_string -lxml.tests.selftest2.qname lxml.tests.selftest2-module.html#qname -lxml.tests.selftest2.element lxml.tests.selftest2-module.html#element -lxml.tests.selftest2.attrib lxml.tests.selftest2-module.html#attrib -lxml.tests.test_builder lxml.tests.test_builder-module.html -lxml.tests.test_builder.__package__ lxml.tests.test_builder-module.html#__package__ -lxml.tests.test_builder._bytes lxml.tests.common_imports-module.html#_bytes -lxml.tests.test_builder.test_suite lxml.tests.test_builder-module.html#test_suite -lxml.tests.test_builder.this_dir lxml.tests.test_builder-module.html#this_dir -lxml.tests.test_classlookup lxml.tests.test_classlookup-module.html -lxml.tests.test_classlookup.xml_str lxml.tests.test_classlookup-module.html#xml_str -lxml.tests.test_classlookup.fileInTestDir lxml.tests.common_imports-module.html#fileInTestDir -lxml.tests.test_classlookup._str lxml.tests.common_imports-module.html#_str -lxml.tests.test_classlookup.__package__ lxml.tests.test_classlookup-module.html#__package__ -lxml.tests.test_classlookup.this_dir lxml.tests.test_classlookup-module.html#this_dir -lxml.tests.test_classlookup._bytes lxml.tests.common_imports-module.html#_bytes -lxml.tests.test_classlookup.test_suite lxml.tests.test_classlookup-module.html#test_suite -lxml.tests.test_classlookup.canonicalize lxml.tests.common_imports-module.html#canonicalize -lxml.tests.test_css lxml.tests.test_css-module.html -lxml.tests.test_css.__package__ lxml.tests.test_css-module.html#__package__ -lxml.tests.test_css.HTML lxml.tests.test_css-module.html#HTML -lxml.tests.test_css.test_suite lxml.tests.test_css-module.html#test_suite -lxml.tests.test_doctestcompare lxml.tests.test_doctestcompare-module.html -lxml.tests.test_doctestcompare.__package__ lxml.tests.test_doctestcompare-module.html#__package__ -lxml.tests.test_doctestcompare.test_suite lxml.tests.test_doctestcompare-module.html#test_suite -lxml.tests.test_doctestcompare.indent lxml.tests.test_doctestcompare-module.html#indent -lxml.tests.test_dtd lxml.tests.test_dtd-module.html -lxml.tests.test_dtd.fileUrlInTestDir lxml.tests.common_imports-module.html#fileUrlInTestDir -lxml.tests.test_dtd.make_doctest lxml.tests.common_imports-module.html#make_doctest -lxml.tests.test_dtd._str lxml.tests.common_imports-module.html#_str -lxml.tests.test_dtd.fileInTestDir lxml.tests.common_imports-module.html#fileInTestDir -lxml.tests.test_dtd.__package__ lxml.tests.test_dtd-module.html#__package__ -lxml.tests.test_dtd._bytes lxml.tests.common_imports-module.html#_bytes -lxml.tests.test_dtd.test_suite lxml.tests.test_dtd-module.html#test_suite -lxml.tests.test_dtd.this_dir lxml.tests.test_dtd-module.html#this_dir -lxml.tests.test_elementpath lxml.tests.test_elementpath-module.html -lxml.tests.test_elementpath.__package__ lxml.tests.test_elementpath-module.html#__package__ -lxml.tests.test_elementpath.test_suite lxml.tests.test_elementpath-module.html#test_suite -lxml.tests.test_elementpath.summarize lxml.tests.test_elementpath-module.html#summarize -lxml.tests.test_elementpath.normalize_crlf lxml.tests.test_elementpath-module.html#normalize_crlf -lxml.tests.test_elementpath.summarize_list lxml.tests.test_elementpath-module.html#summarize_list -lxml.tests.test_elementtree lxml.tests.test_elementtree-module.html -lxml.tests.test_elementtree.ElementTreePullTestCase lxml.tests.test_elementtree-module.html#ElementTreePullTestCase -lxml.tests.test_elementtree._str lxml.tests.common_imports-module.html#_str -lxml.tests.test_elementtree.canonicalize lxml.tests.common_imports-module.html#canonicalize -lxml.tests.test_elementtree._bytes lxml.tests.common_imports-module.html#_bytes -lxml.tests.test_elementtree.next lxml.tests.common_imports-module.html#next -lxml.tests.test_elementtree.__package__ lxml.tests.test_elementtree-module.html#__package__ -lxml.tests.test_elementtree.filter_by_version lxml.tests.common_imports-module.html#filter_by_version -lxml.tests.test_elementtree.this_dir lxml.tests.test_elementtree-module.html#this_dir -lxml.tests.test_elementtree.cElementTree lxml.tests.test_elementtree-module.html#cElementTree -lxml.tests.test_elementtree.fileInTestDir lxml.tests.common_imports-module.html#fileInTestDir -lxml.tests.test_elementtree.test_suite lxml.tests.test_elementtree-module.html#test_suite -lxml.tests.test_errors lxml.tests.test_errors-module.html -lxml.tests.test_errors.__package__ lxml.tests.test_errors-module.html#__package__ -lxml.tests.test_errors.test_suite lxml.tests.test_errors-module.html#test_suite -lxml.tests.test_errors.this_dir lxml.tests.test_errors-module.html#this_dir -lxml.tests.test_etree lxml.tests.test_etree-module.html -lxml.tests.test_etree.tmpfile lxml.tests.test_etree-module.html#tmpfile -lxml.tests.test_etree.make_doctest lxml.tests.common_imports-module.html#make_doctest -lxml.tests.test_etree._str lxml.tests.common_imports-module.html#_str -lxml.tests.test_etree.fileInTestDir lxml.tests.common_imports-module.html#fileInTestDir -lxml.tests.test_etree._bytes lxml.tests.common_imports-module.html#_bytes -lxml.tests.test_etree.canonicalize lxml.tests.common_imports-module.html#canonicalize -lxml.tests.test_etree.__package__ lxml.tests.test_etree-module.html#__package__ -lxml.tests.test_etree.fileUrlInTestDir lxml.tests.common_imports-module.html#fileUrlInTestDir -lxml.tests.test_etree.path2url lxml.tests.common_imports-module.html#path2url -lxml.tests.test_etree.read_file lxml.tests.common_imports-module.html#read_file -lxml.tests.test_etree.test_suite lxml.tests.test_etree-module.html#test_suite -lxml.tests.test_external_document lxml.tests.test_external_document-module.html -lxml.tests.test_external_document.__package__ lxml.tests.test_external_document-module.html#__package__ -lxml.tests.test_external_document.DOC_NAME lxml.tests.test_external_document-module.html#DOC_NAME -lxml.tests.test_external_document.test_suite lxml.tests.test_external_document-module.html#test_suite -lxml.tests.test_external_document.DESTRUCTOR_NAME lxml.tests.test_external_document-module.html#DESTRUCTOR_NAME -lxml.tests.test_htmlparser lxml.tests.test_htmlparser-module.html -lxml.tests.test_htmlparser.write_to_file lxml.tests.common_imports-module.html#write_to_file -lxml.tests.test_htmlparser._str lxml.tests.common_imports-module.html#_str -lxml.tests.test_htmlparser.fileInTestDir lxml.tests.common_imports-module.html#fileInTestDir -lxml.tests.test_htmlparser.__package__ lxml.tests.test_htmlparser-module.html#__package__ -lxml.tests.test_htmlparser.this_dir lxml.tests.test_htmlparser-module.html#this_dir -lxml.tests.test_htmlparser._bytes lxml.tests.common_imports-module.html#_bytes -lxml.tests.test_htmlparser.test_suite lxml.tests.test_htmlparser-module.html#test_suite -lxml.tests.test_htmlparser.next lxml.tests.common_imports-module.html#next -lxml.tests.test_http_io lxml.tests.test_http_io-module.html -lxml.tests.test_http_io.webserver lxml.tests.dummy_http_server-module.html#webserver -lxml.tests.test_http_io._bytes lxml.tests.common_imports-module.html#_bytes -lxml.tests.test_http_io.__package__ lxml.tests.test_http_io-module.html#__package__ -lxml.tests.test_http_io.this_dir lxml.tests.test_http_io-module.html#this_dir -lxml.tests.test_http_io.test_suite lxml.tests.test_http_io-module.html#test_suite -lxml.tests.test_incremental_xmlfile lxml.tests.test_incremental_xmlfile-module.html -lxml.tests.test_incremental_xmlfile._str lxml.tests.common_imports-module.html#_str -lxml.tests.test_incremental_xmlfile.this_dir lxml.tests.test_incremental_xmlfile-module.html#this_dir -lxml.tests.test_incremental_xmlfile.__package__ lxml.tests.test_incremental_xmlfile-module.html#__package__ -lxml.tests.test_incremental_xmlfile.test_suite lxml.tests.test_incremental_xmlfile-module.html#test_suite -lxml.tests.test_io lxml.tests.test_io-module.html -lxml.tests.test_io._str lxml.tests.common_imports-module.html#_str -lxml.tests.test_io._bytes lxml.tests.common_imports-module.html#_bytes -lxml.tests.test_io.read_file lxml.tests.common_imports-module.html#read_file -lxml.tests.test_io.this_dir lxml.tests.test_io-module.html#this_dir -lxml.tests.test_io.__package__ lxml.tests.test_io-module.html#__package__ -lxml.tests.test_io.write_to_file lxml.tests.common_imports-module.html#write_to_file -lxml.tests.test_io.test_suite lxml.tests.test_io-module.html#test_suite -lxml.tests.test_isoschematron lxml.tests.test_isoschematron-module.html -lxml.tests.test_isoschematron.make_doctest lxml.tests.common_imports-module.html#make_doctest -lxml.tests.test_isoschematron.fileInTestDir lxml.tests.common_imports-module.html#fileInTestDir -lxml.tests.test_isoschematron.__package__ lxml.tests.test_isoschematron-module.html#__package__ -lxml.tests.test_isoschematron.test_suite lxml.tests.test_isoschematron-module.html#test_suite -lxml.tests.test_isoschematron.this_dir lxml.tests.test_isoschematron-module.html#this_dir -lxml.tests.test_nsclasses lxml.tests.test_nsclasses-module.html -lxml.tests.test_nsclasses.make_doctest lxml.tests.common_imports-module.html#make_doctest -lxml.tests.test_nsclasses.__package__ lxml.tests.test_nsclasses-module.html#__package__ -lxml.tests.test_nsclasses._bytes lxml.tests.common_imports-module.html#_bytes -lxml.tests.test_nsclasses.test_suite lxml.tests.test_nsclasses-module.html#test_suite -lxml.tests.test_nsclasses.this_dir lxml.tests.test_nsclasses-module.html#this_dir -lxml.tests.test_objectify lxml.tests.test_objectify-module.html -lxml.tests.test_objectify.xsitype2objclass lxml.tests.test_objectify-module.html#xsitype2objclass -lxml.tests.test_objectify.make_doctest lxml.tests.common_imports-module.html#make_doctest -lxml.tests.test_objectify._str lxml.tests.common_imports-module.html#_str -lxml.tests.test_objectify._bytes lxml.tests.common_imports-module.html#_bytes -lxml.tests.test_objectify.PYTYPE_NAMESPACE lxml.tests.test_objectify-module.html#PYTYPE_NAMESPACE -lxml.tests.test_objectify.canonicalize lxml.tests.common_imports-module.html#canonicalize -lxml.tests.test_objectify.pytype2objclass lxml.tests.test_objectify-module.html#pytype2objclass -lxml.tests.test_objectify.xml_str lxml.tests.test_objectify-module.html#xml_str -lxml.tests.test_objectify.DEFAULT_NSMAP lxml.tests.test_objectify-module.html#DEFAULT_NSMAP -lxml.tests.test_objectify.XML_SCHEMA_NS lxml.tests.test_objectify-module.html#XML_SCHEMA_NS -lxml.tests.test_objectify.TREE_PYTYPE lxml.tests.test_objectify-module.html#TREE_PYTYPE -lxml.tests.test_objectify.__package__ lxml.tests.test_objectify-module.html#__package__ -lxml.tests.test_objectify.XML_SCHEMA_INSTANCE_TYPE_ATTR lxml.tests.test_objectify-module.html#XML_SCHEMA_INSTANCE_TYPE_ATTR -lxml.tests.test_objectify.XML_SCHEMA_NIL_ATTR lxml.tests.test_objectify-module.html#XML_SCHEMA_NIL_ATTR -lxml.tests.test_objectify.this_dir lxml.tests.test_objectify-module.html#this_dir -lxml.tests.test_objectify.XML_SCHEMA_INSTANCE_NS lxml.tests.test_objectify-module.html#XML_SCHEMA_INSTANCE_NS -lxml.tests.test_objectify.objectclass2xsitype lxml.tests.test_objectify-module.html#objectclass2xsitype -lxml.tests.test_objectify.v lxml.tests.test_objectify-module.html#v -lxml.tests.test_objectify.objectclass2pytype lxml.tests.test_objectify-module.html#objectclass2pytype -lxml.tests.test_objectify.fileInTestDir lxml.tests.common_imports-module.html#fileInTestDir -lxml.tests.test_objectify.test_suite lxml.tests.test_objectify-module.html#test_suite -lxml.tests.test_pyclasslookup lxml.tests.test_pyclasslookup-module.html -lxml.tests.test_pyclasslookup.xml_str lxml.tests.test_pyclasslookup-module.html#xml_str -lxml.tests.test_pyclasslookup.this_dir lxml.tests.test_pyclasslookup-module.html#this_dir -lxml.tests.test_pyclasslookup.fileInTestDir lxml.tests.common_imports-module.html#fileInTestDir -lxml.tests.test_pyclasslookup.__package__ lxml.tests.test_pyclasslookup-module.html#__package__ -lxml.tests.test_pyclasslookup._bytes lxml.tests.common_imports-module.html#_bytes -lxml.tests.test_pyclasslookup.test_suite lxml.tests.test_pyclasslookup-module.html#test_suite -lxml.tests.test_pyclasslookup.canonicalize lxml.tests.common_imports-module.html#canonicalize -lxml.tests.test_relaxng lxml.tests.test_relaxng-module.html -lxml.tests.test_relaxng.make_doctest lxml.tests.common_imports-module.html#make_doctest -lxml.tests.test_relaxng.rnc2rng lxml.tests.test_relaxng-module.html#rnc2rng -lxml.tests.test_relaxng.fileInTestDir lxml.tests.common_imports-module.html#fileInTestDir -lxml.tests.test_relaxng.__package__ lxml.tests.test_relaxng-module.html#__package__ -lxml.tests.test_relaxng.this_dir lxml.tests.test_relaxng-module.html#this_dir -lxml.tests.test_relaxng._bytes lxml.tests.common_imports-module.html#_bytes -lxml.tests.test_relaxng.test_suite lxml.tests.test_relaxng-module.html#test_suite -lxml.tests.test_sax lxml.tests.test_sax-module.html -lxml.tests.test_sax.make_doctest lxml.tests.common_imports-module.html#make_doctest -lxml.tests.test_sax.__package__ lxml.tests.test_sax-module.html#__package__ -lxml.tests.test_sax._bytes lxml.tests.common_imports-module.html#_bytes -lxml.tests.test_sax.test_suite lxml.tests.test_sax-module.html#test_suite -lxml.tests.test_sax.this_dir lxml.tests.test_sax-module.html#this_dir -lxml.tests.test_schematron lxml.tests.test_schematron-module.html -lxml.tests.test_schematron.make_doctest lxml.tests.common_imports-module.html#make_doctest -lxml.tests.test_schematron.fileInTestDir lxml.tests.common_imports-module.html#fileInTestDir -lxml.tests.test_schematron.__package__ lxml.tests.test_schematron-module.html#__package__ -lxml.tests.test_schematron.test_suite lxml.tests.test_schematron-module.html#test_suite -lxml.tests.test_schematron.this_dir lxml.tests.test_schematron-module.html#this_dir -lxml.tests.test_threading lxml.tests.test_threading-module.html -lxml.tests.test_threading.__package__ lxml.tests.test_threading-module.html#__package__ -lxml.tests.test_threading._bytes lxml.tests.common_imports-module.html#_bytes -lxml.tests.test_threading.test_suite lxml.tests.test_threading-module.html#test_suite -lxml.tests.test_threading.this_dir lxml.tests.test_threading-module.html#this_dir -lxml.tests.test_unicode lxml.tests.test_unicode-module.html -lxml.tests.test_unicode._chr lxml.tests.test_unicode-module.html#_chr -lxml.tests.test_unicode.uxml lxml.tests.test_unicode-module.html#uxml -lxml.tests.test_unicode.invalid_tag lxml.tests.test_unicode-module.html#invalid_tag -lxml.tests.test_unicode._str lxml.tests.common_imports-module.html#_str -lxml.tests.test_unicode.__package__ lxml.tests.test_unicode-module.html#__package__ -lxml.tests.test_unicode.this_dir lxml.tests.test_unicode-module.html#this_dir -lxml.tests.test_unicode._bytes lxml.tests.common_imports-module.html#_bytes -lxml.tests.test_unicode.klingon lxml.tests.test_unicode-module.html#klingon -lxml.tests.test_unicode.test_suite lxml.tests.test_unicode-module.html#test_suite -lxml.tests.test_unicode.uni lxml.tests.test_unicode-module.html#uni -lxml.tests.test_unicode.ascii_uni lxml.tests.test_unicode-module.html#ascii_uni -lxml.tests.test_xmlschema lxml.tests.test_xmlschema-module.html -lxml.tests.test_xmlschema.make_doctest lxml.tests.common_imports-module.html#make_doctest -lxml.tests.test_xmlschema.fileInTestDir lxml.tests.common_imports-module.html#fileInTestDir -lxml.tests.test_xmlschema.__package__ lxml.tests.test_xmlschema-module.html#__package__ -lxml.tests.test_xmlschema.test_suite lxml.tests.test_xmlschema-module.html#test_suite -lxml.tests.test_xmlschema.this_dir lxml.tests.test_xmlschema-module.html#this_dir -lxml.tests.test_xpathevaluator lxml.tests.test_xpathevaluator-module.html -lxml.tests.test_xpathevaluator.argsTest1 lxml.tests.test_xpathevaluator-module.html#argsTest1 -lxml.tests.test_xpathevaluator.argsTest2 lxml.tests.test_xpathevaluator-module.html#argsTest2 -lxml.tests.test_xpathevaluator.make_doctest lxml.tests.common_imports-module.html#make_doctest -lxml.tests.test_xpathevaluator.tag lxml.tests.test_xpathevaluator-module.html#tag -lxml.tests.test_xpathevaluator.stringTest lxml.tests.test_xpathevaluator-module.html#stringTest -lxml.tests.test_xpathevaluator._bytes lxml.tests.common_imports-module.html#_bytes -lxml.tests.test_xpathevaluator.booleanTest lxml.tests.test_xpathevaluator-module.html#booleanTest -lxml.tests.test_xpathevaluator.this_dir lxml.tests.test_xpathevaluator-module.html#this_dir -lxml.tests.test_xpathevaluator.setTest lxml.tests.test_xpathevaluator-module.html#setTest -lxml.tests.test_xpathevaluator.resultTypesTest2 lxml.tests.test_xpathevaluator-module.html#resultTypesTest2 -lxml.tests.test_xpathevaluator.SAMPLE_XML lxml.tests.test_xpathevaluator-module.html#SAMPLE_XML -lxml.tests.test_xpathevaluator.__package__ lxml.tests.test_xpathevaluator-module.html#__package__ -lxml.tests.test_xpathevaluator.test_suite lxml.tests.test_xpathevaluator-module.html#test_suite -lxml.tests.test_xpathevaluator.floatTest lxml.tests.test_xpathevaluator-module.html#floatTest -lxml.tests.test_xpathevaluator.stringListTest lxml.tests.test_xpathevaluator-module.html#stringListTest -lxml.tests.test_xpathevaluator.xpath lxml.tests.test_xpathevaluator-module.html#xpath -lxml.tests.test_xpathevaluator.tag_or_value lxml.tests.test_xpathevaluator-module.html#tag_or_value -lxml.tests.test_xpathevaluator.resultTypesTest lxml.tests.test_xpathevaluator-module.html#resultTypesTest -lxml.tests.test_xpathevaluator.extension lxml.tests.test_xpathevaluator-module.html#extension -lxml.tests.test_xpathevaluator.uri lxml.tests.test_xpathevaluator-module.html#uri -lxml.tests.test_xpathevaluator.setTest2 lxml.tests.test_xpathevaluator-module.html#setTest2 -lxml.tests.test_xslt lxml.tests.test_xslt-module.html -lxml.tests.test_xslt.make_doctest lxml.tests.common_imports-module.html#make_doctest -lxml.tests.test_xslt._str lxml.tests.common_imports-module.html#_str -lxml.tests.test_xslt._bytes lxml.tests.common_imports-module.html#_bytes -lxml.tests.test_xslt.this_dir lxml.tests.test_xslt-module.html#this_dir -lxml.tests.test_xslt.__package__ lxml.tests.test_xslt-module.html#__package__ -lxml.tests.test_xslt.is_python3 lxml.tests.test_xslt-module.html#is_python3 -lxml.tests.test_xslt.fileInTestDir lxml.tests.common_imports-module.html#fileInTestDir -lxml.tests.test_xslt.test_suite lxml.tests.test_xslt-module.html#test_suite -lxml.usedoctest lxml.usedoctest-module.html -xml.etree.ElementTree xml.etree.ElementTree-module.html -xml.etree.ElementTree.XMLID xml.etree.ElementTree-module.html#XMLID -xml.etree.ElementTree.register_namespace xml.etree.ElementTree-module.html#register_namespace -xml.etree.ElementTree.dump xml.etree.ElementTree-module.html#dump -xml.etree.ElementTree._raise_serialization_error xml.etree.ElementTree-module.html#_raise_serialization_error -xml.etree.ElementTree.HTML_EMPTY xml.etree.ElementTree-module.html#HTML_EMPTY -xml.etree.ElementTree._serialize_text xml.etree.ElementTree-module.html#_serialize_text -xml.etree.ElementTree.parse xml.etree.ElementTree-module.html#parse -xml.etree.ElementTree._encode xml.etree.ElementTree-module.html#_encode -xml.etree.ElementTree._namespace_map xml.etree.ElementTree-module.html#_namespace_map -xml.etree.ElementTree._sentinel xml.etree.ElementTree-module.html#_sentinel -xml.etree.ElementTree.__package__ xml.etree.ElementTree-module.html#__package__ -xml.etree.ElementTree._serialize xml.etree.ElementTree-module.html#_serialize -xml.etree.ElementTree._serialize_xml xml.etree.ElementTree-module.html#_serialize_xml -xml.etree.ElementTree.PI xml.etree.ElementTree-module.html#PI -xml.etree.ElementTree._escape_attrib xml.etree.ElementTree-module.html#_escape_attrib -xml.etree.ElementTree.XML xml.etree.ElementTree-module.html#XML -xml.etree.ElementTree._namespaces xml.etree.ElementTree-module.html#_namespaces -xml.etree.ElementTree._escape_cdata xml.etree.ElementTree-module.html#_escape_cdata -xml.etree.ElementTree._serialize_html xml.etree.ElementTree-module.html#_serialize_html -xml.etree.ElementTree._escape_attrib_html xml.etree.ElementTree-module.html#_escape_attrib_html -xml.etree.ElementTree.VERSION xml.etree.ElementTree-module.html#VERSION -xml.etree.ElementTree.tostring xml.etree.ElementTree-module.html#tostring -xml.etree.ElementTree.fromstringlist xml.etree.ElementTree-module.html#fromstringlist -xml.etree.ElementTree.iselement xml.etree.ElementTree-module.html#iselement -xml.etree.ElementTree.Comment xml.etree.ElementTree-module.html#Comment -xml.etree.ElementTree.ProcessingInstruction xml.etree.ElementTree-module.html#ProcessingInstruction -xml.etree.ElementTree.tostringlist xml.etree.ElementTree-module.html#tostringlist -xml.etree.ElementTree.fromstring xml.etree.ElementTree-module.html#fromstring -xml.etree.ElementTree.iterparse xml.etree.ElementTree-module.html#iterparse -xml.etree.ElementTree.SubElement xml.etree.ElementTree-module.html#SubElement -abc.ABCMeta abc.ABCMeta-class.html -abc.ABCMeta.__new__ abc.ABCMeta-class.html#__new__ -abc.ABCMeta._abc_invalidation_counter abc.ABCMeta-class.html#_abc_invalidation_counter -abc.ABCMeta.__instancecheck__ abc.ABCMeta-class.html#__instancecheck__ -abc.ABCMeta.__subclasscheck__ abc.ABCMeta-class.html#__subclasscheck__ -abc.ABCMeta.register abc.ABCMeta-class.html#register -abc.ABCMeta._dump_registry abc.ABCMeta-class.html#_dump_registry -cssselect.parser.SelectorError cssselect.parser.SelectorError-class.html -cssselect.parser.SelectorSyntaxError cssselect.parser.SelectorSyntaxError-class.html -cssselect.xpath.ExpressionError cssselect.xpath.ExpressionError-class.html -cssselect.xpath.XPathExpr cssselect.xpath.XPathExpr-class.html -cssselect.xpath.XPathExpr.add_star_prefix cssselect.xpath.XPathExpr-class.html#add_star_prefix -cssselect.xpath.XPathExpr.join cssselect.xpath.XPathExpr-class.html#join -cssselect.xpath.XPathExpr.__str__ cssselect.xpath.XPathExpr-class.html#__str__ -cssselect.xpath.XPathExpr.add_name_test cssselect.xpath.XPathExpr-class.html#add_name_test -cssselect.xpath.XPathExpr.__repr__ cssselect.xpath.XPathExpr-class.html#__repr__ -cssselect.xpath.XPathExpr.add_condition cssselect.xpath.XPathExpr-class.html#add_condition -cssselect.xpath.XPathExpr.__init__ cssselect.xpath.XPathExpr-class.html#__init__ -exceptions.AssertionError exceptions.AssertionError-class.html -exceptions.AssertionError.__init__ exceptions.AssertionError-class.html#__init__ -exceptions.AssertionError.__new__ exceptions.AssertionError-class.html#__new__ -lxml.ElementInclude.FatalIncludeError lxml.ElementInclude.FatalIncludeError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.LxmlError.__new__ lxml.etree.LxmlError-class.html#__new__ -lxml.etree.LxmlSyntaxError.__qualname__ lxml.etree.LxmlSyntaxError-class.html#__qualname__ -lxml.builder.ElementMaker lxml.builder.ElementMaker-class.html -lxml.builder.ElementMaker._namespace lxml.builder.ElementMaker-class.html#_namespace -lxml.builder.ElementMaker._typemap lxml.builder.ElementMaker-class.html#_typemap -lxml.builder.ElementMaker.__new__ lxml.builder.ElementMaker-class.html#__new__ -lxml.builder.ElementMaker.__setstate__ lxml.builder.ElementMaker-class.html#__setstate__ -lxml.builder.ElementMaker.__reduce__ lxml.builder.ElementMaker-class.html#__reduce__ -lxml.builder.ElementMaker.__getattribute__ lxml.builder.ElementMaker-class.html#__getattribute__ -lxml.builder.ElementMaker.__getattr__ lxml.builder.ElementMaker-class.html#__getattr__ -lxml.builder.ElementMaker._makeelement lxml.builder.ElementMaker-class.html#_makeelement -lxml.builder.ElementMaker.__init__ lxml.builder.ElementMaker-class.html#__init__ -lxml.builder.ElementMaker.__call__ lxml.builder.ElementMaker-class.html#__call__ -lxml.builder.ElementMaker._nsmap lxml.builder.ElementMaker-class.html#_nsmap -lxml.cssselect.CSSSelector lxml.cssselect.CSSSelector-class.html -lxml.etree.XPath.__new__ lxml.etree.XPath-class.html#__new__ -lxml.etree._XPathEvaluatorBase.evaluate lxml.etree._XPathEvaluatorBase-class.html#evaluate -lxml.etree._XPathEvaluatorBase.error_log lxml.etree._XPathEvaluatorBase-class.html#error_log -lxml.cssselect.CSSSelector.__repr__ lxml.cssselect.CSSSelector-class.html#__repr__ -lxml.etree.XPath.__call__ lxml.etree.XPath-class.html#__call__ -lxml.etree.XPath.path lxml.etree.XPath-class.html#path -lxml.cssselect.CSSSelector.__init__ lxml.cssselect.CSSSelector-class.html#__init__ -lxml.cssselect.LxmlHTMLTranslator lxml.cssselect.LxmlHTMLTranslator-class.html -lxml.cssselect.LxmlTranslator.xpath_contains_function lxml.cssselect.LxmlTranslator-class.html#xpath_contains_function -cssselect.xpath.GenericTranslator.xpathexpr_cls cssselect.xpath.XPathExpr-class.html -lxml.cssselect.LxmlTranslator lxml.cssselect.LxmlTranslator-class.html -lxml.cssselect.LxmlTranslator.xpath_contains_function lxml.cssselect.LxmlTranslator-class.html#xpath_contains_function -cssselect.xpath.GenericTranslator.xpathexpr_cls cssselect.xpath.XPathExpr-class.html -lxml.doctestcompare.LHTMLOutputChecker lxml.doctestcompare.LHTMLOutputChecker-class.html -lxml.doctestcompare.LXMLOutputChecker.collect_diff_end_tag lxml.doctestcompare.LXMLOutputChecker-class.html#collect_diff_end_tag -lxml.doctestcompare.LXMLOutputChecker.text_compare lxml.doctestcompare.LXMLOutputChecker-class.html#text_compare -lxml.doctestcompare.LHTMLOutputChecker.get_default_parser lxml.doctestcompare.LHTMLOutputChecker-class.html#get_default_parser -lxml.doctestcompare.LXMLOutputChecker.collect_diff_tag lxml.doctestcompare.LXMLOutputChecker-class.html#collect_diff_tag -lxml.doctestcompare.LXMLOutputChecker.collect_diff_text lxml.doctestcompare.LXMLOutputChecker-class.html#collect_diff_text -lxml.doctestcompare.LXMLOutputChecker.get_parser lxml.doctestcompare.LXMLOutputChecker-class.html#get_parser -lxml.doctestcompare.LXMLOutputChecker.collect_diff lxml.doctestcompare.LXMLOutputChecker-class.html#collect_diff -lxml.doctestcompare.LXMLOutputChecker.html_empty_tag lxml.doctestcompare.LXMLOutputChecker-class.html#html_empty_tag -lxml.doctestcompare.LXMLOutputChecker._looks_like_markup lxml.doctestcompare.LXMLOutputChecker-class.html#_looks_like_markup -lxml.doctestcompare.LXMLOutputChecker.format_tag lxml.doctestcompare.LXMLOutputChecker-class.html#format_tag -lxml.doctestcompare.LXMLOutputChecker.check_output lxml.doctestcompare.LXMLOutputChecker-class.html#check_output -lxml.doctestcompare.LXMLOutputChecker.compare_docs lxml.doctestcompare.LXMLOutputChecker-class.html#compare_docs -lxml.doctestcompare.LXMLOutputChecker.format_doc lxml.doctestcompare.LXMLOutputChecker-class.html#format_doc -lxml.doctestcompare.LXMLOutputChecker.output_difference lxml.doctestcompare.LXMLOutputChecker-class.html#output_difference -lxml.doctestcompare.LXMLOutputChecker.format_end_tag lxml.doctestcompare.LXMLOutputChecker-class.html#format_end_tag -lxml.doctestcompare.LXMLOutputChecker.format_text lxml.doctestcompare.LXMLOutputChecker-class.html#format_text -lxml.doctestcompare.LXMLOutputChecker.empty_tags lxml.doctestcompare.LXMLOutputChecker-class.html#empty_tags -lxml.doctestcompare.LXMLOutputChecker.tag_compare lxml.doctestcompare.LXMLOutputChecker-class.html#tag_compare -lxml.doctestcompare.LXMLOutputChecker lxml.doctestcompare.LXMLOutputChecker-class.html -lxml.doctestcompare.LXMLOutputChecker.text_compare lxml.doctestcompare.LXMLOutputChecker-class.html#text_compare -lxml.doctestcompare.LXMLOutputChecker._looks_like_markup lxml.doctestcompare.LXMLOutputChecker-class.html#_looks_like_markup -lxml.doctestcompare.LXMLOutputChecker.empty_tags lxml.doctestcompare.LXMLOutputChecker-class.html#empty_tags -lxml.doctestcompare.LXMLOutputChecker.collect_diff_tag lxml.doctestcompare.LXMLOutputChecker-class.html#collect_diff_tag -lxml.doctestcompare.LXMLOutputChecker.compare_docs lxml.doctestcompare.LXMLOutputChecker-class.html#compare_docs -lxml.doctestcompare.LXMLOutputChecker.get_parser lxml.doctestcompare.LXMLOutputChecker-class.html#get_parser -lxml.doctestcompare.LXMLOutputChecker.html_empty_tag lxml.doctestcompare.LXMLOutputChecker-class.html#html_empty_tag -lxml.doctestcompare.LXMLOutputChecker.get_default_parser lxml.doctestcompare.LXMLOutputChecker-class.html#get_default_parser -lxml.doctestcompare.LXMLOutputChecker.format_tag lxml.doctestcompare.LXMLOutputChecker-class.html#format_tag -lxml.doctestcompare.LXMLOutputChecker.check_output lxml.doctestcompare.LXMLOutputChecker-class.html#check_output -lxml.doctestcompare.LXMLOutputChecker.collect_diff lxml.doctestcompare.LXMLOutputChecker-class.html#collect_diff -lxml.doctestcompare.LXMLOutputChecker.tag_compare lxml.doctestcompare.LXMLOutputChecker-class.html#tag_compare -lxml.doctestcompare.LXMLOutputChecker.format_doc lxml.doctestcompare.LXMLOutputChecker-class.html#format_doc -lxml.doctestcompare.LXMLOutputChecker.output_difference lxml.doctestcompare.LXMLOutputChecker-class.html#output_difference -lxml.doctestcompare.LXMLOutputChecker.format_end_tag lxml.doctestcompare.LXMLOutputChecker-class.html#format_end_tag -lxml.doctestcompare.LXMLOutputChecker.format_text lxml.doctestcompare.LXMLOutputChecker-class.html#format_text -lxml.doctestcompare.LXMLOutputChecker.collect_diff_end_tag lxml.doctestcompare.LXMLOutputChecker-class.html#collect_diff_end_tag -lxml.doctestcompare.LXMLOutputChecker.collect_diff_text lxml.doctestcompare.LXMLOutputChecker-class.html#collect_diff_text -lxml.doctestcompare._RestoreChecker lxml.doctestcompare._RestoreChecker-class.html -lxml.doctestcompare._RestoreChecker.uninstall_dt_self lxml.doctestcompare._RestoreChecker-class.html#uninstall_dt_self -lxml.doctestcompare._RestoreChecker.install_clone lxml.doctestcompare._RestoreChecker-class.html#install_clone -lxml.doctestcompare._RestoreChecker.uninstall_module lxml.doctestcompare._RestoreChecker-class.html#uninstall_module -lxml.doctestcompare._RestoreChecker.uninstall_clone lxml.doctestcompare._RestoreChecker-class.html#uninstall_clone -lxml.doctestcompare._RestoreChecker.install_dt_self lxml.doctestcompare._RestoreChecker-class.html#install_dt_self -lxml.doctestcompare._RestoreChecker.__call__ lxml.doctestcompare._RestoreChecker-class.html#__call__ -lxml.doctestcompare._RestoreChecker.call_super lxml.doctestcompare._RestoreChecker-class.html#call_super -lxml.doctestcompare._RestoreChecker.__init__ lxml.doctestcompare._RestoreChecker-class.html#__init__ -lxml.etree.AncestorsIterator lxml.etree.AncestorsIterator-class.html -lxml.etree.AncestorsIterator.__new__ lxml.etree.AncestorsIterator-class.html#__new__ -lxml.etree._ElementMatchIterator.__next__ lxml.etree._ElementMatchIterator-class.html#__next__ -lxml.etree._ElementMatchIterator.next lxml.etree._ElementMatchIterator-class.html#next -lxml.etree._ElementMatchIterator.__iter__ lxml.etree._ElementMatchIterator-class.html#__iter__ -lxml.etree.AttributeBasedElementClassLookup lxml.etree.AttributeBasedElementClassLookup-class.html -lxml.etree.AttributeBasedElementClassLookup.__new__ lxml.etree.AttributeBasedElementClassLookup-class.html#__new__ -lxml.etree.FallbackElementClassLookup.fallback lxml.etree.FallbackElementClassLookup-class.html#fallback -lxml.etree.FallbackElementClassLookup.set_fallback lxml.etree.FallbackElementClassLookup-class.html#set_fallback -lxml.etree.AttributeBasedElementClassLookup.__init__ lxml.etree.AttributeBasedElementClassLookup-class.html#__init__ -lxml.etree.C14NError lxml.etree.C14NError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.C14NError.__new__ lxml.etree.C14NError-class.html#__new__ -lxml.etree.CDATA lxml.etree.CDATA-class.html -lxml.etree.CDATA.__new__ lxml.etree.CDATA-class.html#__new__ -lxml.etree.CommentBase lxml.etree.CommentBase-class.html -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.etree._Element._init lxml.etree._Element-class.html#_init -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.etree._Comment.tag lxml.etree._Comment-class.html#tag -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.etree.CommentBase.__new__ lxml.etree.CommentBase-class.html#__new__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.etree._Element.getchildren lxml.etree._Element-class.html#getchildren -lxml.etree.CommentBase.__init__ lxml.etree.CommentBase-class.html#__init__ -lxml.etree._Element.cssselect lxml.etree._Element-class.html#cssselect -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.etree._Element.__nonzero__ lxml.etree._Element-class.html#__nonzero__ -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.etree._Element.__iter__ lxml.etree._Element-class.html#__iter__ -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.etree._Comment.__repr__ lxml.etree._Comment-class.html#__repr__ -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.etree.CustomElementClassLookup lxml.etree.CustomElementClassLookup-class.html -lxml.etree.CustomElementClassLookup.__new__ lxml.etree.CustomElementClassLookup-class.html#__new__ -lxml.etree.CustomElementClassLookup.lookup lxml.etree.CustomElementClassLookup-class.html#lookup -lxml.etree.FallbackElementClassLookup.fallback lxml.etree.FallbackElementClassLookup-class.html#fallback -lxml.etree.FallbackElementClassLookup.set_fallback lxml.etree.FallbackElementClassLookup-class.html#set_fallback -lxml.etree.FallbackElementClassLookup.__init__ lxml.etree.FallbackElementClassLookup-class.html#__init__ -lxml.etree.DTD lxml.etree.DTD-class.html -lxml.etree._Validator._append_log_message lxml.etree._Validator-class.html#_append_log_message -lxml.etree.DTD.iterelements lxml.etree.DTD-class.html#iterelements -lxml.etree.DTD.system_url lxml.etree.DTD-class.html#system_url -lxml.etree._Validator.validate lxml.etree._Validator-class.html#validate -lxml.etree.DTD.__init__ lxml.etree.DTD-class.html#__init__ -lxml.etree.DTD.__new__ lxml.etree.DTD-class.html#__new__ -lxml.etree._Validator._clear_error_log lxml.etree._Validator-class.html#_clear_error_log -lxml.etree.DTD.iterentities lxml.etree.DTD-class.html#iterentities -lxml.etree.DTD.entities lxml.etree.DTD-class.html#entities -lxml.etree.DTD.__call__ lxml.etree.DTD-class.html#__call__ -lxml.etree.DTD.elements lxml.etree.DTD-class.html#elements -lxml.etree._Validator.assert_ lxml.etree._Validator-class.html#assert_ -lxml.etree.DTD.name lxml.etree.DTD-class.html#name -lxml.etree._Validator.assertValid lxml.etree._Validator-class.html#assertValid -lxml.etree._Validator.error_log lxml.etree._Validator-class.html#error_log -lxml.etree.DTD.external_id lxml.etree.DTD-class.html#external_id -lxml.etree.DTDError lxml.etree.DTDError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.DTDError.__new__ lxml.etree.DTDError-class.html#__new__ -lxml.etree.DTDParseError lxml.etree.DTDParseError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.DTDParseError.__new__ lxml.etree.DTDParseError-class.html#__new__ -lxml.etree.DTDValidateError lxml.etree.DTDValidateError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.DTDValidateError.__new__ lxml.etree.DTDValidateError-class.html#__new__ -lxml.etree.DocInfo lxml.etree.DocInfo-class.html -lxml.etree.DocInfo.xml_version lxml.etree.DocInfo-class.html#xml_version -lxml.etree.DocInfo.public_id lxml.etree.DocInfo-class.html#public_id -lxml.etree.DocInfo.encoding lxml.etree.DocInfo-class.html#encoding -lxml.etree.DocInfo.externalDTD lxml.etree.DocInfo-class.html#externalDTD -lxml.etree.DocInfo.system_url lxml.etree.DocInfo-class.html#system_url -lxml.etree.DocInfo.__new__ lxml.etree.DocInfo-class.html#__new__ -lxml.etree.DocInfo.internalDTD lxml.etree.DocInfo-class.html#internalDTD -lxml.etree.DocInfo.URL lxml.etree.DocInfo-class.html#URL -lxml.etree.DocInfo.standalone lxml.etree.DocInfo-class.html#standalone -lxml.etree.DocInfo.clear lxml.etree.DocInfo-class.html#clear -lxml.etree.DocInfo.root_name lxml.etree.DocInfo-class.html#root_name -lxml.etree.DocInfo.doctype lxml.etree.DocInfo-class.html#doctype -lxml.etree.DocumentInvalid lxml.etree.DocumentInvalid-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.DocumentInvalid.__new__ lxml.etree.DocumentInvalid-class.html#__new__ -lxml.etree.ETCompatXMLParser lxml.etree.ETCompatXMLParser-class.html -lxml.etree._FeedParser.feed lxml.etree._FeedParser-class.html#feed -lxml.etree._FeedParser.close lxml.etree._FeedParser-class.html#close -lxml.etree.ETCompatXMLParser.__init__ lxml.etree.ETCompatXMLParser-class.html#__init__ -lxml.etree.ETCompatXMLParser.__new__ lxml.etree.ETCompatXMLParser-class.html#__new__ -lxml.etree._FeedParser.feed_error_log lxml.etree._FeedParser-class.html#feed_error_log -lxml.etree.ETXPath lxml.etree.ETXPath-class.html -lxml.etree.ETXPath.__new__ lxml.etree.ETXPath-class.html#__new__ -lxml.etree._XPathEvaluatorBase.evaluate lxml.etree._XPathEvaluatorBase-class.html#evaluate -lxml.etree._XPathEvaluatorBase.error_log lxml.etree._XPathEvaluatorBase-class.html#error_log -lxml.etree.XPath.__repr__ lxml.etree.XPath-class.html#__repr__ -lxml.etree.XPath.__call__ lxml.etree.XPath-class.html#__call__ -lxml.etree.XPath.path lxml.etree.XPath-class.html#path -lxml.etree.ETXPath.__init__ lxml.etree.ETXPath-class.html#__init__ -lxml.etree.ElementBase lxml.etree.ElementBase-class.html -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.etree._Element.set lxml.etree._Element-class.html#set -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.etree._Element.text lxml.etree._Element-class.html#text -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.etree._Element._init lxml.etree._Element-class.html#_init -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.etree._Element.tag lxml.etree._Element-class.html#tag -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.etree._Element.append lxml.etree._Element-class.html#append -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.etree.ElementBase.__new__ lxml.etree.ElementBase-class.html#__new__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.etree._Element.getchildren lxml.etree._Element-class.html#getchildren -lxml.etree.ElementBase.__init__ lxml.etree.ElementBase-class.html#__init__ -lxml.etree._Element.cssselect lxml.etree._Element-class.html#cssselect -lxml.etree._Element.__len__ lxml.etree._Element-class.html#__len__ -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.etree._Element.__getitem__ lxml.etree._Element-class.html#__getitem__ -lxml.etree._Element.get lxml.etree._Element-class.html#get -lxml.etree._Element.keys lxml.etree._Element-class.html#keys -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.etree._Element.__iter__ lxml.etree._Element-class.html#__iter__ -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.etree._Element.insert lxml.etree._Element-class.html#insert -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.etree._Element.__delitem__ lxml.etree._Element-class.html#__delitem__ -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.etree._Element.__nonzero__ lxml.etree._Element-class.html#__nonzero__ -lxml.etree._Element.items lxml.etree._Element-class.html#items -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.etree._Element.__setitem__ lxml.etree._Element-class.html#__setitem__ -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.etree._Element.values lxml.etree._Element-class.html#values -lxml.etree._Element.__repr__ lxml.etree._Element-class.html#__repr__ -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.etree._Element.attrib lxml.etree._Element-class.html#attrib -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.etree.ElementChildIterator lxml.etree.ElementChildIterator-class.html -lxml.etree.ElementChildIterator.__new__ lxml.etree.ElementChildIterator-class.html#__new__ -lxml.etree._ElementMatchIterator.__next__ lxml.etree._ElementMatchIterator-class.html#__next__ -lxml.etree._ElementMatchIterator.next lxml.etree._ElementMatchIterator-class.html#next -lxml.etree._ElementMatchIterator.__iter__ lxml.etree._ElementMatchIterator-class.html#__iter__ -lxml.etree.ElementClassLookup lxml.etree.ElementClassLookup-class.html -lxml.etree.ElementClassLookup.__new__ lxml.etree.ElementClassLookup-class.html#__new__ -lxml.etree.ElementDefaultClassLookup lxml.etree.ElementDefaultClassLookup-class.html -lxml.etree.ElementDefaultClassLookup.entity_class lxml.etree.ElementDefaultClassLookup-class.html#entity_class -lxml.etree.ElementDefaultClassLookup.__new__ lxml.etree.ElementDefaultClassLookup-class.html#__new__ -lxml.etree.ElementDefaultClassLookup.element_class lxml.etree.ElementDefaultClassLookup-class.html#element_class -lxml.etree.ElementDefaultClassLookup.pi_class lxml.etree.ElementDefaultClassLookup-class.html#pi_class -lxml.etree.ElementDefaultClassLookup.comment_class lxml.etree.ElementDefaultClassLookup-class.html#comment_class -lxml.etree.ElementDefaultClassLookup.__init__ lxml.etree.ElementDefaultClassLookup-class.html#__init__ -lxml.etree.ElementDepthFirstIterator lxml.etree.ElementDepthFirstIterator-class.html -lxml.etree.ElementDepthFirstIterator.__new__ lxml.etree.ElementDepthFirstIterator-class.html#__new__ -lxml.etree.ElementDepthFirstIterator.__next__ lxml.etree.ElementDepthFirstIterator-class.html#__next__ -lxml.etree.ElementDepthFirstIterator.next lxml.etree.ElementDepthFirstIterator-class.html#next -lxml.etree.ElementDepthFirstIterator.__iter__ lxml.etree.ElementDepthFirstIterator-class.html#__iter__ -lxml.etree.ElementNamespaceClassLookup lxml.etree.ElementNamespaceClassLookup-class.html -lxml.etree.ElementNamespaceClassLookup.__new__ lxml.etree.ElementNamespaceClassLookup-class.html#__new__ -lxml.etree.ElementNamespaceClassLookup.get_namespace lxml.etree.ElementNamespaceClassLookup-class.html#get_namespace -lxml.etree.FallbackElementClassLookup.fallback lxml.etree.FallbackElementClassLookup-class.html#fallback -lxml.etree.FallbackElementClassLookup.set_fallback lxml.etree.FallbackElementClassLookup-class.html#set_fallback -lxml.etree.ElementNamespaceClassLookup.__init__ lxml.etree.ElementNamespaceClassLookup-class.html#__init__ -lxml.etree.ElementTextIterator lxml.etree.ElementTextIterator-class.html -lxml.etree.ElementTextIterator.__new__ lxml.etree.ElementTextIterator-class.html#__new__ -lxml.etree.ElementTextIterator.__next__ lxml.etree.ElementTextIterator-class.html#__next__ -lxml.etree.ElementTextIterator.next lxml.etree.ElementTextIterator-class.html#next -lxml.etree.ElementTextIterator.__iter__ lxml.etree.ElementTextIterator-class.html#__iter__ -lxml.etree.EntityBase lxml.etree.EntityBase-class.html -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.etree._Entity.text lxml.etree._Entity-class.html#text -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.etree._Element._init lxml.etree._Element-class.html#_init -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.etree._Entity.tag lxml.etree._Entity-class.html#tag -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.etree.EntityBase.__new__ lxml.etree.EntityBase-class.html#__new__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.etree._Element.getchildren lxml.etree._Element-class.html#getchildren -lxml.etree.EntityBase.__init__ lxml.etree.EntityBase-class.html#__init__ -lxml.etree._Element.cssselect lxml.etree._Element-class.html#cssselect -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.etree._Element.__nonzero__ lxml.etree._Element-class.html#__nonzero__ -lxml.etree._Entity.name lxml.etree._Entity-class.html#name -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.etree._Element.__iter__ lxml.etree._Element-class.html#__iter__ -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.etree._Entity.__repr__ lxml.etree._Entity-class.html#__repr__ -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.etree.Error lxml.etree.Error-class.html -lxml.etree.Error.__new__ lxml.etree.Error-class.html#__new__ -lxml.etree.ErrorDomains lxml.etree.ErrorDomains-class.html -lxml.etree.ErrorDomains.HTTP lxml.etree.ErrorDomains-class.html#HTTP -lxml.etree.ErrorDomains.SCHEMATRONV lxml.etree.ErrorDomains-class.html#SCHEMATRONV -lxml.etree.ErrorDomains.DTD lxml.etree.ErrorDomains-class.html#DTD -lxml.etree.ErrorDomains.VALID lxml.etree.ErrorDomains-class.html#VALID -lxml.etree.ErrorDomains.I18N lxml.etree.ErrorDomains-class.html#I18N -lxml.etree.ErrorDomains.XINCLUDE lxml.etree.ErrorDomains-class.html#XINCLUDE -lxml.etree.ErrorDomains.C14N lxml.etree.ErrorDomains-class.html#C14N -lxml.etree.ErrorDomains.__qualname__ lxml.etree.ErrorDomains-class.html#__qualname__ -lxml.etree.ErrorDomains.NONE lxml.etree.ErrorDomains-class.html#NONE -lxml.etree.ErrorDomains.DATATYPE lxml.etree.ErrorDomains-class.html#DATATYPE -lxml.etree.ErrorDomains._getName lxml.etree.ErrorDomains-class.html#_getName -lxml.etree.ErrorDomains.HTML lxml.etree.ErrorDomains-class.html#HTML -lxml.etree.ErrorDomains.CHECK lxml.etree.ErrorDomains-class.html#CHECK -lxml.etree.ErrorDomains.FTP lxml.etree.ErrorDomains-class.html#FTP -lxml.etree.ErrorDomains._names lxml.etree.ErrorDomains-class.html#_names -lxml.etree.ErrorDomains.XSLT lxml.etree.ErrorDomains-class.html#XSLT -lxml.etree.ErrorDomains.BUFFER lxml.etree.ErrorDomains-class.html#BUFFER -lxml.etree.ErrorDomains.PARSER lxml.etree.ErrorDomains-class.html#PARSER -lxml.etree.ErrorDomains.NAMESPACE lxml.etree.ErrorDomains-class.html#NAMESPACE -lxml.etree.ErrorDomains.URI lxml.etree.ErrorDomains-class.html#URI -lxml.etree.ErrorDomains.MODULE lxml.etree.ErrorDomains-class.html#MODULE -lxml.etree.ErrorDomains.IO lxml.etree.ErrorDomains-class.html#IO -lxml.etree.ErrorDomains.REGEXP lxml.etree.ErrorDomains-class.html#REGEXP -lxml.etree.ErrorDomains.XPATH lxml.etree.ErrorDomains-class.html#XPATH -lxml.etree.ErrorDomains.RELAXNGV lxml.etree.ErrorDomains-class.html#RELAXNGV -lxml.etree.ErrorDomains.RELAXNGP lxml.etree.ErrorDomains-class.html#RELAXNGP -lxml.etree.ErrorDomains.WRITER lxml.etree.ErrorDomains-class.html#WRITER -lxml.etree.ErrorDomains.TREE lxml.etree.ErrorDomains-class.html#TREE -lxml.etree.ErrorDomains.SCHEMASP lxml.etree.ErrorDomains-class.html#SCHEMASP -lxml.etree.ErrorDomains.CATALOG lxml.etree.ErrorDomains-class.html#CATALOG -lxml.etree.ErrorDomains.SCHEMASV lxml.etree.ErrorDomains-class.html#SCHEMASV -lxml.etree.ErrorDomains.MEMORY lxml.etree.ErrorDomains-class.html#MEMORY -lxml.etree.ErrorDomains.OUTPUT lxml.etree.ErrorDomains-class.html#OUTPUT -lxml.etree.ErrorDomains.XPOINTER lxml.etree.ErrorDomains-class.html#XPOINTER -lxml.etree.ErrorLevels lxml.etree.ErrorLevels-class.html -lxml.etree.ErrorLevels.NONE lxml.etree.ErrorLevels-class.html#NONE -lxml.etree.ErrorLevels._names lxml.etree.ErrorLevels-class.html#_names -lxml.etree.ErrorLevels.__qualname__ lxml.etree.ErrorLevels-class.html#__qualname__ -lxml.etree.ErrorLevels.WARNING lxml.etree.ErrorLevels-class.html#WARNING -lxml.etree.ErrorLevels.ERROR lxml.etree.ErrorLevels-class.html#ERROR -lxml.etree.ErrorLevels.FATAL lxml.etree.ErrorLevels-class.html#FATAL -lxml.etree.ErrorLevels._getName lxml.etree.ErrorLevels-class.html#_getName -lxml.etree.ErrorTypes lxml.etree.ErrorTypes-class.html -lxml.etree.ErrorTypes.I18N_CONV_FAILED lxml.etree.ErrorTypes-class.html#I18N_CONV_FAILED -lxml.etree.ErrorTypes.SCHEMAP_ATTRFORMDEFAULT_VALUE lxml.etree.ErrorTypes-class.html#SCHEMAP_ATTRFORMDEFAULT_VALUE -lxml.etree.ErrorTypes.SCHEMAP_REDEFINED_NOTATION lxml.etree.ErrorTypes-class.html#SCHEMAP_REDEFINED_NOTATION -lxml.etree.ErrorTypes.RNGP_EXCEPT_MULTIPLE lxml.etree.ErrorTypes-class.html#RNGP_EXCEPT_MULTIPLE -lxml.etree.ErrorTypes.SCHEMAP_AU_PROPS_CORRECT_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_AU_PROPS_CORRECT_2 -lxml.etree.ErrorTypes.IO_EINVAL lxml.etree.ErrorTypes-class.html#IO_EINVAL -lxml.etree.ErrorTypes.ERR_VERSION_MISMATCH lxml.etree.ErrorTypes-class.html#ERR_VERSION_MISMATCH -lxml.etree.ErrorTypes.ERR_ELEMCONTENT_NOT_STARTED lxml.etree.ErrorTypes-class.html#ERR_ELEMCONTENT_NOT_STARTED -lxml.etree.ErrorTypes.SCHEMAP_TYPE_AND_SUBTYPE lxml.etree.ErrorTypes-class.html#SCHEMAP_TYPE_AND_SUBTYPE -lxml.etree.ErrorTypes.FTP_URL_SYNTAX lxml.etree.ErrorTypes-class.html#FTP_URL_SYNTAX -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP -lxml.etree.ErrorTypes.SCHEMAP_INVALID_ATTR_USE lxml.etree.ErrorTypes-class.html#SCHEMAP_INVALID_ATTR_USE -lxml.etree.ErrorTypes.CHECK_WRONG_PREV lxml.etree.ErrorTypes-class.html#CHECK_WRONG_PREV -lxml.etree.ErrorTypes.CHECK_NS_SCOPE lxml.etree.ErrorTypes-class.html#CHECK_NS_SCOPE -lxml.etree.ErrorTypes.CHECK_NOT_NS_DECL lxml.etree.ErrorTypes-class.html#CHECK_NOT_NS_DECL -lxml.etree.ErrorTypes.XINCLUDE_XPTR_RESULT lxml.etree.ErrorTypes-class.html#XINCLUDE_XPTR_RESULT -lxml.etree.ErrorTypes.ERR_PEREF_IN_EPILOG lxml.etree.ErrorTypes-class.html#ERR_PEREF_IN_EPILOG -lxml.etree.ErrorTypes.IO_EMLINK lxml.etree.ErrorTypes-class.html#IO_EMLINK -lxml.etree.ErrorTypes.RNGP_PARAM_NAME_MISSING lxml.etree.ErrorTypes-class.html#RNGP_PARAM_NAME_MISSING -lxml.etree.ErrorTypes.WAR_NS_URI_RELATIVE lxml.etree.ErrorTypes-class.html#WAR_NS_URI_RELATIVE -lxml.etree.ErrorTypes.SCHEMAP_SRC_ELEMENT_2_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_ELEMENT_2_2 -lxml.etree.ErrorTypes.IO_ENFILE lxml.etree.ErrorTypes-class.html#IO_ENFILE -lxml.etree.ErrorTypes.SCHEMATRONV_ASSERT lxml.etree.ErrorTypes-class.html#SCHEMATRONV_ASSERT -lxml.etree.ErrorTypes.FTP_ACCNT lxml.etree.ErrorTypes-class.html#FTP_ACCNT -lxml.etree.ErrorTypes.RNGP_PAT_START_GROUP lxml.etree.ErrorTypes-class.html#RNGP_PAT_START_GROUP -lxml.etree.ErrorTypes.SCHEMAV_MISSING lxml.etree.ErrorTypes-class.html#SCHEMAV_MISSING -lxml.etree.ErrorTypes.MODULE_OPEN lxml.etree.ErrorTypes-class.html#MODULE_OPEN -lxml.etree.ErrorTypes.XPATH_INVALID_OPERAND lxml.etree.ErrorTypes-class.html#XPATH_INVALID_OPERAND -lxml.etree.ErrorTypes.CHECK_FOUND_NOTATION lxml.etree.ErrorTypes-class.html#CHECK_FOUND_NOTATION -lxml.etree.ErrorTypes.SCHEMAP_SRC_IMPORT_1_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_IMPORT_1_1 -lxml.etree.ErrorTypes.ERR_UNPARSED_ENTITY lxml.etree.ErrorTypes-class.html#ERR_UNPARSED_ENTITY -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_NOTATION_CHILD lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_NOTATION_CHILD -lxml.etree.ErrorTypes.CHECK_OUTSIDE_DICT lxml.etree.ErrorTypes-class.html#CHECK_OUTSIDE_DICT -lxml.etree.ErrorTypes.SCHEMAV_NOTEMPTY lxml.etree.ErrorTypes-class.html#SCHEMAV_NOTEMPTY -lxml.etree.ErrorTypes.RNGP_PAT_DATA_EXCEPT_GROUP lxml.etree.ErrorTypes-class.html#RNGP_PAT_DATA_EXCEPT_GROUP -lxml.etree.ErrorTypes.ERR_PEREF_SEMICOL_MISSING lxml.etree.ErrorTypes-class.html#ERR_PEREF_SEMICOL_MISSING -lxml.etree.ErrorTypes.DTD_LOAD_ERROR lxml.etree.ErrorTypes-class.html#DTD_LOAD_ERROR -lxml.etree.ErrorTypes.__qualname__ lxml.etree.ErrorTypes-class.html#__qualname__ -lxml.etree.ErrorTypes.SCHEMAP_INVALID_BOOLEAN lxml.etree.ErrorTypes-class.html#SCHEMAP_INVALID_BOOLEAN -lxml.etree.ErrorTypes.DTD_NOT_STANDALONE lxml.etree.ErrorTypes-class.html#DTD_NOT_STANDALONE -lxml.etree.ErrorTypes.SCHEMAP_ST_PROPS_CORRECT_3 lxml.etree.ErrorTypes-class.html#SCHEMAP_ST_PROPS_CORRECT_3 -lxml.etree.ErrorTypes.SCHEMAV_CVC_ATTRIBUTE_1 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_ATTRIBUTE_1 -lxml.etree.ErrorTypes.SCHEMAV_CVC_ATTRIBUTE_3 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_ATTRIBUTE_3 -lxml.etree.ErrorTypes.SCHEMAV_CVC_ATTRIBUTE_2 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_ATTRIBUTE_2 -lxml.etree.ErrorTypes.SCHEMAV_CVC_ATTRIBUTE_4 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_ATTRIBUTE_4 -lxml.etree.ErrorTypes.C14N_INVALID_NODE lxml.etree.ErrorTypes-class.html#C14N_INVALID_NODE -lxml.etree.ErrorTypes.XPATH_START_LITERAL_ERROR lxml.etree.ErrorTypes-class.html#XPATH_START_LITERAL_ERROR -lxml.etree.ErrorTypes.RNGP_TEXT_HAS_CHILD lxml.etree.ErrorTypes-class.html#RNGP_TEXT_HAS_CHILD -lxml.etree.ErrorTypes.SCHEMAV_CVC_WILDCARD lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_WILDCARD -lxml.etree.ErrorTypes.XPATH_UNDEF_VARIABLE_ERROR lxml.etree.ErrorTypes-class.html#XPATH_UNDEF_VARIABLE_ERROR -lxml.etree.ErrorTypes.SCHEMAP_S4S_ATTR_MISSING lxml.etree.ErrorTypes-class.html#SCHEMAP_S4S_ATTR_MISSING -lxml.etree.ErrorTypes.SCHEMAP_INTERNAL lxml.etree.ErrorTypes-class.html#SCHEMAP_INTERNAL -lxml.etree.ErrorTypes.RNGP_EXCEPT_MISSING lxml.etree.ErrorTypes-class.html#RNGP_EXCEPT_MISSING -lxml.etree.ErrorTypes.TREE_INVALID_HEX lxml.etree.ErrorTypes-class.html#TREE_INVALID_HEX -lxml.etree.ErrorTypes.RNGP_DEFINE_CREATE_FAILED lxml.etree.ErrorTypes-class.html#RNGP_DEFINE_CREATE_FAILED -lxml.etree.ErrorTypes.XPATH_ENCODING_ERROR lxml.etree.ErrorTypes-class.html#XPATH_ENCODING_ERROR -lxml.etree.ErrorTypes.SCHEMAV_CVC_IDC lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_IDC -lxml.etree.ErrorTypes.CHECK_NO_ELEM lxml.etree.ErrorTypes-class.html#CHECK_NO_ELEM -lxml.etree.ErrorTypes.IO_EXDEV lxml.etree.ErrorTypes-class.html#IO_EXDEV -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_TYPE lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_TYPE -lxml.etree.ErrorTypes.ERR_LT_IN_ATTRIBUTE lxml.etree.ErrorTypes-class.html#ERR_LT_IN_ATTRIBUTE -lxml.etree.ErrorTypes.SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE lxml.etree.ErrorTypes-class.html#SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE -lxml.etree.ErrorTypes.IO_EMFILE lxml.etree.ErrorTypes-class.html#IO_EMFILE -lxml.etree.ErrorTypes.SCHEMAV_CVC_ELT_3_2_2 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_ELT_3_2_2 -lxml.etree.ErrorTypes.SCHEMAV_CVC_ELT_3_2_1 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_ELT_3_2_1 -lxml.etree.ErrorTypes.XINCLUDE_XPTR_FAILED lxml.etree.ErrorTypes-class.html#XINCLUDE_XPTR_FAILED -lxml.etree.ErrorTypes.ERR_MISPLACED_CDATA_END lxml.etree.ErrorTypes-class.html#ERR_MISPLACED_CDATA_END -lxml.etree.ErrorTypes.RNGP_ELEMENT_NO_CONTENT lxml.etree.ErrorTypes-class.html#RNGP_ELEMENT_NO_CONTENT -lxml.etree.ErrorTypes.IO_ENOENT lxml.etree.ErrorTypes-class.html#IO_ENOENT -lxml.etree.ErrorTypes.RNGP_ATTRIBUTE_NOOP lxml.etree.ErrorTypes-class.html#RNGP_ATTRIBUTE_NOOP -lxml.etree.ErrorTypes.SCHEMAP_SRC_REDEFINE lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_REDEFINE -lxml.etree.ErrorTypes.ERR_CHARREF_IN_PROLOG lxml.etree.ErrorTypes-class.html#ERR_CHARREF_IN_PROLOG -lxml.etree.ErrorTypes.RNGP_REF_NAME_INVALID lxml.etree.ErrorTypes-class.html#RNGP_REF_NAME_INVALID -lxml.etree.ErrorTypes.ERR_NOTATION_PROCESSING lxml.etree.ErrorTypes-class.html#ERR_NOTATION_PROCESSING -lxml.etree.ErrorTypes.RNGP_INCLUDE_EMPTY lxml.etree.ErrorTypes-class.html#RNGP_INCLUDE_EMPTY -lxml.etree.ErrorTypes.RNGP_INCLUDE_RECURSE lxml.etree.ErrorTypes-class.html#RNGP_INCLUDE_RECURSE -lxml.etree.ErrorTypes.SCHEMAP_ELEM_NONAME_NOREF lxml.etree.ErrorTypes-class.html#SCHEMAP_ELEM_NONAME_NOREF -lxml.etree.ErrorTypes.RNGP_EMPTY_CONTENT lxml.etree.ErrorTypes-class.html#RNGP_EMPTY_CONTENT -lxml.etree.ErrorTypes.XPTR_EVAL_FAILED lxml.etree.ErrorTypes-class.html#XPTR_EVAL_FAILED -lxml.etree.ErrorTypes.SCHEMAV_CVC_COMPLEX_TYPE_2_1 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_COMPLEX_TYPE_2_1 -lxml.etree.ErrorTypes.XPATH_INVALID_CTXT_POSITION lxml.etree.ErrorTypes-class.html#XPATH_INVALID_CTXT_POSITION -lxml.etree.ErrorTypes.SCHEMAV_CVC_COMPLEX_TYPE_2_3 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_COMPLEX_TYPE_2_3 -lxml.etree.ErrorTypes.SCHEMAV_CVC_COMPLEX_TYPE_2_4 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_COMPLEX_TYPE_2_4 -lxml.etree.ErrorTypes.ERR_INTERNAL_ERROR lxml.etree.ErrorTypes-class.html#ERR_INTERNAL_ERROR -lxml.etree.ErrorTypes.ERR_DOCTYPE_NOT_FINISHED lxml.etree.ErrorTypes-class.html#ERR_DOCTYPE_NOT_FINISHED -lxml.etree.ErrorTypes.RNGP_PAT_NSNAME_EXCEPT_ANYNAME lxml.etree.ErrorTypes-class.html#RNGP_PAT_NSNAME_EXCEPT_ANYNAME -lxml.etree.ErrorTypes.RNGP_EMPTY_NOT_EMPTY lxml.etree.ErrorTypes-class.html#RNGP_EMPTY_NOT_EMPTY -lxml.etree.ErrorTypes.SCHEMAP_NO_XMLNS lxml.etree.ErrorTypes-class.html#SCHEMAP_NO_XMLNS -lxml.etree.ErrorTypes.RNGP_PAT_LIST_ATTR lxml.etree.ErrorTypes-class.html#RNGP_PAT_LIST_ATTR -lxml.etree.ErrorTypes.ERR_NO_DTD lxml.etree.ErrorTypes-class.html#ERR_NO_DTD -lxml.etree.ErrorTypes.ERR_ENTITY_LOOP lxml.etree.ErrorTypes-class.html#ERR_ENTITY_LOOP -lxml.etree.ErrorTypes.IO_EINTR lxml.etree.ErrorTypes-class.html#IO_EINTR -lxml.etree.ErrorTypes.ERR_MISSING_ENCODING lxml.etree.ErrorTypes-class.html#ERR_MISSING_ENCODING -lxml.etree.ErrorTypes.DTD_STANDALONE_WHITE_SPACE lxml.etree.ErrorTypes-class.html#DTD_STANDALONE_WHITE_SPACE -lxml.etree.ErrorTypes.DTD_ENTITY_TYPE lxml.etree.ErrorTypes-class.html#DTD_ENTITY_TYPE -lxml.etree.ErrorTypes.IO_ENOTEMPTY lxml.etree.ErrorTypes-class.html#IO_ENOTEMPTY -lxml.etree.ErrorTypes.RNGP_REF_NO_NAME lxml.etree.ErrorTypes-class.html#RNGP_REF_NO_NAME -lxml.etree.ErrorTypes.XINCLUDE_MULTIPLE_ROOT lxml.etree.ErrorTypes-class.html#XINCLUDE_MULTIPLE_ROOT -lxml.etree.ErrorTypes.SCHEMAV_NOTYPE lxml.etree.ErrorTypes-class.html#SCHEMAV_NOTYPE -lxml.etree.ErrorTypes.RNGP_ELEMENT_EMPTY lxml.etree.ErrorTypes-class.html#RNGP_ELEMENT_EMPTY -lxml.etree.ErrorTypes.IO_ECANCELED lxml.etree.ErrorTypes-class.html#IO_ECANCELED -lxml.etree.ErrorTypes.RNGP_EXCEPT_NO_CONTENT lxml.etree.ErrorTypes-class.html#RNGP_EXCEPT_NO_CONTENT -lxml.etree.ErrorTypes.WAR_NS_COLUMN lxml.etree.ErrorTypes-class.html#WAR_NS_COLUMN -lxml.etree.ErrorTypes.IO_ENOTSOCK lxml.etree.ErrorTypes-class.html#IO_ENOTSOCK -lxml.etree.ErrorTypes.SCHEMAP_COS_ST_DERIVED_OK_2_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_ST_DERIVED_OK_2_1 -lxml.etree.ErrorTypes.ERR_URI_FRAGMENT lxml.etree.ErrorTypes-class.html#ERR_URI_FRAGMENT -lxml.etree.ErrorTypes.SCHEMAV_NOTNILLABLE lxml.etree.ErrorTypes-class.html#SCHEMAV_NOTNILLABLE -lxml.etree.ErrorTypes.RNGP_PAT_LIST_TEXT lxml.etree.ErrorTypes-class.html#RNGP_PAT_LIST_TEXT -lxml.etree.ErrorTypes.SCHEMAV_UNDECLAREDELEM lxml.etree.ErrorTypes-class.html#SCHEMAV_UNDECLAREDELEM -lxml.etree.ErrorTypes.SCHEMAP_AG_PROPS_CORRECT lxml.etree.ErrorTypes-class.html#SCHEMAP_AG_PROPS_CORRECT -lxml.etree.ErrorTypes.IO_ENOMEM lxml.etree.ErrorTypes-class.html#IO_ENOMEM -lxml.etree.ErrorTypes.ERR_NOTATION_NOT_STARTED lxml.etree.ErrorTypes-class.html#ERR_NOTATION_NOT_STARTED -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_ELEM_CHILD lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_ELEM_CHILD -lxml.etree.ErrorTypes.SCHEMAV_CVC_ELT_4_1 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_ELT_4_1 -lxml.etree.ErrorTypes.SCHEMAV_CVC_ELT_4_3 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_ELT_4_3 -lxml.etree.ErrorTypes.DTD_NO_DOC lxml.etree.ErrorTypes-class.html#DTD_NO_DOC -lxml.etree.ErrorTypes.RNGP_TYPE_NOT_FOUND lxml.etree.ErrorTypes-class.html#RNGP_TYPE_NOT_FOUND -lxml.etree.ErrorTypes.RNGP_EXTERNALREF_RECURSE lxml.etree.ErrorTypes-class.html#RNGP_EXTERNALREF_RECURSE -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_ATTRGRP_CHILD lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_ATTRGRP_CHILD -lxml.etree.ErrorTypes.IO_EACCES lxml.etree.ErrorTypes-class.html#IO_EACCES -lxml.etree.ErrorTypes._names lxml.etree.ErrorTypes-class.html#_names -lxml.etree.ErrorTypes.SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES -lxml.etree.ErrorTypes.ERR_RESERVED_XML_NAME lxml.etree.ErrorTypes-class.html#ERR_RESERVED_XML_NAME -lxml.etree.ErrorTypes.RNGP_TEXT_EXPECTED lxml.etree.ErrorTypes-class.html#RNGP_TEXT_EXPECTED -lxml.etree.ErrorTypes.RNGP_CHOICE_EMPTY lxml.etree.ErrorTypes-class.html#RNGP_CHOICE_EMPTY -lxml.etree.ErrorTypes.ERR_TAG_NOT_FINISHED lxml.etree.ErrorTypes-class.html#ERR_TAG_NOT_FINISHED -lxml.etree.ErrorTypes.CHECK_FOUND_TEXT lxml.etree.ErrorTypes-class.html#CHECK_FOUND_TEXT -lxml.etree.ErrorTypes.RNGP_PARENTREF_NO_NAME lxml.etree.ErrorTypes-class.html#RNGP_PARENTREF_NO_NAME -lxml.etree.ErrorTypes.RNGP_PAT_ONEMORE_GROUP_ATTR lxml.etree.ErrorTypes-class.html#RNGP_PAT_ONEMORE_GROUP_ATTR -lxml.etree.ErrorTypes.SCHEMAV_CVC_ENUMERATION_VALID lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_ENUMERATION_VALID -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_RESTRICTION_CHILD lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_RESTRICTION_CHILD -lxml.etree.ErrorTypes.DTD_ELEM_REDEFINED lxml.etree.ErrorTypes-class.html#DTD_ELEM_REDEFINED -lxml.etree.ErrorTypes.RNGP_MISSING_HREF lxml.etree.ErrorTypes-class.html#RNGP_MISSING_HREF -lxml.etree.ErrorTypes.IO_ERANGE lxml.etree.ErrorTypes-class.html#IO_ERANGE -lxml.etree.ErrorTypes.HTTP_UNKNOWN_HOST lxml.etree.ErrorTypes-class.html#HTTP_UNKNOWN_HOST -lxml.etree.ErrorTypes.RNGP_PAT_START_ATTR lxml.etree.ErrorTypes-class.html#RNGP_PAT_START_ATTR -lxml.etree.ErrorTypes.SCHEMAP_NOTATION_NO_NAME lxml.etree.ErrorTypes-class.html#SCHEMAP_NOTATION_NO_NAME -lxml.etree.ErrorTypes.NS_ERR_COLON lxml.etree.ErrorTypes-class.html#NS_ERR_COLON -lxml.etree.ErrorTypes.ERR_PEREF_IN_INT_SUBSET lxml.etree.ErrorTypes-class.html#ERR_PEREF_IN_INT_SUBSET -lxml.etree.ErrorTypes.RNGP_VALUE_EMPTY lxml.etree.ErrorTypes-class.html#RNGP_VALUE_EMPTY -lxml.etree.ErrorTypes.WAR_UNKNOWN_VERSION lxml.etree.ErrorTypes-class.html#WAR_UNKNOWN_VERSION -lxml.etree.ErrorTypes.SCHEMAV_ISABSTRACT lxml.etree.ErrorTypes-class.html#SCHEMAV_ISABSTRACT -lxml.etree.ErrorTypes.IO_EMSGSIZE lxml.etree.ErrorTypes-class.html#IO_EMSGSIZE -lxml.etree.ErrorTypes.CATALOG_ENTRY_BROKEN lxml.etree.ErrorTypes-class.html#CATALOG_ENTRY_BROKEN -lxml.etree.ErrorTypes.SCHEMAP_SRC_IMPORT_1_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_IMPORT_1_2 -lxml.etree.ErrorTypes.RNGP_CREATE_FAILURE lxml.etree.ErrorTypes-class.html#RNGP_CREATE_FAILURE -lxml.etree.ErrorTypes.ERR_NAME_REQUIRED lxml.etree.ErrorTypes-class.html#ERR_NAME_REQUIRED -lxml.etree.ErrorTypes.SCHEMAP_S4S_ATTR_NOT_ALLOWED lxml.etree.ErrorTypes-class.html#SCHEMAP_S4S_ATTR_NOT_ALLOWED -lxml.etree.ErrorTypes.ERR_ATTLIST_NOT_FINISHED lxml.etree.ErrorTypes-class.html#ERR_ATTLIST_NOT_FINISHED -lxml.etree.ErrorTypes._getName lxml.etree.ErrorTypes-class.html#_getName -lxml.etree.ErrorTypes.XPTR_EXTRA_OBJECTS lxml.etree.ErrorTypes-class.html#XPTR_EXTRA_OBJECTS -lxml.etree.ErrorTypes.IO_EISCONN lxml.etree.ErrorTypes-class.html#IO_EISCONN -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_CHOICE_CHILD lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_CHOICE_CHILD -lxml.etree.ErrorTypes.ERR_PUBID_REQUIRED lxml.etree.ErrorTypes-class.html#ERR_PUBID_REQUIRED -lxml.etree.ErrorTypes.SCHEMAP_NOTHING_TO_PARSE lxml.etree.ErrorTypes-class.html#SCHEMAP_NOTHING_TO_PARSE -lxml.etree.ErrorTypes.RNGP_NOTALLOWED_NOT_EMPTY lxml.etree.ErrorTypes-class.html#RNGP_NOTALLOWED_NOT_EMPTY -lxml.etree.ErrorTypes.RNGP_REF_NOT_EMPTY lxml.etree.ErrorTypes-class.html#RNGP_REF_NOT_EMPTY -lxml.etree.ErrorTypes.SCHEMAP_DEF_AND_PREFIX lxml.etree.ErrorTypes-class.html#SCHEMAP_DEF_AND_PREFIX -lxml.etree.ErrorTypes.ERR_NOTATION_NOT_FINISHED lxml.etree.ErrorTypes-class.html#ERR_NOTATION_NOT_FINISHED -lxml.etree.ErrorTypes.RNGP_ATTRIBUTE_CHILDREN lxml.etree.ErrorTypes-class.html#RNGP_ATTRIBUTE_CHILDREN -lxml.etree.ErrorTypes.RNGP_PAT_START_DATA lxml.etree.ErrorTypes-class.html#RNGP_PAT_START_DATA -lxml.etree.ErrorTypes.RNGP_ELEMENT_NAME lxml.etree.ErrorTypes-class.html#RNGP_ELEMENT_NAME -lxml.etree.ErrorTypes.RNGP_INTERLEAVE_EMPTY lxml.etree.ErrorTypes-class.html#RNGP_INTERLEAVE_EMPTY -lxml.etree.ErrorTypes.RNGP_PAT_DATA_EXCEPT_INTERLEAVE lxml.etree.ErrorTypes-class.html#RNGP_PAT_DATA_EXCEPT_INTERLEAVE -lxml.etree.ErrorTypes.ERR_VERSION_MISSING lxml.etree.ErrorTypes-class.html#ERR_VERSION_MISSING -lxml.etree.ErrorTypes.RNGP_DEFINE_MISSING lxml.etree.ErrorTypes-class.html#RNGP_DEFINE_MISSING -lxml.etree.ErrorTypes.CATALOG_NOT_CATALOG lxml.etree.ErrorTypes-class.html#CATALOG_NOT_CATALOG -lxml.etree.ErrorTypes.XINCLUDE_TEXT_DOCUMENT lxml.etree.ErrorTypes-class.html#XINCLUDE_TEXT_DOCUMENT -lxml.etree.ErrorTypes.DTD_NO_ELEM_NAME lxml.etree.ErrorTypes-class.html#DTD_NO_ELEM_NAME -lxml.etree.ErrorTypes.ERR_UNSUPPORTED_ENCODING lxml.etree.ErrorTypes-class.html#ERR_UNSUPPORTED_ENCODING -lxml.etree.ErrorTypes.ERR_ENTITY_NOT_STARTED lxml.etree.ErrorTypes-class.html#ERR_ENTITY_NOT_STARTED -lxml.etree.ErrorTypes.DTD_ELEM_DEFAULT_NAMESPACE lxml.etree.ErrorTypes-class.html#DTD_ELEM_DEFAULT_NAMESPACE -lxml.etree.ErrorTypes.IO_EDOM lxml.etree.ErrorTypes-class.html#IO_EDOM -lxml.etree.ErrorTypes.ERR_NO_MEMORY lxml.etree.ErrorTypes-class.html#ERR_NO_MEMORY -lxml.etree.ErrorTypes.RNGP_GROUP_ATTR_CONFLICT lxml.etree.ErrorTypes-class.html#RNGP_GROUP_ATTR_CONFLICT -lxml.etree.ErrorTypes.FTP_EPSV_ANSWER lxml.etree.ErrorTypes-class.html#FTP_EPSV_ANSWER -lxml.etree.ErrorTypes.IO_ENOTTY lxml.etree.ErrorTypes-class.html#IO_ENOTTY -lxml.etree.ErrorTypes.SCHEMAP_COS_ST_RESTRICTS_2_3_1_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_ST_RESTRICTS_2_3_1_1 -lxml.etree.ErrorTypes.SCHEMAP_COS_ST_RESTRICTS_2_3_1_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_ST_RESTRICTS_2_3_1_2 -lxml.etree.ErrorTypes.IO_EFAULT lxml.etree.ErrorTypes-class.html#IO_EFAULT -lxml.etree.ErrorTypes.SCHEMAP_COS_CT_EXTENDS_1_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_CT_EXTENDS_1_1 -lxml.etree.ErrorTypes.SCHEMAV_ELEMCONT lxml.etree.ErrorTypes-class.html#SCHEMAV_ELEMCONT -lxml.etree.ErrorTypes.IO_ECHILD lxml.etree.ErrorTypes-class.html#IO_ECHILD -lxml.etree.ErrorTypes.ERR_VALUE_REQUIRED lxml.etree.ErrorTypes-class.html#ERR_VALUE_REQUIRED -lxml.etree.ErrorTypes.SCHEMAP_COS_VALID_DEFAULT_2_2_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_VALID_DEFAULT_2_2_1 -lxml.etree.ErrorTypes.ERR_PCDATA_REQUIRED lxml.etree.ErrorTypes-class.html#ERR_PCDATA_REQUIRED -lxml.etree.ErrorTypes.RNGP_PAT_START_TEXT lxml.etree.ErrorTypes-class.html#RNGP_PAT_START_TEXT -lxml.etree.ErrorTypes.SCHEMAP_COS_ST_RESTRICTS_1_3_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_ST_RESTRICTS_1_3_1 -lxml.etree.ErrorTypes.SCHEMAP_COS_ST_RESTRICTS_1_3_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_ST_RESTRICTS_1_3_2 -lxml.etree.ErrorTypes.RNGP_INTERLEAVE_CREATE_FAILED lxml.etree.ErrorTypes-class.html#RNGP_INTERLEAVE_CREATE_FAILED -lxml.etree.ErrorTypes.CHECK_WRONG_NAME lxml.etree.ErrorTypes-class.html#CHECK_WRONG_NAME -lxml.etree.ErrorTypes.XPATH_INVALID_CHAR_ERROR lxml.etree.ErrorTypes-class.html#XPATH_INVALID_CHAR_ERROR -lxml.etree.ErrorTypes.DTD_UNKNOWN_ID lxml.etree.ErrorTypes-class.html#DTD_UNKNOWN_ID -lxml.etree.ErrorTypes.ERR_INVALID_HEX_CHARREF lxml.etree.ErrorTypes-class.html#ERR_INVALID_HEX_CHARREF -lxml.etree.ErrorTypes.SCHEMAV_CVC_MAXLENGTH_VALID lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_MAXLENGTH_VALID -lxml.etree.ErrorTypes.ERR_ENTITY_CHAR_ERROR lxml.etree.ErrorTypes-class.html#ERR_ENTITY_CHAR_ERROR -lxml.etree.ErrorTypes.DTD_ID_SUBSET lxml.etree.ErrorTypes-class.html#DTD_ID_SUBSET -lxml.etree.ErrorTypes.IO_LOAD_ERROR lxml.etree.ErrorTypes-class.html#IO_LOAD_ERROR -lxml.etree.ErrorTypes.ERR_INVALID_ENCODING lxml.etree.ErrorTypes-class.html#ERR_INVALID_ENCODING -lxml.etree.ErrorTypes.SCHEMAP_COS_ALL_LIMITED lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_ALL_LIMITED -lxml.etree.ErrorTypes.IO_EIO lxml.etree.ErrorTypes-class.html#IO_EIO -lxml.etree.ErrorTypes.RNGP_DEFINE_NAME_MISSING lxml.etree.ErrorTypes-class.html#RNGP_DEFINE_NAME_MISSING -lxml.etree.ErrorTypes.IO_ENOTDIR lxml.etree.ErrorTypes-class.html#IO_ENOTDIR -lxml.etree.ErrorTypes.XINCLUDE_TEXT_FRAGMENT lxml.etree.ErrorTypes-class.html#XINCLUDE_TEXT_FRAGMENT -lxml.etree.ErrorTypes.SCHEMAP_MISSING_SIMPLETYPE_CHILD lxml.etree.ErrorTypes-class.html#SCHEMAP_MISSING_SIMPLETYPE_CHILD -lxml.etree.ErrorTypes.DTD_NOT_PCDATA lxml.etree.ErrorTypes-class.html#DTD_NOT_PCDATA -lxml.etree.ErrorTypes.ERR_INVALID_URI lxml.etree.ErrorTypes-class.html#ERR_INVALID_URI -lxml.etree.ErrorTypes.SCHEMAV_VALUE lxml.etree.ErrorTypes-class.html#SCHEMAV_VALUE -lxml.etree.ErrorTypes.XPATH_INVALID_PREDICATE_ERROR lxml.etree.ErrorTypes-class.html#XPATH_INVALID_PREDICATE_ERROR -lxml.etree.ErrorTypes.IO_ENOEXEC lxml.etree.ErrorTypes-class.html#IO_ENOEXEC -lxml.etree.ErrorTypes.RNGP_GRAMMAR_NO_START lxml.etree.ErrorTypes-class.html#RNGP_GRAMMAR_NO_START -lxml.etree.ErrorTypes.ERR_XMLDECL_NOT_FINISHED lxml.etree.ErrorTypes-class.html#ERR_XMLDECL_NOT_FINISHED -lxml.etree.ErrorTypes.RNGP_REF_NO_DEF lxml.etree.ErrorTypes-class.html#RNGP_REF_NO_DEF -lxml.etree.ErrorTypes.RNGP_NEED_COMBINE lxml.etree.ErrorTypes-class.html#RNGP_NEED_COMBINE -lxml.etree.ErrorTypes.ERR_STANDALONE_VALUE lxml.etree.ErrorTypes-class.html#ERR_STANDALONE_VALUE -lxml.etree.ErrorTypes.SCHEMAP_INVALID_ATTR_NAME lxml.etree.ErrorTypes-class.html#SCHEMAP_INVALID_ATTR_NAME -lxml.etree.ErrorTypes.SCHEMAP_CT_PROPS_CORRECT_4 lxml.etree.ErrorTypes-class.html#SCHEMAP_CT_PROPS_CORRECT_4 -lxml.etree.ErrorTypes.IO_ENOSYS lxml.etree.ErrorTypes-class.html#IO_ENOSYS -lxml.etree.ErrorTypes.SCHEMAP_ELEMFORMDEFAULT_VALUE lxml.etree.ErrorTypes-class.html#SCHEMAP_ELEMFORMDEFAULT_VALUE -lxml.etree.ErrorTypes.ERR_STRING_NOT_CLOSED lxml.etree.ErrorTypes-class.html#ERR_STRING_NOT_CLOSED -lxml.etree.ErrorTypes.SCHEMAP_CT_PROPS_CORRECT_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_CT_PROPS_CORRECT_2 -lxml.etree.ErrorTypes.SCHEMAP_CT_PROPS_CORRECT_3 lxml.etree.ErrorTypes-class.html#SCHEMAP_CT_PROPS_CORRECT_3 -lxml.etree.ErrorTypes.SCHEMAV_CVC_AU lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_AU -lxml.etree.ErrorTypes.RNGP_FORBIDDEN_ATTRIBUTE lxml.etree.ErrorTypes-class.html#RNGP_FORBIDDEN_ATTRIBUTE -lxml.etree.ErrorTypes.ERR_PI_NOT_FINISHED lxml.etree.ErrorTypes-class.html#ERR_PI_NOT_FINISHED -lxml.etree.ErrorTypes.XPATH_EXPR_ERROR lxml.etree.ErrorTypes-class.html#XPATH_EXPR_ERROR -lxml.etree.ErrorTypes.RNGP_NSNAME_NO_NS lxml.etree.ErrorTypes-class.html#RNGP_NSNAME_NO_NS -lxml.etree.ErrorTypes.NS_ERR_EMPTY lxml.etree.ErrorTypes-class.html#NS_ERR_EMPTY -lxml.etree.ErrorTypes.ERR_HYPHEN_IN_COMMENT lxml.etree.ErrorTypes-class.html#ERR_HYPHEN_IN_COMMENT -lxml.etree.ErrorTypes.XPATH_NUMBER_ERROR lxml.etree.ErrorTypes-class.html#XPATH_NUMBER_ERROR -lxml.etree.ErrorTypes.RNGP_PARENTREF_NOT_EMPTY lxml.etree.ErrorTypes-class.html#RNGP_PARENTREF_NOT_EMPTY -lxml.etree.ErrorTypes.ERR_PI_NOT_STARTED lxml.etree.ErrorTypes-class.html#ERR_PI_NOT_STARTED -lxml.etree.ErrorTypes.RNGP_TYPE_MISSING lxml.etree.ErrorTypes-class.html#RNGP_TYPE_MISSING -lxml.etree.ErrorTypes.IO_EPERM lxml.etree.ErrorTypes-class.html#IO_EPERM -lxml.etree.ErrorTypes.ERR_COMMENT_NOT_FINISHED lxml.etree.ErrorTypes-class.html#ERR_COMMENT_NOT_FINISHED -lxml.etree.ErrorTypes.DTD_CONTENT_ERROR lxml.etree.ErrorTypes-class.html#DTD_CONTENT_ERROR -lxml.etree.ErrorTypes.DTD_NOTATION_VALUE lxml.etree.ErrorTypes-class.html#DTD_NOTATION_VALUE -lxml.etree.ErrorTypes.RNGP_URI_NOT_ABSOLUTE lxml.etree.ErrorTypes-class.html#RNGP_URI_NOT_ABSOLUTE -lxml.etree.ErrorTypes.SCHEMAP_SRC_IMPORT_3_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_IMPORT_3_1 -lxml.etree.ErrorTypes.XPATH_VARIABLE_REF_ERROR lxml.etree.ErrorTypes-class.html#XPATH_VARIABLE_REF_ERROR -lxml.etree.ErrorTypes.SCHEMAP_SRC_IMPORT_3_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_IMPORT_3_2 -lxml.etree.ErrorTypes.XPATH_UNKNOWN_FUNC_ERROR lxml.etree.ErrorTypes-class.html#XPATH_UNKNOWN_FUNC_ERROR -lxml.etree.ErrorTypes.C14N_UNKNOW_NODE lxml.etree.ErrorTypes-class.html#C14N_UNKNOW_NODE -lxml.etree.ErrorTypes.SCHEMAP_INVALID_MAXOCCURS lxml.etree.ErrorTypes-class.html#SCHEMAP_INVALID_MAXOCCURS -lxml.etree.ErrorTypes.SCHEMAV_NOTTOPLEVEL lxml.etree.ErrorTypes-class.html#SCHEMAV_NOTTOPLEVEL -lxml.etree.ErrorTypes.SCHEMAP_WILDCARD_INVALID_NS_MEMBER lxml.etree.ErrorTypes-class.html#SCHEMAP_WILDCARD_INVALID_NS_MEMBER -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_LIST_CHILD lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_LIST_CHILD -lxml.etree.ErrorTypes.WAR_LANG_VALUE lxml.etree.ErrorTypes-class.html#WAR_LANG_VALUE -lxml.etree.ErrorTypes.SCHEMAP_DERIVATION_OK_RESTRICTION_4_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_DERIVATION_OK_RESTRICTION_4_1 -lxml.etree.ErrorTypes.SCHEMAP_DERIVATION_OK_RESTRICTION_4_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_DERIVATION_OK_RESTRICTION_4_2 -lxml.etree.ErrorTypes.SCHEMAP_DERIVATION_OK_RESTRICTION_4_3 lxml.etree.ErrorTypes-class.html#SCHEMAP_DERIVATION_OK_RESTRICTION_4_3 -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_PREFIX lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_PREFIX -lxml.etree.ErrorTypes.ERR_STRING_NOT_STARTED lxml.etree.ErrorTypes-class.html#ERR_STRING_NOT_STARTED -lxml.etree.ErrorTypes.SCHEMAP_RECURSIVE lxml.etree.ErrorTypes-class.html#SCHEMAP_RECURSIVE -lxml.etree.ErrorTypes.CHECK_ENTITY_TYPE lxml.etree.ErrorTypes-class.html#CHECK_ENTITY_TYPE -lxml.etree.ErrorTypes.RNGP_EMPTY_CONSTRUCT lxml.etree.ErrorTypes-class.html#RNGP_EMPTY_CONSTRUCT -lxml.etree.ErrorTypes.RNGP_CHOICE_CONTENT lxml.etree.ErrorTypes-class.html#RNGP_CHOICE_CONTENT -lxml.etree.ErrorTypes.XINCLUDE_RECURSION lxml.etree.ErrorTypes-class.html#XINCLUDE_RECURSION -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_INCLUDE_CHILD lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_INCLUDE_CHILD -lxml.etree.ErrorTypes.ERR_ENTITY_NOT_FINISHED lxml.etree.ErrorTypes-class.html#ERR_ENTITY_NOT_FINISHED -lxml.etree.ErrorTypes.IO_ENAMETOOLONG lxml.etree.ErrorTypes-class.html#IO_ENAMETOOLONG -lxml.etree.ErrorTypes.DTD_EMPTY_NOTATION lxml.etree.ErrorTypes-class.html#DTD_EMPTY_NOTATION -lxml.etree.ErrorTypes.ERR_EXT_SUBSET_NOT_FINISHED lxml.etree.ErrorTypes-class.html#ERR_EXT_SUBSET_NOT_FINISHED -lxml.etree.ErrorTypes.SCHEMAP_REGEXP_INVALID lxml.etree.ErrorTypes-class.html#SCHEMAP_REGEXP_INVALID -lxml.etree.ErrorTypes.SCHEMAV_CVC_MINEXCLUSIVE_VALID lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_MINEXCLUSIVE_VALID -lxml.etree.ErrorTypes.RNGP_PREFIX_UNDEFINED lxml.etree.ErrorTypes-class.html#RNGP_PREFIX_UNDEFINED -lxml.etree.ErrorTypes.DTD_CONTENT_MODEL lxml.etree.ErrorTypes-class.html#DTD_CONTENT_MODEL -lxml.etree.ErrorTypes.ERR_ENTITY_PROCESSING lxml.etree.ErrorTypes-class.html#ERR_ENTITY_PROCESSING -lxml.etree.ErrorTypes.RNGP_PAT_DATA_EXCEPT_TEXT lxml.etree.ErrorTypes-class.html#RNGP_PAT_DATA_EXCEPT_TEXT -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD -lxml.etree.ErrorTypes.SCHEMAP_SRC_ATTRIBUTE_4 lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_ATTRIBUTE_4 -lxml.etree.ErrorTypes.SCHEMAP_SRC_ATTRIBUTE_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_ATTRIBUTE_2 -lxml.etree.ErrorTypes.SCHEMAP_SRC_ATTRIBUTE_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_ATTRIBUTE_1 -lxml.etree.ErrorTypes.SCHEMAP_INCLUDE_SCHEMA_NO_URI lxml.etree.ErrorTypes-class.html#SCHEMAP_INCLUDE_SCHEMA_NO_URI -lxml.etree.ErrorTypes.SCHEMAV_ATTRUNKNOWN lxml.etree.ErrorTypes-class.html#SCHEMAV_ATTRUNKNOWN -lxml.etree.ErrorTypes.SCHEMAP_COS_CT_EXTENDS_1_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_CT_EXTENDS_1_2 -lxml.etree.ErrorTypes.SCHEMAP_COS_CT_EXTENDS_1_3 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_CT_EXTENDS_1_3 -lxml.etree.ErrorTypes.SCHEMAV_CVC_ELT_3_1 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_ELT_3_1 -lxml.etree.ErrorTypes.DTD_CONTENT_NOT_DETERMINIST lxml.etree.ErrorTypes-class.html#DTD_CONTENT_NOT_DETERMINIST -lxml.etree.ErrorTypes.SCHEMAV_NOROLLBACK lxml.etree.ErrorTypes-class.html#SCHEMAV_NOROLLBACK -lxml.etree.ErrorTypes.ERR_DOCUMENT_END lxml.etree.ErrorTypes-class.html#ERR_DOCUMENT_END -lxml.etree.ErrorTypes.ERR_ENTITYREF_IN_EPILOG lxml.etree.ErrorTypes-class.html#ERR_ENTITYREF_IN_EPILOG -lxml.etree.ErrorTypes.XINCLUDE_INVALID_CHAR lxml.etree.ErrorTypes-class.html#XINCLUDE_INVALID_CHAR -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_FACET_CHILD lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_FACET_CHILD -lxml.etree.ErrorTypes.RNGP_DEFINE_EMPTY lxml.etree.ErrorTypes-class.html#RNGP_DEFINE_EMPTY -lxml.etree.ErrorTypes.RNGP_PAT_ATTR_ELEM lxml.etree.ErrorTypes-class.html#RNGP_PAT_ATTR_ELEM -lxml.etree.ErrorTypes.SCHEMAP_INVALID_ATTR_INLINE_COMBINATION lxml.etree.ErrorTypes-class.html#SCHEMAP_INVALID_ATTR_INLINE_COMBINATION -lxml.etree.ErrorTypes.RNGP_PAT_START_INTERLEAVE lxml.etree.ErrorTypes-class.html#RNGP_PAT_START_INTERLEAVE -lxml.etree.ErrorTypes.I18N_EXCESS_HANDLER lxml.etree.ErrorTypes-class.html#I18N_EXCESS_HANDLER -lxml.etree.ErrorTypes.IO_ENETUNREACH lxml.etree.ErrorTypes-class.html#IO_ENETUNREACH -lxml.etree.ErrorTypes.RNGP_INVALID_VALUE lxml.etree.ErrorTypes-class.html#RNGP_INVALID_VALUE -lxml.etree.ErrorTypes.IO_NO_INPUT lxml.etree.ErrorTypes-class.html#IO_NO_INPUT -lxml.etree.ErrorTypes.RNGP_PAT_START_LIST lxml.etree.ErrorTypes-class.html#RNGP_PAT_START_LIST -lxml.etree.ErrorTypes.SCHEMAP_P_PROPS_CORRECT_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_P_PROPS_CORRECT_1 -lxml.etree.ErrorTypes.ERR_ATTRIBUTE_NOT_STARTED lxml.etree.ErrorTypes-class.html#ERR_ATTRIBUTE_NOT_STARTED -lxml.etree.ErrorTypes.CHECK_NOT_ATTR lxml.etree.ErrorTypes-class.html#CHECK_NOT_ATTR -lxml.etree.ErrorTypes.CHECK_NOT_ENTITY_DECL lxml.etree.ErrorTypes-class.html#CHECK_NOT_ENTITY_DECL -lxml.etree.ErrorTypes.ERR_ENTITYREF_IN_PROLOG lxml.etree.ErrorTypes-class.html#ERR_ENTITYREF_IN_PROLOG -lxml.etree.ErrorTypes.ERR_PEREF_NO_NAME lxml.etree.ErrorTypes-class.html#ERR_PEREF_NO_NAME -lxml.etree.ErrorTypes.RNGP_FOREIGN_ELEMENT lxml.etree.ErrorTypes-class.html#RNGP_FOREIGN_ELEMENT -lxml.etree.ErrorTypes.SCHEMAP_DERIVATION_OK_RESTRICTION_2_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_DERIVATION_OK_RESTRICTION_2_2 -lxml.etree.ErrorTypes.CHECK_NOT_ATTR_DECL lxml.etree.ErrorTypes-class.html#CHECK_NOT_ATTR_DECL -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_FACET_TYPE lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_FACET_TYPE -lxml.etree.ErrorTypes.SCHEMAP_SRC_IMPORT_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_IMPORT_2 -lxml.etree.ErrorTypes.SCHEMAP_COS_ST_RESTRICTS_2_3_2_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_ST_RESTRICTS_2_3_2_2 -lxml.etree.ErrorTypes.SCHEMAP_COS_ST_RESTRICTS_2_3_2_3 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_ST_RESTRICTS_2_3_2_3 -lxml.etree.ErrorTypes.XINCLUDE_HREF_URI lxml.etree.ErrorTypes-class.html#XINCLUDE_HREF_URI -lxml.etree.ErrorTypes.SCHEMAP_COS_ST_RESTRICTS_2_3_2_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_ST_RESTRICTS_2_3_2_1 -lxml.etree.ErrorTypes.ERR_SEPARATOR_REQUIRED lxml.etree.ErrorTypes-class.html#ERR_SEPARATOR_REQUIRED -lxml.etree.ErrorTypes.SCHEMAP_COS_ST_RESTRICTS_2_3_2_4 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_ST_RESTRICTS_2_3_2_4 -lxml.etree.ErrorTypes.FTP_PASV_ANSWER lxml.etree.ErrorTypes-class.html#FTP_PASV_ANSWER -lxml.etree.ErrorTypes.SAVE_NO_DOCTYPE lxml.etree.ErrorTypes-class.html#SAVE_NO_DOCTYPE -lxml.etree.ErrorTypes.DTD_NO_PREFIX lxml.etree.ErrorTypes-class.html#DTD_NO_PREFIX -lxml.etree.ErrorTypes.ERR_MIXED_NOT_STARTED lxml.etree.ErrorTypes-class.html#ERR_MIXED_NOT_STARTED -lxml.etree.ErrorTypes.ERR_ENTITYREF_SEMICOL_MISSING lxml.etree.ErrorTypes-class.html#ERR_ENTITYREF_SEMICOL_MISSING -lxml.etree.ErrorTypes.ERR_CONDSEC_NOT_FINISHED lxml.etree.ErrorTypes-class.html#ERR_CONDSEC_NOT_FINISHED -lxml.etree.ErrorTypes.RNGP_EMPTY lxml.etree.ErrorTypes-class.html#RNGP_EMPTY -lxml.etree.ErrorTypes.RNGP_PARENTREF_NO_PARENT lxml.etree.ErrorTypes-class.html#RNGP_PARENTREF_NO_PARENT -lxml.etree.ErrorTypes.RNGP_PAT_DATA_EXCEPT_ELEM lxml.etree.ErrorTypes-class.html#RNGP_PAT_DATA_EXCEPT_ELEM -lxml.etree.ErrorTypes.WAR_SPACE_VALUE lxml.etree.ErrorTypes-class.html#WAR_SPACE_VALUE -lxml.etree.ErrorTypes.ERR_MIXED_NOT_FINISHED lxml.etree.ErrorTypes-class.html#ERR_MIXED_NOT_FINISHED -lxml.etree.ErrorTypes.SCHEMAP_WARN_ATTR_POINTLESS_PROH lxml.etree.ErrorTypes-class.html#SCHEMAP_WARN_ATTR_POINTLESS_PROH -lxml.etree.ErrorTypes.RNGP_START_CONTENT lxml.etree.ErrorTypes-class.html#RNGP_START_CONTENT -lxml.etree.ErrorTypes.RNGP_DEF_CHOICE_AND_INTERLEAVE lxml.etree.ErrorTypes-class.html#RNGP_DEF_CHOICE_AND_INTERLEAVE -lxml.etree.ErrorTypes.SCHEMAV_CVC_MAXINCLUSIVE_VALID lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_MAXINCLUSIVE_VALID -lxml.etree.ErrorTypes.CATALOG_MISSING_ATTR lxml.etree.ErrorTypes-class.html#CATALOG_MISSING_ATTR -lxml.etree.ErrorTypes.SCHEMAV_CONSTRUCT lxml.etree.ErrorTypes-class.html#SCHEMAV_CONSTRUCT -lxml.etree.ErrorTypes.ERR_ATTRIBUTE_REDEFINED lxml.etree.ErrorTypes-class.html#ERR_ATTRIBUTE_REDEFINED -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_REF lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_REF -lxml.etree.ErrorTypes.SCHEMAV_CVC_MAXEXCLUSIVE_VALID lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_MAXEXCLUSIVE_VALID -lxml.etree.ErrorTypes.RNGP_ANYNAME_ATTR_ANCESTOR lxml.etree.ErrorTypes-class.html#RNGP_ANYNAME_ATTR_ANCESTOR -lxml.etree.ErrorTypes.DTD_DIFFERENT_PREFIX lxml.etree.ErrorTypes-class.html#DTD_DIFFERENT_PREFIX -lxml.etree.ErrorTypes.RNGP_EXTERNAL_REF_FAILURE lxml.etree.ErrorTypes-class.html#RNGP_EXTERNAL_REF_FAILURE -lxml.etree.ErrorTypes.CATALOG_PREFER_VALUE lxml.etree.ErrorTypes-class.html#CATALOG_PREFER_VALUE -lxml.etree.ErrorTypes.XPTR_RESOURCE_ERROR lxml.etree.ErrorTypes-class.html#XPTR_RESOURCE_ERROR -lxml.etree.ErrorTypes.DTD_ATTRIBUTE_REDEFINED lxml.etree.ErrorTypes-class.html#DTD_ATTRIBUTE_REDEFINED -lxml.etree.ErrorTypes.XPATH_MEMORY_ERROR lxml.etree.ErrorTypes-class.html#XPATH_MEMORY_ERROR -lxml.etree.ErrorTypes.IO_EBADMSG lxml.etree.ErrorTypes-class.html#IO_EBADMSG -lxml.etree.ErrorTypes.IO_ENCODER lxml.etree.ErrorTypes-class.html#IO_ENCODER -lxml.etree.ErrorTypes.RNGP_ELEM_TEXT_CONFLICT lxml.etree.ErrorTypes-class.html#RNGP_ELEM_TEXT_CONFLICT -lxml.etree.ErrorTypes.ERR_INVALID_CHARREF lxml.etree.ErrorTypes-class.html#ERR_INVALID_CHARREF -lxml.etree.ErrorTypes.SCHEMAP_ST_PROPS_CORRECT_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_ST_PROPS_CORRECT_1 -lxml.etree.ErrorTypes.SCHEMAP_ST_PROPS_CORRECT_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_ST_PROPS_CORRECT_2 -lxml.etree.ErrorTypes.ERR_ENTITYREF_IN_DTD lxml.etree.ErrorTypes-class.html#ERR_ENTITYREF_IN_DTD -lxml.etree.ErrorTypes.SCHEMAP_S4S_ATTR_INVALID_VALUE lxml.etree.ErrorTypes-class.html#SCHEMAP_S4S_ATTR_INVALID_VALUE -lxml.etree.ErrorTypes.RNGP_INVALID_URI lxml.etree.ErrorTypes-class.html#RNGP_INVALID_URI -lxml.etree.ErrorTypes.RNGP_XMLNS_NAME lxml.etree.ErrorTypes-class.html#RNGP_XMLNS_NAME -lxml.etree.ErrorTypes.IO_ESPIPE lxml.etree.ErrorTypes-class.html#IO_ESPIPE -lxml.etree.ErrorTypes.CHECK_FOUND_ENTITY lxml.etree.ErrorTypes-class.html#CHECK_FOUND_ENTITY -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD -lxml.etree.ErrorTypes.RNGP_GRAMMAR_EMPTY lxml.etree.ErrorTypes-class.html#RNGP_GRAMMAR_EMPTY -lxml.etree.ErrorTypes.RNGP_REF_CREATE_FAILED lxml.etree.ErrorTypes-class.html#RNGP_REF_CREATE_FAILED -lxml.etree.ErrorTypes.SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1 -lxml.etree.ErrorTypes.SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2 -lxml.etree.ErrorTypes.SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3 lxml.etree.ErrorTypes-class.html#SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3 -lxml.etree.ErrorTypes.ERR_CDATA_NOT_FINISHED lxml.etree.ErrorTypes-class.html#ERR_CDATA_NOT_FINISHED -lxml.etree.ErrorTypes.ERR_LTSLASH_REQUIRED lxml.etree.ErrorTypes-class.html#ERR_LTSLASH_REQUIRED -lxml.etree.ErrorTypes.SCHEMAV_NOTDETERMINIST lxml.etree.ErrorTypes-class.html#SCHEMAV_NOTDETERMINIST -lxml.etree.ErrorTypes.IO_FLUSH lxml.etree.ErrorTypes-class.html#IO_FLUSH -lxml.etree.ErrorTypes.ERR_CHARREF_AT_EOF lxml.etree.ErrorTypes-class.html#ERR_CHARREF_AT_EOF -lxml.etree.ErrorTypes.HTML_STRUCURE_ERROR lxml.etree.ErrorTypes-class.html#HTML_STRUCURE_ERROR -lxml.etree.ErrorTypes.IO_EBADF lxml.etree.ErrorTypes-class.html#IO_EBADF -lxml.etree.ErrorTypes.SCHEMAP_ATTR_NONAME_NOREF lxml.etree.ErrorTypes-class.html#SCHEMAP_ATTR_NONAME_NOREF -lxml.etree.ErrorTypes.SCHEMAP_FAILED_BUILD_IMPORT lxml.etree.ErrorTypes-class.html#SCHEMAP_FAILED_BUILD_IMPORT -lxml.etree.ErrorTypes.CHECK_WRONG_PARENT lxml.etree.ErrorTypes-class.html#CHECK_WRONG_PARENT -lxml.etree.ErrorTypes.DTD_NOTATION_REDEFINED lxml.etree.ErrorTypes-class.html#DTD_NOTATION_REDEFINED -lxml.etree.ErrorTypes.ERR_ATTLIST_NOT_STARTED lxml.etree.ErrorTypes-class.html#ERR_ATTLIST_NOT_STARTED -lxml.etree.ErrorTypes.XPATH_UNCLOSED_ERROR lxml.etree.ErrorTypes-class.html#XPATH_UNCLOSED_ERROR -lxml.etree.ErrorTypes.SCHEMAV_CVC_ELT_2 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_ELT_2 -lxml.etree.ErrorTypes.RNGP_PAT_NSNAME_EXCEPT_NSNAME lxml.etree.ErrorTypes-class.html#RNGP_PAT_NSNAME_EXCEPT_NSNAME -lxml.etree.ErrorTypes.SCHEMAV_CVC_ELT_1 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_ELT_1 -lxml.etree.ErrorTypes.SCHEMAV_CVC_ELT_6 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_ELT_6 -lxml.etree.ErrorTypes.SCHEMAV_CVC_ELT_7 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_ELT_7 -lxml.etree.ErrorTypes.SCHEMAV_CVC_ELT_5_2_2_2_1 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_ELT_5_2_2_2_1 -lxml.etree.ErrorTypes.SCHEMAP_SRC_IMPORT_2_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_IMPORT_2_1 -lxml.etree.ErrorTypes.SCHEMAP_SRC_IMPORT_2_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_IMPORT_2_2 -lxml.etree.ErrorTypes.SCHEMAV_CVC_ELT_5_2_2_2_2 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_ELT_5_2_2_2_2 -lxml.etree.ErrorTypes.RNGP_ELEMENT_CONTENT lxml.etree.ErrorTypes-class.html#RNGP_ELEMENT_CONTENT -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_ATTR_CHILD lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_ATTR_CHILD -lxml.etree.ErrorTypes.ERR_CONDSEC_INVALID_KEYWORD lxml.etree.ErrorTypes-class.html#ERR_CONDSEC_INVALID_KEYWORD -lxml.etree.ErrorTypes.RNGP_START_EMPTY lxml.etree.ErrorTypes-class.html#RNGP_START_EMPTY -lxml.etree.ErrorTypes.IO_EAGAIN lxml.etree.ErrorTypes-class.html#IO_EAGAIN -lxml.etree.ErrorTypes.SCHEMAV_CVC_MININCLUSIVE_VALID lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_MININCLUSIVE_VALID -lxml.etree.ErrorTypes.SCHEMAV_ELEMENT_CONTENT lxml.etree.ErrorTypes-class.html#SCHEMAV_ELEMENT_CONTENT -lxml.etree.ErrorTypes.XINCLUDE_FRAGMENT_ID lxml.etree.ErrorTypes-class.html#XINCLUDE_FRAGMENT_ID -lxml.etree.ErrorTypes.SCHEMAP_COS_ST_RESTRICTS_2_3_2_5 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_ST_RESTRICTS_2_3_2_5 -lxml.etree.ErrorTypes.I18N_NO_NAME lxml.etree.ErrorTypes-class.html#I18N_NO_NAME -lxml.etree.ErrorTypes.SCHEMAP_IMPORT_SCHEMA_NOT_URI lxml.etree.ErrorTypes-class.html#SCHEMAP_IMPORT_SCHEMA_NOT_URI -lxml.etree.ErrorTypes.NS_ERR_QNAME lxml.etree.ErrorTypes-class.html#NS_ERR_QNAME -lxml.etree.ErrorTypes.SCHEMAP_UNION_NOT_EXPRESSIBLE lxml.etree.ErrorTypes-class.html#SCHEMAP_UNION_NOT_EXPRESSIBLE -lxml.etree.ErrorTypes.SCHEMAP_SRC_CT_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_CT_1 -lxml.etree.ErrorTypes.RNGP_PAT_LIST_REF lxml.etree.ErrorTypes-class.html#RNGP_PAT_LIST_REF -lxml.etree.ErrorTypes.SCHEMAP_IMPORT_REDEFINE_NSNAME lxml.etree.ErrorTypes-class.html#SCHEMAP_IMPORT_REDEFINE_NSNAME -lxml.etree.ErrorTypes.SCHEMAV_ATTRINVALID lxml.etree.ErrorTypes-class.html#SCHEMAV_ATTRINVALID -lxml.etree.ErrorTypes.RNGP_PAT_DATA_EXCEPT_ATTR lxml.etree.ErrorTypes-class.html#RNGP_PAT_DATA_EXCEPT_ATTR -lxml.etree.ErrorTypes.IO_ESRCH lxml.etree.ErrorTypes-class.html#IO_ESRCH -lxml.etree.ErrorTypes.DTD_UNKNOWN_ELEM lxml.etree.ErrorTypes-class.html#DTD_UNKNOWN_ELEM -lxml.etree.ErrorTypes.XINCLUDE_DEPRECATED_NS lxml.etree.ErrorTypes-class.html#XINCLUDE_DEPRECATED_NS -lxml.etree.ErrorTypes.ERR_CHARREF_IN_EPILOG lxml.etree.ErrorTypes-class.html#ERR_CHARREF_IN_EPILOG -lxml.etree.ErrorTypes.RNGP_UNKNOWN_TYPE_LIB lxml.etree.ErrorTypes-class.html#RNGP_UNKNOWN_TYPE_LIB -lxml.etree.ErrorTypes.ERR_NMTOKEN_REQUIRED lxml.etree.ErrorTypes-class.html#ERR_NMTOKEN_REQUIRED -lxml.etree.ErrorTypes.DTD_NOT_EMPTY lxml.etree.ErrorTypes-class.html#DTD_NOT_EMPTY -lxml.etree.ErrorTypes.SCHEMAP_COS_ST_RESTRICTS_2_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_ST_RESTRICTS_2_1 -lxml.etree.ErrorTypes.ERR_PEREF_IN_PROLOG lxml.etree.ErrorTypes-class.html#ERR_PEREF_IN_PROLOG -lxml.etree.ErrorTypes.SCHEMAP_NOT_DETERMINISTIC lxml.etree.ErrorTypes-class.html#SCHEMAP_NOT_DETERMINISTIC -lxml.etree.ErrorTypes.SCHEMAP_E_PROPS_CORRECT_6 lxml.etree.ErrorTypes-class.html#SCHEMAP_E_PROPS_CORRECT_6 -lxml.etree.ErrorTypes.SCHEMAP_E_PROPS_CORRECT_5 lxml.etree.ErrorTypes-class.html#SCHEMAP_E_PROPS_CORRECT_5 -lxml.etree.ErrorTypes.SCHEMAP_E_PROPS_CORRECT_4 lxml.etree.ErrorTypes-class.html#SCHEMAP_E_PROPS_CORRECT_4 -lxml.etree.ErrorTypes.SCHEMAP_E_PROPS_CORRECT_3 lxml.etree.ErrorTypes-class.html#SCHEMAP_E_PROPS_CORRECT_3 -lxml.etree.ErrorTypes.SCHEMAP_E_PROPS_CORRECT_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_E_PROPS_CORRECT_2 -lxml.etree.ErrorTypes.IO_EROFS lxml.etree.ErrorTypes-class.html#IO_EROFS -lxml.etree.ErrorTypes.RNGP_PAT_DATA_EXCEPT_ONEMORE lxml.etree.ErrorTypes-class.html#RNGP_PAT_DATA_EXCEPT_ONEMORE -lxml.etree.ErrorTypes.SCHEMAP_IMPORT_NAMESPACE_NOT_URI lxml.etree.ErrorTypes-class.html#SCHEMAP_IMPORT_NAMESPACE_NOT_URI -lxml.etree.ErrorTypes.SCHEMAP_FAILED_PARSE lxml.etree.ErrorTypes-class.html#SCHEMAP_FAILED_PARSE -lxml.etree.ErrorTypes.XPTR_SYNTAX_ERROR lxml.etree.ErrorTypes-class.html#XPTR_SYNTAX_ERROR -lxml.etree.ErrorTypes.MODULE_CLOSE lxml.etree.ErrorTypes-class.html#MODULE_CLOSE -lxml.etree.ErrorTypes.CHECK_NO_PARENT lxml.etree.ErrorTypes-class.html#CHECK_NO_PARENT -lxml.etree.ErrorTypes.SCHEMAP_REDEFINED_GROUP lxml.etree.ErrorTypes-class.html#SCHEMAP_REDEFINED_GROUP -lxml.etree.ErrorTypes.IO_EEXIST lxml.etree.ErrorTypes-class.html#IO_EEXIST -lxml.etree.ErrorTypes.REGEXP_COMPILE_ERROR lxml.etree.ErrorTypes-class.html#REGEXP_COMPILE_ERROR -lxml.etree.ErrorTypes.CATALOG_RECURSION lxml.etree.ErrorTypes-class.html#CATALOG_RECURSION -lxml.etree.ErrorTypes.WAR_CATALOG_PI lxml.etree.ErrorTypes-class.html#WAR_CATALOG_PI -lxml.etree.ErrorTypes.ERR_ELEMCONTENT_NOT_FINISHED lxml.etree.ErrorTypes-class.html#ERR_ELEMCONTENT_NOT_FINISHED -lxml.etree.ErrorTypes.ERR_LT_REQUIRED lxml.etree.ErrorTypes-class.html#ERR_LT_REQUIRED -lxml.etree.ErrorTypes.RNGP_PARSE_ERROR lxml.etree.ErrorTypes-class.html#RNGP_PARSE_ERROR -lxml.etree.ErrorTypes.RNGP_HREF_ERROR lxml.etree.ErrorTypes-class.html#RNGP_HREF_ERROR -lxml.etree.ErrorTypes.RNGP_START_MISSING lxml.etree.ErrorTypes-class.html#RNGP_START_MISSING -lxml.etree.ErrorTypes.ERR_EXT_ENTITY_STANDALONE lxml.etree.ErrorTypes-class.html#ERR_EXT_ENTITY_STANDALONE -lxml.etree.ErrorTypes.ERR_ENTITY_IS_PARAMETER lxml.etree.ErrorTypes-class.html#ERR_ENTITY_IS_PARAMETER -lxml.etree.ErrorTypes.RNGP_URI_FRAGMENT lxml.etree.ErrorTypes-class.html#RNGP_URI_FRAGMENT -lxml.etree.ErrorTypes.SCHEMAV_CVC_ELT_5_1_2 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_ELT_5_1_2 -lxml.etree.ErrorTypes.ERR_XMLDECL_NOT_STARTED lxml.etree.ErrorTypes-class.html#ERR_XMLDECL_NOT_STARTED -lxml.etree.ErrorTypes.XINCLUDE_NO_HREF lxml.etree.ErrorTypes-class.html#XINCLUDE_NO_HREF -lxml.etree.ErrorTypes.SCHEMAV_CVC_ELT_5_1_1 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_ELT_5_1_1 -lxml.etree.ErrorTypes.CHECK_FOUND_ATTRIBUTE lxml.etree.ErrorTypes-class.html#CHECK_FOUND_ATTRIBUTE -lxml.etree.ErrorTypes.ERR_USER_STOP lxml.etree.ErrorTypes-class.html#ERR_USER_STOP -lxml.etree.ErrorTypes.SCHEMAP_SIMPLETYPE_NONAME lxml.etree.ErrorTypes-class.html#SCHEMAP_SIMPLETYPE_NONAME -lxml.etree.ErrorTypes.SCHEMAP_SRC_INCLUDE lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_INCLUDE -lxml.etree.ErrorTypes.RNGP_INTERLEAVE_ADD lxml.etree.ErrorTypes-class.html#RNGP_INTERLEAVE_ADD -lxml.etree.ErrorTypes.CHECK_NO_HREF lxml.etree.ErrorTypes-class.html#CHECK_NO_HREF -lxml.etree.ErrorTypes.RNGP_TYPE_VALUE lxml.etree.ErrorTypes-class.html#RNGP_TYPE_VALUE -lxml.etree.ErrorTypes.SCHEMAP_EXTENSION_NO_BASE lxml.etree.ErrorTypes-class.html#SCHEMAP_EXTENSION_NO_BASE -lxml.etree.ErrorTypes.RNGP_PAT_ANYNAME_EXCEPT_ANYNAME lxml.etree.ErrorTypes-class.html#RNGP_PAT_ANYNAME_EXCEPT_ANYNAME -lxml.etree.ErrorTypes.SCHEMAP_REDEFINED_TYPE lxml.etree.ErrorTypes-class.html#SCHEMAP_REDEFINED_TYPE -lxml.etree.ErrorTypes.ERR_ENTITYREF_AT_EOF lxml.etree.ErrorTypes-class.html#ERR_ENTITYREF_AT_EOF -lxml.etree.ErrorTypes.C14N_CREATE_CTXT lxml.etree.ErrorTypes-class.html#C14N_CREATE_CTXT -lxml.etree.ErrorTypes.SCHEMAP_COS_ST_RESTRICTS_3_3_2_3 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_ST_RESTRICTS_3_3_2_3 -lxml.etree.ErrorTypes.SCHEMAP_COS_ST_RESTRICTS_3_3_2_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_ST_RESTRICTS_3_3_2_2 -lxml.etree.ErrorTypes.RNGP_PAT_START_ONEMORE lxml.etree.ErrorTypes-class.html#RNGP_PAT_START_ONEMORE -lxml.etree.ErrorTypes.ERR_ENTITY_BOUNDARY lxml.etree.ErrorTypes-class.html#ERR_ENTITY_BOUNDARY -lxml.etree.ErrorTypes.SCHEMAP_COS_ST_RESTRICTS_3_3_2_5 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_ST_RESTRICTS_3_3_2_5 -lxml.etree.ErrorTypes.SCHEMAP_COS_ST_RESTRICTS_3_3_2_4 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_ST_RESTRICTS_3_3_2_4 -lxml.etree.ErrorTypes.ERR_UNKNOWN_ENCODING lxml.etree.ErrorTypes-class.html#ERR_UNKNOWN_ENCODING -lxml.etree.ErrorTypes.HTML_UNKNOWN_TAG lxml.etree.ErrorTypes-class.html#HTML_UNKNOWN_TAG -lxml.etree.ErrorTypes.SCHEMAP_INVALID_REF_AND_SUBTYPE lxml.etree.ErrorTypes-class.html#SCHEMAP_INVALID_REF_AND_SUBTYPE -lxml.etree.ErrorTypes.DTD_INVALID_DEFAULT lxml.etree.ErrorTypes-class.html#DTD_INVALID_DEFAULT -lxml.etree.ErrorTypes.C14N_RELATIVE_NAMESPACE lxml.etree.ErrorTypes-class.html#C14N_RELATIVE_NAMESPACE -lxml.etree.ErrorTypes.SCHEMAP_FACET_NO_VALUE lxml.etree.ErrorTypes-class.html#SCHEMAP_FACET_NO_VALUE -lxml.etree.ErrorTypes.CHECK_NO_DOC lxml.etree.ErrorTypes-class.html#CHECK_NO_DOC -lxml.etree.ErrorTypes.IO_EFBIG lxml.etree.ErrorTypes-class.html#IO_EFBIG -lxml.etree.ErrorTypes.SCHEMAP_INVALID_WHITE_SPACE lxml.etree.ErrorTypes-class.html#SCHEMAP_INVALID_WHITE_SPACE -lxml.etree.ErrorTypes.RNGP_NSNAME_ATTR_ANCESTOR lxml.etree.ErrorTypes-class.html#RNGP_NSNAME_ATTR_ANCESTOR -lxml.etree.ErrorTypes.DTD_NO_ROOT lxml.etree.ErrorTypes-class.html#DTD_NO_ROOT -lxml.etree.ErrorTypes.SCHEMAP_S4S_ELEM_NOT_ALLOWED lxml.etree.ErrorTypes-class.html#SCHEMAP_S4S_ELEM_NOT_ALLOWED -lxml.etree.ErrorTypes.RNGP_START_CHOICE_AND_INTERLEAVE lxml.etree.ErrorTypes-class.html#RNGP_START_CHOICE_AND_INTERLEAVE -lxml.etree.ErrorTypes.DTD_UNKNOWN_NOTATION lxml.etree.ErrorTypes-class.html#DTD_UNKNOWN_NOTATION -lxml.etree.ErrorTypes.ERR_NS_DECL_ERROR lxml.etree.ErrorTypes-class.html#ERR_NS_DECL_ERROR -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_GROUP_CHILD lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_GROUP_CHILD -lxml.etree.ErrorTypes.RNGP_PAT_LIST_LIST lxml.etree.ErrorTypes-class.html#RNGP_PAT_LIST_LIST -lxml.etree.ErrorTypes.CHECK_WRONG_DOC lxml.etree.ErrorTypes-class.html#CHECK_WRONG_DOC -lxml.etree.ErrorTypes.ERR_LITERAL_NOT_FINISHED lxml.etree.ErrorTypes-class.html#ERR_LITERAL_NOT_FINISHED -lxml.etree.ErrorTypes.CHECK_FOUND_CDATA lxml.etree.ErrorTypes-class.html#CHECK_FOUND_CDATA -lxml.etree.ErrorTypes.SAVE_UNKNOWN_ENCODING lxml.etree.ErrorTypes-class.html#SAVE_UNKNOWN_ENCODING -lxml.etree.ErrorTypes.RNGP_GRAMMAR_MISSING lxml.etree.ErrorTypes-class.html#RNGP_GRAMMAR_MISSING -lxml.etree.ErrorTypes.SCHEMAV_NOTSIMPLE lxml.etree.ErrorTypes-class.html#SCHEMAV_NOTSIMPLE -lxml.etree.ErrorTypes.DTD_ID_REDEFINED lxml.etree.ErrorTypes-class.html#DTD_ID_REDEFINED -lxml.etree.ErrorTypes.SCHEMAP_REDEFINED_ATTR lxml.etree.ErrorTypes-class.html#SCHEMAP_REDEFINED_ATTR -lxml.etree.ErrorTypes.RNGP_ERROR_TYPE_LIB lxml.etree.ErrorTypes-class.html#RNGP_ERROR_TYPE_LIB -lxml.etree.ErrorTypes.CHECK_NAME_NOT_NULL lxml.etree.ErrorTypes-class.html#CHECK_NAME_NOT_NULL -lxml.etree.ErrorTypes.IO_UNKNOWN lxml.etree.ErrorTypes-class.html#IO_UNKNOWN -lxml.etree.ErrorTypes.HTTP_URL_SYNTAX lxml.etree.ErrorTypes-class.html#HTTP_URL_SYNTAX -lxml.etree.ErrorTypes.RNGP_NAME_MISSING lxml.etree.ErrorTypes-class.html#RNGP_NAME_MISSING -lxml.etree.ErrorTypes.CHECK_WRONG_NEXT lxml.etree.ErrorTypes-class.html#CHECK_WRONG_NEXT -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD -lxml.etree.ErrorTypes.SCHEMAP_NOATTR_NOREF lxml.etree.ErrorTypes-class.html#SCHEMAP_NOATTR_NOREF -lxml.etree.ErrorTypes.SAVE_NOT_UTF8 lxml.etree.ErrorTypes-class.html#SAVE_NOT_UTF8 -lxml.etree.ErrorTypes.SCHEMAP_COS_ST_RESTRICTS_3_3_2_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_ST_RESTRICTS_3_3_2_1 -lxml.etree.ErrorTypes.CHECK_NOT_UTF8 lxml.etree.ErrorTypes-class.html#CHECK_NOT_UTF8 -lxml.etree.ErrorTypes.DTD_NO_DTD lxml.etree.ErrorTypes-class.html#DTD_NO_DTD -lxml.etree.ErrorTypes.RNGP_PAT_LIST_INTERLEAVE lxml.etree.ErrorTypes-class.html#RNGP_PAT_LIST_INTERLEAVE -lxml.etree.ErrorTypes.ERR_ENTITY_PE_INTERNAL lxml.etree.ErrorTypes-class.html#ERR_ENTITY_PE_INTERNAL -lxml.etree.ErrorTypes.RNGP_INTERLEAVE_NO_CONTENT lxml.etree.ErrorTypes-class.html#RNGP_INTERLEAVE_NO_CONTENT -lxml.etree.ErrorTypes.ERR_CONDSEC_INVALID lxml.etree.ErrorTypes-class.html#ERR_CONDSEC_INVALID -lxml.etree.ErrorTypes.RNGP_ELEM_CONTENT_EMPTY lxml.etree.ErrorTypes-class.html#RNGP_ELEM_CONTENT_EMPTY -lxml.etree.ErrorTypes.SCHEMAP_NOROOT lxml.etree.ErrorTypes-class.html#SCHEMAP_NOROOT -lxml.etree.ErrorTypes.CHECK_UNKNOWN_NODE lxml.etree.ErrorTypes-class.html#CHECK_UNKNOWN_NODE -lxml.etree.ErrorTypes.XINCLUDE_UNKNOWN_ENCODING lxml.etree.ErrorTypes-class.html#XINCLUDE_UNKNOWN_ENCODING -lxml.etree.ErrorTypes.XPATH_INVALID_TYPE lxml.etree.ErrorTypes-class.html#XPATH_INVALID_TYPE -lxml.etree.ErrorTypes.RNGP_PARENTREF_CREATE_FAILED lxml.etree.ErrorTypes-class.html#RNGP_PARENTREF_CREATE_FAILED -lxml.etree.ErrorTypes.CHECK_NO_PREV lxml.etree.ErrorTypes-class.html#CHECK_NO_PREV -lxml.etree.ErrorTypes.XPATH_INVALID_CTXT_SIZE lxml.etree.ErrorTypes-class.html#XPATH_INVALID_CTXT_SIZE -lxml.etree.ErrorTypes.RNGP_DATA_CONTENT lxml.etree.ErrorTypes-class.html#RNGP_DATA_CONTENT -lxml.etree.ErrorTypes.SCHEMAP_S4S_ELEM_MISSING lxml.etree.ErrorTypes-class.html#SCHEMAP_S4S_ELEM_MISSING -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_BASE_TYPE lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_BASE_TYPE -lxml.etree.ErrorTypes.XINCLUDE_NO_FALLBACK lxml.etree.ErrorTypes-class.html#XINCLUDE_NO_FALLBACK -lxml.etree.ErrorTypes.IO_WRITE lxml.etree.ErrorTypes-class.html#IO_WRITE -lxml.etree.ErrorTypes.SCHEMAP_SRC_RESOLVE lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_RESOLVE -lxml.etree.ErrorTypes.SCHEMAP_COS_ST_RESTRICTS_3_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_ST_RESTRICTS_3_1 -lxml.etree.ErrorTypes.SCHEMAV_DOCUMENT_ELEMENT_MISSING lxml.etree.ErrorTypes-class.html#SCHEMAV_DOCUMENT_ELEMENT_MISSING -lxml.etree.ErrorTypes.RNGP_PAT_DATA_EXCEPT_REF lxml.etree.ErrorTypes-class.html#RNGP_PAT_DATA_EXCEPT_REF -lxml.etree.ErrorTypes.CHECK_NO_NAME lxml.etree.ErrorTypes-class.html#CHECK_NO_NAME -lxml.etree.ErrorTypes.IO_ENOSPC lxml.etree.ErrorTypes-class.html#IO_ENOSPC -lxml.etree.ErrorTypes.SCHEMAP_AU_PROPS_CORRECT lxml.etree.ErrorTypes-class.html#SCHEMAP_AU_PROPS_CORRECT -lxml.etree.ErrorTypes.TREE_NOT_UTF8 lxml.etree.ErrorTypes-class.html#TREE_NOT_UTF8 -lxml.etree.ErrorTypes.RNGP_PAT_LIST_ELEM lxml.etree.ErrorTypes-class.html#RNGP_PAT_LIST_ELEM -lxml.etree.ErrorTypes.XPATH_EXPRESSION_OK lxml.etree.ErrorTypes-class.html#XPATH_EXPRESSION_OK -lxml.etree.ErrorTypes.XPTR_SUB_RESOURCE_ERROR lxml.etree.ErrorTypes-class.html#XPTR_SUB_RESOURCE_ERROR -lxml.etree.ErrorTypes.SCHEMAP_ELEM_DEFAULT_FIXED lxml.etree.ErrorTypes-class.html#SCHEMAP_ELEM_DEFAULT_FIXED -lxml.etree.ErrorTypes.WAR_ENTITY_REDEFINED lxml.etree.ErrorTypes-class.html#WAR_ENTITY_REDEFINED -lxml.etree.ErrorTypes.DTD_XMLID_VALUE lxml.etree.ErrorTypes-class.html#DTD_XMLID_VALUE -lxml.etree.ErrorTypes.SCHEMAV_CVC_COMPLEX_TYPE_2_2 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_COMPLEX_TYPE_2_2 -lxml.etree.ErrorTypes.RNGP_GRAMMAR_CONTENT lxml.etree.ErrorTypes-class.html#RNGP_GRAMMAR_CONTENT -lxml.etree.ErrorTypes.ERR_CHARREF_IN_DTD lxml.etree.ErrorTypes-class.html#ERR_CHARREF_IN_DTD -lxml.etree.ErrorTypes.I18N_NO_HANDLER lxml.etree.ErrorTypes-class.html#I18N_NO_HANDLER -lxml.etree.ErrorTypes.SCHEMAV_CVC_FACET_VALID lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_FACET_VALID -lxml.etree.ErrorTypes.DTD_MIXED_CORRUPT lxml.etree.ErrorTypes-class.html#DTD_MIXED_CORRUPT -lxml.etree.ErrorTypes.ERR_INVALID_DEC_CHARREF lxml.etree.ErrorTypes-class.html#ERR_INVALID_DEC_CHARREF -lxml.etree.ErrorTypes.SCHEMAV_CVC_TOTALDIGITS_VALID lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_TOTALDIGITS_VALID -lxml.etree.ErrorTypes.CHECK_NOT_NCNAME lxml.etree.ErrorTypes-class.html#CHECK_NOT_NCNAME -lxml.etree.ErrorTypes.SCHEMAP_INVALID_ENUM lxml.etree.ErrorTypes-class.html#SCHEMAP_INVALID_ENUM -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_MEMBER_TYPE lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_MEMBER_TYPE -lxml.etree.ErrorTypes.ERR_SPACE_REQUIRED lxml.etree.ErrorTypes-class.html#ERR_SPACE_REQUIRED -lxml.etree.ErrorTypes.SCHEMAP_COMPLEXTYPE_NONAME_NOREF lxml.etree.ErrorTypes-class.html#SCHEMAP_COMPLEXTYPE_NONAME_NOREF -lxml.etree.ErrorTypes.RNGP_PAT_START_EMPTY lxml.etree.ErrorTypes-class.html#RNGP_PAT_START_EMPTY -lxml.etree.ErrorTypes.ERR_DOCUMENT_EMPTY lxml.etree.ErrorTypes-class.html#ERR_DOCUMENT_EMPTY -lxml.etree.ErrorTypes.SCHEMAV_EXTRACONTENT lxml.etree.ErrorTypes-class.html#SCHEMAV_EXTRACONTENT -lxml.etree.ErrorTypes.SAVE_CHAR_INVALID lxml.etree.ErrorTypes-class.html#SAVE_CHAR_INVALID -lxml.etree.ErrorTypes.RNGP_XML_NS lxml.etree.ErrorTypes-class.html#RNGP_XML_NS -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD -lxml.etree.ErrorTypes.DTD_ATTRIBUTE_DEFAULT lxml.etree.ErrorTypes-class.html#DTD_ATTRIBUTE_DEFAULT -lxml.etree.ErrorTypes.IO_ENOTSUP lxml.etree.ErrorTypes-class.html#IO_ENOTSUP -lxml.etree.ErrorTypes.DTD_UNKNOWN_ATTRIBUTE lxml.etree.ErrorTypes-class.html#DTD_UNKNOWN_ATTRIBUTE -lxml.etree.ErrorTypes.XINCLUDE_INCLUDE_IN_INCLUDE lxml.etree.ErrorTypes-class.html#XINCLUDE_INCLUDE_IN_INCLUDE -lxml.etree.ErrorTypes.XPATH_UNFINISHED_LITERAL_ERROR lxml.etree.ErrorTypes-class.html#XPATH_UNFINISHED_LITERAL_ERROR -lxml.etree.ErrorTypes.SCHEMAP_ATTRGRP_NONAME_NOREF lxml.etree.ErrorTypes-class.html#SCHEMAP_ATTRGRP_NONAME_NOREF -lxml.etree.ErrorTypes.SCHEMAV_WRONGELEM lxml.etree.ErrorTypes-class.html#SCHEMAV_WRONGELEM -lxml.etree.ErrorTypes.SCHEMAP_INVALID_MINOCCURS lxml.etree.ErrorTypes-class.html#SCHEMAP_INVALID_MINOCCURS -lxml.etree.ErrorTypes.RNGP_PARENTREF_NAME_INVALID lxml.etree.ErrorTypes-class.html#RNGP_PARENTREF_NAME_INVALID -lxml.etree.ErrorTypes.SCHEMAP_COS_ST_RESTRICTS_1_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_ST_RESTRICTS_1_1 -lxml.etree.ErrorTypes.SCHEMAP_COS_ST_RESTRICTS_1_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_ST_RESTRICTS_1_2 -lxml.etree.ErrorTypes.IO_ENODEV lxml.etree.ErrorTypes-class.html#IO_ENODEV -lxml.etree.ErrorTypes.SCHEMAP_COS_VALID_DEFAULT_2_2_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_VALID_DEFAULT_2_2_2 -lxml.etree.ErrorTypes.IO_EBUSY lxml.etree.ErrorTypes-class.html#IO_EBUSY -lxml.etree.ErrorTypes.C14N_REQUIRES_UTF8 lxml.etree.ErrorTypes-class.html#C14N_REQUIRES_UTF8 -lxml.etree.ErrorTypes.SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE -lxml.etree.ErrorTypes.ERR_URI_REQUIRED lxml.etree.ErrorTypes-class.html#ERR_URI_REQUIRED -lxml.etree.ErrorTypes.IO_EADDRINUSE lxml.etree.ErrorTypes-class.html#IO_EADDRINUSE -lxml.etree.ErrorTypes.SCHEMAV_INTERNAL lxml.etree.ErrorTypes-class.html#SCHEMAV_INTERNAL -lxml.etree.ErrorTypes.RNGP_VALUE_NO_CONTENT lxml.etree.ErrorTypes-class.html#RNGP_VALUE_NO_CONTENT -lxml.etree.ErrorTypes.NS_ERR_UNDEFINED_NAMESPACE lxml.etree.ErrorTypes-class.html#NS_ERR_UNDEFINED_NAMESPACE -lxml.etree.ErrorTypes.SCHEMAP_A_PROPS_CORRECT_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_A_PROPS_CORRECT_2 -lxml.etree.ErrorTypes.CHECK_FOUND_ELEMENT lxml.etree.ErrorTypes-class.html#CHECK_FOUND_ELEMENT -lxml.etree.ErrorTypes.RNGP_ELEM_CONTENT_ERROR lxml.etree.ErrorTypes-class.html#RNGP_ELEM_CONTENT_ERROR -lxml.etree.ErrorTypes.SCHEMAP_RESTRICTION_NONAME_NOREF lxml.etree.ErrorTypes-class.html#SCHEMAP_RESTRICTION_NONAME_NOREF -lxml.etree.ErrorTypes.HTTP_USE_IP lxml.etree.ErrorTypes-class.html#HTTP_USE_IP -lxml.etree.ErrorTypes.SCHEMAP_SRC_ELEMENT_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_ELEMENT_1 -lxml.etree.ErrorTypes.SCHEMAP_SRC_ELEMENT_3 lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_ELEMENT_3 -lxml.etree.ErrorTypes.ERR_ATTRIBUTE_NOT_FINISHED lxml.etree.ErrorTypes-class.html#ERR_ATTRIBUTE_NOT_FINISHED -lxml.etree.ErrorTypes.SCHEMAV_CVC_TYPE_3_1_1 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_TYPE_3_1_1 -lxml.etree.ErrorTypes.SCHEMAV_CVC_TYPE_3_1_2 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_TYPE_3_1_2 -lxml.etree.ErrorTypes.SCHEMATRONV_REPORT lxml.etree.ErrorTypes-class.html#SCHEMATRONV_REPORT -lxml.etree.ErrorTypes.SCHEMAV_MISC lxml.etree.ErrorTypes-class.html#SCHEMAV_MISC -lxml.etree.ErrorTypes.IO_EPIPE lxml.etree.ErrorTypes-class.html#IO_EPIPE -lxml.etree.ErrorTypes.SCHEMAP_SRC_ATTRIBUTE_GROUP_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_ATTRIBUTE_GROUP_1 -lxml.etree.ErrorTypes.SCHEMAP_SRC_ATTRIBUTE_GROUP_3 lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_ATTRIBUTE_GROUP_3 -lxml.etree.ErrorTypes.SCHEMAP_SRC_ATTRIBUTE_GROUP_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_ATTRIBUTE_GROUP_2 -lxml.etree.ErrorTypes.IO_EAFNOSUPPORT lxml.etree.ErrorTypes-class.html#IO_EAFNOSUPPORT -lxml.etree.ErrorTypes.SCHEMAP_WARN_SKIP_SCHEMA lxml.etree.ErrorTypes-class.html#SCHEMAP_WARN_SKIP_SCHEMA -lxml.etree.ErrorTypes.SCHEMAP_A_PROPS_CORRECT_3 lxml.etree.ErrorTypes-class.html#SCHEMAP_A_PROPS_CORRECT_3 -lxml.etree.ErrorTypes.CHECK_FOUND_DOCTYPE lxml.etree.ErrorTypes-class.html#CHECK_FOUND_DOCTYPE -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD -lxml.etree.ErrorTypes.TREE_UNTERMINATED_ENTITY lxml.etree.ErrorTypes-class.html#TREE_UNTERMINATED_ENTITY -lxml.etree.ErrorTypes.SCHEMAV_CVC_COMPLEX_TYPE_1 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_COMPLEX_TYPE_1 -lxml.etree.ErrorTypes.WAR_UNDECLARED_ENTITY lxml.etree.ErrorTypes-class.html#WAR_UNDECLARED_ENTITY -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD -lxml.etree.ErrorTypes.SCHEMAV_CVC_COMPLEX_TYPE_4 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_COMPLEX_TYPE_4 -lxml.etree.ErrorTypes.RNGP_UNKNOWN_CONSTRUCT lxml.etree.ErrorTypes-class.html#RNGP_UNKNOWN_CONSTRUCT -lxml.etree.ErrorTypes.SCHEMAP_WARN_ATTR_REDECL_PROH lxml.etree.ErrorTypes-class.html#SCHEMAP_WARN_ATTR_REDECL_PROH -lxml.etree.ErrorTypes.ERR_ENTITY_IS_EXTERNAL lxml.etree.ErrorTypes-class.html#ERR_ENTITY_IS_EXTERNAL -lxml.etree.ErrorTypes.SCHEMAP_COS_ST_RESTRICTS_3_3_1_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_ST_RESTRICTS_3_3_1_2 -lxml.etree.ErrorTypes.RNGP_INVALID_DEFINE_NAME lxml.etree.ErrorTypes-class.html#RNGP_INVALID_DEFINE_NAME -lxml.etree.ErrorTypes.SCHEMAP_PREFIX_UNDEFINED lxml.etree.ErrorTypes-class.html#SCHEMAP_PREFIX_UNDEFINED -lxml.etree.ErrorTypes.RNGP_PAT_DATA_EXCEPT_EMPTY lxml.etree.ErrorTypes-class.html#RNGP_PAT_DATA_EXCEPT_EMPTY -lxml.etree.ErrorTypes.SCHEMAV_INVALIDELEM lxml.etree.ErrorTypes-class.html#SCHEMAV_INVALIDELEM -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_IMPORT_CHILD lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_IMPORT_CHILD -lxml.etree.ErrorTypes.RNGP_EXTERNALREF_EMTPY lxml.etree.ErrorTypes-class.html#RNGP_EXTERNALREF_EMTPY -lxml.etree.ErrorTypes.SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE lxml.etree.ErrorTypes-class.html#SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE -lxml.etree.ErrorTypes.IO_EALREADY lxml.etree.ErrorTypes-class.html#IO_EALREADY -lxml.etree.ErrorTypes.WAR_NS_URI lxml.etree.ErrorTypes-class.html#WAR_NS_URI -lxml.etree.ErrorTypes.SCHEMAP_REF_AND_CONTENT lxml.etree.ErrorTypes-class.html#SCHEMAP_REF_AND_CONTENT -lxml.etree.ErrorTypes.ERR_UNDECLARED_ENTITY lxml.etree.ErrorTypes-class.html#ERR_UNDECLARED_ENTITY -lxml.etree.ErrorTypes.IO_NETWORK_ATTEMPT lxml.etree.ErrorTypes-class.html#IO_NETWORK_ATTEMPT -lxml.etree.ErrorTypes.ERR_INVALID_CHAR lxml.etree.ErrorTypes-class.html#ERR_INVALID_CHAR -lxml.etree.ErrorTypes.SCHEMAV_CVC_ELT_5_2_1 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_ELT_5_2_1 -lxml.etree.ErrorTypes.SCHEMAP_GROUP_NONAME_NOREF lxml.etree.ErrorTypes-class.html#SCHEMAP_GROUP_NONAME_NOREF -lxml.etree.ErrorTypes.ERR_LITERAL_NOT_STARTED lxml.etree.ErrorTypes-class.html#ERR_LITERAL_NOT_STARTED -lxml.etree.ErrorTypes.SCHEMAP_CT_PROPS_CORRECT_5 lxml.etree.ErrorTypes-class.html#SCHEMAP_CT_PROPS_CORRECT_5 -lxml.etree.ErrorTypes.SCHEMAP_REDEFINED_ELEMENT lxml.etree.ErrorTypes-class.html#SCHEMAP_REDEFINED_ELEMENT -lxml.etree.ErrorTypes.SCHEMAP_CVC_SIMPLE_TYPE lxml.etree.ErrorTypes-class.html#SCHEMAP_CVC_SIMPLE_TYPE -lxml.etree.ErrorTypes.ERR_UNKNOWN_VERSION lxml.etree.ErrorTypes-class.html#ERR_UNKNOWN_VERSION -lxml.etree.ErrorTypes.SCHEMAP_NOT_SCHEMA lxml.etree.ErrorTypes-class.html#SCHEMAP_NOT_SCHEMA -lxml.etree.ErrorTypes.RNGP_UNKNOWN_COMBINE lxml.etree.ErrorTypes-class.html#RNGP_UNKNOWN_COMBINE -lxml.etree.ErrorTypes.SCHEMAP_SRC_ELEMENT_2_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_ELEMENT_2_1 -lxml.etree.ErrorTypes.CHECK_NOT_DTD lxml.etree.ErrorTypes-class.html#CHECK_NOT_DTD -lxml.etree.ErrorTypes.CHECK_NO_NEXT lxml.etree.ErrorTypes-class.html#CHECK_NO_NEXT -lxml.etree.ErrorTypes.ERR_NOT_WELL_BALANCED lxml.etree.ErrorTypes-class.html#ERR_NOT_WELL_BALANCED -lxml.etree.ErrorTypes.RNGP_REF_CYCLE lxml.etree.ErrorTypes-class.html#RNGP_REF_CYCLE -lxml.etree.ErrorTypes.SCHEMAP_CT_PROPS_CORRECT_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_CT_PROPS_CORRECT_1 -lxml.etree.ErrorTypes.SCHEMAV_FACET lxml.etree.ErrorTypes-class.html#SCHEMAV_FACET -lxml.etree.ErrorTypes.ERR_ENCODING_NAME lxml.etree.ErrorTypes-class.html#ERR_ENCODING_NAME -lxml.etree.ErrorTypes.SCHEMAV_NOROOT lxml.etree.ErrorTypes-class.html#SCHEMAV_NOROOT -lxml.etree.ErrorTypes.DTD_XMLID_TYPE lxml.etree.ErrorTypes-class.html#DTD_XMLID_TYPE -lxml.etree.ErrorTypes.C14N_CREATE_STACK lxml.etree.ErrorTypes-class.html#C14N_CREATE_STACK -lxml.etree.ErrorTypes.SCHEMAV_CVC_TYPE_2 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_TYPE_2 -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_SEQUENCE_CHILD lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_SEQUENCE_CHILD -lxml.etree.ErrorTypes.SCHEMAV_CVC_TYPE_1 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_TYPE_1 -lxml.etree.ErrorTypes.IO_ENXIO lxml.etree.ErrorTypes-class.html#IO_ENXIO -lxml.etree.ErrorTypes.SCHEMAV_CVC_PATTERN_VALID lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_PATTERN_VALID -lxml.etree.ErrorTypes.ERR_ATTRIBUTE_WITHOUT_VALUE lxml.etree.ErrorTypes-class.html#ERR_ATTRIBUTE_WITHOUT_VALUE -lxml.etree.ErrorTypes.BUF_OVERFLOW lxml.etree.ErrorTypes-class.html#BUF_OVERFLOW -lxml.etree.ErrorTypes.SCHEMAP_INCLUDE_SCHEMA_NOT_URI lxml.etree.ErrorTypes-class.html#SCHEMAP_INCLUDE_SCHEMA_NOT_URI -lxml.etree.ErrorTypes.SCHEMAP_REDEFINED_ATTRGROUP lxml.etree.ErrorTypes-class.html#SCHEMAP_REDEFINED_ATTRGROUP -lxml.etree.ErrorTypes.SCHEMAV_INVALIDATTR lxml.etree.ErrorTypes-class.html#SCHEMAV_INVALIDATTR -lxml.etree.ErrorTypes.ERR_OK lxml.etree.ErrorTypes-class.html#ERR_OK -lxml.etree.ErrorTypes.ERR_EQUAL_REQUIRED lxml.etree.ErrorTypes-class.html#ERR_EQUAL_REQUIRED -lxml.etree.ErrorTypes.NS_ERR_XML_NAMESPACE lxml.etree.ErrorTypes-class.html#NS_ERR_XML_NAMESPACE -lxml.etree.ErrorTypes.ERR_EXTRA_CONTENT lxml.etree.ErrorTypes-class.html#ERR_EXTRA_CONTENT -lxml.etree.ErrorTypes.DTD_MULTIPLE_ID lxml.etree.ErrorTypes-class.html#DTD_MULTIPLE_ID -lxml.etree.ErrorTypes.IO_ECONNREFUSED lxml.etree.ErrorTypes-class.html#IO_ECONNREFUSED -lxml.etree.ErrorTypes.XPTR_UNKNOWN_SCHEME lxml.etree.ErrorTypes-class.html#XPTR_UNKNOWN_SCHEME -lxml.etree.ErrorTypes.SCHEMAV_CVC_COMPLEX_TYPE_5_2 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_COMPLEX_TYPE_5_2 -lxml.etree.ErrorTypes.SCHEMAV_CVC_COMPLEX_TYPE_5_1 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_COMPLEX_TYPE_5_1 -lxml.etree.ErrorTypes.RNGP_PAT_ONEMORE_INTERLEAVE_ATTR lxml.etree.ErrorTypes-class.html#RNGP_PAT_ONEMORE_INTERLEAVE_ATTR -lxml.etree.ErrorTypes.XINCLUDE_ENTITY_DEF_MISMATCH lxml.etree.ErrorTypes-class.html#XINCLUDE_ENTITY_DEF_MISMATCH -lxml.etree.ErrorTypes.SCHEMAP_COS_ST_RESTRICTS_3_3_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_ST_RESTRICTS_3_3_1 -lxml.etree.ErrorTypes.SCHEMAP_MG_PROPS_CORRECT_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_MG_PROPS_CORRECT_1 -lxml.etree.ErrorTypes.SCHEMAP_SRC_ATTRIBUTE_3_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_ATTRIBUTE_3_2 -lxml.etree.ErrorTypes.SCHEMAP_SRC_ATTRIBUTE_3_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_ATTRIBUTE_3_1 -lxml.etree.ErrorTypes.SCHEMAP_MG_PROPS_CORRECT_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_MG_PROPS_CORRECT_2 -lxml.etree.ErrorTypes.RNGP_PAT_START_VALUE lxml.etree.ErrorTypes-class.html#RNGP_PAT_START_VALUE -lxml.etree.ErrorTypes.DTD_ROOT_NAME lxml.etree.ErrorTypes-class.html#DTD_ROOT_NAME -lxml.etree.ErrorTypes.IO_EISDIR lxml.etree.ErrorTypes-class.html#IO_EISDIR -lxml.etree.ErrorTypes.IO_EINPROGRESS lxml.etree.ErrorTypes-class.html#IO_EINPROGRESS -lxml.etree.ErrorTypes.IO_EDEADLK lxml.etree.ErrorTypes-class.html#IO_EDEADLK -lxml.etree.ErrorTypes.SCHEMAP_COS_ST_DERIVED_OK_2_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_ST_DERIVED_OK_2_2 -lxml.etree.ErrorTypes.SCHEMAV_CVC_ELT_5_2_2_1 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_ELT_5_2_2_1 -lxml.etree.ErrorTypes.SCHEMAP_P_PROPS_CORRECT_2_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_P_PROPS_CORRECT_2_2 -lxml.etree.ErrorTypes.SCHEMAP_INVALID_FACET lxml.etree.ErrorTypes-class.html#SCHEMAP_INVALID_FACET -lxml.etree.ErrorTypes.SCHEMAP_P_PROPS_CORRECT_2_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_P_PROPS_CORRECT_2_1 -lxml.etree.ErrorTypes.XINCLUDE_BUILD_FAILED lxml.etree.ErrorTypes-class.html#XINCLUDE_BUILD_FAILED -lxml.etree.ErrorTypes.ERR_PEREF_AT_EOF lxml.etree.ErrorTypes-class.html#ERR_PEREF_AT_EOF -lxml.etree.ErrorTypes.IO_ENOLCK lxml.etree.ErrorTypes-class.html#IO_ENOLCK -lxml.etree.ErrorTypes.DTD_MISSING_ATTRIBUTE lxml.etree.ErrorTypes-class.html#DTD_MISSING_ATTRIBUTE -lxml.etree.ErrorTypes.SCHEMAV_CVC_COMPLEX_TYPE_3_1 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_COMPLEX_TYPE_3_1 -lxml.etree.ErrorTypes.CHECK_FOUND_ENTITYREF lxml.etree.ErrorTypes-class.html#CHECK_FOUND_ENTITYREF -lxml.etree.ErrorTypes.RNGP_PARAM_FORBIDDEN lxml.etree.ErrorTypes-class.html#RNGP_PARAM_FORBIDDEN -lxml.etree.ErrorTypes.DTD_ELEM_NAMESPACE lxml.etree.ErrorTypes-class.html#DTD_ELEM_NAMESPACE -lxml.etree.ErrorTypes.SCHEMAP_FAILED_LOAD lxml.etree.ErrorTypes-class.html#SCHEMAP_FAILED_LOAD -lxml.etree.ErrorTypes.SCHEMAP_SRC_SIMPLE_TYPE_4 lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_SIMPLE_TYPE_4 -lxml.etree.ErrorTypes.DTD_ID_FIXED lxml.etree.ErrorTypes-class.html#DTD_ID_FIXED -lxml.etree.ErrorTypes.SCHEMAP_SRC_SIMPLE_TYPE_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_SIMPLE_TYPE_1 -lxml.etree.ErrorTypes.SCHEMAP_SRC_SIMPLE_TYPE_2 lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_SIMPLE_TYPE_2 -lxml.etree.ErrorTypes.SCHEMAP_SRC_SIMPLE_TYPE_3 lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_SIMPLE_TYPE_3 -lxml.etree.ErrorTypes.SCHEMAV_CVC_COMPLEX_TYPE_3_2_1 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_COMPLEX_TYPE_3_2_1 -lxml.etree.ErrorTypes.XINCLUDE_PARSE_VALUE lxml.etree.ErrorTypes-class.html#XINCLUDE_PARSE_VALUE -lxml.etree.ErrorTypes.RNGP_INCLUDE_FAILURE lxml.etree.ErrorTypes-class.html#RNGP_INCLUDE_FAILURE -lxml.etree.ErrorTypes.CHECK_NO_DICT lxml.etree.ErrorTypes-class.html#CHECK_NO_DICT -lxml.etree.ErrorTypes.CHECK_NOT_ELEM_DECL lxml.etree.ErrorTypes-class.html#CHECK_NOT_ELEM_DECL -lxml.etree.ErrorTypes.XPTR_CHILDSEQ_START lxml.etree.ErrorTypes-class.html#XPTR_CHILDSEQ_START -lxml.etree.ErrorTypes.RNGP_ATTRIBUTE_EMPTY lxml.etree.ErrorTypes-class.html#RNGP_ATTRIBUTE_EMPTY -lxml.etree.ErrorTypes.ERR_ENTITYREF_NO_NAME lxml.etree.ErrorTypes-class.html#ERR_ENTITYREF_NO_NAME -lxml.etree.ErrorTypes.RNGP_UNKNOWN_ATTRIBUTE lxml.etree.ErrorTypes-class.html#RNGP_UNKNOWN_ATTRIBUTE -lxml.etree.ErrorTypes.SCHEMAP_COS_VALID_DEFAULT_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_VALID_DEFAULT_1 -lxml.etree.ErrorTypes.DTD_INVALID_CHILD lxml.etree.ErrorTypes-class.html#DTD_INVALID_CHILD -lxml.etree.ErrorTypes.SCHEMAV_CVC_ELT_4_2 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_ELT_4_2 -lxml.etree.ErrorTypes.RNGP_EXCEPT_EMPTY lxml.etree.ErrorTypes-class.html#RNGP_EXCEPT_EMPTY -lxml.etree.ErrorTypes.RNGP_PAT_ATTR_ATTR lxml.etree.ErrorTypes-class.html#RNGP_PAT_ATTR_ATTR -lxml.etree.ErrorTypes.ERR_GT_REQUIRED lxml.etree.ErrorTypes-class.html#ERR_GT_REQUIRED -lxml.etree.ErrorTypes.RNGP_ATTR_CONFLICT lxml.etree.ErrorTypes-class.html#RNGP_ATTR_CONFLICT -lxml.etree.ErrorTypes.SCHEMAV_CVC_FRACTIONDIGITS_VALID lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_FRACTIONDIGITS_VALID -lxml.etree.ErrorTypes.IO_ETIMEDOUT lxml.etree.ErrorTypes-class.html#IO_ETIMEDOUT -lxml.etree.ErrorTypes.SCHEMAP_C_PROPS_CORRECT lxml.etree.ErrorTypes-class.html#SCHEMAP_C_PROPS_CORRECT -lxml.etree.ErrorTypes.I18N_NO_OUTPUT lxml.etree.ErrorTypes-class.html#I18N_NO_OUTPUT -lxml.etree.ErrorTypes.CHECK_NS_ANCESTOR lxml.etree.ErrorTypes-class.html#CHECK_NS_ANCESTOR -lxml.etree.ErrorTypes.SCHEMAP_INVALID_FACET_VALUE lxml.etree.ErrorTypes-class.html#SCHEMAP_INVALID_FACET_VALUE -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_ALL_CHILD lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_ALL_CHILD -lxml.etree.ErrorTypes.CHECK_FOUND_FRAGMENT lxml.etree.ErrorTypes-class.html#CHECK_FOUND_FRAGMENT -lxml.etree.ErrorTypes.ERR_DOCUMENT_START lxml.etree.ErrorTypes-class.html#ERR_DOCUMENT_START -lxml.etree.ErrorTypes.SCHEMAV_CVC_LENGTH_VALID lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_LENGTH_VALID -lxml.etree.ErrorTypes.SCHEMAV_CVC_MINLENGTH_VALID lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_MINLENGTH_VALID -lxml.etree.ErrorTypes.SCHEMAP_COS_VALID_DEFAULT_2_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_COS_VALID_DEFAULT_2_1 -lxml.etree.ErrorTypes.XINCLUDE_FALLBACK_NOT_IN_INCLUDE lxml.etree.ErrorTypes-class.html#XINCLUDE_FALLBACK_NOT_IN_INCLUDE -lxml.etree.ErrorTypes.ERR_NAME_TOO_LONG lxml.etree.ErrorTypes-class.html#ERR_NAME_TOO_LONG -lxml.etree.ErrorTypes.ERR_TAG_NAME_MISMATCH lxml.etree.ErrorTypes-class.html#ERR_TAG_NAME_MISMATCH -lxml.etree.ErrorTypes.SCHEMAV_CVC_DATATYPE_VALID_1_2_1 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_DATATYPE_VALID_1_2_1 -lxml.etree.ErrorTypes.SCHEMAV_CVC_DATATYPE_VALID_1_2_2 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_DATATYPE_VALID_1_2_2 -lxml.etree.ErrorTypes.SCHEMAV_CVC_DATATYPE_VALID_1_2_3 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_DATATYPE_VALID_1_2_3 -lxml.etree.ErrorTypes.SCHEMAV_CVC_COMPLEX_TYPE_3_2_2 lxml.etree.ErrorTypes-class.html#SCHEMAV_CVC_COMPLEX_TYPE_3_2_2 -lxml.etree.ErrorTypes.CHECK_FOUND_COMMENT lxml.etree.ErrorTypes-class.html#CHECK_FOUND_COMMENT -lxml.etree.ErrorTypes.SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE -lxml.etree.ErrorTypes.SCHEMAP_NOTYPE_NOREF lxml.etree.ErrorTypes-class.html#SCHEMAP_NOTYPE_NOREF -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_SCHEMAS_CHILD lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_SCHEMAS_CHILD -lxml.etree.ErrorTypes.RNGP_ATTRIBUTE_CONTENT lxml.etree.ErrorTypes-class.html#RNGP_ATTRIBUTE_CONTENT -lxml.etree.ErrorTypes.DTD_UNKNOWN_ENTITY lxml.etree.ErrorTypes-class.html#DTD_UNKNOWN_ENTITY -lxml.etree.ErrorTypes.XPATH_UNDEF_PREFIX_ERROR lxml.etree.ErrorTypes-class.html#XPATH_UNDEF_PREFIX_ERROR -lxml.etree.ErrorTypes.NS_ERR_ATTRIBUTE_REDEFINED lxml.etree.ErrorTypes-class.html#NS_ERR_ATTRIBUTE_REDEFINED -lxml.etree.ErrorTypes.ERR_CONDSEC_NOT_STARTED lxml.etree.ErrorTypes-class.html#ERR_CONDSEC_NOT_STARTED -lxml.etree.ErrorTypes.CHECK_FOUND_PI lxml.etree.ErrorTypes-class.html#CHECK_FOUND_PI -lxml.etree.ErrorTypes.DTD_DUP_TOKEN lxml.etree.ErrorTypes-class.html#DTD_DUP_TOKEN -lxml.etree.ErrorTypes.DTD_ATTRIBUTE_VALUE lxml.etree.ErrorTypes-class.html#DTD_ATTRIBUTE_VALUE -lxml.etree.ErrorTypes.XPATH_INVALID_ARITY lxml.etree.ErrorTypes-class.html#XPATH_INVALID_ARITY -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_EXTENSION_CHILD lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_EXTENSION_CHILD -lxml.etree.ErrorTypes.SCHEMAP_REF_AND_SUBTYPE lxml.etree.ErrorTypes-class.html#SCHEMAP_REF_AND_SUBTYPE -lxml.etree.ErrorTypes.SCHEMAP_SRC_IMPORT lxml.etree.ErrorTypes-class.html#SCHEMAP_SRC_IMPORT -lxml.etree.ErrorTypes.SCHEMAP_NO_XSI lxml.etree.ErrorTypes-class.html#SCHEMAP_NO_XSI -lxml.etree.ErrorTypes.SCHEMAV_HAVEDEFAULT lxml.etree.ErrorTypes-class.html#SCHEMAV_HAVEDEFAULT -lxml.etree.ErrorTypes.RNGP_PAT_DATA_EXCEPT_LIST lxml.etree.ErrorTypes-class.html#RNGP_PAT_DATA_EXCEPT_LIST -lxml.etree.ErrorTypes.SCHEMAP_WARN_UNLOCATED_SCHEMA lxml.etree.ErrorTypes-class.html#SCHEMAP_WARN_UNLOCATED_SCHEMA -lxml.etree.ErrorTypes.ERR_NOT_STANDALONE lxml.etree.ErrorTypes-class.html#ERR_NOT_STANDALONE -lxml.etree.ErrorTypes.SCHEMAP_INVALID_ATTR_COMBINATION lxml.etree.ErrorTypes-class.html#SCHEMAP_INVALID_ATTR_COMBINATION -lxml.etree.ErrorTypes.SCHEMAP_DERIVATION_OK_RESTRICTION_3 lxml.etree.ErrorTypes-class.html#SCHEMAP_DERIVATION_OK_RESTRICTION_3 -lxml.etree.ErrorTypes.SCHEMAP_DERIVATION_OK_RESTRICTION_1 lxml.etree.ErrorTypes-class.html#SCHEMAP_DERIVATION_OK_RESTRICTION_1 -lxml.etree.ErrorTypes.SCHEMAP_UNKNOWN_UNION_CHILD lxml.etree.ErrorTypes-class.html#SCHEMAP_UNKNOWN_UNION_CHILD -lxml.etree.ErrorTypes.XINCLUDE_FALLBACKS_IN_INCLUDE lxml.etree.ErrorTypes-class.html#XINCLUDE_FALLBACKS_IN_INCLUDE -lxml.etree.ErrorTypes.IO_BUFFER_FULL lxml.etree.ErrorTypes-class.html#IO_BUFFER_FULL -lxml.etree.ErrorTypes.TREE_INVALID_DEC lxml.etree.ErrorTypes-class.html#TREE_INVALID_DEC -lxml.etree.ErrorTypes.DTD_STANDALONE_DEFAULTED lxml.etree.ErrorTypes-class.html#DTD_STANDALONE_DEFAULTED -lxml.etree.FallbackElementClassLookup lxml.etree.FallbackElementClassLookup-class.html -lxml.etree.FallbackElementClassLookup.__new__ lxml.etree.FallbackElementClassLookup-class.html#__new__ -lxml.etree.FallbackElementClassLookup.fallback lxml.etree.FallbackElementClassLookup-class.html#fallback -lxml.etree.FallbackElementClassLookup.set_fallback lxml.etree.FallbackElementClassLookup-class.html#set_fallback -lxml.etree.FallbackElementClassLookup.__init__ lxml.etree.FallbackElementClassLookup-class.html#__init__ -lxml.etree.HTMLParser lxml.etree.HTMLParser-class.html -lxml.etree._FeedParser.feed lxml.etree._FeedParser-class.html#feed -lxml.etree._FeedParser.close lxml.etree._FeedParser-class.html#close -lxml.etree.HTMLParser.__init__ lxml.etree.HTMLParser-class.html#__init__ -lxml.etree.HTMLParser.__new__ lxml.etree.HTMLParser-class.html#__new__ -lxml.etree._FeedParser.feed_error_log lxml.etree._FeedParser-class.html#feed_error_log -lxml.etree.HTMLPullParser lxml.etree.HTMLPullParser-class.html -lxml.etree._FeedParser.feed lxml.etree._FeedParser-class.html#feed -lxml.etree.HTMLPullParser.read_events lxml.etree.HTMLPullParser-class.html#read_events -lxml.etree._FeedParser.close lxml.etree._FeedParser-class.html#close -lxml.etree.HTMLPullParser.__init__ lxml.etree.HTMLPullParser-class.html#__init__ -lxml.etree.HTMLPullParser.__new__ lxml.etree.HTMLPullParser-class.html#__new__ -lxml.etree._FeedParser.feed_error_log lxml.etree._FeedParser-class.html#feed_error_log -lxml.etree.LxmlError lxml.etree.LxmlError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.LxmlError.__new__ lxml.etree.LxmlError-class.html#__new__ -lxml.etree.LxmlRegistryError lxml.etree.LxmlRegistryError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.LxmlRegistryError.__new__ lxml.etree.LxmlRegistryError-class.html#__new__ -lxml.etree.LxmlSyntaxError lxml.etree.LxmlSyntaxError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.LxmlError.__new__ lxml.etree.LxmlError-class.html#__new__ -lxml.etree.LxmlSyntaxError.__qualname__ lxml.etree.LxmlSyntaxError-class.html#__qualname__ -lxml.etree.NamespaceRegistryError lxml.etree.NamespaceRegistryError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.NamespaceRegistryError.__new__ lxml.etree.NamespaceRegistryError-class.html#__new__ -lxml.etree.PIBase lxml.etree.PIBase-class.html -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.etree._Element._init lxml.etree._Element-class.html#_init -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.etree._ProcessingInstruction.tag lxml.etree._ProcessingInstruction-class.html#tag -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.etree.PIBase.__new__ lxml.etree.PIBase-class.html#__new__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.etree._Element.getchildren lxml.etree._Element-class.html#getchildren -lxml.etree.PIBase.__init__ lxml.etree.PIBase-class.html#__init__ -lxml.etree._Element.cssselect lxml.etree._Element-class.html#cssselect -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.etree._ProcessingInstruction.get lxml.etree._ProcessingInstruction-class.html#get -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.etree._Element.__nonzero__ lxml.etree._Element-class.html#__nonzero__ -lxml.etree._ProcessingInstruction.target lxml.etree._ProcessingInstruction-class.html#target -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.etree._Element.__iter__ lxml.etree._Element-class.html#__iter__ -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.etree._ProcessingInstruction.__repr__ lxml.etree._ProcessingInstruction-class.html#__repr__ -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.etree._ProcessingInstruction.attrib lxml.etree._ProcessingInstruction-class.html#attrib -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.etree.ParseError lxml.etree.ParseError-class.html -lxml.etree.ParseError.__init__ lxml.etree.ParseError-class.html#__init__ -lxml.etree.LxmlError.__new__ lxml.etree.LxmlError-class.html#__new__ -lxml.etree.ParseError.__qualname__ lxml.etree.ParseError-class.html#__qualname__ -lxml.etree.ParseError.position lxml.etree.ParseError-class.html#position -lxml.etree.ParserBasedElementClassLookup lxml.etree.ParserBasedElementClassLookup-class.html -lxml.etree.ParserBasedElementClassLookup.__new__ lxml.etree.ParserBasedElementClassLookup-class.html#__new__ -lxml.etree.FallbackElementClassLookup.fallback lxml.etree.FallbackElementClassLookup-class.html#fallback -lxml.etree.FallbackElementClassLookup.set_fallback lxml.etree.FallbackElementClassLookup-class.html#set_fallback -lxml.etree.FallbackElementClassLookup.__init__ lxml.etree.FallbackElementClassLookup-class.html#__init__ -lxml.etree.ParserError lxml.etree.ParserError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.ParserError.__new__ lxml.etree.ParserError-class.html#__new__ -lxml.etree.PyErrorLog lxml.etree.PyErrorLog-class.html -lxml.etree.PyErrorLog.level_map lxml.etree.PyErrorLog-class.html#level_map -lxml.etree.PyErrorLog.__new__ lxml.etree.PyErrorLog-class.html#__new__ -lxml.etree.PyErrorLog.receive lxml.etree.PyErrorLog-class.html#receive -lxml.etree._BaseErrorLog.last_error lxml.etree._BaseErrorLog-class.html#last_error -lxml.etree._BaseErrorLog.__repr__ lxml.etree._BaseErrorLog-class.html#__repr__ -lxml.etree.PyErrorLog.copy lxml.etree.PyErrorLog-class.html#copy -lxml.etree.PyErrorLog.__init__ lxml.etree.PyErrorLog-class.html#__init__ -lxml.etree.PyErrorLog.log lxml.etree.PyErrorLog-class.html#log -lxml.etree.PythonElementClassLookup lxml.etree.PythonElementClassLookup-class.html -lxml.etree.PythonElementClassLookup.__new__ lxml.etree.PythonElementClassLookup-class.html#__new__ -lxml.etree.PythonElementClassLookup.lookup lxml.etree.PythonElementClassLookup-class.html#lookup -lxml.etree.FallbackElementClassLookup.fallback lxml.etree.FallbackElementClassLookup-class.html#fallback -lxml.etree.FallbackElementClassLookup.set_fallback lxml.etree.FallbackElementClassLookup-class.html#set_fallback -lxml.etree.FallbackElementClassLookup.__init__ lxml.etree.FallbackElementClassLookup-class.html#__init__ -lxml.etree.QName lxml.etree.QName-class.html -lxml.etree.QName.text lxml.etree.QName-class.html#text -lxml.etree.QName.__str__ lxml.etree.QName-class.html#__str__ -lxml.etree.QName.localname lxml.etree.QName-class.html#localname -lxml.etree.QName.__lt__ lxml.etree.QName-class.html#__lt__ -lxml.etree.QName.__init__ lxml.etree.QName-class.html#__init__ -lxml.etree.QName.__new__ lxml.etree.QName-class.html#__new__ -lxml.etree.QName.namespace lxml.etree.QName-class.html#namespace -lxml.etree.QName.__ne__ lxml.etree.QName-class.html#__ne__ -lxml.etree.QName.__gt__ lxml.etree.QName-class.html#__gt__ -lxml.etree.QName.__eq__ lxml.etree.QName-class.html#__eq__ -lxml.etree.QName.__le__ lxml.etree.QName-class.html#__le__ -lxml.etree.QName.__hash__ lxml.etree.QName-class.html#__hash__ -lxml.etree.QName.__ge__ lxml.etree.QName-class.html#__ge__ -lxml.etree.RelaxNG lxml.etree.RelaxNG-class.html -lxml.etree._Validator._append_log_message lxml.etree._Validator-class.html#_append_log_message -lxml.etree._Validator.validate lxml.etree._Validator-class.html#validate -lxml.etree.RelaxNG.__init__ lxml.etree.RelaxNG-class.html#__init__ -lxml.etree.RelaxNG.__new__ lxml.etree.RelaxNG-class.html#__new__ -lxml.etree._Validator._clear_error_log lxml.etree._Validator-class.html#_clear_error_log -lxml.etree.RelaxNG.__call__ lxml.etree.RelaxNG-class.html#__call__ -lxml.etree._Validator.assert_ lxml.etree._Validator-class.html#assert_ -lxml.etree._Validator.assertValid lxml.etree._Validator-class.html#assertValid -lxml.etree.RelaxNG.from_rnc_string lxml.etree.RelaxNG-class.html#from_rnc_string -lxml.etree._Validator.error_log lxml.etree._Validator-class.html#error_log -lxml.etree.RelaxNGError lxml.etree.RelaxNGError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.RelaxNGError.__new__ lxml.etree.RelaxNGError-class.html#__new__ -lxml.etree.RelaxNGErrorTypes lxml.etree.RelaxNGErrorTypes-class.html -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_TEXTWRONG lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_TEXTWRONG -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_EXTRACONTENT lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_EXTRACONTENT -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_TYPEVAL lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_TYPEVAL -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_NODEFINE lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_NODEFINE -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_NOTELEM lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_NOTELEM -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_VALUE lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_VALUE -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_TYPECMP lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_TYPECMP -lxml.etree.RelaxNGErrorTypes._getName lxml.etree.RelaxNGErrorTypes-class.html#_getName -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_LISTELEM lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_LISTELEM -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_INTERNAL lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_INTERNAL -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_DATATYPE lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_DATATYPE -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_DATAELEM lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_DATAELEM -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_INVALIDATTR lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_INVALIDATTR -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_ELEMNAME lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_ELEMNAME -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_DUPID lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_DUPID -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_ELEMNOTEMPTY lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_ELEMNOTEMPTY -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_NOELEM lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_NOELEM -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_TYPE lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_TYPE -lxml.etree.RelaxNGErrorTypes.RELAXNG_OK lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_OK -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_ELEMNONS lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_ELEMNONS -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_CONTENTVALID lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_CONTENTVALID -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_LIST lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_LIST -lxml.etree.RelaxNGErrorTypes._names lxml.etree.RelaxNGErrorTypes-class.html#_names -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_EXTRADATA lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_EXTRADATA -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_MEMORY lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_MEMORY -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_NOSTATE lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_NOSTATE -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_ELEMWRONG lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_ELEMWRONG -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_LISTEXTRA lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_LISTEXTRA -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_ATTRNONS lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_ATTRNONS -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_ELEMWRONGNS lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_ELEMWRONGNS -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_ATTRNAME lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_ATTRNAME -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_VALELEM lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_VALELEM -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_INTERNODATA lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_INTERNODATA -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_NOGRAMMAR lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_NOGRAMMAR -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_ELEMEXTRANS lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_ELEMEXTRANS -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_ATTRWRONGNS lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_ATTRWRONGNS -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_INTEREXTRA lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_INTEREXTRA -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_ATTREXTRANS lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_ATTREXTRANS -lxml.etree.RelaxNGErrorTypes.__qualname__ lxml.etree.RelaxNGErrorTypes-class.html#__qualname__ -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_LACKDATA lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_LACKDATA -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_LISTEMPTY lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_LISTEMPTY -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_INTERSEQ lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_INTERSEQ -lxml.etree.RelaxNGErrorTypes.RELAXNG_ERR_ATTRVALID lxml.etree.RelaxNGErrorTypes-class.html#RELAXNG_ERR_ATTRVALID -lxml.etree.RelaxNGParseError lxml.etree.RelaxNGParseError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.RelaxNGParseError.__new__ lxml.etree.RelaxNGParseError-class.html#__new__ -lxml.etree.RelaxNGValidateError lxml.etree.RelaxNGValidateError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.RelaxNGValidateError.__new__ lxml.etree.RelaxNGValidateError-class.html#__new__ -lxml.etree.Resolver lxml.etree.Resolver-class.html -lxml.etree.Resolver.resolve lxml.etree.Resolver-class.html#resolve -lxml.etree.Resolver.resolve_filename lxml.etree.Resolver-class.html#resolve_filename -lxml.etree.Resolver.__new__ lxml.etree.Resolver-class.html#__new__ -lxml.etree.Resolver.resolve_string lxml.etree.Resolver-class.html#resolve_string -lxml.etree.Resolver.resolve_file lxml.etree.Resolver-class.html#resolve_file -lxml.etree.Resolver.resolve_empty lxml.etree.Resolver-class.html#resolve_empty -lxml.etree.Schematron lxml.etree.Schematron-class.html -lxml.etree.Schematron.__new__ lxml.etree.Schematron-class.html#__new__ -lxml.etree._Validator._clear_error_log lxml.etree._Validator-class.html#_clear_error_log -lxml.etree._Validator.assertValid lxml.etree._Validator-class.html#assertValid -lxml.etree._Validator._append_log_message lxml.etree._Validator-class.html#_append_log_message -lxml.etree._Validator.error_log lxml.etree._Validator-class.html#error_log -lxml.etree.Schematron.__call__ lxml.etree.Schematron-class.html#__call__ -lxml.etree._Validator.assert_ lxml.etree._Validator-class.html#assert_ -lxml.etree._Validator.validate lxml.etree._Validator-class.html#validate -lxml.etree.Schematron.__init__ lxml.etree.Schematron-class.html#__init__ -lxml.etree.SchematronError lxml.etree.SchematronError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.SchematronError.__new__ lxml.etree.SchematronError-class.html#__new__ -lxml.etree.SchematronParseError lxml.etree.SchematronParseError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.SchematronParseError.__new__ lxml.etree.SchematronParseError-class.html#__new__ -lxml.etree.SchematronValidateError lxml.etree.SchematronValidateError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.SchematronValidateError.__new__ lxml.etree.SchematronValidateError-class.html#__new__ -lxml.etree.SerialisationError lxml.etree.SerialisationError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.SerialisationError.__new__ lxml.etree.SerialisationError-class.html#__new__ -lxml.etree.SiblingsIterator lxml.etree.SiblingsIterator-class.html -lxml.etree.SiblingsIterator.__new__ lxml.etree.SiblingsIterator-class.html#__new__ -lxml.etree._ElementMatchIterator.__next__ lxml.etree._ElementMatchIterator-class.html#__next__ -lxml.etree._ElementMatchIterator.next lxml.etree._ElementMatchIterator-class.html#next -lxml.etree._ElementMatchIterator.__iter__ lxml.etree._ElementMatchIterator-class.html#__iter__ -lxml.etree.TreeBuilder lxml.etree.TreeBuilder-class.html -lxml.etree.TreeBuilder.comment lxml.etree.TreeBuilder-class.html#comment -lxml.etree.TreeBuilder.end lxml.etree.TreeBuilder-class.html#end -lxml.etree.TreeBuilder.__new__ lxml.etree.TreeBuilder-class.html#__new__ -lxml.etree.TreeBuilder.start lxml.etree.TreeBuilder-class.html#start -lxml.etree.TreeBuilder.close lxml.etree.TreeBuilder-class.html#close -lxml.etree.TreeBuilder.pi lxml.etree.TreeBuilder-class.html#pi -lxml.etree.TreeBuilder.data lxml.etree.TreeBuilder-class.html#data -lxml.etree.TreeBuilder.__init__ lxml.etree.TreeBuilder-class.html#__init__ -lxml.etree.XInclude lxml.etree.XInclude-class.html -lxml.etree.XInclude.__new__ lxml.etree.XInclude-class.html#__new__ -lxml.etree.XInclude.error_log lxml.etree.XInclude-class.html#error_log -lxml.etree.XInclude.__call__ lxml.etree.XInclude-class.html#__call__ -lxml.etree.XInclude.__init__ lxml.etree.XInclude-class.html#__init__ -lxml.etree.XIncludeError lxml.etree.XIncludeError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.XIncludeError.__new__ lxml.etree.XIncludeError-class.html#__new__ -lxml.etree.XMLParser lxml.etree.XMLParser-class.html -lxml.etree._FeedParser.feed lxml.etree._FeedParser-class.html#feed -lxml.etree._FeedParser.close lxml.etree._FeedParser-class.html#close -lxml.etree.XMLParser.__init__ lxml.etree.XMLParser-class.html#__init__ -lxml.etree.XMLParser.__new__ lxml.etree.XMLParser-class.html#__new__ -lxml.etree._FeedParser.feed_error_log lxml.etree._FeedParser-class.html#feed_error_log -lxml.etree.XMLPullParser lxml.etree.XMLPullParser-class.html -lxml.etree._FeedParser.feed lxml.etree._FeedParser-class.html#feed -lxml.etree.XMLPullParser.read_events lxml.etree.XMLPullParser-class.html#read_events -lxml.etree._FeedParser.close lxml.etree._FeedParser-class.html#close -lxml.etree.XMLPullParser.__init__ lxml.etree.XMLPullParser-class.html#__init__ -lxml.etree.XMLPullParser.__new__ lxml.etree.XMLPullParser-class.html#__new__ -lxml.etree._FeedParser.feed_error_log lxml.etree._FeedParser-class.html#feed_error_log -lxml.etree.XMLSchema lxml.etree.XMLSchema-class.html -lxml.etree.XMLSchema.__new__ lxml.etree.XMLSchema-class.html#__new__ -lxml.etree._Validator._clear_error_log lxml.etree._Validator-class.html#_clear_error_log -lxml.etree._Validator.assertValid lxml.etree._Validator-class.html#assertValid -lxml.etree._Validator._append_log_message lxml.etree._Validator-class.html#_append_log_message -lxml.etree._Validator.error_log lxml.etree._Validator-class.html#error_log -lxml.etree.XMLSchema.__call__ lxml.etree.XMLSchema-class.html#__call__ -lxml.etree._Validator.assert_ lxml.etree._Validator-class.html#assert_ -lxml.etree._Validator.validate lxml.etree._Validator-class.html#validate -lxml.etree.XMLSchema.__init__ lxml.etree.XMLSchema-class.html#__init__ -lxml.etree.XMLSchemaError lxml.etree.XMLSchemaError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.XMLSchemaError.__new__ lxml.etree.XMLSchemaError-class.html#__new__ -lxml.etree.XMLSchemaParseError lxml.etree.XMLSchemaParseError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.XMLSchemaParseError.__new__ lxml.etree.XMLSchemaParseError-class.html#__new__ -lxml.etree.XMLSchemaValidateError lxml.etree.XMLSchemaValidateError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.XMLSchemaValidateError.__new__ lxml.etree.XMLSchemaValidateError-class.html#__new__ -lxml.etree.XMLSyntaxError lxml.etree.XMLSyntaxError-class.html -lxml.etree.ParseError.__init__ lxml.etree.ParseError-class.html#__init__ -lxml.etree.LxmlError.__new__ lxml.etree.LxmlError-class.html#__new__ -lxml.etree.XMLSyntaxError.__qualname__ lxml.etree.XMLSyntaxError-class.html#__qualname__ -lxml.etree.ParseError.position lxml.etree.ParseError-class.html#position -lxml.etree.XPath lxml.etree.XPath-class.html -lxml.etree.XPath.__new__ lxml.etree.XPath-class.html#__new__ -lxml.etree._XPathEvaluatorBase.evaluate lxml.etree._XPathEvaluatorBase-class.html#evaluate -lxml.etree._XPathEvaluatorBase.error_log lxml.etree._XPathEvaluatorBase-class.html#error_log -lxml.etree.XPath.__repr__ lxml.etree.XPath-class.html#__repr__ -lxml.etree.XPath.__call__ lxml.etree.XPath-class.html#__call__ -lxml.etree.XPath.path lxml.etree.XPath-class.html#path -lxml.etree.XPath.__init__ lxml.etree.XPath-class.html#__init__ -lxml.etree.XPathDocumentEvaluator lxml.etree.XPathDocumentEvaluator-class.html -lxml.etree.XPathElementEvaluator.register_namespace lxml.etree.XPathElementEvaluator-class.html#register_namespace -lxml.etree.XPathDocumentEvaluator.__new__ lxml.etree.XPathDocumentEvaluator-class.html#__new__ -lxml.etree._XPathEvaluatorBase.evaluate lxml.etree._XPathEvaluatorBase-class.html#evaluate -lxml.etree._XPathEvaluatorBase.error_log lxml.etree._XPathEvaluatorBase-class.html#error_log -lxml.etree.XPathDocumentEvaluator.__call__ lxml.etree.XPathDocumentEvaluator-class.html#__call__ -lxml.etree.XPathElementEvaluator.register_namespaces lxml.etree.XPathElementEvaluator-class.html#register_namespaces -lxml.etree.XPathDocumentEvaluator.__init__ lxml.etree.XPathDocumentEvaluator-class.html#__init__ -lxml.etree.XPathElementEvaluator lxml.etree.XPathElementEvaluator-class.html -lxml.etree.XPathElementEvaluator.register_namespace lxml.etree.XPathElementEvaluator-class.html#register_namespace -lxml.etree.XPathElementEvaluator.__new__ lxml.etree.XPathElementEvaluator-class.html#__new__ -lxml.etree._XPathEvaluatorBase.evaluate lxml.etree._XPathEvaluatorBase-class.html#evaluate -lxml.etree._XPathEvaluatorBase.error_log lxml.etree._XPathEvaluatorBase-class.html#error_log -lxml.etree.XPathElementEvaluator.__call__ lxml.etree.XPathElementEvaluator-class.html#__call__ -lxml.etree.XPathElementEvaluator.register_namespaces lxml.etree.XPathElementEvaluator-class.html#register_namespaces -lxml.etree.XPathElementEvaluator.__init__ lxml.etree.XPathElementEvaluator-class.html#__init__ -lxml.etree.XPathError lxml.etree.XPathError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.XPathError.__new__ lxml.etree.XPathError-class.html#__new__ -lxml.etree.XPathEvalError lxml.etree.XPathEvalError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.XPathEvalError.__new__ lxml.etree.XPathEvalError-class.html#__new__ -lxml.etree.XPathFunctionError lxml.etree.XPathFunctionError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.XPathFunctionError.__new__ lxml.etree.XPathFunctionError-class.html#__new__ -lxml.etree.XPathResultError lxml.etree.XPathResultError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.XPathResultError.__new__ lxml.etree.XPathResultError-class.html#__new__ -lxml.etree.XPathSyntaxError lxml.etree.XPathSyntaxError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.XPathError.__new__ lxml.etree.XPathError-class.html#__new__ -lxml.etree.XPathSyntaxError.__qualname__ lxml.etree.XPathSyntaxError-class.html#__qualname__ -lxml.etree.XSLT lxml.etree.XSLT-class.html -lxml.etree.XSLT.apply lxml.etree.XSLT-class.html#apply -lxml.etree.XSLT.__init__ lxml.etree.XSLT-class.html#__init__ -lxml.etree.XSLT.__new__ lxml.etree.XSLT-class.html#__new__ -lxml.etree.XSLT.set_global_max_depth lxml.etree.XSLT-class.html#set_global_max_depth -lxml.etree.XSLT.__call__ lxml.etree.XSLT-class.html#__call__ -lxml.etree.XSLT.__deepcopy__ lxml.etree.XSLT-class.html#__deepcopy__ -lxml.etree.XSLT.tostring lxml.etree.XSLT-class.html#tostring -lxml.etree.XSLT.strparam lxml.etree.XSLT-class.html#strparam -lxml.etree.XSLT.error_log lxml.etree.XSLT-class.html#error_log -lxml.etree.XSLT.__copy__ lxml.etree.XSLT-class.html#__copy__ -lxml.etree.XSLTAccessControl lxml.etree.XSLTAccessControl-class.html -lxml.etree.XSLTAccessControl.DENY_WRITE lxml.etree.XSLTAccessControl-class.html#DENY_WRITE -lxml.etree.XSLTAccessControl.__new__ lxml.etree.XSLTAccessControl-class.html#__new__ -lxml.etree.XSLTAccessControl.__repr__ lxml.etree.XSLTAccessControl-class.html#__repr__ -lxml.etree.XSLTAccessControl.DENY_ALL lxml.etree.XSLTAccessControl-class.html#DENY_ALL -lxml.etree.XSLTAccessControl.options lxml.etree.XSLTAccessControl-class.html#options -lxml.etree.XSLTAccessControl.__init__ lxml.etree.XSLTAccessControl-class.html#__init__ -lxml.etree.XSLTApplyError lxml.etree.XSLTApplyError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.XSLTApplyError.__new__ lxml.etree.XSLTApplyError-class.html#__new__ -lxml.etree.XSLTError lxml.etree.XSLTError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.XSLTError.__new__ lxml.etree.XSLTError-class.html#__new__ -lxml.etree.XSLTExtension lxml.etree.XSLTExtension-class.html -lxml.etree.XSLTExtension.execute lxml.etree.XSLTExtension-class.html#execute -lxml.etree.XSLTExtension.__new__ lxml.etree.XSLTExtension-class.html#__new__ -lxml.etree.XSLTExtension.apply_templates lxml.etree.XSLTExtension-class.html#apply_templates -lxml.etree.XSLTExtension.process_children lxml.etree.XSLTExtension-class.html#process_children -lxml.etree.XSLTExtensionError lxml.etree.XSLTExtensionError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.XSLTExtensionError.__new__ lxml.etree.XSLTExtensionError-class.html#__new__ -lxml.etree.XSLTParseError lxml.etree.XSLTParseError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.XSLTParseError.__new__ lxml.etree.XSLTParseError-class.html#__new__ -lxml.etree.XSLTSaveError lxml.etree.XSLTSaveError-class.html -lxml.etree.XSLTSaveError.__qualname__ lxml.etree.XSLTSaveError-class.html#__qualname__ -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.XSLTError.__new__ lxml.etree.XSLTError-class.html#__new__ -lxml.etree._Attrib lxml.etree._Attrib-class.html -lxml.etree._Attrib.iteritems lxml.etree._Attrib-class.html#iteritems -lxml.etree._Attrib.pop lxml.etree._Attrib-class.html#pop -lxml.etree._Attrib.has_key lxml.etree._Attrib-class.html#has_key -lxml.etree._Attrib.__lt__ lxml.etree._Attrib-class.html#__lt__ -lxml.etree._Attrib.__new__ lxml.etree._Attrib-class.html#__new__ -lxml.etree._Attrib.__contains__ lxml.etree._Attrib-class.html#__contains__ -lxml.etree._Attrib.itervalues lxml.etree._Attrib-class.html#itervalues -lxml.etree._Attrib.__len__ lxml.etree._Attrib-class.html#__len__ -lxml.etree._Attrib.__ne__ lxml.etree._Attrib-class.html#__ne__ -lxml.etree._Attrib.__getitem__ lxml.etree._Attrib-class.html#__getitem__ -lxml.etree._Attrib.get lxml.etree._Attrib-class.html#get -lxml.etree._Attrib.keys lxml.etree._Attrib-class.html#keys -lxml.etree._Attrib.__deepcopy__ lxml.etree._Attrib-class.html#__deepcopy__ -lxml.etree._Attrib.update lxml.etree._Attrib-class.html#update -lxml.etree._Attrib.__setitem__ lxml.etree._Attrib-class.html#__setitem__ -lxml.etree._Attrib.__gt__ lxml.etree._Attrib-class.html#__gt__ -lxml.etree._Attrib.__eq__ lxml.etree._Attrib-class.html#__eq__ -lxml.etree._Attrib.iterkeys lxml.etree._Attrib-class.html#iterkeys -lxml.etree._Attrib.__delitem__ lxml.etree._Attrib-class.html#__delitem__ -lxml.etree._Attrib.__nonzero__ lxml.etree._Attrib-class.html#__nonzero__ -lxml.etree._Attrib.items lxml.etree._Attrib-class.html#items -lxml.etree._Attrib.clear lxml.etree._Attrib-class.html#clear -lxml.etree._Attrib.__iter__ lxml.etree._Attrib-class.html#__iter__ -lxml.etree._Attrib.__le__ lxml.etree._Attrib-class.html#__le__ -lxml.etree._Attrib.values lxml.etree._Attrib-class.html#values -lxml.etree._Attrib.__repr__ lxml.etree._Attrib-class.html#__repr__ -lxml.etree._Attrib.__copy__ lxml.etree._Attrib-class.html#__copy__ -lxml.etree._Attrib.__ge__ lxml.etree._Attrib-class.html#__ge__ -lxml.etree._BaseErrorLog lxml.etree._BaseErrorLog-class.html -lxml.etree._BaseErrorLog.__new__ lxml.etree._BaseErrorLog-class.html#__new__ -lxml.etree._BaseErrorLog.receive lxml.etree._BaseErrorLog-class.html#receive -lxml.etree._BaseErrorLog.last_error lxml.etree._BaseErrorLog-class.html#last_error -lxml.etree._BaseErrorLog.__repr__ lxml.etree._BaseErrorLog-class.html#__repr__ -lxml.etree._BaseErrorLog.copy lxml.etree._BaseErrorLog-class.html#copy -lxml.etree._BaseErrorLog.__init__ lxml.etree._BaseErrorLog-class.html#__init__ -lxml.etree._Comment lxml.etree._Comment-class.html -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.etree._Element._init lxml.etree._Element-class.html#_init -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.etree._Comment.tag lxml.etree._Comment-class.html#tag -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.etree._Comment.__new__ lxml.etree._Comment-class.html#__new__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.etree._Element.getchildren lxml.etree._Element-class.html#getchildren -lxml.etree._Element.cssselect lxml.etree._Element-class.html#cssselect -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.etree._Element.__nonzero__ lxml.etree._Element-class.html#__nonzero__ -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.etree._Element.__iter__ lxml.etree._Element-class.html#__iter__ -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.etree._Comment.__repr__ lxml.etree._Comment-class.html#__repr__ -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.etree._Document lxml.etree._Document-class.html -lxml.etree._Document.__new__ lxml.etree._Document-class.html#__new__ -lxml.etree._DomainErrorLog lxml.etree._DomainErrorLog-class.html -lxml.etree._ListErrorLog.filter_domains lxml.etree._ListErrorLog-class.html#filter_domains -lxml.etree._BaseErrorLog.last_error lxml.etree._BaseErrorLog-class.html#last_error -lxml.etree._ListErrorLog.filter_from_warnings lxml.etree._ListErrorLog-class.html#filter_from_warnings -lxml.etree._DomainErrorLog.__init__ lxml.etree._DomainErrorLog-class.html#__init__ -lxml.etree._DomainErrorLog.__new__ lxml.etree._DomainErrorLog-class.html#__new__ -lxml.etree._ListErrorLog.__contains__ lxml.etree._ListErrorLog-class.html#__contains__ -lxml.etree._ListErrorLog.filter_from_level lxml.etree._ListErrorLog-class.html#filter_from_level -lxml.etree._ListErrorLog.__len__ lxml.etree._ListErrorLog-class.html#__len__ -lxml.etree._ErrorLog.__exit__ lxml.etree._ErrorLog-class.html#__exit__ -lxml.etree._ListErrorLog.__getitem__ lxml.etree._ListErrorLog-class.html#__getitem__ -lxml.etree._ListErrorLog.filter_levels lxml.etree._ListErrorLog-class.html#filter_levels -lxml.etree._ErrorLog.__iter__ lxml.etree._ErrorLog-class.html#__iter__ -lxml.etree._ErrorLog.copy lxml.etree._ErrorLog-class.html#copy -lxml.etree._ListErrorLog.__nonzero__ lxml.etree._ListErrorLog-class.html#__nonzero__ -lxml.etree._ListErrorLog.filter_from_fatals lxml.etree._ListErrorLog-class.html#filter_from_fatals -lxml.etree._DomainErrorLog.receive lxml.etree._DomainErrorLog-class.html#receive -lxml.etree._ErrorLog.clear lxml.etree._ErrorLog-class.html#clear -lxml.etree._ListErrorLog.filter_from_errors lxml.etree._ListErrorLog-class.html#filter_from_errors -lxml.etree._ListErrorLog.filter_types lxml.etree._ListErrorLog-class.html#filter_types -lxml.etree._ListErrorLog.__repr__ lxml.etree._ListErrorLog-class.html#__repr__ -lxml.etree._Element lxml.etree._Element-class.html -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.etree._Element.set lxml.etree._Element-class.html#set -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.etree._Element.text lxml.etree._Element-class.html#text -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.etree._Element._init lxml.etree._Element-class.html#_init -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.etree._Element.tag lxml.etree._Element-class.html#tag -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.etree._Element.append lxml.etree._Element-class.html#append -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.etree._Element.__new__ lxml.etree._Element-class.html#__new__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.etree._Element.getchildren lxml.etree._Element-class.html#getchildren -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.etree._Element.__delitem__ lxml.etree._Element-class.html#__delitem__ -lxml.etree._Element.values lxml.etree._Element-class.html#values -lxml.etree._Element.__len__ lxml.etree._Element-class.html#__len__ -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.etree._Element.__getitem__ lxml.etree._Element-class.html#__getitem__ -lxml.etree._Element.get lxml.etree._Element-class.html#get -lxml.etree._Element.keys lxml.etree._Element-class.html#keys -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.etree._Element.__iter__ lxml.etree._Element-class.html#__iter__ -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.etree._Element.insert lxml.etree._Element-class.html#insert -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.etree._Element.__nonzero__ lxml.etree._Element-class.html#__nonzero__ -lxml.etree._Element.items lxml.etree._Element-class.html#items -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.etree._Element.__setitem__ lxml.etree._Element-class.html#__setitem__ -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.etree._Element.cssselect lxml.etree._Element-class.html#cssselect -lxml.etree._Element.__repr__ lxml.etree._Element-class.html#__repr__ -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.etree._Element.attrib lxml.etree._Element-class.html#attrib -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.etree._ElementIterator lxml.etree._ElementIterator-class.html -lxml.etree._ElementIterator.__new__ lxml.etree._ElementIterator-class.html#__new__ -lxml.etree._ElementIterator.__next__ lxml.etree._ElementIterator-class.html#__next__ -lxml.etree._ElementIterator.next lxml.etree._ElementIterator-class.html#next -lxml.etree._ElementIterator.__iter__ lxml.etree._ElementIterator-class.html#__iter__ -lxml.etree._ElementMatchIterator lxml.etree._ElementMatchIterator-class.html -lxml.etree._ElementMatchIterator.__new__ lxml.etree._ElementMatchIterator-class.html#__new__ -lxml.etree._ElementMatchIterator.__next__ lxml.etree._ElementMatchIterator-class.html#__next__ -lxml.etree._ElementMatchIterator.next lxml.etree._ElementMatchIterator-class.html#next -lxml.etree._ElementMatchIterator.__iter__ lxml.etree._ElementMatchIterator-class.html#__iter__ -lxml.etree._ElementStringResult lxml.etree._ElementStringResult-class.html -str.upper str-class.html#upper -lxml.etree._ElementStringResult.getparent lxml.etree._ElementStringResult-class.html#getparent -str.__getslice__ str-class.html#__getslice__ -str.startswith str-class.html#startswith -str.lstrip str-class.html#lstrip -str.capitalize str-class.html#capitalize -str.__str__ str-class.html#__str__ -str.__getattribute__ str-class.html#__getattribute__ -str.rpartition str-class.html#rpartition -str.replace str-class.html#replace -str.isdigit str-class.html#isdigit -str.endswith str-class.html#endswith -str.splitlines str-class.html#splitlines -str.expandtabs str-class.html#expandtabs -str.strip str-class.html#strip -str.__rmul__ str-class.html#__rmul__ -str.__lt__ str-class.html#__lt__ -str.ljust str-class.html#ljust -str.__rmod__ str-class.html#__rmod__ -str.index str-class.html#index -str.__getnewargs__ str-class.html#__getnewargs__ -str.__new__ str-class.html#__new__ -str.isalnum str-class.html#isalnum -str.__contains__ str-class.html#__contains__ -str.rindex str-class.html#rindex -str.__eq__ str-class.html#__eq__ -str.__format__ str-class.html#__format__ -str.find str-class.html#find -str.decode str-class.html#decode -str.isalpha str-class.html#isalpha -str.split str-class.html#split -str.rstrip str-class.html#rstrip -str.encode str-class.html#encode -str._formatter_parser str-class.html#_formatter_parser -str.translate str-class.html#translate -str.isspace str-class.html#isspace -str.__len__ str-class.html#__len__ -str.__mul__ str-class.html#__mul__ -str.__ne__ str-class.html#__ne__ -str.__getitem__ str-class.html#__getitem__ -str.format str-class.html#format -str.rjust str-class.html#rjust -str.swapcase str-class.html#swapcase -str.islower str-class.html#islower -str.zfill str-class.html#zfill -str.__add__ str-class.html#__add__ -str.__gt__ str-class.html#__gt__ -str.rsplit str-class.html#rsplit -str.__sizeof__ str-class.html#__sizeof__ -str.count str-class.html#count -str.lower str-class.html#lower -str.join str-class.html#join -str.center str-class.html#center -str.__mod__ str-class.html#__mod__ -str.partition str-class.html#partition -str.rfind str-class.html#rfind -str.istitle str-class.html#istitle -lxml.etree._ElementStringResult.__qualname__ lxml.etree._ElementStringResult-class.html#__qualname__ -str.__le__ str-class.html#__le__ -str.__repr__ str-class.html#__repr__ -str._formatter_field_name_split str-class.html#_formatter_field_name_split -str.__hash__ str-class.html#__hash__ -str.title str-class.html#title -str.isupper str-class.html#isupper -str.__ge__ str-class.html#__ge__ -lxml.etree._ElementTagMatcher lxml.etree._ElementTagMatcher-class.html -lxml.etree._ElementTagMatcher.__new__ lxml.etree._ElementTagMatcher-class.html#__new__ -lxml.etree._ElementTree lxml.etree._ElementTree-class.html -lxml.etree._ElementTree.getroot lxml.etree._ElementTree-class.html#getroot -lxml.etree._ElementTree.parser lxml.etree._ElementTree-class.html#parser -lxml.etree._ElementTree.parse lxml.etree._ElementTree-class.html#parse -lxml.etree._ElementTree.relaxng lxml.etree._ElementTree-class.html#relaxng -lxml.etree._ElementTree.find lxml.etree._ElementTree-class.html#find -lxml.etree._ElementTree.__new__ lxml.etree._ElementTree-class.html#__new__ -lxml.etree._ElementTree.findtext lxml.etree._ElementTree-class.html#findtext -lxml.etree._ElementTree.findall lxml.etree._ElementTree-class.html#findall -lxml.etree._ElementTree.write lxml.etree._ElementTree-class.html#write -lxml.etree._ElementTree._setroot lxml.etree._ElementTree-class.html#_setroot -lxml.etree._ElementTree.xpath lxml.etree._ElementTree-class.html#xpath -lxml.etree._ElementTree.iterfind lxml.etree._ElementTree-class.html#iterfind -lxml.etree._ElementTree.xslt lxml.etree._ElementTree-class.html#xslt -lxml.etree._ElementTree.__deepcopy__ lxml.etree._ElementTree-class.html#__deepcopy__ -lxml.etree._ElementTree.getpath lxml.etree._ElementTree-class.html#getpath -lxml.etree._ElementTree.getelementpath lxml.etree._ElementTree-class.html#getelementpath -lxml.etree._ElementTree.write_c14n lxml.etree._ElementTree-class.html#write_c14n -lxml.etree._ElementTree.xmlschema lxml.etree._ElementTree-class.html#xmlschema -lxml.etree._ElementTree.xinclude lxml.etree._ElementTree-class.html#xinclude -lxml.etree._ElementTree.docinfo lxml.etree._ElementTree-class.html#docinfo -lxml.etree._ElementTree.getiterator lxml.etree._ElementTree-class.html#getiterator -lxml.etree._ElementTree.iter lxml.etree._ElementTree-class.html#iter -lxml.etree._ElementTree.__copy__ lxml.etree._ElementTree-class.html#__copy__ -lxml.etree._ElementUnicodeResult lxml.etree._ElementUnicodeResult-class.html -lxml.etree._ElementUnicodeResult.getparent lxml.etree._ElementUnicodeResult-class.html#getparent -lxml.etree._ElementUnicodeResult.is_attribute lxml.etree._ElementUnicodeResult-class.html#is_attribute -lxml.etree._ElementUnicodeResult.__new__ lxml.etree._ElementUnicodeResult-class.html#__new__ -lxml.etree._ElementUnicodeResult.is_text lxml.etree._ElementUnicodeResult-class.html#is_text -lxml.etree._ElementUnicodeResult.attrname lxml.etree._ElementUnicodeResult-class.html#attrname -lxml.etree._ElementUnicodeResult.is_tail lxml.etree._ElementUnicodeResult-class.html#is_tail -lxml.etree._Entity lxml.etree._Entity-class.html -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.etree._Entity.text lxml.etree._Entity-class.html#text -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.etree._Element._init lxml.etree._Element-class.html#_init -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.etree._Entity.tag lxml.etree._Entity-class.html#tag -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.etree._Entity.__new__ lxml.etree._Entity-class.html#__new__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.etree._Element.getchildren lxml.etree._Element-class.html#getchildren -lxml.etree._Element.cssselect lxml.etree._Element-class.html#cssselect -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.etree._Element.__nonzero__ lxml.etree._Element-class.html#__nonzero__ -lxml.etree._Entity.name lxml.etree._Entity-class.html#name -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.etree._Element.__iter__ lxml.etree._Element-class.html#__iter__ -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.etree._Entity.__repr__ lxml.etree._Entity-class.html#__repr__ -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.etree._ErrorLog lxml.etree._ErrorLog-class.html -lxml.etree._ListErrorLog.filter_domains lxml.etree._ListErrorLog-class.html#filter_domains -lxml.etree._BaseErrorLog.last_error lxml.etree._BaseErrorLog-class.html#last_error -lxml.etree._ListErrorLog.filter_from_warnings lxml.etree._ListErrorLog-class.html#filter_from_warnings -lxml.etree._ErrorLog.__init__ lxml.etree._ErrorLog-class.html#__init__ -lxml.etree._ErrorLog.__new__ lxml.etree._ErrorLog-class.html#__new__ -lxml.etree._ListErrorLog.__contains__ lxml.etree._ListErrorLog-class.html#__contains__ -lxml.etree._ListErrorLog.filter_from_level lxml.etree._ListErrorLog-class.html#filter_from_level -lxml.etree._ListErrorLog.__len__ lxml.etree._ListErrorLog-class.html#__len__ -lxml.etree._ErrorLog.__exit__ lxml.etree._ErrorLog-class.html#__exit__ -lxml.etree._ListErrorLog.__getitem__ lxml.etree._ListErrorLog-class.html#__getitem__ -lxml.etree._ListErrorLog.filter_levels lxml.etree._ListErrorLog-class.html#filter_levels -lxml.etree._ErrorLog.__iter__ lxml.etree._ErrorLog-class.html#__iter__ -lxml.etree._ErrorLog.copy lxml.etree._ErrorLog-class.html#copy -lxml.etree._ListErrorLog.__nonzero__ lxml.etree._ListErrorLog-class.html#__nonzero__ -lxml.etree._ListErrorLog.filter_from_fatals lxml.etree._ListErrorLog-class.html#filter_from_fatals -lxml.etree._ErrorLog.receive lxml.etree._ErrorLog-class.html#receive -lxml.etree._ErrorLog.clear lxml.etree._ErrorLog-class.html#clear -lxml.etree._ListErrorLog.filter_from_errors lxml.etree._ListErrorLog-class.html#filter_from_errors -lxml.etree._ListErrorLog.filter_types lxml.etree._ListErrorLog-class.html#filter_types -lxml.etree._ListErrorLog.__repr__ lxml.etree._ListErrorLog-class.html#__repr__ -lxml.etree._FeedParser lxml.etree._FeedParser-class.html -lxml.etree._FeedParser.feed lxml.etree._FeedParser-class.html#feed -lxml.etree._FeedParser.close lxml.etree._FeedParser-class.html#close -lxml.etree._FeedParser.__new__ lxml.etree._FeedParser-class.html#__new__ -lxml.etree._FeedParser.feed_error_log lxml.etree._FeedParser-class.html#feed_error_log -lxml.etree._IDDict lxml.etree._IDDict-class.html -lxml.etree._IDDict.has_key lxml.etree._IDDict-class.html#has_key -lxml.etree._IDDict.__new__ lxml.etree._IDDict-class.html#__new__ -lxml.etree._IDDict.__contains__ lxml.etree._IDDict-class.html#__contains__ -lxml.etree._IDDict.itervalues lxml.etree._IDDict-class.html#itervalues -lxml.etree._IDDict.__len__ lxml.etree._IDDict-class.html#__len__ -lxml.etree._IDDict.__getitem__ lxml.etree._IDDict-class.html#__getitem__ -lxml.etree._IDDict.get lxml.etree._IDDict-class.html#get -lxml.etree._IDDict.keys lxml.etree._IDDict-class.html#keys -lxml.etree._IDDict.__iter__ lxml.etree._IDDict-class.html#__iter__ -lxml.etree._IDDict.iteritems lxml.etree._IDDict-class.html#iteritems -lxml.etree._IDDict.copy lxml.etree._IDDict-class.html#copy -lxml.etree._IDDict.iterkeys lxml.etree._IDDict-class.html#iterkeys -lxml.etree._IDDict.items lxml.etree._IDDict-class.html#items -lxml.etree._IDDict.values lxml.etree._IDDict-class.html#values -lxml.etree._IDDict.__repr__ lxml.etree._IDDict-class.html#__repr__ -lxml.etree._ListErrorLog lxml.etree._ListErrorLog-class.html -lxml.etree._ListErrorLog.filter_domains lxml.etree._ListErrorLog-class.html#filter_domains -lxml.etree._BaseErrorLog.last_error lxml.etree._BaseErrorLog-class.html#last_error -lxml.etree._ListErrorLog.filter_from_warnings lxml.etree._ListErrorLog-class.html#filter_from_warnings -lxml.etree._ListErrorLog.__init__ lxml.etree._ListErrorLog-class.html#__init__ -lxml.etree._ListErrorLog.__new__ lxml.etree._ListErrorLog-class.html#__new__ -lxml.etree._ListErrorLog.__contains__ lxml.etree._ListErrorLog-class.html#__contains__ -lxml.etree._ListErrorLog.filter_from_level lxml.etree._ListErrorLog-class.html#filter_from_level -lxml.etree._ListErrorLog.__len__ lxml.etree._ListErrorLog-class.html#__len__ -lxml.etree._ListErrorLog.__getitem__ lxml.etree._ListErrorLog-class.html#__getitem__ -lxml.etree._ListErrorLog.filter_levels lxml.etree._ListErrorLog-class.html#filter_levels -lxml.etree._ListErrorLog.__iter__ lxml.etree._ListErrorLog-class.html#__iter__ -lxml.etree._ListErrorLog.copy lxml.etree._ListErrorLog-class.html#copy -lxml.etree._ListErrorLog.__nonzero__ lxml.etree._ListErrorLog-class.html#__nonzero__ -lxml.etree._ListErrorLog.filter_from_fatals lxml.etree._ListErrorLog-class.html#filter_from_fatals -lxml.etree._BaseErrorLog.receive lxml.etree._BaseErrorLog-class.html#receive -lxml.etree._ListErrorLog.filter_from_errors lxml.etree._ListErrorLog-class.html#filter_from_errors -lxml.etree._ListErrorLog.filter_types lxml.etree._ListErrorLog-class.html#filter_types -lxml.etree._ListErrorLog.__repr__ lxml.etree._ListErrorLog-class.html#__repr__ -lxml.etree._LogEntry lxml.etree._LogEntry-class.html -lxml.etree._LogEntry.domain lxml.etree._LogEntry-class.html#domain -lxml.etree._LogEntry.message lxml.etree._LogEntry-class.html#message -lxml.etree._LogEntry.level_name lxml.etree._LogEntry-class.html#level_name -lxml.etree._LogEntry.__new__ lxml.etree._LogEntry-class.html#__new__ -lxml.etree._LogEntry.type_name lxml.etree._LogEntry-class.html#type_name -lxml.etree._LogEntry.domain_name lxml.etree._LogEntry-class.html#domain_name -lxml.etree._LogEntry.filename lxml.etree._LogEntry-class.html#filename -lxml.etree._LogEntry.type lxml.etree._LogEntry-class.html#type -lxml.etree._LogEntry.path lxml.etree._LogEntry-class.html#path -lxml.etree._LogEntry.line lxml.etree._LogEntry-class.html#line -lxml.etree._LogEntry.level lxml.etree._LogEntry-class.html#level -lxml.etree._LogEntry.column lxml.etree._LogEntry-class.html#column -lxml.etree._LogEntry.__repr__ lxml.etree._LogEntry-class.html#__repr__ -lxml.etree._ProcessingInstruction lxml.etree._ProcessingInstruction-class.html -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.etree._Element._init lxml.etree._Element-class.html#_init -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.etree._ProcessingInstruction.tag lxml.etree._ProcessingInstruction-class.html#tag -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.etree._ProcessingInstruction.__new__ lxml.etree._ProcessingInstruction-class.html#__new__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.etree._Element.getchildren lxml.etree._Element-class.html#getchildren -lxml.etree._Element.cssselect lxml.etree._Element-class.html#cssselect -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.etree._ProcessingInstruction.get lxml.etree._ProcessingInstruction-class.html#get -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.etree._Element.__nonzero__ lxml.etree._Element-class.html#__nonzero__ -lxml.etree._ProcessingInstruction.target lxml.etree._ProcessingInstruction-class.html#target -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.etree._Element.__iter__ lxml.etree._Element-class.html#__iter__ -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.etree._ProcessingInstruction.__repr__ lxml.etree._ProcessingInstruction-class.html#__repr__ -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.etree._ProcessingInstruction.attrib lxml.etree._ProcessingInstruction-class.html#attrib -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.etree._RotatingErrorLog lxml.etree._RotatingErrorLog-class.html -lxml.etree._ListErrorLog.filter_domains lxml.etree._ListErrorLog-class.html#filter_domains -lxml.etree._BaseErrorLog.last_error lxml.etree._BaseErrorLog-class.html#last_error -lxml.etree._ListErrorLog.filter_from_warnings lxml.etree._ListErrorLog-class.html#filter_from_warnings -lxml.etree._RotatingErrorLog.__init__ lxml.etree._RotatingErrorLog-class.html#__init__ -lxml.etree._RotatingErrorLog.__new__ lxml.etree._RotatingErrorLog-class.html#__new__ -lxml.etree._ListErrorLog.__contains__ lxml.etree._ListErrorLog-class.html#__contains__ -lxml.etree._ListErrorLog.filter_from_level lxml.etree._ListErrorLog-class.html#filter_from_level -lxml.etree._ListErrorLog.__len__ lxml.etree._ListErrorLog-class.html#__len__ -lxml.etree._ErrorLog.__exit__ lxml.etree._ErrorLog-class.html#__exit__ -lxml.etree._ListErrorLog.__getitem__ lxml.etree._ListErrorLog-class.html#__getitem__ -lxml.etree._ListErrorLog.filter_levels lxml.etree._ListErrorLog-class.html#filter_levels -lxml.etree._ErrorLog.__iter__ lxml.etree._ErrorLog-class.html#__iter__ -lxml.etree._ErrorLog.copy lxml.etree._ErrorLog-class.html#copy -lxml.etree._ListErrorLog.__nonzero__ lxml.etree._ListErrorLog-class.html#__nonzero__ -lxml.etree._ListErrorLog.filter_from_fatals lxml.etree._ListErrorLog-class.html#filter_from_fatals -lxml.etree._RotatingErrorLog.receive lxml.etree._RotatingErrorLog-class.html#receive -lxml.etree._ErrorLog.clear lxml.etree._ErrorLog-class.html#clear -lxml.etree._ListErrorLog.filter_from_errors lxml.etree._ListErrorLog-class.html#filter_from_errors -lxml.etree._ListErrorLog.filter_types lxml.etree._ListErrorLog-class.html#filter_types -lxml.etree._ListErrorLog.__repr__ lxml.etree._ListErrorLog-class.html#__repr__ -lxml.etree._SaxParserTarget lxml.etree._SaxParserTarget-class.html -lxml.etree._SaxParserTarget.__new__ lxml.etree._SaxParserTarget-class.html#__new__ -lxml.etree._TargetParserResult lxml.etree._TargetParserResult-class.html -lxml.etree._TargetParserResult.__qualname__ lxml.etree._TargetParserResult-class.html#__qualname__ -lxml.etree._TargetParserResult.__init__ lxml.etree._TargetParserResult-class.html#__init__ -lxml.etree._Validator lxml.etree._Validator-class.html -lxml.etree._Validator.__new__ lxml.etree._Validator-class.html#__new__ -lxml.etree._Validator._clear_error_log lxml.etree._Validator-class.html#_clear_error_log -lxml.etree._Validator.assertValid lxml.etree._Validator-class.html#assertValid -lxml.etree._Validator._append_log_message lxml.etree._Validator-class.html#_append_log_message -lxml.etree._Validator.error_log lxml.etree._Validator-class.html#error_log -lxml.etree._Validator.assert_ lxml.etree._Validator-class.html#assert_ -lxml.etree._Validator.validate lxml.etree._Validator-class.html#validate -lxml.etree._XPathEvaluatorBase lxml.etree._XPathEvaluatorBase-class.html -lxml.etree._XPathEvaluatorBase.__new__ lxml.etree._XPathEvaluatorBase-class.html#__new__ -lxml.etree._XPathEvaluatorBase.evaluate lxml.etree._XPathEvaluatorBase-class.html#evaluate -lxml.etree._XPathEvaluatorBase.error_log lxml.etree._XPathEvaluatorBase-class.html#error_log -lxml.etree._XPathEvaluatorBase.__init__ lxml.etree._XPathEvaluatorBase-class.html#__init__ -lxml.etree._XSLTProcessingInstruction lxml.etree._XSLTProcessingInstruction-class.html -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.etree._XSLTProcessingInstruction.set lxml.etree._XSLTProcessingInstruction-class.html#set -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.etree._Element._init lxml.etree._Element-class.html#_init -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.etree._ProcessingInstruction.tag lxml.etree._ProcessingInstruction-class.html#tag -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.etree._XSLTProcessingInstruction.__new__ lxml.etree._XSLTProcessingInstruction-class.html#__new__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.etree._Element.getchildren lxml.etree._Element-class.html#getchildren -lxml.etree.PIBase.__init__ lxml.etree.PIBase-class.html#__init__ -lxml.etree._Element.cssselect lxml.etree._Element-class.html#cssselect -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.etree._ProcessingInstruction.get lxml.etree._ProcessingInstruction-class.html#get -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.etree._Element.__nonzero__ lxml.etree._Element-class.html#__nonzero__ -lxml.etree._ProcessingInstruction.target lxml.etree._ProcessingInstruction-class.html#target -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.etree._Element.__iter__ lxml.etree._Element-class.html#__iter__ -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.etree._ProcessingInstruction.__repr__ lxml.etree._ProcessingInstruction-class.html#__repr__ -lxml.etree._XSLTProcessingInstruction.parseXSL lxml.etree._XSLTProcessingInstruction-class.html#parseXSL -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.etree._ProcessingInstruction.attrib lxml.etree._ProcessingInstruction-class.html#attrib -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.etree._XSLTResultTree lxml.etree._XSLTResultTree-class.html -lxml.etree._ElementTree.getroot lxml.etree._ElementTree-class.html#getroot -lxml.etree._XSLTResultTree.__str__ lxml.etree._XSLTResultTree-class.html#__str__ -lxml.etree._ElementTree.iterfind lxml.etree._ElementTree-class.html#iterfind -lxml.etree._ElementTree.parse lxml.etree._ElementTree-class.html#parse -lxml.etree._ElementTree.relaxng lxml.etree._ElementTree-class.html#relaxng -lxml.etree._ElementTree.findall lxml.etree._ElementTree-class.html#findall -lxml.etree._XSLTResultTree.__new__ lxml.etree._XSLTResultTree-class.html#__new__ -lxml.etree._ElementTree.findtext lxml.etree._ElementTree-class.html#findtext -lxml.etree._ElementTree.find lxml.etree._ElementTree-class.html#find -lxml.etree._ElementTree.write lxml.etree._ElementTree-class.html#write -lxml.etree._ElementTree._setroot lxml.etree._ElementTree-class.html#_setroot -lxml.etree._ElementTree.xpath lxml.etree._ElementTree-class.html#xpath -lxml.etree._ElementTree.parser lxml.etree._ElementTree-class.html#parser -lxml.etree._ElementTree.xslt lxml.etree._ElementTree-class.html#xslt -lxml.etree._ElementTree.__deepcopy__ lxml.etree._ElementTree-class.html#__deepcopy__ -lxml.etree._ElementTree.getpath lxml.etree._ElementTree-class.html#getpath -lxml.etree._ElementTree.getelementpath lxml.etree._ElementTree-class.html#getelementpath -lxml.etree._ElementTree.write_c14n lxml.etree._ElementTree-class.html#write_c14n -lxml.etree._ElementTree.xmlschema lxml.etree._ElementTree-class.html#xmlschema -lxml.etree._ElementTree.xinclude lxml.etree._ElementTree-class.html#xinclude -lxml.etree._ElementTree.docinfo lxml.etree._ElementTree-class.html#docinfo -lxml.etree._XSLTResultTree.__unicode__ lxml.etree._XSLTResultTree-class.html#__unicode__ -lxml.etree._XSLTResultTree.xslt_profile lxml.etree._XSLTResultTree-class.html#xslt_profile -lxml.etree._ElementTree.iter lxml.etree._ElementTree-class.html#iter -lxml.etree._XSLTResultTree.write_output lxml.etree._XSLTResultTree-class.html#write_output -lxml.etree._ElementTree.getiterator lxml.etree._ElementTree-class.html#getiterator -lxml.etree._ElementTree.__copy__ lxml.etree._ElementTree-class.html#__copy__ -lxml.etree.htmlfile lxml.etree.htmlfile-class.html -lxml.etree.xmlfile.__exit__ lxml.etree.xmlfile-class.html#__exit__ -lxml.etree.htmlfile.__new__ lxml.etree.htmlfile-class.html#__new__ -lxml.etree.xmlfile.__aexit__ lxml.etree.xmlfile-class.html#__aexit__ -lxml.etree.xmlfile.__enter__ lxml.etree.xmlfile-class.html#__enter__ -lxml.etree.xmlfile.__aenter__ lxml.etree.xmlfile-class.html#__aenter__ -lxml.etree.htmlfile.__init__ lxml.etree.htmlfile-class.html#__init__ -lxml.etree.iterparse lxml.etree.iterparse-class.html -lxml.etree.iterparse.set_element_class_lookup lxml.etree.iterparse-class.html#set_element_class_lookup -lxml.etree.iterparse.__init__ lxml.etree.iterparse-class.html#__init__ -lxml.etree.iterparse.__new__ lxml.etree.iterparse-class.html#__new__ -lxml.etree.iterparse.next lxml.etree.iterparse-class.html#next -lxml.etree.iterparse.version lxml.etree.iterparse-class.html#version -lxml.etree.iterparse.__next__ lxml.etree.iterparse-class.html#__next__ -lxml.etree.iterparse.makeelement lxml.etree.iterparse-class.html#makeelement -lxml.etree.iterparse.__iter__ lxml.etree.iterparse-class.html#__iter__ -lxml.etree.iterparse.resolvers lxml.etree.iterparse-class.html#resolvers -lxml.etree.iterparse.error_log lxml.etree.iterparse-class.html#error_log -lxml.etree.iterparse.root lxml.etree.iterparse-class.html#root -lxml.etree.iterwalk lxml.etree.iterwalk-class.html -lxml.etree.iterwalk.__new__ lxml.etree.iterwalk-class.html#__new__ -lxml.etree.iterwalk.__next__ lxml.etree.iterwalk-class.html#__next__ -lxml.etree.iterwalk.next lxml.etree.iterwalk-class.html#next -lxml.etree.iterwalk.__iter__ lxml.etree.iterwalk-class.html#__iter__ -lxml.etree.iterwalk.__init__ lxml.etree.iterwalk-class.html#__init__ -lxml.etree.iterwalk.skip_subtree lxml.etree.iterwalk-class.html#skip_subtree -lxml.etree.xmlfile lxml.etree.xmlfile-class.html -lxml.etree.xmlfile.__exit__ lxml.etree.xmlfile-class.html#__exit__ -lxml.etree.xmlfile.__new__ lxml.etree.xmlfile-class.html#__new__ -lxml.etree.xmlfile.__aexit__ lxml.etree.xmlfile-class.html#__aexit__ -lxml.etree.xmlfile.__enter__ lxml.etree.xmlfile-class.html#__enter__ -lxml.etree.xmlfile.__aenter__ lxml.etree.xmlfile-class.html#__aenter__ -lxml.etree.xmlfile.__init__ lxml.etree.xmlfile-class.html#__init__ -lxml.html.CheckboxGroup lxml.html.CheckboxGroup-class.html -lxml.html.CheckboxGroup.value_options lxml.html.CheckboxGroup-class.html#value_options -lxml.html.CheckboxGroup.value lxml.html.CheckboxGroup-class.html#value -lxml.html.CheckboxGroup.__repr__ lxml.html.CheckboxGroup-class.html#__repr__ -lxml.html.CheckboxValues lxml.html.CheckboxValues-class.html -_abcoll.Sized.__metaclass__ abc.ABCMeta-class.html -lxml.html.CheckboxValues.__init__ lxml.html.CheckboxValues-class.html#__init__ -lxml.html.CheckboxValues.__abstractmethods__ lxml.html.CheckboxValues-class.html#__abstractmethods__ -lxml.html.CheckboxValues.add lxml.html.CheckboxValues-class.html#add -lxml.html.CheckboxValues.__iter__ lxml.html.CheckboxValues-class.html#__iter__ -lxml.html.CheckboxValues.remove lxml.html.CheckboxValues-class.html#remove -lxml.html.CheckboxValues.__repr__ lxml.html.CheckboxValues-class.html#__repr__ -lxml.html.Classes lxml.html.Classes-class.html -_abcoll.Sized.__metaclass__ abc.ABCMeta-class.html -lxml.html.Classes._abc_negative_cache lxml.html.Classes-class.html#_abc_negative_cache -lxml.html.Classes.toggle lxml.html.Classes-class.html#toggle -lxml.html.Classes.__init__ lxml.html.Classes-class.html#__init__ -lxml.html.Classes.__contains__ lxml.html.Classes-class.html#__contains__ -lxml.html.Classes.__abstractmethods__ lxml.html.Classes-class.html#__abstractmethods__ -lxml.html.Classes.add lxml.html.Classes-class.html#add -lxml.html.Classes.__len__ lxml.html.Classes-class.html#__len__ -lxml.html.Classes.update lxml.html.Classes-class.html#update -lxml.html.Classes.__iter__ lxml.html.Classes-class.html#__iter__ -lxml.html.Classes.remove lxml.html.Classes-class.html#remove -lxml.html.Classes._abc_negative_cache_version lxml.html.Classes-class.html#_abc_negative_cache_version -lxml.html.Classes.discard lxml.html.Classes-class.html#discard -lxml.html.Classes._abc_registry lxml.html.Classes-class.html#_abc_registry -lxml.html.FieldsDict lxml.html.FieldsDict-class.html -_abcoll.Sized.__metaclass__ abc.ABCMeta-class.html -lxml.html.FieldsDict._abc_negative_cache lxml.html.FieldsDict-class.html#_abc_negative_cache -lxml.html.FieldsDict.__init__ lxml.html.FieldsDict-class.html#__init__ -lxml.html.FieldsDict.__contains__ lxml.html.FieldsDict-class.html#__contains__ -lxml.html.FieldsDict.__abstractmethods__ lxml.html.FieldsDict-class.html#__abstractmethods__ -lxml.html.FieldsDict.__len__ lxml.html.FieldsDict-class.html#__len__ -lxml.html.FieldsDict.__getitem__ lxml.html.FieldsDict-class.html#__getitem__ -lxml.html.FieldsDict.keys lxml.html.FieldsDict-class.html#keys -lxml.html.FieldsDict.__iter__ lxml.html.FieldsDict-class.html#__iter__ -lxml.html.FieldsDict.__delitem__ lxml.html.FieldsDict-class.html#__delitem__ -lxml.html.FieldsDict.__setitem__ lxml.html.FieldsDict-class.html#__setitem__ -lxml.html.FieldsDict._abc_negative_cache_version lxml.html.FieldsDict-class.html#_abc_negative_cache_version -lxml.html.FieldsDict.__repr__ lxml.html.FieldsDict-class.html#__repr__ -lxml.html.FieldsDict._abc_registry lxml.html.FieldsDict-class.html#_abc_registry -lxml.html.FormElement lxml.html.FormElement-class.html -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.etree._Element.text lxml.etree._Element-class.html#text -lxml.etree._Element._init lxml.etree._Element-class.html#_init -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.html.HtmlMixin.drop_tag lxml.html.HtmlMixin-class.html#drop_tag -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.html.HtmlMixin.iterlinks lxml.html.HtmlMixin-class.html#iterlinks -lxml.html.HtmlMixin.forms lxml.html.HtmlMixin-class.html#forms -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.etree._Element.__delitem__ lxml.etree._Element-class.html#__delitem__ -lxml.etree._Element.__getitem__ lxml.etree._Element-class.html#__getitem__ -lxml.etree._Element.get lxml.etree._Element-class.html#get -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.etree._Element.insert lxml.etree._Element-class.html#insert -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.etree._Element.__nonzero__ lxml.etree._Element-class.html#__nonzero__ -lxml.html.FormElement.fields lxml.html.FormElement-class.html#fields -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.html.FormElement.method lxml.html.FormElement-class.html#method -lxml.html.HtmlMixin.find_rel_links lxml.html.HtmlMixin-class.html#find_rel_links -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.html.HtmlElement.set lxml.html.HtmlElement-class.html#set -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.etree._Element.append lxml.etree._Element-class.html#append -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.html.HtmlMixin.label lxml.html.HtmlMixin-class.html#label -lxml.etree._Element.getchildren lxml.etree._Element-class.html#getchildren -lxml.html.HtmlMixin.resolve_base_href lxml.html.HtmlMixin-class.html#resolve_base_href -lxml.html.HtmlMixin.body lxml.html.HtmlMixin-class.html#body -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.etree._Element.__setitem__ lxml.etree._Element-class.html#__setitem__ -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.html.HtmlMixin.find_class lxml.html.HtmlMixin-class.html#find_class -lxml.etree._Element.items lxml.etree._Element-class.html#items -lxml.html.FormElement._name lxml.html.FormElement-class.html#_name -lxml.html.HtmlElement.cssselect lxml.html.HtmlElement-class.html#cssselect -lxml.etree._Element.__repr__ lxml.etree._Element-class.html#__repr__ -lxml.html.FormElement.action lxml.html.FormElement-class.html#action -lxml.etree._Element.attrib lxml.etree._Element-class.html#attrib -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.html.HtmlMixin.drop_tree lxml.html.HtmlMixin-class.html#drop_tree -lxml.html.HtmlMixin.base_url lxml.html.HtmlMixin-class.html#base_url -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.html.FormElement.form_values lxml.html.FormElement-class.html#form_values -lxml.html.HtmlMixin.text_content lxml.html.HtmlMixin-class.html#text_content -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.etree._Element.__len__ lxml.etree._Element-class.html#__len__ -lxml.html.HtmlMixin.rewrite_links lxml.html.HtmlMixin-class.html#rewrite_links -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.html.HtmlMixin.head lxml.html.HtmlMixin-class.html#head -lxml.etree._Element.__iter__ lxml.etree._Element-class.html#__iter__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.html.HtmlMixin.classes lxml.html.HtmlMixin-class.html#classes -lxml.etree._Element.values lxml.etree._Element-class.html#values -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.etree._Element.tag lxml.etree._Element-class.html#tag -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.etree.ElementBase.__init__ lxml.etree.ElementBase-class.html#__init__ -lxml.html.HtmlMixin.make_links_absolute lxml.html.HtmlMixin-class.html#make_links_absolute -lxml.html.HtmlMixin.get_element_by_id lxml.html.HtmlMixin-class.html#get_element_by_id -lxml.etree.ElementBase.__new__ lxml.etree.ElementBase-class.html#__new__ -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.html.FormElement.inputs lxml.html.FormElement-class.html#inputs -lxml.etree._Element.keys lxml.etree._Element-class.html#keys -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.html.HTMLParser lxml.html.HTMLParser-class.html -lxml.etree._FeedParser.feed lxml.etree._FeedParser-class.html#feed -lxml.etree._FeedParser.close lxml.etree._FeedParser-class.html#close -lxml.html.HTMLParser.__init__ lxml.html.HTMLParser-class.html#__init__ -lxml.etree.HTMLParser.__new__ lxml.etree.HTMLParser-class.html#__new__ -lxml.etree._FeedParser.feed_error_log lxml.etree._FeedParser-class.html#feed_error_log -lxml.html.HtmlComment lxml.html.HtmlComment-class.html -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.html.HtmlMixin.body lxml.html.HtmlMixin-class.html#body -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.etree._Element._init lxml.etree._Element-class.html#_init -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.html.HtmlMixin.iterlinks lxml.html.HtmlMixin-class.html#iterlinks -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.etree._Comment.tag lxml.etree._Comment-class.html#tag -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.html.HtmlMixin.drop_tag lxml.html.HtmlMixin-class.html#drop_tag -lxml.html.HtmlMixin.label lxml.html.HtmlMixin-class.html#label -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.html.HtmlMixin.make_links_absolute lxml.html.HtmlMixin-class.html#make_links_absolute -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.html.HtmlMixin.text_content lxml.html.HtmlMixin-class.html#text_content -lxml.html.HtmlMixin.get_element_by_id lxml.html.HtmlMixin-class.html#get_element_by_id -lxml.etree.CommentBase.__new__ lxml.etree.CommentBase-class.html#__new__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.html.HtmlMixin.base_url lxml.html.HtmlMixin-class.html#base_url -lxml.html.HtmlMixin.drop_tree lxml.html.HtmlMixin-class.html#drop_tree -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.html.HtmlMixin.forms lxml.html.HtmlMixin-class.html#forms -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.etree._Element.getchildren lxml.etree._Element-class.html#getchildren -lxml.etree.CommentBase.__init__ lxml.etree.CommentBase-class.html#__init__ -lxml.etree._Element.cssselect lxml.etree._Element-class.html#cssselect -lxml.html.HtmlMixin.resolve_base_href lxml.html.HtmlMixin-class.html#resolve_base_href -lxml.html.HtmlMixin.rewrite_links lxml.html.HtmlMixin-class.html#rewrite_links -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.html.HtmlMixin.head lxml.html.HtmlMixin-class.html#head -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.html.HtmlMixin.find_class lxml.html.HtmlMixin-class.html#find_class -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.etree._Element.__nonzero__ lxml.etree._Element-class.html#__nonzero__ -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.etree._Element.__iter__ lxml.etree._Element-class.html#__iter__ -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.html.HtmlMixin.classes lxml.html.HtmlMixin-class.html#classes -lxml.etree._Comment.__repr__ lxml.etree._Comment-class.html#__repr__ -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.html.HtmlMixin.find_rel_links lxml.html.HtmlMixin-class.html#find_rel_links -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.html.HtmlElement lxml.html.HtmlElement-class.html -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.html.HtmlMixin.body lxml.html.HtmlMixin-class.html#body -lxml.html.HtmlElement.set lxml.html.HtmlElement-class.html#set -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.etree._Element.text lxml.etree._Element-class.html#text -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.etree._Element._init lxml.etree._Element-class.html#_init -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.html.HtmlMixin.iterlinks lxml.html.HtmlMixin-class.html#iterlinks -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.etree._Element.tag lxml.etree._Element-class.html#tag -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.html.HtmlMixin.drop_tag lxml.html.HtmlMixin-class.html#drop_tag -lxml.html.HtmlMixin.label lxml.html.HtmlMixin-class.html#label -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.etree._Element.append lxml.etree._Element-class.html#append -lxml.html.HtmlMixin.make_links_absolute lxml.html.HtmlMixin-class.html#make_links_absolute -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.html.HtmlMixin.text_content lxml.html.HtmlMixin-class.html#text_content -lxml.html.HtmlMixin.get_element_by_id lxml.html.HtmlMixin-class.html#get_element_by_id -lxml.etree.ElementBase.__new__ lxml.etree.ElementBase-class.html#__new__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.html.HtmlMixin.base_url lxml.html.HtmlMixin-class.html#base_url -lxml.html.HtmlMixin.drop_tree lxml.html.HtmlMixin-class.html#drop_tree -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.html.HtmlMixin.forms lxml.html.HtmlMixin-class.html#forms -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.etree._Element.getchildren lxml.etree._Element-class.html#getchildren -lxml.etree.ElementBase.__init__ lxml.etree.ElementBase-class.html#__init__ -lxml.etree._Element.values lxml.etree._Element-class.html#values -lxml.html.HtmlMixin.resolve_base_href lxml.html.HtmlMixin-class.html#resolve_base_href -lxml.etree._Element.__len__ lxml.etree._Element-class.html#__len__ -lxml.html.HtmlMixin.rewrite_links lxml.html.HtmlMixin-class.html#rewrite_links -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.html.HtmlMixin.head lxml.html.HtmlMixin-class.html#head -lxml.etree._Element.__getitem__ lxml.etree._Element-class.html#__getitem__ -lxml.etree._Element.get lxml.etree._Element-class.html#get -lxml.etree._Element.keys lxml.etree._Element-class.html#keys -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.etree._Element.__iter__ lxml.etree._Element-class.html#__iter__ -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.html.HtmlMixin.find_class lxml.html.HtmlMixin-class.html#find_class -lxml.etree._Element.insert lxml.etree._Element-class.html#insert -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.etree._Element.__delitem__ lxml.etree._Element-class.html#__delitem__ -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.etree._Element.__nonzero__ lxml.etree._Element-class.html#__nonzero__ -lxml.etree._Element.items lxml.etree._Element-class.html#items -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.etree._Element.__setitem__ lxml.etree._Element-class.html#__setitem__ -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.html.HtmlMixin.classes lxml.html.HtmlMixin-class.html#classes -lxml.html.HtmlElement.cssselect lxml.html.HtmlElement-class.html#cssselect -lxml.etree._Element.__repr__ lxml.etree._Element-class.html#__repr__ -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.html.HtmlMixin.find_rel_links lxml.html.HtmlMixin-class.html#find_rel_links -lxml.etree._Element.attrib lxml.etree._Element-class.html#attrib -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.html.HtmlElementClassLookup lxml.html.HtmlElementClassLookup-class.html -lxml.html.HtmlElementClassLookup._default_element_classes lxml.html.HtmlElementClassLookup-class.html#_default_element_classes -lxml.etree.CustomElementClassLookup.__new__ lxml.etree.CustomElementClassLookup-class.html#__new__ -lxml.html.HtmlElementClassLookup.lookup lxml.html.HtmlElementClassLookup-class.html#lookup -lxml.etree.FallbackElementClassLookup.fallback lxml.etree.FallbackElementClassLookup-class.html#fallback -lxml.etree.FallbackElementClassLookup.set_fallback lxml.etree.FallbackElementClassLookup-class.html#set_fallback -lxml.html.HtmlElementClassLookup.__init__ lxml.html.HtmlElementClassLookup-class.html#__init__ -lxml.html.HtmlEntity lxml.html.HtmlEntity-class.html -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.html.HtmlMixin.body lxml.html.HtmlMixin-class.html#body -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.etree._Entity.text lxml.etree._Entity-class.html#text -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.etree._Element._init lxml.etree._Element-class.html#_init -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.html.HtmlMixin.iterlinks lxml.html.HtmlMixin-class.html#iterlinks -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.etree._Entity.tag lxml.etree._Entity-class.html#tag -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.html.HtmlMixin.drop_tag lxml.html.HtmlMixin-class.html#drop_tag -lxml.html.HtmlMixin.label lxml.html.HtmlMixin-class.html#label -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.html.HtmlMixin.make_links_absolute lxml.html.HtmlMixin-class.html#make_links_absolute -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.html.HtmlMixin.text_content lxml.html.HtmlMixin-class.html#text_content -lxml.html.HtmlMixin.get_element_by_id lxml.html.HtmlMixin-class.html#get_element_by_id -lxml.etree.EntityBase.__new__ lxml.etree.EntityBase-class.html#__new__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.html.HtmlMixin.base_url lxml.html.HtmlMixin-class.html#base_url -lxml.html.HtmlMixin.drop_tree lxml.html.HtmlMixin-class.html#drop_tree -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.html.HtmlMixin.forms lxml.html.HtmlMixin-class.html#forms -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.etree._Element.getchildren lxml.etree._Element-class.html#getchildren -lxml.etree.EntityBase.__init__ lxml.etree.EntityBase-class.html#__init__ -lxml.etree._Element.cssselect lxml.etree._Element-class.html#cssselect -lxml.html.HtmlMixin.resolve_base_href lxml.html.HtmlMixin-class.html#resolve_base_href -lxml.html.HtmlMixin.rewrite_links lxml.html.HtmlMixin-class.html#rewrite_links -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.html.HtmlMixin.head lxml.html.HtmlMixin-class.html#head -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.html.HtmlMixin.find_class lxml.html.HtmlMixin-class.html#find_class -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.etree._Element.__nonzero__ lxml.etree._Element-class.html#__nonzero__ -lxml.etree._Entity.name lxml.etree._Entity-class.html#name -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.etree._Element.__iter__ lxml.etree._Element-class.html#__iter__ -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.html.HtmlMixin.classes lxml.html.HtmlMixin-class.html#classes -lxml.etree._Entity.__repr__ lxml.etree._Entity-class.html#__repr__ -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.html.HtmlMixin.find_rel_links lxml.html.HtmlMixin-class.html#find_rel_links -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.html.HtmlMixin lxml.html.HtmlMixin-class.html -lxml.html.HtmlMixin.set lxml.html.HtmlMixin-class.html#set -lxml.html.HtmlMixin.drop_tree lxml.html.HtmlMixin-class.html#drop_tree -lxml.html.HtmlMixin.drop_tag lxml.html.HtmlMixin-class.html#drop_tag -lxml.html.HtmlMixin.make_links_absolute lxml.html.HtmlMixin-class.html#make_links_absolute -lxml.html.HtmlMixin.get_element_by_id lxml.html.HtmlMixin-class.html#get_element_by_id -lxml.html.HtmlMixin.iterlinks lxml.html.HtmlMixin-class.html#iterlinks -lxml.html.HtmlMixin.base_url lxml.html.HtmlMixin-class.html#base_url -lxml.html.HtmlMixin.label lxml.html.HtmlMixin-class.html#label -lxml.html.HtmlMixin.forms lxml.html.HtmlMixin-class.html#forms -lxml.html.HtmlMixin.resolve_base_href lxml.html.HtmlMixin-class.html#resolve_base_href -lxml.html.HtmlMixin.rewrite_links lxml.html.HtmlMixin-class.html#rewrite_links -lxml.html.HtmlMixin.body lxml.html.HtmlMixin-class.html#body -lxml.html.HtmlMixin.head lxml.html.HtmlMixin-class.html#head -lxml.html.HtmlMixin.text_content lxml.html.HtmlMixin-class.html#text_content -lxml.html.HtmlMixin.find_class lxml.html.HtmlMixin-class.html#find_class -lxml.html.HtmlMixin.classes lxml.html.HtmlMixin-class.html#classes -lxml.html.HtmlMixin.cssselect lxml.html.HtmlMixin-class.html#cssselect -lxml.html.HtmlMixin.find_rel_links lxml.html.HtmlMixin-class.html#find_rel_links -lxml.html.HtmlProcessingInstruction lxml.html.HtmlProcessingInstruction-class.html -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.html.HtmlMixin.body lxml.html.HtmlMixin-class.html#body -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.etree._Element._init lxml.etree._Element-class.html#_init -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.html.HtmlMixin.iterlinks lxml.html.HtmlMixin-class.html#iterlinks -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.etree._ProcessingInstruction.tag lxml.etree._ProcessingInstruction-class.html#tag -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.html.HtmlMixin.drop_tag lxml.html.HtmlMixin-class.html#drop_tag -lxml.html.HtmlMixin.label lxml.html.HtmlMixin-class.html#label -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.html.HtmlMixin.make_links_absolute lxml.html.HtmlMixin-class.html#make_links_absolute -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.html.HtmlMixin.text_content lxml.html.HtmlMixin-class.html#text_content -lxml.html.HtmlMixin.get_element_by_id lxml.html.HtmlMixin-class.html#get_element_by_id -lxml.etree.PIBase.__new__ lxml.etree.PIBase-class.html#__new__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.html.HtmlMixin.base_url lxml.html.HtmlMixin-class.html#base_url -lxml.html.HtmlMixin.drop_tree lxml.html.HtmlMixin-class.html#drop_tree -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.html.HtmlMixin.forms lxml.html.HtmlMixin-class.html#forms -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.etree._Element.getchildren lxml.etree._Element-class.html#getchildren -lxml.etree.PIBase.__init__ lxml.etree.PIBase-class.html#__init__ -lxml.etree._Element.cssselect lxml.etree._Element-class.html#cssselect -lxml.html.HtmlMixin.resolve_base_href lxml.html.HtmlMixin-class.html#resolve_base_href -lxml.html.HtmlMixin.rewrite_links lxml.html.HtmlMixin-class.html#rewrite_links -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.html.HtmlMixin.head lxml.html.HtmlMixin-class.html#head -lxml.etree._ProcessingInstruction.get lxml.etree._ProcessingInstruction-class.html#get -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.html.HtmlMixin.find_class lxml.html.HtmlMixin-class.html#find_class -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.etree._Element.__nonzero__ lxml.etree._Element-class.html#__nonzero__ -lxml.etree._ProcessingInstruction.target lxml.etree._ProcessingInstruction-class.html#target -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.etree._Element.__iter__ lxml.etree._Element-class.html#__iter__ -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.html.HtmlMixin.classes lxml.html.HtmlMixin-class.html#classes -lxml.etree._ProcessingInstruction.__repr__ lxml.etree._ProcessingInstruction-class.html#__repr__ -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.html.HtmlMixin.find_rel_links lxml.html.HtmlMixin-class.html#find_rel_links -lxml.etree._ProcessingInstruction.attrib lxml.etree._ProcessingInstruction-class.html#attrib -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.html.InputElement lxml.html.InputElement-class.html -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.etree._Element.text lxml.etree._Element-class.html#text -lxml.etree._Element._init lxml.etree._Element-class.html#_init -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.html.HtmlMixin.drop_tag lxml.html.HtmlMixin-class.html#drop_tag -lxml.html.HtmlMixin.label lxml.html.HtmlMixin-class.html#label -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.html.HtmlMixin.iterlinks lxml.html.HtmlMixin-class.html#iterlinks -lxml.html.HtmlMixin.forms lxml.html.HtmlMixin-class.html#forms -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.etree._Element.__delitem__ lxml.etree._Element-class.html#__delitem__ -lxml.etree._Element.__getitem__ lxml.etree._Element-class.html#__getitem__ -lxml.etree._Element.get lxml.etree._Element-class.html#get -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.etree._Element.insert lxml.etree._Element-class.html#insert -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.etree._Element.__nonzero__ lxml.etree._Element-class.html#__nonzero__ -lxml.html.InputMixin.name lxml.html.InputMixin-class.html#name -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.html.HtmlMixin.find_rel_links lxml.html.HtmlMixin-class.html#find_rel_links -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.html.HtmlElement.set lxml.html.HtmlElement-class.html#set -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.etree._Element.append lxml.etree._Element-class.html#append -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.etree._Element.getchildren lxml.etree._Element-class.html#getchildren -lxml.html.HtmlMixin.resolve_base_href lxml.html.HtmlMixin-class.html#resolve_base_href -lxml.html.HtmlMixin.body lxml.html.HtmlMixin-class.html#body -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.etree._Element.__setitem__ lxml.etree._Element-class.html#__setitem__ -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.html.HtmlMixin.find_class lxml.html.HtmlMixin-class.html#find_class -lxml.etree._Element.items lxml.etree._Element-class.html#items -lxml.html.HtmlElement.cssselect lxml.html.HtmlElement-class.html#cssselect -lxml.html.InputMixin.__repr__ lxml.html.InputMixin-class.html#__repr__ -lxml.etree._Element.attrib lxml.etree._Element-class.html#attrib -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.html.HtmlMixin.drop_tree lxml.html.HtmlMixin-class.html#drop_tree -lxml.html.HtmlMixin.base_url lxml.html.HtmlMixin-class.html#base_url -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.html.HtmlMixin.text_content lxml.html.HtmlMixin-class.html#text_content -lxml.html.InputElement.checked lxml.html.InputElement-class.html#checked -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.html.InputElement.type lxml.html.InputElement-class.html#type -lxml.etree._Element.__len__ lxml.etree._Element-class.html#__len__ -lxml.html.HtmlMixin.rewrite_links lxml.html.HtmlMixin-class.html#rewrite_links -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.html.HtmlMixin.head lxml.html.HtmlMixin-class.html#head -lxml.etree._Element.__iter__ lxml.etree._Element-class.html#__iter__ -lxml.html.InputElement.checkable lxml.html.InputElement-class.html#checkable -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.html.InputElement.value lxml.html.InputElement-class.html#value -lxml.html.HtmlMixin.classes lxml.html.HtmlMixin-class.html#classes -lxml.etree._Element.values lxml.etree._Element-class.html#values -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.etree._Element.tag lxml.etree._Element-class.html#tag -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.etree.ElementBase.__init__ lxml.etree.ElementBase-class.html#__init__ -lxml.html.HtmlMixin.make_links_absolute lxml.html.HtmlMixin-class.html#make_links_absolute -lxml.html.HtmlMixin.get_element_by_id lxml.html.HtmlMixin-class.html#get_element_by_id -lxml.etree.ElementBase.__new__ lxml.etree.ElementBase-class.html#__new__ -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.etree._Element.keys lxml.etree._Element-class.html#keys -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.html.InputGetter lxml.html.InputGetter-class.html -lxml.html.InputGetter.__getitem__ lxml.html.InputGetter-class.html#__getitem__ -lxml.html.InputGetter.__contains__ lxml.html.InputGetter-class.html#__contains__ -lxml.html.InputGetter.keys lxml.html.InputGetter-class.html#keys -lxml.html.InputGetter.__iter__ lxml.html.InputGetter-class.html#__iter__ -lxml.html.InputGetter.__repr__ lxml.html.InputGetter-class.html#__repr__ -lxml.html.InputGetter._all_xpath lxml.html.InputGetter-class.html#_all_xpath -lxml.html.InputGetter.__init__ lxml.html.InputGetter-class.html#__init__ -lxml.html.InputGetter._name_xpath lxml.html.InputGetter-class.html#_name_xpath -lxml.html.InputMixin lxml.html.InputMixin-class.html -lxml.html.InputMixin.__repr__ lxml.html.InputMixin-class.html#__repr__ -lxml.html.InputMixin.name lxml.html.InputMixin-class.html#name -lxml.html.LabelElement lxml.html.LabelElement-class.html -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.html.HtmlMixin.body lxml.html.HtmlMixin-class.html#body -lxml.html.HtmlElement.set lxml.html.HtmlElement-class.html#set -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.etree._Element.text lxml.etree._Element-class.html#text -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.etree._Element._init lxml.etree._Element-class.html#_init -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.html.HtmlMixin.iterlinks lxml.html.HtmlMixin-class.html#iterlinks -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.etree._Element.tag lxml.etree._Element-class.html#tag -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.html.HtmlMixin.drop_tag lxml.html.HtmlMixin-class.html#drop_tag -lxml.html.HtmlMixin.label lxml.html.HtmlMixin-class.html#label -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.etree._Element.append lxml.etree._Element-class.html#append -lxml.html.HtmlMixin.make_links_absolute lxml.html.HtmlMixin-class.html#make_links_absolute -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.html.HtmlMixin.text_content lxml.html.HtmlMixin-class.html#text_content -lxml.html.HtmlMixin.get_element_by_id lxml.html.HtmlMixin-class.html#get_element_by_id -lxml.etree.ElementBase.__new__ lxml.etree.ElementBase-class.html#__new__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.html.HtmlMixin.base_url lxml.html.HtmlMixin-class.html#base_url -lxml.html.HtmlMixin.drop_tree lxml.html.HtmlMixin-class.html#drop_tree -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.html.HtmlMixin.forms lxml.html.HtmlMixin-class.html#forms -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.etree._Element.getchildren lxml.etree._Element-class.html#getchildren -lxml.html.HtmlMixin.classes lxml.html.HtmlMixin-class.html#classes -lxml.etree.ElementBase.__init__ lxml.etree.ElementBase-class.html#__init__ -lxml.etree._Element.values lxml.etree._Element-class.html#values -lxml.html.HtmlMixin.resolve_base_href lxml.html.HtmlMixin-class.html#resolve_base_href -lxml.etree._Element.__len__ lxml.etree._Element-class.html#__len__ -lxml.html.HtmlMixin.rewrite_links lxml.html.HtmlMixin-class.html#rewrite_links -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.html.HtmlMixin.head lxml.html.HtmlMixin-class.html#head -lxml.etree._Element.__getitem__ lxml.etree._Element-class.html#__getitem__ -lxml.etree._Element.get lxml.etree._Element-class.html#get -lxml.etree._Element.keys lxml.etree._Element-class.html#keys -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.etree._Element.__iter__ lxml.etree._Element-class.html#__iter__ -lxml.html.LabelElement.for_element lxml.html.LabelElement-class.html#for_element -lxml.html.HtmlMixin.find_class lxml.html.HtmlMixin-class.html#find_class -lxml.etree._Element.insert lxml.etree._Element-class.html#insert -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.etree._Element.__delitem__ lxml.etree._Element-class.html#__delitem__ -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.etree._Element.__nonzero__ lxml.etree._Element-class.html#__nonzero__ -lxml.etree._Element.items lxml.etree._Element-class.html#items -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.etree._Element.__setitem__ lxml.etree._Element-class.html#__setitem__ -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.html.HtmlElement.cssselect lxml.html.HtmlElement-class.html#cssselect -lxml.etree._Element.__repr__ lxml.etree._Element-class.html#__repr__ -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.html.HtmlMixin.find_rel_links lxml.html.HtmlMixin-class.html#find_rel_links -lxml.etree._Element.attrib lxml.etree._Element-class.html#attrib -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.html.MultipleSelectOptions lxml.html.MultipleSelectOptions-class.html -_abcoll.Sized.__metaclass__ abc.ABCMeta-class.html -lxml.html.MultipleSelectOptions.__init__ lxml.html.MultipleSelectOptions-class.html#__init__ -lxml.html.MultipleSelectOptions.__abstractmethods__ lxml.html.MultipleSelectOptions-class.html#__abstractmethods__ -lxml.html.MultipleSelectOptions.add lxml.html.MultipleSelectOptions-class.html#add -lxml.html.MultipleSelectOptions.__iter__ lxml.html.MultipleSelectOptions-class.html#__iter__ -lxml.html.MultipleSelectOptions.remove lxml.html.MultipleSelectOptions-class.html#remove -lxml.html.MultipleSelectOptions.__repr__ lxml.html.MultipleSelectOptions-class.html#__repr__ -lxml.html.MultipleSelectOptions.options lxml.html.MultipleSelectOptions-class.html#options -lxml.html.RadioGroup lxml.html.RadioGroup-class.html -lxml.html.RadioGroup.value_options lxml.html.RadioGroup-class.html#value_options -lxml.html.RadioGroup.value lxml.html.RadioGroup-class.html#value -lxml.html.RadioGroup.__repr__ lxml.html.RadioGroup-class.html#__repr__ -lxml.html.SelectElement lxml.html.SelectElement-class.html -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.etree._Element.text lxml.etree._Element-class.html#text -lxml.etree._Element._init lxml.etree._Element-class.html#_init -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.html.HtmlMixin.drop_tag lxml.html.HtmlMixin-class.html#drop_tag -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.html.HtmlMixin.iterlinks lxml.html.HtmlMixin-class.html#iterlinks -lxml.html.HtmlMixin.forms lxml.html.HtmlMixin-class.html#forms -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.etree._Element.__delitem__ lxml.etree._Element-class.html#__delitem__ -lxml.etree._Element.__getitem__ lxml.etree._Element-class.html#__getitem__ -lxml.etree._Element.get lxml.etree._Element-class.html#get -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.etree._Element.insert lxml.etree._Element-class.html#insert -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.etree._Element.__nonzero__ lxml.etree._Element-class.html#__nonzero__ -lxml.html.InputMixin.name lxml.html.InputMixin-class.html#name -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.html.HtmlMixin.find_rel_links lxml.html.HtmlMixin-class.html#find_rel_links -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.html.HtmlElement.set lxml.html.HtmlElement-class.html#set -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.etree._Element.append lxml.etree._Element-class.html#append -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.html.HtmlMixin.label lxml.html.HtmlMixin-class.html#label -lxml.etree._Element.getchildren lxml.etree._Element-class.html#getchildren -lxml.html.HtmlMixin.resolve_base_href lxml.html.HtmlMixin-class.html#resolve_base_href -lxml.html.HtmlMixin.body lxml.html.HtmlMixin-class.html#body -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.etree._Element.__setitem__ lxml.etree._Element-class.html#__setitem__ -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.html.HtmlMixin.find_class lxml.html.HtmlMixin-class.html#find_class -lxml.etree._Element.items lxml.etree._Element-class.html#items -lxml.html.HtmlElement.cssselect lxml.html.HtmlElement-class.html#cssselect -lxml.html.InputMixin.__repr__ lxml.html.InputMixin-class.html#__repr__ -lxml.etree._Element.attrib lxml.etree._Element-class.html#attrib -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.html.HtmlMixin.drop_tree lxml.html.HtmlMixin-class.html#drop_tree -lxml.html.HtmlMixin.base_url lxml.html.HtmlMixin-class.html#base_url -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.html.HtmlMixin.text_content lxml.html.HtmlMixin-class.html#text_content -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.etree._Element.__len__ lxml.etree._Element-class.html#__len__ -lxml.html.HtmlMixin.rewrite_links lxml.html.HtmlMixin-class.html#rewrite_links -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.html.SelectElement.value_options lxml.html.SelectElement-class.html#value_options -lxml.html.HtmlMixin.head lxml.html.HtmlMixin-class.html#head -lxml.etree._Element.__iter__ lxml.etree._Element-class.html#__iter__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.html.SelectElement.value lxml.html.SelectElement-class.html#value -lxml.html.HtmlMixin.classes lxml.html.HtmlMixin-class.html#classes -lxml.etree._Element.values lxml.etree._Element-class.html#values -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.etree._Element.tag lxml.etree._Element-class.html#tag -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.etree.ElementBase.__init__ lxml.etree.ElementBase-class.html#__init__ -lxml.html.HtmlMixin.make_links_absolute lxml.html.HtmlMixin-class.html#make_links_absolute -lxml.html.HtmlMixin.get_element_by_id lxml.html.HtmlMixin-class.html#get_element_by_id -lxml.etree.ElementBase.__new__ lxml.etree.ElementBase-class.html#__new__ -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.html.SelectElement.multiple lxml.html.SelectElement-class.html#multiple -lxml.etree._Element.keys lxml.etree._Element-class.html#keys -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.html.TextareaElement lxml.html.TextareaElement-class.html -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.html.HtmlMixin.body lxml.html.HtmlMixin-class.html#body -lxml.html.HtmlElement.set lxml.html.HtmlElement-class.html#set -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.etree._Element.text lxml.etree._Element-class.html#text -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.etree._Element._init lxml.etree._Element-class.html#_init -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.html.HtmlMixin.iterlinks lxml.html.HtmlMixin-class.html#iterlinks -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.etree._Element.tag lxml.etree._Element-class.html#tag -lxml.html.TextareaElement.value lxml.html.TextareaElement-class.html#value -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.html.HtmlMixin.drop_tag lxml.html.HtmlMixin-class.html#drop_tag -lxml.html.HtmlMixin.label lxml.html.HtmlMixin-class.html#label -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.etree._Element.append lxml.etree._Element-class.html#append -lxml.html.HtmlMixin.make_links_absolute lxml.html.HtmlMixin-class.html#make_links_absolute -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.html.HtmlMixin.text_content lxml.html.HtmlMixin-class.html#text_content -lxml.html.HtmlMixin.get_element_by_id lxml.html.HtmlMixin-class.html#get_element_by_id -lxml.etree.ElementBase.__new__ lxml.etree.ElementBase-class.html#__new__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.html.HtmlMixin.base_url lxml.html.HtmlMixin-class.html#base_url -lxml.html.HtmlMixin.drop_tree lxml.html.HtmlMixin-class.html#drop_tree -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.html.HtmlMixin.forms lxml.html.HtmlMixin-class.html#forms -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.etree._Element.getchildren lxml.etree._Element-class.html#getchildren -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.etree.ElementBase.__init__ lxml.etree.ElementBase-class.html#__init__ -lxml.etree._Element.values lxml.etree._Element-class.html#values -lxml.html.HtmlMixin.resolve_base_href lxml.html.HtmlMixin-class.html#resolve_base_href -lxml.etree._Element.__len__ lxml.etree._Element-class.html#__len__ -lxml.html.HtmlMixin.rewrite_links lxml.html.HtmlMixin-class.html#rewrite_links -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.html.HtmlMixin.head lxml.html.HtmlMixin-class.html#head -lxml.etree._Element.__getitem__ lxml.etree._Element-class.html#__getitem__ -lxml.etree._Element.get lxml.etree._Element-class.html#get -lxml.etree._Element.keys lxml.etree._Element-class.html#keys -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.etree._Element.__iter__ lxml.etree._Element-class.html#__iter__ -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.html.HtmlMixin.find_class lxml.html.HtmlMixin-class.html#find_class -lxml.etree._Element.insert lxml.etree._Element-class.html#insert -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.etree._Element.__delitem__ lxml.etree._Element-class.html#__delitem__ -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.etree._Element.__nonzero__ lxml.etree._Element-class.html#__nonzero__ -lxml.html.InputMixin.name lxml.html.InputMixin-class.html#name -lxml.etree._Element.items lxml.etree._Element-class.html#items -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.etree._Element.__setitem__ lxml.etree._Element-class.html#__setitem__ -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.html.HtmlMixin.classes lxml.html.HtmlMixin-class.html#classes -lxml.html.HtmlElement.cssselect lxml.html.HtmlElement-class.html#cssselect -lxml.html.InputMixin.__repr__ lxml.html.InputMixin-class.html#__repr__ -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.html.HtmlMixin.find_rel_links lxml.html.HtmlMixin-class.html#find_rel_links -lxml.etree._Element.attrib lxml.etree._Element-class.html#attrib -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.html.XHTMLParser lxml.html.XHTMLParser-class.html -lxml.etree._FeedParser.feed lxml.etree._FeedParser-class.html#feed -lxml.etree._FeedParser.close lxml.etree._FeedParser-class.html#close -lxml.html.XHTMLParser.__init__ lxml.html.XHTMLParser-class.html#__init__ -lxml.etree.XMLParser.__new__ lxml.etree.XMLParser-class.html#__new__ -lxml.etree._FeedParser.feed_error_log lxml.etree._FeedParser-class.html#feed_error_log -lxml.html._MethodFunc lxml.html._MethodFunc-class.html -lxml.html._MethodFunc.__call__ lxml.html._MethodFunc-class.html#__call__ -lxml.html._MethodFunc.__init__ lxml.html._MethodFunc-class.html#__init__ -lxml.html.clean.Cleaner lxml.html.clean.Cleaner-class.html -lxml.html.clean.Cleaner.annoying_tags lxml.html.clean.Cleaner-class.html#annoying_tags -lxml.html.clean.Cleaner.links lxml.html.clean.Cleaner-class.html#links -lxml.html.clean.Cleaner.allow_embedded_url lxml.html.clean.Cleaner-class.html#allow_embedded_url -lxml.html.clean.Cleaner.remove_unknown_tags lxml.html.clean.Cleaner-class.html#remove_unknown_tags -lxml.html.clean.Cleaner.clean_html lxml.html.clean.Cleaner-class.html#clean_html -lxml.html.clean.Cleaner.kill_tags lxml.html.clean.Cleaner-class.html#kill_tags -lxml.html.clean.Cleaner.meta lxml.html.clean.Cleaner-class.html#meta -lxml.html.clean.Cleaner.page_structure lxml.html.clean.Cleaner-class.html#page_structure -lxml.html.clean.Cleaner.frames lxml.html.clean.Cleaner-class.html#frames -lxml.html.clean.Cleaner.allow_follow lxml.html.clean.Cleaner-class.html#allow_follow -lxml.html.clean.Cleaner.__init__ lxml.html.clean.Cleaner-class.html#__init__ -lxml.html.clean.Cleaner.style lxml.html.clean.Cleaner-class.html#style -lxml.html.clean.Cleaner.allow_tags lxml.html.clean.Cleaner-class.html#allow_tags -lxml.html.clean.Cleaner._remove_javascript_link lxml.html.clean.Cleaner-class.html#_remove_javascript_link -lxml.html.clean.Cleaner.comments lxml.html.clean.Cleaner-class.html#comments -lxml.html.clean.Cleaner.forms lxml.html.clean.Cleaner-class.html#forms -lxml.html.clean.Cleaner._substitute_comments lxml.html.clean.Cleaner-class.html#_substitute_comments -lxml.html.clean.Cleaner.kill_conditional_comments lxml.html.clean.Cleaner-class.html#kill_conditional_comments -lxml.html.clean.Cleaner.host_whitelist lxml.html.clean.Cleaner-class.html#host_whitelist -lxml.html.clean.Cleaner.whitelist_tags lxml.html.clean.Cleaner-class.html#whitelist_tags -lxml.html.clean.Cleaner.__call__ lxml.html.clean.Cleaner-class.html#__call__ -lxml.html.clean.Cleaner.remove_tags lxml.html.clean.Cleaner-class.html#remove_tags -lxml.html.clean.Cleaner._kill_elements lxml.html.clean.Cleaner-class.html#_kill_elements -lxml.html.clean.Cleaner.inline_style lxml.html.clean.Cleaner-class.html#inline_style -lxml.html.clean.Cleaner._has_sneaky_javascript lxml.html.clean.Cleaner-class.html#_has_sneaky_javascript -lxml.html.clean.Cleaner.processing_instructions lxml.html.clean.Cleaner-class.html#processing_instructions -lxml.html.clean.Cleaner.javascript lxml.html.clean.Cleaner-class.html#javascript -lxml.html.clean.Cleaner.safe_attrs lxml.html.clean.Cleaner-class.html#safe_attrs -lxml.html.clean.Cleaner.add_nofollow lxml.html.clean.Cleaner-class.html#add_nofollow -lxml.html.clean.Cleaner.allow_element lxml.html.clean.Cleaner-class.html#allow_element -lxml.html.clean.Cleaner.scripts lxml.html.clean.Cleaner-class.html#scripts -lxml.html.clean.Cleaner._tag_link_attrs lxml.html.clean.Cleaner-class.html#_tag_link_attrs -lxml.html.clean.Cleaner.safe_attrs_only lxml.html.clean.Cleaner-class.html#safe_attrs_only -lxml.html.clean.Cleaner.embedded lxml.html.clean.Cleaner-class.html#embedded -lxml.html.clean.Cleaner.__qualname__ lxml.html.clean.Cleaner-class.html#__qualname__ -lxml.html.diff.DEL_END lxml.html.diff.DEL_END-class.html -lxml.html.diff.DEL_END.__qualname__ lxml.html.diff.DEL_END-class.html#__qualname__ -lxml.html.diff.DEL_START lxml.html.diff.DEL_START-class.html -lxml.html.diff.DEL_START.__qualname__ lxml.html.diff.DEL_START-class.html#__qualname__ -lxml.html.diff.InsensitiveSequenceMatcher lxml.html.diff.InsensitiveSequenceMatcher-class.html -lxml.html.diff.InsensitiveSequenceMatcher.get_matching_blocks lxml.html.diff.InsensitiveSequenceMatcher-class.html#get_matching_blocks -lxml.html.diff.InsensitiveSequenceMatcher.__qualname__ lxml.html.diff.InsensitiveSequenceMatcher-class.html#__qualname__ -lxml.html.diff.InsensitiveSequenceMatcher.threshold lxml.html.diff.InsensitiveSequenceMatcher-class.html#threshold -lxml.html.diff.NoDeletes lxml.html.diff.NoDeletes-class.html -lxml.html.diff.NoDeletes.__qualname__ lxml.html.diff.NoDeletes-class.html#__qualname__ -lxml.html.diff.href_token lxml.html.diff.href_token-class.html -lxml.html.diff.href_token.hide_when_equal lxml.html.diff.href_token-class.html#hide_when_equal -lxml.html.diff.token.__new__ lxml.html.diff.token-class.html#__new__ -lxml.html.diff.href_token.html lxml.html.diff.href_token-class.html#html -lxml.html.diff.href_token.__qualname__ lxml.html.diff.href_token-class.html#__qualname__ -lxml.html.diff.token.__repr__ lxml.html.diff.token-class.html#__repr__ -lxml.html.diff.tag_token lxml.html.diff.tag_token-class.html -lxml.html.diff.token.hide_when_equal lxml.html.diff.token-class.html#hide_when_equal -lxml.html.diff.tag_token.__new__ lxml.html.diff.tag_token-class.html#__new__ -lxml.html.diff.tag_token.html lxml.html.diff.tag_token-class.html#html -lxml.html.diff.tag_token.__qualname__ lxml.html.diff.tag_token-class.html#__qualname__ -lxml.html.diff.tag_token.__repr__ lxml.html.diff.tag_token-class.html#__repr__ -lxml.html.diff.token lxml.html.diff.token-class.html -lxml.html.diff.token.hide_when_equal lxml.html.diff.token-class.html#hide_when_equal -lxml.html.diff.token.__new__ lxml.html.diff.token-class.html#__new__ -lxml.html.diff.token.html lxml.html.diff.token-class.html#html -lxml.html.diff.token.__qualname__ lxml.html.diff.token-class.html#__qualname__ -lxml.html.diff.token.__repr__ lxml.html.diff.token-class.html#__repr__ -lxml.html.formfill.DefaultErrorCreator lxml.html.formfill.DefaultErrorCreator-class.html -lxml.html.formfill.DefaultErrorCreator.error_container_tag lxml.html.formfill.DefaultErrorCreator-class.html#error_container_tag -lxml.html.formfill.DefaultErrorCreator.default_message lxml.html.formfill.DefaultErrorCreator-class.html#default_message -lxml.html.formfill.DefaultErrorCreator.insert_before lxml.html.formfill.DefaultErrorCreator-class.html#insert_before -lxml.html.formfill.DefaultErrorCreator.error_message_class lxml.html.formfill.DefaultErrorCreator-class.html#error_message_class -lxml.html.formfill.DefaultErrorCreator.__call__ lxml.html.formfill.DefaultErrorCreator-class.html#__call__ -lxml.html.formfill.DefaultErrorCreator.block_inside lxml.html.formfill.DefaultErrorCreator-class.html#block_inside -lxml.html.formfill.DefaultErrorCreator.error_block_class lxml.html.formfill.DefaultErrorCreator-class.html#error_block_class -lxml.html.formfill.DefaultErrorCreator.__init__ lxml.html.formfill.DefaultErrorCreator-class.html#__init__ -lxml.html.formfill.FormNotFound lxml.html.formfill.FormNotFound-class.html -lxml.html.html5parser.HTMLParser lxml.html.html5parser.HTMLParser-class.html -lxml.html.html5parser.HTMLParser.__init__ lxml.html.html5parser.HTMLParser-class.html#__init__ -lxml.html.html5parser.XHTMLParser lxml.html.html5parser.XHTMLParser-class.html -lxml.html.html5parser.XHTMLParser.__init__ lxml.html.html5parser.XHTMLParser-class.html#__init__ -lxml.html.soupparser._PseudoTag lxml.html.soupparser._PseudoTag-class.html -lxml.html.soupparser._PseudoTag.__iter__ lxml.html.soupparser._PseudoTag-class.html#__iter__ -lxml.html.soupparser._PseudoTag.__init__ lxml.html.soupparser._PseudoTag-class.html#__init__ -lxml.isoschematron.Schematron lxml.isoschematron.Schematron-class.html -lxml.isoschematron.Schematron._extract_rng lxml.isoschematron.Schematron-class.html#_extract_rng -lxml.etree._Validator._append_log_message lxml.etree._Validator-class.html#_append_log_message -lxml.isoschematron.Schematron.validation_report lxml.isoschematron.Schematron-class.html#validation_report -lxml.isoschematron.Schematron.validator_xslt lxml.isoschematron.Schematron-class.html#validator_xslt -lxml.isoschematron.Schematron._expand lxml.isoschematron.Schematron-class.html#_expand -lxml.etree._Validator.validate lxml.etree._Validator-class.html#validate -lxml.isoschematron.Schematron.__init__ lxml.isoschematron.Schematron-class.html#__init__ -lxml.etree._Validator.__new__ lxml.etree._Validator-class.html#__new__ -lxml.etree._Validator._clear_error_log lxml.etree._Validator-class.html#_clear_error_log -lxml.isoschematron.Schematron._extract lxml.isoschematron.Schematron-class.html#_extract -lxml.isoschematron.Schematron.__call__ lxml.isoschematron.Schematron-class.html#__call__ -lxml.isoschematron.Schematron._compile lxml.isoschematron.Schematron-class.html#_compile -lxml.isoschematron.Schematron.schematron lxml.isoschematron.Schematron-class.html#schematron -lxml.isoschematron.Schematron._validation_errors lxml.isoschematron.Schematron-class.html#_validation_errors -lxml.isoschematron.Schematron._include lxml.isoschematron.Schematron-class.html#_include -lxml.isoschematron.Schematron.ASSERTS_ONLY lxml.isoschematron.Schematron-class.html#ASSERTS_ONLY -lxml.etree._Validator.assert_ lxml.etree._Validator-class.html#assert_ -lxml.isoschematron.Schematron._level lxml.isoschematron.Schematron-class.html#_level -lxml.isoschematron.Schematron._domain lxml.isoschematron.Schematron-class.html#_domain -lxml.etree._Validator.assertValid lxml.etree._Validator-class.html#assertValid -lxml.isoschematron.Schematron.ASSERTS_AND_REPORTS lxml.isoschematron.Schematron-class.html#ASSERTS_AND_REPORTS -lxml.isoschematron.Schematron._error_type lxml.isoschematron.Schematron-class.html#_error_type -lxml.etree._Validator.error_log lxml.etree._Validator-class.html#error_log -lxml.isoschematron.Schematron._extract_xsd lxml.isoschematron.Schematron-class.html#_extract_xsd -lxml.objectify.BoolElement lxml.objectify.BoolElement-class.html -lxml.objectify.NumberElement.__int__ lxml.objectify.NumberElement-class.html#__int__ -lxml.objectify.NumberElement.__ror__ lxml.objectify.NumberElement-class.html#__ror__ -lxml.objectify.ObjectifiedElement.addattr lxml.objectify.ObjectifiedElement-class.html#addattr -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.objectify.ObjectifiedElement.text lxml.objectify.ObjectifiedElement-class.html#text -lxml.objectify.BoolElement.__str__ lxml.objectify.BoolElement-class.html#__str__ -lxml.objectify.BoolElement._init lxml.objectify.BoolElement-class.html#_init -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.objectify.NumberElement.__rdiv__ lxml.objectify.NumberElement-class.html#__rdiv__ -lxml.objectify.NumberElement.__rmul__ lxml.objectify.NumberElement-class.html#__rmul__ -lxml.objectify.BoolElement.__lt__ lxml.objectify.BoolElement-class.html#__lt__ -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.objectify.NumberElement.__rshift__ lxml.objectify.NumberElement-class.html#__rshift__ -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.objectify.ObjectifiedElement.__getitem__ lxml.objectify.ObjectifiedElement-class.html#__getitem__ -lxml.etree._Element.get lxml.etree._Element-class.html#get -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.objectify.NumberElement.__pow__ lxml.objectify.NumberElement-class.html#__pow__ -lxml.objectify.BoolElement.__gt__ lxml.objectify.BoolElement-class.html#__gt__ -lxml.objectify.NumberElement.__oct__ lxml.objectify.NumberElement-class.html#__oct__ -lxml.objectify.NumberElement.__rxor__ lxml.objectify.NumberElement-class.html#__rxor__ -lxml.objectify.ObjectifiedElement.__delitem__ lxml.objectify.ObjectifiedElement-class.html#__delitem__ -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.objectify.BoolElement.__nonzero__ lxml.objectify.BoolElement-class.html#__nonzero__ -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.objectify.ObjectifiedElement.descendantpaths lxml.objectify.ObjectifiedElement-class.html#descendantpaths -lxml.objectify.NumberElement.__long__ lxml.objectify.NumberElement-class.html#__long__ -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.etree._Element.set lxml.etree._Element-class.html#set -lxml.objectify.NumberElement.__truediv__ lxml.objectify.NumberElement-class.html#__truediv__ -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.objectify.NumberElement.__rmod__ lxml.objectify.NumberElement-class.html#__rmod__ -lxml.etree._Element.append lxml.etree._Element-class.html#append -lxml.objectify.NumberElement.__rand__ lxml.objectify.NumberElement-class.html#__rand__ -lxml.objectify.ObjectifiedElement.__setattr__ lxml.objectify.ObjectifiedElement-class.html#__setattr__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.objectify.ObjectifiedDataElement._setText lxml.objectify.ObjectifiedDataElement-class.html#_setText -lxml.objectify.ObjectifiedElement.__getattr__ lxml.objectify.ObjectifiedElement-class.html#__getattr__ -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.objectify.ObjectifiedElement.getchildren lxml.objectify.ObjectifiedElement-class.html#getchildren -lxml.objectify.BoolElement.__le__ lxml.objectify.BoolElement-class.html#__le__ -lxml.objectify.NumberElement.__float__ lxml.objectify.NumberElement-class.html#__float__ -lxml.objectify.BoolElement.__ne__ lxml.objectify.BoolElement-class.html#__ne__ -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.objectify.ObjectifiedElement.__setitem__ lxml.objectify.ObjectifiedElement-class.html#__setitem__ -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.objectify.NumberElement.__hex__ lxml.objectify.NumberElement-class.html#__hex__ -lxml.etree._Element.items lxml.etree._Element-class.html#items -lxml.etree._Element.insert lxml.etree._Element-class.html#insert -lxml.objectify.NumberElement.__xor__ lxml.objectify.NumberElement-class.html#__xor__ -lxml.objectify.ObjectifiedElement.__delattr__ lxml.objectify.ObjectifiedElement-class.html#__delattr__ -lxml.etree._Element.cssselect lxml.etree._Element-class.html#cssselect -lxml.objectify.NumberElement.__mul__ lxml.objectify.NumberElement-class.html#__mul__ -lxml.etree._Element.attrib lxml.etree._Element-class.html#attrib -lxml.objectify.NumberElement.__rlshift__ lxml.objectify.NumberElement-class.html#__rlshift__ -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.objectify.NumberElement.__rsub__ lxml.objectify.NumberElement-class.html#__rsub__ -lxml.objectify.NumberElement.__and__ lxml.objectify.NumberElement-class.html#__and__ -lxml.objectify.NumberElement.__complex__ lxml.objectify.NumberElement-class.html#__complex__ -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.objectify.NumberElement.__abs__ lxml.objectify.NumberElement-class.html#__abs__ -lxml.objectify.ObjectifiedElement.__len__ lxml.objectify.ObjectifiedElement-class.html#__len__ -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.objectify.NumberElement.__invert__ lxml.objectify.NumberElement-class.html#__invert__ -lxml.objectify.ObjectifiedElement.__reduce__ lxml.objectify.ObjectifiedElement-class.html#__reduce__ -lxml.objectify.ObjectifiedElement.__iter__ lxml.objectify.ObjectifiedElement-class.html#__iter__ -lxml.objectify.ObjectifiedElement.countchildren lxml.objectify.ObjectifiedElement-class.html#countchildren -lxml.objectify.NumberElement.__lshift__ lxml.objectify.NumberElement-class.html#__lshift__ -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.objectify.BoolElement.__eq__ lxml.objectify.BoolElement-class.html#__eq__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.objectify.NumberElement.__mod__ lxml.objectify.NumberElement-class.html#__mod__ -lxml.etree._Element.tag lxml.etree._Element-class.html#tag -lxml.etree._Element.values lxml.etree._Element-class.html#values -lxml.objectify.BoolElement.__hash__ lxml.objectify.BoolElement-class.html#__hash__ -lxml.objectify.NumberElement.__sub__ lxml.objectify.NumberElement-class.html#__sub__ -lxml.objectify.BoolElement.__ge__ lxml.objectify.BoolElement-class.html#__ge__ -lxml.objectify.NumberElement.__rtruediv__ lxml.objectify.NumberElement-class.html#__rtruediv__ -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.objectify.ObjectifiedElement.__getattribute__ lxml.objectify.ObjectifiedElement-class.html#__getattribute__ -lxml.objectify.NumberElement.__radd__ lxml.objectify.NumberElement-class.html#__radd__ -lxml.objectify.NumberElement.__rrshift__ lxml.objectify.NumberElement-class.html#__rrshift__ -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.etree.ElementBase.__init__ lxml.etree.ElementBase-class.html#__init__ -lxml.objectify.BoolElement.__new__ lxml.objectify.BoolElement-class.html#__new__ -lxml.objectify.NumberElement._setValueParser lxml.objectify.NumberElement-class.html#_setValueParser -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.objectify.NumberElement.__pos__ lxml.objectify.NumberElement-class.html#__pos__ -lxml.objectify.NumberElement.__rpow__ lxml.objectify.NumberElement-class.html#__rpow__ -lxml.objectify.BoolElement.pyval lxml.objectify.BoolElement-class.html#pyval -lxml.objectify.BoolElement.__repr__ lxml.objectify.BoolElement-class.html#__repr__ -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.etree._Element.keys lxml.etree._Element-class.html#keys -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.objectify.NumberElement.__or__ lxml.objectify.NumberElement-class.html#__or__ -lxml.objectify.NumberElement.__add__ lxml.objectify.NumberElement-class.html#__add__ -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.objectify.NumberElement.__div__ lxml.objectify.NumberElement-class.html#__div__ -lxml.objectify.NumberElement.__neg__ lxml.objectify.NumberElement-class.html#__neg__ -lxml.objectify.ElementMaker lxml.objectify.ElementMaker-class.html -lxml.objectify.ElementMaker.__new__ lxml.objectify.ElementMaker-class.html#__new__ -lxml.objectify.ElementMaker.__getattribute__ lxml.objectify.ElementMaker-class.html#__getattribute__ -lxml.objectify.ElementMaker.__getattr__ lxml.objectify.ElementMaker-class.html#__getattr__ -lxml.objectify.ElementMaker.__call__ lxml.objectify.ElementMaker-class.html#__call__ -lxml.objectify.ElementMaker.__init__ lxml.objectify.ElementMaker-class.html#__init__ -lxml.objectify.FloatElement lxml.objectify.FloatElement-class.html -lxml.objectify.NumberElement.__int__ lxml.objectify.NumberElement-class.html#__int__ -lxml.objectify.NumberElement.__ror__ lxml.objectify.NumberElement-class.html#__ror__ -lxml.objectify.ObjectifiedElement.addattr lxml.objectify.ObjectifiedElement-class.html#addattr -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.objectify.ObjectifiedElement.text lxml.objectify.ObjectifiedElement-class.html#text -lxml.objectify.NumberElement.__str__ lxml.objectify.NumberElement-class.html#__str__ -lxml.objectify.FloatElement._init lxml.objectify.FloatElement-class.html#_init -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.objectify.NumberElement.__rdiv__ lxml.objectify.NumberElement-class.html#__rdiv__ -lxml.objectify.NumberElement.__rmul__ lxml.objectify.NumberElement-class.html#__rmul__ -lxml.objectify.NumberElement.__lt__ lxml.objectify.NumberElement-class.html#__lt__ -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.objectify.NumberElement.__rshift__ lxml.objectify.NumberElement-class.html#__rshift__ -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.objectify.ObjectifiedElement.__getitem__ lxml.objectify.ObjectifiedElement-class.html#__getitem__ -lxml.etree._Element.get lxml.etree._Element-class.html#get -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.objectify.NumberElement.__pow__ lxml.objectify.NumberElement-class.html#__pow__ -lxml.objectify.NumberElement.__gt__ lxml.objectify.NumberElement-class.html#__gt__ -lxml.objectify.NumberElement.__oct__ lxml.objectify.NumberElement-class.html#__oct__ -lxml.objectify.NumberElement.__rxor__ lxml.objectify.NumberElement-class.html#__rxor__ -lxml.objectify.ObjectifiedElement.__delitem__ lxml.objectify.ObjectifiedElement-class.html#__delitem__ -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.objectify.NumberElement.__nonzero__ lxml.objectify.NumberElement-class.html#__nonzero__ -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.objectify.ObjectifiedElement.descendantpaths lxml.objectify.ObjectifiedElement-class.html#descendantpaths -lxml.objectify.NumberElement.__long__ lxml.objectify.NumberElement-class.html#__long__ -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.etree._Element.set lxml.etree._Element-class.html#set -lxml.objectify.NumberElement.__truediv__ lxml.objectify.NumberElement-class.html#__truediv__ -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.objectify.NumberElement.__rmod__ lxml.objectify.NumberElement-class.html#__rmod__ -lxml.etree._Element.append lxml.etree._Element-class.html#append -lxml.objectify.NumberElement.__rand__ lxml.objectify.NumberElement-class.html#__rand__ -lxml.objectify.ObjectifiedElement.__setattr__ lxml.objectify.ObjectifiedElement-class.html#__setattr__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.objectify.ObjectifiedDataElement._setText lxml.objectify.ObjectifiedDataElement-class.html#_setText -lxml.objectify.ObjectifiedElement.__getattr__ lxml.objectify.ObjectifiedElement-class.html#__getattr__ -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.objectify.ObjectifiedElement.getchildren lxml.objectify.ObjectifiedElement-class.html#getchildren -lxml.objectify.NumberElement.__le__ lxml.objectify.NumberElement-class.html#__le__ -lxml.objectify.NumberElement.__complex__ lxml.objectify.NumberElement-class.html#__complex__ -lxml.objectify.NumberElement.__ne__ lxml.objectify.NumberElement-class.html#__ne__ -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.objectify.ObjectifiedElement.__setitem__ lxml.objectify.ObjectifiedElement-class.html#__setitem__ -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.objectify.NumberElement.__hex__ lxml.objectify.NumberElement-class.html#__hex__ -lxml.etree._Element.items lxml.etree._Element-class.html#items -lxml.etree._Element.insert lxml.etree._Element-class.html#insert -lxml.objectify.NumberElement.__xor__ lxml.objectify.NumberElement-class.html#__xor__ -lxml.objectify.ObjectifiedElement.__delattr__ lxml.objectify.ObjectifiedElement-class.html#__delattr__ -lxml.etree._Element.cssselect lxml.etree._Element-class.html#cssselect -lxml.objectify.NumberElement.__mul__ lxml.objectify.NumberElement-class.html#__mul__ -lxml.etree._Element.attrib lxml.etree._Element-class.html#attrib -lxml.objectify.NumberElement.__rlshift__ lxml.objectify.NumberElement-class.html#__rlshift__ -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.objectify.NumberElement.__rsub__ lxml.objectify.NumberElement-class.html#__rsub__ -lxml.objectify.NumberElement.__and__ lxml.objectify.NumberElement-class.html#__and__ -lxml.objectify.NumberElement.__float__ lxml.objectify.NumberElement-class.html#__float__ -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.objectify.NumberElement.__abs__ lxml.objectify.NumberElement-class.html#__abs__ -lxml.objectify.ObjectifiedElement.__len__ lxml.objectify.ObjectifiedElement-class.html#__len__ -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.objectify.NumberElement.__invert__ lxml.objectify.NumberElement-class.html#__invert__ -lxml.objectify.ObjectifiedElement.__reduce__ lxml.objectify.ObjectifiedElement-class.html#__reduce__ -lxml.objectify.ObjectifiedElement.__iter__ lxml.objectify.ObjectifiedElement-class.html#__iter__ -lxml.objectify.ObjectifiedElement.countchildren lxml.objectify.ObjectifiedElement-class.html#countchildren -lxml.objectify.NumberElement.__lshift__ lxml.objectify.NumberElement-class.html#__lshift__ -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.objectify.NumberElement.__eq__ lxml.objectify.NumberElement-class.html#__eq__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.objectify.NumberElement.__mod__ lxml.objectify.NumberElement-class.html#__mod__ -lxml.etree._Element.tag lxml.etree._Element-class.html#tag -lxml.etree._Element.values lxml.etree._Element-class.html#values -lxml.objectify.NumberElement.__hash__ lxml.objectify.NumberElement-class.html#__hash__ -lxml.objectify.NumberElement.__sub__ lxml.objectify.NumberElement-class.html#__sub__ -lxml.objectify.NumberElement.__ge__ lxml.objectify.NumberElement-class.html#__ge__ -lxml.objectify.NumberElement.__rtruediv__ lxml.objectify.NumberElement-class.html#__rtruediv__ -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.objectify.ObjectifiedElement.__getattribute__ lxml.objectify.ObjectifiedElement-class.html#__getattribute__ -lxml.objectify.NumberElement.__radd__ lxml.objectify.NumberElement-class.html#__radd__ -lxml.objectify.NumberElement.__rrshift__ lxml.objectify.NumberElement-class.html#__rrshift__ -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.etree.ElementBase.__init__ lxml.etree.ElementBase-class.html#__init__ -lxml.objectify.FloatElement.__new__ lxml.objectify.FloatElement-class.html#__new__ -lxml.objectify.NumberElement._setValueParser lxml.objectify.NumberElement-class.html#_setValueParser -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.objectify.NumberElement.__pos__ lxml.objectify.NumberElement-class.html#__pos__ -lxml.objectify.NumberElement.__rpow__ lxml.objectify.NumberElement-class.html#__rpow__ -lxml.objectify.NumberElement.pyval lxml.objectify.NumberElement-class.html#pyval -lxml.objectify.NumberElement.__repr__ lxml.objectify.NumberElement-class.html#__repr__ -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.etree._Element.keys lxml.etree._Element-class.html#keys -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.objectify.NumberElement.__or__ lxml.objectify.NumberElement-class.html#__or__ -lxml.objectify.NumberElement.__add__ lxml.objectify.NumberElement-class.html#__add__ -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.objectify.NumberElement.__div__ lxml.objectify.NumberElement-class.html#__div__ -lxml.objectify.NumberElement.__neg__ lxml.objectify.NumberElement-class.html#__neg__ -lxml.objectify.IntElement lxml.objectify.IntElement-class.html -lxml.objectify.NumberElement.__int__ lxml.objectify.NumberElement-class.html#__int__ -lxml.objectify.NumberElement.__ror__ lxml.objectify.NumberElement-class.html#__ror__ -lxml.objectify.ObjectifiedElement.addattr lxml.objectify.ObjectifiedElement-class.html#addattr -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.objectify.ObjectifiedElement.text lxml.objectify.ObjectifiedElement-class.html#text -lxml.objectify.NumberElement.__str__ lxml.objectify.NumberElement-class.html#__str__ -lxml.objectify.IntElement._init lxml.objectify.IntElement-class.html#_init -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.objectify.NumberElement.__rdiv__ lxml.objectify.NumberElement-class.html#__rdiv__ -lxml.objectify.NumberElement.__rmul__ lxml.objectify.NumberElement-class.html#__rmul__ -lxml.objectify.NumberElement.__lt__ lxml.objectify.NumberElement-class.html#__lt__ -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.objectify.NumberElement.__rshift__ lxml.objectify.NumberElement-class.html#__rshift__ -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.objectify.ObjectifiedElement.__getitem__ lxml.objectify.ObjectifiedElement-class.html#__getitem__ -lxml.etree._Element.get lxml.etree._Element-class.html#get -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.objectify.NumberElement.__pow__ lxml.objectify.NumberElement-class.html#__pow__ -lxml.objectify.NumberElement.__gt__ lxml.objectify.NumberElement-class.html#__gt__ -lxml.objectify.NumberElement.__oct__ lxml.objectify.NumberElement-class.html#__oct__ -lxml.objectify.NumberElement.__rxor__ lxml.objectify.NumberElement-class.html#__rxor__ -lxml.objectify.ObjectifiedElement.__delitem__ lxml.objectify.ObjectifiedElement-class.html#__delitem__ -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.objectify.NumberElement.__nonzero__ lxml.objectify.NumberElement-class.html#__nonzero__ -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.objectify.ObjectifiedElement.descendantpaths lxml.objectify.ObjectifiedElement-class.html#descendantpaths -lxml.objectify.NumberElement.__long__ lxml.objectify.NumberElement-class.html#__long__ -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.etree._Element.set lxml.etree._Element-class.html#set -lxml.objectify.NumberElement.__truediv__ lxml.objectify.NumberElement-class.html#__truediv__ -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.objectify.NumberElement.__rmod__ lxml.objectify.NumberElement-class.html#__rmod__ -lxml.etree._Element.append lxml.etree._Element-class.html#append -lxml.objectify.NumberElement.__rand__ lxml.objectify.NumberElement-class.html#__rand__ -lxml.objectify.ObjectifiedElement.__setattr__ lxml.objectify.ObjectifiedElement-class.html#__setattr__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.objectify.ObjectifiedDataElement._setText lxml.objectify.ObjectifiedDataElement-class.html#_setText -lxml.objectify.ObjectifiedElement.__getattr__ lxml.objectify.ObjectifiedElement-class.html#__getattr__ -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.objectify.ObjectifiedElement.getchildren lxml.objectify.ObjectifiedElement-class.html#getchildren -lxml.objectify.NumberElement.__le__ lxml.objectify.NumberElement-class.html#__le__ -lxml.objectify.NumberElement.__complex__ lxml.objectify.NumberElement-class.html#__complex__ -lxml.objectify.NumberElement.__ne__ lxml.objectify.NumberElement-class.html#__ne__ -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.objectify.ObjectifiedElement.__setitem__ lxml.objectify.ObjectifiedElement-class.html#__setitem__ -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.objectify.NumberElement.__hex__ lxml.objectify.NumberElement-class.html#__hex__ -lxml.etree._Element.items lxml.etree._Element-class.html#items -lxml.etree._Element.insert lxml.etree._Element-class.html#insert -lxml.objectify.NumberElement.__xor__ lxml.objectify.NumberElement-class.html#__xor__ -lxml.objectify.ObjectifiedElement.__delattr__ lxml.objectify.ObjectifiedElement-class.html#__delattr__ -lxml.etree._Element.cssselect lxml.etree._Element-class.html#cssselect -lxml.objectify.NumberElement.__mul__ lxml.objectify.NumberElement-class.html#__mul__ -lxml.etree._Element.attrib lxml.etree._Element-class.html#attrib -lxml.objectify.NumberElement.__rlshift__ lxml.objectify.NumberElement-class.html#__rlshift__ -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.objectify.NumberElement.__rsub__ lxml.objectify.NumberElement-class.html#__rsub__ -lxml.objectify.NumberElement.__and__ lxml.objectify.NumberElement-class.html#__and__ -lxml.objectify.NumberElement.__float__ lxml.objectify.NumberElement-class.html#__float__ -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.objectify.NumberElement.__abs__ lxml.objectify.NumberElement-class.html#__abs__ -lxml.objectify.ObjectifiedElement.__len__ lxml.objectify.ObjectifiedElement-class.html#__len__ -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.objectify.NumberElement.__invert__ lxml.objectify.NumberElement-class.html#__invert__ -lxml.objectify.ObjectifiedElement.__reduce__ lxml.objectify.ObjectifiedElement-class.html#__reduce__ -lxml.objectify.ObjectifiedElement.__iter__ lxml.objectify.ObjectifiedElement-class.html#__iter__ -lxml.objectify.ObjectifiedElement.countchildren lxml.objectify.ObjectifiedElement-class.html#countchildren -lxml.objectify.NumberElement.__lshift__ lxml.objectify.NumberElement-class.html#__lshift__ -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.objectify.NumberElement.__eq__ lxml.objectify.NumberElement-class.html#__eq__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.objectify.NumberElement.__mod__ lxml.objectify.NumberElement-class.html#__mod__ -lxml.etree._Element.tag lxml.etree._Element-class.html#tag -lxml.etree._Element.values lxml.etree._Element-class.html#values -lxml.objectify.NumberElement.__hash__ lxml.objectify.NumberElement-class.html#__hash__ -lxml.objectify.NumberElement.__sub__ lxml.objectify.NumberElement-class.html#__sub__ -lxml.objectify.NumberElement.__ge__ lxml.objectify.NumberElement-class.html#__ge__ -lxml.objectify.NumberElement.__rtruediv__ lxml.objectify.NumberElement-class.html#__rtruediv__ -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.objectify.ObjectifiedElement.__getattribute__ lxml.objectify.ObjectifiedElement-class.html#__getattribute__ -lxml.objectify.NumberElement.__radd__ lxml.objectify.NumberElement-class.html#__radd__ -lxml.objectify.NumberElement.__rrshift__ lxml.objectify.NumberElement-class.html#__rrshift__ -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.etree.ElementBase.__init__ lxml.etree.ElementBase-class.html#__init__ -lxml.objectify.IntElement.__new__ lxml.objectify.IntElement-class.html#__new__ -lxml.objectify.NumberElement._setValueParser lxml.objectify.NumberElement-class.html#_setValueParser -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.objectify.NumberElement.__pos__ lxml.objectify.NumberElement-class.html#__pos__ -lxml.objectify.NumberElement.__rpow__ lxml.objectify.NumberElement-class.html#__rpow__ -lxml.objectify.NumberElement.pyval lxml.objectify.NumberElement-class.html#pyval -lxml.objectify.NumberElement.__repr__ lxml.objectify.NumberElement-class.html#__repr__ -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.etree._Element.keys lxml.etree._Element-class.html#keys -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.objectify.NumberElement.__or__ lxml.objectify.NumberElement-class.html#__or__ -lxml.objectify.NumberElement.__add__ lxml.objectify.NumberElement-class.html#__add__ -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.objectify.NumberElement.__div__ lxml.objectify.NumberElement-class.html#__div__ -lxml.objectify.NumberElement.__neg__ lxml.objectify.NumberElement-class.html#__neg__ -lxml.objectify.LongElement lxml.objectify.LongElement-class.html -lxml.objectify.NumberElement.__int__ lxml.objectify.NumberElement-class.html#__int__ -lxml.objectify.NumberElement.__ror__ lxml.objectify.NumberElement-class.html#__ror__ -lxml.objectify.ObjectifiedElement.addattr lxml.objectify.ObjectifiedElement-class.html#addattr -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.objectify.ObjectifiedElement.text lxml.objectify.ObjectifiedElement-class.html#text -lxml.objectify.NumberElement.__str__ lxml.objectify.NumberElement-class.html#__str__ -lxml.objectify.LongElement._init lxml.objectify.LongElement-class.html#_init -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.objectify.NumberElement.__rdiv__ lxml.objectify.NumberElement-class.html#__rdiv__ -lxml.objectify.NumberElement.__rmul__ lxml.objectify.NumberElement-class.html#__rmul__ -lxml.objectify.NumberElement.__lt__ lxml.objectify.NumberElement-class.html#__lt__ -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.objectify.NumberElement.__rshift__ lxml.objectify.NumberElement-class.html#__rshift__ -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.objectify.ObjectifiedElement.__getitem__ lxml.objectify.ObjectifiedElement-class.html#__getitem__ -lxml.etree._Element.get lxml.etree._Element-class.html#get -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.objectify.NumberElement.__pow__ lxml.objectify.NumberElement-class.html#__pow__ -lxml.objectify.NumberElement.__gt__ lxml.objectify.NumberElement-class.html#__gt__ -lxml.objectify.NumberElement.__oct__ lxml.objectify.NumberElement-class.html#__oct__ -lxml.objectify.NumberElement.__rxor__ lxml.objectify.NumberElement-class.html#__rxor__ -lxml.objectify.ObjectifiedElement.__delitem__ lxml.objectify.ObjectifiedElement-class.html#__delitem__ -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.objectify.NumberElement.__nonzero__ lxml.objectify.NumberElement-class.html#__nonzero__ -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.objectify.ObjectifiedElement.descendantpaths lxml.objectify.ObjectifiedElement-class.html#descendantpaths -lxml.objectify.NumberElement.__long__ lxml.objectify.NumberElement-class.html#__long__ -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.etree._Element.set lxml.etree._Element-class.html#set -lxml.objectify.NumberElement.__truediv__ lxml.objectify.NumberElement-class.html#__truediv__ -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.objectify.NumberElement.__rmod__ lxml.objectify.NumberElement-class.html#__rmod__ -lxml.etree._Element.append lxml.etree._Element-class.html#append -lxml.objectify.NumberElement.__rand__ lxml.objectify.NumberElement-class.html#__rand__ -lxml.objectify.ObjectifiedElement.__setattr__ lxml.objectify.ObjectifiedElement-class.html#__setattr__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.objectify.ObjectifiedDataElement._setText lxml.objectify.ObjectifiedDataElement-class.html#_setText -lxml.objectify.ObjectifiedElement.__getattr__ lxml.objectify.ObjectifiedElement-class.html#__getattr__ -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.objectify.ObjectifiedElement.getchildren lxml.objectify.ObjectifiedElement-class.html#getchildren -lxml.objectify.NumberElement.__le__ lxml.objectify.NumberElement-class.html#__le__ -lxml.objectify.NumberElement.__complex__ lxml.objectify.NumberElement-class.html#__complex__ -lxml.objectify.NumberElement.__ne__ lxml.objectify.NumberElement-class.html#__ne__ -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.objectify.ObjectifiedElement.__setitem__ lxml.objectify.ObjectifiedElement-class.html#__setitem__ -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.objectify.NumberElement.__hex__ lxml.objectify.NumberElement-class.html#__hex__ -lxml.etree._Element.items lxml.etree._Element-class.html#items -lxml.etree._Element.insert lxml.etree._Element-class.html#insert -lxml.objectify.NumberElement.__xor__ lxml.objectify.NumberElement-class.html#__xor__ -lxml.objectify.ObjectifiedElement.__delattr__ lxml.objectify.ObjectifiedElement-class.html#__delattr__ -lxml.etree._Element.cssselect lxml.etree._Element-class.html#cssselect -lxml.objectify.NumberElement.__mul__ lxml.objectify.NumberElement-class.html#__mul__ -lxml.etree._Element.attrib lxml.etree._Element-class.html#attrib -lxml.objectify.NumberElement.__rlshift__ lxml.objectify.NumberElement-class.html#__rlshift__ -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.objectify.NumberElement.__rsub__ lxml.objectify.NumberElement-class.html#__rsub__ -lxml.objectify.NumberElement.__and__ lxml.objectify.NumberElement-class.html#__and__ -lxml.objectify.NumberElement.__float__ lxml.objectify.NumberElement-class.html#__float__ -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.objectify.NumberElement.__abs__ lxml.objectify.NumberElement-class.html#__abs__ -lxml.objectify.ObjectifiedElement.__len__ lxml.objectify.ObjectifiedElement-class.html#__len__ -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.objectify.NumberElement.__invert__ lxml.objectify.NumberElement-class.html#__invert__ -lxml.objectify.ObjectifiedElement.__reduce__ lxml.objectify.ObjectifiedElement-class.html#__reduce__ -lxml.objectify.ObjectifiedElement.__iter__ lxml.objectify.ObjectifiedElement-class.html#__iter__ -lxml.objectify.ObjectifiedElement.countchildren lxml.objectify.ObjectifiedElement-class.html#countchildren -lxml.objectify.NumberElement.__lshift__ lxml.objectify.NumberElement-class.html#__lshift__ -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.objectify.NumberElement.__eq__ lxml.objectify.NumberElement-class.html#__eq__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.objectify.NumberElement.__mod__ lxml.objectify.NumberElement-class.html#__mod__ -lxml.etree._Element.tag lxml.etree._Element-class.html#tag -lxml.etree._Element.values lxml.etree._Element-class.html#values -lxml.objectify.NumberElement.__hash__ lxml.objectify.NumberElement-class.html#__hash__ -lxml.objectify.NumberElement.__sub__ lxml.objectify.NumberElement-class.html#__sub__ -lxml.objectify.NumberElement.__ge__ lxml.objectify.NumberElement-class.html#__ge__ -lxml.objectify.NumberElement.__rtruediv__ lxml.objectify.NumberElement-class.html#__rtruediv__ -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.objectify.ObjectifiedElement.__getattribute__ lxml.objectify.ObjectifiedElement-class.html#__getattribute__ -lxml.objectify.NumberElement.__radd__ lxml.objectify.NumberElement-class.html#__radd__ -lxml.objectify.NumberElement.__rrshift__ lxml.objectify.NumberElement-class.html#__rrshift__ -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.etree.ElementBase.__init__ lxml.etree.ElementBase-class.html#__init__ -lxml.objectify.LongElement.__new__ lxml.objectify.LongElement-class.html#__new__ -lxml.objectify.NumberElement._setValueParser lxml.objectify.NumberElement-class.html#_setValueParser -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.objectify.NumberElement.__pos__ lxml.objectify.NumberElement-class.html#__pos__ -lxml.objectify.NumberElement.__rpow__ lxml.objectify.NumberElement-class.html#__rpow__ -lxml.objectify.NumberElement.pyval lxml.objectify.NumberElement-class.html#pyval -lxml.objectify.NumberElement.__repr__ lxml.objectify.NumberElement-class.html#__repr__ -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.etree._Element.keys lxml.etree._Element-class.html#keys -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.objectify.NumberElement.__or__ lxml.objectify.NumberElement-class.html#__or__ -lxml.objectify.NumberElement.__add__ lxml.objectify.NumberElement-class.html#__add__ -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.objectify.NumberElement.__div__ lxml.objectify.NumberElement-class.html#__div__ -lxml.objectify.NumberElement.__neg__ lxml.objectify.NumberElement-class.html#__neg__ -lxml.objectify.NoneElement lxml.objectify.NoneElement-class.html -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.objectify.ObjectifiedElement.addattr lxml.objectify.ObjectifiedElement-class.html#addattr -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.objectify.ObjectifiedElement.text lxml.objectify.ObjectifiedElement-class.html#text -lxml.objectify.NoneElement.__str__ lxml.objectify.NoneElement-class.html#__str__ -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.objectify.ObjectifiedElement.__getattribute__ lxml.objectify.ObjectifiedElement-class.html#__getattribute__ -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.etree._Element.set lxml.etree._Element-class.html#set -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.objectify.NoneElement.__lt__ lxml.objectify.NoneElement-class.html#__lt__ -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.etree.ElementBase.__init__ lxml.etree.ElementBase-class.html#__init__ -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.objectify.ObjectifiedElement.__setattr__ lxml.objectify.ObjectifiedElement-class.html#__setattr__ -lxml.objectify.NoneElement.__new__ lxml.objectify.NoneElement-class.html#__new__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.etree._Element._init lxml.etree._Element-class.html#_init -lxml.objectify.ObjectifiedDataElement._setText lxml.objectify.ObjectifiedDataElement-class.html#_setText -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.objectify.ObjectifiedElement.__getattr__ lxml.objectify.ObjectifiedElement-class.html#__getattr__ -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.objectify.ObjectifiedElement.getchildren lxml.objectify.ObjectifiedElement-class.html#getchildren -lxml.etree._Element.append lxml.etree._Element-class.html#append -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.etree._Element.values lxml.etree._Element-class.html#values -lxml.objectify.NoneElement.pyval lxml.objectify.NoneElement-class.html#pyval -lxml.objectify.ObjectifiedElement.__len__ lxml.objectify.ObjectifiedElement-class.html#__len__ -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.objectify.NoneElement.__ne__ lxml.objectify.NoneElement-class.html#__ne__ -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.objectify.ObjectifiedElement.__getitem__ lxml.objectify.ObjectifiedElement-class.html#__getitem__ -lxml.etree._Element.get lxml.etree._Element-class.html#get -lxml.etree._Element.keys lxml.etree._Element-class.html#keys -lxml.objectify.ObjectifiedElement.__reduce__ lxml.objectify.ObjectifiedElement-class.html#__reduce__ -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.objectify.ObjectifiedElement.__iter__ lxml.objectify.ObjectifiedElement-class.html#__iter__ -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.objectify.ObjectifiedElement.countchildren lxml.objectify.ObjectifiedElement-class.html#countchildren -lxml.objectify.NoneElement.__gt__ lxml.objectify.NoneElement-class.html#__gt__ -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.objectify.NoneElement.__eq__ lxml.objectify.NoneElement-class.html#__eq__ -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.objectify.ObjectifiedElement.__delitem__ lxml.objectify.ObjectifiedElement-class.html#__delitem__ -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.objectify.NoneElement.__nonzero__ lxml.objectify.NoneElement-class.html#__nonzero__ -lxml.etree._Element.cssselect lxml.etree._Element-class.html#cssselect -lxml.etree._Element.items lxml.etree._Element-class.html#items -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.insert lxml.etree._Element-class.html#insert -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.objectify.ObjectifiedElement.__setitem__ lxml.objectify.ObjectifiedElement-class.html#__setitem__ -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.objectify.ObjectifiedElement.__delattr__ lxml.objectify.ObjectifiedElement-class.html#__delattr__ -lxml.objectify.NoneElement.__le__ lxml.objectify.NoneElement-class.html#__le__ -lxml.objectify.ObjectifiedElement.descendantpaths lxml.objectify.ObjectifiedElement-class.html#descendantpaths -lxml.objectify.NoneElement.__repr__ lxml.objectify.NoneElement-class.html#__repr__ -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.objectify.NoneElement.__hash__ lxml.objectify.NoneElement-class.html#__hash__ -lxml.etree._Element.tag lxml.etree._Element-class.html#tag -lxml.etree._Element.attrib lxml.etree._Element-class.html#attrib -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.objectify.NoneElement.__ge__ lxml.objectify.NoneElement-class.html#__ge__ -lxml.objectify.NumberElement lxml.objectify.NumberElement-class.html -lxml.objectify.NumberElement.__int__ lxml.objectify.NumberElement-class.html#__int__ -lxml.objectify.NumberElement.__ror__ lxml.objectify.NumberElement-class.html#__ror__ -lxml.objectify.ObjectifiedElement.addattr lxml.objectify.ObjectifiedElement-class.html#addattr -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.objectify.ObjectifiedElement.text lxml.objectify.ObjectifiedElement-class.html#text -lxml.objectify.NumberElement.__str__ lxml.objectify.NumberElement-class.html#__str__ -lxml.etree._Element._init lxml.etree._Element-class.html#_init -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.objectify.NumberElement.__rdiv__ lxml.objectify.NumberElement-class.html#__rdiv__ -lxml.objectify.NumberElement.__rmul__ lxml.objectify.NumberElement-class.html#__rmul__ -lxml.objectify.NumberElement.__lt__ lxml.objectify.NumberElement-class.html#__lt__ -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.objectify.NumberElement.__rshift__ lxml.objectify.NumberElement-class.html#__rshift__ -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.objectify.ObjectifiedElement.__getitem__ lxml.objectify.ObjectifiedElement-class.html#__getitem__ -lxml.etree._Element.get lxml.etree._Element-class.html#get -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.objectify.NumberElement.__pow__ lxml.objectify.NumberElement-class.html#__pow__ -lxml.objectify.NumberElement.__gt__ lxml.objectify.NumberElement-class.html#__gt__ -lxml.objectify.NumberElement.__oct__ lxml.objectify.NumberElement-class.html#__oct__ -lxml.objectify.NumberElement.__rxor__ lxml.objectify.NumberElement-class.html#__rxor__ -lxml.objectify.ObjectifiedElement.__delitem__ lxml.objectify.ObjectifiedElement-class.html#__delitem__ -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.objectify.NumberElement.__nonzero__ lxml.objectify.NumberElement-class.html#__nonzero__ -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.objectify.ObjectifiedElement.descendantpaths lxml.objectify.ObjectifiedElement-class.html#descendantpaths -lxml.objectify.NumberElement.__long__ lxml.objectify.NumberElement-class.html#__long__ -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.etree._Element.set lxml.etree._Element-class.html#set -lxml.objectify.NumberElement.__truediv__ lxml.objectify.NumberElement-class.html#__truediv__ -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.objectify.NumberElement.__rmod__ lxml.objectify.NumberElement-class.html#__rmod__ -lxml.etree._Element.append lxml.etree._Element-class.html#append -lxml.objectify.NumberElement.__rand__ lxml.objectify.NumberElement-class.html#__rand__ -lxml.objectify.ObjectifiedElement.__setattr__ lxml.objectify.ObjectifiedElement-class.html#__setattr__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.objectify.ObjectifiedDataElement._setText lxml.objectify.ObjectifiedDataElement-class.html#_setText -lxml.objectify.ObjectifiedElement.__getattr__ lxml.objectify.ObjectifiedElement-class.html#__getattr__ -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.objectify.ObjectifiedElement.getchildren lxml.objectify.ObjectifiedElement-class.html#getchildren -lxml.objectify.NumberElement.__le__ lxml.objectify.NumberElement-class.html#__le__ -lxml.objectify.NumberElement.__complex__ lxml.objectify.NumberElement-class.html#__complex__ -lxml.objectify.NumberElement.__ne__ lxml.objectify.NumberElement-class.html#__ne__ -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.objectify.ObjectifiedElement.__setitem__ lxml.objectify.ObjectifiedElement-class.html#__setitem__ -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.objectify.NumberElement.__hex__ lxml.objectify.NumberElement-class.html#__hex__ -lxml.etree._Element.items lxml.etree._Element-class.html#items -lxml.etree._Element.insert lxml.etree._Element-class.html#insert -lxml.objectify.NumberElement.__xor__ lxml.objectify.NumberElement-class.html#__xor__ -lxml.objectify.ObjectifiedElement.__delattr__ lxml.objectify.ObjectifiedElement-class.html#__delattr__ -lxml.etree._Element.cssselect lxml.etree._Element-class.html#cssselect -lxml.objectify.NumberElement.__repr__ lxml.objectify.NumberElement-class.html#__repr__ -lxml.etree._Element.attrib lxml.etree._Element-class.html#attrib -lxml.objectify.NumberElement.__rpow__ lxml.objectify.NumberElement-class.html#__rpow__ -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.objectify.NumberElement.__rsub__ lxml.objectify.NumberElement-class.html#__rsub__ -lxml.objectify.NumberElement.__and__ lxml.objectify.NumberElement-class.html#__and__ -lxml.objectify.NumberElement.__float__ lxml.objectify.NumberElement-class.html#__float__ -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.objectify.NumberElement.__abs__ lxml.objectify.NumberElement-class.html#__abs__ -lxml.objectify.ObjectifiedElement.__len__ lxml.objectify.ObjectifiedElement-class.html#__len__ -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.objectify.NumberElement.__invert__ lxml.objectify.NumberElement-class.html#__invert__ -lxml.objectify.ObjectifiedElement.__reduce__ lxml.objectify.ObjectifiedElement-class.html#__reduce__ -lxml.objectify.ObjectifiedElement.__iter__ lxml.objectify.ObjectifiedElement-class.html#__iter__ -lxml.objectify.ObjectifiedElement.countchildren lxml.objectify.ObjectifiedElement-class.html#countchildren -lxml.objectify.NumberElement.__lshift__ lxml.objectify.NumberElement-class.html#__lshift__ -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.objectify.NumberElement.__eq__ lxml.objectify.NumberElement-class.html#__eq__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.objectify.NumberElement.__mod__ lxml.objectify.NumberElement-class.html#__mod__ -lxml.etree._Element.tag lxml.etree._Element-class.html#tag -lxml.etree._Element.values lxml.etree._Element-class.html#values -lxml.objectify.NumberElement.__hash__ lxml.objectify.NumberElement-class.html#__hash__ -lxml.objectify.NumberElement.__sub__ lxml.objectify.NumberElement-class.html#__sub__ -lxml.objectify.NumberElement.__ge__ lxml.objectify.NumberElement-class.html#__ge__ -lxml.objectify.NumberElement.__rtruediv__ lxml.objectify.NumberElement-class.html#__rtruediv__ -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.objectify.ObjectifiedElement.__getattribute__ lxml.objectify.ObjectifiedElement-class.html#__getattribute__ -lxml.objectify.NumberElement.__radd__ lxml.objectify.NumberElement-class.html#__radd__ -lxml.objectify.NumberElement.__rrshift__ lxml.objectify.NumberElement-class.html#__rrshift__ -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.etree.ElementBase.__init__ lxml.etree.ElementBase-class.html#__init__ -lxml.objectify.NumberElement.__new__ lxml.objectify.NumberElement-class.html#__new__ -lxml.objectify.NumberElement._setValueParser lxml.objectify.NumberElement-class.html#_setValueParser -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.objectify.NumberElement.__pos__ lxml.objectify.NumberElement-class.html#__pos__ -lxml.objectify.NumberElement.__or__ lxml.objectify.NumberElement-class.html#__or__ -lxml.objectify.NumberElement.pyval lxml.objectify.NumberElement-class.html#pyval -lxml.objectify.NumberElement.__mul__ lxml.objectify.NumberElement-class.html#__mul__ -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.etree._Element.keys lxml.etree._Element-class.html#keys -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.objectify.NumberElement.__rlshift__ lxml.objectify.NumberElement-class.html#__rlshift__ -lxml.objectify.NumberElement.__add__ lxml.objectify.NumberElement-class.html#__add__ -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.objectify.NumberElement.__div__ lxml.objectify.NumberElement-class.html#__div__ -lxml.objectify.NumberElement.__neg__ lxml.objectify.NumberElement-class.html#__neg__ -lxml.objectify.ObjectPath lxml.objectify.ObjectPath-class.html -lxml.objectify.ObjectPath.addattr lxml.objectify.ObjectPath-class.html#addattr -lxml.objectify.ObjectPath.__new__ lxml.objectify.ObjectPath-class.html#__new__ -lxml.objectify.ObjectPath.setattr lxml.objectify.ObjectPath-class.html#setattr -lxml.objectify.ObjectPath.__str__ lxml.objectify.ObjectPath-class.html#__str__ -lxml.objectify.ObjectPath.hasattr lxml.objectify.ObjectPath-class.html#hasattr -lxml.objectify.ObjectPath.__call__ lxml.objectify.ObjectPath-class.html#__call__ -lxml.objectify.ObjectPath.find lxml.objectify.ObjectPath-class.html#find -lxml.objectify.ObjectPath.__init__ lxml.objectify.ObjectPath-class.html#__init__ -lxml.objectify.ObjectifiedDataElement lxml.objectify.ObjectifiedDataElement-class.html -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.objectify.ObjectifiedElement.addattr lxml.objectify.ObjectifiedElement-class.html#addattr -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.objectify.ObjectifiedElement.text lxml.objectify.ObjectifiedElement-class.html#text -lxml.objectify.ObjectifiedDataElement.__str__ lxml.objectify.ObjectifiedDataElement-class.html#__str__ -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.objectify.ObjectifiedElement.__getattribute__ lxml.objectify.ObjectifiedElement-class.html#__getattribute__ -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.etree._Element.set lxml.etree._Element-class.html#set -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.etree.ElementBase.__init__ lxml.etree.ElementBase-class.html#__init__ -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.objectify.ObjectifiedElement.__setattr__ lxml.objectify.ObjectifiedElement-class.html#__setattr__ -lxml.objectify.ObjectifiedDataElement.__new__ lxml.objectify.ObjectifiedDataElement-class.html#__new__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.etree._Element._init lxml.etree._Element-class.html#_init -lxml.objectify.ObjectifiedDataElement._setText lxml.objectify.ObjectifiedDataElement-class.html#_setText -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.objectify.ObjectifiedElement.__getattr__ lxml.objectify.ObjectifiedElement-class.html#__getattr__ -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.objectify.ObjectifiedElement.getchildren lxml.objectify.ObjectifiedElement-class.html#getchildren -lxml.etree._Element.append lxml.etree._Element-class.html#append -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.etree._Element.values lxml.etree._Element-class.html#values -lxml.objectify.ObjectifiedDataElement.pyval lxml.objectify.ObjectifiedDataElement-class.html#pyval -lxml.objectify.ObjectifiedElement.__len__ lxml.objectify.ObjectifiedElement-class.html#__len__ -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.objectify.ObjectifiedElement.__getitem__ lxml.objectify.ObjectifiedElement-class.html#__getitem__ -lxml.etree._Element.get lxml.etree._Element-class.html#get -lxml.etree._Element.keys lxml.etree._Element-class.html#keys -lxml.objectify.ObjectifiedElement.__reduce__ lxml.objectify.ObjectifiedElement-class.html#__reduce__ -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.objectify.ObjectifiedElement.__setitem__ lxml.objectify.ObjectifiedElement-class.html#__setitem__ -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.objectify.ObjectifiedElement.countchildren lxml.objectify.ObjectifiedElement-class.html#countchildren -lxml.etree._Element.insert lxml.etree._Element-class.html#insert -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.objectify.ObjectifiedElement.__delitem__ lxml.objectify.ObjectifiedElement-class.html#__delitem__ -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.etree._Element.__nonzero__ lxml.etree._Element-class.html#__nonzero__ -lxml.etree._Element.cssselect lxml.etree._Element-class.html#cssselect -lxml.etree._Element.items lxml.etree._Element-class.html#items -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.objectify.ObjectifiedElement.__iter__ lxml.objectify.ObjectifiedElement-class.html#__iter__ -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.objectify.ObjectifiedElement.__delattr__ lxml.objectify.ObjectifiedElement-class.html#__delattr__ -lxml.etree._Element.tag lxml.etree._Element-class.html#tag -lxml.objectify.ObjectifiedElement.descendantpaths lxml.objectify.ObjectifiedElement-class.html#descendantpaths -lxml.objectify.ObjectifiedDataElement.__repr__ lxml.objectify.ObjectifiedDataElement-class.html#__repr__ -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.etree._Element.attrib lxml.etree._Element-class.html#attrib -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.objectify.ObjectifiedElement lxml.objectify.ObjectifiedElement-class.html -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.objectify.ObjectifiedElement.addattr lxml.objectify.ObjectifiedElement-class.html#addattr -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.objectify.ObjectifiedElement.text lxml.objectify.ObjectifiedElement-class.html#text -lxml.objectify.ObjectifiedElement.__str__ lxml.objectify.ObjectifiedElement-class.html#__str__ -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.objectify.ObjectifiedElement.__getattribute__ lxml.objectify.ObjectifiedElement-class.html#__getattribute__ -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.etree._Element.set lxml.etree._Element-class.html#set -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.etree.ElementBase.__init__ lxml.etree.ElementBase-class.html#__init__ -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.objectify.ObjectifiedElement.__setattr__ lxml.objectify.ObjectifiedElement-class.html#__setattr__ -lxml.objectify.ObjectifiedElement.__new__ lxml.objectify.ObjectifiedElement-class.html#__new__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.etree._Element._init lxml.etree._Element-class.html#_init -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.objectify.ObjectifiedElement.__getattr__ lxml.objectify.ObjectifiedElement-class.html#__getattr__ -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.objectify.ObjectifiedElement.getchildren lxml.objectify.ObjectifiedElement-class.html#getchildren -lxml.etree._Element.append lxml.etree._Element-class.html#append -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.etree._Element.values lxml.etree._Element-class.html#values -lxml.objectify.ObjectifiedElement.__len__ lxml.objectify.ObjectifiedElement-class.html#__len__ -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.objectify.ObjectifiedElement.__getitem__ lxml.objectify.ObjectifiedElement-class.html#__getitem__ -lxml.etree._Element.get lxml.etree._Element-class.html#get -lxml.etree._Element.keys lxml.etree._Element-class.html#keys -lxml.objectify.ObjectifiedElement.__reduce__ lxml.objectify.ObjectifiedElement-class.html#__reduce__ -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.objectify.ObjectifiedElement.__iter__ lxml.objectify.ObjectifiedElement-class.html#__iter__ -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.objectify.ObjectifiedElement.countchildren lxml.objectify.ObjectifiedElement-class.html#countchildren -lxml.etree._Element.insert lxml.etree._Element-class.html#insert -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.objectify.ObjectifiedElement.__delitem__ lxml.objectify.ObjectifiedElement-class.html#__delitem__ -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.etree._Element.__nonzero__ lxml.etree._Element-class.html#__nonzero__ -lxml.etree._Element.cssselect lxml.etree._Element-class.html#cssselect -lxml.etree._Element.items lxml.etree._Element-class.html#items -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.objectify.ObjectifiedElement.__setitem__ lxml.objectify.ObjectifiedElement-class.html#__setitem__ -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.objectify.ObjectifiedElement.__delattr__ lxml.objectify.ObjectifiedElement-class.html#__delattr__ -lxml.etree._Element.tag lxml.etree._Element-class.html#tag -lxml.objectify.ObjectifiedElement.descendantpaths lxml.objectify.ObjectifiedElement-class.html#descendantpaths -lxml.etree._Element.__repr__ lxml.etree._Element-class.html#__repr__ -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.etree._Element.attrib lxml.etree._Element-class.html#attrib -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.objectify.ObjectifyElementClassLookup lxml.objectify.ObjectifyElementClassLookup-class.html -lxml.objectify.ObjectifyElementClassLookup.__new__ lxml.objectify.ObjectifyElementClassLookup-class.html#__new__ -lxml.objectify.ObjectifyElementClassLookup.__init__ lxml.objectify.ObjectifyElementClassLookup-class.html#__init__ -lxml.objectify.PyType lxml.objectify.PyType-class.html -lxml.objectify.PyType.stringify lxml.objectify.PyType-class.html#stringify -lxml.objectify.PyType.__new__ lxml.objectify.PyType-class.html#__new__ -lxml.objectify.PyType.xmlSchemaTypes lxml.objectify.PyType-class.html#xmlSchemaTypes -lxml.objectify.PyType.unregister lxml.objectify.PyType-class.html#unregister -lxml.objectify.PyType.register lxml.objectify.PyType-class.html#register -lxml.objectify.PyType.__repr__ lxml.objectify.PyType-class.html#__repr__ -lxml.objectify.PyType.type_check lxml.objectify.PyType-class.html#type_check -lxml.objectify.PyType.__init__ lxml.objectify.PyType-class.html#__init__ -lxml.objectify.PyType.name lxml.objectify.PyType-class.html#name -lxml.objectify.StringElement lxml.objectify.StringElement-class.html -lxml.objectify.StringElement.__int__ lxml.objectify.StringElement-class.html#__int__ -lxml.objectify.ObjectifiedElement.addattr lxml.objectify.ObjectifiedElement-class.html#addattr -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.objectify.ObjectifiedElement.text lxml.objectify.ObjectifiedElement-class.html#text -lxml.objectify.ObjectifiedDataElement.__str__ lxml.objectify.ObjectifiedDataElement-class.html#__str__ -lxml.etree._Element._init lxml.etree._Element-class.html#_init -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.objectify.StringElement.__rmul__ lxml.objectify.StringElement-class.html#__rmul__ -lxml.objectify.StringElement.__lt__ lxml.objectify.StringElement-class.html#__lt__ -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.objectify.ObjectifiedElement.__getitem__ lxml.objectify.ObjectifiedElement-class.html#__getitem__ -lxml.etree._Element.get lxml.etree._Element-class.html#get -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.objectify.StringElement.__gt__ lxml.objectify.StringElement-class.html#__gt__ -lxml.objectify.ObjectifiedElement.__delitem__ lxml.objectify.ObjectifiedElement-class.html#__delitem__ -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.objectify.StringElement.__nonzero__ lxml.objectify.StringElement-class.html#__nonzero__ -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.objectify.ObjectifiedElement.descendantpaths lxml.objectify.ObjectifiedElement-class.html#descendantpaths -lxml.objectify.StringElement.__long__ lxml.objectify.StringElement-class.html#__long__ -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.etree._Element.set lxml.etree._Element-class.html#set -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.objectify.StringElement.__rmod__ lxml.objectify.StringElement-class.html#__rmod__ -lxml.etree._Element.append lxml.etree._Element-class.html#append -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.objectify.ObjectifiedElement.__setattr__ lxml.objectify.ObjectifiedElement-class.html#__setattr__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.objectify.ObjectifiedDataElement._setText lxml.objectify.ObjectifiedDataElement-class.html#_setText -lxml.objectify.ObjectifiedElement.__getattr__ lxml.objectify.ObjectifiedElement-class.html#__getattr__ -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.objectify.ObjectifiedElement.getchildren lxml.objectify.ObjectifiedElement-class.html#getchildren -lxml.objectify.StringElement.__float__ lxml.objectify.StringElement-class.html#__float__ -lxml.objectify.StringElement.__ne__ lxml.objectify.StringElement-class.html#__ne__ -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.objectify.ObjectifiedElement.__setitem__ lxml.objectify.ObjectifiedElement-class.html#__setitem__ -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.etree._Element.items lxml.etree._Element-class.html#items -lxml.etree._Element.insert lxml.etree._Element-class.html#insert -lxml.objectify.ObjectifiedElement.__delattr__ lxml.objectify.ObjectifiedElement-class.html#__delattr__ -lxml.etree._Element.cssselect lxml.etree._Element-class.html#cssselect -lxml.objectify.StringElement.__mul__ lxml.objectify.StringElement-class.html#__mul__ -lxml.etree._Element.attrib lxml.etree._Element-class.html#attrib -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.objectify.StringElement.__complex__ lxml.objectify.StringElement-class.html#__complex__ -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.objectify.ObjectifiedElement.__len__ lxml.objectify.ObjectifiedElement-class.html#__len__ -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.objectify.ObjectifiedElement.__reduce__ lxml.objectify.ObjectifiedElement-class.html#__reduce__ -lxml.objectify.ObjectifiedElement.__iter__ lxml.objectify.ObjectifiedElement-class.html#__iter__ -lxml.objectify.ObjectifiedElement.countchildren lxml.objectify.ObjectifiedElement-class.html#countchildren -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.objectify.StringElement.__eq__ lxml.objectify.StringElement-class.html#__eq__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.objectify.StringElement.__mod__ lxml.objectify.StringElement-class.html#__mod__ -lxml.objectify.StringElement.__le__ lxml.objectify.StringElement-class.html#__le__ -lxml.etree._Element.values lxml.etree._Element-class.html#values -lxml.objectify.StringElement.__hash__ lxml.objectify.StringElement-class.html#__hash__ -lxml.objectify.StringElement.__ge__ lxml.objectify.StringElement-class.html#__ge__ -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.objectify.ObjectifiedElement.__getattribute__ lxml.objectify.ObjectifiedElement-class.html#__getattribute__ -lxml.objectify.StringElement.__radd__ lxml.objectify.StringElement-class.html#__radd__ -lxml.etree._Element.tag lxml.etree._Element-class.html#tag -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.objectify.StringElement.strlen lxml.objectify.StringElement-class.html#strlen -lxml.etree.ElementBase.__init__ lxml.etree.ElementBase-class.html#__init__ -lxml.objectify.StringElement.__new__ lxml.objectify.StringElement-class.html#__new__ -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.objectify.StringElement.pyval lxml.objectify.StringElement-class.html#pyval -lxml.objectify.StringElement.__repr__ lxml.objectify.StringElement-class.html#__repr__ -lxml.etree._Element.keys lxml.etree._Element-class.html#keys -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.objectify.StringElement.__add__ lxml.objectify.StringElement-class.html#__add__ -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.sax.ElementTreeContentHandler lxml.sax.ElementTreeContentHandler-class.html -lxml.sax.ElementTreeContentHandler.startPrefixMapping lxml.sax.ElementTreeContentHandler-class.html#startPrefixMapping -lxml.sax.ElementTreeContentHandler.endPrefixMapping lxml.sax.ElementTreeContentHandler-class.html#endPrefixMapping -lxml.sax.ElementTreeContentHandler.etree lxml.sax.ElementTreeContentHandler-class.html#etree -lxml.sax.ElementTreeContentHandler.processingInstruction lxml.sax.ElementTreeContentHandler-class.html#processingInstruction -lxml.sax.ElementTreeContentHandler.endElement lxml.sax.ElementTreeContentHandler-class.html#endElement -lxml.sax.ElementTreeContentHandler._get_etree lxml.sax.ElementTreeContentHandler-class.html#_get_etree -lxml.sax.ElementTreeContentHandler.startElement lxml.sax.ElementTreeContentHandler-class.html#startElement -lxml.sax.ElementTreeContentHandler.setDocumentLocator lxml.sax.ElementTreeContentHandler-class.html#setDocumentLocator -lxml.sax.ElementTreeContentHandler.startDocument lxml.sax.ElementTreeContentHandler-class.html#startDocument -lxml.sax.ElementTreeContentHandler.startElementNS lxml.sax.ElementTreeContentHandler-class.html#startElementNS -lxml.sax.ElementTreeContentHandler.characters lxml.sax.ElementTreeContentHandler-class.html#characters -lxml.sax.ElementTreeContentHandler.endDocument lxml.sax.ElementTreeContentHandler-class.html#endDocument -lxml.sax.ElementTreeContentHandler.ignorableWhitespace lxml.sax.ElementTreeContentHandler-class.html#ignorableWhitespace -lxml.sax.ElementTreeContentHandler._buildTag lxml.sax.ElementTreeContentHandler-class.html#_buildTag -lxml.sax.ElementTreeContentHandler.__init__ lxml.sax.ElementTreeContentHandler-class.html#__init__ -lxml.sax.ElementTreeContentHandler.endElementNS lxml.sax.ElementTreeContentHandler-class.html#endElementNS -lxml.sax.ElementTreeProducer lxml.sax.ElementTreeProducer-class.html -lxml.sax.ElementTreeProducer._build_qname lxml.sax.ElementTreeProducer-class.html#_build_qname -lxml.sax.ElementTreeProducer.saxify lxml.sax.ElementTreeProducer-class.html#saxify -lxml.sax.ElementTreeProducer.__init__ lxml.sax.ElementTreeProducer-class.html#__init__ -lxml.sax.ElementTreeProducer._recursive_saxify lxml.sax.ElementTreeProducer-class.html#_recursive_saxify -lxml.sax.SaxError lxml.sax.SaxError-class.html -lxml.etree.LxmlError.__init__ lxml.etree.LxmlError-class.html#__init__ -lxml.etree.LxmlError.__new__ lxml.etree.LxmlError-class.html#__new__ -lxml.tests.common_imports.HelperTestCase lxml.tests.common_imports.HelperTestCase-class.html -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.common_imports.LargeFileLike lxml.tests.common_imports.LargeFileLike-class.html -lxml.tests.common_imports.LargeFileLike.read lxml.tests.common_imports.LargeFileLike-class.html#read -lxml.tests.common_imports.LargeFileLike.iterelements lxml.tests.common_imports.LargeFileLike-class.html#iterelements -lxml.tests.common_imports.LargeFileLike.__init__ lxml.tests.common_imports.LargeFileLike-class.html#__init__ -lxml.tests.common_imports.LargeFileLikeUnicode lxml.tests.common_imports.LargeFileLikeUnicode-class.html -lxml.tests.common_imports.LargeFileLike.read lxml.tests.common_imports.LargeFileLike-class.html#read -lxml.tests.common_imports.LargeFileLikeUnicode.iterelements lxml.tests.common_imports.LargeFileLikeUnicode-class.html#iterelements -lxml.tests.common_imports.LargeFileLikeUnicode.__init__ lxml.tests.common_imports.LargeFileLikeUnicode-class.html#__init__ -lxml.tests.common_imports.SillyFileLike lxml.tests.common_imports.SillyFileLike-class.html -lxml.tests.common_imports.SillyFileLike.read lxml.tests.common_imports.SillyFileLike-class.html#read -lxml.tests.common_imports.SillyFileLike.__init__ lxml.tests.common_imports.SillyFileLike-class.html#__init__ -lxml.tests.common_imports.skipif lxml.tests.common_imports.skipif-class.html -lxml.tests.common_imports.skipif.__call__ lxml.tests.common_imports.skipif-class.html#__call__ -lxml.tests.common_imports.skipif.__init__ lxml.tests.common_imports.skipif-class.html#__init__ -lxml.tests.dummy_http_server.HTTPRequestCollector lxml.tests.dummy_http_server.HTTPRequestCollector-class.html -lxml.tests.dummy_http_server.HTTPRequestCollector.__call__ lxml.tests.dummy_http_server.HTTPRequestCollector-class.html#__call__ -lxml.tests.dummy_http_server.HTTPRequestCollector.__init__ lxml.tests.dummy_http_server.HTTPRequestCollector-class.html#__init__ -lxml.tests.dummy_http_server.WebServer lxml.tests.dummy_http_server.WebServer-class.html -lxml.tests.dummy_http_server._RequestHandler lxml.tests.dummy_http_server._RequestHandler-class.html -lxml.tests.dummy_http_server._RequestHandler.log_message lxml.tests.dummy_http_server._RequestHandler-class.html#log_message -BaseHTTPServer.BaseHTTPRequestHandler.MessageClass mimetools.Message-class.html -lxml.tests.dummy_http_server._RequestHandler.get_stderr lxml.tests.dummy_http_server._RequestHandler-class.html#get_stderr -lxml.tests.test_builder.BuilderTestCase lxml.tests.test_builder.BuilderTestCase-class.html -lxml.tests.test_builder.BuilderTestCase.etree lxml.etree-module.html -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_builder.BuilderTestCase.test_cdata lxml.tests.test_builder.BuilderTestCase-class.html#test_cdata -lxml.tests.test_builder.BuilderTestCase.test_cdata_solo lxml.tests.test_builder.BuilderTestCase-class.html#test_cdata_solo -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_builder.BuilderTestCase.test_build_from_xpath_result lxml.tests.test_builder.BuilderTestCase-class.html#test_build_from_xpath_result -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_builder.BuilderTestCase.test_unknown_type_raises lxml.tests.test_builder.BuilderTestCase-class.html#test_unknown_type_raises -lxml.tests.test_classlookup.ClassLookupTestCase lxml.tests.test_classlookup.ClassLookupTestCase-class.html -lxml.tests.test_classlookup.ClassLookupTestCase.test_namespace_lookup lxml.tests.test_classlookup.ClassLookupTestCase-class.html#test_namespace_lookup -lxml.tests.test_classlookup.ClassLookupTestCase.test_default_class_lookup lxml.tests.test_classlookup.ClassLookupTestCase-class.html#test_default_class_lookup -lxml.tests.test_classlookup.ClassLookupTestCase.test_custom_lookup lxml.tests.test_classlookup.ClassLookupTestCase-class.html#test_custom_lookup -lxml.tests.test_classlookup.ClassLookupTestCase.etree lxml.etree-module.html -lxml.tests.test_classlookup.ClassLookupTestCase.tearDown lxml.tests.test_classlookup.ClassLookupTestCase-class.html#tearDown -lxml.tests.test_classlookup.ClassLookupTestCase.test_class_lookup_reentry lxml.tests.test_classlookup.ClassLookupTestCase-class.html#test_class_lookup_reentry -lxml.tests.test_classlookup.ClassLookupTestCase.test_lookup_without_fallback lxml.tests.test_classlookup.ClassLookupTestCase-class.html#test_lookup_without_fallback -lxml.tests.test_classlookup.ClassLookupTestCase.test_custom_lookup_ns_fallback lxml.tests.test_classlookup.ClassLookupTestCase-class.html#test_custom_lookup_ns_fallback -lxml.tests.test_classlookup.ClassLookupTestCase.test_class_lookup_type_mismatch lxml.tests.test_classlookup.ClassLookupTestCase-class.html#test_class_lookup_type_mismatch -lxml.tests.test_classlookup.ClassLookupTestCase.test_default_class_lookup_pull_parser lxml.tests.test_classlookup.ClassLookupTestCase-class.html#test_default_class_lookup_pull_parser -lxml.tests.test_classlookup.ClassLookupTestCase.test_attribute_based_lookup lxml.tests.test_classlookup.ClassLookupTestCase-class.html#test_attribute_based_lookup -lxml.tests.test_classlookup.ClassLookupTestCase.test_parser_based_lookup lxml.tests.test_classlookup.ClassLookupTestCase-class.html#test_parser_based_lookup -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_classlookup.ClassLookupTestCase.test_evil_class_lookup lxml.tests.test_classlookup.ClassLookupTestCase-class.html#test_evil_class_lookup -lxml.tests.test_classlookup.ProxyTestCase lxml.tests.test_classlookup.ProxyTestCase-class.html -lxml.tests.test_classlookup.ProxyTestCase.test_proxy_reuse_after_del_root lxml.tests.test_classlookup.ProxyTestCase-class.html#test_proxy_reuse_after_del_root -lxml.tests.test_classlookup.ProxyTestCase.etree lxml.etree-module.html -lxml.tests.test_classlookup.ProxyTestCase.test_proxy_hashing lxml.tests.test_classlookup.ProxyTestCase-class.html#test_proxy_hashing -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_classlookup.ProxyTestCase.test_element_base_children lxml.tests.test_classlookup.ProxyTestCase-class.html#test_element_base_children -lxml.tests.test_classlookup.ProxyTestCase.test_pi_base lxml.tests.test_classlookup.ProxyTestCase-class.html#test_pi_base -lxml.tests.test_classlookup.ProxyTestCase.test_comment_base lxml.tests.test_classlookup.ProxyTestCase-class.html#test_comment_base -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_classlookup.ProxyTestCase.test_proxy_reuse_after_gc lxml.tests.test_classlookup.ProxyTestCase-class.html#test_proxy_reuse_after_gc -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_classlookup.ProxyTestCase.test_element_base lxml.tests.test_classlookup.ProxyTestCase-class.html#test_element_base -lxml.tests.test_classlookup.ProxyTestCase.test_proxy_reuse lxml.tests.test_classlookup.ProxyTestCase-class.html#test_proxy_reuse -lxml.tests.test_css.CSSTestCase lxml.tests.test_css.CSSTestCase-class.html -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_css.CSSTestCase.pytestmark lxml.tests.test_css.CSSTestCase-class.html#pytestmark -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_css.CSSTestCase.test_cssselect lxml.tests.test_css.CSSTestCase-class.html#test_cssselect -lxml.tests.test_doctestcompare.DoctestCompareTest lxml.tests.test_doctestcompare.DoctestCompareTest-class.html -lxml.tests.test_doctestcompare.DoctestCompareTest.test_missing_attributes lxml.tests.test_doctestcompare.DoctestCompareTest-class.html#test_missing_attributes -lxml.tests.test_doctestcompare.DoctestCompareTest.test_differing_tags lxml.tests.test_doctestcompare.DoctestCompareTest-class.html#test_differing_tags -lxml.tests.test_doctestcompare.DoctestCompareTest.test_tags_upper_lower_case lxml.tests.test_doctestcompare.DoctestCompareTest-class.html#test_tags_upper_lower_case -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_doctestcompare.DoctestCompareTest.assert_diff lxml.tests.test_doctestcompare.DoctestCompareTest-class.html#assert_diff -lxml.tests.test_doctestcompare.DoctestCompareTest.test_differing_attributes lxml.tests.test_doctestcompare.DoctestCompareTest-class.html#test_differing_attributes -lxml.tests.test_doctestcompare.DoctestCompareTest._checker lxml.tests.test_doctestcompare.DoctestCompareTest-class.html#_checker -lxml.tests.test_doctestcompare.DoctestCompareTest.test_equal_input lxml.tests.test_doctestcompare.DoctestCompareTest-class.html#test_equal_input -lxml.tests.test_doctestcompare.DoctestCompareTest.test_missing_children lxml.tests.test_doctestcompare.DoctestCompareTest-class.html#test_missing_children -lxml.tests.test_doctestcompare.DoctestCompareTest.test_extra_children lxml.tests.test_doctestcompare.DoctestCompareTest-class.html#test_extra_children -lxml.tests.test_doctestcompare.DoctestCompareTest.test_tags_upper_lower_case_html lxml.tests.test_doctestcompare.DoctestCompareTest-class.html#test_tags_upper_lower_case_html -lxml.tests.test_doctestcompare.DoctestCompareTest.test_extra_attributes lxml.tests.test_doctestcompare.DoctestCompareTest-class.html#test_extra_attributes -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_doctestcompare.DoctestCompareTest.assert_nodiff lxml.tests.test_doctestcompare.DoctestCompareTest-class.html#assert_nodiff -lxml.tests.test_doctestcompare.DoctestCompareTest.compare lxml.tests.test_doctestcompare.DoctestCompareTest-class.html#compare -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_doctestcompare.DummyInput lxml.tests.test_doctestcompare.DummyInput-class.html -lxml.tests.test_doctestcompare.DummyInput.__init__ lxml.tests.test_doctestcompare.DummyInput-class.html#__init__ -lxml.tests.test_dtd.ETreeDtdTestCase lxml.tests.test_dtd.ETreeDtdTestCase-class.html -lxml.tests.test_dtd.ETreeDtdTestCase.test_dtd_parse_invalid lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_dtd_parse_invalid -lxml.tests.test_dtd.ETreeDtdTestCase.test_declaration_escape_quote_pid lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_declaration_escape_quote_pid -lxml.tests.test_dtd.ETreeDtdTestCase.test_internal_dtds lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_internal_dtds -lxml.tests.test_dtd.ETreeDtdTestCase.test_iterparse_file_dtd_start lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_iterparse_file_dtd_start -lxml.tests.test_dtd.ETreeDtdTestCase.test_comment_before_dtd lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_comment_before_dtd -lxml.tests.test_dtd.ETreeDtdTestCase.test_clean_doctype lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_clean_doctype -lxml.tests.test_dtd.ETreeDtdTestCase.test_dtd_file lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_dtd_file -lxml.tests.test_dtd.ETreeDtdTestCase.test_dtd_api_internal lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_dtd_api_internal -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_dtd.ETreeDtdTestCase.test_parse_file_dtd lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_parse_file_dtd -lxml.tests.test_dtd.ETreeDtdTestCase.test_dtd_invalid_duplicate_id lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_dtd_invalid_duplicate_id -lxml.tests.test_dtd.ETreeDtdTestCase.test_dtd_parse_valid_file_url lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_dtd_parse_valid_file_url -lxml.tests.test_dtd.ETreeDtdTestCase.test_iterparse_file_dtd_end lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_iterparse_file_dtd_end -lxml.tests.test_dtd.ETreeDtdTestCase.test_dtd_stringio lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_dtd_stringio -lxml.tests.test_dtd.ETreeDtdTestCase.test_declaration_quote_withoutpid lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_declaration_quote_withoutpid -lxml.tests.test_dtd.ETreeDtdTestCase.test_dtd_assertValid lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_dtd_assertValid -lxml.tests.test_dtd.ETreeDtdTestCase.test_declaration_apos lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_declaration_apos -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_dtd.ETreeDtdTestCase.test_set_decl_public lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_set_decl_public -lxml.tests.test_dtd.ETreeDtdTestCase.test_dtd_attrs lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_dtd_attrs -lxml.tests.test_dtd.ETreeDtdTestCase.test_set_decl_system lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_set_decl_system -lxml.tests.test_dtd.ETreeDtdTestCase.test_dtd lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_dtd -lxml.tests.test_dtd.ETreeDtdTestCase.test_dtd_parse_valid lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_dtd_parse_valid -lxml.tests.test_dtd.ETreeDtdTestCase.test_html_decl lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_html_decl -lxml.tests.test_dtd.ETreeDtdTestCase.test_ietf_decl lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_ietf_decl -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -lxml.tests.test_dtd.ETreeDtdTestCase.test_dtd_broken lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_dtd_broken -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_dtd.ETreeDtdTestCase.test_dtd_internal_invalid lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_dtd_internal_invalid -lxml.tests.test_dtd.ETreeDtdTestCase.test_empty_decl lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_empty_decl -lxml.tests.test_dtd.ETreeDtdTestCase.test_invalid_decl_1 lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_invalid_decl_1 -lxml.tests.test_dtd.ETreeDtdTestCase.test_invalid_decl_2 lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_invalid_decl_2 -lxml.tests.test_dtd.ETreeDtdTestCase.test_dtd_parse_file_not_found lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_dtd_parse_file_not_found -lxml.tests.test_dtd.ETreeDtdTestCase.test_dtd_parse_valid_relative lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_dtd_parse_valid_relative -lxml.tests.test_dtd.ETreeDtdTestCase.test_dtd_internal lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_dtd_internal -lxml.tests.test_dtd.ETreeDtdTestCase.test_dtd_invalid lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_dtd_invalid -lxml.tests.test_dtd.ETreeDtdTestCase.test_dtd_parse_valid_relative_file_url lxml.tests.test_dtd.ETreeDtdTestCase-class.html#test_dtd_parse_valid_relative_file_url -lxml.tests.test_elementpath.EtreeElementPathTestCase lxml.tests.test_elementpath.EtreeElementPathTestCase-class.html -lxml.tests.test_elementpath.EtreeElementPathTestCase.etree lxml.etree-module.html -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_elementpath.EtreeElementPathTestCase.test_find lxml.tests.test_elementpath.EtreeElementPathTestCase-class.html#test_find -lxml.tests.test_elementpath.EtreeElementPathTestCase.test_tokenizer_predicates lxml.tests.test_elementpath.EtreeElementPathTestCase-class.html#test_tokenizer_predicates -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_elementpath.EtreeElementPathTestCase.test_tokenizer lxml.tests.test_elementpath.EtreeElementPathTestCase-class.html#test_tokenizer -lxml.tests.test_elementpath.EtreeElementPathTestCase.test_cache lxml.tests.test_elementpath.EtreeElementPathTestCase-class.html#test_cache -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_elementpath.EtreeElementPathTestCase._assert_tokens lxml.tests.test_elementpath.EtreeElementPathTestCase-class.html#_assert_tokens -lxml.tests.test_elementtree.CElementTreeTestCase lxml.tests.test_elementtree.CElementTreeTestCase-class.html -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_update_iter lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_update_iter -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_filter_pi lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_filter_pi -lxml.tests.test_elementtree._ETreeTestCaseBase._writeElement lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_writeElement -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_end_exact lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_end_exact -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy_subelement lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy_subelement -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_clear lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_clear -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_namespace_roundtrip lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_namespace_roundtrip -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_with_attributes_extra_duplicate lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_with_attributes_extra_duplicate -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_error_in_start_and_close lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_error_in_start_and_close -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_cdata lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_cdata -lxml.tests.test_elementtree._ETreeTestCaseBase.test_elementtree lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_elementtree -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_empty -lxml.tests.test_elementtree._ETreeTestCaseBase.test_feed_parser_error_close_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_feed_parser_error_close_empty -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_attrib lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_attrib -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_with_attributes_keywords lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_with_attributes_keywords -lxml.tests.test_elementtree._ETreeTestCaseBase.test_findall_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_findall_ns -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_with_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_with_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_insert_beyond_index lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_insert_beyond_index -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_getiterator lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_getiterator -lxml.tests.test_elementtree._ETreeTestCaseBase.test_write_method_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_write_method_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_dict lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_dict -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_set_clear lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_set_clear -lxml.tests.test_elementtree._ETreeTestCaseBase.test_itertext_child lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_itertext_child -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_pop_empty_default lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_pop_empty_default -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setitem_indexerror lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setitem_indexerror -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_namespace_roundtrip_replaced lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_namespace_roundtrip_replaced -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail1 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail1 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_comment_whitespace lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_comment_whitespace -lxml.tests.test_elementtree._ETreeTestCaseBase.test_crash lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_crash -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_encoding_8bit_override lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_encoding_8bit_override -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_encoding_8bit_explicit lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_encoding_8bit_explicit -lxml.tests.test_elementtree._ETreeTestCaseBase.test_simple lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_simple -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tostring_element lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tostring_element -lxml.tests.test_elementtree._ETreeTestCaseBase.test_write_fail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_write_fail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_sub_tostring_default_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_sub_tostring_default_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_treebuilder lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_treebuilder -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text_escape_tostring lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text_escape_tostring -lxml.tests.test_elementtree._ETreeTestCaseBase.test_makeelement lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_makeelement -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_single lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_single -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getslice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getslice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_memory lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_memory -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_error_in_close lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_error_in_close -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy_append lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy_append -lxml.tests.test_elementtree._ETreeTestCaseBase.test_insert_name_interning lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_insert_name_interning -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_pop_unknown lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_pop_unknown -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_copy lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_copy -lxml.tests.test_elementtree._ETreeTestCaseBase.test_register_namespace lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_register_namespace -lxml.tests.test_elementtree._ETreeTestCaseBase.test_shallowcopy lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_shallowcopy -lxml.tests.test_elementtree._ETreeTestCaseBase.test_feed_parser_unicode lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_feed_parser_unicode -lxml.tests.test_elementtree._ETreeTestCaseBase.test_subelement_reference lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_subelement_reference -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_stringio lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_stringio -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_error_in_end lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_error_in_end -lxml.tests.test_elementtree._ETreeTestCaseBase.test_fromstring lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_fromstring -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_update_dict lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_update_dict -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_with_attributes lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_with_attributes -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_start_end lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_start_end -lxml.tests.test_elementtree._ETreeTestCaseBase.test_feed_parser_error_close_incomplete lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_feed_parser_error_close_incomplete -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text_other lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text_other -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_all_replace_reversed lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_all_replace_reversed -lxml.tests.test_elementtree._ETreeTestCaseBase.test_treebuilder_target lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_treebuilder_target -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname_attrib lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname_attrib -lxml.tests.test_elementtree._ETreeTestCaseBase.test_subelement lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_subelement -lxml.tests.test_elementtree._ETreeTestCaseBase.test_insert lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_insert -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_large lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_large -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_items lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_items -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_tag_parse lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_tag_parse -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_feed_parser_error_position lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_feed_parser_error_position -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy_comment lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy_comment -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_decl_tostring_element lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_decl_tostring_element -lxml.tests.test_elementtree._ETreeTestCaseBase.test_subelement_with_attributes lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_subelement_with_attributes -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_reversed lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_reversed -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_end lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_end -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_indexing_only_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_indexing_only_text -lxml.tests.test_elementtree._ETreeTestCaseBase._writeElementFile lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_writeElementFile -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_file_nonexistent lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_file_nonexistent -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_double lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_double -lxml.tests.test_elementtree._ETreeTestCaseBase.test_insert_negative lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_insert_negative -lxml.tests.test_elementtree.CElementTreeTestCase.etree lxml.tests.test_elementtree.CElementTreeTestCase-class.html#etree -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_8bit_latin1 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_8bit_latin1 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_shallowcopy_elementtree lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_shallowcopy_elementtree -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_tag lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_tag -lxml.tests.test_elementtree._ETreeTestCaseBase.test_subelement_with_attributes_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_subelement_with_attributes_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_attrib_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_attrib_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getslice_step lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getslice_step -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_child_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_child_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname_attribute_getset lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname_attribute_getset -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_empty -lxml.tests.test_elementtree._ETreeTestCaseBase.test_feed_parser_error_broken lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_feed_parser_error_broken -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_clear lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_clear -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_8bit_parse_stringio lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_8bit_parse_stringio -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_utf8_bom lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_utf8_bom -lxml.tests.test_elementtree._ETreeTestCaseBase._test_wrong_unicode_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_test_wrong_unicode_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_set_text_none lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_set_text_none -lxml.tests.test_elementtree._ETreeTestCaseBase.test_itertext lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_itertext -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text_str_subclass lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text_str_subclass -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_filter_comment lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_filter_comment -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_attr lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_attr -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_property lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_property -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_iterator lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_iterator -lxml.tests.test_elementtree._ETreeTestCaseBase.test_comment lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_comment -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_values lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_values -lxml.tests.test_elementtree._ETreeTestCaseBase._check_element_tree lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_check_element_tree -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_xmlns_move lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_xmlns_move -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delitem_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delitem_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_replace_slice_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_replace_slice_tail -lxml.tests.test_elementtree._ETreeTestCaseBase._rootstring lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_rootstring -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail_set_twice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail_set_twice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_start lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_start -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ElementTree lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ElementTree -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_str lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_str -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_8bit_xml lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_8bit_xml -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_decl_tostring lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_decl_tostring -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_values_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_values_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_negative2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_negative2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail_append lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail_append -lxml.tests.test_elementtree._ETreeTestCaseBase.test_del_attribute_ns_parsed lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_del_attribute_ns_parsed -lxml.tests.test_elementtree._ETreeTestCaseBase._test_del_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_test_del_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_with_attributes_extra lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_with_attributes_extra -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_pop_default lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_pop_default -lxml.tests.test_elementtree._ETreeTestCaseBase.test_write_ElementTreeDoctest lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_write_ElementTreeDoctest -lxml.tests.test_elementtree._ETreeTestCaseBase.test_XMLID lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_XMLID -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_access2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_access2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_error_in_start lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_error_in_start -lxml.tests.test_elementtree._ETreeTestCaseBase.test_clear_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_clear_tail -lxml.tests.test_elementtree._ETreeTestCaseBase._check_element lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_check_element -lxml.tests.test_elementtree._ETreeTestCaseBase.test_weird_dict_interaction lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_weird_dict_interaction -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setitem lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setitem -lxml.tests.test_elementtree._ETreeTestCaseBase.test_pi lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_pi -lxml.tests.test_elementtree._ETreeTestCaseBase.test_set_text2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_set_text2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_crash lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_crash -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_tostring lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_tostring -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname -lxml.tests.test_elementtree._ETreeTestCaseBase.test_del_attribute_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_del_attribute_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_del_setslice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_del_setslice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_comment_getitem_getslice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_comment_getitem_getslice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_subelement lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_subelement -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_tostring_unknown lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_tostring_unknown -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_contains lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_contains -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iselement lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iselement -lxml.tests.test_elementtree._ETreeTestCaseBase.test_set_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_set_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_update_sequence lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_update_sequence -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname_attrib_resolve lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname_attrib_resolve -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_items_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_items_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_entity lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_entity -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setitem_replace lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setitem_replace -lxml.tests.test_elementtree._ETreeTestCaseBase.test_fromstringlist lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_fromstringlist -lxml.tests.test_elementtree._ETreeTestCaseBase.test_set_text_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_set_text_empty -lxml.tests.test_elementtree._ETreeTestCaseBase._test_element_boolean lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_test_element_boolean -lxml.tests.test_elementtree._ETreeTestCaseBase.test_write lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_write -lxml.tests.test_elementtree._ETreeTestCaseBase.test_findall lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_findall -lxml.tests.test_elementtree._ETreeTestCaseBase.XMLParser lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#XMLParser -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_indexing_negative lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_indexing_negative -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_keys2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_keys2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_merge_namespaced_subtree_as_slice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_merge_namespaced_subtree_as_slice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_keys lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_keys -lxml.tests.test_elementtree._ETreeTestCaseBase.test_namespaces_after_serialize lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_namespaces_after_serialize -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_pop_invalid_args lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_pop_invalid_args -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_move lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_move -lxml.tests.test_elementtree._ETreeTestCaseBase.test_XML lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_XML -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy_elementtree lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy_elementtree -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_contains lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_contains -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_filter_all lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_filter_all -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail_set_none lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail_set_none -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_file_object_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_file_object_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_clear_sub lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_clear_sub -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tag_reset_root_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tag_reset_root_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_step_negative lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_step_negative -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_error_none lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_error_none -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname_attribute_resolve_new lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname_attribute_resolve_new -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_set lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_set -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy -lxml.tests.test_elementtree._ETreeTestCaseBase.test_extend lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_extend -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_error lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_error -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_pop lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_pop -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_tostring_sub lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_tostring_sub -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_items2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_items2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_insert_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_insert_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.assertEncodingDeclaration lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#assertEncodingDeclaration -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail_str_subclass lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail_str_subclass -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_filter_with_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_filter_with_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_write_default_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_write_default_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delitem lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delitem -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tostring_element_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tostring_element_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text_escape_out lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text_escape_out -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_get lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_get -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_indexing_with_text2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_indexing_with_text2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_version lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_version -lxml.tests.test_elementtree._ETreeTestCaseBase.test_elementtree_parser_target lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_elementtree_parser_target -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_move_elements lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_move_elements -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_ns_clear lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_ns_clear -lxml.tests.test_elementtree._ETreeTestCaseBase.test_elementtree_getiterator lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_elementtree_getiterator -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_as_attrib lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_as_attrib -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_negative1 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_negative1 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_negative2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_negative2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_decl_tostring_root lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_decl_tostring_root -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy_namespaces lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy_namespaces -lxml.tests.test_elementtree._ETreeTestCaseBase._test_getchildren lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_test_getchildren -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_file_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_file_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_manipulation lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_manipulation -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text_escape_in lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text_escape_in -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tostring lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tostring -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_indexing_with_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_indexing_with_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tostring_method_html lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tostring_method_html -lxml.tests.test_elementtree._ETreeTestCaseBase.test_fromstringlist_characters lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_fromstringlist_characters -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_data lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_data -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tag_str_subclass lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tag_str_subclass -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_access lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_access -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_cdata lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_cdata -lxml.tests.test_elementtree._ETreeTestCaseBase.required_versions_ET lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#required_versions_ET -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_entity_unknown lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_entity_unknown -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_clear lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_clear -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_all_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_all_empty -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iter lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iter -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_incomplete lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_incomplete -lxml.tests.test_elementtree._ETreeTestCaseBase.test_remove lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_remove -lxml.tests.test_elementtree._ETreeTestCaseBase.test_feed_parser_bytes lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_feed_parser_bytes -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getslice_negative lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getslice_negative -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_tostring_default_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_tostring_default_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_del_insert lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_del_insert -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text_empty -lxml.tests.test_elementtree._ETreeTestCaseBase.test_write_method_html lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_write_method_html -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_all_replace lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_all_replace -lxml.tests.test_elementtree._ETreeTestCaseBase._check_mapping lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_check_mapping -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_step lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_step -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_empty -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attributes_get lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attributes_get -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_decl_tostring_default lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_decl_tostring_default -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tag_write lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tag_write -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_file lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_file -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_error_from_file lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_error_from_file -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_file_object lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_file_object -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_all lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_all -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_setting lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_setting -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tag_reset_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tag_reset_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_remove_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_remove_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_remove_nonexisting lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_remove_nonexisting -lxml.tests.test_elementtree._ETreeTestCaseBase.test_fromstringlist_single lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_fromstringlist_single -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail_elementtree_root lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail_elementtree_root -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_keys_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_keys_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_with_attributes_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_with_attributes_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_text_only lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_text_only -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname_attribute_resolve lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname_attribute_resolve -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_update_attrib lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_update_attrib -lxml.tests.test_elementtree._ETreeTestCaseBase.test_pi_nonsense lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_pi_nonsense -lxml.tests.test_elementtree._ETreeTestCaseBase.test_elementtree_getiterator_filter lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_elementtree_getiterator_filter -lxml.tests.test_elementtree._ETreeTestCaseBase.required_versions_cET lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#required_versions_cET -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tostring_method_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tostring_method_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getslice_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getslice_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_tostring_sub_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_tostring_sub_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_filter lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_filter -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname_cmp lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname_cmp -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_negative lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_negative -lxml.tests.test_elementtree._ETreeTestCaseBase.test_multiple_elementrees lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_multiple_elementrees -lxml.tests.test_elementtree._ETreeTestCaseBase.test_comment_nonsense lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_comment_nonsense -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_del_child lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_del_child -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_exact lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_exact -lxml.tests.test_elementtree._ETreeTestCaseBase.test_del_setitem lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_del_setitem -lxml.tests.test_elementtree._ETreeTestCaseBase.test_remove_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_remove_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_step_negative2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_step_negative2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_all_replace_reversed_ns1 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_all_replace_reversed_ns1 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_all_replace_reversed_ns2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_all_replace_reversed_ns2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setitem_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setitem_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_processinginstruction lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_processinginstruction -lxml.tests.test_elementtree._ETreeTestCaseBase.assertXML lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#assertXML -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_file lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_file -lxml.tests.test_elementtree._ETreeTestCaseBase._check_string lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_check_string -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_with_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_with_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_deepcopy lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_deepcopy -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setitem2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setitem2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_comment_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_comment_text -lxml.tests.test_elementtree.ETreePullTestCase lxml.tests.test_elementtree.ETreePullTestCase-class.html -lxml.tests.test_elementtree.ETreePullTestCase.etree lxml.etree-module.html -lxml.tests.test_elementtree._XMLPullParserTest.test_feed_while_iterating lxml.tests.test_elementtree._XMLPullParserTest-class.html#test_feed_while_iterating -lxml.tests.test_elementtree._XMLPullParserTest.test_events_sequence lxml.tests.test_elementtree._XMLPullParserTest-class.html#test_events_sequence -lxml.tests.test_elementtree._XMLPullParserTest.test_simple_xml_with_ns lxml.tests.test_elementtree._XMLPullParserTest-class.html#test_simple_xml_with_ns -lxml.tests.test_elementtree._XMLPullParserTest._feed lxml.tests.test_elementtree._XMLPullParserTest-class.html#_feed -lxml.tests.test_elementtree._XMLPullParserTest._close_and_return_root lxml.tests.test_elementtree._XMLPullParserTest-class.html#_close_and_return_root -lxml.tests.test_elementtree._XMLPullParserTest.test_events lxml.tests.test_elementtree._XMLPullParserTest-class.html#test_events -lxml.tests.test_elementtree._XMLPullParserTest.test_unknown_event lxml.tests.test_elementtree._XMLPullParserTest-class.html#test_unknown_event -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_elementtree._XMLPullParserTest.test_ns_events lxml.tests.test_elementtree._XMLPullParserTest-class.html#test_ns_events -lxml.tests.test_elementtree._XMLPullParserTest.test_simple_xml lxml.tests.test_elementtree._XMLPullParserTest-class.html#test_simple_xml -lxml.tests.test_elementtree._XMLPullParserTest.assert_event_tags lxml.tests.test_elementtree._XMLPullParserTest-class.html#assert_event_tags -lxml.tests.test_elementtree.ETreeTestCase lxml.tests.test_elementtree.ETreeTestCase-class.html -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_update_iter lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_update_iter -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_filter_pi lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_filter_pi -lxml.tests.test_elementtree._ETreeTestCaseBase._writeElement lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_writeElement -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_end_exact lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_end_exact -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy_subelement lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy_subelement -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_clear lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_clear -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_namespace_roundtrip lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_namespace_roundtrip -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_with_attributes_extra_duplicate lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_with_attributes_extra_duplicate -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_error_in_start_and_close lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_error_in_start_and_close -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_cdata lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_cdata -lxml.tests.test_elementtree._ETreeTestCaseBase.test_elementtree lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_elementtree -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_empty -lxml.tests.test_elementtree._ETreeTestCaseBase.test_feed_parser_error_close_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_feed_parser_error_close_empty -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_attrib lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_attrib -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_with_attributes_keywords lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_with_attributes_keywords -lxml.tests.test_elementtree._ETreeTestCaseBase.test_findall_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_findall_ns -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_with_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_with_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_insert_beyond_index lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_insert_beyond_index -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_getiterator lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_getiterator -lxml.tests.test_elementtree._ETreeTestCaseBase.test_write_method_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_write_method_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_dict lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_dict -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_set_clear lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_set_clear -lxml.tests.test_elementtree._ETreeTestCaseBase.test_itertext_child lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_itertext_child -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_pop_empty_default lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_pop_empty_default -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setitem_indexerror lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setitem_indexerror -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_namespace_roundtrip_replaced lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_namespace_roundtrip_replaced -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail1 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail1 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_comment_whitespace lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_comment_whitespace -lxml.tests.test_elementtree._ETreeTestCaseBase.test_crash lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_crash -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_encoding_8bit_override lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_encoding_8bit_override -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_encoding_8bit_explicit lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_encoding_8bit_explicit -lxml.tests.test_elementtree._ETreeTestCaseBase.test_simple lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_simple -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tostring_element lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tostring_element -lxml.tests.test_elementtree._ETreeTestCaseBase.test_write_fail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_write_fail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_sub_tostring_default_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_sub_tostring_default_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_treebuilder lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_treebuilder -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text_escape_tostring lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text_escape_tostring -lxml.tests.test_elementtree._ETreeTestCaseBase.test_makeelement lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_makeelement -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_single lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_single -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getslice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getslice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_memory lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_memory -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_error_in_close lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_error_in_close -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy_append lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy_append -lxml.tests.test_elementtree._ETreeTestCaseBase.test_insert_name_interning lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_insert_name_interning -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_pop_unknown lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_pop_unknown -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_copy lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_copy -lxml.tests.test_elementtree._ETreeTestCaseBase.test_register_namespace lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_register_namespace -lxml.tests.test_elementtree._ETreeTestCaseBase.test_shallowcopy lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_shallowcopy -lxml.tests.test_elementtree._ETreeTestCaseBase.test_feed_parser_unicode lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_feed_parser_unicode -lxml.tests.test_elementtree._ETreeTestCaseBase.test_subelement_reference lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_subelement_reference -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_stringio lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_stringio -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_error_in_end lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_error_in_end -lxml.tests.test_elementtree._ETreeTestCaseBase.test_fromstring lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_fromstring -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_update_dict lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_update_dict -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_with_attributes lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_with_attributes -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_start_end lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_start_end -lxml.tests.test_elementtree._ETreeTestCaseBase.test_feed_parser_error_close_incomplete lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_feed_parser_error_close_incomplete -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text_other lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text_other -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_all_replace_reversed lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_all_replace_reversed -lxml.tests.test_elementtree._ETreeTestCaseBase.test_treebuilder_target lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_treebuilder_target -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname_attrib lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname_attrib -lxml.tests.test_elementtree._ETreeTestCaseBase.test_subelement lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_subelement -lxml.tests.test_elementtree._ETreeTestCaseBase.test_insert lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_insert -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_large lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_large -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_items lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_items -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_tag_parse lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_tag_parse -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_feed_parser_error_position lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_feed_parser_error_position -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy_comment lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy_comment -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_decl_tostring_element lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_decl_tostring_element -lxml.tests.test_elementtree._ETreeTestCaseBase.test_subelement_with_attributes lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_subelement_with_attributes -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_reversed lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_reversed -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_end lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_end -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_indexing_only_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_indexing_only_text -lxml.tests.test_elementtree._ETreeTestCaseBase._writeElementFile lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_writeElementFile -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_file_nonexistent lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_file_nonexistent -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_double lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_double -lxml.tests.test_elementtree._ETreeTestCaseBase.test_insert_negative lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_insert_negative -lxml.tests.test_elementtree.ETreeTestCase.etree lxml.etree-module.html -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_8bit_latin1 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_8bit_latin1 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_shallowcopy_elementtree lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_shallowcopy_elementtree -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_tag lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_tag -lxml.tests.test_elementtree._ETreeTestCaseBase.test_subelement_with_attributes_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_subelement_with_attributes_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_attrib_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_attrib_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getslice_step lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getslice_step -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_child_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_child_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname_attribute_getset lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname_attribute_getset -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_empty -lxml.tests.test_elementtree._ETreeTestCaseBase.test_feed_parser_error_broken lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_feed_parser_error_broken -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_clear lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_clear -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_8bit_parse_stringio lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_8bit_parse_stringio -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_utf8_bom lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_utf8_bom -lxml.tests.test_elementtree._ETreeTestCaseBase._test_wrong_unicode_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_test_wrong_unicode_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_set_text_none lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_set_text_none -lxml.tests.test_elementtree._ETreeTestCaseBase.test_itertext lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_itertext -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text_str_subclass lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text_str_subclass -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_filter_comment lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_filter_comment -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_attr lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_attr -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_property lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_property -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_iterator lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_iterator -lxml.tests.test_elementtree._ETreeTestCaseBase.test_comment lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_comment -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_values lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_values -lxml.tests.test_elementtree._ETreeTestCaseBase._check_element_tree lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_check_element_tree -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_xmlns_move lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_xmlns_move -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delitem_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delitem_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_replace_slice_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_replace_slice_tail -lxml.tests.test_elementtree._ETreeTestCaseBase._rootstring lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_rootstring -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail_set_twice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail_set_twice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_start lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_start -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ElementTree lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ElementTree -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_str lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_str -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_8bit_xml lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_8bit_xml -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_decl_tostring lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_decl_tostring -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_values_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_values_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_negative2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_negative2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail_append lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail_append -lxml.tests.test_elementtree._ETreeTestCaseBase.test_del_attribute_ns_parsed lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_del_attribute_ns_parsed -lxml.tests.test_elementtree._ETreeTestCaseBase._test_del_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_test_del_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_with_attributes_extra lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_with_attributes_extra -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_pop_default lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_pop_default -lxml.tests.test_elementtree._ETreeTestCaseBase.test_write_ElementTreeDoctest lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_write_ElementTreeDoctest -lxml.tests.test_elementtree._ETreeTestCaseBase.test_XMLID lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_XMLID -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_access2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_access2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_error_in_start lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_error_in_start -lxml.tests.test_elementtree._ETreeTestCaseBase.test_clear_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_clear_tail -lxml.tests.test_elementtree._ETreeTestCaseBase._check_element lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_check_element -lxml.tests.test_elementtree._ETreeTestCaseBase.test_weird_dict_interaction lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_weird_dict_interaction -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setitem lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setitem -lxml.tests.test_elementtree._ETreeTestCaseBase.test_pi lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_pi -lxml.tests.test_elementtree._ETreeTestCaseBase.test_set_text2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_set_text2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_crash lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_crash -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_tostring lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_tostring -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname -lxml.tests.test_elementtree._ETreeTestCaseBase.test_del_attribute_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_del_attribute_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_del_setslice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_del_setslice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_comment_getitem_getslice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_comment_getitem_getslice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_subelement lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_subelement -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_tostring_unknown lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_tostring_unknown -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_contains lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_contains -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iselement lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iselement -lxml.tests.test_elementtree._ETreeTestCaseBase.test_set_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_set_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_update_sequence lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_update_sequence -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname_attrib_resolve lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname_attrib_resolve -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_items_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_items_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_entity lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_entity -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setitem_replace lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setitem_replace -lxml.tests.test_elementtree._ETreeTestCaseBase.test_fromstringlist lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_fromstringlist -lxml.tests.test_elementtree._ETreeTestCaseBase.test_set_text_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_set_text_empty -lxml.tests.test_elementtree._ETreeTestCaseBase._test_element_boolean lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_test_element_boolean -lxml.tests.test_elementtree._ETreeTestCaseBase.test_write lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_write -lxml.tests.test_elementtree._ETreeTestCaseBase.test_findall lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_findall -lxml.tests.test_elementtree._ETreeTestCaseBase.XMLParser lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#XMLParser -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_indexing_negative lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_indexing_negative -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_keys2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_keys2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_merge_namespaced_subtree_as_slice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_merge_namespaced_subtree_as_slice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_keys lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_keys -lxml.tests.test_elementtree._ETreeTestCaseBase.test_namespaces_after_serialize lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_namespaces_after_serialize -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_pop_invalid_args lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_pop_invalid_args -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_move lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_move -lxml.tests.test_elementtree._ETreeTestCaseBase.test_XML lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_XML -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy_elementtree lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy_elementtree -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_contains lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_contains -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_filter_all lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_filter_all -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail_set_none lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail_set_none -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_file_object_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_file_object_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_clear_sub lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_clear_sub -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tag_reset_root_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tag_reset_root_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_step_negative lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_step_negative -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_error_none lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_error_none -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname_attribute_resolve_new lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname_attribute_resolve_new -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_set lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_set -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy -lxml.tests.test_elementtree._ETreeTestCaseBase.test_extend lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_extend -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_error lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_error -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_pop lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_pop -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_tostring_sub lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_tostring_sub -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_items2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_items2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_insert_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_insert_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.assertEncodingDeclaration lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#assertEncodingDeclaration -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail_str_subclass lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail_str_subclass -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_filter_with_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_filter_with_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_write_default_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_write_default_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delitem lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delitem -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tostring_element_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tostring_element_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text_escape_out lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text_escape_out -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_get lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_get -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_indexing_with_text2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_indexing_with_text2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_version lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_version -lxml.tests.test_elementtree._ETreeTestCaseBase.test_elementtree_parser_target lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_elementtree_parser_target -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_move_elements lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_move_elements -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_ns_clear lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_ns_clear -lxml.tests.test_elementtree._ETreeTestCaseBase.test_elementtree_getiterator lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_elementtree_getiterator -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_as_attrib lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_as_attrib -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_negative1 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_negative1 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_negative2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_negative2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_decl_tostring_root lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_decl_tostring_root -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy_namespaces lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy_namespaces -lxml.tests.test_elementtree._ETreeTestCaseBase._test_getchildren lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_test_getchildren -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_file_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_file_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_manipulation lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_manipulation -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text_escape_in lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text_escape_in -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tostring lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tostring -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_indexing_with_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_indexing_with_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tostring_method_html lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tostring_method_html -lxml.tests.test_elementtree._ETreeTestCaseBase.test_fromstringlist_characters lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_fromstringlist_characters -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_data lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_data -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tag_str_subclass lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tag_str_subclass -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_access lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_access -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_cdata lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_cdata -lxml.tests.test_elementtree._ETreeTestCaseBase.required_versions_ET lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#required_versions_ET -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_entity_unknown lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_entity_unknown -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_clear lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_clear -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_all_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_all_empty -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iter lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iter -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_incomplete lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_incomplete -lxml.tests.test_elementtree._ETreeTestCaseBase.test_remove lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_remove -lxml.tests.test_elementtree._ETreeTestCaseBase.test_feed_parser_bytes lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_feed_parser_bytes -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getslice_negative lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getslice_negative -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_tostring_default_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_tostring_default_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_del_insert lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_del_insert -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text_empty -lxml.tests.test_elementtree._ETreeTestCaseBase.test_write_method_html lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_write_method_html -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_all_replace lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_all_replace -lxml.tests.test_elementtree._ETreeTestCaseBase._check_mapping lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_check_mapping -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_step lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_step -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_empty -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attributes_get lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attributes_get -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_decl_tostring_default lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_decl_tostring_default -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tag_write lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tag_write -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_file lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_file -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_error_from_file lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_error_from_file -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_file_object lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_file_object -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_all lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_all -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_setting lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_setting -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tag_reset_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tag_reset_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_remove_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_remove_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_remove_nonexisting lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_remove_nonexisting -lxml.tests.test_elementtree._ETreeTestCaseBase.test_fromstringlist_single lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_fromstringlist_single -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail_elementtree_root lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail_elementtree_root -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_keys_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_keys_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_with_attributes_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_with_attributes_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_text_only lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_text_only -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname_attribute_resolve lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname_attribute_resolve -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_update_attrib lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_update_attrib -lxml.tests.test_elementtree._ETreeTestCaseBase.test_pi_nonsense lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_pi_nonsense -lxml.tests.test_elementtree._ETreeTestCaseBase.test_elementtree_getiterator_filter lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_elementtree_getiterator_filter -lxml.tests.test_elementtree._ETreeTestCaseBase.required_versions_cET lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#required_versions_cET -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tostring_method_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tostring_method_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getslice_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getslice_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_tostring_sub_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_tostring_sub_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_filter lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_filter -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname_cmp lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname_cmp -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_negative lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_negative -lxml.tests.test_elementtree._ETreeTestCaseBase.test_multiple_elementrees lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_multiple_elementrees -lxml.tests.test_elementtree._ETreeTestCaseBase.test_comment_nonsense lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_comment_nonsense -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_del_child lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_del_child -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_exact lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_exact -lxml.tests.test_elementtree._ETreeTestCaseBase.test_del_setitem lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_del_setitem -lxml.tests.test_elementtree._ETreeTestCaseBase.test_remove_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_remove_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_step_negative2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_step_negative2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_all_replace_reversed_ns1 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_all_replace_reversed_ns1 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_all_replace_reversed_ns2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_all_replace_reversed_ns2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setitem_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setitem_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_processinginstruction lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_processinginstruction -lxml.tests.test_elementtree._ETreeTestCaseBase.assertXML lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#assertXML -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_file lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_file -lxml.tests.test_elementtree._ETreeTestCaseBase._check_string lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_check_string -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_with_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_with_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_deepcopy lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_deepcopy -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setitem2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setitem2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_comment_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_comment_text -lxml.tests.test_elementtree.ElementTreeTestCase lxml.tests.test_elementtree.ElementTreeTestCase-class.html -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_update_iter lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_update_iter -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_filter_pi lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_filter_pi -lxml.tests.test_elementtree._ETreeTestCaseBase._writeElement lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_writeElement -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_end_exact lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_end_exact -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy_subelement lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy_subelement -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_clear lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_clear -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_namespace_roundtrip lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_namespace_roundtrip -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_with_attributes_extra_duplicate lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_with_attributes_extra_duplicate -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_error_in_start_and_close lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_error_in_start_and_close -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_cdata lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_cdata -lxml.tests.test_elementtree._ETreeTestCaseBase.test_elementtree lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_elementtree -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_empty -lxml.tests.test_elementtree._ETreeTestCaseBase.test_feed_parser_error_close_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_feed_parser_error_close_empty -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_attrib lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_attrib -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_with_attributes_keywords lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_with_attributes_keywords -lxml.tests.test_elementtree._ETreeTestCaseBase.test_findall_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_findall_ns -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_with_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_with_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_insert_beyond_index lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_insert_beyond_index -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_getiterator lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_getiterator -lxml.tests.test_elementtree._ETreeTestCaseBase.test_write_method_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_write_method_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_dict lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_dict -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_set_clear lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_set_clear -lxml.tests.test_elementtree._ETreeTestCaseBase.test_itertext_child lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_itertext_child -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_pop_empty_default lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_pop_empty_default -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setitem_indexerror lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setitem_indexerror -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_namespace_roundtrip_replaced lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_namespace_roundtrip_replaced -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail1 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail1 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_comment_whitespace lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_comment_whitespace -lxml.tests.test_elementtree._ETreeTestCaseBase.test_crash lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_crash -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_encoding_8bit_override lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_encoding_8bit_override -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_encoding_8bit_explicit lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_encoding_8bit_explicit -lxml.tests.test_elementtree._ETreeTestCaseBase.test_simple lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_simple -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tostring_element lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tostring_element -lxml.tests.test_elementtree._ETreeTestCaseBase.test_write_fail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_write_fail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_sub_tostring_default_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_sub_tostring_default_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_treebuilder lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_treebuilder -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text_escape_tostring lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text_escape_tostring -lxml.tests.test_elementtree._ETreeTestCaseBase.test_makeelement lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_makeelement -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_single lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_single -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getslice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getslice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_memory lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_memory -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_error_in_close lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_error_in_close -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy_append lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy_append -lxml.tests.test_elementtree._ETreeTestCaseBase.test_insert_name_interning lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_insert_name_interning -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_pop_unknown lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_pop_unknown -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_copy lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_copy -lxml.tests.test_elementtree._ETreeTestCaseBase.test_register_namespace lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_register_namespace -lxml.tests.test_elementtree._ETreeTestCaseBase.test_shallowcopy lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_shallowcopy -lxml.tests.test_elementtree._ETreeTestCaseBase.test_feed_parser_unicode lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_feed_parser_unicode -lxml.tests.test_elementtree.ElementTreeTestCase.setUpClass lxml.tests.test_elementtree.ElementTreeTestCase-class.html#setUpClass -lxml.tests.test_elementtree._ETreeTestCaseBase.test_subelement_reference lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_subelement_reference -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_stringio lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_stringio -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_error_in_end lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_error_in_end -lxml.tests.test_elementtree._ETreeTestCaseBase.test_fromstring lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_fromstring -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_update_dict lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_update_dict -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_with_attributes lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_with_attributes -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_start_end lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_start_end -lxml.tests.test_elementtree._ETreeTestCaseBase.test_feed_parser_error_close_incomplete lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_feed_parser_error_close_incomplete -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text_other lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text_other -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_all_replace_reversed lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_all_replace_reversed -lxml.tests.test_elementtree._ETreeTestCaseBase.test_treebuilder_target lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_treebuilder_target -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname_attrib lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname_attrib -lxml.tests.test_elementtree._ETreeTestCaseBase.test_subelement lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_subelement -lxml.tests.test_elementtree._ETreeTestCaseBase.test_insert lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_insert -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_large lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_large -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_items lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_items -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_tag_parse lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_tag_parse -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_feed_parser_error_position lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_feed_parser_error_position -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy_comment lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy_comment -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_decl_tostring_element lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_decl_tostring_element -lxml.tests.test_elementtree._ETreeTestCaseBase.test_subelement_with_attributes lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_subelement_with_attributes -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_reversed lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_reversed -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_end lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_end -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_indexing_only_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_indexing_only_text -lxml.tests.test_elementtree._ETreeTestCaseBase._writeElementFile lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_writeElementFile -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_file_nonexistent lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_file_nonexistent -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_double lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_double -lxml.tests.test_elementtree._ETreeTestCaseBase.test_insert_negative lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_insert_negative -lxml.tests.test_elementtree.ElementTreeTestCase.etree xml.etree.ElementTree-module.html -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_8bit_latin1 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_8bit_latin1 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_shallowcopy_elementtree lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_shallowcopy_elementtree -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_tag lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_tag -lxml.tests.test_elementtree._ETreeTestCaseBase.test_subelement_with_attributes_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_subelement_with_attributes_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_attrib_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_attrib_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getslice_step lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getslice_step -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_child_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_child_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname_attribute_getset lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname_attribute_getset -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_empty -lxml.tests.test_elementtree._ETreeTestCaseBase.test_feed_parser_error_broken lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_feed_parser_error_broken -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_clear lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_clear -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_8bit_parse_stringio lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_8bit_parse_stringio -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_utf8_bom lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_utf8_bom -lxml.tests.test_elementtree._ETreeTestCaseBase._test_wrong_unicode_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_test_wrong_unicode_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_set_text_none lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_set_text_none -lxml.tests.test_elementtree._ETreeTestCaseBase.test_itertext lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_itertext -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text_str_subclass lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text_str_subclass -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_filter_comment lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_filter_comment -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_attr lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_attr -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_property lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_property -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_iterator lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_iterator -lxml.tests.test_elementtree._ETreeTestCaseBase.test_comment lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_comment -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_values lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_values -lxml.tests.test_elementtree._ETreeTestCaseBase._check_element_tree lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_check_element_tree -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_xmlns_move lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_xmlns_move -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delitem_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delitem_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_replace_slice_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_replace_slice_tail -lxml.tests.test_elementtree._ETreeTestCaseBase._rootstring lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_rootstring -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail_set_twice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail_set_twice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_start lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_start -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ElementTree lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ElementTree -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_str lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_str -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_8bit_xml lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_8bit_xml -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_decl_tostring lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_decl_tostring -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_values_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_values_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_negative2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_negative2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail_append lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail_append -lxml.tests.test_elementtree._ETreeTestCaseBase.test_del_attribute_ns_parsed lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_del_attribute_ns_parsed -lxml.tests.test_elementtree._ETreeTestCaseBase._test_del_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_test_del_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_with_attributes_extra lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_with_attributes_extra -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_pop_default lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_pop_default -lxml.tests.test_elementtree._ETreeTestCaseBase.test_write_ElementTreeDoctest lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_write_ElementTreeDoctest -lxml.tests.test_elementtree._ETreeTestCaseBase.test_XMLID lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_XMLID -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_access2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_access2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_error_in_start lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_error_in_start -lxml.tests.test_elementtree._ETreeTestCaseBase.test_clear_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_clear_tail -lxml.tests.test_elementtree._ETreeTestCaseBase._check_element lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_check_element -lxml.tests.test_elementtree._ETreeTestCaseBase.test_weird_dict_interaction lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_weird_dict_interaction -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setitem lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setitem -lxml.tests.test_elementtree._ETreeTestCaseBase.test_pi lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_pi -lxml.tests.test_elementtree._ETreeTestCaseBase.test_set_text2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_set_text2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_crash lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_crash -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_tostring lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_tostring -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname -lxml.tests.test_elementtree._ETreeTestCaseBase.test_del_attribute_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_del_attribute_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_del_setslice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_del_setslice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_comment_getitem_getslice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_comment_getitem_getslice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_subelement lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_subelement -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_tostring_unknown lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_tostring_unknown -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_contains lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_contains -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iselement lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iselement -lxml.tests.test_elementtree._ETreeTestCaseBase.test_set_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_set_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_update_sequence lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_update_sequence -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname_attrib_resolve lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname_attrib_resolve -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_items_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_items_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_entity lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_entity -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setitem_replace lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setitem_replace -lxml.tests.test_elementtree._ETreeTestCaseBase.test_fromstringlist lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_fromstringlist -lxml.tests.test_elementtree._ETreeTestCaseBase.test_set_text_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_set_text_empty -lxml.tests.test_elementtree._ETreeTestCaseBase._test_element_boolean lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_test_element_boolean -lxml.tests.test_elementtree._ETreeTestCaseBase.test_write lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_write -lxml.tests.test_elementtree._ETreeTestCaseBase.test_findall lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_findall -lxml.tests.test_elementtree._ETreeTestCaseBase.XMLParser lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#XMLParser -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_indexing_negative lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_indexing_negative -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_keys2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_keys2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_merge_namespaced_subtree_as_slice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_merge_namespaced_subtree_as_slice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_keys lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_keys -lxml.tests.test_elementtree._ETreeTestCaseBase.test_namespaces_after_serialize lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_namespaces_after_serialize -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_pop_invalid_args lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_pop_invalid_args -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_move lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_move -lxml.tests.test_elementtree._ETreeTestCaseBase.test_XML lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_XML -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy_elementtree lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy_elementtree -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_contains lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_contains -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_filter_all lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_filter_all -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail_set_none lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail_set_none -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_file_object_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_file_object_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_clear_sub lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_clear_sub -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tag_reset_root_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tag_reset_root_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_step_negative lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_step_negative -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_error_none lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_error_none -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname_attribute_resolve_new lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname_attribute_resolve_new -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_set lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_set -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy -lxml.tests.test_elementtree._ETreeTestCaseBase.test_extend lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_extend -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_error lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_error -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_pop lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_pop -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_tostring_sub lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_tostring_sub -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_items2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_items2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_insert_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_insert_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.assertEncodingDeclaration lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#assertEncodingDeclaration -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail_str_subclass lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail_str_subclass -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_filter_with_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_filter_with_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_write_default_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_write_default_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delitem lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delitem -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tostring_element_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tostring_element_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text_escape_out lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text_escape_out -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_get lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_get -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_indexing_with_text2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_indexing_with_text2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_version lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_version -lxml.tests.test_elementtree._ETreeTestCaseBase.test_elementtree_parser_target lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_elementtree_parser_target -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_move_elements lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_move_elements -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_ns_clear lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_ns_clear -lxml.tests.test_elementtree._ETreeTestCaseBase.test_elementtree_getiterator lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_elementtree_getiterator -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_as_attrib lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_as_attrib -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_negative1 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_negative1 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_negative2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_negative2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_decl_tostring_root lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_decl_tostring_root -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy_namespaces lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy_namespaces -lxml.tests.test_elementtree._ETreeTestCaseBase._test_getchildren lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_test_getchildren -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_file_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_file_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_manipulation lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_manipulation -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text_escape_in lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text_escape_in -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tostring lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tostring -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_indexing_with_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_indexing_with_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tostring_method_html lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tostring_method_html -lxml.tests.test_elementtree._ETreeTestCaseBase.test_fromstringlist_characters lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_fromstringlist_characters -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_data lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_data -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tag_str_subclass lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tag_str_subclass -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_access lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_access -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_cdata lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_cdata -lxml.tests.test_elementtree._ETreeTestCaseBase.required_versions_ET lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#required_versions_ET -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_entity_unknown lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_entity_unknown -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_clear lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_clear -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_all_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_all_empty -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iter lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iter -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_incomplete lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_incomplete -lxml.tests.test_elementtree._ETreeTestCaseBase.test_remove lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_remove -lxml.tests.test_elementtree._ETreeTestCaseBase.test_feed_parser_bytes lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_feed_parser_bytes -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getslice_negative lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getslice_negative -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_tostring_default_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_tostring_default_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_del_insert lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_del_insert -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text_empty -lxml.tests.test_elementtree._ETreeTestCaseBase.test_write_method_html lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_write_method_html -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_all_replace lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_all_replace -lxml.tests.test_elementtree._ETreeTestCaseBase._check_mapping lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_check_mapping -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_step lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_step -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_empty -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attributes_get lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attributes_get -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_decl_tostring_default lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_decl_tostring_default -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tag_write lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tag_write -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_file lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_file -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_error_from_file lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_error_from_file -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_file_object lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_file_object -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_all lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_all -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_setting lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_setting -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tag_reset_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tag_reset_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_remove_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_remove_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_remove_nonexisting lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_remove_nonexisting -lxml.tests.test_elementtree._ETreeTestCaseBase.test_fromstringlist_single lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_fromstringlist_single -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail_elementtree_root lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail_elementtree_root -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_keys_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_keys_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_with_attributes_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_with_attributes_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_text_only lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_text_only -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname_attribute_resolve lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname_attribute_resolve -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_update_attrib lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_update_attrib -lxml.tests.test_elementtree._ETreeTestCaseBase.test_pi_nonsense lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_pi_nonsense -lxml.tests.test_elementtree._ETreeTestCaseBase.test_elementtree_getiterator_filter lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_elementtree_getiterator_filter -lxml.tests.test_elementtree._ETreeTestCaseBase.required_versions_cET lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#required_versions_cET -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tostring_method_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tostring_method_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getslice_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getslice_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_tostring_sub_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_tostring_sub_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_filter lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_filter -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname_cmp lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname_cmp -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_negative lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_negative -lxml.tests.test_elementtree._ETreeTestCaseBase.test_multiple_elementrees lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_multiple_elementrees -lxml.tests.test_elementtree._ETreeTestCaseBase.test_comment_nonsense lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_comment_nonsense -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_del_child lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_del_child -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_exact lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_exact -lxml.tests.test_elementtree._ETreeTestCaseBase.test_del_setitem lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_del_setitem -lxml.tests.test_elementtree._ETreeTestCaseBase.test_remove_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_remove_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_step_negative2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_step_negative2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_all_replace_reversed_ns1 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_all_replace_reversed_ns1 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_all_replace_reversed_ns2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_all_replace_reversed_ns2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setitem_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setitem_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_processinginstruction lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_processinginstruction -lxml.tests.test_elementtree._ETreeTestCaseBase.assertXML lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#assertXML -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_file lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_file -lxml.tests.test_elementtree._ETreeTestCaseBase._check_string lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_check_string -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_with_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_with_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_deepcopy lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_deepcopy -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setitem2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setitem2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_comment_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_comment_text -lxml.tests.test_elementtree._ETreeTestCaseBase lxml.tests.test_elementtree._ETreeTestCaseBase-class.html -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_update_iter lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_update_iter -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_filter_pi lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_filter_pi -lxml.tests.test_elementtree._ETreeTestCaseBase._writeElement lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_writeElement -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_end_exact lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_end_exact -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy_subelement lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy_subelement -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_clear lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_clear -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_namespace_roundtrip lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_namespace_roundtrip -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_with_attributes_extra_duplicate lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_with_attributes_extra_duplicate -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_error_in_start_and_close lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_error_in_start_and_close -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_cdata lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_cdata -lxml.tests.test_elementtree._ETreeTestCaseBase.test_elementtree lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_elementtree -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_empty -lxml.tests.test_elementtree._ETreeTestCaseBase.test_feed_parser_error_close_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_feed_parser_error_close_empty -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_attrib lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_attrib -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_with_attributes_keywords lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_with_attributes_keywords -lxml.tests.test_elementtree._ETreeTestCaseBase.test_findall_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_findall_ns -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_with_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_with_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_stringio lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_stringio -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_getiterator lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_getiterator -lxml.tests.test_elementtree._ETreeTestCaseBase.test_write_method_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_write_method_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_dict lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_dict -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_set_clear lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_set_clear -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_all lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_all -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_pop_empty_default lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_pop_empty_default -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setitem_indexerror lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setitem_indexerror -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_namespace_roundtrip_replaced lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_namespace_roundtrip_replaced -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail1 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail1 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_comment_whitespace lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_comment_whitespace -lxml.tests.test_elementtree._ETreeTestCaseBase.test_crash lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_crash -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_encoding_8bit_override lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_encoding_8bit_override -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_encoding_8bit_explicit lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_encoding_8bit_explicit -lxml.tests.test_elementtree._ETreeTestCaseBase.test_simple lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_simple -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tostring_element lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tostring_element -lxml.tests.test_elementtree._ETreeTestCaseBase.test_write_fail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_write_fail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_sub_tostring_default_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_sub_tostring_default_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_set_text_none lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_set_text_none -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text_escape_tostring lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text_escape_tostring -lxml.tests.test_elementtree._ETreeTestCaseBase.test_makeelement lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_makeelement -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_single lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_single -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getslice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getslice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_memory lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_memory -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_error_in_close lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_error_in_close -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy_append lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy_append -lxml.tests.test_elementtree._ETreeTestCaseBase.test_insert_name_interning lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_insert_name_interning -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_pop_unknown lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_pop_unknown -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_copy lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_copy -lxml.tests.test_elementtree._ETreeTestCaseBase.test_register_namespace lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_register_namespace -lxml.tests.test_elementtree._ETreeTestCaseBase.test_shallowcopy lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_shallowcopy -lxml.tests.test_elementtree._ETreeTestCaseBase.test_feed_parser_unicode lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_feed_parser_unicode -lxml.tests.test_elementtree._ETreeTestCaseBase.test_subelement_reference lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_subelement_reference -lxml.tests.test_elementtree._ETreeTestCaseBase.test_insert_beyond_index lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_insert_beyond_index -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_error_in_end lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_error_in_end -lxml.tests.test_elementtree._ETreeTestCaseBase.test_fromstring lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_fromstring -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_update_dict lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_update_dict -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_with_attributes lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_with_attributes -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_start_end lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_start_end -lxml.tests.test_elementtree._ETreeTestCaseBase.test_feed_parser_error_close_incomplete lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_feed_parser_error_close_incomplete -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text_other lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text_other -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_all_replace_reversed lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_all_replace_reversed -lxml.tests.test_elementtree._ETreeTestCaseBase.test_treebuilder_target lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_treebuilder_target -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname_attrib lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname_attrib -lxml.tests.test_elementtree._ETreeTestCaseBase.test_subelement lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_subelement -lxml.tests.test_elementtree._ETreeTestCaseBase.test_insert lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_insert -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_large lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_large -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_items lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_items -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_tag_parse lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_tag_parse -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_feed_parser_error_position lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_feed_parser_error_position -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy_comment lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy_comment -lxml.tests.test_elementtree._ETreeTestCaseBase.test_XMLID lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_XMLID -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_decl_tostring_element lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_decl_tostring_element -lxml.tests.test_elementtree._ETreeTestCaseBase.test_subelement_with_attributes lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_subelement_with_attributes -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_reversed lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_reversed -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_end lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_end -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_indexing_only_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_indexing_only_text -lxml.tests.test_elementtree._ETreeTestCaseBase._writeElementFile lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_writeElementFile -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_file_nonexistent lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_file_nonexistent -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_double lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_double -lxml.tests.test_elementtree._ETreeTestCaseBase.test_insert_negative lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_insert_negative -lxml.tests.test_elementtree._ETreeTestCaseBase.etree lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#etree -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_8bit_latin1 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_8bit_latin1 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_shallowcopy_elementtree lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_shallowcopy_elementtree -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_tag lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_tag -lxml.tests.test_elementtree._ETreeTestCaseBase.test_subelement_with_attributes_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_subelement_with_attributes_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_attrib_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_attrib_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getslice_step lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getslice_step -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_child_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_child_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname_attribute_getset lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname_attribute_getset -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_empty -lxml.tests.test_elementtree._ETreeTestCaseBase.test_feed_parser_error_broken lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_feed_parser_error_broken -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_clear lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_clear -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_8bit_parse_stringio lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_8bit_parse_stringio -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_utf8_bom lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_utf8_bom -lxml.tests.test_elementtree._ETreeTestCaseBase._test_wrong_unicode_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_test_wrong_unicode_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_treebuilder lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_treebuilder -lxml.tests.test_elementtree._ETreeTestCaseBase.test_itertext lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_itertext -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text_str_subclass lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text_str_subclass -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_filter_comment lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_filter_comment -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_attr lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_attr -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_property lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_property -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_iterator lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_iterator -lxml.tests.test_elementtree._ETreeTestCaseBase.test_comment lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_comment -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_values lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_values -lxml.tests.test_elementtree._ETreeTestCaseBase._check_element_tree lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_check_element_tree -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_xmlns_move lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_xmlns_move -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delitem_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delitem_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_replace_slice_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_replace_slice_tail -lxml.tests.test_elementtree._ETreeTestCaseBase._rootstring lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_rootstring -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail_set_twice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail_set_twice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_start lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_start -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ElementTree lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ElementTree -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_str lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_str -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_8bit_xml lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_8bit_xml -lxml.tests.test_elementtree._ETreeTestCaseBase.test_elementtree_parser_target lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_elementtree_parser_target -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_values_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_values_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_negative2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_negative2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail_append lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail_append -lxml.tests.test_elementtree._ETreeTestCaseBase.test_del_attribute_ns_parsed lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_del_attribute_ns_parsed -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iter lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iter -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_with_attributes_extra lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_with_attributes_extra -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_pop_default lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_pop_default -lxml.tests.test_elementtree._ETreeTestCaseBase.test_write_ElementTreeDoctest lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_write_ElementTreeDoctest -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_access2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_access2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_error_in_start lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_error_in_start -lxml.tests.test_elementtree._ETreeTestCaseBase.test_clear_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_clear_tail -lxml.tests.test_elementtree._ETreeTestCaseBase._check_element lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_check_element -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tag_str_subclass lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tag_str_subclass -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setitem lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setitem -lxml.tests.test_elementtree._ETreeTestCaseBase.test_pi lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_pi -lxml.tests.test_elementtree._ETreeTestCaseBase.test_set_text2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_set_text2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_crash lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_crash -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_tostring lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_tostring -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname -lxml.tests.test_elementtree._ETreeTestCaseBase.test_del_attribute_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_del_attribute_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_del_setslice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_del_setslice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_comment_getitem_getslice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_comment_getitem_getslice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_subelement lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_subelement -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_tostring_unknown lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_tostring_unknown -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_contains lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_contains -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iselement lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iselement -lxml.tests.test_elementtree._ETreeTestCaseBase.test_set_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_set_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_update_sequence lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_update_sequence -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname_attrib_resolve lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname_attrib_resolve -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_items_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_items_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_entity lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_entity -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setitem_replace lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setitem_replace -lxml.tests.test_elementtree._ETreeTestCaseBase.test_fromstringlist lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_fromstringlist -lxml.tests.test_elementtree._ETreeTestCaseBase.test_set_text_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_set_text_empty -lxml.tests.test_elementtree._ETreeTestCaseBase._test_element_boolean lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_test_element_boolean -lxml.tests.test_elementtree._ETreeTestCaseBase.test_write lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_write -lxml.tests.test_elementtree._ETreeTestCaseBase.test_findall lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_findall -lxml.tests.test_elementtree._ETreeTestCaseBase.XMLParser lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#XMLParser -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_indexing_negative lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_indexing_negative -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_keys2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_keys2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_merge_namespaced_subtree_as_slice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_merge_namespaced_subtree_as_slice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_keys lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_keys -lxml.tests.test_elementtree._ETreeTestCaseBase.test_namespaces_after_serialize lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_namespaces_after_serialize -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_pop_invalid_args lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_pop_invalid_args -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_move lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_move -lxml.tests.test_elementtree._ETreeTestCaseBase.test_XML lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_XML -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy_elementtree lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy_elementtree -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_contains lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_contains -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_negative lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_negative -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail_set_none lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail_set_none -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_file_object_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_file_object_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_clear_sub lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_clear_sub -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_indexing_with_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_indexing_with_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_step_negative lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_step_negative -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_error_none lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_error_none -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname_attribute_resolve_new lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname_attribute_resolve_new -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_set lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_set -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy -lxml.tests.test_elementtree._ETreeTestCaseBase.test_extend lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_extend -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_error lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_error -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_pop lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_pop -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_tostring_sub lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_tostring_sub -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_items2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_items2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_insert_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_insert_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.assertEncodingDeclaration lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#assertEncodingDeclaration -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail_str_subclass lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail_str_subclass -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_filter_with_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_filter_with_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_write_default_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_write_default_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delitem lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delitem -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tostring_element_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tostring_element_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text_escape_out lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text_escape_out -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_get lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_get -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_indexing_with_text2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_indexing_with_text2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_version lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_version -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_decl_tostring lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_decl_tostring -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_move_elements lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_move_elements -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_ns_clear lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_ns_clear -lxml.tests.test_elementtree._ETreeTestCaseBase.test_elementtree_getiterator lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_elementtree_getiterator -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_as_attrib lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_as_attrib -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_negative1 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_negative1 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_negative2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_negative2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_decl_tostring_root lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_decl_tostring_root -lxml.tests.test_elementtree._ETreeTestCaseBase.test_deepcopy_namespaces lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_deepcopy_namespaces -lxml.tests.test_elementtree._ETreeTestCaseBase._test_getchildren lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_test_getchildren -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_file_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_file_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_manipulation lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_manipulation -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text_escape_in lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text_escape_in -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tostring lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tostring -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tag_reset_root_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tag_reset_root_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tostring_method_html lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tostring_method_html -lxml.tests.test_elementtree._ETreeTestCaseBase.test_fromstringlist_characters lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_fromstringlist_characters -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_data lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_data -lxml.tests.test_elementtree._ETreeTestCaseBase.test_weird_dict_interaction lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_weird_dict_interaction -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_access lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_access -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_cdata lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_cdata -lxml.tests.test_elementtree._ETreeTestCaseBase.required_versions_ET lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#required_versions_ET -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parser_target_entity_unknown lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parser_target_entity_unknown -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_clear lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_clear -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_all_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_all_empty -lxml.tests.test_elementtree._ETreeTestCaseBase._test_del_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_test_del_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_incomplete lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_incomplete -lxml.tests.test_elementtree._ETreeTestCaseBase.test_remove lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_remove -lxml.tests.test_elementtree._ETreeTestCaseBase.test_feed_parser_bytes lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_feed_parser_bytes -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getslice_negative lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getslice_negative -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_tostring_default_encoding lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_tostring_default_encoding -lxml.tests.test_elementtree._ETreeTestCaseBase.test_del_insert lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_del_insert -lxml.tests.test_elementtree._ETreeTestCaseBase.test_text_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_text_empty -lxml.tests.test_elementtree._ETreeTestCaseBase.test_write_method_html lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_write_method_html -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_all_replace lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_all_replace -lxml.tests.test_elementtree._ETreeTestCaseBase._check_mapping lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_check_mapping -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_step lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_step -lxml.tests.test_elementtree._ETreeTestCaseBase.test_processinginstruction lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_processinginstruction -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attributes_get lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attributes_get -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_decl_tostring_default lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_decl_tostring_default -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tag_write lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tag_write -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iterparse_file lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iterparse_file -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_error_from_file lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_error_from_file -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_file_object lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_file_object -lxml.tests.test_elementtree._ETreeTestCaseBase.test_itertext_child lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_itertext_child -lxml.tests.test_elementtree._ETreeTestCaseBase.test_ns_setting lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_ns_setting -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tag_reset_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tag_reset_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_remove_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_remove_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_remove_nonexisting lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_remove_nonexisting -lxml.tests.test_elementtree._ETreeTestCaseBase.test_fromstringlist_single lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_fromstringlist_single -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tail_elementtree_root lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tail_elementtree_root -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_keys_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_keys_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_element_with_attributes_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_element_with_attributes_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_text_only lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_text_only -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname_attribute_resolve lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname_attribute_resolve -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attribute_update_attrib lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attribute_update_attrib -lxml.tests.test_elementtree._ETreeTestCaseBase.test_pi_nonsense lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_pi_nonsense -lxml.tests.test_elementtree._ETreeTestCaseBase.test_elementtree_getiterator_filter lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_elementtree_getiterator_filter -lxml.tests.test_elementtree._ETreeTestCaseBase.required_versions_cET lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#required_versions_cET -lxml.tests.test_elementtree._ETreeTestCaseBase.test_tostring_method_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_tostring_method_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getslice_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getslice_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_tostring_sub_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_tostring_sub_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_filter lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_filter -lxml.tests.test_elementtree._ETreeTestCaseBase.test_qname_cmp lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_qname_cmp -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_filter_all lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_filter_all -lxml.tests.test_elementtree._ETreeTestCaseBase.test_multiple_elementrees lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_multiple_elementrees -lxml.tests.test_elementtree._ETreeTestCaseBase.test_comment_nonsense lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_comment_nonsense -lxml.tests.test_elementtree._ETreeTestCaseBase.test_iteration_del_child lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_iteration_del_child -lxml.tests.test_elementtree._ETreeTestCaseBase.test_encoding_exact lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_encoding_exact -lxml.tests.test_elementtree._ETreeTestCaseBase.test_del_setitem lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_del_setitem -lxml.tests.test_elementtree._ETreeTestCaseBase.test_remove_ns lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_remove_ns -lxml.tests.test_elementtree._ETreeTestCaseBase.test_delslice_step_negative2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_delslice_step_negative2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_all_replace_reversed_ns1 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_all_replace_reversed_ns1 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_all_replace_reversed_ns2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_all_replace_reversed_ns2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setitem_tail lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setitem_tail -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setslice_empty lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setslice_empty -lxml.tests.test_elementtree._ETreeTestCaseBase.assertXML lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#assertXML -lxml.tests.test_elementtree._ETreeTestCaseBase.test_parse_file lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_parse_file -lxml.tests.test_elementtree._ETreeTestCaseBase._check_string lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#_check_string -lxml.tests.test_elementtree._ETreeTestCaseBase.test_getiterator_with_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_getiterator_with_text -lxml.tests.test_elementtree._ETreeTestCaseBase.test_attrib_deepcopy lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_attrib_deepcopy -lxml.tests.test_elementtree._ETreeTestCaseBase.test_setitem2 lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_setitem2 -lxml.tests.test_elementtree._ETreeTestCaseBase.test_comment_text lxml.tests.test_elementtree._ETreeTestCaseBase-class.html#test_comment_text -lxml.tests.test_elementtree._XMLPullParserTest lxml.tests.test_elementtree._XMLPullParserTest-class.html -lxml.tests.test_elementtree._XMLPullParserTest.etree lxml.tests.test_elementtree._XMLPullParserTest-class.html#etree -lxml.tests.test_elementtree._XMLPullParserTest.test_feed_while_iterating lxml.tests.test_elementtree._XMLPullParserTest-class.html#test_feed_while_iterating -lxml.tests.test_elementtree._XMLPullParserTest.test_events_sequence lxml.tests.test_elementtree._XMLPullParserTest-class.html#test_events_sequence -lxml.tests.test_elementtree._XMLPullParserTest.test_simple_xml_with_ns lxml.tests.test_elementtree._XMLPullParserTest-class.html#test_simple_xml_with_ns -lxml.tests.test_elementtree._XMLPullParserTest._feed lxml.tests.test_elementtree._XMLPullParserTest-class.html#_feed -lxml.tests.test_elementtree._XMLPullParserTest._close_and_return_root lxml.tests.test_elementtree._XMLPullParserTest-class.html#_close_and_return_root -lxml.tests.test_elementtree._XMLPullParserTest.test_events lxml.tests.test_elementtree._XMLPullParserTest-class.html#test_events -lxml.tests.test_elementtree._XMLPullParserTest.test_unknown_event lxml.tests.test_elementtree._XMLPullParserTest-class.html#test_unknown_event -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_elementtree._XMLPullParserTest.test_ns_events lxml.tests.test_elementtree._XMLPullParserTest-class.html#test_ns_events -lxml.tests.test_elementtree._XMLPullParserTest.test_simple_xml lxml.tests.test_elementtree._XMLPullParserTest-class.html#test_simple_xml -lxml.tests.test_elementtree._XMLPullParserTest.assert_event_tags lxml.tests.test_elementtree._XMLPullParserTest-class.html#assert_event_tags -lxml.tests.test_errors.ErrorTestCase lxml.tests.test_errors.ErrorTestCase-class.html -lxml.tests.test_errors.ErrorTestCase.etree lxml.etree-module.html -lxml.tests.test_errors.ErrorTestCase.test_empty_parse lxml.tests.test_errors.ErrorTestCase-class.html#test_empty_parse -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_errors.ErrorTestCase.test_bad_element lxml.tests.test_errors.ErrorTestCase-class.html#test_bad_element -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_errors.ErrorTestCase.test_xmlsyntaxerror_has_info lxml.tests.test_errors.ErrorTestCase-class.html#test_xmlsyntaxerror_has_info -lxml.tests.test_errors.ErrorTestCase.test_element_cyclic_gc_none lxml.tests.test_errors.ErrorTestCase-class.html#test_element_cyclic_gc_none -lxml.tests.test_etree.ETreeC14NTestCase lxml.tests.test_etree.ETreeC14NTestCase-class.html -lxml.tests.test_etree.ETreeC14NTestCase.test_c14n_tostring_inclusive_ns_prefixes lxml.tests.test_etree.ETreeC14NTestCase-class.html#test_c14n_tostring_inclusive_ns_prefixes -lxml.tests.test_etree.ETreeC14NTestCase.test_c14n_gzip lxml.tests.test_etree.ETreeC14NTestCase-class.html#test_c14n_gzip -lxml.tests.test_etree.ETreeC14NTestCase.test_c14n lxml.tests.test_etree.ETreeC14NTestCase-class.html#test_c14n -lxml.tests.test_etree.ETreeC14NTestCase.test_c14n_tostring_with_comments lxml.tests.test_etree.ETreeC14NTestCase-class.html#test_c14n_tostring_with_comments -lxml.tests.test_etree.ETreeC14NTestCase.test_c14n_exclusive lxml.tests.test_etree.ETreeC14NTestCase-class.html#test_c14n_exclusive -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_etree.ETreeC14NTestCase.test_c14n_element_tostring_with_comments lxml.tests.test_etree.ETreeC14NTestCase-class.html#test_c14n_element_tostring_with_comments -lxml.tests.test_etree.ETreeC14NTestCase.test_c14n_with_comments lxml.tests.test_etree.ETreeC14NTestCase-class.html#test_c14n_with_comments -lxml.tests.test_etree.ETreeC14NTestCase.test_c14n_element_tostring_exclusive lxml.tests.test_etree.ETreeC14NTestCase-class.html#test_c14n_element_tostring_exclusive -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_etree.ETreeC14NTestCase.test_c14n_tostring_exclusive lxml.tests.test_etree.ETreeC14NTestCase-class.html#test_c14n_tostring_exclusive -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_etree.ETreeC14NTestCase.test_c14n_file lxml.tests.test_etree.ETreeC14NTestCase-class.html#test_c14n_file -lxml.tests.test_etree.ETreeC14NTestCase.test_c14n_file_gzip lxml.tests.test_etree.ETreeC14NTestCase-class.html#test_c14n_file_gzip -lxml.tests.test_etree.ETreeErrorLogTest lxml.tests.test_etree.ETreeErrorLogTest-class.html -lxml.tests.test_etree.ETreeErrorLogTest.etree lxml.etree-module.html -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_etree.ETreeErrorLogTest._test_python_error_logging lxml.tests.test_etree.ETreeErrorLogTest-class.html#_test_python_error_logging -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_etree.ETreeErrorLogTest.test_parse_error_logging lxml.tests.test_etree.ETreeErrorLogTest-class.html#test_parse_error_logging -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_etree.ETreeOnlyTestCase lxml.tests.test_etree.ETreeOnlyTestCase-class.html -lxml.tests.test_etree.ETreeOnlyTestCase.test_addnext_root lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addnext_root -lxml.tests.test_etree.ETreeOnlyTestCase.test_unicode_byte_invalid_sequence lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_unicode_byte_invalid_sequence -lxml.tests.test_etree.ETreeOnlyTestCase._writeElement lxml.tests.test_etree.ETreeOnlyTestCase-class.html#_writeElement -lxml.tests.test_etree.ETreeOnlyTestCase.test_comment_parse_empty lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_comment_parse_empty -lxml.tests.test_etree.ETreeOnlyTestCase.test_addprevious lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addprevious -lxml.tests.test_etree.ETreeOnlyTestCase.test_element_name_space lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_element_name_space -lxml.tests.test_etree.ETreeOnlyTestCase.test_attribute_gets_namespace_prefix_on_merge lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_attribute_gets_namespace_prefix_on_merge -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterwalk_end_skip lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterwalk_end_skip -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterchildren_tag_multiple_reversed lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterchildren_tag_multiple_reversed -lxml.tests.test_etree.ETreeOnlyTestCase.test_append_error lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_append_error -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterwalk_getiterator lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterwalk_getiterator -lxml.tests.test_etree.ETreeOnlyTestCase.test_tostring_unicode_pretty lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tostring_unicode_pretty -lxml.tests.test_etree.ETreeOnlyTestCase.test_standalone lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_standalone -lxml.tests.test_etree.ETreeOnlyTestCase.test_addnext_cycle_long lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addnext_cycle_long -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterparse_broken lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_broken -lxml.tests.test_etree.ETreeOnlyTestCase.test_findall_ns lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_findall_ns -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_etree.ETreeOnlyTestCase.test_comment_empty lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_comment_empty -lxml.tests.test_etree.ETreeOnlyTestCase.test_XML_set_base_url_docinfo lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_XML_set_base_url_docinfo -lxml.tests.test_etree.ETreeOnlyTestCase.test_setitem_assert lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_setitem_assert -lxml.tests.test_etree.ETreeOnlyTestCase.test_setslice_step_overrun lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_setslice_step_overrun -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterparse_tag lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_tag -lxml.tests.test_etree.ETreeOnlyTestCase.test_subelement_name_empty lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_subelement_name_empty -lxml.tests.test_etree.ETreeOnlyTestCase.test_getparent lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_getparent -lxml.tests.test_etree.ETreeOnlyTestCase.test_itersiblings_tag lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_itersiblings_tag -lxml.tests.test_etree.ETreeOnlyTestCase.test_addprevious_cycle_long lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addprevious_cycle_long -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterwalk_start_end_skip lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterwalk_start_end_skip -lxml.tests.test_etree.ETreeOnlyTestCase.test_resolve_string_dtd lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_resolve_string_dtd -lxml.tests.test_etree.ETreeOnlyTestCase.test_addnext_cycle lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addnext_cycle -lxml.tests.test_etree.ETreeOnlyTestCase.test_cdata lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_cdata -lxml.tests.test_etree.ETreeOnlyTestCase.test_resolve_filelike_dtd lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_resolve_filelike_dtd -lxml.tests.test_etree.ETreeOnlyTestCase.test_element_names lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_element_names -lxml.tests.test_etree.ETreeOnlyTestCase.test_tostring_none lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tostring_none -lxml.tests.test_etree.ETreeOnlyTestCase.test_strip_attributes lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_strip_attributes -lxml.tests.test_etree.ETreeOnlyTestCase.test_sourceline_iterparse_end lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_sourceline_iterparse_end -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterchildren_tag_reversed lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterchildren_tag_reversed -lxml.tests.test_etree.ETreeOnlyTestCase.test_parse_fileobject_unicode lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parse_fileobject_unicode -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterparse_tag_ns lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_tag_ns -lxml.tests.test_etree.ETreeOnlyTestCase.test_strip_tags_pi_comment_all lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_strip_tags_pi_comment_all -lxml.tests.test_etree.ETreeOnlyTestCase.test_byte_zero lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_byte_zero -lxml.tests.test_etree.ETreeOnlyTestCase.test_parse_parser_type_error lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parse_parser_type_error -lxml.tests.test_etree.ETreeOnlyTestCase.test_encoding_tostring_utf16 lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_encoding_tostring_utf16 -lxml.tests.test_etree.ETreeOnlyTestCase.test_parser_target_cdata lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parser_target_cdata -lxml.tests.test_etree.ETreeOnlyTestCase.test_cdata_errors lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_cdata_errors -lxml.tests.test_etree.ETreeOnlyTestCase.test_tounicode_element lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tounicode_element -lxml.tests.test_etree.ETreeOnlyTestCase.test_doctype_output_override lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_doctype_output_override -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterdescendants_tag lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterdescendants_tag -lxml.tests.test_etree.ETreeOnlyTestCase.test_docinfo_name_only lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_docinfo_name_only -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_etree.ETreeOnlyTestCase.test_element_refcycle lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_element_refcycle -lxml.tests.test_etree.ETreeOnlyTestCase.test_include_paths lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_include_paths -lxml.tests.test_etree.ETreeOnlyTestCase.test_docinfo_empty lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_docinfo_empty -lxml.tests.test_etree.ETreeOnlyTestCase.test_namespaces_reuse_after_move lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_namespaces_reuse_after_move -lxml.tests.test_etree.ETreeOnlyTestCase.test_attribute_keeps_namespace_prefix_on_merge_with_nons lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_attribute_keeps_namespace_prefix_on_merge_with_nons -lxml.tests.test_etree.ETreeOnlyTestCase.test_deepcopy_pi lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_deepcopy_pi -lxml.tests.test_etree.ETreeOnlyTestCase.test_strip_tags_doc_style lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_strip_tags_doc_style -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterancestors_tag lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterancestors_tag -lxml.tests.test_etree.ETreeOnlyTestCase.test_dtd_io lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_dtd_io -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterancestors lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterancestors -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterwalk_tag_all lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterwalk_tag_all -lxml.tests.test_etree.ETreeOnlyTestCase.test_html_base lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_html_base -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterdescendants lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterdescendants -lxml.tests.test_etree.ETreeOnlyTestCase.test_dump_none lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_dump_none -lxml.tests.test_etree.ETreeOnlyTestCase.test_attribute_has_key lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_attribute_has_key -lxml.tests.test_etree.ETreeOnlyTestCase.test_nsmap_prefix_invalid lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_nsmap_prefix_invalid -lxml.tests.test_etree.ETreeOnlyTestCase.test_namespaces_elementtree lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_namespaces_elementtree -lxml.tests.test_etree.ETreeOnlyTestCase.test_getiterator_filter_multiple_tuple lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_getiterator_filter_multiple_tuple -lxml.tests.test_etree.ETreeOnlyTestCase.test_subelement_name_quote lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_subelement_name_quote -lxml.tests.test_etree.ETreeOnlyTestCase.test_pi_pseudo_attributes_get lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_pi_pseudo_attributes_get -lxml.tests.test_etree.ETreeOnlyTestCase.test_xml_base_attribute lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_xml_base_attribute -lxml.tests.test_etree.ETreeOnlyTestCase.test_getiterator_filter_all_comment_pi lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_getiterator_filter_all_comment_pi -lxml.tests.test_etree.ETreeOnlyTestCase.etree lxml.etree-module.html -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterparse_tag_ns_all lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_tag_ns_all -lxml.tests.test_etree.ETreeOnlyTestCase.test_pi_pseudo_attributes_attrib lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_pi_pseudo_attributes_attrib -lxml.tests.test_etree.ETreeOnlyTestCase.test_strip_elements_ns lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_strip_elements_ns -lxml.tests.test_etree.ETreeOnlyTestCase.test_XMLDTDID_no_id_dict lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_XMLDTDID_no_id_dict -lxml.tests.test_etree.ETreeOnlyTestCase.test_addnext lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addnext -lxml.tests.test_etree.ETreeOnlyTestCase.test_sourceline_iterparse_start lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_sourceline_iterparse_start -lxml.tests.test_etree.ETreeOnlyTestCase.test_parse_remove_pis lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parse_remove_pis -lxml.tests.test_etree.ETreeOnlyTestCase.test_namespace_cleanup_deep_to_top lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_namespace_cleanup_deep_to_top -lxml.tests.test_etree.ETreeOnlyTestCase.test_qname_text_resolve lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_qname_text_resolve -lxml.tests.test_etree.ETreeOnlyTestCase.test_comment_immutable lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_comment_immutable -lxml.tests.test_etree.ETreeOnlyTestCase.test_getnext lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_getnext -lxml.tests.test_etree.ETreeOnlyTestCase.test_parser_target_feed_exception lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parser_target_feed_exception -lxml.tests.test_etree.ETreeOnlyTestCase.test_qname_element lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_qname_element -lxml.tests.test_etree.ETreeOnlyTestCase.test_sourceline_parse lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_sourceline_parse -lxml.tests.test_etree.ETreeOnlyTestCase.test_cdata_tail lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_cdata_tail -lxml.tests.test_etree.ETreeOnlyTestCase.test_namespace_cleanup lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_namespace_cleanup -lxml.tests.test_etree.ETreeOnlyTestCase.test_feed_parser_recover_no_id_dict lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_feed_parser_recover_no_id_dict -lxml.tests.test_etree.ETreeOnlyTestCase.test_attribute_set_nonstring lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_attribute_set_nonstring -lxml.tests.test_etree.ETreeOnlyTestCase.test_html_prefix_nsmap lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_html_prefix_nsmap -lxml.tests.test_etree.ETreeOnlyTestCase.test_resolve_filename_dtd_relative lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_resolve_filename_dtd_relative -lxml.tests.test_etree.ETreeOnlyTestCase.test_element_nsmap lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_element_nsmap -lxml.tests.test_etree.ETreeOnlyTestCase.test_tostring_unicode_element lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tostring_unicode_element -lxml.tests.test_etree.ETreeOnlyTestCase.test_addnext_comment lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addnext_comment -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterwalk_clear lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterwalk_clear -lxml.tests.test_etree.ETreeOnlyTestCase.test_element_name_colon lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_element_name_colon -lxml.tests.test_etree.ETreeOnlyTestCase.test_replace_new lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_replace_new -lxml.tests.test_etree.ETreeOnlyTestCase.test_strip_tags_ns lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_strip_tags_ns -lxml.tests.test_etree.ETreeOnlyTestCase.test_attribute_values lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_attribute_values -lxml.tests.test_etree.ETreeOnlyTestCase.test_addprevious_root_pi lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addprevious_root_pi -lxml.tests.test_etree.ETreeOnlyTestCase.test_findall_syntax_error lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_findall_syntax_error -lxml.tests.test_etree.ETreeOnlyTestCase.test_namespaces_default lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_namespaces_default -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterparse_broken_recover lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_broken_recover -lxml.tests.test_etree.ETreeOnlyTestCase.test_XMLDTDID lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_XMLDTDID -lxml.tests.test_etree.ETreeOnlyTestCase.test_getiterator_filter_local_name lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_getiterator_filter_local_name -lxml.tests.test_etree.ETreeOnlyTestCase.test_tostring_method_text_encoding lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tostring_method_text_encoding -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_etree.ETreeOnlyTestCase.test_XMLDTDID_empty lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_XMLDTDID_empty -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterchildren_tag_posarg lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterchildren_tag_posarg -lxml.tests.test_etree.ETreeOnlyTestCase.test_strip_attributes_ns lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_strip_attributes_ns -lxml.tests.test_etree.ETreeOnlyTestCase.test_elementtree_getelementpath_ns lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_elementtree_getelementpath_ns -lxml.tests.test_etree.ETreeOnlyTestCase.test_c_api lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_c_api -lxml.tests.test_etree.ETreeOnlyTestCase.test_parse_stringio_base_url lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parse_stringio_base_url -lxml.tests.test_etree.ETreeOnlyTestCase.test_parser_encoding lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parser_encoding -lxml.tests.test_etree.ETreeOnlyTestCase.test_namespaces_default_and_other lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_namespaces_default_and_other -lxml.tests.test_etree.ETreeOnlyTestCase.test_unicode_byte_invalid lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_unicode_byte_invalid -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterwalk lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterwalk -lxml.tests.test_etree.ETreeOnlyTestCase.test_prefix_default_ns lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_prefix_default_ns -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterchildren_tag_multiple lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterchildren_tag_multiple -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterwalk_start_end_tags_with_root lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterwalk_start_end_tags_with_root -lxml.tests.test_etree.ETreeOnlyTestCase.test_index lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_index -lxml.tests.test_etree.ETreeOnlyTestCase.test_element_name_quote lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_element_name_quote -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterancestors_tag_multiple lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterancestors_tag_multiple -lxml.tests.test_etree.ETreeOnlyTestCase.test_byte_invalid lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_byte_invalid -lxml.tests.test_etree.ETreeOnlyTestCase.test_setslice_step lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_setslice_step -lxml.tests.test_etree.ETreeOnlyTestCase.test_tostring_standalone_in_out lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tostring_standalone_in_out -lxml.tests.test_etree.ETreeOnlyTestCase.test_resolve_bytes_dtd lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_resolve_bytes_dtd -lxml.tests.test_etree.ETreeOnlyTestCase.test_elementtree_findall_ns_qname lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_elementtree_findall_ns_qname -lxml.tests.test_etree.ETreeOnlyTestCase.test_large_sourceline_XML lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_large_sourceline_XML -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterchildren_tag_multiple_posarg lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterchildren_tag_multiple_posarg -lxml.tests.test_etree.ETreeOnlyTestCase.test_xml_base lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_xml_base -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterwalk_start lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterwalk_start -lxml.tests.test_etree.ETreeOnlyTestCase.test_addnext_root_pi lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addnext_root_pi -lxml.tests.test_etree.ETreeOnlyTestCase.test_parser_target_pi lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parser_target_pi -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterwalk_start_end lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterwalk_start_end -lxml.tests.test_etree.ETreeOnlyTestCase.test_parseid lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parseid -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterparse_strip lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_strip -lxml.tests.test_etree.ETreeOnlyTestCase.test_html_base_tag lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_html_base_tag -lxml.tests.test_etree.ETreeOnlyTestCase.test_cdata_type lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_cdata_type -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterparse_remove_comments lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_remove_comments -lxml.tests.test_etree.ETreeOnlyTestCase.test_tostring_with_tail lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tostring_with_tail -lxml.tests.test_etree.ETreeOnlyTestCase.test_getiterator_filter_element lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_getiterator_filter_element -lxml.tests.test_etree.ETreeOnlyTestCase.test_strip_tags_and_remove lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_strip_tags_and_remove -lxml.tests.test_etree.ETreeOnlyTestCase.test_entity_error lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_entity_error -lxml.tests.test_etree.ETreeOnlyTestCase.test_itersiblings_tag_multiple lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_itersiblings_tag_multiple -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterdescendants_tag_multiple lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterdescendants_tag_multiple -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterparse_encoding_8bit_override lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_encoding_8bit_override -lxml.tests.test_etree.ETreeOnlyTestCase.test_strip_tags lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_strip_tags -lxml.tests.test_etree.ETreeOnlyTestCase.test_strip_elements lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_strip_elements -lxml.tests.test_etree.ETreeOnlyTestCase.test_tostring_method_html_with_tail lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tostring_method_html_with_tail -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterchildren lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterchildren -lxml.tests.test_etree.ETreeOnlyTestCase.test_pi_parse lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_pi_parse -lxml.tests.test_etree.ETreeOnlyTestCase.test_deepcopy_pi_dtd lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_deepcopy_pi_dtd -lxml.tests.test_etree.ETreeOnlyTestCase.test_tounicode_element_tail lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tounicode_element_tail -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterparse_pis lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_pis -lxml.tests.test_etree.ETreeOnlyTestCase.test_comment_no_proxy_yet lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_comment_no_proxy_yet -lxml.tests.test_etree.ETreeOnlyTestCase.test_qname_space lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_qname_space -lxml.tests.test_etree.ETreeOnlyTestCase.test_doctype_name_only_roundtrip lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_doctype_name_only_roundtrip -lxml.tests.test_etree.ETreeOnlyTestCase.test_namespace_cleanup_keep_prefixes lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_namespace_cleanup_keep_prefixes -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterwalk_ns_skip lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterwalk_ns_skip -lxml.tests.test_etree.ETreeOnlyTestCase.test_setslice_all_empty_reversed lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_setslice_all_empty_reversed -lxml.tests.test_etree.ETreeOnlyTestCase.test_sourceline_XML lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_sourceline_XML -lxml.tests.test_etree.ETreeOnlyTestCase.test_proxy_collect_siblings lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_proxy_collect_siblings -lxml.tests.test_etree.ETreeOnlyTestCase.test_namespaces_default_and_attr lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_namespaces_default_and_attr -lxml.tests.test_etree.ETreeOnlyTestCase.test_itersiblings lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_itersiblings -lxml.tests.test_etree.ETreeOnlyTestCase.test_namespace_cleanup_attributes lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_namespace_cleanup_attributes -lxml.tests.test_etree.ETreeOnlyTestCase.test_attribute_set lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_attribute_set -lxml.tests.test_etree.ETreeOnlyTestCase.test_getroottree lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_getroottree -lxml.tests.test_etree.ETreeOnlyTestCase.test_tostring_unicode_none lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tostring_unicode_none -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterparse_tree_comments lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_tree_comments -lxml.tests.test_etree.ETreeOnlyTestCase.test_addprevious_pi lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addprevious_pi -lxml.tests.test_etree.ETreeOnlyTestCase.test_elementtree_findall_qname lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_elementtree_findall_qname -lxml.tests.test_etree.ETreeOnlyTestCase.test_getiterator_filter_namespace lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_getiterator_filter_namespace -lxml.tests.test_etree.ETreeOnlyTestCase.test_cdata_parser lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_cdata_parser -lxml.tests.test_etree.ETreeOnlyTestCase.test_docinfo_system lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_docinfo_system -lxml.tests.test_etree.ETreeOnlyTestCase.test_namespaces lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_namespaces -lxml.tests.test_etree.ETreeOnlyTestCase.test_qname_colon lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_qname_colon -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterparse_tag_ns_empty lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_tag_ns_empty -lxml.tests.test_etree.ETreeOnlyTestCase.test_unicode_byte_zero lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_unicode_byte_zero -lxml.tests.test_etree.ETreeOnlyTestCase.test_proxy_collect_siblings_text lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_proxy_collect_siblings_text -lxml.tests.test_etree.ETreeOnlyTestCase.test_namespace_cleanup_deep lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_namespace_cleanup_deep -lxml.tests.test_etree.ETreeOnlyTestCase.test_subelement_name_colon lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_subelement_name_colon -lxml.tests.test_etree.ETreeOnlyTestCase.test_tounicode_none lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tounicode_none -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -lxml.tests.test_etree.ETreeOnlyTestCase.test_XML_base_url_docinfo lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_XML_base_url_docinfo -lxml.tests.test_etree.ETreeOnlyTestCase.test_parse_remove_comments lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parse_remove_comments -lxml.tests.test_etree.ETreeOnlyTestCase.test_setslice_step_negative lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_setslice_step_negative -lxml.tests.test_etree.ETreeOnlyTestCase.test_getiterator_filter_multiple lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_getiterator_filter_multiple -lxml.tests.test_etree.ETreeOnlyTestCase.test_addprevious_comment lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addprevious_comment -lxml.tests.test_etree.ETreeOnlyTestCase.test_feed_parser_recover lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_feed_parser_recover -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterchildren_reversed lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterchildren_reversed -lxml.tests.test_etree.ETreeOnlyTestCase.test_version lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_version -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterwalk_start_end_tags lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterwalk_start_end_tags -lxml.tests.test_etree.ETreeOnlyTestCase.test_namespace_cleanup_keep_prefixes_top lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_namespace_cleanup_keep_prefixes_top -lxml.tests.test_etree.ETreeOnlyTestCase.test_entity_restructure lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_entity_restructure -lxml.tests.test_etree.ETreeOnlyTestCase.test_addprevious_cycle lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addprevious_cycle -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterchildren_tag lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterchildren_tag -lxml.tests.test_etree.ETreeOnlyTestCase.test_attribute_gets_namespace_prefix_on_merge_with_nons lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_attribute_gets_namespace_prefix_on_merge_with_nons -lxml.tests.test_etree.ETreeOnlyTestCase.test_addnext_pi lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addnext_pi -lxml.tests.test_etree.ETreeOnlyTestCase.test_deepcopy_elementtree_pi lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_deepcopy_elementtree_pi -lxml.tests.test_etree.ETreeOnlyTestCase.test_elementtree_getelementpath lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_elementtree_getelementpath -lxml.tests.test_etree.ETreeOnlyTestCase.test_tostring_standalone lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tostring_standalone -lxml.tests.test_etree.ETreeOnlyTestCase.test_addnext_root_comment lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addnext_root_comment -lxml.tests.test_etree.ETreeOnlyTestCase.test_parser_target_comment lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parser_target_comment -lxml.tests.test_etree.ETreeOnlyTestCase.test_tostring_unicode_element_tail lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tostring_unicode_element_tail -lxml.tests.test_etree.ETreeOnlyTestCase.test_qname_empty lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_qname_empty -lxml.tests.test_etree.ETreeOnlyTestCase.test_replace lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_replace -lxml.tests.test_etree.ETreeOnlyTestCase.test_addnext_noops lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addnext_noops -lxml.tests.test_etree.ETreeOnlyTestCase.test_comment_immutable_attrib lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_comment_immutable_attrib -lxml.tests.test_etree.ETreeOnlyTestCase.test_elementtree_parser_target_type_error lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_elementtree_parser_target_type_error -lxml.tests.test_etree.ETreeOnlyTestCase.test_qname_none lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_qname_none -lxml.tests.test_etree.ETreeOnlyTestCase.test_qname_namespace_localname lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_qname_namespace_localname -lxml.tests.test_etree.ETreeOnlyTestCase.test_attribute_set_invalid lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_attribute_set_invalid -lxml.tests.test_etree.ETreeOnlyTestCase.test_subelement_nsmap lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_subelement_nsmap -lxml.tests.test_etree.ETreeOnlyTestCase.test_append_recursive_error lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_append_recursive_error -lxml.tests.test_etree.ETreeOnlyTestCase.test_parse_base_url_docinfo lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parse_base_url_docinfo -lxml.tests.test_etree.ETreeOnlyTestCase.test_resolve_error lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_resolve_error -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterwalk_attrib_ns lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterwalk_attrib_ns -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterwalk_tag lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterwalk_tag -lxml.tests.test_etree.ETreeOnlyTestCase.test_tounicode_pretty lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tounicode_pretty -lxml.tests.test_etree.ETreeOnlyTestCase.test_tostring_pretty lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tostring_pretty -lxml.tests.test_etree.ETreeOnlyTestCase.test_strip_tags_pi_comment lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_strip_tags_pi_comment -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterparse_broken_multi_recover lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_broken_multi_recover -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterparse_keep_cdata lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_keep_cdata -lxml.tests.test_etree.ETreeOnlyTestCase.test_addprevious_noops lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addprevious_noops -lxml.tests.test_etree.ETreeOnlyTestCase.test_attrib_order lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_attrib_order -lxml.tests.test_etree.ETreeOnlyTestCase.test_tostring_unicode lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tostring_unicode -lxml.tests.test_etree.ETreeOnlyTestCase.test_setslice_step_negative2 lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_setslice_step_negative2 -lxml.tests.test_etree.ETreeOnlyTestCase.test_parser_target_fromstring_exception lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parser_target_fromstring_exception -lxml.tests.test_etree.ETreeOnlyTestCase.test_entity_values lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_entity_values -lxml.tests.test_etree.ETreeOnlyTestCase.test_subelement_attribute_invalid lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_subelement_attribute_invalid -lxml.tests.test_etree.ETreeOnlyTestCase.test_namespaces_copy_element lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_namespaces_copy_element -lxml.tests.test_etree.ETreeOnlyTestCase.test_parser_encoding_unknown lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parser_encoding_unknown -lxml.tests.test_etree.ETreeOnlyTestCase.test_namespaces_default_copy_element lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_namespaces_default_copy_element -lxml.tests.test_etree.ETreeOnlyTestCase.test_element_name_empty lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_element_name_empty -lxml.tests.test_etree.ETreeOnlyTestCase.test_tostring_method_text_unicode lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tostring_method_text_unicode -lxml.tests.test_etree.ETreeOnlyTestCase.test_parser_target_recover lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parser_target_recover -lxml.tests.test_etree.ETreeOnlyTestCase.test_deepcopy_elementtree_dtd lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_deepcopy_elementtree_dtd -lxml.tests.test_etree.ETreeOnlyTestCase.test_sourceline_element lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_sourceline_element -lxml.tests.test_etree.ETreeOnlyTestCase.test_cdata_xpath lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_cdata_xpath -lxml.tests.test_etree.ETreeOnlyTestCase.test_parser_target_feed_no_id_dict lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_parser_target_feed_no_id_dict -lxml.tests.test_etree.ETreeOnlyTestCase.test_elementtree_find_qname lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_elementtree_find_qname -lxml.tests.test_etree.ETreeOnlyTestCase.test_getiterator_filter_entities lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_getiterator_filter_entities -lxml.tests.test_etree.ETreeOnlyTestCase.test_findall_different_nsmaps lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_findall_different_nsmaps -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterparse_encoding_error lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_encoding_error -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterparse_tag_ns_empty_all lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_tag_ns_empty_all -lxml.tests.test_etree.ETreeOnlyTestCase.test_docinfo_public lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_docinfo_public -lxml.tests.test_etree.ETreeOnlyTestCase.test_resolve_empty lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_resolve_empty -lxml.tests.test_etree.ETreeOnlyTestCase.test_attrib_and_keywords lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_attrib_and_keywords -lxml.tests.test_etree.ETreeOnlyTestCase.test_getprevious lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_getprevious -lxml.tests.test_etree.ETreeOnlyTestCase.test_tounicode lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_tounicode -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterparse_comments lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_comments -lxml.tests.test_etree.ETreeOnlyTestCase.test_entity_append lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_entity_append -lxml.tests.test_etree.ETreeOnlyTestCase.test_HTML_base_url_docinfo lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_HTML_base_url_docinfo -lxml.tests.test_etree.ETreeOnlyTestCase.test_subelement_name_space lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_subelement_name_space -lxml.tests.test_etree.ETreeOnlyTestCase.test_prefix lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_prefix -lxml.tests.test_etree.ETreeOnlyTestCase._checkIDDict lxml.tests.test_etree.ETreeOnlyTestCase-class.html#_checkIDDict -lxml.tests.test_etree.ETreeOnlyTestCase.test_findall_empty_prefix lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_findall_empty_prefix -lxml.tests.test_etree.ETreeOnlyTestCase.test_resolve_file_dtd lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_resolve_file_dtd -lxml.tests.test_etree.ETreeOnlyTestCase.test_entity_parse lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_entity_parse -lxml.tests.test_etree.ETreeOnlyTestCase.test_resolve_filename_dtd lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_resolve_filename_dtd -lxml.tests.test_etree.ETreeOnlyTestCase.test_pypy_proxy_collect lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_pypy_proxy_collect -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterparse_tag_all lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterparse_tag_all -lxml.tests.test_etree.ETreeOnlyTestCase.test_attribute_keeps_namespace_prefix_on_merge lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_attribute_keeps_namespace_prefix_on_merge -lxml.tests.test_etree.ETreeOnlyTestCase.test_addprevious_root_comment lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_addprevious_root_comment -lxml.tests.test_etree.ETreeOnlyTestCase.test_namespace_cleanup_many lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_namespace_cleanup_many -lxml.tests.test_etree.ETreeOnlyTestCase.test_pi lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_pi -lxml.tests.test_etree.ETreeOnlyTestCase.test_iterwalk_start_tags lxml.tests.test_etree.ETreeOnlyTestCase-class.html#test_iterwalk_start_tags -lxml.tests.test_etree.ETreeWriteTestCase lxml.tests.test_etree.ETreeWriteTestCase-class.html -lxml.tests.test_etree.ETreeWriteTestCase.test_write_file_gzipfile_parse lxml.tests.test_etree.ETreeWriteTestCase-class.html#test_write_file_gzipfile_parse -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_etree.ETreeWriteTestCase.test_write lxml.tests.test_etree.ETreeWriteTestCase-class.html#test_write -lxml.tests.test_etree.ETreeWriteTestCase.test_write_gzip lxml.tests.test_etree.ETreeWriteTestCase-class.html#test_write_gzip -lxml.tests.test_etree.ETreeWriteTestCase.test_write_doctype lxml.tests.test_etree.ETreeWriteTestCase-class.html#test_write_doctype -lxml.tests.test_etree.ETreeWriteTestCase.test_write_file_gzip_parse lxml.tests.test_etree.ETreeWriteTestCase-class.html#test_write_file_gzip_parse -lxml.tests.test_etree.ETreeWriteTestCase.test_write_file lxml.tests.test_etree.ETreeWriteTestCase-class.html#test_write_file -lxml.tests.test_etree.ETreeWriteTestCase.test_write_gzip_level lxml.tests.test_etree.ETreeWriteTestCase-class.html#test_write_gzip_level -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_etree.ETreeWriteTestCase.test_write_file_gzip lxml.tests.test_etree.ETreeWriteTestCase-class.html#test_write_file_gzip -lxml.tests.test_etree.ETreeWriteTestCase.test_write_gzip_doctype lxml.tests.test_etree.ETreeWriteTestCase-class.html#test_write_gzip_doctype -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_etree.ETreeXIncludeTestCase lxml.tests.test_etree.ETreeXIncludeTestCase-class.html -lxml.tests.test_etree._XIncludeTestCase.test_xinclude_resolver_recursive lxml.tests.test_etree._XIncludeTestCase-class.html#test_xinclude_resolver_recursive -lxml.tests.test_etree.ETreeXIncludeTestCase.include lxml.tests.test_etree.ETreeXIncludeTestCase-class.html#include -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_etree._XIncludeTestCase.test_xinclude lxml.tests.test_etree._XIncludeTestCase-class.html#test_xinclude -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_etree._XIncludeTestCase.test_xinclude_resolver lxml.tests.test_etree._XIncludeTestCase-class.html#test_xinclude_resolver -lxml.tests.test_etree._XIncludeTestCase.test_xinclude_text lxml.tests.test_etree._XIncludeTestCase-class.html#test_xinclude_text -lxml.tests.test_etree.ElementIncludeTestCase lxml.tests.test_etree.ElementIncludeTestCase-class.html -lxml.tests.test_etree._XIncludeTestCase.test_xinclude_resolver_recursive lxml.tests.test_etree._XIncludeTestCase-class.html#test_xinclude_resolver_recursive -lxml.tests.test_etree.ElementIncludeTestCase.include lxml.tests.test_etree.ElementIncludeTestCase-class.html#include -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_etree.ElementIncludeTestCase.ElementInclude lxml.ElementInclude-module.html -lxml.tests.test_etree._XIncludeTestCase.test_xinclude lxml.tests.test_etree._XIncludeTestCase-class.html#test_xinclude -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_etree._XIncludeTestCase.test_xinclude_resolver lxml.tests.test_etree._XIncludeTestCase-class.html#test_xinclude_resolver -lxml.tests.test_etree._XIncludeTestCase.test_xinclude_text lxml.tests.test_etree._XIncludeTestCase-class.html#test_xinclude_text -lxml.tests.test_etree.XMLPullParserTest lxml.tests.test_etree.XMLPullParserTest-class.html -lxml.tests.test_etree.XMLPullParserTest.etree lxml.etree-module.html -lxml.tests.test_etree.XMLPullParserTest.test_pull_from_tree_builder lxml.tests.test_etree.XMLPullParserTest-class.html#test_pull_from_tree_builder -lxml.tests.test_etree.XMLPullParserTest.test_pull_from_simple_target lxml.tests.test_etree.XMLPullParserTest-class.html#test_pull_from_simple_target -lxml.tests.test_etree.XMLPullParserTest.test_pull_from_tree_builder_subclass lxml.tests.test_etree.XMLPullParserTest-class.html#test_pull_from_tree_builder_subclass -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_etree.XMLPullParserTest.test_pull_from_simple_target_start_end lxml.tests.test_etree.XMLPullParserTest-class.html#test_pull_from_simple_target_start_end -lxml.tests.test_etree.XMLPullParserTest.assert_event_tags lxml.tests.test_etree.XMLPullParserTest-class.html#assert_event_tags -lxml.tests.test_etree._XIncludeTestCase lxml.tests.test_etree._XIncludeTestCase-class.html -lxml.tests.test_etree._XIncludeTestCase.test_xinclude_resolver_recursive lxml.tests.test_etree._XIncludeTestCase-class.html#test_xinclude_resolver_recursive -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_etree._XIncludeTestCase.test_xinclude lxml.tests.test_etree._XIncludeTestCase-class.html#test_xinclude -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_etree._XIncludeTestCase.test_xinclude_resolver lxml.tests.test_etree._XIncludeTestCase-class.html#test_xinclude_resolver -lxml.tests.test_etree._XIncludeTestCase.test_xinclude_text lxml.tests.test_etree._XIncludeTestCase-class.html#test_xinclude_text -lxml.tests.test_external_document.ExternalDocumentTestCase lxml.tests.test_external_document.ExternalDocumentTestCase-class.html -lxml.tests.test_external_document.ExternalDocumentTestCase.as_capsule lxml.tests.test_external_document.ExternalDocumentTestCase-class.html#as_capsule -lxml.tests.test_external_document.ExternalDocumentTestCase.test_external_document_adoption lxml.tests.test_external_document.ExternalDocumentTestCase-class.html#test_external_document_adoption -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_external_document.ExternalDocumentTestCase.setUp lxml.tests.test_external_document.ExternalDocumentTestCase-class.html#setUp -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_htmlparser.HtmlParserTestCase lxml.tests.test_htmlparser.HtmlParserTestCase-class.html -lxml.tests.test_htmlparser.HtmlParserTestCase.test_module_HTML_broken lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_module_HTML_broken -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html_element_name_quote lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html_element_name_quote -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html_parser_target_doctype_empty lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html_parser_target_doctype_empty -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html_iterparse_broken lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html_iterparse_broken -lxml.tests.test_htmlparser.HtmlParserTestCase.test_module_parse_html_norecover lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_module_parse_html_norecover -lxml.tests.test_htmlparser.HtmlParserTestCase.test_boolean_attribute_xml_adds_empty_string lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_boolean_attribute_xml_adds_empty_string -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html_subelement_name_space lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html_subelement_name_space -lxml.tests.test_htmlparser.HtmlParserTestCase.etree lxml.etree-module.html -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html_parser_target_exceptions lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html_parser_target_exceptions -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html_fromstring_target_exceptions lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html_fromstring_target_exceptions -lxml.tests.test_htmlparser.HtmlParserTestCase.test_default_parser_HTML_broken lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_default_parser_HTML_broken -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html_parser_target_doctype_html_full lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html_parser_target_doctype_html_full -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html_element_name_colon lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html_element_name_colon -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html_subelement_name_quote lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html_subelement_name_quote -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html_feed_parser lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html_feed_parser -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html_iterparse lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html_iterparse -lxml.tests.test_htmlparser.HtmlParserTestCase.test_boolean_attribute lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_boolean_attribute -lxml.tests.test_htmlparser.HtmlParserTestCase.test_set_decl_html lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_set_decl_html -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html_feed_parser_more_tags lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html_feed_parser_more_tags -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html_iterparse_start lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html_iterparse_start -lxml.tests.test_htmlparser.HtmlParserTestCase.tearDown lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#tearDown -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html_subelement_name_colon lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html_subelement_name_colon -lxml.tests.test_htmlparser.HtmlParserTestCase.uhtml_str lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#uhtml_str -lxml.tests.test_htmlparser.HtmlParserTestCase.test_module_HTML_pretty_print lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_module_HTML_pretty_print -lxml.tests.test_htmlparser.HtmlParserTestCase.test_module_HTML_unicode lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_module_HTML_unicode -lxml.tests.test_htmlparser.HtmlParserTestCase.test_parse_encoding_8bit_override lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_parse_encoding_8bit_override -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html_ids lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html_ids -lxml.tests.test_htmlparser.HtmlParserTestCase.test_parse_encoding_8bit_explicit lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_parse_encoding_8bit_explicit -lxml.tests.test_htmlparser.HtmlParserTestCase.test_module_HTML lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_module_HTML -lxml.tests.test_htmlparser.HtmlParserTestCase.test_module_parse_html_error lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_module_parse_html_error -lxml.tests.test_htmlparser.HtmlParserTestCase.test_module_HTML_cdata lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_module_HTML_cdata -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html_parser_target_tag lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html_parser_target_tag -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_htmlparser.HtmlParserTestCase.html_str_pretty lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#html_str_pretty -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html5_doctype lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html5_doctype -lxml.tests.test_htmlparser.HtmlParserTestCase.test_module_HTML_access lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_module_HTML_access -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html_element_name_empty lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html_element_name_empty -lxml.tests.test_htmlparser.HtmlParserTestCase.test_ietf_decl lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_ietf_decl -lxml.tests.test_htmlparser.HtmlParserTestCase.broken_html_str lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#broken_html_str -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_htmlparser.HtmlParserTestCase.test_module_parse_html_filelike lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_module_parse_html_filelike -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html_subelement_name_empty lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html_subelement_name_empty -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html_parser_target_doctype_html lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html_parser_target_doctype_html -lxml.tests.test_htmlparser.HtmlParserTestCase.test_module_parse_html lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_module_parse_html -lxml.tests.test_htmlparser.HtmlParserTestCase.test_boolean_attribute_round_trip lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_boolean_attribute_round_trip -lxml.tests.test_htmlparser.HtmlParserTestCase.test_wide_unicode_xml lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_wide_unicode_xml -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html_file_error lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html_file_error -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html_ids_no_collect_ids lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html_ids_no_collect_ids -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html_iterparse_broken_no_recover lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html_iterparse_broken_no_recover -lxml.tests.test_htmlparser.HtmlParserTestCase.html_str lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#html_str -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html_iterparse_stop_short lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html_iterparse_stop_short -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html_iterparse_file lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html_iterparse_file -lxml.tests.test_htmlparser.HtmlParserTestCase.test_module_parse_html_default_doctype lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_module_parse_html_default_doctype -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html_feed_parser_chunky lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html_feed_parser_chunky -lxml.tests.test_htmlparser.HtmlParserTestCase.test_html_element_name_space lxml.tests.test_htmlparser.HtmlParserTestCase-class.html#test_html_element_name_space -lxml.tests.test_http_io.HttpIOTestCase lxml.tests.test_http_io.HttpIOTestCase-class.html -lxml.tests.test_http_io.HttpIOTestCase.etree lxml.etree-module.html -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_http_io.HttpIOTestCase._parse_from_http lxml.tests.test_http_io.HttpIOTestCase-class.html#_parse_from_http -lxml.tests.test_http_io.HttpIOTestCase.test_http_client lxml.tests.test_http_io.HttpIOTestCase-class.html#test_http_client -lxml.tests.test_http_io.HttpIOTestCase.test_network_dtd lxml.tests.test_http_io.HttpIOTestCase-class.html#test_network_dtd -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_http_io.HttpIOTestCase.test_http_client_404 lxml.tests.test_http_io.HttpIOTestCase-class.html#test_http_client_404 -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -lxml.tests.test_http_io.HttpIOTestCase.test_http_client_gzip lxml.tests.test_http_io.HttpIOTestCase-class.html#test_http_client_gzip -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_http_io.HttpIOTestCase.test_parser_input_mix lxml.tests.test_http_io.HttpIOTestCase-class.html#test_parser_input_mix -lxml.tests.test_incremental_xmlfile.AsyncXmlFileTestCase lxml.tests.test_incremental_xmlfile.AsyncXmlFileTestCase-class.html -lxml.tests.test_incremental_xmlfile.AsyncXmlFileTestCase.test_async lxml.tests.test_incremental_xmlfile.AsyncXmlFileTestCase-class.html#test_async -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_incremental_xmlfile.AsyncXmlFileTestCase._run_async lxml.tests.test_incremental_xmlfile.AsyncXmlFileTestCase-class.html#_run_async -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_incremental_xmlfile.AsyncXmlFileTestCase.test_async_api lxml.tests.test_incremental_xmlfile.AsyncXmlFileTestCase-class.html#test_async_api -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_incremental_xmlfile.BytesIOXmlFileTestCase lxml.tests.test_incremental_xmlfile.BytesIOXmlFileTestCase-class.html -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase._parse_file lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#_parse_file -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase._file lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#_file -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_failure_trailing_text lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_failure_trailing_text -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_nested_default_namespace_and_other lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_nested_default_namespace_and_other -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_generator_close_continues_closing lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_generator_close_continues_closing -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_non_io_exception_continues_closing lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_non_io_exception_continues_closing -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_escaping lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_escaping -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.tearDown lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#tearDown -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_default_namespace lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_default_namespace -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_write_Element_repeatedly lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_write_Element_repeatedly -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element_nested_with_text lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element_nested_with_text -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_encoding lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_encoding -lxml.tests.test_incremental_xmlfile.BytesIOXmlFileTestCase.setUp lxml.tests.test_incremental_xmlfile.BytesIOXmlFileTestCase-class.html#setUp -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element_write_text lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element_write_text -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_closing_out_of_order_in_error_case lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_closing_out_of_order_in_error_case -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase._read_file lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#_read_file -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_attribute_extra_duplicate lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_attribute_extra_duplicate -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_attribute lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_attribute -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_failure_trailing_Element lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_failure_trailing_Element -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_attribute_extra lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_attribute_extra -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_namespace_nested_nsmap lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_namespace_nested_nsmap -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_comment lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_comment -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element_nested lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element_nested -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_namespace_nsmap lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_namespace_nsmap -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_failure_preceding_text lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_failure_preceding_text -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_write_Element lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_write_Element -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_namespace_nested_anonymous lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_namespace_nested_anonymous -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.assertXml lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#assertXml -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element_write_empty lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element_write_empty -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -lxml.tests.test_incremental_xmlfile.BytesIOXmlFileTestCase.test_filelike_close lxml.tests.test_incremental_xmlfile.BytesIOXmlFileTestCase-class.html#test_filelike_close -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_flush lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_flush -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_buffering lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_buffering -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_nested_default_namespace lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_nested_default_namespace -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_anonymous_namespace lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_anonymous_namespace -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_pi lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_pi -lxml.tests.test_incremental_xmlfile.HtmlFileTestCase lxml.tests.test_incremental_xmlfile.HtmlFileTestCase-class.html -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase._parse_file lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#_parse_file -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase._file lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#_file -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_failure_trailing_text lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_failure_trailing_text -lxml.tests.test_incremental_xmlfile.HtmlFileTestCase.test_open_namespaced_element lxml.tests.test_incremental_xmlfile.HtmlFileTestCase-class.html#test_open_namespaced_element -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_nested_default_namespace_and_other lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_nested_default_namespace_and_other -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_generator_close_continues_closing lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_generator_close_continues_closing -lxml.tests.test_incremental_xmlfile.HtmlFileTestCase.test_write_namespaced_element lxml.tests.test_incremental_xmlfile.HtmlFileTestCase-class.html#test_write_namespaced_element -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_non_io_exception_continues_closing lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_non_io_exception_continues_closing -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_escaping lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_escaping -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.tearDown lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#tearDown -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_default_namespace lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_default_namespace -lxml.tests.test_incremental_xmlfile.HtmlFileTestCase.test_write_declaration lxml.tests.test_incremental_xmlfile.HtmlFileTestCase-class.html#test_write_declaration -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_write_Element_repeatedly lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_write_Element_repeatedly -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element_nested_with_text lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element_nested_with_text -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_encoding lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_encoding -lxml.tests.test_incremental_xmlfile.HtmlFileTestCase.setUp lxml.tests.test_incremental_xmlfile.HtmlFileTestCase-class.html#setUp -lxml.tests.test_incremental_xmlfile.HtmlFileTestCase.test_void_elements lxml.tests.test_incremental_xmlfile.HtmlFileTestCase-class.html#test_void_elements -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element_write_text lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element_write_text -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_closing_out_of_order_in_error_case lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_closing_out_of_order_in_error_case -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase._read_file lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#_read_file -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_attribute_extra_duplicate lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_attribute_extra_duplicate -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_attribute lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_attribute -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_failure_trailing_Element lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_failure_trailing_Element -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_attribute_extra lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_attribute_extra -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_comment lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_comment -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element_nested lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element_nested -lxml.tests.test_incremental_xmlfile.HtmlFileTestCase.test_method_context_manager_misuse lxml.tests.test_incremental_xmlfile.HtmlFileTestCase-class.html#test_method_context_manager_misuse -lxml.tests.test_incremental_xmlfile.HtmlFileTestCase.test_xml_mode_write_inside_html lxml.tests.test_incremental_xmlfile.HtmlFileTestCase-class.html#test_xml_mode_write_inside_html -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_incremental_xmlfile.HtmlFileTestCase.test_unescaped_script lxml.tests.test_incremental_xmlfile.HtmlFileTestCase-class.html#test_unescaped_script -lxml.tests.test_incremental_xmlfile.HtmlFileTestCase.test_unescaped_script_incremental lxml.tests.test_incremental_xmlfile.HtmlFileTestCase-class.html#test_unescaped_script_incremental -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_namespace_nsmap lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_namespace_nsmap -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_failure_preceding_text lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_failure_preceding_text -lxml.tests.test_incremental_xmlfile.HtmlFileTestCase.test_attribute_quoting_unicode lxml.tests.test_incremental_xmlfile.HtmlFileTestCase-class.html#test_attribute_quoting_unicode -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_write_Element lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_write_Element -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_namespace_nested_nsmap lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_namespace_nested_nsmap -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_namespace_nested_anonymous lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_namespace_nested_anonymous -lxml.tests.test_incremental_xmlfile.HtmlFileTestCase.test_xml_mode_element_inside_html lxml.tests.test_incremental_xmlfile.HtmlFileTestCase-class.html#test_xml_mode_element_inside_html -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.assertXml lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#assertXml -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element_write_empty lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element_write_empty -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_incremental_xmlfile.HtmlFileTestCase.test_attribute_quoting lxml.tests.test_incremental_xmlfile.HtmlFileTestCase-class.html#test_attribute_quoting -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_flush lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_flush -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_buffering lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_buffering -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_nested_default_namespace lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_nested_default_namespace -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_anonymous_namespace lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_anonymous_namespace -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_pi lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_pi -lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase-class.html -lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase._parse_file lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase-class.html#_parse_file -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase._file lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#_file -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_failure_trailing_text lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_failure_trailing_text -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_nested_default_namespace_and_other lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_nested_default_namespace_and_other -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_generator_close_continues_closing lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_generator_close_continues_closing -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_non_io_exception_continues_closing lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_non_io_exception_continues_closing -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_escaping lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_escaping -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.tearDown lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#tearDown -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_default_namespace lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_default_namespace -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_write_Element_repeatedly lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_write_Element_repeatedly -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element_nested_with_text lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element_nested_with_text -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_encoding lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_encoding -lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase.setUp lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase-class.html#setUp -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element_write_text lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element_write_text -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_closing_out_of_order_in_error_case lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_closing_out_of_order_in_error_case -lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase._read_file lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase-class.html#_read_file -lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase.test_write_fails lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase-class.html#test_write_fails -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_attribute_extra_duplicate lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_attribute_extra_duplicate -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_attribute lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_attribute -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_failure_trailing_Element lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_failure_trailing_Element -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_attribute_extra lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_attribute_extra -lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase.test_filelike_not_closing lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase-class.html#test_filelike_not_closing -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_comment lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_comment -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element_nested lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element_nested -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_namespace_nsmap lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_namespace_nsmap -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_failure_preceding_text lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_failure_preceding_text -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_write_Element lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_write_Element -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_namespace_nested_nsmap lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_namespace_nested_nsmap -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_namespace_nested_anonymous lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_namespace_nested_anonymous -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.assertXml lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#assertXml -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element_write_empty lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element_write_empty -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase.test_filelike_close lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase-class.html#test_filelike_close -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_flush lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_flush -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_buffering lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_buffering -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_nested_default_namespace lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_nested_default_namespace -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_anonymous_namespace lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_anonymous_namespace -lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase.SimpleFileLike lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase.SimpleFileLike-class.html -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_pi lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_pi -lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase.SimpleFileLike lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase.SimpleFileLike-class.html -lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase.SimpleFileLike.close lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase.SimpleFileLike-class.html#close -lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase.SimpleFileLike.__init__ lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase.SimpleFileLike-class.html#__init__ -lxml.tests.test_incremental_xmlfile.TempPathXmlFileTestCase lxml.tests.test_incremental_xmlfile.TempPathXmlFileTestCase-class.html -lxml.tests.test_incremental_xmlfile.TempPathXmlFileTestCase._parse_file lxml.tests.test_incremental_xmlfile.TempPathXmlFileTestCase-class.html#_parse_file -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase._file lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#_file -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_failure_trailing_text lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_failure_trailing_text -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_nested_default_namespace_and_other lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_nested_default_namespace_and_other -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_generator_close_continues_closing lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_generator_close_continues_closing -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_non_io_exception_continues_closing lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_non_io_exception_continues_closing -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_escaping lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_escaping -lxml.tests.test_incremental_xmlfile.TempPathXmlFileTestCase.tearDown lxml.tests.test_incremental_xmlfile.TempPathXmlFileTestCase-class.html#tearDown -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_default_namespace lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_default_namespace -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_write_Element_repeatedly lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_write_Element_repeatedly -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element_nested_with_text lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element_nested_with_text -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_encoding lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_encoding -lxml.tests.test_incremental_xmlfile.TempPathXmlFileTestCase.setUp lxml.tests.test_incremental_xmlfile.TempPathXmlFileTestCase-class.html#setUp -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element_write_text lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element_write_text -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_closing_out_of_order_in_error_case lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_closing_out_of_order_in_error_case -lxml.tests.test_incremental_xmlfile.TempPathXmlFileTestCase._read_file lxml.tests.test_incremental_xmlfile.TempPathXmlFileTestCase-class.html#_read_file -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_attribute_extra_duplicate lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_attribute_extra_duplicate -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_attribute lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_attribute -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_failure_trailing_Element lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_failure_trailing_Element -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_attribute_extra lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_attribute_extra -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_namespace_nested_nsmap lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_namespace_nested_nsmap -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_comment lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_comment -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element_nested lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element_nested -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_namespace_nsmap lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_namespace_nsmap -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_failure_preceding_text lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_failure_preceding_text -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_write_Element lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_write_Element -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_namespace_nested_anonymous lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_namespace_nested_anonymous -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.assertXml lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#assertXml -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element_write_empty lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element_write_empty -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_incremental_xmlfile.TempPathXmlFileTestCase.test_flush lxml.tests.test_incremental_xmlfile.TempPathXmlFileTestCase-class.html#test_flush -lxml.tests.test_incremental_xmlfile.TempPathXmlFileTestCase.test_buffering lxml.tests.test_incremental_xmlfile.TempPathXmlFileTestCase-class.html#test_buffering -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_nested_default_namespace lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_nested_default_namespace -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_anonymous_namespace lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_anonymous_namespace -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_pi lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_pi -lxml.tests.test_incremental_xmlfile.TempXmlFileTestCase lxml.tests.test_incremental_xmlfile.TempXmlFileTestCase-class.html -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase._parse_file lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#_parse_file -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase._file lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#_file -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_failure_trailing_text lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_failure_trailing_text -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_nested_default_namespace_and_other lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_nested_default_namespace_and_other -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_generator_close_continues_closing lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_generator_close_continues_closing -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_non_io_exception_continues_closing lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_non_io_exception_continues_closing -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_escaping lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_escaping -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.tearDown lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#tearDown -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_default_namespace lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_default_namespace -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_write_Element_repeatedly lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_write_Element_repeatedly -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element_nested_with_text lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element_nested_with_text -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_encoding lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_encoding -lxml.tests.test_incremental_xmlfile.TempXmlFileTestCase.setUp lxml.tests.test_incremental_xmlfile.TempXmlFileTestCase-class.html#setUp -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element_write_text lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element_write_text -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_closing_out_of_order_in_error_case lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_closing_out_of_order_in_error_case -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase._read_file lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#_read_file -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_attribute_extra_duplicate lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_attribute_extra_duplicate -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_attribute lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_attribute -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_failure_trailing_Element lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_failure_trailing_Element -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_attribute_extra lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_attribute_extra -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_namespace_nested_nsmap lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_namespace_nested_nsmap -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_comment lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_comment -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element_nested lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element_nested -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_namespace_nsmap lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_namespace_nsmap -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_failure_preceding_text lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_failure_preceding_text -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_write_Element lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_write_Element -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_namespace_nested_anonymous lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_namespace_nested_anonymous -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.assertXml lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#assertXml -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element_write_empty lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element_write_empty -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_flush lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_flush -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_buffering lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_buffering -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_nested_default_namespace lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_nested_default_namespace -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_anonymous_namespace lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_anonymous_namespace -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_pi lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_pi -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase._parse_file lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#_parse_file -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase._file lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#_file -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_failure_trailing_text lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_failure_trailing_text -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_nested_default_namespace_and_other lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_nested_default_namespace_and_other -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_generator_close_continues_closing lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_generator_close_continues_closing -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_non_io_exception_continues_closing lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_non_io_exception_continues_closing -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_escaping lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_escaping -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.tearDown lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#tearDown -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_default_namespace lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_default_namespace -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_write_Element_repeatedly lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_write_Element_repeatedly -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element_nested_with_text lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element_nested_with_text -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_encoding lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_encoding -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element_write_text lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element_write_text -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_closing_out_of_order_in_error_case lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_closing_out_of_order_in_error_case -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase._read_file lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#_read_file -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_attribute_extra_duplicate lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_attribute_extra_duplicate -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_attribute lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_attribute -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_failure_trailing_Element lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_failure_trailing_Element -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_attribute_extra lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_attribute_extra -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_namespace_nested_nsmap lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_namespace_nested_nsmap -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_comment lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_comment -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element_nested lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element_nested -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_namespace_nsmap lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_namespace_nsmap -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_failure_preceding_text lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_failure_preceding_text -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_write_Element lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_write_Element -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_namespace_nested_anonymous lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_namespace_nested_anonymous -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.assertXml lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#assertXml -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element_write_empty lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element_write_empty -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_flush lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_flush -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_buffering lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_buffering -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_nested_default_namespace lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_nested_default_namespace -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_anonymous_namespace lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_anonymous_namespace -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_element lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_element -lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase.test_pi lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html#test_pi -lxml.tests.test_io.ETreeIOTestCase lxml.tests.test_io.ETreeIOTestCase-class.html -lxml.tests.test_io._IOTestCaseBase.test_iterparse_utf8_bom lxml.tests.test_io._IOTestCaseBase-class.html#test_iterparse_utf8_bom -lxml.tests.test_io._IOTestCaseBase.test_class_parse_fileobject lxml.tests.test_io._IOTestCaseBase-class.html#test_class_parse_fileobject -lxml.tests.test_io._IOTestCaseBase.test_module_parse_gzipobject lxml.tests.test_io._IOTestCaseBase-class.html#test_module_parse_gzipobject -lxml.tests.test_io._IOTestCaseBase.test_iterparse_utf16_bom lxml.tests.test_io._IOTestCaseBase-class.html#test_iterparse_utf16_bom -lxml.tests.test_io.ETreeIOTestCase.test_write_compressed_text lxml.tests.test_io.ETreeIOTestCase-class.html#test_write_compressed_text -lxml.tests.test_io.ETreeIOTestCase.etree lxml.etree-module.html -lxml.tests.test_io._IOTestCaseBase.test_class_parse_filename lxml.tests.test_io._IOTestCaseBase-class.html#test_class_parse_filename -lxml.tests.test_io._IOTestCaseBase.test_write_invalid_filename lxml.tests.test_io._IOTestCaseBase-class.html#test_write_invalid_filename -lxml.tests.test_io._IOTestCaseBase.test_module_parse_fileobject_type_error lxml.tests.test_io._IOTestCaseBase-class.html#test_module_parse_fileobject_type_error -lxml.tests.test_io._IOTestCaseBase.buildNodes lxml.tests.test_io._IOTestCaseBase-class.html#buildNodes -lxml.tests.test_io._IOTestCaseBase.tearDown lxml.tests.test_io._IOTestCaseBase-class.html#tearDown -lxml.tests.test_io._IOTestCaseBase.test_write_filename lxml.tests.test_io._IOTestCaseBase-class.html#test_write_filename -lxml.tests.test_io._IOTestCaseBase.test_tree_io_latin1 lxml.tests.test_io._IOTestCaseBase-class.html#test_tree_io_latin1 -lxml.tests.test_io._IOTestCaseBase.setUp lxml.tests.test_io._IOTestCaseBase-class.html#setUp -lxml.tests.test_io._IOTestCaseBase.test_class_parse_unamed_fileobject lxml.tests.test_io._IOTestCaseBase-class.html#test_class_parse_unamed_fileobject -lxml.tests.test_io._IOTestCaseBase.test_parse_utf8_bom lxml.tests.test_io._IOTestCaseBase-class.html#test_parse_utf8_bom -lxml.tests.test_io._IOTestCaseBase.test_etree_parse_io_error lxml.tests.test_io._IOTestCaseBase-class.html#test_etree_parse_io_error -lxml.tests.test_io._IOTestCaseBase.test_module_parse_fileobject_error lxml.tests.test_io._IOTestCaseBase-class.html#test_module_parse_fileobject_error -lxml.tests.test_io._IOTestCaseBase.test_module_parse_large_fileobject lxml.tests.test_io._IOTestCaseBase-class.html#test_module_parse_large_fileobject -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_io._IOTestCaseBase.getTestFilePath lxml.tests.test_io._IOTestCaseBase-class.html#getTestFilePath -lxml.tests.test_io._IOTestCaseBase.test_class_parse_filename_remove_previous lxml.tests.test_io._IOTestCaseBase-class.html#test_class_parse_filename_remove_previous -lxml.tests.test_io._IOTestCaseBase.test_tree_io lxml.tests.test_io._IOTestCaseBase-class.html#test_tree_io -lxml.tests.test_io._IOTestCaseBase.test_module_parse_fileobject_late_error lxml.tests.test_io._IOTestCaseBase-class.html#test_module_parse_fileobject_late_error -lxml.tests.test_io.ElementTreeIOTestCase lxml.tests.test_io.ElementTreeIOTestCase-class.html -lxml.tests.test_io._IOTestCaseBase.test_iterparse_utf8_bom lxml.tests.test_io._IOTestCaseBase-class.html#test_iterparse_utf8_bom -lxml.tests.test_io._IOTestCaseBase.test_class_parse_fileobject lxml.tests.test_io._IOTestCaseBase-class.html#test_class_parse_fileobject -lxml.tests.test_io._IOTestCaseBase.test_module_parse_gzipobject lxml.tests.test_io._IOTestCaseBase-class.html#test_module_parse_gzipobject -lxml.tests.test_io._IOTestCaseBase.test_iterparse_utf16_bom lxml.tests.test_io._IOTestCaseBase-class.html#test_iterparse_utf16_bom -lxml.tests.test_io.ElementTreeIOTestCase.etree xml.etree.ElementTree-module.html -lxml.tests.test_io._IOTestCaseBase.test_class_parse_filename lxml.tests.test_io._IOTestCaseBase-class.html#test_class_parse_filename -lxml.tests.test_io._IOTestCaseBase.test_write_invalid_filename lxml.tests.test_io._IOTestCaseBase-class.html#test_write_invalid_filename -lxml.tests.test_io._IOTestCaseBase.test_module_parse_fileobject_type_error lxml.tests.test_io._IOTestCaseBase-class.html#test_module_parse_fileobject_type_error -lxml.tests.test_io._IOTestCaseBase.buildNodes lxml.tests.test_io._IOTestCaseBase-class.html#buildNodes -lxml.tests.test_io._IOTestCaseBase.tearDown lxml.tests.test_io._IOTestCaseBase-class.html#tearDown -lxml.tests.test_io._IOTestCaseBase.test_write_filename lxml.tests.test_io._IOTestCaseBase-class.html#test_write_filename -lxml.tests.test_io._IOTestCaseBase.test_tree_io_latin1 lxml.tests.test_io._IOTestCaseBase-class.html#test_tree_io_latin1 -lxml.tests.test_io._IOTestCaseBase.setUp lxml.tests.test_io._IOTestCaseBase-class.html#setUp -lxml.tests.test_io._IOTestCaseBase.test_class_parse_unamed_fileobject lxml.tests.test_io._IOTestCaseBase-class.html#test_class_parse_unamed_fileobject -lxml.tests.test_io._IOTestCaseBase.test_parse_utf8_bom lxml.tests.test_io._IOTestCaseBase-class.html#test_parse_utf8_bom -lxml.tests.test_io._IOTestCaseBase.test_etree_parse_io_error lxml.tests.test_io._IOTestCaseBase-class.html#test_etree_parse_io_error -lxml.tests.test_io._IOTestCaseBase.test_module_parse_fileobject_error lxml.tests.test_io._IOTestCaseBase-class.html#test_module_parse_fileobject_error -lxml.tests.test_io._IOTestCaseBase.test_module_parse_large_fileobject lxml.tests.test_io._IOTestCaseBase-class.html#test_module_parse_large_fileobject -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_io._IOTestCaseBase.getTestFilePath lxml.tests.test_io._IOTestCaseBase-class.html#getTestFilePath -lxml.tests.test_io._IOTestCaseBase.test_class_parse_filename_remove_previous lxml.tests.test_io._IOTestCaseBase-class.html#test_class_parse_filename_remove_previous -lxml.tests.test_io._IOTestCaseBase.test_tree_io lxml.tests.test_io._IOTestCaseBase-class.html#test_tree_io -lxml.tests.test_io._IOTestCaseBase.test_module_parse_fileobject_late_error lxml.tests.test_io._IOTestCaseBase-class.html#test_module_parse_fileobject_late_error -lxml.tests.test_io._IOTestCaseBase lxml.tests.test_io._IOTestCaseBase-class.html -lxml.tests.test_io._IOTestCaseBase.test_iterparse_utf8_bom lxml.tests.test_io._IOTestCaseBase-class.html#test_iterparse_utf8_bom -lxml.tests.test_io._IOTestCaseBase.test_class_parse_fileobject lxml.tests.test_io._IOTestCaseBase-class.html#test_class_parse_fileobject -lxml.tests.test_io._IOTestCaseBase.test_module_parse_gzipobject lxml.tests.test_io._IOTestCaseBase-class.html#test_module_parse_gzipobject -lxml.tests.test_io._IOTestCaseBase.test_iterparse_utf16_bom lxml.tests.test_io._IOTestCaseBase-class.html#test_iterparse_utf16_bom -lxml.tests.test_io._IOTestCaseBase.etree lxml.tests.test_io._IOTestCaseBase-class.html#etree -lxml.tests.test_io._IOTestCaseBase.test_class_parse_filename lxml.tests.test_io._IOTestCaseBase-class.html#test_class_parse_filename -lxml.tests.test_io._IOTestCaseBase.test_write_invalid_filename lxml.tests.test_io._IOTestCaseBase-class.html#test_write_invalid_filename -lxml.tests.test_io._IOTestCaseBase.test_module_parse_fileobject_type_error lxml.tests.test_io._IOTestCaseBase-class.html#test_module_parse_fileobject_type_error -lxml.tests.test_io._IOTestCaseBase.buildNodes lxml.tests.test_io._IOTestCaseBase-class.html#buildNodes -lxml.tests.test_io._IOTestCaseBase.tearDown lxml.tests.test_io._IOTestCaseBase-class.html#tearDown -lxml.tests.test_io._IOTestCaseBase.test_write_filename lxml.tests.test_io._IOTestCaseBase-class.html#test_write_filename -lxml.tests.test_io._IOTestCaseBase.test_tree_io_latin1 lxml.tests.test_io._IOTestCaseBase-class.html#test_tree_io_latin1 -lxml.tests.test_io._IOTestCaseBase.setUp lxml.tests.test_io._IOTestCaseBase-class.html#setUp -lxml.tests.test_io._IOTestCaseBase.test_class_parse_unamed_fileobject lxml.tests.test_io._IOTestCaseBase-class.html#test_class_parse_unamed_fileobject -lxml.tests.test_io._IOTestCaseBase.test_parse_utf8_bom lxml.tests.test_io._IOTestCaseBase-class.html#test_parse_utf8_bom -lxml.tests.test_io._IOTestCaseBase.test_etree_parse_io_error lxml.tests.test_io._IOTestCaseBase-class.html#test_etree_parse_io_error -lxml.tests.test_io._IOTestCaseBase.test_module_parse_fileobject_error lxml.tests.test_io._IOTestCaseBase-class.html#test_module_parse_fileobject_error -lxml.tests.test_io._IOTestCaseBase.test_module_parse_large_fileobject lxml.tests.test_io._IOTestCaseBase-class.html#test_module_parse_large_fileobject -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_io._IOTestCaseBase.getTestFilePath lxml.tests.test_io._IOTestCaseBase-class.html#getTestFilePath -lxml.tests.test_io._IOTestCaseBase.test_class_parse_filename_remove_previous lxml.tests.test_io._IOTestCaseBase-class.html#test_class_parse_filename_remove_previous -lxml.tests.test_io._IOTestCaseBase.test_tree_io lxml.tests.test_io._IOTestCaseBase-class.html#test_tree_io -lxml.tests.test_io._IOTestCaseBase.test_module_parse_fileobject_late_error lxml.tests.test_io._IOTestCaseBase-class.html#test_module_parse_fileobject_late_error -lxml.tests.test_isoschematron.ETreeISOSchematronTestCase lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html -lxml.tests.test_isoschematron.ETreeISOSchematronTestCase.test_schematron_from_file lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html#test_schematron_from_file -lxml.tests.test_isoschematron.ETreeISOSchematronTestCase.test_schematron_invalid_args lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html#test_schematron_invalid_args -lxml.tests.test_isoschematron.ETreeISOSchematronTestCase.test_schematron_error_log lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html#test_schematron_error_log -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_isoschematron.ETreeISOSchematronTestCase.test_schematron_customization lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html#test_schematron_customization -lxml.tests.test_isoschematron.ETreeISOSchematronTestCase.test_schematron_phases_kwarg lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html#test_schematron_phases_kwarg -lxml.tests.test_isoschematron.ETreeISOSchematronTestCase.test_schematron_xmlschema_embedded lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html#test_schematron_xmlschema_embedded -lxml.tests.test_isoschematron.ETreeISOSchematronTestCase.test_schematron_from_tree lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html#test_schematron_from_tree -lxml.tests.test_isoschematron.ETreeISOSchematronTestCase.test_schematron_store_xslt lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html#test_schematron_store_xslt -lxml.tests.test_isoschematron.ETreeISOSchematronTestCase.test_schematron_validate lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html#test_schematron_validate -lxml.tests.test_isoschematron.ETreeISOSchematronTestCase.test_schematron_from_element lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html#test_schematron_from_element -lxml.tests.test_isoschematron.ETreeISOSchematronTestCase.test_schematron_assertValid lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html#test_schematron_assertValid -lxml.tests.test_isoschematron.ETreeISOSchematronTestCase.test_schematron_result_report lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html#test_schematron_result_report -lxml.tests.test_isoschematron.ETreeISOSchematronTestCase.test_schematron_empty_pattern lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html#test_schematron_empty_pattern -lxml.tests.test_isoschematron.ETreeISOSchematronTestCase.test_schematron_store_schematron lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html#test_schematron_store_schematron -lxml.tests.test_isoschematron.ETreeISOSchematronTestCase.test_schematron_elementtree_error lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html#test_schematron_elementtree_error -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_isoschematron.ETreeISOSchematronTestCase.test_schematron_abstract lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html#test_schematron_abstract -lxml.tests.test_isoschematron.ETreeISOSchematronTestCase.test_schematron_phases lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html#test_schematron_phases -lxml.tests.test_isoschematron.ETreeISOSchematronTestCase.test_schematron_call lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html#test_schematron_call -lxml.tests.test_isoschematron.ETreeISOSchematronTestCase.test_schematron lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html#test_schematron -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_isoschematron.ETreeISOSchematronTestCase.test_schematron_invalid_schema_empty lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html#test_schematron_invalid_schema_empty -lxml.tests.test_isoschematron.ETreeISOSchematronTestCase.test_schematron_relaxng_embedded lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html#test_schematron_relaxng_embedded -lxml.tests.test_isoschematron.ETreeISOSchematronTestCase.test_schematron_fail_on_report lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html#test_schematron_fail_on_report -lxml.tests.test_isoschematron.ETreeISOSchematronTestCase.test_schematron_invalid_schema_namespace lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html#test_schematron_invalid_schema_namespace -lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase-class.html -lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.test_create_element lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase-class.html#test_create_element -lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.test_element_creation lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase-class.html#test_element_creation -lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.tearDown lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase-class.html#tearDown -lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.test_default_tagname lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase-class.html#test_default_tagname -lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.maeh_class lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.maeh_class-class.html -lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.setUp lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase-class.html#setUp -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.bluff_class lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.bluff_class-class.html -lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.test_ns_classes lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase-class.html#test_ns_classes -lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.test_create_element_default lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase-class.html#test_create_element_default -lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.default_class lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.default_class-class.html -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.test_registry lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase-class.html#test_registry -lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.bluff_class lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.bluff_class-class.html -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.etree._Element.set lxml.etree._Element-class.html#set -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.etree._Element.text lxml.etree._Element-class.html#text -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.etree._Element._init lxml.etree._Element-class.html#_init -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.etree._Element.tag lxml.etree._Element-class.html#tag -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.etree._Element.append lxml.etree._Element-class.html#append -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.etree.ElementBase.__new__ lxml.etree.ElementBase-class.html#__new__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.etree._Element.getchildren lxml.etree._Element-class.html#getchildren -lxml.etree.ElementBase.__init__ lxml.etree.ElementBase-class.html#__init__ -lxml.etree._Element.cssselect lxml.etree._Element-class.html#cssselect -lxml.etree._Element.__len__ lxml.etree._Element-class.html#__len__ -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.etree._Element.__getitem__ lxml.etree._Element-class.html#__getitem__ -lxml.etree._Element.get lxml.etree._Element-class.html#get -lxml.etree._Element.keys lxml.etree._Element-class.html#keys -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.etree._Element.__iter__ lxml.etree._Element-class.html#__iter__ -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.bluff_class.bluff lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.bluff_class-class.html#bluff -lxml.etree._Element.insert lxml.etree._Element-class.html#insert -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.etree._Element.__delitem__ lxml.etree._Element-class.html#__delitem__ -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.etree._Element.__nonzero__ lxml.etree._Element-class.html#__nonzero__ -lxml.etree._Element.items lxml.etree._Element-class.html#items -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.etree._Element.__setitem__ lxml.etree._Element-class.html#__setitem__ -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.etree._Element.values lxml.etree._Element-class.html#values -lxml.etree._Element.__repr__ lxml.etree._Element-class.html#__repr__ -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.etree._Element.attrib lxml.etree._Element-class.html#attrib -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.default_class lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.default_class-class.html -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.etree._Element.set lxml.etree._Element-class.html#set -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.etree._Element.text lxml.etree._Element-class.html#text -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.etree._Element._init lxml.etree._Element-class.html#_init -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.etree._Element.tag lxml.etree._Element-class.html#tag -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.etree._Element.append lxml.etree._Element-class.html#append -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.etree.ElementBase.__new__ lxml.etree.ElementBase-class.html#__new__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.etree._Element.getchildren lxml.etree._Element-class.html#getchildren -lxml.etree.ElementBase.__init__ lxml.etree.ElementBase-class.html#__init__ -lxml.etree._Element.cssselect lxml.etree._Element-class.html#cssselect -lxml.etree._Element.__len__ lxml.etree._Element-class.html#__len__ -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.etree._Element.__getitem__ lxml.etree._Element-class.html#__getitem__ -lxml.etree._Element.get lxml.etree._Element-class.html#get -lxml.etree._Element.keys lxml.etree._Element-class.html#keys -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.etree._Element.__iter__ lxml.etree._Element-class.html#__iter__ -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.etree._Element.insert lxml.etree._Element-class.html#insert -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.etree._Element.__delitem__ lxml.etree._Element-class.html#__delitem__ -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.etree._Element.__nonzero__ lxml.etree._Element-class.html#__nonzero__ -lxml.etree._Element.items lxml.etree._Element-class.html#items -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.etree._Element.__setitem__ lxml.etree._Element-class.html#__setitem__ -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.etree._Element.values lxml.etree._Element-class.html#values -lxml.etree._Element.__repr__ lxml.etree._Element-class.html#__repr__ -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.etree._Element.attrib lxml.etree._Element-class.html#attrib -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.maeh_class lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.maeh_class-class.html -lxml.etree._Element.getprevious lxml.etree._Element-class.html#getprevious -lxml.etree._Element.set lxml.etree._Element-class.html#set -lxml.etree._Element.getparent lxml.etree._Element-class.html#getparent -lxml.etree._Element.sourceline lxml.etree._Element-class.html#sourceline -lxml.etree._Element.text lxml.etree._Element-class.html#text -lxml.etree._Element.iterfind lxml.etree._Element-class.html#iterfind -lxml.etree._Element._init lxml.etree._Element-class.html#_init -lxml.etree._Element.nsmap lxml.etree._Element-class.html#nsmap -lxml.etree._Element.replace lxml.etree._Element-class.html#replace -lxml.etree._Element.prefix lxml.etree._Element-class.html#prefix -lxml.etree._Element.tag lxml.etree._Element-class.html#tag -lxml.etree._Element.iter lxml.etree._Element-class.html#iter -lxml.etree._Element.addnext lxml.etree._Element-class.html#addnext -lxml.etree._Element.addprevious lxml.etree._Element-class.html#addprevious -lxml.etree._Element.find lxml.etree._Element-class.html#find -lxml.etree._Element.append lxml.etree._Element-class.html#append -lxml.etree._Element.getnext lxml.etree._Element-class.html#getnext -lxml.etree._Element.index lxml.etree._Element-class.html#index -lxml.etree.ElementBase.__new__ lxml.etree.ElementBase-class.html#__new__ -lxml.etree._Element.__contains__ lxml.etree._Element-class.html#__contains__ -lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.maeh_class.maeh lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.maeh_class-class.html#maeh -lxml.etree._Element.findtext lxml.etree._Element-class.html#findtext -lxml.etree._Element.tail lxml.etree._Element-class.html#tail -lxml.etree._Element.getroottree lxml.etree._Element-class.html#getroottree -lxml.etree._Element.iterdescendants lxml.etree._Element-class.html#iterdescendants -lxml.etree._Element.getchildren lxml.etree._Element-class.html#getchildren -lxml.etree.ElementBase.__init__ lxml.etree.ElementBase-class.html#__init__ -lxml.etree._Element.cssselect lxml.etree._Element-class.html#cssselect -lxml.etree._Element.__len__ lxml.etree._Element-class.html#__len__ -lxml.etree._Element.xpath lxml.etree._Element-class.html#xpath -lxml.etree._Element.__getitem__ lxml.etree._Element-class.html#__getitem__ -lxml.etree._Element.get lxml.etree._Element-class.html#get -lxml.etree._Element.keys lxml.etree._Element-class.html#keys -lxml.etree._Element.__deepcopy__ lxml.etree._Element-class.html#__deepcopy__ -lxml.etree._Element.makeelement lxml.etree._Element-class.html#makeelement -lxml.etree._Element.__iter__ lxml.etree._Element-class.html#__iter__ -lxml.etree._Element.base lxml.etree._Element-class.html#base -lxml.etree._Element.insert lxml.etree._Element-class.html#insert -lxml.etree._Element.iterchildren lxml.etree._Element-class.html#iterchildren -lxml.etree._Element.iterancestors lxml.etree._Element-class.html#iterancestors -lxml.etree._Element.extend lxml.etree._Element-class.html#extend -lxml.etree._Element.__delitem__ lxml.etree._Element-class.html#__delitem__ -lxml.etree._Element.__reversed__ lxml.etree._Element-class.html#__reversed__ -lxml.etree._Element.itersiblings lxml.etree._Element-class.html#itersiblings -lxml.etree._Element.__nonzero__ lxml.etree._Element-class.html#__nonzero__ -lxml.etree._Element.items lxml.etree._Element-class.html#items -lxml.etree._Element.clear lxml.etree._Element-class.html#clear -lxml.etree._Element.itertext lxml.etree._Element-class.html#itertext -lxml.etree._Element.findall lxml.etree._Element-class.html#findall -lxml.etree._Element.__setitem__ lxml.etree._Element-class.html#__setitem__ -lxml.etree._Element.remove lxml.etree._Element-class.html#remove -lxml.etree._Element.values lxml.etree._Element-class.html#values -lxml.etree._Element.__repr__ lxml.etree._Element-class.html#__repr__ -lxml.etree._Element.getiterator lxml.etree._Element-class.html#getiterator -lxml.etree._Element.attrib lxml.etree._Element-class.html#attrib -lxml.etree._Element.__copy__ lxml.etree._Element-class.html#__copy__ -lxml.tests.test_objectify.ObjectifyTestCase lxml.tests.test_objectify.ObjectifyTestCase-class.html -lxml.tests.test_objectify.ObjectifyTestCase.test_efactory_nested lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_efactory_nested -lxml.tests.test_objectify.ObjectifyTestCase.test_setslice_partial_allneg lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_setslice_partial_allneg -lxml.tests.test_objectify.ObjectifyTestCase.test_type_bool_cmp lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_bool_cmp -lxml.tests.test_objectify.ObjectifyTestCase.test_pickle_floattelement lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_pickle_floattelement -lxml.tests.test_objectify.ObjectifyTestCase.test_type_unregistered lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_unregistered -lxml.tests.test_objectify.ObjectifyTestCase.test_xml_base lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_xml_base -lxml.tests.test_objectify.ObjectifyTestCase.test_pytype_annotation_use_old lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_pytype_annotation_use_old -lxml.tests.test_objectify.ObjectifyTestCase.test_registered_types lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_registered_types -lxml.tests.test_objectify.ObjectifyTestCase.test_sub_data_element_nsmap_custom lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_sub_data_element_nsmap_custom -lxml.tests.test_objectify.ObjectifyTestCase.test_sub_element_nsmap_default lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_sub_element_nsmap_default -lxml.tests.test_objectify.ObjectifyTestCase.test_child_nonexistant lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_child_nonexistant -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_list lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_list -lxml.tests.test_objectify.ObjectifyTestCase.test_xsiannotate_ignore_old lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_xsiannotate_ignore_old -lxml.tests.test_objectify.ObjectifyTestCase.test_schema_types lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_schema_types -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_attrib_attributes_precedence lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_attrib_attributes_precedence -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_dot lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_dot -lxml.tests.test_objectify.ObjectifyTestCase.test_pyannotate_use_old lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_pyannotate_use_old -lxml.tests.test_objectify.ObjectifyTestCase.test_build_tree lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_build_tree -lxml.tests.test_objectify.ObjectifyTestCase.test_type_str lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_str -lxml.tests.test_objectify.ObjectifyTestCase.test_element_nsmap_empty lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_element_nsmap_empty -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_dot_root_list lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_dot_root_list -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_float_hash lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_float_hash -lxml.tests.test_objectify.ObjectifyTestCase.test_setitem_string lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_setitem_string -lxml.tests.test_objectify.ObjectifyTestCase.test_type_str_hash lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_str_hash -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_dot_list lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_dot_list -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_pytypes lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_pytypes -lxml.tests.test_objectify.ObjectifyTestCase.test_xml_base_attribute lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_xml_base_attribute -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_addattr_create_element lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_addattr_create_element -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_data_element_arg_invalid_pytype lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_data_element_arg_invalid_pytype -lxml.tests.test_objectify.ObjectifyTestCase.etree lxml.etree-module.html -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_nsmap_custom_prefixes lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_nsmap_custom_prefixes -lxml.tests.test_objectify.ObjectifyTestCase.test_xsitype_deannotate lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_xsitype_deannotate -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_default_relative lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_default_relative -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_nsmap_custom lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_nsmap_custom -lxml.tests.test_objectify.ObjectifyTestCase.test_type_str_as_complex lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_str_as_complex -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_fail_parse_empty lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_fail_parse_empty -lxml.tests.test_objectify.ObjectifyTestCase.test_addattr_element lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_addattr_element -lxml.tests.test_objectify.ObjectifyTestCase.test_pyannotate_ignore_old lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_pyannotate_ignore_old -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_fail lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_fail -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_ns lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_ns -lxml.tests.test_objectify.ObjectifyTestCase.test_pyannotate_empty lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_pyannotate_empty -lxml.tests.test_objectify.ObjectifyTestCase.test_efactory_attrib lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_efactory_attrib -lxml.tests.test_objectify.ObjectifyTestCase.test_class_lookup lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_class_lookup -lxml.tests.test_objectify.ObjectifyTestCase.test_change_pytype_attribute lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_change_pytype_attribute -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_index_fail_lookup lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_index_fail_lookup -lxml.tests.test_objectify.ObjectifyTestCase.test_setslice_partial lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_setslice_partial -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path -lxml.tests.test_objectify.ObjectifyTestCase.test_addattr_list lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_addattr_list -lxml.tests.test_objectify.ObjectifyTestCase.test_setslice_partial_wrong_length lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_setslice_partial_wrong_length -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_default_absolute lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_default_absolute -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_index_fail_parse lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_index_fail_parse -lxml.tests.test_objectify.ObjectifyTestCase.test_findall_ns lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_findall_ns -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_ns_list lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_ns_list -lxml.tests.test_objectify.ObjectifyTestCase.test_descendant_paths_prefix lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_descendant_paths_prefix -lxml.tests.test_objectify.ObjectifyTestCase.tearDown lxml.tests.test_objectify.ObjectifyTestCase-class.html#tearDown -lxml.tests.test_objectify.ObjectifyTestCase.test_pytype_xsitype_annotation lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_pytype_xsitype_annotation -lxml.tests.test_objectify.ObjectifyTestCase.test_pickle_elementtree lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_pickle_elementtree -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_int_hash lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_int_hash -lxml.tests.test_objectify.ObjectifyTestCase.test_parse_stringio_base_url lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_parse_stringio_base_url -lxml.tests.test_objectify.ObjectifyTestCase.test_setitem_string_special lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_setitem_string_special -lxml.tests.test_objectify.ObjectifyTestCase.test_type_ustr_intliteral lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_ustr_intliteral -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_set_create_list lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_set_create_list -lxml.tests.test_objectify.ObjectifyTestCase.test_date_element_efactory_text lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_date_element_efactory_text -lxml.tests.test_objectify.ObjectifyTestCase.test_root lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_root -lxml.tests.test_objectify.ObjectifyTestCase.test_type_float_precision lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_float_precision -lxml.tests.test_objectify.ObjectifyTestCase.test_setslice_empty lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_setslice_empty -lxml.tests.test_objectify.ObjectifyTestCase.test_type_str_as_int lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_str_as_int -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_ustr_floatliteral lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_ustr_floatliteral -lxml.tests.test_objectify.ObjectifyTestCase.test_efactory_bool lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_efactory_bool -lxml.tests.test_objectify.ObjectifyTestCase.test_pickle_intelement lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_pickle_intelement -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_xsitypes lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_xsitypes -lxml.tests.test_objectify.ObjectifyTestCase.test_pickle lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_pickle -lxml.tests.test_objectify.ObjectifyTestCase._test_pickle lxml.tests.test_objectify.ObjectifyTestCase-class.html#_test_pickle -lxml.tests.test_objectify.ObjectifyTestCase.test_date_element_efactory_tail lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_date_element_efactory_tail -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_index lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_index -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_set_create lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_set_create -lxml.tests.test_objectify.ObjectifyTestCase.test_sub_element_nsmap_custom lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_sub_element_nsmap_custom -lxml.tests.test_objectify.ObjectifyTestCase.test_type_ustr lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_ustr -lxml.tests.test_objectify.ObjectifyTestCase.test_xsinil_deannotate lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_xsinil_deannotate -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_float lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_float -lxml.tests.test_objectify.ObjectifyTestCase.test_dataelement_xsi_prefix_error lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_dataelement_xsi_prefix_error -lxml.tests.test_objectify.ObjectifyTestCase.setUp lxml.tests.test_objectify.ObjectifyTestCase-class.html#setUp -lxml.tests.test_objectify.ObjectifyTestCase.test_setattr lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_setattr -lxml.tests.test_objectify.ObjectifyTestCase.test_type_str_cmp lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_str_cmp -lxml.tests.test_objectify.ObjectifyTestCase.test_child_ns_nons lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_child_ns_nons -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_data_element_arg_pytype_none lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_data_element_arg_pytype_none -lxml.tests.test_objectify.ObjectifyTestCase.test_sub_element_nsmap_custom_prefixes lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_sub_element_nsmap_custom_prefixes -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_index_list lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_index_list -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_addattr_element lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_addattr_element -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_nsmap_default lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_nsmap_default -lxml.tests.test_objectify.ObjectifyTestCase.test_dataelement_xsi_nsmap lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_dataelement_xsi_nsmap -lxml.tests.test_objectify.ObjectifyTestCase.test_efactory_subtype lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_efactory_subtype -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_float_hash_repr lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_float_hash_repr -lxml.tests.test_objectify.ObjectifyTestCase.test_setslice_elements lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_setslice_elements -lxml.tests.test_objectify.ObjectifyTestCase.test_type_str_mod lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_str_mod -lxml.tests.test_objectify.ObjectifyTestCase.test_child_index lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_child_index -lxml.tests.test_objectify.ObjectifyTestCase.test_sub_data_element_nsmap_empty lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_sub_data_element_nsmap_empty -lxml.tests.test_objectify.ObjectifyTestCase.test_getslice_partial lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_getslice_partial -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_str lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_str -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_addattr lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_addattr -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_data_element_arg_xsitype lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_data_element_arg_xsitype -lxml.tests.test_objectify.ObjectifyTestCase.test_type_str_sequence lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_str_sequence -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_addattr_create lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_addattr_create -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_set_element lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_set_element -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_str_intliteral lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_str_intliteral -lxml.tests.test_objectify.ObjectifyTestCase.test_efactory_str lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_efactory_str -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_ustr lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_ustr -lxml.tests.test_objectify.ObjectifyTestCase.test_efactory_none lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_efactory_none -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_objectify.ObjectifyTestCase.test_str lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_str -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_syntax lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_syntax -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_NoneType lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_NoneType -lxml.tests.test_objectify.ObjectifyTestCase.test_type_NoneType lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_NoneType -lxml.tests.test_objectify.ObjectifyTestCase.test_child_getattr_empty_ns lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_child_getattr_empty_ns -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_xsitypes_xsdprefixed lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_xsitypes_xsdprefixed -lxml.tests.test_objectify.ObjectifyTestCase.test_efactory_float lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_efactory_float -lxml.tests.test_objectify.ObjectifyTestCase.test_element_nsmap_default lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_element_nsmap_default -lxml.tests.test_objectify.ObjectifyTestCase.test_pytype_annotation_empty lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_pytype_annotation_empty -lxml.tests.test_objectify.ObjectifyTestCase.test_child_addattr lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_child_addattr -lxml.tests.test_objectify.ObjectifyTestCase.test_setslice_complete lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_setslice_complete -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_xsitypes_prefixed lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_xsitypes_prefixed -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_addattr_create_list lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_addattr_create_list -lxml.tests.test_objectify.ObjectifyTestCase.XML lxml.tests.test_objectify.ObjectifyTestCase-class.html#XML -lxml.tests.test_objectify.ObjectifyTestCase.test_sub_data_element_nsmap_custom_prefixes lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_sub_data_element_nsmap_custom_prefixes -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_invalid_xsi lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_invalid_xsi -lxml.tests.test_objectify.ObjectifyTestCase.test_pickle_boolelement lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_pickle_boolelement -lxml.tests.test_objectify.ObjectifyTestCase.test_dataelement_xsi lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_dataelement_xsi -lxml.tests.test_objectify.ObjectifyTestCase.test_getslice_partial_neg lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_getslice_partial_neg -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_element_arg lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_element_arg -lxml.tests.test_objectify.ObjectifyTestCase.test_type_none_cmp lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_none_cmp -lxml.tests.test_objectify.ObjectifyTestCase.test_type_float_instantiation_precision lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_float_instantiation_precision -lxml.tests.test_objectify.ObjectifyTestCase.test_child_len lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_child_len -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_pytype_none lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_pytype_none -lxml.tests.test_objectify.ObjectifyTestCase.test_type_str_mod_data_elements lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_str_mod_data_elements -lxml.tests.test_objectify.ObjectifyTestCase.test_setslice_insert lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_setslice_insert -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_nsmap_empty lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_nsmap_empty -lxml.tests.test_objectify.ObjectifyTestCase.test_schema_types_prefixed lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_schema_types_prefixed -lxml.tests.test_objectify.ObjectifyTestCase.test_type_ustr_floatliteral lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_ustr_floatliteral -lxml.tests.test_objectify.ObjectifyTestCase.test_pickle_noneelement lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_pickle_noneelement -lxml.tests.test_objectify.ObjectifyTestCase.test_addattr lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_addattr -lxml.tests.test_objectify.ObjectifyTestCase.test_XML_set_base_url_docinfo lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_XML_set_base_url_docinfo -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_set lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_set -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_int lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_int -lxml.tests.test_objectify.ObjectifyTestCase.test_registered_type_stringify lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_registered_type_stringify -lxml.tests.test_objectify.ObjectifyTestCase.test_dir lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_dir -lxml.tests.test_objectify.ObjectifyTestCase.test_findall lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_findall -lxml.tests.test_objectify.ObjectifyTestCase.test_type_ustr_add lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_ustr_add -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_dot_root lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_dot_root -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_hasattr lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_hasattr -lxml.tests.test_objectify.ObjectifyTestCase.test_XML_base_url_docinfo lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_XML_base_url_docinfo -lxml.tests.test_objectify.ObjectifyTestCase.test_type_float_precision_consistency lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_float_precision_consistency -lxml.tests.test_objectify.ObjectifyTestCase.test_xsiannotate_use_old lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_xsiannotate_use_old -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_pytype_none_compat lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_pytype_none_compat -lxml.tests.test_objectify.ObjectifyTestCase.test_type_int lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_int -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_unregistered lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_unregistered -lxml.tests.test_objectify.ObjectifyTestCase.test_type_str_mul lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_str_mul -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_str_floatliteral lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_str_floatliteral -lxml.tests.test_objectify.ObjectifyTestCase.test_type_bool lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_bool -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_ustr_intliteral lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_ustr_intliteral -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_set_create_element lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_set_create_element -lxml.tests.test_objectify.ObjectifyTestCase.test_type_str_add lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_str_add -lxml.tests.test_objectify.ObjectifyTestCase.test_type_float lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_float -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_data_element_arg_pytype lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_data_element_arg_pytype -lxml.tests.test_objectify.ObjectifyTestCase.test_type_ustr_mul lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_ustr_mul -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_data_element_arg_invalid_xsi lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_data_element_arg_invalid_xsi -lxml.tests.test_objectify.ObjectifyTestCase.test_child_getattr lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_child_getattr -lxml.tests.test_objectify.ObjectifyTestCase.test_sub_data_element_nsmap_default lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_sub_data_element_nsmap_default -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_objectify.ObjectifyTestCase.test_descendant_paths_child lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_descendant_paths_child -lxml.tests.test_objectify.ObjectifyTestCase.test_object_path_fail_parse_empty_list lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_object_path_fail_parse_empty_list -lxml.tests.test_objectify.ObjectifyTestCase.test_pytype_annotation lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_pytype_annotation -lxml.tests.test_objectify.ObjectifyTestCase.test_type_int_cmp lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_int_cmp -lxml.tests.test_objectify.ObjectifyTestCase.test_pickle_strelement lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_pickle_strelement -lxml.tests.test_objectify.ObjectifyTestCase.test_child_set_ro lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_child_set_ro -lxml.tests.test_objectify.ObjectifyTestCase.test_type_str_intliteral lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_str_intliteral -lxml.tests.test_objectify.ObjectifyTestCase.test_element_nsmap_custom_prefixes lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_element_nsmap_custom_prefixes -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_data_element_arg lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_data_element_arg -lxml.tests.test_objectify.ObjectifyTestCase.test_vars lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_vars -lxml.tests.test_objectify.ObjectifyTestCase.test_child lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_child -lxml.tests.test_objectify.ObjectifyTestCase.test_type_str_floatliteral lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_str_floatliteral -lxml.tests.test_objectify.ObjectifyTestCase.test_parse_base_url_docinfo lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_parse_base_url_docinfo -lxml.tests.test_objectify.ObjectifyTestCase.test_element_nsmap_custom lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_element_nsmap_custom -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_float_precision lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_float_precision -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_bool lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_bool -lxml.tests.test_objectify.ObjectifyTestCase.test_setslice_insert_neg lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_setslice_insert_neg -lxml.tests.test_objectify.ObjectifyTestCase.test_efactory_value_concatenation lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_efactory_value_concatenation -lxml.tests.test_objectify.ObjectifyTestCase.test_pytype_deannotate lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_pytype_deannotate -lxml.tests.test_objectify.ObjectifyTestCase.test_setslice_partial_neg lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_setslice_partial_neg -lxml.tests.test_objectify.ObjectifyTestCase.test_efactory_int lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_efactory_int -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_data_element_arg_pytype_xsitype lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_data_element_arg_pytype_xsitype -lxml.tests.test_objectify.ObjectifyTestCase.test_data_element_invalid_pytype lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_data_element_invalid_pytype -lxml.tests.test_objectify.ObjectifyTestCase.test_setattr_nonunicode lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_setattr_nonunicode -lxml.tests.test_objectify.ObjectifyTestCase.test_sub_element_nsmap_empty lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_sub_element_nsmap_empty -lxml.tests.test_objectify.ObjectifyTestCase.test_descendant_paths lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_descendant_paths -lxml.tests.test_objectify.ObjectifyTestCase.test_type_str_as_float lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_type_str_as_float -lxml.tests.test_objectify.ObjectifyTestCase.test_deannotate lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_deannotate -lxml.tests.test_objectify.ObjectifyTestCase.test_getslice_complete lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_getslice_complete -lxml.tests.test_objectify.ObjectifyTestCase.test_efactory_unicode lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_efactory_unicode -lxml.tests.test_objectify.ObjectifyTestCase.test_set_string lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_set_string -lxml.tests.test_objectify.ObjectifyTestCase.test_child_index_neg lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_child_index_neg -lxml.tests.test_objectify.ObjectifyTestCase.test_standard_lookup lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_standard_lookup -lxml.tests.test_objectify.ObjectifyTestCase.test_child_iter lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_child_iter -lxml.tests.test_objectify.ObjectifyTestCase.test_countchildren lxml.tests.test_objectify.ObjectifyTestCase-class.html#test_countchildren -lxml.tests.test_pyclasslookup.PyClassLookupTestCase lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.test_lookup_get_default lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#test_lookup_get_default -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.test_lookup_getitem_neg lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#test_lookup_getitem_neg -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.test_comments_fallback lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#test_comments_fallback -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.test_lookup_iterchildren lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#test_lookup_iterchildren -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.test_lookup_len lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#test_lookup_len -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.test_lookup_prefix lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#test_lookup_prefix -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.etree lxml.etree-module.html -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.tearDown lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#tearDown -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.test_lookup_keep_ref_assertion lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#test_lookup_keep_ref_assertion -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.test_lookup_getparent lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#test_lookup_getparent -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.test_lookup_iterchildren_tag lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#test_lookup_iterchildren_tag -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.test_lookup_tag lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#test_lookup_tag -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.test_lookup_getitem lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#test_lookup_getitem -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.test_lookup_get lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#test_lookup_get -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.test_lookup_sourceline lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#test_lookup_sourceline -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.test_lookup_attrib lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#test_lookup_attrib -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.test_lookup_bool lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#test_lookup_bool -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.test_lookup_getnext lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#test_lookup_getnext -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.test_lookup_getprevious lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#test_lookup_getprevious -lxml.tests.test_pyclasslookup.PyClassLookupTestCase._buildElementClass lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#_buildElementClass -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#XML -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.test_lookup lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#test_lookup -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.test_lookup_getslice lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#test_lookup_getslice -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.parser lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#parser -lxml.tests.test_pyclasslookup.PyClassLookupTestCase._setClassLookup lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#_setClassLookup -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.test_lookup_text lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#test_lookup_text -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.Element lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#Element -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.test_lookup_getchildren lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#test_lookup_getchildren -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.test_lookup_tail lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#test_lookup_tail -lxml.tests.test_pyclasslookup.PyClassLookupTestCase.test_lookup_iter_children lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html#test_lookup_iter_children -lxml.tests.test_relaxng.ETreeRelaxNGTestCase lxml.tests.test_relaxng.ETreeRelaxNGTestCase-class.html -lxml.tests.test_relaxng.ETreeRelaxNGTestCase.test_relaxng_stringio lxml.tests.test_relaxng.ETreeRelaxNGTestCase-class.html#test_relaxng_stringio -lxml.tests.test_relaxng.ETreeRelaxNGTestCase.test_relaxng_elementtree_error lxml.tests.test_relaxng.ETreeRelaxNGTestCase-class.html#test_relaxng_elementtree_error -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_relaxng.ETreeRelaxNGTestCase.test_relaxng_include lxml.tests.test_relaxng.ETreeRelaxNGTestCase-class.html#test_relaxng_include -lxml.tests.test_relaxng.ETreeRelaxNGTestCase.test_relaxng_invalid_schema lxml.tests.test_relaxng.ETreeRelaxNGTestCase-class.html#test_relaxng_invalid_schema -lxml.tests.test_relaxng.ETreeRelaxNGTestCase.test_relaxng_shortcut lxml.tests.test_relaxng.ETreeRelaxNGTestCase-class.html#test_relaxng_shortcut -lxml.tests.test_relaxng.ETreeRelaxNGTestCase.test_relaxng_invalid_schema4 lxml.tests.test_relaxng.ETreeRelaxNGTestCase-class.html#test_relaxng_invalid_schema4 -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_relaxng.ETreeRelaxNGTestCase.test_relaxng_invalid_schema2 lxml.tests.test_relaxng.ETreeRelaxNGTestCase-class.html#test_relaxng_invalid_schema2 -lxml.tests.test_relaxng.ETreeRelaxNGTestCase.test_relaxng_invalid_schema3 lxml.tests.test_relaxng.ETreeRelaxNGTestCase-class.html#test_relaxng_invalid_schema3 -lxml.tests.test_relaxng.ETreeRelaxNGTestCase.test_relaxng_generic_error lxml.tests.test_relaxng.ETreeRelaxNGTestCase-class.html#test_relaxng_generic_error -lxml.tests.test_relaxng.ETreeRelaxNGTestCase.test_multiple_elementrees lxml.tests.test_relaxng.ETreeRelaxNGTestCase-class.html#test_multiple_elementrees -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_relaxng.ETreeRelaxNGTestCase.test_relaxng lxml.tests.test_relaxng.ETreeRelaxNGTestCase-class.html#test_relaxng -lxml.tests.test_relaxng.ETreeRelaxNGTestCase.test_relaxng_error lxml.tests.test_relaxng.ETreeRelaxNGTestCase-class.html#test_relaxng_error -lxml.tests.test_relaxng.RelaxNGCompactTestCase lxml.tests.test_relaxng.RelaxNGCompactTestCase-class.html -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_relaxng.RelaxNGCompactTestCase.pytestmark lxml.tests.test_relaxng.RelaxNGCompactTestCase-class.html#pytestmark -lxml.tests.test_relaxng.RelaxNGCompactTestCase.test_relaxng_compact lxml.tests.test_relaxng.RelaxNGCompactTestCase-class.html#test_relaxng_compact -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_relaxng.RelaxNGCompactTestCase.test_relaxng_compact_file_obj lxml.tests.test_relaxng.RelaxNGCompactTestCase-class.html#test_relaxng_compact_file_obj -lxml.tests.test_relaxng.RelaxNGCompactTestCase.test_relaxng_compact_str lxml.tests.test_relaxng.RelaxNGCompactTestCase-class.html#test_relaxng_compact_str -lxml.tests.test_sax.ETreeSaxTestCase lxml.tests.test_sax.ETreeSaxTestCase-class.html -lxml.tests.test_sax.ETreeSaxTestCase.test_etree_sax_no_ns_attributes lxml.tests.test_sax.ETreeSaxTestCase-class.html#test_etree_sax_no_ns_attributes -lxml.tests.test_sax.ETreeSaxTestCase.test_etree_sax_pi lxml.tests.test_sax.ETreeSaxTestCase-class.html#test_etree_sax_pi -lxml.tests.test_sax.ETreeSaxTestCase.test_etree_sax_simple lxml.tests.test_sax.ETreeSaxTestCase-class.html#test_etree_sax_simple -lxml.tests.test_sax.ETreeSaxTestCase.test_etree_sax_redefine_ns lxml.tests.test_sax.ETreeSaxTestCase-class.html#test_etree_sax_redefine_ns -lxml.tests.test_sax.ETreeSaxTestCase.test_etree_sax_no_ns lxml.tests.test_sax.ETreeSaxTestCase-class.html#test_etree_sax_no_ns -lxml.tests.test_sax.ETreeSaxTestCase.test_etree_sax_comment lxml.tests.test_sax.ETreeSaxTestCase-class.html#test_etree_sax_comment -lxml.tests.test_sax.ETreeSaxTestCase.test_element_sax_ns lxml.tests.test_sax.ETreeSaxTestCase-class.html#test_element_sax_ns -lxml.tests.test_sax.ETreeSaxTestCase.test_etree_sax_handler_default_ns_None lxml.tests.test_sax.ETreeSaxTestCase-class.html#test_etree_sax_handler_default_ns_None -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_sax.ETreeSaxTestCase._saxify_unsaxify lxml.tests.test_sax.ETreeSaxTestCase-class.html#_saxify_unsaxify -lxml.tests.test_sax.ETreeSaxTestCase.test_etree_sax_error lxml.tests.test_sax.ETreeSaxTestCase-class.html#test_etree_sax_error -lxml.tests.test_sax.ETreeSaxTestCase._saxify_serialize lxml.tests.test_sax.ETreeSaxTestCase-class.html#_saxify_serialize -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_sax.ETreeSaxTestCase.test_etree_sax_ns1 lxml.tests.test_sax.ETreeSaxTestCase-class.html#test_etree_sax_ns1 -lxml.tests.test_sax.ETreeSaxTestCase.test_etree_sax_attributes lxml.tests.test_sax.ETreeSaxTestCase-class.html#test_etree_sax_attributes -lxml.tests.test_sax.ETreeSaxTestCase.test_etree_sax_ns2 lxml.tests.test_sax.ETreeSaxTestCase-class.html#test_etree_sax_ns2 -lxml.tests.test_sax.ETreeSaxTestCase.test_sax_to_pulldom lxml.tests.test_sax.ETreeSaxTestCase-class.html#test_sax_to_pulldom -lxml.tests.test_sax.ETreeSaxTestCase.test_etree_sax_handler_default_ns lxml.tests.test_sax.ETreeSaxTestCase-class.html#test_etree_sax_handler_default_ns -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -lxml.tests.test_sax.ETreeSaxTestCase.test_etree_sax_comment_root lxml.tests.test_sax.ETreeSaxTestCase-class.html#test_etree_sax_comment_root -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_sax.ETreeSaxTestCase.test_etree_sax_error2 lxml.tests.test_sax.ETreeSaxTestCase-class.html#test_etree_sax_error2 -lxml.tests.test_sax.ETreeSaxTestCase.test_etree_sax_pi_root lxml.tests.test_sax.ETreeSaxTestCase-class.html#test_etree_sax_pi_root -lxml.tests.test_sax.ETreeSaxTestCase.test_element_sax lxml.tests.test_sax.ETreeSaxTestCase-class.html#test_element_sax -lxml.tests.test_sax.ETreeSaxTestCase.test_etree_sax_double lxml.tests.test_sax.ETreeSaxTestCase-class.html#test_etree_sax_double -lxml.tests.test_sax.ETreeSaxTestCase.test_etree_sax_ns_attributes lxml.tests.test_sax.ETreeSaxTestCase-class.html#test_etree_sax_ns_attributes -lxml.tests.test_schematron.ETreeSchematronTestCase lxml.tests.test_schematron.ETreeSchematronTestCase-class.html -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_schematron.ETreeSchematronTestCase.test_schematron_elementtree_error lxml.tests.test_schematron.ETreeSchematronTestCase-class.html#test_schematron_elementtree_error -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_schematron.ETreeSchematronTestCase.test_schematron lxml.tests.test_schematron.ETreeSchematronTestCase-class.html#test_schematron -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_schematron.ETreeSchematronTestCase.test_schematron_invalid_schema_empty lxml.tests.test_schematron.ETreeSchematronTestCase-class.html#test_schematron_invalid_schema_empty -lxml.tests.test_schematron.ETreeSchematronTestCase.test_schematron_invalid_schema lxml.tests.test_schematron.ETreeSchematronTestCase-class.html#test_schematron_invalid_schema -lxml.tests.test_schematron.ETreeSchematronTestCase.test_schematron_invalid_schema_namespace lxml.tests.test_schematron.ETreeSchematronTestCase-class.html#test_schematron_invalid_schema_namespace -lxml.tests.test_threading.ThreadPipelineTestCase lxml.tests.test_threading.ThreadPipelineTestCase-class.html -lxml.tests.test_threading.ThreadPipelineTestCase.xml lxml.tests.test_threading.ThreadPipelineTestCase-class.html#xml -lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker-class.html -lxml.tests.test_threading.ThreadPipelineTestCase.Validate lxml.tests.test_threading.ThreadPipelineTestCase.Validate-class.html -lxml.tests.test_threading.ThreadPipelineTestCase.test_thread_pipeline_global_parse lxml.tests.test_threading.ThreadPipelineTestCase-class.html#test_thread_pipeline_global_parse -lxml.tests.test_threading.ThreadPipelineTestCase.etree lxml.etree-module.html -lxml.tests.test_threading.ThreadPipelineTestCase.test_thread_pipeline_thread_parse lxml.tests.test_threading.ThreadPipelineTestCase-class.html#test_thread_pipeline_thread_parse -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_threading.ThreadPipelineTestCase.Worker lxml.tests.test_threading.ThreadPipelineTestCase.Worker-class.html -lxml.tests.test_threading.ThreadPipelineTestCase.item_count lxml.tests.test_threading.ThreadPipelineTestCase-class.html#item_count -lxml.tests.test_threading.ThreadPipelineTestCase._build_pipeline lxml.tests.test_threading.ThreadPipelineTestCase-class.html#_build_pipeline -lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker-class.html -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker-class.html -lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker-class.html -lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndInjectWorker lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndInjectWorker-class.html -lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker-class.html -lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker-class.html -lxml.tests.test_threading.ThreadPipelineTestCase.Worker.__init__ lxml.tests.test_threading.ThreadPipelineTestCase.Worker-class.html#__init__ -lxml.tests.test_threading.ThreadPipelineTestCase.Worker.run lxml.tests.test_threading.ThreadPipelineTestCase.Worker-class.html#run -lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker.handle lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker-class.html#handle -lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndInjectWorker lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndInjectWorker-class.html -lxml.tests.test_threading.ThreadPipelineTestCase.Worker.__init__ lxml.tests.test_threading.ThreadPipelineTestCase.Worker-class.html#__init__ -lxml.tests.test_threading.ThreadPipelineTestCase.Worker.run lxml.tests.test_threading.ThreadPipelineTestCase.Worker-class.html#run -lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndInjectWorker.handle lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndInjectWorker-class.html#handle -lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker-class.html -lxml.tests.test_threading.ThreadPipelineTestCase.Worker.__init__ lxml.tests.test_threading.ThreadPipelineTestCase.Worker-class.html#__init__ -lxml.tests.test_threading.ThreadPipelineTestCase.Worker.run lxml.tests.test_threading.ThreadPipelineTestCase.Worker-class.html#run -lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker.handle lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker-class.html#handle -lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker-class.html -lxml.tests.test_threading.ThreadPipelineTestCase.Worker.__init__ lxml.tests.test_threading.ThreadPipelineTestCase.Worker-class.html#__init__ -lxml.tests.test_threading.ThreadPipelineTestCase.Worker.run lxml.tests.test_threading.ThreadPipelineTestCase.Worker-class.html#run -lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker.handle lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker-class.html#handle -lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker-class.html -lxml.tests.test_threading.ThreadPipelineTestCase.Worker.__init__ lxml.tests.test_threading.ThreadPipelineTestCase.Worker-class.html#__init__ -lxml.tests.test_threading.ThreadPipelineTestCase.Worker.run lxml.tests.test_threading.ThreadPipelineTestCase.Worker-class.html#run -lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker.handle lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker-class.html#handle -lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker-class.html -lxml.tests.test_threading.ThreadPipelineTestCase.Worker.__init__ lxml.tests.test_threading.ThreadPipelineTestCase.Worker-class.html#__init__ -lxml.tests.test_threading.ThreadPipelineTestCase.Worker.run lxml.tests.test_threading.ThreadPipelineTestCase.Worker-class.html#run -lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker.handle lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker-class.html#handle -lxml.tests.test_threading.ThreadPipelineTestCase.Validate lxml.tests.test_threading.ThreadPipelineTestCase.Validate-class.html -lxml.tests.test_threading.ThreadPipelineTestCase.Worker.__init__ lxml.tests.test_threading.ThreadPipelineTestCase.Worker-class.html#__init__ -lxml.tests.test_threading.ThreadPipelineTestCase.Worker.run lxml.tests.test_threading.ThreadPipelineTestCase.Worker-class.html#run -lxml.tests.test_threading.ThreadPipelineTestCase.Validate.handle lxml.tests.test_threading.ThreadPipelineTestCase.Validate-class.html#handle -lxml.tests.test_threading.ThreadPipelineTestCase.Worker lxml.tests.test_threading.ThreadPipelineTestCase.Worker-class.html -lxml.tests.test_threading.ThreadPipelineTestCase.Worker.__init__ lxml.tests.test_threading.ThreadPipelineTestCase.Worker-class.html#__init__ -lxml.tests.test_threading.ThreadPipelineTestCase.Worker.run lxml.tests.test_threading.ThreadPipelineTestCase.Worker-class.html#run -lxml.tests.test_threading.ThreadPipelineTestCase.Worker.handle lxml.tests.test_threading.ThreadPipelineTestCase.Worker-class.html#handle -lxml.tests.test_threading.ThreadingTestCase lxml.tests.test_threading.ThreadingTestCase-class.html -lxml.tests.test_threading.ThreadingTestCase.test_concurrent_class_lookup lxml.tests.test_threading.ThreadingTestCase-class.html#test_concurrent_class_lookup -lxml.tests.test_threading.ThreadingTestCase.test_main_xslt_in_thread lxml.tests.test_threading.ThreadingTestCase-class.html#test_main_xslt_in_thread -lxml.tests.test_threading.ThreadingTestCase._run_thread lxml.tests.test_threading.ThreadingTestCase-class.html#_run_thread -lxml.tests.test_threading.ThreadingTestCase.test_thread_xslt_parsing_error_log lxml.tests.test_threading.ThreadingTestCase-class.html#test_thread_xslt_parsing_error_log -lxml.tests.test_threading.ThreadingTestCase.etree lxml.etree-module.html -lxml.tests.test_threading.ThreadingTestCase.test_thread_mix lxml.tests.test_threading.ThreadingTestCase-class.html#test_thread_mix -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_threading.ThreadingTestCase.test_concurrent_proxies lxml.tests.test_threading.ThreadingTestCase-class.html#test_concurrent_proxies -lxml.tests.test_threading.ThreadingTestCase.test_thread_xslt_attr_replace lxml.tests.test_threading.ThreadingTestCase-class.html#test_thread_xslt_attr_replace -lxml.tests.test_threading.ThreadingTestCase.test_thread_xslt lxml.tests.test_threading.ThreadingTestCase-class.html#test_thread_xslt -lxml.tests.test_threading.ThreadingTestCase.test_subtree_copy_thread lxml.tests.test_threading.ThreadingTestCase-class.html#test_subtree_copy_thread -lxml.tests.test_threading.ThreadingTestCase.test_concurrent_attribute_names_in_dicts lxml.tests.test_threading.ThreadingTestCase-class.html#test_concurrent_attribute_names_in_dicts -lxml.tests.test_threading.ThreadingTestCase.test_thread_create_xslt lxml.tests.test_threading.ThreadingTestCase-class.html#test_thread_create_xslt -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_threading.ThreadingTestCase.test_thread_error_log lxml.tests.test_threading.ThreadingTestCase-class.html#test_thread_error_log -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_threading.ThreadingTestCase.test_thread_xslt_apply_error_log lxml.tests.test_threading.ThreadingTestCase-class.html#test_thread_xslt_apply_error_log -lxml.tests.test_threading.ThreadingTestCase._run_threads lxml.tests.test_threading.ThreadingTestCase-class.html#_run_threads -lxml.tests.test_unicode.EncodingsTestCase lxml.tests.test_unicode.EncodingsTestCase-class.html -lxml.tests.test_unicode.EncodingsTestCase.test_utf8sig_fromstring lxml.tests.test_unicode.EncodingsTestCase-class.html#test_utf8sig_fromstring -lxml.tests.test_unicode.EncodingsTestCase.test_utf16BE_fromstring lxml.tests.test_unicode.EncodingsTestCase-class.html#test_utf16BE_fromstring -lxml.tests.test_unicode.EncodingsTestCase._test_encoding lxml.tests.test_unicode.EncodingsTestCase-class.html#_test_encoding -lxml.tests.test_unicode.EncodingsTestCase.test_utf32LE_fromstring lxml.tests.test_unicode.EncodingsTestCase-class.html#test_utf32LE_fromstring -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_unicode.EncodingsTestCase.test_illegal_utf8_recover lxml.tests.test_unicode.EncodingsTestCase-class.html#test_illegal_utf8_recover -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_unicode.EncodingsTestCase.test_illegal_utf8 lxml.tests.test_unicode.EncodingsTestCase-class.html#test_illegal_utf8 -lxml.tests.test_unicode.EncodingsTestCase.test_utf32BE_fromstring lxml.tests.test_unicode.EncodingsTestCase-class.html#test_utf32BE_fromstring -lxml.tests.test_unicode.EncodingsTestCase.test_utf16LE_fromstring lxml.tests.test_unicode.EncodingsTestCase-class.html#test_utf16LE_fromstring -lxml.tests.test_unicode.EncodingsTestCase.test_utf8_fromstring lxml.tests.test_unicode.EncodingsTestCase-class.html#test_utf8_fromstring -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_unicode.EncodingsTestCase.test_utf32_fromstring lxml.tests.test_unicode.EncodingsTestCase-class.html#test_utf32_fromstring -lxml.tests.test_unicode.EncodingsTestCase.test_utf16_fromstring lxml.tests.test_unicode.EncodingsTestCase-class.html#test_utf16_fromstring -lxml.tests.test_unicode.UnicodeTestCase lxml.tests.test_unicode.UnicodeTestCase-class.html -lxml.tests.test_unicode.UnicodeTestCase.test_unicode_xml_broken lxml.tests.test_unicode.UnicodeTestCase-class.html#test_unicode_xml_broken -lxml.tests.test_unicode.UnicodeTestCase.test_unicode_text lxml.tests.test_unicode.UnicodeTestCase-class.html#test_unicode_text -lxml.tests.test_unicode.UnicodeTestCase.test_unicode_nstag_invalid lxml.tests.test_unicode.UnicodeTestCase-class.html#test_unicode_nstag_invalid -lxml.tests.test_unicode.UnicodeTestCase.test_uniname lxml.tests.test_unicode.UnicodeTestCase-class.html#test_uniname -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_unicode.UnicodeTestCase.test_unicode_nstag lxml.tests.test_unicode.UnicodeTestCase-class.html#test_unicode_nstag -lxml.tests.test_unicode.UnicodeTestCase.test_unicode_attr lxml.tests.test_unicode.UnicodeTestCase-class.html#test_unicode_attr -lxml.tests.test_unicode.UnicodeTestCase.test_unicode_qname lxml.tests.test_unicode.UnicodeTestCase-class.html#test_unicode_qname -lxml.tests.test_unicode.UnicodeTestCase.test__str lxml.tests.test_unicode.UnicodeTestCase-class.html#test__str -lxml.tests.test_unicode.UnicodeTestCase.test_unicode_qname_invalid lxml.tests.test_unicode.UnicodeTestCase-class.html#test_unicode_qname_invalid -lxml.tests.test_unicode.UnicodeTestCase.test_unicode_comment lxml.tests.test_unicode.UnicodeTestCase-class.html#test_unicode_comment -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_unicode.UnicodeTestCase.test_unicode_xml lxml.tests.test_unicode.UnicodeTestCase-class.html#test_unicode_xml -lxml.tests.test_unicode.UnicodeTestCase.test_unicode_repr1 lxml.tests.test_unicode.UnicodeTestCase-class.html#test_unicode_repr1 -lxml.tests.test_unicode.UnicodeTestCase.test_unicode_repr2 lxml.tests.test_unicode.UnicodeTestCase-class.html#test_unicode_repr2 -lxml.tests.test_unicode.UnicodeTestCase.test_unicode_repr3 lxml.tests.test_unicode.UnicodeTestCase-class.html#test_unicode_repr3 -lxml.tests.test_unicode.UnicodeTestCase.test_unicode_repr4 lxml.tests.test_unicode.UnicodeTestCase-class.html#test_unicode_repr4 -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_unicode.UnicodeTestCase.test_unicode_ns_invalid lxml.tests.test_unicode.UnicodeTestCase-class.html#test_unicode_ns_invalid -lxml.tests.test_unicode.UnicodeTestCase.test_wide_unicode_xml lxml.tests.test_unicode.UnicodeTestCase-class.html#test_wide_unicode_xml -lxml.tests.test_unicode.UnicodeTestCase.test_unicode_tag lxml.tests.test_unicode.UnicodeTestCase-class.html#test_unicode_tag -lxml.tests.test_unicode.UnicodeTestCase.test_unicode_parse_stringio lxml.tests.test_unicode.UnicodeTestCase-class.html#test_unicode_parse_stringio -lxml.tests.test_unicode.UnicodeTestCase.test_unicode_tag_invalid lxml.tests.test_unicode.UnicodeTestCase-class.html#test_unicode_tag_invalid -lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase-class.html -lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase.resolver_schema_int2 lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase-class.html#resolver_schema_int2 -lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase.test_xmlschema_resolvers_noroot lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase-class.html#test_xmlschema_resolvers_noroot -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase.test_xmlschema_resolvers_root lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase-class.html#test_xmlschema_resolvers_root -lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase.test_xmlschema_nested_resolvers lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase-class.html#test_xmlschema_nested_resolvers -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase.simple_resolver lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase.simple_resolver-class.html -lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase.test_xmlschema_resolvers lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase-class.html#test_xmlschema_resolvers -lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase.resolver_schema_ext lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase-class.html#resolver_schema_ext -lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase.resolver_schema_int lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase-class.html#resolver_schema_int -lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase.simple_resolver lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase.simple_resolver-class.html -lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase.simple_resolver.resolve lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase.simple_resolver-class.html#resolve -lxml.etree.Resolver.resolve_filename lxml.etree.Resolver-class.html#resolve_filename -lxml.etree.Resolver.__new__ lxml.etree.Resolver-class.html#__new__ -lxml.etree.Resolver.resolve_string lxml.etree.Resolver-class.html#resolve_string -lxml.etree.Resolver.resolve_file lxml.etree.Resolver-class.html#resolve_file -lxml.etree.Resolver.resolve_empty lxml.etree.Resolver-class.html#resolve_empty -lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase.simple_resolver.__init__ lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase.simple_resolver-class.html#__init__ -lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html -lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase.test_xmlschema_import_file lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html#test_xmlschema_import_file -lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase.test_xmlschema_shortcut lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html#test_xmlschema_shortcut -lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase.test_xmlschema_default_attributes lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html#test_xmlschema_default_attributes -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase.test_xmlschema_parse lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html#test_xmlschema_parse -lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase.test_xmlschema_iterparse_fail lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html#test_xmlschema_iterparse_fail -lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase.test_xmlschema_parse_default_attributes lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html#test_xmlschema_parse_default_attributes -lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase.test_xmlschema_iterparse_incomplete lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html#test_xmlschema_iterparse_incomplete -lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase.test_xmlschema_stringio lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html#test_xmlschema_stringio -lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase.test_xmlschema_illegal_validation_error lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html#test_xmlschema_illegal_validation_error -lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase.test_xmlschema_invalid_schema2 lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html#test_xmlschema_invalid_schema2 -lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase.test_xmlschema_invalid_schema1 lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html#test_xmlschema_invalid_schema1 -lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase.test_xmlschema_comment_error lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html#test_xmlschema_comment_error -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase.test_xmlschema_elementtree_error lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html#test_xmlschema_elementtree_error -lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase.test_xmlschema_file lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html#test_xmlschema_file -lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase.test_xmlschema_parse_default_attributes_schema_config lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html#test_xmlschema_parse_default_attributes_schema_config -lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase.test_xmlschema lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html#test_xmlschema -lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase.test_xmlschema_error_log_path lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html#test_xmlschema_error_log_path -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase.test_xmlschema_error_log lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html#test_xmlschema_error_log -lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase.test_xmlschema_iterparse lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html#test_xmlschema_iterparse -lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase.test_create_from_partial_doc lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html#test_create_from_partial_doc -lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase.test_xmlschema_parse_fixed_attributes lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html#test_xmlschema_parse_fixed_attributes -lxml.tests.test_xpathevaluator.ETreeETXPathClassTestCase lxml.tests.test_xpathevaluator.ETreeETXPathClassTestCase-class.html -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_xpathevaluator.ETreeETXPathClassTestCase._test_xpath_compile_unicode lxml.tests.test_xpathevaluator.ETreeETXPathClassTestCase-class.html#_test_xpath_compile_unicode -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_xpathevaluator.ETreeETXPathClassTestCase.test_xpath_compile_ns lxml.tests.test_xpathevaluator.ETreeETXPathClassTestCase-class.html#test_xpath_compile_ns -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_xpathevaluator.ETreeXPathClassTestCase lxml.tests.test_xpathevaluator.ETreeXPathClassTestCase-class.html -lxml.tests.test_xpathevaluator.ETreeXPathClassTestCase.test_xpath_compile_element lxml.tests.test_xpathevaluator.ETreeXPathClassTestCase-class.html#test_xpath_compile_element -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_xpathevaluator.ETreeXPathClassTestCase.test_xpath_compile_vars lxml.tests.test_xpathevaluator.ETreeXPathClassTestCase-class.html#test_xpath_compile_vars -lxml.tests.test_xpathevaluator.ETreeXPathClassTestCase.test_xpath_compile_doc lxml.tests.test_xpathevaluator.ETreeXPathClassTestCase-class.html#test_xpath_compile_doc -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_xpathevaluator.ETreeXPathClassTestCase.test_xpath_elementtree_error lxml.tests.test_xpathevaluator.ETreeXPathClassTestCase-class.html#test_xpath_elementtree_error -lxml.tests.test_xpathevaluator.ETreeXPathClassTestCase.test_xpath_compile_error lxml.tests.test_xpathevaluator.ETreeXPathClassTestCase-class.html#test_xpath_compile_error -lxml.tests.test_xpathevaluator.ETreeXPathExsltTestCase lxml.tests.test_xpathevaluator.ETreeXPathExsltTestCase-class.html -lxml.tests.test_xpathevaluator.ETreeXPathExsltTestCase.test_xpath_exslt_functions_strings lxml.tests.test_xpathevaluator.ETreeXPathExsltTestCase-class.html#test_xpath_exslt_functions_strings -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_xpathevaluator.ETreeXPathExsltTestCase.NSMAP lxml.tests.test_xpathevaluator.ETreeXPathExsltTestCase-class.html#NSMAP -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_xpathevaluator.ETreeXPathExsltTestCase.test_xpath_exslt_functions_date lxml.tests.test_xpathevaluator.ETreeXPathExsltTestCase-class.html#test_xpath_exslt_functions_date -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_xpathevaluator.ETreeXPathTestCase lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_list_comment lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_list_comment -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_boolean lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_boolean -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_prefix_error lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_prefix_error -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_elementtree_getpath_partial lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_elementtree_getpath_partial -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_evaluator_element lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_evaluator_element -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_list_attribute_parent lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_list_attribute_parent -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_elementtree_getpath lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_elementtree_getpath -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_list_text_parent lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_list_text_parent -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_error lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_error -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_variables lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_variables -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_eval_context_propagation lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_eval_context_propagation -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_list_elements lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_list_elements -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_namespace lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_namespace -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_evaluator_tree lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_evaluator_tree -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_list_unicode_text_parent lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_list_unicode_text_parent -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_extensions_mix lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_extensions_mix -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_namespace_empty lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_namespace_empty -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_eval_context_clear lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_eval_context_clear -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_list_nothing lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_list_nothing -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_class_error lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_class_error -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_extensions_nodes lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_extensions_nodes -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_extensions_nodes_append lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_extensions_nodes_append -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_variables_nodeset lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_variables_nodeset -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_extensions_nodes_append2 lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_extensions_nodes_append2 -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_string lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_string -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_extensions lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_extensions -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_ns_none lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_ns_none -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_list_text lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_list_text -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_list_attribute_parent_no_smart_strings lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_list_attribute_parent_no_smart_strings -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_document_root lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_document_root -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_extensions_wrong_args lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_extensions_wrong_args -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_list_attribute lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_list_attribute -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_evaluator lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_evaluator -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_text_from_other_document lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_text_from_other_document -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_number lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_number -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_ns_empty lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_ns_empty -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_rel_xpath_list_elements lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_rel_xpath_list_elements -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_list_text_parent_no_smart_strings lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_list_text_parent_no_smart_strings -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_rel_xpath_boolean lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_rel_xpath_boolean -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_evaluator_tree_absolute lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_evaluator_tree_absolute -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_class_prefix_error lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_class_prefix_error -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_context_node lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_context_node -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_extensions_error lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_extensions_error -lxml.tests.test_xpathevaluator.ETreeXPathTestCase.test_xpath_ns lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html#test_xpath_ns -lxml.tests.test_xslt.ETreeEXSLTTestCase lxml.tests.test_xslt.ETreeEXSLTTestCase-class.html -lxml.tests.test_xslt.ETreeEXSLTTestCase.test_exslt_regexp_match lxml.tests.test_xslt.ETreeEXSLTTestCase-class.html#test_exslt_regexp_match -lxml.tests.test_xslt.ETreeEXSLTTestCase.test_exslt_regexp_match1 lxml.tests.test_xslt.ETreeEXSLTTestCase-class.html#test_exslt_regexp_match1 -lxml.tests.test_xslt.ETreeEXSLTTestCase.test_exslt_regexp_match2 lxml.tests.test_xslt.ETreeEXSLTTestCase-class.html#test_exslt_regexp_match2 -lxml.tests.test_xslt.ETreeEXSLTTestCase.test_exslt_str lxml.tests.test_xslt.ETreeEXSLTTestCase-class.html#test_exslt_str -lxml.tests.test_xslt.ETreeEXSLTTestCase._test_exslt_regexp_match4 lxml.tests.test_xslt.ETreeEXSLTTestCase-class.html#_test_exslt_regexp_match4 -lxml.tests.test_xslt.ETreeEXSLTTestCase._test_exslt_regexp_match3 lxml.tests.test_xslt.ETreeEXSLTTestCase-class.html#_test_exslt_regexp_match3 -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_xslt.ETreeEXSLTTestCase.test_exslt_regexp_replace lxml.tests.test_xslt.ETreeEXSLTTestCase-class.html#test_exslt_regexp_replace -lxml.tests.test_xslt.ETreeEXSLTTestCase.test_exslt_regexp_test lxml.tests.test_xslt.ETreeEXSLTTestCase-class.html#test_exslt_regexp_test -lxml.tests.test_xslt.ETreeEXSLTTestCase.test_exslt_math lxml.tests.test_xslt.ETreeEXSLTTestCase-class.html#test_exslt_math -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_xslt.ETreeEXSLTTestCase.test_exslt_str_attribute_replace lxml.tests.test_xslt.ETreeEXSLTTestCase-class.html#test_exslt_str_attribute_replace -lxml.tests.test_xslt.ETreeEXSLTTestCase.test_exslt_regexp_match_groups lxml.tests.test_xslt.ETreeEXSLTTestCase-class.html#test_exslt_regexp_match_groups -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_xslt.ETreeXSLTExtElementTestCase lxml.tests.test_xslt.ETreeXSLTExtElementTestCase-class.html -lxml.tests.test_xslt.ETreeXSLTExtElementTestCase._test_extension_element_attribute_context lxml.tests.test_xslt.ETreeXSLTExtElementTestCase-class.html#_test_extension_element_attribute_context -lxml.tests.test_xslt.ETreeXSLTExtElementTestCase.test_extension_element_apply_templates_elements_only lxml.tests.test_xslt.ETreeXSLTExtElementTestCase-class.html#test_extension_element_apply_templates_elements_only -lxml.tests.test_xslt.ETreeXSLTExtElementTestCase.test_extension_element_apply_templates_target_node lxml.tests.test_xslt.ETreeXSLTExtElementTestCase-class.html#test_extension_element_apply_templates_target_node -lxml.tests.test_xslt.ETreeXSLTExtElementTestCase.test_extension_element_apply_templates lxml.tests.test_xslt.ETreeXSLTExtElementTestCase-class.html#test_extension_element_apply_templates -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_xslt.ETreeXSLTExtElementTestCase.test_extension_element_apply_templates_remove_blank_text lxml.tests.test_xslt.ETreeXSLTExtElementTestCase-class.html#test_extension_element_apply_templates_remove_blank_text -lxml.tests.test_xslt.ETreeXSLTExtElementTestCase.test_extension_element_content lxml.tests.test_xslt.ETreeXSLTExtElementTestCase-class.html#test_extension_element_content -lxml.tests.test_xslt.ETreeXSLTExtElementTestCase.test_extension_element_process_children_to_append_only lxml.tests.test_xslt.ETreeXSLTExtElementTestCase-class.html#test_extension_element_process_children_to_append_only -lxml.tests.test_xslt.ETreeXSLTExtElementTestCase.test_extension_element_process_children lxml.tests.test_xslt.ETreeXSLTExtElementTestCase-class.html#test_extension_element_process_children -lxml.tests.test_xslt.ETreeXSLTExtElementTestCase.test_extension_element_process_children_to_read_only_raise lxml.tests.test_xslt.ETreeXSLTExtElementTestCase-class.html#test_extension_element_process_children_to_read_only_raise -lxml.tests.test_xslt.ETreeXSLTExtElementTestCase.test_extension_element_comment_pi_context lxml.tests.test_xslt.ETreeXSLTExtElementTestCase-class.html#test_extension_element_comment_pi_context -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_xslt.ETreeXSLTExtElementTestCase.test_extension_element_apply_templates_target_node_doc lxml.tests.test_xslt.ETreeXSLTExtElementTestCase-class.html#test_extension_element_apply_templates_target_node_doc -lxml.tests.test_xslt.ETreeXSLTExtElementTestCase.test_extension_element_raise lxml.tests.test_xslt.ETreeXSLTExtElementTestCase-class.html#test_extension_element_raise -lxml.tests.test_xslt.ETreeXSLTExtElementTestCase.test_extension_element_process_children_with_subextension_element lxml.tests.test_xslt.ETreeXSLTExtElementTestCase-class.html#test_extension_element_process_children_with_subextension_element -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_xslt.ETreeXSLTExtElementTestCase._test_multiple_extension_elements_with_output_parent lxml.tests.test_xslt.ETreeXSLTExtElementTestCase-class.html#_test_multiple_extension_elements_with_output_parent -lxml.tests.test_xslt.ETreeXSLTExtElementTestCase.test_extension_element_doc_context lxml.tests.test_xslt.ETreeXSLTExtElementTestCase-class.html#test_extension_element_doc_context -lxml.tests.test_xslt.ETreeXSLTExtElementTestCase.test_extension_element lxml.tests.test_xslt.ETreeXSLTExtElementTestCase-class.html#test_extension_element -lxml.tests.test_xslt.ETreeXSLTExtFuncTestCase lxml.tests.test_xslt.ETreeXSLTExtFuncTestCase-class.html -lxml.tests.test_xslt.ETreeXSLTExtFuncTestCase.test_variable_result_tree_fragment lxml.tests.test_xslt.ETreeXSLTExtFuncTestCase-class.html#test_variable_result_tree_fragment -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_xslt.ETreeXSLTExtFuncTestCase.test_xpath_on_context_node lxml.tests.test_xslt.ETreeXSLTExtFuncTestCase-class.html#test_xpath_on_context_node -lxml.tests.test_xslt.ETreeXSLTExtFuncTestCase.test_extensions2 lxml.tests.test_xslt.ETreeXSLTExtFuncTestCase-class.html#test_extensions2 -lxml.tests.test_xslt.ETreeXSLTExtFuncTestCase.test_extensions1 lxml.tests.test_xslt.ETreeXSLTExtFuncTestCase-class.html#test_extensions1 -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_xslt.ETreeXSLTExtFuncTestCase.test_xpath_on_foreign_context_node lxml.tests.test_xslt.ETreeXSLTExtFuncTestCase-class.html#test_xpath_on_foreign_context_node -lxml.tests.test_xslt.ETreeXSLTTestCase lxml.tests.test_xslt.ETreeXSLTTestCase-class.html -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_parameter_xpath lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_parameter_xpath -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_default_parameters lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_default_parameters -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_repeat_transform lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_repeat_transform -lxml.tests.test_xslt.ETreeXSLTTestCase._xslt_setup lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#_xslt_setup -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_pi_set_replace lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_pi_set_replace -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_pi_get_all lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_pi_get_all -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_html_output lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_html_output -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_parsing_error_log lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_parsing_error_log -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_access_control_repr lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_access_control_repr -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_parameter_invalid lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_parameter_invalid -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_shortcut lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_shortcut -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_document_parse_allow lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_document_parse_allow -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_message lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_message -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_write_output_file_path lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_write_output_file_path -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_write_output_bytesio lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_write_output_bytesio -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_unicode lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_unicode -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_write_output_file lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_write_output_file -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_message_terminate lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_message_terminate -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_input lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_input -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_resolver_url_building lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_resolver_url_building -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_broken lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_broken -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_copy lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_copy -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_apply_error_log lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_apply_error_log -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_input_none lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_input_none -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_pi_get lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_pi_get -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_unicode_standalone lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_unicode_standalone -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_parameter_xpath_object lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_parameter_xpath_object -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_pi_get_unknown lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_pi_get_unknown -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_multiple_transforms lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_multiple_transforms -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_write_output_failure lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_write_output_failure -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_document_error lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_document_error -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_empty lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_empty -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_parameter_missing lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_parameter_missing -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_invalid_stylesheet lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_invalid_stylesheet -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_encoding_override lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_encoding_override -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_include_from_filelike lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_include_from_filelike -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_elementtree_error lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_elementtree_error -lxml.tests.test_xslt.ETreeXSLTTestCase.test_multiple_elementrees lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_multiple_elementrees -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_input_partial_doc lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_input_partial_doc -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_include lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_include -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_pi_embedded_id lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_pi_embedded_id -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_document_parse_deny lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_document_parse_deny -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_document_XML_resolver lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_document_XML_resolver -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_move_result lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_move_result -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_string_parameters lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_string_parameters -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_document_parse_deny_all lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_document_parse_deny_all -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_document_elementtree lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_document_elementtree -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_multiple_parameters lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_multiple_parameters -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_parameters lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_parameters -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_document_XML lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_document_XML -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_pi_embedded_xmlid lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_pi_embedded_xmlid -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_pi lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_pi -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_pi_set_new lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_pi_set_new -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_document_parse lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_document_parse -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_utf8 lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_utf8 -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_encoding lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_encoding -lxml.tests.test_xslt.ETreeXSLTTestCase.test_xslt_pi_get_all_reversed lxml.tests.test_xslt.ETreeXSLTTestCase-class.html#test_xslt_pi_get_all_reversed -lxml.tests.test_xslt.Py3XSLTTestCase lxml.tests.test_xslt.Py3XSLTTestCase-class.html -lxml.tests.test_xslt.Py3XSLTTestCase.test_xslt_result_bytes lxml.tests.test_xslt.Py3XSLTTestCase-class.html#test_xslt_result_bytes -lxml.tests.common_imports.HelperTestCase.tearDown lxml.tests.common_imports.HelperTestCase-class.html#tearDown -lxml.tests.test_xslt.Py3XSLTTestCase.pytestmark lxml.tests.test_xslt.Py3XSLTTestCase-class.html#pytestmark -lxml.tests.test_xslt.Py3XSLTTestCase.test_xslt_result_bytearray lxml.tests.test_xslt.Py3XSLTTestCase-class.html#test_xslt_result_bytearray -lxml.tests.test_xslt.Py3XSLTTestCase.test_xslt_result_memoryview lxml.tests.test_xslt.Py3XSLTTestCase-class.html#test_xslt_result_memoryview -lxml.tests.common_imports.HelperTestCase._rootstring lxml.tests.common_imports.HelperTestCase-class.html#_rootstring -lxml.tests.common_imports.HelperTestCase.parse lxml.tests.common_imports.HelperTestCase-class.html#parse -unittest.case.TestCase.failureException exceptions.AssertionError-class.html -mimetools.Message mimetools.Message-class.html -mimetools.Message.getmaintype mimetools.Message-class.html#getmaintype -mimetools.Message.getsubtype mimetools.Message-class.html#getsubtype -mimetools.Message.parseplist mimetools.Message-class.html#parseplist -mimetools.Message.__init__ mimetools.Message-class.html#__init__ -mimetools.Message.getparamnames mimetools.Message-class.html#getparamnames -mimetools.Message.getencoding mimetools.Message-class.html#getencoding -mimetools.Message.getparam mimetools.Message-class.html#getparam -mimetools.Message.parsetype mimetools.Message-class.html#parsetype -mimetools.Message.getplist mimetools.Message-class.html#getplist -mimetools.Message.gettype mimetools.Message-class.html#gettype -str str-class.html -str.upper str-class.html#upper -str.__getslice__ str-class.html#__getslice__ -str.__ne__ str-class.html#__ne__ -str.lstrip str-class.html#lstrip -str.__str__ str-class.html#__str__ -str.__getattribute__ str-class.html#__getattribute__ -str.rpartition str-class.html#rpartition -str.replace str-class.html#replace -str.isdigit str-class.html#isdigit -str.endswith str-class.html#endswith -str.splitlines str-class.html#splitlines -str.rfind str-class.html#rfind -str.strip str-class.html#strip -str.__rmul__ str-class.html#__rmul__ -str.__lt__ str-class.html#__lt__ -str.__getnewargs__ str-class.html#__getnewargs__ -str.__rmod__ str-class.html#__rmod__ -str.index str-class.html#index -str.ljust str-class.html#ljust -str.__new__ str-class.html#__new__ -str.isalnum str-class.html#isalnum -str.__contains__ str-class.html#__contains__ -str.rindex str-class.html#rindex -str.rsplit str-class.html#rsplit -str.__format__ str-class.html#__format__ -str.find str-class.html#find -str.decode str-class.html#decode -str.isalpha str-class.html#isalpha -str.__eq__ str-class.html#__eq__ -str.split str-class.html#split -str.rstrip str-class.html#rstrip -str.encode str-class.html#encode -str._formatter_parser str-class.html#_formatter_parser -str.translate str-class.html#translate -str.isspace str-class.html#isspace -str.__len__ str-class.html#__len__ -str.__repr__ str-class.html#__repr__ -str.startswith str-class.html#startswith -str.__getitem__ str-class.html#__getitem__ -str.format str-class.html#format -str.rjust str-class.html#rjust -str.swapcase str-class.html#swapcase -str.__hash__ str-class.html#__hash__ -str.zfill str-class.html#zfill -str.__add__ str-class.html#__add__ -str.__gt__ str-class.html#__gt__ -str.capitalize str-class.html#capitalize -str.__sizeof__ str-class.html#__sizeof__ -str.count str-class.html#count -str.lower str-class.html#lower -str.join str-class.html#join -str.center str-class.html#center -str.__mod__ str-class.html#__mod__ -str.partition str-class.html#partition -str.expandtabs str-class.html#expandtabs -str.istitle str-class.html#istitle -str.__le__ str-class.html#__le__ -str.__mul__ str-class.html#__mul__ -str._formatter_field_name_split str-class.html#_formatter_field_name_split -str.islower str-class.html#islower -str.title str-class.html#title -str.isupper str-class.html#isupper -str.__ge__ str-class.html#__ge__ -xml.etree.ElementTree.Element xml.etree.ElementTree.Element-class.html -xml.etree.ElementTree.Element.set xml.etree.ElementTree.Element-class.html#set -xml.etree.ElementTree.Element.text xml.etree.ElementTree.Element-class.html#text -xml.etree.ElementTree.Element.iterfind xml.etree.ElementTree.Element-class.html#iterfind -xml.etree.ElementTree.Element.tag xml.etree.ElementTree.Element-class.html#tag -xml.etree.ElementTree.Element.iter xml.etree.ElementTree.Element-class.html#iter -xml.etree.ElementTree.Element.findall xml.etree.ElementTree.Element-class.html#findall -xml.etree.ElementTree.Element.append xml.etree.ElementTree.Element-class.html#append -xml.etree.ElementTree.Element.__getitem__ xml.etree.ElementTree.Element-class.html#__getitem__ -xml.etree.ElementTree.Element.itertext xml.etree.ElementTree.Element-class.html#itertext -xml.etree.ElementTree.Element.findtext xml.etree.ElementTree.Element-class.html#findtext -xml.etree.ElementTree.Element.tail xml.etree.ElementTree.Element-class.html#tail -xml.etree.ElementTree.Element.find xml.etree.ElementTree.Element-class.html#find -xml.etree.ElementTree.Element.getchildren xml.etree.ElementTree.Element-class.html#getchildren -xml.etree.ElementTree.Element.__init__ xml.etree.ElementTree.Element-class.html#__init__ -xml.etree.ElementTree.Element.__delitem__ xml.etree.ElementTree.Element-class.html#__delitem__ -xml.etree.ElementTree.Element.__len__ xml.etree.ElementTree.Element-class.html#__len__ -xml.etree.ElementTree.Element.extend xml.etree.ElementTree.Element-class.html#extend -xml.etree.ElementTree.Element.get xml.etree.ElementTree.Element-class.html#get -xml.etree.ElementTree.Element.keys xml.etree.ElementTree.Element-class.html#keys -xml.etree.ElementTree.Element.makeelement xml.etree.ElementTree.Element-class.html#makeelement -xml.etree.ElementTree.Element.__setitem__ xml.etree.ElementTree.Element-class.html#__setitem__ -xml.etree.ElementTree.Element.copy xml.etree.ElementTree.Element-class.html#copy -xml.etree.ElementTree.Element.insert xml.etree.ElementTree.Element-class.html#insert -xml.etree.ElementTree.Element.__nonzero__ xml.etree.ElementTree.Element-class.html#__nonzero__ -xml.etree.ElementTree.Element.items xml.etree.ElementTree.Element-class.html#items -xml.etree.ElementTree.Element.clear xml.etree.ElementTree.Element-class.html#clear -xml.etree.ElementTree.Element.remove xml.etree.ElementTree.Element-class.html#remove -xml.etree.ElementTree.Element.__repr__ xml.etree.ElementTree.Element-class.html#__repr__ -xml.etree.ElementTree.Element.getiterator xml.etree.ElementTree.Element-class.html#getiterator -xml.etree.ElementTree.Element.attrib xml.etree.ElementTree.Element-class.html#attrib -xml.etree.ElementTree.ElementTree xml.etree.ElementTree.ElementTree-class.html -xml.etree.ElementTree.ElementTree.getroot xml.etree.ElementTree.ElementTree-class.html#getroot -xml.etree.ElementTree.ElementTree.iterfind xml.etree.ElementTree.ElementTree-class.html#iterfind -xml.etree.ElementTree.ElementTree.parse xml.etree.ElementTree.ElementTree-class.html#parse -xml.etree.ElementTree.ElementTree.findall xml.etree.ElementTree.ElementTree-class.html#findall -xml.etree.ElementTree.ElementTree.__init__ xml.etree.ElementTree.ElementTree-class.html#__init__ -xml.etree.ElementTree.ElementTree.findtext xml.etree.ElementTree.ElementTree-class.html#findtext -xml.etree.ElementTree.ElementTree.find xml.etree.ElementTree.ElementTree-class.html#find -xml.etree.ElementTree.ElementTree.write xml.etree.ElementTree.ElementTree-class.html#write -xml.etree.ElementTree.ElementTree._setroot xml.etree.ElementTree.ElementTree-class.html#_setroot -xml.etree.ElementTree.ElementTree.write_c14n xml.etree.ElementTree.ElementTree-class.html#write_c14n -xml.etree.ElementTree.ElementTree.getiterator xml.etree.ElementTree.ElementTree-class.html#getiterator -xml.etree.ElementTree.ElementTree.iter xml.etree.ElementTree.ElementTree-class.html#iter -xml.etree.ElementTree.ParseError xml.etree.ElementTree.ParseError-class.html -xml.etree.ElementTree.QName xml.etree.ElementTree.QName-class.html -xml.etree.ElementTree.QName.__str__ xml.etree.ElementTree.QName-class.html#__str__ -xml.etree.ElementTree.QName.__cmp__ xml.etree.ElementTree.QName-class.html#__cmp__ -xml.etree.ElementTree.QName.__hash__ xml.etree.ElementTree.QName-class.html#__hash__ -xml.etree.ElementTree.QName.__init__ xml.etree.ElementTree.QName-class.html#__init__ -xml.etree.ElementTree.TreeBuilder xml.etree.ElementTree.TreeBuilder-class.html -xml.etree.ElementTree.TreeBuilder.end xml.etree.ElementTree.TreeBuilder-class.html#end -xml.etree.ElementTree.TreeBuilder.start xml.etree.ElementTree.TreeBuilder-class.html#start -xml.etree.ElementTree.TreeBuilder._flush xml.etree.ElementTree.TreeBuilder-class.html#_flush -xml.etree.ElementTree.TreeBuilder.close xml.etree.ElementTree.TreeBuilder-class.html#close -xml.etree.ElementTree.TreeBuilder.data xml.etree.ElementTree.TreeBuilder-class.html#data -xml.etree.ElementTree.TreeBuilder.__init__ xml.etree.ElementTree.TreeBuilder-class.html#__init__ -xml.etree.ElementTree.XMLParser xml.etree.ElementTree.XMLParser-class.html -xml.etree.ElementTree.XMLParser.feed xml.etree.ElementTree.XMLParser-class.html#feed -xml.etree.ElementTree.XMLParser.__doctype xml.etree.ElementTree.XMLParser-class.html#__doctype -xml.etree.ElementTree.XMLParser._fixtext xml.etree.ElementTree.XMLParser-class.html#_fixtext -xml.etree.ElementTree.XMLParser._fixname xml.etree.ElementTree.XMLParser-class.html#_fixname -xml.etree.ElementTree.XMLParser.close xml.etree.ElementTree.XMLParser-class.html#close -xml.etree.ElementTree.XMLParser._start xml.etree.ElementTree.XMLParser-class.html#_start -xml.etree.ElementTree.XMLParser.__init__ xml.etree.ElementTree.XMLParser-class.html#__init__ -xml.etree.ElementTree.XMLParser._pi xml.etree.ElementTree.XMLParser-class.html#_pi -xml.etree.ElementTree.XMLParser._end xml.etree.ElementTree.XMLParser-class.html#_end -xml.etree.ElementTree.XMLParser._default xml.etree.ElementTree.XMLParser-class.html#_default -xml.etree.ElementTree.XMLParser._start_list xml.etree.ElementTree.XMLParser-class.html#_start_list -xml.etree.ElementTree.XMLParser._data xml.etree.ElementTree.XMLParser-class.html#_data -xml.etree.ElementTree.XMLParser._raiseerror xml.etree.ElementTree.XMLParser-class.html#_raiseerror -xml.etree.ElementTree.XMLParser._comment xml.etree.ElementTree.XMLParser-class.html#_comment -xml.etree.ElementTree.XMLParser.doctype xml.etree.ElementTree.XMLParser-class.html#doctype -xml.etree.ElementTree._IterParseIterator xml.etree.ElementTree._IterParseIterator-class.html -xml.etree.ElementTree._IterParseIterator.next xml.etree.ElementTree._IterParseIterator-class.html#next -xml.etree.ElementTree._IterParseIterator.__iter__ xml.etree.ElementTree._IterParseIterator-class.html#__iter__ -xml.etree.ElementTree._IterParseIterator.__init__ xml.etree.ElementTree._IterParseIterator-class.html#__init__ -xml.etree.ElementTree._SimpleElementPath xml.etree.ElementTree._SimpleElementPath-class.html -xml.etree.ElementTree._SimpleElementPath.iterfind xml.etree.ElementTree._SimpleElementPath-class.html#iterfind -xml.etree.ElementTree._SimpleElementPath.findtext xml.etree.ElementTree._SimpleElementPath-class.html#findtext -xml.etree.ElementTree._SimpleElementPath.find xml.etree.ElementTree._SimpleElementPath-class.html#find -xml.etree.ElementTree._SimpleElementPath.findall xml.etree.ElementTree._SimpleElementPath-class.html#findall diff --git a/doc/html/api/class-tree.html b/doc/html/api/class-tree.html deleted file mode 100644 index 77e7dd5..0000000 --- a/doc/html/api/class-tree.html +++ /dev/null @@ -1,1355 +0,0 @@ - - - - - Class Hierarchy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
- [ Module Hierarchy - | Class Hierarchy ] -

-

Class Hierarchy

- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/cssselect.parser.SelectorError-class.html b/doc/html/api/cssselect.parser.SelectorError-class.html deleted file mode 100644 index 788db1a..0000000 --- a/doc/html/api/cssselect.parser.SelectorError-class.html +++ /dev/null @@ -1,217 +0,0 @@ - - - - - cssselect.parser.SelectorError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - cssselect :: - parser :: - SelectorError :: - Class SelectorError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class SelectorError

-
-              object --+        
-                       |        
-exceptions.BaseException --+    
-                           |    
-        exceptions.Exception --+
-                               |
-                              SelectorError
-
- -
Known Subclasses:
-
- -
- -
-
-Common parent for :class:`SelectorSyntaxError` and
-:class:`ExpressionError`.
-
-You can just use ``except SelectorError:`` when calling
-:meth:`~GenericTranslator.css_to_xpath` and handle both exceptions types.
-
-
- - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from exceptions.Exception: - __init__, - __new__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/cssselect.parser.SelectorSyntaxError-class.html b/doc/html/api/cssselect.parser.SelectorSyntaxError-class.html deleted file mode 100644 index 12cd26a..0000000 --- a/doc/html/api/cssselect.parser.SelectorSyntaxError-class.html +++ /dev/null @@ -1,224 +0,0 @@ - - - - - cssselect.parser.SelectorSyntaxError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - cssselect :: - parser :: - SelectorSyntaxError :: - Class SelectorSyntaxError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class SelectorSyntaxError

-
-                  object --+            
-                           |            
-    exceptions.BaseException --+        
-                               |        
-            exceptions.Exception --+    
-                                   |    
-                       SelectorError --+
-                                       |
-              object --+               |
-                       |               |
-exceptions.BaseException --+           |
-                           |           |
-        exceptions.Exception --+       |
-                               |       |
-        exceptions.StandardError --+   |
-                                   |   |
-              exceptions.SyntaxError --+
-                                       |
-                                      SelectorSyntaxError
-
- -
-Parsing a selector that does not match the grammar. - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from exceptions.SyntaxError: - __init__, - __new__, - __str__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.SyntaxError: - filename, - lineno, - msg, - offset, - print_file_and_line, - text -

-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/cssselect.xpath.ExpressionError-class.html b/doc/html/api/cssselect.xpath.ExpressionError-class.html deleted file mode 100644 index f7d903e..0000000 --- a/doc/html/api/cssselect.xpath.ExpressionError-class.html +++ /dev/null @@ -1,216 +0,0 @@ - - - - - cssselect.xpath.ExpressionError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - cssselect :: - xpath :: - ExpressionError :: - Class ExpressionError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ExpressionError

-
-                  object --+            
-                           |            
-    exceptions.BaseException --+        
-                               |        
-            exceptions.Exception --+    
-                                   |    
-                parser.SelectorError --+
-                                       |
-              object --+               |
-                       |               |
-exceptions.BaseException --+           |
-                           |           |
-        exceptions.Exception --+       |
-                               |       |
-        exceptions.StandardError --+   |
-                                   |   |
-             exceptions.RuntimeError --+
-                                       |
-                                      ExpressionError
-
- -
-Unknown or unsupported selector (eg. pseudo-class). - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from exceptions.RuntimeError: - __init__, - __new__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/cssselect.xpath.XPathExpr-class.html b/doc/html/api/cssselect.xpath.XPathExpr-class.html deleted file mode 100644 index 544524a..0000000 --- a/doc/html/api/cssselect.xpath.XPathExpr-class.html +++ /dev/null @@ -1,402 +0,0 @@ - - - - - cssselect.xpath.XPathExpr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - cssselect :: - xpath :: - XPathExpr :: - Class XPathExpr - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XPathExpr

-
-object --+
-         |
-        XPathExpr
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - path='', - element='*', - condition='', - star_prefix=False)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
-   - - - - - - -
__repr__(self)
- repr(x)
- - -
- -
-   - - - - - - -
__str__(self)
- str(x)
- - -
- -
-   - - - - - - -
add_condition(self, - condition) - - -
- -
-   - - - - - - -
add_name_test(self) - - -
- -
-   - - - - - - -
add_star_prefix(self)
- Append '*/' to the path to keep the context constrained -to a single parent.
- - -
- -
-   - - - - - - -
join(self, - combiner, - other) - - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - path='', - element='*', - condition='', - star_prefix=False) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

__repr__(self) -
(Representation operator) -

-
  -
- - repr(x) -
-
Overrides: - object.__repr__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

__str__(self) -
(Informal representation operator) -

-
  -
- - str(x) -
-
Overrides: - object.__str__ -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/deprecated-index.html b/doc/html/api/deprecated-index.html deleted file mode 100644 index 589c239..0000000 --- a/doc/html/api/deprecated-index.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - Deprecation List - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

-

Deprecation List

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/epydoc.css b/doc/html/api/epydoc.css deleted file mode 100644 index 86d4170..0000000 --- a/doc/html/api/epydoc.css +++ /dev/null @@ -1,322 +0,0 @@ - - -/* Epydoc CSS Stylesheet - * - * This stylesheet can be used to customize the appearance of epydoc's - * HTML output. - * - */ - -/* Default Colors & Styles - * - Set the default foreground & background color with 'body'; and - * link colors with 'a:link' and 'a:visited'. - * - Use bold for decision list terms. - * - The heading styles defined here are used for headings *within* - * docstring descriptions. All headings used by epydoc itself use - * either class='epydoc' or class='toc' (CSS styles for both - * defined below). - */ -body { background: #ffffff; color: #000000; } -p { margin-top: 0.5em; margin-bottom: 0.5em; } -a:link { color: #0000ff; } -a:visited { color: #204080; } -dt { font-weight: bold; } -h1 { font-size: +140%; font-style: italic; - font-weight: bold; } -h2 { font-size: +125%; font-style: italic; - font-weight: bold; } -h3 { font-size: +110%; font-style: italic; - font-weight: normal; } -code { font-size: 100%; } -/* N.B.: class, not pseudoclass */ -a.link { font-family: monospace; } - -/* Page Header & Footer - * - The standard page header consists of a navigation bar (with - * pointers to standard pages such as 'home' and 'trees'); a - * breadcrumbs list, which can be used to navigate to containing - * classes or modules; options links, to show/hide private - * variables and to show/hide frames; and a page title (using - *

). The page title may be followed by a link to the - * corresponding source code (using 'span.codelink'). - * - The footer consists of a navigation bar, a timestamp, and a - * pointer to epydoc's homepage. - */ -h1.epydoc { margin: 0; font-size: +140%; font-weight: bold; } -h2.epydoc { font-size: +130%; font-weight: bold; } -h3.epydoc { font-size: +115%; font-weight: bold; - margin-top: 0.2em; } -td h3.epydoc { font-size: +115%; font-weight: bold; - margin-bottom: 0; } -table.navbar { background: #a0c0ff; color: #000000; - border: 2px groove #c0d0d0; } -table.navbar table { color: #000000; } -th.navbar-select { background: #70b0ff; - color: #000000; } -table.navbar a { text-decoration: none; } -table.navbar a:link { color: #0000ff; } -table.navbar a:visited { color: #204080; } -span.breadcrumbs { font-size: 85%; font-weight: bold; } -span.options { font-size: 70%; } -span.codelink { font-size: 85%; } -td.footer { font-size: 85%; } - -/* Table Headers - * - Each summary table and details section begins with a 'header' - * row. This row contains a section title (marked by - * 'span.table-header') as well as a show/hide private link - * (marked by 'span.options', defined above). - * - Summary tables that contain user-defined groups mark those - * groups using 'group header' rows. - */ -td.table-header { background: #70b0ff; color: #000000; - border: 1px solid #608090; } -td.table-header table { color: #000000; } -td.table-header table a:link { color: #0000ff; } -td.table-header table a:visited { color: #204080; } -span.table-header { font-size: 120%; font-weight: bold; } -th.group-header { background: #c0e0f8; color: #000000; - text-align: left; font-style: italic; - font-size: 115%; - border: 1px solid #608090; } - -/* Summary Tables (functions, variables, etc) - * - Each object is described by a single row of the table with - * two cells. The left cell gives the object's type, and is - * marked with 'code.summary-type'. The right cell gives the - * object's name and a summary description. - * - CSS styles for the table's header and group headers are - * defined above, under 'Table Headers' - */ -table.summary { border-collapse: collapse; - background: #e8f0f8; color: #000000; - border: 1px solid #608090; - margin-bottom: 0.5em; } -td.summary { border: 1px solid #608090; } -code.summary-type { font-size: 85%; } -table.summary a:link { color: #0000ff; } -table.summary a:visited { color: #204080; } - - -/* Details Tables (functions, variables, etc) - * - Each object is described in its own div. - * - A single-row summary table w/ table-header is used as - * a header for each details section (CSS style for table-header - * is defined above, under 'Table Headers'). - */ -table.details { border-collapse: collapse; - background: #e8f0f8; color: #000000; - border: 1px solid #608090; - margin: .2em 0 0 0; } -table.details table { color: #000000; } -table.details a:link { color: #0000ff; } -table.details a:visited { color: #204080; } - -/* Fields */ -dl.fields { margin-left: 2em; margin-top: 1em; - margin-bottom: 1em; } -dl.fields dd ul { margin-left: 0em; padding-left: 0em; } -dl.fields dd ul li ul { margin-left: 2em; padding-left: 0em; } -div.fields { margin-left: 2em; } -div.fields p { margin-bottom: 0.5em; } - -/* Index tables (identifier index, term index, etc) - * - link-index is used for indices containing lists of links - * (namely, the identifier index & term index). - * - index-where is used in link indices for the text indicating - * the container/source for each link. - * - metadata-index is used for indices containing metadata - * extracted from fields (namely, the bug index & todo index). - */ -table.link-index { border-collapse: collapse; - background: #e8f0f8; color: #000000; - border: 1px solid #608090; } -td.link-index { border-width: 0px; } -table.link-index a:link { color: #0000ff; } -table.link-index a:visited { color: #204080; } -span.index-where { font-size: 70%; } -table.metadata-index { border-collapse: collapse; - background: #e8f0f8; color: #000000; - border: 1px solid #608090; - margin: .2em 0 0 0; } -td.metadata-index { border-width: 1px; border-style: solid; } -table.metadata-index a:link { color: #0000ff; } -table.metadata-index a:visited { color: #204080; } - -/* Function signatures - * - sig* is used for the signature in the details section. - * - .summary-sig* is used for the signature in the summary - * table, and when listing property accessor functions. - * */ -.sig-name { color: #006080; } -.sig-arg { color: #008060; } -.sig-default { color: #602000; } -.summary-sig { font-family: monospace; } -.summary-sig-name { color: #006080; font-weight: bold; } -table.summary a.summary-sig-name:link - { color: #006080; font-weight: bold; } -table.summary a.summary-sig-name:visited - { color: #006080; font-weight: bold; } -.summary-sig-arg { color: #006040; } -.summary-sig-default { color: #501800; } - -/* Subclass list - */ -ul.subclass-list { display: inline; } -ul.subclass-list li { display: inline; } - -/* To render variables, classes etc. like functions */ -table.summary .summary-name { color: #006080; font-weight: bold; - font-family: monospace; } -table.summary - a.summary-name:link { color: #006080; font-weight: bold; - font-family: monospace; } -table.summary - a.summary-name:visited { color: #006080; font-weight: bold; - font-family: monospace; } - -/* Variable values - * - In the 'variable details' sections, each varaible's value is - * listed in a 'pre.variable' box. The width of this box is - * restricted to 80 chars; if the value's repr is longer than - * this it will be wrapped, using a backslash marked with - * class 'variable-linewrap'. If the value's repr is longer - * than 3 lines, the rest will be ellided; and an ellipsis - * marker ('...' marked with 'variable-ellipsis') will be used. - * - If the value is a string, its quote marks will be marked - * with 'variable-quote'. - * - If the variable is a regexp, it is syntax-highlighted using - * the re* CSS classes. - */ -pre.variable { padding: .5em; margin: 0; - background: #dce4ec; color: #000000; - border: 1px solid #708890; } -.variable-linewrap { color: #604000; font-weight: bold; } -.variable-ellipsis { color: #604000; font-weight: bold; } -.variable-quote { color: #604000; font-weight: bold; } -.variable-group { color: #008000; font-weight: bold; } -.variable-op { color: #604000; font-weight: bold; } -.variable-string { color: #006030; } -.variable-unknown { color: #a00000; font-weight: bold; } -.re { color: #000000; } -.re-char { color: #006030; } -.re-op { color: #600000; } -.re-group { color: #003060; } -.re-ref { color: #404040; } - -/* Base tree - * - Used by class pages to display the base class hierarchy. - */ -pre.base-tree { font-size: 80%; margin: 0; } - -/* Frames-based table of contents headers - * - Consists of two frames: one for selecting modules; and - * the other listing the contents of the selected module. - * - h1.toc is used for each frame's heading - * - h2.toc is used for subheadings within each frame. - */ -h1.toc { text-align: center; font-size: 105%; - margin: 0; font-weight: bold; - padding: 0; } -h2.toc { font-size: 100%; font-weight: bold; - margin: 0.5em 0 0 -0.3em; } - -/* Syntax Highlighting for Source Code - * - doctest examples are displayed in a 'pre.py-doctest' block. - * If the example is in a details table entry, then it will use - * the colors specified by the 'table pre.py-doctest' line. - * - Source code listings are displayed in a 'pre.py-src' block. - * Each line is marked with 'span.py-line' (used to draw a line - * down the left margin, separating the code from the line - * numbers). Line numbers are displayed with 'span.py-lineno'. - * The expand/collapse block toggle button is displayed with - * 'a.py-toggle' (Note: the CSS style for 'a.py-toggle' should not - * modify the font size of the text.) - * - If a source code page is opened with an anchor, then the - * corresponding code block will be highlighted. The code - * block's header is highlighted with 'py-highlight-hdr'; and - * the code block's body is highlighted with 'py-highlight'. - * - The remaining py-* classes are used to perform syntax - * highlighting (py-string for string literals, py-name for names, - * etc.) - */ -pre.py-doctest { padding: .5em; margin: 1em; - background: #e8f0f8; color: #000000; - border: 1px solid #708890; } -table pre.py-doctest { background: #dce4ec; - color: #000000; } -pre.py-src { border: 2px solid #000000; - background: #f0f0f0; color: #000000; } -.py-line { border-left: 2px solid #000000; - margin-left: .2em; padding-left: .4em; } -.py-lineno { font-style: italic; font-size: 90%; - padding-left: .5em; } -a.py-toggle { text-decoration: none; } -div.py-highlight-hdr { border-top: 2px solid #000000; - border-bottom: 2px solid #000000; - background: #d8e8e8; } -div.py-highlight { border-bottom: 2px solid #000000; - background: #d0e0e0; } -.py-prompt { color: #005050; font-weight: bold;} -.py-more { color: #005050; font-weight: bold;} -.py-string { color: #006030; } -.py-comment { color: #003060; } -.py-keyword { color: #600000; } -.py-output { color: #404040; } -.py-name { color: #000050; } -.py-name:link { color: #000050 !important; } -.py-name:visited { color: #000050 !important; } -.py-number { color: #005000; } -.py-defname { color: #000060; font-weight: bold; } -.py-def-name { color: #000060; font-weight: bold; } -.py-base-class { color: #000060; } -.py-param { color: #000060; } -.py-docstring { color: #006030; } -.py-decorator { color: #804020; } -/* Use this if you don't want links to names underlined: */ -/*a.py-name { text-decoration: none; }*/ - -/* Graphs & Diagrams - * - These CSS styles are used for graphs & diagrams generated using - * Graphviz dot. 'img.graph-without-title' is used for bare - * diagrams (to remove the border created by making the image - * clickable). - */ -img.graph-without-title { border: none; } -img.graph-with-title { border: 1px solid #000000; } -span.graph-title { font-weight: bold; } -span.graph-caption { } - -/* General-purpose classes - * - 'p.indent-wrapped-lines' defines a paragraph whose first line - * is not indented, but whose subsequent lines are. - * - The 'nomargin-top' class is used to remove the top margin (e.g. - * from lists). The 'nomargin' class is used to remove both the - * top and bottom margin (but not the left or right margin -- - * for lists, that would cause the bullets to disappear.) - */ -p.indent-wrapped-lines { padding: 0 0 0 7em; text-indent: -7em; - margin: 0; } -.nomargin-top { margin-top: 0; } -.nomargin { margin-top: 0; margin-bottom: 0; } - -/* HTML Log */ -div.log-block { padding: 0; margin: .5em 0 .5em 0; - background: #e8f0f8; color: #000000; - border: 1px solid #000000; } -div.log-error { padding: .1em .3em .1em .3em; margin: 4px; - background: #ffb0b0; color: #000000; - border: 1px solid #000000; } -div.log-warning { padding: .1em .3em .1em .3em; margin: 4px; - background: #ffffb0; color: #000000; - border: 1px solid #000000; } -div.log-info { padding: .1em .3em .1em .3em; margin: 4px; - background: #b0ffb0; color: #000000; - border: 1px solid #000000; } -h2.log-hdr { background: #70b0ff; color: #000000; - margin: 0; padding: 0em 0.5em 0em 0.5em; - border-bottom: 1px solid #000000; font-size: 110%; } -p.log { font-weight: bold; margin: .5em 0 .5em 0; } -tr.opt-changed { color: #000000; font-weight: bold; } -tr.opt-default { color: #606060; } -pre.log { margin: 0; padding: 0; padding-left: 1em; } diff --git a/doc/html/api/exceptions.AssertionError-class.html b/doc/html/api/exceptions.AssertionError-class.html deleted file mode 100644 index 4a53553..0000000 --- a/doc/html/api/exceptions.AssertionError-class.html +++ /dev/null @@ -1,303 +0,0 @@ - - - - - exceptions.AssertionError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - exceptions :: - AssertionError :: - Class AssertionError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class AssertionError

-
-   object --+            
-            |            
-BaseException --+        
-                |        
-        Exception --+    
-                    |    
-        StandardError --+
-                        |
-                       AssertionError
-
- -
-Assertion failed. - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(...)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(...) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/frames.html b/doc/html/api/frames.html deleted file mode 100644 index 7c41668..0000000 --- a/doc/html/api/frames.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - lxml API - - - - - - - - - diff --git a/doc/html/api/help.html b/doc/html/api/help.html deleted file mode 100644 index 8b130d6..0000000 --- a/doc/html/api/help.html +++ /dev/null @@ -1,279 +0,0 @@ - - - - - Help - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
- -

API Documentation

- -

This document contains the API (Application Programming Interface) -documentation for lxml API. Documentation for the Python -objects defined by the project is divided into separate pages for each -package, module, and class. The API documentation also includes two -pages containing information about the project as a whole: a trees -page, and an index page.

- -

Object Documentation

- -

Each Package Documentation page contains:

-
    -
  • A description of the package.
  • -
  • A list of the modules and sub-packages contained by the - package.
  • -
  • A summary of the classes defined by the package.
  • -
  • A summary of the functions defined by the package.
  • -
  • A summary of the variables defined by the package.
  • -
  • A detailed description of each function defined by the - package.
  • -
  • A detailed description of each variable defined by the - package.
  • -
- -

Each Module Documentation page contains:

-
    -
  • A description of the module.
  • -
  • A summary of the classes defined by the module.
  • -
  • A summary of the functions defined by the module.
  • -
  • A summary of the variables defined by the module.
  • -
  • A detailed description of each function defined by the - module.
  • -
  • A detailed description of each variable defined by the - module.
  • -
- -

Each Class Documentation page contains:

-
    -
  • A class inheritance diagram.
  • -
  • A list of known subclasses.
  • -
  • A description of the class.
  • -
  • A summary of the methods defined by the class.
  • -
  • A summary of the instance variables defined by the class.
  • -
  • A summary of the class (static) variables defined by the - class.
  • -
  • A detailed description of each method defined by the - class.
  • -
  • A detailed description of each instance variable defined by the - class.
  • -
  • A detailed description of each class (static) variable defined - by the class.
  • -
- -

Project Documentation

- -

The Trees page contains the module and class hierarchies:

-
    -
  • The module hierarchy lists every package and module, with - modules grouped into packages. At the top level, and within each - package, modules and sub-packages are listed alphabetically.
  • -
  • The class hierarchy lists every class, grouped by base - class. If a class has more than one base class, then it will be - listed under each base class. At the top level, and under each base - class, classes are listed alphabetically.
  • -
- -

The Index page contains indices of terms and - identifiers:

-
    -
  • The term index lists every term indexed by any object's - documentation. For each term, the index provides links to each - place where the term is indexed.
  • -
  • The identifier index lists the (short) name of every package, - module, class, method, function, variable, and parameter. For each - identifier, the index provides a short description, and a link to - its documentation.
  • -
- -

The Table of Contents

- -

The table of contents occupies the two frames on the left side of -the window. The upper-left frame displays the project -contents, and the lower-left frame displays the module -contents:

- - - - - - - - - -
- Project
Contents
...
- API
Documentation
Frame


-
- Module
Contents
 
...
  -

- -

The project contents frame contains a list of all packages -and modules that are defined by the project. Clicking on an entry -will display its contents in the module contents frame. Clicking on a -special entry, labeled "Everything," will display the contents of -the entire project.

- -

The module contents frame contains a list of every -submodule, class, type, exception, function, and variable defined by a -module or package. Clicking on an entry will display its -documentation in the API documentation frame. Clicking on the name of -the module, at the top of the frame, will display the documentation -for the module itself.

- -

The "frames" and "no frames" buttons below the top -navigation bar can be used to control whether the table of contents is -displayed or not.

- -

The Navigation Bar

- -

A navigation bar is located at the top and bottom of every page. -It indicates what type of page you are currently viewing, and allows -you to go to related pages. The following table describes the labels -on the navigation bar. Note that not some labels (such as -[Parent]) are not displayed on all pages.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
LabelHighlighted when...Links to...
[Parent](never highlighted) the parent of the current package
[Package]viewing a packagethe package containing the current object -
[Module]viewing a modulethe module containing the current object -
[Class]viewing a class the class containing the current object
[Trees]viewing the trees page the trees page
[Index]viewing the index page the index page
[Help]viewing the help page the help page
- -

The "show private" and "hide private" buttons below -the top navigation bar can be used to control whether documentation -for private objects is displayed. Private objects are usually defined -as objects whose (short) names begin with a single underscore, but do -not end with an underscore. For example, "_x", -"__pprint", and "epydoc.epytext._tokenize" -are private objects; but "re.sub", -"__init__", and "type_" are not. However, -if a module defines the "__all__" variable, then its -contents are used to decide which objects are private.

- -

A timestamp below the bottom navigation bar indicates when each -page was last updated.

- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-A.html b/doc/html/api/identifier-index-A.html deleted file mode 100644 index c2d1e63..0000000 --- a/doc/html/api/identifier-index-A.html +++ /dev/null @@ -1,293 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - -

A

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-B.html b/doc/html/api/identifier-index-B.html deleted file mode 100644 index bad53c4..0000000 --- a/doc/html/api/identifier-index-B.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - -

B

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-C.html b/doc/html/api/identifier-index-C.html deleted file mode 100644 index ee1f73f..0000000 --- a/doc/html/api/identifier-index-C.html +++ /dev/null @@ -1,502 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - -

C

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-D.html b/doc/html/api/identifier-index-D.html deleted file mode 100644 index c145c2a..0000000 --- a/doc/html/api/identifier-index-D.html +++ /dev/null @@ -1,401 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - -

D

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-E.html b/doc/html/api/identifier-index-E.html deleted file mode 100644 index 1469348..0000000 --- a/doc/html/api/identifier-index-E.html +++ /dev/null @@ -1,732 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - -

E

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-F.html b/doc/html/api/identifier-index-F.html deleted file mode 100644 index bcf8a14..0000000 --- a/doc/html/api/identifier-index-F.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - -

F

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-G.html b/doc/html/api/identifier-index-G.html deleted file mode 100644 index 309255d..0000000 --- a/doc/html/api/identifier-index-G.html +++ /dev/null @@ -1,232 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - -

G

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-H.html b/doc/html/api/identifier-index-H.html deleted file mode 100644 index 4836191..0000000 --- a/doc/html/api/identifier-index-H.html +++ /dev/null @@ -1,330 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - -

H

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-I.html b/doc/html/api/identifier-index-I.html deleted file mode 100644 index 2f45641..0000000 --- a/doc/html/api/identifier-index-I.html +++ /dev/null @@ -1,517 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - -

I

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-J.html b/doc/html/api/identifier-index-J.html deleted file mode 100644 index 52cfef8..0000000 --- a/doc/html/api/identifier-index-J.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - -

J

- - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-K.html b/doc/html/api/identifier-index-K.html deleted file mode 100644 index 8629432..0000000 --- a/doc/html/api/identifier-index-K.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - -

K

- - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-L.html b/doc/html/api/identifier-index-L.html deleted file mode 100644 index 801a176..0000000 --- a/doc/html/api/identifier-index-L.html +++ /dev/null @@ -1,254 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - -

L

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-M.html b/doc/html/api/identifier-index-M.html deleted file mode 100644 index 0b33f70..0000000 --- a/doc/html/api/identifier-index-M.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - -

M

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-N.html b/doc/html/api/identifier-index-N.html deleted file mode 100644 index a5bfa7a..0000000 --- a/doc/html/api/identifier-index-N.html +++ /dev/null @@ -1,248 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - -

N

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-O.html b/doc/html/api/identifier-index-O.html deleted file mode 100644 index 90b1f05..0000000 --- a/doc/html/api/identifier-index-O.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - -

O

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-P.html b/doc/html/api/identifier-index-P.html deleted file mode 100644 index f2beb8c..0000000 --- a/doc/html/api/identifier-index-P.html +++ /dev/null @@ -1,326 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - -

P

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-Q.html b/doc/html/api/identifier-index-Q.html deleted file mode 100644 index 805ca44..0000000 --- a/doc/html/api/identifier-index-Q.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - -

Q

- - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-R.html b/doc/html/api/identifier-index-R.html deleted file mode 100644 index 4adde3c..0000000 --- a/doc/html/api/identifier-index-R.html +++ /dev/null @@ -1,750 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - -

R

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-S.html b/doc/html/api/identifier-index-S.html deleted file mode 100644 index 61fb6b3..0000000 --- a/doc/html/api/identifier-index-S.html +++ /dev/null @@ -1,1211 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - -

S

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-T.html b/doc/html/api/identifier-index-T.html deleted file mode 100644 index 0a831cd..0000000 --- a/doc/html/api/identifier-index-T.html +++ /dev/null @@ -1,3878 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - -

T

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-U.html b/doc/html/api/identifier-index-U.html deleted file mode 100644 index 54251e1..0000000 --- a/doc/html/api/identifier-index-U.html +++ /dev/null @@ -1,216 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - -

U

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-V.html b/doc/html/api/identifier-index-V.html deleted file mode 100644 index 3def205..0000000 --- a/doc/html/api/identifier-index-V.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - -

V

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-W.html b/doc/html/api/identifier-index-W.html deleted file mode 100644 index 57e520a..0000000 --- a/doc/html/api/identifier-index-W.html +++ /dev/null @@ -1,217 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - -

W

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-X.html b/doc/html/api/identifier-index-X.html deleted file mode 100644 index fb4806e..0000000 --- a/doc/html/api/identifier-index-X.html +++ /dev/null @@ -1,476 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - -

X

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-Y.html b/doc/html/api/identifier-index-Y.html deleted file mode 100644 index f90b0a8..0000000 --- a/doc/html/api/identifier-index-Y.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-Z.html b/doc/html/api/identifier-index-Z.html deleted file mode 100644 index 118631a..0000000 --- a/doc/html/api/identifier-index-Z.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index-_.html b/doc/html/api/identifier-index-_.html deleted file mode 100644 index cf3eb25..0000000 --- a/doc/html/api/identifier-index-_.html +++ /dev/null @@ -1,2061 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - -

_

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/identifier-index.html b/doc/html/api/identifier-index.html deleted file mode 100644 index 597a00f..0000000 --- a/doc/html/api/identifier-index.html +++ /dev/null @@ -1,293 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
[ - Identifiers -| Deprecations -]

- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - -

A

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/index.html b/doc/html/api/index.html deleted file mode 100644 index 7c41668..0000000 --- a/doc/html/api/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - lxml API - - - - - - - - - diff --git a/doc/html/api/lxml-module.html b/doc/html/api/lxml-module.html deleted file mode 100644 index be18c74..0000000 --- a/doc/html/api/lxml-module.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - lxml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Package lxml

source code

- - - - - - - -
- - - - - -
Submodules[hide private]
-
-
- -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
get_include()
- Returns a list of header include paths (for lxml itself, libxml2 -and libxslt) needed to compile C code against lxml if it was built -with statically linked libraries.
- source code - -
- -
- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = None
- hash(x) -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml-pysrc.html b/doc/html/api/lxml-pysrc.html deleted file mode 100644 index 6ca5adc..0000000 --- a/doc/html/api/lxml-pysrc.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - lxml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Package lxml

-
- 1  # this is a package 
- 2   
-
3 -def get_include(): -
4 """ - 5 Returns a list of header include paths (for lxml itself, libxml2 - 6 and libxslt) needed to compile C code against lxml if it was built - 7 with statically linked libraries. - 8 """ - 9 import os -10 lxml_path = __path__[0] -11 include_path = os.path.join(lxml_path, 'includes') -12 includes = [include_path, lxml_path] -13 -14 for name in os.listdir(include_path): -15 path = os.path.join(include_path, name) -16 if os.path.isdir(path): -17 includes.append(path) -18 -19 return includes -
20 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.ElementInclude-module.html b/doc/html/api/lxml.ElementInclude-module.html deleted file mode 100644 index 5145bba..0000000 --- a/doc/html/api/lxml.ElementInclude-module.html +++ /dev/null @@ -1,307 +0,0 @@ - - - - - lxml.ElementInclude - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module ElementInclude - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module ElementInclude

source code

-

Limited XInclude support for the ElementTree package.

-

While lxml.etree has full support for XInclude (see -etree.ElementTree.xinclude()), this module provides a simpler, pure -Python, ElementTree compatible implementation that supports a simple -form of custom URL resolvers.

- - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - FatalIncludeError -
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
default_loader(href, - parse, - encoding=None) - source code - -
- -
-   - - - - - - -
_lxml_default_loader(href, - parse, - encoding=None, - parser=None) - source code - -
- -
-   - - - - - - -
_wrap_et_loader(loader) - source code - -
- -
-   - - - - - - -
include(elem, - loader=None, - base_url=None) - source code - -
- -
-   - - - - - - -
_include(elem, - loader=None, - _parent_hrefs=None, - base_url=None) - source code - -
- -
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - XINCLUDE = '{http://www.w3.org/2001/XInclude}' -
-   - - XINCLUDE_INCLUDE = '{http://www.w3.org/2001/XInclude}include' -
-   - - XINCLUDE_FALLBACK = '{http://www.w3.org/2001/XInclude}fallback' -
-   - - XINCLUDE_ITER_TAG = '{http://www.w3.org/2001/XInclude}*' -
-   - - __package__ = 'lxml' -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.ElementInclude-pysrc.html b/doc/html/api/lxml.ElementInclude-pysrc.html deleted file mode 100644 index 370bda0..0000000 --- a/doc/html/api/lxml.ElementInclude-pysrc.html +++ /dev/null @@ -1,559 +0,0 @@ - - - - - lxml.ElementInclude - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module ElementInclude - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.ElementInclude

-
-  1  # 
-  2  # ElementTree 
-  3  # $Id: ElementInclude.py 1862 2004-06-18 07:31:02Z Fredrik $ 
-  4  # 
-  5  # limited xinclude support for element trees 
-  6  # 
-  7  # history: 
-  8  # 2003-08-15 fl   created 
-  9  # 2003-11-14 fl   fixed default loader 
- 10  # 
- 11  # Copyright (c) 2003-2004 by Fredrik Lundh.  All rights reserved. 
- 12  # 
- 13  # fredrik@pythonware.com 
- 14  # http://www.pythonware.com 
- 15  # 
- 16  # -------------------------------------------------------------------- 
- 17  # The ElementTree toolkit is 
- 18  # 
- 19  # Copyright (c) 1999-2004 by Fredrik Lundh 
- 20  # 
- 21  # By obtaining, using, and/or copying this software and/or its 
- 22  # associated documentation, you agree that you have read, understood, 
- 23  # and will comply with the following terms and conditions: 
- 24  # 
- 25  # Permission to use, copy, modify, and distribute this software and 
- 26  # its associated documentation for any purpose and without fee is 
- 27  # hereby granted, provided that the above copyright notice appears in 
- 28  # all copies, and that both that copyright notice and this permission 
- 29  # notice appear in supporting documentation, and that the name of 
- 30  # Secret Labs AB or the author not be used in advertising or publicity 
- 31  # pertaining to distribution of the software without specific, written 
- 32  # prior permission. 
- 33  # 
- 34  # SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD 
- 35  # TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT- 
- 36  # ABILITY AND FITNESS.  IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR 
- 37  # BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 
- 38  # DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 
- 39  # WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 
- 40  # ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- 41  # OF THIS SOFTWARE. 
- 42  # -------------------------------------------------------------------- 
- 43   
- 44  """ 
- 45  Limited XInclude support for the ElementTree package. 
- 46   
- 47  While lxml.etree has full support for XInclude (see 
- 48  `etree.ElementTree.xinclude()`), this module provides a simpler, pure 
- 49  Python, ElementTree compatible implementation that supports a simple 
- 50  form of custom URL resolvers. 
- 51  """ 
- 52   
- 53  from lxml import etree 
- 54  try: 
- 55      from urlparse import urljoin 
- 56      from urllib2 import urlopen 
- 57  except ImportError: 
- 58      # Python 3 
- 59      from urllib.parse import urljoin 
- 60      from urllib.request import urlopen 
- 61   
- 62  XINCLUDE = "{http://www.w3.org/2001/XInclude}" 
- 63   
- 64  XINCLUDE_INCLUDE = XINCLUDE + "include" 
- 65  XINCLUDE_FALLBACK = XINCLUDE + "fallback" 
- 66  XINCLUDE_ITER_TAG = XINCLUDE + "*" 
- 67   
- 68  ## 
- 69  # Fatal include error. 
- 70   
-
71 -class FatalIncludeError(etree.LxmlSyntaxError): -
72 pass -
73 - 74 ## - 75 # ET compatible default loader. - 76 # This loader reads an included resource from disk. - 77 # - 78 # @param href Resource reference. - 79 # @param parse Parse mode. Either "xml" or "text". - 80 # @param encoding Optional text encoding. - 81 # @return The expanded resource. If the parse mode is "xml", this - 82 # is an ElementTree instance. If the parse mode is "text", this - 83 # is a Unicode string. If the loader fails, it can return None - 84 # or raise an IOError exception. - 85 # @throws IOError If the loader fails to load the resource. - 86 -
87 -def default_loader(href, parse, encoding=None): -
88 file = open(href, 'rb') - 89 if parse == "xml": - 90 data = etree.parse(file).getroot() - 91 else: - 92 data = file.read() - 93 if not encoding: - 94 encoding = 'utf-8' - 95 data = data.decode(encoding) - 96 file.close() - 97 return data -
98 - 99 ## -100 # Default loader used by lxml.etree - handles custom resolvers properly -101 # -102 -
103 -def _lxml_default_loader(href, parse, encoding=None, parser=None): -
104 if parse == "xml": -105 data = etree.parse(href, parser).getroot() -106 else: -107 if "://" in href: -108 f = urlopen(href) -109 else: -110 f = open(href, 'rb') -111 data = f.read() -112 f.close() -113 if not encoding: -114 encoding = 'utf-8' -115 data = data.decode(encoding) -116 return data -
117 -118 ## -119 # Wrapper for ET compatibility - drops the parser -120 -
121 -def _wrap_et_loader(loader): -
122 def load(href, parse, encoding=None, parser=None): -123 return loader(href, parse, encoding) -
124 return load -125 -126 -127 ## -128 # Expand XInclude directives. -129 # -130 # @param elem Root element. -131 # @param loader Optional resource loader. If omitted, it defaults -132 # to {@link default_loader}. If given, it should be a callable -133 # that implements the same interface as <b>default_loader</b>. -134 # @param base_url The base URL of the original file, to resolve -135 # relative include file references. -136 # @throws FatalIncludeError If the function fails to include a given -137 # resource, or if the tree contains malformed XInclude elements. -138 # @throws IOError If the function fails to load a given resource. -139 # @returns the node or its replacement if it was an XInclude node -140 -
141 -def include(elem, loader=None, base_url=None): -
142 if base_url is None: -143 if hasattr(elem, 'getroot'): -144 tree = elem -145 elem = elem.getroot() -146 else: -147 tree = elem.getroottree() -148 if hasattr(tree, 'docinfo'): -149 base_url = tree.docinfo.URL -150 elif hasattr(elem, 'getroot'): -151 elem = elem.getroot() -152 _include(elem, loader, base_url=base_url) -
153 -
154 -def _include(elem, loader=None, _parent_hrefs=None, base_url=None): -
155 if loader is not None: -156 load_include = _wrap_et_loader(loader) -157 else: -158 load_include = _lxml_default_loader -159 -160 if _parent_hrefs is None: -161 _parent_hrefs = set() -162 -163 parser = elem.getroottree().parser -164 -165 include_elements = list( -166 elem.iter(XINCLUDE_ITER_TAG)) -167 -168 for e in include_elements: -169 if e.tag == XINCLUDE_INCLUDE: -170 # process xinclude directive -171 href = urljoin(base_url, e.get("href")) -172 parse = e.get("parse", "xml") -173 parent = e.getparent() -174 if parse == "xml": -175 if href in _parent_hrefs: -176 raise FatalIncludeError( -177 "recursive include of %r detected" % href -178 ) -179 _parent_hrefs.add(href) -180 node = load_include(href, parse, parser=parser) -181 if node is None: -182 raise FatalIncludeError( -183 "cannot load %r as %r" % (href, parse) -184 ) -185 node = _include(node, loader, _parent_hrefs) -186 if e.tail: -187 node.tail = (node.tail or "") + e.tail -188 if parent is None: -189 return node # replaced the root node! -190 parent.replace(e, node) -191 elif parse == "text": -192 text = load_include(href, parse, encoding=e.get("encoding")) -193 if text is None: -194 raise FatalIncludeError( -195 "cannot load %r as %r" % (href, parse) -196 ) -197 predecessor = e.getprevious() -198 if predecessor is not None: -199 predecessor.tail = (predecessor.tail or "") + text -200 elif parent is None: -201 return text # replaced the root node! -202 else: -203 parent.text = (parent.text or "") + text + (e.tail or "") -204 parent.remove(e) -205 else: -206 raise FatalIncludeError( -207 "unknown parse type in xi:include tag (%r)" % parse -208 ) -209 elif e.tag == XINCLUDE_FALLBACK: -210 parent = e.getparent() -211 if parent is not None and parent.tag != XINCLUDE_INCLUDE: -212 raise FatalIncludeError( -213 "xi:fallback tag must be child of xi:include (%r)" % e.tag -214 ) -215 else: -216 raise FatalIncludeError( -217 "Invalid element found in XInclude namespace (%r)" % e.tag -218 ) -219 return elem -
220 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.ElementInclude.FatalIncludeError-class.html b/doc/html/api/lxml.ElementInclude.FatalIncludeError-class.html deleted file mode 100644 index e550f43..0000000 --- a/doc/html/api/lxml.ElementInclude.FatalIncludeError-class.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - lxml.ElementInclude.FatalIncludeError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module ElementInclude :: - Class FatalIncludeError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class FatalIncludeError

source code

-
-              object --+                    
-                       |                    
-exceptions.BaseException --+                
-                           |                
-        exceptions.Exception --+            
-                               |            
-                     etree.Error --+        
-                                   |        
-                     etree.LxmlError --+    
-                                       |    
-              object --+               |    
-                       |               |    
-exceptions.BaseException --+           |    
-                           |           |    
-        exceptions.Exception --+       |    
-                               |       |    
-        exceptions.StandardError --+   |    
-                                   |   |    
-              exceptions.SyntaxError --+    
-                                       |    
-                   etree.LxmlSyntaxError --+
-                                           |
-                                          FatalIncludeError
-
- -
- - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from etree.LxmlError: - __init__, - __new__ -

-

Inherited from exceptions.SyntaxError: - __str__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from etree.LxmlSyntaxError: - __qualname__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.SyntaxError: - filename, - lineno, - msg, - offset, - print_file_and_line, - text -

-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.builder-module.html b/doc/html/api/lxml.builder-module.html deleted file mode 100644 index ca3f963..0000000 --- a/doc/html/api/lxml.builder-module.html +++ /dev/null @@ -1,310 +0,0 @@ - - - - - lxml.builder - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module builder - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module builder

source code

-The E Element factory for generating XML documents. - - - - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - basestring
- str(object='') -> string -
-   - - unicode
- str(object='') -> string -
-   - - ElementMaker
- Element generator factory. -
- - - - - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
__pyx_unpickle_ElementMaker(...) - source code - -
- -
-   - - - - - - -
__reduce_cython__(...) - source code - -
- -
-   - - - - - - -
__setstate_cython__(...) - source code - -
- -
- - - - - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - E = <lxml.builder.ElementMaker object> -
-   - - __package__ = 'lxml' -
-   - - __pyx_capi__ = {'ET': <capsule object "PyObject *" at 0x7fbba2... -
-   - - __test__ = {} -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

__pyx_capi__

- -
-
-
-
Value:
-
-{'ET': <capsule object "PyObject *" at 0x7fbba2296ab0>,
- 'partial': <capsule object "PyObject *" at 0x7fbba2296ae0>}
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.builder-pysrc.html b/doc/html/api/lxml.builder-pysrc.html deleted file mode 100644 index 8c61f63..0000000 --- a/doc/html/api/lxml.builder-pysrc.html +++ /dev/null @@ -1,457 +0,0 @@ - - - - - lxml.builder - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module builder - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.builder

-
-  1  # 
-  2  # Element generator factory by Fredrik Lundh. 
-  3  # 
-  4  # Source: 
-  5  #    http://online.effbot.org/2006_11_01_archive.htm#et-builder 
-  6  #    http://effbot.python-hosting.com/file/stuff/sandbox/elementlib/builder.py 
-  7  # 
-  8  # -------------------------------------------------------------------- 
-  9  # The ElementTree toolkit is 
- 10  # 
- 11  # Copyright (c) 1999-2004 by Fredrik Lundh 
- 12  # 
- 13  # By obtaining, using, and/or copying this software and/or its 
- 14  # associated documentation, you agree that you have read, understood, 
- 15  # and will comply with the following terms and conditions: 
- 16  # 
- 17  # Permission to use, copy, modify, and distribute this software and 
- 18  # its associated documentation for any purpose and without fee is 
- 19  # hereby granted, provided that the above copyright notice appears in 
- 20  # all copies, and that both that copyright notice and this permission 
- 21  # notice appear in supporting documentation, and that the name of 
- 22  # Secret Labs AB or the author not be used in advertising or publicity 
- 23  # pertaining to distribution of the software without specific, written 
- 24  # prior permission. 
- 25  # 
- 26  # SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD 
- 27  # TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT- 
- 28  # ABILITY AND FITNESS.  IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR 
- 29  # BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 
- 30  # DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 
- 31  # WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 
- 32  # ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- 33  # OF THIS SOFTWARE. 
- 34  # -------------------------------------------------------------------- 
- 35   
- 36  """ 
- 37  The ``E`` Element factory for generating XML documents. 
- 38  """ 
- 39   
- 40  import lxml.etree as ET 
- 41   
- 42  from functools import partial 
- 43   
- 44  try: 
- 45      basestring 
- 46  except NameError: 
- 47      basestring = str 
- 48   
- 49  try: 
- 50      unicode 
- 51  except NameError: 
- 52      unicode = str 
- 53   
- 54   
-
55 -class ElementMaker(object): -
56 """Element generator factory. - 57 - 58 Unlike the ordinary Element factory, the E factory allows you to pass in - 59 more than just a tag and some optional attributes; you can also pass in - 60 text and other elements. The text is added as either text or tail - 61 attributes, and elements are inserted at the right spot. Some small - 62 examples:: - 63 - 64 >>> from lxml import etree as ET - 65 >>> from lxml.builder import E - 66 - 67 >>> ET.tostring(E("tag")) - 68 '<tag/>' - 69 >>> ET.tostring(E("tag", "text")) - 70 '<tag>text</tag>' - 71 >>> ET.tostring(E("tag", "text", key="value")) - 72 '<tag key="value">text</tag>' - 73 >>> ET.tostring(E("tag", E("subtag", "text"), "tail")) - 74 '<tag><subtag>text</subtag>tail</tag>' - 75 - 76 For simple tags, the factory also allows you to write ``E.tag(...)`` instead - 77 of ``E('tag', ...)``:: - 78 - 79 >>> ET.tostring(E.tag()) - 80 '<tag/>' - 81 >>> ET.tostring(E.tag("text")) - 82 '<tag>text</tag>' - 83 >>> ET.tostring(E.tag(E.subtag("text"), "tail")) - 84 '<tag><subtag>text</subtag>tail</tag>' - 85 - 86 Here's a somewhat larger example; this shows how to generate HTML - 87 documents, using a mix of prepared factory functions for inline elements, - 88 nested ``E.tag`` calls, and embedded XHTML fragments:: - 89 - 90 # some common inline elements - 91 A = E.a - 92 I = E.i - 93 B = E.b - 94 - 95 def CLASS(v): - 96 # helper function, 'class' is a reserved word - 97 return {'class': v} - 98 - 99 page = ( -100 E.html( -101 E.head( -102 E.title("This is a sample document") -103 ), -104 E.body( -105 E.h1("Hello!", CLASS("title")), -106 E.p("This is a paragraph with ", B("bold"), " text in it!"), -107 E.p("This is another paragraph, with a ", -108 A("link", href="http://www.python.org"), "."), -109 E.p("Here are some reserved characters: <spam&egg>."), -110 ET.XML("<p>And finally, here is an embedded XHTML fragment.</p>"), -111 ) -112 ) -113 ) -114 -115 print ET.tostring(page) -116 -117 Here's a prettyprinted version of the output from the above script:: -118 -119 <html> -120 <head> -121 <title>This is a sample document</title> -122 </head> -123 <body> -124 <h1 class="title">Hello!</h1> -125 <p>This is a paragraph with <b>bold</b> text in it!</p> -126 <p>This is another paragraph, with <a href="http://www.python.org">link</a>.</p> -127 <p>Here are some reserved characters: &lt;spam&amp;egg&gt;.</p> -128 <p>And finally, here is an embedded XHTML fragment.</p> -129 </body> -130 </html> -131 -132 For namespace support, you can pass a namespace map (``nsmap``) -133 and/or a specific target ``namespace`` to the ElementMaker class:: -134 -135 >>> E = ElementMaker(namespace="http://my.ns/") -136 >>> print(ET.tostring( E.test )) -137 <test xmlns="http://my.ns/"/> -138 -139 >>> E = ElementMaker(namespace="http://my.ns/", nsmap={'p':'http://my.ns/'}) -140 >>> print(ET.tostring( E.test )) -141 <p:test xmlns:p="http://my.ns/"/> -142 """ -143 -
144 - def __init__(self, typemap=None, -145 namespace=None, nsmap=None, makeelement=None): -
146 if namespace is not None: -147 self._namespace = '{' + namespace + '}' -148 else: -149 self._namespace = None -150 -151 if nsmap: -152 self._nsmap = dict(nsmap) -153 else: -154 self._nsmap = None -155 -156 if makeelement is not None: -157 assert callable(makeelement) -158 self._makeelement = makeelement -159 else: -160 self._makeelement = ET.Element -161 -162 # initialize type map for this element factory -163 -164 if typemap: -165 typemap = dict(typemap) -166 else: -167 typemap = {} -168 -169 def add_text(elem, item): -170 try: -171 elem[-1].tail = (elem[-1].tail or "") + item -172 except IndexError: -173 elem.text = (elem.text or "") + item -
174 -175 def add_cdata(elem, cdata): -176 if elem.text: -177 raise ValueError("Can't add a CDATA section. Element already has some text: %r" % elem.text) -178 elem.text = cdata -
179 -180 if str not in typemap: -181 typemap[str] = add_text -182 if unicode not in typemap: -183 typemap[unicode] = add_text -184 if ET.CDATA not in typemap: -185 typemap[ET.CDATA] = add_cdata -186 -187 def add_dict(elem, item): -188 attrib = elem.attrib -189 for k, v in item.items(): -190 if isinstance(v, basestring): -191 attrib[k] = v -192 else: -193 attrib[k] = typemap[type(v)](None, v) -194 if dict not in typemap: -195 typemap[dict] = add_dict -196 -197 self._typemap = typemap -198 -
199 - def __call__(self, tag, *children, **attrib): -
200 typemap = self._typemap -201 -202 if self._namespace is not None and tag[0] != '{': -203 tag = self._namespace + tag -204 elem = self._makeelement(tag, nsmap=self._nsmap) -205 if attrib: -206 typemap[dict](elem, attrib) -207 -208 for item in children: -209 if callable(item): -210 item = item() -211 t = typemap.get(type(item)) -212 if t is None: -213 if ET.iselement(item): -214 elem.append(item) -215 continue -216 for basetype in type(item).__mro__: -217 # See if the typemap knows of any of this type's bases. -218 t = typemap.get(basetype) -219 if t is not None: -220 break -221 else: -222 raise TypeError("bad argument type: %s(%r)" % -223 (type(item).__name__, item)) -224 v = t(elem, item) -225 if v: -226 typemap.get(type(v))(elem, v) -227 -228 return elem -
229 -
230 - def __getattr__(self, tag): -
231 return partial(self, tag) -
232 -233 -234 # create factory object -235 E = ElementMaker() -236 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.builder.ElementMaker-class.html b/doc/html/api/lxml.builder.ElementMaker-class.html deleted file mode 100644 index 95a1ccd..0000000 --- a/doc/html/api/lxml.builder.ElementMaker-class.html +++ /dev/null @@ -1,536 +0,0 @@ - - - - - lxml.builder.ElementMaker - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module builder :: - Class ElementMaker - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ElementMaker

source code

-
-object --+
-         |
-        ElementMaker
-
- -
-

Element generator factory.

-

Unlike the ordinary Element factory, the E factory allows you to pass in -more than just a tag and some optional attributes; you can also pass in -text and other elements. The text is added as either text or tail -attributes, and elements are inserted at the right spot. Some small -examples:

-
->>> from lxml import etree as ET
->>> from lxml.builder import E
-
->>> ET.tostring(E("tag"))
-'<tag/>'
->>> ET.tostring(E("tag", "text"))
-'<tag>text</tag>'
->>> ET.tostring(E("tag", "text", key="value"))
-'<tag key="value">text</tag>'
->>> ET.tostring(E("tag", E("subtag", "text"), "tail"))
-'<tag><subtag>text</subtag>tail</tag>'
-
-

For simple tags, the factory also allows you to write E.tag(...) instead -of E('tag', ...):

-
->>> ET.tostring(E.tag())
-'<tag/>'
->>> ET.tostring(E.tag("text"))
-'<tag>text</tag>'
->>> ET.tostring(E.tag(E.subtag("text"), "tail"))
-'<tag><subtag>text</subtag>tail</tag>'
-
-

Here's a somewhat larger example; this shows how to generate HTML -documents, using a mix of prepared factory functions for inline elements, -nested E.tag calls, and embedded XHTML fragments:

-
-# some common inline elements
-A = E.a
-I = E.i
-B = E.b
-
-def CLASS(v):
-    # helper function, 'class' is a reserved word
-    return {'class': v}
-
-page = (
-    E.html(
-        E.head(
-            E.title("This is a sample document")
-        ),
-        E.body(
-            E.h1("Hello!", CLASS("title")),
-            E.p("This is a paragraph with ", B("bold"), " text in it!"),
-            E.p("This is another paragraph, with a ",
-                A("link", href="http://www.python.org"), "."),
-            E.p("Here are some reserved characters: <spam&egg>."),
-            ET.XML("<p>And finally, here is an embedded XHTML fragment.</p>"),
-        )
-    )
-)
-
-print ET.tostring(page)
-
-

Here's a prettyprinted version of the output from the above script:

-
-<html>
-  <head>
-    <title>This is a sample document</title>
-  </head>
-  <body>
-    <h1 class="title">Hello!</h1>
-    <p>This is a paragraph with <b>bold</b> text in it!</p>
-    <p>This is another paragraph, with <a href="http://www.python.org">link</a>.</p>
-    <p>Here are some reserved characters: &lt;spam&amp;egg&gt;.</p>
-    <p>And finally, here is an embedded XHTML fragment.</p>
-  </body>
-</html>
-
-

For namespace support, you can pass a namespace map (nsmap) -and/or a specific target namespace to the ElementMaker class:

-
->>> E = ElementMaker(namespace="http://my.ns/")
->>> print(ET.tostring( E.test ))
-<test xmlns="http://my.ns/"/>
-
->>> E = ElementMaker(namespace="http://my.ns/", nsmap={'p':'http://my.ns/'})
->>> print(ET.tostring( E.test ))
-<p:test xmlns:p="http://my.ns/"/>
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - typemap=None, - namespace=None, - nsmap=None, - makeelement=None)
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-   - - - - - - -
__call__(x, - ...)
- x(...)
- source code - -
- -
-   - - - - - - -
__getattr__(self, - tag) - source code - -
- -
-   - - - - - - -
__getattribute__(...)
- x.__getattribute__('name') <==> x.name
- source code - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - source code - -
- -
-   - - - - - - -
__reduce__(...)
- helper for pickle
- source code - -
- -
-   - - - - - - -
__setstate__(...) - source code - -
- -
-

Inherited from object: - __delattr__, - __format__, - __hash__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - _makeelement -
-   - - _namespace -
-   - - _nsmap -
-   - - _typemap -
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - typemap=None, - namespace=None, - nsmap=None, - makeelement=None) -
(Constructor) -

-
source code  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__getattribute__(...) -

-
source code  -
- - x.__getattribute__('name') <==> x.name -
-
Overrides: - object.__getattribute__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
source code  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

__reduce__(...) -

-
source code  -
- - helper for pickle -
-
Overrides: - object.__reduce__ -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.cssselect-module.html b/doc/html/api/lxml.cssselect-module.html deleted file mode 100644 index 44b105b..0000000 --- a/doc/html/api/lxml.cssselect-module.html +++ /dev/null @@ -1,254 +0,0 @@ - - - - - lxml.cssselect - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module cssselect - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module cssselect

source code

-

CSS Selectors based on XPath.

-

This module supports selecting XML/HTML tags based on CSS selectors. -See the CSSSelector class for details.

-

This is a thin wrapper around cssselect 0.7 or later.

- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - SelectorSyntaxError
- Parsing a selector that does not match the grammar. -
-   - - ExpressionError
- Unknown or unsupported selector (eg. pseudo-class). -
-   - - SelectorError
- Common parent for :class:`SelectorSyntaxError` and -:class:`ExpressionError`. -
-   - - LxmlTranslator
- A custom CSS selector to XPath translator with lxml-specific extensions. -
-   - - LxmlHTMLTranslator
- lxml extensions + HTML support. -
-   - - CSSSelector
- A CSS selector. -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
_make_lower_case(context, - s) - source code - -
- -
- - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - ns = FunctionNamespace('http://codespeak.net/lxml/css/') -
-   - - __package__ = 'lxml' -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.cssselect-pysrc.html b/doc/html/api/lxml.cssselect-pysrc.html deleted file mode 100644 index 6ffbdee..0000000 --- a/doc/html/api/lxml.cssselect-pysrc.html +++ /dev/null @@ -1,330 +0,0 @@ - - - - - lxml.cssselect - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module cssselect - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.cssselect

-
-  1  """CSS Selectors based on XPath. 
-  2   
-  3  This module supports selecting XML/HTML tags based on CSS selectors. 
-  4  See the `CSSSelector` class for details. 
-  5   
-  6  This is a thin wrapper around cssselect 0.7 or later. 
-  7  """ 
-  8   
-  9  from __future__ import absolute_import 
- 10   
- 11  from . import etree 
- 12  try: 
- 13      import cssselect as external_cssselect 
- 14  except ImportError: 
- 15      raise ImportError( 
- 16          'cssselect does not seem to be installed. ' 
- 17          'See http://packages.python.org/cssselect/') 
- 18   
- 19   
- 20  SelectorSyntaxError = external_cssselect.SelectorSyntaxError 
- 21  ExpressionError = external_cssselect.ExpressionError 
- 22  SelectorError = external_cssselect.SelectorError 
- 23   
- 24   
- 25  __all__ = ['SelectorSyntaxError', 'ExpressionError', 'SelectorError', 
- 26             'CSSSelector'] 
- 27   
- 28   
-
29 -class LxmlTranslator(external_cssselect.GenericTranslator): -
30 """ - 31 A custom CSS selector to XPath translator with lxml-specific extensions. - 32 """ -
33 - def xpath_contains_function(self, xpath, function): -
34 # Defined there, removed in later drafts: - 35 # http://www.w3.org/TR/2001/CR-css3-selectors-20011113/#content-selectors - 36 if function.argument_types() not in (['STRING'], ['IDENT']): - 37 raise ExpressionError( - 38 "Expected a single string or ident for :contains(), got %r" - 39 % function.arguments) - 40 value = function.arguments[0].value - 41 return xpath.add_condition( - 42 'contains(__lxml_internal_css:lower-case(string(.)), %s)' - 43 % self.xpath_literal(value.lower())) -
44 - 45 -
46 -class LxmlHTMLTranslator(LxmlTranslator, external_cssselect.HTMLTranslator): -
47 """ - 48 lxml extensions + HTML support. - 49 """ -
50 - 51 -
52 -def _make_lower_case(context, s): -
53 return s.lower() -
54 - 55 ns = etree.FunctionNamespace('http://codespeak.net/lxml/css/') - 56 ns.prefix = '__lxml_internal_css' - 57 ns['lower-case'] = _make_lower_case - 58 - 59 -
60 -class CSSSelector(etree.XPath): -
61 """A CSS selector. - 62 - 63 Usage:: - 64 - 65 >>> from lxml import etree, cssselect - 66 >>> select = cssselect.CSSSelector("a tag > child") - 67 - 68 >>> root = etree.XML("<a><b><c/><tag><child>TEXT</child></tag></b></a>") - 69 >>> [ el.tag for el in select(root) ] - 70 ['child'] - 71 - 72 To use CSS namespaces, you need to pass a prefix-to-namespace - 73 mapping as ``namespaces`` keyword argument:: - 74 - 75 >>> rdfns = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' - 76 >>> select_ns = cssselect.CSSSelector('root > rdf|Description', - 77 ... namespaces={'rdf': rdfns}) - 78 - 79 >>> rdf = etree.XML(( - 80 ... '<root xmlns:rdf="%s">' - 81 ... '<rdf:Description>blah</rdf:Description>' - 82 ... '</root>') % rdfns) - 83 >>> [(el.tag, el.text) for el in select_ns(rdf)] - 84 [('{http://www.w3.org/1999/02/22-rdf-syntax-ns#}Description', 'blah')] - 85 - 86 """ -
87 - def __init__(self, css, namespaces=None, translator='xml'): -
88 if translator == 'xml': - 89 translator = LxmlTranslator() - 90 elif translator == 'html': - 91 translator = LxmlHTMLTranslator() - 92 elif translator == 'xhtml': - 93 translator = LxmlHTMLTranslator(xhtml=True) - 94 path = translator.css_to_xpath(css) - 95 etree.XPath.__init__(self, path, namespaces=namespaces) - 96 self.css = css -
97 -
98 - def __repr__(self): -
99 return '<%s %s for %r>' % ( -100 self.__class__.__name__, -101 hex(abs(id(self)))[2:], -102 self.css) -
103 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.cssselect.CSSSelector-class.html b/doc/html/api/lxml.cssselect.CSSSelector-class.html deleted file mode 100644 index 5045dcb..0000000 --- a/doc/html/api/lxml.cssselect.CSSSelector-class.html +++ /dev/null @@ -1,331 +0,0 @@ - - - - - lxml.cssselect.CSSSelector - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module cssselect :: - Class CSSSelector - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class CSSSelector

source code

-
-               object --+        
-                        |        
-etree._XPathEvaluatorBase --+    
-                            |    
-                  etree.XPath --+
-                                |
-                               CSSSelector
-
- -
-

A CSS selector.

-

Usage:

-
->>> from lxml import etree, cssselect
->>> select = cssselect.CSSSelector("a tag > child")
-
->>> root = etree.XML("<a><b><c/><tag><child>TEXT</child></tag></b></a>")
->>> [ el.tag for el in select(root) ]
-['child']
-
-

To use CSS namespaces, you need to pass a prefix-to-namespace -mapping as namespaces keyword argument:

-
->>> rdfns = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'
->>> select_ns = cssselect.CSSSelector('root > rdf|Description',
-...                                   namespaces={'rdf': rdfns})
-
->>> rdf = etree.XML((
-...     '<root xmlns:rdf="%s">'
-...       '<rdf:Description>blah</rdf:Description>'
-...     '</root>') % rdfns)
->>> [(el.tag, el.text) for el in select_ns(rdf)]
-[('{http://www.w3.org/1999/02/22-rdf-syntax-ns#}Description', 'blah')]
-
- - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - css, - namespaces=None, - translator='xml')
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-   - - - - - - -
__repr__(self)
- repr(x)
- source code - -
- -
-

Inherited from etree.XPath: - __call__, - __new__ -

-

Inherited from etree._XPathEvaluatorBase: - evaluate -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from etree.XPath: - path -

-

Inherited from etree._XPathEvaluatorBase: - error_log -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - css, - namespaces=None, - translator='xml') -
(Constructor) -

-
source code  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

__repr__(self) -
(Representation operator) -

-
source code  -
- - repr(x) -
-
Overrides: - object.__repr__ -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.cssselect.LxmlHTMLTranslator-class.html b/doc/html/api/lxml.cssselect.LxmlHTMLTranslator-class.html deleted file mode 100644 index 212bafd..0000000 --- a/doc/html/api/lxml.cssselect.LxmlHTMLTranslator-class.html +++ /dev/null @@ -1,334 +0,0 @@ - - - - - lxml.cssselect.LxmlHTMLTranslator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module cssselect :: - Class LxmlHTMLTranslator - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class LxmlHTMLTranslator

source code

-
-                       object --+        
-                                |        
-cssselect.xpath.GenericTranslator --+    
-                                    |    
-                       LxmlTranslator --+
-                                        |
-                       object --+       |
-                                |       |
-cssselect.xpath.GenericTranslator --+   |
-                                    |   |
-       cssselect.xpath.HTMLTranslator --+
-                                        |
-                                       LxmlHTMLTranslator
-
- -
-lxml extensions + HTML support. - - - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from cssselect.xpath.GenericTranslator: - xpathexpr_cls -

-
- - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from LxmlTranslator: - xpath_contains_function -

-

Inherited from cssselect.xpath.HTMLTranslator: - __init__, - xpath_checked_pseudo, - xpath_disabled_pseudo, - xpath_enabled_pseudo, - xpath_lang_function, - xpath_link_pseudo -

-

Inherited from cssselect.xpath.GenericTranslator: - css_to_xpath, - pseudo_never_matches, - selector_to_xpath, - xpath, - xpath_active_pseudo, - xpath_attrib, - xpath_attrib_dashmatch, - xpath_attrib_different, - xpath_attrib_equals, - xpath_attrib_exists, - xpath_attrib_includes, - xpath_attrib_prefixmatch, - xpath_attrib_substringmatch, - xpath_attrib_suffixmatch, - xpath_child_combinator, - xpath_class, - xpath_combinedselector, - xpath_descendant_combinator, - xpath_direct_adjacent_combinator, - xpath_element, - xpath_empty_pseudo, - xpath_first_child_pseudo, - xpath_first_of_type_pseudo, - xpath_focus_pseudo, - xpath_function, - xpath_hash, - xpath_hover_pseudo, - xpath_indirect_adjacent_combinator, - xpath_last_child_pseudo, - xpath_last_of_type_pseudo, - xpath_negation, - xpath_nth_child_function, - xpath_nth_last_child_function, - xpath_nth_last_of_type_function, - xpath_nth_of_type_function, - xpath_only_child_pseudo, - xpath_only_of_type_pseudo, - xpath_pseudo, - xpath_pseudo_element, - xpath_root_pseudo, - xpath_target_pseudo, - xpath_visited_pseudo -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Static Methods[hide private]
-
-

Inherited from cssselect.xpath.GenericTranslator: - xpath_literal -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from cssselect.xpath.HTMLTranslator: - lang_attribute -

-

Inherited from cssselect.xpath.GenericTranslator: - attribute_operator_mapping, - combinator_mapping, - id_attribute, - lower_case_attribute_names, - lower_case_attribute_values, - lower_case_element_names -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.cssselect.LxmlTranslator-class.html b/doc/html/api/lxml.cssselect.LxmlTranslator-class.html deleted file mode 100644 index 8627c9d..0000000 --- a/doc/html/api/lxml.cssselect.LxmlTranslator-class.html +++ /dev/null @@ -1,386 +0,0 @@ - - - - - lxml.cssselect.LxmlTranslator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module cssselect :: - Class LxmlTranslator - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class LxmlTranslator

source code

-
-                       object --+    
-                                |    
-cssselect.xpath.GenericTranslator --+
-                                    |
-                                   LxmlTranslator
-
- -
Known Subclasses:
-
- -
- -
-A custom CSS selector to XPath translator with lxml-specific extensions. - - - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from cssselect.xpath.GenericTranslator: - xpathexpr_cls -

-
- - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
xpath_contains_function(self, - xpath, - function) - source code - -
- -
-

Inherited from cssselect.xpath.GenericTranslator: - css_to_xpath, - pseudo_never_matches, - selector_to_xpath, - xpath, - xpath_active_pseudo, - xpath_attrib, - xpath_attrib_dashmatch, - xpath_attrib_different, - xpath_attrib_equals, - xpath_attrib_exists, - xpath_attrib_includes, - xpath_attrib_prefixmatch, - xpath_attrib_substringmatch, - xpath_attrib_suffixmatch, - xpath_checked_pseudo, - xpath_child_combinator, - xpath_class, - xpath_combinedselector, - xpath_descendant_combinator, - xpath_direct_adjacent_combinator, - xpath_disabled_pseudo, - xpath_element, - xpath_empty_pseudo, - xpath_enabled_pseudo, - xpath_first_child_pseudo, - xpath_first_of_type_pseudo, - xpath_focus_pseudo, - xpath_function, - xpath_hash, - xpath_hover_pseudo, - xpath_indirect_adjacent_combinator, - xpath_lang_function, - xpath_last_child_pseudo, - xpath_last_of_type_pseudo, - xpath_link_pseudo, - xpath_negation, - xpath_nth_child_function, - xpath_nth_last_child_function, - xpath_nth_last_of_type_function, - xpath_nth_of_type_function, - xpath_only_child_pseudo, - xpath_only_of_type_pseudo, - xpath_pseudo, - xpath_pseudo_element, - xpath_root_pseudo, - xpath_target_pseudo, - xpath_visited_pseudo -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Static Methods[hide private]
-
-

Inherited from cssselect.xpath.GenericTranslator: - xpath_literal -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from cssselect.xpath.GenericTranslator: - attribute_operator_mapping, - combinator_mapping, - id_attribute, - lang_attribute, - lower_case_attribute_names, - lower_case_attribute_values, - lower_case_element_names -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

xpath_contains_function(self, - xpath, - function) -

-
source code  -
- - -
-
Overrides: - cssselect.xpath.GenericTranslator.xpath_contains_function -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.doctestcompare-module.html b/doc/html/api/lxml.doctestcompare-module.html deleted file mode 100644 index 77550e1..0000000 --- a/doc/html/api/lxml.doctestcompare-module.html +++ /dev/null @@ -1,498 +0,0 @@ - - - - - lxml.doctestcompare - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module doctestcompare - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module doctestcompare

source code

-

lxml-based doctest output comparison.

-

Note: normally, you should just import the lxml.usedoctest and -lxml.html.usedoctest modules from within a doctest, instead of this -one:

-
->>> import lxml.usedoctest # for XML output
-
->>> import lxml.html.usedoctest # for HTML output
-
-

To use this module directly, you must call lxmldoctest.install(), -which will cause doctest to use this in all subsequent calls.

-

This changes the way output is checked and comparisons are made for -XML or HTML-like content.

-

XML or HTML content is noticed because the example starts with < -(it's HTML if it starts with <html). You can also use the -PARSE_HTML and PARSE_XML flags to force parsing.

-

Some rough wildcard-like things are allowed. Whitespace is generally -ignored (except in attributes). In text (attributes and text in the -body) you can use ... as a wildcard. In an example it also -matches any trailing tags in the element, though it does not match -leading tags. You may create a tag <any> or include an any -attribute in the tag. An any tag matches any tag, while the -attribute matches any and all attributes.

-

When a match fails, the reformatted example and gotten text is -displayed (indented), and a rough diff-like output is given. Anything -marked with + is in the output but wasn't supposed to be, and -similarly - means its in the example but wasn't in the output.

-

You can disable parsing on one line with # doctest:+NOPARSE_MARKUP

- - - - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - LXMLOutputChecker -
-   - - LHTMLOutputChecker -
-   - - _RestoreChecker -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
strip(v) - source code - -
- -
-   - - - - - - -
norm_whitespace(v) - source code - -
- -
-   - - - - - - -
html_fromstring(html) - source code - -
- -
-   - - - - - - -
install(html=False)
- Install doctestcompare for all future doctests.
- source code - -
- -
-   - - - - - - -
temp_install(html=False, - del_module=None)
- Use this inside a doctest to enable this checker for this -doctest only.
- source code - -
- -
-   - - - - - - -
_find_doctest_frame() - source code - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - _IS_PYTHON_3 = False -
-   - - PARSE_HTML = 1024 -
-   - - PARSE_XML = 2048 -
-   - - NOPARSE_MARKUP = 4096 -
-   - - _html_parser = <lxml.etree.HTMLParser object> -
-   - - _repr_re = re.compile(r'^<[^>]+ (at|object) ') -
-   - - _norm_whitespace_re = re.compile(r'[ \t\n][ \t\n]+') -
-   - - __test__ = {'basic': '\n >>> temp_install()\n >>> print ... -
-   - - __package__ = 'lxml' -
- - - - - - -
- - - - - -
Function Details[hide private]
-
- -
- -
- - -
-

install(html=False) -

-
source code  -
- -

Install doctestcompare for all future doctests.

-

If html is true, then by default the HTML parser will be used; -otherwise the XML parser is used.

-
-
-
-
- -
- -
- - -
-

temp_install(html=False, - del_module=None) -

-
source code  -
- -

Use this inside a doctest to enable this checker for this -doctest only.

-

If html is true, then by default the HTML parser will be used; -otherwise the XML parser is used.

-
-
-
-
-
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

__test__

- -
-
-
-
Value:
-
-{'basic': '''
-    >>> temp_install()
-    >>> print """<xml a="1" b="2">stuff</xml>"""
-    <xml b="2" a="1">...</xml>
-    >>> print """<xml xmlns="http://example.com"><tag   attr="bar"   /\
-></xml>"""
-    <xml xmlns="...">
-      <tag attr="..." />
-...
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.doctestcompare-pysrc.html b/doc/html/api/lxml.doctestcompare-pysrc.html deleted file mode 100644 index 5bc8f3c..0000000 --- a/doc/html/api/lxml.doctestcompare-pysrc.html +++ /dev/null @@ -1,1149 +0,0 @@ - - - - - lxml.doctestcompare - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module doctestcompare - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.doctestcompare

-
-  1  """ 
-  2  lxml-based doctest output comparison. 
-  3   
-  4  Note: normally, you should just import the `lxml.usedoctest` and 
-  5  `lxml.html.usedoctest` modules from within a doctest, instead of this 
-  6  one:: 
-  7   
-  8      >>> import lxml.usedoctest # for XML output 
-  9   
- 10      >>> import lxml.html.usedoctest # for HTML output 
- 11   
- 12  To use this module directly, you must call ``lxmldoctest.install()``, 
- 13  which will cause doctest to use this in all subsequent calls. 
- 14   
- 15  This changes the way output is checked and comparisons are made for 
- 16  XML or HTML-like content. 
- 17   
- 18  XML or HTML content is noticed because the example starts with ``<`` 
- 19  (it's HTML if it starts with ``<html``).  You can also use the 
- 20  ``PARSE_HTML`` and ``PARSE_XML`` flags to force parsing. 
- 21   
- 22  Some rough wildcard-like things are allowed.  Whitespace is generally 
- 23  ignored (except in attributes).  In text (attributes and text in the 
- 24  body) you can use ``...`` as a wildcard.  In an example it also 
- 25  matches any trailing tags in the element, though it does not match 
- 26  leading tags.  You may create a tag ``<any>`` or include an ``any`` 
- 27  attribute in the tag.  An ``any`` tag matches any tag, while the 
- 28  attribute matches any and all attributes. 
- 29   
- 30  When a match fails, the reformatted example and gotten text is 
- 31  displayed (indented), and a rough diff-like output is given.  Anything 
- 32  marked with ``+`` is in the output but wasn't supposed to be, and 
- 33  similarly ``-`` means its in the example but wasn't in the output. 
- 34   
- 35  You can disable parsing on one line with ``# doctest:+NOPARSE_MARKUP`` 
- 36  """ 
- 37   
- 38  from lxml import etree 
- 39  import sys 
- 40  import re 
- 41  import doctest 
- 42  try: 
- 43      from html import escape as html_escape 
- 44  except ImportError: 
- 45      from cgi import escape as html_escape 
- 46   
- 47  __all__ = ['PARSE_HTML', 'PARSE_XML', 'NOPARSE_MARKUP', 'LXMLOutputChecker', 
- 48             'LHTMLOutputChecker', 'install', 'temp_install'] 
- 49   
- 50  try: 
- 51      _basestring = basestring 
- 52  except NameError: 
- 53      _basestring = (str, bytes) 
- 54   
- 55  _IS_PYTHON_3 = sys.version_info[0] >= 3 
- 56   
- 57  PARSE_HTML = doctest.register_optionflag('PARSE_HTML') 
- 58  PARSE_XML = doctest.register_optionflag('PARSE_XML') 
- 59  NOPARSE_MARKUP = doctest.register_optionflag('NOPARSE_MARKUP') 
- 60   
- 61  OutputChecker = doctest.OutputChecker 
- 62   
-
63 -def strip(v): -
64 if v is None: - 65 return None - 66 else: - 67 return v.strip() -
68 -
69 -def norm_whitespace(v): -
70 return _norm_whitespace_re.sub(' ', v) -
71 - 72 _html_parser = etree.HTMLParser(recover=False, remove_blank_text=True) - 73 -
74 -def html_fromstring(html): -
76 - 77 # We use this to distinguish repr()s from elements: - 78 _repr_re = re.compile(r'^<[^>]+ (at|object) ') - 79 _norm_whitespace_re = re.compile(r'[ \t\n][ \t\n]+') - 80 -
81 -class LXMLOutputChecker(OutputChecker): -
82 - 83 empty_tags = ( - 84 'param', 'img', 'area', 'br', 'basefont', 'input', - 85 'base', 'meta', 'link', 'col') - 86 -
87 - def get_default_parser(self): -
88 return etree.XML -
89 -
90 - def check_output(self, want, got, optionflags): -
91 alt_self = getattr(self, '_temp_override_self', None) - 92 if alt_self is not None: - 93 super_method = self._temp_call_super_check_output - 94 self = alt_self - 95 else: - 96 super_method = OutputChecker.check_output - 97 parser = self.get_parser(want, got, optionflags) - 98 if not parser: - 99 return super_method( -100 self, want, got, optionflags) -101 try: -102 want_doc = parser(want) -103 except etree.XMLSyntaxError: -104 return False -105 try: -106 got_doc = parser(got) -107 except etree.XMLSyntaxError: -108 return False -109 return self.compare_docs(want_doc, got_doc) -
110 -
111 - def get_parser(self, want, got, optionflags): -
112 parser = None -113 if NOPARSE_MARKUP & optionflags: -114 return None -115 if PARSE_HTML & optionflags: -116 parser = html_fromstring -117 elif PARSE_XML & optionflags: -118 parser = etree.XML -119 elif (want.strip().lower().startswith('<html') -120 and got.strip().startswith('<html')): -121 parser = html_fromstring -122 elif (self._looks_like_markup(want) -123 and self._looks_like_markup(got)): -124 parser = self.get_default_parser() -125 return parser -
126 -
127 - def _looks_like_markup(self, s): -
128 s = s.strip() -129 return (s.startswith('<') -130 and not _repr_re.search(s)) -
131 -
132 - def compare_docs(self, want, got): -
133 if not self.tag_compare(want.tag, got.tag): -134 return False -135 if not self.text_compare(want.text, got.text, True): -136 return False -137 if not self.text_compare(want.tail, got.tail, True): -138 return False -139 if 'any' not in want.attrib: -140 want_keys = sorted(want.attrib.keys()) -141 got_keys = sorted(got.attrib.keys()) -142 if want_keys != got_keys: -143 return False -144 for key in want_keys: -145 if not self.text_compare(want.attrib[key], got.attrib[key], False): -146 return False -147 if want.text != '...' or len(want): -148 want_children = list(want) -149 got_children = list(got) -150 while want_children or got_children: -151 if not want_children or not got_children: -152 return False -153 want_first = want_children.pop(0) -154 got_first = got_children.pop(0) -155 if not self.compare_docs(want_first, got_first): -156 return False -157 if not got_children and want_first.tail == '...': -158 break -159 return True -
160 -
161 - def text_compare(self, want, got, strip): -
162 want = want or '' -163 got = got or '' -164 if strip: -165 want = norm_whitespace(want).strip() -166 got = norm_whitespace(got).strip() -167 want = '^%s$' % re.escape(want) -168 want = want.replace(r'\.\.\.', '.*') -169 if re.search(want, got): -170 return True -171 else: -172 return False -
173 -
174 - def tag_compare(self, want, got): -
175 if want == 'any': -176 return True -177 if (not isinstance(want, _basestring) -178 or not isinstance(got, _basestring)): -179 return want == got -180 want = want or '' -181 got = got or '' -182 if want.startswith('{...}'): -183 # Ellipsis on the namespace -184 return want.split('}')[-1] == got.split('}')[-1] -185 else: -186 return want == got -
187 -
188 - def output_difference(self, example, got, optionflags): -
189 want = example.want -190 parser = self.get_parser(want, got, optionflags) -191 errors = [] -192 if parser is not None: -193 try: -194 want_doc = parser(want) -195 except etree.XMLSyntaxError: -196 e = sys.exc_info()[1] -197 errors.append('In example: %s' % e) -198 try: -199 got_doc = parser(got) -200 except etree.XMLSyntaxError: -201 e = sys.exc_info()[1] -202 errors.append('In actual output: %s' % e) -203 if parser is None or errors: -204 value = OutputChecker.output_difference( -205 self, example, got, optionflags) -206 if errors: -207 errors.append(value) -208 return '\n'.join(errors) -209 else: -210 return value -211 html = parser is html_fromstring -212 diff_parts = [] -213 diff_parts.append('Expected:') -214 diff_parts.append(self.format_doc(want_doc, html, 2)) -215 diff_parts.append('Got:') -216 diff_parts.append(self.format_doc(got_doc, html, 2)) -217 diff_parts.append('Diff:') -218 diff_parts.append(self.collect_diff(want_doc, got_doc, html, 2)) -219 return '\n'.join(diff_parts) -
220 -
221 - def html_empty_tag(self, el, html=True): -
222 if not html: -223 return False -224 if el.tag not in self.empty_tags: -225 return False -226 if el.text or len(el): -227 # This shouldn't happen (contents in an empty tag) -228 return False -229 return True -
230 -
231 - def format_doc(self, doc, html, indent, prefix=''): -
232 parts = [] -233 if not len(doc): -234 # No children... -235 parts.append(' '*indent) -236 parts.append(prefix) -237 parts.append(self.format_tag(doc)) -238 if not self.html_empty_tag(doc, html): -239 if strip(doc.text): -240 parts.append(self.format_text(doc.text)) -241 parts.append(self.format_end_tag(doc)) -242 if strip(doc.tail): -243 parts.append(self.format_text(doc.tail)) -244 parts.append('\n') -245 return ''.join(parts) -246 parts.append(' '*indent) -247 parts.append(prefix) -248 parts.append(self.format_tag(doc)) -249 if not self.html_empty_tag(doc, html): -250 parts.append('\n') -251 if strip(doc.text): -252 parts.append(' '*indent) -253 parts.append(self.format_text(doc.text)) -254 parts.append('\n') -255 for el in doc: -256 parts.append(self.format_doc(el, html, indent+2)) -257 parts.append(' '*indent) -258 parts.append(self.format_end_tag(doc)) -259 parts.append('\n') -260 if strip(doc.tail): -261 parts.append(' '*indent) -262 parts.append(self.format_text(doc.tail)) -263 parts.append('\n') -264 return ''.join(parts) -
265 -
266 - def format_text(self, text, strip=True): -
267 if text is None: -268 return '' -269 if strip: -270 text = text.strip() -271 return html_escape(text, 1) -
272 -
273 - def format_tag(self, el): -
274 attrs = [] -275 if isinstance(el, etree.CommentBase): -276 # FIXME: probably PIs should be handled specially too? -277 return '<!--' -278 for name, value in sorted(el.attrib.items()): -279 attrs.append('%s="%s"' % (name, self.format_text(value, False))) -280 if not attrs: -281 return '<%s>' % el.tag -282 return '<%s %s>' % (el.tag, ' '.join(attrs)) -
283 -
284 - def format_end_tag(self, el): -
285 if isinstance(el, etree.CommentBase): -286 # FIXME: probably PIs should be handled specially too? -287 return '-->' -288 return '</%s>' % el.tag -
289 -
290 - def collect_diff(self, want, got, html, indent): -
291 parts = [] -292 if not len(want) and not len(got): -293 parts.append(' '*indent) -294 parts.append(self.collect_diff_tag(want, got)) -295 if not self.html_empty_tag(got, html): -296 parts.append(self.collect_diff_text(want.text, got.text)) -297 parts.append(self.collect_diff_end_tag(want, got)) -298 parts.append(self.collect_diff_text(want.tail, got.tail)) -299 parts.append('\n') -300 return ''.join(parts) -301 parts.append(' '*indent) -302 parts.append(self.collect_diff_tag(want, got)) -303 parts.append('\n') -304 if strip(want.text) or strip(got.text): -305 parts.append(' '*indent) -306 parts.append(self.collect_diff_text(want.text, got.text)) -307 parts.append('\n') -308 want_children = list(want) -309 got_children = list(got) -310 while want_children or got_children: -311 if not want_children: -312 parts.append(self.format_doc(got_children.pop(0), html, indent+2, '+')) -313 continue -314 if not got_children: -315 parts.append(self.format_doc(want_children.pop(0), html, indent+2, '-')) -316 continue -317 parts.append(self.collect_diff( -318 want_children.pop(0), got_children.pop(0), html, indent+2)) -319 parts.append(' '*indent) -320 parts.append(self.collect_diff_end_tag(want, got)) -321 parts.append('\n') -322 if strip(want.tail) or strip(got.tail): -323 parts.append(' '*indent) -324 parts.append(self.collect_diff_text(want.tail, got.tail)) -325 parts.append('\n') -326 return ''.join(parts) -
327 -
328 - def collect_diff_tag(self, want, got): -
329 if not self.tag_compare(want.tag, got.tag): -330 tag = '%s (got: %s)' % (want.tag, got.tag) -331 else: -332 tag = got.tag -333 attrs = [] -334 any = want.tag == 'any' or 'any' in want.attrib -335 for name, value in sorted(got.attrib.items()): -336 if name not in want.attrib and not any: -337 attrs.append('+%s="%s"' % (name, self.format_text(value, False))) -338 else: -339 if name in want.attrib: -340 text = self.collect_diff_text(want.attrib[name], value, False) -341 else: -342 text = self.format_text(value, False) -343 attrs.append('%s="%s"' % (name, text)) -344 if not any: -345 for name, value in sorted(want.attrib.items()): -346 if name in got.attrib: -347 continue -348 attrs.append('-%s="%s"' % (name, self.format_text(value, False))) -349 if attrs: -350 tag = '<%s %s>' % (tag, ' '.join(attrs)) -351 else: -352 tag = '<%s>' % tag -353 return tag -
354 -
355 - def collect_diff_end_tag(self, want, got): -
356 if want.tag != got.tag: -357 tag = '%s (got: %s)' % (want.tag, got.tag) -358 else: -359 tag = got.tag -360 return '</%s>' % tag -
361 -
362 - def collect_diff_text(self, want, got, strip=True): -
363 if self.text_compare(want, got, strip): -364 if not got: -365 return '' -366 return self.format_text(got, strip) -367 text = '%s (got: %s)' % (want, got) -368 return self.format_text(text, strip) -
369 -
370 -class LHTMLOutputChecker(LXMLOutputChecker): -
371 - def get_default_parser(self): -
372 return html_fromstring -
373 -
374 -def install(html=False): -
375 """ -376 Install doctestcompare for all future doctests. -377 -378 If html is true, then by default the HTML parser will be used; -379 otherwise the XML parser is used. -380 """ -381 if html: -382 doctest.OutputChecker = LHTMLOutputChecker -383 else: -384 doctest.OutputChecker = LXMLOutputChecker -
385 -
386 -def temp_install(html=False, del_module=None): -
387 """ -388 Use this *inside* a doctest to enable this checker for this -389 doctest only. -390 -391 If html is true, then by default the HTML parser will be used; -392 otherwise the XML parser is used. -393 """ -394 if html: -395 Checker = LHTMLOutputChecker -396 else: -397 Checker = LXMLOutputChecker -398 frame = _find_doctest_frame() -399 dt_self = frame.f_locals['self'] -400 checker = Checker() -401 old_checker = dt_self._checker -402 dt_self._checker = checker -403 # The unfortunate thing is that there is a local variable 'check' -404 # in the function that runs the doctests, that is a bound method -405 # into the output checker. We have to update that. We can't -406 # modify the frame, so we have to modify the object in place. The -407 # only way to do this is to actually change the func_code -408 # attribute of the method. We change it, and then wait for -409 # __record_outcome to be run, which signals the end of the __run -410 # method, at which point we restore the previous check_output -411 # implementation. -412 if _IS_PYTHON_3: -413 check_func = frame.f_locals['check'].__func__ -414 checker_check_func = checker.check_output.__func__ -415 else: -416 check_func = frame.f_locals['check'].im_func -417 checker_check_func = checker.check_output.im_func -418 # Because we can't patch up func_globals, this is the only global -419 # in check_output that we care about: -420 doctest.etree = etree -421 _RestoreChecker(dt_self, old_checker, checker, -422 check_func, checker_check_func, -423 del_module) -
424 -
425 -class _RestoreChecker(object): -
426 - def __init__(self, dt_self, old_checker, new_checker, check_func, clone_func, -427 del_module): -
428 self.dt_self = dt_self -429 self.checker = old_checker -430 self.checker._temp_call_super_check_output = self.call_super -431 self.checker._temp_override_self = new_checker -432 self.check_func = check_func -433 self.clone_func = clone_func -434 self.del_module = del_module -435 self.install_clone() -436 self.install_dt_self() -
437 - def install_clone(self): -
438 if _IS_PYTHON_3: -439 self.func_code = self.check_func.__code__ -440 self.func_globals = self.check_func.__globals__ -441 self.check_func.__code__ = self.clone_func.__code__ -442 else: -443 self.func_code = self.check_func.func_code -444 self.func_globals = self.check_func.func_globals -445 self.check_func.func_code = self.clone_func.func_code -
446 - def uninstall_clone(self): -
447 if _IS_PYTHON_3: -448 self.check_func.__code__ = self.func_code -449 else: -450 self.check_func.func_code = self.func_code -
451 - def install_dt_self(self): -
452 self.prev_func = self.dt_self._DocTestRunner__record_outcome -453 self.dt_self._DocTestRunner__record_outcome = self -
454 - def uninstall_dt_self(self): -
455 self.dt_self._DocTestRunner__record_outcome = self.prev_func -
456 - def uninstall_module(self): -
457 if self.del_module: -458 import sys -459 del sys.modules[self.del_module] -460 if '.' in self.del_module: -461 package, module = self.del_module.rsplit('.', 1) -462 package_mod = sys.modules[package] -463 delattr(package_mod, module) -
464 - def __call__(self, *args, **kw): -
465 self.uninstall_clone() -466 self.uninstall_dt_self() -467 del self.checker._temp_override_self -468 del self.checker._temp_call_super_check_output -469 result = self.prev_func(*args, **kw) -470 self.uninstall_module() -471 return result -
472 - def call_super(self, *args, **kw): -
473 self.uninstall_clone() -474 try: -475 return self.check_func(*args, **kw) -476 finally: -477 self.install_clone() -
478 -
480 import sys -481 frame = sys._getframe(1) -482 while frame: -483 l = frame.f_locals -484 if 'BOOM' in l: -485 # Sign of doctest -486 return frame -487 frame = frame.f_back -488 raise LookupError( -489 "Could not find doctest (only use this function *inside* a doctest)") -
490 -491 __test__ = { -492 'basic': ''' -493 >>> temp_install() -494 >>> print """<xml a="1" b="2">stuff</xml>""" -495 <xml b="2" a="1">...</xml> -496 >>> print """<xml xmlns="http://example.com"><tag attr="bar" /></xml>""" -497 <xml xmlns="..."> -498 <tag attr="..." /> -499 </xml> -500 >>> print """<xml>blahblahblah<foo /></xml>""" # doctest: +NOPARSE_MARKUP, +ELLIPSIS -501 <xml>...foo /></xml> -502 '''} -503 -504 if __name__ == '__main__': -505 import doctest -506 doctest.testmod() -507 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.doctestcompare.LHTMLOutputChecker-class.html b/doc/html/api/lxml.doctestcompare.LHTMLOutputChecker-class.html deleted file mode 100644 index 502fb12..0000000 --- a/doc/html/api/lxml.doctestcompare.LHTMLOutputChecker-class.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - lxml.doctestcompare.LHTMLOutputChecker - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module doctestcompare :: - Class LHTMLOutputChecker - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class LHTMLOutputChecker

source code

-
-doctest.OutputChecker --+    
-                        |    
-        LXMLOutputChecker --+
-                            |
-                           LHTMLOutputChecker
-
- -
- - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
get_default_parser(self) - source code - -
- -
-

Inherited from LXMLOutputChecker: - check_output, - collect_diff, - collect_diff_end_tag, - collect_diff_tag, - collect_diff_text, - compare_docs, - format_doc, - format_end_tag, - format_tag, - format_text, - get_parser, - html_empty_tag, - output_difference, - tag_compare, - text_compare -

-

Inherited from LXMLOutputChecker (private): - _looks_like_markup -

-

Inherited from doctest.OutputChecker (private): - _do_a_fancy_diff -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from LXMLOutputChecker: - empty_tags -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

get_default_parser(self) -

-
source code  -
- - -
-
Overrides: - LXMLOutputChecker.get_default_parser -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.doctestcompare.LXMLOutputChecker-class.html b/doc/html/api/lxml.doctestcompare.LXMLOutputChecker-class.html deleted file mode 100644 index 07bd436..0000000 --- a/doc/html/api/lxml.doctestcompare.LXMLOutputChecker-class.html +++ /dev/null @@ -1,633 +0,0 @@ - - - - - lxml.doctestcompare.LXMLOutputChecker - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module doctestcompare :: - Class LXMLOutputChecker - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class LXMLOutputChecker

source code

-
-doctest.OutputChecker --+
-                        |
-                       LXMLOutputChecker
-
- -
Known Subclasses:
-
- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
get_default_parser(self) - source code - -
- -
-   - - - - - - -
check_output(self, - want, - got, - optionflags)
- Return True iff the actual output from an example (got) -matches the expected output (want). These strings are -always considered to match if they are identical; but -depending on what option flags the test runner is using, -several non-exact match types are also possible. See the -documentation for TestRunner for more information about -option flags.
- source code - -
- -
-   - - - - - - -
get_parser(self, - want, - got, - optionflags) - source code - -
- -
-   - - - - - - -
_looks_like_markup(self, - s) - source code - -
- -
-   - - - - - - -
compare_docs(self, - want, - got) - source code - -
- -
-   - - - - - - -
text_compare(self, - want, - got, - strip) - source code - -
- -
-   - - - - - - -
tag_compare(self, - want, - got) - source code - -
- -
-   - - - - - - -
output_difference(self, - example, - got, - optionflags)
- Return a string describing the differences between the -expected output for a given example (example) and the actual -output (got). optionflags is the set of option flags used -to compare want and got.
- source code - -
- -
-   - - - - - - -
html_empty_tag(self, - el, - html=True) - source code - -
- -
-   - - - - - - -
format_doc(self, - doc, - html, - indent, - prefix='') - source code - -
- -
-   - - - - - - -
format_text(self, - text, - strip=True) - source code - -
- -
-   - - - - - - -
format_tag(self, - el) - source code - -
- -
-   - - - - - - -
format_end_tag(self, - el) - source code - -
- -
-   - - - - - - -
collect_diff(self, - want, - got, - html, - indent) - source code - -
- -
-   - - - - - - -
collect_diff_tag(self, - want, - got) - source code - -
- -
-   - - - - - - -
collect_diff_end_tag(self, - want, - got) - source code - -
- -
-   - - - - - - -
collect_diff_text(self, - want, - got, - strip=True) - source code - -
- -
-

Inherited from doctest.OutputChecker (private): - _do_a_fancy_diff -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - empty_tags = ('param', 'img', 'area', 'br', 'basefont', 'input... -
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

check_output(self, - want, - got, - optionflags) -

-
source code  -
- - Return True iff the actual output from an example (got) -matches the expected output (want). These strings are -always considered to match if they are identical; but -depending on what option flags the test runner is using, -several non-exact match types are also possible. See the -documentation for TestRunner for more information about -option flags. -
-
Overrides: - doctest.OutputChecker.check_output -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

output_difference(self, - example, - got, - optionflags) -

-
source code  -
- - Return a string describing the differences between the -expected output for a given example (example) and the actual -output (got). optionflags is the set of option flags used -to compare want and got. -
-
Overrides: - doctest.OutputChecker.output_difference -
(inherited documentation)
- -
-
-
-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

empty_tags

- -
-
-
-
Value:
-
-('param',
- 'img',
- 'area',
- 'br',
- 'basefont',
- 'input',
- 'base',
- 'meta',
-...
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.doctestcompare._RestoreChecker-class.html b/doc/html/api/lxml.doctestcompare._RestoreChecker-class.html deleted file mode 100644 index 5938afe..0000000 --- a/doc/html/api/lxml.doctestcompare._RestoreChecker-class.html +++ /dev/null @@ -1,372 +0,0 @@ - - - - - lxml.doctestcompare._RestoreChecker - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module doctestcompare :: - Class _RestoreChecker - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _RestoreChecker

source code

-
-object --+
-         |
-        _RestoreChecker
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - dt_self, - old_checker, - new_checker, - check_func, - clone_func, - del_module)
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-   - - - - - - -
install_clone(self) - source code - -
- -
-   - - - - - - -
uninstall_clone(self) - source code - -
- -
-   - - - - - - -
install_dt_self(self) - source code - -
- -
-   - - - - - - -
uninstall_dt_self(self) - source code - -
- -
-   - - - - - - -
uninstall_module(self) - source code - -
- -
-   - - - - - - -
__call__(self, - *args, - **kw) - source code - -
- -
-   - - - - - - -
call_super(self, - *args, - **kw) - source code - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - dt_self, - old_checker, - new_checker, - check_func, - clone_func, - del_module) -
(Constructor) -

-
source code  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree-module.html b/doc/html/api/lxml.etree-module.html deleted file mode 100644 index 09d90af..0000000 --- a/doc/html/api/lxml.etree-module.html +++ /dev/null @@ -1,2599 +0,0 @@ - - - - - lxml.etree - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module etree

-The lxml.etree module implements the extended ElementTree API for XML. - -
-

Version: - 4.2.5 -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - AncestorsIterator
- AncestorsIterator(self, node, tag=None) -Iterates over the ancestors of an element (from parent to parent). -
-   - - AttributeBasedElementClassLookup
- AttributeBasedElementClassLookup(self, attribute_name, class_mapping, fallback=None) -Checks an attribute of an Element and looks up the value in a -class dictionary. -
-   - - C14NError
- Error during C14N serialisation. -
-   - - CDATA
- CDATA(data) -
-   - - CommentBase
- All custom Comment classes must inherit from this one. -
-   - - CustomElementClassLookup
- CustomElementClassLookup(self, fallback=None) -Element class lookup based on a subclass method. -
-   - - DTD
- DTD(self, file=None, external_id=None) -A DTD validator. -
-   - - DTDError
- Base class for DTD errors. -
-   - - DTDParseError
- Error while parsing a DTD. -
-   - - DTDValidateError
- Error while validating an XML document with a DTD. -
-   - - DocInfo
- Document information provided by parser and DTD. -
-   - - DocumentInvalid
- Validation error. -
-   - - ETCompatXMLParser
- ETCompatXMLParser(self, encoding=None, attribute_defaults=False, dtd_validation=False, load_dtd=False, no_network=True, ns_clean=False, recover=False, schema=None, huge_tree=False, remove_blank_text=False, resolve_entities=True, remove_comments=True, remove_pis=True, strip_cdata=True, target=None, compact=True) -
-   - - ETXPath
- ETXPath(self, path, extensions=None, regexp=True, smart_strings=True) -Special XPath class that supports the ElementTree {uri} notation for namespaces. -
-   - - ElementBase
- ElementBase(*children, attrib=None, nsmap=None, **_extra) -
-   - - ElementChildIterator
- ElementChildIterator(self, node, tag=None, reversed=False) -Iterates over the children of an element. -
-   - - ElementClassLookup
- ElementClassLookup(self) -Superclass of Element class lookups. -
-   - - ElementDefaultClassLookup
- ElementDefaultClassLookup(self, element=None, comment=None, pi=None, entity=None) -Element class lookup scheme that always returns the default Element -class. -
-   - - ElementDepthFirstIterator
- ElementDepthFirstIterator(self, node, tag=None, inclusive=True) -Iterates over an element and its sub-elements in document order (depth -first pre-order). -
-   - - ElementNamespaceClassLookup
- ElementNamespaceClassLookup(self, fallback=None) -
-   - - ElementTextIterator
- ElementTextIterator(self, element, tag=None, with_tail=True) -Iterates over the text content of a subtree. -
-   - - EntityBase
- All custom Entity classes must inherit from this one. -
-   - - Error -
-   - - ErrorDomains
- Libxml2 error domains -
-   - - ErrorLevels
- Libxml2 error levels -
-   - - ErrorTypes
- Libxml2 error types -
-   - - FallbackElementClassLookup
- FallbackElementClassLookup(self, fallback=None) -
-   - - HTMLParser
- HTMLParser(self, encoding=None, remove_blank_text=False, remove_comments=False, remove_pis=False, strip_cdata=True, no_network=True, target=None, schema: XMLSchema =None, recover=True, compact=True, collect_ids=True, huge_tree=False) -
-   - - HTMLPullParser
- HTMLPullParser(self, events=None, *, tag=None, base_url=None, **kwargs) -
-   - - LxmlError
- Main exception base class for lxml. All other exceptions inherit from -this one. -
-   - - LxmlRegistryError
- Base class of lxml registry errors. -
-   - - LxmlSyntaxError
- Base class for all syntax errors. -
-   - - NamespaceRegistryError
- Error registering a namespace extension. -
-   - - PIBase
- All custom Processing Instruction classes must inherit from this one. -
-   - - ParseError
- Syntax error while parsing an XML document. -
-   - - ParserBasedElementClassLookup
- ParserBasedElementClassLookup(self, fallback=None) -Element class lookup based on the XML parser. -
-   - - ParserError
- Internal lxml parser error. -
-   - - PyErrorLog
- PyErrorLog(self, logger_name=None, logger=None) -A global error log that connects to the Python stdlib logging package. -
-   - - PythonElementClassLookup
- PythonElementClassLookup(self, fallback=None) -Element class lookup based on a subclass method. -
-   - - QName
- QName(text_or_uri_or_element, tag=None) -
-   - - RelaxNG
- RelaxNG(self, etree=None, file=None) -Turn a document into a Relax NG validator. -
-   - - RelaxNGError
- Base class for RelaxNG errors. -
-   - - RelaxNGErrorTypes
- Libxml2 RelaxNG error types -
-   - - RelaxNGParseError
- Error while parsing an XML document as RelaxNG. -
-   - - RelaxNGValidateError
- Error while validating an XML document with a RelaxNG schema. -
-   - - Resolver
- This is the base class of all resolvers. -
-   - - Schematron
- Schematron(self, etree=None, file=None) -A Schematron validator. -
-   - - SchematronError
- Base class of all Schematron errors. -
-   - - SchematronParseError
- Error while parsing an XML document as Schematron schema. -
-   - - SchematronValidateError
- Error while validating an XML document with a Schematron schema. -
-   - - SerialisationError
- A libxml2 error that occurred during serialisation. -
-   - - SiblingsIterator
- SiblingsIterator(self, node, tag=None, preceding=False) -Iterates over the siblings of an element. -
-   - - TreeBuilder
- TreeBuilder(self, element_factory=None, parser=None) -Parser target that builds a tree. -
-   - - XInclude
- XInclude(self) -XInclude processor. -
-   - - XIncludeError
- Error during XInclude processing. -
-   - - XMLParser
- XMLParser(self, encoding=None, attribute_defaults=False, dtd_validation=False, load_dtd=False, no_network=True, ns_clean=False, recover=False, schema: XMLSchema =None, huge_tree=False, remove_blank_text=False, resolve_entities=True, remove_comments=False, remove_pis=False, strip_cdata=True, collect_ids=True, target=None, compact=True) -
-   - - XMLPullParser
- XMLPullParser(self, events=None, *, tag=None, **kwargs) -
-   - - XMLSchema
- XMLSchema(self, etree=None, file=None) -Turn a document into an XML Schema validator. -
-   - - XMLSchemaError
- Base class of all XML Schema errors -
-   - - XMLSchemaParseError
- Error while parsing an XML document as XML Schema. -
-   - - XMLSchemaValidateError
- Error while validating an XML document with an XML Schema. -
-   - - XMLSyntaxError
- Syntax error while parsing an XML document. -
-   - - XMLTreeBuilder
- ETCompatXMLParser(self, encoding=None, attribute_defaults=False, dtd_validation=False, load_dtd=False, no_network=True, ns_clean=False, recover=False, schema=None, huge_tree=False, remove_blank_text=False, resolve_entities=True, remove_comments=True, remove_pis=True, strip_cdata=True, target=None, compact=True) -
-   - - XPath
- XPath(self, path, namespaces=None, extensions=None, regexp=True, smart_strings=True) -A compiled XPath expression that can be called on Elements and ElementTrees. -
-   - - XPathDocumentEvaluator
- XPathDocumentEvaluator(self, etree, namespaces=None, extensions=None, regexp=True, smart_strings=True) -Create an XPath evaluator for an ElementTree. -
-   - - XPathElementEvaluator
- XPathElementEvaluator(self, element, namespaces=None, extensions=None, regexp=True, smart_strings=True) -Create an XPath evaluator for an element. -
-   - - XPathError
- Base class of all XPath errors. -
-   - - XPathEvalError
- Error during XPath evaluation. -
-   - - XPathFunctionError
- Internal error looking up an XPath extension function. -
-   - - XPathResultError
- Error handling an XPath result. -
-   - - XPathSyntaxError -
-   - - XSLT
- XSLT(self, xslt_input, extensions=None, regexp=True, access_control=None) -
-   - - XSLTAccessControl
- XSLTAccessControl(self, read_file=True, write_file=True, create_dir=True, read_network=True, write_network=True) -
-   - - XSLTApplyError
- Error running an XSL transformation. -
-   - - XSLTError
- Base class of all XSLT errors. -
-   - - XSLTExtension
- Base class of an XSLT extension element. -
-   - - XSLTExtensionError
- Error registering an XSLT extension. -
-   - - XSLTParseError
- Error parsing a stylesheet document. -
-   - - XSLTSaveError
- Error serialising an XSLT result. -
-   - - _Attrib
- A dict-like proxy for the Element.attrib property. -
-   - - _BaseErrorLog -
-   - - _Comment -
-   - - _Document
- Internal base class to reference a libxml document. -
-   - - _DomainErrorLog -
-   - - _Element
- Element class. -
-   - - _ElementIterator
- Dead but public. :) -
-   - - _ElementMatchIterator -
-   - - _ElementStringResult -
-   - - _ElementTagMatcher
- Dead but public. :) -
-   - - _ElementTree -
-   - - _ElementUnicodeResult -
-   - - _Entity -
-   - - _ErrorLog -
-   - - _FeedParser -
-   - - _IDDict
- IDDict(self, etree) -A dictionary-like proxy class that mapps ID attributes to elements. -
-   - - _ListErrorLog
- Immutable base version of a list based error log. -
-   - - _LogEntry
- A log message entry from an error log. -
-   - - _ProcessingInstruction -
-   - - _RotatingErrorLog -
-   - - _SaxParserTarget -
-   - - _TargetParserResult -
-   - - _Validator
- Base class for XML validators. -
-   - - _XPathEvaluatorBase -
-   - - _XSLTProcessingInstruction -
-   - - _XSLTResultTree
- The result of an XSLT evaluation. -
-   - - htmlfile
- htmlfile(self, output_file, encoding=None, compression=None, close=False, buffered=True) -
-   - - iterparse
- iterparse(self, source, events=("end",), tag=None, attribute_defaults=False, dtd_validation=False, load_dtd=False, no_network=True, remove_blank_text=False, remove_comments=False, remove_pis=False, encoding=None, html=False, recover=None, huge_tree=False, schema=None) -
-   - - iterwalk
- iterwalk(self, element_or_tree, events=("end",), tag=None) -
-   - - xmlfile
- xmlfile(self, output_file, encoding=None, compression=None, close=False, buffered=True) -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
Comment(text=None)
- Comment element factory. This factory function creates a special element that will -be serialized as an XML comment.
- - -
- -
-   - - - - - - -
Element(_tag, - attrib=None, - nsmap=None, - **_extra)
- Element factory. This function returns an object implementing the -Element interface.
- - -
- -
-   - - - - - - -
ElementTree(element=None, - file=None, - parser=None)
- ElementTree wrapper class.
- - -
- -
-   - - - - - - -
Entity(name)
- Entity factory. This factory function creates a special element -that will be serialized as an XML entity reference or character -reference. Note, however, that entities will not be automatically -declared in the document. A document that uses entity references -requires a DTD to define the entities.
- - -
- -
-   - - - - - - -
Extension(module, - function_mapping=None, - ns=None)
- Build a dictionary of extension functions from the functions -defined in a module or the methods of an object.
- - -
- -
-   - - - - - - -
FunctionNamespace(ns_uri)
- Retrieve the function namespace object associated with the given -URI.
- - -
- -
-   - - - - - - -
HTML(text, - parser=None, - base_url=None)
- Parses an HTML document from a string constant. Returns the root -node (or the result returned by a parser target). This function -can be used to embed "HTML literals" in Python code.
- - -
- -
-   - - - - - - -
PI(target, - text=None)
- ProcessingInstruction element factory. This factory function creates a -special element that will be serialized as an XML processing instruction.
- - -
- -
-   - - - - - - -
ProcessingInstruction(target, - text=None)
- ProcessingInstruction element factory. This factory function creates a -special element that will be serialized as an XML processing instruction.
- - -
- -
-   - - - - - - -
SubElement(_parent, - _tag, - attrib=None, - nsmap=None, - **_extra)
- Subelement factory. This function creates an element instance, and -appends it to an existing element.
- - -
- -
-   - - - - - - -
XML(text, - parser=None, - base_url=None)
- Parses an XML document or fragment from a string constant. -Returns the root node (or the result returned by a parser target). -This function can be used to embed "XML literals" in Python code, -like in
- - -
- -
-   - - - - - - -
XMLDTDID(text, - parser=None, - base_url=None)
- Parse the text and return a tuple (root node, ID dictionary). The root -node is the same as returned by the XML() function. The dictionary -contains string-element pairs. The dictionary keys are the values of ID -attributes as defined by the DTD. The elements referenced by the ID are -stored as dictionary values.
- - -
- -
-   - - - - - - -
XMLID(text, - parser=None, - base_url=None)
- Parse the text and return a tuple (root node, ID dictionary). The root -node is the same as returned by the XML() function. The dictionary -contains string-element pairs. The dictionary keys are the values of 'id' -attributes. The elements referenced by the ID are stored as dictionary -values.
- - -
- -
-   - - - - - - -
XPathEvaluator(etree_or_element, - namespaces=None, - extensions=None, - regexp=True, - smart_strings=True)
- Creates an XPath evaluator for an ElementTree or an Element.
- - -
- -
-   - - - - - - -
adopt_external_document(capsule, - parser=None)
- Unpack a libxml2 document pointer from a PyCapsule and wrap it in an -lxml ElementTree object.
- - -
- -
-   - - - - - - -
cleanup_namespaces(tree_or_element, - top_nsmap=None, - keep_ns_prefixes=None)
- Remove all namespace declarations from a subtree that are not used -by any of the elements or attributes in that tree.
- - -
- -
-   - - - - - - -
clear_error_log()
- Clear the global error log. Note that this log is already bound to a -fixed size.
- - -
- -
-   - - - - - - -
dump(elem, - pretty_print=True, - with_tail=True)
- Writes an element tree or element structure to sys.stdout. This function -should be used for debugging only.
- - -
- -
-   - - - - - - -
fromstring(text, - parser=None, - base_url=None)
- Parses an XML document or fragment from a string. Returns the -root node (or the result returned by a parser target).
- - -
- -
-   - - - - - - -
fromstringlist(strings, - parser=None)
- Parses an XML document from a sequence of strings. Returns the -root node (or the result returned by a parser target).
- - -
- -
-   - - - - - - -
get_default_parser() - - -
- -
-   - - - - - - -
iselement(element)
- Checks if an object appears to be a valid element object.
- - -
- -
-   - - - - - - -
parse(source, - parser=None, - base_url=None)
- Return an ElementTree object loaded with source elements. If no parser -is provided as second argument, the default parser is used.
- - -
- -
-   - - - - - - -
parseid(source, - parser=None)
- Parses the source into a tuple containing an ElementTree object and an -ID dictionary. If no parser is provided as second argument, the default -parser is used.
- - -
- -
-   - - - - - - -
register_namespace(...)
- Registers a namespace prefix that newly created Elements in that -namespace will use. The registry is global, and any existing -mapping for either the given prefix or the namespace URI will be -removed.
- - -
- -
-   - - - - - - -
set_default_parser(parser=None)
- Set a default parser for the current thread. This parser is used -globally whenever no parser is supplied to the various parse functions of -the lxml API. If this function is called without a parser (or if it is -None), the default parser is reset to the original configuration.
- - -
- -
-   - - - - - - -
set_element_class_lookup(lookup= None)
- Set the global default element class lookup method.
- - -
- -
-   - - - - - - -
strip_attributes(tree_or_element, - *attribute_names)
- Delete all attributes with the provided attribute names from an -Element (or ElementTree) and its descendants.
- - -
- -
-   - - - - - - -
strip_elements(tree_or_element, - with_tail=True, - *tag_names)
- Delete all elements with the provided tag names from a tree or -subtree. This will remove the elements and their entire subtree, -including all their attributes, text content and descendants. It -will also remove the tail text of the element unless you -explicitly set the with_tail keyword argument option to False.
- - -
- -
-   - - - - - - -
strip_tags(tree_or_element, - *tag_names)
- Delete all elements with the provided tag names from a tree or -subtree. This will remove the elements and their attributes, but -not their text/tail content or descendants. Instead, it will -merge the text content and children of the element into its -parent.
- - -
- -
-   - - - - - - -
tostring(element_or_tree, - encoding=None, - method="xml", - xml_declaration=None, - pretty_print=False, - with_tail=True, - standalone=None, - doctype=None, - exclusive=False, - with_comments=True, - inclusive_ns_prefixes=None)
- Serialize an element to an encoded string representation of its XML -tree.
- - -
- -
-   - - - - - - -
tostringlist(element_or_tree, - *args, - **kwargs)
- Serialize an element to an encoded string representation of its XML -tree, stored in a list of partial strings.
- - -
- -
-   - - - - - - -
tounicode(element_or_tree, - method="xml", - pretty_print=False, - with_tail=True, - doctype=None)
- Serialize an element to the Python unicode representation of its XML -tree.
- - -
- -
-   - - - - - - -
use_global_python_log(log)
- Replace the global error log by an etree.PyErrorLog that uses the -standard Python logging package.
- - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - DEBUG = 1 -
-   - - LIBXML_COMPILED_VERSION = (2, 9, 4) -
-   - - LIBXML_VERSION = (2, 9, 4) -
-   - - LIBXSLT_COMPILED_VERSION = (1, 1, 29) -
-   - - LIBXSLT_VERSION = (1, 1, 29) -
-   - - LXML_VERSION = (4, 2, 5, 0) -
-   - - __package__ = None
- hash(x) -
-   - - __pyx_capi__ = {'adoptExternalDocument': <capsule object "stru... -
-   - - __test__ = {u'FunctionNamespace (line 207)': u'FunctionNamespa... -
-   - - memory_debugger = <lxml.etree._MemDebug object> -
- - - - - - -
- - - - - -
Function Details[hide private]
-
- -
- -
- - -
-

Element(_tag, - attrib=None, - nsmap=None, - **_extra) -

-
  -
- -

Element factory. This function returns an object implementing the -Element interface.

-

Also look at the _Element.makeelement() and -_BaseParser.makeelement() methods, which provide a faster way to -create an Element within a specific document or parser context.

-
-
-
-
- -
- -
- - -
-

Extension(module, - function_mapping=None, - ns=None) -

-
  -
- -

Build a dictionary of extension functions from the functions -defined in a module or the methods of an object.

-

As second argument, you can pass an additional mapping of -attribute names to XPath function names, or a list of function -names that should be taken.

-

The ns keyword argument accepts a namespace URI for the XPath -functions.

-
-
-
-
- -
- -
- - -
-

FunctionNamespace(ns_uri) -

-
  -
- -

Retrieve the function namespace object associated with the given -URI.

-

Creates a new one if it does not yet exist. A function namespace -can only be used to register extension functions.

-

Usage:

-
->>> ns_functions = FunctionNamespace("http://schema.org/Movie")
-
->>> @ns_functions  # uses function name
-... def add2(x):
-...     return x + 2
-
->>> @ns_functions("add3")  # uses explicit name
-... def add_three(x):
-...     return x + 3
-
-
-
-
- -
- -
- - -
-

HTML(text, - parser=None, - base_url=None) -

-
  -
- -

Parses an HTML document from a string constant. Returns the root -node (or the result returned by a parser target). This function -can be used to embed "HTML literals" in Python code.

-

To override the parser with a different HTMLParser you can pass it to -the parser keyword argument.

-

The base_url keyword argument allows to set the original base URL of -the document to support relative Paths when looking up external entities -(DTD, XInclude, ...).

-
-
-
-
- -
- -
- - -
-

XML(text, - parser=None, - base_url=None) -

-
  -
- -

Parses an XML document or fragment from a string constant. -Returns the root node (or the result returned by a parser target). -This function can be used to embed "XML literals" in Python code, -like in

-
-
->>> root = XML("<root><test/></root>")
->>> print(root.tag)
-root
-
-

To override the parser with a different XMLParser you can pass it to -the parser keyword argument.

-

The base_url keyword argument allows to set the original base URL of -the document to support relative Paths when looking up external entities -(DTD, XInclude, ...).

-
-
-
-
- -
- -
- - -
-

XMLDTDID(text, - parser=None, - base_url=None) -

-
  -
- -

Parse the text and return a tuple (root node, ID dictionary). The root -node is the same as returned by the XML() function. The dictionary -contains string-element pairs. The dictionary keys are the values of ID -attributes as defined by the DTD. The elements referenced by the ID are -stored as dictionary values.

-

Note that you must not modify the XML tree if you use the ID dictionary. -The results are undefined.

-
-
-
-
- -
- -
- - -
-

XPathEvaluator(etree_or_element, - namespaces=None, - extensions=None, - regexp=True, - smart_strings=True) -

-
  -
- -

Creates an XPath evaluator for an ElementTree or an Element.

-

The resulting object can be called with an XPath expression as argument -and XPath variables provided as keyword arguments.

-

Additional namespace declarations can be passed with the -'namespace' keyword argument. EXSLT regular expression support -can be disabled with the 'regexp' boolean keyword (defaults to -True). Smart strings will be returned for string results unless -you pass smart_strings=False.

-
-
-
-
- -
- -
- - -
-

adopt_external_document(capsule, - parser=None) -

-
  -
- -

Unpack a libxml2 document pointer from a PyCapsule and wrap it in an -lxml ElementTree object.

-

This allows external libraries to build XML/HTML trees using libxml2 -and then pass them efficiently into lxml for further processing. -Requires Python 2.7 or later.

-

If a parser is provided, it will be used for configuring the -lxml document. No parsing will be done.

-

The capsule must have the name "libxml2:xmlDoc" and its pointer -value must reference a correct libxml2 document of type xmlDoc*. -The creator of the capsule must take care to correctly clean up the -document using an appropriate capsule destructor. By default, the -libxml2 document will be copied to let lxml safely own the memory -of the internal tree that it uses.

-

If the capsule context is non-NULL, it must point to a C string that -can be compared using strcmp(). If the context string equals -"destructor:xmlFreeDoc", the libxml2 document will not be copied -but the capsule invalidated instead by clearing its destructor and -name. That way, lxml takes ownership of the libxml2 document in memory -without creating a copy first, and the capsule destructor will not be -called. The document will then eventually be cleaned up by lxml using -the libxml2 API function xmlFreeDoc() once it is no longer used.

-

If no copy is made, later modifications of the tree outside of lxml -should not be attempted after transferring the ownership.

-
-
-
-
- -
- -
- - -
-

cleanup_namespaces(tree_or_element, - top_nsmap=None, - keep_ns_prefixes=None) -

-
  -
- -

Remove all namespace declarations from a subtree that are not used -by any of the elements or attributes in that tree.

-

If a 'top_nsmap' is provided, it must be a mapping from prefixes -to namespace URIs. These namespaces will be declared on the top -element of the subtree before running the cleanup, which allows -moving namespace declarations to the top of the tree.

-

If a 'keep_ns_prefixes' is provided, it must be a list of prefixes. -These prefixes will not be removed as part of the cleanup.

-
-
-
-
- -
- -
- - -
-

clear_error_log() -

-
  -
- -

Clear the global error log. Note that this log is already bound to a -fixed size.

-

Note: since lxml 2.2, the global error log is local to a thread -and this function will only clear the global error log of the -current thread.

-
-
-
-
- -
- -
- - -
-

fromstring(text, - parser=None, - base_url=None) -

-
  -
- -

Parses an XML document or fragment from a string. Returns the -root node (or the result returned by a parser target).

-

To override the default parser with a different parser you can pass it to -the parser keyword argument.

-

The base_url keyword argument allows to set the original base URL of -the document to support relative Paths when looking up external entities -(DTD, XInclude, ...).

-
-
-
-
- -
- -
- - -
-

fromstringlist(strings, - parser=None) -

-
  -
- -

Parses an XML document from a sequence of strings. Returns the -root node (or the result returned by a parser target).

-

To override the default parser with a different parser you can pass it to -the parser keyword argument.

-
-
-
-
- -
- -
- - -
-

parse(source, - parser=None, - base_url=None) -

-
  -
- -

Return an ElementTree object loaded with source elements. If no parser -is provided as second argument, the default parser is used.

-

The source can be any of the following:

-
    -
  • a file name/path
  • -
  • a file object
  • -
  • a file-like object
  • -
  • a URL using the HTTP or FTP protocol
  • -
-

To parse from a string, use the fromstring() function instead.

-

Note that it is generally faster to parse from a file path or URL -than from an open file object or file-like object. Transparent -decompression from gzip compressed sources is supported (unless -explicitly disabled in libxml2).

-

The base_url keyword allows setting a URL for the document -when parsing from a file-like object. This is needed when looking -up external entities (DTD, XInclude, ...) with relative paths.

-
-
-
-
- -
- -
- - -
-

parseid(source, - parser=None) -

-
  -
- -

Parses the source into a tuple containing an ElementTree object and an -ID dictionary. If no parser is provided as second argument, the default -parser is used.

-

Note that you must not modify the XML tree if you use the ID dictionary. -The results are undefined.

-
-
-
-
- -
- -
- - -
-

set_default_parser(parser=None) -

-
  -
- -

Set a default parser for the current thread. This parser is used -globally whenever no parser is supplied to the various parse functions of -the lxml API. If this function is called without a parser (or if it is -None), the default parser is reset to the original configuration.

-

Note that the pre-installed default parser is not thread-safe. Avoid the -default parser in multi-threaded environments. You can create a separate -parser for each thread explicitly or use a parser pool.

-
-
-
-
- -
- -
- - -
-

strip_attributes(tree_or_element, - *attribute_names) -

-
  -
- -

Delete all attributes with the provided attribute names from an -Element (or ElementTree) and its descendants.

-

Attribute names can contain wildcards as in _Element.iter.

-

Example usage:

-
-strip_attributes(root_element,
-                 'simpleattr',
-                 '{http://some/ns}attrname',
-                 '{http://other/ns}*')
-
-
-
-
-
- -
- -
- - -
-

strip_elements(tree_or_element, - with_tail=True, - *tag_names) -

-
  -
- -

Delete all elements with the provided tag names from a tree or -subtree. This will remove the elements and their entire subtree, -including all their attributes, text content and descendants. It -will also remove the tail text of the element unless you -explicitly set the with_tail keyword argument option to False.

-

Tag names can contain wildcards as in _Element.iter.

-

Note that this will not delete the element (or ElementTree root -element) that you passed even if it matches. It will only treat -its descendants. If you want to include the root element, check -its tag name directly before even calling this function.

-

Example usage:

-
-strip_elements(some_element,
-    'simpletagname',             # non-namespaced tag
-    '{http://some/ns}tagname',   # namespaced tag
-    '{http://some/other/ns}*'    # any tag from a namespace
-    lxml.etree.Comment           # comments
-    )
-
-
-
-
-
- -
- -
- - -
-

strip_tags(tree_or_element, - *tag_names) -

-
  -
- -

Delete all elements with the provided tag names from a tree or -subtree. This will remove the elements and their attributes, but -not their text/tail content or descendants. Instead, it will -merge the text content and children of the element into its -parent.

-

Tag names can contain wildcards as in _Element.iter.

-

Note that this will not delete the element (or ElementTree root -element) that you passed even if it matches. It will only treat -its descendants.

-

Example usage:

-
-strip_tags(some_element,
-    'simpletagname',             # non-namespaced tag
-    '{http://some/ns}tagname',   # namespaced tag
-    '{http://some/other/ns}*'    # any tag from a namespace
-    Comment                      # comments (including their text!)
-    )
-
-
-
-
-
- -
- -
- - -
-

tostring(element_or_tree, - encoding=None, - method="xml", - xml_declaration=None, - pretty_print=False, - with_tail=True, - standalone=None, - doctype=None, - exclusive=False, - with_comments=True, - inclusive_ns_prefixes=None) -

-
  -
- -

Serialize an element to an encoded string representation of its XML -tree.

-

Defaults to ASCII encoding without XML declaration. This -behaviour can be configured with the keyword arguments 'encoding' -(string) and 'xml_declaration' (bool). Note that changing the -encoding to a non UTF-8 compatible encoding will enable a -declaration by default.

-

You can also serialise to a Unicode string without declaration by -passing the unicode function as encoding (or str in Py3), -or the name 'unicode'. This changes the return value from a byte -string to an unencoded unicode string.

-

The keyword argument 'pretty_print' (bool) enables formatted XML.

-

The keyword argument 'method' selects the output method: 'xml', -'html', plain 'text' (text content without tags) or 'c14n'. -Default is 'xml'.

-

The exclusive and with_comments arguments are only used -with C14N output, where they request exclusive and uncommented -C14N serialisation respectively.

-

Passing a boolean value to the standalone option will output -an XML declaration with the corresponding standalone flag.

-

The doctype option allows passing in a plain string that will -be serialised before the XML tree. Note that passing in non -well-formed content here will make the XML output non well-formed. -Also, an existing doctype in the document tree will not be removed -when serialising an ElementTree instance.

-

You can prevent the tail text of the element from being serialised -by passing the boolean with_tail option. This has no impact -on the tail text of children, which will always be serialised.

-
-
-
-
- -
- -
- - -
-

tostringlist(element_or_tree, - *args, - **kwargs) -

-
  -
- -

Serialize an element to an encoded string representation of its XML -tree, stored in a list of partial strings.

-

This is purely for ElementTree 1.3 compatibility. The result is a -single string wrapped in a list.

-
-
-
-
- -
- -
- - -
-

tounicode(element_or_tree, - method="xml", - pretty_print=False, - with_tail=True, - doctype=None) -

-
  -
- -

Serialize an element to the Python unicode representation of its XML -tree.

-

Note that the result does not carry an XML encoding declaration and is -therefore not necessarily suited for serialization to byte streams without -further treatment.

-

The boolean keyword argument 'pretty_print' enables formatted XML.

-

The keyword argument 'method' selects the output method: 'xml', -'html' or plain 'text'.

-

You can prevent the tail text of the element from being serialised -by passing the boolean with_tail option. This has no impact -on the tail text of children, which will always be serialised.

-
-
-

Deprecated: - use tostring(el, encoding='unicode') instead. -

-
-
- -
- -
- - -
-

use_global_python_log(log) -

-
  -
- -

Replace the global error log by an etree.PyErrorLog that uses the -standard Python logging package.

-

Note that this disables access to the global error log from exceptions. -Parsers, XSLT etc. will continue to provide their normal local error log.

-

Note: prior to lxml 2.2, this changed the error log globally. -Since lxml 2.2, the global error log is local to a thread and this -function will only set the global error log of the current thread.

-
-
-
-
-
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

__pyx_capi__

- -
-
-
-
Value:
-
-{'adoptExternalDocument': <capsule object "struct LxmlElementTree *(xm\
-lDoc *, PyObject *, int)" at 0x7fbba68a7cf0>,
- 'appendChild': <capsule object "void (struct LxmlElement *, struct Lx\
-mlElement *)" at 0x7fbba68b8510>,
- 'appendChildToElement': <capsule object "int (struct LxmlElement *, s\
-truct LxmlElement *)" at 0x7fbba68b8540>,
- 'attributeValue': <capsule object "PyObject *(xmlNode *, xmlAttr *)" \
-at 0x7fbba68b81e0>,
-...
-
-
-
-
-
- -
- -
-

__test__

- -
-
-
-
Value:
-
-{u'FunctionNamespace (line 207)': u'''FunctionNamespace(ns_uri)
-
-    Retrieve the function namespace object associated with the given
-    URI.
-
-    Creates a new one if it does not yet exist. A function namespace
-    can only be used to register extension functions.
-
-...
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.AncestorsIterator-class.html b/doc/html/api/lxml.etree.AncestorsIterator-class.html deleted file mode 100644 index 3b38d40..0000000 --- a/doc/html/api/lxml.etree.AncestorsIterator-class.html +++ /dev/null @@ -1,256 +0,0 @@ - - - - - lxml.etree.AncestorsIterator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class AncestorsIterator - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class AncestorsIterator

-
-           object --+    
-                    |    
-_ElementMatchIterator --+
-                        |
-                       AncestorsIterator
-
- -
-AncestorsIterator(self, node, tag=None) -Iterates over the ancestors of an element (from parent to parent). - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from _ElementMatchIterator: - __iter__, - __next__, - next -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.AttributeBasedElementClassLookup-class.html b/doc/html/api/lxml.etree.AttributeBasedElementClassLookup-class.html deleted file mode 100644 index abf82f5..0000000 --- a/doc/html/api/lxml.etree.AttributeBasedElementClassLookup-class.html +++ /dev/null @@ -1,316 +0,0 @@ - - - - - lxml.etree.AttributeBasedElementClassLookup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class AttributeBasedElementClassLookup - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class AttributeBasedElementClassLookup

-
-            object --+        
-                     |        
-    ElementClassLookup --+    
-                         |    
-FallbackElementClassLookup --+
-                             |
-                            AttributeBasedElementClassLookup
-
- -
-

AttributeBasedElementClassLookup(self, attribute_name, class_mapping, fallback=None) -Checks an attribute of an Element and looks up the value in a -class dictionary.

-
-
Arguments:
-
    -
  • attribute name - '{ns}name' style string
  • -
  • class mapping - Python dict mapping attribute values to Element classes
  • -
  • fallback - optional fallback lookup mechanism
  • -
-
-
-

A None key in the class mapping will be checked if the attribute is -missing.

- - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - attribute_name, - class_mapping, - fallback=None)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from FallbackElementClassLookup: - set_fallback -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from FallbackElementClassLookup: - fallback -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - attribute_name, - class_mapping, - fallback=None) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.C14NError-class.html b/doc/html/api/lxml.etree.C14NError-class.html deleted file mode 100644 index 119942c..0000000 --- a/doc/html/api/lxml.etree.C14NError-class.html +++ /dev/null @@ -1,268 +0,0 @@ - - - - - lxml.etree.C14NError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class C14NError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class C14NError

-
-              object --+                
-                       |                
-exceptions.BaseException --+            
-                           |            
-        exceptions.Exception --+        
-                               |        
-                           Error --+    
-                                   |    
-                           LxmlError --+
-                                       |
-                                      C14NError
-
- -
-Error during C14N serialisation. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.CDATA-class.html b/doc/html/api/lxml.etree.CDATA-class.html deleted file mode 100644 index 575f913..0000000 --- a/doc/html/api/lxml.etree.CDATA-class.html +++ /dev/null @@ -1,259 +0,0 @@ - - - - - lxml.etree.CDATA - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class CDATA - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class CDATA

-
-object --+
-         |
-        CDATA
-
- -
-

CDATA(data)

-

CDATA factory. This factory creates an opaque data object that -can be used to set Element text. The usual way to use it is:

-
->>> el = Element('content')
->>> el.text = CDATA('a string')
-
->>> print(el.text)
-a string
->>> print(tostring(el, encoding="unicode"))
-<content><![CDATA[a string]]></content>
-
- - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.CommentBase-class.html b/doc/html/api/lxml.etree.CommentBase-class.html deleted file mode 100644 index 8c174c7..0000000 --- a/doc/html/api/lxml.etree.CommentBase-class.html +++ /dev/null @@ -1,372 +0,0 @@ - - - - - lxml.etree.CommentBase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class CommentBase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class CommentBase

-
-         object --+            
-                  |            
-           _Element --+        
-                      |        
-??.__ContentOnlyElement --+    
-                          |    
-                   _Comment --+
-                              |
-                             CommentBase
-
- -
Known Subclasses:
-
- -
- -
-

All custom Comment classes must inherit from this one.

-

To create an XML Comment instance, use the Comment() factory.

-

Subclasses must not override __init__ or __new__ as it is -absolutely undefined when these objects will be created or -destroyed. All persistent state of Comments must be stored in the -underlying XML. If you really need to initialize the object after -creation, you can implement an _init(self) method that will be -called after object creation.

- - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(...)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from _Comment: - __repr__ -

-

Inherited from unreachable.__ContentOnlyElement: - __delitem__, - __getitem__, - __len__, - __setitem__, - append, - get, - insert, - items, - keys, - set, - values -

-

Inherited from _Element: - __contains__, - __copy__, - __deepcopy__, - __iter__, - __nonzero__, - __reversed__, - addnext, - addprevious, - clear, - cssselect, - extend, - find, - findall, - findtext, - getchildren, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - makeelement, - remove, - replace, - xpath -

-

Inherited from _Element (private): - _init -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from _Comment: - tag -

-

Inherited from unreachable.__ContentOnlyElement: - attrib, - text -

-

Inherited from _Element: - base, - nsmap, - prefix, - sourceline, - tail -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(...) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.CustomElementClassLookup-class.html b/doc/html/api/lxml.etree.CustomElementClassLookup-class.html deleted file mode 100644 index 5740ff6..0000000 --- a/doc/html/api/lxml.etree.CustomElementClassLookup-class.html +++ /dev/null @@ -1,295 +0,0 @@ - - - - - lxml.etree.CustomElementClassLookup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class CustomElementClassLookup - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class CustomElementClassLookup

-
-            object --+        
-                     |        
-    ElementClassLookup --+    
-                         |    
-FallbackElementClassLookup --+
-                             |
-                            CustomElementClassLookup
-
- -
Known Subclasses:
-
- -
- -
-

CustomElementClassLookup(self, fallback=None) -Element class lookup based on a subclass method.

-

You can inherit from this class and override the method:

-
-lookup(self, type, doc, namespace, name)
-
-

to lookup the element class for a node. Arguments of the method: -* type: one of 'element', 'comment', 'PI', 'entity' -* doc: document that the node is in -* namespace: namespace URI of the node (or None for comments/PIs/entities) -* name: name of the element/entity, None for comments, target for PIs

-

If you return None from this method, the fallback will be called.

- - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
lookup(self, - type, - doc, - namespace, - name) - - -
- -
-

Inherited from FallbackElementClassLookup: - __init__, - set_fallback -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from FallbackElementClassLookup: - fallback -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.DTD-class.html b/doc/html/api/lxml.etree.DTD-class.html deleted file mode 100644 index 248b601..0000000 --- a/doc/html/api/lxml.etree.DTD-class.html +++ /dev/null @@ -1,434 +0,0 @@ - - - - - lxml.etree.DTD - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class DTD - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class DTD

-
-object --+    
-         |    
-_Validator --+
-             |
-            DTD
-
- -
-

DTD(self, file=None, external_id=None) -A DTD validator.

-

Can load from filesystem directly given a filename or file-like object. -Alternatively, pass the keyword parameter external_id to load from a -catalog.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__call__(self, - etree)
- Validate doc using the DTD.
- - -
- -
-   - - - - - - -
__init__(self, - file=None, - external_id=None)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
elements(...) - - -
- -
-   - - - - - - -
entities(...) - - -
- -
-   - - - - - - -
iterelements(...) - - -
- -
-   - - - - - - -
iterentities(...) - - -
- -
-

Inherited from _Validator: - assertValid, - assert_, - validate -

-

Inherited from _Validator (private): - _append_log_message, - _clear_error_log -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - external_id -
-   - - name -
-   - - system_url -
-

Inherited from _Validator: - error_log -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__call__(self, - etree) -
(Call operator) -

-
  -
- -

Validate doc using the DTD.

-

Returns true if the document is valid, false if not.

-
-
-
-
- -
- -
- - -
-

__init__(self, - file=None, - external_id=None) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.DTDError-class.html b/doc/html/api/lxml.etree.DTDError-class.html deleted file mode 100644 index 67461df..0000000 --- a/doc/html/api/lxml.etree.DTDError-class.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - lxml.etree.DTDError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class DTDError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class DTDError

-
-              object --+                
-                       |                
-exceptions.BaseException --+            
-                           |            
-        exceptions.Exception --+        
-                               |        
-                           Error --+    
-                                   |    
-                           LxmlError --+
-                                       |
-                                      DTDError
-
- -
Known Subclasses:
-
- -
- -
-Base class for DTD errors. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.DTDParseError-class.html b/doc/html/api/lxml.etree.DTDParseError-class.html deleted file mode 100644 index 01a2a02..0000000 --- a/doc/html/api/lxml.etree.DTDParseError-class.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - lxml.etree.DTDParseError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class DTDParseError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class DTDParseError

-
-              object --+                    
-                       |                    
-exceptions.BaseException --+                
-                           |                
-        exceptions.Exception --+            
-                               |            
-                           Error --+        
-                                   |        
-                           LxmlError --+    
-                                       |    
-                                DTDError --+
-                                           |
-                                          DTDParseError
-
- -
-Error while parsing a DTD. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.DTDValidateError-class.html b/doc/html/api/lxml.etree.DTDValidateError-class.html deleted file mode 100644 index ccd5111..0000000 --- a/doc/html/api/lxml.etree.DTDValidateError-class.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - lxml.etree.DTDValidateError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class DTDValidateError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class DTDValidateError

-
-              object --+                    
-                       |                    
-exceptions.BaseException --+                
-                           |                
-        exceptions.Exception --+            
-                               |            
-                           Error --+        
-                                   |        
-                           LxmlError --+    
-                                       |    
-                                DTDError --+
-                                           |
-                                          DTDValidateError
-
- -
-Error while validating an XML document with a DTD. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.DocInfo-class.html b/doc/html/api/lxml.etree.DocInfo-class.html deleted file mode 100644 index 923b224..0000000 --- a/doc/html/api/lxml.etree.DocInfo-class.html +++ /dev/null @@ -1,395 +0,0 @@ - - - - - lxml.etree.DocInfo - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class DocInfo - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class DocInfo

-
-object --+
-         |
-        DocInfo
-
- -
-Document information provided by parser and DTD. - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
clear(...)
- Removes DOCTYPE and internal subset from the document.
- - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - URL
- The source URL of the document (or None if unknown). -
-   - - doctype
- Returns a DOCTYPE declaration string for the document. -
-   - - encoding
- Returns the encoding name as declared by the document. -
-   - - externalDTD
- Returns a DTD validator based on the external subset of the document. -
-   - - internalDTD
- Returns a DTD validator based on the internal subset of the document. -
-   - - public_id
- Public ID of the DOCTYPE. -
-   - - root_name
- Returns the name of the root node as defined by the DOCTYPE. -
-   - - standalone
- 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. -
-   - - system_url
- System ID of the DOCTYPE. -
-   - - xml_version
- Returns the XML version as declared by the document. -
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - -
- - - - - -
Property Details[hide private]
-
- -
- -
-

public_id

-

Public ID of the DOCTYPE.

-

Mutable. May be set to a valid string or None. If a DTD does not -exist, setting this variable (even to None) will create one.

-
-
-
-
- -
- -
-

system_url

-

System ID of the DOCTYPE.

-

Mutable. May be set to a valid string or None. If a DTD does not -exist, setting this variable (even to None) will create one.

-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.DocumentInvalid-class.html b/doc/html/api/lxml.etree.DocumentInvalid-class.html deleted file mode 100644 index fe790d8..0000000 --- a/doc/html/api/lxml.etree.DocumentInvalid-class.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - lxml.etree.DocumentInvalid - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class DocumentInvalid - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class DocumentInvalid

-
-              object --+                
-                       |                
-exceptions.BaseException --+            
-                           |            
-        exceptions.Exception --+        
-                               |        
-                           Error --+    
-                                   |    
-                           LxmlError --+
-                                       |
-                                      DocumentInvalid
-
- -
-

Validation error.

-

Raised by all document validators when their assertValid(tree) -method fails.

- - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.ETCompatXMLParser-class.html b/doc/html/api/lxml.etree.ETCompatXMLParser-class.html deleted file mode 100644 index 74d8dde..0000000 --- a/doc/html/api/lxml.etree.ETCompatXMLParser-class.html +++ /dev/null @@ -1,348 +0,0 @@ - - - - - lxml.etree.ETCompatXMLParser - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class ETCompatXMLParser - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ETCompatXMLParser

-
-    object --+            
-             |            
-??._BaseParser --+        
-                 |        
-       _FeedParser --+    
-                     |    
-             XMLParser --+
-                         |
-                        ETCompatXMLParser
-
- -
-

ETCompatXMLParser(self, encoding=None, attribute_defaults=False, dtd_validation=False, load_dtd=False, no_network=True, ns_clean=False, recover=False, schema=None, huge_tree=False, remove_blank_text=False, resolve_entities=True, remove_comments=True, remove_pis=True, strip_cdata=True, target=None, compact=True)

-

An XML parser with an ElementTree compatible default setup.

-

See the XMLParser class for details.

-

This parser has remove_comments and remove_pis enabled by default -and thus ignores comments and processing instructions.

- - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - encoding=None, - attribute_defaults=False, - dtd_validation=False, - load_dtd=False, - no_network=True, - ns_clean=False, - recover=False, - schema=None, - huge_tree=False, - remove_blank_text=False, - resolve_entities=True, - remove_comments=True, - remove_pis=True, - strip_cdata=True, - target=None, - compact=True)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from _FeedParser: - close, - feed -

-

Inherited from unreachable._BaseParser: - copy, - makeelement, - setElementClassLookup, - set_element_class_lookup -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from _FeedParser: - feed_error_log -

-

Inherited from unreachable._BaseParser: - error_log, - resolvers, - target, - version -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - encoding=None, - attribute_defaults=False, - dtd_validation=False, - load_dtd=False, - no_network=True, - ns_clean=False, - recover=False, - schema=None, - huge_tree=False, - remove_blank_text=False, - resolve_entities=True, - remove_comments=True, - remove_pis=True, - strip_cdata=True, - target=None, - compact=True) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.ETXPath-class.html b/doc/html/api/lxml.etree.ETXPath-class.html deleted file mode 100644 index d95244c..0000000 --- a/doc/html/api/lxml.etree.ETXPath-class.html +++ /dev/null @@ -1,316 +0,0 @@ - - - - - lxml.etree.ETXPath - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class ETXPath - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ETXPath

-
-         object --+        
-                  |        
-_XPathEvaluatorBase --+    
-                      |    
-                  XPath --+
-                          |
-                         ETXPath
-
- -
-

ETXPath(self, path, extensions=None, regexp=True, smart_strings=True) -Special XPath class that supports the ElementTree {uri} notation for namespaces.

-

Note that this class does not accept the namespace keyword -argument. All namespaces must be passed as part of the path -string. Smart strings will be returned for string results unless -you pass smart_strings=False.

- - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - path, - extensions=None, - regexp=True, - smart_strings=True)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from XPath: - __call__, - __repr__ -

-

Inherited from _XPathEvaluatorBase: - evaluate -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from XPath: - path -

-

Inherited from _XPathEvaluatorBase: - error_log -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - path, - extensions=None, - regexp=True, - smart_strings=True) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.ElementBase-class.html b/doc/html/api/lxml.etree.ElementBase-class.html deleted file mode 100644 index 86ff8e5..0000000 --- a/doc/html/api/lxml.etree.ElementBase-class.html +++ /dev/null @@ -1,385 +0,0 @@ - - - - - lxml.etree.ElementBase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class ElementBase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ElementBase

-
-object --+    
-         |    
-  _Element --+
-             |
-            ElementBase
-
- -
Known Subclasses:
-
- -
- -
-

ElementBase(*children, attrib=None, nsmap=None, **_extra)

-

The public Element class. All custom Element classes must inherit -from this one. To create an Element, use the Element() factory.

-

BIG FAT WARNING: Subclasses must not override __init__ or -__new__ as it is absolutely undefined when these objects will be -created or destroyed. All persistent state of Elements must be -stored in the underlying XML. If you really need to initialize -the object after creation, you can implement an _init(self) -method that will be called directly after object creation.

-

Subclasses of this class can be instantiated to create a new -Element. By default, the tag name will be the class name and the -namespace will be empty. You can modify this with the following -class attributes:

-
    -
  • TAG - the tag name, possibly containing a namespace in Clark -notation
  • -
  • NAMESPACE - the default namespace URI, unless provided as part -of the TAG attribute.
  • -
  • HTML - flag if the class is an HTML tag, as opposed to an XML -tag. This only applies to un-namespaced tags and defaults to -false (i.e. XML).
  • -
  • PARSER - the parser that provides the configuration for the -newly created document. Providing an HTML parser here will -default to creating an HTML element.
  • -
-

In user code, the latter three are commonly inherited in class -hierarchies that implement a common namespace.

- - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(attrib=None, - nsmap=None, - *children, - **_extra)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from _Element: - __contains__, - __copy__, - __deepcopy__, - __delitem__, - __getitem__, - __iter__, - __len__, - __nonzero__, - __repr__, - __reversed__, - __setitem__, - addnext, - addprevious, - append, - clear, - cssselect, - extend, - find, - findall, - findtext, - get, - getchildren, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - insert, - items, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - keys, - makeelement, - remove, - replace, - set, - values, - xpath -

-

Inherited from _Element (private): - _init -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from _Element: - attrib, - base, - nsmap, - prefix, - sourceline, - tag, - tail, - text -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(attrib=None, - nsmap=None, - *children, - **_extra) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.ElementChildIterator-class.html b/doc/html/api/lxml.etree.ElementChildIterator-class.html deleted file mode 100644 index 4f4945d..0000000 --- a/doc/html/api/lxml.etree.ElementChildIterator-class.html +++ /dev/null @@ -1,256 +0,0 @@ - - - - - lxml.etree.ElementChildIterator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class ElementChildIterator - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ElementChildIterator

-
-           object --+    
-                    |    
-_ElementMatchIterator --+
-                        |
-                       ElementChildIterator
-
- -
-ElementChildIterator(self, node, tag=None, reversed=False) -Iterates over the children of an element. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from _ElementMatchIterator: - __iter__, - __next__, - next -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.ElementClassLookup-class.html b/doc/html/api/lxml.etree.ElementClassLookup-class.html deleted file mode 100644 index 5b8d702..0000000 --- a/doc/html/api/lxml.etree.ElementClassLookup-class.html +++ /dev/null @@ -1,255 +0,0 @@ - - - - - lxml.etree.ElementClassLookup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class ElementClassLookup - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ElementClassLookup

-
-object --+
-         |
-        ElementClassLookup
-
- -
Known Subclasses:
-
- -
- -
-ElementClassLookup(self) -Superclass of Element class lookups. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.ElementDefaultClassLookup-class.html b/doc/html/api/lxml.etree.ElementDefaultClassLookup-class.html deleted file mode 100644 index 5111ef9..0000000 --- a/doc/html/api/lxml.etree.ElementDefaultClassLookup-class.html +++ /dev/null @@ -1,329 +0,0 @@ - - - - - lxml.etree.ElementDefaultClassLookup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class ElementDefaultClassLookup - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ElementDefaultClassLookup

-
-        object --+    
-                 |    
-ElementClassLookup --+
-                     |
-                    ElementDefaultClassLookup
-
- -
-

ElementDefaultClassLookup(self, element=None, comment=None, pi=None, entity=None) -Element class lookup scheme that always returns the default Element -class.

-

The keyword arguments element, comment, pi and entity -accept the respective Element classes.

- - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - element=None, - comment=None, - pi=None, - entity=None)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - comment_class -
-   - - element_class -
-   - - entity_class -
-   - - pi_class -
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - element=None, - comment=None, - pi=None, - entity=None) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.ElementDepthFirstIterator-class.html b/doc/html/api/lxml.etree.ElementDepthFirstIterator-class.html deleted file mode 100644 index 10c4ba9..0000000 --- a/doc/html/api/lxml.etree.ElementDepthFirstIterator-class.html +++ /dev/null @@ -1,310 +0,0 @@ - - - - - lxml.etree.ElementDepthFirstIterator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class ElementDepthFirstIterator - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ElementDepthFirstIterator

-
-object --+
-         |
-        ElementDepthFirstIterator
-
- -
-

ElementDepthFirstIterator(self, node, tag=None, inclusive=True) -Iterates over an element and its sub-elements in document order (depth -first pre-order).

-

Note that this also includes comments, entities and processing -instructions. To filter them out, check if the tag property -of the returned element is a string (i.e. not None and not a -factory function), or pass the Element factory for the tag -argument to receive only Elements.

-

If the optional tag argument is not None, the iterator returns only -the elements that match the respective name and namespace.

-

The optional boolean argument 'inclusive' defaults to True and can be set -to False to exclude the start element itself.

-

Note that the behaviour of this iterator is completely undefined if the -tree it traverses is modified during iteration.

- - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__iter__(x)
- iter(x)
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__next__(...) - - -
- -
- the next value, or raise StopIteration - - - - - - -
next(x) - - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.ElementNamespaceClassLookup-class.html b/doc/html/api/lxml.etree.ElementNamespaceClassLookup-class.html deleted file mode 100644 index ff8b8ac..0000000 --- a/doc/html/api/lxml.etree.ElementNamespaceClassLookup-class.html +++ /dev/null @@ -1,354 +0,0 @@ - - - - - lxml.etree.ElementNamespaceClassLookup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class ElementNamespaceClassLookup - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ElementNamespaceClassLookup

-
-            object --+        
-                     |        
-    ElementClassLookup --+    
-                         |    
-FallbackElementClassLookup --+
-                             |
-                            ElementNamespaceClassLookup
-
- -
-

ElementNamespaceClassLookup(self, fallback=None)

-

Element class lookup scheme that searches the Element class in the -Namespace registry.

-

Usage:

-
->>> lookup = ElementNamespaceClassLookup()
->>> ns_elements = lookup.get_namespace("http://schema.org/Movie")
-
->>> @ns_elements
-... class movie(ElementBase):
-...     "Element implementation for 'movie' tag (using class name) in schema namespace."
-
->>> @ns_elements("movie")
-... class MovieElement(ElementBase):
-...     "Element implementation for 'movie' tag (explicit tag name) in schema namespace."
- - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - fallback=None)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
get_namespace(self, - ns_uri)
- Retrieve the namespace object associated with the given URI. -Pass None for the empty namespace.
- - -
- -
-

Inherited from FallbackElementClassLookup: - set_fallback -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from FallbackElementClassLookup: - fallback -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - fallback=None) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

get_namespace(self, - ns_uri) -

-
  -
- -

Retrieve the namespace object associated with the given URI. -Pass None for the empty namespace.

-

Creates a new namespace object if it does not yet exist.

-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.ElementTextIterator-class.html b/doc/html/api/lxml.etree.ElementTextIterator-class.html deleted file mode 100644 index 34ff721..0000000 --- a/doc/html/api/lxml.etree.ElementTextIterator-class.html +++ /dev/null @@ -1,302 +0,0 @@ - - - - - lxml.etree.ElementTextIterator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class ElementTextIterator - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ElementTextIterator

-
-object --+
-         |
-        ElementTextIterator
-
- -
-

ElementTextIterator(self, element, tag=None, with_tail=True) -Iterates over the text content of a subtree.

-

You can pass the tag keyword argument to restrict text content to a -specific tag name.

-

You can set the with_tail keyword argument to False to skip over -tail text (e.g. if you know that it's only whitespace from pretty-printing).

- - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__iter__(x)
- iter(x)
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__next__(...) - - -
- -
- the next value, or raise StopIteration - - - - - - -
next(x) - - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.EntityBase-class.html b/doc/html/api/lxml.etree.EntityBase-class.html deleted file mode 100644 index a916bae..0000000 --- a/doc/html/api/lxml.etree.EntityBase-class.html +++ /dev/null @@ -1,373 +0,0 @@ - - - - - lxml.etree.EntityBase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class EntityBase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class EntityBase

-
-         object --+            
-                  |            
-           _Element --+        
-                      |        
-??.__ContentOnlyElement --+    
-                          |    
-                    _Entity --+
-                              |
-                             EntityBase
-
- -
Known Subclasses:
-
- -
- -
-

All custom Entity classes must inherit from this one.

-

To create an XML Entity instance, use the Entity() factory.

-

Subclasses must not override __init__ or __new__ as it is -absolutely undefined when these objects will be created or -destroyed. All persistent state of Entities must be stored in the -underlying XML. If you really need to initialize the object after -creation, you can implement an _init(self) method that will be -called after object creation.

- - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(...)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from _Entity: - __repr__ -

-

Inherited from unreachable.__ContentOnlyElement: - __delitem__, - __getitem__, - __len__, - __setitem__, - append, - get, - insert, - items, - keys, - set, - values -

-

Inherited from _Element: - __contains__, - __copy__, - __deepcopy__, - __iter__, - __nonzero__, - __reversed__, - addnext, - addprevious, - clear, - cssselect, - extend, - find, - findall, - findtext, - getchildren, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - makeelement, - remove, - replace, - xpath -

-

Inherited from _Element (private): - _init -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from _Entity: - name, - tag, - text -

-

Inherited from unreachable.__ContentOnlyElement: - attrib -

-

Inherited from _Element: - base, - nsmap, - prefix, - sourceline, - tail -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(...) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.Error-class.html b/doc/html/api/lxml.etree.Error-class.html deleted file mode 100644 index 3fd9310..0000000 --- a/doc/html/api/lxml.etree.Error-class.html +++ /dev/null @@ -1,268 +0,0 @@ - - - - - lxml.etree.Error - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class Error - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class Error

-
-              object --+        
-                       |        
-exceptions.BaseException --+    
-                           |    
-        exceptions.Exception --+
-                               |
-                              Error
-
- -
Known Subclasses:
-
- -
- -
- - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from exceptions.Exception: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.ErrorDomains-class.html b/doc/html/api/lxml.etree.ErrorDomains-class.html deleted file mode 100644 index 22de035..0000000 --- a/doc/html/api/lxml.etree.ErrorDomains-class.html +++ /dev/null @@ -1,508 +0,0 @@ - - - - - lxml.etree.ErrorDomains - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class ErrorDomains - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ErrorDomains

-
-object --+
-         |
-        ErrorDomains
-
- -
-Libxml2 error domains - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- D[k] if k in D, else d - - - - - - -
_getName(D, - k, - d=...)
- d defaults to None.
- - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - BUFFER = 29 -
-   - - C14N = 21 -
-   - - CATALOG = 20 -
-   - - CHECK = 24 -
-   - - DATATYPE = 15 -
-   - - DTD = 4 -
-   - - FTP = 9 -
-   - - HTML = 5 -
-   - - HTTP = 10 -
-   - - I18N = 27 -
-   - - IO = 8 -
-   - - MEMORY = 6 -
-   - - MODULE = 26 -
-   - - NAMESPACE = 3 -
-   - - NONE = 0 -
-   - - OUTPUT = 7 -
-   - - PARSER = 1 -
-   - - REGEXP = 14 -
-   - - RELAXNGP = 18 -
-   - - RELAXNGV = 19 -
-   - - SCHEMASP = 16 -
-   - - SCHEMASV = 17 -
-   - - SCHEMATRONV = 28 -
-   - - TREE = 2 -
-   - - URI = 30 -
-   - - VALID = 23 -
-   - - WRITER = 25 -
-   - - XINCLUDE = 11 -
-   - - XPATH = 12 -
-   - - XPOINTER = 13 -
-   - - XSLT = 22 -
-   - - __qualname__ = 'ErrorDomains' -
-   - - _names = {0: 'NONE', 1: 'PARSER', 2: 'TREE', 3: 'NAMESPACE', 4... -
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

_names

- -
-
-
-
Value:
-
-{0: 'NONE',
- 1: 'PARSER',
- 2: 'TREE',
- 3: 'NAMESPACE',
- 4: 'DTD',
- 5: 'HTML',
- 6: 'MEMORY',
- 7: 'OUTPUT',
-...
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.ErrorLevels-class.html b/doc/html/api/lxml.etree.ErrorLevels-class.html deleted file mode 100644 index ed15fa7..0000000 --- a/doc/html/api/lxml.etree.ErrorLevels-class.html +++ /dev/null @@ -1,266 +0,0 @@ - - - - - lxml.etree.ErrorLevels - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class ErrorLevels - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ErrorLevels

-
-object --+
-         |
-        ErrorLevels
-
- -
-Libxml2 error levels - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- D[k] if k in D, else d - - - - - - -
_getName(D, - k, - d=...)
- d defaults to None.
- - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - ERROR = 2 -
-   - - FATAL = 3 -
-   - - NONE = 0 -
-   - - WARNING = 1 -
-   - - __qualname__ = 'ErrorLevels' -
-   - - _names = {0: 'NONE', 1: 'WARNING', 2: 'ERROR', 3: 'FATAL'} -
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.ErrorTypes-class.html b/doc/html/api/lxml.etree.ErrorTypes-class.html deleted file mode 100644 index 1d4bb63..0000000 --- a/doc/html/api/lxml.etree.ErrorTypes-class.html +++ /dev/null @@ -1,5429 +0,0 @@ - - - - - lxml.etree.ErrorTypes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class ErrorTypes - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ErrorTypes

-
-object --+
-         |
-        ErrorTypes
-
- -
-Libxml2 error types - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- D[k] if k in D, else d - - - - - - -
_getName(D, - k, - d=...)
- d defaults to None.
- - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - BUF_OVERFLOW = 7000 -
-   - - C14N_CREATE_CTXT = 1950 -
-   - - C14N_CREATE_STACK = 1952 -
-   - - C14N_INVALID_NODE = 1953 -
-   - - C14N_RELATIVE_NAMESPACE = 1955 -
-   - - C14N_REQUIRES_UTF8 = 1951 -
-   - - C14N_UNKNOW_NODE = 1954 -
-   - - CATALOG_ENTRY_BROKEN = 1651 -
-   - - CATALOG_MISSING_ATTR = 1650 -
-   - - CATALOG_NOT_CATALOG = 1653 -
-   - - CATALOG_PREFER_VALUE = 1652 -
-   - - CATALOG_RECURSION = 1654 -
-   - - CHECK_ENTITY_TYPE = 5012 -
-   - - CHECK_FOUND_ATTRIBUTE = 5001 -
-   - - CHECK_FOUND_CDATA = 5003 -
-   - - CHECK_FOUND_COMMENT = 5007 -
-   - - CHECK_FOUND_DOCTYPE = 5008 -
-   - - CHECK_FOUND_ELEMENT = 5000 -
-   - - CHECK_FOUND_ENTITY = 5005 -
-   - - CHECK_FOUND_ENTITYREF = 5004 -
-   - - CHECK_FOUND_FRAGMENT = 5009 -
-   - - CHECK_FOUND_NOTATION = 5010 -
-   - - CHECK_FOUND_PI = 5006 -
-   - - CHECK_FOUND_TEXT = 5002 -
-   - - CHECK_NAME_NOT_NULL = 5037 -
-   - - CHECK_NOT_ATTR = 5023 -
-   - - CHECK_NOT_ATTR_DECL = 5024 -
-   - - CHECK_NOT_DTD = 5022 -
-   - - CHECK_NOT_ELEM_DECL = 5025 -
-   - - CHECK_NOT_ENTITY_DECL = 5026 -
-   - - CHECK_NOT_NCNAME = 5034 -
-   - - CHECK_NOT_NS_DECL = 5027 -
-   - - CHECK_NOT_UTF8 = 5032 -
-   - - CHECK_NO_DICT = 5033 -
-   - - CHECK_NO_DOC = 5014 -
-   - - CHECK_NO_ELEM = 5016 -
-   - - CHECK_NO_HREF = 5028 -
-   - - CHECK_NO_NAME = 5015 -
-   - - CHECK_NO_NEXT = 5020 -
-   - - CHECK_NO_PARENT = 5013 -
-   - - CHECK_NO_PREV = 5018 -
-   - - CHECK_NS_ANCESTOR = 5031 -
-   - - CHECK_NS_SCOPE = 5030 -
-   - - CHECK_OUTSIDE_DICT = 5035 -
-   - - CHECK_UNKNOWN_NODE = 5011 -
-   - - CHECK_WRONG_DOC = 5017 -
-   - - CHECK_WRONG_NAME = 5036 -
-   - - CHECK_WRONG_NEXT = 5021 -
-   - - CHECK_WRONG_PARENT = 5029 -
-   - - CHECK_WRONG_PREV = 5019 -
-   - - DTD_ATTRIBUTE_DEFAULT = 500 -
-   - - DTD_ATTRIBUTE_REDEFINED = 501 -
-   - - DTD_ATTRIBUTE_VALUE = 502 -
-   - - DTD_CONTENT_ERROR = 503 -
-   - - DTD_CONTENT_MODEL = 504 -
-   - - DTD_CONTENT_NOT_DETERMINIST = 505 -
-   - - DTD_DIFFERENT_PREFIX = 506 -
-   - - DTD_DUP_TOKEN = 541 -
-   - - DTD_ELEM_DEFAULT_NAMESPACE = 507 -
-   - - DTD_ELEM_NAMESPACE = 508 -
-   - - DTD_ELEM_REDEFINED = 509 -
-   - - DTD_EMPTY_NOTATION = 510 -
-   - - DTD_ENTITY_TYPE = 511 -
-   - - DTD_ID_FIXED = 512 -
-   - - DTD_ID_REDEFINED = 513 -
-   - - DTD_ID_SUBSET = 514 -
-   - - DTD_INVALID_CHILD = 515 -
-   - - DTD_INVALID_DEFAULT = 516 -
-   - - DTD_LOAD_ERROR = 517 -
-   - - DTD_MISSING_ATTRIBUTE = 518 -
-   - - DTD_MIXED_CORRUPT = 519 -
-   - - DTD_MULTIPLE_ID = 520 -
-   - - DTD_NOTATION_REDEFINED = 526 -
-   - - DTD_NOTATION_VALUE = 527 -
-   - - DTD_NOT_EMPTY = 528 -
-   - - DTD_NOT_PCDATA = 529 -
-   - - DTD_NOT_STANDALONE = 530 -
-   - - DTD_NO_DOC = 521 -
-   - - DTD_NO_DTD = 522 -
-   - - DTD_NO_ELEM_NAME = 523 -
-   - - DTD_NO_PREFIX = 524 -
-   - - DTD_NO_ROOT = 525 -
-   - - DTD_ROOT_NAME = 531 -
-   - - DTD_STANDALONE_DEFAULTED = 538 -
-   - - DTD_STANDALONE_WHITE_SPACE = 532 -
-   - - DTD_UNKNOWN_ATTRIBUTE = 533 -
-   - - DTD_UNKNOWN_ELEM = 534 -
-   - - DTD_UNKNOWN_ENTITY = 535 -
-   - - DTD_UNKNOWN_ID = 536 -
-   - - DTD_UNKNOWN_NOTATION = 537 -
-   - - DTD_XMLID_TYPE = 540 -
-   - - DTD_XMLID_VALUE = 539 -
-   - - ERR_ATTLIST_NOT_FINISHED = 51 -
-   - - ERR_ATTLIST_NOT_STARTED = 50 -
-   - - ERR_ATTRIBUTE_NOT_FINISHED = 40 -
-   - - ERR_ATTRIBUTE_NOT_STARTED = 39 -
-   - - ERR_ATTRIBUTE_REDEFINED = 42 -
-   - - ERR_ATTRIBUTE_WITHOUT_VALUE = 41 -
-   - - ERR_CDATA_NOT_FINISHED = 63 -
-   - - ERR_CHARREF_AT_EOF = 10 -
-   - - ERR_CHARREF_IN_DTD = 13 -
-   - - ERR_CHARREF_IN_EPILOG = 12 -
-   - - ERR_CHARREF_IN_PROLOG = 11 -
-   - - ERR_COMMENT_NOT_FINISHED = 45 -
-   - - ERR_CONDSEC_INVALID = 83 -
-   - - ERR_CONDSEC_INVALID_KEYWORD = 95 -
-   - - ERR_CONDSEC_NOT_FINISHED = 59 -
-   - - ERR_CONDSEC_NOT_STARTED = 58 -
-   - - ERR_DOCTYPE_NOT_FINISHED = 61 -
-   - - ERR_DOCUMENT_EMPTY = 4 -
-   - - ERR_DOCUMENT_END = 5 -
-   - - ERR_DOCUMENT_START = 3 -
-   - - ERR_ELEMCONTENT_NOT_FINISHED = 55 -
-   - - ERR_ELEMCONTENT_NOT_STARTED = 54 -
-   - - ERR_ENCODING_NAME = 79 -
-   - - ERR_ENTITYREF_AT_EOF = 14 -
-   - - ERR_ENTITYREF_IN_DTD = 17 -
-   - - ERR_ENTITYREF_IN_EPILOG = 16 -
-   - - ERR_ENTITYREF_IN_PROLOG = 15 -
-   - - ERR_ENTITYREF_NO_NAME = 22 -
-   - - ERR_ENTITYREF_SEMICOL_MISSING = 23 -
-   - - ERR_ENTITY_BOUNDARY = 90 -
-   - - ERR_ENTITY_CHAR_ERROR = 87 -
-   - - ERR_ENTITY_IS_EXTERNAL = 29 -
-   - - ERR_ENTITY_IS_PARAMETER = 30 -
-   - - ERR_ENTITY_LOOP = 89 -
-   - - ERR_ENTITY_NOT_FINISHED = 37 -
-   - - ERR_ENTITY_NOT_STARTED = 36 -
-   - - ERR_ENTITY_PE_INTERNAL = 88 -
-   - - ERR_ENTITY_PROCESSING = 104 -
-   - - ERR_EQUAL_REQUIRED = 75 -
-   - - ERR_EXTRA_CONTENT = 86 -
-   - - ERR_EXT_ENTITY_STANDALONE = 82 -
-   - - ERR_EXT_SUBSET_NOT_FINISHED = 60 -
-   - - ERR_GT_REQUIRED = 73 -
-   - - ERR_HYPHEN_IN_COMMENT = 80 -
-   - - ERR_INTERNAL_ERROR = 1 -
-   - - ERR_INVALID_CHAR = 9 -
-   - - ERR_INVALID_CHARREF = 8 -
-   - - ERR_INVALID_DEC_CHARREF = 7 -
-   - - ERR_INVALID_ENCODING = 81 -
-   - - ERR_INVALID_HEX_CHARREF = 6 -
-   - - ERR_INVALID_URI = 91 -
-   - - ERR_LITERAL_NOT_FINISHED = 44 -
-   - - ERR_LITERAL_NOT_STARTED = 43 -
-   - - ERR_LTSLASH_REQUIRED = 74 -
-   - - ERR_LT_IN_ATTRIBUTE = 38 -
-   - - ERR_LT_REQUIRED = 72 -
-   - - ERR_MISPLACED_CDATA_END = 62 -
-   - - ERR_MISSING_ENCODING = 101 -
-   - - ERR_MIXED_NOT_FINISHED = 53 -
-   - - ERR_MIXED_NOT_STARTED = 52 -
-   - - ERR_NAME_REQUIRED = 68 -
-   - - ERR_NAME_TOO_LONG = 110 -
-   - - ERR_NMTOKEN_REQUIRED = 67 -
-   - - ERR_NOTATION_NOT_FINISHED = 49 -
-   - - ERR_NOTATION_NOT_STARTED = 48 -
-   - - ERR_NOTATION_PROCESSING = 105 -
-   - - ERR_NOT_STANDALONE = 103 -
-   - - ERR_NOT_WELL_BALANCED = 85 -
-   - - ERR_NO_DTD = 94 -
-   - - ERR_NO_MEMORY = 2 -
-   - - ERR_NS_DECL_ERROR = 35 -
-   - - ERR_OK = 0 -
-   - - ERR_PCDATA_REQUIRED = 69 -
-   - - ERR_PEREF_AT_EOF = 18 -
-   - - ERR_PEREF_IN_EPILOG = 20 -
-   - - ERR_PEREF_IN_INT_SUBSET = 21 -
-   - - ERR_PEREF_IN_PROLOG = 19 -
-   - - ERR_PEREF_NO_NAME = 24 -
-   - - ERR_PEREF_SEMICOL_MISSING = 25 -
-   - - ERR_PI_NOT_FINISHED = 47 -
-   - - ERR_PI_NOT_STARTED = 46 -
-   - - ERR_PUBID_REQUIRED = 71 -
-   - - ERR_RESERVED_XML_NAME = 64 -
-   - - ERR_SEPARATOR_REQUIRED = 66 -
-   - - ERR_SPACE_REQUIRED = 65 -
-   - - ERR_STANDALONE_VALUE = 78 -
-   - - ERR_STRING_NOT_CLOSED = 34 -
-   - - ERR_STRING_NOT_STARTED = 33 -
-   - - ERR_TAG_NAME_MISMATCH = 76 -
-   - - ERR_TAG_NOT_FINISHED = 77 -
-   - - ERR_UNDECLARED_ENTITY = 26 -
-   - - ERR_UNKNOWN_ENCODING = 31 -
-   - - ERR_UNKNOWN_VERSION = 108 -
-   - - ERR_UNPARSED_ENTITY = 28 -
-   - - ERR_UNSUPPORTED_ENCODING = 32 -
-   - - ERR_URI_FRAGMENT = 92 -
-   - - ERR_URI_REQUIRED = 70 -
-   - - ERR_USER_STOP = 111 -
-   - - ERR_VALUE_REQUIRED = 84 -
-   - - ERR_VERSION_MISMATCH = 109 -
-   - - ERR_VERSION_MISSING = 96 -
-   - - ERR_XMLDECL_NOT_FINISHED = 57 -
-   - - ERR_XMLDECL_NOT_STARTED = 56 -
-   - - FTP_ACCNT = 2002 -
-   - - FTP_EPSV_ANSWER = 2001 -
-   - - FTP_PASV_ANSWER = 2000 -
-   - - FTP_URL_SYNTAX = 2003 -
-   - - HTML_STRUCURE_ERROR = 800 -
-   - - HTML_UNKNOWN_TAG = 801 -
-   - - HTTP_UNKNOWN_HOST = 2022 -
-   - - HTTP_URL_SYNTAX = 2020 -
-   - - HTTP_USE_IP = 2021 -
-   - - I18N_CONV_FAILED = 6003 -
-   - - I18N_EXCESS_HANDLER = 6002 -
-   - - I18N_NO_HANDLER = 6001 -
-   - - I18N_NO_NAME = 6000 -
-   - - I18N_NO_OUTPUT = 6004 -
-   - - IO_BUFFER_FULL = 1548 -
-   - - IO_EACCES = 1501 -
-   - - IO_EADDRINUSE = 1554 -
-   - - IO_EAFNOSUPPORT = 1556 -
-   - - IO_EAGAIN = 1502 -
-   - - IO_EALREADY = 1555 -
-   - - IO_EBADF = 1503 -
-   - - IO_EBADMSG = 1504 -
-   - - IO_EBUSY = 1505 -
-   - - IO_ECANCELED = 1506 -
-   - - IO_ECHILD = 1507 -
-   - - IO_ECONNREFUSED = 1552 -
-   - - IO_EDEADLK = 1508 -
-   - - IO_EDOM = 1509 -
-   - - IO_EEXIST = 1510 -
-   - - IO_EFAULT = 1511 -
-   - - IO_EFBIG = 1512 -
-   - - IO_EINPROGRESS = 1513 -
-   - - IO_EINTR = 1514 -
-   - - IO_EINVAL = 1515 -
-   - - IO_EIO = 1516 -
-   - - IO_EISCONN = 1551 -
-   - - IO_EISDIR = 1517 -
-   - - IO_EMFILE = 1518 -
-   - - IO_EMLINK = 1519 -
-   - - IO_EMSGSIZE = 1520 -
-   - - IO_ENAMETOOLONG = 1521 -
-   - - IO_ENCODER = 1544 -
-   - - IO_ENETUNREACH = 1553 -
-   - - IO_ENFILE = 1522 -
-   - - IO_ENODEV = 1523 -
-   - - IO_ENOENT = 1524 -
-   - - IO_ENOEXEC = 1525 -
-   - - IO_ENOLCK = 1526 -
-   - - IO_ENOMEM = 1527 -
-   - - IO_ENOSPC = 1528 -
-   - - IO_ENOSYS = 1529 -
-   - - IO_ENOTDIR = 1530 -
-   - - IO_ENOTEMPTY = 1531 -
-   - - IO_ENOTSOCK = 1550 -
-   - - IO_ENOTSUP = 1532 -
-   - - IO_ENOTTY = 1533 -
-   - - IO_ENXIO = 1534 -
-   - - IO_EPERM = 1535 -
-   - - IO_EPIPE = 1536 -
-   - - IO_ERANGE = 1537 -
-   - - IO_EROFS = 1538 -
-   - - IO_ESPIPE = 1539 -
-   - - IO_ESRCH = 1540 -
-   - - IO_ETIMEDOUT = 1541 -
-   - - IO_EXDEV = 1542 -
-   - - IO_FLUSH = 1545 -
-   - - IO_LOAD_ERROR = 1549 -
-   - - IO_NETWORK_ATTEMPT = 1543 -
-   - - IO_NO_INPUT = 1547 -
-   - - IO_UNKNOWN = 1500 -
-   - - IO_WRITE = 1546 -
-   - - MODULE_CLOSE = 4901 -
-   - - MODULE_OPEN = 4900 -
-   - - NS_ERR_ATTRIBUTE_REDEFINED = 203 -
-   - - NS_ERR_COLON = 205 -
-   - - NS_ERR_EMPTY = 204 -
-   - - NS_ERR_QNAME = 202 -
-   - - NS_ERR_UNDEFINED_NAMESPACE = 201 -
-   - - NS_ERR_XML_NAMESPACE = 200 -
-   - - REGEXP_COMPILE_ERROR = 1450 -
-   - - RNGP_ANYNAME_ATTR_ANCESTOR = 1000 -
-   - - RNGP_ATTRIBUTE_CHILDREN = 1002 -
-   - - RNGP_ATTRIBUTE_CONTENT = 1003 -
-   - - RNGP_ATTRIBUTE_EMPTY = 1004 -
-   - - RNGP_ATTRIBUTE_NOOP = 1005 -
-   - - RNGP_ATTR_CONFLICT = 1001 -
-   - - RNGP_CHOICE_CONTENT = 1006 -
-   - - RNGP_CHOICE_EMPTY = 1007 -
-   - - RNGP_CREATE_FAILURE = 1008 -
-   - - RNGP_DATA_CONTENT = 1009 -
-   - - RNGP_DEFINE_CREATE_FAILED = 1011 -
-   - - RNGP_DEFINE_EMPTY = 1012 -
-   - - RNGP_DEFINE_MISSING = 1013 -
-   - - RNGP_DEFINE_NAME_MISSING = 1014 -
-   - - RNGP_DEF_CHOICE_AND_INTERLEAVE = 1010 -
-   - - RNGP_ELEMENT_CONTENT = 1018 -
-   - - RNGP_ELEMENT_EMPTY = 1017 -
-   - - RNGP_ELEMENT_NAME = 1019 -
-   - - RNGP_ELEMENT_NO_CONTENT = 1020 -
-   - - RNGP_ELEM_CONTENT_EMPTY = 1015 -
-   - - RNGP_ELEM_CONTENT_ERROR = 1016 -
-   - - RNGP_ELEM_TEXT_CONFLICT = 1021 -
-   - - RNGP_EMPTY = 1022 -
-   - - RNGP_EMPTY_CONSTRUCT = 1023 -
-   - - RNGP_EMPTY_CONTENT = 1024 -
-   - - RNGP_EMPTY_NOT_EMPTY = 1025 -
-   - - RNGP_ERROR_TYPE_LIB = 1026 -
-   - - RNGP_EXCEPT_EMPTY = 1027 -
-   - - RNGP_EXCEPT_MISSING = 1028 -
-   - - RNGP_EXCEPT_MULTIPLE = 1029 -
-   - - RNGP_EXCEPT_NO_CONTENT = 1030 -
-   - - RNGP_EXTERNALREF_EMTPY = 1031 -
-   - - RNGP_EXTERNALREF_RECURSE = 1033 -
-   - - RNGP_EXTERNAL_REF_FAILURE = 1032 -
-   - - RNGP_FORBIDDEN_ATTRIBUTE = 1034 -
-   - - RNGP_FOREIGN_ELEMENT = 1035 -
-   - - RNGP_GRAMMAR_CONTENT = 1036 -
-   - - RNGP_GRAMMAR_EMPTY = 1037 -
-   - - RNGP_GRAMMAR_MISSING = 1038 -
-   - - RNGP_GRAMMAR_NO_START = 1039 -
-   - - RNGP_GROUP_ATTR_CONFLICT = 1040 -
-   - - RNGP_HREF_ERROR = 1041 -
-   - - RNGP_INCLUDE_EMPTY = 1042 -
-   - - RNGP_INCLUDE_FAILURE = 1043 -
-   - - RNGP_INCLUDE_RECURSE = 1044 -
-   - - RNGP_INTERLEAVE_ADD = 1045 -
-   - - RNGP_INTERLEAVE_CREATE_FAILED = 1046 -
-   - - RNGP_INTERLEAVE_EMPTY = 1047 -
-   - - RNGP_INTERLEAVE_NO_CONTENT = 1048 -
-   - - RNGP_INVALID_DEFINE_NAME = 1049 -
-   - - RNGP_INVALID_URI = 1050 -
-   - - RNGP_INVALID_VALUE = 1051 -
-   - - RNGP_MISSING_HREF = 1052 -
-   - - RNGP_NAME_MISSING = 1053 -
-   - - RNGP_NEED_COMBINE = 1054 -
-   - - RNGP_NOTALLOWED_NOT_EMPTY = 1055 -
-   - - RNGP_NSNAME_ATTR_ANCESTOR = 1056 -
-   - - RNGP_NSNAME_NO_NS = 1057 -
-   - - RNGP_PARAM_FORBIDDEN = 1058 -
-   - - RNGP_PARAM_NAME_MISSING = 1059 -
-   - - RNGP_PARENTREF_CREATE_FAILED = 1060 -
-   - - RNGP_PARENTREF_NAME_INVALID = 1061 -
-   - - RNGP_PARENTREF_NOT_EMPTY = 1064 -
-   - - RNGP_PARENTREF_NO_NAME = 1062 -
-   - - RNGP_PARENTREF_NO_PARENT = 1063 -
-   - - RNGP_PARSE_ERROR = 1065 -
-   - - RNGP_PAT_ANYNAME_EXCEPT_ANYNAME = 1066 -
-   - - RNGP_PAT_ATTR_ATTR = 1067 -
-   - - RNGP_PAT_ATTR_ELEM = 1068 -
-   - - RNGP_PAT_DATA_EXCEPT_ATTR = 1069 -
-   - - RNGP_PAT_DATA_EXCEPT_ELEM = 1070 -
-   - - RNGP_PAT_DATA_EXCEPT_EMPTY = 1071 -
-   - - RNGP_PAT_DATA_EXCEPT_GROUP = 1072 -
-   - - RNGP_PAT_DATA_EXCEPT_INTERLEAVE = 1073 -
-   - - RNGP_PAT_DATA_EXCEPT_LIST = 1074 -
-   - - RNGP_PAT_DATA_EXCEPT_ONEMORE = 1075 -
-   - - RNGP_PAT_DATA_EXCEPT_REF = 1076 -
-   - - RNGP_PAT_DATA_EXCEPT_TEXT = 1077 -
-   - - RNGP_PAT_LIST_ATTR = 1078 -
-   - - RNGP_PAT_LIST_ELEM = 1079 -
-   - - RNGP_PAT_LIST_INTERLEAVE = 1080 -
-   - - RNGP_PAT_LIST_LIST = 1081 -
-   - - RNGP_PAT_LIST_REF = 1082 -
-   - - RNGP_PAT_LIST_TEXT = 1083 -
-   - - RNGP_PAT_NSNAME_EXCEPT_ANYNAME = 1084 -
-   - - RNGP_PAT_NSNAME_EXCEPT_NSNAME = 1085 -
-   - - RNGP_PAT_ONEMORE_GROUP_ATTR = 1086 -
-   - - RNGP_PAT_ONEMORE_INTERLEAVE_ATTR = 1087 -
-   - - RNGP_PAT_START_ATTR = 1088 -
-   - - RNGP_PAT_START_DATA = 1089 -
-   - - RNGP_PAT_START_EMPTY = 1090 -
-   - - RNGP_PAT_START_GROUP = 1091 -
-   - - RNGP_PAT_START_INTERLEAVE = 1092 -
-   - - RNGP_PAT_START_LIST = 1093 -
-   - - RNGP_PAT_START_ONEMORE = 1094 -
-   - - RNGP_PAT_START_TEXT = 1095 -
-   - - RNGP_PAT_START_VALUE = 1096 -
-   - - RNGP_PREFIX_UNDEFINED = 1097 -
-   - - RNGP_REF_CREATE_FAILED = 1098 -
-   - - RNGP_REF_CYCLE = 1099 -
-   - - RNGP_REF_NAME_INVALID = 1100 -
-   - - RNGP_REF_NOT_EMPTY = 1103 -
-   - - RNGP_REF_NO_DEF = 1101 -
-   - - RNGP_REF_NO_NAME = 1102 -
-   - - RNGP_START_CHOICE_AND_INTERLEAVE = 1104 -
-   - - RNGP_START_CONTENT = 1105 -
-   - - RNGP_START_EMPTY = 1106 -
-   - - RNGP_START_MISSING = 1107 -
-   - - RNGP_TEXT_EXPECTED = 1108 -
-   - - RNGP_TEXT_HAS_CHILD = 1109 -
-   - - RNGP_TYPE_MISSING = 1110 -
-   - - RNGP_TYPE_NOT_FOUND = 1111 -
-   - - RNGP_TYPE_VALUE = 1112 -
-   - - RNGP_UNKNOWN_ATTRIBUTE = 1113 -
-   - - RNGP_UNKNOWN_COMBINE = 1114 -
-   - - RNGP_UNKNOWN_CONSTRUCT = 1115 -
-   - - RNGP_UNKNOWN_TYPE_LIB = 1116 -
-   - - RNGP_URI_FRAGMENT = 1117 -
-   - - RNGP_URI_NOT_ABSOLUTE = 1118 -
-   - - RNGP_VALUE_EMPTY = 1119 -
-   - - RNGP_VALUE_NO_CONTENT = 1120 -
-   - - RNGP_XMLNS_NAME = 1121 -
-   - - RNGP_XML_NS = 1122 -
-   - - SAVE_CHAR_INVALID = 1401 -
-   - - SAVE_NOT_UTF8 = 1400 -
-   - - SAVE_NO_DOCTYPE = 1402 -
-   - - SAVE_UNKNOWN_ENCODING = 1403 -
-   - - SCHEMAP_AG_PROPS_CORRECT = 3087 -
-   - - SCHEMAP_ATTRFORMDEFAULT_VALUE = 1701 -
-   - - SCHEMAP_ATTRGRP_NONAME_NOREF = 1702 -
-   - - SCHEMAP_ATTR_NONAME_NOREF = 1703 -
-   - - SCHEMAP_AU_PROPS_CORRECT = 3089 -
-   - - SCHEMAP_AU_PROPS_CORRECT_2 = 3078 -
-   - - SCHEMAP_A_PROPS_CORRECT_2 = 3079 -
-   - - SCHEMAP_A_PROPS_CORRECT_3 = 3090 -
-   - - SCHEMAP_COMPLEXTYPE_NONAME_NOREF = 1704 -
-   - - SCHEMAP_COS_ALL_LIMITED = 3091 -
-   - - SCHEMAP_COS_CT_EXTENDS_1_1 = 3063 -
-   - - SCHEMAP_COS_CT_EXTENDS_1_2 = 3088 -
-   - - SCHEMAP_COS_CT_EXTENDS_1_3 = 1800 -
-   - - SCHEMAP_COS_ST_DERIVED_OK_2_1 = 3031 -
-   - - SCHEMAP_COS_ST_DERIVED_OK_2_2 = 3032 -
-   - - SCHEMAP_COS_ST_RESTRICTS_1_1 = 3011 -
-   - - SCHEMAP_COS_ST_RESTRICTS_1_2 = 3012 -
-   - - SCHEMAP_COS_ST_RESTRICTS_1_3_1 = 3013 -
-   - - SCHEMAP_COS_ST_RESTRICTS_1_3_2 = 3014 -
-   - - SCHEMAP_COS_ST_RESTRICTS_2_1 = 3015 -
-   - - SCHEMAP_COS_ST_RESTRICTS_2_3_1_1 = 3016 -
-   - - SCHEMAP_COS_ST_RESTRICTS_2_3_1_2 = 3017 -
-   - - SCHEMAP_COS_ST_RESTRICTS_2_3_2_1 = 3018 -
-   - - SCHEMAP_COS_ST_RESTRICTS_2_3_2_2 = 3019 -
-   - - SCHEMAP_COS_ST_RESTRICTS_2_3_2_3 = 3020 -
-   - - SCHEMAP_COS_ST_RESTRICTS_2_3_2_4 = 3021 -
-   - - SCHEMAP_COS_ST_RESTRICTS_2_3_2_5 = 3022 -
-   - - SCHEMAP_COS_ST_RESTRICTS_3_1 = 3023 -
-   - - SCHEMAP_COS_ST_RESTRICTS_3_3_1 = 3024 -
-   - - SCHEMAP_COS_ST_RESTRICTS_3_3_1_2 = 3025 -
-   - - SCHEMAP_COS_ST_RESTRICTS_3_3_2_1 = 3027 -
-   - - SCHEMAP_COS_ST_RESTRICTS_3_3_2_2 = 3026 -
-   - - SCHEMAP_COS_ST_RESTRICTS_3_3_2_3 = 3028 -
-   - - SCHEMAP_COS_ST_RESTRICTS_3_3_2_4 = 3029 -
-   - - SCHEMAP_COS_ST_RESTRICTS_3_3_2_5 = 3030 -
-   - - SCHEMAP_COS_VALID_DEFAULT_1 = 3058 -
-   - - SCHEMAP_COS_VALID_DEFAULT_2_1 = 3059 -
-   - - SCHEMAP_COS_VALID_DEFAULT_2_2_1 = 3060 -
-   - - SCHEMAP_COS_VALID_DEFAULT_2_2_2 = 3061 -
-   - - SCHEMAP_CT_PROPS_CORRECT_1 = 1782 -
-   - - SCHEMAP_CT_PROPS_CORRECT_2 = 1783 -
-   - - SCHEMAP_CT_PROPS_CORRECT_3 = 1784 -
-   - - SCHEMAP_CT_PROPS_CORRECT_4 = 1785 -
-   - - SCHEMAP_CT_PROPS_CORRECT_5 = 1786 -
-   - - SCHEMAP_CVC_SIMPLE_TYPE = 3062 -
-   - - SCHEMAP_C_PROPS_CORRECT = 3080 -
-   - - SCHEMAP_DEF_AND_PREFIX = 1768 -
-   - - SCHEMAP_DERIVATION_OK_RESTRICTION_1 = 1787 -
-   - - SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1 = 1788 -
-   - - SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2 = 1789 -
-   - - SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3 = 3077 -
-   - - SCHEMAP_DERIVATION_OK_RESTRICTION_2_2 = 1790 -
-   - - SCHEMAP_DERIVATION_OK_RESTRICTION_3 = 1791 -
-   - - SCHEMAP_DERIVATION_OK_RESTRICTION_4_1 = 1797 -
-   - - SCHEMAP_DERIVATION_OK_RESTRICTION_4_2 = 1798 -
-   - - SCHEMAP_DERIVATION_OK_RESTRICTION_4_3 = 1799 -
-   - - SCHEMAP_ELEMFORMDEFAULT_VALUE = 1705 -
-   - - SCHEMAP_ELEM_DEFAULT_FIXED = 1755 -
-   - - SCHEMAP_ELEM_NONAME_NOREF = 1706 -
-   - - SCHEMAP_EXTENSION_NO_BASE = 1707 -
-   - - SCHEMAP_E_PROPS_CORRECT_2 = 3045 -
-   - - SCHEMAP_E_PROPS_CORRECT_3 = 3046 -
-   - - SCHEMAP_E_PROPS_CORRECT_4 = 3047 -
-   - - SCHEMAP_E_PROPS_CORRECT_5 = 3048 -
-   - - SCHEMAP_E_PROPS_CORRECT_6 = 3049 -
-   - - SCHEMAP_FACET_NO_VALUE = 1708 -
-   - - SCHEMAP_FAILED_BUILD_IMPORT = 1709 -
-   - - SCHEMAP_FAILED_LOAD = 1757 -
-   - - SCHEMAP_FAILED_PARSE = 1766 -
-   - - SCHEMAP_GROUP_NONAME_NOREF = 1710 -
-   - - SCHEMAP_IMPORT_NAMESPACE_NOT_URI = 1711 -
-   - - SCHEMAP_IMPORT_REDEFINE_NSNAME = 1712 -
-   - - SCHEMAP_IMPORT_SCHEMA_NOT_URI = 1713 -
-   - - SCHEMAP_INCLUDE_SCHEMA_NOT_URI = 1770 -
-   - - SCHEMAP_INCLUDE_SCHEMA_NO_URI = 1771 -
-   - - SCHEMAP_INTERNAL = 3069 -
-   - - SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE = 1793 -
-   - - SCHEMAP_INVALID_ATTR_COMBINATION = 1777 -
-   - - SCHEMAP_INVALID_ATTR_INLINE_COMBINATION = 1778 -
-   - - SCHEMAP_INVALID_ATTR_NAME = 1780 -
-   - - SCHEMAP_INVALID_ATTR_USE = 1774 -
-   - - SCHEMAP_INVALID_BOOLEAN = 1714 -
-   - - SCHEMAP_INVALID_ENUM = 1715 -
-   - - SCHEMAP_INVALID_FACET = 1716 -
-   - - SCHEMAP_INVALID_FACET_VALUE = 1717 -
-   - - SCHEMAP_INVALID_MAXOCCURS = 1718 -
-   - - SCHEMAP_INVALID_MINOCCURS = 1719 -
-   - - SCHEMAP_INVALID_REF_AND_SUBTYPE = 1720 -
-   - - SCHEMAP_INVALID_WHITE_SPACE = 1721 -
-   - - SCHEMAP_MG_PROPS_CORRECT_1 = 3074 -
-   - - SCHEMAP_MG_PROPS_CORRECT_2 = 3075 -
-   - - SCHEMAP_MISSING_SIMPLETYPE_CHILD = 1779 -
-   - - SCHEMAP_NOATTR_NOREF = 1722 -
-   - - SCHEMAP_NOROOT = 1759 -
-   - - SCHEMAP_NOTATION_NO_NAME = 1723 -
-   - - SCHEMAP_NOTHING_TO_PARSE = 1758 -
-   - - SCHEMAP_NOTYPE_NOREF = 1724 -
-   - - SCHEMAP_NOT_DETERMINISTIC = 3070 -
-   - - SCHEMAP_NOT_SCHEMA = 1772 -
-   - - SCHEMAP_NO_XMLNS = 3056 -
-   - - SCHEMAP_NO_XSI = 3057 -
-   - - SCHEMAP_PREFIX_UNDEFINED = 1700 -
-   - - SCHEMAP_P_PROPS_CORRECT_1 = 3042 -
-   - - SCHEMAP_P_PROPS_CORRECT_2_1 = 3043 -
-   - - SCHEMAP_P_PROPS_CORRECT_2_2 = 3044 -
-   - - SCHEMAP_RECURSIVE = 1775 -
-   - - SCHEMAP_REDEFINED_ATTR = 1764 -
-   - - SCHEMAP_REDEFINED_ATTRGROUP = 1763 -
-   - - SCHEMAP_REDEFINED_ELEMENT = 1762 -
-   - - SCHEMAP_REDEFINED_GROUP = 1760 -
-   - - SCHEMAP_REDEFINED_NOTATION = 1765 -
-   - - SCHEMAP_REDEFINED_TYPE = 1761 -
-   - - SCHEMAP_REF_AND_CONTENT = 1781 -
-   - - SCHEMAP_REF_AND_SUBTYPE = 1725 -
-   - - SCHEMAP_REGEXP_INVALID = 1756 -
-   - - SCHEMAP_RESTRICTION_NONAME_NOREF = 1726 -
-   - - SCHEMAP_S4S_ATTR_INVALID_VALUE = 3037 -
-   - - SCHEMAP_S4S_ATTR_MISSING = 3036 -
-   - - SCHEMAP_S4S_ATTR_NOT_ALLOWED = 3035 -
-   - - SCHEMAP_S4S_ELEM_MISSING = 3034 -
-   - - SCHEMAP_S4S_ELEM_NOT_ALLOWED = 3033 -
-   - - SCHEMAP_SIMPLETYPE_NONAME = 1727 -
-   - - SCHEMAP_SRC_ATTRIBUTE_1 = 3051 -
-   - - SCHEMAP_SRC_ATTRIBUTE_2 = 3052 -
-   - - SCHEMAP_SRC_ATTRIBUTE_3_1 = 3053 -
-   - - SCHEMAP_SRC_ATTRIBUTE_3_2 = 3054 -
-   - - SCHEMAP_SRC_ATTRIBUTE_4 = 3055 -
-   - - SCHEMAP_SRC_ATTRIBUTE_GROUP_1 = 3071 -
-   - - SCHEMAP_SRC_ATTRIBUTE_GROUP_2 = 3072 -
-   - - SCHEMAP_SRC_ATTRIBUTE_GROUP_3 = 3073 -
-   - - SCHEMAP_SRC_CT_1 = 3076 -
-   - - SCHEMAP_SRC_ELEMENT_1 = 3038 -
-   - - SCHEMAP_SRC_ELEMENT_2_1 = 3039 -
-   - - SCHEMAP_SRC_ELEMENT_2_2 = 3040 -
-   - - SCHEMAP_SRC_ELEMENT_3 = 3041 -
-   - - SCHEMAP_SRC_IMPORT = 3082 -
-   - - SCHEMAP_SRC_IMPORT_1_1 = 3064 -
-   - - SCHEMAP_SRC_IMPORT_1_2 = 3065 -
-   - - SCHEMAP_SRC_IMPORT_2 = 3066 -
-   - - SCHEMAP_SRC_IMPORT_2_1 = 3067 -
-   - - SCHEMAP_SRC_IMPORT_2_2 = 3068 -
-   - - SCHEMAP_SRC_IMPORT_3_1 = 1795 -
-   - - SCHEMAP_SRC_IMPORT_3_2 = 1796 -
-   - - SCHEMAP_SRC_INCLUDE = 3050 -
-   - - SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE = 3006 -
-   - - SCHEMAP_SRC_REDEFINE = 3081 -
-   - - SCHEMAP_SRC_RESOLVE = 3004 -
-   - - SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE = 3005 -
-   - - SCHEMAP_SRC_SIMPLE_TYPE_1 = 3000 -
-   - - SCHEMAP_SRC_SIMPLE_TYPE_2 = 3001 -
-   - - SCHEMAP_SRC_SIMPLE_TYPE_3 = 3002 -
-   - - SCHEMAP_SRC_SIMPLE_TYPE_4 = 3003 -
-   - - SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES = 3007 -
-   - - SCHEMAP_ST_PROPS_CORRECT_1 = 3008 -
-   - - SCHEMAP_ST_PROPS_CORRECT_2 = 3009 -
-   - - SCHEMAP_ST_PROPS_CORRECT_3 = 3010 -
-   - - SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE = 1776 -
-   - - SCHEMAP_TYPE_AND_SUBTYPE = 1728 -
-   - - SCHEMAP_UNION_NOT_EXPRESSIBLE = 1794 -
-   - - SCHEMAP_UNKNOWN_ALL_CHILD = 1729 -
-   - - SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD = 1730 -
-   - - SCHEMAP_UNKNOWN_ATTRGRP_CHILD = 1732 -
-   - - SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP = 1733 -
-   - - SCHEMAP_UNKNOWN_ATTR_CHILD = 1731 -
-   - - SCHEMAP_UNKNOWN_BASE_TYPE = 1734 -
-   - - SCHEMAP_UNKNOWN_CHOICE_CHILD = 1735 -
-   - - SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD = 1736 -
-   - - SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD = 1737 -
-   - - SCHEMAP_UNKNOWN_ELEM_CHILD = 1738 -
-   - - SCHEMAP_UNKNOWN_EXTENSION_CHILD = 1739 -
-   - - SCHEMAP_UNKNOWN_FACET_CHILD = 1740 -
-   - - SCHEMAP_UNKNOWN_FACET_TYPE = 1741 -
-   - - SCHEMAP_UNKNOWN_GROUP_CHILD = 1742 -
-   - - SCHEMAP_UNKNOWN_IMPORT_CHILD = 1743 -
-   - - SCHEMAP_UNKNOWN_INCLUDE_CHILD = 1769 -
-   - - SCHEMAP_UNKNOWN_LIST_CHILD = 1744 -
-   - - SCHEMAP_UNKNOWN_MEMBER_TYPE = 1773 -
-   - - SCHEMAP_UNKNOWN_NOTATION_CHILD = 1745 -
-   - - SCHEMAP_UNKNOWN_PREFIX = 1767 -
-   - - SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD = 1746 -
-   - - SCHEMAP_UNKNOWN_REF = 1747 -
-   - - SCHEMAP_UNKNOWN_RESTRICTION_CHILD = 1748 -
-   - - SCHEMAP_UNKNOWN_SCHEMAS_CHILD = 1749 -
-   - - SCHEMAP_UNKNOWN_SEQUENCE_CHILD = 1750 -
-   - - SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD = 1751 -
-   - - SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD = 1752 -
-   - - SCHEMAP_UNKNOWN_TYPE = 1753 -
-   - - SCHEMAP_UNKNOWN_UNION_CHILD = 1754 -
-   - - SCHEMAP_WARN_ATTR_POINTLESS_PROH = 3086 -
-   - - SCHEMAP_WARN_ATTR_REDECL_PROH = 3085 -
-   - - SCHEMAP_WARN_SKIP_SCHEMA = 3083 -
-   - - SCHEMAP_WARN_UNLOCATED_SCHEMA = 3084 -
-   - - SCHEMAP_WILDCARD_INVALID_NS_MEMBER = 1792 -
-   - - SCHEMATRONV_ASSERT = 4000 -
-   - - SCHEMATRONV_REPORT = 4001 -
-   - - SCHEMAV_ATTRINVALID = 1821 -
-   - - SCHEMAV_ATTRUNKNOWN = 1820 -
-   - - SCHEMAV_CONSTRUCT = 1817 -
-   - - SCHEMAV_CVC_ATTRIBUTE_1 = 1861 -
-   - - SCHEMAV_CVC_ATTRIBUTE_2 = 1862 -
-   - - SCHEMAV_CVC_ATTRIBUTE_3 = 1863 -
-   - - SCHEMAV_CVC_ATTRIBUTE_4 = 1864 -
-   - - SCHEMAV_CVC_AU = 1874 -
-   - - SCHEMAV_CVC_COMPLEX_TYPE_1 = 1873 -
-   - - SCHEMAV_CVC_COMPLEX_TYPE_2_1 = 1841 -
-   - - SCHEMAV_CVC_COMPLEX_TYPE_2_2 = 1842 -
-   - - SCHEMAV_CVC_COMPLEX_TYPE_2_3 = 1843 -
-   - - SCHEMAV_CVC_COMPLEX_TYPE_2_4 = 1844 -
-   - - SCHEMAV_CVC_COMPLEX_TYPE_3_1 = 1865 -
-   - - SCHEMAV_CVC_COMPLEX_TYPE_3_2_1 = 1866 -
-   - - SCHEMAV_CVC_COMPLEX_TYPE_3_2_2 = 1867 -
-   - - SCHEMAV_CVC_COMPLEX_TYPE_4 = 1868 -
-   - - SCHEMAV_CVC_COMPLEX_TYPE_5_1 = 1869 -
-   - - SCHEMAV_CVC_COMPLEX_TYPE_5_2 = 1870 -
-   - - SCHEMAV_CVC_DATATYPE_VALID_1_2_1 = 1824 -
-   - - SCHEMAV_CVC_DATATYPE_VALID_1_2_2 = 1825 -
-   - - SCHEMAV_CVC_DATATYPE_VALID_1_2_3 = 1826 -
-   - - SCHEMAV_CVC_ELT_1 = 1845 -
-   - - SCHEMAV_CVC_ELT_2 = 1846 -
-   - - SCHEMAV_CVC_ELT_3_1 = 1847 -
-   - - SCHEMAV_CVC_ELT_3_2_1 = 1848 -
-   - - SCHEMAV_CVC_ELT_3_2_2 = 1849 -
-   - - SCHEMAV_CVC_ELT_4_1 = 1850 -
-   - - SCHEMAV_CVC_ELT_4_2 = 1851 -
-   - - SCHEMAV_CVC_ELT_4_3 = 1852 -
-   - - SCHEMAV_CVC_ELT_5_1_1 = 1853 -
-   - - SCHEMAV_CVC_ELT_5_1_2 = 1854 -
-   - - SCHEMAV_CVC_ELT_5_2_1 = 1855 -
-   - - SCHEMAV_CVC_ELT_5_2_2_1 = 1856 -
-   - - SCHEMAV_CVC_ELT_5_2_2_2_1 = 1857 -
-   - - SCHEMAV_CVC_ELT_5_2_2_2_2 = 1858 -
-   - - SCHEMAV_CVC_ELT_6 = 1859 -
-   - - SCHEMAV_CVC_ELT_7 = 1860 -
-   - - SCHEMAV_CVC_ENUMERATION_VALID = 1840 -
-   - - SCHEMAV_CVC_FACET_VALID = 1829 -
-   - - SCHEMAV_CVC_FRACTIONDIGITS_VALID = 1838 -
-   - - SCHEMAV_CVC_IDC = 1877 -
-   - - SCHEMAV_CVC_LENGTH_VALID = 1830 -
-   - - SCHEMAV_CVC_MAXEXCLUSIVE_VALID = 1836 -
-   - - SCHEMAV_CVC_MAXINCLUSIVE_VALID = 1834 -
-   - - SCHEMAV_CVC_MAXLENGTH_VALID = 1832 -
-   - - SCHEMAV_CVC_MINEXCLUSIVE_VALID = 1835 -
-   - - SCHEMAV_CVC_MININCLUSIVE_VALID = 1833 -
-   - - SCHEMAV_CVC_MINLENGTH_VALID = 1831 -
-   - - SCHEMAV_CVC_PATTERN_VALID = 1839 -
-   - - SCHEMAV_CVC_TOTALDIGITS_VALID = 1837 -
-   - - SCHEMAV_CVC_TYPE_1 = 1875 -
-   - - SCHEMAV_CVC_TYPE_2 = 1876 -
-   - - SCHEMAV_CVC_TYPE_3_1_1 = 1827 -
-   - - SCHEMAV_CVC_TYPE_3_1_2 = 1828 -
-   - - SCHEMAV_CVC_WILDCARD = 1878 -
-   - - SCHEMAV_DOCUMENT_ELEMENT_MISSING = 1872 -
-   - - SCHEMAV_ELEMCONT = 1810 -
-   - - SCHEMAV_ELEMENT_CONTENT = 1871 -
-   - - SCHEMAV_EXTRACONTENT = 1813 -
-   - - SCHEMAV_FACET = 1823 -
-   - - SCHEMAV_HAVEDEFAULT = 1811 -
-   - - SCHEMAV_INTERNAL = 1818 -
-   - - SCHEMAV_INVALIDATTR = 1814 -
-   - - SCHEMAV_INVALIDELEM = 1815 -
-   - - SCHEMAV_ISABSTRACT = 1808 -
-   - - SCHEMAV_MISC = 1879 -
-   - - SCHEMAV_MISSING = 1804 -
-   - - SCHEMAV_NOROLLBACK = 1807 -
-   - - SCHEMAV_NOROOT = 1801 -
-   - - SCHEMAV_NOTDETERMINIST = 1816 -
-   - - SCHEMAV_NOTEMPTY = 1809 -
-   - - SCHEMAV_NOTNILLABLE = 1812 -
-   - - SCHEMAV_NOTSIMPLE = 1819 -
-   - - SCHEMAV_NOTTOPLEVEL = 1803 -
-   - - SCHEMAV_NOTYPE = 1806 -
-   - - SCHEMAV_UNDECLAREDELEM = 1802 -
-   - - SCHEMAV_VALUE = 1822 -
-   - - SCHEMAV_WRONGELEM = 1805 -
-   - - TREE_INVALID_DEC = 1301 -
-   - - TREE_INVALID_HEX = 1300 -
-   - - TREE_NOT_UTF8 = 1303 -
-   - - TREE_UNTERMINATED_ENTITY = 1302 -
-   - - WAR_CATALOG_PI = 93 -
-   - - WAR_ENTITY_REDEFINED = 107 -
-   - - WAR_LANG_VALUE = 98 -
-   - - WAR_NS_COLUMN = 106 -
-   - - WAR_NS_URI = 99 -
-   - - WAR_NS_URI_RELATIVE = 100 -
-   - - WAR_SPACE_VALUE = 102 -
-   - - WAR_UNDECLARED_ENTITY = 27 -
-   - - WAR_UNKNOWN_VERSION = 97 -
-   - - XINCLUDE_BUILD_FAILED = 1609 -
-   - - XINCLUDE_DEPRECATED_NS = 1617 -
-   - - XINCLUDE_ENTITY_DEF_MISMATCH = 1602 -
-   - - XINCLUDE_FALLBACKS_IN_INCLUDE = 1615 -
-   - - XINCLUDE_FALLBACK_NOT_IN_INCLUDE = 1616 -
-   - - XINCLUDE_FRAGMENT_ID = 1618 -
-   - - XINCLUDE_HREF_URI = 1605 -
-   - - XINCLUDE_INCLUDE_IN_INCLUDE = 1614 -
-   - - XINCLUDE_INVALID_CHAR = 1608 -
-   - - XINCLUDE_MULTIPLE_ROOT = 1611 -
-   - - XINCLUDE_NO_FALLBACK = 1604 -
-   - - XINCLUDE_NO_HREF = 1603 -
-   - - XINCLUDE_PARSE_VALUE = 1601 -
-   - - XINCLUDE_RECURSION = 1600 -
-   - - XINCLUDE_TEXT_DOCUMENT = 1607 -
-   - - XINCLUDE_TEXT_FRAGMENT = 1606 -
-   - - XINCLUDE_UNKNOWN_ENCODING = 1610 -
-   - - XINCLUDE_XPTR_FAILED = 1612 -
-   - - XINCLUDE_XPTR_RESULT = 1613 -
-   - - XPATH_ENCODING_ERROR = 1220 -
-   - - XPATH_EXPRESSION_OK = 1200 -
-   - - XPATH_EXPR_ERROR = 1207 -
-   - - XPATH_INVALID_ARITY = 1212 -
-   - - XPATH_INVALID_CHAR_ERROR = 1221 -
-   - - XPATH_INVALID_CTXT_POSITION = 1214 -
-   - - XPATH_INVALID_CTXT_SIZE = 1213 -
-   - - XPATH_INVALID_OPERAND = 1210 -
-   - - XPATH_INVALID_PREDICATE_ERROR = 1206 -
-   - - XPATH_INVALID_TYPE = 1211 -
-   - - XPATH_MEMORY_ERROR = 1215 -
-   - - XPATH_NUMBER_ERROR = 1201 -
-   - - XPATH_START_LITERAL_ERROR = 1203 -
-   - - XPATH_UNCLOSED_ERROR = 1208 -
-   - - XPATH_UNDEF_PREFIX_ERROR = 1219 -
-   - - XPATH_UNDEF_VARIABLE_ERROR = 1205 -
-   - - XPATH_UNFINISHED_LITERAL_ERROR = 1202 -
-   - - XPATH_UNKNOWN_FUNC_ERROR = 1209 -
-   - - XPATH_VARIABLE_REF_ERROR = 1204 -
-   - - XPTR_CHILDSEQ_START = 1901 -
-   - - XPTR_EVAL_FAILED = 1902 -
-   - - XPTR_EXTRA_OBJECTS = 1903 -
-   - - XPTR_RESOURCE_ERROR = 1217 -
-   - - XPTR_SUB_RESOURCE_ERROR = 1218 -
-   - - XPTR_SYNTAX_ERROR = 1216 -
-   - - XPTR_UNKNOWN_SCHEME = 1900 -
-   - - __qualname__ = 'ErrorTypes' -
-   - - _names = {0: 'ERR_OK', 1: 'ERR_INTERNAL_ERROR', 2: 'ERR_NO_MEM... -
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

_names

- -
-
-
-
Value:
-
-{0: 'ERR_OK',
- 1: 'ERR_INTERNAL_ERROR',
- 2: 'ERR_NO_MEMORY',
- 3: 'ERR_DOCUMENT_START',
- 4: 'ERR_DOCUMENT_EMPTY',
- 5: 'ERR_DOCUMENT_END',
- 6: 'ERR_INVALID_HEX_CHARREF',
- 7: 'ERR_INVALID_DEC_CHARREF',
-...
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.FallbackElementClassLookup-class.html b/doc/html/api/lxml.etree.FallbackElementClassLookup-class.html deleted file mode 100644 index 659ebb3..0000000 --- a/doc/html/api/lxml.etree.FallbackElementClassLookup-class.html +++ /dev/null @@ -1,323 +0,0 @@ - - - - - lxml.etree.FallbackElementClassLookup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class FallbackElementClassLookup - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class FallbackElementClassLookup

-
-        object --+    
-                 |    
-ElementClassLookup --+
-                     |
-                    FallbackElementClassLookup
-
- -
Known Subclasses:
-
- -
- -
-

FallbackElementClassLookup(self, fallback=None)

-

Superclass of Element class lookups with additional fallback.

- - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - fallback=None)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
set_fallback(self, - lookup)
- Sets the fallback scheme for this lookup method.
- - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - fallback -
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - fallback=None) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.HTMLParser-class.html b/doc/html/api/lxml.etree.HTMLParser-class.html deleted file mode 100644 index f75794c..0000000 --- a/doc/html/api/lxml.etree.HTMLParser-class.html +++ /dev/null @@ -1,370 +0,0 @@ - - - - - lxml.etree.HTMLParser - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class HTMLParser - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class HTMLParser

-
-    object --+        
-             |        
-??._BaseParser --+    
-                 |    
-       _FeedParser --+
-                     |
-                    HTMLParser
-
- -
Known Subclasses:
-
- -
- -
-

HTMLParser(self, encoding=None, remove_blank_text=False, remove_comments=False, remove_pis=False, strip_cdata=True, no_network=True, target=None, schema: XMLSchema =None, recover=True, compact=True, collect_ids=True, huge_tree=False)

-

The HTML parser.

-

This parser allows reading HTML into a normal XML tree. By -default, it can read broken (non well-formed) HTML, depending on -the capabilities of libxml2. Use the 'recover' option to switch -this off.

-

Available boolean keyword arguments:

-
    -
  • recover - try hard to parse through broken HTML (default: True)
  • -
  • no_network - prevent network access for related files (default: True)
  • -
  • remove_blank_text - discard empty text nodes that are ignorable (i.e. not actual text content)
  • -
  • remove_comments - discard comments
  • -
  • remove_pis - discard processing instructions
  • -
  • strip_cdata - replace CDATA sections by normal text content (default: True)
  • -
  • compact - save memory for short text content (default: True)
  • -
  • default_doctype - add a default doctype even if it is not found in the HTML (default: True)
  • -
  • collect_ids - use a hash table of XML IDs for fast access (default: True)
  • -
  • -
    huge_tree - disable security restrictions and support very deep trees
    -
    and very long text content (only affects libxml2 2.7+)
    -
    -
  • -
-

Other keyword arguments:

-
    -
  • encoding - override the document encoding
  • -
  • target - a parser target object that will receive the parse events
  • -
  • schema - an XMLSchema to validate against
  • -
-

Note that you should avoid sharing parsers between threads for performance -reasons.

- - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - encoding=None, - remove_blank_text=False, - remove_comments=False, - remove_pis=False, - strip_cdata=True, - no_network=True, - target=None, - schema: XMLSchema=None, - recover=True, - compact=True, - collect_ids=True, - huge_tree=False)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from _FeedParser: - close, - feed -

-

Inherited from unreachable._BaseParser: - copy, - makeelement, - setElementClassLookup, - set_element_class_lookup -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from _FeedParser: - feed_error_log -

-

Inherited from unreachable._BaseParser: - error_log, - resolvers, - target, - version -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - encoding=None, - remove_blank_text=False, - remove_comments=False, - remove_pis=False, - strip_cdata=True, - no_network=True, - target=None, - schema: XMLSchema=None, - recover=True, - compact=True, - collect_ids=True, - huge_tree=False) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.HTMLPullParser-class.html b/doc/html/api/lxml.etree.HTMLPullParser-class.html deleted file mode 100644 index b1f6c1f..0000000 --- a/doc/html/api/lxml.etree.HTMLPullParser-class.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - lxml.etree.HTMLPullParser - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class HTMLPullParser - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class HTMLPullParser

-
-    object --+            
-             |            
-??._BaseParser --+        
-                 |        
-       _FeedParser --+    
-                     |    
-            HTMLParser --+
-                         |
-                        HTMLPullParser
-
- -
-

HTMLPullParser(self, events=None, *, tag=None, base_url=None, **kwargs)

-

HTML parser that collects parse events in an iterator.

-

The collected events are the same as for iterparse(), but the -parser itself is non-blocking in the sense that it receives -data chunks incrementally through its .feed() method, instead -of reading them directly from a file(-like) object all by itself.

-

By default, it collects Element end events. To change that, -pass any subset of the available events into the events -argument: 'start', 'end', 'start-ns', -'end-ns', 'comment', 'pi'.

-

To support loading external dependencies relative to the input -source, you can pass the base_url.

- - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - events=None, - tag=None, - base_url=None, - *, - **kwargs)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
read_events(...) - - -
- -
-

Inherited from _FeedParser: - close, - feed -

-

Inherited from unreachable._BaseParser: - copy, - makeelement, - setElementClassLookup, - set_element_class_lookup -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from _FeedParser: - feed_error_log -

-

Inherited from unreachable._BaseParser: - error_log, - resolvers, - target, - version -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - events=None, - tag=None, - base_url=None, - *, - **kwargs) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.LxmlError-class.html b/doc/html/api/lxml.etree.LxmlError-class.html deleted file mode 100644 index 5017331..0000000 --- a/doc/html/api/lxml.etree.LxmlError-class.html +++ /dev/null @@ -1,310 +0,0 @@ - - - - - lxml.etree.LxmlError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class LxmlError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class LxmlError

-
-              object --+            
-                       |            
-exceptions.BaseException --+        
-                           |        
-        exceptions.Exception --+    
-                               |    
-                           Error --+
-                                   |
-                                  LxmlError
-
- -
Known Subclasses:
-
- -
- -
-Main exception base class for lxml. All other exceptions inherit from -this one. - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(...)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(...) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.LxmlRegistryError-class.html b/doc/html/api/lxml.etree.LxmlRegistryError-class.html deleted file mode 100644 index c59208e..0000000 --- a/doc/html/api/lxml.etree.LxmlRegistryError-class.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - lxml.etree.LxmlRegistryError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class LxmlRegistryError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class LxmlRegistryError

-
-              object --+                
-                       |                
-exceptions.BaseException --+            
-                           |            
-        exceptions.Exception --+        
-                               |        
-                           Error --+    
-                                   |    
-                           LxmlError --+
-                                       |
-                                      LxmlRegistryError
-
- -
Known Subclasses:
-
- -
- -
-Base class of lxml registry errors. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.LxmlSyntaxError-class.html b/doc/html/api/lxml.etree.LxmlSyntaxError-class.html deleted file mode 100644 index bec193c..0000000 --- a/doc/html/api/lxml.etree.LxmlSyntaxError-class.html +++ /dev/null @@ -1,258 +0,0 @@ - - - - - lxml.etree.LxmlSyntaxError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class LxmlSyntaxError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class LxmlSyntaxError

-
-              object --+                
-                       |                
-exceptions.BaseException --+            
-                           |            
-        exceptions.Exception --+        
-                               |        
-                           Error --+    
-                                   |    
-                           LxmlError --+
-                                       |
-              object --+               |
-                       |               |
-exceptions.BaseException --+           |
-                           |           |
-        exceptions.Exception --+       |
-                               |       |
-        exceptions.StandardError --+   |
-                                   |   |
-              exceptions.SyntaxError --+
-                                       |
-                                      LxmlSyntaxError
-
- -
Known Subclasses:
-
- -
- -
-Base class for all syntax errors. - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from LxmlError: - __init__, - __new__ -

-

Inherited from exceptions.SyntaxError: - __str__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - __qualname__ = 'LxmlSyntaxError' -
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.SyntaxError: - filename, - lineno, - msg, - offset, - print_file_and_line, - text -

-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.NamespaceRegistryError-class.html b/doc/html/api/lxml.etree.NamespaceRegistryError-class.html deleted file mode 100644 index 3571a35..0000000 --- a/doc/html/api/lxml.etree.NamespaceRegistryError-class.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - lxml.etree.NamespaceRegistryError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class NamespaceRegistryError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class NamespaceRegistryError

-
-              object --+                    
-                       |                    
-exceptions.BaseException --+                
-                           |                
-        exceptions.Exception --+            
-                               |            
-                           Error --+        
-                                   |        
-                           LxmlError --+    
-                                       |    
-                       LxmlRegistryError --+
-                                           |
-                                          NamespaceRegistryError
-
- -
-Error registering a namespace extension. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.PIBase-class.html b/doc/html/api/lxml.etree.PIBase-class.html deleted file mode 100644 index 4d6c8d8..0000000 --- a/doc/html/api/lxml.etree.PIBase-class.html +++ /dev/null @@ -1,374 +0,0 @@ - - - - - lxml.etree.PIBase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class PIBase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class PIBase

-
-         object --+            
-                  |            
-           _Element --+        
-                      |        
-??.__ContentOnlyElement --+    
-                          |    
-     _ProcessingInstruction --+
-                              |
-                             PIBase
-
- -
Known Subclasses:
-
- -
- -
-

All custom Processing Instruction classes must inherit from this one.

-

To create an XML ProcessingInstruction instance, use the PI() -factory.

-

Subclasses must not override __init__ or __new__ as it is -absolutely undefined when these objects will be created or -destroyed. All persistent state of PIs must be stored in the -underlying XML. If you really need to initialize the object after -creation, you can implement an _init(self) method that will be -called after object creation.

- - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(...)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from _ProcessingInstruction: - __repr__, - get -

-

Inherited from unreachable.__ContentOnlyElement: - __delitem__, - __getitem__, - __len__, - __setitem__, - append, - insert, - items, - keys, - set, - values -

-

Inherited from _Element: - __contains__, - __copy__, - __deepcopy__, - __iter__, - __nonzero__, - __reversed__, - addnext, - addprevious, - clear, - cssselect, - extend, - find, - findall, - findtext, - getchildren, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - makeelement, - remove, - replace, - xpath -

-

Inherited from _Element (private): - _init -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from _ProcessingInstruction: - attrib, - tag, - target -

-

Inherited from unreachable.__ContentOnlyElement: - text -

-

Inherited from _Element: - base, - nsmap, - prefix, - sourceline, - tail -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(...) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.ParseError-class.html b/doc/html/api/lxml.etree.ParseError-class.html deleted file mode 100644 index 4df0217..0000000 --- a/doc/html/api/lxml.etree.ParseError-class.html +++ /dev/null @@ -1,363 +0,0 @@ - - - - - lxml.etree.ParseError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class ParseError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ParseError

-
-              object --+                    
-                       |                    
-exceptions.BaseException --+                
-                           |                
-        exceptions.Exception --+            
-                               |            
-                           Error --+        
-                                   |        
-                           LxmlError --+    
-                                       |    
-              object --+               |    
-                       |               |    
-exceptions.BaseException --+           |    
-                           |           |    
-        exceptions.Exception --+       |    
-                               |       |    
-        exceptions.StandardError --+   |    
-                                   |   |    
-              exceptions.SyntaxError --+    
-                                       |    
-                         LxmlSyntaxError --+
-                                           |
-                                          ParseError
-
- -
Known Subclasses:
-
- -
- -
-

Syntax error while parsing an XML document.

-

For compatibility with ElementTree 1.3 and later.

- - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(...)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
-

Inherited from LxmlError: - __new__ -

-

Inherited from exceptions.SyntaxError: - __str__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - __qualname__ = 'ParseError' -
- - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - position -
-

Inherited from exceptions.SyntaxError: - filename, - lineno, - msg, - offset, - print_file_and_line, - text -

-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(...) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
-
- - - - - - -
- - - - - -
Property Details[hide private]
-
- -
- -
-

position

- -
-
Get Method:
-
unreachable.position(...) -
-
Set Method:
-
unreachable.position(...) -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.ParserBasedElementClassLookup-class.html b/doc/html/api/lxml.etree.ParserBasedElementClassLookup-class.html deleted file mode 100644 index f631e78..0000000 --- a/doc/html/api/lxml.etree.ParserBasedElementClassLookup-class.html +++ /dev/null @@ -1,259 +0,0 @@ - - - - - lxml.etree.ParserBasedElementClassLookup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class ParserBasedElementClassLookup - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ParserBasedElementClassLookup

-
-            object --+        
-                     |        
-    ElementClassLookup --+    
-                         |    
-FallbackElementClassLookup --+
-                             |
-                            ParserBasedElementClassLookup
-
- -
-ParserBasedElementClassLookup(self, fallback=None) -Element class lookup based on the XML parser. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from FallbackElementClassLookup: - __init__, - set_fallback -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from FallbackElementClassLookup: - fallback -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.ParserError-class.html b/doc/html/api/lxml.etree.ParserError-class.html deleted file mode 100644 index 5c4157a..0000000 --- a/doc/html/api/lxml.etree.ParserError-class.html +++ /dev/null @@ -1,268 +0,0 @@ - - - - - lxml.etree.ParserError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class ParserError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ParserError

-
-              object --+                
-                       |                
-exceptions.BaseException --+            
-                           |            
-        exceptions.Exception --+        
-                               |        
-                           Error --+    
-                                   |    
-                           LxmlError --+
-                                       |
-                                      ParserError
-
- -
-Internal lxml parser error. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.PyErrorLog-class.html b/doc/html/api/lxml.etree.PyErrorLog-class.html deleted file mode 100644 index c3437fc..0000000 --- a/doc/html/api/lxml.etree.PyErrorLog-class.html +++ /dev/null @@ -1,456 +0,0 @@ - - - - - lxml.etree.PyErrorLog - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class PyErrorLog - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class PyErrorLog

-
-   object --+    
-            |    
-_BaseErrorLog --+
-                |
-               PyErrorLog
-
- -
-

PyErrorLog(self, logger_name=None, logger=None) -A global error log that connects to the Python stdlib logging package.

-

The constructor accepts an optional logger name or a readily -instantiated logger instance.

-

If you want to change the mapping between libxml2's ErrorLevels and Python -logging levels, you can modify the level_map dictionary from a subclass.

-

The default mapping is:

-
-ErrorLevels.WARNING = logging.WARNING
-ErrorLevels.ERROR   = logging.ERROR
-ErrorLevels.FATAL   = logging.CRITICAL
-
-

You can also override the method receive() that takes a LogEntry -object and calls self.log(log_entry, format_string, arg1, arg2, ...) -with appropriate data.

- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - logger_name=None, - logger=None)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
copy(...)
- Dummy method that returns an empty error log.
- - -
- -
-   - - - - - - -
log(self, - log_entry, - message, - *args)
- Called by the .receive() method to log a _LogEntry instance to -the Python logging system. This handles the error level -mapping.
- - -
- -
-   - - - - - - -
receive(self, - log_entry)
- Receive a _LogEntry instance from the logging system. Calls -the .log() method with appropriate parameters:
- - -
- -
-

Inherited from _BaseErrorLog: - __repr__ -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - level_map -
-

Inherited from _BaseErrorLog: - last_error -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - logger_name=None, - logger=None) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

copy(...) -

-
  -
- - Dummy method that returns an empty error log. -
-
Overrides: - _BaseErrorLog.copy -
-
-
-
- -
- -
- - -
-

log(self, - log_entry, - message, - *args) -

-
  -
- -

Called by the .receive() method to log a _LogEntry instance to -the Python logging system. This handles the error level -mapping.

-

In the default implementation, the message argument -receives a complete log line, and there are no further -args. To change the message format, it is best to -override the .receive() method instead of this one.

-
-
-
-
- -
- -
- - -
-

receive(self, - log_entry) -

-
  -
- -

Receive a _LogEntry instance from the logging system. Calls -the .log() method with appropriate parameters:

-
-self.log(log_entry, repr(log_entry))
-
-

You can override this method to provide your own log output -format.

-
-
Overrides: - _BaseErrorLog.receive -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.PythonElementClassLookup-class.html b/doc/html/api/lxml.etree.PythonElementClassLookup-class.html deleted file mode 100644 index 1c53e17..0000000 --- a/doc/html/api/lxml.etree.PythonElementClassLookup-class.html +++ /dev/null @@ -1,312 +0,0 @@ - - - - - lxml.etree.PythonElementClassLookup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class PythonElementClassLookup - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class PythonElementClassLookup

-
-            object --+        
-                     |        
-    ElementClassLookup --+    
-                         |    
-FallbackElementClassLookup --+
-                             |
-                            PythonElementClassLookup
-
- -
-

PythonElementClassLookup(self, fallback=None) -Element class lookup based on a subclass method.

-

This class lookup scheme allows access to the entire XML tree in -read-only mode. To use it, re-implement the lookup(self, doc, -root) method in a subclass:

-
-from lxml import etree, pyclasslookup
-
-class MyElementClass(etree.ElementBase):
-    honkey = True
-
-class MyLookup(pyclasslookup.PythonElementClassLookup):
-    def lookup(self, doc, root):
-        if root.tag == "sometag":
-            return MyElementClass
-        else:
-            for child in root:
-                if child.tag == "someothertag":
-                    return MyElementClass
-        # delegate to default
-        return None
-
-

If you return None from this method, the fallback will be called.

-

The first argument is the opaque document instance that contains -the Element. The second argument is a lightweight Element proxy -implementation that is only valid during the lookup. Do not try -to keep a reference to it. Once the lookup is done, the proxy -will be invalid.

-

Also, you cannot wrap such a read-only Element in an ElementTree, -and you must take care not to keep a reference to them outside of -the lookup() method.

-

Note that the API of the Element objects is not complete. It is -purely read-only and does not support all features of the normal -lxml.etree API (such as XPath, extended slicing or some -iteration methods).

-

See http://codespeak.net/lxml/element_classes.html

- - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
lookup(self, - doc, - element)
- Override this method to implement your own lookup scheme.
- - -
- -
-

Inherited from FallbackElementClassLookup: - __init__, - set_fallback -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from FallbackElementClassLookup: - fallback -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.QName-class.html b/doc/html/api/lxml.etree.QName-class.html deleted file mode 100644 index d96849e..0000000 --- a/doc/html/api/lxml.etree.QName-class.html +++ /dev/null @@ -1,510 +0,0 @@ - - - - - lxml.etree.QName - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class QName - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class QName

-
-object --+
-         |
-        QName
-
- -
-

QName(text_or_uri_or_element, tag=None)

-

QName wrapper for qualified XML names.

-

Pass a tag name by itself or a namespace URI and a tag name to -create a qualified name. Alternatively, pass an Element to -extract its tag name. None as first argument is ignored in -order to allow for generic 2-argument usage.

-

The text property holds the qualified name in -{namespace}tagname notation. The namespace and -localname properties hold the respective parts of the tag -name.

-

You can pass QName objects wherever a tag name is expected. Also, -setting Element text from a QName will resolve the namespace prefix -on assignment and set a qualified text value. This is helpful in XML -languages like SOAP or XML-Schema that use prefixed tag names in -their text content.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__eq__(x, - y)
- x==y
- - -
- -
-   - - - - - - -
__ge__(x, - y)
- x>=y
- - -
- -
-   - - - - - - -
__gt__(x, - y)
- x>y
- - -
- -
-   - - - - - - -
__hash__(x)
- hash(x)
- - -
- -
-   - - - - - - -
__init__(text_or_uri_or_element, - tag=None)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
-   - - - - - - -
__le__(x, - y)
- x<=y
- - -
- -
-   - - - - - - -
__lt__(x, - y)
- x<y
- - -
- -
-   - - - - - - -
__ne__(x, - y)
- x!=y
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__str__(x)
- str(x)
- - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - localname -
-   - - namespace -
-   - - text -
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__hash__(x) -
(Hashing function) -

-
  -
- - hash(x) -
-
Overrides: - object.__hash__ -
-
-
-
- -
- -
- - -
-

__init__(text_or_uri_or_element, - tag=None) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

__str__(x) -
(Informal representation operator) -

-
  -
- - str(x) -
-
Overrides: - object.__str__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.RelaxNG-class.html b/doc/html/api/lxml.etree.RelaxNG-class.html deleted file mode 100644 index 2431bfb..0000000 --- a/doc/html/api/lxml.etree.RelaxNG-class.html +++ /dev/null @@ -1,406 +0,0 @@ - - - - - lxml.etree.RelaxNG - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class RelaxNG - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class RelaxNG

-
-object --+    
-         |    
-_Validator --+
-             |
-            RelaxNG
-
- -
-

RelaxNG(self, etree=None, file=None) -Turn a document into a Relax NG validator.

-

Either pass a schema as Element or ElementTree, or pass a file or -filename through the file keyword argument.

- - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__call__(self, - etree)
- Validate doc using Relax NG.
- - -
- -
-   - - - - - - -
__init__(self, - etree=None, - file=None)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from _Validator: - assertValid, - assert_, - validate -

-

Inherited from _Validator (private): - _append_log_message, - _clear_error_log -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-   - - - - - - -
from_rnc_string(...)
- Parse a RelaxNG schema in compact syntax from a text string
- - -
- -
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from _Validator: - error_log -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__call__(self, - etree) -
(Call operator) -

-
  -
- -

Validate doc using Relax NG.

-

Returns true if document is valid, false if not.

-
-
-
-
- -
- -
- - -
-

__init__(self, - etree=None, - file=None) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

from_rnc_string(...) -
Class Method -

-
  -
- -

Parse a RelaxNG schema in compact syntax from a text string

-

Requires the rnc2rng package to be installed.

-

Passing the source URL or file path of the source as 'base_url' -will enable resolving resource references relative to the source.

-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.RelaxNGError-class.html b/doc/html/api/lxml.etree.RelaxNGError-class.html deleted file mode 100644 index 1839811..0000000 --- a/doc/html/api/lxml.etree.RelaxNGError-class.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - lxml.etree.RelaxNGError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class RelaxNGError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class RelaxNGError

-
-              object --+                
-                       |                
-exceptions.BaseException --+            
-                           |            
-        exceptions.Exception --+        
-                               |        
-                           Error --+    
-                                   |    
-                           LxmlError --+
-                                       |
-                                      RelaxNGError
-
- -
Known Subclasses:
-
- -
- -
-Base class for RelaxNG errors. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.RelaxNGErrorTypes-class.html b/doc/html/api/lxml.etree.RelaxNGErrorTypes-class.html deleted file mode 100644 index 493aef8..0000000 --- a/doc/html/api/lxml.etree.RelaxNGErrorTypes-class.html +++ /dev/null @@ -1,571 +0,0 @@ - - - - - lxml.etree.RelaxNGErrorTypes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class RelaxNGErrorTypes - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class RelaxNGErrorTypes

-
-object --+
-         |
-        RelaxNGErrorTypes
-
- -
-Libxml2 RelaxNG error types - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- D[k] if k in D, else d - - - - - - -
_getName(D, - k, - d=...)
- d defaults to None.
- - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - RELAXNG_ERR_ATTREXTRANS = 20 -
-   - - RELAXNG_ERR_ATTRNAME = 14 -
-   - - RELAXNG_ERR_ATTRNONS = 16 -
-   - - RELAXNG_ERR_ATTRVALID = 24 -
-   - - RELAXNG_ERR_ATTRWRONGNS = 18 -
-   - - RELAXNG_ERR_CONTENTVALID = 25 -
-   - - RELAXNG_ERR_DATAELEM = 28 -
-   - - RELAXNG_ERR_DATATYPE = 31 -
-   - - RELAXNG_ERR_DUPID = 4 -
-   - - RELAXNG_ERR_ELEMEXTRANS = 19 -
-   - - RELAXNG_ERR_ELEMNAME = 13 -
-   - - RELAXNG_ERR_ELEMNONS = 15 -
-   - - RELAXNG_ERR_ELEMNOTEMPTY = 21 -
-   - - RELAXNG_ERR_ELEMWRONG = 38 -
-   - - RELAXNG_ERR_ELEMWRONGNS = 17 -
-   - - RELAXNG_ERR_EXTRACONTENT = 26 -
-   - - RELAXNG_ERR_EXTRADATA = 35 -
-   - - RELAXNG_ERR_INTEREXTRA = 12 -
-   - - RELAXNG_ERR_INTERNAL = 37 -
-   - - RELAXNG_ERR_INTERNODATA = 10 -
-   - - RELAXNG_ERR_INTERSEQ = 11 -
-   - - RELAXNG_ERR_INVALIDATTR = 27 -
-   - - RELAXNG_ERR_LACKDATA = 36 -
-   - - RELAXNG_ERR_LIST = 33 -
-   - - RELAXNG_ERR_LISTELEM = 30 -
-   - - RELAXNG_ERR_LISTEMPTY = 9 -
-   - - RELAXNG_ERR_LISTEXTRA = 8 -
-   - - RELAXNG_ERR_MEMORY = 1 -
-   - - RELAXNG_ERR_NODEFINE = 7 -
-   - - RELAXNG_ERR_NOELEM = 22 -
-   - - RELAXNG_ERR_NOGRAMMAR = 34 -
-   - - RELAXNG_ERR_NOSTATE = 6 -
-   - - RELAXNG_ERR_NOTELEM = 23 -
-   - - RELAXNG_ERR_TEXTWRONG = 39 -
-   - - RELAXNG_ERR_TYPE = 2 -
-   - - RELAXNG_ERR_TYPECMP = 5 -
-   - - RELAXNG_ERR_TYPEVAL = 3 -
-   - - RELAXNG_ERR_VALELEM = 29 -
-   - - RELAXNG_ERR_VALUE = 32 -
-   - - RELAXNG_OK = 0 -
-   - - __qualname__ = 'RelaxNGErrorTypes' -
-   - - _names = {0: 'RELAXNG_OK', 1: 'RELAXNG_ERR_MEMORY', 2: 'RELAXN... -
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

_names

- -
-
-
-
Value:
-
-{0: 'RELAXNG_OK',
- 1: 'RELAXNG_ERR_MEMORY',
- 2: 'RELAXNG_ERR_TYPE',
- 3: 'RELAXNG_ERR_TYPEVAL',
- 4: 'RELAXNG_ERR_DUPID',
- 5: 'RELAXNG_ERR_TYPECMP',
- 6: 'RELAXNG_ERR_NOSTATE',
- 7: 'RELAXNG_ERR_NODEFINE',
-...
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.RelaxNGParseError-class.html b/doc/html/api/lxml.etree.RelaxNGParseError-class.html deleted file mode 100644 index 844195f..0000000 --- a/doc/html/api/lxml.etree.RelaxNGParseError-class.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - lxml.etree.RelaxNGParseError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class RelaxNGParseError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class RelaxNGParseError

-
-              object --+                    
-                       |                    
-exceptions.BaseException --+                
-                           |                
-        exceptions.Exception --+            
-                               |            
-                           Error --+        
-                                   |        
-                           LxmlError --+    
-                                       |    
-                            RelaxNGError --+
-                                           |
-                                          RelaxNGParseError
-
- -
-Error while parsing an XML document as RelaxNG. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.RelaxNGValidateError-class.html b/doc/html/api/lxml.etree.RelaxNGValidateError-class.html deleted file mode 100644 index 5b4d6a5..0000000 --- a/doc/html/api/lxml.etree.RelaxNGValidateError-class.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - lxml.etree.RelaxNGValidateError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class RelaxNGValidateError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class RelaxNGValidateError

-
-              object --+                    
-                       |                    
-exceptions.BaseException --+                
-                           |                
-        exceptions.Exception --+            
-                               |            
-                           Error --+        
-                                   |        
-                           LxmlError --+    
-                                       |    
-                            RelaxNGError --+
-                                           |
-                                          RelaxNGValidateError
-
- -
-Error while validating an XML document with a RelaxNG schema. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.Resolver-class.html b/doc/html/api/lxml.etree.Resolver-class.html deleted file mode 100644 index fc3d003..0000000 --- a/doc/html/api/lxml.etree.Resolver-class.html +++ /dev/null @@ -1,477 +0,0 @@ - - - - - lxml.etree.Resolver - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class Resolver - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class Resolver

-
-object --+
-         |
-        Resolver
-
- -
Known Subclasses:
-
- -
- -
-This is the base class of all resolvers. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
resolve(self, - system_url, - public_id, - context)
- Override this method to resolve an external source by -system_url and public_id. The third argument is an -opaque context object.
- - -
- -
-   - - - - - - -
resolve_empty(self, - context)
- Return an empty input document.
- - -
- -
-   - - - - - - -
resolve_file(self, - f, - context, - base_url=None, - close=True)
- Return an open file-like object as input document.
- - -
- -
-   - - - - - - -
resolve_filename(self, - filename, - context)
- Return the name of a parsable file as input document.
- - -
- -
-   - - - - - - -
resolve_string(self, - string, - context, - base_url=None)
- Return a parsable string as input document.
- - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

resolve(self, - system_url, - public_id, - context) -

-
  -
- -

Override this method to resolve an external source by -system_url and public_id. The third argument is an -opaque context object.

-

Return the result of one of the resolve_*() methods.

-
-
-
-
- -
- -
- - -
-

resolve_empty(self, - context) -

-
  -
- -

Return an empty input document.

-

Pass context as parameter.

-
-
-
-
- -
- -
- - -
-

resolve_file(self, - f, - context, - base_url=None, - close=True) -

-
  -
- -

Return an open file-like object as input document.

-

Pass open file and context as parameters. You can pass the -base URL or filename of the file through the base_url -keyword argument. If the close flag is True (the -default), the file will be closed after reading.

-

Note that using .resolve_filename() is more efficient, -especially in threaded environments.

-
-
-
-
- -
- -
- - -
-

resolve_filename(self, - filename, - context) -

-
  -
- -

Return the name of a parsable file as input document.

-

Pass filename and context as parameters. You can also pass a -URL with an HTTP, FTP or file target.

-
-
-
-
- -
- -
- - -
-

resolve_string(self, - string, - context, - base_url=None) -

-
  -
- -

Return a parsable string as input document.

-

Pass data string and context as parameters. You can pass the -source URL or filename through the base_url keyword -argument.

-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.Schematron-class.html b/doc/html/api/lxml.etree.Schematron-class.html deleted file mode 100644 index 5d9acd1..0000000 --- a/doc/html/api/lxml.etree.Schematron-class.html +++ /dev/null @@ -1,389 +0,0 @@ - - - - - lxml.etree.Schematron - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class Schematron - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class Schematron

-
-object --+    
-         |    
-_Validator --+
-             |
-            Schematron
-
- -
-

Schematron(self, etree=None, file=None) -A Schematron validator.

-

Pass a root Element or an ElementTree to turn it into a validator. -Alternatively, pass a filename as keyword argument 'file' to parse from -the file system.

-

Schematron is a less well known, but very powerful schema language. The main -idea is to use the capabilities of XPath to put restrictions on the structure -and the content of XML documents. Here is a simple example:

-
->>> schematron = Schematron(XML('''
-... <schema xmlns="http://www.ascc.net/xml/schematron" >
-...   <pattern name="id is the only permited attribute name">
-...     <rule context="*">
-...       <report test="@*[not(name()='id')]">Attribute
-...         <name path="@*[not(name()='id')]"/> is forbidden<name/>
-...       </report>
-...     </rule>
-...   </pattern>
-... </schema>
-... '''))
-
->>> xml = XML('''
-... <AAA name="aaa">
-...   <BBB id="bbb"/>
-...   <CCC color="ccc"/>
-... </AAA>
-... ''')
-
->>> schematron.validate(xml)
-0
-
->>> xml = XML('''
-... <AAA id="aaa">
-...   <BBB id="bbb"/>
-...   <CCC/>
-... </AAA>
-... ''')
-
->>> schematron.validate(xml)
-1
-
-

Schematron was added to libxml2 in version 2.6.21. Before version 2.6.32, -however, Schematron lacked support for error reporting other than to stderr. -This version is therefore required to retrieve validation warnings and -errors in lxml.

- - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__call__(self, - etree)
- Validate doc using Schematron.
- - -
- -
-   - - - - - - -
__init__(self, - etree=None, - file=None)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from _Validator: - assertValid, - assert_, - validate -

-

Inherited from _Validator (private): - _append_log_message, - _clear_error_log -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from _Validator: - error_log -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__call__(self, - etree) -
(Call operator) -

-
  -
- -

Validate doc using Schematron.

-

Returns true if document is valid, false if not.

-
-
-
-
- -
- -
- - -
-

__init__(self, - etree=None, - file=None) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.SchematronError-class.html b/doc/html/api/lxml.etree.SchematronError-class.html deleted file mode 100644 index a089620..0000000 --- a/doc/html/api/lxml.etree.SchematronError-class.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - lxml.etree.SchematronError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class SchematronError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class SchematronError

-
-              object --+                
-                       |                
-exceptions.BaseException --+            
-                           |            
-        exceptions.Exception --+        
-                               |        
-                           Error --+    
-                                   |    
-                           LxmlError --+
-                                       |
-                                      SchematronError
-
- -
Known Subclasses:
-
- -
- -
-Base class of all Schematron errors. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.SchematronParseError-class.html b/doc/html/api/lxml.etree.SchematronParseError-class.html deleted file mode 100644 index 82459a2..0000000 --- a/doc/html/api/lxml.etree.SchematronParseError-class.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - lxml.etree.SchematronParseError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class SchematronParseError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class SchematronParseError

-
-              object --+                    
-                       |                    
-exceptions.BaseException --+                
-                           |                
-        exceptions.Exception --+            
-                               |            
-                           Error --+        
-                                   |        
-                           LxmlError --+    
-                                       |    
-                         SchematronError --+
-                                           |
-                                          SchematronParseError
-
- -
-Error while parsing an XML document as Schematron schema. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.SchematronValidateError-class.html b/doc/html/api/lxml.etree.SchematronValidateError-class.html deleted file mode 100644 index 8af7a9a..0000000 --- a/doc/html/api/lxml.etree.SchematronValidateError-class.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - lxml.etree.SchematronValidateError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class SchematronValidateError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class SchematronValidateError

-
-              object --+                    
-                       |                    
-exceptions.BaseException --+                
-                           |                
-        exceptions.Exception --+            
-                               |            
-                           Error --+        
-                                   |        
-                           LxmlError --+    
-                                       |    
-                         SchematronError --+
-                                           |
-                                          SchematronValidateError
-
- -
-Error while validating an XML document with a Schematron schema. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.SerialisationError-class.html b/doc/html/api/lxml.etree.SerialisationError-class.html deleted file mode 100644 index 6fafe3b..0000000 --- a/doc/html/api/lxml.etree.SerialisationError-class.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - lxml.etree.SerialisationError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class SerialisationError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class SerialisationError

-
-              object --+                
-                       |                
-exceptions.BaseException --+            
-                           |            
-        exceptions.Exception --+        
-                               |        
-                           Error --+    
-                                   |    
-                           LxmlError --+
-                                       |
-                                      SerialisationError
-
- -
Known Subclasses:
-
- -
- -
-A libxml2 error that occurred during serialisation. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.SiblingsIterator-class.html b/doc/html/api/lxml.etree.SiblingsIterator-class.html deleted file mode 100644 index 0af260b..0000000 --- a/doc/html/api/lxml.etree.SiblingsIterator-class.html +++ /dev/null @@ -1,257 +0,0 @@ - - - - - lxml.etree.SiblingsIterator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class SiblingsIterator - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class SiblingsIterator

-
-           object --+    
-                    |    
-_ElementMatchIterator --+
-                        |
-                       SiblingsIterator
-
- -
-

SiblingsIterator(self, node, tag=None, preceding=False) -Iterates over the siblings of an element.

-

You can pass the boolean keyword preceding to specify the direction.

- - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from _ElementMatchIterator: - __iter__, - __next__, - next -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.TreeBuilder-class.html b/doc/html/api/lxml.etree.TreeBuilder-class.html deleted file mode 100644 index 6f0bb1d..0000000 --- a/doc/html/api/lxml.etree.TreeBuilder-class.html +++ /dev/null @@ -1,405 +0,0 @@ - - - - - lxml.etree.TreeBuilder - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class TreeBuilder - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class TreeBuilder

-
-      object --+    
-               |    
-_SaxParserTarget --+
-                   |
-                  TreeBuilder
-
- -
-

TreeBuilder(self, element_factory=None, parser=None) -Parser target that builds a tree.

-

The final tree is returned by the close() method.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - element_factory=None, - parser=None)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
close(self)
- Flushes the builder buffers, and returns the toplevel document -element.
- - -
- -
-   - - - - - - -
comment(self, - comment) - - -
- -
-   - - - - - - -
data(self, - data)
- Adds text to the current element. The value should be either an -8-bit string containing ASCII text, or a Unicode string.
- - -
- -
-   - - - - - - -
end(self, - tag)
- Closes the current element.
- - -
- -
-   - - - - - - -
pi(self, - target, - data) - - -
- -
-   - - - - - - -
start(self, - tag, - attrs, - nsmap=None)
- Opens a new element.
- - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - element_factory=None, - parser=None) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.XInclude-class.html b/doc/html/api/lxml.etree.XInclude-class.html deleted file mode 100644 index 2715f28..0000000 --- a/doc/html/api/lxml.etree.XInclude-class.html +++ /dev/null @@ -1,314 +0,0 @@ - - - - - lxml.etree.XInclude - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class XInclude - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XInclude

-
-object --+
-         |
-        XInclude
-
- -
-

XInclude(self) -XInclude processor.

-

Create an instance and call it on an Element to run XInclude -processing.

- - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__call__(self, - node) - - -
- -
-   - - - - - - -
__init__(self)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - error_log -
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.XIncludeError-class.html b/doc/html/api/lxml.etree.XIncludeError-class.html deleted file mode 100644 index f3fc338..0000000 --- a/doc/html/api/lxml.etree.XIncludeError-class.html +++ /dev/null @@ -1,268 +0,0 @@ - - - - - lxml.etree.XIncludeError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class XIncludeError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XIncludeError

-
-              object --+                
-                       |                
-exceptions.BaseException --+            
-                           |            
-        exceptions.Exception --+        
-                               |        
-                           Error --+    
-                                   |    
-                           LxmlError --+
-                                       |
-                                      XIncludeError
-
- -
-Error during XInclude processing. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.XMLParser-class.html b/doc/html/api/lxml.etree.XMLParser-class.html deleted file mode 100644 index ae1bd0c..0000000 --- a/doc/html/api/lxml.etree.XMLParser-class.html +++ /dev/null @@ -1,391 +0,0 @@ - - - - - lxml.etree.XMLParser - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class XMLParser - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XMLParser

-
-    object --+        
-             |        
-??._BaseParser --+    
-                 |    
-       _FeedParser --+
-                     |
-                    XMLParser
-
- -
Known Subclasses:
-
- -
- -
-

XMLParser(self, encoding=None, attribute_defaults=False, dtd_validation=False, load_dtd=False, no_network=True, ns_clean=False, recover=False, schema: XMLSchema =None, huge_tree=False, remove_blank_text=False, resolve_entities=True, remove_comments=False, remove_pis=False, strip_cdata=True, collect_ids=True, target=None, compact=True)

-

The XML parser.

-

Parsers can be supplied as additional argument to various parse -functions of the lxml API. A default parser is always available -and can be replaced by a call to the global function -'set_default_parser'. New parsers can be created at any time -without a major run-time overhead.

-

The keyword arguments in the constructor are mainly based on the -libxml2 parser configuration. A DTD will also be loaded if DTD -validation or attribute default values are requested (unless you -additionally provide an XMLSchema from which the default -attributes can be read).

-

Available boolean keyword arguments:

-
    -
  • attribute_defaults - inject default attributes from DTD or XMLSchema
  • -
  • dtd_validation - validate against a DTD referenced by the document
  • -
  • load_dtd - use DTD for parsing
  • -
  • no_network - prevent network access for related files (default: True)
  • -
  • ns_clean - clean up redundant namespace declarations
  • -
  • recover - try hard to parse through broken XML
  • -
  • remove_blank_text - discard blank text nodes that appear ignorable
  • -
  • remove_comments - discard comments
  • -
  • remove_pis - discard processing instructions
  • -
  • strip_cdata - replace CDATA sections by normal text content (default: True)
  • -
  • compact - save memory for short text content (default: True)
  • -
  • collect_ids - use a hash table of XML IDs for fast access (default: True, always True with DTD validation)
  • -
  • resolve_entities - replace entities by their text value (default: True)
  • -
  • -
    huge_tree - disable security restrictions and support very deep trees
    -
    and very long text content (only affects libxml2 2.7+)
    -
    -
  • -
-

Other keyword arguments:

-
    -
  • encoding - override the document encoding
  • -
  • target - a parser target object that will receive the parse events
  • -
  • schema - an XMLSchema to validate against
  • -
-

Note that you should avoid sharing parsers between threads. While this is -not harmful, it is more efficient to use separate parsers. This does not -apply to the default parser.

- - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - encoding=None, - attribute_defaults=False, - dtd_validation=False, - load_dtd=False, - no_network=True, - ns_clean=False, - recover=False, - schema: XMLSchema=None, - huge_tree=False, - remove_blank_text=False, - resolve_entities=True, - remove_comments=False, - remove_pis=False, - strip_cdata=True, - collect_ids=True, - target=None, - compact=True)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from _FeedParser: - close, - feed -

-

Inherited from unreachable._BaseParser: - copy, - makeelement, - setElementClassLookup, - set_element_class_lookup -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from _FeedParser: - feed_error_log -

-

Inherited from unreachable._BaseParser: - error_log, - resolvers, - target, - version -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - encoding=None, - attribute_defaults=False, - dtd_validation=False, - load_dtd=False, - no_network=True, - ns_clean=False, - recover=False, - schema: XMLSchema=None, - huge_tree=False, - remove_blank_text=False, - resolve_entities=True, - remove_comments=False, - remove_pis=False, - strip_cdata=True, - collect_ids=True, - target=None, - compact=True) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.XMLPullParser-class.html b/doc/html/api/lxml.etree.XMLPullParser-class.html deleted file mode 100644 index 5fff1d2..0000000 --- a/doc/html/api/lxml.etree.XMLPullParser-class.html +++ /dev/null @@ -1,347 +0,0 @@ - - - - - lxml.etree.XMLPullParser - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class XMLPullParser - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XMLPullParser

-
-    object --+            
-             |            
-??._BaseParser --+        
-                 |        
-       _FeedParser --+    
-                     |    
-             XMLParser --+
-                         |
-                        XMLPullParser
-
- -
-

XMLPullParser(self, events=None, *, tag=None, **kwargs)

-

XML parser that collects parse events in an iterator.

-

The collected events are the same as for iterparse(), but the -parser itself is non-blocking in the sense that it receives -data chunks incrementally through its .feed() method, instead -of reading them directly from a file(-like) object all by itself.

-

By default, it collects Element end events. To change that, -pass any subset of the available events into the events -argument: 'start', 'end', 'start-ns', -'end-ns', 'comment', 'pi'.

-

To support loading external dependencies relative to the input -source, you can pass the base_url.

- - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - events=None, - tag=None, - *, - **kwargs)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
read_events(...) - - -
- -
-

Inherited from _FeedParser: - close, - feed -

-

Inherited from unreachable._BaseParser: - copy, - makeelement, - setElementClassLookup, - set_element_class_lookup -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from _FeedParser: - feed_error_log -

-

Inherited from unreachable._BaseParser: - error_log, - resolvers, - target, - version -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - events=None, - tag=None, - *, - **kwargs) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.XMLSchema-class.html b/doc/html/api/lxml.etree.XMLSchema-class.html deleted file mode 100644 index 7db3d73..0000000 --- a/doc/html/api/lxml.etree.XMLSchema-class.html +++ /dev/null @@ -1,350 +0,0 @@ - - - - - lxml.etree.XMLSchema - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class XMLSchema - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XMLSchema

-
-object --+    
-         |    
-_Validator --+
-             |
-            XMLSchema
-
- -
-

XMLSchema(self, etree=None, file=None) -Turn a document into an XML Schema validator.

-

Either pass a schema as Element or ElementTree, or pass a file or -filename through the file keyword argument.

-

Passing the attribute_defaults boolean option will make the -schema insert default/fixed attributes into validated documents.

- - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__call__(self, - etree)
- Validate doc using XML Schema.
- - -
- -
-   - - - - - - -
__init__(self, - etree=None, - file=None)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from _Validator: - assertValid, - assert_, - validate -

-

Inherited from _Validator (private): - _append_log_message, - _clear_error_log -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from _Validator: - error_log -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__call__(self, - etree) -
(Call operator) -

-
  -
- -

Validate doc using XML Schema.

-

Returns true if document is valid, false if not.

-
-
-
-
- -
- -
- - -
-

__init__(self, - etree=None, - file=None) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.XMLSchemaError-class.html b/doc/html/api/lxml.etree.XMLSchemaError-class.html deleted file mode 100644 index 8054f4b..0000000 --- a/doc/html/api/lxml.etree.XMLSchemaError-class.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - lxml.etree.XMLSchemaError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class XMLSchemaError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XMLSchemaError

-
-              object --+                
-                       |                
-exceptions.BaseException --+            
-                           |            
-        exceptions.Exception --+        
-                               |        
-                           Error --+    
-                                   |    
-                           LxmlError --+
-                                       |
-                                      XMLSchemaError
-
- -
Known Subclasses:
-
- -
- -
-Base class of all XML Schema errors - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.XMLSchemaParseError-class.html b/doc/html/api/lxml.etree.XMLSchemaParseError-class.html deleted file mode 100644 index d86e198..0000000 --- a/doc/html/api/lxml.etree.XMLSchemaParseError-class.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - lxml.etree.XMLSchemaParseError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class XMLSchemaParseError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XMLSchemaParseError

-
-              object --+                    
-                       |                    
-exceptions.BaseException --+                
-                           |                
-        exceptions.Exception --+            
-                               |            
-                           Error --+        
-                                   |        
-                           LxmlError --+    
-                                       |    
-                          XMLSchemaError --+
-                                           |
-                                          XMLSchemaParseError
-
- -
-Error while parsing an XML document as XML Schema. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.XMLSchemaValidateError-class.html b/doc/html/api/lxml.etree.XMLSchemaValidateError-class.html deleted file mode 100644 index 03a808c..0000000 --- a/doc/html/api/lxml.etree.XMLSchemaValidateError-class.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - lxml.etree.XMLSchemaValidateError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class XMLSchemaValidateError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XMLSchemaValidateError

-
-              object --+                    
-                       |                    
-exceptions.BaseException --+                
-                           |                
-        exceptions.Exception --+            
-                               |            
-                           Error --+        
-                                   |        
-                           LxmlError --+    
-                                       |    
-                          XMLSchemaError --+
-                                           |
-                                          XMLSchemaValidateError
-
- -
-Error while validating an XML document with an XML Schema. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.XMLSyntaxError-class.html b/doc/html/api/lxml.etree.XMLSyntaxError-class.html deleted file mode 100644 index c154f0b..0000000 --- a/doc/html/api/lxml.etree.XMLSyntaxError-class.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - lxml.etree.XMLSyntaxError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class XMLSyntaxError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XMLSyntaxError

-
-              object --+                        
-                       |                        
-exceptions.BaseException --+                    
-                           |                    
-        exceptions.Exception --+                
-                               |                
-                           Error --+            
-                                   |            
-                           LxmlError --+        
-                                       |        
-              object --+               |        
-                       |               |        
-exceptions.BaseException --+           |        
-                           |           |        
-        exceptions.Exception --+       |        
-                               |       |        
-        exceptions.StandardError --+   |        
-                                   |   |        
-              exceptions.SyntaxError --+        
-                                       |        
-                         LxmlSyntaxError --+    
-                                           |    
-                                  ParseError --+
-                                               |
-                                              XMLSyntaxError
-
- -
-Syntax error while parsing an XML document. - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from ParseError: - __init__ -

-

Inherited from LxmlError: - __new__ -

-

Inherited from exceptions.SyntaxError: - __str__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - __qualname__ = 'XMLSyntaxError' -
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from ParseError: - position -

-

Inherited from exceptions.SyntaxError: - filename, - lineno, - msg, - offset, - print_file_and_line, - text -

-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.XPath-class.html b/doc/html/api/lxml.etree.XPath-class.html deleted file mode 100644 index cdb53e7..0000000 --- a/doc/html/api/lxml.etree.XPath-class.html +++ /dev/null @@ -1,384 +0,0 @@ - - - - - lxml.etree.XPath - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class XPath - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XPath

-
-         object --+    
-                  |    
-_XPathEvaluatorBase --+
-                      |
-                     XPath
-
- -
Known Subclasses:
-
- -
- -
-

XPath(self, path, namespaces=None, extensions=None, regexp=True, smart_strings=True) -A compiled XPath expression that can be called on Elements and ElementTrees.

-

Besides the XPath expression, you can pass prefix-namespace -mappings and extension functions to the constructor through the -keyword arguments namespaces and extensions. EXSLT -regular expression support can be disabled with the 'regexp' -boolean keyword (defaults to True). Smart strings will be -returned for string results unless you pass -smart_strings=False.

- - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__call__(self, - _etree_or_element, - **_variables) - - -
- -
-   - - - - - - -
__init__(self, - path, - namespaces=None, - extensions=None, - regexp=True, - smart_strings=True)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__repr__(x)
- repr(x)
- - -
- -
-

Inherited from _XPathEvaluatorBase: - evaluate -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - path
- The literal XPath expression. -
-

Inherited from _XPathEvaluatorBase: - error_log -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - path, - namespaces=None, - extensions=None, - regexp=True, - smart_strings=True) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

__repr__(x) -
(Representation operator) -

-
  -
- - repr(x) -
-
Overrides: - object.__repr__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.XPathDocumentEvaluator-class.html b/doc/html/api/lxml.etree.XPathDocumentEvaluator-class.html deleted file mode 100644 index 85669d7..0000000 --- a/doc/html/api/lxml.etree.XPathDocumentEvaluator-class.html +++ /dev/null @@ -1,363 +0,0 @@ - - - - - lxml.etree.XPathDocumentEvaluator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class XPathDocumentEvaluator - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XPathDocumentEvaluator

-
-         object --+        
-                  |        
-_XPathEvaluatorBase --+    
-                      |    
-  XPathElementEvaluator --+
-                          |
-                         XPathDocumentEvaluator
-
- -
-

XPathDocumentEvaluator(self, etree, namespaces=None, extensions=None, regexp=True, smart_strings=True) -Create an XPath evaluator for an ElementTree.

-

Additional namespace declarations can be passed with the -'namespace' keyword argument. EXSLT regular expression support -can be disabled with the 'regexp' boolean keyword (defaults to -True). Smart strings will be returned for string results unless -you pass smart_strings=False.

- - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__call__(self, - _path, - **_variables)
- Evaluate an XPath expression on the document.
- - -
- -
-   - - - - - - -
__init__(self, - etree, - namespaces=None, - extensions=None, - regexp=True, - smart_strings=True)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from XPathElementEvaluator: - register_namespace, - register_namespaces -

-

Inherited from _XPathEvaluatorBase: - evaluate -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from _XPathEvaluatorBase: - error_log -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__call__(self, - _path, - **_variables) -
(Call operator) -

-
  -
- -

Evaluate an XPath expression on the document.

-

Variables may be provided as keyword arguments. Note that namespaces -are currently not supported for variables.

-
-
Overrides: - XPathElementEvaluator.__call__ -
-
-
-
- -
- -
- - -
-

__init__(self, - etree, - namespaces=None, - extensions=None, - regexp=True, - smart_strings=True) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.XPathElementEvaluator-class.html b/doc/html/api/lxml.etree.XPathElementEvaluator-class.html deleted file mode 100644 index f8b9095..0000000 --- a/doc/html/api/lxml.etree.XPathElementEvaluator-class.html +++ /dev/null @@ -1,398 +0,0 @@ - - - - - lxml.etree.XPathElementEvaluator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class XPathElementEvaluator - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XPathElementEvaluator

-
-         object --+    
-                  |    
-_XPathEvaluatorBase --+
-                      |
-                     XPathElementEvaluator
-
- -
Known Subclasses:
-
- -
- -
-

XPathElementEvaluator(self, element, namespaces=None, extensions=None, regexp=True, smart_strings=True) -Create an XPath evaluator for an element.

-

Absolute XPath expressions (starting with '/') will be evaluated against -the ElementTree as returned by getroottree().

-

Additional namespace declarations can be passed with the -'namespace' keyword argument. EXSLT regular expression support -can be disabled with the 'regexp' boolean keyword (defaults to -True). Smart strings will be returned for string results unless -you pass smart_strings=False.

- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__call__(self, - _path, - **_variables)
- Evaluate an XPath expression on the document.
- - -
- -
-   - - - - - - -
__init__(self, - element, - namespaces=None, - extensions=None, - regexp=True, - smart_strings=True)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
register_namespace(...)
- Register a namespace with the XPath context.
- - -
- -
-   - - - - - - -
register_namespaces(...)
- Register a prefix -> uri dict.
- - -
- -
-

Inherited from _XPathEvaluatorBase: - evaluate -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from _XPathEvaluatorBase: - error_log -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__call__(self, - _path, - **_variables) -
(Call operator) -

-
  -
- -

Evaluate an XPath expression on the document.

-

Variables may be provided as keyword arguments. Note that namespaces -are currently not supported for variables.

-

Absolute XPath expressions (starting with '/') will be evaluated -against the ElementTree as returned by getroottree().

-
-
-
-
- -
- -
- - -
-

__init__(self, - element, - namespaces=None, - extensions=None, - regexp=True, - smart_strings=True) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.XPathError-class.html b/doc/html/api/lxml.etree.XPathError-class.html deleted file mode 100644 index dd8efdf..0000000 --- a/doc/html/api/lxml.etree.XPathError-class.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - lxml.etree.XPathError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class XPathError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XPathError

-
-              object --+                
-                       |                
-exceptions.BaseException --+            
-                           |            
-        exceptions.Exception --+        
-                               |        
-                           Error --+    
-                                   |    
-                           LxmlError --+
-                                       |
-                                      XPathError
-
- -
Known Subclasses:
-
- -
- -
-Base class of all XPath errors. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.XPathEvalError-class.html b/doc/html/api/lxml.etree.XPathEvalError-class.html deleted file mode 100644 index 46e0e48..0000000 --- a/doc/html/api/lxml.etree.XPathEvalError-class.html +++ /dev/null @@ -1,276 +0,0 @@ - - - - - lxml.etree.XPathEvalError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class XPathEvalError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XPathEvalError

-
-              object --+                    
-                       |                    
-exceptions.BaseException --+                
-                           |                
-        exceptions.Exception --+            
-                               |            
-                           Error --+        
-                                   |        
-                           LxmlError --+    
-                                       |    
-                              XPathError --+
-                                           |
-                                          XPathEvalError
-
- -
Known Subclasses:
-
- -
- -
-Error during XPath evaluation. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.XPathFunctionError-class.html b/doc/html/api/lxml.etree.XPathFunctionError-class.html deleted file mode 100644 index 02fac14..0000000 --- a/doc/html/api/lxml.etree.XPathFunctionError-class.html +++ /dev/null @@ -1,272 +0,0 @@ - - - - - lxml.etree.XPathFunctionError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class XPathFunctionError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XPathFunctionError

-
-              object --+                        
-                       |                        
-exceptions.BaseException --+                    
-                           |                    
-        exceptions.Exception --+                
-                               |                
-                           Error --+            
-                                   |            
-                           LxmlError --+        
-                                       |        
-                              XPathError --+    
-                                           |    
-                              XPathEvalError --+
-                                               |
-                                              XPathFunctionError
-
- -
-Internal error looking up an XPath extension function. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.XPathResultError-class.html b/doc/html/api/lxml.etree.XPathResultError-class.html deleted file mode 100644 index 0bbec57..0000000 --- a/doc/html/api/lxml.etree.XPathResultError-class.html +++ /dev/null @@ -1,272 +0,0 @@ - - - - - lxml.etree.XPathResultError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class XPathResultError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XPathResultError

-
-              object --+                        
-                       |                        
-exceptions.BaseException --+                    
-                           |                    
-        exceptions.Exception --+                
-                               |                
-                           Error --+            
-                                   |            
-                           LxmlError --+        
-                                       |        
-                              XPathError --+    
-                                           |    
-                              XPathEvalError --+
-                                               |
-                                              XPathResultError
-
- -
-Error handling an XPath result. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.XPathSyntaxError-class.html b/doc/html/api/lxml.etree.XPathSyntaxError-class.html deleted file mode 100644 index c4738ae..0000000 --- a/doc/html/api/lxml.etree.XPathSyntaxError-class.html +++ /dev/null @@ -1,266 +0,0 @@ - - - - - lxml.etree.XPathSyntaxError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class XPathSyntaxError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XPathSyntaxError

-
-              object --+                    
-                       |                    
-exceptions.BaseException --+                
-                           |                
-        exceptions.Exception --+            
-                               |            
-                           Error --+        
-                                   |        
-                           LxmlError --+    
-                                       |    
-              object --+               |    
-                       |               |    
-exceptions.BaseException --+           |    
-                           |           |    
-        exceptions.Exception --+       |    
-                               |       |    
-        exceptions.StandardError --+   |    
-                                   |   |    
-              exceptions.SyntaxError --+    
-                                       |    
-                         LxmlSyntaxError --+
-                                           |
-              object --+                   |
-                       |                   |
-exceptions.BaseException --+               |
-                           |               |
-        exceptions.Exception --+           |
-                               |           |
-                           Error --+       |
-                                   |       |
-                           LxmlError --+   |
-                                       |   |
-                              XPathError --+
-                                           |
-                                          XPathSyntaxError
-
- -
- - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from XPathError: - __new__ -

-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.SyntaxError: - __str__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - __qualname__ = 'XPathSyntaxError' -
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.SyntaxError: - filename, - lineno, - msg, - offset, - print_file_and_line, - text -

-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.XSLT-class.html b/doc/html/api/lxml.etree.XSLT-class.html deleted file mode 100644 index 5d9f759..0000000 --- a/doc/html/api/lxml.etree.XSLT-class.html +++ /dev/null @@ -1,598 +0,0 @@ - - - - - lxml.etree.XSLT - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class XSLT - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XSLT

-
-object --+
-         |
-        XSLT
-
- -
-

XSLT(self, xslt_input, extensions=None, regexp=True, access_control=None)

-

Turn an XSL document into an XSLT object.

-

Calling this object on a tree or Element will execute the XSLT:

-
-transform = etree.XSLT(xsl_tree)
-result = transform(xml_tree)
-
-

Keyword arguments of the constructor:

-
    -
  • extensions: a dict mapping (namespace, name) pairs to -extension functions or extension elements
  • -
  • regexp: enable exslt regular expression support in XPath -(default: True)
  • -
  • access_control: access restrictions for network or file -system (see XSLTAccessControl)
  • -
-

Keyword arguments of the XSLT call:

-
    -
  • profile_run: enable XSLT profiling (default: False)
  • -
-

Other keyword arguments of the call are passed to the stylesheet -as parameters.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__call__(self, - _input, - profile_run=False, - **kw)
- Execute the XSL transformation on a tree or Element.
- - -
- -
-   - - - - - - -
__copy__(...) - - -
- -
-   - - - - - - -
__deepcopy__(...) - - -
- -
-   - - - - - - -
__init__(self, - xslt_input, - extensions=None, - regexp=True, - access_control=None)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
apply(self, - _input, - profile_run=False, - **kw) - - -
- -
-   - - - - - - -
tostring(self, - result_tree)
- Save result doc to string based on stylesheet output method.
- - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Static Methods[hide private]
-
-   - - - - - - -
set_global_max_depth(max_depth)
- The maximum traversal depth that the stylesheet engine will allow. -This does not only count the template recursion depth but also takes -the number of variables/parameters into account. The required setting -for a run depends on both the stylesheet and the input data.
- - -
- -
-   - - - - - - -
strparam(strval)
- Mark an XSLT string parameter that requires quote escaping -before passing it into the transformation. Use it like this:
- - -
- -
- - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - error_log
- The log of errors and warnings of an XSLT execution. -
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__call__(self, - _input, - profile_run=False, - **kw) -
(Call operator) -

-
  -
- -

Execute the XSL transformation on a tree or Element.

-

Pass the profile_run option to get profile information -about the XSLT. The result of the XSLT will have a property -xslt_profile that holds an XML tree with profiling data.

-
-
-
-
- -
- -
- - -
-

__init__(self, - xslt_input, - extensions=None, - regexp=True, - access_control=None) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

apply(self, - _input, - profile_run=False, - **kw) -

-
  -
- - -
-
-

Deprecated: - call the object, not this method. -

-
-
- -
- -
- - -
-

set_global_max_depth(max_depth) -
Static Method -

-
  -
- -

The maximum traversal depth that the stylesheet engine will allow. -This does not only count the template recursion depth but also takes -the number of variables/parameters into account. The required setting -for a run depends on both the stylesheet and the input data.

-

Example:

-
-XSLT.set_global_max_depth(5000)
-
-

Note that this is currently a global, module-wide setting because -libxslt does not support it at a per-stylesheet level.

-
-
-
-
- -
- -
- - -
-

strparam(strval) -
Static Method -

-
  -
- -

Mark an XSLT string parameter that requires quote escaping -before passing it into the transformation. Use it like this:

-
-result = transform(doc, some_strval = XSLT.strparam(
-    '''it's "Monty Python's" ...'''))
-
-

Escaped string parameters can be reused without restriction.

-
-
-
-
- -
- -
- - -
-

tostring(self, - result_tree) -

-
  -
- - Save result doc to string based on stylesheet output method. -
-
-

Deprecated: - use str(result_tree) instead. -

-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.XSLTAccessControl-class.html b/doc/html/api/lxml.etree.XSLTAccessControl-class.html deleted file mode 100644 index 1d66bf4..0000000 --- a/doc/html/api/lxml.etree.XSLTAccessControl-class.html +++ /dev/null @@ -1,451 +0,0 @@ - - - - - lxml.etree.XSLTAccessControl - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class XSLTAccessControl - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XSLTAccessControl

-
-object --+
-         |
-        XSLTAccessControl
-
- -
-

XSLTAccessControl(self, read_file=True, write_file=True, create_dir=True, read_network=True, write_network=True)

-

Access control for XSLT: reading/writing files, directories and -network I/O. Access to a type of resource is granted or denied by -passing any of the following boolean keyword arguments. All of -them default to True to allow access.

-
    -
  • read_file
  • -
  • write_file
  • -
  • create_dir
  • -
  • read_network
  • -
  • write_network
  • -
-

For convenience, there is also a class member DENY_ALL that -provides an XSLTAccessControl instance that is readily configured -to deny everything, and a DENY_WRITE member that denies all -write access but allows read access.

-

See XSLT.

- - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - read_file=True, - write_file=True, - create_dir=True, - read_network=True, - write_network=True)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__repr__(x)
- repr(x)
- - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - DENY_ALL = XSLTAccessControl(create_dir=False, read_file=False... -
-   - - DENY_WRITE = XSLTAccessControl(create_dir=False, read_file=Tru... -
- - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - options
- The access control configuration as a map of options. -
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - read_file=True, - write_file=True, - create_dir=True, - read_network=True, - write_network=True) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

__repr__(x) -
(Representation operator) -

-
  -
- - repr(x) -
-
Overrides: - object.__repr__ -
-
-
-
-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

DENY_ALL

- -
-
-
-
Value:
-
-XSLTAccessControl(create_dir=False, read_file=False, read_network=Fals\
-e, write_file=False, write_network=False)
-
-
-
-
-
- -
- -
-

DENY_WRITE

- -
-
-
-
Value:
-
-XSLTAccessControl(create_dir=False, read_file=True, read_network=True,\
- write_file=False, write_network=False)
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.XSLTApplyError-class.html b/doc/html/api/lxml.etree.XSLTApplyError-class.html deleted file mode 100644 index 7d490be..0000000 --- a/doc/html/api/lxml.etree.XSLTApplyError-class.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - lxml.etree.XSLTApplyError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class XSLTApplyError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XSLTApplyError

-
-              object --+                    
-                       |                    
-exceptions.BaseException --+                
-                           |                
-        exceptions.Exception --+            
-                               |            
-                           Error --+        
-                                   |        
-                           LxmlError --+    
-                                       |    
-                               XSLTError --+
-                                           |
-                                          XSLTApplyError
-
- -
-Error running an XSL transformation. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.XSLTError-class.html b/doc/html/api/lxml.etree.XSLTError-class.html deleted file mode 100644 index 99e5850..0000000 --- a/doc/html/api/lxml.etree.XSLTError-class.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - lxml.etree.XSLTError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class XSLTError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XSLTError

-
-              object --+                
-                       |                
-exceptions.BaseException --+            
-                           |            
-        exceptions.Exception --+        
-                               |        
-                           Error --+    
-                                   |    
-                           LxmlError --+
-                                       |
-                                      XSLTError
-
- -
Known Subclasses:
-
- -
- -
-Base class of all XSLT errors. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.XSLTExtension-class.html b/doc/html/api/lxml.etree.XSLTExtension-class.html deleted file mode 100644 index 7634736..0000000 --- a/doc/html/api/lxml.etree.XSLTExtension-class.html +++ /dev/null @@ -1,420 +0,0 @@ - - - - - lxml.etree.XSLTExtension - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class XSLTExtension - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XSLTExtension

-
-object --+
-         |
-        XSLTExtension
-
- -
-Base class of an XSLT extension element. - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
apply_templates(self, - context, - node, - output_parent=None, - elements_only=False, - remove_blank_text=False)
- Call this method to retrieve the result of applying templates -to an element.
- - -
- -
-   - - - - - - -
execute(self, - context, - self_node, - input_node, - output_parent)
- Execute this extension element.
- - -
- -
-   - - - - - - -
process_children(self, - context, - output_parent=None, - elements_only=False, - remove_blank_text=False)
- Call this method to process the XSLT content of the extension -element itself.
- - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

apply_templates(self, - context, - node, - output_parent=None, - elements_only=False, - remove_blank_text=False) -

-
  -
- -

Call this method to retrieve the result of applying templates -to an element.

-

The return value is a list of elements or text strings that -were generated by the XSLT processor. If you pass -elements_only=True, strings will be discarded from the result -list. The option remove_blank_text=True will only discard -strings that consist entirely of whitespace (e.g. formatting). -These options do not apply to Elements, only to bare string results.

-

If you pass an Element as output_parent parameter, the result -will instead be appended to the element (including attributes -etc.) and the return value will be None. This is a safe way -to generate content into the output document directly, without -having to take care of special values like text or attributes. -Note that the string discarding options will be ignored in this -case.

-
-
-
-
- -
- -
- - -
-

execute(self, - context, - self_node, - input_node, - output_parent) -

-
  -
- -

Execute this extension element.

-

Subclasses must override this method. They may append -elements to the output_parent element here, or set its text -content. To this end, the input_node provides read-only -access to the current node in the input document, and the -self_node points to the extension element in the stylesheet.

-

Note that the output_parent parameter may be None if there -is no parent element in the current context (e.g. no content -was added to the output tree yet).

-
-
-
-
- -
- -
- - -
-

process_children(self, - context, - output_parent=None, - elements_only=False, - remove_blank_text=False) -

-
  -
- -

Call this method to process the XSLT content of the extension -element itself.

-

The return value is a list of elements or text strings that -were generated by the XSLT processor. If you pass -elements_only=True, strings will be discarded from the result -list. The option remove_blank_text=True will only discard -strings that consist entirely of whitespace (e.g. formatting). -These options do not apply to Elements, only to bare string results.

-

If you pass an Element as output_parent parameter, the result -will instead be appended to the element (including attributes -etc.) and the return value will be None. This is a safe way -to generate content into the output document directly, without -having to take care of special values like text or attributes. -Note that the string discarding options will be ignored in this -case.

-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.XSLTExtensionError-class.html b/doc/html/api/lxml.etree.XSLTExtensionError-class.html deleted file mode 100644 index 398d934..0000000 --- a/doc/html/api/lxml.etree.XSLTExtensionError-class.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - lxml.etree.XSLTExtensionError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class XSLTExtensionError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XSLTExtensionError

-
-              object --+                    
-                       |                    
-exceptions.BaseException --+                
-                           |                
-        exceptions.Exception --+            
-                               |            
-                           Error --+        
-                                   |        
-                           LxmlError --+    
-                                       |    
-                               XSLTError --+
-                                           |
-                                          XSLTExtensionError
-
- -
-Error registering an XSLT extension. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.XSLTParseError-class.html b/doc/html/api/lxml.etree.XSLTParseError-class.html deleted file mode 100644 index bf4b5cc..0000000 --- a/doc/html/api/lxml.etree.XSLTParseError-class.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - lxml.etree.XSLTParseError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class XSLTParseError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XSLTParseError

-
-              object --+                    
-                       |                    
-exceptions.BaseException --+                
-                           |                
-        exceptions.Exception --+            
-                               |            
-                           Error --+        
-                                   |        
-                           LxmlError --+    
-                                       |    
-                               XSLTError --+
-                                           |
-                                          XSLTParseError
-
- -
-Error parsing a stylesheet document. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.XSLTSaveError-class.html b/doc/html/api/lxml.etree.XSLTSaveError-class.html deleted file mode 100644 index 2c28b1c..0000000 --- a/doc/html/api/lxml.etree.XSLTSaveError-class.html +++ /dev/null @@ -1,248 +0,0 @@ - - - - - lxml.etree.XSLTSaveError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class XSLTSaveError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XSLTSaveError

-
-              object --+                    
-                       |                    
-exceptions.BaseException --+                
-                           |                
-        exceptions.Exception --+            
-                               |            
-                           Error --+        
-                                   |        
-                           LxmlError --+    
-                                       |    
-                               XSLTError --+
-                                           |
-              object --+                   |
-                       |                   |
-exceptions.BaseException --+               |
-                           |               |
-        exceptions.Exception --+           |
-                               |           |
-                           Error --+       |
-                                   |       |
-                           LxmlError --+   |
-                                       |   |
-                      SerialisationError --+
-                                           |
-                                          XSLTSaveError
-
- -
-Error serialising an XSLT result. - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from XSLTError: - __new__ -

-

Inherited from LxmlError: - __init__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - __qualname__ = 'XSLTSaveError' -
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree._Attrib-class.html b/doc/html/api/lxml.etree._Attrib-class.html deleted file mode 100644 index 88b38e6..0000000 --- a/doc/html/api/lxml.etree._Attrib-class.html +++ /dev/null @@ -1,727 +0,0 @@ - - - - - lxml.etree._Attrib - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class _Attrib - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _Attrib

-
-object --+
-         |
-        _Attrib
-
- -
-A dict-like proxy for the Element.attrib property. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__contains__(x, - y)
- y in x
- - -
- -
-   - - - - - - -
__copy__(...) - - -
- -
-   - - - - - - -
__deepcopy__(...) - - -
- -
-   - - - - - - -
__delitem__(x, - y)
- del x[y]
- - -
- -
-   - - - - - - -
__eq__(x, - y)
- x==y
- - -
- -
-   - - - - - - -
__ge__(x, - y)
- x>=y
- - -
- -
-   - - - - - - -
__getitem__(x, - y)
- x[y]
- - -
- -
-   - - - - - - -
__gt__(x, - y)
- x>y
- - -
- -
-   - - - - - - -
__iter__(x)
- iter(x)
- - -
- -
-   - - - - - - -
__le__(x, - y)
- x<=y
- - -
- -
-   - - - - - - -
__len__(x)
- len(x)
- - -
- -
-   - - - - - - -
__lt__(x, - y)
- x<y
- - -
- -
-   - - - - - - -
__ne__(x, - y)
- x!=y
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__nonzero__(x)
- x != 0
- - -
- -
-   - - - - - - -
__repr__(x)
- repr(x)
- - -
- -
-   - - - - - - -
__setitem__(x, - i, - y)
- x[i]=y
- - -
- -
-   - - - - - - -
clear(...) - - -
- -
-   - - - - - - -
get(...) - - -
- -
-   - - - - - - -
has_key(...) - - -
- -
-   - - - - - - -
items(...) - - -
- -
-   - - - - - - -
iteritems(...) - - -
- -
-   - - - - - - -
iterkeys(...) - - -
- -
-   - - - - - - -
itervalues(...) - - -
- -
-   - - - - - - -
keys(...) - - -
- -
-   - - - - - - -
pop(...) - - -
- -
-   - - - - - - -
update(...) - - -
- -
-   - - - - - - -
values(...) - - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

__repr__(x) -
(Representation operator) -

-
  -
- - repr(x) -
-
Overrides: - object.__repr__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree._BaseErrorLog-class.html b/doc/html/api/lxml.etree._BaseErrorLog-class.html deleted file mode 100644 index ffdcb4d..0000000 --- a/doc/html/api/lxml.etree._BaseErrorLog-class.html +++ /dev/null @@ -1,369 +0,0 @@ - - - - - lxml.etree._BaseErrorLog - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class _BaseErrorLog - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _BaseErrorLog

-
-object --+
-         |
-        _BaseErrorLog
-
- -
Known Subclasses:
-
- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(...)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__repr__(x)
- repr(x)
- - -
- -
-   - - - - - - -
copy(...) - - -
- -
-   - - - - - - -
receive(...) - - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - last_error -
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(...) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

__repr__(x) -
(Representation operator) -

-
  -
- - repr(x) -
-
Overrides: - object.__repr__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree._Comment-class.html b/doc/html/api/lxml.etree._Comment-class.html deleted file mode 100644 index fcb24dd..0000000 --- a/doc/html/api/lxml.etree._Comment-class.html +++ /dev/null @@ -1,364 +0,0 @@ - - - - - lxml.etree._Comment - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class _Comment - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _Comment

-
-         object --+        
-                  |        
-           _Element --+    
-                      |    
-??.__ContentOnlyElement --+
-                          |
-                         _Comment
-
- -
Known Subclasses:
-
- -
- -
- - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__repr__(x)
- repr(x)
- - -
- -
-

Inherited from unreachable.__ContentOnlyElement: - __delitem__, - __getitem__, - __len__, - __setitem__, - append, - get, - insert, - items, - keys, - set, - values -

-

Inherited from _Element: - __contains__, - __copy__, - __deepcopy__, - __iter__, - __nonzero__, - __reversed__, - addnext, - addprevious, - clear, - cssselect, - extend, - find, - findall, - findtext, - getchildren, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - makeelement, - remove, - replace, - xpath -

-

Inherited from _Element (private): - _init -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - tag
- Element tag -
-

Inherited from unreachable.__ContentOnlyElement: - attrib, - text -

-

Inherited from _Element: - base, - nsmap, - prefix, - sourceline, - tail -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

__repr__(x) -
(Representation operator) -

-
  -
- - repr(x) -
-
Overrides: - object.__repr__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree._Document-class.html b/doc/html/api/lxml.etree._Document-class.html deleted file mode 100644 index 8139770..0000000 --- a/doc/html/api/lxml.etree._Document-class.html +++ /dev/null @@ -1,250 +0,0 @@ - - - - - lxml.etree._Document - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class _Document - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _Document

-
-object --+
-         |
-        _Document
-
- -
-

Internal base class to reference a libxml document.

-

When instances of this class are garbage collected, the libxml -document is cleaned up.

- - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree._DomainErrorLog-class.html b/doc/html/api/lxml.etree._DomainErrorLog-class.html deleted file mode 100644 index 0298f64..0000000 --- a/doc/html/api/lxml.etree._DomainErrorLog-class.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - - lxml.etree._DomainErrorLog - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class _DomainErrorLog - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _DomainErrorLog

-
-   object --+            
-            |            
-_BaseErrorLog --+        
-                |        
-    _ListErrorLog --+    
-                    |    
-            _ErrorLog --+
-                        |
-                       _DomainErrorLog
-
- -
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(...)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
receive(...) - - -
- -
-

Inherited from _ErrorLog: - __exit__, - __iter__, - clear, - copy -

-

Inherited from _ListErrorLog: - __contains__, - __getitem__, - __len__, - __nonzero__, - __repr__, - filter_domains, - filter_from_errors, - filter_from_fatals, - filter_from_level, - filter_from_warnings, - filter_levels, - filter_types -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from _BaseErrorLog: - last_error -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(...) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

receive(...) -

-
  -
- - -
-
Overrides: - _BaseErrorLog.receive -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree._Element-class.html b/doc/html/api/lxml.etree._Element-class.html deleted file mode 100644 index 7c89e77..0000000 --- a/doc/html/api/lxml.etree._Element-class.html +++ /dev/null @@ -1,1665 +0,0 @@ - - - - - lxml.etree._Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class _Element - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _Element

-
-object --+
-         |
-        _Element
-
- -
Known Subclasses:
-
- -
- -
-

Element class.

-

References a document object and a libxml node.

-

By pointing to a Document instance, a reference is kept to -_Document as long as there is some pointer to a node in it.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__contains__(self, - element) - - -
- -
-   - - - - - - -
__copy__(self) - - -
- -
-   - - - - - - -
__deepcopy__(self, - memo) - - -
- -
-   - - - - - - -
__delitem__(self, - x)
- Deletes the given subelement or a slice.
- - -
- -
-   - - - - - - -
__getitem__(...)
- Returns the subelement at the given position or the requested -slice.
- - -
- -
-   - - - - - - -
__iter__(self) - - -
- -
-   - - - - - - -
__len__(self)
- Returns the number of subelements.
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__nonzero__(x)
- x != 0
- - -
- -
-   - - - - - - -
__repr__(self)
- repr(x)
- - -
- -
-   - - - - - - -
__reversed__(self) - - -
- -
-   - - - - - - -
__setitem__(self, - x, - value)
- Replaces the given subelement index or slice.
- - -
- -
-   - - - - - - -
_init(self)
- Called after object initialisation. Custom subclasses may override -this if they recursively call _init() in the superclasses.
- - -
- -
-   - - - - - - -
addnext(self, - element)
- Adds the element as a following sibling directly after this -element.
- - -
- -
-   - - - - - - -
addprevious(self, - element)
- Adds the element as a preceding sibling directly before this -element.
- - -
- -
-   - - - - - - -
append(self, - element)
- Adds a subelement to the end of this element.
- - -
- -
-   - - - - - - -
clear(self)
- Resets an element. This function removes all subelements, clears -all attributes and sets the text and tail properties to None.
- - -
- -
-   - - - - - - -
cssselect(...)
- Run the CSS expression on this element and its children, -returning a list of the results.
- - -
- -
-   - - - - - - -
extend(self, - elements)
- Extends the current children by the elements in the iterable.
- - -
- -
-   - - - - - - -
find(self, - path, - namespaces=None)
- Finds the first matching subelement, by tag name or path.
- - -
- -
-   - - - - - - -
findall(self, - path, - namespaces=None)
- Finds all matching subelements, by tag name or path.
- - -
- -
-   - - - - - - -
findtext(self, - path, - default=None, - namespaces=None)
- Finds text for the first matching subelement, by tag name or path.
- - -
- -
-   - - - - - - -
get(self, - key, - default=None)
- Gets an element attribute.
- - -
- -
-   - - - - - - -
getchildren(self)
- Returns all direct children. The elements are returned in document -order.
- - -
- -
-   - - - - - - -
getiterator(self, - tag=None, - *tags)
- Returns a sequence or iterator of all elements in the subtree in -document order (depth first pre-order), starting with this -element.
- - -
- -
-   - - - - - - -
getnext(self)
- Returns the following sibling of this element or None.
- - -
- -
-   - - - - - - -
getparent(self)
- Returns the parent of this element or None for the root element.
- - -
- -
-   - - - - - - -
getprevious(self)
- Returns the preceding sibling of this element or None.
- - -
- -
-   - - - - - - -
getroottree(self)
- Return an ElementTree for the root node of the document that -contains this element.
- - -
- -
-   - - - - - - -
index(self, - child, - start=None, - stop=None)
- Find the position of the child within the parent.
- - -
- -
-   - - - - - - -
insert(self, - index, - element)
- Inserts a subelement at the given position in this element
- - -
- -
-   - - - - - - -
items(self)
- Gets element attributes, as a sequence. The attributes are returned in -an arbitrary order.
- - -
- -
-   - - - - - - -
iter(self, - tag=None, - *tags)
- Iterate over all elements in the subtree in document order (depth -first pre-order), starting with this element.
- - -
- -
-   - - - - - - -
iterancestors(self, - tag=None, - *tags)
- Iterate over the ancestors of this element (from parent to parent).
- - -
- -
-   - - - - - - -
iterchildren(self, - tag=None, - reversed=False, - *tags)
- Iterate over the children of this element.
- - -
- -
-   - - - - - - -
iterdescendants(self, - tag=None, - *tags)
- Iterate over the descendants of this element in document order.
- - -
- -
-   - - - - - - -
iterfind(self, - path, - namespaces=None)
- Iterates over all matching subelements, by tag name or path.
- - -
- -
-   - - - - - - -
itersiblings(self, - tag=None, - preceding=False, - *tags)
- Iterate over the following or preceding siblings of this element.
- - -
- -
-   - - - - - - -
itertext(self, - tag=None, - with_tail=True, - *tags)
- Iterates over the text content of a subtree.
- - -
- -
-   - - - - - - -
keys(self)
- Gets a list of attribute names. The names are returned in an -arbitrary order (just like for an ordinary Python dictionary).
- - -
- -
-   - - - - - - -
makeelement(self, - _tag, - attrib=None, - nsmap=None, - **_extra)
- Creates a new element associated with the same document.
- - -
- -
-   - - - - - - -
remove(self, - element)
- Removes a matching subelement. Unlike the find methods, this -method compares elements based on identity, not on tag value -or contents.
- - -
- -
-   - - - - - - -
replace(self, - old_element, - new_element)
- Replaces a subelement with the element passed as second argument.
- - -
- -
-   - - - - - - -
set(self, - key, - value)
- Sets an element attribute.
- - -
- -
-   - - - - - - -
values(self)
- Gets element attribute values as a sequence of strings. The -attributes are returned in an arbitrary order.
- - -
- -
-   - - - - - - -
xpath(self, - _path, - namespaces=None, - extensions=None, - smart_strings=True, - **_variables)
- Evaluate an xpath expression using the element as context node.
- - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - attrib
- Element attribute dictionary. Where possible, use get(), set(), -keys(), values() and items() to access element attributes. -
-   - - base
- The base URI of the Element (xml:base or HTML base URL). -None if the base URI is unknown. -
-   - - nsmap
- Namespace prefix->URI mapping known in the context of this -Element. This includes all namespace declarations of the -parents. -
-   - - prefix
- Namespace prefix or None. -
-   - - sourceline
- Original line number as found by the parser or None if unknown. -
-   - - tag
- Element tag -
-   - - tail
- 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. -
-   - - text
- Text before the first subelement. This is either a string or -the value None, if there was no text. -
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

__repr__(self) -
(Representation operator) -

-
  -
- - repr(x) -
-
Overrides: - object.__repr__ -
-
-
-
- -
- -
- - -
-

addnext(self, - element) -

-
  -
- -

Adds the element as a following sibling directly after this -element.

-

This is normally used to set a processing instruction or comment after -the root node of a document. Note that tail text is automatically -discarded when adding at the root level.

-
-
-
-
- -
- -
- - -
-

addprevious(self, - element) -

-
  -
- -

Adds the element as a preceding sibling directly before this -element.

-

This is normally used to set a processing instruction or comment -before the root node of a document. Note that tail text is -automatically discarded when adding at the root level.

-
-
-
-
- -
- -
- - -
-

cssselect(...) -

-
  -
- -

Run the CSS expression on this element and its children, -returning a list of the results.

-

Equivalent to lxml.cssselect.CSSSelect(expr)(self) -- note -that pre-compiling the expression can provide a substantial -speedup.

-
-
-
-
- -
- -
- - -
-

find(self, - path, - namespaces=None) -

-
  -
- -

Finds the first matching subelement, by tag name or path.

-

The optional namespaces argument accepts a -prefix-to-namespace mapping that allows the usage of XPath -prefixes in the path expression.

-
-
-
-
- -
- -
- - -
-

findall(self, - path, - namespaces=None) -

-
  -
- -

Finds all matching subelements, by tag name or path.

-

The optional namespaces argument accepts a -prefix-to-namespace mapping that allows the usage of XPath -prefixes in the path expression.

-
-
-
-
- -
- -
- - -
-

findtext(self, - path, - default=None, - namespaces=None) -

-
  -
- -

Finds text for the first matching subelement, by tag name or path.

-

The optional namespaces argument accepts a -prefix-to-namespace mapping that allows the usage of XPath -prefixes in the path expression.

-
-
-
-
- -
- -
- - -
-

getchildren(self) -

-
  -
- - Returns all direct children. The elements are returned in document -order. -
-
-

Deprecated: - Note that this method has been deprecated as of -ElementTree 1.3 and lxml 2.0. New code should use -list(element) or simply iterate over elements. -

-
-
- -
- -
- - -
-

getiterator(self, - tag=None, - *tags) -

-
  -
- -

Returns a sequence or iterator of all elements in the subtree in -document order (depth first pre-order), starting with this -element.

-

Can be restricted to find only elements with specific tags, -see iter.

-
-
-

Deprecated: - Note that this method is deprecated as of -ElementTree 1.3 and lxml 2.0. It returns an iterator in -lxml, which diverges from the original ElementTree -behaviour. If you want an efficient iterator, use the -element.iter() method instead. You should only use this -method in new code if you require backwards compatibility -with older versions of lxml or ElementTree. -

-
-
- -
- -
- - -
-

getroottree(self) -

-
  -
- -

Return an ElementTree for the root node of the document that -contains this element.

-

This is the same as following element.getparent() up the tree until it -returns None (for the root element) and then build an ElementTree for -the last parent that was returned.

-
-
-
-
- -
- -
- - -
-

index(self, - child, - start=None, - stop=None) -

-
  -
- -

Find the position of the child within the parent.

-

This method is not part of the original ElementTree API.

-
-
-
-
- -
- -
- - -
-

iter(self, - tag=None, - *tags) -

-
  -
- -

Iterate over all elements in the subtree in document order (depth -first pre-order), starting with this element.

-

Can be restricted to find only elements with specific tags: -pass "{ns}localname" as tag. Either or both of ns and -localname can be * for a wildcard; ns can be empty -for no namespace. "localname" is equivalent to "{}localname" -(i.e. no namespace) but "*" is "{*}*" (any or no namespace), -not "{}*".

-

You can also pass the Element, Comment, ProcessingInstruction and -Entity factory functions to look only for the specific element type.

-

Passing multiple tags (or a sequence of tags) instead of a single tag -will let the iterator return all elements matching any of these tags, -in document order.

-
-
-
-
- -
- -
- - -
-

iterancestors(self, - tag=None, - *tags) -

-
  -
- -

Iterate over the ancestors of this element (from parent to parent).

-

Can be restricted to find only elements with specific tags, -see iter.

-
-
-
-
- -
- -
- - -
-

iterchildren(self, - tag=None, - reversed=False, - *tags) -

-
  -
- -

Iterate over the children of this element.

-

As opposed to using normal iteration on this element, the returned -elements can be reversed with the 'reversed' keyword and restricted -to find only elements with specific tags, see iter.

-
-
-
-
- -
- -
- - -
-

iterdescendants(self, - tag=None, - *tags) -

-
  -
- -

Iterate over the descendants of this element in document order.

-

As opposed to el.iter(), this iterator does not yield the element -itself. The returned elements can be restricted to find only elements -with specific tags, see iter.

-
-
-
-
- -
- -
- - -
-

iterfind(self, - path, - namespaces=None) -

-
  -
- -

Iterates over all matching subelements, by tag name or path.

-

The optional namespaces argument accepts a -prefix-to-namespace mapping that allows the usage of XPath -prefixes in the path expression.

-
-
-
-
- -
- -
- - -
-

itersiblings(self, - tag=None, - preceding=False, - *tags) -

-
  -
- -

Iterate over the following or preceding siblings of this element.

-

The direction is determined by the 'preceding' keyword which -defaults to False, i.e. forward iteration over the following -siblings. When True, the iterator yields the preceding -siblings in reverse document order, i.e. starting right before -the current element and going backwards.

-

Can be restricted to find only elements with specific tags, -see iter.

-
-
-
-
- -
- -
- - -
-

itertext(self, - tag=None, - with_tail=True, - *tags) -

-
  -
- -

Iterates over the text content of a subtree.

-

You can pass tag names to restrict text content to specific elements, -see iter.

-

You can set the with_tail keyword argument to False to skip -over tail text.

-
-
-
-
-
- - - - - - -
- - - - - -
Property Details[hide private]
-
- -
- -
-

base

-

The base URI of the Element (xml:base or HTML base URL). -None if the base URI is unknown.

-

Note that the value depends on the URL of the document that -holds the Element if there is no xml:base attribute on the -Element or its ancestors.

-

Setting this property will set an xml:base attribute on the -Element, regardless of the document type (XML or HTML).

-
-
-
-
- -
- -
-

nsmap

-

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.

-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree._ElementIterator-class.html b/doc/html/api/lxml.etree._ElementIterator-class.html deleted file mode 100644 index 530e5ca..0000000 --- a/doc/html/api/lxml.etree._ElementIterator-class.html +++ /dev/null @@ -1,299 +0,0 @@ - - - - - lxml.etree._ElementIterator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class _ElementIterator - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _ElementIterator

-
-        object --+    
-                 |    
-_ElementTagMatcher --+
-                     |
-                    _ElementIterator
-
- -
-Dead but public. :) - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__iter__(x)
- iter(x)
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__next__(...) - - -
- -
- the next value, or raise StopIteration - - - - - - -
next(x) - - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree._ElementMatchIterator-class.html b/doc/html/api/lxml.etree._ElementMatchIterator-class.html deleted file mode 100644 index d23e09e..0000000 --- a/doc/html/api/lxml.etree._ElementMatchIterator-class.html +++ /dev/null @@ -1,301 +0,0 @@ - - - - - lxml.etree._ElementMatchIterator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class _ElementMatchIterator - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _ElementMatchIterator

-
-object --+
-         |
-        _ElementMatchIterator
-
- -
Known Subclasses:
-
- -
- -
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__iter__(x)
- iter(x)
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__next__(...) - - -
- -
- the next value, or raise StopIteration - - - - - - -
next(x) - - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree._ElementStringResult-class.html b/doc/html/api/lxml.etree._ElementStringResult-class.html deleted file mode 100644 index 2973774..0000000 --- a/doc/html/api/lxml.etree._ElementStringResult-class.html +++ /dev/null @@ -1,290 +0,0 @@ - - - - - lxml.etree._ElementStringResult - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class _ElementStringResult - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _ElementStringResult

-
-object --+        
-         |        
-basestring --+    
-             |    
-           str --+
-                 |
-                _ElementStringResult
-
- -
- - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
getparent(...) - - -
- -
-

Inherited from str: - __add__, - __contains__, - __eq__, - __format__, - __ge__, - __getattribute__, - __getitem__, - __getnewargs__, - __getslice__, - __gt__, - __hash__, - __le__, - __len__, - __lt__, - __mod__, - __mul__, - __ne__, - __new__, - __repr__, - __rmod__, - __rmul__, - __sizeof__, - __str__, - capitalize, - center, - count, - decode, - encode, - endswith, - expandtabs, - find, - format, - index, - isalnum, - isalpha, - isdigit, - islower, - isspace, - istitle, - isupper, - join, - ljust, - lower, - lstrip, - partition, - replace, - rfind, - rindex, - rjust, - rpartition, - rsplit, - rstrip, - split, - splitlines, - startswith, - strip, - swapcase, - title, - translate, - upper, - zfill -

-

Inherited from str (private): - _formatter_field_name_split, - _formatter_parser -

-

Inherited from object: - __delattr__, - __init__, - __reduce__, - __reduce_ex__, - __setattr__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - __qualname__ = '_ElementStringResult' -
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree._ElementTagMatcher-class.html b/doc/html/api/lxml.etree._ElementTagMatcher-class.html deleted file mode 100644 index 17da4a0..0000000 --- a/doc/html/api/lxml.etree._ElementTagMatcher-class.html +++ /dev/null @@ -1,254 +0,0 @@ - - - - - lxml.etree._ElementTagMatcher - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class _ElementTagMatcher - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _ElementTagMatcher

-
-object --+
-         |
-        _ElementTagMatcher
-
- -
Known Subclasses:
-
- -
- -
-Dead but public. :) - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree._ElementTree-class.html b/doc/html/api/lxml.etree._ElementTree-class.html deleted file mode 100644 index 6b0c9ed..0000000 --- a/doc/html/api/lxml.etree._ElementTree-class.html +++ /dev/null @@ -1,1101 +0,0 @@ - - - - - lxml.etree._ElementTree - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class _ElementTree - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _ElementTree

-
-object --+
-         |
-        _ElementTree
-
- -
Known Subclasses:
-
- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__copy__(...) - - -
- -
-   - - - - - - -
__deepcopy__(...) - - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
_setroot(self, - root)
- Relocate the ElementTree to a new root node.
- - -
- -
-   - - - - - - -
find(self, - path, - namespaces=None)
- Finds the first toplevel element with given tag. Same as -tree.getroot().find(path).
- - -
- -
-   - - - - - - -
findall(self, - path, - namespaces=None)
- Finds all elements matching the ElementPath expression. Same as -getroot().findall(path).
- - -
- -
-   - - - - - - -
findtext(self, - path, - default=None, - namespaces=None)
- Finds the text for the first element matching the ElementPath -expression. Same as getroot().findtext(path)
- - -
- -
-   - - - - - - -
getelementpath(self, - element)
- Returns a structural, absolute ElementPath expression to find the -element. This path can be used in the .find() method to look up -the element, provided that the elements along the path and their -list of immediate children were not modified in between.
- - -
- -
-   - - - - - - -
getiterator(self, - tag=None, - *tags)
- Returns a sequence or iterator of all elements in document order -(depth first pre-order), starting with the root element.
- - -
- -
-   - - - - - - -
getpath(self, - element)
- Returns a structural, absolute XPath expression to find the element.
- - -
- -
-   - - - - - - -
getroot(self)
- Gets the root element for this tree.
- - -
- -
-   - - - - - - -
iter(self, - tag=None, - *tags)
- Creates an iterator for the root element. The iterator loops over -all elements in this tree, in document order. Note that siblings -of the root element (comments or processing instructions) are not -returned by the iterator.
- - -
- -
-   - - - - - - -
iterfind(self, - path, - namespaces=None)
- Iterates over all elements matching the ElementPath expression. -Same as getroot().iterfind(path).
- - -
- -
-   - - - - - - -
parse(self, - source, - parser=None, - base_url=None)
- Updates self with the content of source and returns its root
- - -
- -
-   - - - - - - -
relaxng(self, - relaxng)
- Validate this document using other document.
- - -
- -
-   - - - - - - -
write(self, - file, - encoding=None, - method="xml", - pretty_print=False, - xml_declaration=None, - with_tail=True, - standalone=None, - doctype=None, - compression=0, - exclusive=False, - with_comments=True, - inclusive_ns_prefixes=None)
- Write the tree to a filename, file or file-like object.
- - -
- -
-   - - - - - - -
write_c14n(self, - file, - exclusive=False, - with_comments=True, - compression=0, - inclusive_ns_prefixes=None)
- C14N write of document. Always writes UTF-8.
- - -
- -
-   - - - - - - -
xinclude(self)
- Process the XInclude nodes in this document and include the -referenced XML fragments.
- - -
- -
-   - - - - - - -
xmlschema(self, - xmlschema)
- Validate this document using other document.
- - -
- -
-   - - - - - - -
xpath(self, - _path, - namespaces=None, - extensions=None, - smart_strings=True, - **_variables)
- XPath evaluate in context of document.
- - -
- -
-   - - - - - - -
xslt(self, - _xslt, - extensions=None, - access_control=None, - **_kw)
- Transform this document using other document.
- - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - docinfo
- Information about the document provided by parser and DTD. -
-   - - parser
- The parser that was used to parse the document in this ElementTree. -
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

find(self, - path, - namespaces=None) -

-
  -
- -

Finds the first toplevel element with given tag. Same as -tree.getroot().find(path).

-

The optional namespaces argument accepts a -prefix-to-namespace mapping that allows the usage of XPath -prefixes in the path expression.

-
-
-
-
- -
- -
- - -
-

findall(self, - path, - namespaces=None) -

-
  -
- -

Finds all elements matching the ElementPath expression. Same as -getroot().findall(path).

-

The optional namespaces argument accepts a -prefix-to-namespace mapping that allows the usage of XPath -prefixes in the path expression.

-
-
-
-
- -
- -
- - -
-

findtext(self, - path, - default=None, - namespaces=None) -

-
  -
- -

Finds the text for the first element matching the ElementPath -expression. Same as getroot().findtext(path)

-

The optional namespaces argument accepts a -prefix-to-namespace mapping that allows the usage of XPath -prefixes in the path expression.

-
-
-
-
- -
- -
- - -
-

getelementpath(self, - element) -

-
  -
- -

Returns a structural, absolute ElementPath expression to find the -element. This path can be used in the .find() method to look up -the element, provided that the elements along the path and their -list of immediate children were not modified in between.

-

ElementPath has the advantage over an XPath expression (as returned -by the .getpath() method) that it does not require additional prefix -declarations. It is always self-contained.

-
-
-
-
- -
- -
- - -
-

getiterator(self, - tag=None, - *tags) -

-
  -
- -

Returns a sequence or iterator of all elements in document order -(depth first pre-order), starting with the root element.

-

Can be restricted to find only elements with specific tags, -see _Element.iter.

-
-
-

Deprecated: - Note that this method is deprecated as of -ElementTree 1.3 and lxml 2.0. It returns an iterator in -lxml, which diverges from the original ElementTree -behaviour. If you want an efficient iterator, use the -tree.iter() method instead. You should only use this -method in new code if you require backwards compatibility -with older versions of lxml or ElementTree. -

-
-
- -
- -
- - -
-

getpath(self, - element) -

-
  -
- -

Returns a structural, absolute XPath expression to find the element.

-

For namespaced elements, the expression uses prefixes from the -document, which therefore need to be provided in order to make any -use of the expression in XPath.

-

Also see the method getelementpath(self, element), which returns a -self-contained ElementPath expression.

-
-
-
-
- -
- -
- - -
-

iter(self, - tag=None, - *tags) -

-
  -
- -

Creates an iterator for the root element. The iterator loops over -all elements in this tree, in document order. Note that siblings -of the root element (comments or processing instructions) are not -returned by the iterator.

-

Can be restricted to find only elements with specific tags, -see _Element.iter.

-
-
-
-
- -
- -
- - -
-

iterfind(self, - path, - namespaces=None) -

-
  -
- -

Iterates over all elements matching the ElementPath expression. -Same as getroot().iterfind(path).

-

The optional namespaces argument accepts a -prefix-to-namespace mapping that allows the usage of XPath -prefixes in the path expression.

-
-
-
-
- -
- -
- - -
-

relaxng(self, - relaxng) -

-
  -
- -

Validate this document using other document.

-

The relaxng argument is a tree that should contain a Relax NG schema.

-

Returns True or False, depending on whether validation -succeeded.

-

Note: if you are going to apply the same Relax NG schema against -multiple documents, it is more efficient to use the RelaxNG -class directly.

-
-
-
-
- -
- -
- - -
-

write(self, - file, - encoding=None, - method="xml", - pretty_print=False, - xml_declaration=None, - with_tail=True, - standalone=None, - doctype=None, - compression=0, - exclusive=False, - with_comments=True, - inclusive_ns_prefixes=None) -

-
  -
- -

Write the tree to a filename, file or file-like object.

-

Defaults to ASCII encoding and writing a declaration as needed.

-

The keyword argument 'method' selects the output method: -'xml', 'html', 'text' or 'c14n'. Default is 'xml'.

-

The exclusive and with_comments arguments are only -used with C14N output, where they request exclusive and -uncommented C14N serialisation respectively.

-

Passing a boolean value to the standalone option will -output an XML declaration with the corresponding -standalone flag.

-

The doctype option allows passing in a plain string that will -be serialised before the XML tree. Note that passing in non -well-formed content here will make the XML output non well-formed. -Also, an existing doctype in the document tree will not be removed -when serialising an ElementTree instance.

-

The compression option enables GZip compression level 1-9.

-

The inclusive_ns_prefixes should be a list of namespace strings -(i.e. ['xs', 'xsi']) that will be promoted to the top-level element -during exclusive C14N serialisation. This parameter is ignored if -exclusive mode=False.

-

If exclusive=True and no list is provided, a namespace will only be -rendered if it is used by the immediate parent or one of its attributes -and its prefix and values have not already been rendered by an ancestor -of the namespace node's parent element.

-
-
-
-
- -
- -
- - -
-

write_c14n(self, - file, - exclusive=False, - with_comments=True, - compression=0, - inclusive_ns_prefixes=None) -

-
  -
- -

C14N write of document. Always writes UTF-8.

-

The compression option enables GZip compression level 1-9.

-

The inclusive_ns_prefixes should be a list of namespace strings -(i.e. ['xs', 'xsi']) that will be promoted to the top-level element -during exclusive C14N serialisation. This parameter is ignored if -exclusive mode=False.

-

If exclusive=True and no list is provided, a namespace will only be -rendered if it is used by the immediate parent or one of its attributes -and its prefix and values have not already been rendered by an ancestor -of the namespace node's parent element.

-
-
-
-
- -
- -
- - -
-

xinclude(self) -

-
  -
- -

Process the XInclude nodes in this document and include the -referenced XML fragments.

-

There is support for loading files through the file system, HTTP and -FTP.

-

Note that XInclude does not support custom resolvers in Python space -due to restrictions of libxml2 <= 2.6.29.

-
-
-
-
- -
- -
- - -
-

xmlschema(self, - xmlschema) -

-
  -
- -

Validate this document using other document.

-

The xmlschema argument is a tree that should contain an XML Schema.

-

Returns True or False, depending on whether validation -succeeded.

-

Note: If you are going to apply the same XML Schema against -multiple documents, it is more efficient to use the XMLSchema -class directly.

-
-
-
-
- -
- -
- - -
-

xpath(self, - _path, - namespaces=None, - extensions=None, - smart_strings=True, - **_variables) -

-
  -
- -

XPath evaluate in context of document.

-

namespaces is an optional dictionary with prefix to namespace URI -mappings, used by XPath. extensions defines additional extension -functions.

-

Returns a list (nodeset), or bool, float or string.

-

In case of a list result, return Element for element nodes, -string for text and attribute values.

-

Note: if you are going to apply multiple XPath expressions -against the same document, it is more efficient to use -XPathEvaluator directly.

-
-
-
-
- -
- -
- - -
-

xslt(self, - _xslt, - extensions=None, - access_control=None, - **_kw) -

-
  -
- -

Transform this document using other document.

-

xslt is a tree that should be XSLT -keyword parameters are XSLT transformation parameters.

-

Returns the transformed tree.

-

Note: if you are going to apply the same XSLT stylesheet against -multiple documents, it is more efficient to use the XSLT -class directly.

-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree._ElementUnicodeResult-class.html b/doc/html/api/lxml.etree._ElementUnicodeResult-class.html deleted file mode 100644 index f70cef3..0000000 --- a/doc/html/api/lxml.etree._ElementUnicodeResult-class.html +++ /dev/null @@ -1,356 +0,0 @@ - - - - - lxml.etree._ElementUnicodeResult - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class _ElementUnicodeResult - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _ElementUnicodeResult

-
-object --+        
-         |        
-basestring --+    
-             |    
-       unicode --+
-                 |
-                _ElementUnicodeResult
-
- -
- - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
getparent(...) - - -
- -
-

Inherited from unicode: - __add__, - __contains__, - __eq__, - __format__, - __ge__, - __getattribute__, - __getitem__, - __getnewargs__, - __getslice__, - __gt__, - __hash__, - __le__, - __len__, - __lt__, - __mod__, - __mul__, - __ne__, - __repr__, - __rmod__, - __rmul__, - __sizeof__, - __str__, - capitalize, - center, - count, - decode, - encode, - endswith, - expandtabs, - find, - format, - index, - isalnum, - isalpha, - isdecimal, - isdigit, - islower, - isnumeric, - isspace, - istitle, - isupper, - join, - ljust, - lower, - lstrip, - partition, - replace, - rfind, - rindex, - rjust, - rpartition, - rsplit, - rstrip, - split, - splitlines, - startswith, - strip, - swapcase, - title, - translate, - upper, - zfill -

-

Inherited from unicode (private): - _formatter_field_name_split, - _formatter_parser -

-

Inherited from object: - __delattr__, - __init__, - __reduce__, - __reduce_ex__, - __setattr__, - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - attrname -
-   - - is_attribute -
-   - - is_tail -
-   - - is_text -
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree._Entity-class.html b/doc/html/api/lxml.etree._Entity-class.html deleted file mode 100644 index 01ed051..0000000 --- a/doc/html/api/lxml.etree._Entity-class.html +++ /dev/null @@ -1,379 +0,0 @@ - - - - - lxml.etree._Entity - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class _Entity - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _Entity

-
-         object --+        
-                  |        
-           _Element --+    
-                      |    
-??.__ContentOnlyElement --+
-                          |
-                         _Entity
-
- -
Known Subclasses:
-
- -
- -
- - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__repr__(x)
- repr(x)
- - -
- -
-

Inherited from unreachable.__ContentOnlyElement: - __delitem__, - __getitem__, - __len__, - __setitem__, - append, - get, - insert, - items, - keys, - set, - values -

-

Inherited from _Element: - __contains__, - __copy__, - __deepcopy__, - __iter__, - __nonzero__, - __reversed__, - addnext, - addprevious, - clear, - cssselect, - extend, - find, - findall, - findtext, - getchildren, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - makeelement, - remove, - replace, - xpath -

-

Inherited from _Element (private): - _init -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - name -
-   - - tag
- Element tag -
-   - - text
- Text before the first subelement. This is either a string or -the value None, if there was no text. -
-

Inherited from unreachable.__ContentOnlyElement: - attrib -

-

Inherited from _Element: - base, - nsmap, - prefix, - sourceline, - tail -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

__repr__(x) -
(Representation operator) -

-
  -
- - repr(x) -
-
Overrides: - object.__repr__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree._ErrorLog-class.html b/doc/html/api/lxml.etree._ErrorLog-class.html deleted file mode 100644 index 9166def..0000000 --- a/doc/html/api/lxml.etree._ErrorLog-class.html +++ /dev/null @@ -1,459 +0,0 @@ - - - - - lxml.etree._ErrorLog - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class _ErrorLog - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _ErrorLog

-
-   object --+        
-            |        
-_BaseErrorLog --+    
-                |    
-    _ListErrorLog --+
-                    |
-                   _ErrorLog
-
- -
Known Subclasses:
-
- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__exit__(...) - - -
- -
-   - - - - - - -
__init__(...)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
-   - - - - - - -
__iter__(x)
- iter(x)
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
clear(...) - - -
- -
-   - - - - - - -
copy(...)
- Creates a shallow copy of this error log and the list of entries.
- - -
- -
-   - - - - - - -
receive(...) - - -
- -
-

Inherited from _ListErrorLog: - __contains__, - __getitem__, - __len__, - __nonzero__, - __repr__, - filter_domains, - filter_from_errors, - filter_from_fatals, - filter_from_level, - filter_from_warnings, - filter_levels, - filter_types -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from _BaseErrorLog: - last_error -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(...) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__iter__(x) -

-
  -
- - iter(x) -
-
Overrides: - _ListErrorLog.__iter__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

copy(...) -

-
  -
- - Creates a shallow copy of this error log and the list of entries. -
-
Overrides: - _BaseErrorLog.copy -
-
-
-
- -
- -
- - -
-

receive(...) -

-
  -
- - -
-
Overrides: - _BaseErrorLog.receive -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree._FeedParser-class.html b/doc/html/api/lxml.etree._FeedParser-class.html deleted file mode 100644 index 9cd8737..0000000 --- a/doc/html/api/lxml.etree._FeedParser-class.html +++ /dev/null @@ -1,400 +0,0 @@ - - - - - lxml.etree._FeedParser - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class _FeedParser - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _FeedParser

-
-    object --+    
-             |    
-??._BaseParser --+
-                 |
-                _FeedParser
-
- -
Known Subclasses:
-
- -
- -
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
close(self)
- Terminates feeding data to this parser. This tells the parser to -process any remaining data in the feed buffer, and then returns the -root Element of the tree that was parsed.
- - -
- -
-   - - - - - - -
feed(self, - data)
- Feeds data to the parser. The argument should be an 8-bit string -buffer containing encoded data, although Unicode is supported as long -as both string types are not mixed.
- - -
- -
-

Inherited from unreachable._BaseParser: - __init__, - copy, - makeelement, - setElementClassLookup, - set_element_class_lookup -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - feed_error_log
- The error log of the last (or current) run of the feed parser. -
-

Inherited from unreachable._BaseParser: - error_log, - resolvers, - target, - version -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

close(self) -

-
  -
- -

Terminates feeding data to this parser. This tells the parser to -process any remaining data in the feed buffer, and then returns the -root Element of the tree that was parsed.

-

This method must be called after passing the last chunk of data into -the feed() method. It should only be called when using the feed -parser interface, all other usage is undefined.

-
-
-
-
- -
- -
- - -
-

feed(self, - data) -

-
  -
- -

Feeds data to the parser. The argument should be an 8-bit string -buffer containing encoded data, although Unicode is supported as long -as both string types are not mixed.

-

This is the main entry point to the consumer interface of a -parser. The parser will parse as much of the XML stream as it -can on each call. To finish parsing or to reset the parser, -call the close() method. Both methods may raise -ParseError if errors occur in the input data. If an error is -raised, there is no longer a need to call close().

-

The feed parser interface is independent of the normal parser -usage. You can use the same parser as a feed parser and in -the parse() function concurrently.

-
-
-
-
-
- - - - - - -
- - - - - -
Property Details[hide private]
-
- -
- -
-

feed_error_log

-

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.

-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree._IDDict-class.html b/doc/html/api/lxml.etree._IDDict-class.html deleted file mode 100644 index dc31fc4..0000000 --- a/doc/html/api/lxml.etree._IDDict-class.html +++ /dev/null @@ -1,505 +0,0 @@ - - - - - lxml.etree._IDDict - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class _IDDict - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _IDDict

-
-object --+
-         |
-        _IDDict
-
- -
-

IDDict(self, etree) -A dictionary-like proxy class that mapps ID attributes to elements.

-

The dictionary must be instantiated with the root element of a parsed XML -document, otherwise the behaviour is undefined. Elements and XML trees -that were created or modified 'by hand' are not supported.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__contains__(x, - y)
- y in x
- - -
- -
-   - - - - - - -
__getitem__(x, - y)
- x[y]
- - -
- -
-   - - - - - - -
__iter__(x)
- iter(x)
- - -
- -
-   - - - - - - -
__len__(x)
- len(x)
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__repr__(x)
- repr(x)
- - -
- -
-   - - - - - - -
copy(...) - - -
- -
-   - - - - - - -
get(...) - - -
- -
-   - - - - - - -
has_key(...) - - -
- -
-   - - - - - - -
items(...) - - -
- -
-   - - - - - - -
iteritems(...) - - -
- -
-   - - - - - - -
iterkeys(...) - - -
- -
-   - - - - - - -
itervalues(...) - - -
- -
-   - - - - - - -
keys(...) - - -
- -
-   - - - - - - -
values(...) - - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

__repr__(x) -
(Representation operator) -

-
  -
- - repr(x) -
-
Overrides: - object.__repr__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree._ListErrorLog-class.html b/doc/html/api/lxml.etree._ListErrorLog-class.html deleted file mode 100644 index 54f0d83..0000000 --- a/doc/html/api/lxml.etree._ListErrorLog-class.html +++ /dev/null @@ -1,593 +0,0 @@ - - - - - lxml.etree._ListErrorLog - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class _ListErrorLog - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _ListErrorLog

-
-   object --+    
-            |    
-_BaseErrorLog --+
-                |
-               _ListErrorLog
-
- -
Known Subclasses:
-
- -
- -
-Immutable base version of a list based error log. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__contains__(x, - y)
- y in x
- - -
- -
-   - - - - - - -
__getitem__(x, - y)
- x[y]
- - -
- -
-   - - - - - - -
__init__(...)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
-   - - - - - - -
__iter__(x)
- iter(x)
- - -
- -
-   - - - - - - -
__len__(x)
- len(x)
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__nonzero__(x)
- x != 0
- - -
- -
-   - - - - - - -
__repr__(x)
- repr(x)
- - -
- -
-   - - - - - - -
copy(...)
- Creates a shallow copy of this error log. Reuses the list of -entries.
- - -
- -
-   - - - - - - -
filter_domains(...)
- Filter the errors by the given domains and return a new error log -containing the matches.
- - -
- -
-   - - - - - - -
filter_from_errors(self)
- Convenience method to get all error messages or worse.
- - -
- -
-   - - - - - - -
filter_from_fatals(self)
- Convenience method to get all fatal error messages.
- - -
- -
-   - - - - - - -
filter_from_level(self, - level)
- Return a log with all messages of the requested level of worse.
- - -
- -
-   - - - - - - -
filter_from_warnings(self)
- Convenience method to get all warnings or worse.
- - -
- -
-   - - - - - - -
filter_levels(self, - levels)
- Filter the errors by the given error levels and return a new -error log containing the matches.
- - -
- -
-   - - - - - - -
filter_types(self, - types)
- Filter the errors by the given types and return a new error -log containing the matches.
- - -
- -
-

Inherited from _BaseErrorLog: - receive -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from _BaseErrorLog: - last_error -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(...) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

__repr__(x) -
(Representation operator) -

-
  -
- - repr(x) -
-
Overrides: - object.__repr__ -
-
-
-
- -
- -
- - -
-

copy(...) -

-
  -
- - Creates a shallow copy of this error log. Reuses the list of -entries. -
-
Overrides: - _BaseErrorLog.copy -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree._LogEntry-class.html b/doc/html/api/lxml.etree._LogEntry-class.html deleted file mode 100644 index 9f5f3d1..0000000 --- a/doc/html/api/lxml.etree._LogEntry-class.html +++ /dev/null @@ -1,379 +0,0 @@ - - - - - lxml.etree._LogEntry - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class _LogEntry - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _LogEntry

-
-object --+
-         |
-        _LogEntry
-
- -
-

A log message entry from an error log.

-

Attributes:

-
    -
  • message: the message text
  • -
  • domain: the domain ID (see lxml.etree.ErrorDomains)
  • -
  • type: the message type ID (see lxml.etree.ErrorTypes)
  • -
  • level: the log level ID (see lxml.etree.ErrorLevels)
  • -
  • line: the line at which the message originated (if applicable)
  • -
  • column: the character column at which the message originated (if applicable)
  • -
  • filename: the name of the file in which the message originated (if applicable)
  • -
  • path: the location in which the error was found (if available)
  • -
- - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__repr__(x)
- repr(x)
- - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - column -
-   - - domain -
-   - - domain_name
- The name of the error domain. See lxml.etree.ErrorDomains -
-   - - filename -
-   - - level -
-   - - level_name
- The name of the error level. See lxml.etree.ErrorLevels -
-   - - line -
-   - - message -
-   - - path
- The XPath for the node where the error was detected. -
-   - - type -
-   - - type_name
- The name of the error type. See lxml.etree.ErrorTypes -
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

__repr__(x) -
(Representation operator) -

-
  -
- - repr(x) -
-
Overrides: - object.__repr__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree._ProcessingInstruction-class.html b/doc/html/api/lxml.etree._ProcessingInstruction-class.html deleted file mode 100644 index bed532d..0000000 --- a/doc/html/api/lxml.etree._ProcessingInstruction-class.html +++ /dev/null @@ -1,431 +0,0 @@ - - - - - lxml.etree._ProcessingInstruction - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class _ProcessingInstruction - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _ProcessingInstruction

-
-         object --+        
-                  |        
-           _Element --+    
-                      |    
-??.__ContentOnlyElement --+
-                          |
-                         _ProcessingInstruction
-
- -
Known Subclasses:
-
- -
- -
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__repr__(x)
- repr(x)
- - -
- -
-   - - - - - - -
get(self, - key, - default=None)
- Try to parse pseudo-attributes from the text content of the -processing instruction, search for one with the given key as -name and return its associated value.
- - -
- -
-

Inherited from unreachable.__ContentOnlyElement: - __delitem__, - __getitem__, - __len__, - __setitem__, - append, - insert, - items, - keys, - set, - values -

-

Inherited from _Element: - __contains__, - __copy__, - __deepcopy__, - __iter__, - __nonzero__, - __reversed__, - addnext, - addprevious, - clear, - cssselect, - extend, - find, - findall, - findtext, - getchildren, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - makeelement, - remove, - replace, - xpath -

-

Inherited from _Element (private): - _init -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - attrib
- 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. -
-   - - tag
- Element tag -
-   - - target -
-

Inherited from unreachable.__ContentOnlyElement: - text -

-

Inherited from _Element: - base, - nsmap, - prefix, - sourceline, - tail -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

__repr__(x) -
(Representation operator) -

-
  -
- - repr(x) -
-
Overrides: - object.__repr__ -
-
-
-
- -
- -
- - -
-

get(self, - key, - default=None) -

-
  -
- -

Try to parse pseudo-attributes from the text content of the -processing instruction, search for one with the given key as -name and return its associated value.

-

Note that this is only a convenience method for the most -common case that all text content is structured in -attribute-like name-value pairs with properly quoted values. -It is not guaranteed to work for all possible text content.

-
-
Overrides: - _Element.get -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree._RotatingErrorLog-class.html b/doc/html/api/lxml.etree._RotatingErrorLog-class.html deleted file mode 100644 index 2bcc29e..0000000 --- a/doc/html/api/lxml.etree._RotatingErrorLog-class.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - - lxml.etree._RotatingErrorLog - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class _RotatingErrorLog - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _RotatingErrorLog

-
-   object --+            
-            |            
-_BaseErrorLog --+        
-                |        
-    _ListErrorLog --+    
-                    |    
-            _ErrorLog --+
-                        |
-                       _RotatingErrorLog
-
- -
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(...)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
receive(...) - - -
- -
-

Inherited from _ErrorLog: - __exit__, - __iter__, - clear, - copy -

-

Inherited from _ListErrorLog: - __contains__, - __getitem__, - __len__, - __nonzero__, - __repr__, - filter_domains, - filter_from_errors, - filter_from_fatals, - filter_from_level, - filter_from_warnings, - filter_levels, - filter_types -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from _BaseErrorLog: - last_error -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(...) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

receive(...) -

-
  -
- - -
-
Overrides: - _BaseErrorLog.receive -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree._SaxParserTarget-class.html b/doc/html/api/lxml.etree._SaxParserTarget-class.html deleted file mode 100644 index 8f82629..0000000 --- a/doc/html/api/lxml.etree._SaxParserTarget-class.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - lxml.etree._SaxParserTarget - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class _SaxParserTarget - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _SaxParserTarget

-
-object --+
-         |
-        _SaxParserTarget
-
- -
Known Subclasses:
-
- -
- -
- - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree._TargetParserResult-class.html b/doc/html/api/lxml.etree._TargetParserResult-class.html deleted file mode 100644 index 2db8f60..0000000 --- a/doc/html/api/lxml.etree._TargetParserResult-class.html +++ /dev/null @@ -1,285 +0,0 @@ - - - - - lxml.etree._TargetParserResult - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class _TargetParserResult - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _TargetParserResult

-
-              object --+        
-                       |        
-exceptions.BaseException --+    
-                           |    
-        exceptions.Exception --+
-                               |
-                              _TargetParserResult
-
- -
- - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(...)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
-

Inherited from exceptions.Exception: - __new__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - __qualname__ = '_TargetParserResult' -
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(...) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree._Validator-class.html b/doc/html/api/lxml.etree._Validator-class.html deleted file mode 100644 index 8c70fad..0000000 --- a/doc/html/api/lxml.etree._Validator-class.html +++ /dev/null @@ -1,369 +0,0 @@ - - - - - lxml.etree._Validator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class _Validator - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _Validator

-
-object --+
-         |
-        _Validator
-
- -
Known Subclasses:
-
- -
- -
-Base class for XML validators. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
_append_log_message(...) - - -
- -
-   - - - - - - -
_clear_error_log(...) - - -
- -
-   - - - - - - -
assertValid(self, - etree)
- Raises DocumentInvalid if the document does not comply with the schema.
- - -
- -
-   - - - - - - -
assert_(self, - etree)
- Raises AssertionError if the document does not comply with the schema.
- - -
- -
-   - - - - - - -
validate(self, - etree)
- Validate the document using this schema.
- - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - error_log
- The log of validation errors and warnings. -
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

validate(self, - etree) -

-
  -
- -

Validate the document using this schema.

-

Returns true if document is valid, false if not.

-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree._XPathEvaluatorBase-class.html b/doc/html/api/lxml.etree._XPathEvaluatorBase-class.html deleted file mode 100644 index 1406d59..0000000 --- a/doc/html/api/lxml.etree._XPathEvaluatorBase-class.html +++ /dev/null @@ -1,345 +0,0 @@ - - - - - lxml.etree._XPathEvaluatorBase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class _XPathEvaluatorBase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _XPathEvaluatorBase

-
-object --+
-         |
-        _XPathEvaluatorBase
-
- -
Known Subclasses:
-
- -
- -
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(...)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
evaluate(self, - _eval_arg, - **_variables)
- Evaluate an XPath expression.
- - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - error_log -
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(...) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

evaluate(self, - _eval_arg, - **_variables) -

-
  -
- -

Evaluate an XPath expression.

-

Instead of calling this method, you can also call the evaluator object -itself.

-

Variables may be provided as keyword arguments. Note that namespaces -are currently not supported for variables.

-
-
-

Deprecated: - call the object, not its method. -

-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree._XSLTProcessingInstruction-class.html b/doc/html/api/lxml.etree._XSLTProcessingInstruction-class.html deleted file mode 100644 index a984866..0000000 --- a/doc/html/api/lxml.etree._XSLTProcessingInstruction-class.html +++ /dev/null @@ -1,413 +0,0 @@ - - - - - lxml.etree._XSLTProcessingInstruction - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class _XSLTProcessingInstruction - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _XSLTProcessingInstruction

-
-         object --+                
-                  |                
-           _Element --+            
-                      |            
-??.__ContentOnlyElement --+        
-                          |        
-     _ProcessingInstruction --+    
-                              |    
-                         PIBase --+
-                                  |
-                                 _XSLTProcessingInstruction
-
- -
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
parseXSL(self, - parser=None)
- Try to parse the stylesheet referenced by this PI and return -an ElementTree for it. If the stylesheet is embedded in the -same document (referenced via xml:id), find and return an -ElementTree for the stylesheet Element.
- - -
- -
-   - - - - - - -
set(self, - key, - value)
- Supports setting the 'href' pseudo-attribute in the text of -the processing instruction.
- - -
- -
-

Inherited from PIBase: - __init__ -

-

Inherited from _ProcessingInstruction: - __repr__, - get -

-

Inherited from unreachable.__ContentOnlyElement: - __delitem__, - __getitem__, - __len__, - __setitem__, - append, - insert, - items, - keys, - values -

-

Inherited from _Element: - __contains__, - __copy__, - __deepcopy__, - __iter__, - __nonzero__, - __reversed__, - addnext, - addprevious, - clear, - cssselect, - extend, - find, - findall, - findtext, - getchildren, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - makeelement, - remove, - replace, - xpath -

-

Inherited from _Element (private): - _init -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from _ProcessingInstruction: - attrib, - tag, - target -

-

Inherited from unreachable.__ContentOnlyElement: - text -

-

Inherited from _Element: - base, - nsmap, - prefix, - sourceline, - tail -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

parseXSL(self, - parser=None) -

-
  -
- -

Try to parse the stylesheet referenced by this PI and return -an ElementTree for it. If the stylesheet is embedded in the -same document (referenced via xml:id), find and return an -ElementTree for the stylesheet Element.

-

The optional parser keyword argument can be passed to specify the -parser used to read from external stylesheet URLs.

-
-
-
-
- -
- -
- - -
-

set(self, - key, - value) -

-
  -
- - Supports setting the 'href' pseudo-attribute in the text of -the processing instruction. -
-
Overrides: - _Element.set -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree._XSLTResultTree-class.html b/doc/html/api/lxml.etree._XSLTResultTree-class.html deleted file mode 100644 index a9e31b0..0000000 --- a/doc/html/api/lxml.etree._XSLTResultTree-class.html +++ /dev/null @@ -1,382 +0,0 @@ - - - - - lxml.etree._XSLTResultTree - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class _XSLTResultTree - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _XSLTResultTree

-
-  object --+    
-           |    
-_ElementTree --+
-               |
-              _XSLTResultTree
-
- -
-

The result of an XSLT evaluation.

-

Use str() or bytes() (or unicode() in Python 2.x) to serialise to a string, -and the .write_output() method to write serialise to a file.

- - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__str__(x)
- str(x)
- - -
- -
-   - - - - - - -
__unicode__(...) - - -
- -
-   - - - - - - -
write_output(...)
- write_output(self, file, *, compression=0)
- - -
- -
-

Inherited from _ElementTree: - __copy__, - __deepcopy__, - find, - findall, - findtext, - getelementpath, - getiterator, - getpath, - getroot, - iter, - iterfind, - parse, - relaxng, - write, - write_c14n, - xinclude, - xmlschema, - xpath, - xslt -

-

Inherited from _ElementTree (private): - _setroot -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - xslt_profile
- Return an ElementTree with profiling data for the stylesheet run. -
-

Inherited from _ElementTree: - docinfo, - parser -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

__str__(x) -
(Informal representation operator) -

-
  -
- - str(x) -
-
Overrides: - object.__str__ -
-
-
-
- -
- -
- - -
-

write_output(...) -

-
  -
- -

write_output(self, file, *, compression=0)

-

Serialise the XSLT output to a file or file-like object.

-

As opposed to the generic .write() method, .write_output() serialises -the result as defined by the <xsl:output> tag.

-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.htmlfile-class.html b/doc/html/api/lxml.etree.htmlfile-class.html deleted file mode 100644 index 4354d81..0000000 --- a/doc/html/api/lxml.etree.htmlfile-class.html +++ /dev/null @@ -1,307 +0,0 @@ - - - - - lxml.etree.htmlfile - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class htmlfile - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class htmlfile

-
-object --+    
-         |    
-   xmlfile --+
-             |
-            htmlfile
-
- -
-

htmlfile(self, output_file, encoding=None, compression=None, close=False, buffered=True)

-

A simple mechanism for incremental HTML serialisation. Works the same as -xmlfile.

- - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - output_file, - encoding=None, - compression=None, - close=False, - buffered=True)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from xmlfile: - __aenter__, - __aexit__, - __enter__, - __exit__ -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - output_file, - encoding=None, - compression=None, - close=False, - buffered=True) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.iterparse-class.html b/doc/html/api/lxml.etree.iterparse-class.html deleted file mode 100644 index 30e070d..0000000 --- a/doc/html/api/lxml.etree.iterparse-class.html +++ /dev/null @@ -1,511 +0,0 @@ - - - - - lxml.etree.iterparse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class iterparse - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class iterparse

-
-object --+
-         |
-        iterparse
-
- -
-

iterparse(self, source, events=("end",), tag=None, attribute_defaults=False, dtd_validation=False, load_dtd=False, no_network=True, remove_blank_text=False, remove_comments=False, remove_pis=False, encoding=None, html=False, recover=None, huge_tree=False, schema=None)

-

Incremental parser.

-

Parses XML into a tree and generates tuples (event, element) in a -SAX-like fashion. event is any of 'start', 'end', 'start-ns', -'end-ns'.

-

For 'start' and 'end', element is the Element that the parser just -found opening or closing. For 'start-ns', it is a tuple (prefix, URI) of -a new namespace declaration. For 'end-ns', it is simply None. Note that -all start and end events are guaranteed to be properly nested.

-

The keyword argument events specifies a sequence of event type names -that should be generated. By default, only 'end' events will be -generated.

-

The additional tag argument restricts the 'start' and 'end' events to -those elements that match the given tag. The tag argument can also be -a sequence of tags to allow matching more than one tag. By default, -events are generated for all elements. Note that the 'start-ns' and -'end-ns' events are not impacted by this restriction.

-

The other keyword arguments in the constructor are mainly based on the -libxml2 parser configuration. A DTD will also be loaded if validation or -attribute default values are requested.

-
-
Available boolean keyword arguments:
-
    -
  • attribute_defaults: read default attributes from DTD
  • -
  • dtd_validation: validate (if DTD is available)
  • -
  • load_dtd: use DTD for parsing
  • -
  • no_network: prevent network access for related files
  • -
  • remove_blank_text: discard blank text nodes
  • -
  • remove_comments: discard comments
  • -
  • remove_pis: discard processing instructions
  • -
  • strip_cdata: replace CDATA sections by normal text content (default: True)
  • -
  • compact: safe memory for short text content (default: True)
  • -
  • resolve_entities: replace entities by their text value (default: True)
  • -
  • -
    huge_tree: disable security restrictions and support very deep trees
    -
    and very long text content (only affects libxml2 2.7+)
    -
    -
  • -
  • html: parse input as HTML (default: XML)
  • -
  • -
    recover: try hard to parse through broken input (default: True for HTML,
    -
    False otherwise)
    -
    -
  • -
-
-
Other keyword arguments:
-
    -
  • encoding: override the document encoding
  • -
  • schema: an XMLSchema to validate against
  • -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - source, - events=("end", - ), - tag=None, - attribute_defaults=False, - dtd_validation=False, - load_dtd=False, - no_network=True, - remove_blank_text=False, - remove_comments=False, - remove_pis=False, - encoding=None, - html=False, - recover=None, - huge_tree=False, - schema=None)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
-   - - - - - - -
__iter__(x)
- iter(x)
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__next__(...) - - -
- -
-   - - - - - - -
makeelement(self, - _tag, - attrib=None, - nsmap=None, - **_extra)
- Creates a new element associated with this parser.
- - -
- -
- the next value, or raise StopIteration - - - - - - -
next(x) - - -
- -
-   - - - - - - -
set_element_class_lookup(self, - lookup= None)
- Set a lookup scheme for element classes generated from this parser.
- - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - error_log
- The error log of the last (or current) parser run. -
-   - - resolvers
- The custom resolver registry of the last (or current) parser run. -
-   - - root -
-   - - version
- The version of the underlying XML parser. -
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - source, - events=("end", - ), - tag=None, - attribute_defaults=False, - dtd_validation=False, - load_dtd=False, - no_network=True, - remove_blank_text=False, - remove_comments=False, - remove_pis=False, - encoding=None, - html=False, - recover=None, - huge_tree=False, - schema=None) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

set_element_class_lookup(self, - lookup= None) -

-
  -
- -

Set a lookup scheme for element classes generated from this parser.

-

Reset it by passing None or nothing.

-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.iterwalk-class.html b/doc/html/api/lxml.etree.iterwalk-class.html deleted file mode 100644 index 03b0bc1..0000000 --- a/doc/html/api/lxml.etree.iterwalk-class.html +++ /dev/null @@ -1,392 +0,0 @@ - - - - - lxml.etree.iterwalk - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class iterwalk - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class iterwalk

-
-object --+
-         |
-        iterwalk
-
- -
-

iterwalk(self, element_or_tree, events=("end",), tag=None)

-

A tree walker that generates events from an existing tree as if it -was parsing XML data with iterparse().

-

Just as for iterparse(), the tag argument can be a single tag or a -sequence of tags.

-

After receiving a 'start' or 'start-ns' event, the children and -descendants of the current element can be excluded from iteration -by calling the skip_subtree() method.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - element_or_tree, - events=("end", - ), - tag=None)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
-   - - - - - - -
__iter__(x)
- iter(x)
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__next__(...) - - -
- -
- the next value, or raise StopIteration - - - - - - -
next(x) - - -
- -
-   - - - - - - -
skip_subtree(...)
- Prevent descending into the current subtree. -Instead, the next returned event will be the 'end' event of the current element -(if included), ignoring any children or descendants.
- - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - element_or_tree, - events=("end", - ), - tag=None) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

skip_subtree(...) -

-
  -
- -

Prevent descending into the current subtree. -Instead, the next returned event will be the 'end' event of the current element -(if included), ignoring any children or descendants.

-

This has no effect right after an 'end' or 'end-ns' event.

-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.etree.xmlfile-class.html b/doc/html/api/lxml.etree.xmlfile-class.html deleted file mode 100644 index f2dde1f..0000000 --- a/doc/html/api/lxml.etree.xmlfile-class.html +++ /dev/null @@ -1,397 +0,0 @@ - - - - - lxml.etree.xmlfile - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module etree :: - Class xmlfile - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class xmlfile

-
-object --+
-         |
-        xmlfile
-
- -
Known Subclasses:
-
- -
- -
-

xmlfile(self, output_file, encoding=None, compression=None, close=False, buffered=True)

-

A simple mechanism for incremental XML serialisation.

-

Usage example:

-
-with xmlfile("somefile.xml", encoding='utf-8') as xf:
-    xf.write_declaration(standalone=True)
-    xf.write_doctype('<!DOCTYPE root SYSTEM "some.dtd">')
-
-    # generate an element (the root element)
-    with xf.element('root'):
-         # write a complete Element into the open root element
-         xf.write(etree.Element('test'))
-
-         # generate and write more Elements, e.g. through iterparse
-         for element in generate_some_elements():
-             # serialise generated elements into the XML file
-             xf.write(element)
-
-         # or write multiple Elements or strings at once
-         xf.write(etree.Element('start'), "text", etree.Element('end'))
-
-

If 'output_file' is a file(-like) object, passing close=True will -close it when exiting the context manager. By default, it is left -to the owner to do that. When a file path is used, lxml will take care -of opening and closing the file itself. Also, when a compression level -is set, lxml will deliberately close the file to make sure all data gets -compressed and written.

-

Setting buffered=False will flush the output after each operation, -such as opening or closing an xf.element() block or calling -xf.write(). Alternatively, calling xf.flush() can be used to -explicitly flush any pending output when buffering is enabled.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__aenter__(...) - - -
- -
-   - - - - - - -
__aexit__(...) - - -
- -
-   - - - - - - -
__enter__(...) - - -
- -
-   - - - - - - -
__exit__(...) - - -
- -
-   - - - - - - -
__init__(self, - output_file, - encoding=None, - compression=None, - close=False, - buffered=True)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - output_file, - encoding=None, - compression=None, - close=False, - buffered=True) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html-module.html b/doc/html/api/lxml.html-module.html deleted file mode 100644 index 182eb88..0000000 --- a/doc/html/api/lxml.html-module.html +++ /dev/null @@ -1,1344 +0,0 @@ - - - - - lxml.html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Package html

source code

-The lxml.html tool set for HTML handling. - - - - - - - - -
- - - - - -
Submodules[hide private]
-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - CheckboxGroup
- Represents a group of checkboxes (<input type=checkbox>) that -have the same name. -
-   - - CheckboxValues
- Represents the values of the checked checkboxes in a group of -checkboxes with the same name. -
-   - - Classes
- Provides access to an element's class attribute as a set-like collection. -Usage: -
-   - - FieldsDict -
-   - - FormElement
- Represents a <form> element. -
-   - - HTMLParser
- An HTML parser that is configured to return lxml.html Element -objects. -
-   - - HtmlComment -
-   - - HtmlElement -
-   - - HtmlElementClassLookup
- A lookup scheme for HTML Element classes. -
-   - - HtmlEntity -
-   - - HtmlMixin -
-   - - HtmlProcessingInstruction -
-   - - InputElement
- Represents an <input> element. -
-   - - InputGetter
- An accessor that represents all the input fields in a form. -
-   - - InputMixin
- Mix-in for all input elements (input, select, and textarea) -
-   - - LabelElement
- Represents a <label> element. -
-   - - MultipleSelectOptions
- Represents all the selected options in a <select multiple> element. -
-   - - RadioGroup
- This object represents several <input type=radio> elements -that have the same name. -
-   - - SelectElement
- <select> element. You can get the name with .name. -
-   - - TextareaElement
- <textarea> element. You can get the name with .name and -get/set the value with .value -
-   - - XHTMLParser
- An XML parser that is configured to return lxml.html Element -objects. -
-   - - _MethodFunc
- An object that represents a method on an element as a function; -the function takes either an element or an HTML string. It -returns whatever the function normally returns, or if the function -works in-place (and so returns None) it returns a serialized form -of the resulting document. -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
Element(*args, - **kw)
- Create a new HTML Element.
- source code - -
- -
-   - - - - - - -
__bytes_replace_meta_content_type(...)
- sub(repl, string[, count = 0]) --> newstring -Return the string obtained by replacing the leftmost non-overlapping -occurrences of pattern in string by the replacement repl.
- source code - -
- -
-   - - - - - - -
__fix_docstring(s) - source code - -
- -
-   - - - - - - -
__str_replace_meta_content_type(...)
- sub(repl, string[, count = 0]) --> newstring -Return the string obtained by replacing the leftmost non-overlapping -occurrences of pattern in string by the replacement repl.
- source code - -
- -
-   - - - - - - -
_contains_block_level_tag(el) - source code - -
- -
-   - - - - - - -
_element_name(el) - source code - -
- -
-   - - - - - - -
_iter_css_imports(...)
- finditer(string[, pos[, endpos]]) --> iterator. -Return an iterator over all non-overlapping matches for the -RE pattern in string. For each match, the iterator returns a -match object.
- source code - -
- -
-   - - - - - - -
_iter_css_urls(...)
- finditer(string[, pos[, endpos]]) --> iterator. -Return an iterator over all non-overlapping matches for the -RE pattern in string. For each match, the iterator returns a -match object.
- source code - -
- -
-   - - - - - - -
_looks_like_full_html_bytes(...)
- match(string[, pos[, endpos]]) --> match object or None. -Matches zero or more characters at the beginning of the string
- source code - -
- -
-   - - - - - - -
_looks_like_full_html_unicode(...)
- match(string[, pos[, endpos]]) --> match object or None. -Matches zero or more characters at the beginning of the string
- source code - -
- -
-   - - - - - - -
_nons(tag) - source code - -
- -
-   - - - - - - -
_parse_meta_refresh_url(...)
- search(string[, pos[, endpos]]) --> match object or None. -Scan through string looking for a match, and return a corresponding -match object instance. Return None if no position in the string matches.
- source code - -
- -
-   - - - - - - -
_transform_result(typ, - result)
- Convert the result back into the input type.
- source code - -
- -
-   - - - - - - -
_unquote_match(s, - pos) - source code - -
- -
-   - - - - - - -
document_fromstring(html, - parser=None, - ensure_head_body=False, - **kw) - source code - -
- -
-   - - - - - - -
fragment_fromstring(html, - create_parent=False, - base_url=None, - parser=None, - **kw)
- Parses a single HTML element; it is an error if there is more than -one element, or if anything but whitespace precedes or follows the -element.
- source code - -
- -
-   - - - - - - -
fragments_fromstring(html, - no_leading_text=False, - base_url=None, - parser=None, - **kw)
- Parses several HTML elements, returning a list of elements.
- source code - -
- -
-   - - - - - - -
fromstring(html, - base_url=None, - parser=None, - **kw)
- Parse the html, returning a single element/document.
- source code - -
- -
-   - - - - - - -
html_to_xhtml(html)
- Convert all tags in an HTML tree to XHTML by moving them to the -XHTML namespace.
- source code - -
- -
-   - - - - - - -
open_http_urllib(method, - url, - values) - source code - -
- -
-   - - - - - - -
open_in_browser(doc, - encoding=None)
- Open the HTML document in a web browser, saving it to a temporary -file to open it. Note that this does not delete the file after -use. This is mainly meant for debugging.
- source code - -
- -
-   - - - - - - -
parse(filename_or_url, - parser=None, - base_url=None, - **kw)
- Parse a filename, URL, or file-like object into an HTML document -tree. Note: this returns a tree, not an element. Use -parse(...).getroot() to get the document root.
- source code - -
- -
-   - - - - - - -
submit_form(form, - extra_values=None, - open_http=None)
- Helper function to submit a form. Returns a file-like object, as from -urllib.urlopen(). This object also has a .geturl() function, -which shows the URL if there were any redirects.
- source code - -
- -
-   - - - - - - -
tostring(doc, - pretty_print=False, - include_meta_content_type=False, - encoding=None, - method='html', - with_tail=True, - doctype=None)
- Return an HTML string representation of the document.
- source code - -
- -
-   - - - - - - -
xhtml_to_html(xhtml)
- Convert all tags in an XHTML tree to HTML by removing their -XHTML namespace.
- source code - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - XHTML_NAMESPACE = 'http://www.w3.org/1999/xhtml' -
-   - - __package__ = 'lxml.html' -
-   - - _archive_re = re.compile(r'[^ ]+') -
-   - - _class_xpath = descendant-or-self::*[@class and contains(conca... -
-   - - _collect_string_content = string() -
-   - - _forms_xpath = descendant-or-self::form|descendant-or-self::x:... -
-   - - _id_xpath = descendant-or-self::*[@id=$id] -
-   - - _label_xpath = //label[@for=$id]|//x:label[@for=$id] -
-   - - _options_xpath = descendant-or-self::option|descendant-or-self... -
-   - - _rel_links_xpath = descendant-or-self::a[@rel]|descendant-or-s... -
-   - - find_class = <lxml.html._MethodFunc object> -
-   - - find_rel_links = <lxml.html._MethodFunc object> -
-   - - html_parser = <lxml.html.HTMLParser object> -
-   - - iterlinks = <lxml.html._MethodFunc object> -
-   - - make_links_absolute = <lxml.html._MethodFunc object> -
-   - - resolve_base_href = <lxml.html._MethodFunc object> -
-   - - rewrite_links = <lxml.html._MethodFunc object> -
-   - - xhtml_parser = <lxml.html.XHTMLParser object> -
- - - - - - -
- - - - - -
Function Details[hide private]
-
- -
- -
- - -
-

Element(*args, - **kw) -

-
source code  -
- -

Create a new HTML Element.

-

This can also be used for XHTML documents.

-
-
-
-
- -
- -
- - -
-

fragment_fromstring(html, - create_parent=False, - base_url=None, - parser=None, - **kw) -

-
source code  -
- -

Parses a single HTML element; it is an error if there is more than -one element, or if anything but whitespace precedes or follows the -element.

-

If create_parent is true (or is a tag name) then a parent node -will be created to encapsulate the HTML in a single element. In this -case, leading or trailing text is also allowed, as are multiple elements -as result of the parsing.

-

Passing a base_url will set the document's base_url attribute -(and the tree's docinfo.URL).

-
-
-
-
- -
- -
- - -
-

fragments_fromstring(html, - no_leading_text=False, - base_url=None, - parser=None, - **kw) -

-
source code  -
- -

Parses several HTML elements, returning a list of elements.

-

The first item in the list may be a string. -If no_leading_text is true, then it will be an error if there is -leading text, and it will always be a list of only elements.

-

base_url will set the document's base_url attribute -(and the tree's docinfo.URL).

-
-
-
-
- -
- -
- - -
-

fromstring(html, - base_url=None, - parser=None, - **kw) -

-
source code  -
- -

Parse the html, returning a single element/document.

-

This tries to minimally parse the chunk of text, without knowing if it -is a fragment or a document.

-

base_url will set the document's base_url attribute (and the tree's docinfo.URL)

-
-
-
-
- -
- -
- - -
-

parse(filename_or_url, - parser=None, - base_url=None, - **kw) -

-
source code  -
- -

Parse a filename, URL, or file-like object into an HTML document -tree. Note: this returns a tree, not an element. Use -parse(...).getroot() to get the document root.

-

You can override the base URL with the base_url keyword. This -is most useful when parsing from a file-like object.

-
-
-
-
- -
- -
- - -
-

submit_form(form, - extra_values=None, - open_http=None) -

-
source code  -
- -

Helper function to submit a form. Returns a file-like object, as from -urllib.urlopen(). This object also has a .geturl() function, -which shows the URL if there were any redirects.

-

You can use this like:

-
-form = doc.forms[0]
-form.inputs['foo'].value = 'bar' # etc
-response = form.submit()
-doc = parse(response)
-doc.make_links_absolute(response.geturl())
-
-

To change the HTTP requester, pass a function as open_http keyword -argument that opens the URL for you. The function must have the following -signature:

-
-open_http(method, URL, values)
-
-

The action is one of 'GET' or 'POST', the URL is the target URL as a -string, and the values are a sequence of (name, value) tuples with the -form data.

-
-
-
-
- -
- -
- - -
-

tostring(doc, - pretty_print=False, - include_meta_content_type=False, - encoding=None, - method='html', - with_tail=True, - doctype=None) -

-
source code  -
- -

Return an HTML string representation of the document.

-

Note: if include_meta_content_type is true this will create a -<meta http-equiv="Content-Type" ...> tag in the head; -regardless of the value of include_meta_content_type any existing -<meta http-equiv="Content-Type" ...> tag will be removed

-

The encoding argument controls the output encoding (defauts to -ASCII, with &#...; character references for any characters outside -of ASCII). Note that you can pass the name 'unicode' as -encoding argument to serialise to a Unicode string.

-

The method argument defines the output method. It defaults to -'html', but can also be 'xml' for xhtml output, or 'text' to -serialise to plain text without markup.

-

To leave out the tail text of the top-level element that is being -serialised, pass with_tail=False.

-

The doctype option allows passing in a plain string that will -be serialised before the XML tree. Note that passing in non -well-formed content here will make the XML output non well-formed. -Also, an existing doctype in the document tree will not be removed -when serialising an ElementTree instance.

-

Example:

-
->>> from lxml import html
->>> root = html.fragment_fromstring('<p>Hello<br>world!</p>')
-
->>> html.tostring(root)
-'<p>Hello<br>world!</p>'
->>> html.tostring(root, method='html')
-'<p>Hello<br>world!</p>'
-
->>> html.tostring(root, method='xml')
-'<p>Hello<br/>world!</p>'
-
->>> html.tostring(root, method='text')
-'Helloworld!'
-
->>> html.tostring(root, method='text', encoding='unicode')
-u'Helloworld!'
-
->>> root = html.fragment_fromstring('<div><p>Hello<br>world!</p>TAIL</div>')
->>> html.tostring(root[0], method='text', encoding='unicode')
-u'Helloworld!TAIL'
-
->>> html.tostring(root[0], method='text', encoding='unicode', with_tail=False)
-u'Helloworld!'
-
->>> doc = html.document_fromstring('<p>Hello<br>world!</p>')
->>> html.tostring(doc, method='html', encoding='unicode')
-u'<html><body><p>Hello<br>world!</p></body></html>'
-
->>> print(html.tostring(doc, method='html', encoding='unicode',
-...          doctype='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"'
-...                  ' "http://www.w3.org/TR/html4/strict.dtd">'))
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html><body><p>Hello<br>world!</p></body></html>
-
-
-
-
-
-
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

_class_xpath

- -
-
-
-
Value:
-
-descendant-or-self::*[@class and contains(concat(' ', normalize-space(\
-@class), ' '), concat(' ', $class_name, ' '))]
-
-
-
-
-
- -
- -
-

_forms_xpath

- -
-
-
-
Value:
-
-descendant-or-self::form|descendant-or-self::x:form
-
-
-
-
-
- -
- -
-

_options_xpath

- -
-
-
-
Value:
-
-descendant-or-self::option|descendant-or-self::x:option
-
-
-
-
-
- -
- -
-

_rel_links_xpath

- -
-
-
-
Value:
-
-descendant-or-self::a[@rel]|descendant-or-self::x:a[@rel]
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html-pysrc.html b/doc/html/api/lxml.html-pysrc.html deleted file mode 100644 index dcdb8e7..0000000 --- a/doc/html/api/lxml.html-pysrc.html +++ /dev/null @@ -1,4077 +0,0 @@ - - - - - lxml.html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Package lxml.html

-
-   1  # Copyright (c) 2004 Ian Bicking. All rights reserved. 
-   2  # 
-   3  # Redistribution and use in source and binary forms, with or without 
-   4  # modification, are permitted provided that the following conditions are 
-   5  # met: 
-   6  # 
-   7  # 1. Redistributions of source code must retain the above copyright 
-   8  # notice, this list of conditions and the following disclaimer. 
-   9  # 
-  10  # 2. Redistributions in binary form must reproduce the above copyright 
-  11  # notice, this list of conditions and the following disclaimer in 
-  12  # the documentation and/or other materials provided with the 
-  13  # distribution. 
-  14  # 
-  15  # 3. Neither the name of Ian Bicking nor the names of its contributors may 
-  16  # be used to endorse or promote products derived from this software 
-  17  # without specific prior written permission. 
-  18  # 
-  19  # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-  20  # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
-  21  # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
-  22  # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IAN BICKING OR 
-  23  # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
-  24  # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
-  25  # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
-  26  # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
-  27  # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
-  28  # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
-  29  # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
-  30   
-  31  """The ``lxml.html`` tool set for HTML handling. 
-  32  """ 
-  33   
-  34  from __future__ import absolute_import 
-  35   
-  36  __all__ = [ 
-  37      'document_fromstring', 'fragment_fromstring', 'fragments_fromstring', 'fromstring', 
-  38      'tostring', 'Element', 'defs', 'open_in_browser', 'submit_form', 
-  39      'find_rel_links', 'find_class', 'make_links_absolute', 
-  40      'resolve_base_href', 'iterlinks', 'rewrite_links', 'open_in_browser', 'parse'] 
-  41   
-  42   
-  43  import copy 
-  44  import sys 
-  45  import re 
-  46  from functools import partial 
-  47   
-  48  try: 
-  49      # while unnecessary, importing from 'collections.abc' is the right way to do it 
-  50      from collections.abc import MutableMapping, MutableSet 
-  51  except ImportError: 
-  52      from collections import MutableMapping, MutableSet 
-  53   
-  54  from .. import etree 
-  55  from . import defs 
-  56  from ._setmixin import SetMixin 
-  57   
-  58  try: 
-  59      from urlparse import urljoin 
-  60  except ImportError: 
-  61      # Python 3 
-  62      from urllib.parse import urljoin 
-  63   
-  64  try: 
-  65      unicode 
-  66  except NameError: 
-  67      # Python 3 
-  68      unicode = str 
-  69  try: 
-  70      basestring 
-  71  except NameError: 
-  72      # Python 3 
-  73      basestring = (str, bytes) 
-
74 - 75 - 76 -def __fix_docstring(s): -
77 if not s: - 78 return s - 79 if sys.version_info[0] >= 3: - 80 sub = re.compile(r"^(\s*)u'", re.M).sub - 81 else: - 82 sub = re.compile(r"^(\s*)b'", re.M).sub - 83 return sub(r"\1'", s) -
84 - 85 - 86 XHTML_NAMESPACE = "http://www.w3.org/1999/xhtml" - 87 - 88 _rel_links_xpath = etree.XPath("descendant-or-self::a[@rel]|descendant-or-self::x:a[@rel]", - 89 namespaces={'x':XHTML_NAMESPACE}) - 90 _options_xpath = etree.XPath("descendant-or-self::option|descendant-or-self::x:option", - 91 namespaces={'x':XHTML_NAMESPACE}) - 92 _forms_xpath = etree.XPath("descendant-or-self::form|descendant-or-self::x:form", - 93 namespaces={'x':XHTML_NAMESPACE}) - 94 #_class_xpath = etree.XPath(r"descendant-or-self::*[regexp:match(@class, concat('\b', $class_name, '\b'))]", {'regexp': 'http://exslt.org/regular-expressions'}) - 95 _class_xpath = etree.XPath("descendant-or-self::*[@class and contains(concat(' ', normalize-space(@class), ' '), concat(' ', $class_name, ' '))]") - 96 _id_xpath = etree.XPath("descendant-or-self::*[@id=$id]") - 97 _collect_string_content = etree.XPath("string()") - 98 _iter_css_urls = re.compile(r'url\(('+'["][^"]*["]|'+"['][^']*[']|"+r'[^)]*)\)', re.I).finditer - 99 _iter_css_imports = re.compile(r'@import "(.*?)"').finditer - 100 _label_xpath = etree.XPath("//label[@for=$id]|//x:label[@for=$id]", - 101 namespaces={'x':XHTML_NAMESPACE}) - 102 _archive_re = re.compile(r'[^ ]+') - 103 _parse_meta_refresh_url = re.compile( - 104 r'[^;=]*;\s*(?:url\s*=\s*)?(?P<url>.*)$', re.I).search -
105 - 106 - 107 -def _unquote_match(s, pos): -
108 if s[:1] == '"' and s[-1:] == '"' or s[:1] == "'" and s[-1:] == "'": - 109 return s[1:-1], pos+1 - 110 else: - 111 return s,pos -
112 -
113 - 114 -def _transform_result(typ, result): -
115 """Convert the result back into the input type. - 116 """ - 117 if issubclass(typ, bytes): - 118 return tostring(result, encoding='utf-8') - 119 elif issubclass(typ, unicode): - 120 return tostring(result, encoding='unicode') - 121 else: - 122 return result -
123 -
124 - 125 -def _nons(tag): -
126 if isinstance(tag, basestring): - 127 if tag[0] == '{' and tag[1:len(XHTML_NAMESPACE)+1] == XHTML_NAMESPACE: - 128 return tag.split('}')[-1] - 129 return tag -
130 -
131 - 132 -class Classes(MutableSet): -
133 """Provides access to an element's class attribute as a set-like collection. - 134 Usage:: - 135 - 136 >>> el = fromstring('<p class="hidden large">Text</p>') - 137 >>> classes = el.classes # or: classes = Classes(el.attrib) - 138 >>> classes |= ['block', 'paragraph'] - 139 >>> el.get('class') - 140 'hidden large block paragraph' - 141 >>> classes.toggle('hidden') - 142 False - 143 >>> el.get('class') - 144 'large block paragraph' - 145 >>> classes -= ('some', 'classes', 'block') - 146 >>> el.get('class') - 147 'large paragraph' - 148 """ -
149 - def __init__(self, attributes): -
150 self._attributes = attributes - 151 self._get_class_value = partial(attributes.get, 'class', '') -
152 -
153 - def add(self, value): -
154 """ - 155 Add a class. - 156 - 157 This has no effect if the class is already present. - 158 """ - 159 if not value or re.search(r'\s', value): - 160 raise ValueError("Invalid class name: %r" % value) - 161 classes = self._get_class_value().split() - 162 if value in classes: - 163 return - 164 classes.append(value) - 165 self._attributes['class'] = ' '.join(classes) -
166 -
167 - def discard(self, value): -
168 """ - 169 Remove a class if it is currently present. - 170 - 171 If the class is not present, do nothing. - 172 """ - 173 if not value or re.search(r'\s', value): - 174 raise ValueError("Invalid class name: %r" % value) - 175 classes = [name for name in self._get_class_value().split() - 176 if name != value] - 177 if classes: - 178 self._attributes['class'] = ' '.join(classes) - 179 elif 'class' in self._attributes: - 180 del self._attributes['class'] -
181 -
182 - def remove(self, value): -
183 """ - 184 Remove a class; it must currently be present. - 185 - 186 If the class is not present, raise a KeyError. - 187 """ - 188 if not value or re.search(r'\s', value): - 189 raise ValueError("Invalid class name: %r" % value) - 190 super(Classes, self).remove(value) -
191 -
192 - def __contains__(self, name): -
193 classes = self._get_class_value() - 194 return name in classes and name in classes.split() -
195 -
196 - def __iter__(self): -
197 return iter(self._get_class_value().split()) -
198 -
199 - def __len__(self): -
200 return len(self._get_class_value().split()) -
201 - 202 # non-standard methods - 203 -
204 - def update(self, values): -
205 """ - 206 Add all names from 'values'. - 207 """ - 208 classes = self._get_class_value().split() - 209 extended = False - 210 for value in values: - 211 if value not in classes: - 212 classes.append(value) - 213 extended = True - 214 if extended: - 215 self._attributes['class'] = ' '.join(classes) -
216 -
217 - def toggle(self, value): -
218 """ - 219 Add a class name if it isn't there yet, or remove it if it exists. - 220 - 221 Returns true if the class was added (and is now enabled) and - 222 false if it was removed (and is now disabled). - 223 """ - 224 if not value or re.search(r'\s', value): - 225 raise ValueError("Invalid class name: %r" % value) - 226 classes = self._get_class_value().split() - 227 try: - 228 classes.remove(value) - 229 enabled = False - 230 except ValueError: - 231 classes.append(value) - 232 enabled = True - 233 if classes: - 234 self._attributes['class'] = ' '.join(classes) - 235 else: - 236 del self._attributes['class'] - 237 return enabled -
238 -
239 - 240 -class HtmlMixin(object): -
241 -
242 - def set(self, key, value=None): -
243 """set(self, key, value=None) - 244 - 245 Sets an element attribute. If no value is provided, or if the value is None, - 246 creates a 'boolean' attribute without value, e.g. "<form novalidate></form>" - 247 for ``form.set('novalidate')``. - 248 """ - 249 super(HtmlElement, self).set(key, value) -
250 - 251 @property -
252 - def classes(self): -
253 """ - 254 A set-like wrapper around the 'class' attribute. - 255 """ - 256 return Classes(self.attrib) -
257 - 258 @classes.setter -
259 - def classes(self, classes): -
260 assert isinstance(classes, Classes) # only allow "el.classes |= ..." etc. - 261 value = classes._get_class_value() - 262 if value: - 263 self.set('class', value) - 264 elif self.get('class') is not None: - 265 del self.attrib['class'] -
266 - 267 @property -
268 - def base_url(self): -
269 """ - 270 Returns the base URL, given when the page was parsed. - 271 - 272 Use with ``urlparse.urljoin(el.base_url, href)`` to get - 273 absolute URLs. - 274 """ - 275 return self.getroottree().docinfo.URL -
276 - 277 @property -
278 - def forms(self): -
279 """ - 280 Return a list of all the forms - 281 """ - 282 return _forms_xpath(self) -
283 - 284 @property -
285 - def body(self): -
286 """ - 287 Return the <body> element. Can be called from a child element - 288 to get the document's head. - 289 """ - 290 return self.xpath('//body|//x:body', namespaces={'x':XHTML_NAMESPACE})[0] -
291 - 292 @property -
293 - def head(self): -
294 """ - 295 Returns the <head> element. Can be called from a child - 296 element to get the document's head. - 297 """ - 298 return self.xpath('//head|//x:head', namespaces={'x':XHTML_NAMESPACE})[0] -
299 - 300 @property -
301 - def label(self): -
302 """ - 303 Get or set any <label> element associated with this element. - 304 """ - 305 id = self.get('id') - 306 if not id: - 307 return None - 308 result = _label_xpath(self, id=id) - 309 if not result: - 310 return None - 311 else: - 312 return result[0] -
313 - 314 @label.setter -
315 - def label(self, label): -
316 id = self.get('id') - 317 if not id: - 318 raise TypeError( - 319 "You cannot set a label for an element (%r) that has no id" - 320 % self) - 321 if _nons(label.tag) != 'label': - 322 raise TypeError( - 323 "You can only assign label to a label element (not %r)" - 324 % label) - 325 label.set('for', id) -
326 - 327 @label.deleter -
328 - def label(self): -
329 label = self.label - 330 if label is not None: - 331 del label.attrib['for'] -
332 -
333 - def drop_tree(self): -
334 """ - 335 Removes this element from the tree, including its children and - 336 text. The tail text is joined to the previous element or - 337 parent. - 338 """ - 339 parent = self.getparent() - 340 assert parent is not None - 341 if self.tail: - 342 previous = self.getprevious() - 343 if previous is None: - 344 parent.text = (parent.text or '') + self.tail - 345 else: - 346 previous.tail = (previous.tail or '') + self.tail - 347 parent.remove(self) -
348 -
349 - def drop_tag(self): -
350 """ - 351 Remove the tag, but not its children or text. The children and text - 352 are merged into the parent. - 353 - 354 Example:: - 355 - 356 >>> h = fragment_fromstring('<div>Hello <b>World!</b></div>') - 357 >>> h.find('.//b').drop_tag() - 358 >>> print(tostring(h, encoding='unicode')) - 359 <div>Hello World!</div> - 360 """ - 361 parent = self.getparent() - 362 assert parent is not None - 363 previous = self.getprevious() - 364 if self.text and isinstance(self.tag, basestring): - 365 # not a Comment, etc. - 366 if previous is None: - 367 parent.text = (parent.text or '') + self.text - 368 else: - 369 previous.tail = (previous.tail or '') + self.text - 370 if self.tail: - 371 if len(self): - 372 last = self[-1] - 373 last.tail = (last.tail or '') + self.tail - 374 elif previous is None: - 375 parent.text = (parent.text or '') + self.tail - 376 else: - 377 previous.tail = (previous.tail or '') + self.tail - 378 index = parent.index(self) - 379 parent[index:index+1] = self[:] -
380 - 388 -
389 - def find_class(self, class_name): -
390 """ - 391 Find any elements with the given class name. - 392 """ - 393 return _class_xpath(self, class_name=class_name) -
394 -
395 - def get_element_by_id(self, id, *default): -
396 """ - 397 Get the first element in a document with the given id. If none is - 398 found, return the default argument if provided or raise KeyError - 399 otherwise. - 400 - 401 Note that there can be more than one element with the same id, - 402 and this isn't uncommon in HTML documents found in the wild. - 403 Browsers return only the first match, and this function does - 404 the same. - 405 """ - 406 try: - 407 # FIXME: should this check for multiple matches? - 408 # browsers just return the first one - 409 return _id_xpath(self, id=id)[0] - 410 except IndexError: - 411 if default: - 412 return default[0] - 413 else: - 414 raise KeyError(id) -
415 -
416 - def text_content(self): -
417 """ - 418 Return the text content of the tag (and the text in any children). - 419 """ - 420 return _collect_string_content(self) -
421 -
422 - def cssselect(self, expr, translator='html'): -
423 """ - 424 Run the CSS expression on this element and its children, - 425 returning a list of the results. - 426 - 427 Equivalent to lxml.cssselect.CSSSelect(expr, translator='html')(self) - 428 -- note that pre-compiling the expression can provide a substantial - 429 speedup. - 430 """ - 431 # Do the import here to make the dependency optional. - 432 from lxml.cssselect import CSSSelector - 433 return CSSSelector(expr, translator=translator)(self) -
434 - 435 ######################################## - 436 ## Link functions - 437 ######################################## - 438 - 469 elif handle_failures == 'discard': - 470 def link_repl(href): - 471 try: - 472 return urljoin(base_url, href) - 473 except ValueError: - 474 return None -
475 elif handle_failures is None: - 476 def link_repl(href): - 477 return urljoin(base_url, href) - 478 else: - 479 raise ValueError( - 480 "unexpected value for handle_failures: %r" % handle_failures) - 481 - 482 self.rewrite_links(link_repl) - 483 -
484 - def resolve_base_href(self, handle_failures=None): -
485 """ - 486 Find any ``<base href>`` tag in the document, and apply its - 487 values to all links found in the document. Also remove the - 488 tag once it has been applied. - 489 - 490 If ``handle_failures`` is None (default), a failure to process - 491 a URL will abort the processing. If set to 'ignore', errors - 492 are ignored. If set to 'discard', failing URLs will be removed. - 493 """ - 494 base_href = None - 495 basetags = self.xpath('//base[@href]|//x:base[@href]', - 496 namespaces={'x': XHTML_NAMESPACE}) - 497 for b in basetags: - 498 base_href = b.get('href') - 499 b.drop_tree() - 500 if not base_href: - 501 return - 502 self.make_links_absolute(base_href, resolve_base_href=False, - 503 handle_failures=handle_failures) -
504 - 594 - 643 -
644 - 645 -class _MethodFunc(object): -
646 """ - 647 An object that represents a method on an element as a function; - 648 the function takes either an element or an HTML string. It - 649 returns whatever the function normally returns, or if the function - 650 works in-place (and so returns None) it returns a serialized form - 651 of the resulting document. - 652 """ -
653 - def __init__(self, name, copy=False, source_class=HtmlMixin): -
654 self.name = name - 655 self.copy = copy - 656 self.__doc__ = getattr(source_class, self.name).__doc__ -
657 - def __call__(self, doc, *args, **kw): -
658 result_type = type(doc) - 659 if isinstance(doc, basestring): - 660 if 'copy' in kw: - 661 raise TypeError( - 662 "The keyword 'copy' can only be used with element inputs to %s, not a string input" % self.name) - 663 doc = fromstring(doc, **kw) - 664 else: - 665 if 'copy' in kw: - 666 make_a_copy = kw.pop('copy') - 667 else: - 668 make_a_copy = self.copy - 669 if make_a_copy: - 670 doc = copy.deepcopy(doc) - 671 meth = getattr(doc, self.name) - 672 result = meth(*args, **kw) - 673 # FIXME: this None test is a bit sloppy - 674 if result is None: - 675 # Then return what we got in - 676 return _transform_result(result_type, doc) - 677 else: - 678 return result -
679 - 680 - 681 find_rel_links = _MethodFunc('find_rel_links', copy=False) - 682 find_class = _MethodFunc('find_class', copy=False) - 683 make_links_absolute = _MethodFunc('make_links_absolute', copy=True) - 684 resolve_base_href = _MethodFunc('resolve_base_href', copy=True) - 685 iterlinks = _MethodFunc('iterlinks', copy=False) - 686 rewrite_links = _MethodFunc('rewrite_links', copy=True) -
687 - 688 - 689 -class HtmlComment(etree.CommentBase, HtmlMixin): -
690 pass -
691 -
692 - 693 -class HtmlElement(etree.ElementBase, HtmlMixin): -
694 # Override etree.ElementBase.cssselect() and set(), despite the MRO (FIXME: change base order?) - 695 cssselect = HtmlMixin.cssselect - 696 set = HtmlMixin.set -
697 -
698 - 699 -class HtmlProcessingInstruction(etree.PIBase, HtmlMixin): -
700 pass -
701 -
702 - 703 -class HtmlEntity(etree.EntityBase, HtmlMixin): -
704 pass -
705 -
706 - 707 -class HtmlElementClassLookup(etree.CustomElementClassLookup): -
708 """A lookup scheme for HTML Element classes. - 709 - 710 To create a lookup instance with different Element classes, pass a tag - 711 name mapping of Element classes in the ``classes`` keyword argument and/or - 712 a tag name mapping of Mixin classes in the ``mixins`` keyword argument. - 713 The special key '*' denotes a Mixin class that should be mixed into all - 714 Element classes. - 715 """ - 716 _default_element_classes = {} - 717 -
718 - def __init__(self, classes=None, mixins=None): -
719 etree.CustomElementClassLookup.__init__(self) - 720 if classes is None: - 721 classes = self._default_element_classes.copy() - 722 if mixins: - 723 mixers = {} - 724 for name, value in mixins: - 725 if name == '*': - 726 for n in classes.keys(): - 727 mixers.setdefault(n, []).append(value) - 728 else: - 729 mixers.setdefault(name, []).append(value) - 730 for name, mix_bases in mixers.items(): - 731 cur = classes.get(name, HtmlElement) - 732 bases = tuple(mix_bases + [cur]) - 733 classes[name] = type(cur.__name__, bases, {}) - 734 self._element_classes = classes -
735 -
736 - def lookup(self, node_type, document, namespace, name): -
737 if node_type == 'element': - 738 return self._element_classes.get(name.lower(), HtmlElement) - 739 elif node_type == 'comment': - 740 return HtmlComment - 741 elif node_type == 'PI': - 742 return HtmlProcessingInstruction - 743 elif node_type == 'entity': - 744 return HtmlEntity - 745 # Otherwise normal lookup - 746 return None -
747 - 748 - 749 ################################################################################ - 750 # parsing - 751 ################################################################################ - 752 - 753 _looks_like_full_html_unicode = re.compile( - 754 unicode(r'^\s*<(?:html|!doctype)'), re.I).match - 755 _looks_like_full_html_bytes = re.compile( - 756 r'^\s*<(?:html|!doctype)'.encode('ascii'), re.I).match -
757 - 758 - 759 -def document_fromstring(html, parser=None, ensure_head_body=False, **kw): -
760 if parser is None: - 761 parser = html_parser - 762 value = etree.fromstring(html, parser, **kw) - 763 if value is None: - 764 raise etree.ParserError( - 765 "Document is empty") - 766 if ensure_head_body and value.find('head') is None: - 767 value.insert(0, Element('head')) - 768 if ensure_head_body and value.find('body') is None: - 769 value.append(Element('body')) - 770 return value -
771 -
772 - 773 -def fragments_fromstring(html, no_leading_text=False, base_url=None, - 774 parser=None, **kw): -
775 """Parses several HTML elements, returning a list of elements. - 776 - 777 The first item in the list may be a string. - 778 If no_leading_text is true, then it will be an error if there is - 779 leading text, and it will always be a list of only elements. - 780 - 781 base_url will set the document's base_url attribute - 782 (and the tree's docinfo.URL). - 783 """ - 784 if parser is None: - 785 parser = html_parser - 786 # FIXME: check what happens when you give html with a body, head, etc. - 787 if isinstance(html, bytes): - 788 if not _looks_like_full_html_bytes(html): - 789 # can't use %-formatting in early Py3 versions - 790 html = ('<html><body>'.encode('ascii') + html + - 791 '</body></html>'.encode('ascii')) - 792 else: - 793 if not _looks_like_full_html_unicode(html): - 794 html = '<html><body>%s</body></html>' % html - 795 doc = document_fromstring(html, parser=parser, base_url=base_url, **kw) - 796 assert _nons(doc.tag) == 'html' - 797 bodies = [e for e in doc if _nons(e.tag) == 'body'] - 798 assert len(bodies) == 1, ("too many bodies: %r in %r" % (bodies, html)) - 799 body = bodies[0] - 800 elements = [] - 801 if no_leading_text and body.text and body.text.strip(): - 802 raise etree.ParserError( - 803 "There is leading text: %r" % body.text) - 804 if body.text and body.text.strip(): - 805 elements.append(body.text) - 806 elements.extend(body) - 807 # FIXME: removing the reference to the parent artificial document - 808 # would be nice - 809 return elements -
810 -
811 - 812 -def fragment_fromstring(html, create_parent=False, base_url=None, - 813 parser=None, **kw): -
814 """ - 815 Parses a single HTML element; it is an error if there is more than - 816 one element, or if anything but whitespace precedes or follows the - 817 element. - 818 - 819 If ``create_parent`` is true (or is a tag name) then a parent node - 820 will be created to encapsulate the HTML in a single element. In this - 821 case, leading or trailing text is also allowed, as are multiple elements - 822 as result of the parsing. - 823 - 824 Passing a ``base_url`` will set the document's ``base_url`` attribute - 825 (and the tree's docinfo.URL). - 826 """ - 827 if parser is None: - 828 parser = html_parser - 829 - 830 accept_leading_text = bool(create_parent) - 831 - 832 elements = fragments_fromstring( - 833 html, parser=parser, no_leading_text=not accept_leading_text, - 834 base_url=base_url, **kw) - 835 - 836 if create_parent: - 837 if not isinstance(create_parent, basestring): - 838 create_parent = 'div' - 839 new_root = Element(create_parent) - 840 if elements: - 841 if isinstance(elements[0], basestring): - 842 new_root.text = elements[0] - 843 del elements[0] - 844 new_root.extend(elements) - 845 return new_root - 846 - 847 if not elements: - 848 raise etree.ParserError('No elements found') - 849 if len(elements) > 1: - 850 raise etree.ParserError( - 851 "Multiple elements found (%s)" - 852 % ', '.join([_element_name(e) for e in elements])) - 853 el = elements[0] - 854 if el.tail and el.tail.strip(): - 855 raise etree.ParserError( - 856 "Element followed by text: %r" % el.tail) - 857 el.tail = None - 858 return el -
859 -
860 - 861 -def fromstring(html, base_url=None, parser=None, **kw): -
862 """ - 863 Parse the html, returning a single element/document. - 864 - 865 This tries to minimally parse the chunk of text, without knowing if it - 866 is a fragment or a document. - 867 - 868 base_url will set the document's base_url attribute (and the tree's docinfo.URL) - 869 """ - 870 if parser is None: - 871 parser = html_parser - 872 if isinstance(html, bytes): - 873 is_full_html = _looks_like_full_html_bytes(html) - 874 else: - 875 is_full_html = _looks_like_full_html_unicode(html) - 876 doc = document_fromstring(html, parser=parser, base_url=base_url, **kw) - 877 if is_full_html: - 878 return doc - 879 # otherwise, lets parse it out... - 880 bodies = doc.findall('body') - 881 if not bodies: - 882 bodies = doc.findall('{%s}body' % XHTML_NAMESPACE) - 883 if bodies: - 884 body = bodies[0] - 885 if len(bodies) > 1: - 886 # Somehow there are multiple bodies, which is bad, but just - 887 # smash them into one body - 888 for other_body in bodies[1:]: - 889 if other_body.text: - 890 if len(body): - 891 body[-1].tail = (body[-1].tail or '') + other_body.text - 892 else: - 893 body.text = (body.text or '') + other_body.text - 894 body.extend(other_body) - 895 # We'll ignore tail - 896 # I guess we are ignoring attributes too - 897 other_body.drop_tree() - 898 else: - 899 body = None - 900 heads = doc.findall('head') - 901 if not heads: - 902 heads = doc.findall('{%s}head' % XHTML_NAMESPACE) - 903 if heads: - 904 # Well, we have some sort of structure, so lets keep it all - 905 head = heads[0] - 906 if len(heads) > 1: - 907 for other_head in heads[1:]: - 908 head.extend(other_head) - 909 # We don't care about text or tail in a head - 910 other_head.drop_tree() - 911 return doc - 912 if body is None: - 913 return doc - 914 if (len(body) == 1 and (not body.text or not body.text.strip()) - 915 and (not body[-1].tail or not body[-1].tail.strip())): - 916 # The body has just one element, so it was probably a single - 917 # element passed in - 918 return body[0] - 919 # Now we have a body which represents a bunch of tags which have the - 920 # content that was passed in. We will create a fake container, which - 921 # is the body tag, except <body> implies too much structure. - 922 if _contains_block_level_tag(body): - 923 body.tag = 'div' - 924 else: - 925 body.tag = 'span' - 926 return body -
927 -
928 - 929 -def parse(filename_or_url, parser=None, base_url=None, **kw): -
930 """ - 931 Parse a filename, URL, or file-like object into an HTML document - 932 tree. Note: this returns a tree, not an element. Use - 933 ``parse(...).getroot()`` to get the document root. - 934 - 935 You can override the base URL with the ``base_url`` keyword. This - 936 is most useful when parsing from a file-like object. - 937 """ - 938 if parser is None: - 939 parser = html_parser - 940 return etree.parse(filename_or_url, parser, base_url=base_url, **kw) -
941 -
942 - 943 -def _contains_block_level_tag(el): -
944 # FIXME: I could do this with XPath, but would that just be - 945 # unnecessarily slow? - 946 for el in el.iter(etree.Element): - 947 if _nons(el.tag) in defs.block_tags: - 948 return True - 949 return False -
950 -
951 - 952 -def _element_name(el): -
953 if isinstance(el, etree.CommentBase): - 954 return 'comment' - 955 elif isinstance(el, basestring): - 956 return 'string' - 957 else: - 958 return _nons(el.tag) -
959 -
960 - 961 ################################################################################ - 962 # form handling - 963 ################################################################################ - 964 - 965 -class FormElement(HtmlElement): -
966 """ - 967 Represents a <form> element. - 968 """ - 969 - 970 @property -
971 - def inputs(self): -
972 """ - 973 Returns an accessor for all the input elements in the form. - 974 - 975 See `InputGetter` for more information about the object. - 976 """ - 977 return InputGetter(self) -
978 - 979 @property -
980 - def fields(self): -
981 """ - 982 Dictionary-like object that represents all the fields in this - 983 form. You can set values in this dictionary to effect the - 984 form. - 985 """ - 986 return FieldsDict(self.inputs) -
987 - 988 @fields.setter -
989 - def fields(self, value): -
990 fields = self.fields - 991 prev_keys = fields.keys() - 992 for key, value in value.items(): - 993 if key in prev_keys: - 994 prev_keys.remove(key) - 995 fields[key] = value - 996 for key in prev_keys: - 997 if key is None: - 998 # Case of an unnamed input; these aren't really - 999 # expressed in form_values() anyway. -1000 continue -1001 fields[key] = None -
1002 -
1003 - def _name(self): -
1004 if self.get('name'): -1005 return self.get('name') -1006 elif self.get('id'): -1007 return '#' + self.get('id') -1008 iter_tags = self.body.iter -1009 forms = list(iter_tags('form')) -1010 if not forms: -1011 forms = list(iter_tags('{%s}form' % XHTML_NAMESPACE)) -1012 return str(forms.index(self)) -
1013 -
1014 - def form_values(self): -
1015 """ -1016 Return a list of tuples of the field values for the form. -1017 This is suitable to be passed to ``urllib.urlencode()``. -1018 """ -1019 results = [] -1020 for el in self.inputs: -1021 name = el.name -1022 if not name or 'disabled' in el.attrib: -1023 continue -1024 tag = _nons(el.tag) -1025 if tag == 'textarea': -1026 results.append((name, el.value)) -1027 elif tag == 'select': -1028 value = el.value -1029 if el.multiple: -1030 for v in value: -1031 results.append((name, v)) -1032 elif value is not None: -1033 results.append((name, el.value)) -1034 else: -1035 assert tag == 'input', ( -1036 "Unexpected tag: %r" % el) -1037 if el.checkable and not el.checked: -1038 continue -1039 if el.type in ('submit', 'image', 'reset', 'file'): -1040 continue -1041 value = el.value -1042 if value is not None: -1043 results.append((name, el.value)) -1044 return results -
1045 -1046 @property -
1047 - def action(self): -
1048 """ -1049 Get/set the form's ``action`` attribute. -1050 """ -1051 base_url = self.base_url -1052 action = self.get('action') -1053 if base_url and action is not None: -1054 return urljoin(base_url, action) -1055 else: -1056 return action -
1057 -1058 @action.setter -
1059 - def action(self, value): -
1060 self.set('action', value) -
1061 -1062 @action.deleter -
1063 - def action(self): -
1064 attrib = self.attrib -1065 if 'action' in attrib: -1066 del attrib['action'] -
1067 -1068 @property -
1069 - def method(self): -
1070 """ -1071 Get/set the form's method. Always returns a capitalized -1072 string, and defaults to ``'GET'`` -1073 """ -1074 return self.get('method', 'GET').upper() -
1075 -1076 @method.setter -
1077 - def method(self, value): -
1078 self.set('method', value.upper()) -
1079 -1080 -1081 HtmlElementClassLookup._default_element_classes['form'] = FormElement -
1082 -1083 -1084 -def submit_form(form, extra_values=None, open_http=None): -
1085 """ -1086 Helper function to submit a form. Returns a file-like object, as from -1087 ``urllib.urlopen()``. This object also has a ``.geturl()`` function, -1088 which shows the URL if there were any redirects. -1089 -1090 You can use this like:: -1091 -1092 form = doc.forms[0] -1093 form.inputs['foo'].value = 'bar' # etc -1094 response = form.submit() -1095 doc = parse(response) -1096 doc.make_links_absolute(response.geturl()) -1097 -1098 To change the HTTP requester, pass a function as ``open_http`` keyword -1099 argument that opens the URL for you. The function must have the following -1100 signature:: -1101 -1102 open_http(method, URL, values) -1103 -1104 The action is one of 'GET' or 'POST', the URL is the target URL as a -1105 string, and the values are a sequence of ``(name, value)`` tuples with the -1106 form data. -1107 """ -1108 values = form.form_values() -1109 if extra_values: -1110 if hasattr(extra_values, 'items'): -1111 extra_values = extra_values.items() -1112 values.extend(extra_values) -1113 if open_http is None: -1114 open_http = open_http_urllib -1115 if form.action: -1116 url = form.action -1117 else: -1118 url = form.base_url -1119 return open_http(form.method, url, values) -
1120 -
1121 -1122 -def open_http_urllib(method, url, values): -
1123 if not url: -1124 raise ValueError("cannot submit, no URL provided") -1125 ## FIXME: should test that it's not a relative URL or something -1126 try: -1127 from urllib import urlencode, urlopen -1128 except ImportError: # Python 3 -1129 from urllib.request import urlopen -1130 from urllib.parse import urlencode -1131 if method == 'GET': -1132 if '?' in url: -1133 url += '&' -1134 else: -1135 url += '?' -1136 url += urlencode(values) -1137 data = None -1138 else: -1139 data = urlencode(values) -1140 if not isinstance(data, bytes): -1141 data = data.encode('ASCII') -1142 return urlopen(url, data) -
1143 -
1144 -1145 -class FieldsDict(MutableMapping): -
1146 -
1147 - def __init__(self, inputs): -
1148 self.inputs = inputs -
1149 - def __getitem__(self, item): -
1150 return self.inputs[item].value -
1151 - def __setitem__(self, item, value): -
1152 self.inputs[item].value = value -
1153 - def __delitem__(self, item): -
1154 raise KeyError( -1155 "You cannot remove keys from ElementDict") -
1156 - def keys(self): -
1157 return self.inputs.keys() -
1158 - def __contains__(self, item): -
1159 return item in self.inputs -
1160 - def __iter__(self): -
1161 return iter(self.inputs.keys()) -
1162 - def __len__(self): -
1163 return len(self.inputs) -
1164 -
1165 - def __repr__(self): -
1166 return '<%s for form %s>' % ( -1167 self.__class__.__name__, -1168 self.inputs.form._name()) -
1169 -
1170 -1171 -class InputGetter(object): -
1172 -1173 """ -1174 An accessor that represents all the input fields in a form. -1175 -1176 You can get fields by name from this, with -1177 ``form.inputs['field_name']``. If there are a set of checkboxes -1178 with the same name, they are returned as a list (a `CheckboxGroup` -1179 which also allows value setting). Radio inputs are handled -1180 similarly. -1181 -1182 You can also iterate over this to get all input elements. This -1183 won't return the same thing as if you get all the names, as -1184 checkboxes and radio elements are returned individually. -1185 """ -1186 -1187 _name_xpath = etree.XPath(".//*[@name = $name and (local-name(.) = 'select' or local-name(.) = 'input' or local-name(.) = 'textarea')]") -1188 _all_xpath = etree.XPath(".//*[local-name() = 'select' or local-name() = 'input' or local-name() = 'textarea']") -1189 -
1190 - def __init__(self, form): -
1191 self.form = form -
1192 -
1193 - def __repr__(self): -
1194 return '<%s for form %s>' % ( -1195 self.__class__.__name__, -1196 self.form._name()) -
1197 -1198 ## FIXME: there should be more methods, and it's unclear if this is -1199 ## a dictionary-like object or list-like object -1200 -
1201 - def __getitem__(self, name): -
1202 results = self._name_xpath(self.form, name=name) -1203 if results: -1204 type = results[0].get('type') -1205 if type == 'radio' and len(results) > 1: -1206 group = RadioGroup(results) -1207 group.name = name -1208 return group -1209 elif type == 'checkbox' and len(results) > 1: -1210 group = CheckboxGroup(results) -1211 group.name = name -1212 return group -1213 else: -1214 # I don't like throwing away elements like this -1215 return results[0] -1216 else: -1217 raise KeyError( -1218 "No input element with the name %r" % name) -
1219 -
1220 - def __contains__(self, name): -
1221 results = self._name_xpath(self.form, name=name) -1222 return bool(results) -
1223 -
1224 - def keys(self): -
1225 names = set() -1226 for el in self: -1227 names.add(el.name) -1228 if None in names: -1229 names.remove(None) -1230 return list(names) -
1231 -
1232 - def __iter__(self): -
1233 ## FIXME: kind of dumb to turn a list into an iterator, only -1234 ## to have it likely turned back into a list again :( -1235 return iter(self._all_xpath(self.form)) -
1236 -
1237 -1238 -class InputMixin(object): -
1239 """ -1240 Mix-in for all input elements (input, select, and textarea) -1241 """ -1242 @property -
1243 - def name(self): -
1244 """ -1245 Get/set the name of the element -1246 """ -1247 return self.get('name') -
1248 -1249 @name.setter -
1250 - def name(self, value): -
1251 self.set('name', value) -
1252 -1253 @name.deleter -
1254 - def name(self): -
1255 attrib = self.attrib -1256 if 'name' in attrib: -1257 del attrib['name'] -
1258 -
1259 - def __repr__(self): -
1260 type_name = getattr(self, 'type', None) -1261 if type_name: -1262 type_name = ' type=%r' % type_name -1263 else: -1264 type_name = '' -1265 return '<%s %x name=%r%s>' % ( -1266 self.__class__.__name__, id(self), self.name, type_name) -
1267 -
1268 -1269 -class TextareaElement(InputMixin, HtmlElement): -
1270 """ -1271 ``<textarea>`` element. You can get the name with ``.name`` and -1272 get/set the value with ``.value`` -1273 """ -1274 @property -
1275 - def value(self): -
1276 """ -1277 Get/set the value (which is the contents of this element) -1278 """ -1279 content = self.text or '' -1280 if self.tag.startswith("{%s}" % XHTML_NAMESPACE): -1281 serialisation_method = 'xml' -1282 else: -1283 serialisation_method = 'html' -1284 for el in self: -1285 # it's rare that we actually get here, so let's not use ''.join() -1286 content += etree.tostring( -1287 el, method=serialisation_method, encoding='unicode') -1288 return content -
1289 -1290 @value.setter -
1291 - def value(self, value): -
1292 del self[:] -1293 self.text = value -
1294 -1295 @value.deleter -
1296 - def value(self): -
1297 self.text = '' -1298 del self[:] -
1299 -1300 -1301 HtmlElementClassLookup._default_element_classes['textarea'] = TextareaElement -
1302 -1303 -1304 -class SelectElement(InputMixin, HtmlElement): -
1305 """ -1306 ``<select>`` element. You can get the name with ``.name``. -1307 -1308 ``.value`` will be the value of the selected option, unless this -1309 is a multi-select element (``<select multiple>``), in which case -1310 it will be a set-like object. In either case ``.value_options`` -1311 gives the possible values. -1312 -1313 The boolean attribute ``.multiple`` shows if this is a -1314 multi-select. -1315 """ -1316 @property -
1317 - def value(self): -
1318 """ -1319 Get/set the value of this select (the selected option). -1320 -1321 If this is a multi-select, this is a set-like object that -1322 represents all the selected options. -1323 """ -1324 if self.multiple: -1325 return MultipleSelectOptions(self) -1326 options = _options_xpath(self) -1327 -1328 try: -1329 selected_option = next(el for el in reversed(options) if el.get('selected') is not None) -1330 except StopIteration: -1331 try: -1332 selected_option = next(el for el in options if el.get('disabled') is None) -1333 except StopIteration: -1334 return None -1335 value = selected_option.get('value') -1336 if value is None: -1337 value = (selected_option.text or '').strip() -1338 return value -
1339 -1340 @value.setter -
1341 - def value(self, value): -
1342 if self.multiple: -1343 if isinstance(value, basestring): -1344 raise TypeError("You must pass in a sequence") -1345 values = self.value -1346 values.clear() -1347 values.update(value) -1348 return -1349 checked_option = None -1350 if value is not None: -1351 for el in _options_xpath(self): -1352 opt_value = el.get('value') -1353 if opt_value is None: -1354 opt_value = (el.text or '').strip() -1355 if opt_value == value: -1356 checked_option = el -1357 break -1358 else: -1359 raise ValueError( -1360 "There is no option with the value of %r" % value) -1361 for el in _options_xpath(self): -1362 if 'selected' in el.attrib: -1363 del el.attrib['selected'] -1364 if checked_option is not None: -1365 checked_option.set('selected', '') -
1366 -1367 @value.deleter -
1368 - def value(self): -
1369 # FIXME: should del be allowed at all? -1370 if self.multiple: -1371 self.value.clear() -1372 else: -1373 self.value = None -
1374 -1375 @property -
1376 - def value_options(self): -
1377 """ -1378 All the possible values this select can have (the ``value`` -1379 attribute of all the ``<option>`` elements. -1380 """ -1381 options = [] -1382 for el in _options_xpath(self): -1383 value = el.get('value') -1384 if value is None: -1385 value = (el.text or '').strip() -1386 options.append(value) -1387 return options -
1388 -1389 @property -
1390 - def multiple(self): -
1391 """ -1392 Boolean attribute: is there a ``multiple`` attribute on this element. -1393 """ -1394 return 'multiple' in self.attrib -
1395 -1396 @multiple.setter -
1397 - def multiple(self, value): -
1398 if value: -1399 self.set('multiple', '') -1400 elif 'multiple' in self.attrib: -1401 del self.attrib['multiple'] -
1402 -1403 -1404 HtmlElementClassLookup._default_element_classes['select'] = SelectElement -
1405 -1406 -1407 -class MultipleSelectOptions(SetMixin): -
1408 """ -1409 Represents all the selected options in a ``<select multiple>`` element. -1410 -1411 You can add to this set-like option to select an option, or remove -1412 to unselect the option. -1413 """ -1414 -
1415 - def __init__(self, select): -
1416 self.select = select -
1417 -1418 @property -
1419 - def options(self): -
1420 """ -1421 Iterator of all the ``<option>`` elements. -1422 """ -1423 return iter(_options_xpath(self.select)) -
1424 -
1425 - def __iter__(self): -
1426 for option in self.options: -1427 if 'selected' in option.attrib: -1428 opt_value = option.get('value') -1429 if opt_value is None: -1430 opt_value = (option.text or '').strip() -1431 yield opt_value -
1432 -
1433 - def add(self, item): -
1434 for option in self.options: -1435 opt_value = option.get('value') -1436 if opt_value is None: -1437 opt_value = (option.text or '').strip() -1438 if opt_value == item: -1439 option.set('selected', '') -1440 break -1441 else: -1442 raise ValueError( -1443 "There is no option with the value %r" % item) -
1444 -
1445 - def remove(self, item): -
1446 for option in self.options: -1447 opt_value = option.get('value') -1448 if opt_value is None: -1449 opt_value = (option.text or '').strip() -1450 if opt_value == item: -1451 if 'selected' in option.attrib: -1452 del option.attrib['selected'] -1453 else: -1454 raise ValueError( -1455 "The option %r is not currently selected" % item) -1456 break -1457 else: -1458 raise ValueError( -1459 "There is not option with the value %r" % item) -
1460 -
1461 - def __repr__(self): -
1462 return '<%s {%s} for select name=%r>' % ( -1463 self.__class__.__name__, -1464 ', '.join([repr(v) for v in self]), -1465 self.select.name) -
1466 -
1467 -1468 -class RadioGroup(list): -
1469 """ -1470 This object represents several ``<input type=radio>`` elements -1471 that have the same name. -1472 -1473 You can use this like a list, but also use the property -1474 ``.value`` to check/uncheck inputs. Also you can use -1475 ``.value_options`` to get the possible values. -1476 """ -1477 @property -
1478 - def value(self): -
1479 """ -1480 Get/set the value, which checks the radio with that value (and -1481 unchecks any other value). -1482 """ -1483 for el in self: -1484 if 'checked' in el.attrib: -1485 return el.get('value') -1486 return None -
1487 -1488 @value.setter -
1489 - def value(self, value): -
1490 checked_option = None -1491 if value is not None: -1492 for el in self: -1493 if el.get('value') == value: -1494 checked_option = el -1495 break -1496 else: -1497 raise ValueError("There is no radio input with the value %r" % value) -1498 for el in self: -1499 if 'checked' in el.attrib: -1500 del el.attrib['checked'] -1501 if checked_option is not None: -1502 checked_option.set('checked', '') -
1503 -1504 @value.deleter -
1505 - def value(self): -
1506 self.value = None -
1507 -1508 @property -
1509 - def value_options(self): -
1510 """ -1511 Returns a list of all the possible values. -1512 """ -1513 return [el.get('value') for el in self] -
1514 -
1515 - def __repr__(self): -
1516 return '%s(%s)' % ( -1517 self.__class__.__name__, -1518 list.__repr__(self)) -
1519 -
1520 -1521 -class CheckboxGroup(list): -
1522 """ -1523 Represents a group of checkboxes (``<input type=checkbox>``) that -1524 have the same name. -1525 -1526 In addition to using this like a list, the ``.value`` attribute -1527 returns a set-like object that you can add to or remove from to -1528 check and uncheck checkboxes. You can also use ``.value_options`` -1529 to get the possible values. -1530 """ -1531 @property -
1532 - def value(self): -
1533 """ -1534 Return a set-like object that can be modified to check or -1535 uncheck individual checkboxes according to their value. -1536 """ -1537 return CheckboxValues(self) -
1538 -1539 @value.setter -
1540 - def value(self, value): -
1541 values = self.value -1542 values.clear() -1543 if not hasattr(value, '__iter__'): -1544 raise ValueError( -1545 "A CheckboxGroup (name=%r) must be set to a sequence (not %r)" -1546 % (self[0].name, value)) -1547 values.update(value) -
1548 -1549 @value.deleter -
1550 - def value(self): -
1551 self.value.clear() -
1552 -1553 @property -
1554 - def value_options(self): -
1555 """ -1556 Returns a list of all the possible values. -1557 """ -1558 return [el.get('value') for el in self] -
1559 -
1560 - def __repr__(self): -
1561 return '%s(%s)' % ( -1562 self.__class__.__name__, list.__repr__(self)) -
1563 -
1564 -1565 -class CheckboxValues(SetMixin): -
1566 """ -1567 Represents the values of the checked checkboxes in a group of -1568 checkboxes with the same name. -1569 """ -1570 -
1571 - def __init__(self, group): -
1572 self.group = group -
1573 -
1574 - def __iter__(self): -
1575 return iter([ -1576 el.get('value') -1577 for el in self.group -1578 if 'checked' in el.attrib]) -
1579 -
1580 - def add(self, value): -
1581 for el in self.group: -1582 if el.get('value') == value: -1583 el.set('checked', '') -1584 break -1585 else: -1586 raise KeyError("No checkbox with value %r" % value) -
1587 -
1588 - def remove(self, value): -
1589 for el in self.group: -1590 if el.get('value') == value: -1591 if 'checked' in el.attrib: -1592 del el.attrib['checked'] -1593 else: -1594 raise KeyError( -1595 "The checkbox with value %r was already unchecked" % value) -1596 break -1597 else: -1598 raise KeyError( -1599 "No checkbox with value %r" % value) -
1600 -
1601 - def __repr__(self): -
1602 return '<%s {%s} for checkboxes name=%r>' % ( -1603 self.__class__.__name__, -1604 ', '.join([repr(v) for v in self]), -1605 self.group.name) -
1606 -
1607 -1608 -class InputElement(InputMixin, HtmlElement): -
1609 """ -1610 Represents an ``<input>`` element. -1611 -1612 You can get the type with ``.type`` (which is lower-cased and -1613 defaults to ``'text'``). -1614 -1615 Also you can get and set the value with ``.value`` -1616 -1617 Checkboxes and radios have the attribute ``input.checkable == -1618 True`` (for all others it is false) and a boolean attribute -1619 ``.checked``. -1620 -1621 """ -1622 -1623 ## FIXME: I'm a little uncomfortable with the use of .checked -1624 @property -
1625 - def value(self): -
1626 """ -1627 Get/set the value of this element, using the ``value`` attribute. -1628 -1629 Also, if this is a checkbox and it has no value, this defaults -1630 to ``'on'``. If it is a checkbox or radio that is not -1631 checked, this returns None. -1632 """ -1633 if self.checkable: -1634 if self.checked: -1635 return self.get('value') or 'on' -1636 else: -1637 return None -1638 return self.get('value') -
1639 -1640 @value.setter -
1641 - def value(self, value): -
1642 if self.checkable: -1643 if not value: -1644 self.checked = False -1645 else: -1646 self.checked = True -1647 if isinstance(value, basestring): -1648 self.set('value', value) -1649 else: -1650 self.set('value', value) -
1651 -1652 @value.deleter -
1653 - def value(self): -
1654 if self.checkable: -1655 self.checked = False -1656 else: -1657 if 'value' in self.attrib: -1658 del self.attrib['value'] -
1659 -1660 @property -
1661 - def type(self): -
1662 """ -1663 Return the type of this element (using the type attribute). -1664 """ -1665 return self.get('type', 'text').lower() -
1666 -1667 @type.setter -
1668 - def type(self, value): -
1669 self.set('type', value) -
1670 -1671 @property -
1672 - def checkable(self): -
1673 """ -1674 Boolean: can this element be checked? -1675 """ -1676 return self.type in ('checkbox', 'radio') -
1677 -1678 @property -
1679 - def checked(self): -
1680 """ -1681 Boolean attribute to get/set the presence of the ``checked`` -1682 attribute. -1683 -1684 You can only use this on checkable input types. -1685 """ -1686 if not self.checkable: -1687 raise AttributeError('Not a checkable input type') -1688 return 'checked' in self.attrib -
1689 -1690 @checked.setter -
1691 - def checked(self, value): -
1692 if not self.checkable: -1693 raise AttributeError('Not a checkable input type') -1694 if value: -1695 self.set('checked', '') -1696 else: -1697 attrib = self.attrib -1698 if 'checked' in attrib: -1699 del attrib['checked'] -
1700 -1701 -1702 HtmlElementClassLookup._default_element_classes['input'] = InputElement -
1703 -1704 -1705 -class LabelElement(HtmlElement): -
1706 """ -1707 Represents a ``<label>`` element. -1708 -1709 Label elements are linked to other elements with their ``for`` -1710 attribute. You can access this element with ``label.for_element``. -1711 """ -1712 @property -
1713 - def for_element(self): -
1714 """ -1715 Get/set the element this label points to. Return None if it -1716 can't be found. -1717 """ -1718 id = self.get('for') -1719 if not id: -1720 return None -1721 return self.body.get_element_by_id(id) -
1722 -1723 @for_element.setter -
1724 - def for_element(self, other): -
1725 id = other.get('id') -1726 if not id: -1727 raise TypeError( -1728 "Element %r has no id attribute" % other) -1729 self.set('for', id) -
1730 -1731 @for_element.deleter -
1732 - def for_element(self): -
1733 attrib = self.attrib -1734 if 'id' in attrib: -1735 del attrib['id'] -
1736 -1737 -1738 HtmlElementClassLookup._default_element_classes['label'] = LabelElement -
1739 -1740 -1741 ############################################################ -1742 ## Serialization -1743 ############################################################ -1744 -1745 -def html_to_xhtml(html): -
1746 """Convert all tags in an HTML tree to XHTML by moving them to the -1747 XHTML namespace. -1748 """ -1749 try: -1750 html = html.getroot() -1751 except AttributeError: -1752 pass -1753 prefix = "{%s}" % XHTML_NAMESPACE -1754 for el in html.iter(etree.Element): -1755 tag = el.tag -1756 if tag[0] != '{': -1757 el.tag = prefix + tag -
1758 -
1759 -1760 -def xhtml_to_html(xhtml): -
1761 """Convert all tags in an XHTML tree to HTML by removing their -1762 XHTML namespace. -1763 """ -1764 try: -1765 xhtml = xhtml.getroot() -1766 except AttributeError: -1767 pass -1768 prefix = "{%s}" % XHTML_NAMESPACE -1769 prefix_len = len(prefix) -1770 for el in xhtml.iter(prefix + "*"): -1771 el.tag = el.tag[prefix_len:] -
1772 -1773 -1774 # This isn't a general match, but it's a match for what libxml2 -1775 # specifically serialises: -1776 __str_replace_meta_content_type = re.compile( -1777 r'<meta http-equiv="Content-Type"[^>]*>').sub -1778 __bytes_replace_meta_content_type = re.compile( -1779 r'<meta http-equiv="Content-Type"[^>]*>'.encode('ASCII')).sub -
1780 -1781 -1782 -def tostring(doc, pretty_print=False, include_meta_content_type=False, -1783 encoding=None, method="html", with_tail=True, doctype=None): -
1784 """Return an HTML string representation of the document. -1785 -1786 Note: if include_meta_content_type is true this will create a -1787 ``<meta http-equiv="Content-Type" ...>`` tag in the head; -1788 regardless of the value of include_meta_content_type any existing -1789 ``<meta http-equiv="Content-Type" ...>`` tag will be removed -1790 -1791 The ``encoding`` argument controls the output encoding (defauts to -1792 ASCII, with &#...; character references for any characters outside -1793 of ASCII). Note that you can pass the name ``'unicode'`` as -1794 ``encoding`` argument to serialise to a Unicode string. -1795 -1796 The ``method`` argument defines the output method. It defaults to -1797 'html', but can also be 'xml' for xhtml output, or 'text' to -1798 serialise to plain text without markup. -1799 -1800 To leave out the tail text of the top-level element that is being -1801 serialised, pass ``with_tail=False``. -1802 -1803 The ``doctype`` option allows passing in a plain string that will -1804 be serialised before the XML tree. Note that passing in non -1805 well-formed content here will make the XML output non well-formed. -1806 Also, an existing doctype in the document tree will not be removed -1807 when serialising an ElementTree instance. -1808 -1809 Example:: -1810 -1811 >>> from lxml import html -1812 >>> root = html.fragment_fromstring('<p>Hello<br>world!</p>') -1813 -1814 >>> html.tostring(root) -1815 b'<p>Hello<br>world!</p>' -1816 >>> html.tostring(root, method='html') -1817 b'<p>Hello<br>world!</p>' -1818 -1819 >>> html.tostring(root, method='xml') -1820 b'<p>Hello<br/>world!</p>' -1821 -1822 >>> html.tostring(root, method='text') -1823 b'Helloworld!' -1824 -1825 >>> html.tostring(root, method='text', encoding='unicode') -1826 u'Helloworld!' -1827 -1828 >>> root = html.fragment_fromstring('<div><p>Hello<br>world!</p>TAIL</div>') -1829 >>> html.tostring(root[0], method='text', encoding='unicode') -1830 u'Helloworld!TAIL' -1831 -1832 >>> html.tostring(root[0], method='text', encoding='unicode', with_tail=False) -1833 u'Helloworld!' -1834 -1835 >>> doc = html.document_fromstring('<p>Hello<br>world!</p>') -1836 >>> html.tostring(doc, method='html', encoding='unicode') -1837 u'<html><body><p>Hello<br>world!</p></body></html>' -1838 -1839 >>> print(html.tostring(doc, method='html', encoding='unicode', -1840 ... doctype='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"' -1841 ... ' "http://www.w3.org/TR/html4/strict.dtd">')) -1842 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> -1843 <html><body><p>Hello<br>world!</p></body></html> -1844 """ -1845 html = etree.tostring(doc, method=method, pretty_print=pretty_print, -1846 encoding=encoding, with_tail=with_tail, -1847 doctype=doctype) -1848 if method == 'html' and not include_meta_content_type: -1849 if isinstance(html, str): -1850 html = __str_replace_meta_content_type('', html) -1851 else: -1852 html = __bytes_replace_meta_content_type(bytes(), html) -1853 return html -
1854 -1855 -1856 tostring.__doc__ = __fix_docstring(tostring.__doc__) -
1857 -1858 -1859 -def open_in_browser(doc, encoding=None): -
1860 """ -1861 Open the HTML document in a web browser, saving it to a temporary -1862 file to open it. Note that this does not delete the file after -1863 use. This is mainly meant for debugging. -1864 """ -1865 import os -1866 import webbrowser -1867 import tempfile -1868 if not isinstance(doc, etree._ElementTree): -1869 doc = etree.ElementTree(doc) -1870 handle, fn = tempfile.mkstemp(suffix='.html') -1871 f = os.fdopen(handle, 'wb') -1872 try: -1873 doc.write(f, method="html", encoding=encoding or doc.docinfo.encoding or "UTF-8") -1874 finally: -1875 # we leak the file itself here, but we should at least close it -1876 f.close() -1877 url = 'file://' + fn.replace(os.path.sep, '/') -1878 print(url) -1879 webbrowser.open(url) -
1880 -
1881 -1882 ################################################################################ -1883 # configure Element class lookup -1884 ################################################################################ -1885 -1886 -class HTMLParser(etree.HTMLParser): -
1887 """An HTML parser that is configured to return lxml.html Element -1888 objects. -1889 """ -
1890 - def __init__(self, **kwargs): -
1891 super(HTMLParser, self).__init__(**kwargs) -1892 self.set_element_class_lookup(HtmlElementClassLookup()) -
1893 -
1894 -1895 -class XHTMLParser(etree.XMLParser): -
1896 """An XML parser that is configured to return lxml.html Element -1897 objects. -1898 -1899 Note that this parser is not really XHTML aware unless you let it -1900 load a DTD that declares the HTML entities. To do this, make sure -1901 you have the XHTML DTDs installed in your catalogs, and create the -1902 parser like this:: -1903 -1904 >>> parser = XHTMLParser(load_dtd=True) -1905 -1906 If you additionally want to validate the document, use this:: -1907 -1908 >>> parser = XHTMLParser(dtd_validation=True) -1909 -1910 For catalog support, see http://www.xmlsoft.org/catalog.html. -1911 """ -
1912 - def __init__(self, **kwargs): -
1913 super(XHTMLParser, self).__init__(**kwargs) -1914 self.set_element_class_lookup(HtmlElementClassLookup()) -
1915 -
1916 -1917 -def Element(*args, **kw): -
1918 """Create a new HTML Element. -1919 -1920 This can also be used for XHTML documents. -1921 """ -1922 v = html_parser.makeelement(*args, **kw) -1923 return v -
1924 -1925 -1926 html_parser = HTMLParser() -1927 xhtml_parser = XHTMLParser() -1928 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.CheckboxGroup-class.html b/doc/html/api/lxml.html.CheckboxGroup-class.html deleted file mode 100644 index 9cbc29f..0000000 --- a/doc/html/api/lxml.html.CheckboxGroup-class.html +++ /dev/null @@ -1,385 +0,0 @@ - - - - - lxml.html.CheckboxGroup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - lxml :: - html :: - CheckboxGroup :: - Class CheckboxGroup - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class CheckboxGroup

source code

-
-object --+    
-         |    
-      list --+
-             |
-            CheckboxGroup
-
- -
-

Represents a group of checkboxes (<input type=checkbox>) that -have the same name.

-

In addition to using this like a list, the .value attribute -returns a set-like object that you can add to or remove from to -check and uncheck checkboxes. You can also use .value_options -to get the possible values.

- - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__repr__(self)
- repr(x)
- source code - -
- -
-

Inherited from list: - __add__, - __contains__, - __delitem__, - __delslice__, - __eq__, - __ge__, - __getattribute__, - __getitem__, - __getslice__, - __gt__, - __iadd__, - __imul__, - __init__, - __iter__, - __le__, - __len__, - __lt__, - __mul__, - __ne__, - __new__, - __reversed__, - __rmul__, - __setitem__, - __setslice__, - __sizeof__, - append, - count, - extend, - index, - insert, - pop, - remove, - reverse, - sort -

-

Inherited from object: - __delattr__, - __format__, - __reduce__, - __reduce_ex__, - __setattr__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from list: - __hash__ -

-
- - - - - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - value
- Return a set-like object that can be modified to check or -uncheck individual checkboxes according to their value. -
-   - - value_options
- Returns a list of all the possible values. -
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__repr__(self) -
(Representation operator) -

-
source code  -
- - repr(x) -
-
Overrides: - object.__repr__ -
(inherited documentation)
- -
-
-
-
- - - - - - -
- - - - - -
Property Details[hide private]
-
- -
- -
-

value

- Return a set-like object that can be modified to check or -uncheck individual checkboxes according to their value. -
-
Get Method:
-
unreachable.value(self) - - Return a set-like object that can be modified to check or -uncheck individual checkboxes according to their value. -
-
Set Method:
-
unreachable.value(self, - value) -
-
Delete Method:
-
unreachable.value(self) -
-
-
-
- -
- -
-

value_options

- Returns a list of all the possible values. -
-
Get Method:
-
unreachable.value_options(self) - - Returns a list of all the possible values. -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.CheckboxValues-class.html b/doc/html/api/lxml.html.CheckboxValues-class.html deleted file mode 100644 index 9d6ba5d..0000000 --- a/doc/html/api/lxml.html.CheckboxValues-class.html +++ /dev/null @@ -1,563 +0,0 @@ - - - - - lxml.html.CheckboxValues - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - lxml :: - html :: - CheckboxValues :: - Class CheckboxValues - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class CheckboxValues

source code

-
-       object --+                
-                |                
-    _abcoll.Sized --+            
-                    |            
-       object --+   |            
-                |   |            
- _abcoll.Iterable --+            
-                    |            
-       object --+   |            
-                |   |            
-_abcoll.Container --+            
-                    |            
-          _abcoll.Set --+        
-                        |        
-       _abcoll.MutableSet --+    
-                            |    
-           _setmixin.SetMixin --+
-                                |
-                               CheckboxValues
-
- -
-Represents the values of the checked checkboxes in a group of -checkboxes with the same name. - - - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from _abcoll.Sized: - __metaclass__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - group)
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-   - - - - - - -
__iter__(self) - source code - -
- -
-   - - - - - - -
__repr__(self)
- repr(x)
- source code - -
- -
-   - - - - - - -
add(self, - value)
- Add an element.
- source code - -
- -
-   - - - - - - -
remove(self, - value)
- Remove an element. If not a member, raise a KeyError.
- source code - -
- -
-

Inherited from _setmixin.SetMixin: - __contains__, - __len__, - copy, - difference, - difference_update, - discard, - intersection, - intersection_update, - issubset, - issuperset, - symmetric_difference, - symmetric_difference_update, - union, - update -

-

Inherited from _abcoll.MutableSet: - __iand__, - __ior__, - __isub__, - __ixor__, - clear, - pop -

-

Inherited from _abcoll.Set: - __and__, - __eq__, - __ge__, - __gt__, - __le__, - __lt__, - __ne__, - __or__, - __rand__, - __ror__, - __rsub__, - __rxor__, - __sub__, - __xor__, - isdisjoint -

-

Inherited from _abcoll.Set (private): - _hash -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from _setmixin.SetMixin (private): - _from_iterable -

-

Inherited from _abcoll.Sized: - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - __abstractmethods__ = frozenset([]) -
-

Inherited from _setmixin.SetMixin (private): - _abc_negative_cache, - _abc_negative_cache_version, - _abc_registry -

-

Inherited from _abcoll.Set: - __hash__ -

-

Inherited from _abcoll.Sized (private): - _abc_cache -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - group) -
(Constructor) -

-
source code  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

__iter__(self) -

-
source code  -
- - -
-
Overrides: - _abcoll.Iterable.__iter__ -
-
-
-
- -
- -
- - -
-

__repr__(self) -
(Representation operator) -

-
source code  -
- - repr(x) -
-
Overrides: - object.__repr__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

add(self, - value) -

-
source code  -
- - Add an element. -
-
Overrides: - _abcoll.MutableSet.add -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

remove(self, - value) -

-
source code  -
- - Remove an element. If not a member, raise a KeyError. -
-
Overrides: - _abcoll.MutableSet.remove -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.Classes-class.html b/doc/html/api/lxml.html.Classes-class.html deleted file mode 100644 index 0358391..0000000 --- a/doc/html/api/lxml.html.Classes-class.html +++ /dev/null @@ -1,715 +0,0 @@ - - - - - lxml.html.Classes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - lxml :: - html :: - Classes :: - Class Classes - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class Classes

source code

-
-       object --+            
-                |            
-    _abcoll.Sized --+        
-                    |        
-       object --+   |        
-                |   |        
- _abcoll.Iterable --+        
-                    |        
-       object --+   |        
-                |   |        
-_abcoll.Container --+        
-                    |        
-          _abcoll.Set --+    
-                        |    
-       _abcoll.MutableSet --+
-                            |
-                           Classes
-
- -
-

Provides access to an element's class attribute as a set-like collection. -Usage:

-
->>> el = fromstring('<p class="hidden large">Text</p>')
->>> classes = el.classes  # or: classes = Classes(el.attrib)
->>> classes |= ['block', 'paragraph']
->>> el.get('class')
-'hidden large block paragraph'
->>> classes.toggle('hidden')
-False
->>> el.get('class')
-'large block paragraph'
->>> classes -= ('some', 'classes', 'block')
->>> el.get('class')
-'large paragraph'
-
- - - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from _abcoll.Sized: - __metaclass__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__contains__(self, - name) - source code - -
- -
-   - - - - - - -
__init__(self, - attributes)
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-   - - - - - - -
__iter__(self) - source code - -
- -
-   - - - - - - -
__len__(self) - source code - -
- -
-   - - - - - - -
add(self, - value)
- Add a class.
- source code - -
- -
-   - - - - - - -
discard(self, - value)
- Remove a class if it is currently present.
- source code - -
- -
-   - - - - - - -
remove(self, - value)
- Remove a class; it must currently be present.
- source code - -
- -
-   - - - - - - -
toggle(self, - value)
- Add a class name if it isn't there yet, or remove it if it exists.
- source code - -
- -
-   - - - - - - -
update(self, - values)
- Add all names from 'values'.
- source code - -
- -
-

Inherited from _abcoll.MutableSet: - __iand__, - __ior__, - __isub__, - __ixor__, - clear, - pop -

-

Inherited from _abcoll.Set: - __and__, - __eq__, - __ge__, - __gt__, - __le__, - __lt__, - __ne__, - __or__, - __rand__, - __ror__, - __rsub__, - __rxor__, - __sub__, - __xor__, - isdisjoint -

-

Inherited from _abcoll.Set (private): - _hash -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from _abcoll.Set (private): - _from_iterable -

-

Inherited from _abcoll.Sized: - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - __abstractmethods__ = frozenset([]) -
-   - - _abc_negative_cache = 'WeakSet' -
-   - - _abc_negative_cache_version = 21 -
-   - - _abc_registry = 'WeakSet' -
-

Inherited from _abcoll.Set: - __hash__ -

-

Inherited from _abcoll.Sized (private): - _abc_cache -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__contains__(self, - name) -
(In operator) -

-
source code  -
- - -
-
Overrides: - _abcoll.Container.__contains__ -
-
-
-
- -
- -
- - -
-

__init__(self, - attributes) -
(Constructor) -

-
source code  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

__iter__(self) -

-
source code  -
- - -
-
Overrides: - _abcoll.Iterable.__iter__ -
-
-
-
- -
- -
- - -
-

__len__(self) -
(Length operator) -

-
source code  -
- - -
-
Overrides: - _abcoll.Sized.__len__ -
-
-
-
- -
- -
- - -
-

add(self, - value) -

-
source code  -
- -

Add a class.

-

This has no effect if the class is already present.

-
-
Overrides: - _abcoll.MutableSet.add -
-
-
-
- -
- -
- - -
-

discard(self, - value) -

-
source code  -
- -

Remove a class if it is currently present.

-

If the class is not present, do nothing.

-
-
Overrides: - _abcoll.MutableSet.discard -
-
-
-
- -
- -
- - -
-

remove(self, - value) -

-
source code  -
- -

Remove a class; it must currently be present.

-

If the class is not present, raise a KeyError.

-
-
Overrides: - _abcoll.MutableSet.remove -
-
-
-
- -
- -
- - -
-

toggle(self, - value) -

-
source code  -
- -

Add a class name if it isn't there yet, or remove it if it exists.

-

Returns true if the class was added (and is now enabled) and -false if it was removed (and is now disabled).

-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.ElementSoup-module.html b/doc/html/api/lxml.html.ElementSoup-module.html deleted file mode 100644 index 7f9860c..0000000 --- a/doc/html/api/lxml.html.ElementSoup-module.html +++ /dev/null @@ -1,286 +0,0 @@ - - - - - lxml.html.ElementSoup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module ElementSoup - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module ElementSoup

source code

-Legacy interface to the BeautifulSoup HTML parser. - - - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
convert_tree(beautiful_soup_tree, - makeelement=None)
- Convert a BeautifulSoup tree to a list of Element trees.
- source code - -
- -
-   - - - - - - -
parse(file, - beautifulsoup=None, - makeelement=None) - source code - -
- -
- - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __doc__ = """Legacy interface to the BeautifulSoup HTML pars... -
-   - - __package__ = 'lxml.html' -
- - - - - - -
- - - - - -
Function Details[hide private]
-
- -
- -
- - -
-

convert_tree(beautiful_soup_tree, - makeelement=None) -

-
source code  -
- -

Convert a BeautifulSoup tree to a list of Element trees.

-

Returns a list instead of a single root Element to support -HTML-like soup with more than one root element.

-

You can pass a different Element factory through the makeelement -keyword.

-
-
-
-
-
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

__doc__

- -
-
-
-
Value:
-
-"""Legacy interface to the BeautifulSoup HTML parser.
-"""
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.ElementSoup-pysrc.html b/doc/html/api/lxml.html.ElementSoup-pysrc.html deleted file mode 100644 index b12b22f..0000000 --- a/doc/html/api/lxml.html.ElementSoup-pysrc.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - lxml.html.ElementSoup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module ElementSoup - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.html.ElementSoup

-
- 1  __doc__ = """Legacy interface to the BeautifulSoup HTML parser. 
- 2  """ 
- 3   
- 4  __all__ = ["parse", "convert_tree"] 
- 5   
- 6  from soupparser import convert_tree, parse as _parse 
- 7   
-
8 -def parse(file, beautifulsoup=None, makeelement=None): -
9 root = _parse(file, beautifulsoup=beautifulsoup, makeelement=makeelement) -10 return root.getroot() -
11 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.FieldsDict-class.html b/doc/html/api/lxml.html.FieldsDict-class.html deleted file mode 100644 index 868cd6f..0000000 --- a/doc/html/api/lxml.html.FieldsDict-class.html +++ /dev/null @@ -1,705 +0,0 @@ - - - - - lxml.html.FieldsDict - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - lxml :: - html :: - FieldsDict :: - Class FieldsDict - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class FieldsDict

source code

-
-       object --+            
-                |            
-    _abcoll.Sized --+        
-                    |        
-       object --+   |        
-                |   |        
- _abcoll.Iterable --+        
-                    |        
-       object --+   |        
-                |   |        
-_abcoll.Container --+        
-                    |        
-      _abcoll.Mapping --+    
-                        |    
-   _abcoll.MutableMapping --+
-                            |
-                           FieldsDict
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from _abcoll.Sized: - __metaclass__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__contains__(self, - item) - source code - -
- -
-   - - - - - - -
__delitem__(self, - item) - source code - -
- -
-   - - - - - - -
__getitem__(self, - item) - source code - -
- -
-   - - - - - - -
__init__(self, - inputs)
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-   - - - - - - -
__iter__(self) - source code - -
- -
-   - - - - - - -
__len__(self) - source code - -
- -
-   - - - - - - -
__repr__(self)
- repr(x)
- source code - -
- -
-   - - - - - - -
__setitem__(self, - item, - value) - source code - -
- -
- list of D's keys - - - - - - -
keys(self) - source code - -
- -
-

Inherited from _abcoll.MutableMapping: - clear, - pop, - popitem, - setdefault, - update -

-

Inherited from _abcoll.Mapping: - __eq__, - __ne__, - get, - items, - iteritems, - iterkeys, - itervalues, - values -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from _abcoll.Sized: - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - __abstractmethods__ = frozenset([]) -
-   - - _abc_negative_cache = 'WeakSet' -
-   - - _abc_negative_cache_version = 21 -
-   - - _abc_registry = 'WeakSet' -
-

Inherited from _abcoll.Mapping: - __hash__ -

-

Inherited from _abcoll.Sized (private): - _abc_cache -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__contains__(self, - item) -
(In operator) -

-
source code  -
- - -
-
Overrides: - _abcoll.Container.__contains__ -
-
-
-
- -
- -
- - -
-

__delitem__(self, - item) -
(Index deletion operator) -

-
source code  -
- - -
-
Overrides: - _abcoll.MutableMapping.__delitem__ -
-
-
-
- -
- -
- - -
-

__getitem__(self, - item) -
(Indexing operator) -

-
source code  -
- - -
-
Overrides: - _abcoll.Mapping.__getitem__ -
-
-
-
- -
- -
- - -
-

__init__(self, - inputs) -
(Constructor) -

-
source code  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

__iter__(self) -

-
source code  -
- - -
-
Overrides: - _abcoll.Iterable.__iter__ -
-
-
-
- -
- -
- - -
-

__len__(self) -
(Length operator) -

-
source code  -
- - -
-
Overrides: - _abcoll.Sized.__len__ -
-
-
-
- -
- -
- - -
-

__repr__(self) -
(Representation operator) -

-
source code  -
- - repr(x) -
-
Overrides: - object.__repr__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

__setitem__(self, - item, - value) -
(Index assignment operator) -

-
source code  -
- - -
-
Overrides: - _abcoll.MutableMapping.__setitem__ -
-
-
-
- -
- -
- - -
-

keys(self) -

-
source code  -
- - -
-
Returns: list of D's keys
-
Overrides: - _abcoll.Mapping.keys -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.FormElement-class.html b/doc/html/api/lxml.html.FormElement-class.html deleted file mode 100644 index 1e24924..0000000 --- a/doc/html/api/lxml.html.FormElement-class.html +++ /dev/null @@ -1,450 +0,0 @@ - - - - - lxml.html.FormElement - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - lxml :: - html :: - FormElement :: - Class FormElement - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class FormElement

source code

-
-    object --+            
-             |            
-etree._Element --+        
-                 |        
- etree.ElementBase --+    
-                     |    
-        object --+   |    
-                 |   |    
-         HtmlMixin --+    
-                     |    
-           HtmlElement --+
-                         |
-                        FormElement
-
- -
-Represents a <form> element. - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
_name(self) - source code - -
- -
-   - - - - - - -
form_values(self)
- Return a list of tuples of the field values for the form. -This is suitable to be passed to urllib.urlencode().
- source code - -
- -
-

Inherited from HtmlElement: - cssselect, - set -

-

Inherited from etree.ElementBase: - __init__, - __new__ -

-

Inherited from etree._Element: - __contains__, - __copy__, - __deepcopy__, - __delitem__, - __getitem__, - __iter__, - __len__, - __nonzero__, - __repr__, - __reversed__, - __setitem__, - addnext, - addprevious, - append, - clear, - extend, - find, - findall, - findtext, - get, - getchildren, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - insert, - items, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - keys, - makeelement, - remove, - replace, - values, - xpath -

-

Inherited from etree._Element (private): - _init -

-

Inherited from HtmlMixin: - drop_tag, - drop_tree, - find_class, - find_rel_links, - get_element_by_id, - iterlinks, - make_links_absolute, - resolve_base_href, - rewrite_links, - text_content -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - action
- Get/set the form's action attribute. -
-   - - fields
- Dictionary-like object that represents all the fields in this -form. You can set values in this dictionary to effect the -form. -
-   - - inputs
- Returns an accessor for all the input elements in the form. -
-   - - method
- Get/set the form's method. Always returns a capitalized -string, and defaults to 'GET' -
-

Inherited from etree._Element: - attrib, - base, - nsmap, - prefix, - sourceline, - tag, - tail, - text -

-

Inherited from HtmlMixin: - base_url, - body, - classes, - forms, - head, - label -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Property Details[hide private]
-
- -
- -
-

action

- Get/set the form's action attribute. -
-
Get Method:
-
unreachable.action(self) - - Get/set the form's action attribute. -
-
Set Method:
-
unreachable.action(self, - value) -
-
Delete Method:
-
unreachable.action(self) -
-
-
-
- -
- -
-

fields

- Dictionary-like object that represents all the fields in this -form. You can set values in this dictionary to effect the -form. -
-
Get Method:
-
unreachable.fields(self) - - Dictionary-like object that represents all the fields in this -form. You can set values in this dictionary to effect the -form. -
-
Set Method:
-
unreachable.fields(self, - value) -
-
-
-
- -
- -
-

inputs

-

Returns an accessor for all the input elements in the form.

-

See InputGetter for more information about the object.

-
-
Get Method:
-
unreachable.inputs(self) - - Returns an accessor for all the input elements in the form. -
-
-
-
- -
- -
-

method

- Get/set the form's method. Always returns a capitalized -string, and defaults to 'GET' -
-
Get Method:
-
unreachable.method(self) - - Get/set the form's method. Always returns a capitalized -string, and defaults to 'GET' -
-
Set Method:
-
unreachable.method(self, - value) -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.HTMLParser-class.html b/doc/html/api/lxml.html.HTMLParser-class.html deleted file mode 100644 index 2bafe7f..0000000 --- a/doc/html/api/lxml.html.HTMLParser-class.html +++ /dev/null @@ -1,277 +0,0 @@ - - - - - lxml.html.HTMLParser - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - lxml :: - html :: - HTMLParser :: - Class HTMLParser - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class HTMLParser

source code

-
-    object --+            
-             |            
-??._BaseParser --+        
-                 |        
- etree._FeedParser --+    
-                     |    
-      etree.HTMLParser --+
-                         |
-                        HTMLParser
-
- -
-An HTML parser that is configured to return lxml.html Element -objects. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - **kwargs)
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-

Inherited from etree.HTMLParser: - __new__ -

-

Inherited from etree._FeedParser: - close, - feed -

-

Inherited from unreachable._BaseParser: - copy, - makeelement, - setElementClassLookup, - set_element_class_lookup -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from etree._FeedParser: - feed_error_log -

-

Inherited from unreachable._BaseParser: - error_log, - resolvers, - target, - version -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - **kwargs) -
(Constructor) -

-
source code  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.HtmlComment-class.html b/doc/html/api/lxml.html.HtmlComment-class.html deleted file mode 100644 index d6fd473..0000000 --- a/doc/html/api/lxml.html.HtmlComment-class.html +++ /dev/null @@ -1,286 +0,0 @@ - - - - - lxml.html.HtmlComment - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - lxml :: - html :: - HtmlComment :: - Class HtmlComment - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class HtmlComment

source code

-
-         object --+                
-                  |                
-     etree._Element --+            
-                      |            
-??.__ContentOnlyElement --+        
-                          |        
-             etree._Comment --+    
-                              |    
-              etree.CommentBase --+
-                                  |
-                     object --+   |
-                              |   |
-                      HtmlMixin --+
-                                  |
-                                 HtmlComment
-
- -
- - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from etree.CommentBase: - __init__, - __new__ -

-

Inherited from etree._Comment: - __repr__ -

-

Inherited from unreachable.__ContentOnlyElement: - __delitem__, - __getitem__, - __len__, - __setitem__, - append, - get, - insert, - items, - keys, - set, - values -

-

Inherited from etree._Element: - __contains__, - __copy__, - __deepcopy__, - __iter__, - __nonzero__, - __reversed__, - addnext, - addprevious, - clear, - cssselect, - extend, - find, - findall, - findtext, - getchildren, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - makeelement, - remove, - replace, - xpath -

-

Inherited from etree._Element (private): - _init -

-

Inherited from HtmlMixin: - drop_tag, - drop_tree, - find_class, - find_rel_links, - get_element_by_id, - iterlinks, - make_links_absolute, - resolve_base_href, - rewrite_links, - text_content -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from etree._Comment: - tag -

-

Inherited from unreachable.__ContentOnlyElement: - attrib, - text -

-

Inherited from etree._Element: - base, - nsmap, - prefix, - sourceline, - tail -

-

Inherited from HtmlMixin: - base_url, - body, - classes, - forms, - head, - label -

-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.HtmlElement-class.html b/doc/html/api/lxml.html.HtmlElement-class.html deleted file mode 100644 index 09237a2..0000000 --- a/doc/html/api/lxml.html.HtmlElement-class.html +++ /dev/null @@ -1,392 +0,0 @@ - - - - - lxml.html.HtmlElement - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - lxml :: - html :: - HtmlElement :: - Class HtmlElement - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class HtmlElement

source code

-
-    object --+        
-             |        
-etree._Element --+    
-                 |    
- etree.ElementBase --+
-                     |
-        object --+   |
-                 |   |
-         HtmlMixin --+
-                     |
-                    HtmlElement
-
- -
Known Subclasses:
-
- -
- -
- - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
cssselect(self, - expr, - translator='html')
- Run the CSS expression on this element and its children, -returning a list of the results.
- source code - -
- -
-   - - - - - - -
set(self, - key, - value=None)
- Sets an element attribute. If no value is provided, or if the value is None, -creates a 'boolean' attribute without value, e.g. "<form novalidate></form>" -for form.set('novalidate').
- source code - -
- -
-

Inherited from etree.ElementBase: - __init__, - __new__ -

-

Inherited from etree._Element: - __contains__, - __copy__, - __deepcopy__, - __delitem__, - __getitem__, - __iter__, - __len__, - __nonzero__, - __repr__, - __reversed__, - __setitem__, - addnext, - addprevious, - append, - clear, - extend, - find, - findall, - findtext, - get, - getchildren, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - insert, - items, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - keys, - makeelement, - remove, - replace, - values, - xpath -

-

Inherited from etree._Element (private): - _init -

-

Inherited from HtmlMixin: - drop_tag, - drop_tree, - find_class, - find_rel_links, - get_element_by_id, - iterlinks, - make_links_absolute, - resolve_base_href, - rewrite_links, - text_content -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from etree._Element: - attrib, - base, - nsmap, - prefix, - sourceline, - tag, - tail, - text -

-

Inherited from HtmlMixin: - base_url, - body, - classes, - forms, - head, - label -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

cssselect(self, - expr, - translator='html') -

-
source code  -
- -

Run the CSS expression on this element and its children, -returning a list of the results.

-

Equivalent to lxml.cssselect.CSSSelect(expr, translator='html')(self) --- note that pre-compiling the expression can provide a substantial -speedup.

-
-
Overrides: - HtmlMixin.cssselect -
-
-
-
- -
- -
- - -
-

set(self, - key, - value=None) -

-
source code  -
- - Sets an element attribute. If no value is provided, or if the value is None, -creates a 'boolean' attribute without value, e.g. "<form novalidate></form>" -for form.set('novalidate'). -
-
Overrides: - HtmlMixin.set -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.HtmlElementClassLookup-class.html b/doc/html/api/lxml.html.HtmlElementClassLookup-class.html deleted file mode 100644 index 502c12e..0000000 --- a/doc/html/api/lxml.html.HtmlElementClassLookup-class.html +++ /dev/null @@ -1,387 +0,0 @@ - - - - - lxml.html.HtmlElementClassLookup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - lxml :: - html :: - HtmlElementClassLookup :: - Class HtmlElementClassLookup - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class HtmlElementClassLookup

source code

-
-                  object --+            
-                           |            
-    etree.ElementClassLookup --+        
-                               |        
-etree.FallbackElementClassLookup --+    
-                                   |    
-      etree.CustomElementClassLookup --+
-                                       |
-                                      HtmlElementClassLookup
-
- -
-

A lookup scheme for HTML Element classes.

-

To create a lookup instance with different Element classes, pass a tag -name mapping of Element classes in the classes keyword argument and/or -a tag name mapping of Mixin classes in the mixins keyword argument. -The special key '*' denotes a Mixin class that should be mixed into all -Element classes.

- - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - classes=None, - mixins=None)
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-   - - - - - - -
lookup(self, - node_type, - document, - namespace, - name) - source code - -
- -
-

Inherited from etree.CustomElementClassLookup: - __new__ -

-

Inherited from etree.FallbackElementClassLookup: - set_fallback -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - _default_element_classes = {'form': <class 'lxml.html.FormElem... -
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from etree.FallbackElementClassLookup: - fallback -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - classes=None, - mixins=None) -
(Constructor) -

-
source code  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

lookup(self, - node_type, - document, - namespace, - name) -

-
source code  -
- - -
-
Overrides: - etree.CustomElementClassLookup.lookup -
(inherited documentation)
- -
-
-
-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

_default_element_classes

- -
-
-
-
Value:
-
-{'form': <class 'lxml.html.FormElement'>,
- 'input': <class 'lxml.html.InputElement'>,
- 'label': <class 'lxml.html.LabelElement'>,
- 'select': <class 'lxml.html.SelectElement'>,
- 'textarea': <class 'lxml.html.TextareaElement'>}
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.HtmlEntity-class.html b/doc/html/api/lxml.html.HtmlEntity-class.html deleted file mode 100644 index 466c053..0000000 --- a/doc/html/api/lxml.html.HtmlEntity-class.html +++ /dev/null @@ -1,287 +0,0 @@ - - - - - lxml.html.HtmlEntity - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - lxml :: - html :: - HtmlEntity :: - Class HtmlEntity - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class HtmlEntity

source code

-
-         object --+                
-                  |                
-     etree._Element --+            
-                      |            
-??.__ContentOnlyElement --+        
-                          |        
-              etree._Entity --+    
-                              |    
-               etree.EntityBase --+
-                                  |
-                     object --+   |
-                              |   |
-                      HtmlMixin --+
-                                  |
-                                 HtmlEntity
-
- -
- - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from etree.EntityBase: - __init__, - __new__ -

-

Inherited from etree._Entity: - __repr__ -

-

Inherited from unreachable.__ContentOnlyElement: - __delitem__, - __getitem__, - __len__, - __setitem__, - append, - get, - insert, - items, - keys, - set, - values -

-

Inherited from etree._Element: - __contains__, - __copy__, - __deepcopy__, - __iter__, - __nonzero__, - __reversed__, - addnext, - addprevious, - clear, - cssselect, - extend, - find, - findall, - findtext, - getchildren, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - makeelement, - remove, - replace, - xpath -

-

Inherited from etree._Element (private): - _init -

-

Inherited from HtmlMixin: - drop_tag, - drop_tree, - find_class, - find_rel_links, - get_element_by_id, - iterlinks, - make_links_absolute, - resolve_base_href, - rewrite_links, - text_content -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from etree._Entity: - name, - tag, - text -

-

Inherited from unreachable.__ContentOnlyElement: - attrib -

-

Inherited from etree._Element: - base, - nsmap, - prefix, - sourceline, - tail -

-

Inherited from HtmlMixin: - base_url, - body, - classes, - forms, - head, - label -

-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.HtmlMixin-class.html b/doc/html/api/lxml.html.HtmlMixin-class.html deleted file mode 100644 index 8036166..0000000 --- a/doc/html/api/lxml.html.HtmlMixin-class.html +++ /dev/null @@ -1,821 +0,0 @@ - - - - - lxml.html.HtmlMixin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - lxml :: - html :: - HtmlMixin :: - Class HtmlMixin - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class HtmlMixin

source code

-
-object --+
-         |
-        HtmlMixin
-
- -
Known Subclasses:
-
- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
cssselect(self, - expr, - translator='html')
- Run the CSS expression on this element and its children, -returning a list of the results.
- source code - -
- -
-   - - - - - - -
drop_tag(self)
- Remove the tag, but not its children or text. The children and text -are merged into the parent.
- source code - -
- -
-   - - - - - - -
drop_tree(self)
- Removes this element from the tree, including its children and -text. The tail text is joined to the previous element or -parent.
- source code - -
- -
-   - - - - - - -
find_class(self, - class_name)
- Find any elements with the given class name.
- source code - -
- -
-   - - - - - - -
find_rel_links(self, - rel)
- Find any links like <a rel="{rel}">...</a>; returns a list of elements.
- source code - -
- -
-   - - - - - - -
get_element_by_id(self, - id, - *default)
- Get the first element in a document with the given id. If none is -found, return the default argument if provided or raise KeyError -otherwise.
- source code - -
- -
-   - - - - - - -
iterlinks(self)
- Yield (element, attribute, link, pos), where attribute may be None -(indicating the link is in the text). pos is the position -where the link occurs; often 0, but sometimes something else in -the case of links in stylesheets or style tags.
- source code - -
- -
-   - - - - - - -
make_links_absolute(self, - base_url=None, - resolve_base_href=True, - handle_failures=None)
- Make all links in the document absolute, given the -base_url for the document (the full URL where the document -came from), or if no base_url is given, then the .base_url -of the document.
- source code - -
- -
-   - - - - - - -
resolve_base_href(self, - handle_failures=None)
- Find any <base href> tag in the document, and apply its -values to all links found in the document. Also remove the -tag once it has been applied.
- source code - -
- -
-   - - - - - - -
rewrite_links(self, - link_repl_func, - resolve_base_href=True, - base_href=None)
- Rewrite all the links in the document. For each link -link_repl_func(link) will be called, and the return value -will replace the old link.
- source code - -
- -
-   - - - - - - -
set(self, - key, - value=None)
- Sets an element attribute. If no value is provided, or if the value is None, -creates a 'boolean' attribute without value, e.g. "<form novalidate></form>" -for form.set('novalidate').
- source code - -
- -
-   - - - - - - -
text_content(self)
- Return the text content of the tag (and the text in any children).
- source code - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - base_url
- Returns the base URL, given when the page was parsed. -
-   - - body
- Return the <body> element. Can be called from a child element -to get the document's head. -
-   - - classes
- A set-like wrapper around the 'class' attribute. -
-   - - forms
- Return a list of all the forms -
-   - - head
- Returns the <head> element. Can be called from a child -element to get the document's head. -
-   - - label
- Get or set any <label> element associated with this element. -
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

cssselect(self, - expr, - translator='html') -

-
source code  -
- -

Run the CSS expression on this element and its children, -returning a list of the results.

-

Equivalent to lxml.cssselect.CSSSelect(expr, translator='html')(self) --- note that pre-compiling the expression can provide a substantial -speedup.

-
-
-
-
- -
- -
- - -
-

drop_tag(self) -

-
source code  -
- -

Remove the tag, but not its children or text. The children and text -are merged into the parent.

-

Example:

-
->>> h = fragment_fromstring('<div>Hello <b>World!</b></div>')
->>> h.find('.//b').drop_tag()
->>> print(tostring(h, encoding='unicode'))
-<div>Hello World!</div>
-
-
-
-
-
- -
- -
- - -
-

get_element_by_id(self, - id, - *default) -

-
source code  -
- -

Get the first element in a document with the given id. If none is -found, return the default argument if provided or raise KeyError -otherwise.

-

Note that there can be more than one element with the same id, -and this isn't uncommon in HTML documents found in the wild. -Browsers return only the first match, and this function does -the same.

-
-
-
-
- -
- -
- - -
-

iterlinks(self) -

-
source code  -
- -

Yield (element, attribute, link, pos), where attribute may be None -(indicating the link is in the text). pos is the position -where the link occurs; often 0, but sometimes something else in -the case of links in stylesheets or style tags.

-

Note: <base href> is not taken into account in any way. The -link you get is exactly the link in the document.

-

Note: multiple links inside of a single text string or -attribute value are returned in reversed order. This makes it -possible to replace or delete them from the text string value -based on their reported text positions. Otherwise, a -modification at one text position can change the positions of -links reported later on.

-
-
-
-
- -
- -
- - -
-

make_links_absolute(self, - base_url=None, - resolve_base_href=True, - handle_failures=None) -

-
source code  -
- -

Make all links in the document absolute, given the -base_url for the document (the full URL where the document -came from), or if no base_url is given, then the .base_url -of the document.

-

If resolve_base_href is true, then any <base href> -tags in the document are used and removed from the document. -If it is false then any such tag is ignored.

-

If handle_failures is None (default), a failure to process -a URL will abort the processing. If set to 'ignore', errors -are ignored. If set to 'discard', failing URLs will be removed.

-
-
-
-
- -
- -
- - -
-

resolve_base_href(self, - handle_failures=None) -

-
source code  -
- -

Find any <base href> tag in the document, and apply its -values to all links found in the document. Also remove the -tag once it has been applied.

-

If handle_failures is None (default), a failure to process -a URL will abort the processing. If set to 'ignore', errors -are ignored. If set to 'discard', failing URLs will be removed.

-
-
-
-
- -
- -
- - -
-

rewrite_links(self, - link_repl_func, - resolve_base_href=True, - base_href=None) -

-
source code  -
- -

Rewrite all the links in the document. For each link -link_repl_func(link) will be called, and the return value -will replace the old link.

-

Note that links may not be absolute (unless you first called -make_links_absolute()), and may be internal (e.g., -'#anchor'). They can also be values like -'mailto:email' or 'javascript:expr'.

-

If you give base_href then all links passed to -link_repl_func() will take that into account.

-

If the link_repl_func returns None, the attribute or -tag text will be removed completely.

-
-
-
-
-
- - - - - - -
- - - - - -
Property Details[hide private]
-
- -
- -
-

base_url

-

Returns the base URL, given when the page was parsed.

-

Use with urlparse.urljoin(el.base_url, href) to get -absolute URLs.

-
-
Get Method:
-
unreachable.base_url(self) - - Returns the base URL, given when the page was parsed. -
-
-
-
- -
- -
-

body

- Return the <body> element. Can be called from a child element -to get the document's head. -
-
Get Method:
-
unreachable.body(self) - - Return the <body> element. Can be called from a child element -to get the document's head. -
-
-
-
- -
- -
-

classes

- A set-like wrapper around the 'class' attribute. -
-
Get Method:
-
unreachable.classes(self) - - A set-like wrapper around the 'class' attribute. -
-
Set Method:
-
unreachable.classes(self, - classes) -
-
-
-
- -
- -
-

forms

- Return a list of all the forms -
-
Get Method:
-
unreachable.forms(self) - - Return a list of all the forms -
-
-
-
- -
- -
-

head

- Returns the <head> element. Can be called from a child -element to get the document's head. -
-
Get Method:
-
unreachable.head(self) - - Returns the <head> element. Can be called from a child -element to get the document's head. -
-
-
-
- -
- -
-

label

- Get or set any <label> element associated with this element. -
-
Get Method:
-
unreachable.label(self) - - Get or set any <label> element associated with this element. -
-
Set Method:
-
unreachable.label(self, - label) -
-
Delete Method:
-
unreachable.label(self) -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.HtmlProcessingInstruction-class.html b/doc/html/api/lxml.html.HtmlProcessingInstruction-class.html deleted file mode 100644 index c742d7b..0000000 --- a/doc/html/api/lxml.html.HtmlProcessingInstruction-class.html +++ /dev/null @@ -1,287 +0,0 @@ - - - - - lxml.html.HtmlProcessingInstruction - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - lxml :: - html :: - HtmlProcessingInstruction :: - Class HtmlProcessingInstruction - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class HtmlProcessingInstruction

source code

-
-          object --+                
-                   |                
-      etree._Element --+            
-                       |            
- ??.__ContentOnlyElement --+        
-                           |        
-etree._ProcessingInstruction --+    
-                               |    
-                    etree.PIBase --+
-                                   |
-                      object --+   |
-                               |   |
-                       HtmlMixin --+
-                                   |
-                                  HtmlProcessingInstruction
-
- -
- - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from etree.PIBase: - __init__, - __new__ -

-

Inherited from etree._ProcessingInstruction: - __repr__, - get -

-

Inherited from unreachable.__ContentOnlyElement: - __delitem__, - __getitem__, - __len__, - __setitem__, - append, - insert, - items, - keys, - set, - values -

-

Inherited from etree._Element: - __contains__, - __copy__, - __deepcopy__, - __iter__, - __nonzero__, - __reversed__, - addnext, - addprevious, - clear, - cssselect, - extend, - find, - findall, - findtext, - getchildren, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - makeelement, - remove, - replace, - xpath -

-

Inherited from etree._Element (private): - _init -

-

Inherited from HtmlMixin: - drop_tag, - drop_tree, - find_class, - find_rel_links, - get_element_by_id, - iterlinks, - make_links_absolute, - resolve_base_href, - rewrite_links, - text_content -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from etree._ProcessingInstruction: - attrib, - tag, - target -

-

Inherited from unreachable.__ContentOnlyElement: - text -

-

Inherited from etree._Element: - base, - nsmap, - prefix, - sourceline, - tail -

-

Inherited from HtmlMixin: - base_url, - body, - classes, - forms, - head, - label -

-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.InputElement-class.html b/doc/html/api/lxml.html.InputElement-class.html deleted file mode 100644 index 028bb45..0000000 --- a/doc/html/api/lxml.html.InputElement-class.html +++ /dev/null @@ -1,428 +0,0 @@ - - - - - lxml.html.InputElement - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - lxml :: - html :: - InputElement :: - Class InputElement - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class InputElement

source code

-
-            object --+    
-                     |    
-            InputMixin --+
-                         |
-    object --+           |
-             |           |
-etree._Element --+       |
-                 |       |
- etree.ElementBase --+   |
-                     |   |
-        object --+   |   |
-                 |   |   |
-         HtmlMixin --+   |
-                     |   |
-           HtmlElement --+
-                         |
-                        InputElement
-
- -
-

Represents an <input> element.

-

You can get the type with .type (which is lower-cased and -defaults to 'text').

-

Also you can get and set the value with .value

-

Checkboxes and radios have the attribute input.checkable == -True (for all others it is false) and a boolean attribute -.checked.

- - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from InputMixin: - __repr__ -

-

Inherited from HtmlElement: - cssselect, - set -

-

Inherited from etree.ElementBase: - __init__, - __new__ -

-

Inherited from etree._Element: - __contains__, - __copy__, - __deepcopy__, - __delitem__, - __getitem__, - __iter__, - __len__, - __nonzero__, - __reversed__, - __setitem__, - addnext, - addprevious, - append, - clear, - extend, - find, - findall, - findtext, - get, - getchildren, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - insert, - items, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - keys, - makeelement, - remove, - replace, - values, - xpath -

-

Inherited from etree._Element (private): - _init -

-

Inherited from HtmlMixin: - drop_tag, - drop_tree, - find_class, - find_rel_links, - get_element_by_id, - iterlinks, - make_links_absolute, - resolve_base_href, - rewrite_links, - text_content -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - checkable
- Boolean: can this element be checked? -
-   - - checked
- Boolean attribute to get/set the presence of the checked -attribute. -
-   - - type
- Return the type of this element (using the type attribute). -
-   - - value
- Get/set the value of this element, using the value attribute. -
-

Inherited from InputMixin: - name -

-

Inherited from etree._Element: - attrib, - base, - nsmap, - prefix, - sourceline, - tag, - tail, - text -

-

Inherited from HtmlMixin: - base_url, - body, - classes, - forms, - head, - label -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Property Details[hide private]
-
- -
- -
-

checkable

- Boolean: can this element be checked? -
-
Get Method:
-
unreachable.checkable(self) - - Boolean: can this element be checked? -
-
-
-
- -
- -
-

checked

-

Boolean attribute to get/set the presence of the checked -attribute.

-

You can only use this on checkable input types.

-
-
Get Method:
-
unreachable.checked(self) - - Boolean attribute to get/set the presence of the checked -attribute. -
-
Set Method:
-
unreachable.checked(self, - value) -
-
-
-
- -
- -
-

type

- Return the type of this element (using the type attribute). -
-
Get Method:
-
unreachable.type(self) - - Return the type of this element (using the type attribute). -
-
Set Method:
-
unreachable.type(self, - value) -
-
-
-
- -
- -
-

value

-

Get/set the value of this element, using the value attribute.

-

Also, if this is a checkbox and it has no value, this defaults -to 'on'. If it is a checkbox or radio that is not -checked, this returns None.

-
-
Get Method:
-
unreachable.value(self) - - Get/set the value of this element, using the value attribute. -
-
Set Method:
-
unreachable.value(self, - value) -
-
Delete Method:
-
unreachable.value(self) -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.InputGetter-class.html b/doc/html/api/lxml.html.InputGetter-class.html deleted file mode 100644 index c8af161..0000000 --- a/doc/html/api/lxml.html.InputGetter-class.html +++ /dev/null @@ -1,454 +0,0 @@ - - - - - lxml.html.InputGetter - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - lxml :: - html :: - InputGetter :: - Class InputGetter - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class InputGetter

source code

-
-object --+
-         |
-        InputGetter
-
- -
-

An accessor that represents all the input fields in a form.

-

You can get fields by name from this, with -form.inputs['field_name']. If there are a set of checkboxes -with the same name, they are returned as a list (a CheckboxGroup -which also allows value setting). Radio inputs are handled -similarly.

-

You can also iterate over this to get all input elements. This -won't return the same thing as if you get all the names, as -checkboxes and radio elements are returned individually.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__contains__(self, - name) - source code - -
- -
-   - - - - - - -
__getitem__(self, - name) - source code - -
- -
-   - - - - - - -
__init__(self, - form)
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-   - - - - - - -
__iter__(self) - source code - -
- -
-   - - - - - - -
__repr__(self)
- repr(x)
- source code - -
- -
-   - - - - - - -
keys(self) - source code - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - _all_xpath = .//*[local-name() = 'select' or local-name() = 'i... -
-   - - _name_xpath = .//*[@name = $name and (local-name(.) = 'select'... -
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - form) -
(Constructor) -

-
source code  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

__repr__(self) -
(Representation operator) -

-
source code  -
- - repr(x) -
-
Overrides: - object.__repr__ -
(inherited documentation)
- -
-
-
-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

_all_xpath

- -
-
-
-
Value:
-
-.//*[local-name() = 'select' or local-name() = 'input' or local-name()\
- = 'textarea']
-
-
-
-
-
- -
- -
-

_name_xpath

- -
-
-
-
Value:
-
-.//*[@name = $name and (local-name(.) = 'select' or local-name(.) = 'i\
-nput' or local-name(.) = 'textarea')]
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.InputMixin-class.html b/doc/html/api/lxml.html.InputMixin-class.html deleted file mode 100644 index 4451cd8..0000000 --- a/doc/html/api/lxml.html.InputMixin-class.html +++ /dev/null @@ -1,302 +0,0 @@ - - - - - lxml.html.InputMixin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - lxml :: - html :: - InputMixin :: - Class InputMixin - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class InputMixin

source code

-
-object --+
-         |
-        InputMixin
-
- -
Known Subclasses:
-
- -
- -
-Mix-in for all input elements (input, select, and textarea) - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__repr__(self)
- repr(x)
- source code - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - name
- Get/set the name of the element -
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__repr__(self) -
(Representation operator) -

-
source code  -
- - repr(x) -
-
Overrides: - object.__repr__ -
(inherited documentation)
- -
-
-
-
- - - - - - -
- - - - - -
Property Details[hide private]
-
- -
- -
-

name

- Get/set the name of the element -
-
Get Method:
-
unreachable.name(self) - - Get/set the name of the element -
-
Set Method:
-
unreachable.name(self, - value) -
-
Delete Method:
-
unreachable.name(self) -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.LabelElement-class.html b/doc/html/api/lxml.html.LabelElement-class.html deleted file mode 100644 index 2684d80..0000000 --- a/doc/html/api/lxml.html.LabelElement-class.html +++ /dev/null @@ -1,334 +0,0 @@ - - - - - lxml.html.LabelElement - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - lxml :: - html :: - LabelElement :: - Class LabelElement - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class LabelElement

source code

-
-    object --+            
-             |            
-etree._Element --+        
-                 |        
- etree.ElementBase --+    
-                     |    
-        object --+   |    
-                 |   |    
-         HtmlMixin --+    
-                     |    
-           HtmlElement --+
-                         |
-                        LabelElement
-
- -
-

Represents a <label> element.

-

Label elements are linked to other elements with their for -attribute. You can access this element with label.for_element.

- - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from HtmlElement: - cssselect, - set -

-

Inherited from etree.ElementBase: - __init__, - __new__ -

-

Inherited from etree._Element: - __contains__, - __copy__, - __deepcopy__, - __delitem__, - __getitem__, - __iter__, - __len__, - __nonzero__, - __repr__, - __reversed__, - __setitem__, - addnext, - addprevious, - append, - clear, - extend, - find, - findall, - findtext, - get, - getchildren, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - insert, - items, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - keys, - makeelement, - remove, - replace, - values, - xpath -

-

Inherited from etree._Element (private): - _init -

-

Inherited from HtmlMixin: - drop_tag, - drop_tree, - find_class, - find_rel_links, - get_element_by_id, - iterlinks, - make_links_absolute, - resolve_base_href, - rewrite_links, - text_content -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - for_element
- Get/set the element this label points to. Return None if it -can't be found. -
-

Inherited from etree._Element: - attrib, - base, - nsmap, - prefix, - sourceline, - tag, - tail, - text -

-

Inherited from HtmlMixin: - base_url, - body, - classes, - forms, - head, - label -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Property Details[hide private]
-
- -
- -
-

for_element

- Get/set the element this label points to. Return None if it -can't be found. -
-
Get Method:
-
unreachable.for_element(self) - - Get/set the element this label points to. Return None if it -can't be found. -
-
Set Method:
-
unreachable.for_element(self, - other) -
-
Delete Method:
-
unreachable.for_element(self) -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.MultipleSelectOptions-class.html b/doc/html/api/lxml.html.MultipleSelectOptions-class.html deleted file mode 100644 index 549dee8..0000000 --- a/doc/html/api/lxml.html.MultipleSelectOptions-class.html +++ /dev/null @@ -1,606 +0,0 @@ - - - - - lxml.html.MultipleSelectOptions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - lxml :: - html :: - MultipleSelectOptions :: - Class MultipleSelectOptions - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class MultipleSelectOptions

source code

-
-       object --+                
-                |                
-    _abcoll.Sized --+            
-                    |            
-       object --+   |            
-                |   |            
- _abcoll.Iterable --+            
-                    |            
-       object --+   |            
-                |   |            
-_abcoll.Container --+            
-                    |            
-          _abcoll.Set --+        
-                        |        
-       _abcoll.MutableSet --+    
-                            |    
-           _setmixin.SetMixin --+
-                                |
-                               MultipleSelectOptions
-
- -
-

Represents all the selected options in a <select multiple> element.

-

You can add to this set-like option to select an option, or remove -to unselect the option.

- - - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from _abcoll.Sized: - __metaclass__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - select)
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-   - - - - - - -
__iter__(self) - source code - -
- -
-   - - - - - - -
__repr__(self)
- repr(x)
- source code - -
- -
-   - - - - - - -
add(self, - item)
- Add an element.
- source code - -
- -
-   - - - - - - -
remove(self, - item)
- Remove an element. If not a member, raise a KeyError.
- source code - -
- -
-

Inherited from _setmixin.SetMixin: - __contains__, - __len__, - copy, - difference, - difference_update, - discard, - intersection, - intersection_update, - issubset, - issuperset, - symmetric_difference, - symmetric_difference_update, - union, - update -

-

Inherited from _abcoll.MutableSet: - __iand__, - __ior__, - __isub__, - __ixor__, - clear, - pop -

-

Inherited from _abcoll.Set: - __and__, - __eq__, - __ge__, - __gt__, - __le__, - __lt__, - __ne__, - __or__, - __rand__, - __ror__, - __rsub__, - __rxor__, - __sub__, - __xor__, - isdisjoint -

-

Inherited from _abcoll.Set (private): - _hash -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from _setmixin.SetMixin (private): - _from_iterable -

-

Inherited from _abcoll.Sized: - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - __abstractmethods__ = frozenset([]) -
-

Inherited from _setmixin.SetMixin (private): - _abc_negative_cache, - _abc_negative_cache_version, - _abc_registry -

-

Inherited from _abcoll.Set: - __hash__ -

-

Inherited from _abcoll.Sized (private): - _abc_cache -

-
- - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - options
- Iterator of all the <option> elements. -
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - select) -
(Constructor) -

-
source code  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

__iter__(self) -

-
source code  -
- - -
-
Overrides: - _abcoll.Iterable.__iter__ -
-
-
-
- -
- -
- - -
-

__repr__(self) -
(Representation operator) -

-
source code  -
- - repr(x) -
-
Overrides: - object.__repr__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

add(self, - item) -

-
source code  -
- - Add an element. -
-
Overrides: - _abcoll.MutableSet.add -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

remove(self, - item) -

-
source code  -
- - Remove an element. If not a member, raise a KeyError. -
-
Overrides: - _abcoll.MutableSet.remove -
(inherited documentation)
- -
-
-
-
- - - - - - -
- - - - - -
Property Details[hide private]
-
- -
- -
-

options

- Iterator of all the <option> elements. -
-
Get Method:
-
unreachable.options(self) - - Iterator of all the <option> elements. -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.RadioGroup-class.html b/doc/html/api/lxml.html.RadioGroup-class.html deleted file mode 100644 index 8922cfd..0000000 --- a/doc/html/api/lxml.html.RadioGroup-class.html +++ /dev/null @@ -1,384 +0,0 @@ - - - - - lxml.html.RadioGroup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - lxml :: - html :: - RadioGroup :: - Class RadioGroup - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class RadioGroup

source code

-
-object --+    
-         |    
-      list --+
-             |
-            RadioGroup
-
- -
-

This object represents several <input type=radio> elements -that have the same name.

-

You can use this like a list, but also use the property -.value to check/uncheck inputs. Also you can use -.value_options to get the possible values.

- - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__repr__(self)
- repr(x)
- source code - -
- -
-

Inherited from list: - __add__, - __contains__, - __delitem__, - __delslice__, - __eq__, - __ge__, - __getattribute__, - __getitem__, - __getslice__, - __gt__, - __iadd__, - __imul__, - __init__, - __iter__, - __le__, - __len__, - __lt__, - __mul__, - __ne__, - __new__, - __reversed__, - __rmul__, - __setitem__, - __setslice__, - __sizeof__, - append, - count, - extend, - index, - insert, - pop, - remove, - reverse, - sort -

-

Inherited from object: - __delattr__, - __format__, - __reduce__, - __reduce_ex__, - __setattr__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from list: - __hash__ -

-
- - - - - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - value
- Get/set the value, which checks the radio with that value (and -unchecks any other value). -
-   - - value_options
- Returns a list of all the possible values. -
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__repr__(self) -
(Representation operator) -

-
source code  -
- - repr(x) -
-
Overrides: - object.__repr__ -
(inherited documentation)
- -
-
-
-
- - - - - - -
- - - - - -
Property Details[hide private]
-
- -
- -
-

value

- Get/set the value, which checks the radio with that value (and -unchecks any other value). -
-
Get Method:
-
unreachable.value(self) - - Get/set the value, which checks the radio with that value (and -unchecks any other value). -
-
Set Method:
-
unreachable.value(self, - value) -
-
Delete Method:
-
unreachable.value(self) -
-
-
-
- -
- -
-

value_options

- Returns a list of all the possible values. -
-
Get Method:
-
unreachable.value_options(self) - - Returns a list of all the possible values. -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.SelectElement-class.html b/doc/html/api/lxml.html.SelectElement-class.html deleted file mode 100644 index e0f2e3e..0000000 --- a/doc/html/api/lxml.html.SelectElement-class.html +++ /dev/null @@ -1,399 +0,0 @@ - - - - - lxml.html.SelectElement - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - lxml :: - html :: - SelectElement :: - Class SelectElement - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class SelectElement

source code

-
-            object --+    
-                     |    
-            InputMixin --+
-                         |
-    object --+           |
-             |           |
-etree._Element --+       |
-                 |       |
- etree.ElementBase --+   |
-                     |   |
-        object --+   |   |
-                 |   |   |
-         HtmlMixin --+   |
-                     |   |
-           HtmlElement --+
-                         |
-                        SelectElement
-
- -
-

<select> element. You can get the name with .name.

-

.value will be the value of the selected option, unless this -is a multi-select element (<select multiple>), in which case -it will be a set-like object. In either case .value_options -gives the possible values.

-

The boolean attribute .multiple shows if this is a -multi-select.

- - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from InputMixin: - __repr__ -

-

Inherited from HtmlElement: - cssselect, - set -

-

Inherited from etree.ElementBase: - __init__, - __new__ -

-

Inherited from etree._Element: - __contains__, - __copy__, - __deepcopy__, - __delitem__, - __getitem__, - __iter__, - __len__, - __nonzero__, - __reversed__, - __setitem__, - addnext, - addprevious, - append, - clear, - extend, - find, - findall, - findtext, - get, - getchildren, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - insert, - items, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - keys, - makeelement, - remove, - replace, - values, - xpath -

-

Inherited from etree._Element (private): - _init -

-

Inherited from HtmlMixin: - drop_tag, - drop_tree, - find_class, - find_rel_links, - get_element_by_id, - iterlinks, - make_links_absolute, - resolve_base_href, - rewrite_links, - text_content -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - multiple
- Boolean attribute: is there a multiple attribute on this element. -
-   - - value
- Get/set the value of this select (the selected option). -
-   - - value_options
- All the possible values this select can have (the value -attribute of all the <option> elements. -
-

Inherited from InputMixin: - name -

-

Inherited from etree._Element: - attrib, - base, - nsmap, - prefix, - sourceline, - tag, - tail, - text -

-

Inherited from HtmlMixin: - base_url, - body, - classes, - forms, - head, - label -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Property Details[hide private]
-
- -
- -
-

multiple

- Boolean attribute: is there a multiple attribute on this element. -
-
Get Method:
-
unreachable.multiple(self) - - Boolean attribute: is there a multiple attribute on this element. -
-
Set Method:
-
unreachable.multiple(self, - value) -
-
-
-
- -
- -
-

value

-

Get/set the value of this select (the selected option).

-

If this is a multi-select, this is a set-like object that -represents all the selected options.

-
-
Get Method:
-
unreachable.value(self) - - Get/set the value of this select (the selected option). -
-
Set Method:
-
unreachable.value(self, - value) -
-
Delete Method:
-
unreachable.value(self) -
-
-
-
- -
- -
-

value_options

- All the possible values this select can have (the value -attribute of all the <option> elements. -
-
Get Method:
-
unreachable.value_options(self) - - All the possible values this select can have (the value -attribute of all the <option> elements. -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.TextareaElement-class.html b/doc/html/api/lxml.html.TextareaElement-class.html deleted file mode 100644 index a3ee579..0000000 --- a/doc/html/api/lxml.html.TextareaElement-class.html +++ /dev/null @@ -1,339 +0,0 @@ - - - - - lxml.html.TextareaElement - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - lxml :: - html :: - TextareaElement :: - Class TextareaElement - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class TextareaElement

source code

-
-            object --+    
-                     |    
-            InputMixin --+
-                         |
-    object --+           |
-             |           |
-etree._Element --+       |
-                 |       |
- etree.ElementBase --+   |
-                     |   |
-        object --+   |   |
-                 |   |   |
-         HtmlMixin --+   |
-                     |   |
-           HtmlElement --+
-                         |
-                        TextareaElement
-
- -
-<textarea> element. You can get the name with .name and -get/set the value with .value - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from InputMixin: - __repr__ -

-

Inherited from HtmlElement: - cssselect, - set -

-

Inherited from etree.ElementBase: - __init__, - __new__ -

-

Inherited from etree._Element: - __contains__, - __copy__, - __deepcopy__, - __delitem__, - __getitem__, - __iter__, - __len__, - __nonzero__, - __reversed__, - __setitem__, - addnext, - addprevious, - append, - clear, - extend, - find, - findall, - findtext, - get, - getchildren, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - insert, - items, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - keys, - makeelement, - remove, - replace, - values, - xpath -

-

Inherited from etree._Element (private): - _init -

-

Inherited from HtmlMixin: - drop_tag, - drop_tree, - find_class, - find_rel_links, - get_element_by_id, - iterlinks, - make_links_absolute, - resolve_base_href, - rewrite_links, - text_content -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - value
- Get/set the value (which is the contents of this element) -
-

Inherited from InputMixin: - name -

-

Inherited from etree._Element: - attrib, - base, - nsmap, - prefix, - sourceline, - tag, - tail, - text -

-

Inherited from HtmlMixin: - base_url, - body, - classes, - forms, - head, - label -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Property Details[hide private]
-
- -
- -
-

value

- Get/set the value (which is the contents of this element) -
-
Get Method:
-
unreachable.value(self) - - Get/set the value (which is the contents of this element) -
-
Set Method:
-
unreachable.value(self, - value) -
-
Delete Method:
-
unreachable.value(self) -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.XHTMLParser-class.html b/doc/html/api/lxml.html.XHTMLParser-class.html deleted file mode 100644 index b564741..0000000 --- a/doc/html/api/lxml.html.XHTMLParser-class.html +++ /dev/null @@ -1,289 +0,0 @@ - - - - - lxml.html.XHTMLParser - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - lxml :: - html :: - XHTMLParser :: - Class XHTMLParser - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XHTMLParser

source code

-
-    object --+            
-             |            
-??._BaseParser --+        
-                 |        
- etree._FeedParser --+    
-                     |    
-       etree.XMLParser --+
-                         |
-                        XHTMLParser
-
- -
-

An XML parser that is configured to return lxml.html Element -objects.

-

Note that this parser is not really XHTML aware unless you let it -load a DTD that declares the HTML entities. To do this, make sure -you have the XHTML DTDs installed in your catalogs, and create the -parser like this:

-
->>> parser = XHTMLParser(load_dtd=True)
-
-

If you additionally want to validate the document, use this:

-
->>> parser = XHTMLParser(dtd_validation=True)
-
-

For catalog support, see http://www.xmlsoft.org/catalog.html.

- - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - **kwargs)
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-

Inherited from etree.XMLParser: - __new__ -

-

Inherited from etree._FeedParser: - close, - feed -

-

Inherited from unreachable._BaseParser: - copy, - makeelement, - setElementClassLookup, - set_element_class_lookup -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from etree._FeedParser: - feed_error_log -

-

Inherited from unreachable._BaseParser: - error_log, - resolvers, - target, - version -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - **kwargs) -
(Constructor) -

-
source code  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html._MethodFunc-class.html b/doc/html/api/lxml.html._MethodFunc-class.html deleted file mode 100644 index d255f09..0000000 --- a/doc/html/api/lxml.html._MethodFunc-class.html +++ /dev/null @@ -1,276 +0,0 @@ - - - - - lxml.html._MethodFunc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - lxml :: - html :: - _MethodFunc :: - Class _MethodFunc - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _MethodFunc

source code

-
-object --+
-         |
-        _MethodFunc
-
- -
-An object that represents a method on an element as a function; -the function takes either an element or an HTML string. It -returns whatever the function normally returns, or if the function -works in-place (and so returns None) it returns a serialized form -of the resulting document. - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__call__(self, - doc, - *args, - **kw) - source code - -
- -
-   - - - - - - -
__init__(self, - name, - copy=False, - source_class=<class 'lxml.html.HtmlMixin'>)
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - name, - copy=False, - source_class=<class 'lxml.html.HtmlMixin'>) -
(Constructor) -

-
source code  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.builder-module.html b/doc/html/api/lxml.html.builder-module.html deleted file mode 100644 index 7f81285..0000000 --- a/doc/html/api/lxml.html.builder-module.html +++ /dev/null @@ -1,858 +0,0 @@ - - - - - lxml.html.builder - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module builder - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module builder

source code

-

A set of HTML generator tags for building HTML documents.

-

Usage:

-
->>> from lxml.html.builder import *
->>> html = HTML(
-...            HEAD( TITLE("Hello World") ),
-...            BODY( CLASS("main"),
-...                  H1("Hello World !")
-...            )
-...        )
-
->>> import lxml.etree
->>> print lxml.etree.tostring(html, pretty_print=True)
-<html>
-  <head>
-    <title>Hello World</title>
-  </head>
-  <body class="main">
-    <h1>Hello World !</h1>
-  </body>
-</html>
-
- - - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
CLASS(v) - source code - -
- -
-   - - - - - - -
FOR(v) - source code - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - E = <lxml.builder.ElementMaker object> -
-   - - A = <functools.partial object> -
-   - - ABBR = <functools.partial object> -
-   - - ACRONYM = <functools.partial object> -
-   - - ADDRESS = <functools.partial object> -
-   - - APPLET = <functools.partial object> -
-   - - AREA = <functools.partial object> -
-   - - B = <functools.partial object> -
-   - - BASE = <functools.partial object> -
-   - - BASEFONT = <functools.partial object> -
-   - - BDO = <functools.partial object> -
-   - - BIG = <functools.partial object> -
-   - - BLOCKQUOTE = <functools.partial object> -
-   - - BODY = <functools.partial object> -
-   - - BR = <functools.partial object> -
-   - - BUTTON = <functools.partial object> -
-   - - CAPTION = <functools.partial object> -
-   - - CENTER = <functools.partial object> -
-   - - CITE = <functools.partial object> -
-   - - CODE = <functools.partial object> -
-   - - COL = <functools.partial object> -
-   - - COLGROUP = <functools.partial object> -
-   - - DD = <functools.partial object> -
-   - - DEL = <functools.partial object> -
-   - - DFN = <functools.partial object> -
-   - - DIR = <functools.partial object> -
-   - - DIV = <functools.partial object> -
-   - - DL = <functools.partial object> -
-   - - DT = <functools.partial object> -
-   - - EM = <functools.partial object> -
-   - - FIELDSET = <functools.partial object> -
-   - - FONT = <functools.partial object> -
-   - - FORM = <functools.partial object> -
-   - - FRAME = <functools.partial object> -
-   - - FRAMESET = <functools.partial object> -
-   - - H1 = <functools.partial object> -
-   - - H2 = <functools.partial object> -
-   - - H3 = <functools.partial object> -
-   - - H4 = <functools.partial object> -
-   - - H5 = <functools.partial object> -
-   - - H6 = <functools.partial object> -
-   - - HEAD = <functools.partial object> -
-   - - HR = <functools.partial object> -
-   - - HTML = <functools.partial object> -
-   - - I = <functools.partial object> -
-   - - IFRAME = <functools.partial object> -
-   - - IMG = <functools.partial object> -
-   - - INPUT = <functools.partial object> -
-   - - INS = <functools.partial object> -
-   - - ISINDEX = <functools.partial object> -
-   - - KBD = <functools.partial object> -
-   - - LABEL = <functools.partial object> -
-   - - LEGEND = <functools.partial object> -
-   - - LI = <functools.partial object> -
-   - - LINK = <functools.partial object> -
-   - - MAP = <functools.partial object> -
-   - - MENU = <functools.partial object> -
-   - - META = <functools.partial object> -
-   - - NOFRAMES = <functools.partial object> -
-   - - NOSCRIPT = <functools.partial object> -
-   - - OBJECT = <functools.partial object> -
-   - - OL = <functools.partial object> -
-   - - OPTGROUP = <functools.partial object> -
-   - - OPTION = <functools.partial object> -
-   - - P = <functools.partial object> -
-   - - PARAM = <functools.partial object> -
-   - - PRE = <functools.partial object> -
-   - - Q = <functools.partial object> -
-   - - S = <functools.partial object> -
-   - - SAMP = <functools.partial object> -
-   - - SCRIPT = <functools.partial object> -
-   - - SELECT = <functools.partial object> -
-   - - SMALL = <functools.partial object> -
-   - - SPAN = <functools.partial object> -
-   - - STRIKE = <functools.partial object> -
-   - - STRONG = <functools.partial object> -
-   - - STYLE = <functools.partial object> -
-   - - SUB = <functools.partial object> -
-   - - SUP = <functools.partial object> -
-   - - TABLE = <functools.partial object> -
-   - - TBODY = <functools.partial object> -
-   - - TD = <functools.partial object> -
-   - - TEXTAREA = <functools.partial object> -
-   - - TFOOT = <functools.partial object> -
-   - - TH = <functools.partial object> -
-   - - THEAD = <functools.partial object> -
-   - - TITLE = <functools.partial object> -
-   - - TR = <functools.partial object> -
-   - - TT = <functools.partial object> -
-   - - U = <functools.partial object> -
-   - - UL = <functools.partial object> -
-   - - VAR = <functools.partial object> -
-   - - __package__ = 'lxml.html' -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.builder-pysrc.html b/doc/html/api/lxml.html.builder-pysrc.html deleted file mode 100644 index b2f7e06..0000000 --- a/doc/html/api/lxml.html.builder-pysrc.html +++ /dev/null @@ -1,458 +0,0 @@ - - - - - lxml.html.builder - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module builder - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.html.builder

-
-  1  # -------------------------------------------------------------------- 
-  2  # The ElementTree toolkit is 
-  3  # Copyright (c) 1999-2004 by Fredrik Lundh 
-  4  # -------------------------------------------------------------------- 
-  5   
-  6  """ 
-  7  A set of HTML generator tags for building HTML documents. 
-  8   
-  9  Usage:: 
- 10   
- 11      >>> from lxml.html.builder import * 
- 12      >>> html = HTML( 
- 13      ...            HEAD( TITLE("Hello World") ), 
- 14      ...            BODY( CLASS("main"), 
- 15      ...                  H1("Hello World !") 
- 16      ...            ) 
- 17      ...        ) 
- 18   
- 19      >>> import lxml.etree 
- 20      >>> print lxml.etree.tostring(html, pretty_print=True) 
- 21      <html> 
- 22        <head> 
- 23          <title>Hello World</title> 
- 24        </head> 
- 25        <body class="main"> 
- 26          <h1>Hello World !</h1> 
- 27        </body> 
- 28      </html> 
- 29   
- 30  """ 
- 31   
- 32  from lxml.builder import ElementMaker 
- 33  from lxml.html import html_parser 
- 34   
- 35  E = ElementMaker(makeelement=html_parser.makeelement) 
- 36   
- 37  # elements 
- 38  A = E.a # anchor 
- 39  ABBR = E.abbr # abbreviated form (e.g., WWW, HTTP, etc.) 
- 40  ACRONYM = E.acronym #  
- 41  ADDRESS = E.address # information on author 
- 42  APPLET = E.applet # Java applet (DEPRECATED) 
- 43  AREA = E.area # client-side image map area 
- 44  B = E.b # bold text style 
- 45  BASE = E.base # document base URI 
- 46  BASEFONT = E.basefont # base font size (DEPRECATED) 
- 47  BDO = E.bdo # I18N BiDi over-ride 
- 48  BIG = E.big # large text style 
- 49  BLOCKQUOTE = E.blockquote # long quotation 
- 50  BODY = E.body # document body 
- 51  BR = E.br # forced line break 
- 52  BUTTON = E.button # push button 
- 53  CAPTION = E.caption # table caption 
- 54  CENTER = E.center # shorthand for DIV align=center (DEPRECATED) 
- 55  CITE = E.cite # citation 
- 56  CODE = E.code # computer code fragment 
- 57  COL = E.col # table column 
- 58  COLGROUP = E.colgroup # table column group 
- 59  DD = E.dd # definition description 
- 60  DEL = getattr(E, 'del') # deleted text 
- 61  DFN = E.dfn # instance definition 
- 62  DIR = E.dir # directory list (DEPRECATED) 
- 63  DIV = E.div # generic language/style container 
- 64  DL = E.dl # definition list 
- 65  DT = E.dt # definition term 
- 66  EM = E.em # emphasis 
- 67  FIELDSET = E.fieldset # form control group 
- 68  FONT = E.font # local change to font (DEPRECATED) 
- 69  FORM = E.form # interactive form 
- 70  FRAME = E.frame # subwindow 
- 71  FRAMESET = E.frameset # window subdivision 
- 72  H1 = E.h1 # heading 
- 73  H2 = E.h2 # heading 
- 74  H3 = E.h3 # heading 
- 75  H4 = E.h4 # heading 
- 76  H5 = E.h5 # heading 
- 77  H6 = E.h6 # heading 
- 78  HEAD = E.head # document head 
- 79  HR = E.hr # horizontal rule 
- 80  HTML = E.html # document root element 
- 81  I = E.i # italic text style 
- 82  IFRAME = E.iframe # inline subwindow 
- 83  IMG = E.img # Embedded image 
- 84  INPUT = E.input # form control 
- 85  INS = E.ins # inserted text 
- 86  ISINDEX = E.isindex # single line prompt (DEPRECATED) 
- 87  KBD = E.kbd # text to be entered by the user 
- 88  LABEL = E.label # form field label text 
- 89  LEGEND = E.legend # fieldset legend 
- 90  LI = E.li # list item 
- 91  LINK = E.link # a media-independent link 
- 92  MAP = E.map # client-side image map 
- 93  MENU = E.menu # menu list (DEPRECATED) 
- 94  META = E.meta # generic metainformation 
- 95  NOFRAMES = E.noframes # alternate content container for non frame-based rendering 
- 96  NOSCRIPT = E.noscript # alternate content container for non script-based rendering 
- 97  OBJECT = E.object # generic embedded object 
- 98  OL = E.ol # ordered list 
- 99  OPTGROUP = E.optgroup # option group 
-100  OPTION = E.option # selectable choice 
-101  P = E.p # paragraph 
-102  PARAM = E.param # named property value 
-103  PRE = E.pre # preformatted text 
-104  Q = E.q # short inline quotation 
-105  S = E.s # strike-through text style (DEPRECATED) 
-106  SAMP = E.samp # sample program output, scripts, etc. 
-107  SCRIPT = E.script # script statements 
-108  SELECT = E.select # option selector 
-109  SMALL = E.small # small text style 
-110  SPAN = E.span # generic language/style container 
-111  STRIKE = E.strike # strike-through text (DEPRECATED) 
-112  STRONG = E.strong # strong emphasis 
-113  STYLE = E.style # style info 
-114  SUB = E.sub # subscript 
-115  SUP = E.sup # superscript 
-116  TABLE = E.table #  
-117  TBODY = E.tbody # table body 
-118  TD = E.td # table data cell 
-119  TEXTAREA = E.textarea # multi-line text field 
-120  TFOOT = E.tfoot # table footer 
-121  TH = E.th # table header cell 
-122  THEAD = E.thead # table header 
-123  TITLE = E.title # document title 
-124  TR = E.tr # table row 
-125  TT = E.tt # teletype or monospaced text style 
-126  U = E.u # underlined text style (DEPRECATED) 
-127  UL = E.ul # unordered list 
-128  VAR = E.var # instance of a variable or program argument 
-129   
-130  # attributes (only reserved words are included here) 
-131  ATTR = dict 
-
132 -def CLASS(v): return {'class': v} -
133 -def FOR(v): return {'for': v} -
134 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.clean-module.html b/doc/html/api/lxml.html.clean-module.html deleted file mode 100644 index d9e9892..0000000 --- a/doc/html/api/lxml.html.clean-module.html +++ /dev/null @@ -1,778 +0,0 @@ - - - - - lxml.html.clean - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module clean - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module clean

source code

-

A cleanup tool for HTML.

-

Removes unwanted tags and content. See the Cleaner class for -details.

- - - - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - unicode
- str(object='') -> string -
-   - - bytes
- str(object='') -> string -
-   - - Cleaner
- Instances cleans the document of each of the possible offending -elements. The cleaning is controlled by attributes; you can -override attributes in a subclass, or set them in the constructor. -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
- character - - - - - - -
unichr(i)
- Return a string of one character with ordinal i; 0 <= i < 256.
- - -
- -
-   - - - - - - -
_is_image_dataurl(...)
- search(string[, pos[, endpos]]) --> match object or None. -Scan through string looking for a match, and return a corresponding -match object instance. Return None if no position in the string matches.
- source code - -
- -
-   - - - - - - -
_is_possibly_malicious_scheme(...)
- search(string[, pos[, endpos]]) --> match object or None. -Scan through string looking for a match, and return a corresponding -match object instance. Return None if no position in the string matches.
- source code - -
- -
-   - - - - - - -
_is_javascript_scheme(s) - source code - -
- -
-   - - - - - - -
_substitute_whitespace(...)
- sub(repl, string[, count = 0]) --> newstring -Return the string obtained by replacing the leftmost non-overlapping -occurrences of pattern in string by the replacement repl.
- source code - -
- -
-   - - - - - - -
clean_html(...) - source code - -
- -
-   - - - - - - -
autolink(el, - link_regexes=_link_regexes, - avoid_elements=_avoid_elements, - avoid_hosts=_avoid_hosts, - avoid_classes=_avoid_classes)
- Turn any URLs into links.
- source code - -
- -
-   - - - - - - -
_link_text(text, - link_regexes, - avoid_hosts, - factory) - source code - -
- -
-   - - - - - - -
autolink_html(html)
- Turn any URLs into links.
- source code - -
- -
-   - - - - - - -
word_break(el, - max_width=40, - avoid_elements=_avoid_word_break_elements, - avoid_classes=_avoid_word_break_classes, - break_character=unichr(0x200b))
- Breaks any long words found in the body of the text (not attributes).
- source code - -
- -
-   - - - - - - -
word_break_html(html) - source code - -
- -
-   - - - - - - -
_break_text(text, - max_width, - break_character) - source code - -
- -
-   - - - - - - -
_insert_break(word, - width, - break_character) - source code - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - basestring = str, bytes -
-   - - _css_javascript_re = re.compile(r'(?is)expression\s*\(.*?\)') -
-   - - _css_import_re = re.compile(r'(?i)@\s*import') -
-   - - _conditional_comment_re = re.compile(r'(?is)\[if[\s\n\r]+.*?\]... -
-   - - _find_styled_elements = descendant-or-self::*[@style] -
-   - - _find_external_links = descendant-or-self::a [normalize-space... -
-   - - clean = <lxml.html.clean.Cleaner object> -
-   - - _link_regexes = [re.compile(r'(?i)(?P<body>https?://(?P<host>[... -
-   - - _avoid_elements = ['textarea', 'pre', 'code', 'head', 'select'... -
-   - - _avoid_hosts = [re.compile(r'(?i)^localhost'), re.compile(r'(?... -
-   - - _avoid_classes = ['nolink'] -
-   - - _avoid_word_break_elements = ['pre', 'textarea', 'code'] -
-   - - _avoid_word_break_classes = ['nobreak'] -
-   - - _break_prefer_re = re.compile(r'(?i)[^a-z]') -
-   - - __package__ = 'lxml.html' -
-   - - __test__ = {} -
- - - - - - -
- - - - - -
Function Details[hide private]
-
- -
- -
- - -
-

autolink(el, - link_regexes=_link_regexes, - avoid_elements=_avoid_elements, - avoid_hosts=_avoid_hosts, - avoid_classes=_avoid_classes) -

-
source code  -
- -

Turn any URLs into links.

-

It will search for links identified by the given regular -expressions (by default mailto and http(s) links).

-

It won't link text in an element in avoid_elements, or an element -with a class in avoid_classes. It won't link to anything with a -host that matches one of the regular expressions in avoid_hosts -(default localhost and 127.0.0.1).

-

If you pass in an element, the element's tail will not be -substituted, only the contents of the element.

-
-
-
-
- -
- -
- - -
-

autolink_html(html) -

-
source code  -
- -

Turn any URLs into links.

-

It will search for links identified by the given regular -expressions (by default mailto and http(s) links).

-

It won't link text in an element in avoid_elements, or an element -with a class in avoid_classes. It won't link to anything with a -host that matches one of the regular expressions in avoid_hosts -(default localhost and 127.0.0.1).

-

If you pass in an element, the element's tail will not be -substituted, only the contents of the element.

-
-
-
-
- -
- -
- - -
-

word_break(el, - max_width=40, - avoid_elements=_avoid_word_break_elements, - avoid_classes=_avoid_word_break_classes, - break_character=unichr(0x200b)) -

-
source code  -
- -

Breaks any long words found in the body of the text (not attributes).

-

Doesn't effect any of the tags in avoid_elements, by default -<textarea> and <pre>

-

Breaks words by inserting &#8203;, which is a unicode character -for Zero Width Space character. This generally takes up no space -in rendering, but does copy as a space, and in monospace contexts -usually takes up space.

-

See http://www.cs.tut.fi/~jkorpela/html/nobr.html for a discussion

-
-
-
-
-
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

_conditional_comment_re

- -
-
-
-
Value:
-
-re.compile(r'(?is)\[if[\s\n\r]+.*?\][\s\n\r]*>')
-
-
-
-
-
- -
- -
-

_find_external_links

- -
-
-
-
Value:
-
-descendant-or-self::a  [normalize-space(@href) and substring(normalize\
--space(@href),1,1) != '#'] |descendant-or-self::x:a[normalize-space(@h\
-ref) and substring(normalize-space(@href),1,1) != '#']
-
-
-
-
-
- -
- -
-

_link_regexes

- -
-
-
-
Value:
-
-[re.compile(r'(?i)(?P<body>https?://(?P<host>[a-z0-9\._-]+)(?:/[/-_\.,\
-a-z0-9%&\?;=~]*)?(?:\([/-_\.,a-z0-9%&\?;=~]*\))?)'),
- re.compile(r'(?i)mailto:(?P<body>[a-z0-9\._-]+@(?P<host>[a-z0-9_\.-]+\
-[a-z]))')]
-
-
-
-
-
- -
- -
-

_avoid_elements

- -
-
-
-
Value:
-
-['textarea', 'pre', 'code', 'head', 'select', 'a']
-
-
-
-
-
- -
- -
-

_avoid_hosts

- -
-
-
-
Value:
-
-[re.compile(r'(?i)^localhost'),
- re.compile(r'(?i)\bexample\.(?:com|org|net)$'),
- re.compile(r'^127\.0\.0\.1$')]
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.clean-pysrc.html b/doc/html/api/lxml.html.clean-pysrc.html deleted file mode 100644 index 6b17854..0000000 --- a/doc/html/api/lxml.html.clean-pysrc.html +++ /dev/null @@ -1,1350 +0,0 @@ - - - - - lxml.html.clean - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module clean - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.html.clean

-
-  1  """A cleanup tool for HTML. 
-  2   
-  3  Removes unwanted tags and content.  See the `Cleaner` class for 
-  4  details. 
-  5  """ 
-  6   
-  7  import re 
-  8  import copy 
-  9  try: 
- 10      from urlparse import urlsplit 
- 11      from urllib import unquote_plus 
- 12  except ImportError: 
- 13      # Python 3 
- 14      from urllib.parse import urlsplit, unquote_plus 
- 15  from lxml import etree 
- 16  from lxml.html import defs 
- 17  from lxml.html import fromstring, XHTML_NAMESPACE 
- 18  from lxml.html import xhtml_to_html, _transform_result 
- 19   
- 20  try: 
- 21      unichr 
- 22  except NameError: 
- 23      # Python 3 
- 24      unichr = chr 
- 25  try: 
- 26      unicode 
- 27  except NameError: 
- 28      # Python 3 
- 29      unicode = str 
- 30  try: 
- 31      bytes 
- 32  except NameError: 
- 33      # Python < 2.6 
- 34      bytes = str 
- 35  try: 
- 36      basestring 
- 37  except NameError: 
- 38      basestring = (str, bytes) 
- 39   
- 40   
- 41  __all__ = ['clean_html', 'clean', 'Cleaner', 'autolink', 'autolink_html', 
- 42             'word_break', 'word_break_html'] 
- 43   
- 44  # Look at http://code.sixapart.com/trac/livejournal/browser/trunk/cgi-bin/cleanhtml.pl 
- 45  #   Particularly the CSS cleaning; most of the tag cleaning is integrated now 
- 46  # I have multiple kinds of schemes searched; but should schemes be 
- 47  #   whitelisted instead? 
- 48  # max height? 
- 49  # remove images?  Also in CSS?  background attribute? 
- 50  # Some way to whitelist object, iframe, etc (e.g., if you want to 
- 51  #   allow *just* embedded YouTube movies) 
- 52  # Log what was deleted and why? 
- 53  # style="behavior: ..." might be bad in IE? 
- 54  # Should we have something for just <meta http-equiv>?  That's the worst of the 
- 55  #   metas. 
- 56  # UTF-7 detections?  Example: 
- 57  #     <HEAD><META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=UTF-7"> </HEAD>+ADw-SCRIPT+AD4-alert('XSS');+ADw-/SCRIPT+AD4- 
- 58  #   you don't always have to have the charset set, if the page has no charset 
- 59  #   and there's UTF7-like code in it. 
- 60  # Look at these tests: http://htmlpurifier.org/live/smoketests/xssAttacks.php 
- 61   
- 62   
- 63  # This is an IE-specific construct you can have in a stylesheet to 
- 64  # run some Javascript: 
- 65  _css_javascript_re = re.compile( 
- 66      r'expression\s*\(.*?\)', re.S|re.I) 
- 67   
- 68  # Do I have to worry about @\nimport? 
- 69  _css_import_re = re.compile( 
- 70      r'@\s*import', re.I) 
- 71   
- 72  # All kinds of schemes besides just javascript: that can cause 
- 73  # execution: 
- 74  _is_image_dataurl = re.compile( 
- 75      r'^data:image/.+;base64', re.I).search 
- 76  _is_possibly_malicious_scheme = re.compile( 
- 77      r'(?:javascript|jscript|livescript|vbscript|data|about|mocha):', 
- 78      re.I).search 
-
80 if _is_image_dataurl(s): - 81 return None - 82 return _is_possibly_malicious_scheme(s) -
83 - 84 _substitute_whitespace = re.compile(r'[\s\x00-\x08\x0B\x0C\x0E-\x19]+').sub - 85 # FIXME: should data: be blocked? - 86 - 87 # FIXME: check against: http://msdn2.microsoft.com/en-us/library/ms537512.aspx - 88 _conditional_comment_re = re.compile( - 89 r'\[if[\s\n\r]+.*?][\s\n\r]*>', re.I|re.S) - 90 - 91 _find_styled_elements = etree.XPath( - 92 "descendant-or-self::*[@style]") - 93 - 94 _find_external_links = etree.XPath( - 95 ("descendant-or-self::a [normalize-space(@href) and substring(normalize-space(@href),1,1) != '#'] |" - 96 "descendant-or-self::x:a[normalize-space(@href) and substring(normalize-space(@href),1,1) != '#']"), - 97 namespaces={'x':XHTML_NAMESPACE}) - 98 - 99 -
100 -class Cleaner(object): -
101 """ -102 Instances cleans the document of each of the possible offending -103 elements. The cleaning is controlled by attributes; you can -104 override attributes in a subclass, or set them in the constructor. -105 -106 ``scripts``: -107 Removes any ``<script>`` tags. -108 -109 ``javascript``: -110 Removes any Javascript, like an ``onclick`` attribute. Also removes stylesheets -111 as they could contain Javascript. -112 -113 ``comments``: -114 Removes any comments. -115 -116 ``style``: -117 Removes any style tags. -118 -119 ``inline_style`` -120 Removes any style attributes. Defaults to the value of the ``style`` option. -121 -122 ``links``: -123 Removes any ``<link>`` tags -124 -125 ``meta``: -126 Removes any ``<meta>`` tags -127 -128 ``page_structure``: -129 Structural parts of a page: ``<head>``, ``<html>``, ``<title>``. -130 -131 ``processing_instructions``: -132 Removes any processing instructions. -133 -134 ``embedded``: -135 Removes any embedded objects (flash, iframes) -136 -137 ``frames``: -138 Removes any frame-related tags -139 -140 ``forms``: -141 Removes any form tags -142 -143 ``annoying_tags``: -144 Tags that aren't *wrong*, but are annoying. ``<blink>`` and ``<marquee>`` -145 -146 ``remove_tags``: -147 A list of tags to remove. Only the tags will be removed, -148 their content will get pulled up into the parent tag. -149 -150 ``kill_tags``: -151 A list of tags to kill. Killing also removes the tag's content, -152 i.e. the whole subtree, not just the tag itself. -153 -154 ``allow_tags``: -155 A list of tags to include (default include all). -156 -157 ``remove_unknown_tags``: -158 Remove any tags that aren't standard parts of HTML. -159 -160 ``safe_attrs_only``: -161 If true, only include 'safe' attributes (specifically the list -162 from the feedparser HTML sanitisation web site). -163 -164 ``safe_attrs``: -165 A set of attribute names to override the default list of attributes -166 considered 'safe' (when safe_attrs_only=True). -167 -168 ``add_nofollow``: -169 If true, then any <a> tags will have ``rel="nofollow"`` added to them. -170 -171 ``host_whitelist``: -172 A list or set of hosts that you can use for embedded content -173 (for content like ``<object>``, ``<link rel="stylesheet">``, etc). -174 You can also implement/override the method -175 ``allow_embedded_url(el, url)`` or ``allow_element(el)`` to -176 implement more complex rules for what can be embedded. -177 Anything that passes this test will be shown, regardless of -178 the value of (for instance) ``embedded``. -179 -180 Note that this parameter might not work as intended if you do not -181 make the links absolute before doing the cleaning. -182 -183 Note that you may also need to set ``whitelist_tags``. -184 -185 ``whitelist_tags``: -186 A set of tags that can be included with ``host_whitelist``. -187 The default is ``iframe`` and ``embed``; you may wish to -188 include other tags like ``script``, or you may want to -189 implement ``allow_embedded_url`` for more control. Set to None to -190 include all tags. -191 -192 This modifies the document *in place*. -193 """ -194 -195 scripts = True -196 javascript = True -197 comments = True -198 style = False -199 inline_style = None -200 links = True -201 meta = True -202 page_structure = True -203 processing_instructions = True -204 embedded = True -205 frames = True -206 forms = True -207 annoying_tags = True -208 remove_tags = None -209 allow_tags = None -210 kill_tags = None -211 remove_unknown_tags = True -212 safe_attrs_only = True -213 safe_attrs = defs.safe_attrs -214 add_nofollow = False -215 host_whitelist = () -216 whitelist_tags = set(['iframe', 'embed']) -217 -
218 - def __init__(self, **kw): -
219 for name, value in kw.items(): -220 if not hasattr(self, name): -221 raise TypeError( -222 "Unknown parameter: %s=%r" % (name, value)) -223 setattr(self, name, value) -224 if self.inline_style is None and 'inline_style' not in kw: -225 self.inline_style = self.style -
226 -227 # Used to lookup the primary URL for a given tag that is up for -228 # removal: -229 _tag_link_attrs = dict( -230 script='src', -231 link='href', -232 # From: http://java.sun.com/j2se/1.4.2/docs/guide/misc/applet.html -233 # From what I can tell, both attributes can contain a link: -234 applet=['code', 'object'], -235 iframe='src', -236 embed='src', -237 layer='src', -238 # FIXME: there doesn't really seem like a general way to figure out what -239 # links an <object> tag uses; links often go in <param> tags with values -240 # that we don't really know. You'd have to have knowledge about specific -241 # kinds of plugins (probably keyed off classid), and match against those. -242 ##object=?, -243 # FIXME: not looking at the action currently, because it is more complex -244 # than than -- if you keep the form, you should keep the form controls. -245 ##form='action', -246 a='href', -247 ) -248 -
249 - def __call__(self, doc): -
250 """ -251 Cleans the document. -252 """ -253 if hasattr(doc, 'getroot'): -254 # ElementTree instance, instead of an element -255 doc = doc.getroot() -256 # convert XHTML to HTML -257 xhtml_to_html(doc) -258 # Normalize a case that IE treats <image> like <img>, and that -259 # can confuse either this step or later steps. -260 for el in doc.iter('image'): -261 el.tag = 'img' -262 if not self.comments: -263 # Of course, if we were going to kill comments anyway, we don't -264 # need to worry about this -265 self.kill_conditional_comments(doc) -266 -267 kill_tags = set(self.kill_tags or ()) -268 remove_tags = set(self.remove_tags or ()) -269 allow_tags = set(self.allow_tags or ()) -270 -271 if self.scripts: -272 kill_tags.add('script') -273 if self.safe_attrs_only: -274 safe_attrs = set(self.safe_attrs) -275 for el in doc.iter(etree.Element): -276 attrib = el.attrib -277 for aname in attrib.keys(): -278 if aname not in safe_attrs: -279 del attrib[aname] -280 if self.javascript: -281 if not (self.safe_attrs_only and -282 self.safe_attrs == defs.safe_attrs): -283 # safe_attrs handles events attributes itself -284 for el in doc.iter(etree.Element): -285 attrib = el.attrib -286 for aname in attrib.keys(): -287 if aname.startswith('on'): -288 del attrib[aname] -289 doc.rewrite_links(self._remove_javascript_link, -290 resolve_base_href=False) -291 # If we're deleting style then we don't have to remove JS links -292 # from styles, otherwise... -293 if not self.inline_style: -294 for el in _find_styled_elements(doc): -295 old = el.get('style') -296 new = _css_javascript_re.sub('', old) -297 new = _css_import_re.sub('', new) -298 if self._has_sneaky_javascript(new): -299 # Something tricky is going on... -300 del el.attrib['style'] -301 elif new != old: -302 el.set('style', new) -303 if not self.style: -304 for el in list(doc.iter('style')): -305 if el.get('type', '').lower().strip() == 'text/javascript': -306 el.drop_tree() -307 continue -308 old = el.text or '' -309 new = _css_javascript_re.sub('', old) -310 # The imported CSS can do anything; we just can't allow: -311 new = _css_import_re.sub('', old) -312 if self._has_sneaky_javascript(new): -313 # Something tricky is going on... -314 el.text = '/* deleted */' -315 elif new != old: -316 el.text = new -317 if self.comments or self.processing_instructions: -318 # FIXME: why either? I feel like there's some obscure reason -319 # because you can put PIs in comments...? But I've already -320 # forgotten it -321 kill_tags.add(etree.Comment) -322 if self.processing_instructions: -323 kill_tags.add(etree.ProcessingInstruction) -324 if self.style: -325 kill_tags.add('style') -326 if self.inline_style: -327 etree.strip_attributes(doc, 'style') -328 if self.links: -329 kill_tags.add('link') -330 elif self.style or self.javascript: -331 # We must get rid of included stylesheets if Javascript is not -332 # allowed, as you can put Javascript in them -333 for el in list(doc.iter('link')): -334 if 'stylesheet' in el.get('rel', '').lower(): -335 # Note this kills alternate stylesheets as well -336 if not self.allow_element(el): -337 el.drop_tree() -338 if self.meta: -339 kill_tags.add('meta') -340 if self.page_structure: -341 remove_tags.update(('head', 'html', 'title')) -342 if self.embedded: -343 # FIXME: is <layer> really embedded? -344 # We should get rid of any <param> tags not inside <applet>; -345 # These are not really valid anyway. -346 for el in list(doc.iter('param')): -347 found_parent = False -348 parent = el.getparent() -349 while parent is not None and parent.tag not in ('applet', 'object'): -350 parent = parent.getparent() -351 if parent is None: -352 el.drop_tree() -353 kill_tags.update(('applet',)) -354 # The alternate contents that are in an iframe are a good fallback: -355 remove_tags.update(('iframe', 'embed', 'layer', 'object', 'param')) -356 if self.frames: -357 # FIXME: ideally we should look at the frame links, but -358 # generally frames don't mix properly with an HTML -359 # fragment anyway. -360 kill_tags.update(defs.frame_tags) -361 if self.forms: -362 remove_tags.add('form') -363 kill_tags.update(('button', 'input', 'select', 'textarea')) -364 if self.annoying_tags: -365 remove_tags.update(('blink', 'marquee')) -366 -367 _remove = [] -368 _kill = [] -369 for el in doc.iter(): -370 if el.tag in kill_tags: -371 if self.allow_element(el): -372 continue -373 _kill.append(el) -374 elif el.tag in remove_tags: -375 if self.allow_element(el): -376 continue -377 _remove.append(el) -378 -379 if _remove and _remove[0] == doc: -380 # We have to drop the parent-most tag, which we can't -381 # do. Instead we'll rewrite it: -382 el = _remove.pop(0) -383 el.tag = 'div' -384 el.attrib.clear() -385 elif _kill and _kill[0] == doc: -386 # We have to drop the parent-most element, which we can't -387 # do. Instead we'll clear it: -388 el = _kill.pop(0) -389 if el.tag != 'html': -390 el.tag = 'div' -391 el.clear() -392 -393 _kill.reverse() # start with innermost tags -394 for el in _kill: -395 el.drop_tree() -396 for el in _remove: -397 el.drop_tag() -398 -399 if self.remove_unknown_tags: -400 if allow_tags: -401 raise ValueError( -402 "It does not make sense to pass in both allow_tags and remove_unknown_tags") -403 allow_tags = set(defs.tags) -404 if allow_tags: -405 bad = [] -406 for el in doc.iter(): -407 if el.tag not in allow_tags: -408 bad.append(el) -409 if bad: -410 if bad[0] is doc: -411 el = bad.pop(0) -412 el.tag = 'div' -413 el.attrib.clear() -414 for el in bad: -415 el.drop_tag() -416 if self.add_nofollow: -417 for el in _find_external_links(doc): -418 if not self.allow_follow(el): -419 rel = el.get('rel') -420 if rel: -421 if ('nofollow' in rel -422 and ' nofollow ' in (' %s ' % rel)): -423 continue -424 rel = '%s nofollow' % rel -425 else: -426 rel = 'nofollow' -427 el.set('rel', rel) -
428 -
429 - def allow_follow(self, anchor): -
430 """ -431 Override to suppress rel="nofollow" on some anchors. -432 """ -433 return False -
434 -
435 - def allow_element(self, el): -
436 if el.tag not in self._tag_link_attrs: -437 return False -438 attr = self._tag_link_attrs[el.tag] -439 if isinstance(attr, (list, tuple)): -440 for one_attr in attr: -441 url = el.get(one_attr) -442 if not url: -443 return False -444 if not self.allow_embedded_url(el, url): -445 return False -446 return True -447 else: -448 url = el.get(attr) -449 if not url: -450 return False -451 return self.allow_embedded_url(el, url) -
452 -
453 - def allow_embedded_url(self, el, url): -
454 if (self.whitelist_tags is not None -455 and el.tag not in self.whitelist_tags): -456 return False -457 scheme, netloc, path, query, fragment = urlsplit(url) -458 netloc = netloc.lower().split(':', 1)[0] -459 if scheme not in ('http', 'https'): -460 return False -461 if netloc in self.host_whitelist: -462 return True -463 return False -
464 -
465 - def kill_conditional_comments(self, doc): -
466 """ -467 IE conditional comments basically embed HTML that the parser -468 doesn't normally see. We can't allow anything like that, so -469 we'll kill any comments that could be conditional. -470 """ -471 bad = [] -472 self._kill_elements( -473 doc, lambda el: _conditional_comment_re.search(el.text), -474 etree.Comment) -
475 -
476 - def _kill_elements(self, doc, condition, iterate=None): -
477 bad = [] -478 for el in doc.iter(iterate): -479 if condition(el): -480 bad.append(el) -481 for el in bad: -482 el.drop_tree() -
483 -491 -492 _substitute_comments = re.compile(r'/\*.*?\*/', re.S).sub -493 -
494 - def _has_sneaky_javascript(self, style): -
495 """ -496 Depending on the browser, stuff like ``e x p r e s s i o n(...)`` -497 can get interpreted, or ``expre/* stuff */ssion(...)``. This -498 checks for attempt to do stuff like this. -499 -500 Typically the response will be to kill the entire style; if you -501 have just a bit of Javascript in the style another rule will catch -502 that and remove only the Javascript from the style; this catches -503 more sneaky attempts. -504 """ -505 style = self._substitute_comments('', style) -506 style = style.replace('\\', '') -507 style = _substitute_whitespace('', style) -508 style = style.lower() -509 if 'javascript:' in style: -510 return True -511 if 'expression(' in style: -512 return True -513 return False -
514 -
515 - def clean_html(self, html): -
516 result_type = type(html) -517 if isinstance(html, basestring): -518 doc = fromstring(html) -519 else: -520 doc = copy.deepcopy(html) -521 self(doc) -522 return _transform_result(result_type, doc) -
523 -524 clean = Cleaner() -525 clean_html = clean.clean_html -526 -527 ############################################################ -528 ## Autolinking -529 ############################################################ -530 -531 _link_regexes = [ -532 re.compile(r'(?P<body>https?://(?P<host>[a-z0-9._-]+)(?:/[/\-_.,a-z0-9%&?;=~]*)?(?:\([/\-_.,a-z0-9%&?;=~]*\))?)', re.I), -533 # This is conservative, but autolinking can be a bit conservative: -534 re.compile(r'mailto:(?P<body>[a-z0-9._-]+@(?P<host>[a-z0-9_.-]+[a-z]))', re.I), -535 ] -536 -537 _avoid_elements = ['textarea', 'pre', 'code', 'head', 'select', 'a'] -538 -539 _avoid_hosts = [ -540 re.compile(r'^localhost', re.I), -541 re.compile(r'\bexample\.(?:com|org|net)$', re.I), -542 re.compile(r'^127\.0\.0\.1$'), -543 ] -544 -545 _avoid_classes = ['nolink'] -546 -591 -649 -658 -659 autolink_html.__doc__ = autolink.__doc__ -660 -661 ############################################################ -662 ## Word wrapping -663 ############################################################ -664 -665 _avoid_word_break_elements = ['pre', 'textarea', 'code'] -666 _avoid_word_break_classes = ['nobreak'] -667 -
668 -def word_break(el, max_width=40, -669 avoid_elements=_avoid_word_break_elements, -670 avoid_classes=_avoid_word_break_classes, -671 break_character=unichr(0x200b)): -
672 """ -673 Breaks any long words found in the body of the text (not attributes). -674 -675 Doesn't effect any of the tags in avoid_elements, by default -676 ``<textarea>`` and ``<pre>`` -677 -678 Breaks words by inserting &#8203;, which is a unicode character -679 for Zero Width Space character. This generally takes up no space -680 in rendering, but does copy as a space, and in monospace contexts -681 usually takes up space. -682 -683 See http://www.cs.tut.fi/~jkorpela/html/nobr.html for a discussion -684 """ -685 # Character suggestion of &#8203 comes from: -686 # http://www.cs.tut.fi/~jkorpela/html/nobr.html -687 if el.tag in _avoid_word_break_elements: -688 return -689 class_name = el.get('class') -690 if class_name: -691 dont_break = False -692 class_name = class_name.split() -693 for avoid in avoid_classes: -694 if avoid in class_name: -695 dont_break = True -696 break -697 if dont_break: -698 return -699 if el.text: -700 el.text = _break_text(el.text, max_width, break_character) -701 for child in el: -702 word_break(child, max_width=max_width, -703 avoid_elements=avoid_elements, -704 avoid_classes=avoid_classes, -705 break_character=break_character) -706 if child.tail: -707 child.tail = _break_text(child.tail, max_width, break_character) -
708 -
709 -def word_break_html(html, *args, **kw): -
710 result_type = type(html) -711 doc = fromstring(html) -712 word_break(doc, *args, **kw) -713 return _transform_result(result_type, doc) -
714 -
715 -def _break_text(text, max_width, break_character): -
716 words = text.split() -717 for word in words: -718 if len(word) > max_width: -719 replacement = _insert_break(word, max_width, break_character) -720 text = text.replace(word, replacement) -721 return text -
722 -723 _break_prefer_re = re.compile(r'[^a-z]', re.I) -724 -
725 -def _insert_break(word, width, break_character): -
726 orig_word = word -727 result = '' -728 while len(word) > width: -729 start = word[:width] -730 breaks = list(_break_prefer_re.finditer(start)) -731 if breaks: -732 last_break = breaks[-1] -733 # Only walk back up to 10 characters to find a nice break: -734 if last_break.end() > width-10: -735 # FIXME: should the break character be at the end of the -736 # chunk, or the beginning of the next chunk? -737 start = word[:last_break.end()] -738 result += start + break_character -739 word = word[len(start):] -740 result += word -741 return result -
742 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.clean.Cleaner-class.html b/doc/html/api/lxml.html.clean.Cleaner-class.html deleted file mode 100644 index d5c8fcc..0000000 --- a/doc/html/api/lxml.html.clean.Cleaner-class.html +++ /dev/null @@ -1,797 +0,0 @@ - - - - - lxml.html.clean.Cleaner - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module clean :: - Class Cleaner - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class Cleaner

source code

-
-object --+
-         |
-        Cleaner
-
- -
-

Instances cleans the document of each of the possible offending -elements. The cleaning is controlled by attributes; you can -override attributes in a subclass, or set them in the constructor.

-
-
scripts:
-
Removes any <script> tags.
-
javascript:
-
Removes any Javascript, like an onclick attribute. Also removes stylesheets -as they could contain Javascript.
-
comments:
-
Removes any comments.
-
style:
-
Removes any style tags.
-
inline_style
-
Removes any style attributes. Defaults to the value of the style option.
-
links:
-
Removes any <link> tags
-
meta:
-
Removes any <meta> tags
-
page_structure:
-
Structural parts of a page: <head>, <html>, <title>.
-
processing_instructions:
-
Removes any processing instructions.
-
embedded:
-
Removes any embedded objects (flash, iframes)
-
frames:
-
Removes any frame-related tags
-
forms:
-
Removes any form tags
-
annoying_tags:
-
Tags that aren't wrong, but are annoying. <blink> and <marquee>
-
remove_tags:
-
A list of tags to remove. Only the tags will be removed, -their content will get pulled up into the parent tag.
-
kill_tags:
-
A list of tags to kill. Killing also removes the tag's content, -i.e. the whole subtree, not just the tag itself.
-
allow_tags:
-
A list of tags to include (default include all).
-
remove_unknown_tags:
-
Remove any tags that aren't standard parts of HTML.
-
safe_attrs_only:
-
If true, only include 'safe' attributes (specifically the list -from the feedparser HTML sanitisation web site).
-
safe_attrs:
-
A set of attribute names to override the default list of attributes -considered 'safe' (when safe_attrs_only=True).
-
add_nofollow:
-
If true, then any <a> tags will have rel="nofollow" added to them.
-
host_whitelist:
-

A list or set of hosts that you can use for embedded content -(for content like <object>, <link rel="stylesheet">, etc). -You can also implement/override the method -allow_embedded_url(el, url) or allow_element(el) to -implement more complex rules for what can be embedded. -Anything that passes this test will be shown, regardless of -the value of (for instance) embedded.

-

Note that this parameter might not work as intended if you do not -make the links absolute before doing the cleaning.

-

Note that you may also need to set whitelist_tags.

-
-
whitelist_tags:
-
A set of tags that can be included with host_whitelist. -The default is iframe and embed; you may wish to -include other tags like script, or you may want to -implement allow_embedded_url for more control. Set to None to -include all tags.
-
-

This modifies the document in place.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self)
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-   - - - - - - -
__call__(self, - doc)
- Cleans the document.
- source code - -
- -
-   - - - - - - -
allow_follow(self, - anchor)
- Override to suppress rel="nofollow" on some anchors.
- source code - -
- -
-   - - - - - - -
allow_element(self, - el) - source code - -
- -
-   - - - - - - -
allow_embedded_url(self, - el, - url) - source code - -
- -
-   - - - - - - -
kill_conditional_comments(self, - doc)
- IE conditional comments basically embed HTML that the parser -doesn't normally see. We can't allow anything like that, so -we'll kill any comments that could be conditional.
- source code - -
- -
-   - - - - - - -
_kill_elements(self, - doc, - condition, - iterate=None) - source code - -
- -
-   - - - - - - -
_remove_javascript_link(self, - link) - source code - -
- -
-   - - - - - - -
_substitute_comments(...)
- sub(repl, string[, count = 0]) --> newstring -Return the string obtained by replacing the leftmost non-overlapping -occurrences of pattern in string by the replacement repl.
- source code - -
- -
-   - - - - - - -
_has_sneaky_javascript(self, - style)
- Depending on the browser, stuff like e x p r e s s i o n(...) -can get interpreted, or expre/* stuff */ssion(...). This -checks for attempt to do stuff like this.
- source code - -
- -
-   - - - - - - -
clean_html(self, - html) - source code - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - scripts = True -
-   - - javascript = True -
-   - - comments = True -
-   - - style = False -
-   - - inline_style = None
- hash(x) -
-   - - links = True -
-   - - meta = True -
-   - - page_structure = True -
-   - - processing_instructions = True -
-   - - embedded = True -
-   - - frames = True -
-   - - forms = True -
-   - - annoying_tags = True -
-   - - remove_tags = None
- hash(x) -
-   - - allow_tags = None
- hash(x) -
-   - - kill_tags = None
- hash(x) -
-   - - remove_unknown_tags = True -
-   - - safe_attrs_only = True -
-   - - safe_attrs = frozenset(['abbr', 'accept', 'accept-charset', 'a... -
-   - - add_nofollow = False -
-   - - host_whitelist = () -
-   - - whitelist_tags = set(['embed', 'iframe']) -
-   - - _tag_link_attrs = {'a': 'href', 'applet': ['code', 'object'], ... -
-   - - __qualname__ = 'Cleaner' -
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self) -
(Constructor) -

-
source code  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

_has_sneaky_javascript(self, - style) -

-
source code  -
- -

Depending on the browser, stuff like e x p r e s s i o n(...) -can get interpreted, or expre/* stuff */ssion(...). This -checks for attempt to do stuff like this.

-

Typically the response will be to kill the entire style; if you -have just a bit of Javascript in the style another rule will catch -that and remove only the Javascript from the style; this catches -more sneaky attempts.

-
-
-
-
-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

safe_attrs

- -
-
-
-
Value:
-
-frozenset(['abbr',
-           'accept',
-           'accept-charset',
-           'accesskey',
-           'action',
-           'align',
-           'alt',
-           'axis',
-...
-
-
-
-
-
- -
- -
-

_tag_link_attrs

- -
-
-
-
Value:
-
-{'a': 'href',
- 'applet': ['code', 'object'],
- 'embed': 'src',
- 'iframe': 'src',
- 'layer': 'src',
- 'link': 'href',
- 'script': 'src'}
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.defs-module.html b/doc/html/api/lxml.html.defs-module.html deleted file mode 100644 index 52fd72a..0000000 --- a/doc/html/api/lxml.html.defs-module.html +++ /dev/null @@ -1,802 +0,0 @@ - - - - - lxml.html.defs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module defs - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module defs

source code

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - empty_tags = frozenset(['area', 'base', 'basefont', 'br', 'col... -
-   - - deprecated_tags = frozenset(['applet', 'basefont', 'center', '... -
-   - - link_attrs = frozenset(['action', 'archive', 'background', 'ci... -
-   - - event_attrs = frozenset(['onblur', 'onchange', 'onclick', 'ond... -
-   - - safe_attrs = frozenset(['abbr', 'accept', 'accept-charset', 'a... -
-   - - top_level_tags = frozenset(['body', 'frameset', 'head', 'html']) -
-   - - head_tags = frozenset(['base', 'isindex', 'link', 'meta', 'scr... -
-   - - general_block_tags = frozenset(['address', 'blockquote', 'cent... -
-   - - list_tags = frozenset(['dd', 'dir', 'dl', 'dt', 'li', 'menu', ... -
-   - - table_tags = frozenset(['caption', 'col', 'colgroup', 'table',... -
-   - - block_tags = frozenset(['address', 'blockquote', 'caption', 'c... -
-   - - form_tags = frozenset(['button', 'fieldset', 'form', 'input', ... -
-   - - special_inline_tags = frozenset(['a', 'applet', 'area', 'basef... -
-   - - phrase_tags = frozenset(['abbr', 'acronym', 'cite', 'code', 'd... -
-   - - font_style_tags = frozenset(['b', 'big', 'i', 's', 'small', 's... -
-   - - frame_tags = frozenset(['frame', 'frameset', 'noframes']) -
-   - - html5_tags = frozenset(['article', 'aside', 'audio', 'canvas',... -
-   - - nonstandard_tags = frozenset(['blink', 'marquee']) -
-   - - tags = frozenset(['a', 'abbr', 'acronym', 'address', 'applet',... -
-   - - __package__ = None
- hash(x) -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

empty_tags

- -
-
-
-
Value:
-
-frozenset(['area',
-           'base',
-           'basefont',
-           'br',
-           'col',
-           'frame',
-           'hr',
-           'img',
-...
-
-
-
-
-
- -
- -
-

deprecated_tags

- -
-
-
-
Value:
-
-frozenset(['applet',
-           'basefont',
-           'center',
-           'dir',
-           'font',
-           'isindex',
-           'menu',
-           's',
-...
-
-
-
-
-
- -
- -
-

link_attrs

- -
-
-
-
Value:
-
-frozenset(['action',
-           'archive',
-           'background',
-           'cite',
-           'classid',
-           'codebase',
-           'data',
-           'dynsrc',
-...
-
-
-
-
-
- -
- -
-

event_attrs

- -
-
-
-
Value:
-
-frozenset(['onblur',
-           'onchange',
-           'onclick',
-           'ondblclick',
-           'onerror',
-           'onfocus',
-           'onkeydown',
-           'onkeypress',
-...
-
-
-
-
-
- -
- -
-

safe_attrs

- -
-
-
-
Value:
-
-frozenset(['abbr',
-           'accept',
-           'accept-charset',
-           'accesskey',
-           'action',
-           'align',
-           'alt',
-           'axis',
-...
-
-
-
-
-
- -
- -
-

head_tags

- -
-
-
-
Value:
-
-frozenset(['base',
-           'isindex',
-           'link',
-           'meta',
-           'script',
-           'style',
-           'title'])
-
-
-
-
-
- -
- -
-

general_block_tags

- -
-
-
-
Value:
-
-frozenset(['address',
-           'blockquote',
-           'center',
-           'del',
-           'div',
-           'h1',
-           'h2',
-           'h3',
-...
-
-
-
-
-
- -
- -
-

list_tags

- -
-
-
-
Value:
-
-frozenset(['dd', 'dir', 'dl', 'dt', 'li', 'menu', 'ol', 'ul'])
-
-
-
-
-
- -
- -
-

table_tags

- -
-
-
-
Value:
-
-frozenset(['caption',
-           'col',
-           'colgroup',
-           'table',
-           'tbody',
-           'td',
-           'tfoot',
-           'th',
-...
-
-
-
-
-
- -
- -
-

block_tags

- -
-
-
-
Value:
-
-frozenset(['address',
-           'blockquote',
-           'caption',
-           'center',
-           'col',
-           'colgroup',
-           'dd',
-           'del',
-...
-
-
-
-
-
- -
- -
-

form_tags

- -
-
-
-
Value:
-
-frozenset(['button',
-           'fieldset',
-           'form',
-           'input',
-           'label',
-           'legend',
-           'optgroup',
-           'option',
-...
-
-
-
-
-
- -
- -
-

special_inline_tags

- -
-
-
-
Value:
-
-frozenset(['a',
-           'applet',
-           'area',
-           'basefont',
-           'bdo',
-           'br',
-           'embed',
-           'font',
-...
-
-
-
-
-
- -
- -
-

phrase_tags

- -
-
-
-
Value:
-
-frozenset(['abbr',
-           'acronym',
-           'cite',
-           'code',
-           'del',
-           'dfn',
-           'em',
-           'ins',
-...
-
-
-
-
-
- -
- -
-

font_style_tags

- -
-
-
-
Value:
-
-frozenset(['b', 'big', 'i', 's', 'small', 'strike', 'tt', 'u'])
-
-
-
-
-
- -
- -
-

html5_tags

- -
-
-
-
Value:
-
-frozenset(['article',
-           'aside',
-           'audio',
-           'canvas',
-           'command',
-           'datalist',
-           'details',
-           'embed',
-...
-
-
-
-
-
- -
- -
-

tags

- -
-
-
-
Value:
-
-frozenset(['a',
-           'abbr',
-           'acronym',
-           'address',
-           'applet',
-           'area',
-           'article',
-           'aside',
-...
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.defs-pysrc.html b/doc/html/api/lxml.html.defs-pysrc.html deleted file mode 100644 index b2ffa98..0000000 --- a/doc/html/api/lxml.html.defs-pysrc.html +++ /dev/null @@ -1,257 +0,0 @@ - - - - - lxml.html.defs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module defs - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.html.defs

-
-  1  # FIXME: this should all be confirmed against what a DTD says 
-  2  # (probably in a test; this may not match the DTD exactly, but we 
-  3  # should document just how it differs). 
-  4   
-  5  # Data taken from http://www.w3.org/TR/html401/index/elements.html 
-  6  # and http://www.w3.org/community/webed/wiki/HTML/New_HTML5_Elements 
-  7  # for html5_tags. 
-  8   
-  9  empty_tags = frozenset([ 
- 10      'area', 'base', 'basefont', 'br', 'col', 'frame', 'hr', 
- 11      'img', 'input', 'isindex', 'link', 'meta', 'param']) 
- 12   
- 13  deprecated_tags = frozenset([ 
- 14      'applet', 'basefont', 'center', 'dir', 'font', 'isindex', 
- 15      'menu', 's', 'strike', 'u']) 
- 16   
- 17  # archive actually takes a space-separated list of URIs 
- 18  link_attrs = frozenset([ 
- 19      'action', 'archive', 'background', 'cite', 'classid', 
- 20      'codebase', 'data', 'href', 'longdesc', 'profile', 'src', 
- 21      'usemap', 
- 22      # Not standard: 
- 23      'dynsrc', 'lowsrc', 
- 24      ]) 
- 25   
- 26  # Not in the HTML 4 spec: 
- 27  # onerror, onresize 
- 28  event_attrs = frozenset([ 
- 29      'onblur', 'onchange', 'onclick', 'ondblclick', 'onerror', 
- 30      'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 
- 31      'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 
- 32      'onmouseup', 'onreset', 'onresize', 'onselect', 'onsubmit', 
- 33      'onunload', 
- 34      ]) 
- 35   
- 36  safe_attrs = frozenset([ 
- 37      'abbr', 'accept', 'accept-charset', 'accesskey', 'action', 'align', 
- 38      'alt', 'axis', 'border', 'cellpadding', 'cellspacing', 'char', 'charoff', 
- 39      'charset', 'checked', 'cite', 'class', 'clear', 'cols', 'colspan', 
- 40      'color', 'compact', 'coords', 'datetime', 'dir', 'disabled', 'enctype', 
- 41      'for', 'frame', 'headers', 'height', 'href', 'hreflang', 'hspace', 'id', 
- 42      'ismap', 'label', 'lang', 'longdesc', 'maxlength', 'media', 'method', 
- 43      'multiple', 'name', 'nohref', 'noshade', 'nowrap', 'prompt', 'readonly', 
- 44      'rel', 'rev', 'rows', 'rowspan', 'rules', 'scope', 'selected', 'shape', 
- 45      'size', 'span', 'src', 'start', 'summary', 'tabindex', 'target', 'title', 
- 46      'type', 'usemap', 'valign', 'value', 'vspace', 'width']) 
- 47   
- 48  # From http://htmlhelp.com/reference/html40/olist.html 
- 49  top_level_tags = frozenset([ 
- 50      'html', 'head', 'body', 'frameset', 
- 51      ]) 
- 52   
- 53  head_tags = frozenset([ 
- 54      'base', 'isindex', 'link', 'meta', 'script', 'style', 'title', 
- 55      ]) 
- 56   
- 57  general_block_tags = frozenset([ 
- 58      'address', 
- 59      'blockquote', 
- 60      'center', 
- 61      'del', 
- 62      'div', 
- 63      'h1', 
- 64      'h2', 
- 65      'h3', 
- 66      'h4', 
- 67      'h5', 
- 68      'h6', 
- 69      'hr', 
- 70      'ins', 
- 71      'isindex', 
- 72      'noscript', 
- 73      'p', 
- 74      'pre', 
- 75      ]) 
- 76   
- 77  list_tags = frozenset([ 
- 78      'dir', 'dl', 'dt', 'dd', 'li', 'menu', 'ol', 'ul', 
- 79      ]) 
- 80   
- 81  table_tags = frozenset([ 
- 82      'table', 'caption', 'colgroup', 'col', 
- 83      'thead', 'tfoot', 'tbody', 'tr', 'td', 'th', 
- 84      ]) 
- 85   
- 86  # just this one from 
- 87  # http://www.georgehernandez.com/h/XComputers/HTML/2BlockLevel.htm 
- 88  block_tags = general_block_tags | list_tags | table_tags | frozenset([ 
- 89      # Partial form tags 
- 90      'fieldset', 'form', 'legend', 'optgroup', 'option', 
- 91      ]) 
- 92   
- 93  form_tags = frozenset([ 
- 94      'form', 'button', 'fieldset', 'legend', 'input', 'label', 
- 95      'select', 'optgroup', 'option', 'textarea', 
- 96      ]) 
- 97   
- 98  special_inline_tags = frozenset([ 
- 99      'a', 'applet', 'basefont', 'bdo', 'br', 'embed', 'font', 'iframe', 
-100      'img', 'map', 'area', 'object', 'param', 'q', 'script', 
-101      'span', 'sub', 'sup', 
-102      ]) 
-103   
-104  phrase_tags = frozenset([ 
-105      'abbr', 'acronym', 'cite', 'code', 'del', 'dfn', 'em', 
-106      'ins', 'kbd', 'samp', 'strong', 'var', 
-107      ]) 
-108   
-109  font_style_tags = frozenset([ 
-110      'b', 'big', 'i', 's', 'small', 'strike', 'tt', 'u', 
-111      ]) 
-112   
-113  frame_tags = frozenset([ 
-114      'frameset', 'frame', 'noframes', 
-115      ]) 
-116       
-117  html5_tags = frozenset([ 
-118      'article', 'aside', 'audio', 'canvas', 'command', 'datalist', 
-119      'details', 'embed', 'figcaption', 'figure', 'footer', 'header', 
-120      'hgroup', 'keygen', 'mark', 'math', 'meter', 'nav', 'output', 
-121      'progress', 'rp', 'rt', 'ruby', 'section', 'source', 'summary', 
-122      'svg', 'time', 'track', 'video', 'wbr' 
-123      ]) 
-124   
-125  # These tags aren't standard 
-126  nonstandard_tags = frozenset(['blink', 'marquee']) 
-127   
-128   
-129  tags = (top_level_tags | head_tags | general_block_tags | list_tags 
-130          | table_tags | form_tags | special_inline_tags | phrase_tags 
-131          | font_style_tags | nonstandard_tags | html5_tags) 
-132   
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.diff-module.html b/doc/html/api/lxml.html.diff-module.html deleted file mode 100644 index 4fb6523..0000000 --- a/doc/html/api/lxml.html.diff-module.html +++ /dev/null @@ -1,1434 +0,0 @@ - - - - - lxml.html.diff - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module diff - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module diff

source code

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - basestring
- str(object='') -> string -
-   - - DEL_START -
-   - - DEL_END -
-   - - NoDeletes
- Raised when the document no longer contains any pending deletes -(DEL_START/DEL_END) -
-   - - token
- Represents a diffable token, generally a word that is displayed to -the user. Opening tags are attached to this token when they are -adjacent (pre_tags) and closing tags that follow the word -(post_tags). Some exceptions occur when there are empty tags -adjacent to a word, so there may be close tags in pre_tags, or -open tags in post_tags. -
-   - - tag_token
- Represents a token that is actually a tag. Currently this is just -the <img> tag, which takes up visible space just like a word but -is only represented in a document by a tag. -
-   - - href_token
- Represents the href in an anchor tag. Unlike other words, we only -show the href when it changes. -
-   - - InsensitiveSequenceMatcher
- Acts like SequenceMatcher, but tries not to find very small equal -blocks amidst large spans of changes -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
default_markup(text, - version) - source code - -
- -
-   - - - - - - -
html_annotate(doclist, - markup=default_markup)
- doclist should be ordered from oldest to newest, like:
- source code - -
- -
-   - - - - - - -
tokenize_annotated(doc, - annotation)
- Tokenize a document and add an annotation attribute to each token
- source code - -
- -
-   - - - - - - -
html_annotate_merge_annotations(tokens_old, - tokens_new)
- Merge the annotations from tokens_old into tokens_new, when the -tokens in the new document already existed in the old document.
- source code - -
- -
-   - - - - - - -
copy_annotations(src, - dest)
- Copy annotations from the tokens listed in src to the tokens in dest
- source code - -
- -
-   - - - - - - -
compress_tokens(tokens)
- Combine adjacent tokens when there is no HTML between the tokens, -and they share an annotation
- source code - -
- -
-   - - - - - - -
compress_merge_back(tokens, - tok)
- Merge tok into the last element of tokens (modifying the list of -tokens in-place).
- source code - -
- -
-   - - - - - - -
markup_serialize_tokens(tokens, - markup_func)
- Serialize the list of tokens into a list of text chunks, calling -markup_func around text to add annotations.
- source code - -
- -
-   - - - - - - -
htmldiff(old_html, - new_html)
- Do a diff of the old and new document. The documents are HTML -fragments (str/UTF8 or unicode), they are not complete documents -(i.e., no <html> tag).
- source code - -
- -
-   - - - - - - -
htmldiff_tokens(html1_tokens, - html2_tokens)
- Does a diff on the tokens themselves, returning a list of text -chunks (not tokens).
- source code - -
- -
-   - - - - - - -
expand_tokens(tokens, - equal=False)
- Given a list of tokens, return a generator of the chunks of -text for the data in the tokens.
- source code - -
- -
-   - - - - - - -
merge_insert(ins_chunks, - doc)
- doc is the already-handled document (as a list of text chunks); -here we add <ins>ins_chunks</ins> to the end of that.
- source code - -
- -
-   - - - - - - -
merge_delete(del_chunks, - doc)
- Adds the text chunks in del_chunks to the document doc (another -list of text chunks) with marker to show it is a delete. -cleanup_delete later resolves these markers into <del> tags.
- source code - -
- -
-   - - - - - - -
cleanup_delete(chunks)
- Cleans up any DEL_START/DEL_END markers in the document, replacing -them with <del></del>. To do this while keeping the document -valid, it may need to drop some tags (either start or end tags).
- source code - -
- -
-   - - - - - - -
split_unbalanced(chunks)
- Return (unbalanced_start, balanced, unbalanced_end), where each is -a list of text and tag chunks.
- source code - -
- -
-   - - - - - - -
split_delete(chunks)
- Returns (stuff_before_DEL_START, stuff_inside_DEL_START_END, -stuff_after_DEL_END). Returns the first case found (there may be -more DEL_STARTs in stuff_after_DEL_END). Raises NoDeletes if -there's no DEL_START found.
- source code - -
- -
-   - - - - - - -
locate_unbalanced_start(unbalanced_start, - pre_delete, - post_delete)
- pre_delete and post_delete implicitly point to a place in the -document (where the two were split). This moves that point (by -popping items from one and pushing them onto the other). It moves -the point to try to find a place where unbalanced_start applies.
- source code - -
- -
-   - - - - - - -
locate_unbalanced_end(unbalanced_end, - pre_delete, - post_delete)
- like locate_unbalanced_start, except handling end tags and -possibly moving the point earlier in the document.
- source code - -
- -
-   - - - - - - -
tokenize(html, - include_hrefs=True)
- Parse the given HTML and returns token objects (words with attached tags).
- source code - -
- -
-   - - - - - - -
parse_html(html, - cleanup=True)
- Parses an HTML fragment, returning an lxml element. Note that the HTML will be -wrapped in a <div> tag that was not in the original document.
- source code - -
- -
-   - - - - - - -
cleanup_html(html)
- This 'cleans' the HTML, meaning that any page structure is removed -(only the contents of <body> are used, if there is any <body). -Also <ins> and <del> tags are removed.
- source code - -
- -
-   - - - - - - -
split_trailing_whitespace(word)
- This function takes a word, such as 'test
- source code - -
- -
-   - - - - - - -
fixup_chunks(chunks)
- This function takes a list of chunks and produces a list of tokens.
- source code - -
- -
-   - - - - - - -
flatten_el(el, - include_hrefs, - skip_tag=False)
- Takes an lxml element el, and generates all the text chunks for -that tag. Each start tag is a chunk, each word is a chunk, and each -end tag is a chunk.
- source code - -
- -
-   - - - - - - -
split_words(text)
- Splits some text into words. Includes trailing whitespace -on each word when appropriate.
- source code - -
- -
-   - - - - - - -
start_tag(el)
- The text representation of the start tag for a tag.
- source code - -
- -
-   - - - - - - -
end_tag(el)
- The text representation of an end tag for a tag. Includes -trailing whitespace when appropriate.
- source code - -
- -
-   - - - - - - -
is_word(tok) - source code - -
- -
-   - - - - - - -
is_end_tag(tok) - source code - -
- -
-   - - - - - - -
is_start_tag(tok) - source code - -
- -
-   - - - - - - -
fixup_ins_del_tags(html)
- Given an html string, move any <ins> or <del> tags inside of any -block-level elements, e.g. transform <ins><p>word</p></ins> to -<p><ins>word</ins></p>
- source code - -
- -
-   - - - - - - -
serialize_html_fragment(el, - skip_outer=False)
- Serialize a single lxml element as HTML. The serialized form -includes the elements tail.
- source code - -
- -
-   - - - - - - -
_fixup_ins_del_tags(doc)
- fixup_ins_del_tags that works on an lxml document in-place
- source code - -
- -
-   - - - - - - -
_contains_block_level_tag(el)
- True if the element contains any block-level elements, like <p>, <td>, etc.
- source code - -
- -
-   - - - - - - -
_move_el_inside_block(el, - tag)
- helper for _fixup_ins_del_tags; actually takes the <ins> etc tags -and moves them inside any block-level tags.
- source code - -
- -
-   - - - - - - -
_merge_element_contents(el)
- Removes an element, but merges its contents into its place, e.g., -given <p>Hi <i>there!</i></p>, if you remove the <i> element you get -<p>Hi there!</p>
- source code - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - _body_re = re.compile(r'(?is)<body.*?>') -
-   - - _end_body_re = re.compile(r'(?is)</body.*?>') -
-   - - _ins_del_re = re.compile(r'(?is)</?(ins|del).*?>') -
-   - - end_whitespace_re = re.compile(r'[ \t\n\r]$') -
-   - - empty_tags = ('param', 'img', 'area', 'br', 'basefont', 'input... -
-   - - block_level_tags = ('address', 'blockquote', 'center', 'dir', ... -
-   - - block_level_container_tags = ('dd', 'dt', 'frameset', 'li', 't... -
-   - - split_words_re = re.compile(r'(?u)\S+(?:\s+|$)') -
-   - - start_whitespace_re = re.compile(r'^[ \t\n\r]') -
-   - - __package__ = 'lxml.html' -
-   - - __test__ = {u'html_annotate (line 31)':... -
- - - - - - -
- - - - - -
Function Details[hide private]
-
- -
- -
- - -
-

html_annotate(doclist, - markup=default_markup) -

-
source code  -
- -

doclist should be ordered from oldest to newest, like:

-
->>> version1 = 'Hello World'
->>> version2 = 'Goodbye World'
->>> print(html_annotate([(version1, 'version 1'),
-...                      (version2, 'version 2')]))
-<span title="version 2">Goodbye</span> <span title="version 1">World</span>
-
-

The documents must be fragments (str/UTF8 or unicode), not -complete documents

-

The markup argument is a function to markup the spans of words. -This function is called like markup('Hello', 'version 2'), and -returns HTML. The first argument is text and never includes any -markup. The default uses a span with a title:

-
-
->>> print(default_markup('Some Text', 'by Joe'))
-<span title="by Joe">Some Text</span>
-
-
-
-
-
- -
- -
- - -
-

htmldiff(old_html, - new_html) -

-
source code  -
- -

Do a diff of the old and new document. The documents are HTML -fragments (str/UTF8 or unicode), they are not complete documents -(i.e., no <html> tag).

-

Returns HTML with <ins> and <del> tags added around the -appropriate text.

-

Markup is generally ignored, with the markup from new_html -preserved, and possibly some markup from old_html (though it is -considered acceptable to lose some of the old markup). Only the -words in the HTML are diffed. The exception is <img> tags, which -are treated like words, and the href attribute of <a> tags, which -are noted inside the tag itself when there are changes.

-
-
-
-
- -
- -
- - -
-

cleanup_delete(chunks) -

-
source code  -
- -

Cleans up any DEL_START/DEL_END markers in the document, replacing -them with <del></del>. To do this while keeping the document -valid, it may need to drop some tags (either start or end tags).

-

It may also move the del into adjacent tags to try to move it to a -similar location where it was originally located (e.g., moving a -delete into preceding <div> tag, if the del looks like (DEL_START, -'Text</div>', DEL_END)

-
-
-
-
- -
- -
- - -
-

split_unbalanced(chunks) -

-
source code  -
- -

Return (unbalanced_start, balanced, unbalanced_end), where each is -a list of text and tag chunks.

-

unbalanced_start is a list of all the tags that are opened, but -not closed in this span. Similarly, unbalanced_end is a list of -tags that are closed but were not opened. Extracting these might -mean some reordering of the chunks.

-
-
-
-
- -
- -
- - -
-

locate_unbalanced_start(unbalanced_start, - pre_delete, - post_delete) -

-
source code  -
- -

pre_delete and post_delete implicitly point to a place in the -document (where the two were split). This moves that point (by -popping items from one and pushing them onto the other). It moves -the point to try to find a place where unbalanced_start applies.

-

As an example:

-
->>> unbalanced_start = ['<div>']
->>> doc = ['<p>', 'Text', '</p>', '<div>', 'More Text', '</div>']
->>> pre, post = doc[:3], doc[3:]
->>> pre, post
-(['<p>', 'Text', '</p>'], ['<div>', 'More Text', '</div>'])
->>> locate_unbalanced_start(unbalanced_start, pre, post)
->>> pre, post
-(['<p>', 'Text', '</p>', '<div>'], ['More Text', '</div>'])
-
-

As you can see, we moved the point so that the dangling <div> that -we found will be effectively replaced by the div in the original -document. If this doesn't work out, we just throw away -unbalanced_start without doing anything.

-
-
-
-
- -
- -
- - -
-

tokenize(html, - include_hrefs=True) -

-
source code  -
- -

Parse the given HTML and returns token objects (words with attached tags).

-

This parses only the content of a page; anything in the head is -ignored, and the <head> and <body> elements are themselves -optional. The content is then parsed by lxml, which ensures the -validity of the resulting parsed document (though lxml may make -incorrect guesses when the markup is particular bad).

-

<ins> and <del> tags are also eliminated from the document, as -that gets confusing.

-

If include_hrefs is true, then the href attribute of <a> tags is -included as a special kind of diffable token.

-
-
-
-
- -
- -
- - -
-

parse_html(html, - cleanup=True) -

-
source code  -
- -

Parses an HTML fragment, returning an lxml element. Note that the HTML will be -wrapped in a <div> tag that was not in the original document.

-

If cleanup is true, make sure there's no <head> or <body>, and get -rid of any <ins> and <del> tags.

-
-
-
-
- -
- -
- - -
-

split_trailing_whitespace(word) -

-
source code  -
- -
-This function takes a word, such as 'test
-

' and returns ('test','

-

')

-
-
-
-
- -
- -
- - -
-

flatten_el(el, - include_hrefs, - skip_tag=False) -

-
source code  -
- -

Takes an lxml element el, and generates all the text chunks for -that tag. Each start tag is a chunk, each word is a chunk, and each -end tag is a chunk.

-

If skip_tag is true, then the outermost container tag is -not returned (just its contents).

-
-
-
-
- -
- -
- - -
-

serialize_html_fragment(el, - skip_outer=False) -

-
source code  -
- -

Serialize a single lxml element as HTML. The serialized form -includes the elements tail.

-

If skip_outer is true, then don't serialize the outermost tag

-
-
-
-
-
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

empty_tags

- -
-
-
-
Value:
-
-('param',
- 'img',
- 'area',
- 'br',
- 'basefont',
- 'input',
- 'base',
- 'meta',
-...
-
-
-
-
-
- -
- -
-

block_level_tags

- -
-
-
-
Value:
-
-('address',
- 'blockquote',
- 'center',
- 'dir',
- 'div',
- 'dl',
- 'fieldset',
- 'form',
-...
-
-
-
-
-
- -
- -
-

block_level_container_tags

- -
-
-
-
Value:
-
-('dd',
- 'dt',
- 'frameset',
- 'li',
- 'tbody',
- 'td',
- 'tfoot',
- 'th',
-...
-
-
-
-
-
- -
- -
-

__test__

- -
-
-
-
Value:
-
-{u'html_annotate (line 31)': u'''
-    doclist should be ordered from oldest to newest, like::
-
-        >>> version1 = 'Hello World'
-        >>> version2 = 'Goodbye World'
-        >>> print(html_annotate([(version1, 'version 1'),
-        ...                      (version2, 'version 2')]))
-        <span title="version 2">Goodbye</span> <span title="version 1"\
-...
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.diff-pysrc.html b/doc/html/api/lxml.html.diff-pysrc.html deleted file mode 100644 index 94ea3f5..0000000 --- a/doc/html/api/lxml.html.diff-pysrc.html +++ /dev/null @@ -1,1824 +0,0 @@ - - - - - lxml.html.diff - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module diff - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.html.diff

-
-  1  import difflib 
-  2  from lxml import etree 
-  3  from lxml.html import fragment_fromstring 
-  4  import re 
-  5   
-  6  __all__ = ['html_annotate', 'htmldiff'] 
-  7   
-  8  try: 
-  9      from html import escape as html_escape 
- 10  except ImportError: 
- 11      from cgi import escape as html_escape 
- 12  try: 
- 13      _unicode = unicode 
- 14  except NameError: 
- 15      # Python 3 
- 16      _unicode = str 
- 17  try: 
- 18      basestring 
- 19  except NameError: 
- 20      # Python 3 
- 21      basestring = str 
- 22   
- 23  ############################################################ 
- 24  ## Annotation 
- 25  ############################################################ 
- 26   
-
27 -def default_markup(text, version): -
28 return '<span title="%s">%s</span>' % ( - 29 html_escape(_unicode(version), 1), text) -
30 -
31 -def html_annotate(doclist, markup=default_markup): -
32 """ - 33 doclist should be ordered from oldest to newest, like:: - 34 - 35 >>> version1 = 'Hello World' - 36 >>> version2 = 'Goodbye World' - 37 >>> print(html_annotate([(version1, 'version 1'), - 38 ... (version2, 'version 2')])) - 39 <span title="version 2">Goodbye</span> <span title="version 1">World</span> - 40 - 41 The documents must be *fragments* (str/UTF8 or unicode), not - 42 complete documents - 43 - 44 The markup argument is a function to markup the spans of words. - 45 This function is called like markup('Hello', 'version 2'), and - 46 returns HTML. The first argument is text and never includes any - 47 markup. The default uses a span with a title: - 48 - 49 >>> print(default_markup('Some Text', 'by Joe')) - 50 <span title="by Joe">Some Text</span> - 51 """ - 52 # The basic strategy we have is to split the documents up into - 53 # logical tokens (which are words with attached markup). We then - 54 # do diffs of each of the versions to track when a token first - 55 # appeared in the document; the annotation attached to the token - 56 # is the version where it first appeared. - 57 tokenlist = [tokenize_annotated(doc, version) - 58 for doc, version in doclist] - 59 cur_tokens = tokenlist[0] - 60 for tokens in tokenlist[1:]: - 61 html_annotate_merge_annotations(cur_tokens, tokens) - 62 cur_tokens = tokens - 63 - 64 # After we've tracked all the tokens, we can combine spans of text - 65 # that are adjacent and have the same annotation - 66 cur_tokens = compress_tokens(cur_tokens) - 67 # And finally add markup - 68 result = markup_serialize_tokens(cur_tokens, markup) - 69 return ''.join(result).strip() -
70 -
71 -def tokenize_annotated(doc, annotation): -
72 """Tokenize a document and add an annotation attribute to each token - 73 """ - 74 tokens = tokenize(doc, include_hrefs=False) - 75 for tok in tokens: - 76 tok.annotation = annotation - 77 return tokens - 78 -
79 -def html_annotate_merge_annotations(tokens_old, tokens_new): -
80 """Merge the annotations from tokens_old into tokens_new, when the - 81 tokens in the new document already existed in the old document. - 82 """ - 83 s = InsensitiveSequenceMatcher(a=tokens_old, b=tokens_new) - 84 commands = s.get_opcodes() - 85 - 86 for command, i1, i2, j1, j2 in commands: - 87 if command == 'equal': - 88 eq_old = tokens_old[i1:i2] - 89 eq_new = tokens_new[j1:j2] - 90 copy_annotations(eq_old, eq_new) - 91 -
92 -def copy_annotations(src, dest): -
93 """ - 94 Copy annotations from the tokens listed in src to the tokens in dest - 95 """ - 96 assert len(src) == len(dest) - 97 for src_tok, dest_tok in zip(src, dest): - 98 dest_tok.annotation = src_tok.annotation - 99 -
100 -def compress_tokens(tokens): -
101 """ -102 Combine adjacent tokens when there is no HTML between the tokens, -103 and they share an annotation -104 """ -105 result = [tokens[0]] -106 for tok in tokens[1:]: -107 if (not result[-1].post_tags and -108 not tok.pre_tags and -109 result[-1].annotation == tok.annotation): -110 compress_merge_back(result, tok) -111 else: -112 result.append(tok) -113 return result -
114 -
115 -def compress_merge_back(tokens, tok): -
116 """ Merge tok into the last element of tokens (modifying the list of -117 tokens in-place). """ -118 last = tokens[-1] -119 if type(last) is not token or type(tok) is not token: -120 tokens.append(tok) -121 else: -122 text = _unicode(last) -123 if last.trailing_whitespace: -124 text += last.trailing_whitespace -125 text += tok -126 merged = token(text, -127 pre_tags=last.pre_tags, -128 post_tags=tok.post_tags, -129 trailing_whitespace=tok.trailing_whitespace) -130 merged.annotation = last.annotation -131 tokens[-1] = merged -132 -
133 -def markup_serialize_tokens(tokens, markup_func): -
134 """ -135 Serialize the list of tokens into a list of text chunks, calling -136 markup_func around text to add annotations. -137 """ -138 for token in tokens: -139 for pre in token.pre_tags: -140 yield pre -141 html = token.html() -142 html = markup_func(html, token.annotation) -143 if token.trailing_whitespace: -144 html += token.trailing_whitespace -145 yield html -146 for post in token.post_tags: -147 yield post -
148 -149 -150 ############################################################ -151 ## HTML Diffs -152 ############################################################ -153 -
154 -def htmldiff(old_html, new_html): -
155 ## FIXME: this should take parsed documents too, and use their body -156 ## or other content. -157 """ Do a diff of the old and new document. The documents are HTML -158 *fragments* (str/UTF8 or unicode), they are not complete documents -159 (i.e., no <html> tag). -160 -161 Returns HTML with <ins> and <del> tags added around the -162 appropriate text. -163 -164 Markup is generally ignored, with the markup from new_html -165 preserved, and possibly some markup from old_html (though it is -166 considered acceptable to lose some of the old markup). Only the -167 words in the HTML are diffed. The exception is <img> tags, which -168 are treated like words, and the href attribute of <a> tags, which -169 are noted inside the tag itself when there are changes. -170 """ -171 old_html_tokens = tokenize(old_html) -172 new_html_tokens = tokenize(new_html) -173 result = htmldiff_tokens(old_html_tokens, new_html_tokens) -174 result = ''.join(result).strip() -175 return fixup_ins_del_tags(result) -
176 -
177 -def htmldiff_tokens(html1_tokens, html2_tokens): -
178 """ Does a diff on the tokens themselves, returning a list of text -179 chunks (not tokens). -180 """ -181 # There are several passes as we do the differences. The tokens -182 # isolate the portion of the content we care to diff; difflib does -183 # all the actual hard work at that point. -184 # -185 # Then we must create a valid document from pieces of both the old -186 # document and the new document. We generally prefer to take -187 # markup from the new document, and only do a best effort attempt -188 # to keep markup from the old document; anything that we can't -189 # resolve we throw away. Also we try to put the deletes as close -190 # to the location where we think they would have been -- because -191 # we are only keeping the markup from the new document, it can be -192 # fuzzy where in the new document the old text would have gone. -193 # Again we just do a best effort attempt. -194 s = InsensitiveSequenceMatcher(a=html1_tokens, b=html2_tokens) -195 commands = s.get_opcodes() -196 result = [] -197 for command, i1, i2, j1, j2 in commands: -198 if command == 'equal': -199 result.extend(expand_tokens(html2_tokens[j1:j2], equal=True)) -200 continue -201 if command == 'insert' or command == 'replace': -202 ins_tokens = expand_tokens(html2_tokens[j1:j2]) -203 merge_insert(ins_tokens, result) -204 if command == 'delete' or command == 'replace': -205 del_tokens = expand_tokens(html1_tokens[i1:i2]) -206 merge_delete(del_tokens, result) -207 # If deletes were inserted directly as <del> then we'd have an -208 # invalid document at this point. Instead we put in special -209 # markers, and when the complete diffed document has been created -210 # we try to move the deletes around and resolve any problems. -211 result = cleanup_delete(result) -212 -213 return result -
214 -
215 -def expand_tokens(tokens, equal=False): -
216 """Given a list of tokens, return a generator of the chunks of -217 text for the data in the tokens. -218 """ -219 for token in tokens: -220 for pre in token.pre_tags: -221 yield pre -222 if not equal or not token.hide_when_equal: -223 if token.trailing_whitespace: -224 yield token.html() + token.trailing_whitespace -225 else: -226 yield token.html() -227 for post in token.post_tags: -228 yield post -
229 -
230 -def merge_insert(ins_chunks, doc): -
231 """ doc is the already-handled document (as a list of text chunks); -232 here we add <ins>ins_chunks</ins> to the end of that. """ -233 # Though we don't throw away unbalanced_start or unbalanced_end -234 # (we assume there is accompanying markup later or earlier in the -235 # document), we only put <ins> around the balanced portion. -236 unbalanced_start, balanced, unbalanced_end = split_unbalanced(ins_chunks) -237 doc.extend(unbalanced_start) -238 if doc and not doc[-1].endswith(' '): -239 # Fix up the case where the word before the insert didn't end with -240 # a space -241 doc[-1] += ' ' -242 doc.append('<ins>') -243 if balanced and balanced[-1].endswith(' '): -244 # We move space outside of </ins> -245 balanced[-1] = balanced[-1][:-1] -246 doc.extend(balanced) -247 doc.append('</ins> ') -248 doc.extend(unbalanced_end) -
249 -250 # These are sentinals to represent the start and end of a <del> -251 # segment, until we do the cleanup phase to turn them into proper -252 # markup: -
253 -class DEL_START: -
254 pass -
255 -class DEL_END: -
256 pass -
257 -
258 -class NoDeletes(Exception): -
259 """ Raised when the document no longer contains any pending deletes -260 (DEL_START/DEL_END) """ -
261 -
262 -def merge_delete(del_chunks, doc): -
263 """ Adds the text chunks in del_chunks to the document doc (another -264 list of text chunks) with marker to show it is a delete. -265 cleanup_delete later resolves these markers into <del> tags.""" -266 doc.append(DEL_START) -267 doc.extend(del_chunks) -268 doc.append(DEL_END) -
269 -
270 -def cleanup_delete(chunks): -
271 """ Cleans up any DEL_START/DEL_END markers in the document, replacing -272 them with <del></del>. To do this while keeping the document -273 valid, it may need to drop some tags (either start or end tags). -274 -275 It may also move the del into adjacent tags to try to move it to a -276 similar location where it was originally located (e.g., moving a -277 delete into preceding <div> tag, if the del looks like (DEL_START, -278 'Text</div>', DEL_END)""" -279 while 1: -280 # Find a pending DEL_START/DEL_END, splitting the document -281 # into stuff-preceding-DEL_START, stuff-inside, and -282 # stuff-following-DEL_END -283 try: -284 pre_delete, delete, post_delete = split_delete(chunks) -285 except NoDeletes: -286 # Nothing found, we've cleaned up the entire doc -287 break -288 # The stuff-inside-DEL_START/END may not be well balanced -289 # markup. First we figure out what unbalanced portions there are: -290 unbalanced_start, balanced, unbalanced_end = split_unbalanced(delete) -291 # Then we move the span forward and/or backward based on these -292 # unbalanced portions: -293 locate_unbalanced_start(unbalanced_start, pre_delete, post_delete) -294 locate_unbalanced_end(unbalanced_end, pre_delete, post_delete) -295 doc = pre_delete -296 if doc and not doc[-1].endswith(' '): -297 # Fix up case where the word before us didn't have a trailing space -298 doc[-1] += ' ' -299 doc.append('<del>') -300 if balanced and balanced[-1].endswith(' '): -301 # We move space outside of </del> -302 balanced[-1] = balanced[-1][:-1] -303 doc.extend(balanced) -304 doc.append('</del> ') -305 doc.extend(post_delete) -306 chunks = doc -307 return chunks -
308 -
309 -def split_unbalanced(chunks): -
310 """Return (unbalanced_start, balanced, unbalanced_end), where each is -311 a list of text and tag chunks. -312 -313 unbalanced_start is a list of all the tags that are opened, but -314 not closed in this span. Similarly, unbalanced_end is a list of -315 tags that are closed but were not opened. Extracting these might -316 mean some reordering of the chunks.""" -317 start = [] -318 end = [] -319 tag_stack = [] -320 balanced = [] -321 for chunk in chunks: -322 if not chunk.startswith('<'): -323 balanced.append(chunk) -324 continue -325 endtag = chunk[1] == '/' -326 name = chunk.split()[0].strip('<>/') -327 if name in empty_tags: -328 balanced.append(chunk) -329 continue -330 if endtag: -331 if tag_stack and tag_stack[-1][0] == name: -332 balanced.append(chunk) -333 name, pos, tag = tag_stack.pop() -334 balanced[pos] = tag -335 elif tag_stack: -336 start.extend([tag for name, pos, tag in tag_stack]) -337 tag_stack = [] -338 end.append(chunk) -339 else: -340 end.append(chunk) -341 else: -342 tag_stack.append((name, len(balanced), chunk)) -343 balanced.append(None) -344 start.extend( -345 [chunk for name, pos, chunk in tag_stack]) -346 balanced = [chunk for chunk in balanced if chunk is not None] -347 return start, balanced, end -
348 -
349 -def split_delete(chunks): -
350 """ Returns (stuff_before_DEL_START, stuff_inside_DEL_START_END, -351 stuff_after_DEL_END). Returns the first case found (there may be -352 more DEL_STARTs in stuff_after_DEL_END). Raises NoDeletes if -353 there's no DEL_START found. """ -354 try: -355 pos = chunks.index(DEL_START) -356 except ValueError: -357 raise NoDeletes -358 pos2 = chunks.index(DEL_END) -359 return chunks[:pos], chunks[pos+1:pos2], chunks[pos2+1:] -
360 -
361 -def locate_unbalanced_start(unbalanced_start, pre_delete, post_delete): -
362 """ pre_delete and post_delete implicitly point to a place in the -363 document (where the two were split). This moves that point (by -364 popping items from one and pushing them onto the other). It moves -365 the point to try to find a place where unbalanced_start applies. -366 -367 As an example:: -368 -369 >>> unbalanced_start = ['<div>'] -370 >>> doc = ['<p>', 'Text', '</p>', '<div>', 'More Text', '</div>'] -371 >>> pre, post = doc[:3], doc[3:] -372 >>> pre, post -373 (['<p>', 'Text', '</p>'], ['<div>', 'More Text', '</div>']) -374 >>> locate_unbalanced_start(unbalanced_start, pre, post) -375 >>> pre, post -376 (['<p>', 'Text', '</p>', '<div>'], ['More Text', '</div>']) -377 -378 As you can see, we moved the point so that the dangling <div> that -379 we found will be effectively replaced by the div in the original -380 document. If this doesn't work out, we just throw away -381 unbalanced_start without doing anything. -382 """ -383 while 1: -384 if not unbalanced_start: -385 # We have totally succeeded in finding the position -386 break -387 finding = unbalanced_start[0] -388 finding_name = finding.split()[0].strip('<>') -389 if not post_delete: -390 break -391 next = post_delete[0] -392 if next is DEL_START or not next.startswith('<'): -393 # Reached a word, we can't move the delete text forward -394 break -395 if next[1] == '/': -396 # Reached a closing tag, can we go further? Maybe not... -397 break -398 name = next.split()[0].strip('<>') -399 if name == 'ins': -400 # Can't move into an insert -401 break -402 assert name != 'del', ( -403 "Unexpected delete tag: %r" % next) -404 if name == finding_name: -405 unbalanced_start.pop(0) -406 pre_delete.append(post_delete.pop(0)) -407 else: -408 # Found a tag that doesn't match -409 break -
410 -
411 -def locate_unbalanced_end(unbalanced_end, pre_delete, post_delete): -
412 """ like locate_unbalanced_start, except handling end tags and -413 possibly moving the point earlier in the document. """ -414 while 1: -415 if not unbalanced_end: -416 # Success -417 break -418 finding = unbalanced_end[-1] -419 finding_name = finding.split()[0].strip('<>/') -420 if not pre_delete: -421 break -422 next = pre_delete[-1] -423 if next is DEL_END or not next.startswith('</'): -424 # A word or a start tag -425 break -426 name = next.split()[0].strip('<>/') -427 if name == 'ins' or name == 'del': -428 # Can't move into an insert or delete -429 break -430 if name == finding_name: -431 unbalanced_end.pop() -432 post_delete.insert(0, pre_delete.pop()) -433 else: -434 # Found a tag that doesn't match -435 break -
436 -
437 -class token(_unicode): -
438 """ Represents a diffable token, generally a word that is displayed to -439 the user. Opening tags are attached to this token when they are -440 adjacent (pre_tags) and closing tags that follow the word -441 (post_tags). Some exceptions occur when there are empty tags -442 adjacent to a word, so there may be close tags in pre_tags, or -443 open tags in post_tags. -444 -445 We also keep track of whether the word was originally followed by -446 whitespace, even though we do not want to treat the word as -447 equivalent to a similar word that does not have a trailing -448 space.""" -449 -450 # When this is true, the token will be eliminated from the -451 # displayed diff if no change has occurred: -452 hide_when_equal = False -453 -
454 - def __new__(cls, text, pre_tags=None, post_tags=None, trailing_whitespace=""): -
455 obj = _unicode.__new__(cls, text) -456 -457 if pre_tags is not None: -458 obj.pre_tags = pre_tags -459 else: -460 obj.pre_tags = [] -461 -462 if post_tags is not None: -463 obj.post_tags = post_tags -464 else: -465 obj.post_tags = [] -466 -467 obj.trailing_whitespace = trailing_whitespace -468 -469 return obj -
470 -
471 - def __repr__(self): -
472 return 'token(%s, %r, %r, %r)' % (_unicode.__repr__(self), self.pre_tags, -473 self.post_tags, self.trailing_whitespace) -
474 -
475 - def html(self): -
476 return _unicode(self) -
477 -
478 -class tag_token(token): -
479 -480 """ Represents a token that is actually a tag. Currently this is just -481 the <img> tag, which takes up visible space just like a word but -482 is only represented in a document by a tag. """ -483 -
484 - def __new__(cls, tag, data, html_repr, pre_tags=None, -485 post_tags=None, trailing_whitespace=""): -
486 obj = token.__new__(cls, "%s: %s" % (type, data), -487 pre_tags=pre_tags, -488 post_tags=post_tags, -489 trailing_whitespace=trailing_whitespace) -490 obj.tag = tag -491 obj.data = data -492 obj.html_repr = html_repr -493 return obj -
494 -
495 - def __repr__(self): -
496 return 'tag_token(%s, %s, html_repr=%s, post_tags=%r, pre_tags=%r, trailing_whitespace=%r)' % ( -497 self.tag, -498 self.data, -499 self.html_repr, -500 self.pre_tags, -501 self.post_tags, -502 self.trailing_whitespace) -
503 - def html(self): -
504 return self.html_repr -
505 -
506 -class href_token(token): -
507 -508 """ Represents the href in an anchor tag. Unlike other words, we only -509 show the href when it changes. """ -510 -511 hide_when_equal = True -512 -
513 - def html(self): -
514 return ' Link: %s' % self -
515 -
516 -def tokenize(html, include_hrefs=True): -
517 """ -518 Parse the given HTML and returns token objects (words with attached tags). -519 -520 This parses only the content of a page; anything in the head is -521 ignored, and the <head> and <body> elements are themselves -522 optional. The content is then parsed by lxml, which ensures the -523 validity of the resulting parsed document (though lxml may make -524 incorrect guesses when the markup is particular bad). -525 -526 <ins> and <del> tags are also eliminated from the document, as -527 that gets confusing. -528 -529 If include_hrefs is true, then the href attribute of <a> tags is -530 included as a special kind of diffable token.""" -531 if etree.iselement(html): -532 body_el = html -533 else: -534 body_el = parse_html(html, cleanup=True) -535 # Then we split the document into text chunks for each tag, word, and end tag: -536 chunks = flatten_el(body_el, skip_tag=True, include_hrefs=include_hrefs) -537 # Finally re-joining them into token objects: -538 return fixup_chunks(chunks) -
539 -
540 -def parse_html(html, cleanup=True): -
541 """ -542 Parses an HTML fragment, returning an lxml element. Note that the HTML will be -543 wrapped in a <div> tag that was not in the original document. -544 -545 If cleanup is true, make sure there's no <head> or <body>, and get -546 rid of any <ins> and <del> tags. -547 """ -548 if cleanup: -549 # This removes any extra markup or structure like <head>: -550 html = cleanup_html(html) -551 return fragment_fromstring(html, create_parent=True) -
552 -553 _body_re = re.compile(r'<body.*?>', re.I|re.S) -554 _end_body_re = re.compile(r'</body.*?>', re.I|re.S) -555 _ins_del_re = re.compile(r'</?(ins|del).*?>', re.I|re.S) -556 -
557 -def cleanup_html(html): -
558 """ This 'cleans' the HTML, meaning that any page structure is removed -559 (only the contents of <body> are used, if there is any <body). -560 Also <ins> and <del> tags are removed. """ -561 match = _body_re.search(html) -562 if match: -563 html = html[match.end():] -564 match = _end_body_re.search(html) -565 if match: -566 html = html[:match.start()] -567 html = _ins_del_re.sub('', html) -568 return html -
569 -570 -571 end_whitespace_re = re.compile(r'[ \t\n\r]$') -572 -
574 """ -575 This function takes a word, such as 'test\n\n' and returns ('test','\n\n') -576 """ -577 stripped_length = len(word.rstrip()) -578 return word[0:stripped_length], word[stripped_length:] -
579 -580 -
581 -def fixup_chunks(chunks): -
582 """ -583 This function takes a list of chunks and produces a list of tokens. -584 """ -585 tag_accum = [] -586 cur_word = None -587 result = [] -588 for chunk in chunks: -589 if isinstance(chunk, tuple): -590 if chunk[0] == 'img': -591 src = chunk[1] -592 tag, trailing_whitespace = split_trailing_whitespace(chunk[2]) -593 cur_word = tag_token('img', src, html_repr=tag, -594 pre_tags=tag_accum, -595 trailing_whitespace=trailing_whitespace) -596 tag_accum = [] -597 result.append(cur_word) -598 -599 elif chunk[0] == 'href': -600 href = chunk[1] -601 cur_word = href_token(href, pre_tags=tag_accum, trailing_whitespace=" ") -602 tag_accum = [] -603 result.append(cur_word) -604 continue -605 -606 if is_word(chunk): -607 chunk, trailing_whitespace = split_trailing_whitespace(chunk) -608 cur_word = token(chunk, pre_tags=tag_accum, trailing_whitespace=trailing_whitespace) -609 tag_accum = [] -610 result.append(cur_word) -611 -612 elif is_start_tag(chunk): -613 tag_accum.append(chunk) -614 -615 elif is_end_tag(chunk): -616 if tag_accum: -617 tag_accum.append(chunk) -618 else: -619 assert cur_word, ( -620 "Weird state, cur_word=%r, result=%r, chunks=%r of %r" -621 % (cur_word, result, chunk, chunks)) -622 cur_word.post_tags.append(chunk) -623 else: -624 assert(0) -625 -626 if not result: -627 return [token('', pre_tags=tag_accum)] -628 else: -629 result[-1].post_tags.extend(tag_accum) -630 -631 return result -
632 -633 -634 # All the tags in HTML that don't require end tags: -635 empty_tags = ( -636 'param', 'img', 'area', 'br', 'basefont', 'input', -637 'base', 'meta', 'link', 'col') -638 -639 block_level_tags = ( -640 'address', -641 'blockquote', -642 'center', -643 'dir', -644 'div', -645 'dl', -646 'fieldset', -647 'form', -648 'h1', -649 'h2', -650 'h3', -651 'h4', -652 'h5', -653 'h6', -654 'hr', -655 'isindex', -656 'menu', -657 'noframes', -658 'noscript', -659 'ol', -660 'p', -661 'pre', -662 'table', -663 'ul', -664 ) -665 -666 block_level_container_tags = ( -667 'dd', -668 'dt', -669 'frameset', -670 'li', -671 'tbody', -672 'td', -673 'tfoot', -674 'th', -675 'thead', -676 'tr', -677 ) -678 -679 -
680 -def flatten_el(el, include_hrefs, skip_tag=False): -
681 """ Takes an lxml element el, and generates all the text chunks for -682 that tag. Each start tag is a chunk, each word is a chunk, and each -683 end tag is a chunk. -684 -685 If skip_tag is true, then the outermost container tag is -686 not returned (just its contents).""" -687 if not skip_tag: -688 if el.tag == 'img': -689 yield ('img', el.get('src'), start_tag(el)) -690 else: -691 yield start_tag(el) -692 if el.tag in empty_tags and not el.text and not len(el) and not el.tail: -693 return -694 start_words = split_words(el.text) -695 for word in start_words: -696 yield html_escape(word) -697 for child in el: -698 for item in flatten_el(child, include_hrefs=include_hrefs): -699 yield item -700 if el.tag == 'a' and el.get('href') and include_hrefs: -701 yield ('href', el.get('href')) -702 if not skip_tag: -703 yield end_tag(el) -704 end_words = split_words(el.tail) -705 for word in end_words: -706 yield html_escape(word) -
707 -708 split_words_re = re.compile(r'\S+(?:\s+|$)', re.U) -709 -
710 -def split_words(text): -
711 """ Splits some text into words. Includes trailing whitespace -712 on each word when appropriate. """ -713 if not text or not text.strip(): -714 return [] -715 -716 words = split_words_re.findall(text) -717 return words -
718 -719 start_whitespace_re = re.compile(r'^[ \t\n\r]') -720 -
721 -def start_tag(el): -
722 """ -723 The text representation of the start tag for a tag. -724 """ -725 return '<%s%s>' % ( -726 el.tag, ''.join([' %s="%s"' % (name, html_escape(value, True)) -727 for name, value in el.attrib.items()])) -
728 -
729 -def end_tag(el): -
730 """ The text representation of an end tag for a tag. Includes -731 trailing whitespace when appropriate. """ -732 if el.tail and start_whitespace_re.search(el.tail): -733 extra = ' ' -734 else: -735 extra = '' -736 return '</%s>%s' % (el.tag, extra) -
737 -
738 -def is_word(tok): -
739 return not tok.startswith('<') -
740 -
741 -def is_end_tag(tok): -
742 return tok.startswith('</') -
743 -
744 -def is_start_tag(tok): -
745 return tok.startswith('<') and not tok.startswith('</') -
746 -
747 -def fixup_ins_del_tags(html): -
748 """ Given an html string, move any <ins> or <del> tags inside of any -749 block-level elements, e.g. transform <ins><p>word</p></ins> to -750 <p><ins>word</ins></p> """ -751 doc = parse_html(html, cleanup=False) -752 _fixup_ins_del_tags(doc) -753 html = serialize_html_fragment(doc, skip_outer=True) -754 return html -
755 -
756 -def serialize_html_fragment(el, skip_outer=False): -
757 """ Serialize a single lxml element as HTML. The serialized form -758 includes the elements tail. -759 -760 If skip_outer is true, then don't serialize the outermost tag -761 """ -762 assert not isinstance(el, basestring), ( -763 "You should pass in an element, not a string like %r" % el) -764 html = etree.tostring(el, method="html", encoding=_unicode) -765 if skip_outer: -766 # Get rid of the extra starting tag: -767 html = html[html.find('>')+1:] -768 # Get rid of the extra end tag: -769 html = html[:html.rfind('<')] -770 return html.strip() -771 else: -772 return html -
773 -
774 -def _fixup_ins_del_tags(doc): -
775 """fixup_ins_del_tags that works on an lxml document in-place -776 """ -777 for tag in ['ins', 'del']: -778 for el in doc.xpath('descendant-or-self::%s' % tag): -779 if not _contains_block_level_tag(el): -780 continue -781 _move_el_inside_block(el, tag=tag) -782 el.drop_tag() -
783 #_merge_element_contents(el) -784 -
786 """True if the element contains any block-level elements, like <p>, <td>, etc. -787 """ -788 if el.tag in block_level_tags or el.tag in block_level_container_tags: -789 return True -790 for child in el: -791 if _contains_block_level_tag(child): -792 return True -793 return False -
794 -
795 -def _move_el_inside_block(el, tag): -
796 """ helper for _fixup_ins_del_tags; actually takes the <ins> etc tags -797 and moves them inside any block-level tags. """ -798 for child in el: -799 if _contains_block_level_tag(child): -800 break -801 else: -802 import sys -803 # No block-level tags in any child -804 children_tag = etree.Element(tag) -805 children_tag.text = el.text -806 el.text = None -807 children_tag.extend(list(el)) -808 el[:] = [children_tag] -809 return -810 for child in list(el): -811 if _contains_block_level_tag(child): -812 _move_el_inside_block(child, tag) -813 if child.tail: -814 tail_tag = etree.Element(tag) -815 tail_tag.text = child.tail -816 child.tail = None -817 el.insert(el.index(child)+1, tail_tag) -818 else: -819 child_tag = etree.Element(tag) -820 el.replace(child, child_tag) -821 child_tag.append(child) -822 if el.text: -823 text_tag = etree.Element(tag) -824 text_tag.text = el.text -825 el.text = None -826 el.insert(0, text_tag) -
827 -
829 """ -830 Removes an element, but merges its contents into its place, e.g., -831 given <p>Hi <i>there!</i></p>, if you remove the <i> element you get -832 <p>Hi there!</p> -833 """ -834 parent = el.getparent() -835 text = el.text or '' -836 if el.tail: -837 if not len(el): -838 text += el.tail -839 else: -840 if el[-1].tail: -841 el[-1].tail += el.tail -842 else: -843 el[-1].tail = el.tail -844 index = parent.index(el) -845 if text: -846 if index == 0: -847 previous = None -848 else: -849 previous = parent[index-1] -850 if previous is None: -851 if parent.text: -852 parent.text += text -853 else: -854 parent.text = text -855 else: -856 if previous.tail: -857 previous.tail += text -858 else: -859 previous.tail = text -860 parent[index:index+1] = el.getchildren() -
861 -
862 -class InsensitiveSequenceMatcher(difflib.SequenceMatcher): -
863 """ -864 Acts like SequenceMatcher, but tries not to find very small equal -865 blocks amidst large spans of changes -866 """ -867 -868 threshold = 2 -869 -
870 - def get_matching_blocks(self): -
871 size = min(len(self.b), len(self.b)) -872 threshold = min(self.threshold, size / 4) -873 actual = difflib.SequenceMatcher.get_matching_blocks(self) -874 return [item for item in actual -875 if item[2] > threshold -876 or not item[2]] -
877 -878 if __name__ == '__main__': -879 from lxml.html import _diffcommand -880 _diffcommand.main() -881 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.diff.DEL_END-class.html b/doc/html/api/lxml.html.diff.DEL_END-class.html deleted file mode 100644 index ab7f969..0000000 --- a/doc/html/api/lxml.html.diff.DEL_END-class.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - lxml.html.diff.DEL_END - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module diff :: - Class DEL_END - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class DEL_END

source code

- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - __qualname__ = 'DEL_END' -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.diff.DEL_START-class.html b/doc/html/api/lxml.html.diff.DEL_START-class.html deleted file mode 100644 index 74fc08d..0000000 --- a/doc/html/api/lxml.html.diff.DEL_START-class.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - lxml.html.diff.DEL_START - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module diff :: - Class DEL_START - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class DEL_START

source code

- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - __qualname__ = 'DEL_START' -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.diff.InsensitiveSequenceMatcher-class.html b/doc/html/api/lxml.html.diff.InsensitiveSequenceMatcher-class.html deleted file mode 100644 index 620ce50..0000000 --- a/doc/html/api/lxml.html.diff.InsensitiveSequenceMatcher-class.html +++ /dev/null @@ -1,265 +0,0 @@ - - - - - lxml.html.diff.InsensitiveSequenceMatcher - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module diff :: - Class InsensitiveSequenceMatcher - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class InsensitiveSequenceMatcher

source code

-
-difflib.SequenceMatcher --+
-                          |
-                         InsensitiveSequenceMatcher
-
- -
-Acts like SequenceMatcher, but tries not to find very small equal -blocks amidst large spans of changes - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
get_matching_blocks(self)
- Return list of triples describing matching subsequences.
- source code - -
- -
-

Inherited from difflib.SequenceMatcher: - __init__, - find_longest_match, - get_grouped_opcodes, - get_opcodes, - quick_ratio, - ratio, - real_quick_ratio, - set_seq1, - set_seq2, - set_seqs -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - threshold = 2 -
-   - - __qualname__ = 'InsensitiveSequenceMatcher' -
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

get_matching_blocks(self) -

-
source code  -
- -

Return list of triples describing matching subsequences.

-

Each triple is of the form (i, j, n), and means that -a[i:i+n] == b[j:j+n]. The triples are monotonically increasing in -i and in j. New in Python 2.5, it's also guaranteed that if -(i, j, n) and (i', j', n') are adjacent triples in the list, and -the second is not the last triple in the list, then i+n != i' or -j+n != j'. IOW, adjacent triples never describe adjacent equal -blocks.

-

The last triple is a dummy, (len(a), len(b), 0), and is the only -triple with n==0.

-
->>> s = SequenceMatcher(None, "abxcd", "abcd")
->>> s.get_matching_blocks()
-[Match(a=0, b=0, size=2), Match(a=3, b=2, size=2), Match(a=5, b=4, size=0)]
-
-
Overrides: - difflib.SequenceMatcher.get_matching_blocks -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.diff.NoDeletes-class.html b/doc/html/api/lxml.html.diff.NoDeletes-class.html deleted file mode 100644 index 3d1af09..0000000 --- a/doc/html/api/lxml.html.diff.NoDeletes-class.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - lxml.html.diff.NoDeletes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module diff :: - Class NoDeletes - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class NoDeletes

source code

-
-              object --+        
-                       |        
-exceptions.BaseException --+    
-                           |    
-        exceptions.Exception --+
-                               |
-                              NoDeletes
-
- -
-Raised when the document no longer contains any pending deletes -(DEL_START/DEL_END) - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from exceptions.Exception: - __init__, - __new__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - __qualname__ = 'NoDeletes' -
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.diff.href_token-class.html b/doc/html/api/lxml.html.diff.href_token-class.html deleted file mode 100644 index b1b2495..0000000 --- a/doc/html/api/lxml.html.diff.href_token-class.html +++ /dev/null @@ -1,348 +0,0 @@ - - - - - lxml.html.diff.href_token - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module diff :: - Class href_token - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class href_token

source code

-
-object --+            
-         |            
-basestring --+        
-             |        
-       unicode --+    
-                 |    
-             token --+
-                     |
-                    href_token
-
- -
-Represents the href in an anchor tag. Unlike other words, we only -show the href when it changes. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
html(self) - source code - -
- -
-

Inherited from token: - __new__, - __repr__ -

-

Inherited from unicode: - __add__, - __contains__, - __eq__, - __format__, - __ge__, - __getattribute__, - __getitem__, - __getnewargs__, - __getslice__, - __gt__, - __hash__, - __le__, - __len__, - __lt__, - __mod__, - __mul__, - __ne__, - __rmod__, - __rmul__, - __sizeof__, - __str__, - capitalize, - center, - count, - decode, - encode, - endswith, - expandtabs, - find, - format, - index, - isalnum, - isalpha, - isdecimal, - isdigit, - islower, - isnumeric, - isspace, - istitle, - isupper, - join, - ljust, - lower, - lstrip, - partition, - replace, - rfind, - rindex, - rjust, - rpartition, - rsplit, - rstrip, - split, - splitlines, - startswith, - strip, - swapcase, - title, - translate, - upper, - zfill -

-

Inherited from unicode (private): - _formatter_field_name_split, - _formatter_parser -

-

Inherited from object: - __delattr__, - __init__, - __reduce__, - __reduce_ex__, - __setattr__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - hide_when_equal = True -
-   - - __qualname__ = 'href_token' -
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

html(self) -

-
source code  -
- - -
-
Overrides: - token.html -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.diff.tag_token-class.html b/doc/html/api/lxml.html.diff.tag_token-class.html deleted file mode 100644 index 2f707a3..0000000 --- a/doc/html/api/lxml.html.diff.tag_token-class.html +++ /dev/null @@ -1,438 +0,0 @@ - - - - - lxml.html.diff.tag_token - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module diff :: - Class tag_token - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class tag_token

source code

-
-object --+            
-         |            
-basestring --+        
-             |        
-       unicode --+    
-                 |    
-             token --+
-                     |
-                    tag_token
-
- -
-Represents a token that is actually a tag. Currently this is just -the <img> tag, which takes up visible space just like a word but -is only represented in a document by a tag. - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(cls, - tag, - data, - html_repr, - pre_tags=None, - post_tags=None, - trailing_whitespace="") - source code - -
- -
-   - - - - - - -
__repr__(self)
- repr(x)
- source code - -
- -
-   - - - - - - -
html(self) - source code - -
- -
-

Inherited from unicode: - __add__, - __contains__, - __eq__, - __format__, - __ge__, - __getattribute__, - __getitem__, - __getnewargs__, - __getslice__, - __gt__, - __hash__, - __le__, - __len__, - __lt__, - __mod__, - __mul__, - __ne__, - __rmod__, - __rmul__, - __sizeof__, - __str__, - capitalize, - center, - count, - decode, - encode, - endswith, - expandtabs, - find, - format, - index, - isalnum, - isalpha, - isdecimal, - isdigit, - islower, - isnumeric, - isspace, - istitle, - isupper, - join, - ljust, - lower, - lstrip, - partition, - replace, - rfind, - rindex, - rjust, - rpartition, - rsplit, - rstrip, - split, - splitlines, - startswith, - strip, - swapcase, - title, - translate, - upper, - zfill -

-

Inherited from unicode (private): - _formatter_field_name_split, - _formatter_parser -

-

Inherited from object: - __delattr__, - __init__, - __reduce__, - __reduce_ex__, - __setattr__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - __qualname__ = 'tag_token' -
-

Inherited from token: - hide_when_equal -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(cls, - tag, - data, - html_repr, - pre_tags=None, - post_tags=None, - trailing_whitespace="") -

-
source code  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

__repr__(self) -
(Representation operator) -

-
source code  -
- - repr(x) -
-
Overrides: - object.__repr__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

html(self) -

-
source code  -
- - -
-
Overrides: - token.html -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.diff.token-class.html b/doc/html/api/lxml.html.diff.token-class.html deleted file mode 100644 index 32fd839..0000000 --- a/doc/html/api/lxml.html.diff.token-class.html +++ /dev/null @@ -1,423 +0,0 @@ - - - - - lxml.html.diff.token - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module diff :: - Class token - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class token

source code

-
-object --+        
-         |        
-basestring --+    
-             |    
-       unicode --+
-                 |
-                token
-
- -
Known Subclasses:
-
- -
- -
-

Represents a diffable token, generally a word that is displayed to -the user. Opening tags are attached to this token when they are -adjacent (pre_tags) and closing tags that follow the word -(post_tags). Some exceptions occur when there are empty tags -adjacent to a word, so there may be close tags in pre_tags, or -open tags in post_tags.

-

We also keep track of whether the word was originally followed by -whitespace, even though we do not want to treat the word as -equivalent to a similar word that does not have a trailing -space.

- - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(cls, - text, - pre_tags=None, - post_tags=None, - trailing_whitespace="") - source code - -
- -
-   - - - - - - -
__repr__(self)
- repr(x)
- source code - -
- -
-   - - - - - - -
html(self) - source code - -
- -
-

Inherited from unicode: - __add__, - __contains__, - __eq__, - __format__, - __ge__, - __getattribute__, - __getitem__, - __getnewargs__, - __getslice__, - __gt__, - __hash__, - __le__, - __len__, - __lt__, - __mod__, - __mul__, - __ne__, - __rmod__, - __rmul__, - __sizeof__, - __str__, - capitalize, - center, - count, - decode, - encode, - endswith, - expandtabs, - find, - format, - index, - isalnum, - isalpha, - isdecimal, - isdigit, - islower, - isnumeric, - isspace, - istitle, - isupper, - join, - ljust, - lower, - lstrip, - partition, - replace, - rfind, - rindex, - rjust, - rpartition, - rsplit, - rstrip, - split, - splitlines, - startswith, - strip, - swapcase, - title, - translate, - upper, - zfill -

-

Inherited from unicode (private): - _formatter_field_name_split, - _formatter_parser -

-

Inherited from object: - __delattr__, - __init__, - __reduce__, - __reduce_ex__, - __setattr__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - hide_when_equal = False -
-   - - __qualname__ = 'token' -
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(cls, - text, - pre_tags=None, - post_tags=None, - trailing_whitespace="") -

-
source code  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

__repr__(self) -
(Representation operator) -

-
source code  -
- - repr(x) -
-
Overrides: - object.__repr__ -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.formfill-module.html b/doc/html/api/lxml.html.formfill-module.html deleted file mode 100644 index ae16fdd..0000000 --- a/doc/html/api/lxml.html.formfill-module.html +++ /dev/null @@ -1,587 +0,0 @@ - - - - - lxml.html.formfill - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module formfill - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module formfill

source code

- - - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - basestring
- str(object='') -> string -
-   - - FormNotFound
- Raised when no form can be found -
-   - - DefaultErrorCreator -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
fill_form(el, - values, - form_id=None, - form_index=None) - source code - -
- -
-   - - - - - - -
fill_form_html(html, - values, - form_id=None, - form_index=None) - source code - -
- -
-   - - - - - - -
_fill_form(el, - values) - source code - -
- -
-   - - - - - - -
_takes_multiple(input) - source code - -
- -
-   - - - - - - -
_fill_multiple(input, - value) - source code - -
- -
-   - - - - - - -
_check(el, - check) - source code - -
- -
-   - - - - - - -
_select(el, - select) - source code - -
- -
-   - - - - - - -
_fill_single(input, - value) - source code - -
- -
-   - - - - - - -
_find_form(el, - form_id=None, - form_index=None) - source code - -
- -
-   - - - - - - -
_find_form_ids(el) - source code - -
- -
-   - - - - - - -
insert_errors(el, - errors, - form_id=None, - form_index=None, - error_class='error', - error_creator=<lxml.html.formfill.DefaultErrorCreator object>) - source code - -
- -
-   - - - - - - -
insert_errors_html(html, - values, - **kw) - source code - -
- -
-   - - - - - - -
_insert_error(el, - error, - error_class, - error_creator) - source code - -
- -
-   - - - - - - -
_add_class(el, - class_name) - source code - -
- -
-   - - - - - - -
_find_elements_for_name(form, - name, - error) - source code - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - _form_name_xpath = descendant-or-self::form[name=$name]|descen... -
-   - - _input_xpath = descendant-or-self::input|descendant-or-self::s... -
-   - - _label_for_xpath = //label[@for=$for_id]|//x:label[@for=$for_id] -
-   - - _name_xpath = descendant-or-self::*[@name=$name] -
-   - - default_error_creator = <lxml.html.formfill.DefaultErrorCreato... -
-   - - __package__ = 'lxml.html' -
-   - - _tag = 'x:textarea' -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

_form_name_xpath

- -
-
-
-
Value:
-
-descendant-or-self::form[name=$name]|descendant-or-self::x:form[name=$\
-name]
-
-
-
-
-
- -
- -
-

_input_xpath

- -
-
-
-
Value:
-
-descendant-or-self::input|descendant-or-self::select|descendant-or-sel\
-f::textarea|descendant-or-self::x:input|descendant-or-self::x:select|d\
-escendant-or-self::x:textarea
-
-
-
-
-
- -
- -
-

default_error_creator

- -
-
-
-
Value:
-
-<lxml.html.formfill.DefaultErrorCreator object>
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.formfill-pysrc.html b/doc/html/api/lxml.html.formfill-pysrc.html deleted file mode 100644 index 6a7d1b5..0000000 --- a/doc/html/api/lxml.html.formfill-pysrc.html +++ /dev/null @@ -1,816 +0,0 @@ - - - - - lxml.html.formfill - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module formfill - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.html.formfill

-
-  1  from lxml.etree import XPath, ElementBase 
-  2  from lxml.html import fromstring, XHTML_NAMESPACE 
-  3  from lxml.html import _forms_xpath, _options_xpath, _nons, _transform_result 
-  4  from lxml.html import defs 
-  5  import copy 
-  6   
-  7  try: 
-  8      basestring 
-  9  except NameError: 
- 10      # Python 3 
- 11      basestring = str 
- 12   
- 13  __all__ = ['FormNotFound', 'fill_form', 'fill_form_html', 
- 14             'insert_errors', 'insert_errors_html', 
- 15             'DefaultErrorCreator'] 
- 16   
-
17 -class FormNotFound(LookupError): -
18 """ - 19 Raised when no form can be found - 20 """ -
21 - 22 _form_name_xpath = XPath('descendant-or-self::form[name=$name]|descendant-or-self::x:form[name=$name]', namespaces={'x':XHTML_NAMESPACE}) - 23 _input_xpath = XPath('|'.join(['descendant-or-self::'+_tag for _tag in ('input','select','textarea','x:input','x:select','x:textarea')]), - 24 namespaces={'x':XHTML_NAMESPACE}) - 25 _label_for_xpath = XPath('//label[@for=$for_id]|//x:label[@for=$for_id]', - 26 namespaces={'x':XHTML_NAMESPACE}) - 27 _name_xpath = XPath('descendant-or-self::*[@name=$name]') - 28 -
29 -def fill_form( - 30 el, - 31 values, - 32 form_id=None, - 33 form_index=None, - 34 ): -
35 el = _find_form(el, form_id=form_id, form_index=form_index) - 36 _fill_form(el, values) -
37 -
38 -def fill_form_html(html, values, form_id=None, form_index=None): -
39 result_type = type(html) - 40 if isinstance(html, basestring): - 41 doc = fromstring(html) - 42 else: - 43 doc = copy.deepcopy(html) - 44 fill_form(doc, values, form_id=form_id, form_index=form_index) - 45 return _transform_result(result_type, doc) -
46 -
47 -def _fill_form(el, values): -
48 counts = {} - 49 if hasattr(values, 'mixed'): - 50 # For Paste request parameters - 51 values = values.mixed() - 52 inputs = _input_xpath(el) - 53 for input in inputs: - 54 name = input.get('name') - 55 if not name: - 56 continue - 57 if _takes_multiple(input): - 58 value = values.get(name, []) - 59 if not isinstance(value, (list, tuple)): - 60 value = [value] - 61 _fill_multiple(input, value) - 62 elif name not in values: - 63 continue - 64 else: - 65 index = counts.get(name, 0) - 66 counts[name] = index + 1 - 67 value = values[name] - 68 if isinstance(value, (list, tuple)): - 69 try: - 70 value = value[index] - 71 except IndexError: - 72 continue - 73 elif index > 0: - 74 continue - 75 _fill_single(input, value) -
76 -
77 -def _takes_multiple(input): -
78 if _nons(input.tag) == 'select' and input.get('multiple'): - 79 # FIXME: multiple="0"? - 80 return True - 81 type = input.get('type', '').lower() - 82 if type in ('radio', 'checkbox'): - 83 return True - 84 return False -
85 -
86 -def _fill_multiple(input, value): -
87 type = input.get('type', '').lower() - 88 if type == 'checkbox': - 89 v = input.get('value') - 90 if v is None: - 91 if not value: - 92 result = False - 93 else: - 94 result = value[0] - 95 if isinstance(value, basestring): - 96 # The only valid "on" value for an unnamed checkbox is 'on' - 97 result = result == 'on' - 98 _check(input, result) - 99 else: -100 _check(input, v in value) -101 elif type == 'radio': -102 v = input.get('value') -103 _check(input, v in value) -104 else: -105 assert _nons(input.tag) == 'select' -106 for option in _options_xpath(input): -107 v = option.get('value') -108 if v is None: -109 # This seems to be the default, at least on IE -110 # FIXME: but I'm not sure -111 v = option.text_content() -112 _select(option, v in value) -
113 -
114 -def _check(el, check): -
115 if check: -116 el.set('checked', '') -117 else: -118 if 'checked' in el.attrib: -119 del el.attrib['checked'] -
120 -
121 -def _select(el, select): -
122 if select: -123 el.set('selected', '') -124 else: -125 if 'selected' in el.attrib: -126 del el.attrib['selected'] -
127 -
128 -def _fill_single(input, value): -
129 if _nons(input.tag) == 'textarea': -130 input.text = value -131 else: -132 input.set('value', value) -
133 -
134 -def _find_form(el, form_id=None, form_index=None): -
135 if form_id is None and form_index is None: -136 forms = _forms_xpath(el) -137 for form in forms: -138 return form -139 raise FormNotFound( -140 "No forms in page") -141 if form_id is not None: -142 form = el.get_element_by_id(form_id) -143 if form is not None: -144 return form -145 forms = _form_name_xpath(el, name=form_id) -146 if forms: -147 return forms[0] -148 else: -149 raise FormNotFound( -150 "No form with the name or id of %r (forms: %s)" -151 % (id, ', '.join(_find_form_ids(el)))) -152 if form_index is not None: -153 forms = _forms_xpath(el) -154 try: -155 return forms[form_index] -156 except IndexError: -157 raise FormNotFound( -158 "There is no form with the index %r (%i forms found)" -159 % (form_index, len(forms))) -
160 -
161 -def _find_form_ids(el): -
162 forms = _forms_xpath(el) -163 if not forms: -164 yield '(no forms)' -165 return -166 for index, form in enumerate(forms): -167 if form.get('id'): -168 if form.get('name'): -169 yield '%s or %s' % (form.get('id'), -170 form.get('name')) -171 else: -172 yield form.get('id') -173 elif form.get('name'): -174 yield form.get('name') -175 else: -176 yield '(unnamed form %s)' % index -
177 -178 ############################################################ -179 ## Error filling -180 ############################################################ -181 -
182 -class DefaultErrorCreator(object): -
183 insert_before = True -184 block_inside = True -185 error_container_tag = 'div' -186 error_message_class = 'error-message' -187 error_block_class = 'error-block' -188 default_message = "Invalid" -189 -
190 - def __init__(self, **kw): -
191 for name, value in kw.items(): -192 if not hasattr(self, name): -193 raise TypeError( -194 "Unexpected keyword argument: %s" % name) -195 setattr(self, name, value) -
196 -
197 - def __call__(self, el, is_block, message): -
198 error_el = el.makeelement(self.error_container_tag) -199 if self.error_message_class: -200 error_el.set('class', self.error_message_class) -201 if is_block and self.error_block_class: -202 error_el.set('class', error_el.get('class', '')+' '+self.error_block_class) -203 if message is None or message == '': -204 message = self.default_message -205 if isinstance(message, ElementBase): -206 error_el.append(message) -207 else: -208 assert isinstance(message, basestring), ( -209 "Bad message; should be a string or element: %r" % message) -210 error_el.text = message or self.default_message -211 if is_block and self.block_inside: -212 if self.insert_before: -213 error_el.tail = el.text -214 el.text = None -215 el.insert(0, error_el) -216 else: -217 el.append(error_el) -218 else: -219 parent = el.getparent() -220 pos = parent.index(el) -221 if self.insert_before: -222 parent.insert(pos, error_el) -223 else: -224 error_el.tail = el.tail -225 el.tail = None -226 parent.insert(pos+1, error_el) -
227 -228 default_error_creator = DefaultErrorCreator() -229 -230 -
231 -def insert_errors( -232 el, -233 errors, -234 form_id=None, -235 form_index=None, -236 error_class="error", -237 error_creator=default_error_creator, -238 ): -
239 el = _find_form(el, form_id=form_id, form_index=form_index) -240 for name, error in errors.items(): -241 if error is None: -242 continue -243 for error_el, message in _find_elements_for_name(el, name, error): -244 assert isinstance(message, (basestring, type(None), ElementBase)), ( -245 "Bad message: %r" % message) -246 _insert_error(error_el, message, error_class, error_creator) -
247 -
248 -def insert_errors_html(html, values, **kw): -
249 result_type = type(html) -250 if isinstance(html, basestring): -251 doc = fromstring(html) -252 else: -253 doc = copy.deepcopy(html) -254 insert_errors(doc, values, **kw) -255 return _transform_result(result_type, doc) -
256 -
257 -def _insert_error(el, error, error_class, error_creator): -
258 if _nons(el.tag) in defs.empty_tags or _nons(el.tag) == 'textarea': -259 is_block = False -260 else: -261 is_block = True -262 if _nons(el.tag) != 'form' and error_class: -263 _add_class(el, error_class) -264 if el.get('id'): -265 labels = _label_for_xpath(el, for_id=el.get('id')) -266 if labels: -267 for label in labels: -268 _add_class(label, error_class) -269 error_creator(el, is_block, error) -
270 -
271 -def _add_class(el, class_name): -
272 if el.get('class'): -273 el.set('class', el.get('class')+' '+class_name) -274 else: -275 el.set('class', class_name) -
276 -
277 -def _find_elements_for_name(form, name, error): -
278 if name is None: -279 # An error for the entire form -280 yield form, error -281 return -282 if name.startswith('#'): -283 # By id -284 el = form.get_element_by_id(name[1:]) -285 if el is not None: -286 yield el, error -287 return -288 els = _name_xpath(form, name=name) -289 if not els: -290 # FIXME: should this raise an exception? -291 return -292 if not isinstance(error, (list, tuple)): -293 yield els[0], error -294 return -295 # FIXME: if error is longer than els, should it raise an error? -296 for el, err in zip(els, error): -297 if err is None: -298 continue -299 yield el, err -
300 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.formfill.DefaultErrorCreator-class.html b/doc/html/api/lxml.html.formfill.DefaultErrorCreator-class.html deleted file mode 100644 index 2d5a4bf..0000000 --- a/doc/html/api/lxml.html.formfill.DefaultErrorCreator-class.html +++ /dev/null @@ -1,326 +0,0 @@ - - - - - lxml.html.formfill.DefaultErrorCreator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module formfill :: - Class DefaultErrorCreator - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class DefaultErrorCreator

source code

-
-object --+
-         |
-        DefaultErrorCreator
-
- -
- - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - **kw)
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-   - - - - - - -
__call__(self, - el, - is_block, - message) - source code - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - insert_before = True -
-   - - block_inside = True -
-   - - error_container_tag = 'div' -
-   - - error_message_class = 'error-message' -
-   - - error_block_class = 'error-block' -
-   - - default_message = 'Invalid' -
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - **kw) -
(Constructor) -

-
source code  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.formfill.FormNotFound-class.html b/doc/html/api/lxml.html.formfill.FormNotFound-class.html deleted file mode 100644 index 9ecf9e6..0000000 --- a/doc/html/api/lxml.html.formfill.FormNotFound-class.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - lxml.html.formfill.FormNotFound - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module formfill :: - Class FormNotFound - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class FormNotFound

source code

-
-              object --+                
-                       |                
-exceptions.BaseException --+            
-                           |            
-        exceptions.Exception --+        
-                               |        
-        exceptions.StandardError --+    
-                                   |    
-              exceptions.LookupError --+
-                                       |
-                                      FormNotFound
-
- -
-Raised when no form can be found - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from exceptions.LookupError: - __init__, - __new__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.html5parser-module.html b/doc/html/api/lxml.html.html5parser-module.html deleted file mode 100644 index 689900c..0000000 --- a/doc/html/api/lxml.html.html5parser-module.html +++ /dev/null @@ -1,498 +0,0 @@ - - - - - lxml.html.html5parser - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module html5parser - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module html5parser

source code

-An interface to html5lib that mimics the lxml.html interface. - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - HTMLParser
- An html5lib HTML parser with lxml as tree. -
-   - - XHTMLParser
- An html5lib XHTML Parser with lxml as tree. -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
_find_tag(tree, - tag) - source code - -
- -
-   - - - - - - -
document_fromstring(html, - guess_charset=None, - parser=None)
- Parse a whole document into a string.
- source code - -
- -
-   - - - - - - -
fragments_fromstring(html, - no_leading_text=False, - guess_charset=None, - parser=None)
- Parses several HTML elements, returning a list of elements.
- source code - -
- -
-   - - - - - - -
fragment_fromstring(html, - create_parent=False, - guess_charset=None, - parser=None)
- Parses a single HTML element; it is an error if there is more than -one element, or if anything but whitespace precedes or follows the -element.
- source code - -
- -
-   - - - - - - -
fromstring(html, - guess_charset=None, - parser=None)
- Parse the html, returning a single element/document.
- source code - -
- -
-   - - - - - - -
parse(filename_url_or_file, - guess_charset=None, - parser=None)
- Parse a filename, URL, or file-like object into an HTML document -tree. Note: this returns a tree, not an element. Use -parse(...).getroot() to get the document root.
- source code - -
- -
-   - - - - - - -
_looks_like_url(str) - source code - -
- -
- - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - xhtml_parser = XHTMLParser() -
-   - - html_parser = <lxml.html.html5parser.HTMLParser object> -
-   - - __package__ = 'lxml.html' -
- - - - - - -
- - - - - -
Function Details[hide private]
-
- -
- -
- - -
-

document_fromstring(html, - guess_charset=None, - parser=None) -

-
source code  -
- -

Parse a whole document into a string.

-

If guess_charset is true, or if the input is not Unicode but a -byte string, the chardet library will perform charset guessing -on the string.

-
-
-
-
- -
- -
- - -
-

fragments_fromstring(html, - no_leading_text=False, - guess_charset=None, - parser=None) -

-
source code  -
- -

Parses several HTML elements, returning a list of elements.

-

The first item in the list may be a string. If no_leading_text is true, -then it will be an error if there is leading text, and it will always be -a list of only elements.

-

If guess_charset is true, the chardet library will perform charset -guessing on the string.

-
-
-
-
- -
- -
- - -
-

fragment_fromstring(html, - create_parent=False, - guess_charset=None, - parser=None) -

-
source code  -
- -

Parses a single HTML element; it is an error if there is more than -one element, or if anything but whitespace precedes or follows the -element.

-

If 'create_parent' is true (or is a tag name) then a parent node -will be created to encapsulate the HTML in a single element. In -this case, leading or trailing text is allowed.

-

If guess_charset is true, the chardet library will perform charset -guessing on the string.

-
-
-
-
- -
- -
- - -
-

fromstring(html, - guess_charset=None, - parser=None) -

-
source code  -
- -

Parse the html, returning a single element/document.

-

This tries to minimally parse the chunk of text, without knowing if it -is a fragment or a document.

-

'base_url' will set the document's base_url attribute (and the tree's -docinfo.URL)

-

If guess_charset is true, or if the input is not Unicode but a -byte string, the chardet library will perform charset guessing -on the string.

-
-
-
-
- -
- -
- - -
-

parse(filename_url_or_file, - guess_charset=None, - parser=None) -

-
source code  -
- -

Parse a filename, URL, or file-like object into an HTML document -tree. Note: this returns a tree, not an element. Use -parse(...).getroot() to get the document root.

-

If guess_charset is true, the useChardet option is passed into -html5lib to enable character detection. This option is on by default -when parsing from URLs, off by default when parsing from file(-like) -objects (which tend to return Unicode more often than not), and on by -default when parsing from a file path (which is read in binary mode).

-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.html5parser-pysrc.html b/doc/html/api/lxml.html.html5parser-pysrc.html deleted file mode 100644 index bfb9b08..0000000 --- a/doc/html/api/lxml.html.html5parser-pysrc.html +++ /dev/null @@ -1,694 +0,0 @@ - - - - - lxml.html.html5parser - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module html5parser - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.html.html5parser

-
-  1  """ 
-  2  An interface to html5lib that mimics the lxml.html interface. 
-  3  """ 
-  4  import sys 
-  5  import string 
-  6   
-  7  from html5lib import HTMLParser as _HTMLParser 
-  8  from html5lib.treebuilders.etree_lxml import TreeBuilder 
-  9  from lxml import etree 
- 10  from lxml.html import Element, XHTML_NAMESPACE, _contains_block_level_tag 
- 11   
- 12  # python3 compatibility 
- 13  try: 
- 14      _strings = basestring 
- 15  except NameError: 
- 16      _strings = (bytes, str) 
- 17  try: 
- 18      from urllib2 import urlopen 
- 19  except ImportError: 
- 20      from urllib.request import urlopen 
- 21  try: 
- 22      from urlparse import urlparse 
- 23  except ImportError: 
- 24      from urllib.parse import urlparse 
- 25   
- 26   
-
27 -class HTMLParser(_HTMLParser): -
28 """An html5lib HTML parser with lxml as tree.""" - 29 -
30 - def __init__(self, strict=False, **kwargs): -
31 _HTMLParser.__init__(self, strict=strict, tree=TreeBuilder, **kwargs) -
32 - 33 - 34 try: - 35 from html5lib import XHTMLParser as _XHTMLParser - 36 except ImportError: - 37 pass - 38 else: -
39 - class XHTMLParser(_XHTMLParser): -
40 """An html5lib XHTML Parser with lxml as tree.""" - 41 -
42 - def __init__(self, strict=False, **kwargs): -
43 _XHTMLParser.__init__(self, strict=strict, tree=TreeBuilder, **kwargs) -
44 - 45 xhtml_parser = XHTMLParser() - 46 - 47 -
48 -def _find_tag(tree, tag): -
49 elem = tree.find(tag) - 50 if elem is not None: - 51 return elem - 52 return tree.find('{%s}%s' % (XHTML_NAMESPACE, tag)) -
53 - 54 -
55 -def document_fromstring(html, guess_charset=None, parser=None): -
56 """ - 57 Parse a whole document into a string. - 58 - 59 If `guess_charset` is true, or if the input is not Unicode but a - 60 byte string, the `chardet` library will perform charset guessing - 61 on the string. - 62 """ - 63 if not isinstance(html, _strings): - 64 raise TypeError('string required') - 65 - 66 if parser is None: - 67 parser = html_parser - 68 - 69 options = {} - 70 if guess_charset is None and isinstance(html, bytes): - 71 # html5lib does not accept useChardet as an argument, if it - 72 # detected the html argument would produce unicode objects. - 73 guess_charset = True - 74 if guess_charset is not None: - 75 options['useChardet'] = guess_charset - 76 return parser.parse(html, **options).getroot() -
77 - 78 -
79 -def fragments_fromstring(html, no_leading_text=False, - 80 guess_charset=None, parser=None): -
81 """Parses several HTML elements, returning a list of elements. - 82 - 83 The first item in the list may be a string. If no_leading_text is true, - 84 then it will be an error if there is leading text, and it will always be - 85 a list of only elements. - 86 - 87 If `guess_charset` is true, the `chardet` library will perform charset - 88 guessing on the string. - 89 """ - 90 if not isinstance(html, _strings): - 91 raise TypeError('string required') - 92 - 93 if parser is None: - 94 parser = html_parser - 95 - 96 options = {} - 97 if guess_charset is None and isinstance(html, bytes): - 98 # html5lib does not accept useChardet as an argument, if it - 99 # detected the html argument would produce unicode objects. -100 guess_charset = False -101 if guess_charset is not None: -102 options['useChardet'] = guess_charset -103 children = parser.parseFragment(html, 'div', **options) -104 if children and isinstance(children[0], _strings): -105 if no_leading_text: -106 if children[0].strip(): -107 raise etree.ParserError('There is leading text: %r' % -108 children[0]) -109 del children[0] -110 return children -
111 -112 -
113 -def fragment_fromstring(html, create_parent=False, -114 guess_charset=None, parser=None): -
115 """Parses a single HTML element; it is an error if there is more than -116 one element, or if anything but whitespace precedes or follows the -117 element. -118 -119 If 'create_parent' is true (or is a tag name) then a parent node -120 will be created to encapsulate the HTML in a single element. In -121 this case, leading or trailing text is allowed. -122 -123 If `guess_charset` is true, the `chardet` library will perform charset -124 guessing on the string. -125 """ -126 if not isinstance(html, _strings): -127 raise TypeError('string required') -128 -129 accept_leading_text = bool(create_parent) -130 -131 elements = fragments_fromstring( -132 html, guess_charset=guess_charset, parser=parser, -133 no_leading_text=not accept_leading_text) -134 -135 if create_parent: -136 if not isinstance(create_parent, _strings): -137 create_parent = 'div' -138 new_root = Element(create_parent) -139 if elements: -140 if isinstance(elements[0], _strings): -141 new_root.text = elements[0] -142 del elements[0] -143 new_root.extend(elements) -144 return new_root -145 -146 if not elements: -147 raise etree.ParserError('No elements found') -148 if len(elements) > 1: -149 raise etree.ParserError('Multiple elements found') -150 result = elements[0] -151 if result.tail and result.tail.strip(): -152 raise etree.ParserError('Element followed by text: %r' % result.tail) -153 result.tail = None -154 return result -
155 -156 -
157 -def fromstring(html, guess_charset=None, parser=None): -
158 """Parse the html, returning a single element/document. -159 -160 This tries to minimally parse the chunk of text, without knowing if it -161 is a fragment or a document. -162 -163 'base_url' will set the document's base_url attribute (and the tree's -164 docinfo.URL) -165 -166 If `guess_charset` is true, or if the input is not Unicode but a -167 byte string, the `chardet` library will perform charset guessing -168 on the string. -169 """ -170 if not isinstance(html, _strings): -171 raise TypeError('string required') -172 doc = document_fromstring(html, parser=parser, -173 guess_charset=guess_charset) -174 -175 # document starts with doctype or <html>, full document! -176 start = html[:50] -177 if isinstance(start, bytes): -178 # Allow text comparison in python3. -179 # Decode as ascii, that also covers latin-1 and utf-8 for the -180 # characters we need. -181 start = start.decode('ascii', 'replace') -182 -183 start = start.lstrip().lower() -184 if start.startswith('<html') or start.startswith('<!doctype'): -185 return doc -186 -187 head = _find_tag(doc, 'head') -188 -189 # if the head is not empty we have a full document -190 if len(head): -191 return doc -192 -193 body = _find_tag(doc, 'body') -194 -195 # The body has just one element, so it was probably a single -196 # element passed in -197 if (len(body) == 1 and (not body.text or not body.text.strip()) -198 and (not body[-1].tail or not body[-1].tail.strip())): -199 return body[0] -200 -201 # Now we have a body which represents a bunch of tags which have the -202 # content that was passed in. We will create a fake container, which -203 # is the body tag, except <body> implies too much structure. -204 if _contains_block_level_tag(body): -205 body.tag = 'div' -206 else: -207 body.tag = 'span' -208 return body -
209 -210 -
211 -def parse(filename_url_or_file, guess_charset=None, parser=None): -
212 """Parse a filename, URL, or file-like object into an HTML document -213 tree. Note: this returns a tree, not an element. Use -214 ``parse(...).getroot()`` to get the document root. -215 -216 If ``guess_charset`` is true, the ``useChardet`` option is passed into -217 html5lib to enable character detection. This option is on by default -218 when parsing from URLs, off by default when parsing from file(-like) -219 objects (which tend to return Unicode more often than not), and on by -220 default when parsing from a file path (which is read in binary mode). -221 """ -222 if parser is None: -223 parser = html_parser -224 if not isinstance(filename_url_or_file, _strings): -225 fp = filename_url_or_file -226 if guess_charset is None: -227 # assume that file-like objects return Unicode more often than bytes -228 guess_charset = False -229 elif _looks_like_url(filename_url_or_file): -230 fp = urlopen(filename_url_or_file) -231 if guess_charset is None: -232 # assume that URLs return bytes -233 guess_charset = True -234 else: -235 fp = open(filename_url_or_file, 'rb') -236 if guess_charset is None: -237 guess_charset = True -238 -239 options = {} -240 # html5lib does not accept useChardet as an argument, if it -241 # detected the html argument would produce unicode objects. -242 if guess_charset: -243 options['useChardet'] = guess_charset -244 return parser.parse(fp, **options) -
245 -246 -
247 -def _looks_like_url(str): -
248 scheme = urlparse(str)[0] -249 if not scheme: -250 return False -251 elif (sys.platform == 'win32' and -252 scheme in string.ascii_letters -253 and len(scheme) == 1): -254 # looks like a 'normal' absolute path -255 return False -256 else: -257 return True -
258 -259 -260 html_parser = HTMLParser() -261 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.html5parser.HTMLParser-class.html b/doc/html/api/lxml.html.html5parser.HTMLParser-class.html deleted file mode 100644 index d0c9126..0000000 --- a/doc/html/api/lxml.html.html5parser.HTMLParser-class.html +++ /dev/null @@ -1,279 +0,0 @@ - - - - - lxml.html.html5parser.HTMLParser - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module html5parser :: - Class HTMLParser - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class HTMLParser

source code

-
-                     object --+    
-                              |    
-html5lib.html5parser.HTMLParser --+
-                                  |
-                                 HTMLParser
-
- -
-An html5lib HTML parser with lxml as tree. - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - strict=False, - **kwargs)
- strict - raise an exception when a parse error is encountered
- source code - -
- -
-

Inherited from html5lib.html5parser.HTMLParser: - adjustForeignAttributes, - adjustMathMLAttributes, - adjustSVGAttributes, - isHTMLIntegrationPoint, - isMathMLTextIntegrationPoint, - mainLoop, - normalizeToken, - normalizedTokens, - parse, - parseError, - parseFragment, - parseRCDataRawtext, - reparseTokenNormal, - reset, - resetInsertionMode -

-

Inherited from html5lib.html5parser.HTMLParser (private): - _parse -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from html5lib.html5parser.HTMLParser: - documentEncoding -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - strict=False, - **kwargs) -
(Constructor) -

-
source code  -
- -

strict - raise an exception when a parse error is encountered

-

tree - a treebuilder class controlling the type of tree that will be -returned. Built in treebuilders can be accessed through -html5lib.treebuilders.getTreeBuilder(treeType)

-
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.html5parser.XHTMLParser-class.html b/doc/html/api/lxml.html.html5parser.XHTMLParser-class.html deleted file mode 100644 index 953a798..0000000 --- a/doc/html/api/lxml.html.html5parser.XHTMLParser-class.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - lxml.html.html5parser.XHTMLParser - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module html5parser :: - Class XHTMLParser - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XHTMLParser

source code

-
-html5lib.XHTMLParser --+
-                       |
-                      XHTMLParser
-
- -
-An html5lib XHTML Parser with lxml as tree. - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - strict=False, - **kwargs) - source code - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.soupparser-module.html b/doc/html/api/lxml.html.soupparser-module.html deleted file mode 100644 index d8a885c..0000000 --- a/doc/html/api/lxml.html.soupparser-module.html +++ /dev/null @@ -1,510 +0,0 @@ - - - - - lxml.html.soupparser - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module soupparser - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module soupparser

source code

-External interface to the BeautifulSoup HTML parser. - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - _PseudoTag -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
fromstring(data, - beautifulsoup=None, - makeelement=None, - **bsargs)
- Parse a string of HTML data into an Element tree using the -BeautifulSoup parser.
- source code - -
- -
-   - - - - - - -
parse(file, - beautifulsoup=None, - makeelement=None, - **bsargs)
- Parse a file into an ElemenTree using the BeautifulSoup parser.
- source code - -
- -
-   - - - - - - -
convert_tree(beautiful_soup_tree, - makeelement=None)
- Convert a BeautifulSoup tree to a list of Element trees.
- source code - -
- -
-   - - - - - - -
_parse(source, - beautifulsoup, - makeelement, - **bsargs) - source code - -
- -
-   - - - - - - -
_parse_doctype_declaration(...)
- match(string[, pos[, endpos]]) --> match object or None. -Matches zero or more characters at the beginning of the string
- source code - -
- -
-   - - - - - - -
_convert_tree(beautiful_soup_tree, - makeelement) - source code - -
- -
-   - - - - - - -
_init_node_converters(makeelement) - source code - -
- -
-   - - - - - - -
handle_entities(...)
- sub(repl, string[, count = 0]) --> newstring -Return the string obtained by replacing the leftmost non-overlapping -occurrences of pattern in string by the replacement repl.
- source code - -
- -
- character - - - - - - -
unichr(i)
- Return a string of one character with ordinal i; 0 <= i < 256.
- - -
- -
-   - - - - - - -
unescape(string) - source code - -
- -
- - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - _DECLARATION_OR_DOCTYPE = (<class 'bs4.element.Declaration'>, ... -
-   - - __package__ = 'lxml.html' -
- - - - - - -
- - - - - -
Function Details[hide private]
-
- -
- -
- - -
-

fromstring(data, - beautifulsoup=None, - makeelement=None, - **bsargs) -

-
source code  -
- -

Parse a string of HTML data into an Element tree using the -BeautifulSoup parser.

-

Returns the root <html> Element of the tree.

-

You can pass a different BeautifulSoup parser through the -beautifulsoup keyword, and a diffent Element factory function -through the makeelement keyword. By default, the standard -BeautifulSoup class and the default factory of lxml.html are -used.

-
-
-
-
- -
- -
- - -
-

parse(file, - beautifulsoup=None, - makeelement=None, - **bsargs) -

-
source code  -
- -

Parse a file into an ElemenTree using the BeautifulSoup parser.

-

You can pass a different BeautifulSoup parser through the -beautifulsoup keyword, and a diffent Element factory function -through the makeelement keyword. By default, the standard -BeautifulSoup class and the default factory of lxml.html are -used.

-
-
-
-
- -
- -
- - -
-

convert_tree(beautiful_soup_tree, - makeelement=None) -

-
source code  -
- -

Convert a BeautifulSoup tree to a list of Element trees.

-

Returns a list instead of a single root Element to support -HTML-like soup with more than one root element.

-

You can pass a different Element factory through the makeelement -keyword.

-
-
-
-
-
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

_DECLARATION_OR_DOCTYPE

- -
-
-
-
Value:
-
-(<class 'bs4.element.Declaration'>, <class 'bs4.element.Doctype'>)
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.soupparser-pysrc.html b/doc/html/api/lxml.html.soupparser-pysrc.html deleted file mode 100644 index bb099fe..0000000 --- a/doc/html/api/lxml.html.soupparser-pysrc.html +++ /dev/null @@ -1,568 +0,0 @@ - - - - - lxml.html.soupparser - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module soupparser - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.html.soupparser

-
-  1  """External interface to the BeautifulSoup HTML parser. 
-  2  """ 
-  3   
-  4  __all__ = ["fromstring", "parse", "convert_tree"] 
-  5   
-  6  import re 
-  7  from lxml import etree, html 
-  8   
-  9  try: 
- 10      from bs4 import ( 
- 11          BeautifulSoup, Tag, Comment, ProcessingInstruction, NavigableString, 
- 12          Declaration, Doctype) 
- 13      _DECLARATION_OR_DOCTYPE = (Declaration, Doctype) 
- 14  except ImportError: 
- 15      from BeautifulSoup import ( 
- 16          BeautifulSoup, Tag, Comment, ProcessingInstruction, NavigableString, 
- 17          Declaration) 
- 18      _DECLARATION_OR_DOCTYPE = Declaration 
-
19 - 20 - 21 -def fromstring(data, beautifulsoup=None, makeelement=None, **bsargs): -
22 """Parse a string of HTML data into an Element tree using the - 23 BeautifulSoup parser. - 24 - 25 Returns the root ``<html>`` Element of the tree. - 26 - 27 You can pass a different BeautifulSoup parser through the - 28 `beautifulsoup` keyword, and a diffent Element factory function - 29 through the `makeelement` keyword. By default, the standard - 30 ``BeautifulSoup`` class and the default factory of `lxml.html` are - 31 used. - 32 """ - 33 return _parse(data, beautifulsoup, makeelement, **bsargs) -
34 -
35 - 36 -def parse(file, beautifulsoup=None, makeelement=None, **bsargs): -
37 """Parse a file into an ElemenTree using the BeautifulSoup parser. - 38 - 39 You can pass a different BeautifulSoup parser through the - 40 `beautifulsoup` keyword, and a diffent Element factory function - 41 through the `makeelement` keyword. By default, the standard - 42 ``BeautifulSoup`` class and the default factory of `lxml.html` are - 43 used. - 44 """ - 45 if not hasattr(file, 'read'): - 46 file = open(file) - 47 root = _parse(file, beautifulsoup, makeelement, **bsargs) - 48 return etree.ElementTree(root) -
49 -
50 - 51 -def convert_tree(beautiful_soup_tree, makeelement=None): -
52 """Convert a BeautifulSoup tree to a list of Element trees. - 53 - 54 Returns a list instead of a single root Element to support - 55 HTML-like soup with more than one root element. - 56 - 57 You can pass a different Element factory through the `makeelement` - 58 keyword. - 59 """ - 60 root = _convert_tree(beautiful_soup_tree, makeelement) - 61 children = root.getchildren() - 62 for child in children: - 63 root.remove(child) - 64 return children -
65 -
66 - 67 # helpers - 68 - 69 -def _parse(source, beautifulsoup, makeelement, **bsargs): -
70 if beautifulsoup is None: - 71 beautifulsoup = BeautifulSoup - 72 if hasattr(beautifulsoup, "HTML_ENTITIES"): # bs3 - 73 if 'convertEntities' not in bsargs: - 74 bsargs['convertEntities'] = 'html' - 75 if hasattr(beautifulsoup, "DEFAULT_BUILDER_FEATURES"): # bs4 - 76 if 'features' not in bsargs: - 77 bsargs['features'] = 'html.parser' # use Python html parser - 78 tree = beautifulsoup(source, **bsargs) - 79 root = _convert_tree(tree, makeelement) - 80 # from ET: wrap the document in a html root element, if necessary - 81 if len(root) == 1 and root[0].tag == "html": - 82 return root[0] - 83 root.tag = "html" - 84 return root -
85 - 86 - 87 _parse_doctype_declaration = re.compile( - 88 r'(?:\s|[<!])*DOCTYPE\s*HTML' - 89 r'(?:\s+PUBLIC)?(?:\s+(\'[^\']*\'|"[^"]*"))?' - 90 r'(?:\s+(\'[^\']*\'|"[^"]*"))?', - 91 re.IGNORECASE).match -
92 - 93 - 94 -class _PseudoTag: -
95 # Minimal imitation of BeautifulSoup.Tag -
96 - def __init__(self, contents): -
97 self.name = 'html' - 98 self.attrs = [] - 99 self.contents = contents -
100 -
101 - def __iter__(self): -
102 return self.contents.__iter__() -
103 -
104 -105 -def _convert_tree(beautiful_soup_tree, makeelement): -
106 if makeelement is None: -107 makeelement = html.html_parser.makeelement -108 -109 # Split the tree into three parts: -110 # i) everything before the root element: document type -111 # declaration, comments, processing instructions, whitespace -112 # ii) the root(s), -113 # iii) everything after the root: comments, processing -114 # instructions, whitespace -115 first_element_idx = last_element_idx = None -116 html_root = declaration = None -117 for i, e in enumerate(beautiful_soup_tree): -118 if isinstance(e, Tag): -119 if first_element_idx is None: -120 first_element_idx = i -121 last_element_idx = i -122 if html_root is None and e.name and e.name.lower() == 'html': -123 html_root = e -124 elif declaration is None and isinstance(e, _DECLARATION_OR_DOCTYPE): -125 declaration = e -126 -127 # For a nice, well-formatted document, the variable roots below is -128 # a list consisting of a single <html> element. However, the document -129 # may be a soup like '<meta><head><title>Hello</head><body>Hi -130 # all<\p>'. In this example roots is a list containing meta, head -131 # and body elements. -132 if first_element_idx is None: -133 pre_root = post_root = [] -134 roots = beautiful_soup_tree.contents -135 else: -136 pre_root = beautiful_soup_tree.contents[:first_element_idx] -137 roots = beautiful_soup_tree.contents[first_element_idx:last_element_idx+1] -138 post_root = beautiful_soup_tree.contents[last_element_idx+1:] -139 -140 # Reorganize so that there is one <html> root... -141 if html_root is not None: -142 # ... use existing one if possible, ... -143 i = roots.index(html_root) -144 html_root.contents = roots[:i] + html_root.contents + roots[i+1:] -145 else: -146 # ... otherwise create a new one. -147 html_root = _PseudoTag(roots) -148 -149 convert_node = _init_node_converters(makeelement) -150 -151 # Process pre_root -152 res_root = convert_node(html_root) -153 prev = res_root -154 for e in reversed(pre_root): -155 converted = convert_node(e) -156 if converted is not None: -157 prev.addprevious(converted) -158 prev = converted -159 -160 # ditto for post_root -161 prev = res_root -162 for e in post_root: -163 converted = convert_node(e) -164 if converted is not None: -165 prev.addnext(converted) -166 prev = converted -167 -168 if declaration is not None: -169 try: -170 # bs4 provides full Doctype string -171 doctype_string = declaration.output_ready() -172 except AttributeError: -173 doctype_string = declaration.string -174 -175 match = _parse_doctype_declaration(doctype_string) -176 if not match: -177 # Something is wrong if we end up in here. Since soupparser should -178 # tolerate errors, do not raise Exception, just let it pass. -179 pass -180 else: -181 external_id, sys_uri = match.groups() -182 docinfo = res_root.getroottree().docinfo -183 # strip quotes and update DOCTYPE values (any of None, '', '...') -184 docinfo.public_id = external_id and external_id[1:-1] -185 docinfo.system_url = sys_uri and sys_uri[1:-1] -186 -187 return res_root -
188 -
189 -190 -def _init_node_converters(makeelement): -
191 converters = {} -192 ordered_node_types = [] -193 -194 def converter(*types): -195 def add(handler): -196 for t in types: -197 converters[t] = handler -198 ordered_node_types.append(t) -199 return handler -
200 return add -201 -202 def find_best_converter(node): -203 for t in ordered_node_types: -204 if isinstance(node, t): -205 return converters[t] -206 return None -207 -208 def convert_node(bs_node, parent=None): -209 # duplicated in convert_tag() below -210 try: -211 handler = converters[type(bs_node)] -212 except KeyError: -213 handler = converters[type(bs_node)] = find_best_converter(bs_node) -214 if handler is None: -215 return None -216 return handler(bs_node, parent) -217 -218 def map_attrs(bs_attrs): -219 if isinstance(bs_attrs, dict): # bs4 -220 attribs = {} -221 for k, v in bs_attrs.items(): -222 if isinstance(v, list): -223 v = " ".join(v) -224 attribs[k] = unescape(v) -225 else: -226 attribs = dict((k, unescape(v)) for k, v in bs_attrs) -227 return attribs -228 -229 def append_text(parent, text): -230 if len(parent) == 0: -231 parent.text = (parent.text or '') + text -232 else: -233 parent[-1].tail = (parent[-1].tail or '') + text -234 -235 # converters are tried in order of their definition -236 -237 @converter(Tag, _PseudoTag) -238 def convert_tag(bs_node, parent): -239 attrs = bs_node.attrs -240 if parent is not None: -241 attribs = map_attrs(attrs) if attrs else None -242 res = etree.SubElement(parent, bs_node.name, attrib=attribs) -243 else: -244 attribs = map_attrs(attrs) if attrs else {} -245 res = makeelement(bs_node.name, attrib=attribs) -246 -247 for child in bs_node: -248 # avoid double recursion by inlining convert_node(), see above -249 try: -250 handler = converters[type(child)] -251 except KeyError: -252 pass -253 else: -254 if handler is not None: -255 handler(child, res) -256 continue -257 convert_node(child, res) -258 return res -259 -260 @converter(Comment) -261 def convert_comment(bs_node, parent): -262 res = html.HtmlComment(bs_node) -263 if parent is not None: -264 parent.append(res) -265 return res -266 -267 @converter(ProcessingInstruction) -268 def convert_pi(bs_node, parent): -269 if bs_node.endswith('?'): -270 # The PI is of XML style (<?as df?>) but BeautifulSoup -271 # interpreted it as being SGML style (<?as df>). Fix. -272 bs_node = bs_node[:-1] -273 res = etree.ProcessingInstruction(*bs_node.split(' ', 1)) -274 if parent is not None: -275 parent.append(res) -276 return res -277 -278 @converter(NavigableString) -279 def convert_text(bs_node, parent): -280 if parent is not None: -281 append_text(parent, unescape(bs_node)) -282 return None -283 -284 return convert_node -285 -286 -287 # copied from ET's ElementSoup -288 -289 try: -290 from html.entities import name2codepoint # Python 3 -291 except ImportError: -292 from htmlentitydefs import name2codepoint -293 -294 -295 handle_entities = re.compile(r"&(\w+);").sub -296 -297 -298 try: -299 unichr -300 except NameError: -301 # Python 3 -302 unichr = chr -
303 -304 -305 -def unescape(string): -
306 if not string: -307 return '' -308 # work around oddities in BeautifulSoup's entity handling -309 def unescape_entity(m): -310 try: -311 return unichr(name2codepoint[m.group(1)]) -312 except KeyError: -313 return m.group(0) # use as is -
314 return handle_entities(unescape_entity, string) -315 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.soupparser._PseudoTag-class.html b/doc/html/api/lxml.html.soupparser._PseudoTag-class.html deleted file mode 100644 index c151d2b..0000000 --- a/doc/html/api/lxml.html.soupparser._PseudoTag-class.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - lxml.html.soupparser._PseudoTag - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module soupparser :: - Class _PseudoTag - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _PseudoTag

source code

- - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - contents) - source code - -
- -
-   - - - - - - -
__iter__(self) - source code - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.usedoctest-module.html b/doc/html/api/lxml.html.usedoctest-module.html deleted file mode 100644 index 8148d69..0000000 --- a/doc/html/api/lxml.html.usedoctest-module.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - lxml.html.usedoctest - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module usedoctest - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module usedoctest

source code

-

Doctest module for HTML comparison.

-

Usage:

-
->>> import lxml.html.usedoctest
->>> # now do your HTML doctests ...
-
-

See lxml.doctestcompare.

- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.html.usedoctest-pysrc.html b/doc/html/api/lxml.html.usedoctest-pysrc.html deleted file mode 100644 index babb7ff..0000000 --- a/doc/html/api/lxml.html.usedoctest-pysrc.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - lxml.html.usedoctest - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package html :: - Module usedoctest - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.html.usedoctest

-
- 1  """Doctest module for HTML comparison. 
- 2   
- 3  Usage:: 
- 4   
- 5     >>> import lxml.html.usedoctest 
- 6     >>> # now do your HTML doctests ... 
- 7   
- 8  See `lxml.doctestcompare`. 
- 9  """ 
-10   
-11  from lxml import doctestcompare 
-12   
-13  doctestcompare.temp_install(html=True, del_module=__name__) 
-14   
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.includes-module.html b/doc/html/api/lxml.includes-module.html deleted file mode 100644 index 0d2e991..0000000 --- a/doc/html/api/lxml.includes-module.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - lxml.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package includes - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Package includes

source code

- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = None
- hash(x) -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.includes-pysrc.html b/doc/html/api/lxml.includes-pysrc.html deleted file mode 100644 index d0aad70..0000000 --- a/doc/html/api/lxml.includes-pysrc.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - lxml.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package includes - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Package lxml.includes

-
-1   
-2   
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.isoschematron-module.html b/doc/html/api/lxml.isoschematron-module.html deleted file mode 100644 index 7899f7c..0000000 --- a/doc/html/api/lxml.isoschematron-module.html +++ /dev/null @@ -1,428 +0,0 @@ - - - - - lxml.isoschematron - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package isoschematron - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Package isoschematron

source code

-The lxml.isoschematron package implements ISO Schematron support on top -of the pure-xslt 'skeleton' implementation. - - - - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - unicode
- str(object='') -> string -
-   - - basestring
- str(object='') -> string -
-   - - Schematron
- An ISO Schematron validator. -
- - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
stylesheet_params(**kwargs)
- Convert keyword args to a dictionary of stylesheet parameters. -XSL stylesheet parameters must be XPath expressions, i.e.:
- source code - -
- -
-   - - - - - - -
_stylesheet_param_dict(paramsDict, - kwargsDict)
- Return a copy of paramsDict, updated with kwargsDict entries, wrapped as -stylesheet arguments. -kwargsDict entries with a value of None are ignored.
- source code - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - XML_SCHEMA_NS = 'http://www.w3.org/2001/XMLSchema' -
-   - - RELAXNG_NS = 'http://relaxng.org/ns/structure/1.0' -
-   - - SCHEMATRON_NS = 'http://purl.oclc.org/dsdl/schematron' -
-   - - SVRL_NS = 'http://purl.oclc.org/dsdl/svrl' -
-   - - _schematron_root = '{http://purl.oclc.org/dsdl/schematron}schema' -
-   - - _xml_schema_root = '{http://www.w3.org/2001/XMLSchema}schema' -
-   - - _resources_dir = '/home/stefan/source/Python/lxml/lxml-release... -
-   - - extract_xsd = <lxml.etree.XSLT object> -
-   - - extract_rng = <lxml.etree.XSLT object> -
-   - - iso_dsdl_include = <lxml.etree.XSLT object> -
-   - - iso_abstract_expand = <lxml.etree.XSLT object> -
-   - - iso_svrl_for_xslt1 = <lxml.etree.XSLT object> -
-   - - svrl_validation_errors = //svrl:failed-assert -
-   - - schematron_schema_valid = <lxml.etree.RelaxNG object> -
-   - - __package__ = 'lxml.isoschematron' -
- - - - - - -
- - - - - -
Function Details[hide private]
-
- -
- -
- - -
-

stylesheet_params(**kwargs) -

-
source code  -
- -

Convert keyword args to a dictionary of stylesheet parameters. -XSL stylesheet parameters must be XPath expressions, i.e.:

-
    -
  • string expressions, like "'5'"
  • -
  • simple (number) expressions, like "5"
  • -
  • valid XPath expressions, like "/a/b/text()"
  • -
-

This function converts native Python keyword arguments to stylesheet -parameters following these rules: -If an arg is a string wrap it with XSLT.strparam(). -If an arg is an XPath object use its path string. -If arg is None raise TypeError. -Else convert arg to string.

-
-
-
-
-
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

_resources_dir

- -
-
-
-
Value:
-
-'/home/stefan/source/Python/lxml/lxml-release/src/lxml/isoschematron/r\
-esources'
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.isoschematron-pysrc.html b/doc/html/api/lxml.isoschematron-pysrc.html deleted file mode 100644 index 2ac5a08..0000000 --- a/doc/html/api/lxml.isoschematron-pysrc.html +++ /dev/null @@ -1,660 +0,0 @@ - - - - - lxml.isoschematron - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package isoschematron - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Package lxml.isoschematron

-
-  1  """The ``lxml.isoschematron`` package implements ISO Schematron support on top 
-  2  of the pure-xslt 'skeleton' implementation. 
-  3  """ 
-  4   
-  5  import sys 
-  6  import os.path 
-  7  from lxml import etree as _etree # due to validator __init__ signature 
-  8   
-  9   
- 10  # some compat stuff, borrowed from lxml.html 
- 11  try: 
- 12      unicode 
- 13  except NameError: 
- 14      # Python 3 
- 15      unicode = str 
- 16  try: 
- 17      basestring 
- 18  except NameError: 
- 19      # Python 3 
- 20      basestring = str 
- 21   
- 22   
- 23  __all__ = ['extract_xsd', 'extract_rng', 'iso_dsdl_include', 
- 24             'iso_abstract_expand', 'iso_svrl_for_xslt1', 
- 25             'svrl_validation_errors', 'schematron_schema_valid', 
- 26             'stylesheet_params', 'Schematron'] 
- 27   
- 28   
- 29  # some namespaces 
- 30  #FIXME: Maybe lxml should provide a dedicated place for common namespace 
- 31  #FIXME: definitions? 
- 32  XML_SCHEMA_NS = "http://www.w3.org/2001/XMLSchema" 
- 33  RELAXNG_NS = "http://relaxng.org/ns/structure/1.0" 
- 34  SCHEMATRON_NS = "http://purl.oclc.org/dsdl/schematron" 
- 35  SVRL_NS = "http://purl.oclc.org/dsdl/svrl" 
- 36   
- 37   
- 38  # some helpers 
- 39  _schematron_root = '{%s}schema' % SCHEMATRON_NS 
- 40  _xml_schema_root = '{%s}schema' % XML_SCHEMA_NS 
- 41  _resources_dir = os.path.join(os.path.dirname(__file__), 'resources') 
- 42   
- 43   
- 44  # the iso-schematron skeleton implementation steps aka xsl transformations 
- 45  extract_xsd = _etree.XSLT(_etree.parse( 
- 46      os.path.join(_resources_dir, 'xsl', 'XSD2Schtrn.xsl'))) 
- 47  extract_rng = _etree.XSLT(_etree.parse( 
- 48      os.path.join(_resources_dir, 'xsl', 'RNG2Schtrn.xsl'))) 
- 49  iso_dsdl_include = _etree.XSLT(_etree.parse( 
- 50      os.path.join(_resources_dir, 'xsl', 'iso-schematron-xslt1', 
- 51                   'iso_dsdl_include.xsl'))) 
- 52  iso_abstract_expand = _etree.XSLT(_etree.parse( 
- 53      os.path.join(_resources_dir, 'xsl', 'iso-schematron-xslt1', 
- 54                   'iso_abstract_expand.xsl'))) 
- 55  iso_svrl_for_xslt1 = _etree.XSLT(_etree.parse( 
- 56      os.path.join(_resources_dir, 
- 57                   'xsl', 'iso-schematron-xslt1', 'iso_svrl_for_xslt1.xsl'))) 
- 58   
- 59   
- 60  # svrl result accessors 
- 61  svrl_validation_errors = _etree.XPath( 
- 62      '//svrl:failed-assert', namespaces={'svrl': SVRL_NS}) 
- 63   
- 64   
- 65  # RelaxNG validator for schematron schemas 
- 66  schematron_schema_valid = _etree.RelaxNG(_etree.parse( 
- 67      os.path.join(_resources_dir, 'rng', 'iso-schematron.rng'))) 
-
68 - 69 - 70 -def stylesheet_params(**kwargs): -
71 """Convert keyword args to a dictionary of stylesheet parameters. - 72 XSL stylesheet parameters must be XPath expressions, i.e.: - 73 - 74 * string expressions, like "'5'" - 75 * simple (number) expressions, like "5" - 76 * valid XPath expressions, like "/a/b/text()" - 77 - 78 This function converts native Python keyword arguments to stylesheet - 79 parameters following these rules: - 80 If an arg is a string wrap it with XSLT.strparam(). - 81 If an arg is an XPath object use its path string. - 82 If arg is None raise TypeError. - 83 Else convert arg to string. - 84 """ - 85 result = {} - 86 for key, val in kwargs.items(): - 87 if isinstance(val, basestring): - 88 val = _etree.XSLT.strparam(val) - 89 elif val is None: - 90 raise TypeError('None not allowed as a stylesheet parameter') - 91 elif not isinstance(val, _etree.XPath): - 92 val = unicode(val) - 93 result[key] = val - 94 return result -
95 -
96 - 97 # helper function for use in Schematron __init__ - 98 -def _stylesheet_param_dict(paramsDict, kwargsDict): -
99 """Return a copy of paramsDict, updated with kwargsDict entries, wrapped as -100 stylesheet arguments. -101 kwargsDict entries with a value of None are ignored. -102 """ -103 # beware of changing mutable default arg -104 paramsDict = dict(paramsDict) -105 for k, v in kwargsDict.items(): -106 if v is not None: # None values do not override -107 paramsDict[k] = v -108 paramsDict = stylesheet_params(**paramsDict) -109 return paramsDict -
110 -
111 -112 -class Schematron(_etree._Validator): -
113 """An ISO Schematron validator. -114 -115 Pass a root Element or an ElementTree to turn it into a validator. -116 Alternatively, pass a filename as keyword argument 'file' to parse from -117 the file system. -118 -119 Schematron is a less well known, but very powerful schema language. -120 The main idea is to use the capabilities of XPath to put restrictions on -121 the structure and the content of XML documents. -122 -123 The standard behaviour is to fail on ``failed-assert`` findings only -124 (``ASSERTS_ONLY``). To change this, you can either pass a report filter -125 function to the ``error_finder`` parameter (e.g. ``ASSERTS_AND_REPORTS`` -126 or a custom ``XPath`` object), or subclass isoschematron.Schematron for -127 complete control of the validation process. -128 -129 Built on the Schematron language 'reference' skeleton pure-xslt -130 implementation, the validator is created as an XSLT 1.0 stylesheet using -131 these steps: -132 -133 0) (Extract from XML Schema or RelaxNG schema) -134 1) Process inclusions -135 2) Process abstract patterns -136 3) Compile the schematron schema to XSLT -137 -138 The ``include`` and ``expand`` keyword arguments can be used to switch off -139 steps 1) and 2). -140 To set parameters for steps 1), 2) and 3) hand parameter dictionaries to the -141 keyword arguments ``include_params``, ``expand_params`` or -142 ``compile_params``. -143 For convenience, the compile-step parameter ``phase`` is also exposed as a -144 keyword argument ``phase``. This takes precedence if the parameter is also -145 given in the parameter dictionary. -146 -147 If ``store_schematron`` is set to True, the (included-and-expanded) -148 schematron document tree is stored and available through the ``schematron`` -149 property. -150 If ``store_xslt`` is set to True, the validation XSLT document tree will be -151 stored and can be retrieved through the ``validator_xslt`` property. -152 With ``store_report`` set to True (default: False), the resulting validation -153 report document gets stored and can be accessed as the ``validation_report`` -154 property. -155 -156 Here is a usage example:: -157 -158 >>> from lxml import etree -159 >>> from lxml.isoschematron import Schematron -160 -161 >>> schematron = Schematron(etree.XML(''' -162 ... <schema xmlns="http://purl.oclc.org/dsdl/schematron" > -163 ... <pattern id="id_only_attribute"> -164 ... <title>id is the only permitted attribute name</title> -165 ... <rule context="*"> -166 ... <report test="@*[not(name()='id')]">Attribute -167 ... <name path="@*[not(name()='id')]"/> is forbidden<name/> -168 ... </report> -169 ... </rule> -170 ... </pattern> -171 ... </schema>'''), -172 ... error_finder=Schematron.ASSERTS_AND_REPORTS) -173 -174 >>> xml = etree.XML(''' -175 ... <AAA name="aaa"> -176 ... <BBB id="bbb"/> -177 ... <CCC color="ccc"/> -178 ... </AAA> -179 ... ''') -180 -181 >>> schematron.validate(xml) -182 False -183 -184 >>> xml = etree.XML(''' -185 ... <AAA id="aaa"> -186 ... <BBB id="bbb"/> -187 ... <CCC/> -188 ... </AAA> -189 ... ''') -190 -191 >>> schematron.validate(xml) -192 True -193 """ -194 -195 # libxml2 error categorization for validation errors -196 _domain = _etree.ErrorDomains.SCHEMATRONV -197 _level = _etree.ErrorLevels.ERROR -198 _error_type = _etree.ErrorTypes.SCHEMATRONV_ASSERT -199 -200 # convenience definitions for common behaviours -201 ASSERTS_ONLY = svrl_validation_errors # Default -202 ASSERTS_AND_REPORTS = _etree.XPath( -203 '//svrl:failed-assert | //svrl:successful-report', -204 namespaces={'svrl': SVRL_NS}) -205 -
206 - def _extract(self, element): -
207 """Extract embedded schematron schema from non-schematron host schema. -208 This method will only be called by __init__ if the given schema document -209 is not a schematron schema by itself. -210 Must return a schematron schema document tree or None. -211 """ -212 schematron = None -213 if element.tag == _xml_schema_root: -214 schematron = self._extract_xsd(element) -215 elif element.nsmap[element.prefix] == RELAXNG_NS: -216 # RelaxNG does not have a single unique root element -217 schematron = self._extract_rng(element) -218 return schematron -
219 -220 # customization points -221 # etree.XSLT objects that provide the extract, include, expand, compile -222 # steps -223 _extract_xsd = extract_xsd -224 _extract_rng = extract_rng -225 _include = iso_dsdl_include -226 _expand = iso_abstract_expand -227 _compile = iso_svrl_for_xslt1 -228 -229 # etree.xpath object that determines input document validity when applied to -230 # the svrl result report; must return a list of result elements (empty if -231 # valid) -232 _validation_errors = ASSERTS_ONLY -233 -
234 - def __init__(self, etree=None, file=None, include=True, expand=True, -235 include_params={}, expand_params={}, compile_params={}, -236 store_schematron=False, store_xslt=False, store_report=False, -237 phase=None, error_finder=ASSERTS_ONLY): -
238 super(Schematron, self).__init__() -239 -240 self._store_report = store_report -241 self._schematron = None -242 self._validator_xslt = None -243 self._validation_report = None -244 if error_finder is not self.ASSERTS_ONLY: -245 self._validation_errors = error_finder -246 -247 # parse schema document, may be a schematron schema or an XML Schema or -248 # a RelaxNG schema with embedded schematron rules -249 root = None -250 try: -251 if etree is not None: -252 if _etree.iselement(etree): -253 root = etree -254 else: -255 root = etree.getroot() -256 elif file is not None: -257 root = _etree.parse(file).getroot() -258 except Exception: -259 raise _etree.SchematronParseError( -260 "No tree or file given: %s" % sys.exc_info()[1]) -261 if root is None: -262 raise ValueError("Empty tree") -263 if root.tag == _schematron_root: -264 schematron = root -265 else: -266 schematron = self._extract(root) -267 if schematron is None: -268 raise _etree.SchematronParseError( -269 "Document is not a schematron schema or schematron-extractable") -270 # perform the iso-schematron skeleton implementation steps to get a -271 # validating xslt -272 if include: -273 schematron = self._include(schematron, **include_params) -274 if expand: -275 schematron = self._expand(schematron, **expand_params) -276 if not schematron_schema_valid(schematron): -277 raise _etree.SchematronParseError( -278 "invalid schematron schema: %s" % -279 schematron_schema_valid.error_log) -280 if store_schematron: -281 self._schematron = schematron -282 # add new compile keyword args here if exposing them -283 compile_kwargs = {'phase': phase} -284 compile_params = _stylesheet_param_dict(compile_params, compile_kwargs) -285 validator_xslt = self._compile(schematron, **compile_params) -286 if store_xslt: -287 self._validator_xslt = validator_xslt -288 self._validator = _etree.XSLT(validator_xslt) -
289 -
290 - def __call__(self, etree): -
291 """Validate doc using Schematron. -292 -293 Returns true if document is valid, false if not. -294 """ -295 self._clear_error_log() -296 result = self._validator(etree) -297 if self._store_report: -298 self._validation_report = result -299 errors = self._validation_errors(result) -300 if errors: -301 if _etree.iselement(etree): -302 fname = etree.getroottree().docinfo.URL or '<file>' -303 else: -304 fname = etree.docinfo.URL or '<file>' -305 for error in errors: -306 # Does svrl report the line number, anywhere? Don't think so. -307 self._append_log_message( -308 domain=self._domain, type=self._error_type, -309 level=self._level, line=0, -310 message=_etree.tostring(error, encoding='unicode'), -311 filename=fname) -312 return False -313 return True -
314 -315 @property -
316 - def schematron(self): -
317 """ISO-schematron schema document (None if object has been initialized -318 with store_schematron=False). -319 """ -320 return self._schematron -
321 -322 @property -
323 - def validator_xslt(self): -
324 """ISO-schematron skeleton implementation XSLT validator document (None -325 if object has been initialized with store_xslt=False). -326 """ -327 return self._validator_xslt -
328 -329 @property -
330 - def validation_report(self): -
331 """ISO-schematron validation result report (None if result-storing has -332 been turned off). -333 """ -334 return self._validation_report -
335 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.isoschematron.Schematron-class.html b/doc/html/api/lxml.isoschematron.Schematron-class.html deleted file mode 100644 index 2156f70..0000000 --- a/doc/html/api/lxml.isoschematron.Schematron-class.html +++ /dev/null @@ -1,650 +0,0 @@ - - - - - lxml.isoschematron.Schematron - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package isoschematron :: - Class Schematron - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class Schematron

source code

-
-      object --+    
-               |    
-etree._Validator --+
-                   |
-                  Schematron
-
- -
-

An ISO Schematron validator.

-

Pass a root Element or an ElementTree to turn it into a validator. -Alternatively, pass a filename as keyword argument 'file' to parse from -the file system.

-

Schematron is a less well known, but very powerful schema language. -The main idea is to use the capabilities of XPath to put restrictions on -the structure and the content of XML documents.

-

The standard behaviour is to fail on failed-assert findings only -(ASSERTS_ONLY). To change this, you can either pass a report filter -function to the error_finder parameter (e.g. ASSERTS_AND_REPORTS -or a custom XPath object), or subclass isoschematron.Schematron for -complete control of the validation process.

-

Built on the Schematron language 'reference' skeleton pure-xslt -implementation, the validator is created as an XSLT 1.0 stylesheet using -these steps:

-
-
    -
  1. (Extract from XML Schema or RelaxNG schema)
  2. -
  3. Process inclusions
  4. -
  5. Process abstract patterns
  6. -
  7. Compile the schematron schema to XSLT
  8. -
-
-

The include and expand keyword arguments can be used to switch off -steps 1) and 2). -To set parameters for steps 1), 2) and 3) hand parameter dictionaries to the -keyword arguments include_params, expand_params or -compile_params. -For convenience, the compile-step parameter phase is also exposed as a -keyword argument phase. This takes precedence if the parameter is also -given in the parameter dictionary.

-

If store_schematron is set to True, the (included-and-expanded) -schematron document tree is stored and available through the schematron -property. -If store_xslt is set to True, the validation XSLT document tree will be -stored and can be retrieved through the validator_xslt property. -With store_report set to True (default: False), the resulting validation -report document gets stored and can be accessed as the validation_report -property.

-

Here is a usage example:

-
->>> from lxml import etree
->>> from lxml.isoschematron import Schematron
-
->>> schematron = Schematron(etree.XML('''
-... <schema xmlns="http://purl.oclc.org/dsdl/schematron" >
-...   <pattern id="id_only_attribute">
-...     <title>id is the only permitted attribute name</title>
-...     <rule context="*">
-...       <report test="@*[not(name()='id')]">Attribute
-...         <name path="@*[not(name()='id')]"/> is forbidden<name/>
-...       </report>
-...     </rule>
-...   </pattern>
-... </schema>'''),
-... error_finder=Schematron.ASSERTS_AND_REPORTS)
-
->>> xml = etree.XML('''
-... <AAA name="aaa">
-...   <BBB id="bbb"/>
-...   <CCC color="ccc"/>
-... </AAA>
-... ''')
-
->>> schematron.validate(xml)
-False
-
->>> xml = etree.XML('''
-... <AAA id="aaa">
-...   <BBB id="bbb"/>
-...   <CCC/>
-... </AAA>
-... ''')
-
->>> schematron.validate(xml)
-True
-
- - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
_extract(self, - element)
- Extract embedded schematron schema from non-schematron host schema. -This method will only be called by __init__ if the given schema document -is not a schematron schema by itself. -Must return a schematron schema document tree or None.
- source code - -
- -
-   - - - - - - -
__init__(self, - etree=None, - file=None, - include=True, - expand=True, - include_params={}, - expand_params={}, - compile_params={}, - store_schematron=False, - store_xslt=False, - store_report=False, - phase=None, - error_finder=//svrl:failed-assert)
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-   - - - - - - -
__call__(self, - etree)
- Validate doc using Schematron.
- source code - -
- -
-

Inherited from etree._Validator: - __new__, - assertValid, - assert_, - validate -

-

Inherited from etree._Validator (private): - _append_log_message, - _clear_error_log -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - _domain = 28 -
-   - - _level = 2 -
-   - - _error_type = 4000 -
-   - - ASSERTS_ONLY = //svrl:failed-assert -
-   - - ASSERTS_AND_REPORTS = //svrl:failed-assert | //svrl:successful... -
-   - - _extract_xsd = <lxml.etree.XSLT object> -
-   - - _extract_rng = <lxml.etree.XSLT object> -
-   - - _include = <lxml.etree.XSLT object> -
-   - - _expand = <lxml.etree.XSLT object> -
-   - - _compile = <lxml.etree.XSLT object> -
-   - - _validation_errors = //svrl:failed-assert -
- - - - - - - - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - schematron
- ISO-schematron schema document (None if object has been initialized -with store_schematron=False). -
-   - - validator_xslt
- ISO-schematron skeleton implementation XSLT validator document (None -if object has been initialized with store_xslt=False). -
-   - - validation_report
- ISO-schematron validation result report (None if result-storing has -been turned off). -
-

Inherited from etree._Validator: - error_log -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - etree=None, - file=None, - include=True, - expand=True, - include_params={}, - expand_params={}, - compile_params={}, - store_schematron=False, - store_xslt=False, - store_report=False, - phase=None, - error_finder=//svrl:failed-assert) -
(Constructor) -

-
source code  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

__call__(self, - etree) -
(Call operator) -

-
source code  -
- -

Validate doc using Schematron.

-

Returns true if document is valid, false if not.

-
-
-
-
-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

ASSERTS_AND_REPORTS

- -
-
-
-
Value:
-
-//svrl:failed-assert | //svrl:successful-report
-
-
-
-
-
-
- - - - - - -
- - - - - -
Property Details[hide private]
-
- -
- -
-

schematron

- ISO-schematron schema document (None if object has been initialized -with store_schematron=False). -
-
Get Method:
-
unreachable.schematron(self) - - ISO-schematron schema document (None if object has been initialized -with store_schematron=False). -
-
-
-
- -
- -
-

validator_xslt

- ISO-schematron skeleton implementation XSLT validator document (None -if object has been initialized with store_xslt=False). -
-
Get Method:
-
unreachable.validator_xslt(self) - - ISO-schematron skeleton implementation XSLT validator document (None -if object has been initialized with store_xslt=False). -
-
-
-
- -
- -
-

validation_report

- ISO-schematron validation result report (None if result-storing has -been turned off). -
-
Get Method:
-
unreachable.validation_report(self) - - ISO-schematron validation result report (None if result-storing has -been turned off). -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.objectify-module.html b/doc/html/api/lxml.objectify-module.html deleted file mode 100644 index d1c49dd..0000000 --- a/doc/html/api/lxml.objectify-module.html +++ /dev/null @@ -1,1159 +0,0 @@ - - - - - lxml.objectify - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module objectify - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module objectify

-The lxml.objectify module implements a Python object API for XML. -It is based on lxml.etree. - -
-

Version: - 4.2.5 -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - BoolElement
- Boolean type base on string values: 'true' or 'false'. -
-   - - ElementMaker
- ElementMaker(self, namespace=None, nsmap=None, annotate=True, makeelement=None) -
-   - - FloatElement -
-   - - IntElement -
-   - - LongElement -
-   - - NoneElement -
-   - - NumberElement -
-   - - ObjectPath
- ObjectPath(path) -Immutable object that represents a compiled object path. -
-   - - ObjectifiedDataElement
- This is the base class for all data type Elements. Subclasses should -override the 'pyval' property and possibly the __str__ method. -
-   - - ObjectifiedElement
- Main XML Element class. -
-   - - ObjectifyElementClassLookup
- ObjectifyElementClassLookup(self, tree_class=None, empty_data_class=None) -Element class lookup method that uses the objectify classes. -
-   - - PyType
- PyType(self, name, type_check, type_class, stringify=None) -User defined type. -
-   - - StringElement
- String data class. -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
DataElement(_value, - attrib=None, - nsmap=None, - _pytype=None, - _xsi=None, - **_attributes)
- Create a new element from a Python value and XML attributes taken from -keyword arguments or a dictionary passed as second argument.
- - -
- -
-   - - - - - - -
Element(_tag, - attrib=None, - nsmap=None, - _pytype=None, - **_attributes)
- Objectify specific version of the lxml.etree Element() factory that -always creates a structural (tree) element.
- - -
- -
-   - - - - - - -
SubElement(_parent, - _tag, - attrib=None, - nsmap=None, - **_extra)
- Subelement factory. This function creates an element instance, and -appends it to an existing element.
- - -
- -
-   - - - - - - -
XML(xml, - parser=None, - base_url=None)
- Objectify specific version of the lxml.etree XML() literal factory -that uses the objectify parser.
- - -
- -
-   - - - - - - -
__checkBool(...) - - -
- -
-   - - - - - - -
__lower_bool(...) - - -
- -
-   - - - - - - -
__parseBool(...) - - -
- -
-   - - - - - - -
__unpickleElementTree(...) - - -
- -
-   - - - - - - -
annotate(element_or_tree, - ignore_old=True, - ignore_xsi=False, - empty_pytype=None, - empty_type=None, - annotate_xsi=0, - annotate_pytype=1)
- Recursively annotates the elements of an XML tree with 'xsi:type' -and/or 'py:pytype' attributes.
- - -
- -
-   - - - - - - -
deannotate(element_or_tree, - pytype=True, - xsi=True, - xsi_nil=False, - cleanup_namespaces=False)
- Recursively de-annotate the elements of an XML tree by removing 'py:pytype' -and/or 'xsi:type' attributes and/or 'xsi:nil' attributes.
- - -
- -
-   - - - - - - -
dump(...)
- dump(_Element element not None)
- - -
- -
-   - - - - - - -
enable_recursive_str(on=True)
- Enable a recursively generated tree representation for str(element), -based on objectify.dump(element).
- - -
- -
-   - - - - - - -
fromstring(xml, - parser=None, - base_url=None)
- Objectify specific version of the lxml.etree fromstring() function -that uses the objectify parser.
- - -
- -
-   - - - - - - -
getRegisteredTypes()
- Returns a list of the currently registered PyType objects.
- - -
- -
-   - - - - - - -
makeparser(remove_blank_text=True, - **kw)
- Create a new XML parser for objectify trees.
- - -
- -
-   - - - - - - -
parse(f, - parser=None, - base_url=None)
- Parse a file or file-like object with the objectify parser.
- - -
- -
-   - - - - - - -
pyannotate(element_or_tree, - ignore_old=False, - ignore_xsi=False, - empty_pytype=None)
- Recursively annotates the elements of an XML tree with 'pytype' -attributes.
- - -
- -
-   - - - - - - -
pytypename(obj)
- Find the name of the corresponding PyType for a Python object.
- - -
- -
-   - - - - - - -
set_default_parser(new_parser= None)
- Replace the default parser used by objectify's Element() and -fromstring() functions.
- - -
- -
-   - - - - - - -
set_pytype_attribute_tag(attribute_tag=None)
- Change name and namespace of the XML attribute that holds Python type -information.
- - -
- -
-   - - - - - - -
xsiannotate(element_or_tree, - ignore_old=False, - ignore_pytype=False, - empty_type=None)
- Recursively annotates the elements of an XML tree with 'xsi:type' -attributes.
- - -
- -
- - - - - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - E = <lxml.objectify.ElementMaker object> -
-   - - PYTYPE_ATTRIBUTE = '{http://codespeak.net/lxml/objectify/pytyp... -
-   - - __package__ = None
- hash(x) -
-   - - __test__ = {} -
- - - - - - -
- - - - - -
Function Details[hide private]
-
- -
- -
- - -
-

DataElement(_value, - attrib=None, - nsmap=None, - _pytype=None, - _xsi=None, - **_attributes) -

-
  -
- -

Create a new element from a Python value and XML attributes taken from -keyword arguments or a dictionary passed as second argument.

-

Automatically adds a 'pytype' attribute for the Python type of the value, -if the type can be identified. If '_pytype' or '_xsi' are among the -keyword arguments, they will be used instead.

-

If the _value argument is an ObjectifiedDataElement instance, its py:pytype, -xsi:type and other attributes and nsmap are reused unless they are redefined -in attrib and/or keyword arguments.

-
-
-
-
- -
- -
- - -
-

Element(_tag, - attrib=None, - nsmap=None, - _pytype=None, - **_attributes) -

-
  -
- -

Objectify specific version of the lxml.etree Element() factory that -always creates a structural (tree) element.

-

NOTE: requires parser based element class lookup activated in lxml.etree!

-
-
-
-
- -
- -
- - -
-

XML(xml, - parser=None, - base_url=None) -

-
  -
- -

Objectify specific version of the lxml.etree XML() literal factory -that uses the objectify parser.

-

You can pass a different parser as second argument.

-

The base_url keyword argument allows to set the original base URL of -the document to support relative Paths when looking up external entities -(DTD, XInclude, ...).

-
-
-
-
- -
- -
- - -
-

annotate(element_or_tree, - ignore_old=True, - ignore_xsi=False, - empty_pytype=None, - empty_type=None, - annotate_xsi=0, - annotate_pytype=1) -

-
  -
- -

Recursively annotates the elements of an XML tree with 'xsi:type' -and/or 'py:pytype' attributes.

-

If the 'ignore_old' keyword argument is True (the default), current -'py:pytype' attributes will be ignored for the type annotation. Set to False -if you want reuse existing 'py:pytype' information (iff appropriate for the -element text value).

-

If the 'ignore_xsi' keyword argument is False (the default), existing -'xsi:type' attributes will be used for the type annotation, if they fit the -element text values.

-

Note that the mapping from Python types to XSI types is usually ambiguous. -Currently, only the first XSI type name in the corresponding PyType -definition will be used for annotation. Thus, you should consider naming -the widest type first if you define additional types.

-

The default 'py:pytype' annotation of empty elements can be set with the -empty_pytype keyword argument. Pass 'str', for example, to make -string values the default.

-

The default 'xsi:type' annotation of empty elements can be set with the -empty_type keyword argument. The default is not to annotate empty -elements. Pass 'string', for example, to make string values the default.

-

The keyword arguments 'annotate_xsi' (default: 0) and 'annotate_pytype' -(default: 1) control which kind(s) of annotation to use.

-
-
-
-
- -
- -
- - -
-

deannotate(element_or_tree, - pytype=True, - xsi=True, - xsi_nil=False, - cleanup_namespaces=False) -

-
  -
- -

Recursively de-annotate the elements of an XML tree by removing 'py:pytype' -and/or 'xsi:type' attributes and/or 'xsi:nil' attributes.

-

If the 'pytype' keyword argument is True (the default), 'py:pytype' -attributes will be removed. If the 'xsi' keyword argument is True (the -default), 'xsi:type' attributes will be removed. -If the 'xsi_nil' keyword argument is True (default: False), 'xsi:nil' -attributes will be removed.

-

Note that this does not touch the namespace declarations by -default. If you want to remove unused namespace declarations from -the tree, pass the option cleanup_namespaces=True.

-
-
-
-
- -
- -
- - -
-

dump(...) -

-
  -
- -

dump(_Element element not None)

-

Return a recursively generated string representation of an element.

-
-
-
-
- -
- -
- - -
-

fromstring(xml, - parser=None, - base_url=None) -

-
  -
- -

Objectify specific version of the lxml.etree fromstring() function -that uses the objectify parser.

-

You can pass a different parser as second argument.

-

The base_url keyword argument allows to set the original base URL of -the document to support relative Paths when looking up external entities -(DTD, XInclude, ...).

-
-
-
-
- -
- -
- - -
-

getRegisteredTypes() -

-
  -
- -

Returns a list of the currently registered PyType objects.

-

To add a new type, retrieve this list and call unregister() for all -entries. Then add the new type at a suitable position (possibly replacing -an existing one) and call register() for all entries.

-

This is necessary if the new type interferes with the type check functions -of existing ones (normally only int/float/bool) and must the tried before -other types. To add a type that is not yet parsable by the current type -check functions, you can simply register() it, which will append it to the -end of the type list.

-
-
-
-
- -
- -
- - -
-

makeparser(remove_blank_text=True, - **kw) -

-
  -
- -

Create a new XML parser for objectify trees.

-

You can pass all keyword arguments that are supported by -etree.XMLParser(). Note that this parser defaults to removing -blank text. You can disable this by passing the -remove_blank_text boolean keyword option yourself.

-
-
-
-
- -
- -
- - -
-

parse(f, - parser=None, - base_url=None) -

-
  -
- -

Parse a file or file-like object with the objectify parser.

-

You can pass a different parser as second argument.

-

The base_url keyword allows setting a URL for the document -when parsing from a file-like object. This is needed when looking -up external entities (DTD, XInclude, ...) with relative paths.

-
-
-
-
- -
- -
- - -
-

pyannotate(element_or_tree, - ignore_old=False, - ignore_xsi=False, - empty_pytype=None) -

-
  -
- -

Recursively annotates the elements of an XML tree with 'pytype' -attributes.

-

If the 'ignore_old' keyword argument is True (the default), current 'pytype' -attributes will be ignored and replaced. Otherwise, they will be checked -and only replaced if they no longer fit the current text value.

-

Setting the keyword argument ignore_xsi to True makes the function -additionally ignore existing xsi:type annotations. The default is to -use them as a type hint.

-

The default annotation of empty elements can be set with the -empty_pytype keyword argument. The default is not to annotate empty -elements. Pass 'str', for example, to make string values the default.

-
-
-
-
- -
- -
- - -
-

set_default_parser(new_parser= None) -

-
  -
- -

Replace the default parser used by objectify's Element() and -fromstring() functions.

-

The new parser must be an etree.XMLParser.

-

Call without arguments to reset to the original parser.

-
-
-
-
- -
- -
- - -
-

set_pytype_attribute_tag(attribute_tag=None) -

-
  -
- -

Change name and namespace of the XML attribute that holds Python type -information.

-

Do not use this unless you know what you are doing.

-

Reset by calling without argument.

-

Default: "{http://codespeak.net/lxml/objectify/pytype}pytype"

-
-
-
-
- -
- -
- - -
-

xsiannotate(element_or_tree, - ignore_old=False, - ignore_pytype=False, - empty_type=None) -

-
  -
- -

Recursively annotates the elements of an XML tree with 'xsi:type' -attributes.

-

If the 'ignore_old' keyword argument is True (the default), current -'xsi:type' attributes will be ignored and replaced. Otherwise, they will be -checked and only replaced if they no longer fit the current text value.

-

Note that the mapping from Python types to XSI types is usually ambiguous. -Currently, only the first XSI type name in the corresponding PyType -definition will be used for annotation. Thus, you should consider naming -the widest type first if you define additional types.

-

Setting the keyword argument ignore_pytype to True makes the function -additionally ignore existing pytype annotations. The default is to -use them as a type hint.

-

The default annotation of empty elements can be set with the -empty_type keyword argument. The default is not to annotate empty -elements. Pass 'string', for example, to make string values the default.

-
-
-
-
-
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

PYTYPE_ATTRIBUTE

- -
-
-
-
Value:
-
-'{http://codespeak.net/lxml/objectify/pytype}pytype'
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.objectify.BoolElement-class.html b/doc/html/api/lxml.objectify.BoolElement-class.html deleted file mode 100644 index e0516cf..0000000 --- a/doc/html/api/lxml.objectify.BoolElement-class.html +++ /dev/null @@ -1,825 +0,0 @@ - - - - - lxml.objectify.BoolElement - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module objectify :: - Class BoolElement - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class BoolElement

-
-    object --+                        
-             |                        
-etree._Element --+                    
-                 |                    
- etree.ElementBase --+                
-                     |                
-    ObjectifiedElement --+            
-                         |            
-    ObjectifiedDataElement --+        
-                             |        
-                 NumberElement --+    
-                                 |    
-                        IntElement --+
-                                     |
-                                    BoolElement
-
- -
-

Boolean type base on string values: 'true' or 'false'.

-

Note that this inherits from IntElement to mimic the behaviour of -Python's bool type.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__eq__(x, - y)
- x==y
- - -
- -
-   - - - - - - -
__ge__(x, - y)
- x>=y
- - -
- -
-   - - - - - - -
__gt__(x, - y)
- x>y
- - -
- -
-   - - - - - - -
__hash__(x)
- hash(x)
- - -
- -
-   - - - - - - -
__le__(x, - y)
- x<=y
- - -
- -
-   - - - - - - -
__lt__(x, - y)
- x<y
- - -
- -
-   - - - - - - -
__ne__(x, - y)
- x!=y
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__nonzero__(x)
- x != 0
- - -
- -
-   - - - - - - -
__repr__(x)
- repr(x)
- - -
- -
-   - - - - - - -
__str__(x)
- str(x)
- - -
- -
-   - - - - - - -
_init(...)
- Called after object initialisation. Custom subclasses may override -this if they recursively call _init() in the superclasses.
- - -
- -
-

Inherited from NumberElement: - __abs__, - __add__, - __and__, - __complex__, - __div__, - __float__, - __hex__, - __int__, - __invert__, - __long__, - __lshift__, - __mod__, - __mul__, - __neg__, - __oct__, - __or__, - __pos__, - __pow__, - __radd__, - __rand__, - __rdiv__, - __rlshift__, - __rmod__, - __rmul__, - __ror__, - __rpow__, - __rrshift__, - __rshift__, - __rsub__, - __rtruediv__, - __rxor__, - __sub__, - __truediv__, - __xor__ -

-

Inherited from NumberElement (private): - _setValueParser -

-

Inherited from ObjectifiedDataElement (private): - _setText -

-

Inherited from ObjectifiedElement: - __delattr__, - __delitem__, - __getattr__, - __getattribute__, - __getitem__, - __iter__, - __len__, - __reduce__, - __setattr__, - __setitem__, - addattr, - countchildren, - descendantpaths, - getchildren -

-

Inherited from etree.ElementBase: - __init__ -

-

Inherited from etree._Element: - __contains__, - __copy__, - __deepcopy__, - __reversed__, - addnext, - addprevious, - append, - clear, - cssselect, - extend, - find, - findall, - findtext, - get, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - insert, - items, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - keys, - makeelement, - remove, - replace, - set, - values, - xpath -

-

Inherited from object: - __format__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - pyval -
-

Inherited from ObjectifiedElement: - text -

-

Inherited from etree._Element: - attrib, - base, - nsmap, - prefix, - sourceline, - tag, - tail -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__eq__(x, - y) -
(Equality operator) -

-
  -
- - x==y -
-
Overrides: - NumberElement.__eq__ -
-
-
-
- -
- -
- - -
-

__ge__(x, - y) -
(Greater-than-or-equals operator) -

-
  -
- - x>=y -
-
Overrides: - NumberElement.__ge__ -
-
-
-
- -
- -
- - -
-

__gt__(x, - y) -
(Greater-than operator) -

-
  -
- - x>y -
-
Overrides: - NumberElement.__gt__ -
-
-
-
- -
- -
- - -
-

__hash__(x) -
(Hashing function) -

-
  -
- - hash(x) -
-
Overrides: - object.__hash__ -
-
-
-
- -
- -
- - -
-

__le__(x, - y) -
(Less-than-or-equals operator) -

-
  -
- - x<=y -
-
Overrides: - NumberElement.__le__ -
-
-
-
- -
- -
- - -
-

__lt__(x, - y) -
(Less-than operator) -

-
  -
- - x<y -
-
Overrides: - NumberElement.__lt__ -
-
-
-
- -
- -
- - -
-

__ne__(x, - y) -

-
  -
- - x!=y -
-
Overrides: - NumberElement.__ne__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

__nonzero__(x) -
(Boolean test operator) -

-
  -
- - x != 0 -
-
Overrides: - etree._Element.__nonzero__ -
-
-
-
- -
- -
- - -
-

__repr__(x) -
(Representation operator) -

-
  -
- - repr(x) -
-
Overrides: - object.__repr__ -
-
-
-
- -
- -
- - -
-

__str__(x) -
(Informal representation operator) -

-
  -
- - str(x) -
-
Overrides: - object.__str__ -
-
-
-
- -
- -
- - -
-

_init(...) -

-
  -
- - Called after object initialisation. Custom subclasses may override -this if they recursively call _init() in the superclasses. -
-
Overrides: - etree._Element._init -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.objectify.ElementMaker-class.html b/doc/html/api/lxml.objectify.ElementMaker-class.html deleted file mode 100644 index cfb3473..0000000 --- a/doc/html/api/lxml.objectify.ElementMaker-class.html +++ /dev/null @@ -1,388 +0,0 @@ - - - - - lxml.objectify.ElementMaker - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module objectify :: - Class ElementMaker - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ElementMaker

-
-object --+
-         |
-        ElementMaker
-
- -
-

ElementMaker(self, namespace=None, nsmap=None, annotate=True, makeelement=None)

-

An ElementMaker that can be used for constructing trees.

-

Example:

-
->>> M = ElementMaker(annotate=False)
->>> attributes = {'class': 'par'}
->>> html = M.html( M.body( M.p('hello', attributes, M.br, 'objectify', style="font-weight: bold") ) )
-
->>> from lxml.etree import tostring
->>> print(tostring(html, method='html').decode('ascii'))
-<html><body><p style="font-weight: bold" class="par">hello<br>objectify</p></body></html>
-
-

To create tags that are not valid Python identifiers, call the factory -directly and pass the tag name as first argument:

-
->>> root = M('tricky-tag', 'some text')
->>> print(root.tag)
-tricky-tag
->>> print(root.text)
-some text
-
-

Note that this module has a predefined ElementMaker instance called E.

- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__call__(x, - ...)
- x(...)
- - -
- -
-   - - - - - - -
__getattr__(...) - - -
- -
-   - - - - - - -
__getattribute__(...)
- x.__getattribute__('name') <==> x.name
- - -
- -
-   - - - - - - -
__init__(self, - namespace=None, - nsmap=None, - annotate=True, - makeelement=None)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from object: - __delattr__, - __format__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__getattribute__(...) -

-
  -
- - x.__getattribute__('name') <==> x.name -
-
Overrides: - object.__getattribute__ -
-
-
-
- -
- -
- - -
-

__init__(self, - namespace=None, - nsmap=None, - annotate=True, - makeelement=None) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.objectify.FloatElement-class.html b/doc/html/api/lxml.objectify.FloatElement-class.html deleted file mode 100644 index 03a0706..0000000 --- a/doc/html/api/lxml.objectify.FloatElement-class.html +++ /dev/null @@ -1,414 +0,0 @@ - - - - - lxml.objectify.FloatElement - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module objectify :: - Class FloatElement - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class FloatElement

-
-    object --+                    
-             |                    
-etree._Element --+                
-                 |                
- etree.ElementBase --+            
-                     |            
-    ObjectifiedElement --+        
-                         |        
-    ObjectifiedDataElement --+    
-                             |    
-                 NumberElement --+
-                                 |
-                                FloatElement
-
- -
- - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
_init(...)
- Called after object initialisation. Custom subclasses may override -this if they recursively call _init() in the superclasses.
- - -
- -
-

Inherited from NumberElement: - __abs__, - __add__, - __and__, - __complex__, - __div__, - __eq__, - __float__, - __ge__, - __gt__, - __hash__, - __hex__, - __int__, - __invert__, - __le__, - __long__, - __lshift__, - __lt__, - __mod__, - __mul__, - __ne__, - __neg__, - __nonzero__, - __oct__, - __or__, - __pos__, - __pow__, - __radd__, - __rand__, - __rdiv__, - __repr__, - __rlshift__, - __rmod__, - __rmul__, - __ror__, - __rpow__, - __rrshift__, - __rshift__, - __rsub__, - __rtruediv__, - __rxor__, - __str__, - __sub__, - __truediv__, - __xor__ -

-

Inherited from NumberElement (private): - _setValueParser -

-

Inherited from ObjectifiedDataElement (private): - _setText -

-

Inherited from ObjectifiedElement: - __delattr__, - __delitem__, - __getattr__, - __getattribute__, - __getitem__, - __iter__, - __len__, - __reduce__, - __setattr__, - __setitem__, - addattr, - countchildren, - descendantpaths, - getchildren -

-

Inherited from etree.ElementBase: - __init__ -

-

Inherited from etree._Element: - __contains__, - __copy__, - __deepcopy__, - __reversed__, - addnext, - addprevious, - append, - clear, - cssselect, - extend, - find, - findall, - findtext, - get, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - insert, - items, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - keys, - makeelement, - remove, - replace, - set, - values, - xpath -

-

Inherited from object: - __format__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from NumberElement: - pyval -

-

Inherited from ObjectifiedElement: - text -

-

Inherited from etree._Element: - attrib, - base, - nsmap, - prefix, - sourceline, - tag, - tail -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

_init(...) -

-
  -
- - Called after object initialisation. Custom subclasses may override -this if they recursively call _init() in the superclasses. -
-
Overrides: - etree._Element._init -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.objectify.IntElement-class.html b/doc/html/api/lxml.objectify.IntElement-class.html deleted file mode 100644 index 23b5e8c..0000000 --- a/doc/html/api/lxml.objectify.IntElement-class.html +++ /dev/null @@ -1,420 +0,0 @@ - - - - - lxml.objectify.IntElement - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module objectify :: - Class IntElement - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class IntElement

-
-    object --+                    
-             |                    
-etree._Element --+                
-                 |                
- etree.ElementBase --+            
-                     |            
-    ObjectifiedElement --+        
-                         |        
-    ObjectifiedDataElement --+    
-                             |    
-                 NumberElement --+
-                                 |
-                                IntElement
-
- -
Known Subclasses:
-
- -
- -
- - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
_init(...)
- Called after object initialisation. Custom subclasses may override -this if they recursively call _init() in the superclasses.
- - -
- -
-

Inherited from NumberElement: - __abs__, - __add__, - __and__, - __complex__, - __div__, - __eq__, - __float__, - __ge__, - __gt__, - __hash__, - __hex__, - __int__, - __invert__, - __le__, - __long__, - __lshift__, - __lt__, - __mod__, - __mul__, - __ne__, - __neg__, - __nonzero__, - __oct__, - __or__, - __pos__, - __pow__, - __radd__, - __rand__, - __rdiv__, - __repr__, - __rlshift__, - __rmod__, - __rmul__, - __ror__, - __rpow__, - __rrshift__, - __rshift__, - __rsub__, - __rtruediv__, - __rxor__, - __str__, - __sub__, - __truediv__, - __xor__ -

-

Inherited from NumberElement (private): - _setValueParser -

-

Inherited from ObjectifiedDataElement (private): - _setText -

-

Inherited from ObjectifiedElement: - __delattr__, - __delitem__, - __getattr__, - __getattribute__, - __getitem__, - __iter__, - __len__, - __reduce__, - __setattr__, - __setitem__, - addattr, - countchildren, - descendantpaths, - getchildren -

-

Inherited from etree.ElementBase: - __init__ -

-

Inherited from etree._Element: - __contains__, - __copy__, - __deepcopy__, - __reversed__, - addnext, - addprevious, - append, - clear, - cssselect, - extend, - find, - findall, - findtext, - get, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - insert, - items, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - keys, - makeelement, - remove, - replace, - set, - values, - xpath -

-

Inherited from object: - __format__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from NumberElement: - pyval -

-

Inherited from ObjectifiedElement: - text -

-

Inherited from etree._Element: - attrib, - base, - nsmap, - prefix, - sourceline, - tag, - tail -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

_init(...) -

-
  -
- - Called after object initialisation. Custom subclasses may override -this if they recursively call _init() in the superclasses. -
-
Overrides: - etree._Element._init -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.objectify.LongElement-class.html b/doc/html/api/lxml.objectify.LongElement-class.html deleted file mode 100644 index d8af409..0000000 --- a/doc/html/api/lxml.objectify.LongElement-class.html +++ /dev/null @@ -1,414 +0,0 @@ - - - - - lxml.objectify.LongElement - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module objectify :: - Class LongElement - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class LongElement

-
-    object --+                    
-             |                    
-etree._Element --+                
-                 |                
- etree.ElementBase --+            
-                     |            
-    ObjectifiedElement --+        
-                         |        
-    ObjectifiedDataElement --+    
-                             |    
-                 NumberElement --+
-                                 |
-                                LongElement
-
- -
- - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
_init(...)
- Called after object initialisation. Custom subclasses may override -this if they recursively call _init() in the superclasses.
- - -
- -
-

Inherited from NumberElement: - __abs__, - __add__, - __and__, - __complex__, - __div__, - __eq__, - __float__, - __ge__, - __gt__, - __hash__, - __hex__, - __int__, - __invert__, - __le__, - __long__, - __lshift__, - __lt__, - __mod__, - __mul__, - __ne__, - __neg__, - __nonzero__, - __oct__, - __or__, - __pos__, - __pow__, - __radd__, - __rand__, - __rdiv__, - __repr__, - __rlshift__, - __rmod__, - __rmul__, - __ror__, - __rpow__, - __rrshift__, - __rshift__, - __rsub__, - __rtruediv__, - __rxor__, - __str__, - __sub__, - __truediv__, - __xor__ -

-

Inherited from NumberElement (private): - _setValueParser -

-

Inherited from ObjectifiedDataElement (private): - _setText -

-

Inherited from ObjectifiedElement: - __delattr__, - __delitem__, - __getattr__, - __getattribute__, - __getitem__, - __iter__, - __len__, - __reduce__, - __setattr__, - __setitem__, - addattr, - countchildren, - descendantpaths, - getchildren -

-

Inherited from etree.ElementBase: - __init__ -

-

Inherited from etree._Element: - __contains__, - __copy__, - __deepcopy__, - __reversed__, - addnext, - addprevious, - append, - clear, - cssselect, - extend, - find, - findall, - findtext, - get, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - insert, - items, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - keys, - makeelement, - remove, - replace, - set, - values, - xpath -

-

Inherited from object: - __format__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from NumberElement: - pyval -

-

Inherited from ObjectifiedElement: - text -

-

Inherited from etree._Element: - attrib, - base, - nsmap, - prefix, - sourceline, - tag, - tail -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

_init(...) -

-
  -
- - Called after object initialisation. Custom subclasses may override -this if they recursively call _init() in the superclasses. -
-
Overrides: - etree._Element._init -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.objectify.NoneElement-class.html b/doc/html/api/lxml.objectify.NoneElement-class.html deleted file mode 100644 index 7e75d45..0000000 --- a/doc/html/api/lxml.objectify.NoneElement-class.html +++ /dev/null @@ -1,596 +0,0 @@ - - - - - lxml.objectify.NoneElement - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module objectify :: - Class NoneElement - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class NoneElement

-
-    object --+                
-             |                
-etree._Element --+            
-                 |            
- etree.ElementBase --+        
-                     |        
-    ObjectifiedElement --+    
-                         |    
-    ObjectifiedDataElement --+
-                             |
-                            NoneElement
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__eq__(x, - y)
- x==y
- - -
- -
-   - - - - - - -
__ge__(x, - y)
- x>=y
- - -
- -
-   - - - - - - -
__gt__(x, - y)
- x>y
- - -
- -
-   - - - - - - -
__hash__(x)
- hash(x)
- - -
- -
-   - - - - - - -
__le__(x, - y)
- x<=y
- - -
- -
-   - - - - - - -
__lt__(x, - y)
- x<y
- - -
- -
-   - - - - - - -
__ne__(x, - y)
- x!=y
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__nonzero__(x)
- x != 0
- - -
- -
-   - - - - - - -
__repr__(x)
- repr(x)
- - -
- -
-   - - - - - - -
__str__(x)
- str(x)
- - -
- -
-

Inherited from ObjectifiedDataElement (private): - _setText -

-

Inherited from ObjectifiedElement: - __delattr__, - __delitem__, - __getattr__, - __getattribute__, - __getitem__, - __iter__, - __len__, - __reduce__, - __setattr__, - __setitem__, - addattr, - countchildren, - descendantpaths, - getchildren -

-

Inherited from etree.ElementBase: - __init__ -

-

Inherited from etree._Element: - __contains__, - __copy__, - __deepcopy__, - __reversed__, - addnext, - addprevious, - append, - clear, - cssselect, - extend, - find, - findall, - findtext, - get, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - insert, - items, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - keys, - makeelement, - remove, - replace, - set, - values, - xpath -

-

Inherited from etree._Element (private): - _init -

-

Inherited from object: - __format__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - pyval -
-

Inherited from ObjectifiedElement: - text -

-

Inherited from etree._Element: - attrib, - base, - nsmap, - prefix, - sourceline, - tag, - tail -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__hash__(x) -
(Hashing function) -

-
  -
- - hash(x) -
-
Overrides: - object.__hash__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

__nonzero__(x) -
(Boolean test operator) -

-
  -
- - x != 0 -
-
Overrides: - etree._Element.__nonzero__ -
-
-
-
- -
- -
- - -
-

__repr__(x) -
(Representation operator) -

-
  -
- - repr(x) -
-
Overrides: - object.__repr__ -
-
-
-
- -
- -
- - -
-

__str__(x) -
(Informal representation operator) -

-
  -
- - str(x) -
-
Overrides: - object.__str__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.objectify.NumberElement-class.html b/doc/html/api/lxml.objectify.NumberElement-class.html deleted file mode 100644 index 01afc6d..0000000 --- a/doc/html/api/lxml.objectify.NumberElement-class.html +++ /dev/null @@ -1,1242 +0,0 @@ - - - - - lxml.objectify.NumberElement - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module objectify :: - Class NumberElement - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class NumberElement

-
-    object --+                
-             |                
-etree._Element --+            
-                 |            
- etree.ElementBase --+        
-                     |        
-    ObjectifiedElement --+    
-                         |    
-    ObjectifiedDataElement --+
-                             |
-                            NumberElement
-
- -
Known Subclasses:
-
- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__abs__(x)
- abs(x)
- - -
- -
-   - - - - - - -
__add__(x, - y)
- x+y
- - -
- -
-   - - - - - - -
__and__(x, - y)
- x&y
- - -
- -
-   - - - - - - -
__complex__(...) - - -
- -
-   - - - - - - -
__div__(x, - y)
- x/y
- - -
- -
-   - - - - - - -
__eq__(x, - y)
- x==y
- - -
- -
-   - - - - - - -
__float__(x)
- float(x)
- - -
- -
-   - - - - - - -
__ge__(x, - y)
- x>=y
- - -
- -
-   - - - - - - -
__gt__(x, - y)
- x>y
- - -
- -
-   - - - - - - -
__hash__(x)
- hash(x)
- - -
- -
-   - - - - - - -
__hex__(x)
- hex(x)
- - -
- -
-   - - - - - - -
__int__(x)
- int(x)
- - -
- -
-   - - - - - - -
__invert__(x)
- ~x
- - -
- -
-   - - - - - - -
__le__(x, - y)
- x<=y
- - -
- -
-   - - - - - - -
__long__(x)
- long(x)
- - -
- -
-   - - - - - - -
__lshift__(x, - y)
- x<<y
- - -
- -
-   - - - - - - -
__lt__(x, - y)
- x<y
- - -
- -
-   - - - - - - -
__mod__(x, - y)
- x%y
- - -
- -
-   - - - - - - -
__mul__(x, - y)
- x*y
- - -
- -
-   - - - - - - -
__ne__(x, - y)
- x!=y
- - -
- -
-   - - - - - - -
__neg__(x)
- -x
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__nonzero__(x)
- x != 0
- - -
- -
-   - - - - - - -
__oct__(x)
- oct(x)
- - -
- -
-   - - - - - - -
__or__(x, - y)
- x|y
- - -
- -
-   - - - - - - -
__pos__(x)
- +x
- - -
- -
-   - - - - - - -
__pow__(x, - y, - z=...)
- pow(x, y[, z])
- - -
- -
-   - - - - - - -
__radd__(x, - y)
- y+x
- - -
- -
-   - - - - - - -
__rand__(x, - y)
- y&x
- - -
- -
-   - - - - - - -
__rdiv__(x, - y)
- y/x
- - -
- -
-   - - - - - - -
__repr__(x)
- repr(x)
- - -
- -
-   - - - - - - -
__rlshift__(x, - y)
- y<<x
- - -
- -
-   - - - - - - -
__rmod__(x, - y)
- y%x
- - -
- -
-   - - - - - - -
__rmul__(x, - y)
- y*x
- - -
- -
-   - - - - - - -
__ror__(x, - y)
- y|x
- - -
- -
-   - - - - - - -
__rpow__(y, - x, - z=...)
- pow(x, y[, z])
- - -
- -
-   - - - - - - -
__rrshift__(x, - y)
- y>>x
- - -
- -
-   - - - - - - -
__rshift__(x, - y)
- x>>y
- - -
- -
-   - - - - - - -
__rsub__(x, - y)
- y-x
- - -
- -
-   - - - - - - -
__rtruediv__(x, - y)
- y/x
- - -
- -
-   - - - - - - -
__rxor__(x, - y)
- y^x
- - -
- -
-   - - - - - - -
__str__(x)
- str(x)
- - -
- -
-   - - - - - - -
__sub__(x, - y)
- x-y
- - -
- -
-   - - - - - - -
__truediv__(x, - y)
- x/y
- - -
- -
-   - - - - - - -
__xor__(x, - y)
- x^y
- - -
- -
-   - - - - - - -
_setValueParser(...)
- Set the function that parses the Python value from a string.
- - -
- -
-

Inherited from ObjectifiedDataElement (private): - _setText -

-

Inherited from ObjectifiedElement: - __delattr__, - __delitem__, - __getattr__, - __getattribute__, - __getitem__, - __iter__, - __len__, - __reduce__, - __setattr__, - __setitem__, - addattr, - countchildren, - descendantpaths, - getchildren -

-

Inherited from etree.ElementBase: - __init__ -

-

Inherited from etree._Element: - __contains__, - __copy__, - __deepcopy__, - __reversed__, - addnext, - addprevious, - append, - clear, - cssselect, - extend, - find, - findall, - findtext, - get, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - insert, - items, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - keys, - makeelement, - remove, - replace, - set, - values, - xpath -

-

Inherited from etree._Element (private): - _init -

-

Inherited from object: - __format__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - pyval -
-

Inherited from ObjectifiedElement: - text -

-

Inherited from etree._Element: - attrib, - base, - nsmap, - prefix, - sourceline, - tag, - tail -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__hash__(x) -
(Hashing function) -

-
  -
- - hash(x) -
-
Overrides: - object.__hash__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

__nonzero__(x) -
(Boolean test operator) -

-
  -
- - x != 0 -
-
Overrides: - etree._Element.__nonzero__ -
-
-
-
- -
- -
- - -
-

__repr__(x) -
(Representation operator) -

-
  -
- - repr(x) -
-
Overrides: - object.__repr__ -
-
-
-
- -
- -
- - -
-

__str__(x) -
(Informal representation operator) -

-
  -
- - str(x) -
-
Overrides: - object.__str__ -
-
-
-
- -
- -
- - -
-

_setValueParser(...) -

-
  -
- -

Set the function that parses the Python value from a string.

-

Do not use this unless you know what you are doing.

-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.objectify.ObjectPath-class.html b/doc/html/api/lxml.objectify.ObjectPath-class.html deleted file mode 100644 index f46ea10..0000000 --- a/doc/html/api/lxml.objectify.ObjectPath-class.html +++ /dev/null @@ -1,475 +0,0 @@ - - - - - lxml.objectify.ObjectPath - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module objectify :: - Class ObjectPath - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ObjectPath

-
-object --+
-         |
-        ObjectPath
-
- -
-

ObjectPath(path) -Immutable object that represents a compiled object path.

-

Example for a path: 'root.child[1].{other}child[25]'

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__call__(...)
- Follow the attribute path in the object structure and return the -target attribute value.
- - -
- -
-   - - - - - - -
__init__(path)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__str__(x)
- str(x)
- - -
- -
-   - - - - - - -
addattr(self, - root, - value)
- Append a value to the target element in a subtree.
- - -
- -
-   - - - - - - -
hasattr(self, - root) - - -
- -
-   - - - - - - -
setattr(self, - root, - value)
- Set the value of the target element in a subtree.
- - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - find -
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__call__(...) -
(Call operator) -

-
  -
- -

Follow the attribute path in the object structure and return the -target attribute value.

-

If it it not found, either returns a default value (if one was passed -as second argument) or raises AttributeError.

-
-
-
-
- -
- -
- - -
-

__init__(path) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

__str__(x) -
(Informal representation operator) -

-
  -
- - str(x) -
-
Overrides: - object.__str__ -
-
-
-
- -
- -
- - -
-

addattr(self, - root, - value) -

-
  -
- -

Append a value to the target element in a subtree.

-

If any of the children on the path does not exist, it is created.

-
-
-
-
- -
- -
- - -
-

setattr(self, - root, - value) -

-
  -
- -

Set the value of the target element in a subtree.

-

If any of the children on the path does not exist, it is created.

-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.objectify.ObjectifiedDataElement-class.html b/doc/html/api/lxml.objectify.ObjectifiedDataElement-class.html deleted file mode 100644 index 9cbf7c0..0000000 --- a/doc/html/api/lxml.objectify.ObjectifiedDataElement-class.html +++ /dev/null @@ -1,432 +0,0 @@ - - - - - lxml.objectify.ObjectifiedDataElement - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module objectify :: - Class ObjectifiedDataElement - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ObjectifiedDataElement

-
-    object --+            
-             |            
-etree._Element --+        
-                 |        
- etree.ElementBase --+    
-                     |    
-    ObjectifiedElement --+
-                         |
-                        ObjectifiedDataElement
-
- -
Known Subclasses:
-
- -
- -
-This is the base class for all data type Elements. Subclasses should -override the 'pyval' property and possibly the __str__ method. - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__repr__(x)
- repr(x)
- - -
- -
-   - - - - - - -
__str__(x)
- str(x)
- - -
- -
-   - - - - - - -
_setText(...)
- For use in subclasses only. Don't use unless you know what you are -doing.
- - -
- -
-

Inherited from ObjectifiedElement: - __delattr__, - __delitem__, - __getattr__, - __getattribute__, - __getitem__, - __iter__, - __len__, - __reduce__, - __setattr__, - __setitem__, - addattr, - countchildren, - descendantpaths, - getchildren -

-

Inherited from etree.ElementBase: - __init__ -

-

Inherited from etree._Element: - __contains__, - __copy__, - __deepcopy__, - __nonzero__, - __reversed__, - addnext, - addprevious, - append, - clear, - cssselect, - extend, - find, - findall, - findtext, - get, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - insert, - items, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - keys, - makeelement, - remove, - replace, - set, - values, - xpath -

-

Inherited from etree._Element (private): - _init -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - pyval -
-

Inherited from ObjectifiedElement: - text -

-

Inherited from etree._Element: - attrib, - base, - nsmap, - prefix, - sourceline, - tag, - tail -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

__repr__(x) -
(Representation operator) -

-
  -
- - repr(x) -
-
Overrides: - object.__repr__ -
-
-
-
- -
- -
- - -
-

__str__(x) -
(Informal representation operator) -

-
  -
- - str(x) -
-
Overrides: - object.__str__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.objectify.ObjectifiedElement-class.html b/doc/html/api/lxml.objectify.ObjectifiedElement-class.html deleted file mode 100644 index bca3ab0..0000000 --- a/doc/html/api/lxml.objectify.ObjectifiedElement-class.html +++ /dev/null @@ -1,883 +0,0 @@ - - - - - lxml.objectify.ObjectifiedElement - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module objectify :: - Class ObjectifiedElement - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ObjectifiedElement

-
-    object --+        
-             |        
-etree._Element --+    
-                 |    
- etree.ElementBase --+
-                     |
-                    ObjectifiedElement
-
- -
Known Subclasses:
-
- -
- -
-

Main XML Element class.

-

Element children are accessed as object attributes. Multiple children -with the same name are available through a list index. Example:

-
->>> root = XML("<root><c1><c2>0</c2><c2>1</c2></c1></root>")
->>> second_c2 = root.c1.c2[1]
->>> print(second_c2.text)
-1
-
-

Note that you cannot (and must not) instantiate this class or its -subclasses.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__delattr__(...)
- x.__delattr__('name') <==> del x.name
- - -
- -
-   - - - - - - -
__delitem__(x, - y)
- del x[y]
- - -
- -
-   - - - - - - -
__getattr__(...)
- Return the (first) child with the given tag name. If no namespace -is provided, the child will be looked up in the same one as self.
- - -
- -
-   - - - - - - -
__getattribute__(...)
- x.__getattribute__('name') <==> x.name
- - -
- -
-   - - - - - - -
__getitem__(...)
- Return a sibling, counting from the first child of the parent. The -method behaves like both a dict and a sequence.
- - -
- -
-   - - - - - - -
__iter__(...)
- Iterate over self and all siblings with the same tag.
- - -
- -
-   - - - - - - -
__len__(...)
- Count self and siblings with the same tag.
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__reduce__(...)
- helper for pickle
- - -
- -
-   - - - - - - -
__setattr__(...)
- Set the value of the (first) child with the given tag name. If no -namespace is provided, the child will be looked up in the same one as -self.
- - -
- -
-   - - - - - - -
__setitem__(...)
- Set the value of a sibling, counting from the first child of the -parent. Implements key assignment, item assignment and slice -assignment.
- - -
- -
-   - - - - - - -
__str__(x)
- str(x)
- - -
- -
-   - - - - - - -
addattr(self, - tag, - value)
- Add a child value to the element.
- - -
- -
-   - - - - - - -
countchildren(self)
- Return the number of children of this element, regardless of their -name.
- - -
- -
-   - - - - - - -
descendantpaths(self, - prefix=None)
- Returns a list of object path expressions for all descendants.
- - -
- -
-   - - - - - - -
getchildren(self)
- Returns a sequence of all direct children. The elements are -returned in document order.
- - -
- -
-

Inherited from etree.ElementBase: - __init__ -

-

Inherited from etree._Element: - __contains__, - __copy__, - __deepcopy__, - __nonzero__, - __repr__, - __reversed__, - addnext, - addprevious, - append, - clear, - cssselect, - extend, - find, - findall, - findtext, - get, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - insert, - items, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - keys, - makeelement, - remove, - replace, - set, - values, - xpath -

-

Inherited from etree._Element (private): - _init -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - text
- Text before the first subelement. This is either a string or -the value None, if there was no text. -
-

Inherited from etree._Element: - attrib, - base, - nsmap, - prefix, - sourceline, - tag, - tail -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__delattr__(...) -

-
  -
- - x.__delattr__('name') <==> del x.name -
-
Overrides: - object.__delattr__ -
-
-
-
- -
- -
- - -
-

__delitem__(x, - y) -
(Index deletion operator) -

-
  -
- - del x[y] -
-
Overrides: - etree._Element.__delitem__ -
-
-
-
- -
- -
- - -
-

__getattribute__(...) -

-
  -
- - x.__getattribute__('name') <==> x.name -
-
Overrides: - object.__getattribute__ -
-
-
-
- -
- -
- - -
-

__getitem__(...) -
(Indexing operator) -

-
  -
- -

Return a sibling, counting from the first child of the parent. The -method behaves like both a dict and a sequence.

-
    -
  • If argument is an integer, returns the sibling at that position.
  • -
  • If argument is a string, does the same as getattr(). This can be -used to provide namespaces for element lookup, or to look up -children with special names (text etc.).
  • -
  • If argument is a slice object, returns the matching slice.
  • -
-
-
Overrides: - etree._Element.__getitem__ -
-
-
-
- -
- -
- - -
-

__iter__(...) -

-
  -
- - Iterate over self and all siblings with the same tag. -
-
Overrides: - etree._Element.__iter__ -
-
-
-
- -
- -
- - -
-

__len__(...) -
(Length operator) -

-
  -
- - Count self and siblings with the same tag. -
-
Overrides: - etree._Element.__len__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

__reduce__(...) -

-
  -
- - helper for pickle -
-
Overrides: - object.__reduce__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

__setattr__(...) -

-
  -
- - Set the value of the (first) child with the given tag name. If no -namespace is provided, the child will be looked up in the same one as -self. -
-
Overrides: - object.__setattr__ -
-
-
-
- -
- -
- - -
-

__setitem__(...) -
(Index assignment operator) -

-
  -
- -

Set the value of a sibling, counting from the first child of the -parent. Implements key assignment, item assignment and slice -assignment.

-
    -
  • If argument is an integer, sets the sibling at that position.
  • -
  • If argument is a string, does the same as setattr(). This is used -to provide namespaces for element lookup.
  • -
  • If argument is a sequence (list, tuple, etc.), assign the contained -items to the siblings.
  • -
-
-
Overrides: - etree._Element.__setitem__ -
-
-
-
- -
- -
- - -
-

__str__(x) -
(Informal representation operator) -

-
  -
- - str(x) -
-
Overrides: - object.__str__ -
-
-
-
- -
- -
- - -
-

addattr(self, - tag, - value) -

-
  -
- -

Add a child value to the element.

-

As opposed to append(), it sets a data value, not an element.

-
-
-
-
- -
- -
- - -
-

getchildren(self) -

-
  -
- - Returns a sequence of all direct children. The elements are -returned in document order. -
-
Overrides: - etree._Element.getchildren -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.objectify.ObjectifyElementClassLookup-class.html b/doc/html/api/lxml.objectify.ObjectifyElementClassLookup-class.html deleted file mode 100644 index aee7ff6..0000000 --- a/doc/html/api/lxml.objectify.ObjectifyElementClassLookup-class.html +++ /dev/null @@ -1,299 +0,0 @@ - - - - - lxml.objectify.ObjectifyElementClassLookup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module objectify :: - Class ObjectifyElementClassLookup - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ObjectifyElementClassLookup

-
-              object --+    
-                       |    
-etree.ElementClassLookup --+
-                           |
-                          ObjectifyElementClassLookup
-
- -
-ObjectifyElementClassLookup(self, tree_class=None, empty_data_class=None) -Element class lookup method that uses the objectify classes. - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - tree_class=None, - empty_data_class=None)
- Lookup mechanism for objectify.
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - tree_class=None, - empty_data_class=None) -
(Constructor) -

-
  -
- -

Lookup mechanism for objectify.

-

The default Element classes can be replaced by passing subclasses of -ObjectifiedElement and ObjectifiedDataElement as keyword arguments. -'tree_class' defines inner tree classes (defaults to -ObjectifiedElement), 'empty_data_class' defines the default class for -empty data elements (defaults to StringElement).

-
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.objectify.PyType-class.html b/doc/html/api/lxml.objectify.PyType-class.html deleted file mode 100644 index 38802f1..0000000 --- a/doc/html/api/lxml.objectify.PyType-class.html +++ /dev/null @@ -1,469 +0,0 @@ - - - - - lxml.objectify.PyType - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module objectify :: - Class PyType - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class PyType

-
-object --+
-         |
-        PyType
-
- -
-

PyType(self, name, type_check, type_class, stringify=None) -User defined type.

-

Named type that contains a type check function, a type class that -inherits from ObjectifiedDataElement and an optional "stringification" -function. The type check must take a string as argument and raise -ValueError or TypeError if it cannot handle the string value. It may be -None in which case it is not considered for type guessing. For registered -named types, the 'stringify' function (or unicode() if None) is used to -convert a Python object with type name 'name' to the string representation -stored in the XML tree.

-

Example:

-
-PyType('int', int, MyIntClass).register()
-
-

Note that the order in which types are registered matters. The first -matching type will be used.

- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - name, - type_check, - type_class, - stringify=None)
- x.__init__(...) initializes x; see help(type(x)) for signature
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__repr__(x)
- repr(x)
- - -
- -
-   - - - - - - -
register(self, - before=None, - after=None)
- Register the type.
- - -
- -
-   - - - - - - -
unregister(self) - - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - name -
-   - - stringify -
-   - - type_check -
-   - - xmlSchemaTypes
- The list of XML Schema datatypes this Python type maps to. -
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - name, - type_check, - type_class, - stringify=None) -
(Constructor) -

-
  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

__repr__(x) -
(Representation operator) -

-
  -
- - repr(x) -
-
Overrides: - object.__repr__ -
-
-
-
- -
- -
- - -
-

register(self, - before=None, - after=None) -

-
  -
- -

Register the type.

-

The additional keyword arguments 'before' and 'after' accept a -sequence of type names that must appear before/after the new type in -the type list. If any of them is not currently known, it is simply -ignored. Raises ValueError if the dependencies cannot be fulfilled.

-
-
-
-
-
- - - - - - -
- - - - - -
Property Details[hide private]
-
- -
- -
-

xmlSchemaTypes

-

The list of XML Schema datatypes this Python type maps to.

-

Note that this must be set before registering the type!

-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.objectify.StringElement-class.html b/doc/html/api/lxml.objectify.StringElement-class.html deleted file mode 100644 index f6cda45..0000000 --- a/doc/html/api/lxml.objectify.StringElement-class.html +++ /dev/null @@ -1,755 +0,0 @@ - - - - - lxml.objectify.StringElement - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module objectify :: - Class StringElement - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class StringElement

-
-    object --+                
-             |                
-etree._Element --+            
-                 |            
- etree.ElementBase --+        
-                     |        
-    ObjectifiedElement --+    
-                         |    
-    ObjectifiedDataElement --+
-                             |
-                            StringElement
-
- -
-

String data class.

-

Note that this class does not support the sequence protocol of strings: -len(), iter(), str_attr[0], str_attr[0:1], etc. are not supported. -Instead, use the .text attribute to get a 'real' string.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__add__(x, - y)
- x+y
- - -
- -
-   - - - - - - -
__complex__(...) - - -
- -
-   - - - - - - -
__eq__(x, - y)
- x==y
- - -
- -
-   - - - - - - -
__float__(x)
- float(x)
- - -
- -
-   - - - - - - -
__ge__(x, - y)
- x>=y
- - -
- -
-   - - - - - - -
__gt__(x, - y)
- x>y
- - -
- -
-   - - - - - - -
__hash__(x)
- hash(x)
- - -
- -
-   - - - - - - -
__int__(x)
- int(x)
- - -
- -
-   - - - - - - -
__le__(x, - y)
- x<=y
- - -
- -
-   - - - - - - -
__long__(x)
- long(x)
- - -
- -
-   - - - - - - -
__lt__(x, - y)
- x<y
- - -
- -
-   - - - - - - -
__mod__(x, - y)
- x%y
- - -
- -
-   - - - - - - -
__mul__(x, - y)
- x*y
- - -
- -
-   - - - - - - -
__ne__(x, - y)
- x!=y
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__nonzero__(x)
- x != 0
- - -
- -
-   - - - - - - -
__radd__(x, - y)
- y+x
- - -
- -
-   - - - - - - -
__repr__(x)
- repr(x)
- - -
- -
-   - - - - - - -
__rmod__(x, - y)
- y%x
- - -
- -
-   - - - - - - -
__rmul__(x, - y)
- y*x
- - -
- -
-   - - - - - - -
strlen(...) - - -
- -
-

Inherited from ObjectifiedDataElement: - __str__ -

-

Inherited from ObjectifiedDataElement (private): - _setText -

-

Inherited from ObjectifiedElement: - __delattr__, - __delitem__, - __getattr__, - __getattribute__, - __getitem__, - __iter__, - __len__, - __reduce__, - __setattr__, - __setitem__, - addattr, - countchildren, - descendantpaths, - getchildren -

-

Inherited from etree.ElementBase: - __init__ -

-

Inherited from etree._Element: - __contains__, - __copy__, - __deepcopy__, - __reversed__, - addnext, - addprevious, - append, - clear, - cssselect, - extend, - find, - findall, - findtext, - get, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - insert, - items, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - keys, - makeelement, - remove, - replace, - set, - values, - xpath -

-

Inherited from etree._Element (private): - _init -

-

Inherited from object: - __format__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - pyval -
-

Inherited from ObjectifiedElement: - text -

-

Inherited from etree._Element: - attrib, - base, - nsmap, - prefix, - sourceline, - tag, - tail -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__hash__(x) -
(Hashing function) -

-
  -
- - hash(x) -
-
Overrides: - object.__hash__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

__nonzero__(x) -
(Boolean test operator) -

-
  -
- - x != 0 -
-
Overrides: - etree._Element.__nonzero__ -
-
-
-
- -
- -
- - -
-

__repr__(x) -
(Representation operator) -

-
  -
- - repr(x) -
-
Overrides: - object.__repr__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.pyclasslookup-module.html b/doc/html/api/lxml.pyclasslookup-module.html deleted file mode 100644 index a588576..0000000 --- a/doc/html/api/lxml.pyclasslookup-module.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - lxml.pyclasslookup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module pyclasslookup - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module pyclasslookup

source code

- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = 'lxml' -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.pyclasslookup-pysrc.html b/doc/html/api/lxml.pyclasslookup-pysrc.html deleted file mode 100644 index 7a640a6..0000000 --- a/doc/html/api/lxml.pyclasslookup-pysrc.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - lxml.pyclasslookup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module pyclasslookup - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.pyclasslookup

-
-1  # dummy module for backwards compatibility 
-2   
-3  from lxml.etree import PythonElementClassLookup 
-4   
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.sax-module.html b/doc/html/api/lxml.sax-module.html deleted file mode 100644 index 80912bc..0000000 --- a/doc/html/api/lxml.sax-module.html +++ /dev/null @@ -1,242 +0,0 @@ - - - - - lxml.sax - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module sax - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module sax

source code

-

SAX-based adapter to copy trees from/to the Python standard library.

-

Use the ElementTreeContentHandler class to build an ElementTree from -SAX events.

-

Use the ElementTreeProducer class or the saxify() function to fire -the SAX events of an ElementTree against a SAX ContentHandler.

-

See http://codespeak.net/lxml/sax.html

- - - - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - SaxError
- General SAX error. -
-   - - ElementTreeContentHandler
- Build an lxml ElementTree from SAX events. -
-   - - ElementTreeProducer
- Produces SAX events for an element and children. -
- - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
_getNsTag(tag) - source code - -
- -
-   - - - - - - -
saxify(element_or_tree, - content_handler)
- One-shot helper to generate SAX events from an XML tree and fire -them against a SAX ContentHandler.
- source code - -
- -
- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = 'lxml' -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.sax-pysrc.html b/doc/html/api/lxml.sax-pysrc.html deleted file mode 100644 index 251b86d..0000000 --- a/doc/html/api/lxml.sax-pysrc.html +++ /dev/null @@ -1,599 +0,0 @@ - - - - - lxml.sax - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module sax - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.sax

-
-  1  """ 
-  2  SAX-based adapter to copy trees from/to the Python standard library. 
-  3   
-  4  Use the `ElementTreeContentHandler` class to build an ElementTree from 
-  5  SAX events. 
-  6   
-  7  Use the `ElementTreeProducer` class or the `saxify()` function to fire 
-  8  the SAX events of an ElementTree against a SAX ContentHandler. 
-  9   
- 10  See http://codespeak.net/lxml/sax.html 
- 11  """ 
- 12   
- 13  from xml.sax.handler import ContentHandler 
- 14  from lxml import etree 
- 15  from lxml.etree import ElementTree, SubElement 
- 16  from lxml.etree import Comment, ProcessingInstruction 
- 17   
- 18   
-
19 -class SaxError(etree.LxmlError): -
20 """General SAX error. - 21 """ -
22 - 23 -
24 -def _getNsTag(tag): -
25 if tag[0] == '{': - 26 return tuple(tag[1:].split('}', 1)) - 27 else: - 28 return (None, tag) -
29 - 30 -
31 -class ElementTreeContentHandler(ContentHandler): -
32 """Build an lxml ElementTree from SAX events. - 33 """ -
34 - def __init__(self, makeelement=None): -
35 ContentHandler.__init__(self) - 36 self._root = None - 37 self._root_siblings = [] - 38 self._element_stack = [] - 39 self._default_ns = None - 40 self._ns_mapping = { None : [None] } - 41 self._new_mappings = {} - 42 if makeelement is None: - 43 makeelement = etree.Element - 44 self._makeelement = makeelement -
45 -
46 - def _get_etree(self): -
47 "Contains the generated ElementTree after parsing is finished." - 48 return ElementTree(self._root) -
49 - 50 etree = property(_get_etree, doc=_get_etree.__doc__) - 51 -
52 - def setDocumentLocator(self, locator): -
53 pass -
54 -
55 - def startDocument(self): -
56 pass -
57 -
58 - def endDocument(self): -
59 pass -
60 -
61 - def startPrefixMapping(self, prefix, uri): -
62 self._new_mappings[prefix] = uri - 63 try: - 64 self._ns_mapping[prefix].append(uri) - 65 except KeyError: - 66 self._ns_mapping[prefix] = [uri] - 67 if prefix is None: - 68 self._default_ns = uri -
69 -
70 - def endPrefixMapping(self, prefix): -
71 ns_uri_list = self._ns_mapping[prefix] - 72 ns_uri_list.pop() - 73 if prefix is None: - 74 self._default_ns = ns_uri_list[-1] -
75 -
76 - def _buildTag(self, ns_name_tuple): -
77 ns_uri, local_name = ns_name_tuple - 78 if ns_uri: - 79 el_tag = "{%s}%s" % ns_name_tuple - 80 elif self._default_ns: - 81 el_tag = "{%s}%s" % (self._default_ns, local_name) - 82 else: - 83 el_tag = local_name - 84 return el_tag -
85 -
86 - def startElementNS(self, ns_name, qname, attributes=None): -
87 el_name = self._buildTag(ns_name) - 88 if attributes: - 89 attrs = {} - 90 try: - 91 iter_attributes = attributes.iteritems() - 92 except AttributeError: - 93 iter_attributes = attributes.items() - 94 - 95 for name_tuple, value in iter_attributes: - 96 if name_tuple[0]: - 97 attr_name = "{%s}%s" % name_tuple - 98 else: - 99 attr_name = name_tuple[1] -100 attrs[attr_name] = value -101 else: -102 attrs = None -103 -104 element_stack = self._element_stack -105 if self._root is None: -106 element = self._root = \ -107 self._makeelement(el_name, attrs, self._new_mappings) -108 if self._root_siblings and hasattr(element, 'addprevious'): -109 for sibling in self._root_siblings: -110 element.addprevious(sibling) -111 del self._root_siblings[:] -112 else: -113 element = SubElement(element_stack[-1], el_name, -114 attrs, self._new_mappings) -115 element_stack.append(element) -116 -117 self._new_mappings.clear() -
118 -
119 - def processingInstruction(self, target, data): -
120 pi = ProcessingInstruction(target, data) -121 if self._root is None: -122 self._root_siblings.append(pi) -123 else: -124 self._element_stack[-1].append(pi) -
125 -
126 - def endElementNS(self, ns_name, qname): -
127 element = self._element_stack.pop() -128 el_tag = self._buildTag(ns_name) -129 if el_tag != element.tag: -130 raise SaxError("Unexpected element closed: " + el_tag) -
131 -
132 - def startElement(self, name, attributes=None): -
133 if attributes: -134 attributes = dict( -135 [((None, k), v) for k, v in attributes.items()] -136 ) -137 self.startElementNS((None, name), name, attributes) -
138 -
139 - def endElement(self, name): -
140 self.endElementNS((None, name), name) -
141 -
142 - def characters(self, data): -
143 last_element = self._element_stack[-1] -144 try: -145 # if there already is a child element, we must append to its tail -146 last_element = last_element[-1] -147 last_element.tail = (last_element.tail or '') + data -148 except IndexError: -149 # otherwise: append to the text -150 last_element.text = (last_element.text or '') + data -
151 -152 ignorableWhitespace = characters -
153 -154 -
155 -class ElementTreeProducer(object): -
156 """Produces SAX events for an element and children. -157 """ -
158 - def __init__(self, element_or_tree, content_handler): -
159 try: -160 element = element_or_tree.getroot() -161 except AttributeError: -162 element = element_or_tree -163 self._element = element -164 self._content_handler = content_handler -165 from xml.sax.xmlreader import AttributesNSImpl as attr_class -166 self._attr_class = attr_class -167 self._empty_attributes = attr_class({}, {}) -
168 -
169 - def saxify(self): -
170 self._content_handler.startDocument() -171 -172 element = self._element -173 if hasattr(element, 'getprevious'): -174 siblings = [] -175 sibling = element.getprevious() -176 while getattr(sibling, 'tag', None) is ProcessingInstruction: -177 siblings.append(sibling) -178 sibling = sibling.getprevious() -179 for sibling in siblings[::-1]: -180 self._recursive_saxify(sibling, {}) -181 -182 self._recursive_saxify(element, {}) -183 -184 if hasattr(element, 'getnext'): -185 sibling = element.getnext() -186 while getattr(sibling, 'tag', None) is ProcessingInstruction: -187 self._recursive_saxify(sibling, {}) -188 sibling = sibling.getnext() -189 -190 self._content_handler.endDocument() -
191 -
192 - def _recursive_saxify(self, element, prefixes): -
193 content_handler = self._content_handler -194 tag = element.tag -195 if tag is Comment or tag is ProcessingInstruction: -196 if tag is ProcessingInstruction: -197 content_handler.processingInstruction( -198 element.target, element.text) -199 if element.tail: -200 content_handler.characters(element.tail) -201 return -202 -203 new_prefixes = [] -204 build_qname = self._build_qname -205 attribs = element.items() -206 if attribs: -207 attr_values = {} -208 attr_qnames = {} -209 for attr_ns_name, value in attribs: -210 attr_ns_tuple = _getNsTag(attr_ns_name) -211 attr_values[attr_ns_tuple] = value -212 attr_qnames[attr_ns_tuple] = build_qname( -213 attr_ns_tuple[0], attr_ns_tuple[1], prefixes, new_prefixes) -214 sax_attributes = self._attr_class(attr_values, attr_qnames) -215 else: -216 sax_attributes = self._empty_attributes -217 -218 ns_uri, local_name = _getNsTag(tag) -219 qname = build_qname(ns_uri, local_name, prefixes, new_prefixes) -220 -221 for prefix, uri in new_prefixes: -222 content_handler.startPrefixMapping(prefix, uri) -223 content_handler.startElementNS((ns_uri, local_name), -224 qname, sax_attributes) -225 if element.text: -226 content_handler.characters(element.text) -227 for child in element: -228 self._recursive_saxify(child, prefixes) -229 content_handler.endElementNS((ns_uri, local_name), qname) -230 for prefix, uri in new_prefixes: -231 content_handler.endPrefixMapping(prefix) -232 if element.tail: -233 content_handler.characters(element.tail) -
234 -
235 - def _build_qname(self, ns_uri, local_name, prefixes, new_prefixes): -
236 if ns_uri is None: -237 return local_name -238 try: -239 prefix = prefixes[ns_uri] -240 except KeyError: -241 prefix = prefixes[ns_uri] = 'ns%02d' % len(prefixes) -242 new_prefixes.append( (prefix, ns_uri) ) -243 return prefix + ':' + local_name -
244 -
245 -def saxify(element_or_tree, content_handler): -
246 """One-shot helper to generate SAX events from an XML tree and fire -247 them against a SAX ContentHandler. -248 """ -249 return ElementTreeProducer(element_or_tree, content_handler).saxify() -
250 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.sax.ElementTreeContentHandler-class.html b/doc/html/api/lxml.sax.ElementTreeContentHandler-class.html deleted file mode 100644 index d84bdf3..0000000 --- a/doc/html/api/lxml.sax.ElementTreeContentHandler-class.html +++ /dev/null @@ -1,894 +0,0 @@ - - - - - lxml.sax.ElementTreeContentHandler - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module sax :: - Class ElementTreeContentHandler - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ElementTreeContentHandler

source code

-
-xml.sax.handler.ContentHandler --+
-                                 |
-                                ElementTreeContentHandler
-
- -
-Build an lxml ElementTree from SAX events. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - makeelement=None) - source code - -
- -
-   - - - - - - -
_get_etree(self)
- Contains the generated ElementTree after parsing is finished.
- source code - -
- -
-   - - - - - - -
setDocumentLocator(self, - locator)
- Called by the parser to give the application a locator for -locating the origin of document events.
- source code - -
- -
-   - - - - - - -
startDocument(self)
- Receive notification of the beginning of a document.
- source code - -
- -
-   - - - - - - -
endDocument(self)
- Receive notification of the end of a document.
- source code - -
- -
-   - - - - - - -
startPrefixMapping(self, - prefix, - uri)
- Begin the scope of a prefix-URI Namespace mapping.
- source code - -
- -
-   - - - - - - -
endPrefixMapping(self, - prefix)
- End the scope of a prefix-URI mapping.
- source code - -
- -
-   - - - - - - -
_buildTag(self, - ns_name_tuple) - source code - -
- -
-   - - - - - - -
startElementNS(self, - ns_name, - qname, - attributes=None)
- Signals the start of an element in namespace mode.
- source code - -
- -
-   - - - - - - -
processingInstruction(self, - target, - data)
- Receive notification of a processing instruction.
- source code - -
- -
-   - - - - - - -
endElementNS(self, - ns_name, - qname)
- Signals the end of an element in namespace mode.
- source code - -
- -
-   - - - - - - -
startElement(self, - name, - attributes=None)
- Signals the start of an element in non-namespace mode.
- source code - -
- -
-   - - - - - - -
endElement(self, - name)
- Signals the end of an element in non-namespace mode.
- source code - -
- -
-   - - - - - - -
characters(self, - data)
- Receive notification of character data.
- source code - -
- -
-   - - - - - - -
ignorableWhitespace(self, - data)
- Receive notification of character data.
- source code - -
- -
-

Inherited from xml.sax.handler.ContentHandler: - skippedEntity -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-   - - etree
- Contains the generated ElementTree after parsing is finished. -
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - makeelement=None) -
(Constructor) -

-
source code  -
- - -
-
Overrides: - xml.sax.handler.ContentHandler.__init__ -
-
-
-
- -
- -
- - -
-

setDocumentLocator(self, - locator) -

-
source code  -
- -

Called by the parser to give the application a locator for -locating the origin of document events.

-

SAX parsers are strongly encouraged (though not absolutely -required) to supply a locator: if it does so, it must supply -the locator to the application by invoking this method before -invoking any of the other methods in the DocumentHandler -interface.

-

The locator allows the application to determine the end -position of any document-related event, even if the parser is -not reporting an error. Typically, the application will use -this information for reporting its own errors (such as -character content that does not match an application's -business rules). The information returned by the locator is -probably not sufficient for use with a search engine.

-

Note that the locator will return correct information only -during the invocation of the events in this interface. The -application should not attempt to use it at any other time.

-
-
Overrides: - xml.sax.handler.ContentHandler.setDocumentLocator -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

startDocument(self) -

-
source code  -
- -

Receive notification of the beginning of a document.

-

The SAX parser will invoke this method only once, before any -other methods in this interface or in DTDHandler (except for -setDocumentLocator).

-
-
Overrides: - xml.sax.handler.ContentHandler.startDocument -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

endDocument(self) -

-
source code  -
- -

Receive notification of the end of a document.

-

The SAX parser will invoke this method only once, and it will -be the last method invoked during the parse. The parser shall -not invoke this method until it has either abandoned parsing -(because of an unrecoverable error) or reached the end of -input.

-
-
Overrides: - xml.sax.handler.ContentHandler.endDocument -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

startPrefixMapping(self, - prefix, - uri) -

-
source code  -
- -

Begin the scope of a prefix-URI Namespace mapping.

-

The information from this event is not necessary for normal -Namespace processing: the SAX XML reader will automatically -replace prefixes for element and attribute names when the -http://xml.org/sax/features/namespaces feature is true (the -default).

-

There are cases, however, when applications need to use -prefixes in character data or in attribute values, where they -cannot safely be expanded automatically; the -start/endPrefixMapping event supplies the information to the -application to expand prefixes in those contexts itself, if -necessary.

-

Note that start/endPrefixMapping events are not guaranteed to -be properly nested relative to each-other: all -startPrefixMapping events will occur before the corresponding -startElement event, and all endPrefixMapping events will occur -after the corresponding endElement event, but their order is -not guaranteed.

-
-
Overrides: - xml.sax.handler.ContentHandler.startPrefixMapping -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

endPrefixMapping(self, - prefix) -

-
source code  -
- -

End the scope of a prefix-URI mapping.

-

See startPrefixMapping for details. This event will always -occur after the corresponding endElement event, but the order -of endPrefixMapping events is not otherwise guaranteed.

-
-
Overrides: - xml.sax.handler.ContentHandler.endPrefixMapping -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

startElementNS(self, - ns_name, - qname, - attributes=None) -

-
source code  -
- -

Signals the start of an element in namespace mode.

-

The name parameter contains the name of the element type as a -(uri, localname) tuple, the qname parameter the raw XML 1.0 -name used in the source document, and the attrs parameter -holds an instance of the Attributes class containing the -attributes of the element.

-

The uri part of the name tuple is None for elements which have -no namespace.

-
-
Overrides: - xml.sax.handler.ContentHandler.startElementNS -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

processingInstruction(self, - target, - data) -

-
source code  -
- -

Receive notification of a processing instruction.

-

The Parser will invoke this method once for each processing -instruction found: note that processing instructions may occur -before or after the main document element.

-

A SAX parser should never report an XML declaration (XML 1.0, -section 2.8) or a text declaration (XML 1.0, section 4.3.1) -using this method.

-
-
Overrides: - xml.sax.handler.ContentHandler.processingInstruction -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

endElementNS(self, - ns_name, - qname) -

-
source code  -
- -

Signals the end of an element in namespace mode.

-

The name parameter contains the name of the element type, just -as with the startElementNS event.

-
-
Overrides: - xml.sax.handler.ContentHandler.endElementNS -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

startElement(self, - name, - attributes=None) -

-
source code  -
- -

Signals the start of an element in non-namespace mode.

-

The name parameter contains the raw XML 1.0 name of the -element type as a string and the attrs parameter holds an -instance of the Attributes class containing the attributes of -the element.

-
-
Overrides: - xml.sax.handler.ContentHandler.startElement -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

endElement(self, - name) -

-
source code  -
- -

Signals the end of an element in non-namespace mode.

-

The name parameter contains the name of the element type, just -as with the startElement event.

-
-
Overrides: - xml.sax.handler.ContentHandler.endElement -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

characters(self, - data) -

-
source code  -
- -

Receive notification of character data.

-

The Parser will call this method to report each chunk of -character data. SAX parsers may return all contiguous -character data in a single chunk, or they may split it into -several chunks; however, all of the characters in any single -event must come from the same external entity so that the -Locator provides useful information.

-
-
Overrides: - xml.sax.handler.ContentHandler.characters -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

ignorableWhitespace(self, - data) -

-
source code  -
- -

Receive notification of character data.

-

The Parser will call this method to report each chunk of -character data. SAX parsers may return all contiguous -character data in a single chunk, or they may split it into -several chunks; however, all of the characters in any single -event must come from the same external entity so that the -Locator provides useful information.

-
-
Overrides: - xml.sax.handler.ContentHandler.ignorableWhitespace -
(inherited documentation)
- -
-
-
-
- - - - - - -
- - - - - -
Property Details[hide private]
-
- -
- -
-

etree

- Contains the generated ElementTree after parsing is finished. -
-
Get Method:
-
_get_etree(self) - - Contains the generated ElementTree after parsing is finished. -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.sax.ElementTreeProducer-class.html b/doc/html/api/lxml.sax.ElementTreeProducer-class.html deleted file mode 100644 index 350bd34..0000000 --- a/doc/html/api/lxml.sax.ElementTreeProducer-class.html +++ /dev/null @@ -1,304 +0,0 @@ - - - - - lxml.sax.ElementTreeProducer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module sax :: - Class ElementTreeProducer - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ElementTreeProducer

source code

-
-object --+
-         |
-        ElementTreeProducer
-
- -
-Produces SAX events for an element and children. - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - element_or_tree, - content_handler)
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-   - - - - - - -
saxify(self) - source code - -
- -
-   - - - - - - -
_recursive_saxify(self, - element, - prefixes) - source code - -
- -
-   - - - - - - -
_build_qname(self, - ns_uri, - local_name, - prefixes, - new_prefixes) - source code - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - element_or_tree, - content_handler) -
(Constructor) -

-
source code  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.sax.SaxError-class.html b/doc/html/api/lxml.sax.SaxError-class.html deleted file mode 100644 index 4bc7409..0000000 --- a/doc/html/api/lxml.sax.SaxError-class.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - lxml.sax.SaxError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module sax :: - Class SaxError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class SaxError

source code

-
-              object --+                
-                       |                
-exceptions.BaseException --+            
-                           |            
-        exceptions.Exception --+        
-                               |        
-                     etree.Error --+    
-                                   |    
-                     etree.LxmlError --+
-                                       |
-                                      SaxError
-
- -
-General SAX error. - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from etree.LxmlError: - __init__, - __new__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests-module.html b/doc/html/api/lxml.tests-module.html deleted file mode 100644 index f752a44..0000000 --- a/doc/html/api/lxml.tests-module.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - lxml.tests - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Package tests

source code

-The lxml test suite for lxml, ElementTree and cElementTree. - - - - - - - - -
- - - - - -
Submodules[hide private]
-
-
- -
- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = None
- hash(x) -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests-pysrc.html b/doc/html/api/lxml.tests-pysrc.html deleted file mode 100644 index 0bd3bc9..0000000 --- a/doc/html/api/lxml.tests-pysrc.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - lxml.tests - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Package lxml.tests

-
-1  """ 
-2  The lxml test suite for lxml, ElementTree and cElementTree. 
-3  """ 
-4   
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.common_imports-module.html b/doc/html/api/lxml.tests.common_imports-module.html deleted file mode 100644 index 4dff7be..0000000 --- a/doc/html/api/lxml.tests.common_imports-module.html +++ /dev/null @@ -1,560 +0,0 @@ - - - - - lxml.tests.common_imports - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module common_imports - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module common_imports

source code

- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - skipif
- Using a class because a function would bind into a method when used in classes -
-   - - HelperTestCase -
-   - - SillyFileLike -
-   - - LargeFileLike -
-   - - LargeFileLikeUnicode -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
make_version_tuple(version_string) - source code - -
- -
-   - - - - - - -
filter_by_version(test_class, - version_dict, - current_version)
- Remove test methods that do not work with the current lib version.
- source code - -
- -
-   - - - - - - -
_get_caller_relative_path(filename, - frame_depth=2) - source code - -
- -
-   - - - - - - -
_str(s, - encoding='UTF-8') - source code - -
- -
-   - - - - - - -
_bytes(s, - encoding='UTF-8') - source code - -
- -
-   - - - - - - -
_fix_traceback(...)
- sub(repl, string[, count = 0]) --> newstring -Return the string obtained by replacing the leftmost non-overlapping -occurrences of pattern in string by the replacement repl.
- source code - -
- -
-   - - - - - - -
_fix_exceptions(...)
- sub(repl, string[, count = 0]) --> newstring -Return the string obtained by replacing the leftmost non-overlapping -occurrences of pattern in string by the replacement repl.
- source code - -
- -
-   - - - - - - -
_fix_bytes(...)
- sub(repl, string[, count = 0]) --> newstring -Return the string obtained by replacing the leftmost non-overlapping -occurrences of pattern in string by the replacement repl.
- source code - -
- -
-   - - - - - - -
make_doctest(filename) - source code - -
- -
-   - - - - - - -
fileInTestDir(name) - source code - -
- -
-   - - - - - - -
path2url(path) - source code - -
- -
-   - - - - - - -
fileUrlInTestDir(name) - source code - -
- -
-   - - - - - - -
read_file(name, - mode='r') - source code - -
- -
-   - - - - - - -
write_to_file(name, - data, - mode='w') - source code - -
- -
-   - - - - - - -
readFileInTestDir(name, - mode='r') - source code - -
- -
-   - - - - - - -
canonicalize(xml) - source code - -
- -
-   - - - - - - -
unentitify(xml) - source code - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - IS_PYPY = False -
-   - - IS_PYTHON3 = False -
-   - - IS_PYTHON2 = True -
-   - - ET_VERSION = (1, 3, 0) -
-   - - CET_VERSION = (1, 0, 6) -
-   - - unichr_escape = re.compile(r'\\u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}') -
-   - - _fix_unicode = re.compile(r'(\s+)u(["\'])').sub -
-   - - doctest_parser = <doctest.DocTestParser object> -
-   - - __package__ = 'lxml.tests' -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.common_imports-pysrc.html b/doc/html/api/lxml.tests.common_imports-pysrc.html deleted file mode 100644 index 46b9d7f..0000000 --- a/doc/html/api/lxml.tests.common_imports-pysrc.html +++ /dev/null @@ -1,630 +0,0 @@ - - - - - lxml.tests.common_imports - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module common_imports - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.common_imports

-
-  1  import os 
-  2  import os.path 
-  3  import re 
-  4  import gc 
-  5  import sys 
-  6  import unittest 
-  7   
-  8  try: 
-  9      import urlparse 
- 10  except ImportError: 
- 11      import urllib.parse as urlparse  
- 12   
- 13  try: 
- 14      from urllib import pathname2url 
- 15  except: 
- 16      from urllib.request import pathname2url 
- 17   
- 18  from lxml import etree, html 
- 19   
-
20 -def make_version_tuple(version_string): -
21 l = [] - 22 for part in re.findall('([0-9]+|[^0-9.]+)', version_string): - 23 try: - 24 l.append(int(part)) - 25 except ValueError: - 26 l.append(part) - 27 return tuple(l) -
28 - 29 IS_PYPY = (getattr(sys, 'implementation', None) == 'pypy' or - 30 getattr(sys, 'pypy_version_info', None) is not None) - 31 - 32 IS_PYTHON3 = sys.version_info[0] >= 3 - 33 IS_PYTHON2 = sys.version_info[0] < 3 - 34 - 35 from xml.etree import ElementTree - 36 - 37 if hasattr(ElementTree, 'VERSION'): - 38 ET_VERSION = make_version_tuple(ElementTree.VERSION) - 39 else: - 40 ET_VERSION = (0,0,0) - 41 - 42 from xml.etree import cElementTree - 43 - 44 if hasattr(cElementTree, 'VERSION'): - 45 CET_VERSION = make_version_tuple(cElementTree.VERSION) - 46 else: - 47 CET_VERSION = (0,0,0) - 48 -
49 -def filter_by_version(test_class, version_dict, current_version): -
50 """Remove test methods that do not work with the current lib version. - 51 """ - 52 find_required_version = version_dict.get - 53 def dummy_test_method(self): - 54 pass -
55 for name in dir(test_class): - 56 expected_version = find_required_version(name, (0,0,0)) - 57 if expected_version > current_version: - 58 setattr(test_class, name, dummy_test_method) - 59 - 60 import doctest - 61 - 62 try: - 63 next - 64 except NameError: -
65 - def next(it): -
66 return it.next() -
67 else: - 68 locals()['next'] = next - 69 - 70 - 71 try: - 72 import pytest - 73 except ImportError: -
74 - class skipif(object): -
75 "Using a class because a function would bind into a method when used in classes" -
76 - def __init__(self, *args): pass -
77 - def __call__(self, func, *args): return func -
78 else: - 79 skipif = pytest.mark.skipif - 80 -
81 -def _get_caller_relative_path(filename, frame_depth=2): -
82 module = sys.modules[sys._getframe(frame_depth).f_globals['__name__']] - 83 return os.path.normpath(os.path.join( - 84 os.path.dirname(getattr(module, '__file__', '')), filename)) -
85 - 86 from io import StringIO - 87 - 88 unichr_escape = re.compile(r'\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}') - 89 - 90 if sys.version_info[0] >= 3: - 91 # Python 3 - 92 from builtins import str as unicode - 93 from codecs import unicode_escape_decode - 94 _chr = chr -
95 - def _str(s, encoding="UTF-8"): -
96 return unichr_escape.sub(lambda x: unicode_escape_decode(x.group(0))[0], s) -
97 - def _bytes(s, encoding="UTF-8"): -
98 return s.encode(encoding) -
99 from io import BytesIO as _BytesIO -
100 - def BytesIO(*args): -
101 if args and isinstance(args[0], str): -102 args = (args[0].encode("UTF-8"),) -103 return _BytesIO(*args) -
104 -105 doctest_parser = doctest.DocTestParser() -106 _fix_unicode = re.compile(r'(\s+)u(["\'])').sub -107 _fix_exceptions = re.compile(r'(.*except [^(]*),\s*(.*:)').sub -
108 - def make_doctest(filename): -
109 filename = _get_caller_relative_path(filename) -110 doctests = read_file(filename) -111 doctests = _fix_unicode(r'\1\2', doctests) -112 doctests = _fix_exceptions(r'\1 as \2', doctests) -113 return doctest.DocTestCase( -114 doctest_parser.get_doctest( -115 doctests, {}, os.path.basename(filename), filename, 0)) -
116 else: -117 # Python 2 -118 from __builtin__ import unicode -119 _chr = unichr -
120 - def _str(s, encoding="UTF-8"): -
121 s = unicode(s, encoding=encoding) -122 return unichr_escape.sub(lambda x: -123 x.group(0).decode('unicode-escape'), -124 s) -
125 - def _bytes(s, encoding="UTF-8"): -
126 return s -
127 from io import BytesIO -128 -129 doctest_parser = doctest.DocTestParser() -130 _fix_traceback = re.compile(r'^(\s*)(?:\w+\.)+(\w*(?:Error|Exception|Invalid):)', re.M).sub -131 _fix_exceptions = re.compile(r'(.*except [^(]*)\s+as\s+(.*:)').sub -132 _fix_bytes = re.compile(r'(\s+)b(["\'])').sub -
133 - def make_doctest(filename): -
134 filename = _get_caller_relative_path(filename) -135 doctests = read_file(filename) -136 doctests = _fix_traceback(r'\1\2', doctests) -137 doctests = _fix_exceptions(r'\1, \2', doctests) -138 doctests = _fix_bytes(r'\1\2', doctests) -139 return doctest.DocTestCase( -140 doctest_parser.get_doctest( -141 doctests, {}, os.path.basename(filename), filename, 0)) -
142 -143 try: -144 skipIf = unittest.skipIf -145 except AttributeError: -
146 - def skipIf(condition, why): -
147 def _skip(thing): -148 import types -149 if isinstance(thing, (type, types.ClassType)): -150 return type(thing.__name__, (object,), {}) -151 else: -152 return None -
153 if condition: -154 return _skip -155 return lambda thing: thing -156 -157 -
158 -class HelperTestCase(unittest.TestCase): -
159 - def tearDown(self): -
160 gc.collect() -
161 -
162 - def parse(self, text, parser=None): -
163 f = BytesIO(text) if isinstance(text, bytes) else StringIO(text) -164 return etree.parse(f, parser=parser) -
165 -
166 - def _rootstring(self, tree): -
167 return etree.tostring(tree.getroot()).replace( -168 _bytes(' '), _bytes('')).replace(_bytes('\n'), _bytes('')) -
169 -170 -
171 -class SillyFileLike: -
172 - def __init__(self, xml_data=_bytes('<foo><bar/></foo>')): -
173 self.xml_data = xml_data -
174 -
175 - def read(self, amount=None): -
176 if self.xml_data: -177 if amount: -178 data = self.xml_data[:amount] -179 self.xml_data = self.xml_data[amount:] -180 else: -181 data = self.xml_data -182 self.xml_data = _bytes('') -183 return data -184 return _bytes('') -
185 -
186 -class LargeFileLike: -
187 - def __init__(self, charlen=100, depth=4, children=5): -
188 self.data = BytesIO() -189 self.chars = _bytes('a') * charlen -190 self.children = range(children) -191 self.more = self.iterelements(depth) -
192 -
193 - def iterelements(self, depth): -
194 yield _bytes('<root>') -195 depth -= 1 -196 if depth > 0: -197 for child in self.children: -198 for element in self.iterelements(depth): -199 yield element -200 yield self.chars -201 else: -202 yield self.chars -203 yield _bytes('</root>') -
204 -
205 - def read(self, amount=None): -
206 data = self.data -207 append = data.write -208 if amount: -209 for element in self.more: -210 append(element) -211 if data.tell() >= amount: -212 break -213 else: -214 for element in self.more: -215 append(element) -216 result = data.getvalue() -217 data.seek(0) -218 data.truncate() -219 if amount: -220 append(result[amount:]) -221 result = result[:amount] -222 return result -
223 -
224 -class LargeFileLikeUnicode(LargeFileLike): -
225 - def __init__(self, charlen=100, depth=4, children=5): -
226 LargeFileLike.__init__(self, charlen, depth, children) -227 self.data = StringIO() -228 self.chars = _str('a') * charlen -229 self.more = self.iterelements(depth) -
230 -
231 - def iterelements(self, depth): -
232 yield _str('<root>') -233 depth -= 1 -234 if depth > 0: -235 for child in self.children: -236 for element in self.iterelements(depth): -237 yield element -238 yield self.chars -239 else: -240 yield self.chars -241 yield _str('</root>') -
242 -
243 -def fileInTestDir(name): -
244 _testdir = os.path.dirname(__file__) -245 return os.path.join(_testdir, name) -
246 -
247 -def path2url(path): -
248 return urlparse.urljoin( -249 'file:', pathname2url(path)) -
250 -
251 -def fileUrlInTestDir(name): -
252 return path2url(fileInTestDir(name)) -
253 -
254 -def read_file(name, mode='r'): -
255 f = open(name, mode) -256 try: -257 data = f.read() -258 finally: -259 f.close() -260 return data -
261 -
262 -def write_to_file(name, data, mode='w'): -
263 f = open(name, mode) -264 try: -265 data = f.write(data) -266 finally: -267 f.close() -
268 -
269 -def readFileInTestDir(name, mode='r'): -
270 return read_file(fileInTestDir(name), mode) -
271 -
272 -def canonicalize(xml): -
273 tree = etree.parse(BytesIO(xml) if isinstance(xml, bytes) else StringIO(xml)) -274 f = BytesIO() -275 tree.write_c14n(f) -276 return f.getvalue() -
277 -
278 -def unentitify(xml): -
279 for entity_name, value in re.findall("(&#([0-9]+);)", xml): -280 xml = xml.replace(entity_name, unichr(int(value))) -281 return xml -
282 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.common_imports.HelperTestCase-class.html b/doc/html/api/lxml.tests.common_imports.HelperTestCase-class.html deleted file mode 100644 index a35714b..0000000 --- a/doc/html/api/lxml.tests.common_imports.HelperTestCase-class.html +++ /dev/null @@ -1,436 +0,0 @@ - - - - - lxml.tests.common_imports.HelperTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module common_imports :: - Class HelperTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class HelperTestCase

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        HelperTestCase
-
- -
Known Subclasses:
-
- -
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
parse(self, - text, - parser=None) - source code - -
- -
-   - - - - - - -
_rootstring(self, - tree) - source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- - Hook method for deconstructing the test fixture after testing it. -
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.common_imports.LargeFileLike-class.html b/doc/html/api/lxml.tests.common_imports.LargeFileLike-class.html deleted file mode 100644 index 8977657..0000000 --- a/doc/html/api/lxml.tests.common_imports.LargeFileLike-class.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - lxml.tests.common_imports.LargeFileLike - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module common_imports :: - Class LargeFileLike - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class LargeFileLike

source code

-
Known Subclasses:
-
- -
- -
- - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - charlen=100, - depth=4, - children=5) - source code - -
- -
-   - - - - - - -
iterelements(self, - depth) - source code - -
- -
-   - - - - - - -
read(self, - amount=None) - source code - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.common_imports.LargeFileLikeUnicode-class.html b/doc/html/api/lxml.tests.common_imports.LargeFileLikeUnicode-class.html deleted file mode 100644 index bb918af..0000000 --- a/doc/html/api/lxml.tests.common_imports.LargeFileLikeUnicode-class.html +++ /dev/null @@ -1,253 +0,0 @@ - - - - - lxml.tests.common_imports.LargeFileLikeUnicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module common_imports :: - Class LargeFileLikeUnicode - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class LargeFileLikeUnicode

source code

-
-LargeFileLike --+
-                |
-               LargeFileLikeUnicode
-
- -
- - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - charlen=100, - depth=4, - children=5) - source code - -
- -
-   - - - - - - -
iterelements(self, - depth) - source code - -
- -
-

Inherited from LargeFileLike: - read -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - charlen=100, - depth=4, - children=5) -
(Constructor) -

-
source code  -
- - -
-
Overrides: - LargeFileLike.__init__ -
-
-
-
- -
- -
- - -
-

iterelements(self, - depth) -

-
source code  -
- - -
-
Overrides: - LargeFileLike.iterelements -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.common_imports.SillyFileLike-class.html b/doc/html/api/lxml.tests.common_imports.SillyFileLike-class.html deleted file mode 100644 index 8685522..0000000 --- a/doc/html/api/lxml.tests.common_imports.SillyFileLike-class.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - lxml.tests.common_imports.SillyFileLike - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module common_imports :: - Class SillyFileLike - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class SillyFileLike

source code

- - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - xml_data='<foo><bar/></foo>') - source code - -
- -
-   - - - - - - -
read(self, - amount=None) - source code - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.common_imports.skipif-class.html b/doc/html/api/lxml.tests.common_imports.skipif-class.html deleted file mode 100644 index fcd6562..0000000 --- a/doc/html/api/lxml.tests.common_imports.skipif-class.html +++ /dev/null @@ -1,267 +0,0 @@ - - - - - lxml.tests.common_imports.skipif - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module common_imports :: - Class skipif - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class skipif

source code

-
-object --+
-         |
-        skipif
-
- -
-Using a class because a function would bind into a method when used in classes - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__call__(self, - func, - *args) - source code - -
- -
-   - - - - - - -
__init__(self, - *args)
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - *args) -
(Constructor) -

-
source code  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.dummy_http_server-module.html b/doc/html/api/lxml.tests.dummy_http_server-module.html deleted file mode 100644 index 7c47c9d..0000000 --- a/doc/html/api/lxml.tests.dummy_http_server-module.html +++ /dev/null @@ -1,286 +0,0 @@ - - - - - lxml.tests.dummy_http_server - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module dummy_http_server - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module dummy_http_server

source code

-Simple HTTP request dumper for tests in Python 2.5+. - - - - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - WebServer
- A web server that starts a new thread for each request. -
-   - - _RequestHandler -
-   - - HTTPRequestCollector -
- - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
webserver(*args, - **kwds)
- Context manager entry point for the 'with' statement.
- source code - -
- -
-   - - - - - - -
build_web_server(app, - port, - host=None) - source code - -
- -
- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = 'lxml.tests' -
- - - - - - -
- - - - - -
Function Details[hide private]
-
- -
- -
- - -
-

webserver(*args, - **kwds) -

-
source code  -
- -

Context manager entry point for the 'with' statement.

-

Pass 0 as port number to dynamically allocate a free port.

-

Usage:

-
-
with webserver(wsgi_app_function, 8080) as host_url:
-
do_ws_calls(host_url)
-
-
-
Decorators:
-
    -
  • @contextmanager
  • -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.dummy_http_server-pysrc.html b/doc/html/api/lxml.tests.dummy_http_server-pysrc.html deleted file mode 100644 index 228622c..0000000 --- a/doc/html/api/lxml.tests.dummy_http_server-pysrc.html +++ /dev/null @@ -1,220 +0,0 @@ - - - - - lxml.tests.dummy_http_server - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module dummy_http_server - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.dummy_http_server

-
- 1  """ 
- 2  Simple HTTP request dumper for tests in Python 2.5+. 
- 3  """ 
- 4   
- 5  import sys 
- 6  from contextlib import contextmanager 
- 7   
- 8  try: 
- 9      import urlparse 
-10  except ImportError: 
-11      # Python 3 
-12      import urllib.parse as urlparse 
-
13 -14 -15 @contextmanager -16 -def webserver(app, port=0, host=None): -
17 """Context manager entry point for the 'with' statement. -18 -19 Pass 0 as port number to dynamically allocate a free port. -20 -21 Usage: -22 -23 with webserver(wsgi_app_function, 8080) as host_url: -24 do_ws_calls(host_url) -25 """ -26 server = build_web_server(app, port, host or '127.0.0.1') -27 host, port = server.socket.getsockname() -28 -29 import threading -30 thread = threading.Thread(target=server.serve_forever, -31 kwargs={'poll_interval': 0.5}) -32 thread.setDaemon(True) -33 thread.start() -34 try: -35 yield 'http://%s:%s/' % (host, port) # yield control to 'with' body -36 finally: -37 server.shutdown() -38 server.server_close() -39 thread.join(timeout=1) -
40 -41 -42 try: -43 from SocketServer import ThreadingMixIn -44 except ImportError: -45 # Python 3 -46 from socketserver import ThreadingMixIn -47 -48 import wsgiref.simple_server as wsgiserver -
49 -class WebServer(wsgiserver.WSGIServer, ThreadingMixIn): -
50 """A web server that starts a new thread for each request. -51 """ -
52 -
53 -54 -class _RequestHandler(wsgiserver.WSGIRequestHandler): -
55 - def get_stderr(self): -
56 # don't write to stderr -57 return sys.stdout -
58 -
59 - def log_message(self, format, *args): -
60 # message = "wsmock(%s) %s" % (self.address_string(), format % args) -61 pass # don't log messages -
62 -
63 -64 -def build_web_server(app, port, host=None): -
65 server = wsgiserver.make_server( -66 host or '', port, app, -67 server_class=WebServer, -68 handler_class=_RequestHandler) -69 return server -
70 -
71 -72 -class HTTPRequestCollector(object): -
73 - def __init__(self, response_data, response_code=200, headers=()): -
74 self.requests = [] -75 self.response_code = response_code -76 self.response_data = response_data -77 self.headers = list(headers or ()) -
78 -
79 - def __call__(self, environ, start_response): -
80 self.requests.append(( -81 environ.get('PATH_INFO'), -82 urlparse.parse_qsl(environ.get('QUERY_STRING')))) -83 start_response('%s OK' % self.response_code, self.headers) -84 return [self.response_data] -
85 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.dummy_http_server.HTTPRequestCollector-class.html b/doc/html/api/lxml.tests.dummy_http_server.HTTPRequestCollector-class.html deleted file mode 100644 index f086b46..0000000 --- a/doc/html/api/lxml.tests.dummy_http_server.HTTPRequestCollector-class.html +++ /dev/null @@ -1,269 +0,0 @@ - - - - - lxml.tests.dummy_http_server.HTTPRequestCollector - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module dummy_http_server :: - Class HTTPRequestCollector - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class HTTPRequestCollector

source code

-
-object --+
-         |
-        HTTPRequestCollector
-
- -
- - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - response_data, - response_code=200, - headers=())
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-   - - - - - - -
__call__(self, - environ, - start_response) - source code - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - response_data, - response_code=200, - headers=()) -
(Constructor) -

-
source code  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.dummy_http_server.WebServer-class.html b/doc/html/api/lxml.tests.dummy_http_server.WebServer-class.html deleted file mode 100644 index 25346b2..0000000 --- a/doc/html/api/lxml.tests.dummy_http_server.WebServer-class.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - lxml.tests.dummy_http_server.WebServer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module dummy_http_server :: - Class WebServer - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class WebServer

source code

-
-SocketServer.BaseServer --+            
-                          |            
-     SocketServer.TCPServer --+        
-                              |        
-      BaseHTTPServer.HTTPServer --+    
-                                  |    
-   wsgiref.simple_server.WSGIServer --+
-                                      |
-        SocketServer.ThreadingMixIn --+
-                                      |
-                                     WebServer
-
- -
-A web server that starts a new thread for each request. - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from wsgiref.simple_server.WSGIServer: - get_app, - server_bind, - set_app, - setup_environ -

-

Inherited from SocketServer.TCPServer: - __init__, - close_request, - fileno, - get_request, - server_activate, - server_close, - shutdown_request -

-

Inherited from SocketServer.BaseServer: - finish_request, - handle_error, - handle_request, - handle_timeout, - process_request, - serve_forever, - shutdown, - verify_request -

-

Inherited from SocketServer.BaseServer (private): - _handle_request_noblock -

-

Inherited from SocketServer.ThreadingMixIn: - process_request_thread -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from wsgiref.simple_server.WSGIServer: - application -

-

Inherited from BaseHTTPServer.HTTPServer: - allow_reuse_address -

-

Inherited from SocketServer.TCPServer: - address_family, - request_queue_size, - socket_type -

-

Inherited from SocketServer.BaseServer: - timeout -

-

Inherited from SocketServer.ThreadingMixIn: - daemon_threads -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.dummy_http_server._RequestHandler-class.html b/doc/html/api/lxml.tests.dummy_http_server._RequestHandler-class.html deleted file mode 100644 index df44f1f..0000000 --- a/doc/html/api/lxml.tests.dummy_http_server._RequestHandler-class.html +++ /dev/null @@ -1,353 +0,0 @@ - - - - - lxml.tests.dummy_http_server._RequestHandler - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module dummy_http_server :: - Class _RequestHandler - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _RequestHandler

source code

-
-SocketServer.BaseRequestHandler --+            
-                                  |            
-  SocketServer.StreamRequestHandler --+        
-                                      |        
-  BaseHTTPServer.BaseHTTPRequestHandler --+    
-                                          |    
-   wsgiref.simple_server.WSGIRequestHandler --+
-                                              |
-                                             _RequestHandler
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from BaseHTTPServer.BaseHTTPRequestHandler: - MessageClass -

-
- - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
get_stderr(self) - source code - -
- -
-   - - - - - - -
log_message(self, - format, - *args)
- Log an arbitrary message.
- source code - -
- -
-

Inherited from wsgiref.simple_server.WSGIRequestHandler: - get_environ, - handle -

-

Inherited from BaseHTTPServer.BaseHTTPRequestHandler: - address_string, - date_time_string, - end_headers, - handle_one_request, - log_date_time_string, - log_error, - log_request, - parse_request, - send_error, - send_header, - send_response, - version_string -

-

Inherited from SocketServer.StreamRequestHandler: - finish, - setup -

-

Inherited from SocketServer.BaseRequestHandler: - __init__ -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from wsgiref.simple_server.WSGIRequestHandler: - server_version -

-

Inherited from BaseHTTPServer.BaseHTTPRequestHandler: - default_request_version, - error_content_type, - error_message_format, - monthname, - protocol_version, - responses, - sys_version, - weekdayname -

-

Inherited from SocketServer.StreamRequestHandler: - disable_nagle_algorithm, - rbufsize, - timeout, - wbufsize -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

get_stderr(self) -

-
source code  -
- - -
-
Overrides: - wsgiref.simple_server.WSGIRequestHandler.get_stderr -
-
-
-
- -
- -
- - -
-

log_message(self, - format, - *args) -

-
source code  -
- -

Log an arbitrary message.

-

This is used by all other logging functions. Override -it if you have specific logging wishes.

-

The first argument, FORMAT, is a format string for the -message to be logged. If the format string contains -any % escapes requiring parameters, they should be -specified as subsequent arguments (it's just like -printf!).

-

The client ip address and current date/time are prefixed to every -message.

-
-
Overrides: - BaseHTTPServer.BaseHTTPRequestHandler.log_message -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.selftest-module.html b/doc/html/api/lxml.tests.selftest-module.html deleted file mode 100644 index 1f1e6ad..0000000 --- a/doc/html/api/lxml.tests.selftest-module.html +++ /dev/null @@ -1,1200 +0,0 @@ - - - - - lxml.tests.selftest - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module selftest - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module selftest

source code

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
stdout() - source code - -
- -
-   - - - - - - -
fix_compatibility(xml_data) - source code - -
- -
-   - - - - - - -
serialize(elem, - **options) - source code - -
- -
-   - - - - - - -
summarize(elem) - source code - -
- -
-   - - - - - - -
summarize_list(seq) - source code - -
- -
-   - - - - - - -
normalize_crlf(tree) - source code - -
- -
-   - - - - - - -
check_string(string) - source code - -
- -
-   - - - - - - -
check_string_or_none(value) - source code - -
- -
-   - - - - - - -
check_mapping(mapping) - source code - -
- -
-   - - - - - - -
check_element(element) - source code - -
- -
-   - - - - - - -
check_element_tree(tree) - source code - -
- -
-   - - - - - - -
interface()
- Test element tree interface.
- source code - -
- -
-   - - - - - - -
simpleops() - source code - -
- -
-   - - - - - - -
find()
- Test find methods (including xpath syntax).
- source code - -
- -
-   - - - - - - -
bad_find()
- Check bad or unsupported path expressions.
- source code - -
- -
-   - - - - - - -
parsefile()
- Test parsing from file.
- source code - -
- -
-   - - - - - - -
parseliteral()
- ## >>> sequence = ["<html><body>", "text</bo", "dy></html>"] -## >>> element = ElementTree.fromstringlist(sequence) -## >>> ElementTree.ElementTree(element).write(stdout()) -## <html><body>text</body></html>
- source code - -
- -
-   - - - - - - -
iterparse()
- Test iterparse interface.
- source code - -
- -
-   - - - - - - -
writefile()
- ## Test tag suppression -## >>> elem.tag = None -## >>> serialize(elem) -## 'text<subtag>subtext</subtag>'
- source code - -
- -
-   - - - - - - -
writestring() - source code - -
- -
-   - - - - - - -
encoding()
- Test encoding issues.
- source code - -
- -
-   - - - - - - -
iterators()
- Test iterators.
- source code - -
- -
-   - - - - - - -
namespace()
- Test namespace issues.
- source code - -
- -
-   - - - - - - -
qname()
- Test QName handling.
- source code - -
- -
-   - - - - - - -
xpath_tokenizer(p)
- Test the XPath tokenizer.
- source code - -
- -
-   - - - - - - -
xinclude_loader(href, - parse='xml', - encoding=None) - source code - -
- -
-   - - - - - - -
xinclude()
- Basic inclusion example (XInclude C.1)
- source code - -
- -
-   - - - - - - -
xinclude_default() - source code - -
- -
-   - - - - - - -
bug_xmltoolkit25()
- typo in ElementTree.findtext
- source code - -
- -
-   - - - - - - -
bug_xmltoolkit28()
- .//tag causes exceptions
- source code - -
- -
- - - - - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - SAMPLE_XML = ElementTree.XML(... -
-   - - ENTITY_XML = '<!DOCTYPE points [\n<!ENTITY % user-entities SYS... -
-   - - XINCLUDE = {'C1.xml': '<?xml version=\'1.0\'?>\n<document xmln... -
-   - - __package__ = 'lxml.tests' -
- - - - - - -
- - - - - -
Function Details[hide private]
-
- -
- -
- - -
-

find() -

-
source code  -
- -

Test find methods (including xpath syntax).

-
->>> elem = SAMPLE_XML
->>> elem.find("tag").tag
-'tag'
->>> ElementTree.ElementTree(elem).find("tag").tag
-'tag'
->>> elem.find("section/tag").tag
-'tag'
->>> ElementTree.ElementTree(elem).find("section/tag").tag
-'tag'
->>> elem.findtext("tag")
-'text'
->>> elem.findtext("tog")
->>> elem.findtext("tog", "default")
-'default'
->>> ElementTree.ElementTree(elem).findtext("tag")
-'text'
->>> elem.findtext("section/tag")
-'subtext'
->>> ElementTree.ElementTree(elem).findtext("section/tag")
-'subtext'
->>> summarize_list(elem.findall("tag"))
-['tag', 'tag']
->>> summarize_list(elem.findall("*"))
-['tag', 'tag', 'section']
->>> summarize_list(elem.findall(".//tag"))
-['tag', 'tag', 'tag']
->>> summarize_list(elem.findall("section/tag"))
-['tag']
->>> summarize_list(elem.findall("section//tag"))
-['tag']
->>> summarize_list(elem.findall("section/*"))
-['tag']
->>> summarize_list(elem.findall("section//*"))
-['tag']
->>> summarize_list(elem.findall("section/.//*"))
-['tag']
->>> summarize_list(elem.findall("*/*"))
-['tag']
->>> summarize_list(elem.findall("*//*"))
-['tag']
->>> summarize_list(elem.findall("*/tag"))
-['tag']
->>> summarize_list(elem.findall("*/./tag"))
-['tag']
->>> summarize_list(elem.findall("./tag"))
-['tag', 'tag']
->>> summarize_list(elem.findall(".//tag"))
-['tag', 'tag', 'tag']
->>> summarize_list(elem.findall("././tag"))
-['tag', 'tag']
->>> summarize_list(elem.findall(".//tag[@class]"))
-['tag', 'tag', 'tag']
->>> summarize_list(elem.findall(".//tag[@class='a']"))
-['tag']
->>> summarize_list(elem.findall(".//tag[@class='b']"))
-['tag', 'tag']
->>> summarize_list(elem.findall(".//tag[@id]"))
-['tag']
->>> summarize_list(elem.findall(".//section[tag]"))
-['section']
->>> summarize_list(elem.findall(".//section[element]"))
-[]
->>> summarize_list(elem.findall("../tag"))
-[]
->>> summarize_list(elem.findall("section/../tag"))
-['tag', 'tag']
->>> summarize_list(ElementTree.ElementTree(elem).findall("./tag"))
-['tag', 'tag']
-

FIXME: ET's Path module handles this case incorrectly; this gives -a warning in 1.3, and the behaviour will be modified in 1.4.

-
->>> summarize_list(ElementTree.ElementTree(elem).findall("/tag"))
-['tag', 'tag']
-
-
-
-
- -
- -
- - -
-

bad_find() -

-
source code  -
- -

Check bad or unsupported path expressions.

-
->>> elem = SAMPLE_XML
->>> elem.findall("/tag")
-Traceback (most recent call last):
-SyntaxError: cannot use absolute path on element
-

# this is supported in ET 1.3: -#>>> elem.findall("section//") -#Traceback (most recent call last): -#SyntaxError: invalid path

-
-
-
-
- -
- -
- - -
-

parsefile() -

-
source code  -
- -
-

Test parsing from file.

-
->>> tree = ElementTree.parse("samples/simple.xml")
->>> normalize_crlf(tree)
->>> tree.write(stdout())
-<root>
-   <element key="value">text</element>
-   <element>text</element>tail
-   <empty-element/>
-</root>
->>> tree = ElementTree.parse("samples/simple-ns.xml")
->>> normalize_crlf(tree)
->>> tree.write(stdout())
-<root xmlns="http://namespace/">
-   <element key="value">text</element>
-   <element>text</element>tail
-   <empty-element/>
-</root>
-
-

## <ns0:root xmlns:ns0="http://namespace/"> -## <ns0:element key="value">text</ns0:element> -## <ns0:element>text</ns0:element>tail -## <ns0:empty-element/> -## </ns0:root>

-
-
-
-
- -
- -
- - -
-

parseliteral() -

-
source code  -
- -
-
->>> element = ElementTree.XML("<html><body>text</body></html>")
->>> ElementTree.ElementTree(element).write(stdout())
-<html><body>text</body></html>
->>> element = ElementTree.fromstring("<html><body>text</body></html>")
->>> ElementTree.ElementTree(element).write(stdout())
-<html><body>text</body></html>
-
-

## >>> sequence = ["<html><body>", "text</bo", "dy></html>"] -## >>> element = ElementTree.fromstringlist(sequence) -## >>> ElementTree.ElementTree(element).write(stdout()) -## <html><body>text</body></html>

-
-
->>> print(repr(ElementTree.tostring(element)).lstrip('b'))
-'<html><body>text</body></html>'
-
-

# looks different in lxml -# >>> print(ElementTree.tostring(element, "ascii")) -# <?xml version='1.0' encoding='ascii'?> -# <html><body>text</body></html>

-
-
->>> _, ids = ElementTree.XMLID("<html><body>text</body></html>")
->>> len(ids)
-0
->>> _, ids = ElementTree.XMLID("<html><body id='body'>text</body></html>")
->>> len(ids)
-1
->>> ids["body"].tag
-'body'
-
-
-
-
-
- -
- -
- - -
-

namespace() -

-
source code  -
- -

Test namespace issues.

-
    -
  1. xml namespace
  2. -
-
->>> elem = ElementTree.XML("<tag xml:lang='en' />")
->>> serialize(elem) # 1.1
-'<tag xml:lang="en"/>'
-
    -
  1. other "well-known" namespaces
  2. -
-
->>> elem = ElementTree.XML("<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' />")
->>> serialize(elem) # 2.1
-'<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>'
-
->>> elem = ElementTree.XML("<html:html xmlns:html='http://www.w3.org/1999/xhtml' />")
->>> serialize(elem) # 2.2
-'<html:html xmlns:html="http://www.w3.org/1999/xhtml"/>'
-
->>> elem = ElementTree.XML("<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope' />")
->>> serialize(elem) # 2.3
-'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope"/>'
-
    -
  1. unknown namespaces
  2. -
-
-
-
-
- -
- -
- - -
-

qname() -

-
source code  -
- -
-

Test QName handling.

-
    -
  1. decorated tags
  2. -
-
->>> elem = ElementTree.Element("{uri}tag")
->>> serialize(elem) # 1.1
-'<ns0:tag xmlns:ns0="uri"/>'
->>> elem = ElementTree.Element(ElementTree.QName("{uri}tag"))
->>> serialize(elem) # 1.2
-'<ns0:tag xmlns:ns0="uri"/>'
->>> elem = ElementTree.Element(ElementTree.QName("uri", "tag"))
->>> serialize(elem) # 1.3
-'<ns0:tag xmlns:ns0="uri"/>'
-
-

# ns/attribute order ...

-

## 2) decorated attributes

-

## >>> elem.clear() -## >>> elem.attrib["{uri}key"] = "value" -## >>> serialize(elem) # 2.1 -## '<ns0:tag ns0:key="value" xmlns:ns0="uri"/>'

-

## >>> elem.clear() -## >>> elem.attrib[ElementTree.QName("{uri}key")] = "value" -## >>> serialize(elem) # 2.2 -## '<ns0:tag ns0:key="value" xmlns:ns0="uri"/>'

-

## 3) decorated values are not converted by default, but the -## QName wrapper can be used for values

-

## >>> elem.clear() -## >>> elem.attrib["{uri}key"] = "{uri}value" -## >>> serialize(elem) # 3.1 -## '<ns0:tag ns0:key="{uri}value" xmlns:ns0="uri"/>'

-

## >>> elem.clear() -## >>> elem.attrib["{uri}key"] = ElementTree.QName("{uri}value") -## >>> serialize(elem) # 3.2 -## '<ns0:tag ns0:key="ns0:value" xmlns:ns0="uri"/>'

-

## >>> elem.clear() -## >>> subelem = ElementTree.Element("tag") -## >>> subelem.attrib["{uri1}key"] = ElementTree.QName("{uri2}value") -## >>> elem.append(subelem) -## >>> elem.append(subelem) -## >>> serialize(elem) # 3.3 -## '<ns0:tag xmlns:ns0="uri"><tag ns1:key="ns2:value" xmlns:ns1="uri1" xmlns:ns2="uri2"/><tag ns1:key="ns2:value" xmlns:ns1="uri1" xmlns:ns2="uri2"/></ns0:tag>'

-
-
-
-
- -
- -
- - -
-

xinclude() -

-
source code  -
- -
-

Basic inclusion example (XInclude C.1)

-
->>> document = xinclude_loader("C1.xml")
->>> ElementInclude.include(document, xinclude_loader)
->>> print(serialize(document)) # C1
-<document>
-  <p>120 Mz is adequate for an average home user.</p>
-  <disclaimer>
-  <p>The opinions represented herein represent those of the individual
-  and should not be interpreted as official policy endorsed by this
-  organization.</p>
-</disclaimer>
-</document>
-

Textual inclusion example (XInclude C.2)

-
->>> document = xinclude_loader("C2.xml")
->>> ElementInclude.include(document, xinclude_loader)
->>> print(serialize(document)) # C2
-<document>
-  <p>This document has been accessed
-  324387 times.</p>
-</document>
-

Textual inclusion of XML example (XInclude C.3)

-
->>> document = xinclude_loader("C3.xml")
->>> ElementInclude.include(document, xinclude_loader)
->>> print(serialize(document)) # C3
-<document>
-  <p>The following is the source of the "data.xml" resource:</p>
-  <example>&lt;?xml version='1.0'?&gt;
-&lt;data&gt;
-  &lt;item&gt;&lt;![CDATA[Brooks &amp; Shields]]&gt;&lt;/item&gt;
-&lt;/data&gt;
-</example>
-</document>
-
-

## Fallback example (XInclude C.5) -## Note! Fallback support is not yet implemented

-

## >>> document = xinclude_loader("C5.xml") -## >>> ElementInclude.include(document, xinclude_loader) -## Traceback (most recent call last): -## IOError: resource not found -## >>> # print(serialize(document)) # C5

-
-
-
-
-
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

SAMPLE_XML

- -
-
-
-
Value:
-
-ElementTree.XML("""
-<body>
-  <tag class='a'>text</tag>
-  <tag class='b' />
-   <section>
-    <tag class='b' id='inner'>subtext</tag>
-   </section>
-</body>
-...
-
-
-
-
-
- -
- -
-

ENTITY_XML

- -
-
-
-
Value:
-
-'''<!DOCTYPE points [
-<!ENTITY % user-entities SYSTEM \'user-entities.xml\'>
-%user-entities;
-]>
-<document>&entity;</document>
-'''
-
-
-
-
-
- -
- -
-

XINCLUDE

- -
-
-
-
Value:
-
-{'C1.xml': '''<?xml version=\'1.0\'?>
-<document xmlns:xi="http://www.w3.org/2001/XInclude">
-  <p>120 Mz is adequate for an average home user.</p>
-  <xi:include href="disclaimer.xml"/>
-</document>
-''',
- 'C2.xml': '''<?xml version=\'1.0\'?>
-<document xmlns:xi="http://www.w3.org/2001/XInclude">
-...
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.selftest-pysrc.html b/doc/html/api/lxml.tests.selftest-pysrc.html deleted file mode 100644 index afb5d22..0000000 --- a/doc/html/api/lxml.tests.selftest-pysrc.html +++ /dev/null @@ -1,1536 +0,0 @@ - - - - - lxml.tests.selftest - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module selftest - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.selftest

-
-   1  # $Id: selftest.py 3276 2007-09-12 06:52:30Z fredrik $ 
-   2  # -*- coding: iso-8859-1 -*- 
-   3  # elementtree selftest program 
-   4   
-   5  # this test script uses Python's "doctest" module to check that the 
-   6  # *test script* works as expected. 
-   7   
-   8  # TODO: add more elementtree method tests 
-   9  # TODO: add xml/html parsing tests 
-  10  # TODO: etc 
-  11   
-  12  import re, sys 
-  13   
-
14 -def stdout(): -
15 if sys.version_info[0] < 3: - 16 return sys.stdout - 17 class bytes_stdout(object): - 18 def write(self, data): - 19 if isinstance(data, bytes): - 20 data = data.decode('ISO8859-1') - 21 sys.stdout.write(data) -
22 return bytes_stdout() - 23 - 24 try: - 25 from StringIO import StringIO as BytesIO - 26 except ImportError: - 27 from io import BytesIO - 28 - 29 from lxml import etree as ElementTree - 30 from lxml import _elementpath as ElementPath - 31 from lxml import ElementInclude - 32 ET = ElementTree - 33 - 34 #from elementtree import ElementTree - 35 #from elementtree import ElementPath - 36 #from elementtree import ElementInclude - 37 #from elementtree import HTMLTreeBuilder - 38 #from elementtree import SimpleXMLWriter - 39 -
40 -def fix_compatibility(xml_data): -
41 xml_data = re.sub(r'\s*xmlns:[a-z0-9]+="http://www.w3.org/2001/XInclude"', '', xml_data) - 42 xml_data = xml_data.replace(' />', '/>') - 43 if xml_data[-1:] == '\n': - 44 xml_data = xml_data[:-1] - 45 return xml_data -
46 -
47 -def serialize(elem, **options): -
48 file = BytesIO() - 49 tree = ElementTree.ElementTree(elem) - 50 tree.write(file, **options) - 51 if sys.version_info[0] < 3: - 52 try: - 53 encoding = options["encoding"] - 54 except KeyError: - 55 encoding = "utf-8" - 56 else: - 57 encoding = 'ISO8859-1' - 58 result = fix_compatibility(file.getvalue().decode(encoding)) - 59 if sys.version_info[0] < 3: - 60 result = result.encode(encoding) - 61 return result -
62 -
63 -def summarize(elem): -
64 return elem.tag -
65 -
66 -def summarize_list(seq): -
67 return list(map(summarize, seq)) -
68 -
69 -def normalize_crlf(tree): -
70 for elem in tree.getiterator(): - 71 if elem.text: elem.text = elem.text.replace("\r\n", "\n") - 72 if elem.tail: elem.tail = elem.tail.replace("\r\n", "\n") -
73 - 74 SAMPLE_XML = ElementTree.XML(""" - 75 <body> - 76 <tag class='a'>text</tag> - 77 <tag class='b' /> - 78 <section> - 79 <tag class='b' id='inner'>subtext</tag> - 80 </section> - 81 </body> - 82 """) - 83 - 84 # - 85 # interface tests - 86 -
87 -def check_string(string): -
88 len(string) - 89 for char in string: - 90 if len(char) != 1: - 91 print("expected one-character string, got %r" % char) - 92 new_string = string + "" - 93 new_string = string + " " - 94 string[:0] -
95 -
96 -def check_string_or_none(value): -
97 if value is None: - 98 return - 99 return check_string(value) -
100 -
101 -def check_mapping(mapping): -
102 len(mapping) - 103 keys = mapping.keys() - 104 items = mapping.items() - 105 for key in keys: - 106 item = mapping[key] - 107 mapping["key"] = "value" - 108 if mapping["key"] != "value": - 109 print("expected value string, got %r" % mapping["key"]) -
110 -
111 -def check_element(element): -
112 if not hasattr(element, "tag"): - 113 print("no tag member") - 114 if not hasattr(element, "attrib"): - 115 print("no attrib member") - 116 if not hasattr(element, "text"): - 117 print("no text member") - 118 if not hasattr(element, "tail"): - 119 print("no tail member") - 120 check_string(element.tag) - 121 check_mapping(element.attrib) - 122 check_string_or_none(element.text) - 123 check_string_or_none(element.tail) - 124 for elem in element: - 125 check_element(elem) -
126 -
127 -def check_element_tree(tree): -
128 check_element(tree.getroot()) -
129 - 130 # -------------------------------------------------------------------- - 131 # element tree tests - 132 -
133 -def sanity(): -
134 """ - 135 >>> from elementtree.ElementTree import * - 136 >>> from elementtree.ElementInclude import * - 137 >>> from elementtree.ElementPath import * - 138 >>> from elementtree.HTMLTreeBuilder import * - 139 >>> from elementtree.SimpleXMLWriter import * - 140 >>> from elementtree.TidyTools import * - 141 """ -
142 - 143 # doesn't work with lxml.etree - 144 del sanity - 145 -
146 -def version(): -
147 """ - 148 >>> ElementTree.VERSION - 149 '1.3a2' - 150 """ -
151 - 152 # doesn't work with lxml.etree - 153 del version - 154 -
155 -def interface(): -
156 """ - 157 Test element tree interface. - 158 - 159 >>> element = ElementTree.Element("tag") - 160 >>> check_element(element) - 161 >>> tree = ElementTree.ElementTree(element) - 162 >>> check_element_tree(tree) - 163 """ -
164 -
165 -def simpleops(): -
166 """ - 167 >>> elem = ElementTree.XML("<body><tag/></body>") - 168 >>> serialize(elem) - 169 '<body><tag/></body>' - 170 >>> e = ElementTree.Element("tag2") - 171 >>> elem.append(e) - 172 >>> serialize(elem) - 173 '<body><tag/><tag2/></body>' - 174 >>> elem.remove(e) - 175 >>> serialize(elem) - 176 '<body><tag/></body>' - 177 >>> elem.insert(0, e) - 178 >>> serialize(elem) - 179 '<body><tag2/><tag/></body>' - 180 >>> elem.remove(e) - 181 >>> elem.extend([e]) - 182 >>> serialize(elem) - 183 '<body><tag/><tag2/></body>' - 184 >>> elem.remove(e) - 185 """ -
186 -
187 -def simplefind(): -
188 """ - 189 Test find methods using the elementpath fallback. - 190 - 191 >>> CurrentElementPath = ElementTree.ElementPath - 192 >>> ElementTree.ElementPath = ElementTree._SimpleElementPath() - 193 >>> elem = SAMPLE_XML - 194 >>> elem.find("tag").tag - 195 'tag' - 196 >>> ElementTree.ElementTree(elem).find("tag").tag - 197 'tag' - 198 >>> elem.findtext("tag") - 199 'text' - 200 >>> elem.findtext("tog") - 201 >>> elem.findtext("tog", "default") - 202 'default' - 203 >>> ElementTree.ElementTree(elem).findtext("tag") - 204 'text' - 205 >>> summarize_list(elem.findall("tag")) - 206 ['tag', 'tag'] - 207 >>> summarize_list(elem.findall(".//tag")) - 208 ['tag', 'tag', 'tag'] - 209 - 210 Path syntax doesn't work in this case. - 211 - 212 >>> elem.find("section/tag") - 213 >>> elem.findtext("section/tag") - 214 >>> elem.findall("section/tag") - 215 [] - 216 - 217 >>> ElementTree.ElementPath = CurrentElementPath - 218 """ -
219 - 220 # doesn't work with lxml.etree - 221 del simplefind - 222 -
223 -def find(): -
224 """ - 225 Test find methods (including xpath syntax). - 226 - 227 >>> elem = SAMPLE_XML - 228 >>> elem.find("tag").tag - 229 'tag' - 230 >>> ElementTree.ElementTree(elem).find("tag").tag - 231 'tag' - 232 >>> elem.find("section/tag").tag - 233 'tag' - 234 >>> ElementTree.ElementTree(elem).find("section/tag").tag - 235 'tag' - 236 >>> elem.findtext("tag") - 237 'text' - 238 >>> elem.findtext("tog") - 239 >>> elem.findtext("tog", "default") - 240 'default' - 241 >>> ElementTree.ElementTree(elem).findtext("tag") - 242 'text' - 243 >>> elem.findtext("section/tag") - 244 'subtext' - 245 >>> ElementTree.ElementTree(elem).findtext("section/tag") - 246 'subtext' - 247 >>> summarize_list(elem.findall("tag")) - 248 ['tag', 'tag'] - 249 >>> summarize_list(elem.findall("*")) - 250 ['tag', 'tag', 'section'] - 251 >>> summarize_list(elem.findall(".//tag")) - 252 ['tag', 'tag', 'tag'] - 253 >>> summarize_list(elem.findall("section/tag")) - 254 ['tag'] - 255 >>> summarize_list(elem.findall("section//tag")) - 256 ['tag'] - 257 >>> summarize_list(elem.findall("section/*")) - 258 ['tag'] - 259 >>> summarize_list(elem.findall("section//*")) - 260 ['tag'] - 261 >>> summarize_list(elem.findall("section/.//*")) - 262 ['tag'] - 263 >>> summarize_list(elem.findall("*/*")) - 264 ['tag'] - 265 >>> summarize_list(elem.findall("*//*")) - 266 ['tag'] - 267 >>> summarize_list(elem.findall("*/tag")) - 268 ['tag'] - 269 >>> summarize_list(elem.findall("*/./tag")) - 270 ['tag'] - 271 >>> summarize_list(elem.findall("./tag")) - 272 ['tag', 'tag'] - 273 >>> summarize_list(elem.findall(".//tag")) - 274 ['tag', 'tag', 'tag'] - 275 >>> summarize_list(elem.findall("././tag")) - 276 ['tag', 'tag'] - 277 >>> summarize_list(elem.findall(".//tag[@class]")) - 278 ['tag', 'tag', 'tag'] - 279 >>> summarize_list(elem.findall(".//tag[@class='a']")) - 280 ['tag'] - 281 >>> summarize_list(elem.findall(".//tag[@class='b']")) - 282 ['tag', 'tag'] - 283 >>> summarize_list(elem.findall(".//tag[@id]")) - 284 ['tag'] - 285 >>> summarize_list(elem.findall(".//section[tag]")) - 286 ['section'] - 287 >>> summarize_list(elem.findall(".//section[element]")) - 288 [] - 289 >>> summarize_list(elem.findall("../tag")) - 290 [] - 291 >>> summarize_list(elem.findall("section/../tag")) - 292 ['tag', 'tag'] - 293 >>> summarize_list(ElementTree.ElementTree(elem).findall("./tag")) - 294 ['tag', 'tag'] - 295 - 296 FIXME: ET's Path module handles this case incorrectly; this gives - 297 a warning in 1.3, and the behaviour will be modified in 1.4. - 298 - 299 >>> summarize_list(ElementTree.ElementTree(elem).findall("/tag")) - 300 ['tag', 'tag'] - 301 """ -
302 -
303 -def bad_find(): -
304 """ - 305 Check bad or unsupported path expressions. - 306 - 307 >>> elem = SAMPLE_XML - 308 >>> elem.findall("/tag") - 309 Traceback (most recent call last): - 310 SyntaxError: cannot use absolute path on element - 311 - 312 # this is supported in ET 1.3: - 313 #>>> elem.findall("section//") - 314 #Traceback (most recent call last): - 315 #SyntaxError: invalid path - 316 """ -
317 -
318 -def parsefile(): -
319 """ - 320 Test parsing from file. - 321 - 322 >>> tree = ElementTree.parse("samples/simple.xml") - 323 >>> normalize_crlf(tree) - 324 >>> tree.write(stdout()) - 325 <root> - 326 <element key="value">text</element> - 327 <element>text</element>tail - 328 <empty-element/> - 329 </root> - 330 >>> tree = ElementTree.parse("samples/simple-ns.xml") - 331 >>> normalize_crlf(tree) - 332 >>> tree.write(stdout()) - 333 <root xmlns="http://namespace/"> - 334 <element key="value">text</element> - 335 <element>text</element>tail - 336 <empty-element/> - 337 </root> - 338 - 339 ## <ns0:root xmlns:ns0="http://namespace/"> - 340 ## <ns0:element key="value">text</ns0:element> - 341 ## <ns0:element>text</ns0:element>tail - 342 ## <ns0:empty-element/> - 343 ## </ns0:root> - 344 """ -
345 -
346 -def parsehtml(): -
347 """ - 348 Test HTML parsing. - 349 - 350 >>> # p = HTMLTreeBuilder.TreeBuilder() - 351 >>> p = ElementTree.HTMLParser() - 352 >>> p.feed("<p><p>spam<b>egg</b></p>") - 353 >>> serialize(p.close()) - 354 '<p>spam<b>egg</b></p>' - 355 """ -
356 - 357 # doesn't work with lxml.etree - 358 del parsehtml - 359 -
360 -def parseliteral(): -
361 r""" - 362 >>> element = ElementTree.XML("<html><body>text</body></html>") - 363 >>> ElementTree.ElementTree(element).write(stdout()) - 364 <html><body>text</body></html> - 365 >>> element = ElementTree.fromstring("<html><body>text</body></html>") - 366 >>> ElementTree.ElementTree(element).write(stdout()) - 367 <html><body>text</body></html> - 368 - 369 ## >>> sequence = ["<html><body>", "text</bo", "dy></html>"] - 370 ## >>> element = ElementTree.fromstringlist(sequence) - 371 ## >>> ElementTree.ElementTree(element).write(stdout()) - 372 ## <html><body>text</body></html> - 373 - 374 >>> print(repr(ElementTree.tostring(element)).lstrip('b')) - 375 '<html><body>text</body></html>' - 376 - 377 # looks different in lxml - 378 # >>> print(ElementTree.tostring(element, "ascii")) - 379 # <?xml version='1.0' encoding='ascii'?> - 380 # <html><body>text</body></html> - 381 - 382 >>> _, ids = ElementTree.XMLID("<html><body>text</body></html>") - 383 >>> len(ids) - 384 0 - 385 >>> _, ids = ElementTree.XMLID("<html><body id='body'>text</body></html>") - 386 >>> len(ids) - 387 1 - 388 >>> ids["body"].tag - 389 'body' - 390 """ -
391 -
392 -def simpleparsefile(): -
393 """ - 394 Test the xmllib-based parser. - 395 - 396 >>> from elementtree import SimpleXMLTreeBuilder - 397 >>> parser = SimpleXMLTreeBuilder.TreeBuilder() - 398 >>> tree = ElementTree.parse("samples/simple.xml", parser) - 399 >>> normalize_crlf(tree) - 400 >>> tree.write(sys.stdout) - 401 <root> - 402 <element key="value">text</element> - 403 <element>text</element>tail - 404 <empty-element /> - 405 </root> - 406 """ -
407 - 408 # doesn't work with lxml.etree - 409 del simpleparsefile - 410 -
411 -def iterparse(): -
412 """ - 413 Test iterparse interface. - 414 - 415 >>> iterparse = ElementTree.iterparse - 416 - 417 >>> context = iterparse("samples/simple.xml") - 418 >>> for action, elem in context: - 419 ... print("%s %s" % (action, elem.tag)) - 420 end element - 421 end element - 422 end empty-element - 423 end root - 424 >>> context.root.tag - 425 'root' - 426 - 427 >>> context = iterparse("samples/simple-ns.xml") - 428 >>> for action, elem in context: - 429 ... print("%s %s" % (action, elem.tag)) - 430 end {http://namespace/}element - 431 end {http://namespace/}element - 432 end {http://namespace/}empty-element - 433 end {http://namespace/}root - 434 - 435 >>> events = () - 436 >>> context = iterparse("samples/simple.xml", events) - 437 >>> for action, elem in context: - 438 ... print("%s %s" % (action, elem.tag)) - 439 - 440 >>> events = () - 441 >>> context = iterparse("samples/simple.xml", events=events) - 442 >>> for action, elem in context: - 443 ... print("%s %s" % (action, elem.tag)) - 444 - 445 >>> events = ("start", "end") - 446 >>> context = iterparse("samples/simple.xml", events) - 447 >>> for action, elem in context: - 448 ... print("%s %s" % (action, elem.tag)) - 449 start root - 450 start element - 451 end element - 452 start element - 453 end element - 454 start empty-element - 455 end empty-element - 456 end root - 457 - 458 >>> events = ("start", "end", "start-ns", "end-ns") - 459 >>> context = iterparse("samples/simple-ns.xml", events) - 460 >>> for action, elem in context: - 461 ... if action in ("start", "end"): - 462 ... print("%s %s" % (action, elem.tag)) - 463 ... else: - 464 ... print("%s %s" % (action, elem)) - 465 start-ns ('', 'http://namespace/') - 466 start {http://namespace/}root - 467 start {http://namespace/}element - 468 end {http://namespace/}element - 469 start {http://namespace/}element - 470 end {http://namespace/}element - 471 start {http://namespace/}empty-element - 472 end {http://namespace/}empty-element - 473 end {http://namespace/}root - 474 end-ns None - 475 - 476 """ -
477 -
478 -def fancyparsefile(): -
479 """ - 480 Test the "fancy" parser. - 481 - 482 Sanity check. - 483 >>> from elementtree import XMLTreeBuilder - 484 >>> parser = XMLTreeBuilder.FancyTreeBuilder() - 485 >>> tree = ElementTree.parse("samples/simple.xml", parser) - 486 >>> normalize_crlf(tree) - 487 >>> tree.write(sys.stdout) - 488 <root> - 489 <element key="value">text</element> - 490 <element>text</element>tail - 491 <empty-element /> - 492 </root> - 493 - 494 Callback check. - 495 >>> class MyFancyParser(XMLTreeBuilder.FancyTreeBuilder): - 496 ... def start(self, elem): - 497 ... print("START %s" % elem.tag) - 498 ... def end(self, elem): - 499 ... print("END %s" % elem.tag) - 500 >>> parser = MyFancyParser() - 501 >>> tree = ElementTree.parse("samples/simple.xml", parser) - 502 START root - 503 START element - 504 END element - 505 START element - 506 END element - 507 START empty-element - 508 END empty-element - 509 END root - 510 """ -
511 - 512 # doesn't work with lxml.etree - 513 del fancyparsefile - 514 -
515 -def writefile(): -
516 """ - 517 >>> elem = ElementTree.Element("tag") - 518 >>> elem.text = "text" - 519 >>> serialize(elem) - 520 '<tag>text</tag>' - 521 >>> ElementTree.SubElement(elem, "subtag").text = "subtext" - 522 >>> serialize(elem) - 523 '<tag>text<subtag>subtext</subtag></tag>' - 524 - 525 ## Test tag suppression - 526 ## >>> elem.tag = None - 527 ## >>> serialize(elem) - 528 ## 'text<subtag>subtext</subtag>' - 529 """ -
530 -
531 -def writestring(): -
532 """ - 533 >>> elem = ElementTree.XML("<html><body>text</body></html>") - 534 >>> print(repr(ElementTree.tostring(elem)).lstrip('b')) - 535 '<html><body>text</body></html>' - 536 >>> elem = ElementTree.fromstring("<html><body>text</body></html>") - 537 >>> print(repr(ElementTree.tostring(elem)).lstrip('b')) - 538 '<html><body>text</body></html>' - 539 """ -
540 -
541 -def encoding(): -
542 r""" - 543 Test encoding issues. - 544 - 545 >>> elem = ElementTree.Element("tag") - 546 >>> elem.text = u'abc' - 547 >>> serialize(elem) - 548 '<tag>abc</tag>' - 549 >>> serialize(elem, encoding="utf-8") - 550 '<tag>abc</tag>' - 551 >>> serialize(elem, encoding="us-ascii") - 552 '<tag>abc</tag>' - 553 >>> serialize(elem, encoding="iso-8859-1").lower() - 554 "<?xml version='1.0' encoding='iso-8859-1'?>\n<tag>abc</tag>" - 555 - 556 >>> elem.text = "<&\"\'>" - 557 >>> serialize(elem) - 558 '<tag>&lt;&amp;"\'&gt;</tag>' - 559 >>> serialize(elem, encoding="utf-8") - 560 '<tag>&lt;&amp;"\'&gt;</tag>' - 561 >>> serialize(elem, encoding="us-ascii") # cdata characters - 562 '<tag>&lt;&amp;"\'&gt;</tag>' - 563 >>> serialize(elem, encoding="iso-8859-1").lower() - 564 '<?xml version=\'1.0\' encoding=\'iso-8859-1\'?>\n<tag>&lt;&amp;"\'&gt;</tag>' - 565 - 566 >>> elem.attrib["key"] = "<&\"\'>" - 567 >>> elem.text = None - 568 >>> serialize(elem) - 569 '<tag key="&lt;&amp;&quot;\'&gt;"/>' - 570 >>> serialize(elem, encoding="utf-8") - 571 '<tag key="&lt;&amp;&quot;\'&gt;"/>' - 572 >>> serialize(elem, encoding="us-ascii") - 573 '<tag key="&lt;&amp;&quot;\'&gt;"/>' - 574 >>> serialize(elem, encoding="iso-8859-1").lower() - 575 '<?xml version=\'1.0\' encoding=\'iso-8859-1\'?>\n<tag key="&lt;&amp;&quot;\'&gt;"/>' - 576 - 577 >>> elem.text = u'\xe5\xf6\xf6<>' - 578 >>> elem.attrib.clear() - 579 >>> serialize(elem) - 580 '<tag>&#229;&#246;&#246;&lt;&gt;</tag>' - 581 >>> serialize(elem, encoding="utf-8") - 582 '<tag>\xc3\xa5\xc3\xb6\xc3\xb6&lt;&gt;</tag>' - 583 >>> serialize(elem, encoding="us-ascii") - 584 '<tag>&#229;&#246;&#246;&lt;&gt;</tag>' - 585 >>> serialize(elem, encoding="iso-8859-1").lower() - 586 "<?xml version='1.0' encoding='iso-8859-1'?>\n<tag>\xe5\xf6\xf6&lt;&gt;</tag>" - 587 - 588 >>> elem.attrib["key"] = u'\xe5\xf6\xf6<>' - 589 >>> elem.text = None - 590 >>> serialize(elem) - 591 '<tag key="&#229;&#246;&#246;&lt;&gt;"/>' - 592 >>> serialize(elem, encoding="utf-8") - 593 '<tag key="\xc3\xa5\xc3\xb6\xc3\xb6&lt;&gt;"/>' - 594 >>> serialize(elem, encoding="us-ascii") - 595 '<tag key="&#229;&#246;&#246;&lt;&gt;"/>' - 596 >>> serialize(elem, encoding="iso-8859-1").lower() - 597 '<?xml version=\'1.0\' encoding=\'iso-8859-1\'?>\n<tag key="\xe5\xf6\xf6&lt;&gt;"/>' - 598 """ -
599 - 600 if sys.version_info[0] >= 3: - 601 encoding.__doc__ = encoding.__doc__.replace("u'", "'") - 602 -
603 -def methods(): -
604 r""" - 605 Test serialization methods. - 606 - 607 >>> e = ET.XML("<html><link/><script>1 &lt; 2</script></html>") - 608 >>> e.tail = "\n" - 609 >>> serialize(e) - 610 '<html><link /><script>1 &lt; 2</script></html>\n' - 611 >>> serialize(e, method=None) - 612 '<html><link /><script>1 &lt; 2</script></html>\n' - 613 >>> serialize(e, method="xml") - 614 '<html><link /><script>1 &lt; 2</script></html>\n' - 615 >>> serialize(e, method="html") - 616 '<html><link><script>1 < 2</script></html>\n' - 617 >>> serialize(e, method="text") - 618 '1 < 2\n' - 619 - 620 """ -
621 - 622 # doesn't work with lxml.etree - 623 del methods - 624 -
625 -def iterators(): -
626 """ - 627 Test iterators. - 628 - 629 >>> e = ET.XML("<html><body>this is a <i>paragraph</i>.</body>..</html>") - 630 >>> summarize_list(e.iter()) - 631 ['html', 'body', 'i'] - 632 >>> summarize_list(e.find("body").iter()) - 633 ['body', 'i'] - 634 >>> "".join(e.itertext()) - 635 'this is a paragraph...' - 636 >>> "".join(e.find("body").itertext()) - 637 'this is a paragraph.' - 638 """ -
639 - 640 ENTITY_XML = """\ - 641 <!DOCTYPE points [ - 642 <!ENTITY % user-entities SYSTEM 'user-entities.xml'> - 643 %user-entities; - 644 ]> - 645 <document>&entity;</document> - 646 """ - 647 -
648 -def entity(): -
649 """ - 650 Test entity handling. - 651 - 652 1) bad entities - 653 - 654 >>> ElementTree.XML("<document>&entity;</document>") - 655 Traceback (most recent call last): - 656 ExpatError: undefined entity: line 1, column 10 - 657 - 658 >>> ElementTree.XML(ENTITY_XML) - 659 Traceback (most recent call last): - 660 ExpatError: undefined entity &entity;: line 5, column 10 - 661 - 662 (add more tests here) - 663 - 664 """ -
665 - 666 # doesn't work with lxml.etree - 667 del entity - 668 -
669 -def error(xml): -
670 """ - 671 Test error handling. - 672 - 673 >>> error("foo").position - 674 (1, 0) - 675 >>> error("<tag>&foo;</tag>").position - 676 (1, 5) - 677 >>> error("foobar<").position - 678 (1, 6) - 679 - 680 """ - 681 try: - 682 ET.XML(xml) - 683 except ET.ParseError: - 684 return sys.exc_value -
685 - 686 # doesn't work with lxml.etree -> different positions - 687 del error - 688 -
689 -def namespace(): -
690 """ - 691 Test namespace issues. - 692 - 693 1) xml namespace - 694 - 695 >>> elem = ElementTree.XML("<tag xml:lang='en' />") - 696 >>> serialize(elem) # 1.1 - 697 '<tag xml:lang="en"/>' - 698 - 699 2) other "well-known" namespaces - 700 - 701 >>> elem = ElementTree.XML("<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' />") - 702 >>> serialize(elem) # 2.1 - 703 '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>' - 704 - 705 >>> elem = ElementTree.XML("<html:html xmlns:html='http://www.w3.org/1999/xhtml' />") - 706 >>> serialize(elem) # 2.2 - 707 '<html:html xmlns:html="http://www.w3.org/1999/xhtml"/>' - 708 - 709 >>> elem = ElementTree.XML("<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope' />") - 710 >>> serialize(elem) # 2.3 - 711 '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope"/>' - 712 - 713 3) unknown namespaces - 714 - 715 """ -
716 -
717 -def qname(): -
718 """ - 719 Test QName handling. - 720 - 721 1) decorated tags - 722 - 723 >>> elem = ElementTree.Element("{uri}tag") - 724 >>> serialize(elem) # 1.1 - 725 '<ns0:tag xmlns:ns0="uri"/>' - 726 >>> elem = ElementTree.Element(ElementTree.QName("{uri}tag")) - 727 >>> serialize(elem) # 1.2 - 728 '<ns0:tag xmlns:ns0="uri"/>' - 729 >>> elem = ElementTree.Element(ElementTree.QName("uri", "tag")) - 730 >>> serialize(elem) # 1.3 - 731 '<ns0:tag xmlns:ns0="uri"/>' - 732 - 733 # ns/attribute order ... - 734 - 735 ## 2) decorated attributes - 736 - 737 ## >>> elem.clear() - 738 ## >>> elem.attrib["{uri}key"] = "value" - 739 ## >>> serialize(elem) # 2.1 - 740 ## '<ns0:tag ns0:key="value" xmlns:ns0="uri"/>' - 741 - 742 ## >>> elem.clear() - 743 ## >>> elem.attrib[ElementTree.QName("{uri}key")] = "value" - 744 ## >>> serialize(elem) # 2.2 - 745 ## '<ns0:tag ns0:key="value" xmlns:ns0="uri"/>' - 746 - 747 ## 3) decorated values are not converted by default, but the - 748 ## QName wrapper can be used for values - 749 - 750 ## >>> elem.clear() - 751 ## >>> elem.attrib["{uri}key"] = "{uri}value" - 752 ## >>> serialize(elem) # 3.1 - 753 ## '<ns0:tag ns0:key="{uri}value" xmlns:ns0="uri"/>' - 754 - 755 ## >>> elem.clear() - 756 ## >>> elem.attrib["{uri}key"] = ElementTree.QName("{uri}value") - 757 ## >>> serialize(elem) # 3.2 - 758 ## '<ns0:tag ns0:key="ns0:value" xmlns:ns0="uri"/>' - 759 - 760 ## >>> elem.clear() - 761 ## >>> subelem = ElementTree.Element("tag") - 762 ## >>> subelem.attrib["{uri1}key"] = ElementTree.QName("{uri2}value") - 763 ## >>> elem.append(subelem) - 764 ## >>> elem.append(subelem) - 765 ## >>> serialize(elem) # 3.3 - 766 ## '<ns0:tag xmlns:ns0="uri"><tag ns1:key="ns2:value" xmlns:ns1="uri1" xmlns:ns2="uri2"/><tag ns1:key="ns2:value" xmlns:ns1="uri1" xmlns:ns2="uri2"/></ns0:tag>' - 767 - 768 """ -
769 -
770 -def xpath_tokenizer(p): -
771 """ - 772 Test the XPath tokenizer. - 773 - 774 >>> # tests from the xml specification - 775 >>> xpath_tokenizer("*") - 776 ['*'] - 777 >>> xpath_tokenizer("text()") - 778 ['text', '()'] - 779 >>> xpath_tokenizer("@name") - 780 ['@', 'name'] - 781 >>> xpath_tokenizer("@*") - 782 ['@', '*'] - 783 >>> xpath_tokenizer("para[1]") - 784 ['para', '[', '1', ']'] - 785 >>> xpath_tokenizer("para[last()]") - 786 ['para', '[', 'last', '()', ']'] - 787 >>> xpath_tokenizer("*/para") - 788 ['*', '/', 'para'] - 789 >>> xpath_tokenizer("/doc/chapter[5]/section[2]") - 790 ['/', 'doc', '/', 'chapter', '[', '5', ']', '/', 'section', '[', '2', ']'] - 791 >>> xpath_tokenizer("chapter//para") - 792 ['chapter', '//', 'para'] - 793 >>> xpath_tokenizer("//para") - 794 ['//', 'para'] - 795 >>> xpath_tokenizer("//olist/item") - 796 ['//', 'olist', '/', 'item'] - 797 >>> xpath_tokenizer(".") - 798 ['.'] - 799 >>> xpath_tokenizer(".//para") - 800 ['.', '//', 'para'] - 801 >>> xpath_tokenizer("..") - 802 ['..'] - 803 >>> xpath_tokenizer("../@lang") - 804 ['..', '/', '@', 'lang'] - 805 >>> xpath_tokenizer("chapter[title]") - 806 ['chapter', '[', 'title', ']'] - 807 >>> xpath_tokenizer("employee[@secretary and @assistant]") - 808 ['employee', '[', '@', 'secretary', '', 'and', '', '@', 'assistant', ']'] - 809 - 810 >>> # additional tests - 811 >>> xpath_tokenizer("{http://spam}egg") - 812 ['{http://spam}egg'] - 813 >>> xpath_tokenizer("./spam.egg") - 814 ['.', '/', 'spam.egg'] - 815 >>> xpath_tokenizer(".//{http://spam}egg") - 816 ['.', '//', '{http://spam}egg'] - 817 """ - 818 out = [] - 819 for op, tag in ElementPath.xpath_tokenizer(p): - 820 out.append(op or tag) - 821 return out -
822 - 823 # - 824 # xinclude tests (samples from appendix C of the xinclude specification) - 825 - 826 XINCLUDE = {} - 827 - 828 XINCLUDE["C1.xml"] = """\ - 829 <?xml version='1.0'?> - 830 <document xmlns:xi="http://www.w3.org/2001/XInclude"> - 831 <p>120 Mz is adequate for an average home user.</p> - 832 <xi:include href="disclaimer.xml"/> - 833 </document> - 834 """ - 835 - 836 XINCLUDE["disclaimer.xml"] = """\ - 837 <?xml version='1.0'?> - 838 <disclaimer> - 839 <p>The opinions represented herein represent those of the individual - 840 and should not be interpreted as official policy endorsed by this - 841 organization.</p> - 842 </disclaimer> - 843 """ - 844 - 845 XINCLUDE["C2.xml"] = """\ - 846 <?xml version='1.0'?> - 847 <document xmlns:xi="http://www.w3.org/2001/XInclude"> - 848 <p>This document has been accessed - 849 <xi:include href="count.txt" parse="text"/> times.</p> - 850 </document> - 851 """ - 852 - 853 XINCLUDE["count.txt"] = "324387" - 854 - 855 XINCLUDE["C3.xml"] = """\ - 856 <?xml version='1.0'?> - 857 <document xmlns:xi="http://www.w3.org/2001/XInclude"> - 858 <p>The following is the source of the "data.xml" resource:</p> - 859 <example><xi:include href="data.xml" parse="text"/></example> - 860 </document> - 861 """ - 862 - 863 XINCLUDE["data.xml"] = """\ - 864 <?xml version='1.0'?> - 865 <data> - 866 <item><![CDATA[Brooks & Shields]]></item> - 867 </data> - 868 """ - 869 - 870 XINCLUDE["C5.xml"] = """\ - 871 <?xml version='1.0'?> - 872 <div xmlns:xi="http://www.w3.org/2001/XInclude"> - 873 <xi:include href="example.txt" parse="text"> - 874 <xi:fallback> - 875 <xi:include href="fallback-example.txt" parse="text"> - 876 <xi:fallback><a href="mailto:bob@example.org">Report error</a></xi:fallback> - 877 </xi:include> - 878 </xi:fallback> - 879 </xi:include> - 880 </div> - 881 """ - 882 - 883 XINCLUDE["default.xml"] = """\ - 884 <?xml version='1.0'?> - 885 <document xmlns:xi="http://www.w3.org/2001/XInclude"> - 886 <p>Example.</p> - 887 <xi:include href="samples/simple.xml"/> - 888 </document> - 889 """ - 890 -
891 -def xinclude_loader(href, parse="xml", encoding=None): -
892 try: - 893 data = XINCLUDE[href] - 894 except KeyError: - 895 raise IOError("resource not found") - 896 if parse == "xml": - 897 return ElementTree.XML(data) - 898 return data -
899 -
900 -def xinclude(): -
901 r""" - 902 Basic inclusion example (XInclude C.1) - 903 - 904 >>> document = xinclude_loader("C1.xml") - 905 >>> ElementInclude.include(document, xinclude_loader) - 906 >>> print(serialize(document)) # C1 - 907 <document> - 908 <p>120 Mz is adequate for an average home user.</p> - 909 <disclaimer> - 910 <p>The opinions represented herein represent those of the individual - 911 and should not be interpreted as official policy endorsed by this - 912 organization.</p> - 913 </disclaimer> - 914 </document> - 915 - 916 Textual inclusion example (XInclude C.2) - 917 - 918 >>> document = xinclude_loader("C2.xml") - 919 >>> ElementInclude.include(document, xinclude_loader) - 920 >>> print(serialize(document)) # C2 - 921 <document> - 922 <p>This document has been accessed - 923 324387 times.</p> - 924 </document> - 925 - 926 Textual inclusion of XML example (XInclude C.3) - 927 - 928 >>> document = xinclude_loader("C3.xml") - 929 >>> ElementInclude.include(document, xinclude_loader) - 930 >>> print(serialize(document)) # C3 - 931 <document> - 932 <p>The following is the source of the "data.xml" resource:</p> - 933 <example>&lt;?xml version='1.0'?&gt; - 934 &lt;data&gt; - 935 &lt;item&gt;&lt;![CDATA[Brooks &amp; Shields]]&gt;&lt;/item&gt; - 936 &lt;/data&gt; - 937 </example> - 938 </document> - 939 - 940 ## Fallback example (XInclude C.5) - 941 ## Note! Fallback support is not yet implemented - 942 - 943 ## >>> document = xinclude_loader("C5.xml") - 944 ## >>> ElementInclude.include(document, xinclude_loader) - 945 ## Traceback (most recent call last): - 946 ## IOError: resource not found - 947 ## >>> # print(serialize(document)) # C5 - 948 - 949 """ -
950 -
951 -def xinclude_default(): -
952 """ - 953 >>> document = xinclude_loader("default.xml") - 954 >>> ElementInclude.include(document) - 955 >>> print(serialize(document)) # default - 956 <document> - 957 <p>Example.</p> - 958 <root> - 959 <element key="value">text</element> - 960 <element>text</element>tail - 961 <empty-element/> - 962 </root> - 963 </document> - 964 """ -
965 - 966 # - 967 # xmlwriter - 968 -
969 -def xmlwriter(): -
970 r""" - 971 >>> file = BytesIO() - 972 >>> w = SimpleXMLWriter.XMLWriter(file) - 973 >>> html = w.start("html") - 974 >>> x = w.start("head") - 975 >>> w.element("title", "my document") - 976 >>> w.data("\n") - 977 >>> w.element("meta", name="hello", value="goodbye") - 978 >>> w.data("\n") - 979 >>> w.end() - 980 >>> x = w.start("body") - 981 >>> w.element("h1", "this is a heading") - 982 >>> w.data("\n") - 983 >>> w.element("p", u"this is a paragraph") - 984 >>> w.data("\n") - 985 >>> w.element("p", u"reserved characters: <&>") - 986 >>> w.data("\n") - 987 >>> w.element("p", u"detta är också ett stycke") - 988 >>> w.data("\n") - 989 >>> w.close(html) - 990 >>> print(file.getvalue()) - 991 <html><head><title>my document</title> - 992 <meta name="hello" value="goodbye" /> - 993 </head><body><h1>this is a heading</h1> - 994 <p>this is a paragraph</p> - 995 <p>reserved characters: &lt;&amp;&gt;</p> - 996 <p>detta &#228;r ocks&#229; ett stycke</p> - 997 </body></html> - 998 """ -
999 -1000 # doesn't work with lxml.etree -1001 del xmlwriter -1002 -1003 # -------------------------------------------------------------------- -1004 # reported bugs -1005 -
1006 -def bug_xmltoolkit21(): -
1007 """ -1008 marshaller gives obscure errors for non-string values -1009 -1010 >>> elem = ElementTree.Element(123) -1011 >>> serialize(elem) # tag -1012 Traceback (most recent call last): -1013 TypeError: cannot serialize 123 (type int) -1014 >>> elem = ElementTree.Element("elem") -1015 >>> elem.text = 123 -1016 >>> serialize(elem) # text -1017 Traceback (most recent call last): -1018 TypeError: cannot serialize 123 (type int) -1019 >>> elem = ElementTree.Element("elem") -1020 >>> elem.tail = 123 -1021 >>> serialize(elem) # tail -1022 Traceback (most recent call last): -1023 TypeError: cannot serialize 123 (type int) -1024 >>> elem = ElementTree.Element("elem") -1025 >>> elem.set(123, "123") -1026 >>> serialize(elem) # attribute key -1027 Traceback (most recent call last): -1028 TypeError: cannot serialize 123 (type int) -1029 >>> elem = ElementTree.Element("elem") -1030 >>> elem.set("123", 123) -1031 >>> serialize(elem) # attribute value -1032 Traceback (most recent call last): -1033 TypeError: cannot serialize 123 (type int) -1034 -1035 """ -
1036 -1037 # doesn't work with lxml.etree -1038 del bug_xmltoolkit21 -1039 -
1040 -def bug_xmltoolkit25(): -
1041 """ -1042 typo in ElementTree.findtext -1043 -1044 >>> tree = ElementTree.ElementTree(SAMPLE_XML) -1045 >>> tree.findtext("tag") -1046 'text' -1047 >>> tree.findtext("section/tag") -1048 'subtext' -1049 """ -
1050 -
1051 -def bug_xmltoolkit28(): -
1052 """ -1053 .//tag causes exceptions -1054 -1055 >>> tree = ElementTree.XML("<doc><table><tbody/></table></doc>") -1056 >>> summarize_list(tree.findall(".//thead")) -1057 [] -1058 >>> summarize_list(tree.findall(".//tbody")) -1059 ['tbody'] -1060 """ -
1061 -
1062 -def bug_xmltoolkitX1(): -
1063 """ -1064 dump() doesn't flush the output buffer -1065 -1066 >>> tree = ElementTree.XML("<doc><table><tbody/></table></doc>") -1067 >>> ElementTree.dump(tree); sys.stdout.write("tail") -1068 <doc><table><tbody /></table></doc> -1069 tail -1070 """ -
1071 -1072 # doesn't work with lxml.etree -1073 del bug_xmltoolkitX1 -1074 -
1075 -def bug_xmltoolkit39(): -
1076 """ -1077 non-ascii element and attribute names doesn't work -1078 -1079 >>> tree = ElementTree.XML("<?xml version='1.0' encoding='iso-8859-1'?><täg />") -1080 >>> ElementTree.tostring(tree, "utf-8") -1081 '<t\\xc3\\xa4g />' -1082 -1083 >>> tree = ElementTree.XML("<?xml version='1.0' encoding='iso-8859-1'?><tag ättr='v&#228;lue' />") -1084 >>> tree.attrib -1085 {u'\\xe4ttr': u'v\\xe4lue'} -1086 >>> ElementTree.tostring(tree, "utf-8") -1087 '<tag \\xc3\\xa4ttr="v\\xc3\\xa4lue" />' -1088 -1089 >>> tree = ElementTree.XML("<?xml version='1.0' encoding='iso-8859-1'?><täg>text</täg>") -1090 >>> ElementTree.tostring(tree, "utf-8") -1091 '<t\\xc3\\xa4g>text</t\\xc3\\xa4g>' -1092 -1093 >>> tree = ElementTree.Element(u"täg") -1094 >>> ElementTree.tostring(tree, "utf-8") -1095 '<t\\xc3\\xa4g />' -1096 -1097 >>> tree = ElementTree.Element("tag") -1098 >>> tree.set(u"ättr", u"välue") -1099 >>> ElementTree.tostring(tree, "utf-8") -1100 '<tag \\xc3\\xa4ttr="v\\xc3\\xa4lue" />' -1101 -1102 """ -
1103 -1104 # doesn't work with lxml.etree -1105 del bug_xmltoolkit39 -1106 -
1107 -def bug_xmltoolkit45(): -
1108 """ -1109 problems parsing mixed unicode/non-ascii html documents -1110 -1111 latin-1 text -1112 >>> p = HTMLTreeBuilder.TreeBuilder() -1113 >>> p.feed("<p>välue</p>") -1114 >>> serialize(p.close()) -1115 '<p>v&#228;lue</p>' -1116 -1117 utf-8 text -1118 >>> p = HTMLTreeBuilder.TreeBuilder(encoding="utf-8") -1119 >>> p.feed("<p>v\xc3\xa4lue</p>") -1120 >>> serialize(p.close()) -1121 '<p>v&#228;lue</p>' -1122 -1123 utf-8 text using meta tag -1124 >>> p = HTMLTreeBuilder.TreeBuilder() -1125 >>> p.feed("<html><meta http-equiv='Content-Type' content='text/html; charset=utf-8'><p>v\xc3\xa4lue</p></html>") -1126 >>> serialize(p.close().find("p")) -1127 '<p>v&#228;lue</p>' -1128 -1129 latin-1 character references -1130 >>> p = HTMLTreeBuilder.TreeBuilder() -1131 >>> p.feed("<p>v&#228;lue</p>") -1132 >>> serialize(p.close()) -1133 '<p>v&#228;lue</p>' -1134 -1135 latin-1 character entities -1136 >>> p = HTMLTreeBuilder.TreeBuilder() -1137 >>> p.feed("<p>v&auml;lue</p>") -1138 >>> serialize(p.close()) -1139 '<p>v&#228;lue</p>' -1140 -1141 mixed latin-1 text and unicode entities -1142 >>> p = HTMLTreeBuilder.TreeBuilder() -1143 >>> p.feed("<p>&#8221;välue&#8221;</p>") -1144 >>> serialize(p.close()) -1145 '<p>&#8221;v&#228;lue&#8221;</p>' -1146 -1147 mixed unicode and latin-1 entities -1148 >>> p = HTMLTreeBuilder.TreeBuilder() -1149 >>> p.feed("<p>&#8221;v&auml;lue&#8221;</p>") -1150 >>> serialize(p.close()) -1151 '<p>&#8221;v&#228;lue&#8221;</p>' -1152 -1153 """ -
1154 -1155 # doesn't work with lxml.etree -1156 del bug_xmltoolkit45 -1157 -
1158 -def bug_xmltoolkit46(): -
1159 """ -1160 problems parsing open BR tags -1161 -1162 >>> p = HTMLTreeBuilder.TreeBuilder() -1163 >>> p.feed("<p>key<br>value</p>") -1164 >>> serialize(p.close()) -1165 '<p>key<br />value</p>' -1166 -1167 """ -
1168 -1169 # doesn't work with lxml.etree -1170 del bug_xmltoolkit46 -1171 -
1172 -def bug_xmltoolkit54(): -
1173 """ -1174 problems handling internally defined entities -1175 -1176 >>> e = ElementTree.XML("<!DOCTYPE doc [<!ENTITY ldots '&#x8230;'>]><doc>&ldots;</doc>") -1177 >>> serialize(e) -1178 '<doc>&#33328;</doc>' -1179 """ -
1180 -1181 # doesn't work with lxml.etree -1182 del bug_xmltoolkit54 -1183 -
1184 -def bug_xmltoolkit55(): -
1185 """ -1186 make sure we're reporting the first error, not the last -1187 -1188 >>> e = ElementTree.XML("<!DOCTYPE doc SYSTEM 'doc.dtd'><doc>&ldots;&ndots;&rdots;</doc>") -1189 Traceback (most recent call last): -1190 ParseError: undefined entity &ldots;: line 1, column 36 -1191 """ -
1192 -1193 # doesn't work with lxml.etree -1194 del bug_xmltoolkit55 -1195 -
1196 -def bug_200708_version(): -
1197 """ -1198 >>> parser = ET.XMLParser() -1199 >>> parser.version -1200 'Expat 2.0.0' -1201 >>> parser.feed(open("samples/simple.xml").read()) -1202 >>> print(serialize(parser.close())) -1203 <root> -1204 <element key="value">text</element> -1205 <element>text</element>tail -1206 <empty-element /> -1207 </root> -1208 """ -
1209 -1210 # doesn't work with lxml.etree -1211 del bug_200708_version -1212 -
1213 -def bug_200708_newline(): -
1214 r""" -1215 -1216 Preserve newlines in attributes. -1217 -1218 >>> e = ET.Element('SomeTag', text="def _f():\n return 3\n") -1219 >>> ET.tostring(e) -1220 '<SomeTag text="def _f():&#10; return 3&#10;" />' -1221 >>> ET.XML(ET.tostring(e)).get("text") -1222 'def _f():\n return 3\n' -1223 >>> ET.tostring(ET.XML(ET.tostring(e))) -1224 '<SomeTag text="def _f():&#10; return 3&#10;" />' -1225 """ -
1226 -1227 # doesn't work with lxml.etree -1228 del bug_200708_newline -1229 -
1231 """ -1232 -1233 >>> e = ET.Element("{default}elem") -1234 >>> s = ET.SubElement(e, "{default}elem") -1235 >>> serialize(e, default_namespace="default") # 1 -1236 '<elem xmlns="default"><elem /></elem>' -1237 -1238 >>> e = ET.Element("{default}elem") -1239 >>> s = ET.SubElement(e, "{default}elem") -1240 >>> s = ET.SubElement(e, "{not-default}elem") -1241 >>> serialize(e, default_namespace="default") # 2 -1242 '<elem xmlns="default" xmlns:ns1="not-default"><elem /><ns1:elem /></elem>' -1243 -1244 >>> e = ET.Element("{default}elem") -1245 >>> s = ET.SubElement(e, "{default}elem") -1246 >>> s = ET.SubElement(e, "elem") # unprefixed name -1247 >>> serialize(e, default_namespace="default") # 3 -1248 Traceback (most recent call last): -1249 ValueError: cannot use non-qualified names with default_namespace option -1250 -1251 """ -
1252 -1253 # doesn't work with lxml.etree -1254 del bug_200709_default_namespace -1255 -1256 # -------------------------------------------------------------------- -1257 -1258 if __name__ == "__main__": -1259 import doctest, selftest -1260 failed, tested = doctest.testmod(selftest) -1261 print("%d tests ok." % (tested - failed)) -1262 if failed > 0: -1263 print("%d tests failed. Exiting with non-zero return code." % failed) -1264 sys.exit(1) -1265 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.selftest2-module.html b/doc/html/api/lxml.tests.selftest2-module.html deleted file mode 100644 index 7ccb13b..0000000 --- a/doc/html/api/lxml.tests.selftest2-module.html +++ /dev/null @@ -1,699 +0,0 @@ - - - - - lxml.tests.selftest2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module selftest2 - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module selftest2

source code

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
stdout() - source code - -
- -
-   - - - - - - -
unserialize(text) - source code - -
- -
-   - - - - - - -
serialize(elem, - encoding=None) - source code - -
- -
-   - - - - - - -
summarize(elem) - source code - -
- -
-   - - - - - - -
summarize_list(seq) - source code - -
- -
-   - - - - - - -
check_string(string) - source code - -
- -
-   - - - - - - -
check_mapping(mapping) - source code - -
- -
-   - - - - - - -
check_element(element) - source code - -
- -
-   - - - - - - -
check_element_tree(tree) - source code - -
- -
-   - - - - - - -
element()
- Test element tree interface.
- source code - -
- -
-   - - - - - - -
parsefile()
- Test parsing from file. Note that we're opening the files in -here; by default, the 'parse' function opens the file in binary -mode, and doctest doesn't filter out carriage returns.
- source code - -
- -
-   - - - - - - -
writefile() - source code - -
- -
-   - - - - - - -
encoding()
- Test encoding issues.
- source code - -
- -
-   - - - - - - -
qname()
- Test QName handling.
- source code - -
- -
-   - - - - - - -
cdata()
- Test CDATA handling (etc).
- source code - -
- -
-   - - - - - - -
find()
- Test find methods (including xpath syntax).
- source code - -
- -
-   - - - - - - -
copy()
- Test copy handling (etc).
- source code - -
- -
-   - - - - - - -
attrib()
- Test attribute handling.
- source code - -
- -
-   - - - - - - -
makeelement()
- Test makeelement handling.
- source code - -
- -
- - - - - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - SAMPLE_XML = unserialize(... -
-   - - SAMPLE_XML_NS = unserialize(... -
-   - - ENTITY_XML = '<!DOCTYPE points [\n<!ENTITY % user-entities SYS... -
-   - - __package__ = 'lxml.tests' -
- - - - - - -
- - - - - -
Function Details[hide private]
-
- -
- -
- - -
-

qname() -

-
source code  -
- -
-

Test QName handling.

-
    -
  1. decorated tags
  2. -
-
->>> elem = ElementTree.Element("{uri}tag")
->>> serialize(elem) # 1.1
-'<ns0:tag xmlns:ns0="uri"/>'
-
-

## 2) decorated attributes

-

## >>> elem.attrib["{uri}key"] = "value" -## >>> serialize(elem) # 2.1 -## '<ns0:tag ns0:key="value" xmlns:ns0="uri"/>'

-
-
-
-
- -
- -
- - -
-

copy() -

-
source code  -
- -
-

Test copy handling (etc).

-
->>> import copy
->>> e1 = unserialize("<tag>hello<foo/></tag>")
->>> # e2 = copy.copy(e1)
->>> e3 = copy.deepcopy(e1)
->>> e1.find("foo").tag = "bar"
-
->>> serialize(e1).replace(' ', '')
-'<tag>hello<bar/></tag>'
-
-

## >>> serialize(e2).replace(' ', '') -## '<tag>hello<bar/></tag>'

-
-
->>> serialize(e3).replace(' ', '')
-'<tag>hello<foo/></tag>'
-
-
-
-
-
-
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

SAMPLE_XML

- -
-
-
-
Value:
-
-unserialize("""
-<body>
-  <tag>text</tag>
-  <tag />
-  <section>
-    <tag>subtext</tag>
-  </section>
-</body>
-...
-
-
-
-
-
- -
- -
-

SAMPLE_XML_NS

- -
-
-
-
Value:
-
-unserialize("""
-<body xmlns="http://effbot.org/ns">
-  <tag>text</tag>
-  <tag />
-  <section>
-    <tag>subtext</tag>
-  </section>
-</body>
-...
-
-
-
-
-
- -
- -
-

ENTITY_XML

- -
-
-
-
Value:
-
-'''<!DOCTYPE points [
-<!ENTITY % user-entities SYSTEM \'user-entities.xml\'>
-%user-entities;
-]>
-<document>&entity;</document>
-'''
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.selftest2-pysrc.html b/doc/html/api/lxml.tests.selftest2-pysrc.html deleted file mode 100644 index d4ad196..0000000 --- a/doc/html/api/lxml.tests.selftest2-pysrc.html +++ /dev/null @@ -1,659 +0,0 @@ - - - - - lxml.tests.selftest2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module selftest2 - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.selftest2

-
-  1  # $Id: selftest.py 2213 2005-01-11 18:49:47Z fredrik $ 
-  2  # elementtree selftest program 
-  3   
-  4  # this test script uses Python's "doctest" module to check that the 
-  5  # *test script* works as expected. 
-  6   
-  7  import sys 
-  8   
-  9  try: 
- 10      from StringIO import StringIO 
- 11      BytesIO = StringIO 
- 12  except ImportError: 
- 13      from io import BytesIO, StringIO 
- 14   
- 15  from lxml import etree as ElementTree 
- 16   
-
17 -def stdout(): -
18 if sys.version_info[0] < 3: - 19 return sys.stdout - 20 class bytes_stdout(object): - 21 def write(self, data): - 22 if isinstance(data, bytes): - 23 data = data.decode('ISO8859-1') - 24 sys.stdout.write(data) -
25 return bytes_stdout() - 26 -
27 -def unserialize(text): -
28 file = StringIO(text) - 29 tree = ElementTree.parse(file) - 30 return tree.getroot() -
31 -
32 -def serialize(elem, encoding=None): -
33 file = BytesIO() - 34 tree = ElementTree.ElementTree(elem) - 35 if encoding: - 36 tree.write(file, encoding=encoding) - 37 else: - 38 tree.write(file) - 39 result = file.getvalue() - 40 if sys.version_info[0] >= 3: - 41 result = result.decode('ISO8859-1') - 42 result = result.replace(' />', '/>') - 43 if result[-1:] == '\n': - 44 result = result[:-1] - 45 return result -
46 -
47 -def summarize(elem): -
48 return elem.tag -
49 -
50 -def summarize_list(seq): -
51 return list(map(summarize, seq)) -
52 - 53 SAMPLE_XML = unserialize(""" - 54 <body> - 55 <tag>text</tag> - 56 <tag /> - 57 <section> - 58 <tag>subtext</tag> - 59 </section> - 60 </body> - 61 """) - 62 - 63 SAMPLE_XML_NS = unserialize(""" - 64 <body xmlns="http://effbot.org/ns"> - 65 <tag>text</tag> - 66 <tag /> - 67 <section> - 68 <tag>subtext</tag> - 69 </section> - 70 </body> - 71 """) - 72 - 73 # interface tests - 74 -
75 -def check_string(string): -
76 len(string) - 77 for char in string: - 78 if len(char) != 1: - 79 print("expected one-character string, got %r" % char) - 80 new_string = string + "" - 81 new_string = string + " " - 82 string[:0] -
83 -
84 -def check_mapping(mapping): -
85 len(mapping) - 86 keys = mapping.keys() - 87 items = mapping.items() - 88 for key in keys: - 89 item = mapping[key] - 90 mapping["key"] = "value" - 91 if mapping["key"] != "value": - 92 print("expected value string, got %r" % mapping["key"]) -
93 -
94 -def check_element(element): -
95 if not hasattr(element, "tag"): - 96 print("no tag member") - 97 if not hasattr(element, "attrib"): - 98 print("no attrib member") - 99 if not hasattr(element, "text"): -100 print("no text member") -101 if not hasattr(element, "tail"): -102 print("no tail member") -103 check_string(element.tag) -104 check_mapping(element.attrib) -105 if element.text != None: -106 check_string(element.text) -107 if element.tail != None: -108 check_string(element.tail) -
109 -
110 -def check_element_tree(tree): -
111 check_element(tree.getroot()) -
112 -
113 -def element(): -
114 """ -115 Test element tree interface. -116 -117 >>> element = ElementTree.Element("tag") -118 >>> check_element(element) -119 >>> tree = ElementTree.ElementTree(element) -120 >>> check_element_tree(tree) -121 """ -
122 -
123 -def parsefile(): -
124 """ -125 Test parsing from file. Note that we're opening the files in -126 here; by default, the 'parse' function opens the file in binary -127 mode, and doctest doesn't filter out carriage returns. -128 -129 >>> file = open("samples/simple.xml", "rb") -130 >>> tree = ElementTree.parse(file) -131 >>> file.close() -132 >>> tree.write(stdout()) -133 <root> -134 <element key="value">text</element> -135 <element>text</element>tail -136 <empty-element/> -137 </root> -138 >>> file = open("samples/simple-ns.xml", "rb") -139 >>> tree = ElementTree.parse(file) -140 >>> file.close() -141 >>> tree.write(stdout()) -142 <root xmlns="http://namespace/"> -143 <element key="value">text</element> -144 <element>text</element>tail -145 <empty-element/> -146 </root> -147 """ -
148 -
149 -def writefile(): -
150 """ -151 >>> elem = ElementTree.Element("tag") -152 >>> elem.text = "text" -153 >>> serialize(elem) -154 '<tag>text</tag>' -155 >>> ElementTree.SubElement(elem, "subtag").text = "subtext" -156 >>> serialize(elem) -157 '<tag>text<subtag>subtext</subtag></tag>' -158 """ -
159 -
160 -def encoding(): -
161 r""" -162 Test encoding issues. -163 -164 >>> elem = ElementTree.Element("tag") -165 >>> elem.text = u'abc' -166 >>> serialize(elem) -167 '<tag>abc</tag>' -168 >>> serialize(elem, "utf-8") -169 '<tag>abc</tag>' -170 >>> serialize(elem, "us-ascii") -171 '<tag>abc</tag>' -172 >>> serialize(elem, "iso-8859-1").lower() -173 "<?xml version='1.0' encoding='iso-8859-1'?>\n<tag>abc</tag>" -174 -175 >>> elem.text = "<&\"\'>" -176 >>> serialize(elem) -177 '<tag>&lt;&amp;"\'&gt;</tag>' -178 >>> serialize(elem, "utf-8") -179 '<tag>&lt;&amp;"\'&gt;</tag>' -180 >>> serialize(elem, "us-ascii") # cdata characters -181 '<tag>&lt;&amp;"\'&gt;</tag>' -182 >>> serialize(elem, "iso-8859-1").lower() -183 '<?xml version=\'1.0\' encoding=\'iso-8859-1\'?>\n<tag>&lt;&amp;"\'&gt;</tag>' -184 -185 >>> elem.attrib["key"] = "<&\"\'>" -186 >>> elem.text = None -187 >>> serialize(elem) -188 '<tag key="&lt;&amp;&quot;\'&gt;"/>' -189 >>> serialize(elem, "utf-8") -190 '<tag key="&lt;&amp;&quot;\'&gt;"/>' -191 >>> serialize(elem, "us-ascii") -192 '<tag key="&lt;&amp;&quot;\'&gt;"/>' -193 >>> serialize(elem, "iso-8859-1").lower() -194 '<?xml version=\'1.0\' encoding=\'iso-8859-1\'?>\n<tag key="&lt;&amp;&quot;\'&gt;"/>' -195 -196 >>> elem.text = u'\xe5\xf6\xf6<>' -197 >>> elem.attrib.clear() -198 >>> serialize(elem) -199 '<tag>&#229;&#246;&#246;&lt;&gt;</tag>' -200 >>> serialize(elem, "utf-8") -201 '<tag>\xc3\xa5\xc3\xb6\xc3\xb6&lt;&gt;</tag>' -202 >>> serialize(elem, "us-ascii") -203 '<tag>&#229;&#246;&#246;&lt;&gt;</tag>' -204 >>> serialize(elem, "iso-8859-1").lower() -205 "<?xml version='1.0' encoding='iso-8859-1'?>\n<tag>\xe5\xf6\xf6&lt;&gt;</tag>" -206 -207 >>> elem.attrib["key"] = u'\xe5\xf6\xf6<>' -208 >>> elem.text = None -209 >>> serialize(elem) -210 '<tag key="&#229;&#246;&#246;&lt;&gt;"/>' -211 >>> serialize(elem, "utf-8") -212 '<tag key="\xc3\xa5\xc3\xb6\xc3\xb6&lt;&gt;"/>' -213 >>> serialize(elem, "us-ascii") -214 '<tag key="&#229;&#246;&#246;&lt;&gt;"/>' -215 >>> serialize(elem, "iso-8859-1").lower() -216 '<?xml version=\'1.0\' encoding=\'iso-8859-1\'?>\n<tag key="\xe5\xf6\xf6&lt;&gt;"/>' -217 -218 """ -
219 -220 if sys.version_info[0] >= 3: -221 encoding.__doc__ = encoding.__doc__.replace("u'", "'") -222 -
223 -def qname(): -
224 """ -225 Test QName handling. -226 -227 1) decorated tags -228 -229 >>> elem = ElementTree.Element("{uri}tag") -230 >>> serialize(elem) # 1.1 -231 '<ns0:tag xmlns:ns0="uri"/>' -232 -233 ## 2) decorated attributes -234 -235 ## >>> elem.attrib["{uri}key"] = "value" -236 ## >>> serialize(elem) # 2.1 -237 ## '<ns0:tag ns0:key="value" xmlns:ns0="uri"/>' -238 -239 """ -
240 -
241 -def cdata(): -
242 """ -243 Test CDATA handling (etc). -244 -245 >>> serialize(unserialize("<tag>hello</tag>")) -246 '<tag>hello</tag>' -247 >>> serialize(unserialize("<tag>&#104;&#101;&#108;&#108;&#111;</tag>")) -248 '<tag>hello</tag>' -249 >>> serialize(unserialize("<tag><![CDATA[hello]]></tag>")) -250 '<tag>hello</tag>' -251 -252 """ -
253 -
254 -def find(): -
255 """ -256 Test find methods (including xpath syntax). -257 -258 >>> elem = SAMPLE_XML -259 >>> elem.find("tag").tag -260 'tag' -261 >>> ElementTree.ElementTree(elem).find("tag").tag -262 'tag' -263 >>> elem.find("section/tag").tag -264 'tag' -265 >>> ElementTree.ElementTree(elem).find("section/tag").tag -266 'tag' -267 >>> elem.findtext("tag") -268 'text' -269 >>> elem.findtext("tog", "default") -270 'default' -271 >>> ElementTree.ElementTree(elem).findtext("tag") -272 'text' -273 >>> elem.findtext("section/tag") -274 'subtext' -275 >>> ElementTree.ElementTree(elem).findtext("section/tag") -276 'subtext' -277 >>> summarize_list(elem.findall("tag")) -278 ['tag', 'tag'] -279 >>> summarize_list(elem.findall("*")) -280 ['tag', 'tag', 'section'] -281 >>> summarize_list(elem.findall(".//tag")) -282 ['tag', 'tag', 'tag'] -283 >>> summarize_list(elem.findall("section/tag")) -284 ['tag'] -285 >>> summarize_list(elem.findall("section//tag")) -286 ['tag'] -287 >>> summarize_list(elem.findall("section/*")) -288 ['tag'] -289 >>> summarize_list(elem.findall("section//*")) -290 ['tag'] -291 >>> summarize_list(elem.findall("section/.//*")) -292 ['tag'] -293 >>> summarize_list(elem.findall("*/*")) -294 ['tag'] -295 >>> summarize_list(elem.findall("*//*")) -296 ['tag'] -297 >>> summarize_list(elem.findall("*/tag")) -298 ['tag'] -299 >>> summarize_list(elem.findall("*/./tag")) -300 ['tag'] -301 >>> summarize_list(elem.findall("./tag")) -302 ['tag', 'tag'] -303 >>> summarize_list(elem.findall(".//tag")) -304 ['tag', 'tag', 'tag'] -305 >>> summarize_list(elem.findall("././tag")) -306 ['tag', 'tag'] -307 >>> summarize_list(ElementTree.ElementTree(elem).findall("/tag")) -308 ['tag', 'tag'] -309 >>> summarize_list(ElementTree.ElementTree(elem).findall("./tag")) -310 ['tag', 'tag'] -311 >>> elem = SAMPLE_XML_NS -312 >>> summarize_list(elem.findall("tag")) -313 [] -314 >>> summarize_list(elem.findall("{http://effbot.org/ns}tag")) -315 ['{http://effbot.org/ns}tag', '{http://effbot.org/ns}tag'] -316 >>> summarize_list(elem.findall(".//{http://effbot.org/ns}tag")) -317 ['{http://effbot.org/ns}tag', '{http://effbot.org/ns}tag', '{http://effbot.org/ns}tag'] -318 """ -
319 -320 # XXX only deep copying is supported -321 -
322 -def copy(): -
323 """ -324 Test copy handling (etc). -325 -326 >>> import copy -327 >>> e1 = unserialize("<tag>hello<foo/></tag>") -328 >>> # e2 = copy.copy(e1) -329 >>> e3 = copy.deepcopy(e1) -330 >>> e1.find("foo").tag = "bar" -331 -332 >>> serialize(e1).replace(' ', '') -333 '<tag>hello<bar/></tag>' -334 -335 ## >>> serialize(e2).replace(' ', '') -336 ## '<tag>hello<bar/></tag>' -337 -338 >>> serialize(e3).replace(' ', '') -339 '<tag>hello<foo/></tag>' -340 -341 """ -
342 -
343 -def attrib(): -
344 """ -345 Test attribute handling. -346 -347 >>> elem = ElementTree.Element("tag") -348 >>> elem.get("key") # 1.1 -349 >>> elem.get("key", "default") # 1.2 -350 'default' -351 >>> elem.set("key", "value") -352 >>> elem.get("key") # 1.3 -353 'value' -354 -355 >>> elem = ElementTree.Element("tag", key="value") -356 >>> elem.get("key") # 2.1 -357 'value' -358 >>> elem.attrib # 2.2 -359 {'key': 'value'} -360 -361 >>> elem = ElementTree.Element("tag", {"key": "value"}) -362 >>> elem.get("key") # 3.1 -363 'value' -364 >>> elem.attrib # 3.2 -365 {'key': 'value'} -366 -367 >>> elem = ElementTree.Element("tag", {"key": "other"}, key="value") -368 >>> elem.get("key") # 4.1 -369 'value' -370 >>> elem.attrib # 4.2 -371 {'key': 'value'} -372 -373 """ -
374 -
375 -def makeelement(): -
376 """ -377 Test makeelement handling. -378 -379 >>> elem = ElementTree.Element("tag") -380 >>> subelem = elem.makeelement("subtag", {"key": "value"}) -381 >>> elem.append(subelem) -382 >>> serialize(elem) -383 '<tag><subtag key="value"/></tag>' -384 -385 >>> elem.clear() -386 >>> serialize(elem) -387 '<tag/>' -388 >>> elem.append(subelem) -389 >>> serialize(elem) -390 '<tag><subtag key="value"/></tag>' -391 -392 """ -
393 -394 ## def observer(): -395 ## """ -396 ## Test observers. -397 -398 ## >>> def observer(action, elem): -399 ## ... print("%s %s" % (action, elem.tag)) -400 ## >>> builder = ElementTree.TreeBuilder() -401 ## >>> builder.addobserver(observer) -402 ## >>> parser = ElementTree.XMLParser(builder) -403 ## >>> file = open("samples/simple.xml", "rb") -404 ## >>> parser.feed(file.read()) -405 ## start root -406 ## start element -407 ## end element -408 ## start element -409 ## end element -410 ## start empty-element -411 ## end empty-element -412 ## end root -413 ## >>> file.close() -414 -415 ## """ -416 -417 ENTITY_XML = """\ -418 <!DOCTYPE points [ -419 <!ENTITY % user-entities SYSTEM 'user-entities.xml'> -420 %user-entities; -421 ]> -422 <document>&entity;</document> -423 """ -424 -425 ## def entity(): -426 ## """ -427 ## Test entity handling. -428 -429 ## 1) bad entities -430 -431 ## >>> ElementTree.XML("<document>&entity;</document>") -432 ## Traceback (most recent call last): -433 ## SyntaxError: undefined entity: line 1, column 10 -434 -435 ## 2) custom entity -436 -437 ## >>> parser = ElementTree.XMLParser() -438 ## >>> parser.entity["entity"] = "text" -439 ## >>> parser.feed(ENTITY_XML) -440 ## >>> root = parser.close() -441 ## >>> serialize(root) -442 ## '<document>text</document>' -443 -444 ## """ -445 -446 if __name__ == "__main__": -447 import doctest, selftest2 -448 failed, tested = doctest.testmod(selftest2) -449 print("%d tests ok." % (tested - failed)) -450 if failed > 0: -451 print("%d tests failed. Exiting with non-zero return code." % failed) -452 sys.exit(1) -453 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_builder-module.html b/doc/html/api/lxml.tests.test_builder-module.html deleted file mode 100644 index 8c8ac8b..0000000 --- a/doc/html/api/lxml.tests.test_builder-module.html +++ /dev/null @@ -1,244 +0,0 @@ - - - - - lxml.tests.test_builder - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_builder - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module test_builder

source code

- - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - BuilderTestCase -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
test_suite() - source code - -
- -
- - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - this_dir = '/home/stefan/source/Python/lxml/lxml-release/src/l... -
-   - - __package__ = 'lxml.tests' -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

this_dir

- -
-
-
-
Value:
-
-'/home/stefan/source/Python/lxml/lxml-release/src/lxml/tests'
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_builder-pysrc.html b/doc/html/api/lxml.tests.test_builder-pysrc.html deleted file mode 100644 index 07965b3..0000000 --- a/doc/html/api/lxml.tests.test_builder-pysrc.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - lxml.tests.test_builder - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_builder - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.test_builder

-
- 1  # -*- coding: utf-8 -*- 
- 2  import unittest 
- 3   
- 4  """ 
- 5  Tests that ElementMaker works properly. 
- 6  """ 
- 7   
- 8  import sys, os.path 
- 9  from lxml import etree 
-10  from lxml.builder import E 
-11   
-12  this_dir = os.path.dirname(__file__) 
-13  if this_dir not in sys.path: 
-14      sys.path.insert(0, this_dir) # needed for Py3 
-15   
-16  from common_imports import HelperTestCase, BytesIO, _bytes 
-17   
-18   
-
19 -class BuilderTestCase(HelperTestCase): -
20 etree = etree -21 -
23 class StringSubclass(str): pass -24 wrapped = E.b(StringSubclass('Hello')) -25 self.assertEqual(_bytes('<b>Hello</b>'), etree.tostring(wrapped)) -
26 -
27 - def test_unknown_type_raises(self): -
28 class UnknownType(object): -29 pass -
30 self.assertRaises(TypeError, E.b, UnknownType()) -
31 -
32 - def test_cdata(self): -
33 wrapped = E.b(etree.CDATA('Hello')) -34 self.assertEqual(_bytes('<b><![CDATA[Hello]]></b>'), etree.tostring(wrapped)) -
35 -
36 - def test_cdata_solo(self): -
37 self.assertRaises(ValueError, E.b, 'Hello', etree.CDATA('World')) -
38 -39 -
40 -def test_suite(): -
41 suite = unittest.TestSuite() -42 suite.addTests([unittest.makeSuite(BuilderTestCase)]) -43 return suite -
44 -45 if __name__ == '__main__': -46 print('to test use test.py %s' % __file__) -47 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_builder.BuilderTestCase-class.html b/doc/html/api/lxml.tests.test_builder.BuilderTestCase-class.html deleted file mode 100644 index 2b5b3d8..0000000 --- a/doc/html/api/lxml.tests.test_builder.BuilderTestCase-class.html +++ /dev/null @@ -1,451 +0,0 @@ - - - - - lxml.tests.test_builder.BuilderTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_builder :: - Class BuilderTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class BuilderTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               BuilderTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_build_from_xpath_result(self) - source code - -
- -
-   - - - - - - -
test_unknown_type_raises(self) - source code - -
- -
-   - - - - - - -
test_cdata(self) - source code - -
- -
-   - - - - - - -
test_cdata_solo(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - etree
- The lxml.etree module implements the extended ElementTree API for XML. -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

etree

- The lxml.etree module implements the extended ElementTree API for XML. -
-
-
-
Value:
-
lxml.etree
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_classlookup-module.html b/doc/html/api/lxml.tests.test_classlookup-module.html deleted file mode 100644 index 4652040..0000000 --- a/doc/html/api/lxml.tests.test_classlookup-module.html +++ /dev/null @@ -1,292 +0,0 @@ - - - - - lxml.tests.test_classlookup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_classlookup - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module test_classlookup

source code

-Tests for different Element class lookup mechanisms. - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - ProxyTestCase
- Basic tests for element proxy behaviour. -
-   - - ClassLookupTestCase
- Test cases for different Element class lookup mechanisms. -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
test_suite() - source code - -
- -
- - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - this_dir = '/home/stefan/source/Python/lxml/lxml-release/src/l... -
-   - - xml_str = '<root xmlns="myNS" xmlns:other="otherNS">\n <c1 a1... -
-   - - __package__ = 'lxml.tests' -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

this_dir

- -
-
-
-
Value:
-
-'/home/stefan/source/Python/lxml/lxml-release/src/lxml/tests'
-
-
-
-
-
- -
- -
-

xml_str

- -
-
-
-
Value:
-
-'''<root xmlns="myNS" xmlns:other="otherNS">
-  <c1 a1="A1" a2="A2" other:a3="A3">
-    <c2 a1="C2">0</c2>
-    <c2>1</c2>
-    <other:c2>2</other:c2>
-  </c1>
-</root>'''
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_classlookup-pysrc.html b/doc/html/api/lxml.tests.test_classlookup-pysrc.html deleted file mode 100644 index 40225b1..0000000 --- a/doc/html/api/lxml.tests.test_classlookup-pysrc.html +++ /dev/null @@ -1,1292 +0,0 @@ - - - - - lxml.tests.test_classlookup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_classlookup - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.test_classlookup

-
-  1  # -*- coding: utf-8 -*- 
-  2   
-  3  """ 
-  4  Tests for different Element class lookup mechanisms. 
-  5  """ 
-  6   
-  7   
-  8  import unittest, os.path, sys, gc 
-  9   
- 10  this_dir = os.path.dirname(__file__) 
- 11  if this_dir not in sys.path: 
- 12      sys.path.insert(0, this_dir) # needed for Py3 
- 13   
- 14  from common_imports import etree, HelperTestCase, SillyFileLike, fileInTestDir 
- 15  from common_imports import canonicalize, _bytes, _str, BytesIO, StringIO 
- 16   
- 17  xml_str = _bytes('''\ 
- 18  <root xmlns="myNS" xmlns:other="otherNS"> 
- 19    <c1 a1="A1" a2="A2" other:a3="A3"> 
- 20      <c2 a1="C2">0</c2> 
- 21      <c2>1</c2> 
- 22      <other:c2>2</other:c2> 
- 23    </c1> 
- 24  </root>''') 
- 25   
- 26   
-
27 -class ProxyTestCase(HelperTestCase): -
28 """Basic tests for element proxy behaviour. - 29 """ - 30 etree = etree - 31 -
32 - def test_proxy_reuse(self): -
33 root = etree.XML('<a><b><c/></b></a>') - 34 b = root.find('b') - 35 self.assertTrue(b is root[0]) -
36 -
37 - def test_proxy_reuse_after_gc(self): -
38 root = etree.XML('<a><b><c/></b></a>') - 39 b = root.find('b') - 40 self.assertTrue(self.etree.iselement(b)) - 41 gc.collect() - 42 self.assertTrue(b is root[0]) -
43 -
45 root = etree.XML('<a><b><c/></b></a>') - 46 b = root.find('b') - 47 self.assertTrue(self.etree.iselement(b)) - 48 c = b.find('c') - 49 self.assertTrue(self.etree.iselement(c)) - 50 del root - 51 gc.collect() - 52 self.assertTrue(b[0] is c) -
53 -
54 - def test_proxy_hashing(self): -
55 root = etree.XML('<a><b><c/></b></a>') - 56 old_elements = set(root.iter()) - 57 elements = root.iter() - 58 del root - 59 gc.collect() - 60 - 61 missing = len(old_elements) - 62 self.assertEqual(3, missing) - 63 for new in elements: - 64 for old in old_elements: - 65 if old == new: - 66 self.assertTrue(old is new) - 67 missing -= 1 - 68 break - 69 else: - 70 self.assertTrue(False, "element '%s' is missing" % new.tag) - 71 self.assertEqual(0, missing) -
72 -
73 - def test_element_base(self): -
74 el = self.etree.ElementBase() - 75 self.assertEqual('ElementBase', el.tag) - 76 root = self.etree.ElementBase() - 77 root.append(el) - 78 self.assertEqual('ElementBase', root[0].tag) -
79 -
80 - def test_element_base_children(self): -
81 el = self.etree.ElementBase(etree.ElementBase()) - 82 self.assertEqual('ElementBase', el.tag) - 83 self.assertEqual(1, len(el)) - 84 self.assertEqual('ElementBase', el[0].tag) - 85 - 86 root = self.etree.ElementBase() - 87 root.append(el) - 88 self.assertEqual('ElementBase', root[0].tag) - 89 self.assertEqual('ElementBase', root[0][0].tag) -
90 -
91 - def test_comment_base(self): -
92 el = self.etree.CommentBase('some text') - 93 self.assertEqual(self.etree.Comment, el.tag) - 94 self.assertEqual('some text', el.text) - 95 root = self.etree.Element('root') - 96 root.append(el) - 97 self.assertEqual('some text', root[0].text) -
98 -
99 - def test_pi_base(self): -
100 el = self.etree.PIBase('the target', 'some text') -101 self.assertEqual(self.etree.ProcessingInstruction, el.tag) -102 self.assertEqual('some text', el.text) -103 root = self.etree.Element('root') -104 root.append(el) -105 self.assertEqual('some text', root[0].text) -
106 -107 -
108 -class ClassLookupTestCase(HelperTestCase): -
109 """Test cases for different Element class lookup mechanisms. -110 """ -111 etree = etree -112 -
113 - def tearDown(self): -
116 -
117 - def test_namespace_lookup(self): -
118 class TestElement(etree.ElementBase): -119 FIND_ME = "namespace class" -
120 -121 lookup = etree.ElementNamespaceClassLookup() -122 etree.set_element_class_lookup(lookup) -123 -124 ns = lookup.get_namespace("myNS") -125 ns[None] = TestElement -126 -127 root = etree.XML(xml_str) -128 self.assertEqual(root.FIND_ME, -129 TestElement.FIND_ME) -130 self.assertEqual(root[0].FIND_ME, -131 TestElement.FIND_ME) -132 self.assertFalse(hasattr(root[0][-1], 'FIND_ME')) -
133 -
134 - def test_default_class_lookup(self): -
135 class TestElement(etree.ElementBase): -136 FIND_ME = "default element" -
137 class TestComment(etree.CommentBase): -138 FIND_ME = "default comment" -139 class TestPI(etree.PIBase): -140 FIND_ME = "default pi" -141 -142 parser = etree.XMLParser() -143 -144 lookup = etree.ElementDefaultClassLookup( -145 element=TestElement, comment=TestComment, pi=TestPI) -146 parser.set_element_class_lookup(lookup) -147 -148 root = etree.XML(_bytes("""<?xml version='1.0'?> -149 <root> -150 <?myPI?> -151 <!-- hi --> -152 </root> -153 """), parser) -154 -155 self.assertEqual("default element", root.FIND_ME) -156 self.assertEqual("default pi", root[0].FIND_ME) -157 self.assertEqual("default comment", root[1].FIND_ME) -158 -
160 class TestElement(etree.ElementBase): -161 FIND_ME = "default element" -
162 class TestComment(etree.CommentBase): -163 FIND_ME = "default comment" -164 class TestPI(etree.PIBase): -165 FIND_ME = "default pi" -166 -167 parser = etree.XMLPullParser(events=('start', 'end', 'comment', 'pi')) -168 lookup = etree.ElementDefaultClassLookup( -169 element=TestElement, comment=TestComment, pi=TestPI) -170 parser.set_element_class_lookup(lookup) -171 -172 events_seen = [] -173 -174 def add_events(events): -175 for ev, el in events: -176 events_seen.append((ev, el.FIND_ME)) -177 -178 parser.feed("""<?xml version='1.0'?> -179 <root> -180 <?myPI?> -181 """) -182 add_events(parser.read_events()) -183 -184 parser.feed("<!-- hi -->") -185 add_events(parser.read_events()) -186 -187 parser.feed("</root>") -188 root = parser.close() -189 add_events(parser.read_events()) -190 -191 self.assertEqual([ -192 ('start', "default element"), -193 ('pi', "default pi"), -194 ('comment', "default comment"), -195 ('end', "default element"), -196 ], events_seen) -197 -198 self.assertEqual("default element", root.FIND_ME) -199 self.assertEqual("default pi", root[0].FIND_ME) -200 self.assertEqual("default comment", root[1].FIND_ME) -201 -
202 - def test_evil_class_lookup(self): -
203 class MyLookup(etree.CustomElementClassLookup): -204 def lookup(self, t, d, ns, name): -205 if name == 'none': -206 return None -207 elif name == 'obj': -208 return object() -209 else: -210 return etree.ElementBase -
211 -212 parser = etree.XMLParser() -213 parser.set_element_class_lookup(MyLookup()) -214 -215 root = etree.XML(_bytes('<none/>'), parser) -216 self.assertEqual('none', root.tag) -217 -218 self.assertRaises( -219 TypeError, -220 etree.XML, _bytes("<obj />"), parser) -221 -222 root = etree.XML(_bytes('<root/>'), parser) -223 self.assertEqual('root', root.tag) -224 -
226 class MyLookup(etree.CustomElementClassLookup): -227 def lookup(self, t, d, ns, name): -228 if t == 'element': -229 if name == 'root': -230 return etree.ElementBase -231 return etree.CommentBase -232 elif t == 'comment': -233 return etree.PIBase -234 elif t == 'PI': -235 return etree.EntityBase -236 elif t == 'entity': -237 return etree.ElementBase -238 else: -239 raise ValueError('got type %s' % t) -
240 -241 parser = etree.XMLParser(resolve_entities=False) -242 parser.set_element_class_lookup(MyLookup()) -243 -244 root = etree.XML(_bytes('<root></root>'), parser) -245 self.assertEqual('root', root.tag) -246 self.assertEqual(etree.ElementBase, type(root)) -247 -248 root = etree.XML(_bytes("<root><test/></root>"), parser) -249 self.assertRaises(TypeError, root.__getitem__, 0) -250 -251 root = etree.XML(_bytes("<root><!-- test --></root>"), parser) -252 self.assertRaises(TypeError, root.__getitem__, 0) -253 -254 root = etree.XML(_bytes("<root><?test?></root>"), parser) -255 self.assertRaises(TypeError, root.__getitem__, 0) -256 -257 root = etree.XML( -258 _bytes('<!DOCTYPE root [<!ENTITY myent "ent">]>' -259 '<root>&myent;</root>'), -260 parser) -261 self.assertRaises(TypeError, root.__getitem__, 0) -262 -263 root = etree.XML(_bytes('<root><root/></root>'), parser) -264 self.assertEqual('root', root[0].tag) -265 -
267 class TestElement(etree.ElementBase): -268 FIND_ME = "attribute_based" -
269 -270 class_dict = {"A1" : TestElement} -271 -272 lookup = etree.AttributeBasedElementClassLookup( -273 "a1", class_dict) -274 etree.set_element_class_lookup(lookup) -275 -276 root = etree.XML(xml_str) -277 self.assertFalse(hasattr(root, 'FIND_ME')) -278 self.assertEqual(root[0].FIND_ME, -279 TestElement.FIND_ME) -280 self.assertFalse(hasattr(root[0][0], 'FIND_ME')) -281 -
282 - def test_custom_lookup(self): -
283 class TestElement(etree.ElementBase): -284 FIND_ME = "custom" -
285 -286 class MyLookup(etree.CustomElementClassLookup): -287 def lookup(self, t, d, ns, name): -288 if name == 'c1': -289 return TestElement -290 -291 etree.set_element_class_lookup( MyLookup() ) -292 -293 root = etree.XML(xml_str) -294 self.assertFalse(hasattr(root, 'FIND_ME')) -295 self.assertEqual(root[0].FIND_ME, -296 TestElement.FIND_ME) -297 self.assertFalse(hasattr(root[0][1], 'FIND_ME')) -298 -
300 class TestElement1(etree.ElementBase): -301 FIND_ME = "custom" -
302 -303 class TestElement2(etree.ElementBase): -304 FIND_ME = "nsclasses" -305 -306 class MyLookup(etree.CustomElementClassLookup): -307 def lookup(self, t, d, ns, name): -308 if name == 'c1': -309 return TestElement1 -310 -311 lookup = etree.ElementNamespaceClassLookup( MyLookup() ) -312 etree.set_element_class_lookup(lookup) -313 -314 ns = lookup.get_namespace("otherNS") -315 ns[None] = TestElement2 -316 -317 root = etree.XML(xml_str) -318 self.assertFalse(hasattr(root, 'FIND_ME')) -319 self.assertEqual(root[0].FIND_ME, -320 TestElement1.FIND_ME) -321 self.assertFalse(hasattr(root[0][1], 'FIND_ME')) -322 self.assertEqual(root[0][-1].FIND_ME, -323 TestElement2.FIND_ME) -324 -
325 - def test_parser_based_lookup(self): -
326 class TestElement(etree.ElementBase): -327 FIND_ME = "parser_based" -
328 -329 lookup = etree.ParserBasedElementClassLookup() -330 etree.set_element_class_lookup(lookup) -331 -332 class MyLookup(etree.CustomElementClassLookup): -333 def lookup(self, t, d, ns, name): -334 return TestElement -335 -336 parser = etree.XMLParser() -337 parser.set_element_class_lookup( MyLookup() ) -338 -339 root = etree.parse(BytesIO(xml_str), parser).getroot() -340 self.assertEqual(root.FIND_ME, -341 TestElement.FIND_ME) -342 self.assertEqual(root[0].FIND_ME, -343 TestElement.FIND_ME) -344 -345 root = etree.parse(BytesIO(xml_str)).getroot() -346 self.assertFalse(hasattr(root, 'FIND_ME')) -347 self.assertFalse(hasattr(root[0], 'FIND_ME')) -348 -
349 - def test_class_lookup_reentry(self): -
350 XML = self.etree.XML -351 -352 class TestElement(etree.ElementBase): -353 FIND_ME = "here" -
354 -355 root = None -356 class MyLookup(etree.CustomElementClassLookup): -357 el = None -358 def lookup(self, t, d, ns, name): -359 if root is not None: # not in the parser -360 if self.el is None and name == "a": -361 self.el = [] -362 self.el.append(root.find(name)) -363 return TestElement -364 -365 parser = self.etree.XMLParser() -366 parser.set_element_class_lookup(MyLookup()) -367 -368 root = XML(_bytes('<root><a>A</a><b xmlns="test">B</b></root>'), -369 parser) -370 -371 a = root[0] -372 self.assertEqual(a.tag, "a") -373 self.assertEqual(root[0].tag, "a") -374 del a -375 self.assertEqual(root[0].tag, "a") -376 -
378 class Lookup(etree.CustomElementClassLookup): -379 def __init__(self): -380 # no super call here, so no fallback is set -381 pass -
382 -383 def lookup(self, node_type, document, namespace, name): -384 return Foo -385 -386 class Foo(etree.ElementBase): -387 def custom(self): -388 return "test" -389 -390 parser = self.etree.XMLParser() -391 parser.set_element_class_lookup( Lookup() ) -392 -393 root = etree.XML('<foo/>', parser) -394 -395 self.assertEqual("test", root.custom()) -396 -397 -
398 -def test_suite(): -
399 suite = unittest.TestSuite() -400 suite.addTests([unittest.makeSuite(ProxyTestCase)]) -401 suite.addTests([unittest.makeSuite(ClassLookupTestCase)]) -402 return suite -
403 -404 if __name__ == '__main__': -405 print('to test use test.py %s' % __file__) -406 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_classlookup.ClassLookupTestCase-class.html b/doc/html/api/lxml.tests.test_classlookup.ClassLookupTestCase-class.html deleted file mode 100644 index 06f37e2..0000000 --- a/doc/html/api/lxml.tests.test_classlookup.ClassLookupTestCase-class.html +++ /dev/null @@ -1,623 +0,0 @@ - - - - - lxml.tests.test_classlookup.ClassLookupTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_classlookup :: - Class ClassLookupTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ClassLookupTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ClassLookupTestCase
-
- -
-Test cases for different Element class lookup mechanisms. - - - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_namespace_lookup(self) - source code - -
- -
-   - - - - - - -
test_default_class_lookup(self) - source code - -
- -
-   - - - - - - -
test_default_class_lookup_pull_parser(self) - source code - -
- -
-   - - - - - - -
test_evil_class_lookup(self) - source code - -
- -
-   - - - - - - -
test_class_lookup_type_mismatch(self) - source code - -
- -
-   - - - - - - -
test_attribute_based_lookup(self) - source code - -
- -
-   - - - - - - -
test_custom_lookup(self) - source code - -
- -
-   - - - - - - -
test_custom_lookup_ns_fallback(self) - source code - -
- -
-   - - - - - - -
test_parser_based_lookup(self) - source code - -
- -
-   - - - - - - -
test_class_lookup_reentry(self) - source code - -
- -
-   - - - - - - -
test_lookup_without_fallback(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - etree
- The lxml.etree module implements the extended ElementTree API for XML. -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- - Hook method for deconstructing the test fixture after testing it. -
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

etree

- The lxml.etree module implements the extended ElementTree API for XML. -
-
-
-
Value:
-
lxml.etree
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_classlookup.ProxyTestCase-class.html b/doc/html/api/lxml.tests.test_classlookup.ProxyTestCase-class.html deleted file mode 100644 index 18a9727..0000000 --- a/doc/html/api/lxml.tests.test_classlookup.ProxyTestCase-class.html +++ /dev/null @@ -1,517 +0,0 @@ - - - - - lxml.tests.test_classlookup.ProxyTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_classlookup :: - Class ProxyTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ProxyTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ProxyTestCase
-
- -
-Basic tests for element proxy behaviour. - - - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_proxy_reuse(self) - source code - -
- -
-   - - - - - - -
test_proxy_reuse_after_gc(self) - source code - -
- -
-   - - - - - - -
test_proxy_reuse_after_del_root(self) - source code - -
- -
-   - - - - - - -
test_proxy_hashing(self) - source code - -
- -
-   - - - - - - -
test_element_base(self) - source code - -
- -
-   - - - - - - -
test_element_base_children(self) - source code - -
- -
-   - - - - - - -
test_comment_base(self) - source code - -
- -
-   - - - - - - -
test_pi_base(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - etree
- The lxml.etree module implements the extended ElementTree API for XML. -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

etree

- The lxml.etree module implements the extended ElementTree API for XML. -
-
-
-
Value:
-
lxml.etree
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_css-module.html b/doc/html/api/lxml.tests.test_css-module.html deleted file mode 100644 index cd7ee54..0000000 --- a/doc/html/api/lxml.tests.test_css-module.html +++ /dev/null @@ -1,254 +0,0 @@ - - - - - lxml.tests.test_css - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_css - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module test_css

source code

- - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - CSSTestCase -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
test_suite() - source code - -
- -
- - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - HTML = '\n<div>\n <a href="foo">link</a>\n <a>anchor</a>\n</... -
-   - - __package__ = 'lxml.tests' -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

HTML

- -
-
-
-
Value:
-
-'''
-<div>
-  <a href="foo">link</a>
-  <a>anchor</a>
-</div>
-'''
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_css-pysrc.html b/doc/html/api/lxml.tests.test_css-pysrc.html deleted file mode 100644 index 124ca03..0000000 --- a/doc/html/api/lxml.tests.test_css-pysrc.html +++ /dev/null @@ -1,234 +0,0 @@ - - - - - lxml.tests.test_css - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_css - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.test_css

-
- 1  import unittest 
- 2   
- 3  import lxml.html 
- 4   
- 5  from lxml.tests.common_imports import doctest, HelperTestCase, skipif 
- 6   
- 7  try: 
- 8      import cssselect 
- 9  except ImportError: 
-10      cssselect = None 
-11   
-12   
-13  HTML = ''' 
-14  <div> 
-15    <a href="foo">link</a> 
-16    <a>anchor</a> 
-17  </div> 
-18  ''' 
-19   
-20   
-
21 -class CSSTestCase(HelperTestCase): -
22 -23 pytestmark = skipif('cssselect is None') -24 -
25 - def test_cssselect(self): -
26 div, = lxml.html.fromstring(HTML).xpath('//div') -27 -28 def count(selector, expected_count, **kwargs): -29 result = div.cssselect(selector, **kwargs) -30 self.assertEqual(len(result), expected_count) -
31 -32 count('div', 1) -33 count('a', 2) -34 count('em', 0) -35 # Element names are case-insensitive in HTML -36 count('DIV', 1) -37 # ... but not in XHTML or XML -38 count('DIV', 0, translator='xhtml') -39 count('DIV', 0, translator='xml') -40 -41 # :contains() is case-insensitive in lxml -42 count(':contains("link")', 2) # div, a -43 count(':contains("LInk")', 2) -44 # Whatever the document language -45 count(':contains("LInk")', 2, translator='xhtml') -46 count(':contains("LInk")', 2, translator='xml') -47 # ... but not in upstream cssselect -48 import cssselect -49 count(':contains("link")', 2, translator=cssselect.HTMLTranslator()) -50 count(':contains("LInk")', 0, translator=cssselect.HTMLTranslator()) -
51 -52 -
53 -def test_suite(): -
54 suite = unittest.TestSuite() -55 try: -56 import cssselect -57 except ImportError: -58 # no 'cssselect' installed -59 print("Skipping tests in lxml.cssselect - external cssselect package is not installed") -60 return suite -61 -62 import lxml.cssselect -63 suite.addTests(doctest.DocTestSuite(lxml.cssselect)) -64 suite.addTests([unittest.makeSuite(CSSTestCase)]) -65 return suite -
66 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_css.CSSTestCase-class.html b/doc/html/api/lxml.tests.test_css.CSSTestCase-class.html deleted file mode 100644 index 4b0d745..0000000 --- a/doc/html/api/lxml.tests.test_css.CSSTestCase-class.html +++ /dev/null @@ -1,368 +0,0 @@ - - - - - lxml.tests.test_css.CSSTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_css :: - Class CSSTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class CSSTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               CSSTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_cssselect(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - pytestmark = <lxml.tests.common_imports.skipif object> -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_doctestcompare-module.html b/doc/html/api/lxml.tests.test_doctestcompare-module.html deleted file mode 100644 index 8bda529..0000000 --- a/doc/html/api/lxml.tests.test_doctestcompare-module.html +++ /dev/null @@ -1,224 +0,0 @@ - - - - - lxml.tests.test_doctestcompare - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_doctestcompare - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module test_doctestcompare

source code

- - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - DummyInput -
-   - - DoctestCompareTest -
- - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
indent(elem, - level=0) - source code - -
- -
-   - - - - - - -
test_suite() - source code - -
- -
- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = 'lxml.tests' -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_doctestcompare-pysrc.html b/doc/html/api/lxml.tests.test_doctestcompare-pysrc.html deleted file mode 100644 index 613846e..0000000 --- a/doc/html/api/lxml.tests.test_doctestcompare-pysrc.html +++ /dev/null @@ -1,356 +0,0 @@ - - - - - lxml.tests.test_doctestcompare - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_doctestcompare - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.test_doctestcompare

-
-  1  import sys 
-  2  import unittest 
-  3   
-  4  from lxml import etree 
-  5  from lxml.tests.common_imports import HelperTestCase 
-  6  from lxml.doctestcompare import LXMLOutputChecker, PARSE_HTML, PARSE_XML 
-  7   
-  8   
-
9 -class DummyInput: -
10 - def __init__(self, **kw): -
11 for name, value in kw.items(): - 12 setattr(self, name, value) -
13 - 14 -
15 -def indent(elem, level=0): -
16 i = "\n" + level*" " - 17 if len(elem): - 18 if not elem.text or not elem.text.strip(): - 19 elem.text = i + " " - 20 if not elem.tail or not elem.tail.strip(): - 21 elem.tail = i - 22 for elem in elem: - 23 indent(elem, level+1) - 24 if not elem.tail or not elem.tail.strip(): - 25 elem.tail = i - 26 else: - 27 if level and (not elem.tail or not elem.tail.strip()): - 28 elem.tail = i -
29 - 30 -
31 -class DoctestCompareTest(HelperTestCase): -
32 _checker = LXMLOutputChecker() - 33 -
34 - def compare(self, want, got, html=False): -
35 if html: - 36 options = PARSE_HTML - 37 else: - 38 options = PARSE_XML - 39 - 40 parse = self._checker.get_parser(want, got, options) - 41 want_doc = parse(want) - 42 got_doc = parse(got) - 43 return self._checker.collect_diff( - 44 want_doc, got_doc, html, indent=0).lstrip() -
45 -
46 - def assert_diff(self, want, got, diff, html=False): -
47 self.assertEqual(self.compare(want, got, html), diff) -
48 -
49 - def assert_nodiff(self, want, got, html=False): -
50 root = etree.fromstring(want) - 51 root.tail = '\n' - 52 indent(root) - 53 diff = etree.tostring( - 54 root, encoding='unicode', method=html and 'html' or 'xml') - 55 self.assert_diff(want, got, diff, html=html) -
56 -
57 - def test_equal_input(self): -
58 self.assert_nodiff( - 59 '<p title="expected">Expected</p>', - 60 '<p title="expected">Expected</p>') -
61 -
62 - def test_differing_tags(self): -
63 self.assert_diff( - 64 '<p title="expected">Expected</p>', - 65 '<b title="expected">Expected</b>', - 66 '<p (got: b) title="expected">Expected</p (got: b)>\n') -
67 -
68 - def test_tags_upper_lower_case(self): -
69 self.assert_diff( - 70 '<p title="expected">Expected</p>', - 71 '<P title="expected">Expected</P>', - 72 '<p (got: P) title="expected">Expected</p (got: P)>\n') -
73 -
75 self.assert_nodiff( - 76 '<html><body><p title="expected">Expected</p></body></html>', - 77 '<HTML><BODY><P title="expected">Expected</P></BODY></HTML>', - 78 html=True) -
79 -
80 - def test_differing_attributes(self): -
81 self.assert_diff( - 82 '<p title="expected">Expected</p>', - 83 '<p title="actual">Actual</p>', - 84 '<p title="expected (got: actual)">Expected (got: Actual)</p>\n') -
85 -
86 - def test_extra_children(self): -
87 # https://bugs.launchpad.net/lxml/+bug/1238503 - 88 self.assert_diff( - 89 '<p><span>One</span></p>', - 90 '<p><span>One</span><b>Two</b><em>Three</em></p>', - 91 '<p>\n' - 92 ' <span>One</span>\n' - 93 ' +<b>Two</b>\n' - 94 ' +<em>Three</em>\n' - 95 '</p>\n') -
96 -
97 - def test_missing_children(self): -
98 self.assert_diff( - 99 '<p><span>One</span><b>Two</b><em>Three</em></p>', -100 '<p><span>One</span></p>', -101 '<p>\n' -102 ' <span>One</span>\n' -103 ' -<b>Two</b>\n' -104 ' -<em>Three</em>\n' -105 '</p>\n') -
106 -
107 - def test_extra_attributes(self): -
108 self.assert_diff( -109 '<p><span class="foo">Text</span></p>', -110 '<p><span class="foo" id="bar">Text</span></p>', -111 '<p>\n' -112 ' <span class="foo" +id="bar">Text</span>\n' -113 '</p>\n') -
114 -
115 - def test_missing_attributes(self): -
116 self.assert_diff( -117 '<p><span class="foo" id="bar">Text</span></p>', -118 '<p><span class="foo">Text</span></p>', -119 '<p>\n' -120 ' <span class="foo" -id="bar">Text</span>\n' -121 '</p>\n') -
122 -123 -
124 -def test_suite(): -
125 suite = unittest.TestSuite() -126 if sys.version_info >= (2,4): -127 suite.addTests([unittest.makeSuite(DoctestCompareTest)]) -128 return suite -
129 -130 -131 if __name__ == '__main__': -132 unittest.main() -133 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_doctestcompare.DoctestCompareTest-class.html b/doc/html/api/lxml.tests.test_doctestcompare.DoctestCompareTest-class.html deleted file mode 100644 index ceb3fdd..0000000 --- a/doc/html/api/lxml.tests.test_doctestcompare.DoctestCompareTest-class.html +++ /dev/null @@ -1,554 +0,0 @@ - - - - - lxml.tests.test_doctestcompare.DoctestCompareTest - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_doctestcompare :: - Class DoctestCompareTest - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class DoctestCompareTest

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               DoctestCompareTest
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
compare(self, - want, - got, - html=False) - source code - -
- -
-   - - - - - - -
assert_diff(self, - want, - got, - diff, - html=False) - source code - -
- -
-   - - - - - - -
assert_nodiff(self, - want, - got, - html=False) - source code - -
- -
-   - - - - - - -
test_equal_input(self) - source code - -
- -
-   - - - - - - -
test_differing_tags(self) - source code - -
- -
-   - - - - - - -
test_tags_upper_lower_case(self) - source code - -
- -
-   - - - - - - -
test_tags_upper_lower_case_html(self) - source code - -
- -
-   - - - - - - -
test_differing_attributes(self) - source code - -
- -
-   - - - - - - -
test_extra_children(self) - source code - -
- -
-   - - - - - - -
test_missing_children(self) - source code - -
- -
-   - - - - - - -
test_extra_attributes(self) - source code - -
- -
-   - - - - - - -
test_missing_attributes(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - _checker = <lxml.doctestcompare.LXMLOutputChecker object> -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_doctestcompare.DummyInput-class.html b/doc/html/api/lxml.tests.test_doctestcompare.DummyInput-class.html deleted file mode 100644 index c6d0b73..0000000 --- a/doc/html/api/lxml.tests.test_doctestcompare.DummyInput-class.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - lxml.tests.test_doctestcompare.DummyInput - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_doctestcompare :: - Class DummyInput - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class DummyInput

source code

- - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - **kw) - source code - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_dtd-module.html b/doc/html/api/lxml.tests.test_dtd-module.html deleted file mode 100644 index 7902fdc..0000000 --- a/doc/html/api/lxml.tests.test_dtd-module.html +++ /dev/null @@ -1,246 +0,0 @@ - - - - - lxml.tests.test_dtd - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_dtd - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module test_dtd

source code

-Test cases related to DTD parsing and validation - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - ETreeDtdTestCase -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
test_suite() - source code - -
- -
- - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - this_dir = '/home/stefan/source/Python/lxml/lxml-release/src/l... -
-   - - __package__ = 'lxml.tests' -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

this_dir

- -
-
-
-
Value:
-
-'/home/stefan/source/Python/lxml/lxml-release/src/lxml/tests'
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_dtd-pysrc.html b/doc/html/api/lxml.tests.test_dtd-pysrc.html deleted file mode 100644 index ffc9dac..0000000 --- a/doc/html/api/lxml.tests.test_dtd-pysrc.html +++ /dev/null @@ -1,1258 +0,0 @@ - - - - - lxml.tests.test_dtd - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_dtd - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.test_dtd

-
-  1  # -*- coding: utf-8 -*- 
-  2   
-  3  """ 
-  4  Test cases related to DTD parsing and validation 
-  5  """ 
-  6   
-  7  import unittest, sys, os.path 
-  8   
-  9  this_dir = os.path.dirname(__file__) 
- 10  if this_dir not in sys.path: 
- 11      sys.path.insert(0, this_dir)  # needed for Py3 
- 12   
- 13  from common_imports import etree, html, BytesIO, _bytes, _str 
- 14  from common_imports import HelperTestCase, make_doctest, skipIf 
- 15  from common_imports import fileInTestDir, fileUrlInTestDir 
-
16 - 17 - 18 -class ETreeDtdTestCase(HelperTestCase): -
19 - def test_dtd(self): -
20 pass -
21 -
22 - def test_dtd_file(self): -
23 parse = etree.parse - 24 tree = parse(fileInTestDir("test.xml")) - 25 root = tree.getroot() - 26 - 27 dtd = etree.DTD(fileInTestDir("test.dtd")) - 28 self.assertTrue(dtd.validate(root)) -
29 -
30 - def test_dtd_stringio(self): -
31 root = etree.XML(_bytes("<b/>")) - 32 dtd = etree.DTD(BytesIO("<!ELEMENT b EMPTY>")) - 33 self.assertTrue(dtd.validate(root)) -
34 -
35 - def test_dtd_parse_invalid(self): -
36 fromstring = etree.fromstring - 37 parser = etree.XMLParser(dtd_validation=True) - 38 xml = _bytes('<!DOCTYPE b SYSTEM "%s"><b><a/></b>' % - 39 fileInTestDir("test.dtd")) - 40 self.assertRaises(etree.XMLSyntaxError, - 41 fromstring, xml, parser=parser) -
42 -
44 fromstring = etree.fromstring - 45 dtd_filename = fileUrlInTestDir("__nosuch.dtd") - 46 parser = etree.XMLParser(dtd_validation=True) - 47 xml = _bytes('<!DOCTYPE b SYSTEM "%s"><b><a/></b>' % dtd_filename) - 48 self.assertRaises(etree.XMLSyntaxError, - 49 fromstring, xml, parser=parser) - 50 errors = None - 51 try: - 52 fromstring(xml, parser=parser) - 53 except etree.XMLSyntaxError: - 54 e = sys.exc_info()[1] - 55 self.assertTrue(e.error_log) - 56 self.assertTrue(parser.error_log) - 57 errors = [entry.message for entry in e.error_log - 58 if dtd_filename in entry.message] - 59 self.assertTrue(errors) -
60 -
61 - def test_dtd_parse_valid(self): -
62 parser = etree.XMLParser(dtd_validation=True) - 63 xml = ('<!DOCTYPE a SYSTEM "%s"><a><b/></a>' % - 64 fileUrlInTestDir("test.dtd")) - 65 root = etree.fromstring(xml, parser=parser) -
66 -
68 parser = etree.XMLParser(dtd_validation=True) - 69 xml = ('<!DOCTYPE a SYSTEM "%s"><a><b/></a>' % - 70 fileUrlInTestDir("test.dtd")) - 71 root = etree.fromstring(xml, parser=parser) -
72 -
74 parser = etree.XMLParser(dtd_validation=True) - 75 xml = '<!DOCTYPE a SYSTEM "test.dtd"><a><b/></a>' - 76 root = etree.fromstring( - 77 xml, parser=parser, base_url=fileUrlInTestDir("test.xml")) -
78 -
80 parser = etree.XMLParser(dtd_validation=True) - 81 xml = '<!DOCTYPE a SYSTEM "test.dtd"><a><b/></a>' - 82 root = etree.fromstring( - 83 xml, parser=parser, base_url=fileUrlInTestDir("test.xml")) -
84 -
85 - def test_dtd_invalid(self): -
86 root = etree.XML("<b><a/></b>") - 87 dtd = etree.DTD(BytesIO("<!ELEMENT b EMPTY>")) - 88 self.assertRaises(etree.DocumentInvalid, dtd.assertValid, root) -
89 -
90 - def test_dtd_assertValid(self): -
91 root = etree.XML("<b><a/></b>") - 92 dtd = etree.DTD(BytesIO("<!ELEMENT b (a)><!ELEMENT a EMPTY>")) - 93 dtd.assertValid(root) -
94 -
95 - def test_dtd_internal(self): -
96 root = etree.XML(_bytes(''' - 97 <!DOCTYPE b SYSTEM "none" [ - 98 <!ELEMENT b (a)> - 99 <!ELEMENT a EMPTY> -100 ]> -101 <b><a/></b> -102 ''')) -103 dtd = etree.ElementTree(root).docinfo.internalDTD -104 self.assertTrue(dtd) -105 dtd.assertValid(root) -
106 -
107 - def test_dtd_internal_invalid(self): -
108 root = etree.XML(_bytes(''' -109 <!DOCTYPE b SYSTEM "none" [ -110 <!ELEMENT b (a)> -111 <!ELEMENT a (c)> -112 <!ELEMENT c EMPTY> -113 ]> -114 <b><a/></b> -115 ''')) -116 dtd = etree.ElementTree(root).docinfo.internalDTD -117 self.assertTrue(dtd) -118 self.assertFalse(dtd.validate(root)) -
119 -
121 root = etree.XML(_bytes(''' -122 <a><b id="id1"/><b id="id2"/><b id="id1"/></a> -123 ''')) -124 dtd = etree.DTD(BytesIO(_bytes(""" -125 <!ELEMENT a (b*)> -126 <!ATTLIST b -127 id ID #REQUIRED -128 > -129 <!ELEMENT b EMPTY> -130 """))) -131 self.assertFalse(dtd.validate(root)) -132 self.assertTrue(dtd.error_log) -133 self.assertTrue([error for error in dtd.error_log -134 if 'id1' in error.message]) -
135 -
136 - def test_dtd_api_internal(self): -
137 root = etree.XML(_bytes(''' -138 <!DOCTYPE b SYSTEM "none" [ -139 <!ATTLIST a -140 attr1 (x | y | z) "z" -141 attr2 CDATA #FIXED "X" -142 > -143 <!ELEMENT b (a)> -144 <!ELEMENT a EMPTY> -145 ]> -146 <b><a/></b> -147 ''')) -148 dtd = etree.ElementTree(root).docinfo.internalDTD -149 self.assertTrue(dtd) -150 dtd.assertValid(root) -151 -152 seen = [] -153 for el in dtd.iterelements(): -154 if el.name == 'a': -155 self.assertEqual(2, len(el.attributes())) -156 for attr in el.iterattributes(): -157 if attr.name == 'attr1': -158 self.assertEqual('enumeration', attr.type) -159 self.assertEqual('none', attr.default) -160 self.assertEqual('z', attr.default_value) -161 values = attr.values() -162 values.sort() -163 self.assertEqual(['x', 'y', 'z'], values) -164 else: -165 self.assertEqual('attr2', attr.name) -166 self.assertEqual('cdata', attr.type) -167 self.assertEqual('fixed', attr.default) -168 self.assertEqual('X', attr.default_value) -169 else: -170 self.assertEqual('b', el.name) -171 self.assertEqual(0, len(el.attributes())) -172 seen.append(el.name) -173 seen.sort() -174 self.assertEqual(['a', 'b'], seen) -175 self.assertEqual(2, len(dtd.elements())) -
176 -
177 - def test_internal_dtds(self): -
178 for el_count in range(2, 5): -179 for attr_count in range(4): -180 root = etree.XML(_bytes(''' -181 <!DOCTYPE el0 SYSTEM "none" [ -182 ''' + ''.join([''' -183 <!ATTLIST el%d -184 attr%d (x | y | z) "z" -185 > -186 ''' % (e, a) for a in range(attr_count) for e in range(el_count) -187 ]) + ''.join([''' -188 <!ELEMENT el%d EMPTY> -189 ''' % e for e in range(1, el_count) -190 ]) + ''' -191 ''' + '<!ELEMENT el0 (%s)>' % '|'.join([ -192 'el%d' % e for e in range(1, el_count)]) + ''' -193 ]> -194 <el0><el1 %s /></el0> -195 ''' % ' '.join(['attr%d="x"' % a for a in range(attr_count)]))) -196 dtd = etree.ElementTree(root).docinfo.internalDTD -197 self.assertTrue(dtd) -198 dtd.assertValid(root) -199 -200 e = -1 -201 for e, el in enumerate(dtd.iterelements()): -202 self.assertEqual(attr_count, len(el.attributes())) -203 a = -1 -204 for a, attr in enumerate(el.iterattributes()): -205 self.assertEqual('enumeration', attr.type) -206 self.assertEqual('none', attr.default) -207 self.assertEqual('z', attr.default_value) -208 values = sorted(attr.values()) -209 self.assertEqual(['x', 'y', 'z'], values) -210 self.assertEqual(attr_count - 1, a) -211 self.assertEqual(el_count - 1, e) -212 self.assertEqual(el_count, len(dtd.elements())) -
213 -
214 - def test_dtd_broken(self): -
215 self.assertRaises(etree.DTDParseError, etree.DTD, -216 BytesIO("<!ELEMENT b HONKEY>")) -
217 -
218 - def test_parse_file_dtd(self): -
219 parser = etree.XMLParser(attribute_defaults=True) -220 -221 tree = etree.parse(fileInTestDir('test.xml'), parser) -222 root = tree.getroot() -223 -224 self.assertEqual( -225 "valueA", -226 root.get("default")) -227 self.assertEqual( -228 "valueB", -229 root[0].get("default")) -
230 -231 @skipIf(etree.LIBXML_VERSION == (2, 9, 0), -232 "DTD loading is broken for incremental parsing in libxml2 2.9.0") -
234 iterparse = etree.iterparse -235 iterator = iterparse(fileInTestDir("test.xml"), events=('start',), -236 attribute_defaults=True) -237 attributes = [ element.get("default") -238 for event, element in iterator ] -239 self.assertEqual( -240 ["valueA", "valueB"], -241 attributes) -
242 -243 @skipIf(etree.LIBXML_VERSION == (2, 9, 0), -244 "DTD loading is broken for incremental parsing in libxml2 2.9.0") -
246 iterparse = etree.iterparse -247 iterator = iterparse(fileInTestDir("test.xml"), events=('end',), -248 attribute_defaults=True) -249 attributes = [ element.get("default") -250 for event, element in iterator ] -251 self.assertEqual( -252 ["valueB", "valueA"], -253 attributes) -
254 -
255 - def test_dtd_attrs(self): -
256 dtd = etree.DTD(fileUrlInTestDir("test.dtd")) -257 -258 # Test DTD.system_url attribute -259 self.assertTrue(dtd.system_url.endswith("test.dtd")) -260 -261 # Test elements and their attributes -262 a = dtd.elements()[0] -263 self.assertEqual(a.name, "a") -264 self.assertEqual(a.type, "element") -265 self.assertEqual(a.content.name, "b") -266 self.assertEqual(a.content.type, "element") -267 self.assertEqual(a.content.occur, "once") -268 -269 aattr = a.attributes()[0] -270 self.assertEqual(aattr.name, "default") -271 self.assertEqual(aattr.type, "enumeration") -272 self.assertEqual(aattr.values(), ["valueA", "valueB"]) -273 self.assertEqual(aattr.default_value, "valueA") -274 -275 b = dtd.elements()[1] -276 self.assertEqual(b.name, "b") -277 self.assertEqual(b.type, "empty") -278 self.assertEqual(b.content, None) -279 -280 # Test entities and their attributes -281 c = dtd.entities()[0] -282 self.assertEqual(c.name, "c") -283 self.assertEqual(c.orig, "&#42;") -284 self.assertEqual(c.content, "*") -285 -286 # Test DTD.name attribute -287 root = etree.XML(_bytes(''' -288 <!DOCTYPE a SYSTEM "none" [ -289 <!ELEMENT a EMPTY> -290 ]> -291 <a/> -292 ''')) -293 dtd = etree.ElementTree(root).docinfo.internalDTD -294 self.assertEqual(dtd.name, "a") -295 -296 # Test DTD.name and DTD.systemID attributes -297 parser = etree.XMLParser(dtd_validation=True) -298 xml = '<!DOCTYPE a SYSTEM "test.dtd"><a><b/></a>' -299 root = etree.fromstring(xml, parser=parser, -300 base_url=fileUrlInTestDir("test.xml")) -301 -302 dtd = root.getroottree().docinfo.internalDTD -303 self.assertEqual(dtd.name, "a") -304 self.assertEqual(dtd.system_url, "test.dtd") -
305 -
307 # Standard allows quotes in systemliteral, but in that case -308 # systemliteral must be escaped with single quotes. -309 # See http://www.w3.org/TR/REC-xml/#sec-prolog-dtd. -310 root = etree.XML('''<!DOCTYPE a PUBLIC 'foo' '"'><a/>''') -311 doc = root.getroottree() -312 self.assertEqual(doc.docinfo.doctype, -313 '''<!DOCTYPE a PUBLIC "foo" '"'>''') -314 self.assertEqual(etree.tostring(doc), -315 _bytes('''<!DOCTYPE a PUBLIC "foo" '"'>\n<a/>''')) -
316 -
318 root = etree.XML('''<!DOCTYPE a SYSTEM '"'><a/>''') -319 doc = root.getroottree() -320 self.assertEqual(doc.docinfo.doctype, '''<!DOCTYPE a SYSTEM '"'>''') -321 self.assertEqual(etree.tostring(doc), -322 _bytes('''<!DOCTYPE a SYSTEM '"'>\n<a/>''')) -
323 -
324 - def test_declaration_apos(self): -
325 root = etree.XML('''<!DOCTYPE a SYSTEM "'"><a/>''') -326 doc = root.getroottree() -327 self.assertEqual(doc.docinfo.doctype, '''<!DOCTYPE a SYSTEM "'">''') -328 self.assertEqual(etree.tostring(doc), -329 _bytes('''<!DOCTYPE a SYSTEM "'">\n<a/>''')) -
330 -
331 - def test_ietf_decl(self): -
332 html_data = ( -333 '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">\n' -334 '<html></html>') -335 root = etree.HTML(html_data) -336 doc = root.getroottree() -337 self.assertEqual(doc.docinfo.doctype, -338 '<!DOCTYPE html PUBLIC "-//IETF//DTD HTML//EN">') -339 self.assertEqual(etree.tostring(doc, method='html'), _bytes(html_data)) -
340 -
341 - def test_set_decl_public(self): -
342 doc = etree.Element('test').getroottree() -343 doc.docinfo.public_id = 'bar' -344 doc.docinfo.system_url = 'baz' -345 self.assertEqual(doc.docinfo.doctype, -346 '<!DOCTYPE test PUBLIC "bar" "baz">') -347 self.assertEqual(etree.tostring(doc), -348 _bytes('<!DOCTYPE test PUBLIC "bar" "baz">\n<test/>')) -
349 -
350 - def test_html_decl(self): -
351 # Slightly different to one above: when we create an html element, -352 # we do not start with a blank slate. -353 doc = html.Element('html').getroottree() -354 doc.docinfo.public_id = 'bar' -355 doc.docinfo.system_url = 'baz' -356 self.assertEqual(doc.docinfo.doctype, -357 '<!DOCTYPE html PUBLIC "bar" "baz">') -358 self.assertEqual(etree.tostring(doc), -359 _bytes('<!DOCTYPE html PUBLIC "bar" "baz">\n<html/>')) -
360 -
361 - def test_clean_doctype(self): -
362 doc = html.Element('html').getroottree() -363 self.assertTrue(doc.docinfo.doctype != '') -364 doc.docinfo.clear() -365 self.assertTrue(doc.docinfo.doctype == '') -
366 -
367 - def test_set_decl_system(self): -
368 doc = etree.Element('test').getroottree() -369 doc.docinfo.system_url = 'baz' -370 self.assertEqual(doc.docinfo.doctype, -371 '<!DOCTYPE test SYSTEM "baz">') -372 self.assertEqual(etree.tostring(doc), -373 _bytes('<!DOCTYPE test SYSTEM "baz">\n<test/>')) -
374 -
375 - def test_empty_decl(self): -
376 doc = etree.Element('test').getroottree() -377 doc.docinfo.public_id = None -378 self.assertEqual(doc.docinfo.doctype, -379 '<!DOCTYPE test>') -380 self.assertTrue(doc.docinfo.public_id is None) -381 self.assertTrue(doc.docinfo.system_url is None) -382 self.assertEqual(etree.tostring(doc), -383 _bytes('<!DOCTYPE test>\n<test/>')) -
384 -
385 - def test_invalid_decl_1(self): -
386 docinfo = etree.Element('test').getroottree().docinfo -387 -388 def set_public_id(value): -389 docinfo.public_id = value -
390 self.assertRaises(ValueError, set_public_id, _str('ä')) -391 self.assertRaises(ValueError, set_public_id, _str('qwerty ä asdf')) -
392 -
393 - def test_invalid_decl_2(self): -
394 docinfo = etree.Element('test').getroottree().docinfo -395 -396 def set_system_url(value): -397 docinfo.system_url = value -
398 self.assertRaises(ValueError, set_system_url, '\'"') -399 self.assertRaises(ValueError, set_system_url, '"\'') -400 self.assertRaises(ValueError, set_system_url, ' " \' ') -401 -
402 - def test_comment_before_dtd(self): -
403 data = '<!--comment--><!DOCTYPE test>\n<!-- --><test/>' -404 doc = etree.fromstring(data).getroottree() -405 self.assertEqual(etree.tostring(doc), -406 _bytes(data)) -
407 -
408 -409 -def test_suite(): -
410 suite = unittest.TestSuite() -411 suite.addTests([unittest.makeSuite(ETreeDtdTestCase)]) -412 suite.addTests( -413 [make_doctest('../../../doc/validation.txt')]) -414 return suite -
415 -416 if __name__ == '__main__': -417 print('to test use test.py %s' % __file__) -418 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_dtd.ETreeDtdTestCase-class.html b/doc/html/api/lxml.tests.test_dtd.ETreeDtdTestCase-class.html deleted file mode 100644 index aabc4eb..0000000 --- a/doc/html/api/lxml.tests.test_dtd.ETreeDtdTestCase-class.html +++ /dev/null @@ -1,938 +0,0 @@ - - - - - lxml.tests.test_dtd.ETreeDtdTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_dtd :: - Class ETreeDtdTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ETreeDtdTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ETreeDtdTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_dtd(self) - source code - -
- -
-   - - - - - - -
test_dtd_file(self) - source code - -
- -
-   - - - - - - -
test_dtd_stringio(self) - source code - -
- -
-   - - - - - - -
test_dtd_parse_invalid(self) - source code - -
- -
-   - - - - - - -
test_dtd_parse_file_not_found(self) - source code - -
- -
-   - - - - - - -
test_dtd_parse_valid(self) - source code - -
- -
-   - - - - - - -
test_dtd_parse_valid_file_url(self) - source code - -
- -
-   - - - - - - -
test_dtd_parse_valid_relative(self) - source code - -
- -
-   - - - - - - -
test_dtd_parse_valid_relative_file_url(self) - source code - -
- -
-   - - - - - - -
test_dtd_invalid(self) - source code - -
- -
-   - - - - - - -
test_dtd_assertValid(self) - source code - -
- -
-   - - - - - - -
test_dtd_internal(self) - source code - -
- -
-   - - - - - - -
test_dtd_internal_invalid(self) - source code - -
- -
-   - - - - - - -
test_dtd_invalid_duplicate_id(self) - source code - -
- -
-   - - - - - - -
test_dtd_api_internal(self) - source code - -
- -
-   - - - - - - -
test_internal_dtds(self) - source code - -
- -
-   - - - - - - -
test_dtd_broken(self) - source code - -
- -
-   - - - - - - -
test_parse_file_dtd(self) - source code - -
- -
-   - - - - - - -
test_iterparse_file_dtd_start(self) - source code - -
- -
-   - - - - - - -
test_iterparse_file_dtd_end(self) - source code - -
- -
-   - - - - - - -
test_dtd_attrs(self) - source code - -
- -
-   - - - - - - -
test_declaration_escape_quote_pid(self) - source code - -
- -
-   - - - - - - -
test_declaration_quote_withoutpid(self) - source code - -
- -
-   - - - - - - -
test_declaration_apos(self) - source code - -
- -
-   - - - - - - -
test_ietf_decl(self) - source code - -
- -
-   - - - - - - -
test_set_decl_public(self) - source code - -
- -
-   - - - - - - -
test_html_decl(self) - source code - -
- -
-   - - - - - - -
test_clean_doctype(self) - source code - -
- -
-   - - - - - - -
test_set_decl_system(self) - source code - -
- -
-   - - - - - - -
test_empty_decl(self) - source code - -
- -
-   - - - - - - -
test_invalid_decl_1(self) - source code - -
- -
-   - - - - - - -
test_invalid_decl_2(self) - source code - -
- -
-   - - - - - - -
test_comment_before_dtd(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

test_iterparse_file_dtd_start(self) -

-
source code  -
- - -
-
Decorators:
-
    -
  • @skipIf(etree.LIBXML_VERSION== (2, 9, 0), "DTD loading is broken for incremental parsing in libxml2 2.9.0")
  • -
-
-
-
- -
- -
- - -
-

test_iterparse_file_dtd_end(self) -

-
source code  -
- - -
-
Decorators:
-
    -
  • @skipIf(etree.LIBXML_VERSION== (2, 9, 0), "DTD loading is broken for incremental parsing in libxml2 2.9.0")
  • -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_elementpath-module.html b/doc/html/api/lxml.tests.test_elementpath-module.html deleted file mode 100644 index fe432b4..0000000 --- a/doc/html/api/lxml.tests.test_elementpath-module.html +++ /dev/null @@ -1,250 +0,0 @@ - - - - - lxml.tests.test_elementpath - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_elementpath - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module test_elementpath

source code

-Tests for the ElementPath implementation. - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - EtreeElementPathTestCase -
- - - - - - - - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
summarize(elem) - source code - -
- -
-   - - - - - - -
summarize_list(seq) - source code - -
- -
-   - - - - - - -
normalize_crlf(tree) - source code - -
- -
-   - - - - - - -
test_suite() - source code - -
- -
- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = 'lxml.tests' -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_elementpath-pysrc.html b/doc/html/api/lxml.tests.test_elementpath-pysrc.html deleted file mode 100644 index 15b8879..0000000 --- a/doc/html/api/lxml.tests.test_elementpath-pysrc.html +++ /dev/null @@ -1,656 +0,0 @@ - - - - - lxml.tests.test_elementpath - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_elementpath - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.test_elementpath

-
-  1  # -*- coding: utf-8 -*- 
-  2   
-  3  """ 
-  4  Tests for the ElementPath implementation. 
-  5  """ 
-  6   
-  7  from __future__ import absolute_import 
-  8   
-  9  import unittest 
- 10  from copy import deepcopy 
- 11  from .common_imports import etree, HelperTestCase 
- 12   
- 13   
-
14 -def summarize(elem): -
15 return elem.tag -
16 -
17 -def summarize_list(seq): -
18 return list(map(summarize, seq)) -
19 -
20 -def normalize_crlf(tree): -
21 for elem in tree.getiterator(): - 22 if elem.text: elem.text = elem.text.replace("\r\n", "\n") - 23 if elem.tail: elem.tail = elem.tail.replace("\r\n", "\n") -
24 - 25 -
26 -class EtreeElementPathTestCase(HelperTestCase): -
27 etree = etree - 28 from lxml import _elementpath - 29 -
30 - def test_cache(self): -
31 self._elementpath._cache.clear() - 32 el = self.etree.XML(b'<a><b><c/><c/></b></a>') - 33 self.assertFalse(self._elementpath._cache) - 34 - 35 self.assertTrue(el.findall('b/c')) - 36 self.assertEqual(1, len(self._elementpath._cache)) - 37 self.assertTrue(el.findall('b/c')) - 38 self.assertEqual(1, len(self._elementpath._cache)) - 39 self.assertFalse(el.findall('xxx')) - 40 self.assertEqual(2, len(self._elementpath._cache)) - 41 self.assertFalse(el.findall('xxx')) - 42 self.assertEqual(2, len(self._elementpath._cache)) - 43 self.assertTrue(el.findall('b/c')) - 44 self.assertEqual(2, len(self._elementpath._cache)) -
45 -
46 - def _assert_tokens(self, tokens, path, namespaces=None): -
47 self.assertEqual(tokens, list(self._elementpath.xpath_tokenizer(path, namespaces))) -
48 -
49 - def test_tokenizer(self): -
50 assert_tokens = self._assert_tokens - 51 assert_tokens( - 52 [('/', '')], - 53 '/', - 54 ) - 55 assert_tokens( - 56 [('.', ''), ('/', ''), ('', 'a'), ('/', ''), ('', 'b'), ('/', ''), ('', 'c')], - 57 './a/b/c', - 58 ) - 59 assert_tokens( - 60 [('/', ''), ('', 'a'), ('/', ''), ('', 'b'), ('/', ''), ('', 'c')], - 61 '/a/b/c', - 62 ) - 63 assert_tokens( - 64 [('/', ''), ('', '{nsx}a'), ('/', ''), ('', '{nsy}b'), ('/', ''), ('', 'c')], - 65 '/x:a/y:b/c', - 66 {'x': 'nsx', 'y': 'nsy'}, - 67 ) - 68 assert_tokens( - 69 [('/', ''), ('', '{nsx}a'), ('/', ''), ('', '{nsy}b'), ('/', ''), ('', '{nsnone}c')], - 70 '/x:a/y:b/c', - 71 {'x': 'nsx', 'y': 'nsy', None: 'nsnone'}, - 72 ) -
73 -
74 - def test_tokenizer_predicates(self): -
75 assert_tokens = self._assert_tokens - 76 assert_tokens( - 77 [('', 'a'), ('[', ''), ('', 'b'), (']', '')], - 78 'a[b]', - 79 ) - 80 assert_tokens( - 81 [('', 'a'), ('[', ''), ('', 'b'), ('=', ''), ('"abc"', ''), (']', '')], - 82 'a[b="abc"]', - 83 ) - 84 assert_tokens( - 85 [('', 'a'), ('[', ''), ('.', ''), ('', ''), ('=', ''), ('', ''), ('"abc"', ''), (']', '')], - 86 'a[. = "abc"]', - 87 ) -
88 -
89 - def test_find(self): -
90 """ - 91 Test find methods (including xpath syntax). - 92 Originally copied from 'selftest.py'. - 93 """ - 94 elem = etree.XML(""" - 95 <body> - 96 <tag class='a'>text</tag> - 97 <tag class='b' /> - 98 <section> - 99 <tag class='b' id='inner'>subtext</tag> -100 </section> -101 </body> -102 """) -103 -104 self.assertEqual(elem.find("tag").tag, -105 'tag') -106 self.assertEqual(etree.ElementTree(elem).find("tag").tag, -107 'tag') -108 self.assertEqual(elem.find("section/tag").tag, -109 'tag') -110 self.assertEqual(etree.ElementTree(elem).find("section/tag").tag, -111 'tag') -112 -113 self.assertEqual(elem.findtext("tag"), -114 'text') -115 self.assertEqual(elem.findtext("tog"), -116 None) -117 self.assertEqual(elem.findtext("tog", "default"), -118 'default') -119 self.assertEqual(etree.ElementTree(elem).findtext("tag"), -120 'text') -121 self.assertEqual(elem.findtext("section/tag"), -122 'subtext') -123 self.assertEqual(etree.ElementTree(elem).findtext("section/tag"), -124 'subtext') -125 -126 self.assertEqual(summarize_list(elem.findall("tag")), -127 ['tag', 'tag']) -128 self.assertEqual(summarize_list(elem.findall("*")), -129 ['tag', 'tag', 'section']) -130 self.assertEqual(summarize_list(elem.findall(".//tag")), -131 ['tag', 'tag', 'tag']) -132 self.assertEqual(summarize_list(elem.findall("section/tag")), -133 ['tag']) -134 self.assertEqual(summarize_list(elem.findall("section//tag")), -135 ['tag']) -136 -137 self.assertEqual(summarize_list(elem.findall("section/*")), -138 ['tag']) -139 self.assertEqual(summarize_list(elem.findall("section//*")), -140 ['tag']) -141 self.assertEqual(summarize_list(elem.findall("section/.//*")), -142 ['tag']) -143 self.assertEqual(summarize_list(elem.findall("*/*")), -144 ['tag']) -145 self.assertEqual(summarize_list(elem.findall("*//*")), -146 ['tag']) -147 self.assertEqual(summarize_list(elem.findall("*/tag")), -148 ['tag']) -149 self.assertEqual(summarize_list(elem.findall("*/./tag")), -150 ['tag']) -151 self.assertEqual(summarize_list(elem.findall("./tag")), -152 ['tag', 'tag']) -153 self.assertEqual(summarize_list(elem.findall(".//tag")), -154 ['tag', 'tag', 'tag']) -155 self.assertEqual(summarize_list(elem.findall("././tag")), -156 ['tag', 'tag']) -157 -158 self.assertEqual(summarize_list(elem.findall(".//tag[@class]")), -159 ['tag', 'tag', 'tag']) -160 self.assertEqual(summarize_list(elem.findall(".//tag[ @class]")), -161 ['tag', 'tag', 'tag']) -162 self.assertEqual(summarize_list(elem.findall(".//tag[@class ]")), -163 ['tag', 'tag', 'tag']) -164 self.assertEqual(summarize_list(elem.findall(".//tag[ @class ]")), -165 ['tag', 'tag', 'tag']) -166 self.assertEqual(summarize_list(elem.findall(".//tag[@class='a']")), -167 ['tag']) -168 self.assertEqual(summarize_list(elem.findall('.//tag[@class="a"]')), -169 ['tag']) -170 self.assertEqual(summarize_list(elem.findall(".//tag[@class='b']")), -171 ['tag', 'tag']) -172 self.assertEqual(summarize_list(elem.findall('.//tag[@class="b"]')), -173 ['tag', 'tag']) -174 self.assertEqual(summarize_list(elem.findall('.//tag[@class = "b"]')), -175 ['tag', 'tag']) -176 self.assertEqual(summarize_list(elem.findall(".//tag[@id]")), -177 ['tag']) -178 self.assertEqual(summarize_list(elem.findall(".//tag[@class][@id]")), -179 ['tag']) -180 self.assertEqual(summarize_list(elem.findall(".//section[tag]")), -181 ['section']) -182 self.assertEqual(summarize_list(elem.findall(".//section[element]")), -183 []) -184 -185 self.assertEqual(summarize_list(elem.findall(".//section[tag='subtext']")), -186 ['section']) -187 self.assertEqual(summarize_list(elem.findall(".//section[tag ='subtext']")), -188 ['section']) -189 self.assertEqual(summarize_list(elem.findall(".//section[tag= 'subtext']")), -190 ['section']) -191 self.assertEqual(summarize_list(elem.findall(".//section[tag = 'subtext']")), -192 ['section']) -193 self.assertEqual(summarize_list(elem.findall(".//section[ tag = 'subtext' ]")), -194 ['section']) -195 self.assertEqual(summarize_list(elem.findall(".//tag[.='subtext']")), -196 ['tag']) -197 self.assertEqual(summarize_list(elem.findall(".//tag[. ='subtext']")), -198 ['tag']) -199 self.assertEqual(summarize_list(elem.findall('.//tag[.= "subtext"]')), -200 ['tag']) -201 self.assertEqual(summarize_list(elem.findall(".//tag[. = 'subtext']")), -202 ['tag']) -203 self.assertEqual(summarize_list(elem.findall(".//tag[. = 'subtext ']")), -204 []) -205 self.assertEqual(summarize_list(elem.findall(".//tag[.= ' subtext']")), -206 []) -207 -208 self.assertEqual(summarize_list(elem.findall("../tag")), -209 []) -210 self.assertEqual(summarize_list(elem.findall("section/../tag")), -211 ['tag', 'tag']) -212 self.assertEqual(summarize_list(etree.ElementTree(elem).findall("./tag")), -213 ['tag', 'tag']) -214 -215 # FIXME: ET's Path module handles this case incorrectly; this gives -216 # a warning in 1.3, and the behaviour will be modified in 1.4. -217 self.assertEqual(summarize_list(etree.ElementTree(elem).findall("/tag")), -218 ['tag', 'tag']) -219 -220 # duplicate section => 2x tag matches -221 elem[1] = deepcopy(elem[2]) -222 self.assertEqual(summarize_list(elem.findall(".//section[tag = 'subtext']")), -223 ['section', 'section']) -224 self.assertEqual(summarize_list(elem.findall(".//tag[. = 'subtext']")), -225 ['tag', 'tag']) -226 self.assertEqual(summarize_list(elem.findall(".//tag[@class][@id]")), -227 ['tag', 'tag']) -
228 -229 -230 #class ElementTreeElementPathTestCase(EtreeElementPathTestCase): -231 # import xml.etree.ElementTree as etree -232 # import xml.etree.ElementPath as _elementpath -233 -234 -
235 -def test_suite(): -
236 suite = unittest.TestSuite() -237 suite.addTests([unittest.makeSuite(EtreeElementPathTestCase)]) -238 #suite.addTests([unittest.makeSuite(ElementTreeElementPathTestCase)]) -239 return suite -
240 -241 -242 if __name__ == '__main__': -243 print('to test use test.py %s' % __file__) -244 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_elementpath.EtreeElementPathTestCase-class.html b/doc/html/api/lxml.tests.test_elementpath.EtreeElementPathTestCase-class.html deleted file mode 100644 index 959df30..0000000 --- a/doc/html/api/lxml.tests.test_elementpath.EtreeElementPathTestCase-class.html +++ /dev/null @@ -1,472 +0,0 @@ - - - - - lxml.tests.test_elementpath.EtreeElementPathTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_elementpath :: - Class EtreeElementPathTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class EtreeElementPathTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               EtreeElementPathTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_cache(self) - source code - -
- -
-   - - - - - - -
_assert_tokens(self, - tokens, - path, - namespaces=None) - source code - -
- -
-   - - - - - - -
test_tokenizer(self) - source code - -
- -
-   - - - - - - -
test_tokenizer_predicates(self) - source code - -
- -
-   - - - - - - -
test_find(self)
- Test find methods (including xpath syntax). -Originally copied from 'selftest.py'.
- source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - etree
- The lxml.etree module implements the extended ElementTree API for XML. -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

etree

- The lxml.etree module implements the extended ElementTree API for XML. -
-
-
-
Value:
-
lxml.etree
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_elementtree-module.html b/doc/html/api/lxml.tests.test_elementtree-module.html deleted file mode 100644 index f4315cc..0000000 --- a/doc/html/api/lxml.tests.test_elementtree-module.html +++ /dev/null @@ -1,300 +0,0 @@ - - - - - lxml.tests.test_elementtree - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_elementtree - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module test_elementtree

source code

-

Tests for the ElementTree API

-

Only test cases that apply equally well to etree and ElementTree -belong here. Note that there is a second test module called test_io.py -for IO related test cases.

- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - _ETreeTestCaseBase -
-   - - _XMLPullParserTest -
-   - - ETreeTestCase -
-   - - ETreePullTestCase -
-   - - ElementTreeTestCase -
-   - - CElementTreeTestCase -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
test_suite() - source code - -
- -
- - - - - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - this_dir = '/home/stefan/source/Python/lxml/lxml-release/src/l... -
-   - - cElementTree = None
- hash(x) -
-   - - ElementTreePullTestCase = None
- hash(x) -
-   - - __package__ = 'lxml.tests' -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

this_dir

- -
-
-
-
Value:
-
-'/home/stefan/source/Python/lxml/lxml-release/src/lxml/tests'
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_elementtree-pysrc.html b/doc/html/api/lxml.tests.test_elementtree-pysrc.html deleted file mode 100644 index 4155680..0000000 --- a/doc/html/api/lxml.tests.test_elementtree-pysrc.html +++ /dev/null @@ -1,11874 +0,0 @@ - - - - - lxml.tests.test_elementtree - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_elementtree - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.test_elementtree

-
-   1  # -*- coding: utf-8 -*- 
-   2   
-   3  """ 
-   4  Tests for the ElementTree API 
-   5   
-   6  Only test cases that apply equally well to etree and ElementTree 
-   7  belong here. Note that there is a second test module called test_io.py 
-   8  for IO related test cases. 
-   9  """ 
-  10   
-  11  import unittest 
-  12  import os, re, tempfile, copy, operator, sys 
-  13   
-  14  this_dir = os.path.dirname(__file__) 
-  15  if this_dir not in sys.path: 
-  16      sys.path.insert(0, this_dir) # needed for Py3 
-  17   
-  18  from common_imports import BytesIO, etree 
-  19  from common_imports import ElementTree, cElementTree, ET_VERSION, CET_VERSION 
-  20  from common_imports import filter_by_version, fileInTestDir, canonicalize, HelperTestCase 
-  21  from common_imports import _str, _bytes, unicode, next 
-  22   
-  23  if cElementTree is not None and (CET_VERSION <= (1,0,7) or sys.version_info >= (3,3)): 
-  24      cElementTree = None 
-  25   
-  26  if ElementTree is not None: 
-  27      print("Comparing with ElementTree %s" % getattr(ElementTree, "VERSION", "?")) 
-  28   
-  29  if cElementTree is not None: 
-  30      print("Comparing with cElementTree %s" % getattr(cElementTree, "VERSION", "?")) 
-
31 - 32 -class _ETreeTestCaseBase(HelperTestCase): -
33 etree = None - 34 required_versions_ET = {} - 35 required_versions_cET = {} - 36 -
37 - def XMLParser(self, **kwargs): -
38 try: - 39 XMLParser = self.etree.XMLParser - 40 except AttributeError: - 41 assert 'ElementTree' in self.etree.__name__ - 42 XMLParser = self.etree.TreeBuilder - 43 return XMLParser(**kwargs) -
44 -
45 - def test_element(self): -
46 for i in range(10): - 47 e = self.etree.Element('foo') - 48 self.assertEqual(e.tag, 'foo') - 49 self.assertEqual(e.text, None) - 50 self.assertEqual(e.tail, None) -
51 -
52 - def test_simple(self): -
53 Element = self.etree.Element - 54 - 55 root = Element('root') - 56 root.append(Element('one')) - 57 root.append(Element('two')) - 58 root.append(Element('three')) - 59 self.assertEqual(3, len(root)) - 60 self.assertEqual('one', root[0].tag) - 61 self.assertEqual('two', root[1].tag) - 62 self.assertEqual('three', root[2].tag) - 63 self.assertRaises(IndexError, operator.getitem, root, 3) -
64 - 65 # test weird dictionary interaction leading to segfault previously -
67 root = self.etree.Element('root') - 68 self.assertEqual(root.tag, "root") - 69 add = self.etree.ElementTree(file=BytesIO('<foo>Foo</foo>')) - 70 self.assertEqual(add.getroot().tag, "foo") - 71 self.assertEqual(add.getroot().text, "Foo") - 72 root.append(self.etree.Element('baz')) - 73 self.assertEqual(root.tag, "root") - 74 self.assertEqual(root[0].tag, "baz") -
75 -
76 - def test_subelement(self): -
77 Element = self.etree.Element - 78 SubElement = self.etree.SubElement - 79 - 80 root = Element('root') - 81 SubElement(root, 'one') - 82 SubElement(root, 'two') - 83 SubElement(root, 'three') - 84 self.assertEqual(3, len(root)) - 85 self.assertEqual('one', root[0].tag) - 86 self.assertEqual('two', root[1].tag) - 87 self.assertEqual('three', root[2].tag) -
88 -
89 - def test_element_contains(self): -
90 Element = self.etree.Element - 91 SubElement = self.etree.SubElement - 92 - 93 root1 = Element('root') - 94 SubElement(root1, 'one') - 95 self.assertTrue(root1[0] in root1) - 96 - 97 root2 = Element('root') - 98 SubElement(root2, 'two') - 99 SubElement(root2, 'three') - 100 self.assertTrue(root2[0] in root2) - 101 self.assertTrue(root2[1] in root2) - 102 - 103 self.assertFalse(root1[0] in root2) - 104 self.assertFalse(root2[0] in root1) - 105 self.assertFalse(None in root2) -
106 -
108 ElementTree = self.etree.ElementTree - 109 - 110 f = BytesIO('<doc>Test<one>One</one></doc>') - 111 doc = ElementTree(file=f) - 112 root = doc.getroot() - 113 self.assertEqual(1, len(root)) - 114 self.assertEqual('one', root[0].tag) - 115 self.assertRaises(IndexError, operator.getitem, root, 1) -
116 -
118 ElementTree = self.etree.ElementTree - 119 - 120 f = BytesIO('<doc><one>One</one><two>Two</two>hm<three>Three</three></doc>') - 121 doc = ElementTree(file=f) - 122 root = doc.getroot() - 123 self.assertEqual(3, len(root)) - 124 self.assertEqual('one', root[0].tag) - 125 self.assertEqual('two', root[1].tag) - 126 self.assertEqual('three', root[2].tag) -
127 -
129 ElementTree = self.etree.ElementTree - 130 - 131 f = BytesIO('<doc>Test</doc>') - 132 doc = ElementTree(file=f) - 133 root = doc.getroot() - 134 self.assertEqual(0, len(root)) -
135 -
137 Element = self.etree.Element - 138 SubElement = self.etree.SubElement - 139 a = Element('a') - 140 b = SubElement(a, 'b') - 141 c = SubElement(a, 'c') - 142 d = SubElement(a, 'd') - 143 self.assertEqual(d, a[-1]) - 144 self.assertEqual(c, a[-2]) - 145 self.assertEqual(b, a[-3]) - 146 self.assertRaises(IndexError, operator.getitem, a, -4) - 147 a[-1] = e = Element('e') - 148 self.assertEqual(e, a[-1]) - 149 del a[-1] - 150 self.assertEqual(2, len(a)) -
151 -
152 - def test_elementtree(self): -
153 ElementTree = self.etree.ElementTree - 154 - 155 f = BytesIO('<doc><one>One</one><two>Two</two></doc>') - 156 doc = ElementTree(file=f) - 157 root = doc.getroot() - 158 self.assertEqual(2, len(root)) - 159 self.assertEqual('one', root[0].tag) - 160 self.assertEqual('two', root[1].tag) -
161 -
162 - def test_text(self): -
163 ElementTree = self.etree.ElementTree - 164 - 165 f = BytesIO('<doc>This is a text</doc>') - 166 doc = ElementTree(file=f) - 167 root = doc.getroot() - 168 self.assertEqual('This is a text', root.text) -
169 -
170 - def test_text_empty(self): -
171 ElementTree = self.etree.ElementTree - 172 - 173 f = BytesIO('<doc></doc>') - 174 doc = ElementTree(file=f) - 175 root = doc.getroot() - 176 self.assertEqual(None, root.text) -
177 -
178 - def test_text_other(self): -
179 ElementTree = self.etree.ElementTree - 180 - 181 f = BytesIO('<doc><one>One</one></doc>') - 182 doc = ElementTree(file=f) - 183 root = doc.getroot() - 184 self.assertEqual(None, root.text) - 185 self.assertEqual('One', root[0].text) -
186 -
187 - def test_text_escape_in(self): -
188 ElementTree = self.etree.ElementTree - 189 - 190 f = BytesIO('<doc>This is &gt; than a text</doc>') - 191 doc = ElementTree(file=f) - 192 root = doc.getroot() - 193 self.assertEqual('This is > than a text', root.text) -
194 -
195 - def test_text_escape_out(self): -
196 Element = self.etree.Element - 197 - 198 a = Element("a") - 199 a.text = "<>&" - 200 self.assertXML(_bytes('<a>&lt;&gt;&amp;</a>'), - 201 a) -
202 -
203 - def test_text_escape_tostring(self): -
204 tostring = self.etree.tostring - 205 Element = self.etree.Element - 206 - 207 a = Element("a") - 208 a.text = "<>&" - 209 self.assertEqual(_bytes('<a>&lt;&gt;&amp;</a>'), - 210 tostring(a)) -
211 -
212 - def test_text_str_subclass(self): -
213 Element = self.etree.Element - 214 - 215 class strTest(str): - 216 pass -
217 - 218 a = Element("a") - 219 a.text = strTest("text") - 220 self.assertXML(_bytes('<a>text</a>'), - 221 a) -
222 -
223 - def test_tail(self): -
224 ElementTree = self.etree.ElementTree - 225 - 226 f = BytesIO('<doc>This is <i>mixed</i> content.</doc>') - 227 doc = ElementTree(file=f) - 228 root = doc.getroot() - 229 self.assertEqual(1, len(root)) - 230 self.assertEqual('This is ', root.text) - 231 self.assertEqual(None, root.tail) - 232 self.assertEqual('mixed', root[0].text) - 233 self.assertEqual(' content.', root[0].tail) -
234 -
235 - def test_tail_str_subclass(self): -
236 Element = self.etree.Element - 237 SubElement = self.etree.SubElement - 238 - 239 class strTest(str): - 240 pass -
241 - 242 a = Element("a") - 243 SubElement(a, "t").tail = strTest("tail") - 244 self.assertXML(_bytes('<a><t></t>tail</a>'), - 245 a) - 246 -
247 - def _test_del_tail(self): -
248 # this is discouraged for ET compat, should not be tested... - 249 XML = self.etree.XML - 250 - 251 root = XML(_bytes('<doc>This is <i>mixed</i> content.</doc>')) - 252 self.assertEqual(1, len(root)) - 253 self.assertEqual('This is ', root.text) - 254 self.assertEqual(None, root.tail) - 255 self.assertEqual('mixed', root[0].text) - 256 self.assertEqual(' content.', root[0].tail) - 257 - 258 del root[0].tail - 259 - 260 self.assertEqual(1, len(root)) - 261 self.assertEqual('This is ', root.text) - 262 self.assertEqual(None, root.tail) - 263 self.assertEqual('mixed', root[0].text) - 264 self.assertEqual(None, root[0].tail) - 265 - 266 root[0].tail = "TAIL" - 267 - 268 self.assertEqual(1, len(root)) - 269 self.assertEqual('This is ', root.text) - 270 self.assertEqual(None, root.tail) - 271 self.assertEqual('mixed', root[0].text) - 272 self.assertEqual('TAIL', root[0].tail) -
273 -
274 - def test_ElementTree(self): -
275 Element = self.etree.Element - 276 ElementTree = self.etree.ElementTree - 277 - 278 el = Element('hoi') - 279 doc = ElementTree(el) - 280 root = doc.getroot() - 281 self.assertEqual(None, root.text) - 282 self.assertEqual('hoi', root.tag) -
283 -
284 - def test_attrib(self): -
285 ElementTree = self.etree.ElementTree - 286 - 287 f = BytesIO('<doc one="One" two="Two"/>') - 288 doc = ElementTree(file=f) - 289 root = doc.getroot() - 290 self.assertEqual('One', root.attrib['one']) - 291 self.assertEqual('Two', root.attrib['two']) - 292 self.assertRaises(KeyError, operator.getitem, root.attrib, 'three') -
293 -
294 - def test_attrib_get(self): -
295 ElementTree = self.etree.ElementTree - 296 - 297 f = BytesIO('<doc one="One" two="Two"/>') - 298 doc = ElementTree(file=f) - 299 root = doc.getroot() - 300 self.assertEqual('One', root.attrib.get('one')) - 301 self.assertEqual('Two', root.attrib.get('two')) - 302 self.assertEqual(None, root.attrib.get('three')) - 303 self.assertEqual('foo', root.attrib.get('three', 'foo')) -
304 -
305 - def test_attrib_dict(self): -
306 ElementTree = self.etree.ElementTree - 307 - 308 f = BytesIO('<doc one="One" two="Two"/>') - 309 doc = ElementTree(file=f) - 310 root = doc.getroot() - 311 attrib = dict(root.attrib) - 312 self.assertEqual('One', attrib['one']) - 313 self.assertEqual('Two', attrib['two']) - 314 self.assertRaises(KeyError, operator.getitem, attrib, 'three') -
315 -
316 - def test_attrib_copy(self): -
317 ElementTree = self.etree.ElementTree - 318 - 319 f = BytesIO('<doc one="One" two="Two"/>') - 320 doc = ElementTree(file=f) - 321 root = doc.getroot() - 322 attrib = copy.copy(root.attrib) - 323 self.assertEqual('One', attrib['one']) - 324 self.assertEqual('Two', attrib['two']) - 325 self.assertRaises(KeyError, operator.getitem, attrib, 'three') -
326 -
327 - def test_attrib_deepcopy(self): -
328 ElementTree = self.etree.ElementTree - 329 - 330 f = BytesIO('<doc one="One" two="Two"/>') - 331 doc = ElementTree(file=f) - 332 root = doc.getroot() - 333 attrib = copy.deepcopy(root.attrib) - 334 self.assertEqual('One', attrib['one']) - 335 self.assertEqual('Two', attrib['two']) - 336 self.assertRaises(KeyError, operator.getitem, attrib, 'three') -
337 -
338 - def test_attributes_get(self): -
339 ElementTree = self.etree.ElementTree - 340 - 341 f = BytesIO('<doc one="One" two="Two"/>') - 342 doc = ElementTree(file=f) - 343 root = doc.getroot() - 344 self.assertEqual('One', root.get('one')) - 345 self.assertEqual('Two', root.get('two')) - 346 self.assertEqual(None, root.get('three')) - 347 self.assertEqual('foo', root.get('three', 'foo')) -
348 -
349 - def test_attrib_clear(self): -
350 XML = self.etree.XML - 351 - 352 root = XML(_bytes('<doc one="One" two="Two"/>')) - 353 self.assertEqual('One', root.get('one')) - 354 self.assertEqual('Two', root.get('two')) - 355 root.attrib.clear() - 356 self.assertEqual(None, root.get('one')) - 357 self.assertEqual(None, root.get('two')) -
358 -
359 - def test_attrib_set_clear(self): -
360 Element = self.etree.Element - 361 - 362 root = Element("root", one="One") - 363 root.set("two", "Two") - 364 self.assertEqual('One', root.get('one')) - 365 self.assertEqual('Two', root.get('two')) - 366 root.attrib.clear() - 367 self.assertEqual(None, root.get('one')) - 368 self.assertEqual(None, root.get('two')) -
369 -
370 - def test_attrib_ns_clear(self): -
371 Element = self.etree.Element - 372 SubElement = self.etree.SubElement - 373 - 374 attribNS = '{http://foo/bar}x' - 375 - 376 parent = Element('parent') - 377 parent.set(attribNS, 'a') - 378 child = SubElement(parent, 'child') - 379 child.set(attribNS, 'b') - 380 - 381 self.assertEqual('a', parent.get(attribNS)) - 382 self.assertEqual('b', child.get(attribNS)) - 383 - 384 parent.clear() - 385 self.assertEqual(None, parent.get(attribNS)) - 386 self.assertEqual('b', child.get(attribNS)) -
387 -
388 - def test_attrib_pop(self): -
389 ElementTree = self.etree.ElementTree - 390 - 391 f = BytesIO('<doc one="One" two="Two"/>') - 392 doc = ElementTree(file=f) - 393 root = doc.getroot() - 394 self.assertEqual('One', root.attrib['one']) - 395 self.assertEqual('Two', root.attrib['two']) - 396 - 397 self.assertEqual('One', root.attrib.pop('one')) - 398 - 399 self.assertEqual(None, root.attrib.get('one')) - 400 self.assertEqual('Two', root.attrib['two']) -
401 -
402 - def test_attrib_pop_unknown(self): -
403 root = self.etree.XML(_bytes('<doc one="One" two="Two"/>')) - 404 self.assertRaises(KeyError, root.attrib.pop, 'NONE') - 405 - 406 self.assertEqual('One', root.attrib['one']) - 407 self.assertEqual('Two', root.attrib['two']) -
408 -
409 - def test_attrib_pop_default(self): -
410 root = self.etree.XML(_bytes('<doc one="One" two="Two"/>')) - 411 self.assertEqual('Three', root.attrib.pop('three', 'Three')) -
412 -
414 root = self.etree.XML(_bytes('<doc/>')) - 415 self.assertEqual('Three', root.attrib.pop('three', 'Three')) -
416 -
418 root = self.etree.XML(_bytes('<doc one="One" two="Two"/>')) - 419 self.assertRaises(TypeError, root.attrib.pop, 'One', None, None) -
420 -
421 - def test_attribute_update_dict(self): -
422 XML = self.etree.XML - 423 - 424 root = XML(_bytes('<doc alpha="Alpha" beta="Beta"/>')) - 425 items = list(root.attrib.items()) - 426 items.sort() - 427 self.assertEqual( - 428 [('alpha', 'Alpha'), ('beta', 'Beta')], - 429 items) - 430 - 431 root.attrib.update({'alpha' : 'test', 'gamma' : 'Gamma'}) - 432 - 433 items = list(root.attrib.items()) - 434 items.sort() - 435 self.assertEqual( - 436 [('alpha', 'test'), ('beta', 'Beta'), ('gamma', 'Gamma')], - 437 items) -
438 -
440 XML = self.etree.XML - 441 - 442 root = XML(_bytes('<doc alpha="Alpha" beta="Beta"/>')) - 443 items = list(root.attrib.items()) - 444 items.sort() - 445 self.assertEqual( - 446 [('alpha', 'Alpha'), ('beta', 'Beta')], - 447 items) - 448 - 449 root.attrib.update({'alpha' : 'test', 'gamma' : 'Gamma'}.items()) - 450 - 451 items = list(root.attrib.items()) - 452 items.sort() - 453 self.assertEqual( - 454 [('alpha', 'test'), ('beta', 'Beta'), ('gamma', 'Gamma')], - 455 items) -
456 -
457 - def test_attribute_update_iter(self): -
458 XML = self.etree.XML - 459 - 460 root = XML(_bytes('<doc alpha="Alpha" beta="Beta"/>')) - 461 items = list(root.attrib.items()) - 462 items.sort() - 463 self.assertEqual( - 464 [('alpha', 'Alpha'), ('beta', 'Beta')], - 465 items) - 466 - 467 root.attrib.update(iter({'alpha' : 'test', 'gamma' : 'Gamma'}.items())) - 468 - 469 items = list(root.attrib.items()) - 470 items.sort() - 471 self.assertEqual( - 472 [('alpha', 'test'), ('beta', 'Beta'), ('gamma', 'Gamma')], - 473 items) -
474 -
476 XML = self.etree.XML - 477 - 478 root = XML(_bytes('<doc alpha="Alpha" beta="Beta"/>')) - 479 items = list(root.attrib.items()) - 480 items.sort() - 481 self.assertEqual( - 482 [('alpha', 'Alpha'), ('beta', 'Beta')], - 483 items) - 484 - 485 other = XML(_bytes('<doc alpha="test" gamma="Gamma"/>')) - 486 root.attrib.update(other.attrib) - 487 - 488 items = list(root.attrib.items()) - 489 items.sort() - 490 self.assertEqual( - 491 [('alpha', 'test'), ('beta', 'Beta'), ('gamma', 'Gamma')], - 492 items) -
493 -
494 - def test_attribute_keys(self): -
495 XML = self.etree.XML - 496 - 497 root = XML(_bytes('<doc alpha="Alpha" beta="Beta" gamma="Gamma"/>')) - 498 keys = list(root.attrib.keys()) - 499 keys.sort() - 500 self.assertEqual(['alpha', 'beta', 'gamma'], keys) -
501 -
502 - def test_attribute_keys2(self): -
503 XML = self.etree.XML - 504 - 505 root = XML(_bytes('<doc alpha="Alpha" beta="Beta" gamma="Gamma"/>')) - 506 keys = list(root.keys()) - 507 keys.sort() - 508 self.assertEqual(['alpha', 'beta', 'gamma'], keys) -
509 -
510 - def test_attribute_items2(self): -
511 XML = self.etree.XML - 512 - 513 root = XML(_bytes('<doc alpha="Alpha" beta="Beta" gamma="Gamma"/>')) - 514 items = list(root.items()) - 515 items.sort() - 516 self.assertEqual( - 517 [('alpha','Alpha'), ('beta','Beta'), ('gamma','Gamma')], - 518 items) -
519 -
520 - def test_attribute_keys_ns(self): -
521 XML = self.etree.XML - 522 - 523 root = XML(_bytes('<foo bar="Bar" xmlns:ns="http://ns.codespeak.net/test" ns:baz="Baz" />')) - 524 keys = list(root.keys()) - 525 keys.sort() - 526 self.assertEqual(['bar', '{http://ns.codespeak.net/test}baz'], - 527 keys) -
528 -
529 - def test_attribute_values(self): -
530 XML = self.etree.XML - 531 - 532 root = XML(_bytes('<doc alpha="Alpha" beta="Beta" gamma="Gamma"/>')) - 533 values = list(root.attrib.values()) - 534 values.sort() - 535 self.assertEqual(['Alpha', 'Beta', 'Gamma'], values) -
536 -
537 - def test_attribute_values_ns(self): -
538 XML = self.etree.XML - 539 - 540 root = XML(_bytes('<foo bar="Bar" xmlns:ns="http://ns.codespeak.net/test" ns:baz="Baz" />')) - 541 values = list(root.attrib.values()) - 542 values.sort() - 543 self.assertEqual( - 544 ['Bar', 'Baz'], values) -
545 -
546 - def test_attribute_items(self): -
547 XML = self.etree.XML - 548 - 549 root = XML(_bytes('<doc alpha="Alpha" beta="Beta" gamma="Gamma"/>')) - 550 items = list(root.attrib.items()) - 551 items.sort() - 552 self.assertEqual([ - 553 ('alpha', 'Alpha'), - 554 ('beta', 'Beta'), - 555 ('gamma', 'Gamma'), - 556 ], - 557 items) -
558 -
559 - def test_attribute_items_ns(self): -
560 XML = self.etree.XML - 561 - 562 root = XML(_bytes('<foo bar="Bar" xmlns:ns="http://ns.codespeak.net/test" ns:baz="Baz" />')) - 563 items = list(root.attrib.items()) - 564 items.sort() - 565 self.assertEqual( - 566 [('bar', 'Bar'), ('{http://ns.codespeak.net/test}baz', 'Baz')], - 567 items) -
568 -
569 - def test_attribute_str(self): -
570 XML = self.etree.XML - 571 - 572 expected = "{'{http://ns.codespeak.net/test}baz': 'Baz', 'bar': 'Bar'}" - 573 alternative = "{'bar': 'Bar', '{http://ns.codespeak.net/test}baz': 'Baz'}" - 574 - 575 root = XML(_bytes('<foo bar="Bar" xmlns:ns="http://ns.codespeak.net/test" ns:baz="Baz" />')) - 576 try: - 577 self.assertEqual(expected, str(root.attrib)) - 578 except AssertionError: - 579 self.assertEqual(alternative, str(root.attrib)) -
580 -
581 - def test_attribute_contains(self): -
582 XML = self.etree.XML - 583 - 584 root = XML(_bytes('<foo bar="Bar" xmlns:ns="http://ns.codespeak.net/test" ns:baz="Baz" />')) - 585 self.assertEqual( - 586 True, 'bar' in root.attrib) - 587 self.assertEqual( - 588 False, 'baz' in root.attrib) - 589 self.assertEqual( - 590 False, 'hah' in root.attrib) - 591 self.assertEqual( - 592 True, - 593 '{http://ns.codespeak.net/test}baz' in root.attrib) -
594 -
595 - def test_attribute_set(self): -
596 Element = self.etree.Element - 597 - 598 root = Element("root") - 599 root.set("attr", "TEST") - 600 self.assertEqual("TEST", root.get("attr")) -
601 -
602 - def test_attrib_as_attrib(self): -
603 Element = self.etree.Element - 604 - 605 root = Element("root") - 606 root.set("attr", "TEST") - 607 self.assertEqual("TEST", root.attrib["attr"]) - 608 - 609 root2 = Element("root2", root.attrib) - 610 self.assertEqual("TEST", root2.attrib["attr"]) -
611 -
612 - def test_attribute_iterator(self): -
613 XML = self.etree.XML - 614 - 615 root = XML(_bytes('<doc alpha="Alpha" beta="Beta" gamma="Gamma" />')) - 616 result = [] - 617 for key in root.attrib: - 618 result.append(key) - 619 result.sort() - 620 self.assertEqual(['alpha', 'beta', 'gamma'], result) -
621 -
622 - def test_attribute_manipulation(self): -
623 Element = self.etree.Element - 624 - 625 a = Element('a') - 626 a.attrib['foo'] = 'Foo' - 627 a.attrib['bar'] = 'Bar' - 628 self.assertEqual('Foo', a.attrib['foo']) - 629 del a.attrib['foo'] - 630 self.assertRaises(KeyError, operator.getitem, a.attrib, 'foo') -
631 -
632 - def test_del_attribute_ns(self): -
633 Element = self.etree.Element - 634 - 635 a = Element('a') - 636 a.attrib['{http://a/}foo'] = 'Foo' - 637 a.attrib['{http://a/}bar'] = 'Bar' - 638 self.assertEqual(None, a.get('foo')) - 639 self.assertEqual('Foo', a.get('{http://a/}foo')) - 640 self.assertEqual('Foo', a.attrib['{http://a/}foo']) - 641 - 642 self.assertRaises(KeyError, operator.delitem, a.attrib, 'foo') - 643 self.assertEqual('Foo', a.attrib['{http://a/}foo']) - 644 - 645 del a.attrib['{http://a/}foo'] - 646 self.assertRaises(KeyError, operator.getitem, a.attrib, 'foo') -
647 -
649 XML = self.etree.XML - 650 - 651 a = XML(_bytes('<a xmlns:nsa="http://a/" nsa:foo="FooNS" foo="Foo" />')) - 652 - 653 self.assertEqual('Foo', a.attrib['foo']) - 654 self.assertEqual('FooNS', a.attrib['{http://a/}foo']) - 655 - 656 del a.attrib['foo'] - 657 self.assertEqual('FooNS', a.attrib['{http://a/}foo']) - 658 self.assertRaises(KeyError, operator.getitem, a.attrib, 'foo') - 659 self.assertRaises(KeyError, operator.delitem, a.attrib, 'foo') - 660 - 661 del a.attrib['{http://a/}foo'] - 662 self.assertRaises(KeyError, operator.getitem, a.attrib, '{http://a/}foo') - 663 self.assertRaises(KeyError, operator.getitem, a.attrib, 'foo') - 664 - 665 a = XML(_bytes('<a xmlns:nsa="http://a/" foo="Foo" nsa:foo="FooNS" />')) - 666 - 667 self.assertEqual('Foo', a.attrib['foo']) - 668 self.assertEqual('FooNS', a.attrib['{http://a/}foo']) - 669 - 670 del a.attrib['foo'] - 671 self.assertEqual('FooNS', a.attrib['{http://a/}foo']) - 672 self.assertRaises(KeyError, operator.getitem, a.attrib, 'foo') - 673 - 674 del a.attrib['{http://a/}foo'] - 675 self.assertRaises(KeyError, operator.getitem, a.attrib, '{http://a/}foo') - 676 self.assertRaises(KeyError, operator.getitem, a.attrib, 'foo') -
677 -
678 - def test_XML(self): -
679 XML = self.etree.XML - 680 - 681 root = XML(_bytes('<doc>This is a text.</doc>')) - 682 self.assertEqual(0, len(root)) - 683 self.assertEqual('This is a text.', root.text) -
684 -
685 - def test_XMLID(self): -
686 XMLID = self.etree.XMLID - 687 XML = self.etree.XML - 688 xml_text = _bytes(''' - 689 <document> - 690 <h1 id="chapter1">...</h1> - 691 <p id="note1" class="note">...</p> - 692 <p>Regular paragraph.</p> - 693 <p xml:id="xmlid">XML:ID paragraph.</p> - 694 <p id="warn1" class="warning">...</p> - 695 </document> - 696 ''') - 697 - 698 root, dic = XMLID(xml_text) - 699 root2 = XML(xml_text) - 700 self.assertEqual(self._writeElement(root), - 701 self._writeElement(root2)) - 702 expected = { - 703 "chapter1" : root[0], - 704 "note1" : root[1], - 705 "warn1" : root[4] - 706 } - 707 self.assertEqual(dic, expected) -
708 -
709 - def test_fromstring(self): -
710 fromstring = self.etree.fromstring - 711 - 712 root = fromstring('<doc>This is a text.</doc>') - 713 self.assertEqual(0, len(root)) - 714 self.assertEqual('This is a text.', root.text) -
715 - 716 required_versions_ET['test_fromstringlist'] = (1,3) -
717 - def test_fromstringlist(self): -
718 fromstringlist = self.etree.fromstringlist - 719 - 720 root = fromstringlist(["<do", "c>T", "hi", "s is", - 721 " a text.<", "/doc", ">"]) - 722 self.assertEqual(0, len(root)) - 723 self.assertEqual('This is a text.', root.text) -
724 - 725 required_versions_ET['test_fromstringlist_characters'] = (1,3) -
727 fromstringlist = self.etree.fromstringlist - 728 - 729 root = fromstringlist(list('<doc>This is a text.</doc>')) - 730 self.assertEqual(0, len(root)) - 731 self.assertEqual('This is a text.', root.text) -
732 - 733 required_versions_ET['test_fromstringlist_single'] = (1,3) -
734 - def test_fromstringlist_single(self): -
735 fromstringlist = self.etree.fromstringlist - 736 - 737 root = fromstringlist(['<doc>This is a text.</doc>']) - 738 self.assertEqual(0, len(root)) - 739 self.assertEqual('This is a text.', root.text) -
740 -
741 - def test_iselement(self): -
742 iselement = self.etree.iselement - 743 Element = self.etree.Element - 744 ElementTree = self.etree.ElementTree - 745 XML = self.etree.XML - 746 Comment = self.etree.Comment - 747 ProcessingInstruction = self.etree.ProcessingInstruction - 748 - 749 el = Element('hoi') - 750 self.assertTrue(iselement(el)) - 751 - 752 el2 = XML(_bytes('<foo/>')) - 753 self.assertTrue(iselement(el2)) - 754 - 755 tree = ElementTree(element=Element('dag')) - 756 self.assertTrue(not iselement(tree)) - 757 self.assertTrue(iselement(tree.getroot())) - 758 - 759 c = Comment('test') - 760 self.assertTrue(iselement(c)) - 761 - 762 p = ProcessingInstruction("test", "some text") - 763 self.assertTrue(iselement(p)) -
764 -
765 - def test_iteration(self): -
766 XML = self.etree.XML - 767 - 768 root = XML(_bytes('<doc><one/><two>Two</two>Hm<three/></doc>')) - 769 result = [] - 770 for el in root: - 771 result.append(el.tag) - 772 self.assertEqual(['one', 'two', 'three'], result) -
773 -
774 - def test_iteration_empty(self): -
775 XML = self.etree.XML - 776 - 777 root = XML(_bytes('<doc></doc>')) - 778 result = [] - 779 for el in root: - 780 result.append(el.tag) - 781 self.assertEqual([], result) -
782 -
783 - def test_iteration_text_only(self): -
784 XML = self.etree.XML - 785 - 786 root = XML(_bytes('<doc>Text</doc>')) - 787 result = [] - 788 for el in root: - 789 result.append(el.tag) - 790 self.assertEqual([], result) -
791 -
792 - def test_iteration_crash(self): -
793 # this would cause a crash in the past - 794 fromstring = self.etree.fromstring - 795 root = etree.fromstring('<html><p></p>x</html>') - 796 for elem in root: - 797 elem.tail = '' -
798 -
799 - def test_iteration_reversed(self): -
800 XML = self.etree.XML - 801 root = XML(_bytes('<doc><one/><two>Two</two>Hm<three/></doc>')) - 802 result = [] - 803 for el in reversed(root): - 804 result.append(el.tag) - 805 self.assertEqual(['three', 'two', 'one'], result) -
806 -
807 - def test_iteration_subelement(self): -
808 XML = self.etree.XML - 809 - 810 root = XML(_bytes('<doc><one/><two>Two</two>Hm<three/></doc>')) - 811 result = [] - 812 add = True - 813 for el in root: - 814 result.append(el.tag) - 815 if add: - 816 self.etree.SubElement(root, 'four') - 817 add = False - 818 self.assertEqual(['one', 'two', 'three', 'four'], result) -
819 -
820 - def test_iteration_del_child(self): -
821 XML = self.etree.XML - 822 - 823 root = XML(_bytes('<doc><one/><two>Two</two>Hm<three/></doc>')) - 824 result = [] - 825 for el in root: - 826 result.append(el.tag) - 827 del root[-1] - 828 self.assertEqual(['one', 'two'], result) -
829 -
830 - def test_iteration_double(self): -
831 XML = self.etree.XML - 832 - 833 root = XML(_bytes('<doc><one/><two/></doc>')) - 834 result = [] - 835 for el0 in root: - 836 result.append(el0.tag) - 837 for el1 in root: - 838 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 XML = self.etree.XML - 845 root = XML(_bytes("<root>RTEXT<a></a>ATAIL<b/><c>CTEXT</c>CTAIL</root>")) - 846 - 847 text = list(root.itertext()) - 848 self.assertEqual(["RTEXT", "ATAIL", "CTEXT", "CTAIL"], - 849 text) -
850 - 851 required_versions_ET['test_itertext_child'] = (1,3) -
852 - def test_itertext_child(self): -
853 # ET 1.3+ - 854 XML = self.etree.XML - 855 root = XML(_bytes("<root>RTEXT<a></a>ATAIL<b/><c>CTEXT</c>CTAIL</root>")) - 856 - 857 text = list(root[2].itertext()) - 858 self.assertEqual(["CTEXT"], - 859 text) -
860 -
861 - def test_findall(self): -
862 XML = self.etree.XML - 863 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 = self.etree.XML - 873 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']) -
884 -
886 Element = self.etree.Element - 887 - 888 el = Element('tag', {'foo': 'Foo', 'bar': 'Bar'}) - 889 self.assertEqual('Foo', el.attrib['foo']) - 890 self.assertEqual('Bar', el.attrib['bar']) -
891 -
893 Element = self.etree.Element - 894 - 895 el = Element('tag', {'foo': 'Foo', 'bar': 'Bar'}, baz='Baz') - 896 self.assertEqual('Foo', el.attrib['foo']) - 897 self.assertEqual('Bar', el.attrib['bar']) - 898 self.assertEqual('Baz', el.attrib['baz']) -
899 -
901 Element = self.etree.Element - 902 - 903 el = Element('tag', {'foo': 'Foo', 'bar': 'Bar'}, bar='Baz') - 904 self.assertEqual('Foo', el.attrib['foo']) - 905 self.assertEqual('Baz', el.attrib['bar']) -
906 -
908 Element = self.etree.Element - 909 - 910 el = Element('tag', {'{ns1}foo':'Foo', '{ns2}bar':'Bar'}) - 911 self.assertEqual('Foo', el.attrib['{ns1}foo']) - 912 self.assertEqual('Bar', el.attrib['{ns2}bar']) -
913 -
915 Element = self.etree.Element - 916 SubElement = self.etree.SubElement - 917 - 918 el = Element('tag') - 919 SubElement(el, 'foo', {'foo':'Foo'}, baz="Baz") - 920 self.assertEqual("Baz", el[0].attrib['baz']) - 921 self.assertEqual('Foo', el[0].attrib['foo']) -
922 -
924 Element = self.etree.Element - 925 SubElement = self.etree.SubElement - 926 - 927 el = Element('tag') - 928 SubElement(el, 'foo', {'{ns1}foo':'Foo', '{ns2}bar':'Bar'}) - 929 self.assertEqual('Foo', el[0].attrib['{ns1}foo']) - 930 self.assertEqual('Bar', el[0].attrib['{ns2}bar']) -
931 -
932 - def test_write(self): -
933 ElementTree = self.etree.ElementTree - 934 XML = self.etree.XML - 935 - 936 for i in range(10): - 937 f = BytesIO() - 938 root = XML(_bytes('<doc%s>This is a test.</doc%s>' % (i, i))) - 939 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 = self.etree.ElementTree - 949 Element = self.etree.Element - 950 SubElement = self.etree.SubElement - 951 - 952 html = Element('html') - 953 body = SubElement(html, 'body') - 954 p = SubElement(body, 'p') - 955 p.text = "html" - 956 SubElement(p, 'br').tail = "test" - 957 - 958 tree = 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 ElementTree = self.etree.ElementTree - 969 Element = self.etree.Element - 970 SubElement = self.etree.SubElement - 971 - 972 a = Element('a') - 973 a.text = "A" - 974 a.tail = "tail" - 975 b = SubElement(a, 'b') - 976 b.text = "B" - 977 b.tail = "TAIL" - 978 c = SubElement(a, 'c') - 979 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 ElementTree = self.etree.ElementTree - 991 XML = self.etree.XML - 992 - 993 tree = 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 Element = self.etree.Element -1001 -1002 element = Element('tag') -1003 for i in range(10): -1004 element.attrib['key'] = 'value' -1005 value = element.attrib['key'] -1006 self.assertEqual(value, 'value') -
1007 -1008 # from doctest; for some reason this caused crashes too -
1010 Element = self.etree.Element -1011 ElementTree = self.etree.ElementTree -1012 -1013 f = BytesIO() -1014 for i in range(10): -1015 element = Element('tag%s' % i) -1016 self._check_element(element) -1017 tree = ElementTree(element) -1018 tree.write(f) -1019 self._check_element_tree(tree) -
1020 -
1021 - def test_subelement_reference(self): -
1022 Element = self.etree.Element -1023 SubElement = self.etree.SubElement -1024 -1025 el = Element('foo') -1026 el2 = SubElement(el, 'bar') -1027 el3 = SubElement(el2, 'baz') -1028 -1029 al = Element('foo2') -1030 al2 = SubElement(al, 'bar2') -1031 al3 = SubElement(al2, 'baz2') -1032 -1033 # now move al2 into el -1034 el.append(al2) -1035 -1036 # now change al3 directly -1037 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) -
1043 -
1044 - def test_set_text(self): -
1045 Element = self.etree.Element -1046 SubElement = self.etree.SubElement -1047 -1048 a = Element('a') -1049 b = SubElement(a, 'b') -1050 a.text = 'hoi' -1051 self.assertEqual( -1052 'hoi', -1053 a.text) -1054 self.assertEqual( -1055 'b', -1056 a[0].tag) -
1057 -
1058 - def test_set_text2(self): -
1059 Element = self.etree.Element -1060 SubElement = self.etree.SubElement -1061 -1062 a = Element('a') -1063 a.text = 'hoi' -1064 b = SubElement(a ,'b') -1065 self.assertEqual( -1066 'hoi', -1067 a.text) -1068 self.assertEqual( -1069 'b', -1070 a[0].tag) -
1071 -
1072 - def test_set_text_none(self): -
1073 Element = self.etree.Element -1074 -1075 a = Element('a') -1076 -1077 a.text = 'foo' -1078 a.text = None -1079 -1080 self.assertEqual( -1081 None, -1082 a.text) -1083 self.assertXML(_bytes('<a></a>'), a) -
1084 -
1085 - def test_set_text_empty(self): -
1086 Element = self.etree.Element -1087 -1088 a = Element('a') -1089 self.assertEqual(None, a.text) -1090 -1091 a.text = '' -1092 self.assertEqual('', a.text) -1093 self.assertXML(_bytes('<a></a>'), a) -
1094 -
1095 - def test_tail1(self): -
1096 Element = self.etree.Element -1097 SubElement = self.etree.SubElement -1098 -1099 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 = self.etree.Element -1112 -1113 a = Element('a') -1114 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 = self.etree.Element -1122 SubElement = self.etree.SubElement -1123 -1124 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 = self.etree.Element -1134 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.etree.Element('foo') -1145 for i in range(3): -1146 element = self.etree.SubElement(root, 'a%s' % i) -1147 element.text = "text%d" % i -1148 element.tail = "tail%d" % i -1149 -1150 elements = [] -1151 for i in range(3): -1152 new_element = self.etree.Element("test%s" % i) -1153 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.tag for el in root ]) -1162 self.assertEqual( -1163 ["text0", "text1", "text2", "TEXT0", "TEXT1", "TEXT2"], -1164 [ 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 Element = self.etree.Element -1171 SubElement = self.etree.SubElement -1172 Comment = self.etree.Comment -1173 -1174 a = Element('a') -1175 a.append(Comment('foo')) -1176 self.assertEqual(a[0].tag, Comment) -1177 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 Element = self.etree.Element -1183 SubElement = self.etree.SubElement -1184 Comment = self.etree.Comment -1185 tostring = self.etree.tostring -1186 -1187 a = Element('a') -1188 a.append(Comment('foo')) -1189 self.assertEqual(a[0].text, 'foo') -1190 -1191 self.assertEqual( -1192 _bytes('<a><!--foo--></a>'), -1193 tostring(a)) -1194 -1195 a[0].text = "TEST" -1196 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 Element = self.etree.Element -1206 SubElement = self.etree.SubElement -1207 Comment = self.etree.Comment -1208 tostring = self.etree.tostring -1209 -1210 a = Element('a') -1211 a.append(Comment(' foo ')) -1212 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.etree.Comment -1219 c = Comment('foo') -1220 self.assertEqual({}, c.attrib) -1221 self.assertEqual([], list(c.keys())) -1222 self.assertEqual([], list(c.items())) -1223 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 Element = self.etree.Element -1232 SubElement = self.etree.SubElement -1233 ProcessingInstruction = self.etree.ProcessingInstruction -1234 -1235 a = Element('a') -1236 a.append(ProcessingInstruction('foo', 'some more text')) -1237 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 Element = self.etree.Element -1244 SubElement = self.etree.SubElement -1245 ProcessingInstruction = self.etree.PI -1246 -1247 a = Element('a') -1248 a.append(ProcessingInstruction('foo', 'some more text')) -1249 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.etree.ProcessingInstruction -1255 pi = ProcessingInstruction('foo') -1256 self.assertEqual({}, pi.attrib) -1257 self.assertEqual([], list(pi.keys())) -1258 self.assertEqual([], list(pi.items())) -1259 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 Element = self.etree.Element -1267 SubElement = self.etree.SubElement -1268 -1269 a = Element('a') -1270 b = SubElement(a, 'b') -1271 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 = self.etree.Element -1283 SubElement = self.etree.SubElement -1284 -1285 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('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 = self.etree.Element -1301 SubElement = self.etree.SubElement -1302 -1303 a = Element('a') -1304 SubElement(a, 'b') -1305 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 = self.etree.Element -1311 SubElement = self.etree.SubElement -1312 -1313 a = Element('a') -1314 b = SubElement(a, 'b') -1315 -1316 self.assertRaises(IndexError, operator.setitem, a, 1, Element('c')) -
1317 -
1318 - def test_setitem_tail(self): -
1319 Element = self.etree.Element -1320 SubElement = self.etree.SubElement -1321 -1322 a = Element('a') -1323 b = SubElement(a, 'b') -1324 b.tail = 'B2' -1325 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 = self.etree.Element -1335 SubElement = self.etree.SubElement -1336 -1337 a = Element('a') -1338 b = SubElement(a, 'b') -1339 -1340 a.tag = 'c' -1341 -1342 self.assertEqual( -1343 'c', -1344 a.tag) -1345 -1346 self.assertXML( -1347 _bytes('<c><b></b></c>'), -1348 a) -
1349 -
1350 - def test_tag_reset_ns(self): -
1351 Element = self.etree.Element -1352 SubElement = self.etree.SubElement -1353 tostring = self.etree.tostring -1354 -1355 a = Element('{a}a') -1356 b1 = SubElement(a, '{a}b') -1357 b2 = SubElement(a, '{b}b') -1358 -1359 self.assertEqual('{a}b', b1.tag) -1360 -1361 b1.tag = 'c' -1362 -1363 # can't use C14N here! -1364 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 Element = self.etree.Element -1370 SubElement = self.etree.SubElement -1371 tostring = self.etree.tostring -1372 -1373 a = Element('{a}a') -1374 b1 = SubElement(a, '{a}b') -1375 b2 = SubElement(a, '{b}b') -1376 -1377 a.tag = 'c' -1378 -1379 self.assertEqual( -1380 'c', -1381 a.tag) -1382 -1383 # can't use C14N here! -1384 self.assertEqual('c', a.tag) -1385 self.assertEqual(_bytes('<c'), tostring(a)[:2]) -
1386 -
1387 - def test_tag_str_subclass(self): -
1388 Element = self.etree.Element -1389 -1390 class strTest(str): -1391 pass -
1392 -1393 a = Element("a") -1394 a.tag = strTest("TAG") -1395 self.assertXML(_bytes('<TAG></TAG>'), -1396 a) -1397 -
1398 - def test_delitem(self): -
1399 Element = self.etree.Element -1400 SubElement = self.etree.SubElement -1401 -1402 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('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 = self.etree.Element -1430 SubElement = self.etree.SubElement -1431 -1432 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) -1444 -1445 del a[0] -1446 self.assertXML( -1447 _bytes('<a><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>'), -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 Element = self.etree.Element -1461 SubElement = self.etree.SubElement -1462 -1463 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 = self.etree.Element -1480 SubElement = self.etree.SubElement -1481 -1482 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 XML = self.etree.XML -1499 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 = self.etree.XML -1509 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.etree.tostring(root) -1515 foo = self.etree.fromstring(result) -1516 -1517 self.assertEqual('puh', foo[0].tag) -1518 self.assertEqual('{http://huhu}bump1', foo[0][0].tag) -1519 self.assertEqual('{http://huhu}bump2', foo[0][1].tag) -
1520 -
1521 - def test_delitem_tail(self): -
1522 ElementTree = self.etree.ElementTree -1523 f = BytesIO('<a><b></b>B2<c></c>C2</a>') -1524 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 Element = self.etree.Element -1533 -1534 a = Element('a') -1535 a.text = 'foo' -1536 a.tail = 'bar' -1537 a.set('hoi', 'dag') -1538 a.clear() -1539 self.assertEqual(None, a.text) -1540 self.assertEqual(None, a.tail) -1541 self.assertEqual(None, a.get('hoi')) -1542 self.assertEqual('a', a.tag) -
1543 -
1544 - def test_clear_sub(self): -
1545 Element = self.etree.Element -1546 SubElement = self.etree.SubElement -1547 -1548 a = Element('a') -1549 a.text = 'foo' -1550 a.tail = 'bar' -1551 a.set('hoi', 'dag') -1552 b = SubElement(a, 'b') -1553 c = SubElement(b, 'c') -1554 a.clear() -1555 self.assertEqual(None, a.text) -1556 self.assertEqual(None, a.tail) -1557 self.assertEqual(None, a.get('hoi')) -1558 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 ElementTree = self.etree.ElementTree -1567 f = BytesIO('<a><b></b>B2<c></c>C2</a>') -1568 doc = ElementTree(file=f) -1569 a = doc.getroot() -1570 a.clear() -1571 self.assertXML( -1572 _bytes('<a></a>'), -1573 a) -
1574 -
1575 - def test_insert(self): -
1576 Element = self.etree.Element -1577 SubElement = self.etree.SubElement -1578 -1579 a = Element('a') -1580 b = SubElement(a, 'b') -1581 c = SubElement(a, 'c') -1582 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('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 = self.etree.Element -1605 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 = Element(names['a']) -1612 b = SubElement(a, names['b']) -1613 c = SubElement(a, names['c']) -1614 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['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 = self.etree.Element -1636 SubElement = self.etree.SubElement -1637 -1638 a = Element('a') -1639 b = SubElement(a, 'b') -1640 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 = self.etree.Element -1652 SubElement = self.etree.SubElement -1653 -1654 a = Element('a') -1655 b = SubElement(a, 'b') -1656 c = SubElement(a, 'c') -1657 -1658 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 = self.etree.Element -1669 SubElement = self.etree.SubElement -1670 -1671 a = Element('a') -1672 b = SubElement(a, 'b') -1673 -1674 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 = self.etree.Element -1684 SubElement = self.etree.SubElement -1685 -1686 a = Element('a') -1687 b = SubElement(a, 'b') -1688 c = SubElement(a, 'c') -1689 -1690 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 Element = self.etree.Element -1700 SubElement = self.etree.SubElement -1701 -1702 a = Element('{http://test}a') -1703 b = SubElement(a, '{http://test}b') -1704 c = SubElement(a, '{http://test}c') -1705 -1706 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 Element = self.etree.Element -1716 SubElement = self.etree.SubElement -1717 -1718 a = Element('a') -1719 b = SubElement(a, 'b') -1720 c = SubElement(a, 'c') -1721 d = Element('d') -1722 self.assertRaises( -1723 ValueError, a.remove, d) -
1724 -
1725 - def test_remove_tail(self): -
1726 Element = self.etree.Element -1727 SubElement = self.etree.SubElement -1728 -1729 a = Element('a') -1730 b = SubElement(a, 'b') -1731 b.tail = 'b2' -1732 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 Element = self.etree.Element -1740 SubElement = self.etree.SubElement -1741 -1742 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 = self.etree.Element -1762 -1763 a = Element('a') -1764 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 Element = self.etree.Element -1772 SubElement = self.etree.SubElement -1773 -1774 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 = self.etree.Element -1789 SubElement = self.etree.SubElement -1790 -1791 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 = self.etree.Element -1806 SubElement = self.etree.SubElement -1807 -1808 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 = self.etree.Element -1826 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 Element = self.etree.Element -1847 SubElement = self.etree.SubElement -1848 -1849 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 = self.etree.Element -1861 Comment = self.etree.Comment -1862 SubElement = self.etree.SubElement -1863 -1864 a = 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 = self.etree.Element -1886 PI = self.etree.ProcessingInstruction -1887 SubElement = self.etree.SubElement -1888 -1889 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 = self.etree.Element -1911 SubElement = self.etree.SubElement -1912 -1913 a = Element('a') -1914 a.text = 'a' -1915 b = SubElement(a, 'b') -1916 b.text = 'b' -1917 b.tail = 'b1' -1918 c = SubElement(a, 'c') -1919 c.text = 'c' -1920 c.tail = 'c1' -1921 d = SubElement(b, 'd') -1922 c.text = 'd' -1923 c.tail = 'd1' -1924 e = SubElement(c, 'e') -1925 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 Element = self.etree.Element -1937 SubElement = self.etree.SubElement -1938 -1939 a = Element('a') -1940 a.text = 'a' -1941 b = SubElement(a, 'b') -1942 b.text = 'b' -1943 b.tail = 'b1' -1944 c = SubElement(a, 'c') -1945 c.text = 'c' -1946 c.tail = 'c1' -1947 d = SubElement(b, 'd') -1948 c.text = 'd' -1949 c.tail = 'd1' -1950 e = SubElement(c, 'e') -1951 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 Element = self.etree.Element -1967 SubElement = self.etree.SubElement -1968 -1969 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 = self.etree.Element -1992 SubElement = self.etree.SubElement -1993 -1994 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 = self.etree.Element -2017 SubElement = self.etree.SubElement -2018 -2019 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 ElementTree = self.etree.ElementTree -2043 -2044 f = BytesIO('<a><b>B</b>B1<c>C</c>C1</a>') -2045 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 Element = self.etree.Element -2061 Comment = self.etree.Comment -2062 SubElement = self.etree.SubElement -2063 -2064 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('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 = self.etree.Element -2085 SubElement = self.etree.SubElement -2086 -2087 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 = self.etree.Element -2100 SubElement = self.etree.SubElement -2101 -2102 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 = self.etree.Element -2115 SubElement = self.etree.SubElement -2116 -2117 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 = self.etree.Element -2130 SubElement = self.etree.SubElement -2131 -2132 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 = self.etree.Element -2145 SubElement = self.etree.SubElement -2146 -2147 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 = self.etree.Element -2160 SubElement = self.etree.SubElement -2161 -2162 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 ElementTree = self.etree.ElementTree -2175 f = BytesIO('<a><b></b>B2<c></c>C2<d></d>D2<e></e>E2</a>') -2176 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 XML = self.etree.XML -2185 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 Element = self.etree.Element -2196 SubElement = self.etree.SubElement -2197 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.tag) -
2203 -
2204 - def test_setslice(self): -
2205 Element = self.etree.Element -2206 SubElement = self.etree.SubElement -2207 -2208 a = Element('a') -2209 b = SubElement(a, 'b') -2210 c = SubElement(a, 'c') -2211 d = SubElement(a, 'd') -2212 -2213 e = Element('e') -2214 f = Element('f') -2215 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 = self.etree.Element -2225 SubElement = self.etree.SubElement -2226 -2227 a = Element('a') -2228 b = SubElement(a, 'b') -2229 c = SubElement(a, 'c') -2230 -2231 e = Element('e') -2232 f = Element('f') -2233 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 = self.etree.Element -2243 SubElement = self.etree.SubElement -2244 -2245 a = Element('a') -2246 -2247 e = Element('e') -2248 f = Element('f') -2249 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 = self.etree.Element -2259 SubElement = self.etree.SubElement -2260 -2261 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 = self.etree.Element -2274 SubElement = self.etree.SubElement -2275 -2276 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 = self.etree.Element -2289 SubElement = self.etree.SubElement -2290 -2291 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.tag for child in a ]) -2304 -2305 self.assertEqual( -2306 [['{ns3}a3'], ['{ns2}a2'], ['{ns1}a1']], -2307 [ list(child.attrib.keys()) for child in a ]) -
2308 -
2310 Element = self.etree.Element -2311 SubElement = self.etree.SubElement -2312 -2313 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.tag for child in a ]) -2326 -2327 self.assertEqual( -2328 [['{ns}a3'], ['{ns}a2'], ['{ns}a1']], -2329 [ list(child.attrib.keys()) for child in a ]) -
2330 -
2331 - def test_setslice_end(self): -
2332 Element = self.etree.Element -2333 SubElement = self.etree.SubElement -2334 -2335 a = Element('a') -2336 b = SubElement(a, 'b') -2337 c = SubElement(a, 'c') -2338 -2339 e = Element('e') -2340 f = Element('f') -2341 g = Element('g') -2342 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 = self.etree.Element -2358 SubElement = self.etree.SubElement -2359 -2360 a = Element('a') -2361 b = SubElement(a, 'b') -2362 c = SubElement(a, 'c') -2363 d = SubElement(a, 'd') -2364 -2365 e = Element('e') -2366 f = Element('f') -2367 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 = self.etree.Element -2377 SubElement = self.etree.SubElement -2378 -2379 a = Element('a') -2380 b = SubElement(a, 'b') -2381 c = SubElement(a, 'c') -2382 -2383 e = Element('e') -2384 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 ElementTree = self.etree.ElementTree -2400 Element = self.etree.Element -2401 f = BytesIO('<a><b></b>B2<c></c>C2<d></d>D2<e></e>E2</a>') -2402 doc = ElementTree(file=f) -2403 a = doc.getroot() -2404 x = Element('x') -2405 y = Element('y') -2406 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 = self.etree.Element -2417 SubElement = self.etree.SubElement -2418 -2419 a = Element('a') -2420 b = SubElement(a, 'b') -2421 c = SubElement(a, 'c') -2422 d = SubElement(a, 'd') -2423 -2424 x = Element('x') -2425 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 = self.etree.Element -2434 SubElement = self.etree.SubElement -2435 -2436 a = Element('a') -2437 b = SubElement(a, 'b') -2438 c = SubElement(a, 'c') -2439 d = SubElement(a, 'd') -2440 -2441 x = Element('x') -2442 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 = self.etree.Element -2451 -2452 a = Element('a') -2453 -2454 b = Element('b') -2455 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 = self.etree.Element -2464 ElementTree = self.etree.ElementTree -2465 -2466 a = Element('a') -2467 a.tail = 'A2' -2468 t = ElementTree(element=a) -2469 self.assertEqual('A2', -2470 a.tail) -
2471 -
2473 Element = self.etree.Element -2474 SubElement = self.etree.SubElement -2475 ElementTree = self.etree.ElementTree -2476 -2477 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 = ElementTree(element=a) -2483 -2484 self.assertEqual( -2485 [a, b, d, c, e], -2486 list(t.getiterator())) -
2487 -
2489 Element = self.etree.Element -2490 SubElement = self.etree.SubElement -2491 ElementTree = self.etree.ElementTree -2492 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 = 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 = self.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(file=f) -2512 a = t.getroot() -2513 self.assertEqual('{%s}a' % ns, -2514 a.tag) -2515 self.assertEqual('{%s}b' % ns, -2516 a[0].tag) -
2517 -
2518 - def test_ns_access2(self): -
2519 ElementTree = self.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(file=f) -2524 a = t.getroot() -2525 self.assertEqual('{%s}a' % ns, -2526 a.tag) -2527 self.assertEqual('{%s}b' % ns, -2528 a[0].tag) -2529 self.assertEqual('{%s}b' % ns2, -2530 a[1].tag) -
2531 -
2532 - def test_ns_setting(self): -
2533 Element = self.etree.Element -2534 SubElement = self.etree.SubElement -2535 ns = 'http://xml.infrae.com/1' -2536 ns2 = 'http://xml.infrae.com/2' -2537 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.tag) -2542 self.assertEqual('{%s}b' % ns2, -2543 b.tag) -2544 self.assertEqual('{%s}c' % ns, -2545 c.tag) -2546 self.assertEqual('{%s}a' % ns, -2547 a.tag) -2548 self.assertEqual('{%s}b' % ns2, -2549 b.tag) -2550 self.assertEqual('{%s}c' % ns, -2551 c.tag) -
2552 -
2553 - def test_ns_tag_parse(self): -
2554 Element = self.etree.Element -2555 SubElement = self.etree.SubElement -2556 ElementTree = self.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(file=f) -2562 -2563 a = t.getroot() -2564 self.assertEqual('{%s}a' % ns, -2565 a.tag) -2566 self.assertEqual('{%s}b' % ns2, -2567 a[0].tag) -2568 self.assertEqual('{%s}b' % ns, -2569 a[1].tag) -
2570 -
2571 - def test_ns_attr(self): -
2572 Element = self.etree.Element -2573 ns = 'http://xml.infrae.com/1' -2574 ns2 = 'http://xml.infrae.com/2' -2575 a = Element('a') -2576 a.set('{%s}foo' % ns, 'Foo') -2577 a.set('{%s}bar' % ns2, 'Bar') -2578 self.assertEqual( -2579 'Foo', -2580 a.get('{%s}foo' % ns)) -2581 self.assertEqual( -2582 'Bar', -2583 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 Element = self.etree.Element -2595 one = self.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].tag) -
2605 -
2606 - def test_ns_decl_tostring(self): -
2607 tostring = self.etree.tostring -2608 root = self.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.etree.tostring -2618 root = self.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.etree.tostring -2628 root = self.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 Element = self.etree.Element -2639 SubElement = self.etree.SubElement -2640 -2641 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.etree.tostring(baz)) -2647 -2648 self.assertEqual([_bytes("http://a.b.c")], nsdecl) -
2649 -
2650 - def test_attribute_xmlns_move(self): -
2651 Element = self.etree.Element -2652 -2653 root = Element('element') -2654 -2655 subelement = Element('subelement', -2656 {"{http://www.w3.org/XML/1998/namespace}id": "foo"}) -2657 self.assertEqual(1, len(subelement.attrib)) -2658 self.assertEqual( -2659 "foo", -2660 subelement.get("{http://www.w3.org/XML/1998/namespace}id")) -2661 -2662 root.append(subelement) -2663 self.assertEqual(1, len(subelement.attrib)) -2664 self.assertEqual( -2665 list({"{http://www.w3.org/XML/1998/namespace}id" : "foo"}.items()), -2666 list(subelement.attrib.items())) -2667 self.assertEqual( -2668 "foo", -2669 subelement.get("{http://www.w3.org/XML/1998/namespace}id")) -
2670 -
2672 parse = self.etree.parse -2673 tostring = self.etree.tostring -2674 -2675 ns_href = "http://a.b.c" -2676 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(BytesIO( tostring(baz) )).getroot() -2681 self.assertEqual('{%s}baz' % ns_href, parsed.tag) -
2682 -
2684 fromstring = self.etree.fromstring -2685 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 = fromstring(xml) -2691 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 = fromstring(xml2) -2697 self.assertEqual('test', root2[0].get('{%s}a' % ns_href)) -
2698 -
2700 fromstring = self.etree.fromstring -2701 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 = fromstring(xml) -2707 self.assertEqual('test', root[0].get('{%s}a' % ns_href)) -2708 -2709 root[0].set('{%s}a' % ns_href, 'TEST') -2710 -2711 xml2 = tostring(root) -2712 self.assertTrue(_bytes(':a=') in xml2, xml2) -2713 -2714 root2 = fromstring(xml2) -2715 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 Element = self.etree.Element -2721 prefix = 'TESTPREFIX' -2722 namespace = 'http://seriously.unknown/namespace/URI' -2723 -2724 el = Element('{%s}test' % namespace) -2725 self.assertEqual(_bytes('<ns0:test xmlns:ns0="%s"></ns0:test>' % namespace), -2726 self._writeElement(el)) -2727 -2728 self.etree.register_namespace(prefix, namespace) -2729 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.etree.register_namespace, 'ns25', namespace) -
2735 -
2736 - def test_tostring(self): -
2737 tostring = self.etree.tostring -2738 Element = self.etree.Element -2739 SubElement = self.etree.SubElement -2740 -2741 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.etree.tostring -2750 Element = self.etree.Element -2751 SubElement = self.etree.SubElement -2752 -2753 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.etree.tostring -2764 Element = self.etree.Element -2765 SubElement = self.etree.SubElement -2766 -2767 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.etree.tostring -2779 Element = self.etree.Element -2780 SubElement = self.etree.SubElement -2781 -2782 html = Element('html') -2783 body = SubElement(html, 'body') -2784 p = SubElement(body, 'p') -2785 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(html, method="html")) -
2790 -2791 required_versions_ET['test_tostring_method_text'] = (1,3) -
2792 - def test_tostring_method_text(self): -
2793 tostring = self.etree.tostring -2794 Element = self.etree.Element -2795 SubElement = self.etree.SubElement -2796 -2797 a = Element('a') -2798 a.text = "A" -2799 a.tail = "tail" -2800 b = SubElement(a, 'b') -2801 b.text = "B" -2802 b.tail = "TAIL" -2803 c = SubElement(a, 'c') -2804 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 = next(iter(iterator)) -2830 self.assertEqual('end', event) -2831 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.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.tag != '{http://ns1/}a': -2901 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.get(attr_name)) -2912 self.assertEqual( -2913 'value', -2914 root[0].get(attr_name)) -
2915 -
2916 - def test_iterparse_getiterator(self): -
2917 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 -2929 f = BytesIO('<a><b><d/></b><c/></a>') -2930 -2931 for event, node in etree.iterparse(f): pass -2932 -2933 root = etree.Element('new_root', {}) -2934 root[:] = node[:] -2935 -2936 self.assertEqual( -2937 ['b', 'c'], -2938 [ el.tag for el in root ]) -
2939 -
2940 - def test_iterparse_cdata(self): -
2941 tostring = self.etree.tostring -2942 f = BytesIO('<root><![CDATA[test]]></root>') -2943 context = self.etree.iterparse(f) -2944 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 parse = self.etree.parse -2952 # from file -2953 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 = self.etree.parse -2960 self.assertRaises(IOError, parse, fileInTestDir('notthere.xml')) -
2961 -
2962 - def test_parse_error_none(self): -
2963 parse = self.etree.parse -2964 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 = self.etree.parse -2970 f = BytesIO('<a><b></c></b></a>') -2971 self.assertRaises(SyntaxError, parse, f) -2972 f.close() -
2973 -2974 required_versions_ET['test_parse_error_from_file'] = (1,3) -
2975 - def test_parse_error_from_file(self): -
2976 parse = self.etree.parse -2977 # from file -2978 f = open(fileInTestDir('test_broken.xml'), 'rb') -2979 self.assertRaises(SyntaxError, parse, f) -2980 f.close() -
2981 -
2982 - def test_parse_file_object(self): -
2983 parse = self.etree.parse -2984 # from file object -2985 f = open(fileInTestDir('test.xml'), 'rb') -2986 tree = parse(f) -2987 f.close() -2988 self.assertXML( -2989 _bytes('<a><b></b></a>'), -2990 tree.getroot()) -
2991 -
2992 - def test_parse_stringio(self): -
2993 parse = self.etree.parse -2994 f = BytesIO('<a><b></b></a>') -2995 tree = parse(f) -2996 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.etree.tostring -3004 root = self.etree.XML(_bytes('<root><![CDATA[test]]></root>')) -3005 -3006 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 parse = self.etree.parse -3013 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 Element = self.etree.Element -3019 -3020 a = Element('a') -3021 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 ElementTree = self.etree.ElementTree -3028 Element = self.etree.Element -3029 -3030 a = Element('a') -3031 a.text = _str('Søk på nettet') -3032 -3033 f = BytesIO() -3034 tree = ElementTree(element=a) -3035 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 parse = self.etree.parse -3041 # from file -3042 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 = self.etree.parse -3049 # from file object -3050 f = open(fileInTestDir('test-string.xml'), 'rb') -3051 tree = parse(f) -3052 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 ElementTree = self.etree.ElementTree -3059 Element = self.etree.Element -3060 -3061 a = Element('a') -3062 a.text = _str('Søk på nettet') -3063 -3064 f = BytesIO() -3065 tree = ElementTree(element=a) -3066 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 XMLParser = self.XMLParser -3077 -3078 text = _str('Søk på nettet') -3079 xml_latin1 = (_str('<a>%s</a>') % text).encode('iso-8859-1') -3080 -3081 self.assertRaises(self.etree.ParseError, -3082 self.etree.parse, -3083 BytesIO(xml_latin1)) -3084 -3085 tree = self.etree.parse(BytesIO(xml_latin1), -3086 XMLParser(encoding="iso-8859-1")) -3087 a = tree.getroot() -3088 self.assertEqual(a.text, text) -
3089 -3090 required_versions_ET['test_parse_encoding_8bit_override'] = (1,3) -
3092 XMLParser = self.XMLParser -3093 -3094 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) -3097 ).encode('iso-8859-1') -3098 -3099 self.assertRaises(self.etree.ParseError, -3100 self.etree.parse, -3101 BytesIO(xml_latin1)) -3102 -3103 tree = self.etree.parse(BytesIO(xml_latin1), -3104 XMLParser(encoding="iso-8859-1")) -3105 a = tree.getroot() -3106 self.assertEqual(a.text, text) -
3107 -
3109 # raise error on wrong encoding declaration in unicode strings -3110 XML = self.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, test_utf) -
3114 -
3116 ElementTree = self.etree.ElementTree -3117 Element = self.etree.Element -3118 -3119 a = Element('a') -3120 a.text = _str('Søk på nettet') -3121 -3122 f = BytesIO() -3123 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 Element = self.etree.Element -3132 tostring = self.etree.tostring -3133 -3134 a = Element('a') -3135 a.text = _str('Søk på nettet') -3136 self.assertEqual(_str('<a>Søk på nettet</a>').encode('UTF-8'), -3137 tostring(a, encoding='utf-8')) -
3138 -
3140 Element = self.etree.Element -3141 tostring = self.etree.tostring -3142 -3143 a = Element('a') -3144 a.text = _str('Søk på nettet') -3145 self.assertRaises(LookupError, tostring, a, -3146 encoding='Invalid Encoding') -
3147 -
3148 - def test_encoding_tostring_sub(self): -
3149 Element = self.etree.Element -3150 SubElement = self.etree.SubElement -3151 tostring = self.etree.tostring -3152 -3153 a = Element('a') -3154 b = SubElement(a, 'b') -3155 b.text = _str('Søk på nettet') -3156 self.assertEqual(_str('<b>Søk på nettet</b>').encode('UTF-8'), -3157 tostring(b, encoding='utf-8')) -
3158 -
3160 Element = self.etree.Element -3161 SubElement = self.etree.SubElement -3162 tostring = self.etree.tostring -3163 -3164 a = Element('a') -3165 b = SubElement(a, 'b') -3166 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, encoding='utf-8')) -
3170 -
3172 Element = self.etree.Element -3173 SubElement = self.etree.SubElement -3174 tostring = self.etree.tostring -3175 -3176 a = Element('a') -3177 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 Element = self.etree.Element -3186 SubElement = self.etree.SubElement -3187 tostring = self.etree.tostring -3188 -3189 a = Element('a') -3190 b = SubElement(a, 'b') -3191 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.etree.XML(isoxml) -3204 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 = etree.XML(xml) -3213 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.etree.parse(BytesIO(isoxml)).getroot() -3221 self.assertEqual(utext, el.text) -
3222 -
3223 - def test_deepcopy_elementtree(self): -
3224 Element = self.etree.Element -3225 ElementTree = self.etree.ElementTree -3226 -3227 a = Element('a') -3228 a.text = "Foo" -3229 atree = ElementTree(a) -3230 -3231 btree = copy.deepcopy(atree) -3232 self.assertEqual("Foo", atree.getroot().text) -3233 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 Element = self.etree.Element -3239 -3240 a = Element('a') -3241 a.text = 'Foo' -3242 -3243 b = copy.deepcopy(a) -3244 self.assertEqual('Foo', b.text) -3245 -3246 b.text = 'Bar' -3247 self.assertEqual('Bar', b.text) -3248 self.assertEqual('Foo', a.text) -3249 -3250 del a -3251 self.assertEqual('Bar', b.text) -
3252 -
3253 - def test_deepcopy_tail(self): -
3254 Element = self.etree.Element -3255 -3256 a = Element('a') -3257 a.tail = 'Foo' -3258 -3259 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 Element = self.etree.Element -3271 SubElement = self.etree.SubElement -3272 -3273 root = Element('root') -3274 a = SubElement(root, 'a') -3275 a.text = 'FooText' -3276 a.tail = 'FooTail' -3277 -3278 b = copy.deepcopy(a) -3279 self.assertEqual('FooText', b.text) -3280 self.assertEqual('FooTail', b.tail) -3281 -3282 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) -3287 self.assertEqual('FooText', a.text) -3288 -3289 del a -3290 self.assertEqual('BarTail', b.tail) -3291 self.assertEqual('BarText', b.text) -
3292 -
3293 - def test_deepcopy_namespaces(self): -
3294 root = self.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].get('{tns}foo'), -3299 copy.deepcopy(root[0])[0].get('{tns}foo') ) -3300 self.assertEqual( -3301 root[0][0].get('{tns}foo'), -3302 copy.deepcopy(root[0][0]).get('{tns}foo') ) -
3303 -
3304 - def test_deepcopy_append(self): -
3305 # previously caused a crash -3306 Element = self.etree.Element -3307 tostring = self.etree.tostring -3308 -3309 a = Element('a') -3310 b = copy.deepcopy(a) -3311 a.append( Element('C') ) -3312 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.etree.Comment -3323 -3324 a = Comment("ONE") -3325 b = copy.deepcopy(a) -3326 b.text = "ANOTHER" -3327 -3328 self.assertEqual('ONE', a.text) -3329 self.assertEqual('ANOTHER', b.text) -
3330 -
3331 - def test_shallowcopy(self): -
3332 Element = self.etree.Element -3333 -3334 a = Element('a') -3335 a.text = 'Foo' -3336 -3337 b = copy.copy(a) -3338 self.assertEqual('Foo', b.text) -3339 -3340 b.text = 'Bar' -3341 self.assertEqual('Bar', b.text) -3342 self.assertEqual('Foo', a.text) -
3343 # XXX ElementTree will share nodes, but lxml.etree won't.. -3344 -
3346 Element = self.etree.Element -3347 ElementTree = self.etree.ElementTree -3348 -3349 a = Element('a') -3350 a.text = 'Foo' -3351 atree = ElementTree(a) -3352 -3353 btree = copy.copy(atree) -3354 self.assertFalse(btree is atree) -3355 self.assertTrue(btree.getroot() is atree.getroot()) -3356 self.assertEqual('Foo', atree.getroot().text) -
3357 -
3358 - def _test_element_boolean(self): -
3359 # deprecated as of ET 1.3/lxml 2.0 -3360 etree = self.etree -3361 e = etree.Element('foo') -3362 self.assertEqual(False, bool(e)) -3363 etree.SubElement(e, 'bar') -3364 self.assertEqual(True, bool(e)) -3365 e = etree.Element('foo') -3366 e.text = 'hey' -3367 self.assertEqual(False, bool(e)) -3368 e = etree.Element('foo') -3369 e.tail = 'bar' -3370 self.assertEqual(False, bool(e)) -3371 e = etree.Element('foo') -3372 e.set('bar', 'Bar') -3373 self.assertEqual(False, bool(e)) -
3374 -
3375 - def test_multiple_elementrees(self): -
3376 etree = self.etree -3377 -3378 a = etree.Element('a') -3379 b = etree.SubElement(a, 'b') -3380 -3381 t = etree.ElementTree(a) -3382 self.assertEqual(self._rootstring(t), _bytes('<a><b/></a>')) -3383 -3384 t1 = 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 = 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 etree = self.etree -3395 qname = etree.QName('myns', 'a') -3396 a1 = etree.Element(qname) -3397 a2 = etree.SubElement(a1, qname) -3398 self.assertEqual(a1.tag, "{myns}a") -3399 self.assertEqual(a2.tag, "{myns}a") -
3400 -
3401 - def test_qname_cmp(self): -
3402 etree = self.etree -3403 qname1 = etree.QName('myns', 'a') -3404 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 = self.etree -3412 qname = etree.QName('myns', 'a') -3413 -3414 a = etree.Element(qname) -3415 a.set(qname, "value") -3416 -3417 self.assertEqual(a.get(qname), "value") -3418 self.assertEqual(a.get("{myns}a"), "value") -
3419 -
3420 - def test_qname_attrib(self): -
3421 etree = self.etree -3422 qname = etree.QName('myns', 'a') -3423 -3424 a = etree.Element(qname) -3425 a.attrib[qname] = "value" -3426 -3427 self.assertEqual(a.attrib[qname], "value") -3428 self.assertEqual(a.attrib.get(qname), "value") -3429 -3430 self.assertEqual(a.attrib["{myns}a"], "value") -3431 self.assertEqual(a.attrib.get("{myns}a"), "value") -
3432 -
3434 etree = self.etree -3435 qname = etree.QName('http://myns', 'a') -3436 a = etree.Element(qname) -3437 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 etree = self.etree -3445 qname = etree.QName('http://myns', 'a') -3446 a = etree.Element('a') -3447 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 etree = self.etree -3455 qname = etree.QName('http://myns', 'a') -3456 a = etree.Element(qname) -3457 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 etree = self.etree -3465 parser = 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() -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.close() -3483 -3484 self.assertEqual(root.tag, "root") -3485 self.assertEqual(root[0].tag, "a") -3486 self.assertEqual(root[0].get("test"), "works") -
3487 -
3488 - def test_feed_parser_unicode(self): -
3489 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.close() -3498 -3499 self.assertEqual(root.tag, "root") -3500 self.assertEqual(root[0].tag, "a") -3501 self.assertEqual(root[0].get("test"), "works") -
3502 -3503 required_versions_ET['test_feed_parser_error_close_empty'] = (1,3) -
3505 ParseError = self.etree.ParseError -3506 parser = self.XMLParser() -3507 self.assertRaises(ParseError, parser.close) -
3508 -3509 required_versions_ET['test_feed_parser_error_close_incomplete'] = (1,3) -
3511 ParseError = self.etree.ParseError -3512 parser = self.XMLParser() -3513 -3514 parser.feed('<?xml version=') -3515 parser.feed('"1.0"?><ro') -3516 -3517 self.assertRaises(ParseError, parser.close) -
3518 -3519 required_versions_ET['test_feed_parser_error_broken'] = (1,3) -
3521 ParseError = self.etree.ParseError -3522 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.close) -
3533 -3534 required_versions_ET['test_feed_parser_error_position'] = (1,3) -
3536 ParseError = self.etree.ParseError -3537 parser = self.XMLParser() -3538 try: -3539 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.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", tag) -
3569 def end(self, tag): -3570 events.append("end") -3571 assertEqual("TAG", tag) -3572 def close(self): -3573 return "DONE" -3574 -3575 parser = self.XMLParser(target=Target()) -3576 -3577 parser.feed("<TAG/>") -3578 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", tag) -3591 raise ValueError("TEST") -
3592 def end(self, tag): -3593 events.append("end") -3594 assertEqual("TAG", tag) -3595 def close(self): -3596 return "DONE" -3597 -3598 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", tag) -
3620 def end(self, tag): -3621 events.append("end") -3622 assertEqual("TAG", tag) -3623 raise ValueError("TEST") -3624 def close(self): -3625 return "DONE" -3626 -3627 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", tag) -
3645 def end(self, tag): -3646 events.append("end") -3647 assertEqual("TAG", tag) -3648 def close(self): -3649 raise ValueError("TEST") -3650 -3651 parser = self.XMLParser(target=Target()) -3652 -3653 try: -3654 parser.feed("<TAG/>") -3655 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", tag) -3670 raise IndexError("TEST-IE") -
3671 def end(self, tag): -3672 events.append("end") -3673 assertEqual("TAG", tag) -3674 def close(self): -3675 raise ValueError("TEST-VE") -3676 -3677 parser = self.XMLParser(target=Target()) -3678 -3679 try: -3680 parser.feed("<TAG/>") -3681 parser.close() -3682 except IndexError: -3683 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__: -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__: -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 Element = self.etree.Element -3704 -3705 events = [] -3706 class Target(object): -3707 def start(self, tag, attrib): -3708 events.append("start") -3709 assertFalse(attrib) -3710 assertEqual("TAG", tag) -
3711 def end(self, tag): -3712 events.append("end") -3713 assertEqual("TAG", tag) -3714 def close(self): -3715 return Element("DONE") -3716 -3717 parser = self.XMLParser(target=Target()) -3718 tree = self.etree.ElementTree() -3719 tree.parse(BytesIO("<TAG/>"), parser=parser) -3720 -3721 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) -3731 for name, value in attrib.items(): -3732 assertEqual(tag + name, value) -
3733 def end(self, tag): -3734 events.append("end-" + tag) -3735 def close(self): -3736 return "DONE" -3737 -3738 parser = self.XMLParser(target=Target()) -3739 -3740 parser.feed('<root a="roota" b="rootb"><sub c="subc"/></root>') -3741 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-" + tag) -
3752 def end(self, tag): -3753 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.XMLParser(target=Target()) -3760 -3761 parser.feed('<root>A<sub/>B</root>') -3762 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-" + tag) -3781 def end(self, tag): -3782 self._flush_data() -3783 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.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.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-" + tag) -3821 def end(self, tag): -3822 self._flush_data() -3823 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.XMLParser(target=Target()) -3831 -3832 def feed(): -3833 parser.feed('<root><sub/><sub>some &ent;</sub><sub/></root>') -3834 parser.close() -3835 -3836 self.assertRaises(self.etree.ParseError, feed) -3837 -
3838 - def test_treebuilder(self): -
3839 builder = self.etree.TreeBuilder() -3840 el = builder.start("root", {'a':'A', 'b':'B'}) -3841 self.assertEqual("root", el.tag) -3842 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.tag) -3846 self.assertEqual({'x':'X', 'y':'Y'}, el.attrib) -3847 builder.data("CHILDTEXT") -3848 el = builder.end("child") -3849 self.assertEqual("child", el.tag) -3850 self.assertEqual({'x':'X', 'y':'Y'}, el.attrib) -3851 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.tag) -3857 self.assertEqual("ROOTTEXT", root.text) -3858 self.assertEqual("CHILDTEXT", root[0].text) -3859 self.assertEqual("CHILDTAIL", root[0].tail) -
3860 -
3861 - def test_treebuilder_target(self): -
3862 parser = self.XMLParser(target=self.etree.TreeBuilder()) -3863 parser.feed('<root>ROOTTEXT<child>CHILDTEXT</child>CHILDTAIL</root>') -3864 root = parser.close() -3865 -3866 self.assertEqual("root", root.tag) -3867 self.assertEqual("ROOTTEXT", root.text) -3868 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.etree.tostring(element, 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 ElementTree = self.etree.ElementTree -3883 handle, filename = tempfile.mkstemp() -3884 try: -3885 f = open(filename, 'wb') -3886 tree = ElementTree(element=element) -3887 tree.write(f, encoding=encoding) -3888 f.close() -3889 f = open(filename, 'rb') -3890 data = f.read() -3891 f.close() -3892 finally: -3893 os.close(handle) -3894 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(encoding) -3904 self.assertEqual(expected, self._writeElement(element, encoding)) -3905 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.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.tag) -3931 self._check_mapping(element.attrib) -3932 if element.text != None: -3933 self._check_string(element.text) -3934 if element.tail != 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 keys = mapping.keys() -3948 values = mapping.values() -3949 items = mapping.items() -3950 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.close() -3972 return root -
3973 -
3974 - def assert_event_tags(self, parser, expected): -
3975 events = parser.read_events() -3976 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, 'root') -
4002 -
4003 - def test_feed_while_iterating(self): -
4004 parser = self.etree.XMLPullParser() -4005 it = parser.read_events() -4006 self._feed(parser, "<root>\n <element key='value'>text</element>\n") -4007 action, elem = next(it) -4008 self.assertEqual((action, elem.tag), ('end', 'element')) -4009 self._feed(parser, "</root>\n") -4010 action, elem = next(it) -4011 self.assertEqual((action, elem.tag), ('end', 'root')) -4012 try: -4013 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.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.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.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') -
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 = set(['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 next(self.events) -4116 next = __next__ -4117 -4118 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=('start', 'end', 'bogus')) -4125 except ValueError: -4126 self.assertTrue(True) -4127 else: -4128 self.assertTrue(False) -
4129 -4130 -4131 if etree: -
4132 - class ETreeTestCase(_ETreeTestCaseBase): -
4133 etree = etree -
4134 -
4135 - class ETreePullTestCase(_XMLPullParserTest): -
4136 etree = etree -
4137 -4138 -4139 if ElementTree: -
4140 - class ElementTreeTestCase(_ETreeTestCaseBase): -
4141 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, 'XMLPullParser'): -
4157 - class ElementTreePullTestCase(_XMLPullParserTest): -
4159 else: -4160 ElementTreePullTestCase = None -4161 -4162 -4163 if cElementTree: -
4164 - 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 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_elementtree.CElementTreeTestCase-class.html b/doc/html/api/lxml.tests.test_elementtree.CElementTreeTestCase-class.html deleted file mode 100644 index e714cf7..0000000 --- a/doc/html/api/lxml.tests.test_elementtree.CElementTreeTestCase-class.html +++ /dev/null @@ -1,640 +0,0 @@ - - - - - lxml.tests.test_elementtree.CElementTreeTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_elementtree :: - Class CElementTreeTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class CElementTreeTestCase

source code

-
-               object --+            
-                        |            
-   unittest.case.TestCase --+        
-                            |        
-common_imports.HelperTestCase --+    
-                                |    
-               _ETreeTestCaseBase --+
-                                    |
-                                   CElementTreeTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from _ETreeTestCaseBase: - XMLParser, - assertEncodingDeclaration, - assertXML, - test_ElementTree, - test_XML, - test_XMLID, - test_attrib, - test_attrib_as_attrib, - test_attrib_clear, - test_attrib_copy, - test_attrib_deepcopy, - test_attrib_dict, - test_attrib_get, - test_attrib_ns_clear, - test_attrib_pop, - test_attrib_pop_default, - test_attrib_pop_empty_default, - test_attrib_pop_invalid_args, - test_attrib_pop_unknown, - test_attrib_set_clear, - test_attribute_contains, - test_attribute_items, - test_attribute_items2, - test_attribute_items_ns, - test_attribute_iterator, - test_attribute_keys, - test_attribute_keys2, - test_attribute_keys_ns, - test_attribute_manipulation, - test_attribute_namespace_roundtrip, - test_attribute_namespace_roundtrip_replaced, - test_attribute_set, - test_attribute_str, - test_attribute_update_attrib, - test_attribute_update_dict, - test_attribute_update_iter, - test_attribute_update_sequence, - test_attribute_values, - test_attribute_values_ns, - test_attribute_xmlns_move, - test_attributes_get, - test_clear, - test_clear_sub, - test_clear_tail, - test_comment, - test_comment_getitem_getslice, - test_comment_nonsense, - test_comment_text, - test_comment_whitespace, - test_crash, - test_deepcopy, - test_deepcopy_append, - test_deepcopy_comment, - test_deepcopy_elementtree, - test_deepcopy_namespaces, - test_deepcopy_subelement, - test_deepcopy_tail, - test_del_attribute_ns, - test_del_attribute_ns_parsed, - test_del_insert, - test_del_setitem, - test_del_setslice, - test_delitem, - test_delitem_tail, - test_delslice, - test_delslice_child_tail, - test_delslice_memory, - test_delslice_negative1, - test_delslice_negative2, - test_delslice_step, - test_delslice_step_negative, - test_delslice_step_negative2, - test_delslice_tail, - test_element, - test_element_contains, - test_element_indexing_negative, - test_element_indexing_only_text, - test_element_indexing_with_text, - test_element_indexing_with_text2, - test_element_with_attributes, - test_element_with_attributes_extra, - test_element_with_attributes_extra_duplicate, - test_element_with_attributes_keywords, - test_element_with_attributes_ns, - test_elementtree, - test_elementtree_getiterator, - test_elementtree_getiterator_filter, - test_elementtree_parser_target, - test_encoding, - test_encoding_8bit_latin1, - test_encoding_8bit_parse_stringio, - test_encoding_8bit_xml, - test_encoding_exact, - test_encoding_sub_tostring_default_encoding, - test_encoding_tostring, - test_encoding_tostring_default_encoding, - test_encoding_tostring_sub, - test_encoding_tostring_sub_tail, - test_encoding_tostring_unknown, - test_encoding_utf8_bom, - test_encoding_write_default_encoding, - test_extend, - test_feed_parser_bytes, - test_feed_parser_error_broken, - test_feed_parser_error_close_empty, - test_feed_parser_error_close_incomplete, - test_feed_parser_error_position, - test_feed_parser_unicode, - test_findall, - test_findall_ns, - test_fromstring, - test_fromstringlist, - test_fromstringlist_characters, - test_fromstringlist_single, - test_getiterator, - test_getiterator_empty, - test_getiterator_filter, - test_getiterator_filter_all, - test_getiterator_filter_comment, - test_getiterator_filter_pi, - test_getiterator_filter_with_text, - test_getiterator_with_text, - test_getslice, - test_getslice_negative, - test_getslice_step, - test_getslice_text, - test_insert, - test_insert_beyond_index, - test_insert_name_interning, - test_insert_negative, - test_insert_tail, - test_iselement, - test_iter, - test_iteration, - test_iteration_crash, - test_iteration_del_child, - test_iteration_double, - test_iteration_empty, - test_iteration_reversed, - test_iteration_subelement, - test_iteration_text_only, - test_iterparse, - test_iterparse_attrib_ns, - test_iterparse_cdata, - test_iterparse_clear, - test_iterparse_file, - test_iterparse_getiterator, - test_iterparse_incomplete, - test_iterparse_large, - test_iterparse_move_elements, - test_iterparse_start, - test_iterparse_start_end, - test_itertext, - test_itertext_child, - test_makeelement, - test_merge_namespaced_subtree_as_slice, - test_multiple_elementrees, - test_namespaces_after_serialize, - test_ns_access, - test_ns_access2, - test_ns_attr, - test_ns_decl_tostring, - test_ns_decl_tostring_default, - test_ns_decl_tostring_element, - test_ns_decl_tostring_root, - test_ns_move, - test_ns_setting, - test_ns_tag_parse, - test_parse_cdata, - test_parse_encoding_8bit_explicit, - test_parse_encoding_8bit_override, - test_parse_error, - test_parse_error_from_file, - test_parse_error_none, - test_parse_file, - test_parse_file_encoding, - test_parse_file_nonexistent, - test_parse_file_object, - test_parse_file_object_encoding, - test_parse_stringio, - test_parse_with_encoding, - test_parser_target_attrib, - test_parser_target_data, - test_parser_target_entity, - test_parser_target_entity_unknown, - test_parser_target_error_in_close, - test_parser_target_error_in_end, - test_parser_target_error_in_start, - test_parser_target_error_in_start_and_close, - test_parser_target_property, - test_parser_target_tag, - test_parser_version, - test_pi, - test_pi_nonsense, - test_processinginstruction, - test_qname, - test_qname_attrib, - test_qname_attrib_resolve, - test_qname_attribute_getset, - test_qname_attribute_resolve, - test_qname_attribute_resolve_new, - test_qname_cmp, - test_register_namespace, - test_remove, - test_remove_nonexisting, - test_remove_ns, - test_remove_tail, - test_replace_slice_tail, - test_set_text, - test_set_text2, - test_set_text_empty, - test_set_text_none, - test_setitem, - test_setitem2, - test_setitem_indexerror, - test_setitem_replace, - test_setitem_tail, - test_setslice, - test_setslice_all, - test_setslice_all_empty, - test_setslice_all_replace, - test_setslice_all_replace_reversed, - test_setslice_all_replace_reversed_ns1, - test_setslice_all_replace_reversed_ns2, - test_setslice_empty, - test_setslice_end, - test_setslice_end_exact, - test_setslice_negative, - test_setslice_negative2, - test_setslice_single, - test_setslice_tail, - test_shallowcopy, - test_shallowcopy_elementtree, - test_simple, - test_subelement, - test_subelement_reference, - test_subelement_with_attributes, - test_subelement_with_attributes_ns, - test_tag_reset_ns, - test_tag_reset_root_ns, - test_tag_str_subclass, - test_tag_write, - test_tail, - test_tail1, - test_tail_append, - test_tail_elementtree_root, - test_tail_set_none, - test_tail_set_twice, - test_tail_str_subclass, - test_text, - test_text_empty, - test_text_escape_in, - test_text_escape_out, - test_text_escape_tostring, - test_text_other, - test_text_str_subclass, - test_tostring, - test_tostring_element, - test_tostring_element_tail, - test_tostring_method_html, - test_tostring_method_text, - test_treebuilder, - test_treebuilder_target, - test_weird_dict_interaction, - test_write, - test_write_ElementTreeDoctest, - test_write_fail, - test_write_method_html, - test_write_method_text -

- -

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - etree = None
- hash(x) -
-

Inherited from _ETreeTestCaseBase: - required_versions_ET, - required_versions_cET -

-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_elementtree.ETreePullTestCase-class.html b/doc/html/api/lxml.tests.test_elementtree.ETreePullTestCase-class.html deleted file mode 100644 index 1b67741..0000000 --- a/doc/html/api/lxml.tests.test_elementtree.ETreePullTestCase-class.html +++ /dev/null @@ -1,395 +0,0 @@ - - - - - lxml.tests.test_elementtree.ETreePullTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_elementtree :: - Class ETreePullTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ETreePullTestCase

source code

-
-            object --+        
-                     |        
-unittest.case.TestCase --+    
-                         |    
-        _XMLPullParserTest --+
-                             |
-                            ETreePullTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from _XMLPullParserTest: - assert_event_tags, - test_events, - test_events_sequence, - test_feed_while_iterating, - test_ns_events, - test_simple_xml, - test_simple_xml_with_ns, - test_unknown_event -

-

Inherited from _XMLPullParserTest (private): - _close_and_return_root, - _feed -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest, - tearDown -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - etree
- The lxml.etree module implements the extended ElementTree API for XML. -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

etree

- The lxml.etree module implements the extended ElementTree API for XML. -
-
-
-
Value:
-
lxml.etree
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_elementtree.ETreeTestCase-class.html b/doc/html/api/lxml.tests.test_elementtree.ETreeTestCase-class.html deleted file mode 100644 index 43a4d80..0000000 --- a/doc/html/api/lxml.tests.test_elementtree.ETreeTestCase-class.html +++ /dev/null @@ -1,674 +0,0 @@ - - - - - lxml.tests.test_elementtree.ETreeTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_elementtree :: - Class ETreeTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ETreeTestCase

source code

-
-               object --+            
-                        |            
-   unittest.case.TestCase --+        
-                            |        
-common_imports.HelperTestCase --+    
-                                |    
-               _ETreeTestCaseBase --+
-                                    |
-                                   ETreeTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from _ETreeTestCaseBase: - XMLParser, - assertEncodingDeclaration, - assertXML, - test_ElementTree, - test_XML, - test_XMLID, - test_attrib, - test_attrib_as_attrib, - test_attrib_clear, - test_attrib_copy, - test_attrib_deepcopy, - test_attrib_dict, - test_attrib_get, - test_attrib_ns_clear, - test_attrib_pop, - test_attrib_pop_default, - test_attrib_pop_empty_default, - test_attrib_pop_invalid_args, - test_attrib_pop_unknown, - test_attrib_set_clear, - test_attribute_contains, - test_attribute_items, - test_attribute_items2, - test_attribute_items_ns, - test_attribute_iterator, - test_attribute_keys, - test_attribute_keys2, - test_attribute_keys_ns, - test_attribute_manipulation, - test_attribute_namespace_roundtrip, - test_attribute_namespace_roundtrip_replaced, - test_attribute_set, - test_attribute_str, - test_attribute_update_attrib, - test_attribute_update_dict, - test_attribute_update_iter, - test_attribute_update_sequence, - test_attribute_values, - test_attribute_values_ns, - test_attribute_xmlns_move, - test_attributes_get, - test_clear, - test_clear_sub, - test_clear_tail, - test_comment, - test_comment_getitem_getslice, - test_comment_nonsense, - test_comment_text, - test_comment_whitespace, - test_crash, - test_deepcopy, - test_deepcopy_append, - test_deepcopy_comment, - test_deepcopy_elementtree, - test_deepcopy_namespaces, - test_deepcopy_subelement, - test_deepcopy_tail, - test_del_attribute_ns, - test_del_attribute_ns_parsed, - test_del_insert, - test_del_setitem, - test_del_setslice, - test_delitem, - test_delitem_tail, - test_delslice, - test_delslice_child_tail, - test_delslice_memory, - test_delslice_negative1, - test_delslice_negative2, - test_delslice_step, - test_delslice_step_negative, - test_delslice_step_negative2, - test_delslice_tail, - test_element, - test_element_contains, - test_element_indexing_negative, - test_element_indexing_only_text, - test_element_indexing_with_text, - test_element_indexing_with_text2, - test_element_with_attributes, - test_element_with_attributes_extra, - test_element_with_attributes_extra_duplicate, - test_element_with_attributes_keywords, - test_element_with_attributes_ns, - test_elementtree, - test_elementtree_getiterator, - test_elementtree_getiterator_filter, - test_elementtree_parser_target, - test_encoding, - test_encoding_8bit_latin1, - test_encoding_8bit_parse_stringio, - test_encoding_8bit_xml, - test_encoding_exact, - test_encoding_sub_tostring_default_encoding, - test_encoding_tostring, - test_encoding_tostring_default_encoding, - test_encoding_tostring_sub, - test_encoding_tostring_sub_tail, - test_encoding_tostring_unknown, - test_encoding_utf8_bom, - test_encoding_write_default_encoding, - test_extend, - test_feed_parser_bytes, - test_feed_parser_error_broken, - test_feed_parser_error_close_empty, - test_feed_parser_error_close_incomplete, - test_feed_parser_error_position, - test_feed_parser_unicode, - test_findall, - test_findall_ns, - test_fromstring, - test_fromstringlist, - test_fromstringlist_characters, - test_fromstringlist_single, - test_getiterator, - test_getiterator_empty, - test_getiterator_filter, - test_getiterator_filter_all, - test_getiterator_filter_comment, - test_getiterator_filter_pi, - test_getiterator_filter_with_text, - test_getiterator_with_text, - test_getslice, - test_getslice_negative, - test_getslice_step, - test_getslice_text, - test_insert, - test_insert_beyond_index, - test_insert_name_interning, - test_insert_negative, - test_insert_tail, - test_iselement, - test_iter, - test_iteration, - test_iteration_crash, - test_iteration_del_child, - test_iteration_double, - test_iteration_empty, - test_iteration_reversed, - test_iteration_subelement, - test_iteration_text_only, - test_iterparse, - test_iterparse_attrib_ns, - test_iterparse_cdata, - test_iterparse_clear, - test_iterparse_file, - test_iterparse_getiterator, - test_iterparse_incomplete, - test_iterparse_large, - test_iterparse_move_elements, - test_iterparse_start, - test_iterparse_start_end, - test_itertext, - test_itertext_child, - test_makeelement, - test_merge_namespaced_subtree_as_slice, - test_multiple_elementrees, - test_namespaces_after_serialize, - test_ns_access, - test_ns_access2, - test_ns_attr, - test_ns_decl_tostring, - test_ns_decl_tostring_default, - test_ns_decl_tostring_element, - test_ns_decl_tostring_root, - test_ns_move, - test_ns_setting, - test_ns_tag_parse, - test_parse_cdata, - test_parse_encoding_8bit_explicit, - test_parse_encoding_8bit_override, - test_parse_error, - test_parse_error_from_file, - test_parse_error_none, - test_parse_file, - test_parse_file_encoding, - test_parse_file_nonexistent, - test_parse_file_object, - test_parse_file_object_encoding, - test_parse_stringio, - test_parse_with_encoding, - test_parser_target_attrib, - test_parser_target_data, - test_parser_target_entity, - test_parser_target_entity_unknown, - test_parser_target_error_in_close, - test_parser_target_error_in_end, - test_parser_target_error_in_start, - test_parser_target_error_in_start_and_close, - test_parser_target_property, - test_parser_target_tag, - test_parser_version, - test_pi, - test_pi_nonsense, - test_processinginstruction, - test_qname, - test_qname_attrib, - test_qname_attrib_resolve, - test_qname_attribute_getset, - test_qname_attribute_resolve, - test_qname_attribute_resolve_new, - test_qname_cmp, - test_register_namespace, - test_remove, - test_remove_nonexisting, - test_remove_ns, - test_remove_tail, - test_replace_slice_tail, - test_set_text, - test_set_text2, - test_set_text_empty, - test_set_text_none, - test_setitem, - test_setitem2, - test_setitem_indexerror, - test_setitem_replace, - test_setitem_tail, - test_setslice, - test_setslice_all, - test_setslice_all_empty, - test_setslice_all_replace, - test_setslice_all_replace_reversed, - test_setslice_all_replace_reversed_ns1, - test_setslice_all_replace_reversed_ns2, - test_setslice_empty, - test_setslice_end, - test_setslice_end_exact, - test_setslice_negative, - test_setslice_negative2, - test_setslice_single, - test_setslice_tail, - test_shallowcopy, - test_shallowcopy_elementtree, - test_simple, - test_subelement, - test_subelement_reference, - test_subelement_with_attributes, - test_subelement_with_attributes_ns, - test_tag_reset_ns, - test_tag_reset_root_ns, - test_tag_str_subclass, - test_tag_write, - test_tail, - test_tail1, - test_tail_append, - test_tail_elementtree_root, - test_tail_set_none, - test_tail_set_twice, - test_tail_str_subclass, - test_text, - test_text_empty, - test_text_escape_in, - test_text_escape_out, - test_text_escape_tostring, - test_text_other, - test_text_str_subclass, - test_tostring, - test_tostring_element, - test_tostring_element_tail, - test_tostring_method_html, - test_tostring_method_text, - test_treebuilder, - test_treebuilder_target, - test_weird_dict_interaction, - test_write, - test_write_ElementTreeDoctest, - test_write_fail, - test_write_method_html, - test_write_method_text -

- -

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - etree
- The lxml.etree module implements the extended ElementTree API for XML. -
-

Inherited from _ETreeTestCaseBase: - required_versions_ET, - required_versions_cET -

-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

etree

- The lxml.etree module implements the extended ElementTree API for XML. -
-
-
-
Value:
-
lxml.etree
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_elementtree.ElementTreeTestCase-class.html b/doc/html/api/lxml.tests.test_elementtree.ElementTreeTestCase-class.html deleted file mode 100644 index 07e2592..0000000 --- a/doc/html/api/lxml.tests.test_elementtree.ElementTreeTestCase-class.html +++ /dev/null @@ -1,733 +0,0 @@ - - - - - lxml.tests.test_elementtree.ElementTreeTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_elementtree :: - Class ElementTreeTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ElementTreeTestCase

source code

-
-               object --+            
-                        |            
-   unittest.case.TestCase --+        
-                            |        
-common_imports.HelperTestCase --+    
-                                |    
-               _ETreeTestCaseBase --+
-                                    |
-                                   ElementTreeTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from _ETreeTestCaseBase: - XMLParser, - assertEncodingDeclaration, - assertXML, - test_ElementTree, - test_XML, - test_XMLID, - test_attrib, - test_attrib_as_attrib, - test_attrib_clear, - test_attrib_copy, - test_attrib_deepcopy, - test_attrib_dict, - test_attrib_get, - test_attrib_ns_clear, - test_attrib_pop, - test_attrib_pop_default, - test_attrib_pop_empty_default, - test_attrib_pop_invalid_args, - test_attrib_pop_unknown, - test_attrib_set_clear, - test_attribute_contains, - test_attribute_items, - test_attribute_items2, - test_attribute_items_ns, - test_attribute_iterator, - test_attribute_keys, - test_attribute_keys2, - test_attribute_keys_ns, - test_attribute_manipulation, - test_attribute_namespace_roundtrip, - test_attribute_namespace_roundtrip_replaced, - test_attribute_set, - test_attribute_str, - test_attribute_update_attrib, - test_attribute_update_dict, - test_attribute_update_iter, - test_attribute_update_sequence, - test_attribute_values, - test_attribute_values_ns, - test_attribute_xmlns_move, - test_attributes_get, - test_clear, - test_clear_sub, - test_clear_tail, - test_comment, - test_comment_getitem_getslice, - test_comment_nonsense, - test_comment_text, - test_comment_whitespace, - test_crash, - test_deepcopy, - test_deepcopy_append, - test_deepcopy_comment, - test_deepcopy_elementtree, - test_deepcopy_namespaces, - test_deepcopy_subelement, - test_deepcopy_tail, - test_del_attribute_ns, - test_del_attribute_ns_parsed, - test_del_insert, - test_del_setitem, - test_del_setslice, - test_delitem, - test_delitem_tail, - test_delslice, - test_delslice_child_tail, - test_delslice_memory, - test_delslice_negative1, - test_delslice_negative2, - test_delslice_step, - test_delslice_step_negative, - test_delslice_step_negative2, - test_delslice_tail, - test_element, - test_element_contains, - test_element_indexing_negative, - test_element_indexing_only_text, - test_element_indexing_with_text, - test_element_indexing_with_text2, - test_element_with_attributes, - test_element_with_attributes_extra, - test_element_with_attributes_extra_duplicate, - test_element_with_attributes_keywords, - test_element_with_attributes_ns, - test_elementtree, - test_elementtree_getiterator, - test_elementtree_getiterator_filter, - test_elementtree_parser_target, - test_encoding, - test_encoding_8bit_latin1, - test_encoding_8bit_parse_stringio, - test_encoding_8bit_xml, - test_encoding_exact, - test_encoding_sub_tostring_default_encoding, - test_encoding_tostring, - test_encoding_tostring_default_encoding, - test_encoding_tostring_sub, - test_encoding_tostring_sub_tail, - test_encoding_tostring_unknown, - test_encoding_utf8_bom, - test_encoding_write_default_encoding, - test_extend, - test_feed_parser_bytes, - test_feed_parser_error_broken, - test_feed_parser_error_close_empty, - test_feed_parser_error_close_incomplete, - test_feed_parser_error_position, - test_feed_parser_unicode, - test_findall, - test_findall_ns, - test_fromstring, - test_fromstringlist, - test_fromstringlist_characters, - test_fromstringlist_single, - test_getiterator, - test_getiterator_empty, - test_getiterator_filter, - test_getiterator_filter_all, - test_getiterator_filter_comment, - test_getiterator_filter_pi, - test_getiterator_filter_with_text, - test_getiterator_with_text, - test_getslice, - test_getslice_negative, - test_getslice_step, - test_getslice_text, - test_insert, - test_insert_beyond_index, - test_insert_name_interning, - test_insert_negative, - test_insert_tail, - test_iselement, - test_iter, - test_iteration, - test_iteration_crash, - test_iteration_del_child, - test_iteration_double, - test_iteration_empty, - test_iteration_reversed, - test_iteration_subelement, - test_iteration_text_only, - test_iterparse, - test_iterparse_attrib_ns, - test_iterparse_cdata, - test_iterparse_clear, - test_iterparse_file, - test_iterparse_getiterator, - test_iterparse_incomplete, - test_iterparse_large, - test_iterparse_move_elements, - test_iterparse_start, - test_iterparse_start_end, - test_itertext, - test_itertext_child, - test_makeelement, - test_merge_namespaced_subtree_as_slice, - test_multiple_elementrees, - test_namespaces_after_serialize, - test_ns_access, - test_ns_access2, - test_ns_attr, - test_ns_decl_tostring, - test_ns_decl_tostring_default, - test_ns_decl_tostring_element, - test_ns_decl_tostring_root, - test_ns_move, - test_ns_setting, - test_ns_tag_parse, - test_parse_cdata, - test_parse_encoding_8bit_explicit, - test_parse_encoding_8bit_override, - test_parse_error, - test_parse_error_from_file, - test_parse_error_none, - test_parse_file, - test_parse_file_encoding, - test_parse_file_nonexistent, - test_parse_file_object, - test_parse_file_object_encoding, - test_parse_stringio, - test_parse_with_encoding, - test_parser_target_attrib, - test_parser_target_data, - test_parser_target_entity, - test_parser_target_entity_unknown, - test_parser_target_error_in_close, - test_parser_target_error_in_end, - test_parser_target_error_in_start, - test_parser_target_error_in_start_and_close, - test_parser_target_property, - test_parser_target_tag, - test_parser_version, - test_pi, - test_pi_nonsense, - test_processinginstruction, - test_qname, - test_qname_attrib, - test_qname_attrib_resolve, - test_qname_attribute_getset, - test_qname_attribute_resolve, - test_qname_attribute_resolve_new, - test_qname_cmp, - test_register_namespace, - test_remove, - test_remove_nonexisting, - test_remove_ns, - test_remove_tail, - test_replace_slice_tail, - test_set_text, - test_set_text2, - test_set_text_empty, - test_set_text_none, - test_setitem, - test_setitem2, - test_setitem_indexerror, - test_setitem_replace, - test_setitem_tail, - test_setslice, - test_setslice_all, - test_setslice_all_empty, - test_setslice_all_replace, - test_setslice_all_replace_reversed, - test_setslice_all_replace_reversed_ns1, - test_setslice_all_replace_reversed_ns2, - test_setslice_empty, - test_setslice_end, - test_setslice_end_exact, - test_setslice_negative, - test_setslice_negative2, - test_setslice_single, - test_setslice_tail, - test_shallowcopy, - test_shallowcopy_elementtree, - test_simple, - test_subelement, - test_subelement_reference, - test_subelement_with_attributes, - test_subelement_with_attributes_ns, - test_tag_reset_ns, - test_tag_reset_root_ns, - test_tag_str_subclass, - test_tag_write, - test_tail, - test_tail1, - test_tail_append, - test_tail_elementtree_root, - test_tail_set_none, - test_tail_set_twice, - test_tail_str_subclass, - test_text, - test_text_empty, - test_text_escape_in, - test_text_escape_out, - test_text_escape_tostring, - test_text_other, - test_text_str_subclass, - test_tostring, - test_tostring_element, - test_tostring_element_tail, - test_tostring_method_html, - test_tostring_method_text, - test_treebuilder, - test_treebuilder_target, - test_weird_dict_interaction, - test_write, - test_write_ElementTreeDoctest, - test_write_fail, - test_write_method_html, - test_write_method_text -

- -

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-   - - - - - - -
setUpClass(cls)
- Hook method for setting up class fixture before running tests in the class.
- source code - -
- -
-

Inherited from unittest.case.TestCase: - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - etree
- hash(x) -
-

Inherited from _ETreeTestCaseBase: - required_versions_ET, - required_versions_cET -

-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUpClass(cls) -
Class Method -

-
source code  -
- - Hook method for setting up class fixture before running tests in the class. -
-
Overrides: - unittest.case.TestCase.setUpClass -
(inherited documentation)
- -
-
-
-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

etree

- hash(x) -
-
-
-
Value:
-
xml.etree.ElementTree
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_elementtree._ETreeTestCaseBase-class.html b/doc/html/api/lxml.tests.test_elementtree._ETreeTestCaseBase-class.html deleted file mode 100644 index a2625f7..0000000 --- a/doc/html/api/lxml.tests.test_elementtree._ETreeTestCaseBase-class.html +++ /dev/null @@ -1,4987 +0,0 @@ - - - - - lxml.tests.test_elementtree._ETreeTestCaseBase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_elementtree :: - Class _ETreeTestCaseBase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _ETreeTestCaseBase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               _ETreeTestCaseBase
-
- -
Known Subclasses:
-
- -
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
XMLParser(self, - **kwargs) - source code - -
- -
-   - - - - - - -
test_element(self) - source code - -
- -
-   - - - - - - -
test_simple(self) - source code - -
- -
-   - - - - - - -
test_weird_dict_interaction(self) - source code - -
- -
-   - - - - - - -
test_subelement(self) - source code - -
- -
-   - - - - - - -
test_element_contains(self) - source code - -
- -
-   - - - - - - -
test_element_indexing_with_text(self) - source code - -
- -
-   - - - - - - -
test_element_indexing_with_text2(self) - source code - -
- -
-   - - - - - - -
test_element_indexing_only_text(self) - source code - -
- -
-   - - - - - - -
test_element_indexing_negative(self) - source code - -
- -
-   - - - - - - -
test_elementtree(self) - source code - -
- -
-   - - - - - - -
test_text(self) - source code - -
- -
-   - - - - - - -
test_text_empty(self) - source code - -
- -
-   - - - - - - -
test_text_other(self) - source code - -
- -
-   - - - - - - -
test_text_escape_in(self) - source code - -
- -
-   - - - - - - -
test_text_escape_out(self) - source code - -
- -
-   - - - - - - -
test_text_escape_tostring(self) - source code - -
- -
-   - - - - - - -
test_text_str_subclass(self) - source code - -
- -
-   - - - - - - -
test_tail(self) - source code - -
- -
-   - - - - - - -
test_tail_str_subclass(self) - source code - -
- -
-   - - - - - - -
_test_del_tail(self) - source code - -
- -
-   - - - - - - -
test_ElementTree(self) - source code - -
- -
-   - - - - - - -
test_attrib(self) - source code - -
- -
-   - - - - - - -
test_attrib_get(self) - source code - -
- -
-   - - - - - - -
test_attrib_dict(self) - source code - -
- -
-   - - - - - - -
test_attrib_copy(self) - source code - -
- -
-   - - - - - - -
test_attrib_deepcopy(self) - source code - -
- -
-   - - - - - - -
test_attributes_get(self) - source code - -
- -
-   - - - - - - -
test_attrib_clear(self) - source code - -
- -
-   - - - - - - -
test_attrib_set_clear(self) - source code - -
- -
-   - - - - - - -
test_attrib_ns_clear(self) - source code - -
- -
-   - - - - - - -
test_attrib_pop(self) - source code - -
- -
-   - - - - - - -
test_attrib_pop_unknown(self) - source code - -
- -
-   - - - - - - -
test_attrib_pop_default(self) - source code - -
- -
-   - - - - - - -
test_attrib_pop_empty_default(self) - source code - -
- -
-   - - - - - - -
test_attrib_pop_invalid_args(self) - source code - -
- -
-   - - - - - - -
test_attribute_update_dict(self) - source code - -
- -
-   - - - - - - -
test_attribute_update_sequence(self) - source code - -
- -
-   - - - - - - -
test_attribute_update_iter(self) - source code - -
- -
-   - - - - - - -
test_attribute_update_attrib(self) - source code - -
- -
-   - - - - - - -
test_attribute_keys(self) - source code - -
- -
-   - - - - - - -
test_attribute_keys2(self) - source code - -
- -
-   - - - - - - -
test_attribute_items2(self) - source code - -
- -
-   - - - - - - -
test_attribute_keys_ns(self) - source code - -
- -
-   - - - - - - -
test_attribute_values(self) - source code - -
- -
-   - - - - - - -
test_attribute_values_ns(self) - source code - -
- -
-   - - - - - - -
test_attribute_items(self) - source code - -
- -
-   - - - - - - -
test_attribute_items_ns(self) - source code - -
- -
-   - - - - - - -
test_attribute_str(self) - source code - -
- -
-   - - - - - - -
test_attribute_contains(self) - source code - -
- -
-   - - - - - - -
test_attribute_set(self) - source code - -
- -
-   - - - - - - -
test_attrib_as_attrib(self) - source code - -
- -
-   - - - - - - -
test_attribute_iterator(self) - source code - -
- -
-   - - - - - - -
test_attribute_manipulation(self) - source code - -
- -
-   - - - - - - -
test_del_attribute_ns(self) - source code - -
- -
-   - - - - - - -
test_del_attribute_ns_parsed(self) - source code - -
- -
-   - - - - - - -
test_XML(self) - source code - -
- -
-   - - - - - - -
test_XMLID(self) - source code - -
- -
-   - - - - - - -
test_fromstring(self) - source code - -
- -
-   - - - - - - -
test_fromstringlist(self) - source code - -
- -
-   - - - - - - -
test_fromstringlist_characters(self) - source code - -
- -
-   - - - - - - -
test_fromstringlist_single(self) - source code - -
- -
-   - - - - - - -
test_iselement(self) - source code - -
- -
-   - - - - - - -
test_iteration(self) - source code - -
- -
-   - - - - - - -
test_iteration_empty(self) - source code - -
- -
-   - - - - - - -
test_iteration_text_only(self) - source code - -
- -
-   - - - - - - -
test_iteration_crash(self) - source code - -
- -
-   - - - - - - -
test_iteration_reversed(self) - source code - -
- -
-   - - - - - - -
test_iteration_subelement(self) - source code - -
- -
-   - - - - - - -
test_iteration_del_child(self) - source code - -
- -
-   - - - - - - -
test_iteration_double(self) - source code - -
- -
-   - - - - - - -
test_itertext(self) - source code - -
- -
-   - - - - - - -
test_itertext_child(self) - source code - -
- -
-   - - - - - - -
test_findall(self) - source code - -
- -
-   - - - - - - -
test_findall_ns(self) - source code - -
- -
-   - - - - - - -
test_element_with_attributes_keywords(self) - source code - -
- -
-   - - - - - - -
test_element_with_attributes(self) - source code - -
- -
-   - - - - - - -
test_element_with_attributes_extra(self) - source code - -
- -
-   - - - - - - -
test_element_with_attributes_extra_duplicate(self) - source code - -
- -
-   - - - - - - -
test_element_with_attributes_ns(self) - source code - -
- -
-   - - - - - - -
test_subelement_with_attributes(self) - source code - -
- -
-   - - - - - - -
test_subelement_with_attributes_ns(self) - source code - -
- -
-   - - - - - - -
test_write(self) - source code - -
- -
-   - - - - - - -
test_write_method_html(self) - source code - -
- -
-   - - - - - - -
test_write_method_text(self) - source code - -
- -
-   - - - - - - -
test_write_fail(self) - source code - -
- -
-   - - - - - - -
test_crash(self) - source code - -
- -
-   - - - - - - -
test_write_ElementTreeDoctest(self) - source code - -
- -
-   - - - - - - -
test_subelement_reference(self) - source code - -
- -
-   - - - - - - -
test_set_text(self) - source code - -
- -
-   - - - - - - -
test_set_text2(self) - source code - -
- -
-   - - - - - - -
test_set_text_none(self) - source code - -
- -
-   - - - - - - -
test_set_text_empty(self) - source code - -
- -
-   - - - - - - -
test_tail1(self) - source code - -
- -
-   - - - - - - -
test_tail_append(self) - source code - -
- -
-   - - - - - - -
test_tail_set_twice(self) - source code - -
- -
-   - - - - - - -
test_tail_set_none(self) - source code - -
- -
-   - - - - - - -
test_extend(self) - source code - -
- -
-   - - - - - - -
test_comment(self) - source code - -
- -
-   - - - - - - -
test_comment_text(self) - source code - -
- -
-   - - - - - - -
test_comment_whitespace(self) - source code - -
- -
-   - - - - - - -
test_comment_nonsense(self) - source code - -
- -
-   - - - - - - -
test_pi(self) - source code - -
- -
-   - - - - - - -
test_processinginstruction(self) - source code - -
- -
-   - - - - - - -
test_pi_nonsense(self) - source code - -
- -
-   - - - - - - -
test_setitem(self) - source code - -
- -
-   - - - - - - -
test_setitem2(self) - source code - -
- -
-   - - - - - - -
test_setitem_replace(self) - source code - -
- -
-   - - - - - - -
test_setitem_indexerror(self) - source code - -
- -
-   - - - - - - -
test_setitem_tail(self) - source code - -
- -
-   - - - - - - -
test_tag_write(self) - source code - -
- -
-   - - - - - - -
test_tag_reset_ns(self) - source code - -
- -
-   - - - - - - -
test_tag_reset_root_ns(self) - source code - -
- -
-   - - - - - - -
test_tag_str_subclass(self) - source code - -
- -
-   - - - - - - -
test_delitem(self) - source code - -
- -
-   - - - - - - -
test_del_insert(self) - source code - -
- -
-   - - - - - - -
test_del_setitem(self) - source code - -
- -
-   - - - - - - -
test_del_setslice(self) - source code - -
- -
-   - - - - - - -
test_replace_slice_tail(self) - source code - -
- -
-   - - - - - - -
test_merge_namespaced_subtree_as_slice(self) - source code - -
- -
-   - - - - - - -
test_delitem_tail(self) - source code - -
- -
-   - - - - - - -
test_clear(self) - source code - -
- -
-   - - - - - - -
test_clear_sub(self) - source code - -
- -
-   - - - - - - -
test_clear_tail(self) - source code - -
- -
-   - - - - - - -
test_insert(self) - source code - -
- -
-   - - - - - - -
test_insert_name_interning(self) - source code - -
- -
-   - - - - - - -
test_insert_beyond_index(self) - source code - -
- -
-   - - - - - - -
test_insert_negative(self) - source code - -
- -
-   - - - - - - -
test_insert_tail(self) - source code - -
- -
-   - - - - - - -
test_remove(self) - source code - -
- -
-   - - - - - - -
test_remove_ns(self) - source code - -
- -
-   - - - - - - -
test_remove_nonexisting(self) - source code - -
- -
-   - - - - - - -
test_remove_tail(self) - source code - -
- -
-   - - - - - - -
_test_getchildren(self) - source code - -
- -
-   - - - - - - -
test_makeelement(self) - source code - -
- -
-   - - - - - - -
test_iter(self) - source code - -
- -
-   - - - - - - -
test_getiterator(self) - source code - -
- -
-   - - - - - - -
test_getiterator_empty(self) - source code - -
- -
-   - - - - - - -
test_getiterator_filter(self) - source code - -
- -
-   - - - - - - -
test_getiterator_filter_all(self) - source code - -
- -
-   - - - - - - -
test_getiterator_filter_comment(self) - source code - -
- -
-   - - - - - - -
test_getiterator_filter_pi(self) - source code - -
- -
-   - - - - - - -
test_getiterator_with_text(self) - source code - -
- -
-   - - - - - - -
test_getiterator_filter_with_text(self) - source code - -
- -
-   - - - - - - -
test_getslice(self) - source code - -
- -
-   - - - - - - -
test_getslice_negative(self) - source code - -
- -
-   - - - - - - -
test_getslice_step(self) - source code - -
- -
-   - - - - - - -
test_getslice_text(self) - source code - -
- -
-   - - - - - - -
test_comment_getitem_getslice(self) - source code - -
- -
-   - - - - - - -
test_delslice(self) - source code - -
- -
-   - - - - - - -
test_delslice_negative1(self) - source code - -
- -
-   - - - - - - -
test_delslice_negative2(self) - source code - -
- -
-   - - - - - - -
test_delslice_step(self) - source code - -
- -
-   - - - - - - -
test_delslice_step_negative(self) - source code - -
- -
-   - - - - - - -
test_delslice_step_negative2(self) - source code - -
- -
-   - - - - - - -
test_delslice_child_tail(self) - source code - -
- -
-   - - - - - - -
test_delslice_tail(self) - source code - -
- -
-   - - - - - - -
test_delslice_memory(self) - source code - -
- -
-   - - - - - - -
test_setslice(self) - source code - -
- -
-   - - - - - - -
test_setslice_all(self) - source code - -
- -
-   - - - - - - -
test_setslice_all_empty(self) - source code - -
- -
-   - - - - - - -
test_setslice_all_replace(self) - source code - -
- -
-   - - - - - - -
test_setslice_all_replace_reversed(self) - source code - -
- -
-   - - - - - - -
test_setslice_all_replace_reversed_ns1(self) - source code - -
- -
-   - - - - - - -
test_setslice_all_replace_reversed_ns2(self) - source code - -
- -
-   - - - - - - -
test_setslice_end(self) - source code - -
- -
-   - - - - - - -
test_setslice_end_exact(self) - source code - -
- -
-   - - - - - - -
test_setslice_single(self) - source code - -
- -
-   - - - - - - -
test_setslice_tail(self) - source code - -
- -
-   - - - - - - -
test_setslice_negative(self) - source code - -
- -
-   - - - - - - -
test_setslice_negative2(self) - source code - -
- -
-   - - - - - - -
test_setslice_empty(self) - source code - -
- -
-   - - - - - - -
test_tail_elementtree_root(self) - source code - -
- -
-   - - - - - - -
test_elementtree_getiterator(self) - source code - -
- -
-   - - - - - - -
test_elementtree_getiterator_filter(self) - source code - -
- -
-   - - - - - - -
test_ns_access(self) - source code - -
- -
-   - - - - - - -
test_ns_access2(self) - source code - -
- -
-   - - - - - - -
test_ns_setting(self) - source code - -
- -
-   - - - - - - -
test_ns_tag_parse(self) - source code - -
- -
-   - - - - - - -
test_ns_attr(self) - source code - -
- -
-   - - - - - - -
test_ns_move(self) - source code - -
- -
-   - - - - - - -
test_ns_decl_tostring(self) - source code - -
- -
-   - - - - - - -
test_ns_decl_tostring_default(self) - source code - -
- -
-   - - - - - - -
test_ns_decl_tostring_root(self) - source code - -
- -
-   - - - - - - -
test_ns_decl_tostring_element(self) - source code - -
- -
-   - - - - - - -
test_attribute_xmlns_move(self) - source code - -
- -
-   - - - - - - -
test_namespaces_after_serialize(self) - source code - -
- -
-   - - - - - - -
test_attribute_namespace_roundtrip(self) - source code - -
- -
-   - - - - - - -
test_attribute_namespace_roundtrip_replaced(self) - source code - -
- -
-   - - - - - - -
test_register_namespace(self) - source code - -
- -
-   - - - - - - -
test_tostring(self) - source code - -
- -
-   - - - - - - -
test_tostring_element(self) - source code - -
- -
-   - - - - - - -
test_tostring_element_tail(self) - source code - -
- -
-   - - - - - - -
test_tostring_method_html(self) - source code - -
- -
-   - - - - - - -
test_tostring_method_text(self) - source code - -
- -
-   - - - - - - -
test_iterparse(self) - source code - -
- -
-   - - - - - - -
test_iterparse_incomplete(self) - source code - -
- -
-   - - - - - - -
test_iterparse_file(self) - source code - -
- -
-   - - - - - - -
test_iterparse_start(self) - source code - -
- -
-   - - - - - - -
test_iterparse_start_end(self) - source code - -
- -
-   - - - - - - -
test_iterparse_clear(self) - source code - -
- -
-   - - - - - - -
test_iterparse_large(self) - source code - -
- -
-   - - - - - - -
test_iterparse_attrib_ns(self) - source code - -
- -
-   - - - - - - -
test_iterparse_getiterator(self) - source code - -
- -
-   - - - - - - -
test_iterparse_move_elements(self) - source code - -
- -
-   - - - - - - -
test_iterparse_cdata(self) - source code - -
- -
-   - - - - - - -
test_parse_file(self) - source code - -
- -
-   - - - - - - -
test_parse_file_nonexistent(self) - source code - -
- -
-   - - - - - - -
test_parse_error_none(self) - source code - -
- -
-   - - - - - - -
test_parse_error(self) - source code - -
- -
-   - - - - - - -
test_parse_error_from_file(self) - source code - -
- -
-   - - - - - - -
test_parse_file_object(self) - source code - -
- -
-   - - - - - - -
test_parse_stringio(self) - source code - -
- -
-   - - - - - - -
test_parse_cdata(self) - source code - -
- -
-   - - - - - - -
test_parse_with_encoding(self) - source code - -
- -
-   - - - - - - -
test_encoding(self) - source code - -
- -
-   - - - - - - -
test_encoding_exact(self) - source code - -
- -
-   - - - - - - -
test_parse_file_encoding(self) - source code - -
- -
-   - - - - - - -
test_parse_file_object_encoding(self) - source code - -
- -
-   - - - - - - -
test_encoding_8bit_latin1(self) - source code - -
- -
-   - - - - - - -
test_parse_encoding_8bit_explicit(self) - source code - -
- -
-   - - - - - - -
test_parse_encoding_8bit_override(self) - source code - -
- -
-   - - - - - - -
_test_wrong_unicode_encoding(self) - source code - -
- -
-   - - - - - - -
test_encoding_write_default_encoding(self) - source code - -
- -
-   - - - - - - -
test_encoding_tostring(self) - source code - -
- -
-   - - - - - - -
test_encoding_tostring_unknown(self) - source code - -
- -
-   - - - - - - -
test_encoding_tostring_sub(self) - source code - -
- -
-   - - - - - - -
test_encoding_tostring_sub_tail(self) - source code - -
- -
-   - - - - - - -
test_encoding_tostring_default_encoding(self) - source code - -
- -
-   - - - - - - -
test_encoding_sub_tostring_default_encoding(self) - source code - -
- -
-   - - - - - - -
test_encoding_8bit_xml(self) - source code - -
- -
-   - - - - - - -
test_encoding_utf8_bom(self) - source code - -
- -
-   - - - - - - -
test_encoding_8bit_parse_stringio(self) - source code - -
- -
-   - - - - - - -
test_deepcopy_elementtree(self) - source code - -
- -
-   - - - - - - -
test_deepcopy(self) - source code - -
- -
-   - - - - - - -
test_deepcopy_tail(self) - source code - -
- -
-   - - - - - - -
test_deepcopy_subelement(self) - source code - -
- -
-   - - - - - - -
test_deepcopy_namespaces(self) - source code - -
- -
-   - - - - - - -
test_deepcopy_append(self) - source code - -
- -
-   - - - - - - -
test_deepcopy_comment(self) - source code - -
- -
-   - - - - - - -
test_shallowcopy(self) - source code - -
- -
-   - - - - - - -
test_shallowcopy_elementtree(self) - source code - -
- -
-   - - - - - - -
_test_element_boolean(self) - source code - -
- -
-   - - - - - - -
test_multiple_elementrees(self) - source code - -
- -
-   - - - - - - -
test_qname(self) - source code - -
- -
-   - - - - - - -
test_qname_cmp(self) - source code - -
- -
-   - - - - - - -
test_qname_attribute_getset(self) - source code - -
- -
-   - - - - - - -
test_qname_attrib(self) - source code - -
- -
-   - - - - - - -
test_qname_attribute_resolve(self) - source code - -
- -
-   - - - - - - -
test_qname_attribute_resolve_new(self) - source code - -
- -
-   - - - - - - -
test_qname_attrib_resolve(self) - source code - -
- -
-   - - - - - - -
test_parser_version(self) - source code - -
- -
-   - - - - - - -
test_feed_parser_bytes(self) - source code - -
- -
-   - - - - - - -
test_feed_parser_unicode(self) - source code - -
- -
-   - - - - - - -
test_feed_parser_error_close_empty(self) - source code - -
- -
-   - - - - - - -
test_feed_parser_error_close_incomplete(self) - source code - -
- -
-   - - - - - - -
test_feed_parser_error_broken(self) - source code - -
- -
-   - - - - - - -
test_feed_parser_error_position(self) - source code - -
- -
-   - - - - - - -
test_parser_target_property(self) - source code - -
- -
-   - - - - - - -
test_parser_target_tag(self) - source code - -
- -
-   - - - - - - -
test_parser_target_error_in_start(self) - source code - -
- -
-   - - - - - - -
test_parser_target_error_in_end(self) - source code - -
- -
-   - - - - - - -
test_parser_target_error_in_close(self) - source code - -
- -
-   - - - - - - -
test_parser_target_error_in_start_and_close(self) - source code - -
- -
-   - - - - - - -
test_elementtree_parser_target(self) - source code - -
- -
-   - - - - - - -
test_parser_target_attrib(self) - source code - -
- -
-   - - - - - - -
test_parser_target_data(self) - source code - -
- -
-   - - - - - - -
test_parser_target_entity(self) - source code - -
- -
-   - - - - - - -
test_parser_target_entity_unknown(self) - source code - -
- -
-   - - - - - - -
test_treebuilder(self) - source code - -
- -
-   - - - - - - -
test_treebuilder_target(self) - source code - -
- -
-   - - - - - - -
_writeElement(self, - element, - encoding='us-ascii')
- Write out element for comparison.
- source code - -
- -
-   - - - - - - -
_writeElementFile(self, - element, - encoding='us-ascii')
- Write out element for comparison, using real file.
- source code - -
- -
-   - - - - - - -
assertXML(self, - expected, - element, - encoding='us-ascii')
- Writes element out and checks whether it is expected.
- source code - -
- -
-   - - - - - - -
assertEncodingDeclaration(self, - result, - encoding)
- Checks if the result XML byte string specifies the encoding.
- source code - -
- -
-   - - - - - - -
_rootstring(self, - tree) - source code - -
- -
-   - - - - - - -
_check_element_tree(self, - tree) - source code - -
- -
-   - - - - - - -
_check_element(self, - element) - source code - -
- -
-   - - - - - - -
_check_string(self, - string) - source code - -
- -
-   - - - - - - -
_check_mapping(self, - mapping) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - etree = None
- hash(x) -
-   - - required_versions_ET = {'test_comment_text': (1, 3), 'test_com... -
-   - - required_versions_cET = {} -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

assertXML(self, - expected, - element, - encoding='us-ascii') -

-
source code  -
- -

Writes element out and checks whether it is expected.

-

Does this two ways; once using BytesIO, once using a real file.

-
-
-
-
- -
- -
- - -
-

_rootstring(self, - tree) -

-
source code  -
- - -
-
Overrides: - common_imports.HelperTestCase._rootstring -
-
-
-
-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

required_versions_ET

- -
-
-
-
Value:
-
-{'test_comment_text': (1, 3),
- 'test_comment_whitespace': (1, 3),
- 'test_extend': (1, 3),
- 'test_feed_parser_error_broken': (1, 3),
- 'test_feed_parser_error_close_empty': (1, 3),
- 'test_feed_parser_error_close_incomplete': (1, 3),
- 'test_feed_parser_error_position': (1, 3),
- 'test_fromstringlist': (1, 3),
-...
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_elementtree._XMLPullParserTest-class.html b/doc/html/api/lxml.tests.test_elementtree._XMLPullParserTest-class.html deleted file mode 100644 index 99069d1..0000000 --- a/doc/html/api/lxml.tests.test_elementtree._XMLPullParserTest-class.html +++ /dev/null @@ -1,517 +0,0 @@ - - - - - lxml.tests.test_elementtree._XMLPullParserTest - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_elementtree :: - Class _XMLPullParserTest - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _XMLPullParserTest

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        _XMLPullParserTest
-
- -
Known Subclasses:
-
- -
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
_feed(self, - parser, - data, - chunk_size=None) - source code - -
- -
-   - - - - - - -
_close_and_return_root(self, - parser) - source code - -
- -
-   - - - - - - -
assert_event_tags(self, - parser, - expected) - source code - -
- -
-   - - - - - - -
test_simple_xml(self) - source code - -
- -
-   - - - - - - -
test_feed_while_iterating(self) - source code - -
- -
-   - - - - - - -
test_simple_xml_with_ns(self) - source code - -
- -
-   - - - - - - -
test_ns_events(self) - source code - -
- -
-   - - - - - - -
test_events(self) - source code - -
- -
-   - - - - - - -
test_events_sequence(self) - source code - -
- -
-   - - - - - - -
test_unknown_event(self) - source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest, - tearDown -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - etree = None
- hash(x) -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_errors-module.html b/doc/html/api/lxml.tests.test_errors-module.html deleted file mode 100644 index a4d81e2..0000000 --- a/doc/html/api/lxml.tests.test_errors-module.html +++ /dev/null @@ -1,244 +0,0 @@ - - - - - lxml.tests.test_errors - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_errors - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module test_errors

source code

- - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - ErrorTestCase -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
test_suite() - source code - -
- -
- - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - this_dir = '/home/stefan/source/Python/lxml/lxml-release/src/l... -
-   - - __package__ = 'lxml.tests' -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

this_dir

- -
-
-
-
Value:
-
-'/home/stefan/source/Python/lxml/lxml-release/src/lxml/tests'
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_errors-pysrc.html b/doc/html/api/lxml.tests.test_errors-pysrc.html deleted file mode 100644 index 00238ac..0000000 --- a/doc/html/api/lxml.tests.test_errors-pysrc.html +++ /dev/null @@ -1,355 +0,0 @@ - - - - - lxml.tests.test_errors - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_errors - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.test_errors

-
- 1  # -*- coding: utf-8 -*- 
- 2  import unittest, doctest 
- 3   
- 4  # These tests check that error handling in the Pyrex code is 
- 5  # complete. 
- 6  # It is likely that if there are errors, instead of failing the code 
- 7  # will simply crash. 
- 8   
- 9  import sys, gc, os.path 
-10  from lxml import etree 
-11   
-12  this_dir = os.path.dirname(__file__) 
-13  if this_dir not in sys.path: 
-14      sys.path.insert(0, this_dir) # needed for Py3 
-15   
-16  from common_imports import HelperTestCase 
-17   
-18   
-
19 -class ErrorTestCase(HelperTestCase): -
20 etree = etree -21 -
22 - def test_bad_element(self): -
23 # attrib argument of Element() should be a dictionary, so if -24 # we pass a string we should get an error. -25 self.assertRaises(TypeError, self.etree.Element, 'a', 'b') -
26 -
27 - def test_empty_parse(self): -
28 self.assertRaises(etree.XMLSyntaxError, etree.fromstring, '') -
29 -
31 # test if cyclic reference can crash etree -32 Element = self.etree.Element -33 -34 # must disable tracing as it could change the refcounts -35 trace_func = sys.gettrace() -36 try: -37 sys.settrace(None) -38 gc.collect() -39 -40 count = sys.getrefcount(None) -41 -42 l = [Element('name'), Element('name')] -43 l.append(l) -44 -45 del l -46 gc.collect() -47 -48 self.assertEqual(sys.getrefcount(None), count) -49 finally: -50 sys.settrace(trace_func) -
51 -
53 broken_xml_name = 'test_broken.xml' -54 broken_xml_path = os.path.join(this_dir, broken_xml_name) -55 fail_msg = 'test_broken.xml should raise an etree.XMLSyntaxError' -56 try: -57 etree.parse(broken_xml_path) -58 except etree.XMLSyntaxError as e: -59 # invariant -60 self.assertEqual(e.position, (e.lineno, e.offset + 1), 'position and lineno/offset out of sync') -61 # SyntaxError info derived from file & contents -62 self.assertTrue(e.filename.endswith(broken_xml_name), 'filename must be preserved') -63 self.assertEqual(e.lineno, 1) -64 self.assertEqual(e.offset, 10) -65 except Exception as e: -66 self.fail('{0}, not {1}'.format(fail_msg, type(e))) -67 else: -68 self.fail('test_broken.xml should raise an etree.XMLSyntaxError') -
69 -70 -
71 -def test_suite(): -
72 suite = unittest.TestSuite() -73 suite.addTests([unittest.makeSuite(ErrorTestCase)]) -74 return suite -
75 -76 if __name__ == '__main__': -77 print('to test use test.py %s' % __file__) -78 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_errors.ErrorTestCase-class.html b/doc/html/api/lxml.tests.test_errors.ErrorTestCase-class.html deleted file mode 100644 index c9f1963..0000000 --- a/doc/html/api/lxml.tests.test_errors.ErrorTestCase-class.html +++ /dev/null @@ -1,451 +0,0 @@ - - - - - lxml.tests.test_errors.ErrorTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_errors :: - Class ErrorTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ErrorTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ErrorTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_bad_element(self) - source code - -
- -
-   - - - - - - -
test_empty_parse(self) - source code - -
- -
-   - - - - - - -
test_element_cyclic_gc_none(self) - source code - -
- -
-   - - - - - - -
test_xmlsyntaxerror_has_info(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - etree
- The lxml.etree module implements the extended ElementTree API for XML. -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

etree

- The lxml.etree module implements the extended ElementTree API for XML. -
-
-
-
Value:
-
lxml.etree
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_etree-module.html b/doc/html/api/lxml.tests.test_etree-module.html deleted file mode 100644 index fce0f2b..0000000 --- a/doc/html/api/lxml.tests.test_etree-module.html +++ /dev/null @@ -1,314 +0,0 @@ - - - - - lxml.tests.test_etree - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_etree - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module test_etree

source code

-

Tests specific to the extended etree API

-

Tests that apply to the general ElementTree API should go into -test_elementtree

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - ETreeOnlyTestCase
- Tests only for etree, not ElementTree -
-   - - _XIncludeTestCase -
-   - - ETreeXIncludeTestCase -
-   - - ElementIncludeTestCase -
-   - - ETreeC14NTestCase -
-   - - ETreeWriteTestCase -
-   - - ETreeErrorLogTest -
-   - - XMLPullParserTest -
- - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
tmpfile(*args, - **kwds) - source code - -
- -
-   - - - - - - -
test_suite() - source code - -
- -
- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = 'lxml.tests' -
- - - - - - -
- - - - - -
Function Details[hide private]
-
- -
- -
- - -
-

tmpfile(*args, - **kwds) -

-
source code  -
- - -
-
Decorators:
-
    -
  • @contextmanager
  • -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_etree-pysrc.html b/doc/html/api/lxml.tests.test_etree-pysrc.html deleted file mode 100644 index 74dab29..0000000 --- a/doc/html/api/lxml.tests.test_etree-pysrc.html +++ /dev/null @@ -1,12582 +0,0 @@ - - - - - lxml.tests.test_etree - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_etree - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.test_etree

-
-   1  # -*- coding: utf-8 -*- 
-   2   
-   3  """ 
-   4  Tests specific to the extended etree API 
-   5   
-   6  Tests that apply to the general ElementTree API should go into 
-   7  test_elementtree 
-   8  """ 
-   9   
-  10  from __future__ import absolute_import 
-  11   
-  12  import os.path 
-  13  import unittest 
-  14  import copy 
-  15  import sys 
-  16  import re 
-  17  import gc 
-  18  import operator 
-  19  import tempfile 
-  20  import textwrap 
-  21  import zlib 
-  22  import gzip 
-  23  from contextlib import closing, contextmanager 
-  24   
-  25  from .common_imports import etree, StringIO, BytesIO, HelperTestCase 
-  26  from .common_imports import fileInTestDir, fileUrlInTestDir, read_file, path2url 
-  27  from .common_imports import SillyFileLike, LargeFileLikeUnicode, doctest, make_doctest 
-  28  from .common_imports import canonicalize, _str, _bytes 
-  29   
-  30  print("") 
-  31  print("TESTED VERSION: %s" % etree.__version__) 
-  32  print("    Python:           " + repr(sys.version_info)) 
-  33  print("    lxml.etree:       " + repr(etree.LXML_VERSION)) 
-  34  print("    libxml used:      " + repr(etree.LIBXML_VERSION)) 
-  35  print("    libxml compiled:  " + repr(etree.LIBXML_COMPILED_VERSION)) 
-  36  print("    libxslt used:     " + repr(etree.LIBXSLT_VERSION)) 
-  37  print("    libxslt compiled: " + repr(etree.LIBXSLT_COMPILED_VERSION)) 
-  38  print("") 
-  39   
-  40  try: 
-  41      _unicode = unicode 
-  42  except NameError: 
-  43      # Python 3 
-  44      _unicode = str 
-
45 - 46 - 47 @contextmanager - 48 -def tmpfile(): -
49 handle, filename = tempfile.mkstemp() - 50 try: - 51 yield filename - 52 finally: - 53 os.close(handle) - 54 os.remove(filename) -
55 -
56 - 57 -class ETreeOnlyTestCase(HelperTestCase): -
58 """Tests only for etree, not ElementTree""" - 59 etree = etree - 60 -
61 - def test_version(self): -
62 self.assertTrue(isinstance(etree.__version__, _unicode)) - 63 self.assertTrue(isinstance(etree.LXML_VERSION, tuple)) - 64 self.assertEqual(len(etree.LXML_VERSION), 4) - 65 self.assertTrue(isinstance(etree.LXML_VERSION[0], int)) - 66 self.assertTrue(isinstance(etree.LXML_VERSION[1], int)) - 67 self.assertTrue(isinstance(etree.LXML_VERSION[2], int)) - 68 self.assertTrue(isinstance(etree.LXML_VERSION[3], int)) - 69 self.assertTrue(etree.__version__.startswith( - 70 str(etree.LXML_VERSION[0]))) -
71 -
72 - def test_c_api(self): -
73 if hasattr(self.etree, '__pyx_capi__'): - 74 # newer Pyrex compatible C-API - 75 self.assertTrue(isinstance(self.etree.__pyx_capi__, dict)) - 76 self.assertTrue(len(self.etree.__pyx_capi__) > 0) - 77 else: - 78 # older C-API mechanism - 79 self.assertTrue(hasattr(self.etree, '_import_c_api')) -
80 -
81 - def test_include_paths(self): -
82 import lxml - 83 includes = lxml.get_include() - 84 self.assertTrue(includes) - 85 self.assertTrue(len(includes) >= 2) - 86 self.assertTrue(os.path.join(os.path.dirname(lxml.__file__), 'includes') in includes, - 87 includes) -
88 -
89 - def test_element_names(self): -
90 Element = self.etree.Element - 91 el = Element('name') - 92 self.assertEqual(el.tag, 'name') - 93 el = Element('{}name') - 94 self.assertEqual(el.tag, 'name') -
95 -
96 - def test_element_name_empty(self): -
97 Element = self.etree.Element - 98 el = Element('name') - 99 self.assertRaises(ValueError, Element, '{}') - 100 self.assertRaises(ValueError, setattr, el, 'tag', '{}') - 101 - 102 self.assertRaises(ValueError, Element, '{test}') - 103 self.assertRaises(ValueError, setattr, el, 'tag', '{test}') -
104 -
105 - def test_element_name_colon(self): -
106 Element = self.etree.Element - 107 self.assertRaises(ValueError, Element, 'p:name') - 108 self.assertRaises(ValueError, Element, '{test}p:name') - 109 - 110 el = Element('name') - 111 self.assertRaises(ValueError, setattr, el, 'tag', 'p:name') -
112 -
113 - def test_element_name_quote(self): -
114 Element = self.etree.Element - 115 self.assertRaises(ValueError, Element, "p'name") - 116 self.assertRaises(ValueError, Element, 'p"name') - 117 - 118 self.assertRaises(ValueError, Element, "{test}p'name") - 119 self.assertRaises(ValueError, Element, '{test}p"name') - 120 - 121 el = Element('name') - 122 self.assertRaises(ValueError, setattr, el, 'tag', "p'name") - 123 self.assertRaises(ValueError, setattr, el, 'tag', 'p"name') -
124 -
125 - def test_element_name_space(self): -
126 Element = self.etree.Element - 127 self.assertRaises(ValueError, Element, ' name ') - 128 self.assertRaises(ValueError, Element, 'na me') - 129 self.assertRaises(ValueError, Element, '{test} name') - 130 - 131 el = Element('name') - 132 self.assertRaises(ValueError, setattr, el, 'tag', ' name ') -
133 -
134 - def test_subelement_name_empty(self): -
135 Element = self.etree.Element - 136 SubElement = self.etree.SubElement - 137 - 138 el = Element('name') - 139 self.assertRaises(ValueError, SubElement, el, '{}') - 140 self.assertRaises(ValueError, SubElement, el, '{test}') -
141 -
142 - def test_subelement_name_colon(self): -
143 Element = self.etree.Element - 144 SubElement = self.etree.SubElement - 145 - 146 el = Element('name') - 147 self.assertRaises(ValueError, SubElement, el, 'p:name') - 148 self.assertRaises(ValueError, SubElement, el, '{test}p:name') -
149 -
150 - def test_subelement_name_quote(self): -
151 Element = self.etree.Element - 152 SubElement = self.etree.SubElement - 153 - 154 el = Element('name') - 155 self.assertRaises(ValueError, SubElement, el, "p'name") - 156 self.assertRaises(ValueError, SubElement, el, "{test}p'name") - 157 - 158 self.assertRaises(ValueError, SubElement, el, 'p"name') - 159 self.assertRaises(ValueError, SubElement, el, '{test}p"name') -
160 -
161 - def test_subelement_name_space(self): -
162 Element = self.etree.Element - 163 SubElement = self.etree.SubElement - 164 - 165 el = Element('name') - 166 self.assertRaises(ValueError, SubElement, el, ' name ') - 167 self.assertRaises(ValueError, SubElement, el, 'na me') - 168 self.assertRaises(ValueError, SubElement, el, '{test} name') -
169 -
171 Element = self.etree.Element - 172 SubElement = self.etree.SubElement - 173 - 174 el = Element('name') - 175 self.assertRaises(ValueError, SubElement, el, 'name', {'a b c' : 'abc'}) - 176 self.assertRaises(ValueError, SubElement, el, 'name', {'a' : 'a\0\n'}) - 177 self.assertEqual(0, len(el)) -
178 -
179 - def test_qname_empty(self): -
180 QName = self.etree.QName - 181 self.assertRaises(ValueError, QName, '') - 182 self.assertRaises(ValueError, QName, None) - 183 self.assertRaises(ValueError, QName, None, None) - 184 self.assertRaises(ValueError, QName, 'test', '') -
185 -
186 - def test_qname_none(self): -
187 QName = self.etree.QName - 188 q = QName(None, 'TAG') - 189 self.assertEqual('TAG', q) - 190 self.assertEqual('TAG', q.localname) - 191 self.assertEqual(None, q.namespace) -
192 -
193 - def test_qname_colon(self): -
194 QName = self.etree.QName - 195 self.assertRaises(ValueError, QName, 'p:name') - 196 self.assertRaises(ValueError, QName, 'test', 'p:name') -
197 -
198 - def test_qname_space(self): -
199 QName = self.etree.QName - 200 self.assertRaises(ValueError, QName, ' name ') - 201 self.assertRaises(ValueError, QName, 'na me') - 202 self.assertRaises(ValueError, QName, 'test', ' name') -
203 -
205 # ET doesn't have namespace/localname properties on QNames - 206 QName = self.etree.QName - 207 namespace, localname = 'http://myns', 'a' - 208 qname = QName(namespace, localname) - 209 self.assertEqual(namespace, qname.namespace) - 210 self.assertEqual(localname, qname.localname) -
211 -
212 - def test_qname_element(self): -
213 # ET doesn't have namespace/localname properties on QNames - 214 QName = self.etree.QName - 215 qname1 = QName('http://myns', 'a') - 216 a = self.etree.Element(qname1, nsmap={'p' : 'http://myns'}) - 217 - 218 qname2 = QName(a) - 219 self.assertEqual(a.tag, qname1.text) - 220 self.assertEqual(a.tag, qname1) - 221 self.assertEqual(qname1.text, qname2.text) - 222 self.assertEqual(qname1, qname2.text) - 223 self.assertEqual(qname1.text, qname2) - 224 self.assertEqual(qname1, qname2) -
225 -
226 - def test_qname_text_resolve(self): -
227 # ET doesn't resove QNames as text values - 228 etree = self.etree - 229 qname = etree.QName('http://myns', 'a') - 230 a = etree.Element(qname, nsmap={'p' : 'http://myns'}) - 231 a.text = qname - 232 - 233 self.assertEqual("p:a", a.text) -
234 -
235 - def test_nsmap_prefix_invalid(self): -
236 etree = self.etree - 237 self.assertRaises(ValueError, - 238 etree.Element, "root", nsmap={'"' : 'testns'}) - 239 self.assertRaises(ValueError, - 240 etree.Element, "root", nsmap={'&' : 'testns'}) - 241 self.assertRaises(ValueError, - 242 etree.Element, "root", nsmap={'a:b' : 'testns'}) -
243 -
244 - def test_attribute_has_key(self): -
245 # ET in Py 3.x has no "attrib.has_key()" method - 246 XML = self.etree.XML - 247 - 248 root = XML(_bytes('<foo bar="Bar" xmlns:ns="http://ns.codespeak.net/test" ns:baz="Baz" />')) - 249 self.assertEqual( - 250 True, root.attrib.has_key('bar')) - 251 self.assertEqual( - 252 False, root.attrib.has_key('baz')) - 253 self.assertEqual( - 254 False, root.attrib.has_key('hah')) - 255 self.assertEqual( - 256 True, - 257 root.attrib.has_key('{http://ns.codespeak.net/test}baz')) -
258 -
259 - def test_attribute_set(self): -
260 Element = self.etree.Element - 261 root = Element("root") - 262 root.set("attr", "TEST") - 263 self.assertEqual("TEST", root.get("attr")) -
264 -
266 # ElementTree accepts arbitrary attribute values - 267 # lxml.etree allows only strings - 268 Element = self.etree.Element - 269 - 270 root = Element("root") - 271 root.set("attr", "TEST") - 272 self.assertEqual("TEST", root.get("attr")) - 273 self.assertRaises(TypeError, root.set, "newattr", 5) -
274 -
275 - def test_attrib_and_keywords(self): -
276 Element = self.etree.Element - 277 - 278 root = Element("root") - 279 root.set("attr", "TEST") - 280 self.assertEqual("TEST", root.attrib["attr"]) - 281 - 282 root2 = Element("root2", root.attrib, attr2='TOAST') - 283 self.assertEqual("TEST", root2.attrib["attr"]) - 284 self.assertEqual("TOAST", root2.attrib["attr2"]) - 285 self.assertEqual(None, root.attrib.get("attr2")) -
286 -
287 - def test_attrib_order(self): -
288 Element = self.etree.Element - 289 - 290 keys = ["attr%d" % i for i in range(10)] - 291 values = ["TEST-%d" % i for i in range(10)] - 292 items = list(zip(keys, values)) - 293 - 294 root = Element("root") - 295 for key, value in items: - 296 root.set(key, value) - 297 self.assertEqual(keys, root.attrib.keys()) - 298 self.assertEqual(values, root.attrib.values()) - 299 - 300 root2 = Element("root2", root.attrib, - 301 attr_99='TOAST-1', attr_98='TOAST-2') - 302 self.assertEqual(['attr_98', 'attr_99'] + keys, - 303 root2.attrib.keys()) - 304 self.assertEqual(['TOAST-2', 'TOAST-1'] + values, - 305 root2.attrib.values()) - 306 - 307 self.assertEqual(keys, root.attrib.keys()) - 308 self.assertEqual(values, root.attrib.values()) -
309 -
310 - def test_attribute_set_invalid(self): -
311 # ElementTree accepts arbitrary attribute values - 312 # lxml.etree allows only strings, or None for (html5) boolean attributes - 313 Element = self.etree.Element - 314 root = Element("root") - 315 self.assertRaises(TypeError, root.set, "newattr", 5) - 316 self.assertRaises(TypeError, root.set, "newattr", object) - 317 self.assertRaises(TypeError, root.set, "newattr", None) - 318 self.assertRaises(TypeError, root.set, "newattr") -
319 -
320 - def test_strip_attributes(self): -
321 XML = self.etree.XML - 322 xml = _bytes('<test a="5" b="10" c="20"><x a="4" b="2"/></test>') - 323 - 324 root = XML(xml) - 325 self.etree.strip_attributes(root, 'a') - 326 self.assertEqual(_bytes('<test b="10" c="20"><x b="2"></x></test>'), - 327 self._writeElement(root)) - 328 - 329 root = XML(xml) - 330 self.etree.strip_attributes(root, 'b', 'c') - 331 self.assertEqual(_bytes('<test a="5"><x a="4"></x></test>'), - 332 self._writeElement(root)) -
333 -
334 - def test_strip_attributes_ns(self): -
335 XML = self.etree.XML - 336 xml = _bytes('<test xmlns:n="http://test/ns" a="6" b="10" c="20" n:a="5"><x a="4" n:b="2"/></test>') - 337 - 338 root = XML(xml) - 339 self.etree.strip_attributes(root, 'a') - 340 self.assertEqual( - 341 _bytes('<test xmlns:n="http://test/ns" b="10" c="20" n:a="5"><x n:b="2"></x></test>'), - 342 self._writeElement(root)) - 343 - 344 root = XML(xml) - 345 self.etree.strip_attributes(root, '{http://test/ns}a', 'c') - 346 self.assertEqual( - 347 _bytes('<test xmlns:n="http://test/ns" a="6" b="10"><x a="4" n:b="2"></x></test>'), - 348 self._writeElement(root)) - 349 - 350 root = XML(xml) - 351 self.etree.strip_attributes(root, '{http://test/ns}*') - 352 self.assertEqual( - 353 _bytes('<test xmlns:n="http://test/ns" a="6" b="10" c="20"><x a="4"></x></test>'), - 354 self._writeElement(root)) -
355 -
356 - def test_strip_elements(self): -
357 XML = self.etree.XML - 358 xml = _bytes('<test><a><b><c/></b></a><x><a><b/><c/></a></x></test>') - 359 - 360 root = XML(xml) - 361 self.etree.strip_elements(root, 'a') - 362 self.assertEqual(_bytes('<test><x></x></test>'), - 363 self._writeElement(root)) - 364 - 365 root = XML(xml) - 366 self.etree.strip_elements(root, 'b', 'c', 'X', 'Y', 'Z') - 367 self.assertEqual(_bytes('<test><a></a><x><a></a></x></test>'), - 368 self._writeElement(root)) - 369 - 370 root = XML(xml) - 371 self.etree.strip_elements(root, 'c') - 372 self.assertEqual(_bytes('<test><a><b></b></a><x><a><b></b></a></x></test>'), - 373 self._writeElement(root)) -
374 -
375 - def test_strip_elements_ns(self): -
376 XML = self.etree.XML - 377 xml = _bytes('<test>TEST<n:a xmlns:n="urn:a">A<b>B<c xmlns="urn:c"/>C</b>BT</n:a>AT<x>X<a>A<b xmlns="urn:a"/>BT<c xmlns="urn:x"/>CT</a>AT</x>XT</test>') - 378 - 379 root = XML(xml) - 380 self.etree.strip_elements(root, 'a') - 381 self.assertEqual(_bytes('<test>TEST<n:a xmlns:n="urn:a">A<b>B<c xmlns="urn:c"></c>C</b>BT</n:a>AT<x>X</x>XT</test>'), - 382 self._writeElement(root)) - 383 - 384 root = XML(xml) - 385 self.etree.strip_elements(root, '{urn:a}b', 'c') - 386 self.assertEqual(_bytes('<test>TEST<n:a xmlns:n="urn:a">A<b>B<c xmlns="urn:c"></c>C</b>BT</n:a>AT<x>X<a>A<c xmlns="urn:x"></c>CT</a>AT</x>XT</test>'), - 387 self._writeElement(root)) - 388 - 389 root = XML(xml) - 390 self.etree.strip_elements(root, '{urn:a}*', 'c') - 391 self.assertEqual(_bytes('<test>TEST<x>X<a>A<c xmlns="urn:x"></c>CT</a>AT</x>XT</test>'), - 392 self._writeElement(root)) - 393 - 394 root = XML(xml) - 395 self.etree.strip_elements(root, '{urn:a}*', 'c', with_tail=False) - 396 self.assertEqual(_bytes('<test>TESTAT<x>X<a>ABT<c xmlns="urn:x"></c>CT</a>AT</x>XT</test>'), - 397 self._writeElement(root)) -
398 -
399 - def test_strip_tags(self): -
400 XML = self.etree.XML - 401 xml = _bytes('<test>TEST<a>A<b>B<c/>CT</b>BT</a>AT<x>X<a>A<b/>BT<c/>CT</a>AT</x>XT</test>') - 402 - 403 root = XML(xml) - 404 self.etree.strip_tags(root, 'a') - 405 self.assertEqual(_bytes('<test>TESTA<b>B<c></c>CT</b>BTAT<x>XA<b></b>BT<c></c>CTAT</x>XT</test>'), - 406 self._writeElement(root)) - 407 - 408 root = XML(xml) - 409 self.etree.strip_tags(root, 'b', 'c', 'X', 'Y', 'Z') - 410 self.assertEqual(_bytes('<test>TEST<a>ABCTBT</a>AT<x>X<a>ABTCT</a>AT</x>XT</test>'), - 411 self._writeElement(root)) - 412 - 413 root = XML(xml) - 414 self.etree.strip_tags(root, 'c') - 415 self.assertEqual(_bytes('<test>TEST<a>A<b>BCT</b>BT</a>AT<x>X<a>A<b></b>BTCT</a>AT</x>XT</test>'), - 416 self._writeElement(root)) -
417 -
418 - def test_strip_tags_pi_comment(self): -
419 XML = self.etree.XML - 420 PI = self.etree.ProcessingInstruction - 421 Comment = self.etree.Comment - 422 xml = _bytes('<!--comment1-->\n<?PI1?>\n<test>TEST<!--comment2-->XT<?PI2?></test>\n<!--comment3-->\n<?PI1?>') - 423 - 424 root = XML(xml) - 425 self.etree.strip_tags(root, PI) - 426 self.assertEqual(_bytes('<!--comment1-->\n<?PI1?>\n<test>TEST<!--comment2-->XT</test>\n<!--comment3-->\n<?PI1?>'), - 427 self._writeElement(root)) - 428 - 429 root = XML(xml) - 430 self.etree.strip_tags(root, Comment) - 431 self.assertEqual(_bytes('<!--comment1-->\n<?PI1?>\n<test>TESTXT<?PI2?></test>\n<!--comment3-->\n<?PI1?>'), - 432 self._writeElement(root)) - 433 - 434 root = XML(xml) - 435 self.etree.strip_tags(root, PI, Comment) - 436 self.assertEqual(_bytes('<!--comment1-->\n<?PI1?>\n<test>TESTXT</test>\n<!--comment3-->\n<?PI1?>'), - 437 self._writeElement(root)) - 438 - 439 root = XML(xml) - 440 self.etree.strip_tags(root, Comment, PI) - 441 self.assertEqual(_bytes('<!--comment1-->\n<?PI1?>\n<test>TESTXT</test>\n<!--comment3-->\n<?PI1?>'), - 442 self._writeElement(root)) -
443 -
445 XML = self.etree.XML - 446 ElementTree = self.etree.ElementTree - 447 PI = self.etree.ProcessingInstruction - 448 Comment = self.etree.Comment - 449 xml = _bytes('<!--comment1-->\n<?PI1?>\n<test>TEST<!--comment2-->XT<?PI2?></test>\n<!--comment3-->\n<?PI1?>') - 450 - 451 root = XML(xml) - 452 self.etree.strip_tags(ElementTree(root), PI) - 453 self.assertEqual(_bytes('<!--comment1-->\n<test>TEST<!--comment2-->XT</test>\n<!--comment3-->'), - 454 self._writeElement(root)) - 455 - 456 root = XML(xml) - 457 self.etree.strip_tags(ElementTree(root), Comment) - 458 self.assertEqual(_bytes('<?PI1?>\n<test>TESTXT<?PI2?></test>\n<?PI1?>'), - 459 self._writeElement(root)) - 460 - 461 root = XML(xml) - 462 self.etree.strip_tags(ElementTree(root), PI, Comment) - 463 self.assertEqual(_bytes('<test>TESTXT</test>'), - 464 self._writeElement(root)) - 465 - 466 root = XML(xml) - 467 self.etree.strip_tags(ElementTree(root), Comment, PI) - 468 self.assertEqual(_bytes('<test>TESTXT</test>'), - 469 self._writeElement(root)) -
470 -
471 - def test_strip_tags_doc_style(self): -
472 XML = self.etree.XML - 473 xml = _bytes(''' - 474 <div> - 475 <div> - 476 I like <strong>sheep</strong>. - 477 <br/> - 478 I like lots of <strong>sheep</strong>. - 479 <br/> - 480 Click <a href="http://www.sheep.com">here</a> - 481 for <a href="http://www.sheep.com">those</a> sheep. - 482 <br/> - 483 </div> - 484 </div> - 485 '''.strip()) - 486 - 487 root = XML(xml) - 488 self.etree.strip_tags(root, 'a') - 489 self.assertEqual(re.sub(_bytes('</?a[^>]*>'), _bytes(''), xml).replace(_bytes('<br/>'), _bytes('<br></br>')), - 490 self._writeElement(root)) - 491 - 492 root = XML(xml) - 493 self.etree.strip_tags(root, 'a', 'br') - 494 self.assertEqual(re.sub(_bytes('</?a[^>]*>'), _bytes(''), - 495 re.sub(_bytes('<br[^>]*>'), _bytes(''), xml)), - 496 self._writeElement(root)) -
497 -
498 - def test_strip_tags_ns(self): -
499 XML = self.etree.XML - 500 xml = _bytes('<test>TEST<n:a xmlns:n="urn:a">A<b>B<c xmlns="urn:c"/>CT</b>BT</n:a>AT<x>X<a>A<b xmlns="urn:a"/>BT<c xmlns="urn:x"/>CT</a>AT</x>XT</test>') - 501 - 502 root = XML(xml) - 503 self.etree.strip_tags(root, 'a') - 504 self.assertEqual(_bytes('<test>TEST<n:a xmlns:n="urn:a">A<b>B<c xmlns="urn:c"></c>CT</b>BT</n:a>AT<x>XA<b xmlns="urn:a"></b>BT<c xmlns="urn:x"></c>CTAT</x>XT</test>'), - 505 self._writeElement(root)) - 506 - 507 root = XML(xml) - 508 self.etree.strip_tags(root, '{urn:a}b', 'c') - 509 self.assertEqual(_bytes('<test>TEST<n:a xmlns:n="urn:a">A<b>B<c xmlns="urn:c"></c>CT</b>BT</n:a>AT<x>X<a>ABT<c xmlns="urn:x"></c>CT</a>AT</x>XT</test>'), - 510 self._writeElement(root)) - 511 - 512 root = XML(xml) - 513 self.etree.strip_tags(root, '{urn:a}*', 'c') - 514 self.assertEqual(_bytes('<test>TESTA<b>B<c xmlns="urn:c"></c>CT</b>BTAT<x>X<a>ABT<c xmlns="urn:x"></c>CT</a>AT</x>XT</test>'), - 515 self._writeElement(root)) -
516 -
517 - def test_strip_tags_and_remove(self): -
518 # previously crashed - 519 HTML = self.etree.HTML - 520 root = HTML(_bytes('<div><h1>title</h1> <b>foo</b> <p>boo</p></div>'))[0][0] - 521 self.assertEqual(_bytes('<div><h1>title</h1> <b>foo</b> <p>boo</p></div>'), - 522 self.etree.tostring(root)) - 523 self.etree.strip_tags(root, 'b') - 524 self.assertEqual(_bytes('<div><h1>title</h1> foo <p>boo</p></div>'), - 525 self.etree.tostring(root)) - 526 root.remove(root[0]) - 527 self.assertEqual(_bytes('<div><p>boo</p></div>'), - 528 self.etree.tostring(root)) -
529 -
530 - def test_pi(self): -
531 # lxml.etree separates target and text - 532 Element = self.etree.Element - 533 SubElement = self.etree.SubElement - 534 ProcessingInstruction = self.etree.ProcessingInstruction - 535 - 536 a = Element('a') - 537 a.append(ProcessingInstruction('foo', 'some more text')) - 538 self.assertEqual(a[0].target, 'foo') - 539 self.assertEqual(a[0].text, 'some more text') -
540 -
541 - def test_pi_parse(self): -
542 XML = self.etree.XML - 543 root = XML(_bytes("<test><?mypi my test ?></test>")) - 544 self.assertEqual(root[0].target, "mypi") - 545 self.assertEqual(root[0].text, "my test ") -
546 -
548 XML = self.etree.XML - 549 root = XML(_bytes("<test><?mypi my='1' test=\" abc \" quotes=\"' '\" only names ?></test>")) - 550 self.assertEqual(root[0].target, "mypi") - 551 self.assertEqual(root[0].get('my'), "1") - 552 self.assertEqual(root[0].get('test'), " abc ") - 553 self.assertEqual(root[0].get('quotes'), "' '") - 554 self.assertEqual(root[0].get('only'), None) - 555 self.assertEqual(root[0].get('names'), None) - 556 self.assertEqual(root[0].get('nope'), None) -
557 -
559 XML = self.etree.XML - 560 root = XML(_bytes("<test><?mypi my='1' test=\" abc \" quotes=\"' '\" only names ?></test>")) - 561 self.assertEqual(root[0].target, "mypi") - 562 self.assertEqual(root[0].attrib['my'], "1") - 563 self.assertEqual(root[0].attrib['test'], " abc ") - 564 self.assertEqual(root[0].attrib['quotes'], "' '") - 565 self.assertRaises(KeyError, root[0].attrib.__getitem__, 'only') - 566 self.assertRaises(KeyError, root[0].attrib.__getitem__, 'names') - 567 self.assertRaises(KeyError, root[0].attrib.__getitem__, 'nope') -
568 -
569 - def test_deepcopy_pi(self): -
570 # previously caused a crash - 571 ProcessingInstruction = self.etree.ProcessingInstruction - 572 - 573 a = ProcessingInstruction("PI", "ONE") - 574 b = copy.deepcopy(a) - 575 b.text = "ANOTHER" - 576 - 577 self.assertEqual('ONE', a.text) - 578 self.assertEqual('ANOTHER', b.text) -
579 -
581 XML = self.etree.XML - 582 tostring = self.etree.tostring - 583 root = XML(_bytes("<?mypi my test ?><test/><!--comment -->")) - 584 tree1 = self.etree.ElementTree(root) - 585 self.assertEqual(_bytes("<?mypi my test ?><test/><!--comment -->"), - 586 tostring(tree1)) - 587 - 588 tree2 = copy.deepcopy(tree1) - 589 self.assertEqual(_bytes("<?mypi my test ?><test/><!--comment -->"), - 590 tostring(tree2)) - 591 - 592 root2 = copy.deepcopy(tree1.getroot()) - 593 self.assertEqual(_bytes("<test/>"), - 594 tostring(root2)) -
595 -
597 XML = self.etree.XML - 598 tostring = self.etree.tostring - 599 xml = _bytes('<!DOCTYPE test [\n<!ENTITY entity "tasty">\n]>\n<test/>') - 600 root = XML(xml) - 601 tree1 = self.etree.ElementTree(root) - 602 self.assertEqual(xml, tostring(tree1)) - 603 - 604 tree2 = copy.deepcopy(tree1) - 605 self.assertEqual(xml, tostring(tree2)) - 606 - 607 root2 = copy.deepcopy(tree1.getroot()) - 608 self.assertEqual(_bytes("<test/>"), - 609 tostring(root2)) -
610 -
611 - def test_deepcopy_pi_dtd(self): -
612 XML = self.etree.XML - 613 tostring = self.etree.tostring - 614 xml = _bytes('<!-- comment --><!DOCTYPE test [\n<!ENTITY entity "tasty">\n]>\n<test/>') - 615 root = XML(xml) - 616 tree1 = self.etree.ElementTree(root) - 617 self.assertEqual(xml, tostring(tree1)) - 618 - 619 tree2 = copy.deepcopy(tree1) - 620 self.assertEqual(xml, tostring(tree2)) -
621 -
622 - def test_parse_remove_comments(self): -
623 fromstring = self.etree.fromstring - 624 tostring = self.etree.tostring - 625 XMLParser = self.etree.XMLParser - 626 - 627 xml = _bytes('<a><!--A--><b><!-- B --><c/></b><!--C--></a>') - 628 parser = XMLParser(remove_comments=True) - 629 root = fromstring(xml, parser) - 630 self.assertEqual( - 631 _bytes('<a><b><c/></b></a>'), - 632 tostring(root)) -
633 -
634 - def test_parse_remove_pis(self): -
635 parse = self.etree.parse - 636 tostring = self.etree.tostring - 637 XMLParser = self.etree.XMLParser - 638 - 639 xml = _bytes('<?test?><a><?A?><b><?B?><c/></b><?C?></a><?tail?>') - 640 - 641 f = BytesIO(xml) - 642 tree = parse(f) - 643 self.assertEqual( - 644 xml, - 645 tostring(tree)) - 646 - 647 parser = XMLParser(remove_pis=True) - 648 tree = parse(f, parser) - 649 self.assertEqual( - 650 _bytes('<a><b><c/></b></a>'), - 651 tostring(tree)) -
652 -
654 # ET raises IOError only - 655 parse = self.etree.parse - 656 self.assertRaises(TypeError, parse, 'notthere.xml', object()) -
657 -
659 # ET removes comments - 660 iterparse = self.etree.iterparse - 661 tostring = self.etree.tostring - 662 - 663 f = BytesIO('<a><!--A--><b><!-- B --><c/></b><!--C--></a>') - 664 events = list(iterparse(f)) - 665 root = events[-1][1] - 666 self.assertEqual(3, len(events)) - 667 self.assertEqual( - 668 _bytes('<a><!--A--><b><!-- B --><c/></b><!--C--></a>'), - 669 tostring(root)) -
670 -
671 - def test_iterparse_comments(self): -
672 # ET removes comments - 673 iterparse = self.etree.iterparse - 674 tostring = self.etree.tostring - 675 - 676 def name(event, el): - 677 if event == 'comment': - 678 return el.text - 679 else: - 680 return el.tag -
681 - 682 f = BytesIO('<a><!--A--><b><!-- B --><c/></b><!--C--></a>') - 683 events = list(iterparse(f, events=('end', 'comment'))) - 684 root = events[-1][1] - 685 self.assertEqual(6, len(events)) - 686 self.assertEqual(['A', ' B ', 'c', 'b', 'C', 'a'], - 687 [ name(*item) for item in events ]) - 688 self.assertEqual( - 689 _bytes('<a><!--A--><b><!-- B --><c/></b><!--C--></a>'), - 690 tostring(root)) -
691 -
692 - def test_iterparse_pis(self): -
693 # ET removes pis - 694 iterparse = self.etree.iterparse - 695 tostring = self.etree.tostring - 696 ElementTree = self.etree.ElementTree - 697 - 698 def name(event, el): - 699 if event == 'pi': - 700 return (el.target, el.text) - 701 else: - 702 return el.tag -
703 - 704 f = BytesIO('<?pia a?><a><?pib b?><b><?pic c?><c/></b><?pid d?></a><?pie e?>') - 705 events = list(iterparse(f, events=('end', 'pi'))) - 706 root = events[-2][1] - 707 self.assertEqual(8, len(events)) - 708 self.assertEqual([('pia','a'), ('pib','b'), ('pic','c'), 'c', 'b', - 709 ('pid','d'), 'a', ('pie','e')], - 710 [ name(*item) for item in events ]) - 711 self.assertEqual( - 712 _bytes('<?pia a?><a><?pib b?><b><?pic c?><c/></b><?pid d?></a><?pie e?>'), - 713 tostring(ElementTree(root))) - 714 -
716 iterparse = self.etree.iterparse - 717 tostring = self.etree.tostring - 718 - 719 f = BytesIO('<a><!--A--><b><!-- B --><c/></b><!--C--></a>') - 720 events = list(iterparse(f, remove_comments=True, - 721 events=('end', 'comment'))) - 722 root = events[-1][1] - 723 self.assertEqual(3, len(events)) - 724 self.assertEqual(['c', 'b', 'a'], - 725 [ el.tag for (event, el) in events ]) - 726 self.assertEqual( - 727 _bytes('<a><b><c/></b></a>'), - 728 tostring(root)) -
729 -
730 - def test_iterparse_broken(self): -
731 iterparse = self.etree.iterparse - 732 f = BytesIO('<a><b><c/></a>') - 733 # ET raises ExpatError, lxml raises XMLSyntaxError - 734 self.assertRaises(self.etree.XMLSyntaxError, list, iterparse(f)) -
735 -
737 iterparse = self.etree.iterparse - 738 f = BytesIO('<a><b><c/></a>') - 739 it = iterparse(f, events=('start', 'end'), recover=True) - 740 events = [(ev, el.tag) for ev, el in it] - 741 root = it.root - 742 self.assertTrue(root is not None) - 743 - 744 self.assertEqual(1, events.count(('start', 'a'))) - 745 self.assertEqual(1, events.count(('end', 'a'))) - 746 - 747 self.assertEqual(1, events.count(('start', 'b'))) - 748 self.assertEqual(1, events.count(('end', 'b'))) - 749 - 750 self.assertEqual(1, events.count(('start', 'c'))) - 751 self.assertEqual(1, events.count(('end', 'c'))) -
752 -
754 iterparse = self.etree.iterparse - 755 f = BytesIO('<a><b><c/></d><b><c/></a></b>') - 756 it = iterparse(f, events=('start', 'end'), recover=True) - 757 events = [(ev, el.tag) for ev, el in it] - 758 root = it.root - 759 self.assertTrue(root is not None) - 760 - 761 self.assertEqual(1, events.count(('start', 'a'))) - 762 self.assertEqual(1, events.count(('end', 'a'))) - 763 - 764 self.assertEqual(2, events.count(('start', 'b'))) - 765 self.assertEqual(2, events.count(('end', 'b'))) - 766 - 767 self.assertEqual(2, events.count(('start', 'c'))) - 768 self.assertEqual(2, events.count(('end', 'c'))) -
769 -
770 - def test_iterparse_strip(self): -
771 iterparse = self.etree.iterparse - 772 f = BytesIO(""" - 773 <a> \n \n <b> b test </b> \n - 774 - 775 \n\t <c> \n </c> </a> \n """) - 776 iterator = iterparse(f, remove_blank_text=True) - 777 text = [ (element.text, element.tail) - 778 for event, element in iterator ] - 779 self.assertEqual( - 780 [(" b test ", None), (" \n ", None), (None, None)], - 781 text) -
782 -
783 - def test_iterparse_tag(self): -
784 iterparse = self.etree.iterparse - 785 f = BytesIO('<a><b><d/></b><c/></a>') - 786 - 787 iterator = iterparse(f, tag="b", events=('start', 'end')) - 788 events = list(iterator) - 789 root = iterator.root - 790 self.assertEqual( - 791 [('start', root[0]), ('end', root[0])], - 792 events) -
793 -
794 - def test_iterparse_tag_all(self): -
795 iterparse = self.etree.iterparse - 796 f = BytesIO('<a><b><d/></b><c/></a>') - 797 - 798 iterator = iterparse(f, tag="*", events=('start', 'end')) - 799 events = list(iterator) - 800 self.assertEqual( - 801 8, - 802 len(events)) -
803 -
804 - def test_iterparse_tag_ns(self): -
805 iterparse = self.etree.iterparse - 806 f = BytesIO('<a xmlns="urn:test:1"><b><d/></b><c/></a>') - 807 - 808 iterator = iterparse(f, tag="{urn:test:1}b", events=('start', 'end')) - 809 events = list(iterator) - 810 root = iterator.root - 811 self.assertEqual( - 812 [('start', root[0]), ('end', root[0])], - 813 events) -
814 -
815 - def test_iterparse_tag_ns_empty(self): -
816 iterparse = self.etree.iterparse - 817 f = BytesIO('<a><b><d/></b><c/></a>') - 818 iterator = iterparse(f, tag="{}b", events=('start', 'end')) - 819 events = list(iterator) - 820 root = iterator.root - 821 self.assertEqual( - 822 [('start', root[0]), ('end', root[0])], - 823 events) - 824 - 825 f = BytesIO('<a xmlns="urn:test:1"><b><d/></b><c/></a>') - 826 iterator = iterparse(f, tag="{}b", events=('start', 'end')) - 827 events = list(iterator) - 828 root = iterator.root - 829 self.assertEqual([], events) -
830 -
831 - def test_iterparse_tag_ns_all(self): -
832 iterparse = self.etree.iterparse - 833 f = BytesIO('<a xmlns="urn:test:1"><b><d/></b><c/></a>') - 834 iterator = iterparse(f, tag="{urn:test:1}*", events=('start', 'end')) - 835 events = list(iterator) - 836 self.assertEqual(8, len(events)) -
837 -
839 iterparse = self.etree.iterparse - 840 f = BytesIO('<a xmlns="urn:test:1"><b><d/></b><c/></a>') - 841 iterator = iterparse(f, tag="{}*", events=('start', 'end')) - 842 events = list(iterator) - 843 self.assertEqual([], events) - 844 - 845 f = BytesIO('<a><b><d/></b><c/></a>') - 846 iterator = iterparse(f, tag="{}*", events=('start', 'end')) - 847 events = list(iterator) - 848 self.assertEqual(8, len(events)) -
849 -
851 text = _str('Søk på nettet') - 852 wrong_declaration = "<?xml version='1.0' encoding='UTF-8'?>" - 853 xml_latin1 = (_str('%s<a>%s</a>') % (wrong_declaration, text) - 854 ).encode('iso-8859-1') - 855 - 856 self.assertRaises(self.etree.ParseError, - 857 list, self.etree.iterparse(BytesIO(xml_latin1))) -
858 -
860 text = _str('Søk på nettet', encoding="UTF-8") - 861 wrong_declaration = "<?xml version='1.0' encoding='UTF-8'?>" - 862 xml_latin1 = (_str('%s<a>%s</a>') % (wrong_declaration, text) - 863 ).encode('iso-8859-1') - 864 - 865 iterator = self.etree.iterparse(BytesIO(xml_latin1), - 866 encoding="iso-8859-1") - 867 self.assertEqual(1, len(list(iterator))) - 868 - 869 a = iterator.root - 870 self.assertEqual(a.text, text) -
871 -
872 - def test_iterparse_keep_cdata(self): -
873 tostring = self.etree.tostring - 874 f = BytesIO('<root><![CDATA[test]]></root>') - 875 context = self.etree.iterparse(f, strip_cdata=False) - 876 content = [ el.text for event,el in context ] - 877 - 878 self.assertEqual(['test'], content) - 879 self.assertEqual(_bytes('<root><![CDATA[test]]></root>'), - 880 tostring(context.root)) -
881 -
883 self.assertRaises( - 884 LookupError, self.etree.XMLParser, encoding="hopefully unknown") -
885 -
886 - def test_parser_encoding(self): -
887 self.etree.XMLParser(encoding="ascii") - 888 self.etree.XMLParser(encoding="utf-8") - 889 self.etree.XMLParser(encoding="iso-8859-1") -
890 -
891 - def test_feed_parser_recover(self): -
892 parser = self.etree.XMLParser(recover=True) - 893 - 894 parser.feed('<?xml version=') - 895 parser.feed('"1.0"?><ro') - 896 parser.feed('ot><') - 897 parser.feed('a test="works"') - 898 parser.feed('><othertag/></root') # <a> not closed! - 899 parser.feed('>') - 900 - 901 root = parser.close() - 902 - 903 self.assertEqual(root.tag, "root") - 904 self.assertEqual(len(root), 1) - 905 self.assertEqual(root[0].tag, "a") - 906 self.assertEqual(root[0].get("test"), "works") - 907 self.assertEqual(len(root[0]), 1) - 908 self.assertEqual(root[0][0].tag, "othertag") -
909 # FIXME: would be nice to get some errors logged ... - 910 #self.assertTrue(len(parser.error_log) > 0, "error log is empty") - 911 -
913 # test that recover mode plays nicely with the no-id-dict setup - 914 parser = self.etree.XMLParser(recover=True, collect_ids=False) - 915 - 916 parser.feed('<?xml version=') - 917 parser.feed('"1.0"?><ro') - 918 parser.feed('ot xml:id="123"><') - 919 parser.feed('a test="works" xml:id=') - 920 parser.feed('"321"><othertag/></root') # <a> not closed! - 921 parser.feed('>') - 922 - 923 root = parser.close() - 924 - 925 self.assertEqual(root.tag, "root") - 926 self.assertEqual(len(root), 1) - 927 self.assertEqual(root[0].tag, "a") - 928 self.assertEqual(root[0].get("test"), "works") - 929 self.assertEqual(root[0].attrib, { - 930 'test': 'works', - 931 '{http://www.w3.org/XML/1998/namespace}id': '321'}) - 932 self.assertEqual(len(root[0]), 1) - 933 self.assertEqual(root[0][0].tag, "othertag") -
934 # FIXME: would be nice to get some errors logged ... - 935 #self.assertTrue(len(parser.error_log) > 0, "error log is empty") - 936 -
938 assertEqual = self.assertEqual - 939 assertFalse = self.assertFalse - 940 - 941 events = [] - 942 class Target(object): - 943 def start(self, tag, attrib): - 944 events.append("start") - 945 assertFalse(attrib) - 946 assertEqual("TAG", tag) -
947 def end(self, tag): - 948 events.append("end") - 949 assertEqual("TAG", tag) - 950 def close(self): - 951 return "DONE" # no Element! - 952 - 953 parser = self.etree.XMLParser(target=Target()) - 954 tree = self.etree.ElementTree() - 955 - 956 self.assertRaises(TypeError, - 957 tree.parse, BytesIO("<TAG/>"), parser=parser) - 958 self.assertEqual(["start", "end"], events) - 959 -
961 # ET doesn't call .close() on errors - 962 events = [] - 963 class Target(object): - 964 def start(self, tag, attrib): - 965 events.append("start-" + tag) -
966 def end(self, tag): - 967 events.append("end-" + tag) - 968 if tag == 'a': - 969 raise ValueError("dead and gone") - 970 def data(self, data): - 971 events.append("data-" + data) - 972 def close(self): - 973 events.append("close") - 974 return "DONE" - 975 - 976 parser = self.etree.XMLParser(target=Target()) - 977 - 978 try: - 979 parser.feed(_bytes('<root>A<a>ca</a>B</root>')) - 980 done = parser.close() - 981 self.fail("error expected, but parsing succeeded") - 982 except ValueError: - 983 done = 'value error received as expected' - 984 - 985 self.assertEqual(["start-root", "data-A", "start-a", - 986 "data-ca", "end-a", "close"], - 987 events) - 988 -
990 # ET doesn't call .close() on errors - 991 events = [] - 992 class Target(object): - 993 def start(self, tag, attrib): - 994 events.append("start-" + tag) -
995 def end(self, tag): - 996 events.append("end-" + tag) - 997 if tag == 'a': - 998 raise ValueError("dead and gone") - 999 def data(self, data): -1000 events.append("data-" + data) -1001 def close(self): -1002 events.append("close") -1003 return "DONE" -1004 -1005 parser = self.etree.XMLParser(target=Target()) -1006 -1007 try: -1008 done = self.etree.fromstring(_bytes('<root>A<a>ca</a>B</root>'), -1009 parser=parser) -1010 self.fail("error expected, but parsing succeeded") -1011 except ValueError: -1012 done = 'value error received as expected' -1013 -1014 self.assertEqual(["start-root", "data-A", "start-a", -1015 "data-ca", "end-a", "close"], -1016 events) -1017 -
1019 # test that target parsing works nicely with the no-id-hash setup -1020 events = [] -1021 class Target(object): -1022 def start(self, tag, attrib): -1023 events.append("start-" + tag) -
1024 def end(self, tag): -1025 events.append("end-" + tag) -1026 def data(self, data): -1027 events.append("data-" + data) -1028 def comment(self, text): -1029 events.append("comment-" + text) -1030 def close(self): -1031 return "DONE" -1032 -1033 parser = self.etree.XMLParser(target=Target(), collect_ids=False) -1034 -1035 parser.feed(_bytes('<!--a--><root xml:id="123">A<!--b-->')) -1036 parser.feed(_bytes('<sub xml:id="321"/>B</root>')) -1037 done = parser.close() -1038 -1039 self.assertEqual("DONE", done) -1040 self.assertEqual(["comment-a", "start-root", "data-A", "comment-b", -1041 "start-sub", "end-sub", "data-B", "end-root"], -1042 events) -1043 -
1044 - def test_parser_target_comment(self): -
1045 events = [] -1046 class Target(object): -1047 def start(self, tag, attrib): -1048 events.append("start-" + tag) -
1049 def end(self, tag): -1050 events.append("end-" + tag) -1051 def data(self, data): -1052 events.append("data-" + data) -1053 def comment(self, text): -1054 events.append("comment-" + text) -1055 def close(self): -1056 return "DONE" -1057 -1058 parser = self.etree.XMLParser(target=Target()) -1059 -1060 parser.feed(_bytes('<!--a--><root>A<!--b--><sub/><!--c-->B</root><!--d-->')) -1061 done = parser.close() -1062 -1063 self.assertEqual("DONE", done) -1064 self.assertEqual(["comment-a", "start-root", "data-A", "comment-b", -1065 "start-sub", "end-sub", "comment-c", "data-B", -1066 "end-root", "comment-d"], -1067 events) -1068 -
1069 - def test_parser_target_pi(self): -
1070 events = [] -1071 class Target(object): -1072 def start(self, tag, attrib): -1073 events.append("start-" + tag) -
1074 def end(self, tag): -1075 events.append("end-" + tag) -1076 def data(self, data): -1077 events.append("data-" + data) -1078 def pi(self, target, data): -1079 events.append("pi-" + target + "-" + data) -1080 def close(self): -1081 return "DONE" -1082 -1083 parser = self.etree.XMLParser(target=Target()) -1084 -1085 parser.feed(_bytes('<?test a?><root>A<?test b?>B</root><?test c?>')) -1086 done = parser.close() -1087 -1088 self.assertEqual("DONE", done) -1089 self.assertEqual(["pi-test-a", "start-root", "data-A", "pi-test-b", -1090 "data-B", "end-root", "pi-test-c"], -1091 events) -1092 -
1093 - def test_parser_target_cdata(self): -
1094 events = [] -1095 class Target(object): -1096 def start(self, tag, attrib): -1097 events.append("start-" + tag) -
1098 def end(self, tag): -1099 events.append("end-" + tag) -1100 def data(self, data): -1101 events.append("data-" + data) -1102 def close(self): -1103 return "DONE" -1104 -1105 parser = self.etree.XMLParser(target=Target(), -1106 strip_cdata=False) -1107 -1108 parser.feed(_bytes('<root>A<a><![CDATA[ca]]></a>B</root>')) -1109 done = parser.close() -1110 -1111 self.assertEqual("DONE", done) -1112 self.assertEqual(["start-root", "data-A", "start-a", -1113 "data-ca", "end-a", "data-B", "end-root"], -1114 events) -1115 -
1116 - def test_parser_target_recover(self): -
1117 events = [] -1118 class Target(object): -1119 def start(self, tag, attrib): -1120 events.append("start-" + tag) -
1121 def end(self, tag): -1122 events.append("end-" + tag) -1123 def data(self, data): -1124 events.append("data-" + data) -1125 def close(self): -1126 events.append("close") -1127 return "DONE" -1128 -1129 parser = self.etree.XMLParser(target=Target(), -1130 recover=True) -1131 -1132 parser.feed(_bytes('<root>A<a>ca</a>B</not-root>')) -1133 done = parser.close() -1134 -1135 self.assertEqual("DONE", done) -1136 self.assertEqual(["start-root", "data-A", "start-a", -1137 "data-ca", "end-a", "data-B", -1138 "end-root", "close"], -1139 events) -1140 -
1141 - def test_iterwalk_tag(self): -
1142 iterwalk = self.etree.iterwalk -1143 root = self.etree.XML(_bytes('<a><b><d/></b><c/></a>')) -1144 -1145 iterator = iterwalk(root, tag="b", events=('start', 'end')) -1146 events = list(iterator) -1147 self.assertEqual( -1148 [('start', root[0]), ('end', root[0])], -1149 events) -
1150 -
1151 - def test_iterwalk_tag_all(self): -
1152 iterwalk = self.etree.iterwalk -1153 root = self.etree.XML(_bytes('<a><b><d/></b><c/></a>')) -1154 -1155 iterator = iterwalk(root, tag="*", events=('start', 'end')) -1156 events = list(iterator) -1157 self.assertEqual( -1158 8, -1159 len(events)) -
1160 -
1161 - def test_iterwalk(self): -
1162 iterwalk = self.etree.iterwalk -1163 root = self.etree.XML(_bytes('<a><b></b><c/></a>')) -1164 -1165 events = list(iterwalk(root)) -1166 self.assertEqual( -1167 [('end', root[0]), ('end', root[1]), ('end', root)], -1168 events) -
1169 -
1170 - def test_iterwalk_start(self): -
1171 iterwalk = self.etree.iterwalk -1172 root = self.etree.XML(_bytes('<a><b></b><c/></a>')) -1173 -1174 iterator = iterwalk(root, events=('start',)) -1175 events = list(iterator) -1176 self.assertEqual( -1177 [('start', root), ('start', root[0]), ('start', root[1])], -1178 events) -
1179 -
1180 - def test_iterwalk_start_end(self): -
1181 iterwalk = self.etree.iterwalk -1182 root = self.etree.XML(_bytes('<a><b></b><c/></a>')) -1183 -1184 iterator = iterwalk(root, events=('start','end')) -1185 events = list(iterator) -1186 self.assertEqual( -1187 [('start', root), ('start', root[0]), ('end', root[0]), -1188 ('start', root[1]), ('end', root[1]), ('end', root)], -1189 events) -
1190 -
1191 - def test_iterwalk_start_tags(self): -
1192 iterwalk = self.etree.iterwalk -1193 root = self.etree.XML(_bytes('<a><b></b><c/><b><d/></b></a>')) -1194 -1195 iterator = iterwalk(root, events=('start',), tag='b') -1196 events = list(iterator) -1197 self.assertEqual( -1198 [('start', root[0]), ('start', root[2])], -1199 events) -
1200 -
1202 iterwalk = self.etree.iterwalk -1203 root = self.etree.XML(_bytes('<a><b></b><c/><b><d/></b></a>')) -1204 -1205 iterator = iterwalk(root, events=('start', 'end'), tag='b') -1206 events = list(iterator) -1207 self.assertEqual( -1208 [('start', root[0]), ('end', root[0]), ('start', root[2]), ('end', root[2])], -1209 events) -
1210 -
1212 iterwalk = self.etree.iterwalk -1213 root = self.etree.XML(_bytes('<a><b></b><c/><b><d/></b></a>')) -1214 -1215 iterator = iterwalk(root, events=('start', 'end'), tag=('b', 'a')) -1216 events = list(iterator) -1217 self.assertEqual( -1218 [('start', root), -1219 ('start', root[0]), ('end', root[0]), -1220 ('start', root[2]), ('end', root[2]), -1221 ('end', root), -1222 ], -1223 events) -
1224 -
1225 - def test_iterwalk_clear(self): -
1226 iterwalk = self.etree.iterwalk -1227 root = self.etree.XML(_bytes('<a><b></b><c/></a>')) -1228 -1229 iterator = iterwalk(root) -1230 for event, elem in iterator: -1231 elem.clear() -1232 -1233 self.assertEqual(0, -1234 len(root)) -
1235 -
1236 - def test_iterwalk_attrib_ns(self): -
1237 iterwalk = self.etree.iterwalk -1238 root = self.etree.XML(_bytes('<a xmlns="ns1"><b><c xmlns="ns2"/></b></a>')) -1239 -1240 attr_name = '{testns}bla' -1241 events = [] -1242 iterator = iterwalk(root, events=('start','end','start-ns','end-ns')) -1243 for event, elem in iterator: -1244 events.append(event) -1245 if event == 'start': -1246 if elem.tag != '{ns1}a': -1247 elem.set(attr_name, 'value') -1248 -1249 self.assertEqual( -1250 ['start-ns', 'start', 'start', 'start-ns', 'start', -1251 'end', 'end-ns', 'end', 'end', 'end-ns'], -1252 events) -1253 -1254 self.assertEqual( -1255 None, -1256 root.get(attr_name)) -1257 self.assertEqual( -1258 'value', -1259 root[0].get(attr_name)) -
1260 -
1261 - def test_iterwalk_end_skip(self): -
1262 iterwalk = self.etree.iterwalk -1263 root = self.etree.XML(_bytes('<a><b><c/></b><d><e/></d></a>')) -1264 -1265 iterator = iterwalk(root) -1266 tags = [] -1267 for event, elem in iterator: -1268 tags.append(elem.tag) -1269 # requesting a skip after an 'end' event should never have an effect -1270 iterator.skip_subtree() -1271 -1272 self.assertEqual(['c', 'b', 'e', 'd', 'a'], tags) -
1273 -
1275 iterwalk = self.etree.iterwalk -1276 root = self.etree.XML(_bytes('<a><b><c/></b><d><e/></d></a>')) -1277 -1278 iterator = iterwalk(root, events=('start', 'end')) -1279 tags = [] -1280 for event, elem in iterator: -1281 tags.append((event, elem.tag)) -1282 if elem.tag in ('b', 'e'): -1283 # skipping should only have an effect on 'start', not on 'end' -1284 iterator.skip_subtree() -1285 -1286 self.assertEqual( -1287 [('start', 'a'), -1288 ('start', 'b'), ('end', 'b'), # ignored child 'c' -1289 ('start', 'd'), -1290 ('start', 'e'), ('end', 'e'), -1291 ('end', 'd'), -1292 ('end', 'a')], -1293 tags) -
1294 -
1295 - def test_iterwalk_ns_skip(self): -
1296 iterwalk = self.etree.iterwalk -1297 root = self.etree.XML(_bytes( -1298 '<a xmlns="ns1"><b xmlns="nsb"><c xmlns="ns2"/></b><d xmlns="ns2"><e/></d></a>')) -1299 -1300 events = [] -1301 iterator = iterwalk(root, events=('start','start-ns','end-ns')) -1302 for event, elem in iterator: -1303 if event in ('start-ns', 'end-ns'): -1304 events.append((event, elem)) -1305 if event == 'start-ns' and elem == ('', 'nsb'): -1306 events.append('skip') -1307 iterator.skip_subtree() -1308 else: -1309 events.append((event, elem.tag)) -1310 -1311 self.assertEqual( -1312 [('start-ns', ('', 'ns1')), -1313 ('start', '{ns1}a'), -1314 ('start-ns', ('', 'nsb')), -1315 'skip', -1316 ('start', '{nsb}b'), -1317 ('end-ns', None), -1318 ('start-ns', ('', 'ns2')), -1319 ('start', '{ns2}d'), -1320 ('start', '{ns2}e'), -1321 ('end-ns', None), -1322 ('end-ns', None) -1323 ], -1324 events) -
1325 -
1326 - def test_iterwalk_getiterator(self): -
1327 iterwalk = self.etree.iterwalk -1328 root = self.etree.XML(_bytes('<a><b><d/></b><c/></a>')) -1329 -1330 counts = [] -1331 for event, elem in iterwalk(root): -1332 counts.append(len(list(elem.getiterator()))) -1333 self.assertEqual( -1334 [1,2,1,4], -1335 counts) -
1336 -
1337 - def test_resolve_string_dtd(self): -
1338 parse = self.etree.parse -1339 parser = self.etree.XMLParser(dtd_validation=True) -1340 assertEqual = self.assertEqual -1341 test_url = _str("__nosuch.dtd") -1342 -1343 class MyResolver(self.etree.Resolver): -1344 def resolve(self, url, id, context): -1345 assertEqual(url, test_url) -1346 return self.resolve_string( -1347 _str('''<!ENTITY myentity "%s"> -1348 <!ELEMENT doc ANY>''') % url, context) -
1349 -1350 parser.resolvers.add(MyResolver()) -1351 -1352 xml = _str('<!DOCTYPE doc SYSTEM "%s"><doc>&myentity;</doc>') % test_url -1353 tree = parse(StringIO(xml), parser) -1354 root = tree.getroot() -1355 self.assertEqual(root.text, test_url) -1356 -
1357 - def test_resolve_bytes_dtd(self): -
1358 parse = self.etree.parse -1359 parser = self.etree.XMLParser(dtd_validation=True) -1360 assertEqual = self.assertEqual -1361 test_url = _str("__nosuch.dtd") -1362 -1363 class MyResolver(self.etree.Resolver): -1364 def resolve(self, url, id, context): -1365 assertEqual(url, test_url) -1366 return self.resolve_string( -1367 (_str('''<!ENTITY myentity "%s"> -1368 <!ELEMENT doc ANY>''') % url).encode('utf-8'), -1369 context) -
1370 -1371 parser.resolvers.add(MyResolver()) -1372 -1373 xml = _str('<!DOCTYPE doc SYSTEM "%s"><doc>&myentity;</doc>') % test_url -1374 tree = parse(StringIO(xml), parser) -1375 root = tree.getroot() -1376 self.assertEqual(root.text, test_url) -1377 -
1378 - def test_resolve_filelike_dtd(self): -
1379 parse = self.etree.parse -1380 parser = self.etree.XMLParser(dtd_validation=True) -1381 assertEqual = self.assertEqual -1382 test_url = _str("__nosuch.dtd") -1383 -1384 class MyResolver(self.etree.Resolver): -1385 def resolve(self, url, id, context): -1386 assertEqual(url, test_url) -1387 return self.resolve_file( -1388 SillyFileLike( -1389 _str('''<!ENTITY myentity "%s"> -1390 <!ELEMENT doc ANY>''') % url), context) -
1391 -1392 parser.resolvers.add(MyResolver()) -1393 -1394 xml = _str('<!DOCTYPE doc SYSTEM "%s"><doc>&myentity;</doc>') % test_url -1395 tree = parse(StringIO(xml), parser) -1396 root = tree.getroot() -1397 self.assertEqual(root.text, test_url) -1398 -
1399 - def test_resolve_filename_dtd(self): -
1400 parse = self.etree.parse -1401 parser = self.etree.XMLParser(attribute_defaults=True) -1402 assertEqual = self.assertEqual -1403 test_url = _str("__nosuch.dtd") -1404 -1405 class MyResolver(self.etree.Resolver): -1406 def resolve(self, url, id, context): -1407 assertEqual(url, test_url) -1408 return self.resolve_filename( -1409 fileInTestDir('test.dtd'), context) -
1410 -1411 parser.resolvers.add(MyResolver()) -1412 -1413 xml = _str('<!DOCTYPE a SYSTEM "%s"><a><b/></a>') % test_url -1414 tree = parse(StringIO(xml), parser) -1415 root = tree.getroot() -1416 self.assertEqual( -1417 root.attrib, {'default': 'valueA'}) -1418 self.assertEqual( -1419 root[0].attrib, {'default': 'valueB'}) -1420 -
1422 parse = self.etree.parse -1423 parser = self.etree.XMLParser(attribute_defaults=True) -1424 assertEqual = self.assertEqual -1425 test_url = _str("__nosuch.dtd") -1426 -1427 class MyResolver(self.etree.Resolver): -1428 def resolve(self, url, id, context): -1429 expected = fileUrlInTestDir(test_url) -1430 url = url.replace('file://', 'file:') # depends on libxml2 version -1431 expected = expected.replace('file://', 'file:') -1432 assertEqual(url, expected) -1433 return self.resolve_filename( -1434 fileUrlInTestDir('test.dtd'), context) -
1435 -1436 parser.resolvers.add(MyResolver()) -1437 -1438 xml = _str('<!DOCTYPE a SYSTEM "%s"><a><b/></a>') % test_url -1439 tree = parse(StringIO(xml), parser, -1440 base_url=fileUrlInTestDir('__test.xml')) -1441 root = tree.getroot() -1442 self.assertEqual( -1443 root.attrib, {'default': 'valueA'}) -1444 self.assertEqual( -1445 root[0].attrib, {'default': 'valueB'}) -1446 -
1447 - def test_resolve_file_dtd(self): -
1448 parse = self.etree.parse -1449 parser = self.etree.XMLParser(attribute_defaults=True) -1450 assertEqual = self.assertEqual -1451 test_url = _str("__nosuch.dtd") -1452 -1453 class MyResolver(self.etree.Resolver): -1454 def resolve(self, url, id, context): -1455 assertEqual(url, test_url) -1456 return self.resolve_file( -1457 open(fileInTestDir('test.dtd'), 'rb'), context) -
1458 -1459 parser.resolvers.add(MyResolver()) -1460 -1461 xml = _str('<!DOCTYPE a SYSTEM "%s"><a><b/></a>') % test_url -1462 tree = parse(StringIO(xml), parser) -1463 root = tree.getroot() -1464 self.assertEqual( -1465 root.attrib, {'default': 'valueA'}) -1466 self.assertEqual( -1467 root[0].attrib, {'default': 'valueB'}) -1468 -
1469 - def test_resolve_empty(self): -
1470 parse = self.etree.parse -1471 parser = self.etree.XMLParser(load_dtd=True) -1472 assertEqual = self.assertEqual -1473 test_url = _str("__nosuch.dtd") -1474 -1475 class check(object): -1476 resolved = False -
1477 -1478 class MyResolver(self.etree.Resolver): -1479 def resolve(self, url, id, context): -1480 assertEqual(url, test_url) -1481 check.resolved = True -1482 return self.resolve_empty(context) -1483 -1484 parser.resolvers.add(MyResolver()) -1485 -1486 xml = _str('<!DOCTYPE doc SYSTEM "%s"><doc>&myentity;</doc>') % test_url -1487 self.assertRaises(etree.XMLSyntaxError, parse, StringIO(xml), parser) -1488 self.assertTrue(check.resolved) -1489 -
1490 - def test_resolve_error(self): -
1491 parse = self.etree.parse -1492 parser = self.etree.XMLParser(dtd_validation=True) -1493 -1494 class _LocalException(Exception): -1495 pass -
1496 -1497 class MyResolver(self.etree.Resolver): -1498 def resolve(self, url, id, context): -1499 raise _LocalException -1500 -1501 parser.resolvers.add(MyResolver()) -1502 -1503 xml = '<!DOCTYPE doc SYSTEM "test"><doc>&myentity;</doc>' -1504 self.assertRaises(_LocalException, parse, BytesIO(xml), parser) -1505 -1506 if etree.LIBXML_VERSION > (2,6,20): -
1507 - def test_entity_parse(self): -
1508 parse = self.etree.parse -1509 tostring = self.etree.tostring -1510 parser = self.etree.XMLParser(resolve_entities=False) -1511 Entity = self.etree.Entity -1512 -1513 xml = _bytes('<!DOCTYPE doc SYSTEM "test"><doc>&myentity;</doc>') -1514 tree = parse(BytesIO(xml), parser) -1515 root = tree.getroot() -1516 self.assertEqual(root[0].tag, Entity) -1517 self.assertEqual(root[0].text, "&myentity;") -1518 self.assertEqual(root[0].tail, None) -1519 self.assertEqual(root[0].name, "myentity") -1520 -1521 self.assertEqual(_bytes('<doc>&myentity;</doc>'), -1522 tostring(root)) -
1523 -
1524 - def test_entity_restructure(self): -
1525 xml = _bytes('''<!DOCTYPE root [ <!ENTITY nbsp "&#160;"> ]> -1526 <root> -1527 <child1/> -1528 <child2/> -1529 <child3>&nbsp;</child3> -1530 </root>''') -1531 -1532 parser = self.etree.XMLParser(resolve_entities=False) -1533 root = etree.fromstring(xml, parser) -1534 self.assertEqual([ el.tag for el in root ], -1535 ['child1', 'child2', 'child3']) -1536 -1537 root[0] = root[-1] -1538 self.assertEqual([ el.tag for el in root ], -1539 ['child3', 'child2']) -1540 self.assertEqual(root[0][0].text, '&nbsp;') -1541 self.assertEqual(root[0][0].name, 'nbsp') -
1542 -
1543 - def test_entity_append(self): -
1544 Entity = self.etree.Entity -1545 Element = self.etree.Element -1546 tostring = self.etree.tostring -1547 -1548 root = Element("root") -1549 root.append( Entity("test") ) -1550 -1551 self.assertEqual(root[0].tag, Entity) -1552 self.assertEqual(root[0].text, "&test;") -1553 self.assertEqual(root[0].tail, None) -1554 self.assertEqual(root[0].name, "test") -1555 -1556 self.assertEqual(_bytes('<root>&test;</root>'), -1557 tostring(root)) -
1558 -
1559 - def test_entity_values(self): -
1560 Entity = self.etree.Entity -1561 self.assertEqual(Entity("test").text, '&test;') -1562 self.assertEqual(Entity("#17683").text, '&#17683;') -1563 self.assertEqual(Entity("#x1768").text, '&#x1768;') -1564 self.assertEqual(Entity("#x98AF").text, '&#x98AF;') -
1565 -
1566 - def test_entity_error(self): -
1567 Entity = self.etree.Entity -1568 self.assertRaises(ValueError, Entity, 'a b c') -1569 self.assertRaises(ValueError, Entity, 'a,b') -1570 self.assertRaises(ValueError, Entity, 'a\0b') -1571 self.assertRaises(ValueError, Entity, '#abc') -1572 self.assertRaises(ValueError, Entity, '#xxyz') -
1573 -
1574 - def test_cdata(self): -
1575 CDATA = self.etree.CDATA -1576 Element = self.etree.Element -1577 tostring = self.etree.tostring -1578 -1579 root = Element("root") -1580 root.text = CDATA('test') -1581 -1582 self.assertEqual('test', -1583 root.text) -1584 self.assertEqual(_bytes('<root><![CDATA[test]]></root>'), -1585 tostring(root)) -
1586 -
1587 - def test_cdata_tail(self): -
1588 CDATA = self.etree.CDATA -1589 Element = self.etree.Element -1590 SubElement = self.etree.SubElement -1591 tostring = self.etree.tostring -1592 -1593 root = Element("root") -1594 child = SubElement(root, 'child') -1595 child.tail = CDATA('test') -1596 -1597 self.assertEqual('test', child.tail) -1598 self.assertEqual(_bytes('<root><child/><![CDATA[test]]></root>'), -1599 tostring(root)) -1600 -1601 root = Element("root") -1602 root.tail = CDATA('test') -1603 -1604 self.assertEqual('test', root.tail) -1605 self.assertEqual(_bytes('<root/><![CDATA[test]]>'), -1606 tostring(root)) -
1607 -
1608 - def test_cdata_type(self): -
1609 CDATA = self.etree.CDATA -1610 Element = self.etree.Element -1611 root = Element("root") -1612 -1613 root.text = CDATA("test") -1614 self.assertEqual('test', root.text) -1615 -1616 root.text = CDATA(_str("test")) -1617 self.assertEqual('test', root.text) -1618 -1619 self.assertRaises(TypeError, CDATA, 1) -
1620 -
1621 - def test_cdata_errors(self): -
1622 CDATA = self.etree.CDATA -1623 Element = self.etree.Element -1624 -1625 root = Element("root") -1626 cdata = CDATA('test') -1627 -1628 self.assertRaises(TypeError, -1629 root.set, 'attr', cdata) -1630 self.assertRaises(TypeError, -1631 operator.setitem, root.attrib, 'attr', cdata) -
1632 -
1633 - def test_cdata_parser(self): -
1634 tostring = self.etree.tostring -1635 parser = self.etree.XMLParser(strip_cdata=False) -1636 root = self.etree.XML(_bytes('<root><![CDATA[test]]></root>'), parser) -1637 -1638 self.assertEqual('test', root.text) -1639 self.assertEqual(_bytes('<root><![CDATA[test]]></root>'), -1640 tostring(root)) -
1641 -
1642 - def test_cdata_xpath(self): -
1643 tostring = self.etree.tostring -1644 parser = self.etree.XMLParser(strip_cdata=False) -1645 root = self.etree.XML(_bytes('<root><![CDATA[test]]></root>'), parser) -1646 self.assertEqual(_bytes('<root><![CDATA[test]]></root>'), -1647 tostring(root)) -1648 -1649 self.assertEqual(['test'], root.xpath('//text()')) -
1650 -1651 # TypeError in etree, AssertionError in ElementTree; -
1652 - def test_setitem_assert(self): -
1653 Element = self.etree.Element -1654 SubElement = self.etree.SubElement -1655 -1656 a = Element('a') -1657 b = SubElement(a, 'b') -1658 -1659 self.assertRaises(TypeError, -1660 a.__setitem__, 0, 'foo') -
1661 -
1662 - def test_append_error(self): -
1663 Element = self.etree.Element -1664 root = Element('root') -1665 # raises AssertionError in ElementTree -1666 self.assertRaises(TypeError, root.append, None) -1667 self.assertRaises(TypeError, root.extend, [None]) -1668 self.assertRaises(TypeError, root.extend, [Element('one'), None]) -1669 self.assertEqual('one', root[0].tag) -
1670 -
1671 - def test_append_recursive_error(self): -
1672 Element = self.etree.Element -1673 SubElement = self.etree.SubElement -1674 root = Element('root') -1675 self.assertRaises(ValueError, root.append, root) -1676 child = SubElement(root, 'child') -1677 self.assertRaises(ValueError, child.append, root) -1678 child2 = SubElement(child, 'child2') -1679 self.assertRaises(ValueError, child2.append, root) -1680 self.assertRaises(ValueError, child2.append, child) -1681 self.assertEqual('child2', root[0][0].tag) -
1682 -
1683 - def test_addnext(self): -
1684 Element = self.etree.Element -1685 SubElement = self.etree.SubElement -1686 root = Element('root') -1687 SubElement(root, 'a') -1688 SubElement(root, 'b') -1689 -1690 self.assertEqual(['a', 'b'], -1691 [c.tag for c in root]) -1692 root[1].addnext(root[0]) -1693 self.assertEqual(['b', 'a'], -1694 [c.tag for c in root]) -
1695 -
1696 - def test_addprevious(self): -
1697 Element = self.etree.Element -1698 SubElement = self.etree.SubElement -1699 root = Element('root') -1700 SubElement(root, 'a') -1701 SubElement(root, 'b') -1702 -1703 self.assertEqual(['a', 'b'], -1704 [c.tag for c in root]) -1705 root[0].addprevious(root[1]) -1706 self.assertEqual(['b', 'a'], -1707 [c.tag for c in root]) -
1708 -
1709 - def test_addnext_cycle(self): -
1710 Element = self.etree.Element -1711 SubElement = self.etree.SubElement -1712 root = Element('root') -1713 a = SubElement(root, 'a') -1714 b = SubElement(a, 'b') -1715 # appending parent as sibling is forbidden -1716 self.assertRaises(ValueError, b.addnext, a) -1717 self.assertEqual(['a'], [c.tag for c in root]) -1718 self.assertEqual(['b'], [c.tag for c in a]) -
1719 -
1720 - def test_addprevious_cycle(self): -
1721 Element = self.etree.Element -1722 SubElement = self.etree.SubElement -1723 root = Element('root') -1724 a = SubElement(root, 'a') -1725 b = SubElement(a, 'b') -1726 # appending parent as sibling is forbidden -1727 self.assertRaises(ValueError, b.addprevious, a) -1728 self.assertEqual(['a'], [c.tag for c in root]) -1729 self.assertEqual(['b'], [c.tag for c in a]) -
1730 -
1731 - def test_addnext_cycle_long(self): -
1732 Element = self.etree.Element -1733 SubElement = self.etree.SubElement -1734 root = Element('root') -1735 a = SubElement(root, 'a') -1736 b = SubElement(a, 'b') -1737 c = SubElement(b, 'c') -1738 # appending parent as sibling is forbidden -1739 self.assertRaises(ValueError, c.addnext, a) -
1740 -
1741 - def test_addprevious_cycle_long(self): -
1742 Element = self.etree.Element -1743 SubElement = self.etree.SubElement -1744 root = Element('root') -1745 a = SubElement(root, 'a') -1746 b = SubElement(a, 'b') -1747 c = SubElement(b, 'c') -1748 # appending parent as sibling is forbidden -1749 self.assertRaises(ValueError, c.addprevious, a) -
1750 -
1751 - def test_addprevious_noops(self): -
1752 Element = self.etree.Element -1753 SubElement = self.etree.SubElement -1754 root = Element('root') -1755 a = SubElement(root, 'a') -1756 b = SubElement(root, 'b') -1757 a.addprevious(a) -1758 self.assertEqual('a', root[0].tag) -1759 self.assertEqual('b', root[1].tag) -1760 b.addprevious(b) -1761 self.assertEqual('a', root[0].tag) -1762 self.assertEqual('b', root[1].tag) -1763 b.addprevious(a) -1764 self.assertEqual('a', root[0].tag) -1765 self.assertEqual('b', root[1].tag) -
1766 -
1767 - def test_addnext_noops(self): -
1768 Element = self.etree.Element -1769 SubElement = self.etree.SubElement -1770 root = Element('root') -1771 a = SubElement(root, 'a') -1772 b = SubElement(root, 'b') -1773 a.addnext(a) -1774 self.assertEqual('a', root[0].tag) -1775 self.assertEqual('b', root[1].tag) -1776 b.addnext(b) -1777 self.assertEqual('a', root[0].tag) -1778 self.assertEqual('b', root[1].tag) -1779 a.addnext(b) -1780 self.assertEqual('a', root[0].tag) -1781 self.assertEqual('b', root[1].tag) -
1782 -
1783 - def test_addnext_root(self): -
1784 Element = self.etree.Element -1785 a = Element('a') -1786 b = Element('b') -1787 self.assertRaises(TypeError, a.addnext, b) -
1788 -
1789 - def test_addprevious_pi(self): -
1790 Element = self.etree.Element -1791 SubElement = self.etree.SubElement -1792 PI = self.etree.PI -1793 root = Element('root') -1794 SubElement(root, 'a') -1795 pi = PI('TARGET', 'TEXT') -1796 pi.tail = "TAIL" -1797 -1798 self.assertEqual(_bytes('<root><a></a></root>'), -1799 self._writeElement(root)) -1800 root[0].addprevious(pi) -1801 self.assertEqual(_bytes('<root><?TARGET TEXT?>TAIL<a></a></root>'), -1802 self._writeElement(root)) -
1803 -
1804 - def test_addprevious_root_pi(self): -
1805 Element = self.etree.Element -1806 PI = self.etree.PI -1807 root = Element('root') -1808 pi = PI('TARGET', 'TEXT') -1809 pi.tail = "TAIL" -1810 -1811 self.assertEqual(_bytes('<root></root>'), -1812 self._writeElement(root)) -1813 root.addprevious(pi) -1814 self.assertEqual(_bytes('<?TARGET TEXT?>\n<root></root>'), -1815 self._writeElement(root)) -
1816 -
1817 - def test_addnext_pi(self): -
1818 Element = self.etree.Element -1819 SubElement = self.etree.SubElement -1820 PI = self.etree.PI -1821 root = Element('root') -1822 SubElement(root, 'a') -1823 pi = PI('TARGET', 'TEXT') -1824 pi.tail = "TAIL" -1825 -1826 self.assertEqual(_bytes('<root><a></a></root>'), -1827 self._writeElement(root)) -1828 root[0].addnext(pi) -1829 self.assertEqual(_bytes('<root><a></a><?TARGET TEXT?>TAIL</root>'), -1830 self._writeElement(root)) -
1831 -
1832 - def test_addnext_root_pi(self): -
1833 Element = self.etree.Element -1834 PI = self.etree.PI -1835 root = Element('root') -1836 pi = PI('TARGET', 'TEXT') -1837 pi.tail = "TAIL" -1838 -1839 self.assertEqual(_bytes('<root></root>'), -1840 self._writeElement(root)) -1841 root.addnext(pi) -1842 self.assertEqual(_bytes('<root></root>\n<?TARGET TEXT?>'), -1843 self._writeElement(root)) -
1844 -
1845 - def test_addnext_comment(self): -
1846 Element = self.etree.Element -1847 SubElement = self.etree.SubElement -1848 Comment = self.etree.Comment -1849 root = Element('root') -1850 SubElement(root, 'a') -1851 comment = Comment('TEXT ') -1852 comment.tail = "TAIL" -1853 -1854 self.assertEqual(_bytes('<root><a></a></root>'), -1855 self._writeElement(root)) -1856 root[0].addnext(comment) -1857 self.assertEqual(_bytes('<root><a></a><!--TEXT -->TAIL</root>'), -1858 self._writeElement(root)) -
1859 -
1860 - def test_addnext_root_comment(self): -
1861 Element = self.etree.Element -1862 Comment = self.etree.Comment -1863 root = Element('root') -1864 comment = Comment('TEXT ') -1865 comment.tail = "TAIL" -1866 -1867 self.assertEqual(_bytes('<root></root>'), -1868 self._writeElement(root)) -1869 root.addnext(comment) -1870 self.assertEqual(_bytes('<root></root>\n<!--TEXT -->'), -1871 self._writeElement(root)) -
1872 -
1873 - def test_addprevious_comment(self): -
1874 Element = self.etree.Element -1875 SubElement = self.etree.SubElement -1876 Comment = self.etree.Comment -1877 root = Element('root') -1878 SubElement(root, 'a') -1879 comment = Comment('TEXT ') -1880 comment.tail = "TAIL" -1881 -1882 self.assertEqual(_bytes('<root><a></a></root>'), -1883 self._writeElement(root)) -1884 root[0].addprevious(comment) -1885 self.assertEqual(_bytes('<root><!--TEXT -->TAIL<a></a></root>'), -1886 self._writeElement(root)) -
1887 -
1889 Element = self.etree.Element -1890 Comment = self.etree.Comment -1891 root = Element('root') -1892 comment = Comment('TEXT ') -1893 comment.tail = "TAIL" -1894 -1895 self.assertEqual(_bytes('<root></root>'), -1896 self._writeElement(root)) -1897 root.addprevious(comment) -1898 self.assertEqual(_bytes('<!--TEXT -->\n<root></root>'), -1899 self._writeElement(root)) -
1900 -1901 # ET's Elements have items() and key(), but not values() -
1902 - def test_attribute_values(self): -
1903 XML = self.etree.XML -1904 -1905 root = XML(_bytes('<doc alpha="Alpha" beta="Beta" gamma="Gamma"/>')) -1906 values = root.values() -1907 values.sort() -1908 self.assertEqual(['Alpha', 'Beta', 'Gamma'], values) -
1909 -1910 # gives error in ElementTree -
1911 - def test_comment_empty(self): -
1912 Element = self.etree.Element -1913 Comment = self.etree.Comment -1914 -1915 a = Element('a') -1916 a.append(Comment()) -1917 self.assertEqual( -1918 _bytes('<a><!----></a>'), -1919 self._writeElement(a)) -
1920 -1921 # ElementTree ignores comments -
1922 - def test_comment_parse_empty(self): -
1923 ElementTree = self.etree.ElementTree -1924 tostring = self.etree.tostring -1925 -1926 xml = _bytes('<a><b/><!----><c/></a>') -1927 f = BytesIO(xml) -1928 doc = ElementTree(file=f) -1929 a = doc.getroot() -1930 self.assertEqual( -1931 '', -1932 a[1].text) -1933 self.assertEqual( -1934 xml, -1935 tostring(a)) -
1936 -1937 # ElementTree ignores comments -
1938 - def test_comment_no_proxy_yet(self): -
1939 ElementTree = self.etree.ElementTree -1940 -1941 f = BytesIO('<a><b></b><!-- hoi --><c></c></a>') -1942 doc = ElementTree(file=f) -1943 a = doc.getroot() -1944 self.assertEqual( -1945 ' hoi ', -1946 a[1].text) -
1947 -1948 # does not raise an exception in ElementTree -
1949 - def test_comment_immutable(self): -
1950 Element = self.etree.Element -1951 Comment = self.etree.Comment -1952 -1953 c = Comment() -1954 el = Element('myel') -1955 -1956 self.assertRaises(TypeError, c.append, el) -1957 self.assertRaises(TypeError, c.insert, 0, el) -1958 self.assertRaises(TypeError, c.set, "myattr", "test") -
1959 -
1961 c = self.etree.Comment() -1962 self.assertEqual(0, len(c.attrib)) -1963 -1964 self.assertFalse(c.attrib.__contains__('nope')) -1965 self.assertFalse('nope' in c.attrib) -1966 self.assertFalse('nope' in c.attrib.keys()) -1967 self.assertFalse('nope' in c.attrib.values()) -1968 self.assertFalse(('nope', 'huhu') in c.attrib.items()) -1969 -1970 self.assertEqual([], list(c.attrib)) -1971 self.assertEqual([], list(c.attrib.keys())) -1972 self.assertEqual([], list(c.attrib.items())) -1973 self.assertEqual([], list(c.attrib.values())) -1974 self.assertEqual([], list(c.attrib.iterkeys())) -1975 self.assertEqual([], list(c.attrib.iteritems())) -1976 self.assertEqual([], list(c.attrib.itervalues())) -1977 -1978 self.assertEqual('HUHU', c.attrib.pop('nope', 'HUHU')) -1979 self.assertRaises(KeyError, c.attrib.pop, 'nope') -1980 -1981 self.assertRaises(KeyError, c.attrib.__getitem__, 'only') -1982 self.assertRaises(KeyError, c.attrib.__getitem__, 'names') -1983 self.assertRaises(KeyError, c.attrib.__getitem__, 'nope') -1984 self.assertRaises(KeyError, c.attrib.__setitem__, 'nope', 'yep') -1985 self.assertRaises(KeyError, c.attrib.__delitem__, 'nope') -
1986 -1987 # test passing 'None' to dump() -
1988 - def test_dump_none(self): -
1989 self.assertRaises(TypeError, self.etree.dump, None) -
1990 -
1991 - def test_prefix(self): -
1992 ElementTree = self.etree.ElementTree -1993 -1994 f = BytesIO('<a xmlns:foo="http://www.infrae.com/ns/1"><foo:b/></a>') -1995 doc = ElementTree(file=f) -1996 a = doc.getroot() -1997 self.assertEqual( -1998 None, -1999 a.prefix) -2000 self.assertEqual( -2001 'foo', -2002 a[0].prefix) -
2003 -
2004 - def test_prefix_default_ns(self): -
2005 ElementTree = self.etree.ElementTree -2006 -2007 f = BytesIO('<a xmlns="http://www.infrae.com/ns/1"><b/></a>') -2008 doc = ElementTree(file=f) -2009 a = doc.getroot() -2010 self.assertEqual( -2011 None, -2012 a.prefix) -2013 self.assertEqual( -2014 None, -2015 a[0].prefix) -
2016 -
2017 - def test_getparent(self): -
2018 Element = self.etree.Element -2019 SubElement = self.etree.SubElement -2020 -2021 a = Element('a') -2022 b = SubElement(a, 'b') -2023 c = SubElement(a, 'c') -2024 d = SubElement(b, 'd') -2025 self.assertEqual( -2026 None, -2027 a.getparent()) -2028 self.assertEqual( -2029 a, -2030 b.getparent()) -2031 self.assertEqual( -2032 b.getparent(), -2033 c.getparent()) -2034 self.assertEqual( -2035 b, -2036 d.getparent()) -
2037 -
2038 - def test_iterchildren(self): -
2039 XML = self.etree.XML -2040 -2041 root = XML(_bytes('<doc><one/><two>Two</two>Hm<three/></doc>')) -2042 result = [] -2043 for el in root.iterchildren(): -2044 result.append(el.tag) -2045 self.assertEqual(['one', 'two', 'three'], result) -
2046 -
2047 - def test_iterchildren_reversed(self): -
2048 XML = self.etree.XML -2049 -2050 root = XML(_bytes('<doc><one/><two>Two</two>Hm<three/></doc>')) -2051 result = [] -2052 for el in root.iterchildren(reversed=True): -2053 result.append(el.tag) -2054 self.assertEqual(['three', 'two', 'one'], result) -
2055 -
2056 - def test_iterchildren_tag(self): -
2057 XML = self.etree.XML -2058 -2059 root = XML(_bytes('<doc><one/><two>Two</two>Hm<two>Bla</two></doc>')) -2060 result = [] -2061 for el in root.iterchildren(tag='two'): -2062 result.append(el.text) -2063 self.assertEqual(['Two', 'Bla'], result) -
2064 -
2066 XML = self.etree.XML -2067 -2068 root = XML(_bytes('<doc><one/><two>Two</two>Hm<two>Bla</two></doc>')) -2069 result = [] -2070 for el in root.iterchildren('two'): -2071 result.append(el.text) -2072 self.assertEqual(['Two', 'Bla'], result) -
2073 -
2075 XML = self.etree.XML -2076 -2077 root = XML(_bytes('<doc><one/><two>Two</two>Hm<two>Bla</two></doc>')) -2078 result = [] -2079 for el in root.iterchildren(reversed=True, tag='two'): -2080 result.append(el.text) -2081 self.assertEqual(['Bla', 'Two'], result) -
2082 -
2084 XML = self.etree.XML -2085 -2086 root = XML(_bytes('<doc><one/><two>Two</two>Hm<two>Bla</two><three/></doc>')) -2087 result = [] -2088 for el in root.iterchildren(tag=['two', 'three']): -2089 result.append(el.text) -2090 self.assertEqual(['Two', 'Bla', None], result) -
2091 -
2093 XML = self.etree.XML -2094 -2095 root = XML(_bytes('<doc><one/><two>Two</two>Hm<two>Bla</two><three/></doc>')) -2096 result = [] -2097 for el in root.iterchildren('two', 'three'): -2098 result.append(el.text) -2099 self.assertEqual(['Two', 'Bla', None], result) -
2100 -
2102 XML = self.etree.XML -2103 -2104 root = XML(_bytes('<doc><one/><two>Two</two>Hm<two>Bla</two><three/></doc>')) -2105 result = [] -2106 for el in root.iterchildren(reversed=True, tag=['two', 'three']): -2107 result.append(el.text) -2108 self.assertEqual([None, 'Bla', 'Two'], result) -
2109 -
2110 - def test_iterancestors(self): -
2111 Element = self.etree.Element -2112 SubElement = self.etree.SubElement -2113 -2114 a = Element('a') -2115 b = SubElement(a, 'b') -2116 c = SubElement(a, 'c') -2117 d = SubElement(b, 'd') -2118 self.assertEqual( -2119 [], -2120 list(a.iterancestors())) -2121 self.assertEqual( -2122 [a], -2123 list(b.iterancestors())) -2124 self.assertEqual( -2125 [a], -2126 list(c.iterancestors())) -2127 self.assertEqual( -2128 [b, a], -2129 list(d.iterancestors())) -
2130 -
2131 - def test_iterancestors_tag(self): -
2132 Element = self.etree.Element -2133 SubElement = self.etree.SubElement -2134 -2135 a = Element('a') -2136 b = SubElement(a, 'b') -2137 c = SubElement(a, 'c') -2138 d = SubElement(b, 'd') -2139 self.assertEqual( -2140 [a], -2141 list(d.iterancestors('a'))) -2142 self.assertEqual( -2143 [a], -2144 list(d.iterancestors(tag='a'))) -2145 -2146 self.assertEqual( -2147 [b, a], -2148 list(d.iterancestors('*'))) -2149 self.assertEqual( -2150 [b, a], -2151 list(d.iterancestors(tag='*'))) -
2152 -
2154 Element = self.etree.Element -2155 SubElement = self.etree.SubElement -2156 -2157 a = Element('a') -2158 b = SubElement(a, 'b') -2159 c = SubElement(a, 'c') -2160 d = SubElement(b, 'd') -2161 self.assertEqual( -2162 [b, a], -2163 list(d.iterancestors(tag=('a', 'b')))) -2164 self.assertEqual( -2165 [b, a], -2166 list(d.iterancestors('a', 'b'))) -2167 -2168 self.assertEqual( -2169 [], -2170 list(d.iterancestors(tag=('w', 'x', 'y', 'z')))) -2171 self.assertEqual( -2172 [], -2173 list(d.iterancestors('w', 'x', 'y', 'z'))) -2174 -2175 self.assertEqual( -2176 [], -2177 list(d.iterancestors(tag=('d', 'x')))) -2178 self.assertEqual( -2179 [], -2180 list(d.iterancestors('d', 'x'))) -2181 -2182 self.assertEqual( -2183 [b, a], -2184 list(d.iterancestors(tag=('b', '*')))) -2185 self.assertEqual( -2186 [b, a], -2187 list(d.iterancestors('b', '*'))) -2188 -2189 self.assertEqual( -2190 [b], -2191 list(d.iterancestors(tag=('b', 'c')))) -2192 self.assertEqual( -2193 [b], -2194 list(d.iterancestors('b', 'c'))) -
2195 -
2196 - def test_iterdescendants(self): -
2197 Element = self.etree.Element -2198 SubElement = self.etree.SubElement -2199 -2200 a = Element('a') -2201 b = SubElement(a, 'b') -2202 c = SubElement(a, 'c') -2203 d = SubElement(b, 'd') -2204 e = SubElement(c, 'e') -2205 -2206 self.assertEqual( -2207 [b, d, c, e], -2208 list(a.iterdescendants())) -2209 self.assertEqual( -2210 [], -2211 list(d.iterdescendants())) -
2212 -
2213 - def test_iterdescendants_tag(self): -
2214 Element = self.etree.Element -2215 SubElement = self.etree.SubElement -2216 -2217 a = Element('a') -2218 b = SubElement(a, 'b') -2219 c = SubElement(a, 'c') -2220 d = SubElement(b, 'd') -2221 e = SubElement(c, 'e') -2222 -2223 self.assertEqual( -2224 [], -2225 list(a.iterdescendants('a'))) -2226 self.assertEqual( -2227 [], -2228 list(a.iterdescendants(tag='a'))) -2229 -2230 a2 = SubElement(e, 'a') -2231 self.assertEqual( -2232 [a2], -2233 list(a.iterdescendants('a'))) -2234 -2235 self.assertEqual( -2236 [a2], -2237 list(c.iterdescendants('a'))) -2238 self.assertEqual( -2239 [a2], -2240 list(c.iterdescendants(tag='a'))) -
2241 -
2243 Element = self.etree.Element -2244 SubElement = self.etree.SubElement -2245 -2246 a = Element('a') -2247 b = SubElement(a, 'b') -2248 c = SubElement(a, 'c') -2249 d = SubElement(b, 'd') -2250 e = SubElement(c, 'e') -2251 -2252 self.assertEqual( -2253 [b, e], -2254 list(a.iterdescendants(tag=('a', 'b', 'e')))) -2255 self.assertEqual( -2256 [b, e], -2257 list(a.iterdescendants('a', 'b', 'e'))) -2258 -2259 a2 = SubElement(e, 'a') -2260 self.assertEqual( -2261 [b, a2], -2262 list(a.iterdescendants(tag=('a', 'b')))) -2263 self.assertEqual( -2264 [b, a2], -2265 list(a.iterdescendants('a', 'b'))) -2266 -2267 self.assertEqual( -2268 [], -2269 list(c.iterdescendants(tag=('x', 'y', 'z')))) -2270 self.assertEqual( -2271 [], -2272 list(c.iterdescendants('x', 'y', 'z'))) -2273 -2274 self.assertEqual( -2275 [b, d, c, e, a2], -2276 list(a.iterdescendants(tag=('x', 'y', 'z', '*')))) -2277 self.assertEqual( -2278 [b, d, c, e, a2], -2279 list(a.iterdescendants('x', 'y', 'z', '*'))) -
2280 -
2281 - def test_getroottree(self): -
2282 Element = self.etree.Element -2283 SubElement = self.etree.SubElement -2284 -2285 a = Element('a') -2286 b = SubElement(a, 'b') -2287 c = SubElement(a, 'c') -2288 d = SubElement(b, 'd') -2289 self.assertEqual( -2290 a, -2291 a.getroottree().getroot()) -2292 self.assertEqual( -2293 a, -2294 b.getroottree().getroot()) -2295 self.assertEqual( -2296 a, -2297 d.getroottree().getroot()) -
2298 -
2299 - def test_getnext(self): -
2300 Element = self.etree.Element -2301 SubElement = self.etree.SubElement -2302 -2303 a = Element('a') -2304 b = SubElement(a, 'b') -2305 c = SubElement(a, 'c') -2306 self.assertEqual( -2307 None, -2308 a.getnext()) -2309 self.assertEqual( -2310 c, -2311 b.getnext()) -2312 self.assertEqual( -2313 None, -2314 c.getnext()) -
2315 -
2316 - def test_getprevious(self): -
2317 Element = self.etree.Element -2318 SubElement = self.etree.SubElement -2319 -2320 a = Element('a') -2321 b = SubElement(a, 'b') -2322 c = SubElement(a, 'c') -2323 d = SubElement(b, 'd') -2324 self.assertEqual( -2325 None, -2326 a.getprevious()) -2327 self.assertEqual( -2328 b, -2329 c.getprevious()) -2330 self.assertEqual( -2331 None, -2332 b.getprevious()) -
2333 -
2334 - def test_itersiblings(self): -
2335 Element = self.etree.Element -2336 SubElement = self.etree.SubElement -2337 -2338 a = Element('a') -2339 b = SubElement(a, 'b') -2340 c = SubElement(a, 'c') -2341 d = SubElement(b, 'd') -2342 self.assertEqual( -2343 [], -2344 list(a.itersiblings())) -2345 self.assertEqual( -2346 [c], -2347 list(b.itersiblings())) -2348 self.assertEqual( -2349 [], -2350 list(c.itersiblings())) -2351 self.assertEqual( -2352 [b], -2353 list(c.itersiblings(preceding=True))) -2354 self.assertEqual( -2355 [], -2356 list(b.itersiblings(preceding=True))) -
2357 -
2358 - def test_itersiblings_tag(self): -
2359 Element = self.etree.Element -2360 SubElement = self.etree.SubElement -2361 -2362 a = Element('a') -2363 b = SubElement(a, 'b') -2364 c = SubElement(a, 'c') -2365 d = SubElement(b, 'd') -2366 self.assertEqual( -2367 [], -2368 list(a.itersiblings(tag='XXX'))) -2369 self.assertEqual( -2370 [c], -2371 list(b.itersiblings(tag='c'))) -2372 self.assertEqual( -2373 [c], -2374 list(b.itersiblings(tag='*'))) -2375 self.assertEqual( -2376 [b], -2377 list(c.itersiblings(preceding=True, tag='b'))) -2378 self.assertEqual( -2379 [], -2380 list(c.itersiblings(preceding=True, tag='c'))) -
2381 -
2383 Element = self.etree.Element -2384 SubElement = self.etree.SubElement -2385 -2386 a = Element('a') -2387 b = SubElement(a, 'b') -2388 c = SubElement(a, 'c') -2389 d = SubElement(b, 'd') -2390 e = SubElement(a, 'e') -2391 self.assertEqual( -2392 [], -2393 list(a.itersiblings(tag=('XXX', 'YYY')))) -2394 self.assertEqual( -2395 [c, e], -2396 list(b.itersiblings(tag=('c', 'd', 'e')))) -2397 self.assertEqual( -2398 [b], -2399 list(c.itersiblings(preceding=True, tag=('b', 'b', 'c', 'd')))) -2400 self.assertEqual( -2401 [c, b], -2402 list(e.itersiblings(preceding=True, tag=('c', '*')))) -
2403 -
2404 - def test_parseid(self): -
2405 parseid = self.etree.parseid -2406 XML = self.etree.XML -2407 xml_text = _bytes(''' -2408 <!DOCTYPE document [ -2409 <!ELEMENT document (h1,p)*> -2410 <!ELEMENT h1 (#PCDATA)> -2411 <!ATTLIST h1 myid ID #REQUIRED> -2412 <!ELEMENT p (#PCDATA)> -2413 <!ATTLIST p someid ID #REQUIRED> -2414 ]> -2415 <document> -2416 <h1 myid="chapter1">...</h1> -2417 <p id="note1" class="note">...</p> -2418 <p>Regular paragraph.</p> -2419 <p xml:id="xmlid">XML:ID paragraph.</p> -2420 <p someid="warn1" class="warning">...</p> -2421 </document> -2422 ''') -2423 -2424 tree, dic = parseid(BytesIO(xml_text)) -2425 root = tree.getroot() -2426 root2 = XML(xml_text) -2427 self.assertEqual(self._writeElement(root), -2428 self._writeElement(root2)) -2429 expected = { -2430 "chapter1" : root[0], -2431 "xmlid" : root[3], -2432 "warn1" : root[4] -2433 } -2434 self.assertTrue("chapter1" in dic) -2435 self.assertTrue("warn1" in dic) -2436 self.assertTrue("xmlid" in dic) -2437 self._checkIDDict(dic, expected) -
2438 -
2439 - def test_XMLDTDID(self): -
2440 XMLDTDID = self.etree.XMLDTDID -2441 XML = self.etree.XML -2442 xml_text = _bytes(''' -2443 <!DOCTYPE document [ -2444 <!ELEMENT document (h1,p)*> -2445 <!ELEMENT h1 (#PCDATA)> -2446 <!ATTLIST h1 myid ID #REQUIRED> -2447 <!ELEMENT p (#PCDATA)> -2448 <!ATTLIST p someid ID #REQUIRED> -2449 ]> -2450 <document> -2451 <h1 myid="chapter1">...</h1> -2452 <p id="note1" class="note">...</p> -2453 <p>Regular paragraph.</p> -2454 <p xml:id="xmlid">XML:ID paragraph.</p> -2455 <p someid="warn1" class="warning">...</p> -2456 </document> -2457 ''') -2458 -2459 root, dic = XMLDTDID(xml_text) -2460 root2 = XML(xml_text) -2461 self.assertEqual(self._writeElement(root), -2462 self._writeElement(root2)) -2463 expected = { -2464 "chapter1" : root[0], -2465 "xmlid" : root[3], -2466 "warn1" : root[4] -2467 } -2468 self.assertTrue("chapter1" in dic) -2469 self.assertTrue("warn1" in dic) -2470 self.assertTrue("xmlid" in dic) -2471 self._checkIDDict(dic, expected) -
2472 -
2473 - def test_XMLDTDID_empty(self): -
2474 XMLDTDID = self.etree.XMLDTDID -2475 XML = self.etree.XML -2476 xml_text = _bytes(''' -2477 <document> -2478 <h1 myid="chapter1">...</h1> -2479 <p id="note1" class="note">...</p> -2480 <p>Regular paragraph.</p> -2481 <p someid="warn1" class="warning">...</p> -2482 </document> -2483 ''') -2484 -2485 root, dic = XMLDTDID(xml_text) -2486 root2 = XML(xml_text) -2487 self.assertEqual(self._writeElement(root), -2488 self._writeElement(root2)) -2489 expected = {} -2490 self._checkIDDict(dic, expected) -
2491 -
2492 - def test_XMLDTDID_no_id_dict(self): -
2493 XMLDTDID = self.etree.XMLDTDID -2494 XML = self.etree.XML -2495 xml_text = _bytes(''' -2496 <!DOCTYPE document [ -2497 <!ELEMENT document (h1,p)*> -2498 <!ELEMENT h1 (#PCDATA)> -2499 <!ATTLIST h1 myid ID #REQUIRED> -2500 <!ELEMENT p (#PCDATA)> -2501 <!ATTLIST p someid ID #REQUIRED> -2502 ]> -2503 <document> -2504 <h1 myid="chapter1">...</h1> -2505 <p id="note1" class="note">...</p> -2506 <p>Regular paragraph.</p> -2507 <p xml:id="xmlid">XML:ID paragraph.</p> -2508 <p someid="warn1" class="warning">...</p> -2509 </document> -2510 ''') -2511 -2512 parser = etree.XMLParser(collect_ids=False) -2513 root, dic = XMLDTDID(xml_text, parser=parser) -2514 root2 = XML(xml_text) -2515 self.assertEqual(self._writeElement(root), -2516 self._writeElement(root2)) -2517 self.assertFalse(dic) -2518 self._checkIDDict(dic, {}) -
2519 -
2520 - def _checkIDDict(self, dic, expected): -
2521 self.assertEqual(len(dic), -2522 len(expected)) -2523 self.assertEqual(sorted(dic.items()), -2524 sorted(expected.items())) -2525 if sys.version_info < (3,): -2526 self.assertEqual(sorted(dic.iteritems()), -2527 sorted(expected.iteritems())) -2528 self.assertEqual(sorted(dic.keys()), -2529 sorted(expected.keys())) -2530 if sys.version_info < (3,): -2531 self.assertEqual(sorted(dic.iterkeys()), -2532 sorted(expected.iterkeys())) -2533 if sys.version_info < (3,): -2534 self.assertEqual(sorted(dic.values()), -2535 sorted(expected.values())) -2536 self.assertEqual(sorted(dic.itervalues()), -2537 sorted(expected.itervalues())) -
2538 -
2539 - def test_namespaces(self): -
2540 etree = self.etree -2541 -2542 r = {'foo': 'http://ns.infrae.com/foo'} -2543 e = etree.Element('{http://ns.infrae.com/foo}bar', nsmap=r) -2544 self.assertEqual( -2545 'foo', -2546 e.prefix) -2547 self.assertEqual( -2548 _bytes('<foo:bar xmlns:foo="http://ns.infrae.com/foo"></foo:bar>'), -2549 self._writeElement(e)) -
2550 -
2551 - def test_namespaces_default(self): -
2552 etree = self.etree -2553 -2554 r = {None: 'http://ns.infrae.com/foo'} -2555 e = etree.Element('{http://ns.infrae.com/foo}bar', nsmap=r) -2556 self.assertEqual( -2557 None, -2558 e.prefix) -2559 self.assertEqual( -2560 '{http://ns.infrae.com/foo}bar', -2561 e.tag) -2562 self.assertEqual( -2563 _bytes('<bar xmlns="http://ns.infrae.com/foo"></bar>'), -2564 self._writeElement(e)) -
2565 -
2567 etree = self.etree -2568 -2569 r = {None: 'http://ns.infrae.com/foo', 'p': 'http://test/'} -2570 e = etree.Element('{http://ns.infrae.com/foo}bar', nsmap=r) -2571 self.assertEqual(None, e.prefix) -2572 self.assertEqual('{http://ns.infrae.com/foo}bar', e.tag) -2573 self.assertEqual( -2574 _bytes('<bar xmlns="http://ns.infrae.com/foo" xmlns:p="http://test/"></bar>'), -2575 self._writeElement(e)) -
2576 -
2578 etree = self.etree -2579 -2580 r = {None: 'http://ns.infrae.com/foo', -2581 'hoi': 'http://ns.infrae.com/hoi'} -2582 e = etree.Element('{http://ns.infrae.com/foo}bar', nsmap=r) -2583 e.set('{http://ns.infrae.com/hoi}test', 'value') -2584 self.assertEqual( -2585 _bytes('<bar xmlns="http://ns.infrae.com/foo" xmlns:hoi="http://ns.infrae.com/hoi" hoi:test="value"></bar>'), -2586 self._writeElement(e)) -
2587 -
2589 etree = self.etree -2590 -2591 root = etree.Element('{http://test/ns}root', -2592 nsmap={None: 'http://test/ns'}) -2593 sub = etree.Element('{http://test/ns}sub', -2594 nsmap={'test': 'http://test/ns'}) -2595 -2596 sub.attrib['{http://test/ns}attr'] = 'value' -2597 self.assertEqual(sub.attrib['{http://test/ns}attr'], 'value') -2598 self.assertEqual( -2599 _bytes('<test:sub xmlns:test="http://test/ns" test:attr="value"/>'), -2600 etree.tostring(sub)) -2601 -2602 root.append(sub) -2603 self.assertEqual( -2604 _bytes('<root xmlns="http://test/ns">' -2605 '<sub xmlns:test="http://test/ns" test:attr="value"/>' -2606 '</root>'), -2607 etree.tostring(root)) -
2608 -
2610 etree = self.etree -2611 -2612 root = etree.Element('root') -2613 sub = etree.Element('{http://test/ns}sub', -2614 nsmap={'test': 'http://test/ns'}) -2615 -2616 sub.attrib['{http://test/ns}attr'] = 'value' -2617 self.assertEqual(sub.attrib['{http://test/ns}attr'], 'value') -2618 self.assertEqual( -2619 _bytes('<test:sub xmlns:test="http://test/ns" test:attr="value"/>'), -2620 etree.tostring(sub)) -2621 -2622 root.append(sub) -2623 self.assertEqual( -2624 _bytes('<root>' -2625 '<test:sub xmlns:test="http://test/ns" test:attr="value"/>' -2626 '</root>'), -2627 etree.tostring(root)) -
2628 -
2630 etree = self.etree -2631 -2632 root = etree.Element('root') -2633 sub = etree.Element('{http://test/ns}sub', -2634 nsmap={None: 'http://test/ns'}) -2635 -2636 sub.attrib['{http://test/ns}attr'] = 'value' -2637 self.assertEqual(sub.attrib['{http://test/ns}attr'], 'value') -2638 self.assertEqual( -2639 _bytes('<sub xmlns="http://test/ns" ' -2640 'xmlns:ns0="http://test/ns" ns0:attr="value"/>'), -2641 etree.tostring(sub)) -2642 -2643 root.append(sub) -2644 self.assertEqual( -2645 _bytes('<root>' -2646 '<sub xmlns="http://test/ns"' -2647 ' xmlns:ns0="http://test/ns" ns0:attr="value"/>' -2648 '</root>'), -2649 etree.tostring(root)) -
2650 -
2652 etree = self.etree -2653 -2654 root = etree.Element('{http://test/ns}root', -2655 nsmap={'test': 'http://test/ns', -2656 None: 'http://test/ns'}) -2657 sub = etree.Element('{http://test/ns}sub', -2658 nsmap={None: 'http://test/ns'}) -2659 -2660 sub.attrib['{http://test/ns}attr'] = 'value' -2661 self.assertEqual(sub.attrib['{http://test/ns}attr'], 'value') -2662 self.assertEqual( -2663 _bytes('<sub xmlns="http://test/ns" ' -2664 'xmlns:ns0="http://test/ns" ns0:attr="value"/>'), -2665 etree.tostring(sub)) -2666 -2667 root.append(sub) -2668 self.assertEqual( -2669 _bytes('<test:root xmlns:test="http://test/ns" xmlns="http://test/ns">' -2670 '<test:sub test:attr="value"/>' -2671 '</test:root>'), -2672 etree.tostring(root)) -
2673 -
2674 - def test_namespaces_elementtree(self): -
2675 etree = self.etree -2676 r = {None: 'http://ns.infrae.com/foo', -2677 'hoi': 'http://ns.infrae.com/hoi'} -2678 e = etree.Element('{http://ns.infrae.com/foo}z', nsmap=r) -2679 tree = etree.ElementTree(element=e) -2680 etree.SubElement(e, '{http://ns.infrae.com/hoi}x') -2681 self.assertEqual( -2682 _bytes('<z xmlns="http://ns.infrae.com/foo" xmlns:hoi="http://ns.infrae.com/hoi"><hoi:x></hoi:x></z>'), -2683 self._writeElement(e)) -
2684 -
2686 etree = self.etree -2687 -2688 r = {None: 'http://ns.infrae.com/foo'} -2689 e1 = etree.Element('{http://ns.infrae.com/foo}bar', nsmap=r) -2690 e2 = etree.Element('{http://ns.infrae.com/foo}bar', nsmap=r) -2691 -2692 e1.append(e2) -2693 -2694 self.assertEqual( -2695 None, -2696 e1.prefix) -2697 self.assertEqual( -2698 None, -2699 e1[0].prefix) -2700 self.assertEqual( -2701 '{http://ns.infrae.com/foo}bar', -2702 e1.tag) -2703 self.assertEqual( -2704 '{http://ns.infrae.com/foo}bar', -2705 e1[0].tag) -
2706 -
2708 etree = self.etree -2709 -2710 r = {None: 'http://ns.infrae.com/BAR'} -2711 e1 = etree.Element('{http://ns.infrae.com/BAR}bar', nsmap=r) -2712 e2 = etree.Element('{http://ns.infrae.com/foo}bar', nsmap=r) -2713 -2714 e1.append(e2) -2715 -2716 self.assertEqual( -2717 None, -2718 e1.prefix) -2719 self.assertNotEqual( -2720 None, -2721 e2.prefix) -2722 self.assertEqual( -2723 '{http://ns.infrae.com/BAR}bar', -2724 e1.tag) -2725 self.assertEqual( -2726 '{http://ns.infrae.com/foo}bar', -2727 e2.tag) -
2728 -
2730 ns_href = "http://a.b.c" -2731 one = self.etree.fromstring( -2732 _bytes('<foo><bar xmlns:ns="%s"><ns:baz/></bar></foo>' % ns_href)) -2733 baz = one[0][0] -2734 -2735 two = self.etree.fromstring( -2736 _bytes('<root xmlns:ns="%s"/>' % ns_href)) -2737 two.append(baz) -2738 del one # make sure the source document is deallocated -2739 -2740 self.assertEqual('{%s}baz' % ns_href, baz.tag) -2741 self.assertEqual( -2742 _bytes('<root xmlns:ns="%s"><ns:baz/></root>' % ns_href), -2743 self.etree.tostring(two)) -
2744 -
2745 - def test_namespace_cleanup(self): -
2746 xml = _bytes( -2747 '<foo xmlns="F" xmlns:x="x">' -2748 '<bar xmlns:ns="NS" xmlns:b="b" xmlns="B">' -2749 '<ns:baz/>' -2750 '</bar></foo>' -2751 ) -2752 root = self.etree.fromstring(xml) -2753 self.assertEqual(xml, self.etree.tostring(root)) -2754 self.etree.cleanup_namespaces(root) -2755 self.assertEqual( -2756 _bytes('<foo xmlns="F"><bar xmlns:ns="NS" xmlns="B"><ns:baz/></bar></foo>'), -2757 self.etree.tostring(root)) -
2758 -
2760 xml = _bytes( -2761 '<foo xmlns="F" xmlns:x="X" xmlns:a="A">' -2762 '<bar xmlns:ns="NS" xmlns:b="b" xmlns="B">' -2763 '<ns:baz a:test="attr"/>' -2764 '</bar></foo>' -2765 ) -2766 root = self.etree.fromstring(xml) -2767 self.assertEqual(xml, self.etree.tostring(root)) -2768 self.etree.cleanup_namespaces(root) -2769 self.assertEqual( -2770 _bytes('<foo xmlns="F" xmlns:a="A">' -2771 '<bar xmlns:ns="NS" xmlns="B">' -2772 '<ns:baz a:test="attr"/>' -2773 '</bar></foo>'), -2774 self.etree.tostring(root)) -
2775 -
2776 - def test_namespace_cleanup_many(self): -
2777 xml = ('<n12:foo ' + -2778 ' '.join('xmlns:n{n}="NS{n}"'.format(n=i) for i in range(100)) + -2779 '><n68:a/></n12:foo>').encode('utf8') -2780 root = self.etree.fromstring(xml) -2781 self.assertEqual(xml, self.etree.tostring(root)) -2782 self.etree.cleanup_namespaces(root) -2783 self.assertEqual( -2784 b'<n12:foo xmlns:n12="NS12" xmlns:n68="NS68"><n68:a/></n12:foo>', -2785 self.etree.tostring(root)) -
2786 -
2787 - def test_namespace_cleanup_deep(self): -
2788 xml = ('<root>' + -2789 ''.join('<a xmlns:n{n}="NS{n}">'.format(n=i) for i in range(100)) + -2790 '<n64:x/>' + '</a>'*100 + '</root>').encode('utf8') -2791 root = self.etree.fromstring(xml) -2792 self.assertEqual(xml, self.etree.tostring(root)) -2793 self.etree.cleanup_namespaces(root) -2794 self.assertEqual( -2795 b'<root>' + b'<a>'*64 + b'<a xmlns:n64="NS64">' + b'<a>'*35 + -2796 b'<n64:x/>' + b'</a>'*100 + b'</root>', -2797 self.etree.tostring(root)) -
2798 -
2800 xml = ('<root>' + -2801 ''.join('<a xmlns:n{n}="NS{n}">'.format(n=i) for i in range(100)) + -2802 '<n64:x xmlns:a="A" a:attr="X"/>' + -2803 '</a>'*100 + -2804 '</root>').encode('utf8') -2805 root = self.etree.fromstring(xml) -2806 self.assertEqual(xml, self.etree.tostring(root)) -2807 self.etree.cleanup_namespaces(root, top_nsmap={'n64': 'NS64'}) -2808 self.assertEqual( -2809 b'<root xmlns:n64="NS64">' + b'<a>'*100 + -2810 b'<n64:x xmlns:a="A" a:attr="X"/>' + b'</a>'*100 + b'</root>', -2811 self.etree.tostring(root)) -
2812 -
2814 xml = ('<root xmlns:n64="NS64" xmlns:foo="FOO" xmlns:unused1="UNUSED" xmlns:no="NO">' -2815 '<a xmlns:unused2="UNUSED"><n64:x xmlns:a="A" a:attr="X"/></a>' -2816 '<foo>foo:bar</foo>' -2817 '</root>').encode('utf8') -2818 root = self.etree.fromstring(xml) -2819 self.assertEqual(xml, self.etree.tostring(root)) -2820 self.etree.cleanup_namespaces(root, keep_ns_prefixes=['foo']) -2821 self.assertEqual( -2822 b'<root xmlns:n64="NS64" xmlns:foo="FOO">' -2823 b'<a><n64:x xmlns:a="A" a:attr="X"/></a>' -2824 b'<foo>foo:bar</foo>' -2825 b'</root>', -2826 self.etree.tostring(root)) -
2827 -
2829 xml = ('<root xmlns:n64="NS64" xmlns:unused1="UNUSED" xmlns:no="NO">' -2830 '<sub xmlns:foo="FOO">' -2831 '<a xmlns:unused2="UNUSED"><n64:x xmlns:a="A" a:attr="X"/></a>' -2832 '<foo>foo:bar</foo>' -2833 '</sub>' -2834 '</root>').encode('utf8') -2835 root = self.etree.fromstring(xml) -2836 self.assertEqual(xml, self.etree.tostring(root)) -2837 self.etree.cleanup_namespaces( -2838 root, -2839 top_nsmap={'foo': 'FOO', 'unused1': 'UNUSED'}, -2840 keep_ns_prefixes=['foo']) -2841 self.assertEqual( -2842 b'<root xmlns:n64="NS64" xmlns:foo="FOO">' -2843 b'<sub>' -2844 b'<a><n64:x xmlns:a="A" a:attr="X"/></a>' -2845 b'<foo>foo:bar</foo>' -2846 b'</sub>' -2847 b'</root>', -2848 self.etree.tostring(root)) -
2849 -
2850 - def test_element_nsmap(self): -
2851 etree = self.etree -2852 -2853 r = {None: 'http://ns.infrae.com/foo', -2854 'hoi': 'http://ns.infrae.com/hoi'} -2855 e = etree.Element('{http://ns.infrae.com/foo}bar', nsmap=r) -2856 self.assertEqual( -2857 r, -2858 e.nsmap) -
2859 -
2860 - def test_subelement_nsmap(self): -
2861 etree = self.etree -2862 -2863 re = {None: 'http://ns.infrae.com/foo', -2864 'hoi': 'http://ns.infrae.com/hoi'} -2865 e = etree.Element('{http://ns.infrae.com/foo}bar', nsmap=re) -2866 -2867 rs = {None: 'http://ns.infrae.com/honk', -2868 'top': 'http://ns.infrae.com/top'} -2869 s = etree.SubElement(e, '{http://ns.infrae.com/honk}bar', nsmap=rs) -2870 -2871 r = re.copy() -2872 r.update(rs) -2873 self.assertEqual(re, e.nsmap) -2874 self.assertEqual(r, s.nsmap) -
2875 -
2876 - def test_html_prefix_nsmap(self): -
2877 etree = self.etree -2878 el = etree.HTML('<hha:page-description>aa</hha:page-description>').find('.//page-description') -2879 self.assertEqual({'hha': None}, el.nsmap) -
2880 -
2882 Element = self.etree.Element -2883 SubElement = self.etree.SubElement -2884 -2885 a = Element('a') -2886 b = SubElement(a, 'b') -2887 c = SubElement(a, 'c') -2888 d = SubElement(b, 'd') -2889 e = SubElement(c, 'e') -2890 f = SubElement(c, 'f') -2891 -2892 self.assertEqual( -2893 [a, b], -2894 list(a.getiterator('a', 'b'))) -2895 self.assertEqual( -2896 [], -2897 list(a.getiterator('x', 'y'))) -2898 self.assertEqual( -2899 [a, f], -2900 list(a.getiterator('f', 'a'))) -2901 self.assertEqual( -2902 [c, e, f], -2903 list(c.getiterator('c', '*', 'a'))) -2904 self.assertEqual( -2905 [], -2906 list(a.getiterator( (), () ))) -
2907 -
2909 Element = self.etree.Element -2910 SubElement = self.etree.SubElement -2911 -2912 a = Element('a') -2913 b = SubElement(a, 'b') -2914 c = SubElement(a, 'c') -2915 d = SubElement(b, 'd') -2916 e = SubElement(c, 'e') -2917 f = SubElement(c, 'f') -2918 -2919 self.assertEqual( -2920 [a, b], -2921 list(a.getiterator( ('a', 'b') ))) -2922 self.assertEqual( -2923 [], -2924 list(a.getiterator( ('x', 'y') ))) -2925 self.assertEqual( -2926 [a, f], -2927 list(a.getiterator( ('f', 'a') ))) -2928 self.assertEqual( -2929 [c, e, f], -2930 list(c.getiterator( ('c', '*', 'a') ))) -2931 self.assertEqual( -2932 [], -2933 list(a.getiterator( () ))) -
2934 -
2936 Element = self.etree.Element -2937 SubElement = self.etree.SubElement -2938 -2939 a = Element('{a}a') -2940 b = SubElement(a, '{a}b') -2941 c = SubElement(a, '{a}c') -2942 d = SubElement(b, '{b}d') -2943 e = SubElement(c, '{a}e') -2944 f = SubElement(c, '{b}f') -2945 g = SubElement(c, 'g') -2946 -2947 self.assertEqual( -2948 [a], -2949 list(a.getiterator('{a}a'))) -2950 self.assertEqual( -2951 [], -2952 list(a.getiterator('{b}a'))) -2953 self.assertEqual( -2954 [], -2955 list(a.getiterator('a'))) -2956 self.assertEqual( -2957 [a,b,d,c,e,f,g], -2958 list(a.getiterator('*'))) -2959 self.assertEqual( -2960 [f], -2961 list(c.getiterator('{b}*'))) -2962 self.assertEqual( -2963 [d, f], -2964 list(a.getiterator('{b}*'))) -2965 self.assertEqual( -2966 [g], -2967 list(a.getiterator('g'))) -2968 self.assertEqual( -2969 [g], -2970 list(a.getiterator('{}g'))) -2971 self.assertEqual( -2972 [g], -2973 list(a.getiterator('{}*'))) -
2974 -
2976 Element = self.etree.Element -2977 SubElement = self.etree.SubElement -2978 -2979 a = Element('{a}a') -2980 b = SubElement(a, '{nsA}b') -2981 c = SubElement(b, '{nsB}b') -2982 d = SubElement(a, 'b') -2983 e = SubElement(a, '{nsA}e') -2984 f = SubElement(e, '{nsB}e') -2985 g = SubElement(e, 'e') -2986 -2987 self.assertEqual( -2988 [b, c, d], -2989 list(a.getiterator('{*}b'))) -2990 self.assertEqual( -2991 [e, f, g], -2992 list(a.getiterator('{*}e'))) -2993 self.assertEqual( -2994 [a, b, c, d, e, f, g], -2995 list(a.getiterator('{*}*'))) -
2996 -
2998 Element = self.etree.Element -2999 Entity = self.etree.Entity -3000 SubElement = self.etree.SubElement -3001 -3002 a = Element('a') -3003 b = SubElement(a, 'b') -3004 entity_b = Entity("TEST-b") -3005 b.append(entity_b) -3006 -3007 self.assertEqual( -3008 [entity_b], -3009 list(a.getiterator(Entity))) -3010 -3011 entity_a = Entity("TEST-a") -3012 a.append(entity_a) -3013 -3014 self.assertEqual( -3015 [entity_b, entity_a], -3016 list(a.getiterator(Entity))) -3017 -3018 self.assertEqual( -3019 [entity_b], -3020 list(b.getiterator(Entity))) -
3021 -
3023 Element = self.etree.Element -3024 Comment = self.etree.Comment -3025 PI = self.etree.PI -3026 SubElement = self.etree.SubElement -3027 -3028 a = Element('a') -3029 b = SubElement(a, 'b') -3030 a.append(Comment("test")) -3031 a.append(PI("pi", "content")) -3032 c = SubElement(a, 'c') -3033 -3034 self.assertEqual( -3035 [a, b, c], -3036 list(a.getiterator(Element))) -
3037 -
3039 # ElementTree iterates over everything here -3040 Element = self.etree.Element -3041 Comment = self.etree.Comment -3042 PI = self.etree.PI -3043 SubElement = self.etree.SubElement -3044 -3045 a = Element('a') -3046 b = SubElement(a, 'b') -3047 a.append(Comment("test")) -3048 a.append(PI("pi", "content")) -3049 c = SubElement(a, 'c') -3050 -3051 self.assertEqual( -3052 [a, b, c], -3053 list(a.getiterator('*'))) -
3054 -
3056 a = etree.Element("a") -3057 b = etree.SubElement(a, "b") -3058 c = etree.SubElement(a, "c") -3059 d1 = etree.SubElement(c, "d") -3060 d2 = etree.SubElement(c, "d") -3061 c.text = d1.text = 'TEXT' -3062 -3063 tree = etree.ElementTree(a) -3064 self.assertEqual('.', tree.getelementpath(a)) -3065 self.assertEqual('c/d[1]', tree.getelementpath(d1)) -3066 self.assertEqual('c/d[2]', tree.getelementpath(d2)) -3067 -3068 self.assertEqual(d1, tree.find(tree.getelementpath(d1))) -3069 self.assertEqual(d2, tree.find(tree.getelementpath(d2))) -3070 -3071 tree = etree.ElementTree(c) -3072 self.assertEqual('.', tree.getelementpath(c)) -3073 self.assertEqual('d[2]', tree.getelementpath(d2)) -3074 self.assertEqual(d2, tree.find(tree.getelementpath(d2))) -3075 -3076 tree = etree.ElementTree(b) # not a parent of a/c/d1/d2 -3077 self.assertEqual('.', tree.getelementpath(b)) -3078 self.assertRaises(ValueError, tree.getelementpath, a) -3079 self.assertRaises(ValueError, tree.getelementpath, c) -3080 self.assertRaises(ValueError, tree.getelementpath, d2) -
3081 -
3083 a = etree.Element("{http://ns1/}a") -3084 b = etree.SubElement(a, "{http://ns1/}b") -3085 c = etree.SubElement(a, "{http://ns1/}c") -3086 d1 = etree.SubElement(c, "{http://ns1/}d") -3087 d2 = etree.SubElement(c, "{http://ns2/}d") -3088 d3 = etree.SubElement(c, "{http://ns1/}d") -3089 -3090 tree = etree.ElementTree(a) -3091 self.assertEqual('.', tree.getelementpath(a)) -3092 self.assertEqual('{http://ns1/}c/{http://ns1/}d[1]', -3093 tree.getelementpath(d1)) -3094 self.assertEqual('{http://ns1/}c/{http://ns2/}d', -3095 tree.getelementpath(d2)) -3096 self.assertEqual('{http://ns1/}c/{http://ns1/}d[2]', -3097 tree.getelementpath(d3)) -3098 -3099 self.assertEqual(a, tree.find(tree.getelementpath(a))) -3100 self.assertEqual(b, tree.find(tree.getelementpath(b))) -3101 self.assertEqual(c, tree.find(tree.getelementpath(c))) -3102 self.assertEqual(d1, tree.find(tree.getelementpath(d1))) -3103 self.assertEqual(d2, tree.find(tree.getelementpath(d2))) -3104 self.assertEqual(d3, tree.find(tree.getelementpath(d3))) -3105 -3106 tree = etree.ElementTree(c) -3107 self.assertEqual('{http://ns1/}d[1]', tree.getelementpath(d1)) -3108 self.assertEqual('{http://ns2/}d', tree.getelementpath(d2)) -3109 self.assertEqual('{http://ns1/}d[2]', tree.getelementpath(d3)) -3110 self.assertEqual(d1, tree.find(tree.getelementpath(d1))) -3111 self.assertEqual(d2, tree.find(tree.getelementpath(d2))) -3112 self.assertEqual(d3, tree.find(tree.getelementpath(d3))) -3113 -3114 tree = etree.ElementTree(b) # not a parent of d1/d2 -3115 self.assertRaises(ValueError, tree.getelementpath, d1) -3116 self.assertRaises(ValueError, tree.getelementpath, d2) -
3117 -
3118 - def test_elementtree_find_qname(self): -
3119 XML = self.etree.XML -3120 ElementTree = self.etree.ElementTree -3121 QName = self.etree.QName -3122 tree = ElementTree(XML(_bytes('<a><b><c/></b><b/><c><b/></c></a>'))) -3123 self.assertEqual(tree.find(QName("c")), tree.getroot()[2]) -
3124 -
3126 XML = self.etree.XML -3127 ElementTree = self.etree.ElementTree -3128 QName = self.etree.QName -3129 tree = ElementTree(XML(_bytes('<a><b><c/></b><b/><c><b/></c></a>'))) -3130 self.assertEqual(len(list(tree.findall(QName("c")))), 1) -
3131 -
3133 XML = self.etree.XML -3134 ElementTree = self.etree.ElementTree -3135 QName = self.etree.QName -3136 tree = ElementTree(XML( -3137 _bytes('<a xmlns:x="X" xmlns:y="Y"><x:b><c/></x:b><b/><c><x:b/><b/></c><b/></a>'))) -3138 self.assertEqual(len(list(tree.findall(QName("b")))), 2) -3139 self.assertEqual(len(list(tree.findall(QName("X", "b")))), 1) -
3140 -
3141 - def test_findall_ns(self): -
3142 XML = self.etree.XML -3143 root = XML(_bytes('<a xmlns:x="X" xmlns:y="Y"><x:b><c/></x:b><b/><c><x:b/><b/></c><b/></a>')) -3144 self.assertEqual(len(root.findall(".//{X}b")), 2) -3145 self.assertEqual(len(root.findall(".//{X}*")), 2) -3146 self.assertEqual(len(root.findall(".//b")), 3) -
3147 -
3149 XML = self.etree.XML -3150 root = XML(_bytes('<a xmlns:x="X" xmlns:y="Y"><x:b><c/></x:b><b/><c><x:b/><b/></c><y:b/></a>')) -3151 nsmap = {'xx': 'X'} -3152 self.assertEqual(len(root.findall(".//xx:b", namespaces=nsmap)), 2) -3153 self.assertEqual(len(root.findall(".//xx:*", namespaces=nsmap)), 2) -3154 self.assertEqual(len(root.findall(".//b", namespaces=nsmap)), 2) -3155 nsmap = {'xx': 'Y'} -3156 self.assertEqual(len(root.findall(".//xx:b", namespaces=nsmap)), 1) -3157 self.assertEqual(len(root.findall(".//xx:*", namespaces=nsmap)), 1) -3158 self.assertEqual(len(root.findall(".//b", namespaces=nsmap)), 2) -
3159 -
3160 - def test_findall_empty_prefix(self): -
3161 XML = self.etree.XML -3162 root = XML(_bytes('<a xmlns:x="X" xmlns:y="Y"><x:b><c/></x:b><b/><c><x:b/><b/></c><y:b/></a>')) -3163 nsmap = {'xx': 'X'} -3164 self.assertEqual(len(root.findall(".//xx:b", namespaces=nsmap)), 2) -3165 nsmap = {'xx': 'X', None: 'Y'} -3166 self.assertEqual(len(root.findall(".//b", namespaces=nsmap)), 1) -3167 nsmap = {'xx': 'X', '': 'Y'} -3168 self.assertRaises(ValueError, root.findall, ".//xx:b", namespaces=nsmap) -
3169 -
3170 - def test_findall_syntax_error(self): -
3171 XML = self.etree.XML -3172 root = XML(_bytes('<a><b><c/></b><b/><c><b/><b/></c><b/></a>')) -3173 self.assertRaises(SyntaxError, root.findall, '') -3174 self.assertRaises(SyntaxError, root.findall, '//') # absolute path on Element -3175 self.assertRaises(SyntaxError, root.findall, './//') -
3176 -
3177 - def test_index(self): -
3178 etree = self.etree -3179 e = etree.Element('foo') -3180 for i in range(10): -3181 etree.SubElement(e, 'a%s' % i) -3182 for i in range(10): -3183 self.assertEqual( -3184 i, -3185 e.index(e[i])) -3186 self.assertEqual( -3187 3, e.index(e[3], 3)) -3188 self.assertRaises( -3189 ValueError, e.index, e[3], 4) -3190 self.assertRaises( -3191 ValueError, e.index, e[3], 0, 2) -3192 self.assertRaises( -3193 ValueError, e.index, e[8], 0, -3) -3194 self.assertRaises( -3195 ValueError, e.index, e[8], -5, -3) -3196 self.assertEqual( -3197 8, e.index(e[8], 0, -1)) -3198 self.assertEqual( -3199 8, e.index(e[8], -12, -1)) -3200 self.assertEqual( -3201 0, e.index(e[0], -12, -1)) -
3202 -
3203 - def test_replace(self): -
3204 etree = self.etree -3205 e = etree.Element('foo') -3206 for i in range(10): -3207 el = etree.SubElement(e, 'a%s' % i) -3208 el.text = "text%d" % i -3209 el.tail = "tail%d" % i -3210 -3211 child0 = e[0] -3212 child1 = e[1] -3213 child2 = e[2] -3214 -3215 e.replace(e[0], e[1]) -3216 self.assertEqual( -3217 9, len(e)) -3218 self.assertEqual( -3219 child1, e[0]) -3220 self.assertEqual( -3221 child1.text, "text1") -3222 self.assertEqual( -3223 child1.tail, "tail1") -3224 self.assertEqual( -3225 child0.tail, "tail0") -3226 self.assertEqual( -3227 child2, e[1]) -3228 -3229 e.replace(e[-1], e[0]) -3230 self.assertEqual( -3231 child1, e[-1]) -3232 self.assertEqual( -3233 child1.text, "text1") -3234 self.assertEqual( -3235 child1.tail, "tail1") -3236 self.assertEqual( -3237 child2, e[0]) -
3238 -
3239 - def test_replace_new(self): -
3240 etree = self.etree -3241 e = etree.Element('foo') -3242 for i in range(10): -3243 etree.SubElement(e, 'a%s' % i) -3244 -3245 new_element = etree.Element("test") -3246 new_element.text = "TESTTEXT" -3247 new_element.tail = "TESTTAIL" -3248 child1 = e[1] -3249 e.replace(e[0], new_element) -3250 self.assertEqual( -3251 new_element, e[0]) -3252 self.assertEqual( -3253 "TESTTEXT", -3254 e[0].text) -3255 self.assertEqual( -3256 "TESTTAIL", -3257 e[0].tail) -3258 self.assertEqual( -3259 child1, e[1]) -
3260 -
3262 Element = self.etree.Element -3263 SubElement = self.etree.SubElement -3264 -3265 a = Element('a') -3266 -3267 e = Element('e') -3268 f = Element('f') -3269 g = Element('g') -3270 -3271 s = [e, f, g] -3272 a[::-1] = s -3273 self.assertEqual( -3274 [g, f, e], -3275 list(a)) -
3276 -
3277 - def test_setslice_step(self): -
3278 Element = self.etree.Element -3279 SubElement = self.etree.SubElement -3280 -3281 a = Element('a') -3282 b = SubElement(a, 'b') -3283 c = SubElement(a, 'c') -3284 d = SubElement(a, 'd') -3285 e = SubElement(a, 'e') -3286 -3287 x = Element('x') -3288 y = Element('y') -3289 -3290 a[1::2] = [x, y] -3291 self.assertEqual( -3292 [b, x, d, y], -3293 list(a)) -
3294 -
3295 - def test_setslice_step_negative(self): -
3296 Element = self.etree.Element -3297 SubElement = self.etree.SubElement -3298 -3299 a = Element('a') -3300 b = SubElement(a, 'b') -3301 c = SubElement(a, 'c') -3302 d = SubElement(a, 'd') -3303 e = SubElement(a, 'e') -3304 -3305 x = Element('x') -3306 y = Element('y') -3307 -3308 a[1::-1] = [x, y] -3309 self.assertEqual( -3310 [y, x, d, e], -3311 list(a)) -
3312 -
3314 Element = self.etree.Element -3315 SubElement = self.etree.SubElement -3316 -3317 a = Element('a') -3318 b = SubElement(a, 'b') -3319 c = SubElement(a, 'c') -3320 d = SubElement(a, 'd') -3321 e = SubElement(a, 'e') -3322 -3323 x = Element('x') -3324 y = Element('y') -3325 -3326 a[::-2] = [x, y] -3327 self.assertEqual( -3328 [b, y, d, x], -3329 list(a)) -
3330 -
3331 - def test_setslice_step_overrun(self): -
3332 Element = self.etree.Element -3333 SubElement = self.etree.SubElement -3334 try: -3335 slice -3336 except NameError: -3337 print("slice() not found") -3338 return -3339 -3340 a = Element('a') -3341 b = SubElement(a, 'b') -3342 c = SubElement(a, 'c') -3343 d = SubElement(a, 'd') -3344 e = SubElement(a, 'e') -3345 -3346 x = Element('x') -3347 y = Element('y') -3348 z = Element('z') -3349 -3350 self.assertRaises( -3351 ValueError, -3352 operator.setitem, a, slice(1,None,2), [x, y, z]) -3353 -3354 self.assertEqual( -3355 [b, c, d, e], -3356 list(a)) -
3357 -
3358 - def test_sourceline_XML(self): -
3359 XML = self.etree.XML -3360 root = XML(_bytes('''<?xml version="1.0"?> -3361 <root><test> -3362 -3363 <bla/></test> -3364 </root> -3365 ''')) -3366 -3367 self.assertEqual( -3368 [2, 2, 4], -3369 [ el.sourceline for el in root.getiterator() ]) -
3370 -
3371 - def test_large_sourceline_XML(self): -
3372 XML = self.etree.XML -3373 root = XML(_bytes( -3374 '<?xml version="1.0"?>\n' -3375 '<root>' + '\n' * 65536 + -3376 '<p>' + '\n' * 65536 + '</p>\n' + -3377 '<br/>\n' -3378 '</root>')) -3379 -3380 if self.etree.LIBXML_VERSION >= (2, 9): -3381 expected = [2, 131074, 131076] -3382 else: -3383 expected = [2, 65535, 65535] -3384 -3385 self.assertEqual(expected, [el.sourceline for el in root.iter()]) -
3386 -
3387 - def test_sourceline_parse(self): -
3388 parse = self.etree.parse -3389 tree = parse(fileInTestDir('include/test_xinclude.xml')) -3390 -3391 self.assertEqual( -3392 [1, 2, 3], -3393 [ el.sourceline for el in tree.getiterator() ]) -
3394 -
3396 iterparse = self.etree.iterparse -3397 lines = [ el.sourceline for (event, el) in -3398 iterparse(fileInTestDir('include/test_xinclude.xml')) ] -3399 -3400 self.assertEqual( -3401 [2, 3, 1], -3402 lines) -
3403 -
3405 iterparse = self.etree.iterparse -3406 lines = [ el.sourceline for (event, el) in -3407 iterparse(fileInTestDir('include/test_xinclude.xml'), -3408 events=("start",)) ] -3409 -3410 self.assertEqual( -3411 [1, 2, 3], -3412 lines) -
3413 -
3414 - def test_sourceline_element(self): -
3415 Element = self.etree.Element -3416 SubElement = self.etree.SubElement -3417 el = Element("test") -3418 self.assertEqual(None, el.sourceline) -3419 -3420 child = SubElement(el, "test") -3421 self.assertEqual(None, el.sourceline) -3422 self.assertEqual(None, child.sourceline) -
3423 -
3424 - def test_XML_base_url_docinfo(self): -
3425 etree = self.etree -3426 root = etree.XML(_bytes("<root/>"), base_url="http://no/such/url") -3427 docinfo = root.getroottree().docinfo -3428 self.assertEqual(docinfo.URL, "http://no/such/url") -
3429 -
3431 etree = self.etree -3432 root = etree.XML(_bytes("<root/>"), base_url="http://no/such/url") -3433 docinfo = root.getroottree().docinfo -3434 self.assertEqual(docinfo.URL, "http://no/such/url") -3435 docinfo.URL = "https://secret/url" -3436 self.assertEqual(docinfo.URL, "https://secret/url") -
3437 -
3439 etree = self.etree -3440 tree = etree.parse(BytesIO("<root/>"), base_url="http://no/such/url") -3441 docinfo = tree.docinfo -3442 self.assertEqual(docinfo.URL, "http://no/such/url") -
3443 -
3444 - def test_parse_base_url_docinfo(self): -
3445 etree = self.etree -3446 tree = etree.parse(fileInTestDir('include/test_xinclude.xml'), -3447 base_url="http://no/such/url") -3448 docinfo = tree.docinfo -3449 self.assertEqual(docinfo.URL, "http://no/such/url") -
3450 -
3451 - def test_HTML_base_url_docinfo(self): -
3452 etree = self.etree -3453 root = etree.HTML(_bytes("<html/>"), base_url="http://no/such/url") -3454 docinfo = root.getroottree().docinfo -3455 self.assertEqual(docinfo.URL, "http://no/such/url") -
3456 -
3457 - def test_docinfo_public(self): -
3458 etree = self.etree -3459 xml_header = '<?xml version="1.0" encoding="ascii"?>' -3460 pub_id = "-//W3C//DTD XHTML 1.0 Transitional//EN" -3461 sys_id = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" -3462 doctype_string = '<!DOCTYPE html PUBLIC "%s" "%s">' % (pub_id, sys_id) -3463 -3464 xml = _bytes(xml_header + doctype_string + '<html><body></body></html>') -3465 -3466 tree = etree.parse(BytesIO(xml)) -3467 docinfo = tree.docinfo -3468 self.assertEqual(docinfo.encoding, "ascii") -3469 self.assertEqual(docinfo.xml_version, "1.0") -3470 self.assertEqual(docinfo.public_id, pub_id) -3471 self.assertEqual(docinfo.system_url, sys_id) -3472 self.assertEqual(docinfo.root_name, 'html') -3473 self.assertEqual(docinfo.doctype, doctype_string) -
3474 -
3475 - def test_docinfo_system(self): -
3476 etree = self.etree -3477 xml_header = '<?xml version="1.0" encoding="UTF-8"?>' -3478 sys_id = "some.dtd" -3479 doctype_string = '<!DOCTYPE html SYSTEM "%s">' % sys_id -3480 xml = _bytes(xml_header + doctype_string + '<html><body></body></html>') -3481 -3482 tree = etree.parse(BytesIO(xml)) -3483 docinfo = tree.docinfo -3484 self.assertEqual(docinfo.encoding, "UTF-8") -3485 self.assertEqual(docinfo.xml_version, "1.0") -3486 self.assertEqual(docinfo.public_id, None) -3487 self.assertEqual(docinfo.system_url, sys_id) -3488 self.assertEqual(docinfo.root_name, 'html') -3489 self.assertEqual(docinfo.doctype, doctype_string) -
3490 -
3491 - def test_docinfo_empty(self): -
3492 etree = self.etree -3493 xml = _bytes('<html><body></body></html>') -3494 tree = etree.parse(BytesIO(xml)) -3495 docinfo = tree.docinfo -3496 self.assertEqual(docinfo.encoding, "UTF-8") -3497 self.assertEqual(docinfo.xml_version, "1.0") -3498 self.assertEqual(docinfo.public_id, None) -3499 self.assertEqual(docinfo.system_url, None) -3500 self.assertEqual(docinfo.root_name, 'html') -3501 self.assertEqual(docinfo.doctype, '') -
3502 -
3503 - def test_docinfo_name_only(self): -
3504 etree = self.etree -3505 xml = _bytes('<!DOCTYPE root><root></root>') -3506 tree = etree.parse(BytesIO(xml)) -3507 docinfo = tree.docinfo -3508 self.assertEqual(docinfo.encoding, "UTF-8") -3509 self.assertEqual(docinfo.xml_version, "1.0") -3510 self.assertEqual(docinfo.public_id, None) -3511 self.assertEqual(docinfo.system_url, None) -3512 self.assertEqual(docinfo.root_name, 'root') -3513 self.assertEqual(docinfo.doctype, '<!DOCTYPE root>') -
3514 -
3516 etree = self.etree -3517 xml = _bytes('<!DOCTYPE root>\n<root/>') -3518 tree = etree.parse(BytesIO(xml)) -3519 self.assertEqual(xml, etree.tostring(tree)) -
3520 -
3522 etree = self.etree -3523 pub_id = "-//W3C//DTD XHTML 1.0 Transitional//EN" -3524 sys_id = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" -3525 doctype_string = _bytes('<!DOCTYPE html PUBLIC "%s" "%s">' % (pub_id, sys_id)) -3526 -3527 xml = _bytes('<!DOCTYPE root>\n<root/>') -3528 tree = etree.parse(BytesIO(xml)) -3529 self.assertEqual(xml.replace(_bytes('<!DOCTYPE root>'), doctype_string), -3530 etree.tostring(tree, doctype=doctype_string)) -
3531 -
3532 - def test_xml_base(self): -
3533 etree = self.etree -3534 root = etree.XML(_bytes("<root/>"), base_url="http://no/such/url") -3535 self.assertEqual(root.base, "http://no/such/url") -3536 self.assertEqual( -3537 root.get('{http://www.w3.org/XML/1998/namespace}base'), None) -3538 root.base = "https://secret/url" -3539 self.assertEqual(root.base, "https://secret/url") -3540 self.assertEqual( -3541 root.get('{http://www.w3.org/XML/1998/namespace}base'), -3542 "https://secret/url") -
3543 -
3544 - def test_xml_base_attribute(self): -
3545 etree = self.etree -3546 root = etree.XML(_bytes("<root/>"), base_url="http://no/such/url") -3547 self.assertEqual(root.base, "http://no/such/url") -3548 self.assertEqual( -3549 root.get('{http://www.w3.org/XML/1998/namespace}base'), None) -3550 root.set('{http://www.w3.org/XML/1998/namespace}base', -3551 "https://secret/url") -3552 self.assertEqual(root.base, "https://secret/url") -3553 self.assertEqual( -3554 root.get('{http://www.w3.org/XML/1998/namespace}base'), -3555 "https://secret/url") -
3556 -
3557 - def test_html_base(self): -
3558 etree = self.etree -3559 root = etree.HTML(_bytes("<html><body></body></html>"), -3560 base_url="http://no/such/url") -3561 self.assertEqual(root.base, "http://no/such/url") -
3562 -
3563 - def test_html_base_tag(self): -
3564 etree = self.etree -3565 root = etree.HTML(_bytes('<html><head><base href="http://no/such/url"></head></html>')) -3566 self.assertEqual(root.base, "http://no/such/url") -
3567 -
3569 # parse from a file object that returns unicode strings -3570 f = LargeFileLikeUnicode() -3571 tree = self.etree.parse(f) -3572 root = tree.getroot() -3573 self.assertTrue(root.tag.endswith('root')) -
3574 -
3575 - def test_dtd_io(self): -
3576 # check that DTDs that go in also go back out -3577 xml = _bytes('''\ -3578 <!DOCTYPE test SYSTEM "test.dtd" [ -3579 <!ENTITY entity "tasty"> -3580 <!ELEMENT test (a)> -3581 <!ELEMENT a (#PCDATA)> -3582 ]> -3583 <test><a>test-test</a></test>\ -3584 ''') -3585 tree = self.etree.parse(BytesIO(xml)) -3586 self.assertEqual(self.etree.tostring(tree).replace(_bytes(" "), _bytes("")), -3587 xml.replace(_bytes(" "), _bytes(""))) -
3588 -
3589 - def test_byte_zero(self): -
3590 Element = self.etree.Element -3591 -3592 a = Element('a') -3593 self.assertRaises(ValueError, setattr, a, "text", 'ha\0ho') -3594 self.assertRaises(ValueError, setattr, a, "tail", 'ha\0ho') -3595 -3596 self.assertRaises(ValueError, Element, 'ha\0ho') -
3597 -
3598 - def test_unicode_byte_zero(self): -
3599 Element = self.etree.Element -3600 -3601 a = Element('a') -3602 self.assertRaises(ValueError, setattr, a, "text", -3603 _str('ha\0ho')) -3604 self.assertRaises(ValueError, setattr, a, "tail", -3605 _str('ha\0ho')) -3606 -3607 self.assertRaises(ValueError, Element, -3608 _str('ha\0ho')) -
3609 -
3610 - def test_byte_invalid(self): -
3611 Element = self.etree.Element -3612 -3613 a = Element('a') -3614 self.assertRaises(ValueError, setattr, a, "text", 'ha\x07ho') -3615 self.assertRaises(ValueError, setattr, a, "text", 'ha\x02ho') -3616 -3617 self.assertRaises(ValueError, setattr, a, "tail", 'ha\x07ho') -3618 self.assertRaises(ValueError, setattr, a, "tail", 'ha\x02ho') -3619 -3620 self.assertRaises(ValueError, Element, 'ha\x07ho') -3621 self.assertRaises(ValueError, Element, 'ha\x02ho') -
3622 -
3623 - def test_unicode_byte_invalid(self): -
3624 Element = self.etree.Element -3625 -3626 a = Element('a') -3627 self.assertRaises(ValueError, setattr, a, "text", -3628 _str('ha\x07ho')) -3629 self.assertRaises(ValueError, setattr, a, "text", -3630 _str('ha\x02ho')) -3631 -3632 self.assertRaises(ValueError, setattr, a, "tail", -3633 _str('ha\x07ho')) -3634 self.assertRaises(ValueError, setattr, a, "tail", -3635 _str('ha\x02ho')) -3636 -3637 self.assertRaises(ValueError, Element, -3638 _str('ha\x07ho')) -3639 self.assertRaises(ValueError, Element, -3640 _str('ha\x02ho')) -
3641 -
3643 Element = self.etree.Element -3644 -3645 a = Element('a') -3646 self.assertRaises(ValueError, setattr, a, "text", -3647 _str('ha\u1234\x07ho')) -3648 self.assertRaises(ValueError, setattr, a, "text", -3649 _str('ha\u1234\x02ho')) -3650 -3651 self.assertRaises(ValueError, setattr, a, "tail", -3652 _str('ha\u1234\x07ho')) -3653 self.assertRaises(ValueError, setattr, a, "tail", -3654 _str('ha\u1234\x02ho')) -3655 -3656 self.assertRaises(ValueError, Element, -3657 _str('ha\u1234\x07ho')) -3658 self.assertRaises(ValueError, Element, -3659 _str('ha\u1234\x02ho')) -
3660 -
3662 # ElementTree fails to serialize this -3663 tostring = self.etree.tostring -3664 Element = self.etree.Element -3665 SubElement = self.etree.SubElement -3666 -3667 a = Element('a') -3668 b = SubElement(a, 'b') -3669 c = SubElement(a, 'c') -3670 -3671 result = tostring(a, encoding='UTF-16') -3672 self.assertEqual(_bytes('<a><b></b><c></c></a>'), -3673 canonicalize(result)) -
3674 -
3675 - def test_tostring_none(self): -
3676 # ElementTree raises an AssertionError here -3677 tostring = self.etree.tostring -3678 self.assertRaises(TypeError, self.etree.tostring, None) -
3679 -
3680 - def test_tostring_pretty(self): -
3681 tostring = self.etree.tostring -3682 Element = self.etree.Element -3683 SubElement = self.etree.SubElement -3684 -3685 a = Element('a') -3686 b = SubElement(a, 'b') -3687 c = SubElement(a, 'c') -3688 -3689 result = tostring(a) -3690 self.assertEqual(result, _bytes("<a><b/><c/></a>")) -3691 -3692 result = tostring(a, pretty_print=False) -3693 self.assertEqual(result, _bytes("<a><b/><c/></a>")) -3694 -3695 result = tostring(a, pretty_print=True) -3696 self.assertEqual(result, _bytes("<a>\n <b/>\n <c/>\n</a>\n")) -
3697 -
3698 - def test_tostring_with_tail(self): -
3699 tostring = self.etree.tostring -3700 Element = self.etree.Element -3701 SubElement = self.etree.SubElement -3702 -3703 a = Element('a') -3704 a.tail = "aTAIL" -3705 b = SubElement(a, 'b') -3706 b.tail = "bTAIL" -3707 c = SubElement(a, 'c') -3708 -3709 result = tostring(a) -3710 self.assertEqual(result, _bytes("<a><b/>bTAIL<c/></a>aTAIL")) -3711 -3712 result = tostring(a, with_tail=False) -3713 self.assertEqual(result, _bytes("<a><b/>bTAIL<c/></a>")) -3714 -3715 result = tostring(a, with_tail=True) -3716 self.assertEqual(result, _bytes("<a><b/>bTAIL<c/></a>aTAIL")) -
3717 -
3719 tostring = self.etree.tostring -3720 html = self.etree.fromstring( -3721 '<html><body>' -3722 '<div><p>Some text<i>\r\n</i></p></div>\r\n' -3723 '</body></html>', -3724 parser=self.etree.HTMLParser()) -3725 self.assertEqual(html.tag, 'html') -3726 div = html.find('.//div') -3727 self.assertEqual(div.tail, '\r\n') -3728 result = tostring(div, method='html') -3729 self.assertEqual( -3730 result, -3731 _bytes("<div><p>Some text<i>\r\n</i></p></div>\r\n")) -3732 result = tostring(div, method='html', with_tail=True) -3733 self.assertEqual( -3734 result, -3735 _bytes("<div><p>Some text<i>\r\n</i></p></div>\r\n")) -3736 result = tostring(div, method='html', with_tail=False) -3737 self.assertEqual( -3738 result, -3739 _bytes("<div><p>Some text<i>\r\n</i></p></div>")) -
3740 -
3741 - def test_standalone(self): -
3742 tostring = self.etree.tostring -3743 XML = self.etree.XML -3744 ElementTree = self.etree.ElementTree -3745 Element = self.etree.Element -3746 -3747 tree = Element("root").getroottree() -3748 self.assertEqual(None, tree.docinfo.standalone) -3749 -3750 tree = XML(_bytes("<root/>")).getroottree() -3751 self.assertEqual(None, tree.docinfo.standalone) -3752 -3753 tree = XML(_bytes( -3754 "<?xml version='1.0' encoding='ASCII' standalone='yes'?>\n<root/>" -3755 )).getroottree() -3756 self.assertEqual(True, tree.docinfo.standalone) -3757 -3758 tree = XML(_bytes( -3759 "<?xml version='1.0' encoding='ASCII' standalone='no'?>\n<root/>" -3760 )).getroottree() -3761 self.assertEqual(False, tree.docinfo.standalone) -
3762 -
3763 - def test_tostring_standalone(self): -
3764 tostring = self.etree.tostring -3765 XML = self.etree.XML -3766 ElementTree = self.etree.ElementTree -3767 -3768 root = XML(_bytes("<root/>")) -3769 -3770 tree = ElementTree(root) -3771 self.assertEqual(None, tree.docinfo.standalone) -3772 -3773 result = tostring(root, xml_declaration=True, encoding="ASCII") -3774 self.assertEqual(result, _bytes( -3775 "<?xml version='1.0' encoding='ASCII'?>\n<root/>")) -3776 -3777 result = tostring(root, xml_declaration=True, encoding="ASCII", -3778 standalone=True) -3779 self.assertEqual(result, _bytes( -3780 "<?xml version='1.0' encoding='ASCII' standalone='yes'?>\n<root/>")) -3781 -3782 tree = ElementTree(XML(result)) -3783 self.assertEqual(True, tree.docinfo.standalone) -3784 -3785 result = tostring(root, xml_declaration=True, encoding="ASCII", -3786 standalone=False) -3787 self.assertEqual(result, _bytes( -3788 "<?xml version='1.0' encoding='ASCII' standalone='no'?>\n<root/>")) -3789 -3790 tree = ElementTree(XML(result)) -3791 self.assertEqual(False, tree.docinfo.standalone) -
3792 -
3794 tostring = self.etree.tostring -3795 XML = self.etree.XML -3796 ElementTree = self.etree.ElementTree -3797 -3798 root = XML(_bytes( -3799 "<?xml version='1.0' encoding='UTF-8' standalone='yes'?>\n<root/>")) -3800 -3801 tree = ElementTree(root) -3802 self.assertEqual(True, tree.docinfo.standalone) -3803 -3804 result = tostring(root, xml_declaration=True, encoding="ASCII") -3805 self.assertEqual(result, _bytes( -3806 "<?xml version='1.0' encoding='ASCII'?>\n<root/>")) -3807 -3808 result = tostring(root, xml_declaration=True, encoding="ASCII", -3809 standalone=True) -3810 self.assertEqual(result, _bytes( -3811 "<?xml version='1.0' encoding='ASCII' standalone='yes'?>\n<root/>")) -
3812 -
3814 tostring = self.etree.tostring -3815 Element = self.etree.Element -3816 SubElement = self.etree.SubElement -3817 -3818 a = Element('a') -3819 a.text = "A" -3820 a.tail = "tail" -3821 b = SubElement(a, 'b') -3822 b.text = "B" -3823 b.tail = _str("Søk på nettet") -3824 c = SubElement(a, 'c') -3825 c.text = "C" -3826 -3827 result = tostring(a, method="text", encoding="UTF-16") -3828 -3829 self.assertEqual(_str('ABSøk på nettetCtail').encode("UTF-16"), -3830 result) -
3831 -
3833 tostring = self.etree.tostring -3834 Element = self.etree.Element -3835 SubElement = self.etree.SubElement -3836 -3837 a = Element('a') -3838 a.text = _str('Søk på nettetA') -3839 a.tail = "tail" -3840 b = SubElement(a, 'b') -3841 b.text = "B" -3842 b.tail = _str('Søk på nettetB') -3843 c = SubElement(a, 'c') -3844 c.text = "C" -3845 -3846 self.assertRaises(UnicodeEncodeError, -3847 tostring, a, method="text") -3848 -3849 self.assertEqual( -3850 _str('Søk på nettetABSøk på nettetBCtail').encode('utf-8'), -3851 tostring(a, encoding="UTF-8", method="text")) -
3852 -
3853 - def test_tounicode(self): -
3854 tounicode = self.etree.tounicode -3855 Element = self.etree.Element -3856 SubElement = self.etree.SubElement -3857 -3858 a = Element('a') -3859 b = SubElement(a, 'b') -3860 c = SubElement(a, 'c') -3861 -3862 self.assertTrue(isinstance(tounicode(a), _unicode)) -3863 self.assertEqual(_bytes('<a><b></b><c></c></a>'), -3864 canonicalize(tounicode(a))) -
3865 -
3866 - def test_tounicode_element(self): -
3867 tounicode = self.etree.tounicode -3868 Element = self.etree.Element -3869 SubElement = self.etree.SubElement -3870 -3871 a = Element('a') -3872 b = SubElement(a, 'b') -3873 c = SubElement(a, 'c') -3874 d = SubElement(c, 'd') -3875 self.assertTrue(isinstance(tounicode(b), _unicode)) -3876 self.assertTrue(isinstance(tounicode(c), _unicode)) -3877 self.assertEqual(_bytes('<b></b>'), -3878 canonicalize(tounicode(b))) -3879 self.assertEqual(_bytes('<c><d></d></c>'), -3880 canonicalize(tounicode(c))) -
3881 -
3882 - def test_tounicode_none(self): -
3883 tounicode = self.etree.tounicode -3884 self.assertRaises(TypeError, self.etree.tounicode, None) -
3885 -
3886 - def test_tounicode_element_tail(self): -
3887 tounicode = self.etree.tounicode -3888 Element = self.etree.Element -3889 SubElement = self.etree.SubElement -3890 -3891 a = Element('a') -3892 b = SubElement(a, 'b') -3893 c = SubElement(a, 'c') -3894 d = SubElement(c, 'd') -3895 b.tail = 'Foo' -3896 -3897 self.assertTrue(isinstance(tounicode(b), _unicode)) -3898 self.assertTrue(tounicode(b) == '<b/>Foo' or -3899 tounicode(b) == '<b />Foo') -
3900 -
3901 - def test_tounicode_pretty(self): -
3902 tounicode = self.etree.tounicode -3903 Element = self.etree.Element -3904 SubElement = self.etree.SubElement -3905 -3906 a = Element('a') -3907 b = SubElement(a, 'b') -3908 c = SubElement(a, 'c') -3909 -3910 result = tounicode(a) -3911 self.assertEqual(result, "<a><b/><c/></a>") -3912 -3913 result = tounicode(a, pretty_print=False) -3914 self.assertEqual(result, "<a><b/><c/></a>") -3915 -3916 result = tounicode(a, pretty_print=True) -3917 self.assertEqual(result, "<a>\n <b/>\n <c/>\n</a>\n") -
3918 -
3919 - def test_tostring_unicode(self): -
3920 tostring = self.etree.tostring -3921 Element = self.etree.Element -3922 SubElement = self.etree.SubElement -3923 -3924 a = Element('a') -3925 b = SubElement(a, 'b') -3926 c = SubElement(a, 'c') -3927 -3928 self.assertTrue(isinstance(tostring(a, encoding=_unicode), _unicode)) -3929 self.assertEqual(_bytes('<a><b></b><c></c></a>'), -3930 canonicalize(tostring(a, encoding=_unicode))) -
3931 -
3933 tostring = self.etree.tostring -3934 Element = self.etree.Element -3935 SubElement = self.etree.SubElement -3936 -3937 a = Element('a') -3938 b = SubElement(a, 'b') -3939 c = SubElement(a, 'c') -3940 d = SubElement(c, 'd') -3941 self.assertTrue(isinstance(tostring(b, encoding=_unicode), _unicode)) -3942 self.assertTrue(isinstance(tostring(c, encoding=_unicode), _unicode)) -3943 self.assertEqual(_bytes('<b></b>'), -3944 canonicalize(tostring(b, encoding=_unicode))) -3945 self.assertEqual(_bytes('<c><d></d></c>'), -3946 canonicalize(tostring(c, encoding=_unicode))) -
3947 -
3948 - def test_tostring_unicode_none(self): -
3949 tostring = self.etree.tostring -3950 self.assertRaises(TypeError, self.etree.tostring, -3951 None, encoding=_unicode) -
3952 -
3954 tostring = self.etree.tostring -3955 Element = self.etree.Element -3956 SubElement = self.etree.SubElement -3957 -3958 a = Element('a') -3959 b = SubElement(a, 'b') -3960 c = SubElement(a, 'c') -3961 d = SubElement(c, 'd') -3962 b.tail = 'Foo' -3963 -3964 self.assertTrue(isinstance(tostring(b, encoding=_unicode), _unicode)) -3965 self.assertTrue(tostring(b, encoding=_unicode) == '<b/>Foo' or -3966 tostring(b, encoding=_unicode) == '<b />Foo') -
3967 -
3969 tostring = self.etree.tostring -3970 Element = self.etree.Element -3971 SubElement = self.etree.SubElement -3972 -3973 a = Element('a') -3974 b = SubElement(a, 'b') -3975 c = SubElement(a, 'c') -3976 -3977 result = tostring(a, encoding=_unicode) -3978 self.assertEqual(result, "<a><b/><c/></a>") -3979 -3980 result = tostring(a, encoding=_unicode, pretty_print=False) -3981 self.assertEqual(result, "<a><b/><c/></a>") -3982 -3983 result = tostring(a, encoding=_unicode, pretty_print=True) -3984 self.assertEqual(result, "<a>\n <b/>\n <c/>\n</a>\n") -
3985 -
3986 - def test_pypy_proxy_collect(self): -
3987 root = etree.Element('parent') -3988 etree.SubElement(root, 'child') -3989 -3990 self.assertEqual(len(root), 1) -3991 self.assertEqual(root[0].tag, 'child') -3992 -3993 # in PyPy, GC used to kill the Python proxy instance without cleanup -3994 gc.collect() -3995 self.assertEqual(len(root), 1) -3996 self.assertEqual(root[0].tag, 'child') -
3997 -
3998 - def test_element_refcycle(self): -
3999 class SubEl(etree.ElementBase): -4000 pass -
4001 -4002 el1 = SubEl() -4003 el2 = SubEl() -4004 self.assertEqual('SubEl', el1.tag) -4005 self.assertEqual('SubEl', el2.tag) -4006 el1.other = el2 -4007 el2.other = el1 -4008 -4009 del el1, el2 -4010 gc.collect() -4011 # not really testing anything here, but it shouldn't crash -4012 -
4013 - def test_proxy_collect_siblings(self): -
4014 root = etree.Element('parent') -4015 c1 = etree.SubElement(root, 'child1') -4016 c2 = etree.SubElement(root, 'child2') -4017 -4018 root.remove(c1) -4019 root.remove(c2) -4020 c1.addnext(c2) -4021 del c1 -4022 # trigger deallocation attempt of c1 -4023 c2.getprevious() -4024 # make sure it wasn't deallocated -4025 self.assertEqual('child1', c2.getprevious().tag) -
4026 -
4028 root = etree.Element('parent') -4029 c1 = etree.SubElement(root, 'child1') -4030 c2 = etree.SubElement(root, 'child2') -4031 -4032 root.remove(c1) -4033 root.remove(c2) -4034 c1.addnext(c2) -4035 c1.tail = 'abc' -4036 c2.tail = 'xyz' -4037 del c1 -4038 # trigger deallocation attempt of c1 -4039 c2.getprevious() -4040 # make sure it wasn't deallocated -4041 self.assertEqual('child1', c2.getprevious().tag) -4042 self.assertEqual('abc', c2.getprevious().tail) -
4043 -4044 # helper methods -4045 -
4046 - def _writeElement(self, element, encoding='us-ascii', compression=0): -
4047 """Write out element for comparison. -4048 """ -4049 ElementTree = self.etree.ElementTree -4050 f = BytesIO() -4051 tree = ElementTree(element=element) -4052 tree.write(f, encoding=encoding, compression=compression) -4053 data = f.getvalue() -4054 if compression: -4055 data = zlib.decompress(data) -4056 return canonicalize(data) -
4057 -
4058 -4059 -class _XIncludeTestCase(HelperTestCase): -
4060 - def test_xinclude_text(self): -
4061 filename = fileInTestDir('test_broken.xml') -4062 root = etree.XML(_bytes('''\ -4063 <doc xmlns:xi="http://www.w3.org/2001/XInclude"> -4064 <xi:include href="%s" parse="text"/> -4065 </doc> -4066 ''' % path2url(filename))) -4067 old_text = root.text -4068 content = read_file(filename) -4069 old_tail = root[0].tail -4070 -4071 self.include( etree.ElementTree(root) ) -4072 self.assertEqual(old_text + content + old_tail, -4073 root.text) -
4074 -
4075 - def test_xinclude(self): -
4076 tree = etree.parse(fileInTestDir('include/test_xinclude.xml')) -4077 self.assertNotEqual( -4078 'a', -4079 tree.getroot()[1].tag) -4080 # process xincludes -4081 self.include( tree ) -4082 # check whether we find it replaced with included data -4083 self.assertEqual( -4084 'a', -4085 tree.getroot()[1].tag) -
4086 -
4087 - def test_xinclude_resolver(self): -
4088 class res(etree.Resolver): -4089 include_text = read_file(fileInTestDir('test.xml')) -4090 called = {} -4091 def resolve(self, url, id, context): -4092 if url.endswith(".dtd"): -4093 self.called["dtd"] = True -4094 return self.resolve_filename( -4095 fileInTestDir('test.dtd'), context) -4096 elif url.endswith("test_xinclude.xml"): -4097 self.called["input"] = True -4098 return None # delegate to default resolver -4099 else: -4100 self.called["include"] = True -4101 return self.resolve_string(self.include_text, context) -
4102 -4103 res_instance = res() -4104 parser = etree.XMLParser(load_dtd = True) -4105 parser.resolvers.add(res_instance) -4106 -4107 tree = etree.parse(fileInTestDir('include/test_xinclude.xml'), -4108 parser = parser) -4109 -4110 self.include(tree) -4111 -4112 called = list(res_instance.called.items()) -4113 called.sort() -4114 self.assertEqual( -4115 [("dtd", True), ("include", True), ("input", True)], -4116 called) -4117 -
4119 data = textwrap.dedent(''' -4120 <doc xmlns:xi="http://www.w3.org/2001/XInclude"> -4121 <foo/> -4122 <xi:include href="./test.xml" /> -4123 </doc> -4124 ''') -4125 -4126 class Resolver(etree.Resolver): -4127 called = {} -4128 -4129 def resolve(self, url, id, context): -4130 if url.endswith("test_xinclude.xml"): -4131 assert not self.called.get("input") -4132 self.called["input"] = True -4133 return None # delegate to default resolver -4134 elif url.endswith('/test5.xml'): -4135 assert not self.called.get("DONE") -4136 self.called["DONE"] = True -4137 return self.resolve_string('<DONE/>', context) -4138 else: -4139 _, filename = url.rsplit('/', 1) -4140 assert not self.called.get(filename) -4141 self.called[filename] = True -4142 next_data = data.replace( -4143 'test.xml', 'test%d.xml' % len(self.called)) -4144 return self.resolve_string(next_data, context) -
4145 -4146 res_instance = Resolver() -4147 parser = etree.XMLParser(load_dtd=True) -4148 parser.resolvers.add(res_instance) -4149 -4150 tree = etree.parse(fileInTestDir('include/test_xinclude.xml'), -4151 parser=parser) -4152 -4153 self.include(tree) -4154 -4155 called = list(res_instance.called.items()) -4156 called.sort() -4157 self.assertEqual( -4158 [("DONE", True), ("input", True), ("test.xml", True), -4159 ("test2.xml", True), ("test3.xml", True), ("test4.xml", True)], -4160 called) -4161 -
4162 -4163 -class ETreeXIncludeTestCase(_XIncludeTestCase): -
4164 - def include(self, tree): -
4165 tree.xinclude() -
4166 -
4167 -4168 -class ElementIncludeTestCase(_XIncludeTestCase): -
4169 from lxml import ElementInclude -
4170 - def include(self, tree): -
4171 self.ElementInclude.include(tree.getroot()) -
4172 -
4173 -4174 -class ETreeC14NTestCase(HelperTestCase): -
4175 - def test_c14n(self): -
4176 tree = self.parse(_bytes('<a><b/></a>')) -4177 f = BytesIO() -4178 tree.write_c14n(f) -4179 s = f.getvalue() -4180 self.assertEqual(_bytes('<a><b></b></a>'), -4181 s) -
4182 -
4183 - def test_c14n_gzip(self): -
4184 tree = self.parse(_bytes('<a>'+'<b/>'*200+'</a>')) -4185 f = BytesIO() -4186 tree.write_c14n(f, compression=9) -4187 with closing(gzip.GzipFile(fileobj=BytesIO(f.getvalue()))) as gzfile: -4188 s = gzfile.read() -4189 self.assertEqual(_bytes('<a>'+'<b></b>'*200+'</a>'), -4190 s) -
4191 -
4192 - def test_c14n_file(self): -
4193 tree = self.parse(_bytes('<a><b/></a>')) -4194 with tmpfile() as filename: -4195 tree.write_c14n(filename) -4196 data = read_file(filename, 'rb') -4197 self.assertEqual(_bytes('<a><b></b></a>'), -4198 data) -
4199 -
4200 - def test_c14n_file_gzip(self): -
4201 tree = self.parse(_bytes('<a>'+'<b/>'*200+'</a>')) -4202 with tmpfile() as filename: -4203 tree.write_c14n(filename, compression=9) -4204 with closing(gzip.open(filename, 'rb')) as f: -4205 data = f.read() -4206 self.assertEqual(_bytes('<a>'+'<b></b>'*200+'</a>'), -4207 data) -
4208 -
4209 - def test_c14n_with_comments(self): -
4210 tree = self.parse(_bytes('<!--hi--><a><!--ho--><b/></a><!--hu-->')) -4211 f = BytesIO() -4212 tree.write_c14n(f) -4213 s = f.getvalue() -4214 self.assertEqual(_bytes('<!--hi-->\n<a><!--ho--><b></b></a>\n<!--hu-->'), -4215 s) -4216 f = BytesIO() -4217 tree.write_c14n(f, with_comments=True) -4218 s = f.getvalue() -4219 self.assertEqual(_bytes('<!--hi-->\n<a><!--ho--><b></b></a>\n<!--hu-->'), -4220 s) -4221 f = BytesIO() -4222 tree.write_c14n(f, with_comments=False) -4223 s = f.getvalue() -4224 self.assertEqual(_bytes('<a><b></b></a>'), -4225 s) -
4226 -
4228 tree = self.parse(_bytes('<!--hi--><a><!--ho--><b/></a><!--hu-->')) -4229 s = etree.tostring(tree, method='c14n') -4230 self.assertEqual(_bytes('<!--hi-->\n<a><!--ho--><b></b></a>\n<!--hu-->'), -4231 s) -4232 s = etree.tostring(tree, method='c14n', with_comments=True) -4233 self.assertEqual(_bytes('<!--hi-->\n<a><!--ho--><b></b></a>\n<!--hu-->'), -4234 s) -4235 s = etree.tostring(tree, method='c14n', with_comments=False) -4236 self.assertEqual(_bytes('<a><b></b></a>'), -4237 s) -
4238 -
4240 tree = self.parse(_bytes('<!--hi--><a><!--ho--><b/></a><!--hu-->')) -4241 s = etree.tostring(tree.getroot(), method='c14n') -4242 self.assertEqual(_bytes('<a><!--ho--><b></b></a>'), -4243 s) -4244 s = etree.tostring(tree.getroot(), method='c14n', with_comments=True) -4245 self.assertEqual(_bytes('<a><!--ho--><b></b></a>'), -4246 s) -4247 s = etree.tostring(tree.getroot(), method='c14n', with_comments=False) -4248 self.assertEqual(_bytes('<a><b></b></a>'), -4249 s) -
4250 -
4251 - def test_c14n_exclusive(self): -
4252 tree = self.parse(_bytes( -4253 '<a xmlns="http://abc" xmlns:y="http://bcd" xmlns:z="http://cde"><z:b/></a>')) -4254 f = BytesIO() -4255 tree.write_c14n(f) -4256 s = f.getvalue() -4257 self.assertEqual(_bytes('<a xmlns="http://abc" xmlns:y="http://bcd" xmlns:z="http://cde"><z:b></z:b></a>'), -4258 s) -4259 f = BytesIO() -4260 tree.write_c14n(f, exclusive=False) -4261 s = f.getvalue() -4262 self.assertEqual(_bytes('<a xmlns="http://abc" xmlns:y="http://bcd" xmlns:z="http://cde"><z:b></z:b></a>'), -4263 s) -4264 f = BytesIO() -4265 tree.write_c14n(f, exclusive=True) -4266 s = f.getvalue() -4267 self.assertEqual(_bytes('<a xmlns="http://abc"><z:b xmlns:z="http://cde"></z:b></a>'), -4268 s) -4269 -4270 f = BytesIO() -4271 tree.write_c14n(f, exclusive=True, inclusive_ns_prefixes=['z']) -4272 s = f.getvalue() -4273 self.assertEqual(_bytes('<a xmlns="http://abc" xmlns:z="http://cde"><z:b></z:b></a>'), -4274 s) -
4275 -
4277 tree = self.parse(_bytes( -4278 '<a xmlns="http://abc" xmlns:y="http://bcd" xmlns:z="http://cde"><z:b/></a>')) -4279 s = etree.tostring(tree, method='c14n') -4280 self.assertEqual(_bytes('<a xmlns="http://abc" xmlns:y="http://bcd" xmlns:z="http://cde"><z:b></z:b></a>'), -4281 s) -4282 s = etree.tostring(tree, method='c14n', exclusive=False) -4283 self.assertEqual(_bytes('<a xmlns="http://abc" xmlns:y="http://bcd" xmlns:z="http://cde"><z:b></z:b></a>'), -4284 s) -4285 s = etree.tostring(tree, method='c14n', exclusive=True) -4286 self.assertEqual(_bytes('<a xmlns="http://abc"><z:b xmlns:z="http://cde"></z:b></a>'), -4287 s) -4288 -4289 s = etree.tostring(tree, method='c14n', exclusive=True, inclusive_ns_prefixes=['y']) -4290 self.assertEqual(_bytes('<a xmlns="http://abc" xmlns:y="http://bcd"><z:b xmlns:z="http://cde"></z:b></a>'), -4291 s) -
4292 -
4294 tree = self.parse(_bytes( -4295 '<a xmlns="http://abc" xmlns:y="http://bcd" xmlns:z="http://cde"><z:b/></a>')) -4296 s = etree.tostring(tree.getroot(), method='c14n') -4297 self.assertEqual(_bytes('<a xmlns="http://abc" xmlns:y="http://bcd" xmlns:z="http://cde"><z:b></z:b></a>'), -4298 s) -4299 s = etree.tostring(tree.getroot(), method='c14n', exclusive=False) -4300 self.assertEqual(_bytes('<a xmlns="http://abc" xmlns:y="http://bcd" xmlns:z="http://cde"><z:b></z:b></a>'), -4301 s) -4302 s = etree.tostring(tree.getroot(), method='c14n', exclusive=True) -4303 self.assertEqual(_bytes('<a xmlns="http://abc"><z:b xmlns:z="http://cde"></z:b></a>'), -4304 s) -4305 -4306 s = etree.tostring(tree.getroot()[0], method='c14n', exclusive=False) -4307 self.assertEqual(_bytes('<z:b xmlns="http://abc" xmlns:y="http://bcd" xmlns:z="http://cde"></z:b>'), -4308 s) -4309 s = etree.tostring(tree.getroot()[0], method='c14n', exclusive=True) -4310 self.assertEqual(_bytes('<z:b xmlns:z="http://cde"></z:b>'), -4311 s) -4312 -4313 s = etree.tostring(tree.getroot()[0], method='c14n', exclusive=True, inclusive_ns_prefixes=['y']) -4314 self.assertEqual(_bytes('<z:b xmlns:y="http://bcd" xmlns:z="http://cde"></z:b>'), -4315 s) -
4316 -
4318 """ Regression test to fix memory allocation issues (use 3+ inclusive NS spaces)""" -4319 tree = self.parse(_bytes( -4320 '<a xmlns:x="http://abc" xmlns:y="http://bcd" xmlns:z="http://cde"><z:b/></a>')) -4321 -4322 s = etree.tostring(tree, method='c14n', exclusive=True, inclusive_ns_prefixes=['x', 'y', 'z']) -4323 self.assertEqual(_bytes('<a xmlns:x="http://abc" xmlns:y="http://bcd" xmlns:z="http://cde"><z:b></z:b></a>'), -4324 s) -
4325 -
4326 -4327 -class ETreeWriteTestCase(HelperTestCase): -
4328 - def test_write(self): -
4329 tree = self.parse(_bytes('<a><b/></a>')) -4330 f = BytesIO() -4331 tree.write(f) -4332 s = f.getvalue() -4333 self.assertEqual(_bytes('<a><b/></a>'), -4334 s) -
4335 -
4336 - def test_write_doctype(self): -
4337 tree = self.parse(_bytes('<a><b/></a>')) -4338 f = BytesIO() -4339 tree.write(f, doctype='HUHU') -4340 s = f.getvalue() -4341 self.assertEqual(_bytes('HUHU\n<a><b/></a>'), -4342 s) -
4343 -
4344 - def test_write_gzip(self): -
4345 tree = self.parse(_bytes('<a>'+'<b/>'*200+'</a>')) -4346 f = BytesIO() -4347 tree.write(f, compression=9) -4348 with closing(gzip.GzipFile(fileobj=BytesIO(f.getvalue()))) as gzfile: -4349 s = gzfile.read() -4350 self.assertEqual(_bytes('<a>'+'<b/>'*200+'</a>'), -4351 s) -
4352 -
4353 - def test_write_gzip_doctype(self): -
4354 tree = self.parse(_bytes('<a>'+'<b/>'*200+'</a>')) -4355 f = BytesIO() -4356 tree.write(f, compression=9, doctype='<!DOCTYPE a>') -4357 with closing(gzip.GzipFile(fileobj=BytesIO(f.getvalue()))) as gzfile: -4358 s = gzfile.read() -4359 self.assertEqual(_bytes('<!DOCTYPE a>\n<a>'+'<b/>'*200+'</a>'), -4360 s) -
4361 -
4362 - def test_write_gzip_level(self): -
4363 tree = self.parse(_bytes('<a>'+'<b/>'*200+'</a>')) -4364 f = BytesIO() -4365 tree.write(f, compression=0) -4366 s0 = f.getvalue() -4367 -4368 f = BytesIO() -4369 tree.write(f) -4370 self.assertEqual(f.getvalue(), s0) -4371 -4372 f = BytesIO() -4373 tree.write(f, compression=1) -4374 s = f.getvalue() -4375 self.assertTrue(len(s) <= len(s0)) -4376 with closing(gzip.GzipFile(fileobj=BytesIO(s))) as gzfile: -4377 s1 = gzfile.read() -4378 -4379 f = BytesIO() -4380 tree.write(f, compression=9) -4381 s = f.getvalue() -4382 self.assertTrue(len(s) <= len(s0)) -4383 with closing(gzip.GzipFile(fileobj=BytesIO(s))) as gzfile: -4384 s9 = gzfile.read() -4385 -4386 self.assertEqual(_bytes('<a>'+'<b/>'*200+'</a>'), -4387 s0) -4388 self.assertEqual(_bytes('<a>'+'<b/>'*200+'</a>'), -4389 s1) -4390 self.assertEqual(_bytes('<a>'+'<b/>'*200+'</a>'), -4391 s9) -
4392 -
4393 - def test_write_file(self): -
4394 tree = self.parse(_bytes('<a><b/></a>')) -4395 with tmpfile() as filename: -4396 tree.write(filename) -4397 data = read_file(filename, 'rb') -4398 self.assertEqual(_bytes('<a><b/></a>'), -4399 data) -
4400 -
4401 - def test_write_file_gzip(self): -
4402 tree = self.parse(_bytes('<a>'+'<b/>'*200+'</a>')) -4403 with tmpfile() as filename: -4404 tree.write(filename, compression=9) -4405 with closing(gzip.open(filename, 'rb')) as f: -4406 data = f.read() -4407 self.assertEqual(_bytes('<a>'+'<b/>'*200+'</a>'), -4408 data) -
4409 -
4410 - def test_write_file_gzip_parse(self): -
4411 tree = self.parse(_bytes('<a>'+'<b/>'*200+'</a>')) -4412 with tmpfile() as filename: -4413 tree.write(filename, compression=9) -4414 data = etree.tostring(etree.parse(filename)) -4415 self.assertEqual(_bytes('<a>'+'<b/>'*200+'</a>'), -4416 data) -
4417 -
4419 tree = self.parse(_bytes('<a>'+'<b/>'*200+'</a>')) -4420 with tmpfile() as filename: -4421 tree.write(filename, compression=9) -4422 with closing(gzip.GzipFile(filename)) as f: -4423 data = etree.tostring(etree.parse(f)) -4424 self.assertEqual(_bytes('<a>'+'<b/>'*200+'</a>'), -4425 data) -
4426 -
4427 -4428 -class ETreeErrorLogTest(HelperTestCase): -
4429 etree = etree -4430 -
4431 - def test_parse_error_logging(self): -
4432 parse = self.etree.parse -4433 f = BytesIO('<a><b></c></b></a>') -4434 self.etree.clear_error_log() -4435 try: -4436 parse(f) -4437 logs = None -4438 except SyntaxError: -4439 e = sys.exc_info()[1] -4440 logs = e.error_log -4441 f.close() -4442 self.assertTrue([ log for log in logs -4443 if 'mismatch' in log.message ]) -4444 self.assertTrue([ log for log in logs -4445 if 'PARSER' in log.domain_name]) -4446 self.assertTrue([ log for log in logs -4447 if 'ERR_TAG_NAME_MISMATCH' in log.type_name ]) -4448 self.assertTrue([ log for log in logs -4449 if 1 == log.line ]) -4450 self.assertTrue([ log for log in logs -4451 if 15 == log.column ]) -
4452 -
4453 - def _test_python_error_logging(self): -
4454 """This can't really be tested as long as there isn't a way to -4455 reset the logging setup ... -4456 """ -4457 parse = self.etree.parse -4458 -4459 messages = [] -4460 class Logger(self.etree.PyErrorLog): -4461 def log(self, entry, message, *args): -4462 messages.append(message) -
4463 -4464 self.etree.use_global_python_log(Logger()) -4465 f = BytesIO('<a><b></c></b></a>') -4466 try: -4467 parse(f) -4468 except SyntaxError: -4469 pass -4470 f.close() -4471 -4472 self.assertTrue([ message for message in messages -4473 if 'mismatch' in message ]) -4474 self.assertTrue([ message for message in messages -4475 if ':PARSER:' in message]) -4476 self.assertTrue([ message for message in messages -4477 if ':ERR_TAG_NAME_MISMATCH:' in message ]) -4478 self.assertTrue([ message for message in messages -4479 if ':1:15:' in message ]) -4480 -
4481 -4482 -class XMLPullParserTest(unittest.TestCase): -
4483 etree = etree -4484 -
4485 - def assert_event_tags(self, events, expected): -
4486 self.assertEqual([(action, elem.tag) for action, elem in events], -4487 expected) -
4488 -
4490 class Target(object): -4491 def start(self, tag, attrib): -4492 return 'start(%s)' % tag -
4493 def end(self, tag): -4494 return 'end(%s)' % tag -
4495 def close(self): -4496 return 'close()' -4497 -4498 parser = self.etree.XMLPullParser(target=Target()) -4499 events = parser.read_events() -4500 -4501 parser.feed('<root><element>') -4502 self.assertFalse(list(events)) -4503 self.assertFalse(list(events)) -4504 parser.feed('</element><child>') -4505 self.assertEqual([('end', 'end(element)')], list(events)) -4506 parser.feed('</child>') -4507 self.assertEqual([('end', 'end(child)')], list(events)) -4508 parser.feed('</root>') -4509 self.assertEqual([('end', 'end(root)')], list(events)) -4510 self.assertFalse(list(events)) -4511 self.assertEqual('close()', parser.close()) -4512 -
4514 class Target(object): -4515 def start(self, tag, attrib): -4516 return 'start(%s)' % tag -
4517 def end(self, tag): -4518 return 'end(%s)' % tag -4519 def close(self): -4520 return 'close()' -4521 -4522 parser = self.etree.XMLPullParser( -4523 ['start', 'end'], target=Target()) -4524 events = parser.read_events() -4525 -4526 parser.feed('<root><element>') -4527 self.assertEqual( -4528 [('start', 'start(root)'), ('start', 'start(element)')], -4529 list(events)) -4530 self.assertFalse(list(events)) -4531 parser.feed('</element><child>') -4532 self.assertEqual( -4533 [('end', 'end(element)'), ('start', 'start(child)')], -4534 list(events)) -4535 parser.feed('</child>') -4536 self.assertEqual( -4537 [('end', 'end(child)')], -4538 list(events)) -4539 parser.feed('</root>') -4540 self.assertEqual( -4541 [('end', 'end(root)')], -4542 list(events)) -4543 self.assertFalse(list(events)) -4544 self.assertEqual('close()', parser.close()) -4545 -
4546 - def test_pull_from_tree_builder(self): -
4547 parser = self.etree.XMLPullParser( -4548 ['start', 'end'], target=etree.TreeBuilder()) -4549 events = parser.read_events() -4550 -4551 parser.feed('<root><element>') -4552 self.assert_event_tags( -4553 events, [('start', 'root'), ('start', 'element')]) -4554 self.assertFalse(list(events)) -4555 parser.feed('</element><child>') -4556 self.assert_event_tags( -4557 events, [('end', 'element'), ('start', 'child')]) -4558 parser.feed('</child>') -4559 self.assert_event_tags( -4560 events, [('end', 'child')]) -4561 parser.feed('</root>') -4562 self.assert_event_tags( -4563 events, [('end', 'root')]) -4564 self.assertFalse(list(events)) -4565 root = parser.close() -4566 self.assertEqual('root', root.tag) -
4567 -
4569 class Target(etree.TreeBuilder): -4570 def end(self, tag): -4571 el = super(Target, self).end(tag) -4572 el.tag += '-huhu' -4573 return el -
4574 -4575 parser = self.etree.XMLPullParser( -4576 ['start', 'end'], target=Target()) -4577 events = parser.read_events() -4578 -4579 parser.feed('<root><element>') -4580 self.assert_event_tags( -4581 events, [('start', 'root'), ('start', 'element')]) -4582 self.assertFalse(list(events)) -4583 parser.feed('</element><child>') -4584 self.assert_event_tags( -4585 events, [('end', 'element-huhu'), ('start', 'child')]) -4586 parser.feed('</child>') -4587 self.assert_event_tags( -4588 events, [('end', 'child-huhu')]) -4589 parser.feed('</root>') -4590 self.assert_event_tags( -4591 events, [('end', 'root-huhu')]) -4592 self.assertFalse(list(events)) -4593 root = parser.close() -4594 self.assertEqual('root-huhu', root.tag) -4595 -
4596 -4597 -def test_suite(): -
4598 suite = unittest.TestSuite() -4599 suite.addTests([unittest.makeSuite(ETreeOnlyTestCase)]) -4600 suite.addTests([unittest.makeSuite(ETreeXIncludeTestCase)]) -4601 suite.addTests([unittest.makeSuite(ElementIncludeTestCase)]) -4602 suite.addTests([unittest.makeSuite(ETreeC14NTestCase)]) -4603 suite.addTests([unittest.makeSuite(ETreeWriteTestCase)]) -4604 suite.addTests([unittest.makeSuite(ETreeErrorLogTest)]) -4605 suite.addTests([unittest.makeSuite(XMLPullParserTest)]) -4606 -4607 # add original doctests from ElementTree selftest modules -4608 from . import selftest, selftest2 -4609 suite.addTests(doctest.DocTestSuite(selftest)) -4610 suite.addTests(doctest.DocTestSuite(selftest2)) -4611 -4612 # add doctests -4613 suite.addTests(doctest.DocTestSuite(etree)) -4614 suite.addTests( -4615 [make_doctest('../../../doc/tutorial.txt')]) -4616 if sys.version_info >= (2,6): -4617 # now requires the 'with' statement -4618 suite.addTests( -4619 [make_doctest('../../../doc/api.txt')]) -4620 suite.addTests( -4621 [make_doctest('../../../doc/FAQ.txt')]) -4622 suite.addTests( -4623 [make_doctest('../../../doc/parsing.txt')]) -4624 suite.addTests( -4625 [make_doctest('../../../doc/resolvers.txt')]) -4626 return suite -
4627 -4628 -4629 if __name__ == '__main__': -4630 print('to test use test.py %s' % __file__) -4631 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_etree.ETreeC14NTestCase-class.html b/doc/html/api/lxml.tests.test_etree.ETreeC14NTestCase-class.html deleted file mode 100644 index 26dd73f..0000000 --- a/doc/html/api/lxml.tests.test_etree.ETreeC14NTestCase-class.html +++ /dev/null @@ -1,522 +0,0 @@ - - - - - lxml.tests.test_etree.ETreeC14NTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_etree :: - Class ETreeC14NTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ETreeC14NTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ETreeC14NTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_c14n(self) - source code - -
- -
-   - - - - - - -
test_c14n_gzip(self) - source code - -
- -
-   - - - - - - -
test_c14n_file(self) - source code - -
- -
-   - - - - - - -
test_c14n_file_gzip(self) - source code - -
- -
-   - - - - - - -
test_c14n_with_comments(self) - source code - -
- -
-   - - - - - - -
test_c14n_tostring_with_comments(self) - source code - -
- -
-   - - - - - - -
test_c14n_element_tostring_with_comments(self) - source code - -
- -
-   - - - - - - -
test_c14n_exclusive(self) - source code - -
- -
-   - - - - - - -
test_c14n_tostring_exclusive(self) - source code - -
- -
-   - - - - - - -
test_c14n_element_tostring_exclusive(self) - source code - -
- -
-   - - - - - - -
test_c14n_tostring_inclusive_ns_prefixes(self)
- Regression test to fix memory allocation issues (use 3+ inclusive NS spaces)
- source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_etree.ETreeErrorLogTest-class.html b/doc/html/api/lxml.tests.test_etree.ETreeErrorLogTest-class.html deleted file mode 100644 index 3ac49d9..0000000 --- a/doc/html/api/lxml.tests.test_etree.ETreeErrorLogTest-class.html +++ /dev/null @@ -1,421 +0,0 @@ - - - - - lxml.tests.test_etree.ETreeErrorLogTest - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_etree :: - Class ETreeErrorLogTest - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ETreeErrorLogTest

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ETreeErrorLogTest
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_parse_error_logging(self) - source code - -
- -
-   - - - - - - -
_test_python_error_logging(self)
- This can't really be tested as long as there isn't a way to -reset the logging setup ...
- source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - etree
- The lxml.etree module implements the extended ElementTree API for XML. -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

etree

- The lxml.etree module implements the extended ElementTree API for XML. -
-
-
-
Value:
-
lxml.etree
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_etree.ETreeOnlyTestCase-class.html b/doc/html/api/lxml.tests.test_etree.ETreeOnlyTestCase-class.html deleted file mode 100644 index 362e47f..0000000 --- a/doc/html/api/lxml.tests.test_etree.ETreeOnlyTestCase-class.html +++ /dev/null @@ -1,4619 +0,0 @@ - - - - - lxml.tests.test_etree.ETreeOnlyTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_etree :: - Class ETreeOnlyTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ETreeOnlyTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ETreeOnlyTestCase
-
- -
-Tests only for etree, not ElementTree - - - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_version(self) - source code - -
- -
-   - - - - - - -
test_c_api(self) - source code - -
- -
-   - - - - - - -
test_include_paths(self) - source code - -
- -
-   - - - - - - -
test_element_names(self) - source code - -
- -
-   - - - - - - -
test_element_name_empty(self) - source code - -
- -
-   - - - - - - -
test_element_name_colon(self) - source code - -
- -
-   - - - - - - -
test_element_name_quote(self) - source code - -
- -
-   - - - - - - -
test_element_name_space(self) - source code - -
- -
-   - - - - - - -
test_subelement_name_empty(self) - source code - -
- -
-   - - - - - - -
test_subelement_name_colon(self) - source code - -
- -
-   - - - - - - -
test_subelement_name_quote(self) - source code - -
- -
-   - - - - - - -
test_subelement_name_space(self) - source code - -
- -
-   - - - - - - -
test_subelement_attribute_invalid(self) - source code - -
- -
-   - - - - - - -
test_qname_empty(self) - source code - -
- -
-   - - - - - - -
test_qname_none(self) - source code - -
- -
-   - - - - - - -
test_qname_colon(self) - source code - -
- -
-   - - - - - - -
test_qname_space(self) - source code - -
- -
-   - - - - - - -
test_qname_namespace_localname(self) - source code - -
- -
-   - - - - - - -
test_qname_element(self) - source code - -
- -
-   - - - - - - -
test_qname_text_resolve(self) - source code - -
- -
-   - - - - - - -
test_nsmap_prefix_invalid(self) - source code - -
- -
-   - - - - - - -
test_attribute_has_key(self) - source code - -
- -
-   - - - - - - -
test_attribute_set(self) - source code - -
- -
-   - - - - - - -
test_attribute_set_nonstring(self) - source code - -
- -
-   - - - - - - -
test_attrib_and_keywords(self) - source code - -
- -
-   - - - - - - -
test_attrib_order(self) - source code - -
- -
-   - - - - - - -
test_attribute_set_invalid(self) - source code - -
- -
-   - - - - - - -
test_strip_attributes(self) - source code - -
- -
-   - - - - - - -
test_strip_attributes_ns(self) - source code - -
- -
-   - - - - - - -
test_strip_elements(self) - source code - -
- -
-   - - - - - - -
test_strip_elements_ns(self) - source code - -
- -
-   - - - - - - -
test_strip_tags(self) - source code - -
- -
-   - - - - - - -
test_strip_tags_pi_comment(self) - source code - -
- -
-   - - - - - - -
test_strip_tags_pi_comment_all(self) - source code - -
- -
-   - - - - - - -
test_strip_tags_doc_style(self) - source code - -
- -
-   - - - - - - -
test_strip_tags_ns(self) - source code - -
- -
-   - - - - - - -
test_strip_tags_and_remove(self) - source code - -
- -
-   - - - - - - -
test_pi(self) - source code - -
- -
-   - - - - - - -
test_pi_parse(self) - source code - -
- -
-   - - - - - - -
test_pi_pseudo_attributes_get(self) - source code - -
- -
-   - - - - - - -
test_pi_pseudo_attributes_attrib(self) - source code - -
- -
-   - - - - - - -
test_deepcopy_pi(self) - source code - -
- -
-   - - - - - - -
test_deepcopy_elementtree_pi(self) - source code - -
- -
-   - - - - - - -
test_deepcopy_elementtree_dtd(self) - source code - -
- -
-   - - - - - - -
test_deepcopy_pi_dtd(self) - source code - -
- -
-   - - - - - - -
test_parse_remove_comments(self) - source code - -
- -
-   - - - - - - -
test_parse_remove_pis(self) - source code - -
- -
-   - - - - - - -
test_parse_parser_type_error(self) - source code - -
- -
-   - - - - - - -
test_iterparse_tree_comments(self) - source code - -
- -
-   - - - - - - -
test_iterparse_comments(self) - source code - -
- -
-   - - - - - - -
test_iterparse_pis(self) - source code - -
- -
-   - - - - - - -
test_iterparse_remove_comments(self) - source code - -
- -
-   - - - - - - -
test_iterparse_broken(self) - source code - -
- -
-   - - - - - - -
test_iterparse_broken_recover(self) - source code - -
- -
-   - - - - - - -
test_iterparse_broken_multi_recover(self) - source code - -
- -
-   - - - - - - -
test_iterparse_strip(self) - source code - -
- -
-   - - - - - - -
test_iterparse_tag(self) - source code - -
- -
-   - - - - - - -
test_iterparse_tag_all(self) - source code - -
- -
-   - - - - - - -
test_iterparse_tag_ns(self) - source code - -
- -
-   - - - - - - -
test_iterparse_tag_ns_empty(self) - source code - -
- -
-   - - - - - - -
test_iterparse_tag_ns_all(self) - source code - -
- -
-   - - - - - - -
test_iterparse_tag_ns_empty_all(self) - source code - -
- -
-   - - - - - - -
test_iterparse_encoding_error(self) - source code - -
- -
-   - - - - - - -
test_iterparse_encoding_8bit_override(self) - source code - -
- -
-   - - - - - - -
test_iterparse_keep_cdata(self) - source code - -
- -
-   - - - - - - -
test_parser_encoding_unknown(self) - source code - -
- -
-   - - - - - - -
test_parser_encoding(self) - source code - -
- -
-   - - - - - - -
test_feed_parser_recover(self) - source code - -
- -
-   - - - - - - -
test_feed_parser_recover_no_id_dict(self) - source code - -
- -
-   - - - - - - -
test_elementtree_parser_target_type_error(self) - source code - -
- -
-   - - - - - - -
test_parser_target_feed_exception(self) - source code - -
- -
-   - - - - - - -
test_parser_target_fromstring_exception(self) - source code - -
- -
-   - - - - - - -
test_parser_target_feed_no_id_dict(self) - source code - -
- -
-   - - - - - - -
test_parser_target_comment(self) - source code - -
- -
-   - - - - - - -
test_parser_target_pi(self) - source code - -
- -
-   - - - - - - -
test_parser_target_cdata(self) - source code - -
- -
-   - - - - - - -
test_parser_target_recover(self) - source code - -
- -
-   - - - - - - -
test_iterwalk_tag(self) - source code - -
- -
-   - - - - - - -
test_iterwalk_tag_all(self) - source code - -
- -
-   - - - - - - -
test_iterwalk(self) - source code - -
- -
-   - - - - - - -
test_iterwalk_start(self) - source code - -
- -
-   - - - - - - -
test_iterwalk_start_end(self) - source code - -
- -
-   - - - - - - -
test_iterwalk_start_tags(self) - source code - -
- -
-   - - - - - - -
test_iterwalk_start_end_tags(self) - source code - -
- -
-   - - - - - - -
test_iterwalk_start_end_tags_with_root(self) - source code - -
- -
-   - - - - - - -
test_iterwalk_clear(self) - source code - -
- -
-   - - - - - - -
test_iterwalk_attrib_ns(self) - source code - -
- -
-   - - - - - - -
test_iterwalk_end_skip(self) - source code - -
- -
-   - - - - - - -
test_iterwalk_start_end_skip(self) - source code - -
- -
-   - - - - - - -
test_iterwalk_ns_skip(self) - source code - -
- -
-   - - - - - - -
test_iterwalk_getiterator(self) - source code - -
- -
-   - - - - - - -
test_resolve_string_dtd(self) - source code - -
- -
-   - - - - - - -
test_resolve_bytes_dtd(self) - source code - -
- -
-   - - - - - - -
test_resolve_filelike_dtd(self) - source code - -
- -
-   - - - - - - -
test_resolve_filename_dtd(self) - source code - -
- -
-   - - - - - - -
test_resolve_filename_dtd_relative(self) - source code - -
- -
-   - - - - - - -
test_resolve_file_dtd(self) - source code - -
- -
-   - - - - - - -
test_resolve_empty(self) - source code - -
- -
-   - - - - - - -
test_resolve_error(self) - source code - -
- -
-   - - - - - - -
test_entity_parse(self) - source code - -
- -
-   - - - - - - -
test_entity_restructure(self) - source code - -
- -
-   - - - - - - -
test_entity_append(self) - source code - -
- -
-   - - - - - - -
test_entity_values(self) - source code - -
- -
-   - - - - - - -
test_entity_error(self) - source code - -
- -
-   - - - - - - -
test_cdata(self) - source code - -
- -
-   - - - - - - -
test_cdata_tail(self) - source code - -
- -
-   - - - - - - -
test_cdata_type(self) - source code - -
- -
-   - - - - - - -
test_cdata_errors(self) - source code - -
- -
-   - - - - - - -
test_cdata_parser(self) - source code - -
- -
-   - - - - - - -
test_cdata_xpath(self) - source code - -
- -
-   - - - - - - -
test_setitem_assert(self) - source code - -
- -
-   - - - - - - -
test_append_error(self) - source code - -
- -
-   - - - - - - -
test_append_recursive_error(self) - source code - -
- -
-   - - - - - - -
test_addnext(self) - source code - -
- -
-   - - - - - - -
test_addprevious(self) - source code - -
- -
-   - - - - - - -
test_addnext_cycle(self) - source code - -
- -
-   - - - - - - -
test_addprevious_cycle(self) - source code - -
- -
-   - - - - - - -
test_addnext_cycle_long(self) - source code - -
- -
-   - - - - - - -
test_addprevious_cycle_long(self) - source code - -
- -
-   - - - - - - -
test_addprevious_noops(self) - source code - -
- -
-   - - - - - - -
test_addnext_noops(self) - source code - -
- -
-   - - - - - - -
test_addnext_root(self) - source code - -
- -
-   - - - - - - -
test_addprevious_pi(self) - source code - -
- -
-   - - - - - - -
test_addprevious_root_pi(self) - source code - -
- -
-   - - - - - - -
test_addnext_pi(self) - source code - -
- -
-   - - - - - - -
test_addnext_root_pi(self) - source code - -
- -
-   - - - - - - -
test_addnext_comment(self) - source code - -
- -
-   - - - - - - -
test_addnext_root_comment(self) - source code - -
- -
-   - - - - - - -
test_addprevious_comment(self) - source code - -
- -
-   - - - - - - -
test_addprevious_root_comment(self) - source code - -
- -
-   - - - - - - -
test_attribute_values(self) - source code - -
- -
-   - - - - - - -
test_comment_empty(self) - source code - -
- -
-   - - - - - - -
test_comment_parse_empty(self) - source code - -
- -
-   - - - - - - -
test_comment_no_proxy_yet(self) - source code - -
- -
-   - - - - - - -
test_comment_immutable(self) - source code - -
- -
-   - - - - - - -
test_comment_immutable_attrib(self) - source code - -
- -
-   - - - - - - -
test_dump_none(self) - source code - -
- -
-   - - - - - - -
test_prefix(self) - source code - -
- -
-   - - - - - - -
test_prefix_default_ns(self) - source code - -
- -
-   - - - - - - -
test_getparent(self) - source code - -
- -
-   - - - - - - -
test_iterchildren(self) - source code - -
- -
-   - - - - - - -
test_iterchildren_reversed(self) - source code - -
- -
-   - - - - - - -
test_iterchildren_tag(self) - source code - -
- -
-   - - - - - - -
test_iterchildren_tag_posarg(self) - source code - -
- -
-   - - - - - - -
test_iterchildren_tag_reversed(self) - source code - -
- -
-   - - - - - - -
test_iterchildren_tag_multiple(self) - source code - -
- -
-   - - - - - - -
test_iterchildren_tag_multiple_posarg(self) - source code - -
- -
-   - - - - - - -
test_iterchildren_tag_multiple_reversed(self) - source code - -
- -
-   - - - - - - -
test_iterancestors(self) - source code - -
- -
-   - - - - - - -
test_iterancestors_tag(self) - source code - -
- -
-   - - - - - - -
test_iterancestors_tag_multiple(self) - source code - -
- -
-   - - - - - - -
test_iterdescendants(self) - source code - -
- -
-   - - - - - - -
test_iterdescendants_tag(self) - source code - -
- -
-   - - - - - - -
test_iterdescendants_tag_multiple(self) - source code - -
- -
-   - - - - - - -
test_getroottree(self) - source code - -
- -
-   - - - - - - -
test_getnext(self) - source code - -
- -
-   - - - - - - -
test_getprevious(self) - source code - -
- -
-   - - - - - - -
test_itersiblings(self) - source code - -
- -
-   - - - - - - -
test_itersiblings_tag(self) - source code - -
- -
-   - - - - - - -
test_itersiblings_tag_multiple(self) - source code - -
- -
-   - - - - - - -
test_parseid(self) - source code - -
- -
-   - - - - - - -
test_XMLDTDID(self) - source code - -
- -
-   - - - - - - -
test_XMLDTDID_empty(self) - source code - -
- -
-   - - - - - - -
test_XMLDTDID_no_id_dict(self) - source code - -
- -
-   - - - - - - -
_checkIDDict(self, - dic, - expected) - source code - -
- -
-   - - - - - - -
test_namespaces(self) - source code - -
- -
-   - - - - - - -
test_namespaces_default(self) - source code - -
- -
-   - - - - - - -
test_namespaces_default_and_other(self) - source code - -
- -
-   - - - - - - -
test_namespaces_default_and_attr(self) - source code - -
- -
-   - - - - - - -
test_attribute_keeps_namespace_prefix_on_merge(self) - source code - -
- -
-   - - - - - - -
test_attribute_keeps_namespace_prefix_on_merge_with_nons(self) - source code - -
- -
-   - - - - - - -
test_attribute_gets_namespace_prefix_on_merge_with_nons(self) - source code - -
- -
-   - - - - - - -
test_attribute_gets_namespace_prefix_on_merge(self) - source code - -
- -
-   - - - - - - -
test_namespaces_elementtree(self) - source code - -
- -
-   - - - - - - -
test_namespaces_default_copy_element(self) - source code - -
- -
-   - - - - - - -
test_namespaces_copy_element(self) - source code - -
- -
-   - - - - - - -
test_namespaces_reuse_after_move(self) - source code - -
- -
-   - - - - - - -
test_namespace_cleanup(self) - source code - -
- -
-   - - - - - - -
test_namespace_cleanup_attributes(self) - source code - -
- -
-   - - - - - - -
test_namespace_cleanup_many(self) - source code - -
- -
-   - - - - - - -
test_namespace_cleanup_deep(self) - source code - -
- -
-   - - - - - - -
test_namespace_cleanup_deep_to_top(self) - source code - -
- -
-   - - - - - - -
test_namespace_cleanup_keep_prefixes(self) - source code - -
- -
-   - - - - - - -
test_namespace_cleanup_keep_prefixes_top(self) - source code - -
- -
-   - - - - - - -
test_element_nsmap(self) - source code - -
- -
-   - - - - - - -
test_subelement_nsmap(self) - source code - -
- -
-   - - - - - - -
test_html_prefix_nsmap(self) - source code - -
- -
-   - - - - - - -
test_getiterator_filter_multiple(self) - source code - -
- -
-   - - - - - - -
test_getiterator_filter_multiple_tuple(self) - source code - -
- -
-   - - - - - - -
test_getiterator_filter_namespace(self) - source code - -
- -
-   - - - - - - -
test_getiterator_filter_local_name(self) - source code - -
- -
-   - - - - - - -
test_getiterator_filter_entities(self) - source code - -
- -
-   - - - - - - -
test_getiterator_filter_element(self) - source code - -
- -
-   - - - - - - -
test_getiterator_filter_all_comment_pi(self) - source code - -
- -
-   - - - - - - -
test_elementtree_getelementpath(self) - source code - -
- -
-   - - - - - - -
test_elementtree_getelementpath_ns(self) - source code - -
- -
-   - - - - - - -
test_elementtree_find_qname(self) - source code - -
- -
-   - - - - - - -
test_elementtree_findall_qname(self) - source code - -
- -
-   - - - - - - -
test_elementtree_findall_ns_qname(self) - source code - -
- -
-   - - - - - - -
test_findall_ns(self) - source code - -
- -
-   - - - - - - -
test_findall_different_nsmaps(self) - source code - -
- -
-   - - - - - - -
test_findall_empty_prefix(self) - source code - -
- -
-   - - - - - - -
test_findall_syntax_error(self) - source code - -
- -
-   - - - - - - -
test_index(self) - source code - -
- -
-   - - - - - - -
test_replace(self) - source code - -
- -
-   - - - - - - -
test_replace_new(self) - source code - -
- -
-   - - - - - - -
test_setslice_all_empty_reversed(self) - source code - -
- -
-   - - - - - - -
test_setslice_step(self) - source code - -
- -
-   - - - - - - -
test_setslice_step_negative(self) - source code - -
- -
-   - - - - - - -
test_setslice_step_negative2(self) - source code - -
- -
-   - - - - - - -
test_setslice_step_overrun(self) - source code - -
- -
-   - - - - - - -
test_sourceline_XML(self) - source code - -
- -
-   - - - - - - -
test_large_sourceline_XML(self) - source code - -
- -
-   - - - - - - -
test_sourceline_parse(self) - source code - -
- -
-   - - - - - - -
test_sourceline_iterparse_end(self) - source code - -
- -
-   - - - - - - -
test_sourceline_iterparse_start(self) - source code - -
- -
-   - - - - - - -
test_sourceline_element(self) - source code - -
- -
-   - - - - - - -
test_XML_base_url_docinfo(self) - source code - -
- -
-   - - - - - - -
test_XML_set_base_url_docinfo(self) - source code - -
- -
-   - - - - - - -
test_parse_stringio_base_url(self) - source code - -
- -
-   - - - - - - -
test_parse_base_url_docinfo(self) - source code - -
- -
-   - - - - - - -
test_HTML_base_url_docinfo(self) - source code - -
- -
-   - - - - - - -
test_docinfo_public(self) - source code - -
- -
-   - - - - - - -
test_docinfo_system(self) - source code - -
- -
-   - - - - - - -
test_docinfo_empty(self) - source code - -
- -
-   - - - - - - -
test_docinfo_name_only(self) - source code - -
- -
-   - - - - - - -
test_doctype_name_only_roundtrip(self) - source code - -
- -
-   - - - - - - -
test_doctype_output_override(self) - source code - -
- -
-   - - - - - - -
test_xml_base(self) - source code - -
- -
-   - - - - - - -
test_xml_base_attribute(self) - source code - -
- -
-   - - - - - - -
test_html_base(self) - source code - -
- -
-   - - - - - - -
test_html_base_tag(self) - source code - -
- -
-   - - - - - - -
test_parse_fileobject_unicode(self) - source code - -
- -
-   - - - - - - -
test_dtd_io(self) - source code - -
- -
-   - - - - - - -
test_byte_zero(self) - source code - -
- -
-   - - - - - - -
test_unicode_byte_zero(self) - source code - -
- -
-   - - - - - - -
test_byte_invalid(self) - source code - -
- -
-   - - - - - - -
test_unicode_byte_invalid(self) - source code - -
- -
-   - - - - - - -
test_unicode_byte_invalid_sequence(self) - source code - -
- -
-   - - - - - - -
test_encoding_tostring_utf16(self) - source code - -
- -
-   - - - - - - -
test_tostring_none(self) - source code - -
- -
-   - - - - - - -
test_tostring_pretty(self) - source code - -
- -
-   - - - - - - -
test_tostring_with_tail(self) - source code - -
- -
-   - - - - - - -
test_tostring_method_html_with_tail(self) - source code - -
- -
-   - - - - - - -
test_standalone(self) - source code - -
- -
-   - - - - - - -
test_tostring_standalone(self) - source code - -
- -
-   - - - - - - -
test_tostring_standalone_in_out(self) - source code - -
- -
-   - - - - - - -
test_tostring_method_text_encoding(self) - source code - -
- -
-   - - - - - - -
test_tostring_method_text_unicode(self) - source code - -
- -
-   - - - - - - -
test_tounicode(self) - source code - -
- -
-   - - - - - - -
test_tounicode_element(self) - source code - -
- -
-   - - - - - - -
test_tounicode_none(self) - source code - -
- -
-   - - - - - - -
test_tounicode_element_tail(self) - source code - -
- -
-   - - - - - - -
test_tounicode_pretty(self) - source code - -
- -
-   - - - - - - -
test_tostring_unicode(self) - source code - -
- -
-   - - - - - - -
test_tostring_unicode_element(self) - source code - -
- -
-   - - - - - - -
test_tostring_unicode_none(self) - source code - -
- -
-   - - - - - - -
test_tostring_unicode_element_tail(self) - source code - -
- -
-   - - - - - - -
test_tostring_unicode_pretty(self) - source code - -
- -
-   - - - - - - -
test_pypy_proxy_collect(self) - source code - -
- -
-   - - - - - - -
test_element_refcycle(self) - source code - -
- -
-   - - - - - - -
test_proxy_collect_siblings(self) - source code - -
- -
-   - - - - - - -
test_proxy_collect_siblings_text(self) - source code - -
- -
-   - - - - - - -
_writeElement(self, - element, - encoding='us-ascii', - compression=0)
- Write out element for comparison.
- source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - etree
- The lxml.etree module implements the extended ElementTree API for XML. -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

etree

- The lxml.etree module implements the extended ElementTree API for XML. -
-
-
-
Value:
-
lxml.etree
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_etree.ETreeWriteTestCase-class.html b/doc/html/api/lxml.tests.test_etree.ETreeWriteTestCase-class.html deleted file mode 100644 index 4594446..0000000 --- a/doc/html/api/lxml.tests.test_etree.ETreeWriteTestCase-class.html +++ /dev/null @@ -1,489 +0,0 @@ - - - - - lxml.tests.test_etree.ETreeWriteTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_etree :: - Class ETreeWriteTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ETreeWriteTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ETreeWriteTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_write(self) - source code - -
- -
-   - - - - - - -
test_write_doctype(self) - source code - -
- -
-   - - - - - - -
test_write_gzip(self) - source code - -
- -
-   - - - - - - -
test_write_gzip_doctype(self) - source code - -
- -
-   - - - - - - -
test_write_gzip_level(self) - source code - -
- -
-   - - - - - - -
test_write_file(self) - source code - -
- -
-   - - - - - - -
test_write_file_gzip(self) - source code - -
- -
-   - - - - - - -
test_write_file_gzip_parse(self) - source code - -
- -
-   - - - - - - -
test_write_file_gzipfile_parse(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_etree.ETreeXIncludeTestCase-class.html b/doc/html/api/lxml.tests.test_etree.ETreeXIncludeTestCase-class.html deleted file mode 100644 index 70f5037..0000000 --- a/doc/html/api/lxml.tests.test_etree.ETreeXIncludeTestCase-class.html +++ /dev/null @@ -1,370 +0,0 @@ - - - - - lxml.tests.test_etree.ETreeXIncludeTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_etree :: - Class ETreeXIncludeTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ETreeXIncludeTestCase

source code

-
-               object --+            
-                        |            
-   unittest.case.TestCase --+        
-                            |        
-common_imports.HelperTestCase --+    
-                                |    
-                _XIncludeTestCase --+
-                                    |
-                                   ETreeXIncludeTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
include(self, - tree) - source code - -
- -
-

Inherited from _XIncludeTestCase: - test_xinclude, - test_xinclude_resolver, - test_xinclude_resolver_recursive, - test_xinclude_text -

-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_etree.ElementIncludeTestCase-class.html b/doc/html/api/lxml.tests.test_etree.ElementIncludeTestCase-class.html deleted file mode 100644 index ad93973..0000000 --- a/doc/html/api/lxml.tests.test_etree.ElementIncludeTestCase-class.html +++ /dev/null @@ -1,370 +0,0 @@ - - - - - lxml.tests.test_etree.ElementIncludeTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_etree :: - Class ElementIncludeTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ElementIncludeTestCase

source code

-
-               object --+            
-                        |            
-   unittest.case.TestCase --+        
-                            |        
-common_imports.HelperTestCase --+    
-                                |    
-                _XIncludeTestCase --+
-                                    |
-                                   ElementIncludeTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
include(self, - tree) - source code - -
- -
-

Inherited from _XIncludeTestCase: - test_xinclude, - test_xinclude_resolver, - test_xinclude_resolver_recursive, - test_xinclude_text -

-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_etree.XMLPullParserTest-class.html b/doc/html/api/lxml.tests.test_etree.XMLPullParserTest-class.html deleted file mode 100644 index 07874eb..0000000 --- a/doc/html/api/lxml.tests.test_etree.XMLPullParserTest-class.html +++ /dev/null @@ -1,461 +0,0 @@ - - - - - lxml.tests.test_etree.XMLPullParserTest - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_etree :: - Class XMLPullParserTest - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XMLPullParserTest

source code

-
-            object --+    
-                     |    
-unittest.case.TestCase --+
-                         |
-                        XMLPullParserTest
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
assert_event_tags(self, - events, - expected) - source code - -
- -
-   - - - - - - -
test_pull_from_simple_target(self) - source code - -
- -
-   - - - - - - -
test_pull_from_simple_target_start_end(self) - source code - -
- -
-   - - - - - - -
test_pull_from_tree_builder(self) - source code - -
- -
-   - - - - - - -
test_pull_from_tree_builder_subclass(self) - source code - -
- -
-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest, - tearDown -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - etree
- The lxml.etree module implements the extended ElementTree API for XML. -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

etree

- The lxml.etree module implements the extended ElementTree API for XML. -
-
-
-
Value:
-
lxml.etree
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_etree._XIncludeTestCase-class.html b/doc/html/api/lxml.tests.test_etree._XIncludeTestCase-class.html deleted file mode 100644 index 50cd6c5..0000000 --- a/doc/html/api/lxml.tests.test_etree._XIncludeTestCase-class.html +++ /dev/null @@ -1,415 +0,0 @@ - - - - - lxml.tests.test_etree._XIncludeTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_etree :: - Class _XIncludeTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _XIncludeTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               _XIncludeTestCase
-
- -
Known Subclasses:
-
- -
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_xinclude_text(self) - source code - -
- -
-   - - - - - - -
test_xinclude(self) - source code - -
- -
-   - - - - - - -
test_xinclude_resolver(self) - source code - -
- -
-   - - - - - - -
test_xinclude_resolver_recursive(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_external_document-module.html b/doc/html/api/lxml.tests.test_external_document-module.html deleted file mode 100644 index ad63b8e..0000000 --- a/doc/html/api/lxml.tests.test_external_document-module.html +++ /dev/null @@ -1,216 +0,0 @@ - - - - - lxml.tests.test_external_document - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_external_document - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module test_external_document

source code

-Test cases related to direct loading of external libxml2 documents - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - ExternalDocumentTestCase -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
test_suite() - source code - -
- -
- - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - DOC_NAME = 'libxml2:xmlDoc' -
-   - - DESTRUCTOR_NAME = 'destructor:xmlFreeDoc' -
-   - - __package__ = 'lxml.tests' -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_external_document-pysrc.html b/doc/html/api/lxml.tests.test_external_document-pysrc.html deleted file mode 100644 index f368244..0000000 --- a/doc/html/api/lxml.tests.test_external_document-pysrc.html +++ /dev/null @@ -1,299 +0,0 @@ - - - - - lxml.tests.test_external_document - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_external_document - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.test_external_document

-
-  1  # -*- coding: utf-8 -*- 
-  2  """ 
-  3  Test cases related to direct loading of external libxml2 documents 
-  4  """ 
-  5   
-  6  from __future__ import absolute_import 
-  7   
-  8  import sys 
-  9  import unittest 
- 10   
- 11  from .common_imports import HelperTestCase, etree, skipIf 
- 12   
- 13  DOC_NAME = b'libxml2:xmlDoc' 
- 14  DESTRUCTOR_NAME = b'destructor:xmlFreeDoc' 
- 15   
- 16   
- 17  @skipIf(sys.version_info[:2] < (2, 7), 
- 18          'Not supported for python < 2.7') 
-
19 -class ExternalDocumentTestCase(HelperTestCase): -
20 - def setUp(self): -
21 import ctypes - 22 from ctypes import pythonapi - 23 from ctypes.util import find_library - 24 - 25 def wrap(func, restype, *argtypes): - 26 func.restype = restype - 27 func.argtypes = list(argtypes) - 28 return func -
29 - 30 self.get_capsule_name = wrap(pythonapi.PyCapsule_GetName, - 31 ctypes.c_char_p, ctypes.py_object) - 32 self.capsule_is_valid = wrap(pythonapi.PyCapsule_IsValid, ctypes.c_int, - 33 ctypes.py_object, ctypes.c_char_p) - 34 self.new_capsule = wrap(pythonapi.PyCapsule_New, ctypes.py_object, - 35 ctypes.c_void_p, ctypes.c_char_p, - 36 ctypes.c_void_p) - 37 self.set_capsule_name = wrap(pythonapi.PyCapsule_SetName, ctypes.c_int, - 38 ctypes.py_object, ctypes.c_char_p) - 39 self.set_capsule_context = wrap(pythonapi.PyCapsule_SetContext, - 40 ctypes.c_int, ctypes.py_object, - 41 ctypes.c_char_p) - 42 self.get_capsule_context = wrap(pythonapi.PyCapsule_GetContext, - 43 ctypes.c_char_p, ctypes.py_object) - 44 self.get_capsule_pointer = wrap(pythonapi.PyCapsule_GetPointer, - 45 ctypes.c_void_p, ctypes.py_object, - 46 ctypes.c_char_p) - 47 self.set_capsule_pointer = wrap(pythonapi.PyCapsule_SetPointer, - 48 ctypes.c_int, ctypes.py_object, - 49 ctypes.c_void_p) - 50 self.set_capsule_destructor = wrap(pythonapi.PyCapsule_SetDestructor, - 51 ctypes.c_int, ctypes.py_object, - 52 ctypes.c_void_p) - 53 self.PyCapsule_Destructor = ctypes.CFUNCTYPE(None, ctypes.py_object) - 54 libxml2 = ctypes.CDLL(find_library('xml2')) - 55 self.create_doc = wrap(libxml2.xmlReadMemory, ctypes.c_void_p, - 56 ctypes.c_char_p, ctypes.c_int, ctypes.c_char_p, - 57 ctypes.c_char_p, ctypes.c_int) - 58 self.free_doc = wrap(libxml2.xmlFreeDoc, None, ctypes.c_void_p) -
59 -
60 - def as_capsule(self, text, capsule_name=DOC_NAME): -
61 if not isinstance(text, bytes): - 62 text = text.encode('utf-8') - 63 doc = self.create_doc(text, len(text), b'base.xml', b'utf-8', 0) - 64 ans = self.new_capsule(doc, capsule_name, None) - 65 self.set_capsule_context(ans, DESTRUCTOR_NAME) - 66 return ans -
67 -
69 xml = '<r a="1">t</r>' - 70 self.assertRaises(TypeError, etree.adopt_external_document, None) - 71 capsule = self.as_capsule(xml) - 72 self.assertTrue(self.capsule_is_valid(capsule, DOC_NAME)) - 73 self.assertEqual(DOC_NAME, self.get_capsule_name(capsule)) - 74 # Create an lxml tree from the capsule (this is a move not a copy) - 75 root = etree.adopt_external_document(capsule).getroot() - 76 self.assertIsNone(self.get_capsule_name(capsule)) - 77 self.assertEqual(root.text, 't') - 78 root.text = 'new text' - 79 # Now reset the capsule so we can copy it - 80 self.assertEqual(0, self.set_capsule_name(capsule, DOC_NAME)) - 81 self.assertEqual(0, self.set_capsule_context(capsule, b'invalid')) - 82 # Create an lxml tree from the capsule (this is a copy not a move) - 83 root2 = etree.adopt_external_document(capsule).getroot() - 84 self.assertEqual(self.get_capsule_context(capsule), b'invalid') - 85 # Check that the modification to the tree using the transferred - 86 # document was successful - 87 self.assertEqual(root.text, root2.text) - 88 # Check that further modifications do not show up in the copy (they are - 89 # disjoint) - 90 root.text = 'other text' - 91 self.assertNotEqual(root.text, root2.text) - 92 # delete root and ensure root2 survives - 93 del root - 94 self.assertEqual(root2.text, 'new text') -
95 -
96 - 97 -def test_suite(): -
98 suite = unittest.TestSuite() - 99 suite.addTests([unittest.makeSuite(ExternalDocumentTestCase)]) -100 return suite -
101 -102 -103 if __name__ == '__main__': -104 print('to test use test.py %s' % __file__) -105 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_external_document.ExternalDocumentTestCase-class.html b/doc/html/api/lxml.tests.test_external_document.ExternalDocumentTestCase-class.html deleted file mode 100644 index adc26d3..0000000 --- a/doc/html/api/lxml.tests.test_external_document.ExternalDocumentTestCase-class.html +++ /dev/null @@ -1,437 +0,0 @@ - - - - - lxml.tests.test_external_document.ExternalDocumentTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_external_document :: - Class ExternalDocumentTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ExternalDocumentTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ExternalDocumentTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
as_capsule(self, - text, - capsule_name='libxml2:xmlDoc') - source code - -
- -
-   - - - - - - -
test_external_document_adoption(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- - Hook method for setting up the test fixture before exercising it. -
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_htmlparser-module.html b/doc/html/api/lxml.tests.test_htmlparser-module.html deleted file mode 100644 index 29bcacf..0000000 --- a/doc/html/api/lxml.tests.test_htmlparser-module.html +++ /dev/null @@ -1,255 +0,0 @@ - - - - - lxml.tests.test_htmlparser - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_htmlparser - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module test_htmlparser

source code

-HTML parser test cases for etree - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - unicode
- str(object='') -> string -
-   - - HtmlParserTestCase
- HTML parser test cases -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
test_suite() - source code - -
- -
- - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - this_dir = '/home/stefan/source/Python/lxml/lxml-release/src/l... -
-   - - __package__ = 'lxml.tests' -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

this_dir

- -
-
-
-
Value:
-
-'/home/stefan/source/Python/lxml/lxml-release/src/lxml/tests'
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_htmlparser-pysrc.html b/doc/html/api/lxml.tests.test_htmlparser-pysrc.html deleted file mode 100644 index c78ed56..0000000 --- a/doc/html/api/lxml.tests.test_htmlparser-pysrc.html +++ /dev/null @@ -1,2035 +0,0 @@ - - - - - lxml.tests.test_htmlparser - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_htmlparser - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.test_htmlparser

-
-  1  # -*- coding: utf-8 -*- 
-  2   
-  3  """ 
-  4  HTML parser test cases for etree 
-  5  """ 
-  6   
-  7  import unittest 
-  8  import tempfile, os, os.path, sys 
-  9   
- 10  this_dir = os.path.dirname(__file__) 
- 11  if this_dir not in sys.path: 
- 12      sys.path.insert(0, this_dir) # needed for Py3 
- 13   
- 14  from common_imports import etree, html, StringIO, BytesIO, fileInTestDir, _bytes, _str 
- 15  from common_imports import SillyFileLike, HelperTestCase, write_to_file, next 
- 16   
- 17  try: 
- 18      unicode 
- 19  except NameError: 
- 20      unicode = str 
- 21   
- 22   
-
23 -class HtmlParserTestCase(HelperTestCase): -
24 """HTML parser test cases - 25 """ - 26 etree = etree - 27 - 28 html_str = _bytes("<html><head><title>test</title></head><body><h1>page title</h1></body></html>") - 29 html_str_pretty = _bytes("""\ - 30 <html> - 31 <head><title>test</title></head> - 32 <body><h1>page title</h1></body> - 33 </html> - 34 """) - 35 broken_html_str = _bytes("<html><head><title>test" - 36 "<body><h1>page title</h3></p></html>") - 37 uhtml_str = _bytes( - 38 "<html><head><title>test á</title></head>" - 39 "<body><h1>page á title</h1></body></html>").decode('utf8') - 40 -
41 - def tearDown(self): -
42 super(HtmlParserTestCase, self).tearDown() - 43 self.etree.set_default_parser() -
44 -
45 - def test_module_HTML(self): -
46 element = self.etree.HTML(self.html_str) - 47 self.assertEqual(self.etree.tostring(element, method="html"), - 48 self.html_str) -
49 -
50 - def test_module_HTML_unicode(self): -
51 element = self.etree.HTML(self.uhtml_str) - 52 self.assertEqual( - 53 self.etree.tostring(element, method="html", encoding='unicode'), - 54 self.uhtml_str) - 55 self.assertEqual(element.findtext('.//h1'), - 56 _bytes("page á title").decode('utf8')) -
57 -
58 - def test_wide_unicode_xml(self): -
59 if sys.maxunicode < 1114111: - 60 return # skip test - 61 element = self.etree.HTML(_bytes( - 62 '<html><body><p>\\U00026007</p></body></html>' - 63 ).decode('unicode_escape')) - 64 p_text = element.findtext('.//p') - 65 self.assertEqual(1, len(p_text)) - 66 self.assertEqual(_bytes('\\U00026007').decode('unicode_escape'), - 67 p_text) -
68 -
69 - def test_html_ids(self): -
70 parser = self.etree.HTMLParser(recover=False) - 71 fromstring = self.etree.fromstring - 72 html = fromstring(''' - 73 <html><body id="bodyID"><p id="pID"></p></body></html> - 74 ''', parser=parser) - 75 self.assertEqual(len(html.xpath('//p[@id="pID"]')), 1) -
76 -
78 parser = self.etree.HTMLParser(recover=False, collect_ids=False) - 79 fromstring = self.etree.fromstring - 80 html = fromstring(''' - 81 <html><body id="bodyID"><p id="pID"></p></body></html> - 82 ''', parser=parser) - 83 self.assertEqual(len(html.xpath('//p[@id="pID"]')), 1) -
84 -
86 element = self.etree.HTML(self.html_str) - 87 self.assertEqual(self.etree.tostring(element, method="html", pretty_print=True), - 88 self.html_str_pretty) -
89 -
91 parser = self.etree.HTMLParser(recover=False) - 92 parse = self.etree.parse - 93 f = BytesIO("<html></body>") - 94 self.assertRaises(self.etree.XMLSyntaxError, - 95 parse, f, parser) -
96 -
98 parser = self.etree.HTMLParser() - 99 Element = parser.makeelement -100 -101 el = Element('name') -102 self.assertRaises(ValueError, Element, '{}') -103 self.assertRaises(ValueError, setattr, el, 'tag', '{}') -104 -105 self.assertRaises(ValueError, Element, '{test}') -106 self.assertRaises(ValueError, setattr, el, 'tag', '{test}') -
107 -
109 parser = self.etree.HTMLParser() -110 Element = parser.makeelement -111 -112 pname = Element('p:name') -113 self.assertEqual(pname.tag, 'p:name') -114 -115 pname = Element('{test}p:name') -116 self.assertEqual(pname.tag, '{test}p:name') -117 -118 pname = Element('name') -119 pname.tag = 'p:name' -120 self.assertEqual(pname.tag, 'p:name') -
121 -
123 parser = self.etree.HTMLParser() -124 Element = parser.makeelement -125 -126 self.assertRaises(ValueError, Element, 'p"name') -127 self.assertRaises(ValueError, Element, "na'me") -128 self.assertRaises(ValueError, Element, '{test}"name') -129 self.assertRaises(ValueError, Element, "{test}name'") -130 -131 el = Element('name') -132 self.assertRaises(ValueError, setattr, el, 'tag', "pname'") -133 self.assertRaises(ValueError, setattr, el, 'tag', '"pname') -134 self.assertEqual(el.tag, "name") -
135 -
137 parser = self.etree.HTMLParser() -138 Element = parser.makeelement -139 -140 self.assertRaises(ValueError, Element, ' name ') -141 self.assertRaises(ValueError, Element, 'na me') -142 self.assertRaises(ValueError, Element, '{test} name') -143 -144 el = Element('name') -145 self.assertRaises(ValueError, setattr, el, 'tag', ' name ') -146 self.assertEqual(el.tag, "name") -
147 -
149 parser = self.etree.HTMLParser() -150 Element = parser.makeelement -151 -152 SubElement = self.etree.SubElement -153 -154 el = Element('name') -155 self.assertRaises(ValueError, SubElement, el, '{}') -156 self.assertRaises(ValueError, SubElement, el, '{test}') -
157 -
159 parser = self.etree.HTMLParser() -160 Element = parser.makeelement -161 SubElement = self.etree.SubElement -162 -163 el = Element('name') -164 pname = SubElement(el, 'p:name') -165 self.assertEqual(pname.tag, 'p:name') -166 -167 pname = SubElement(el, '{test}p:name') -168 self.assertEqual(pname.tag, '{test}p:name') -
169 -
171 parser = self.etree.HTMLParser() -172 Element = parser.makeelement -173 SubElement = self.etree.SubElement -174 -175 el = Element('name') -176 self.assertRaises(ValueError, SubElement, el, "name'") -177 self.assertRaises(ValueError, SubElement, el, 'na"me') -178 self.assertRaises(ValueError, SubElement, el, "{test}na'me") -179 self.assertRaises(ValueError, SubElement, el, '{test}"name') -
180 -
182 parser = self.etree.HTMLParser() -183 Element = parser.makeelement -184 SubElement = self.etree.SubElement -185 -186 el = Element('name') -187 self.assertRaises(ValueError, SubElement, el, ' name ') -188 self.assertRaises(ValueError, SubElement, el, 'na me') -189 self.assertRaises(ValueError, SubElement, el, '{test} name') -
190 -
192 parser = self.etree.HTMLParser(recover=False) -193 parse = self.etree.parse -194 f = BytesIO(self.broken_html_str) -195 self.assertRaises(self.etree.XMLSyntaxError, -196 parse, f, parser) -
197 -
199 parser = self.etree.HTMLParser(default_doctype=False) -200 d = html.fromstring('<!DOCTYPE html><h1>S</h1></html>', parser=parser) -201 self.assertEqual(d.getroottree().docinfo.doctype, '<!DOCTYPE html>') -202 -203 d = html.fromstring('<html><h1>S</h1></html>', parser=parser) -204 self.assertEqual(d.getroottree().docinfo.doctype, '') -
205 -
207 text = _str('Søk på nettet') -208 html_latin1 = (_str('<p>%s</p>') % text).encode('iso-8859-1') -209 -210 tree = self.etree.parse( -211 BytesIO(html_latin1), -212 self.etree.HTMLParser(encoding="iso-8859-1")) -213 p = tree.find("//p") -214 self.assertEqual(p.text, text) -
215 -
217 text = _str('Søk på nettet') -218 wrong_head = _str(''' -219 <head> -220 <meta http-equiv="Content-Type" -221 content="text/html; charset=UTF-8" /> -222 </head>''') -223 html_latin1 = (_str('<html>%s<body><p>%s</p></body></html>') % (wrong_head, -224 text) -225 ).encode('iso-8859-1') -226 -227 self.assertRaises(self.etree.ParseError, -228 self.etree.parse, -229 BytesIO(html_latin1)) -230 -231 tree = self.etree.parse( -232 BytesIO(html_latin1), -233 self.etree.HTMLParser(encoding="iso-8859-1")) -234 p = tree.find("//p") -235 self.assertEqual(p.text, text) -
236 -
237 - def test_module_HTML_broken(self): -
238 element = self.etree.HTML(self.broken_html_str) -239 self.assertEqual(self.etree.tostring(element, method="html"), -240 self.html_str) -
241 -
242 - def test_module_HTML_cdata(self): -
243 # by default, libxml2 generates CDATA nodes for <script> content -244 html = _bytes('<html><head><style>foo</style></head></html>') -245 element = self.etree.HTML(html) -246 self.assertEqual(element[0][0].text, "foo") -
247 -
248 - def test_module_HTML_access(self): -
249 element = self.etree.HTML(self.html_str) -250 self.assertEqual(element[0][0].tag, 'title') -
251 -
252 - def test_module_parse_html(self): -
253 parser = self.etree.HTMLParser() -254 filename = tempfile.mktemp(suffix=".html") -255 write_to_file(filename, self.html_str, 'wb') -256 try: -257 f = open(filename, 'rb') -258 tree = self.etree.parse(f, parser) -259 f.close() -260 self.assertEqual(self.etree.tostring(tree.getroot(), method="html"), -261 self.html_str) -262 finally: -263 os.remove(filename) -
264 -
266 parser = self.etree.HTMLParser() -267 f = SillyFileLike(self.html_str) -268 tree = self.etree.parse(f, parser) -269 html = self.etree.tostring(tree.getroot(), -270 method="html", encoding='UTF-8') -271 self.assertEqual(html, self.html_str) -
272 -273 ## def test_module_parse_html_filelike_unicode(self): -274 ## parser = self.etree.HTMLParser() -275 ## f = SillyFileLike(self.uhtml_str) -276 ## tree = self.etree.parse(f, parser) -277 ## html = self.etree.tostring(tree.getroot(), encoding='UTF-8') -278 ## self.assertEqual(unicode(html, 'UTF-8'), self.uhtml_str) -279 -
280 - def test_html_file_error(self): -
281 parser = self.etree.HTMLParser() -282 parse = self.etree.parse -283 self.assertRaises(IOError, -284 parse, "__some_hopefully_nonexisting_file__.html", -285 parser) -
286 -
288 self.assertRaises(self.etree.XMLSyntaxError, -289 self.etree.parse, BytesIO(self.broken_html_str)) -290 -291 self.etree.set_default_parser( self.etree.HTMLParser() ) -292 -293 tree = self.etree.parse(BytesIO(self.broken_html_str)) -294 self.assertEqual(self.etree.tostring(tree.getroot(), method="html"), -295 self.html_str) -296 -297 self.etree.set_default_parser() -298 -299 self.assertRaises(self.etree.XMLSyntaxError, -300 self.etree.parse, BytesIO(self.broken_html_str)) -
301 -
302 - def test_html_iterparse(self): -
303 iterparse = self.etree.iterparse -304 f = BytesIO( -305 '<html><head><title>TITLE</title><body><p>P</p></body></html>') -306 -307 iterator = iterparse(f, html=True) -308 self.assertEqual(None, iterator.root) -309 -310 events = list(iterator) -311 root = iterator.root -312 self.assertTrue(root is not None) -313 self.assertEqual( -314 [('end', root[0][0]), ('end', root[0]), ('end', root[1][0]), -315 ('end', root[1]), ('end', root)], -316 events) -
317 -
319 iterparse = self.etree.iterparse -320 f = BytesIO( -321 '<html><head><title>TITLE</title><body><p>P</p></body></html>') -322 -323 iterator = iterparse(f, html=True) -324 self.assertEqual(None, iterator.root) -325 -326 event, element = next(iterator) -327 self.assertEqual('end', event) -328 self.assertEqual('title', element.tag) -329 self.assertEqual(None, iterator.root) -330 del element -331 -332 event, element = next(iterator) -333 self.assertEqual('end', event) -334 self.assertEqual('head', element.tag) -335 self.assertEqual(None, iterator.root) -336 del element -337 del iterator -
338 -
339 - def test_html_iterparse_broken(self): -
340 iterparse = self.etree.iterparse -341 f = BytesIO('<head><title>TEST></head><p>P<br></div>') -342 -343 iterator = iterparse(f, html=True) -344 self.assertEqual(None, iterator.root) -345 -346 events = list(iterator) -347 root = iterator.root -348 self.assertTrue(root is not None) -349 self.assertEqual('html', root.tag) -350 self.assertEqual('head', root[0].tag) -351 self.assertEqual('body', root[1].tag) -352 self.assertEqual('p', root[1][0].tag) -353 self.assertEqual('br', root[1][0][0].tag) -354 self.assertEqual( -355 [('end', root[0][0]), ('end', root[0]), ('end', root[1][0][0]), -356 ('end', root[1][0]), ('end', root[1]), ('end', root)], -357 events) -
358 -
360 iterparse = self.etree.iterparse -361 f = BytesIO('<p>P<br></div>') -362 iterator = iterparse(f, html=True, recover=False) -363 self.assertRaises(self.etree.XMLSyntaxError, list, iterator) -
364 -
365 - def test_html_iterparse_file(self): -
366 iterparse = self.etree.iterparse -367 iterator = iterparse(fileInTestDir("shakespeare.html"), -368 html=True) -369 -370 self.assertEqual(None, iterator.root) -371 events = list(iterator) -372 root = iterator.root -373 self.assertTrue(root is not None) -374 self.assertEqual(249, len(events)) -375 self.assertFalse( -376 [event for (event, element) in events if event != 'end']) -
377 -
378 - def test_html_iterparse_start(self): -
379 iterparse = self.etree.iterparse -380 f = BytesIO( -381 '<html><head><title>TITLE</title><body><p>P</p></body></html>') -382 -383 iterator = iterparse(f, html=True, events=('start',)) -384 self.assertEqual(None, iterator.root) -385 -386 events = list(iterator) -387 root = iterator.root -388 self.assertNotEqual(None, root) -389 self.assertEqual( -390 [('start', root), ('start', root[0]), ('start', root[0][0]), -391 ('start', root[1]), ('start', root[1][0])], -392 events) -
393 -
394 - def test_html_feed_parser(self): -
395 parser = self.etree.HTMLParser() -396 parser.feed("<html><body></") -397 parser.feed("body></html>") -398 root = parser.close() -399 -400 self.assertEqual('html', root.tag) -401 # test that we find all names in the parser dict -402 self.assertEqual([root], list(root.iter('html'))) -403 self.assertEqual([root[0]], list(root.iter('body'))) -
404 -
406 parser = self.etree.HTMLParser() -407 parser.feed("<htm") -408 parser.feed("l><body") -409 parser.feed("><") -410 parser.feed("p><") -411 parser.feed("strong") -412 parser.feed(">some ") -413 parser.feed("text</strong></p><") -414 parser.feed("/body></html>") -415 root = parser.close() -416 -417 self.assertEqual('html', root.tag) -418 # test that we find all names in the parser dict -419 self.assertEqual([root], list(root.iter('html'))) -420 self.assertEqual([root[0]], list(root.iter('body'))) -421 self.assertEqual([root[0][0]], list(root.iter('p'))) -422 self.assertEqual([root[0][0][0]], list(root.iter('strong'))) -
423 -
425 parser = self.etree.HTMLParser() -426 parser.feed('<html><head>') -427 parser.feed('<title>TITLE</title><body><p>P</p></body><') -428 parser.feed("/html>") -429 root = parser.close() -430 -431 self.assertEqual('html', root.tag) -432 # test that we find all names in the parser dict -433 self.assertEqual([root], list(root.iter('html'))) -434 self.assertEqual([root[0]], list(root.iter('head'))) -435 self.assertEqual([root[0][0]], list(root.iter('title'))) -436 self.assertEqual([root[1]], list(root.iter('body'))) -437 self.assertEqual([root[1][0]], list(root.iter('p'))) -
438 -
440 assertFalse = self.assertFalse -441 events = [] -442 class Target(object): -443 def start(self, tag, attrib): -444 events.append(("start", tag)) -445 assertFalse(attrib) -
446 def end(self, tag): -447 events.append(("end", tag)) -
448 def close(self): -449 return "DONE" -450 -451 parser = self.etree.HTMLParser(target=Target()) -452 -453 parser.feed("<html><body></body></html>") -454 done = parser.close() -455 -456 self.assertEqual("DONE", done) -457 self.assertEqual([ -458 ("start", "html"), ("start", "body"), -459 ("end", "body"), ("end", "html")], events) -460 -
462 assertFalse = self.assertFalse -463 events = [] -464 class Target(object): -465 def start(self, tag, attrib): -466 events.append(("start", tag)) -467 assertFalse(attrib) -
468 def end(self, tag): -469 events.append(("end", tag)) -470 def doctype(self, *args): -471 events.append(("doctype", args)) -472 def close(self): -473 return "DONE" -474 -475 parser = self.etree.HTMLParser(target=Target()) -476 parser.feed("<!DOCTYPE><html><body></body></html>") -477 done = parser.close() -478 -479 self.assertEqual("DONE", done) -480 self.assertEqual([ -481 ("doctype", (None, None, None)), -482 ("start", "html"), ("start", "body"), -483 ("end", "body"), ("end", "html")], events) -484 -
486 assertFalse = self.assertFalse -487 events = [] -488 class Target(object): -489 def start(self, tag, attrib): -490 events.append(("start", tag)) -491 assertFalse(attrib) -
492 def end(self, tag): -493 events.append(("end", tag)) -494 def doctype(self, *args): -495 events.append(("doctype", args)) -496 def close(self): -497 return "DONE" -498 -499 parser = self.etree.HTMLParser(target=Target()) -500 parser.feed("<!DOCTYPE html><html><body></body></html>") -501 done = parser.close() -502 -503 self.assertEqual("DONE", done) -504 self.assertEqual([ -505 ("doctype", ("html", None, None)), -506 ("start", "html"), ("start", "body"), -507 ("end", "body"), ("end", "html")], events) -508 -
510 assertFalse = self.assertFalse -511 events = [] -512 class Target(object): -513 def start(self, tag, attrib): -514 events.append(("start", tag)) -515 assertFalse(attrib) -
516 def end(self, tag): -517 events.append(("end", tag)) -518 def doctype(self, *args): -519 events.append(("doctype", args)) -520 def close(self): -521 return "DONE" -522 -523 parser = self.etree.HTMLParser(target=Target()) -524 parser.feed('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "sys.dtd">' -525 '<html><body></body></html>') -526 done = parser.close() -527 -528 self.assertEqual("DONE", done) -529 self.assertEqual([ -530 ("doctype", ("html", "-//W3C//DTD HTML 4.01//EN", "sys.dtd")), -531 ("start", "html"), ("start", "body"), -532 ("end", "body"), ("end", "html")], events) -533 -
535 events = [] -536 class Target(object): -537 def start(self, tag, attrib): -538 events.append(("start", tag)) -539 raise ValueError("START") -
540 def end(self, tag): -541 events.append(("end", tag)) -542 raise TypeError("END") -543 def close(self): -544 return "DONE" -545 -546 parser = self.etree.HTMLParser(target=Target()) -547 try: -548 parser.feed('<html><body>') -549 parser.feed('</body></html>') -550 except ValueError as exc: -551 assert "START" in str(exc) -552 except TypeError as exc: -553 assert "END" in str(exc) -554 self.assertTrue(False, "wrong exception raised") -555 else: -556 self.assertTrue(False, "no exception raised") -557 -558 self.assertTrue(("start", "html") in events, events) -559 self.assertTrue(("end", "html") not in events, events) -560 -
562 events = [] -563 class Target(object): -564 def start(self, tag, attrib): -565 events.append(("start", tag)) -566 raise ValueError("START") -
567 def end(self, tag): -568 events.append(("end", tag)) -569 raise TypeError("END") -570 def close(self): -571 return "DONE" -572 -573 parser = self.etree.HTMLParser(target=Target()) -574 try: -575 self.etree.fromstring('<html><body></body></html>', parser) -576 except ValueError as exc: -577 assert "START" in str(exc), str(exc) -578 except TypeError as exc: -579 assert "END" in str(exc), str(exc) -580 self.assertTrue(False, "wrong exception raised") -581 else: -582 self.assertTrue(False, "no exception raised") -583 -584 self.assertTrue(("start", "html") in events, events) -585 self.assertTrue(("end", "html") not in events, events) -586 -
587 - def test_set_decl_html(self): -
588 doc = html.Element('html').getroottree() -589 doc.docinfo.public_id = "-//W3C//DTD XHTML 1.0 Strict//EN" -590 doc.docinfo.system_url = \ -591 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" -592 self.assertEqual(doc.docinfo.doctype, -593 '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">') -594 self.assertEqual(self.etree.tostring(doc), -595 _bytes('''<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -596 <html xmlns="http://www.w3.org/1999/xhtml"></html>''')) -
597 -
598 - def test_html5_doctype(self): -
599 # document type declaration with neither public if nor system url -600 doc = html.Element('html').getroottree() -601 doc.docinfo.public_id = None -602 doc.docinfo.system_url = None -603 self.assertEqual(doc.docinfo.doctype, -604 '<!DOCTYPE html>') -605 self.assertTrue(doc.docinfo.public_id is None) -606 self.assertEqual(self.etree.tostring(doc), -607 _bytes('<!DOCTYPE html>\n<html/>')) -
608 -
609 - def test_ietf_decl(self): -
610 # legacy declaration with public id, no system url -611 doc = html.Element('html').getroottree() -612 doc.docinfo.public_id = '-//IETF//DTD HTML//EN' -613 doc.docinfo.system_url = None -614 self.assertEqual(doc.docinfo.doctype, -615 '<!DOCTYPE html PUBLIC "-//IETF//DTD HTML//EN">') -616 self.assertEqual(self.etree.tostring(doc), -617 _bytes('<!DOCTYPE html PUBLIC "-//IETF//DTD HTML//EN">\n<html/>')) -
618 -
619 - def test_boolean_attribute(self): -
620 # ability to serialize boolean attribute by setting value to None -621 form = html.Element('form') -622 form.set('novalidate', None) -623 self.assertEqual(html.tostring(form), -624 _bytes('<form novalidate></form>')) -625 form.set('custom') -626 self.assertEqual(html.tostring(form), -627 _bytes('<form novalidate custom></form>')) -
628 -
630 # ability to pass boolean attributes unmodified -631 fragment = '<tag attribute></tag>' -632 self.assertEqual(html.tostring(html.fragment_fromstring(fragment)), -633 _bytes(fragment)) -
634 -
636 # html serialized as xml converts boolean attributes to empty strings -637 fragment = '<tag attribute></tag>' -638 self.assertEqual(self.etree.tostring(html.fragment_fromstring(fragment)), -639 _bytes('<tag attribute=""/>')) -
640 -641 -
642 -def test_suite(): -
643 suite = unittest.TestSuite() -644 suite.addTests([unittest.makeSuite(HtmlParserTestCase)]) -645 return suite -
646 -647 -648 if __name__ == '__main__': -649 print('to test use test.py %s' % __file__) -650 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_htmlparser.HtmlParserTestCase-class.html b/doc/html/api/lxml.tests.test_htmlparser.HtmlParserTestCase-class.html deleted file mode 100644 index 5df47b0..0000000 --- a/doc/html/api/lxml.tests.test_htmlparser.HtmlParserTestCase-class.html +++ /dev/null @@ -1,1311 +0,0 @@ - - - - - lxml.tests.test_htmlparser.HtmlParserTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_htmlparser :: - Class HtmlParserTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class HtmlParserTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               HtmlParserTestCase
-
- -
-HTML parser test cases - - - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_module_HTML(self) - source code - -
- -
-   - - - - - - -
test_module_HTML_unicode(self) - source code - -
- -
-   - - - - - - -
test_wide_unicode_xml(self) - source code - -
- -
-   - - - - - - -
test_html_ids(self) - source code - -
- -
-   - - - - - - -
test_html_ids_no_collect_ids(self) - source code - -
- -
-   - - - - - - -
test_module_HTML_pretty_print(self) - source code - -
- -
-   - - - - - - -
test_module_parse_html_error(self) - source code - -
- -
-   - - - - - - -
test_html_element_name_empty(self) - source code - -
- -
-   - - - - - - -
test_html_element_name_colon(self) - source code - -
- -
-   - - - - - - -
test_html_element_name_quote(self) - source code - -
- -
-   - - - - - - -
test_html_element_name_space(self) - source code - -
- -
-   - - - - - - -
test_html_subelement_name_empty(self) - source code - -
- -
-   - - - - - - -
test_html_subelement_name_colon(self) - source code - -
- -
-   - - - - - - -
test_html_subelement_name_quote(self) - source code - -
- -
-   - - - - - - -
test_html_subelement_name_space(self) - source code - -
- -
-   - - - - - - -
test_module_parse_html_norecover(self) - source code - -
- -
-   - - - - - - -
test_module_parse_html_default_doctype(self) - source code - -
- -
-   - - - - - - -
test_parse_encoding_8bit_explicit(self) - source code - -
- -
-   - - - - - - -
test_parse_encoding_8bit_override(self) - source code - -
- -
-   - - - - - - -
test_module_HTML_broken(self) - source code - -
- -
-   - - - - - - -
test_module_HTML_cdata(self) - source code - -
- -
-   - - - - - - -
test_module_HTML_access(self) - source code - -
- -
-   - - - - - - -
test_module_parse_html(self) - source code - -
- -
-   - - - - - - -
test_module_parse_html_filelike(self) - source code - -
- -
-   - - - - - - -
test_html_file_error(self) - source code - -
- -
-   - - - - - - -
test_default_parser_HTML_broken(self) - source code - -
- -
-   - - - - - - -
test_html_iterparse(self) - source code - -
- -
-   - - - - - - -
test_html_iterparse_stop_short(self) - source code - -
- -
-   - - - - - - -
test_html_iterparse_broken(self) - source code - -
- -
-   - - - - - - -
test_html_iterparse_broken_no_recover(self) - source code - -
- -
-   - - - - - - -
test_html_iterparse_file(self) - source code - -
- -
-   - - - - - - -
test_html_iterparse_start(self) - source code - -
- -
-   - - - - - - -
test_html_feed_parser(self) - source code - -
- -
-   - - - - - - -
test_html_feed_parser_chunky(self) - source code - -
- -
-   - - - - - - -
test_html_feed_parser_more_tags(self) - source code - -
- -
-   - - - - - - -
test_html_parser_target_tag(self) - source code - -
- -
-   - - - - - - -
test_html_parser_target_doctype_empty(self) - source code - -
- -
-   - - - - - - -
test_html_parser_target_doctype_html(self) - source code - -
- -
-   - - - - - - -
test_html_parser_target_doctype_html_full(self) - source code - -
- -
-   - - - - - - -
test_html_parser_target_exceptions(self) - source code - -
- -
-   - - - - - - -
test_html_fromstring_target_exceptions(self) - source code - -
- -
-   - - - - - - -
test_set_decl_html(self) - source code - -
- -
-   - - - - - - -
test_html5_doctype(self) - source code - -
- -
-   - - - - - - -
test_ietf_decl(self) - source code - -
- -
-   - - - - - - -
test_boolean_attribute(self) - source code - -
- -
-   - - - - - - -
test_boolean_attribute_round_trip(self) - source code - -
- -
-   - - - - - - -
test_boolean_attribute_xml_adds_empty_string(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - etree
- The lxml.etree module implements the extended ElementTree API for XML. -
-   - - html_str = '<html><head><title>test</title></head><body><h1>pa... -
-   - - html_str_pretty = '<html>\n<head><title>test</title></head>\n<... -
-   - - broken_html_str = '<html><head><title>test<body><h1>page title... -
-   - - uhtml_str = u'<html><head><title>test á</title></head><body>... -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- - Hook method for deconstructing the test fixture after testing it. -
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

etree

- The lxml.etree module implements the extended ElementTree API for XML. -
-
-
-
Value:
-
lxml.etree
-
-
-
- -
- -
-

html_str

- -
-
-
-
Value:
-
-'<html><head><title>test</title></head><body><h1>page title</h1></body\
-></html>'
-
-
-
-
-
- -
- -
-

html_str_pretty

- -
-
-
-
Value:
-
-'''<html>
-<head><title>test</title></head>
-<body><h1>page title</h1></body>
-</html>
-'''
-
-
-
-
-
- -
- -
-

broken_html_str

- -
-
-
-
Value:
-
-'<html><head><title>test<body><h1>page title</h3></p></html>'
-
-
-
-
-
- -
- -
-

uhtml_str

- -
-
-
-
Value:
-
-u'<html><head><title>test á</title></head><body><h1>page á title</\
-h1></body></html>'
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_http_io-module.html b/doc/html/api/lxml.tests.test_http_io-module.html deleted file mode 100644 index 17797b5..0000000 --- a/doc/html/api/lxml.tests.test_http_io-module.html +++ /dev/null @@ -1,246 +0,0 @@ - - - - - lxml.tests.test_http_io - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_http_io - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module test_http_io

source code

-Web IO test cases that need Python 2.5+ (wsgiref) - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - HttpIOTestCase -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
test_suite() - source code - -
- -
- - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - this_dir = '/home/stefan/source/Python/lxml/lxml-release/src/l... -
-   - - __package__ = 'lxml.tests' -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

this_dir

- -
-
-
-
Value:
-
-'/home/stefan/source/Python/lxml/lxml-release/src/lxml/tests'
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_http_io-pysrc.html b/doc/html/api/lxml.tests.test_http_io-pysrc.html deleted file mode 100644 index ed2f2bf..0000000 --- a/doc/html/api/lxml.tests.test_http_io-pysrc.html +++ /dev/null @@ -1,485 +0,0 @@ - - - - - lxml.tests.test_http_io - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_http_io - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.test_http_io

-
-  1  # -*- coding: utf-8 -*- 
-  2   
-  3  """ 
-  4  Web IO test cases that need Python 2.5+ (wsgiref) 
-  5  """ 
-  6   
-  7  from __future__ import with_statement 
-  8   
-  9  import unittest 
- 10  import textwrap 
- 11  import os 
- 12  import sys 
- 13  import gzip 
- 14   
- 15  this_dir = os.path.dirname(__file__) 
- 16  if this_dir not in sys.path: 
- 17      sys.path.insert(0, this_dir)  # needed for Py3 
- 18   
- 19  from .common_imports import ( 
- 20      etree, HelperTestCase, BytesIO, _bytes) 
- 21  from .dummy_http_server import webserver, HTTPRequestCollector 
- 22   
- 23   
-
24 -class HttpIOTestCase(HelperTestCase): -
25 etree = etree - 26 -
27 - def _parse_from_http(self, data, code=200, headers=None, parser=None): -
28 handler = HTTPRequestCollector(data, code, headers) - 29 with webserver(handler) as host_url: - 30 tree = self.etree.parse(host_url + 'TEST', parser=parser) - 31 self.assertEqual([('/TEST', [])], handler.requests) - 32 return tree -
33 -
34 - def test_http_client(self): -
35 tree = self._parse_from_http(_bytes('<root><a/></root>')) - 36 self.assertEqual('root', tree.getroot().tag) - 37 self.assertEqual('a', tree.getroot()[0].tag) -
38 -
39 - def test_http_client_404(self): -
40 try: - 41 self._parse_from_http(_bytes('<root/>'), code=404) - 42 except IOError: - 43 self.assertTrue(True) - 44 else: - 45 self.assertTrue(False, "expected IOError") -
46 -
47 - def test_http_client_gzip(self): -
48 f = BytesIO() - 49 gz = gzip.GzipFile(fileobj=f, mode='w', filename='test.xml') - 50 gz.write(_bytes('<root><a/></root>')) - 51 gz.close() - 52 data = f.getvalue() - 53 del f, gz - 54 - 55 headers = [('Content-Encoding', 'gzip')] - 56 tree = self._parse_from_http(data, headers=headers) - 57 self.assertEqual('root', tree.getroot().tag) - 58 self.assertEqual('a', tree.getroot()[0].tag) -
59 -
60 - def test_parser_input_mix(self): -
61 data = _bytes('<root><a/></root>') - 62 handler = HTTPRequestCollector(data) - 63 - 64 with webserver(handler) as host_url: - 65 tree = self.etree.parse(host_url) - 66 root = tree.getroot() - 67 self.assertEqual('a', root[0].tag) - 68 - 69 root = self.etree.fromstring(data) - 70 self.assertEqual('a', root[0].tag) - 71 - 72 tree = self.etree.parse(host_url) - 73 root = tree.getroot() - 74 self.assertEqual('a', root[0].tag) - 75 - 76 root = self.etree.fromstring(data) - 77 self.assertEqual('a', root[0].tag) - 78 - 79 root = self.etree.fromstring(data) - 80 self.assertEqual('a', root[0].tag) -
81 -
82 - def test_network_dtd(self): -
83 data = [_bytes(textwrap.dedent(s)) for s in [ - 84 # XML file - 85 '''\ - 86 <?xml version="1.0"?> - 87 <!DOCTYPE root SYSTEM "./file.dtd"> - 88 <root>&myentity;</root> - 89 ''', - 90 # DTD - 91 '<!ENTITY myentity "DEFINED">', - 92 ]] - 93 - 94 responses = [] - 95 def handler(environ, start_response): - 96 start_response('200 OK', []) - 97 return [responses.pop()] -
98 - 99 with webserver(handler) as host_url: -100 # DTD network loading enabled -101 responses = data[::-1] -102 tree = self.etree.parse( -103 host_url + 'dir/test.xml', -104 parser=self.etree.XMLParser( -105 load_dtd=True, no_network=False)) -106 self.assertFalse(responses) # all read -107 root = tree.getroot() -108 self.assertEqual('DEFINED', root.text) -109 -110 # DTD network loading disabled -111 responses = data[::-1] -112 try: -113 self.etree.parse( -114 host_url + 'dir/test.xml', -115 parser=self.etree.XMLParser( -116 load_dtd=True, no_network=True)) -117 except self.etree.XMLSyntaxError: -118 self.assertTrue("myentity" in str(sys.exc_info()[1])) -119 else: -120 self.assertTrue(False) -121 self.assertEqual(1, len(responses)) # DTD not read -
122 -123 -
124 -def test_suite(): -
125 suite = unittest.TestSuite() -126 suite.addTests([unittest.makeSuite(HttpIOTestCase)]) -127 return suite -
128 -129 -130 if __name__ == '__main__': -131 print('to test use test.py %s' % __file__) -132 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_http_io.HttpIOTestCase-class.html b/doc/html/api/lxml.tests.test_http_io.HttpIOTestCase-class.html deleted file mode 100644 index 951823d..0000000 --- a/doc/html/api/lxml.tests.test_http_io.HttpIOTestCase-class.html +++ /dev/null @@ -1,487 +0,0 @@ - - - - - lxml.tests.test_http_io.HttpIOTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_http_io :: - Class HttpIOTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class HttpIOTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               HttpIOTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
_parse_from_http(self, - data, - code=200, - headers=None, - parser=None) - source code - -
- -
-   - - - - - - -
test_http_client(self) - source code - -
- -
-   - - - - - - -
test_http_client_404(self) - source code - -
- -
-   - - - - - - -
test_http_client_gzip(self) - source code - -
- -
-   - - - - - - -
test_parser_input_mix(self) - source code - -
- -
-   - - - - - - -
test_network_dtd(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - etree
- The lxml.etree module implements the extended ElementTree API for XML. -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

etree

- The lxml.etree module implements the extended ElementTree API for XML. -
-
-
-
Value:
-
lxml.etree
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_incremental_xmlfile-module.html b/doc/html/api/lxml.tests.test_incremental_xmlfile-module.html deleted file mode 100644 index df460ba..0000000 --- a/doc/html/api/lxml.tests.test_incremental_xmlfile-module.html +++ /dev/null @@ -1,288 +0,0 @@ - - - - - lxml.tests.test_incremental_xmlfile - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_incremental_xmlfile - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module test_incremental_xmlfile

source code

-Tests for the incremental XML serialisation API. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - _XmlFileTestCaseBase -
-   - - BytesIOXmlFileTestCase -
-   - - TempXmlFileTestCase -
-   - - TempPathXmlFileTestCase -
-   - - SimpleFileLikeXmlFileTestCase -
-   - - HtmlFileTestCase -
-   - - AsyncXmlFileTestCase -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
test_suite() - source code - -
- -
- - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - this_dir = '/home/stefan/source/Python/lxml/lxml-release/src/l... -
-   - - __package__ = 'lxml.tests' -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

this_dir

- -
-
-
-
Value:
-
-'/home/stefan/source/Python/lxml/lxml-release/src/lxml/tests'
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_incremental_xmlfile-pysrc.html b/doc/html/api/lxml.tests.test_incremental_xmlfile-pysrc.html deleted file mode 100644 index dd54670..0000000 --- a/doc/html/api/lxml.tests.test_incremental_xmlfile-pysrc.html +++ /dev/null @@ -1,1392 +0,0 @@ - - - - - lxml.tests.test_incremental_xmlfile - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_incremental_xmlfile - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.test_incremental_xmlfile

-
-  1  # -*- coding: utf-8 -*- 
-  2   
-  3  """ 
-  4  Tests for the incremental XML serialisation API. 
-  5  """ 
-  6   
-  7  from __future__ import absolute_import 
-  8   
-  9  import io 
- 10  import os 
- 11  import sys 
- 12  import unittest 
- 13  import textwrap 
- 14  import tempfile 
- 15   
- 16  from lxml.etree import LxmlSyntaxError 
- 17   
- 18  this_dir = os.path.dirname(__file__) 
- 19  if this_dir not in sys.path: 
- 20      sys.path.insert(0, this_dir) # needed for Py3 
- 21   
- 22  from .common_imports import etree, BytesIO, HelperTestCase, skipIf, _str 
-
23 - 24 - 25 -class _XmlFileTestCaseBase(HelperTestCase): -
26 _file = None # to be set by specific subtypes below - 27 -
28 - def test_element(self): -
29 with etree.xmlfile(self._file) as xf: - 30 with xf.element('test'): - 31 pass - 32 self.assertXml('<test></test>') -
33 -
34 - def test_element_write_text(self): -
35 with etree.xmlfile(self._file) as xf: - 36 with xf.element('test'): - 37 xf.write('toast') - 38 self.assertXml('<test>toast</test>') -
39 -
40 - def test_element_write_empty(self): -
41 with etree.xmlfile(self._file) as xf: - 42 with xf.element('test'): - 43 xf.write(None) - 44 xf.write('') - 45 xf.write('') - 46 xf.write(None) - 47 self.assertXml('<test></test>') -
48 -
49 - def test_element_nested(self): -
50 with etree.xmlfile(self._file) as xf: - 51 with xf.element('test'): - 52 with xf.element('toast'): - 53 with xf.element('taste'): - 54 xf.write('conTent') - 55 self.assertXml('<test><toast><taste>conTent</taste></toast></test>') -
56 -
58 with etree.xmlfile(self._file) as xf: - 59 with xf.element('test'): - 60 xf.write('con') - 61 with xf.element('toast'): - 62 xf.write('tent') - 63 with xf.element('taste'): - 64 xf.write('inside') - 65 xf.write('tnet') - 66 xf.write('noc') - 67 self.assertXml('<test>con<toast>tent<taste>inside</taste>' - 68 'tnet</toast>noc</test>') -
69 -
70 - def test_write_Element(self): -
71 with etree.xmlfile(self._file) as xf: - 72 xf.write(etree.Element('test')) - 73 self.assertXml('<test/>') -
74 -
76 element = etree.Element('test') - 77 with etree.xmlfile(self._file) as xf: - 78 with xf.element('test'): - 79 for i in range(100): - 80 xf.write(element) - 81 - 82 tree = self._parse_file() - 83 self.assertTrue(tree is not None) - 84 self.assertEqual(100, len(tree.getroot())) - 85 self.assertEqual(set(['test']), set(el.tag for el in tree.getroot())) -
86 -
87 - def test_namespace_nsmap(self): -
88 with etree.xmlfile(self._file) as xf: - 89 with xf.element('{nsURI}test', nsmap={'x': 'nsURI'}): - 90 pass - 91 self.assertXml('<x:test xmlns:x="nsURI"></x:test>') -
92 -
94 with etree.xmlfile(self._file) as xf: - 95 with xf.element('test', nsmap={'x': 'nsURI'}): - 96 with xf.element('{nsURI}toast'): - 97 pass - 98 self.assertXml('<test xmlns:x="nsURI"><x:toast></x:toast></test>') -
99 -
100 - def test_anonymous_namespace(self): -
101 with etree.xmlfile(self._file) as xf: -102 with xf.element('{nsURI}test'): -103 pass -104 self.assertXml('<ns0:test xmlns:ns0="nsURI"></ns0:test>') -
105 -
107 with etree.xmlfile(self._file) as xf: -108 with xf.element('test'): -109 with xf.element('{nsURI}toast'): -110 pass -111 self.assertXml('<test><ns0:toast xmlns:ns0="nsURI"></ns0:toast></test>') -
112 -
113 - def test_default_namespace(self): -
114 with etree.xmlfile(self._file) as xf: -115 with xf.element('{nsURI}test', nsmap={None: 'nsURI'}): -116 pass -117 self.assertXml('<test xmlns="nsURI"></test>') -
118 -
120 with etree.xmlfile(self._file) as xf: -121 with xf.element('{nsURI}test', nsmap={None: 'nsURI'}): -122 with xf.element('{nsURI}toast'): -123 pass -124 self.assertXml('<test xmlns="nsURI"><toast></toast></test>') -
125 -
127 with etree.xmlfile(self._file) as xf: -128 with xf.element('{nsURI}test', nsmap={None: 'nsURI', 'p': 'ns2'}): -129 with xf.element('{nsURI}toast'): -130 pass -131 with xf.element('{ns2}toast'): -132 pass -133 self.assertXml( -134 '<test xmlns="nsURI" xmlns:p="ns2"><toast></toast><p:toast></p:toast></test>') -
135 -
136 - def test_pi(self): -
137 with etree.xmlfile(self._file) as xf: -138 xf.write(etree.ProcessingInstruction('pypi')) -139 with xf.element('test'): -140 pass -141 self.assertXml('<?pypi ?><test></test>') -
142 -
143 - def test_comment(self): -
144 with etree.xmlfile(self._file) as xf: -145 xf.write(etree.Comment('a comment')) -146 with xf.element('test'): -147 pass -148 self.assertXml('<!--a comment--><test></test>') -
149 -
150 - def test_attribute(self): -
151 with etree.xmlfile(self._file) as xf: -152 with xf.element('test', attrib={'k': 'v'}): -153 pass -154 self.assertXml('<test k="v"></test>') -
155 -
156 - def test_attribute_extra(self): -
157 with etree.xmlfile(self._file) as xf: -158 with xf.element('test', attrib={'k': 'v'}, n='N'): -159 pass -160 self.assertXml('<test k="v" n="N"></test>') -
161 -
163 with etree.xmlfile(self._file) as xf: -164 with xf.element('test', attrib={'k': 'v'}, k='V'): -165 pass -166 self.assertXml('<test k="V"></test>') -
167 -
168 - def test_escaping(self): -
169 with etree.xmlfile(self._file) as xf: -170 with xf.element('test'): -171 xf.write('Comments: <!-- text -->\n') -172 xf.write('Entities: &amp;') -173 self.assertXml( -174 '<test>Comments: &lt;!-- text --&gt;\nEntities: &amp;amp;</test>') -
175 -
176 - def test_encoding(self): -
177 with etree.xmlfile(self._file, encoding='utf16') as xf: -178 with xf.element('test'): -179 xf.write('toast') -180 self.assertXml('<test>toast</test>', encoding='utf16') -
181 -
182 - def test_buffering(self): -
183 with etree.xmlfile(self._file, buffered=False) as xf: -184 with xf.element('test'): -185 self.assertXml("<test>") -186 xf.write('toast') -187 self.assertXml("<test>toast") -188 with xf.element('taste'): -189 self.assertXml("<test>toast<taste>") -190 xf.write('some', etree.Element("more"), "toast") -191 self.assertXml("<test>toast<taste>some<more/>toast") -192 self.assertXml("<test>toast<taste>some<more/>toast</taste>") -193 xf.write('end') -194 self.assertXml("<test>toast<taste>some<more/>toast</taste>end") -195 self.assertXml("<test>toast<taste>some<more/>toast</taste>end</test>") -196 self.assertXml("<test>toast<taste>some<more/>toast</taste>end</test>") -
197 -
198 - def test_flush(self): -
199 with etree.xmlfile(self._file, buffered=True) as xf: -200 with xf.element('test'): -201 self.assertXml("") -202 xf.write('toast') -203 self.assertXml("") -204 with xf.element('taste'): -205 self.assertXml("") -206 xf.flush() -207 self.assertXml("<test>toast<taste>") -208 self.assertXml("<test>toast<taste>") -209 self.assertXml("<test>toast<taste>") -210 self.assertXml("<test>toast<taste></taste></test>") -
211 -
213 try: -214 with etree.xmlfile(self._file) as xf: -215 with xf.element('root'): -216 with xf.element('test'): -217 xf.write("BEFORE") -218 raise TypeError("FAIL!") -219 xf.write("AFTER") -220 except TypeError as exc: -221 self.assertTrue("FAIL" in str(exc), exc) -222 else: -223 self.assertTrue(False, "exception not propagated") -224 self.assertXml("<root><test>BEFORE</test></root>") -
225 -
227 def gen(): -228 with etree.xmlfile(self._file) as xf: -229 with xf.element('root'): -230 while True: -231 content = (yield) -232 with xf.element('entry'): -233 xf.write(content) -
234 -235 g = gen() -236 next(g) -237 g.send('A') -238 g.send('B') -239 g.send('C') -240 g.close() -241 self.assertXml("<root><entry>A</entry><entry>B</entry><entry>C</entry></root>") -
242 -
244 try: -245 with etree.xmlfile(self._file) as xf: -246 xf.write('toast') -247 except etree.LxmlSyntaxError: -248 self.assertTrue(True) -249 else: -250 self.assertTrue(False) -
251 -
252 - def test_failure_trailing_text(self): -
253 with etree.xmlfile(self._file) as xf: -254 with xf.element('test'): -255 pass -256 try: -257 xf.write('toast') -258 except etree.LxmlSyntaxError: -259 self.assertTrue(True) -260 else: -261 self.assertTrue(False) -
262 -
264 with etree.xmlfile(self._file) as xf: -265 with xf.element('test'): -266 pass -267 try: -268 xf.write(etree.Element('test')) -269 except etree.LxmlSyntaxError: -270 self.assertTrue(True) -271 else: -272 self.assertTrue(False) -
273 -
275 cm_exit = None -276 try: -277 with etree.xmlfile(self._file) as xf: -278 x = xf.element('test') -279 cm_exit = x.__exit__ -280 x.__enter__() -281 raise ValueError('123') -282 except ValueError: -283 self.assertTrue(cm_exit) -284 try: -285 cm_exit(ValueError, ValueError("huhu"), None) -286 except etree.LxmlSyntaxError: -287 self.assertTrue(True) -288 else: -289 self.assertTrue(False) -290 else: -291 self.assertTrue(False) -
292 -
293 - def _read_file(self): -
294 pos = self._file.tell() -295 self._file.seek(0) -296 try: -297 return self._file.read() -298 finally: -299 self._file.seek(pos) -
300 -
301 - def _parse_file(self): -
302 pos = self._file.tell() -303 self._file.seek(0) -304 try: -305 return etree.parse(self._file) -306 finally: -307 self._file.seek(pos) -
308 -
309 - def tearDown(self): -
310 if self._file is not None: -311 self._file.close() -
312 -
313 - def assertXml(self, expected, encoding='utf8'): -
314 self.assertEqual(self._read_file().decode(encoding), expected) -
315 -
316 -317 -class BytesIOXmlFileTestCase(_XmlFileTestCaseBase): -
318 - def setUp(self): -
319 self._file = BytesIO() -
320 -
321 - def test_filelike_close(self): -
322 with etree.xmlfile(self._file, close=True) as xf: -323 with xf.element('test'): -324 pass -325 self.assertRaises(ValueError, self._file.getvalue) -
326 -
327 -328 -class TempXmlFileTestCase(_XmlFileTestCaseBase): -
329 - def setUp(self): -
330 self._file = tempfile.TemporaryFile() -
331 -
332 -333 @skipIf(sys.platform.startswith("win"), "Can't reopen temporary files on Windows") -334 -class TempPathXmlFileTestCase(_XmlFileTestCaseBase): -
335 - def setUp(self): -
336 self._tmpfile = tempfile.NamedTemporaryFile() -337 self._file = self._tmpfile.name -
338 -
339 - def tearDown(self): -
340 try: -341 self._tmpfile.close() -342 finally: -343 if os.path.exists(self._tmpfile.name): -344 os.unlink(self._tmpfile.name) -
345 -
346 - def _read_file(self): -
347 self._tmpfile.seek(0) -348 return self._tmpfile.read() -
349 -
350 - def _parse_file(self): -
351 self._tmpfile.seek(0) -352 return etree.parse(self._tmpfile) -
353 -354 @skipIf(True, "temp file behaviour is too platform specific here") -
355 - def test_buffering(self): -
356 pass -
357 -358 @skipIf(True, "temp file behaviour is too platform specific here") -
359 - def test_flush(self): -
360 pass -
361 -
362 -363 -class SimpleFileLikeXmlFileTestCase(_XmlFileTestCaseBase): -
364 - class SimpleFileLike(object): -
365 - def __init__(self, target): -
366 self._target = target -367 self.write = target.write -368 self.tell = target.tell -369 self.seek = target.seek -370 self.closed = False -
371 -
372 - def close(self): -
373 assert not self.closed -374 self.closed = True -375 self._target.close() -
376 -
377 - def setUp(self): -
378 self._target = BytesIO() -379 self._file = self.SimpleFileLike(self._target) -
380 -
381 - def _read_file(self): -
382 return self._target.getvalue() -
383 -
384 - def _parse_file(self): -
385 pos = self._file.tell() -386 self._target.seek(0) -387 try: -388 return etree.parse(self._target) -389 finally: -390 self._target.seek(pos) -
391 -
392 - def test_filelike_not_closing(self): -
393 with etree.xmlfile(self._file) as xf: -394 with xf.element('test'): -395 pass -396 self.assertFalse(self._file.closed) -
397 -
398 - def test_filelike_close(self): -
399 with etree.xmlfile(self._file, close=True) as xf: -400 with xf.element('test'): -401 pass -402 self.assertTrue(self._file.closed) -403 self._file = None # prevent closing in tearDown() -
404 -
405 - def test_write_fails(self): -
406 class WriteError(Exception): -407 pass -
408 -409 class Writer(object): -410 def __init__(self, trigger): -411 self._trigger = trigger -412 self._failed = False -
413 -414 def write(self, data): -415 assert not self._failed, "write() called again after failure" -416 if self._trigger in data: -417 self._failed = True -418 raise WriteError("FAILED: " + self._trigger.decode('utf8')) -419 -420 for trigger in ['text', 'root', 'tag', 'noflush']: -421 try: -422 with etree.xmlfile(Writer(trigger.encode('utf8')), encoding='utf8') as xf: -423 with xf.element('root'): -424 xf.flush() -425 with xf.element('tag'): -426 xf.write('text') -427 xf.flush() -428 xf.write('noflush') -429 xf.flush() -430 xf.flush() -431 except WriteError as exc: -432 self.assertTrue('FAILED: ' + trigger in str(exc)) -433 else: -434 self.assertTrue(False, "exception not raised for '%s'" % trigger) -435 -
436 -437 -class HtmlFileTestCase(_XmlFileTestCaseBase): -
438 - def setUp(self): -
439 self._file = BytesIO() -
440 -
441 - def test_void_elements(self): -
442 # http://www.w3.org/TR/html5/syntax.html#elements-0 -443 void_elements = set([ -444 "area", "base", "br", "col", "embed", "hr", "img", -445 "input", "keygen", "link", "meta", "param", -446 "source", "track", "wbr" -447 ]) -448 -449 # FIXME: These don't get serialized as void elements. -450 void_elements.difference_update([ -451 'area', 'embed', 'keygen', 'source', 'track', 'wbr' -452 ]) -453 -454 for tag in sorted(void_elements): -455 with etree.htmlfile(self._file) as xf: -456 xf.write(etree.Element(tag)) -457 self.assertXml('<%s>' % tag) -458 self._file = BytesIO() -
459 -
461 with etree.htmlfile(self._file) as xf: -462 with xf.element('foo'): -463 cm = xf.method('xml') -464 cm.__enter__() -465 -466 self.assertRaises(LxmlSyntaxError, cm.__enter__) -467 -468 cm2 = xf.method('xml') -469 cm2.__enter__() -470 cm2.__exit__(None, None, None) -471 -472 self.assertRaises(LxmlSyntaxError, cm2.__exit__, None, None, None) -473 -474 cm3 = xf.method('xml') -475 cm3.__enter__() -476 with xf.method('html'): -477 self.assertRaises(LxmlSyntaxError, cm3.__exit__, None, None, None) -
478 -
480 tag = 'foo' -481 attrib = {'selected': 'bar'} -482 elt = etree.Element(tag, attrib=attrib) -483 -484 with etree.htmlfile(self._file) as xf: -485 with xf.element("root"): -486 xf.write(elt) # 1 -487 -488 assert elt.text is None -489 xf.write(elt, method='xml') # 2 -490 -491 elt.text = "" -492 xf.write(elt, method='xml') # 3 -493 -494 with xf.element(tag, attrib=attrib, method='xml'): -495 pass # 4 -496 -497 xf.write(elt) # 5 -498 -499 with xf.method('xml'): -500 xf.write(elt) # 6 -501 -502 self.assertXml( -503 '<root>' -504 '<foo selected></foo>' # 1 -505 '<foo selected="bar"/>' # 2 -506 '<foo selected="bar"></foo>' # 3 -507 '<foo selected="bar"></foo>' # 4 -508 '<foo selected></foo>' # 5 -509 '<foo selected="bar"></foo>' # 6 -510 '</root>') -511 self._file = BytesIO() -
512 -
514 # The htmlfile already outputs in xml mode for .element calls. This -515 # test actually illustrates a bug -516 -517 with etree.htmlfile(self._file) as xf: -518 with xf.element("root"): -519 with xf.element('foo', attrib={'selected': 'bar'}): -520 pass -521 -522 self.assertXml( -523 '<root>' -524 # '<foo selected></foo>' # FIXME: this is the correct output -525 # in html mode -526 '<foo selected="bar"></foo>' -527 '</root>') -528 self._file = BytesIO() -
529 -
530 - def test_attribute_quoting(self): -
531 with etree.htmlfile(self._file) as xf: -532 with xf.element("tagname", attrib={"attr": '"misquoted"'}): -533 xf.write("foo") -534 -535 self.assertXml('<tagname attr="&quot;misquoted&quot;">foo</tagname>') -
536 -
538 with etree.htmlfile(self._file) as xf: -539 with xf.element("tagname", attrib={"attr": _str('"misquöted\\u3344\\U00013344"')}): -540 xf.write("foo") -541 -542 self.assertXml('<tagname attr="&quot;misqu&#xF6;ted&#x3344;&#x13344;&quot;">foo</tagname>') -
543 -
544 - def test_unescaped_script(self): -
545 with etree.htmlfile(self._file) as xf: -546 elt = etree.Element('script') -547 elt.text = "if (a < b);" -548 xf.write(elt) -549 self.assertXml('<script>if (a < b);</script>') -
550 -
552 with etree.htmlfile(self._file) as xf: -553 with xf.element('script'): -554 xf.write("if (a < b);") -555 -556 self.assertXml('<script>if (a < b);</script>') -
557 -
558 - def test_write_declaration(self): -
559 with etree.htmlfile(self._file) as xf: -560 try: -561 xf.write_declaration() -562 except etree.LxmlSyntaxError: -563 self.assertTrue(True) -564 else: -565 self.assertTrue(False) -566 xf.write(etree.Element('html')) -
567 -
569 with etree.htmlfile(self._file) as xf: -570 xf.write(etree.Element('{some_ns}some_tag')) -571 self.assertXml('<ns0:some_tag xmlns:ns0="some_ns"></ns0:some_tag>') -
572 -
574 with etree.htmlfile(self._file) as xf: -575 with xf.element("{some_ns}some_tag"): -576 pass -577 self.assertXml('<ns0:some_tag xmlns:ns0="some_ns"></ns0:some_tag>') -
578 -
579 -580 -class AsyncXmlFileTestCase(HelperTestCase): -
581 - def test_async_api(self): -
582 out = io.BytesIO() -583 xf = etree.xmlfile(out) -584 scm = xf.__enter__() -585 acm = xf.__aenter__() -586 list(acm.__await__()) # fake await to avoid destructor warning -587 -588 def api_of(obj): -589 return sorted(name for name in dir(scm) if not name.startswith('__')) -
590 -591 a_api = api_of(acm) -592 -593 self.assertEqual(api_of(scm), api_of(acm)) -594 self.assertTrue('write' in a_api) -595 self.assertTrue('element' in a_api) -596 self.assertTrue('method' in a_api) -597 self.assertTrue(len(a_api) > 5) -
598 -
599 - def _run_async(self, coro): -
600 while True: -601 try: -602 coro.send(None) -603 except StopIteration as ex: -604 return ex.value -
605 -606 @skipIf(sys.version_info < (3, 5), "requires support for async-def (Py3.5+)") -
607 - def test_async(self): -
608 code = textwrap.dedent("""\ -609 async def test_async_xmlfile(close=True, buffered=True): -610 class Writer(object): -611 def __init__(self): -612 self._data = [] -613 self._all_data = None -614 self._calls = 0 -615 -616 async def write(self, data): -617 self._calls += 1 -618 self._data.append(data) -619 -620 async def close(self): -621 assert self._all_data is None -622 assert self._data is not None -623 self._all_data = b''.join(self._data) -624 self._data = None # make writing fail afterwards -625 -626 async def generate(out, close=True, buffered=True): -627 async with etree.xmlfile(out, close=close, buffered=buffered) as xf: -628 async with xf.element('root'): -629 await xf.write('root-text') -630 async with xf.method('html'): -631 await xf.write(etree.Element('img', src='http://huhu.org/')) -632 await xf.flush() -633 for i in range(3): -634 async with xf.element('el'): -635 await xf.write('text-%d' % i) -636 -637 out = Writer() -638 await generate(out, close=close, buffered=buffered) -639 if not close: -640 await out.close() -641 assert out._data is None, out._data -642 return out._all_data, out._calls -643 """) -644 lns = {} -645 exec(code, globals(), lns) -646 test_async_xmlfile = lns['test_async_xmlfile'] -647 -648 expected = ( -649 b'<root>root-text<img src="http://huhu.org/">' -650 b'<el>text-0</el><el>text-1</el><el>text-2</el></root>' -651 ) -652 -653 data, calls = self._run_async(test_async_xmlfile(close=True)) -654 self.assertEqual(expected, data) -655 self.assertEqual(2, calls) # only flush() and close() -656 -657 data, calls = self._run_async(test_async_xmlfile(close=False)) -658 self.assertEqual(expected, data) -659 self.assertEqual(2, calls) # only flush() and close() -660 -661 data, unbuffered_calls = self._run_async(test_async_xmlfile(buffered=False)) -662 self.assertEqual(expected, data) -663 self.assertTrue(unbuffered_calls > calls, unbuffered_calls) -
664 -
665 -666 -def test_suite(): -
667 suite = unittest.TestSuite() -668 suite.addTests([ -669 unittest.makeSuite(BytesIOXmlFileTestCase), -670 unittest.makeSuite(TempXmlFileTestCase), -671 unittest.makeSuite(TempPathXmlFileTestCase), -672 unittest.makeSuite(SimpleFileLikeXmlFileTestCase), -673 unittest.makeSuite(HtmlFileTestCase), -674 unittest.makeSuite(AsyncXmlFileTestCase), -675 ]) -676 return suite -
677 -678 -679 if __name__ == '__main__': -680 print('to test use test.py %s' % __file__) -681 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_incremental_xmlfile.AsyncXmlFileTestCase-class.html b/doc/html/api/lxml.tests.test_incremental_xmlfile.AsyncXmlFileTestCase-class.html deleted file mode 100644 index ecbcc3c..0000000 --- a/doc/html/api/lxml.tests.test_incremental_xmlfile.AsyncXmlFileTestCase-class.html +++ /dev/null @@ -1,438 +0,0 @@ - - - - - lxml.tests.test_incremental_xmlfile.AsyncXmlFileTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_incremental_xmlfile :: - Class AsyncXmlFileTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class AsyncXmlFileTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               AsyncXmlFileTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_async_api(self) - source code - -
- -
-   - - - - - - -
_run_async(self, - coro) - source code - -
- -
-   - - - - - - -
test_async(*args, - **kwargs) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

test_async(*args, - **kwargs) -

-
source code  -
- - -
-
Decorators:
-
    -
  • @skipIf(sys.version_info <(3, 5), "requires support for async-def (Py3.5+)")
  • -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_incremental_xmlfile.BytesIOXmlFileTestCase-class.html b/doc/html/api/lxml.tests.test_incremental_xmlfile.BytesIOXmlFileTestCase-class.html deleted file mode 100644 index 70024d5..0000000 --- a/doc/html/api/lxml.tests.test_incremental_xmlfile.BytesIOXmlFileTestCase-class.html +++ /dev/null @@ -1,460 +0,0 @@ - - - - - lxml.tests.test_incremental_xmlfile.BytesIOXmlFileTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_incremental_xmlfile :: - Class BytesIOXmlFileTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class BytesIOXmlFileTestCase

source code

-
-               object --+            
-                        |            
-   unittest.case.TestCase --+        
-                            |        
-common_imports.HelperTestCase --+    
-                                |    
-             _XmlFileTestCaseBase --+
-                                    |
-                                   BytesIOXmlFileTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
test_filelike_close(self) - source code - -
- -
-

Inherited from _XmlFileTestCaseBase: - assertXml, - tearDown, - test_anonymous_namespace, - test_attribute, - test_attribute_extra, - test_attribute_extra_duplicate, - test_buffering, - test_closing_out_of_order_in_error_case, - test_comment, - test_default_namespace, - test_element, - test_element_nested, - test_element_nested_with_text, - test_element_write_empty, - test_element_write_text, - test_encoding, - test_escaping, - test_failure_preceding_text, - test_failure_trailing_Element, - test_failure_trailing_text, - test_flush, - test_generator_close_continues_closing, - test_namespace_nested_anonymous, - test_namespace_nested_nsmap, - test_namespace_nsmap, - test_nested_default_namespace, - test_nested_default_namespace_and_other, - test_non_io_exception_continues_closing, - test_pi, - test_write_Element, - test_write_Element_repeatedly -

-

Inherited from _XmlFileTestCaseBase (private): - _parse_file, - _read_file -

-

Inherited from common_imports.HelperTestCase: - parse -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from _XmlFileTestCaseBase (private): - _file -

-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- - Hook method for setting up the test fixture before exercising it. -
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_incremental_xmlfile.HtmlFileTestCase-class.html b/doc/html/api/lxml.tests.test_incremental_xmlfile.HtmlFileTestCase-class.html deleted file mode 100644 index 3a2ab0c..0000000 --- a/doc/html/api/lxml.tests.test_incremental_xmlfile.HtmlFileTestCase-class.html +++ /dev/null @@ -1,620 +0,0 @@ - - - - - lxml.tests.test_incremental_xmlfile.HtmlFileTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_incremental_xmlfile :: - Class HtmlFileTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class HtmlFileTestCase

source code

-
-               object --+            
-                        |            
-   unittest.case.TestCase --+        
-                            |        
-common_imports.HelperTestCase --+    
-                                |    
-             _XmlFileTestCaseBase --+
-                                    |
-                                   HtmlFileTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
test_void_elements(self) - source code - -
- -
-   - - - - - - -
test_method_context_manager_misuse(self) - source code - -
- -
-   - - - - - - -
test_xml_mode_write_inside_html(self) - source code - -
- -
-   - - - - - - -
test_xml_mode_element_inside_html(self) - source code - -
- -
-   - - - - - - -
test_attribute_quoting(self) - source code - -
- -
-   - - - - - - -
test_attribute_quoting_unicode(self) - source code - -
- -
-   - - - - - - -
test_unescaped_script(self) - source code - -
- -
-   - - - - - - -
test_unescaped_script_incremental(self) - source code - -
- -
-   - - - - - - -
test_write_declaration(self) - source code - -
- -
-   - - - - - - -
test_write_namespaced_element(self) - source code - -
- -
-   - - - - - - -
test_open_namespaced_element(self) - source code - -
- -
-

Inherited from _XmlFileTestCaseBase: - assertXml, - tearDown, - test_anonymous_namespace, - test_attribute, - test_attribute_extra, - test_attribute_extra_duplicate, - test_buffering, - test_closing_out_of_order_in_error_case, - test_comment, - test_default_namespace, - test_element, - test_element_nested, - test_element_nested_with_text, - test_element_write_empty, - test_element_write_text, - test_encoding, - test_escaping, - test_failure_preceding_text, - test_failure_trailing_Element, - test_failure_trailing_text, - test_flush, - test_generator_close_continues_closing, - test_namespace_nested_anonymous, - test_namespace_nested_nsmap, - test_namespace_nsmap, - test_nested_default_namespace, - test_nested_default_namespace_and_other, - test_non_io_exception_continues_closing, - test_pi, - test_write_Element, - test_write_Element_repeatedly -

-

Inherited from _XmlFileTestCaseBase (private): - _parse_file, - _read_file -

-

Inherited from common_imports.HelperTestCase: - parse -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from _XmlFileTestCaseBase (private): - _file -

-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- - Hook method for setting up the test fixture before exercising it. -
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase-class.html b/doc/html/api/lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase-class.html deleted file mode 100644 index 647472b..0000000 --- a/doc/html/api/lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase-class.html +++ /dev/null @@ -1,571 +0,0 @@ - - - - - lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_incremental_xmlfile :: - Class SimpleFileLikeXmlFileTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class SimpleFileLikeXmlFileTestCase

source code

-
-               object --+            
-                        |            
-   unittest.case.TestCase --+        
-                            |        
-common_imports.HelperTestCase --+    
-                                |    
-             _XmlFileTestCaseBase --+
-                                    |
-                                   SimpleFileLikeXmlFileTestCase
-
- -
- - - - - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-   - - SimpleFileLike -
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
_read_file(self) - source code - -
- -
-   - - - - - - -
_parse_file(self) - source code - -
- -
-   - - - - - - -
test_filelike_not_closing(self) - source code - -
- -
-   - - - - - - -
test_filelike_close(self) - source code - -
- -
-   - - - - - - -
test_write_fails(self) - source code - -
- -
-

Inherited from _XmlFileTestCaseBase: - assertXml, - tearDown, - test_anonymous_namespace, - test_attribute, - test_attribute_extra, - test_attribute_extra_duplicate, - test_buffering, - test_closing_out_of_order_in_error_case, - test_comment, - test_default_namespace, - test_element, - test_element_nested, - test_element_nested_with_text, - test_element_write_empty, - test_element_write_text, - test_encoding, - test_escaping, - test_failure_preceding_text, - test_failure_trailing_Element, - test_failure_trailing_text, - test_flush, - test_generator_close_continues_closing, - test_namespace_nested_anonymous, - test_namespace_nested_nsmap, - test_namespace_nsmap, - test_nested_default_namespace, - test_nested_default_namespace_and_other, - test_non_io_exception_continues_closing, - test_pi, - test_write_Element, - test_write_Element_repeatedly -

-

Inherited from common_imports.HelperTestCase: - parse -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from _XmlFileTestCaseBase (private): - _file -

-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- - Hook method for setting up the test fixture before exercising it. -
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

_read_file(self) -

-
source code  -
- - -
-
Overrides: - _XmlFileTestCaseBase._read_file -
-
-
-
- -
- -
- - -
-

_parse_file(self) -

-
source code  -
- - -
-
Overrides: - _XmlFileTestCaseBase._parse_file -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase.SimpleFileLike-class.html b/doc/html/api/lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase.SimpleFileLike-class.html deleted file mode 100644 index 72906fb..0000000 --- a/doc/html/api/lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase.SimpleFileLike-class.html +++ /dev/null @@ -1,264 +0,0 @@ - - - - - lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase.SimpleFileLike - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_incremental_xmlfile :: - Class SimpleFileLikeXmlFileTestCase :: - Class SimpleFileLike - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class SimpleFileLike

source code

-
-object --+
-         |
-        SimpleFileLikeXmlFileTestCase.SimpleFileLike
-
- -
- - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - target)
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-   - - - - - - -
close(self) - source code - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - target) -
(Constructor) -

-
source code  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_incremental_xmlfile.TempPathXmlFileTestCase-class.html b/doc/html/api/lxml.tests.test_incremental_xmlfile.TempPathXmlFileTestCase-class.html deleted file mode 100644 index 046e33c..0000000 --- a/doc/html/api/lxml.tests.test_incremental_xmlfile.TempPathXmlFileTestCase-class.html +++ /dev/null @@ -1,641 +0,0 @@ - - - - - lxml.tests.test_incremental_xmlfile.TempPathXmlFileTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_incremental_xmlfile :: - Class TempPathXmlFileTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class TempPathXmlFileTestCase

source code

-
-               object --+            
-                        |            
-   unittest.case.TestCase --+        
-                            |        
-common_imports.HelperTestCase --+    
-                                |    
-             _XmlFileTestCaseBase --+
-                                    |
-                                   TempPathXmlFileTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
_read_file(self) - source code - -
- -
-   - - - - - - -
_parse_file(self) - source code - -
- -
-   - - - - - - -
test_buffering(*args, - **kwargs) - source code - -
- -
-   - - - - - - -
test_flush(*args, - **kwargs) - source code - -
- -
-

Inherited from _XmlFileTestCaseBase: - assertXml, - test_anonymous_namespace, - test_attribute, - test_attribute_extra, - test_attribute_extra_duplicate, - test_closing_out_of_order_in_error_case, - test_comment, - test_default_namespace, - test_element, - test_element_nested, - test_element_nested_with_text, - test_element_write_empty, - test_element_write_text, - test_encoding, - test_escaping, - test_failure_preceding_text, - test_failure_trailing_Element, - test_failure_trailing_text, - test_generator_close_continues_closing, - test_namespace_nested_anonymous, - test_namespace_nested_nsmap, - test_namespace_nsmap, - test_nested_default_namespace, - test_nested_default_namespace_and_other, - test_non_io_exception_continues_closing, - test_pi, - test_write_Element, - test_write_Element_repeatedly -

-

Inherited from common_imports.HelperTestCase: - parse -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from _XmlFileTestCaseBase (private): - _file -

-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- - Hook method for setting up the test fixture before exercising it. -
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- - Hook method for deconstructing the test fixture after testing it. -
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

_read_file(self) -

-
source code  -
- - -
-
Overrides: - _XmlFileTestCaseBase._read_file -
-
-
-
- -
- -
- - -
-

_parse_file(self) -

-
source code  -
- - -
-
Overrides: - _XmlFileTestCaseBase._parse_file -
-
-
-
- -
- -
- - -
-

test_buffering(*args, - **kwargs) -

-
source code  -
- - -
-
Decorators:
-
    -
  • @skipIf(True, "temp file behaviour is too platform specific here")
  • -
-
Overrides: - _XmlFileTestCaseBase.test_buffering -
-
-
-
- -
- -
- - -
-

test_flush(*args, - **kwargs) -

-
source code  -
- - -
-
Decorators:
-
    -
  • @skipIf(True, "temp file behaviour is too platform specific here")
  • -
-
Overrides: - _XmlFileTestCaseBase.test_flush -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_incremental_xmlfile.TempXmlFileTestCase-class.html b/doc/html/api/lxml.tests.test_incremental_xmlfile.TempXmlFileTestCase-class.html deleted file mode 100644 index ca962e0..0000000 --- a/doc/html/api/lxml.tests.test_incremental_xmlfile.TempXmlFileTestCase-class.html +++ /dev/null @@ -1,444 +0,0 @@ - - - - - lxml.tests.test_incremental_xmlfile.TempXmlFileTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_incremental_xmlfile :: - Class TempXmlFileTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class TempXmlFileTestCase

source code

-
-               object --+            
-                        |            
-   unittest.case.TestCase --+        
-                            |        
-common_imports.HelperTestCase --+    
-                                |    
-             _XmlFileTestCaseBase --+
-                                    |
-                                   TempXmlFileTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-

Inherited from _XmlFileTestCaseBase: - assertXml, - tearDown, - test_anonymous_namespace, - test_attribute, - test_attribute_extra, - test_attribute_extra_duplicate, - test_buffering, - test_closing_out_of_order_in_error_case, - test_comment, - test_default_namespace, - test_element, - test_element_nested, - test_element_nested_with_text, - test_element_write_empty, - test_element_write_text, - test_encoding, - test_escaping, - test_failure_preceding_text, - test_failure_trailing_Element, - test_failure_trailing_text, - test_flush, - test_generator_close_continues_closing, - test_namespace_nested_anonymous, - test_namespace_nested_nsmap, - test_namespace_nsmap, - test_nested_default_namespace, - test_nested_default_namespace_and_other, - test_non_io_exception_continues_closing, - test_pi, - test_write_Element, - test_write_Element_repeatedly -

-

Inherited from _XmlFileTestCaseBase (private): - _parse_file, - _read_file -

-

Inherited from common_imports.HelperTestCase: - parse -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from _XmlFileTestCaseBase (private): - _file -

-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- - Hook method for setting up the test fixture before exercising it. -
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html b/doc/html/api/lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html deleted file mode 100644 index 45cbf49..0000000 --- a/doc/html/api/lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html +++ /dev/null @@ -1,931 +0,0 @@ - - - - - lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_incremental_xmlfile :: - Class _XmlFileTestCaseBase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _XmlFileTestCaseBase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               _XmlFileTestCaseBase
-
- -
Known Subclasses:
-
- -
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_element(self) - source code - -
- -
-   - - - - - - -
test_element_write_text(self) - source code - -
- -
-   - - - - - - -
test_element_write_empty(self) - source code - -
- -
-   - - - - - - -
test_element_nested(self) - source code - -
- -
-   - - - - - - -
test_element_nested_with_text(self) - source code - -
- -
-   - - - - - - -
test_write_Element(self) - source code - -
- -
-   - - - - - - -
test_write_Element_repeatedly(self) - source code - -
- -
-   - - - - - - -
test_namespace_nsmap(self) - source code - -
- -
-   - - - - - - -
test_namespace_nested_nsmap(self) - source code - -
- -
-   - - - - - - -
test_anonymous_namespace(self) - source code - -
- -
-   - - - - - - -
test_namespace_nested_anonymous(self) - source code - -
- -
-   - - - - - - -
test_default_namespace(self) - source code - -
- -
-   - - - - - - -
test_nested_default_namespace(self) - source code - -
- -
-   - - - - - - -
test_nested_default_namespace_and_other(self) - source code - -
- -
-   - - - - - - -
test_pi(self) - source code - -
- -
-   - - - - - - -
test_comment(self) - source code - -
- -
-   - - - - - - -
test_attribute(self) - source code - -
- -
-   - - - - - - -
test_attribute_extra(self) - source code - -
- -
-   - - - - - - -
test_attribute_extra_duplicate(self) - source code - -
- -
-   - - - - - - -
test_escaping(self) - source code - -
- -
-   - - - - - - -
test_encoding(self) - source code - -
- -
-   - - - - - - -
test_buffering(self) - source code - -
- -
-   - - - - - - -
test_flush(self) - source code - -
- -
-   - - - - - - -
test_non_io_exception_continues_closing(self) - source code - -
- -
-   - - - - - - -
test_generator_close_continues_closing(self) - source code - -
- -
-   - - - - - - -
test_failure_preceding_text(self) - source code - -
- -
-   - - - - - - -
test_failure_trailing_text(self) - source code - -
- -
-   - - - - - - -
test_failure_trailing_Element(self) - source code - -
- -
-   - - - - - - -
test_closing_out_of_order_in_error_case(self) - source code - -
- -
-   - - - - - - -
_read_file(self) - source code - -
- -
-   - - - - - - -
_parse_file(self) - source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
assertXml(self, - expected, - encoding='utf8') - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - _file = None
- hash(x) -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- - Hook method for deconstructing the test fixture after testing it. -
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_io-module.html b/doc/html/api/lxml.tests.test_io-module.html deleted file mode 100644 index 9e0325e..0000000 --- a/doc/html/api/lxml.tests.test_io-module.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - lxml.tests.test_io - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_io - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module test_io

source code

-IO test cases that apply to both etree and ElementTree - - - - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - _IOTestCaseBase
- (c)ElementTree compatibility for IO functions/methods -
-   - - ETreeIOTestCase -
-   - - ElementTreeIOTestCase -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
test_suite() - source code - -
- -
- - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - this_dir = '/home/stefan/source/Python/lxml/lxml-release/src/l... -
-   - - __package__ = 'lxml.tests' -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

this_dir

- -
-
-
-
Value:
-
-'/home/stefan/source/Python/lxml/lxml-release/src/lxml/tests'
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_io-pysrc.html b/doc/html/api/lxml.tests.test_io-pysrc.html deleted file mode 100644 index b13dfb9..0000000 --- a/doc/html/api/lxml.tests.test_io-pysrc.html +++ /dev/null @@ -1,1189 +0,0 @@ - - - - - lxml.tests.test_io - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_io - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.test_io

-
-  1  # -*- coding: utf-8 -*- 
-  2   
-  3  """ 
-  4  IO test cases that apply to both etree and ElementTree 
-  5  """ 
-  6   
-  7  import unittest 
-  8  import tempfile, gzip, os, os.path, sys, gc, shutil 
-  9   
- 10  this_dir = os.path.dirname(__file__) 
- 11  if this_dir not in sys.path: 
- 12      sys.path.insert(0, this_dir)  # needed for Py3 
- 13   
- 14  from common_imports import etree, ElementTree, _str, _bytes 
- 15  from common_imports import SillyFileLike, LargeFileLike, HelperTestCase 
- 16  from common_imports import read_file, write_to_file, BytesIO 
- 17   
- 18  if sys.version_info < (2,6): 
-
19 - class NamedTemporaryFile(object): -
20 - def __init__(self, delete=True, **kwargs): -
21 self._tmpfile = tempfile.NamedTemporaryFile(**kwargs) -
22 - def close(self): -
23 self._tmpfile.flush() -
24 - def __getattr__(self, name): -
25 return getattr(self._tmpfile, name) -
26 else: - 27 NamedTemporaryFile = tempfile.NamedTemporaryFile - 28 - 29 -
30 -class _IOTestCaseBase(HelperTestCase): -
31 """(c)ElementTree compatibility for IO functions/methods - 32 """ - 33 etree = None - 34 -
35 - def setUp(self): -
36 """Setting up a minimal tree - 37 """ - 38 self.root = self.etree.Element('a') - 39 self.root_str = self.etree.tostring(self.root) - 40 self.tree = self.etree.ElementTree(self.root) - 41 self._temp_dir = tempfile.mkdtemp() -
42 -
43 - def tearDown(self): -
44 gc.collect() - 45 shutil.rmtree(self._temp_dir) -
46 -
47 - def getTestFilePath(self, name): -
48 return os.path.join(self._temp_dir, name) -
49 -
50 - def buildNodes(self, element, children, depth): -
51 Element = self.etree.Element - 52 - 53 if depth == 0: - 54 return - 55 for i in range(children): - 56 new_element = Element('element_%s_%s' % (depth, i)) - 57 self.buildNodes(new_element, children, depth - 1) - 58 element.append(new_element) -
59 -
60 - def test_tree_io(self): -
61 Element = self.etree.Element - 62 ElementTree = self.etree.ElementTree - 63 - 64 element = Element('top') - 65 element.text = _str("qwrtioüöä\uAABB") - 66 tree = ElementTree(element) - 67 self.buildNodes(element, 10, 3) - 68 f = open(self.getTestFilePath('testdump.xml'), 'wb') - 69 tree.write(f, encoding='UTF-8') - 70 f.close() - 71 f = open(self.getTestFilePath('testdump.xml'), 'rb') - 72 tree = ElementTree(file=f) - 73 f.close() - 74 f = open(self.getTestFilePath('testdump2.xml'), 'wb') - 75 tree.write(f, encoding='UTF-8') - 76 f.close() - 77 f = open(self.getTestFilePath('testdump.xml'), 'rb') - 78 data1 = f.read() - 79 f.close() - 80 f = open(self.getTestFilePath('testdump2.xml'), 'rb') - 81 data2 = f.read() - 82 f.close() - 83 self.assertEqual(data1, data2) -
84 -
85 - def test_tree_io_latin1(self): -
86 Element = self.etree.Element - 87 ElementTree = self.etree.ElementTree - 88 - 89 element = Element('top') - 90 element.text = _str("qwrtioüöäßá") - 91 tree = ElementTree(element) - 92 self.buildNodes(element, 10, 3) - 93 f = open(self.getTestFilePath('testdump.xml'), 'wb') - 94 tree.write(f, encoding='iso-8859-1') - 95 f.close() - 96 f = open(self.getTestFilePath('testdump.xml'), 'rb') - 97 tree = ElementTree(file=f) - 98 f.close() - 99 f = open(self.getTestFilePath('testdump2.xml'), 'wb') -100 tree.write(f, encoding='iso-8859-1') -101 f.close() -102 f = open(self.getTestFilePath('testdump.xml'), 'rb') -103 data1 = f.read() -104 f.close() -105 f = open(self.getTestFilePath('testdump2.xml'), 'rb') -106 data2 = f.read() -107 f.close() -108 self.assertEqual(data1, data2) -
109 -
110 - def test_write_filename(self): -
111 # (c)ElementTree supports filename strings as write argument -112 -113 handle, filename = tempfile.mkstemp(suffix=".xml") -114 self.tree.write(filename) -115 try: -116 self.assertEqual(read_file(filename, 'rb').replace(_bytes('\n'), _bytes('')), -117 self.root_str) -118 finally: -119 os.close(handle) -120 os.remove(filename) -
121 -
123 filename = os.path.join( -124 os.path.join('hopefullynonexistingpathname'), -125 'invalid_file.xml') -126 try: -127 self.tree.write(filename) -128 except IOError: -129 pass -130 else: -131 self.assertTrue( -132 False, "writing to an invalid file path should fail") -
133 -
135 # (c)ElementTree supports gzip instance as parse argument -136 handle, filename = tempfile.mkstemp(suffix=".xml.gz") -137 f = gzip.open(filename, 'wb') -138 f.write(self.root_str) -139 f.close() -140 try: -141 f_gz = gzip.open(filename, 'rb') -142 tree = self.etree.parse(f_gz) -143 f_gz.close() -144 self.assertEqual(self.etree.tostring(tree.getroot()), self.root_str) -145 finally: -146 os.close(handle) -147 os.remove(filename) -
148 -
149 - def test_class_parse_filename(self): -
150 # (c)ElementTree class ElementTree has a 'parse' method that returns -151 # the root of the tree -152 -153 # parse from filename -154 -155 handle, filename = tempfile.mkstemp(suffix=".xml") -156 write_to_file(filename, self.root_str, 'wb') -157 try: -158 tree = self.etree.ElementTree() -159 root = tree.parse(filename) -160 self.assertEqual(self.etree.tostring(root), self.root_str) -161 finally: -162 os.close(handle) -163 os.remove(filename) -
164 -
166 handle, filename = tempfile.mkstemp(suffix=".xml") -167 write_to_file(filename, self.root_str, 'wb') -168 try: -169 tree = self.etree.ElementTree() -170 root = tree.parse(filename) -171 # and now do it again; previous content should still be there -172 root2 = tree.parse(filename) -173 self.assertEqual('a', root.tag) -174 self.assertEqual('a', root2.tag) -175 # now remove all references to root2, and parse again -176 del root2 -177 root3 = tree.parse(filename) -178 self.assertEqual('a', root.tag) -179 self.assertEqual('a', root3.tag) -180 # root2's memory should've been freed here -181 # XXX how to check? -182 finally: -183 os.close(handle) -184 os.remove(filename) -
185 -
187 # (c)ElementTree class ElementTree has a 'parse' method that returns -188 # the root of the tree -189 -190 # parse from file object -191 -192 handle, filename = tempfile.mkstemp(suffix=".xml") -193 try: -194 os.write(handle, self.root_str) -195 f = open(filename, 'rb') -196 tree = self.etree.ElementTree() -197 root = tree.parse(f) -198 f.close() -199 self.assertEqual(self.etree.tostring(root), self.root_str) -200 finally: -201 os.close(handle) -202 os.remove(filename) -
203 -
205 # (c)ElementTree class ElementTree has a 'parse' method that returns -206 # the root of the tree -207 -208 # parse from unamed file object -209 f = SillyFileLike() -210 root = self.etree.ElementTree().parse(f) -211 self.assertTrue(root.tag.endswith('foo')) -
212 -
214 # parse from unamed file object -215 f = LargeFileLike() -216 tree = self.etree.parse(f) -217 root = tree.getroot() -218 self.assertTrue(root.tag.endswith('root')) -
219 -
221 class LocalError(Exception): -222 pass -
223 class TestFile: -224 def read(*args): -225 raise LocalError -
226 f = TestFile() -227 self.assertRaises(LocalError, self.etree.parse, f) -228 -
230 class LocalError(Exception): -231 pass -
232 class TestFile: -233 data = '<root>test</' -234 try: -235 next_char = iter(data).next -236 except AttributeError: -237 # Python 3 -238 next_char = iter(data).__next__ -239 counter = 0 -240 def read(self, amount=None): -241 if amount is None: -242 while True: -243 self.read(1) -244 else: -245 try: -246 self.counter += 1 -247 return _bytes(self.next_char()) -248 except StopIteration: -249 raise LocalError -250 f = TestFile() -251 self.assertRaises(LocalError, self.etree.parse, f) -252 self.assertEqual(f.counter, len(f.data)+1) -253 -
255 class TestFile: -256 def read(*args): -257 return 1 -
258 f = TestFile() -259 -260 try: -261 expect_exc = (TypeError, self.etree.ParseError) -262 except AttributeError: -263 expect_exc = TypeError -264 self.assertRaises(expect_exc, self.etree.parse, f) -265 -
266 - def test_etree_parse_io_error(self): -
267 # this is a directory name that contains characters beyond latin-1 -268 dirnameEN = _str('Directory') -269 dirnameRU = _str('Каталог') -270 filename = _str('nosuchfile.xml') -271 dn = tempfile.mkdtemp(prefix=dirnameEN) -272 try: -273 self.assertRaises(IOError, self.etree.parse, os.path.join(dn, filename)) -274 finally: -275 os.rmdir(dn) -276 dn = tempfile.mkdtemp(prefix=dirnameRU) -277 try: -278 self.assertRaises(IOError, self.etree.parse, os.path.join(dn, filename)) -279 finally: -280 os.rmdir(dn) -
281 -
282 - def test_parse_utf8_bom(self): -
283 utext = _str('Søk på nettet') -284 uxml = '<?xml version="1.0" encoding="UTF-8"?><p>%s</p>' % utext -285 bom = _bytes('\\xEF\\xBB\\xBF').decode( -286 "unicode_escape").encode("latin1") -287 self.assertEqual(3, len(bom)) -288 f = NamedTemporaryFile(delete=False) -289 try: -290 try: -291 f.write(bom) -292 f.write(uxml.encode("utf-8")) -293 finally: -294 f.close() -295 tree = self.etree.parse(f.name) -296 finally: -297 os.unlink(f.name) -298 self.assertEqual(utext, tree.getroot().text) -
299 -
300 - def test_iterparse_utf8_bom(self): -
301 utext = _str('Søk på nettet') -302 uxml = '<?xml version="1.0" encoding="UTF-8"?><p>%s</p>' % utext -303 bom = _bytes('\\xEF\\xBB\\xBF').decode( -304 "unicode_escape").encode("latin1") -305 self.assertEqual(3, len(bom)) -306 f = NamedTemporaryFile(delete=False) -307 try: -308 try: -309 f.write(bom) -310 f.write(uxml.encode("utf-8")) -311 finally: -312 f.close() -313 elements = [el for _, el in self.etree.iterparse(f.name)] -314 self.assertEqual(1, len(elements)) -315 root = elements[0] -316 finally: -317 os.unlink(f.name) -318 self.assertEqual(utext, root.text) -
319 -
320 - def test_iterparse_utf16_bom(self): -
321 utext = _str('Søk på nettet') -322 uxml = '<?xml version="1.0" encoding="UTF-16"?><p>%s</p>' % utext -323 boms = _bytes('\\xFE\\xFF \\xFF\\xFE').decode( -324 "unicode_escape").encode("latin1") -325 self.assertEqual(5, len(boms)) -326 xml = uxml.encode("utf-16") -327 self.assertTrue(xml[:2] in boms, repr(xml[:2])) -328 -329 f = NamedTemporaryFile(delete=False) -330 try: -331 try: -332 f.write(xml) -333 finally: -334 f.close() -335 elements = [el for _, el in self.etree.iterparse(f.name)] -336 self.assertEqual(1, len(elements)) -337 root = elements[0] -338 finally: -339 os.unlink(f.name) -340 self.assertEqual(utext, root.text) -
341 -342 -
343 -class ETreeIOTestCase(_IOTestCaseBase): -
344 etree = etree -345 -
346 - def test_write_compressed_text(self): -
347 Element = self.etree.Element -348 SubElement = self.etree.SubElement -349 ElementTree = self.etree.ElementTree -350 text = _str("qwrtioüöä") -351 -352 root = Element('root') -353 root.text = text -354 child = SubElement(root, 'sub') -355 child.text = 'TEXT' -356 child.tail = 'TAIL' -357 SubElement(root, 'sub').text = text -358 -359 tree = ElementTree(root) -360 out = BytesIO() -361 tree.write(out, method='text', encoding='utf8', compression=9) -362 out.seek(0) -363 -364 f = gzip.GzipFile(fileobj=out) -365 try: -366 result = f.read().decode('utf8') -367 finally: -368 f.close() -369 self.assertEqual(text+'TEXTTAIL'+text, result) -
370 -371 -372 if ElementTree: -
373 - class ElementTreeIOTestCase(_IOTestCaseBase): -
375 -376 -
377 -def test_suite(): -
378 suite = unittest.TestSuite() -379 suite.addTests([unittest.makeSuite(ETreeIOTestCase)]) -380 if ElementTree: -381 suite.addTests([unittest.makeSuite(ElementTreeIOTestCase)]) -382 return suite -
383 -384 -385 if __name__ == '__main__': -386 print('to test use test.py %s' % __file__) -387 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_io.ETreeIOTestCase-class.html b/doc/html/api/lxml.tests.test_io.ETreeIOTestCase-class.html deleted file mode 100644 index ebbf001..0000000 --- a/doc/html/api/lxml.tests.test_io.ETreeIOTestCase-class.html +++ /dev/null @@ -1,426 +0,0 @@ - - - - - lxml.tests.test_io.ETreeIOTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_io :: - Class ETreeIOTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ETreeIOTestCase

source code

-
-               object --+            
-                        |            
-   unittest.case.TestCase --+        
-                            |        
-common_imports.HelperTestCase --+    
-                                |    
-                  _IOTestCaseBase --+
-                                    |
-                                   ETreeIOTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_write_compressed_text(self) - source code - -
- -
-

Inherited from _IOTestCaseBase: - buildNodes, - getTestFilePath, - setUp, - tearDown, - test_class_parse_filename, - test_class_parse_filename_remove_previous, - test_class_parse_fileobject, - test_class_parse_unamed_fileobject, - test_etree_parse_io_error, - test_iterparse_utf16_bom, - test_iterparse_utf8_bom, - test_module_parse_fileobject_error, - test_module_parse_fileobject_late_error, - test_module_parse_fileobject_type_error, - test_module_parse_gzipobject, - test_module_parse_large_fileobject, - test_parse_utf8_bom, - test_tree_io, - test_tree_io_latin1, - test_write_filename, - test_write_invalid_filename -

-

Inherited from common_imports.HelperTestCase: - parse -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - etree
- The lxml.etree module implements the extended ElementTree API for XML. -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

etree

- The lxml.etree module implements the extended ElementTree API for XML. -
-
-
-
Value:
-
lxml.etree
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_io.ElementTreeIOTestCase-class.html b/doc/html/api/lxml.tests.test_io.ElementTreeIOTestCase-class.html deleted file mode 100644 index 3268731..0000000 --- a/doc/html/api/lxml.tests.test_io.ElementTreeIOTestCase-class.html +++ /dev/null @@ -1,410 +0,0 @@ - - - - - lxml.tests.test_io.ElementTreeIOTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_io :: - Class ElementTreeIOTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ElementTreeIOTestCase

source code

-
-               object --+            
-                        |            
-   unittest.case.TestCase --+        
-                            |        
-common_imports.HelperTestCase --+    
-                                |    
-                  _IOTestCaseBase --+
-                                    |
-                                   ElementTreeIOTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from _IOTestCaseBase: - buildNodes, - getTestFilePath, - setUp, - tearDown, - test_class_parse_filename, - test_class_parse_filename_remove_previous, - test_class_parse_fileobject, - test_class_parse_unamed_fileobject, - test_etree_parse_io_error, - test_iterparse_utf16_bom, - test_iterparse_utf8_bom, - test_module_parse_fileobject_error, - test_module_parse_fileobject_late_error, - test_module_parse_fileobject_type_error, - test_module_parse_gzipobject, - test_module_parse_large_fileobject, - test_parse_utf8_bom, - test_tree_io, - test_tree_io_latin1, - test_write_filename, - test_write_invalid_filename -

-

Inherited from common_imports.HelperTestCase: - parse -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - etree
- hash(x) -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

etree

- hash(x) -
-
-
-
Value:
-
xml.etree.ElementTree
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_io._IOTestCaseBase-class.html b/doc/html/api/lxml.tests.test_io._IOTestCaseBase-class.html deleted file mode 100644 index bdd0d99..0000000 --- a/doc/html/api/lxml.tests.test_io._IOTestCaseBase-class.html +++ /dev/null @@ -1,765 +0,0 @@ - - - - - lxml.tests.test_io._IOTestCaseBase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_io :: - Class _IOTestCaseBase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _IOTestCaseBase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               _IOTestCaseBase
-
- -
Known Subclasses:
-
- -
- -
-(c)ElementTree compatibility for IO functions/methods - - - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Setting up a minimal tree
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
getTestFilePath(self, - name) - source code - -
- -
-   - - - - - - -
buildNodes(self, - element, - children, - depth) - source code - -
- -
-   - - - - - - -
test_tree_io(self) - source code - -
- -
-   - - - - - - -
test_tree_io_latin1(self) - source code - -
- -
-   - - - - - - -
test_write_filename(self) - source code - -
- -
-   - - - - - - -
test_write_invalid_filename(self) - source code - -
- -
-   - - - - - - -
test_module_parse_gzipobject(self) - source code - -
- -
-   - - - - - - -
test_class_parse_filename(self) - source code - -
- -
-   - - - - - - -
test_class_parse_filename_remove_previous(self) - source code - -
- -
-   - - - - - - -
test_class_parse_fileobject(self) - source code - -
- -
-   - - - - - - -
test_class_parse_unamed_fileobject(self) - source code - -
- -
-   - - - - - - -
test_module_parse_large_fileobject(self) - source code - -
- -
-   - - - - - - -
test_module_parse_fileobject_error(self) - source code - -
- -
-   - - - - - - -
test_module_parse_fileobject_late_error(self) - source code - -
- -
-   - - - - - - -
test_module_parse_fileobject_type_error(self) - source code - -
- -
-   - - - - - - -
test_etree_parse_io_error(self) - source code - -
- -
-   - - - - - - -
test_parse_utf8_bom(self) - source code - -
- -
-   - - - - - - -
test_iterparse_utf8_bom(self) - source code - -
- -
-   - - - - - - -
test_iterparse_utf16_bom(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - etree = None
- hash(x) -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- - Setting up a minimal tree -
-
Overrides: - unittest.case.TestCase.setUp -
-
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- - Hook method for deconstructing the test fixture after testing it. -
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_isoschematron-module.html b/doc/html/api/lxml.tests.test_isoschematron-module.html deleted file mode 100644 index bf04797..0000000 --- a/doc/html/api/lxml.tests.test_isoschematron-module.html +++ /dev/null @@ -1,246 +0,0 @@ - - - - - lxml.tests.test_isoschematron - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_isoschematron - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module test_isoschematron

source code

-Test cases related to ISO-Schematron parsing and validation - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - ETreeISOSchematronTestCase -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
test_suite() - source code - -
- -
- - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - this_dir = '/home/stefan/source/Python/lxml/lxml-release/src/l... -
-   - - __package__ = 'lxml.tests' -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

this_dir

- -
-
-
-
Value:
-
-'/home/stefan/source/Python/lxml/lxml-release/src/lxml/tests'
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_isoschematron-pysrc.html b/doc/html/api/lxml.tests.test_isoschematron-pysrc.html deleted file mode 100644 index dd51a9f..0000000 --- a/doc/html/api/lxml.tests.test_isoschematron-pysrc.html +++ /dev/null @@ -1,1681 +0,0 @@ - - - - - lxml.tests.test_isoschematron - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_isoschematron - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.test_isoschematron

-
-  1  # -*- coding: utf-8 -*- 
-  2   
-  3  """ 
-  4  Test cases related to ISO-Schematron parsing and validation 
-  5  """ 
-  6   
-  7  import unittest, sys, os.path 
-  8  from lxml import isoschematron 
-  9   
- 10  this_dir = os.path.dirname(__file__) 
- 11  if this_dir not in sys.path: 
- 12      sys.path.insert(0, this_dir) # needed for Py3 
- 13   
- 14  from common_imports import etree, HelperTestCase, fileInTestDir 
- 15  from common_imports import doctest, make_doctest 
- 16   
- 17   
-
18 -class ETreeISOSchematronTestCase(HelperTestCase): -
19 - def test_schematron(self): -
20 tree_valid = self.parse('<AAA><BBB/><CCC/></AAA>') - 21 tree_invalid = self.parse('<AAA><BBB/><CCC/><DDD/></AAA>') - 22 schema = self.parse('''\ - 23 <schema xmlns="http://purl.oclc.org/dsdl/schematron" > - 24 <pattern id="OpenModel"> - 25 <title>Open Model</title> - 26 <rule context="AAA"> - 27 <assert test="BBB"> BBB element is not present</assert> - 28 <assert test="CCC"> CCC element is not present</assert> - 29 </rule> - 30 </pattern> - 31 <pattern id="ClosedModel"> - 32 <title>Closed model"</title> - 33 <rule context="AAA"> - 34 <assert test="BBB"> BBB element is not present</assert> - 35 <assert test="CCC"> CCC element is not present</assert> - 36 <assert test="count(BBB|CCC) = count (*)">There is an extra element</assert> - 37 </rule> - 38 </pattern> - 39 </schema> - 40 ''') - 41 - 42 schema = isoschematron.Schematron(schema) - 43 self.assertTrue(schema.validate(tree_valid)) - 44 self.assertTrue(not schema.validate(tree_invalid)) -
45 -
47 self.assertRaises(ValueError, isoschematron.Schematron, etree.ElementTree()) -
48 - 49 # an empty pattern is valid in iso schematron -
51 schema = self.parse('''\ - 52 <schema xmlns="http://purl.oclc.org/dsdl/schematron" > - 53 <pattern id="OpenModel"> - 54 <title>Open model</title> - 55 </pattern> - 56 </schema> - 57 ''') - 58 schema = isoschematron.Schematron(schema) - 59 self.assertTrue(schema) -
60 -
62 schema = self.parse('''\ - 63 <schema xmlns="http://purl.oclc.org/dsdl/schematron" /> - 64 ''') - 65 self.assertRaises(etree.SchematronParseError, - 66 isoschematron.Schematron, schema) -
67 -
69 schema = self.parse('''\ - 70 <schema xmlns="mynamespace" /> - 71 ''') - 72 self.assertRaises(etree.SchematronParseError, - 73 isoschematron.Schematron, schema) -
74 -
75 - def test_schematron_from_tree(self): -
76 schema = self.parse('''\ - 77 <sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron"> - 78 <sch:pattern id="number_of_entries"> - 79 <sch:title>mandatory number_of_entries tests</sch:title> - 80 <sch:rule context="number_of_entries"> - 81 <sch:assert test="text()=count(../entries/entry)">[ERROR] number_of_entries (<sch:value-of select="."/>) must equal the number of entries/entry elements (<sch:value-of select="count(../entries/entry)"/>)</sch:assert> - 82 </sch:rule> - 83 </sch:pattern> - 84 </sch:schema> - 85 ''') - 86 schematron = isoschematron.Schematron(schema) - 87 self.assertTrue(isinstance(schematron, isoschematron.Schematron)) -
88 -
90 schema = self.parse('''\ - 91 <sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron"> - 92 <sch:pattern id="number_of_entries"> - 93 <sch:title>mandatory number_of_entries tests</sch:title> - 94 <sch:rule context="number_of_entries"> - 95 <sch:assert test="text()=count(../entries/entry)">[ERROR] number_of_entries (<sch:value-of select="."/>) must equal the number of entries/entry elements (<sch:value-of select="count(../entries/entry)"/>)</sch:assert> - 96 </sch:rule> - 97 </sch:pattern> - 98 </sch:schema> - 99 ''') -100 schematron = isoschematron.Schematron(schema.getroot()) -101 self.assertTrue(isinstance(schematron, isoschematron.Schematron)) -
102 -
103 - def test_schematron_from_file(self): -
104 schematron = isoschematron.Schematron(file=fileInTestDir('test.sch')) -105 self.assertTrue(isinstance(schematron, isoschematron.Schematron)) -
106 -
107 - def test_schematron_call(self): -
108 schema = self.parse('''\ -109 <sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron"> -110 <sch:pattern id="number_of_entries"> -111 <sch:title>mandatory number_of_entries tests</sch:title> -112 <sch:rule context="number_of_entries"> -113 <sch:assert test="text()=count(../entries/entry)">[ERROR] number_of_entries (<sch:value-of select="."/>) must equal the number of entries/entry elements (<sch:value-of select="count(../entries/entry)"/>)</sch:assert> -114 </sch:rule> -115 </sch:pattern> -116 </sch:schema> -117 ''') -118 tree_valid = self.parse('''\ -119 <message> -120 <number_of_entries>0</number_of_entries> -121 <entries> -122 </entries> -123 </message> -124 ''') -125 tree_invalid = self.parse('''\ -126 <message> -127 <number_of_entries>3</number_of_entries> -128 <entries> -129 <entry>Entry 1</entry> -130 <entry>Entry 2</entry> -131 </entries> -132 </message> -133 ''') -134 schematron = isoschematron.Schematron(schema) -135 self.assertTrue(schematron(tree_valid), schematron.error_log) -136 valid = schematron(tree_invalid) -137 self.assertTrue(not valid) -
138 -
139 - def test_schematron_validate(self): -
140 schema = self.parse('''\ -141 <sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron"> -142 <sch:pattern id="number_of_entries"> -143 <sch:title>mandatory number_of_entries tests</sch:title> -144 <sch:rule context="number_of_entries"> -145 <sch:assert test="text()=count(../entries/entry)">[ERROR] number_of_entries (<sch:value-of select="."/>) must equal the number of entries/entry elements (<sch:value-of select="count(../entries/entry)"/>)</sch:assert> -146 </sch:rule> -147 </sch:pattern> -148 </sch:schema> -149 ''') -150 tree_valid = self.parse('''\ -151 <message> -152 <number_of_entries>0</number_of_entries> -153 <entries> -154 </entries> -155 </message> -156 ''') -157 tree_invalid = self.parse('''\ -158 <message> -159 <number_of_entries>3</number_of_entries> -160 <entries> -161 <entry>Entry 1</entry> -162 <entry>Entry 2</entry> -163 </entries> -164 </message> -165 ''') -166 schematron = isoschematron.Schematron(schema) -167 self.assertTrue(schematron.validate(tree_valid), schematron.error_log) -168 valid = schematron.validate(tree_invalid) -169 self.assertTrue(not valid) -
170 -
172 schema = self.parse('''\ -173 <sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron"> -174 <sch:pattern id="number_of_entries"> -175 <sch:title>mandatory number_of_entries tests</sch:title> -176 <sch:rule context="number_of_entries"> -177 <sch:assert test="text()=count(../entries/entry)">[ERROR] number_of_entries (<sch:value-of select="."/>) must equal the number of entries/entry elements (<sch:value-of select="count(../entries/entry)"/>)</sch:assert> -178 </sch:rule> -179 </sch:pattern> -180 </sch:schema> -181 ''') -182 tree_valid = self.parse('''\ -183 <message> -184 <number_of_entries>0</number_of_entries> -185 <entries> -186 </entries> -187 </message> -188 ''') -189 tree_invalid = self.parse('''\ -190 <message> -191 <number_of_entries>3</number_of_entries> -192 <entries> -193 <entry>Entry 1</entry> -194 <entry>Entry 2</entry> -195 </entries> -196 </message> -197 ''') -198 schematron = isoschematron.Schematron(schema) -199 self.assertTrue(schematron(tree_valid), schematron.error_log) -200 self.assertRaises(etree.DocumentInvalid, schematron.assertValid, -201 tree_invalid) -
202 -
203 - def test_schematron_error_log(self): -
204 schema = self.parse('''\ -205 <sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron"> -206 <sch:pattern id="number_of_entries"> -207 <sch:title>mandatory number_of_entries tests</sch:title> -208 <sch:rule context="number_of_entries"> -209 <sch:assert test="text()=count(../entries/entry)">[ERROR] number_of_entries (<sch:value-of select="."/>) must equal the number of entries/entry elements (<sch:value-of select="count(../entries/entry)"/>)</sch:assert> -210 </sch:rule> -211 </sch:pattern> -212 </sch:schema> -213 ''') -214 tree_valid = self.parse('''\ -215 <message> -216 <number_of_entries>0</number_of_entries> -217 <entries> -218 </entries> -219 </message> -220 ''') -221 tree_invalid = self.parse('''\ -222 <message> -223 <number_of_entries>3</number_of_entries> -224 <entries> -225 <entry>Entry 1</entry> -226 <entry>Entry 2</entry> -227 </entries> -228 </message> -229 ''') -230 schematron = isoschematron.Schematron(schema) -231 self.assertTrue(schematron(tree_valid), schematron.error_log) -232 valid = schematron(tree_invalid) -233 self.assertTrue(not valid) -234 self.assertEqual(len(schematron.error_log), 1, -235 'expected single error: %s (%s errors)' % -236 (schematron.error_log, len(schematron.error_log))) -
237 -
239 schema = self.parse('''\ -240 <sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron"> -241 <sch:pattern id="number_of_entries"> -242 <sch:title>mandatory number_of_entries tests</sch:title> -243 <sch:rule context="number_of_entries"> -244 <sch:assert test="text()=count(../entries/entry)">[ERROR] number_of_entries (<sch:value-of select="."/>) must equal the number of entries/entry elements (<sch:value-of select="count(../entries/entry)"/>)</sch:assert> -245 </sch:rule> -246 </sch:pattern> -247 </sch:schema> -248 ''') -249 tree_valid = self.parse('''\ -250 <message> -251 <number_of_entries>0</number_of_entries> -252 <entries> -253 </entries> -254 </message> -255 ''') -256 tree_invalid = self.parse('''\ -257 <message> -258 <number_of_entries>3</number_of_entries> -259 <entries> -260 <entry>Entry 1</entry> -261 <entry>Entry 2</entry> -262 </entries> -263 </message> -264 ''') -265 schematron = isoschematron.Schematron(schema, store_report=True) -266 self.assertTrue(schematron(tree_valid), schematron.error_log) -267 valid = schematron(tree_invalid) -268 self.assertTrue(not valid) -269 self.assertTrue( -270 isinstance(schematron.validation_report, etree._ElementTree), -271 'expected a validation report result tree, got: %s' % -272 (schematron.validation_report)) -273 -274 schematron = isoschematron.Schematron(schema, store_report=False) -275 self.assertTrue(schematron(tree_valid), schematron.error_log) -276 valid = schematron(tree_invalid) -277 self.assertTrue(not valid) -278 self.assertTrue(schematron.validation_report is None, -279 'validation reporting switched off, still: %s' % -280 (schematron.validation_report)) -
281 -
283 schema = self.parse('''\ -284 <sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron"> -285 <sch:pattern id="number_of_entries"> -286 <sch:title>mandatory number_of_entries tests</sch:title> -287 <sch:rule context="number_of_entries"> -288 <sch:assert test="text()=count(../entries/entry)">[ERROR] number_of_entries (<sch:value-of select="."/>) must equal the number of entries/entry elements (<sch:value-of select="count(../entries/entry)"/>)</sch:assert> -289 </sch:rule> -290 </sch:pattern> -291 </sch:schema> -292 ''') -293 schematron = isoschematron.Schematron(schema) -294 self.assertTrue(schematron.validator_xslt is None) -295 -296 schematron = isoschematron.Schematron(schema, store_schematron=True) -297 self.assertTrue(isinstance(schematron.schematron, etree._ElementTree), -298 'expected schematron schema to be stored') -
299 -
300 - def test_schematron_store_xslt(self): -
301 schema = self.parse('''\ -302 <sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron"> -303 <sch:pattern id="number_of_entries"> -304 <sch:title>mandatory number_of_entries tests</sch:title> -305 <sch:rule context="number_of_entries"> -306 <sch:assert test="text()=count(../entries/entry)">[ERROR] number_of_entries (<sch:value-of select="."/>) must equal the number of entries/entry elements (<sch:value-of select="count(../entries/entry)"/>)</sch:assert> -307 </sch:rule> -308 </sch:pattern> -309 </sch:schema> -310 ''') -311 schematron = isoschematron.Schematron(schema) -312 self.assertTrue(schematron.validator_xslt is None) -313 -314 schematron = isoschematron.Schematron(schema, store_xslt=True) -315 self.assertTrue(isinstance(schematron.validator_xslt, etree._ElementTree), -316 'expected validator xslt to be stored') -
317 -
318 - def test_schematron_abstract(self): -
319 schema = self.parse('''\ -320 <sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron"> -321 <sch:title>iso schematron validation</sch:title> -322 <sch:ns uri="http://www.w3.org/2001/XMLSchema-instance" prefix="xsi"/> -323 <sch:ns uri="http://codespeak.net/lxml/objectify/pytype" prefix="py"/> -324 -325 <!-- of course, these only really make sense when combined with a schema that -326 ensures datatype xs:dateTime --> -327 -328 <sch:pattern abstract="true" id="abstract.dateTime.tz_utc"> -329 <sch:rule context="$datetime"> -330 <sch:let name="tz" value="concat(substring-after(substring-after(./text(), 'T'), '+'), substring-after(substring-after(./text(), 'T'), '-'))"/> -331 <sch:let name="lastchar" value="substring(./text(), string-length(./text()))"/> -332 <sch:assert test="$lastchar='Z' or $tz='00:00'">[ERROR] element (<sch:value-of select="name(.)"/>) dateTime value (<sch:value-of select="."/>) is not qualified as UTC (tz: <sch:value-of select="$tz"/>)</sch:assert> -333 </sch:rule> -334 </sch:pattern> -335 -336 <sch:pattern abstract="true" id="abstract.dateTime.tz_utc_nillable"> -337 <sch:rule context="$datetime"> -338 <sch:let name="tz" value="concat(substring-after(substring-after(./text(), 'T'), '+'), substring-after(substring-after(./text(), 'T'), '-'))"/> -339 <sch:let name="lastchar" value="substring(./text(), string-length(./text()))"/> -340 <sch:assert test="@xsi:nil='true' or ($lastchar='Z' or $tz='00:00')">[ERROR] element (<sch:value-of select="name(.)"/>) dateTime value (<sch:value-of select="."/>) is not qualified as UTC (tz: <sch:value-of select="$tz"/>)</sch:assert> -341 </sch:rule> -342 </sch:pattern> -343 -344 <sch:pattern is-a="abstract.dateTime.tz_utc" id="datetime" > -345 <sch:param name="datetime" value="datetime"/> -346 </sch:pattern> -347 -348 <sch:pattern is-a="abstract.dateTime.tz_utc_nillable" id="nillableDatetime"> -349 <sch:param name="datetime" value="nillableDatetime"/> -350 </sch:pattern> -351 -352 </sch:schema> -353 ''') -354 valid_trees = [ -355 self.parse('''\ -356 <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> -357 <datetime>2009-12-10T15:21:00Z</datetime> -358 <nillableDatetime xsi:nil="true"/> -359 </root> -360 '''), -361 self.parse('''\ -362 <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> -363 <datetime>2009-12-10T15:21:00Z</datetime> -364 <nillableDatetime>2009-12-10T15:21:00Z</nillableDatetime> -365 </root> -366 '''), -367 self.parse('''\ -368 <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> -369 <datetime>2009-12-10T15:21:00+00:00</datetime> -370 <nillableDatetime>2009-12-10T15:21:00-00:00</nillableDatetime> -371 </root> -372 '''), -373 ] -374 -375 schematron = isoschematron.Schematron(schema) -376 for tree_valid in valid_trees: -377 self.assertTrue(schematron(tree_valid), schematron.error_log) -378 -379 tree_invalid = self.parse('''\ -380 <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> -381 <datetime>2009-12-10T16:21:00+01:00</datetime> -382 <nillableDatetime>2009-12-10T16:21:00+01:00</nillableDatetime> -383 </root> -384 ''') -385 expected = 2 -386 valid = schematron(tree_invalid) -387 self.assertTrue(not valid) -388 self.assertEqual( -389 len(schematron.error_log), expected, -390 'expected %s errors: %s (%s errors)' % -391 (expected, schematron.error_log, len(schematron.error_log))) -392 -393 tree_invalid = self.parse('''\ -394 <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> -395 <datetime xsi:nil="true"/> -396 <nillableDatetime>2009-12-10T16:21:00Z</nillableDatetime> -397 </root> -398 ''') -399 expected = 1 -400 valid = schematron(tree_invalid) -401 self.assertTrue(not valid) -402 self.assertEqual( -403 len(schematron.error_log), expected, -404 'expected %s errors: %s (%s errors)' % -405 (expected, schematron.error_log, len(schematron.error_log))) -
406 -
407 - def test_schematron_phases(self): -
408 schema = self.parse('''\ -409 <sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron"> -410 <sch:title>iso schematron validation</sch:title> -411 <sch:ns uri="http://www.w3.org/2001/XMLSchema-instance" prefix="xsi"/> -412 <sch:ns uri="http://codespeak.net/lxml/objectify/pytype" prefix="py"/> -413 -414 <sch:phase id="mandatory"> -415 <sch:active pattern="number_of_entries"/> -416 </sch:phase> -417 -418 <sch:phase id="datetime_checks"> -419 <sch:active pattern="datetime"/> -420 <sch:active pattern="nillableDatetime"/> -421 </sch:phase> -422 -423 <sch:phase id="full"> -424 <sch:active pattern="number_of_entries"/> -425 <sch:active pattern="datetime"/> -426 <sch:active pattern="nillableDatetime"/> -427 </sch:phase> -428 -429 <!-- of course, these only really make sense when combined with a schema that -430 ensures datatype xs:dateTime --> -431 -432 <sch:pattern abstract="true" id="abstract.dateTime.tz_utc"> -433 <sch:rule context="$datetime"> -434 <sch:let name="tz" value="concat(substring-after(substring-after(./text(), 'T'), '+'), substring-after(substring-after(./text(), 'T'), '-'))"/> -435 <sch:let name="lastchar" value="substring(./text(), string-length(./text()))"/> -436 <sch:assert test="$lastchar='Z' or $tz='00:00'">[ERROR] element (<sch:value-of select="name(.)"/>) dateTime value (<sch:value-of select="."/>) is not qualified as UTC (tz: <sch:value-of select="$tz"/>)</sch:assert> -437 </sch:rule> -438 </sch:pattern> -439 -440 <sch:pattern abstract="true" id="abstract.dateTime.tz_utc_nillable"> -441 <sch:rule context="$datetime"> -442 <sch:let name="tz" value="concat(substring-after(substring-after(./text(), 'T'), '+'), substring-after(substring-after(./text(), 'T'), '-'))"/> -443 <sch:let name="lastchar" value="substring(./text(), string-length(./text()))"/> -444 <sch:assert test="@xsi:nil='true' or ($lastchar='Z' or $tz='00:00')">[ERROR] element (<sch:value-of select="name(.)"/>) dateTime value (<sch:value-of select="."/>) is not qualified as UTC (tz: <sch:value-of select="$tz"/>)</sch:assert> -445 </sch:rule> -446 </sch:pattern> -447 -448 <sch:pattern id="number_of_entries"> -449 <sch:title>mandatory number_of_entries test</sch:title> -450 <sch:rule context="number_of_entries"> -451 <sch:assert test="text()=count(../entries/entry)">[ERROR] number_of_entries (<sch:value-of select="."/>) must equal the number of entries/entry elements (<sch:value-of select="count(../entries/entry)"/>)</sch:assert> -452 </sch:rule> -453 </sch:pattern> -454 -455 <sch:pattern id="datetime" is-a="abstract.dateTime.tz_utc"> -456 <sch:param name="datetime" value="datetime"/> -457 </sch:pattern> -458 -459 <sch:pattern id="nillableDatetime" is-a="abstract.dateTime.tz_utc_nillable"> -460 <sch:param name="datetime" value="nillableDatetime"/> -461 </sch:pattern> -462 -463 </sch:schema> -464 ''') -465 tree_valid = self.parse('''\ -466 <message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> -467 <datetime>2009-12-10T15:21:00Z</datetime> -468 <nillableDatetime xsi:nil="true"/> -469 <number_of_entries>0</number_of_entries> -470 <entries> -471 </entries> -472 </message> -473 ''') -474 tree_invalid = self.parse('''\ -475 <message> -476 <datetime>2009-12-10T16:21:00+01:00</datetime> -477 <nillableDatetime>2009-12-10T16:21:00+01:00</nillableDatetime> -478 <number_of_entries>3</number_of_entries> -479 <entries> -480 <entry>Entry 1</entry> -481 <entry>Entry 2</entry> -482 </entries> -483 </message> -484 ''') -485 # check everything (default phase #ALL) -486 schematron = isoschematron.Schematron(schema) -487 self.assertTrue(schematron(tree_valid), schematron.error_log) -488 expected = 3 -489 valid = schematron(tree_invalid) -490 self.assertTrue(not valid) -491 self.assertEqual( -492 len(schematron.error_log), expected, -493 'expected %s errors: %s (%s errors)' % -494 (expected, schematron.error_log, len(schematron.error_log))) -495 -496 # check phase mandatory -497 schematron = isoschematron.Schematron( -498 schema, compile_params={'phase': 'mandatory'}) -499 self.assertTrue(schematron(tree_valid), schematron.error_log) -500 expected = 1 -501 valid = schematron(tree_invalid) -502 self.assertTrue(not valid) -503 self.assertEqual( -504 len(schematron.error_log), expected, -505 'expected %s errors: %s (%s errors)' % -506 (expected, schematron.error_log, len(schematron.error_log))) -507 -508 # check phase datetime_checks -509 schematron = isoschematron.Schematron( -510 schema, compile_params={'phase': 'datetime_checks'}) -511 self.assertTrue(schematron(tree_valid), schematron.error_log) -512 expected = 2 -513 valid = schematron(tree_invalid) -514 self.assertTrue(not valid) -515 self.assertEqual( -516 len(schematron.error_log), expected, -517 'expected %s errors: %s (%s errors)' % -518 (expected, schematron.error_log, len(schematron.error_log))) -519 -520 # check phase full -521 schematron = isoschematron.Schematron( -522 schema, compile_params={'phase': 'full'}) -523 self.assertTrue(schematron(tree_valid), schematron.error_log) -524 expected = 3 -525 valid = schematron(tree_invalid) -526 self.assertTrue(not valid) -527 self.assertEqual( -528 len(schematron.error_log), expected, -529 'expected %s errors: %s (%s errors)' % -530 (expected, schematron.error_log, len(schematron.error_log))) -
531 -
533 schema = self.parse('''\ -534 <sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron"> -535 <sch:title>iso schematron validation</sch:title> -536 <sch:ns uri="http://www.w3.org/2001/XMLSchema-instance" prefix="xsi"/> -537 <sch:ns uri="http://codespeak.net/lxml/objectify/pytype" prefix="py"/> -538 -539 <sch:phase id="mandatory"> -540 <sch:active pattern="number_of_entries"/> -541 </sch:phase> -542 -543 <sch:phase id="datetime_checks"> -544 <sch:active pattern="datetime"/> -545 <sch:active pattern="nillableDatetime"/> -546 </sch:phase> -547 -548 <sch:phase id="full"> -549 <sch:active pattern="number_of_entries"/> -550 <sch:active pattern="datetime"/> -551 <sch:active pattern="nillableDatetime"/> -552 </sch:phase> -553 -554 <!-- of course, these only really make sense when combined with a schema that -555 ensures datatype xs:dateTime --> -556 -557 <sch:pattern abstract="true" id="abstract.dateTime.tz_utc"> -558 <sch:rule context="$datetime"> -559 <sch:let name="tz" value="concat(substring-after(substring-after(./text(), 'T'), '+'), substring-after(substring-after(./text(), 'T'), '-'))"/> -560 <sch:let name="lastchar" value="substring(./text(), string-length(./text()))"/> -561 <sch:assert test="$lastchar='Z' or $tz='00:00'">[ERROR] element (<sch:value-of select="name(.)"/>) dateTime value (<sch:value-of select="."/>) is not qualified as UTC (tz: <sch:value-of select="$tz"/>)</sch:assert> -562 </sch:rule> -563 </sch:pattern> -564 -565 <sch:pattern abstract="true" id="abstract.dateTime.tz_utc_nillable"> -566 <sch:rule context="$datetime"> -567 <sch:let name="tz" value="concat(substring-after(substring-after(./text(), 'T'), '+'), substring-after(substring-after(./text(), 'T'), '-'))"/> -568 <sch:let name="lastchar" value="substring(./text(), string-length(./text()))"/> -569 <sch:assert test="@xsi:nil='true' or ($lastchar='Z' or $tz='00:00')">[ERROR] element (<sch:value-of select="name(.)"/>) dateTime value (<sch:value-of select="."/>) is not qualified as UTC (tz: <sch:value-of select="$tz"/>)</sch:assert> -570 </sch:rule> -571 </sch:pattern> -572 -573 <sch:pattern id="number_of_entries"> -574 <sch:title>mandatory number_of_entries test</sch:title> -575 <sch:rule context="number_of_entries"> -576 <sch:assert test="text()=count(../entries/entry)">[ERROR] number_of_entries (<sch:value-of select="."/>) must equal the number of entries/entry elements (<sch:value-of select="count(../entries/entry)"/>)</sch:assert> -577 </sch:rule> -578 </sch:pattern> -579 -580 <sch:pattern id="datetime" is-a="abstract.dateTime.tz_utc"> -581 <sch:param name="datetime" value="datetime"/> -582 </sch:pattern> -583 -584 <sch:pattern id="nillableDatetime" is-a="abstract.dateTime.tz_utc_nillable"> -585 <sch:param name="datetime" value="nillableDatetime"/> -586 </sch:pattern> -587 -588 </sch:schema> -589 ''') -590 tree_valid = self.parse('''\ -591 <message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> -592 <datetime>2009-12-10T15:21:00Z</datetime> -593 <nillableDatetime xsi:nil="true"/> -594 <number_of_entries>0</number_of_entries> -595 <entries> -596 </entries> -597 </message> -598 ''') -599 tree_invalid = self.parse('''\ -600 <message> -601 <datetime>2009-12-10T16:21:00+01:00</datetime> -602 <nillableDatetime>2009-12-10T16:21:00+01:00</nillableDatetime> -603 <number_of_entries>3</number_of_entries> -604 <entries> -605 <entry>Entry 1</entry> -606 <entry>Entry 2</entry> -607 </entries> -608 </message> -609 ''') -610 # check everything (default phase #ALL) -611 schematron = isoschematron.Schematron(schema) -612 self.assertTrue(schematron(tree_valid), schematron.error_log) -613 expected = 3 -614 valid = schematron(tree_invalid) -615 self.assertTrue(not valid) -616 self.assertEqual( -617 len(schematron.error_log), expected, -618 'expected %s errors: %s (%s errors)' % -619 (expected, schematron.error_log, len(schematron.error_log))) -620 -621 # check phase mandatory -622 schematron = isoschematron.Schematron(schema, phase='mandatory') -623 self.assertTrue(schematron(tree_valid), schematron.error_log) -624 expected = 1 -625 valid = schematron(tree_invalid) -626 self.assertTrue(not valid) -627 self.assertEqual( -628 len(schematron.error_log), expected, -629 'expected %s errors: %s (%s errors)' % -630 (expected, schematron.error_log, len(schematron.error_log))) -631 -632 # check phase datetime_checks -633 schematron = isoschematron.Schematron(schema, phase='datetime_checks') -634 self.assertTrue(schematron(tree_valid), schematron.error_log) -635 expected = 2 -636 valid = schematron(tree_invalid) -637 self.assertTrue(not valid) -638 self.assertEqual( -639 len(schematron.error_log), expected, -640 'expected %s errors: %s (%s errors)' % -641 (expected, schematron.error_log, len(schematron.error_log))) -642 -643 # check phase full -644 schematron = isoschematron.Schematron(schema, phase='full') -645 self.assertTrue(schematron(tree_valid), schematron.error_log) -646 expected = 3 -647 valid = schematron(tree_invalid) -648 self.assertTrue(not valid) -649 self.assertEqual( -650 len(schematron.error_log), expected, 'expected %s errors: %s (%s errors)' % -651 (expected, schematron.error_log, len(schematron.error_log))) -
652 -
654 schema = self.parse('''\ -655 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" -656 xmlns:sch="http://purl.oclc.org/dsdl/schematron"> -657 <xs:element name="message"> -658 <xs:complexType> -659 <xs:sequence> -660 <xs:element name="number_of_entries" type="xs:positiveInteger"> -661 <xs:annotation> -662 <xs:appinfo> -663 <sch:pattern id="number_of_entries"> -664 <sch:title>mandatory number_of_entries tests</sch:title> -665 <sch:rule context="number_of_entries"> -666 <sch:assert test="text()=count(../entries/entry)">[ERROR] number_of_entries (<sch:value-of select="."/>) must equal the number of entries/entry elements (<sch:value-of select="count(../entries/entry)"/>)</sch:assert> -667 </sch:rule> -668 </sch:pattern> -669 </xs:appinfo> -670 </xs:annotation> -671 </xs:element> -672 <xs:element name="entries"> -673 <xs:complexType> -674 <xs:sequence> -675 <xs:element name="entry" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> -676 </xs:sequence> -677 </xs:complexType> -678 </xs:element> -679 </xs:sequence> -680 </xs:complexType> -681 </xs:element> -682 </xs:schema> -683 ''') -684 tree_valid = self.parse('''\ -685 <message> -686 <number_of_entries>2</number_of_entries> -687 <entries> -688 <entry>Entry 1</entry> -689 <entry>Entry 2</entry> -690 </entries> -691 </message> -692 ''') -693 tree_invalid = self.parse('''\ -694 <message> -695 <number_of_entries>1</number_of_entries> -696 <entries> -697 <entry>Entry 1</entry> -698 <entry>Entry 2</entry> -699 </entries> -700 </message> -701 ''') -702 xmlschema = etree.XMLSchema(schema) -703 schematron = isoschematron.Schematron(schema) -704 # fwiw, this must also be XMLSchema-valid -705 self.assertTrue(xmlschema(tree_valid), xmlschema.error_log) -706 self.assertTrue(schematron(tree_valid)) -707 # still schema-valid -708 self.assertTrue(xmlschema(tree_invalid), xmlschema.error_log) -709 self.assertTrue(not schematron(tree_invalid)) -
710 -
712 schema = self.parse('''\ -713 <grammar xmlns="http://relaxng.org/ns/structure/1.0" -714 xmlns:sch="http://purl.oclc.org/dsdl/schematron" -715 datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"> -716 <start> -717 <ref name="message"/> -718 </start> -719 <define name="message"> -720 <element name="message"> -721 <element name="number_of_entries"> -722 <!-- RelaxNG can be mixed freely with stuff from other namespaces --> -723 <sch:pattern id="number_of_entries"> -724 <sch:title>mandatory number_of_entries tests</sch:title> -725 <sch:rule context="number_of_entries"> -726 <sch:assert test="text()=count(../entries/entry)">[ERROR] number_of_entries (<sch:value-of select="."/>) must equal the number of entries/entry elements (<sch:value-of select="count(../entries/entry)"/>)</sch:assert> -727 </sch:rule> -728 </sch:pattern> -729 <data type="positiveInteger"/> -730 </element> -731 <element name="entries"> -732 <zeroOrMore> -733 <element name="entry"><data type="string"/></element> -734 </zeroOrMore> -735 </element> -736 </element> -737 </define> -738 </grammar> -739 ''') -740 tree_valid = self.parse('''\ -741 <message> -742 <number_of_entries>2</number_of_entries> -743 <entries> -744 <entry>Entry 1</entry> -745 <entry>Entry 2</entry> -746 </entries> -747 </message> -748 ''') -749 tree_invalid = self.parse('''\ -750 <message> -751 <number_of_entries>1</number_of_entries> -752 <entries> -753 <entry>Entry 1</entry> -754 <entry>Entry 2</entry> -755 </entries> -756 </message> -757 ''') -758 relaxng = etree.RelaxNG(schema) -759 schematron = isoschematron.Schematron(schema) -760 # fwiw, this must also be RelaxNG-valid -761 self.assertTrue(relaxng(tree_valid), relaxng.error_log) -762 self.assertTrue(schematron(tree_valid)) -763 # still schema-valid -764 self.assertTrue(relaxng(tree_invalid), relaxng.error_log) -765 self.assertTrue(not schematron(tree_invalid)) -
766 -
768 schema = self.parse('''\ -769 <sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron"> -770 <sch:pattern id="number_of_entries"> -771 <sch:title>mandatory number_of_entries tests</sch:title> -772 <sch:rule context="number_of_entries"> -773 <sch:assert test="text()=count(../entries/entry)">[ERROR] number_of_entries (<sch:value-of select="."/>) must equal the number of entries/entry elements (<sch:value-of select="count(../entries/entry)"/>)</sch:assert> -774 </sch:rule> -775 </sch:pattern> -776 </sch:schema> -777 ''') -778 # handing phase as keyword arg will *not* raise the type error -779 self.assertRaises(TypeError, isoschematron.Schematron, schema, -780 compile_params={'phase': None}) -
781 -
783 class MySchematron(isoschematron.Schematron): -784 def _extract(self, root): -785 schematron = (root.xpath( -786 '//sch:schema', -787 namespaces={'sch': "http://purl.oclc.org/dsdl/schematron"}) -788 or [None])[0] -789 return schematron -
790 -791 def _include(self, schematron, **kwargs): -792 raise RuntimeError('inclusion unsupported') -
793 -794 def _expand(self, schematron, **kwargs): -795 raise RuntimeError('expansion unsupported') -796 -797 def _validation_errors(self, validationReport): -798 valid = etree.XPath( -799 'count(//svrl:successful-report[@flag="critical"])=1', -800 namespaces={'svrl': isoschematron.SVRL_NS})( -801 validationReport) -802 if valid: -803 return [] -804 error = etree.Element('Error') -805 error.text = 'missing critical condition report' -806 return [error] -807 -808 tree_valid = self.parse('<AAA><BBB/><CCC/></AAA>') -809 tree_invalid = self.parse('<AAA><BBB/><CCC/><DDD/></AAA>') -810 schema = self.parse('''\ -811 <schema xmlns="http://www.example.org/yet/another/schema/dialect"> -812 <schema xmlns="http://purl.oclc.org/dsdl/schematron" > -813 <pattern id="OpenModel"> -814 <title>Open Model</title> -815 <rule context="AAA"> -816 <report test="BBB" flag="info">BBB element must be present</report> -817 <report test="CCC" flag="info">CCC element must be present</report> -818 </rule> -819 </pattern> -820 <pattern id="ClosedModel"> -821 <title>Closed model"</title> -822 <rule context="AAA"> -823 <report test="BBB" flag="info">BBB element must be present</report> -824 <report test="CCC" flag="info">CCC element must be present</report> -825 <report test="count(BBB|CCC) = count(*)" flag="critical">Only BBB and CCC children must be present</report> -826 </rule> -827 </pattern> -828 </schema> -829 </schema> -830 ''') -831 # check if overridden _include is run -832 self.assertRaises(RuntimeError, MySchematron, schema, store_report=True) -833 # check if overridden _expand is run -834 self.assertRaises(RuntimeError, MySchematron, schema, store_report=True, -835 include=False) -836 -837 schema = MySchematron(schema, store_report=True, include=False, -838 expand=False) -839 self.assertTrue(schema.validate(tree_valid)) -840 self.assertTrue(not schema.validate(tree_invalid)) -841 -842 #TODO: test xslt parameters for inclusion, expand & compile steps (?) -843 -
845 tree_valid = self.parse('<AAA><BBB/><CCC/></AAA>') -846 tree_invalid = self.parse('<AAA><BBB/><CCC/><DDD/></AAA>') -847 schema = self.parse('''\ -848 <schema xmlns="http://purl.oclc.org/dsdl/schematron" > -849 <pattern id="OpenModel"> -850 <title>Simple Report</title> -851 <rule context="AAA"> -852 <report test="DDD"> DDD element must not be present</report> -853 </rule> -854 </pattern> -855 </schema> -856 ''') -857 schema_report = isoschematron.Schematron( -858 schema, error_finder=isoschematron.Schematron.ASSERTS_AND_REPORTS) -859 schema_no_report = isoschematron.Schematron(schema) -860 self.assertTrue(schema_report.validate(tree_valid)) -861 self.assertTrue(not schema_report.validate(tree_invalid)) -862 self.assertTrue(schema_no_report.validate(tree_valid)) -863 self.assertTrue(schema_no_report.validate(tree_invalid)) -
864 -865 -
866 -def test_suite(): -
867 suite = unittest.TestSuite() -868 suite.addTests([unittest.makeSuite(ETreeISOSchematronTestCase)]) -869 suite.addTests(doctest.DocTestSuite(isoschematron)) -870 suite.addTests( -871 [make_doctest('../../../doc/validation.txt')]) -872 return suite -
873 -874 if __name__ == '__main__': -875 print('to test use test.py %s' % __file__) -876 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html b/doc/html/api/lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html deleted file mode 100644 index 2211ff0..0000000 --- a/doc/html/api/lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html +++ /dev/null @@ -1,713 +0,0 @@ - - - - - lxml.tests.test_isoschematron.ETreeISOSchematronTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_isoschematron :: - Class ETreeISOSchematronTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ETreeISOSchematronTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ETreeISOSchematronTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_schematron(self) - source code - -
- -
-   - - - - - - -
test_schematron_elementtree_error(self) - source code - -
- -
-   - - - - - - -
test_schematron_empty_pattern(self) - source code - -
- -
-   - - - - - - -
test_schematron_invalid_schema_empty(self) - source code - -
- -
-   - - - - - - -
test_schematron_invalid_schema_namespace(self) - source code - -
- -
-   - - - - - - -
test_schematron_from_tree(self) - source code - -
- -
-   - - - - - - -
test_schematron_from_element(self) - source code - -
- -
-   - - - - - - -
test_schematron_from_file(self) - source code - -
- -
-   - - - - - - -
test_schematron_call(self) - source code - -
- -
-   - - - - - - -
test_schematron_validate(self) - source code - -
- -
-   - - - - - - -
test_schematron_assertValid(self) - source code - -
- -
-   - - - - - - -
test_schematron_error_log(self) - source code - -
- -
-   - - - - - - -
test_schematron_result_report(self) - source code - -
- -
-   - - - - - - -
test_schematron_store_schematron(self) - source code - -
- -
-   - - - - - - -
test_schematron_store_xslt(self) - source code - -
- -
-   - - - - - - -
test_schematron_abstract(self) - source code - -
- -
-   - - - - - - -
test_schematron_phases(self) - source code - -
- -
-   - - - - - - -
test_schematron_phases_kwarg(self) - source code - -
- -
-   - - - - - - -
test_schematron_xmlschema_embedded(self) - source code - -
- -
-   - - - - - - -
test_schematron_relaxng_embedded(self) - source code - -
- -
-   - - - - - - -
test_schematron_invalid_args(self) - source code - -
- -
-   - - - - - - -
test_schematron_customization(self) - source code - -
- -
-   - - - - - - -
test_schematron_fail_on_report(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_nsclasses-module.html b/doc/html/api/lxml.tests.test_nsclasses-module.html deleted file mode 100644 index a06ce41..0000000 --- a/doc/html/api/lxml.tests.test_nsclasses-module.html +++ /dev/null @@ -1,247 +0,0 @@ - - - - - lxml.tests.test_nsclasses - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_nsclasses - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module test_nsclasses

source code

-Test cases related to namespace implementation classes and the -namespace registry mechanism - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - ETreeNamespaceClassesTestCase -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
test_suite() - source code - -
- -
- - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - this_dir = '/home/stefan/source/Python/lxml/lxml-release/src/l... -
-   - - __package__ = 'lxml.tests' -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

this_dir

- -
-
-
-
Value:
-
-'/home/stefan/source/Python/lxml/lxml-release/src/lxml/tests'
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_nsclasses-pysrc.html b/doc/html/api/lxml.tests.test_nsclasses-pysrc.html deleted file mode 100644 index 674ca66..0000000 --- a/doc/html/api/lxml.tests.test_nsclasses-pysrc.html +++ /dev/null @@ -1,636 +0,0 @@ - - - - - lxml.tests.test_nsclasses - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_nsclasses - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.test_nsclasses

-
-  1  # -*- coding: utf-8 -*- 
-  2   
-  3  """ 
-  4  Test cases related to namespace implementation classes and the 
-  5  namespace registry mechanism 
-  6  """ 
-  7   
-  8  import unittest, sys, os.path 
-  9   
- 10  this_dir = os.path.dirname(__file__) 
- 11  if this_dir not in sys.path: 
- 12      sys.path.insert(0, this_dir) # needed for Py3 
- 13   
- 14  from common_imports import etree, HelperTestCase, _bytes 
- 15  from common_imports import doctest, make_doctest 
- 16   
-
17 -class ETreeNamespaceClassesTestCase(HelperTestCase): -
18 -
19 - class default_class(etree.ElementBase): -
20 pass -
21 - class maeh_class(etree.ElementBase): -
22 - def maeh(self): -
23 return 'maeh' -
24 - class bluff_class(etree.ElementBase): -
25 - def bluff(self): -
26 return 'bluff' -
27 -
28 - def setUp(self): -
35 -
36 - def tearDown(self): -
37 etree.set_default_parser() - 38 del self.Namespace - 39 super(ETreeNamespaceClassesTestCase, self).tearDown() -
40 -
41 - def test_registry(self): -
42 ns = self.Namespace('ns01') - 43 ns['maeh'] = self.maeh_class - 44 - 45 self.Namespace('ns01').clear() - 46 - 47 self.Namespace('ns02').update({'maeh' : self.maeh_class}) - 48 self.Namespace('ns03').update({'bluff' : self.bluff_class}.items()) - 49 self.Namespace('ns02').clear() - 50 self.Namespace('ns03').clear() -
51 -
52 - def test_ns_classes(self): -
53 bluff_dict = {'bluff' : self.bluff_class} - 54 maeh_dict = {'maeh' : self.maeh_class} - 55 - 56 self.Namespace('ns10').update(bluff_dict) - 57 - 58 tree = self.parse(_bytes('<bluff xmlns="ns10"><ns11:maeh xmlns:ns11="ns11"/></bluff>')) - 59 - 60 el = tree.getroot() - 61 self.assertTrue(isinstance(el, etree.ElementBase)) - 62 self.assertTrue(hasattr(el, 'bluff')) - 63 self.assertFalse(hasattr(el[0], 'maeh')) - 64 self.assertFalse(hasattr(el[0], 'bluff')) - 65 self.assertEqual(el.bluff(), 'bluff') - 66 del el - 67 - 68 self.Namespace('ns11').update(maeh_dict) - 69 el = tree.getroot() - 70 self.assertTrue(hasattr(el, 'bluff')) - 71 self.assertTrue(hasattr(el[0], 'maeh')) - 72 self.assertEqual(el.bluff(), 'bluff') - 73 self.assertEqual(el[0].maeh(), 'maeh') - 74 del el - 75 - 76 self.Namespace('ns10').clear() - 77 - 78 tree = self.parse(_bytes('<bluff xmlns="ns10"><ns11:maeh xmlns:ns11="ns11"/></bluff>')) - 79 el = tree.getroot() - 80 self.assertFalse(hasattr(el, 'bluff')) - 81 self.assertFalse(hasattr(el, 'maeh')) - 82 self.assertFalse(hasattr(el[0], 'bluff')) - 83 self.assertTrue(hasattr(el[0], 'maeh')) - 84 - 85 self.Namespace('ns11').clear() -
86 -
87 - def test_default_tagname(self): -
88 bluff_dict = { - 89 None : self.bluff_class, - 90 'maeh' : self.maeh_class - 91 } - 92 - 93 ns = self.Namespace("uri:nsDefClass") - 94 ns.update(bluff_dict) - 95 - 96 tree = self.parse(_bytes(''' - 97 <test xmlns="bla" xmlns:ns1="uri:nsDefClass" xmlns:ns2="uri:nsDefClass"> - 98 <ns2:el1/><ns1:el2/><ns1:maeh/><ns2:maeh/><maeh/> - 99 </test> -100 ''')) -101 -102 el = tree.getroot() -103 self.assertFalse(isinstance(el, etree.ElementBase)) -104 for child in el[:-1]: -105 self.assertTrue(isinstance(child, etree.ElementBase), child.tag) -106 self.assertFalse(isinstance(el[-1], etree.ElementBase)) -107 -108 self.assertTrue(hasattr(el[0], 'bluff')) -109 self.assertTrue(hasattr(el[1], 'bluff')) -110 self.assertTrue(hasattr(el[2], 'maeh')) -111 self.assertTrue(hasattr(el[3], 'maeh')) -112 self.assertFalse(hasattr(el[4], 'maeh')) -113 del el -114 -115 ns.clear() -
116 -
117 - def test_create_element(self): -
118 bluff_dict = {'bluff' : self.bluff_class} -119 self.Namespace('ns20').update(bluff_dict) -120 -121 maeh_dict = {'maeh' : self.maeh_class} -122 self.Namespace('ns21').update(maeh_dict) -123 -124 el = etree.Element("{ns20}bluff") -125 self.assertTrue(hasattr(el, 'bluff')) -126 -127 child = etree.SubElement(el, "{ns21}maeh") -128 self.assertTrue(hasattr(child, 'maeh')) -129 child = etree.SubElement(el, "{ns20}bluff") -130 self.assertTrue(hasattr(child, 'bluff')) -131 child = etree.SubElement(el, "{ns21}bluff") -132 self.assertFalse(hasattr(child, 'bluff')) -133 self.assertFalse(hasattr(child, 'maeh')) -134 -135 self.assertTrue(hasattr(el[0], 'maeh')) -136 self.assertTrue(hasattr(el[1], 'bluff')) -137 self.assertFalse(hasattr(el[2], 'bluff')) -138 self.assertFalse(hasattr(el[2], 'maeh')) -139 -140 self.assertEqual(el.bluff(), 'bluff') -141 self.assertEqual(el[0].maeh(), 'maeh') -142 self.assertEqual(el[1].bluff(), 'bluff') -143 -144 self.Namespace('ns20').clear() -145 self.Namespace('ns21').clear() -
146 -
148 bluff_dict = {None : self.bluff_class} -149 self.Namespace('ns30').update(bluff_dict) -150 -151 maeh_dict = {'maeh' : self.maeh_class} -152 self.Namespace(None).update(maeh_dict) -153 -154 el = etree.Element("{ns30}bluff") -155 etree.SubElement(el, "maeh") -156 self.assertTrue(hasattr(el, 'bluff')) -157 self.assertTrue(hasattr(el[0], 'maeh')) -158 self.assertEqual(el.bluff(), 'bluff') -159 self.assertEqual(el[0].maeh(), 'maeh') -160 -161 self.Namespace(None).clear() -162 self.Namespace('ns30').clear() -
163 -
164 - def test_element_creation(self): -
165 default, bluff, maeh = ( -166 self.default_class, self.bluff_class, self.maeh_class) -167 -168 class honk(etree.ElementBase): -169 TAG = 'HONK' -170 NAMESPACE = 'http://a.b/c' -
171 -172 el = default( -173 "test", -174 "text", -175 bluff(honk, "TaIL", maeh), -176 maeh("TeXT", bluff, honk(), "TAiL"), -177 "Tail") -178 -179 self.assertEqual('default_class', el.tag) -180 self.assertEqual('testtext', el.text) -181 self.assertEqual(None, el.tail) -182 self.assertEqual(2, len(el)) -183 self.assertEqual(7, len(list(el.iter()))) -184 -185 self.assertEqual('bluff_class', el[0].tag) -186 self.assertEqual('TaIL', el[0][0].tail) -187 self.assertEqual('TaIL', ''.join(el[0].itertext())) -188 self.assertEqual('{http://a.b/c}HONK', -189 el[0][0].tag) -190 self.assertEqual('maeh_class', -191 el[0][1].tag) -192 -193 self.assertEqual('maeh_class', el[1].tag) -194 self.assertEqual('TeXT', el[1].text) -195 self.assertEqual('bluff_class', el[1][0].tag) -196 self.assertEqual('{http://a.b/c}HONK', el[1][1].tag) -197 self.assertEqual('TAiL', el[1][1].tail) -198 -199 self.assertEqual('TeXTTAiL', -200 ''.join(el[1].itertext())) -201 self.assertEqual('Tail', el[1].tail) -202 self.assertEqual('TAiL', el[1][1].tail) -203 self.assertEqual('bluff_class', el[1][0].tag) -204 self.assertEqual('{http://a.b/c}HONK', el[1][1].tag) -
205 -206 -
207 -def test_suite(): -
208 suite = unittest.TestSuite() -209 suite.addTests([unittest.makeSuite(ETreeNamespaceClassesTestCase)]) -210 suite.addTests( -211 [make_doctest('../../../doc/element_classes.txt')]) -212 return suite -
213 -214 if __name__ == '__main__': -215 print('to test use test.py %s' % __file__) -216 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase-class.html b/doc/html/api/lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase-class.html deleted file mode 100644 index 90ab019..0000000 --- a/doc/html/api/lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase-class.html +++ /dev/null @@ -1,559 +0,0 @@ - - - - - lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_nsclasses :: - Class ETreeNamespaceClassesTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ETreeNamespaceClassesTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ETreeNamespaceClassesTestCase
-
- -
- - - - - - - - - - - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-   - - default_class -
-   - - maeh_class -
-   - - bluff_class -
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_registry(self) - source code - -
- -
-   - - - - - - -
test_ns_classes(self) - source code - -
- -
-   - - - - - - -
test_default_tagname(self) - source code - -
- -
-   - - - - - - -
test_create_element(self) - source code - -
- -
-   - - - - - - -
test_create_element_default(self) - source code - -
- -
-   - - - - - - -
test_element_creation(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- - Hook method for setting up the test fixture before exercising it. -
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- - Hook method for deconstructing the test fixture after testing it. -
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.bluff_class-class.html b/doc/html/api/lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.bluff_class-class.html deleted file mode 100644 index 05d9a9b..0000000 --- a/doc/html/api/lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.bluff_class-class.html +++ /dev/null @@ -1,267 +0,0 @@ - - - - - lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.bluff_class - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_nsclasses :: - Class ETreeNamespaceClassesTestCase :: - Class bluff_class - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class bluff_class

source code

-
-    object --+        
-             |        
-etree._Element --+    
-                 |    
- etree.ElementBase --+
-                     |
-                    ETreeNamespaceClassesTestCase.bluff_class
-
- -
- - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
bluff(self) - source code - -
- -
-

Inherited from etree.ElementBase: - __init__, - __new__ -

-

Inherited from etree._Element: - __contains__, - __copy__, - __deepcopy__, - __delitem__, - __getitem__, - __iter__, - __len__, - __nonzero__, - __repr__, - __reversed__, - __setitem__, - addnext, - addprevious, - append, - clear, - cssselect, - extend, - find, - findall, - findtext, - get, - getchildren, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - insert, - items, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - keys, - makeelement, - remove, - replace, - set, - values, - xpath -

-

Inherited from etree._Element (private): - _init -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from etree._Element: - attrib, - base, - nsmap, - prefix, - sourceline, - tag, - tail, - text -

-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.default_class-class.html b/doc/html/api/lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.default_class-class.html deleted file mode 100644 index a5bd0ff..0000000 --- a/doc/html/api/lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.default_class-class.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.default_class - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_nsclasses :: - Class ETreeNamespaceClassesTestCase :: - Class default_class - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class default_class

source code

-
-    object --+        
-             |        
-etree._Element --+    
-                 |    
- etree.ElementBase --+
-                     |
-                    ETreeNamespaceClassesTestCase.default_class
-
- -
- - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from etree.ElementBase: - __init__, - __new__ -

-

Inherited from etree._Element: - __contains__, - __copy__, - __deepcopy__, - __delitem__, - __getitem__, - __iter__, - __len__, - __nonzero__, - __repr__, - __reversed__, - __setitem__, - addnext, - addprevious, - append, - clear, - cssselect, - extend, - find, - findall, - findtext, - get, - getchildren, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - insert, - items, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - keys, - makeelement, - remove, - replace, - set, - values, - xpath -

-

Inherited from etree._Element (private): - _init -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from etree._Element: - attrib, - base, - nsmap, - prefix, - sourceline, - tag, - tail, - text -

-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.maeh_class-class.html b/doc/html/api/lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.maeh_class-class.html deleted file mode 100644 index 536dff1..0000000 --- a/doc/html/api/lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.maeh_class-class.html +++ /dev/null @@ -1,267 +0,0 @@ - - - - - lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.maeh_class - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_nsclasses :: - Class ETreeNamespaceClassesTestCase :: - Class maeh_class - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class maeh_class

source code

-
-    object --+        
-             |        
-etree._Element --+    
-                 |    
- etree.ElementBase --+
-                     |
-                    ETreeNamespaceClassesTestCase.maeh_class
-
- -
- - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
maeh(self) - source code - -
- -
-

Inherited from etree.ElementBase: - __init__, - __new__ -

-

Inherited from etree._Element: - __contains__, - __copy__, - __deepcopy__, - __delitem__, - __getitem__, - __iter__, - __len__, - __nonzero__, - __repr__, - __reversed__, - __setitem__, - addnext, - addprevious, - append, - clear, - cssselect, - extend, - find, - findall, - findtext, - get, - getchildren, - getiterator, - getnext, - getparent, - getprevious, - getroottree, - index, - insert, - items, - iter, - iterancestors, - iterchildren, - iterdescendants, - iterfind, - itersiblings, - itertext, - keys, - makeelement, - remove, - replace, - set, - values, - xpath -

-

Inherited from etree._Element (private): - _init -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from etree._Element: - attrib, - base, - nsmap, - prefix, - sourceline, - tag, - tail, - text -

-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_objectify-module.html b/doc/html/api/lxml.tests.test_objectify-module.html deleted file mode 100644 index 2f3046c..0000000 --- a/doc/html/api/lxml.tests.test_objectify-module.html +++ /dev/null @@ -1,564 +0,0 @@ - - - - - lxml.tests.test_objectify - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_objectify - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module test_objectify

source code

-Tests specific to the lxml.objectify API - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - ObjectifyTestCase
- Test cases for lxml.objectify -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
test_suite() - source code - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - this_dir = '/home/stefan/source/Python/lxml/lxml-release/src/l... -
-   - - PYTYPE_NAMESPACE = 'http://codespeak.net/lxml/objectify/pytype' -
-   - - XML_SCHEMA_NS = 'http://www.w3.org/2001/XMLSchema' -
-   - - XML_SCHEMA_INSTANCE_NS = 'http://www.w3.org/2001/XMLSchema-ins... -
-   - - XML_SCHEMA_INSTANCE_TYPE_ATTR = '{http://www.w3.org/2001/XMLSc... -
-   - - XML_SCHEMA_NIL_ATTR = '{http://www.w3.org/2001/XMLSchema-insta... -
-   - - TREE_PYTYPE = 'TREE' -
-   - - DEFAULT_NSMAP = {'py': 'http://codespeak.net/lxml/objectify/py... -
-   - - objectclass2xsitype = {<type 'lxml.objectify.IntElement'>: ('i... -
-   - - xsitype2objclass = {'ENTITY': <type 'lxml.objectify.StringElem... -
-   - - objectclass2pytype = {<type 'lxml.objectify.IntElement'>: 'int... -
-   - - pytype2objclass = {'bool': <type 'lxml.objectify.BoolElement'>... -
-   - - xml_str = '<obj:root xmlns:obj="objectified" xmlns:other="othe... -
-   - - __package__ = 'lxml.tests' -
-   - - v = 'double' -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

this_dir

- -
-
-
-
Value:
-
-'/home/stefan/source/Python/lxml/lxml-release/src/lxml/tests'
-
-
-
-
-
- -
- -
-

XML_SCHEMA_INSTANCE_NS

- -
-
-
-
Value:
-
-'http://www.w3.org/2001/XMLSchema-instance'
-
-
-
-
-
- -
- -
-

XML_SCHEMA_INSTANCE_TYPE_ATTR

- -
-
-
-
Value:
-
-'{http://www.w3.org/2001/XMLSchema-instance}type'
-
-
-
-
-
- -
- -
-

XML_SCHEMA_NIL_ATTR

- -
-
-
-
Value:
-
-'{http://www.w3.org/2001/XMLSchema-instance}nil'
-
-
-
-
-
- -
- -
-

DEFAULT_NSMAP

- -
-
-
-
Value:
-
-{'py': 'http://codespeak.net/lxml/objectify/pytype',
- 'xsd': 'http://www.w3.org/2001/XMLSchema',
- 'xsi': 'http://www.w3.org/2001/XMLSchema-instance'}
-
-
-
-
-
- -
- -
-

objectclass2xsitype

- -
-
-
-
Value:
-
-{<type 'lxml.objectify.IntElement'>: ('int',
-                                      'short',
-                                      'byte',
-                                      'unsignedShort',
-                                      'unsignedByte',
-                                      'integer',
-                                      'nonPositiveInteger',
-                                      'negativeInteger',
-...
-
-
-
-
-
- -
- -
-

xsitype2objclass

- -
-
-
-
Value:
-
-{'ENTITY': <type 'lxml.objectify.StringElement'>,
- 'ID': <type 'lxml.objectify.StringElement'>,
- 'IDREF': <type 'lxml.objectify.StringElement'>,
- 'NCName': <type 'lxml.objectify.StringElement'>,
- 'NMTOKEN': <type 'lxml.objectify.StringElement'>,
- 'Name': <type 'lxml.objectify.StringElement'>,
- 'boolean': <type 'lxml.objectify.BoolElement'>,
- 'byte': <type 'lxml.objectify.IntElement'>,
-...
-
-
-
-
-
- -
- -
-

objectclass2pytype

- -
-
-
-
Value:
-
-{<type 'lxml.objectify.IntElement'>: 'int',
- <type 'lxml.objectify.FloatElement'>: 'float',
- <type 'lxml.objectify.StringElement'>: 'str',
- <type 'lxml.objectify.BoolElement'>: 'bool'}
-
-
-
-
-
- -
- -
-

pytype2objclass

- -
-
-
-
Value:
-
-{'bool': <type 'lxml.objectify.BoolElement'>,
- 'float': <type 'lxml.objectify.FloatElement'>,
- 'int': <type 'lxml.objectify.IntElement'>,
- 'str': <type 'lxml.objectify.StringElement'>}
-
-
-
-
-
- -
- -
-

xml_str

- -
-
-
-
Value:
-
-'''<obj:root xmlns:obj="objectified" xmlns:other="otherNS">
-  <obj:c1 a1="A1" a2="A2" other:a3="A3">
-    <obj:c2>0</obj:c2>
-    <obj:c2>1</obj:c2>
-    <obj:c2>2</obj:c2>
-    <other:c2>3</other:c2>
-    <c2>4</c2>
-  </obj:c1>
-...
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_objectify-pysrc.html b/doc/html/api/lxml.tests.test_objectify-pysrc.html deleted file mode 100644 index 8a8c198..0000000 --- a/doc/html/api/lxml.tests.test_objectify-pysrc.html +++ /dev/null @@ -1,5980 +0,0 @@ - - - - - lxml.tests.test_objectify - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_objectify - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.test_objectify

-
-   1  # -*- coding: utf-8 -*- 
-   2   
-   3  """ 
-   4  Tests specific to the lxml.objectify API 
-   5  """ 
-   6   
-   7   
-   8  import unittest, operator, sys, os.path 
-   9   
-  10  this_dir = os.path.dirname(__file__) 
-  11  if this_dir not in sys.path: 
-  12      sys.path.insert(0, this_dir) # needed for Py3 
-  13   
-  14  from common_imports import etree, HelperTestCase, fileInTestDir 
-  15  from common_imports import SillyFileLike, canonicalize, doctest, make_doctest 
-  16  from common_imports import _bytes, _str, StringIO, BytesIO 
-  17   
-  18  from lxml import objectify 
-  19   
-  20  PYTYPE_NAMESPACE = "http://codespeak.net/lxml/objectify/pytype" 
-  21  XML_SCHEMA_NS = "http://www.w3.org/2001/XMLSchema" 
-  22  XML_SCHEMA_INSTANCE_NS = "http://www.w3.org/2001/XMLSchema-instance" 
-  23  XML_SCHEMA_INSTANCE_TYPE_ATTR = "{%s}type" % XML_SCHEMA_INSTANCE_NS 
-  24  XML_SCHEMA_NIL_ATTR = "{%s}nil" % XML_SCHEMA_INSTANCE_NS 
-  25  TREE_PYTYPE = "TREE" 
-  26  DEFAULT_NSMAP = { "py"  : PYTYPE_NAMESPACE, 
-  27                    "xsi" : XML_SCHEMA_INSTANCE_NS, 
-  28                    "xsd" : XML_SCHEMA_NS} 
-  29   
-  30  objectclass2xsitype = { 
-  31      # objectify built-in 
-  32      objectify.IntElement: ("int", "short", "byte", "unsignedShort", 
-  33                             "unsignedByte", "integer", "nonPositiveInteger", 
-  34                             "negativeInteger", "long", "nonNegativeInteger", 
-  35                             "unsignedLong", "unsignedInt", "positiveInteger",), 
-  36      objectify.FloatElement: ("float", "double"), 
-  37      objectify.BoolElement: ("boolean",), 
-  38      objectify.StringElement: ("string", "normalizedString", "token", "language", 
-  39                                "Name", "NCName", "ID", "IDREF", "ENTITY", 
-  40                                "NMTOKEN", ), 
-  41      # None: xsi:nil="true" 
-  42      } 
-  43   
-  44  xsitype2objclass = dict([ (v, k) for k in objectclass2xsitype 
-  45                            for v in objectclass2xsitype[k] ]) 
-  46   
-  47  objectclass2pytype = { 
-  48      # objectify built-in 
-  49      objectify.IntElement: "int", 
-  50      objectify.FloatElement: "float", 
-  51      objectify.BoolElement: "bool", 
-  52      objectify.StringElement: "str", 
-  53      # None: xsi:nil="true" 
-  54      } 
-  55   
-  56  pytype2objclass = dict([ (objectclass2pytype[k], k) 
-  57                           for k in objectclass2pytype]) 
-  58   
-  59  xml_str = '''\ 
-  60  <obj:root xmlns:obj="objectified" xmlns:other="otherNS"> 
-  61    <obj:c1 a1="A1" a2="A2" other:a3="A3"> 
-  62      <obj:c2>0</obj:c2> 
-  63      <obj:c2>1</obj:c2> 
-  64      <obj:c2>2</obj:c2> 
-  65      <other:c2>3</other:c2> 
-  66      <c2>4</c2> 
-  67    </obj:c1> 
-  68  </obj:root>''' 
-  69   
-
70 -class ObjectifyTestCase(HelperTestCase): -
71 """Test cases for lxml.objectify - 72 """ - 73 etree = etree - 74 -
75 - def XML(self, xml): -
76 return self.etree.XML(xml, self.parser) -
77 -
78 - def setUp(self): -
79 super(ObjectifyTestCase, self).setUp() - 80 self.parser = self.etree.XMLParser(remove_blank_text=True) - 81 self.lookup = etree.ElementNamespaceClassLookup( - 82 objectify.ObjectifyElementClassLookup() ) - 83 self.parser.set_element_class_lookup(self.lookup) - 84 - 85 self.Element = self.parser.makeelement - 86 - 87 ns = self.lookup.get_namespace("otherNS") - 88 ns[None] = self.etree.ElementBase - 89 - 90 self._orig_types = objectify.getRegisteredTypes() -
91 -
92 - def tearDown(self): -
93 self.lookup.get_namespace("otherNS").clear() - 94 objectify.set_pytype_attribute_tag() - 95 del self.lookup - 96 del self.parser - 97 - 98 for pytype in objectify.getRegisteredTypes(): - 99 pytype.unregister() - 100 for pytype in self._orig_types: - 101 pytype.register() - 102 del self._orig_types - 103 - 104 super(ObjectifyTestCase, self).tearDown() -
105 - 106 -
107 - def test_element_nsmap_default(self): -
108 elt = objectify.Element("test") - 109 self.assertEqual(elt.nsmap, DEFAULT_NSMAP) -
110 -
111 - def test_element_nsmap_empty(self): -
112 nsmap = {} - 113 elt = objectify.Element("test", nsmap=nsmap) - 114 self.assertEqual(list(elt.nsmap.values()), [PYTYPE_NAMESPACE]) -
115 -
117 nsmap = {"mypy": PYTYPE_NAMESPACE, - 118 "myxsi": XML_SCHEMA_INSTANCE_NS, - 119 "myxsd": XML_SCHEMA_NS} - 120 elt = objectify.Element("test", nsmap=nsmap) - 121 self.assertEqual(elt.nsmap, nsmap) -
122 -
123 - def test_element_nsmap_custom(self): -
124 nsmap = {"my": "someNS", - 125 "myother": "someOtherNS", - 126 "myxsd": XML_SCHEMA_NS} - 127 elt = objectify.Element("test", nsmap=nsmap) - 128 self.assertTrue(PYTYPE_NAMESPACE in elt.nsmap.values()) - 129 for prefix, ns in nsmap.items(): - 130 self.assertTrue(prefix in elt.nsmap) - 131 self.assertEqual(nsmap[prefix], elt.nsmap[prefix]) -
132 -
134 root = objectify.Element("root") - 135 root.sub = objectify.Element("test") - 136 self.assertEqual(root.sub.nsmap, DEFAULT_NSMAP) -
137 -
139 root = objectify.Element("root") - 140 nsmap = {} - 141 root.sub = objectify.Element("test", nsmap=nsmap) - 142 self.assertEqual(root.sub.nsmap, DEFAULT_NSMAP) -
143 -
145 root = objectify.Element("root") - 146 nsmap = {"mypy": PYTYPE_NAMESPACE, - 147 "myxsi": XML_SCHEMA_INSTANCE_NS, - 148 "myxsd": XML_SCHEMA_NS} - 149 root.sub = objectify.Element("test", nsmap=nsmap) - 150 self.assertEqual(root.sub.nsmap, DEFAULT_NSMAP) -
151 -
153 root = objectify.Element("root") - 154 nsmap = {"my": "someNS", - 155 "myother": "someOtherNS", - 156 "myxsd": XML_SCHEMA_NS,} - 157 root.sub = objectify.Element("test", nsmap=nsmap) - 158 expected = nsmap.copy() - 159 del expected["myxsd"] - 160 expected.update(DEFAULT_NSMAP) - 161 self.assertEqual(root.sub.nsmap, expected) -
162 -
164 value = objectify.DataElement("test this") - 165 self.assertEqual(value.nsmap, DEFAULT_NSMAP) -
166 -
168 nsmap = {} - 169 value = objectify.DataElement("test this", nsmap=nsmap) - 170 self.assertEqual(list(value.nsmap.values()), [PYTYPE_NAMESPACE]) -
171 -
173 nsmap = {"mypy": PYTYPE_NAMESPACE, - 174 "myxsi": XML_SCHEMA_INSTANCE_NS, - 175 "myxsd": XML_SCHEMA_NS} - 176 value = objectify.DataElement("test this", nsmap=nsmap) - 177 self.assertEqual(value.nsmap, nsmap) -
178 -
180 nsmap = {"my": "someNS", - 181 "myother": "someOtherNS", - 182 "myxsd": XML_SCHEMA_NS,} - 183 value = objectify.DataElement("test", nsmap=nsmap) - 184 self.assertTrue(PYTYPE_NAMESPACE in value.nsmap.values()) - 185 for prefix, ns in nsmap.items(): - 186 self.assertTrue(prefix in value.nsmap) - 187 self.assertEqual(nsmap[prefix], value.nsmap[prefix]) -
188 -
190 root = objectify.Element("root") - 191 root.value = objectify.DataElement("test this") - 192 self.assertEqual(root.value.nsmap, DEFAULT_NSMAP) -
193 -
195 root = objectify.Element("root") - 196 nsmap = {} - 197 root.value = objectify.DataElement("test this", nsmap=nsmap) - 198 self.assertEqual(root.value.nsmap, DEFAULT_NSMAP) -
199 -
201 root = objectify.Element("root") - 202 nsmap = {"mypy": PYTYPE_NAMESPACE, - 203 "myxsi": XML_SCHEMA_INSTANCE_NS, - 204 "myxsd": XML_SCHEMA_NS} - 205 root.value = objectify.DataElement("test this", nsmap=nsmap) - 206 self.assertEqual(root.value.nsmap, DEFAULT_NSMAP) -
207 -
209 root = objectify.Element("root") - 210 nsmap = {"my": "someNS", - 211 "myother": "someOtherNS", - 212 "myxsd": XML_SCHEMA_NS} - 213 root.value = objectify.DataElement("test", nsmap=nsmap) - 214 expected = nsmap.copy() - 215 del expected["myxsd"] - 216 expected.update(DEFAULT_NSMAP) - 217 self.assertEqual(root.value.nsmap, expected) -
218 -
220 # ObjectifiedDataElement can also be used as E-Factory - 221 value = objectify.ObjectifiedDataElement('test', 'toast') - 222 self.assertEqual(value.text, 'testtoast') -
223 -
225 # ObjectifiedDataElement can also be used as E-Factory - 226 value = objectify.ObjectifiedElement(objectify.ObjectifiedDataElement(), 'test', 'toast') - 227 self.assertEqual(value.ObjectifiedDataElement.tail, 'testtoast') -
228 -
230 # keyword arguments override attrib entries - 231 value = objectify.DataElement(23, _pytype="str", _xsi="foobar", - 232 attrib={"gnu": "muh", "cat": "meeow", - 233 "dog": "wuff"}, - 234 bird="tchilp", dog="grrr") - 235 self.assertEqual(value.get("gnu"), "muh") - 236 self.assertEqual(value.get("cat"), "meeow") - 237 self.assertEqual(value.get("dog"), "grrr") - 238 self.assertEqual(value.get("bird"), "tchilp") -
239 -
241 # Check that DataElement preserves all attributes ObjectifiedDataElement - 242 # arguments - 243 arg = objectify.DataElement(23, _pytype="str", _xsi="foobar", - 244 attrib={"gnu": "muh", "cat": "meeow", - 245 "dog": "wuff"}, - 246 bird="tchilp", dog="grrr") - 247 value = objectify.DataElement(arg) - 248 self.assertTrue(isinstance(value, objectify.StringElement)) - 249 for attr in arg.attrib: - 250 self.assertEqual(value.get(attr), arg.get(attr)) -
251 -
253 # Check that _pytype arg overrides original py:pytype of - 254 # ObjectifiedDataElement - 255 arg = objectify.DataElement(23, _pytype="str", _xsi="foobar", - 256 attrib={"gnu": "muh", "cat": "meeow", - 257 "dog": "wuff"}, - 258 bird="tchilp", dog="grrr") - 259 value = objectify.DataElement(arg, _pytype="NoneType") - 260 self.assertTrue(isinstance(value, objectify.NoneElement)) - 261 self.assertEqual(value.get(XML_SCHEMA_NIL_ATTR), "true") - 262 self.assertEqual(value.text, None) - 263 self.assertEqual(value.pyval, None) - 264 for attr in arg.attrib: - 265 #if not attr == objectify.PYTYPE_ATTRIBUTE: - 266 self.assertEqual(value.get(attr), arg.get(attr)) -
267 -
269 # Check that _pytype arg overrides original py:pytype of - 270 # ObjectifiedDataElement - 271 arg = objectify.DataElement(23, _pytype="str", _xsi="foobar", - 272 attrib={"gnu": "muh", "cat": "meeow", - 273 "dog": "wuff"}, - 274 bird="tchilp", dog="grrr") - 275 value = objectify.DataElement(arg, _pytype="int") - 276 self.assertTrue(isinstance(value, objectify.IntElement)) - 277 self.assertEqual(value.get(objectify.PYTYPE_ATTRIBUTE), "int") - 278 for attr in arg.attrib: - 279 if not attr == objectify.PYTYPE_ATTRIBUTE: - 280 self.assertEqual(value.get(attr), arg.get(attr)) -
281 -
283 # Check that _xsi arg overrides original xsi:type of given - 284 # ObjectifiedDataElement - 285 arg = objectify.DataElement(23, _pytype="str", _xsi="foobar", - 286 attrib={"gnu": "muh", "cat": "meeow", - 287 "dog": "wuff"}, - 288 bird="tchilp", dog="grrr") - 289 value = objectify.DataElement(arg, _xsi="xsd:int") - 290 self.assertTrue(isinstance(value, objectify.IntElement)) - 291 self.assertEqual(value.get(XML_SCHEMA_INSTANCE_TYPE_ATTR), "xsd:int") - 292 self.assertEqual(value.get(objectify.PYTYPE_ATTRIBUTE), "int") - 293 for attr in arg.attrib: - 294 if not attr in [objectify.PYTYPE_ATTRIBUTE, - 295 XML_SCHEMA_INSTANCE_TYPE_ATTR]: - 296 self.assertEqual(value.get(attr), arg.get(attr)) -
297 -
299 # Check that _pytype and _xsi args override original py:pytype and - 300 # xsi:type attributes of given ObjectifiedDataElement - 301 arg = objectify.DataElement(23, _pytype="str", _xsi="foobar", - 302 attrib={"gnu": "muh", "cat": "meeow", - 303 "dog": "wuff"}, - 304 bird="tchilp", dog="grrr") - 305 value = objectify.DataElement(arg, _pytype="int", _xsi="xsd:int") - 306 self.assertTrue(isinstance(value, objectify.IntElement)) - 307 self.assertEqual(value.get(objectify.PYTYPE_ATTRIBUTE), "int") - 308 self.assertEqual(value.get(XML_SCHEMA_INSTANCE_TYPE_ATTR), "xsd:int") - 309 for attr in arg.attrib: - 310 if not attr in [objectify.PYTYPE_ATTRIBUTE, - 311 XML_SCHEMA_INSTANCE_TYPE_ATTR]: - 312 self.assertEqual(value.get(attr), arg.get(attr)) -
313 -
315 self.assertRaises(ValueError, objectify.DataElement, 3.1415, - 316 _pytype="int") -
317 -
319 self.assertRaises(ValueError, objectify.DataElement, 3.1415, - 320 _xsi="xsd:int") -
321 -
323 arg = objectify.DataElement(3.1415) - 324 self.assertRaises(ValueError, objectify.DataElement, arg, - 325 _pytype="int") -
326 -
328 arg = objectify.DataElement(3.1415) - 329 self.assertRaises(ValueError, objectify.DataElement, arg, - 330 _xsi="xsd:int") -
331 -
333 arg = objectify.Element('arg') - 334 value = objectify.DataElement(arg) - 335 self.assertTrue(isinstance(value, objectify.ObjectifiedElement)) - 336 for attr in arg.attrib: - 337 self.assertEqual(value.get(attr), arg.get(attr)) -
338 -
339 - def test_root(self): -
340 root = self.Element("test") - 341 self.assertTrue(isinstance(root, objectify.ObjectifiedElement)) -
342 -
343 - def test_str(self): -
344 root = self.Element("test") - 345 self.assertEqual('', str(root)) -
346 -
347 - def test_child(self): -
348 root = self.XML(xml_str) - 349 self.assertEqual("0", root.c1.c2.text) -
350 -
351 - def test_child_ns_nons(self): -
352 root = self.XML(""" - 353 <root> - 354 <foo:x xmlns:foo="/foo/bar">1</foo:x> - 355 <x>2</x> - 356 </root> - 357 """) - 358 self.assertEqual(2, root.x) -
359 -
360 - def test_countchildren(self): -
361 root = self.XML(xml_str) - 362 self.assertEqual(1, root.countchildren()) - 363 self.assertEqual(5, root.c1.countchildren()) -
364 -
365 - def test_child_getattr(self): -
366 root = self.XML(xml_str) - 367 self.assertEqual("0", getattr(root.c1, "{objectified}c2").text) - 368 self.assertEqual("3", getattr(root.c1, "{otherNS}c2").text) -
369 -
370 - def test_child_nonexistant(self): -
371 root = self.XML(xml_str) - 372 self.assertRaises(AttributeError, getattr, root.c1, "NOT_THERE") - 373 self.assertRaises(AttributeError, getattr, root.c1, "{unknownNS}c2") -
374 -
375 - def test_child_getattr_empty_ns(self): -
376 root = self.XML(xml_str) - 377 self.assertEqual("4", getattr(root.c1, "{}c2").text) - 378 self.assertEqual("0", getattr(root.c1, "c2").text) -
379 -
380 - def test_setattr(self): -
381 for val in [ - 382 2, 2**32, 1.2, "Won't get fooled again", - 383 _str("W\xf6n't get f\xf6\xf6led \xe4g\xe4in", 'ISO-8859-1'), True, - 384 False, None]: - 385 root = self.Element('root') - 386 attrname = 'val' - 387 setattr(root, attrname, val) - 388 result = getattr(root, attrname) - 389 self.assertEqual(val, result) - 390 self.assertEqual(type(val), type(result.pyval)) -
391 -
392 - def test_setattr_nonunicode(self): -
393 root = self.Element('root') - 394 attrname = 'val' - 395 val = _bytes("W\xf6n't get f\xf6\xf6led \xe4g\xe4in", 'ISO-8859-1') - 396 self.assertRaises(ValueError, setattr, root, attrname, val) - 397 self.assertRaises(AttributeError, getattr, root, attrname) -
398 -
399 - def test_addattr(self): -
400 root = self.XML(xml_str) - 401 self.assertEqual(1, len(root.c1)) - 402 root.addattr("c1", "test") - 403 self.assertEqual(2, len(root.c1)) - 404 self.assertEqual("test", root.c1[1].text) -
405 -
406 - def test_addattr_element(self): -
407 root = self.XML(xml_str) - 408 self.assertEqual(1, len(root.c1)) - 409 - 410 new_el = self.Element("test", myattr="5") - 411 root.addattr("c1", new_el) - 412 self.assertEqual(2, len(root.c1)) - 413 self.assertEqual(None, root.c1[0].get("myattr")) - 414 self.assertEqual("5", root.c1[1].get("myattr")) -
415 -
416 - def test_addattr_list(self): -
417 root = self.XML(xml_str) - 418 self.assertEqual(1, len(root.c1)) - 419 - 420 new_el = self.Element("test") - 421 self.etree.SubElement(new_el, "a", myattr="A") - 422 self.etree.SubElement(new_el, "a", myattr="B") - 423 - 424 root.addattr("c1", list(new_el.a)) - 425 self.assertEqual(3, len(root.c1)) - 426 self.assertEqual(None, root.c1[0].get("myattr")) - 427 self.assertEqual("A", root.c1[1].get("myattr")) - 428 self.assertEqual("B", root.c1[2].get("myattr")) -
429 -
430 - def test_child_addattr(self): -
431 root = self.XML(xml_str) - 432 self.assertEqual(3, len(root.c1.c2)) - 433 root.c1.addattr("c2", 3) - 434 self.assertEqual(4, len(root.c1.c2)) - 435 self.assertEqual("3", root.c1.c2[3].text) -
436 -
437 - def test_child_index(self): -
438 root = self.XML(xml_str) - 439 self.assertEqual("0", root.c1.c2[0].text) - 440 self.assertEqual("1", root.c1.c2[1].text) - 441 self.assertEqual("2", root.c1.c2[2].text) - 442 self.assertRaises(IndexError, operator.getitem, root.c1.c2, 3) -
443 -
444 - def test_child_index_neg(self): -
445 root = self.XML(xml_str) - 446 self.assertEqual("0", root.c1.c2[0].text) - 447 self.assertEqual("0", root.c1.c2[-3].text) - 448 self.assertEqual("1", root.c1.c2[-2].text) - 449 self.assertEqual("2", root.c1.c2[-1].text) - 450 self.assertRaises(IndexError, operator.getitem, root.c1.c2, -4) -
451 -
452 - def test_child_len(self): -
453 root = self.XML(xml_str) - 454 self.assertEqual(1, len(root)) - 455 self.assertEqual(1, len(root.c1)) - 456 self.assertEqual(3, len(root.c1.c2)) -
457 -
458 - def test_child_iter(self): -
459 root = self.XML(xml_str) - 460 self.assertEqual([root], - 461 list(iter(root))) - 462 self.assertEqual([root.c1], - 463 list(iter(root.c1))) - 464 self.assertEqual([root.c1.c2[0], root.c1.c2[1], root.c1.c2[2]], - 465 list(iter((root.c1.c2)))) -
466 -
467 - def test_class_lookup(self): -
468 root = self.XML(xml_str) - 469 self.assertTrue(isinstance(root.c1.c2, objectify.ObjectifiedElement)) - 470 self.assertFalse(isinstance(getattr(root.c1, "{otherNS}c2"), - 471 objectify.ObjectifiedElement)) -
472 -
473 - def test_dir(self): -
474 root = self.XML(xml_str) - 475 dir_c1 = dir(objectify.ObjectifiedElement) + ['c1'] - 476 dir_c1.sort() - 477 dir_c2 = dir(objectify.ObjectifiedElement) + ['c2'] - 478 dir_c2.sort() - 479 - 480 self.assertEqual(dir_c1, dir(root)) - 481 self.assertEqual(dir_c2, dir(root.c1)) -
482 -
483 - def test_vars(self): -
484 root = self.XML(xml_str) - 485 self.assertEqual({'c1' : root.c1}, vars(root)) - 486 self.assertEqual({'c2' : root.c1.c2}, vars(root.c1)) -
487 -
488 - def test_child_set_ro(self): -
489 root = self.XML(xml_str) - 490 self.assertRaises(TypeError, setattr, root.c1.c2, 'text', "test") - 491 self.assertRaises(TypeError, setattr, root.c1.c2, 'pyval', "test") -
492 - 493 # slicing - 494 -
495 - def test_getslice_complete(self): -
496 root = self.XML("<root><c>c1</c><c>c2</c></root>") - 497 self.assertEqual(["c1", "c2"], - 498 [ c.text for c in root.c[:] ]) -
499 -
500 - def test_getslice_partial(self): -
501 root = self.XML("<root><c>c1</c><c>c2</c><c>c3</c><c>c4</c></root>") - 502 test_list = ["c1", "c2", "c3", "c4"] - 503 - 504 self.assertEqual(test_list, - 505 [ c.text for c in root.c[:] ]) - 506 self.assertEqual(test_list[1:2], - 507 [ c.text for c in root.c[1:2] ]) - 508 self.assertEqual(test_list[-3:-1], - 509 [ c.text for c in root.c[-3:-1] ]) - 510 self.assertEqual(test_list[-3:3], - 511 [ c.text for c in root.c[-3:3] ]) - 512 self.assertEqual(test_list[-3000:3], - 513 [ c.text for c in root.c[-3000:3] ]) - 514 self.assertEqual(test_list[-3:3000], - 515 [ c.text for c in root.c[-3:3000] ]) -
516 -
517 - def test_getslice_partial_neg(self): -
518 root = self.XML("<root><c>c1</c><c>c2</c><c>c3</c><c>c4</c></root>") - 519 test_list = ["c1", "c2", "c3", "c4"] - 520 - 521 self.assertEqual(test_list, - 522 [ c.text for c in root.c[:] ]) - 523 self.assertEqual(test_list[2:1:-1], - 524 [ c.text for c in root.c[2:1:-1] ]) - 525 self.assertEqual(test_list[-1:-3:-1], - 526 [ c.text for c in root.c[-1:-3:-1] ]) - 527 self.assertEqual(test_list[2:-3:-1], - 528 [ c.text for c in root.c[2:-3:-1] ]) - 529 self.assertEqual(test_list[2:-3000:-1], - 530 [ c.text for c in root.c[2:-3000:-1] ]) -
531 - 532 # slice assignment - 533 -
534 - def test_setslice_complete(self): -
535 Element = self.Element - 536 root = Element("root") - 537 root.c = ["c1", "c2"] - 538 - 539 c1 = root.c[0] - 540 c2 = root.c[1] - 541 - 542 self.assertEqual([c1,c2], list(root.c)) - 543 self.assertEqual(["c1", "c2"], - 544 [ c.text for c in root.c ]) -
545 -
546 - def test_setslice_elements(self): -
547 Element = self.Element - 548 root = Element("root") - 549 root.c = ["c1", "c2"] - 550 - 551 c1 = root.c[0] - 552 c2 = root.c[1] - 553 - 554 self.assertEqual([c1,c2], list(root.c)) - 555 self.assertEqual(["c1", "c2"], - 556 [ c.text for c in root.c ]) - 557 - 558 root2 = Element("root2") - 559 root2.el = [ "test", "test" ] - 560 self.assertEqual(["test", "test"], - 561 [ el.text for el in root2.el ]) - 562 - 563 root.c = [ root2.el, root2.el ] - 564 self.assertEqual(["test", "test"], - 565 [ c.text for c in root.c ]) - 566 self.assertEqual(["test", "test"], - 567 [ el.text for el in root2.el ]) - 568 - 569 root.c[:] = [ c1, c2, c2, c1 ] - 570 self.assertEqual(["c1", "c2", "c2", "c1"], - 571 [ c.text for c in root.c ]) -
572 -
573 - def test_setslice_partial(self): -
574 Element = self.Element - 575 root = Element("root") - 576 l = ["c1", "c2", "c3", "c4"] - 577 root.c = l - 578 - 579 self.assertEqual(["c1", "c2", "c3", "c4"], - 580 [ c.text for c in root.c ]) - 581 self.assertEqual(l, - 582 [ c.text for c in root.c ]) - 583 - 584 new_slice = ["cA", "cB"] - 585 l[1:2] = new_slice - 586 root.c[1:2] = new_slice - 587 - 588 self.assertEqual(["c1", "cA", "cB", "c3", "c4"], l) - 589 self.assertEqual(["c1", "cA", "cB", "c3", "c4"], - 590 [ c.text for c in root.c ]) - 591 self.assertEqual(l, - 592 [ c.text for c in root.c ]) -
593 -
594 - def test_setslice_insert(self): -
595 Element = self.Element - 596 root = Element("root") - 597 l = ["c1", "c2", "c3", "c4"] - 598 root.c = l - 599 - 600 self.assertEqual(["c1", "c2", "c3", "c4"], - 601 [ c.text for c in root.c ]) - 602 self.assertEqual(l, - 603 [ c.text for c in root.c ]) - 604 - 605 new_slice = ["cA", "cB"] - 606 l[1:1] = new_slice - 607 root.c[1:1] = new_slice - 608 - 609 self.assertEqual(["c1", "cA", "cB", "c2", "c3", "c4"], l) - 610 self.assertEqual(["c1", "cA", "cB", "c2", "c3", "c4"], - 611 [ c.text for c in root.c ]) - 612 self.assertEqual(l, - 613 [ c.text for c in root.c ]) -
614 -
615 - def test_setslice_insert_neg(self): -
616 Element = self.Element - 617 root = Element("root") - 618 l = ["c1", "c2", "c3", "c4"] - 619 root.c = l - 620 - 621 self.assertEqual(["c1", "c2", "c3", "c4"], - 622 [ c.text for c in root.c ]) - 623 self.assertEqual(l, - 624 [ c.text for c in root.c ]) - 625 - 626 new_slice = ["cA", "cB"] - 627 l[-2:-2] = new_slice - 628 root.c[-2:-2] = new_slice - 629 - 630 self.assertEqual(["c1", "c2", "cA", "cB", "c3", "c4"], l) - 631 self.assertEqual(["c1", "c2", "cA", "cB", "c3", "c4"], - 632 [ c.text for c in root.c ]) - 633 self.assertEqual(l, - 634 [ c.text for c in root.c ]) -
635 -
636 - def test_setslice_empty(self): -
637 Element = self.Element - 638 root = Element("root") - 639 - 640 root.c = [] - 641 self.assertRaises( - 642 AttributeError, getattr, root, 'c') -
643 -
645 Element = self.Element - 646 root = Element("root") - 647 l = ["c1", "c2", "c3", "c4"] - 648 root.c = l - 649 - 650 self.assertEqual(["c1", "c2", "c3", "c4"], - 651 [ c.text for c in root.c ]) - 652 self.assertEqual(l, - 653 [ c.text for c in root.c ]) - 654 - 655 new_slice = ["cA", "cB", "cC"] - 656 self.assertRaises( - 657 ValueError, operator.setitem, - 658 l, slice(1,2,-1), new_slice) - 659 self.assertRaises( - 660 ValueError, operator.setitem, - 661 root.c, slice(1,2,-1), new_slice) -
662 -
663 - def test_setslice_partial_neg(self): -
664 Element = self.Element - 665 root = Element("root") - 666 l = ["c1", "c2", "c3", "c4"] - 667 root.c = l - 668 - 669 self.assertEqual(["c1", "c2", "c3", "c4"], - 670 [ c.text for c in root.c ]) - 671 self.assertEqual(l, - 672 [ c.text for c in root.c ]) - 673 - 674 new_slice = ["cA", "cB"] - 675 l[-1:1:-1] = new_slice - 676 root.c[-1:1:-1] = new_slice - 677 - 678 self.assertEqual(["c1", "c2", "cB", "cA"], l) - 679 self.assertEqual(["c1", "c2", "cB", "cA"], - 680 [ c.text for c in root.c ]) - 681 self.assertEqual(l, - 682 [ c.text for c in root.c ]) -
683 -
685 Element = self.Element - 686 root = Element("root") - 687 l = ["c1", "c2", "c3", "c4"] - 688 root.c = l - 689 - 690 self.assertEqual(["c1", "c2", "c3", "c4"], - 691 [ c.text for c in root.c ]) - 692 self.assertEqual(l, - 693 [ c.text for c in root.c ]) - 694 - 695 new_slice = ["cA", "cB"] - 696 l[-1:-4:-2] = new_slice - 697 root.c[-1:-4:-2] = new_slice - 698 - 699 self.assertEqual(["c1", "cB", "c3", "cA"], l) - 700 self.assertEqual(["c1", "cB", "c3", "cA"], - 701 [ c.text for c in root.c ]) - 702 self.assertEqual(l, - 703 [ c.text for c in root.c ]) -
704 - 705 # other stuff - 706 -
707 - def test_set_string(self): -
708 # make sure strings are not handled as sequences - 709 Element = self.Element - 710 root = Element("root") - 711 root.c = "TEST" - 712 self.assertEqual(["TEST"], - 713 [ c.text for c in root.c ]) -
714 -
715 - def test_setitem_string(self): -
716 # make sure strings are set as children - 717 Element = self.Element - 718 root = Element("root") - 719 root["c"] = "TEST" - 720 self.assertEqual(["TEST"], - 721 [ c.text for c in root.c ]) -
722 -
723 - def test_setitem_string_special(self): -
724 # make sure 'text' etc. are set as children - 725 Element = self.Element - 726 root = Element("root") - 727 - 728 root["text"] = "TEST" - 729 self.assertEqual(["TEST"], - 730 [ c.text for c in root["text"] ]) - 731 - 732 root["tail"] = "TEST" - 733 self.assertEqual(["TEST"], - 734 [ c.text for c in root["tail"] ]) - 735 - 736 root["pyval"] = "TEST" - 737 self.assertEqual(["TEST"], - 738 [ c.text for c in root["pyval"] ]) - 739 - 740 root["tag"] = "TEST" - 741 self.assertEqual(["TEST"], - 742 [ c.text for c in root["tag"] ]) -
743 -
744 - def test_findall(self): -
745 XML = self.XML - 746 root = XML('<a><b><c/></b><b/><c><b/></c></a>') - 747 self.assertEqual(1, len(root.findall("c"))) - 748 self.assertEqual(2, len(root.findall(".//c"))) - 749 self.assertEqual(3, len(root.findall(".//b"))) - 750 self.assertTrue(root.findall(".//b")[1] is root.getchildren()[1]) -
751 -
752 - def test_findall_ns(self): -
753 XML = self.XML - 754 root = XML('<a xmlns:x="X" xmlns:y="Y"><x:b><c/></x:b><b/><c><x:b/><b/></c><b/></a>') - 755 self.assertEqual(2, len(root.findall(".//{X}b"))) - 756 self.assertEqual(3, len(root.findall(".//b"))) - 757 self.assertEqual(2, len(root.findall("b"))) -
758 -
759 - def test_build_tree(self): -
760 root = self.Element('root') - 761 root.a = 5 - 762 root.b = 6 - 763 self.assertTrue(isinstance(root, objectify.ObjectifiedElement)) - 764 self.assertTrue(isinstance(root.a, objectify.IntElement)) - 765 self.assertTrue(isinstance(root.b, objectify.IntElement)) -
766 -
767 - def test_type_NoneType(self): -
768 Element = self.Element - 769 SubElement = self.etree.SubElement - 770 - 771 nil_attr = XML_SCHEMA_NIL_ATTR - 772 root = Element("{objectified}root") - 773 SubElement(root, "{objectified}none") - 774 SubElement(root, "{objectified}none", {nil_attr : "true"}) - 775 self.assertFalse(isinstance(root.none, objectify.NoneElement)) - 776 self.assertFalse(isinstance(root.none[0], objectify.NoneElement)) - 777 self.assertTrue(isinstance(root.none[1], objectify.NoneElement)) - 778 self.assertEqual(hash(root.none[1]), hash(None)) - 779 self.assertEqual(root.none[1], None) - 780 self.assertFalse(root.none[1]) -
781 -
782 - def test_data_element_NoneType(self): -
783 value = objectify.DataElement(None) - 784 self.assertTrue(isinstance(value, objectify.NoneElement)) - 785 self.assertEqual(value, None) - 786 self.assertEqual(value.get(XML_SCHEMA_NIL_ATTR), "true") -
787 -
788 - def test_type_bool(self): -
789 Element = self.Element - 790 SubElement = self.etree.SubElement - 791 root = Element("{objectified}root") - 792 root.bool = True - 793 self.assertEqual(root.bool, True) - 794 self.assertEqual(root.bool + root.bool, True + True) - 795 self.assertEqual(True + root.bool, True + root.bool) - 796 self.assertEqual(root.bool * root.bool, True * True) - 797 self.assertEqual(int(root.bool), int(True)) - 798 self.assertEqual(hash(root.bool), hash(True)) - 799 self.assertEqual(complex(root.bool), complex(True)) - 800 self.assertTrue(isinstance(root.bool, objectify.BoolElement)) - 801 - 802 root.bool = False - 803 self.assertEqual(root.bool, False) - 804 self.assertEqual(root.bool + root.bool, False + False) - 805 self.assertEqual(False + root.bool, False + root.bool) - 806 self.assertEqual(root.bool * root.bool, False * False) - 807 self.assertEqual(int(root.bool), int(False)) - 808 self.assertEqual(hash(root.bool), hash(False)) - 809 self.assertEqual(complex(root.bool), complex(False)) - 810 self.assertTrue(isinstance(root.bool, objectify.BoolElement)) -
811 -
812 - def test_data_element_bool(self): -
813 value = objectify.DataElement(True) - 814 self.assertTrue(isinstance(value, objectify.BoolElement)) - 815 self.assertEqual(value, True) - 816 - 817 value = objectify.DataElement(False) - 818 self.assertTrue(isinstance(value, objectify.BoolElement)) - 819 self.assertEqual(value, False) -
820 -
821 - def test_type_str(self): -
822 Element = self.Element - 823 SubElement = self.etree.SubElement - 824 root = Element("{objectified}root") - 825 root.s = "test" - 826 self.assertTrue(isinstance(root.s, objectify.StringElement)) -
827 -
828 - def test_type_str_intliteral(self): -
829 Element = self.Element - 830 SubElement = self.etree.SubElement - 831 root = Element("{objectified}root") - 832 root.s = "3" - 833 self.assertTrue(isinstance(root.s, objectify.StringElement)) -
834 -
835 - def test_type_str_floatliteral(self): -
836 Element = self.Element - 837 SubElement = self.etree.SubElement - 838 root = Element("{objectified}root") - 839 root.s = "3.72" - 840 self.assertTrue(isinstance(root.s, objectify.StringElement)) -
841 -
842 - def test_type_str_mul(self): -
843 Element = self.Element - 844 SubElement = self.etree.SubElement - 845 root = Element("{objectified}root") - 846 root.s = "test" - 847 - 848 self.assertEqual("test" * 5, root.s * 5) - 849 self.assertEqual(5 * "test", 5 * root.s) - 850 - 851 self.assertRaises(TypeError, operator.mul, root.s, "honk") - 852 self.assertRaises(TypeError, operator.mul, "honk", root.s) -
853 -
854 - def test_type_str_add(self): -
855 Element = self.Element - 856 SubElement = self.etree.SubElement - 857 root = Element("{objectified}root") - 858 root.s = "test" - 859 - 860 s = "toast" - 861 self.assertEqual("test" + s, root.s + s) - 862 self.assertEqual(s + "test", s + root.s) -
863 -
864 - def test_type_str_mod(self): -
865 s = "%d %f %s %r" - 866 el = objectify.DataElement(s) - 867 values = (1, 7.0, "abcd", None) - 868 self.assertEqual(s % values, el % values) - 869 - 870 s = "%d" - 871 el = objectify.DataElement(s) - 872 val = 5 - 873 self.assertEqual(s % val, el % val) - 874 - 875 s = "%d %s" - 876 el = objectify.DataElement(s) - 877 val = 5 - 878 self.assertRaises(TypeError, el.__mod__, val) - 879 - 880 s = "" - 881 el = objectify.DataElement(s) - 882 val = 5 - 883 self.assertRaises(TypeError, el.__mod__, val) -
884 -
885 - def test_type_str_hash(self): -
886 v = "1" - 887 el = objectify.DataElement(v) - 888 self.assertEqual(hash(el), hash("1")) -
889 -
890 - def test_type_str_as_int(self): -
891 v = "1" - 892 el = objectify.DataElement(v) - 893 self.assertEqual(int(el), 1) -
894 -
895 - def test_type_str_as_float(self): -
896 v = "1" - 897 el = objectify.DataElement(v) - 898 self.assertEqual(float(el), 1) -
899 -
900 - def test_type_str_as_complex(self): -
901 v = "1" - 902 el = objectify.DataElement(v) - 903 self.assertEqual(complex(el), 1) -
904 -
906 s = "%d %f %s %r" - 907 el = objectify.DataElement(s) - 908 values = (objectify.DataElement(1), - 909 objectify.DataElement(7.0), - 910 objectify.DataElement("abcd"), - 911 objectify.DataElement(None)) - 912 self.assertEqual(s % values, el % values) -
913 -
914 - def test_data_element_str(self): -
915 value = objectify.DataElement("test") - 916 self.assertTrue(isinstance(value, objectify.StringElement)) - 917 self.assertEqual(value, "test") -
918 -
920 value = objectify.DataElement("3") - 921 self.assertTrue(isinstance(value, objectify.StringElement)) - 922 self.assertEqual(value, "3") -
923 -
925 value = objectify.DataElement("3.20") - 926 self.assertTrue(isinstance(value, objectify.StringElement)) - 927 self.assertEqual(value, "3.20") -
928 -
929 - def test_type_ustr(self): -
930 Element = self.Element - 931 SubElement = self.etree.SubElement - 932 root = Element("{objectified}root") - 933 root.s = _str("test") - 934 self.assertTrue(isinstance(root.s, objectify.StringElement)) -
935 -
936 - def test_type_ustr_intliteral(self): -
937 Element = self.Element - 938 SubElement = self.etree.SubElement - 939 root = Element("{objectified}root") - 940 root.s = _str("3") - 941 self.assertTrue(isinstance(root.s, objectify.StringElement)) -
942 -
943 - def test_type_ustr_floatliteral(self): -
944 Element = self.Element - 945 SubElement = self.etree.SubElement - 946 root = Element("{objectified}root") - 947 root.s = _str("3.72") - 948 self.assertTrue(isinstance(root.s, objectify.StringElement)) -
949 -
950 - def test_type_ustr_mul(self): -
951 Element = self.Element - 952 SubElement = self.etree.SubElement - 953 root = Element("{objectified}root") - 954 root.s = _str("test") - 955 - 956 self.assertEqual(_str("test") * 5, root.s * 5) - 957 self.assertEqual(5 * _str("test"), 5 * root.s) - 958 - 959 self.assertRaises(TypeError, operator.mul, root.s, _str("honk")) - 960 self.assertRaises(TypeError, operator.mul, _str("honk"), root.s) -
961 -
962 - def test_type_ustr_add(self): -
963 Element = self.Element - 964 SubElement = self.etree.SubElement - 965 root = Element("{objectified}root") - 966 root.s = _str("test") - 967 - 968 s = _str("toast") - 969 self.assertEqual(_str("test") + s, root.s + s) - 970 self.assertEqual(s + _str("test"), s + root.s) -
971 -
972 - def test_data_element_ustr(self): -
973 value = objectify.DataElement(_str("test")) - 974 self.assertTrue(isinstance(value, objectify.StringElement)) - 975 self.assertEqual(value, _str("test")) -
976 -
978 value = objectify.DataElement("3") - 979 self.assertTrue(isinstance(value, objectify.StringElement)) - 980 self.assertEqual(value, _str("3")) -
981 -
983 value = objectify.DataElement(_str("3.20")) - 984 self.assertTrue(isinstance(value, objectify.StringElement)) - 985 self.assertEqual(value, _str("3.20")) -
986 -
987 - def test_type_int(self): -
988 Element = self.Element - 989 SubElement = self.etree.SubElement - 990 root = Element("{objectified}root") - 991 root.none = 5 - 992 self.assertTrue(isinstance(root.none, objectify.IntElement)) -
993 -
994 - def test_data_element_int(self): -
995 value = objectify.DataElement(5) - 996 self.assertTrue(isinstance(value, objectify.IntElement)) - 997 self.assertEqual(value, 5) -
998 -
999 - def test_data_element_int_hash(self): -
1000 value = objectify.DataElement(123) -1001 self.assertEqual(hash(value), hash(123)) -
1002 -
1003 - def test_type_float(self): -
1004 Element = self.Element -1005 SubElement = self.etree.SubElement -1006 root = Element("{objectified}root") -1007 root.none = 5.5 -1008 self.assertTrue(isinstance(root.none, objectify.FloatElement)) -
1009 -
1010 - def test_data_element_float(self): -
1011 value = objectify.DataElement(5.5) -1012 self.assertTrue(isinstance(value, objectify.FloatElement)) -1013 self.assertEqual(value, 5.5) -
1014 -
1016 value = objectify.DataElement(5.5) -1017 self.assertEqual(hash(value), hash(5.5)) -
1018 -
1019 - def test_type_float_precision(self): -
1020 # test not losing precision by shortened float str() value -1021 # repr(2.305064300557): '2.305064300557' -1022 # str(2.305064300557): '2.30506430056' -1023 # "%57.54f" % 2.305064300557: -1024 # ' 2.305064300556999956626214043353684246540069580078125000' -1025 Element = self.Element -1026 root = Element("{objectified}root") -1027 s = "2.305064300557" -1028 root.f = float(s) -1029 self.assertTrue(isinstance(root.f, objectify.FloatElement)) -1030 self.assertEqual(root.f.text, s) -1031 self.assertEqual(root.f.pyval, float(s)) -
1032 -
1034 # test precision preservation for FloatElement instantiation -1035 s = "2.305064300557" -1036 self.assertEqual(objectify.FloatElement(s), float(s)) -
1037 -
1039 # test consistent FloatElement values for the different instantiation -1040 # possibilities -1041 Element = self.Element -1042 root = Element("{objectified}root") -1043 s = "2.305064300557" -1044 f = float(s) -1045 float_elem = objectify.FloatElement(s) -1046 float_data_elem = objectify.DataElement(f) -1047 root.float_child = float(f) -1048 self.assertTrue(f == float_elem == float_data_elem == root.float_child) -
1049 -
1051 # test not losing precision by shortened float str() value -1052 f = 2305064300557.0 -1053 value = objectify.DataElement(f) -1054 self.assertTrue(isinstance(value, objectify.FloatElement)) -1055 self.assertEqual(value, f) -
1056 -
1058 # test not losing precision by shortened float str() value -1059 f = 2305064300557.0 -1060 value = objectify.DataElement(f) -1061 self.assertEqual(hash(value), hash(f)) -
1062 -
1063 - def test_data_element_xsitypes(self): -
1064 for xsi, objclass in xsitype2objclass.items(): -1065 # 1 is a valid value for all ObjectifiedDataElement classes -1066 pyval = 1 -1067 value = objectify.DataElement(pyval, _xsi=xsi) -1068 self.assertTrue(isinstance(value, objclass), -1069 "DataElement(%s, _xsi='%s') returns %s, expected %s" -1070 % (pyval, xsi, type(value), objclass)) -
1071 -
1073 for xsi, objclass in xsitype2objclass.items(): -1074 # 1 is a valid value for all ObjectifiedDataElement classes -1075 pyval = 1 -1076 value = objectify.DataElement(pyval, _xsi="xsd:%s" % xsi) -1077 self.assertTrue(isinstance(value, objclass), -1078 "DataElement(%s, _xsi='%s') returns %s, expected %s" -1079 % (pyval, xsi, type(value), objclass)) -
1080 -
1082 for xsi, objclass in xsitype2objclass.items(): -1083 # 1 is a valid value for all ObjectifiedDataElement classes -1084 self.assertRaises(ValueError, objectify.DataElement, 1, -1085 _xsi="foo:%s" % xsi) -
1086 -
1087 - def test_data_element_pytypes(self): -
1088 for pytype, objclass in pytype2objclass.items(): -1089 # 1 is a valid value for all ObjectifiedDataElement classes -1090 pyval = 1 -1091 value = objectify.DataElement(pyval, _pytype=pytype) -1092 self.assertTrue(isinstance(value, objclass), -1093 "DataElement(%s, _pytype='%s') returns %s, expected %s" -1094 % (pyval, pytype, type(value), objclass)) -
1095 -
1097 pyval = 1 -1098 pytype = "NoneType" -1099 objclass = objectify.NoneElement -1100 value = objectify.DataElement(pyval, _pytype=pytype) -1101 self.assertTrue(isinstance(value, objclass), -1102 "DataElement(%s, _pytype='%s') returns %s, expected %s" -1103 % (pyval, pytype, type(value), objclass)) -1104 self.assertEqual(value.text, None) -1105 self.assertEqual(value.pyval, None) -
1106 -
1108 # pre-2.0 lxml called NoneElement "none" -1109 pyval = 1 -1110 pytype = "none" -1111 objclass = objectify.NoneElement -1112 value = objectify.DataElement(pyval, _pytype=pytype) -1113 self.assertTrue(isinstance(value, objclass), -1114 "DataElement(%s, _pytype='%s') returns %s, expected %s" -1115 % (pyval, pytype, type(value), objclass)) -1116 self.assertEqual(value.text, None) -1117 self.assertEqual(value.pyval, None) -
1118 -
1119 - def test_type_unregistered(self): -
1120 Element = self.Element -1121 SubElement = self.etree.SubElement -1122 class MyFloat(float): -1123 pass -
1124 root = Element("{objectified}root") -1125 root.myfloat = MyFloat(5.5) -1126 self.assertTrue(isinstance(root.myfloat, objectify.FloatElement)) -1127 self.assertEqual(root.myfloat.get(objectify.PYTYPE_ATTRIBUTE), None) -
1128 -
1130 class MyFloat(float): -1131 pass -
1132 value = objectify.DataElement(MyFloat(5.5)) -1133 self.assertTrue(isinstance(value, objectify.FloatElement)) -1134 self.assertEqual(value, 5.5) -1135 self.assertEqual(value.get(objectify.PYTYPE_ATTRIBUTE), None) -1136 -
1137 - def test_schema_types(self): -
1138 XML = self.XML -1139 root = XML('''\ -1140 <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> -1141 <b xsi:type="boolean">true</b> -1142 <b xsi:type="boolean">false</b> -1143 <b xsi:type="boolean">1</b> -1144 <b xsi:type="boolean">0</b> -1145 -1146 <f xsi:type="float">5</f> -1147 <f xsi:type="double">5</f> -1148 -1149 <s xsi:type="string">5</s> -1150 <s xsi:type="normalizedString">5</s> -1151 <s xsi:type="token">5</s> -1152 <s xsi:type="language">5</s> -1153 <s xsi:type="Name">5</s> -1154 <s xsi:type="NCName">5</s> -1155 <s xsi:type="ID">5</s> -1156 <s xsi:type="IDREF">5</s> -1157 <s xsi:type="ENTITY">5</s> -1158 <s xsi:type="NMTOKEN">5</s> -1159 -1160 <l xsi:type="integer">5</l> -1161 <l xsi:type="nonPositiveInteger">5</l> -1162 <l xsi:type="negativeInteger">5</l> -1163 <l xsi:type="long">5</l> -1164 <l xsi:type="nonNegativeInteger">5</l> -1165 <l xsi:type="unsignedLong">5</l> -1166 <l xsi:type="unsignedInt">5</l> -1167 <l xsi:type="positiveInteger">5</l> -1168 -1169 <i xsi:type="int">5</i> -1170 <i xsi:type="short">5</i> -1171 <i xsi:type="byte">5</i> -1172 <i xsi:type="unsignedShort">5</i> -1173 <i xsi:type="unsignedByte">5</i> -1174 -1175 <n xsi:nil="true"/> -1176 </root> -1177 ''') -1178 -1179 for b in root.b: -1180 self.assertTrue(isinstance(b, objectify.BoolElement)) -1181 self.assertEqual(True, root.b[0]) -1182 self.assertEqual(False, root.b[1]) -1183 self.assertEqual(True, root.b[2]) -1184 self.assertEqual(False, root.b[3]) -1185 -1186 for f in root.f: -1187 self.assertTrue(isinstance(f, objectify.FloatElement)) -1188 self.assertEqual(5, f) -1189 -1190 for s in root.s: -1191 self.assertTrue(isinstance(s, objectify.StringElement)) -1192 self.assertEqual("5", s) -1193 -1194 for i in root.i: -1195 self.assertTrue(isinstance(i, objectify.IntElement)) -1196 self.assertEqual(5, i) -1197 -1198 for l in root.l: -1199 self.assertTrue(isinstance(l, objectify.IntElement)) -1200 self.assertEqual(5, i) -1201 -1202 self.assertTrue(isinstance(root.n, objectify.NoneElement)) -1203 self.assertEqual(None, root.n) -
1204 -
1205 - def test_schema_types_prefixed(self): -
1206 XML = self.XML -1207 root = XML('''\ -1208 <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -1209 xmlns:xsd="http://www.w3.org/2001/XMLSchema"> -1210 <b xsi:type="xsd:boolean">true</b> -1211 <b xsi:type="xsd:boolean">false</b> -1212 <b xsi:type="xsd:boolean">1</b> -1213 <b xsi:type="xsd:boolean">0</b> -1214 -1215 <f xsi:type="xsd:float">5</f> -1216 <f xsi:type="xsd:double">5</f> -1217 -1218 <s xsi:type="xsd:string">5</s> -1219 <s xsi:type="xsd:normalizedString">5</s> -1220 <s xsi:type="xsd:token">5</s> -1221 <s xsi:type="xsd:language">5</s> -1222 <s xsi:type="xsd:Name">5</s> -1223 <s xsi:type="xsd:NCName">5</s> -1224 <s xsi:type="xsd:ID">5</s> -1225 <s xsi:type="xsd:IDREF">5</s> -1226 <s xsi:type="xsd:ENTITY">5</s> -1227 <s xsi:type="xsd:NMTOKEN">5</s> -1228 -1229 <l xsi:type="xsd:integer">5</l> -1230 <l xsi:type="xsd:nonPositiveInteger">5</l> -1231 <l xsi:type="xsd:negativeInteger">5</l> -1232 <l xsi:type="xsd:long">5</l> -1233 <l xsi:type="xsd:nonNegativeInteger">5</l> -1234 <l xsi:type="xsd:unsignedLong">5</l> -1235 <l xsi:type="xsd:unsignedInt">5</l> -1236 <l xsi:type="xsd:positiveInteger">5</l> -1237 -1238 <i xsi:type="xsd:int">5</i> -1239 <i xsi:type="xsd:short">5</i> -1240 <i xsi:type="xsd:byte">5</i> -1241 <i xsi:type="xsd:unsignedShort">5</i> -1242 <i xsi:type="xsd:unsignedByte">5</i> -1243 -1244 <n xsi:nil="true"/> -1245 </root> -1246 ''') -1247 -1248 for b in root.b: -1249 self.assertTrue(isinstance(b, objectify.BoolElement)) -1250 self.assertEqual(True, root.b[0]) -1251 self.assertEqual(False, root.b[1]) -1252 self.assertEqual(True, root.b[2]) -1253 self.assertEqual(False, root.b[3]) -1254 -1255 for f in root.f: -1256 self.assertTrue(isinstance(f, objectify.FloatElement)) -1257 self.assertEqual(5, f) -1258 -1259 for s in root.s: -1260 self.assertTrue(isinstance(s, objectify.StringElement)) -1261 self.assertEqual("5", s) -1262 -1263 for i in root.i: -1264 self.assertTrue(isinstance(i, objectify.IntElement)) -1265 self.assertEqual(5, i) -1266 -1267 for l in root.l: -1268 self.assertTrue(isinstance(l, objectify.IntElement)) -1269 self.assertEqual(5, l) -1270 -1271 self.assertTrue(isinstance(root.n, objectify.NoneElement)) -1272 self.assertEqual(None, root.n) -
1273 -
1274 - def test_type_str_sequence(self): -
1275 XML = self.XML -1276 root = XML(_bytes('<root><b>why</b><b>try</b></root>')) -1277 strs = [ str(s) for s in root.b ] -1278 self.assertEqual(["why", "try"], -1279 strs) -
1280 -
1281 - def test_type_str_cmp(self): -
1282 XML = self.XML -1283 root = XML(_bytes('<root><b>test</b><b>taste</b><b></b><b/></root>')) -1284 self.assertFalse(root.b[0] < root.b[1]) -1285 self.assertFalse(root.b[0] <= root.b[1]) -1286 self.assertFalse(root.b[0] == root.b[1]) -1287 -1288 self.assertTrue(root.b[0] != root.b[1]) -1289 self.assertTrue(root.b[0] >= root.b[1]) -1290 self.assertTrue(root.b[0] > root.b[1]) -1291 -1292 self.assertEqual(root.b[0], "test") -1293 self.assertEqual("test", root.b[0]) -1294 -1295 self.assertEqual("", root.b[2]) -1296 self.assertEqual(root.b[2], "") -1297 self.assertEqual("", root.b[3]) -1298 self.assertEqual(root.b[3], "") -1299 self.assertEqual(root.b[2], root.b[3]) -1300 -1301 root.b = "test" -1302 self.assertTrue(root.b) -1303 root.b = "" -1304 self.assertFalse(root.b) -1305 self.assertEqual(root.b, "") -1306 self.assertEqual("", root.b) -
1307 -
1308 - def test_type_int_cmp(self): -
1309 XML = self.XML -1310 root = XML(_bytes('<root><b>5</b><b>6</b></root>')) -1311 self.assertTrue(root.b[0] < root.b[1]) -1312 self.assertTrue(root.b[0] <= root.b[1]) -1313 self.assertTrue(root.b[0] != root.b[1]) -1314 -1315 self.assertFalse(root.b[0] == root.b[1]) -1316 self.assertFalse(root.b[0] >= root.b[1]) -1317 self.assertFalse(root.b[0] > root.b[1]) -1318 -1319 self.assertEqual(root.b[0], 5) -1320 self.assertEqual(5, root.b[0]) -1321 self.assertNotEqual(root.b[0], "5") -1322 -1323 root.b = 5 -1324 self.assertTrue(root.b) -1325 root.b = 0 -1326 self.assertFalse(root.b) -
1327 -1328 # float + long share the NumberElement implementation with int -1329 -
1330 - def test_type_bool_cmp(self): -
1331 XML = self.XML -1332 root = XML(_bytes('<root><b>false</b><b>true</b></root>')) -1333 self.assertTrue(root.b[0] < root.b[1]) -1334 self.assertTrue(root.b[0] <= root.b[1]) -1335 self.assertTrue(root.b[0] != root.b[1]) -1336 -1337 self.assertFalse(root.b[0] == root.b[1]) -1338 self.assertFalse(root.b[0] >= root.b[1]) -1339 self.assertFalse(root.b[0] > root.b[1]) -1340 -1341 self.assertFalse(root.b[0]) -1342 self.assertTrue(root.b[1]) -1343 -1344 self.assertEqual(root.b[0], False) -1345 self.assertEqual(False, root.b[0]) -1346 self.assertTrue(root.b[0] < 5) -1347 self.assertTrue(5 > root.b[0]) -1348 -1349 root.b = True -1350 self.assertTrue(root.b) -1351 root.b = False -1352 self.assertFalse(root.b) -
1353 -
1354 - def test_type_none_cmp(self): -
1355 XML = self.XML -1356 root = XML(_bytes(""" -1357 <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> -1358 <b xsi:nil="true"></b><b xsi:nil="true"/> -1359 </root>""")) -1360 self.assertTrue(root.b[0] == root.b[1]) -1361 self.assertFalse(root.b[0]) -1362 self.assertEqual(root.b[0], None) -1363 self.assertEqual(None, root.b[0]) -
1364 -1365 # doesn't work in Py3: -1366 -1367 #for comparison in ["abc", 5, 7.3, True, [], ()]: -1368 # none = root.b[1] -1369 # self.assertTrue(none < comparison, "%s (%s) should be < %s" % -1370 # (none, type(none), comparison) ) -1371 # self.assertTrue(comparison > none, "%s should be > %s (%s)" % -1372 # (comparison, none, type(none)) ) -1373 -
1374 - def test_dataelement_xsi(self): -
1375 el = objectify.DataElement(1, _xsi="string") -1376 self.assertEqual( -1377 el.get(XML_SCHEMA_INSTANCE_TYPE_ATTR), -1378 'xsd:string') -
1379 -
1380 - def test_dataelement_xsi_nsmap(self): -
1381 el = objectify.DataElement(1, _xsi="string", -1382 nsmap={'schema': XML_SCHEMA_NS}) -1383 self.assertEqual( -1384 el.get(XML_SCHEMA_INSTANCE_TYPE_ATTR), -1385 'schema:string') -
1386 -
1388 self.assertRaises(ValueError, objectify.DataElement, 1, -1389 _xsi="foo:string") -
1390 -
1391 - def test_pytype_annotation(self): -
1392 XML = self.XML -1393 root = XML(_bytes('''\ -1394 <a xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -1395 xmlns:py="http://codespeak.net/lxml/objectify/pytype"> -1396 <b>5</b> -1397 <b>test</b> -1398 <c>1.1</c> -1399 <c>\uF8D2</c> -1400 <x>true</x> -1401 <n xsi:nil="true" /> -1402 <n></n> -1403 <b xsi:type="double">5</b> -1404 <b xsi:type="float">5</b> -1405 <s xsi:type="string">23</s> -1406 <s py:pytype="str">42</s> -1407 <f py:pytype="float">300</f> -1408 <l py:pytype="long">2</l> -1409 <t py:pytype="TREE"></t> -1410 </a> -1411 ''')) -1412 objectify.annotate(root) -1413 -1414 child_types = [ c.get(objectify.PYTYPE_ATTRIBUTE) -1415 for c in root.iterchildren() ] -1416 self.assertEqual("int", child_types[ 0]) -1417 self.assertEqual("str", child_types[ 1]) -1418 self.assertEqual("float", child_types[ 2]) -1419 self.assertEqual("str", child_types[ 3]) -1420 self.assertEqual("bool", child_types[ 4]) -1421 self.assertEqual("NoneType", child_types[ 5]) -1422 self.assertEqual(None, child_types[ 6]) -1423 self.assertEqual("float", child_types[ 7]) -1424 self.assertEqual("float", child_types[ 8]) -1425 self.assertEqual("str", child_types[ 9]) -1426 self.assertEqual("int", child_types[10]) -1427 self.assertEqual("int", child_types[11]) -1428 self.assertEqual("int", child_types[12]) -1429 self.assertEqual(None, child_types[13]) -1430 -1431 self.assertEqual("true", root.n.get(XML_SCHEMA_NIL_ATTR)) -
1432 -
1434 XML = self.XML -1435 root = XML(_bytes('''\ -1436 <a xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -1437 xmlns:py="http://codespeak.net/lxml/objectify/pytype"> -1438 <n></n> -1439 </a> -1440 ''')) -1441 objectify.annotate(root) -1442 -1443 child_types = [ c.get(objectify.PYTYPE_ATTRIBUTE) -1444 for c in root.iterchildren() ] -1445 self.assertEqual(None, child_types[0]) -1446 -1447 objectify.annotate(root, empty_pytype="str") -1448 -1449 child_types = [ c.get(objectify.PYTYPE_ATTRIBUTE) -1450 for c in root.iterchildren() ] -1451 self.assertEqual("str", child_types[0]) -
1452 -
1454 XML = self.XML -1455 root = XML(_bytes('''\ -1456 <a xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -1457 xmlns:py="http://codespeak.net/lxml/objectify/pytype"> -1458 <b>5</b> -1459 <b>test</b> -1460 <c>1.1</c> -1461 <c>\uF8D2</c> -1462 <x>true</x> -1463 <n xsi:nil="true" /> -1464 <n></n> -1465 <b xsi:type="double">5</b> -1466 <b xsi:type="float">5</b> -1467 <s xsi:type="string">23</s> -1468 <s py:pytype="str">42</s> -1469 <f py:pytype="float">300</f> -1470 <l py:pytype="long">2</l> -1471 <t py:pytype="TREE"></t> -1472 </a> -1473 ''')) -1474 objectify.annotate(root, ignore_old=False) -1475 -1476 child_types = [ c.get(objectify.PYTYPE_ATTRIBUTE) -1477 for c in root.iterchildren() ] -1478 self.assertEqual("int", child_types[ 0]) -1479 self.assertEqual("str", child_types[ 1]) -1480 self.assertEqual("float", child_types[ 2]) -1481 self.assertEqual("str", child_types[ 3]) -1482 self.assertEqual("bool", child_types[ 4]) -1483 self.assertEqual("NoneType", child_types[ 5]) -1484 self.assertEqual(None, child_types[ 6]) -1485 self.assertEqual("float", child_types[ 7]) -1486 self.assertEqual("float", child_types[ 8]) -1487 self.assertEqual("str", child_types[ 9]) -1488 self.assertEqual("str", child_types[10]) -1489 self.assertEqual("float", child_types[11]) -1490 self.assertEqual("int", child_types[12]) -1491 self.assertEqual(TREE_PYTYPE, child_types[13]) -1492 -1493 self.assertEqual("true", root.n.get(XML_SCHEMA_NIL_ATTR)) -
1494 -
1496 XML = self.XML -1497 root = XML(_bytes('''\ -1498 <a xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -1499 xmlns:py="http://codespeak.net/lxml/objectify/pytype"> -1500 <b>5</b> -1501 <b>test</b> -1502 <c>1.1</c> -1503 <c>\uF8D2</c> -1504 <x>true</x> -1505 <n xsi:nil="true" /> -1506 <n></n> -1507 <b xsi:type="double">5</b> -1508 <b xsi:type="float">5</b> -1509 <s xsi:type="string">23</s> -1510 <s py:pytype="str">42</s> -1511 <f py:pytype="float">300</f> -1512 <l py:pytype="long">2</l> -1513 <t py:pytype="TREE"></t> -1514 </a> -1515 ''')) -1516 objectify.annotate(root, ignore_old=False, ignore_xsi=False, -1517 annotate_xsi=1, annotate_pytype=1) -1518 -1519 # check py annotations -1520 child_types = [ c.get(objectify.PYTYPE_ATTRIBUTE) -1521 for c in root.iterchildren() ] -1522 self.assertEqual("int", child_types[ 0]) -1523 self.assertEqual("str", child_types[ 1]) -1524 self.assertEqual("float", child_types[ 2]) -1525 self.assertEqual("str", child_types[ 3]) -1526 self.assertEqual("bool", child_types[ 4]) -1527 self.assertEqual("NoneType", child_types[ 5]) -1528 self.assertEqual(None, child_types[ 6]) -1529 self.assertEqual("float", child_types[ 7]) -1530 self.assertEqual("float", child_types[ 8]) -1531 self.assertEqual("str", child_types[ 9]) -1532 self.assertEqual("str", child_types[10]) -1533 self.assertEqual("float", child_types[11]) -1534 self.assertEqual("int", child_types[12]) -1535 self.assertEqual(TREE_PYTYPE, child_types[13]) -1536 -1537 self.assertEqual("true", root.n.get(XML_SCHEMA_NIL_ATTR)) -1538 -1539 child_xsitypes = [ c.get(XML_SCHEMA_INSTANCE_TYPE_ATTR) -1540 for c in root.iterchildren() ] -1541 -1542 # check xsi annotations -1543 child_types = [ c.get(XML_SCHEMA_INSTANCE_TYPE_ATTR) -1544 for c in root.iterchildren() ] -1545 self.assertEqual("xsd:integer", child_types[ 0]) -1546 self.assertEqual("xsd:string", child_types[ 1]) -1547 self.assertEqual("xsd:double", child_types[ 2]) -1548 self.assertEqual("xsd:string", child_types[ 3]) -1549 self.assertEqual("xsd:boolean", child_types[ 4]) -1550 self.assertEqual(None, child_types[ 5]) -1551 self.assertEqual(None, child_types[ 6]) -1552 self.assertEqual("xsd:double", child_types[ 7]) -1553 self.assertEqual("xsd:float", child_types[ 8]) -1554 self.assertEqual("xsd:string", child_types[ 9]) -1555 self.assertEqual("xsd:string", child_types[10]) -1556 self.assertEqual("xsd:double", child_types[11]) -1557 self.assertEqual("xsd:integer", child_types[12]) -1558 self.assertEqual(None, child_types[13]) -1559 -1560 self.assertEqual("true", root.n.get(XML_SCHEMA_NIL_ATTR)) -
1561 -
1562 - def test_xsiannotate_use_old(self): -
1563 XML = self.XML -1564 root = XML(_bytes('''\ -1565 <a xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -1566 xmlns:py="http://codespeak.net/lxml/objectify/pytype"> -1567 <b>5</b> -1568 <b>test</b> -1569 <c>1.1</c> -1570 <c>\uF8D2</c> -1571 <x>true</x> -1572 <n xsi:nil="true" /> -1573 <n></n> -1574 <b xsi:type="double">5</b> -1575 <b xsi:type="float">5</b> -1576 <s xsi:type="string">23</s> -1577 <s py:pytype="str">42</s> -1578 <f py:pytype="float">300</f> -1579 <l py:pytype="long">2</l> -1580 <t py:pytype="TREE"></t> -1581 </a> -1582 ''')) -1583 objectify.xsiannotate(root, ignore_old=False) -1584 -1585 child_types = [ c.get(XML_SCHEMA_INSTANCE_TYPE_ATTR) -1586 for c in root.iterchildren() ] -1587 self.assertEqual("xsd:integer", child_types[ 0]) -1588 self.assertEqual("xsd:string", child_types[ 1]) -1589 self.assertEqual("xsd:double", child_types[ 2]) -1590 self.assertEqual("xsd:string", child_types[ 3]) -1591 self.assertEqual("xsd:boolean", child_types[ 4]) -1592 self.assertEqual(None, child_types[ 5]) -1593 self.assertEqual(None, child_types[ 6]) -1594 self.assertEqual("xsd:double", child_types[ 7]) -1595 self.assertEqual("xsd:float", child_types[ 8]) -1596 self.assertEqual("xsd:string", child_types[ 9]) -1597 self.assertEqual("xsd:string", child_types[10]) -1598 self.assertEqual("xsd:double", child_types[11]) -1599 self.assertEqual("xsd:integer", child_types[12]) -1600 self.assertEqual(None, child_types[13]) -
1601 -
1602 - def test_pyannotate_ignore_old(self): -
1603 XML = self.XML -1604 root = XML(_bytes('''\ -1605 <a xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -1606 xmlns:py="http://codespeak.net/lxml/objectify/pytype"> -1607 <b>5</b> -1608 <b>test</b> -1609 <c>1.1</c> -1610 <c>\uF8D2</c> -1611 <x>true</x> -1612 <n xsi:nil="true" /> -1613 <n></n> -1614 <b xsi:type="double">5</b> -1615 <b xsi:type="float">5</b> -1616 <s xsi:type="string">23</s> -1617 <s py:pytype="str">42</s> -1618 <f py:pytype="float">300</f> -1619 <l py:pytype="long">2</l> -1620 <t py:pytype="TREE"></t> -1621 </a> -1622 ''')) -1623 objectify.pyannotate(root, ignore_old=True) -1624 -1625 child_types = [ c.get(objectify.PYTYPE_ATTRIBUTE) -1626 for c in root.iterchildren() ] -1627 self.assertEqual("int", child_types[ 0]) -1628 self.assertEqual("str", child_types[ 1]) -1629 self.assertEqual("float", child_types[ 2]) -1630 self.assertEqual("str", child_types[ 3]) -1631 self.assertEqual("bool", child_types[ 4]) -1632 self.assertEqual("NoneType", child_types[ 5]) -1633 self.assertEqual(None, child_types[ 6]) -1634 self.assertEqual("float", child_types[ 7]) -1635 self.assertEqual("float", child_types[ 8]) -1636 self.assertEqual("str", child_types[ 9]) -1637 self.assertEqual("int", child_types[10]) -1638 self.assertEqual("int", child_types[11]) -1639 self.assertEqual("int", child_types[12]) -1640 self.assertEqual(None, child_types[13]) -1641 -1642 self.assertEqual("true", root.n.get(XML_SCHEMA_NIL_ATTR)) -
1643 -
1644 - def test_pyannotate_empty(self): -
1645 XML = self.XML -1646 root = XML('''\ -1647 <a xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -1648 xmlns:py="http://codespeak.net/lxml/objectify/pytype"> -1649 <n></n> -1650 </a> -1651 ''') -1652 objectify.pyannotate(root) -1653 -1654 child_types = [ c.get(objectify.PYTYPE_ATTRIBUTE) -1655 for c in root.iterchildren() ] -1656 self.assertEqual(None, child_types[0]) -1657 -1658 objectify.annotate(root, empty_pytype="str") -1659 -1660 child_types = [ c.get(objectify.PYTYPE_ATTRIBUTE) -1661 for c in root.iterchildren() ] -1662 self.assertEqual("str", child_types[0]) -
1663 -
1664 - def test_pyannotate_use_old(self): -
1665 XML = self.XML -1666 root = XML('''\ -1667 <a xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -1668 xmlns:py="http://codespeak.net/lxml/objectify/pytype"> -1669 <b>5</b> -1670 <b>test</b> -1671 <c>1.1</c> -1672 <c>\uF8D2</c> -1673 <x>true</x> -1674 <n xsi:nil="true" /> -1675 <n></n> -1676 <b xsi:type="double">5</b> -1677 <b xsi:type="float">5</b> -1678 <s xsi:type="string">23</s> -1679 <s py:pytype="str">42</s> -1680 <f py:pytype="float">300</f> -1681 <l py:pytype="long">2</l> -1682 <t py:pytype="TREE"></t> -1683 </a> -1684 ''') -1685 objectify.pyannotate(root) -1686 -1687 child_types = [ c.get(objectify.PYTYPE_ATTRIBUTE) -1688 for c in root.iterchildren() ] -1689 self.assertEqual("int", child_types[ 0]) -1690 self.assertEqual("str", child_types[ 1]) -1691 self.assertEqual("float", child_types[ 2]) -1692 self.assertEqual("str", child_types[ 3]) -1693 self.assertEqual("bool", child_types[ 4]) -1694 self.assertEqual("NoneType", child_types[ 5]) -1695 self.assertEqual(None, child_types[ 6]) -1696 self.assertEqual("float", child_types[ 7]) -1697 self.assertEqual("float", child_types[ 8]) -1698 self.assertEqual("str", child_types[ 9]) -1699 self.assertEqual("str", child_types[10]) -1700 self.assertEqual("float", child_types[11]) -1701 self.assertEqual("int", child_types[12]) -1702 self.assertEqual(TREE_PYTYPE, child_types[13]) -1703 -1704 self.assertEqual("true", root.n.get(XML_SCHEMA_NIL_ATTR)) -
1705 -
1706 - def test_xsiannotate_ignore_old(self): -
1707 XML = self.XML -1708 root = XML(_bytes('''\ -1709 <a xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -1710 xmlns:py="http://codespeak.net/lxml/objectify/pytype"> -1711 <b>5</b> -1712 <b>test</b> -1713 <c>1.1</c> -1714 <c>\uF8D2</c> -1715 <x>true</x> -1716 <n xsi:nil="true" /> -1717 <n></n> -1718 <b xsi:type="double">5</b> -1719 <b xsi:type="float">5</b> -1720 <s xsi:type="string">23</s> -1721 <s py:pytype="str">42</s> -1722 <f py:pytype="float">300</f> -1723 <l py:pytype="long">2</l> -1724 <t py:pytype="TREE"></t> -1725 </a> -1726 ''')) -1727 objectify.xsiannotate(root, ignore_old=True) -1728 -1729 child_types = [ c.get(XML_SCHEMA_INSTANCE_TYPE_ATTR) -1730 for c in root.iterchildren() ] -1731 self.assertEqual("xsd:integer", child_types[ 0]) -1732 self.assertEqual("xsd:string", child_types[ 1]) -1733 self.assertEqual("xsd:double", child_types[ 2]) -1734 self.assertEqual("xsd:string", child_types[ 3]) -1735 self.assertEqual("xsd:boolean", child_types[ 4]) -1736 self.assertEqual(None, child_types[ 5]) -1737 self.assertEqual(None, child_types[ 6]) -1738 self.assertEqual("xsd:integer", child_types[ 7]) -1739 self.assertEqual("xsd:integer", child_types[ 8]) -1740 self.assertEqual("xsd:integer", child_types[ 9]) -1741 self.assertEqual("xsd:string", child_types[10]) -1742 self.assertEqual("xsd:double", child_types[11]) -1743 self.assertEqual("xsd:integer", child_types[12]) -1744 self.assertEqual(None, child_types[13]) -1745 -1746 self.assertEqual("true", root.n.get(XML_SCHEMA_NIL_ATTR)) -
1747 -
1748 - def test_deannotate(self): -
1749 XML = self.XML -1750 root = XML(_bytes('''\ -1751 <a xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -1752 xmlns:py="http://codespeak.net/lxml/objectify/pytype"> -1753 <b>5</b> -1754 <b>test</b> -1755 <c>1.1</c> -1756 <c>\uF8D2</c> -1757 <x>true</x> -1758 <n xsi:nil="true" /> -1759 <n></n> -1760 <b xsi:type="double">5</b> -1761 <b xsi:type="float">5</b> -1762 <s xsi:type="string">23</s> -1763 <s py:pytype="str">42</s> -1764 <f py:pytype="float">300</f> -1765 <l py:pytype="long">2</l> -1766 <t py:pytype="TREE"></t> -1767 </a> -1768 ''')) -1769 objectify.deannotate(root) -1770 -1771 for c in root.getiterator(): -1772 self.assertEqual(None, c.get(XML_SCHEMA_INSTANCE_TYPE_ATTR)) -1773 self.assertEqual(None, c.get(objectify.PYTYPE_ATTRIBUTE)) -1774 -1775 self.assertEqual("true", root.n.get(XML_SCHEMA_NIL_ATTR)) -
1776 -
1777 - def test_xsinil_deannotate(self): -
1778 XML = self.XML -1779 root = XML(_bytes('''\ -1780 <a xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -1781 xmlns:py="http://codespeak.net/lxml/objectify/pytype"> -1782 <b>5</b> -1783 <b>test</b> -1784 <c>1.1</c> -1785 <c>\uF8D2</c> -1786 <x>true</x> -1787 <n xsi:nil="true" /> -1788 <n></n> -1789 <b xsi:type="double">5</b> -1790 <b xsi:type="float">5</b> -1791 <s xsi:type="string">23</s> -1792 <s py:pytype="str">42</s> -1793 <f py:pytype="float">300</f> -1794 <l py:pytype="long">2</l> -1795 <t py:pytype="TREE"></t> -1796 </a> -1797 ''')) -1798 objectify.annotate( -1799 root, ignore_old=False, ignore_xsi=False, annotate_xsi=True, -1800 empty_pytype='str', empty_type='string') -1801 objectify.deannotate(root, pytype=False, xsi=False, xsi_nil=True) -1802 -1803 child_types = [ c.get(XML_SCHEMA_INSTANCE_TYPE_ATTR) -1804 for c in root.iterchildren() ] -1805 self.assertEqual("xsd:integer", child_types[ 0]) -1806 self.assertEqual("xsd:string", child_types[ 1]) -1807 self.assertEqual("xsd:double", child_types[ 2]) -1808 self.assertEqual("xsd:string", child_types[ 3]) -1809 self.assertEqual("xsd:boolean", child_types[ 4]) -1810 self.assertEqual(None, child_types[ 5]) -1811 self.assertEqual("xsd:string", child_types[ 6]) -1812 self.assertEqual("xsd:double", child_types[ 7]) -1813 self.assertEqual("xsd:float", child_types[ 8]) -1814 self.assertEqual("xsd:string", child_types[ 9]) -1815 self.assertEqual("xsd:string", child_types[10]) -1816 self.assertEqual("xsd:double", child_types[11]) -1817 self.assertEqual("xsd:integer", child_types[12]) -1818 self.assertEqual(None, child_types[13]) -1819 -1820 self.assertEqual(None, root.n.get(XML_SCHEMA_NIL_ATTR)) -1821 -1822 for c in root.iterchildren(): -1823 self.assertNotEqual(None, c.get(objectify.PYTYPE_ATTRIBUTE)) -1824 # these have no equivalent in xsi:type -1825 if (c.get(objectify.PYTYPE_ATTRIBUTE) not in [TREE_PYTYPE, -1826 "NoneType"]): -1827 self.assertNotEqual( -1828 None, c.get(XML_SCHEMA_INSTANCE_TYPE_ATTR)) -
1829 -
1830 - def test_xsitype_deannotate(self): -
1831 XML = self.XML -1832 root = XML(_bytes('''\ -1833 <a xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -1834 xmlns:py="http://codespeak.net/lxml/objectify/pytype" -1835 xmlns:xsd="http://www.w3.org/2001/XMLSchema"> -1836 <b>5</b> -1837 <b>test</b> -1838 <c>1.1</c> -1839 <c>\uF8D2</c> -1840 <x>true</x> -1841 <n xsi:nil="true" /> -1842 <n></n> -1843 <b xsi:type="xsd:double">5</b> -1844 <b xsi:type="xsd:float">5</b> -1845 <s xsi:type="xsd:string">23</s> -1846 <s py:pytype="str">42</s> -1847 <f py:pytype="float">300</f> -1848 <l py:pytype="long">2</l> -1849 <t py:pytype="TREE"></t> -1850 </a> -1851 ''')) -1852 objectify.annotate(root) -1853 objectify.deannotate(root, pytype=False) -1854 -1855 child_types = [ c.get(objectify.PYTYPE_ATTRIBUTE) -1856 for c in root.iterchildren() ] -1857 self.assertEqual("int", child_types[ 0]) -1858 self.assertEqual("str", child_types[ 1]) -1859 self.assertEqual("float", child_types[ 2]) -1860 self.assertEqual("str", child_types[ 3]) -1861 self.assertEqual("bool", child_types[ 4]) -1862 self.assertEqual("NoneType", child_types[ 5]) -1863 self.assertEqual(None, child_types[ 6]) -1864 self.assertEqual("float", child_types[ 7]) -1865 self.assertEqual("float", child_types[ 8]) -1866 self.assertEqual("str", child_types[ 9]) -1867 self.assertEqual("int", child_types[10]) -1868 self.assertEqual("int", child_types[11]) -1869 self.assertEqual("int", child_types[12]) -1870 self.assertEqual(None, child_types[13]) -1871 -1872 self.assertEqual("true", root.n.get(XML_SCHEMA_NIL_ATTR)) -1873 -1874 for c in root.getiterator(): -1875 self.assertEqual(None, c.get(XML_SCHEMA_INSTANCE_TYPE_ATTR)) -
1876 -
1877 - def test_pytype_deannotate(self): -
1878 XML = self.XML -1879 root = XML(_bytes('''\ -1880 <a xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -1881 xmlns:py="http://codespeak.net/lxml/objectify/pytype" -1882 xmlns:xsd="http://www.w3.org/2001/XMLSchema"> -1883 <b xsi:type="xsd:int">5</b> -1884 <b xsi:type="xsd:string">test</b> -1885 <c xsi:type="xsd:float">1.1</c> -1886 <c xsi:type="xsd:string">\uF8D2</c> -1887 <x xsi:type="xsd:boolean">true</x> -1888 <n xsi:nil="true" /> -1889 <n></n> -1890 <b xsi:type="xsd:double">5</b> -1891 <b xsi:type="xsd:float">5</b> -1892 <s xsi:type="xsd:string">23</s> -1893 <s xsi:type="xsd:string">42</s> -1894 <f xsi:type="xsd:float">300</f> -1895 <l xsi:type="xsd:long">2</l> -1896 <t py:pytype="TREE"></t> -1897 </a> -1898 ''')) -1899 objectify.annotate(root) -1900 objectify.deannotate(root, xsi=False) -1901 -1902 child_types = [ c.get(XML_SCHEMA_INSTANCE_TYPE_ATTR) -1903 for c in root.iterchildren() ] -1904 self.assertEqual("xsd:int", child_types[ 0]) -1905 self.assertEqual("xsd:string", child_types[ 1]) -1906 self.assertEqual("xsd:float", child_types[ 2]) -1907 self.assertEqual("xsd:string", child_types[ 3]) -1908 self.assertEqual("xsd:boolean", child_types[ 4]) -1909 self.assertEqual(None, child_types[ 5]) -1910 self.assertEqual(None, child_types[ 6]) -1911 self.assertEqual("xsd:double", child_types[ 7]) -1912 self.assertEqual("xsd:float", child_types[ 8]) -1913 self.assertEqual("xsd:string", child_types[ 9]) -1914 self.assertEqual("xsd:string", child_types[10]) -1915 self.assertEqual("xsd:float", child_types[11]) -1916 self.assertEqual("xsd:long", child_types[12]) -1917 self.assertEqual(None, child_types[13]) -1918 -1919 self.assertEqual("true", root.n.get(XML_SCHEMA_NIL_ATTR)) -1920 -1921 for c in root.getiterator(): -1922 self.assertEqual(None, c.get(objectify.PYTYPE_ATTRIBUTE)) -
1923 -
1925 XML = self.XML -1926 -1927 xml = _bytes('''\ -1928 <a xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> -1929 <b>5</b> -1930 <b>test</b> -1931 <c>1.1</c> -1932 <c>\uF8D2</c> -1933 <x>true</x> -1934 <n xsi:nil="true" /> -1935 <n></n> -1936 <b xsi:type="double">5</b> -1937 </a> -1938 ''') -1939 -1940 pytype_ns, pytype_name = objectify.PYTYPE_ATTRIBUTE[1:].split('}') -1941 objectify.set_pytype_attribute_tag("{TEST}test") -1942 -1943 root = XML(xml) -1944 objectify.annotate(root) -1945 -1946 attribs = root.xpath("//@py:%s" % pytype_name, -1947 namespaces={"py" : pytype_ns}) -1948 self.assertEqual(0, len(attribs)) -1949 attribs = root.xpath("//@py:test", -1950 namespaces={"py" : "TEST"}) -1951 self.assertEqual(7, len(attribs)) -1952 -1953 objectify.set_pytype_attribute_tag() -1954 pytype_ns, pytype_name = objectify.PYTYPE_ATTRIBUTE[1:].split('}') -1955 -1956 self.assertNotEqual("test", pytype_ns.lower()) -1957 self.assertNotEqual("test", pytype_name.lower()) -1958 -1959 root = XML(xml) -1960 attribs = root.xpath("//@py:%s" % pytype_name, -1961 namespaces={"py" : pytype_ns}) -1962 self.assertEqual(0, len(attribs)) -1963 -1964 objectify.annotate(root) -1965 attribs = root.xpath("//@py:%s" % pytype_name, -1966 namespaces={"py" : pytype_ns}) -1967 self.assertEqual(7, len(attribs)) -
1968 -
1969 - def test_registered_types(self): -
1970 orig_types = objectify.getRegisteredTypes() -1971 orig_types[0].unregister() -1972 self.assertEqual(orig_types[1:], objectify.getRegisteredTypes()) -1973 -1974 class NewType(objectify.ObjectifiedDataElement): -1975 pass -
1976 -1977 def checkMyType(s): -1978 return True -1979 -1980 pytype = objectify.PyType("mytype", checkMyType, NewType) -1981 self.assertTrue(pytype not in objectify.getRegisteredTypes()) -1982 pytype.register() -1983 self.assertTrue(pytype in objectify.getRegisteredTypes()) -1984 pytype.unregister() -1985 self.assertTrue(pytype not in objectify.getRegisteredTypes()) -1986 -1987 pytype.register(before = [objectify.getRegisteredTypes()[0].name]) -1988 self.assertEqual(pytype, objectify.getRegisteredTypes()[0]) -1989 pytype.unregister() -1990 -1991 pytype.register(after = [objectify.getRegisteredTypes()[0].name]) -1992 self.assertNotEqual(pytype, objectify.getRegisteredTypes()[0]) -1993 pytype.unregister() -1994 -1995 self.assertRaises(ValueError, pytype.register, -1996 before = [objectify.getRegisteredTypes()[0].name], -1997 after = [objectify.getRegisteredTypes()[1].name]) -1998 -
2000 from datetime import datetime -2001 def parse_date(value): -2002 if len(value) != 14: -2003 raise ValueError(value) -2004 Y = int(value[0:4]) -2005 M = int(value[4:6]) -2006 D = int(value[6:8]) -2007 h = int(value[8:10]) -2008 m = int(value[10:12]) -2009 s = int(value[12:14]) -2010 return datetime(Y, M, D, h, m, s) -
2011 -2012 def stringify_date(date): -2013 return date.strftime("%Y%m%d%H%M%S") -2014 -2015 class DatetimeElement(objectify.ObjectifiedDataElement): -2016 def pyval(self): -2017 return parse_date(self.text) -2018 pyval = property(pyval) -2019 -2020 datetime_type = objectify.PyType( -2021 "datetime", parse_date, DatetimeElement, stringify_date) -2022 datetime_type.xmlSchemaTypes = "dateTime" -2023 datetime_type.register() -2024 -2025 NAMESPACE = "http://foo.net/xmlns" -2026 NAMESPACE_MAP = {'ns': NAMESPACE} -2027 -2028 r = objectify.Element("{%s}root" % NAMESPACE, nsmap=NAMESPACE_MAP) -2029 time = datetime.now() -2030 r.date = time -2031 -2032 self.assertTrue(isinstance(r.date, DatetimeElement)) -2033 self.assertTrue(isinstance(r.date.pyval, datetime)) -2034 -2035 self.assertEqual(r.date.pyval, parse_date(stringify_date(time))) -2036 self.assertEqual(r.date.text, stringify_date(time)) -2037 -2038 r.date = objectify.E.date(time) -2039 -2040 self.assertTrue(isinstance(r.date, DatetimeElement)) -2041 self.assertTrue(isinstance(r.date.pyval, datetime)) -2042 -2043 self.assertEqual(r.date.pyval, parse_date(stringify_date(time))) -2044 self.assertEqual(r.date.text, stringify_date(time)) -2045 -2046 date = objectify.DataElement(time) -2047 -2048 self.assertTrue(isinstance(date, DatetimeElement)) -2049 self.assertTrue(isinstance(date.pyval, datetime)) -2050 -2051 self.assertEqual(date.pyval, parse_date(stringify_date(time))) -2052 self.assertEqual(date.text, stringify_date(time)) -2053 -
2054 - def test_object_path(self): -
2055 root = self.XML(xml_str) -2056 path = objectify.ObjectPath( "root.c1.c2" ) -2057 self.assertEqual(root.c1.c2.text, path.find(root).text) -2058 self.assertEqual(root.c1.c2.text, path(root).text) -
2059 -
2060 - def test_object_path_list(self): -
2061 root = self.XML(xml_str) -2062 path = objectify.ObjectPath( ['root', 'c1', 'c2'] ) -2063 self.assertEqual(root.c1.c2.text, path.find(root).text) -2064 self.assertEqual(root.c1.c2.text, path(root).text) -
2065 -
2066 - def test_object_path_fail(self): -
2067 root = self.XML(xml_str) -2068 path = objectify.ObjectPath( "root.c1.c99" ) -2069 self.assertRaises(AttributeError, path, root) -
2070 -
2072 root = self.XML(xml_str) -2073 path = objectify.ObjectPath( "root.c1.c99" ) -2074 self.assertEqual(None, path(root, None)) -2075 path = objectify.ObjectPath( "root.c99.c2" ) -2076 self.assertEqual(None, path(root, None)) -2077 path = objectify.ObjectPath( "notroot.c99.c2" ) -2078 self.assertEqual(None, path(root, None)) -
2079 -
2081 root = self.XML(xml_str) -2082 path = objectify.ObjectPath( ".c1.c99" ) -2083 self.assertEqual(None, path(root, None)) -2084 path = objectify.ObjectPath( ".c99.c2" ) -2085 self.assertEqual(None, path(root, None)) -
2086 -
2087 - def test_object_path_syntax(self): -
2088 root = self.XML(xml_str) -2089 path = objectify.ObjectPath("root . {objectified}c1. c2") -2090 self.assertEqual(root.c1.c2.text, path(root).text) -2091 -2092 path = objectify.ObjectPath(" root.{objectified} c1.c2 [ 0 ] ") -2093 self.assertEqual(root.c1.c2.text, path(root).text) -
2094 -
2096 self.assertRaises(ValueError, objectify.ObjectPath, "") -
2097 -
2099 self.assertRaises(ValueError, objectify.ObjectPath, []) -
2100 -
2101 - def test_object_path_hasattr(self): -
2102 root = self.XML(xml_str) -2103 path = objectify.ObjectPath( "root" ) -2104 self.assertTrue(path.hasattr(root)) -2105 path = objectify.ObjectPath( "root.c1" ) -2106 self.assertTrue(path.hasattr(root)) -2107 path = objectify.ObjectPath( "root.c1.c2" ) -2108 self.assertTrue(path.hasattr(root)) -2109 path = objectify.ObjectPath( "root.c1.{otherNS}c2" ) -2110 self.assertTrue(path.hasattr(root)) -2111 path = objectify.ObjectPath( "root.c1.c2[1]" ) -2112 self.assertTrue(path.hasattr(root)) -2113 path = objectify.ObjectPath( "root.c1.c2[2]" ) -2114 self.assertTrue(path.hasattr(root)) -2115 path = objectify.ObjectPath( "root.c1.c2[3]" ) -2116 self.assertFalse(path.hasattr(root)) -2117 path = objectify.ObjectPath( "root.c1[1].c2" ) -2118 self.assertFalse(path.hasattr(root)) -
2119 -
2120 - def test_object_path_dot(self): -
2121 root = self.XML(xml_str) -2122 path = objectify.ObjectPath( "." ) -2123 self.assertEqual(root.c1.c2.text, path(root).c1.c2.text) -
2124 -
2125 - def test_object_path_dot_list(self): -
2126 root = self.XML(xml_str) -2127 path = objectify.ObjectPath( [''] ) -2128 self.assertEqual(root.c1.c2.text, path(root).c1.c2.text) -
2129 -
2130 - def test_object_path_dot_root(self): -
2131 root = self.XML(xml_str) -2132 path = objectify.ObjectPath( ".c1.c2" ) -2133 self.assertEqual(root.c1.c2.text, path(root).text) -
2134 -
2136 root = self.XML(xml_str) -2137 path = objectify.ObjectPath( ['', 'c1', 'c2'] ) -2138 self.assertEqual(root.c1.c2.text, path(root).text) -
2139 -
2140 - def test_object_path_index(self): -
2141 root = self.XML(xml_str) -2142 path = objectify.ObjectPath( "root.c1[0].c2[0]" ) -2143 self.assertEqual(root.c1.c2.text, path(root).text) -2144 -2145 path = objectify.ObjectPath( "root.c1[0].c2" ) -2146 self.assertEqual(root.c1.c2.text, path(root).text) -2147 -2148 path = objectify.ObjectPath( "root.c1[0].c2[1]" ) -2149 self.assertEqual(root.c1.c2[1].text, path(root).text) -2150 -2151 path = objectify.ObjectPath( "root.c1.c2[2]" ) -2152 self.assertEqual(root.c1.c2[2].text, path(root).text) -2153 -2154 path = objectify.ObjectPath( "root.c1.c2[-1]" ) -2155 self.assertEqual(root.c1.c2[-1].text, path(root).text) -2156 -2157 path = objectify.ObjectPath( "root.c1.c2[-3]" ) -2158 self.assertEqual(root.c1.c2[-3].text, path(root).text) -
2159 -
2160 - def test_object_path_index_list(self): -
2161 root = self.XML(xml_str) -2162 path = objectify.ObjectPath( ['root', 'c1[0]', 'c2[0]'] ) -2163 self.assertEqual(root.c1.c2.text, path(root).text) -2164 -2165 path = objectify.ObjectPath( ['root', 'c1[0]', 'c2[2]'] ) -2166 self.assertEqual(root.c1.c2[2].text, path(root).text) -2167 -2168 path = objectify.ObjectPath( ['root', 'c1', 'c2[2]'] ) -2169 self.assertEqual(root.c1.c2[2].text, path(root).text) -2170 -2171 path = objectify.ObjectPath( ['root', 'c1', 'c2[-1]'] ) -2172 self.assertEqual(root.c1.c2[-1].text, path(root).text) -2173 -2174 path = objectify.ObjectPath( ['root', 'c1', 'c2[-3]'] ) -2175 self.assertEqual(root.c1.c2[-3].text, path(root).text) -
2176 -
2178 self.assertRaises(ValueError, objectify.ObjectPath, -2179 "root.c1[0].c2[-1-2]") -2180 self.assertRaises(ValueError, objectify.ObjectPath, -2181 ['root', 'c1[0]', 'c2[-1-2]']) -2182 -2183 self.assertRaises(ValueError, objectify.ObjectPath, -2184 "root[2].c1.c2") -2185 self.assertRaises(ValueError, objectify.ObjectPath, -2186 ['root[2]', 'c1', 'c2']) -2187 -2188 self.assertRaises(ValueError, objectify.ObjectPath, -2189 []) -2190 self.assertRaises(ValueError, objectify.ObjectPath, -2191 ['', '', '']) -
2192 -
2194 root = self.XML(xml_str) -2195 path = objectify.ObjectPath("root.c1[9999].c2") -2196 self.assertRaises(AttributeError, path, root) -2197 -2198 path = objectify.ObjectPath("root.c1[0].c2[9999]") -2199 self.assertRaises(AttributeError, path, root) -2200 -2201 path = objectify.ObjectPath(".c1[9999].c2[0]") -2202 self.assertRaises(AttributeError, path, root) -2203 -2204 path = objectify.ObjectPath("root.c1[-2].c2") -2205 self.assertRaises(AttributeError, path, root) -2206 -2207 path = objectify.ObjectPath("root.c1[0].c2[-4]") -2208 self.assertRaises(AttributeError, path, root) -
2209 -
2210 - def test_object_path_ns(self): -
2211 root = self.XML(xml_str) -2212 path = objectify.ObjectPath( "{objectified}root.c1.c2" ) -2213 self.assertEqual(root.c1.c2.text, path.find(root).text) -2214 path = objectify.ObjectPath( "{objectified}root.{objectified}c1.c2" ) -2215 self.assertEqual(root.c1.c2.text, path.find(root).text) -2216 path = objectify.ObjectPath( "root.{objectified}c1.{objectified}c2" ) -2217 self.assertEqual(root.c1.c2.text, path.find(root).text) -2218 path = objectify.ObjectPath( "root.c1.{objectified}c2" ) -2219 self.assertEqual(root.c1.c2.text, path.find(root).text) -2220 path = objectify.ObjectPath( "root.c1.{otherNS}c2" ) -2221 self.assertEqual(getattr(root.c1, '{otherNS}c2').text, -2222 path.find(root).text) -
2223 -
2224 - def test_object_path_ns_list(self): -
2225 root = self.XML(xml_str) -2226 path = objectify.ObjectPath( ['{objectified}root', 'c1', 'c2'] ) -2227 self.assertEqual(root.c1.c2.text, path.find(root).text) -2228 path = objectify.ObjectPath( ['{objectified}root', '{objectified}c1', 'c2'] ) -2229 self.assertEqual(root.c1.c2.text, path.find(root).text) -2230 path = objectify.ObjectPath( ['root', '{objectified}c1', '{objectified}c2'] ) -2231 self.assertEqual(root.c1.c2.text, path.find(root).text) -2232 path = objectify.ObjectPath( ['root', '{objectified}c1', '{objectified}c2[2]'] ) -2233 self.assertEqual(root.c1.c2[2].text, path.find(root).text) -2234 path = objectify.ObjectPath( ['root', 'c1', '{objectified}c2'] ) -2235 self.assertEqual(root.c1.c2.text, path.find(root).text) -2236 path = objectify.ObjectPath( ['root', 'c1', '{objectified}c2[2]'] ) -2237 self.assertEqual(root.c1.c2[2].text, path.find(root).text) -2238 path = objectify.ObjectPath( ['root', 'c1', '{otherNS}c2'] ) -2239 self.assertEqual(getattr(root.c1, '{otherNS}c2').text, -2240 path.find(root).text) -
2241 -
2242 - def test_object_path_set(self): -
2243 root = self.XML(xml_str) -2244 path = objectify.ObjectPath( "root.c1.c2" ) -2245 self.assertEqual(root.c1.c2.text, path.find(root).text) -2246 self.assertEqual("1", root.c1.c2[1].text) -2247 -2248 new_value = "my new value" -2249 path.setattr(root, new_value) -2250 -2251 self.assertEqual(new_value, root.c1.c2.text) -2252 self.assertEqual(new_value, path(root).text) -2253 self.assertEqual("1", root.c1.c2[1].text) -
2254 -
2256 root = self.XML(xml_str) -2257 path = objectify.ObjectPath( "root.c1.c2" ) -2258 self.assertEqual(root.c1.c2.text, path.find(root).text) -2259 self.assertEqual("1", root.c1.c2[1].text) -2260 -2261 new_el = self.Element("{objectified}test") -2262 etree.SubElement(new_el, "{objectified}sub", myattr="ATTR").a = "TEST" -2263 path.setattr(root, new_el.sub) -2264 -2265 self.assertEqual("ATTR", root.c1.c2.get("myattr")) -2266 self.assertEqual("TEST", root.c1.c2.a.text) -2267 self.assertEqual("TEST", path(root).a.text) -2268 self.assertEqual("1", root.c1.c2[1].text) -
2269 -
2270 - def test_object_path_set_create(self): -
2271 root = self.XML(xml_str) -2272 path = objectify.ObjectPath( "root.c1.c99" ) -2273 self.assertRaises(AttributeError, path.find, root) -2274 -2275 new_value = "my new value" -2276 path.setattr(root, new_value) -2277 -2278 self.assertEqual(1, len(root.c1.c99)) -2279 self.assertEqual(new_value, root.c1.c99.text) -2280 self.assertEqual(new_value, path(root).text) -
2281 -
2283 root = self.XML(xml_str) -2284 path = objectify.ObjectPath( "root.c1.c99" ) -2285 self.assertRaises(AttributeError, path.find, root) -2286 -2287 new_el = self.Element("{objectified}test") -2288 etree.SubElement(new_el, "{objectified}sub", myattr="ATTR").a = "TEST" -2289 path.setattr(root, new_el.sub) -2290 -2291 self.assertEqual(1, len(root.c1.c99)) -2292 self.assertEqual("ATTR", root.c1.c99.get("myattr")) -2293 self.assertEqual("TEST", root.c1.c99.a.text) -2294 self.assertEqual("TEST", path(root).a.text) -
2295 -
2297 root = self.XML(xml_str) -2298 path = objectify.ObjectPath( "root.c1.c99" ) -2299 self.assertRaises(AttributeError, path.find, root) -2300 -2301 new_el = self.Element("{objectified}test") -2302 new_el.a = ["TEST1", "TEST2"] -2303 new_el.a[0].set("myattr", "ATTR1") -2304 new_el.a[1].set("myattr", "ATTR2") -2305 -2306 path.setattr(root, list(new_el.a)) -2307 -2308 self.assertEqual(2, len(root.c1.c99)) -2309 self.assertEqual("ATTR1", root.c1.c99[0].get("myattr")) -2310 self.assertEqual("TEST1", root.c1.c99[0].text) -2311 self.assertEqual("ATTR2", root.c1.c99[1].get("myattr")) -2312 self.assertEqual("TEST2", root.c1.c99[1].text) -2313 self.assertEqual("TEST1", path(root).text) -
2314 -
2315 - def test_object_path_addattr(self): -
2316 root = self.XML(xml_str) -2317 path = objectify.ObjectPath( "root.c1.c2" ) -2318 self.assertEqual(3, len(root.c1.c2)) -2319 path.addattr(root, "test") -2320 self.assertEqual(4, len(root.c1.c2)) -2321 self.assertEqual(["0", "1", "2", "test"], -2322 [el.text for el in root.c1.c2]) -
2323 -
2325 root = self.XML(xml_str) -2326 path = objectify.ObjectPath( "root.c1.c2" ) -2327 self.assertEqual(3, len(root.c1.c2)) -2328 -2329 new_el = self.Element("{objectified}test") -2330 etree.SubElement(new_el, "{objectified}sub").a = "TEST" -2331 -2332 path.addattr(root, new_el.sub) -2333 self.assertEqual(4, len(root.c1.c2)) -2334 self.assertEqual("TEST", root.c1.c2[3].a.text) -2335 self.assertEqual(["0", "1", "2"], -2336 [el.text for el in root.c1.c2[:3]]) -
2337 -
2339 root = self.XML(xml_str) -2340 path = objectify.ObjectPath( "root.c1.c99" ) -2341 self.assertRaises(AttributeError, path.find, root) -2342 -2343 new_value = "my new value" -2344 path.addattr(root, new_value) -2345 -2346 self.assertEqual(1, len(root.c1.c99)) -2347 self.assertEqual(new_value, root.c1.c99.text) -2348 self.assertEqual(new_value, path(root).text) -
2349 -
2351 root = self.XML(xml_str) -2352 path = objectify.ObjectPath( "root.c1.c99" ) -2353 self.assertRaises(AttributeError, path.find, root) -2354 -2355 new_el = self.Element("{objectified}test") -2356 etree.SubElement(new_el, "{objectified}sub", myattr="ATTR").a = "TEST" -2357 -2358 path.addattr(root, new_el.sub) -2359 self.assertEqual(1, len(root.c1.c99)) -2360 self.assertEqual("TEST", root.c1.c99.a.text) -2361 self.assertEqual("TEST", path(root).a.text) -2362 self.assertEqual("ATTR", root.c1.c99.get("myattr")) -
2363 -
2365 root = self.XML(xml_str) -2366 path = objectify.ObjectPath( "root.c1.c99" ) -2367 self.assertRaises(AttributeError, path.find, root) -2368 -2369 new_el = self.Element("{objectified}test") -2370 new_el.a = ["TEST1", "TEST2"] -2371 -2372 self.assertEqual(2, len(new_el.a)) -2373 -2374 path.addattr(root, list(new_el.a)) -2375 self.assertEqual(2, len(root.c1.c99)) -2376 self.assertEqual("TEST1", root.c1.c99.text) -2377 self.assertEqual("TEST2", path(root)[1].text) -
2378 -
2379 - def test_descendant_paths(self): -
2380 root = self.XML(xml_str) -2381 self.assertEqual( -2382 ['{objectified}root', '{objectified}root.c1', -2383 '{objectified}root.c1.c2', -2384 '{objectified}root.c1.c2[1]', '{objectified}root.c1.c2[2]', -2385 '{objectified}root.c1.{otherNS}c2', '{objectified}root.c1.{}c2'], -2386 root.descendantpaths()) -
2387 -
2388 - def test_descendant_paths_child(self): -
2389 root = self.XML(xml_str) -2390 self.assertEqual( -2391 ['{objectified}c1', '{objectified}c1.c2', -2392 '{objectified}c1.c2[1]', '{objectified}c1.c2[2]', -2393 '{objectified}c1.{otherNS}c2', '{objectified}c1.{}c2'], -2394 root.c1.descendantpaths()) -
2395 -
2397 root = self.XML(xml_str) -2398 self.assertEqual( -2399 ['root.{objectified}c1', 'root.{objectified}c1.c2', -2400 'root.{objectified}c1.c2[1]', 'root.{objectified}c1.c2[2]', -2401 'root.{objectified}c1.{otherNS}c2', -2402 'root.{objectified}c1.{}c2'], -2403 root.c1.descendantpaths('root')) -
2404 -
2405 - def test_pickle(self): -
2406 import pickle -2407 -2408 root = self.XML(xml_str) -2409 out = BytesIO() -2410 pickle.dump(root, out) -2411 -2412 new_root = pickle.loads(out.getvalue()) -2413 self.assertEqual( -2414 etree.tostring(new_root), -2415 etree.tostring(root)) -
2416 -
2417 - def test_pickle_elementtree(self): -
2418 import pickle -2419 -2420 tree = etree.ElementTree(self.XML(xml_str + "<?my pi?>")) -2421 out = BytesIO() -2422 pickle.dump(tree, out) -2423 -2424 new_tree = pickle.loads(out.getvalue()) -2425 self.assertTrue(isinstance(new_tree, etree._ElementTree)) -2426 self.assertEqual( -2427 etree.tostring(new_tree), -2428 etree.tostring(tree)) -
2429 -
2430 - def test_pickle_intelement(self): -
2431 self._test_pickle('<x>42</x>') -2432 self._test_pickle(objectify.DataElement(42)) -
2433 -
2434 - def test_pickle_floattelement(self): -
2435 self._test_pickle('<x>42.0</x>') -2436 self._test_pickle(objectify.DataElement(42.0)) -
2437 -
2438 - def test_pickle_strelement(self): -
2439 self._test_pickle('<x>Pickle me!</x>') -2440 self._test_pickle(objectify.DataElement('Pickle me!')) -
2441 -
2442 - def test_pickle_boolelement(self): -
2443 self._test_pickle('<x>true</x>') -2444 self._test_pickle('<x>false</x>') -2445 self._test_pickle(objectify.DataElement(True)) -2446 self._test_pickle(objectify.DataElement(False)) -
2447 -
2448 - def test_pickle_noneelement(self): -
2449 self._test_pickle(''' -2450 <x xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>''') -2451 self._test_pickle(objectify.DataElement(None)) -
2452 -
2453 - def _test_pickle(self, stringOrElt): -
2454 import pickle -2455 if isinstance(stringOrElt, (etree._Element, etree._ElementTree)): -2456 elt = stringOrElt -2457 else: -2458 elt = self.XML(stringOrElt) -2459 out = BytesIO() -2460 pickle.dump(elt, out) -2461 -2462 new_elt = pickle.loads(out.getvalue()) -2463 self.assertEqual( -2464 etree.tostring(new_elt), -2465 etree.tostring(elt)) -
2466 -2467 # E-Factory tests, need to use sub-elements as root element is always -2468 # type-looked-up as ObjectifiedElement (no annotations) -
2469 - def test_efactory_int(self): -
2470 E = objectify.E -2471 root = E.root(E.val(23)) -2472 self.assertTrue(isinstance(root.val, objectify.IntElement)) -
2473 -
2474 - def test_efactory_float(self): -
2475 E = objectify.E -2476 root = E.root(E.val(233.23)) -2477 self.assertTrue(isinstance(root.val, objectify.FloatElement)) -
2478 -
2479 - def test_efactory_str(self): -
2480 E = objectify.E -2481 root = E.root(E.val("what?")) -2482 self.assertTrue(isinstance(root.val, objectify.StringElement)) -
2483 -
2484 - def test_efactory_unicode(self): -
2485 E = objectify.E -2486 root = E.root(E.val(_str("blöödy häll", encoding="ISO-8859-1"))) -2487 self.assertTrue(isinstance(root.val, objectify.StringElement)) -
2488 -
2489 - def test_efactory_bool(self): -
2490 E = objectify.E -2491 root = E.root(E.val(True)) -2492 self.assertTrue(isinstance(root.val, objectify.BoolElement)) -
2493 -
2494 - def test_efactory_none(self): -
2495 E = objectify.E -2496 root = E.root(E.val(None)) -2497 self.assertTrue(isinstance(root.val, objectify.NoneElement)) -
2498 -
2500 E = objectify.E -2501 root = E.root(E.val(1, "foo", 2.0, "bar ", True, None)) -2502 self.assertTrue(isinstance(root.val, objectify.StringElement)) -
2503 -
2504 - def test_efactory_attrib(self): -
2505 E = objectify.E -2506 root = E.root(foo="bar") -2507 self.assertEqual(root.get("foo"), "bar") -
2508 -
2509 - def test_efactory_nested(self): -
2510 E = objectify.E -2511 DataElement = objectify.DataElement -2512 root = E.root("text", E.sub(E.subsub()), "tail", DataElement(1), -2513 DataElement(2.0)) -2514 self.assertTrue(isinstance(root, objectify.ObjectifiedElement)) -2515 self.assertEqual(root.text, "text") -2516 self.assertTrue(isinstance(root.sub, objectify.ObjectifiedElement)) -2517 self.assertEqual(root.sub.tail, "tail") -2518 self.assertTrue(isinstance(root.sub.subsub, objectify.StringElement)) -2519 self.assertEqual(len(root.value), 2) -2520 self.assertTrue(isinstance(root.value[0], objectify.IntElement)) -2521 self.assertTrue(isinstance(root.value[1], objectify.FloatElement)) -
2522 -
2523 - def test_efactory_subtype(self): -
2524 class Attribute(objectify.ObjectifiedDataElement): -2525 def __init__(self): -2526 objectify.ObjectifiedDataElement.__init__(self) -2527 self.set("datatype", "TYPE") -2528 self.set("range", "0.,1.") -
2529 -2530 attr = Attribute() -2531 self.assertEqual(attr.text, None) -2532 self.assertEqual(attr.get("datatype"), "TYPE") -2533 self.assertEqual(attr.get("range"), "0.,1.") -2534 -
2535 - def test_XML_base_url_docinfo(self): -
2536 root = objectify.XML(_bytes("<root/>"), base_url="http://no/such/url") -2537 docinfo = root.getroottree().docinfo -2538 self.assertEqual(docinfo.URL, "http://no/such/url") -
2539 -
2541 root = objectify.XML(_bytes("<root/>"), base_url="http://no/such/url") -2542 docinfo = root.getroottree().docinfo -2543 self.assertEqual(docinfo.URL, "http://no/such/url") -2544 docinfo.URL = "https://secret/url" -2545 self.assertEqual(docinfo.URL, "https://secret/url") -
2546 -
2548 tree = objectify.parse(BytesIO("<root/>"), base_url="http://no/such/url") -2549 docinfo = tree.docinfo -2550 self.assertEqual(docinfo.URL, "http://no/such/url") -
2551 -
2552 - def test_parse_base_url_docinfo(self): -
2553 tree = objectify.parse(fileInTestDir('include/test_xinclude.xml'), -2554 base_url="http://no/such/url") -2555 docinfo = tree.docinfo -2556 self.assertEqual(docinfo.URL, "http://no/such/url") -
2557 -
2558 - def test_xml_base(self): -
2559 root = objectify.XML(_bytes("<root/>"), base_url="http://no/such/url") -2560 self.assertEqual(root.base, "http://no/such/url") -2561 self.assertEqual( -2562 root.get('{http://www.w3.org/XML/1998/namespace}base'), None) -2563 root.base = "https://secret/url" -2564 self.assertEqual(root.base, "https://secret/url") -2565 self.assertEqual( -2566 root.get('{http://www.w3.org/XML/1998/namespace}base'), -2567 "https://secret/url") -
2568 -
2569 - def test_xml_base_attribute(self): -
2570 root = objectify.XML(_bytes("<root/>"), base_url="http://no/such/url") -2571 self.assertEqual(root.base, "http://no/such/url") -2572 self.assertEqual( -2573 root.get('{http://www.w3.org/XML/1998/namespace}base'), None) -2574 root.set('{http://www.w3.org/XML/1998/namespace}base', -2575 "https://secret/url") -2576 self.assertEqual(root.base, "https://secret/url") -2577 self.assertEqual( -2578 root.get('{http://www.w3.org/XML/1998/namespace}base'), -2579 "https://secret/url") -
2580 -
2581 - def test_standard_lookup(self): -
2582 XML = self.XML -2583 -2584 xml = _bytes('''\ -2585 <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> -2586 <i>5</i> -2587 <i>-5</i> -2588 <l>4294967296</l> -2589 <l>-4294967296</l> -2590 <f>1.1</f> -2591 <b>true</b> -2592 <b>false</b> -2593 <s>Strange things happen, where strings collide</s> -2594 <s>True</s> -2595 <s>False</s> -2596 <s>t</s> -2597 <s>f</s> -2598 <s></s> -2599 <s>None</s> -2600 <n xsi:nil="true" /> -2601 </root> -2602 ''') -2603 root = XML(xml) -2604 -2605 for i in root.i: -2606 self.assertTrue(isinstance(i, objectify.IntElement)) -2607 for l in root.l: -2608 self.assertTrue(isinstance(l, objectify.IntElement)) -2609 for f in root.f: -2610 self.assertTrue(isinstance(f, objectify.FloatElement)) -2611 for b in root.b: -2612 self.assertTrue(isinstance(b, objectify.BoolElement)) -2613 self.assertEqual(True, root.b[0]) -2614 self.assertEqual(False, root.b[1]) -2615 for s in root.s: -2616 self.assertTrue(isinstance(s, objectify.StringElement)) -2617 self.assertTrue(isinstance(root.n, objectify.NoneElement)) -2618 self.assertEqual(None, root.n) -
2619 -
2620 -def test_suite(): -
2621 suite = unittest.TestSuite() -2622 suite.addTests([unittest.makeSuite(ObjectifyTestCase)]) -2623 suite.addTests(doctest.DocTestSuite(objectify)) -2624 if sys.version_info >= (2,4): -2625 suite.addTests( -2626 [make_doctest('../../../doc/objectify.txt')]) -2627 return suite -
2628 -2629 if __name__ == '__main__': -2630 print('to test use test.py %s' % __file__) -2631 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_objectify.ObjectifyTestCase-class.html b/doc/html/api/lxml.tests.test_objectify.ObjectifyTestCase-class.html deleted file mode 100644 index c16db02..0000000 --- a/doc/html/api/lxml.tests.test_objectify.ObjectifyTestCase-class.html +++ /dev/null @@ -1,3656 +0,0 @@ - - - - - lxml.tests.test_objectify.ObjectifyTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_objectify :: - Class ObjectifyTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ObjectifyTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ObjectifyTestCase
-
- -
-Test cases for lxml.objectify - - - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
XML(self, - xml) - source code - -
- -
-   - - - - - - -
setUp(self)
- Hook method for setting up the test fixture before exercising it.
- source code - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
test_element_nsmap_default(self) - source code - -
- -
-   - - - - - - -
test_element_nsmap_empty(self) - source code - -
- -
-   - - - - - - -
test_element_nsmap_custom_prefixes(self) - source code - -
- -
-   - - - - - - -
test_element_nsmap_custom(self) - source code - -
- -
-   - - - - - - -
test_sub_element_nsmap_default(self) - source code - -
- -
-   - - - - - - -
test_sub_element_nsmap_empty(self) - source code - -
- -
-   - - - - - - -
test_sub_element_nsmap_custom_prefixes(self) - source code - -
- -
-   - - - - - - -
test_sub_element_nsmap_custom(self) - source code - -
- -
-   - - - - - - -
test_data_element_nsmap_default(self) - source code - -
- -
-   - - - - - - -
test_data_element_nsmap_empty(self) - source code - -
- -
-   - - - - - - -
test_data_element_nsmap_custom_prefixes(self) - source code - -
- -
-   - - - - - - -
test_data_element_nsmap_custom(self) - source code - -
- -
-   - - - - - - -
test_sub_data_element_nsmap_default(self) - source code - -
- -
-   - - - - - - -
test_sub_data_element_nsmap_empty(self) - source code - -
- -
-   - - - - - - -
test_sub_data_element_nsmap_custom_prefixes(self) - source code - -
- -
-   - - - - - - -
test_sub_data_element_nsmap_custom(self) - source code - -
- -
-   - - - - - - -
test_date_element_efactory_text(self) - source code - -
- -
-   - - - - - - -
test_date_element_efactory_tail(self) - source code - -
- -
-   - - - - - - -
test_data_element_attrib_attributes_precedence(self) - source code - -
- -
-   - - - - - - -
test_data_element_data_element_arg(self) - source code - -
- -
-   - - - - - - -
test_data_element_data_element_arg_pytype_none(self) - source code - -
- -
-   - - - - - - -
test_data_element_data_element_arg_pytype(self) - source code - -
- -
-   - - - - - - -
test_data_element_data_element_arg_xsitype(self) - source code - -
- -
-   - - - - - - -
test_data_element_data_element_arg_pytype_xsitype(self) - source code - -
- -
-   - - - - - - -
test_data_element_invalid_pytype(self) - source code - -
- -
-   - - - - - - -
test_data_element_invalid_xsi(self) - source code - -
- -
-   - - - - - - -
test_data_element_data_element_arg_invalid_pytype(self) - source code - -
- -
-   - - - - - - -
test_data_element_data_element_arg_invalid_xsi(self) - source code - -
- -
-   - - - - - - -
test_data_element_element_arg(self) - source code - -
- -
-   - - - - - - -
test_root(self) - source code - -
- -
-   - - - - - - -
test_str(self) - source code - -
- -
-   - - - - - - -
test_child(self) - source code - -
- -
-   - - - - - - -
test_child_ns_nons(self) - source code - -
- -
-   - - - - - - -
test_countchildren(self) - source code - -
- -
-   - - - - - - -
test_child_getattr(self) - source code - -
- -
-   - - - - - - -
test_child_nonexistant(self) - source code - -
- -
-   - - - - - - -
test_child_getattr_empty_ns(self) - source code - -
- -
-   - - - - - - -
test_setattr(self) - source code - -
- -
-   - - - - - - -
test_setattr_nonunicode(self) - source code - -
- -
-   - - - - - - -
test_addattr(self) - source code - -
- -
-   - - - - - - -
test_addattr_element(self) - source code - -
- -
-   - - - - - - -
test_addattr_list(self) - source code - -
- -
-   - - - - - - -
test_child_addattr(self) - source code - -
- -
-   - - - - - - -
test_child_index(self) - source code - -
- -
-   - - - - - - -
test_child_index_neg(self) - source code - -
- -
-   - - - - - - -
test_child_len(self) - source code - -
- -
-   - - - - - - -
test_child_iter(self) - source code - -
- -
-   - - - - - - -
test_class_lookup(self) - source code - -
- -
-   - - - - - - -
test_dir(self) - source code - -
- -
-   - - - - - - -
test_vars(self) - source code - -
- -
-   - - - - - - -
test_child_set_ro(self) - source code - -
- -
-   - - - - - - -
test_getslice_complete(self) - source code - -
- -
-   - - - - - - -
test_getslice_partial(self) - source code - -
- -
-   - - - - - - -
test_getslice_partial_neg(self) - source code - -
- -
-   - - - - - - -
test_setslice_complete(self) - source code - -
- -
-   - - - - - - -
test_setslice_elements(self) - source code - -
- -
-   - - - - - - -
test_setslice_partial(self) - source code - -
- -
-   - - - - - - -
test_setslice_insert(self) - source code - -
- -
-   - - - - - - -
test_setslice_insert_neg(self) - source code - -
- -
-   - - - - - - -
test_setslice_empty(self) - source code - -
- -
-   - - - - - - -
test_setslice_partial_wrong_length(self) - source code - -
- -
-   - - - - - - -
test_setslice_partial_neg(self) - source code - -
- -
-   - - - - - - -
test_setslice_partial_allneg(self) - source code - -
- -
-   - - - - - - -
test_set_string(self) - source code - -
- -
-   - - - - - - -
test_setitem_string(self) - source code - -
- -
-   - - - - - - -
test_setitem_string_special(self) - source code - -
- -
-   - - - - - - -
test_findall(self) - source code - -
- -
-   - - - - - - -
test_findall_ns(self) - source code - -
- -
-   - - - - - - -
test_build_tree(self) - source code - -
- -
-   - - - - - - -
test_type_NoneType(self) - source code - -
- -
-   - - - - - - -
test_data_element_NoneType(self) - source code - -
- -
-   - - - - - - -
test_type_bool(self) - source code - -
- -
-   - - - - - - -
test_data_element_bool(self) - source code - -
- -
-   - - - - - - -
test_type_str(self) - source code - -
- -
-   - - - - - - -
test_type_str_intliteral(self) - source code - -
- -
-   - - - - - - -
test_type_str_floatliteral(self) - source code - -
- -
-   - - - - - - -
test_type_str_mul(self) - source code - -
- -
-   - - - - - - -
test_type_str_add(self) - source code - -
- -
-   - - - - - - -
test_type_str_mod(self) - source code - -
- -
-   - - - - - - -
test_type_str_hash(self) - source code - -
- -
-   - - - - - - -
test_type_str_as_int(self) - source code - -
- -
-   - - - - - - -
test_type_str_as_float(self) - source code - -
- -
-   - - - - - - -
test_type_str_as_complex(self) - source code - -
- -
-   - - - - - - -
test_type_str_mod_data_elements(self) - source code - -
- -
-   - - - - - - -
test_data_element_str(self) - source code - -
- -
-   - - - - - - -
test_data_element_str_intliteral(self) - source code - -
- -
-   - - - - - - -
test_data_element_str_floatliteral(self) - source code - -
- -
-   - - - - - - -
test_type_ustr(self) - source code - -
- -
-   - - - - - - -
test_type_ustr_intliteral(self) - source code - -
- -
-   - - - - - - -
test_type_ustr_floatliteral(self) - source code - -
- -
-   - - - - - - -
test_type_ustr_mul(self) - source code - -
- -
-   - - - - - - -
test_type_ustr_add(self) - source code - -
- -
-   - - - - - - -
test_data_element_ustr(self) - source code - -
- -
-   - - - - - - -
test_data_element_ustr_intliteral(self) - source code - -
- -
-   - - - - - - -
test_data_element_ustr_floatliteral(self) - source code - -
- -
-   - - - - - - -
test_type_int(self) - source code - -
- -
-   - - - - - - -
test_data_element_int(self) - source code - -
- -
-   - - - - - - -
test_data_element_int_hash(self) - source code - -
- -
-   - - - - - - -
test_type_float(self) - source code - -
- -
-   - - - - - - -
test_data_element_float(self) - source code - -
- -
-   - - - - - - -
test_data_element_float_hash(self) - source code - -
- -
-   - - - - - - -
test_type_float_precision(self) - source code - -
- -
-   - - - - - - -
test_type_float_instantiation_precision(self) - source code - -
- -
-   - - - - - - -
test_type_float_precision_consistency(self) - source code - -
- -
-   - - - - - - -
test_data_element_float_precision(self) - source code - -
- -
-   - - - - - - -
test_data_element_float_hash_repr(self) - source code - -
- -
-   - - - - - - -
test_data_element_xsitypes(self) - source code - -
- -
-   - - - - - - -
test_data_element_xsitypes_xsdprefixed(self) - source code - -
- -
-   - - - - - - -
test_data_element_xsitypes_prefixed(self) - source code - -
- -
-   - - - - - - -
test_data_element_pytypes(self) - source code - -
- -
-   - - - - - - -
test_data_element_pytype_none(self) - source code - -
- -
-   - - - - - - -
test_data_element_pytype_none_compat(self) - source code - -
- -
-   - - - - - - -
test_type_unregistered(self) - source code - -
- -
-   - - - - - - -
test_data_element_unregistered(self) - source code - -
- -
-   - - - - - - -
test_schema_types(self) - source code - -
- -
-   - - - - - - -
test_schema_types_prefixed(self) - source code - -
- -
-   - - - - - - -
test_type_str_sequence(self) - source code - -
- -
-   - - - - - - -
test_type_str_cmp(self) - source code - -
- -
-   - - - - - - -
test_type_int_cmp(self) - source code - -
- -
-   - - - - - - -
test_type_bool_cmp(self) - source code - -
- -
-   - - - - - - -
test_type_none_cmp(self) - source code - -
- -
-   - - - - - - -
test_dataelement_xsi(self) - source code - -
- -
-   - - - - - - -
test_dataelement_xsi_nsmap(self) - source code - -
- -
-   - - - - - - -
test_dataelement_xsi_prefix_error(self) - source code - -
- -
-   - - - - - - -
test_pytype_annotation(self) - source code - -
- -
-   - - - - - - -
test_pytype_annotation_empty(self) - source code - -
- -
-   - - - - - - -
test_pytype_annotation_use_old(self) - source code - -
- -
-   - - - - - - -
test_pytype_xsitype_annotation(self) - source code - -
- -
-   - - - - - - -
test_xsiannotate_use_old(self) - source code - -
- -
-   - - - - - - -
test_pyannotate_ignore_old(self) - source code - -
- -
-   - - - - - - -
test_pyannotate_empty(self) - source code - -
- -
-   - - - - - - -
test_pyannotate_use_old(self) - source code - -
- -
-   - - - - - - -
test_xsiannotate_ignore_old(self) - source code - -
- -
-   - - - - - - -
test_deannotate(self) - source code - -
- -
-   - - - - - - -
test_xsinil_deannotate(self) - source code - -
- -
-   - - - - - - -
test_xsitype_deannotate(self) - source code - -
- -
-   - - - - - - -
test_pytype_deannotate(self) - source code - -
- -
-   - - - - - - -
test_change_pytype_attribute(self) - source code - -
- -
-   - - - - - - -
test_registered_types(self) - source code - -
- -
-   - - - - - - -
test_registered_type_stringify(self) - source code - -
- -
-   - - - - - - -
test_object_path(self) - source code - -
- -
-   - - - - - - -
test_object_path_list(self) - source code - -
- -
-   - - - - - - -
test_object_path_fail(self) - source code - -
- -
-   - - - - - - -
test_object_path_default_absolute(self) - source code - -
- -
-   - - - - - - -
test_object_path_default_relative(self) - source code - -
- -
-   - - - - - - -
test_object_path_syntax(self) - source code - -
- -
-   - - - - - - -
test_object_path_fail_parse_empty(self) - source code - -
- -
-   - - - - - - -
test_object_path_fail_parse_empty_list(self) - source code - -
- -
-   - - - - - - -
test_object_path_hasattr(self) - source code - -
- -
-   - - - - - - -
test_object_path_dot(self) - source code - -
- -
-   - - - - - - -
test_object_path_dot_list(self) - source code - -
- -
-   - - - - - - -
test_object_path_dot_root(self) - source code - -
- -
-   - - - - - - -
test_object_path_dot_root_list(self) - source code - -
- -
-   - - - - - - -
test_object_path_index(self) - source code - -
- -
-   - - - - - - -
test_object_path_index_list(self) - source code - -
- -
-   - - - - - - -
test_object_path_index_fail_parse(self) - source code - -
- -
-   - - - - - - -
test_object_path_index_fail_lookup(self) - source code - -
- -
-   - - - - - - -
test_object_path_ns(self) - source code - -
- -
-   - - - - - - -
test_object_path_ns_list(self) - source code - -
- -
-   - - - - - - -
test_object_path_set(self) - source code - -
- -
-   - - - - - - -
test_object_path_set_element(self) - source code - -
- -
-   - - - - - - -
test_object_path_set_create(self) - source code - -
- -
-   - - - - - - -
test_object_path_set_create_element(self) - source code - -
- -
-   - - - - - - -
test_object_path_set_create_list(self) - source code - -
- -
-   - - - - - - -
test_object_path_addattr(self) - source code - -
- -
-   - - - - - - -
test_object_path_addattr_element(self) - source code - -
- -
-   - - - - - - -
test_object_path_addattr_create(self) - source code - -
- -
-   - - - - - - -
test_object_path_addattr_create_element(self) - source code - -
- -
-   - - - - - - -
test_object_path_addattr_create_list(self) - source code - -
- -
-   - - - - - - -
test_descendant_paths(self) - source code - -
- -
-   - - - - - - -
test_descendant_paths_child(self) - source code - -
- -
-   - - - - - - -
test_descendant_paths_prefix(self) - source code - -
- -
-   - - - - - - -
test_pickle(self) - source code - -
- -
-   - - - - - - -
test_pickle_elementtree(self) - source code - -
- -
-   - - - - - - -
test_pickle_intelement(self) - source code - -
- -
-   - - - - - - -
test_pickle_floattelement(self) - source code - -
- -
-   - - - - - - -
test_pickle_strelement(self) - source code - -
- -
-   - - - - - - -
test_pickle_boolelement(self) - source code - -
- -
-   - - - - - - -
test_pickle_noneelement(self) - source code - -
- -
-   - - - - - - -
_test_pickle(self, - stringOrElt) - source code - -
- -
-   - - - - - - -
test_efactory_int(self) - source code - -
- -
-   - - - - - - -
test_efactory_float(self) - source code - -
- -
-   - - - - - - -
test_efactory_str(self) - source code - -
- -
-   - - - - - - -
test_efactory_unicode(self) - source code - -
- -
-   - - - - - - -
test_efactory_bool(self) - source code - -
- -
-   - - - - - - -
test_efactory_none(self) - source code - -
- -
-   - - - - - - -
test_efactory_value_concatenation(self) - source code - -
- -
-   - - - - - - -
test_efactory_attrib(self) - source code - -
- -
-   - - - - - - -
test_efactory_nested(self) - source code - -
- -
-   - - - - - - -
test_efactory_subtype(self) - source code - -
- -
-   - - - - - - -
test_XML_base_url_docinfo(self) - source code - -
- -
-   - - - - - - -
test_XML_set_base_url_docinfo(self) - source code - -
- -
-   - - - - - - -
test_parse_stringio_base_url(self) - source code - -
- -
-   - - - - - - -
test_parse_base_url_docinfo(self) - source code - -
- -
-   - - - - - - -
test_xml_base(self) - source code - -
- -
-   - - - - - - -
test_xml_base_attribute(self) - source code - -
- -
-   - - - - - - -
test_standard_lookup(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - etree
- The lxml.etree module implements the extended ElementTree API for XML. -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

setUp(self) -

-
source code  -
- - Hook method for setting up the test fixture before exercising it. -
-
Overrides: - unittest.case.TestCase.setUp -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- - Hook method for deconstructing the test fixture after testing it. -
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

etree

- The lxml.etree module implements the extended ElementTree API for XML. -
-
-
-
Value:
-
lxml.etree
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_pyclasslookup-module.html b/doc/html/api/lxml.tests.test_pyclasslookup-module.html deleted file mode 100644 index 5b2cd1a..0000000 --- a/doc/html/api/lxml.tests.test_pyclasslookup-module.html +++ /dev/null @@ -1,288 +0,0 @@ - - - - - lxml.tests.test_pyclasslookup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_pyclasslookup - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module test_pyclasslookup

source code

-Tests specific to the Python based class lookup. - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - PyClassLookupTestCase
- Test cases for the lxml.pyclasslookup class lookup mechanism. -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
test_suite() - source code - -
- -
- - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - this_dir = '/home/stefan/source/Python/lxml/lxml-release/src/l... -
-   - - xml_str = '<obj:root xmlns:obj="objectified" xmlns:other="othe... -
-   - - __package__ = 'lxml.tests' -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

this_dir

- -
-
-
-
Value:
-
-'/home/stefan/source/Python/lxml/lxml-release/src/lxml/tests'
-
-
-
-
-
- -
- -
-

xml_str

- -
-
-
-
Value:
-
-'''<obj:root xmlns:obj="objectified" xmlns:other="otherNS">
-  <obj:c1 a1="A1" a2="A2" other:a3="A3">
-    <obj:c2>0</obj:c2>
-    <obj:c2>1</obj:c2>
-    <obj:c2>2</obj:c2>
-    <other:c2>3</other:c2>
-    <c2>3</c2>
-  </obj:c1>
-...
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_pyclasslookup-pysrc.html b/doc/html/api/lxml.tests.test_pyclasslookup-pysrc.html deleted file mode 100644 index 0229d5e..0000000 --- a/doc/html/api/lxml.tests.test_pyclasslookup-pysrc.html +++ /dev/null @@ -1,925 +0,0 @@ - - - - - lxml.tests.test_pyclasslookup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_pyclasslookup - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.test_pyclasslookup

-
-  1  # -*- coding: utf-8 -*- 
-  2   
-  3  """ 
-  4  Tests specific to the Python based class lookup. 
-  5  """ 
-  6   
-  7   
-  8  import unittest, operator, os.path, sys 
-  9   
- 10  this_dir = os.path.dirname(__file__) 
- 11  if this_dir not in sys.path: 
- 12      sys.path.insert(0, this_dir) # needed for Py3 
- 13   
- 14  from common_imports import etree, StringIO, HelperTestCase, fileInTestDir 
- 15  from common_imports import SillyFileLike, canonicalize, doctest, _bytes 
- 16   
- 17  from lxml.etree import PythonElementClassLookup 
- 18   
- 19  xml_str = _bytes('''\ 
- 20  <obj:root xmlns:obj="objectified" xmlns:other="otherNS"> 
- 21    <obj:c1 a1="A1" a2="A2" other:a3="A3"> 
- 22      <obj:c2>0</obj:c2> 
- 23      <obj:c2>1</obj:c2> 
- 24      <obj:c2>2</obj:c2> 
- 25      <other:c2>3</other:c2> 
- 26      <c2>3</c2> 
- 27    </obj:c1> 
- 28  </obj:root>''') 
- 29   
- 30   
-
31 -class PyClassLookupTestCase(HelperTestCase): -
32 """Test cases for the lxml.pyclasslookup class lookup mechanism. - 33 """ - 34 etree = etree - 35 parser = etree.XMLParser() - 36 Element = parser.makeelement - 37 -
38 - def tearDown(self): -
39 self.parser.set_element_class_lookup(None) - 40 super(PyClassLookupTestCase, self).tearDown() -
41 -
42 - def _setClassLookup(self, lookup_function): -
43 class Lookup(PythonElementClassLookup): - 44 def lookup(self, *args): - 45 return lookup_function(*args) -
46 self.parser.set_element_class_lookup( Lookup() ) - 47 -
48 - def _buildElementClass(self): -
49 class LocalElement(etree.ElementBase): - 50 pass -
51 return LocalElement - 52 -
53 - def XML(self, xml): -
54 return self.etree.XML(xml, self.parser) -
55 - 56 # --- Test cases - 57 -
58 - def test_lookup(self): -
59 el_class = self._buildElementClass() - 60 el_class.i = 1 - 61 def lookup(*args): - 62 if el_class.i == 1: - 63 el_class.i = 2 - 64 return el_class -
65 self._setClassLookup(lookup) - 66 root = self.XML(xml_str) - 67 self.assertEqual(2, el_class.i) - 68 -
70 el_class = self._buildElementClass() - 71 el_class.EL = None - 72 def lookup(doc, el): - 73 if el_class.EL is None: - 74 el_class.EL = el - 75 return el_class -
76 self._setClassLookup(lookup) - 77 root = self.XML(xml_str) - 78 self.assertNotEqual(None, el_class.EL) - 79 self.assertRaises(ReferenceError, el_class.EL.getchildren) - 80 -
81 - def test_lookup_tag(self): -
82 el_class = self._buildElementClass() - 83 el_class.TAG = None - 84 def lookup(doc, el): - 85 if el_class.TAG is None: - 86 el_class.TAG = el.tag - 87 return el_class -
88 self._setClassLookup(lookup) - 89 root = self.XML(xml_str) - 90 self.assertNotEqual(None, root.TAG) - 91 self.assertEqual(root.tag, root.TAG) - 92 -
93 - def test_lookup_text(self): -
94 el_class = self._buildElementClass() - 95 el_class.TEXT = None - 96 def lookup(doc, el): - 97 if el_class.TEXT is None: - 98 el_class.TEXT = el.text - 99 return el_class -
100 self._setClassLookup(lookup) -101 root = self.XML(xml_str) -102 self.assertNotEqual(None, root.TEXT) -103 self.assertEqual(root.text, root.TEXT) -104 -
105 - def test_lookup_tail(self): -
106 el_class = self._buildElementClass() -107 el_class.TAIL = None -108 def lookup(doc, el): -109 if el_class.TAIL is None: -110 el_class.TAIL = el.tail -111 return el_class -
112 self._setClassLookup(lookup) -113 root = self.XML(xml_str) -114 self.assertEqual(root.tail, root.TAIL) -115 -
116 - def test_lookup_attrib(self): -
117 el_class = self._buildElementClass() -118 el_class.ATTRIB = None -119 def lookup(doc, el): -120 if el_class.ATTRIB is None: -121 el_class.ATTRIB = el[0].attrib -122 return el_class -
123 self._setClassLookup(lookup) -124 root = self.XML(xml_str) -125 items1 = list(root[0].attrib.items()) -126 items1.sort() -127 items2 = list(root.ATTRIB.items()) -128 items2.sort() -129 self.assertEqual(items1, items2) -130 -
131 - def test_lookup_prefix(self): -
132 el_class = self._buildElementClass() -133 el_class.PREFIX = None -134 def lookup(doc, el): -135 if el_class.PREFIX is None: -136 el_class.PREFIX = el.prefix -137 return el_class -
138 self._setClassLookup(lookup) -139 root = self.XML(xml_str) -140 self.assertEqual(root.prefix, root.PREFIX) -141 -
142 - def test_lookup_sourceline(self): -
143 el_class = self._buildElementClass() -144 el_class.LINE = None -145 def lookup(doc, el): -146 if el_class.LINE is None: -147 el_class.LINE = el.sourceline -148 return el_class -
149 self._setClassLookup(lookup) -150 root = self.XML(xml_str) -151 self.assertEqual(root.sourceline, root.LINE) -152 -
153 - def test_lookup_getitem(self): -
154 el_class = self._buildElementClass() -155 el_class.CHILD_TAG = None -156 def lookup(doc, el): -157 el_class.CHILD_TAG = el[0].tag -158 return el_class -
159 self._setClassLookup(lookup) -160 root = self.XML(xml_str) -161 child_tag = root.CHILD_TAG -162 self.assertNotEqual(None, child_tag) -163 self.assertEqual(root[0].tag, child_tag) -164 -
165 - def test_lookup_getitem_neg(self): -
166 el_class = self._buildElementClass() -167 el_class.CHILD_TAG = None -168 def lookup(doc, el): -169 if el_class.CHILD_TAG is None: -170 el_class.CHILD_TAG = el[-1].tag -171 return el_class -
172 self._setClassLookup(lookup) -173 root = self.XML(xml_str) -174 child_tag = root.CHILD_TAG -175 self.assertNotEqual(None, child_tag) -176 self.assertEqual(root[-1].tag, child_tag) -177 -
178 - def test_lookup_getslice(self): -
179 el_class = self._buildElementClass() -180 el_class.CHILD_TAGS = None -181 def lookup(doc, el): -182 if el_class.CHILD_TAGS is None: -183 el_class.CHILD_TAGS = [ c.tag for c in el[1:-1] ] -184 return el_class -
185 self._setClassLookup(lookup) -186 root = self.XML(xml_str) -187 child_tags = root.CHILD_TAGS -188 self.assertNotEqual(None, child_tags) -189 self.assertEqual([ c.tag for c in root[1:-1] ], -190 child_tags) -191 -
192 - def test_lookup_len(self): -
193 el_class = self._buildElementClass() -194 el_class.LEN = None -195 def lookup(doc, el): -196 if el_class.LEN is None: -197 el_class.LEN = len(el) -198 return el_class -
199 self._setClassLookup(lookup) -200 root = self.XML(xml_str) -201 self.assertEqual(1, el_class.LEN) -202 -
203 - def test_lookup_bool(self): -
204 el_class = self._buildElementClass() -205 el_class.TRUE = None -206 def lookup(doc, el): -207 if el_class.TRUE is None: -208 el_class.TRUE = bool(el) -209 return el_class -
210 self._setClassLookup(lookup) -211 root = self.XML(xml_str) -212 self.assertTrue(el_class.TRUE) -213 -
214 - def test_lookup_get(self): -
215 el_class = self._buildElementClass() -216 el_class.VAL = None -217 def lookup(doc, el): -218 if el_class.VAL is None: -219 el_class.VAL = el[0].get('a1') -220 return el_class -
221 self._setClassLookup(lookup) -222 root = self.XML(xml_str) -223 self.assertNotEqual(None, el_class.VAL) -224 self.assertEqual(root[0].get('a1'), el_class.VAL) -225 -
226 - def test_lookup_get_default(self): -
227 el_class = self._buildElementClass() -228 default = str(id(el_class)) -229 el_class.VAL = None -230 def lookup(doc, el): -231 if el_class.VAL is None: -232 el_class.VAL = el[0].get('unknownattribute', default) -233 return el_class -
234 self._setClassLookup(lookup) -235 root = self.XML(xml_str) -236 self.assertEqual(default, el_class.VAL) -237 -
238 - def test_lookup_getchildren(self): -
239 el_class = self._buildElementClass() -240 el_class.CHILD_TAGS = None -241 def lookup(doc, el): -242 if el_class.CHILD_TAGS is None: -243 el_class.CHILD_TAGS = [ c.tag for c in el.getchildren() ] -244 return el_class -
245 self._setClassLookup(lookup) -246 root = self.XML(xml_str) -247 child_tags = root.CHILD_TAGS -248 self.assertNotEqual(None, child_tags) -249 self.assertEqual([ c.tag for c in root.getchildren() ], -250 child_tags) -251 -
252 - def test_lookup_iter_children(self): -
253 el_class = self._buildElementClass() -254 el_class.CHILD_TAGS = None -255 def lookup(doc, el): -256 if el_class.CHILD_TAGS is None: -257 el_class.CHILD_TAGS = [ c.tag for c in el ] -258 return el_class -
259 self._setClassLookup(lookup) -260 root = self.XML(xml_str) -261 child_tags = root.CHILD_TAGS -262 self.assertNotEqual(None, child_tags) -263 self.assertEqual([ c.tag for c in root.getchildren() ], -264 child_tags) -265 -
266 - def test_lookup_iterchildren(self): -
267 el_class = self._buildElementClass() -268 el_class.CHILD_TAGS = None -269 def lookup(doc, el): -270 if el_class.CHILD_TAGS is None: -271 el_class.CHILD_TAGS = [ c.tag for c in el.iterchildren() ] -272 return el_class -
273 self._setClassLookup(lookup) -274 root = self.XML(xml_str) -275 child_tags = root.CHILD_TAGS -276 self.assertNotEqual(None, child_tags) -277 self.assertEqual([ c.tag for c in root.getchildren() ], -278 child_tags) -279 -
281 el_class = self._buildElementClass() -282 el_class.CHILD_TAGS = None -283 def lookup(doc, el): -284 if not el_class.CHILD_TAGS: -285 el_class.CHILD_TAGS = [ -286 c.tag for c in el.iterchildren(tag='{objectified}c2') ] -287 return el_class -
288 self._setClassLookup(lookup) -289 -290 root = self.XML(xml_str) -291 child_tags = root.CHILD_TAGS -292 self.assertNotEqual(None, child_tags) -293 self.assertEqual([], child_tags) -294 -295 c1 = root[0] -296 child_tags = root.CHILD_TAGS -297 self.assertNotEqual(None, child_tags) -298 self.assertNotEqual([], child_tags) -299 self.assertEqual( -300 [ c.tag for c in root[0].iterchildren(tag='{objectified}c2') ], -301 child_tags) -302 -
303 - def test_lookup_getparent(self): -
304 el_class = self._buildElementClass() -305 el_class.PARENT = None -306 def lookup(doc, el): -307 if el_class.PARENT is None: -308 el_class.PARENT = el[0].getparent().tag -309 return el_class -
310 self._setClassLookup(lookup) -311 root = self.XML(xml_str) -312 self.assertEqual(root.tag, root.PARENT) -313 -
314 - def test_lookup_getnext(self): -
315 el_class = self._buildElementClass() -316 el_class.NEXT = None -317 def lookup(doc, el): -318 if el_class.NEXT is None: -319 el_class.NEXT = el[0][1].getnext().tag -320 return el_class -
321 self._setClassLookup(lookup) -322 root = self.XML(xml_str) -323 self.assertNotEqual(None, el_class.NEXT) -324 self.assertEqual(root[0][1].getnext().tag, el_class.NEXT) -325 -
326 - def test_lookup_getprevious(self): -
327 el_class = self._buildElementClass() -328 el_class.PREV = None -329 def lookup(doc, el): -330 if el_class.PREV is None: -331 el_class.PREV = el[0][1].getprevious().tag -332 return el_class -
333 self._setClassLookup(lookup) -334 root = self.XML(xml_str) -335 self.assertNotEqual(None, el_class.PREV) -336 self.assertEqual(root[0][1].getprevious().tag, el_class.PREV) -337 -
338 - def test_comments_fallback(self): -
339 def return_none(*args): -340 return None -
341 -342 self._setClassLookup(return_none) -343 el = self.XML('<a><!-- hello world --></a>') -344 self.assertEqual(el[0].tag, self.etree.Comment) -345 self.assertEqual(el[0].text, " hello world ") -346 -347 -
348 -def test_suite(): -
349 suite = unittest.TestSuite() -350 suite.addTests([unittest.makeSuite(PyClassLookupTestCase)]) -351 return suite -
352 -353 if __name__ == '__main__': -354 print('to test use test.py %s' % __file__) -355 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html b/doc/html/api/lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html deleted file mode 100644 index 82120bc..0000000 --- a/doc/html/api/lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html +++ /dev/null @@ -1,893 +0,0 @@ - - - - - lxml.tests.test_pyclasslookup.PyClassLookupTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_pyclasslookup :: - Class PyClassLookupTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class PyClassLookupTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               PyClassLookupTestCase
-
- -
-Test cases for the lxml.pyclasslookup class lookup mechanism. - - - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
Element(self, - _tag, - attrib=None, - nsmap=None, - **_extra)
- Creates a new element associated with this parser.
- - -
- -
-   - - - - - - -
tearDown(self)
- Hook method for deconstructing the test fixture after testing it.
- source code - -
- -
-   - - - - - - -
_setClassLookup(self, - lookup_function) - source code - -
- -
-   - - - - - - -
_buildElementClass(self) - source code - -
- -
-   - - - - - - -
XML(self, - xml) - source code - -
- -
-   - - - - - - -
test_lookup(self) - source code - -
- -
-   - - - - - - -
test_lookup_keep_ref_assertion(self) - source code - -
- -
-   - - - - - - -
test_lookup_tag(self) - source code - -
- -
-   - - - - - - -
test_lookup_text(self) - source code - -
- -
-   - - - - - - -
test_lookup_tail(self) - source code - -
- -
-   - - - - - - -
test_lookup_attrib(self) - source code - -
- -
-   - - - - - - -
test_lookup_prefix(self) - source code - -
- -
-   - - - - - - -
test_lookup_sourceline(self) - source code - -
- -
-   - - - - - - -
test_lookup_getitem(self) - source code - -
- -
-   - - - - - - -
test_lookup_getitem_neg(self) - source code - -
- -
-   - - - - - - -
test_lookup_getslice(self) - source code - -
- -
-   - - - - - - -
test_lookup_len(self) - source code - -
- -
-   - - - - - - -
test_lookup_bool(self) - source code - -
- -
-   - - - - - - -
test_lookup_get(self) - source code - -
- -
-   - - - - - - -
test_lookup_get_default(self) - source code - -
- -
-   - - - - - - -
test_lookup_getchildren(self) - source code - -
- -
-   - - - - - - -
test_lookup_iter_children(self) - source code - -
- -
-   - - - - - - -
test_lookup_iterchildren(self) - source code - -
- -
-   - - - - - - -
test_lookup_iterchildren_tag(self) - source code - -
- -
-   - - - - - - -
test_lookup_getparent(self) - source code - -
- -
-   - - - - - - -
test_lookup_getnext(self) - source code - -
- -
-   - - - - - - -
test_lookup_getprevious(self) - source code - -
- -
-   - - - - - - -
test_comments_fallback(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - etree
- The lxml.etree module implements the extended ElementTree API for XML. -
-   - - parser = <lxml.etree.XMLParser object> -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

tearDown(self) -

-
source code  -
- - Hook method for deconstructing the test fixture after testing it. -
-
Overrides: - unittest.case.TestCase.tearDown -
(inherited documentation)
- -
-
-
-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

etree

- The lxml.etree module implements the extended ElementTree API for XML. -
-
-
-
Value:
-
lxml.etree
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_relaxng-module.html b/doc/html/api/lxml.tests.test_relaxng-module.html deleted file mode 100644 index 60629a2..0000000 --- a/doc/html/api/lxml.tests.test_relaxng-module.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - lxml.tests.test_relaxng - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_relaxng - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module test_relaxng

source code

-Test cases related to RelaxNG parsing and validation - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - ETreeRelaxNGTestCase -
-   - - RelaxNGCompactTestCase -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
test_suite() - source code - -
- -
- - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - this_dir = '/home/stefan/source/Python/lxml/lxml-release/src/l... -
-   - - rnc2rng = None
- hash(x) -
-   - - __package__ = 'lxml.tests' -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

this_dir

- -
-
-
-
Value:
-
-'/home/stefan/source/Python/lxml/lxml-release/src/lxml/tests'
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_relaxng-pysrc.html b/doc/html/api/lxml.tests.test_relaxng-pysrc.html deleted file mode 100644 index 756b4ad..0000000 --- a/doc/html/api/lxml.tests.test_relaxng-pysrc.html +++ /dev/null @@ -1,740 +0,0 @@ - - - - - lxml.tests.test_relaxng - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_relaxng - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.test_relaxng

-
-  1  # -*- coding: utf-8 -*- 
-  2   
-  3  """ 
-  4  Test cases related to RelaxNG parsing and validation 
-  5  """ 
-  6   
-  7  import unittest, sys, os.path 
-  8   
-  9  this_dir = os.path.dirname(__file__) 
- 10  if this_dir not in sys.path: 
- 11      sys.path.insert(0, this_dir) # needed for Py3 
- 12   
- 13  from common_imports import etree, BytesIO, _bytes, HelperTestCase, fileInTestDir 
- 14  from common_imports import doctest, make_doctest, skipif 
- 15   
- 16  try: 
- 17      import rnc2rng 
- 18  except ImportError: 
- 19      rnc2rng = None 
- 20   
- 21   
-
22 -class ETreeRelaxNGTestCase(HelperTestCase): -
23 - def test_relaxng(self): -
24 tree_valid = self.parse('<a><b></b></a>') - 25 tree_invalid = self.parse('<a><c></c></a>') - 26 schema = self.parse('''\ - 27 <element name="a" xmlns="http://relaxng.org/ns/structure/1.0"> - 28 <zeroOrMore> - 29 <element name="b"> - 30 <text /> - 31 </element> - 32 </zeroOrMore> - 33 </element> - 34 ''') - 35 schema = etree.RelaxNG(schema) - 36 self.assertTrue(schema.validate(tree_valid)) - 37 self.assertFalse(schema.error_log.filter_from_errors()) - 38 - 39 self.assertFalse(schema.validate(tree_invalid)) - 40 self.assertTrue(schema.error_log.filter_from_errors()) - 41 - 42 self.assertTrue(schema.validate(tree_valid)) # repeat valid - 43 self.assertFalse(schema.error_log.filter_from_errors()) # repeat valid -
44 -
45 - def test_relaxng_stringio(self): -
46 tree_valid = self.parse('<a><b></b></a>') - 47 tree_invalid = self.parse('<a><c></c></a>') - 48 schema_file = BytesIO('''\ - 49 <element name="a" xmlns="http://relaxng.org/ns/structure/1.0"> - 50 <zeroOrMore> - 51 <element name="b"> - 52 <text /> - 53 </element> - 54 </zeroOrMore> - 55 </element> - 56 ''') - 57 schema = etree.RelaxNG(file=schema_file) - 58 self.assertTrue(schema.validate(tree_valid)) - 59 self.assertFalse(schema.validate(tree_invalid)) -
60 -
62 self.assertRaises(ValueError, etree.RelaxNG, etree.ElementTree()) -
63 -
64 - def test_relaxng_error(self): -
65 tree_invalid = self.parse('<a><c></c></a>') - 66 schema = self.parse('''\ - 67 <element name="a" xmlns="http://relaxng.org/ns/structure/1.0"> - 68 <zeroOrMore> - 69 <element name="b"> - 70 <text /> - 71 </element> - 72 </zeroOrMore> - 73 </element> - 74 ''') - 75 schema = etree.RelaxNG(schema) - 76 self.assertFalse(schema.validate(tree_invalid)) - 77 errors = schema.error_log - 78 self.assertTrue([log for log in errors - 79 if log.level_name == "ERROR"]) - 80 self.assertTrue([log for log in errors - 81 if "not expect" in log.message]) -
82 -
83 - def test_relaxng_generic_error(self): -
84 tree_invalid = self.parse('''\ - 85 <test> - 86 <reference id="my-ref">This is my unique ref.</reference> - 87 <data ref="my-ref">Valid data</data> - 88 <data ref="myref">Invalid data</data> - 89 </test> - 90 ''') - 91 schema = self.parse('''\ - 92 <grammar datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" - 93 xmlns="http://relaxng.org/ns/structure/1.0"> - 94 <define name="by-ref"> - 95 <data type="IDREF"/> - 96 </define> - 97 <start> - 98 <element name="test"> - 99 <zeroOrMore> -100 <element name="reference"> -101 <attribute name="id"> -102 <data type="ID"/> -103 </attribute> -104 <text/> -105 </element> -106 </zeroOrMore> -107 <zeroOrMore> -108 <element name="data"> -109 <attribute name="ref"> -110 <data type="IDREF"/> -111 </attribute> -112 <text/> -113 </element> -114 </zeroOrMore> -115 </element> -116 </start> -117 </grammar> -118 ''') -119 -120 schema = etree.RelaxNG(schema) -121 self.assertFalse(schema.validate(tree_invalid)) -122 errors = schema.error_log -123 self.assertTrue(errors) -124 self.assertTrue([log for log in errors if "IDREF" in log.message]) -125 self.assertTrue([log for log in errors if "myref" in log.message]) -
126 -
128 schema = self.parse('''\ -129 <element name="a" xmlns="http://relaxng.org/ns/structure/1.0"> -130 <zeroOrMore> -131 <element name="b" /> -132 </zeroOrMore> -133 </element> -134 ''') -135 self.assertRaises(etree.RelaxNGParseError, -136 etree.RelaxNG, schema) -
137 -
139 schema = self.parse('''\ -140 <grammar xmlns="http://relaxng.org/ns/structure/1.0" /> -141 ''') -142 self.assertRaises(etree.RelaxNGParseError, -143 etree.RelaxNG, schema) -
144 -
146 schema = self.parse('''\ -147 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> -148 <define name="test"> -149 <element name="test"/> -150 </define> -151 </grammar> -152 ''') -153 self.assertRaises(etree.RelaxNGParseError, -154 etree.RelaxNG, schema) -
155 -
157 # segfault -158 schema = self.parse('''\ -159 <element name="a" xmlns="mynamespace" /> -160 ''') -161 self.assertRaises(etree.RelaxNGParseError, -162 etree.RelaxNG, schema) -
163 -
164 - def test_relaxng_include(self): -
165 # this will only work if we access the file through path or -166 # file object.. -167 f = open(fileInTestDir('test1.rng'), 'rb') -168 try: -169 schema = etree.RelaxNG(file=f) -170 finally: -171 f.close() -
172 -
173 - def test_relaxng_shortcut(self): -
174 tree_valid = self.parse('<a><b></b></a>') -175 tree_invalid = self.parse('<a><c></c></a>') -176 schema = self.parse('''\ -177 <element name="a" xmlns="http://relaxng.org/ns/structure/1.0"> -178 <zeroOrMore> -179 <element name="b"> -180 <text /> -181 </element> -182 </zeroOrMore> -183 </element> -184 ''') -185 self.assertTrue(tree_valid.relaxng(schema)) -186 self.assertFalse(tree_invalid.relaxng(schema)) -
187 -
188 - def test_multiple_elementrees(self): -
189 tree = self.parse('<a><b>B</b><c>C</c></a>') -190 schema = etree.RelaxNG( self.parse('''\ -191 <element name="a" xmlns="http://relaxng.org/ns/structure/1.0"> -192 <element name="b"> -193 <text /> -194 </element> -195 <element name="c"> -196 <text /> -197 </element> -198 </element> -199 ''') ) -200 self.assertTrue(schema.validate(tree)) -201 self.assertFalse(schema.error_log.filter_from_errors()) -202 -203 self.assertTrue(schema.validate(tree)) # repeat valid -204 self.assertFalse(schema.error_log.filter_from_errors()) # repeat valid -205 -206 schema = etree.RelaxNG( self.parse('''\ -207 <element name="b" xmlns="http://relaxng.org/ns/structure/1.0"> -208 <text /> -209 </element> -210 ''') ) -211 c_tree = etree.ElementTree(tree.getroot()[1]) -212 self.assertEqual(self._rootstring(c_tree), _bytes('<c>C</c>')) -213 self.assertFalse(schema.validate(c_tree)) -214 self.assertTrue(schema.error_log.filter_from_errors()) -215 -216 b_tree = etree.ElementTree(tree.getroot()[0]) -217 self.assertEqual(self._rootstring(b_tree), _bytes('<b>B</b>')) -218 self.assertTrue(schema.validate(b_tree)) -219 self.assertFalse(schema.error_log.filter_from_errors()) -
220 -
221 -class RelaxNGCompactTestCase(HelperTestCase): -
222 -223 pytestmark = skipif('rnc2rng is None') -224 -
225 - def test_relaxng_compact(self): -
226 tree_valid = self.parse('<a><b>B</b><c>C</c></a>') -227 tree_invalid = self.parse('<a><b></b></a>') -228 schema = etree.RelaxNG(file=fileInTestDir('test.rnc')) -229 self.assertTrue(schema.validate(tree_valid)) -230 self.assertFalse(schema.validate(tree_invalid)) -
231 -
233 f = open(fileInTestDir('test.rnc'), 'rb') -234 try: -235 schema = etree.RelaxNG(file=f) -236 finally: -237 f.close() -
238 -
239 - def test_relaxng_compact_str(self): -
240 tree_valid = self.parse('<a><b>B</b></a>') -241 rnc_str = 'element a { element b { "B" } }' -242 schema = etree.RelaxNG.from_rnc_string(rnc_str) -243 self.assertTrue(schema.validate(tree_valid)) -
244 -245 -
246 -def test_suite(): -
247 suite = unittest.TestSuite() -248 suite.addTests([unittest.makeSuite(ETreeRelaxNGTestCase)]) -249 suite.addTests( -250 [make_doctest('../../../doc/validation.txt')]) -251 if rnc2rng is not None: -252 suite.addTests([unittest.makeSuite(RelaxNGCompactTestCase)]) -253 return suite -
254 -255 if __name__ == '__main__': -256 print('to test use test.py %s' % __file__) -257 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_relaxng.ETreeRelaxNGTestCase-class.html b/doc/html/api/lxml.tests.test_relaxng.ETreeRelaxNGTestCase-class.html deleted file mode 100644 index 075b9fc..0000000 --- a/doc/html/api/lxml.tests.test_relaxng.ETreeRelaxNGTestCase-class.html +++ /dev/null @@ -1,537 +0,0 @@ - - - - - lxml.tests.test_relaxng.ETreeRelaxNGTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_relaxng :: - Class ETreeRelaxNGTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ETreeRelaxNGTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ETreeRelaxNGTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_relaxng(self) - source code - -
- -
-   - - - - - - -
test_relaxng_stringio(self) - source code - -
- -
-   - - - - - - -
test_relaxng_elementtree_error(self) - source code - -
- -
-   - - - - - - -
test_relaxng_error(self) - source code - -
- -
-   - - - - - - -
test_relaxng_generic_error(self) - source code - -
- -
-   - - - - - - -
test_relaxng_invalid_schema(self) - source code - -
- -
-   - - - - - - -
test_relaxng_invalid_schema2(self) - source code - -
- -
-   - - - - - - -
test_relaxng_invalid_schema3(self) - source code - -
- -
-   - - - - - - -
test_relaxng_invalid_schema4(self) - source code - -
- -
-   - - - - - - -
test_relaxng_include(self) - source code - -
- -
-   - - - - - - -
test_relaxng_shortcut(self) - source code - -
- -
-   - - - - - - -
test_multiple_elementrees(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_relaxng.RelaxNGCompactTestCase-class.html b/doc/html/api/lxml.tests.test_relaxng.RelaxNGCompactTestCase-class.html deleted file mode 100644 index 3d27735..0000000 --- a/doc/html/api/lxml.tests.test_relaxng.RelaxNGCompactTestCase-class.html +++ /dev/null @@ -1,400 +0,0 @@ - - - - - lxml.tests.test_relaxng.RelaxNGCompactTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_relaxng :: - Class RelaxNGCompactTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class RelaxNGCompactTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               RelaxNGCompactTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_relaxng_compact(self) - source code - -
- -
-   - - - - - - -
test_relaxng_compact_file_obj(self) - source code - -
- -
-   - - - - - - -
test_relaxng_compact_str(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - pytestmark = <lxml.tests.common_imports.skipif object> -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_sax-module.html b/doc/html/api/lxml.tests.test_sax-module.html deleted file mode 100644 index e20b4c8..0000000 --- a/doc/html/api/lxml.tests.test_sax-module.html +++ /dev/null @@ -1,246 +0,0 @@ - - - - - lxml.tests.test_sax - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_sax - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module test_sax

source code

-Test cases related to SAX I/O - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - ETreeSaxTestCase -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
test_suite() - source code - -
- -
- - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - this_dir = '/home/stefan/source/Python/lxml/lxml-release/src/l... -
-   - - __package__ = 'lxml.tests' -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

this_dir

- -
-
-
-
Value:
-
-'/home/stefan/source/Python/lxml/lxml-release/src/lxml/tests'
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_sax-pysrc.html b/doc/html/api/lxml.tests.test_sax-pysrc.html deleted file mode 100644 index 9c60311..0000000 --- a/doc/html/api/lxml.tests.test_sax-pysrc.html +++ /dev/null @@ -1,681 +0,0 @@ - - - - - lxml.tests.test_sax - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_sax - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.test_sax

-
-  1  # -*- coding: utf-8 -*- 
-  2   
-  3  """ 
-  4  Test cases related to SAX I/O 
-  5  """ 
-  6   
-  7  import unittest, sys, os.path 
-  8   
-  9  this_dir = os.path.dirname(__file__) 
- 10  if this_dir not in sys.path: 
- 11      sys.path.insert(0, this_dir) # needed for Py3 
- 12   
- 13  from common_imports import HelperTestCase, make_doctest, BytesIO, _bytes 
- 14  from lxml import sax 
- 15  from xml.dom import pulldom 
- 16   
- 17   
-
18 -class ETreeSaxTestCase(HelperTestCase): -
19 -
20 - def test_etree_sax_simple(self): -
21 tree = self.parse('<a>ab<b/>ba</a>') - 22 xml_out = self._saxify_serialize(tree) - 23 self.assertEqual(_bytes('<a>ab<b/>ba</a>'), - 24 xml_out) -
25 -
26 - def test_etree_sax_double(self): -
27 tree = self.parse('<a>ab<b>bb</b>ba</a>') - 28 xml_out = self._saxify_serialize(tree) - 29 self.assertEqual(_bytes('<a>ab<b>bb</b>ba</a>'), - 30 xml_out) -
31 -
32 - def test_etree_sax_comment(self): -
33 tree = self.parse('<a>ab<!-- TEST -->ba</a>') - 34 xml_out = self._saxify_serialize(tree) - 35 self.assertEqual(_bytes('<a>abba</a>'), - 36 xml_out) -
37 -
38 - def test_etree_sax_pi(self): -
39 tree = self.parse('<a>ab<?this and that?>ba</a>') - 40 xml_out = self._saxify_serialize(tree) - 41 self.assertEqual(_bytes('<a>ab<?this and that?>ba</a>'), - 42 xml_out) -
43 -
45 tree = self.parse('<!-- TEST --><a>ab</a>') - 46 xml_out = self._saxify_serialize(tree) - 47 self.assertEqual(_bytes('<a>ab</a>'), - 48 xml_out) -
49 -
50 - def test_etree_sax_pi_root(self): -
51 tree = self.parse('<?this and that?><a>ab</a>') - 52 xml_out = self._saxify_serialize(tree) - 53 self.assertEqual(_bytes('<?this and that?><a>ab</a>'), - 54 xml_out) -
55 -
56 - def test_etree_sax_attributes(self): -
57 tree = self.parse('<a aa="5">ab<b b="5"/>ba</a>') - 58 xml_out = self._saxify_serialize(tree) - 59 self.assertEqual(_bytes('<a aa="5">ab<b b="5"/>ba</a>'), - 60 xml_out) -
61 -
62 - def test_etree_sax_ns1(self): -
63 tree = self.parse('<a xmlns="bla">ab<b>bb</b>ba</a>') - 64 new_tree = self._saxify_unsaxify(tree) - 65 root = new_tree.getroot() - 66 self.assertEqual('{bla}a', - 67 root.tag) - 68 self.assertEqual('{bla}b', - 69 root[0].tag) -
70 -
71 - def test_etree_sax_ns2(self): -
72 tree = self.parse('<a xmlns="blaA">ab<b:b xmlns:b="blaB">bb</b:b>ba</a>') - 73 new_tree = self._saxify_unsaxify(tree) - 74 root = new_tree.getroot() - 75 self.assertEqual('{blaA}a', - 76 root.tag) - 77 self.assertEqual('{blaB}b', - 78 root[0].tag) -
79 -
80 - def test_sax_to_pulldom(self): -
81 tree = self.parse('<a xmlns="blaA">ab<b:b xmlns:b="blaB">bb</b:b>ba</a>') - 82 handler = pulldom.SAX2DOM() - 83 sax.saxify(tree, handler) - 84 dom = handler.document - 85 - 86 self.assertEqual('a', - 87 dom.firstChild.localName) - 88 self.assertEqual('blaA', - 89 dom.firstChild.namespaceURI) - 90 - 91 children = dom.firstChild.childNodes - 92 self.assertEqual('ab', - 93 children[0].nodeValue) - 94 self.assertEqual('blaB', - 95 children[1].namespaceURI) - 96 self.assertEqual('ba', - 97 children[2].nodeValue) -
98 -
99 - def test_element_sax(self): -
100 tree = self.parse('<a><b/></a>') -101 a = tree.getroot() -102 b = a[0] -103 -104 xml_out = self._saxify_serialize(a) -105 self.assertEqual(_bytes('<a><b/></a>'), -106 xml_out) -107 -108 xml_out = self._saxify_serialize(b) -109 self.assertEqual(_bytes('<b/>'), -110 xml_out) -
111 -
112 - def test_element_sax_ns(self): -
113 tree = self.parse('<a:a xmlns:a="blaA"><b/></a:a>') -114 a = tree.getroot() -115 b = a[0] -116 -117 new_tree = self._saxify_unsaxify(a) -118 root = new_tree.getroot() -119 self.assertEqual('{blaA}a', -120 root.tag) -121 self.assertEqual('b', -122 root[0].tag) -123 -124 new_tree = self._saxify_unsaxify(b) -125 root = new_tree.getroot() -126 self.assertEqual('b', -127 root.tag) -128 self.assertEqual(0, -129 len(root)) -
130 -
132 handler = sax.ElementTreeContentHandler() -133 handler.startDocument() -134 handler.startPrefixMapping(None, 'blaA') -135 handler.startElementNS(('blaA', 'a'), 'a', {}) -136 handler.startPrefixMapping(None, 'blaB') -137 handler.startElementNS(('blaB', 'b'), 'b', {}) -138 handler.endElementNS( ('blaB', 'b'), 'b') -139 handler.endPrefixMapping(None) -140 handler.startElementNS(('blaA', 'c'), 'c', {}) -141 handler.endElementNS( ('blaA', 'c'), 'c') -142 handler.endElementNS( ('blaA', 'a'), 'a') -143 handler.endPrefixMapping(None) -144 handler.endDocument() -145 -146 new_tree = handler.etree -147 root = new_tree.getroot() -148 self.assertEqual('{blaA}a', -149 root.tag) -150 self.assertEqual('{blaB}b', -151 root[0].tag) -152 self.assertEqual('{blaA}c', -153 root[1].tag) -
154 -
156 handler = sax.ElementTreeContentHandler() -157 handler.startDocument() -158 handler.startPrefixMapping(None, 'blaA') -159 handler.startElementNS((None, 'a'), 'a', {}) -160 handler.startPrefixMapping(None, 'blaB') -161 handler.startElementNS((None, 'b'), 'b', {}) -162 handler.endElementNS( (None, 'b'), 'b') -163 handler.endPrefixMapping(None) -164 handler.startElementNS((None, 'c'), 'c', {}) -165 handler.endElementNS( (None, 'c'), 'c') -166 handler.endElementNS( (None, 'a'), 'a') -167 handler.endPrefixMapping(None) -168 handler.endDocument() -169 -170 new_tree = handler.etree -171 root = new_tree.getroot() -172 self.assertEqual('{blaA}a', -173 root.tag) -174 self.assertEqual('{blaB}b', -175 root[0].tag) -176 self.assertEqual('{blaA}c', -177 root[1].tag) -
178 -
179 - def test_etree_sax_redefine_ns(self): -
180 handler = sax.ElementTreeContentHandler() -181 handler.startDocument() -182 handler.startPrefixMapping('ns', 'blaA') -183 handler.startElementNS(('blaA', 'a'), 'ns:a', {}) -184 handler.startPrefixMapping('ns', 'blaB') -185 handler.startElementNS(('blaB', 'b'), 'ns:b', {}) -186 handler.endElementNS( ('blaB', 'b'), 'ns:b') -187 handler.endPrefixMapping('ns') -188 handler.startElementNS(('blaA', 'c'), 'ns:c', {}) -189 handler.endElementNS( ('blaA', 'c'), 'ns:c') -190 handler.endElementNS( ('blaA', 'a'), 'ns:a') -191 handler.endPrefixMapping('ns') -192 handler.endDocument() -193 -194 new_tree = handler.etree -195 root = new_tree.getroot() -196 self.assertEqual('{blaA}a', -197 root.tag) -198 self.assertEqual('{blaB}b', -199 root[0].tag) -200 self.assertEqual('{blaA}c', -201 root[1].tag) -
202 -
203 - def test_etree_sax_no_ns(self): -
204 handler = sax.ElementTreeContentHandler() -205 handler.startDocument() -206 handler.startElement('a', {}) -207 handler.startElement('b', {}) -208 handler.endElement('b') -209 handler.startElement('c') # with empty attributes -210 handler.endElement('c') -211 handler.endElement('a') -212 handler.endDocument() -213 -214 new_tree = handler.etree -215 root = new_tree.getroot() -216 self.assertEqual('a', root.tag) -217 self.assertEqual('b', root[0].tag) -218 self.assertEqual('c', root[1].tag) -
219 -
221 handler = sax.ElementTreeContentHandler() -222 handler.startDocument() -223 handler.startElement('a', {"attr_a1": "a1"}) -224 handler.startElement('b', {"attr_b1": "b1"}) -225 handler.endElement('b') -226 handler.endElement('a') -227 handler.endDocument() -228 -229 new_tree = handler.etree -230 root = new_tree.getroot() -231 self.assertEqual('a', root.tag) -232 self.assertEqual('b', root[0].tag) -233 self.assertEqual('a1', root.attrib["attr_a1"]) -234 self.assertEqual('b1', root[0].attrib["attr_b1"]) -
235 -
237 handler = sax.ElementTreeContentHandler() -238 handler.startDocument() -239 -240 self.assertRaises(ValueError, -241 handler.startElement, -242 'a', {"blaA:attr_a1": "a1"} -243 ) -
244 -
245 - def test_etree_sax_error(self): -
246 handler = sax.ElementTreeContentHandler() -247 handler.startDocument() -248 handler.startElement('a') -249 self.assertRaises(sax.SaxError, handler.endElement, 'b') -
250 -
251 - def test_etree_sax_error2(self): -
252 handler = sax.ElementTreeContentHandler() -253 handler.startDocument() -254 handler.startElement('a') -255 handler.startElement('b') -256 self.assertRaises(sax.SaxError, handler.endElement, 'a') -
257 -
258 - def _saxify_unsaxify(self, saxifiable): -
259 handler = sax.ElementTreeContentHandler() -260 sax.ElementTreeProducer(saxifiable, handler).saxify() -261 return handler.etree -
262 -
263 - def _saxify_serialize(self, tree): -
264 new_tree = self._saxify_unsaxify(tree) -265 f = BytesIO() -266 new_tree.write(f) -267 return f.getvalue().replace(_bytes('\n'), _bytes('')) -
268 -269 -
270 -def test_suite(): -
271 suite = unittest.TestSuite() -272 suite.addTests([unittest.makeSuite(ETreeSaxTestCase)]) -273 suite.addTests( -274 [make_doctest('../../../doc/sax.txt')]) -275 return suite -
276 -277 -278 if __name__ == '__main__': -279 print('to test use test.py %s' % __file__) -280 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_sax.ETreeSaxTestCase-class.html b/doc/html/api/lxml.tests.test_sax.ETreeSaxTestCase-class.html deleted file mode 100644 index 4af9d1a..0000000 --- a/doc/html/api/lxml.tests.test_sax.ETreeSaxTestCase-class.html +++ /dev/null @@ -1,699 +0,0 @@ - - - - - lxml.tests.test_sax.ETreeSaxTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_sax :: - Class ETreeSaxTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ETreeSaxTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ETreeSaxTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_etree_sax_simple(self) - source code - -
- -
-   - - - - - - -
test_etree_sax_double(self) - source code - -
- -
-   - - - - - - -
test_etree_sax_comment(self) - source code - -
- -
-   - - - - - - -
test_etree_sax_pi(self) - source code - -
- -
-   - - - - - - -
test_etree_sax_comment_root(self) - source code - -
- -
-   - - - - - - -
test_etree_sax_pi_root(self) - source code - -
- -
-   - - - - - - -
test_etree_sax_attributes(self) - source code - -
- -
-   - - - - - - -
test_etree_sax_ns1(self) - source code - -
- -
-   - - - - - - -
test_etree_sax_ns2(self) - source code - -
- -
-   - - - - - - -
test_sax_to_pulldom(self) - source code - -
- -
-   - - - - - - -
test_element_sax(self) - source code - -
- -
-   - - - - - - -
test_element_sax_ns(self) - source code - -
- -
-   - - - - - - -
test_etree_sax_handler_default_ns(self) - source code - -
- -
-   - - - - - - -
test_etree_sax_handler_default_ns_None(self) - source code - -
- -
-   - - - - - - -
test_etree_sax_redefine_ns(self) - source code - -
- -
-   - - - - - - -
test_etree_sax_no_ns(self) - source code - -
- -
-   - - - - - - -
test_etree_sax_no_ns_attributes(self) - source code - -
- -
-   - - - - - - -
test_etree_sax_ns_attributes(self) - source code - -
- -
-   - - - - - - -
test_etree_sax_error(self) - source code - -
- -
-   - - - - - - -
test_etree_sax_error2(self) - source code - -
- -
-   - - - - - - -
_saxify_unsaxify(self, - saxifiable) - source code - -
- -
-   - - - - - - -
_saxify_serialize(self, - tree) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_schematron-module.html b/doc/html/api/lxml.tests.test_schematron-module.html deleted file mode 100644 index b97389c..0000000 --- a/doc/html/api/lxml.tests.test_schematron-module.html +++ /dev/null @@ -1,246 +0,0 @@ - - - - - lxml.tests.test_schematron - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_schematron - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module test_schematron

source code

-Test cases related to Schematron parsing and validation - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - ETreeSchematronTestCase -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
test_suite() - source code - -
- -
- - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - this_dir = '/home/stefan/source/Python/lxml/lxml-release/src/l... -
-   - - __package__ = 'lxml.tests' -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

this_dir

- -
-
-
-
Value:
-
-'/home/stefan/source/Python/lxml/lxml-release/src/lxml/tests'
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_schematron-pysrc.html b/doc/html/api/lxml.tests.test_schematron-pysrc.html deleted file mode 100644 index 034b91e..0000000 --- a/doc/html/api/lxml.tests.test_schematron-pysrc.html +++ /dev/null @@ -1,376 +0,0 @@ - - - - - lxml.tests.test_schematron - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_schematron - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.test_schematron

-
- 1  # -*- coding: utf-8 -*- 
- 2   
- 3  """ 
- 4  Test cases related to Schematron parsing and validation 
- 5  """ 
- 6   
- 7  import unittest, sys, os.path 
- 8   
- 9  this_dir = os.path.dirname(__file__) 
-10  if this_dir not in sys.path: 
-11      sys.path.insert(0, this_dir) # needed for Py3 
-12   
-13  from common_imports import etree, HelperTestCase, fileInTestDir 
-14  from common_imports import doctest, make_doctest 
-15   
-
16 -class ETreeSchematronTestCase(HelperTestCase): -
17 - def test_schematron(self): -
18 tree_valid = self.parse('<AAA><BBB/><CCC/></AAA>') -19 tree_invalid = self.parse('<AAA><BBB/><CCC/><DDD/></AAA>') -20 schema = self.parse('''\ -21 <schema xmlns="http://purl.oclc.org/dsdl/schematron" > -22 <pattern name="Open model"> -23 <rule context="AAA"> -24 <assert test="BBB"> BBB element is not present</assert> -25 <assert test="CCC"> CCC element is not present</assert> -26 </rule> -27 </pattern> -28 <pattern name="Closed model"> -29 <rule context="AAA"> -30 <assert test="BBB"> BBB element is not present</assert> -31 <assert test="CCC"> CCC element is not present</assert> -32 <assert test="count(BBB|CCC) = count (*)">There is an extra element</assert> -33 </rule> -34 </pattern> -35 </schema> -36 ''') -37 schema = etree.Schematron(schema) -38 self.assertTrue(schema.validate(tree_valid)) -39 self.assertFalse(schema.error_log.filter_from_errors()) -40 -41 self.assertFalse(schema.validate(tree_invalid)) -42 self.assertTrue(schema.error_log.filter_from_errors()) -43 -44 self.assertTrue(schema.validate(tree_valid)) # repeat valid -45 self.assertFalse(schema.error_log.filter_from_errors()) # repeat valid -
46 -
48 self.assertRaises(ValueError, etree.Schematron, etree.ElementTree()) -
49 -
51 schema = self.parse('''\ -52 <schema xmlns="http://purl.oclc.org/dsdl/schematron" > -53 <pattern name="Open model"> -54 </pattern> -55 </schema> -56 ''') -57 self.assertRaises(etree.SchematronParseError, -58 etree.Schematron, schema) -
59 -
61 schema = self.parse('''\ -62 <schema xmlns="http://purl.oclc.org/dsdl/schematron" /> -63 ''') -64 self.assertRaises(etree.SchematronParseError, -65 etree.Schematron, schema) -
66 -
68 # segfault -69 schema = self.parse('''\ -70 <schema xmlns="mynamespace" /> -71 ''') -72 self.assertRaises(etree.SchematronParseError, -73 etree.Schematron, schema) -
74 -75 -
76 -def test_suite(): -
77 suite = unittest.TestSuite() -78 suite.addTests([unittest.makeSuite(ETreeSchematronTestCase)]) -79 suite.addTests( -80 [make_doctest('../../../doc/validation.txt')]) -81 return suite -
82 -83 if __name__ == '__main__': -84 print('to test use test.py %s' % __file__) -85 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_schematron.ETreeSchematronTestCase-class.html b/doc/html/api/lxml.tests.test_schematron.ETreeSchematronTestCase-class.html deleted file mode 100644 index 83f53ac..0000000 --- a/doc/html/api/lxml.tests.test_schematron.ETreeSchematronTestCase-class.html +++ /dev/null @@ -1,425 +0,0 @@ - - - - - lxml.tests.test_schematron.ETreeSchematronTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_schematron :: - Class ETreeSchematronTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ETreeSchematronTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ETreeSchematronTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_schematron(self) - source code - -
- -
-   - - - - - - -
test_schematron_elementtree_error(self) - source code - -
- -
-   - - - - - - -
test_schematron_invalid_schema(self) - source code - -
- -
-   - - - - - - -
test_schematron_invalid_schema_empty(self) - source code - -
- -
-   - - - - - - -
test_schematron_invalid_schema_namespace(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_threading-module.html b/doc/html/api/lxml.tests.test_threading-module.html deleted file mode 100644 index ef74a67..0000000 --- a/doc/html/api/lxml.tests.test_threading-module.html +++ /dev/null @@ -1,255 +0,0 @@ - - - - - lxml.tests.test_threading - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_threading - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module test_threading

source code

-Tests for thread usage in lxml.etree. - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - ThreadingTestCase
- Threading tests -
-   - - ThreadPipelineTestCase
- Threading tests based on a thread worker pipeline. -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
test_suite() - source code - -
- -
- - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - this_dir = '/home/stefan/source/Python/lxml/lxml-release/src/l... -
-   - - __package__ = 'lxml.tests' -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

this_dir

- -
-
-
-
Value:
-
-'/home/stefan/source/Python/lxml/lxml-release/src/lxml/tests'
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_threading-pysrc.html b/doc/html/api/lxml.tests.test_threading-pysrc.html deleted file mode 100644 index c71312b..0000000 --- a/doc/html/api/lxml.tests.test_threading-pysrc.html +++ /dev/null @@ -1,1417 +0,0 @@ - - - - - lxml.tests.test_threading - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_threading - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.test_threading

-
-  1  # -*- coding: utf-8 -*- 
-  2   
-  3  """ 
-  4  Tests for thread usage in lxml.etree. 
-  5  """ 
-  6   
-  7  import re 
-  8  import sys 
-  9  import os.path 
- 10  import unittest 
- 11  import threading 
- 12   
- 13  this_dir = os.path.dirname(__file__) 
- 14  if this_dir not in sys.path: 
- 15      sys.path.insert(0, this_dir) # needed for Py3 
- 16   
- 17  from common_imports import etree, HelperTestCase, BytesIO, _bytes 
- 18   
- 19  try: 
- 20      from Queue import Queue 
- 21  except ImportError: 
- 22      from queue import Queue # Py3 
- 23   
- 24   
-
25 -class ThreadingTestCase(HelperTestCase): -
26 """Threading tests""" - 27 etree = etree - 28 -
29 - def _run_thread(self, func): -
30 thread = threading.Thread(target=func) - 31 thread.start() - 32 thread.join() -
33 -
34 - def _run_threads(self, count, func, main_func=None): -
35 sync = threading.Event() - 36 lock = threading.Lock() - 37 counter = dict(started=0, finished=0, failed=0) - 38 - 39 def sync_start(func): - 40 with lock: - 41 started = counter['started'] + 1 - 42 counter['started'] = started - 43 if started < count + (main_func is not None): - 44 sync.wait(4) # wait until the other threads have started up - 45 assert sync.is_set() - 46 sync.set() # all waiting => go! - 47 try: - 48 func() - 49 except: - 50 with lock: - 51 counter['failed'] += 1 - 52 raise - 53 else: - 54 with lock: - 55 counter['finished'] += 1 -
56 - 57 threads = [threading.Thread(target=sync_start, args=(func,)) for _ in range(count)] - 58 for thread in threads: - 59 thread.start() - 60 if main_func is not None: - 61 sync_start(main_func) - 62 for thread in threads: - 63 thread.join() - 64 - 65 self.assertEqual(0, counter['failed']) - 66 self.assertEqual(counter['finished'], counter['started']) -
67 -
68 - def test_subtree_copy_thread(self): -
69 tostring = self.etree.tostring - 70 XML = self.etree.XML - 71 xml = _bytes("<root><threadtag/></root>") - 72 main_root = XML(_bytes("<root/>")) - 73 - 74 def run_thread(): - 75 thread_root = XML(xml) - 76 main_root.append(thread_root[0]) - 77 del thread_root -
78 - 79 self._run_thread(run_thread) - 80 self.assertEqual(xml, tostring(main_root)) - 81 -
82 - def test_main_xslt_in_thread(self): -
83 XML = self.etree.XML - 84 style = XML(_bytes('''\ - 85 <xsl:stylesheet version="1.0" - 86 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 87 <xsl:template match="*"> - 88 <foo><xsl:copy><xsl:value-of select="/a/b/text()" /></xsl:copy></foo> - 89 </xsl:template> - 90 </xsl:stylesheet>''')) - 91 st = etree.XSLT(style) - 92 - 93 result = [] - 94 - 95 def run_thread(): - 96 root = XML(_bytes('<a><b>B</b><c>C</c></a>')) - 97 result.append( st(root) ) -
98 - 99 self._run_thread(run_thread) -100 self.assertEqual('''\ -101 <?xml version="1.0"?> -102 <foo><a>B</a></foo> -103 ''', -104 str(result[0])) -105 -
106 - def test_thread_xslt(self): -
107 XML = self.etree.XML -108 tostring = self.etree.tostring -109 root = XML(_bytes('<a><b>B</b><c>C</c></a>')) -110 -111 def run_thread(): -112 style = XML(_bytes('''\ -113 <xsl:stylesheet version="1.0" -114 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> -115 <xsl:template match="*"> -116 <foo><xsl:copy><xsl:value-of select="/a/b/text()" /></xsl:copy></foo> -117 </xsl:template> -118 </xsl:stylesheet>''')) -119 st = etree.XSLT(style) -120 root.append( st(root).getroot() ) -
121 -122 self._run_thread(run_thread) -123 self.assertEqual(_bytes('<a><b>B</b><c>C</c><foo><a>B</a></foo></a>'), -124 tostring(root)) -125 -
127 style = self.parse('''\ -128 <xsl:stylesheet version="1.0" -129 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> -130 <xsl:template match="tag" /> -131 <!-- extend time for parsing + transform --> -132 ''' + '\n'.join('<xsl:template match="tag%x" />' % i for i in range(200)) + ''' -133 <xsl:foo /> -134 </xsl:stylesheet>''') -135 self.assertRaises(etree.XSLTParseError, -136 etree.XSLT, style) -137 -138 error_logs = [] -139 -140 def run_thread(): -141 try: -142 etree.XSLT(style) -143 except etree.XSLTParseError as e: -144 error_logs.append(e.error_log) -145 else: -146 self.assertFalse(True, "XSLT parsing should have failed but didn't") -
147 -148 self._run_threads(16, run_thread) -149 -150 self.assertEqual(16, len(error_logs)) -151 last_log = None -152 for log in error_logs: -153 self.assertTrue(len(log)) -154 if last_log is not None: -155 self.assertEqual(len(last_log), len(log)) -156 self.assertEqual(4, len(log)) -157 for error in log: -158 self.assertTrue(':ERROR:XSLT:' in str(error)) -159 last_log = log -160 -
162 tree = self.parse('<tagFF/>') -163 style = self.parse('''\ -164 <xsl:stylesheet version="1.0" -165 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> -166 <xsl:template name="tag0"> -167 <xsl:message terminate="yes">FAIL</xsl:message> -168 </xsl:template> -169 <!-- extend time for parsing + transform --> -170 ''' + '\n'.join('<xsl:template match="tag%X" name="tag%x"> <xsl:call-template name="tag%x" /> </xsl:template>' % (i, i, i-1) -171 for i in range(1, 256)) + ''' -172 </xsl:stylesheet>''') -173 self.assertRaises(etree.XSLTApplyError, -174 etree.XSLT(style), tree) -175 -176 error_logs = [] -177 -178 def run_thread(): -179 transform = etree.XSLT(style) -180 try: -181 transform(tree) -182 except etree.XSLTApplyError: -183 error_logs.append(transform.error_log) -184 else: -185 self.assertFalse(True, "XSLT parsing should have failed but didn't") -
186 -187 self._run_threads(16, run_thread) -188 -189 self.assertEqual(16, len(error_logs)) -190 last_log = None -191 for log in error_logs: -192 self.assertTrue(len(log)) -193 if last_log is not None: -194 self.assertEqual(len(last_log), len(log)) -195 self.assertEqual(1, len(log)) -196 for error in log: -197 self.assertTrue(':ERROR:XSLT:' in str(error)) -198 last_log = log -199 -
201 # this is the only case in XSLT where the result tree can be -202 # modified in-place -203 XML = self.etree.XML -204 tostring = self.etree.tostring -205 style = self.etree.XSLT(XML(_bytes('''\ -206 <xsl:stylesheet version="1.0" -207 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> -208 <xsl:template match="*"> -209 <root class="abc"> -210 <xsl:copy-of select="@class" /> -211 <xsl:attribute name="class">xyz</xsl:attribute> -212 </root> -213 </xsl:template> -214 </xsl:stylesheet>'''))) -215 -216 result = [] -217 def run_thread(): -218 root = XML(_bytes('<ROOT class="ABC" />')) -219 result.append( style(root).getroot() ) -
220 -221 self._run_thread(run_thread) -222 self.assertEqual(_bytes('<root class="xyz"/>'), -223 tostring(result[0])) -224 -
225 - def test_thread_create_xslt(self): -
226 XML = self.etree.XML -227 tostring = self.etree.tostring -228 root = XML(_bytes('<a><b>B</b><c>C</c></a>')) -229 -230 stylesheets = [] -231 -232 def run_thread(): -233 style = XML(_bytes('''\ -234 <xsl:stylesheet -235 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -236 version="1.0"> -237 <xsl:output method="xml" /> -238 <xsl:template match="/"> -239 <div id="test"> -240 <xsl:apply-templates/> -241 </div> -242 </xsl:template> -243 </xsl:stylesheet>''')) -244 stylesheets.append( etree.XSLT(style) ) -
245 -246 self._run_thread(run_thread) -247 -248 st = stylesheets[0] -249 result = tostring( st(root) ) -250 -251 self.assertEqual(_bytes('<div id="test">BC</div>'), -252 result) -253 -
254 - def test_thread_error_log(self): -
255 XML = self.etree.XML -256 expected_error = [self.etree.ErrorTypes.ERR_TAG_NAME_MISMATCH] -257 children = "<a>test</a>" * 100 -258 -259 def parse_error_test(thread_no): -260 tag = "tag%d" % thread_no -261 xml = "<%s>%s</%s>" % (tag, children, tag.upper()) -262 parser = self.etree.XMLParser() -263 for _ in range(10): -264 errors = None -265 try: -266 XML(xml, parser) -267 except self.etree.ParseError: -268 e = sys.exc_info()[1] -269 errors = e.error_log.filter_types(expected_error) -270 self.assertTrue(errors, "Expected error not found") -271 for error in errors: -272 self.assertTrue( -273 tag in error.message and tag.upper() in error.message, -274 "%s and %s not found in '%s'" % ( -275 tag, tag.upper(), error.message)) -
276 -277 self.etree.clear_error_log() -278 threads = [] -279 for thread_no in range(1, 10): -280 t = threading.Thread(target=parse_error_test, -281 args=(thread_no,)) -282 threads.append(t) -283 t.start() -284 -285 parse_error_test(0) -286 -287 for t in threads: -288 t.join() -289 -
290 - def test_thread_mix(self): -
291 XML = self.etree.XML -292 Element = self.etree.Element -293 SubElement = self.etree.SubElement -294 tostring = self.etree.tostring -295 xml = _bytes('<a><b>B</b><c xmlns="test">C</c></a>') -296 root = XML(xml) -297 fragment = XML(_bytes("<other><tags/></other>")) -298 -299 result = self.etree.Element("{myns}root", att = "someval") -300 -301 def run_XML(): -302 thread_root = XML(xml) -303 result.append(thread_root[0]) -304 result.append(thread_root[-1]) -
305 -306 def run_parse(): -307 thread_root = self.etree.parse(BytesIO(xml)).getroot() -308 result.append(thread_root[0]) -309 result.append(thread_root[-1]) -310 -311 def run_move_main(): -312 result.append(fragment[0]) -313 -314 def run_build(): -315 result.append( -316 Element("{myns}foo", attrib={'{test}attr':'val'})) -317 SubElement(result, "{otherns}tasty") -318 -319 def run_xslt(): -320 style = XML(_bytes('''\ -321 <xsl:stylesheet version="1.0" -322 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> -323 <xsl:template match="*"> -324 <xsl:copy><foo><xsl:value-of select="/a/b/text()" /></foo></xsl:copy> -325 </xsl:template> -326 </xsl:stylesheet>''')) -327 st = etree.XSLT(style) -328 result.append( st(root).getroot() ) -329 -330 for test in (run_XML, run_parse, run_move_main, run_xslt, run_build): -331 tostring(result) -332 self._run_thread(test) -333 -334 self.assertEqual( -335 _bytes('<ns0:root xmlns:ns0="myns" att="someval"><b>B</b>' -336 '<c xmlns="test">C</c><b>B</b><c xmlns="test">C</c><tags/>' -337 '<a><foo>B</foo></a>' -338 '<ns0:foo xmlns:ns1="test" ns1:attr="val"/>' -339 '<ns1:tasty xmlns:ns1="otherns"/></ns0:root>'), -340 tostring(result)) -341 -342 def strip_first(): -343 root = Element("newroot") -344 root.append(result[0]) -345 -346 while len(result): -347 self._run_thread(strip_first) -348 -349 self.assertEqual( -350 _bytes('<ns0:root xmlns:ns0="myns" att="someval"/>'), -351 tostring(result)) -352 -
354 SubElement = self.etree.SubElement -355 names = list('abcdefghijklmnop') -356 runs_per_name = range(50) -357 result_matches = re.compile( -358 br'<thread_root>' -359 br'(?:<[a-p]{5} thread_attr_[a-p]="value" thread_attr2_[a-p]="value2"\s?/>)+' -360 br'</thread_root>').match -361 -362 def testrun(): -363 for _ in range(3): -364 root = self.etree.Element('thread_root') -365 for name in names: -366 tag_name = name * 5 -367 new = [] -368 for _ in runs_per_name: -369 el = SubElement(root, tag_name, {'thread_attr_' + name: 'value'}) -370 new.append(el) -371 for el in new: -372 el.set('thread_attr2_' + name, 'value2') -373 s = etree.tostring(root) -374 self.assertTrue(result_matches(s)) -
375 -376 # first, run only in sub-threads -377 self._run_threads(10, testrun) -378 -379 # then, additionally include the main thread (and its parent dict) -380 self._run_threads(10, testrun, main_func=testrun) -381 -
382 - def test_concurrent_proxies(self): -
383 XML = self.etree.XML -384 root = XML(_bytes('<root><a>A</a><b xmlns="test">B</b><c/></root>')) -385 child_count = len(root) -386 def testrun(): -387 for i in range(10000): -388 el = root[i%child_count] -389 del el -
390 self._run_threads(10, testrun) -391 -
393 XML = self.etree.XML -394 -395 class TestElement(etree.ElementBase): -396 pass -
397 -398 class MyLookup(etree.CustomElementClassLookup): -399 repeat = range(100) -400 def lookup(self, t, d, ns, name): -401 count = 0 -402 for i in self.repeat: -403 # allow other threads to run -404 count += 1 -405 return TestElement -406 -407 parser = self.etree.XMLParser() -408 parser.set_element_class_lookup(MyLookup()) -409 -410 root = XML(_bytes('<root><a>A</a><b xmlns="test">B</b><c/></root>'), -411 parser) -412 -413 child_count = len(root) -414 def testrun(): -415 for i in range(1000): -416 el = root[i%child_count] -417 del el -418 self._run_threads(10, testrun) -419 -420 -
421 -class ThreadPipelineTestCase(HelperTestCase): -
422 """Threading tests based on a thread worker pipeline. -423 """ -424 etree = etree -425 item_count = 40 -426 -
427 - class Worker(threading.Thread): -
428 - def __init__(self, in_queue, in_count, **kwargs): -
429 threading.Thread.__init__(self) -430 self.in_queue = in_queue -431 self.in_count = in_count -432 self.out_queue = Queue(in_count) -433 self.__dict__.update(kwargs) -
434 -
435 - def run(self): -
436 get, put = self.in_queue.get, self.out_queue.put -437 handle = self.handle -438 for _ in range(self.in_count): -439 put(handle(get())) -
440 -
441 - def handle(self, data): -
442 raise NotImplementedError() -
443 -
444 - class ParseWorker(Worker): -
445 - def handle(self, xml, _fromstring=etree.fromstring): -
446 return _fromstring(xml) -
447 -
448 - class RotateWorker(Worker): -
449 - def handle(self, element): -
450 first = element[0] -451 element[:] = element[1:] -452 element.append(first) -453 return element -
454 -
455 - class ReverseWorker(Worker): -
456 - def handle(self, element): -
457 element[:] = element[::-1] -458 return element -
459 -
460 - class ParseAndExtendWorker(Worker): -
461 - def handle(self, element, _fromstring=etree.fromstring): -
462 element.extend(_fromstring(self.xml)) -463 return element -
464 -
465 - class ParseAndInjectWorker(Worker): -
466 - def handle(self, element, _fromstring=etree.fromstring): -
467 root = _fromstring(self.xml) -468 root.extend(element) -469 return root -
470 -
471 - class Validate(Worker): -
472 - def handle(self, element): -
475 -
476 - class SerialiseWorker(Worker): -
477 - def handle(self, element): -
478 return etree.tostring(element) -
479 -480 xml = (b'''\ -481 <!DOCTYPE threadtest [ -482 <!ELEMENT threadtest (thread-tag1,thread-tag2)+> -483 <!ATTLIST threadtest -484 version CDATA "1.0" -485 > -486 <!ELEMENT thread-tag1 EMPTY> -487 <!ELEMENT thread-tag2 (div)> -488 <!ELEMENT div (threaded)> -489 <!ATTLIST div -490 huhu CDATA #IMPLIED -491 > -492 <!ELEMENT threaded EMPTY> -493 <!ATTLIST threaded -494 host CDATA #REQUIRED -495 > -496 ]> -497 <threadtest version="123"> -498 ''' + (b''' -499 <thread-tag1 /> -500 <thread-tag2> -501 <div huhu="true"> -502 <threaded host="here" /> -503 </div> -504 </thread-tag2> -505 ''') * 20 + b''' -506 </threadtest>''') -507 -
508 - def _build_pipeline(self, item_count, *classes, **kwargs): -
509 in_queue = Queue(item_count) -510 start = last = classes[0](in_queue, item_count, **kwargs) -511 start.setDaemon(True) -512 for worker_class in classes[1:]: -513 last = worker_class(last.out_queue, item_count, **kwargs) -514 last.setDaemon(True) -515 last.start() -516 return (in_queue, start, last) -
517 -
519 item_count = self.item_count -520 xml = self.xml.replace(b'thread', b'THREAD') # use fresh tag names -521 -522 # build and start the pipeline -523 in_queue, start, last = self._build_pipeline( -524 item_count, -525 self.ParseWorker, -526 self.RotateWorker, -527 self.ReverseWorker, -528 self.ParseAndExtendWorker, -529 self.Validate, -530 self.ParseAndInjectWorker, -531 self.SerialiseWorker, -532 xml=xml) -533 -534 # fill the queue -535 put = start.in_queue.put -536 for _ in range(item_count): -537 put(xml) -538 -539 # start the first thread and thus everything -540 start.start() -541 # make sure the last thread has terminated -542 last.join(60) # time out after 60 seconds -543 self.assertEqual(item_count, last.out_queue.qsize()) -544 # read the results -545 get = last.out_queue.get -546 results = [get() for _ in range(item_count)] -547 -548 comparison = results[0] -549 for i, result in enumerate(results[1:]): -550 self.assertEqual(comparison, result) -
551 -
553 item_count = self.item_count -554 xml = self.xml.replace(b'thread', b'GLOBAL') # use fresh tag names -555 XML = self.etree.XML -556 # build and start the pipeline -557 in_queue, start, last = self._build_pipeline( -558 item_count, -559 self.RotateWorker, -560 self.ReverseWorker, -561 self.ParseAndExtendWorker, -562 self.Validate, -563 self.SerialiseWorker, -564 xml=xml) -565 -566 # fill the queue -567 put = start.in_queue.put -568 for _ in range(item_count): -569 put(XML(xml)) -570 -571 # start the first thread and thus everything -572 start.start() -573 # make sure the last thread has terminated -574 last.join(60) # time out after 90 seconds -575 self.assertEqual(item_count, last.out_queue.qsize()) -576 # read the results -577 get = last.out_queue.get -578 results = [get() for _ in range(item_count)] -579 -580 comparison = results[0] -581 for i, result in enumerate(results[1:]): -582 self.assertEqual(comparison, result) -
583 -584 -
585 -def test_suite(): -
586 suite = unittest.TestSuite() -587 suite.addTests([unittest.makeSuite(ThreadingTestCase)]) -588 suite.addTests([unittest.makeSuite(ThreadPipelineTestCase)]) -589 return suite -
590 -591 if __name__ == '__main__': -592 print('to test use test.py %s' % __file__) -593 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase-class.html b/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase-class.html deleted file mode 100644 index 01719ed..0000000 --- a/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase-class.html +++ /dev/null @@ -1,544 +0,0 @@ - - - - - lxml.tests.test_threading.ThreadPipelineTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_threading :: - Class ThreadPipelineTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ThreadPipelineTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ThreadPipelineTestCase
-
- -
-Threading tests based on a thread worker pipeline. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-   - - Worker -
-   - - ParseWorker -
-   - - RotateWorker -
-   - - ReverseWorker -
-   - - ParseAndExtendWorker -
-   - - ParseAndInjectWorker -
-   - - Validate -
-   - - SerialiseWorker -
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
_build_pipeline(self, - item_count, - *classes, - **kwargs) - source code - -
- -
-   - - - - - - -
test_thread_pipeline_thread_parse(self) - source code - -
- -
-   - - - - - - -
test_thread_pipeline_global_parse(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - etree
- The lxml.etree module implements the extended ElementTree API for XML. -
-   - - item_count = 40 -
-   - - xml = '<!DOCTYPE threadtest [\n <!ELEMENT threadtest (threa... -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

etree

- The lxml.etree module implements the extended ElementTree API for XML. -
-
-
-
Value:
-
lxml.etree
-
-
-
- -
- -
-

xml

- -
-
-
-
Value:
-
-'''<!DOCTYPE threadtest [
-    <!ELEMENT threadtest (thread-tag1,thread-tag2)+>
-    <!ATTLIST threadtest
-        version    CDATA  "1.0"
-    >
-    <!ELEMENT thread-tag1 EMPTY>
-    <!ELEMENT thread-tag2 (div)>
-    <!ELEMENT div (threaded)>
-...
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker-class.html b/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker-class.html deleted file mode 100644 index 9f7a10b..0000000 --- a/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker-class.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_threading :: - Class ThreadPipelineTestCase :: - Class ParseAndExtendWorker - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ParseAndExtendWorker

source code

-
-           object --+            
-                    |            
-   threading._Verbose --+        
-                        |        
-         threading.Thread --+    
-                            |    
-ThreadPipelineTestCase.Worker --+
-                                |
-                               ThreadPipelineTestCase.ParseAndExtendWorker
-
- -
- - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
handle(self, - element, - _fromstring=<cyfunction fromstring at 0x7fbba67fa290>) - source code - -
- -
-

Inherited from Worker: - __init__, - run -

-

Inherited from threading.Thread: - __repr__, - getName, - isAlive, - isDaemon, - is_alive, - join, - setDaemon, - setName, - start -

-

Inherited from threading.Thread (private): - _reset_internal_locks, - _set_daemon, - _set_ident -

-

Inherited from threading._Verbose (private): - _note -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from threading.Thread: - daemon, - ident, - name -

-

Inherited from threading.Thread (private): - _block -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

handle(self, - element, - _fromstring=<cyfunction fromstring at 0x7fbba67fa290>) -

-
source code  -
- - -
-
Overrides: - Worker.handle -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndInjectWorker-class.html b/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndInjectWorker-class.html deleted file mode 100644 index e8c2915..0000000 --- a/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndInjectWorker-class.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndInjectWorker - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_threading :: - Class ThreadPipelineTestCase :: - Class ParseAndInjectWorker - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ParseAndInjectWorker

source code

-
-           object --+            
-                    |            
-   threading._Verbose --+        
-                        |        
-         threading.Thread --+    
-                            |    
-ThreadPipelineTestCase.Worker --+
-                                |
-                               ThreadPipelineTestCase.ParseAndInjectWorker
-
- -
- - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
handle(self, - element, - _fromstring=<cyfunction fromstring at 0x7fbba67fa290>) - source code - -
- -
-

Inherited from Worker: - __init__, - run -

-

Inherited from threading.Thread: - __repr__, - getName, - isAlive, - isDaemon, - is_alive, - join, - setDaemon, - setName, - start -

-

Inherited from threading.Thread (private): - _reset_internal_locks, - _set_daemon, - _set_ident -

-

Inherited from threading._Verbose (private): - _note -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from threading.Thread: - daemon, - ident, - name -

-

Inherited from threading.Thread (private): - _block -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

handle(self, - element, - _fromstring=<cyfunction fromstring at 0x7fbba67fa290>) -

-
source code  -
- - -
-
Overrides: - Worker.handle -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker-class.html b/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker-class.html deleted file mode 100644 index 9e8d279..0000000 --- a/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker-class.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_threading :: - Class ThreadPipelineTestCase :: - Class ParseWorker - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ParseWorker

source code

-
-           object --+            
-                    |            
-   threading._Verbose --+        
-                        |        
-         threading.Thread --+    
-                            |    
-ThreadPipelineTestCase.Worker --+
-                                |
-                               ThreadPipelineTestCase.ParseWorker
-
- -
- - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
handle(self, - xml, - _fromstring=<cyfunction fromstring at 0x7fbba67fa290>) - source code - -
- -
-

Inherited from Worker: - __init__, - run -

-

Inherited from threading.Thread: - __repr__, - getName, - isAlive, - isDaemon, - is_alive, - join, - setDaemon, - setName, - start -

-

Inherited from threading.Thread (private): - _reset_internal_locks, - _set_daemon, - _set_ident -

-

Inherited from threading._Verbose (private): - _note -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from threading.Thread: - daemon, - ident, - name -

-

Inherited from threading.Thread (private): - _block -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

handle(self, - xml, - _fromstring=<cyfunction fromstring at 0x7fbba67fa290>) -

-
source code  -
- - -
-
Overrides: - Worker.handle -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker-class.html b/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker-class.html deleted file mode 100644 index 3853e4f..0000000 --- a/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker-class.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_threading :: - Class ThreadPipelineTestCase :: - Class ReverseWorker - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ReverseWorker

source code

-
-           object --+            
-                    |            
-   threading._Verbose --+        
-                        |        
-         threading.Thread --+    
-                            |    
-ThreadPipelineTestCase.Worker --+
-                                |
-                               ThreadPipelineTestCase.ReverseWorker
-
- -
- - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
handle(self, - element) - source code - -
- -
-

Inherited from Worker: - __init__, - run -

-

Inherited from threading.Thread: - __repr__, - getName, - isAlive, - isDaemon, - is_alive, - join, - setDaemon, - setName, - start -

-

Inherited from threading.Thread (private): - _reset_internal_locks, - _set_daemon, - _set_ident -

-

Inherited from threading._Verbose (private): - _note -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from threading.Thread: - daemon, - ident, - name -

-

Inherited from threading.Thread (private): - _block -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

handle(self, - element) -

-
source code  -
- - -
-
Overrides: - Worker.handle -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker-class.html b/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker-class.html deleted file mode 100644 index a9b6cd6..0000000 --- a/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker-class.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_threading :: - Class ThreadPipelineTestCase :: - Class RotateWorker - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class RotateWorker

source code

-
-           object --+            
-                    |            
-   threading._Verbose --+        
-                        |        
-         threading.Thread --+    
-                            |    
-ThreadPipelineTestCase.Worker --+
-                                |
-                               ThreadPipelineTestCase.RotateWorker
-
- -
- - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
handle(self, - element) - source code - -
- -
-

Inherited from Worker: - __init__, - run -

-

Inherited from threading.Thread: - __repr__, - getName, - isAlive, - isDaemon, - is_alive, - join, - setDaemon, - setName, - start -

-

Inherited from threading.Thread (private): - _reset_internal_locks, - _set_daemon, - _set_ident -

-

Inherited from threading._Verbose (private): - _note -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from threading.Thread: - daemon, - ident, - name -

-

Inherited from threading.Thread (private): - _block -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

handle(self, - element) -

-
source code  -
- - -
-
Overrides: - Worker.handle -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker-class.html b/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker-class.html deleted file mode 100644 index 2f21690..0000000 --- a/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker-class.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_threading :: - Class ThreadPipelineTestCase :: - Class SerialiseWorker - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class SerialiseWorker

source code

-
-           object --+            
-                    |            
-   threading._Verbose --+        
-                        |        
-         threading.Thread --+    
-                            |    
-ThreadPipelineTestCase.Worker --+
-                                |
-                               ThreadPipelineTestCase.SerialiseWorker
-
- -
- - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
handle(self, - element) - source code - -
- -
-

Inherited from Worker: - __init__, - run -

-

Inherited from threading.Thread: - __repr__, - getName, - isAlive, - isDaemon, - is_alive, - join, - setDaemon, - setName, - start -

-

Inherited from threading.Thread (private): - _reset_internal_locks, - _set_daemon, - _set_ident -

-

Inherited from threading._Verbose (private): - _note -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from threading.Thread: - daemon, - ident, - name -

-

Inherited from threading.Thread (private): - _block -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

handle(self, - element) -

-
source code  -
- - -
-
Overrides: - Worker.handle -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.Validate-class.html b/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.Validate-class.html deleted file mode 100644 index 97d9df4..0000000 --- a/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.Validate-class.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - lxml.tests.test_threading.ThreadPipelineTestCase.Validate - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_threading :: - Class ThreadPipelineTestCase :: - Class Validate - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class Validate

source code

-
-           object --+            
-                    |            
-   threading._Verbose --+        
-                        |        
-         threading.Thread --+    
-                            |    
-ThreadPipelineTestCase.Worker --+
-                                |
-                               ThreadPipelineTestCase.Validate
-
- -
- - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
handle(self, - element) - source code - -
- -
-

Inherited from Worker: - __init__, - run -

-

Inherited from threading.Thread: - __repr__, - getName, - isAlive, - isDaemon, - is_alive, - join, - setDaemon, - setName, - start -

-

Inherited from threading.Thread (private): - _reset_internal_locks, - _set_daemon, - _set_ident -

-

Inherited from threading._Verbose (private): - _note -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from threading.Thread: - daemon, - ident, - name -

-

Inherited from threading.Thread (private): - _block -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

handle(self, - element) -

-
source code  -
- - -
-
Overrides: - Worker.handle -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.Worker-class.html b/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.Worker-class.html deleted file mode 100644 index 817ff0c..0000000 --- a/doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.Worker-class.html +++ /dev/null @@ -1,361 +0,0 @@ - - - - - lxml.tests.test_threading.ThreadPipelineTestCase.Worker - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_threading :: - Class ThreadPipelineTestCase :: - Class Worker - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class Worker

source code

-
-        object --+        
-                 |        
-threading._Verbose --+    
-                     |    
-      threading.Thread --+
-                         |
-                        ThreadPipelineTestCase.Worker
-
- -
Known Subclasses:
-
- -
- -
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - in_queue, - in_count, - **kwargs)
- This constructor should always be called with keyword arguments. Arguments are:
- source code - -
- -
-   - - - - - - -
run(self)
- Method representing the thread's activity.
- source code - -
- -
-   - - - - - - -
handle(self, - data) - source code - -
- -
-

Inherited from threading.Thread: - __repr__, - getName, - isAlive, - isDaemon, - is_alive, - join, - setDaemon, - setName, - start -

-

Inherited from threading.Thread (private): - _reset_internal_locks, - _set_daemon, - _set_ident -

-

Inherited from threading._Verbose (private): - _note -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from threading.Thread: - daemon, - ident, - name -

-

Inherited from threading.Thread (private): - _block -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - in_queue, - in_count, - **kwargs) -
(Constructor) -

-
source code  -
- -

This constructor should always be called with keyword arguments. Arguments are:

-

group should be None; reserved for future extension when a ThreadGroup -class is implemented.

-

target is the callable object to be invoked by the run() -method. Defaults to None, meaning nothing is called.

-

name is the thread name. By default, a unique name is constructed of -the form "Thread-N" where N is a small decimal number.

-

args is the argument tuple for the target invocation. Defaults to ().

-

kwargs is a dictionary of keyword arguments for the target -invocation. Defaults to {}.

-

If a subclass overrides the constructor, it must make sure to invoke -the base class constructor (Thread.__init__()) before doing anything -else to the thread.

-
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

run(self) -

-
source code  -
- -

Method representing the thread's activity.

-

You may override this method in a subclass. The standard run() method -invokes the callable object passed to the object's constructor as the -target argument, if any, with sequential and keyword arguments taken -from the args and kwargs arguments, respectively.

-
-
Overrides: - threading.Thread.run -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_threading.ThreadingTestCase-class.html b/doc/html/api/lxml.tests.test_threading.ThreadingTestCase-class.html deleted file mode 100644 index 4bef3e7..0000000 --- a/doc/html/api/lxml.tests.test_threading.ThreadingTestCase-class.html +++ /dev/null @@ -1,617 +0,0 @@ - - - - - lxml.tests.test_threading.ThreadingTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_threading :: - Class ThreadingTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ThreadingTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ThreadingTestCase
-
- -
-Threading tests - - - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
_run_thread(self, - func) - source code - -
- -
-   - - - - - - -
_run_threads(self, - count, - func, - main_func=None) - source code - -
- -
-   - - - - - - -
test_subtree_copy_thread(self) - source code - -
- -
-   - - - - - - -
test_main_xslt_in_thread(self) - source code - -
- -
-   - - - - - - -
test_thread_xslt(self) - source code - -
- -
-   - - - - - - -
test_thread_xslt_parsing_error_log(self) - source code - -
- -
-   - - - - - - -
test_thread_xslt_apply_error_log(self) - source code - -
- -
-   - - - - - - -
test_thread_xslt_attr_replace(self) - source code - -
- -
-   - - - - - - -
test_thread_create_xslt(self) - source code - -
- -
-   - - - - - - -
test_thread_error_log(self) - source code - -
- -
-   - - - - - - -
test_thread_mix(self) - source code - -
- -
-   - - - - - - -
test_concurrent_attribute_names_in_dicts(self) - source code - -
- -
-   - - - - - - -
test_concurrent_proxies(self) - source code - -
- -
-   - - - - - - -
test_concurrent_class_lookup(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - etree
- The lxml.etree module implements the extended ElementTree API for XML. -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

etree

- The lxml.etree module implements the extended ElementTree API for XML. -
-
-
-
Value:
-
lxml.etree
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_unicode-module.html b/doc/html/api/lxml.tests.test_unicode-module.html deleted file mode 100644 index 8fc2c2a..0000000 --- a/doc/html/api/lxml.tests.test_unicode-module.html +++ /dev/null @@ -1,312 +0,0 @@ - - - - - lxml.tests.test_unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_unicode - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module test_unicode

source code

- - - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - unicode
- str(object='') -> string -
-   - - UnicodeTestCase -
-   - - EncodingsTestCase -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
test_suite() - source code - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - this_dir = '/home/stefan/source/Python/lxml/lxml-release/src/l... -
-   - - ascii_uni = u'a' -
-   - - klingon = u'' -
-   - - invalid_tag = u'test' -
-   - - uni = u'Ãڀㄠ' -
-   - - uxml = u'<test><title>test áㄠ</title><h1>page áㄠ title</h1><... -
-   - - __package__ = 'lxml.tests' -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

this_dir

- -
-
-
-
Value:
-
-'/home/stefan/source/Python/lxml/lxml-release/src/lxml/tests'
-
-
-
-
-
- -
- -
-

uxml

- -
-
-
-
Value:
-
-u'<test><title>test áㄠ</title><h1>page áㄠ title</h1></test>'
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_unicode-pysrc.html b/doc/html/api/lxml.tests.test_unicode-pysrc.html deleted file mode 100644 index 2f582ca..0000000 --- a/doc/html/api/lxml.tests.test_unicode-pysrc.html +++ /dev/null @@ -1,713 +0,0 @@ - - - - - lxml.tests.test_unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_unicode - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.test_unicode

-
-  1  # -*- coding: utf-8 -*- 
-  2  import unittest 
-  3  import sys 
-  4  import os.path 
-  5   
-  6  this_dir = os.path.dirname(__file__) 
-  7  if this_dir not in sys.path: 
-  8      sys.path.insert(0, this_dir)  # needed for Py3 
-  9   
- 10  from common_imports import StringIO, etree, SillyFileLike, HelperTestCase 
- 11  from common_imports import _str, _bytes, _chr 
- 12   
- 13  try: 
- 14      unicode 
- 15  except NameError: 
- 16      unicode = str 
- 17   
- 18  ascii_uni = _bytes('a').decode('utf8') 
- 19   
- 20  klingon = _bytes("\\uF8D2").decode("unicode_escape") # not valid for XML names 
- 21   
- 22  invalid_tag = _bytes("test").decode('utf8') + klingon 
- 23   
- 24  uni = _bytes('\\xc3\\u0680\\u3120').decode("unicode_escape") # some non-ASCII characters 
- 25   
- 26  uxml = _bytes("<test><title>test \\xc3\\xa1\\u3120</title><h1>page \\xc3\\xa1\\u3120 title</h1></test>" 
- 27                ).decode("unicode_escape") 
- 28   
- 29   
-
30 -class UnicodeTestCase(HelperTestCase): -
31 - def test__str(self): -
32 # test the testing framework, namely _str from common_imports - 33 self.assertEqual(_str('\x10'), _str('\u0010')) - 34 self.assertEqual(_str('\x10'), _str('\U00000010')) - 35 self.assertEqual(_str('\u1234'), _str('\U00001234')) -
36 -
37 - def test_unicode_xml(self): -
38 tree = etree.XML('<p>%s</p>' % uni) - 39 self.assertEqual(uni, tree.text) -
40 -
41 - def test_wide_unicode_xml(self): -
42 if sys.maxunicode < 1114111: - 43 return # skip test - 44 tree = etree.XML(_bytes('<p>\\U00026007</p>').decode('unicode_escape')) - 45 self.assertEqual(1, len(tree.text)) - 46 self.assertEqual(_bytes('\\U00026007').decode('unicode_escape'), - 47 tree.text) -
48 -
49 - def test_unicode_xml_broken(self): -
50 uxml = ('<?xml version="1.0" encoding="UTF-8"?>' + - 51 '<p>%s</p>' % uni) - 52 self.assertRaises(ValueError, etree.XML, uxml) -
53 -
54 - def test_unicode_tag(self): -
55 el = etree.Element(uni) - 56 self.assertEqual(uni, el.tag) -
57 -
58 - def test_unicode_tag_invalid(self): -
59 # sadly, Klingon is not well-formed - 60 self.assertRaises(ValueError, etree.Element, invalid_tag) -
61 -
62 - def test_unicode_nstag(self): -
63 tag = "{http://abc/}%s" % uni - 64 el = etree.Element(tag) - 65 self.assertEqual(tag, el.tag) -
66 -
67 - def test_unicode_ns_invalid(self): -
68 # namespace URIs must conform to RFC 3986 - 69 tag = "{http://%s/}abc" % uni - 70 self.assertRaises(ValueError, etree.Element, tag) -
71 -
72 - def test_unicode_nstag_invalid(self): -
73 # sadly, Klingon is not well-formed - 74 tag = "{http://abc/}%s" % invalid_tag - 75 self.assertRaises(ValueError, etree.Element, tag) -
76 -
77 - def test_unicode_qname(self): -
78 qname = etree.QName(uni, uni) - 79 tag = "{%s}%s" % (uni, uni) - 80 self.assertEqual(qname.text, tag) - 81 self.assertEqual(unicode(qname), tag) -
82 -
83 - def test_unicode_qname_invalid(self): -
84 self.assertRaises(ValueError, etree.QName, invalid_tag) -
85 -
86 - def test_unicode_attr(self): -
87 el = etree.Element('foo', {'bar': uni}) - 88 self.assertEqual(uni, el.attrib['bar']) -
89 -
90 - def test_unicode_comment(self): -
91 el = etree.Comment(uni) - 92 self.assertEqual(uni, el.text) -
93 -
94 - def test_unicode_repr1(self): -
95 x = etree.Element(_str('å')) - 96 # must not raise UnicodeEncodeError - 97 repr(x) -
98 -
99 - def test_unicode_repr2(self): -
100 x = etree.Comment(_str('ö')) -101 repr(x) -
102 -
103 - def test_unicode_repr3(self): -
104 x = etree.ProcessingInstruction(_str('Å'), _str('\u0131')) -105 repr(x) -
106 -
107 - def test_unicode_repr4(self): -
108 x = etree.Entity(_str('ä')) -109 repr(x) -
110 -
111 - def test_unicode_text(self): -
112 e = etree.Element('e') -113 -114 def settext(text): -115 e.text = text -
116 -117 self.assertRaises(ValueError, settext, _str('ab\ufffe')) -118 self.assertRaises(ValueError, settext, _str('ö\ffff')) -119 self.assertRaises(ValueError, settext, _str('\u0123\ud800')) -120 self.assertRaises(ValueError, settext, _str('x\ud8ff')) -121 self.assertRaises(ValueError, settext, _str('\U00010000\udfff')) -122 self.assertRaises(ValueError, settext, _str('abd\x00def')) -123 # should not Raise -124 settext(_str('\ud7ff\ue000\U00010000\U0010FFFFäöas')) -125 -126 for char_val in range(0xD800, 0xDFFF+1): -127 self.assertRaises(ValueError, settext, 'abc' + _chr(char_val)) -128 self.assertRaises(ValueError, settext, _chr(char_val)) -129 self.assertRaises(ValueError, settext, _chr(char_val) + 'abc') -130 -131 self.assertRaises(ValueError, settext, _bytes('\xe4')) -132 self.assertRaises(ValueError, settext, _bytes('\x80')) -133 self.assertRaises(ValueError, settext, _bytes('\xff')) -134 self.assertRaises(ValueError, settext, _bytes('\x08')) -135 self.assertRaises(ValueError, settext, _bytes('\x19')) -136 self.assertRaises(ValueError, settext, _bytes('\x20\x00')) -137 # should not Raise -138 settext(_bytes('\x09\x0A\x0D\x20\x60\x7f')) -
139 -
140 - def test_uniname(self): -
141 Element = etree.Element -142 def el(name): -143 return Element(name) -
144 -145 self.assertRaises(ValueError, el, ':') -146 self.assertRaises(ValueError, el, '0a') -147 self.assertRaises(ValueError, el, _str('\u203f')) -148 # should not Raise -149 el(_str('\u0132')) -150 -151 -152 -
154 el = etree.parse(StringIO('<p>%s</p>' % uni)).getroot() -155 self.assertEqual(uni, el.text) -
156 -157 ## def test_parse_fileobject_unicode(self): -158 ## # parse unicode from unamed file object (not support by ElementTree) -159 ## f = SillyFileLike(uxml) -160 ## root = etree.parse(f).getroot() -161 ## self.assertEqual(unicode(etree.tostring(root, 'UTF-8'), 'UTF-8'), -162 ## uxml) -163 -164 -
165 -class EncodingsTestCase(HelperTestCase): -
166 - def test_illegal_utf8(self): -
167 data = _bytes('<test>\x80\x80\x80</test>', encoding='iso8859-1') -168 self.assertRaises(etree.XMLSyntaxError, etree.fromstring, data) -
169 -
170 - def test_illegal_utf8_recover(self): -
171 data = _bytes('<test>\x80\x80\x80</test>', encoding='iso8859-1') -172 parser = etree.XMLParser(recover=True) -173 self.assertRaises(etree.XMLSyntaxError, etree.fromstring, data, parser) -
174 -
175 - def _test_encoding(self, encoding, xml_encoding_name=None): -
176 foo = """<?xml version='1.0' encoding='%s'?>\n<tag attrib='123'></tag>""" % ( -177 xml_encoding_name or encoding) -178 root = etree.fromstring(foo.encode(encoding)) -179 self.assertEqual('tag', root.tag) -180 -181 doc_encoding = root.getroottree().docinfo.encoding -182 self.assertTrue( -183 doc_encoding.lower().rstrip('lbe'), -184 (xml_encoding_name or encoding).lower().rstrip('lbe')) -
185 -
186 - def test_utf8_fromstring(self): -
187 self._test_encoding('utf-8') -
188 -
189 - def test_utf8sig_fromstring(self): -
190 self._test_encoding('utf_8_sig', 'utf-8') -
191 -
192 - def test_utf16_fromstring(self): -
193 self._test_encoding('utf-16') -
194 -
195 - def test_utf16LE_fromstring(self): -
196 self._test_encoding('utf-16le', 'utf-16') -
197 -
198 - def test_utf16BE_fromstring(self): -
199 self._test_encoding('utf-16be', 'utf-16') -
200 -
201 - def test_utf32_fromstring(self): -
202 self._test_encoding('utf-32', 'utf-32') -
203 -
204 - def test_utf32LE_fromstring(self): -
205 self._test_encoding('utf-32le', 'utf-32') -
206 -
207 - def test_utf32BE_fromstring(self): -
208 self._test_encoding('utf-32be', 'utf-32') -
209 -210 -
211 -def test_suite(): -
212 suite = unittest.TestSuite() -213 suite.addTests([unittest.makeSuite(UnicodeTestCase)]) -214 suite.addTests([unittest.makeSuite(EncodingsTestCase)]) -215 return suite -
216 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_unicode.EncodingsTestCase-class.html b/doc/html/api/lxml.tests.test_unicode.EncodingsTestCase-class.html deleted file mode 100644 index e6ec5c9..0000000 --- a/doc/html/api/lxml.tests.test_unicode.EncodingsTestCase-class.html +++ /dev/null @@ -1,523 +0,0 @@ - - - - - lxml.tests.test_unicode.EncodingsTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_unicode :: - Class EncodingsTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class EncodingsTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               EncodingsTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_illegal_utf8(self) - source code - -
- -
-   - - - - - - -
test_illegal_utf8_recover(self) - source code - -
- -
-   - - - - - - -
_test_encoding(self, - encoding, - xml_encoding_name=None) - source code - -
- -
-   - - - - - - -
test_utf8_fromstring(self) - source code - -
- -
-   - - - - - - -
test_utf8sig_fromstring(self) - source code - -
- -
-   - - - - - - -
test_utf16_fromstring(self) - source code - -
- -
-   - - - - - - -
test_utf16LE_fromstring(self) - source code - -
- -
-   - - - - - - -
test_utf16BE_fromstring(self) - source code - -
- -
-   - - - - - - -
test_utf32_fromstring(self) - source code - -
- -
-   - - - - - - -
test_utf32LE_fromstring(self) - source code - -
- -
-   - - - - - - -
test_utf32BE_fromstring(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_unicode.UnicodeTestCase-class.html b/doc/html/api/lxml.tests.test_unicode.UnicodeTestCase-class.html deleted file mode 100644 index 11a2a43..0000000 --- a/doc/html/api/lxml.tests.test_unicode.UnicodeTestCase-class.html +++ /dev/null @@ -1,665 +0,0 @@ - - - - - lxml.tests.test_unicode.UnicodeTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_unicode :: - Class UnicodeTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class UnicodeTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               UnicodeTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test__str(self) - source code - -
- -
-   - - - - - - -
test_unicode_xml(self) - source code - -
- -
-   - - - - - - -
test_wide_unicode_xml(self) - source code - -
- -
-   - - - - - - -
test_unicode_xml_broken(self) - source code - -
- -
-   - - - - - - -
test_unicode_tag(self) - source code - -
- -
-   - - - - - - -
test_unicode_tag_invalid(self) - source code - -
- -
-   - - - - - - -
test_unicode_nstag(self) - source code - -
- -
-   - - - - - - -
test_unicode_ns_invalid(self) - source code - -
- -
-   - - - - - - -
test_unicode_nstag_invalid(self) - source code - -
- -
-   - - - - - - -
test_unicode_qname(self) - source code - -
- -
-   - - - - - - -
test_unicode_qname_invalid(self) - source code - -
- -
-   - - - - - - -
test_unicode_attr(self) - source code - -
- -
-   - - - - - - -
test_unicode_comment(self) - source code - -
- -
-   - - - - - - -
test_unicode_repr1(self) - source code - -
- -
-   - - - - - - -
test_unicode_repr2(self) - source code - -
- -
-   - - - - - - -
test_unicode_repr3(self) - source code - -
- -
-   - - - - - - -
test_unicode_repr4(self) - source code - -
- -
-   - - - - - - -
test_unicode_text(self) - source code - -
- -
-   - - - - - - -
test_uniname(self) - source code - -
- -
-   - - - - - - -
test_unicode_parse_stringio(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_xmlschema-module.html b/doc/html/api/lxml.tests.test_xmlschema-module.html deleted file mode 100644 index b55d4ab..0000000 --- a/doc/html/api/lxml.tests.test_xmlschema-module.html +++ /dev/null @@ -1,253 +0,0 @@ - - - - - lxml.tests.test_xmlschema - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_xmlschema - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module test_xmlschema

source code

-Test cases related to XML Schema parsing and validation - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - ETreeXMLSchemaTestCase -
-   - - ETreeXMLSchemaResolversTestCase -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
test_suite() - source code - -
- -
- - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - this_dir = '/home/stefan/source/Python/lxml/lxml-release/src/l... -
-   - - __package__ = 'lxml.tests' -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

this_dir

- -
-
-
-
Value:
-
-'/home/stefan/source/Python/lxml/lxml-release/src/lxml/tests'
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_xmlschema-pysrc.html b/doc/html/api/lxml.tests.test_xmlschema-pysrc.html deleted file mode 100644 index ab598a9..0000000 --- a/doc/html/api/lxml.tests.test_xmlschema-pysrc.html +++ /dev/null @@ -1,1438 +0,0 @@ - - - - - lxml.tests.test_xmlschema - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_xmlschema - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.test_xmlschema

-
-  1  # -*- coding: utf-8 -*- 
-  2   
-  3  """ 
-  4  Test cases related to XML Schema parsing and validation 
-  5  """ 
-  6   
-  7  import unittest, sys, os.path 
-  8   
-  9  this_dir = os.path.dirname(__file__) 
- 10  if this_dir not in sys.path: 
- 11      sys.path.insert(0, this_dir) # needed for Py3 
- 12   
- 13  from common_imports import etree, BytesIO, HelperTestCase, fileInTestDir 
- 14  from common_imports import doctest, make_doctest 
- 15   
- 16   
-
17 -class ETreeXMLSchemaTestCase(HelperTestCase): -
18 - def test_xmlschema(self): -
19 tree_valid = self.parse('<a><b></b></a>') - 20 tree_invalid = self.parse('<a><c></c></a>') - 21 schema = self.parse(''' - 22 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - 23 <xsd:element name="a" type="AType"/> - 24 <xsd:complexType name="AType"> - 25 <xsd:sequence> - 26 <xsd:element name="b" type="xsd:string" /> - 27 </xsd:sequence> - 28 </xsd:complexType> - 29 </xsd:schema> - 30 ''') - 31 schema = etree.XMLSchema(schema) - 32 self.assertTrue(schema.validate(tree_valid)) - 33 self.assertFalse(schema.validate(tree_invalid)) - 34 self.assertTrue(schema.validate(tree_valid)) # retry valid - 35 self.assertFalse(schema.validate(tree_invalid)) # retry invalid -
36 -
37 - def test_xmlschema_error_log(self): -
38 tree_valid = self.parse('<a><b></b></a>') - 39 tree_invalid = self.parse('<a><c></c></a>') - 40 schema = self.parse(''' - 41 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - 42 <xsd:element name="a" type="AType"/> - 43 <xsd:complexType name="AType"> - 44 <xsd:sequence> - 45 <xsd:element name="b" type="xsd:string" /> - 46 </xsd:sequence> - 47 </xsd:complexType> - 48 </xsd:schema> - 49 ''') - 50 schema = etree.XMLSchema(schema) - 51 self.assertTrue(schema.validate(tree_valid)) - 52 self.assertFalse(schema.error_log.filter_from_errors()) - 53 - 54 self.assertFalse(schema.validate(tree_invalid)) - 55 self.assertTrue(schema.error_log.filter_from_errors()) - 56 self.assertTrue(schema.error_log.filter_types( - 57 etree.ErrorTypes.SCHEMAV_ELEMENT_CONTENT)) - 58 - 59 self.assertTrue(schema.validate(tree_valid)) - 60 self.assertFalse(schema.error_log.filter_from_errors()) - 61 - 62 self.assertFalse(schema.validate(tree_invalid)) - 63 self.assertTrue(schema.error_log.filter_from_errors()) - 64 self.assertTrue(schema.error_log.filter_types( - 65 etree.ErrorTypes.SCHEMAV_ELEMENT_CONTENT)) -
66 -
68 """We don't have a guarantee that there will always be a path - 69 for a _LogEntry object (or even a node for which to determina - 70 a path), but at least when this test was created schema validation - 71 errors always got a node and an XPath value. If that ever changes, - 72 we can modify this test to something like: - 73 self.assertTrue(error_path is None or tree_path == error_path) - 74 That way, we can at least verify that if we did get a path value - 75 it wasn't bogus. - 76 """ - 77 tree = self.parse('<a><b>42</b><b>dada</b></a>') - 78 schema = self.parse(''' - 79 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - 80 <xsd:element name="a" type="AType"/> - 81 <xsd:complexType name="AType"> - 82 <xsd:sequence> - 83 <xsd:element name="b" type="xsd:integer" maxOccurs="2"/> - 84 </xsd:sequence> - 85 </xsd:complexType> - 86 </xsd:schema> - 87 ''') - 88 schema = etree.XMLSchema(schema) - 89 schema.validate(tree) - 90 tree_path = tree.getpath(tree.findall('b')[1]) - 91 error_path = schema.error_log[0].path - 92 self.assertTrue(tree_path == error_path) -
93 -
95 schema = self.parse(''' - 96 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - 97 <xsd:element name="a" type="AType"/> - 98 <xsd:complexType name="AType"> - 99 <xsd:sequence minOccurs="4" maxOccurs="4"> -100 <xsd:element name="b" type="BType" /> -101 </xsd:sequence> -102 </xsd:complexType> -103 <xsd:complexType name="BType"> -104 <xsd:attribute name="hardy" type="xsd:string" default="hey" /> -105 </xsd:complexType> -106 </xsd:schema> -107 ''') -108 schema = etree.XMLSchema(schema, attribute_defaults=True) -109 -110 tree = self.parse('<a><b hardy="ho"/><b/><b hardy="ho"/><b/></a>') -111 -112 root = tree.getroot() -113 self.assertEqual('ho', root[0].get('hardy')) -114 self.assertEqual(None, root[1].get('hardy')) -115 self.assertEqual('ho', root[2].get('hardy')) -116 self.assertEqual(None, root[3].get('hardy')) -117 -118 self.assertTrue(schema(tree)) -119 -120 root = tree.getroot() -121 self.assertEqual('ho', root[0].get('hardy')) -122 self.assertEqual('hey', root[1].get('hardy')) -123 self.assertEqual('ho', root[2].get('hardy')) -124 self.assertEqual('hey', root[3].get('hardy')) -
125 -
126 - def test_xmlschema_parse(self): -
127 schema = self.parse(''' -128 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> -129 <xsd:element name="a" type="AType"/> -130 <xsd:complexType name="AType"> -131 <xsd:sequence> -132 <xsd:element name="b" type="xsd:string" /> -133 </xsd:sequence> -134 </xsd:complexType> -135 </xsd:schema> -136 ''') -137 schema = etree.XMLSchema(schema) -138 parser = etree.XMLParser(schema=schema) -139 -140 tree_valid = self.parse('<a><b></b></a>', parser=parser) -141 self.assertEqual('a', tree_valid.getroot().tag) -142 -143 self.assertRaises(etree.XMLSyntaxError, -144 self.parse, '<a><c></c></a>', parser=parser) -
145 -
147 # does not work as of libxml2 2.7.3 -148 schema = self.parse(''' -149 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> -150 <xsd:element name="a" type="AType"/> -151 <xsd:complexType name="AType"> -152 <xsd:sequence minOccurs="4" maxOccurs="4"> -153 <xsd:element name="b" type="BType" /> -154 </xsd:sequence> -155 </xsd:complexType> -156 <xsd:complexType name="BType"> -157 <xsd:attribute name="hardy" type="xsd:string" default="hey" /> -158 </xsd:complexType> -159 </xsd:schema> -160 ''') -161 schema = etree.XMLSchema(schema) -162 parser = etree.XMLParser(schema=schema, attribute_defaults=True) -163 -164 tree_valid = self.parse('<a><b hardy="ho"/><b/><b hardy="ho"/><b/></a>', -165 parser=parser) -166 root = tree_valid.getroot() -167 self.assertEqual('ho', root[0].get('hardy')) -168 self.assertEqual('hey', root[1].get('hardy')) -169 self.assertEqual('ho', root[2].get('hardy')) -170 self.assertEqual('hey', root[3].get('hardy')) -
171 -
173 # does not work as of libxml2 2.7.3 -174 schema = self.parse(''' -175 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> -176 <xsd:element name="a" type="AType"/> -177 <xsd:complexType name="AType"> -178 <xsd:sequence minOccurs="4" maxOccurs="4"> -179 <xsd:element name="b" type="BType" /> -180 </xsd:sequence> -181 </xsd:complexType> -182 <xsd:complexType name="BType"> -183 <xsd:attribute name="hardy" type="xsd:string" default="hey" /> -184 </xsd:complexType> -185 </xsd:schema> -186 ''') -187 schema = etree.XMLSchema(schema, attribute_defaults=True) -188 parser = etree.XMLParser(schema=schema) -189 -190 tree_valid = self.parse('<a><b hardy="ho"/><b/><b hardy="ho"/><b/></a>', -191 parser=parser) -192 root = tree_valid.getroot() -193 self.assertEqual('ho', root[0].get('hardy')) -194 self.assertEqual('hey', root[1].get('hardy')) -195 self.assertEqual('ho', root[2].get('hardy')) -196 self.assertEqual('hey', root[3].get('hardy')) -
197 -
199 # does not work as of libxml2 2.7.3 -200 schema = self.parse(''' -201 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> -202 <xsd:element name="a" type="AType"/> -203 <xsd:complexType name="AType"> -204 <xsd:sequence minOccurs="3" maxOccurs="3"> -205 <xsd:element name="b" type="BType" /> -206 </xsd:sequence> -207 </xsd:complexType> -208 <xsd:complexType name="BType"> -209 <xsd:attribute name="hardy" type="xsd:string" fixed="hey" /> -210 </xsd:complexType> -211 </xsd:schema> -212 ''') -213 schema = etree.XMLSchema(schema) -214 parser = etree.XMLParser(schema=schema, attribute_defaults=True) -215 -216 tree_valid = self.parse('<a><b/><b hardy="hey"/><b/></a>', -217 parser=parser) -218 root = tree_valid.getroot() -219 self.assertEqual('hey', root[0].get('hardy')) -220 self.assertEqual('hey', root[1].get('hardy')) -221 self.assertEqual('hey', root[2].get('hardy')) -
222 -
223 - def test_xmlschema_stringio(self): -
224 schema_file = BytesIO(''' -225 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> -226 <xsd:element name="a" type="AType"/> -227 <xsd:complexType name="AType"> -228 <xsd:sequence> -229 <xsd:element name="b" type="xsd:string" /> -230 </xsd:sequence> -231 </xsd:complexType> -232 </xsd:schema> -233 ''') -234 schema = etree.XMLSchema(file=schema_file) -235 parser = etree.XMLParser(schema=schema) -236 -237 tree_valid = self.parse('<a><b></b></a>', parser=parser) -238 self.assertEqual('a', tree_valid.getroot().tag) -239 -240 self.assertRaises(etree.XMLSyntaxError, -241 self.parse, '<a><c></c></a>', parser=parser) -
242 -
243 - def test_xmlschema_iterparse(self): -
244 schema = self.parse(''' -245 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> -246 <xsd:element name="a" type="AType"/> -247 <xsd:complexType name="AType"> -248 <xsd:sequence> -249 <xsd:element name="b" type="xsd:string" /> -250 </xsd:sequence> -251 </xsd:complexType> -252 </xsd:schema> -253 ''') -254 schema = etree.XMLSchema(schema) -255 xml = BytesIO('<a><b></b></a>') -256 events = [ (event, el.tag) -257 for (event, el) in etree.iterparse(xml, schema=schema) ] -258 -259 self.assertEqual([('end', 'b'), ('end', 'a')], -260 events) -
261 -
263 schema = self.parse(''' -264 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> -265 <xsd:element name="a" type="AType"/> -266 <xsd:complexType name="AType"> -267 <xsd:sequence> -268 <xsd:element name="b" type="xsd:string" /> -269 </xsd:sequence> -270 </xsd:complexType> -271 </xsd:schema> -272 ''') -273 schema = etree.XMLSchema(schema) -274 xml = BytesIO('<a><b></b></a>') -275 event, element = next(iter(etree.iterparse(xml, schema=schema))) -276 self.assertEqual('end', event) -277 self.assertEqual('b', element.tag) -
278 -
280 schema = self.parse(''' -281 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> -282 <xsd:element name="a" type="AType"/> -283 <xsd:complexType name="AType"> -284 <xsd:sequence> -285 <xsd:element name="b" type="xsd:string" /> -286 </xsd:sequence> -287 </xsd:complexType> -288 </xsd:schema> -289 ''') -290 schema = etree.XMLSchema(schema) -291 self.assertRaises( -292 etree.XMLSyntaxError, -293 list, etree.iterparse(BytesIO('<a><c></c></a>'), schema=schema)) -
294 -
296 self.assertRaises(ValueError, etree.XMLSchema, etree.ElementTree()) -
297 -
299 self.assertRaises(ValueError, etree.XMLSchema, etree.Comment('TEST')) -
300 -
302 schema = self.parse(''' -303 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> -304 <xsd:element name="a" type="xsd:string"/> -305 </xsd:schema> -306 ''') -307 schema = etree.XMLSchema(schema) -308 -309 root = etree.Element('a') -310 root.text = 'TEST' -311 self.assertTrue(schema(root)) -312 -313 self.assertRaises(ValueError, schema, etree.Comment('TEST')) -314 self.assertRaises(ValueError, schema, etree.PI('a', 'text')) -315 self.assertRaises(ValueError, schema, etree.Entity('text')) -
316 -
318 schema = self.parse('''\ -319 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> -320 <element name="a" type="AType"/> -321 <xsd:complexType name="AType"> -322 <xsd:sequence> -323 <xsd:element name="b" type="xsd:string" /> -324 </xsd:sequence> -325 </xsd:complexType> -326 </xsd:schema> -327 ''') -328 self.assertRaises(etree.XMLSchemaParseError, -329 etree.XMLSchema, schema) -
330 -
332 schema = self.parse('<test/>') -333 self.assertRaises(etree.XMLSchemaParseError, -334 etree.XMLSchema, schema) -
335 -
336 - def test_xmlschema_file(self): -
337 # this will only work if we access the file through path or -338 # file object.. -339 f = open(fileInTestDir('test.xsd'), 'rb') -340 try: -341 schema = etree.XMLSchema(file=f) -342 finally: -343 f.close() -344 tree_valid = self.parse('<a><b></b></a>') -345 self.assertTrue(schema.validate(tree_valid)) -
346 -
347 - def test_xmlschema_import_file(self): -
348 # this will only work if we access the file through path or -349 # file object.. -350 schema = etree.XMLSchema(file=fileInTestDir('test_import.xsd')) -351 tree_valid = self.parse( -352 '<a:x xmlns:a="http://codespeak.net/lxml/schema/ns1"><b></b></a:x>') -353 self.assertTrue(schema.validate(tree_valid)) -
354 -
355 - def test_xmlschema_shortcut(self): -
356 tree_valid = self.parse('<a><b></b></a>') -357 tree_invalid = self.parse('<a><c></c></a>') -358 schema = self.parse('''\ -359 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> -360 <xsd:element name="a" type="AType"/> -361 <xsd:complexType name="AType"> -362 <xsd:sequence> -363 <xsd:element name="b" type="xsd:string" /> -364 </xsd:sequence> -365 </xsd:complexType> -366 </xsd:schema> -367 ''') -368 self.assertTrue(tree_valid.xmlschema(schema)) -369 self.assertFalse(tree_invalid.xmlschema(schema)) -
370 -
372 # this used to crash because the schema part was not properly copied out -373 wsdl = self.parse('''\ -374 <wsdl:definitions -375 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" -376 xmlns:xs="http://www.w3.org/2001/XMLSchema"> -377 <wsdl:types> -378 <xs:schema> -379 </xs:schema> -380 </wsdl:types> -381 </wsdl:definitions> -382 ''') -383 schema_element = wsdl.find( -384 "{http://schemas.xmlsoap.org/wsdl/}types/" -385 "{http://www.w3.org/2001/XMLSchema}schema" -386 ) -387 etree.XMLSchema(schema_element) -388 etree.XMLSchema(schema_element) -389 etree.XMLSchema(schema_element) -
390 -391 -
392 -class ETreeXMLSchemaResolversTestCase(HelperTestCase): -
393 resolver_schema_int = BytesIO("""\ -394 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" -395 xmlns:etype="http://codespeak.net/lxml/test/external" -396 targetNamespace="http://codespeak.net/lxml/test/internal"> -397 <xsd:import namespace="http://codespeak.net/lxml/test/external" schemaLocation="XXX.xsd" /> -398 <xsd:element name="a" type="etype:AType"/> -399 </xsd:schema>""") -400 -401 resolver_schema_int2 = BytesIO("""\ -402 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" -403 xmlns:etype="http://codespeak.net/lxml/test/external" -404 targetNamespace="http://codespeak.net/lxml/test/internal"> -405 <xsd:import namespace="http://codespeak.net/lxml/test/external" schemaLocation="YYY.xsd" /> -406 <xsd:element name="a" type="etype:AType"/> -407 </xsd:schema>""") -408 -409 resolver_schema_ext = """\ -410 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" -411 targetNamespace="http://codespeak.net/lxml/test/external"> -412 <xsd:complexType name="AType"> -413 <xsd:sequence><xsd:element name="b" type="xsd:string" minOccurs="0" maxOccurs="unbounded" /></xsd:sequence> -414 </xsd:complexType> -415 </xsd:schema>""" -416 -
417 - class simple_resolver(etree.Resolver): -
418 - def __init__(self, schema): -
419 self.schema = schema -
420 -
421 - def resolve(self, url, id, context): -
422 assert url == 'XXX.xsd' -423 return self.resolve_string(self.schema, context) -
424 -425 # tests: -426 -
427 - def test_xmlschema_resolvers(self): -
428 # test that resolvers work with schema. -429 parser = etree.XMLParser() -430 parser.resolvers.add(self.simple_resolver(self.resolver_schema_ext)) -431 schema_doc = etree.parse(self.resolver_schema_int, parser = parser) -432 schema = etree.XMLSchema(schema_doc) -
433 -
435 # test that the default resolver will get called if there's no -436 # specific parser resolver. -437 root_resolver = self.simple_resolver(self.resolver_schema_ext) -438 etree.get_default_parser().resolvers.add(root_resolver) -439 schema_doc = etree.parse(self.resolver_schema_int) -440 schema = etree.XMLSchema(schema_doc) -441 etree.get_default_parser().resolvers.remove(root_resolver) -
442 -
444 # test that the default resolver will not get called when a -445 # more specific resolver is registered. -446 -447 class res_root(etree.Resolver): -448 def resolve(self, url, id, context): -449 assert False -450 return None -
451 -452 root_resolver = res_root() -453 etree.get_default_parser().resolvers.add(root_resolver) -454 -455 parser = etree.XMLParser() -456 parser.resolvers.add(self.simple_resolver(self.resolver_schema_ext)) -457 -458 schema_doc = etree.parse(self.resolver_schema_int, parser = parser) -459 schema = etree.XMLSchema(schema_doc) -460 etree.get_default_parser().resolvers.remove(root_resolver) -461 -
463 # test that resolvers work in a nested fashion. -464 -465 resolver_schema = self.resolver_schema_ext -466 -467 class res_nested(etree.Resolver): -468 def __init__(self, ext_schema): -469 self.ext_schema = ext_schema -
470 -471 def resolve(self, url, id, context): -472 assert url == 'YYY.xsd' -473 return self.resolve_string(self.ext_schema, context) -474 -475 class res(etree.Resolver): -476 def __init__(self, ext_schema_1, ext_schema_2): -477 self.ext_schema_1 = ext_schema_1 -478 self.ext_schema_2 = ext_schema_2 -479 -480 def resolve(self, url, id, context): -481 assert url == 'XXX.xsd' -482 -483 new_parser = etree.XMLParser() -484 new_parser.resolvers.add(res_nested(self.ext_schema_2)) -485 new_schema_doc = etree.parse(self.ext_schema_1, parser = new_parser) -486 new_schema = etree.XMLSchema(new_schema_doc) -487 -488 return self.resolve_string(resolver_schema, context) -489 -490 parser = etree.XMLParser() -491 parser.resolvers.add(res(self.resolver_schema_int2, self.resolver_schema_ext)) -492 schema_doc = etree.parse(self.resolver_schema_int, parser = parser) -493 schema = etree.XMLSchema(schema_doc) -494 -495 -
496 -def test_suite(): -
497 suite = unittest.TestSuite() -498 suite.addTests([unittest.makeSuite(ETreeXMLSchemaTestCase)]) -499 suite.addTests([unittest.makeSuite(ETreeXMLSchemaResolversTestCase)]) -500 suite.addTests( -501 [make_doctest('../../../doc/validation.txt')]) -502 return suite -
503 -504 -505 if __name__ == '__main__': -506 print('to test use test.py %s' % __file__) -507 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase-class.html b/doc/html/api/lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase-class.html deleted file mode 100644 index d10cc66..0000000 --- a/doc/html/api/lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase-class.html +++ /dev/null @@ -1,486 +0,0 @@ - - - - - lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_xmlschema :: - Class ETreeXMLSchemaResolversTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ETreeXMLSchemaResolversTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ETreeXMLSchemaResolversTestCase
-
- -
- - - - - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-   - - simple_resolver -
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_xmlschema_resolvers(self) - source code - -
- -
-   - - - - - - -
test_xmlschema_resolvers_root(self) - source code - -
- -
-   - - - - - - -
test_xmlschema_resolvers_noroot(self) - source code - -
- -
-   - - - - - - -
test_xmlschema_nested_resolvers(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - resolver_schema_int = <_io.BytesIO object> -
-   - - resolver_schema_int2 = <_io.BytesIO object> -
-   - - resolver_schema_ext = '<xsd:schema xmlns:xsd="http://www.w3.or... -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

resolver_schema_ext

- -
-
-
-
Value:
-
-'''<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-    targetNamespace="http://codespeak.net/lxml/test/external">
-    <xsd:complexType name="AType">
-      <xsd:sequence><xsd:element name="b" type="xsd:string" minOccurs=\
-"0" maxOccurs="unbounded" /></xsd:sequence>
-    </xsd:complexType>
-</xsd:schema>'''
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase.simple_resolver-class.html b/doc/html/api/lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase.simple_resolver-class.html deleted file mode 100644 index 8fe98db..0000000 --- a/doc/html/api/lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase.simple_resolver-class.html +++ /dev/null @@ -1,307 +0,0 @@ - - - - - lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase.simple_resolver - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_xmlschema :: - Class ETreeXMLSchemaResolversTestCase :: - Class simple_resolver - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class simple_resolver

source code

-
-    object --+    
-             |    
-etree.Resolver --+
-                 |
-                ETreeXMLSchemaResolversTestCase.simple_resolver
-
- -
- - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - schema)
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-   - - - - - - -
resolve(self, - url, - id, - context)
- Override this method to resolve an external source by -system_url and public_id. The third argument is an -opaque context object.
- source code - -
- -
-

Inherited from etree.Resolver: - __new__, - resolve_empty, - resolve_file, - resolve_filename, - resolve_string -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - schema) -
(Constructor) -

-
source code  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

resolve(self, - url, - id, - context) -

-
source code  -
- -

Override this method to resolve an external source by -system_url and public_id. The third argument is an -opaque context object.

-

Return the result of one of the resolve_*() methods.

-
-
Overrides: - etree.Resolver.resolve -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html b/doc/html/api/lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html deleted file mode 100644 index 368dbc4..0000000 --- a/doc/html/api/lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html +++ /dev/null @@ -1,733 +0,0 @@ - - - - - lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_xmlschema :: - Class ETreeXMLSchemaTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ETreeXMLSchemaTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ETreeXMLSchemaTestCase
-
- -
- - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_xmlschema(self) - source code - -
- -
-   - - - - - - -
test_xmlschema_error_log(self) - source code - -
- -
-   - - - - - - -
test_xmlschema_error_log_path(self)
- We don't have a guarantee that there will always be a path -for a _LogEntry object (or even a node for which to determina -a path), but at least when this test was created schema validation -errors always got a node and an XPath value.
- source code - -
- -
-   - - - - - - -
test_xmlschema_default_attributes(self) - source code - -
- -
-   - - - - - - -
test_xmlschema_parse(self) - source code - -
- -
-   - - - - - - -
test_xmlschema_parse_default_attributes(self) - source code - -
- -
-   - - - - - - -
test_xmlschema_parse_default_attributes_schema_config(self) - source code - -
- -
-   - - - - - - -
test_xmlschema_parse_fixed_attributes(self) - source code - -
- -
-   - - - - - - -
test_xmlschema_stringio(self) - source code - -
- -
-   - - - - - - -
test_xmlschema_iterparse(self) - source code - -
- -
-   - - - - - - -
test_xmlschema_iterparse_incomplete(self) - source code - -
- -
-   - - - - - - -
test_xmlschema_iterparse_fail(self) - source code - -
- -
-   - - - - - - -
test_xmlschema_elementtree_error(self) - source code - -
- -
-   - - - - - - -
test_xmlschema_comment_error(self) - source code - -
- -
-   - - - - - - -
test_xmlschema_illegal_validation_error(self) - source code - -
- -
-   - - - - - - -
test_xmlschema_invalid_schema1(self) - source code - -
- -
-   - - - - - - -
test_xmlschema_invalid_schema2(self) - source code - -
- -
-   - - - - - - -
test_xmlschema_file(self) - source code - -
- -
-   - - - - - - -
test_xmlschema_import_file(self) - source code - -
- -
-   - - - - - - -
test_xmlschema_shortcut(self) - source code - -
- -
-   - - - - - - -
test_create_from_partial_doc(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

test_xmlschema_error_log_path(self) -

-
source code  -
- -
-We don't have a guarantee that there will always be a path
-for a _LogEntry object (or even a node for which to determina
-a path), but at least when this test was created schema validation
-errors always got a node and an XPath value. If that ever changes,
-we can modify this test to something like:
-    self.assertTrue(error_path is None or tree_path == error_path)
-That way, we can at least verify that if we did get a path value
-it wasn't bogus.
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_xpathevaluator-module.html b/doc/html/api/lxml.tests.test_xpathevaluator-module.html deleted file mode 100644 index ac81198..0000000 --- a/doc/html/api/lxml.tests.test_xpathevaluator-module.html +++ /dev/null @@ -1,547 +0,0 @@ - - - - - lxml.tests.test_xpathevaluator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_xpathevaluator - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module test_xpathevaluator

source code

-Test cases related to XPath evaluation and the XPath class - - - - - - - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - ETreeXPathTestCase
- XPath tests etree -
-   - - ETreeXPathClassTestCase
- Tests for the XPath class -
-   - - ETreeXPathExsltTestCase
- Tests for the EXSLT support in XPath (requires libxslt 1.1.25+) -
-   - - ETreeETXPathClassTestCase
- Tests for the ETXPath class -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
tag(elem) - source code - -
- -
-   - - - - - - -
tag_or_value(elem) - source code - -
- -
-   - - - - - - -
stringTest(ctxt, - s1) - source code - -
- -
-   - - - - - - -
stringListTest(ctxt, - s1) - source code - -
- -
-   - - - - - - -
floatTest(ctxt, - f1) - source code - -
- -
-   - - - - - - -
booleanTest(ctxt, - b1) - source code - -
- -
-   - - - - - - -
setTest(ctxt, - st1) - source code - -
- -
-   - - - - - - -
setTest2(ctxt, - st1) - source code - -
- -
-   - - - - - - -
argsTest1(ctxt, - s, - f, - b, - st) - source code - -
- -
-   - - - - - - -
argsTest2(ctxt, - st1, - st2) - source code - -
- -
-   - - - - - - -
resultTypesTest(ctxt) - source code - -
- -
-   - - - - - - -
resultTypesTest2(ctxt) - source code - -
- -
-   - - - - - - -
xpath()
- Test xpath extension functions.
- source code - -
- -
-   - - - - - - -
test_suite() - source code - -
- -
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - this_dir = '/home/stefan/source/Python/lxml/lxml-release/src/l... -
-   - - SAMPLE_XML = <lxml.etree._ElementTree object> -
-   - - uri = 'http://www.example.com/' -
-   - - extension = {(None, 'argsTest1'): <__builtin__.function object... -
-   - - __package__ = 'lxml.tests' -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

this_dir

- -
-
-
-
Value:
-
-'/home/stefan/source/Python/lxml/lxml-release/src/lxml/tests'
-
-
-
-
-
- -
- -
-

extension

- -
-
-
-
Value:
-
-{(None, 'argsTest1'): <__builtin__.function object>,
- (None, 'argsTest2'): <__builtin__.function object>,
- (None, 'booleanTest'): <__builtin__.function object>,
- (None, 'floatTest'): <__builtin__.function object>,
- (None, 'resultTypesTest'): <__builtin__.function object>,
- (None, 'resultTypesTest2'): <__builtin__.function object>,
- (None, 'setTest'): <__builtin__.function object>,
- (None, 'setTest2'): <__builtin__.function object>,
-...
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_xpathevaluator-pysrc.html b/doc/html/api/lxml.tests.test_xpathevaluator-pysrc.html deleted file mode 100644 index ba2c5db..0000000 --- a/doc/html/api/lxml.tests.test_xpathevaluator-pysrc.html +++ /dev/null @@ -1,2022 +0,0 @@ - - - - - lxml.tests.test_xpathevaluator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_xpathevaluator - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.test_xpathevaluator

-
-  1  # -*- coding: utf-8 -*- 
-  2   
-  3  """ 
-  4  Test cases related to XPath evaluation and the XPath class 
-  5  """ 
-  6   
-  7  import unittest, sys, os.path 
-  8   
-  9  this_dir = os.path.dirname(__file__) 
- 10  if this_dir not in sys.path: 
- 11      sys.path.insert(0, this_dir) # needed for Py3 
- 12   
- 13  from common_imports import etree, HelperTestCase, _bytes, BytesIO 
- 14  from common_imports import doctest, make_doctest 
- 15   
-
16 -class ETreeXPathTestCase(HelperTestCase): -
17 """XPath tests etree""" - 18 -
19 - def test_xpath_boolean(self): -
20 tree = self.parse('<a><b></b><b></b></a>') - 21 self.assertTrue(tree.xpath('boolean(/a/b)')) - 22 self.assertTrue(not tree.xpath('boolean(/a/c)')) -
23 -
24 - def test_xpath_number(self): -
25 tree = self.parse('<a>1</a>') - 26 self.assertEqual(1., - 27 tree.xpath('number(/a)')) - 28 tree = self.parse('<a>A</a>') - 29 actual = str(tree.xpath('number(/a)')) - 30 expected = ['nan', '1.#qnan', 'nanq'] - 31 if not actual.lower() in expected: - 32 self.fail('Expected a NAN value, got %s' % actual) -
33 -
34 - def test_xpath_string(self): -
35 tree = self.parse('<a>Foo</a>') - 36 self.assertEqual('Foo', - 37 tree.xpath('string(/a/text())')) -
38 -
39 - def test_xpath_document_root(self): -
40 tree = self.parse('<a><b/></a>') - 41 self.assertEqual([], - 42 tree.xpath('/')) -
43 -
44 - def test_xpath_namespace(self): -
45 tree = self.parse('<a xmlns="test" xmlns:p="myURI"/>') - 46 self.assertTrue((None, "test") in tree.xpath('namespace::*')) - 47 self.assertTrue(('p', 'myURI') in tree.xpath('namespace::*')) -
48 -
49 - def test_xpath_namespace_empty(self): -
50 tree = self.parse('<a/>') - 51 self.assertEqual([('xml', 'http://www.w3.org/XML/1998/namespace')], - 52 tree.xpath('namespace::*')) -
53 -
54 - def test_xpath_list_elements(self): -
55 tree = self.parse('<a><b>Foo</b><b>Bar</b></a>') - 56 root = tree.getroot() - 57 self.assertEqual([root[0], root[1]], - 58 tree.xpath('/a/b')) -
59 -
60 - def test_xpath_list_nothing(self): -
61 tree = self.parse('<a><b/></a>') - 62 self.assertEqual([], - 63 tree.xpath('/a/c')) - 64 # this seems to pass a different code path, also should return nothing - 65 self.assertEqual([], - 66 tree.xpath('/a/c/text()')) -
67 -
68 - def test_xpath_list_text(self): -
69 tree = self.parse('<a><b>Foo</b><b>Bar</b></a>') - 70 root = tree.getroot() - 71 self.assertEqual(['Foo', 'Bar'], - 72 tree.xpath('/a/b/text()')) -
73 -
75 tree = self.parse('<a><b>FooBar</b><b>BarFoo</b></a>') - 76 root = tree.getroot() - 77 self.assertEqual(['FooBar', 'BarFoo'], - 78 tree.xpath('/a/b/text()')) - 79 self.assertEqual([root[0], root[1]], - 80 [r.getparent() for r in tree.xpath('/a/b/text()')]) -
81 -
83 tree = self.parse('<a><b>FooBar</b><b>BarFoo</b></a>') - 84 root = tree.getroot() - 85 self.assertEqual(['FooBar', 'BarFoo'], - 86 tree.xpath('/a/b/text()', smart_strings=True)) - 87 self.assertEqual([root[0], root[1]], - 88 [r.getparent() for r in - 89 tree.xpath('/a/b/text()', smart_strings=True)]) - 90 self.assertEqual([None, None], - 91 [r.attrname for r in - 92 tree.xpath('/a/b/text()', smart_strings=True)]) - 93 - 94 self.assertEqual(['FooBar', 'BarFoo'], - 95 tree.xpath('/a/b/text()', smart_strings=False)) - 96 self.assertEqual([False, False], - 97 [hasattr(r, 'getparent') for r in - 98 tree.xpath('/a/b/text()', smart_strings=False)]) - 99 self.assertEqual([None, None], -100 [r.attrname for r in -101 tree.xpath('/a/b/text()', smart_strings=True)]) -
102 -
104 xml = _bytes('<a><b>FooBar\\u0680\\u3120</b><b>BarFoo\\u0680\\u3120</b></a>').decode("unicode_escape") -105 tree = self.parse(xml.encode('utf-8')) -106 root = tree.getroot() -107 self.assertEqual([_bytes('FooBar\\u0680\\u3120').decode("unicode_escape"), -108 _bytes('BarFoo\\u0680\\u3120').decode("unicode_escape")], -109 tree.xpath('/a/b/text()')) -110 self.assertEqual([root[0], root[1]], -111 [r.getparent() for r in tree.xpath('/a/b/text()')]) -
112 -
113 - def test_xpath_list_attribute(self): -
114 tree = self.parse('<a b="B" c="C"/>') -115 self.assertEqual(['B'], -116 tree.xpath('/a/@b')) -
117 -
119 tree = self.parse('<a b="BaSdFgHjKl" c="CqWeRtZuI"/>') -120 results = tree.xpath('/a/@c') -121 self.assertEqual(1, len(results)) -122 self.assertEqual('CqWeRtZuI', results[0]) -123 self.assertEqual(tree.getroot().tag, results[0].getparent().tag) -
124 -
126 tree = self.parse('<a b="BaSdFgHjKl" c="CqWeRtZuI"/>') -127 -128 results = tree.xpath('/a/@c', smart_strings=True) -129 self.assertEqual(1, len(results)) -130 self.assertEqual('CqWeRtZuI', results[0]) -131 self.assertEqual('c', results[0].attrname) -132 self.assertEqual(tree.getroot().tag, results[0].getparent().tag) -133 -134 results = tree.xpath('/a/@c', smart_strings=False) -135 self.assertEqual(1, len(results)) -136 self.assertEqual('CqWeRtZuI', results[0]) -137 self.assertEqual(False, hasattr(results[0], 'getparent')) -138 self.assertEqual(False, hasattr(results[0], 'attrname')) -
139 -
141 xml_data = ''' -142 <table> -143 <item xml:id="k1"><value>v1</value></item> -144 <item xml:id="k2"><value>v2</value></item> -145 </table> -146 ''' -147 -148 def lookup(dummy, id): -149 return etree.XML(xml_data).xpath('id(%r)' % id) -
150 functions = {(None, 'lookup') : lookup} -151 -152 root = etree.XML('<dummy/>') -153 values = root.xpath("lookup('k1')/value/text()", -154 extensions=functions) -155 self.assertEqual(['v1'], values) -156 self.assertEqual('value', values[0].getparent().tag) -
157 -
158 - def test_xpath_list_comment(self): -
159 tree = self.parse('<a><!-- Foo --></a>') -160 self.assertEqual(['<!-- Foo -->'], -161 list(map(repr, tree.xpath('/a/node()')))) -
162 -
163 - def test_rel_xpath_boolean(self): -
164 root = etree.XML('<a><b><c/></b></a>') -165 el = root[0] -166 self.assertTrue(el.xpath('boolean(c)')) -167 self.assertTrue(not el.xpath('boolean(d)')) -
168 -
170 tree = self.parse('<a><c><b>Foo</b><b>Bar</b></c><c><b>Hey</b></c></a>') -171 root = tree.getroot() -172 c = root[0] -173 self.assertEqual([c[0], c[1]], -174 c.xpath('b')) -175 self.assertEqual([c[0], c[1], root[1][0]], -176 c.xpath('//b')) -
177 -
178 - def test_xpath_ns(self): -
179 tree = self.parse('<a xmlns="uri:a"><b></b></a>') -180 root = tree.getroot() -181 self.assertEqual( -182 [root[0]], -183 tree.xpath('//foo:b', namespaces={'foo': 'uri:a'})) -184 self.assertEqual( -185 [], -186 tree.xpath('//foo:b', namespaces={'foo': 'uri:c'})) -187 self.assertEqual( -188 [root[0]], -189 root.xpath('//baz:b', namespaces={'baz': 'uri:a'})) -
190 -
191 - def test_xpath_ns_none(self): -
192 tree = self.parse('<a xmlns="uri:a"><b></b></a>') -193 root = tree.getroot() -194 self.assertRaises( -195 TypeError, -196 root.xpath, '//b', namespaces={None: 'uri:a'}) -
197 -
198 - def test_xpath_ns_empty(self): -
199 tree = self.parse('<a xmlns="uri:a"><b></b></a>') -200 root = tree.getroot() -201 self.assertRaises( -202 TypeError, -203 root.xpath, '//b', namespaces={'': 'uri:a'}) -
204 -
205 - def test_xpath_error(self): -
206 tree = self.parse('<a/>') -207 self.assertRaises(etree.XPathEvalError, tree.xpath, '\\fad') -
208 -
209 - def test_xpath_class_error(self): -
210 self.assertRaises(SyntaxError, etree.XPath, '\\fad') -211 self.assertRaises(etree.XPathSyntaxError, etree.XPath, '\\fad') -
212 -
213 - def test_xpath_prefix_error(self): -
214 tree = self.parse('<a/>') -215 self.assertRaises(etree.XPathEvalError, tree.xpath, '/fa:d') -
216 -
218 tree = self.parse('<a/>') -219 xpath = etree.XPath("/fa:d") -220 self.assertRaises(etree.XPathEvalError, xpath, tree) -
221 -
222 - def test_elementtree_getpath(self): -
223 a = etree.Element("a") -224 b = etree.SubElement(a, "b") -225 c = etree.SubElement(a, "c") -226 d1 = etree.SubElement(c, "d") -227 d2 = etree.SubElement(c, "d") -228 -229 tree = etree.ElementTree(a) -230 self.assertEqual('/a/c/d', -231 tree.getpath(d2)[:6]) -232 self.assertEqual([d2], -233 tree.xpath(tree.getpath(d2))) -
234 -
236 a = etree.Element("a") -237 b = etree.SubElement(a, "b") -238 c = etree.SubElement(a, "c") -239 d1 = etree.SubElement(c, "d") -240 d2 = etree.SubElement(c, "d") -241 -242 tree = etree.ElementTree(c) -243 self.assertEqual('/c/d', -244 tree.getpath(d2)[:4]) -245 self.assertEqual([d2], -246 tree.xpath(tree.getpath(d2))) -
247 -
248 - def test_xpath_evaluator(self): -
249 tree = self.parse('<a><b><c></c></b></a>') -250 e = etree.XPathEvaluator(tree) -251 root = tree.getroot() -252 self.assertEqual( -253 [root], -254 e('//a')) -
255 -
256 - def test_xpath_evaluator_tree(self): -
257 tree = self.parse('<a><b><c></c></b></a>') -258 child_tree = etree.ElementTree(tree.getroot()[0]) -259 e = etree.XPathEvaluator(child_tree) -260 self.assertEqual( -261 [], -262 e('a')) -263 root = child_tree.getroot() -264 self.assertEqual( -265 [root[0]], -266 e('c')) -
267 -
269 tree = self.parse('<a><b><c></c></b></a>') -270 child_tree = etree.ElementTree(tree.getroot()[0]) -271 e = etree.XPathEvaluator(child_tree) -272 self.assertEqual( -273 [], -274 e('/a')) -275 root = child_tree.getroot() -276 self.assertEqual( -277 [root], -278 e('/b')) -279 self.assertEqual( -280 [], -281 e('/c')) -
282 -
284 tree = self.parse('<a><b><c></c></b></a>') -285 root = tree.getroot() -286 e = etree.XPathEvaluator(root[0]) -287 self.assertEqual( -288 [root[0][0]], -289 e('c')) -
290 -
291 - def test_xpath_extensions(self): -
292 def foo(evaluator, a): -293 return 'hello %s' % a -
294 extension = {(None, 'foo'): foo} -295 tree = self.parse('<a><b></b></a>') -296 e = etree.XPathEvaluator(tree, extensions=[extension]) -297 self.assertEqual( -298 "hello you", e("foo('you')")) -299 -
301 def foo(evaluator, a, b): -302 return "hello %s and %s" % (a, b) -
303 extension = {(None, 'foo'): foo} -304 tree = self.parse('<a><b></b></a>') -305 e = etree.XPathEvaluator(tree, extensions=[extension]) -306 self.assertRaises(TypeError, e, "foo('you')") -307 -
309 def foo(evaluator, a): -310 return 1/0 -
311 extension = {(None, 'foo'): foo} -312 tree = self.parse('<a/>') -313 e = etree.XPathEvaluator(tree, extensions=[extension]) -314 self.assertRaises(ZeroDivisionError, e, "foo('test')") -315 -
317 def f(evaluator, arg): -318 r = etree.Element('results') -319 b = etree.SubElement(r, 'result') -320 b.text = 'Hoi' -321 b = etree.SubElement(r, 'result') -322 b.text = 'Dag' -323 return r -
324 -325 x = self.parse('<a/>') -326 e = etree.XPathEvaluator(x, extensions=[{(None, 'foo'): f}]) -327 r = e("foo('World')/result") -328 self.assertEqual(2, len(r)) -329 self.assertEqual('Hoi', r[0].text) -330 self.assertEqual('Dag', r[1].text) -331 -
333 def f(evaluator, nodes): -334 r = etree.SubElement(nodes[0], 'results') -335 b = etree.SubElement(r, 'result') -336 b.text = 'Hoi' -337 b = etree.SubElement(r, 'result') -338 b.text = 'Dag' -339 return r -
340 -341 x = self.parse('<a/>') -342 e = etree.XPathEvaluator(x, extensions=[{(None, 'foo'): f}]) -343 r = e("foo(/*)/result") -344 self.assertEqual(2, len(r)) -345 self.assertEqual('Hoi', r[0].text) -346 self.assertEqual('Dag', r[1].text) -347 -
349 def f(evaluator, nodes): -350 r = etree.Element('results') -351 b = etree.SubElement(r, 'result') -352 b.text = 'Hoi' -353 b = etree.SubElement(r, 'result') -354 b.text = 'Dag' -355 r.append(nodes[0]) -356 return r -
357 -358 x = self.parse('<result>Honk</result>') -359 e = etree.XPathEvaluator(x, extensions=[{(None, 'foo'): f}]) -360 r = e("foo(/*)/result") -361 self.assertEqual(3, len(r)) -362 self.assertEqual('Hoi', r[0].text) -363 self.assertEqual('Dag', r[1].text) -364 self.assertEqual('Honk', r[2].text) -365 -
366 - def test_xpath_context_node(self): -
367 tree = self.parse('<root><a/><b><c/></b></root>') -368 -369 check_call = [] -370 def check_context(ctxt, nodes): -371 self.assertEqual(len(nodes), 1) -372 check_call.append(nodes[0].tag) -373 self.assertEqual(ctxt.context_node, nodes[0]) -374 return True -
375 -376 find = etree.XPath("//*[p:foo(.)]", -377 namespaces={'p' : 'ns'}, -378 extensions=[{('ns', 'foo') : check_context}]) -379 find(tree) -380 -381 check_call.sort() -382 self.assertEqual(check_call, ["a", "b", "c", "root"]) -383 -
385 tree = self.parse('<root><a/><b><c/></b></root>') -386 -387 check_call = {} -388 def check_context(ctxt, nodes): -389 self.assertEqual(len(nodes), 1) -390 tag = nodes[0].tag -391 # empty during the "b" call, a "b" during the "c" call -392 check_call[tag] = ctxt.eval_context.get("b") -393 ctxt.eval_context[tag] = tag -394 return True -
395 -396 find = etree.XPath("//b[p:foo(.)]/c[p:foo(.)]", -397 namespaces={'p' : 'ns'}, -398 extensions=[{('ns', 'foo') : check_context}]) -399 result = find(tree) -400 -401 self.assertEqual(result, [tree.getroot()[1][0]]) -402 self.assertEqual(check_call, {'b':None, 'c':'b'}) -403 -
405 tree = self.parse('<root><a/><b><c/></b></root>') -406 -407 check_call = {} -408 def check_context(ctxt): -409 check_call["done"] = True -410 # context must be empty for each new evaluation -411 self.assertEqual(len(ctxt.eval_context), 0) -412 ctxt.eval_context["test"] = True -413 return True -
414 -415 find = etree.XPath("//b[p:foo()]", -416 namespaces={'p' : 'ns'}, -417 extensions=[{('ns', 'foo') : check_context}]) -418 result = find(tree) -419 -420 self.assertEqual(result, [tree.getroot()[1]]) -421 self.assertEqual(check_call["done"], True) -422 -423 check_call.clear() -424 find = etree.XPath("//b[p:foo()]", -425 namespaces={'p' : 'ns'}, -426 extensions=[{('ns', 'foo') : check_context}]) -427 result = find(tree) -428 -429 self.assertEqual(result, [tree.getroot()[1]]) -430 self.assertEqual(check_call["done"], True) -431 -
432 - def test_xpath_variables(self): -
433 x = self.parse('<a attr="true"/>') -434 e = etree.XPathEvaluator(x) -435 -436 expr = "/a[@attr=$aval]" -437 r = e(expr, aval=1) -438 self.assertEqual(0, len(r)) -439 -440 r = e(expr, aval="true") -441 self.assertEqual(1, len(r)) -442 self.assertEqual("true", r[0].get('attr')) -443 -444 r = e(expr, aval=True) -445 self.assertEqual(1, len(r)) -446 self.assertEqual("true", r[0].get('attr')) -
447 -
449 x = self.parse('<a attr="true"/>') -450 e = etree.XPathEvaluator(x) -451 -452 element = etree.Element("test-el") -453 etree.SubElement(element, "test-sub") -454 expr = "$value" -455 r = e(expr, value=element) -456 self.assertEqual(1, len(r)) -457 self.assertEqual(element.tag, r[0].tag) -458 self.assertEqual(element[0].tag, r[0][0].tag) -
459 -
460 - def test_xpath_extensions_mix(self): -
461 x = self.parse('<a attr="true"><test/></a>') -462 -463 class LocalException(Exception): -464 pass -
465 -466 def foo(evaluator, a, varval): -467 etree.Element("DUMMY") -468 if varval == 0: -469 raise LocalException -470 elif varval == 1: -471 return () -472 elif varval == 2: -473 return None -474 elif varval == 3: -475 return a[0][0] -476 a = a[0] -477 if a.get("attr") == str(varval): -478 return a -479 else: -480 return etree.Element("NODE") -481 -482 extension = {(None, 'foo'): foo} -483 e = etree.XPathEvaluator(x, extensions=[extension]) -484 del x -485 -486 self.assertRaises(LocalException, e, "foo(., 0)") -487 self.assertRaises(LocalException, e, "foo(., $value)", value=0) -488 -489 r = e("foo(., $value)", value=1) -490 self.assertEqual(len(r), 0) -491 -492 r = e("foo(., 1)") -493 self.assertEqual(len(r), 0) -494 -495 r = e("foo(., $value)", value=2) -496 self.assertEqual(len(r), 0) -497 -498 r = e("foo(., $value)", value=3) -499 self.assertEqual(len(r), 1) -500 self.assertEqual(r[0].tag, "test") -501 -502 r = e("foo(., $value)", value="false") -503 self.assertEqual(len(r), 1) -504 self.assertEqual(r[0].tag, "NODE") -505 -506 r = e("foo(., 'false')") -507 self.assertEqual(len(r), 1) -508 self.assertEqual(r[0].tag, "NODE") -509 -510 r = e("foo(., 'true')") -511 self.assertEqual(len(r), 1) -512 self.assertEqual(r[0].tag, "a") -513 self.assertEqual(r[0][0].tag, "test") -514 -515 r = e("foo(., $value)", value="true") -516 self.assertEqual(len(r), 1) -517 self.assertEqual(r[0].tag, "a") -518 -519 self.assertRaises(LocalException, e, "foo(., 0)") -520 self.assertRaises(LocalException, e, "foo(., $value)", value=0) -521 -522 -
523 -class ETreeXPathClassTestCase(HelperTestCase): -
524 "Tests for the XPath class" -
525 - def test_xpath_compile_doc(self): -
526 x = self.parse('<a attr="true"/>') -527 -528 expr = etree.XPath("/a[@attr != 'true']") -529 r = expr(x) -530 self.assertEqual(0, len(r)) -531 -532 expr = etree.XPath("/a[@attr = 'true']") -533 r = expr(x) -534 self.assertEqual(1, len(r)) -535 -536 expr = etree.XPath( expr.path ) -537 r = expr(x) -538 self.assertEqual(1, len(r)) -
539 -
540 - def test_xpath_compile_element(self): -
541 x = self.parse('<a><b/><c/></a>') -542 root = x.getroot() -543 -544 expr = etree.XPath("./b") -545 r = expr(root) -546 self.assertEqual(1, len(r)) -547 self.assertEqual('b', r[0].tag) -548 -549 expr = etree.XPath("./*") -550 r = expr(root) -551 self.assertEqual(2, len(r)) -
552 -
553 - def test_xpath_compile_vars(self): -
554 x = self.parse('<a attr="true"/>') -555 -556 expr = etree.XPath("/a[@attr=$aval]") -557 r = expr(x, aval=False) -558 self.assertEqual(0, len(r)) -559 -560 r = expr(x, aval=True) -561 self.assertEqual(1, len(r)) -
562 -
563 - def test_xpath_compile_error(self): -
564 self.assertRaises(SyntaxError, etree.XPath, '\\fad') -
565 -
567 self.assertRaises(ValueError, etree.XPath('*'), etree.ElementTree()) -
568 -569 -
570 -class ETreeXPathExsltTestCase(HelperTestCase): -
571 "Tests for the EXSLT support in XPath (requires libxslt 1.1.25+)" -572 -573 NSMAP = dict( -574 date = "http://exslt.org/dates-and-times", -575 math = "http://exslt.org/math", -576 set = "http://exslt.org/sets", -577 str = "http://exslt.org/strings", -578 ) -579 -
581 tree = self.parse('<a><b>2009-11-12</b><b>2008-12-11</b></a>') -582 -583 match_dates = tree.xpath('//b[date:year(string()) = 2009]', -584 namespaces=self.NSMAP) -585 self.assertTrue(match_dates, str(match_dates)) -586 self.assertEqual(len(match_dates), 1, str(match_dates)) -587 self.assertEqual(match_dates[0].text, '2009-11-12') -
588 -
590 tree = self.parse('<a><b>2009-11-12</b><b>2008-12-11</b></a>') -591 -592 aligned_date = tree.xpath( -593 'str:align(string(//b[1]), "%s", "center")' % ('-'*20), -594 namespaces=self.NSMAP) -595 self.assertTrue(aligned_date, str(aligned_date)) -596 self.assertEqual(aligned_date, '-----2009-11-12-----') -
597 -598 -
599 -class ETreeETXPathClassTestCase(HelperTestCase): -
600 "Tests for the ETXPath class" -
601 - def test_xpath_compile_ns(self): -
602 x = self.parse('<a><b xmlns="nsa"/><b xmlns="nsb"/></a>') -603 -604 expr = etree.ETXPath("/a/{nsa}b") -605 r = expr(x) -606 self.assertEqual(1, len(r)) -607 self.assertEqual('{nsa}b', r[0].tag) -608 -609 expr = etree.ETXPath("/a/{nsb}b") -610 r = expr(x) -611 self.assertEqual(1, len(r)) -612 self.assertEqual('{nsb}b', r[0].tag) -
613 -614 # disabled this test as non-ASCII characters in namespace URIs are -615 # not acceptable -
617 x = self.parse(_bytes('<a><b xmlns="http://nsa/\\uf8d2"/><b xmlns="http://nsb/\\uf8d1"/></a>' -618 ).decode("unicode_escape")) -619 -620 expr = etree.ETXPath(_bytes("/a/{http://nsa/\\uf8d2}b").decode("unicode_escape")) -621 r = expr(x) -622 self.assertEqual(1, len(r)) -623 self.assertEqual(_bytes('{http://nsa/\\uf8d2}b').decode("unicode_escape"), r[0].tag) -624 -625 expr = etree.ETXPath(_bytes("/a/{http://nsb/\\uf8d1}b").decode("unicode_escape")) -626 r = expr(x) -627 self.assertEqual(1, len(r)) -628 self.assertEqual(_bytes('{http://nsb/\\uf8d1}b').decode("unicode_escape"), r[0].tag) -
629 -630 SAMPLE_XML = etree.parse(BytesIO(""" -631 <body> -632 <tag>text</tag> -633 <section> -634 <tag>subtext</tag> -635 </section> -636 <tag /> -637 <tag /> -638 </body> -639 """)) -640 -
641 -def tag(elem): -
642 return elem.tag -
643 -
644 -def tag_or_value(elem): -
645 return getattr(elem, 'tag', elem) -
646 -
647 -def stringTest(ctxt, s1): -
648 return "Hello "+s1 -
649 -
650 -def stringListTest(ctxt, s1): -
651 return ["Hello "] + list(s1) + ["!"] -
652 -
653 -def floatTest(ctxt, f1): -
654 return f1+4 -
655 -
656 -def booleanTest(ctxt, b1): -
657 return not b1 -
658 -
659 -def setTest(ctxt, st1): -
660 return st1[0] -
661 -
662 -def setTest2(ctxt, st1): -
663 return st1[0:2] -
664 -
665 -def argsTest1(ctxt, s, f, b, st): -
666 return ", ".join(map(str, (s, f, b, list(map(tag, st))))) -
667 -
668 -def argsTest2(ctxt, st1, st2): -
669 st1.extend(st2) -670 return st1 -
671 -
672 -def resultTypesTest(ctxt): -
673 return [None,None] -
674 -
675 -def resultTypesTest2(ctxt): -
676 return resultTypesTest -
677 -678 uri = "http://www.example.com/" -679 -680 extension = {(None, 'stringTest'): stringTest, -681 (None, 'stringListTest'): stringListTest, -682 (None, 'floatTest'): floatTest, -683 (None, 'booleanTest'): booleanTest, -684 (None, 'setTest'): setTest, -685 (None, 'setTest2'): setTest2, -686 (None, 'argsTest1'): argsTest1, -687 (None, 'argsTest2'): argsTest2, -688 (None, 'resultTypesTest'): resultTypesTest, -689 (None, 'resultTypesTest2'): resultTypesTest2,} -690 -
691 -def xpath(): -
692 """ -693 Test xpath extension functions. -694 -695 >>> root = SAMPLE_XML -696 >>> e = etree.XPathEvaluator(root, extensions=[extension]) -697 >>> e("stringTest('you')") -698 'Hello you' -699 >>> e(_bytes("stringTest('\\\\xe9lan')").decode("unicode_escape")) -700 u'Hello \\xe9lan' -701 >>> e("stringTest('you','there')") #doctest: +ELLIPSIS -702 Traceback (most recent call last): -703 ... -704 TypeError: stringTest() takes... 2 ...arguments ... -705 >>> e("floatTest(2)") -706 6.0 -707 >>> e("booleanTest(true())") -708 False -709 >>> list(map(tag, e("setTest(/body/tag)"))) -710 ['tag'] -711 >>> list(map(tag, e("setTest2(/body/*)"))) -712 ['tag', 'section'] -713 >>> list(map(tag_or_value, e("stringListTest(/body/tag)"))) -714 ['Hello ', 'tag', 'tag', 'tag', '!'] -715 >>> e("argsTest1('a',1.5,true(),/body/tag)") -716 "a, 1.5, True, ['tag', 'tag', 'tag']" -717 >>> list(map(tag, e("argsTest2(/body/tag, /body/section)"))) -718 ['tag', 'section', 'tag', 'tag'] -719 >>> e("resultTypesTest()") -720 Traceback (most recent call last): -721 ... -722 XPathResultError: This is not a supported node-set result: None -723 >>> try: -724 ... e("resultTypesTest2()") -725 ... except etree.XPathResultError: -726 ... print("Got error") -727 Got error -728 """ -
729 -730 if sys.version_info[0] >= 3: -731 xpath.__doc__ = xpath.__doc__.replace(" u'", " '") -732 xpath.__doc__ = xpath.__doc__.replace(" XPathResultError", -733 " lxml.etree.XPathResultError") -734 xpath.__doc__ = xpath.__doc__.replace(" exactly 2 arguments", -735 " exactly 2 positional arguments") -736 -
737 -def test_suite(): -
738 suite = unittest.TestSuite() -739 suite.addTests([unittest.makeSuite(ETreeXPathTestCase)]) -740 suite.addTests([unittest.makeSuite(ETreeXPathClassTestCase)]) -741 if etree.LIBXSLT_COMPILED_VERSION >= (1,1,25): -742 suite.addTests([unittest.makeSuite(ETreeXPathExsltTestCase)]) -743 suite.addTests([unittest.makeSuite(ETreeETXPathClassTestCase)]) -744 suite.addTests([doctest.DocTestSuite()]) -745 suite.addTests( -746 [make_doctest('../../../doc/xpathxslt.txt')]) -747 return suite -
748 -749 if __name__ == '__main__': -750 print('to test use test.py %s' % __file__) -751 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_xpathevaluator.ETreeETXPathClassTestCase-class.html b/doc/html/api/lxml.tests.test_xpathevaluator.ETreeETXPathClassTestCase-class.html deleted file mode 100644 index 34cee08..0000000 --- a/doc/html/api/lxml.tests.test_xpathevaluator.ETreeETXPathClassTestCase-class.html +++ /dev/null @@ -1,379 +0,0 @@ - - - - - lxml.tests.test_xpathevaluator.ETreeETXPathClassTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_xpathevaluator :: - Class ETreeETXPathClassTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ETreeETXPathClassTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ETreeETXPathClassTestCase
-
- -
-Tests for the ETXPath class - - - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_xpath_compile_ns(self) - source code - -
- -
-   - - - - - - -
_test_xpath_compile_unicode(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_xpathevaluator.ETreeXPathClassTestCase-class.html b/doc/html/api/lxml.tests.test_xpathevaluator.ETreeXPathClassTestCase-class.html deleted file mode 100644 index eb0cb83..0000000 --- a/doc/html/api/lxml.tests.test_xpathevaluator.ETreeXPathClassTestCase-class.html +++ /dev/null @@ -1,427 +0,0 @@ - - - - - lxml.tests.test_xpathevaluator.ETreeXPathClassTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_xpathevaluator :: - Class ETreeXPathClassTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ETreeXPathClassTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ETreeXPathClassTestCase
-
- -
-Tests for the XPath class - - - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_xpath_compile_doc(self) - source code - -
- -
-   - - - - - - -
test_xpath_compile_element(self) - source code - -
- -
-   - - - - - - -
test_xpath_compile_vars(self) - source code - -
- -
-   - - - - - - -
test_xpath_compile_error(self) - source code - -
- -
-   - - - - - - -
test_xpath_elementtree_error(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_xpathevaluator.ETreeXPathExsltTestCase-class.html b/doc/html/api/lxml.tests.test_xpathevaluator.ETreeXPathExsltTestCase-class.html deleted file mode 100644 index 34b0f3a..0000000 --- a/doc/html/api/lxml.tests.test_xpathevaluator.ETreeXPathExsltTestCase-class.html +++ /dev/null @@ -1,429 +0,0 @@ - - - - - lxml.tests.test_xpathevaluator.ETreeXPathExsltTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_xpathevaluator :: - Class ETreeXPathExsltTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ETreeXPathExsltTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ETreeXPathExsltTestCase
-
- -
-Tests for the EXSLT support in XPath (requires libxslt 1.1.25+) - - - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_xpath_exslt_functions_date(self) - source code - -
- -
-   - - - - - - -
test_xpath_exslt_functions_strings(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - NSMAP = {'date': 'http://exslt.org/dates-and-times', 'math': '... -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Class Variable Details[hide private]
-
- -
- -
-

NSMAP

- -
-
-
-
Value:
-
-{'date': 'http://exslt.org/dates-and-times',
- 'math': 'http://exslt.org/math',
- 'set': 'http://exslt.org/sets',
- 'str': 'http://exslt.org/strings'}
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html b/doc/html/api/lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html deleted file mode 100644 index dd564e3..0000000 --- a/doc/html/api/lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html +++ /dev/null @@ -1,1051 +0,0 @@ - - - - - lxml.tests.test_xpathevaluator.ETreeXPathTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_xpathevaluator :: - Class ETreeXPathTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ETreeXPathTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ETreeXPathTestCase
-
- -
-XPath tests etree - - - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_xpath_boolean(self) - source code - -
- -
-   - - - - - - -
test_xpath_number(self) - source code - -
- -
-   - - - - - - -
test_xpath_string(self) - source code - -
- -
-   - - - - - - -
test_xpath_document_root(self) - source code - -
- -
-   - - - - - - -
test_xpath_namespace(self) - source code - -
- -
-   - - - - - - -
test_xpath_namespace_empty(self) - source code - -
- -
-   - - - - - - -
test_xpath_list_elements(self) - source code - -
- -
-   - - - - - - -
test_xpath_list_nothing(self) - source code - -
- -
-   - - - - - - -
test_xpath_list_text(self) - source code - -
- -
-   - - - - - - -
test_xpath_list_text_parent(self) - source code - -
- -
-   - - - - - - -
test_xpath_list_text_parent_no_smart_strings(self) - source code - -
- -
-   - - - - - - -
test_xpath_list_unicode_text_parent(self) - source code - -
- -
-   - - - - - - -
test_xpath_list_attribute(self) - source code - -
- -
-   - - - - - - -
test_xpath_list_attribute_parent(self) - source code - -
- -
-   - - - - - - -
test_xpath_list_attribute_parent_no_smart_strings(self) - source code - -
- -
-   - - - - - - -
test_xpath_text_from_other_document(self) - source code - -
- -
-   - - - - - - -
test_xpath_list_comment(self) - source code - -
- -
-   - - - - - - -
test_rel_xpath_boolean(self) - source code - -
- -
-   - - - - - - -
test_rel_xpath_list_elements(self) - source code - -
- -
-   - - - - - - -
test_xpath_ns(self) - source code - -
- -
-   - - - - - - -
test_xpath_ns_none(self) - source code - -
- -
-   - - - - - - -
test_xpath_ns_empty(self) - source code - -
- -
-   - - - - - - -
test_xpath_error(self) - source code - -
- -
-   - - - - - - -
test_xpath_class_error(self) - source code - -
- -
-   - - - - - - -
test_xpath_prefix_error(self) - source code - -
- -
-   - - - - - - -
test_xpath_class_prefix_error(self) - source code - -
- -
-   - - - - - - -
test_elementtree_getpath(self) - source code - -
- -
-   - - - - - - -
test_elementtree_getpath_partial(self) - source code - -
- -
-   - - - - - - -
test_xpath_evaluator(self) - source code - -
- -
-   - - - - - - -
test_xpath_evaluator_tree(self) - source code - -
- -
-   - - - - - - -
test_xpath_evaluator_tree_absolute(self) - source code - -
- -
-   - - - - - - -
test_xpath_evaluator_element(self) - source code - -
- -
-   - - - - - - -
test_xpath_extensions(self) - source code - -
- -
-   - - - - - - -
test_xpath_extensions_wrong_args(self) - source code - -
- -
-   - - - - - - -
test_xpath_extensions_error(self) - source code - -
- -
-   - - - - - - -
test_xpath_extensions_nodes(self) - source code - -
- -
-   - - - - - - -
test_xpath_extensions_nodes_append(self) - source code - -
- -
-   - - - - - - -
test_xpath_extensions_nodes_append2(self) - source code - -
- -
-   - - - - - - -
test_xpath_context_node(self) - source code - -
- -
-   - - - - - - -
test_xpath_eval_context_propagation(self) - source code - -
- -
-   - - - - - - -
test_xpath_eval_context_clear(self) - source code - -
- -
-   - - - - - - -
test_xpath_variables(self) - source code - -
- -
-   - - - - - - -
test_xpath_variables_nodeset(self) - source code - -
- -
-   - - - - - - -
test_xpath_extensions_mix(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_xslt-module.html b/doc/html/api/lxml.tests.test_xslt-module.html deleted file mode 100644 index 0e9abe6..0000000 --- a/doc/html/api/lxml.tests.test_xslt-module.html +++ /dev/null @@ -1,302 +0,0 @@ - - - - - lxml.tests.test_xslt - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_xslt - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module test_xslt

source code

-Test cases related to XSLT processing - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - unicode
- str(object='') -> string -
-   - - basestring
- str(object='') -> string -
-   - - ETreeXSLTTestCase
- XSLT tests etree -
-   - - ETreeEXSLTTestCase
- EXSLT tests -
-   - - ETreeXSLTExtFuncTestCase
- Tests for XPath extension functions in XSLT. -
-   - - ETreeXSLTExtElementTestCase
- Tests for extension elements in XSLT. -
-   - - Py3XSLTTestCase
- XSLT tests for etree under Python 3 -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
test_suite() - source code - -
- -
- - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - this_dir = '/home/stefan/source/Python/lxml/lxml-release/src/l... -
-   - - is_python3 = False -
-   - - __package__ = 'lxml.tests' -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

this_dir

- -
-
-
-
Value:
-
-'/home/stefan/source/Python/lxml/lxml-release/src/lxml/tests'
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_xslt-pysrc.html b/doc/html/api/lxml.tests.test_xslt-pysrc.html deleted file mode 100644 index 0a0673f..0000000 --- a/doc/html/api/lxml.tests.test_xslt-pysrc.html +++ /dev/null @@ -1,4522 +0,0 @@ - - - - - lxml.tests.test_xslt - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_xslt - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.tests.test_xslt

-
-   1  # -*- coding: utf-8 -*- 
-   2   
-   3  """ 
-   4  Test cases related to XSLT processing 
-   5  """ 
-   6   
-   7  import io 
-   8  import sys 
-   9  import copy 
-  10  import gzip 
-  11  import os.path 
-  12  import unittest 
-  13  import contextlib 
-  14  from textwrap import dedent 
-  15  from tempfile import NamedTemporaryFile 
-  16   
-  17  this_dir = os.path.dirname(__file__) 
-  18  if this_dir not in sys.path: 
-  19      sys.path.insert(0, this_dir) # needed for Py3 
-  20   
-  21  is_python3 = sys.version_info[0] >= 3 
-  22   
-  23  try: 
-  24      unicode 
-  25  except NameError: # Python 3 
-  26      unicode = str 
-  27   
-  28  try: 
-  29      basestring 
-  30  except NameError: # Python 3 
-  31      basestring = str 
-  32   
-  33  from .common_imports import etree, BytesIO, HelperTestCase, fileInTestDir 
-  34  from .common_imports import doctest, _bytes, _str, make_doctest, skipif 
-
35 - 36 -class ETreeXSLTTestCase(HelperTestCase): -
37 """XSLT tests etree""" - 38 -
39 - def test_xslt(self): -
40 tree = self.parse('<a><b>B</b><c>C</c></a>') - 41 style = self.parse('''\ - 42 <xsl:stylesheet version="1.0" - 43 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 44 <xsl:template match="*" /> - 45 <xsl:template match="/"> - 46 <foo><xsl:value-of select="/a/b/text()" /></foo> - 47 </xsl:template> - 48 </xsl:stylesheet>''') - 49 - 50 st = etree.XSLT(style) - 51 res = st(tree) - 52 self.assertEqual('''\ - 53 <?xml version="1.0"?> - 54 <foo>B</foo> - 55 ''', - 56 str(res)) -
57 -
59 self.assertRaises(ValueError, etree.XSLT, etree.ElementTree()) -
60 -
61 - def test_xslt_input_none(self): -
62 self.assertRaises(TypeError, etree.XSLT, None) -
63 -
65 style = self.parse('''\ - 66 <xsl:stylesheet version="1.0" - 67 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 68 <xsl:stylesheet /> - 69 </xsl:stylesheet>''') - 70 - 71 self.assertRaises( - 72 etree.XSLTParseError, etree.XSLT, style) -
73 -
74 - def test_xslt_copy(self): -
75 tree = self.parse('<a><b>B</b><c>C</c></a>') - 76 style = self.parse('''\ - 77 <xsl:stylesheet version="1.0" - 78 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 79 <xsl:template match="*" /> - 80 <xsl:template match="/"> - 81 <foo><xsl:value-of select="/a/b/text()" /></foo> - 82 </xsl:template> - 83 </xsl:stylesheet>''') - 84 - 85 transform = etree.XSLT(style) - 86 res = transform(tree) - 87 self.assertEqual('''\ - 88 <?xml version="1.0"?> - 89 <foo>B</foo> - 90 ''', - 91 str(res)) - 92 - 93 transform_copy = copy.deepcopy(transform) - 94 res = transform_copy(tree) - 95 self.assertEqual('''\ - 96 <?xml version="1.0"?> - 97 <foo>B</foo> - 98 ''', - 99 str(res)) - 100 - 101 transform = etree.XSLT(style) - 102 res = transform(tree) - 103 self.assertEqual('''\ - 104 <?xml version="1.0"?> - 105 <foo>B</foo> - 106 ''', - 107 str(res)) -
108 - 109 @contextlib.contextmanager -
110 - def _xslt_setup( - 111 self, encoding='UTF-16', expected_encoding=None, - 112 expected="""<?xml version="1.0" encoding="%(ENCODING)s"?><foo>\\uF8D2</foo>"""): -
113 tree = self.parse(_bytes('<a><b>\\uF8D2</b><c>\\uF8D2</c></a>' - 114 ).decode("unicode_escape")) - 115 style = self.parse('''\ - 116 <xsl:stylesheet version="1.0" - 117 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 118 <xsl:output encoding="%(ENCODING)s"/> - 119 <xsl:template match="/"> - 120 <foo><xsl:value-of select="/a/b/text()" /></foo> - 121 </xsl:template> - 122 </xsl:stylesheet>''' % {'ENCODING': encoding}) - 123 - 124 st = etree.XSLT(style) - 125 res = st(tree) - 126 expected = _bytes(dedent(expected).strip()).decode("unicode_escape").replace('\n', '') % { - 127 'ENCODING': expected_encoding or encoding, - 128 } - 129 - 130 data = [res] - 131 yield data - 132 self.assertEqual(expected, data[0].replace('\n', '')) -
133 -
134 - def test_xslt_utf8(self): -
135 with self._xslt_setup(encoding='UTF-8') as res: - 136 res[0] = unicode(bytes(res[0]), 'UTF-8') - 137 assert 'UTF-8' in res[0] -
138 -
139 - def test_xslt_encoding(self): -
140 with self._xslt_setup() as res: - 141 res[0] = unicode(bytes(res[0]), 'UTF-16') - 142 assert 'UTF-16' in res[0] -
143 -
144 - def test_xslt_encoding_override(self): -
145 with self._xslt_setup(encoding='UTF-8', expected_encoding='UTF-16') as res: - 146 f = BytesIO() - 147 res[0].write(f, encoding='UTF-16') - 148 if is_python3: - 149 output = str(f.getvalue(), 'UTF-16') - 150 else: - 151 output = unicode(str(f.getvalue()), 'UTF-16') - 152 res[0] = output.replace("'", '"') -
153 -
155 with self._xslt_setup() as res: - 156 f = BytesIO() - 157 res[0].write_output(f) - 158 res[0] = f.getvalue().decode('UTF-16') -
159 -
161 class Writer(object): - 162 def write(self, data): - 163 raise ValueError("FAILED!") -
164 - 165 try: - 166 with self._xslt_setup() as res: - 167 res[0].write_output(Writer()) - 168 except ValueError as exc: - 169 self.assertTrue("FAILED!" in str(exc), exc) - 170 else: - 171 self.assertTrue(False, "exception not raised") - 172 -
173 - def test_xslt_write_output_file(self): -
174 with self._xslt_setup() as res: - 175 f = NamedTemporaryFile(delete=False) - 176 try: - 177 try: - 178 res[0].write_output(f) - 179 finally: - 180 f.close() - 181 with io.open(f.name, encoding='UTF-16') as f: - 182 res[0] = f.read() - 183 finally: - 184 os.unlink(f.name) -
185 -
187 with self._xslt_setup() as res: - 188 f = NamedTemporaryFile(delete=False) - 189 try: - 190 try: - 191 res[0].write_output(f.name, compression=9) - 192 finally: - 193 f.close() - 194 with contextlib.closing(gzip.GzipFile(f.name)) as f: - 195 res[0] = f.read().decode("UTF-16") - 196 finally: - 197 os.unlink(f.name) -
198 -
199 - def test_xslt_unicode(self): -
200 expected = ''' - 201 <?xml version="1.0"?> - 202 <foo>\\uF8D2</foo> - 203 ''' - 204 with self._xslt_setup(expected=expected) as res: - 205 res[0] = unicode(res[0]) -
206 -
208 tree = self.parse(_bytes('<a><b>\\uF8D2</b><c>\\uF8D2</c></a>' - 209 ).decode("unicode_escape")) - 210 style = self.parse('''\ - 211 <xsl:stylesheet version="1.0" - 212 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 213 <xsl:output encoding="UTF-16" standalone="no"/> - 214 <xsl:template match="/"> - 215 <foo><xsl:value-of select="/a/b/text()" /></foo> - 216 </xsl:template> - 217 </xsl:stylesheet>''') - 218 - 219 st = etree.XSLT(style) - 220 res = st(tree) - 221 expected = _bytes('''\ - 222 <?xml version="1.0" standalone="no"?> - 223 <foo>\\uF8D2</foo> - 224 ''').decode("unicode_escape") - 225 self.assertEqual(expected, - 226 unicode(res)) -
227 -
228 - def test_xslt_input(self): -
229 style = self.parse('''\ - 230 <xsl:stylesheet version="1.0" - 231 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 232 <xsl:template match="*" /> - 233 <xsl:template match="/"> - 234 <foo><xsl:value-of select="/a/b/text()" /></foo> - 235 </xsl:template> - 236 </xsl:stylesheet>''') - 237 - 238 st = etree.XSLT(style) - 239 st = etree.XSLT(style.getroot()) -
240 -
241 - def test_xslt_input_partial_doc(self): -
242 style = self.parse('''\ - 243 <otherroot> - 244 <xsl:stylesheet version="1.0" - 245 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 246 <xsl:template match="*" /> - 247 <xsl:template match="/"> - 248 <foo><xsl:value-of select="/a/b/text()" /></foo> - 249 </xsl:template> - 250 </xsl:stylesheet> - 251 </otherroot>''') - 252 - 253 self.assertRaises(etree.XSLTParseError, etree.XSLT, style) - 254 root_node = style.getroot() - 255 self.assertRaises(etree.XSLTParseError, etree.XSLT, root_node) - 256 st = etree.XSLT(root_node[0]) -
257 -
258 - def test_xslt_broken(self): -
259 style = self.parse('''\ - 260 <xsl:stylesheet version="1.0" - 261 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 262 <xsl:foo /> - 263 </xsl:stylesheet>''') - 264 self.assertRaises(etree.XSLTParseError, - 265 etree.XSLT, style) -
266 -
267 - def test_xslt_parsing_error_log(self): -
268 tree = self.parse('<a/>') - 269 style = self.parse('''\ - 270 <xsl:stylesheet version="1.0" - 271 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 272 <xsl:foo /> - 273 </xsl:stylesheet>''') - 274 self.assertRaises(etree.XSLTParseError, - 275 etree.XSLT, style) - 276 exc = None - 277 try: - 278 etree.XSLT(style) - 279 except etree.XSLTParseError as e: - 280 exc = e - 281 else: - 282 self.assertFalse(True, "XSLT processing should have failed but didn't") - 283 self.assertTrue(exc is not None) - 284 self.assertTrue(len(exc.error_log)) - 285 for error in exc.error_log: - 286 self.assertTrue(':ERROR:XSLT:' in str(error)) -
287 -
288 - def test_xslt_apply_error_log(self): -
289 tree = self.parse('<a/>') - 290 style = self.parse('''\ - 291 <xsl:stylesheet version="1.0" - 292 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 293 <xsl:template match="a"> - 294 <xsl:copy> - 295 <xsl:message terminate="yes">FAIL</xsl:message> - 296 </xsl:copy> - 297 </xsl:template> - 298 </xsl:stylesheet>''') - 299 self.assertRaises(etree.XSLTApplyError, - 300 etree.XSLT(style), tree) - 301 - 302 transform = etree.XSLT(style) - 303 exc = None - 304 try: - 305 transform(tree) - 306 except etree.XSLTApplyError as e: - 307 exc = e - 308 else: - 309 self.assertFalse(True, "XSLT processing should have failed but didn't") - 310 - 311 self.assertTrue(exc is not None) - 312 self.assertTrue(len(exc.error_log)) - 313 self.assertEqual(len(transform.error_log), len(exc.error_log)) - 314 for error in exc.error_log: - 315 self.assertTrue(':ERROR:XSLT:' in str(error)) - 316 for error in transform.error_log: - 317 self.assertTrue(':ERROR:XSLT:' in str(error)) -
318 -
319 - def test_xslt_parameters(self): -
320 tree = self.parse('<a><b>B</b><c>C</c></a>') - 321 style = self.parse('''\ - 322 <xsl:stylesheet version="1.0" - 323 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 324 <xsl:template match="/"> - 325 <foo><xsl:value-of select="$bar" /></foo> - 326 </xsl:template> - 327 </xsl:stylesheet>''') - 328 - 329 st = etree.XSLT(style) - 330 res = st(tree, bar="'Bar'") - 331 self.assertEqual('''\ - 332 <?xml version="1.0"?> - 333 <foo>Bar</foo> - 334 ''', - 335 str(res)) -
336 -
337 - def test_xslt_string_parameters(self): -
338 tree = self.parse('<a><b>B</b><c>C</c></a>') - 339 style = self.parse('''\ - 340 <xsl:stylesheet version="1.0" - 341 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 342 <xsl:template match="/"> - 343 <foo><xsl:value-of select="$bar" /></foo> - 344 </xsl:template> - 345 </xsl:stylesheet>''') - 346 - 347 st = etree.XSLT(style) - 348 res = st(tree, bar=etree.XSLT.strparam('''it's me, "Bar"''')) - 349 self.assertEqual('''\ - 350 <?xml version="1.0"?> - 351 <foo>it's me, "Bar"</foo> - 352 ''', - 353 str(res)) -
354 -
355 - def test_xslt_parameter_invalid(self): -
356 tree = self.parse('<a><b>B</b><c>C</c></a>') - 357 style = self.parse('''\ - 358 <xsl:stylesheet version="1.0" - 359 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 360 <xsl:param name="bar"/> - 361 <xsl:template match="/"> - 362 <foo><xsl:value-of select="$bar" /></foo> - 363 </xsl:template> - 364 </xsl:stylesheet>''') - 365 - 366 st = etree.XSLT(style) - 367 res = self.assertRaises(etree.XSLTApplyError, - 368 st, tree, bar="<test/>") - 369 res = self.assertRaises(etree.XSLTApplyError, - 370 st, tree, bar="....") -
371 -
372 - def test_xslt_parameter_missing(self): -
373 # apply() without needed parameter will lead to XSLTApplyError - 374 tree = self.parse('<a><b>B</b><c>C</c></a>') - 375 style = self.parse('''\ - 376 <xsl:stylesheet version="1.0" - 377 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 378 <xsl:template match="/"> - 379 <foo><xsl:value-of select="$bar" /></foo> - 380 </xsl:template> - 381 </xsl:stylesheet>''') - 382 - 383 st = etree.XSLT(style) - 384 # at least libxslt 1.1.28 produces this error, earlier ones (e.g. 1.1.18) might not ... - 385 self.assertRaises(etree.XSLTApplyError, st.apply, tree) -
386 -
388 tree = self.parse('<a><b>B</b><c>C</c></a>') - 389 style = self.parse('''\ - 390 <xsl:stylesheet version="1.0" - 391 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 392 <xsl:template match="*" /> - 393 <xsl:template match="/"> - 394 <foo><xsl:value-of select="$bar" /></foo> - 395 <foo><xsl:value-of select="$baz" /></foo> - 396 </xsl:template> - 397 </xsl:stylesheet>''') - 398 - 399 st = etree.XSLT(style) - 400 res = st(tree, bar="'Bar'", baz="'Baz'") - 401 self.assertEqual('''\ - 402 <?xml version="1.0"?> - 403 <foo>Bar</foo><foo>Baz</foo> - 404 ''', - 405 str(res)) -
406 -
407 - def test_xslt_parameter_xpath(self): -
408 tree = self.parse('<a><b>B</b><c>C</c></a>') - 409 style = self.parse('''\ - 410 <xsl:stylesheet version="1.0" - 411 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 412 <xsl:template match="*" /> - 413 <xsl:template match="/"> - 414 <foo><xsl:value-of select="$bar" /></foo> - 415 </xsl:template> - 416 </xsl:stylesheet>''') - 417 - 418 st = etree.XSLT(style) - 419 res = st(tree, bar="/a/b/text()") - 420 self.assertEqual('''\ - 421 <?xml version="1.0"?> - 422 <foo>B</foo> - 423 ''', - 424 str(res)) -
425 -
427 tree = self.parse('<a><b>B</b><c>C</c></a>') - 428 style = self.parse('''\ - 429 <xsl:stylesheet version="1.0" - 430 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 431 <xsl:template match="*" /> - 432 <xsl:template match="/"> - 433 <foo><xsl:value-of select="$bar" /></foo> - 434 </xsl:template> - 435 </xsl:stylesheet>''') - 436 - 437 st = etree.XSLT(style) - 438 res = st(tree, bar=etree.XPath("/a/b/text()")) - 439 self.assertEqual('''\ - 440 <?xml version="1.0"?> - 441 <foo>B</foo> - 442 ''', - 443 str(res)) -
444 -
446 tree = self.parse('<a><b>B</b><c>C</c></a>') - 447 style = self.parse('''\ - 448 <xsl:stylesheet version="1.0" - 449 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 450 <xsl:param name="bar" select="'Default'" /> - 451 <xsl:template match="*" /> - 452 <xsl:template match="/"> - 453 <foo><xsl:value-of select="$bar" /></foo> - 454 </xsl:template> - 455 </xsl:stylesheet>''') - 456 - 457 st = etree.XSLT(style) - 458 res = st(tree, bar="'Bar'") - 459 self.assertEqual('''\ - 460 <?xml version="1.0"?> - 461 <foo>Bar</foo> - 462 ''', - 463 str(res)) - 464 res = st(tree) - 465 self.assertEqual('''\ - 466 <?xml version="1.0"?> - 467 <foo>Default</foo> - 468 ''', - 469 str(res)) -
470 -
471 - def test_xslt_html_output(self): -
472 tree = self.parse('<a><b>B</b><c>C</c></a>') - 473 style = self.parse('''\ - 474 <xsl:stylesheet version="1.0" - 475 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 476 <xsl:output method="html"/> - 477 <xsl:strip-space elements="*"/> - 478 <xsl:template match="/"> - 479 <html><body><xsl:value-of select="/a/b/text()" /></body></html> - 480 </xsl:template> - 481 </xsl:stylesheet>''') - 482 - 483 st = etree.XSLT(style) - 484 res = st(tree) - 485 self.assertEqual('<html><body>B</body></html>', - 486 str(res).strip()) -
487 -
488 - def test_xslt_include(self): -
489 tree = etree.parse(fileInTestDir('test1.xslt')) - 490 st = etree.XSLT(tree) -
491 -
493 f = open(fileInTestDir('test1.xslt'), 'rb') - 494 tree = etree.parse(f) - 495 f.close() - 496 st = etree.XSLT(tree) -
497 -
499 xml = '<a/>' - 500 xslt = '''\ - 501 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> - 502 <xsl:template match="/"> - 503 <response>Some text</response> - 504 </xsl:template> - 505 </xsl:stylesheet> - 506 ''' - 507 source = self.parse(xml) - 508 styledoc = self.parse(xslt) - 509 style = etree.XSLT(styledoc) - 510 result = style(source) - 511 - 512 etree.tostring(result.getroot()) - 513 - 514 source = self.parse(xml) - 515 styledoc = self.parse(xslt) - 516 style = etree.XSLT(styledoc) - 517 result = style(source) - 518 - 519 etree.tostring(result.getroot()) -
520 -
521 - def test_xslt_repeat_transform(self): -
522 xml = '<a/>' - 523 xslt = '''\ - 524 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> - 525 <xsl:template match="/"> - 526 <response>Some text</response> - 527 </xsl:template> - 528 </xsl:stylesheet> - 529 ''' - 530 source = self.parse(xml) - 531 styledoc = self.parse(xslt) - 532 transform = etree.XSLT(styledoc) - 533 result = transform(source) - 534 result = transform(source) - 535 etree.tostring(result.getroot()) - 536 result = transform(source) - 537 etree.tostring(result.getroot()) - 538 str(result) - 539 - 540 result1 = transform(source) - 541 result2 = transform(source) - 542 self.assertEqual(str(result1), str(result2)) - 543 result = transform(source) - 544 str(result) -
545 -
546 - def test_xslt_empty(self): -
547 # could segfault if result contains "empty document" - 548 xml = '<blah/>' - 549 xslt = ''' - 550 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> - 551 <xsl:template match="/" /> - 552 </xsl:stylesheet> - 553 ''' - 554 - 555 source = self.parse(xml) - 556 styledoc = self.parse(xslt) - 557 style = etree.XSLT(styledoc) - 558 result = style(source) - 559 self.assertEqual('', str(result)) -
560 -
561 - def test_xslt_message(self): -
562 xml = '<blah/>' - 563 xslt = ''' - 564 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> - 565 <xsl:template match="/"> - 566 <xsl:message>TEST TEST TEST</xsl:message> - 567 </xsl:template> - 568 </xsl:stylesheet> - 569 ''' - 570 - 571 source = self.parse(xml) - 572 styledoc = self.parse(xslt) - 573 style = etree.XSLT(styledoc) - 574 result = style(source) - 575 self.assertEqual('', str(result)) - 576 self.assertTrue("TEST TEST TEST" in [entry.message - 577 for entry in style.error_log]) -
578 -
579 - def test_xslt_message_terminate(self): -
580 xml = '<blah/>' - 581 xslt = ''' - 582 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> - 583 <xsl:template match="/"> - 584 <xsl:message terminate="yes">TEST TEST TEST</xsl:message> - 585 </xsl:template> - 586 </xsl:stylesheet> - 587 ''' - 588 - 589 source = self.parse(xml) - 590 styledoc = self.parse(xslt) - 591 style = etree.XSLT(styledoc) - 592 - 593 self.assertRaises(etree.XSLTApplyError, style, source) - 594 self.assertTrue("TEST TEST TEST" in [entry.message - 595 for entry in style.error_log]) -
596 -
597 - def test_xslt_shortcut(self): -
598 tree = self.parse('<a><b>B</b><c>C</c></a>') - 599 style = self.parse('''\ - 600 <xsl:stylesheet version="1.0" - 601 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 602 <xsl:template match="*" /> - 603 <xsl:template match="/"> - 604 <doc> - 605 <foo><xsl:value-of select="$bar" /></foo> - 606 <foo><xsl:value-of select="$baz" /></foo> - 607 </doc> - 608 </xsl:template> - 609 </xsl:stylesheet>''') - 610 - 611 result = tree.xslt(style, bar="'Bar'", baz="'Baz'") - 612 self.assertEqual( - 613 _bytes('<doc><foo>Bar</foo><foo>Baz</foo></doc>'), - 614 etree.tostring(result.getroot())) -
615 -
616 - def test_multiple_elementrees(self): -
617 tree = self.parse('<a><b>B</b><c>C</c></a>') - 618 style = self.parse('''\ - 619 <xsl:stylesheet version="1.0" - 620 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 621 <xsl:template match="a"><A><xsl:apply-templates/></A></xsl:template> - 622 <xsl:template match="b"><B><xsl:apply-templates/></B></xsl:template> - 623 <xsl:template match="c"><C><xsl:apply-templates/></C></xsl:template> - 624 </xsl:stylesheet>''') - 625 - 626 self.assertEqual(self._rootstring(tree), - 627 _bytes('<a><b>B</b><c>C</c></a>')) - 628 result = tree.xslt(style) - 629 self.assertEqual(self._rootstring(tree), - 630 _bytes('<a><b>B</b><c>C</c></a>')) - 631 self.assertEqual(self._rootstring(result), - 632 _bytes('<A><B>B</B><C>C</C></A>')) - 633 - 634 b_tree = etree.ElementTree(tree.getroot()[0]) - 635 self.assertEqual(self._rootstring(b_tree), - 636 _bytes('<b>B</b>')) - 637 result = b_tree.xslt(style) - 638 self.assertEqual(self._rootstring(tree), - 639 _bytes('<a><b>B</b><c>C</c></a>')) - 640 self.assertEqual(self._rootstring(result), - 641 _bytes('<B>B</B>')) - 642 - 643 c_tree = etree.ElementTree(tree.getroot()[1]) - 644 self.assertEqual(self._rootstring(c_tree), - 645 _bytes('<c>C</c>')) - 646 result = c_tree.xslt(style) - 647 self.assertEqual(self._rootstring(tree), - 648 _bytes('<a><b>B</b><c>C</c></a>')) - 649 self.assertEqual(self._rootstring(result), - 650 _bytes('<C>C</C>')) -
651 -
652 - def test_xslt_document_XML(self): -
653 # make sure document('') works from parsed strings - 654 xslt = etree.XSLT(etree.XML("""\ - 655 <xsl:stylesheet version="1.0" - 656 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 657 <xsl:template match="/"> - 658 <test>TEXT<xsl:copy-of select="document('')//test"/></test> - 659 </xsl:template> - 660 </xsl:stylesheet> - 661 """)) - 662 result = xslt(etree.XML('<a/>')) - 663 root = result.getroot() - 664 self.assertEqual(root.tag, - 665 'test') - 666 self.assertEqual(root[0].tag, - 667 'test') - 668 self.assertEqual(root[0].text, - 669 'TEXT') - 670 self.assertEqual(root[0][0].tag, - 671 '{http://www.w3.org/1999/XSL/Transform}copy-of') -
672 -
673 - def test_xslt_document_parse(self): -
674 # make sure document('') works from loaded files - 675 xslt = etree.XSLT(etree.parse(fileInTestDir("test-document.xslt"))) - 676 result = xslt(etree.XML('<a/>')) - 677 root = result.getroot() - 678 self.assertEqual(root.tag, - 679 'test') - 680 self.assertEqual(root[0].tag, - 681 '{http://www.w3.org/1999/XSL/Transform}stylesheet') -
682 -
684 # make sure document('') works from loaded files - 685 xslt = etree.XSLT(etree.ElementTree(file=fileInTestDir("test-document.xslt"))) - 686 result = xslt(etree.XML('<a/>')) - 687 root = result.getroot() - 688 self.assertEqual(root.tag, - 689 'test') - 690 self.assertEqual(root[0].tag, - 691 '{http://www.w3.org/1999/XSL/Transform}stylesheet') -
692 -
693 - def test_xslt_document_error(self): -
694 xslt = etree.XSLT(etree.XML("""\ - 695 <xsl:stylesheet version="1.0" - 696 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 697 <xsl:template match="/"> - 698 <test>TEXT<xsl:copy-of select="document('uri:__junkfood__is__evil__')//test"/></test> - 699 </xsl:template> - 700 </xsl:stylesheet> - 701 """)) - 702 - 703 errors = None - 704 try: - 705 xslt(etree.XML('<a/>')) - 706 except etree.XSLTApplyError as exc: - 707 errors = exc.error_log - 708 else: - 709 self.assertFalse(True, "XSLT processing should have failed but didn't") - 710 - 711 self.assertTrue(len(errors)) - 712 for error in errors: - 713 if ':ERROR:XSLT:' in str(error): - 714 break - 715 else: - 716 self.assertFalse(True, 'No XSLT errors found in error log:\n%s' % errors) -
717 -
719 # make sure document('') works when custom resolvers are in use - 720 assertEqual = self.assertEqual - 721 called = {'count' : 0} - 722 class TestResolver(etree.Resolver): - 723 def resolve(self, url, id, context): - 724 assertEqual(url, 'file://ANYTHING') - 725 called['count'] += 1 - 726 return self.resolve_string('<CALLED/>', context) -
727 - 728 parser = etree.XMLParser() - 729 parser.resolvers.add(TestResolver()) - 730 - 731 xslt = etree.XSLT(etree.XML(_bytes("""\ - 732 <xsl:stylesheet version="1.0" - 733 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - 734 xmlns:l="local"> - 735 <xsl:template match="/"> - 736 <test> - 737 <xsl:for-each select="document('')//l:data/l:entry"> - 738 <xsl:copy-of select="document('file://ANYTHING')"/> - 739 <xsl:copy> - 740 <xsl:attribute name="value"> - 741 <xsl:value-of select="."/> - 742 </xsl:attribute> - 743 </xsl:copy> - 744 </xsl:for-each> - 745 </test> - 746 </xsl:template> - 747 <l:data> - 748 <l:entry>A</l:entry> - 749 <l:entry>B</l:entry> - 750 </l:data> - 751 </xsl:stylesheet> - 752 """), parser)) - 753 - 754 self.assertEqual(called['count'], 0) - 755 result = xslt(etree.XML('<a/>')) - 756 self.assertEqual(called['count'], 1) - 757 - 758 root = result.getroot() - 759 self.assertEqual(root.tag, - 760 'test') - 761 self.assertEqual(len(root), 4) - 762 - 763 self.assertEqual(root[0].tag, - 764 'CALLED') - 765 self.assertEqual(root[1].tag, - 766 '{local}entry') - 767 self.assertEqual(root[1].text, - 768 None) - 769 self.assertEqual(root[1].get("value"), - 770 'A') - 771 self.assertEqual(root[2].tag, - 772 'CALLED') - 773 self.assertEqual(root[3].tag, - 774 '{local}entry') - 775 self.assertEqual(root[3].text, - 776 None) - 777 self.assertEqual(root[3].get("value"), - 778 'B') - 779 -
781 assertEqual = self.assertEqual - 782 called = {'count' : 0} - 783 expected_url = None - 784 class TestResolver(etree.Resolver): - 785 def resolve(self, url, id, context): - 786 assertEqual(url, expected_url) - 787 called['count'] += 1 - 788 return self.resolve_string('<CALLED/>', context) -
789 - 790 stylesheet_xml = _bytes("""\ - 791 <xsl:stylesheet version="1.0" - 792 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - 793 xmlns:l="local"> - 794 <xsl:template match="/"> - 795 <xsl:copy-of select="document('test.xml')"/> - 796 </xsl:template> - 797 </xsl:stylesheet> - 798 """) - 799 - 800 parser = etree.XMLParser() - 801 parser.resolvers.add(TestResolver()) - 802 - 803 # test without base_url => relative path only - 804 expected_url = 'test.xml' - 805 xslt = etree.XSLT(etree.XML(stylesheet_xml, parser)) - 806 - 807 self.assertEqual(called['count'], 0) - 808 result = xslt(etree.XML('<a/>')) - 809 self.assertEqual(called['count'], 1) - 810 - 811 # now the same thing with a stylesheet base URL on the filesystem - 812 called['count'] = 0 - 813 expected_url = 'MY/BASE/test.xml' # seems to be the same on Windows - 814 xslt = etree.XSLT(etree.XML( - 815 stylesheet_xml, parser, - 816 base_url=os.path.join('MY', 'BASE', 'FILE'))) - 817 - 818 self.assertEqual(called['count'], 0) - 819 result = xslt(etree.XML('<a/>')) - 820 self.assertEqual(called['count'], 1) - 821 - 822 # now the same thing with a stylesheet base URL - 823 called['count'] = 0 - 824 expected_url = 'http://server.com/BASE/DIR/test.xml' - 825 xslt = etree.XSLT(etree.XML( - 826 stylesheet_xml, parser, - 827 base_url='http://server.com/BASE/DIR/FILE')) - 828 - 829 self.assertEqual(called['count'], 0) - 830 result = xslt(etree.XML('<a/>')) - 831 self.assertEqual(called['count'], 1) - 832 - 833 # now the same thing with a stylesheet base file:// URL - 834 called['count'] = 0 - 835 expected_url = 'file://BASE/DIR/test.xml' - 836 xslt = etree.XSLT(etree.XML( - 837 stylesheet_xml, parser, - 838 base_url='file://BASE/DIR/FILE')) - 839 - 840 self.assertEqual(called['count'], 0) - 841 result = xslt(etree.XML('<a/>')) - 842 self.assertEqual(called['count'], 1) - 843 -
845 access_control = etree.XSLTAccessControl(read_file=True) - 846 xslt = etree.XSLT(etree.parse(fileInTestDir("test-document.xslt")), - 847 access_control=access_control) - 848 result = xslt(etree.XML('<a/>')) - 849 root = result.getroot() - 850 self.assertEqual(root.tag, - 851 'test') - 852 self.assertEqual(root[0].tag, - 853 '{http://www.w3.org/1999/XSL/Transform}stylesheet') -
854 -
856 access_control = etree.XSLTAccessControl(read_file=False) - 857 xslt = etree.XSLT(etree.parse(fileInTestDir("test-document.xslt")), - 858 access_control=access_control) - 859 self.assertRaises(etree.XSLTApplyError, xslt, etree.XML('<a/>')) -
860 -
862 access_control = etree.XSLTAccessControl.DENY_ALL - 863 xslt = etree.XSLT(etree.parse(fileInTestDir("test-document.xslt")), - 864 access_control=access_control) - 865 self.assertRaises(etree.XSLTApplyError, xslt, etree.XML('<a/>')) -
866 -
868 access_control = etree.XSLTAccessControl.DENY_ALL - 869 self.assertTrue(repr(access_control).startswith(type(access_control).__name__)) - 870 self.assertEqual(repr(access_control), repr(access_control)) - 871 self.assertNotEqual(repr(etree.XSLTAccessControl.DENY_ALL), - 872 repr(etree.XSLTAccessControl.DENY_WRITE)) - 873 self.assertNotEqual(repr(etree.XSLTAccessControl.DENY_ALL), - 874 repr(etree.XSLTAccessControl())) -
875 -
876 - def test_xslt_move_result(self): -
877 root = etree.XML(_bytes('''\ - 878 <transform> - 879 <widget displayType="fieldset"/> - 880 </transform>''')) - 881 - 882 xslt = etree.XSLT(etree.XML(_bytes('''\ - 883 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 884 <xsl:output method="html" indent="no"/> - 885 <xsl:template match="/"> - 886 <html> - 887 <xsl:apply-templates/> - 888 </html> - 889 </xsl:template> - 890 - 891 <xsl:template match="widget"> - 892 <xsl:element name="{@displayType}"/> - 893 </xsl:template> - 894 - 895 </xsl:stylesheet>'''))) - 896 - 897 result = xslt(root[0]) - 898 root[:] = result.getroot()[:] - 899 del root # segfaulted before -
900 -
901 - def test_xslt_pi(self): -
902 tree = self.parse('''\ - 903 <?xml version="1.0"?> - 904 <?xml-stylesheet type="text/xsl" href="%s"?> - 905 <a> - 906 <b>B</b> - 907 <c>C</c> - 908 </a>''' % fileInTestDir("test1.xslt")) - 909 - 910 style_root = tree.getroot().getprevious().parseXSL().getroot() - 911 self.assertEqual("{http://www.w3.org/1999/XSL/Transform}stylesheet", - 912 style_root.tag) -
913 -
914 - def test_xslt_pi_embedded_xmlid(self): -
915 # test xml:id dictionary lookup mechanism - 916 tree = self.parse('''\ - 917 <?xml version="1.0"?> - 918 <?xml-stylesheet type="text/xsl" href="#style"?> - 919 <a> - 920 <b>B</b> - 921 <c>C</c> - 922 <xsl:stylesheet version="1.0" xml:id="style" - 923 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 924 <xsl:template match="*" /> - 925 <xsl:template match="/"> - 926 <foo><xsl:value-of select="/a/b/text()" /></foo> - 927 </xsl:template> - 928 </xsl:stylesheet> - 929 </a>''') - 930 - 931 style_root = tree.getroot().getprevious().parseXSL().getroot() - 932 self.assertEqual("{http://www.w3.org/1999/XSL/Transform}stylesheet", - 933 style_root.tag) - 934 - 935 st = etree.XSLT(style_root) - 936 res = st(tree) - 937 self.assertEqual('''\ - 938 <?xml version="1.0"?> - 939 <foo>B</foo> - 940 ''', - 941 str(res)) -
942 -
943 - def test_xslt_pi_embedded_id(self): -
944 # test XPath lookup mechanism - 945 tree = self.parse('''\ - 946 <?xml version="1.0"?> - 947 <?xml-stylesheet type="text/xsl" href="#style"?> - 948 <a> - 949 <b>B</b> - 950 <c>C</c> - 951 </a>''') - 952 - 953 style = self.parse('''\ - 954 <xsl:stylesheet version="1.0" xml:id="style" - 955 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - 956 <xsl:template match="*" /> - 957 <xsl:template match="/"> - 958 <foo><xsl:value-of select="/a/b/text()" /></foo> - 959 </xsl:template> - 960 </xsl:stylesheet> - 961 ''') - 962 - 963 tree.getroot().append(style.getroot()) - 964 - 965 style_root = tree.getroot().getprevious().parseXSL().getroot() - 966 self.assertEqual("{http://www.w3.org/1999/XSL/Transform}stylesheet", - 967 style_root.tag) - 968 - 969 st = etree.XSLT(style_root) - 970 res = st(tree) - 971 self.assertEqual('''\ - 972 <?xml version="1.0"?> - 973 <foo>B</foo> - 974 ''', - 975 str(res)) -
976 -
977 - def test_xslt_pi_get(self): -
978 tree = self.parse('''\ - 979 <?xml version="1.0"?> - 980 <?xml-stylesheet type="text/xsl" href="TEST"?> - 981 <a> - 982 <b>B</b> - 983 <c>C</c> - 984 </a>''') - 985 - 986 pi = tree.getroot().getprevious() - 987 self.assertEqual("TEST", pi.get("href")) -
988 -
989 - def test_xslt_pi_get_all(self): -
990 tree = self.parse('''\ - 991 <?xml version="1.0"?> - 992 <?xml-stylesheet type="text/xsl" href="TEST"?> - 993 <a> - 994 <b>B</b> - 995 <c>C</c> - 996 </a>''') - 997 - 998 pi = tree.getroot().getprevious() - 999 self.assertEqual("TEST", pi.get("href")) -1000 self.assertEqual("text/xsl", pi.get("type")) -1001 self.assertEqual(None, pi.get("motz")) -
1002 -
1004 tree = self.parse('''\ -1005 <?xml version="1.0"?> -1006 <?xml-stylesheet href="TEST" type="text/xsl"?> -1007 <a> -1008 <b>B</b> -1009 <c>C</c> -1010 </a>''') -1011 -1012 pi = tree.getroot().getprevious() -1013 self.assertEqual("TEST", pi.get("href")) -1014 self.assertEqual("text/xsl", pi.get("type")) -1015 self.assertEqual(None, pi.get("motz")) -
1016 -
1017 - def test_xslt_pi_get_unknown(self): -
1018 tree = self.parse('''\ -1019 <?xml version="1.0"?> -1020 <?xml-stylesheet type="text/xsl" href="TEST"?> -1021 <a> -1022 <b>B</b> -1023 <c>C</c> -1024 </a>''') -1025 -1026 pi = tree.getroot().getprevious() -1027 self.assertEqual(None, pi.get("unknownattribute")) -
1028 -
1029 - def test_xslt_pi_set_replace(self): -
1030 tree = self.parse('''\ -1031 <?xml version="1.0"?> -1032 <?xml-stylesheet type="text/xsl" href="TEST"?> -1033 <a> -1034 <b>B</b> -1035 <c>C</c> -1036 </a>''') -1037 -1038 pi = tree.getroot().getprevious() -1039 self.assertEqual("TEST", pi.get("href")) -1040 -1041 pi.set("href", "TEST123") -1042 self.assertEqual("TEST123", pi.get("href")) -
1043 -
1044 - def test_xslt_pi_set_new(self): -
1045 tree = self.parse('''\ -1046 <?xml version="1.0"?> -1047 <?xml-stylesheet type="text/xsl"?> -1048 <a> -1049 <b>B</b> -1050 <c>C</c> -1051 </a>''') -1052 -1053 pi = tree.getroot().getprevious() -1054 self.assertEqual(None, pi.get("href")) -1055 -1056 pi.set("href", "TEST") -1057 self.assertEqual("TEST", pi.get("href")) -
1058 -
1059 -class ETreeEXSLTTestCase(HelperTestCase): -
1060 """EXSLT tests""" -1061 -
1062 - def test_exslt_str(self): -
1063 tree = self.parse('<a><b>B</b><c>C</c></a>') -1064 style = self.parse('''\ -1065 <xsl:stylesheet version="1.0" -1066 xmlns:str="http://exslt.org/strings" -1067 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -1068 exclude-result-prefixes="str xsl"> -1069 <xsl:template match="text()"> -1070 <xsl:value-of select="str:align(string(.), '***', 'center')" /> -1071 </xsl:template> -1072 <xsl:template match="*"> -1073 <xsl:copy> -1074 <xsl:apply-templates/> -1075 </xsl:copy> -1076 </xsl:template> -1077 </xsl:stylesheet>''') -1078 -1079 st = etree.XSLT(style) -1080 res = st(tree) -1081 self.assertEqual('''\ -1082 <?xml version="1.0"?> -1083 <a><b>*B*</b><c>*C*</c></a> -1084 ''', -1085 str(res)) -
1086 -
1088 tree = self.parse('<a><b>B</b><c>C</c></a>') -1089 style = self.parse('''\ -1090 <xsl:stylesheet version = "1.0" -1091 xmlns:xsl='http://www.w3.org/1999/XSL/Transform' -1092 xmlns:str="http://exslt.org/strings" -1093 extension-element-prefixes="str"> -1094 -1095 <xsl:template match="/"> -1096 <h1 class="{str:replace('abc', 'b', 'x')}">test</h1> -1097 </xsl:template> -1098 -1099 </xsl:stylesheet>''') -1100 -1101 st = etree.XSLT(style) -1102 res = st(tree) -1103 self.assertEqual(str(res), '''\ -1104 <?xml version="1.0"?> -1105 <h1 class="axc">test</h1> -1106 ''') -
1107 -
1108 - def test_exslt_math(self): -
1109 tree = self.parse('<a><b>B</b><c>C</c></a>') -1110 style = self.parse('''\ -1111 <xsl:stylesheet version="1.0" -1112 xmlns:math="http://exslt.org/math" -1113 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -1114 exclude-result-prefixes="math xsl"> -1115 <xsl:template match="*"> -1116 <xsl:copy> -1117 <xsl:attribute name="pi"> -1118 <xsl:value-of select="math:constant('PI', count(*)+2)"/> -1119 </xsl:attribute> -1120 <xsl:apply-templates/> -1121 </xsl:copy> -1122 </xsl:template> -1123 </xsl:stylesheet>''') -1124 -1125 st = etree.XSLT(style) -1126 res = st(tree) -1127 self.assertEqual('''\ -1128 <?xml version="1.0"?> -1129 <a pi="3.14"><b pi="3">B</b><c pi="3">C</c></a> -1130 ''', -1131 str(res)) -
1132 -
1133 - def test_exslt_regexp_test(self): -
1134 xslt = etree.XSLT(etree.XML(_bytes("""\ -1135 <xsl:stylesheet version="1.0" -1136 xmlns:regexp="http://exslt.org/regular-expressions" -1137 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> -1138 <xsl:template match="*"> -1139 <test><xsl:copy-of select="*[regexp:test(string(.), '8.')]"/></test> -1140 </xsl:template> -1141 </xsl:stylesheet> -1142 """))) -1143 result = xslt(etree.XML(_bytes('<a><b>123</b><b>098</b><b>987</b></a>'))) -1144 root = result.getroot() -1145 self.assertEqual(root.tag, -1146 'test') -1147 self.assertEqual(len(root), 1) -1148 self.assertEqual(root[0].tag, -1149 'b') -1150 self.assertEqual(root[0].text, -1151 '987') -
1152 -
1153 - def test_exslt_regexp_replace(self): -
1154 xslt = etree.XSLT(etree.XML("""\ -1155 <xsl:stylesheet version="1.0" -1156 xmlns:regexp="http://exslt.org/regular-expressions" -1157 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> -1158 <xsl:template match="*"> -1159 <test> -1160 <xsl:copy-of select="regexp:replace(string(.), 'd.', '', 'XX')"/> -1161 <xsl:text>-</xsl:text> -1162 <xsl:copy-of select="regexp:replace(string(.), 'd.', 'gi', 'XX')"/> -1163 </test> -1164 </xsl:template> -1165 </xsl:stylesheet> -1166 """)) -1167 result = xslt(etree.XML(_bytes('<a>abdCdEeDed</a>'))) -1168 root = result.getroot() -1169 self.assertEqual(root.tag, -1170 'test') -1171 self.assertEqual(len(root), 0) -1172 self.assertEqual(root.text, 'abXXdEeDed-abXXXXeXXd') -
1173 -
1174 - def test_exslt_regexp_match(self): -
1175 xslt = etree.XSLT(etree.XML("""\ -1176 <xsl:stylesheet version="1.0" -1177 xmlns:regexp="http://exslt.org/regular-expressions" -1178 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> -1179 <xsl:template match="*"> -1180 <test> -1181 <test1><xsl:copy-of select="regexp:match(string(.), 'd.')"/></test1> -1182 <test2><xsl:copy-of select="regexp:match(string(.), 'd.', 'g')"/></test2> -1183 <test2i><xsl:copy-of select="regexp:match(string(.), 'd.', 'gi')"/></test2i> -1184 </test> -1185 </xsl:template> -1186 </xsl:stylesheet> -1187 """)) -1188 result = xslt(etree.XML(_bytes('<a>abdCdEeDed</a>'))) -1189 root = result.getroot() -1190 self.assertEqual(root.tag, 'test') -1191 self.assertEqual(len(root), 3) -1192 -1193 self.assertEqual(len(root[0]), 1) -1194 self.assertEqual(root[0][0].tag, 'match') -1195 self.assertEqual(root[0][0].text, 'dC') -1196 -1197 self.assertEqual(len(root[1]), 2) -1198 self.assertEqual(root[1][0].tag, 'match') -1199 self.assertEqual(root[1][0].text, 'dC') -1200 self.assertEqual(root[1][1].tag, 'match') -1201 self.assertEqual(root[1][1].text, 'dE') -1202 -1203 self.assertEqual(len(root[2]), 3) -1204 self.assertEqual(root[2][0].tag, 'match') -1205 self.assertEqual(root[2][0].text, 'dC') -1206 self.assertEqual(root[2][1].tag, 'match') -1207 self.assertEqual(root[2][1].text, 'dE') -1208 self.assertEqual(root[2][2].tag, 'match') -1209 self.assertEqual(root[2][2].text, 'De') -
1210 -
1212 xslt = etree.XSLT(etree.XML(_bytes("""\ -1213 <xsl:stylesheet version="1.0" -1214 xmlns:regexp="http://exslt.org/regular-expressions" -1215 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> -1216 <xsl:template match="/"> -1217 <test> -1218 <xsl:for-each select="regexp:match( -1219 '123abc567', '([0-9]+)([a-z]+)([0-9]+)' )"> -1220 <test1><xsl:value-of select="."/></test1> -1221 </xsl:for-each> -1222 </test> -1223 </xsl:template> -1224 </xsl:stylesheet> -1225 """))) -1226 result = xslt(etree.XML(_bytes('<a/>'))) -1227 root = result.getroot() -1228 self.assertEqual(root.tag, 'test') -1229 self.assertEqual(len(root), 4) -1230 -1231 self.assertEqual(root[0].text, "123abc567") -1232 self.assertEqual(root[1].text, "123") -1233 self.assertEqual(root[2].text, "abc") -1234 self.assertEqual(root[3].text, "567") -
1235 -
1236 - def test_exslt_regexp_match1(self): -
1237 # taken from http://www.exslt.org/regexp/functions/match/index.html -1238 xslt = etree.XSLT(etree.XML(_bytes("""\ -1239 <xsl:stylesheet version="1.0" -1240 xmlns:regexp="http://exslt.org/regular-expressions" -1241 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> -1242 <xsl:template match="/"> -1243 <test> -1244 <xsl:for-each select="regexp:match( -1245 'http://www.bayes.co.uk/xml/index.xml?/xml/utils/rechecker.xml', -1246 '(\\w+):\\/\\/([^/:]+)(:\\d*)?([^# ]*)')"> -1247 <test1><xsl:value-of select="."/></test1> -1248 </xsl:for-each> -1249 </test> -1250 </xsl:template> -1251 </xsl:stylesheet> -1252 """))) -1253 result = xslt(etree.XML(_bytes('<a/>'))) -1254 root = result.getroot() -1255 self.assertEqual(root.tag, 'test') -1256 self.assertEqual(len(root), 5) -1257 -1258 self.assertEqual( -1259 root[0].text, -1260 "http://www.bayes.co.uk/xml/index.xml?/xml/utils/rechecker.xml") -1261 self.assertEqual( -1262 root[1].text, -1263 "http") -1264 self.assertEqual( -1265 root[2].text, -1266 "www.bayes.co.uk") -1267 self.assertFalse(root[3].text) -1268 self.assertEqual( -1269 root[4].text, -1270 "/xml/index.xml?/xml/utils/rechecker.xml") -
1271 -
1272 - def test_exslt_regexp_match2(self): -
1273 # taken from http://www.exslt.org/regexp/functions/match/index.html -1274 xslt = etree.XSLT(self.parse("""\ -1275 <xsl:stylesheet version="1.0" -1276 xmlns:regexp="http://exslt.org/regular-expressions" -1277 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> -1278 <xsl:template match="/"> -1279 <test> -1280 <xsl:for-each select="regexp:match( -1281 'This is a test string', '(\\w+)', 'g')"> -1282 <test1><xsl:value-of select="."/></test1> -1283 </xsl:for-each> -1284 </test> -1285 </xsl:template> -1286 </xsl:stylesheet> -1287 """)) -1288 result = xslt(etree.XML(_bytes('<a/>'))) -1289 root = result.getroot() -1290 self.assertEqual(root.tag, 'test') -1291 self.assertEqual(len(root), 5) -1292 -1293 self.assertEqual(root[0].text, "This") -1294 self.assertEqual(root[1].text, "is") -1295 self.assertEqual(root[2].text, "a") -1296 self.assertEqual(root[3].text, "test") -1297 self.assertEqual(root[4].text, "string") -
1298 -
1299 - def _test_exslt_regexp_match3(self): -
1300 # taken from http://www.exslt.org/regexp/functions/match/index.html -1301 # THIS IS NOT SUPPORTED! -1302 xslt = etree.XSLT(etree.XML(_bytes("""\ -1303 <xsl:stylesheet version="1.0" -1304 xmlns:regexp="http://exslt.org/regular-expressions" -1305 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> -1306 <xsl:template match="/"> -1307 <test> -1308 <xsl:for-each select="regexp:match( -1309 'This is a test string', '([a-z])+ ', 'g')"> -1310 <test1><xsl:value-of select="."/></test1> -1311 </xsl:for-each> -1312 </test> -1313 </xsl:template> -1314 </xsl:stylesheet> -1315 """))) -1316 result = xslt(etree.XML(_bytes('<a/>'))) -1317 root = result.getroot() -1318 self.assertEqual(root.tag, 'test') -1319 self.assertEqual(len(root), 4) -1320 -1321 self.assertEqual(root[0].text, "his") -1322 self.assertEqual(root[1].text, "is") -1323 self.assertEqual(root[2].text, "a") -1324 self.assertEqual(root[3].text, "test") -
1325 -
1326 - def _test_exslt_regexp_match4(self): -
1327 # taken from http://www.exslt.org/regexp/functions/match/index.html -1328 # THIS IS NOT SUPPORTED! -1329 xslt = etree.XSLT(etree.XML(_bytes("""\ -1330 <xsl:stylesheet version="1.0" -1331 xmlns:regexp="http://exslt.org/regular-expressions" -1332 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> -1333 <xsl:template match="/"> -1334 <test> -1335 <xsl:for-each select="regexp:match( -1336 'This is a test string', '([a-z])+ ', 'gi')"> -1337 <test1><xsl:value-of select="."/></test1> -1338 </xsl:for-each> -1339 </test> -1340 </xsl:template> -1341 </xsl:stylesheet> -1342 """))) -1343 result = xslt(etree.XML(_bytes('<a/>'))) -1344 root = result.getroot() -1345 self.assertEqual(root.tag, 'test') -1346 self.assertEqual(len(root), 4) -1347 -1348 self.assertEqual(root[0].text, "This") -1349 self.assertEqual(root[1].text, "is") -1350 self.assertEqual(root[2].text, "a") -1351 self.assertEqual(root[3].text, "test") -
1352 -
1353 -1354 -class ETreeXSLTExtFuncTestCase(HelperTestCase): -
1355 """Tests for XPath extension functions in XSLT.""" -1356 -
1357 - def test_extensions1(self): -
1358 tree = self.parse('<a><b>B</b></a>') -1359 style = self.parse('''\ -1360 <xsl:stylesheet version="1.0" -1361 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -1362 xmlns:myns="testns" -1363 exclude-result-prefixes="myns"> -1364 <xsl:template match="a"><A><xsl:value-of select="myns:mytext(b)"/></A></xsl:template> -1365 </xsl:stylesheet>''') -1366 -1367 def mytext(ctxt, values): -1368 return 'X' * len(values) -
1369 -1370 result = tree.xslt(style, {('testns', 'mytext') : mytext}) -1371 self.assertEqual(self._rootstring(result), -1372 _bytes('<A>X</A>')) -
1373 -
1374 - def test_extensions2(self): -
1375 tree = self.parse('<a><b>B</b></a>') -1376 style = self.parse('''\ -1377 <xsl:stylesheet version="1.0" -1378 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -1379 xmlns:myns="testns" -1380 exclude-result-prefixes="myns"> -1381 <xsl:template match="a"><A><xsl:value-of select="myns:mytext(b)"/></A></xsl:template> -1382 </xsl:stylesheet>''') -1383 -1384 def mytext(ctxt, values): -1385 return 'X' * len(values) -
1386 -1387 namespace = etree.FunctionNamespace('testns') -1388 namespace['mytext'] = mytext -1389 -1390 result = tree.xslt(style) -1391 self.assertEqual(self._rootstring(result), -1392 _bytes('<A>X</A>')) -1393 -
1395 tree = self.parse('<a><b>B</b><b/></a>') -1396 style = self.parse('''\ -1397 <xsl:stylesheet version="1.0" -1398 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -1399 xmlns:myns="testns" -1400 exclude-result-prefixes="myns"> -1401 <xsl:template match="a"> -1402 <xsl:variable name="content"> -1403 <xsl:apply-templates/> -1404 </xsl:variable> -1405 <A><xsl:value-of select="myns:mytext($content)"/></A> -1406 </xsl:template> -1407 <xsl:template match="b"><xsl:copy>BBB</xsl:copy></xsl:template> -1408 </xsl:stylesheet>''') -1409 -1410 def mytext(ctxt, values): -1411 for value in values: -1412 self.assertTrue(hasattr(value, 'tag'), -1413 "%s is not an Element" % type(value)) -1414 self.assertEqual(value.tag, 'b') -1415 self.assertEqual(value.text, 'BBB') -1416 return 'X'.join([el.tag for el in values]) -
1417 -1418 namespace = etree.FunctionNamespace('testns') -1419 namespace['mytext'] = mytext -1420 -1421 result = tree.xslt(style) -1422 self.assertEqual(self._rootstring(result), -1423 _bytes('<A>bXb</A>')) -1424 -
1425 - def test_xpath_on_context_node(self): -
1426 tree = self.parse('<a><b>B<c/>C</b><b/></a>') -1427 style = self.parse('''\ -1428 <xsl:stylesheet version="1.0" -1429 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -1430 xmlns:myns="testns" -1431 exclude-result-prefixes="myns"> -1432 <xsl:template match="b"> -1433 <A><xsl:value-of select="myns:myext()"/></A> -1434 </xsl:template> -1435 </xsl:stylesheet>''') -1436 -1437 def extfunc(ctxt): -1438 text_content = ctxt.context_node.xpath('text()') -1439 return 'x'.join(text_content) -
1440 -1441 namespace = etree.FunctionNamespace('testns') -1442 namespace['myext'] = extfunc -1443 -1444 result = tree.xslt(style) -1445 self.assertEqual(self._rootstring(result), -1446 _bytes('<A>BxC</A>')) -1447 -
1449 # LP ticket 1354652 -1450 class Resolver(etree.Resolver): -1451 def resolve(self, system_url, public_id, context): -1452 assert system_url == 'extdoc.xml' -1453 return self.resolve_string(b'<a><b>B<c/>C</b><b/></a>', context) -
1454 -1455 parser = etree.XMLParser() -1456 parser.resolvers.add(Resolver()) -1457 -1458 tree = self.parse(b'<a><b/><b/></a>') -1459 transform = etree.XSLT(self.parse(b'''\ -1460 <xsl:stylesheet version="1.0" -1461 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -1462 xmlns:mypre="testns" -1463 exclude-result-prefixes="mypre"> -1464 <xsl:template match="b"> -1465 <B><xsl:value-of select="mypre:myext()"/></B> -1466 </xsl:template> -1467 <xsl:template match="a"> -1468 <A><xsl:apply-templates select="document('extdoc.xml')//b" /></A> -1469 </xsl:template> -1470 </xsl:stylesheet>''', parser=parser)) -1471 -1472 def extfunc(ctxt): -1473 text_content = ctxt.context_node.xpath('text()') -1474 return 'x'.join(text_content) -1475 -1476 namespace = etree.FunctionNamespace('testns') -1477 namespace['myext'] = extfunc -1478 -1479 result = transform(tree) -1480 self.assertEqual(self._rootstring(result), -1481 _bytes('<A><B>BxC</B><B/></A>')) -1482 -
1483 -1484 -class ETreeXSLTExtElementTestCase(HelperTestCase): -
1485 """Tests for extension elements in XSLT.""" -1486 -
1487 - def test_extension_element(self): -
1488 tree = self.parse('<a><b>B</b></a>') -1489 style = self.parse('''\ -1490 <xsl:stylesheet version="1.0" -1491 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -1492 xmlns:myns="testns" -1493 extension-element-prefixes="myns" -1494 exclude-result-prefixes="myns"> -1495 <xsl:template match="a"> -1496 <A><myns:myext>b</myns:myext></A> -1497 </xsl:template> -1498 </xsl:stylesheet>''') -1499 -1500 class MyExt(etree.XSLTExtension): -1501 def execute(self, context, self_node, input_node, output_parent): -1502 child = etree.Element(self_node.text) -1503 child.text = 'X' -1504 output_parent.append(child) -
1505 -1506 extensions = { ('testns', 'myext') : MyExt() } -1507 -1508 result = tree.xslt(style, extensions=extensions) -1509 self.assertEqual(self._rootstring(result), -1510 _bytes('<A><b>X</b></A>')) -1511 -
1513 tree = self.parse('<a><b>B</b></a>') -1514 style = self.parse('''\ -1515 <xsl:stylesheet version="1.0" -1516 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -1517 xmlns:myns="testns" -1518 extension-element-prefixes="myns" -1519 exclude-result-prefixes="myns"> -1520 <xsl:template match="/"> -1521 <A><myns:myext>b</myns:myext></A> -1522 </xsl:template> -1523 </xsl:stylesheet>''') -1524 -1525 tags = [] -1526 -1527 class MyExt(etree.XSLTExtension): -1528 def execute(self, context, self_node, input_node, output_parent): -1529 tags.append(input_node.tag) -
1530 -1531 extensions = { ('testns', 'myext') : MyExt() } -1532 -1533 result = tree.xslt(style, extensions=extensions) -1534 self.assertEqual(tags, ['a']) -1535 -
1537 tree = self.parse('<?test toast?><a><!--a comment--><?another pi?></a>') -1538 style = self.parse('''\ -1539 <xsl:stylesheet version="1.0" -1540 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -1541 xmlns:myns="testns" -1542 extension-element-prefixes="myns" -1543 exclude-result-prefixes="myns"> -1544 <xsl:template match="/"> -1545 <ROOT><xsl:apply-templates /></ROOT> -1546 </xsl:template> -1547 <xsl:template match="comment()"> -1548 <A><myns:myext>b</myns:myext></A> -1549 </xsl:template> -1550 <xsl:template match="processing-instruction()"> -1551 <A><myns:myext>b</myns:myext></A> -1552 </xsl:template> -1553 </xsl:stylesheet>''') -1554 -1555 text = [] -1556 -1557 class MyExt(etree.XSLTExtension): -1558 def execute(self, context, self_node, input_node, output_parent): -1559 text.append(input_node.text) -
1560 -1561 extensions = { ('testns', 'myext') : MyExt() } -1562 -1563 result = tree.xslt(style, extensions=extensions) -1564 self.assertEqual(text, ['toast', 'a comment', 'pi']) -1565 -
1567 # currently not supported -1568 tree = self.parse('<a test="A"><b attr="B"/></a>') -1569 style = self.parse('''\ -1570 <xsl:stylesheet version="1.0" -1571 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -1572 xmlns:myns="testns" -1573 extension-element-prefixes="myns" -1574 exclude-result-prefixes="myns"> -1575 <xsl:template match="@test"> -1576 <A><myns:myext>b</myns:myext></A> -1577 </xsl:template> -1578 <xsl:template match="@attr"> -1579 <A><myns:myext>b</myns:myext></A> -1580 </xsl:template> -1581 </xsl:stylesheet>''') -1582 -1583 text = [] -1584 -1585 class MyExt(etree.XSLTExtension): -1586 def execute(self, context, self_node, attr_value, output_parent): -1587 text.append(attr_value) -
1588 -1589 extensions = { ('testns', 'myext') : MyExt() } -1590 -1591 result = tree.xslt(style, extensions=extensions) -1592 self.assertEqual(text, ['A', 'B']) -1593 -
1595 tree = self.parse('<a><b>B</b></a>') -1596 style = self.parse('''\ -1597 <xsl:stylesheet version="1.0" -1598 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -1599 xmlns:myns="testns" -1600 extension-element-prefixes="myns"> -1601 <xsl:template match="a"> -1602 <A><myns:myext><x>X</x><y>Y</y><z/></myns:myext></A> -1603 </xsl:template> -1604 </xsl:stylesheet>''') -1605 -1606 class MyExt(etree.XSLTExtension): -1607 def execute(self, context, self_node, input_node, output_parent): -1608 output_parent.extend(list(self_node)[1:]) -
1609 -1610 extensions = { ('testns', 'myext') : MyExt() } -1611 -1612 result = tree.xslt(style, extensions=extensions) -1613 self.assertEqual(self._rootstring(result), -1614 _bytes('<A><y>Y</y><z/></A>')) -1615 -
1617 tree = self.parse('<a><b>B</b></a>') -1618 style = self.parse('''\ -1619 <xsl:stylesheet version="1.0" -1620 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -1621 xmlns:myns="testns" -1622 extension-element-prefixes="myns"> -1623 <xsl:template match="a"> -1624 <A><myns:myext><x>X</x><y>Y</y><z/></myns:myext></A> -1625 </xsl:template> -1626 <xsl:template match="x" /> -1627 <xsl:template match="z">XYZ</xsl:template> -1628 </xsl:stylesheet>''') -1629 -1630 class MyExt(etree.XSLTExtension): -1631 def execute(self, context, self_node, input_node, output_parent): -1632 for child in self_node: -1633 for result in self.apply_templates(context, child): -1634 if isinstance(result, basestring): -1635 el = etree.Element("T") -1636 el.text = result -1637 else: -1638 el = result -1639 output_parent.append(el) -
1640 -1641 extensions = { ('testns', 'myext') : MyExt() } -1642 -1643 result = tree.xslt(style, extensions=extensions) -1644 self.assertEqual(self._rootstring(result), -1645 _bytes('<A><T>Y</T><T>XYZ</T></A>')) -1646 -
1648 tree = self.parse('<a><b>B</b></a>') -1649 style = self.parse('''\ -1650 <xsl:stylesheet version="1.0" -1651 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -1652 xmlns:myns="testns" -1653 extension-element-prefixes="myns"> -1654 <xsl:template match="a"> -1655 <A><myns:myext><x>X</x><y>Y</y><z/></myns:myext></A> -1656 </xsl:template> -1657 <xsl:template match="x"><X/></xsl:template> -1658 <xsl:template match="z">XYZ</xsl:template> -1659 </xsl:stylesheet>''') -1660 -1661 class MyExt(etree.XSLTExtension): -1662 def execute(self, context, self_node, input_node, output_parent): -1663 for child in self_node: -1664 for result in self.apply_templates(context, child, -1665 elements_only=True): -1666 assert not isinstance(result, basestring) -1667 output_parent.append(result) -
1668 -1669 extensions = { ('testns', 'myext') : MyExt() } -1670 -1671 result = tree.xslt(style, extensions=extensions) -1672 self.assertEqual(self._rootstring(result), -1673 _bytes('<A><X/></A>')) -1674 -
1676 tree = self.parse('<a><b>B</b></a>') -1677 style = self.parse('''\ -1678 <xsl:stylesheet version="1.0" -1679 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -1680 xmlns:myns="testns" -1681 extension-element-prefixes="myns"> -1682 <xsl:template match="a"> -1683 <A><myns:myext><x>X</x><y>Y</y><z/></myns:myext></A> -1684 </xsl:template> -1685 <xsl:template match="x"><X/></xsl:template> -1686 <xsl:template match="y"><xsl:text> </xsl:text></xsl:template> -1687 <xsl:template match="z">XYZ</xsl:template> -1688 </xsl:stylesheet>''') -1689 -1690 class MyExt(etree.XSLTExtension): -1691 def execute(self, context, self_node, input_node, output_parent): -1692 for child in self_node: -1693 for result in self.apply_templates(context, child, -1694 remove_blank_text=True): -1695 if isinstance(result, basestring): -1696 assert result.strip() -1697 el = etree.Element("T") -1698 el.text = result -1699 else: -1700 el = result -1701 output_parent.append(el) -
1702 -1703 extensions = { ('testns', 'myext') : MyExt() } -1704 -1705 result = tree.xslt(style, extensions=extensions) -1706 self.assertEqual(self._rootstring(result), -1707 _bytes('<A><X/><T>XYZ</T></A>')) -1708 -
1710 tree = self.parse('<a><b>B</b></a>') -1711 style = self.parse('''\ -1712 <xsl:stylesheet version="1.0" -1713 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -1714 xmlns:myns="testns" -1715 extension-element-prefixes="myns"> -1716 <xsl:template match="a"> -1717 <A><myns:myext><x>X</x><y>Y</y><z/></myns:myext></A> -1718 </xsl:template> -1719 <xsl:template match="x" /> -1720 <xsl:template match="z">XYZ</xsl:template> -1721 </xsl:stylesheet>''') -1722 -1723 class MyExt(etree.XSLTExtension): -1724 def execute(self, context, self_node, input_node, output_parent): -1725 for child in self_node: -1726 self.apply_templates(context, child, output_parent) -
1727 -1728 extensions = { ('testns', 'myext') : MyExt() } -1729 -1730 result = tree.xslt(style, extensions=extensions) -1731 self.assertEqual(self._rootstring(result), -1732 _bytes('<A>YXYZ</A>')) -1733 -
1735 tree = self.parse('<a><b>B</b></a>') -1736 style = self.parse('''\ -1737 <xsl:stylesheet version="1.0" -1738 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -1739 xmlns:myns="testns" -1740 extension-element-prefixes="myns"> -1741 <xsl:template match="a"> -1742 <myns:myext><x>X</x><y>Y</y><z/></myns:myext> -1743 </xsl:template> -1744 <xsl:template match="x"><xsl:processing-instruction name="test">TEST</xsl:processing-instruction></xsl:template> -1745 <xsl:template match="y"><Y>XYZ</Y></xsl:template> -1746 <xsl:template match="z"><xsl:comment>TEST</xsl:comment></xsl:template> -1747 </xsl:stylesheet>''') -1748 -1749 class MyExt(etree.XSLTExtension): -1750 def execute(self, context, self_node, input_node, output_parent): -1751 for child in self_node: -1752 self.apply_templates(context, child, output_parent) -
1753 -1754 extensions = { ('testns', 'myext') : MyExt() } -1755 -1756 result = tree.xslt(style, extensions=extensions) -1757 self.assertEqual(etree.tostring(result), -1758 _bytes('<?test TEST?><Y>XYZ</Y><!--TEST-->')) -1759 -
1761 tree = self.parse('<a><b>E</b></a>') -1762 style = self.parse('''\ -1763 <xsl:stylesheet version="1.0" -1764 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -1765 xmlns:myns="testns" -1766 extension-element-prefixes="myns"> -1767 <xsl:template match="a"> -1768 <xsl:variable name="testvar">yo</xsl:variable> -1769 <A> -1770 <myns:myext> -1771 <xsl:attribute name="attr"> -1772 <xsl:value-of select="$testvar" /> -1773 </xsl:attribute> -1774 <B> -1775 <xsl:choose> -1776 <xsl:when test="1 = 2"><C/></xsl:when> -1777 <xsl:otherwise><D><xsl:value-of select="b/text()" /></D></xsl:otherwise> -1778 </xsl:choose> -1779 </B> -1780 </myns:myext> -1781 </A> -1782 </xsl:template> -1783 </xsl:stylesheet>''') -1784 -1785 class MyExt(etree.XSLTExtension): -1786 def execute(self, context, self_node, input_node, output_parent): -1787 el = etree.Element('MY') -1788 self.process_children(context, el) -1789 output_parent.append(el) -
1790 -1791 extensions = { ('testns', 'myext') : MyExt() } -1792 -1793 result = tree.xslt(style, extensions=extensions) -1794 self.assertEqual(self._rootstring(result), -1795 _bytes('<A><MYattr="yo"><B><D>E</D></B></MY></A>')) -1796 -
1798 tree = self.parse('<a/>') -1799 style = self.parse('''\ -1800 <xsl:stylesheet version="1.0" -1801 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -1802 xmlns:myns="testns" -1803 extension-element-prefixes="myns"> -1804 <xsl:template match="a"> -1805 <myns:myext> -1806 <A/> -1807 </myns:myext> -1808 </xsl:template> -1809 </xsl:stylesheet>''') -1810 -1811 class MyExt(etree.XSLTExtension): -1812 def execute(self, context, self_node, input_node, output_parent): -1813 self.process_children(context, output_parent) -
1814 -1815 extensions = { ('testns', 'myext') : MyExt() } -1816 -1817 result = tree.xslt(style, extensions=extensions) -1818 self.assertEqual(self._rootstring(result), -1819 _bytes('<A/>')) -1820 -
1822 tree = self.parse('<a/>') -1823 style = self.parse('''\ -1824 <xsl:stylesheet version="1.0" -1825 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -1826 xmlns:myns="testns" -1827 extension-element-prefixes="myns"> -1828 <xsl:template match="a"> -1829 <myns:myext> -1830 <A/> -1831 </myns:myext> -1832 </xsl:template> -1833 </xsl:stylesheet>''') -1834 -1835 class MyExt(etree.XSLTExtension): -1836 def execute(self, context, self_node, input_node, output_parent): -1837 self.process_children(context, self_node) -
1838 -1839 extensions = { ('testns', 'myext') : MyExt() } -1840 -1841 self.assertRaises(TypeError, tree.xslt, style, extensions=extensions) -1842 -
1844 tree = self.parse('<a/>') -1845 style = self.parse('''\ -1846 <xsl:stylesheet version="1.0" -1847 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -1848 xmlns:myns="testns" -1849 extension-element-prefixes="myns"> -1850 <xsl:template match="a"> -1851 <myns:myext> -1852 <A><myns:myext><B/></myns:myext></A> -1853 </myns:myext> -1854 </xsl:template> -1855 </xsl:stylesheet>''') -1856 -1857 class MyExt(etree.XSLTExtension): -1858 callback_call_counter = 0 -1859 def execute(self, context, self_node, input_node, output_parent): -1860 self.callback_call_counter += 1 -1861 el = etree.Element('MY', n=str(self.callback_call_counter)) -1862 self.process_children(context, el) -1863 output_parent.append(el) -
1864 -1865 extensions = { ('testns', 'myext') : MyExt() } -1866 -1867 result = tree.xslt(style, extensions=extensions) -1868 self.assertEqual(self._rootstring(result), -1869 _bytes('<MYn="1"><A><MYn="2"><B/></MY></A></MY>')) -1870 -
1872 tree = self.parse('<a><b>B</b></a>') -1873 style = self.parse('''\ -1874 <xsl:stylesheet version="1.0" -1875 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -1876 xmlns:myns="testns" -1877 extension-element-prefixes="myns" -1878 exclude-result-prefixes="myns"> -1879 <xsl:template match="a"> -1880 <A><myns:myext>b</myns:myext></A> -1881 </xsl:template> -1882 </xsl:stylesheet>''') -1883 -1884 class MyError(Exception): -1885 pass -
1886 -1887 class MyExt(etree.XSLTExtension): -1888 def execute(self, context, self_node, input_node, output_parent): -1889 raise MyError("expected!") -1890 -1891 extensions = { ('testns', 'myext') : MyExt() } -1892 self.assertRaises(MyError, tree.xslt, style, extensions=extensions) -1893 -1894 # FIXME: DISABLED - implementation seems to be broken -1895 # if someone cares enough about this feature, I take pull requests that fix it. -
1897 tree = self.parse("""\ -1898 <text> -1899 <par>This is <format>arbitrary</format> text in a paragraph</par> -1900 </text>""") -1901 style = self.parse("""\ -1902 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:my="my" extension-element-prefixes="my" version="1.0"> -1903 <xsl:template match="par"> -1904 <my:par><xsl:apply-templates /></my:par> -1905 </xsl:template> -1906 <xsl:template match="format"> -1907 <my:format><xsl:apply-templates /></my:format> -1908 </xsl:template> -1909 </xsl:stylesheet> -1910 """) -1911 test = self -1912 calls = [] -1913 -1914 class ExtMyPar(etree.XSLTExtension): -1915 def execute(self, context, self_node, input_node, output_parent): -1916 calls.append('par') -1917 p = etree.Element("p") -1918 p.attrib["style"] = "color:red" -1919 self.process_children(context, p) -1920 output_parent.append(p) -
1921 -1922 class ExtMyFormat(etree.XSLTExtension): -1923 def execute(self, context, self_node, input_node, output_parent): -1924 calls.append('format') -1925 content = self.process_children(context) -1926 test.assertEqual(1, len(content)) -1927 test.assertEqual('arbitrary', content[0]) -1928 test.assertEqual('This is ', output_parent.text) -1929 output_parent.text += '*-%s-*' % content[0] -1930 -1931 extensions = {("my", "par"): ExtMyPar(), ("my", "format"): ExtMyFormat()} -1932 transform = etree.XSLT(style, extensions=extensions) -1933 result = transform(tree) -1934 self.assertEqual(['par', 'format'], calls) -1935 self.assertEqual( -1936 b'<p style="color:red">This is *-arbitrary-* text in a paragraph</p>\n', -1937 etree.tostring(result)) -1938 -
1939 -1940 -class Py3XSLTTestCase(HelperTestCase): -
1941 """XSLT tests for etree under Python 3""" -1942 -1943 pytestmark = skipif('sys.version_info < (3,0)') -1944 -
1945 - def test_xslt_result_bytes(self): -
1946 tree = self.parse('<a><b>B</b><c>C</c></a>') -1947 style = self.parse('''\ -1948 <xsl:stylesheet version="1.0" -1949 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> -1950 <xsl:template match="*" /> -1951 <xsl:template match="/"> -1952 <foo><xsl:value-of select="/a/b/text()" /></foo> -1953 </xsl:template> -1954 </xsl:stylesheet>''') -1955 -1956 st = etree.XSLT(style) -1957 res = st(tree) -1958 self.assertEqual(_bytes('''\ -1959 <?xml version="1.0"?> -1960 <foo>B</foo> -1961 '''), -1962 bytes(res)) -
1963 -
1964 - def test_xslt_result_bytearray(self): -
1965 tree = self.parse('<a><b>B</b><c>C</c></a>') -1966 style = self.parse('''\ -1967 <xsl:stylesheet version="1.0" -1968 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> -1969 <xsl:template match="*" /> -1970 <xsl:template match="/"> -1971 <foo><xsl:value-of select="/a/b/text()" /></foo> -1972 </xsl:template> -1973 </xsl:stylesheet>''') -1974 -1975 st = etree.XSLT(style) -1976 res = st(tree) -1977 self.assertEqual(_bytes('''\ -1978 <?xml version="1.0"?> -1979 <foo>B</foo> -1980 '''), -1981 bytearray(res)) -
1982 -
1983 - def test_xslt_result_memoryview(self): -
1984 tree = self.parse('<a><b>B</b><c>C</c></a>') -1985 style = self.parse('''\ -1986 <xsl:stylesheet version="1.0" -1987 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> -1988 <xsl:template match="*" /> -1989 <xsl:template match="/"> -1990 <foo><xsl:value-of select="/a/b/text()" /></foo> -1991 </xsl:template> -1992 </xsl:stylesheet>''') -1993 -1994 st = etree.XSLT(style) -1995 res = st(tree) -1996 self.assertEqual(_bytes('''\ -1997 <?xml version="1.0"?> -1998 <foo>B</foo> -1999 '''), -2000 bytes(memoryview(res))) -
2001 -
2002 -2003 -def test_suite(): -
2004 suite = unittest.TestSuite() -2005 suite.addTests([unittest.makeSuite(ETreeXSLTTestCase)]) -2006 suite.addTests([unittest.makeSuite(ETreeEXSLTTestCase)]) -2007 suite.addTests([unittest.makeSuite(ETreeXSLTExtFuncTestCase)]) -2008 suite.addTests([unittest.makeSuite(ETreeXSLTExtElementTestCase)]) -2009 if is_python3: -2010 suite.addTests([unittest.makeSuite(Py3XSLTTestCase)]) -2011 suite.addTests( -2012 [make_doctest('../../../doc/extensions.txt')]) -2013 suite.addTests( -2014 [make_doctest('../../../doc/xpathxslt.txt')]) -2015 return suite -
2016 -2017 if __name__ == '__main__': -2018 print('to test use test.py %s' % __file__) -2019 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_xslt.ETreeEXSLTTestCase-class.html b/doc/html/api/lxml.tests.test_xslt.ETreeEXSLTTestCase-class.html deleted file mode 100644 index 02eaead..0000000 --- a/doc/html/api/lxml.tests.test_xslt.ETreeEXSLTTestCase-class.html +++ /dev/null @@ -1,523 +0,0 @@ - - - - - lxml.tests.test_xslt.ETreeEXSLTTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_xslt :: - Class ETreeEXSLTTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ETreeEXSLTTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ETreeEXSLTTestCase
-
- -
-EXSLT tests - - - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_exslt_str(self) - source code - -
- -
-   - - - - - - -
test_exslt_str_attribute_replace(self) - source code - -
- -
-   - - - - - - -
test_exslt_math(self) - source code - -
- -
-   - - - - - - -
test_exslt_regexp_test(self) - source code - -
- -
-   - - - - - - -
test_exslt_regexp_replace(self) - source code - -
- -
-   - - - - - - -
test_exslt_regexp_match(self) - source code - -
- -
-   - - - - - - -
test_exslt_regexp_match_groups(self) - source code - -
- -
-   - - - - - - -
test_exslt_regexp_match1(self) - source code - -
- -
-   - - - - - - -
test_exslt_regexp_match2(self) - source code - -
- -
-   - - - - - - -
_test_exslt_regexp_match3(self) - source code - -
- -
-   - - - - - - -
_test_exslt_regexp_match4(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_xslt.ETreeXSLTExtElementTestCase-class.html b/doc/html/api/lxml.tests.test_xslt.ETreeXSLTExtElementTestCase-class.html deleted file mode 100644 index ed7c27f..0000000 --- a/doc/html/api/lxml.tests.test_xslt.ETreeXSLTExtElementTestCase-class.html +++ /dev/null @@ -1,603 +0,0 @@ - - - - - lxml.tests.test_xslt.ETreeXSLTExtElementTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_xslt :: - Class ETreeXSLTExtElementTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ETreeXSLTExtElementTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ETreeXSLTExtElementTestCase
-
- -
-Tests for extension elements in XSLT. - - - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_extension_element(self) - source code - -
- -
-   - - - - - - -
test_extension_element_doc_context(self) - source code - -
- -
-   - - - - - - -
test_extension_element_comment_pi_context(self) - source code - -
- -
-   - - - - - - -
_test_extension_element_attribute_context(self) - source code - -
- -
-   - - - - - - -
test_extension_element_content(self) - source code - -
- -
-   - - - - - - -
test_extension_element_apply_templates(self) - source code - -
- -
-   - - - - - - -
test_extension_element_apply_templates_elements_only(self) - source code - -
- -
-   - - - - - - -
test_extension_element_apply_templates_remove_blank_text(self) - source code - -
- -
-   - - - - - - -
test_extension_element_apply_templates_target_node(self) - source code - -
- -
-   - - - - - - -
test_extension_element_apply_templates_target_node_doc(self) - source code - -
- -
-   - - - - - - -
test_extension_element_process_children(self) - source code - -
- -
-   - - - - - - -
test_extension_element_process_children_to_append_only(self) - source code - -
- -
-   - - - - - - -
test_extension_element_process_children_to_read_only_raise(self) - source code - -
- -
-   - - - - - - -
test_extension_element_process_children_with_subextension_element(self) - source code - -
- -
-   - - - - - - -
test_extension_element_raise(self) - source code - -
- -
-   - - - - - - -
_test_multiple_extension_elements_with_output_parent(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_xslt.ETreeXSLTExtFuncTestCase-class.html b/doc/html/api/lxml.tests.test_xslt.ETreeXSLTExtFuncTestCase-class.html deleted file mode 100644 index c226ed2..0000000 --- a/doc/html/api/lxml.tests.test_xslt.ETreeXSLTExtFuncTestCase-class.html +++ /dev/null @@ -1,427 +0,0 @@ - - - - - lxml.tests.test_xslt.ETreeXSLTExtFuncTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_xslt :: - Class ETreeXSLTExtFuncTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ETreeXSLTExtFuncTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ETreeXSLTExtFuncTestCase
-
- -
-Tests for XPath extension functions in XSLT. - - - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_extensions1(self) - source code - -
- -
-   - - - - - - -
test_extensions2(self) - source code - -
- -
-   - - - - - - -
test_variable_result_tree_fragment(self) - source code - -
- -
-   - - - - - - -
test_xpath_on_context_node(self) - source code - -
- -
-   - - - - - - -
test_xpath_on_foreign_context_node(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_xslt.ETreeXSLTTestCase-class.html b/doc/html/api/lxml.tests.test_xslt.ETreeXSLTTestCase-class.html deleted file mode 100644 index 0f151d4..0000000 --- a/doc/html/api/lxml.tests.test_xslt.ETreeXSLTTestCase-class.html +++ /dev/null @@ -1,1319 +0,0 @@ - - - - - lxml.tests.test_xslt.ETreeXSLTTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_xslt :: - Class ETreeXSLTTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ETreeXSLTTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               ETreeXSLTTestCase
-
- -
-XSLT tests etree - - - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_xslt(self) - source code - -
- -
-   - - - - - - -
test_xslt_elementtree_error(self) - source code - -
- -
-   - - - - - - -
test_xslt_input_none(self) - source code - -
- -
-   - - - - - - -
test_xslt_invalid_stylesheet(self) - source code - -
- -
-   - - - - - - -
test_xslt_copy(self) - source code - -
- -
-   - - - - - - -
_xslt_setup(*args, - **kwds) - source code - -
- -
-   - - - - - - -
test_xslt_utf8(self) - source code - -
- -
-   - - - - - - -
test_xslt_encoding(self) - source code - -
- -
-   - - - - - - -
test_xslt_encoding_override(self) - source code - -
- -
-   - - - - - - -
test_xslt_write_output_bytesio(self) - source code - -
- -
-   - - - - - - -
test_xslt_write_output_failure(self) - source code - -
- -
-   - - - - - - -
test_xslt_write_output_file(self) - source code - -
- -
-   - - - - - - -
test_xslt_write_output_file_path(self) - source code - -
- -
-   - - - - - - -
test_xslt_unicode(self) - source code - -
- -
-   - - - - - - -
test_xslt_unicode_standalone(self) - source code - -
- -
-   - - - - - - -
test_xslt_input(self) - source code - -
- -
-   - - - - - - -
test_xslt_input_partial_doc(self) - source code - -
- -
-   - - - - - - -
test_xslt_broken(self) - source code - -
- -
-   - - - - - - -
test_xslt_parsing_error_log(self) - source code - -
- -
-   - - - - - - -
test_xslt_apply_error_log(self) - source code - -
- -
-   - - - - - - -
test_xslt_parameters(self) - source code - -
- -
-   - - - - - - -
test_xslt_string_parameters(self) - source code - -
- -
-   - - - - - - -
test_xslt_parameter_invalid(self) - source code - -
- -
-   - - - - - - -
test_xslt_parameter_missing(self) - source code - -
- -
-   - - - - - - -
test_xslt_multiple_parameters(self) - source code - -
- -
-   - - - - - - -
test_xslt_parameter_xpath(self) - source code - -
- -
-   - - - - - - -
test_xslt_parameter_xpath_object(self) - source code - -
- -
-   - - - - - - -
test_xslt_default_parameters(self) - source code - -
- -
-   - - - - - - -
test_xslt_html_output(self) - source code - -
- -
-   - - - - - - -
test_xslt_include(self) - source code - -
- -
-   - - - - - - -
test_xslt_include_from_filelike(self) - source code - -
- -
-   - - - - - - -
test_xslt_multiple_transforms(self) - source code - -
- -
-   - - - - - - -
test_xslt_repeat_transform(self) - source code - -
- -
-   - - - - - - -
test_xslt_empty(self) - source code - -
- -
-   - - - - - - -
test_xslt_message(self) - source code - -
- -
-   - - - - - - -
test_xslt_message_terminate(self) - source code - -
- -
-   - - - - - - -
test_xslt_shortcut(self) - source code - -
- -
-   - - - - - - -
test_multiple_elementrees(self) - source code - -
- -
-   - - - - - - -
test_xslt_document_XML(self) - source code - -
- -
-   - - - - - - -
test_xslt_document_parse(self) - source code - -
- -
-   - - - - - - -
test_xslt_document_elementtree(self) - source code - -
- -
-   - - - - - - -
test_xslt_document_error(self) - source code - -
- -
-   - - - - - - -
test_xslt_document_XML_resolver(self) - source code - -
- -
-   - - - - - - -
test_xslt_resolver_url_building(self) - source code - -
- -
-   - - - - - - -
test_xslt_document_parse_allow(self) - source code - -
- -
-   - - - - - - -
test_xslt_document_parse_deny(self) - source code - -
- -
-   - - - - - - -
test_xslt_document_parse_deny_all(self) - source code - -
- -
-   - - - - - - -
test_xslt_access_control_repr(self) - source code - -
- -
-   - - - - - - -
test_xslt_move_result(self) - source code - -
- -
-   - - - - - - -
test_xslt_pi(self) - source code - -
- -
-   - - - - - - -
test_xslt_pi_embedded_xmlid(self) - source code - -
- -
-   - - - - - - -
test_xslt_pi_embedded_id(self) - source code - -
- -
-   - - - - - - -
test_xslt_pi_get(self) - source code - -
- -
-   - - - - - - -
test_xslt_pi_get_all(self) - source code - -
- -
-   - - - - - - -
test_xslt_pi_get_all_reversed(self) - source code - -
- -
-   - - - - - - -
test_xslt_pi_get_unknown(self) - source code - -
- -
-   - - - - - - -
test_xslt_pi_set_replace(self) - source code - -
- -
-   - - - - - - -
test_xslt_pi_set_new(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

_xslt_setup(*args, - **kwds) -

-
source code  -
- - -
-
Decorators:
-
    -
  • @contextlib.contextmanager
  • -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.tests.test_xslt.Py3XSLTTestCase-class.html b/doc/html/api/lxml.tests.test_xslt.Py3XSLTTestCase-class.html deleted file mode 100644 index e608762..0000000 --- a/doc/html/api/lxml.tests.test_xslt.Py3XSLTTestCase-class.html +++ /dev/null @@ -1,402 +0,0 @@ - - - - - lxml.tests.test_xslt.Py3XSLTTestCase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Package tests :: - Module test_xslt :: - Class Py3XSLTTestCase - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class Py3XSLTTestCase

source code

-
-               object --+        
-                        |        
-   unittest.case.TestCase --+    
-                            |    
-common_imports.HelperTestCase --+
-                                |
-                               Py3XSLTTestCase
-
- -
-XSLT tests for etree under Python 3 - - - - - - - - - - -
- - - - - -
Nested Classes[hide private]
-
-

Inherited from unittest.case.TestCase: - failureException -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
test_xslt_result_bytes(self) - source code - -
- -
-   - - - - - - -
test_xslt_result_bytearray(self) - source code - -
- -
-   - - - - - - -
test_xslt_result_memoryview(self) - source code - -
- -
-

Inherited from common_imports.HelperTestCase: - parse, - tearDown -

-

Inherited from common_imports.HelperTestCase (private): - _rootstring -

-

Inherited from unittest.case.TestCase: - __call__, - __eq__, - __hash__, - __init__, - __ne__, - __repr__, - __str__, - addCleanup, - addTypeEqualityFunc, - assertAlmostEqual, - assertAlmostEquals, - assertDictContainsSubset, - assertDictEqual, - assertEqual, - assertEquals, - assertFalse, - assertGreater, - assertGreaterEqual, - assertIn, - assertIs, - assertIsInstance, - assertIsNone, - assertIsNot, - assertIsNotNone, - assertItemsEqual, - assertLess, - assertLessEqual, - assertListEqual, - assertMultiLineEqual, - assertNotAlmostEqual, - assertNotAlmostEquals, - assertNotEqual, - assertNotEquals, - assertNotIn, - assertNotIsInstance, - assertNotRegexpMatches, - assertRaises, - assertRaisesRegexp, - assertRegexpMatches, - assertSequenceEqual, - assertSetEqual, - assertTrue, - assertTupleEqual, - assert_, - countTestCases, - debug, - defaultTestResult, - doCleanups, - fail, - failIf, - failIfAlmostEqual, - failIfEqual, - failUnless, - failUnlessAlmostEqual, - failUnlessEqual, - failUnlessRaises, - id, - run, - setUp, - shortDescription, - skipTest -

-

Inherited from unittest.case.TestCase (private): - _addSkip, - _baseAssertEqual, - _deprecate, - _formatMessage, - _getAssertEqualityFunc, - _truncateMessage -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Methods[hide private]
-
-

Inherited from unittest.case.TestCase: - setUpClass, - tearDownClass -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - pytestmark = <lxml.tests.common_imports.skipif object> -
-

Inherited from unittest.case.TestCase: - longMessage, - maxDiff -

-

Inherited from unittest.case.TestCase (private): - _classSetupFailed, - _diffThreshold -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.usedoctest-module.html b/doc/html/api/lxml.usedoctest-module.html deleted file mode 100644 index fd70dd7..0000000 --- a/doc/html/api/lxml.usedoctest-module.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - lxml.usedoctest - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module usedoctest - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module usedoctest

source code

-

Doctest module for XML comparison.

-

Usage:

-
->>> import lxml.usedoctest
->>> # now do your XML doctests ...
-
-

See lxml.doctestcompare

- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/lxml.usedoctest-pysrc.html b/doc/html/api/lxml.usedoctest-pysrc.html deleted file mode 100644 index abf1b76..0000000 --- a/doc/html/api/lxml.usedoctest-pysrc.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - - lxml.usedoctest - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package lxml :: - Module usedoctest - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module lxml.usedoctest

-
- 1  """Doctest module for XML comparison. 
- 2   
- 3  Usage:: 
- 4   
- 5     >>> import lxml.usedoctest 
- 6     >>> # now do your XML doctests ... 
- 7   
- 8  See `lxml.doctestcompare` 
- 9  """ 
-10   
-11  from lxml import doctestcompare 
-12   
-13  doctestcompare.temp_install(del_module=__name__) 
-14   
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/mimetools.Message-class.html b/doc/html/api/mimetools.Message-class.html deleted file mode 100644 index d4cd250..0000000 --- a/doc/html/api/mimetools.Message-class.html +++ /dev/null @@ -1,386 +0,0 @@ - - - - - mimetools.Message - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - mimetools :: - Message :: - Class Message - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class Message

-
-rfc822.Message --+
-                 |
-                Message
-
- -
-A derived class of rfc822.Message that knows about MIME headers and -contains some hooks for decoding encoded and multipart messages. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - fp, - seekable=1)
- Initialize the class instance and read the headers.
- - -
- -
-   - - - - - - -
getencoding(self) - - -
- -
-   - - - - - - -
getmaintype(self) - - -
- -
-   - - - - - - -
getparam(self, - name) - - -
- -
-   - - - - - - -
getparamnames(self) - - -
- -
-   - - - - - - -
getplist(self) - - -
- -
-   - - - - - - -
getsubtype(self) - - -
- -
-   - - - - - - -
gettype(self) - - -
- -
-   - - - - - - -
parseplist(self) - - -
- -
-   - - - - - - -
parsetype(self) - - -
- -
-

Inherited from rfc822.Message: - __contains__, - __delitem__, - __getitem__, - __iter__, - __len__, - __setitem__, - __str__, - get, - getaddr, - getaddrlist, - getallmatchingheaders, - getdate, - getdate_tz, - getfirstmatchingheader, - getheader, - getheaders, - getrawheader, - has_key, - iscomment, - isheader, - islast, - items, - keys, - readheaders, - rewindbody, - setdefault, - values -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - fp, - seekable=1) -
(Constructor) -

-
  -
- - Initialize the class instance and read the headers. -
-
Overrides: - rfc822.Message.__init__ -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/module-tree.html b/doc/html/api/module-tree.html deleted file mode 100644 index d40d6ce..0000000 --- a/doc/html/api/module-tree.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - Module Hierarchy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
- [ Module Hierarchy - | Class Hierarchy ] -

-

Module Hierarchy

- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/redirect.html b/doc/html/api/redirect.html deleted file mode 100644 index 4b62b2c..0000000 --- a/doc/html/api/redirect.html +++ /dev/null @@ -1,38 +0,0 @@ -Epydoc Redirect Page - - - - - - - - -

Epydoc Auto-redirect page

- -

When javascript is enabled, this page will redirect URLs of -the form redirect.html#dotted.name to the -documentation for the object with the given fully-qualified -dotted name.

-

 

- - - - - diff --git a/doc/html/api/str-class.html b/doc/html/api/str-class.html deleted file mode 100644 index 81913e6..0000000 --- a/doc/html/api/str-class.html +++ /dev/null @@ -1,1651 +0,0 @@ - - - - - str - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - str :: - Class str - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class str

-
-object --+    
-         |    
-basestring --+
-             |
-            str
-
- -
Known Subclasses:
-
- -
- -
-

str(object='') -> string

-

Return a nice string representation of the object. -If the argument is a string, the return value is the same object.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__add__(x, - y)
- x+y
- - -
- -
-   - - - - - - -
__contains__(x, - y)
- y in x
- - -
- -
-   - - - - - - -
__eq__(x, - y)
- x==y
- - -
- -
- string - - - - - - -
__format__(S, - format_spec)
- Return a formatted version of S as described by format_spec.
- - -
- -
-   - - - - - - -
__ge__(x, - y)
- x>=y
- - -
- -
-   - - - - - - -
__getattribute__(...)
- x.__getattribute__('name') <==> x.name
- - -
- -
-   - - - - - - -
__getitem__(x, - y)
- x[y]
- - -
- -
-   - - - - - - -
__getnewargs__(...) - - -
- -
-   - - - - - - -
__getslice__(x, - i, - j)
- x[i:j]
- - -
- -
-   - - - - - - -
__gt__(x, - y)
- x>y
- - -
- -
-   - - - - - - -
__hash__(x)
- hash(x)
- - -
- -
-   - - - - - - -
__le__(x, - y)
- x<=y
- - -
- -
-   - - - - - - -
__len__(x)
- len(x)
- - -
- -
-   - - - - - - -
__lt__(x, - y)
- x<y
- - -
- -
-   - - - - - - -
__mod__(x, - y)
- x%y
- - -
- -
-   - - - - - - -
__mul__(x, - n)
- x*n
- - -
- -
-   - - - - - - -
__ne__(x, - y)
- x!=y
- - -
- -
- a new object with type S, a subtype of T - - - - - - -
__new__(T, - S, - ...) - - -
- -
-   - - - - - - -
__repr__(x)
- repr(x)
- - -
- -
-   - - - - - - -
__rmod__(x, - y)
- y%x
- - -
- -
-   - - - - - - -
__rmul__(x, - n)
- n*x
- - -
- -
- size of S in memory, in bytes - - - - - - -
__sizeof__(S)
- size of object in memory, in bytes
- - -
- -
-   - - - - - - -
__str__(x)
- str(x)
- - -
- -
-   - - - - - - -
_formatter_field_name_split(...) - - -
- -
-   - - - - - - -
_formatter_parser(...) - - -
- -
- string - - - - - - -
capitalize(S)
- Return a copy of the string S with only its first character -capitalized.
- - -
- -
- string - - - - - - -
center(S, - width, - fillchar=...)
- Return S centered in a string of length width. Padding is -done using the specified fill character (default is a space)
- - -
- -
- int - - - - - - -
count(S, - sub, - start=..., - end=...)
- Return the number of non-overlapping occurrences of substring sub in -string S[start:end]. Optional arguments start and end are interpreted -as in slice notation.
- - -
- -
- object - - - - - - -
decode(S, - encoding=..., - errors=...)
- Decodes S using the codec registered for encoding. encoding defaults -to the default encoding. errors may be given to set a different error -handling scheme. Default is 'strict' meaning that encoding errors raise -a UnicodeDecodeError. Other possible values are 'ignore' and 'replace' -as well as any other name registered with codecs.register_error that is -able to handle UnicodeDecodeErrors.
- - -
- -
- object - - - - - - -
encode(S, - encoding=..., - errors=...)
- Encodes S using the codec registered for encoding. encoding defaults -to the default encoding. errors may be given to set a different error -handling scheme. Default is 'strict' meaning that encoding errors raise -a UnicodeEncodeError. Other possible values are 'ignore', 'replace' and -'xmlcharrefreplace' as well as any other name registered with -codecs.register_error that is able to handle UnicodeEncodeErrors.
- - -
- -
- bool - - - - - - -
endswith(S, - suffix, - start=..., - end=...)
- Return True if S ends with the specified suffix, False otherwise. -With optional start, test S beginning at that position. -With optional end, stop comparing S at that position. -suffix can also be a tuple of strings to try.
- - -
- -
- string - - - - - - -
expandtabs(S, - tabsize=...)
- Return a copy of S where all tab characters are expanded using spaces. -If tabsize is not given, a tab size of 8 characters is assumed.
- - -
- -
- int - - - - - - -
find(S, - sub, - start=... , - end=...)
- Return the lowest index in S where substring sub is found, -such that sub is contained within S[start:end]. Optional -arguments start and end are interpreted as in slice notation.
- - -
- -
- string - - - - - - -
format(S, - *args, - **kwargs)
- Return a formatted version of S, using substitutions from args and kwargs. -The substitutions are identified by braces ('{' and '}').
- - -
- -
- int - - - - - - -
index(S, - sub, - start=... , - end=...)
- Like S.find() but raise ValueError when the substring is not found.
- - -
- -
- bool - - - - - - -
isalnum(S)
- Return True if all characters in S are alphanumeric -and there is at least one character in S, False otherwise.
- - -
- -
- bool - - - - - - -
isalpha(S)
- Return True if all characters in S are alphabetic -and there is at least one character in S, False otherwise.
- - -
- -
- bool - - - - - - -
isdigit(S)
- Return True if all characters in S are digits -and there is at least one character in S, False otherwise.
- - -
- -
- bool - - - - - - -
islower(S)
- Return True if all cased characters in S are lowercase and there is -at least one cased character in S, False otherwise.
- - -
- -
- bool - - - - - - -
isspace(S)
- Return True if all characters in S are whitespace -and there is at least one character in S, False otherwise.
- - -
- -
- bool - - - - - - -
istitle(S)
- Return True if S is a titlecased string and there is at least one -character in S, i.e. uppercase characters may only follow uncased -characters and lowercase characters only cased ones. Return False -otherwise.
- - -
- -
- bool - - - - - - -
isupper(S)
- Return True if all cased characters in S are uppercase and there is -at least one cased character in S, False otherwise.
- - -
- -
- string - - - - - - -
join(S, - iterable)
- Return a string which is the concatenation of the strings in the -iterable. The separator between elements is S.
- - -
- -
- string - - - - - - -
ljust(S, - width, - fillchar=...)
- Return S left-justified in a string of length width. Padding is -done using the specified fill character (default is a space).
- - -
- -
- string - - - - - - -
lower(S)
- Return a copy of the string S converted to lowercase.
- - -
- -
- string or unicode - - - - - - -
lstrip(S, - chars=...)
- Return a copy of the string S with leading whitespace removed. -If chars is given and not None, remove characters in chars instead. -If chars is unicode, S will be converted to unicode before stripping
- - -
- -
- (head, sep, tail) - - - - - - -
partition(S, - sep)
- Search for the separator sep in S, and return the part before it, -the separator itself, and the part after it. If the separator is not -found, return S and two empty strings.
- - -
- -
- string - - - - - - -
replace(S, - old, - new, - count=...)
- Return a copy of string S with all occurrences of substring -old replaced by new. If the optional argument count is -given, only the first count occurrences are replaced.
- - -
- -
- int - - - - - - -
rfind(S, - sub, - start=... , - end=...)
- Return the highest index in S where substring sub is found, -such that sub is contained within S[start:end]. Optional -arguments start and end are interpreted as in slice notation.
- - -
- -
- int - - - - - - -
rindex(S, - sub, - start=... , - end=...)
- Like S.rfind() but raise ValueError when the substring is not found.
- - -
- -
- string - - - - - - -
rjust(S, - width, - fillchar=...)
- Return S right-justified in a string of length width. Padding is -done using the specified fill character (default is a space)
- - -
- -
- (head, sep, tail) - - - - - - -
rpartition(S, - sep)
- Search for the separator sep in S, starting at the end of S, and return -the part before it, the separator itself, and the part after it. If the -separator is not found, return two empty strings and S.
- - -
- -
- list of strings - - - - - - -
rsplit(S, - sep=... , - maxsplit=...)
- Return a list of the words in the string S, using sep as the -delimiter string, starting at the end of the string and working -to the front. If maxsplit is given, at most maxsplit splits are -done. If sep is not specified or is None, any whitespace string -is a separator.
- - -
- -
- string or unicode - - - - - - -
rstrip(S, - chars=...)
- Return a copy of the string S with trailing whitespace removed. -If chars is given and not None, remove characters in chars instead. -If chars is unicode, S will be converted to unicode before stripping
- - -
- -
- list of strings - - - - - - -
split(S, - sep=... , - maxsplit=...)
- Return a list of the words in the string S, using sep as the -delimiter string. If maxsplit is given, at most maxsplit -splits are done. If sep is not specified or is None, any -whitespace string is a separator and empty strings are removed -from the result.
- - -
- -
- list of strings - - - - - - -
splitlines(S, - keepends=False)
- Return a list of the lines in S, breaking at line boundaries. -Line breaks are not included in the resulting list unless keepends -is given and true.
- - -
- -
- bool - - - - - - -
startswith(S, - prefix, - start=..., - end=...)
- Return True if S starts with the specified prefix, False otherwise. -With optional start, test S beginning at that position. -With optional end, stop comparing S at that position. -prefix can also be a tuple of strings to try.
- - -
- -
- string or unicode - - - - - - -
strip(S, - chars=...)
- Return a copy of the string S with leading and trailing -whitespace removed. -If chars is given and not None, remove characters in chars instead. -If chars is unicode, S will be converted to unicode before stripping
- - -
- -
- string - - - - - - -
swapcase(S)
- Return a copy of the string S with uppercase characters -converted to lowercase and vice versa.
- - -
- -
- string - - - - - - -
title(S)
- Return a titlecased version of S, i.e. words start with uppercase -characters, all remaining cased characters have lowercase.
- - -
- -
- string - - - - - - -
translate(S, - table, - deletechars=...)
- Return a copy of the string S, where all characters occurring -in the optional argument deletechars are removed, and the -remaining characters have been mapped through the given -translation table, which must be a string of length 256 or None. -If the table argument is None, no translation is applied and -the operation simply removes the characters in deletechars.
- - -
- -
- string - - - - - - -
upper(S)
- Return a copy of the string S converted to uppercase.
- - -
- -
- string - - - - - - -
zfill(S, - width)
- Pad a numeric string S with zeros on the left, to fill a field -of the specified width. The string S is never truncated.
- - -
- -
-

Inherited from object: - __delattr__, - __init__, - __reduce__, - __reduce_ex__, - __setattr__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__format__(S, - format_spec) -

-
  -
- - Return a formatted version of S as described by format_spec. -
-
Returns: string
-
Overrides: - object.__format__ -
-
-
-
- -
- -
- - -
-

__getattribute__(...) -

-
  -
- - x.__getattribute__('name') <==> x.name -
-
Overrides: - object.__getattribute__ -
-
-
-
- -
- -
- - -
-

__getslice__(x, - i, - j) -
(Slicling operator) -

-
  -
- -

x[i:j]

-

Use of negative indices is not supported.

-
-
-
-
- -
- -
- - -
-

__hash__(x) -
(Hashing function) -

-
  -
- - hash(x) -
-
Overrides: - object.__hash__ -
-
-
-
- -
- -
- - -
-

__new__(T, - S, - ...) -

-
  -
- - -
-
Returns: a new object with type S, a subtype of T
-
Overrides: - object.__new__ -
-
-
-
- -
- -
- - -
-

__repr__(x) -
(Representation operator) -

-
  -
- - repr(x) -
-
Overrides: - object.__repr__ -
-
-
-
- -
- -
- - -
-

__sizeof__(S) -

-
  -
- - size of object in memory, in bytes -
-
Returns: size of S in memory, in bytes
-
Overrides: - object.__sizeof__ -
-
-
-
- -
- -
- - -
-

__str__(x) -
(Informal representation operator) -

-
  -
- - str(x) -
-
Overrides: - object.__str__ -
-
-
-
- -
- -
- - -
-

find(S, - sub, - start=... , - end=...) -

-
  -
- -

Return the lowest index in S where substring sub is found, -such that sub is contained within S[start:end]. Optional -arguments start and end are interpreted as in slice notation.

-

Return -1 on failure.

-
-
Returns: int
-
-
-
- -
- -
- - -
-

rfind(S, - sub, - start=... , - end=...) -

-
  -
- -

Return the highest index in S where substring sub is found, -such that sub is contained within S[start:end]. Optional -arguments start and end are interpreted as in slice notation.

-

Return -1 on failure.

-
-
Returns: int
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/toc-everything.html b/doc/html/api/toc-everything.html deleted file mode 100644 index 25bddb0..0000000 --- a/doc/html/api/toc-everything.html +++ /dev/null @@ -1,1353 +0,0 @@ - - - - - Everything - - - - - -

Everything

-
-

All Classes

- abc.ABCMeta
cssselect.parser.SelectorError
cssselect.parser.SelectorSyntaxError
cssselect.xpath.ExpressionError
cssselect.xpath.XPathExpr
exceptions.AssertionError
lxml.ElementInclude.FatalIncludeError
lxml.builder.ElementMaker
lxml.cssselect.CSSSelector
- - lxml.doctestcompare.LHTMLOutputChecker
lxml.doctestcompare.LXMLOutputChecker
- - lxml.etree.AttributeBasedElementClassLookup
lxml.etree.C14NError
lxml.etree.CDATA
lxml.etree.CommentBase
lxml.etree.CustomElementClassLookup
lxml.etree.DTD
lxml.etree.DTDError
lxml.etree.DTDParseError
lxml.etree.DTDValidateError
- lxml.etree.DocumentInvalid
lxml.etree.ETCompatXMLParser
lxml.etree.ETXPath
lxml.etree.ElementBase
- lxml.etree.ElementClassLookup
lxml.etree.ElementDefaultClassLookup
- lxml.etree.ElementNamespaceClassLookup
- lxml.etree.EntityBase
lxml.etree.Error
lxml.etree.ErrorDomains
lxml.etree.ErrorLevels
lxml.etree.ErrorTypes
lxml.etree.FallbackElementClassLookup
lxml.etree.HTMLParser
- lxml.etree.LxmlError
lxml.etree.LxmlRegistryError
lxml.etree.LxmlSyntaxError
lxml.etree.NamespaceRegistryError
lxml.etree.PIBase
lxml.etree.ParseError
lxml.etree.ParserBasedElementClassLookup
lxml.etree.ParserError
lxml.etree.PyErrorLog
lxml.etree.PythonElementClassLookup
lxml.etree.QName
lxml.etree.RelaxNG
lxml.etree.RelaxNGError
lxml.etree.RelaxNGErrorTypes
lxml.etree.RelaxNGParseError
lxml.etree.RelaxNGValidateError
lxml.etree.Resolver
lxml.etree.Schematron
lxml.etree.SchematronError
lxml.etree.SchematronParseError
lxml.etree.SchematronValidateError
lxml.etree.SerialisationError
- lxml.etree.TreeBuilder
lxml.etree.XInclude
lxml.etree.XIncludeError
lxml.etree.XMLParser
- lxml.etree.XMLSchema
lxml.etree.XMLSchemaError
lxml.etree.XMLSchemaParseError
lxml.etree.XMLSchemaValidateError
lxml.etree.XMLSyntaxError
lxml.etree.XPath
lxml.etree.XPathDocumentEvaluator
- lxml.etree.XPathError
lxml.etree.XPathEvalError
lxml.etree.XPathFunctionError
lxml.etree.XPathResultError
lxml.etree.XPathSyntaxError
lxml.etree.XSLT
lxml.etree.XSLTAccessControl
lxml.etree.XSLTApplyError
lxml.etree.XSLTError
lxml.etree.XSLTExtension
lxml.etree.XSLTExtensionError
lxml.etree.XSLTParseError
lxml.etree.XSLTSaveError
- - - - - - - - - - - - - - - - - - - - - - - - - - - lxml.etree.iterparse
lxml.etree.iterwalk
- - - - - - - - - - - - - - - - - - - - - - - lxml.html.clean.Cleaner
- - - - - - - lxml.html.formfill.DefaultErrorCreator
lxml.html.formfill.FormNotFound
lxml.html.html5parser.HTMLParser
lxml.html.html5parser.XHTMLParser
- lxml.isoschematron.Schematron
lxml.objectify.BoolElement
lxml.objectify.ElementMaker
lxml.objectify.FloatElement
lxml.objectify.IntElement
lxml.objectify.LongElement
lxml.objectify.NoneElement
lxml.objectify.NumberElement
lxml.objectify.ObjectPath
lxml.objectify.ObjectifiedDataElement
lxml.objectify.ObjectifiedElement
lxml.objectify.ObjectifyElementClassLookup
lxml.objectify.PyType
lxml.objectify.StringElement
lxml.sax.ElementTreeContentHandler
lxml.sax.ElementTreeProducer
lxml.sax.SaxError
lxml.tests.common_imports.HelperTestCase
lxml.tests.common_imports.LargeFileLike
lxml.tests.common_imports.LargeFileLikeUnicode
lxml.tests.common_imports.SillyFileLike
lxml.tests.common_imports.skipif
lxml.tests.dummy_http_server.HTTPRequestCollector
lxml.tests.dummy_http_server.WebServer
- lxml.tests.test_builder.BuilderTestCase
lxml.tests.test_classlookup.ClassLookupTestCase
lxml.tests.test_classlookup.ProxyTestCase
lxml.tests.test_css.CSSTestCase
lxml.tests.test_doctestcompare.DoctestCompareTest
lxml.tests.test_doctestcompare.DummyInput
lxml.tests.test_dtd.ETreeDtdTestCase
lxml.tests.test_elementpath.EtreeElementPathTestCase
lxml.tests.test_elementtree.CElementTreeTestCase
lxml.tests.test_elementtree.ETreePullTestCase
lxml.tests.test_elementtree.ETreeTestCase
lxml.tests.test_elementtree.ElementTreeTestCase
- - lxml.tests.test_errors.ErrorTestCase
lxml.tests.test_etree.ETreeC14NTestCase
lxml.tests.test_etree.ETreeErrorLogTest
lxml.tests.test_etree.ETreeOnlyTestCase
lxml.tests.test_etree.ETreeWriteTestCase
lxml.tests.test_etree.ETreeXIncludeTestCase
lxml.tests.test_etree.ElementIncludeTestCase
lxml.tests.test_etree.XMLPullParserTest
- lxml.tests.test_external_document.ExternalDocumentTestCase
lxml.tests.test_htmlparser.HtmlParserTestCase
lxml.tests.test_http_io.HttpIOTestCase
lxml.tests.test_incremental_xmlfile.AsyncXmlFileTestCase
lxml.tests.test_incremental_xmlfile.BytesIOXmlFileTestCase
lxml.tests.test_incremental_xmlfile.HtmlFileTestCase
lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase
lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase.SimpleFileLike
lxml.tests.test_incremental_xmlfile.TempPathXmlFileTestCase
lxml.tests.test_incremental_xmlfile.TempXmlFileTestCase
- lxml.tests.test_io.ETreeIOTestCase
lxml.tests.test_io.ElementTreeIOTestCase
- lxml.tests.test_isoschematron.ETreeISOSchematronTestCase
lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase
lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.bluff_class
lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.default_class
lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.maeh_class
lxml.tests.test_objectify.ObjectifyTestCase
lxml.tests.test_pyclasslookup.PyClassLookupTestCase
lxml.tests.test_relaxng.ETreeRelaxNGTestCase
lxml.tests.test_relaxng.RelaxNGCompactTestCase
lxml.tests.test_sax.ETreeSaxTestCase
lxml.tests.test_schematron.ETreeSchematronTestCase
lxml.tests.test_threading.ThreadPipelineTestCase
lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker
lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndInjectWorker
lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker
lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker
lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker
lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker
lxml.tests.test_threading.ThreadPipelineTestCase.Validate
lxml.tests.test_threading.ThreadPipelineTestCase.Worker
lxml.tests.test_threading.ThreadingTestCase
lxml.tests.test_unicode.EncodingsTestCase
lxml.tests.test_unicode.UnicodeTestCase
lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase
lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase.simple_resolver
lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase
lxml.tests.test_xpathevaluator.ETreeETXPathClassTestCase
lxml.tests.test_xpathevaluator.ETreeXPathClassTestCase
lxml.tests.test_xpathevaluator.ETreeXPathExsltTestCase
lxml.tests.test_xpathevaluator.ETreeXPathTestCase
lxml.tests.test_xslt.ETreeEXSLTTestCase
lxml.tests.test_xslt.ETreeXSLTExtElementTestCase
lxml.tests.test_xslt.ETreeXSLTExtFuncTestCase
lxml.tests.test_xslt.ETreeXSLTTestCase
lxml.tests.test_xslt.Py3XSLTTestCase
mimetools.Message
str
xml.etree.ElementTree.Element
xml.etree.ElementTree.ElementTree
xml.etree.ElementTree.ParseError
xml.etree.ElementTree.QName
xml.etree.ElementTree.TreeBuilder
xml.etree.ElementTree.XMLParser
xml.etree.ElementTree._IterParseIterator
xml.etree.ElementTree._SimpleElementPath

All Functions

- - - - lxml.ElementInclude.default_loader
lxml.ElementInclude.include
- lxml.builder.__reduce_cython__
lxml.builder.__setstate_cython__
- - - lxml.doctestcompare.install
- - lxml.doctestcompare.temp_install
lxml.etree.Comment
lxml.etree.Element
lxml.etree.ElementTree
lxml.etree.Entity
lxml.etree.Extension
lxml.etree.FunctionNamespace
lxml.etree.HTML
lxml.etree.PI
lxml.etree.SubElement
lxml.etree.XML
lxml.etree.XMLDTDID
lxml.etree.XMLID
lxml.etree.XPathEvaluator
- lxml.etree.cleanup_namespaces
lxml.etree.clear_error_log
lxml.etree.dump
lxml.etree.fromstring
lxml.etree.fromstringlist
lxml.etree.get_default_parser
lxml.etree.iselement
lxml.etree.parse
lxml.etree.parseid
lxml.etree.register_namespace
lxml.etree.set_default_parser
lxml.etree.set_element_class_lookup
lxml.etree.strip_attributes
lxml.etree.strip_elements
lxml.etree.strip_tags
lxml.etree.tostring
lxml.etree.tostringlist
lxml.etree.tounicode
lxml.etree.use_global_python_log
lxml.get_include
lxml.html.ElementSoup.parse
lxml.html.builder.CLASS
lxml.html.builder.FOR
- - - - - - - lxml.html.clean.autolink
lxml.html.clean.autolink_html
lxml.html.clean.clean_html
- lxml.html.clean.word_break
lxml.html.clean.word_break_html
- - - - - - - - - - - - - - - lxml.html.diff.html_annotate
- lxml.html.diff.htmldiff
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - lxml.html.formfill.fill_form
lxml.html.formfill.fill_form_html
lxml.html.formfill.insert_errors
lxml.html.formfill.insert_errors_html
- - lxml.html.html5parser.document_fromstring
lxml.html.html5parser.fragment_fromstring
lxml.html.html5parser.fragments_fromstring
lxml.html.html5parser.fromstring
lxml.html.html5parser.parse
- - - - lxml.html.soupparser.convert_tree
lxml.html.soupparser.fromstring
- lxml.html.soupparser.parse
- - lxml.isoschematron.stylesheet_params
lxml.objectify.DataElement
lxml.objectify.Element
lxml.objectify.XML
- - - - lxml.objectify.annotate
lxml.objectify.deannotate
lxml.objectify.dump
lxml.objectify.enable_recursive_str
lxml.objectify.fromstring
lxml.objectify.getRegisteredTypes
lxml.objectify.makeparser
lxml.objectify.parse
lxml.objectify.pyannotate
lxml.objectify.pytypename
lxml.objectify.set_default_parser
lxml.objectify.set_pytype_attribute_tag
lxml.objectify.xsiannotate
- lxml.sax.saxify
- - - - - - lxml.tests.common_imports.canonicalize
lxml.tests.common_imports.fileInTestDir
lxml.tests.common_imports.fileUrlInTestDir
lxml.tests.common_imports.filter_by_version
lxml.tests.common_imports.make_doctest
lxml.tests.common_imports.make_version_tuple
lxml.tests.common_imports.path2url
lxml.tests.common_imports.readFileInTestDir
lxml.tests.common_imports.read_file
lxml.tests.common_imports.unentitify
lxml.tests.common_imports.write_to_file
lxml.tests.dummy_http_server.build_web_server
lxml.tests.dummy_http_server.webserver
lxml.tests.selftest.bad_find
lxml.tests.selftest.bug_xmltoolkit25
lxml.tests.selftest.bug_xmltoolkit28
lxml.tests.selftest.check_element
lxml.tests.selftest.check_element_tree
lxml.tests.selftest.check_mapping
lxml.tests.selftest.check_string
lxml.tests.selftest.check_string_or_none
lxml.tests.selftest.encoding
lxml.tests.selftest.find
lxml.tests.selftest.fix_compatibility
lxml.tests.selftest.interface
lxml.tests.selftest.iterators
lxml.tests.selftest.iterparse
lxml.tests.selftest.namespace
lxml.tests.selftest.normalize_crlf
lxml.tests.selftest.parsefile
lxml.tests.selftest.parseliteral
lxml.tests.selftest.qname
lxml.tests.selftest.serialize
lxml.tests.selftest.simpleops
lxml.tests.selftest.stdout
lxml.tests.selftest.summarize
lxml.tests.selftest.summarize_list
lxml.tests.selftest.writefile
lxml.tests.selftest.writestring
lxml.tests.selftest.xinclude
lxml.tests.selftest.xinclude_default
lxml.tests.selftest.xinclude_loader
lxml.tests.selftest.xpath_tokenizer
lxml.tests.selftest2.attrib
lxml.tests.selftest2.cdata
lxml.tests.selftest2.check_element
lxml.tests.selftest2.check_element_tree
lxml.tests.selftest2.check_mapping
lxml.tests.selftest2.check_string
lxml.tests.selftest2.copy
lxml.tests.selftest2.element
lxml.tests.selftest2.encoding
lxml.tests.selftest2.find
lxml.tests.selftest2.makeelement
lxml.tests.selftest2.parsefile
lxml.tests.selftest2.qname
lxml.tests.selftest2.serialize
lxml.tests.selftest2.stdout
lxml.tests.selftest2.summarize
lxml.tests.selftest2.summarize_list
lxml.tests.selftest2.unserialize
lxml.tests.selftest2.writefile
lxml.tests.test_builder.test_suite
lxml.tests.test_classlookup.test_suite
lxml.tests.test_css.test_suite
lxml.tests.test_doctestcompare.indent
lxml.tests.test_doctestcompare.test_suite
lxml.tests.test_dtd.test_suite
lxml.tests.test_elementpath.normalize_crlf
lxml.tests.test_elementpath.summarize
lxml.tests.test_elementpath.summarize_list
lxml.tests.test_elementpath.test_suite
lxml.tests.test_elementtree.test_suite
lxml.tests.test_errors.test_suite
lxml.tests.test_etree.test_suite
lxml.tests.test_etree.tmpfile
lxml.tests.test_external_document.test_suite
lxml.tests.test_htmlparser.test_suite
lxml.tests.test_http_io.test_suite
lxml.tests.test_incremental_xmlfile.test_suite
lxml.tests.test_io.test_suite
lxml.tests.test_isoschematron.test_suite
lxml.tests.test_nsclasses.test_suite
lxml.tests.test_objectify.test_suite
lxml.tests.test_pyclasslookup.test_suite
lxml.tests.test_relaxng.test_suite
lxml.tests.test_sax.test_suite
lxml.tests.test_schematron.test_suite
lxml.tests.test_threading.test_suite
lxml.tests.test_unicode.test_suite
lxml.tests.test_xmlschema.test_suite
lxml.tests.test_xpathevaluator.argsTest1
lxml.tests.test_xpathevaluator.argsTest2
lxml.tests.test_xpathevaluator.booleanTest
lxml.tests.test_xpathevaluator.floatTest
lxml.tests.test_xpathevaluator.resultTypesTest
lxml.tests.test_xpathevaluator.resultTypesTest2
lxml.tests.test_xpathevaluator.setTest
lxml.tests.test_xpathevaluator.setTest2
lxml.tests.test_xpathevaluator.stringListTest
lxml.tests.test_xpathevaluator.stringTest
lxml.tests.test_xpathevaluator.tag
lxml.tests.test_xpathevaluator.tag_or_value
lxml.tests.test_xpathevaluator.test_suite
lxml.tests.test_xpathevaluator.xpath
lxml.tests.test_xslt.test_suite

All Variables

- lxml.ElementInclude.XINCLUDE
lxml.ElementInclude.XINCLUDE_FALLBACK
lxml.ElementInclude.XINCLUDE_INCLUDE
lxml.ElementInclude.XINCLUDE_ITER_TAG
lxml.ElementInclude.__package__
lxml.__package__
lxml.builder.E
lxml.builder.__package__
lxml.builder.__pyx_capi__
lxml.builder.__test__
- - lxml.doctestcompare.NOPARSE_MARKUP
lxml.doctestcompare.PARSE_HTML
lxml.doctestcompare.PARSE_XML
- - - - - - lxml.etree.DEBUG
lxml.etree.LIBXML_COMPILED_VERSION
lxml.etree.LIBXML_VERSION
lxml.etree.LIBXSLT_COMPILED_VERSION
lxml.etree.LIBXSLT_VERSION
lxml.etree.LXML_VERSION
- - - - - - - - - - - - - - - - lxml.html.builder.A
lxml.html.builder.ABBR
lxml.html.builder.ACRONYM
lxml.html.builder.ADDRESS
lxml.html.builder.APPLET
lxml.html.builder.AREA
lxml.html.builder.B
lxml.html.builder.BASE
lxml.html.builder.BASEFONT
lxml.html.builder.BDO
lxml.html.builder.BIG
lxml.html.builder.BLOCKQUOTE
lxml.html.builder.BODY
lxml.html.builder.BR
lxml.html.builder.BUTTON
lxml.html.builder.CAPTION
lxml.html.builder.CENTER
lxml.html.builder.CITE
lxml.html.builder.CODE
lxml.html.builder.COL
lxml.html.builder.COLGROUP
lxml.html.builder.DD
lxml.html.builder.DEL
lxml.html.builder.DFN
lxml.html.builder.DIR
lxml.html.builder.DIV
lxml.html.builder.DL
lxml.html.builder.DT
lxml.html.builder.E
lxml.html.builder.EM
lxml.html.builder.FIELDSET
lxml.html.builder.FONT
lxml.html.builder.FORM
lxml.html.builder.FRAME
lxml.html.builder.FRAMESET
lxml.html.builder.H1
lxml.html.builder.H2
lxml.html.builder.H3
lxml.html.builder.H4
lxml.html.builder.H5
lxml.html.builder.H6
lxml.html.builder.HEAD
lxml.html.builder.HR
lxml.html.builder.HTML
lxml.html.builder.I
lxml.html.builder.IFRAME
lxml.html.builder.IMG
lxml.html.builder.INPUT
lxml.html.builder.INS
lxml.html.builder.ISINDEX
lxml.html.builder.KBD
lxml.html.builder.LABEL
lxml.html.builder.LEGEND
lxml.html.builder.LI
lxml.html.builder.LINK
lxml.html.builder.MAP
lxml.html.builder.MENU
lxml.html.builder.META
lxml.html.builder.NOFRAMES
lxml.html.builder.NOSCRIPT
lxml.html.builder.OBJECT
lxml.html.builder.OL
lxml.html.builder.OPTGROUP
lxml.html.builder.OPTION
lxml.html.builder.P
lxml.html.builder.PARAM
lxml.html.builder.PRE
lxml.html.builder.Q
lxml.html.builder.S
lxml.html.builder.SAMP
lxml.html.builder.SCRIPT
lxml.html.builder.SELECT
lxml.html.builder.SMALL
lxml.html.builder.SPAN
lxml.html.builder.STRIKE
lxml.html.builder.STRONG
lxml.html.builder.STYLE
lxml.html.builder.SUB
lxml.html.builder.SUP
lxml.html.builder.TABLE
lxml.html.builder.TBODY
lxml.html.builder.TD
lxml.html.builder.TEXTAREA
lxml.html.builder.TFOOT
lxml.html.builder.TH
lxml.html.builder.THEAD
lxml.html.builder.TITLE
lxml.html.builder.TR
lxml.html.builder.TT
lxml.html.builder.U
lxml.html.builder.UL
lxml.html.builder.VAR
lxml.html.builder.__package__
- - - - - - - - - - - - - - - lxml.html.clean.clean
lxml.html.defs.__package__
lxml.html.defs.block_tags
lxml.html.defs.deprecated_tags
lxml.html.defs.empty_tags
lxml.html.defs.event_attrs
lxml.html.defs.font_style_tags
lxml.html.defs.form_tags
lxml.html.defs.frame_tags
lxml.html.defs.general_block_tags
lxml.html.defs.head_tags
lxml.html.defs.html5_tags
lxml.html.defs.link_attrs
lxml.html.defs.list_tags
lxml.html.defs.nonstandard_tags
lxml.html.defs.phrase_tags
lxml.html.defs.safe_attrs
lxml.html.defs.special_inline_tags
lxml.html.defs.table_tags
lxml.html.defs.tags
lxml.html.defs.top_level_tags
- - - - - - - - - - - lxml.html.find_class
lxml.html.find_rel_links
- - - - - - - lxml.html.html5parser.__package__
lxml.html.html5parser.html_parser
lxml.html.html5parser.xhtml_parser
- lxml.html.iterlinks
lxml.html.make_links_absolute
lxml.html.resolve_base_href
lxml.html.rewrite_links
- - - lxml.includes.__package__
- - - - - - - - lxml.isoschematron.extract_rng
lxml.isoschematron.extract_xsd
lxml.isoschematron.iso_abstract_expand
lxml.isoschematron.iso_dsdl_include
lxml.isoschematron.iso_svrl_for_xslt1
lxml.isoschematron.schematron_schema_valid
lxml.isoschematron.svrl_validation_errors
lxml.objectify.E
lxml.objectify.PYTYPE_ATTRIBUTE
- - lxml.pyclasslookup.__package__
lxml.sax.__package__
lxml.tests.__package__
lxml.tests.common_imports.CET_VERSION
lxml.tests.common_imports.ET_VERSION
lxml.tests.common_imports.IS_PYPY
lxml.tests.common_imports.IS_PYTHON2
lxml.tests.common_imports.IS_PYTHON3
lxml.tests.common_imports.__package__
- lxml.tests.common_imports.doctest_parser
lxml.tests.common_imports.unichr_escape
lxml.tests.dummy_http_server.__package__
lxml.tests.selftest.ENTITY_XML
lxml.tests.selftest.SAMPLE_XML
lxml.tests.selftest.XINCLUDE
lxml.tests.selftest.__package__
lxml.tests.selftest2.ENTITY_XML
lxml.tests.selftest2.SAMPLE_XML
lxml.tests.selftest2.SAMPLE_XML_NS
lxml.tests.selftest2.__package__
lxml.tests.test_builder.__package__
lxml.tests.test_builder.this_dir
lxml.tests.test_classlookup.__package__
lxml.tests.test_classlookup.this_dir
lxml.tests.test_classlookup.xml_str
lxml.tests.test_css.HTML
lxml.tests.test_css.__package__
lxml.tests.test_doctestcompare.__package__
lxml.tests.test_dtd.__package__
lxml.tests.test_dtd.this_dir
lxml.tests.test_elementpath.__package__
lxml.tests.test_elementtree.ElementTreePullTestCase
lxml.tests.test_elementtree.__package__
lxml.tests.test_elementtree.cElementTree
lxml.tests.test_elementtree.this_dir
lxml.tests.test_errors.__package__
lxml.tests.test_errors.this_dir
lxml.tests.test_etree.__package__
lxml.tests.test_external_document.DESTRUCTOR_NAME
lxml.tests.test_external_document.DOC_NAME
lxml.tests.test_external_document.__package__
lxml.tests.test_htmlparser.__package__
lxml.tests.test_htmlparser.this_dir
lxml.tests.test_http_io.__package__
lxml.tests.test_http_io.this_dir
lxml.tests.test_incremental_xmlfile.__package__
lxml.tests.test_incremental_xmlfile.this_dir
lxml.tests.test_io.__package__
lxml.tests.test_io.this_dir
lxml.tests.test_isoschematron.__package__
lxml.tests.test_isoschematron.this_dir
lxml.tests.test_nsclasses.__package__
lxml.tests.test_nsclasses.this_dir
lxml.tests.test_objectify.DEFAULT_NSMAP
lxml.tests.test_objectify.PYTYPE_NAMESPACE
lxml.tests.test_objectify.TREE_PYTYPE
lxml.tests.test_objectify.XML_SCHEMA_INSTANCE_NS
lxml.tests.test_objectify.XML_SCHEMA_INSTANCE_TYPE_ATTR
lxml.tests.test_objectify.XML_SCHEMA_NIL_ATTR
lxml.tests.test_objectify.XML_SCHEMA_NS
lxml.tests.test_objectify.__package__
lxml.tests.test_objectify.objectclass2pytype
lxml.tests.test_objectify.objectclass2xsitype
lxml.tests.test_objectify.pytype2objclass
lxml.tests.test_objectify.this_dir
lxml.tests.test_objectify.v
lxml.tests.test_objectify.xml_str
lxml.tests.test_objectify.xsitype2objclass
lxml.tests.test_pyclasslookup.__package__
lxml.tests.test_pyclasslookup.this_dir
lxml.tests.test_pyclasslookup.xml_str
lxml.tests.test_relaxng.__package__
lxml.tests.test_relaxng.rnc2rng
lxml.tests.test_relaxng.this_dir
lxml.tests.test_sax.__package__
lxml.tests.test_sax.this_dir
lxml.tests.test_schematron.__package__
lxml.tests.test_schematron.this_dir
lxml.tests.test_threading.__package__
lxml.tests.test_threading.this_dir
lxml.tests.test_unicode.__package__
lxml.tests.test_unicode.ascii_uni
lxml.tests.test_unicode.invalid_tag
lxml.tests.test_unicode.klingon
lxml.tests.test_unicode.this_dir
lxml.tests.test_unicode.uni
lxml.tests.test_unicode.uxml
lxml.tests.test_xmlschema.__package__
lxml.tests.test_xmlschema.this_dir
lxml.tests.test_xpathevaluator.SAMPLE_XML
lxml.tests.test_xpathevaluator.__package__
lxml.tests.test_xpathevaluator.extension
lxml.tests.test_xpathevaluator.this_dir
lxml.tests.test_xpathevaluator.uri
lxml.tests.test_xslt.__package__
lxml.tests.test_xslt.is_python3
lxml.tests.test_xslt.this_dir
xml.etree.ElementTree.HTML_EMPTY
xml.etree.ElementTree.VERSION
xml.etree.ElementTree.__package__
xml.etree.ElementTree._namespace_map
xml.etree.ElementTree._sentinel
xml.etree.ElementTree._serialize

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml-module.html b/doc/html/api/toc-lxml-module.html deleted file mode 100644 index 3c34147..0000000 --- a/doc/html/api/toc-lxml-module.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - lxml - - - - - -

Module lxml

-
-

Functions

- get_include

Variables

- __package__

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.ElementInclude-module.html b/doc/html/api/toc-lxml.ElementInclude-module.html deleted file mode 100644 index 726f455..0000000 --- a/doc/html/api/toc-lxml.ElementInclude-module.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - ElementInclude - - - - - -

Module ElementInclude

-
-

Classes

- FatalIncludeError

Functions

- - - - default_loader
include

Variables

- XINCLUDE
XINCLUDE_FALLBACK
XINCLUDE_INCLUDE
XINCLUDE_ITER_TAG
__package__

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.builder-module.html b/doc/html/api/toc-lxml.builder-module.html deleted file mode 100644 index e2b9328..0000000 --- a/doc/html/api/toc-lxml.builder-module.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - builder - - - - - -

Module builder

-
-

Classes

- ElementMaker
basestring
unicode

Functions

- - __reduce_cython__
__setstate_cython__

Variables

- E
__package__
__pyx_capi__
__test__

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.cssselect-module.html b/doc/html/api/toc-lxml.cssselect-module.html deleted file mode 100644 index bbfaec1..0000000 --- a/doc/html/api/toc-lxml.cssselect-module.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - cssselect - - - - - -

Module cssselect

-
-

Classes

- CSSSelector
ExpressionError
- - SelectorError
SelectorSyntaxError

Functions

- -

Variables

- -
- ns
-
-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.doctestcompare-module.html b/doc/html/api/toc-lxml.doctestcompare-module.html deleted file mode 100644 index 79b9a7e..0000000 --- a/doc/html/api/toc-lxml.doctestcompare-module.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - doctestcompare - - - - - -

Module doctestcompare

-
-

Classes

- LHTMLOutputChecker
LXMLOutputChecker
-

Functions

- - - install
-
- strip
- temp_install

Variables

- NOPARSE_MARKUP
PARSE_HTML
PARSE_XML
- - - - - -
-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.etree-module.html b/doc/html/api/toc-lxml.etree-module.html deleted file mode 100644 index b3343dd..0000000 --- a/doc/html/api/toc-lxml.etree-module.html +++ /dev/null @@ -1,269 +0,0 @@ - - - - - etree - - - - - -

Module etree

-
-

Classes

- - AttributeBasedElementClassLookup
C14NError
CDATA
CommentBase
CustomElementClassLookup
DTD
DTDError
DTDParseError
DTDValidateError
- DocumentInvalid
ETCompatXMLParser
ETXPath
ElementBase
- ElementClassLookup
ElementDefaultClassLookup
- ElementNamespaceClassLookup
- EntityBase
Error
ErrorDomains
ErrorLevels
ErrorTypes
FallbackElementClassLookup
HTMLParser
- LxmlError
LxmlRegistryError
LxmlSyntaxError
NamespaceRegistryError
PIBase
ParseError
ParserBasedElementClassLookup
ParserError
PyErrorLog
PythonElementClassLookup
QName
RelaxNG
RelaxNGError
RelaxNGErrorTypes
RelaxNGParseError
RelaxNGValidateError
Resolver
Schematron
SchematronError
SchematronParseError
SchematronValidateError
SerialisationError
- TreeBuilder
XInclude
XIncludeError
XMLParser
- XMLSchema
XMLSchemaError
XMLSchemaParseError
XMLSchemaValidateError
XMLSyntaxError
XMLTreeBuilder
XPath
XPathDocumentEvaluator
- XPathError
XPathEvalError
XPathFunctionError
XPathResultError
XPathSyntaxError
XSLT
XSLTAccessControl
XSLTApplyError
XSLTError
XSLTExtension
XSLTExtensionError
XSLTParseError
XSLTSaveError
- - - - - - - - - - - - - - - - - - - - - - - - - - - iterparse
iterwalk
-

Functions

- Comment
Element
ElementTree
Entity
Extension
FunctionNamespace
HTML
PI
ProcessingInstruction
SubElement
XML
XMLDTDID
XMLID
XPathEvaluator
- cleanup_namespaces
clear_error_log
dump
fromstring
fromstringlist
get_default_parser
iselement
parse
parseid
register_namespace
set_default_parser
set_element_class_lookup
strip_attributes
strip_elements
strip_tags
tostring
tostringlist
tounicode
use_global_python_log

Variables

- DEBUG
LIBXML_COMPILED_VERSION
LIBXML_VERSION
LIBXSLT_COMPILED_VERSION
LIBXSLT_VERSION
LXML_VERSION
- - - -
-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.html-module.html b/doc/html/api/toc-lxml.html-module.html deleted file mode 100644 index a5bfc47..0000000 --- a/doc/html/api/toc-lxml.html-module.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - html - - - - - -

Module html

-
-

Classes

- - - - - - - - - - - - - - - - - - - - - - -

Functions

- Element
- - - - - - - - -
- _nons
- - - - document_fromstring
fragment_fromstring
fragments_fromstring
fromstring
- - open_in_browser
parse
submit_form
tostring
-

Variables

- - - - - - - - - - - find_class
find_rel_links
- iterlinks
make_links_absolute
resolve_base_href
rewrite_links
-
-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.html.ElementSoup-module.html b/doc/html/api/toc-lxml.html.ElementSoup-module.html deleted file mode 100644 index 1a7167a..0000000 --- a/doc/html/api/toc-lxml.html.ElementSoup-module.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - ElementSoup - - - - - -

Module ElementSoup

-
-

Functions

- convert_tree
parse

Variables

- - -
-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.html.builder-module.html b/doc/html/api/toc-lxml.html.builder-module.html deleted file mode 100644 index 05a4e98..0000000 --- a/doc/html/api/toc-lxml.html.builder-module.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - builder - - - - - -

Module builder

-
-

Functions

- CLASS
FOR

Variables

- A
ABBR
ACRONYM
ADDRESS
APPLET
AREA
B
BASE
BASEFONT
BDO
BIG
BLOCKQUOTE
BODY
BR
BUTTON
CAPTION
CENTER
CITE
CODE
COL
COLGROUP
DD
DEL
DFN
DIR
DIV
DL
DT
E
EM
FIELDSET
FONT
FORM
FRAME
FRAMESET
H1
H2
H3
H4
H5
H6
HEAD
HR
HTML
I
IFRAME
IMG
INPUT
INS
ISINDEX
KBD
LABEL
LEGEND
LI
LINK
MAP
MENU
META
NOFRAMES
NOSCRIPT
OBJECT
OL
OPTGROUP
OPTION
P
PARAM
PRE
Q
S
SAMP
SCRIPT
SELECT
SMALL
SPAN
STRIKE
STRONG
STYLE
SUB
SUP
TABLE
TBODY
TD
TEXTAREA
TFOOT
TH
THEAD
TITLE
TR
TT
U
UL
VAR
__package__

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.html.clean-module.html b/doc/html/api/toc-lxml.html.clean-module.html deleted file mode 100644 index 3bcb674..0000000 --- a/doc/html/api/toc-lxml.html.clean-module.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - clean - - - - - -

Module clean

-
-

Classes

- Cleaner
- bytes
- -

Functions

- - - - - - - - autolink
autolink_html
clean_html
- unichr
- word_break
word_break_html

Variables

- - - - - - - - - - - - - - - - clean

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.html.defs-module.html b/doc/html/api/toc-lxml.html.defs-module.html deleted file mode 100644 index 2dfcfc1..0000000 --- a/doc/html/api/toc-lxml.html.defs-module.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - defs - - - - - -

Module defs

-
-

Variables

- __package__
block_tags
deprecated_tags
empty_tags
event_attrs
font_style_tags
form_tags
frame_tags
general_block_tags
head_tags
html5_tags
link_attrs
list_tags
nonstandard_tags
phrase_tags
safe_attrs
special_inline_tags
table_tags
tags
top_level_tags

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.html.diff-module.html b/doc/html/api/toc-lxml.html.diff-module.html deleted file mode 100644 index 71b779e..0000000 --- a/doc/html/api/toc-lxml.html.diff-module.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - diff - - - - - -

Module diff

-
-

Classes

- - - - - - - -
- token
-

Functions

- - - - - - - - - - - - - - - - html_annotate
- htmldiff
- - - - - - - - - - - - - - - - - -

Variables

- - - - - - - - - - - -
-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.html.formfill-module.html b/doc/html/api/toc-lxml.html.formfill-module.html deleted file mode 100644 index 6674849..0000000 --- a/doc/html/api/toc-lxml.html.formfill-module.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - formfill - - - - - -

Module formfill

-
-

Classes

- DefaultErrorCreator
FormNotFound
-

Functions

- -
- _check
- - - - - - - - - - fill_form
fill_form_html
insert_errors
insert_errors_html

Variables

- - - - - -
- _tag
- -
-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.html.html5parser-module.html b/doc/html/api/toc-lxml.html.html5parser-module.html deleted file mode 100644 index 1200a41..0000000 --- a/doc/html/api/toc-lxml.html.html5parser-module.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - html5parser - - - - - -

Module html5parser

-
-

Classes

- HTMLParser
XHTMLParser

Functions

- - - document_fromstring
fragment_fromstring
fragments_fromstring
fromstring
parse

Variables

- __package__
html_parser
xhtml_parser

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.html.soupparser-module.html b/doc/html/api/toc-lxml.html.soupparser-module.html deleted file mode 100644 index fff1b4f..0000000 --- a/doc/html/api/toc-lxml.html.soupparser-module.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - soupparser - - - - - -

Module soupparser

-
-

Classes

- -

Functions

- - -
- _parse
- - convert_tree
fromstring
- parse
-
- unichr
-

Variables

- - -
-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.html.usedoctest-module.html b/doc/html/api/toc-lxml.html.usedoctest-module.html deleted file mode 100644 index ee5971f..0000000 --- a/doc/html/api/toc-lxml.html.usedoctest-module.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - usedoctest - - - - - -

Module usedoctest

-
-
-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.includes-module.html b/doc/html/api/toc-lxml.includes-module.html deleted file mode 100644 index 1bed2a8..0000000 --- a/doc/html/api/toc-lxml.includes-module.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - includes - - - - - -

Module includes

-
-

Variables

- __package__

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.isoschematron-module.html b/doc/html/api/toc-lxml.isoschematron-module.html deleted file mode 100644 index b9828e4..0000000 --- a/doc/html/api/toc-lxml.isoschematron-module.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - isoschematron - - - - - -

Module isoschematron

-
-

Classes

- Schematron
- -

Functions

- - stylesheet_params

Variables

- - - - - - - - - extract_rng
extract_xsd
iso_abstract_expand
iso_dsdl_include
iso_svrl_for_xslt1
schematron_schema_valid
svrl_validation_errors

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.objectify-module.html b/doc/html/api/toc-lxml.objectify-module.html deleted file mode 100644 index 66c92d5..0000000 --- a/doc/html/api/toc-lxml.objectify-module.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - objectify - - - - - -

Module objectify

-
-

Classes

- BoolElement
ElementMaker
FloatElement
IntElement
LongElement
NoneElement
NumberElement
ObjectPath
ObjectifiedDataElement
ObjectifiedElement
ObjectifyElementClassLookup
PyType
StringElement

Functions

- DataElement
Element
SubElement
XML
- - - - annotate
deannotate
dump
enable_recursive_str
fromstring
getRegisteredTypes
makeparser
parse
pyannotate
pytypename
set_default_parser
set_pytype_attribute_tag
xsiannotate

Variables

- E
PYTYPE_ATTRIBUTE
- -
-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.pyclasslookup-module.html b/doc/html/api/toc-lxml.pyclasslookup-module.html deleted file mode 100644 index fbbebb2..0000000 --- a/doc/html/api/toc-lxml.pyclasslookup-module.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - pyclasslookup - - - - - -

Module pyclasslookup

-
-

Variables

- __package__

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.sax-module.html b/doc/html/api/toc-lxml.sax-module.html deleted file mode 100644 index 07b37a6..0000000 --- a/doc/html/api/toc-lxml.sax-module.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - sax - - - - - -

Module sax

-
-

Classes

- ElementTreeContentHandler
ElementTreeProducer
SaxError

Functions

- - saxify

Variables

- __package__

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests-module.html b/doc/html/api/toc-lxml.tests-module.html deleted file mode 100644 index d21a924..0000000 --- a/doc/html/api/toc-lxml.tests-module.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - tests - - - - - -

Module tests

-
-

Variables

- __package__

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.common_imports-module.html b/doc/html/api/toc-lxml.tests.common_imports-module.html deleted file mode 100644 index 545bf4a..0000000 --- a/doc/html/api/toc-lxml.tests.common_imports-module.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - common_imports - - - - - -

Module common_imports

-
-

Classes

- HelperTestCase
LargeFileLike
LargeFileLikeUnicode
SillyFileLike
skipif

Functions

-
- _bytes
- - - - -
- _str
- canonicalize
fileInTestDir
fileUrlInTestDir
filter_by_version
make_doctest
make_version_tuple
path2url
readFileInTestDir
read_file
unentitify
write_to_file

Variables

- CET_VERSION
ET_VERSION
IS_PYPY
IS_PYTHON2
IS_PYTHON3
__package__
- doctest_parser
unichr_escape

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.dummy_http_server-module.html b/doc/html/api/toc-lxml.tests.dummy_http_server-module.html deleted file mode 100644 index 2fdeef0..0000000 --- a/doc/html/api/toc-lxml.tests.dummy_http_server-module.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - dummy_http_server - - - - - -

Module dummy_http_server

-
-

Classes

- HTTPRequestCollector
WebServer
-

Functions

- build_web_server
webserver

Variables

- __package__

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.selftest-module.html b/doc/html/api/toc-lxml.tests.selftest-module.html deleted file mode 100644 index b0bdf61..0000000 --- a/doc/html/api/toc-lxml.tests.selftest-module.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - selftest - - - - - -

Module selftest

-
-

Functions

- bad_find
bug_xmltoolkit25
bug_xmltoolkit28
check_element
check_element_tree
check_mapping
check_string
check_string_or_none
encoding
find
fix_compatibility
interface
iterators
iterparse
namespace
normalize_crlf
parsefile
parseliteral
qname
serialize
simpleops
stdout
summarize
summarize_list
writefile
writestring
xinclude
xinclude_default
xinclude_loader
xpath_tokenizer

Variables

- ENTITY_XML
SAMPLE_XML
XINCLUDE
__package__

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.selftest2-module.html b/doc/html/api/toc-lxml.tests.selftest2-module.html deleted file mode 100644 index 69adb51..0000000 --- a/doc/html/api/toc-lxml.tests.selftest2-module.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - selftest2 - - - - - -

Module selftest2

-
-

Functions

- attrib
cdata
check_element
check_element_tree
check_mapping
check_string
copy
element
encoding
find
makeelement
parsefile
qname
serialize
stdout
summarize
summarize_list
unserialize
writefile

Variables

- ENTITY_XML
SAMPLE_XML
SAMPLE_XML_NS
__package__

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.test_builder-module.html b/doc/html/api/toc-lxml.tests.test_builder-module.html deleted file mode 100644 index c2f5a10..0000000 --- a/doc/html/api/toc-lxml.tests.test_builder-module.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - test_builder - - - - - -

Module test_builder

-
-

Classes

- BuilderTestCase

Functions

- test_suite

Variables

- __package__
this_dir

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.test_classlookup-module.html b/doc/html/api/toc-lxml.tests.test_classlookup-module.html deleted file mode 100644 index db47ad0..0000000 --- a/doc/html/api/toc-lxml.tests.test_classlookup-module.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - test_classlookup - - - - - -

Module test_classlookup

-
-

Classes

- ClassLookupTestCase
ProxyTestCase

Functions

- test_suite

Variables

- __package__
this_dir
xml_str

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.test_css-module.html b/doc/html/api/toc-lxml.tests.test_css-module.html deleted file mode 100644 index 05606f2..0000000 --- a/doc/html/api/toc-lxml.tests.test_css-module.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - test_css - - - - - -

Module test_css

-
-

Classes

- CSSTestCase

Functions

- test_suite

Variables

- HTML
__package__

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.test_doctestcompare-module.html b/doc/html/api/toc-lxml.tests.test_doctestcompare-module.html deleted file mode 100644 index d74b9ef..0000000 --- a/doc/html/api/toc-lxml.tests.test_doctestcompare-module.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - test_doctestcompare - - - - - -

Module test_doctestcompare

-
-

Classes

- DoctestCompareTest
DummyInput

Functions

- indent
test_suite

Variables

- __package__

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.test_dtd-module.html b/doc/html/api/toc-lxml.tests.test_dtd-module.html deleted file mode 100644 index e7a946f..0000000 --- a/doc/html/api/toc-lxml.tests.test_dtd-module.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - test_dtd - - - - - -

Module test_dtd

-
-

Classes

- ETreeDtdTestCase

Functions

- test_suite

Variables

- __package__
this_dir

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.test_elementpath-module.html b/doc/html/api/toc-lxml.tests.test_elementpath-module.html deleted file mode 100644 index ea87fc9..0000000 --- a/doc/html/api/toc-lxml.tests.test_elementpath-module.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - test_elementpath - - - - - -

Module test_elementpath

-
-

Classes

- EtreeElementPathTestCase

Functions

- normalize_crlf
summarize
summarize_list
test_suite

Variables

- __package__

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.test_elementtree-module.html b/doc/html/api/toc-lxml.tests.test_elementtree-module.html deleted file mode 100644 index 9d19dd4..0000000 --- a/doc/html/api/toc-lxml.tests.test_elementtree-module.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - test_elementtree - - - - - -

Module test_elementtree

-
-

Classes

- CElementTreeTestCase
ETreePullTestCase
ETreeTestCase
ElementTreeTestCase
- -

Functions

- test_suite

Variables

- ElementTreePullTestCase
__package__
cElementTree
this_dir

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.test_errors-module.html b/doc/html/api/toc-lxml.tests.test_errors-module.html deleted file mode 100644 index 53d0dfb..0000000 --- a/doc/html/api/toc-lxml.tests.test_errors-module.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - test_errors - - - - - -

Module test_errors

-
-

Classes

- ErrorTestCase

Functions

- test_suite

Variables

- __package__
this_dir

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.test_etree-module.html b/doc/html/api/toc-lxml.tests.test_etree-module.html deleted file mode 100644 index d825ce1..0000000 --- a/doc/html/api/toc-lxml.tests.test_etree-module.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - test_etree - - - - - -

Module test_etree

-
-

Classes

- ETreeC14NTestCase
ETreeErrorLogTest
ETreeOnlyTestCase
ETreeWriteTestCase
ETreeXIncludeTestCase
ElementIncludeTestCase
XMLPullParserTest
-

Functions

- test_suite
tmpfile

Variables

- __package__

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.test_external_document-module.html b/doc/html/api/toc-lxml.tests.test_external_document-module.html deleted file mode 100644 index 8425948..0000000 --- a/doc/html/api/toc-lxml.tests.test_external_document-module.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - test_external_document - - - - - -

Module test_external_document

-
-

Classes

- ExternalDocumentTestCase

Functions

- test_suite

Variables

- DESTRUCTOR_NAME
DOC_NAME
__package__

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.test_htmlparser-module.html b/doc/html/api/toc-lxml.tests.test_htmlparser-module.html deleted file mode 100644 index cd47cb4..0000000 --- a/doc/html/api/toc-lxml.tests.test_htmlparser-module.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - test_htmlparser - - - - - -

Module test_htmlparser

-
-

Classes

- HtmlParserTestCase
unicode

Functions

- test_suite

Variables

- __package__
this_dir

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.test_http_io-module.html b/doc/html/api/toc-lxml.tests.test_http_io-module.html deleted file mode 100644 index 67e9c04..0000000 --- a/doc/html/api/toc-lxml.tests.test_http_io-module.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - test_http_io - - - - - -

Module test_http_io

-
-

Classes

- HttpIOTestCase

Functions

- test_suite

Variables

- __package__
this_dir

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.test_incremental_xmlfile-module.html b/doc/html/api/toc-lxml.tests.test_incremental_xmlfile-module.html deleted file mode 100644 index 8a23b76..0000000 --- a/doc/html/api/toc-lxml.tests.test_incremental_xmlfile-module.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - test_incremental_xmlfile - - - - - -

Module test_incremental_xmlfile

-
-

Classes

- AsyncXmlFileTestCase
BytesIOXmlFileTestCase
HtmlFileTestCase
SimpleFileLikeXmlFileTestCase
TempPathXmlFileTestCase
TempXmlFileTestCase
-

Functions

- test_suite

Variables

- __package__
this_dir

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.test_io-module.html b/doc/html/api/toc-lxml.tests.test_io-module.html deleted file mode 100644 index b700653..0000000 --- a/doc/html/api/toc-lxml.tests.test_io-module.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - test_io - - - - - -

Module test_io

-
-

Classes

- ETreeIOTestCase
ElementTreeIOTestCase
-

Functions

- test_suite

Variables

- __package__
this_dir

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.test_isoschematron-module.html b/doc/html/api/toc-lxml.tests.test_isoschematron-module.html deleted file mode 100644 index b82c7fa..0000000 --- a/doc/html/api/toc-lxml.tests.test_isoschematron-module.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - test_isoschematron - - - - - -

Module test_isoschematron

-
-

Classes

- ETreeISOSchematronTestCase

Functions

- test_suite

Variables

- __package__
this_dir

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.test_nsclasses-module.html b/doc/html/api/toc-lxml.tests.test_nsclasses-module.html deleted file mode 100644 index 733c6e7..0000000 --- a/doc/html/api/toc-lxml.tests.test_nsclasses-module.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - test_nsclasses - - - - - -

Module test_nsclasses

-
-

Classes

- ETreeNamespaceClassesTestCase

Functions

- test_suite

Variables

- __package__
this_dir

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.test_objectify-module.html b/doc/html/api/toc-lxml.tests.test_objectify-module.html deleted file mode 100644 index 014216c..0000000 --- a/doc/html/api/toc-lxml.tests.test_objectify-module.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - test_objectify - - - - - -

Module test_objectify

-
-

Classes

- ObjectifyTestCase

Functions

- test_suite

Variables

- DEFAULT_NSMAP
PYTYPE_NAMESPACE
TREE_PYTYPE
XML_SCHEMA_INSTANCE_NS
XML_SCHEMA_INSTANCE_TYPE_ATTR
XML_SCHEMA_NIL_ATTR
XML_SCHEMA_NS
__package__
objectclass2pytype
objectclass2xsitype
pytype2objclass
this_dir
v
xml_str
xsitype2objclass

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.test_pyclasslookup-module.html b/doc/html/api/toc-lxml.tests.test_pyclasslookup-module.html deleted file mode 100644 index 9841ca0..0000000 --- a/doc/html/api/toc-lxml.tests.test_pyclasslookup-module.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - test_pyclasslookup - - - - - -

Module test_pyclasslookup

-
-

Classes

- PyClassLookupTestCase

Functions

- test_suite

Variables

- __package__
this_dir
xml_str

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.test_relaxng-module.html b/doc/html/api/toc-lxml.tests.test_relaxng-module.html deleted file mode 100644 index 39b755e..0000000 --- a/doc/html/api/toc-lxml.tests.test_relaxng-module.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - test_relaxng - - - - - -

Module test_relaxng

-
-

Classes

- ETreeRelaxNGTestCase
RelaxNGCompactTestCase

Functions

- test_suite

Variables

- __package__
rnc2rng
this_dir

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.test_sax-module.html b/doc/html/api/toc-lxml.tests.test_sax-module.html deleted file mode 100644 index 8e79611..0000000 --- a/doc/html/api/toc-lxml.tests.test_sax-module.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - test_sax - - - - - -

Module test_sax

-
-

Classes

- ETreeSaxTestCase

Functions

- test_suite

Variables

- __package__
this_dir

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.test_schematron-module.html b/doc/html/api/toc-lxml.tests.test_schematron-module.html deleted file mode 100644 index a51a892..0000000 --- a/doc/html/api/toc-lxml.tests.test_schematron-module.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - test_schematron - - - - - -

Module test_schematron

-
-

Classes

- ETreeSchematronTestCase

Functions

- test_suite

Variables

- __package__
this_dir

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.test_threading-module.html b/doc/html/api/toc-lxml.tests.test_threading-module.html deleted file mode 100644 index 710e1c7..0000000 --- a/doc/html/api/toc-lxml.tests.test_threading-module.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - test_threading - - - - - -

Module test_threading

-
-

Classes

- ThreadPipelineTestCase
ThreadingTestCase

Functions

- test_suite

Variables

- __package__
this_dir

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.test_unicode-module.html b/doc/html/api/toc-lxml.tests.test_unicode-module.html deleted file mode 100644 index e38efa8..0000000 --- a/doc/html/api/toc-lxml.tests.test_unicode-module.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - test_unicode - - - - - -

Module test_unicode

-
-

Classes

- EncodingsTestCase
UnicodeTestCase
unicode

Functions

- test_suite

Variables

- __package__
ascii_uni
invalid_tag
klingon
this_dir
uni
uxml

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.test_xmlschema-module.html b/doc/html/api/toc-lxml.tests.test_xmlschema-module.html deleted file mode 100644 index cdc9c51..0000000 --- a/doc/html/api/toc-lxml.tests.test_xmlschema-module.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - test_xmlschema - - - - - -

Module test_xmlschema

-
-

Classes

- ETreeXMLSchemaResolversTestCase
ETreeXMLSchemaTestCase

Functions

- test_suite

Variables

- __package__
this_dir

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.test_xpathevaluator-module.html b/doc/html/api/toc-lxml.tests.test_xpathevaluator-module.html deleted file mode 100644 index 7753fef..0000000 --- a/doc/html/api/toc-lxml.tests.test_xpathevaluator-module.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - test_xpathevaluator - - - - - -

Module test_xpathevaluator

-
-

Classes

- ETreeETXPathClassTestCase
ETreeXPathClassTestCase
ETreeXPathExsltTestCase
ETreeXPathTestCase

Functions

- argsTest1
argsTest2
booleanTest
floatTest
resultTypesTest
resultTypesTest2
setTest
setTest2
stringListTest
stringTest
tag
tag_or_value
test_suite
xpath

Variables

- SAMPLE_XML
__package__
extension
this_dir
uri

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.tests.test_xslt-module.html b/doc/html/api/toc-lxml.tests.test_xslt-module.html deleted file mode 100644 index 5c40e73..0000000 --- a/doc/html/api/toc-lxml.tests.test_xslt-module.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - test_xslt - - - - - -

Module test_xslt

-
-

Classes

- ETreeEXSLTTestCase
ETreeXSLTExtElementTestCase
ETreeXSLTExtFuncTestCase
ETreeXSLTTestCase
Py3XSLTTestCase
basestring
unicode

Functions

- test_suite

Variables

- __package__
is_python3
this_dir

-[hide private] - - - - diff --git a/doc/html/api/toc-lxml.usedoctest-module.html b/doc/html/api/toc-lxml.usedoctest-module.html deleted file mode 100644 index ee5971f..0000000 --- a/doc/html/api/toc-lxml.usedoctest-module.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - usedoctest - - - - - -

Module usedoctest

-
-
-[hide private] - - - - diff --git a/doc/html/api/toc-xml.etree.ElementTree-module.html b/doc/html/api/toc-xml.etree.ElementTree-module.html deleted file mode 100644 index 47225ce..0000000 --- a/doc/html/api/toc-xml.etree.ElementTree-module.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - - ElementTree - - - - - -

Module ElementTree

-
-

Classes

- Element
ElementTree
ParseError
QName
TreeBuilder
XMLParser
XMLTreeBuilder
_Element
_ElementInterface
_IterParseIterator
_SimpleElementPath

Functions

- Comment
PI
ProcessingInstruction
SubElement
XML
XMLID
_encode
_escape_attrib
_escape_attrib_html
_escape_cdata
_namespaces
_raise_serialization_error
_serialize_html
_serialize_text
_serialize_xml
dump
fromstring
fromstringlist
iselement
iterparse
parse
register_namespace
tostring
tostringlist

Variables

- HTML_EMPTY
VERSION
__package__
_namespace_map
_sentinel
_serialize

-[hide private] - - - - diff --git a/doc/html/api/toc.html b/doc/html/api/toc.html deleted file mode 100644 index abb29a0..0000000 --- a/doc/html/api/toc.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - Table of Contents - - - - - -

Table of Contents

-
- Everything -
-

Modules

- lxml
lxml.ElementInclude
lxml.builder
lxml.cssselect
lxml.doctestcompare
lxml.etree
lxml.html
lxml.html.ElementSoup
lxml.html.builder
lxml.html.clean
lxml.html.defs
lxml.html.diff
lxml.html.formfill
lxml.html.html5parser
lxml.html.soupparser
lxml.html.usedoctest
lxml.includes
lxml.isoschematron
lxml.objectify
lxml.pyclasslookup
lxml.sax
lxml.tests
lxml.tests.common_imports
lxml.tests.dummy_http_server
lxml.tests.selftest
lxml.tests.selftest2
lxml.tests.test_builder
lxml.tests.test_classlookup
lxml.tests.test_css
lxml.tests.test_doctestcompare
lxml.tests.test_dtd
lxml.tests.test_elementpath
lxml.tests.test_elementtree
lxml.tests.test_errors
lxml.tests.test_etree
lxml.tests.test_external_document
lxml.tests.test_htmlparser
lxml.tests.test_http_io
lxml.tests.test_incremental_xmlfile
lxml.tests.test_io
lxml.tests.test_isoschematron
lxml.tests.test_nsclasses
lxml.tests.test_objectify
lxml.tests.test_pyclasslookup
lxml.tests.test_relaxng
lxml.tests.test_sax
lxml.tests.test_schematron
lxml.tests.test_threading
lxml.tests.test_unicode
lxml.tests.test_xmlschema
lxml.tests.test_xpathevaluator
lxml.tests.test_xslt
lxml.usedoctest
xml.etree.ElementTree

- [hide private] - - - - diff --git a/doc/html/api/xml.etree.ElementTree-module.html b/doc/html/api/xml.etree.ElementTree-module.html deleted file mode 100644 index 554b0fb..0000000 --- a/doc/html/api/xml.etree.ElementTree-module.html +++ /dev/null @@ -1,813 +0,0 @@ - - - - - xml.etree.ElementTree - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package xml :: - Package etree :: - Module ElementTree - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module ElementTree

source code

-hash(x) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - Element -
-   - - ElementTree -
-   - - ParseError -
-   - - QName -
-   - - TreeBuilder -
-   - - XMLParser -
-   - - XMLTreeBuilder -
-   - - _Element -
-   - - _ElementInterface -
-   - - _IterParseIterator -
-   - - _SimpleElementPath -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
Comment(text=None) - source code - -
- -
-   - - - - - - -
PI(target, - text=None) - source code - -
- -
-   - - - - - - -
ProcessingInstruction(target, - text=None) - source code - -
- -
-   - - - - - - -
SubElement(parent, - tag, - attrib={}, - **extra) - source code - -
- -
-   - - - - - - -
XML(text, - parser=None) - source code - -
- -
-   - - - - - - -
XMLID(text, - parser=None) - source code - -
- -
-   - - - - - - -
_encode(text, - encoding) - source code - -
- -
-   - - - - - - -
_escape_attrib(text, - encoding) - source code - -
- -
-   - - - - - - -
_escape_attrib_html(text, - encoding) - source code - -
- -
-   - - - - - - -
_escape_cdata(text, - encoding) - source code - -
- -
-   - - - - - - -
_namespaces(elem, - encoding, - default_namespace=None) - source code - -
- -
-   - - - - - - -
_raise_serialization_error(text) - source code - -
- -
-   - - - - - - -
_serialize_html(write, - elem, - encoding, - qnames, - namespaces) - source code - -
- -
-   - - - - - - -
_serialize_text(write, - elem, - encoding) - source code - -
- -
-   - - - - - - -
_serialize_xml(write, - elem, - encoding, - qnames, - namespaces) - source code - -
- -
-   - - - - - - -
dump(elem) - source code - -
- -
-   - - - - - - -
fromstring(text, - parser=None) - source code - -
- -
-   - - - - - - -
fromstringlist(sequence, - parser=None) - source code - -
- -
-   - - - - - - -
iselement(element) - source code - -
- -
-   - - - - - - -
iterparse(source, - events=None, - parser=None) - source code - -
- -
-   - - - - - - -
parse(source, - parser=None) - source code - -
- -
-   - - - - - - -
register_namespace(prefix, - uri) - source code - -
- -
-   - - - - - - -
tostring(element, - encoding=None, - method=None) - source code - -
- -
-   - - - - - - -
tostringlist(element, - encoding=None, - method=None) - source code - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - HTML_EMPTY = set(['area', 'base', 'basefont', 'br', 'col', 'fr... -
-   - - VERSION = '1.3.0' -
-   - - __package__ = 'xml.etree' -
-   - - _namespace_map = {'http://purl.org/dc/elements/1.1/': 'dc', 'h... -
-   - - _sentinel = ['sentinel'] -
-   - - _serialize = {'html': <__builtin__.function object>, 'text': <... -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

HTML_EMPTY

- -
-
-
-
Value:
-
-set(['area',
-     'base',
-     'basefont',
-     'br',
-     'col',
-     'frame',
-     'hr',
-     'img',
-...
-
-
-
-
-
- -
- -
-

_namespace_map

- -
-
-
-
Value:
-
-{'http://purl.org/dc/elements/1.1/': 'dc',
- 'http://schemas.xmlsoap.org/wsdl/': 'wsdl',
- 'http://www.w3.org/1999/02/22-rdf-syntax-ns#': 'rdf',
- 'http://www.w3.org/1999/xhtml': 'html',
- 'http://www.w3.org/2001/XMLSchema': 'xs',
- 'http://www.w3.org/2001/XMLSchema-instance': 'xsi',
- 'http://www.w3.org/XML/1998/namespace': 'xml'}
-
-
-
-
-
- -
- -
-

_serialize

- -
-
-
-
Value:
-
-{'html': <__builtin__.function object>,
- 'text': <__builtin__.function object>,
- 'xml': <__builtin__.function object>}
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/xml.etree.ElementTree-pysrc.html b/doc/html/api/xml.etree.ElementTree-pysrc.html deleted file mode 100644 index 104e7d8..0000000 --- a/doc/html/api/xml.etree.ElementTree-pysrc.html +++ /dev/null @@ -1,3205 +0,0 @@ - - - - - xml.etree.ElementTree - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package xml :: - Package etree :: - Module ElementTree - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module xml.etree.ElementTree

-
-   1  # 
-   2  # ElementTree 
-   3  # $Id: ElementTree.py 3440 2008-07-18 14:45:01Z fredrik $ 
-   4  # 
-   5  # light-weight XML support for Python 2.3 and later. 
-   6  # 
-   7  # history (since 1.2.6): 
-   8  # 2005-11-12 fl   added tostringlist/fromstringlist helpers 
-   9  # 2006-07-05 fl   merged in selected changes from the 1.3 sandbox 
-  10  # 2006-07-05 fl   removed support for 2.1 and earlier 
-  11  # 2007-06-21 fl   added deprecation/future warnings 
-  12  # 2007-08-25 fl   added doctype hook, added parser version attribute etc 
-  13  # 2007-08-26 fl   added new serializer code (better namespace handling, etc) 
-  14  # 2007-08-27 fl   warn for broken /tag searches on tree level 
-  15  # 2007-09-02 fl   added html/text methods to serializer (experimental) 
-  16  # 2007-09-05 fl   added method argument to tostring/tostringlist 
-  17  # 2007-09-06 fl   improved error handling 
-  18  # 2007-09-13 fl   added itertext, iterfind; assorted cleanups 
-  19  # 2007-12-15 fl   added C14N hooks, copy method (experimental) 
-  20  # 
-  21  # Copyright (c) 1999-2008 by Fredrik Lundh.  All rights reserved. 
-  22  # 
-  23  # fredrik@pythonware.com 
-  24  # http://www.pythonware.com 
-  25  # 
-  26  # -------------------------------------------------------------------- 
-  27  # The ElementTree toolkit is 
-  28  # 
-  29  # Copyright (c) 1999-2008 by Fredrik Lundh 
-  30  # 
-  31  # By obtaining, using, and/or copying this software and/or its 
-  32  # associated documentation, you agree that you have read, understood, 
-  33  # and will comply with the following terms and conditions: 
-  34  # 
-  35  # Permission to use, copy, modify, and distribute this software and 
-  36  # its associated documentation for any purpose and without fee is 
-  37  # hereby granted, provided that the above copyright notice appears in 
-  38  # all copies, and that both that copyright notice and this permission 
-  39  # notice appear in supporting documentation, and that the name of 
-  40  # Secret Labs AB or the author not be used in advertising or publicity 
-  41  # pertaining to distribution of the software without specific, written 
-  42  # prior permission. 
-  43  # 
-  44  # SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD 
-  45  # TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT- 
-  46  # ABILITY AND FITNESS.  IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR 
-  47  # BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 
-  48  # DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 
-  49  # WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 
-  50  # ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-  51  # OF THIS SOFTWARE. 
-  52  # -------------------------------------------------------------------- 
-  53   
-  54  # Licensed to PSF under a Contributor Agreement. 
-  55  # See http://www.python.org/psf/license for licensing details. 
-  56   
-  57  __all__ = [ 
-  58      # public symbols 
-  59      "Comment", 
-  60      "dump", 
-  61      "Element", "ElementTree", 
-  62      "fromstring", "fromstringlist", 
-  63      "iselement", "iterparse", 
-  64      "parse", "ParseError", 
-  65      "PI", "ProcessingInstruction", 
-  66      "QName", 
-  67      "SubElement", 
-  68      "tostring", "tostringlist", 
-  69      "TreeBuilder", 
-  70      "VERSION", 
-  71      "XML", 
-  72      "XMLParser", "XMLTreeBuilder", 
-  73      ] 
-  74   
-  75  VERSION = "1.3.0" 
-  76   
-  77  ## 
-  78  # The <b>Element</b> type is a flexible container object, designed to 
-  79  # store hierarchical data structures in memory. The type can be 
-  80  # described as a cross between a list and a dictionary. 
-  81  # <p> 
-  82  # Each element has a number of properties associated with it: 
-  83  # <ul> 
-  84  # <li>a <i>tag</i>. This is a string identifying what kind of data 
-  85  # this element represents (the element type, in other words).</li> 
-  86  # <li>a number of <i>attributes</i>, stored in a Python dictionary.</li> 
-  87  # <li>a <i>text</i> string.</li> 
-  88  # <li>an optional <i>tail</i> string.</li> 
-  89  # <li>a number of <i>child elements</i>, stored in a Python sequence</li> 
-  90  # </ul> 
-  91  # 
-  92  # To create an element instance, use the {@link #Element} constructor 
-  93  # or the {@link #SubElement} factory function. 
-  94  # <p> 
-  95  # The {@link #ElementTree} class can be used to wrap an element 
-  96  # structure, and convert it from and to XML. 
-  97  ## 
-  98   
-  99  import sys 
- 100  import re 
- 101  import warnings 
- 102   
- 103   
-
104 -class _SimpleElementPath(object): -
105 # emulate pre-1.2 find/findtext/findall behaviour -
106 - def find(self, element, tag, namespaces=None): -
107 for elem in element: - 108 if elem.tag == tag: - 109 return elem - 110 return None -
111 - def findtext(self, element, tag, default=None, namespaces=None): -
112 elem = self.find(element, tag) - 113 if elem is None: - 114 return default - 115 return elem.text or "" -
116 - def iterfind(self, element, tag, namespaces=None): -
117 if tag[:3] == ".//": - 118 for elem in element.iter(tag[3:]): - 119 yield elem - 120 for elem in element: - 121 if elem.tag == tag: - 122 yield elem -
123 - def findall(self, element, tag, namespaces=None): -
124 return list(self.iterfind(element, tag, namespaces)) -
125 - 126 try: - 127 from . import ElementPath - 128 except ImportError: - 129 ElementPath = _SimpleElementPath() - 130 - 131 ## - 132 # Parser error. This is a subclass of <b>SyntaxError</b>. - 133 # <p> - 134 # In addition to the exception value, an exception instance contains a - 135 # specific exception code in the <b>code</b> attribute, and the line and - 136 # column of the error in the <b>position</b> attribute. - 137 -
138 -class ParseError(SyntaxError): -
139 pass -
140 - 141 # -------------------------------------------------------------------- - 142 - 143 ## - 144 # Checks if an object appears to be a valid element object. - 145 # - 146 # @param An element instance. - 147 # @return A true value if this is an element object. - 148 # @defreturn flag - 149 -
150 -def iselement(element): -
151 # FIXME: not sure about this; might be a better idea to look - 152 # for tag/attrib/text attributes - 153 return isinstance(element, Element) or hasattr(element, "tag") -
154 - 155 ## - 156 # Element class. This class defines the Element interface, and - 157 # provides a reference implementation of this interface. - 158 # <p> - 159 # The element name, attribute names, and attribute values can be - 160 # either ASCII strings (ordinary Python strings containing only 7-bit - 161 # ASCII characters) or Unicode strings. - 162 # - 163 # @param tag The element name. - 164 # @param attrib An optional dictionary, containing element attributes. - 165 # @param **extra Additional attributes, given as keyword arguments. - 166 # @see Element - 167 # @see SubElement - 168 # @see Comment - 169 # @see ProcessingInstruction - 170 -
171 -class Element(object): -
172 # <tag attrib>text<child/>...</tag>tail - 173 - 174 ## - 175 # (Attribute) Element tag. - 176 - 177 tag = None - 178 - 179 ## - 180 # (Attribute) Element attribute dictionary. Where possible, use - 181 # {@link #Element.get}, - 182 # {@link #Element.set}, - 183 # {@link #Element.keys}, and - 184 # {@link #Element.items} to access - 185 # element attributes. - 186 - 187 attrib = None - 188 - 189 ## - 190 # (Attribute) Text before first subelement. This is either a - 191 # string or the value None. Note that if there was no text, this - 192 # attribute may be either None or an empty string, depending on - 193 # the parser. - 194 - 195 text = None - 196 - 197 ## - 198 # (Attribute) Text after this element's end tag, but before the - 199 # next sibling element's start tag. This is either a string or - 200 # the value None. Note that if there was no text, this attribute - 201 # may be either None or an empty string, depending on the parser. - 202 - 203 tail = None # text after end tag, if any - 204 - 205 # constructor - 206 -
207 - def __init__(self, tag, attrib={}, **extra): -
208 attrib = attrib.copy() - 209 attrib.update(extra) - 210 self.tag = tag - 211 self.attrib = attrib - 212 self._children = [] -
213 -
214 - def __repr__(self): -
215 return "<Element %s at 0x%x>" % (repr(self.tag), id(self)) -
216 - 217 ## - 218 # Creates a new element object of the same type as this element. - 219 # - 220 # @param tag Element tag. - 221 # @param attrib Element attributes, given as a dictionary. - 222 # @return A new element instance. - 223 -
224 - def makeelement(self, tag, attrib): -
225 return self.__class__(tag, attrib) -
226 - 227 ## - 228 # (Experimental) Copies the current element. This creates a - 229 # shallow copy; subelements will be shared with the original tree. - 230 # - 231 # @return A new element instance. - 232 -
233 - def copy(self): -
234 elem = self.makeelement(self.tag, self.attrib) - 235 elem.text = self.text - 236 elem.tail = self.tail - 237 elem[:] = self - 238 return elem -
239 - 240 ## - 241 # Returns the number of subelements. Note that this only counts - 242 # full elements; to check if there's any content in an element, you - 243 # have to check both the length and the <b>text</b> attribute. - 244 # - 245 # @return The number of subelements. - 246 -
247 - def __len__(self): -
248 return len(self._children) -
249 -
250 - def __nonzero__(self): -
251 warnings.warn( - 252 "The behavior of this method will change in future versions. " - 253 "Use specific 'len(elem)' or 'elem is not None' test instead.", - 254 FutureWarning, stacklevel=2 - 255 ) - 256 return len(self._children) != 0 # emulate old behaviour, for now -
257 - 258 ## - 259 # Returns the given subelement, by index. - 260 # - 261 # @param index What subelement to return. - 262 # @return The given subelement. - 263 # @exception IndexError If the given element does not exist. - 264 -
265 - def __getitem__(self, index): -
266 return self._children[index] -
267 - 268 ## - 269 # Replaces the given subelement, by index. - 270 # - 271 # @param index What subelement to replace. - 272 # @param element The new element value. - 273 # @exception IndexError If the given element does not exist. - 274 -
275 - def __setitem__(self, index, element): -
276 # if isinstance(index, slice): - 277 # for elt in element: - 278 # assert iselement(elt) - 279 # else: - 280 # assert iselement(element) - 281 self._children[index] = element -
282 - 283 ## - 284 # Deletes the given subelement, by index. - 285 # - 286 # @param index What subelement to delete. - 287 # @exception IndexError If the given element does not exist. - 288 -
289 - def __delitem__(self, index): -
290 del self._children[index] -
291 - 292 ## - 293 # Adds a subelement to the end of this element. In document order, - 294 # the new element will appear after the last existing subelement (or - 295 # directly after the text, if it's the first subelement), but before - 296 # the end tag for this element. - 297 # - 298 # @param element The element to add. - 299 -
300 - def append(self, element): -
301 # assert iselement(element) - 302 self._children.append(element) -
303 - 304 ## - 305 # Appends subelements from a sequence. - 306 # - 307 # @param elements A sequence object with zero or more elements. - 308 # @since 1.3 - 309 -
310 - def extend(self, elements): -
311 # for element in elements: - 312 # assert iselement(element) - 313 self._children.extend(elements) -
314 - 315 ## - 316 # Inserts a subelement at the given position in this element. - 317 # - 318 # @param index Where to insert the new subelement. - 319 -
320 - def insert(self, index, element): -
321 # assert iselement(element) - 322 self._children.insert(index, element) -
323 - 324 ## - 325 # Removes a matching subelement. Unlike the <b>find</b> methods, - 326 # this method compares elements based on identity, not on tag - 327 # value or contents. To remove subelements by other means, the - 328 # easiest way is often to use a list comprehension to select what - 329 # elements to keep, and use slice assignment to update the parent - 330 # element. - 331 # - 332 # @param element What element to remove. - 333 # @exception ValueError If a matching element could not be found. - 334 -
335 - def remove(self, element): -
336 # assert iselement(element) - 337 self._children.remove(element) -
338 - 339 ## - 340 # (Deprecated) Returns all subelements. The elements are returned - 341 # in document order. - 342 # - 343 # @return A list of subelements. - 344 # @defreturn list of Element instances - 345 -
346 - def getchildren(self): -
347 warnings.warn( - 348 "This method will be removed in future versions. " - 349 "Use 'list(elem)' or iteration over elem instead.", - 350 DeprecationWarning, stacklevel=2 - 351 ) - 352 return self._children -
353 - 354 ## - 355 # Finds the first matching subelement, by tag name or path. - 356 # - 357 # @param path What element to look for. - 358 # @keyparam namespaces Optional namespace prefix map. - 359 # @return The first matching element, or None if no element was found. - 360 # @defreturn Element or None - 361 -
362 - def find(self, path, namespaces=None): -
363 return ElementPath.find(self, path, namespaces) -
364 - 365 ## - 366 # Finds text for the first matching subelement, by tag name or path. - 367 # - 368 # @param path What element to look for. - 369 # @param default What to return if the element was not found. - 370 # @keyparam namespaces Optional namespace prefix map. - 371 # @return The text content of the first matching element, or the - 372 # default value no element was found. Note that if the element - 373 # is found, but has no text content, this method returns an - 374 # empty string. - 375 # @defreturn string - 376 -
377 - def findtext(self, path, default=None, namespaces=None): -
378 return ElementPath.findtext(self, path, default, namespaces) -
379 - 380 ## - 381 # Finds all matching subelements, by tag name or path. - 382 # - 383 # @param path What element to look for. - 384 # @keyparam namespaces Optional namespace prefix map. - 385 # @return A list or other sequence containing all matching elements, - 386 # in document order. - 387 # @defreturn list of Element instances - 388 -
389 - def findall(self, path, namespaces=None): -
390 return ElementPath.findall(self, path, namespaces) -
391 - 392 ## - 393 # Finds all matching subelements, by tag name or path. - 394 # - 395 # @param path What element to look for. - 396 # @keyparam namespaces Optional namespace prefix map. - 397 # @return An iterator or sequence containing all matching elements, - 398 # in document order. - 399 # @defreturn a generated sequence of Element instances - 400 -
401 - def iterfind(self, path, namespaces=None): -
402 return ElementPath.iterfind(self, path, namespaces) -
403 - 404 ## - 405 # Resets an element. This function removes all subelements, clears - 406 # all attributes, and sets the <b>text</b> and <b>tail</b> attributes - 407 # to None. - 408 -
409 - def clear(self): -
410 self.attrib.clear() - 411 self._children = [] - 412 self.text = self.tail = None -
413 - 414 ## - 415 # Gets an element attribute. Equivalent to <b>attrib.get</b>, but - 416 # some implementations may handle this a bit more efficiently. - 417 # - 418 # @param key What attribute to look for. - 419 # @param default What to return if the attribute was not found. - 420 # @return The attribute value, or the default value, if the - 421 # attribute was not found. - 422 # @defreturn string or None - 423 -
424 - def get(self, key, default=None): -
425 return self.attrib.get(key, default) -
426 - 427 ## - 428 # Sets an element attribute. Equivalent to <b>attrib[key] = value</b>, - 429 # but some implementations may handle this a bit more efficiently. - 430 # - 431 # @param key What attribute to set. - 432 # @param value The attribute value. - 433 -
434 - def set(self, key, value): -
435 self.attrib[key] = value -
436 - 437 ## - 438 # Gets a list of attribute names. The names are returned in an - 439 # arbitrary order (just like for an ordinary Python dictionary). - 440 # Equivalent to <b>attrib.keys()</b>. - 441 # - 442 # @return A list of element attribute names. - 443 # @defreturn list of strings - 444 -
445 - def keys(self): -
446 return self.attrib.keys() -
447 - 448 ## - 449 # Gets element attributes, as a sequence. The attributes are - 450 # returned in an arbitrary order. Equivalent to <b>attrib.items()</b>. - 451 # - 452 # @return A list of (name, value) tuples for all attributes. - 453 # @defreturn list of (string, string) tuples - 454 -
455 - def items(self): -
456 return self.attrib.items() -
457 - 458 ## - 459 # Creates a tree iterator. The iterator loops over this element - 460 # and all subelements, in document order, and returns all elements - 461 # with a matching tag. - 462 # <p> - 463 # If the tree structure is modified during iteration, new or removed - 464 # elements may or may not be included. To get a stable set, use the - 465 # list() function on the iterator, and loop over the resulting list. - 466 # - 467 # @param tag What tags to look for (default is to return all elements). - 468 # @return An iterator containing all the matching elements. - 469 # @defreturn iterator - 470 -
471 - def iter(self, tag=None): -
472 if tag == "*": - 473 tag = None - 474 if tag is None or self.tag == tag: - 475 yield self - 476 for e in self._children: - 477 for e in e.iter(tag): - 478 yield e -
479 - 480 # compatibility -
481 - def getiterator(self, tag=None): -
482 # Change for a DeprecationWarning in 1.4 - 483 warnings.warn( - 484 "This method will be removed in future versions. " - 485 "Use 'elem.iter()' or 'list(elem.iter())' instead.", - 486 PendingDeprecationWarning, stacklevel=2 - 487 ) - 488 return list(self.iter(tag)) -
489 - 490 ## - 491 # Creates a text iterator. The iterator loops over this element - 492 # and all subelements, in document order, and returns all inner - 493 # text. - 494 # - 495 # @return An iterator containing all inner text. - 496 # @defreturn iterator - 497 -
498 - def itertext(self): -
499 tag = self.tag - 500 if not isinstance(tag, basestring) and tag is not None: - 501 return - 502 if self.text: - 503 yield self.text - 504 for e in self: - 505 for s in e.itertext(): - 506 yield s - 507 if e.tail: - 508 yield e.tail -
509 - 510 # compatibility - 511 _Element = _ElementInterface = Element - 512 - 513 ## - 514 # Subelement factory. This function creates an element instance, and - 515 # appends it to an existing element. - 516 # <p> - 517 # The element name, attribute names, and attribute values can be - 518 # either 8-bit ASCII strings or Unicode strings. - 519 # - 520 # @param parent The parent element. - 521 # @param tag The subelement name. - 522 # @param attrib An optional dictionary, containing element attributes. - 523 # @param **extra Additional attributes, given as keyword arguments. - 524 # @return An element instance. - 525 # @defreturn Element - 526 -
527 -def SubElement(parent, tag, attrib={}, **extra): -
528 attrib = attrib.copy() - 529 attrib.update(extra) - 530 element = parent.makeelement(tag, attrib) - 531 parent.append(element) - 532 return element -
533 - 534 ## - 535 # Comment element factory. This factory function creates a special - 536 # element that will be serialized as an XML comment by the standard - 537 # serializer. - 538 # <p> - 539 # The comment string can be either an 8-bit ASCII string or a Unicode - 540 # string. - 541 # - 542 # @param text A string containing the comment string. - 543 # @return An element instance, representing a comment. - 544 # @defreturn Element - 545 -
546 -def Comment(text=None): -
547 element = Element(Comment) - 548 element.text = text - 549 return element -
550 - 551 ## - 552 # PI element factory. This factory function creates a special element - 553 # that will be serialized as an XML processing instruction by the standard - 554 # serializer. - 555 # - 556 # @param target A string containing the PI target. - 557 # @param text A string containing the PI contents, if any. - 558 # @return An element instance, representing a PI. - 559 # @defreturn Element - 560 -
561 -def ProcessingInstruction(target, text=None): -
562 element = Element(ProcessingInstruction) - 563 element.text = target - 564 if text: - 565 element.text = element.text + " " + text - 566 return element -
567 - 568 PI = ProcessingInstruction - 569 - 570 ## - 571 # QName wrapper. This can be used to wrap a QName attribute value, in - 572 # order to get proper namespace handling on output. - 573 # - 574 # @param text A string containing the QName value, in the form {uri}local, - 575 # or, if the tag argument is given, the URI part of a QName. - 576 # @param tag Optional tag. If given, the first argument is interpreted as - 577 # a URI, and this argument is interpreted as a local name. - 578 # @return An opaque object, representing the QName. - 579 -
580 -class QName(object): -
581 - def __init__(self, text_or_uri, tag=None): -
582 if tag: - 583 text_or_uri = "{%s}%s" % (text_or_uri, tag) - 584 self.text = text_or_uri -
585 - def __str__(self): -
586 return self.text -
587 - def __hash__(self): -
588 return hash(self.text) -
589 - def __cmp__(self, other): -
590 if isinstance(other, QName): - 591 return cmp(self.text, other.text) - 592 return cmp(self.text, other) -
593 - 594 # -------------------------------------------------------------------- - 595 - 596 ## - 597 # ElementTree wrapper class. This class represents an entire element - 598 # hierarchy, and adds some extra support for serialization to and from - 599 # standard XML. - 600 # - 601 # @param element Optional root element. - 602 # @keyparam file Optional file handle or file name. If given, the - 603 # tree is initialized with the contents of this XML file. - 604 -
605 -class ElementTree(object): -
606 -
607 - def __init__(self, element=None, file=None): -
608 # assert element is None or iselement(element) - 609 self._root = element # first node - 610 if file: - 611 self.parse(file) -
612 - 613 ## - 614 # Gets the root element for this tree. - 615 # - 616 # @return An element instance. - 617 # @defreturn Element - 618 -
619 - def getroot(self): -
620 return self._root -
621 - 622 ## - 623 # Replaces the root element for this tree. This discards the - 624 # current contents of the tree, and replaces it with the given - 625 # element. Use with care. - 626 # - 627 # @param element An element instance. - 628 -
629 - def _setroot(self, element): -
630 # assert iselement(element) - 631 self._root = element -
632 - 633 ## - 634 # Loads an external XML document into this element tree. - 635 # - 636 # @param source A file name or file object. If a file object is - 637 # given, it only has to implement a <b>read(n)</b> method. - 638 # @keyparam parser An optional parser instance. If not given, the - 639 # standard {@link XMLParser} parser is used. - 640 # @return The document root element. - 641 # @defreturn Element - 642 # @exception ParseError If the parser fails to parse the document. - 643 -
644 - def parse(self, source, parser=None): -
645 close_source = False - 646 if not hasattr(source, "read"): - 647 source = open(source, "rb") - 648 close_source = True - 649 try: - 650 if not parser: - 651 parser = XMLParser(target=TreeBuilder()) - 652 while 1: - 653 data = source.read(65536) - 654 if not data: - 655 break - 656 parser.feed(data) - 657 self._root = parser.close() - 658 return self._root - 659 finally: - 660 if close_source: - 661 source.close() -
662 - 663 ## - 664 # Creates a tree iterator for the root element. The iterator loops - 665 # over all elements in this tree, in document order. - 666 # - 667 # @param tag What tags to look for (default is to return all elements) - 668 # @return An iterator. - 669 # @defreturn iterator - 670 -
671 - def iter(self, tag=None): -
672 # assert self._root is not None - 673 return self._root.iter(tag) -
674 - 675 # compatibility -
676 - def getiterator(self, tag=None): -
677 # Change for a DeprecationWarning in 1.4 - 678 warnings.warn( - 679 "This method will be removed in future versions. " - 680 "Use 'tree.iter()' or 'list(tree.iter())' instead.", - 681 PendingDeprecationWarning, stacklevel=2 - 682 ) - 683 return list(self.iter(tag)) -
684 - 685 ## - 686 # Same as getroot().find(path), starting at the root of the - 687 # tree. - 688 # - 689 # @param path What element to look for. - 690 # @keyparam namespaces Optional namespace prefix map. - 691 # @return The first matching element, or None if no element was found. - 692 # @defreturn Element or None - 693 -
694 - def find(self, path, namespaces=None): -
695 # assert self._root is not None - 696 if path[:1] == "/": - 697 path = "." + path - 698 warnings.warn( - 699 "This search is broken in 1.3 and earlier, and will be " - 700 "fixed in a future version. If you rely on the current " - 701 "behaviour, change it to %r" % path, - 702 FutureWarning, stacklevel=2 - 703 ) - 704 return self._root.find(path, namespaces) -
705 - 706 ## - 707 # Same as getroot().findtext(path), starting at the root of the tree. - 708 # - 709 # @param path What element to look for. - 710 # @param default What to return if the element was not found. - 711 # @keyparam namespaces Optional namespace prefix map. - 712 # @return The text content of the first matching element, or the - 713 # default value no element was found. Note that if the element - 714 # is found, but has no text content, this method returns an - 715 # empty string. - 716 # @defreturn string - 717 -
718 - def findtext(self, path, default=None, namespaces=None): -
719 # assert self._root is not None - 720 if path[:1] == "/": - 721 path = "." + path - 722 warnings.warn( - 723 "This search is broken in 1.3 and earlier, and will be " - 724 "fixed in a future version. If you rely on the current " - 725 "behaviour, change it to %r" % path, - 726 FutureWarning, stacklevel=2 - 727 ) - 728 return self._root.findtext(path, default, namespaces) -
729 - 730 ## - 731 # Same as getroot().findall(path), starting at the root of the tree. - 732 # - 733 # @param path What element to look for. - 734 # @keyparam namespaces Optional namespace prefix map. - 735 # @return A list or iterator containing all matching elements, - 736 # in document order. - 737 # @defreturn list of Element instances - 738 -
739 - def findall(self, path, namespaces=None): -
740 # assert self._root is not None - 741 if path[:1] == "/": - 742 path = "." + path - 743 warnings.warn( - 744 "This search is broken in 1.3 and earlier, and will be " - 745 "fixed in a future version. If you rely on the current " - 746 "behaviour, change it to %r" % path, - 747 FutureWarning, stacklevel=2 - 748 ) - 749 return self._root.findall(path, namespaces) -
750 - 751 ## - 752 # Finds all matching subelements, by tag name or path. - 753 # Same as getroot().iterfind(path). - 754 # - 755 # @param path What element to look for. - 756 # @keyparam namespaces Optional namespace prefix map. - 757 # @return An iterator or sequence containing all matching elements, - 758 # in document order. - 759 # @defreturn a generated sequence of Element instances - 760 -
761 - def iterfind(self, path, namespaces=None): -
762 # assert self._root is not None - 763 if path[:1] == "/": - 764 path = "." + path - 765 warnings.warn( - 766 "This search is broken in 1.3 and earlier, and will be " - 767 "fixed in a future version. If you rely on the current " - 768 "behaviour, change it to %r" % path, - 769 FutureWarning, stacklevel=2 - 770 ) - 771 return self._root.iterfind(path, namespaces) -
772 - 773 ## - 774 # Writes the element tree to a file, as XML. - 775 # - 776 # @def write(file, **options) - 777 # @param file A file name, or a file object opened for writing. - 778 # @param **options Options, given as keyword arguments. - 779 # @keyparam encoding Optional output encoding (default is US-ASCII). - 780 # @keyparam xml_declaration Controls if an XML declaration should - 781 # be added to the file. Use False for never, True for always, - 782 # None for only if not US-ASCII or UTF-8. None is default. - 783 # @keyparam default_namespace Sets the default XML namespace (for "xmlns"). - 784 # @keyparam method Optional output method ("xml", "html", "text" or - 785 # "c14n"; default is "xml"). - 786 -
787 - def write(self, file_or_filename, - 788 # keyword arguments - 789 encoding=None, - 790 xml_declaration=None, - 791 default_namespace=None, - 792 method=None): -
793 # assert self._root is not None - 794 if not method: - 795 method = "xml" - 796 elif method not in _serialize: - 797 # FIXME: raise an ImportError for c14n if ElementC14N is missing? - 798 raise ValueError("unknown method %r" % method) - 799 if hasattr(file_or_filename, "write"): - 800 file = file_or_filename - 801 else: - 802 file = open(file_or_filename, "wb") - 803 write = file.write - 804 if not encoding: - 805 if method == "c14n": - 806 encoding = "utf-8" - 807 else: - 808 encoding = "us-ascii" - 809 elif xml_declaration or (xml_declaration is None and - 810 encoding not in ("utf-8", "us-ascii")): - 811 if method == "xml": - 812 write("<?xml version='1.0' encoding='%s'?>\n" % encoding) - 813 if method == "text": - 814 _serialize_text(write, self._root, encoding) - 815 else: - 816 qnames, namespaces = _namespaces( - 817 self._root, encoding, default_namespace - 818 ) - 819 serialize = _serialize[method] - 820 serialize(write, self._root, encoding, qnames, namespaces) - 821 if file_or_filename is not file: - 822 file.close() -
823 -
824 - def write_c14n(self, file): -
825 # lxml.etree compatibility. use output method instead - 826 return self.write(file, method="c14n") -
827 - 828 # -------------------------------------------------------------------- - 829 # serialization support - 830 -
831 -def _namespaces(elem, encoding, default_namespace=None): -
832 # identify namespaces used in this tree - 833 - 834 # maps qnames to *encoded* prefix:local names - 835 qnames = {None: None} - 836 - 837 # maps uri:s to prefixes - 838 namespaces = {} - 839 if default_namespace: - 840 namespaces[default_namespace] = "" - 841 - 842 def encode(text): - 843 return text.encode(encoding) -
844 - 845 def add_qname(qname): - 846 # calculate serialized qname representation - 847 try: - 848 if qname[:1] == "{": - 849 uri, tag = qname[1:].rsplit("}", 1) - 850 prefix = namespaces.get(uri) - 851 if prefix is None: - 852 prefix = _namespace_map.get(uri) - 853 if prefix is None: - 854 prefix = "ns%d" % len(namespaces) - 855 if prefix != "xml": - 856 namespaces[uri] = prefix - 857 if prefix: - 858 qnames[qname] = encode("%s:%s" % (prefix, tag)) - 859 else: - 860 qnames[qname] = encode(tag) # default element - 861 else: - 862 if default_namespace: - 863 # FIXME: can this be handled in XML 1.0? - 864 raise ValueError( - 865 "cannot use non-qualified names with " - 866 "default_namespace option" - 867 ) - 868 qnames[qname] = encode(qname) - 869 except TypeError: - 870 _raise_serialization_error(qname) - 871 - 872 # populate qname and namespaces table - 873 try: - 874 iterate = elem.iter - 875 except AttributeError: - 876 iterate = elem.getiterator # cET compatibility - 877 for elem in iterate(): - 878 tag = elem.tag - 879 if isinstance(tag, QName): - 880 if tag.text not in qnames: - 881 add_qname(tag.text) - 882 elif isinstance(tag, basestring): - 883 if tag not in qnames: - 884 add_qname(tag) - 885 elif tag is not None and tag is not Comment and tag is not PI: - 886 _raise_serialization_error(tag) - 887 for key, value in elem.items(): - 888 if isinstance(key, QName): - 889 key = key.text - 890 if key not in qnames: - 891 add_qname(key) - 892 if isinstance(value, QName) and value.text not in qnames: - 893 add_qname(value.text) - 894 text = elem.text - 895 if isinstance(text, QName) and text.text not in qnames: - 896 add_qname(text.text) - 897 return qnames, namespaces - 898 -
899 -def _serialize_xml(write, elem, encoding, qnames, namespaces): -
900 tag = elem.tag - 901 text = elem.text - 902 if tag is Comment: - 903 write("<!--%s-->" % _encode(text, encoding)) - 904 elif tag is ProcessingInstruction: - 905 write("<?%s?>" % _encode(text, encoding)) - 906 else: - 907 tag = qnames[tag] - 908 if tag is None: - 909 if text: - 910 write(_escape_cdata(text, encoding)) - 911 for e in elem: - 912 _serialize_xml(write, e, encoding, qnames, None) - 913 else: - 914 write("<" + tag) - 915 items = elem.items() - 916 if items or namespaces: - 917 if namespaces: - 918 for v, k in sorted(namespaces.items(), - 919 key=lambda x: x[1]): # sort on prefix - 920 if k: - 921 k = ":" + k - 922 write(" xmlns%s=\"%s\"" % ( - 923 k.encode(encoding), - 924 _escape_attrib(v, encoding) - 925 )) - 926 for k, v in sorted(items): # lexical order - 927 if isinstance(k, QName): - 928 k = k.text - 929 if isinstance(v, QName): - 930 v = qnames[v.text] - 931 else: - 932 v = _escape_attrib(v, encoding) - 933 write(" %s=\"%s\"" % (qnames[k], v)) - 934 if text or len(elem): - 935 write(">") - 936 if text: - 937 write(_escape_cdata(text, encoding)) - 938 for e in elem: - 939 _serialize_xml(write, e, encoding, qnames, None) - 940 write("</" + tag + ">") - 941 else: - 942 write(" />") - 943 if elem.tail: - 944 write(_escape_cdata(elem.tail, encoding)) -
945 - 946 HTML_EMPTY = ("area", "base", "basefont", "br", "col", "frame", "hr", - 947 "img", "input", "isindex", "link", "meta", "param") - 948 - 949 try: - 950 HTML_EMPTY = set(HTML_EMPTY) - 951 except NameError: - 952 pass - 953 -
954 -def _serialize_html(write, elem, encoding, qnames, namespaces): -
955 tag = elem.tag - 956 text = elem.text - 957 if tag is Comment: - 958 write("<!--%s-->" % _escape_cdata(text, encoding)) - 959 elif tag is ProcessingInstruction: - 960 write("<?%s?>" % _escape_cdata(text, encoding)) - 961 else: - 962 tag = qnames[tag] - 963 if tag is None: - 964 if text: - 965 write(_escape_cdata(text, encoding)) - 966 for e in elem: - 967 _serialize_html(write, e, encoding, qnames, None) - 968 else: - 969 write("<" + tag) - 970 items = elem.items() - 971 if items or namespaces: - 972 if namespaces: - 973 for v, k in sorted(namespaces.items(), - 974 key=lambda x: x[1]): # sort on prefix - 975 if k: - 976 k = ":" + k - 977 write(" xmlns%s=\"%s\"" % ( - 978 k.encode(encoding), - 979 _escape_attrib(v, encoding) - 980 )) - 981 for k, v in sorted(items): # lexical order - 982 if isinstance(k, QName): - 983 k = k.text - 984 if isinstance(v, QName): - 985 v = qnames[v.text] - 986 else: - 987 v = _escape_attrib_html(v, encoding) - 988 # FIXME: handle boolean attributes - 989 write(" %s=\"%s\"" % (qnames[k], v)) - 990 write(">") - 991 ltag = tag.lower() - 992 if text: - 993 if ltag == "script" or ltag == "style": - 994 write(_encode(text, encoding)) - 995 else: - 996 write(_escape_cdata(text, encoding)) - 997 for e in elem: - 998 _serialize_html(write, e, encoding, qnames, None) - 999 if ltag not in HTML_EMPTY: -1000 write("</" + tag + ">") -1001 if elem.tail: -1002 write(_escape_cdata(elem.tail, encoding)) -
1003 -
1004 -def _serialize_text(write, elem, encoding): -
1005 for part in elem.itertext(): -1006 write(part.encode(encoding)) -1007 if elem.tail: -1008 write(elem.tail.encode(encoding)) -
1009 -1010 _serialize = { -1011 "xml": _serialize_xml, -1012 "html": _serialize_html, -1013 "text": _serialize_text, -1014 # this optional method is imported at the end of the module -1015 # "c14n": _serialize_c14n, -1016 } -1017 -1018 ## -1019 # Registers a namespace prefix. The registry is global, and any -1020 # existing mapping for either the given prefix or the namespace URI -1021 # will be removed. -1022 # -1023 # @param prefix Namespace prefix. -1024 # @param uri Namespace uri. Tags and attributes in this namespace -1025 # will be serialized with the given prefix, if at all possible. -1026 # @exception ValueError If the prefix is reserved, or is otherwise -1027 # invalid. -1028 -
1029 -def register_namespace(prefix, uri): -
1030 if re.match("ns\d+$", prefix): -1031 raise ValueError("Prefix format reserved for internal use") -1032 for k, v in _namespace_map.items(): -1033 if k == uri or v == prefix: -1034 del _namespace_map[k] -1035 _namespace_map[uri] = prefix -
1036 -1037 _namespace_map = { -1038 # "well-known" namespace prefixes -1039 "http://www.w3.org/XML/1998/namespace": "xml", -1040 "http://www.w3.org/1999/xhtml": "html", -1041 "http://www.w3.org/1999/02/22-rdf-syntax-ns#": "rdf", -1042 "http://schemas.xmlsoap.org/wsdl/": "wsdl", -1043 # xml schema -1044 "http://www.w3.org/2001/XMLSchema": "xs", -1045 "http://www.w3.org/2001/XMLSchema-instance": "xsi", -1046 # dublin core -1047 "http://purl.org/dc/elements/1.1/": "dc", -1048 } -1049 -
1050 -def _raise_serialization_error(text): -
1051 raise TypeError( -1052 "cannot serialize %r (type %s)" % (text, type(text).__name__) -1053 ) -
1054 -
1055 -def _encode(text, encoding): -
1056 try: -1057 return text.encode(encoding, "xmlcharrefreplace") -1058 except (TypeError, AttributeError): -1059 _raise_serialization_error(text) -
1060 -
1061 -def _escape_cdata(text, encoding): -
1062 # escape character data -1063 try: -1064 # it's worth avoiding do-nothing calls for strings that are -1065 # shorter than 500 character, or so. assume that's, by far, -1066 # the most common case in most applications. -1067 if "&" in text: -1068 text = text.replace("&", "&amp;") -1069 if "<" in text: -1070 text = text.replace("<", "&lt;") -1071 if ">" in text: -1072 text = text.replace(">", "&gt;") -1073 return text.encode(encoding, "xmlcharrefreplace") -1074 except (TypeError, AttributeError): -1075 _raise_serialization_error(text) -
1076 -
1077 -def _escape_attrib(text, encoding): -
1078 # escape attribute value -1079 try: -1080 if "&" in text: -1081 text = text.replace("&", "&amp;") -1082 if "<" in text: -1083 text = text.replace("<", "&lt;") -1084 if ">" in text: -1085 text = text.replace(">", "&gt;") -1086 if "\"" in text: -1087 text = text.replace("\"", "&quot;") -1088 if "\n" in text: -1089 text = text.replace("\n", "&#10;") -1090 return text.encode(encoding, "xmlcharrefreplace") -1091 except (TypeError, AttributeError): -1092 _raise_serialization_error(text) -
1093 -
1094 -def _escape_attrib_html(text, encoding): -
1095 # escape attribute value -1096 try: -1097 if "&" in text: -1098 text = text.replace("&", "&amp;") -1099 if ">" in text: -1100 text = text.replace(">", "&gt;") -1101 if "\"" in text: -1102 text = text.replace("\"", "&quot;") -1103 return text.encode(encoding, "xmlcharrefreplace") -1104 except (TypeError, AttributeError): -1105 _raise_serialization_error(text) -
1106 -1107 # -------------------------------------------------------------------- -1108 -1109 ## -1110 # Generates a string representation of an XML element, including all -1111 # subelements. -1112 # -1113 # @param element An Element instance. -1114 # @keyparam encoding Optional output encoding (default is US-ASCII). -1115 # @keyparam method Optional output method ("xml", "html", "text" or -1116 # "c14n"; default is "xml"). -1117 # @return An encoded string containing the XML data. -1118 # @defreturn string -1119 -
1120 -def tostring(element, encoding=None, method=None): -
1121 class dummy: -1122 pass -
1123 data = [] -1124 file = dummy() -1125 file.write = data.append -1126 ElementTree(element).write(file, encoding, method=method) -1127 return "".join(data) -1128 -1129 ## -1130 # Generates a string representation of an XML element, including all -1131 # subelements. The string is returned as a sequence of string fragments. -1132 # -1133 # @param element An Element instance. -1134 # @keyparam encoding Optional output encoding (default is US-ASCII). -1135 # @keyparam method Optional output method ("xml", "html", "text" or -1136 # "c14n"; default is "xml"). -1137 # @return A sequence object containing the XML data. -1138 # @defreturn sequence -1139 # @since 1.3 -1140 -
1141 -def tostringlist(element, encoding=None, method=None): -
1142 class dummy: -1143 pass -
1144 data = [] -1145 file = dummy() -1146 file.write = data.append -1147 ElementTree(element).write(file, encoding, method=method) -1148 # FIXME: merge small fragments into larger parts -1149 return data -1150 -1151 ## -1152 # Writes an element tree or element structure to sys.stdout. This -1153 # function should be used for debugging only. -1154 # <p> -1155 # The exact output format is implementation dependent. In this -1156 # version, it's written as an ordinary XML file. -1157 # -1158 # @param elem An element tree or an individual element. -1159 -
1160 -def dump(elem): -
1161 # debugging -1162 if not isinstance(elem, ElementTree): -1163 elem = ElementTree(elem) -1164 elem.write(sys.stdout) -1165 tail = elem.getroot().tail -1166 if not tail or tail[-1] != "\n": -1167 sys.stdout.write("\n") -
1168 -1169 # -------------------------------------------------------------------- -1170 # parsing -1171 -1172 ## -1173 # Parses an XML document into an element tree. -1174 # -1175 # @param source A filename or file object containing XML data. -1176 # @param parser An optional parser instance. If not given, the -1177 # standard {@link XMLParser} parser is used. -1178 # @return An ElementTree instance -1179 -
1180 -def parse(source, parser=None): -
1181 tree = ElementTree() -1182 tree.parse(source, parser) -1183 return tree -
1184 -1185 ## -1186 # Parses an XML document into an element tree incrementally, and reports -1187 # what's going on to the user. -1188 # -1189 # @param source A filename or file object containing XML data. -1190 # @param events A list of events to report back. If omitted, only "end" -1191 # events are reported. -1192 # @param parser An optional parser instance. If not given, the -1193 # standard {@link XMLParser} parser is used. -1194 # @return A (event, elem) iterator. -1195 -
1196 -def iterparse(source, events=None, parser=None): -
1197 close_source = False -1198 if not hasattr(source, "read"): -1199 source = open(source, "rb") -1200 close_source = True -1201 try: -1202 if not parser: -1203 parser = XMLParser(target=TreeBuilder()) -1204 return _IterParseIterator(source, events, parser, close_source) -1205 except: -1206 if close_source: -1207 source.close() -1208 raise -
1209 -
1210 -class _IterParseIterator(object): -
1211 -
1212 - def __init__(self, source, events, parser, close_source=False): -
1213 self._file = source -1214 self._close_file = close_source -1215 self._events = [] -1216 self._index = 0 -1217 self._error = None -1218 self.root = self._root = None -1219 self._parser = parser -1220 # wire up the parser for event reporting -1221 parser = self._parser._parser -1222 append = self._events.append -1223 if events is None: -1224 events = ["end"] -1225 for event in events: -1226 if event == "start": -1227 try: -1228 parser.ordered_attributes = 1 -1229 parser.specified_attributes = 1 -1230 def handler(tag, attrib_in, event=event, append=append, -1231 start=self._parser._start_list): -1232 append((event, start(tag, attrib_in))) -
1233 parser.StartElementHandler = handler -1234 except AttributeError: -1235 def handler(tag, attrib_in, event=event, append=append, -1236 start=self._parser._start): -1237 append((event, start(tag, attrib_in))) -
1238 parser.StartElementHandler = handler -1239 elif event == "end": -1240 def handler(tag, event=event, append=append, -1241 end=self._parser._end): -1242 append((event, end(tag))) -1243 parser.EndElementHandler = handler -1244 elif event == "start-ns": -1245 def handler(prefix, uri, event=event, append=append): -1246 try: -1247 uri = (uri or "").encode("ascii") -1248 except UnicodeError: -1249 pass -1250 append((event, (prefix or "", uri or ""))) -1251 parser.StartNamespaceDeclHandler = handler -1252 elif event == "end-ns": -1253 def handler(prefix, event=event, append=append): -1254 append((event, None)) -1255 parser.EndNamespaceDeclHandler = handler -1256 else: -1257 raise ValueError("unknown event %r" % event) -1258 -
1259 - def next(self): -
1260 try: -1261 while 1: -1262 try: -1263 item = self._events[self._index] -1264 self._index += 1 -1265 return item -1266 except IndexError: -1267 pass -1268 if self._error: -1269 e = self._error -1270 self._error = None -1271 raise e -1272 if self._parser is None: -1273 self.root = self._root -1274 break -1275 # load event buffer -1276 del self._events[:] -1277 self._index = 0 -1278 data = self._file.read(16384) -1279 if data: -1280 try: -1281 self._parser.feed(data) -1282 except SyntaxError as exc: -1283 self._error = exc -1284 else: -1285 self._root = self._parser.close() -1286 self._parser = None -1287 except: -1288 if self._close_file: -1289 self._file.close() -1290 raise -1291 if self._close_file: -1292 self._file.close() -1293 raise StopIteration -
1294 -
1295 - def __iter__(self): -
1296 return self -
1297 -1298 ## -1299 # Parses an XML document from a string constant. This function can -1300 # be used to embed "XML literals" in Python code. -1301 # -1302 # @param source A string containing XML data. -1303 # @param parser An optional parser instance. If not given, the -1304 # standard {@link XMLParser} parser is used. -1305 # @return An Element instance. -1306 # @defreturn Element -1307 -
1308 -def XML(text, parser=None): -
1309 if not parser: -1310 parser = XMLParser(target=TreeBuilder()) -1311 parser.feed(text) -1312 return parser.close() -
1313 -1314 ## -1315 # Parses an XML document from a string constant, and also returns -1316 # a dictionary which maps from element id:s to elements. -1317 # -1318 # @param source A string containing XML data. -1319 # @param parser An optional parser instance. If not given, the -1320 # standard {@link XMLParser} parser is used. -1321 # @return A tuple containing an Element instance and a dictionary. -1322 # @defreturn (Element, dictionary) -1323 -
1324 -def XMLID(text, parser=None): -
1325 if not parser: -1326 parser = XMLParser(target=TreeBuilder()) -1327 parser.feed(text) -1328 tree = parser.close() -1329 ids = {} -1330 for elem in tree.iter(): -1331 id = elem.get("id") -1332 if id: -1333 ids[id] = elem -1334 return tree, ids -
1335 -1336 ## -1337 # Parses an XML document from a string constant. Same as {@link #XML}. -1338 # -1339 # @def fromstring(text) -1340 # @param source A string containing XML data. -1341 # @return An Element instance. -1342 # @defreturn Element -1343 -1344 fromstring = XML -1345 -1346 ## -1347 # Parses an XML document from a sequence of string fragments. -1348 # -1349 # @param sequence A list or other sequence containing XML data fragments. -1350 # @param parser An optional parser instance. If not given, the -1351 # standard {@link XMLParser} parser is used. -1352 # @return An Element instance. -1353 # @defreturn Element -1354 # @since 1.3 -1355 -
1356 -def fromstringlist(sequence, parser=None): -
1357 if not parser: -1358 parser = XMLParser(target=TreeBuilder()) -1359 for text in sequence: -1360 parser.feed(text) -1361 return parser.close() -
1362 -1363 # -------------------------------------------------------------------- -1364 -1365 ## -1366 # Generic element structure builder. This builder converts a sequence -1367 # of {@link #TreeBuilder.start}, {@link #TreeBuilder.data}, and {@link -1368 # #TreeBuilder.end} method calls to a well-formed element structure. -1369 # <p> -1370 # You can use this class to build an element structure using a custom XML -1371 # parser, or a parser for some other XML-like format. -1372 # -1373 # @param element_factory Optional element factory. This factory -1374 # is called to create new Element instances, as necessary. -1375 -
1376 -class TreeBuilder(object): -
1377 -
1378 - def __init__(self, element_factory=None): -
1379 self._data = [] # data collector -1380 self._elem = [] # element stack -1381 self._last = None # last element -1382 self._tail = None # true if we're after an end tag -1383 if element_factory is None: -1384 element_factory = Element -1385 self._factory = element_factory -
1386 -1387 ## -1388 # Flushes the builder buffers, and returns the toplevel document -1389 # element. -1390 # -1391 # @return An Element instance. -1392 # @defreturn Element -1393 -
1394 - def close(self): -
1395 assert len(self._elem) == 0, "missing end tags" -1396 assert self._last is not None, "missing toplevel element" -1397 return self._last -
1398 -
1399 - def _flush(self): -
1400 if self._data: -1401 if self._last is not None: -1402 text = "".join(self._data) -1403 if self._tail: -1404 assert self._last.tail is None, "internal error (tail)" -1405 self._last.tail = text -1406 else: -1407 assert self._last.text is None, "internal error (text)" -1408 self._last.text = text -1409 self._data = [] -
1410 -1411 ## -1412 # Adds text to the current element. -1413 # -1414 # @param data A string. This should be either an 8-bit string -1415 # containing ASCII text, or a Unicode string. -1416 -
1417 - def data(self, data): -
1418 self._data.append(data) -
1419 -1420 ## -1421 # Opens a new element. -1422 # -1423 # @param tag The element name. -1424 # @param attrib A dictionary containing element attributes. -1425 # @return The opened element. -1426 # @defreturn Element -1427 -
1428 - def start(self, tag, attrs): -
1429 self._flush() -1430 self._last = elem = self._factory(tag, attrs) -1431 if self._elem: -1432 self._elem[-1].append(elem) -1433 self._elem.append(elem) -1434 self._tail = 0 -1435 return elem -
1436 -1437 ## -1438 # Closes the current element. -1439 # -1440 # @param tag The element name. -1441 # @return The closed element. -1442 # @defreturn Element -1443 -
1444 - def end(self, tag): -
1445 self._flush() -1446 self._last = self._elem.pop() -1447 assert self._last.tag == tag,\ -1448 "end tag mismatch (expected %s, got %s)" % ( -1449 self._last.tag, tag) -1450 self._tail = 1 -1451 return self._last -
1452 -1453 _sentinel = ['sentinel'] -1454 -1455 ## -1456 # Element structure builder for XML source data, based on the -1457 # <b>expat</b> parser. -1458 # -1459 # @keyparam target Target object. If omitted, the builder uses an -1460 # instance of the standard {@link #TreeBuilder} class. -1461 # @keyparam html Predefine HTML entities. This flag is not supported -1462 # by the current implementation. -1463 # @keyparam encoding Optional encoding. If given, the value overrides -1464 # the encoding specified in the XML file. -1465 # @see #ElementTree -1466 # @see #TreeBuilder -1467 -
1468 -class XMLParser(object): -
1469 -
1470 - def __init__(self, html=_sentinel, target=None, encoding=None): -
1471 if html is not _sentinel: -1472 warnings.warnpy3k( -1473 "The html argument of XMLParser() is deprecated", -1474 DeprecationWarning, stacklevel=2) -1475 try: -1476 from xml.parsers import expat -1477 except ImportError: -1478 try: -1479 import pyexpat as expat -1480 except ImportError: -1481 raise ImportError( -1482 "No module named expat; use SimpleXMLTreeBuilder instead" -1483 ) -1484 parser = expat.ParserCreate(encoding, "}") -1485 if target is None: -1486 target = TreeBuilder() -1487 # underscored names are provided for compatibility only -1488 self.parser = self._parser = parser -1489 self.target = self._target = target -1490 self._error = expat.error -1491 self._names = {} # name memo cache -1492 # callbacks -1493 parser.DefaultHandlerExpand = self._default -1494 parser.StartElementHandler = self._start -1495 parser.EndElementHandler = self._end -1496 parser.CharacterDataHandler = self._data -1497 # optional callbacks -1498 parser.CommentHandler = self._comment -1499 parser.ProcessingInstructionHandler = self._pi -1500 # let expat do the buffering, if supported -1501 try: -1502 self._parser.buffer_text = 1 -1503 except AttributeError: -1504 pass -1505 # use new-style attribute handling, if supported -1506 try: -1507 self._parser.ordered_attributes = 1 -1508 self._parser.specified_attributes = 1 -1509 parser.StartElementHandler = self._start_list -1510 except AttributeError: -1511 pass -1512 self._doctype = None -1513 self.entity = {} -1514 try: -1515 self.version = "Expat %d.%d.%d" % expat.version_info -1516 except AttributeError: -1517 pass # unknown -
1518 -
1519 - def _raiseerror(self, value): -
1520 err = ParseError(value) -1521 err.code = value.code -1522 err.position = value.lineno, value.offset -1523 raise err -
1524 -
1525 - def _fixtext(self, text): -
1526 # convert text string to ascii, if possible -1527 try: -1528 return text.encode("ascii") -1529 except UnicodeError: -1530 return text -
1531 -
1532 - def _fixname(self, key): -
1533 # expand qname, and convert name string to ascii, if possible -1534 try: -1535 name = self._names[key] -1536 except KeyError: -1537 name = key -1538 if "}" in name: -1539 name = "{" + name -1540 self._names[key] = name = self._fixtext(name) -1541 return name -
1542 -
1543 - def _start(self, tag, attrib_in): -
1544 fixname = self._fixname -1545 fixtext = self._fixtext -1546 tag = fixname(tag) -1547 attrib = {} -1548 for key, value in attrib_in.items(): -1549 attrib[fixname(key)] = fixtext(value) -1550 return self.target.start(tag, attrib) -
1551 -
1552 - def _start_list(self, tag, attrib_in): -
1553 fixname = self._fixname -1554 fixtext = self._fixtext -1555 tag = fixname(tag) -1556 attrib = {} -1557 if attrib_in: -1558 for i in range(0, len(attrib_in), 2): -1559 attrib[fixname(attrib_in[i])] = fixtext(attrib_in[i+1]) -1560 return self.target.start(tag, attrib) -
1561 -
1562 - def _data(self, text): -
1563 return self.target.data(self._fixtext(text)) -
1564 -
1565 - def _end(self, tag): -
1566 return self.target.end(self._fixname(tag)) -
1567 -
1568 - def _comment(self, data): -
1569 try: -1570 comment = self.target.comment -1571 except AttributeError: -1572 pass -1573 else: -1574 return comment(self._fixtext(data)) -
1575 -
1576 - def _pi(self, target, data): -
1577 try: -1578 pi = self.target.pi -1579 except AttributeError: -1580 pass -1581 else: -1582 return pi(self._fixtext(target), self._fixtext(data)) -
1583 -
1584 - def _default(self, text): -
1585 prefix = text[:1] -1586 if prefix == "&": -1587 # deal with undefined entities -1588 try: -1589 self.target.data(self.entity[text[1:-1]]) -1590 except KeyError: -1591 from xml.parsers import expat -1592 err = expat.error( -1593 "undefined entity %s: line %d, column %d" % -1594 (text, self._parser.ErrorLineNumber, -1595 self._parser.ErrorColumnNumber) -1596 ) -1597 err.code = 11 # XML_ERROR_UNDEFINED_ENTITY -1598 err.lineno = self._parser.ErrorLineNumber -1599 err.offset = self._parser.ErrorColumnNumber -1600 raise err -1601 elif prefix == "<" and text[:9] == "<!DOCTYPE": -1602 self._doctype = [] # inside a doctype declaration -1603 elif self._doctype is not None: -1604 # parse doctype contents -1605 if prefix == ">": -1606 self._doctype = None -1607 return -1608 text = text.strip() -1609 if not text: -1610 return -1611 self._doctype.append(text) -1612 n = len(self._doctype) -1613 if n > 2: -1614 type = self._doctype[1] -1615 if type == "PUBLIC" and n == 4: -1616 name, type, pubid, system = self._doctype -1617 elif type == "SYSTEM" and n == 3: -1618 name, type, system = self._doctype -1619 pubid = None -1620 else: -1621 return -1622 if pubid: -1623 pubid = pubid[1:-1] -1624 if hasattr(self.target, "doctype"): -1625 self.target.doctype(name, pubid, system[1:-1]) -1626 elif self.doctype != self._XMLParser__doctype: -1627 # warn about deprecated call -1628 self._XMLParser__doctype(name, pubid, system[1:-1]) -1629 self.doctype(name, pubid, system[1:-1]) -1630 self._doctype = None -
1631 -1632 ## -1633 # (Deprecated) Handles a doctype declaration. -1634 # -1635 # @param name Doctype name. -1636 # @param pubid Public identifier. -1637 # @param system System identifier. -1638 -
1639 - def doctype(self, name, pubid, system): -
1640 """This method of XMLParser is deprecated.""" -1641 warnings.warn( -1642 "This method of XMLParser is deprecated. Define doctype() " -1643 "method on the TreeBuilder target.", -1644 DeprecationWarning, -1645 ) -
1646 -1647 # sentinel, if doctype is redefined in a subclass -1648 __doctype = doctype -1649 -1650 ## -1651 # Feeds data to the parser. -1652 # -1653 # @param data Encoded data. -1654 -
1655 - def feed(self, data): -
1656 try: -1657 self._parser.Parse(data, 0) -1658 except self._error, v: -1659 self._raiseerror(v) -
1660 -1661 ## -1662 # Finishes feeding data to the parser. -1663 # -1664 # @return An element structure. -1665 # @defreturn Element -1666 -
1667 - def close(self): -
1668 try: -1669 self._parser.Parse("", 1) # end of data -1670 except self._error, v: -1671 self._raiseerror(v) -1672 tree = self.target.close() -1673 del self.target, self._parser # get rid of circular references -1674 return tree -
1675 -1676 # compatibility -1677 XMLTreeBuilder = XMLParser -1678 -1679 # workaround circular import. -1680 try: -1681 from ElementC14N import _serialize_c14n -1682 _serialize["c14n"] = _serialize_c14n -1683 except ImportError: -1684 pass -1685 -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/xml.etree.ElementTree.Element-class.html b/doc/html/api/xml.etree.ElementTree.Element-class.html deleted file mode 100644 index 848a96f..0000000 --- a/doc/html/api/xml.etree.ElementTree.Element-class.html +++ /dev/null @@ -1,752 +0,0 @@ - - - - - xml.etree.ElementTree.Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - xml :: - etree :: - ElementTree :: - Element :: - Class Element - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class Element

source code

-
-object --+
-         |
-        Element
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__delitem__(self, - index) - source code - -
- -
-   - - - - - - -
__getitem__(self, - index) - source code - -
- -
-   - - - - - - -
__init__(self, - tag, - attrib={}, - **extra)
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-   - - - - - - -
__len__(self) - source code - -
- -
-   - - - - - - -
__nonzero__(self) - source code - -
- -
-   - - - - - - -
__repr__(self)
- repr(x)
- source code - -
- -
-   - - - - - - -
__setitem__(self, - index, - element) - source code - -
- -
-   - - - - - - -
append(self, - element) - source code - -
- -
-   - - - - - - -
clear(self) - source code - -
- -
-   - - - - - - -
copy(self) - source code - -
- -
-   - - - - - - -
extend(self, - elements) - source code - -
- -
-   - - - - - - -
find(self, - path, - namespaces=None) - source code - -
- -
-   - - - - - - -
findall(self, - path, - namespaces=None) - source code - -
- -
-   - - - - - - -
findtext(self, - path, - default=None, - namespaces=None) - source code - -
- -
-   - - - - - - -
get(self, - key, - default=None) - source code - -
- -
-   - - - - - - -
getchildren(self) - source code - -
- -
-   - - - - - - -
getiterator(self, - tag=None) - source code - -
- -
-   - - - - - - -
insert(self, - index, - element) - source code - -
- -
-   - - - - - - -
items(self) - source code - -
- -
-   - - - - - - -
iter(self, - tag=None) - source code - -
- -
-   - - - - - - -
iterfind(self, - path, - namespaces=None) - source code - -
- -
-   - - - - - - -
itertext(self) - source code - -
- -
-   - - - - - - -
keys(self) - source code - -
- -
-   - - - - - - -
makeelement(self, - tag, - attrib) - source code - -
- -
-   - - - - - - -
remove(self, - element) - source code - -
- -
-   - - - - - - -
set(self, - key, - value) - source code - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - attrib = None
- hash(x) -
-   - - tag = None
- hash(x) -
-   - - tail = None
- hash(x) -
-   - - text = None
- hash(x) -
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - tag, - attrib={}, - **extra) -
(Constructor) -

-
source code  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

__repr__(self) -
(Representation operator) -

-
source code  -
- - repr(x) -
-
Overrides: - object.__repr__ -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/xml.etree.ElementTree.ElementTree-class.html b/doc/html/api/xml.etree.ElementTree.ElementTree-class.html deleted file mode 100644 index e376619..0000000 --- a/doc/html/api/xml.etree.ElementTree.ElementTree-class.html +++ /dev/null @@ -1,446 +0,0 @@ - - - - - xml.etree.ElementTree.ElementTree - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - xml :: - etree :: - ElementTree :: - ElementTree :: - Class ElementTree - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ElementTree

source code

-
-object --+
-         |
-        ElementTree
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - element=None, - file=None)
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-   - - - - - - -
_setroot(self, - element) - source code - -
- -
-   - - - - - - -
find(self, - path, - namespaces=None) - source code - -
- -
-   - - - - - - -
findall(self, - path, - namespaces=None) - source code - -
- -
-   - - - - - - -
findtext(self, - path, - default=None, - namespaces=None) - source code - -
- -
-   - - - - - - -
getiterator(self, - tag=None) - source code - -
- -
-   - - - - - - -
getroot(self) - source code - -
- -
-   - - - - - - -
iter(self, - tag=None) - source code - -
- -
-   - - - - - - -
iterfind(self, - path, - namespaces=None) - source code - -
- -
-   - - - - - - -
parse(self, - source, - parser=None) - source code - -
- -
-   - - - - - - -
write(self, - file_or_filename, - encoding=None, - xml_declaration=None, - default_namespace=None, - method=None) - source code - -
- -
-   - - - - - - -
write_c14n(self, - file) - source code - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - element=None, - file=None) -
(Constructor) -

-
source code  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/xml.etree.ElementTree.ParseError-class.html b/doc/html/api/xml.etree.ElementTree.ParseError-class.html deleted file mode 100644 index d12e76c..0000000 --- a/doc/html/api/xml.etree.ElementTree.ParseError-class.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - xml.etree.ElementTree.ParseError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - xml :: - etree :: - ElementTree :: - ParseError :: - Class ParseError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ParseError

source code

-
-              object --+                
-                       |                
-exceptions.BaseException --+            
-                           |            
-        exceptions.Exception --+        
-                               |        
-        exceptions.StandardError --+    
-                                   |    
-              exceptions.SyntaxError --+
-                                       |
-                                      ParseError
-
- -
- - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-

Inherited from exceptions.SyntaxError: - __init__, - __new__, - __str__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.SyntaxError: - filename, - lineno, - msg, - offset, - print_file_and_line, - text -

-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/xml.etree.ElementTree.QName-class.html b/doc/html/api/xml.etree.ElementTree.QName-class.html deleted file mode 100644 index 8677126..0000000 --- a/doc/html/api/xml.etree.ElementTree.QName-class.html +++ /dev/null @@ -1,347 +0,0 @@ - - - - - xml.etree.ElementTree.QName - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - xml :: - etree :: - ElementTree :: - QName :: - Class QName - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class QName

source code

-
-object --+
-         |
-        QName
-
- -
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__cmp__(self, - other) - source code - -
- -
-   - - - - - - -
__hash__(self)
- hash(x)
- source code - -
- -
-   - - - - - - -
__init__(self, - text_or_uri, - tag=None)
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-   - - - - - - -
__str__(self)
- str(x)
- source code - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__hash__(self) -
(Hashing function) -

-
source code  -
- - hash(x) -
-
Overrides: - object.__hash__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

__init__(self, - text_or_uri, - tag=None) -
(Constructor) -

-
source code  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

__str__(self) -
(Informal representation operator) -

-
source code  -
- - str(x) -
-
Overrides: - object.__str__ -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/xml.etree.ElementTree.TreeBuilder-class.html b/doc/html/api/xml.etree.ElementTree.TreeBuilder-class.html deleted file mode 100644 index f3fe31d..0000000 --- a/doc/html/api/xml.etree.ElementTree.TreeBuilder-class.html +++ /dev/null @@ -1,332 +0,0 @@ - - - - - xml.etree.ElementTree.TreeBuilder - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - xml :: - etree :: - ElementTree :: - TreeBuilder :: - Class TreeBuilder - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class TreeBuilder

source code

-
-object --+
-         |
-        TreeBuilder
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - element_factory=None)
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-   - - - - - - -
_flush(self) - source code - -
- -
-   - - - - - - -
close(self) - source code - -
- -
-   - - - - - - -
data(self, - data) - source code - -
- -
-   - - - - - - -
end(self, - tag) - source code - -
- -
-   - - - - - - -
start(self, - tag, - attrs) - source code - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - element_factory=None) -
(Constructor) -

-
source code  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/xml.etree.ElementTree.XMLParser-class.html b/doc/html/api/xml.etree.ElementTree.XMLParser-class.html deleted file mode 100644 index 6b64db7..0000000 --- a/doc/html/api/xml.etree.ElementTree.XMLParser-class.html +++ /dev/null @@ -1,498 +0,0 @@ - - - - - xml.etree.ElementTree.XMLParser - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - xml :: - etree :: - ElementTree :: - XMLParser :: - Class XMLParser - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class XMLParser

source code

-
-object --+
-         |
-        XMLParser
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__doctype(self, - name, - pubid, - system)
- This method of XMLParser is deprecated.
- source code - -
- -
-   - - - - - - -
__init__(self, - html=['sentinel'], - target=None, - encoding=None)
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-   - - - - - - -
_comment(self, - data) - source code - -
- -
-   - - - - - - -
_data(self, - text) - source code - -
- -
-   - - - - - - -
_default(self, - text) - source code - -
- -
-   - - - - - - -
_end(self, - tag) - source code - -
- -
-   - - - - - - -
_fixname(self, - key) - source code - -
- -
-   - - - - - - -
_fixtext(self, - text) - source code - -
- -
-   - - - - - - -
_pi(self, - target, - data) - source code - -
- -
-   - - - - - - -
_raiseerror(self, - value) - source code - -
- -
-   - - - - - - -
_start(self, - tag, - attrib_in) - source code - -
- -
-   - - - - - - -
_start_list(self, - tag, - attrib_in) - source code - -
- -
-   - - - - - - -
close(self) - source code - -
- -
-   - - - - - - -
doctype(self, - name, - pubid, - system)
- This method of XMLParser is deprecated.
- source code - -
- -
-   - - - - - - -
feed(self, - data) - source code - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - html=['sentinel'], - target=None, - encoding=None) -
(Constructor) -

-
source code  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/xml.etree.ElementTree._IterParseIterator-class.html b/doc/html/api/xml.etree.ElementTree._IterParseIterator-class.html deleted file mode 100644 index 347e217..0000000 --- a/doc/html/api/xml.etree.ElementTree._IterParseIterator-class.html +++ /dev/null @@ -1,286 +0,0 @@ - - - - - xml.etree.ElementTree._IterParseIterator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - xml :: - etree :: - ElementTree :: - _IterParseIterator :: - Class _IterParseIterator - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _IterParseIterator

source code

-
-object --+
-         |
-        _IterParseIterator
-
- -
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - source, - events, - parser, - close_source=False)
- x.__init__(...) initializes x; see help(type(x)) for signature
- source code - -
- -
-   - - - - - - -
__iter__(self) - source code - -
- -
-   - - - - - - -
next(self) - source code - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - source, - events, - parser, - close_source=False) -
(Constructor) -

-
source code  -
- - x.__init__(...) initializes x; see help(type(x)) for signature -
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/api/xml.etree.ElementTree._SimpleElementPath-class.html b/doc/html/api/xml.etree.ElementTree._SimpleElementPath-class.html deleted file mode 100644 index 768dc19..0000000 --- a/doc/html/api/xml.etree.ElementTree._SimpleElementPath-class.html +++ /dev/null @@ -1,264 +0,0 @@ - - - - - xml.etree.ElementTree._SimpleElementPath - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - xml :: - etree :: - ElementTree :: - _SimpleElementPath :: - Class _SimpleElementPath - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class _SimpleElementPath

source code

-
-object --+
-         |
-        _SimpleElementPath
-
- -
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
find(self, - element, - tag, - namespaces=None) - source code - -
- -
-   - - - - - - -
findall(self, - element, - tag, - namespaces=None) - source code - -
- -
-   - - - - - - -
findtext(self, - element, - tag, - default=None, - namespaces=None) - source code - -
- -
-   - - - - - - -
iterfind(self, - element, - tag, - namespaces=None) - source code - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __init__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/doc/html/build.html b/doc/html/build.html deleted file mode 100644 index 8eece99..0000000 --- a/doc/html/build.html +++ /dev/null @@ -1,323 +0,0 @@ - - - - - -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 -separate -dev or -devel packages like libxml2-dev, which -you must install before trying to build lxml.

- -
-

Cython

-

The lxml.etree and lxml.objectify modules are written in Cython. -Since we distribute the Cython-generated .c files with lxml releases, -however, you do not need Cython to build lxml from the normal release -sources. We even encourage you to not install Cython for a normal -release build, as the generated C code can vary quite heavily between -Cython versions, which may or may not generate correct code for lxml. -The pre-generated release sources were tested and therefore are known -to work.

-

So, if you want a reliable build of lxml, we suggest to a) use a -source release of lxml and b) disable or uninstall Cython for the -build.

-

Only if you are interested in building lxml from a checkout of the -developer sources (e.g. to test a bug fix that has not been release -yet) or if you want to be an lxml developer, then you do need a -working Cython installation. You can use pip to install it:

-
-pip install -r requirements.txt
-
-

https://github.com/lxml/lxml/blob/master/requirements.txt

-

lxml currently requires at least Cython 0.20, later release versions -should work as well.

-
-
-

Github, git and hg

-

The lxml package is developed in a repository on Github using -Mercurial and the hg-git plugin. You can retrieve the current -developer version using:

-
-hg clone git+ssh://git@github.com/lxml/lxml.git lxml
-
-

Or, using git:

-
-git clone ssh://git@github.com/lxml/lxml.git lxml
-
-

This will create a directory lxml and download the source into it, -including the complete development history. Don't be afraid, the -repository download is fairly quick. You can also browse the -lxml repository through the web or download a ZIP archive with the -latest master branch.

-
-
-

Building the sources

-

Clone the source repository as described above (or download -the source tar-ball and unpack it) and then type:

-
-python setup.py build
-
-

or:

-
-python setup.py bdist_egg     # requires 'setuptools' or 'distribute'
-
-

To (re-)build the C sources with Cython, you must additionally pass the -option --with-cython:

-
-python setup.py build --with-cython
-
-

If you want to test lxml from the source directory, it is better to build it -in-place like this:

-
-python setup.py build_ext -i --with-cython
-
-

or, in Unix-like environments:

-
-make inplace
-
-

To speed up the build in test environments (e.g. on a continuous -integration server), set the CFLAGS environment variable to -disable C compiler optimisations (e.g. "-O0" for gcc, that's -minus-oh-zero), for example:

-
-CFLAGS="-O0"  make inplace
-
-

If you get errors about missing header files (e.g. Python.h or -libxml/xmlversion.h) then you need to make sure the development -packages of Python, libxml2 and libxslt are properly installed. On -Linux distributions, they are usually called something like -libxml2-dev or libxslt-devel. If these packages were -installed in non-standard places, try passing the following option to -setup.py to make sure the right config is found:

-
-python setup.py build --with-xslt-config=/path/to/xslt-config
-
-

There are also env vars to allow overriding the config tool:

-
-env XML2_CONFIG=/path/to/xml2-config python build
-
-

You may also use pkg-config as the tools:

-
-env XSLT_CONFIG="pkg-config libxslt" python setup.py build
-
-

If this doesn't help, you may have to add the location of the header -files to the include path like:

-
-python setup.py build_ext -i  -I /usr/include/libxml2
-
-

where the file is in /usr/include/libxml2/libxml/xmlversion.h

-

To use lxml.etree in-place, you can place lxml's src directory -on your Python module search path (PYTHONPATH) and then import -lxml.etree to play with it:

-
-# cd lxml
-# PYTHONPATH=src python
-Python 2.7.2
-Type "help", "copyright", "credits" or "license" for more information.
->>> from lxml import etree
->>>
-
-

To make sure everything gets recompiled cleanly after changes, you can -run make clean or delete the file src/lxml/etree.c.

-
-
-

Running the tests and reporting errors

-

The source distribution (tgz) and the source repository contain a test -suite for lxml. You can run it from the top-level directory:

-
-python test.py
-
-

Note that the test script only tests the in-place build (see distutils -building above), as it searches the src directory. You can use the -following one-step command to trigger an in-place build and test it:

-
-make test
-
-

This also runs the ElementTree and cElementTree compatibility tests. To call -them separately, make sure you have lxml on your PYTHONPATH first, then run:

-
-python selftest.py
-
-

and:

-
-python selftest2.py
-
-

If the tests give failures, errors, or worse, segmentation faults, we'd really -like to know. Please contact us on the mailing list, and please specify -the version of lxml, libxml2, libxslt and Python you were using, as well as -your operating system type (Linux, Windows, MacOS-X, ...).

-
-
-

Building an egg or wheel

-

This is the procedure to make an lxml egg or wheel for your platform. -It assumes that you have setuptools or distribute installed, as well -as the wheel package.

-

First, download the lxml-x.y.tar.gz release. This contains the pregenerated -C files so that you can be sure you build exactly from the release sources. -Unpack them and cd into the resulting directory. Then, to build a wheel, -simply run the command

-
-python setup.py bdist_wheel
-
-

or, to build a statically linked wheel with all of libxml2, libxslt and -friends compiled in, run

-
-python setup.py bdist_wheel --static-deps
-

The resulting .whl file will be written into the dist directory.

-

To build an egg file, run

-
-python setup.py build_egg
-
-

If you are on a Unix-like platform, you can first build the extension modules -using

-
-python setup.py build
-
-

and then cd into the directory build/lib.your.platform to call -strip on any .so file you find there. This reduces the size of -the binary distribution considerably. Then, from the package root directory, -call

-
-python setup.py bdist_egg
-
-

This will quickly package the pre-built packages into an egg file and -drop it into the dist directory.

-
-
-

Building lxml on MacOS-X

-

Apple regularly ships new system releases with horribly outdated -system libraries. This is specifically the case for libxml2 and -libxslt, where the system provided versions used to be too old -to even build lxml for a long time.

-

While the Unix environment in MacOS-X makes it relatively easy to -install Unix/Linux style package management tools and new software, it -actually seems to be hard to get libraries set up for exclusive usage -that MacOS-X ships in an older version. Alternative distributions -(like macports) install their libraries in addition to the system -libraries, but the compiler and the runtime loader on MacOS still sees -the system libraries before the new libraries. This can lead to -undebuggable crashes where the newer library seems to be loaded but -the older system library is used.

-

Apple discourages static building against libraries, which would help -working around this problem. Apple does not ship static library -binaries with its system and several package management systems follow -this decision. Therefore, building static binaries requires building -the dependencies first. The setup.py script does this -automatically when you call it like this:

-
-python setup.py build --static-deps
-
-

This will download and build the latest versions of libxml2 and -libxslt from the official FTP download site. If you want to use -specific versions, or want to prevent any online access, you can -download both tar.gz release files yourself, place them into a -subdirectory libs in the lxml distribution, and call setup.py -with the desired target versions like this:

-
-python setup.py build --static-deps \
-       --libxml2-version=2.9.1 \
-       --libxslt-version=1.1.28 \
-
-sudo python setup.py install
-
-

Instead of build, you can use any target, like bdist_egg -if you want to use setuptools to build an installable egg, or -bdist_wheel for a wheel package.

-

Note that this also works with pip. Since you can't pass -command line options in this case, you have to use an environment -variable instead:

-
-STATIC_DEPS=true pip install lxml
-
-

To install the package into the system Python package directory, -run the installation with "sudo":

-
-STATIC_DEPS=true sudo pip install lxml
-
-

The STATICBUILD environment variable is handled equivalently to -the STATIC_DEPS variable, but is used by some other extension -packages, too.

-

If you decide to do a non-static build, you may also have to install -the command line tools in addition to the XCode build environment. -They are available as a restricted download from here:

-

https://developer.apple.com/downloads/index.action?=command%20line%20tools#

-

Without them, the compiler may not find the necessary header files of -the XML libraries, according to the second comment in this ticket:

-

https://bugs.launchpad.net/lxml/+bug/1244094

-
-
-

Static linking on Windows

-

Most operating systems have proper package management that makes installing -current versions of libxml2 and libxslt easy. The most famous exception is -Microsoft Windows, which entirely lacks these capabilities. To work around -the limits of this platform, lxml's installation can download pre-built -packages of the dependencies and build statically against them. Assuming -you have a proper C compiler setup to build Python extensions, this should -work:

-
-python setup.py bdist_wininst --static-deps
-
-

It should create a windows installer in the pkg directory.

-
-
-

Building Debian packages from SVN sources

-

Andreas Pakulat proposed the following approach.

-
    -
  • apt-get source lxml
  • -
  • remove the unpacked directory
  • -
  • tar.gz the lxml SVN version and replace the orig.tar.gz that lies in the -directory
  • -
  • check md5sum of created tar.gz file and place new sum and size in dsc file
  • -
  • do dpkg-source -x lxml-[VERSION].dsc and cd into the newly created directory
  • -
  • run dch -i and add a comment like "use trunk version", this will -increase the debian version number so apt/dpkg won't get confused
  • -
  • run dpkg-buildpackage -rfakeroot -us -uc to build the package
  • -
-

In case dpkg-buildpackage tells you that some dependencies are missing, you -can either install them manually or run apt-get build-dep lxml.

-

That will give you .deb packages in the parent directory which can be -installed using dpkg -i.

-
-
- - - \ No newline at end of file diff --git a/doc/html/capi.html b/doc/html/capi.html deleted file mode 100644 index 099e9eb..0000000 --- a/doc/html/capi.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - -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, -without going through the Python API.

-

The API is described in the file etreepublic.pxd, which is directly -c-importable by extension modules implemented in Pyrex or Cython.

- -
-

Passing generated trees through Python

-

This is the most simple way to integrate with lxml. It does not require -any C-level integration but uses a Python function to wrap an externally -generated libxml2 document in lxml.

-

The external module that creates the libxml2 tree must pack the document -pointer into a PyCapsule -object. This can then be passed into lxml with the function -lxml.etree.adopt_external_document(). It also takes an optional lxml -parser instance to associate with the document, in order to configure the -Element class lookup, relative URL lookups, etc.

-

See the API reference -for further details.

-

The same functionality is available as part of the public C-API in form -of the C function adoptExternalDocument().

-
-
-

Writing external modules in Cython

-

This is the easiest way of extending lxml at the C level. A Cython -(or Pyrex) module should start like this:

-
-# My Cython extension
-
-# import the public functions and classes of lxml.etree
-cimport etreepublic as cetree
-
-# import the lxml.etree module in Python
-cdef object etree
-from lxml import etree
-
-# initialize the access to the C-API of lxml.etree
-cetree.import_lxml__etree()
-
-

From this line on, you can access all public functions of lxml.etree -from the cetree namespace like this:

-
-# build a tag name from namespace and element name
-py_tag = cetree.namespacedNameFromNsName("http://some/url", "myelement")
-
-

Public lxml classes are easily subclassed. For example, to implement -and set a new default element class, you can write Cython code like -the following:

-
-from etreepublic cimport ElementBase
-cdef class NewElementClass(ElementBase):
-     def set_value(self, myval):
-         self.set("my_attribute", myval)
-
-etree.set_element_class_lookup(
-     etree.DefaultElementClassLookup(element=NewElementClass))
-
-
-
-

Writing external modules in C

-

If you really feel like it, you can also interface with lxml.etree straight -from C code. All you have to do is include the header file for the public -API, import the lxml.etree module and then call the import function:

-
/* My C extension */
-
-/* common includes */
-#include "Python.h"
-#include "stdio.h"
-#include "string.h"
-#include "stdarg.h"
-#include "libxml/xmlversion.h"
-#include "libxml/encoding.h"
-#include "libxml/hash.h"
-#include "libxml/tree.h"
-#include "libxml/xmlIO.h"
-#include "libxml/xmlsave.h"
-#include "libxml/globals.h"
-#include "libxml/xmlstring.h"
-
-/* lxml.etree specific includes */
-#include "lxml-version.h"
-#include "etree_defs.h"
-#include "etree.h"
-
-/* setup code */
-import_lxml__etree()
-
-

Note that including etree.h does not automatically include the -header files it requires. Note also that the above list of common -includes may not be sufficient.

-
-
- - - \ No newline at end of file diff --git a/doc/html/changes-4.2.5.html b/doc/html/changes-4.2.5.html deleted file mode 100644 index e8a6936..0000000 --- a/doc/html/changes-4.2.5.html +++ /dev/null @@ -1,3410 +0,0 @@ - - - - - - -lxml changelog - - - -
-

lxml changelog

- -
-

4.2.5 (2018-09-09)

-
-

Bugs fixed

-
    -
  • Javascript URLs that used URL escaping were not removed by the HTML cleaner. -Security problem found by Omar Eissa.
  • -
-
-
-
-

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 -Element.insert(). -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 -and the parser participates in a reference cycle. -Original patch by Julien Greard.
  • -
  • GH#265: lxml no longer links against zlib as a shared library, only on static builds. -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 -element if a tag selector is used.
  • -
  • LP#1756314: Failure to import 4.2.0 into PyPy due to a missing library symbol.
  • -
  • LP#1727864, GH#258: Add "-isysroot" linker option on MacOS as needed by XCode 9.
  • -
-
-
-
-

4.2.0 (2018-03-13)

-
-

Features added

-
    -
  • GH#255: SelectElement.value returns more standard-compliant and -browser-like defaults for non-multi-selects. If no option is selected, the -value of the first option is returned (instead of None). If multiple options -are selected, the value of the last one is returned (instead of that of the -first one). If no options are present (not standard-compliant) -SelectElement.value still returns None.
  • -
  • GH#261: The HTMLParser() now supports the huge_tree option. -Patch by stranac.
  • -
-
-
-

Bugs fixed

-
    -
  • LP#1551797: Some XSLT messages were not captured by the transform error log.
  • -
  • LP#1737825: Crash at shutdown after an interrupted iterparse run with XMLSchema -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']".
  • -
  • ElementPath allows spaces in predicates.
  • -
  • Custom Element classes and XPath functions can now be registered with a -decorator rather than explicit dict assignments.
  • -
  • Static Linux wheels are now built with link time optimisation (LTO) enabled. -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 -PythonElementClassLookup could fail with a TypeError.
  • -
-
-
-
-

4.0.0 (2017-09-17)

-
-

Features added

-
    -
  • The ElementPath implementation is now compiled using Cython, -which speeds up the .find*() methods quite significantly.
  • -
  • The modules lxml.builder, lxml.html.diff and lxml.html.clean -are also compiled using Cython in order to speed them up.
  • -
  • xmlfile() supports async coroutines using async with and await.
  • -
  • iterwalk() has a new method skip_subtree() that prevents walking into -the descendants of the current element.
  • -
  • RelaxNG.from_rnc_string() accepts a base_url argument to -allow relative resource lookups.
  • -
  • The XSLT result object has a new method .write_output(file) that serialises -output data into a file according to the <xsl:output> configuration.
  • -
-
-
-

Bugs fixed

-
    -
  • GH#251: HTML comments were handled incorrectly by the soupparser. -Patch by mozbugbox.

    -
  • -
  • LP#1654544: The html5parser no longer passes the useChardet option -if the input is a Unicode string, unless explicitly requested. When parsing -files, the default is to enable it when a URL or file path is passed (because -the file is then opened in binary mode), and to disable it when reading from -a file(-like) object.

    -

    Note: This is a backwards incompatible change of the default configuration. -If your code parses byte strings/streams and depends on character detection, -please pass the option guess_charset=True explicitly, which already worked -in older lxml versions.

    -
  • -
  • LP#1703810: etree.fromstring() failed to parse UTF-32 data with BOM.

    -
  • -
  • LP#1526522: Some RelaxNG errors were not reported in the error log.

    -
  • -
  • LP#1567526: Empty and plain text input raised a TypeError in soupparser.

    -
  • -
  • LP#1710429: Uninitialised variable usage in HTML diff.

    -
  • -
  • LP#1415643: The closing tags context manager in xmlfile() could continue -to output end tags even after writing failed with an exception.

    -
  • -
  • LP#1465357: xmlfile.write() now accepts and ignores None as input argument.

    -
  • -
  • Compilation under Py3.7-pre failed due to a modified function signature.

    -
  • -
-
-
-

Other changes

-
    -
  • The main module source files were renamed from lxml.*.pyx to plain -*.pyx (e.g. etree.pyx) to simplify their handling in the build -process. Care was taken to keep the old header files as fallbacks for -code that compiles against the public C-API of lxml, but it might still -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 -doctype string before the serialisation, in the same way as tostring().
  • -
  • GH#220: xmlfile allows switching output methods at an element level. -Patch by Burak Arslan.
  • -
  • LP#1595781, GH#240: added a PyCapsule Python API and C-level API for -passing externally generated libxml2 documents into lxml.
  • -
  • GH#244: error log entries have a new property path with an XPath -expression (if known, None otherwise) that points to the tree element -responsible for the error. Patch by Bob Kline.
  • -
  • The namespace prefix mapping that can be used in ElementPath now injects -a default namespace when passing a None prefix.
  • -
-
-
-

Bugs fixed

-
    -
  • GH#238: Character escapes were not hex-encoded in the xmlfile serialiser. -Patch by matejcik.
  • -
  • GH#229: fix for externally created XML documents. Patch by Theodore Dubois.
  • -
  • LP#1665241, GH#228: Form data handling in lxml.html no longer strips the -option values specified in form attributes but only the text values. -Patch by Ashish Kulkarni.
  • -
  • LP#1551797: revert previous fix for XSLT error logging as it breaks -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() -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 -multi-threaded XSLT processing.
  • -
  • LP#1673355, GH#233: fromstring() html5parser failed to parse byte strings.
  • -
-
-
-
-

3.7.3 (2017-02-18)

-
-

Bugs fixed

-
    -
  • GH#218 was ineffective in Python 3.
  • -
  • GH#222: lxml.html.submit_form() failed in Python 3. -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 -due to FTP download failures.
  • -
  • GH#219: xmlfile.element() was not properly quoting attribute values. -Patch by Burak Arslan.
  • -
  • GH#218: xmlfile.element() was not properly escaping text content of -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 -baseclass. Patch by Philipp A.
  • -
  • GH#216: HTMLParser() now supports the same collect_ids parameter -as XMLParser(). Patch by Burak Arslan.
  • -
  • GH#210: Allow specifying a serialisation method in xmlfile.write(). -Patch by Burak Arslan.
  • -
  • GH#203: New option default_doctype in HTMLParser that allows -disabling the automatic doctype creation. Patch by Shadab Zafar.
  • -
  • GH#201: Calling the method .set('attrname') without value argument -(or None) on HTML elements creates an attribute without value that -serialises like <div attrname></div>. Patch by Daniel Holth.
  • -
  • GH#197: Ignore form input fields in form_values() when they are -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 -and file name.
  • -
  • zlib is included in the list of statically built libraries.
  • -
-
-
-
-

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 -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). -Patch by Tomas Divis.
  • -
  • GH#198, LP#1568167: Try to provide base URL from Resolver.resolve_string(). -Patch by Michael van Tellingen.
  • -
  • GH#191: More accurate float serialisation in objectify.FloatElement. -Patch by Holger Joukl.
  • -
  • LP#1551797: Repair XSLT error logging. Patch by Marcus Brinkmann.
  • -
-
-
-
-

3.6.0 (2016-03-17)

-
-

Features added

-
    -
  • GH#187: Now supports (only) version 5.x and later of PyPy. -Patch by Armin Rigo.
  • -
  • GH#181: Direct support for .rnc files in RelaxNG() if rnc2rng -is installed. Patch by Dirkjan Ochtman.
  • -
-
-
-

Bugs fixed

-
    -
  • GH#189: Static builds honour FTP proxy configurations when downloading -the external libs. Patch by Youhei Sakurai.
  • -
  • GH#186: Soupparser failed to process entities in Python 3.x. -Patch by Duncan Morris.
  • -
  • GH#185: Rare encoding related TypeError on import was fixed. -Patch by Petr Demin.
  • -
-
-
-
-

3.5.0 (2015-11-13)

-
-

Bugs fixed

-
    -
  • Unicode string results failed XPath queries in PyPy.
  • -
  • LP#1497051: HTML target parser failed to terminate on exceptions -and continued parsing instead.
  • -
  • Deprecated API usage in doctestcompare.
  • -
-
-
-
-

3.5.0b1 (2015-09-18)

-
-

Features added

-
    -
  • cleanup_namespaces() accepts a new argument keep_ns_prefixes -that does not remove definitions of the provided prefix-namespace -mapping from the tree.
  • -
  • cleanup_namespaces() accepts a new argument top_nsmap that -moves definitions of the provided prefix-namespace mapping to the -top of the tree.
  • -
  • LP#1490451: Element objects gained a cssselect() method as -known from lxml.html. Patch by Simon Sapin.
  • -
  • API functions and methods behave and look more like Python functions, -which allows introspection on them etc. One side effect to be aware of -is that the functions now bind as methods when assigned to a class -variable. A quick fix is to wrap them in staticmethod() (as for -normal Python functions).
  • -
  • ISO-Schematron support gained an option error_finder that allows -passing a filter function for picking validation errors from reports.
  • -
  • LP#1243600: Elements in lxml.html gained a classes property -that provides a set-like interface to the class attribute. -Original patch by masklinn.
  • -
  • LP#1341964: The soupparser now handles DOCTYPE declarations, comments -and processing instructions outside of the root element. -Patch by Olli Pottonen.
  • -
  • LP#1421512: The docinfo of a tree was made editable to allow -setting and removing the public ID and system ID of the DOCTYPE. -Patch by Olli Pottonen.
  • -
  • LP#1442427: More work-arounds for quirks and bugs in pypy and pypy3.
  • -
  • lxml.html.soupparser now uses BeautifulSoup version 4 instead -of version 3 if available.
  • -
-
-
-

Bugs fixed

-
    -
  • Memory errors that occur during tree adaptations (e.g. moving subtrees -to foreign documents) could leave the tree in a crash prone state.
  • -
  • Calling process_children() in an XSLT extension element without -an output_parent argument failed with a TypeError. -Fix by Jens Tröger.
  • -
  • GH#162: Image data in HTML data URLs is considered safe and -no longer removed by lxml.html.clean JavaScript cleaner.
  • -
  • GH#166: Static build could link libraries in wrong order.
  • -
  • GH#172: Rely a bit more on libxml2 for encoding detection rather than -rolling our own in some cases. Patch by Olli Pottonen.
  • -
  • GH#159: Validity checks for names and string content were tightened -to detect the use of illegal characters early. Patch by Olli Pottonen.
  • -
  • LP#1421921: Comments/PIs before the DOCTYPE declaration were not -serialised. Patch by Olli Pottonen.
  • -
  • LP#659367: Some HTML DOCTYPE declarations were not serialised. -Patch by Olli Pottonen.
  • -
  • LP#1238503: lxml.doctestcompare is now consistent with stdlib's doctest -in how it uses + and - to refer to unexpected and missing output.
  • -
  • Empty prefixes are explicitly rejected when a namespace mapping is used -with ElementPath to avoid hiding bugs in user code.
  • -
  • Several problems with PyPy were fixed by switching to Cython 0.23.
  • -
-
-
-
-

3.4.4 (2015-04-25)

-
-

Bugs fixed

-
    -
  • An ElementTree compatibility test added in lxml 3.4.3 that failed in -Python 3.4+ was removed again.
  • -
-
-
-
-

3.4.3 (2015-04-15)

-
-

Bugs fixed

-
    -
  • Expression cache in ElementPath was ignored. Fix by Changaco.
  • -
  • LP#1426868: Passing a default namespace and a prefixed namespace mapping -as nsmap into xmlfile.element() raised a TypeError.
  • -
  • LP#1421927: DOCTYPE system URLs were incorrectly quoted when containing -double quotes. Patch by Olli Pottonen.
  • -
  • LP#1419354: meta-redirect URLs were incorrectly processed by -iterlinks() if preceded by whitespace.
  • -
-
-
-
-

3.4.2 (2015-02-07)

-
-

Bugs fixed

-
    -
  • LP#1415907: Crash when creating an XMLSchema from a non-root element -of an XML document.
  • -
  • LP#1369362: HTML cleaning failed when hitting processing instructions -with pseudo-attributes.
  • -
  • CDATA() wrapped content was rejected for tail text.
  • -
  • CDATA sections were not serialised as tail text of the top-level element.
  • -
-
-
-
-

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 -content after each API operation (starting/ending element blocks or writes). -A new method xf.flush() can alternatively be used to explicitly flush -the output.
  • -
  • lxml.html.document_fromstring has a new option ensure_head_body=True -which will add an empty head and/or body element to the result document if -missing.
  • -
  • lxml.html.iterlinks now returns links inside meta refresh tags.
  • -
  • New XMLParser option collect_ids=False to disable ID hash table -creation. This can substantially speed up parsing of documents with many -different IDs that are not used.
  • -
  • The parser uses per-document hash tables for XML IDs. This reduces the -load of the global parser dict and speeds up parsing for documents with -many different IDs.
  • -
  • ElementTree.getelementpath(element) returns a structural ElementPath -expression for the given element, which can be used for lookups later.
  • -
  • xmlfile() accepts a new argument close=True to close file(-like) -objects after writing to them. Before, xmlfile() only closed the file -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. -Previously, they could lead to an internal tree representation in a mixed -encoding state, which lead to very late errors or even silently incorrect -behaviour during tree traversal or serialisation.
  • -
  • Requires Python 2.6, 2.7, 3.2 or later. No longer supports -Python 2.4, 2.5 and 3.1, use lxml 3.3.x for those.
  • -
  • Requires libxml2 2.7.0 or later and libxslt 1.1.23 or later, -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.
  • -
  • LP#1361948: crash when deallocating Element siblings without parent.
  • -
  • LP#1354652: crash when traversing internally loaded documents in XSLT -extension functions.
  • -
-
-
-
-

3.3.5 (2014-04-18)

-
-

Bugs fixed

-
    -
  • HTML cleaning could fail to strip javascript links that mix control -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 -subclassed from Python code.
  • -
-
-
-
-

3.3.2 (2014-02-26)

-
-

Bugs fixed

-
    -
  • The properties resolvers and version, as well as the methods -set_element_class_lookup() and makeelement(), were lost from -iterparse objects in 3.3.0.
  • -
  • LP#1222132: instances of XMLSchema, Schematron and RelaxNG -did not clear their local error_log before running a validation.
  • -
  • LP#1238500: lxml.doctestcompare mixed up "expected" and "actual" in -attribute values.
  • -
  • Some file I/O tests were failing in MS-Windows due to non-portable temp -file usage. Initial patch by Gabi Davar.
  • -
  • LP#910014: duplicate IDs in a document were not reported by DTD validation.
  • -
  • LP#1185332: tostring(method="html") did not use HTML serialisation -semantics for trailing tail text. Initial patch by Sylvain Viollon.
  • -
  • LP#1281139: .attrib value of Comments lost its mutation methods -in 3.3.0. Even though it is empty and immutable, it should still -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 -elements during tag iteration.
  • -
  • LP#1273709: Building in PyPy failed due to missing support for -PyUnicode_Compare() and PyByteArray_*() in PyPy's C-API.
  • -
  • LP#1274413: Compilation in MSVC failed due to missing "stdint.h" standard -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 -could previously lead to exceptions being silently swallowed or not -properly reported.
  • -
  • The C-API function appendChild() is now deprecated as it does not -propagate exceptions (its return type is void). The new function -appendChildToElement() was added as a safe replacement.
  • -
  • Passing a string into fromstringlist() raises an exception instead of -parsing the string character by character.
  • -
-
-
-

Other changes

-
    -
  • Document cleanup code was simplified using the new GC features in -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 -objects was mutable.
  • -
  • Element class lookup wasn't available for the new pull parsers or when using -a custom parser target.
  • -
  • Setting Element attributes on instantiation with both the attrib argument -and keyword arguments could modify the mapping passed as attrib.
  • -
  • LP#1266171: DTDs instantiated from internal/external subsets (i.e. through -the docinfo property) lost their attribute declarations.
  • -
-
-
-

Other changes

-
    -
  • Built with Cython 0.20pre (gitrev 012ae82eb) to prepare support for -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 -PythonElementClassLookup) raises a more appropriate ReferenceError -for illegal access after tree disposal instead of an AssertionError. -This should only impact test code that specifically checks the original -behaviour.
  • -
-
-
-
-

3.3.0beta1 (2013-12-12)

-
-

Features added

-
    -
  • New option handle_failures in make_links_absolute() and -resolve_base_href() (lxml.html) that enables ignoring or -discarding links that fail to parse as URLs.
  • -
  • New parser classes XMLPullParser and HTMLPullParser for -incremental parsing, as implemented for ElementTree in Python 3.4.
  • -
  • iterparse() enables recovery mode by default for HTML parsing -(html=True).
  • -
-
-
-

Bugs fixed

-
    -
  • LP#1255132: crash when trying to run validation over non-Element (e.g. -comment or PI).
  • -
  • Error messages in the log and in exception messages that originated -from libxml2 could accidentally be picked up from preceding warnings -instead of the actual error.
  • -
  • The ElementMaker in lxml.objectify did not accept a dict as -argument for adding attributes to the element it's building. This -works as in lxml.builder now.
  • -
  • LP#1228881: repr(XSLTAccessControl) failed in Python 3.
  • -
  • Raise ValueError when trying to append an Element to itself or -to one of its own descendants, instead of running into an infinite -loop.
  • -
  • LP#1206077: htmldiff discarded whitespace from the output.
  • -
  • Compressed plain-text serialisation to file-like objects was broken.
  • -
  • lxml.html.formfill: Fix textarea form filling. -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 -instantiation. This can speed up some iterparse() scenarios, -for example.
  • -
  • iterparse() was rewritten to use the new *PullParser -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.
  • -
  • Crash in target parsing with attributes.
  • -
  • LP#1255132: crash when trying to run validation over non-Element (e.g. -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.
  • -
  • LP#1228881: repr(XSLTAccessControl) failed in Python 3.
  • -
  • Raise ValueError when trying to append an Element to itself or -to one of its own descendants.
  • -
  • LP#1206077: htmldiff discarded whitespace from the output.
  • -
  • 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 -validated against the type of the XML node they represent to prevent -API class mismatches.
  • -
-
-
-
-

3.2.1 (2013-05-11)

-
-

Features added

-
    -
  • The methods apply_templates() and process_children() of XSLT -extension elements have gained two new boolean options elements_only -and remove_blank_text that discard either all strings or whitespace-only -strings from the result list.
  • -
-
-
-

Bugs fixed

-
    -
  • When moving Elements to another tree, the namespace cleanup mechanism -no longer drops namespace prefixes from attributes for which it finds -a default namespace declaration, to prevent them from appearing as -unnamespaced attributes after serialisation.
  • -
  • Returning non-type objects from a custom class lookup method could lead -to a crash.
  • -
  • Instantiating and using subtypes of Comments and ProcessingInstructions -crashed.
  • -
-
-
-

Other changes

-
-
-
-

3.2.0 (2013-04-28)

-
-

Features added

-
-
-

Bugs fixed

-
    -
  • LP#690319: Leading whitespace could change the behaviour of the string -parsing functions in lxml.html.
  • -
  • LP#599318: The string parsing functions in lxml.html are more robust -in the face of uncommon HTML content like framesets or missing body tags. -Patch by Stefan Seelmann.
  • -
  • LP#712941: I/O errors while trying to access files with paths that contain -non-ASCII characters could raise UnicodeDecodeError instead of properly -reporting the IOError.
  • -
  • LP#673205: Parsing from in-memory strings disabled network access in the -default parser and made subsequent attempts to parse from a URL fail.
  • -
  • LP#971754: lxml.html.clean appends 'nofollow' to 'rel' attributes instead -of overwriting the current value.
  • -
  • LP#715687: lxml.html.clean no longer discards scripts that are explicitly -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 -the sax bridge (i.e. the handler.startElement() method) failed -with a TypeError. Patch by Mike Bayer.
  • -
  • LP#1123074: Fix serialisation error in XSLT output when converting -the result tree to a Unicode string.
  • -
  • GH#105: Replace illegal usage of xmlBufLength() in libxml2 2.9.0 -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 -an AttributeError in Py3.
  • -
  • Illegal memory access during cleanup in incremental xmlfile writer.
  • -
-
-
-

Other changes

-
    -
  • The externally useless class lxml.etree._BaseParser was removed -from the module dict.
  • -
-
-
-
-

3.1.0 (2013-02-10)

-
-

Features added

-
    -
  • GH#89: lxml.html.clean allows overriding the set of attributes that it -considers 'safe'. Patch by Francis Devereux.
  • -
-
-
-

Bugs fixed

-
    -
  • LP#1104370: copy.copy(el.attrib) raised an exception. It now returns -a copy of the attributes as a plain Python dict.
  • -
  • GH#95: When used with namespace prefixes, the el.find*() methods -always used the first namespace mapping that was provided for each -path expression instead of using the one that was actually passed -in for the current run.
  • -
  • LP#1092521, GH#91: Fix undefined C symbol in Python runtimes compiled -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 -makes the API always return Unicode strings for names and text -instead of byte strings for plain ASCII content.
  • -
  • New incremental XML file writing API etree.xmlfile().
  • -
  • E factory in lxml.objectify is callable to simplify the creation of -tags with non-identifier names without having to resort to getattr().
  • -
-
-
-

Bugs fixed

-
    -
  • When starting from a non-namespaced element in lxml.objectify, searching -for a child without explicitly specifying a namespace incorrectly found -namespaced elements with the requested local name, instead of restricting -the search to non-namespaced children.
  • -
  • GH#85: Deprecation warnings were fixed for Python 3.x.
  • -
  • GH#33: lxml.html.fromstring() failed to accept bytes input in Py3.
  • -
  • LP#1080792: Static build of libxml2 2.9.0 failed due to missing file.
  • -
-
-
-

Other changes

-
    -
  • The externally useless class _ObjectifyElementMakerCaller was -removed from the module API of lxml.objectify.
  • -
  • LP#1075622: lxml.builder is faster for adding text to elements with -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 -in PyPy without proper cleanup.
  • -
  • GH#71: Failure to work with libxml2 2.6.x.
  • -
  • 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 -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 -are missing. To use Cython, pass the option "--with-cython". To ignore -the fatal build error when Cython is required but not available (e.g. to -run special setup.py commands that do not actually run a build), pass -"--without-cython".
  • -
-
-
-
-

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.
  • -
-
-
-
-

3.0alpha2 (2012-08-23)

-
-

Features added

-
    -
  • The .iter() method of elements now accepts tag arguments like -"{*}name" to search for elements with a given local name in any -namespace. With this addition, all combinations of wildcards now work -as expected: -"{ns}name", "{}name", "{*}name", "{ns}*", "{}*" -and "{*}*". Note that "name" is equivalent to "{}name", -but "*" is "{*}*". -The same change applies to the .getiterator(), .itersiblings(), -.iterancestors(), .iterdescendants(), .iterchildren() -and .itertext() methods;the strip_attributes(), -strip_elements() and strip_tags() functions as well as the -iterparse() class. Patch by Simon Sapin.
  • -
  • C14N allows specifying the inclusive prefixes to be promoted -to top-level during exclusive serialisation.
  • -
-
-
-

Bugs fixed

-
    -
  • Passing long Unicode strings into the feed() parser interface -failed to read the entire string.
  • -
-
-
-

Other changes

-
-
-
-

3.0alpha1 (2012-07-31)

-
-

Features added

-
    -
  • Initial support for building in PyPy (through cpyext).
  • -
  • DTD objects gained an API that allows read access to their -declarations.
  • -
  • xpathgrep.py gained support for parsing line-by-line (e.g. -from grep output) and for surrounding the output with a new root -tag.
  • -
  • E-factory in lxml.builder accepts subtypes of known data -types (such as string subtypes) when building elements around them.
  • -
  • Tree iteration and iterparse() with a selective tag -argument supports passing a set of tags. Tree nodes will be -returned by the iterators if they match any of the tags.
  • -
-
-
-

Bugs fixed

-
    -
  • The .find*() methods in lxml.objectify no longer use XPath -internally, which makes them faster in many cases (especially when -short circuiting after a single or couple of elements) and fixes -some behavioural differences compared to lxml.etree. Note that -this means that they no longer support arbitrary XPath expressions -but only the subset that the ElementPath language supports. -The previous implementation was also redundant with the normal -XPath support, which can be used as a replacement.
  • -
  • el.find('*') could accidentally return a comment or processing -instruction that happened to be in the wrong spot. (Same for the -other .find*() methods.)
  • -
  • The error logging is less intrusive and avoids a global setup where -possible.
  • -
  • Fixed undefined names in html5lib parser.
  • -
  • xpathgrep.py did not work in Python 3.
  • -
  • Element.attrib.update() did not accept an attrib of -another Element as parameter.
  • -
  • For subtypes of ElementBase that make the .text or .tail -properties immutable (as in objectify, for example), inserting text -when creating Elements through the E-Factory feature of the class -constructor would fail with an exception, stating that the text -cannot be modified.
  • -
-
-
-

Other changes

-
    -
  • The code base was overhauled to properly use 'const' where the API -of libxml2 and libxslt requests it. This also has an impact on the -public C-API of lxml itself, as defined in etreepublic.pxd, as -well as the provided declarations in the lxml/includes/ directory. -Code that uses these declarations may have to be adapted. On the -plus side, this fixes several C compiler warnings, also for user -code, thus making it easier to spot real problems again.
  • -
  • The functionality of "lxml.cssselect" was moved into a separate PyPI -package called "cssselect". To continue using it, you must install -that package separately. The "lxml.cssselect" module is still -available and provides the same interface, provided the "cssselect" -package can be imported at runtime.
  • -
  • Element attributes passed in as an attrib dict or as keyword -arguments are now sorted by (namespaced) name before being created -to make their order predictable for serialisation and iteration. -Note that adding or deleting attributes afterwards does not take -that order into account, i.e. setting a new attribute appends it -after the existing ones.
  • -
  • Several classes that are for internal use only were removed -from the lxml.etree module dict: -_InputDocument, _ResolverRegistry, _ResolverContext, _BaseContext, -_ExsltRegExp, _IterparseContext, _TempStore, _ExceptionContext, -__ContentOnlyElement, _AttribIterator, _NamespaceRegistry, -_ClassNamespaceRegistry, _FunctionNamespaceRegistry, -_XPathFunctionNamespaceRegistry, _ParserDictionaryContext, -_FileReaderContext, _ParserContext, _PythonSaxParserTarget, -_TargetParserContext, _ReadOnlyProxy, _ReadOnlyPIProxy, -_ReadOnlyEntityProxy, _ReadOnlyElementProxy, _OpaqueNodeWrapper, -_OpaqueDocumentWrapper, _ModifyContentOnlyProxy, -_ModifyContentOnlyPIProxy, _ModifyContentOnlyEntityProxy, -_AppendOnlyElementProxy, _SaxParserContext, _FilelikeWriter, -_ParserSchemaValidationContext, _XPathContext, -_XSLTResolverContext, _XSLTContext, _XSLTQuotedStringParam
  • -
  • Several internal classes can no longer be inherited from: -_InputDocument, _ResolverRegistry, _ExsltRegExp, _ElementUnicodeResult, -_IterparseContext, _TempStore, _AttribIterator, _ClassNamespaceRegistry, -_XPathFunctionNamespaceRegistry, _ParserDictionaryContext, -_FileReaderContext, _PythonSaxParserTarget, _TargetParserContext, -_ReadOnlyPIProxy, _ReadOnlyEntityProxy, _OpaqueDocumentWrapper, -_ModifyContentOnlyPIProxy, _ModifyContentOnlyEntityProxy, -_AppendOnlyElementProxy, _FilelikeWriter, _ParserSchemaValidationContext, -_XPathContext, _XSLTResolverContext, _XSLTContext, _XSLTQuotedStringParam, -_XSLTResultTree, _XSLTProcessingInstruction
  • -
-
-
-
-

2.3.6 (2012-09-28)

-
-

Features added

-
-
-

Bugs fixed

-
    -
  • Passing long Unicode strings into the feed() parser interface -failed to read the entire string.
  • -
-
-
-

Other changes

-
-
-
-

2.3.5 (2012-07-31)

-
-

Features added

-
-
-

Bugs fixed

-
    -
  • Crash when merging text nodes in element.remove().
  • -
  • Crash in sax/target parser when reporting empty doctype.
  • -
-
-
-

Other changes

-
-
-
-

2.3.4 (2012-03-26)

-
-

Features added

-
-
-

Bugs fixed

-
    -
  • Crash when building an nsmap (Element property) with empty -namespace URIs.
  • -
  • Crash due to race condition when errors (or user messages) occur -during threaded XSLT processing.
  • -
  • XSLT stylesheet compilation could ignore compilation errors.
  • -
-
-
-

Other changes

-
-
-
-

2.3.3 (2012-01-04)

-
-

Features added

-
    -
  • lxml.html.tostring() gained new serialisation options -with_tail and doctype.
  • -
-
-
-

Bugs fixed

-
    -
  • Fixed a crash when using iterparse() for HTML parsing and -requesting start events.
  • -
  • Fixed parsing of more selectors in cssselect. Whitespace before -pseudo-elements and pseudo-classes is significant as it is a -descendant combinator. -"E :pseudo" should parse the same as "E *:pseudo", not "E:pseudo". -Patch by Simon Sapin.
  • -
  • lxml.html.diff no longer raises an exception when hitting -'img' tags without 'src' attribute.
  • -
-
-
-

Other changes

-
-
-
-

2.3.2 (2011-11-11)

-
-

Features added

-
    -
  • lxml.objectify.deannotate() has a new boolean option -cleanup_namespaces to remove the objectify namespace -declarations (and generally clean up the namespace declarations) -after removing the type annotations.
  • -
  • lxml.objectify gained its own SubElement() function as a -copy of etree.SubElement to avoid an otherwise redundant import -of lxml.etree on the user side.
  • -
-
-
-

Bugs fixed

-
    -
  • Fixed the "descendant" bug in cssselect a second time (after a first -fix in lxml 2.3.1). The previous change resulted in a serious -performance regression for the XPath based evaluation of the -translated expression. Note that this breaks the usage of some of -the generated XPath expressions as XSLT location paths that -previously worked in 2.3.1.
  • -
  • Fixed parsing of some selectors in cssselect. Whitespace after combinators -">", "+" and "~" is now correctly ignored. Previously it was parsed as -a descendant combinator. For example, "div> .foo" was parsed the same as -"div>* .foo" instead of "div>.foo". Patch by Simon Sapin.
  • -
-
-
-

Other changes

-
-
-
-

2.3.1 (2011-09-25)

-
-

Features added

-
    -
  • New option kill_tags in lxml.html.clean to remove specific -tags and their content (i.e. their whole subtree).
  • -
  • pi.get() and pi.attrib on processing instructions to parse -pseudo-attributes from the text content of processing instructions.
  • -
  • lxml.get_include() returns a list of include paths that can be -used to compile external C code against lxml.etree. This is -specifically required for statically linked lxml builds when code -needs to compile against the exact same header file versions as lxml -itself.
  • -
  • Resolver.resolve_file() takes an additional option -close_file that configures if the file(-like) object will be -closed after reading or not. By default, the file will be closed, -as the user is not expected to keep a reference to it.
  • -
-
-
-

Bugs fixed

-
    -
  • HTML cleaning didn't remove 'data:' links.
  • -
  • The html5lib parser integration now uses the 'official' -implementation in html5lib itself, which makes it work with newer -releases of the library.
  • -
  • In lxml.sax, endElementNS() could incorrectly reject a plain -tag name when the corresponding start event inferred the same plain -tag name to be in the default namespace.
  • -
  • When an open file-like object is passed into parse() or -iterparse(), the parser will no longer close it after use. This -reverts a change in lxml 2.3 where all files would be closed. It is -the users responsibility to properly close the file(-like) object, -also in error cases.
  • -
  • Assertion error in lxml.html.cleaner when discarding top-level elements.
  • -
  • In lxml.cssselect, use the xpath 'A//B' (short for -'A/descendant-or-self::node()/B') instead of 'A/descendant::B' for -the css descendant selector ('A B'). This makes a few edge cases -like "div *:last-child" consistent with the selector behavior in -WebKit and Firefox, and makes more css expressions valid location -paths (for use in xsl:template match).
  • -
  • In lxml.html, non-selected <option> tags no longer show up in the -collected form values.
  • -
  • Adding/removing <option> values to/from a multiple select form -field properly selects them and unselects them.
  • -
-
-
-

Other changes

-
    -
  • Static builds can specify the download directory with the ---download-dir option.
  • -
-
-
-
-

2.3 (2011-02-06)

-
-

Features added

-
    -
  • When looking for children, lxml.objectify takes '{}tag' as -meaning an empty namespace, as opposed to the parent namespace.
  • -
-
-
-

Bugs fixed

-
    -
  • When finished reading from a file-like object, the parser -immediately calls its .close() method.
  • -
  • When finished parsing, iterparse() immediately closes the input -file.
  • -
  • Work-around for libxml2 bug that can leave the HTML parser in a -non-functional state after parsing a severely broken document (fixed -in libxml2 2.7.8).
  • -
  • marque tag in HTML cleanup code is correctly named marquee.
  • -
-
-
-

Other changes

-
    -
  • Some public functions in the Cython-level C-API have more explicit -return types.
  • -
-
-
-
-

2.3beta1 (2010-09-06)

-
-

Features added

-
-
-

Bugs fixed

-
    -
  • Crash in newer libxml2 versions when moving elements between -documents that had attributes on replaced XInclude nodes.
  • -
  • XMLID() function was missing the optional parser and -base_url parameters.
  • -
  • Searching for wildcard tags in iterparse() was broken in Py3.
  • -
  • lxml.html.open_in_browser() didn't work in Python 3 due to the -use of os.tempnam. It now takes an optional 'encoding' parameter.
  • -
-
-
-

Other changes

-
-
-
-

2.3alpha2 (2010-07-24)

-
-

Features added

-
-
-

Bugs fixed

-
    -
  • Crash in XSLT when generating text-only result documents with a -stylesheet created in a different thread.
  • -
-
-
-

Other changes

-
    -
  • repr() of Element objects shows the hex ID with leading 0x -(following ElementTree 1.3).
  • -
-
-
-
-

2.3alpha1 (2010-06-19)

-
-

Features added

-
    -
  • Keyword argument namespaces in lxml.cssselect.CSSSelector() -to pass a prefix-to-namespace mapping for the selector.
  • -
  • New function lxml.etree.register_namespace(prefix, uri) that -globally registers a namespace prefix for a namespace that newly -created Elements in that namespace will use automatically. Follows -ElementTree 1.3.
  • -
  • Support 'unicode' string name as encoding parameter in -tostring(), following ElementTree 1.3.
  • -
  • Support 'c14n' serialisation method in ElementTree.write() and -tostring(), following ElementTree 1.3.
  • -
  • The ElementPath expression syntax (el.find*()) was extended to -match the upcoming ElementTree 1.3 that will ship in the standard -library of Python 3.2/2.7. This includes extended support for -predicates as well as namespace prefixes (as known from XPath).
  • -
  • During regular XPath evaluation, various ESXLT functions are -available within their namespace when using libxslt 1.1.26 or later.
  • -
  • Support passing a readily configured logger instance into -PyErrorLog, instead of a logger name.
  • -
  • On serialisation, the new doctype parameter can be used to -override the DOCTYPE (internal subset) of the document.
  • -
  • New parameter output_parent to XSLTExtension.apply_templates() -to append the resulting content directly to an output element.
  • -
  • XSLTExtension.process_children() to process the content of the -XSLT extension element itself.
  • -
  • ISO-Schematron support based on the de-facto Schematron reference -'skeleton implementation'.
  • -
  • XSLT objects now take XPath object as __call__ stylesheet -parameters.
  • -
  • Enable path caching in ElementPath (el.find*()) to avoid parsing -overhead.
  • -
  • Setting the value of a namespaced attribute always uses a prefixed -namespace instead of the default namespace even if both declare the -same namespace URI. This avoids serialisation problems when an -attribute from a default namespace is set on an element from a -different namespace.
  • -
  • XSLT extension elements: support for XSLT context nodes other than -elements: document root, comments, processing instructions.
  • -
  • Support for strings (in addition to Elements) in node-sets returned -by extension functions.
  • -
  • Forms that lack an action attribute default to the base URL of -the document on submit.
  • -
  • XPath attribute result strings have an attrname property.
  • -
  • Namespace URIs get validated against RFC 3986 at the API level -(required by the XML namespace specification).
  • -
  • Target parsers show their target object in the .target property -(compatible with ElementTree).
  • -
-
-
-

Bugs fixed

-
    -
  • API is hardened against invalid proxy instances to prevent crashes -due to incorrectly instantiated Element instances.
  • -
  • Prevent crash when instantiating CommentBase and friends.
  • -
  • Export ElementTree compatible XML parser class as -XMLTreeBuilder, as it is called in ET 1.2.
  • -
  • ObjectifiedDataElements in lxml.objectify were not hashable. They -now use the hash value of the underlying Python value (string, -number, etc.) to which they compare equal.
  • -
  • Parsing broken fragments in lxml.html could fail if the fragment -contained an orphaned closing '</div>' tag.
  • -
  • Using XSLT extension elements around the root of the output document -crashed.
  • -
  • lxml.cssselect did not distinguish between x[attr="val"] and -x [attr="val"] (with a space). The latter now matches the -attribute independent of the element.
  • -
  • Rewriting multiple links inside of HTML text content could end up -replacing unrelated content as replacements could impact the -reported position of subsequent matches. Modifications are now -simplified by letting the iterlinks() generator in lxml.html -return links in reversed order if they appear inside the same text -node. Thus, replacements and link-internal modifications no longer -change the position of links reported afterwards.
  • -
  • The .value attribute of textarea elements in lxml.html did -not represent the complete raw value (including child tags etc.). It -now serialises the complete content on read and replaces the -complete content by a string on write.
  • -
  • Target parser didn't call .close() on the target object if -parsing failed. Now it is guaranteed that .close() will be -called after parsing, regardless of the outcome.
  • -
-
-
-

Other changes

-
    -
  • Official support for Python 3.1.2 and later.
  • -
  • Static MS Windows builds can now download their dependencies -themselves.
  • -
  • Element.attrib no longer uses a cyclic reference back to its -Element object. It therefore no longer requires the garbage -collector to clean up.
  • -
  • Static builds include libiconv, in addition to libxml2 and libxslt.
  • -
-
-
-
-

2.2.8 (2010-09-02)

-
-

Bugs fixed

-
    -
  • Crash in newer libxml2 versions when moving elements between -documents that had attributes on replaced XInclude nodes.
  • -
  • Import fix for urljoin in Python 3.1+.
  • -
-
-
-
-

2.2.7 (2010-07-24)

-
-

Bugs fixed

-
    -
  • Crash in XSLT when generating text-only result documents with a -stylesheet created in a different thread.
  • -
-
-
-
-

2.2.6 (2010-03-02)

-
-

Bugs fixed

-
    -
  • Fixed several Python 3 regressions by building with Cython 0.11.3.
  • -
-
-
-
-

2.2.5 (2010-02-28)

-
-

Features added

-
    -
  • Support for running XSLT extension elements on the input root node -(e.g. in a template matching on "/").
  • -
-
-
-

Bugs fixed

-
    -
  • Crash in XPath evaluation when reading smart strings from a document -other than the original context document.
  • -
  • Support recent versions of html5lib by not requiring its -XHTMLParser in htmlparser.py anymore.
  • -
  • Manually instantiating the custom element classes in -lxml.objectify could crash.
  • -
  • Invalid XML text characters were not rejected by the API when they -appeared in unicode strings directly after non-ASCII characters.
  • -
  • lxml.html.open_http_urllib() did not work in Python 3.
  • -
  • The functions strip_tags() and strip_elements() in -lxml.etree did not remove all occurrences of a tag in all cases.
  • -
  • Crash in XSLT extension elements when the XSLT context node is not -an element.
  • -
-
-
-
-

2.2.4 (2009-11-11)

-
-

Bugs fixed

-
    -
  • Static build of libxml2/libxslt was broken.
  • -
-
-
-
-

2.2.3 (2009-10-30)

-
-

Features added

-
-
-

Bugs fixed

-
    -
  • The resolve_entities option did not work in the incremental feed -parser.
  • -
  • Looking up and deleting attributes without a namespace could hit a -namespaced attribute of the same name instead.
  • -
  • Late errors during calls to SubElement() (e.g. attribute related -ones) could leave a partially initialised element in the tree.
  • -
  • Modifying trees that contain parsed entity references could result -in an infinite loop.
  • -
  • ObjectifiedElement.__setattr__ created an empty-string child element when the -attribute value was rejected as a non-unicode/non-ascii string
  • -
  • Syntax errors in lxml.cssselect could result in misleading error -messages.
  • -
  • Invalid syntax in CSS expressions could lead to an infinite loop in -the parser of lxml.cssselect.
  • -
  • CSS special character escapes were not properly handled in -lxml.cssselect.
  • -
  • CSS Unicode escapes were not properly decoded in lxml.cssselect.
  • -
  • Select options in HTML forms that had no explicit value -attribute were not handled correctly. The HTML standard dictates -that their value is defined by their text content. This is now -supported by lxml.html.
  • -
  • XPath raised a TypeError when finding CDATA sections. This is now -fully supported.
  • -
  • Calling help(lxml.objectify) didn't work at the prompt.
  • -
  • The ElementMaker in lxml.objectify no longer defines the default -namespaces when annotation is disabled.
  • -
  • Feed parser failed to honour the 'recover' option on parse errors.
  • -
  • Diverting the error logging to Python's logging system was broken.
  • -
-
-
-

Other changes

-
-
-
-

2.2.2 (2009-06-21)

-
-

Features added

-
    -
  • New helper functions strip_attributes(), strip_elements(), -strip_tags() in lxml.etree to remove attributes/subtrees/tags -from a subtree.
  • -
-
-
-

Bugs fixed

-
    -
  • Namespace cleanup on subtree insertions could result in missing -namespace declarations (and potentially crashes) if the element -defining a namespace was deleted and the namespace was not used by -the top element of the inserted subtree but only in deeper subtrees.
  • -
  • Raising an exception from a parser target callback didn't always -terminate the parser.
  • -
  • Only {true, false, 1, 0} are accepted as the lexical representation for -BoolElement ({True, False, T, F, t, f} not any more), restoring lxml <= 2.0 -behaviour.
  • -
-
-
-

Other changes

-
-
-
-

2.2.1 (2009-06-02)

-
-

Features added

-
    -
  • Injecting default attributes into a document during XML Schema -validation (also at parse time).
  • -
  • Pass huge_tree parser option to disable parser security -restrictions imposed by libxml2 2.7.
  • -
-
-
-

Bugs fixed

-
    -
  • The script for statically building libxml2 and libxslt didn't work -in Py3.
  • -
  • XMLSchema() also passes invalid schema documents on to libxml2 -for parsing (which could lead to a crash before release 2.6.24).
  • -
-
-
-

Other changes

-
-
-
-

2.2 (2009-03-21)

-
-

Features added

-
    -
  • Support for standalone flag in XML declaration through -tree.docinfo.standalone and by passing standalone=True/False -on serialisation.
  • -
-
-
-

Bugs fixed

-
    -
  • Crash when parsing an XML Schema with external imports from a -filename.
  • -
-
-
-
-

2.2beta4 (2009-02-27)

-
-

Features added

-
    -
  • Support strings and instantiable Element classes as child arguments -to the constructor of custom Element classes.
  • -
  • GZip compression support for serialisation to files and file-like -objects.
  • -
-
-
-

Bugs fixed

-
    -
  • Deep-copying an ElementTree copied neither its sibling PIs and -comments nor its internal/external DTD subsets.
  • -
  • Soupparser failed on broken attributes without values.
  • -
  • Crash in XSLT when overwriting an already defined attribute using -xsl:attribute.
  • -
  • Crash bug in exception handling code under Python 3. This was due -to a problem in Cython, not lxml itself.
  • -
  • lxml.html.FormElement._name() failed for non top-level forms.
  • -
  • TAG special attribute in constructor of custom Element classes -was evaluated incorrectly.
  • -
-
-
-

Other changes

-
    -
  • Official support for Python 3.0.1.
  • -
  • Element.findtext() now returns an empty string instead of None -for Elements without text content.
  • -
-
-
-
-

2.2beta3 (2009-02-17)

-
-

Features added

-
    -
  • XSLT.strparam() class method to wrap quoted string parameters -that require escaping.
  • -
-
-
-

Bugs fixed

-
    -
  • Memory leak in XPath evaluators.
  • -
  • Crash when parsing indented XML in one thread and merging it with -other documents parsed in another thread.
  • -
  • Setting the base attribute in lxml.objectify from a unicode -string failed.
  • -
  • Fixes following changes in Python 3.0.1.
  • -
  • Minor fixes for Python 3.
  • -
-
-
-

Other changes

-
    -
  • The global error log (which is copied into the exception log) is now -local to a thread, which fixes some race conditions.
  • -
  • More robust error handling on serialisation.
  • -
-
-
-
-

2.2beta2 (2009-01-25)

-
-

Bugs fixed

-
    -
  • Potential memory leak on exception handling. This was due to a -problem in Cython, not lxml itself.
  • -
  • iter_links (and related link-rewriting functions) in -lxml.html would interpret CSS like url("link") incorrectly -(treating the quotation marks as part of the link).
  • -
  • Failing import on systems that have an io module.
  • -
-
-
-
-

2.1.5 (2009-01-06)

-
-

Bugs fixed

-
    -
  • Potential memory leak on exception handling. This was due to a -problem in Cython, not lxml itself.
  • -
  • Failing import on systems that have an io module.
  • -
-
-
-
-

2.2beta1 (2008-12-12)

-
-

Features added

-
    -
  • Allow lxml.html.diff.htmldiff to accept Element objects, not -just HTML strings.
  • -
-
-
-

Bugs fixed

-
    -
  • Crash when using an XPath evaluator in multiple threads.
  • -
  • Fixed missing whitespace before Link:... in lxml.html.diff.
  • -
-
-
-

Other changes

-
    -
  • Export lxml.html.parse.
  • -
-
-
-
-

2.1.4 (2008-12-12)

-
-

Bugs fixed

-
    -
  • Crash when using an XPath evaluator in multiple threads.
  • -
-
-
-
-

2.0.11 (2008-12-12)

-
-

Bugs fixed

-
    -
  • Crash when using an XPath evaluator in multiple threads.
  • -
-
-
-
-

2.2alpha1 (2008-11-23)

-
-

Features added

-
    -
  • Support for XSLT result tree fragments in XPath/XSLT extension -functions.
  • -
  • QName objects have new properties namespace and localname.
  • -
  • New options for exclusive C14N and C14N without comments.
  • -
  • Instantiating a custom Element classes creates a new Element.
  • -
-
-
-

Bugs fixed

-
    -
  • XSLT didn't inherit the parse options of the input document.
  • -
  • 0-bytes could slip through the API when used inside of Unicode -strings.
  • -
  • With lxml.html.clean.autolink, links with balanced parenthesis, -that end in a parenthesis, will be linked in their entirety (typical -with Wikipedia links).
  • -
-
-
-

Other changes

-
-
-
-

2.1.3 (2008-11-17)

-
-

Features added

-
-
-

Bugs fixed

-
    -
  • Ref-count leaks when lxml enters a try-except statement while an -outside exception lives in sys.exc_*(). This was due to a problem in -Cython, not lxml itself.
  • -
  • Parser Unicode decoding errors could get swallowed by other -exceptions.
  • -
  • Name/import errors in some Python modules.
  • -
  • Internal DTD subsets that did not specify a system or public ID were -not serialised and did not appear in the docinfo property of -ElementTrees.
  • -
  • Fix a pre-Py3k warning when parsing from a gzip file in Py2.6.
  • -
  • Test suite fixes for libxml2 2.7.
  • -
  • Resolver.resolve_string() did not work for non-ASCII byte strings.
  • -
  • Resolver.resolve_file() was broken.
  • -
  • Overriding the parser encoding didn't work for many encodings.
  • -
-
-
-

Other changes

-
-
-
-

2.0.10 (2008-11-17)

-
-

Bugs fixed

-
    -
  • Ref-count leaks when lxml enters a try-except statement while an -outside exception lives in sys.exc_*(). This was due to a problem in -Cython, not lxml itself.
  • -
-
-
-
-

2.1.2 (2008-09-05)

-
-

Features added

-
    -
  • lxml.etree now tries to find the absolute path name of files when -parsing from a file-like object. This helps custom resolvers when -resolving relative URLs, as lixbml2 can prepend them with the path -of the source document.
  • -
-
-
-

Bugs fixed

-
    -
  • Memory problem when passing documents between threads.
  • -
  • Target parser did not honour the recover option and raised an -exception instead of calling .close() on the target.
  • -
-
-
-

Other changes

-
-
-
-

2.0.9 (2008-09-05)

-
-

Bugs fixed

-
    -
  • Memory problem when passing documents between threads.
  • -
  • Target parser did not honour the recover option and raised an -exception instead of calling .close() on the target.
  • -
-
-
-
-

2.1.1 (2008-07-24)

-
-

Features added

-
-
-

Bugs fixed

-
    -
  • Crash when parsing XSLT stylesheets in a thread and using them in -another.
  • -
  • Encoding problem when including text with ElementInclude under -Python 3.
  • -
-
-
-

Other changes

-
-
-
-

2.0.8 (2008-07-24)

-
-

Features added

-
    -
  • lxml.html.rewrite_links() strips links to work around documents -with whitespace in URL attributes.
  • -
-
-
-

Bugs fixed

-
    -
  • Crash when parsing XSLT stylesheets in a thread and using them in -another.
  • -
  • CSS selector parser dropped remaining expression after a function -with parameters.
  • -
-
-
-

Other changes

-
-
-
-

2.1 (2008-07-09)

-
-

Features added

-
    -
  • Smart strings can be switched off in XPath (smart_strings -keyword option).
  • -
  • lxml.html.rewrite_links() strips links to work around documents -with whitespace in URL attributes.
  • -
-
-
-

Bugs fixed

-
    -
  • Custom resolvers were not used for XMLSchema includes/imports and -XInclude processing.
  • -
  • CSS selector parser dropped remaining expression after a function -with parameters.
  • -
-
-
-

Other changes

-
    -
  • objectify.enableRecursiveStr() was removed, use -objectify.enable_recursive_str() instead
  • -
  • Speed-up when running XSLTs on documents from other threads
  • -
-
-
-
-

2.0.7 (2008-06-20)

-
-

Features added

-
    -
  • Pickling ElementTree objects in lxml.objectify.
  • -
-
-
-

Bugs fixed

-
    -
  • Descending dot-separated classes in CSS selectors were not resolved -correctly.
  • -
  • ElementTree.parse() didn't handle target parser result.
  • -
  • Potential threading problem in XInclude.
  • -
  • Crash in Element class lookup classes when the __init__() method of -the super class is not called from Python subclasses.
  • -
-
-
-

Other changes

-
    -
  • Non-ASCII characters in attribute values are no longer escaped on -serialisation.
  • -
-
-
-
-

2.1beta3 (2008-06-19)

-
-

Features added

-
    -
  • Major overhaul of tools/xpathgrep.py script.
  • -
  • Pickling ElementTree objects in lxml.objectify.
  • -
  • Support for parsing from file-like objects that return unicode -strings.
  • -
  • New function etree.cleanup_namespaces(el) that removes unused -namespace declarations from a (sub)tree (experimental).
  • -
  • XSLT results support the buffer protocol in Python 3.
  • -
  • Polymorphic functions in lxml.html that accept either a tree or -a parsable string will return either a UTF-8 encoded byte string, a -unicode string or a tree, based on the type of the input. -Previously, the result was always a byte string or a tree.
  • -
  • Support for Python 2.6 and 3.0 beta.
  • -
  • File name handling now uses a heuristic to convert between byte -strings (usually filenames) and unicode strings (usually URLs).
  • -
  • Parsing from a plain file object frees the GIL under Python 2.x.
  • -
  • Running iterparse() on a plain file (or filename) frees the GIL -on reading under Python 2.x.
  • -
  • Conversion functions html_to_xhtml() and xhtml_to_html() in -lxml.html (experimental).
  • -
  • Most features in lxml.html work for XHTML namespaced tag names -(experimental).
  • -
-
-
-

Bugs fixed

-
    -
  • ElementTree.parse() didn't handle target parser result.
  • -
  • Crash in Element class lookup classes when the __init__() method of -the super class is not called from Python subclasses.
  • -
  • A number of problems related to unicode/byte string conversion of -filenames and error messages were fixed.
  • -
  • Building on MacOS-X now passes the "flat_namespace" option to the C -compiler, which reportedly prevents build quirks and crashes on this -platform.
  • -
  • Windows build was broken.
  • -
  • Rare crash when serialising to a file object with certain encodings.
  • -
-
-
-

Other changes

-
    -
  • Non-ASCII characters in attribute values are no longer escaped on -serialisation.
  • -
  • Passing non-ASCII byte strings or invalid unicode strings as .tag, -namespaces, etc. will result in a ValueError instead of an -AssertionError (just like the tag well-formedness check).
  • -
  • Up to several times faster attribute access (i.e. tree traversal) in -lxml.objectify.
  • -
-
-
-
-

2.0.6 (2008-05-31)

-
-

Features added

-
-
-

Bugs fixed

-
    -
  • Incorrect evaluation of el.find("tag[child]").
  • -
  • Windows build was broken.
  • -
  • Moving a subtree from a document created in one thread into a -document of another thread could crash when the rest of the source -document is deleted while the subtree is still in use.
  • -
  • Rare crash when serialising to a file object with certain encodings.
  • -
-
-
-

Other changes

-
    -
  • lxml should now build without problems on MacOS-X.
  • -
-
-
-
-

2.1beta2 (2008-05-02)

-
-

Features added

-
    -
  • All parse functions in lxml.html take a parser keyword argument.
  • -
  • lxml.html has a new parser class XHTMLParser and a module -attribute xhtml_parser that provide XML parsers that are -pre-configured for the lxml.html package.
  • -
-
-
-

Bugs fixed

-
    -
  • Moving a subtree from a document created in one thread into a -document of another thread could crash when the rest of the source -document is deleted while the subtree is still in use.
  • -
  • Passing an nsmap when creating an Element will no longer strip -redundantly defined namespace URIs. This prevented the definition -of more than one prefix for a namespace on the same Element.
  • -
-
-
-

Other changes

-
    -
  • If the default namespace is redundantly defined with a prefix on the -same Element, the prefix will now be preferred for subelements and -attributes. This allows users to work around a problem in libxml2 -where attributes from the default namespace could serialise without -a prefix even when they appear on an Element with a different -namespace (i.e. they would end up in the wrong namespace).
  • -
-
-
-
-

2.0.5 (2008-05-01)

-
-

Features added

-
-
-

Bugs fixed

-
    -
  • Resolving to a filename in custom resolvers didn't work.
  • -
  • lxml did not honour libxslt's second error state "STOPPED", which -let some XSLT errors pass silently.
  • -
  • Memory leak in Schematron with libxml2 >= 2.6.31.
  • -
-
-
-

Other changes

-
-
-
-

2.1beta1 (2008-04-15)

-
-

Features added

-
    -
  • Error logging in Schematron (requires libxml2 2.6.32 or later).
  • -
  • Parser option strip_cdata for normalising or keeping CDATA -sections. Defaults to True as before, thus replacing CDATA -sections by their text content.
  • -
  • CDATA() factory to wrap string content as CDATA section.
  • -
-
-
-

Bugs fixed

-
    -
  • Resolving to a filename in custom resolvers didn't work.
  • -
  • lxml did not honour libxslt's second error state "STOPPED", which -let some XSLT errors pass silently.
  • -
  • Memory leak in Schematron with libxml2 >= 2.6.31.
  • -
  • lxml.etree accepted non well-formed namespace prefix names.
  • -
-
-
-

Other changes

-
    -
  • Major cleanup in internal moveNodeToDocument() function, which -takes care of namespace cleanup when moving elements between -different namespace contexts.
  • -
  • New Elements created through the makeelement() method of an HTML -parser or through lxml.html now end up in a new HTML document -(doctype HTML 4.01 Transitional) instead of a generic XML document. -This mostly impacts the serialisation and the availability of a DTD -context.
  • -
-
-
-
-

2.0.4 (2008-04-13)

-
-

Features added

-
-
-

Bugs fixed

-
    -
  • Hanging thread in conjunction with GTK threading.
  • -
  • Crash bug in iterparse when moving elements into other documents.
  • -
  • HTML elements' .cssselect() method was broken.
  • -
  • ElementTree.find*() didn't accept QName objects.
  • -
-
-
-

Other changes

-
-
-
-

2.1alpha1 (2008-03-27)

-
-

Features added

-
    -
  • New event types 'comment' and 'pi' in iterparse().
  • -
  • XSLTAccessControl instances have a property options that -returns a dict of access configuration options.
  • -
  • Constant instances DENY_ALL and DENY_WRITE on -XSLTAccessControl class.
  • -
  • Extension elements for XSLT (experimental!)
  • -
  • Element.base property returns the xml:base or HTML base URL of -an Element.
  • -
  • docinfo.URL property is writable.
  • -
-
-
-

Bugs fixed

-
    -
  • Default encoding for plain text serialisation was different from -that of XML serialisation (UTF-8 instead of ASCII).
  • -
-
-
-

Other changes

-
    -
  • Minor API speed-ups.
  • -
  • The benchmark suite now uses tail text in the trees, which makes the -absolute numbers incomparable to previous results.
  • -
  • Generating the HTML documentation now requires Pygments, which is -used to enable syntax highlighting for the doctest examples.
  • -
-

Most long-time deprecated functions and methods were removed:

-
    -
  • etree.clearErrorLog(), use etree.clear_error_log()

    -
  • -
  • etree.useGlobalPythonLog(), use -etree.use_global_python_log()

    -
  • -
  • etree.ElementClassLookup.setFallback(), use -etree.ElementClassLookup.set_fallback()

    -
  • -
  • etree.getDefaultParser(), use etree.get_default_parser()

    -
  • -
  • etree.setDefaultParser(), use etree.set_default_parser()

    -
  • -
  • etree.setElementClassLookup(), use -etree.set_element_class_lookup()

    -

    Note that parser.setElementClassLookup() has not been removed -yet, although parser.set_element_class_lookup() should be used -instead.

    -
  • -
  • xpath_evaluator.registerNamespace(), use -xpath_evaluator.register_namespace()

    -
  • -
  • xpath_evaluator.registerNamespaces(), use -xpath_evaluator.register_namespaces()

    -
  • -
  • objectify.setPytypeAttributeTag, use -objectify.set_pytype_attribute_tag

    -
  • -
  • objectify.setDefaultParser(), use -objectify.set_default_parser()

    -
  • -
-
-
-
-

2.0.3 (2008-03-26)

-
-

Features added

-
    -
  • soupparser.parse() allows passing keyword arguments on to -BeautifulSoup.
  • -
  • fromstring() method in lxml.html.soupparser.
  • -
-
-
-

Bugs fixed

-
    -
  • lxml.html.diff didn't treat empty tags properly (e.g., -<br>).
  • -
  • Handle entity replacements correctly in target parser.
  • -
  • Crash when using iterparse() with XML Schema validation.
  • -
  • The BeautifulSoup parser (soupparser.py) did not replace entities, -which made them turn up in text content.
  • -
  • Attribute assignment of custom PyTypes in objectify could fail to -correctly serialise the value to a string.
  • -
-
-
-

Other changes

-
    -
  • lxml.html.ElementSoup was replaced by a new module -lxml.html.soupparser with a more consistent API. The old module -remains for compatibility with ElementTree's own ElementSoup module.
  • -
  • Setting the XSLT_CONFIG and XML2_CONFIG environment variables at -build time will let setup.py pick up the xml2-config and -xslt-config scripts from the supplied path name.
  • -
  • Passing --with-xml2-config=/path/to/xml2-config to setup.py will -override the xml2-config script that is used to determine the C -compiler options. The same applies for the --with-xslt-config -option.
  • -
-
-
-
-

2.0.2 (2008-02-22)

-
-

Features added

-
    -
  • Support passing base_url to file parser functions to override -the filename of the file(-like) object.
  • -
-
-
-

Bugs fixed

-
    -
  • The prefix for objectify's pytype namespace was missing from the set -of default prefixes.
  • -
  • Memory leak in Schematron (fixed only for libxml2 2.6.31+).
  • -
  • Error type names in RelaxNG were reported incorrectly.
  • -
  • Slice deletion bug fixed in objectify.
  • -
-
-
-

Other changes

-
    -
  • Enabled doctests for some Python modules (especially lxml.html).
  • -
  • Add a method argument to lxml.html.tostring() -(method="xml" for XHTML output).
  • -
  • Make it clearer that methods like lxml.html.fromstring() take a -base_url argument.
  • -
-
-
-
-

2.0.1 (2008-02-13)

-
-

Features added

-
    -
  • Child iteration in lxml.pyclasslookup.
  • -
  • Loads of new docstrings reflect the signature of functions and -methods to make them visible in API docs and help()
  • -
-
-
-

Bugs fixed

-
    -
  • The module lxml.html.builder was duplicated as -lxml.htmlbuilder
  • -
  • Form elements would return None for form.fields.keys() if there -was an unnamed input field. Now unnamed input fields are completely -ignored.
  • -
  • Setting an element slice in objectify could insert slice-overlapping -elements at the wrong position.
  • -
-
-
-

Other changes

-
    -
  • The generated API documentation was cleaned up and disburdened from -non-public classes etc.
  • -
  • The previously public module lxml.html.setmixin was renamed to -lxml.html._setmixin as it is not an official part of lxml. If -you want to use it, feel free to copy it over to your own source -base.
  • -
  • Passing --with-xslt-config=/path/to/xslt-config to setup.py will -override the xslt-config script that is used to determine the C -compiler options.
  • -
-
-
-
-

2.0 (2008-02-01)

-
-

Features added

-
    -
  • Passing the unicode type as encoding to tostring() will -serialise to unicode. The tounicode() function is now -deprecated.
  • -
  • XMLSchema() and RelaxNG() can parse from StringIO.
  • -
  • makeparser() function in lxml.objectify to create a new -parser with the usual objectify setup.
  • -
  • Plain ASCII XPath string results are no longer forced into unicode -objects as in 2.0beta1, but are returned as plain strings as before.
  • -
  • All XPath string results are 'smart' objects that have a -getparent() method to retrieve their parent Element.
  • -
  • with_tail option in serialiser functions.
  • -
  • More accurate exception messages in validator creation.
  • -
  • Parse-time XML schema validation (schema parser keyword).
  • -
  • XPath string results of the text() function and attribute -selection make their Element container accessible through a -getparent() method. As a side-effect, they are now always -unicode objects (even ASCII strings).
  • -
  • XSLT objects are usable in any thread - at the cost of a deep -copy if they were not created in that thread.
  • -
  • Invalid entity names and character references will be rejected by -the Entity() factory.
  • -
  • entity.text returns the textual representation of the entity, -e.g. &amp;.
  • -
  • New properties position and code on ParseError exception (as -in ET 1.3)
  • -
  • Rich comparison of element.attrib proxies.
  • -
  • ElementTree compatible TreeBuilder class.
  • -
  • Use default prefixes for some common XML namespaces.
  • -
  • lxml.html.clean.Cleaner now allows for a host_whitelist, and -two overridable methods: allow_embedded_url(el, url) and the -more general allow_element(el).
  • -
  • Extended slicing of Elements as in element[1:-1:2], both in -etree and in objectify
  • -
  • Resolvers can now provide a base_url keyword argument when -resolving a document as string data.
  • -
  • When using lxml.doctestcompare you can give the doctest option -NOPARSE_MARKUP (like # doctest: +NOPARSE_MARKUP) to suppress -the special checking for one test.
  • -
  • Separate feed_error_log property for the feed parser interface. -The normal parser interface and iterparse continue to use -error_log.
  • -
  • The normal parsers and the feed parser interface are now separated -and can be used concurrently on the same parser instance.
  • -
  • fromstringlist() and tostringlist() functions as in -ElementTree 1.3
  • -
  • iterparse() accepts an html boolean keyword argument for -parsing with the HTML parser (note that this interface may be -subject to change)
  • -
  • Parsers accept an encoding keyword argument that overrides the encoding -of the parsed documents.
  • -
  • New C-API function hasChild() to test for children
  • -
  • annotate() function in objectify can annotate with Python types and XSI -types in one step. Accompanied by xsiannotate() and pyannotate().
  • -
  • ET.write(), tostring() and tounicode() now accept a keyword -argument method that can be one of 'xml' (or None), 'html' or 'text' to -serialise as XML, HTML or plain text content.
  • -
  • iterfind() method on Elements returns an iterator equivalent to -findall()
  • -
  • itertext() method on Elements
  • -
  • Setting a QName object as value of the .text property or as an attribute -will resolve its prefix in the respective context
  • -
  • ElementTree-like parser target interface as described in -http://effbot.org/elementtree/elementtree-xmlparser.htm
  • -
  • ElementTree-like feed parser interface on XMLParser and HTMLParser -(feed() and close() methods)
  • -
  • Reimplemented objectify.E for better performance and improved -integration with objectify. Provides extended type support based on -registered PyTypes.
  • -
  • XSLT objects now support deep copying
  • -
  • New makeSubElement() C-API function that allows creating a new -subelement straight with text, tail and attributes.
  • -
  • XPath extension functions can now access the current context node -(context.context_node) and use a context dictionary -(context.eval_context) from the context provided in their first -parameter
  • -
  • HTML tag soup parser based on BeautifulSoup in lxml.html.ElementSoup
  • -
  • New module lxml.doctestcompare by Ian Bicking for writing simplified -doctests based on XML/HTML output. Use by importing lxml.usedoctest or -lxml.html.usedoctest from within a doctest.
  • -
  • New module lxml.cssselect by Ian Bicking for selecting Elements with CSS -selectors.
  • -
  • New package lxml.html written by Ian Bicking for advanced HTML -treatment.
  • -
  • Namespace class setup is now local to the ElementNamespaceClassLookup -instance and no longer global.
  • -
  • Schematron validation (incomplete in libxml2)
  • -
  • Additional stringify argument to objectify.PyType() takes a -conversion function to strings to support setting text values from arbitrary -types.
  • -
  • Entity support through an Entity factory and element classes. XML -parsers now have a resolve_entities keyword argument that can be set to -False to keep entities in the document.
  • -
  • column field on error log entries to accompany the line field
  • -
  • Error specific messages in XPath parsing and evaluation -NOTE: for evaluation errors, you will now get an XPathEvalError instead of -an XPathSyntaxError. To catch both, you can except on XPathError
  • -
  • The regular expression functions in XPath now support passing a node-set -instead of a string
  • -
  • Extended type annotation in objectify: new xsiannotate() function
  • -
  • EXSLT RegExp support in standard XPath (not only XSLT)
  • -
-
-
-

Bugs fixed

-
    -
  • Missing import in lxml.html.clean.
  • -
  • Some Python 2.4-isms prevented lxml from building/running under -Python 2.3.
  • -
  • XPath on ElementTrees could crash when selecting the virtual root -node of the ElementTree.
  • -
  • Compilation --without-threading was buggy in alpha5/6.
  • -
  • Memory leak in the parse() function.
  • -
  • Minor bugs in XSLT error message formatting.
  • -
  • Result document memory leak in target parser.
  • -
  • Target parser failed to report comments.
  • -
  • In the lxml.html iter_links method, links in <object> -tags weren't recognized. (Note: plugin-specific link parameters -still aren't recognized.) Also, the <embed> tag, though not -standard, is now included in lxml.html.defs.special_inline_tags.
  • -
  • Using custom resolvers on XSLT stylesheets parsed from a string -could request ill-formed URLs.
  • -
  • With lxml.doctestcompare if you do <tag xmlns="..."> in your -output, it will then be namespace-neutral (before the ellipsis was -treated as a real namespace).
  • -
  • AttributeError in feed parser on parse errors
  • -
  • XML feed parser setup problem
  • -
  • Type annotation for unicode strings in DataElement()
  • -
  • lxml failed to serialise namespace declarations of elements other than the -root node of a tree
  • -
  • Race condition in XSLT where the resolver context leaked between concurrent -XSLT calls
  • -
  • lxml.etree did not check tag/attribute names
  • -
  • The XML parser did not report undefined entities as error
  • -
  • The text in exceptions raised by XML parsers, validators and XPath -evaluators now reports the first error that occurred instead of the last
  • -
  • Passing '' as XPath namespace prefix did not raise an error
  • -
  • Thread safety in XPath evaluators
  • -
-
-
-

Other changes

-
    -
  • Exceptions carry only the part of the error log that is related to -the operation that caused the error.
  • -
  • XMLSchema() and RelaxNG() now enforce passing the source -file/filename through the file keyword argument.
  • -
  • The test suite now skips most doctests under Python 2.3.
  • -
  • make clean no longer removes the .c files (use make -realclean instead)
  • -
  • Minor performance tweaks for Element instantiation and subelement -creation
  • -
  • Various places in the XPath, XSLT and iteration APIs now require -keyword-only arguments.
  • -
  • The argument order in element.itersiblings() was changed to -match the order used in all other iteration methods. The second -argument ('preceding') is now a keyword-only argument.
  • -
  • The getiterator() method on Elements and ElementTrees was -reverted to return an iterator as it did in lxml 1.x. The ET API -specification allows it to return either a sequence or an iterator, -and it traditionally returned a sequence in ET and an iterator in -lxml. However, it is now deprecated in favour of the iter() -method, which should be used in new code wherever possible.
  • -
  • The 'pretty printed' serialisation of ElementTree objects now -inserts newlines at the root level between processing instructions, -comments and the root tag.
  • -
  • A 'pretty printed' serialisation is now terminated with a newline.
  • -
  • Second argument to lxml.etree.Extension() helper is no longer -required, third argument is now a keyword-only argument ns.
  • -
  • lxml.html.tostring takes an encoding argument.
  • -
  • The module source files were renamed to "lxml.*.pyx", such as -"lxml.etree.pyx". This was changed for consistency with the way -Pyrex commonly handles package imports. The main effect is that -classes now know about their fully qualified class name, including -the package name of their module.
  • -
  • Keyword-only arguments in some API functions, especially in the -parsers and serialisers.
  • -
  • Tag name validation in lxml.etree (and lxml.html) now distinguishes -between HTML tags and XML tags based on the parser that was used to -parse or create them. HTML tags no longer reject any non-ASCII -characters in tag names but only spaces and the special characters -<>&/"'.
  • -
  • lxml.etree now emits a warning if you use XPath with libxml2 2.6.27 -(which can crash on certain XPath errors)
  • -
  • Type annotation in objectify now preserves the already annotated type by -default to prevent losing type information that is already there.
  • -
  • element.getiterator() returns a list, use element.iter() to retrieve -an iterator (ElementTree 1.3 compatible behaviour)
  • -
  • objectify.PyType for None is now called "NoneType"
  • -
  • el.getiterator() renamed to el.iter(), following ElementTree 1.3 - -original name is still available as alias
  • -
  • In the public C-API, findOrBuildNodeNs() was replaced by the more -generic findOrBuildNodeNsPrefix
  • -
  • Major refactoring in XPath/XSLT extension function code
  • -
  • Network access in parsers disabled by default
  • -
-
-
-
-

1.3.6 (2007-10-29)

-
-

Bugs fixed

-
    -
  • Backported decref crash fix from 2.0
  • -
  • Well hidden free-while-in-use crash bug in ObjectPath
  • -
-
-
-

Other changes

-
    -
  • The test suites now run gc.collect() in the tearDown() -methods. While this makes them take a lot longer to run, it also -makes it easier to link a specific test to garbage collection -problems that would otherwise appear in later tests.
  • -
-
-
-
-

1.3.5 (2007-10-22)

-
-

Features added

-
-
-

Bugs fixed

-
    -
  • lxml.etree could crash when adding more than 10000 namespaces to a -document
  • -
  • lxml failed to serialise namespace declarations of elements other -than the root node of a tree
  • -
-
-
-
-

1.3.4 (2007-08-30)

-
-

Features added

-
    -
  • The ElementMaker in lxml.builder now accepts the keyword arguments -namespace and nsmap to set a namespace and nsmap for the Elements it -creates.
  • -
  • The docinfo on ElementTree objects has new properties internalDTD -and externalDTD that return a DTD object for the internal or external -subset of the document respectively.
  • -
  • Serialising an ElementTree now includes any internal DTD subsets that are -part of the document, as well as comments and PIs that are siblings of the -root node.
  • -
-
-
-

Bugs fixed

-
    -
  • Parsing with the no_network option could fail
  • -
-
-
-

Other changes

-
    -
  • lxml now raises a TagNameWarning about tag names containing ':' instead of -an Error as 1.3.3 did. The reason is that a number of projects currently -misuse the previous lack of tag name validation to generate namespace -prefixes without declaring namespaces. Apart from the danger of generating -broken XML this way, it also breaks most of the namespace-aware tools in -XML, including XPath, XSLT and validation. lxml 1.3.x will continue to -support this bug with a Warning, while lxml 2.0 will be strict about -well-formed tag names (not only regarding ':').
  • -
  • Serialising an Element no longer includes its comment and PI siblings (only -ElementTree serialisation includes them).
  • -
-
-
-
-

1.3.3 (2007-07-26)

-
-

Features added

-
    -
  • ElementTree compatible parser ETCompatXMLParser strips processing -instructions and comments while parsing XML
  • -
  • Parsers now support stripping PIs (keyword argument 'remove_pis')
  • -
  • etree.fromstring() now supports parsing both HTML and XML, depending on -the parser you pass.
  • -
  • Support base_url keyword argument in HTML() and XML()
  • -
-
-
-

Bugs fixed

-
    -
  • Parsing from Python Unicode strings failed on some platforms
  • -
  • Element() did not raise an exception on tag names containing ':'
  • -
  • Element.getiterator(tag) did not accept Comment and -ProcessingInstruction as tags. It also accepts Element now.
  • -
-
-
-
-

1.3.2 (2007-07-03)

-
-

Features added

-
-
-

Bugs fixed

-
    -
  • "deallocating None" crash bug
  • -
-
-
-
-

1.3.1 (2007-07-02)

-
-

Features added

-
    -
  • objectify.DataElement now supports setting values from existing data -elements (not just plain Python types) and reuses defined namespaces etc.
  • -
  • E-factory support for lxml.objectify (objectify.E)
  • -
-
-
-

Bugs fixed

-
    -
  • Better way to prevent crashes in Element proxy cleanup code
  • -
  • objectify.DataElement didn't set up None value correctly
  • -
  • objectify.DataElement didn't check the value against the provided type hints
  • -
  • Reference-counting bug in Element.attrib.pop()
  • -
-
-
-
-

1.3 (2007-06-24)

-
-

Features added

-
    -
  • Module lxml.pyclasslookup module implements an Element class lookup -scheme that can access the entire tree in read-only mode to help determining -a suitable Element class
  • -
  • Parsers take a remove_comments keyword argument that skips over comments
  • -
  • parse() function in objectify, corresponding to XML() etc.
  • -
  • Element.addnext(el) and Element.addprevious(el) methods to support -adding processing instructions and comments around the root node
  • -
  • Element.attrib was missing clear() and pop() methods
  • -
  • Extended type annotation in objectify: cleaner annotation namespace setup -plus new deannotate() function
  • -
  • Support for custom Element class instantiation in lxml.sax: passing a -makeelement function to the ElementTreeContentHandler will reuse the -lookup context of that function
  • -
  • '.' represents empty ObjectPath (identity)
  • -
  • Element.values() to accompany the existing .keys() and .items()
  • -
  • collectAttributes() C-function to build a list of attribute -keys/values/items for a libxml2 node
  • -
  • DTD validator class (like RelaxNG and XMLSchema)
  • -
  • HTML generator helpers by Fredrik Lundh in lxml.htmlbuilder
  • -
  • ElementMaker XML generator by Fredrik Lundh in lxml.builder.E
  • -
  • Support for pickling objectify.ObjectifiedElement objects to XML
  • -
  • update() method on Element.attrib
  • -
  • Optimised replacement for libxml2's _xmlReconsiliateNs(). This allows lxml -a better handling of namespaces when moving elements between documents.
  • -
-
-
-

Bugs fixed

-
    -
  • Removing Elements from a tree could make them lose their namespace -declarations
  • -
  • ElementInclude didn't honour base URL of original document
  • -
  • Replacing the children slice of an Element would cut off the tails of the -original children
  • -
  • Element.getiterator(tag) did not accept Comment and -ProcessingInstruction as tags
  • -
  • API functions now check incoming strings for XML conformity. Zero bytes or -low ASCII characters are no longer accepted (AssertionError).
  • -
  • XSLT parsing failed to pass resolver context on to imported documents
  • -
  • passing '' as namespace prefix in nsmap could be passed through to libxml2
  • -
  • Objectify couldn't handle prefixed XSD type names in xsi:type
  • -
  • More ET compatible behaviour when writing out XML declarations or not
  • -
  • More robust error handling in iterparse()
  • -
  • Documents lost their top-level PIs and comments on serialisation
  • -
  • lxml.sax failed on comments and PIs. Comments are now properly ignored and -PIs are copied.
  • -
  • Possible memory leaks in namespace handling when moving elements between -documents
  • -
-
-
-

Other changes

-
    -
  • major restructuring in the documentation
  • -
-
-
-
-

1.2.1 (2007-02-27)

-
-

Bugs fixed

-
    -
  • Build fixes for MS compiler
  • -
  • Item assignments to special names like element["text"] failed
  • -
  • Renamed ObjectifiedDataElement.__setText() to _setText() to make it easier -to access
  • -
  • The pattern for attribute names in ObjectPath was too restrictive
  • -
-
-
-
-

1.2 (2007-02-20)

-
-

Features added

-
    -
  • Rich comparison of QName objects
  • -
  • Support for regular expressions in benchmark selection
  • -
  • get/set emulation (not .attrib!) for attributes on processing instructions
  • -
  • ElementInclude Python module for ElementTree compatible XInclude processing -that honours custom resolvers registered with the source document
  • -
  • ElementTree.parser property holds the parser used to parse the document
  • -
  • setup.py has been refactored for greater readability and flexibility
  • -
  • --rpath flag to setup.py to induce automatic linking-in of dynamic library -runtime search paths has been renamed to --auto-rpath. This makes it -possible to pass an --rpath directly to distutils; previously this was being -shadowed.
  • -
-
-
-

Bugs fixed

-
    -
  • Element instantiation now uses locks to prevent race conditions with threads
  • -
  • ElementTree.write() did not raise an exception when the file was not writable
  • -
  • Error handling could crash under Python <= 2.4.1 - fixed by disabling thread -support in these environments
  • -
  • Element.find*() did not accept QName objects as path
  • -
-
-
-

Other changes

-
    -
  • code cleanup: redundant _NodeBase super class merged into _Element class -Note: although the impact should be zero in most cases, this change breaks -the compatibility of the public C-API
  • -
-
-
-
-

1.1.2 (2006-10-30)

-
-

Features added

-
    -
  • Data elements in objectify support repr(), which is now used by dump()
  • -
  • Source distribution now ships with a patched Pyrex
  • -
  • New C-API function makeElement() to create new elements with text, -tail, attributes and namespaces
  • -
  • Reuse original parser flags for XInclude
  • -
  • Simplified support for handling XSLT processing instructions
  • -
-
-
-

Bugs fixed

-
    -
  • Parser resources were not freed before the next parser run
  • -
  • Open files and XML strings returned by Python resolvers were not -closed/freed
  • -
  • Crash in the IDDict returned by XMLDTDID
  • -
  • Copying Comments and ProcessingInstructions failed
  • -
  • Memory leak for external URLs in _XSLTProcessingInstruction.parseXSL()
  • -
  • Memory leak when garbage collecting tailed root elements
  • -
  • HTML script/style content was not propagated to .text
  • -
  • Show text xincluded between text nodes correctly in .text and .tail
  • -
  • 'integer * objectify.StringElement' operation was not supported
  • -
-
-
-
-

1.1.1 (2006-09-21)

-
-

Features added

-
    -
  • XSLT profiling support (profile_run keyword)
  • -
  • countchildren() method on objectify.ObjectifiedElement
  • -
  • Support custom elements for tree nodes in lxml.objectify
  • -
-
-
-

Bugs fixed

-
    -
  • lxml.objectify failed to support long data values (e.g., "123L")
  • -
  • Error messages from XSLT did not reach XSLT.error_log
  • -
  • Factories objectify.Element() and objectify.DataElement() were missing -attrib and nsmap keyword arguments
  • -
  • Changing the default parser in lxml.objectify did not update the factories -Element() and DataElement()
  • -
  • Let lxml.objectify.Element() always generate tree elements (not data -elements)
  • -
  • Build under Windows failed ('0' bug in patched Pyrex version)
  • -
-
-
-
-

1.1 (2006-09-13)

-
-

Features added

-
    -
  • Comments and processing instructions return '<!-- comment -->' and -'<?pi-target content?>' for repr()
  • -
  • Parsers are now the preferred (and default) place where element class lookup -schemes should be registered. Namespace lookup is no longer supported by -default.
  • -
  • Support for Python 2.5 beta
  • -
  • Unlock the GIL for deep copying documents and for XPath()
  • -
  • New compact keyword argument for parsing read-only documents
  • -
  • Support for parser options in iterparse()
  • -
  • The namespace axis is supported in XPath and returns (prefix, URI) -tuples
  • -
  • The XPath expression "/" now returns an empty list instead of raising an -exception
  • -
  • XML-Object API on top of lxml (lxml.objectify)
  • -
  • Customizable Element class lookup:
      -
    • different pre-implemented lookup mechanisms
    • -
    • support for externally provided lookup functions
    • -
    -
  • -
  • Support for processing instructions (ET-like, not compatible)
  • -
  • Public C-level API for independent extension modules
  • -
  • Module level iterwalk() function as 'iterparse' for trees
  • -
  • Module level iterparse() function similar to ElementTree (see -documentation for differences)
  • -
  • Element.nsmap property returns a mapping of all namespace prefixes known at -the Element to their namespace URI
  • -
  • Reentrant threading support in RelaxNG, XMLSchema and XSLT
  • -
  • Threading support in parsers and serializers:
      -
    • All in-memory operations (tostring, parse(StringIO), etc.) free the GIL
    • -
    • File operations (on file names) free the GIL
    • -
    • Reading from file-like objects frees the GIL and reacquires it for reading
    • -
    • Serialisation to file-like objects is single-threaded (high lock overhead)
    • -
    -
  • -
  • Element iteration over XPath axes:
      -
    • Element.iterdescendants() iterates over the descendants of an element
    • -
    • Element.iterancestors() iterates over the ancestors of an element (from -parent to parent)
    • -
    • Element.itersiblings() iterates over either the following or preceding -siblings of an element
    • -
    • Element.iterchildren() iterates over the children of an element in either -direction
    • -
    • All iterators support the tag keyword argument to restrict the -generated elements
    • -
    -
  • -
  • Element.getnext() and Element.getprevious() return the direct siblings of an -element
  • -
-
-
-

Bugs fixed

-
    -
  • filenames with local 8-bit encoding were not supported
  • -
  • 1.1beta did not compile under Python 2.3
  • -
  • ignore unknown 'pyval' attribute values in objectify
  • -
  • objectify.ObjectifiedElement.addattr() failed to accept Elements and Lists
  • -
  • objectify.ObjectPath.setattr() failed to accept Elements and Lists
  • -
  • XPathSyntaxError now inherits from XPathError
  • -
  • Threading race conditions in RelaxNG and XMLSchema
  • -
  • Crash when mixing elements from XSLT results into other trees, concurrent -XSLT is only allowed when the stylesheet was parsed in the main thread
  • -
  • The EXSLT regexp:match function now works as defined (except for some -differences in the regular expression syntax)
  • -
  • Setting element.text to '' returned None on request, not the empty string
  • -
  • iterparse() could crash on long XML files
  • -
  • Creating documents no longer copies the parser for later URL resolving. For -performance reasons, only a reference is kept. Resolver updates on the -parser will now be reflected by documents that were parsed before the -change. Although this should rarely become visible, it is a behavioral -change from 1.0.
  • -
-
-
-
-

1.0.4 (2006-09-09)

-
-

Features added

-
    -
  • List-like Element.extend() method
  • -
-
-
-

Bugs fixed

-
    -
  • Crash in tail handling in Element.replace()
  • -
-
-
-
-

1.0.3 (2006-08-08)

-
-

Features added

-
    -
  • Element.replace(old, new) method to replace a subelement by another one
  • -
-
-
-

Bugs fixed

-
    -
  • Crash when mixing elements from XSLT results into other trees
  • -
  • Copying/deepcopying did not work for ElementTree objects
  • -
  • Setting an attribute to a non-string value did not raise an exception
  • -
  • Element.remove() deleted the tail text from the removed Element
  • -
-
-
-
-

1.0.2 (2006-06-27)

-
-

Features added

-
    -
  • Support for setting a custom default Element class as opposed to namespace -specific classes (which still override the default class)
  • -
-
-
-

Bugs fixed

-
    -
  • Rare exceptions in Python list functions were not handled
  • -
  • Parsing accepted unicode strings with XML encoding declaration in certain -cases
  • -
  • Parsing 8-bit encoded strings from StringIO objects raised an exception
  • -
  • Module function initThread() was removed - useless (and never worked)
  • -
  • XSLT and parser exception messages include the error line number
  • -
-
-
-
-

1.0.1 (2006-06-09)

-
-

Features added

-
    -
  • Repeated calls to Element.attrib now efficiently return the same instance
  • -
-
-
-

Bugs fixed

-
    -
  • Document deallocation could crash in certain garbage collection scenarios
  • -
  • Extension function calls in XSLT variable declarations could break the -stylesheet and crash on repeated calls
  • -
  • Deep copying Elements could lose namespaces declared in parents
  • -
  • Deep copying Elements did not copy tail
  • -
  • Parsing file(-like) objects failed to load external entities
  • -
  • Parsing 8-bit strings from file(-like) objects raised an exception
  • -
  • xsl:include failed when the stylesheet was parsed from a file-like object
  • -
  • lxml.sax.ElementTreeProducer did not call startDocument() / endDocument()
  • -
  • MSVC compiler complained about long strings (supports only 2048 bytes)
  • -
-
-
-
-

1.0 (2006-06-01)

-
-

Features added

-
    -
  • Element.getiterator() and the findall() methods support finding arbitrary -elements from a namespace (pattern {namespace}*)
  • -
  • Another speedup in tree iteration code
  • -
  • General speedup of Python Element object creation and deallocation
  • -
  • Writing C14N no longer serializes in memory (reduced memory footprint)
  • -
  • PyErrorLog for error logging through the Python logging module
  • -
  • Element.getroottree() returns an ElementTree for the root node of the -document that contains the element.
  • -
  • ElementTree.getpath(element) returns a simple, absolute XPath expression to -find the element in the tree structure
  • -
  • Error logs have a last_error attribute for convenience
  • -
  • Comment texts can be changed through the API
  • -
  • Formatted output via pretty_print keyword in serialization functions
  • -
  • XSLT can block access to file system and network via XSLTAccessControl
  • -
  • ElementTree.write() no longer serializes in memory (reduced memory -footprint)
  • -
  • Speedup of Element.findall(tag) and Element.getiterator(tag)
  • -
  • Support for writing the XML representation of Elements and ElementTrees to -Python unicode strings via etree.tounicode()
  • -
  • Support for writing XSLT results to Python unicode strings via unicode()
  • -
  • Parsing a unicode string no longer copies the string (reduced memory -footprint)
  • -
  • Parsing file-like objects reads chunks rather than the whole file (reduced -memory footprint)
  • -
  • Parsing StringIO objects from the start avoids copying the string (reduced -memory footprint)
  • -
  • Read-only 'docinfo' attribute in ElementTree class holds DOCTYPE -information, original encoding and XML version as seen by the parser
  • -
  • etree module can be compiled without libxslt by commenting out the line -include "xslt.pxi" near the end of the etree.pyx source file
  • -
  • Better error messages in parser exceptions
  • -
  • Error reporting also works in XSLT
  • -
  • Support for custom document loaders (URI resolvers) in parsers and XSLT, -resolvers are registered at parser level
  • -
  • Implementation of exslt:regexp for XSLT based on the Python 're' module, -enabled by default, can be switched off with 'regexp=False' keyword argument
  • -
  • Support for exslt extensions (libexslt) and libxslt extra functions -(node-set, document, write, output)
  • -
  • Substantial speedup in XPath.evaluate()
  • -
  • HTMLParser for parsing (broken) HTML
  • -
  • XMLDTDID function parses XML into tuple (root node, ID dict) based on xml:id -implementation of libxml2 (as opposed to ET compatible XMLID)
  • -
-
-
-

Bugs fixed

-
    -
  • Memory leak in Element.__setitem__
  • -
  • Memory leak in Element.attrib.items() and Element.attrib.values()
  • -
  • Memory leak in XPath extension functions
  • -
  • Memory leak in unicode related setup code
  • -
  • Element now raises ValueError on empty tag names
  • -
  • Namespace fixing after moving elements between documents could fail if the -source document was freed too early
  • -
  • Setting namespace-less tag names on namespaced elements ('{ns}t' -> 't') -didn't reset the namespace
  • -
  • Unknown constants from newer libxml2 versions could raise exceptions in the -error handlers
  • -
  • lxml.etree compiles much faster
  • -
  • On libxml2 <= 2.6.22, parsing strings with encoding declaration could fail -in certain cases
  • -
  • Document reference in ElementTree objects was not updated when the root -element was moved to a different document
  • -
  • Running absolute XPath expressions on an Element now evaluates against the -root tree
  • -
  • Evaluating absolute XPath expressions (/*) on an ElementTree could fail
  • -
  • Crashes when calling XSLT, RelaxNG, etc. with uninitialized ElementTree -objects
  • -
  • Removed public function initThreadLogging(), replaced by more general -initThread() which fixes a number of setup problems in threads
  • -
  • Memory leak when using iconv encoders in tostring/write
  • -
  • Deep copying Elements and ElementTrees maintains the document information
  • -
  • Serialization functions raise LookupError for unknown encodings
  • -
  • Memory deallocation crash resulting from deep copying elements
  • -
  • Some ElementTree methods could crash if the root node was not initialized -(neither file nor element passed to the constructor)
  • -
  • Element/SubElement failed to set attribute namespaces from passed attrib -dictionary
  • -
  • tostring() adds an XML declaration for non-ASCII encodings
  • -
  • tostring() failed to serialize encodings that contain 0-bytes
  • -
  • ElementTree.xpath() and XPathDocumentEvaluator were not using the -ElementTree root node as reference point
  • -
  • Calling document('') in XSLT failed to return the stylesheet
  • -
-
-
-
-

0.9.2 (2006-05-10)

-
-

Features added

-
    -
  • Speedup for Element.makeelement(): the new element reuses the original -libxml2 document instead of creating a new empty one
  • -
  • Speedup for reversed() iteration over element children (Py2.4+ only)
  • -
  • ElementTree compatible QName class
  • -
  • RelaxNG and XMLSchema accept any Element, not only ElementTrees
  • -
-
-
-

Bugs fixed

-
    -
  • str(xslt_result) was broken for XSLT output other than UTF-8
  • -
  • Memory leak if write_c14n fails to write the file after conversion
  • -
  • Crash in XMLSchema and RelaxNG when passing non-schema documents
  • -
  • Memory leak in RelaxNG() when RelaxNGParseError is raised
  • -
-
-
-
-

0.9.1 (2006-03-30)

-
-

Features added

-
    -
  • lxml.sax.ElementTreeContentHandler checks closing elements and raises -SaxError on mismatch
  • -
  • lxml.sax.ElementTreeContentHandler supports namespace-less SAX events -(startElement, endElement) and defaults to empty attributes (keyword -argument)
  • -
  • Speedup for repeatedly accessing element tag names
  • -
  • Minor API performance improvements
  • -
-
-
-

Bugs fixed

-
    -
  • Memory deallocation bug when using XSLT output method "html"
  • -
  • sax.py was handling UTF-8 encoded tag names where it shouldn't
  • -
  • lxml.tests package will no longer be installed (is still in source tar)
  • -
-
-
-
-

0.9 (2006-03-20)

-
-

Features added

-
    -
  • Error logging API for libxml2 error messages
  • -
  • Various performance improvements
  • -
  • Benchmark script for lxml, ElementTree and cElementTree
  • -
  • Support for registering extension functions through new FunctionNamespace -class (see doc/extensions.txt)
  • -
  • ETXPath class for XPath expressions in ElementTree notation ('//{ns}tag')
  • -
  • Support for variables in XPath expressions (also in XPath class)
  • -
  • XPath class for compiled XPath expressions
  • -
  • XMLID module level function (ElementTree compatible)
  • -
  • XMLParser API for customized libxml2 parser configuration
  • -
  • Support for custom Element classes through new Namespace API (see -doc/namespace_extensions.txt)
  • -
  • Common exception base class LxmlError for module exceptions
  • -
  • real iterator support in iter(Element), Element.getiterator()
  • -
  • XSLT objects are callable, result trees support str()
  • -
  • Added MANIFEST.in for easier creation of RPM files.
  • -
  • 'getparent' method on elements allows navigation to an element's -parent element.
  • -
  • Python core compatible SAX tree builder and SAX event generator. See -doc/sax.txt for more information.
  • -
-
-
-

Bugs fixed

-
    -
  • Segfaults and memory leaks in various API functions of Element
  • -
  • Segfault in XSLT.tostring()
  • -
  • ElementTree objects no longer interfere, Elements can be root of different -ElementTrees at the same time
  • -
  • document('') works in XSLT documents read from files (in-memory documents -cannot support this due to libxslt deficiencies)
  • -
-
-
-
-

0.8 (2005-11-03)

-
-

Features added

-
    -
  • Support for copy.deepcopy() on elements. copy.copy() works also, but -does the same thing, and does not create a shallow copy, as that -makes no sense in the context of libxml2 trees. This means a -potential incompatibility with ElementTree, but there's more chance -that it works than if copy.copy() isn't supported at all.
  • -
  • Increased compatibility with (c)ElementTree; .parse() on ElementTree is -supported and parsing of gzipped XML files works.
  • -
  • implemented index() on elements, allowing one to find the index of a -SubElement.
  • -
-
-
-

Bugs fixed

-
    -
  • Use xslt-config instead of xml2-config to find out libxml2 -directories to take into account a case where libxslt is installed -in a different directory than libxslt.
  • -
  • Eliminate crash condition in iteration when text nodes are changed.
  • -
  • Passing 'None' to tostring() does not result in a segfault anymore, -but an AssertionError.
  • -
  • Some test fixes for Windows.
  • -
  • Raise XMLSyntaxError and XPathSyntaxError instead of plain python -syntax errors. This should be less confusing.
  • -
  • Fixed error with uncaught exception in Pyrex code.
  • -
  • Calling lxml.etree.fromstring('') throws XMLSyntaxError instead of a -segfault.
  • -
  • has_key() works on attrib. 'in' tests also work correctly on attrib.
  • -
  • INSTALL.txt was saying 2.2.16 instead of 2.6.16 as a supported -libxml2 version, as it should.
  • -
  • Passing a UTF-8 encoded string to the XML() function would fail; -fixed.
  • -
-
-
-
-

0.7 (2005-06-15)

-
-

Features added

-
    -
  • parameters (XPath expressions) can be passed to XSLT using keyword -parameters.
  • -
  • Simple XInclude support. Calling the xinclude() method on a tree -will process any XInclude statements in the document.
  • -
  • XMLSchema support. Use the XMLSchema class or the convenience -xmlschema() method on a tree to do XML Schema (XSD) validation.
  • -
  • Added convenience xslt() method on tree. This is less efficient -than the XSLT object, but makes it easier to write quick code.
  • -
  • Added convenience relaxng() method on tree. This is less efficient -than the RelaxNG object, but makes it easier to write quick code.
  • -
  • Make it possible to use XPathEvaluator with elements as well. The -XPathEvaluator in this case will retain the element so multiple -XPath queries can be made against one element efficiently. This -replaces the second argument to the .evaluate() method that existed -previously.
  • -
  • Allow registerNamespace() to be called on an XPathEvaluator, after -creation, to add additional namespaces. Also allow registerNamespaces(), -which does the same for a namespace dictionary.
  • -
  • Add 'prefix' attribute to element to be able to read prefix information. -This is entirely read-only.
  • -
  • It is possible to supply an extra nsmap keyword parameter to -the Element() and SubElement() constructors, which supplies a -prefix to namespace URI mapping. This will create namespace -prefix declarations on these elements and these prefixes will show up -in XML serialization.
  • -
-
-
-

Bugs fixed

-
    -
  • Killed yet another memory management related bug: trees created -using newDoc would not get a libxml2-level dictionary, which caused -problems when deallocating these documents later if they contained a -node that came from a document with a dictionary.
  • -
  • Moving namespaced elements between documents was problematic as -references to the original document would remain. This has been fixed -by applying xmlReconciliateNs() after each move operation.
  • -
  • Can pass None to 'dump()' without segfaults.
  • -
  • tostring() works properly for non-root elements as well.
  • -
  • Cleaned out the tostring() method so it should handle encoding -correctly.
  • -
  • Cleaned out the ElementTree.write() method so it should handle encoding -correctly. Writing directly to a file should also be faster, as there is no -need to go through a Python string in that case. Made sure the test cases -test both serializing to StringIO as well as serializing to a real file.
  • -
-
-
-
-

0.6 (2005-05-14)

-
-

Features added

-
    -
  • Changed setup.py so that library_dirs is also guessed. This should -help with compilation on the Mac OS X platform, where otherwise the -wrong library (shipping with the OS) could be picked up.
  • -
  • Tweaked setup.py so that it picks up the version from version.txt.
  • -
-
-
-

Bugs fixed

-
    -
  • Do the right thing when handling namespaced attributes.
  • -
  • fix bug where tostring() moved nodes into new documents. tostring() -had very nasty side-effects before this fix, sorry!
  • -
-
-
-
-

0.5.1 (2005-04-09)

-
    -
  • Python 2.2 compatibility fixes.
  • -
  • unicode fixes in Element() and Comment() as well as XML(); unicode -input wasn't properly being UTF-8 encoded.
  • -
-
-
-

0.5 (2005-04-08)

-

Initial public release.

-
-
- - - diff --git a/doc/html/compatibility.html b/doc/html/compatibility.html deleted file mode 100644 index d8897dd..0000000 --- a/doc/html/compatibility.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - -ElementTree compatibility of lxml.etree - - - -
-

ElementTree compatibility of lxml.etree

- -

A lot of care has been taken to ensure compatibility between etree and -ElementTree. Nonetheless, some differences and incompatibilities exist:

-
    -
  • Importing etree is obviously different; etree uses a lower-case -package name, while ElementTree uses a combination of upper-case and -lower case in imports:

    -
    # etree
    -from lxml.etree import Element
    -
    -# ElementTree
    -from elementtree.ElementTree import Element
    -
    -# ElementTree in the Python 2.5 standard library
    -from xml.etree.ElementTree import Element
    -
    -

    When switching over code from ElementTree to lxml.etree, and you're using -the package name prefix 'ElementTree', you can do the following:

    -
    # instead of
    -from elementtree import ElementTree
    -# use
    -from lxml import etree as ElementTree
    -
    -
  • -
  • lxml.etree offers a lot more functionality, such as XPath, XSLT, Relax NG, -and XML Schema support, which (c)ElementTree does not offer.

    -
  • -
  • etree has a different idea about Python unicode strings than ElementTree. -In most parts of the API, ElementTree uses plain strings and unicode strings -as what they are. This includes Element.text, Element.tail and many other -places. However, the ElementTree parsers assume by default that any string -(str or unicode) contains ASCII data. They raise an exception if -strings do not match the expected encoding.

    -

    etree has the same idea about plain strings (str) as ElementTree. For -unicode strings, however, etree assumes throughout the API that they are -Python unicode encoded strings rather than byte data. This includes the -parsers. It is therefore perfectly correct to pass XML unicode data into -the etree parsers in form of Python unicode strings. It is an error, on the -other hand, if unicode strings specify an encoding in their XML declaration, -as this conflicts with the characteristic encoding of Python unicode -strings.

    -
  • -
  • ElementTree allows you to place an Element in two different trees at the -same time. Thus, this:

    -
    a = Element('a')
    -b = SubElement(a, 'b')
    -c = Element('c')
    -c.append(b)
    -
    -

    will result in the following tree a:

    -
    <a><b /></a>
    -
    -

    and the following tree c:

    -
    <c><b /></c>
    -
    -

    In lxml, this behavior is different, because lxml is built on top of a tree -that maintains parent relationships for elements (like W3C DOM). This means -an element can only exist in a single tree at the same time. Adding an -element in some tree to another tree will cause this element to be moved.

    -

    So, for tree a we will get:

    -
    <a></a>
    -
    -

    and for tree c we will get:

    -
    <c><b/></c>
    -
    -

    Unfortunately this is a rather fundamental difference in behavior, which is -hard to change. It won't affect some applications, but if you want to port -code you must unfortunately make sure that it doesn't affect yours.

    -
  • -
  • etree allows navigation to the parent of a node by the getparent() -method and to the siblings by calling getnext() and getprevious(). -This is not possible in ElementTree as the underlying tree model does not -have this information.

    -
  • -
  • When trying to set a subelement using __setitem__ that is in fact not an -Element but some other object, etree raises a TypeError, and ElementTree -raises an AssertionError. This also applies to some other places of the -API. In general, etree tries to avoid AssertionErrors in favour of being -more specific about the reason for the exception.

    -
  • -
  • When parsing fails in iterparse(), ElementTree up to version -1.2.x raises a low-level ExpatError instead of a SyntaxError -as the other parsers. Both lxml and ElementTree 1.3 raise a -ParseError for parser errors.

    -
  • -
  • The iterparse() function in lxml is implemented based on the libxml2 -parser and tree generator. This means that modifications of the document -root or the ancestors of the current element during parsing can irritate the -parser and even segfault. While this is not a problem in the Python object -structure used by ElementTree, the C tree underlying lxml suffers from it. -The golden rule for iterparse() on lxml therefore is: do not touch -anything that will have to be touched again by the parser later on. See the -lxml parser documentation on this.

    -
  • -
  • ElementTree ignores comments and processing instructions when parsing XML, -while etree will read them in and treat them as Comment or -ProcessingInstruction elements respectively. This is especially visible -where comments are found inside text content, which is then split by the -Comment element.

    -

    You can disable this behaviour by passing the boolean remove_comments -and/or remove_pis keyword arguments to the parser you use. For -convenience and to support portable code, you can also use the -etree.ETCompatXMLParser instead of the default etree.XMLParser. It -tries to provide a default setup that is as close to the ElementTree parser -as possible.

    -
  • -
  • The TreeBuilder class of lxml.etree uses a different -signature for the start() method. It accepts an additional -argument nsmap to propagate the namespace declarations of an -element in addition to its own namespace. To assure compatibility -with ElementTree (which does not support this argument), lxml checks -if the method accepts 3 arguments before calling it, and otherwise -drops the namespace mapping. This should work with most existing -ElementTree code, although there may still be conflicting cases.

    -
  • -
  • ElementTree 1.2 has a bug when serializing an empty Comment (no text -argument given) to XML, etree serializes this successfully.

    -
  • -
  • ElementTree adds whitespace around comments on serialization, lxml does -not. This means that a comment text "text" that ElementTree serializes as -"<!-- text -->" will become "<!--text-->" in lxml.

    -
  • -
  • When the string '*' is used as tag filter in the Element.getiterator() -method, ElementTree returns all elements in the tree, including comments and -processing instructions. lxml.etree only returns real Elements, i.e. tree -nodes that have a string tag name. Without a filter, both libraries iterate -over all nodes.

    -

    Note that currently only lxml.etree supports passing the Element factory -function as filter to select only Elements. Both libraries support passing -the Comment and ProcessingInstruction factories to select the -respective tree nodes.

    -
  • -
  • ElementTree merges the target of a processing instruction into PI.text, -while lxml.etree puts it into the .target property and leaves it out of -the .text property. The pi.text in ElementTree therefore -correspondents to pi.target + " " + pi.text in lxml.etree.

    -
  • -
  • Because etree is built on top of libxml2, which is namespace prefix aware, -etree preserves namespaces declarations and prefixes while ElementTree tends -to come up with its own prefixes (ns0, ns1, etc). When no namespace prefix -is given, however, etree creates ElementTree style prefixes as well.

    -
  • -
  • etree has a 'prefix' attribute (read-only) on elements giving the Element's -prefix, if this is known, and None otherwise (in case of no namespace at -all, or default namespace).

    -
  • -
  • etree further allows passing an 'nsmap' dictionary to the Element and -SubElement element factories to explicitly map namespace prefixes to -namespace URIs. These will be translated into namespace declarations on -that element. This means that in the probably rare case that you need to -construct an attribute called 'nsmap', you need to be aware that unlike in -ElementTree, you cannot pass it as a keyword argument to the Element and -SubElement factories directly.

    -
  • -
  • ElementTree allows QName objects as attribute values and resolves their -prefix on serialisation (e.g. an attribute value QName("{myns}myname") -becomes "p:myname" if "p" is the namespace prefix of "myns"). lxml.etree -also allows you to set attribute values from QName instances (and also .text -values), but it resolves their prefix immediately and stores the plain text -value. So, if prefixes are modified later on, e.g. by moving a subtree to a -different tree (which reassigns the prefix mappings), the text values will -not be updated and you might end up with an undefined prefix.

    -
  • -
  • etree elements can be copied using copy.deepcopy() and copy.copy(), -just like ElementTree's. However, copy.copy() does not create a -shallow copy where elements are shared between trees, as this makes no sense -in the context of libxml2 trees. Note that lxml can deep-copy trees -considerably faster than ElementTree, so a deep copy might still be fast -enough to replace a shallow copy in your case.

    -
  • -
-
- - - \ No newline at end of file diff --git a/doc/html/credits.html b/doc/html/credits.html deleted file mode 100644 index 87c69a8..0000000 --- a/doc/html/credits.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - -Credits - - - -
-

Credits

- -
-

Main contributors

-
-
Stefan Behnel
-
main developer and maintainer
-
Martijn Faassen
-
creator of lxml and initial main developer
-
Ian Bicking
-
creator and maintainer of lxml.html
-
Holger Joukl
-
ISO-Schematron support, development on lxml.objectify, bug reports, feedback
-
Simon Sapin
-
external maintenance and development of the cssselect package
-
Marc-Antoine Parent
-
XPath extension function help and patches
-
Olivier Grisel
-
improved (c)ElementTree compatibility patches, -website improvements.
-
Kasimier Buchcik
-
help with specs and libxml2
-
Florian Wagner
-
help with copy.deepcopy support, bug reporting
-
Emil Kroymann
-
help with encoding support, bug reporting
-
Paul Everitt
-
bug reporting, feedback on API design
-
Victor Ng
-
Discussions on memory management strategies, vlibxml2
-
Robert Kern
-
feedback on API design
-
Andreas Pakulat
-
rpath linking support, doc improvements
-
David Sankel
-
building statically on Windows
-
Marcin Kasperski
-
PDF documentation generation
-
Sidnei da Silva
-
official MS Windows builds
-
Pascal Oberndörfer
-
official Mac-OS builds
-
-

... and lots of other people who contributed to lxml by reporting -bugs, discussing its functionality or blaming the docs for the bugs in -their code. Thank you all, user feedback and discussions form a very -important part of an Open Source project!

-
-
-

Special thanks goes to:

-
    -
  • Daniel Veillard and the libxml2 project for a great XML library.
  • -
  • Fredrik Lundh for ElementTree, its API, and the competition through -cElementTree.
  • -
  • Greg Ewing (Pyrex) and Robert Bradshaw et al. (Cython) for the -binding technology.
  • -
  • Jonathan Stoppani for hosting the new mailing list on lxml.de.
  • -
  • the codespeak crew, in particular Philipp von Weitershausen and -Holger Krekel for originally hosting lxml on codespeak.net
  • -
-
-
- - - \ No newline at end of file diff --git a/doc/html/cssselect.html b/doc/html/cssselect.html deleted file mode 100644 index b7d0a11..0000000 --- a/doc/html/cssselect.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - -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 -ObjectPath in the lxml.objectify module. The newest child of this family -is CSS selection, which is made available in form of the lxml.cssselect -module.

-

Although it started its life in lxml, cssselect is now an independent project. -It translates CSS selectors to XPath 1.0 expressions that can be used with -lxml's XPath engine. lxml.cssselect adds a few convenience shortcuts into -that package.

-

To install cssselect, run

-
-pip install cssselect
-
-

lxml will then import and use it automatically.

- -
-

The CSSSelector class

-

The most important class in the lxml.cssselect module is CSSSelector. It -provides the same interface as the XPath class, but accepts a CSS selector -expression as input:

-
>>> from lxml.cssselect import CSSSelector
->>> sel = CSSSelector('div.content')
->>> sel  #doctest: +ELLIPSIS
-<CSSSelector ... for 'div.content'>
->>> sel.css
-'div.content'
-
-

The selector actually compiles to XPath, and you can see the -expression by inspecting the object:

-
>>> sel.path
-"descendant-or-self::div[@class and contains(concat(' ', normalize-space(@class), ' '), ' content ')]"
-
-

To use the selector, simply call it with a document or element -object:

-
>>> from lxml.etree import fromstring
->>> h = fromstring('''<div id="outer">
-...   <div id="inner" class="content body">
-...       text
-...   </div></div>''')
->>> [e.get('id') for e in sel(h)]
-['inner']
-
-

Using CSSSelector is equivalent to translating with cssselect -and using the XPath class:

-
>>> from cssselect import GenericTranslator
->>> from lxml.etree import XPath
->>> sel = XPath(GenericTranslator().css_to_xpath('div.content'))
-
-

CSSSelector takes a translator parameter to let you choose which -translator to use. It can be 'xml' (the default), 'xhtml', 'html' -or a Translator object.

-
-
-

The cssselect method

-

lxml Element objects have a cssselect convenience method.

-
>>> h.cssselect('div.content') == sel(h)
-True
-
-

Note however that pre-compiling the expression with the CSSSelector or -XPath class can provide a substantial speedup.

-

The method also accepts a translator parameter. On HtmlElement -objects, the default is changed to 'html'.

-
-
-

Supported Selectors

-

Most Level 3 selectors are supported. The details are in the -cssselect documentation.

-
-
-

Namespaces

-

In CSS you can use namespace-prefix|element, similar to -namespace-prefix:element in an XPath expression. In fact, it maps -one-to-one, and the same rules are used to map namespace prefixes to -namespace URIs: the CSSSelector class accepts a dictionary as its -namespaces argument.

-
-
- - - \ No newline at end of file diff --git a/doc/html/element_classes.html b/doc/html/element_classes.html deleted file mode 100644 index 1162b27..0000000 --- a/doc/html/element_classes.html +++ /dev/null @@ -1,532 +0,0 @@ - - - - - -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 -default for all elements generated by a specific parser, only for a -specific tag name in a specific namespace or even for an exact element -at a specific position in the tree.

-

Custom Elements must inherit from the lxml.etree.ElementBase class, which -provides the Element interface for subclasses:

-
>>> from lxml import etree
-
->>> class honk(etree.ElementBase):
-...    @property
-...    def honking(self):
-...       return self.get('honking') == 'true'
-
-

This defines a new Element class honk with a property honking.

-

The following document describes how you can make lxml.etree use these -custom Element classes.

- -
-

Background on Element proxies

-

Being based on libxml2, lxml.etree holds the entire XML tree in a C -structure. To communicate with Python code, it creates Python proxy -objects for the XML elements on demand.

-
-proxies.png -
-

The mapping between C elements and Python Element classes is -completely configurable. When you ask lxml.etree for an Element by -using its API, it will instantiate your classes for you. All you have -to do is tell lxml which class to use for which kind of Element. This -is done through a class lookup scheme, as described in the sections -below.

-
-
-

Element initialization

-

There is one thing to know up front. Element classes must not have -an __init___ or __new__ method. There should not be any -internal state either, except for the data stored in the underlying -XML tree. Element instances are created and garbage collected at -need, so there is normally no way to predict when and how often a -proxy is created for them. Even worse, when the __init__ method -is called, the object is not even initialized yet to represent the XML -tag, so there is not much use in providing an __init__ method in -subclasses.

-

Most use cases will not require any class initialisation or proxy -state, so you can content yourself with skipping to the next section -for now. However, if you really need to set up your element class on -instantiation, or need a way to persistently store state in the proxy -instances instead of the XML tree, here is a way to do so.

-

There is one important guarantee regarding Element proxies. Once a -proxy has been instantiated, it will keep alive as long as there is a -Python reference to it, and any access to the XML element in the tree -will return this very instance. Therefore, if you need to store local -state in a custom Element class (which is generally discouraged), you -can do so by keeping the Elements in a tree alive. If the tree -doesn't change, you can simply do this:

-
proxy_cache = list(root.iter())
-
-

or

-
proxy_cache = set(root.iter())
-
-

or use any other suitable container. Note that you have to keep this -cache manually up to date if the tree changes, which can get tricky in -cases.

-

For proxy initialisation, ElementBase classes have an _init() -method that can be overridden, as oppose to the normal __init__() -method. It can be used to modify the XML tree, e.g. to construct -special children or verify and update attributes.

-

The semantics of _init() are as follows:

-
    -
  • It is called once on Element class instantiation time. That is, -when a Python representation of the element is created by lxml. At -that time, the element object is completely initialized to represent -a specific XML element within the tree.
  • -
  • The method has complete access to the XML tree. Modifications can be done -in exactly the same way as anywhere else in the program.
  • -
  • Python representations of elements may be created multiple times during the -lifetime of an XML element in the underlying C tree. The _init() code -provided by subclasses must take special care by itself that multiple -executions either are harmless or that they are prevented by some kind of -flag in the XML tree. The latter can be achieved by modifying an attribute -value or by removing or adding a specific child node and then verifying this -before running through the init process.
  • -
  • Any exceptions raised in _init() will be propagated through the API -call that lead to the creation of the Element. So be careful with the code -you write here as its exceptions may turn up in various unexpected places.
  • -
-
-
-

Setting up a class lookup scheme

-

The first thing to do when deploying custom element classes is to register a -class lookup scheme on a parser. lxml.etree provides quite a number of -different schemes that also support class lookup based on namespaces or -attribute values. Most lookups support fallback chaining, which allows the -next lookup mechanism to take over when the previous one fails to find a -class.

-

For example, setting the honk Element as a default element class -for a parser works as follows:

-
>>> parser_lookup = etree.ElementDefaultClassLookup(element=honk)
->>> parser = etree.XMLParser()
->>> parser.set_element_class_lookup(parser_lookup)
-
-

There is one drawback of the parser based scheme: the Element() factory -does not know about your specialised parser and creates a new document that -deploys the default parser:

-
>>> el = etree.Element("root")
->>> print(isinstance(el, honk))
-False
-
-

You should therefore avoid using this factory function in code that -uses custom classes. The makeelement() method of parsers provides -a simple replacement:

-
>>> el = parser.makeelement("root")
->>> print(isinstance(el, honk))
-True
-
-

If you use a parser at the module level, you can easily redirect a module -level Element() factory to the parser method by adding code like this:

-
>>> module_level_parser = etree.XMLParser()
->>> Element = module_level_parser.makeelement
-
-

While the XML() and HTML() factories also depend on the default -parser, you can pass them a different parser as second argument:

-
>>> element = etree.XML("<test/>")
->>> print(isinstance(element, honk))
-False
-
->>> element = etree.XML("<test/>", parser)
->>> print(isinstance(element, honk))
-True
-
-

Whenever you create a document with a parser, it will inherit the lookup -scheme and all subsequent element instantiations for this document will use -it:

-
>>> element = etree.fromstring("<test/>", parser)
->>> print(isinstance(element, honk))
-True
->>> el = etree.SubElement(element, "subel")
->>> print(isinstance(el, honk))
-True
-
-

For testing code in the Python interpreter and for small projects, you -may also consider setting a lookup scheme on the default parser. To -avoid interfering with other modules, however, it is usually a better -idea to use a dedicated parser for each module (or a parser pool when -using threads) and then register the required lookup scheme only for -this parser.

-
-

Default class lookup

-

This is the most simple lookup mechanism. It always returns the default -element class. Consequently, no further fallbacks are supported, but this -scheme is a nice fallback for other custom lookup mechanisms. Specifically, -it also handles comments and processing instructions, which are easy to -forget about when mapping proxies to classes.

-

Usage:

-
>>> lookup = etree.ElementDefaultClassLookup()
->>> parser = etree.XMLParser()
->>> parser.set_element_class_lookup(lookup)
-
-

Note that the default for new parsers is to use the global fallback, which is -also the default lookup (if not configured otherwise).

-

To change the default element implementation, you can pass your new class to -the constructor. While it accepts classes for element, comment and -pi nodes, most use cases will only override the element class:

-
>>> el = parser.makeelement("myelement")
->>> print(isinstance(el, honk))
-False
-
->>> lookup = etree.ElementDefaultClassLookup(element=honk)
->>> parser.set_element_class_lookup(lookup)
-
->>> el = parser.makeelement("myelement")
->>> print(isinstance(el, honk))
-True
->>> el.honking
-False
->>> el = parser.makeelement("myelement", honking='true')
->>> etree.tostring(el)
-b'<myelement honking="true"/>'
->>> el.honking
-True
-
->>> root = etree.fromstring(
-...     '<root honking="true"><!--comment--></root>', parser)
->>> root.honking
-True
->>> print(root[0].text)
-comment
-
-
-
-

Namespace class lookup

-

This is an advanced lookup mechanism that supports namespace/tag-name specific -element classes. You can select it by calling:

-
>>> lookup = etree.ElementNamespaceClassLookup()
->>> parser = etree.XMLParser()
->>> parser.set_element_class_lookup(lookup)
-
-

See the separate section on implementing namespaces below to learn how to -make use of it.

-

This scheme supports a fallback mechanism that is used in the case where the -namespace is not found or no class was registered for the element name. -Normally, the default class lookup is used here. To change it, pass the -desired fallback lookup scheme to the constructor:

-
>>> fallback = etree.ElementDefaultClassLookup(element=honk)
->>> lookup = etree.ElementNamespaceClassLookup(fallback)
->>> parser.set_element_class_lookup(lookup)
-
->>> root = etree.fromstring(
-...     '<root honking="true"><!--comment--></root>', parser)
->>> root.honking
-True
->>> print(root[0].text)
-comment
-
-
-
-

Attribute based lookup

-

This scheme uses a mapping from attribute values to classes. An attribute -name is set at initialisation time and is then used to find the corresponding -value in a dictionary. It is set up as follows:

-
>>> id_class_mapping = {'1234' : honk} # maps attribute values to classes
-
->>> lookup = etree.AttributeBasedElementClassLookup(
-...                                      'id', id_class_mapping)
->>> parser = etree.XMLParser()
->>> parser.set_element_class_lookup(lookup)
-
-

And here is how to use it:

-
>>> xml = '<a id="123"><b id="1234"/><b id="1234" honking="true"/></a>'
->>> a = etree.fromstring(xml, parser)
-
->>> a.honking       # id does not match !
-Traceback (most recent call last):
-AttributeError: 'lxml.etree._Element' object has no attribute 'honking'
-
->>> a[0].honking
-False
->>> a[1].honking
-True
-
-

This lookup scheme uses its fallback if the attribute is not found or -its value is not in the mapping. Normally, the default class lookup -is used here. If you want to use the namespace lookup, for example, -you can use this code:

-
>>> fallback = etree.ElementNamespaceClassLookup()
->>> lookup = etree.AttributeBasedElementClassLookup(
-...                       'id', id_class_mapping, fallback)
->>> parser = etree.XMLParser()
->>> parser.set_element_class_lookup(lookup)
-
-
-
-

Custom element class lookup

-

This is the most customisable way of finding element classes on a per-element -basis. It allows you to implement a custom lookup scheme in a subclass:

-
>>> class MyLookup(etree.CustomElementClassLookup):
-...     def lookup(self, node_type, document, namespace, name):
-...         if node_type == 'element':
-...             return honk  # be a bit more selective here ...
-...         else:
-...             return None  # pass on to (default) fallback
-
->>> parser = etree.XMLParser()
->>> parser.set_element_class_lookup(MyLookup())
-
->>> root = etree.fromstring(
-...     '<root honking="true"><!--comment--></root>', parser)
->>> root.honking
-True
->>> print(root[0].text)
-comment
-
-

The .lookup() method must return either None (which triggers the -fallback mechanism) or a subclass of lxml.etree.ElementBase. It -can take any decision it wants based on the node type (one of -"element", "comment", "PI", "entity"), the XML document of the -element, or its namespace or tag name.

-
-
-

Tree based element class lookup in Python

-

Taking more elaborate decisions than allowed by the custom scheme is -difficult to achieve in pure Python, as it results in a -chicken-and-egg problem. It would require access to the tree - before -the elements in the tree have been instantiated as Python Element -proxies.

-

Luckily, there is a way to do this. The PythonElementClassLookup -works similar to the custom lookup scheme:

-
>>> class MyLookup(etree.PythonElementClassLookup):
-...     def lookup(self, document, element):
-...         return MyElementClass # defined elsewhere
-
->>> parser = etree.XMLParser()
->>> parser.set_element_class_lookup(MyLookup())
-
-

As before, the first argument to the lookup() method is the opaque -document instance that contains the Element. The second arguments is a -lightweight Element proxy implementation that is only valid during the lookup. -Do not try to keep a reference to it. Once the lookup is finished, the proxy -will become invalid. You will get an AssertionError if you access any of -the properties or methods outside the scope of the lookup call where they were -instantiated.

-

During the lookup, the element object behaves mostly like a normal Element -instance. It provides the properties tag, text, tail etc. and -supports indexing, slicing and the getchildren(), getparent() -etc. methods. It does not support iteration, nor does it support any kind -of modification. All of its properties are read-only and it cannot be removed -or inserted into other trees. You can use it as a starting point to freely -traverse the tree and collect any kind of information that its elements -provide. Once you have taken the decision which class to use for this -element, you can simply return it and have lxml take care of cleaning up the -instantiated proxy classes.

-

Sidenote: this lookup scheme originally lived in a separate module called -lxml.pyclasslookup.

-
-
-
-

Generating XML with custom classes

-

Up to lxml 2.1, you could not instantiate proxy classes yourself. -Only lxml.etree could do that when creating an object representation -of an existing XML element. Since lxml 2.2, however, instantiating -this class will simply create a new Element:

-
>>> el = honk(honking='true')
->>> el.tag
-'honk'
->>> el.honking
-True
-
-

Note, however, that the proxy you create here will be garbage -collected just like any other proxy. You can therefore not count on -lxml.etree using the same class that you instantiated when you access -this Element a second time after letting its reference go. You should -therefore always use a corresponding class lookup scheme that returns -your Element proxy classes for the elements that they create. The -ElementNamespaceClassLookup is generally a good match.

-

You can use custom Element classes to quickly create XML fragments:

-
>>> class hale(etree.ElementBase): pass
->>> class bopp(etree.ElementBase): pass
-
->>> el = hale( "some ", honk(honking = 'true'), bopp, " text" )
-
->>> print(etree.tostring(el, encoding='unicode'))
-<hale>some <honk honking="true"/><bopp/> text</hale>
-
-
-
-

Implementing namespaces

-

lxml allows you to implement namespaces, in a rather literal sense. After -setting up the namespace class lookup mechanism as described above, you can -build a new element namespace (or retrieve an existing one) by calling the -get_namespace(uri) method of the lookup:

-
>>> lookup = etree.ElementNamespaceClassLookup()
->>> parser = etree.XMLParser()
->>> parser.set_element_class_lookup(lookup)
-
->>> namespace = lookup.get_namespace('http://hui.de/honk')
-
-

and then register the new element type with that namespace, say, under the tag -name honk:

-
>>> namespace['honk'] = honk
-
-

If you have many Element classes declared in one module, and they are -all named like the elements they create, you can simply use -namespace.update(globals()) at the end of your module to declare them -automatically. The implementation is smart enough to ignore -everything that is not an Element class.

-

After this, you create and use your XML elements through the normal API of -lxml:

-
>>> xml = '<honk xmlns="http://hui.de/honk" honking="true"/>'
->>> honk_element = etree.XML(xml, parser)
->>> print(honk_element.honking)
-True
-
-

The same works when creating elements by hand:

-
>>> honk_element = parser.makeelement('{http://hui.de/honk}honk',
-...                                   honking='true')
->>> print(honk_element.honking)
-True
-
-

Essentially, what this allows you to do, is to give Elements a custom API -based on their namespace and tag name.

-

A somewhat related topic are extension functions which use a similar -mechanism for registering Python functions for use in XPath and XSLT.

-

In the setup example above, we associated the honk Element class -only with the 'honk' element. If an XML tree contains different -elements in the same namespace, they do not pick up the same -implementation:

-
>>> xml = ('<honk xmlns="http://hui.de/honk" honking="true">'
-...        '<bla/><!--comment-->'
-...        '</honk>')
->>> honk_element = etree.XML(xml, parser)
->>> print(honk_element.honking)
-True
->>> print(honk_element[0].honking)
-Traceback (most recent call last):
-  ...
-AttributeError: 'lxml.etree._Element' object has no attribute 'honking'
->>> print(honk_element[1].text)
-comment
-
-

You can therefore provide one implementation per element name in each -namespace and have lxml select the right one on the fly. If you want one -element implementation per namespace (ignoring the element name) or prefer -having a common class for most elements except a few, you can specify a -default implementation for an entire namespace by registering that class with -the empty element name (None).

-

You may consider following an object oriented approach here. If you build a -class hierarchy of element classes, you can also implement a base class for a -namespace that is used if no specific element class is provided. Again, you -can just pass None as an element name:

-
>>> class HonkNSElement(etree.ElementBase):
-...    def honk(self):
-...       return "HONK"
->>> namespace[None] = HonkNSElement  # default Element for namespace
-
->>> class HonkElement(HonkNSElement):
-...    @property
-...    def honking(self):
-...       return self.get('honking') == 'true'
->>> namespace['honk'] = HonkElement  # Element for specific tag
-
-

Now you can rely on lxml to always return objects of type HonkNSElement or its -subclasses for elements of this namespace:

-
>>> xml = ('<honk xmlns="http://hui.de/honk" honking="true">'
-...        '<bla/><!--comment-->'
-...        '</honk>')
->>> honk_element = etree.fromstring(xml, parser)
-
->>> print(type(honk_element))
-<class 'HonkElement'>
->>> print(type(honk_element[0]))
-<class 'HonkNSElement'>
-
->>> print(honk_element.honking)
-True
->>> print(honk_element.honk())
-HONK
-
->>> print(honk_element[0].honk())
-HONK
->>> print(honk_element[0].honking)
-Traceback (most recent call last):
-...
-AttributeError: 'HonkNSElement' object has no attribute 'honking'
-
->>> print(honk_element[1].text)  # uses fallback for non-elements
-comment
-
-

Since lxml 4.1, the registration is more conveniently done with -class decorators. The namespace registry object is callable with -a name (or None) as argument and can then be used as decorator.

-
>>> honk_elements = lookup.get_namespace('http://hui.de/honk')
-
->>> @honk_elements(None)
-... class HonkNSElement(etree.ElementBase):
-...    def honk(self):
-...       return "HONK"
-
-

If the class has the same name as the tag, you can also leave out the call -and use the blank decorator instead:

-
-
->>> @honk_elements
-... class honkel(HonkNSElement):
-...    @property
-...    def honking(self):
-...       return self.get('honking') == 'true'
-
-
->>> xml = '<honkel xmlns="http://hui.de/honk" honking="true"><bla/><!--comment--></honkel>'
->>> honk_element = etree.fromstring(xml, parser)
-
-
->>> print(type(honk_element))
-<class 'honkel'>
->>> print(type(honk_element[0]))
-<class 'HonkNSElement'>
-
-
-
-
- - - \ No newline at end of file diff --git a/doc/html/elementsoup.html b/doc/html/elementsoup.html deleted file mode 100644 index 483c608..0000000 --- a/doc/html/elementsoup.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - -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 -different HTML parsers, -each of which has its advantages and disadvantages (see the link).

-

lxml can make use of BeautifulSoup as a parser backend, just like BeautifulSoup -can employ lxml as a parser. When using BeautifulSoup from lxml, however, the -default is to use Python's integrated HTML parser in the -html.parser module. -In order to make use of the HTML5 parser of -html5lib instead, it is better -to go directly through the html5parser module in -lxml.html.

-

A very nice feature of BeautifulSoup is its excellent support for encoding -detection which can provide better results for real-world HTML pages that -do not (correctly) declare their encoding.

-

lxml interfaces with BeautifulSoup through the lxml.html.soupparser -module. It provides three main functions: fromstring() and parse() -to parse a string or file using BeautifulSoup into an lxml.html -document, and convert_tree() to convert an existing BeautifulSoup -tree into a list of top-level Elements.

- -
-

Parsing with the soupparser

-

The functions fromstring() and parse() behave as known from -lxml. The first returns a root Element, the latter returns an -ElementTree.

-

There is also a legacy module called lxml.html.ElementSoup, which -mimics the interface provided by Fredrik Lundh's ElementSoup -module. Note that the soupparser module was added in lxml 2.0.3. -Previous versions of lxml 2.0.x only have the ElementSoup module.

-

Here is a document full of tag soup, similar to, but not quite like, HTML:

-
>>> tag_soup = '''
-... <meta/><head><title>Hello</head><body onload=crash()>Hi all<p>'''
-
-

All you need to do is pass it to the fromstring() function:

-
>>> from lxml.html.soupparser import fromstring
->>> root = fromstring(tag_soup)
-
-

To see what we have here, you can serialise it:

-
>>> from lxml.etree import tostring
->>> print(tostring(root, pretty_print=True).strip())
-<html>
-  <meta/>
-  <head>
-    <title>Hello</title>
-  </head>
-  <body onload="crash()">Hi all<p/></body>
-</html>
-
-

Not quite what you'd expect from an HTML page, but, well, it was broken -already, right? The parser did its best, and so now it's a tree.

-

To control how Element objects are created during the conversion -of the tree, you can pass a makeelement factory function to -parse() and fromstring(). By default, this is based on the -HTML parser defined in lxml.html.

-

For a quick comparison, libxml2 2.9.1 parses the same tag soup as -follows. The only difference is that libxml2 tries harder to adhere -to the structure of an HTML document and moves misplaced tags where -they (likely) belong. Note, however, that the result can vary between -parser versions.

-
<html>
-  <head>
-    <meta/>
-    <title>Hello</title>
-  </head>
-  <body onload="crash()">Hi all<p/></body>
-</html>
-
-
-
-

Entity handling

-

By default, the BeautifulSoup parser also replaces the entities it -finds by their character equivalent.

-
>>> tag_soup = '<body>&copy;&euro;&#45;&#245;&#445;<p>'
->>> body = fromstring(tag_soup).find('.//body')
->>> body.text
-u'\xa9\u20ac-\xf5\u01bd'
-
-

If you want them back on the way out, you can just serialise with the -default encoding, which is 'US-ASCII'.

-
>>> tostring(body)
-'<body>&#169;&#8364;-&#245;&#445;<p/></body>'
-
->>> tostring(body, method="html")
-'<body>&#169;&#8364;-&#245;&#445;<p></p></body>'
-
-

Any other encoding will output the respective byte sequences.

-
>>> tostring(body, encoding="utf-8")
-'<body>\xc2\xa9\xe2\x82\xac-\xc3\xb5\xc6\xbd<p/></body>'
-
->>> tostring(body, method="html", encoding="utf-8")
-'<body>\xc2\xa9\xe2\x82\xac-\xc3\xb5\xc6\xbd<p></p></body>'
-
->>> tostring(body, encoding='unicode')
-u'<body>\xa9\u20ac-\xf5\u01bd<p/></body>'
-
->>> tostring(body, method="html", encoding='unicode')
-u'<body>\xa9\u20ac-\xf5\u01bd<p></p></body>'
-
-
-
-

Using soupparser as a fallback

-

The downside of using this parser is that it is much slower than -the C implemented HTML parser of libxml2 that lxml uses. So if -performance matters, you might want to consider using soupparser -only as a fallback for certain cases.

-

One common problem of lxml's parser is that it might not get the -encoding right in cases where the document contains a <meta> tag -at the wrong place. In this case, you can exploit the fact that lxml -serialises much faster than most other HTML libraries for Python. -Just serialise the document to unicode and if that gives you an -exception, re-parse it with BeautifulSoup to see if that works -better.

-
>>> tag_soup = '''\
-... <meta http-equiv="Content-Type"
-...       content="text/html;charset=utf-8" />
-... <html>
-...   <head>
-...     <title>Hello W\xc3\xb6rld!</title>
-...   </head>
-...   <body>Hi all</body>
-... </html>'''
-
->>> import lxml.html
->>> import lxml.html.soupparser
-
->>> root = lxml.html.fromstring(tag_soup)
->>> try:
-...     ignore = tostring(root, encoding='unicode')
-... except UnicodeDecodeError:
-...     root = lxml.html.soupparser.fromstring(tag_soup)
-
-
-
-

Using only the encoding detection

-

Even if you prefer lxml's fast HTML parser, you can still benefit -from BeautifulSoup's support for encoding detection in the -UnicodeDammit class. Once it succeeds in decoding the data, -you can simply pass the resulting Unicode string into lxml's parser.

-
>>> try:
-...    from bs4 import UnicodeDammit             # BeautifulSoup 4
-...
-...    def decode_html(html_string):
-...        converted = UnicodeDammit(html_string)
-...        if not converted.unicode_markup:
-...            raise UnicodeDecodeError(
-...                "Failed to detect encoding, tried [%s]",
-...                ', '.join(converted.tried_encodings))
-...        # print converted.original_encoding
-...        return converted.unicode_markup
-...
-... except ImportError:
-...    from BeautifulSoup import UnicodeDammit   # BeautifulSoup 3
-...
-...    def decode_html(html_string):
-...        converted = UnicodeDammit(html_string, isHTML=True)
-...        if not converted.unicode:
-...            raise UnicodeDecodeError(
-...                "Failed to detect encoding, tried [%s]",
-...                ', '.join(converted.triedEncodings))
-...        # print converted.originalEncoding
-...        return converted.unicode
-
->>> root = lxml.html.fromstring(decode_html(tag_soup))
-
-
-
- - - \ No newline at end of file diff --git a/doc/html/extensions.html b/doc/html/extensions.html deleted file mode 100644 index ee03e35..0000000 --- a/doc/html/extensions.html +++ /dev/null @@ -1,537 +0,0 @@ - - - - - -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:

-
<xsl:value-of select="f:myPythonFunction(.//sometag)" />
-
-

and extension elements in XSLT as in the following example:

-
<xsl:template match="*">
-    <my:python-extension>
-        <some-content />
-    </my:python-extension>
-</xsl:template>
-
- -
-

XPath Extension functions

-

Here is how an extension function looks like. As the first argument, -it always receives a context object (see below). The other arguments -are provided by the respective call in the XPath expression, one in -the following examples. Any number of arguments is allowed:

-
>>> def hello(context, a):
-...    return "Hello %s" % a
->>> def ola(context, a):
-...    return "Ola %s" % a
->>> def loadsofargs(context, *args):
-...    return "Got %d arguments." % len(args)
-
-
-

The FunctionNamespace

-

In order to use a function in XPath or XSLT, it needs to have a -(namespaced) name by which it can be called during evaluation. This -is done using the FunctionNamespace class. For simplicity, we choose -the empty namespace (None):

-
>>> from lxml import etree
->>> ns = etree.FunctionNamespace(None)
->>> ns['hello'] = hello
->>> ns['countargs'] = loadsofargs
-
-

This registers the function hello with the name hello in the default -namespace (None), and the function loadsofargs with the name countargs.

-

Since lxml 4.1, it is preferred to use the FunctionNamespace as a decorator. -Either pass an explicit function name (@ns("countargs")), or just use the -bare decorator to register the function under its own name:

-
>>> @ns
-... def hello(context, a):
-...    return "Hello %s" % a
-
-

Now we're going to create a document that we can run XPath expressions -against:

-
>>> root = etree.XML('<a><b>Haegar</b></a>')
->>> doc = etree.ElementTree(root)
-
-

Done. Now we can have XPath expressions call our new function:

-
>>> print(root.xpath("hello('Dr. Falken')"))
-Hello Dr. Falken
->>> print(root.xpath('hello(local-name(*))'))
-Hello b
->>> print(root.xpath('hello(string(b))'))
-Hello Haegar
->>> print(root.xpath('countargs(., b, ./*)'))
-Got 3 arguments.
-
-

Note how we call both a Python function (hello()) and an XPath built-in -function (string()) in exactly the same way. Normally, however, you would -want to separate the two in different namespaces. The FunctionNamespace class -allows you to do this:

-
>>> ns = etree.FunctionNamespace('http://mydomain.org/myfunctions')
->>> ns['hello'] = hello
-
->>> prefixmap = {'f' : 'http://mydomain.org/myfunctions'}
->>> print(root.xpath('f:hello(local-name(*))', namespaces=prefixmap))
-Hello b
-
-
-
-

Global prefix assignment

-

In the last example, you had to specify a prefix for the function namespace. -If you always use the same prefix for a function namespace, you can also -register it with the namespace:

-
>>> ns = etree.FunctionNamespace('http://mydomain.org/myother/functions')
->>> ns.prefix = 'es'
->>> ns['hello'] = ola
-
->>> print(root.xpath('es:hello(local-name(*))'))
-Ola b
-
-

This is a global assignment, so take care not to assign the same prefix to -more than one namespace. The resulting behaviour in that case is completely -undefined. It is always a good idea to consistently use the same meaningful -prefix for each namespace throughout your application.

-

The prefix assignment only works with functions and FunctionNamespace objects, -not with the general Namespace object that registers element classes. The -reasoning is that elements in lxml do not care about prefixes anyway, so it -would rather complicate things than be of any help.

-
-
-

The XPath context

-

Functions get a context object as first parameter. In lxml 1.x, this value -was None, but since lxml 2.0 it provides two properties: eval_context and -context_node. The context node is the Element where the current function -is called:

-
>>> def print_tag(context, nodes):
-...     print("%s: %s" % (context.context_node.tag, [ n.tag for n in nodes ]))
-
->>> ns = etree.FunctionNamespace('http://mydomain.org/printtag')
->>> ns.prefix = "pt"
->>> ns["print_tag"] = print_tag
-
->>> ignore = root.xpath("//*[pt:print_tag(.//*)]")
-a: ['b']
-b: []
-
-

The eval_context is a dictionary that is local to the evaluation. It -allows functions to keep state:

-
>>> def print_context(context):
-...     context.eval_context[context.context_node.tag] = "done"
-...     print(sorted(context.eval_context.items()))
->>> ns["print_context"] = print_context
-
->>> ignore = root.xpath("//*[pt:print_context()]")
-[('a', 'done')]
-[('a', 'done'), ('b', 'done')]
-
-
-
-

Evaluators and XSLT

-

Extension functions work for all ways of evaluating XPath expressions and for -XSL transformations:

-
>>> e = etree.XPathEvaluator(doc)
->>> print(e('es:hello(local-name(/a))'))
-Ola a
-
->>> namespaces = {'f' : 'http://mydomain.org/myfunctions'}
->>> e = etree.XPathEvaluator(doc, namespaces=namespaces)
->>> print(e('f:hello(local-name(/a))'))
-Hello a
-
->>> xslt = etree.XSLT(etree.XML('''
-...   <stylesheet version="1.0"
-...          xmlns="http://www.w3.org/1999/XSL/Transform"
-...          xmlns:es="http://mydomain.org/myother/functions">
-...     <output method="text" encoding="ASCII"/>
-...     <template match="/">
-...       <value-of select="es:hello(string(//b))"/>
-...     </template>
-...   </stylesheet>
-... '''))
->>> print(xslt(doc))
-Ola Haegar
-
-

It is also possible to register namespaces with a single evaluator after its -creation. While the following example involves no functions, the idea should -still be clear:

-
>>> f = StringIO('<a xmlns="http://mydomain.org/myfunctions" />')
->>> ns_doc = etree.parse(f)
->>> e = etree.XPathEvaluator(ns_doc)
->>> e('/a')
-[]
-
-

This returns nothing, as we did not ask for the right namespace. When we -register the namespace with the evaluator, however, we can access it via a -prefix:

-
>>> e.register_namespace('foo', 'http://mydomain.org/myfunctions')
->>> e('/foo:a')[0].tag
-'{http://mydomain.org/myfunctions}a'
-
-

Note that this prefix mapping is only known to this evaluator, as opposed to -the global mapping of the FunctionNamespace objects:

-
>>> e2 = etree.XPathEvaluator(ns_doc)
->>> e2('/foo:a')
-Traceback (most recent call last):
-...
-lxml.etree.XPathEvalError: Undefined namespace prefix
-
-
-
-

Evaluator-local extensions

-

Apart from the global registration of extension functions, there is also a way -of making extensions known to a single Evaluator or XSLT. All evaluators and -the XSLT object accept a keyword argument extensions in their constructor. -The value is a dictionary mapping (namespace, name) tuples to functions:

-
>>> extensions = {('local-ns', 'local-hello') : hello}
->>> namespaces = {'l' : 'local-ns'}
-
->>> e = etree.XPathEvaluator(doc, namespaces=namespaces, extensions=extensions)
->>> print(e('l:local-hello(string(b))'))
-Hello Haegar
-
-

For larger numbers of extension functions, you can define classes or modules -and use the Extension helper:

-
>>> class MyExt:
-...     def function1(self, _, arg):
-...         return '1'+arg
-...     def function2(self, _, arg):
-...         return '2'+arg
-...     def function3(self, _, arg):
-...         return '3'+arg
-
->>> ext_module = MyExt()
->>> functions = ('function1', 'function2')
->>> extensions = etree.Extension( ext_module, functions, ns='local-ns' )
-
->>> e = etree.XPathEvaluator(doc, namespaces=namespaces, extensions=extensions)
->>> print(e('l:function1(string(b))'))
-1Haegar
-
-

The optional second argument to Extension can either be a -sequence of names to select from the module, a dictionary that -explicitly maps function names to their XPath alter-ego or None -(explicitly passed) to take all available functions under their -original name (if their name does not start with '_').

-

The additional ns keyword argument takes a namespace URI or -None (also if left out) for the default namespace. The following -examples will therefore all do the same thing:

-
>>> functions = ('function1', 'function2', 'function3')
->>> extensions = etree.Extension( ext_module, functions )
->>> e = etree.XPathEvaluator(doc, extensions=extensions)
->>> print(e('function1(function2(function3(string(b))))'))
-123Haegar
-
->>> extensions = etree.Extension( ext_module, functions, ns=None )
->>> e = etree.XPathEvaluator(doc, extensions=extensions)
->>> print(e('function1(function2(function3(string(b))))'))
-123Haegar
-
->>> extensions = etree.Extension(ext_module)
->>> e = etree.XPathEvaluator(doc, extensions=extensions)
->>> print(e('function1(function2(function3(string(b))))'))
-123Haegar
-
->>> functions = {
-...     'function1' : 'function1',
-...     'function2' : 'function2',
-...     'function3' : 'function3'
-...     }
->>> extensions = etree.Extension(ext_module, functions)
->>> e = etree.XPathEvaluator(doc, extensions=extensions)
->>> print(e('function1(function2(function3(string(b))))'))
-123Haegar
-
-

For convenience, you can also pass a sequence of extensions:

-
>>> extensions1 = etree.Extension(ext_module)
->>> extensions2 = etree.Extension(ext_module, ns='local-ns')
->>> e = etree.XPathEvaluator(doc, extensions=[extensions1, extensions2],
-...                          namespaces=namespaces)
->>> print(e('function1(l:function2(function3(string(b))))'))
-123Haegar
-
-
-
-

What to return from a function

-

Extension functions can return any data type for which there is an XPath -equivalent (see the documentation on XPath return values). This includes -numbers, boolean values, elements and lists of elements. Note that integers -will also be returned as floats:

-
>>> def returnsFloat(_):
-...    return 1.7
->>> def returnsInteger(_):
-...    return 1
->>> def returnsBool(_):
-...    return True
->>> def returnFirstNode(_, nodes):
-...    return nodes[0]
-
->>> ns = etree.FunctionNamespace(None)
->>> ns['float'] = returnsFloat
->>> ns['int']   = returnsInteger
->>> ns['bool']  = returnsBool
->>> ns['first'] = returnFirstNode
-
->>> e = etree.XPathEvaluator(doc)
->>> e("float()")
-1.7
->>> e("int()")
-1.0
->>> int( e("int()") )
-1
->>> e("bool()")
-True
->>> e("count(first(//b))")
-1.0
-
-

As the last example shows, you can pass the results of functions back into -the XPath expression. Elements and sequences of elements are treated as -XPath node-sets:

-
>>> def returnsNodeSet(_):
-...     results1 = etree.Element('results1')
-...     etree.SubElement(results1, 'result').text = "Alpha"
-...     etree.SubElement(results1, 'result').text = "Beta"
-...
-...     results2 = etree.Element('results2')
-...     etree.SubElement(results2, 'result').text = "Gamma"
-...     etree.SubElement(results2, 'result').text = "Delta"
-...
-...     results3 = etree.SubElement(results2, 'subresult')
-...     return [results1, results2, results3]
-
->>> ns['new-node-set'] = returnsNodeSet
-
->>> e = etree.XPathEvaluator(doc)
-
->>> r = e("new-node-set()/result")
->>> print([ t.text for t in r ])
-['Alpha', 'Beta', 'Gamma', 'Delta']
-
->>> r = e("new-node-set()")
->>> print([ t.tag for t in r ])
-['results1', 'results2', 'subresult']
->>> print([ len(t) for t in r ])
-[2, 3, 0]
->>> r[0][0].text
-'Alpha'
-
->>> etree.tostring(r[0])
-b'<results1><result>Alpha</result><result>Beta</result></results1>'
-
->>> etree.tostring(r[1])
-b'<results2><result>Gamma</result><result>Delta</result><subresult/></results2>'
-
->>> etree.tostring(r[2])
-b'<subresult/>'
-
-

The current implementation deep-copies newly created elements in node-sets. -Only the elements and their children are passed on, no outlying parents or -tail texts will be available in the result. This also means that in the above -example, the subresult elements in results2 and results3 are no longer -identical within the node-set, they belong to independent trees:

-
>>> print("%s - %s" % (r[1][-1].tag, r[2].tag))
-subresult - subresult
->>> print(r[1][-1] == r[2])
-False
->>> print(r[1][-1].getparent().tag)
-results2
->>> print(r[2].getparent())
-None
-
-

This is an implementation detail that you should be aware of, but you should -avoid relying on it in your code. Note that elements taken from the source -document (the most common case) do not suffer from this restriction. They -will always be passed unchanged.

-
-
-
-

XSLT extension elements

-

Just like the XPath extension functions described above, lxml supports -custom extension elements in XSLT. This means, you can write XSLT -code like this:

-
<xsl:template match="*">
-    <my:python-extension>
-        <some-content />
-    </my:python-extension>
-</xsl:template>
-
-

And then you can implement the element in Python like this:

-
>>> class MyExtElement(etree.XSLTExtension):
-...     def execute(self, context, self_node, input_node, output_parent):
-...         print("Hello from XSLT!")
-...         output_parent.text = "I did it!"
-...         # just copy own content input to output
-...         output_parent.extend( list(self_node) )
-
-

The arguments passed to the .execute() method are

-
-
context
-
The opaque evaluation context. You need this when calling back -into the XSLT processor.
-
self_node
-
A read-only Element object that represents the extension element -in the stylesheet.
-
input_node
-
The current context Element in the input document (also read-only).
-
output_parent
-
The current insertion point in the output document. You can -append elements or set the text value (not the tail). Apart from -that, the Element is read-only.
-
-
-

Declaring extension elements

-

In XSLT, extension elements can be used like any other XSLT element, -except that they must be declared as extensions using the standard -XSLT extension-element-prefixes option:

-
>>> xslt_ext_tree = etree.XML('''
-... <xsl:stylesheet version="1.0"
-...     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-...     xmlns:my="testns"
-...     extension-element-prefixes="my">
-...     <xsl:template match="/">
-...         <foo><my:ext><child>XYZ</child></my:ext></foo>
-...     </xsl:template>
-...     <xsl:template match="child">
-...         <CHILD>--xyz--</CHILD>
-...     </xsl:template>
-... </xsl:stylesheet>''')
-
-

To register the extension, add its namespace and name to the extension -mapping of the XSLT object:

-
>>> my_extension = MyExtElement()
->>> extensions = { ('testns', 'ext') : my_extension }
->>> transform = etree.XSLT(xslt_ext_tree, extensions = extensions)
-
-

Note how we pass an instance here, not the class of the extension. -Now we can run the transformation and see how our extension is -called:

-
>>> root = etree.XML('<dummy/>')
->>> result = transform(root)
-Hello from XSLT!
->>> str(result)
-'<?xml version="1.0"?>\n<foo>I did it!<child>XYZ</child></foo>\n'
-
-
-
-

Applying XSL templates

-

XSLT extensions are a very powerful feature that allows you to -interact directly with the XSLT processor. You have full read-only -access to the input document and the stylesheet, and you can even call -back into the XSLT processor to process templates. Here is an example -that passes an Element into the .apply_templates() method of the -XSLTExtension instance:

-
>>> class MyExtElement(etree.XSLTExtension):
-...     def execute(self, context, self_node, input_node, output_parent):
-...         child = self_node[0]
-...         results = self.apply_templates(context, child)
-...         output_parent.append(results[0])
-
->>> my_extension = MyExtElement()
->>> extensions = { ('testns', 'ext') : my_extension }
->>> transform = etree.XSLT(xslt_ext_tree, extensions = extensions)
-
->>> root = etree.XML('<dummy/>')
->>> result = transform(root)
->>> str(result)
-'<?xml version="1.0"?>\n<foo><CHILD>--xyz--</CHILD></foo>\n'
-
-

Here, we applied the templates to a child of the extension element -itself, i.e. to an element inside the stylesheet instead of an element -of the input document.

-

The return value of .apply_templates() is always a list. It may -contain a mix of elements and strings, collected from the XSLT processing -result. If you want to append these values to the output parent, be aware -that you cannot use the .append() method to add strings. In many -cases, you would only be interested in elements anyway, so you can discard -strings (e.g. formatting whitespace) and append the rest.

-

If you want to include string results in the output, you can either build -an appropriate tree yourself and append that, or you can manually add the -string values to the current output tree, e.g. by concatenating them with -the .tail of the last element that was appended.

-

Note that you can also let lxml build the result tree for you by passing -the output_parent into the .apply_templates() method. In this -case, the result will be None and all content found by applying templates -will be appended to the output parent.

-

If you do not care about string results at all, e.g. because you already -know that they will only contain whitespace, you can pass the option -elements_only=True to the .apply_templates() method, or pass -remove_blank_text=True to remove only those strings that consist -entirely of whitespace.

-
-
-

Working with read-only elements

-

There is one important thing to keep in mind: all Elements that the -execute() method gets to deal with are read-only Elements, so you -cannot modify them. They also will not easily work in the API. For -example, you cannot pass them to the tostring() function or wrap -them in an ElementTree.

-

What you can do, however, is to deepcopy them to make them normal -Elements, and then modify them using the normal etree API. So this -will work:

-
>>> from copy import deepcopy
->>> class MyExtElement(etree.XSLTExtension):
-...     def execute(self, context, self_node, input_node, output_parent):
-...         child = deepcopy(self_node[0])
-...         child.text = "NEW TEXT"
-...         output_parent.append(child)
-
->>> my_extension = MyExtElement()
->>> extensions = { ('testns', 'ext') : my_extension }
->>> transform = etree.XSLT(xslt_ext_tree, extensions = extensions)
-
->>> root = etree.XML('<dummy/>')
->>> result = transform(root)
->>> str(result)
-'<?xml version="1.0"?>\n<foo><child>NEW TEXT</child></foo>\n'
-
-
-
-
- - - \ No newline at end of file diff --git a/doc/html/html5parser.html b/doc/html/html5parser.html deleted file mode 100644 index 949d5ef..0000000 --- a/doc/html/html5parser.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - -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 -HTML5 specification.

-

lxml can benefit from the parsing capabilities of html5lib through -the lxml.html.html5parser module. It provides a similar interface -to the lxml.html module by providing fromstring(), -parse(), document_fromstring(), fragment_fromstring() and -fragments_fromstring() that work like the regular html parsing -functions.

-
-

Differences to regular HTML parsing

-

There are a few differences in the returned tree to the regular HTML -parsing functions from lxml.html. html5lib normalizes some elements -and element structures to a common format. For example even if a tables -does not have a tbody html5lib will inject one automatically:

-
>>> from lxml.html import tostring, html5parser
->>> tostring(html5parser.fromstring("<table><td>foo"))
-'<table><tbody><tr><td>foo</td></tr></tbody></table>'
-
-

Also the parameters the functions accept are different.

-
-
-

Function Reference

-
-
parse(filename_url_or_file):
-
Parses the named file or url, or if the object has a .read() -method, parses from that.
-
document_fromstring(html, guess_charset=True):
-

Parses a document from the given string. This always creates a -correct HTML document, which means the parent node is <html>, -and there is a body and possibly a head.

-

If a bytestring is passed and guess_charset is true the chardet -library (if installed) will guess the charset if ambiguities exist.

-
-
fragment_fromstring(string, create_parent=False, guess_charset=False):
-

Returns an HTML fragment from a string. The fragment must contain -just a single element, unless create_parent is given; -e.g., fragment_fromstring(string, create_parent='div') will -wrap the element in a <div>. If create_parent is true the -default parent tag (div) is used.

-

If a bytestring is passed and guess_charset is true the chardet -library (if installed) will guess the charset if ambiguities exist.

-
-
fragments_fromstring(string, no_leading_text=False, parser=None):
-

Returns a list of the elements found in the fragment. The first item in -the list may be a string. If no_leading_text is true, then it will -be an error if there is leading text, and it will always be a list of -only elements.

-

If a bytestring is passed and guess_charset is true the chardet -library (if installed) will guess the charset if ambiguities exist.

-
-
fromstring(string):
-
Returns document_fromstring or fragment_fromstring, based -on whether the string looks like a full document, or just a -fragment.
-
-

Additionally all parsing functions accept an parser keyword argument -that can be set to a custom parser instance. To create custom parsers -you can subclass the HTMLParser and XHTMLParser from the same -module. Note that these are the parser classes provided by html5lib.

-
-
- - - \ No newline at end of file diff --git a/doc/html/index.html b/doc/html/index.html deleted file mode 100644 index 6d1d55c..0000000 --- a/doc/html/index.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - -lxml - Processing XML and HTML with Python - - - - - -
-

lxml - XML and HTML with Python

- - -

lxml is the most feature-rich -and easy-to-use library -for processing XML and HTML -in the Python language.

-
-

Introduction

-

The lxml XML toolkit is a Pythonic binding for the C libraries -libxml2 and libxslt. It is unique in that it combines the speed and -XML feature completeness of these libraries with the simplicity of a -native Python API, mostly compatible but superior to the well-known -ElementTree API. The latest release works with all CPython versions -from 2.6 to 3.6. See the introduction for more information about -background and goals of the lxml project. Some common questions are -answered in the FAQ.

-
-

Support the project

-

lxml has been downloaded from the Python Package Index -millions of times and is also available directly in many package -distributions, e.g. for Linux or MacOS-X.

-

Most people who use lxml do so because they like using it. -You can show us that you like it by blogging about your experience -with it and linking to the project website.

-

If you are using lxml for your work and feel like giving a bit of -your own benefit back to support the project, consider sending us -money through PayPal that we can use for fixing bugs in the software -and improving its features and documentation. Please read the Legal -Notice below, at the bottom of this page. Thank you for your support.

-

Donate to the lxml project

-

Please contact Stefan Behnel -for other ways to support the lxml project, -as well as commercial consulting, customisations and trainings on lxml and -fast Python XML processing.

-

Travis-CI and AppVeyor -support the lxml project with their build and CI servers. -Jetbrains supports the lxml project by donating free licenses of their -PyCharm IDE.

-
-
-
-

Documentation

-

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.

- -

lxml.etree follows the ElementTree API as much as possible, building -it on top of the native libxml2 tree. If you are new to ElementTree, -start with the lxml.etree tutorial for XML processing. See also the -ElementTree compatibility overview and the ElementTree performance -page comparing lxml to the original ElementTree and cElementTree -implementations.

-

Right after the lxml.etree tutorial for XML processing and the -ElementTree documentation, the next place to look is the lxml.etree -specific API documentation. It describes how lxml extends the -ElementTree API to expose libxml2 and libxslt specific XML -functionality, such as XPath, Relax NG, XML Schema, XSLT, and -c14n. Python code can be called from XPath expressions and XSLT -stylesheets through the use of XPath extension functions. lxml -also offers a SAX compliant API, that works with the SAX support in -the standard library.

-

There is a separate module lxml.objectify that implements a data-binding -API on top of lxml.etree. See the objectify and etree FAQ entry for a -comparison.

-

In addition to the ElementTree API, lxml also features a sophisticated -API for custom XML element classes. This is a simple way to write -arbitrary XML driven APIs on top of lxml. lxml.etree also has a -C-level API that can be used to efficiently extend lxml.etree in -external C modules, including fast custom element class support.

-
-
-

Download

-

The best way to download lxml is to visit lxml at the Python Package -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.2.5, released 2018-09-09 -(changes for 4.2.5). Older versions -are listed below.

-

Please take a look at the -installation instructions !

-

This complete web site (including the generated API documentation) is -part of the source distribution, so if you want to download the -documentation for offline use, take the source archive and copy the -doc/html directory out of the source tree, or use the -PDF documentation.

-

The latest installable developer sources -are available from Github. It's also possible to check out -the latest development version of lxml from Github directly, using a command -like this (assuming you use hg and have hg-git installed):

-
-hg clone git+ssh://git@github.com/lxml/lxml.git lxml
-
-

Alternatively, if you use git, this should work as well:

-
-git clone https://github.com/lxml/lxml.git lxml
-
-

You can browse the source repository and its history through -the web. Please read how to build lxml from source -first. The latest CHANGES of the developer version are also -accessible. You can check there if a bug you found has been fixed -or a feature you want has been implemented in the latest trunk version.

-
-
-

Mailing list

-

Questions? Suggestions? Code to contribute? We have a mailing list.

-

You can search the archive with Gmane or Google.

-
-
-

Bug tracker

-

lxml uses the launchpad bug tracker. If you are sure you found a -bug in lxml, please file a bug report there. If you are not sure -whether some unexpected behaviour of lxml is a bug or not, please -check the documentation and ask on the mailing list first. Do not -forget to search the archive (e.g. with Gmane)!

-
-
-

License

-

The lxml library is shipped under a BSD license. libxml2 and libxslt2 -itself are shipped under the MIT license. There should therefore be no -obstacle to using lxml in your codebase.

-
-
-

Old Versions

-

See the websites of lxml -1.3, -2.0, -2.1, -2.2, -2.3, -3.0, -3.1, -3.2, -3.3, -3.4, -3.5, -3.6, -3.7, -3.8, -4.0 -4.1

- -
- -
- - - \ No newline at end of file diff --git a/doc/html/installation.html b/doc/html/installation.html deleted file mode 100644 index 2681621..0000000 --- a/doc/html/installation.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - - -Installing lxml - - - -
-

Installing lxml

- - -
-

Where to get it

-

lxml is generally distributed through PyPI.

-

Most Linux platforms come with some version of lxml readily -packaged, usually named python-lxml for the Python 2.x version -and python3-lxml for Python 3.x. If you can use that version, -the quickest way to install lxml is to use the system package -manager, e.g. apt-get on Debian/Ubuntu:

-
-sudo apt-get install python3-lxml
-
-

For MacOS-X, a macport of lxml is available. -Try something like

-
-sudo port install py27-lxml
-
-

To install a newer version or to install lxml on other systems, -see below.

-
-
-

Requirements

-

You need Python 2.6 or later.

-

Unless you are using a static binary distribution (e.g. from a -Windows binary installer), lxml requires libxml2 and libxslt to -be installed, in particular:

-
    -
  • libxml2 version 2.7.0 or later.
      -
    • We recommend libxml2 2.9.2 or a later version.
    • -
    • If you want to use the feed parser interface, especially when -parsing from unicode strings, do not use libxml2 2.7.4 through -2.7.6.
    • -
    -
  • -
  • libxslt version 1.1.23 or later.
      -
    • We recommend libxslt 1.1.28 or later. Version 1.1.25 will not -work due to a missing library symbol.
    • -
    -
  • -
-

Newer versions generally contain fewer bugs and are therefore -recommended. XML Schema support is also still worked on in libxml2, -so newer versions will give you better compliance with the W3C spec.

-

To install the required development packages of these dependencies -on Linux systems, use your distribution specific installation tool, -e.g. apt-get on Debian/Ubuntu:

-
-sudo apt-get install libxml2-dev libxslt-dev python-dev
-
-

For Debian based systems, it should be enough to install the known -build dependencies of the provided lxml package, e.g.

-
-sudo apt-get build-dep python3-lxml
-
-
-
-

Installation

-

If your system does not provide binary packages or you want to install -a newer version, the best way is to get the pip package management tool -(or use a virtualenv) and -run the following:

-
-pip install lxml
-
-

If you are not using pip in a virtualenv and want to install lxml globally -instead, you have to run the above command as admin, e.g. on Linux:

-
-sudo pip install lxml
-
-

To install a specific version, either download the distribution -manually and let pip install that, or pass the desired version -to pip:

-
-pip install lxml==3.4.2
-
-

To speed up the build in test environments, e.g. on a continuous -integration server, disable the C compiler optimisations by setting -the CFLAGS environment variable:

-
-CFLAGS="-O0"  pip install lxml
-
-

(The option reads "minus Oh Zero", i.e. zero optimisations.)

-
-

MS Windows

-

For MS Windows, recent lxml releases feature community donated -binary distributions, although you might still want to take a look -at the related FAQ entry. -If you fail to build lxml on your MS Windows system from the signed -and tested sources that we release, consider using the binary builds -from PyPI or the unofficial Windows binaries -that Christoph Gohlke generously provides.

-
-
-

Linux

-

On Linux (and most other well-behaved operating systems), pip will -manage to build the source distribution as long as libxml2 and libxslt -are properly installed, including development packages, i.e. header files, -etc. See the requirements section above and use your system package -management tool to look for packages like libxml2-dev or -libxslt-devel. If the build fails, make sure they are installed.

-

Alternatively, setting STATIC_DEPS=true will download and build -both libraries automatically in their latest version, e.g. -STATIC_DEPS=true pip install lxml.

-
-
-

MacOS-X

-

On MacOS-X, use the following to build the source distribution, -and make sure you have a working Internet connection, as this will -download libxml2 and libxslt in order to build them:

-
-STATIC_DEPS=true sudo pip install lxml
-
-
-
-
-

Building lxml from dev sources

-

If you want to build lxml from the GitHub repository, you should read -how to build lxml from source (or the file doc/build.txt in the -source tree). Building from developer sources or from modified -distribution sources requires Cython to translate the lxml sources -into C code. The source distribution ships with pre-generated C -source files, so you do not need Cython installed to build from -release sources.

-

If you have read these instructions and still cannot manage to install lxml, -you can check the archives of the mailing list to see if your problem is -known or otherwise send a mail to the list.

-
-
-

Using lxml with python-libxml2

-

If you want to use lxml together with the official libxml2 Python -bindings (maybe because one of your dependencies uses it), you must -build lxml statically. Otherwise, the two packages will interfere in -places where the libxml2 library requires global configuration, which -can have any kind of effect from disappearing functionality to crashes -in either of the two.

-

To get a static build, either pass the --static-deps option to the -setup.py script, or run pip with the STATIC_DEPS or -STATICBUILD environment variable set to true, i.e.

-
-STATIC_DEPS=true pip install lxml
-
-

The STATICBUILD environment variable is handled equivalently to -the STATIC_DEPS variable, but is used by some other extension -packages, too.

-
-
-

Source builds on MS Windows

-

Most MS Windows systems lack the necessarily tools to build software, -starting with a C compiler already. Microsoft leaves it to users to -install and configure them, which is usually not trivial and means -that distributors cannot rely on these dependencies being available -on a given system. In a way, you get what you've paid for and make -others pay for it.

-

Due to the additional lack of package management of this platform, -it is best to link the library dependencies statically if you decide -to build from sources, rather than using a binary installer. For -that, lxml can use the binary distribution of libxml2 and libxslt, which it downloads -automatically during the static build. It needs both libxml2 and -libxslt, as well as iconv and zlib, which are available from the -same download site. Further build instructions are in the -source build documentation.

-
-
-

Source builds on MacOS-X

-

If you are not using macports or want to use a more recent lxml -release, you have to build it yourself. While the pre-installed system -libraries of libxml2 and libxslt are less outdated in recent MacOS-X -versions than they used to be, so lxml should work with them out of the -box, it is still recommended to use a static build with the most recent -library versions.

-

Luckily, lxml's setup.py script has built-in support for building -and integrating these libraries statically during the build. Please -read the -MacOS-X build instructions.

-
-
- - - \ No newline at end of file diff --git a/doc/html/intro.html b/doc/html/intro.html deleted file mode 100644 index fa89224..0000000 --- a/doc/html/intro.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - -Why lxml? - - - -
-

Why lxml?

- -
-

Contents

- -
-
-

Motto

-

"the thrills without the strangeness"

-

To explain the motto:

-

"Programming with libxml2 is like the thrilling embrace of an exotic stranger. -It seems to have the potential to fulfill your wildest dreams, but there's a -nagging voice somewhere in your head warning you that you're about to get -screwed in the worst way." (a quote by Mark Pilgrim)

-

Mark Pilgrim was describing in particular the experience a Python programmer -has when dealing with libxml2. The default Python bindings of libxml2 are -fast, thrilling, powerful, and your code might fail in some horrible way that -you really shouldn't have to worry about when writing Python code. lxml -combines the power of libxml2 with the ease of use of Python.

-
-
-

Aims

-

The C libraries libxml2 and libxslt have huge benefits:

-
    -
  • Standards-compliant XML support.
  • -
  • Support for (broken) HTML.
  • -
  • Full-featured.
  • -
  • Actively maintained by XML experts.
  • -
  • fast. fast! FAST!
  • -
-

These libraries already ship with Python bindings, but these Python bindings -mimic the C-level interface. This yields a number of problems:

-
    -
  • very low level and C-ish (not Pythonic).
  • -
  • underdocumented and huge, you get lost in them.
  • -
  • UTF-8 in API, instead of Python unicode strings.
  • -
  • Can easily cause segfaults from Python.
  • -
  • Require manual memory management!
  • -
-

lxml is a new Python binding for libxml2 and libxslt, completely independent -from these existing Python bindings. Its aims:

-
    -
  • Pythonic API.
  • -
  • Documented.
  • -
  • Use Python unicode strings in API.
  • -
  • Safe (no segfaults).
  • -
  • No manual memory management!
  • -
-

lxml aims to provide a Pythonic API by following as much as possible the -ElementTree API. We're trying to avoid inventing too many new APIs, or you -having to learn new things -- XML is complicated enough.

-
-
- - - \ No newline at end of file diff --git a/doc/html/lxml-source-howto.html b/doc/html/lxml-source-howto.html deleted file mode 100644 index fcd1221..0000000 --- a/doc/html/lxml-source-howto.html +++ /dev/null @@ -1,293 +0,0 @@ - - - - - -How to read the source of lxml - - - - - - -
-

How to read the source of lxml

- --- - - - -
Author:Stefan Behnel
-

This document describes how to read the source code of lxml and how -to start working on it. You might also be interested in the companion -document that describes how to build lxml from sources.

- -
-

What is Cython?

-

Cython is the language that lxml is written in. It is a very -Python-like language that was specifically designed for writing Python -extension modules.

-

The reason why Cython (or actually its predecessor Pyrex at the time) -was chosen as an implementation language for lxml, is that it makes it -very easy to interface with both the Python world and external C code. -Cython generates all the necessary glue code for the Python API, -including Python types, calling conventions and reference counting. -On the other side of the table, calling into C code is not more than -declaring the signature of the function and maybe some variables as -being C types, pointers or structs, and then calling it. The rest of -the code is just plain Python code.

-

The Cython language is so close to Python that the Cython compiler can -actually compile many, many Python programs to C without major -modifications. But the real speed gains of a C compilation come from -type annotations that were added to the language and that allow Cython -to generate very efficient C code.

-

Even if you are not familiar with Cython, you should keep in mind that -a slow implementation of a feature is better than none. So, if you -want to contribute and have an idea what code you want to write, feel -free to start with a pure Python implementation. Chances are, if you -get the change officially accepted and integrated, others will take -the time to optimise it so that it runs fast in Cython.

-
-
-

Where to start?

-

First of all, read how to build lxml from sources to learn how to -retrieve the source code from the GitHub repository and how to -build it. The source code lives in the subdirectory src of the -checkout.

-

The main extension modules in lxml are lxml.etree and -lxml.objectify. All main modules have the file extension -.pyx, which shows the descendence from Pyrex. As usual in Python, -the main files start with a short description and a couple of imports. -Cython distinguishes between the run-time import statement (as -known from Python) and the compile-time cimport statement, which -imports C declarations, either from external libraries or from other -Cython modules.

-
-

Concepts

-

lxml's tree API is based on proxy objects. That means, every Element -object (or rather _Element object) is a proxy for a libxml2 node -structure. The class declaration is (mainly):

-
-cdef class _Element:
-    cdef _Document _doc
-    cdef xmlNode* _c_node
-
-

It is a naming convention that C variables and C level class members -that are passed into libxml2 start with a prefixed c_ (commonly -libxml2 struct pointers), and that C level class members are prefixed -with an underscore. So you will often see names like c_doc for an -xmlDoc* variable (or c_node for an xmlNode*), or the above -_c_node for a class member that points to an xmlNode struct -(or _c_doc for an xmlDoc*).

-

It is important to know that every proxy in lxml has a factory -function that properly sets up C level members. Proxy objects must -never be instantiated outside of that factory. For example, to -instantiate an _Element object or its subclasses, you must always call -its factory function:

-
-cdef xmlNode* c_node
-cdef _Document doc
-cdef _Element element
-...
-element = _elementFactory(doc, c_node)
-
-

A good place to see how this factory is used are the Element methods -getparent(), getnext() and getprevious().

-
-
-

The documentation

-

An important part of lxml is the documentation that lives in the -doc directory. It describes a large part of the API and comprises -a lot of example code in the form of doctests.

-

The documentation is written in the ReStructured Text format, a -very powerful text markup language that looks almost like plain text. -It is part of the docutils package.

-

The project web site of lxml is completely generated from these text -documents. Even the side menu is just collected from the table of -contents that the ReST processor writes into each HTML page. -Obviously, we use lxml for this.

-

The easiest way to generate the HTML pages is by calling:

-
-make html
-
-

This will call the script doc/mkhtml.py to run the ReST processor -on the files. After generating an HTML page the script parses it back -in to build the side menu, and injects the complete menu into each -page at the very end.

-

Running the make command will also generate the API documentation -if you have epydoc installed. The epydoc package will import and -introspect the extension modules and also introspect and parse the -Python modules of lxml. The aggregated information will then be -written out into an HTML documentation site.

-
-
-
-

lxml.etree

-

The main module, lxml.etree, is in the file lxml.etree.pyx. It -implements the main functions and types of the ElementTree API, as -well as all the factory functions for proxies. It is the best place -to start if you want to find out how a specific feature is -implemented.

-

At the very end of the file, it contains a series of include -statements that merge the rest of the implementation into the -generated C code. Yes, you read right: no importing, no source file -namespacing, just plain good old include and a huge C code result of -more than 100,000 lines that we throw right into the C compiler.

-

The main include files are:

-
-
apihelpers.pxi
-
Private C helper functions. Except for the factory functions, -most of the little functions that are used all over the place are -defined here. This includes things like reading out the text -content of a libxml2 tree node, checking input from the API level, -creating a new Element node or handling attribute values. If you -want to work on the lxml code, you should keep these functions in -the back of your head, as they will definitely make your life -easier.
-
classlookup.pxi
-
Element class lookup mechanisms. The main API and engines for -those who want to define custom Element classes and inject them -into lxml.
-
docloader.pxi
-
Support for custom document loaders. Base class and registry for -custom document resolvers.
-
extensions.pxi
-
Infrastructure for extension functions in XPath/XSLT, including -XPath value conversion and function registration.
-
iterparse.pxi
-
Incremental XML parsing. An iterator class that builds iterparse -events while parsing.
-
nsclasses.pxi
-
Namespace implementation and registry. The registry and engine -for Element classes that use the ElementNamespaceClassLookup -scheme.
-
parser.pxi
-
Parsers for XML and HTML. This is the main parser engine. It's -the reason why you can parse a document from various sources in -two lines of Python code. It's definitely not the right place to -start reading lxml's source code.
-
parsertarget.pxi
-
An ElementTree compatible parser target implementation based on -the SAX2 interface of libxml2.
-
proxy.pxi
-
Very low-level functions for memory allocation/deallocation -and Element proxy handling. Ignoring this for the beginning -will safe your head from exploding.
-
public-api.pxi
-
The set of C functions that are exported to other extension -modules at the C level. For example, lxml.objectify makes use -of these. See the C-level API documentation.
-
readonlytree.pxi
-
A separate read-only implementation of the Element API. This is -used in places where non-intrusive access to a tree is required, -such as the PythonElementClassLookup or XSLT extension -elements.
-
saxparser.pxi
-
SAX-like parser interfaces as known from ElementTree's TreeBuilder.
-
serializer.pxi
-
XML output functions. Basically everything that creates byte -sequences from XML trees.
-
xinclude.pxi
-
XInclude support.
-
xmlerror.pxi
-

Error log handling. All error messages that libxml2 generates -internally walk through the code in this file to end up in lxml's -Python level error logs.

-

At the end of the file, you will find a long list of named error -codes. It is generated from the libxml2 HTML documentation (using -lxml, of course). See the script update-error-constants.py -for this.

-
-
xmlid.pxi
-
XMLID and IDDict, a dictionary-like way to find Elements by their -XML-ID attribute.
-
xpath.pxi
-
XPath evaluators.
-
xslt.pxi
-
XSL transformations, including the XSLT class, document lookup -handling and access control.
-
-

The different schema languages (DTD, RelaxNG, XML Schema and -Schematron) are implemented in the following include files:

-
    -
  • dtd.pxi
  • -
  • relaxng.pxi
  • -
  • schematron.pxi
  • -
  • xmlschema.pxi
  • -
-
-
-

Python modules

-

The lxml package also contains a number of pure Python modules:

-
-
builder.py
-
The E-factory and the ElementBuilder class. These provide a -simple interface to XML tree generation.
-
cssselect.py
-
A CSS selector implementation based on XPath. The main class is -called CSSSelector.
-
doctestcompare.py
-
A relaxed comparison scheme for XML/HTML markup in doctest.
-
ElementInclude.py
-
XInclude-like document inclusion, compatible with ElementTree.
-
_elementpath.py
-
XPath-like path language, compatible with ElementTree.
-
sax.py
-
SAX2 compatible interfaces to copy lxml trees from/to SAX compatible -tools.
-
usedoctest.py
-
Wrapper module for doctestcompare.py that simplifies its usage -from inside a doctest.
-
-
-
-

lxml.objectify

-

A Cython implemented extension module that uses the public C-API of -lxml.etree. It provides a Python object-like interface to XML trees. -The implementation resides in the file lxml.objectify.pyx.

-
-
-

lxml.html

-

A specialised toolkit for HTML handling, based on lxml.etree. This is -implemented in pure Python.

-
-
- - - \ No newline at end of file diff --git a/doc/html/lxmlhtml.html b/doc/html/lxmlhtml.html deleted file mode 100644 index 83ddbd3..0000000 --- a/doc/html/lxmlhtml.html +++ /dev/null @@ -1,703 +0,0 @@ - - - - - -lxml.html - - - - -
-

lxml.html

- --- - - - -
Author:Ian Bicking
-

Since version 2.0, lxml comes with a dedicated Python package for -dealing with HTML: lxml.html. It is based on lxml's HTML parser, -but provides a special Element API for HTML elements, as well as a -number of utilities for common HTML processing tasks.

- -

The main API is based on the lxml.etree API, and thus, on the ElementTree -API.

-
-

Parsing HTML

-
-

Parsing HTML fragments

-

There are several functions available to parse HTML:

-
-
parse(filename_url_or_file):
-

Parses the named file or url, or if the object has a .read() -method, parses from that.

-

If you give a URL, or if the object has a .geturl() method (as -file-like objects from urllib.urlopen() have), then that URL -is used as the base URL. You can also provide an explicit -base_url keyword argument.

-
-
document_fromstring(string):
-
Parses a document from the given string. This always creates a -correct HTML document, which means the parent node is <html>, -and there is a body and possibly a head.
-
fragment_fromstring(string, create_parent=False):
-
Returns an HTML fragment from a string. The fragment must contain -just a single element, unless create_parent is given; -e.g., fragment_fromstring(string, create_parent='div') will -wrap the element in a <div>.
-
fragments_fromstring(string):
-
Returns a list of the elements found in the fragment.
-
fromstring(string):
-
Returns document_fromstring or fragment_fromstring, based -on whether the string looks like a full document, or just a -fragment.
-
-
-
-

Really broken pages

-

The normal HTML parser is capable of handling broken HTML, but for -pages that are far enough from HTML to call them 'tag soup', it may -still fail to parse the page in a useful way. A way to deal with this -is ElementSoup, which deploys the well-known BeautifulSoup parser to -build an lxml HTML tree.

-

However, note that the most common problem with web pages is the lack -of (or the existence of incorrect) encoding declarations. It is -therefore often sufficient to only use the encoding detection of -BeautifulSoup, called UnicodeDammit, and to leave the rest to lxml's -own HTML parser, which is several times faster.

-
-
-
-

HTML Element Methods

-

HTML elements have all the methods that come with ElementTree, but -also include some extra methods:

-
-
.drop_tree():
-
Drops the element and all its children. Unlike -el.getparent().remove(el) this does not remove the tail -text; with drop_tree the tail text is merged with the previous -element.
-
.drop_tag():
-
Drops the tag, but keeps its children and text.
-
.find_class(class_name):
-
Returns a list of all the elements with the given CSS class name. -Note that class names are space separated in HTML, so -doc.find_class_name('highlight') will find an element like -<div class="sidebar highlight">. Class names are case -sensitive.
-
.find_rel_links(rel):
-
Returns a list of all the <a rel="{rel}"> elements. E.g., -doc.find_rel_links('tag') returns all the links marked as -tags.
-
.get_element_by_id(id, default=None):
-
Return the element with the given id, or the default if -none is found. If there are multiple elements with the same id -(which there shouldn't be, but there often is), this returns only -the first.
-
.text_content():
-
Returns the text content of the element, including the text -content of its children, with no markup.
-
.cssselect(expr):
-
Select elements from this element and its children, using a CSS -selector expression. (Note that .xpath(expr) is also -available as on all lxml elements.)
-
.label:
-
Returns the corresponding <label> element for this element, if -any exists (None if there is none). Label elements have a -label.for_element attribute that points back to the element.
-
.base_url:
-
The base URL for this element, if one was saved from the parsing. -This attribute is not settable. Is None when no base URL was -saved.
-
.classes:
-
Returns a set-like object that allows accessing and modifying the -names in the 'class' attribute of the element. (New in lxml 3.5).
-
.set(key, value=None):
-
Sets an HTML attribute. If no value is given, or if the value is -None, it creates a boolean attribute like <form novalidate></form> -or <div custom-attribute></div>. In XML, attributes must -have at least the empty string as their value like <form -novalidate=""></form>, but HTML boolean attributes can also be -just present or absent from an element without having a value.
-
-
-
-

Running HTML doctests

-

One of the interesting modules in the lxml.html package deals with -doctests. It can be hard to compare two HTML pages for equality, as -whitespace differences aren't meaningful and the structural formatting -can differ. This is even more a problem in doctests, where output is -tested for equality and small differences in whitespace or the order -of attributes can let a test fail. And given the verbosity of -tag-based languages, it may take more than a quick look to find the -actual differences in the doctest output.

-

Luckily, lxml provides the lxml.doctestcompare module that -supports relaxed comparison of XML and HTML pages and provides a -readable diff in the output when a test fails. The HTML comparison is -most easily used by importing the usedoctest module in a doctest:

-
>>> import lxml.html.usedoctest
-
-

Now, if you have an HTML document and want to compare it to an expected result -document in a doctest, you can do the following:

-
>>> import lxml.html
->>> html = lxml.html.fromstring('''\
-...    <html><body onload="" color="white">
-...      <p>Hi  !</p>
-...    </body></html>
-... ''')
-
->>> print lxml.html.tostring(html)
-<html><body onload="" color="white"><p>Hi !</p></body></html>
-
->>> print lxml.html.tostring(html)
-<html> <body color="white" onload=""> <p>Hi    !</p> </body> </html>
-
->>> print lxml.html.tostring(html)
-<html>
-  <body color="white" onload="">
-    <p>Hi !</p>
-  </body>
-</html>
-
-

In documentation, you would likely prefer the pretty printed HTML output, as -it is the most readable. However, the three documents are equivalent from the -point of view of an HTML tool, so the doctest will silently accept any of the -above. This allows you to concentrate on readability in your doctests, even -if the real output is a straight ugly HTML one-liner.

-

Note that there is also an lxml.usedoctest module which you can -import for XML comparisons. The HTML parser notably ignores -namespaces and some other XMLisms.

-
-
-

Creating HTML with the E-factory

-

lxml.html comes with a predefined HTML vocabulary for the E-factory, -originally written by Fredrik Lundh. This allows you to quickly generate HTML -pages and fragments:

-
>>> from lxml.html import builder as E
->>> from lxml.html import usedoctest
->>> html = E.HTML(
-...   E.HEAD(
-...     E.LINK(rel="stylesheet", href="great.css", type="text/css"),
-...     E.TITLE("Best Page Ever")
-...   ),
-...   E.BODY(
-...     E.H1(E.CLASS("heading"), "Top News"),
-...     E.P("World News only on this page", style="font-size: 200%"),
-...     "Ah, and here's some more text, by the way.",
-...     lxml.html.fromstring("<p>... and this is a parsed fragment ...</p>")
-...   )
-... )
-
->>> print lxml.html.tostring(html)
-<html>
-  <head>
-    <link href="great.css" rel="stylesheet" type="text/css">
-    <title>Best Page Ever</title>
-  </head>
-  <body>
-    <h1 class="heading">Top News</h1>
-    <p style="font-size: 200%">World News only on this page</p>
-    Ah, and here's some more text, by the way.
-    <p>... and this is a parsed fragment ...</p>
-  </body>
-</html>
-
-

Note that you should use lxml.html.tostring and not -lxml.tostring. lxml.tostring(doc) will return the XML -representation of the document, which is not valid HTML. In -particular, things like <script src="..."></script> will be -serialized as <script src="..." />, which completely confuses -browsers.

-
-

Viewing your HTML

-

A handy method for viewing your HTML: -lxml.html.open_in_browser(lxml_doc) will write the document to -disk and open it in a browser (with the webbrowser module).

-
-
- -
-

Forms

-

Any <form> elements in a document are available through -the list doc.forms (e.g., doc.forms[0]). Form, input, select, -and textarea elements each have special methods.

-

Input elements (including <select> and <textarea>) have these -attributes:

-
-
.name:
-
The name of the element.
-
.value:
-

The value of an input, the content of a textarea, the selected -option(s) of a select. This attribute can be set.

-

In the case of a select that takes multiple options (<select -multiple>) this will be a set of the selected options; you can -add or remove items to select and unselect the options.

-
-
-

Select attributes:

-
-
.value_options:
-
For select elements, this is all the possible values (the values -of all the options).
-
.multiple:
-
For select elements, true if this is a <select multiple> -element.
-
-

Input attributes:

-
-
.type:
-
The type attribute in <input> elements.
-
.checkable:
-
True if this can be checked (i.e., true for type=radio and -type=checkbox).
-
.checked:
-
If this element is checkable, the checked state. Raises -AttributeError on non-checkable inputs.
-
-

The form itself has these attributes:

-
-
.inputs:
-
A dictionary-like object that can be used to access input elements -by name. When there are multiple input elements with the same -name, this returns list-like structures that can also be used to -access the options and their values as a group.
-
.fields:
-

A dictionary-like object used to access values by their name. -form.inputs returns elements, this only returns values. -Setting values in this dictionary will effect the form inputs. -Basically form.fields[x] is equivalent to -form.inputs[x].value and form.fields[x] = y is equivalent -to form.inputs[x].value = y. (Note that sometimes -form.inputs[x] returns a compound object, but these objects -also have .value attributes.)

-

If you set this attribute, it is equivalent to -form.fields.clear(); form.fields.update(new_value)

-
-
.form_values():
-
Returns a list of [(name, value), ...], suitable to be passed -to urllib.urlencode() for form submission.
-
.action:
-
The action attribute. This is resolved to an absolute URL if -possible.
-
.method:
-
The method attribute, which defaults to GET.
-
-
-

Form Filling Example

-

Note that you can change any of these attributes (values, method, -action, etc) and then serialize the form to see the updated values. -You can, for instance, do:

-
>>> from lxml.html import fromstring, tostring
->>> form_page = fromstring('''<html><body><form>
-...   Your name: <input type="text" name="name"> <br>
-...   Your phone: <input type="text" name="phone"> <br>
-...   Your favorite pets: <br>
-...   Dogs: <input type="checkbox" name="interest" value="dogs"> <br>
-...   Cats: <input type="checkbox" name="interest" value="cats"> <br>
-...   Llamas: <input type="checkbox" name="interest" value="llamas"> <br>
-...   <input type="submit"></form></body></html>''')
->>> form = form_page.forms[0]
->>> form.fields = dict(
-...     name='John Smith',
-...     phone='555-555-3949',
-...     interest=set(['cats', 'llamas']))
->>> print tostring(form)
-<html>
-  <body>
-    <form>
-    Your name:
-      <input name="name" type="text" value="John Smith">
-      <br>Your phone:
-      <input name="phone" type="text" value="555-555-3949">
-      <br>Your favorite pets:
-      <br>Dogs:
-      <input name="interest" type="checkbox" value="dogs">
-      <br>Cats:
-      <input checked name="interest" type="checkbox" value="cats">
-      <br>Llamas:
-      <input checked name="interest" type="checkbox" value="llamas">
-      <br>
-      <input type="submit">
-    </form>
-  </body>
-</html>
-
-
-
-

Form Submission

-

You can submit a form with lxml.html.submit_form(form_element). -This will return a file-like object (the result of -urllib.urlopen()).

-

If you have extra input values you want to pass you can use the -keyword argument extra_values, like extra_values={'submit': -'Yes!'}. This is the only way to get submit values into the form, -as there is no state of "submitted" for these elements.

-

You can pass in an alternate opener with the open_http keyword -argument, which is a function with the signature open_http(method, -url, values).

-

Example:

-
>>> from lxml.html import parse, submit_form
->>> page = parse('http://tinyurl.com').getroot()
->>> page.forms[0].fields['url'] = 'http://lxml.de/'
->>> result = parse(submit_form(page.forms[0])).getroot()
->>> [a.attrib['href'] for a in result.xpath("//a[@target='_blank']")]
-['http://tinyurl.com/2xae8s', 'http://preview.tinyurl.com/2xae8s']
-
-
-
-
-

Cleaning up HTML

-

The module lxml.html.clean provides a Cleaner class for cleaning up -HTML pages. It supports removing embedded or script content, special tags, -CSS style annotations and much more.

-

Say, you have an evil web page from an untrusted source that contains lots of -content that upsets browsers and tries to run evil code on the client side:

-
>>> html = '''\
-... <html>
-...  <head>
-...    <script type="text/javascript" src="evil-site"></script>
-...    <link rel="alternate" type="text/rss" src="evil-rss">
-...    <style>
-...      body {background-image: url(javascript:do_evil)};
-...      div {color: expression(evil)};
-...    </style>
-...  </head>
-...  <body onload="evil_function()">
-...    <!-- I am interpreted for EVIL! -->
-...    <a href="javascript:evil_function()">a link</a>
-...    <a href="#" onclick="evil_function()">another link</a>
-...    <p onclick="evil_function()">a paragraph</p>
-...    <div style="display: none">secret EVIL!</div>
-...    <object> of EVIL! </object>
-...    <iframe src="evil-site"></iframe>
-...    <form action="evil-site">
-...      Password: <input type="password" name="password">
-...    </form>
-...    <blink>annoying EVIL!</blink>
-...    <a href="evil-site">spam spam SPAM!</a>
-...    <image src="evil!">
-...  </body>
-... </html>'''
-
-

To remove the all suspicious content from this unparsed document, use the -clean_html function:

-
>>> from lxml.html.clean import clean_html
->>> print clean_html(html)
-<div><style>/* deleted */</style><body>
-
-   <a href="">a link</a>
-   <a href="#">another link</a>
-   <p>a paragraph</p>
-   <div>secret EVIL!</div>
-    of EVIL!
-
-
-     Password:
-   annoying EVIL!<a href="evil-site">spam spam SPAM!</a>
-   <img src="evil!"></body></div>
-
-

The Cleaner class supports several keyword arguments to control exactly -which content is removed:

-
>>> from lxml.html.clean import Cleaner
-
->>> cleaner = Cleaner(page_structure=False, links=False)
->>> print cleaner.clean_html(html)
-<html>
-  <head>
-    <link rel="alternate" src="evil-rss" type="text/rss">
-    <style>/* deleted */</style>
-  </head>
-  <body>
-    <a href="">a link</a>
-    <a href="#">another link</a>
-    <p>a paragraph</p>
-    <div>secret EVIL!</div>
-    of EVIL!
-    Password:
-    annoying EVIL!
-    <a href="evil-site">spam spam SPAM!</a>
-    <img src="evil!">
-  </body>
-</html>
-
->>> cleaner = Cleaner(style=True, links=True, add_nofollow=True,
-...                   page_structure=False, safe_attrs_only=False)
-
->>> print cleaner.clean_html(html)
-<html>
-  <head>
-  </head>
-  <body>
-    <a href="">a link</a>
-    <a href="#">another link</a>
-    <p>a paragraph</p>
-    <div>secret EVIL!</div>
-    of EVIL!
-    Password:
-    annoying EVIL!
-    <a href="evil-site" rel="nofollow">spam spam SPAM!</a>
-    <img src="evil!">
-  </body>
-</html>
-
-

You can also whitelist some otherwise dangerous content with -Cleaner(host_whitelist=['www.youtube.com']), which would allow -embedded media from YouTube, while still filtering out embedded media -from other sites.

-

See the docstring of Cleaner for the details of what can be -cleaned.

- -
-

wordwrap

-

You can also wrap long words in your html:

-
-word_break(doc, max_width=40, ...)
-
-word_break_html(html, ...)
-
-

This finds any long words in the text of the document and inserts -&#8203; in the document (which is the Unicode zero-width space).

-

This avoids the elements <pre>, <textarea>, and <code>. -You can control this with avoid_elements=['textarea', ...].

-

It also avoids elements with the CSS class nobreak. You can -control this with avoid_classes=['code', ...].

-

Lastly you can control the character that is inserted with -break_character=u'\u200b'. However, you cannot insert markup, -only text.

-

word_break_html(html) parses the HTML document and returns a -string.

-
-
-
-

HTML Diff

-

The module lxml.html.diff offers some ways to visualize -differences in HTML documents. These differences are content -oriented. That is, changes in markup are largely ignored; only -changes in the content itself are highlighted.

-

There are two ways to view differences: htmldiff and -html_annotate. One shows differences with <ins> and -<del>, while the other annotates a set of changes similar to svn -blame. Both these functions operate on text, and work best with -content fragments (only what goes in <body>), not complete -documents.

-

Example of htmldiff:

-
>>> from lxml.html.diff import htmldiff, html_annotate
->>> doc1 = '''<p>Here is some text.</p>'''
->>> doc2 = '''<p>Here is <b>a lot</b> of <i>text</i>.</p>'''
->>> doc3 = '''<p>Here is <b>a little</b> <i>text</i>.</p>'''
->>> print htmldiff(doc1, doc2)
-<p>Here is <ins><b>a lot</b> of <i>text</i>.</ins> <del>some text.</del> </p>
->>> print html_annotate([(doc1, 'author1'), (doc2, 'author2'),
-...                      (doc3, 'author3')])
-<p><span title="author1">Here is</span>
-   <b><span title="author2">a</span>
-   <span title="author3">little</span></b>
-   <i><span title="author2">text</span></i>
-   <span title="author2">.</span></p>
-
-

As you can see, it is imperfect as such things tend to be. On larger -tracts of text with larger edits it will generally do better.

-

The html_annotate function can also take an optional second -argument, markup. This is a function like markup(text, -version) that returns the given text marked up with the given -version. The default version, the output of which you see in the -example, looks like:

-
def default_markup(text, version):
-    return '<span title="%s">%s</span>' % (
-        cgi.escape(unicode(version), 1), text)
-
-
-
-

Examples

-
-

Microformat Example

-

This example parses the hCard -microformat.

-

First we get the page:

-
>>> import urllib
->>> from lxml.html import fromstring
->>> url = 'http://microformats.org/'
->>> content = urllib.urlopen(url).read()
->>> doc = fromstring(content)
->>> doc.make_links_absolute(url)
-
-

Then we create some objects to put the information in:

-
>>> class Card(object):
-...     def __init__(self, **kw):
-...         for name, value in kw:
-...             setattr(self, name, value)
->>> class Phone(object):
-...     def __init__(self, phone, types=()):
-...         self.phone, self.types = phone, types
-
-

And some generally handy functions for microformats:

-
>>> def get_text(el, class_name):
-...     els = el.find_class(class_name)
-...     if els:
-...         return els[0].text_content()
-...     else:
-...         return ''
->>> def get_value(el):
-...     return get_text(el, 'value') or el.text_content()
->>> def get_all_texts(el, class_name):
-...     return [e.text_content() for e in els.find_class(class_name)]
->>> def parse_addresses(el):
-...     # Ideally this would parse street, etc.
-...     return el.find_class('adr')
-
-

Then the parsing:

-
>>> for el in doc.find_class('hcard'):
-...     card = Card()
-...     card.el = el
-...     card.fn = get_text(el, 'fn')
-...     card.tels = []
-...     for tel_el in card.find_class('tel'):
-...         card.tels.append(Phone(get_value(tel_el),
-...                                get_all_texts(tel_el, 'type')))
-...     card.addresses = parse_addresses(el)
-
-
-
-
- - - \ No newline at end of file diff --git a/doc/html/objectify.html b/doc/html/objectify.html deleted file mode 100644 index e8dae2e..0000000 --- a/doc/html/objectify.html +++ /dev/null @@ -1,1172 +0,0 @@ - - - - - -lxml.objectify - - - - -
-

lxml.objectify

- --- - - - -
Authors:Stefan Behnel -
Holger Joukl
-

lxml supports an alternative API similar to the Amara bindery or -gnosis.xml.objectify through a custom Element implementation. The main idea -is to hide the usage of XML behind normal Python objects, sometimes referred -to as data-binding. It allows you to use XML as if you were dealing with a -normal Python object hierarchy.

-

Accessing the children of an XML element deploys object attribute access. If -there are multiple children with the same name, slicing and indexing can be -used. Python data types are extracted from XML content automatically and made -available to the normal Python operators.

- -

To set up and use objectify, you need both the lxml.etree -module and lxml.objectify:

-
>>> from lxml import etree
->>> from lxml import objectify
-
-

The objectify API is very different from the ElementTree API. If it -is used, it should not be mixed with other element implementations -(such as trees parsed with lxml.etree), to avoid non-obvious -behaviour.

-

The benchmark page has some hints on performance optimisation of -code using lxml.objectify.

-

To make the doctests in this document look a little nicer, we also use -this:

-
>>> import lxml.usedoctest
-
-

Imported from within a doctest, this relieves us from caring about the exact -formatting of XML output.

-
-

The lxml.objectify API

-

In lxml.objectify, element trees provide an API that models the behaviour -of normal Python object trees as closely as possible.

-
-

Element access through object attributes

-

The main idea behind the objectify API is to hide XML element access -behind the usual object attribute access pattern. Asking an element for an -attribute will return the sequence of children with corresponding tag names:

-
>>> root = objectify.Element("root")
->>> b = objectify.SubElement(root, "b")
->>> print(root.b[0].tag)
-b
->>> root.index(root.b[0])
-0
->>> b = objectify.SubElement(root, "b")
->>> print(root.b[0].tag)
-b
->>> print(root.b[1].tag)
-b
->>> root.index(root.b[1])
-1
-
-

For convenience, you can omit the index '0' to access the first child:

-
>>> print(root.b.tag)
-b
->>> root.index(root.b)
-0
->>> del root.b
-
-

Iteration and slicing also obey the requested tag:

-
>>> x1 = objectify.SubElement(root, "x")
->>> x2 = objectify.SubElement(root, "x")
->>> x3 = objectify.SubElement(root, "x")
-
->>> [ el.tag for el in root.x ]
-['x', 'x', 'x']
-
->>> [ el.tag for el in root.x[1:3] ]
-['x', 'x']
-
->>> [ el.tag for el in root.x[-1:] ]
-['x']
-
->>> del root.x[1:2]
->>> [ el.tag for el in root.x ]
-['x', 'x']
-
-

If you want to iterate over all children or need to provide a specific -namespace for the tag, use the iterchildren() method. Like the other -methods for iteration, it supports an optional tag keyword argument:

-
>>> [ el.tag for el in root.iterchildren() ]
-['b', 'x', 'x']
-
->>> [ el.tag for el in root.iterchildren(tag='b') ]
-['b']
-
->>> [ el.tag for el in root.b ]
-['b']
-
-

XML attributes are accessed as in the normal ElementTree API:

-
>>> c = objectify.SubElement(root, "c", myattr="someval")
->>> print(root.c.get("myattr"))
-someval
-
->>> root.c.set("c", "oh-oh")
->>> print(root.c.get("c"))
-oh-oh
-
-

In addition to the normal ElementTree API for appending elements to trees, -subtrees can also be added by assigning them to object attributes. In this -case, the subtree is automatically deep copied and the tag name of its root is -updated to match the attribute name:

-
>>> el = objectify.Element("yet_another_child")
->>> root.new_child = el
->>> print(root.new_child.tag)
-new_child
->>> print(el.tag)
-yet_another_child
-
->>> root.y = [ objectify.Element("y"), objectify.Element("y") ]
->>> [ el.tag for el in root.y ]
-['y', 'y']
-
-

The latter is a short form for operations on the full slice:

-
>>> root.y[:] = [ objectify.Element("y") ]
->>> [ el.tag for el in root.y ]
-['y']
-
-

You can also replace children that way:

-
>>> child1 = objectify.SubElement(root, "child")
->>> child2 = objectify.SubElement(root, "child")
->>> child3 = objectify.SubElement(root, "child")
-
->>> el = objectify.Element("new_child")
->>> subel = objectify.SubElement(el, "sub")
-
->>> root.child = el
->>> print(root.child.sub.tag)
-sub
-
->>> root.child[2] = el
->>> print(root.child[2].sub.tag)
-sub
-
-

Note that special care must be taken when changing the tag name of an element:

-
>>> print(root.b.tag)
-b
->>> root.b.tag = "notB"
->>> root.b
-Traceback (most recent call last):
-  ...
-AttributeError: no such child: b
->>> print(root.notB.tag)
-notB
-
-
-
-

Creating objectify trees

-

As with lxml.etree, you can either create an objectify tree by -parsing an XML document or by building one from scratch. To parse a -document, just use the parse() or fromstring() functions of -the module:

-
>>> fileobject = StringIO('<test/>')
-
->>> tree = objectify.parse(fileobject)
->>> print(isinstance(tree.getroot(), objectify.ObjectifiedElement))
-True
-
->>> root = objectify.fromstring('<test/>')
->>> print(isinstance(root, objectify.ObjectifiedElement))
-True
-
-

To build a new tree in memory, objectify replicates the standard -factory function Element() from lxml.etree:

-
>>> obj_el = objectify.Element("new")
->>> print(isinstance(obj_el, objectify.ObjectifiedElement))
-True
-
-

After creating such an Element, you can use the usual API of -lxml.etree to add SubElements to the tree:

-
>>> child = objectify.SubElement(obj_el, "newchild", attr="value")
-
-

New subelements will automatically inherit the objectify behaviour -from their tree. However, all independent elements that you create -through the Element() factory of lxml.etree (instead of objectify) -will not support the objectify API by themselves:

-
>>> subel = objectify.SubElement(obj_el, "sub")
->>> print(isinstance(subel, objectify.ObjectifiedElement))
-True
-
->>> independent_el = etree.Element("new")
->>> print(isinstance(independent_el, objectify.ObjectifiedElement))
-False
-
-
-
-

Tree generation with the E-factory

-

To simplify the generation of trees even further, you can use the E-factory:

-
>>> E = objectify.E
->>> root = E.root(
-...   E.a(5),
-...   E.b(6.21),
-...   E.c(True),
-...   E.d("how", tell="me")
-... )
-
->>> print(etree.tostring(root, pretty_print=True))
-<root xmlns:py="http://codespeak.net/lxml/objectify/pytype">
-  <a py:pytype="int">5</a>
-  <b py:pytype="float">6.21</b>
-  <c py:pytype="bool">true</c>
-  <d py:pytype="str" tell="me">how</d>
-</root>
-
-

This allows you to write up a specific language in tags:

-
>>> ROOT = objectify.E.root
->>> TITLE = objectify.E.title
->>> HOWMANY = getattr(objectify.E, "how-many")
-
->>> root = ROOT(
-...   TITLE("The title"),
-...   HOWMANY(5)
-... )
-
->>> print(etree.tostring(root, pretty_print=True))
-<root xmlns:py="http://codespeak.net/lxml/objectify/pytype">
-  <title py:pytype="str">The title</title>
-  <how-many py:pytype="int">5</how-many>
-</root>
-
-

objectify.E is an instance of objectify.ElementMaker. By default, it -creates pytype annotated Elements without a namespace. You can switch off the -pytype annotation by passing False to the annotate keyword argument of the -constructor. You can also pass a default namespace and an nsmap:

-
>>> myE = objectify.ElementMaker(annotate=False,
-...           namespace="http://my/ns", nsmap={None : "http://my/ns"})
-
->>> root = myE.root( myE.someint(2) )
-
->>> print(etree.tostring(root, pretty_print=True))
-<root xmlns="http://my/ns">
-  <someint>2</someint>
-</root>
-
-
-
-

Namespace handling

-

During tag lookups, namespaces are handled mostly behind the scenes. -If you access a child of an Element without specifying a namespace, -the lookup will use the namespace of the parent:

-
>>> root = objectify.Element("{http://ns/}root")
->>> b = objectify.SubElement(root, "{http://ns/}b")
->>> c = objectify.SubElement(root, "{http://other/}c")
-
->>> print(root.b.tag)
-{http://ns/}b
-
-

Note that the SubElement() factory of lxml.etree does not -inherit any namespaces when creating a new subelement. Element -creation must be explicit about the namespace, and is simplified -through the E-factory as described above.

-

Lookups, however, inherit namespaces implicitly:

-
>>> print(root.b.tag)
-{http://ns/}b
-
->>> print(root.c)
-Traceback (most recent call last):
-    ...
-AttributeError: no such child: {http://ns/}c
-
-

To access an element in a different namespace than its parent, you can -use getattr():

-
>>> c = getattr(root, "{http://other/}c")
->>> print(c.tag)
-{http://other/}c
-
-

For convenience, there is also a quick way through item access:

-
>>> c = root["{http://other/}c"]
->>> print(c.tag)
-{http://other/}c
-
-

The same approach must be used to access children with tag names that are not -valid Python identifiers:

-
>>> el = objectify.SubElement(root, "{http://ns/}tag-name")
->>> print(root["tag-name"].tag)
-{http://ns/}tag-name
-
->>> new_el = objectify.Element("{http://ns/}new-element")
->>> el = objectify.SubElement(new_el, "{http://ns/}child")
->>> el = objectify.SubElement(new_el, "{http://ns/}child")
->>> el = objectify.SubElement(new_el, "{http://ns/}child")
-
->>> root["tag-name"] = [ new_el, new_el ]
->>> print(len(root["tag-name"]))
-2
->>> print(root["tag-name"].tag)
-{http://ns/}tag-name
-
->>> print(len(root["tag-name"].child))
-3
->>> print(root["tag-name"].child.tag)
-{http://ns/}child
->>> print(root["tag-name"][1].child.tag)
-{http://ns/}child
-
-

or for names that have a special meaning in lxml.objectify:

-
>>> root = objectify.XML("<root><text>TEXT</text></root>")
-
->>> print(root.text.text)
-Traceback (most recent call last):
-  ...
-AttributeError: 'NoneType' object has no attribute 'text'
-
->>> print(root["text"].text)
-TEXT
-
-
-
-
-

Asserting a Schema

-

When dealing with XML documents from different sources, you will often -require them to follow a common schema. In lxml.objectify, this -directly translates to enforcing a specific object tree, i.e. expected -object attributes are ensured to be there and to have the expected -type. This can easily be achieved through XML Schema validation at -parse time. Also see the documentation on validation on this -topic.

-

First of all, we need a parser that knows our schema, so let's say we -parse the schema from a file-like object (or file or filename):

-
>>> f = StringIO('''\
-...   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-...     <xsd:element name="a" type="AType"/>
-...     <xsd:complexType name="AType">
-...       <xsd:sequence>
-...         <xsd:element name="b" type="xsd:string" />
-...       </xsd:sequence>
-...     </xsd:complexType>
-...   </xsd:schema>
-... ''')
->>> schema = etree.XMLSchema(file=f)
-
-

When creating the validating parser, we must make sure it returns -objectify trees. This is best done with the makeparser() -function:

-
>>> parser = objectify.makeparser(schema = schema)
-
-

Now we can use it to parse a valid document:

-
>>> xml = "<a><b>test</b></a>"
->>> a = objectify.fromstring(xml, parser)
-
->>> print(a.b)
-test
-
-

Or an invalid document:

-
>>> xml = b"<a><b>test</b><c/></a>"
->>> a = objectify.fromstring(xml, parser)  # doctest: +ELLIPSIS
-Traceback (most recent call last):
-lxml.etree.XMLSyntaxError: Element 'c': This element is not expected...
-
-

Note that the same works for parse-time DTD validation, except that -DTDs do not support any data types by design.

-
-
-

ObjectPath

-

For both convenience and speed, objectify supports its own path language, -represented by the ObjectPath class:

-
>>> root = objectify.Element("{http://ns/}root")
->>> b1 = objectify.SubElement(root, "{http://ns/}b")
->>> c  = objectify.SubElement(b1,   "{http://ns/}c")
->>> b2 = objectify.SubElement(root, "{http://ns/}b")
->>> d  = objectify.SubElement(root, "{http://other/}d")
-
->>> path = objectify.ObjectPath("root.b.c")
->>> print(path)
-root.b.c
->>> path.hasattr(root)
-True
->>> print(path.find(root).tag)
-{http://ns/}c
-
->>> find = objectify.ObjectPath("root.b.c")
->>> print(find(root).tag)
-{http://ns/}c
-
->>> find = objectify.ObjectPath("root.{http://other/}d")
->>> print(find(root).tag)
-{http://other/}d
-
->>> find = objectify.ObjectPath("root.{not}there")
->>> print(find(root).tag)
-Traceback (most recent call last):
-  ...
-AttributeError: no such child: {not}there
-
->>> find = objectify.ObjectPath("{not}there")
->>> print(find(root).tag)
-Traceback (most recent call last):
-  ...
-ValueError: root element does not match: need {not}there, got {http://ns/}root
-
->>> find = objectify.ObjectPath("root.b[1]")
->>> print(find(root).tag)
-{http://ns/}b
-
->>> find = objectify.ObjectPath("root.{http://ns/}b[1]")
->>> print(find(root).tag)
-{http://ns/}b
-
-

Apart from strings, ObjectPath also accepts lists of path segments:

-
>>> find = objectify.ObjectPath(['root', 'b', 'c'])
->>> print(find(root).tag)
-{http://ns/}c
-
->>> find = objectify.ObjectPath(['root', '{http://ns/}b[1]'])
->>> print(find(root).tag)
-{http://ns/}b
-
-

You can also use relative paths starting with a '.' to ignore the actual root -element and only inherit its namespace:

-
>>> find = objectify.ObjectPath(".b[1]")
->>> print(find(root).tag)
-{http://ns/}b
-
->>> find = objectify.ObjectPath(['', 'b[1]'])
->>> print(find(root).tag)
-{http://ns/}b
-
->>> find = objectify.ObjectPath(".unknown[1]")
->>> print(find(root).tag)
-Traceback (most recent call last):
-  ...
-AttributeError: no such child: {http://ns/}unknown
-
->>> find = objectify.ObjectPath(".{http://other/}unknown[1]")
->>> print(find(root).tag)
-Traceback (most recent call last):
-  ...
-AttributeError: no such child: {http://other/}unknown
-
-

For convenience, a single dot represents the empty ObjectPath (identity):

-
>>> find = objectify.ObjectPath(".")
->>> print(find(root).tag)
-{http://ns/}root
-
-

ObjectPath objects can be used to manipulate trees:

-
>>> root = objectify.Element("{http://ns/}root")
-
->>> path = objectify.ObjectPath(".some.child.{http://other/}unknown")
->>> path.hasattr(root)
-False
->>> path.find(root)
-Traceback (most recent call last):
-  ...
-AttributeError: no such child: {http://ns/}some
-
->>> path.setattr(root, "my value") # creates children as necessary
->>> path.hasattr(root)
-True
->>> print(path.find(root).text)
-my value
->>> print(root.some.child["{http://other/}unknown"].text)
-my value
-
->>> print(len( path.find(root) ))
-1
->>> path.addattr(root, "my new value")
->>> print(len( path.find(root) ))
-2
->>> [ el.text for el in path.find(root) ]
-['my value', 'my new value']
-
-

As with attribute assignment, setattr() accepts lists:

-
>>> path.setattr(root, ["v1", "v2", "v3"])
->>> [ el.text for el in path.find(root) ]
-['v1', 'v2', 'v3']
-
-

Note, however, that indexing is only supported in this context if the children -exist. Indexing of non existing children will not extend or create a list of -such children but raise an exception:

-
>>> path = objectify.ObjectPath(".{non}existing[1]")
->>> path.setattr(root, "my value")
-Traceback (most recent call last):
-  ...
-TypeError: creating indexed path attributes is not supported
-
-

It is worth noting that ObjectPath does not depend on the objectify module -or the ObjectifiedElement implementation. It can also be used in combination -with Elements from the normal lxml.etree API.

-
-
-

Python data types

-

The objectify module knows about Python data types and tries its best to let -element content behave like them. For example, they support the normal math -operators:

-
>>> root = objectify.fromstring(
-...             "<root><a>5</a><b>11</b><c>true</c><d>hoi</d></root>")
->>> root.a + root.b
-16
->>> root.a += root.b
->>> print(root.a)
-16
-
->>> root.a = 2
->>> print(root.a + 2)
-4
->>> print(1 + root.a)
-3
-
->>> print(root.c)
-True
->>> root.c = False
->>> if not root.c:
-...     print("false!")
-false!
-
->>> print(root.d + " test !")
-hoi test !
->>> root.d = "%s - %s"
->>> print(root.d % (1234, 12345))
-1234 - 12345
-
-

However, data elements continue to provide the objectify API. This means that -sequence operations such as len(), slicing and indexing (e.g. of strings) -cannot behave as the Python types. Like all other tree elements, they show -the normal slicing behaviour of objectify elements:

-
>>> root = objectify.fromstring("<root><a>test</a><b>toast</b></root>")
->>> print(root.a + ' me') # behaves like a string, right?
-test me
->>> len(root.a) # but there's only one 'a' element!
-1
->>> [ a.tag for a in root.a ]
-['a']
->>> print(root.a[0].tag)
-a
-
->>> print(root.a)
-test
->>> [ str(a) for a in root.a[:1] ]
-['test']
-
-

If you need to run sequence operations on data types, you must ask the API for -the real Python value. The string value is always available through the -normal ElementTree .text attribute. Additionally, all data classes -provide a .pyval attribute that returns the value as plain Python type:

-
>>> root = objectify.fromstring("<root><a>test</a><b>5</b></root>")
->>> root.a.text
-'test'
->>> root.a.pyval
-'test'
-
->>> root.b.text
-'5'
->>> root.b.pyval
-5
-
-

Note, however, that both attributes are read-only in objectify. If you want -to change values, just assign them directly to the attribute:

-
>>> root.a.text  = "25"
-Traceback (most recent call last):
-  ...
-TypeError: attribute 'text' of 'StringElement' objects is not writable
-
->>> root.a.pyval = 25
-Traceback (most recent call last):
-  ...
-TypeError: attribute 'pyval' of 'StringElement' objects is not writable
-
->>> root.a = 25
->>> print(root.a)
-25
->>> print(root.a.pyval)
-25
-
-

In other words, objectify data elements behave like immutable Python -types. You can replace them, but not modify them.

-
-

Recursive tree dump

-

To see the data types that are currently used, you can call the module level -dump() function that returns a recursive string representation for -elements:

-
>>> root = objectify.fromstring("""
-... <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-...   <a attr1="foo" attr2="bar">1</a>
-...   <a>1.2</a>
-...   <b>1</b>
-...   <b>true</b>
-...   <c>what?</c>
-...   <d xsi:nil="true"/>
-... </root>
-... """)
-
->>> print(objectify.dump(root))
-root = None [ObjectifiedElement]
-    a = 1 [IntElement]
-      * attr1 = 'foo'
-      * attr2 = 'bar'
-    a = 1.2 [FloatElement]
-    b = 1 [IntElement]
-    b = True [BoolElement]
-    c = 'what?' [StringElement]
-    d = None [NoneElement]
-      * xsi:nil = 'true'
-
-

You can freely switch between different types for the same child:

-
>>> root = objectify.fromstring("<root><a>5</a></root>")
->>> print(objectify.dump(root))
-root = None [ObjectifiedElement]
-    a = 5 [IntElement]
-
->>> root.a = 'nice string!'
->>> print(objectify.dump(root))
-root = None [ObjectifiedElement]
-    a = 'nice string!' [StringElement]
-      * py:pytype = 'str'
-
->>> root.a = True
->>> print(objectify.dump(root))
-root = None [ObjectifiedElement]
-    a = True [BoolElement]
-      * py:pytype = 'bool'
-
->>> root.a = [1, 2, 3]
->>> print(objectify.dump(root))
-root = None [ObjectifiedElement]
-    a = 1 [IntElement]
-      * py:pytype = 'int'
-    a = 2 [IntElement]
-      * py:pytype = 'int'
-    a = 3 [IntElement]
-      * py:pytype = 'int'
-
->>> root.a = (1, 2, 3)
->>> print(objectify.dump(root))
-root = None [ObjectifiedElement]
-    a = 1 [IntElement]
-      * py:pytype = 'int'
-    a = 2 [IntElement]
-      * py:pytype = 'int'
-    a = 3 [IntElement]
-      * py:pytype = 'int'
-
-
-
-

Recursive string representation of elements

-

Normally, elements use the standard string representation for str() that is -provided by lxml.etree. You can enable a pretty-print representation for -objectify elements like this:

-
>>> objectify.enable_recursive_str()
-
->>> root = objectify.fromstring("""
-... <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-...   <a attr1="foo" attr2="bar">1</a>
-...   <a>1.2</a>
-...   <b>1</b>
-...   <b>true</b>
-...   <c>what?</c>
-...   <d xsi:nil="true"/>
-... </root>
-... """)
-
->>> print(str(root))
-root = None [ObjectifiedElement]
-    a = 1 [IntElement]
-      * attr1 = 'foo'
-      * attr2 = 'bar'
-    a = 1.2 [FloatElement]
-    b = 1 [IntElement]
-    b = True [BoolElement]
-    c = 'what?' [StringElement]
-    d = None [NoneElement]
-      * xsi:nil = 'true'
-
-

This behaviour can be switched off in the same way:

-
>>> objectify.enable_recursive_str(False)
-
-
-
-
-

How data types are matched

-

Objectify uses two different types of Elements. Structural Elements (or tree -Elements) represent the object tree structure. Data Elements represent the -data containers at the leafs. You can explicitly create tree Elements with -the objectify.Element() factory and data Elements with the -objectify.DataElement() factory.

-

When Element objects are created, lxml.objectify must determine which -implementation class to use for them. This is relatively easy for tree -Elements and less so for data Elements. The algorithm is as follows:

-
    -
  1. If an element has children, use the default tree class.
  2. -
  3. If an element is defined as xsi:nil, use the NoneElement class.
  4. -
  5. If a "Python type hint" attribute is given, use this to determine the element -class, see below.
  6. -
  7. If an XML Schema xsi:type hint is given, use this to determine the element -class, see below.
  8. -
  9. Try to determine the element class from the text content type by trial and -error.
  10. -
  11. If the element is a root node then use the default tree class.
  12. -
  13. Otherwise, use the default class for empty data classes.
  14. -
-

You can change the default classes for tree Elements and empty data Elements -at setup time. The ObjectifyElementClassLookup() call accepts two keyword -arguments, tree_class and empty_data_class, that determine the Element -classes used in these cases. By default, tree_class is a class called -ObjectifiedElement and empty_data_class is a StringElement.

-
-

Type annotations

-

The "type hint" mechanism deploys an XML attribute defined as -lxml.objectify.PYTYPE_ATTRIBUTE. It may contain any of the following -string values: int, long, float, str, unicode, NoneType:

-
>>> print(objectify.PYTYPE_ATTRIBUTE)
-{http://codespeak.net/lxml/objectify/pytype}pytype
->>> ns, name = objectify.PYTYPE_ATTRIBUTE[1:].split('}')
-
->>> root = objectify.fromstring("""\
-... <root xmlns:py='%s'>
-...   <a py:pytype='str'>5</a>
-...   <b py:pytype='int'>5</b>
-...   <c py:pytype='NoneType' />
-... </root>
-... """ % ns)
-
->>> print(root.a + 10)
-510
->>> print(root.b + 10)
-15
->>> print(root.c)
-None
-
-

Note that you can change the name and namespace used for this -attribute through the set_pytype_attribute_tag(tag) module -function, in case your application ever needs to. There is also a -utility function annotate() that recursively generates this -attribute for the elements of a tree:

-
>>> root = objectify.fromstring("<root><a>test</a><b>5</b></root>")
->>> print(objectify.dump(root))
-root = None [ObjectifiedElement]
-    a = 'test' [StringElement]
-    b = 5 [IntElement]
-
->>> objectify.annotate(root)
-
->>> print(objectify.dump(root))
-root = None [ObjectifiedElement]
-    a = 'test' [StringElement]
-      * py:pytype = 'str'
-    b = 5 [IntElement]
-      * py:pytype = 'int'
-
-
-
-

XML Schema datatype annotation

-

A second way of specifying data type information uses XML Schema types as -element annotations. Objectify knows those that can be mapped to normal -Python types:

-
>>> root = objectify.fromstring('''\
-...    <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-...          xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-...      <d xsi:type="xsd:double">5</d>
-...      <i xsi:type="xsd:int"   >5</i>
-...      <s xsi:type="xsd:string">5</s>
-...    </root>
-...    ''')
->>> print(objectify.dump(root))
-root = None [ObjectifiedElement]
-    d = 5.0 [FloatElement]
-      * xsi:type = 'xsd:double'
-    i = 5 [IntElement]
-      * xsi:type = 'xsd:int'
-    s = '5' [StringElement]
-      * xsi:type = 'xsd:string'
-
-

Again, there is a utility function xsiannotate() that recursively -generates the "xsi:type" attribute for the elements of a tree:

-
>>> root = objectify.fromstring('''\
-...    <root><a>test</a><b>5</b><c>true</c></root>
-...    ''')
->>> print(objectify.dump(root))
-root = None [ObjectifiedElement]
-    a = 'test' [StringElement]
-    b = 5 [IntElement]
-    c = True [BoolElement]
-
->>> objectify.xsiannotate(root)
-
->>> print(objectify.dump(root))
-root = None [ObjectifiedElement]
-    a = 'test' [StringElement]
-      * xsi:type = 'xsd:string'
-    b = 5 [IntElement]
-      * xsi:type = 'xsd:integer'
-    c = True [BoolElement]
-      * xsi:type = 'xsd:boolean'
-
-

Note, however, that xsiannotate() will always use the first XML Schema -datatype that is defined for any given Python type, see also -Defining additional data classes.

-

The utility function deannotate() can be used to get rid of 'py:pytype' -and/or 'xsi:type' information:

-
>>> root = objectify.fromstring('''\
-... <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-...       xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-...   <d xsi:type="xsd:double">5</d>
-...   <i xsi:type="xsd:int"   >5</i>
-...   <s xsi:type="xsd:string">5</s>
-... </root>''')
->>> objectify.annotate(root)
->>> print(objectify.dump(root))
-root = None [ObjectifiedElement]
-    d = 5.0 [FloatElement]
-      * xsi:type = 'xsd:double'
-      * py:pytype = 'float'
-    i = 5 [IntElement]
-      * xsi:type = 'xsd:int'
-      * py:pytype = 'int'
-    s = '5' [StringElement]
-      * xsi:type = 'xsd:string'
-      * py:pytype = 'str'
->>> objectify.deannotate(root)
->>> print(objectify.dump(root))
-root = None [ObjectifiedElement]
-    d = 5 [IntElement]
-    i = 5 [IntElement]
-    s = 5 [IntElement]
-
-

You can control which type attributes should be de-annotated with the keyword -arguments 'pytype' (default: True) and 'xsi' (default: True). -deannotate() can also remove 'xsi:nil' attributes by setting 'xsi_nil=True' -(default: False):

-
>>> root = objectify.fromstring('''\
-... <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-...       xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-...   <d xsi:type="xsd:double">5</d>
-...   <i xsi:type="xsd:int"   >5</i>
-...   <s xsi:type="xsd:string">5</s>
-...   <n xsi:nil="true"/>
-... </root>''')
->>> objectify.annotate(root)
->>> print(objectify.dump(root))
-root = None [ObjectifiedElement]
-    d = 5.0 [FloatElement]
-      * xsi:type = 'xsd:double'
-      * py:pytype = 'float'
-    i = 5 [IntElement]
-      * xsi:type = 'xsd:int'
-      * py:pytype = 'int'
-    s = '5' [StringElement]
-      * xsi:type = 'xsd:string'
-      * py:pytype = 'str'
-    n = None [NoneElement]
-      * xsi:nil = 'true'
-      * py:pytype = 'NoneType'
->>> objectify.deannotate(root, xsi_nil=True)
->>> print(objectify.dump(root))
-root = None [ObjectifiedElement]
-    d = 5 [IntElement]
-    i = 5 [IntElement]
-    s = 5 [IntElement]
-    n = u'' [StringElement]
-
-

Note that deannotate() does not remove the namespace declarations -of the pytype namespace by default. To remove them as well, and -to generally clean up the namespace declarations in the document -(usually when done with the whole processing), pass the option -cleanup_namespaces=True. This option is new in lxml 2.3.2. In -older versions, use the function lxml.etree.cleanup_namespaces() -instead.

-
-
-

The DataElement factory

-

For convenience, the DataElement() factory creates an Element with a -Python value in one step. You can pass the required Python type name or the -XSI type name:

-
>>> root = objectify.Element("root")
->>> root.x = objectify.DataElement(5, _pytype="int")
->>> print(objectify.dump(root))
-root = None [ObjectifiedElement]
-    x = 5 [IntElement]
-      * py:pytype = 'int'
-
->>> root.x = objectify.DataElement(5, _pytype="str", myattr="someval")
->>> print(objectify.dump(root))
-root = None [ObjectifiedElement]
-    x = '5' [StringElement]
-      * myattr = 'someval'
-      * py:pytype = 'str'
-
->>> root.x = objectify.DataElement(5, _xsi="integer")
->>> print(objectify.dump(root))
-root = None [ObjectifiedElement]
-    x = 5 [IntElement]
-      * py:pytype = 'int'
-      * xsi:type = 'xsd:integer'
-
-

XML Schema types reside in the XML schema namespace thus DataElement() -tries to correctly prefix the xsi:type attribute value for you:

-
>>> root = objectify.Element("root")
->>> root.s = objectify.DataElement(5, _xsi="string")
-
->>> objectify.deannotate(root, xsi=False)
->>> print(etree.tostring(root, pretty_print=True))
-<root xmlns:py="http://codespeak.net/lxml/objectify/pytype" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-  <s xsi:type="xsd:string">5</s>
-</root>
-
-

DataElement() uses a default nsmap to set these prefixes:

-
>>> el = objectify.DataElement('5', _xsi='string')
->>> namespaces = list(el.nsmap.items())
->>> namespaces.sort()
->>> for prefix, namespace in namespaces:
-...     print("%s - %s" % (prefix, namespace))
-py - http://codespeak.net/lxml/objectify/pytype
-xsd - http://www.w3.org/2001/XMLSchema
-xsi - http://www.w3.org/2001/XMLSchema-instance
-
->>> print(el.get("{http://www.w3.org/2001/XMLSchema-instance}type"))
-xsd:string
-
-

While you can set custom namespace prefixes, it is necessary to provide valid -namespace information if you choose to do so:

-
>>> el = objectify.DataElement('5', _xsi='foo:string',
-...          nsmap={'foo': 'http://www.w3.org/2001/XMLSchema'})
->>> namespaces = list(el.nsmap.items())
->>> namespaces.sort()
->>> for prefix, namespace in namespaces:
-...     print("%s - %s" % (prefix, namespace))
-foo - http://www.w3.org/2001/XMLSchema
-py - http://codespeak.net/lxml/objectify/pytype
-xsi - http://www.w3.org/2001/XMLSchema-instance
-
->>> print(el.get("{http://www.w3.org/2001/XMLSchema-instance}type"))
-foo:string
-
-

Note how lxml chose a default prefix for the XML Schema Instance -namespace. We can override it as in the following example:

-
>>> el = objectify.DataElement('5', _xsi='foo:string',
-...          nsmap={'foo': 'http://www.w3.org/2001/XMLSchema',
-...                 'myxsi': 'http://www.w3.org/2001/XMLSchema-instance'})
->>> namespaces = list(el.nsmap.items())
->>> namespaces.sort()
->>> for prefix, namespace in namespaces:
-...     print("%s - %s" % (prefix, namespace))
-foo - http://www.w3.org/2001/XMLSchema
-myxsi - http://www.w3.org/2001/XMLSchema-instance
-py - http://codespeak.net/lxml/objectify/pytype
-
->>> print(el.get("{http://www.w3.org/2001/XMLSchema-instance}type"))
-foo:string
-
-

Care must be taken if different namespace prefixes have been used for the same -namespace. Namespace information gets merged to avoid duplicate definitions -when adding a new sub-element to a tree, but this mechanism does not adapt the -prefixes of attribute values:

-
>>> root = objectify.fromstring("""<root xmlns:schema="http://www.w3.org/2001/XMLSchema"/>""")
->>> print(etree.tostring(root, pretty_print=True))
-<root xmlns:schema="http://www.w3.org/2001/XMLSchema"/>
-
->>> s = objectify.DataElement("17", _xsi="string")
->>> print(etree.tostring(s, pretty_print=True))
-<value xmlns:py="http://codespeak.net/lxml/objectify/pytype" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" py:pytype="str" xsi:type="xsd:string">17</value>
-
->>> root.s = s
->>> print(etree.tostring(root, pretty_print=True))
-<root xmlns:schema="http://www.w3.org/2001/XMLSchema">
-  <s xmlns:py="http://codespeak.net/lxml/objectify/pytype" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" py:pytype="str" xsi:type="xsd:string">17</s>
-</root>
-
-

It is your responsibility to fix the prefixes of attribute values if you -choose to deviate from the standard prefixes. A convenient way to do this for -xsi:type attributes is to use the xsiannotate() utility:

-
>>> objectify.xsiannotate(root)
->>> print(etree.tostring(root, pretty_print=True))
-<root xmlns:schema="http://www.w3.org/2001/XMLSchema">
-  <s xmlns:py="http://codespeak.net/lxml/objectify/pytype" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" py:pytype="str" xsi:type="schema:string">17</s>
-</root>
-
-

Of course, it is discouraged to use different prefixes for one and the same -namespace when building up an objectify tree.

-
-
-

Defining additional data classes

-

You can plug additional data classes into objectify that will be used in -exactly the same way as the predefined types. Data classes can either inherit -from ObjectifiedDataElement directly or from one of the specialised -classes like NumberElement or BoolElement. The numeric types require -an initial call to the NumberElement method self._setValueParser(function) -to set their type conversion function (string -> numeric Python type). This -call should be placed into the element _init() method.

-

The registration of data classes uses the PyType class:

-
>>> class ChristmasDate(objectify.ObjectifiedDataElement):
-...     def call_santa(self):
-...         print("Ho ho ho!")
-
->>> def checkChristmasDate(date_string):
-...     if not date_string.startswith('24.12.'):
-...         raise ValueError # or TypeError
-
->>> xmas_type = objectify.PyType('date', checkChristmasDate, ChristmasDate)
-
-

The PyType constructor takes a string type name, an (optional) callable type -check and the custom data class. If a type check is provided it must accept a -string as argument and raise ValueError or TypeError if it cannot handle the -string value.

-

PyTypes are used if an element carries a py:pytype attribute denoting its -data type or, in absence of such an attribute, if the given type check callable -does not raise a ValueError/TypeError exception when applied to the element -text.

-

If you want, you can also register this type under an XML Schema type name:

-
>>> xmas_type.xmlSchemaTypes = ("date",)
-
-

XML Schema types will be considered if the element has an xsi:type -attribute that specifies its data type. The line above binds the XSD type -date to the newly defined Python type. Note that this must be done before -the next step, which is to register the type. Then you can use it:

-
>>> xmas_type.register()
-
->>> root = objectify.fromstring(
-...             "<root><a>24.12.2000</a><b>12.24.2000</b></root>")
->>> root.a.call_santa()
-Ho ho ho!
->>> root.b.call_santa()
-Traceback (most recent call last):
-  ...
-AttributeError: no such child: call_santa
-
-

If you need to specify dependencies between the type check functions, you can -pass a sequence of type names through the before and after keyword -arguments of the register() method. The PyType will then try to register -itself before or after the respective types, as long as they are currently -registered. Note that this only impacts the currently registered types at the -time of registration. Types that are registered later on will not care about -the dependencies of already registered types.

-

If you provide XML Schema type information, this will override the type check -function defined above:

-
>>> root = objectify.fromstring('''\
-...    <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-...      <a xsi:type="date">12.24.2000</a>
-...    </root>
-...    ''')
->>> print(root.a)
-12.24.2000
->>> root.a.call_santa()
-Ho ho ho!
-
-

To unregister a type, call its unregister() method:

-
>>> root.a.call_santa()
-Ho ho ho!
->>> xmas_type.unregister()
->>> root.a.call_santa()
-Traceback (most recent call last):
-  ...
-AttributeError: no such child: call_santa
-
-

Be aware, though, that this does not immediately apply to elements to which -there already is a Python reference. Their Python class will only be changed -after all references are gone and the Python object is garbage collected.

-
-
-

Advanced element class lookup

-

In some cases, the normal data class setup is not enough. Being based -on lxml.etree, however, lxml.objectify supports very -fine-grained control over the Element classes used in a tree. All you -have to do is configure a different class lookup mechanism (or -write one yourself).

-

The first step for the setup is to create a new parser that builds -objectify documents. The objectify API is meant for data-centric XML -(as opposed to document XML with mixed content). Therefore, we -configure the parser to let it remove whitespace-only text from the -parsed document if it is not enclosed by an XML element. Note that -this alters the document infoset, so if you consider the removed -spaces as data in your specific use case, you should go with a normal -parser and just set the element class lookup. Most applications, -however, will work fine with the following setup:

-
>>> parser = objectify.makeparser(remove_blank_text=True)
-
-

What this does internally, is:

-
>>> parser = etree.XMLParser(remove_blank_text=True)
-
->>> lookup = objectify.ObjectifyElementClassLookup()
->>> parser.set_element_class_lookup(lookup)
-
-

If you want to change the lookup scheme, say, to get additional -support for namespace specific classes, you can register the -objectify lookup as a fallback of the namespace lookup. In this case, -however, you have to take care that the namespace classes inherit from -objectify.ObjectifiedElement, not only from the normal -lxml.etree.ElementBase, so that they support the objectify -API. The above setup code then becomes:

-
>>> lookup = etree.ElementNamespaceClassLookup(
-...                   objectify.ObjectifyElementClassLookup() )
->>> parser.set_element_class_lookup(lookup)
-
-

See the documentation on class lookup schemes for more information.

-
-
-
-

What is different from lxml.etree?

-

Such a different Element API obviously implies some side effects to the normal -behaviour of the rest of the API.

-
    -
  • len(<element>) returns the sibling count, not the number of children of -<element>. You can retrieve the number of children with the -countchildren() method.
  • -
  • Iteration over elements does not yield the children, but the siblings. You -can access all children with the iterchildren() method on elements or -retrieve a list by calling the getchildren() method.
  • -
  • The find, findall and findtext methods require a different implementation -based on ETXPath. In lxml.etree, they use a Python implementation based -on the original iteration scheme. This has the disadvantage that they may -not be 100% backwards compatible, and the additional advantage that they now -support any XPath expression.
  • -
-
-
- - - \ No newline at end of file diff --git a/doc/html/parsing.html b/doc/html/parsing.html deleted file mode 100644 index c6a4fc4..0000000 --- a/doc/html/parsing.html +++ /dev/null @@ -1,900 +0,0 @@ - - - - - -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 -event-driven API (currently only for XML).

- -

The usual setup procedure:

-
>>> from lxml import etree
-
-

The following examples also use StringIO or BytesIO to show how to parse -from files and file-like objects. Both are available in the io module:

-
from io import StringIO, BytesIO
-
-
-

Parsers

-

Parsers are represented by parser objects. There is support for parsing both -XML and (broken) HTML. Note that XHTML is best parsed as XML, parsing it with -the HTML parser can lead to unexpected results. Here is a simple example for -parsing XML from an in-memory string:

-
>>> xml = '<a xmlns="test"><b xmlns="test"/></a>'
-
->>> root = etree.fromstring(xml)
->>> etree.tostring(root)
-b'<a xmlns="test"><b xmlns="test"/></a>'
-
-

To read from a file or file-like object, you can use the parse() function, -which returns an ElementTree object:

-
>>> tree = etree.parse(StringIO(xml))
->>> etree.tostring(tree.getroot())
-b'<a xmlns="test"><b xmlns="test"/></a>'
-
-

Note how the parse() function reads from a file-like object here. If -parsing is done from a real file, it is more common (and also somewhat more -efficient) to pass a filename:

-
>>> tree = etree.parse("doc/test.xml")
-
-

lxml can parse from a local file, an HTTP URL or an FTP URL. It also -auto-detects and reads gzip-compressed XML files (.gz).

-

If you want to parse from memory and still provide a base URL for the document -(e.g. to support relative paths in an XInclude), you can pass the base_url -keyword argument:

-
>>> root = etree.fromstring(xml, base_url="http://where.it/is/from.xml")
-
-
-

Parser options

-

The parsers accept a number of setup options as keyword arguments. The above -example is easily extended to clean up namespaces during parsing:

-
>>> parser = etree.XMLParser(ns_clean=True)
->>> tree   = etree.parse(StringIO(xml), parser)
->>> etree.tostring(tree.getroot())
-b'<a xmlns="test"><b/></a>'
-
-

The keyword arguments in the constructor are mainly based on the libxml2 -parser configuration. A DTD will also be loaded if validation or attribute -default values are requested.

-

Available boolean keyword arguments:

-
    -
  • attribute_defaults - read the DTD (if referenced by the document) and add -the default attributes from it
  • -
  • dtd_validation - validate while parsing (if a DTD was referenced)
  • -
  • load_dtd - load and parse the DTD while parsing (no validation is performed)
  • -
  • no_network - prevent network access when looking up external -documents (on by default)
  • -
  • ns_clean - try to clean up redundant namespace declarations
  • -
  • recover - try hard to parse through broken XML
  • -
  • remove_blank_text - discard blank text nodes between tags, also known as -ignorable whitespace. This is best used together with a DTD or schema -(which tells data and noise apart), otherwise a heuristic will be applied.
  • -
  • remove_comments - discard comments
  • -
  • remove_pis - discard processing instructions
  • -
  • strip_cdata - replace CDATA sections by normal text content (on by -default)
  • -
  • resolve_entities - replace entities by their text value (on by -default)
  • -
  • huge_tree - disable security restrictions and support very deep trees -and very long text content (only affects libxml2 2.7+)
  • -
  • compact - use compact storage for short text content (on by default)
  • -
  • collect_ids - collect XML IDs in a hash table while parsing (on by default). -Disabling this can substantially speed up parsing of documents with many -different IDs if the hash lookup is not used afterwards.
  • -
-

Other keyword arguments:

-
    -
  • encoding - override the document encoding
  • -
  • target - a parser target object that will receive the parse events -(see The target parser interface)
  • -
  • schema - an XMLSchema to validate against (see validation)
  • -
-
-
-

Error log

-

Parsers have an error_log property that lists the errors and -warnings of the last parser run:

-
>>> parser = etree.XMLParser()
->>> print(len(parser.error_log))
-0
-
->>> tree = etree.XML("<root>\n</b>", parser)  # doctest: +ELLIPSIS
-Traceback (most recent call last):
-  ...
-lxml.etree.XMLSyntaxError: Opening and ending tag mismatch: root line 1 and b, line 2, column 5...
-
->>> print(len(parser.error_log))
-1
-
->>> error = parser.error_log[0]
->>> print(error.message)
-Opening and ending tag mismatch: root line 1 and b
->>> print(error.line)
-2
->>> print(error.column)
-5
-
-

Each entry in the log has the following properties:

-
    -
  • message: the message text
  • -
  • domain: the domain ID (see the lxml.etree.ErrorDomains class)
  • -
  • type: the message type ID (see the lxml.etree.ErrorTypes class)
  • -
  • level: the log level ID (see the lxml.etree.ErrorLevels class)
  • -
  • line: the line at which the message originated (if applicable)
  • -
  • column: the character column at which the message originated (if applicable)
  • -
  • filename: the name of the file in which the message originated (if applicable)
  • -
-

For convenience, there are also three properties that provide readable -names for the ID values:

-
    -
  • domain_name
  • -
  • type_name
  • -
  • level_name
  • -
-

To filter for a specific kind of message, use the different -filter_*() methods on the error log (see the -lxml.etree._ListErrorLog class).

-
-
-

Parsing HTML

-

HTML parsing is similarly simple. The parsers have a recover -keyword argument that the HTMLParser sets by default. It lets libxml2 -try its best to return a valid HTML tree with all content it can -manage to parse. It will not raise an exception on parser errors. -You should use libxml2 version 2.6.21 or newer to take advantage of -this feature.

-
>>> broken_html = "<html><head><title>test<body><h1>page title</h3>"
-
->>> parser = etree.HTMLParser()
->>> tree   = etree.parse(StringIO(broken_html), parser)
-
->>> result = etree.tostring(tree.getroot(),
-...                         pretty_print=True, method="html")
->>> print(result)
-<html>
-  <head>
-    <title>test</title>
-  </head>
-  <body>
-    <h1>page title</h1>
-  </body>
-</html>
-
-

Lxml has an HTML function, similar to the XML shortcut known from -ElementTree:

-
>>> html = etree.HTML(broken_html)
->>> result = etree.tostring(html, pretty_print=True, method="html")
->>> print(result)
-<html>
-  <head>
-    <title>test</title>
-  </head>
-  <body>
-    <h1>page title</h1>
-  </body>
-</html>
-
-

The support for parsing broken HTML depends entirely on libxml2's recovery -algorithm. It is not the fault of lxml if you find documents that are so -heavily broken that the parser cannot handle them. There is also no guarantee -that the resulting tree will contain all data from the original document. The -parser may have to drop seriously broken parts when struggling to keep -parsing. Especially misplaced meta tags can suffer from this, which may lead -to encoding problems.

-

Note that the result is a valid HTML tree, but it may not be a -well-formed XML tree. For example, XML forbids double hyphens in -comments, which the HTML parser will happily accept in recovery mode. -Therefore, if your goal is to serialise an HTML document as an -XML/XHTML document after parsing, you may have to apply some manual -preprocessing first.

-

Also note that the HTML parser is meant to parse HTML documents. For -XHTML documents, use the XML parser, which is namespace aware.

-
-
-

Doctype information

-

The use of the libxml2 parsers makes some additional information available at -the API level. Currently, ElementTree objects can access the DOCTYPE -information provided by a parsed document, as well as the XML version and the -original encoding. Since lxml 3.5, the doctype references are mutable.

-
>>> pub_id  = "-//W3C//DTD XHTML 1.0 Transitional//EN"
->>> sys_url = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
->>> doctype_string = '<!DOCTYPE html PUBLIC "%s" "%s">' % (pub_id, sys_url)
->>> xml_header = '<?xml version="1.0" encoding="ascii"?>'
->>> xhtml = xml_header + doctype_string + '<html><body></body></html>'
-
->>> tree = etree.parse(StringIO(xhtml))
->>> docinfo = tree.docinfo
->>> print(docinfo.public_id)
--//W3C//DTD XHTML 1.0 Transitional//EN
->>> print(docinfo.system_url)
-http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
->>> docinfo.doctype == doctype_string
-True
-
->>> print(docinfo.xml_version)
-1.0
->>> print(docinfo.encoding)
-ascii
-
->>> docinfo.system_url = None
->>> docinfo.public_id = None
->>> print(etree.tostring(tree))
-<!DOCTYPE html>
-<html><body/></html>
-
-
-
-
-

The target parser interface

-

As in ElementTree, and similar to a SAX event handler, you can pass -a target object to the parser:

-
>>> class EchoTarget(object):
-...     def start(self, tag, attrib):
-...         print("start %s %r" % (tag, dict(attrib)))
-...     def end(self, tag):
-...         print("end %s" % tag)
-...     def data(self, data):
-...         print("data %r" % data)
-...     def comment(self, text):
-...         print("comment %s" % text)
-...     def close(self):
-...         print("close")
-...         return "closed!"
-
->>> parser = etree.XMLParser(target = EchoTarget())
-
->>> result = etree.XML("<element>some<!--comment-->text</element>",
-...                    parser)
-start element {}
-data u'some'
-comment comment
-data u'text'
-end element
-close
-
->>> print(result)
-closed!
-
-

It is important for the .close() method to reset the parser target -to a usable state, so that you can reuse the parser as often as you -like:

-
>>> result = etree.XML("<element>some<!--comment-->text</element>",
-...                    parser)
-start element {}
-data u'some'
-comment comment
-data u'text'
-end element
-close
-
->>> print(result)
-closed!
-
-

Starting with lxml 2.3, the .close() method will also be called in -the error case. This diverges from the behaviour of ElementTree, but -allows target objects to clean up their state in all situations, so -that the parser can reuse them afterwards.

-
>>> class CollectorTarget(object):
-...     def __init__(self):
-...         self.events = []
-...     def start(self, tag, attrib):
-...         self.events.append("start %s %r" % (tag, dict(attrib)))
-...     def end(self, tag):
-...         self.events.append("end %s" % tag)
-...     def data(self, data):
-...         self.events.append("data %r" % data)
-...     def comment(self, text):
-...         self.events.append("comment %s" % text)
-...     def close(self):
-...         self.events.append("close")
-...         return "closed!"
-
->>> parser = etree.XMLParser(target = CollectorTarget())
-
->>> result = etree.XML("<element>some</error>",
-...                    parser)        # doctest: +ELLIPSIS
-Traceback (most recent call last):
-  ...
-lxml.etree.XMLSyntaxError: Opening and ending tag mismatch...
-
->>> for event in parser.target.events:
-...     print(event)
-start element {}
-data u'some'
-close
-
-

Note that the parser does not build a tree when using a parser -target. The result of the parser run is whatever the target object -returns from its .close() method. If you want to return an XML -tree here, you have to create it programmatically in the target -object. An example for a parser target that builds a tree is the -TreeBuilder:

-
>>> parser = etree.XMLParser(target = etree.TreeBuilder())
-
->>> result = etree.XML("<element>some<!--comment-->text</element>",
-...                    parser)
-
->>> print(result.tag)
-element
->>> print(result[0].text)
-comment
-
-
-
-

The feed parser interface

-

Since lxml 2.0, the parsers have a feed parser interface that is -compatible to the ElementTree parsers. You can use it to feed data -into the parser in a controlled step-by-step way.

-

In lxml.etree, you can use both interfaces to a parser at the same -time: the parse() or XML() functions, and the feed parser -interface. Both are independent and will not conflict (except if used -in conjunction with a parser target object as described above).

-

To start parsing with a feed parser, just call its feed() method -to feed it some data.

-
>>> parser = etree.XMLParser()
-
->>> for data in ('<?xml versio', 'n="1.0"?', '><roo', 't><a', '/></root>'):
-...     parser.feed(data)
-
-

When you are done parsing, you must call the close() method to -retrieve the root Element of the parse result document, and to unlock the -parser:

-
>>> root = parser.close()
-
->>> print(root.tag)
-root
->>> print(root[0].tag)
-a
-
-

If you do not call close(), the parser will stay locked and -subsequent feeds will keep appending data, usually resulting in a non -well-formed document and an unexpected parser error. So make sure you -always close the parser after use, also in the exception case.

-

Another way of achieving the same step-by-step parsing is by writing your own -file-like object that returns a chunk of data on each read() call. Where -the feed parser interface allows you to actively pass data chunks into the -parser, a file-like object passively responds to read() requests of the -parser itself. Depending on the data source, either way may be more natural.

-

Note that the feed parser has its own error log called -feed_error_log. Errors in the feed parser do not show up in the -normal error_log and vice versa.

-

You can also combine the feed parser interface with the target parser:

-
>>> parser = etree.XMLParser(target = EchoTarget())
-
->>> parser.feed("<eleme")
->>> parser.feed("nt>some text</elem")
-start element {}
-data u'some text'
->>> parser.feed("ent>")
-end element
-
->>> result = parser.close()
-close
->>> print(result)
-closed!
-
-

Again, this prevents the automatic creation of an XML tree and leaves -all the event handling to the target object. The close() method -of the parser forwards the return value of the target's close() -method.

-
-
-

Incremental event parsing

-

In Python 3.4, the xml.etree.ElementTree package gained an extension -to the feed parser interface that is implemented by the XMLPullParser -class. It additionally allows processing parse events after each -incremental parsing step, by calling the .read_events() method and -iterating over the result. This is most useful for non-blocking execution -environments where data chunks arrive one after the other and should be -processed as far as possible in each step.

-

The same feature is available in lxml 3.3. The basic usage is as follows:

-
>>> parser = etree.XMLPullParser(events=('start', 'end'))
-
->>> def print_events(parser):
-...     for action, element in parser.read_events():
-...         print('%s: %s' % (action, element.tag))
-
->>> parser.feed('<root>some text')
->>> print_events(parser)
-start: root
->>> print_events(parser)    # well, no more events, as before ...
-
->>> parser.feed('<child><a />')
->>> print_events(parser)
-start: child
-start: a
-end: a
-
->>> parser.feed('</child></roo')
->>> print_events(parser)
-end: child
->>> parser.feed('t>')
->>> print_events(parser)
-end: root
-
-

Just like the normal feed parser, the XMLPullParser builds a tree in -memory (and you should always call the .close() method when done with -parsing):

-
>>> root = parser.close()
->>> etree.tostring(root)
-b'<root>some text<child><a/></child></root>'
-
-

However, since the parser provides incremental access to that tree, -you can explicitly delete content that you no longer need once you -have processed it. Read the section on Modifying the tree below -to see what you can do here and what kind of modifications you should -avoid.

-

In lxml, it is enough to call the .read_events() method once as -the iterator it returns can be reused when new events are available.

-

Also, as known from other iterators in lxml, you can pass a tag -argument that selects which parse events are returned by the -.read_events() iterator.

-
-

Event types

-

The parse events are tuples (event-type, object). The event types -supported by ElementTree and lxml.etree are the strings 'start', 'end', -'start-ns' and 'end-ns'. The 'start' and 'end' events represent opening -and closing elements. They are accompanied by the respective Element -instance. By default, only 'end' events are generated, whereas the -example above requested the generation of both 'start' and 'end' events.

-

The 'start-ns' and 'end-ns' events notify about namespace declarations. -They do not come with Elements. Instead, the value of the 'start-ns' -event is a tuple (prefix, namespaceURI) that designates the beginning -of a prefix-namespace mapping. The corresponding end-ns event does -not have a value (None). It is common practice to use a list as namespace -stack and pop the last entry on the 'end-ns' event.

-
>>> def print_events(events):
-...     for action, obj in events:
-...         if action in ('start', 'end'):
-...             print("%s: %s" % (action, obj.tag))
-...         elif action == 'start-ns':
-...             print("%s: %s" % (action, obj))
-...         else:
-...             print(action)
-
->>> event_types = ("start", "end", "start-ns", "end-ns")
->>> parser = etree.XMLPullParser(event_types)
->>> events = parser.read_events()
-
->>> parser.feed('<root><element>')
->>> print_events(events)
-start: root
-start: element
->>> parser.feed('text</element><element>text</element>')
->>> print_events(events)
-end: element
-start: element
-end: element
->>> parser.feed('<empty-element xmlns="http://testns/" />')
->>> print_events(events)
-start-ns: ('', 'http://testns/')
-start: {http://testns/}empty-element
-end: {http://testns/}empty-element
-end-ns
->>> parser.feed('</root>')
->>> print_events(events)
-end: root
-
-
-
-

Modifying the tree

-

You can modify the element and its descendants when handling the -'end' event. To save memory, for example, you can remove subtrees -that are no longer needed:

-
>>> parser = etree.XMLPullParser()
->>> events = parser.read_events()
-
->>> parser.feed('<root><element key="value">text</element>')
->>> parser.feed('<element><child /></element>')
->>> for action, elem in events:
-...     print('%s: %d' % (elem.tag, len(elem)))  # processing
-...     elem.clear()                             # delete children
-element: 0
-child: 0
-element: 1
->>> parser.feed('<empty-element xmlns="http://testns/" /></root>')
->>> for action, elem in events:
-...     print('%s: %d' % (elem.tag, len(elem)))  # processing
-...     elem.clear()                             # delete children
-{http://testns/}empty-element: 0
-root: 3
-
->>> root = parser.close()
->>> etree.tostring(root)
-b'<root/>'
-
-

WARNING: During the 'start' event, any content of the element, -such as the descendants, following siblings or text, is not yet -available and should not be accessed. Only attributes are guaranteed -to be set. During the 'end' event, the element and its descendants -can be freely modified, but its following siblings should not be -accessed. During either of the two events, you must not modify or -move the ancestors (parents) of the current element. You should also -avoid moving or discarding the element itself. The golden rule is: do -not touch anything that will have to be touched again by the parser -later on.

-

If you have elements with a long list of children in your XML file and want -to save more memory during parsing, you can clean up the preceding siblings -of the current element:

-
>>> for event, element in parser.read_events():
-...     # ... do something with the element
-...     element.clear()                 # clean up children
-...     while element.getprevious() is not None:
-...         del element.getparent()[0]  # clean up preceding siblings
-
-

The while loop deletes multiple siblings in a row. This is only necessary -if you skipped over some of them using the tag keyword argument. -Otherwise, a simple if should do. The more selective your tag is, -however, the more thought you will have to put into finding the right way to -clean up the elements that were skipped. Therefore, it is sometimes easier to -traverse all elements and do the tag selection by hand in the event handler -code.

-
-
-

Selective tag events

-

As an extension over ElementTree, lxml.etree accepts a tag keyword -argument just like element.iter(tag). This restricts events to a -specific tag or namespace:

-
>>> parser = etree.XMLPullParser(tag="element")
-
->>> parser.feed('<root><element key="value">text</element>')
->>> parser.feed('<element><child /></element>')
->>> parser.feed('<empty-element xmlns="http://testns/" /></root>')
-
->>> for action, elem in parser.read_events():
-...     print("%s: %s" % (action, elem.tag))
-end: element
-end: element
-
->>> event_types = ("start", "end")
->>> parser = etree.XMLPullParser(event_types, tag="{http://testns/}*")
-
->>> parser.feed('<root><element key="value">text</element>')
->>> parser.feed('<element><child /></element>')
->>> parser.feed('<empty-element xmlns="http://testns/" /></root>')
-
->>> for action, elem in parser.read_events():
-...     print("%s: %s" % (action, elem.tag))
-start: {http://testns/}empty-element
-end: {http://testns/}empty-element
-
-
-
-

Comments and PIs

-

As an extension over ElementTree, the XMLPullParser in lxml.etree -also supports the event types 'comment' and 'pi' for the respective -XML structures.

-
>>> event_types = ("start", "end", "comment", "pi")
->>> parser = etree.XMLPullParser(event_types)
-
->>> parser.feed('<?some pi ?><!-- a comment --><root>')
->>> parser.feed('<element key="value">text</element>')
->>> parser.feed('<!-- another comment -->')
->>> parser.feed('<element>text</element>tail')
->>> parser.feed('<empty-element xmlns="http://testns/" />')
->>> parser.feed('</root>')
-
->>> for action, elem in parser.read_events():
-...     if action in ('start', 'end'):
-...         print("%s: %s" % (action, elem.tag))
-...     elif action == 'pi':
-...         print("%s: -%s=%s-" % (action, elem.target, elem.text))
-...     else: # 'comment'
-...         print("%s: -%s-" % (action, elem.text))
-pi: -some=pi -
-comment: - a comment -
-start: root
-start: element
-end: element
-comment: - another comment -
-start: element
-end: element
-start: {http://testns/}empty-element
-end: {http://testns/}empty-element
-end: root
-
->>> root = parser.close()
->>> print(root.tag)
-root
-
-
-
-

Events with custom targets

-

You can combine the pull parser with a parser target. In that case, -it is the target's responsibility to generate event values. Whatever -it returns from its .start() and .end() methods will be returned -by the pull parser as the second item of the parse events tuple.

-
>>> class Target(object):
-...     def start(self, tag, attrib):
-...         print('-> start(%s)' % tag)
-...         return '>>START: %s<<' % tag
-...     def end(self, tag):
-...         print('-> end(%s)' % tag)
-...         return '>>END: %s<<' % tag
-...     def close(self):
-...         print('-> close()')
-...         return "CLOSED!"
-
->>> event_types = ('start', 'end')
->>> parser = etree.XMLPullParser(event_types, target=Target())
-
->>> parser.feed('<root><child1 /><child2 /></root>')
--> start(root)
--> start(child1)
--> end(child1)
--> start(child2)
--> end(child2)
--> end(root)
-
->>> for action, value in parser.read_events():
-...     print('%s: %s' % (action, value))
-start: >>START: root<<
-start: >>START: child1<<
-end: >>END: child1<<
-start: >>START: child2<<
-end: >>END: child2<<
-end: >>END: root<<
-
->>> print(parser.close())
--> close()
-CLOSED!
-
-

As you can see, the event values do not even have to be Element objects. -The target is generally free to decide how it wants to create an XML tree -or whatever else it wants to make of the parser callbacks. In many cases, -however, you will want to make your custom target inherit from the -TreeBuilder class in order to have it build a tree that you can process -normally. The start() and .end() methods of TreeBuilder return -the Element object that was created, so you can override them and modify -the input or output according to your needs. Here is an example that -filters attributes before they are being added to the tree:

-
>>> class AttributeFilter(etree.TreeBuilder):
-...     def start(self, tag, attrib):
-...         attrib = dict(attrib)
-...         if 'evil' in attrib:
-...             del attrib['evil']
-...         return super(AttributeFilter, self).start(tag, attrib)
-
->>> parser = etree.XMLPullParser(target=AttributeFilter())
->>> parser.feed('<root><child1 test="123" /><child2 evil="YES" /></root>')
-
->>> for action, element in parser.read_events():
-...     print('%s: %s(%r)' % (action, element.tag, element.attrib))
-end: child1({'test': '123'})
-end: child2({})
-end: root({})
-
->>> root = parser.close()
-
-
-
-
-

iterparse and iterwalk

-

As known from ElementTree, the iterparse() utility function -returns an iterator that generates parser events for an XML file (or -file-like object), while building the tree. You can think of it as -a blocking wrapper around the XMLPullParser that automatically and -incrementally reads data from the input file for you and provides a -single iterator for them:

-
>>> xml = '''
-... <root>
-...   <element key='value'>text</element>
-...   <element>text</element>tail
-...   <empty-element xmlns="http://testns/" />
-... </root>
-... '''
-
->>> context = etree.iterparse(StringIO(xml))
->>> for action, elem in context:
-...     print("%s: %s" % (action, elem.tag))
-end: element
-end: element
-end: {http://testns/}empty-element
-end: root
-
-

After parsing, the resulting tree is available through the root property -of the iterator:

-
>>> context.root.tag
-'root'
-
-

The other event types can be activated with the events keyword argument:

-
>>> events = ("start", "end")
->>> context = etree.iterparse(StringIO(xml), events=events)
->>> for action, elem in context:
-...     print("%s: %s" % (action, elem.tag))
-start: root
-start: element
-end: element
-start: element
-end: element
-start: {http://testns/}empty-element
-end: {http://testns/}empty-element
-end: root
-
-

iterparse() also supports the tag argument for selective event -iteration and several other parameters that control the parser setup. -The tag argument can be a single tag or a sequence of tags. -You can also use it to parse HTML input by passing html=True.

-
-

iterwalk

-

For convenience, lxml also provides an iterwalk() function. -It behaves exactly like iterparse(), but works on Elements and -ElementTrees. Here is an example for a tree parsed by iterparse():

-
>>> f = StringIO(xml)
->>> context = etree.iterparse(
-...             f, events=("start", "end"), tag="element")
-
->>> for action, elem in context:
-...     print("%s: %s" % (action, elem.tag))
-start: element
-end: element
-start: element
-end: element
-
->>> root = context.root
-
-

And now we can take the resulting in-memory tree and iterate over it -using iterwalk() to get the exact same events without parsing the -input again:

-
>>> context = etree.iterwalk(
-...             root, events=("start", "end"), tag="element")
-
->>> for action, elem in context:
-...     print("%s: %s" % (action, elem.tag))
-start: element
-end: element
-start: element
-end: element
-
-

In order to avoid wasting time on uninteresting parts of the tree, the iterwalk -iterator can be instructed to skip over an entire subtree with its -.skip_subtree() method.

-
>>> root = etree.XML('''
-... <root>
-...   <a> <b /> </a>
-...   <c />
-... </root>
-... ''')
-
->>> context = etree.iterwalk(root, events=("start", "end"))
-
->>> for action, elem in context:
-...     print("%s: %s" % (action, elem.tag))
-...     if action == 'start' and elem.tag == 'a':
-...         context.skip_subtree()  # ignore <b>
-start: root
-start: a
-end: a
-start: c
-end: c
-end: root
-
-

Note that .skip_subtree() only has an effect when handling start or -start-ns events.

-
-
-
-

Python unicode strings

-

lxml.etree has broader support for Python unicode strings than the ElementTree -library. First of all, where ElementTree would raise an exception, the -parsers in lxml.etree can handle unicode strings straight away. This is most -helpful for XML snippets embedded in source code using the XML() -function:

-
>>> root = etree.XML( u'<test> \uf8d1 + \uf8d2 </test>' )
-
-

This requires, however, that unicode strings do not specify a conflicting -encoding themselves and thus lie about their real encoding:

-
>>> etree.XML( u'<?xml version="1.0" encoding="ASCII"?>\n' +
-...            u'<test> \uf8d1 + \uf8d2 </test>' )
-Traceback (most recent call last):
-  ...
-ValueError: Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration.
-
-

Similarly, you will get errors when you try the same with HTML data in a -unicode string that specifies a charset in a meta tag of the header. You -should generally avoid converting XML/HTML data to unicode before passing it -into the parsers. It is both slower and error prone.

-
-

Serialising to Unicode strings

-

To serialize the result, you would normally use the tostring() -module function, which serializes to plain ASCII by default or a -number of other byte encodings if asked for:

-
>>> etree.tostring(root)
-b'<test> &#63697; + &#63698; </test>'
-
->>> etree.tostring(root, encoding='UTF-8', xml_declaration=False)
-b'<test> \xef\xa3\x91 + \xef\xa3\x92 </test>'
-
-

As an extension, lxml.etree recognises the name 'unicode' as an argument -to the encoding parameter to build a Python unicode representation of a tree:

-
>>> etree.tostring(root, encoding='unicode')
-u'<test> \uf8d1 + \uf8d2 </test>'
-
->>> el = etree.Element("test")
->>> etree.tostring(el, encoding='unicode')
-u'<test/>'
-
->>> subel = etree.SubElement(el, "subtest")
->>> etree.tostring(el, encoding='unicode')
-u'<test><subtest/></test>'
-
->>> tree = etree.ElementTree(el)
->>> etree.tostring(tree, encoding='unicode')
-u'<test><subtest/></test>'
-
-

The result of tostring(encoding='unicode') can be treated like any -other Python unicode string and then passed back into the parsers. -However, if you want to save the result to a file or pass it over the -network, you should use write() or tostring() with a byte -encoding (typically UTF-8) to serialize the XML. The main reason is -that unicode strings returned by tostring(encoding='unicode') are -not byte streams and they never have an XML declaration to specify -their encoding. These strings are most likely not parsable by other -XML libraries.

-

For normal byte encodings, the tostring() function automatically -adds a declaration as needed that reflects the encoding of the -returned string. This makes it possible for other parsers to -correctly parse the XML byte stream. Note that using tostring() -with UTF-8 is also considerably faster in most cases.

-
-
-
- - - \ No newline at end of file diff --git a/doc/html/performance.html b/doc/html/performance.html deleted file mode 100644 index 3545af6..0000000 --- a/doc/html/performance.html +++ /dev/null @@ -1,805 +0,0 @@ - - - - - -Benchmarks and Speed - - - - - - -
-

Benchmarks and Speed

- --- - - - -
Author:Stefan Behnel
-

lxml.etree is a very fast XML library. Most of this is due to the -speed of libxml2, e.g. the parser and serialiser, or the XPath engine. -Other areas of lxml were specifically written for high performance in -high-level operations, such as the tree iterators.

-

On the other hand, the simplicity of lxml sometimes hides internal -operations that are more costly than the API suggests. If you are not -aware of these cases, lxml may not always perform as you expect. A -common example in the Python world is the Python list type. New users -often expect it to be a linked list, while it actually is implemented -as an array, which results in a completely different complexity for -common operations.

-

Similarly, the tree model of libxml2 is more complex than what lxml's -ElementTree API projects into Python space, so some operations may -show unexpected performance. Rest assured that most lxml users will -not notice this in real life, as lxml is very fast in absolute -numbers. It is definitely fast enough for most applications, so lxml -is probably somewhere between 'fast enough' and 'the best choice' for -yours. Read some messages from happy users to see what we mean.

-

This text describes where lxml.etree (abbreviated to 'lxe') excels, gives -hints on some performance traps and compares the overall performance to the -original ElementTree (ET) and cElementTree (cET) libraries by Fredrik Lundh. -The cElementTree library is a fast C-implementation of the original -ElementTree.

- -
-

General notes

-

First thing to say: there is an overhead involved in having a DOM-like C -library mimic the ElementTree API. As opposed to ElementTree, lxml has to -generate Python representations of tree nodes on the fly when asked for them, -and the internal tree structure of libxml2 results in a higher maintenance -overhead than the simpler top-down structure of ElementTree. What this means -is: the more of your code runs in Python, the less you can benefit from the -speed of lxml and libxml2. Note, however, that this is true for most -performance critical Python applications. No one would implement Fourier -transformations in pure Python when you can use NumPy.

-

The up side then is that lxml provides powerful tools like tree iterators, -XPath and XSLT, that can handle complex operations at the speed of C. Their -pythonic API in lxml makes them so flexible that most applications can easily -benefit from them.

-
-
-

How to read the timings

-

The statements made here are backed by the (micro-)benchmark scripts -bench_etree.py, bench_xpath.py and bench_objectify.py that come with -the lxml source distribution. They are distributed under the same BSD license -as lxml itself, and the lxml project would like to promote them as a general -benchmarking suite for all ElementTree implementations. New benchmarks are -very easy to add as tiny test methods, so if you write a performance test for -a specific part of the API yourself, please consider sending it to the lxml -mailing list.

-

The timings presented below compare lxml 3.1.1 (with libxml2 2.9.0) to the -latest released versions of ElementTree (with cElementTree as accelerator -module) in the standard library of CPython 3.3.0. They were run -single-threaded on a 2.9GHz 64bit double core Intel i7 machine under -Ubuntu Linux 12.10 (Quantal). The C libraries were compiled with the -same platform specific optimisation flags. The Python interpreter was -also manually compiled for the platform. Note that many of the following -ElementTree timings are therefore better than what a normal Python -installation with the standard library (c)ElementTree modules would yield. -Note also that CPython 2.7 and 3.2+ come with a newer ElementTree version, -so older Python installations will not perform as good for (c)ElementTree, -and sometimes substantially worse.

-

The scripts run a number of simple tests on the different libraries, using -different XML tree configurations: different tree sizes (T1-4), with or -without attributes (-/A), with or without ASCII string or unicode text -(-/S/U), and either against a tree or its serialised XML form (T/X). In the -result extracts cited below, T1 refers to a 3-level tree with many children at -the third level, T2 is swapped around to have many children below the root -element, T3 is a deep tree with few children at each level and T4 is a small -tree, slightly broader than deep. If repetition is involved, this usually -means running the benchmark in a loop over all children of the tree root, -otherwise, the operation is run on the root node (C/R).

-

As an example, the character code (SATR T1) states that the benchmark was -running for tree T1, with plain string text (S) and attributes (A). It was -run against the root element (R) in the tree structure of the data (T).

-

Note that very small operations are repeated in integer loops to make them -measurable. It is therefore not always possible to compare the absolute -timings of, say, a single access benchmark (which usually loops) and a 'get -all in one step' benchmark, which already takes enough time to be measurable -and is therefore measured as is. An example is the index access to a single -child, which cannot be compared to the timings for getchildren(). Take a -look at the concrete benchmarks in the scripts to understand how the numbers -compare.

-
-
-

Parsing and Serialising

-

Serialisation is an area where lxml excels. The reason is that it -executes entirely at the C level, without any interaction with Python -code. The results are rather impressive, especially for UTF-8, which -is native to libxml2. While 20 to 40 times faster than (c)ElementTree -1.2 (which was part of the standard library before Python 2.7/3.2), -lxml is still more than 10 times as fast as the much improved -ElementTree 1.3 in recent Python versions:

-
-lxe: tostring_utf16  (S-TR T1)    7.9958 msec/pass
-cET: tostring_utf16  (S-TR T1)   83.1358 msec/pass
-
-lxe: tostring_utf16  (UATR T1)    8.3222 msec/pass
-cET: tostring_utf16  (UATR T1)   84.4688 msec/pass
-
-lxe: tostring_utf16  (S-TR T2)    8.2297 msec/pass
-cET: tostring_utf16  (S-TR T2)   87.3415 msec/pass
-
-lxe: tostring_utf8   (S-TR T2)    6.5677 msec/pass
-cET: tostring_utf8   (S-TR T2)   76.2064 msec/pass
-
-lxe: tostring_utf8   (U-TR T3)    1.1952 msec/pass
-cET: tostring_utf8   (U-TR T3)   22.0058 msec/pass
-
-

The difference is somewhat smaller for plain text serialisation:

-
-lxe: tostring_text_ascii     (S-TR T1)    2.7738 msec/pass
-cET: tostring_text_ascii     (S-TR T1)    4.7629 msec/pass
-
-lxe: tostring_text_ascii     (S-TR T3)    0.8273 msec/pass
-cET: tostring_text_ascii     (S-TR T3)    1.5273 msec/pass
-
-lxe: tostring_text_utf16     (S-TR T1)    2.7659 msec/pass
-cET: tostring_text_utf16     (S-TR T1)   10.5038 msec/pass
-
-lxe: tostring_text_utf16     (U-TR T1)    2.8017 msec/pass
-cET: tostring_text_utf16     (U-TR T1)   10.5207 msec/pass
-
-

The tostring() function also supports serialisation to a Python -unicode string object, which is currently faster in ElementTree -under CPython 3.3:

-
-lxe: tostring_text_unicode   (S-TR T1)    2.6896 msec/pass
-cET: tostring_text_unicode   (S-TR T1)    1.0056 msec/pass
-
-lxe: tostring_text_unicode   (U-TR T1)    2.7366 msec/pass
-cET: tostring_text_unicode   (U-TR T1)    1.0154 msec/pass
-
-lxe: tostring_text_unicode   (S-TR T3)    0.7997 msec/pass
-cET: tostring_text_unicode   (S-TR T3)    0.3154 msec/pass
-
-lxe: tostring_text_unicode   (U-TR T4)    0.0048 msec/pass
-cET: tostring_text_unicode   (U-TR T4)    0.0160 msec/pass
-
-

For parsing, lxml.etree and cElementTree compete for the medal. -Depending on the input, either of the two can be faster. The (c)ET -libraries use a very thin layer on top of the expat parser, which is -known to be very fast. Here are some timings from the benchmarking -suite:

-
-lxe: parse_bytesIO   (SAXR T1)   13.0246 msec/pass
-cET: parse_bytesIO   (SAXR T1)    8.2929 msec/pass
-
-lxe: parse_bytesIO   (S-XR T3)    1.3542 msec/pass
-cET: parse_bytesIO   (S-XR T3)    2.4023 msec/pass
-
-lxe: parse_bytesIO   (UAXR T3)    7.5610 msec/pass
-cET: parse_bytesIO   (UAXR T3)   11.2455 msec/pass
-
-

And another couple of timings from a benchmark that Fredrik Lundh -used to promote cElementTree, comparing a number of different -parsers. First, parsing a 274KB XML file containing Shakespeare's -Hamlet:

-
-xml.etree.ElementTree.parse done in 0.017 seconds
-xml.etree.cElementTree.parse done in 0.007 seconds
-xml.etree.cElementTree.XMLParser.feed(): 6636 nodes read in 0.007 seconds
-lxml.etree.parse done in 0.003 seconds
-drop_whitespace.parse done in 0.003 seconds
-lxml.etree.XMLParser.feed(): 6636 nodes read in 0.004 seconds
-minidom tree read in 0.080 seconds
-
-

And a 3.4MB XML file containing the Old Testament:

-
-xml.etree.ElementTree.parse done in 0.038 seconds
-xml.etree.cElementTree.parse done in 0.030 seconds
-xml.etree.cElementTree.XMLParser.feed(): 25317 nodes read in 0.030 seconds
-lxml.etree.parse done in 0.016 seconds
-drop_whitespace.parse done in 0.015 seconds
-lxml.etree.XMLParser.feed(): 25317 nodes read in 0.022 seconds
-minidom tree read in 0.288 seconds
-
-

Here are the same benchmarks again, but including the memory usage -of the process in KB before and after parsing (using os.fork() to -make sure we start from a clean state each time). For the 274KB -hamlet.xml file:

-
-Memory usage: 7284
-xml.etree.ElementTree.parse done in 0.017 seconds
-Memory usage: 9432 (+2148)
-xml.etree.cElementTree.parse done in 0.007 seconds
-Memory usage: 9432 (+2152)
-xml.etree.cElementTree.XMLParser.feed(): 6636 nodes read in 0.007 seconds
-Memory usage: 9448 (+2164)
-lxml.etree.parse done in 0.003 seconds
-Memory usage: 11032 (+3748)
-drop_whitespace.parse done in 0.003 seconds
-Memory usage: 10224 (+2940)
-lxml.etree.XMLParser.feed(): 6636 nodes read in 0.004 seconds
-Memory usage: 11804 (+4520)
-minidom tree read in 0.080 seconds
-Memory usage: 12324 (+5040)
-
-

And for the 3.4MB Old Testament XML file:

-
-Memory usage: 10420
-xml.etree.ElementTree.parse done in 0.038 seconds
-Memory usage: 20660 (+10240)
-xml.etree.cElementTree.parse done in 0.030 seconds
-Memory usage: 20660 (+10240)
-xml.etree.cElementTree.XMLParser.feed(): 25317 nodes read in 0.030 seconds
-Memory usage: 20844 (+10424)
-lxml.etree.parse done in 0.016 seconds
-Memory usage: 27624 (+17204)
-drop_whitespace.parse done in 0.015 seconds
-Memory usage: 24468 (+14052)
-lxml.etree.XMLParser.feed(): 25317 nodes read in 0.022 seconds
-Memory usage: 29844 (+19424)
-minidom tree read in 0.288 seconds
-Memory usage: 28788 (+18368)
-
-

As can be seen from the sizes, both lxml.etree and cElementTree are -rather memory friendly compared to the pure Python libraries -ElementTree and (especially) minidom. Comparing to older CPython -versions, the memory footprint of the minidom library was considerably -reduced in CPython 3.3, by about a factor of 4 in this case.

-

For plain parser performance, lxml.etree and cElementTree tend to stay -rather close to each other, usually within a factor of two, with -winners well distributed over both sides. Similar timings can be -observed for the iterparse() function:

-
-lxe: iterparse_bytesIO   (SAXR T1)   17.9198 msec/pass
-cET: iterparse_bytesIO   (SAXR T1)   14.4982 msec/pass
-
-lxe: iterparse_bytesIO   (UAXR T3)    8.8522 msec/pass
-cET: iterparse_bytesIO   (UAXR T3)   12.9857 msec/pass
-
-

However, if you benchmark the complete round-trip of a serialise-parse -cycle, the numbers will look similar to these:

-
-lxe: write_utf8_parse_bytesIO   (S-TR T1)   19.8867 msec/pass
-cET: write_utf8_parse_bytesIO   (S-TR T1)   80.7259 msec/pass
-
-lxe: write_utf8_parse_bytesIO   (UATR T2)   23.7896 msec/pass
-cET: write_utf8_parse_bytesIO   (UATR T2)   98.0766 msec/pass
-
-lxe: write_utf8_parse_bytesIO   (S-TR T3)    3.0684 msec/pass
-cET: write_utf8_parse_bytesIO   (S-TR T3)   24.6122 msec/pass
-
-lxe: write_utf8_parse_bytesIO   (SATR T4)    0.3495 msec/pass
-cET: write_utf8_parse_bytesIO   (SATR T4)    1.9610 msec/pass
-
-

For applications that require a high parser throughput of large files, -and that do little to no serialization, both cET and lxml.etree are a -good choice. The cET library is particularly fast for iterparse -applications that extract small amounts of data or aggregate -information from large XML data sets that do not fit into memory. If -it comes to round-trip performance, however, lxml is multiple times -faster in total. So, whenever the input documents are not -considerably larger than the output, lxml is the clear winner.

-

Regarding HTML parsing, Ian Bicking has done some benchmarking on -lxml's HTML parser, comparing it to a number of other famous HTML -parser tools for Python. lxml wins this contest by quite a length. -To give an idea, the numbers suggest that lxml.html can run a couple -of parse-serialise cycles in the time that other tools need for -parsing alone. The comparison even shows some very favourable results -regarding memory consumption.

-

Liza Daly has written an article that presents a couple of tweaks to -get the most out of lxml's parser for very large XML documents. She -quite favourably positions lxml.etree as a tool for -high-performance XML parsing.

-

Finally, xml.com has a couple of publications about XML parser -performance. Farwick and Hafner have written two interesting articles -that compare the parser of libxml2 to some major Java based XML -parsers. One deals with event-driven parser performance, the other -one presents benchmark results comparing DOM parsers. Both -comparisons suggest that libxml2's parser performance is largely -superior to all commonly used Java parsers in almost all cases. Note -that the C parser benchmark results are based on xmlbench, which uses -a simpler setup for libxml2 than lxml does.

-
-
-

The ElementTree API

-

Since all three libraries implement the same API, their performance is -easy to compare in this area. A major disadvantage for lxml's -performance is the different tree model that underlies libxml2. It -allows lxml to provide parent pointers for elements and full XPath -support, but also increases the overhead of tree building and -restructuring. This can be seen from the tree setup times of the -benchmark (given in seconds):

-
-lxe:       --     S-     U-     -A     SA     UA
-     T1: 0.0299 0.0343 0.0344 0.0293 0.0345 0.0342
-     T2: 0.0368 0.0423 0.0418 0.0427 0.0474 0.0459
-     T3: 0.0088 0.0084 0.0086 0.0251 0.0258 0.0261
-     T4: 0.0002 0.0002 0.0002 0.0005 0.0006 0.0006
-cET:       --     S-     U-     -A     SA     UA
-     T1: 0.0050 0.0045 0.0093 0.0044 0.0043 0.0043
-     T2: 0.0073 0.0075 0.0074 0.0201 0.0075 0.0074
-     T3: 0.0033 0.0213 0.0032 0.0034 0.0033 0.0035
-     T4: 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
-
-

The timings are somewhat close to each other, although cET can be -several times faster than lxml for larger trees. One of the -reasons is that lxml must encode incoming string data and tag names -into UTF-8, and additionally discard the created Python elements -after their use, when they are no longer referenced. ElementTree -represents the tree itself through these objects, which reduces -the overhead in creating them.

-
-

Child access

-

The same tree overhead makes operations like collecting children as in -list(element) more costly in lxml. Where cET can quickly create -a shallow copy of their list of children, lxml has to create a Python -object for each child and collect them in a list:

-
-lxe: root_list_children        (--TR T1)    0.0038 msec/pass
-cET: root_list_children        (--TR T1)    0.0010 msec/pass
-
-lxe: root_list_children        (--TR T2)    0.0455 msec/pass
-cET: root_list_children        (--TR T2)    0.0050 msec/pass
-
-

This handicap is also visible when accessing single children:

-
-lxe: first_child               (--TR T2)    0.0424 msec/pass
-cET: first_child               (--TR T2)    0.0384 msec/pass
-
-lxe: last_child                (--TR T1)    0.0477 msec/pass
-cET: last_child                (--TR T1)    0.0467 msec/pass
-
-

... unless you also add the time to find a child index in a bigger -list. ET and cET use Python lists here, which are based on arrays. -The data structure used by libxml2 is a linked tree, and thus, a -linked list of children:

-
-lxe: middle_child              (--TR T1)    0.0710 msec/pass
-cET: middle_child              (--TR T1)    0.0420 msec/pass
-
-lxe: middle_child              (--TR T2)    1.7393 msec/pass
-cET: middle_child              (--TR T2)    0.0396 msec/pass
-
-
-
-

Element creation

-

As opposed to ET, libxml2 has a notion of documents that each element must be -in. This results in a major performance difference for creating independent -Elements that end up in independently created documents:

-
-lxe: create_elements           (--TC T2)    1.0045 msec/pass
-cET: create_elements           (--TC T2)    0.0753 msec/pass
-
-

Therefore, it is always preferable to create Elements for the document they -are supposed to end up in, either as SubElements of an Element or using the -explicit Element.makeelement() call:

-
-lxe: makeelement               (--TC T2)    1.0586 msec/pass
-cET: makeelement               (--TC T2)    0.1483 msec/pass
-
-lxe: create_subelements        (--TC T2)    0.8826 msec/pass
-cET: create_subelements        (--TC T2)    0.0827 msec/pass
-
-

So, if the main performance bottleneck of an application is creating large XML -trees in memory through calls to Element and SubElement, cET is the best -choice. Note, however, that the serialisation performance may even out this -advantage, especially for smaller trees and trees with many attributes.

-
-
-

Merging different sources

-

A critical action for lxml is moving elements between document contexts. It -requires lxml to do recursive adaptations throughout the moved tree structure.

-

The following benchmark appends all root children of the second tree to the -root of the first tree:

-
-lxe: append_from_document      (--TR T1,T2)    1.0812 msec/pass
-cET: append_from_document      (--TR T1,T2)    0.1104 msec/pass
-
-lxe: append_from_document      (--TR T3,T4)    0.0155 msec/pass
-cET: append_from_document      (--TR T3,T4)    0.0060 msec/pass
-
-

Although these are fairly small numbers compared to parsing, this easily shows -the different performance classes for lxml and (c)ET. Where the latter do not -have to care about parent pointers and tree structures, lxml has to deep -traverse the appended tree. The performance difference therefore increases -with the size of the tree that is moved.

-

This difference is not always as visible, but applies to most parts of the -API, like inserting newly created elements:

-
-lxe: insert_from_document         (--TR T1,T2)    3.9763 msec/pass
-cET: insert_from_document         (--TR T1,T2)    0.1459 msec/pass
-
-

or replacing the child slice by a newly created element:

-
-lxe: replace_children_element   (--TC T1)    0.0749 msec/pass
-cET: replace_children_element   (--TC T1)    0.0081 msec/pass
-
-

as opposed to replacing the slice with an existing element from the -same document:

-
-lxe: replace_children           (--TC T1)    0.0052 msec/pass
-cET: replace_children           (--TC T1)    0.0036 msec/pass
-
-

While these numbers are too small to provide a major performance -impact in practice, you should keep this difference in mind when you -merge very large trees. Note that Elements have a makeelement() -method that allows to create an Element within the same document, -thus avoiding the merge overhead when inserting it into that tree.

-
-
-

deepcopy

-

Deep copying a tree is fast in lxml:

-
-lxe: deepcopy_all              (--TR T1)    3.1650 msec/pass
-cET: deepcopy_all              (--TR T1)   53.9973 msec/pass
-
-lxe: deepcopy_all              (-ATR T2)    3.7365 msec/pass
-cET: deepcopy_all              (-ATR T2)   61.6267 msec/pass
-
-lxe: deepcopy_all              (S-TR T3)    0.7913 msec/pass
-cET: deepcopy_all              (S-TR T3)   13.6220 msec/pass
-
-

So, for example, if you have a database-like scenario where you parse in a -large tree and then search and copy independent subtrees from it for further -processing, lxml is by far the best choice here.

-
-
-

Tree traversal

-

Another important area in XML processing is iteration for tree -traversal. If your algorithms can benefit from step-by-step -traversal of the XML tree and especially if few elements are of -interest or the target element tag name is known, the .iter() -method is a good choice:

-
-lxe: iter_all             (--TR T1)    1.0529 msec/pass
-cET: iter_all             (--TR T1)    0.2635 msec/pass
-
-lxe: iter_islice          (--TR T2)    0.0110 msec/pass
-cET: iter_islice          (--TR T2)    0.0050 msec/pass
-
-lxe: iter_tag             (--TR T2)    0.0079 msec/pass
-cET: iter_tag             (--TR T2)    0.0112 msec/pass
-
-lxe: iter_tag_all         (--TR T2)    0.1822 msec/pass
-cET: iter_tag_all         (--TR T2)    0.5343 msec/pass
-
-

This translates directly into similar timings for Element.findall():

-
-lxe: findall              (--TR T2)    1.7176 msec/pass
-cET: findall              (--TR T2)    0.9973 msec/pass
-
-lxe: findall              (--TR T3)    0.3967 msec/pass
-cET: findall              (--TR T3)    0.2525 msec/pass
-
-lxe: findall_tag          (--TR T2)    0.2258 msec/pass
-cET: findall_tag          (--TR T2)    0.5770 msec/pass
-
-lxe: findall_tag          (--TR T3)    0.1085 msec/pass
-cET: findall_tag          (--TR T3)    0.1919 msec/pass
-
-

Note that all three libraries currently use the same Python -implementation for .findall(), except for their native tree -iterator (element.iter()). In general, lxml is very fast -for iteration, but loses ground against cET when many Elements -are found and need to be instantiated. So, the more selective -your search is, the faster lxml will run.

-
-
-
-

XPath

-

The following timings are based on the benchmark script bench_xpath.py.

-

This part of lxml does not have an equivalent in ElementTree. However, lxml -provides more than one way of accessing it and you should take care which part -of the lxml API you use. The most straight forward way is to call the -xpath() method on an Element or ElementTree:

-
-lxe: xpath_method         (--TC T1)    0.3982 msec/pass
-lxe: xpath_method         (--TC T2)    7.8895 msec/pass
-lxe: xpath_method         (--TC T3)    0.0477 msec/pass
-lxe: xpath_method         (--TC T4)    0.3982 msec/pass
-
-

This is well suited for testing and when the XPath expressions are as diverse -as the trees they are called on. However, if you have a single XPath -expression that you want to apply to a larger number of different elements, -the XPath class is the most efficient way to do it:

-
-lxe: xpath_class          (--TC T1)    0.0713 msec/pass
-lxe: xpath_class          (--TC T2)    1.1325 msec/pass
-lxe: xpath_class          (--TC T3)    0.0215 msec/pass
-lxe: xpath_class          (--TC T4)    0.0722 msec/pass
-
-

Note that this still allows you to use variables in the expression, so you can -parse it once and then adapt it through variables at call time. In other -cases, where you have a fixed Element or ElementTree and want to run different -expressions on it, you should consider the XPathEvaluator:

-
-lxe: xpath_element        (--TR T1)    0.1101 msec/pass
-lxe: xpath_element        (--TR T2)    2.0473 msec/pass
-lxe: xpath_element        (--TR T3)    0.0267 msec/pass
-lxe: xpath_element        (--TR T4)    0.1087 msec/pass
-
-

While it looks slightly slower, creating an XPath object for each of the -expressions generates a much higher overhead here:

-
-lxe: xpath_class_repeat           (--TC T1   )    0.3884 msec/pass
-lxe: xpath_class_repeat           (--TC T2   )    7.6182 msec/pass
-lxe: xpath_class_repeat           (--TC T3   )    0.0465 msec/pass
-lxe: xpath_class_repeat           (--TC T4   )    0.3877 msec/pass
-
-

Note that tree iteration can be substantially faster than XPath if -your code short-circuits after the first couple of elements were -found. The XPath engine will always return the complete result set, -regardless of how much of it will actually be used.

-

Here is an example where only the first matching element is being -searched, a case for which XPath has syntax support as well:

-
-lxe: find_single                (--TR T2)    0.0184 msec/pass
-cET: find_single                (--TR T2)    0.0052 msec/pass
-
-lxe: iter_single                (--TR T2)    0.0024 msec/pass
-cET: iter_single                (--TR T2)    0.0007 msec/pass
-
-lxe: xpath_single               (--TR T2)    0.0033 msec/pass
-
-

When looking for the first two elements out of many, the numbers -explode for XPath, as restricting the result subset requires a -more complex expression:

-
-lxe: iterfind_two               (--TR T2)    0.0184 msec/pass
-cET: iterfind_two               (--TR T2)    0.0062 msec/pass
-
-lxe: iter_two                   (--TR T2)    0.0029 msec/pass
-cET: iter_two                   (--TR T2)    0.0017 msec/pass
-
-lxe: xpath_two                  (--TR T2)    0.2768 msec/pass
-
-
-
-

A longer example

-

... based on lxml 1.3.

-

A while ago, Uche Ogbuji posted a benchmark proposal that would -read in a 3MB XML version of the Old Testament of the Bible and -look for the word begat in all verses. Apparently, it is contained -in 120 out of almost 24000 verses. This is easy to implement in -ElementTree using findall(). However, the fastest and most memory -friendly way to do this is obviously iterparse(), as most of the -data is not of any interest.

-

Now, Uche's original proposal was more or less the following:

-
def bench_ET():
-    tree = ElementTree.parse("ot.xml")
-    result = []
-    for v in tree.findall("//v"):
-        text = v.text
-        if 'begat' in text:
-            result.append(text)
-    return len(result)
-
-

which takes about one second on my machine today. The faster iterparse() -variant looks like this:

-
def bench_ET_iterparse():
-    result = []
-    for event, v in ElementTree.iterparse("ot.xml"):
-        if v.tag == 'v':
-            text = v.text
-            if 'begat' in text:
-                result.append(text)
-        v.clear()
-    return len(result)
-
-

The improvement is about 10%. At the time I first tried (early 2006), lxml -didn't have iterparse() support, but the findall() variant was already -faster than ElementTree. This changes immediately when you switch to -cElementTree. The latter only needs 0.17 seconds to do the trick today and -only some impressive 0.10 seconds when running the iterparse version. And -even back then, it was quite a bit faster than what lxml could achieve.

-

Since then, lxml has matured a lot and has gotten much faster. The iterparse -variant now runs in 0.14 seconds, and if you remove the v.clear(), it is -even a little faster (which isn't the case for cElementTree).

-

One of the many great tools in lxml is XPath, a Swiss army knife for finding -things in XML documents. It is possible to move the whole thing to a pure -XPath implementation, which looks like this:

-
def bench_lxml_xpath_all():
-    tree = etree.parse("ot.xml")
-    result = tree.xpath("//v[contains(., 'begat')]/text()")
-    return len(result)
-
-

This runs in about 0.13 seconds and is about the shortest possible -implementation (in lines of Python code) that I could come up with. Now, this -is already a rather complex XPath expression compared to the simple "//v" -ElementPath expression we started with. Since this is also valid XPath, let's -try this instead:

-
def bench_lxml_xpath():
-    tree = etree.parse("ot.xml")
-    result = []
-    for v in tree.xpath("//v"):
-        text = v.text
-        if 'begat' in text:
-            result.append(text)
-    return len(result)
-
-

This gets us down to 0.12 seconds, thus showing that a generic XPath -evaluation engine cannot always compete with a simpler, tailored solution. -However, since this is not much different from the original findall variant, -we can remove the complexity of the XPath call completely and just go with -what we had in the beginning. Under lxml, this runs in the same 0.12 seconds.

-

But there is one thing left to try. We can replace the simple ElementPath -expression with a native tree iterator:

-
def bench_lxml_getiterator():
-    tree = etree.parse("ot.xml")
-    result = []
-    for v in tree.getiterator("v"):
-        text = v.text
-        if 'begat' in text:
-            result.append(text)
-    return len(result)
-
-

This implements the same thing, just without the overhead of parsing and -evaluating a path expression. And this makes it another bit faster, down to -0.11 seconds. For comparison, cElementTree runs this version in 0.17 seconds.

-

So, what have we learned?

-
    -
  • Python code is not slow. The pure XPath solution was not even as fast as -the first shot Python implementation. In general, a few more lines in -Python make things more readable, which is much more important than the last -5% of performance.
  • -
  • It's important to know the available options - and it's worth starting with -the most simple one. In this case, a programmer would then probably have -started with getiterator("v") or iterparse(). Either of them would -already have been the most efficient, depending on which library is used.
  • -
  • It's important to know your tool. lxml and cElementTree are both very fast -libraries, but they do not have the same performance characteristics. The -fastest solution in one library can be comparatively slow in the other. If -you optimise, optimise for the specific target platform.
  • -
  • It's not always worth optimising. After all that hassle we got from 0.12 -seconds for the initial implementation to 0.11 seconds. Switching over to -cElementTree and writing an iterparse() based version would have given -us 0.10 seconds - not a big difference for 3MB of XML.
  • -
  • Take care what operation is really dominating in your use case. If we split -up the operations, we can see that lxml is slightly slower than cElementTree -on parse() (both about 0.06 seconds), but more visibly slower on -iterparse(): 0.07 versus 0.10 seconds. However, tree iteration in lxml -is incredibly fast, so it can be better to parse the whole tree and then -iterate over it rather than using iterparse() to do both in one step. -Or, you can just wait for the lxml developers to optimise iterparse in one -of the next releases...
  • -
-
-
-

lxml.objectify

-

The following timings are based on the benchmark script bench_objectify.py.

-

Objectify is a data-binding API for XML based on lxml.etree, that was added in -version 1.1. It uses standard Python attribute access to traverse the XML -tree. It also features ObjectPath, a fast path language based on the same -meme.

-

Just like lxml.etree, lxml.objectify creates Python representations of -elements on the fly. To save memory, the normal Python garbage collection -mechanisms will discard them when their last reference is gone. In cases -where deeply nested elements are frequently accessed through the objectify -API, the create-discard cycles can become a bottleneck, as elements have to be -instantiated over and over again.

-
-

ObjectPath

-

ObjectPath can be used to speed up the access to elements that are deep in the -tree. It avoids step-by-step Python element instantiations along the path, -which can substantially improve the access time:

-
-lxe: attribute                  (--TR T1)    4.1828 msec/pass
-lxe: attribute                  (--TR T2)   17.3802 msec/pass
-lxe: attribute                  (--TR T4)    3.8657 msec/pass
-
-lxe: objectpath                 (--TR T1)    0.9289 msec/pass
-lxe: objectpath                 (--TR T2)   13.3109 msec/pass
-lxe: objectpath                 (--TR T4)    0.9289 msec/pass
-
-lxe: attributes_deep            (--TR T1)    6.2900 msec/pass
-lxe: attributes_deep            (--TR T2)   20.4713 msec/pass
-lxe: attributes_deep            (--TR T4)    6.1679 msec/pass
-
-lxe: objectpath_deep            (--TR T1)    1.3049 msec/pass
-lxe: objectpath_deep            (--TR T2)   14.0815 msec/pass
-lxe: objectpath_deep            (--TR T4)    1.3051 msec/pass
-
-

Note, however, that parsing ObjectPath expressions is not for free either, so -this is most effective for frequently accessing the same element.

-
-
-

Caching Elements

-

A way to improve the normal attribute access time is static instantiation of -the Python objects, thus trading memory for speed. Just create a cache -dictionary and run:

-
cache[root] = list(root.iter())
-
-

after parsing and:

-
del cache[root]
-
-

when you are done with the tree. This will keep the Python element -representations of all elements alive and thus avoid the overhead of repeated -Python object creation. You can also consider using filters or generator -expressions to be more selective. By choosing the right trees (or even -subtrees and elements) to cache, you can trade memory usage against access -speed:

-
-lxe: attribute_cached           (--TR T1)    3.1357 msec/pass
-lxe: attribute_cached           (--TR T2)   15.8911 msec/pass
-lxe: attribute_cached           (--TR T4)    2.9194 msec/pass
-
-lxe: attributes_deep_cached     (--TR T1)    3.8984 msec/pass
-lxe: attributes_deep_cached     (--TR T2)   16.8300 msec/pass
-lxe: attributes_deep_cached     (--TR T4)    3.6936 msec/pass
-
-lxe: objectpath_deep_cached     (--TR T1)    0.7496 msec/pass
-lxe: objectpath_deep_cached     (--TR T2)   12.3763 msec/pass
-lxe: objectpath_deep_cached     (--TR T4)    0.7427 msec/pass
-
-

Things to note: you cannot currently use weakref.WeakKeyDictionary objects -for this as lxml's element objects do not support weak references (which are -costly in terms of memory). Also note that new element objects that you add -to these trees will not turn up in the cache automatically and will therefore -still be garbage collected when all their Python references are gone, so this -is most effective for largely immutable trees. You should consider using a -set instead of a list in this case and add new elements by hand.

-
-
-

Further optimisations

-

Here are some more things to try if optimisation is required:

-
    -
  • A lot of time is usually spent in tree traversal to find the addressed -elements in the tree. If you often work in subtrees, do what you would also -do with deep Python objects: assign the parent of the subtree to a variable -or pass it into functions instead of starting at the root. This allows -accessing its descendants more directly.
  • -
  • Try assigning data values directly to attributes instead of passing them -through DataElement.
  • -
  • If you use custom data types that are costly to parse, try running -objectify.annotate() over read-only trees to speed up the attribute type -inference on read access.
  • -
-

Note that none of these measures is guaranteed to speed up your application. -As usual, you should prefer readable code over premature optimisations and -profile your expected use cases before bothering to apply optimisations at -random.

-
-
-
- - - \ No newline at end of file diff --git a/doc/html/resolvers.html b/doc/html/resolvers.html deleted file mode 100644 index 32755da..0000000 --- a/doc/html/resolvers.html +++ /dev/null @@ -1,257 +0,0 @@ - - - - - -Document loading and URL resolving - - - -
-

Document loading and URL resolving

- - -

The normal way to load external entities (such as DTDs) is by using -XML catalogs. Lxml also has support for user provided document -loaders in both the parsers and XSL transformations. These so-called -resolvers are subclasses of the etree.Resolver class.

-
-

XML Catalogs

-

When loading an external entity for a document, e.g. a DTD, the parser -is normally configured to prevent network access (see the -no_network parser option). Instead, it will try to load the -entity from their local file system path or, in the most common case -that the entity uses a network URL as reference, from a local XML -catalog.

-

XML catalogs are the preferred and agreed-on mechanism to load -external entities from XML processors. Most tools will use them, so -it is worth configuring them properly on a system. Many Linux -installations use them by default, but on other systems they may need -to get enabled manually. The libxml2 site has some documentation -on how to set up XML catalogs

-
-
-

URI Resolvers

-

Here is an example of a custom resolver:

-
>>> from lxml import etree
-
->>> class DTDResolver(etree.Resolver):
-...     def resolve(self, url, id, context):
-...         print("Resolving URL '%s'" % url)
-...         return self.resolve_string(
-...             '<!ENTITY myentity "[resolved text: %s]">' % url, context)
-
-

This defines a resolver that always returns a dynamically generated DTD -fragment defining an entity. The url argument passes the system URL of -the requested document, the id argument is the public ID. Note that any -of these may be None. The context object is not normally used by client code.

-

Resolving is based on the methods of the Resolver object that build -internal representations of the result document. The following -methods exist:

-
    -
  • resolve_string takes a parsable string as result document
  • -
  • resolve_filename takes a filename
  • -
  • resolve_file takes an open file-like object that has at least a read() method
  • -
  • resolve_empty resolves into an empty document
  • -
-

The resolve() method may choose to return None, in which case the next -registered resolver (or the default resolver) is consulted. Resolving always -terminates if resolve() returns the result of any of the above -resolve_*() methods.

-

Resolvers are registered local to a parser:

-
>>> parser = etree.XMLParser(load_dtd=True)
->>> parser.resolvers.add( DTDResolver() )
-
-

Note that we instantiate a parser that loads the DTD. This is not done by the -default parser, which does no validation. When we use this parser to parse a -document that requires resolving a URL, it will call our custom resolver:

-
>>> xml = '<!DOCTYPE doc SYSTEM "MissingDTD.dtd"><doc>&myentity;</doc>'
->>> tree = etree.parse(StringIO(xml), parser)
-Resolving URL 'MissingDTD.dtd'
->>> root = tree.getroot()
->>> print(root.text)
-[resolved text: MissingDTD.dtd]
-
-

The entity in the document was correctly resolved by the generated DTD -fragment.

-
-
-

Document loading in context

-

XML documents memorise their initial parser (and its resolvers) during their -life-time. This means that a lookup process related to a document will use -the resolvers of the document's parser. We can demonstrate this with a -resolver that only responds to a specific prefix:

-
>>> class PrefixResolver(etree.Resolver):
-...     def __init__(self, prefix):
-...         self.prefix = prefix
-...         self.result_xml = '''\
-...              <xsl:stylesheet
-...                     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-...                <test xmlns="testNS">%s-TEST</test>
-...              </xsl:stylesheet>
-...              ''' % prefix
-...     def resolve(self, url, pubid, context):
-...         if url.startswith(self.prefix):
-...             print("Resolved url %s as prefix %s" % (url, self.prefix))
-...             return self.resolve_string(self.result_xml, context)
-
-

We demonstrate this in XSLT and use the following stylesheet as an example:

-
>>> xml_text = """\
-... <xsl:stylesheet version="1.0"
-...    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-...   <xsl:include href="honk:test"/>
-...   <xsl:template match="/">
-...     <test>
-...       <xsl:value-of select="document('hoi:test')/*/*/text()"/>
-...     </test>
-...   </xsl:template>
-... </xsl:stylesheet>
-... """
-
-

Note that it needs to resolve two URIs: honk:test when compiling the XSLT -document (i.e. when resolving xsl:import and xsl:include elements) and -hoi:test at transformation time, when calls to the document function -are resolved. If we now register different resolvers with two different -parsers, we can parse our document twice in different resolver contexts:

-
>>> hoi_parser = etree.XMLParser()
->>> normal_doc = etree.parse(StringIO(xml_text), hoi_parser)
-
->>> hoi_parser.resolvers.add( PrefixResolver("hoi") )
->>> hoi_doc = etree.parse(StringIO(xml_text), hoi_parser)
-
->>> honk_parser = etree.XMLParser()
->>> honk_parser.resolvers.add( PrefixResolver("honk") )
->>> honk_doc = etree.parse(StringIO(xml_text), honk_parser)
-
-

These contexts are important for the further behaviour of the documents. They -memorise their original parser so that the correct set of resolvers is used in -subsequent lookups. To compile the stylesheet, XSLT must resolve the -honk:test URI in the xsl:include element. The hoi resolver cannot -do that:

-
>>> transform = etree.XSLT(normal_doc)
-Traceback (most recent call last):
-  ...
-lxml.etree.XSLTParseError: Cannot resolve URI honk:test
-
->>> transform = etree.XSLT(hoi_doc)
-Traceback (most recent call last):
-  ...
-lxml.etree.XSLTParseError: Cannot resolve URI honk:test
-
-

However, if we use the honk resolver associated with the respective -document, everything works fine:

-
>>> transform = etree.XSLT(honk_doc)
-Resolved url honk:test as prefix honk
-
-

Running the transform accesses the same parser context again, but since it now -needs to resolve the hoi URI in the call to the document function, its -honk resolver will fail to do so:

-
>>> result = transform(normal_doc)
-Traceback (most recent call last):
-  ...
-lxml.etree.XSLTApplyError: Cannot resolve URI hoi:test
-
->>> result = transform(hoi_doc)
-Traceback (most recent call last):
-  ...
-lxml.etree.XSLTApplyError: Cannot resolve URI hoi:test
-
->>> result = transform(honk_doc)
-Traceback (most recent call last):
-  ...
-lxml.etree.XSLTApplyError: Cannot resolve URI hoi:test
-
-

This can only be solved by adding a hoi resolver to the original parser:

-
>>> honk_parser.resolvers.add( PrefixResolver("hoi") )
->>> result = transform(honk_doc)
-Resolved url hoi:test as prefix hoi
->>> print(str(result)[:-1])
-<?xml version="1.0"?>
-<test>hoi-TEST</test>
-
-

We can see that the hoi resolver was called to generate a document that -was then inserted into the result document by the XSLT transformation. Note -that this is completely independent of the XML file you transform, as the URI -is resolved from within the stylesheet context:

-
>>> result = transform(normal_doc)
-Resolved url hoi:test as prefix hoi
->>> print(str(result)[:-1])
-<?xml version="1.0"?>
-<test>hoi-TEST</test>
-
-

It may be seen as a matter of taste what resolvers the generated document -inherits. For XSLT, the output document inherits the resolvers of the input -document and not those of the stylesheet. Therefore, the last result does not -inherit any resolvers at all.

-
-
-

I/O access control in XSLT

-

By default, XSLT supports all extension functions from libxslt and libexslt as -well as Python regular expressions through EXSLT. Some extensions enable -style sheets to read and write files on the local file system.

-

XSLT has a mechanism to control the access to certain I/O operations during -the transformation process. This is most interesting where XSL scripts come -from potentially insecure sources and must be prevented from modifying the -local file system. Note, however, that there is no way to keep them from -eating up your precious CPU time, so this should not stop you from thinking -about what XSLT you execute.

-

Access control is configured using the XSLTAccessControl class. It can be -called with a number of keyword arguments that allow or deny specific -operations:

-
>>> transform = etree.XSLT(honk_doc)
-Resolved url honk:test as prefix honk
->>> result = transform(normal_doc)
-Resolved url hoi:test as prefix hoi
-
->>> ac = etree.XSLTAccessControl(read_network=False)
->>> transform = etree.XSLT(honk_doc, access_control=ac)
-Resolved url honk:test as prefix honk
->>> result = transform(normal_doc)
-Traceback (most recent call last):
-  ...
-lxml.etree.XSLTApplyError: xsltLoadDocument: read rights for hoi:test denied
-
-

There are a few things to keep in mind:

-
    -
  • XSL parsing (xsl:import, etc.) is not affected by this mechanism
  • -
  • read_file=False does not imply write_file=False, all controls are -independent.
  • -
  • read_file only applies to files in the file system. Any other scheme -for URLs is controlled by the *_network keywords.
  • -
  • If you need more fine-grained control than switching access on and off, you -should consider writing a custom document loader that returns empty -documents or raises exceptions if access is denied.
  • -
-
-
- - - \ No newline at end of file diff --git a/doc/html/sax.html b/doc/html/sax.html deleted file mode 100644 index 3722b7a..0000000 --- a/doc/html/sax.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - -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 -events into an ElementTree. The SAX API used by lxml is compatible with that -in the Python core (xml.sax), so is useful for interfacing lxml with code that -uses the Python core SAX facilities.

- -
-

Building a tree from SAX events

-

First of all, lxml has support for building a new tree given SAX events. To -do this, we use the special SAX content handler defined by lxml named -lxml.sax.ElementTreeContentHandler:

-
>>> import lxml.sax
->>> handler = lxml.sax.ElementTreeContentHandler()
-
-

Now let's fire some SAX events at it:

-
>>> handler.startElementNS((None, 'a'), 'a', {})
->>> handler.startElementNS((None, 'b'), 'b', {(None, 'foo'): 'bar'})
->>> handler.characters('Hello world')
->>> handler.endElementNS((None, 'b'), 'b')
->>> handler.endElementNS((None, 'a'), 'a')
-
-

This constructs an equivalent tree. You can access it through the etree -property of the handler:

-
>>> tree = handler.etree
->>> lxml.etree.tostring(tree.getroot())
-b'<a><b foo="bar">Hello world</b></a>'
-
-

By passing a makeelement function the constructor of -ElementTreeContentHandler, e.g. the one of a parser you configured, you -can determine which element class lookup scheme should be used.

-
-
-

Producing SAX events from an ElementTree or Element

-

Let's make a tree we can generate SAX events for:

-
>>> f = StringIO('<a><b>Text</b></a>')
->>> tree = lxml.etree.parse(f)
-
-

To see whether the correct SAX events are produced, we'll write a custom -content handler.:

-
>>> from xml.sax.handler import ContentHandler
->>> class MyContentHandler(ContentHandler):
-...     def __init__(self):
-...         self.a_amount = 0
-...         self.b_amount = 0
-...         self.text = None
-...
-...     def startElementNS(self, name, qname, attributes):
-...         uri, localname = name
-...         if localname == 'a':
-...             self.a_amount += 1
-...         if localname == 'b':
-...             self.b_amount += 1
-...
-...     def characters(self, data):
-...         self.text = data
-
-

Note that it only defines the startElementNS() method and not startElement(). -The SAX event generator in lxml.sax currently only supports namespace-aware -processing.

-

To test the content handler, we can produce SAX events from the tree:

-
>>> handler = MyContentHandler()
->>> lxml.sax.saxify(tree, handler)
-
-

This is what we expect:

-
>>> handler.a_amount
-1
->>> handler.b_amount
-1
->>> handler.text
-'Text'
-
-
-
-

Interfacing with pulldom/minidom

-

lxml.sax is a simple way to interface with the standard XML support in the -Python library. Note, however, that this is a one-way solution, as Python's -DOM implementation cannot generate SAX events from a DOM tree.

-

You can use xml.dom.pulldom to build a minidom from lxml:

-
>>> from xml.dom.pulldom import SAX2DOM
->>> handler = SAX2DOM()
->>> lxml.sax.saxify(tree, handler)
-
-

PullDOM makes the result available through the document attribute:

-
>>> dom = handler.document
->>> print(dom.firstChild.localName)
-a
-
-
-
- - - \ No newline at end of file diff --git a/doc/html/sitemap.html b/doc/html/sitemap.html deleted file mode 100644 index ea815f0..0000000 --- a/doc/html/sitemap.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - Sitemap of lxml.de - Processing XML and HTML with Python - - - - -

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 deleted file mode 100644 index 2ce0cc1..0000000 --- a/doc/html/tutorial.html +++ /dev/null @@ -1,1191 +0,0 @@ - - - - - -The lxml.etree Tutorial - - - - - - -
-

The lxml.etree Tutorial

- --- - - - -
Author:Stefan Behnel
-

This is a tutorial on XML processing with lxml.etree. It briefly -overviews the main concepts of the ElementTree API, and some simple -enhancements that make your life as a programmer easier.

-

For a complete reference of the API, see the generated API -documentation.

- -

A common way to import lxml.etree is as follows:

-
>>> from lxml import etree
-
-

If your code only uses the ElementTree API and does not rely on any -functionality that is specific to lxml.etree, you can also use (any part -of) the following import chain as a fall-back to the original ElementTree:

-
try:
-  from lxml import etree
-  print("running with lxml.etree")
-except ImportError:
-  try:
-    # Python 2.5
-    import xml.etree.cElementTree as etree
-    print("running with cElementTree on Python 2.5+")
-  except ImportError:
-    try:
-      # Python 2.5
-      import xml.etree.ElementTree as etree
-      print("running with ElementTree on Python 2.5+")
-    except ImportError:
-      try:
-        # normal cElementTree install
-        import cElementTree as etree
-        print("running with cElementTree")
-      except ImportError:
-        try:
-          # normal ElementTree install
-          import elementtree.ElementTree as etree
-          print("running with ElementTree")
-        except ImportError:
-          print("Failed to import ElementTree from any known place")
-
-

To aid in writing portable code, this tutorial makes it clear in the examples -which part of the presented API is an extension of lxml.etree over the -original ElementTree API, as defined by Fredrik Lundh's ElementTree -library.

-
-

The Element class

-

An Element is the main container object for the ElementTree API. Most of -the XML tree functionality is accessed through this class. Elements are -easily created through the Element factory:

-
>>> root = etree.Element("root")
-
-

The XML tag name of elements is accessed through the tag property:

-
>>> print(root.tag)
-root
-
-

Elements are organised in an XML tree structure. To create child elements and -add them to a parent element, you can use the append() method:

-
>>> root.append( etree.Element("child1") )
-
-

However, this is so common that there is a shorter and much more efficient way -to do this: the SubElement factory. It accepts the same arguments as the -Element factory, but additionally requires the parent as first argument:

-
>>> child2 = etree.SubElement(root, "child2")
->>> child3 = etree.SubElement(root, "child3")
-
-

To see that this is really XML, you can serialise the tree you have created:

-
>>> print(etree.tostring(root, pretty_print=True))
-<root>
-  <child1/>
-  <child2/>
-  <child3/>
-</root>
-
-
-

Elements are lists

-

To make the access to these subelements easy and straight forward, -elements mimic the behaviour of normal Python lists as closely as -possible:

-
>>> child = root[0]
->>> print(child.tag)
-child1
-
->>> print(len(root))
-3
-
->>> root.index(root[1]) # lxml.etree only!
-1
-
->>> children = list(root)
-
->>> for child in root:
-...     print(child.tag)
-child1
-child2
-child3
-
->>> root.insert(0, etree.Element("child0"))
->>> start = root[:1]
->>> end   = root[-1:]
-
->>> print(start[0].tag)
-child0
->>> print(end[0].tag)
-child3
-
-

Prior to ElementTree 1.3 and lxml 2.0, you could also check the truth value of -an Element to see if it has children, i.e. if the list of children is empty:

-
if root:   # this no longer works!
-    print("The root element has children")
-
-

This is no longer supported as people tend to expect that a "something" -evaluates to True and expect Elements to be "something", may they have -children or not. So, many users find it surprising that any Element -would evaluate to False in an if-statement like the above. Instead, -use len(element), which is both more explicit and less error prone.

-
>>> print(etree.iselement(root))  # test if it's some kind of Element
-True
->>> if len(root):                 # test if it has children
-...     print("The root element has children")
-The root element has children
-
-

There is another important case where the behaviour of Elements in lxml -(in 2.0 and later) deviates from that of lists and from that of the -original ElementTree (prior to version 1.3 or Python 2.7/3.2):

-
>>> for child in root:
-...     print(child.tag)
-child0
-child1
-child2
-child3
->>> root[0] = root[-1]  # this moves the element in lxml.etree!
->>> for child in root:
-...     print(child.tag)
-child3
-child1
-child2
-
-

In this example, the last element is moved to a different position, -instead of being copied, i.e. it is automatically removed from its -previous position when it is put in a different place. In lists, -objects can appear in multiple positions at the same time, and the -above assignment would just copy the item reference into the first -position, so that both contain the exact same item:

-
>>> l = [0, 1, 2, 3]
->>> l[0] = l[-1]
->>> l
-[3, 1, 2, 3]
-
-

Note that in the original ElementTree, a single Element object can sit -in any number of places in any number of trees, which allows for the same -copy operation as with lists. The obvious drawback is that modifications -to such an Element will apply to all places where it appears in a tree, -which may or may not be intended.

-

The upside of this difference is that an Element in lxml.etree always -has exactly one parent, which can be queried through the getparent() -method. This is not supported in the original ElementTree.

-
>>> root is root[0].getparent()  # lxml.etree only!
-True
-
-

If you want to copy an element to a different position in lxml.etree, -consider creating an independent deep copy using the copy module -from Python's standard library:

-
>>> from copy import deepcopy
-
->>> element = etree.Element("neu")
->>> element.append( deepcopy(root[1]) )
-
->>> print(element[0].tag)
-child1
->>> print([ c.tag for c in root ])
-['child3', 'child1', 'child2']
-
-

The siblings (or neighbours) of an element are accessed as next and previous -elements:

-
>>> root[0] is root[1].getprevious() # lxml.etree only!
-True
->>> root[1] is root[0].getnext() # lxml.etree only!
-True
-
-
-
-

Elements carry attributes as a dict

-

XML elements support attributes. You can create them directly in the Element -factory:

-
>>> root = etree.Element("root", interesting="totally")
->>> etree.tostring(root)
-b'<root interesting="totally"/>'
-
-

Attributes are just unordered name-value pairs, so a very convenient way -of dealing with them is through the dictionary-like interface of Elements:

-
>>> print(root.get("interesting"))
-totally
-
->>> print(root.get("hello"))
-None
->>> root.set("hello", "Huhu")
->>> print(root.get("hello"))
-Huhu
-
->>> etree.tostring(root)
-b'<root interesting="totally" hello="Huhu"/>'
-
->>> sorted(root.keys())
-['hello', 'interesting']
-
->>> for name, value in sorted(root.items()):
-...     print('%s = %r' % (name, value))
-hello = 'Huhu'
-interesting = 'totally'
-
-

For the cases where you want to do item lookup or have other reasons for -getting a 'real' dictionary-like object, e.g. for passing it around, -you can use the attrib property:

-
>>> attributes = root.attrib
-
->>> print(attributes["interesting"])
-totally
->>> print(attributes.get("no-such-attribute"))
-None
-
->>> attributes["hello"] = "Guten Tag"
->>> print(attributes["hello"])
-Guten Tag
->>> print(root.get("hello"))
-Guten Tag
-
-

Note that attrib is a dict-like object backed by the Element itself. -This means that any changes to the Element are reflected in attrib -and vice versa. It also means that the XML tree stays alive in memory -as long as the attrib of one of its Elements is in use. To get an -independent snapshot of the attributes that does not depend on the XML -tree, copy it into a dict:

-
>>> d = dict(root.attrib)
->>> sorted(d.items())
-[('hello', 'Guten Tag'), ('interesting', 'totally')]
-
-
-
-

Elements contain text

-

Elements can contain text:

-
>>> root = etree.Element("root")
->>> root.text = "TEXT"
-
->>> print(root.text)
-TEXT
-
->>> etree.tostring(root)
-b'<root>TEXT</root>'
-
-

In many XML documents (data-centric documents), this is the only place where -text can be found. It is encapsulated by a leaf tag at the very bottom of the -tree hierarchy.

-

However, if XML is used for tagged text documents such as (X)HTML, text can -also appear between different elements, right in the middle of the tree:

-
<html><body>Hello<br/>World</body></html>
-
-

Here, the <br/> tag is surrounded by text. This is often referred to as -document-style or mixed-content XML. Elements support this through their -tail property. It contains the text that directly follows the element, up -to the next element in the XML tree:

-
>>> html = etree.Element("html")
->>> body = etree.SubElement(html, "body")
->>> body.text = "TEXT"
-
->>> etree.tostring(html)
-b'<html><body>TEXT</body></html>'
-
->>> br = etree.SubElement(body, "br")
->>> etree.tostring(html)
-b'<html><body>TEXT<br/></body></html>'
-
->>> br.tail = "TAIL"
->>> etree.tostring(html)
-b'<html><body>TEXT<br/>TAIL</body></html>'
-
-

The two properties .text and .tail are enough to represent any -text content in an XML document. This way, the ElementTree API does -not require any special text nodes in addition to the Element -class, that tend to get in the way fairly often (as you might know -from classic DOM APIs).

-

However, there are cases where the tail text also gets in the way. -For example, when you serialise an Element from within the tree, you -do not always want its tail text in the result (although you would -still want the tail text of its children). For this purpose, the -tostring() function accepts the keyword argument with_tail:

-
>>> etree.tostring(br)
-b'<br/>TAIL'
->>> etree.tostring(br, with_tail=False) # lxml.etree only!
-b'<br/>'
-
-

If you want to read only the text, i.e. without any intermediate -tags, you have to recursively concatenate all text and tail -attributes in the correct order. Again, the tostring() function -comes to the rescue, this time using the method keyword:

-
>>> etree.tostring(html, method="text")
-b'TEXTTAIL'
-
-
-
-

Using XPath to find text

-

Another way to extract the text content of a tree is XPath, which -also allows you to extract the separate text chunks into a list:

-
>>> print(html.xpath("string()")) # lxml.etree only!
-TEXTTAIL
->>> print(html.xpath("//text()")) # lxml.etree only!
-['TEXT', 'TAIL']
-
-

If you want to use this more often, you can wrap it in a function:

-
>>> build_text_list = etree.XPath("//text()") # lxml.etree only!
->>> print(build_text_list(html))
-['TEXT', 'TAIL']
-
-

Note that a string result returned by XPath is a special 'smart' -object that knows about its origins. You can ask it where it came -from through its getparent() method, just as you would with -Elements:

-
>>> texts = build_text_list(html)
->>> print(texts[0])
-TEXT
->>> parent = texts[0].getparent()
->>> print(parent.tag)
-body
-
->>> print(texts[1])
-TAIL
->>> print(texts[1].getparent().tag)
-br
-
-

You can also find out if it's normal text content or tail text:

-
>>> print(texts[0].is_text)
-True
->>> print(texts[1].is_text)
-False
->>> print(texts[1].is_tail)
-True
-
-

While this works for the results of the text() function, lxml will -not tell you the origin of a string value that was constructed by the -XPath functions string() or concat():

-
>>> stringify = etree.XPath("string()")
->>> print(stringify(html))
-TEXTTAIL
->>> print(stringify(html).getparent())
-None
-
-
-
-

Tree iteration

-

For problems like the above, where you want to recursively traverse the tree -and do something with its elements, tree iteration is a very convenient -solution. Elements provide a tree iterator for this purpose. It yields -elements in document order, i.e. in the order their tags would appear if you -serialised the tree to XML:

-
>>> root = etree.Element("root")
->>> etree.SubElement(root, "child").text = "Child 1"
->>> etree.SubElement(root, "child").text = "Child 2"
->>> etree.SubElement(root, "another").text = "Child 3"
-
->>> print(etree.tostring(root, pretty_print=True))
-<root>
-  <child>Child 1</child>
-  <child>Child 2</child>
-  <another>Child 3</another>
-</root>
-
->>> for element in root.iter():
-...     print("%s - %s" % (element.tag, element.text))
-root - None
-child - Child 1
-child - Child 2
-another - Child 3
-
-

If you know you are only interested in a single tag, you can pass its name to -iter() to have it filter for you. Starting with lxml 3.0, you can also -pass more than one tag to intercept on multiple tags during iteration.

-
>>> for element in root.iter("child"):
-...     print("%s - %s" % (element.tag, element.text))
-child - Child 1
-child - Child 2
-
->>> for element in root.iter("another", "child"):
-...     print("%s - %s" % (element.tag, element.text))
-child - Child 1
-child - Child 2
-another - Child 3
-
-

By default, iteration yields all nodes in the tree, including -ProcessingInstructions, Comments and Entity instances. If you want to -make sure only Element objects are returned, you can pass the -Element factory as tag parameter:

-
>>> root.append(etree.Entity("#234"))
->>> root.append(etree.Comment("some comment"))
-
->>> for element in root.iter():
-...     if isinstance(element.tag, basestring):  # or 'str' in Python 3
-...         print("%s - %s" % (element.tag, element.text))
-...     else:
-...         print("SPECIAL: %s - %s" % (element, element.text))
-root - None
-child - Child 1
-child - Child 2
-another - Child 3
-SPECIAL: &#234; - &#234;
-SPECIAL: <!--some comment--> - some comment
-
->>> for element in root.iter(tag=etree.Element):
-...     print("%s - %s" % (element.tag, element.text))
-root - None
-child - Child 1
-child - Child 2
-another - Child 3
-
->>> for element in root.iter(tag=etree.Entity):
-...     print(element.text)
-&#234;
-
-

Note that passing a wildcard "*" tag name will also yield all -Element nodes (and only elements).

-

In lxml.etree, elements provide further iterators for all directions in the -tree: children, parents (or rather ancestors) and siblings.

-
-
-

Serialisation

-

Serialisation commonly uses the tostring() function that returns a -string, or the ElementTree.write() method that writes to a file, a -file-like object, or a URL (via FTP PUT or HTTP POST). Both calls accept -the same keyword arguments like pretty_print for formatted output -or encoding to select a specific output encoding other than plain -ASCII:

-
>>> root = etree.XML('<root><a><b/></a></root>')
-
->>> etree.tostring(root)
-b'<root><a><b/></a></root>'
-
->>> print(etree.tostring(root, xml_declaration=True))
-<?xml version='1.0' encoding='ASCII'?>
-<root><a><b/></a></root>
-
->>> print(etree.tostring(root, encoding='iso-8859-1'))
-<?xml version='1.0' encoding='iso-8859-1'?>
-<root><a><b/></a></root>
-
->>> print(etree.tostring(root, pretty_print=True))
-<root>
-  <a>
-    <b/>
-  </a>
-</root>
-
-

Note that pretty printing appends a newline at the end.

-

In lxml 2.0 and later (as well as ElementTree 1.3), the serialisation -functions can do more than XML serialisation. You can serialise to -HTML or extract the text content by passing the method keyword:

-
>>> root = etree.XML(
-...    '<html><head/><body><p>Hello<br/>World</p></body></html>')
-
->>> etree.tostring(root) # default: method = 'xml'
-b'<html><head/><body><p>Hello<br/>World</p></body></html>'
-
->>> etree.tostring(root, method='xml') # same as above
-b'<html><head/><body><p>Hello<br/>World</p></body></html>'
-
->>> etree.tostring(root, method='html')
-b'<html><head></head><body><p>Hello<br>World</p></body></html>'
-
->>> print(etree.tostring(root, method='html', pretty_print=True))
-<html>
-<head></head>
-<body><p>Hello<br>World</p></body>
-</html>
-
->>> etree.tostring(root, method='text')
-b'HelloWorld'
-
-

As for XML serialisation, the default encoding for plain text -serialisation is ASCII:

-
>>> br = next(root.iter('br'))  # get first result of iteration
->>> br.tail = u'W\xf6rld'
-
->>> etree.tostring(root, method='text')  # doctest: +ELLIPSIS
-Traceback (most recent call last):
-  ...
-UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' ...
-
->>> etree.tostring(root, method='text', encoding="UTF-8")
-b'HelloW\xc3\xb6rld'
-
-

Here, serialising to a Python unicode string instead of a byte string -might become handy. Just pass the name 'unicode' as encoding:

-
>>> etree.tostring(root, encoding='unicode', method='text')
-u'HelloW\xf6rld'
-
-

The W3C has a good article about the Unicode character set and -character encodings.

-
-
-
-

The ElementTree class

-

An ElementTree is mainly a document wrapper around a tree with a -root node. It provides a couple of methods for serialisation and -general document handling.

-
>>> root = etree.XML('''\
-... <?xml version="1.0"?>
-... <!DOCTYPE root SYSTEM "test" [ <!ENTITY tasty "parsnips"> ]>
-... <root>
-...   <a>&tasty;</a>
-... </root>
-... ''')
-
->>> tree = etree.ElementTree(root)
->>> print(tree.docinfo.xml_version)
-1.0
->>> print(tree.docinfo.doctype)
-<!DOCTYPE root SYSTEM "test">
-
->>> tree.docinfo.public_id = '-//W3C//DTD XHTML 1.0 Transitional//EN'
->>> tree.docinfo.system_url = 'file://local.dtd'
->>> print(tree.docinfo.doctype)
-<!DOCTYPE root PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "file://local.dtd">
-
-

An ElementTree is also what you get back when you call the -parse() function to parse files or file-like objects (see the -parsing section below).

-

One of the important differences is that the ElementTree class -serialises as a complete document, as opposed to a single Element. -This includes top-level processing instructions and comments, as well -as a DOCTYPE and other DTD content in the document:

-
>>> print(etree.tostring(tree))  # lxml 1.3.4 and later
-<!DOCTYPE root PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "file://local.dtd" [
-<!ENTITY tasty "parsnips">
-]>
-<root>
-  <a>parsnips</a>
-</root>
-
-

In the original xml.etree.ElementTree implementation and in lxml -up to 1.3.3, the output looks the same as when serialising only -the root Element:

-
>>> print(etree.tostring(tree.getroot()))
-<root>
-  <a>parsnips</a>
-</root>
-
-

This serialisation behaviour has changed in lxml 1.3.4. Before, -the tree was serialised without DTD content, which made lxml -lose DTD information in an input-output cycle.

-
-
-

Parsing from strings and files

-

lxml.etree supports parsing XML in a number of ways and from all -important sources, namely strings, files, URLs (http/ftp) and -file-like objects. The main parse functions are fromstring() and -parse(), both called with the source as first argument. By -default, they use the standard parser, but you can always pass a -different parser as second argument.

-
-

The fromstring() function

-

The fromstring() function is the easiest way to parse a string:

-
>>> some_xml_data = "<root>data</root>"
-
->>> root = etree.fromstring(some_xml_data)
->>> print(root.tag)
-root
->>> etree.tostring(root)
-b'<root>data</root>'
-
-
-
-

The XML() function

-

The XML() function behaves like the fromstring() function, but is -commonly used to write XML literals right into the source:

-
>>> root = etree.XML("<root>data</root>")
->>> print(root.tag)
-root
->>> etree.tostring(root)
-b'<root>data</root>'
-
-

There is also a corresponding function HTML() for HTML literals.

-
>>> root = etree.HTML("<p>data</p>")
->>> etree.tostring(root)
-b'<html><body><p>data</p></body></html>'
-
-
-
-

The parse() function

-

The parse() function is used to parse from files and file-like objects.

-

As an example of such a file-like object, the following code uses the -BytesIO class for reading from a string instead of an external file. -That class comes from the io module in Python 2.6 and later. In older -Python versions, you will have to use the StringIO class from the -StringIO module. However, in real life, you would obviously avoid -doing this all together and use the string parsing functions above.

-
>>> from io import BytesIO
->>> some_file_or_file_like_object = BytesIO(b"<root>data</root>")
-
->>> tree = etree.parse(some_file_or_file_like_object)
-
->>> etree.tostring(tree)
-b'<root>data</root>'
-
-

Note that parse() returns an ElementTree object, not an Element object as -the string parser functions:

-
>>> root = tree.getroot()
->>> print(root.tag)
-root
->>> etree.tostring(root)
-b'<root>data</root>'
-
-

The reasoning behind this difference is that parse() returns a -complete document from a file, while the string parsing functions are -commonly used to parse XML fragments.

-

The parse() function supports any of the following sources:

-
    -
  • an open file object (make sure to open it in binary mode)
  • -
  • a file-like object that has a .read(byte_count) method returning -a byte string on each call
  • -
  • a filename string
  • -
  • an HTTP or FTP URL string
  • -
-

Note that passing a filename or URL is usually faster than passing an -open file or file-like object. However, the HTTP/FTP client in libxml2 -is rather simple, so things like HTTP authentication require a dedicated -URL request library, e.g. urllib2 or requests. These libraries -usually provide a file-like object for the result that you can parse -from while the response is streaming in.

-
-
-

Parser objects

-

By default, lxml.etree uses a standard parser with a default setup. If -you want to configure the parser, you can create a new instance:

-
>>> parser = etree.XMLParser(remove_blank_text=True) # lxml.etree only!
-
-

This creates a parser that removes empty text between tags while parsing, -which can reduce the size of the tree and avoid dangling tail text if you know -that whitespace-only content is not meaningful for your data. An example:

-
>>> root = etree.XML("<root>  <a/>   <b>  </b>     </root>", parser)
-
->>> etree.tostring(root)
-b'<root><a/><b>  </b></root>'
-
-

Note that the whitespace content inside the <b> tag was not removed, as -content at leaf elements tends to be data content (even if blank). You can -easily remove it in an additional step by traversing the tree:

-
>>> for element in root.iter("*"):
-...     if element.text is not None and not element.text.strip():
-...         element.text = None
-
->>> etree.tostring(root)
-b'<root><a/><b/></root>'
-
-

See help(etree.XMLParser) to find out about the available parser options.

-
-
-

Incremental parsing

-

lxml.etree provides two ways for incremental step-by-step parsing. One is -through file-like objects, where it calls the read() method repeatedly. -This is best used where the data arrives from a source like urllib or any -other file-like object that can provide data on request. Note that the parser -will block and wait until data becomes available in this case:

-
>>> class DataSource:
-...     data = [ b"<roo", b"t><", b"a/", b"><", b"/root>" ]
-...     def read(self, requested_size):
-...         try:
-...             return self.data.pop(0)
-...         except IndexError:
-...             return b''
-
->>> tree = etree.parse(DataSource())
-
->>> etree.tostring(tree)
-b'<root><a/></root>'
-
-

The second way is through a feed parser interface, given by the feed(data) -and close() methods:

-
>>> parser = etree.XMLParser()
-
->>> parser.feed("<roo")
->>> parser.feed("t><")
->>> parser.feed("a/")
->>> parser.feed("><")
->>> parser.feed("/root>")
-
->>> root = parser.close()
-
->>> etree.tostring(root)
-b'<root><a/></root>'
-
-

Here, you can interrupt the parsing process at any time and continue it later -on with another call to the feed() method. This comes in handy if you -want to avoid blocking calls to the parser, e.g. in frameworks like Twisted, -or whenever data comes in slowly or in chunks and you want to do other things -while waiting for the next chunk.

-

After calling the close() method (or when an exception was raised -by the parser), you can reuse the parser by calling its feed() -method again:

-
>>> parser.feed("<root/>")
->>> root = parser.close()
->>> etree.tostring(root)
-b'<root/>'
-
-
-
-

Event-driven parsing

-

Sometimes, all you need from a document is a small fraction somewhere deep -inside the tree, so parsing the whole tree into memory, traversing it and -dropping it can be too much overhead. lxml.etree supports this use case -with two event-driven parser interfaces, one that generates parser events -while building the tree (iterparse), and one that does not build the tree -at all, and instead calls feedback methods on a target object in a SAX-like -fashion.

-

Here is a simple iterparse() example:

-
>>> some_file_like = BytesIO(b"<root><a>data</a></root>")
-
->>> for event, element in etree.iterparse(some_file_like):
-...     print("%s, %4s, %s" % (event, element.tag, element.text))
-end,    a, data
-end, root, None
-
-

By default, iterparse() only generates events when it is done parsing an -element, but you can control this through the events keyword argument:

-
>>> some_file_like = BytesIO(b"<root><a>data</a></root>")
-
->>> for event, element in etree.iterparse(some_file_like,
-...                                       events=("start", "end")):
-...     print("%5s, %4s, %s" % (event, element.tag, element.text))
-start, root, None
-start,    a, data
-  end,    a, data
-  end, root, None
-
-

Note that the text, tail, and children of an Element are not necessarily present -yet when receiving the start event. Only the end event guarantees -that the Element has been parsed completely.

-

It also allows you to .clear() or modify the content of an Element to -save memory. So if you parse a large tree and you want to keep memory -usage small, you should clean up parts of the tree that you no longer -need:

-
>>> some_file_like = BytesIO(
-...     b"<root><a><b>data</b></a><a><b/></a></root>")
-
->>> for event, element in etree.iterparse(some_file_like):
-...     if element.tag == 'b':
-...         print(element.text)
-...     elif element.tag == 'a':
-...         print("** cleaning up the subtree")
-...         element.clear()
-data
-** cleaning up the subtree
-None
-** cleaning up the subtree
-
-

A very important use case for iterparse() is parsing large -generated XML files, e.g. database dumps. Most often, these XML -formats only have one main data item element that hangs directly below -the root node and that is repeated thousands of times. In this case, -it is best practice to let lxml.etree do the tree building and only to -intercept on exactly this one Element, using the normal tree API -for data extraction.

-
>>> xml_file = BytesIO(b'''\
-... <root>
-...   <a><b>ABC</b><c>abc</c></a>
-...   <a><b>MORE DATA</b><c>more data</c></a>
-...   <a><b>XYZ</b><c>xyz</c></a>
-... </root>''')
-
->>> for _, element in etree.iterparse(xml_file, tag='a'):
-...     print('%s -- %s' % (element.findtext('b'), element[1].text))
-...     element.clear()
-ABC -- abc
-MORE DATA -- more data
-XYZ -- xyz
-
-

If, for some reason, building the tree is not desired at all, the -target parser interface of lxml.etree can be used. It creates -SAX-like events by calling the methods of a target object. By -implementing some or all of these methods, you can control which -events are generated:

-
>>> class ParserTarget:
-...     events = []
-...     close_count = 0
-...     def start(self, tag, attrib):
-...         self.events.append(("start", tag, attrib))
-...     def close(self):
-...         events, self.events = self.events, []
-...         self.close_count += 1
-...         return events
-
->>> parser_target = ParserTarget()
-
->>> parser = etree.XMLParser(target=parser_target)
->>> events = etree.fromstring('<root test="true"/>', parser)
-
->>> print(parser_target.close_count)
-1
-
->>> for event in events:
-...     print('event: %s - tag: %s' % (event[0], event[1]))
-...     for attr, value in event[2].items():
-...         print(' * %s = %s' % (attr, value))
-event: start - tag: root
- * test = true
-
-

You can reuse the parser and its target as often as you like, so you -should take care that the .close() method really resets the -target to a usable state (also in the case of an error!).

-
>>> events = etree.fromstring('<root test="true"/>', parser)
->>> print(parser_target.close_count)
-2
->>> events = etree.fromstring('<root test="true"/>', parser)
->>> print(parser_target.close_count)
-3
->>> events = etree.fromstring('<root test="true"/>', parser)
->>> print(parser_target.close_count)
-4
-
->>> for event in events:
-...     print('event: %s - tag: %s' % (event[0], event[1]))
-...     for attr, value in event[2].items():
-...         print(' * %s = %s' % (attr, value))
-event: start - tag: root
- * test = true
-
-
-
-
-

Namespaces

-

The ElementTree API avoids -namespace prefixes -wherever possible and deploys the real namespace (the URI) instead:

-
>>> xhtml = etree.Element("{http://www.w3.org/1999/xhtml}html")
->>> body = etree.SubElement(xhtml, "{http://www.w3.org/1999/xhtml}body")
->>> body.text = "Hello World"
-
->>> print(etree.tostring(xhtml, pretty_print=True))
-<html:html xmlns:html="http://www.w3.org/1999/xhtml">
-  <html:body>Hello World</html:body>
-</html:html>
-
-

The notation that ElementTree uses was originally brought up by -James Clark. It has the major -advantage of providing a universally qualified name for a tag, regardless -of any prefixes that may or may not have been used or defined in a document. -By moving the indirection of prefixes out of the way, it makes namespace -aware code much clearer and easier to get right.

-

As you can see from the example, prefixes only become important when -you serialise the result. However, the above code looks somewhat -verbose due to the lengthy namespace names. And retyping or copying a -string over and over again is error prone. It is therefore common -practice to store a namespace URI in a global variable. To adapt the -namespace prefixes for serialisation, you can also pass a mapping to -the Element factory function, e.g. to define the default namespace:

-
>>> XHTML_NAMESPACE = "http://www.w3.org/1999/xhtml"
->>> XHTML = "{%s}" % XHTML_NAMESPACE
-
->>> NSMAP = {None : XHTML_NAMESPACE} # the default namespace (no prefix)
-
->>> xhtml = etree.Element(XHTML + "html", nsmap=NSMAP) # lxml only!
->>> body = etree.SubElement(xhtml, XHTML + "body")
->>> body.text = "Hello World"
-
->>> print(etree.tostring(xhtml, pretty_print=True))
-<html xmlns="http://www.w3.org/1999/xhtml">
-  <body>Hello World</body>
-</html>
-
-

You can also use the QName helper class to build or split qualified -tag names:

-
>>> tag = etree.QName('http://www.w3.org/1999/xhtml', 'html')
->>> print(tag.localname)
-html
->>> print(tag.namespace)
-http://www.w3.org/1999/xhtml
->>> print(tag.text)
-{http://www.w3.org/1999/xhtml}html
-
->>> tag = etree.QName('{http://www.w3.org/1999/xhtml}html')
->>> print(tag.localname)
-html
->>> print(tag.namespace)
-http://www.w3.org/1999/xhtml
-
->>> root = etree.Element('{http://www.w3.org/1999/xhtml}html')
->>> tag = etree.QName(root)
->>> print(tag.localname)
-html
-
->>> tag = etree.QName(root, 'script')
->>> print(tag.text)
-{http://www.w3.org/1999/xhtml}script
->>> tag = etree.QName('{http://www.w3.org/1999/xhtml}html', 'script')
->>> print(tag.text)
-{http://www.w3.org/1999/xhtml}script
-
-

lxml.etree allows you to look up the current namespaces defined for a -node through the .nsmap property:

-
>>> xhtml.nsmap
-{None: 'http://www.w3.org/1999/xhtml'}
-
-

Note, however, that this includes all prefixes known in the context of -an Element, not only those that it defines itself.

-
>>> root = etree.Element('root', nsmap={'a': 'http://a.b/c'})
->>> child = etree.SubElement(root, 'child',
-...                          nsmap={'b': 'http://b.c/d'})
->>> len(root.nsmap)
-1
->>> len(child.nsmap)
-2
->>> child.nsmap['a']
-'http://a.b/c'
->>> child.nsmap['b']
-'http://b.c/d'
-
-

Therefore, modifying the returned dict cannot have any meaningful -impact on the Element. Any changes to it are ignored.

-

Namespaces on attributes work alike, but as of version 2.3, lxml.etree -will ensure that the attribute uses a prefixed namespace -declaration. This is because unprefixed attribute names are not -considered being in a namespace by the XML namespace specification -(section 6.2), so they may end up losing their namespace on a -serialise-parse roundtrip, even if they appear in a namespaced -element.

-
>>> body.set(XHTML + "bgcolor", "#CCFFAA")
-
->>> print(etree.tostring(xhtml, pretty_print=True))
-<html xmlns="http://www.w3.org/1999/xhtml">
-  <body xmlns:html="http://www.w3.org/1999/xhtml" html:bgcolor="#CCFFAA">Hello World</body>
-</html>
-
->>> print(body.get("bgcolor"))
-None
->>> body.get(XHTML + "bgcolor")
-'#CCFFAA'
-
-

You can also use XPath with fully qualified names:

-
>>> find_xhtml_body = etree.ETXPath(      # lxml only !
-...     "//{%s}body" % XHTML_NAMESPACE)
->>> results = find_xhtml_body(xhtml)
-
->>> print(results[0].tag)
-{http://www.w3.org/1999/xhtml}body
-
-

For convenience, you can use "*" wildcards in all iterators of lxml.etree, -both for tag names and namespaces:

-
>>> for el in xhtml.iter('*'): print(el.tag)   # any element
-{http://www.w3.org/1999/xhtml}html
-{http://www.w3.org/1999/xhtml}body
->>> for el in xhtml.iter('{http://www.w3.org/1999/xhtml}*'): print(el.tag)
-{http://www.w3.org/1999/xhtml}html
-{http://www.w3.org/1999/xhtml}body
->>> for el in xhtml.iter('{*}body'): print(el.tag)
-{http://www.w3.org/1999/xhtml}body
-
-

To look for elements that do not have a namespace, either use the -plain tag name or provide the empty namespace explicitly:

-
>>> [ el.tag for el in xhtml.iter('{http://www.w3.org/1999/xhtml}body') ]
-['{http://www.w3.org/1999/xhtml}body']
->>> [ el.tag for el in xhtml.iter('body') ]
-[]
->>> [ el.tag for el in xhtml.iter('{}body') ]
-[]
->>> [ el.tag for el in xhtml.iter('{}*') ]
-[]
-
-
-
-

The E-factory

-

The E-factory provides a simple and compact syntax for generating XML and -HTML:

-
>>> from lxml.builder import E
-
->>> def CLASS(*args): # class is a reserved word in Python
-...     return {"class":' '.join(args)}
-
->>> html = page = (
-...   E.html(       # create an Element called "html"
-...     E.head(
-...       E.title("This is a sample document")
-...     ),
-...     E.body(
-...       E.h1("Hello!", CLASS("title")),
-...       E.p("This is a paragraph with ", E.b("bold"), " text in it!"),
-...       E.p("This is another paragraph, with a", "\n      ",
-...         E.a("link", href="http://www.python.org"), "."),
-...       E.p("Here are some reserved characters: <spam&egg>."),
-...       etree.XML("<p>And finally an embedded XHTML fragment.</p>"),
-...     )
-...   )
-... )
-
->>> print(etree.tostring(page, pretty_print=True))
-<html>
-  <head>
-    <title>This is a sample document</title>
-  </head>
-  <body>
-    <h1 class="title">Hello!</h1>
-    <p>This is a paragraph with <b>bold</b> text in it!</p>
-    <p>This is another paragraph, with a
-      <a href="http://www.python.org">link</a>.</p>
-    <p>Here are some reserved characters: &lt;spam&amp;egg&gt;.</p>
-    <p>And finally an embedded XHTML fragment.</p>
-  </body>
-</html>
-
-

Element creation based on attribute access makes it easy to build up a -simple vocabulary for an XML language:

-
>>> from lxml.builder import ElementMaker # lxml only !
-
->>> E = ElementMaker(namespace="http://my.de/fault/namespace",
-...                  nsmap={'p' : "http://my.de/fault/namespace"})
-
->>> DOC = E.doc
->>> TITLE = E.title
->>> SECTION = E.section
->>> PAR = E.par
-
->>> my_doc = DOC(
-...   TITLE("The dog and the hog"),
-...   SECTION(
-...     TITLE("The dog"),
-...     PAR("Once upon a time, ..."),
-...     PAR("And then ...")
-...   ),
-...   SECTION(
-...     TITLE("The hog"),
-...     PAR("Sooner or later ...")
-...   )
-... )
-
->>> print(etree.tostring(my_doc, pretty_print=True))
-<p:doc xmlns:p="http://my.de/fault/namespace">
-  <p:title>The dog and the hog</p:title>
-  <p:section>
-    <p:title>The dog</p:title>
-    <p:par>Once upon a time, ...</p:par>
-    <p:par>And then ...</p:par>
-  </p:section>
-  <p:section>
-    <p:title>The hog</p:title>
-    <p:par>Sooner or later ...</p:par>
-  </p:section>
-</p:doc>
-
-

One such example is the module lxml.html.builder, which provides a -vocabulary for HTML.

-

When dealing with multiple namespaces, it is good practice to define -one ElementMaker for each namespace URI. Again, note how the above -example predefines the tag builders in named constants. That makes it -easy to put all tag declarations of a namespace into one Python module -and to import/use the tag name constants from there. This avoids -pitfalls like typos or accidentally missing namespaces.

-
-
-

ElementPath

-

The ElementTree library comes with a simple XPath-like path language -called ElementPath. The main difference is that you can use the -{namespace}tag notation in ElementPath expressions. However, -advanced features like value comparison and functions are not -available.

-

In addition to a full XPath implementation, lxml.etree supports the -ElementPath language in the same way ElementTree does, even using -(almost) the same implementation. The API provides four methods here -that you can find on Elements and ElementTrees:

-
    -
  • iterfind() iterates over all Elements that match the path -expression
  • -
  • findall() returns a list of matching Elements
  • -
  • find() efficiently returns only the first match
  • -
  • findtext() returns the .text content of the first match
  • -
-

Here are some examples:

-
>>> root = etree.XML("<root><a x='123'>aText<b/><c/><b/></a></root>")
-
-

Find a child of an Element:

-
>>> print(root.find("b"))
-None
->>> print(root.find("a").tag)
-a
-
-

Find an Element anywhere in the tree:

-
>>> print(root.find(".//b").tag)
-b
->>> [ b.tag for b in root.iterfind(".//b") ]
-['b', 'b']
-
-

Find Elements with a certain attribute:

-
>>> print(root.findall(".//a[@x]")[0].tag)
-a
->>> print(root.findall(".//a[@y]"))
-[]
-
-

In lxml 3.4, there is a new helper to generate a structural ElementPath -expression for an Element:

-
>>> tree = etree.ElementTree(root)
->>> a = root[0]
->>> print(tree.getelementpath(a[0]))
-a/b[1]
->>> print(tree.getelementpath(a[1]))
-a/c
->>> print(tree.getelementpath(a[2]))
-a/b[2]
->>> tree.find(tree.getelementpath(a[2])) == a[2]
-True
-
-

As long as the tree is not modified, this path expression represents an -identifier for a given element that can be used to find() it in the same -tree later. Compared to XPath, ElementPath expressions have the advantage -of being self-contained even for documents that use namespaces.

-

The .iter() method is a special case that only finds specific tags -in the tree by their name, not based on a path. That means that the -following commands are equivalent in the success case:

-
>>> print(root.find(".//b").tag)
-b
->>> print(next(root.iterfind(".//b")).tag)
-b
->>> print(next(root.iter("b")).tag)
-b
-
-

Note that the .find() method simply returns None if no match is found, -whereas the other two examples would raise a StopIteration exception.

-
-
- - - \ No newline at end of file diff --git a/doc/html/validation.html b/doc/html/validation.html deleted file mode 100644 index 750432d..0000000 --- a/doc/html/validation.html +++ /dev/null @@ -1,563 +0,0 @@ - - - - - -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 -identical APIs in lxml, represented by validator classes with the obvious -names.

-

lxml also provides support for ISO-Schematron, based on the pure-XSLT -skeleton implementation of Schematron:

-

There is also basic support for pre-ISO-Schematron through the libxml2 -Schematron features. However, this does not currently support error reporting -in the validation phase due to insufficiencies in the implementation as of -libxml2 2.6.30.

- -

The usual setup procedure:

-
>>> from lxml import etree
-
-
-

Validation at parse time

-

The parser in lxml can do on-the-fly validation of a document against -a DTD or an XML schema. The DTD is retrieved automatically based on -the DOCTYPE of the parsed document. All you have to do is use a -parser that has DTD validation enabled:

-
>>> parser = etree.XMLParser(dtd_validation=True)
-
-

Obviously, a request for validation enables the DTD loading feature. -There are two other options that enable loading the DTD, but that do -not perform any validation. The first is the load_dtd keyword -option, which simply loads the DTD into the parser and makes it -available to the document as external subset. You can retrieve the -DTD from the parsed document using the docinfo property of the -result ElementTree object. The internal subset is available as -internalDTD, the external subset is provided as externalDTD.

-

The third way to activate DTD loading is with the -attribute_defaults option, which loads the DTD and weaves -attribute default values into the document. Again, no validation is -performed unless explicitly requested.

-

XML schema is supported in a similar way, but requires an explicit -schema to be provided:

-
>>> schema_root = etree.XML('''\
-...   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-...     <xsd:element name="a" type="xsd:integer"/>
-...   </xsd:schema>
-... ''')
->>> schema = etree.XMLSchema(schema_root)
-
->>> parser = etree.XMLParser(schema = schema)
->>> root = etree.fromstring("<a>5</a>", parser)
-
-

If the validation fails (be it for a DTD or an XML schema), the parser -will raise an exception:

-
>>> root = etree.fromstring("<a>no int</a>", parser)  # doctest: +ELLIPSIS
-Traceback (most recent call last):
-lxml.etree.XMLSyntaxError: Element 'a': 'no int' is not a valid value of the atomic type 'xs:integer'...
-
-

If you want the parser to succeed regardless of the outcome of the -validation, you should use a non validating parser and run the -validation separately after parsing the document.

-
-
-

DTD

-

As described above, the parser support for DTDs depends on internal or -external subsets of the XML file. This means that the XML file itself -must either contain a DTD or must reference a DTD to make this work. -If you want to validate an XML document against a DTD that is not -referenced by the document itself, you can use the DTD class.

-

To use the DTD class, you must first pass a filename or file-like object -into the constructor to parse a DTD:

-
>>> f = StringIO("<!ELEMENT b EMPTY>")
->>> dtd = etree.DTD(f)
-
-

Now you can use it to validate documents:

-
>>> root = etree.XML("<b/>")
->>> print(dtd.validate(root))
-True
-
->>> root = etree.XML("<b><a/></b>")
->>> print(dtd.validate(root))
-False
-
-

The reason for the validation failure can be found in the error log:

-
>>> print(dtd.error_log.filter_from_errors()[0])
-<string>:1:0:ERROR:VALID:DTD_NOT_EMPTY: Element b was declared EMPTY this one has content
-
-

As an alternative to parsing from a file, you can use the -external_id keyword argument to parse from a catalog. The -following example reads the DocBook DTD in version 4.2, if available -in the system catalog:

-
dtd = etree.DTD(external_id = "-//OASIS//DTD DocBook XML V4.2//EN")
-
-

The DTD information is available as attributes on the DTD object. The method -iterelements provides an iterator over the element declarations:

-
>>> dtd = etree.DTD(StringIO('<!ELEMENT a EMPTY><!ELEMENT b EMPTY>'))
->>> for el in dtd.iterelements():
-...     print(el.name)
-a
-b
-
-

The method elements returns the element declarations as a list:

-
>>> dtd = etree.DTD(StringIO('<!ELEMENT a EMPTY><!ELEMENT b EMPTY>'))
->>> len(dtd.elements())
-2
-
-

An element declaration object provides the following attributes/methods:

-
-
    -
  • name: The name of the element;
  • -
  • type: The element type, one of "undefined", "empty", "any", "mixed", or "element";
  • -
  • content: Element content declaration (see below);
  • -
  • iterattributes(): Return an iterator over attribute declarations (see below);
  • -
  • attributes(): Return a list of attribute declarations.
  • -
-
-

The content attribute contains information about the content model of the element. -These element content declaration objects form a binary tree (via the left and right -attributes), that makes it possible to reconstruct the content model expression. Here's a -list of all attributes:

-
-
    -
  • name: If this object represents an element in the content model expression, -name is the name of the element, otherwise it is None;
  • -
  • type: The type of the node: one of "pcdata", "element", "seq", or "or";
  • -
  • occur: How often this element (or this combination of elements) may occur: -one of "once", "opt", "mult", or "plus"
  • -
  • left: The left hand subexpression
  • -
  • right: The right hand subexpression
  • -
-
-

For example, the element declaration <!ELEMENT a (a|b)+> results -in the following element content declaration objects:

-
>>> dtd = etree.DTD(StringIO('<!ELEMENT a (a|b)+>'))
->>> content = dtd.elements()[0].content
->>> content.type, content.occur, content.name
-('or', 'plus', None)
-
->>> left, right = content.left, content.right
->>> left.type, left.occur, left.name
-('element', 'once', 'a')
->>> right.type, right.occur, right.name
-('element', 'once', 'b')
-
-

Attributes declarations have the following attributes/methods:

-
-
    -
  • name: The name of the attribute;
  • -
  • elemname: The name of the element the attribute belongs to;
  • -
  • type: The attribute type, one of "cdata", "id", "idref", "idrefs", "entity", -"entities", "nmtoken", "nmtokens", "enumeration", or "notation";
  • -
  • default: The type of the default value, one of "none", "required", "implied", -or "fixed";
  • -
  • defaultValue: The default value;
  • -
  • itervalues(): Return an iterator over the allowed attribute values (if the attribute -is of type "enumeration");
  • -
  • values(): Return a list of allowed attribute values.
  • -
-
-

Entity declarations are available via the iterentities and entities methods:

-
-
->>> dtd = etree.DTD(StringIO('<!ENTITY hurz "&#x40;">'))
->>> entity = dtd.entities()[0]
->>> entity.name, entity.orig, entity.content
-('hurz', '&#x40;', '@')
-
-
-
-
-

RelaxNG

-

The RelaxNG class takes an ElementTree object to construct a Relax NG -validator:

-
>>> f = StringIO('''\
-... <element name="a" xmlns="http://relaxng.org/ns/structure/1.0">
-...  <zeroOrMore>
-...     <element name="b">
-...       <text />
-...     </element>
-...  </zeroOrMore>
-... </element>
-... ''')
->>> relaxng_doc = etree.parse(f)
->>> relaxng = etree.RelaxNG(relaxng_doc)
-
-

Alternatively, pass a filename to the file keyword argument to parse from -a file. This also enables correct handling of include files from within the -RelaxNG parser.

-

You can then validate some ElementTree document against the schema. You'll get -back True if the document is valid against the Relax NG schema, and False if -not:

-
>>> valid = StringIO('<a><b></b></a>')
->>> doc = etree.parse(valid)
->>> relaxng.validate(doc)
-True
-
->>> invalid = StringIO('<a><c></c></a>')
->>> doc2 = etree.parse(invalid)
->>> relaxng.validate(doc2)
-False
-
-

Calling the schema object has the same effect as calling its validate -method. This is sometimes used in conditional statements:

-
>>> invalid = StringIO('<a><c></c></a>')
->>> doc2 = etree.parse(invalid)
->>> if not relaxng(doc2):
-...     print("invalid!")
-invalid!
-
-

If you prefer getting an exception when validating, you can use the -assert_ or assertValid methods:

-
>>> relaxng.assertValid(doc2)
-Traceback (most recent call last):
-  ...
-lxml.etree.DocumentInvalid: Did not expect element c there, line 1
-
->>> relaxng.assert_(doc2)
-Traceback (most recent call last):
-  ...
-AssertionError: Did not expect element c there, line 1
-
-

If you want to find out why the validation failed in the second case, you can -look up the error log of the validation process and check it for relevant -messages:

-
>>> log = relaxng.error_log
->>> print(log.last_error)
-<string>:1:0:ERROR:RELAXNGV:RELAXNG_ERR_ELEMWRONG: Did not expect element c there
-
-

You can see that the error (ERROR) happened during RelaxNG validation -(RELAXNGV). The message then tells you what went wrong. You can also -look at the error domain and its type directly:

-
>>> error = log.last_error
->>> print(error.domain_name)
-RELAXNGV
->>> print(error.type_name)
-RELAXNG_ERR_ELEMWRONG
-
-

Note that this error log is local to the RelaxNG object. It will only -contain log entries that appeared during the validation.

-

Similar to XSLT, there's also a less efficient but easier shortcut method to -do one-shot RelaxNG validation:

-
>>> doc.relaxng(relaxng_doc)
-True
->>> doc2.relaxng(relaxng_doc)
-False
-
-

libxml2 does not currently support the RelaxNG Compact Syntax. -However, if rnc2rng is installed, lxml 3.6 and later can use it -internally to parse the input schema. It recognises the .rnc file -extension and also allows parsing an RNC schema from a string using -RelaxNG.from_rnc_string().

-

Alternatively, the trang translator can convert the compact syntax -to the XML syntax, which can then be used with lxml.

-
-
-

XMLSchema

-

lxml.etree also has XML Schema (XSD) support, using the class -lxml.etree.XMLSchema. The API is very similar to the Relax NG and DTD -classes. Pass an ElementTree object to construct a XMLSchema validator:

-
>>> f = StringIO('''\
-... <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-... <xsd:element name="a" type="AType"/>
-... <xsd:complexType name="AType">
-...   <xsd:sequence>
-...     <xsd:element name="b" type="xsd:string" />
-...   </xsd:sequence>
-... </xsd:complexType>
-... </xsd:schema>
-... ''')
->>> xmlschema_doc = etree.parse(f)
->>> xmlschema = etree.XMLSchema(xmlschema_doc)
-
-

You can then validate some ElementTree document with this. Like with RelaxNG, -you'll get back true if the document is valid against the XML schema, and -false if not:

-
>>> valid = StringIO('<a><b></b></a>')
->>> doc = etree.parse(valid)
->>> xmlschema.validate(doc)
-True
-
->>> invalid = StringIO('<a><c></c></a>')
->>> doc2 = etree.parse(invalid)
->>> xmlschema.validate(doc2)
-False
-
-

Calling the schema object has the same effect as calling its validate method. -This is sometimes used in conditional statements:

-
>>> invalid = StringIO('<a><c></c></a>')
->>> doc2 = etree.parse(invalid)
->>> if not xmlschema(doc2):
-...     print("invalid!")
-invalid!
-
-

If you prefer getting an exception when validating, you can use the -assert_ or assertValid methods:

-
>>> xmlschema.assertValid(doc2)
-Traceback (most recent call last):
-  ...
-lxml.etree.DocumentInvalid: Element 'c': This element is not expected. Expected is ( b )., line 1
-
->>> xmlschema.assert_(doc2)
-Traceback (most recent call last):
-  ...
-AssertionError: Element 'c': This element is not expected. Expected is ( b )., line 1
-
-

Error reporting works as for the RelaxNG class:

-
>>> log = xmlschema.error_log
->>> error = log.last_error
->>> print(error.domain_name)
-SCHEMASV
->>> print(error.type_name)
-SCHEMAV_ELEMENT_CONTENT
-
-

If you were to print this log entry, you would get something like the -following. Note that the error message depends on the libxml2 version in -use:

-
-<string>:1:ERROR::SCHEMAV_ELEMENT_CONTENT: Element 'c': This element is not expected. Expected is ( b ).
-
-

Similar to XSLT and RelaxNG, there's also a less efficient but easier shortcut -method to do XML Schema validation:

-
>>> doc.xmlschema(xmlschema_doc)
-True
->>> doc2.xmlschema(xmlschema_doc)
-False
-
-
-
-

Schematron

-

From version 2.3 on lxml features ISO-Schematron support built on the -de-facto reference implementation of Schematron, the pure-XSLT-1.0 -skeleton implementation. This is provided by the lxml.isoschematron package -that implements the Schematron class, with an API compatible to the other -validators'. Pass an Element or ElementTree object to construct a Schematron -validator:

-
>>> from lxml import isoschematron
->>> f = StringIO('''\
-... <schema xmlns="http://purl.oclc.org/dsdl/schematron" >
-...   <pattern id="sum_equals_100_percent">
-...     <title>Sum equals 100%.</title>
-...     <rule context="Total">
-...       <assert test="sum(//Percent)=100">Sum is not 100%.</assert>
-...     </rule>
-...   </pattern>
-... </schema>
-... ''')
-
->>> sct_doc = etree.parse(f)
->>> schematron = isoschematron.Schematron(sct_doc)
-
-

You can then validate some ElementTree document with this. Just like with -XMLSchema or RelaxNG, you'll get back true if the document is valid against the -schema, and false if not:

-
>>> valid = StringIO('''\
-... <Total>
-...   <Percent>20</Percent>
-...   <Percent>30</Percent>
-...   <Percent>50</Percent>
-... </Total>
-... ''')
-
->>> doc = etree.parse(valid)
->>> schematron.validate(doc)
-True
-
->>> etree.SubElement(doc.getroot(), "Percent").text = "10"
-
->>> schematron.validate(doc)
-False
-
-

Calling the schema object has the same effect as calling its validate method. -This can be useful for conditional statements:

-
>>> is_valid = isoschematron.Schematron(sct_doc)
-
->>> if not is_valid(doc):
-...     print("invalid!")
-invalid!
-
-

Built on a pure-xslt implementation, the actual validator is created as an -XSLT 1.0 stylesheet using these steps:

-
    -
  1. (Extract embedded Schematron from XML Schema or RelaxNG schema)
  2. -
  3. Process inclusions
  4. -
  5. Process abstract patterns
  6. -
  7. Compile the schematron schema to XSLT
  8. -
-

To allow more control over the individual steps, isoschematron.Schematron -supports an extended API:

-

The include and expand keyword arguments can be used to switch off -steps 1) and 2).

-

To set parameters for steps 1), 2) and 3) dictionaries containing parameters -for XSLT can be provided using the keyword arguments include_params, -expand_params or compile_params. Schematron automatically converts these -parameters to stylesheet parameters so you need not worry to set string -parameters using quotes or to use XSLT.strparam(). If you ever need to pass an -XPath as argument to the XSLT stylesheet you can pass in an etree.XPath object -(see XPath and XSLT with lxml: Stylesheet-parameters for background on this).

-

The phase parameter of the compile step is additionally exposed as a keyword -argument. If set, it overrides occurrence in compile_params. Note that -isoschematron.Schematron might expose more common parameters as additional keyword -args in the future.

-

By setting store_schematron to True, the (included-and-expanded) schematron -document tree is stored and made available through the schematron property.

-

Similarly, setting store_xslt to True will result in the validation XSLT -document tree being kept; it can be retrieved through the validator_xslt -property.

-

Finally, with store_report set to True (default: False), the resulting -validation report document gets stored and can be accessed as the -validation_report property.

-

Using the phase parameter of isoschematron.Schematron allows for selective -validation of predefined pattern groups:

-
>>> f = StringIO('''\
-... <schema xmlns="http://purl.oclc.org/dsdl/schematron" >
-...   <phase id="phase.sum_check">
-...     <active pattern="sum_equals_100_percent"/>
-...   </phase>
-...   <phase id="phase.entries_check">
-...     <active pattern="all_positive"/>
-...   </phase>
-...   <pattern id="sum_equals_100_percent">
-...     <title>Sum equals 100%.</title>
-...     <rule context="Total">
-...       <assert test="sum(//Percent)=100">Sum is not 100%.</assert>
-...     </rule>
-...   </pattern>
-...   <pattern id="all_positive">
-...     <title>All entries must be positive.</title>
-...     <rule context="Percent">
-...       <assert test="number(.)>0">Number (<value-of select="."/>) not positive</assert>
-...     </rule>
-...   </pattern>
-... </schema>
-... ''')
-
->>> sct_doc = etree.parse(f)
->>> schematron = isoschematron.Schematron(sct_doc)
-
->>> valid = StringIO('''\
-... <Total>
-...   <Percent>20</Percent>
-...   <Percent>30</Percent>
-...   <Percent>50</Percent>
-... </Total>
-... ''')
-
->>> doc = etree.parse(valid)
->>> schematron.validate(doc)
-True
-
->>> invalid_positive = StringIO('''\
-... <Total>
-...   <Percent>0</Percent>
-...   <Percent>50</Percent>
-...   <Percent>50</Percent>
-... </Total>
-... ''')
-
->>> doc = etree.parse(invalid_positive)
-
->>> schematron.validate(doc)
-False
-
-

If the constraint of Percent entries being positive is not of interest in a -certain validation scenario, it can now be disabled:

-
>>> selective = isoschematron.Schematron(sct_doc, phase="phase.sum_check")
->>> selective.validate(doc)
-True
-
-

The usage of validation phases is a unique feature of ISO-Schematron and can be -a very powerful tool e.g. for establishing validation stages or to provide -different validators for different "validation audiences".

-
-
-

(Pre-ISO-Schematron)

-

Since version 2.0, lxml.etree features pre-ISO-Schematron support, using the -class lxml.etree.Schematron. It requires at least libxml2 2.6.21 to -work. The API is the same as for the other validators. Pass an -ElementTree object to construct a Schematron validator:

-
>>> f = StringIO('''\
-... <schema xmlns="http://www.ascc.net/xml/schematron" >
-...   <pattern name="Sum equals 100%.">
-...     <rule context="Total">
-...       <assert test="sum(//Percent)=100">Sum is not 100%.</assert>
-...     </rule>
-...   </pattern>
-... </schema>
-... ''')
-
->>> sct_doc = etree.parse(f)
->>> schematron = etree.Schematron(sct_doc)
-
-

You can then validate some ElementTree document with this. Like with RelaxNG, -you'll get back true if the document is valid against the schema, and false if -not:

-
>>> valid = StringIO('''\
-... <Total>
-...   <Percent>20</Percent>
-...   <Percent>30</Percent>
-...   <Percent>50</Percent>
-... </Total>
-... ''')
-
->>> doc = etree.parse(valid)
->>> schematron.validate(doc)
-True
-
->>> etree.SubElement(doc.getroot(), "Percent").text = "10"
-
->>> schematron.validate(doc)
-False
-
-

Calling the schema object has the same effect as calling its validate method. -This is sometimes used in conditional statements:

-
>>> is_valid = etree.Schematron(sct_doc)
-
->>> if not is_valid(doc):
-...     print("invalid!")
-invalid!
-
-

Note that libxml2 restricts error reporting to the parsing step (when creating -the Schematron instance). There is not currently any support for error -reporting during validation.

-
-
- - - \ No newline at end of file diff --git a/doc/html/xpathxslt.html b/doc/html/xpathxslt.html deleted file mode 100644 index 76352e2..0000000 --- a/doc/html/xpathxslt.html +++ /dev/null @@ -1,639 +0,0 @@ - - - - - -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.

- -

The usual setup procedure:

-
>>> from lxml import etree
-
-
-

XPath

-

lxml.etree supports the simple path syntax of the find, findall and -findtext methods on ElementTree and Element, as known from the original -ElementTree library (ElementPath). As an lxml specific extension, these -classes also provide an xpath() method that supports expressions in the -complete XPath syntax, as well as custom extension functions.

-

There are also specialized XPath evaluator classes that are more efficient for -frequent evaluation: XPath and XPathEvaluator. See the performance -comparison to learn when to use which. Their semantics when used on -Elements and ElementTrees are the same as for the xpath() method described -here.

-
-

The xpath() method

-

For ElementTree, the xpath method performs a global XPath query against the -document (if absolute) or against the root node (if relative):

-
>>> f = StringIO('<foo><bar></bar></foo>')
->>> tree = etree.parse(f)
-
->>> r = tree.xpath('/foo/bar')
->>> len(r)
-1
->>> r[0].tag
-'bar'
-
->>> r = tree.xpath('bar')
->>> r[0].tag
-'bar'
-
-

When xpath() is used on an Element, the XPath expression is evaluated -against the element (if relative) or against the root tree (if absolute):

-
>>> root = tree.getroot()
->>> r = root.xpath('bar')
->>> r[0].tag
-'bar'
-
->>> bar = root[0]
->>> r = bar.xpath('/foo/bar')
->>> r[0].tag
-'bar'
-
->>> tree = bar.getroottree()
->>> r = tree.xpath('/foo/bar')
->>> r[0].tag
-'bar'
-
-

The xpath() method has support for XPath variables:

-
>>> expr = "//*[local-name() = $name]"
-
->>> print(root.xpath(expr, name = "foo")[0].tag)
-foo
-
->>> print(root.xpath(expr, name = "bar")[0].tag)
-bar
-
->>> print(root.xpath("$text", text = "Hello World!"))
-Hello World!
-
-
-
-

Namespaces and prefixes

-

If your XPath expression uses namespace prefixes, you must define them -in a prefix mapping. To this end, pass a dictionary to the -namespaces keyword argument that maps the namespace prefixes used -in the XPath expression to namespace URIs:

-
>>> f = StringIO('''\
-... <a:foo xmlns:a="http://codespeak.net/ns/test1"
-...        xmlns:b="http://codespeak.net/ns/test2">
-...    <b:bar>Text</b:bar>
-... </a:foo>
-... ''')
->>> doc = etree.parse(f)
-
->>> r = doc.xpath('/x:foo/b:bar',
-...               namespaces={'x': 'http://codespeak.net/ns/test1',
-...                           'b': 'http://codespeak.net/ns/test2'})
->>> len(r)
-1
->>> r[0].tag
-'{http://codespeak.net/ns/test2}bar'
->>> r[0].text
-'Text'
-
-

The prefixes you choose here are not linked to the prefixes used -inside the XML document. The document may define whatever prefixes it -likes, including the empty prefix, without breaking the above code.

-

Note that XPath does not have a notion of a default namespace. The -empty prefix is therefore undefined for XPath and cannot be used in -namespace prefix mappings.

-

There is also an optional extensions argument which is used to -define custom extension functions in Python that are local to this -evaluation. The namespace prefixes that they use in the XPath -expression must also be defined in the namespace prefix mapping.

-
-
-

XPath return values

-

The return value types of XPath evaluations vary, depending on the -XPath expression used:

-
    -
  • True or False, when the XPath expression has a boolean result
  • -
  • a float, when the XPath expression has a numeric result (integer or float)
  • -
  • a 'smart' string (as described below), when the XPath expression has -a string result.
  • -
  • a list of items, when the XPath expression has a list as result. -The items may include Elements (also comments and processing -instructions), strings and tuples. Text nodes and attributes in the -result are returned as 'smart' string values. Namespace -declarations are returned as tuples of strings: (prefix, URI).
  • -
-

XPath string results are 'smart' in that they provide a -getparent() method that knows their origin:

-
    -
  • for attribute values, result.getparent() returns the Element -that carries them. An example is //foo/@attribute, where the -parent would be a foo Element.
  • -
  • for the text() function (as in //text()), it returns the -Element that contains the text or tail that was returned.
  • -
-

You can distinguish between different text origins with the boolean -properties is_text, is_tail and is_attribute.

-

Note that getparent() may not always return an Element. For -example, the XPath functions string() and concat() will -construct strings that do not have an origin. For them, -getparent() will return None.

-

There are certain cases where the smart string behaviour is -undesirable. For example, it means that the tree will be kept alive -by the string, which may have a considerable memory impact in the case -that the string value is the only thing in the tree that is actually -of interest. For these cases, you can deactivate the parental -relationship using the keyword argument smart_strings.

-
>>> root = etree.XML("<root><a>TEXT</a></root>")
-
->>> find_text = etree.XPath("//text()")
->>> text = find_text(root)[0]
->>> print(text)
-TEXT
->>> print(text.getparent().text)
-TEXT
-
->>> find_text = etree.XPath("//text()", smart_strings=False)
->>> text = find_text(root)[0]
->>> print(text)
-TEXT
->>> hasattr(text, 'getparent')
-False
-
-
-
-

Generating XPath expressions

-

ElementTree objects have a method getpath(element), which returns a -structural, absolute XPath expression to find that element:

-
>>> a  = etree.Element("a")
->>> b  = etree.SubElement(a, "b")
->>> c  = etree.SubElement(a, "c")
->>> d1 = etree.SubElement(c, "d")
->>> d2 = etree.SubElement(c, "d")
-
->>> tree = etree.ElementTree(c)
->>> print(tree.getpath(d2))
-/c/d[2]
->>> tree.xpath(tree.getpath(d2)) == [d2]
-True
-
-
-
-

The XPath class

-

The XPath class compiles an XPath expression into a callable function:

-
>>> root = etree.XML("<root><a><b/></a><b/></root>")
-
->>> find = etree.XPath("//b")
->>> print(find(root)[0].tag)
-b
-
-

The compilation takes as much time as in the xpath() method, but it is -done only once per class instantiation. This makes it especially efficient -for repeated evaluation of the same XPath expression.

-

Just like the xpath() method, the XPath class supports XPath -variables:

-
>>> count_elements = etree.XPath("count(//*[local-name() = $name])")
-
->>> print(count_elements(root, name = "a"))
-1.0
->>> print(count_elements(root, name = "b"))
-2.0
-
-

This supports very efficient evaluation of modified versions of an XPath -expression, as compilation is still only required once.

-

Prefix-to-namespace mappings can be passed as second parameter:

-
>>> root = etree.XML("<root xmlns='NS'><a><b/></a><b/></root>")
-
->>> find = etree.XPath("//n:b", namespaces={'n':'NS'})
->>> print(find(root)[0].tag)
-{NS}b
-
-
-
-

Regular expressions in XPath

-

By default, XPath supports regular expressions in the EXSLT namespace:

-
>>> regexpNS = "http://exslt.org/regular-expressions"
->>> find = etree.XPath("//*[re:test(., '^abc$', 'i')]",
-...                    namespaces={'re':regexpNS})
-
->>> root = etree.XML("<root><a>aB</a><b>aBc</b></root>")
->>> print(find(root)[0].text)
-aBc
-
-

You can disable this with the boolean keyword argument regexp which -defaults to True.

-
-
-

The XPathEvaluator classes

-

lxml.etree provides two other efficient XPath evaluators that work on -ElementTrees or Elements respectively: XPathDocumentEvaluator and -XPathElementEvaluator. They are automatically selected if you use the -XPathEvaluator helper for instantiation:

-
>>> root = etree.XML("<root><a><b/></a><b/></root>")
->>> xpatheval = etree.XPathEvaluator(root)
-
->>> print(isinstance(xpatheval, etree.XPathElementEvaluator))
-True
-
->>> print(xpatheval("//b")[0].tag)
-b
-
-

This class provides efficient support for evaluating different XPath -expressions on the same Element or ElementTree.

-
-
-

ETXPath

-

ElementTree supports a language named ElementPath in its find*() methods. -One of the main differences between XPath and ElementPath is that the XPath -language requires an indirection through prefixes for namespace support, -whereas ElementTree uses the Clark notation ({ns}name) to avoid prefixes -completely. The other major difference regards the capabilities of both path -languages. Where XPath supports various sophisticated ways of restricting the -result set through functions and boolean expressions, ElementPath only -supports pure path traversal without nesting or further conditions. So, while -the ElementPath syntax is self-contained and therefore easier to write and -handle, XPath is much more powerful and expressive.

-

lxml.etree bridges this gap through the class ETXPath, which accepts XPath -expressions with namespaces in Clark notation. It is identical to the -XPath class, except for the namespace notation. Normally, you would -write:

-
>>> root = etree.XML("<root xmlns='ns'><a><b/></a><b/></root>")
-
->>> find = etree.XPath("//p:b", namespaces={'p' : 'ns'})
->>> print(find(root)[0].tag)
-{ns}b
-
-

ETXPath allows you to change this to:

-
>>> find = etree.ETXPath("//{ns}b")
->>> print(find(root)[0].tag)
-{ns}b
-
-
-
-

Error handling

-

lxml.etree raises exceptions when errors occur while parsing or evaluating an -XPath expression:

-
>>> find = etree.XPath("\\")
-Traceback (most recent call last):
-  ...
-lxml.etree.XPathSyntaxError: Invalid expression
-
-

lxml will also try to give you a hint what went wrong, so if you pass a more -complex expression, you may get a somewhat more specific error:

-
>>> find = etree.XPath("//*[1.1.1]")
-Traceback (most recent call last):
-  ...
-lxml.etree.XPathSyntaxError: Invalid predicate
-
-

During evaluation, lxml will emit an XPathEvalError on errors:

-
>>> find = etree.XPath("//ns:a")
->>> find(root)
-Traceback (most recent call last):
-  ...
-lxml.etree.XPathEvalError: Undefined namespace prefix
-
-

This works for the XPath class, however, the other evaluators (including -the xpath() method) are one-shot operations that do parsing and evaluation -in one step. They therefore raise evaluation exceptions in all cases:

-
>>> root = etree.Element("test")
->>> find = root.xpath("//*[1.1.1]")
-Traceback (most recent call last):
-  ...
-lxml.etree.XPathEvalError: Invalid predicate
-
->>> find = root.xpath("//ns:a")
-Traceback (most recent call last):
-  ...
-lxml.etree.XPathEvalError: Undefined namespace prefix
-
->>> find = root.xpath("\\")
-Traceback (most recent call last):
-  ...
-lxml.etree.XPathEvalError: Invalid expression
-
-

Note that lxml versions before 1.3 always raised an XPathSyntaxError for -all errors, including evaluation errors. The best way to support older -versions is to except on the superclass XPathError.

-
-
-
-

XSLT

-

lxml.etree introduces a new class, lxml.etree.XSLT. The class can be -given an ElementTree or Element object to construct an XSLT -transformer:

-
>>> xslt_root = etree.XML('''\
-... <xsl:stylesheet version="1.0"
-...     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-...     <xsl:template match="/">
-...         <foo><xsl:value-of select="/a/b/text()" /></foo>
-...     </xsl:template>
-... </xsl:stylesheet>''')
->>> transform = etree.XSLT(xslt_root)
-
-

You can then run the transformation on an ElementTree document by simply -calling it, and this results in another ElementTree object:

-
>>> f = StringIO('<a><b>Text</b></a>')
->>> doc = etree.parse(f)
->>> result_tree = transform(doc)
-
-

By default, XSLT supports all extension functions from libxslt and -libexslt as well as Python regular expressions through the EXSLT -regexp functions. Also see the documentation on custom extension -functions, XSLT extension elements and document resolvers. -There is a separate section on controlling access to external -documents and resources.

-
-

XSLT result objects

-

The result of an XSL transformation can be accessed like a normal ElementTree -document:

-
>>> root = etree.XML('<a><b>Text</b></a>')
->>> result = transform(root)
-
->>> result.getroot().text
-'Text'
-
-

but, as opposed to normal ElementTree objects, can also be turned into an (XML -or text) string by applying the str() function:

-
>>> str(result)
-'<?xml version="1.0"?>\n<foo>Text</foo>\n'
-
-

The result is always a plain string, encoded as requested by the -xsl:output element in the stylesheet. If you want a Python unicode string -instead, you should set this encoding to UTF-8 (unless the ASCII default -is sufficient). This allows you to call the builtin unicode() function on -the result:

-
>>> unicode(result)
-u'<?xml version="1.0"?>\n<foo>Text</foo>\n'
-
-

You can use other encodings at the cost of multiple recoding. Encodings that -are not supported by Python will result in an error:

-
>>> xslt_tree = etree.XML('''\
-... <xsl:stylesheet version="1.0"
-...     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-...     <xsl:output encoding="UCS4"/>
-...     <xsl:template match="/">
-...         <foo><xsl:value-of select="/a/b/text()" /></foo>
-...     </xsl:template>
-... </xsl:stylesheet>''')
->>> transform = etree.XSLT(xslt_tree)
-
->>> result = transform(doc)
->>> unicode(result)
-Traceback (most recent call last):
-  ...
-LookupError: unknown encoding: UCS4
-
-

While it is possible to use the .write() method (known from ElementTree -objects) to serialise the XSLT result into a file, it is better to use the -.write_output() method. The latter knows about the <xsl:output> tag -and writes the expected data into the output file.

-
>>> xslt_root = etree.XML('''\
-... <xsl:stylesheet version="1.0"
-...     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-...     <xsl:output method="text" encoding="utf8" />
-...     <xsl:template match="/">
-...         <foo><xsl:value-of select="/a/b/text()" /></foo>
-...     </xsl:template>
-... </xsl:stylesheet>''')
->>> transform = etree.XSLT(xslt_root)
-
->>> result = transform(doc)
->>> result.write_output("output.txt.gz", compression=9)    # doctest: +SKIP
-
-
-
->>> from io import BytesIO
->>> out = BytesIO()
->>> result.write_output(out)
->>> data = out.getvalue()
->>> b'Text' in data
-True
-
-
-
-
-

Stylesheet parameters

-

It is possible to pass parameters, in the form of XPath expressions, to the -XSLT template:

-
>>> xslt_tree = etree.XML('''\
-... <xsl:stylesheet version="1.0"
-...     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-...     <xsl:param name="a" />
-...     <xsl:template match="/">
-...         <foo><xsl:value-of select="$a" /></foo>
-...     </xsl:template>
-... </xsl:stylesheet>''')
->>> transform = etree.XSLT(xslt_tree)
->>> doc_root = etree.XML('<a><b>Text</b></a>')
-
-

The parameters are passed as keyword parameters to the transform call. -First, let's try passing in a simple integer expression:

-
>>> result = transform(doc_root, a="5")
->>> str(result)
-'<?xml version="1.0"?>\n<foo>5</foo>\n'
-
-

You can use any valid XPath expression as parameter value:

-
>>> result = transform(doc_root, a="/a/b/text()")
->>> str(result)
-'<?xml version="1.0"?>\n<foo>Text</foo>\n'
-
-

It's also possible to pass an XPath object as a parameter:

-
>>> result = transform(doc_root, a=etree.XPath("/a/b/text()"))
->>> str(result)
-'<?xml version="1.0"?>\n<foo>Text</foo>\n'
-
-

Passing a string expression looks like this:

-
>>> result = transform(doc_root, a="'A'")
->>> str(result)
-'<?xml version="1.0"?>\n<foo>A</foo>\n'
-
-

To pass a string that (potentially) contains quotes, you can use the -.strparam() class method. Note that it does not escape the -string. Instead, it returns an opaque object that keeps the string -value.

-
>>> plain_string_value = etree.XSLT.strparam(
-...                          """ It's "Monty Python" """)
->>> result = transform(doc_root, a=plain_string_value)
->>> str(result)
-'<?xml version="1.0"?>\n<foo> It\'s "Monty Python" </foo>\n'
-
-

If you need to pass parameters that are not legal Python identifiers, -pass them inside of a dictionary:

-
>>> transform = etree.XSLT(etree.XML('''\
-... <xsl:stylesheet version="1.0"
-...     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-...     <xsl:param name="non-python-identifier" />
-...     <xsl:template match="/">
-...         <foo><xsl:value-of select="$non-python-identifier" /></foo>
-...     </xsl:template>
-... </xsl:stylesheet>'''))
-
->>> result = transform(doc_root, **{'non-python-identifier': '5'})
->>> str(result)
-'<?xml version="1.0"?>\n<foo>5</foo>\n'
-
-
-
-

Errors and messages

-

Like most of the processing oriented objects in lxml.etree, XSLT -provides an error log that lists messages and error output from the -last run. See the parser documentation for a description of the -error log.

-
>>> xslt_root = etree.XML('''\
-... <xsl:stylesheet version="1.0"
-...     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-...     <xsl:template match="/">
-...         <xsl:message terminate="no">STARTING</xsl:message>
-...         <foo><xsl:value-of select="/a/b/text()" /></foo>
-...         <xsl:message terminate="no">DONE</xsl:message>
-...     </xsl:template>
-... </xsl:stylesheet>''')
->>> transform = etree.XSLT(xslt_root)
-
->>> doc_root = etree.XML('<a><b>Text</b></a>')
->>> result = transform(doc_root)
->>> str(result)
-'<?xml version="1.0"?>\n<foo>Text</foo>\n'
-
->>> print(transform.error_log)
-<string>:0:0:ERROR:XSLT:ERR_OK: STARTING
-<string>:0:0:ERROR:XSLT:ERR_OK: DONE
-
->>> for entry in transform.error_log:
-...     print('message from line %s, col %s: %s' % (
-...                entry.line, entry.column, entry.message))
-...     print('domain: %s (%d)' % (entry.domain_name, entry.domain))
-...     print('type: %s (%d)' % (entry.type_name, entry.type))
-...     print('level: %s (%d)' % (entry.level_name, entry.level))
-...     print('filename: %s' % entry.filename)
-message from line 0, col 0: STARTING
-domain: XSLT (22)
-type: ERR_OK (0)
-level: ERROR (2)
-filename: <string>
-message from line 0, col 0: DONE
-domain: XSLT (22)
-type: ERR_OK (0)
-level: ERROR (2)
-filename: <string>
-
-

Note that there is no way in XSLT to distinguish between user -messages, warnings and error messages that occurred during the -run. libxslt simply does not provide this information. You can -partly work around this limitation by making your own messages -uniquely identifiable, e.g. with a common text prefix.

-
-
-

The xslt() tree method

-

There's also a convenience method on ElementTree objects for doing XSL -transformations. This is less efficient if you want to apply the same XSL -transformation to multiple documents, but is shorter to write for one-shot -operations, as you do not have to instantiate a stylesheet yourself:

-
>>> result = doc.xslt(xslt_tree, a="'A'")
->>> str(result)
-'<?xml version="1.0"?>\n<foo>A</foo>\n'
-
-

This is a shortcut for the following code:

-
>>> transform = etree.XSLT(xslt_tree)
->>> result = transform(doc, a="'A'")
->>> str(result)
-'<?xml version="1.0"?>\n<foo>A</foo>\n'
-
-
-
-

Dealing with stylesheet complexity

-

Some applications require a larger set of rather diverse stylesheets. -lxml.etree allows you to deal with this in a number of ways. Here are -some ideas to try.

-

The most simple way to reduce the diversity is by using XSLT -parameters that you pass at call time to configure the stylesheets. -The partial() function in the functools module of Python 2.5 -may come in handy here. It allows you to bind a set of keyword -arguments (i.e. stylesheet parameters) to a reference of a callable -stylesheet. The same works for instances of the XPath() -evaluator, obviously.

-

You may also consider creating stylesheets programmatically. Just -create an XSL tree, e.g. from a parsed template, and then add or -replace parts as you see fit. Passing an XSL tree into the XSLT() -constructor multiple times will create independent stylesheets, so -later modifications of the tree will not be reflected in the already -created stylesheets. This makes stylesheet generation very straight -forward.

-

A third thing to remember is the support for custom extension -functions and XSLT extension elements. Some things are much -easier to express in XSLT than in Python, while for others it is the -complete opposite. Finding the right mixture of Python code and XSL -code can help a great deal in keeping applications well designed and -maintainable.

-
-
-

Profiling

-

If you want to know how your stylesheet performed, pass the profile_run -keyword to the transform:

-
>>> result = transform(doc, a="/a/b/text()", profile_run=True)
->>> profile = result.xslt_profile
-
-

The value of the xslt_profile property is an ElementTree with profiling -data about each template, similar to the following:

-
<profile>
-  <template rank="1" match="/" name="" mode="" calls="1" time="1" average="1"/>
-</profile>
-
-

Note that this is a read-only document. You must not move any of its elements -to other documents. Please deep-copy the document if you need to modify it. -If you want to free it from memory, just do:

-
>>> del result.xslt_profile
-
-
-
-
- - - \ No newline at end of file diff --git a/doc/intro.txt b/doc/intro.txt index 1be3f54..584c2f2 100644 --- a/doc/intro.txt +++ b/doc/intro.txt @@ -25,7 +25,7 @@ fast, thrilling, powerful, and your code might fail in some horrible way that you really shouldn't have to worry about when writing Python code. lxml combines the power of libxml2 with the ease of use of Python. -.. _`a quote by Mark Pilgrim`: http://diveintomark.org/archives/2004/02/18/libxml2 +.. _`a quote by Mark Pilgrim`: https://web.archive.org/web/20110902041836/http://diveintomark.org/archives/2004/02/18/libxml2 Aims diff --git a/doc/lxml-source-howto.txt b/doc/lxml-source-howto.txt index ee921fb..327eae8 100644 --- a/doc/lxml-source-howto.txt +++ b/doc/lxml-source-howto.txt @@ -154,7 +154,7 @@ lxml.etree ========== The main module, ``lxml.etree``, is in the file `lxml.etree.pyx -`_. It +`_. It implements the main functions and types of the ElementTree API, as well as all the factory functions for proxies. It is the best place to start if you want to find out how a specific feature is @@ -303,7 +303,7 @@ lxml.objectify A Cython implemented extension module that uses the public C-API of lxml.etree. It provides a Python object-like interface to XML trees. The implementation resides in the file `lxml.objectify.pyx -`_. +`_. lxml.html diff --git a/doc/main.txt b/doc/main.txt index 0ca560d..783cfa3 100644 --- a/doc/main.txt +++ b/doc/main.txt @@ -35,7 +35,7 @@ libxml2_ and libxslt_. It is unique in that it combines the speed and XML feature completeness of these libraries with the simplicity of a native Python API, mostly compatible but superior to the well-known ElementTree_ API. The latest release works with all CPython versions -from 2.6 to 3.6. See the introduction_ for more information about +from 2.7 to 3.7. See the introduction_ for more information about background and goals of the lxml project. Some common questions are answered in the FAQ_. @@ -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.2.5`_, released 2018-09-09 -(`changes for 4.2.5`_). `Older versions <#old-versions>`_ +The latest version is `lxml 4.3.0`_, released 2019-01-04 +(`changes for 4.3.0`_). `Older versions <#old-versions>`_ are listed below. Please take a look at the @@ -246,11 +246,16 @@ See the websites of lxml `3.8 `_, `4.0 `_ `4.1 `_ +`4.2 `_ .. and the `latest in-development version `_. -.. _`PDF documentation`: lxmldoc-4.2.5.pdf +.. _`PDF documentation`: lxmldoc-4.3.0.pdf + +* `lxml 4.3.0`_, released 2019-01-04 (`changes for 4.3.0`_) + +* `lxml 4.2.6`_, released 2019-01-03 (`changes for 4.2.6`_) * `lxml 4.2.5`_, released 2018-09-09 (`changes for 4.2.5`_) @@ -274,6 +279,8 @@ See the websites of lxml * `older releases `_ +.. _`lxml 4.3.0`: /files/lxml-4.3.0.tgz +.. _`lxml 4.2.6`: /files/lxml-4.2.6.tgz .. _`lxml 4.2.5`: /files/lxml-4.2.5.tgz .. _`lxml 4.2.4`: /files/lxml-4.2.4.tgz .. _`lxml 4.2.3`: /files/lxml-4.2.3.tgz @@ -285,6 +292,8 @@ 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.0`: /changes-4.3.0.html +.. _`changes for 4.2.6`: /changes-4.2.6.html .. _`changes for 4.2.5`: /changes-4.2.5.html .. _`changes for 4.2.4`: /changes-4.2.4.html .. _`changes for 4.2.3`: /changes-4.2.3.html diff --git a/doc/mklatex.py b/doc/mklatex.py index 98e91df..cf726ba 100644 --- a/doc/mklatex.py +++ b/doc/mklatex.py @@ -12,7 +12,7 @@ RST2LATEX_OPTIONS = " ".join([ "--strip-comments", "--language en", # "--date", - "--use-latex-footnotes", +# "--use-latex-footnotes", "--use-latex-citations", "--use-latex-toc", "--font-encoding=T1", diff --git a/doc/pdf/pubkey.asc b/doc/pdf/pubkey.asc deleted file mode 100644 index f72804c..0000000 --- a/doc/pdf/pubkey.asc +++ /dev/null @@ -1,36 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.2 (GNU/Linux) - -mQGiBEQf3JQRBACciSqxoX0q3VurkRENVVtG/pVqtFh/d2CohbVJlLCrO4s7nnPj -CTfZFt6tmykZjsLJl24XpEJt0O/C0jLcaBqvXVgVvRXHz4DjEYYuQF4LPthhI4MA -4T7ExptX4lU5g3BVJ46vPU8uRBbbxarBRas9rYewgnrYKWpZZCa7yMq+9wCgnyyR -Si4E3viLwi77jda135nA6vcD/iqu8zIl9/dFuUcOvxJrhrm+UdY72puZ1TVczSAH -GOqMjrKkfyHlaJh/ZzWENpTZIfOdVhy7Chvva18vH4Wz7jKj5UeIpRrBvjAD28r3 -Y3W5bfsnpPkvDOyU1vqBsw4q+/250GXEX0JqV2Rbf5yLVgEZPdGrswO460dr4UVS -8RS0BACYTmyrz57AugHc5tRkqNw6o7ux2deOT0c3AbUcOWtOocGumCsUf+M1nOrc -VWkeBWTv4HIIiecWYY/KwIemTthQGjxywaZDxOlBT0BOL/+vfYTq/plZULXr+g90 -rSe82+kLl9N5onkBDJKeDIcJDzRoxIRPV1i0Om/5JBI4jmUnv7QnU3RlZmFuIEJl -aG5lbCA8c2NvZGVyQHVzZXJzLmJlcmxpb3MuZGU+iF8EExECACAFAkQiqKYCGwMG -CwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRANPVNpCNOgHi+2AJ0a0JH8iP3RqrOL -JefvHz1dSl3MxACYo7Ma6CeIgsGnyaSSdNOmNVXn+IhGBBARAgAGBQJEIqk0AAoJ -ELO5mMzzmgZbmCcAoKZ2En1IlsxBpaPPxgWYrUOWfc6hAKCBWODMMOYptCBkSrjg -m3gsrjHgYbQsU3RlZmFuIEJlaG5lbCA8c2NvZGVyQHVzZXJzLnNvdXJjZWZvcmdl -Lm5ldD6IYAQTEQIAIAUCRB/clAIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJ -EA09U2kI06Aen2YAn0hvuDs+Gslq9vPRFFbsFNJI40PmAJ0chjiiEy0xV5C+n6YX -XFuldRDILYhGBBARAgAGBQJEIp4AAAoJELO5mMzzmgZbgKQAn3pWrmFdj8YaEyuR -tEjKVZJDQ6ZVAJ0Y1igwADT40BPra+G/xiLa3YbCrrkCDQREH9ynEAgAiR4/0r0d -doViNECfSLClllu5K0Bo1SEiMtvVNC3sJYgVzBddD8Xn8UAdjyAgmaL5FC2FsNQu -RxxKkNlHNYCq8ZSWtZaL2MQ+SyMUyHv6VXVCGuSW0COpzbx58u+SZpjyESJ1kaZc -73SaIw6kv/dVQHjurwmlo1lg3dLZ3PG08WGCYUMqkkv2K+J7+puzE2Cjo31gTq4s -LYDCV26wjVQ6BqT2EcHQhVEjh0xq5ugc908cr/2FQAKkTifEbF+OVBGWiFMGgri+ -6+G54/BV/RakpvNCFYBiZHn/M9mQaWt7XoTmnEQ1ldq5KNlRhkqnQRF/NK5VpGcQ -29As28aqpZTECwADBgf/WlRvBRI1Q1eIv2falEv7C6sOxqc3kr5z1uUBTRG5v9t6 -ff9k/J4oC6cnQx00GK3ZR8ija6bl8zwu+0m0M3rW49Krb1rsiT7r4ahOZ7p9RRro -oG3NbUJYgMG10D1nxpaioYqa/m+PpILJM0wfYZZEuX0xkZcOB24yb+J7EIcGR09T -mMd5sXtdTU+w/p7Xi2cP61uQ8qixyHBH8E06qgW2JtVFV9rGn7CNUOvkNaUBRnY5 -QxhdkvKJRx7voOLYWZFUBIWgto+6vmTgKmc2Ho6qddzME9UgwUNcknRgm0cf6Cxr -6zPtxZl8a6KemjQcK7kARSmMNCDkqp/Pohe519A5vYhJBBgRAgAJBQJEH9ynAhsM -AAoJEA09U2kI06Aesv4AnjiVQVLzqnNS/64vvMMP1UARY3HtAJ90YxNGhRNIhWYL -UU16oJlGD/9M1Q== -=gWy2 ------END PGP PUBLIC KEY BLOCK----- diff --git a/doc/rest2latex.py b/doc/rest2latex.py index 9141617..92d3e3b 100644 --- a/doc/rest2latex.py +++ b/doc/rest2latex.py @@ -41,7 +41,7 @@ def pygments_directive(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): try: lexer = get_lexer_by_name(arguments[0]) - except ValueError, e: + except ValueError as e: # no lexer found - use the text one instead of an exception lexer = TextLexer() # take an arbitrary option if more than one is given diff --git a/doc/s5/lxml-ep2008.html b/doc/s5/lxml-ep2008.html deleted file mode 100644 index 58276a5..0000000 --- a/doc/s5/lxml-ep2008.html +++ /dev/null @@ -1,1335 +0,0 @@ - - - - - - - -Implementing XML languages with lxml - - - - - - - - - - - - -
-
-
- - -
-
-
-

Implementing XML languages with lxml

-

Dr. Stefan Behnel

- -

http://codespeak.net/lxml/

-

lxml-dev@codespeak.net

-tagpython.png - - - - - - - - - - -
-
-

What is an »XML language«?

-
    -
  • a language in XML notation
  • -
  • aka »XML dialect«
      -
    • except that it's not a dialect
    • -
    -
  • -
  • Examples:
      -
    • XML Schema
    • -
    • Atom/RSS
    • -
    • (X)HTML
    • -
    • Open Document Format
    • -
    • SOAP
    • -
    • ... add your own one here
    • -
    -
  • -
-
- - -
-

Popular mistakes to avoid (2)

-

"This is tree data, I'll take the DOM!"

-
    -
  • DOM is ubiquitous, but it's as complicated as Java
  • -
  • uglify your application with tons of DOM code to
      -
    • walk over non-element nodes to find the data you need
    • -
    • convert text content to other data types
    • -
    • modify the XML tree in memory
    • -
    -
  • -
-

=> write verbose, redundant, hard-to-maintain code

-
- -
-

Popular mistakes to avoid (3)

-

"SAX is so fast and consumes no memory!"

-
    -
  • but writing SAX code is not fast!
  • -
  • write error-prone, state-keeping SAX code to
      -
    • figure out where you are
    • -
    • find the sections you need
    • -
    • convert text content to other data types
    • -
    • copy the XML data into custom data classes
    • -
    • ... and don't forget the way back into XML!
    • -
    -
  • -
-

=> write confusing state-machine code

-

=> debugging into existence

-
-
-

Working with XML

-
-

Getting XML work done

-

(instead of getting time wasted)

-
-
-
-

How can you work with XML?

-
    -
  • Preparation:
      -
    • Implement usable data classes as an abstraction layer
    • -
    • Implement a mapping from XML to the data classes
    • -
    • Implement a mapping from the data classes to XML
    • -
    -
  • -
  • Workflow:
      -
    • parse XML data
    • -
    • map XML data to data classes
    • -
    • work with data classes
    • -
    • map data classes to XML
    • -
    • serialise XML
    • -
    -
  • -
-
    -
  • Approach:
      -
    • get rid of XML and do everything in your own code
    • -
    -
  • -
-
-
-

What if you could simplify this?

-
    -
  • Preparation:
      -
    • Extend usable XML API classes into an abstraction layer
    • -
    -
  • -
  • Workflow:
      -
    • parse XML data into XML API classes
    • -
    • work with XML API classes
    • -
    • serialise XML
    • -
    -
  • -
-
    -
  • Approach:
      -
    • cover only the quirks of XML and make it work for you
    • -
    -
  • -
-
-
-

What if you could simplify this ...

-
    -
  • ... without sacrificing usability or flexibility?
  • -
  • ... using a high-speed, full-featured, pythonic XML toolkit?
  • -
  • ... with the power of XPath, XSLT and XML validation?
  • -
-

... then »lxml« is your friend!

-
-
-

Overview

-
    -
  • What is lxml?
      -
    • what & who
    • -
    -
  • -
  • How do you use it?
      -
    • Lesson 0: quick API overview
        -
      • ElementTree concepts and lxml features
      • -
      -
    • -
    • Lesson 1: parse XML
        -
      • how to get XML data into memory
      • -
      -
    • -
    • Lesson 2: generate XML
        -
      • how to write an XML generator for a language
      • -
      -
    • -
    • Lesson 3: working with XML trees made easy
        -
      • how to write an XML API for a language
      • -
      -
    • -
    -
  • -
-
-
-

What is lxml?

-
    -
  • a fast, full-featured toolkit for XML and HTML handling -
  • -
  • based on and inspired by
      -
    • the C libraries libxml2 and libxslt (by Daniel Veillard)
    • -
    • the ElementTree API (by Fredrik Lundh)
    • -
    • the Cython compiler (by Robert Bradshaw, Greg Ewing & me)
    • -
    • the Python language (by Guido & [paste Misc/ACKS here])
    • -
    • user feedback, ideas and patches (by you!)
        -
      • keep doing that, we love you all!
      • -
      -
    • -
    -
  • -
  • maintained (and major parts) written by myself
      -
    • initial design and implementation by Martijn Faassen
    • -
    • extensive HTML API and tools by Ian Bicking
    • -
    -
  • -
-
-
-

What do you get for your money?

-
    -
  • many tools in one:
      -
    • Generic, ElementTree compatible XML API: lxml.etree
        -
      • but faster for many tasks and much more feature-rich
      • -
      -
    • -
    • Special tool set for HTML handling: lxml.html
    • -
    • Special API for pythonic data binding: lxml.objectify
    • -
    • General purpose path languages: XPath and CSS selectors
    • -
    • Validation: DTD, XML Schema, RelaxNG, Schematron
    • -
    • XSLT, XInclude, C14N, ...
    • -
    • Fast tree iteration, event-driven parsing, ...
    • -
    -
  • -
  • it's free, but it's worth every €-Cent!
      -
    • what users say:
        -
      • »no qualification, I would recommend lxml for just about any -HTML task«
      • -
      • »THE tool [...] for newbies and experienced developers«
      • -
      • »you can do pretty much anything with an intuitive API«
      • -
      • »lxml takes all the pain out of XML«
      • -
      -
    • -
    -
  • -
-
-
-

Lesson 0: a quick overview

-
-

why »lxml takes all the pain out of XML«

-

(a quick overview of lxml features and ElementTree concepts)

-
- -
-
-

Namespaces in ElementTree

-
    -
  • uses Clark notation:

    -
      -
    • wrap namespace URI in {...}
    • -
    • append the tag name
    • -
    -
    >>> tag = "{http://www.w3.org/the/namespace}tagname"
    ->>> element = etree.Element(tag)
    -
    -
  • -
  • no prefixes!

    -
  • -
  • a single, self-containing tag identifier

    -
  • -
-
-
-

Text content in ElementTree

-
    -
  • uses .text and .tail attributes:

    -
    >>> div = html.fragment_fromstring(
    -...     "<div><p>a paragraph<br>split in two</p> parts</div>")
    ->>> p = div[0]
    ->>> br = p[0]
    -
    ->>> p.text
    -'a paragraph'
    ->>> br.text
    ->>> br.tail
    -'split in two'
    ->>> p.tail
    -' parts'
    -
    -
  • -
  • no text nodes!

    -
      -
    • simplifies tree traversal a lot
    • -
    • simplifies many XML algorithms
    • -
    -
  • -
-
-
-

Attributes in ElementTree

-
    -
  • uses .get() and .set() methods:

    -
    >>> root = etree.fromstring(
    -...     '<root a="the value" b="of an" c="attribute"/>')
    -
    ->>> root.get('a')
    -'the value'
    -
    ->>> root.set('a', "THE value")
    ->>> root.get('a')
    -'THE value'
    -
    -
  • -
  • or the .attrib dictionary property:

    -
    >>> d = root.attrib
    -
    ->>> list(sorted(d.keys()))
    -['a', 'b', 'c']
    ->>> list(sorted(d.values()))
    -['THE value', 'attribute', 'of an']
    -
    -
  • -
-
-
-

Tree iteration in lxml.etree (1)

- -
>>> root = etree.fromstring(
-...   "<root> <a><b/><b/></a> <c><d/><e><f/></e><g/></c> </root>")
-
->>> print([child.tag for child in root])   # children
-['a', 'c']
-
->>> print([el.tag for el in root.iter()])  # self and descendants
-['root', 'a', 'b', 'b', 'c', 'd', 'e', 'f', 'g']
-
->>> print([el.tag for el in root.iterdescendants()])
-['a', 'b', 'b', 'c', 'd', 'e', 'f', 'g']
-
-
->>> def iter_breadth_first(root):
-...     bfs_queue = collections.deque([root])
-...     while bfs_queue:
-...         el = bfs_queue.popleft()  # pop next element
-...         bfs_queue.extend(el)      # append its children
-...         yield el
-
->>> print([el.tag for el in iter_breadth_first(root)])
-['root', 'a', 'c', 'b', 'b', 'd', 'e', 'g', 'f']
-
-
-
-

Tree iteration in lxml.etree (2)

-
>>> root = etree.fromstring(
-...   "<root> <a><b/><b/></a> <c><d/><e><f/></e><g/></c> </root>")
-
->>> tree_walker = etree.iterwalk(root, events=('start', 'end'))
-
->>> for (event, element) in tree_walker:
-...     print("%s (%s)" % (element.tag, event))
-root (start)
-a (start)
-b (start)
-b (end)
-b (start)
-b (end)
-a (end)
-c (start)
-d (start)
-d (end)
-e (start)
-f (start)
-f (end)
-e (end)
-g (start)
-g (end)
-c (end)
-root (end)
-
-
-
-

Path languages in lxml

-
<root>
-  <speech class='dialog'><p>So be it!</p></speech>
-  <p>stuff</p>
-</root>
-
-
    -
  • search it with XPath

    -
    >>> find_paragraphs = etree.XPath("//p")
    ->>> paragraphs = find_paragraphs(xml_tree)
    -
    ->>> print([ p.text for p in paragraphs ])
    -['So be it!', 'stuff']
    -
    -
  • -
  • search it with CSS selectors

    -
    >>> find_dialogs = cssselect.CSSSelector("speech.dialog p")
    ->>> paragraphs = find_dialogs(xml_tree)
    -
    ->>> print([ p.text for p in paragraphs ])
    -['So be it!']
    -
    -
  • -
-
-
-

Summary of lesson 0

-
    -
  • lxml comes with various tools
      -
    • that aim to hide the quirks of XML
    • -
    • that simplify finding and handling data
    • -
    • that make XML a pythonic tool by itself
    • -
    -
  • -
-
-
-

Lesson 1: parsing XML/HTML

-
-

The input side

-

(a quick overview)

-
-
-
-

Parsing XML and HTML from ...

-
    -
  • strings: fromstring(xml_data)
      -
    • byte strings, but also unicode strings
    • -
    -
  • -
  • filenames: parse(filename)
  • -
  • HTTP/FTP URLs: parse(url)
  • -
  • file objects: parse(f)
      -
    • f = open(filename, 'rb') !
    • -
    -
  • -
  • file-like objects: parse(f)
      -
    • only need a f.read(size) method
    • -
    -
  • -
  • data chunks: parser.feed(xml_chunk)
      -
    • result = parser.close()
    • -
    -
  • -
-

(parsing from strings and filenames/URLs frees the GIL)

-
-
-

Example: parsing from a string

-
    -
  • using the fromstring() function:

    -
    >>> root_element = etree.fromstring(some_xml_data)
    -
    -
  • -
  • using the fromstring() function with a specific parser:

    -
    >>> parser = etree.HTMLParser(remove_comments=True)
    ->>> root_element = etree.fromstring(some_html_data, parser)
    -
    -
  • -
  • or the XML() and HTML() aliases for literals in code:

    -
    >>> root_element = etree.XML("<root><child/></root>")
    ->>> root_element = etree.HTML("<p>some<br>paragraph</p>")
    -
    -
  • -
-
-
-

Parsing XML into ...

-
    -
  • a tree in memory
      -
    • parse() and fromstring() functions
    • -
    -
  • -
  • a tree in memory, but step-by-step with a generator
      -
    • iterparse() generates (start/end, element) events
    • -
    • tree can be cleaned up to save space
    • -
    -
  • -
  • SAX-like callbacks without building a tree
      -
    • parse() and fromstring() functions
    • -
    • pass a target object into the parser
    • -
    -
  • -
-
-
-

Summary of lesson 1

-
    -
  • parsing XML/HTML in lxml is mostly straight forward
      -
    • simple functions that do the job
    • -
    -
  • -
  • advanced use cases are pretty simple
      -
    • event-driven parsing using iterparse()
    • -
    • special parser configuration with keyword arguments
        -
      • configuration is generally local to a parser
      • -
      -
    • -
    -
  • -
  • BTW: parsing is very fast, as is serialising
      -
    • don't hesitate to do parse-serialise-parse cycles
    • -
    -
  • -
-
-
-

Lesson 2: generating XML

-
-

The output side

-

(and how to make it safe and simple)

-
-
-
-

The example language: Atom

-

The Atom XML format

-
    -
  • Namespace: http://www.w3.org/2005/Atom
  • -
  • W3C recommendation derived from RSS and friends
  • -
  • Atom feeds describe news entries and annotated links
      -
    • a feed contains one or more entry elements
    • -
    • an entry contains author, link, summary and/or content
    • -
    -
  • -
-
-
-

Example: generate XML (1)

-

The ElementMaker (or E-factory)

-
>>> from lxml.builder import ElementMaker
->>> A = ElementMaker(namespace="http://www.w3.org/2005/Atom",
-...                  nsmap={None : "http://www.w3.org/2005/Atom"})
-
-
>>> atom = A.feed(
-...   A.author( A.name("Stefan Behnel") ),
-...   A.entry(
-...     A.title("News from lxml"),
-...     A.link(href="http://codespeak.net/lxml/"),
-...     A.summary("See what's <b>fun</b> about lxml...",
-...               type="html"),
-...   )
-... )
-
-
>>> from lxml.etree import tostring
->>> print( tostring(atom, pretty_print=True) )
-
-
-
-

Example: generate XML (2)

-
>>> atom = A.feed(
-...   A.author( A.name("Stefan Behnel") ),
-...   A.entry(
-...     A.title("News from lxml"),
-...     A.link(href="http://codespeak.net/lxml/"),
-...     A.summary("See what's <b>fun</b> about lxml...",
-...               type="html"),
-...   )
-... )
-
-
<feed xmlns="http://www.w3.org/2005/Atom">
-  <author>
-    <name>Stefan Behnel</name>
-  </author>
-  <entry>
-    <title>News from lxml</title>
-    <link href="http://codespeak.net/lxml/"/>
-    <summary type="html">See what's &lt;b&gt;fun&lt;/b&gt;
-                         about lxml...</summary>
-  </entry>
-</feed>
-
-
-
-

Be careful what you type!

-
>>> atom = A.feed(
-...   A.author( A.name("Stefan Behnel") ),
-...   A.entry(
-...     A.titel("News from lxml"),
-...     A.link(href="http://codespeak.net/lxml/"),
-...     A.summary("See what's <b>fun</b> about lxml...",
-...               type="html"),
-...   )
-... )
-
-
<feed xmlns="http://www.w3.org/2005/Atom">
-  <author>
-    <name>Stefan Behnel</name>
-  </author>
-  <entry>
-    <titel>News from lxml</titel>
-    <link href="http://codespeak.net/lxml/"/>
-    <summary type="html">See what's &lt;b&gt;fun&lt;/b&gt;
-                         about lxml...</summary>
-  </entry>
-</feed>
-
-
-
-

Want more 'type safety'?

-

Write an XML generator module instead:

-
# atomgen.py
-
-from lxml import etree
-from lxml.builder import ElementMaker
-
-ATOM_NAMESPACE = "http://www.w3.org/2005/Atom"
-
-A = ElementMaker(namespace=ATOM_NAMESPACE,
-                 nsmap={None : ATOM_NAMESPACE})
-
-feed = A.feed
-entry = A.entry
-title = A.title
-# ... and so on and so forth ...
-
-
-# plus a little validation function: isvalid()
-isvalid = etree.RelaxNG(file="atom.rng")
-
-
-
-

The Atom generator module

- -
>>> import atomgen as A
-
->>> atom = A.feed(
-...   A.author( A.name("Stefan Behnel") ),
-...   A.entry(
-...     A.link(href="http://codespeak.net/lxml/"),
-...     A.title("News from lxml"),
-...     A.summary("See what's <b>fun</b> about lxml...",
-...               type="html"),
-...   )
-... )
-
->>> A.isvalid(atom) # ok, forgot the ID's => invalid XML ...
-False
-
->>> title = A.titel("News from lxml")
-Traceback (most recent call last):
-  ...
-AttributeError: 'module' object has no attribute 'titel'
-
-
-
-

Mixing languages (1)

-

Atom can embed serialised HTML

-
>>> import lxml.html.builder as h
-
->>> html_fragment = h.DIV(
-...   "this is some\n",
-...   h.A("HTML", href="http://w3.org/MarkUp/"),
-...   "\ncontent")
-
-
>>> serialised_html = etree.tostring(html_fragment, method="html")
-
->>> summary = A.summary(serialised_html, type="html")
-
-
>>> print(etree.tostring(summary))
-<summary xmlns="http://www.w3.org/2005/Atom" type="html">
-   &lt;div&gt;this is some
-   &lt;a href="http://w3.org/MarkUp/"&gt;HTML&lt;/a&gt;
-   content&lt;/div&gt;
-</summary>
-
-
-
-

Mixing languages (2)

-

Atom can also embed non-escaped XHTML

-
>>> from copy import deepcopy
->>> xhtml_fragment = deepcopy(html_fragment)
-
->>> from lxml.html import html_to_xhtml
->>> html_to_xhtml(xhtml_fragment)
-
->>> summary = A.summary(xhtml_fragment, type="xhtml")
-
-
>>> print(etree.tostring(summary, pretty_print=True))
-<summary xmlns="http://www.w3.org/2005/Atom" type="xhtml">
-  <html:div xmlns:html="http://www.w3.org/1999/xhtml">this is some
-  <html:a href="http://w3.org/MarkUp/">HTML</html:a>
-  content</html:div>
-</summary>
-
-
-
-

Summary of lesson 2

-
    -
  • generating XML is easy
      -
    • use the ElementMaker
    • -
    -
  • -
  • wrap it in a module that provides
      -
    • the target namespace
    • -
    • an ElementMaker name for each language element
    • -
    • a validator
    • -
    • maybe additional helper functions
    • -
    -
  • -
  • mixing languages is easy
      -
    • define a generator module for each
    • -
    -
  • -
-

... this is all you need for the output side of XML languages

-
-
-

Lesson 3: Designing XML APIs

-
-

The Element API

-

(and how to make it the way you want)

-
-
-
-

Trees in C and in Python

-
    -
  • Trees have two representations:
      -
    • a plain, complete, low-level C tree provided by libxml2
    • -
    • a set of Python Element proxies, each representing one element
    • -
    -
  • -
  • Proxies are created on-the-fly:
      -
    • lxml creates an Element object for a C node on request
    • -
    • proxies are garbage collected when going out of scope
    • -
    • XML trees are garbage collected when deleting the last proxy
    • -
    -
  • -
-ep2008/proxies.png -
-
-

Mapping Python classes to nodes

-
    -
  • Proxies can be assigned to XML nodes by user code
      -
    • lxml tells you about a node, you return a class
    • -
    -
  • -
-
-
-

Example: a simple Element class (1)

-
    -
  • define a subclass of ElementBase

    -
    >>> class HonkElement(etree.ElementBase):
    -...    @property
    -...    def honking(self):
    -...       return self.get('honking') == 'true'
    -
    -
  • -
  • let it replace the default Element class

    -
    >>> lookup = etree.ElementDefaultClassLookup(
    -...                             element=HonkElement)
    -
    ->>> parser = etree.XMLParser()
    ->>> parser.set_element_class_lookup(lookup)
    -
    -
  • -
-
-
-

Example: a simple Element class (2)

-
    -
  • use the new Element class

    -
    >>> root = etree.XML('<root><honk honking="true"/></root>',
    -...                  parser)
    -
    ->>> root.honking
    -False
    ->>> root[0].honking
    -True
    -
    -
  • -
-
-
-

Mapping Python classes to nodes

-
    -
  • The Element class lookup
      -
    • lxml tells you about a node, you return a class
    • -
    • no restrictions on lookup algorithm
    • -
    • each parser can use a different class lookup scheme
    • -
    • lookup schemes can be chained through fallbacks
    • -
    -
  • -
  • Classes can be selected based on
      -
    • the node type (element, comment or processing instruction)
        -
      • ElementDefaultClassLookup()
      • -
      -
    • -
    • the namespaced node name
        -
      • CustomElementClassLookup() + a fallback
      • -
      • ElementNamespaceClassLookup() + a fallback
      • -
      -
    • -
    • the value of an attribute (e.g. id or class)
        -
      • AttributeBasedElementClassLookup() + a fallback
      • -
      -
    • -
    • read-only inspection of the tree
        -
      • PythonElementClassLookup() + a fallback
      • -
      -
    • -
    -
  • -
-
-
-

Designing an Atom API

-
    -
  • a feed is a container for entries

    -
    # atom.py
    -
    -ATOM_NAMESPACE = "http://www.w3.org/2005/Atom"
    -_ATOM_NS = "{%s}" % ATOM_NAMESPACE
    -
    -class FeedElement(etree.ElementBase):
    -    @property
    -    def entries(self):
    -       return self.findall(_ATOM_NS + "entry")
    -
    -
  • -
  • it also has a couple of meta-data children, e.g. title

    -
    class FeedElement(etree.ElementBase):
    -    # ...
    -    @property
    -    def title(self):
    -        "return the title or None"
    -        return self.find("title")
    -
    -
  • -
-
-
-

Consider lxml.objectify

-
    -
  • ready-to-use, generic Python object API for XML
  • -
-
>>> from lxml import objectify
-
->>> feed = objectify.parse("atom-example.xml")
->>> print(feed.title)
-Example Feed
-
->>> print([entry.title for entry in feed.entry])
-['Atom-Powered Robots Run Amok']
-
->>> print(feed.entry[0].title)
-Atom-Powered Robots Run Amok
-
-
-
-

Still room for more convenience

-
from itertools import chain
-
-class FeedElement(objectify.ObjectifiedElement):
-
-    def addIDs(self):
-        "initialise the IDs of feed and entries"
-
-        for element in chain([self], self.entry):
-            if element.find(_ATOM_NS + "id") is None:
-                id = etree.SubElement(self, _ATOM_NS + "id")
-                id.text = make_guid()
-
-
-
-

Incremental API design

-
    -
  • choose an XML API to start with
      -
    • lxml.etree is general purpose
    • -
    • lxml.objectify is nice for document-style XML
    • -
    -
  • -
  • fix Elements that really need some API sugar
      -
    • dict-mappings to children with specific content/attributes
    • -
    • properties for specially typed attributes or child values
    • -
    • simplified access to varying content types of an element
    • -
    • shortcuts for unnecessarily deep subtrees
    • -
    -
  • -
  • ignore what works well enough with the Element API
      -
    • lists of homogeneous children -> Element iteration
    • -
    • string attributes -> .get()/.set()
    • -
    -
  • -
  • let the API grow at your fingertips
      -
    • play with it and test use cases
    • -
    • avoid "I want because I can" feature explosion!
    • -
    -
  • -
-
-
-

Setting up the Element mapping

-

Atom has a namespace => leave the mapping to lxml

-
# ...
-_atom_lookup = etree.ElementNamespaceClassLookup(
-                  objectify.ObjectifyElementClassLookup())
-
-# map the classes to tag names
-ns = _atom_lookup.get_namespace(ATOM_NAMESPACE)
-ns["feed"]  = FeedElement
-ns["entry"] = EntryElement
-# ... and so on
-# or use ns.update(vars()) with appropriate class names
-
-# create a parser that does some whitespace cleanup
-atom_parser = etree.XMLParser(remove_blank_text=True)
-
-# make it use our Atom classes
-atom_parser.set_element_class_lookup(_atom_lookup)
-
-# and help users in using our parser setup
-def parse(input):
-    return etree.parse(input, atom_parser)
-
-
-
-

Using your new Atom API

-
>>> import atom
->>> feed = atom.parse("ep2008/atom-example.xml").getroot()
-
->>> print(len(feed.entry))
-1
->>> print([entry.title for entry in feed.entry])
-['Atom-Powered Robots Run Amok']
-
->>> link_tag = "{%s}link" % atom.ATOM_NAMESPACE
->>> print([link.get("href") for link in feed.iter(link_tag)])
-['http://example.org/', 'http://example.org/2003/12/13/atom03']
-
-
-
-

Summary of lesson 3

-

To implement an XML API ...

-
    -
  1. start off with lxml's Element API
      -
    • or take a look at the object API of lxml.objectify
    • -
    -
  2. -
  3. specialise it into a set of custom Element classes
  4. -
  5. map them to XML tags using one of the lookup schemes
  6. -
  7. improve the API incrementally while using it
      -
    • discover inconveniences and beautify them
    • -
    • avoid putting work into things that work
    • -
    -
  8. -
-
-
-

Conclusion

-

lxml ...

-
    -
  • provides a convenient set of tools for XML and HTML
      -
    • parsing
    • -
    • generating
    • -
    • working with in-memory trees
    • -
    -
  • -
  • follows Python idioms wherever possible
      -
    • highly extensible through wrapping and subclassing
    • -
    • callable objects for XPath, CSS selectors, XSLT, schemas
    • -
    • iteration for tree traversal (even while parsing)
    • -
    • list-/dict-like APIs, properties, keyword arguments, ...
    • -
    -
  • -
  • makes extension and specialisation easy
      -
    • write a special XML generator module in trivial code
    • -
    • write your own XML API incrementally on-the-fly
    • -
    -
  • -
-
-
- - diff --git a/doc/xpathxslt.txt b/doc/xpathxslt.txt index 82369c6..6e159dd 100644 --- a/doc/xpathxslt.txt +++ b/doc/xpathxslt.txt @@ -729,7 +729,7 @@ some ideas to try. The most simple way to reduce the diversity is by using XSLT parameters that you pass at call time to configure the stylesheets. -The ``partial()`` function in the ``functools`` module of Python 2.5 +The ``partial()`` function in the ``functools`` module may come in handy here. It allows you to bind a set of keyword arguments (i.e. stylesheet parameters) to a reference of a callable stylesheet. The same works for instances of the ``XPath()`` diff --git a/requirements.txt b/requirements.txt index 16fa1b5..45327d2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -Cython>=0.26.1 +Cython>=0.29.1 diff --git a/setup.py b/setup.py index ce87b91..4f6f8fe 100644 --- a/setup.py +++ b/setup.py @@ -7,8 +7,8 @@ import os.path # for command line options and supported environment variables, please # see the end of 'setupinfo.py' -if sys.version_info < (2, 6) or sys.version_info[:2] in [(3, 0), (3, 1)]: - print("This lxml version requires Python 2.6, 2.7, 3.2 or later.") +if sys.version_info < (2, 7) or sys.version_info[:2] in [(3, 0), (3, 1), (3, 2), (3, 3)]: + print("This lxml version requires Python 2.7, 3.4 or later.") sys.exit(1) try: @@ -223,10 +223,8 @@ an appropriate version of Cython installed. 'License :: OSI Approved :: BSD License', 'Programming Language :: Cython', 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', diff --git a/setupinfo.py b/setupinfo.py index bdac1d0..5a833d4 100644 --- a/setupinfo.py +++ b/setupinfo.py @@ -14,7 +14,13 @@ except ImportError: CYTHON_INSTALLED = False EXT_MODULES = ["lxml.etree", "lxml.objectify"] -COMPILED_MODULES = ["lxml.builder", "lxml._elementpath", "lxml.html.diff", "lxml.html.clean"] +COMPILED_MODULES = [ + "lxml.builder", + "lxml._elementpath", + "lxml.html.diff", + "lxml.html.clean", + "lxml.sax", +] HEADER_FILES = ['etree.h', 'etree_api.h'] if hasattr(sys, 'pypy_version_info') or ( diff --git a/src/lxml.egg-info/PKG-INFO b/src/lxml.egg-info/PKG-INFO index f9bff79..346c362 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.2.5 +Version: 4.3.0 Summary: Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API. Home-page: http://lxml.de/ Author: lxml dev team @@ -31,21 +31,38 @@ Description: lxml is a Pythonic, mature binding for the libxml2 and libxslt libr After an official release of a new stable series, bug fixes may become available at - https://github.com/lxml/lxml/tree/lxml-4.2 . - Running ``easy_install lxml==4.2bugfix`` will install + https://github.com/lxml/lxml/tree/lxml-4.3 . + Running ``easy_install lxml==4.3bugfix`` will install the unreleased branch state from - https://github.com/lxml/lxml/tarball/lxml-4.2#egg=lxml-4.2bugfix + https://github.com/lxml/lxml/tarball/lxml-4.3#egg=lxml-4.3bugfix 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.2.5 (2018-09-09) + 4.3.0 (2019-01-04) ================== - Bugs fixed - ---------- + Features added + -------------- - * Javascript URLs that used URL escaping were not removed by the HTML cleaner. - Security problem found by Omar Eissa. + * The module ``lxml.sax`` is compiled using Cython in order to speed it up. + + * GH#267: ``lxml.sax.ElementTreeProducer`` now preserves the namespace prefixes. + If two prefixes point to the same URI, the first prefix in alphabetical order + is used. Patch by Lennart Regebro. + + * Updated ISO-Schematron implementation to 2013 version (now MIT licensed) + 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. + Patch by hugovk. + + * The minimum dependency versions were raised to libxml2 2.9.2 and libxslt 1.1.27, + which were released in 2014 and 2012 respectively. + + * Built with Cython 0.29.2. @@ -56,10 +73,8 @@ Classifier: Intended Audience :: Information Technology Classifier: License :: OSI Approved :: BSD License Classifier: Programming Language :: Cython Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.6 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.3 Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 diff --git a/src/lxml.egg-info/SOURCES.txt b/src/lxml.egg-info/SOURCES.txt index 5627a11..d725527 100644 --- a/src/lxml.egg-info/SOURCES.txt +++ b/src/lxml.egg-info/SOURCES.txt @@ -52,505 +52,14 @@ doc/tutorial.txt doc/valgrind.txt doc/validation.txt doc/xpathxslt.txt -doc/html/FAQ.html -doc/html/api.html -doc/html/build.html -doc/html/capi.html -doc/html/changes-4.2.5.html -doc/html/compatibility.html -doc/html/credits.html -doc/html/cssselect.html -doc/html/element_classes.html -doc/html/elementsoup.html -doc/html/extensions.html -doc/html/html5parser.html -doc/html/index.html -doc/html/installation.html -doc/html/intro.html -doc/html/lxml-source-howto.html -doc/html/lxmlhtml.html -doc/html/objectify.html -doc/html/parsing.html -doc/html/performance.html doc/html/pubkey.asc -doc/html/resolvers.html -doc/html/sax.html -doc/html/sitemap.html doc/html/style.css doc/html/tagpython-big.png -doc/html/tutorial.html -doc/html/validation.html -doc/html/xpathxslt.html -doc/html/api/abc.ABCMeta-class.html -doc/html/api/api-objects.txt -doc/html/api/class-tree.html -doc/html/api/cssselect.parser.SelectorError-class.html -doc/html/api/cssselect.parser.SelectorSyntaxError-class.html -doc/html/api/cssselect.xpath.ExpressionError-class.html -doc/html/api/cssselect.xpath.XPathExpr-class.html -doc/html/api/deprecated-index.html -doc/html/api/epydoc.css -doc/html/api/exceptions.AssertionError-class.html -doc/html/api/frames.html -doc/html/api/help.html -doc/html/api/identifier-index-A.html -doc/html/api/identifier-index-B.html -doc/html/api/identifier-index-C.html -doc/html/api/identifier-index-D.html -doc/html/api/identifier-index-E.html -doc/html/api/identifier-index-F.html -doc/html/api/identifier-index-G.html -doc/html/api/identifier-index-H.html -doc/html/api/identifier-index-I.html -doc/html/api/identifier-index-J.html -doc/html/api/identifier-index-K.html -doc/html/api/identifier-index-L.html -doc/html/api/identifier-index-M.html -doc/html/api/identifier-index-N.html -doc/html/api/identifier-index-O.html -doc/html/api/identifier-index-P.html -doc/html/api/identifier-index-Q.html -doc/html/api/identifier-index-R.html -doc/html/api/identifier-index-S.html -doc/html/api/identifier-index-T.html -doc/html/api/identifier-index-U.html -doc/html/api/identifier-index-V.html -doc/html/api/identifier-index-W.html -doc/html/api/identifier-index-X.html -doc/html/api/identifier-index-Y.html -doc/html/api/identifier-index-Z.html -doc/html/api/identifier-index-_.html -doc/html/api/identifier-index.html -doc/html/api/index.html -doc/html/api/lxml-module.html -doc/html/api/lxml-pysrc.html -doc/html/api/lxml.ElementInclude-module.html -doc/html/api/lxml.ElementInclude-pysrc.html -doc/html/api/lxml.ElementInclude.FatalIncludeError-class.html -doc/html/api/lxml.builder-module.html -doc/html/api/lxml.builder-pysrc.html -doc/html/api/lxml.builder.ElementMaker-class.html -doc/html/api/lxml.cssselect-module.html -doc/html/api/lxml.cssselect-pysrc.html -doc/html/api/lxml.cssselect.CSSSelector-class.html -doc/html/api/lxml.cssselect.LxmlHTMLTranslator-class.html -doc/html/api/lxml.cssselect.LxmlTranslator-class.html -doc/html/api/lxml.doctestcompare-module.html -doc/html/api/lxml.doctestcompare-pysrc.html -doc/html/api/lxml.doctestcompare.LHTMLOutputChecker-class.html -doc/html/api/lxml.doctestcompare.LXMLOutputChecker-class.html -doc/html/api/lxml.doctestcompare._RestoreChecker-class.html -doc/html/api/lxml.etree-module.html -doc/html/api/lxml.etree.AncestorsIterator-class.html -doc/html/api/lxml.etree.AttributeBasedElementClassLookup-class.html -doc/html/api/lxml.etree.C14NError-class.html -doc/html/api/lxml.etree.CDATA-class.html -doc/html/api/lxml.etree.CommentBase-class.html -doc/html/api/lxml.etree.CustomElementClassLookup-class.html -doc/html/api/lxml.etree.DTD-class.html -doc/html/api/lxml.etree.DTDError-class.html -doc/html/api/lxml.etree.DTDParseError-class.html -doc/html/api/lxml.etree.DTDValidateError-class.html -doc/html/api/lxml.etree.DocInfo-class.html -doc/html/api/lxml.etree.DocumentInvalid-class.html -doc/html/api/lxml.etree.ETCompatXMLParser-class.html -doc/html/api/lxml.etree.ETXPath-class.html -doc/html/api/lxml.etree.ElementBase-class.html -doc/html/api/lxml.etree.ElementChildIterator-class.html -doc/html/api/lxml.etree.ElementClassLookup-class.html -doc/html/api/lxml.etree.ElementDefaultClassLookup-class.html -doc/html/api/lxml.etree.ElementDepthFirstIterator-class.html -doc/html/api/lxml.etree.ElementNamespaceClassLookup-class.html -doc/html/api/lxml.etree.ElementTextIterator-class.html -doc/html/api/lxml.etree.EntityBase-class.html -doc/html/api/lxml.etree.Error-class.html -doc/html/api/lxml.etree.ErrorDomains-class.html -doc/html/api/lxml.etree.ErrorLevels-class.html -doc/html/api/lxml.etree.ErrorTypes-class.html -doc/html/api/lxml.etree.FallbackElementClassLookup-class.html -doc/html/api/lxml.etree.HTMLParser-class.html -doc/html/api/lxml.etree.HTMLPullParser-class.html -doc/html/api/lxml.etree.LxmlError-class.html -doc/html/api/lxml.etree.LxmlRegistryError-class.html -doc/html/api/lxml.etree.LxmlSyntaxError-class.html -doc/html/api/lxml.etree.NamespaceRegistryError-class.html -doc/html/api/lxml.etree.PIBase-class.html -doc/html/api/lxml.etree.ParseError-class.html -doc/html/api/lxml.etree.ParserBasedElementClassLookup-class.html -doc/html/api/lxml.etree.ParserError-class.html -doc/html/api/lxml.etree.PyErrorLog-class.html -doc/html/api/lxml.etree.PythonElementClassLookup-class.html -doc/html/api/lxml.etree.QName-class.html -doc/html/api/lxml.etree.RelaxNG-class.html -doc/html/api/lxml.etree.RelaxNGError-class.html -doc/html/api/lxml.etree.RelaxNGErrorTypes-class.html -doc/html/api/lxml.etree.RelaxNGParseError-class.html -doc/html/api/lxml.etree.RelaxNGValidateError-class.html -doc/html/api/lxml.etree.Resolver-class.html -doc/html/api/lxml.etree.Schematron-class.html -doc/html/api/lxml.etree.SchematronError-class.html -doc/html/api/lxml.etree.SchematronParseError-class.html -doc/html/api/lxml.etree.SchematronValidateError-class.html -doc/html/api/lxml.etree.SerialisationError-class.html -doc/html/api/lxml.etree.SiblingsIterator-class.html -doc/html/api/lxml.etree.TreeBuilder-class.html -doc/html/api/lxml.etree.XInclude-class.html -doc/html/api/lxml.etree.XIncludeError-class.html -doc/html/api/lxml.etree.XMLParser-class.html -doc/html/api/lxml.etree.XMLPullParser-class.html -doc/html/api/lxml.etree.XMLSchema-class.html -doc/html/api/lxml.etree.XMLSchemaError-class.html -doc/html/api/lxml.etree.XMLSchemaParseError-class.html -doc/html/api/lxml.etree.XMLSchemaValidateError-class.html -doc/html/api/lxml.etree.XMLSyntaxError-class.html -doc/html/api/lxml.etree.XPath-class.html -doc/html/api/lxml.etree.XPathDocumentEvaluator-class.html -doc/html/api/lxml.etree.XPathElementEvaluator-class.html -doc/html/api/lxml.etree.XPathError-class.html -doc/html/api/lxml.etree.XPathEvalError-class.html -doc/html/api/lxml.etree.XPathFunctionError-class.html -doc/html/api/lxml.etree.XPathResultError-class.html -doc/html/api/lxml.etree.XPathSyntaxError-class.html -doc/html/api/lxml.etree.XSLT-class.html -doc/html/api/lxml.etree.XSLTAccessControl-class.html -doc/html/api/lxml.etree.XSLTApplyError-class.html -doc/html/api/lxml.etree.XSLTError-class.html -doc/html/api/lxml.etree.XSLTExtension-class.html -doc/html/api/lxml.etree.XSLTExtensionError-class.html -doc/html/api/lxml.etree.XSLTParseError-class.html -doc/html/api/lxml.etree.XSLTSaveError-class.html -doc/html/api/lxml.etree._Attrib-class.html -doc/html/api/lxml.etree._BaseErrorLog-class.html -doc/html/api/lxml.etree._Comment-class.html -doc/html/api/lxml.etree._Document-class.html -doc/html/api/lxml.etree._DomainErrorLog-class.html -doc/html/api/lxml.etree._Element-class.html -doc/html/api/lxml.etree._ElementIterator-class.html -doc/html/api/lxml.etree._ElementMatchIterator-class.html -doc/html/api/lxml.etree._ElementStringResult-class.html -doc/html/api/lxml.etree._ElementTagMatcher-class.html -doc/html/api/lxml.etree._ElementTree-class.html -doc/html/api/lxml.etree._ElementUnicodeResult-class.html -doc/html/api/lxml.etree._Entity-class.html -doc/html/api/lxml.etree._ErrorLog-class.html -doc/html/api/lxml.etree._FeedParser-class.html -doc/html/api/lxml.etree._IDDict-class.html -doc/html/api/lxml.etree._ListErrorLog-class.html -doc/html/api/lxml.etree._LogEntry-class.html -doc/html/api/lxml.etree._ProcessingInstruction-class.html -doc/html/api/lxml.etree._RotatingErrorLog-class.html -doc/html/api/lxml.etree._SaxParserTarget-class.html -doc/html/api/lxml.etree._TargetParserResult-class.html -doc/html/api/lxml.etree._Validator-class.html -doc/html/api/lxml.etree._XPathEvaluatorBase-class.html -doc/html/api/lxml.etree._XSLTProcessingInstruction-class.html -doc/html/api/lxml.etree._XSLTResultTree-class.html -doc/html/api/lxml.etree.htmlfile-class.html -doc/html/api/lxml.etree.iterparse-class.html -doc/html/api/lxml.etree.iterwalk-class.html -doc/html/api/lxml.etree.xmlfile-class.html -doc/html/api/lxml.html-module.html -doc/html/api/lxml.html-pysrc.html -doc/html/api/lxml.html.CheckboxGroup-class.html -doc/html/api/lxml.html.CheckboxValues-class.html -doc/html/api/lxml.html.Classes-class.html -doc/html/api/lxml.html.ElementSoup-module.html -doc/html/api/lxml.html.ElementSoup-pysrc.html -doc/html/api/lxml.html.FieldsDict-class.html -doc/html/api/lxml.html.FormElement-class.html -doc/html/api/lxml.html.HTMLParser-class.html -doc/html/api/lxml.html.HtmlComment-class.html -doc/html/api/lxml.html.HtmlElement-class.html -doc/html/api/lxml.html.HtmlElementClassLookup-class.html -doc/html/api/lxml.html.HtmlEntity-class.html -doc/html/api/lxml.html.HtmlMixin-class.html -doc/html/api/lxml.html.HtmlProcessingInstruction-class.html -doc/html/api/lxml.html.InputElement-class.html -doc/html/api/lxml.html.InputGetter-class.html -doc/html/api/lxml.html.InputMixin-class.html -doc/html/api/lxml.html.LabelElement-class.html -doc/html/api/lxml.html.MultipleSelectOptions-class.html -doc/html/api/lxml.html.RadioGroup-class.html -doc/html/api/lxml.html.SelectElement-class.html -doc/html/api/lxml.html.TextareaElement-class.html -doc/html/api/lxml.html.XHTMLParser-class.html -doc/html/api/lxml.html._MethodFunc-class.html -doc/html/api/lxml.html.builder-module.html -doc/html/api/lxml.html.builder-pysrc.html -doc/html/api/lxml.html.clean-module.html -doc/html/api/lxml.html.clean-pysrc.html -doc/html/api/lxml.html.clean.Cleaner-class.html -doc/html/api/lxml.html.defs-module.html -doc/html/api/lxml.html.defs-pysrc.html -doc/html/api/lxml.html.diff-module.html -doc/html/api/lxml.html.diff-pysrc.html -doc/html/api/lxml.html.diff.DEL_END-class.html -doc/html/api/lxml.html.diff.DEL_START-class.html -doc/html/api/lxml.html.diff.InsensitiveSequenceMatcher-class.html -doc/html/api/lxml.html.diff.NoDeletes-class.html -doc/html/api/lxml.html.diff.href_token-class.html -doc/html/api/lxml.html.diff.tag_token-class.html -doc/html/api/lxml.html.diff.token-class.html -doc/html/api/lxml.html.formfill-module.html -doc/html/api/lxml.html.formfill-pysrc.html -doc/html/api/lxml.html.formfill.DefaultErrorCreator-class.html -doc/html/api/lxml.html.formfill.FormNotFound-class.html -doc/html/api/lxml.html.html5parser-module.html -doc/html/api/lxml.html.html5parser-pysrc.html -doc/html/api/lxml.html.html5parser.HTMLParser-class.html -doc/html/api/lxml.html.html5parser.XHTMLParser-class.html -doc/html/api/lxml.html.soupparser-module.html -doc/html/api/lxml.html.soupparser-pysrc.html -doc/html/api/lxml.html.soupparser._PseudoTag-class.html -doc/html/api/lxml.html.usedoctest-module.html -doc/html/api/lxml.html.usedoctest-pysrc.html -doc/html/api/lxml.includes-module.html -doc/html/api/lxml.includes-pysrc.html -doc/html/api/lxml.isoschematron-module.html -doc/html/api/lxml.isoschematron-pysrc.html -doc/html/api/lxml.isoschematron.Schematron-class.html -doc/html/api/lxml.objectify-module.html -doc/html/api/lxml.objectify.BoolElement-class.html -doc/html/api/lxml.objectify.ElementMaker-class.html -doc/html/api/lxml.objectify.FloatElement-class.html -doc/html/api/lxml.objectify.IntElement-class.html -doc/html/api/lxml.objectify.LongElement-class.html -doc/html/api/lxml.objectify.NoneElement-class.html -doc/html/api/lxml.objectify.NumberElement-class.html -doc/html/api/lxml.objectify.ObjectPath-class.html -doc/html/api/lxml.objectify.ObjectifiedDataElement-class.html -doc/html/api/lxml.objectify.ObjectifiedElement-class.html -doc/html/api/lxml.objectify.ObjectifyElementClassLookup-class.html -doc/html/api/lxml.objectify.PyType-class.html -doc/html/api/lxml.objectify.StringElement-class.html -doc/html/api/lxml.pyclasslookup-module.html -doc/html/api/lxml.pyclasslookup-pysrc.html -doc/html/api/lxml.sax-module.html -doc/html/api/lxml.sax-pysrc.html -doc/html/api/lxml.sax.ElementTreeContentHandler-class.html -doc/html/api/lxml.sax.ElementTreeProducer-class.html -doc/html/api/lxml.sax.SaxError-class.html -doc/html/api/lxml.tests-module.html -doc/html/api/lxml.tests-pysrc.html -doc/html/api/lxml.tests.common_imports-module.html -doc/html/api/lxml.tests.common_imports-pysrc.html -doc/html/api/lxml.tests.common_imports.HelperTestCase-class.html -doc/html/api/lxml.tests.common_imports.LargeFileLike-class.html -doc/html/api/lxml.tests.common_imports.LargeFileLikeUnicode-class.html -doc/html/api/lxml.tests.common_imports.SillyFileLike-class.html -doc/html/api/lxml.tests.common_imports.skipif-class.html -doc/html/api/lxml.tests.dummy_http_server-module.html -doc/html/api/lxml.tests.dummy_http_server-pysrc.html -doc/html/api/lxml.tests.dummy_http_server.HTTPRequestCollector-class.html -doc/html/api/lxml.tests.dummy_http_server.WebServer-class.html -doc/html/api/lxml.tests.dummy_http_server._RequestHandler-class.html -doc/html/api/lxml.tests.selftest-module.html -doc/html/api/lxml.tests.selftest-pysrc.html -doc/html/api/lxml.tests.selftest2-module.html -doc/html/api/lxml.tests.selftest2-pysrc.html -doc/html/api/lxml.tests.test_builder-module.html -doc/html/api/lxml.tests.test_builder-pysrc.html -doc/html/api/lxml.tests.test_builder.BuilderTestCase-class.html -doc/html/api/lxml.tests.test_classlookup-module.html -doc/html/api/lxml.tests.test_classlookup-pysrc.html -doc/html/api/lxml.tests.test_classlookup.ClassLookupTestCase-class.html -doc/html/api/lxml.tests.test_classlookup.ProxyTestCase-class.html -doc/html/api/lxml.tests.test_css-module.html -doc/html/api/lxml.tests.test_css-pysrc.html -doc/html/api/lxml.tests.test_css.CSSTestCase-class.html -doc/html/api/lxml.tests.test_doctestcompare-module.html -doc/html/api/lxml.tests.test_doctestcompare-pysrc.html -doc/html/api/lxml.tests.test_doctestcompare.DoctestCompareTest-class.html -doc/html/api/lxml.tests.test_doctestcompare.DummyInput-class.html -doc/html/api/lxml.tests.test_dtd-module.html -doc/html/api/lxml.tests.test_dtd-pysrc.html -doc/html/api/lxml.tests.test_dtd.ETreeDtdTestCase-class.html -doc/html/api/lxml.tests.test_elementpath-module.html -doc/html/api/lxml.tests.test_elementpath-pysrc.html -doc/html/api/lxml.tests.test_elementpath.EtreeElementPathTestCase-class.html -doc/html/api/lxml.tests.test_elementtree-module.html -doc/html/api/lxml.tests.test_elementtree-pysrc.html -doc/html/api/lxml.tests.test_elementtree.CElementTreeTestCase-class.html -doc/html/api/lxml.tests.test_elementtree.ETreePullTestCase-class.html -doc/html/api/lxml.tests.test_elementtree.ETreeTestCase-class.html -doc/html/api/lxml.tests.test_elementtree.ElementTreeTestCase-class.html -doc/html/api/lxml.tests.test_elementtree._ETreeTestCaseBase-class.html -doc/html/api/lxml.tests.test_elementtree._XMLPullParserTest-class.html -doc/html/api/lxml.tests.test_errors-module.html -doc/html/api/lxml.tests.test_errors-pysrc.html -doc/html/api/lxml.tests.test_errors.ErrorTestCase-class.html -doc/html/api/lxml.tests.test_etree-module.html -doc/html/api/lxml.tests.test_etree-pysrc.html -doc/html/api/lxml.tests.test_etree.ETreeC14NTestCase-class.html -doc/html/api/lxml.tests.test_etree.ETreeErrorLogTest-class.html -doc/html/api/lxml.tests.test_etree.ETreeOnlyTestCase-class.html -doc/html/api/lxml.tests.test_etree.ETreeWriteTestCase-class.html -doc/html/api/lxml.tests.test_etree.ETreeXIncludeTestCase-class.html -doc/html/api/lxml.tests.test_etree.ElementIncludeTestCase-class.html -doc/html/api/lxml.tests.test_etree.XMLPullParserTest-class.html -doc/html/api/lxml.tests.test_etree._XIncludeTestCase-class.html -doc/html/api/lxml.tests.test_external_document-module.html -doc/html/api/lxml.tests.test_external_document-pysrc.html -doc/html/api/lxml.tests.test_external_document.ExternalDocumentTestCase-class.html -doc/html/api/lxml.tests.test_htmlparser-module.html -doc/html/api/lxml.tests.test_htmlparser-pysrc.html -doc/html/api/lxml.tests.test_htmlparser.HtmlParserTestCase-class.html -doc/html/api/lxml.tests.test_http_io-module.html -doc/html/api/lxml.tests.test_http_io-pysrc.html -doc/html/api/lxml.tests.test_http_io.HttpIOTestCase-class.html -doc/html/api/lxml.tests.test_incremental_xmlfile-module.html -doc/html/api/lxml.tests.test_incremental_xmlfile-pysrc.html -doc/html/api/lxml.tests.test_incremental_xmlfile.AsyncXmlFileTestCase-class.html -doc/html/api/lxml.tests.test_incremental_xmlfile.BytesIOXmlFileTestCase-class.html -doc/html/api/lxml.tests.test_incremental_xmlfile.HtmlFileTestCase-class.html -doc/html/api/lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase-class.html -doc/html/api/lxml.tests.test_incremental_xmlfile.SimpleFileLikeXmlFileTestCase.SimpleFileLike-class.html -doc/html/api/lxml.tests.test_incremental_xmlfile.TempPathXmlFileTestCase-class.html -doc/html/api/lxml.tests.test_incremental_xmlfile.TempXmlFileTestCase-class.html -doc/html/api/lxml.tests.test_incremental_xmlfile._XmlFileTestCaseBase-class.html -doc/html/api/lxml.tests.test_io-module.html -doc/html/api/lxml.tests.test_io-pysrc.html -doc/html/api/lxml.tests.test_io.ETreeIOTestCase-class.html -doc/html/api/lxml.tests.test_io.ElementTreeIOTestCase-class.html -doc/html/api/lxml.tests.test_io._IOTestCaseBase-class.html -doc/html/api/lxml.tests.test_isoschematron-module.html -doc/html/api/lxml.tests.test_isoschematron-pysrc.html -doc/html/api/lxml.tests.test_isoschematron.ETreeISOSchematronTestCase-class.html -doc/html/api/lxml.tests.test_nsclasses-module.html -doc/html/api/lxml.tests.test_nsclasses-pysrc.html -doc/html/api/lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase-class.html -doc/html/api/lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.bluff_class-class.html -doc/html/api/lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.default_class-class.html -doc/html/api/lxml.tests.test_nsclasses.ETreeNamespaceClassesTestCase.maeh_class-class.html -doc/html/api/lxml.tests.test_objectify-module.html -doc/html/api/lxml.tests.test_objectify-pysrc.html -doc/html/api/lxml.tests.test_objectify.ObjectifyTestCase-class.html -doc/html/api/lxml.tests.test_pyclasslookup-module.html -doc/html/api/lxml.tests.test_pyclasslookup-pysrc.html -doc/html/api/lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html -doc/html/api/lxml.tests.test_relaxng-module.html -doc/html/api/lxml.tests.test_relaxng-pysrc.html -doc/html/api/lxml.tests.test_relaxng.ETreeRelaxNGTestCase-class.html -doc/html/api/lxml.tests.test_relaxng.RelaxNGCompactTestCase-class.html -doc/html/api/lxml.tests.test_sax-module.html -doc/html/api/lxml.tests.test_sax-pysrc.html -doc/html/api/lxml.tests.test_sax.ETreeSaxTestCase-class.html -doc/html/api/lxml.tests.test_schematron-module.html -doc/html/api/lxml.tests.test_schematron-pysrc.html -doc/html/api/lxml.tests.test_schematron.ETreeSchematronTestCase-class.html -doc/html/api/lxml.tests.test_threading-module.html -doc/html/api/lxml.tests.test_threading-pysrc.html -doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase-class.html -doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndExtendWorker-class.html -doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.ParseAndInjectWorker-class.html -doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker-class.html -doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.ReverseWorker-class.html -doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.RotateWorker-class.html -doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.SerialiseWorker-class.html -doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.Validate-class.html -doc/html/api/lxml.tests.test_threading.ThreadPipelineTestCase.Worker-class.html -doc/html/api/lxml.tests.test_threading.ThreadingTestCase-class.html -doc/html/api/lxml.tests.test_unicode-module.html -doc/html/api/lxml.tests.test_unicode-pysrc.html -doc/html/api/lxml.tests.test_unicode.EncodingsTestCase-class.html -doc/html/api/lxml.tests.test_unicode.UnicodeTestCase-class.html -doc/html/api/lxml.tests.test_xmlschema-module.html -doc/html/api/lxml.tests.test_xmlschema-pysrc.html -doc/html/api/lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase-class.html -doc/html/api/lxml.tests.test_xmlschema.ETreeXMLSchemaResolversTestCase.simple_resolver-class.html -doc/html/api/lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase-class.html -doc/html/api/lxml.tests.test_xpathevaluator-module.html -doc/html/api/lxml.tests.test_xpathevaluator-pysrc.html -doc/html/api/lxml.tests.test_xpathevaluator.ETreeETXPathClassTestCase-class.html -doc/html/api/lxml.tests.test_xpathevaluator.ETreeXPathClassTestCase-class.html -doc/html/api/lxml.tests.test_xpathevaluator.ETreeXPathExsltTestCase-class.html -doc/html/api/lxml.tests.test_xpathevaluator.ETreeXPathTestCase-class.html -doc/html/api/lxml.tests.test_xslt-module.html -doc/html/api/lxml.tests.test_xslt-pysrc.html -doc/html/api/lxml.tests.test_xslt.ETreeEXSLTTestCase-class.html -doc/html/api/lxml.tests.test_xslt.ETreeXSLTExtElementTestCase-class.html -doc/html/api/lxml.tests.test_xslt.ETreeXSLTExtFuncTestCase-class.html -doc/html/api/lxml.tests.test_xslt.ETreeXSLTTestCase-class.html -doc/html/api/lxml.tests.test_xslt.Py3XSLTTestCase-class.html -doc/html/api/lxml.usedoctest-module.html -doc/html/api/lxml.usedoctest-pysrc.html -doc/html/api/mimetools.Message-class.html -doc/html/api/module-tree.html -doc/html/api/redirect.html -doc/html/api/str-class.html -doc/html/api/toc-everything.html -doc/html/api/toc-lxml-module.html -doc/html/api/toc-lxml.ElementInclude-module.html -doc/html/api/toc-lxml.builder-module.html -doc/html/api/toc-lxml.cssselect-module.html -doc/html/api/toc-lxml.doctestcompare-module.html -doc/html/api/toc-lxml.etree-module.html -doc/html/api/toc-lxml.html-module.html -doc/html/api/toc-lxml.html.ElementSoup-module.html -doc/html/api/toc-lxml.html.builder-module.html -doc/html/api/toc-lxml.html.clean-module.html -doc/html/api/toc-lxml.html.defs-module.html -doc/html/api/toc-lxml.html.diff-module.html -doc/html/api/toc-lxml.html.formfill-module.html -doc/html/api/toc-lxml.html.html5parser-module.html -doc/html/api/toc-lxml.html.soupparser-module.html -doc/html/api/toc-lxml.html.usedoctest-module.html -doc/html/api/toc-lxml.includes-module.html -doc/html/api/toc-lxml.isoschematron-module.html -doc/html/api/toc-lxml.objectify-module.html -doc/html/api/toc-lxml.pyclasslookup-module.html -doc/html/api/toc-lxml.sax-module.html -doc/html/api/toc-lxml.tests-module.html -doc/html/api/toc-lxml.tests.common_imports-module.html -doc/html/api/toc-lxml.tests.dummy_http_server-module.html -doc/html/api/toc-lxml.tests.selftest-module.html -doc/html/api/toc-lxml.tests.selftest2-module.html -doc/html/api/toc-lxml.tests.test_builder-module.html -doc/html/api/toc-lxml.tests.test_classlookup-module.html -doc/html/api/toc-lxml.tests.test_css-module.html -doc/html/api/toc-lxml.tests.test_doctestcompare-module.html -doc/html/api/toc-lxml.tests.test_dtd-module.html -doc/html/api/toc-lxml.tests.test_elementpath-module.html -doc/html/api/toc-lxml.tests.test_elementtree-module.html -doc/html/api/toc-lxml.tests.test_errors-module.html -doc/html/api/toc-lxml.tests.test_etree-module.html -doc/html/api/toc-lxml.tests.test_external_document-module.html -doc/html/api/toc-lxml.tests.test_htmlparser-module.html -doc/html/api/toc-lxml.tests.test_http_io-module.html -doc/html/api/toc-lxml.tests.test_incremental_xmlfile-module.html -doc/html/api/toc-lxml.tests.test_io-module.html -doc/html/api/toc-lxml.tests.test_isoschematron-module.html -doc/html/api/toc-lxml.tests.test_nsclasses-module.html -doc/html/api/toc-lxml.tests.test_objectify-module.html -doc/html/api/toc-lxml.tests.test_pyclasslookup-module.html -doc/html/api/toc-lxml.tests.test_relaxng-module.html -doc/html/api/toc-lxml.tests.test_sax-module.html -doc/html/api/toc-lxml.tests.test_schematron-module.html -doc/html/api/toc-lxml.tests.test_threading-module.html -doc/html/api/toc-lxml.tests.test_unicode-module.html -doc/html/api/toc-lxml.tests.test_xmlschema-module.html -doc/html/api/toc-lxml.tests.test_xpathevaluator-module.html -doc/html/api/toc-lxml.tests.test_xslt-module.html -doc/html/api/toc-lxml.usedoctest-module.html -doc/html/api/toc-xml.etree.ElementTree-module.html -doc/html/api/toc.html -doc/html/api/xml.etree.ElementTree-module.html -doc/html/api/xml.etree.ElementTree-pysrc.html -doc/html/api/xml.etree.ElementTree.Element-class.html -doc/html/api/xml.etree.ElementTree.ElementTree-class.html -doc/html/api/xml.etree.ElementTree.ParseError-class.html -doc/html/api/xml.etree.ElementTree.QName-class.html -doc/html/api/xml.etree.ElementTree.TreeBuilder-class.html -doc/html/api/xml.etree.ElementTree.XMLParser-class.html -doc/html/api/xml.etree.ElementTree._IterParseIterator-class.html -doc/html/api/xml.etree.ElementTree._SimpleElementPath-class.html doc/licenses/BSD.txt doc/licenses/GPL.txt doc/licenses/ZopePublicLicense.txt doc/licenses/elementtree.txt -doc/pdf/pubkey.asc doc/s5/Makefile -doc/s5/lxml-ep2008.html doc/s5/lxml-ep2008.txt doc/s5/tagpython.png doc/s5/ep2008/atom-example.xml @@ -611,6 +120,8 @@ src/lxml/pyclasslookup.py src/lxml/python.pxd src/lxml/readonlytree.pxi src/lxml/relaxng.pxi +src/lxml/sax.c +src/lxml/sax.pxd src/lxml/sax.py src/lxml/saxparser.pxi src/lxml/schematron.pxi @@ -750,6 +261,7 @@ src/lxml/tests/shakespeare.html src/lxml/tests/test-document.xslt src/lxml/tests/test-string.xml src/lxml/tests/test.dtd +src/lxml/tests/test.rnc src/lxml/tests/test.sch src/lxml/tests/test.xml src/lxml/tests/test.xsd diff --git a/src/lxml.egg-info/requires.txt b/src/lxml.egg-info/requires.txt index d9f06f4..8b2fdb2 100644 --- a/src/lxml.egg-info/requires.txt +++ b/src/lxml.egg-info/requires.txt @@ -9,4 +9,4 @@ html5lib BeautifulSoup4 [source] -Cython>=0.26.1 +Cython>=0.29.1 diff --git a/src/lxml/_elementpath.c b/src/lxml/_elementpath.c index 378b8d2..cbbb5ea 100644 --- a/src/lxml/_elementpath.c +++ b/src/lxml/_elementpath.c @@ -1,28 +1,27 @@ -/* Generated by Cython 0.28.5 */ +/* Generated by Cython 0.29.2 */ /* BEGIN: Cython Metadata { "distutils": { "define_macros": [ [ - "CYTHON_TRACE_NOGIL", - "1" - ], - [ - "CYTHON_CLINE_IN_TRACEBACK", + "CYTHON_CLINE_IN_TRACEBACK", "0" ] - ], + ], + "extra_compile_args": [ + "-w" + ], "include_dirs": [ - "/usr/include/libxml2", - "src", + "/usr/include/libxml2", + "src", "src/lxml/includes" - ], - "name": "lxml._elementpath", + ], + "name": "lxml._elementpath", "sources": [ "src/lxml/_elementpath.py" ] - }, + }, "module_name": "lxml._elementpath" } END: Cython Metadata */ @@ -34,7 +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_28_5" +#define CYTHON_ABI "0_29_2" +#define CYTHON_HEX_VERSION 0x001D02F0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof @@ -105,6 +105,10 @@ END: Cython Metadata */ #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 #elif defined(PYSTON_VERSION) #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 1 @@ -142,6 +146,10 @@ END: Cython Metadata */ #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 0 @@ -195,11 +203,17 @@ END: Cython Metadata */ #define CYTHON_FAST_PYCALL 1 #endif #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (0 && PY_VERSION_HEX >= 0x03050000) + #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) #endif #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) #endif + #ifndef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) + #endif #endif #if !defined(CYTHON_FAST_PYCCALL) #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) @@ -209,6 +223,9 @@ END: Cython Metadata */ #undef SHIFT #undef BASE #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif #endif #ifndef __has_attribute #define __has_attribute(x) 0 @@ -335,6 +352,9 @@ END: Cython Metadata */ #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) #ifndef METH_FASTCALL #define METH_FASTCALL 0x80 @@ -348,15 +368,40 @@ END: Cython Metadata */ #endif #if CYTHON_FAST_PYCCALL #define __Pyx_PyFastCFunction_Check(func)\ - ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS))))) + ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))))) #else #define __Pyx_PyFastCFunction_Check(func) 0 #endif +#if CYTHON_USE_DICT_VERSIONS +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ + } +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) #define PyObject_Malloc(s) PyMem_Malloc(s) #define PyObject_Free(p) PyMem_Free(p) #define PyObject_Realloc(p) PyMem_Realloc(p) #endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 + #define PyMem_RawMalloc(n) PyMem_Malloc(n) + #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) + #define PyMem_RawFree(p) PyMem_Free(p) +#endif #if CYTHON_COMPILING_IN_PYSTON #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) @@ -464,8 +509,8 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) #endif -#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) -#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else @@ -617,6 +662,9 @@ typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* enc (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) @@ -675,6 +723,7 @@ static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); #define __Pyx_PySequence_Tuple(obj)\ (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) @@ -755,7 +804,7 @@ static int __Pyx_init_sys_getdefaultencoding_params(void) { if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; - __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); + __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); @@ -813,7 +862,7 @@ struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_13_select; struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_14__build_path_iterator; struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_15_genexpr; -/* "lxml/_elementpath.py":70 +/* "lxml/_elementpath.py":74 * ) * * def xpath_tokenizer(pattern, namespaces=None): # <<<<<<<<<<<<<< @@ -838,7 +887,7 @@ struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct__xpath_tokenizer { }; -/* "lxml/_elementpath.py":91 +/* "lxml/_elementpath.py":95 * * * def prepare_child(next, token): # <<<<<<<<<<<<<< @@ -851,7 +900,7 @@ struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_1_prepare_child { }; -/* "lxml/_elementpath.py":93 +/* "lxml/_elementpath.py":97 * def prepare_child(next, token): * tag = token[1] * def select(result): # <<<<<<<<<<<<<< @@ -873,7 +922,7 @@ struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_2_select { }; -/* "lxml/_elementpath.py":100 +/* "lxml/_elementpath.py":104 * * def prepare_star(next, token): * def select(result): # <<<<<<<<<<<<<< @@ -894,7 +943,7 @@ struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_3_select { }; -/* "lxml/_elementpath.py":111 +/* "lxml/_elementpath.py":115 * return select * * def prepare_descendant(next, token): # <<<<<<<<<<<<<< @@ -907,7 +956,7 @@ struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_4_prepare_descendant { }; -/* "lxml/_elementpath.py":119 +/* "lxml/_elementpath.py":123 * else: * raise SyntaxError("invalid descendant") * def select(result): # <<<<<<<<<<<<<< @@ -929,7 +978,7 @@ struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_5_select { }; -/* "lxml/_elementpath.py":126 +/* "lxml/_elementpath.py":130 * * def prepare_parent(next, token): * def select(result): # <<<<<<<<<<<<<< @@ -947,7 +996,7 @@ struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_6_select { }; -/* "lxml/_elementpath.py":133 +/* "lxml/_elementpath.py":137 * return select * * def prepare_predicate(next, token): # <<<<<<<<<<<<<< @@ -963,7 +1012,7 @@ struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_7_prepare_predicate { }; -/* "lxml/_elementpath.py":155 +/* "lxml/_elementpath.py":159 * # [@attribute] predicate * key = predicate[1] * def select(result): # <<<<<<<<<<<<<< @@ -981,7 +1030,7 @@ struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_8_select { }; -/* "lxml/_elementpath.py":164 +/* "lxml/_elementpath.py":168 * key = predicate[1] * value = predicate[-1] * def select(result): # <<<<<<<<<<<<<< @@ -999,7 +1048,7 @@ struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_9_select { }; -/* "lxml/_elementpath.py":172 +/* "lxml/_elementpath.py":176 * # [tag] * tag = predicate[0] * def select(result): # <<<<<<<<<<<<<< @@ -1021,7 +1070,7 @@ struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_10_select { }; -/* "lxml/_elementpath.py":183 +/* "lxml/_elementpath.py":187 * value = predicate[-1] * if tag: * def select(result): # <<<<<<<<<<<<<< @@ -1043,7 +1092,7 @@ struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_11_select { }; -/* "lxml/_elementpath.py":190 +/* "lxml/_elementpath.py":194 * break * else: * def select(result): # <<<<<<<<<<<<<< @@ -1061,7 +1110,7 @@ struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_12_select { }; -/* "lxml/_elementpath.py":216 +/* "lxml/_elementpath.py":220 * else: * index = -1 * def select(result): # <<<<<<<<<<<<<< @@ -1084,7 +1133,7 @@ struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_13_select { }; -/* "lxml/_elementpath.py":246 +/* "lxml/_elementpath.py":250 * * * def _build_path_iterator(path, namespaces): # <<<<<<<<<<<<<< @@ -1097,7 +1146,7 @@ struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_14__build_path_iterator }; -/* "lxml/_elementpath.py":257 +/* "lxml/_elementpath.py":261 * if None in namespaces: * cache_key += (namespaces[None],) + tuple(sorted( * item for item in namespaces.items() if item[0] is not None)) # <<<<<<<<<<<<<< @@ -1197,254 +1246,6 @@ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ 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); -/* PyThreadStateGet.proto */ -#if CYTHON_FAST_THREAD_STATE -#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; -#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; -#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type -#else -#define __Pyx_PyThreadState_declare -#define __Pyx_PyThreadState_assign -#define __Pyx_PyErr_Occurred() PyErr_Occurred() -#endif - -/* PyErrFetchRestore.proto */ -#if CYTHON_FAST_THREAD_STATE -#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) -#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) -#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) -#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) -#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) -static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); -static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); -#if CYTHON_COMPILING_IN_CPYTHON -#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) -#else -#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) -#endif -#else -#define __Pyx_PyErr_Clear() PyErr_Clear() -#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) -#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) -#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) -#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) -#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) -#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) -#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) -#endif - -/* Profile.proto */ -#ifndef CYTHON_PROFILE -#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON - #define CYTHON_PROFILE 0 -#else - #define CYTHON_PROFILE 1 -#endif -#endif -#ifndef CYTHON_TRACE_NOGIL - #define CYTHON_TRACE_NOGIL 0 -#else - #if CYTHON_TRACE_NOGIL && !defined(CYTHON_TRACE) - #define CYTHON_TRACE 1 - #endif -#endif -#ifndef CYTHON_TRACE - #define CYTHON_TRACE 0 -#endif -#if CYTHON_TRACE - #undef CYTHON_PROFILE_REUSE_FRAME -#endif -#ifndef CYTHON_PROFILE_REUSE_FRAME - #define CYTHON_PROFILE_REUSE_FRAME 0 -#endif -#if CYTHON_PROFILE || CYTHON_TRACE - #include "compile.h" - #include "frameobject.h" - #include "traceback.h" - #if CYTHON_PROFILE_REUSE_FRAME - #define CYTHON_FRAME_MODIFIER static - #define CYTHON_FRAME_DEL(frame) - #else - #define CYTHON_FRAME_MODIFIER - #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame) - #endif - #define __Pyx_TraceDeclarations\ - static PyCodeObject *__pyx_frame_code = NULL;\ - CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\ - int __Pyx_use_tracing = 0; - #define __Pyx_TraceFrameInit(codeobj)\ - if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj; - #ifdef WITH_THREAD - #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\ - if (nogil) {\ - if (CYTHON_TRACE_NOGIL) {\ - PyThreadState *tstate;\ - PyGILState_STATE state = PyGILState_Ensure();\ - tstate = __Pyx_PyThreadState_Current;\ - if (unlikely(tstate->use_tracing) && !tstate->tracing &&\ - (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\ - }\ - PyGILState_Release(state);\ - if (unlikely(__Pyx_use_tracing < 0)) goto_error;\ - }\ - } else {\ - PyThreadState* tstate = PyThreadState_GET();\ - if (unlikely(tstate->use_tracing) && !tstate->tracing &&\ - (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\ - if (unlikely(__Pyx_use_tracing < 0)) goto_error;\ - }\ - } - #else - #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\ - { PyThreadState* tstate = PyThreadState_GET();\ - if (unlikely(tstate->use_tracing) && !tstate->tracing &&\ - (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\ - if (unlikely(__Pyx_use_tracing < 0)) goto_error;\ - }\ - } - #endif - #define __Pyx_TraceException()\ - if (likely(!__Pyx_use_tracing)); else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ - if (tstate->use_tracing &&\ - (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ - tstate->tracing++;\ - tstate->use_tracing = 0;\ - PyObject *exc_info = __Pyx_GetExceptionTuple(tstate);\ - if (exc_info) {\ - if (CYTHON_TRACE && tstate->c_tracefunc)\ - tstate->c_tracefunc(\ - tstate->c_traceobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\ - tstate->c_profilefunc(\ - tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\ - Py_DECREF(exc_info);\ - }\ - tstate->use_tracing = 1;\ - tstate->tracing--;\ - }\ - } - static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) { - PyObject *type, *value, *traceback; - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); - tstate->tracing++; - tstate->use_tracing = 0; - if (CYTHON_TRACE && tstate->c_tracefunc) - tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result); - if (tstate->c_profilefunc) - tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result); - CYTHON_FRAME_DEL(frame); - tstate->use_tracing = 1; - tstate->tracing--; - __Pyx_ErrRestoreInState(tstate, type, value, traceback); - } - #ifdef WITH_THREAD - #define __Pyx_TraceReturn(result, nogil)\ - if (likely(!__Pyx_use_tracing)); else {\ - if (nogil) {\ - if (CYTHON_TRACE_NOGIL) {\ - PyThreadState *tstate;\ - PyGILState_STATE state = PyGILState_Ensure();\ - tstate = __Pyx_PyThreadState_Current;\ - if (tstate->use_tracing) {\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\ - }\ - PyGILState_Release(state);\ - }\ - } else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ - if (tstate->use_tracing) {\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\ - }\ - }\ - } - #else - #define __Pyx_TraceReturn(result, nogil)\ - if (likely(!__Pyx_use_tracing)); else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ - if (tstate->use_tracing) {\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\ - }\ - } - #endif - static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno); - static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, PyThreadState* tstate, const char *funcname, const char *srcfile, int firstlineno); -#else - #define __Pyx_TraceDeclarations - #define __Pyx_TraceFrameInit(codeobj) - #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error) if ((1)); else goto_error; - #define __Pyx_TraceException() - #define __Pyx_TraceReturn(result, nogil) -#endif -#if CYTHON_TRACE - static int __Pyx_call_line_trace_func(PyThreadState *tstate, PyFrameObject *frame, int lineno) { - int ret; - PyObject *type, *value, *traceback; - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); - __Pyx_PyFrame_SetLineNumber(frame, lineno); - tstate->tracing++; - tstate->use_tracing = 0; - ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL); - tstate->use_tracing = 1; - tstate->tracing--; - if (likely(!ret)) { - __Pyx_ErrRestoreInState(tstate, type, value, traceback); - } else { - Py_XDECREF(type); - Py_XDECREF(value); - Py_XDECREF(traceback); - } - return ret; - } - #ifdef WITH_THREAD - #define __Pyx_TraceLine(lineno, nogil, goto_error)\ - if (likely(!__Pyx_use_tracing)); else {\ - if (nogil) {\ - if (CYTHON_TRACE_NOGIL) {\ - int ret = 0;\ - PyThreadState *tstate;\ - PyGILState_STATE state = PyGILState_Ensure();\ - tstate = __Pyx_PyThreadState_Current;\ - if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\ - ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\ - }\ - PyGILState_Release(state);\ - if (unlikely(ret)) goto_error;\ - }\ - } else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ - if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\ - int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\ - if (unlikely(ret)) goto_error;\ - }\ - }\ - } - #else - #define __Pyx_TraceLine(lineno, nogil, goto_error)\ - if (likely(!__Pyx_use_tracing)); else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ - if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\ - int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\ - if (unlikely(ret)) goto_error;\ - }\ - } - #endif -#else - #define __Pyx_TraceLine(lineno, nogil, goto_error) if ((1)); else goto_error; -#endif - -/* PyObjectCall.proto */ -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); -#else -#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) -#endif - -/* GetModuleGlobalName.proto */ -static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); - /* PyCFunctionFastCall.proto */ #if CYTHON_FAST_PYCCALL static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); @@ -1461,8 +1262,30 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, #else #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) #endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif +/* PyObjectCall2Args.proto */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + /* PyObjectCallMethO.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); @@ -1471,6 +1294,27 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject /* PyObjectCallOneArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +#define __Pyx_GetModuleGlobalNameUncached(var, name) {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + /* GetItemInt.proto */ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ @@ -1527,6 +1371,42 @@ static CYTHON_INLINE int __Pyx_IterFinish(void); /* UnpackItemEndCheck.proto */ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + /* RaiseException.proto */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); @@ -1537,6 +1417,11 @@ static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* k #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) #endif +/* GetTopmostException.proto */ +#if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + /* SaveResetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) @@ -1605,6 +1490,7 @@ typedef struct { PyObject *func_annotations; } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; +#define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType)) #define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\ __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code) static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, @@ -1679,13 +1565,8 @@ static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long int (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2)) #endif -/* PyIntBinop.proto */ -#if !CYTHON_COMPILING_IN_PYPY -static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace); -#else -#define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\ - PyObject_RichCompare(op1, op2, Py_EQ) - #endif +/* PyIntCompare.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); /* ListCompAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS @@ -1718,21 +1599,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj /* Import.proto */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); -/* PyIdentifierFromString.proto */ -#if !defined(__Pyx_PyIdentifier_FromString) -#if PY_MAJOR_VERSION < 3 - #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) -#else - #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) -#endif -#endif - -/* ModuleImport.proto */ -static PyObject *__Pyx_ImportModule(const char *name); - /* RegisterModuleCleanup.proto */ static void __pyx_module_cleanup(PyObject *self); +#if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY static int __Pyx_RegisterCleanup(void); +#else +#define __Pyx_RegisterCleanup() (0) +#endif /* CLineInTraceback.proto */ #ifdef CYTHON_CLINE_IN_TRACEBACK @@ -1790,19 +1663,28 @@ static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject * static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); #endif +/* PyObjectGetMethod.proto */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); + /* PyObjectCallMethod1.proto */ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); -static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg); /* CoroutineBase.proto */ typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *); +#if CYTHON_USE_EXC_INFO_STACK +#define __Pyx_ExcInfoStruct _PyErr_StackItem +#else typedef struct { - PyObject_HEAD - __pyx_coroutine_body_t body; - PyObject *closure; PyObject *exc_type; PyObject *exc_value; PyObject *exc_traceback; +} __Pyx_ExcInfoStruct; +#endif +typedef struct { + PyObject_HEAD + __pyx_coroutine_body_t body; + PyObject *closure; + __Pyx_ExcInfoStruct gi_exc_state; PyObject *gi_weakreflist; PyObject *classobj; PyObject *yieldfrom; @@ -1819,18 +1701,24 @@ static __pyx_CoroutineObject *__Pyx__Coroutine_New( static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, PyObject *name, PyObject *qualname, PyObject *module_name); +static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self); static int __Pyx_Coroutine_clear(PyObject *self); static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value); static PyObject *__Pyx_Coroutine_Close(PyObject *self); static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args); +#if CYTHON_USE_EXC_INFO_STACK +#define __Pyx_Coroutine_SwapException(self) +#define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state) +#else #define __Pyx_Coroutine_SwapException(self) {\ - __Pyx_ExceptionSwap(&(self)->exc_type, &(self)->exc_value, &(self)->exc_traceback);\ - __Pyx_Coroutine_ResetFrameBackpointer(self);\ + __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\ + __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\ } #define __Pyx_Coroutine_ResetAndClearException(self) {\ - __Pyx_ExceptionReset((self)->exc_type, (self)->exc_value, (self)->exc_traceback);\ - (self)->exc_type = (self)->exc_value = (self)->exc_traceback = NULL;\ + __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\ + (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\ } +#endif #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue) @@ -1839,7 +1727,7 @@ static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args); __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue) #endif static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue); -static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__pyx_CoroutineObject *self); +static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state); /* PatchModuleWithCoroutine.proto */ static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code); @@ -1893,29 +1781,29 @@ static PyObject *__pyx_builtin_AttributeError; static PyObject *__pyx_builtin_StopIteration; static const char __pyx_k_d[] = "-?\\d+$"; static const char __pyx_k_e[] = "e"; -static const char __pyx_k__3[] = "{"; - static const char __pyx_k__4[] = ":"; - static const char __pyx_k__9[] = "*"; +static const char __pyx_k__2[] = "{"; + static const char __pyx_k__3[] = ":"; + static const char __pyx_k__7[] = "*"; static const char __pyx_k_el[] = "el"; static const char __pyx_k_it[] = "it"; static const char __pyx_k_re[] = "re"; - static const char __pyx_k__24[] = ""; - static const char __pyx_k__26[] = "]"; - static const char __pyx_k__29[] = "'\""; - static const char __pyx_k__30[] = "'"; - static const char __pyx_k__32[] = "-"; - static const char __pyx_k__33[] = "@-"; - static const char __pyx_k__36[] = "@-='"; - static const char __pyx_k__39[] = "_"; - static const char __pyx_k__42[] = ".='"; - static const char __pyx_k__43[] = "-='"; - static const char __pyx_k__48[] = "-()"; - static const char __pyx_k__49[] = "-()-"; - static const char __pyx_k__59[] = "/"; - static const char __pyx_k__78[] = "."; - static const char __pyx_k__79[] = ".."; - static const char __pyx_k__80[] = "//"; - static const char __pyx_k__81[] = "["; + static const char __pyx_k__17[] = ""; + static const char __pyx_k__18[] = "]"; + static const char __pyx_k__21[] = "'\""; + static const char __pyx_k__22[] = "'"; + static const char __pyx_k__24[] = "-"; + static const char __pyx_k__25[] = "@-"; + static const char __pyx_k__28[] = "@-='"; + static const char __pyx_k__31[] = "_"; + static const char __pyx_k__34[] = ".='"; + static const char __pyx_k__35[] = "-='"; + static const char __pyx_k__40[] = "-()"; + static const char __pyx_k__41[] = "-()-"; + static const char __pyx_k__50[] = "/"; + static const char __pyx_k__70[] = "."; + static const char __pyx_k__71[] = ".."; + static const char __pyx_k__72[] = "//"; + static const char __pyx_k__73[] = "["; static const char __pyx_k_get[] = "get"; static const char __pyx_k_key[] = "key"; static const char __pyx_k_ops[] = "ops"; @@ -1928,6 +1816,7 @@ static const char __pyx_k__3[] = "{"; static const char __pyx_k_join[] = "join"; static const char __pyx_k_last[] = "last"; static const char __pyx_k_main[] = "__main__"; + static const char __pyx_k_name[] = "__name__"; static const char __pyx_k_next[] = "next"; static const char __pyx_k_path[] = "path"; static const char __pyx_k_send[] = "send"; @@ -2012,26 +1901,26 @@ static PyObject *__pyx_n_s_KeyError; static PyObject *__pyx_n_s_StopIteration; static PyObject *__pyx_n_s_SyntaxError; static PyObject *__pyx_n_s_ValueError; +static PyObject *__pyx_kp_s__17; +static PyObject *__pyx_kp_s__18; +static PyObject *__pyx_kp_s__2; +static PyObject *__pyx_kp_s__21; +static PyObject *__pyx_kp_s__22; static PyObject *__pyx_kp_s__24; -static PyObject *__pyx_kp_s__26; -static PyObject *__pyx_kp_s__29; +static PyObject *__pyx_kp_s__25; +static PyObject *__pyx_kp_s__28; static PyObject *__pyx_kp_s__3; -static PyObject *__pyx_kp_s__30; -static PyObject *__pyx_kp_s__32; -static PyObject *__pyx_kp_s__33; -static PyObject *__pyx_kp_s__36; -static PyObject *__pyx_n_s__39; -static PyObject *__pyx_kp_s__4; -static PyObject *__pyx_kp_s__42; -static PyObject *__pyx_kp_s__43; -static PyObject *__pyx_kp_s__48; -static PyObject *__pyx_kp_s__49; -static PyObject *__pyx_kp_s__59; -static PyObject *__pyx_kp_s__78; -static PyObject *__pyx_kp_s__79; -static PyObject *__pyx_kp_s__80; -static PyObject *__pyx_kp_s__81; -static PyObject *__pyx_kp_s__9; +static PyObject *__pyx_n_s__31; +static PyObject *__pyx_kp_s__34; +static PyObject *__pyx_kp_s__35; +static PyObject *__pyx_kp_s__40; +static PyObject *__pyx_kp_s__41; +static PyObject *__pyx_kp_s__50; +static PyObject *__pyx_kp_s__7; +static PyObject *__pyx_kp_s__70; +static PyObject *__pyx_kp_s__71; +static PyObject *__pyx_kp_s__72; +static PyObject *__pyx_kp_s__73; static PyObject *__pyx_n_s_args; static PyObject *__pyx_n_s_build_path_iterator; static PyObject *__pyx_n_s_build_path_iterator_locals_gene; @@ -2075,6 +1964,7 @@ static PyObject *__pyx_n_s_last; static PyObject *__pyx_n_s_lxml__elementpath; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_match; +static PyObject *__pyx_n_s_name; static PyObject *__pyx_n_s_namespaces; static PyObject *__pyx_n_s_next; static PyObject *__pyx_n_s_next_2; @@ -2165,79 +2055,76 @@ static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_int_neg_1; static PyObject *__pyx_codeobj_; -static PyObject *__pyx_tuple__2; +static PyObject *__pyx_tuple__4; static PyObject *__pyx_tuple__5; -static PyObject *__pyx_tuple__7; -static PyObject *__pyx_slice__28; -static PyObject *__pyx_slice__31; -static PyObject *__pyx_slice__58; -static PyObject *__pyx_slice__61; +static PyObject *__pyx_tuple__8; +static PyObject *__pyx_slice__20; +static PyObject *__pyx_slice__23; +static PyObject *__pyx_slice__49; static PyObject *__pyx_tuple__10; static PyObject *__pyx_tuple__12; +static PyObject *__pyx_tuple__13; static PyObject *__pyx_tuple__15; -static PyObject *__pyx_tuple__18; static PyObject *__pyx_tuple__19; -static PyObject *__pyx_tuple__22; -static PyObject *__pyx_tuple__27; -static PyObject *__pyx_tuple__34; -static PyObject *__pyx_tuple__37; -static PyObject *__pyx_tuple__40; +static PyObject *__pyx_tuple__26; +static PyObject *__pyx_tuple__29; +static PyObject *__pyx_tuple__32; +static PyObject *__pyx_tuple__36; +static PyObject *__pyx_tuple__38; +static PyObject *__pyx_tuple__42; +static PyObject *__pyx_tuple__43; static PyObject *__pyx_tuple__44; +static PyObject *__pyx_tuple__45; static PyObject *__pyx_tuple__46; -static PyObject *__pyx_tuple__50; +static PyObject *__pyx_tuple__48; static PyObject *__pyx_tuple__51; static PyObject *__pyx_tuple__52; static PyObject *__pyx_tuple__53; static PyObject *__pyx_tuple__54; +static PyObject *__pyx_tuple__55; static PyObject *__pyx_tuple__56; +static PyObject *__pyx_tuple__57; +static PyObject *__pyx_tuple__58; static PyObject *__pyx_tuple__60; static PyObject *__pyx_tuple__62; -static PyObject *__pyx_tuple__63; static PyObject *__pyx_tuple__64; -static PyObject *__pyx_tuple__69; -static PyObject *__pyx_tuple__70; -static PyObject *__pyx_tuple__71; -static PyObject *__pyx_tuple__72; -static PyObject *__pyx_tuple__73; +static PyObject *__pyx_tuple__66; +static PyObject *__pyx_tuple__68; static PyObject *__pyx_tuple__74; -static PyObject *__pyx_tuple__75; static PyObject *__pyx_tuple__76; -static PyObject *__pyx_tuple__77; +static PyObject *__pyx_tuple__78; +static PyObject *__pyx_tuple__79; +static PyObject *__pyx_tuple__81; static PyObject *__pyx_tuple__82; -static PyObject *__pyx_tuple__83; static PyObject *__pyx_tuple__84; static PyObject *__pyx_tuple__85; -static PyObject *__pyx_tuple__86; static PyObject *__pyx_tuple__87; -static PyObject *__pyx_tuple__88; -static PyObject *__pyx_tuple__89; -static PyObject *__pyx_tuple__90; static PyObject *__pyx_codeobj__6; -static PyObject *__pyx_codeobj__8; +static PyObject *__pyx_codeobj__9; static PyObject *__pyx_codeobj__11; -static PyObject *__pyx_codeobj__13; static PyObject *__pyx_codeobj__14; static PyObject *__pyx_codeobj__16; -static PyObject *__pyx_codeobj__17; -static PyObject *__pyx_codeobj__20; -static PyObject *__pyx_codeobj__21; -static PyObject *__pyx_codeobj__23; -static PyObject *__pyx_codeobj__25; -static PyObject *__pyx_codeobj__35; -static PyObject *__pyx_codeobj__38; -static PyObject *__pyx_codeobj__41; -static PyObject *__pyx_codeobj__45; +static PyObject *__pyx_codeobj__27; +static PyObject *__pyx_codeobj__30; +static PyObject *__pyx_codeobj__33; +static PyObject *__pyx_codeobj__37; +static PyObject *__pyx_codeobj__39; static PyObject *__pyx_codeobj__47; -static PyObject *__pyx_codeobj__55; -static PyObject *__pyx_codeobj__57; +static PyObject *__pyx_codeobj__59; +static PyObject *__pyx_codeobj__61; +static PyObject *__pyx_codeobj__63; static PyObject *__pyx_codeobj__65; -static PyObject *__pyx_codeobj__66; static PyObject *__pyx_codeobj__67; -static PyObject *__pyx_codeobj__68; +static PyObject *__pyx_codeobj__69; +static PyObject *__pyx_codeobj__75; +static PyObject *__pyx_codeobj__77; +static PyObject *__pyx_codeobj__80; +static PyObject *__pyx_codeobj__83; +static PyObject *__pyx_codeobj__86; /* Late includes */ static PyObject *__pyx_gb_4lxml_12_elementpath_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "lxml/_elementpath.py":70 +/* "lxml/_elementpath.py":74 * ) * * def xpath_tokenizer(pattern, namespaces=None): # <<<<<<<<<<<<<< @@ -2247,7 +2134,7 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_2generator(__pyx_CoroutineObject /* Python wrapper */ static PyObject *__pyx_pw_4lxml_12_elementpath_1xpath_tokenizer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_12_elementpath_1xpath_tokenizer = {"xpath_tokenizer", (PyCFunction)__pyx_pw_4lxml_12_elementpath_1xpath_tokenizer, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_12_elementpath_1xpath_tokenizer = {"xpath_tokenizer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_12_elementpath_1xpath_tokenizer, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_12_elementpath_1xpath_tokenizer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_pattern = 0; PyObject *__pyx_v_namespaces = 0; @@ -2282,7 +2169,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_1xpath_tokenizer(PyObject *__pyx_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "xpath_tokenizer") < 0)) __PYX_ERR(0, 70, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "xpath_tokenizer") < 0)) __PYX_ERR(0, 74, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -2298,7 +2185,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_1xpath_tokenizer(PyObject *__pyx_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("xpath_tokenizer", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 70, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("xpath_tokenizer", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 74, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml._elementpath.xpath_tokenizer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -2320,7 +2207,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_xpath_tokenizer(CYTHON_UNUSED PyO if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct__xpath_tokenizer *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 70, __pyx_L1_error) + __PYX_ERR(0, 74, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -2331,7 +2218,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_xpath_tokenizer(CYTHON_UNUSED PyO __Pyx_INCREF(__pyx_cur_scope->__pyx_v_namespaces); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_namespaces); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_12_elementpath_2generator, __pyx_codeobj_, (PyObject *) __pyx_cur_scope, __pyx_n_s_xpath_tokenizer, __pyx_n_s_xpath_tokenizer, __pyx_n_s_lxml__elementpath); if (unlikely(!gen)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_12_elementpath_2generator, __pyx_codeobj_, (PyObject *) __pyx_cur_scope, __pyx_n_s_xpath_tokenizer, __pyx_n_s_xpath_tokenizer, __pyx_n_s_lxml__elementpath); if (unlikely(!gen)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -2351,7 +2238,6 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_2generator(__pyx_CoroutineObject { struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct__xpath_tokenizer *__pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct__xpath_tokenizer *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; @@ -2369,8 +2255,6 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_2generator(__pyx_CoroutineObject PyObject *__pyx_t_15 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("xpath_tokenizer", 0); - __Pyx_TraceFrameInit(__pyx_codeobj_) - __Pyx_TraceCall("xpath_tokenizer", __pyx_f[0], 70, 0, __PYX_ERR(0, 70, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L21_resume_from_yield; @@ -2378,30 +2262,40 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_2generator(__pyx_CoroutineObject case 3: goto __pyx_L25_resume_from_yield; case 4: goto __pyx_L26_resume_from_yield; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 70, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 74, __pyx_L1_error) - /* "lxml/_elementpath.py":71 + /* "lxml/_elementpath.py":75 * * def xpath_tokenizer(pattern, namespaces=None): * default_namespace = namespaces.get(None) if namespaces else None # <<<<<<<<<<<<<< * for token in xpath_tokenizer_re.findall(pattern): * tag = token[1] */ - __Pyx_TraceLine(71,0,__PYX_ERR(0, 71, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_namespaces); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 71, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_namespaces); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 75, __pyx_L1_error) if (__pyx_t_2) { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_namespaces, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 71, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 71, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_namespaces, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, Py_None) : __Pyx_PyObject_CallOneArg(__pyx_t_4, Py_None); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; } else { __Pyx_INCREF(Py_None); __pyx_t_1 = Py_None; @@ -2410,97 +2304,68 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_2generator(__pyx_CoroutineObject __pyx_cur_scope->__pyx_v_default_namespace = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/_elementpath.py":72 + /* "lxml/_elementpath.py":76 * def xpath_tokenizer(pattern, namespaces=None): * default_namespace = namespaces.get(None) if namespaces else None * for token in xpath_tokenizer_re.findall(pattern): # <<<<<<<<<<<<<< * tag = token[1] * if tag and tag[0] != "{": */ - __Pyx_TraceLine(72,0,__PYX_ERR(0, 72, __pyx_L1_error)) - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_xpath_tokenizer_re); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 72, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_findall); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_xpath_tokenizer_re); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_findall); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); - } - } - if (!__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_cur_scope->__pyx_v_pattern); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_pattern}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_pattern}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 72, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(__pyx_cur_scope->__pyx_v_pattern); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_pattern); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_cur_scope->__pyx_v_pattern); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF_SET(__pyx_t_4, function); } } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_cur_scope->__pyx_v_pattern) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_cur_scope->__pyx_v_pattern); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; 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_6 = 0; + __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 72, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 72, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 76, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_7)) { - if (likely(PyList_CheckExact(__pyx_t_3))) { - if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break; + if (likely(PyList_CheckExact(__pyx_t_4))) { + if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 72, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 76, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { - if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 72, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 76, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } } else { - __pyx_t_1 = __pyx_t_7(__pyx_t_3); + __pyx_t_1 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 72, __pyx_L1_error) + else __PYX_ERR(0, 76, __pyx_L1_error) } break; } @@ -2511,104 +2376,100 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_2generator(__pyx_CoroutineObject __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":73 + /* "lxml/_elementpath.py":77 * default_namespace = namespaces.get(None) if namespaces else None * for token in xpath_tokenizer_re.findall(pattern): * tag = token[1] # <<<<<<<<<<<<<< * if tag and tag[0] != "{": * if ":" in tag: */ - __Pyx_TraceLine(73,0,__PYX_ERR(0, 73, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_token, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_token, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_tag); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_tag, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":74 + /* "lxml/_elementpath.py":78 * for token in xpath_tokenizer_re.findall(pattern): * tag = token[1] * if tag and tag[0] != "{": # <<<<<<<<<<<<<< * if ":" in tag: * prefix, uri = tag.split(":", 1) */ - __Pyx_TraceLine(74,0,__PYX_ERR(0, 74, __pyx_L1_error)) - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_tag); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 74, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_tag); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 78, __pyx_L1_error) if (__pyx_t_8) { } else { __pyx_t_2 = __pyx_t_8; goto __pyx_L7_bool_binop_done; } - __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_tag, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_tag, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__3, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 74, __pyx_L1_error) + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__2, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = __pyx_t_8; __pyx_L7_bool_binop_done:; if (__pyx_t_2) { - /* "lxml/_elementpath.py":75 + /* "lxml/_elementpath.py":79 * tag = token[1] * if tag and tag[0] != "{": * if ":" in tag: # <<<<<<<<<<<<<< * prefix, uri = tag.split(":", 1) * try: */ - __Pyx_TraceLine(75,0,__PYX_ERR(0, 75, __pyx_L1_error)) - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s__4, __pyx_cur_scope->__pyx_v_tag, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 75, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s__3, __pyx_cur_scope->__pyx_v_tag, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 79, __pyx_L1_error) __pyx_t_8 = (__pyx_t_2 != 0); if (__pyx_t_8) { - /* "lxml/_elementpath.py":76 + /* "lxml/_elementpath.py":80 * if tag and tag[0] != "{": * if ":" in tag: * prefix, uri = tag.split(":", 1) # <<<<<<<<<<<<<< * try: * if not namespaces: */ - __Pyx_TraceLine(76,0,__PYX_ERR(0, 76, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_tag, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_tag, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 76, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { - PyObject* sequence = __pyx_t_5; + if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { + PyObject* sequence = __pyx_t_3; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 76, __pyx_L1_error) + __PYX_ERR(0, 80, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_1 = PyList_GET_ITEM(sequence, 0); - __pyx_t_4 = PyList_GET_ITEM(sequence, 1); + __pyx_t_5 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 76, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); #endif - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_9 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 76, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; index = 0; __pyx_t_1 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_1)) goto __pyx_L10_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); - index = 1; __pyx_t_4 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L10_unpacking_failed; - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 76, __pyx_L1_error) + index = 1; __pyx_t_5 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_5)) goto __pyx_L10_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 80, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L11_unpacking_done; @@ -2616,7 +2477,7 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_2generator(__pyx_CoroutineObject __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 76, __pyx_L1_error) + __PYX_ERR(0, 80, __pyx_L1_error) __pyx_L11_unpacking_done:; } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_prefix); @@ -2624,18 +2485,17 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_2generator(__pyx_CoroutineObject __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_uri); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_uri, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_uri, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; - /* "lxml/_elementpath.py":77 + /* "lxml/_elementpath.py":81 * if ":" in tag: * prefix, uri = tag.split(":", 1) * try: # <<<<<<<<<<<<<< * if not namespaces: * raise KeyError */ - __Pyx_TraceLine(77,0,__PYX_ERR(0, 77, __pyx_L12_error)) { __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); __Pyx_XGOTREF(__pyx_t_11); @@ -2643,30 +2503,28 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_2generator(__pyx_CoroutineObject __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { - /* "lxml/_elementpath.py":78 + /* "lxml/_elementpath.py":82 * prefix, uri = tag.split(":", 1) * try: * if not namespaces: # <<<<<<<<<<<<<< * raise KeyError * yield token[0], "{%s}%s" % (namespaces[prefix], uri) */ - __Pyx_TraceLine(78,0,__PYX_ERR(0, 78, __pyx_L12_error)) - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_namespaces); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 78, __pyx_L12_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_namespaces); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 82, __pyx_L12_error) __pyx_t_2 = ((!__pyx_t_8) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/_elementpath.py":79 + /* "lxml/_elementpath.py":83 * try: * if not namespaces: * raise KeyError # <<<<<<<<<<<<<< * yield token[0], "{%s}%s" % (namespaces[prefix], uri) * except KeyError: */ - __Pyx_TraceLine(79,0,__PYX_ERR(0, 79, __pyx_L12_error)) __Pyx_Raise(__pyx_builtin_KeyError, 0, 0, 0); - __PYX_ERR(0, 79, __pyx_L12_error) + __PYX_ERR(0, 83, __pyx_L12_error) - /* "lxml/_elementpath.py":78 + /* "lxml/_elementpath.py":82 * prefix, uri = tag.split(":", 1) * try: * if not namespaces: # <<<<<<<<<<<<<< @@ -2675,41 +2533,40 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_2generator(__pyx_CoroutineObject */ } - /* "lxml/_elementpath.py":80 + /* "lxml/_elementpath.py":84 * if not namespaces: * raise KeyError * yield token[0], "{%s}%s" % (namespaces[prefix], uri) # <<<<<<<<<<<<<< * except KeyError: * raise SyntaxError("prefix %r not found in prefix map" % prefix) */ - __Pyx_TraceLine(80,0,__PYX_ERR(0, 80, __pyx_L12_error)) - __pyx_t_5 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_token, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 80, __pyx_L12_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_token, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 84, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_cur_scope->__pyx_v_namespaces, __pyx_cur_scope->__pyx_v_prefix); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 84, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_cur_scope->__pyx_v_namespaces, __pyx_cur_scope->__pyx_v_prefix); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L12_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L12_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_uri); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_uri); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_v_uri); - __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L12_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 84, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L12_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5); + __pyx_t_3 = 0; __pyx_t_5 = 0; - __pyx_t_4 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; - __Pyx_XGIVEREF(__pyx_t_3); - __pyx_cur_scope->__pyx_t_0 = __pyx_t_3; + __Pyx_XGIVEREF(__pyx_t_4); + __pyx_cur_scope->__pyx_t_0 = __pyx_t_4; __pyx_cur_scope->__pyx_t_1 = __pyx_t_6; __pyx_cur_scope->__pyx_t_2 = __pyx_t_7; __Pyx_XGIVEREF(__pyx_t_11); @@ -2719,16 +2576,15 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_2generator(__pyx_CoroutineObject __Pyx_XGIVEREF(__pyx_t_13); __pyx_cur_scope->__pyx_t_5 = __pyx_t_13; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L21_resume_from_yield:; - __pyx_t_3 = __pyx_cur_scope->__pyx_t_0; + __pyx_t_4 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; - __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); __pyx_t_6 = __pyx_cur_scope->__pyx_t_1; __pyx_t_7 = __pyx_cur_scope->__pyx_t_2; __pyx_t_11 = __pyx_cur_scope->__pyx_t_3; @@ -2740,9 +2596,9 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_2generator(__pyx_CoroutineObject __pyx_t_13 = __pyx_cur_scope->__pyx_t_5; __pyx_cur_scope->__pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_t_13); - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 80, __pyx_L12_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 84, __pyx_L12_error) - /* "lxml/_elementpath.py":77 + /* "lxml/_elementpath.py":81 * if ":" in tag: * prefix, uri = tag.split(":", 1) * try: # <<<<<<<<<<<<<< @@ -2756,47 +2612,45 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_2generator(__pyx_CoroutineObject goto __pyx_L19_try_end; __pyx_L12_error:; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":81 + /* "lxml/_elementpath.py":85 * raise KeyError * yield token[0], "{%s}%s" % (namespaces[prefix], uri) * except KeyError: # <<<<<<<<<<<<<< * raise SyntaxError("prefix %r not found in prefix map" % prefix) * elif default_namespace: */ - __Pyx_TraceLine(81,0,__PYX_ERR(0, 81, __pyx_L14_except_error)) __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_14) { __Pyx_AddTraceback("lxml._elementpath.xpath_tokenizer", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 81, __pyx_L14_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_3) < 0) __PYX_ERR(0, 85, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_3); - /* "lxml/_elementpath.py":82 + /* "lxml/_elementpath.py":86 * yield token[0], "{%s}%s" % (namespaces[prefix], uri) * except KeyError: * raise SyntaxError("prefix %r not found in prefix map" % prefix) # <<<<<<<<<<<<<< * elif default_namespace: * yield token[0], "{%s}%s" % (default_namespace, tag) */ - __Pyx_TraceLine(82,0,__PYX_ERR(0, 82, __pyx_L14_except_error)) - __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_prefix_r_not_found_in_prefix_map, __pyx_cur_scope->__pyx_v_prefix); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 82, __pyx_L14_except_error) + __pyx_t_9 = __Pyx_PyString_FormatSafe(__pyx_kp_s_prefix_r_not_found_in_prefix_map, __pyx_cur_scope->__pyx_v_prefix); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 86, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_SyntaxError, __pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 82, __pyx_L14_except_error) + __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_SyntaxError, __pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 86, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_Raise(__pyx_t_15, 0, 0, 0); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - __PYX_ERR(0, 82, __pyx_L14_except_error) + __PYX_ERR(0, 86, __pyx_L14_except_error) } goto __pyx_L14_except_error; __pyx_L14_except_error:; - /* "lxml/_elementpath.py":77 + /* "lxml/_elementpath.py":81 * if ":" in tag: * prefix, uri = tag.split(":", 1) * try: # <<<<<<<<<<<<<< @@ -2811,7 +2665,7 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_2generator(__pyx_CoroutineObject __pyx_L19_try_end:; } - /* "lxml/_elementpath.py":75 + /* "lxml/_elementpath.py":79 * tag = token[1] * if tag and tag[0] != "{": * if ":" in tag: # <<<<<<<<<<<<<< @@ -2821,68 +2675,65 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_2generator(__pyx_CoroutineObject goto __pyx_L9; } - /* "lxml/_elementpath.py":83 + /* "lxml/_elementpath.py":87 * except KeyError: * raise SyntaxError("prefix %r not found in prefix map" % prefix) * elif default_namespace: # <<<<<<<<<<<<<< * yield token[0], "{%s}%s" % (default_namespace, tag) * else: */ - __Pyx_TraceLine(83,0,__PYX_ERR(0, 83, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_default_namespace); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 83, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_default_namespace); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 87, __pyx_L1_error) if (__pyx_t_2) { - /* "lxml/_elementpath.py":84 + /* "lxml/_elementpath.py":88 * raise SyntaxError("prefix %r not found in prefix map" % prefix) * elif default_namespace: * yield token[0], "{%s}%s" % (default_namespace, tag) # <<<<<<<<<<<<<< * else: * yield token */ - __Pyx_TraceLine(84,0,__PYX_ERR(0, 84, __pyx_L1_error)) - __pyx_t_5 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_token, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 84, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_token, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 88, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_default_namespace); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_default_namespace); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_cur_scope->__pyx_v_default_namespace); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_default_namespace); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_tag); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_tag); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_cur_scope->__pyx_v_tag); - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_cur_scope->__pyx_v_tag); + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 88, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); - __pyx_t_5 = 0; + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); + __pyx_t_3 = 0; __pyx_t_1 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; - __Pyx_XGIVEREF(__pyx_t_3); - __pyx_cur_scope->__pyx_t_0 = __pyx_t_3; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + __Pyx_XGIVEREF(__pyx_t_4); + __pyx_cur_scope->__pyx_t_0 = __pyx_t_4; __pyx_cur_scope->__pyx_t_1 = __pyx_t_6; __pyx_cur_scope->__pyx_t_2 = __pyx_t_7; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L24_resume_from_yield:; - __pyx_t_3 = __pyx_cur_scope->__pyx_t_0; + __pyx_t_4 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; - __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); __pyx_t_6 = __pyx_cur_scope->__pyx_t_1; __pyx_t_7 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 84, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 88, __pyx_L1_error) - /* "lxml/_elementpath.py":83 + /* "lxml/_elementpath.py":87 * except KeyError: * raise SyntaxError("prefix %r not found in prefix map" % prefix) * elif default_namespace: # <<<<<<<<<<<<<< @@ -2892,39 +2743,37 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_2generator(__pyx_CoroutineObject goto __pyx_L9; } - /* "lxml/_elementpath.py":86 + /* "lxml/_elementpath.py":90 * yield token[0], "{%s}%s" % (default_namespace, tag) * else: * yield token # <<<<<<<<<<<<<< * else: * yield token */ - __Pyx_TraceLine(86,0,__PYX_ERR(0, 86, __pyx_L1_error)) /*else*/ { __Pyx_INCREF(__pyx_cur_scope->__pyx_v_token); __pyx_r = __pyx_cur_scope->__pyx_v_token; - __Pyx_XGIVEREF(__pyx_t_3); - __pyx_cur_scope->__pyx_t_0 = __pyx_t_3; + __Pyx_XGIVEREF(__pyx_t_4); + __pyx_cur_scope->__pyx_t_0 = __pyx_t_4; __pyx_cur_scope->__pyx_t_1 = __pyx_t_6; __pyx_cur_scope->__pyx_t_2 = __pyx_t_7; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ __pyx_generator->resume_label = 3; return __pyx_r; __pyx_L25_resume_from_yield:; - __pyx_t_3 = __pyx_cur_scope->__pyx_t_0; + __pyx_t_4 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; - __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); __pyx_t_6 = __pyx_cur_scope->__pyx_t_1; __pyx_t_7 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 86, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 90, __pyx_L1_error) } __pyx_L9:; - /* "lxml/_elementpath.py":74 + /* "lxml/_elementpath.py":78 * for token in xpath_tokenizer_re.findall(pattern): * tag = token[1] * if tag and tag[0] != "{": # <<<<<<<<<<<<<< @@ -2934,51 +2783,48 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_2generator(__pyx_CoroutineObject goto __pyx_L6; } - /* "lxml/_elementpath.py":88 + /* "lxml/_elementpath.py":92 * yield token * else: * yield token # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(88,0,__PYX_ERR(0, 88, __pyx_L1_error)) /*else*/ { __Pyx_INCREF(__pyx_cur_scope->__pyx_v_token); __pyx_r = __pyx_cur_scope->__pyx_v_token; - __Pyx_XGIVEREF(__pyx_t_3); - __pyx_cur_scope->__pyx_t_0 = __pyx_t_3; + __Pyx_XGIVEREF(__pyx_t_4); + __pyx_cur_scope->__pyx_t_0 = __pyx_t_4; __pyx_cur_scope->__pyx_t_1 = __pyx_t_6; __pyx_cur_scope->__pyx_t_2 = __pyx_t_7; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ __pyx_generator->resume_label = 4; return __pyx_r; __pyx_L26_resume_from_yield:; - __pyx_t_3 = __pyx_cur_scope->__pyx_t_0; + __pyx_t_4 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; - __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); __pyx_t_6 = __pyx_cur_scope->__pyx_t_1; __pyx_t_7 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 88, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 92, __pyx_L1_error) } __pyx_L6:; - /* "lxml/_elementpath.py":72 + /* "lxml/_elementpath.py":76 * def xpath_tokenizer(pattern, namespaces=None): * default_namespace = namespaces.get(None) if namespaces else None * for token in xpath_tokenizer_re.findall(pattern): # <<<<<<<<<<<<<< * tag = token[1] * if tag and tag[0] != "{": */ - __Pyx_TraceLine(72,0,__PYX_ERR(0, 72, __pyx_L1_error)) } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "lxml/_elementpath.py":70 + /* "lxml/_elementpath.py":74 * ) * * def xpath_tokenizer(pattern, namespaces=None): # <<<<<<<<<<<<<< @@ -2999,15 +2845,16 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_2generator(__pyx_CoroutineObject __Pyx_AddTraceback("xpath_tokenizer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/_elementpath.py":91 +/* "lxml/_elementpath.py":95 * * * def prepare_child(next, token): # <<<<<<<<<<<<<< @@ -3017,7 +2864,7 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_2generator(__pyx_CoroutineObject /* Python wrapper */ static PyObject *__pyx_pw_4lxml_12_elementpath_4prepare_child(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_12_elementpath_4prepare_child = {"prepare_child", (PyCFunction)__pyx_pw_4lxml_12_elementpath_4prepare_child, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_12_elementpath_4prepare_child = {"prepare_child", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_12_elementpath_4prepare_child, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_12_elementpath_4prepare_child(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_next = 0; PyObject *__pyx_v_token = 0; @@ -3047,11 +2894,11 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_4prepare_child(PyObject *__pyx_se case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_token)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("prepare_child", 1, 2, 2, 1); __PYX_ERR(0, 91, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("prepare_child", 1, 2, 2, 1); __PYX_ERR(0, 95, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prepare_child") < 0)) __PYX_ERR(0, 91, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prepare_child") < 0)) __PYX_ERR(0, 95, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -3064,7 +2911,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_4prepare_child(PyObject *__pyx_se } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("prepare_child", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 91, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("prepare_child", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 95, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml._elementpath.prepare_child", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3078,7 +2925,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_4prepare_child(PyObject *__pyx_se } static PyObject *__pyx_gb_4lxml_12_elementpath_13prepare_child_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "lxml/_elementpath.py":93 +/* "lxml/_elementpath.py":97 * def prepare_child(next, token): * tag = token[1] * def select(result): # <<<<<<<<<<<<<< @@ -3109,7 +2956,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_child_select(PyObject * if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_2_select *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 93, __pyx_L1_error) + __PYX_ERR(0, 97, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -3120,7 +2967,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_child_select(PyObject * __Pyx_INCREF(__pyx_cur_scope->__pyx_v_result); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_result); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_12_elementpath_13prepare_child_2generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_select, __pyx_n_s_prepare_child_locals_select, __pyx_n_s_lxml__elementpath); if (unlikely(!gen)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_12_elementpath_13prepare_child_2generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_select, __pyx_n_s_prepare_child_locals_select, __pyx_n_s_lxml__elementpath); if (unlikely(!gen)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -3140,62 +2987,57 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_13prepare_child_2generator1(__pyx { struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_2_select *__pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_2_select *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - Py_ssize_t __pyx_t_8; - PyObject *(*__pyx_t_9)(PyObject *); + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("select", 0); - __Pyx_TraceCall("select", __pyx_f[0], 93, 0, __PYX_ERR(0, 93, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L8_resume_from_yield; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 93, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 97, __pyx_L1_error) - /* "lxml/_elementpath.py":94 + /* "lxml/_elementpath.py":98 * tag = token[1] * def select(result): * for elem in result: # <<<<<<<<<<<<<< * for e in elem.iterchildren(tag): * yield e */ - __Pyx_TraceLine(94,0,__PYX_ERR(0, 94, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_result)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_result)) { __pyx_t_1 = __pyx_cur_scope->__pyx_v_result; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 98, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_2 >= 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_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 98, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 98, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -3205,7 +3047,7 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_13prepare_child_2generator1(__pyx PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 94, __pyx_L1_error) + else __PYX_ERR(0, 98, __pyx_L1_error) } break; } @@ -3216,17 +3058,16 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_13prepare_child_2generator1(__pyx __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/_elementpath.py":95 + /* "lxml/_elementpath.py":99 * def select(result): * for elem in result: * for e in elem.iterchildren(tag): # <<<<<<<<<<<<<< * yield e * return select */ - __Pyx_TraceLine(95,0,__PYX_ERR(0, 95, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_elem, __pyx_n_s_iterchildren); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 95, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_elem, __pyx_n_s_iterchildren); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag)) { __Pyx_RaiseClosureNameError("tag"); __PYX_ERR(0, 95, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag)) { __Pyx_RaiseClosureNameError("tag"); __PYX_ERR(0, 99, __pyx_L1_error) } __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); @@ -3237,74 +3078,46 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_13prepare_child_2generator1(__pyx __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 95, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 95, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 95, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 95, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag); - PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 95, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { - __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0; - __pyx_t_9 = NULL; + __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; + __pyx_t_8 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 95, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_9 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 95, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 99, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { - if (likely(!__pyx_t_9)) { + if (likely(!__pyx_t_8)) { if (likely(PyList_CheckExact(__pyx_t_5))) { - if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_5)) break; + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 95, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 99, __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, 95, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { - if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break; + if (__pyx_t_7 >= 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, 95, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 99, __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, 95, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { - __pyx_t_4 = __pyx_t_9(__pyx_t_5); + __pyx_t_4 = __pyx_t_8(__pyx_t_5); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 95, __pyx_L1_error) + else __PYX_ERR(0, 99, __pyx_L1_error) } break; } @@ -3315,14 +3128,13 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_13prepare_child_2generator1(__pyx __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/_elementpath.py":96 + /* "lxml/_elementpath.py":100 * for elem in result: * for e in elem.iterchildren(tag): * yield e # <<<<<<<<<<<<<< * return select * */ - __Pyx_TraceLine(96,0,__PYX_ERR(0, 96, __pyx_L1_error)) __Pyx_INCREF(__pyx_cur_scope->__pyx_v_e); __pyx_r = __pyx_cur_scope->__pyx_v_e; __Pyx_XGIVEREF(__pyx_t_1); @@ -3331,10 +3143,9 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_13prepare_child_2generator1(__pyx __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; __Pyx_XGIVEREF(__pyx_t_5); __pyx_cur_scope->__pyx_t_3 = __pyx_t_5; - __pyx_cur_scope->__pyx_t_4 = __pyx_t_8; - __pyx_cur_scope->__pyx_t_5 = __pyx_t_9; + __pyx_cur_scope->__pyx_t_4 = __pyx_t_7; + __pyx_cur_scope->__pyx_t_5 = __pyx_t_8; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ @@ -3349,34 +3160,32 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_13prepare_child_2generator1(__pyx __pyx_t_5 = __pyx_cur_scope->__pyx_t_3; __pyx_cur_scope->__pyx_t_3 = 0; __Pyx_XGOTREF(__pyx_t_5); - __pyx_t_8 = __pyx_cur_scope->__pyx_t_4; - __pyx_t_9 = __pyx_cur_scope->__pyx_t_5; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_t_7 = __pyx_cur_scope->__pyx_t_4; + __pyx_t_8 = __pyx_cur_scope->__pyx_t_5; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 100, __pyx_L1_error) - /* "lxml/_elementpath.py":95 + /* "lxml/_elementpath.py":99 * def select(result): * for elem in result: * for e in elem.iterchildren(tag): # <<<<<<<<<<<<<< * yield e * return select */ - __Pyx_TraceLine(95,0,__PYX_ERR(0, 95, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/_elementpath.py":94 + /* "lxml/_elementpath.py":98 * tag = token[1] * def select(result): * for elem in result: # <<<<<<<<<<<<<< * for e in elem.iterchildren(tag): * yield e */ - __Pyx_TraceLine(94,0,__PYX_ERR(0, 94, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "lxml/_elementpath.py":93 + /* "lxml/_elementpath.py":97 * def prepare_child(next, token): * tag = token[1] * def select(result): # <<<<<<<<<<<<<< @@ -3392,19 +3201,19 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_13prepare_child_2generator1(__pyx __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("select", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/_elementpath.py":91 +/* "lxml/_elementpath.py":95 * * * def prepare_child(next, token): # <<<<<<<<<<<<<< @@ -3416,62 +3225,56 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_3prepare_child(CYTHON_UNUSED PyOb struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_1_prepare_child *__pyx_cur_scope; PyObject *__pyx_v_select = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__6) __Pyx_RefNannySetupContext("prepare_child", 0); __pyx_cur_scope = (struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_1_prepare_child *)__pyx_tp_new_4lxml_12_elementpath___pyx_scope_struct_1_prepare_child(__pyx_ptype_4lxml_12_elementpath___pyx_scope_struct_1_prepare_child, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_1_prepare_child *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 91, __pyx_L1_error) + __PYX_ERR(0, 95, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } - __Pyx_TraceCall("prepare_child", __pyx_f[0], 91, 0, __PYX_ERR(0, 91, __pyx_L1_error)); - /* "lxml/_elementpath.py":92 + /* "lxml/_elementpath.py":96 * * def prepare_child(next, token): * tag = token[1] # <<<<<<<<<<<<<< * def select(result): * for elem in result: */ - __Pyx_TraceLine(92,0,__PYX_ERR(0, 92, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_token, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_token, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_tag = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/_elementpath.py":93 + /* "lxml/_elementpath.py":97 * def prepare_child(next, token): * tag = token[1] * def select(result): # <<<<<<<<<<<<<< * for elem in result: * for e in elem.iterchildren(tag): */ - __Pyx_TraceLine(93,0,__PYX_ERR(0, 93, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_13prepare_child_1select, 0, __pyx_n_s_prepare_child_locals_select, ((PyObject*)__pyx_cur_scope), __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_13prepare_child_1select, 0, __pyx_n_s_prepare_child_locals_select, ((PyObject*)__pyx_cur_scope), __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_select = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/_elementpath.py":97 + /* "lxml/_elementpath.py":101 * for e in elem.iterchildren(tag): * yield e * return select # <<<<<<<<<<<<<< * * def prepare_star(next, token): */ - __Pyx_TraceLine(97,0,__PYX_ERR(0, 97, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_select); __pyx_r = __pyx_v_select; goto __pyx_L0; - /* "lxml/_elementpath.py":91 + /* "lxml/_elementpath.py":95 * * * def prepare_child(next, token): # <<<<<<<<<<<<<< @@ -3488,12 +3291,11 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_3prepare_child(CYTHON_UNUSED PyOb __Pyx_XDECREF(__pyx_v_select); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/_elementpath.py":99 +/* "lxml/_elementpath.py":103 * return select * * def prepare_star(next, token): # <<<<<<<<<<<<<< @@ -3503,7 +3305,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_3prepare_child(CYTHON_UNUSED PyOb /* Python wrapper */ static PyObject *__pyx_pw_4lxml_12_elementpath_6prepare_star(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_12_elementpath_6prepare_star = {"prepare_star", (PyCFunction)__pyx_pw_4lxml_12_elementpath_6prepare_star, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_12_elementpath_6prepare_star = {"prepare_star", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_12_elementpath_6prepare_star, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_12_elementpath_6prepare_star(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_next = 0; CYTHON_UNUSED PyObject *__pyx_v_token = 0; @@ -3533,11 +3335,11 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_6prepare_star(PyObject *__pyx_sel case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_token)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("prepare_star", 1, 2, 2, 1); __PYX_ERR(0, 99, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("prepare_star", 1, 2, 2, 1); __PYX_ERR(0, 103, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prepare_star") < 0)) __PYX_ERR(0, 99, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prepare_star") < 0)) __PYX_ERR(0, 103, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -3550,7 +3352,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_6prepare_star(PyObject *__pyx_sel } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("prepare_star", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 99, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("prepare_star", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 103, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml._elementpath.prepare_star", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3564,7 +3366,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_6prepare_star(PyObject *__pyx_sel } static PyObject *__pyx_gb_4lxml_12_elementpath_12prepare_star_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "lxml/_elementpath.py":100 +/* "lxml/_elementpath.py":104 * * def prepare_star(next, token): * def select(result): # <<<<<<<<<<<<<< @@ -3595,7 +3397,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_12prepare_star_select(CYTHON_UNUS if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_3_select *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 100, __pyx_L1_error) + __PYX_ERR(0, 104, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -3603,7 +3405,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_12prepare_star_select(CYTHON_UNUS __Pyx_INCREF(__pyx_cur_scope->__pyx_v_result); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_result); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_12_elementpath_12prepare_star_2generator2, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_select, __pyx_n_s_prepare_star_locals_select, __pyx_n_s_lxml__elementpath); if (unlikely(!gen)) __PYX_ERR(0, 100, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_12_elementpath_12prepare_star_2generator2, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_select, __pyx_n_s_prepare_star_locals_select, __pyx_n_s_lxml__elementpath); if (unlikely(!gen)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -3623,60 +3425,57 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_12prepare_star_2generator2(__pyx_ { struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_3_select *__pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_3_select *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - Py_ssize_t __pyx_t_6; - PyObject *(*__pyx_t_7)(PyObject *); + PyObject *__pyx_t_6 = NULL; + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("select", 0); - __Pyx_TraceCall("select", __pyx_f[0], 100, 0, __PYX_ERR(0, 100, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L8_resume_from_yield; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 100, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 104, __pyx_L1_error) - /* "lxml/_elementpath.py":101 + /* "lxml/_elementpath.py":105 * def prepare_star(next, token): * def select(result): * for elem in result: # <<<<<<<<<<<<<< * for e in elem.iterchildren('*'): * yield e */ - __Pyx_TraceLine(101,0,__PYX_ERR(0, 101, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_result)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_result)) { __pyx_t_1 = __pyx_cur_scope->__pyx_v_result; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 101, __pyx_L1_error) + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 105, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_2 >= 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_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 101, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 105, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 101, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 105, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -3686,7 +3485,7 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_12prepare_star_2generator2(__pyx_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 101, __pyx_L1_error) + else __PYX_ERR(0, 105, __pyx_L1_error) } break; } @@ -3697,84 +3496,93 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_12prepare_star_2generator2(__pyx_ __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/_elementpath.py":102 + /* "lxml/_elementpath.py":106 * def select(result): * for elem in result: * for e in elem.iterchildren('*'): # <<<<<<<<<<<<<< * yield e * return select */ - __Pyx_TraceLine(102,0,__PYX_ERR(0, 102, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_elem, __pyx_n_s_iterchildren); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_elem, __pyx_n_s_iterchildren); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { - __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; - __pyx_t_7 = NULL; - } else { - __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_kp_s__7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_s__7); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { + __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 106, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { - if (likely(!__pyx_t_7)) { - if (likely(PyList_CheckExact(__pyx_t_4))) { - if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_5))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 106, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 102, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); #endif } else { - if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break; + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 106, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 102, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); #endif } } else { - __pyx_t_5 = __pyx_t_7(__pyx_t_4); - if (unlikely(!__pyx_t_5)) { + __pyx_t_4 = __pyx_t_8(__pyx_t_5); + if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 102, __pyx_L1_error) + else __PYX_ERR(0, 106, __pyx_L1_error) } break; } - __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_4); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_e); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_e, __pyx_t_5); - __Pyx_GIVEREF(__pyx_t_5); - __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_e, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; - /* "lxml/_elementpath.py":103 + /* "lxml/_elementpath.py":107 * for elem in result: * for e in elem.iterchildren('*'): * yield e # <<<<<<<<<<<<<< * return select * */ - __Pyx_TraceLine(103,0,__PYX_ERR(0, 103, __pyx_L1_error)) __Pyx_INCREF(__pyx_cur_scope->__pyx_v_e); __pyx_r = __pyx_cur_scope->__pyx_v_e; __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; - __Pyx_XGIVEREF(__pyx_t_4); - __pyx_cur_scope->__pyx_t_3 = __pyx_t_4; - __pyx_cur_scope->__pyx_t_4 = __pyx_t_6; - __pyx_cur_scope->__pyx_t_5 = __pyx_t_7; + __Pyx_XGIVEREF(__pyx_t_5); + __pyx_cur_scope->__pyx_t_3 = __pyx_t_5; + __pyx_cur_scope->__pyx_t_4 = __pyx_t_7; + __pyx_cur_scope->__pyx_t_5 = __pyx_t_8; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ @@ -3786,37 +3594,35 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_12prepare_star_2generator2(__pyx_ __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; - __pyx_t_4 = __pyx_cur_scope->__pyx_t_3; + __pyx_t_5 = __pyx_cur_scope->__pyx_t_3; __pyx_cur_scope->__pyx_t_3 = 0; - __Pyx_XGOTREF(__pyx_t_4); - __pyx_t_6 = __pyx_cur_scope->__pyx_t_4; - __pyx_t_7 = __pyx_cur_scope->__pyx_t_5; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 103, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_5); + __pyx_t_7 = __pyx_cur_scope->__pyx_t_4; + __pyx_t_8 = __pyx_cur_scope->__pyx_t_5; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 107, __pyx_L1_error) - /* "lxml/_elementpath.py":102 + /* "lxml/_elementpath.py":106 * def select(result): * for elem in result: * for e in elem.iterchildren('*'): # <<<<<<<<<<<<<< * yield e * return select */ - __Pyx_TraceLine(102,0,__PYX_ERR(0, 102, __pyx_L1_error)) } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/_elementpath.py":101 + /* "lxml/_elementpath.py":105 * def prepare_star(next, token): * def select(result): * for elem in result: # <<<<<<<<<<<<<< * for e in elem.iterchildren('*'): * yield e */ - __Pyx_TraceLine(101,0,__PYX_ERR(0, 101, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "lxml/_elementpath.py":100 + /* "lxml/_elementpath.py":104 * * def prepare_star(next, token): * def select(result): # <<<<<<<<<<<<<< @@ -3831,18 +3637,20 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_12prepare_star_2generator2(__pyx_ __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("select", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/_elementpath.py":99 +/* "lxml/_elementpath.py":103 * return select * * def prepare_star(next, token): # <<<<<<<<<<<<<< @@ -3853,40 +3661,35 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_12prepare_star_2generator2(__pyx_ static PyObject *__pyx_pf_4lxml_12_elementpath_5prepare_star(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_next, CYTHON_UNUSED PyObject *__pyx_v_token) { PyObject *__pyx_v_select = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__11) __Pyx_RefNannySetupContext("prepare_star", 0); - __Pyx_TraceCall("prepare_star", __pyx_f[0], 99, 0, __PYX_ERR(0, 99, __pyx_L1_error)); - /* "lxml/_elementpath.py":100 + /* "lxml/_elementpath.py":104 * * def prepare_star(next, token): * def select(result): # <<<<<<<<<<<<<< * for elem in result: * for e in elem.iterchildren('*'): */ - __Pyx_TraceLine(100,0,__PYX_ERR(0, 100, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_12prepare_star_1select, 0, __pyx_n_s_prepare_star_locals_select, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__13)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_12prepare_star_1select, 0, __pyx_n_s_prepare_star_locals_select, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_select = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/_elementpath.py":104 + /* "lxml/_elementpath.py":108 * for e in elem.iterchildren('*'): * yield e * return select # <<<<<<<<<<<<<< * * def prepare_self(next, token): */ - __Pyx_TraceLine(104,0,__PYX_ERR(0, 104, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_select); __pyx_r = __pyx_v_select; goto __pyx_L0; - /* "lxml/_elementpath.py":99 + /* "lxml/_elementpath.py":103 * return select * * def prepare_star(next, token): # <<<<<<<<<<<<<< @@ -3902,12 +3705,11 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_5prepare_star(CYTHON_UNUSED PyObj __pyx_L0:; __Pyx_XDECREF(__pyx_v_select); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/_elementpath.py":106 +/* "lxml/_elementpath.py":110 * return select * * def prepare_self(next, token): # <<<<<<<<<<<<<< @@ -3917,7 +3719,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_5prepare_star(CYTHON_UNUSED PyObj /* Python wrapper */ static PyObject *__pyx_pw_4lxml_12_elementpath_8prepare_self(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_12_elementpath_8prepare_self = {"prepare_self", (PyCFunction)__pyx_pw_4lxml_12_elementpath_8prepare_self, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_12_elementpath_8prepare_self = {"prepare_self", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_12_elementpath_8prepare_self, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_12_elementpath_8prepare_self(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_next = 0; CYTHON_UNUSED PyObject *__pyx_v_token = 0; @@ -3947,11 +3749,11 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_8prepare_self(PyObject *__pyx_sel case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_token)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("prepare_self", 1, 2, 2, 1); __PYX_ERR(0, 106, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("prepare_self", 1, 2, 2, 1); __PYX_ERR(0, 110, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prepare_self") < 0)) __PYX_ERR(0, 106, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prepare_self") < 0)) __PYX_ERR(0, 110, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -3964,7 +3766,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_8prepare_self(PyObject *__pyx_sel } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("prepare_self", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 106, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("prepare_self", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 110, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml._elementpath.prepare_self", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3977,7 +3779,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_8prepare_self(PyObject *__pyx_sel return __pyx_r; } -/* "lxml/_elementpath.py":107 +/* "lxml/_elementpath.py":111 * * def prepare_self(next, token): * def select(result): # <<<<<<<<<<<<<< @@ -4001,25 +3803,22 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_12prepare_self_1select(PyObject * static PyObject *__pyx_pf_4lxml_12_elementpath_12prepare_self_select(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_result) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("select", 0); - __Pyx_TraceCall("select", __pyx_f[0], 107, 0, __PYX_ERR(0, 107, __pyx_L1_error)); - /* "lxml/_elementpath.py":108 + /* "lxml/_elementpath.py":112 * def prepare_self(next, token): * def select(result): * return result # <<<<<<<<<<<<<< * return select * */ - __Pyx_TraceLine(108,0,__PYX_ERR(0, 108, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "lxml/_elementpath.py":107 + /* "lxml/_elementpath.py":111 * * def prepare_self(next, token): * def select(result): # <<<<<<<<<<<<<< @@ -4028,17 +3827,13 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_12prepare_self_select(CYTHON_UNUS */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml._elementpath.prepare_self.select", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/_elementpath.py":106 +/* "lxml/_elementpath.py":110 * return select * * def prepare_self(next, token): # <<<<<<<<<<<<<< @@ -4049,40 +3844,35 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_12prepare_self_select(CYTHON_UNUS static PyObject *__pyx_pf_4lxml_12_elementpath_7prepare_self(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_next, CYTHON_UNUSED PyObject *__pyx_v_token) { PyObject *__pyx_v_select = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__14) __Pyx_RefNannySetupContext("prepare_self", 0); - __Pyx_TraceCall("prepare_self", __pyx_f[0], 106, 0, __PYX_ERR(0, 106, __pyx_L1_error)); - /* "lxml/_elementpath.py":107 + /* "lxml/_elementpath.py":111 * * def prepare_self(next, token): * def select(result): # <<<<<<<<<<<<<< * return result * return select */ - __Pyx_TraceLine(107,0,__PYX_ERR(0, 107, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_12prepare_self_1select, 0, __pyx_n_s_prepare_self_locals_select, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__16)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_12prepare_self_1select, 0, __pyx_n_s_prepare_self_locals_select, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_select = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/_elementpath.py":109 + /* "lxml/_elementpath.py":113 * def select(result): * return result * return select # <<<<<<<<<<<<<< * * def prepare_descendant(next, token): */ - __Pyx_TraceLine(109,0,__PYX_ERR(0, 109, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_select); __pyx_r = __pyx_v_select; goto __pyx_L0; - /* "lxml/_elementpath.py":106 + /* "lxml/_elementpath.py":110 * return select * * def prepare_self(next, token): # <<<<<<<<<<<<<< @@ -4098,12 +3888,11 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_7prepare_self(CYTHON_UNUSED PyObj __pyx_L0:; __Pyx_XDECREF(__pyx_v_select); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/_elementpath.py":111 +/* "lxml/_elementpath.py":115 * return select * * def prepare_descendant(next, token): # <<<<<<<<<<<<<< @@ -4113,7 +3902,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_7prepare_self(CYTHON_UNUSED PyObj /* Python wrapper */ static PyObject *__pyx_pw_4lxml_12_elementpath_10prepare_descendant(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_12_elementpath_10prepare_descendant = {"prepare_descendant", (PyCFunction)__pyx_pw_4lxml_12_elementpath_10prepare_descendant, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_12_elementpath_10prepare_descendant = {"prepare_descendant", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_12_elementpath_10prepare_descendant, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_12_elementpath_10prepare_descendant(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_next = 0; PyObject *__pyx_v_token = 0; @@ -4143,11 +3932,11 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_10prepare_descendant(PyObject *__ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_token)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("prepare_descendant", 1, 2, 2, 1); __PYX_ERR(0, 111, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("prepare_descendant", 1, 2, 2, 1); __PYX_ERR(0, 115, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prepare_descendant") < 0)) __PYX_ERR(0, 111, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prepare_descendant") < 0)) __PYX_ERR(0, 115, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -4160,7 +3949,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_10prepare_descendant(PyObject *__ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("prepare_descendant", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 111, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("prepare_descendant", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 115, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml._elementpath.prepare_descendant", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -4174,7 +3963,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_10prepare_descendant(PyObject *__ } static PyObject *__pyx_gb_4lxml_12_elementpath_18prepare_descendant_2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "lxml/_elementpath.py":119 +/* "lxml/_elementpath.py":123 * else: * raise SyntaxError("invalid descendant") * def select(result): # <<<<<<<<<<<<<< @@ -4205,7 +3994,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_18prepare_descendant_select(PyObj if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_5_select *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 119, __pyx_L1_error) + __PYX_ERR(0, 123, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -4216,7 +4005,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_18prepare_descendant_select(PyObj __Pyx_INCREF(__pyx_cur_scope->__pyx_v_result); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_result); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_12_elementpath_18prepare_descendant_2generator3, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_select, __pyx_n_s_prepare_descendant_locals_select, __pyx_n_s_lxml__elementpath); if (unlikely(!gen)) __PYX_ERR(0, 119, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_12_elementpath_18prepare_descendant_2generator3, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_select, __pyx_n_s_prepare_descendant_locals_select, __pyx_n_s_lxml__elementpath); if (unlikely(!gen)) __PYX_ERR(0, 123, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -4236,62 +4025,57 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_18prepare_descendant_2generator3( { struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_5_select *__pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_5_select *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - Py_ssize_t __pyx_t_8; - PyObject *(*__pyx_t_9)(PyObject *); + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("select", 0); - __Pyx_TraceCall("select", __pyx_f[0], 119, 0, __PYX_ERR(0, 119, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L8_resume_from_yield; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 119, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 123, __pyx_L1_error) - /* "lxml/_elementpath.py":120 + /* "lxml/_elementpath.py":124 * raise SyntaxError("invalid descendant") * def select(result): * for elem in result: # <<<<<<<<<<<<<< * for e in elem.iterdescendants(tag): * yield e */ - __Pyx_TraceLine(120,0,__PYX_ERR(0, 120, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_result)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_result)) { __pyx_t_1 = __pyx_cur_scope->__pyx_v_result; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 124, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_2 >= 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_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 124, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 124, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -4301,7 +4085,7 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_18prepare_descendant_2generator3( PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 120, __pyx_L1_error) + else __PYX_ERR(0, 124, __pyx_L1_error) } break; } @@ -4312,17 +4096,16 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_18prepare_descendant_2generator3( __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/_elementpath.py":121 + /* "lxml/_elementpath.py":125 * def select(result): * for elem in result: * for e in elem.iterdescendants(tag): # <<<<<<<<<<<<<< * yield e * return select */ - __Pyx_TraceLine(121,0,__PYX_ERR(0, 121, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_elem, __pyx_n_s_iterdescendants); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_elem, __pyx_n_s_iterdescendants); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag)) { __Pyx_RaiseClosureNameError("tag"); __PYX_ERR(0, 121, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag)) { __Pyx_RaiseClosureNameError("tag"); __PYX_ERR(0, 125, __pyx_L1_error) } __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); @@ -4333,74 +4116,46 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_18prepare_descendant_2generator3( __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 121, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 121, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 121, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 121, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag); - PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 121, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { - __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0; - __pyx_t_9 = NULL; + __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; + __pyx_t_8 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_9 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 125, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { - if (likely(!__pyx_t_9)) { + if (likely(!__pyx_t_8)) { if (likely(PyList_CheckExact(__pyx_t_5))) { - if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_5)) break; + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 125, __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, 121, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { - if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break; + if (__pyx_t_7 >= 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, 121, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 125, __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, 121, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { - __pyx_t_4 = __pyx_t_9(__pyx_t_5); + __pyx_t_4 = __pyx_t_8(__pyx_t_5); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 121, __pyx_L1_error) + else __PYX_ERR(0, 125, __pyx_L1_error) } break; } @@ -4411,14 +4166,13 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_18prepare_descendant_2generator3( __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/_elementpath.py":122 + /* "lxml/_elementpath.py":126 * for elem in result: * for e in elem.iterdescendants(tag): * yield e # <<<<<<<<<<<<<< * return select * */ - __Pyx_TraceLine(122,0,__PYX_ERR(0, 122, __pyx_L1_error)) __Pyx_INCREF(__pyx_cur_scope->__pyx_v_e); __pyx_r = __pyx_cur_scope->__pyx_v_e; __Pyx_XGIVEREF(__pyx_t_1); @@ -4427,10 +4181,9 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_18prepare_descendant_2generator3( __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; __Pyx_XGIVEREF(__pyx_t_5); __pyx_cur_scope->__pyx_t_3 = __pyx_t_5; - __pyx_cur_scope->__pyx_t_4 = __pyx_t_8; - __pyx_cur_scope->__pyx_t_5 = __pyx_t_9; + __pyx_cur_scope->__pyx_t_4 = __pyx_t_7; + __pyx_cur_scope->__pyx_t_5 = __pyx_t_8; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ @@ -4445,34 +4198,32 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_18prepare_descendant_2generator3( __pyx_t_5 = __pyx_cur_scope->__pyx_t_3; __pyx_cur_scope->__pyx_t_3 = 0; __Pyx_XGOTREF(__pyx_t_5); - __pyx_t_8 = __pyx_cur_scope->__pyx_t_4; - __pyx_t_9 = __pyx_cur_scope->__pyx_t_5; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_t_7 = __pyx_cur_scope->__pyx_t_4; + __pyx_t_8 = __pyx_cur_scope->__pyx_t_5; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 126, __pyx_L1_error) - /* "lxml/_elementpath.py":121 + /* "lxml/_elementpath.py":125 * def select(result): * for elem in result: * for e in elem.iterdescendants(tag): # <<<<<<<<<<<<<< * yield e * return select */ - __Pyx_TraceLine(121,0,__PYX_ERR(0, 121, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/_elementpath.py":120 + /* "lxml/_elementpath.py":124 * raise SyntaxError("invalid descendant") * def select(result): * for elem in result: # <<<<<<<<<<<<<< * for e in elem.iterdescendants(tag): * yield e */ - __Pyx_TraceLine(120,0,__PYX_ERR(0, 120, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "lxml/_elementpath.py":119 + /* "lxml/_elementpath.py":123 * else: * raise SyntaxError("invalid descendant") * def select(result): # <<<<<<<<<<<<<< @@ -4488,19 +4239,19 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_18prepare_descendant_2generator3( __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("select", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/_elementpath.py":111 +/* "lxml/_elementpath.py":115 * return select * * def prepare_descendant(next, token): # <<<<<<<<<<<<<< @@ -4512,34 +4263,30 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_9prepare_descendant(CYTHON_UNUSED struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_4_prepare_descendant *__pyx_cur_scope; PyObject *__pyx_v_select = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; - __Pyx_TraceFrameInit(__pyx_codeobj__17) __Pyx_RefNannySetupContext("prepare_descendant", 0); __pyx_cur_scope = (struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_4_prepare_descendant *)__pyx_tp_new_4lxml_12_elementpath___pyx_scope_struct_4_prepare_descendant(__pyx_ptype_4lxml_12_elementpath___pyx_scope_struct_4_prepare_descendant, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_4_prepare_descendant *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 111, __pyx_L1_error) + __PYX_ERR(0, 115, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } - __Pyx_TraceCall("prepare_descendant", __pyx_f[0], 111, 0, __PYX_ERR(0, 111, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_token); - /* "lxml/_elementpath.py":112 + /* "lxml/_elementpath.py":116 * * def prepare_descendant(next, token): * token = next() # <<<<<<<<<<<<<< * if token[0] == "*": * tag = "*" */ - __Pyx_TraceLine(112,0,__PYX_ERR(0, 112, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_next); __pyx_t_2 = __pyx_v_next; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -4551,44 +4298,39 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_9prepare_descendant(CYTHON_UNUSED __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) - } + __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, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_token, __pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":113 + /* "lxml/_elementpath.py":117 * def prepare_descendant(next, token): * token = next() * if token[0] == "*": # <<<<<<<<<<<<<< * tag = "*" * elif not token[0]: */ - __Pyx_TraceLine(113,0,__PYX_ERR(0, 113, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_token, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_token, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__9, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 113, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__7, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { - /* "lxml/_elementpath.py":114 + /* "lxml/_elementpath.py":118 * token = next() * if token[0] == "*": * tag = "*" # <<<<<<<<<<<<<< * elif not token[0]: * tag = token[1] */ - __Pyx_TraceLine(114,0,__PYX_ERR(0, 114, __pyx_L1_error)) - __Pyx_INCREF(__pyx_kp_s__9); - __Pyx_GIVEREF(__pyx_kp_s__9); - __pyx_cur_scope->__pyx_v_tag = __pyx_kp_s__9; + __Pyx_INCREF(__pyx_kp_s__7); + __Pyx_GIVEREF(__pyx_kp_s__7); + __pyx_cur_scope->__pyx_v_tag = __pyx_kp_s__7; - /* "lxml/_elementpath.py":113 + /* "lxml/_elementpath.py":117 * def prepare_descendant(next, token): * token = next() * if token[0] == "*": # <<<<<<<<<<<<<< @@ -4598,36 +4340,34 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_9prepare_descendant(CYTHON_UNUSED goto __pyx_L3; } - /* "lxml/_elementpath.py":115 + /* "lxml/_elementpath.py":119 * if token[0] == "*": * tag = "*" * elif not token[0]: # <<<<<<<<<<<<<< * tag = token[1] * else: */ - __Pyx_TraceLine(115,0,__PYX_ERR(0, 115, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_token, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_token, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = ((!__pyx_t_4) != 0); if (likely(__pyx_t_5)) { - /* "lxml/_elementpath.py":116 + /* "lxml/_elementpath.py":120 * tag = "*" * elif not token[0]: * tag = token[1] # <<<<<<<<<<<<<< * else: * raise SyntaxError("invalid descendant") */ - __Pyx_TraceLine(116,0,__PYX_ERR(0, 116, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_token, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_token, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_tag = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/_elementpath.py":115 + /* "lxml/_elementpath.py":119 * if token[0] == "*": * tag = "*" * elif not token[0]: # <<<<<<<<<<<<<< @@ -4637,50 +4377,47 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_9prepare_descendant(CYTHON_UNUSED goto __pyx_L3; } - /* "lxml/_elementpath.py":118 + /* "lxml/_elementpath.py":122 * tag = token[1] * else: * raise SyntaxError("invalid descendant") # <<<<<<<<<<<<<< * def select(result): * for elem in result: */ - __Pyx_TraceLine(118,0,__PYX_ERR(0, 118, __pyx_L1_error)) /*else*/ { - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_SyntaxError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_SyntaxError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 118, __pyx_L1_error) + __PYX_ERR(0, 122, __pyx_L1_error) } __pyx_L3:; - /* "lxml/_elementpath.py":119 + /* "lxml/_elementpath.py":123 * else: * raise SyntaxError("invalid descendant") * def select(result): # <<<<<<<<<<<<<< * for elem in result: * for e in elem.iterdescendants(tag): */ - __Pyx_TraceLine(119,0,__PYX_ERR(0, 119, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_18prepare_descendant_1select, 0, __pyx_n_s_prepare_descendant_locals_select, ((PyObject*)__pyx_cur_scope), __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__20)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_18prepare_descendant_1select, 0, __pyx_n_s_prepare_descendant_locals_select, ((PyObject*)__pyx_cur_scope), __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__14)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_select = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/_elementpath.py":123 + /* "lxml/_elementpath.py":127 * for e in elem.iterdescendants(tag): * yield e * return select # <<<<<<<<<<<<<< * * def prepare_parent(next, token): */ - __Pyx_TraceLine(123,0,__PYX_ERR(0, 123, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_select); __pyx_r = __pyx_v_select; goto __pyx_L0; - /* "lxml/_elementpath.py":111 + /* "lxml/_elementpath.py":115 * return select * * def prepare_descendant(next, token): # <<<<<<<<<<<<<< @@ -4700,12 +4437,11 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_9prepare_descendant(CYTHON_UNUSED __Pyx_XDECREF(__pyx_v_token); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/_elementpath.py":125 +/* "lxml/_elementpath.py":129 * return select * * def prepare_parent(next, token): # <<<<<<<<<<<<<< @@ -4715,7 +4451,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_9prepare_descendant(CYTHON_UNUSED /* Python wrapper */ static PyObject *__pyx_pw_4lxml_12_elementpath_12prepare_parent(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_12_elementpath_12prepare_parent = {"prepare_parent", (PyCFunction)__pyx_pw_4lxml_12_elementpath_12prepare_parent, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_12_elementpath_12prepare_parent = {"prepare_parent", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_12_elementpath_12prepare_parent, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_12_elementpath_12prepare_parent(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_next = 0; CYTHON_UNUSED PyObject *__pyx_v_token = 0; @@ -4745,11 +4481,11 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_12prepare_parent(PyObject *__pyx_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_token)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("prepare_parent", 1, 2, 2, 1); __PYX_ERR(0, 125, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("prepare_parent", 1, 2, 2, 1); __PYX_ERR(0, 129, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prepare_parent") < 0)) __PYX_ERR(0, 125, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prepare_parent") < 0)) __PYX_ERR(0, 129, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -4762,7 +4498,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_12prepare_parent(PyObject *__pyx_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("prepare_parent", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 125, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("prepare_parent", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 129, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml._elementpath.prepare_parent", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -4776,7 +4512,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_12prepare_parent(PyObject *__pyx_ } static PyObject *__pyx_gb_4lxml_12_elementpath_14prepare_parent_2generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "lxml/_elementpath.py":126 +/* "lxml/_elementpath.py":130 * * def prepare_parent(next, token): * def select(result): # <<<<<<<<<<<<<< @@ -4807,7 +4543,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_14prepare_parent_select(CYTHON_UN if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_6_select *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 126, __pyx_L1_error) + __PYX_ERR(0, 130, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -4815,7 +4551,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_14prepare_parent_select(CYTHON_UN __Pyx_INCREF(__pyx_cur_scope->__pyx_v_result); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_result); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_12_elementpath_14prepare_parent_2generator4, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_select, __pyx_n_s_prepare_parent_locals_select, __pyx_n_s_lxml__elementpath); if (unlikely(!gen)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_12_elementpath_14prepare_parent_2generator4, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_select, __pyx_n_s_prepare_parent_locals_select, __pyx_n_s_lxml__elementpath); if (unlikely(!gen)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -4835,7 +4571,6 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_14prepare_parent_2generator4(__py { struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_6_select *__pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_6_select *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); @@ -4846,50 +4581,47 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_14prepare_parent_2generator4(__py int __pyx_t_8; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("select", 0); - __Pyx_TraceCall("select", __pyx_f[0], 126, 0, __PYX_ERR(0, 126, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L7_resume_from_yield; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 126, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 130, __pyx_L1_error) - /* "lxml/_elementpath.py":127 + /* "lxml/_elementpath.py":131 * def prepare_parent(next, token): * def select(result): * for elem in result: # <<<<<<<<<<<<<< * parent = elem.getparent() * if parent is not None: */ - __Pyx_TraceLine(127,0,__PYX_ERR(0, 127, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_result)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_result)) { __pyx_t_1 = __pyx_cur_scope->__pyx_v_result; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_2 >= 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_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 131, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 131, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -4899,7 +4631,7 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_14prepare_parent_2generator4(__py PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 127, __pyx_L1_error) + else __PYX_ERR(0, 131, __pyx_L1_error) } break; } @@ -4910,15 +4642,14 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_14prepare_parent_2generator4(__py __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/_elementpath.py":128 + /* "lxml/_elementpath.py":132 * def select(result): * for elem in result: * parent = elem.getparent() # <<<<<<<<<<<<<< * if parent is not None: * yield parent */ - __Pyx_TraceLine(128,0,__PYX_ERR(0, 128, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_elem, __pyx_n_s_getparent); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_elem, __pyx_n_s_getparent); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -4930,12 +4661,9 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_14prepare_parent_2generator4(__py __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 128, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 128, __pyx_L1_error) - } + __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, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_parent); @@ -4943,26 +4671,24 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_14prepare_parent_2generator4(__py __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/_elementpath.py":129 + /* "lxml/_elementpath.py":133 * for elem in result: * parent = elem.getparent() * if parent is not None: # <<<<<<<<<<<<<< * yield parent * return select */ - __Pyx_TraceLine(129,0,__PYX_ERR(0, 129, __pyx_L1_error)) __pyx_t_7 = (__pyx_cur_scope->__pyx_v_parent != Py_None); __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { - /* "lxml/_elementpath.py":130 + /* "lxml/_elementpath.py":134 * parent = elem.getparent() * if parent is not None: * yield parent # <<<<<<<<<<<<<< * return select * */ - __Pyx_TraceLine(130,0,__PYX_ERR(0, 130, __pyx_L1_error)) __Pyx_INCREF(__pyx_cur_scope->__pyx_v_parent); __pyx_r = __pyx_cur_scope->__pyx_v_parent; __Pyx_XGIVEREF(__pyx_t_1); @@ -4970,7 +4696,6 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_14prepare_parent_2generator4(__py __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ @@ -4982,9 +4707,9 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_14prepare_parent_2generator4(__py __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 130, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 134, __pyx_L1_error) - /* "lxml/_elementpath.py":129 + /* "lxml/_elementpath.py":133 * for elem in result: * parent = elem.getparent() * if parent is not None: # <<<<<<<<<<<<<< @@ -4993,19 +4718,18 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_14prepare_parent_2generator4(__py */ } - /* "lxml/_elementpath.py":127 + /* "lxml/_elementpath.py":131 * def prepare_parent(next, token): * def select(result): * for elem in result: # <<<<<<<<<<<<<< * parent = elem.getparent() * if parent is not None: */ - __Pyx_TraceLine(127,0,__PYX_ERR(0, 127, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "lxml/_elementpath.py":126 + /* "lxml/_elementpath.py":130 * * def prepare_parent(next, token): * def select(result): # <<<<<<<<<<<<<< @@ -5024,15 +4748,16 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_14prepare_parent_2generator4(__py __Pyx_AddTraceback("select", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/_elementpath.py":125 +/* "lxml/_elementpath.py":129 * return select * * def prepare_parent(next, token): # <<<<<<<<<<<<<< @@ -5043,40 +4768,35 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_14prepare_parent_2generator4(__py static PyObject *__pyx_pf_4lxml_12_elementpath_11prepare_parent(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_next, CYTHON_UNUSED PyObject *__pyx_v_token) { PyObject *__pyx_v_select = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__21) __Pyx_RefNannySetupContext("prepare_parent", 0); - __Pyx_TraceCall("prepare_parent", __pyx_f[0], 125, 0, __PYX_ERR(0, 125, __pyx_L1_error)); - /* "lxml/_elementpath.py":126 + /* "lxml/_elementpath.py":130 * * def prepare_parent(next, token): * def select(result): # <<<<<<<<<<<<<< * for elem in result: * parent = elem.getparent() */ - __Pyx_TraceLine(126,0,__PYX_ERR(0, 126, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_14prepare_parent_1select, 0, __pyx_n_s_prepare_parent_locals_select, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_14prepare_parent_1select, 0, __pyx_n_s_prepare_parent_locals_select, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__16)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_select = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/_elementpath.py":131 + /* "lxml/_elementpath.py":135 * if parent is not None: * yield parent * return select # <<<<<<<<<<<<<< * * def prepare_predicate(next, token): */ - __Pyx_TraceLine(131,0,__PYX_ERR(0, 131, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_select); __pyx_r = __pyx_v_select; goto __pyx_L0; - /* "lxml/_elementpath.py":125 + /* "lxml/_elementpath.py":129 * return select * * def prepare_parent(next, token): # <<<<<<<<<<<<<< @@ -5092,12 +4812,11 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_11prepare_parent(CYTHON_UNUSED Py __pyx_L0:; __Pyx_XDECREF(__pyx_v_select); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/_elementpath.py":133 +/* "lxml/_elementpath.py":137 * return select * * def prepare_predicate(next, token): # <<<<<<<<<<<<<< @@ -5107,7 +4826,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_11prepare_parent(CYTHON_UNUSED Py /* Python wrapper */ static PyObject *__pyx_pw_4lxml_12_elementpath_14prepare_predicate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_12_elementpath_14prepare_predicate = {"prepare_predicate", (PyCFunction)__pyx_pw_4lxml_12_elementpath_14prepare_predicate, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_12_elementpath_14prepare_predicate = {"prepare_predicate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_12_elementpath_14prepare_predicate, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_12_elementpath_14prepare_predicate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_next = 0; PyObject *__pyx_v_token = 0; @@ -5137,11 +4856,11 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_14prepare_predicate(PyObject *__p case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_token)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("prepare_predicate", 1, 2, 2, 1); __PYX_ERR(0, 133, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("prepare_predicate", 1, 2, 2, 1); __PYX_ERR(0, 137, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prepare_predicate") < 0)) __PYX_ERR(0, 133, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prepare_predicate") < 0)) __PYX_ERR(0, 137, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -5154,7 +4873,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_14prepare_predicate(PyObject *__p } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("prepare_predicate", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 133, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("prepare_predicate", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 137, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml._elementpath.prepare_predicate", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -5168,7 +4887,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_14prepare_predicate(PyObject *__p } static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_2generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "lxml/_elementpath.py":155 +/* "lxml/_elementpath.py":159 * # [@attribute] predicate * key = predicate[1] * def select(result): # <<<<<<<<<<<<<< @@ -5199,7 +4918,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_17prepare_predicate_select(PyObje if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_8_select *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 155, __pyx_L1_error) + __PYX_ERR(0, 159, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -5210,7 +4929,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_17prepare_predicate_select(PyObje __Pyx_INCREF(__pyx_cur_scope->__pyx_v_result); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_result); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_12_elementpath_17prepare_predicate_2generator5, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_select, __pyx_n_s_prepare_predicate_locals_select, __pyx_n_s_lxml__elementpath); if (unlikely(!gen)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_12_elementpath_17prepare_predicate_2generator5, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_select, __pyx_n_s_prepare_predicate_locals_select, __pyx_n_s_lxml__elementpath); if (unlikely(!gen)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -5230,62 +4949,57 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_2generator5(_ { struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_8_select *__pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_8_select *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; + int __pyx_t_7; int __pyx_t_8; - int __pyx_t_9; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("select", 0); - __Pyx_TraceCall("select", __pyx_f[0], 155, 0, __PYX_ERR(0, 155, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L7_resume_from_yield; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 155, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 159, __pyx_L1_error) - /* "lxml/_elementpath.py":156 + /* "lxml/_elementpath.py":160 * key = predicate[1] * def select(result): * for elem in result: # <<<<<<<<<<<<<< * if elem.get(key) is not None: * yield elem */ - __Pyx_TraceLine(156,0,__PYX_ERR(0, 156, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_result)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_result)) { __pyx_t_1 = __pyx_cur_scope->__pyx_v_result; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error) + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_2 >= 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_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 156, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 160, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 156, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 156, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 160, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 156, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -5295,7 +5009,7 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_2generator5(_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 156, __pyx_L1_error) + else __PYX_ERR(0, 160, __pyx_L1_error) } break; } @@ -5306,17 +5020,16 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_2generator5(_ __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/_elementpath.py":157 + /* "lxml/_elementpath.py":161 * def select(result): * for elem in result: * if elem.get(key) is not None: # <<<<<<<<<<<<<< * yield elem * return select */ - __Pyx_TraceLine(157,0,__PYX_ERR(0, 157, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_elem, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 157, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_elem, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 157, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 161, __pyx_L1_error) } __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); @@ -5327,52 +5040,23 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_2generator5(_ __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_key}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_key}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 157, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key); - PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_key); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_key); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = (__pyx_t_4 != Py_None); + __pyx_t_7 = (__pyx_t_4 != Py_None); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_9 = (__pyx_t_8 != 0); - if (__pyx_t_9) { + __pyx_t_8 = (__pyx_t_7 != 0); + if (__pyx_t_8) { - /* "lxml/_elementpath.py":158 + /* "lxml/_elementpath.py":162 * for elem in result: * if elem.get(key) is not None: * yield elem # <<<<<<<<<<<<<< * return select * if signature == "@-='": */ - __Pyx_TraceLine(158,0,__PYX_ERR(0, 158, __pyx_L1_error)) __Pyx_INCREF(__pyx_cur_scope->__pyx_v_elem); __pyx_r = __pyx_cur_scope->__pyx_v_elem; __Pyx_XGIVEREF(__pyx_t_1); @@ -5380,7 +5064,6 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_2generator5(_ __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ @@ -5392,9 +5075,9 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_2generator5(_ __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 158, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 162, __pyx_L1_error) - /* "lxml/_elementpath.py":157 + /* "lxml/_elementpath.py":161 * def select(result): * for elem in result: * if elem.get(key) is not None: # <<<<<<<<<<<<<< @@ -5403,19 +5086,18 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_2generator5(_ */ } - /* "lxml/_elementpath.py":156 + /* "lxml/_elementpath.py":160 * key = predicate[1] * def select(result): * for elem in result: # <<<<<<<<<<<<<< * if elem.get(key) is not None: * yield elem */ - __Pyx_TraceLine(156,0,__PYX_ERR(0, 156, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "lxml/_elementpath.py":155 + /* "lxml/_elementpath.py":159 * # [@attribute] predicate * key = predicate[1] * def select(result): # <<<<<<<<<<<<<< @@ -5431,20 +5113,20 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_2generator5(_ __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("select", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_5generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "lxml/_elementpath.py":164 +/* "lxml/_elementpath.py":168 * key = predicate[1] * value = predicate[-1] * def select(result): # <<<<<<<<<<<<<< @@ -5475,7 +5157,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_17prepare_predicate_3select(PyObj if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_9_select *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 164, __pyx_L1_error) + __PYX_ERR(0, 168, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -5486,7 +5168,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_17prepare_predicate_3select(PyObj __Pyx_INCREF(__pyx_cur_scope->__pyx_v_result); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_result); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_12_elementpath_17prepare_predicate_5generator6, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_select, __pyx_n_s_prepare_predicate_locals_select, __pyx_n_s_lxml__elementpath); if (unlikely(!gen)) __PYX_ERR(0, 164, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_12_elementpath_17prepare_predicate_5generator6, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_select, __pyx_n_s_prepare_predicate_locals_select, __pyx_n_s_lxml__elementpath); if (unlikely(!gen)) __PYX_ERR(0, 168, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -5506,61 +5188,56 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_5generator6(_ { struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_9_select *__pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_9_select *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - int __pyx_t_8; + int __pyx_t_7; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("select", 0); - __Pyx_TraceCall("select", __pyx_f[0], 164, 0, __PYX_ERR(0, 164, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L7_resume_from_yield; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 164, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 168, __pyx_L1_error) - /* "lxml/_elementpath.py":165 + /* "lxml/_elementpath.py":169 * value = predicate[-1] * def select(result): * for elem in result: # <<<<<<<<<<<<<< * if elem.get(key) == value: * yield elem */ - __Pyx_TraceLine(165,0,__PYX_ERR(0, 165, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_result)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_result)) { __pyx_t_1 = __pyx_cur_scope->__pyx_v_result; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error) + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_2 >= 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_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 165, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 169, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 165, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 169, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -5570,7 +5247,7 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_5generator6(_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 165, __pyx_L1_error) + else __PYX_ERR(0, 169, __pyx_L1_error) } break; } @@ -5581,17 +5258,16 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_5generator6(_ __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/_elementpath.py":166 + /* "lxml/_elementpath.py":170 * def select(result): * for elem in result: * if elem.get(key) == value: # <<<<<<<<<<<<<< * yield elem * return select */ - __Pyx_TraceLine(166,0,__PYX_ERR(0, 166, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_elem, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 166, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_elem, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 166, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 170, __pyx_L1_error) } __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); @@ -5602,54 +5278,25 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_5generator6(_ __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 166, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_key}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 166, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_key}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 166, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 166, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key); - PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_key); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 166, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_key); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 170, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value)) { __Pyx_RaiseClosureNameError("value"); __PYX_ERR(0, 166, __pyx_L1_error) } - __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_value, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 166, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value)) { __Pyx_RaiseClosureNameError("value"); __PYX_ERR(0, 170, __pyx_L1_error) } + __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_value, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 170, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 166, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 170, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_8) { + if (__pyx_t_7) { - /* "lxml/_elementpath.py":167 + /* "lxml/_elementpath.py":171 * for elem in result: * if elem.get(key) == value: * yield elem # <<<<<<<<<<<<<< * return select * if signature == "-" and not re.match(r"-?\d+$", predicate[0]): */ - __Pyx_TraceLine(167,0,__PYX_ERR(0, 167, __pyx_L1_error)) __Pyx_INCREF(__pyx_cur_scope->__pyx_v_elem); __pyx_r = __pyx_cur_scope->__pyx_v_elem; __Pyx_XGIVEREF(__pyx_t_1); @@ -5657,7 +5304,6 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_5generator6(_ __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ @@ -5669,9 +5315,9 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_5generator6(_ __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 167, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 171, __pyx_L1_error) - /* "lxml/_elementpath.py":166 + /* "lxml/_elementpath.py":170 * def select(result): * for elem in result: * if elem.get(key) == value: # <<<<<<<<<<<<<< @@ -5680,19 +5326,18 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_5generator6(_ */ } - /* "lxml/_elementpath.py":165 + /* "lxml/_elementpath.py":169 * value = predicate[-1] * def select(result): * for elem in result: # <<<<<<<<<<<<<< * if elem.get(key) == value: * yield elem */ - __Pyx_TraceLine(165,0,__PYX_ERR(0, 165, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "lxml/_elementpath.py":164 + /* "lxml/_elementpath.py":168 * key = predicate[1] * value = predicate[-1] * def select(result): # <<<<<<<<<<<<<< @@ -5708,20 +5353,20 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_5generator6(_ __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("select", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_8generator7(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "lxml/_elementpath.py":172 +/* "lxml/_elementpath.py":176 * # [tag] * tag = predicate[0] * def select(result): # <<<<<<<<<<<<<< @@ -5752,7 +5397,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_17prepare_predicate_6select(PyObj if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_10_select *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 172, __pyx_L1_error) + __PYX_ERR(0, 176, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -5763,7 +5408,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_17prepare_predicate_6select(PyObj __Pyx_INCREF(__pyx_cur_scope->__pyx_v_result); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_result); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_12_elementpath_17prepare_predicate_8generator7, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_select, __pyx_n_s_prepare_predicate_locals_select, __pyx_n_s_lxml__elementpath); if (unlikely(!gen)) __PYX_ERR(0, 172, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_12_elementpath_17prepare_predicate_8generator7, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_select, __pyx_n_s_prepare_predicate_locals_select, __pyx_n_s_lxml__elementpath); if (unlikely(!gen)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -5783,62 +5428,57 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_8generator7(_ { struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_10_select *__pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_10_select *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - Py_ssize_t __pyx_t_8; - PyObject *(*__pyx_t_9)(PyObject *); + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("select", 0); - __Pyx_TraceCall("select", __pyx_f[0], 172, 0, __PYX_ERR(0, 172, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L8_resume_from_yield; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 172, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 176, __pyx_L1_error) - /* "lxml/_elementpath.py":173 + /* "lxml/_elementpath.py":177 * tag = predicate[0] * def select(result): * for elem in result: # <<<<<<<<<<<<<< * for _ in elem.iterchildren(tag): * yield elem */ - __Pyx_TraceLine(173,0,__PYX_ERR(0, 173, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_result)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_result)) { __pyx_t_1 = __pyx_cur_scope->__pyx_v_result; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error) + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_2 >= 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_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 173, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 177, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 173, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 177, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -5848,7 +5488,7 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_8generator7(_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 173, __pyx_L1_error) + else __PYX_ERR(0, 177, __pyx_L1_error) } break; } @@ -5859,17 +5499,16 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_8generator7(_ __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/_elementpath.py":174 + /* "lxml/_elementpath.py":178 * def select(result): * for elem in result: * for _ in elem.iterchildren(tag): # <<<<<<<<<<<<<< * yield elem * break */ - __Pyx_TraceLine(174,0,__PYX_ERR(0, 174, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_elem, __pyx_n_s_iterchildren); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_elem, __pyx_n_s_iterchildren); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag)) { __Pyx_RaiseClosureNameError("tag"); __PYX_ERR(0, 174, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag)) { __Pyx_RaiseClosureNameError("tag"); __PYX_ERR(0, 178, __pyx_L1_error) } __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); @@ -5880,74 +5519,46 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_8generator7(_ __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 174, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 174, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 174, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 174, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag); - PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 174, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { - __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0; - __pyx_t_9 = NULL; + __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; + __pyx_t_8 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_9 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 178, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { - if (likely(!__pyx_t_9)) { + if (likely(!__pyx_t_8)) { if (likely(PyList_CheckExact(__pyx_t_5))) { - if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_5)) break; + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 178, __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, 174, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { - if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break; + if (__pyx_t_7 >= 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, 174, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 178, __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, 174, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { - __pyx_t_4 = __pyx_t_9(__pyx_t_5); + __pyx_t_4 = __pyx_t_8(__pyx_t_5); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 174, __pyx_L1_error) + else __PYX_ERR(0, 178, __pyx_L1_error) } break; } @@ -5958,14 +5569,13 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_8generator7(_ __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/_elementpath.py":175 + /* "lxml/_elementpath.py":179 * for elem in result: * for _ in elem.iterchildren(tag): * yield elem # <<<<<<<<<<<<<< * break * return select */ - __Pyx_TraceLine(175,0,__PYX_ERR(0, 175, __pyx_L1_error)) __Pyx_INCREF(__pyx_cur_scope->__pyx_v_elem); __pyx_r = __pyx_cur_scope->__pyx_v_elem; __Pyx_XGIVEREF(__pyx_t_1); @@ -5974,10 +5584,9 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_8generator7(_ __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; __Pyx_XGIVEREF(__pyx_t_5); __pyx_cur_scope->__pyx_t_3 = __pyx_t_5; - __pyx_cur_scope->__pyx_t_4 = __pyx_t_8; - __pyx_cur_scope->__pyx_t_5 = __pyx_t_9; + __pyx_cur_scope->__pyx_t_4 = __pyx_t_7; + __pyx_cur_scope->__pyx_t_5 = __pyx_t_8; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ @@ -5992,45 +5601,42 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_8generator7(_ __pyx_t_5 = __pyx_cur_scope->__pyx_t_3; __pyx_cur_scope->__pyx_t_3 = 0; __Pyx_XGOTREF(__pyx_t_5); - __pyx_t_8 = __pyx_cur_scope->__pyx_t_4; - __pyx_t_9 = __pyx_cur_scope->__pyx_t_5; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 175, __pyx_L1_error) + __pyx_t_7 = __pyx_cur_scope->__pyx_t_4; + __pyx_t_8 = __pyx_cur_scope->__pyx_t_5; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 179, __pyx_L1_error) - /* "lxml/_elementpath.py":176 + /* "lxml/_elementpath.py":180 * for _ in elem.iterchildren(tag): * yield elem * break # <<<<<<<<<<<<<< * return select * if signature == ".='" or (signature == "-='" and not re.match(r"-?\d+$", predicate[0])): */ - __Pyx_TraceLine(176,0,__PYX_ERR(0, 176, __pyx_L1_error)) goto __pyx_L7_break; - /* "lxml/_elementpath.py":174 + /* "lxml/_elementpath.py":178 * def select(result): * for elem in result: * for _ in elem.iterchildren(tag): # <<<<<<<<<<<<<< * yield elem * break */ - __Pyx_TraceLine(174,0,__PYX_ERR(0, 174, __pyx_L1_error)) } __pyx_L7_break:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/_elementpath.py":173 + /* "lxml/_elementpath.py":177 * tag = predicate[0] * def select(result): * for elem in result: # <<<<<<<<<<<<<< * for _ in elem.iterchildren(tag): * yield elem */ - __Pyx_TraceLine(173,0,__PYX_ERR(0, 173, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "lxml/_elementpath.py":172 + /* "lxml/_elementpath.py":176 * # [tag] * tag = predicate[0] * def select(result): # <<<<<<<<<<<<<< @@ -6046,20 +5652,20 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_8generator7(_ __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("select", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_11generator8(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "lxml/_elementpath.py":183 +/* "lxml/_elementpath.py":187 * value = predicate[-1] * if tag: * def select(result): # <<<<<<<<<<<<<< @@ -6090,7 +5696,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_17prepare_predicate_9select(PyObj if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_11_select *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 183, __pyx_L1_error) + __PYX_ERR(0, 187, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -6101,7 +5707,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_17prepare_predicate_9select(PyObj __Pyx_INCREF(__pyx_cur_scope->__pyx_v_result); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_result); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_12_elementpath_17prepare_predicate_11generator8, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_select, __pyx_n_s_prepare_predicate_locals_select, __pyx_n_s_lxml__elementpath); if (unlikely(!gen)) __PYX_ERR(0, 183, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_12_elementpath_17prepare_predicate_11generator8, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_select, __pyx_n_s_prepare_predicate_locals_select, __pyx_n_s_lxml__elementpath); if (unlikely(!gen)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -6121,63 +5727,59 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_11generator8( { struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_11_select *__pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_11_select *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - Py_ssize_t __pyx_t_8; - PyObject *(*__pyx_t_9)(PyObject *); + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); + PyObject *__pyx_t_9 = NULL; int __pyx_t_10; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("select", 0); - __Pyx_TraceCall("select", __pyx_f[0], 183, 0, __PYX_ERR(0, 183, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L9_resume_from_yield; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 183, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 187, __pyx_L1_error) - /* "lxml/_elementpath.py":184 + /* "lxml/_elementpath.py":188 * if tag: * def select(result): * for elem in result: # <<<<<<<<<<<<<< * for e in elem.iterchildren(tag): * if "".join(e.itertext()) == value: */ - __Pyx_TraceLine(184,0,__PYX_ERR(0, 184, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_result)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_result)) { __pyx_t_1 = __pyx_cur_scope->__pyx_v_result; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 188, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_2 >= 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_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 188, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 188, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -6187,7 +5789,7 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_11generator8( PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 184, __pyx_L1_error) + else __PYX_ERR(0, 188, __pyx_L1_error) } break; } @@ -6198,17 +5800,16 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_11generator8( __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/_elementpath.py":185 + /* "lxml/_elementpath.py":189 * def select(result): * for elem in result: * for e in elem.iterchildren(tag): # <<<<<<<<<<<<<< * if "".join(e.itertext()) == value: * yield elem */ - __Pyx_TraceLine(185,0,__PYX_ERR(0, 185, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_elem, __pyx_n_s_iterchildren); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 185, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_elem, __pyx_n_s_iterchildren); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag)) { __Pyx_RaiseClosureNameError("tag"); __PYX_ERR(0, 185, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag)) { __Pyx_RaiseClosureNameError("tag"); __PYX_ERR(0, 189, __pyx_L1_error) } __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); @@ -6219,74 +5820,46 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_11generator8( __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 185, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 185, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 185, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 185, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag); - PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 185, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_tag); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { - __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0; - __pyx_t_9 = NULL; + __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; + __pyx_t_8 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 185, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_9 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 185, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 189, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { - if (likely(!__pyx_t_9)) { + if (likely(!__pyx_t_8)) { if (likely(PyList_CheckExact(__pyx_t_5))) { - if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_5)) break; + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 185, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 189, __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, 185, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { - if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break; + if (__pyx_t_7 >= 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, 185, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 189, __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, 185, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { - __pyx_t_4 = __pyx_t_9(__pyx_t_5); + __pyx_t_4 = __pyx_t_8(__pyx_t_5); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 185, __pyx_L1_error) + else __PYX_ERR(0, 189, __pyx_L1_error) } break; } @@ -6297,50 +5870,45 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_11generator8( __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/_elementpath.py":186 + /* "lxml/_elementpath.py":190 * for elem in result: * for e in elem.iterchildren(tag): * if "".join(e.itertext()) == value: # <<<<<<<<<<<<<< * yield elem * break */ - __Pyx_TraceLine(186,0,__PYX_ERR(0, 186, __pyx_L1_error)) - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_e, __pyx_n_s_itertext); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 186, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_e, __pyx_n_s_itertext); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_7, function); + __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 186, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 186, __pyx_L1_error) - } + __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyString_Join(__pyx_kp_s__24, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 186, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyString_Join(__pyx_kp_s__17, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value)) { __Pyx_RaiseClosureNameError("value"); __PYX_ERR(0, 186, __pyx_L1_error) } - __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_value, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 186, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value)) { __Pyx_RaiseClosureNameError("value"); __PYX_ERR(0, 190, __pyx_L1_error) } + __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_value, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 190, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_10) { - /* "lxml/_elementpath.py":187 + /* "lxml/_elementpath.py":191 * for e in elem.iterchildren(tag): * if "".join(e.itertext()) == value: * yield elem # <<<<<<<<<<<<<< * break * else: */ - __Pyx_TraceLine(187,0,__PYX_ERR(0, 187, __pyx_L1_error)) __Pyx_INCREF(__pyx_cur_scope->__pyx_v_elem); __pyx_r = __pyx_cur_scope->__pyx_v_elem; __Pyx_XGIVEREF(__pyx_t_1); @@ -6349,10 +5917,9 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_11generator8( __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; __Pyx_XGIVEREF(__pyx_t_5); __pyx_cur_scope->__pyx_t_3 = __pyx_t_5; - __pyx_cur_scope->__pyx_t_4 = __pyx_t_8; - __pyx_cur_scope->__pyx_t_5 = __pyx_t_9; + __pyx_cur_scope->__pyx_t_4 = __pyx_t_7; + __pyx_cur_scope->__pyx_t_5 = __pyx_t_8; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ @@ -6367,21 +5934,20 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_11generator8( __pyx_t_5 = __pyx_cur_scope->__pyx_t_3; __pyx_cur_scope->__pyx_t_3 = 0; __Pyx_XGOTREF(__pyx_t_5); - __pyx_t_8 = __pyx_cur_scope->__pyx_t_4; - __pyx_t_9 = __pyx_cur_scope->__pyx_t_5; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 187, __pyx_L1_error) + __pyx_t_7 = __pyx_cur_scope->__pyx_t_4; + __pyx_t_8 = __pyx_cur_scope->__pyx_t_5; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 191, __pyx_L1_error) - /* "lxml/_elementpath.py":188 + /* "lxml/_elementpath.py":192 * if "".join(e.itertext()) == value: * yield elem * break # <<<<<<<<<<<<<< * else: * def select(result): */ - __Pyx_TraceLine(188,0,__PYX_ERR(0, 188, __pyx_L1_error)) goto __pyx_L7_break; - /* "lxml/_elementpath.py":186 + /* "lxml/_elementpath.py":190 * for elem in result: * for e in elem.iterchildren(tag): * if "".join(e.itertext()) == value: # <<<<<<<<<<<<<< @@ -6390,31 +5956,29 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_11generator8( */ } - /* "lxml/_elementpath.py":185 + /* "lxml/_elementpath.py":189 * def select(result): * for elem in result: * for e in elem.iterchildren(tag): # <<<<<<<<<<<<<< * if "".join(e.itertext()) == value: * yield elem */ - __Pyx_TraceLine(185,0,__PYX_ERR(0, 185, __pyx_L1_error)) } __pyx_L7_break:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/_elementpath.py":184 + /* "lxml/_elementpath.py":188 * if tag: * def select(result): * for elem in result: # <<<<<<<<<<<<<< * for e in elem.iterchildren(tag): * if "".join(e.itertext()) == value: */ - __Pyx_TraceLine(184,0,__PYX_ERR(0, 184, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "lxml/_elementpath.py":183 + /* "lxml/_elementpath.py":187 * value = predicate[-1] * if tag: * def select(result): # <<<<<<<<<<<<<< @@ -6430,20 +5994,21 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_11generator8( __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("select", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_14generator9(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "lxml/_elementpath.py":190 +/* "lxml/_elementpath.py":194 * break * else: * def select(result): # <<<<<<<<<<<<<< @@ -6474,7 +6039,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_17prepare_predicate_12select(PyOb if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_12_select *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 190, __pyx_L1_error) + __PYX_ERR(0, 194, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -6485,7 +6050,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_17prepare_predicate_12select(PyOb __Pyx_INCREF(__pyx_cur_scope->__pyx_v_result); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_result); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_12_elementpath_17prepare_predicate_14generator9, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_select, __pyx_n_s_prepare_predicate_locals_select, __pyx_n_s_lxml__elementpath); if (unlikely(!gen)) __PYX_ERR(0, 190, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_12_elementpath_17prepare_predicate_14generator9, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_select, __pyx_n_s_prepare_predicate_locals_select, __pyx_n_s_lxml__elementpath); if (unlikely(!gen)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -6505,7 +6070,6 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_14generator9( { struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_12_select *__pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_12_select *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); @@ -6515,50 +6079,47 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_14generator9( int __pyx_t_7; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("select", 0); - __Pyx_TraceCall("select", __pyx_f[0], 190, 0, __PYX_ERR(0, 190, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L7_resume_from_yield; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 190, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 194, __pyx_L1_error) - /* "lxml/_elementpath.py":191 + /* "lxml/_elementpath.py":195 * else: * def select(result): * for elem in result: # <<<<<<<<<<<<<< * if "".join(elem.itertext()) == value: * yield elem */ - __Pyx_TraceLine(191,0,__PYX_ERR(0, 191, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_result)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_result)) { __pyx_t_1 = __pyx_cur_scope->__pyx_v_result; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 191, __pyx_L1_error) + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_2 >= 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_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 191, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 195, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 191, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 191, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 195, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 191, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -6568,7 +6129,7 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_14generator9( PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 191, __pyx_L1_error) + else __PYX_ERR(0, 195, __pyx_L1_error) } break; } @@ -6579,15 +6140,14 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_14generator9( __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/_elementpath.py":192 + /* "lxml/_elementpath.py":196 * def select(result): * for elem in result: * if "".join(elem.itertext()) == value: # <<<<<<<<<<<<<< * yield elem * return select */ - __Pyx_TraceLine(192,0,__PYX_ERR(0, 192, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_elem, __pyx_n_s_itertext); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 192, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_elem, __pyx_n_s_itertext); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -6599,30 +6159,26 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_14generator9( __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 192, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 192, __pyx_L1_error) - } + __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, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__24, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 192, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__17, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value)) { __Pyx_RaiseClosureNameError("value"); __PYX_ERR(0, 192, __pyx_L1_error) } - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_5, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_value, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 192, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_value)) { __Pyx_RaiseClosureNameError("value"); __PYX_ERR(0, 196, __pyx_L1_error) } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_5, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_value, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { - /* "lxml/_elementpath.py":193 + /* "lxml/_elementpath.py":197 * for elem in result: * if "".join(elem.itertext()) == value: * yield elem # <<<<<<<<<<<<<< * return select * if signature == "-" or signature == "-()" or signature == "-()-": */ - __Pyx_TraceLine(193,0,__PYX_ERR(0, 193, __pyx_L1_error)) __Pyx_INCREF(__pyx_cur_scope->__pyx_v_elem); __pyx_r = __pyx_cur_scope->__pyx_v_elem; __Pyx_XGIVEREF(__pyx_t_1); @@ -6630,7 +6186,6 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_14generator9( __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ @@ -6642,9 +6197,9 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_14generator9( __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 193, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 197, __pyx_L1_error) - /* "lxml/_elementpath.py":192 + /* "lxml/_elementpath.py":196 * def select(result): * for elem in result: * if "".join(elem.itertext()) == value: # <<<<<<<<<<<<<< @@ -6653,19 +6208,18 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_14generator9( */ } - /* "lxml/_elementpath.py":191 + /* "lxml/_elementpath.py":195 * else: * def select(result): * for elem in result: # <<<<<<<<<<<<<< * if "".join(elem.itertext()) == value: * yield elem */ - __Pyx_TraceLine(191,0,__PYX_ERR(0, 191, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "lxml/_elementpath.py":190 + /* "lxml/_elementpath.py":194 * break * else: * def select(result): # <<<<<<<<<<<<<< @@ -6684,16 +6238,17 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_14generator9( __Pyx_AddTraceback("select", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_17generator10(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "lxml/_elementpath.py":216 +/* "lxml/_elementpath.py":220 * else: * index = -1 * def select(result): # <<<<<<<<<<<<<< @@ -6724,7 +6279,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_17prepare_predicate_15select(PyOb if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_13_select *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 216, __pyx_L1_error) + __PYX_ERR(0, 220, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -6735,7 +6290,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_17prepare_predicate_15select(PyOb __Pyx_INCREF(__pyx_cur_scope->__pyx_v_result); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_result); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_12_elementpath_17prepare_predicate_17generator10, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_select, __pyx_n_s_prepare_predicate_locals_select, __pyx_n_s_lxml__elementpath); if (unlikely(!gen)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_12_elementpath_17prepare_predicate_17generator10, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_select, __pyx_n_s_prepare_predicate_locals_select, __pyx_n_s_lxml__elementpath); if (unlikely(!gen)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -6755,7 +6310,6 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_17generator10 { struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_13_select *__pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_13_select *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); @@ -6768,54 +6322,50 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_17generator10 PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; - PyObject *__pyx_t_13 = NULL; - int __pyx_t_14; + int __pyx_t_13; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("select", 0); - __Pyx_TraceCall("select", __pyx_f[0], 216, 0, __PYX_ERR(0, 216, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L16_resume_from_yield; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 216, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 220, __pyx_L1_error) - /* "lxml/_elementpath.py":217 + /* "lxml/_elementpath.py":221 * index = -1 * def select(result): * for elem in result: # <<<<<<<<<<<<<< * parent = elem.getparent() * if parent is None: */ - __Pyx_TraceLine(217,0,__PYX_ERR(0, 217, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_result)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_result)) { __pyx_t_1 = __pyx_cur_scope->__pyx_v_result; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 217, __pyx_L1_error) + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 221, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_2 >= 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_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 217, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 221, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 217, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 217, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 221, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 217, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -6825,7 +6375,7 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_17generator10 PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 217, __pyx_L1_error) + else __PYX_ERR(0, 221, __pyx_L1_error) } break; } @@ -6836,15 +6386,14 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_17generator10 __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/_elementpath.py":218 + /* "lxml/_elementpath.py":222 * def select(result): * for elem in result: * parent = elem.getparent() # <<<<<<<<<<<<<< * if parent is None: * continue */ - __Pyx_TraceLine(218,0,__PYX_ERR(0, 218, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_elem, __pyx_n_s_getparent); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 218, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_elem, __pyx_n_s_getparent); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -6856,12 +6405,9 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_17generator10 __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 218, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 218, __pyx_L1_error) - } + __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, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_parent); @@ -6869,29 +6415,27 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_17generator10 __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/_elementpath.py":219 + /* "lxml/_elementpath.py":223 * for elem in result: * parent = elem.getparent() * if parent is None: # <<<<<<<<<<<<<< * continue * try: */ - __Pyx_TraceLine(219,0,__PYX_ERR(0, 219, __pyx_L1_error)) __pyx_t_7 = (__pyx_cur_scope->__pyx_v_parent == Py_None); __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { - /* "lxml/_elementpath.py":220 + /* "lxml/_elementpath.py":224 * parent = elem.getparent() * if parent is None: * continue # <<<<<<<<<<<<<< * try: * # FIXME: what if the selector is "*" ? */ - __Pyx_TraceLine(220,0,__PYX_ERR(0, 220, __pyx_L1_error)) goto __pyx_L4_continue; - /* "lxml/_elementpath.py":219 + /* "lxml/_elementpath.py":223 * for elem in result: * parent = elem.getparent() * if parent is None: # <<<<<<<<<<<<<< @@ -6900,14 +6444,13 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_17generator10 */ } - /* "lxml/_elementpath.py":221 + /* "lxml/_elementpath.py":225 * if parent is None: * continue * try: # <<<<<<<<<<<<<< * # FIXME: what if the selector is "*" ? * elems = list(parent.iterchildren(elem.tag)) */ - __Pyx_TraceLine(221,0,__PYX_ERR(0, 221, __pyx_L7_error)) { __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_9); @@ -6915,17 +6458,16 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_17generator10 __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { - /* "lxml/_elementpath.py":223 + /* "lxml/_elementpath.py":227 * try: * # FIXME: what if the selector is "*" ? * elems = list(parent.iterchildren(elem.tag)) # <<<<<<<<<<<<<< * if elems[index] is elem: * yield elem */ - __Pyx_TraceLine(223,0,__PYX_ERR(0, 223, __pyx_L7_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_parent, __pyx_n_s_iterchildren); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 223, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_parent, __pyx_n_s_iterchildren); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 227, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_elem, __pyx_n_s_tag); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 223, __pyx_L7_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_elem, __pyx_n_s_tag); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 227, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -6937,43 +6479,13 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_17generator10 __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_12) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 223, __pyx_L7_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_6}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 223, __pyx_L7_error) - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_6}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 223, __pyx_L7_error) - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - { - __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 223, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_13); - __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL; - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 223, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - } - } + __pyx_t_4 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_12, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 227, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 223, __pyx_L7_error) + __pyx_t_5 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 227, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_elems); @@ -6981,30 +6493,28 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_17generator10 __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/_elementpath.py":224 + /* "lxml/_elementpath.py":228 * # FIXME: what if the selector is "*" ? * elems = list(parent.iterchildren(elem.tag)) * if elems[index] is elem: # <<<<<<<<<<<<<< * yield elem * except IndexError: */ - __Pyx_TraceLine(224,0,__PYX_ERR(0, 224, __pyx_L7_error)) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_index)) { __Pyx_RaiseClosureNameError("index"); __PYX_ERR(0, 224, __pyx_L7_error) } - __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_cur_scope->__pyx_v_elems, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 224, __pyx_L7_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_index)) { __Pyx_RaiseClosureNameError("index"); __PYX_ERR(0, 228, __pyx_L7_error) } + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_cur_scope->__pyx_v_elems, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 228, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = (__pyx_t_5 == __pyx_cur_scope->__pyx_v_elem); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = (__pyx_t_8 != 0); if (__pyx_t_7) { - /* "lxml/_elementpath.py":225 + /* "lxml/_elementpath.py":229 * elems = list(parent.iterchildren(elem.tag)) * if elems[index] is elem: * yield elem # <<<<<<<<<<<<<< * except IndexError: * pass */ - __Pyx_TraceLine(225,0,__PYX_ERR(0, 225, __pyx_L7_error)) __Pyx_INCREF(__pyx_cur_scope->__pyx_v_elem); __pyx_r = __pyx_cur_scope->__pyx_v_elem; __Pyx_XGIVEREF(__pyx_t_1); @@ -7018,7 +6528,6 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_17generator10 __Pyx_XGIVEREF(__pyx_t_11); __pyx_cur_scope->__pyx_t_5 = __pyx_t_11; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ @@ -7039,9 +6548,9 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_17generator10 __pyx_t_11 = __pyx_cur_scope->__pyx_t_5; __pyx_cur_scope->__pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_t_11); - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 225, __pyx_L7_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 229, __pyx_L7_error) - /* "lxml/_elementpath.py":224 + /* "lxml/_elementpath.py":228 * # FIXME: what if the selector is "*" ? * elems = list(parent.iterchildren(elem.tag)) * if elems[index] is elem: # <<<<<<<<<<<<<< @@ -7050,7 +6559,7 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_17generator10 */ } - /* "lxml/_elementpath.py":221 + /* "lxml/_elementpath.py":225 * if parent is None: * continue * try: # <<<<<<<<<<<<<< @@ -7065,27 +6574,25 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_17generator10 __pyx_L7_error:; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/_elementpath.py":226 + /* "lxml/_elementpath.py":230 * if elems[index] is elem: * yield elem * except IndexError: # <<<<<<<<<<<<<< * pass * return select */ - __Pyx_TraceLine(226,0,__PYX_ERR(0, 226, __pyx_L9_except_error)) - __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError); - if (__pyx_t_14) { + __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError); + if (__pyx_t_13) { __Pyx_ErrRestore(0,0,0); goto __pyx_L8_exception_handled; } goto __pyx_L9_except_error; __pyx_L9_except_error:; - /* "lxml/_elementpath.py":221 + /* "lxml/_elementpath.py":225 * if parent is None: * continue * try: # <<<<<<<<<<<<<< @@ -7105,20 +6612,19 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_17generator10 __pyx_L14_try_end:; } - /* "lxml/_elementpath.py":217 + /* "lxml/_elementpath.py":221 * index = -1 * def select(result): * for elem in result: # <<<<<<<<<<<<<< * parent = elem.getparent() * if parent is None: */ - __Pyx_TraceLine(217,0,__PYX_ERR(0, 217, __pyx_L1_error)) __pyx_L4_continue:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "lxml/_elementpath.py":216 + /* "lxml/_elementpath.py":220 * else: * index = -1 * def select(result): # <<<<<<<<<<<<<< @@ -7135,19 +6641,19 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_17prepare_predicate_17generator10 __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); - __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("select", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/_elementpath.py":133 +/* "lxml/_elementpath.py":137 * return select * * def prepare_predicate(next, token): # <<<<<<<<<<<<<< @@ -7161,7 +6667,6 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED PyObject *__pyx_v_predicate = NULL; PyObject *__pyx_v_select = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -7176,61 +6681,55 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__25) __Pyx_RefNannySetupContext("prepare_predicate", 0); __pyx_cur_scope = (struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_7_prepare_predicate *)__pyx_tp_new_4lxml_12_elementpath___pyx_scope_struct_7_prepare_predicate(__pyx_ptype_4lxml_12_elementpath___pyx_scope_struct_7_prepare_predicate, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_7_prepare_predicate *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 133, __pyx_L1_error) + __PYX_ERR(0, 137, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } - __Pyx_TraceCall("prepare_predicate", __pyx_f[0], 133, 0, __PYX_ERR(0, 133, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_token); - /* "lxml/_elementpath.py":137 + /* "lxml/_elementpath.py":141 * # http://effbot.org/zone/simple-iterator-parser.htm * # http://javascript.crockford.com/tdop/tdop.html * signature = '' # <<<<<<<<<<<<<< * predicate = [] * while 1: */ - __Pyx_TraceLine(137,0,__PYX_ERR(0, 137, __pyx_L1_error)) - __Pyx_INCREF(__pyx_kp_s__24); - __pyx_v_signature = __pyx_kp_s__24; + __Pyx_INCREF(__pyx_kp_s__17); + __pyx_v_signature = __pyx_kp_s__17; - /* "lxml/_elementpath.py":138 + /* "lxml/_elementpath.py":142 * # http://javascript.crockford.com/tdop/tdop.html * signature = '' * predicate = [] # <<<<<<<<<<<<<< * while 1: * token = next() */ - __Pyx_TraceLine(138,0,__PYX_ERR(0, 138, __pyx_L1_error)) - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_predicate = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":139 + /* "lxml/_elementpath.py":143 * signature = '' * predicate = [] * while 1: # <<<<<<<<<<<<<< * token = next() * if token[0] == "]": */ - __Pyx_TraceLine(139,0,__PYX_ERR(0, 139, __pyx_L1_error)) while (1) { - /* "lxml/_elementpath.py":140 + /* "lxml/_elementpath.py":144 * predicate = [] * while 1: * token = next() # <<<<<<<<<<<<<< * if token[0] == "]": * break */ - __Pyx_TraceLine(140,0,__PYX_ERR(0, 140, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_next); __pyx_t_2 = __pyx_v_next; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -7242,42 +6741,37 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) - } + __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, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_token, __pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":141 + /* "lxml/_elementpath.py":145 * while 1: * token = next() * if token[0] == "]": # <<<<<<<<<<<<<< * break * if token == ('', ''): */ - __Pyx_TraceLine(141,0,__PYX_ERR(0, 141, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_token, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_token, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__26, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 141, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__18, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { - /* "lxml/_elementpath.py":142 + /* "lxml/_elementpath.py":146 * token = next() * if token[0] == "]": * break # <<<<<<<<<<<<<< * if token == ('', ''): * # ignore whitespace */ - __Pyx_TraceLine(142,0,__PYX_ERR(0, 142, __pyx_L1_error)) goto __pyx_L4_break; - /* "lxml/_elementpath.py":141 + /* "lxml/_elementpath.py":145 * while 1: * token = next() * if token[0] == "]": # <<<<<<<<<<<<<< @@ -7286,30 +6780,28 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED */ } - /* "lxml/_elementpath.py":143 + /* "lxml/_elementpath.py":147 * if token[0] == "]": * break * if token == ('', ''): # <<<<<<<<<<<<<< * # ignore whitespace * continue */ - __Pyx_TraceLine(143,0,__PYX_ERR(0, 143, __pyx_L1_error)) - __pyx_t_1 = PyObject_RichCompare(__pyx_v_token, __pyx_tuple__27, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 143, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_token, __pyx_tuple__19, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 147, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { - /* "lxml/_elementpath.py":145 + /* "lxml/_elementpath.py":149 * if token == ('', ''): * # ignore whitespace * continue # <<<<<<<<<<<<<< * if token[0] and token[0][:1] in "'\"": * token = "'", token[0][1:-1] */ - __Pyx_TraceLine(145,0,__PYX_ERR(0, 145, __pyx_L1_error)) goto __pyx_L3_continue; - /* "lxml/_elementpath.py":143 + /* "lxml/_elementpath.py":147 * if token[0] == "]": * break * if token == ('', ''): # <<<<<<<<<<<<<< @@ -7318,60 +6810,58 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED */ } - /* "lxml/_elementpath.py":146 + /* "lxml/_elementpath.py":150 * # ignore whitespace * continue * if token[0] and token[0][:1] in "'\"": # <<<<<<<<<<<<<< * token = "'", token[0][1:-1] * signature += token[0] or "-" */ - __Pyx_TraceLine(146,0,__PYX_ERR(0, 146, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_token, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_token, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { } else { __pyx_t_4 = __pyx_t_5; goto __pyx_L8_bool_binop_done; } - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_token, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_token, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 1, NULL, NULL, &__pyx_slice__28, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 1, NULL, NULL, &__pyx_slice__20, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_kp_s__29, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_kp_s__21, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = (__pyx_t_5 != 0); __pyx_t_4 = __pyx_t_6; __pyx_L8_bool_binop_done:; if (__pyx_t_4) { - /* "lxml/_elementpath.py":147 + /* "lxml/_elementpath.py":151 * continue * if token[0] and token[0][:1] in "'\"": * token = "'", token[0][1:-1] # <<<<<<<<<<<<<< * signature += token[0] or "-" * predicate.append(token[1]) */ - __Pyx_TraceLine(147,0,__PYX_ERR(0, 147, __pyx_L1_error)) - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_token, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_token, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_2, 1, -1L, NULL, NULL, &__pyx_slice__31, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_2, 1, -1L, NULL, NULL, &__pyx_slice__23, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_kp_s__30); - __Pyx_GIVEREF(__pyx_kp_s__30); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s__30); + __Pyx_INCREF(__pyx_kp_s__22); + __Pyx_GIVEREF(__pyx_kp_s__22); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s__22); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_token, __pyx_t_2); __pyx_t_2 = 0; - /* "lxml/_elementpath.py":146 + /* "lxml/_elementpath.py":150 * # ignore whitespace * continue * if token[0] and token[0][:1] in "'\"": # <<<<<<<<<<<<<< @@ -7380,17 +6870,16 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED */ } - /* "lxml/_elementpath.py":148 + /* "lxml/_elementpath.py":152 * if token[0] and token[0][:1] in "'\"": * token = "'", token[0][1:-1] * signature += token[0] or "-" # <<<<<<<<<<<<<< * predicate.append(token[1]) * */ - __Pyx_TraceLine(148,0,__PYX_ERR(0, 148, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_token, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_token, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 148, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 152, __pyx_L1_error) if (!__pyx_t_4) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { @@ -7399,83 +6888,78 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L10_bool_binop_done; } - __Pyx_INCREF(__pyx_kp_s__32); - __pyx_t_2 = __pyx_kp_s__32; + __Pyx_INCREF(__pyx_kp_s__24); + __pyx_t_2 = __pyx_kp_s__24; __pyx_L10_bool_binop_done:; - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_signature, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error) + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_signature, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_signature, __pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":149 + /* "lxml/_elementpath.py":153 * token = "'", token[0][1:-1] * signature += token[0] or "-" * predicate.append(token[1]) # <<<<<<<<<<<<<< * * # use signature to determine predicate type */ - __Pyx_TraceLine(149,0,__PYX_ERR(0, 149, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_token, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_token, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_predicate, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 149, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_predicate, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_L3_continue:; } __pyx_L4_break:; - /* "lxml/_elementpath.py":152 + /* "lxml/_elementpath.py":156 * * # use signature to determine predicate type * if signature == "@-": # <<<<<<<<<<<<<< * # [@attribute] predicate * key = predicate[1] */ - __Pyx_TraceLine(152,0,__PYX_ERR(0, 152, __pyx_L1_error)) - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_signature, __pyx_kp_s__33, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_signature, __pyx_kp_s__25, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 156, __pyx_L1_error) if (__pyx_t_4) { - /* "lxml/_elementpath.py":154 + /* "lxml/_elementpath.py":158 * if signature == "@-": * # [@attribute] predicate * key = predicate[1] # <<<<<<<<<<<<<< * def select(result): * for elem in result: */ - __Pyx_TraceLine(154,0,__PYX_ERR(0, 154, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_predicate, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_predicate, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_key = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/_elementpath.py":155 + /* "lxml/_elementpath.py":159 * # [@attribute] predicate * key = predicate[1] * def select(result): # <<<<<<<<<<<<<< * for elem in result: * if elem.get(key) is not None: */ - __Pyx_TraceLine(155,0,__PYX_ERR(0, 155, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_17prepare_predicate_1select, 0, __pyx_n_s_prepare_predicate_locals_select, ((PyObject*)__pyx_cur_scope), __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_17prepare_predicate_1select, 0, __pyx_n_s_prepare_predicate_locals_select, ((PyObject*)__pyx_cur_scope), __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_select = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/_elementpath.py":159 + /* "lxml/_elementpath.py":163 * if elem.get(key) is not None: * yield elem * return select # <<<<<<<<<<<<<< * if signature == "@-='": * # [@attribute='value'] */ - __Pyx_TraceLine(159,0,__PYX_ERR(0, 159, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_select); __pyx_r = __pyx_v_select; goto __pyx_L0; - /* "lxml/_elementpath.py":152 + /* "lxml/_elementpath.py":156 * * # use signature to determine predicate type * if signature == "@-": # <<<<<<<<<<<<<< @@ -7484,72 +6968,67 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED */ } - /* "lxml/_elementpath.py":160 + /* "lxml/_elementpath.py":164 * yield elem * return select * if signature == "@-='": # <<<<<<<<<<<<<< * # [@attribute='value'] * key = predicate[1] */ - __Pyx_TraceLine(160,0,__PYX_ERR(0, 160, __pyx_L1_error)) - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_signature, __pyx_kp_s__36, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 160, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_signature, __pyx_kp_s__28, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 164, __pyx_L1_error) if (__pyx_t_4) { - /* "lxml/_elementpath.py":162 + /* "lxml/_elementpath.py":166 * if signature == "@-='": * # [@attribute='value'] * key = predicate[1] # <<<<<<<<<<<<<< * value = predicate[-1] * def select(result): */ - __Pyx_TraceLine(162,0,__PYX_ERR(0, 162, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_predicate, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_predicate, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_key = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/_elementpath.py":163 + /* "lxml/_elementpath.py":167 * # [@attribute='value'] * key = predicate[1] * value = predicate[-1] # <<<<<<<<<<<<<< * def select(result): * for elem in result: */ - __Pyx_TraceLine(163,0,__PYX_ERR(0, 163, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_predicate, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_predicate, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_value = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/_elementpath.py":164 + /* "lxml/_elementpath.py":168 * key = predicate[1] * value = predicate[-1] * def select(result): # <<<<<<<<<<<<<< * for elem in result: * if elem.get(key) == value: */ - __Pyx_TraceLine(164,0,__PYX_ERR(0, 164, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_17prepare_predicate_4select, 0, __pyx_n_s_prepare_predicate_locals_select, ((PyObject*)__pyx_cur_scope), __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_17prepare_predicate_4select, 0, __pyx_n_s_prepare_predicate_locals_select, ((PyObject*)__pyx_cur_scope), __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_select = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/_elementpath.py":168 + /* "lxml/_elementpath.py":172 * if elem.get(key) == value: * yield elem * return select # <<<<<<<<<<<<<< * if signature == "-" and not re.match(r"-?\d+$", predicate[0]): * # [tag] */ - __Pyx_TraceLine(168,0,__PYX_ERR(0, 168, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_select); __pyx_r = __pyx_v_select; goto __pyx_L0; - /* "lxml/_elementpath.py":160 + /* "lxml/_elementpath.py":164 * yield elem * return select * if signature == "@-='": # <<<<<<<<<<<<<< @@ -7558,26 +7037,25 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED */ } - /* "lxml/_elementpath.py":169 + /* "lxml/_elementpath.py":173 * yield elem * return select * if signature == "-" and not re.match(r"-?\d+$", predicate[0]): # <<<<<<<<<<<<<< * # [tag] * tag = predicate[0] */ - __Pyx_TraceLine(169,0,__PYX_ERR(0, 169, __pyx_L1_error)) - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_signature, __pyx_kp_s__32, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 169, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_signature, __pyx_kp_s__24, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 173, __pyx_L1_error) if (__pyx_t_6) { } else { __pyx_t_4 = __pyx_t_6; goto __pyx_L15_bool_binop_done; } - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_re); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_match); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_match); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_predicate, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_predicate, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = NULL; __pyx_t_9 = 0; @@ -7594,7 +7072,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_kp_s_d, __pyx_t_2}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -7603,14 +7081,14 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_kp_s_d, __pyx_t_2}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 169, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 173, __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; @@ -7621,59 +7099,56 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 169, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = ((!__pyx_t_6) != 0); __pyx_t_4 = __pyx_t_5; __pyx_L15_bool_binop_done:; if (__pyx_t_4) { - /* "lxml/_elementpath.py":171 + /* "lxml/_elementpath.py":175 * if signature == "-" and not re.match(r"-?\d+$", predicate[0]): * # [tag] * tag = predicate[0] # <<<<<<<<<<<<<< * def select(result): * for elem in result: */ - __Pyx_TraceLine(171,0,__PYX_ERR(0, 171, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_predicate, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_predicate, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_tag = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/_elementpath.py":172 + /* "lxml/_elementpath.py":176 * # [tag] * tag = predicate[0] * def select(result): # <<<<<<<<<<<<<< * for elem in result: * for _ in elem.iterchildren(tag): */ - __Pyx_TraceLine(172,0,__PYX_ERR(0, 172, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_17prepare_predicate_7select, 0, __pyx_n_s_prepare_predicate_locals_select, ((PyObject*)__pyx_cur_scope), __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_17prepare_predicate_7select, 0, __pyx_n_s_prepare_predicate_locals_select, ((PyObject*)__pyx_cur_scope), __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_select = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/_elementpath.py":177 + /* "lxml/_elementpath.py":181 * yield elem * break * return select # <<<<<<<<<<<<<< * if signature == ".='" or (signature == "-='" and not re.match(r"-?\d+$", predicate[0])): * # [.='value'] or [tag='value'] */ - __Pyx_TraceLine(177,0,__PYX_ERR(0, 177, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_select); __pyx_r = __pyx_v_select; goto __pyx_L0; - /* "lxml/_elementpath.py":169 + /* "lxml/_elementpath.py":173 * yield elem * return select * if signature == "-" and not re.match(r"-?\d+$", predicate[0]): # <<<<<<<<<<<<<< @@ -7682,32 +7157,31 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED */ } - /* "lxml/_elementpath.py":178 + /* "lxml/_elementpath.py":182 * break * return select * if signature == ".='" or (signature == "-='" and not re.match(r"-?\d+$", predicate[0])): # <<<<<<<<<<<<<< * # [.='value'] or [tag='value'] * tag = predicate[0] */ - __Pyx_TraceLine(178,0,__PYX_ERR(0, 178, __pyx_L1_error)) - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_signature, __pyx_kp_s__42, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_signature, __pyx_kp_s__34, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 182, __pyx_L1_error) if (!__pyx_t_5) { } else { __pyx_t_4 = __pyx_t_5; goto __pyx_L18_bool_binop_done; } - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_signature, __pyx_kp_s__43, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_signature, __pyx_kp_s__35, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 182, __pyx_L1_error) if (__pyx_t_5) { } else { __pyx_t_4 = __pyx_t_5; goto __pyx_L18_bool_binop_done; } - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_re); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_match); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_match); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_predicate, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_predicate, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; __pyx_t_9 = 0; @@ -7724,7 +7198,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_kp_s_d, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -7733,14 +7207,14 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_kp_s_d, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __pyx_t_2 = NULL; @@ -7751,71 +7225,67 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_9, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = ((!__pyx_t_5) != 0); __pyx_t_4 = __pyx_t_6; __pyx_L18_bool_binop_done:; if (__pyx_t_4) { - /* "lxml/_elementpath.py":180 + /* "lxml/_elementpath.py":184 * if signature == ".='" or (signature == "-='" and not re.match(r"-?\d+$", predicate[0])): * # [.='value'] or [tag='value'] * tag = predicate[0] # <<<<<<<<<<<<<< * value = predicate[-1] * if tag: */ - __Pyx_TraceLine(180,0,__PYX_ERR(0, 180, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_predicate, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_predicate, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_tag = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/_elementpath.py":181 + /* "lxml/_elementpath.py":185 * # [.='value'] or [tag='value'] * tag = predicate[0] * value = predicate[-1] # <<<<<<<<<<<<<< * if tag: * def select(result): */ - __Pyx_TraceLine(181,0,__PYX_ERR(0, 181, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_predicate, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_predicate, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_value = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/_elementpath.py":182 + /* "lxml/_elementpath.py":186 * tag = predicate[0] * value = predicate[-1] * if tag: # <<<<<<<<<<<<<< * def select(result): * for elem in result: */ - __Pyx_TraceLine(182,0,__PYX_ERR(0, 182, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_tag); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 182, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_tag); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 186, __pyx_L1_error) if (__pyx_t_4) { - /* "lxml/_elementpath.py":183 + /* "lxml/_elementpath.py":187 * value = predicate[-1] * if tag: * def select(result): # <<<<<<<<<<<<<< * for elem in result: * for e in elem.iterchildren(tag): */ - __Pyx_TraceLine(183,0,__PYX_ERR(0, 183, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_17prepare_predicate_10select, 0, __pyx_n_s_prepare_predicate_locals_select, ((PyObject*)__pyx_cur_scope), __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_17prepare_predicate_10select, 0, __pyx_n_s_prepare_predicate_locals_select, ((PyObject*)__pyx_cur_scope), __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_select = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/_elementpath.py":182 + /* "lxml/_elementpath.py":186 * tag = predicate[0] * value = predicate[-1] * if tag: # <<<<<<<<<<<<<< @@ -7825,36 +7295,34 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED goto __pyx_L21; } - /* "lxml/_elementpath.py":190 + /* "lxml/_elementpath.py":194 * break * else: * def select(result): # <<<<<<<<<<<<<< * for elem in result: * if "".join(elem.itertext()) == value: */ - __Pyx_TraceLine(190,0,__PYX_ERR(0, 190, __pyx_L1_error)) /*else*/ { - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_17prepare_predicate_13select, 0, __pyx_n_s_prepare_predicate_locals_select, ((PyObject*)__pyx_cur_scope), __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_17prepare_predicate_13select, 0, __pyx_n_s_prepare_predicate_locals_select, ((PyObject*)__pyx_cur_scope), __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_select = __pyx_t_1; __pyx_t_1 = 0; } __pyx_L21:; - /* "lxml/_elementpath.py":194 + /* "lxml/_elementpath.py":198 * if "".join(elem.itertext()) == value: * yield elem * return select # <<<<<<<<<<<<<< * if signature == "-" or signature == "-()" or signature == "-()-": * # [index] or [last()] or [last()-index] */ - __Pyx_TraceLine(194,0,__PYX_ERR(0, 194, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_select); __pyx_r = __pyx_v_select; goto __pyx_L0; - /* "lxml/_elementpath.py":178 + /* "lxml/_elementpath.py":182 * break * return select * if signature == ".='" or (signature == "-='" and not re.match(r"-?\d+$", predicate[0])): # <<<<<<<<<<<<<< @@ -7863,104 +7331,98 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED */ } - /* "lxml/_elementpath.py":195 + /* "lxml/_elementpath.py":199 * yield elem * return select * if signature == "-" or signature == "-()" or signature == "-()-": # <<<<<<<<<<<<<< * # [index] or [last()] or [last()-index] * if signature == "-": */ - __Pyx_TraceLine(195,0,__PYX_ERR(0, 195, __pyx_L1_error)) - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_signature, __pyx_kp_s__32, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 195, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_signature, __pyx_kp_s__24, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 199, __pyx_L1_error) if (!__pyx_t_6) { } else { __pyx_t_4 = __pyx_t_6; goto __pyx_L23_bool_binop_done; } - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_signature, __pyx_kp_s__48, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 195, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_signature, __pyx_kp_s__40, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 199, __pyx_L1_error) if (!__pyx_t_6) { } else { __pyx_t_4 = __pyx_t_6; goto __pyx_L23_bool_binop_done; } - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_signature, __pyx_kp_s__49, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 195, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_signature, __pyx_kp_s__41, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 199, __pyx_L1_error) __pyx_t_4 = __pyx_t_6; __pyx_L23_bool_binop_done:; if (__pyx_t_4) { - /* "lxml/_elementpath.py":197 + /* "lxml/_elementpath.py":201 * if signature == "-" or signature == "-()" or signature == "-()-": * # [index] or [last()] or [last()-index] * if signature == "-": # <<<<<<<<<<<<<< * # [index] * index = int(predicate[0]) - 1 */ - __Pyx_TraceLine(197,0,__PYX_ERR(0, 197, __pyx_L1_error)) - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_signature, __pyx_kp_s__32, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 197, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_signature, __pyx_kp_s__24, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 201, __pyx_L1_error) if (__pyx_t_4) { - /* "lxml/_elementpath.py":199 + /* "lxml/_elementpath.py":203 * if signature == "-": * # [index] * index = int(predicate[0]) - 1 # <<<<<<<<<<<<<< * if index < 0: * if index == -1: */ - __Pyx_TraceLine(199,0,__PYX_ERR(0, 199, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_predicate, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_predicate, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 199, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_t_10, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_t_10, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_index = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/_elementpath.py":200 + /* "lxml/_elementpath.py":204 * # [index] * index = int(predicate[0]) - 1 * if index < 0: # <<<<<<<<<<<<<< * if index == -1: * raise SyntaxError( */ - __Pyx_TraceLine(200,0,__PYX_ERR(0, 200, __pyx_L1_error)) - __pyx_t_1 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_index, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 200, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_index, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { - /* "lxml/_elementpath.py":201 + /* "lxml/_elementpath.py":205 * index = int(predicate[0]) - 1 * if index < 0: * if index == -1: # <<<<<<<<<<<<<< * raise SyntaxError( * "indices in path predicates are 1-based, not 0-based") */ - __Pyx_TraceLine(201,0,__PYX_ERR(0, 201, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_cur_scope->__pyx_v_index, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_cur_scope->__pyx_v_index, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 201, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_4)) { - /* "lxml/_elementpath.py":202 + /* "lxml/_elementpath.py":206 * if index < 0: * if index == -1: * raise SyntaxError( # <<<<<<<<<<<<<< * "indices in path predicates are 1-based, not 0-based") * else: */ - __Pyx_TraceLine(202,0,__PYX_ERR(0, 202, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_SyntaxError, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_SyntaxError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 202, __pyx_L1_error) + __PYX_ERR(0, 206, __pyx_L1_error) - /* "lxml/_elementpath.py":201 + /* "lxml/_elementpath.py":205 * index = int(predicate[0]) - 1 * if index < 0: * if index == -1: # <<<<<<<<<<<<<< @@ -7969,23 +7431,22 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED */ } - /* "lxml/_elementpath.py":205 + /* "lxml/_elementpath.py":209 * "indices in path predicates are 1-based, not 0-based") * else: * raise SyntaxError("path index >= 1 expected") # <<<<<<<<<<<<<< * else: * if predicate[0] != "last": */ - __Pyx_TraceLine(205,0,__PYX_ERR(0, 205, __pyx_L1_error)) /*else*/ { - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_SyntaxError, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_SyntaxError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 205, __pyx_L1_error) + __PYX_ERR(0, 209, __pyx_L1_error) } - /* "lxml/_elementpath.py":200 + /* "lxml/_elementpath.py":204 * # [index] * index = int(predicate[0]) - 1 * if index < 0: # <<<<<<<<<<<<<< @@ -7994,7 +7455,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED */ } - /* "lxml/_elementpath.py":197 + /* "lxml/_elementpath.py":201 * if signature == "-" or signature == "-()" or signature == "-()-": * # [index] or [last()] or [last()-index] * if signature == "-": # <<<<<<<<<<<<<< @@ -8004,36 +7465,34 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED goto __pyx_L26; } - /* "lxml/_elementpath.py":207 + /* "lxml/_elementpath.py":211 * raise SyntaxError("path index >= 1 expected") * else: * if predicate[0] != "last": # <<<<<<<<<<<<<< * raise SyntaxError("unsupported function") * if signature == "-()-": */ - __Pyx_TraceLine(207,0,__PYX_ERR(0, 207, __pyx_L1_error)) /*else*/ { - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_predicate, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_predicate, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_last, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 207, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_last, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_4)) { - /* "lxml/_elementpath.py":208 + /* "lxml/_elementpath.py":212 * else: * if predicate[0] != "last": * raise SyntaxError("unsupported function") # <<<<<<<<<<<<<< * if signature == "-()-": * try: */ - __Pyx_TraceLine(208,0,__PYX_ERR(0, 208, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_SyntaxError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_SyntaxError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 208, __pyx_L1_error) + __PYX_ERR(0, 212, __pyx_L1_error) - /* "lxml/_elementpath.py":207 + /* "lxml/_elementpath.py":211 * raise SyntaxError("path index >= 1 expected") * else: * if predicate[0] != "last": # <<<<<<<<<<<<<< @@ -8042,25 +7501,23 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED */ } - /* "lxml/_elementpath.py":209 + /* "lxml/_elementpath.py":213 * if predicate[0] != "last": * raise SyntaxError("unsupported function") * if signature == "-()-": # <<<<<<<<<<<<<< * try: * index = int(predicate[2]) - 1 */ - __Pyx_TraceLine(209,0,__PYX_ERR(0, 209, __pyx_L1_error)) - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_signature, __pyx_kp_s__49, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 209, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_signature, __pyx_kp_s__41, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 213, __pyx_L1_error) if (__pyx_t_4) { - /* "lxml/_elementpath.py":210 + /* "lxml/_elementpath.py":214 * raise SyntaxError("unsupported function") * if signature == "-()-": * try: # <<<<<<<<<<<<<< * index = int(predicate[2]) - 1 * except ValueError: */ - __Pyx_TraceLine(210,0,__PYX_ERR(0, 210, __pyx_L31_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -8070,27 +7527,26 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { - /* "lxml/_elementpath.py":211 + /* "lxml/_elementpath.py":215 * if signature == "-()-": * try: * index = int(predicate[2]) - 1 # <<<<<<<<<<<<<< * except ValueError: * raise SyntaxError("unsupported expression") */ - __Pyx_TraceLine(211,0,__PYX_ERR(0, 211, __pyx_L31_error)) - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_predicate, 2, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L31_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_predicate, 2, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 211, __pyx_L31_error) + __pyx_t_10 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 215, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_t_10, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L31_error) + __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_t_10, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_index = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/_elementpath.py":210 + /* "lxml/_elementpath.py":214 * raise SyntaxError("unsupported function") * if signature == "-()-": * try: # <<<<<<<<<<<<<< @@ -8109,40 +7565,38 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":212 + /* "lxml/_elementpath.py":216 * try: * index = int(predicate[2]) - 1 * except ValueError: # <<<<<<<<<<<<<< * raise SyntaxError("unsupported expression") * else: */ - __Pyx_TraceLine(212,0,__PYX_ERR(0, 212, __pyx_L33_except_error)) __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_9) { __Pyx_AddTraceback("lxml._elementpath.prepare_predicate", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_10, &__pyx_t_8) < 0) __PYX_ERR(0, 212, __pyx_L33_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_10, &__pyx_t_8) < 0) __PYX_ERR(0, 216, __pyx_L33_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_8); - /* "lxml/_elementpath.py":213 + /* "lxml/_elementpath.py":217 * index = int(predicate[2]) - 1 * except ValueError: * raise SyntaxError("unsupported expression") # <<<<<<<<<<<<<< * else: * index = -1 */ - __Pyx_TraceLine(213,0,__PYX_ERR(0, 213, __pyx_L33_except_error)) - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_SyntaxError, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 213, __pyx_L33_except_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_SyntaxError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 217, __pyx_L33_except_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, 213, __pyx_L33_except_error) + __PYX_ERR(0, 217, __pyx_L33_except_error) } goto __pyx_L33_except_error; __pyx_L33_except_error:; - /* "lxml/_elementpath.py":210 + /* "lxml/_elementpath.py":214 * raise SyntaxError("unsupported function") * if signature == "-()-": * try: # <<<<<<<<<<<<<< @@ -8157,7 +7611,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED __pyx_L36_try_end:; } - /* "lxml/_elementpath.py":209 + /* "lxml/_elementpath.py":213 * if predicate[0] != "last": * raise SyntaxError("unsupported function") * if signature == "-()-": # <<<<<<<<<<<<<< @@ -8167,14 +7621,13 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED goto __pyx_L30; } - /* "lxml/_elementpath.py":215 + /* "lxml/_elementpath.py":219 * raise SyntaxError("unsupported expression") * else: * index = -1 # <<<<<<<<<<<<<< * def select(result): * for elem in result: */ - __Pyx_TraceLine(215,0,__PYX_ERR(0, 215, __pyx_L1_error)) /*else*/ { __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); @@ -8184,33 +7637,31 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED } __pyx_L26:; - /* "lxml/_elementpath.py":216 + /* "lxml/_elementpath.py":220 * else: * index = -1 * def select(result): # <<<<<<<<<<<<<< * for elem in result: * parent = elem.getparent() */ - __Pyx_TraceLine(216,0,__PYX_ERR(0, 216, __pyx_L1_error)) - __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_17prepare_predicate_16select, 0, __pyx_n_s_prepare_predicate_locals_select, ((PyObject*)__pyx_cur_scope), __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_17prepare_predicate_16select, 0, __pyx_n_s_prepare_predicate_locals_select, ((PyObject*)__pyx_cur_scope), __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_v_select = __pyx_t_8; __pyx_t_8 = 0; - /* "lxml/_elementpath.py":228 + /* "lxml/_elementpath.py":232 * except IndexError: * pass * return select # <<<<<<<<<<<<<< * raise SyntaxError("invalid predicate") * */ - __Pyx_TraceLine(228,0,__PYX_ERR(0, 228, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_select); __pyx_r = __pyx_v_select; goto __pyx_L0; - /* "lxml/_elementpath.py":195 + /* "lxml/_elementpath.py":199 * yield elem * return select * if signature == "-" or signature == "-()" or signature == "-()-": # <<<<<<<<<<<<<< @@ -8219,21 +7670,20 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED */ } - /* "lxml/_elementpath.py":229 + /* "lxml/_elementpath.py":233 * pass * return select * raise SyntaxError("invalid predicate") # <<<<<<<<<<<<<< * * ops = { */ - __Pyx_TraceLine(229,0,__PYX_ERR(0, 229, __pyx_L1_error)) - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_SyntaxError, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 229, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_SyntaxError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(0, 229, __pyx_L1_error) + __PYX_ERR(0, 233, __pyx_L1_error) - /* "lxml/_elementpath.py":133 + /* "lxml/_elementpath.py":137 * return select * * def prepare_predicate(next, token): # <<<<<<<<<<<<<< @@ -8257,12 +7707,11 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED __Pyx_XDECREF(__pyx_v_token); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/_elementpath.py":246 +/* "lxml/_elementpath.py":250 * * * def _build_path_iterator(path, namespaces): # <<<<<<<<<<<<<< @@ -8273,7 +7722,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_13prepare_predicate(CYTHON_UNUSED /* Python wrapper */ static PyObject *__pyx_pw_4lxml_12_elementpath_16_build_path_iterator(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_12_elementpath_15_build_path_iterator[] = "compile selector pattern"; -static PyMethodDef __pyx_mdef_4lxml_12_elementpath_16_build_path_iterator = {"_build_path_iterator", (PyCFunction)__pyx_pw_4lxml_12_elementpath_16_build_path_iterator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_12_elementpath_15_build_path_iterator}; +static PyMethodDef __pyx_mdef_4lxml_12_elementpath_16_build_path_iterator = {"_build_path_iterator", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_12_elementpath_16_build_path_iterator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_12_elementpath_15_build_path_iterator}; static PyObject *__pyx_pw_4lxml_12_elementpath_16_build_path_iterator(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_path = 0; PyObject *__pyx_v_namespaces = 0; @@ -8303,11 +7752,11 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_16_build_path_iterator(PyObject * case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_namespaces)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_build_path_iterator", 1, 2, 2, 1); __PYX_ERR(0, 246, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_build_path_iterator", 1, 2, 2, 1); __PYX_ERR(0, 250, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_build_path_iterator") < 0)) __PYX_ERR(0, 246, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_build_path_iterator") < 0)) __PYX_ERR(0, 250, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -8320,7 +7769,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_16_build_path_iterator(PyObject * } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_build_path_iterator", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 246, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_build_path_iterator", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 250, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml._elementpath._build_path_iterator", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -8334,7 +7783,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_16_build_path_iterator(PyObject * } static PyObject *__pyx_gb_4lxml_12_elementpath_20_build_path_iterator_2generator11(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "lxml/_elementpath.py":257 +/* "lxml/_elementpath.py":261 * if None in namespaces: * cache_key += (namespaces[None],) + tuple(sorted( * item for item in namespaces.items() if item[0] is not None)) # <<<<<<<<<<<<<< @@ -8351,7 +7800,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_20_build_path_iterator_genexpr(Py if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_15_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 257, __pyx_L1_error) + __PYX_ERR(0, 261, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -8359,7 +7808,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_20_build_path_iterator_genexpr(Py __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_12_elementpath_20_build_path_iterator_2generator11, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_build_path_iterator_locals_gene, __pyx_n_s_lxml__elementpath); if (unlikely(!gen)) __PYX_ERR(0, 257, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_12_elementpath_20_build_path_iterator_2generator11, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_build_path_iterator_locals_gene, __pyx_n_s_lxml__elementpath); if (unlikely(!gen)) __PYX_ERR(0, 261, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -8379,7 +7828,6 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_20_build_path_iterator_2generator { struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_15_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_15_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; @@ -8389,20 +7837,18 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_20_build_path_iterator_2generator int __pyx_t_7; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); - __Pyx_TraceCall("genexpr", __pyx_f[0], 257, 0, __PYX_ERR(0, 257, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 257, __pyx_L1_error) - __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(0, 257, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 261, __pyx_L1_error) + __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(0, 261, __pyx_L1_error) __Pyx_GOTREF(__pyx_r); - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_namespaces)) { __Pyx_RaiseClosureNameError("namespaces"); __PYX_ERR(0, 257, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_namespaces, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 257, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_namespaces)) { __Pyx_RaiseClosureNameError("namespaces"); __PYX_ERR(0, 261, __pyx_L1_error) } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_namespaces, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -8414,21 +7860,18 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_20_build_path_iterator_2generator __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L1_error) - } + __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, 261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; 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_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 257, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 257, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 261, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -8436,17 +7879,17 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_20_build_path_iterator_2generator if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= 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_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 257, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 261, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= 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_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 257, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 261, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -8456,7 +7899,7 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_20_build_path_iterator_2generator PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 257, __pyx_L1_error) + else __PYX_ERR(0, 261, __pyx_L1_error) } break; } @@ -8466,13 +7909,13 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_20_build_path_iterator_2generator __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_item, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_item, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_item, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = (__pyx_t_1 != Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { - if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_cur_scope->__pyx_v_item))) __PYX_ERR(0, 257, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_cur_scope->__pyx_v_item))) __PYX_ERR(0, 261, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -8488,15 +7931,16 @@ static PyObject *__pyx_gb_4lxml_12_elementpath_20_build_path_iterator_2generator __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/_elementpath.py":246 +/* "lxml/_elementpath.py":250 * * * def _build_path_iterator(path, namespaces): # <<<<<<<<<<<<<< @@ -8512,7 +7956,6 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU PyObject *__pyx_v_token = NULL; PyObject *__pyx_v_selector = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -8526,50 +7969,46 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU PyObject *__pyx_t_10 = NULL; int __pyx_t_11; Py_ssize_t __pyx_t_12; - __Pyx_TraceFrameInit(__pyx_codeobj__57) __Pyx_RefNannySetupContext("_build_path_iterator", 0); __pyx_cur_scope = (struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_14__build_path_iterator *)__pyx_tp_new_4lxml_12_elementpath___pyx_scope_struct_14__build_path_iterator(__pyx_ptype_4lxml_12_elementpath___pyx_scope_struct_14__build_path_iterator, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_4lxml_12_elementpath___pyx_scope_struct_14__build_path_iterator *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 246, __pyx_L1_error) + __PYX_ERR(0, 250, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } - __Pyx_TraceCall("_build_path_iterator", __pyx_f[0], 246, 0, __PYX_ERR(0, 246, __pyx_L1_error)); __pyx_cur_scope->__pyx_v_namespaces = __pyx_v_namespaces; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_namespaces); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_namespaces); __Pyx_INCREF(__pyx_v_path); - /* "lxml/_elementpath.py":248 + /* "lxml/_elementpath.py":252 * def _build_path_iterator(path, namespaces): * """compile selector pattern""" * if path[-1:] == "/": # <<<<<<<<<<<<<< * path += "*" # implicit all (FIXME: keep this?) * */ - __Pyx_TraceLine(248,0,__PYX_ERR(0, 248, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_path, -1L, 0, NULL, NULL, &__pyx_slice__58, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_path, -1L, 0, NULL, NULL, &__pyx_slice__49, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__59, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 248, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__50, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "lxml/_elementpath.py":249 + /* "lxml/_elementpath.py":253 * """compile selector pattern""" * if path[-1:] == "/": * path += "*" # implicit all (FIXME: keep this?) # <<<<<<<<<<<<<< * * cache_key = (path,) */ - __Pyx_TraceLine(249,0,__PYX_ERR(0, 249, __pyx_L1_error)) - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_path, __pyx_kp_s__9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error) + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_path, __pyx_kp_s__7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":248 + /* "lxml/_elementpath.py":252 * def _build_path_iterator(path, namespaces): * """compile selector pattern""" * if path[-1:] == "/": # <<<<<<<<<<<<<< @@ -8578,15 +8017,14 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU */ } - /* "lxml/_elementpath.py":251 + /* "lxml/_elementpath.py":255 * path += "*" # implicit all (FIXME: keep this?) * * cache_key = (path,) # <<<<<<<<<<<<<< * if namespaces: * if '' in namespaces: */ - __Pyx_TraceLine(251,0,__PYX_ERR(0, 251, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_path); __Pyx_GIVEREF(__pyx_v_path); @@ -8594,44 +8032,41 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU __pyx_v_cache_key = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":252 + /* "lxml/_elementpath.py":256 * * cache_key = (path,) * if namespaces: # <<<<<<<<<<<<<< * if '' in namespaces: * raise ValueError("empty namespace prefix must be passed as None, not the empty string") */ - __Pyx_TraceLine(252,0,__PYX_ERR(0, 252, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_namespaces); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 252, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_namespaces); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 256, __pyx_L1_error) if (__pyx_t_2) { - /* "lxml/_elementpath.py":253 + /* "lxml/_elementpath.py":257 * cache_key = (path,) * if namespaces: * if '' in namespaces: # <<<<<<<<<<<<<< * raise ValueError("empty namespace prefix must be passed as None, not the empty string") * if None in namespaces: */ - __Pyx_TraceLine(253,0,__PYX_ERR(0, 253, __pyx_L1_error)) - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s__24, __pyx_cur_scope->__pyx_v_namespaces, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 253, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s__17, __pyx_cur_scope->__pyx_v_namespaces, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 257, __pyx_L1_error) __pyx_t_3 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_3)) { - /* "lxml/_elementpath.py":254 + /* "lxml/_elementpath.py":258 * if namespaces: * if '' in namespaces: * raise ValueError("empty namespace prefix must be passed as None, not the empty string") # <<<<<<<<<<<<<< * if None in namespaces: * cache_key += (namespaces[None],) + tuple(sorted( */ - __Pyx_TraceLine(254,0,__PYX_ERR(0, 254, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 254, __pyx_L1_error) + __PYX_ERR(0, 258, __pyx_L1_error) - /* "lxml/_elementpath.py":253 + /* "lxml/_elementpath.py":257 * cache_key = (path,) * if namespaces: * if '' in namespaces: # <<<<<<<<<<<<<< @@ -8640,77 +8075,73 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU */ } - /* "lxml/_elementpath.py":255 + /* "lxml/_elementpath.py":259 * if '' in namespaces: * raise ValueError("empty namespace prefix must be passed as None, not the empty string") * if None in namespaces: # <<<<<<<<<<<<<< * cache_key += (namespaces[None],) + tuple(sorted( * item for item in namespaces.items() if item[0] is not None)) */ - __Pyx_TraceLine(255,0,__PYX_ERR(0, 255, __pyx_L1_error)) - __pyx_t_3 = (__Pyx_PySequence_ContainsTF(Py_None, __pyx_cur_scope->__pyx_v_namespaces, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 255, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PySequence_ContainsTF(Py_None, __pyx_cur_scope->__pyx_v_namespaces, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 259, __pyx_L1_error) __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "lxml/_elementpath.py":256 + /* "lxml/_elementpath.py":260 * raise ValueError("empty namespace prefix must be passed as None, not the empty string") * if None in namespaces: * cache_key += (namespaces[None],) + tuple(sorted( # <<<<<<<<<<<<<< * item for item in namespaces.items() if item[0] is not None)) * else: */ - __Pyx_TraceLine(256,0,__PYX_ERR(0, 256, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_cur_scope->__pyx_v_namespaces, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_cur_scope->__pyx_v_namespaces, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":257 + /* "lxml/_elementpath.py":261 * if None in namespaces: * cache_key += (namespaces[None],) + tuple(sorted( * item for item in namespaces.items() if item[0] is not None)) # <<<<<<<<<<<<<< * else: * cache_key += tuple(sorted(namespaces.items())) */ - __Pyx_TraceLine(257,0,__PYX_ERR(0, 257, __pyx_L1_error)) - __pyx_t_5 = __pyx_pf_4lxml_12_elementpath_20_build_path_iterator_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 257, __pyx_L1_error) + __pyx_t_5 = __pyx_pf_4lxml_12_elementpath_20_build_path_iterator_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - /* "lxml/_elementpath.py":256 + /* "lxml/_elementpath.py":260 * raise ValueError("empty namespace prefix must be passed as None, not the empty string") * if None in namespaces: * cache_key += (namespaces[None],) + tuple(sorted( # <<<<<<<<<<<<<< * item for item in namespaces.items() if item[0] is not None)) * else: */ - __Pyx_TraceLine(256,0,__PYX_ERR(0, 256, __pyx_L1_error)) - __pyx_t_6 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 256, __pyx_L1_error) + __pyx_t_6 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_7 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 256, __pyx_L1_error) + __pyx_t_7 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 260, __pyx_L1_error) if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 256, __pyx_L1_error) + __PYX_ERR(0, 260, __pyx_L1_error) } - __pyx_t_6 = PyList_AsTuple(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 256, __pyx_L1_error) + __pyx_t_6 = PyList_AsTuple(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Add(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_cache_key, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 256, __pyx_L1_error) + __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_cache_key, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_cache_key, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; - /* "lxml/_elementpath.py":255 + /* "lxml/_elementpath.py":259 * if '' in namespaces: * raise ValueError("empty namespace prefix must be passed as None, not the empty string") * if None in namespaces: # <<<<<<<<<<<<<< @@ -8720,16 +8151,15 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU goto __pyx_L6; } - /* "lxml/_elementpath.py":259 + /* "lxml/_elementpath.py":263 * item for item in namespaces.items() if item[0] is not None)) * else: * cache_key += tuple(sorted(namespaces.items())) # <<<<<<<<<<<<<< * * try: */ - __Pyx_TraceLine(259,0,__PYX_ERR(0, 259, __pyx_L1_error)) /*else*/ { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_namespaces, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 259, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_namespaces, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -8741,28 +8171,25 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error) - } + __pyx_t_1 = (__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_1)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 259, __pyx_L1_error) + __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = PyList_Sort(__pyx_t_6); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 259, __pyx_L1_error) + __pyx_t_7 = PyList_Sort(__pyx_t_6); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 263, __pyx_L1_error) if (unlikely(__pyx_t_6 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 259, __pyx_L1_error) + __PYX_ERR(0, 263, __pyx_L1_error) } - __pyx_t_4 = PyList_AsTuple(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 259, __pyx_L1_error) + __pyx_t_4 = PyList_AsTuple(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_cache_key, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 259, __pyx_L1_error) + __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_cache_key, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_cache_key, ((PyObject*)__pyx_t_6)); @@ -8770,7 +8197,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU } __pyx_L6:; - /* "lxml/_elementpath.py":252 + /* "lxml/_elementpath.py":256 * * cache_key = (path,) * if namespaces: # <<<<<<<<<<<<<< @@ -8779,14 +8206,13 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU */ } - /* "lxml/_elementpath.py":261 + /* "lxml/_elementpath.py":265 * cache_key += tuple(sorted(namespaces.items())) * * try: # <<<<<<<<<<<<<< * return _cache[cache_key] * except KeyError: */ - __Pyx_TraceLine(261,0,__PYX_ERR(0, 261, __pyx_L7_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -8796,25 +8222,24 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - /* "lxml/_elementpath.py":262 + /* "lxml/_elementpath.py":266 * * try: * return _cache[cache_key] # <<<<<<<<<<<<<< * except KeyError: * pass */ - __Pyx_TraceLine(262,0,__PYX_ERR(0, 262, __pyx_L7_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_cache); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 262, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_cache); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 266, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_v_cache_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 262, __pyx_L7_error) + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_v_cache_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 266, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L11_try_return; - /* "lxml/_elementpath.py":261 + /* "lxml/_elementpath.py":265 * cache_key += tuple(sorted(namespaces.items())) * * try: # <<<<<<<<<<<<<< @@ -8828,14 +8253,13 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/_elementpath.py":263 + /* "lxml/_elementpath.py":267 * try: * return _cache[cache_key] * except KeyError: # <<<<<<<<<<<<<< * pass * if len(_cache) > 100: */ - __Pyx_TraceLine(263,0,__PYX_ERR(0, 263, __pyx_L9_except_error)) __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_11) { __Pyx_ErrRestore(0,0,0); @@ -8844,7 +8268,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU goto __pyx_L9_except_error; __pyx_L9_except_error:; - /* "lxml/_elementpath.py":261 + /* "lxml/_elementpath.py":265 * cache_key += tuple(sorted(namespaces.items())) * * try: # <<<<<<<<<<<<<< @@ -8869,32 +8293,30 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); } - /* "lxml/_elementpath.py":265 + /* "lxml/_elementpath.py":269 * except KeyError: * pass * if len(_cache) > 100: # <<<<<<<<<<<<<< * _cache.clear() * */ - __Pyx_TraceLine(265,0,__PYX_ERR(0, 265, __pyx_L1_error)) - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_cache); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 265, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_cache); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_12 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 265, __pyx_L1_error) + __pyx_t_12 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 269, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = ((__pyx_t_12 > 0x64) != 0); if (__pyx_t_2) { - /* "lxml/_elementpath.py":266 + /* "lxml/_elementpath.py":270 * pass * if len(_cache) > 100: * _cache.clear() # <<<<<<<<<<<<<< * * if path[:1] == "/": */ - __Pyx_TraceLine(266,0,__PYX_ERR(0, 266, __pyx_L1_error)) - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_cache); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_cache); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_clear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_clear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -8907,17 +8329,14 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU __Pyx_DECREF_SET(__pyx_t_1, function); } } - if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 266, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 266, __pyx_L1_error) - } + __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, 270, __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/_elementpath.py":265 + /* "lxml/_elementpath.py":269 * except KeyError: * pass * if len(_cache) > 100: # <<<<<<<<<<<<<< @@ -8926,35 +8345,33 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU */ } - /* "lxml/_elementpath.py":268 + /* "lxml/_elementpath.py":272 * _cache.clear() * * if path[:1] == "/": # <<<<<<<<<<<<<< * raise SyntaxError("cannot use absolute path on element") * stream = iter(xpath_tokenizer(path, namespaces)) */ - __Pyx_TraceLine(268,0,__PYX_ERR(0, 268, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_path, 0, 1, NULL, NULL, &__pyx_slice__61, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 268, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_path, 0, 1, NULL, NULL, &__pyx_slice__20, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_kp_s__59, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 268, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_kp_s__50, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 272, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__pyx_t_2)) { - /* "lxml/_elementpath.py":269 + /* "lxml/_elementpath.py":273 * * if path[:1] == "/": * raise SyntaxError("cannot use absolute path on element") # <<<<<<<<<<<<<< * stream = iter(xpath_tokenizer(path, namespaces)) * try: */ - __Pyx_TraceLine(269,0,__PYX_ERR(0, 269, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_SyntaxError, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 269, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_SyntaxError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 273, __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, 269, __pyx_L1_error) + __PYX_ERR(0, 273, __pyx_L1_error) - /* "lxml/_elementpath.py":268 + /* "lxml/_elementpath.py":272 * _cache.clear() * * if path[:1] == "/": # <<<<<<<<<<<<<< @@ -8963,15 +8380,14 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU */ } - /* "lxml/_elementpath.py":270 + /* "lxml/_elementpath.py":274 * if path[:1] == "/": * raise SyntaxError("cannot use absolute path on element") * stream = iter(xpath_tokenizer(path, namespaces)) # <<<<<<<<<<<<<< * try: * _next = stream.next */ - __Pyx_TraceLine(270,0,__PYX_ERR(0, 270, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_xpath_tokenizer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_xpath_tokenizer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; __pyx_t_11 = 0; @@ -8988,7 +8404,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_path, __pyx_cur_scope->__pyx_v_namespaces}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 270, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -8996,13 +8412,13 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_path, __pyx_cur_scope->__pyx_v_namespaces}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 270, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { - __pyx_t_5 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 270, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -9013,25 +8429,24 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU __Pyx_INCREF(__pyx_cur_scope->__pyx_v_namespaces); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_namespaces); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_11, __pyx_cur_scope->__pyx_v_namespaces); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 270, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error) + __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_stream = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/_elementpath.py":271 + /* "lxml/_elementpath.py":275 * raise SyntaxError("cannot use absolute path on element") * stream = iter(xpath_tokenizer(path, namespaces)) * try: # <<<<<<<<<<<<<< * _next = stream.next * except AttributeError: */ - __Pyx_TraceLine(271,0,__PYX_ERR(0, 271, __pyx_L15_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -9041,20 +8456,19 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { - /* "lxml/_elementpath.py":272 + /* "lxml/_elementpath.py":276 * stream = iter(xpath_tokenizer(path, namespaces)) * try: * _next = stream.next # <<<<<<<<<<<<<< * except AttributeError: * # Python 3 */ - __Pyx_TraceLine(272,0,__PYX_ERR(0, 272, __pyx_L15_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L15_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__next = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/_elementpath.py":271 + /* "lxml/_elementpath.py":275 * raise SyntaxError("cannot use absolute path on element") * stream = iter(xpath_tokenizer(path, namespaces)) * try: # <<<<<<<<<<<<<< @@ -9072,43 +8486,41 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":273 + /* "lxml/_elementpath.py":277 * try: * _next = stream.next * except AttributeError: # <<<<<<<<<<<<<< * # Python 3 * _next = stream.__next__ */ - __Pyx_TraceLine(273,0,__PYX_ERR(0, 273, __pyx_L17_except_error)) __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_11) { __Pyx_AddTraceback("lxml._elementpath._build_path_iterator", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 273, __pyx_L17_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 277, __pyx_L17_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); - /* "lxml/_elementpath.py":275 + /* "lxml/_elementpath.py":279 * except AttributeError: * # Python 3 * _next = stream.__next__ # <<<<<<<<<<<<<< * try: * token = _next() */ - __Pyx_TraceLine(275,0,__PYX_ERR(0, 275, __pyx_L17_except_error)) - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s_next_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 275, __pyx_L17_except_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s_next_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 279, __pyx_L17_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v__next, __pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L16_exception_handled; } goto __pyx_L17_except_error; __pyx_L17_except_error:; - /* "lxml/_elementpath.py":271 + /* "lxml/_elementpath.py":275 * raise SyntaxError("cannot use absolute path on element") * stream = iter(xpath_tokenizer(path, namespaces)) * try: # <<<<<<<<<<<<<< @@ -9128,14 +8540,13 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU __pyx_L20_try_end:; } - /* "lxml/_elementpath.py":276 + /* "lxml/_elementpath.py":280 * # Python 3 * _next = stream.__next__ * try: # <<<<<<<<<<<<<< * token = _next() * except StopIteration: */ - __Pyx_TraceLine(276,0,__PYX_ERR(0, 276, __pyx_L23_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -9145,14 +8556,13 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - /* "lxml/_elementpath.py":277 + /* "lxml/_elementpath.py":281 * _next = stream.__next__ * try: * token = _next() # <<<<<<<<<<<<<< * except StopIteration: * raise SyntaxError("empty path expression") */ - __Pyx_TraceLine(277,0,__PYX_ERR(0, 277, __pyx_L23_error)) __Pyx_INCREF(__pyx_v__next); __pyx_t_4 = __pyx_v__next; __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -9164,18 +8574,15 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_1) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 277, __pyx_L23_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else { - __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 277, __pyx_L23_error) - } + __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 281, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_token = __pyx_t_5; __pyx_t_5 = 0; - /* "lxml/_elementpath.py":276 + /* "lxml/_elementpath.py":280 * # Python 3 * _next = stream.__next__ * try: # <<<<<<<<<<<<<< @@ -9193,40 +8600,38 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/_elementpath.py":278 + /* "lxml/_elementpath.py":282 * try: * token = _next() * except StopIteration: # <<<<<<<<<<<<<< * raise SyntaxError("empty path expression") * selector = [] */ - __Pyx_TraceLine(278,0,__PYX_ERR(0, 278, __pyx_L25_except_error)) __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_StopIteration); if (__pyx_t_11) { __Pyx_AddTraceback("lxml._elementpath._build_path_iterator", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_1) < 0) __PYX_ERR(0, 278, __pyx_L25_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_1) < 0) __PYX_ERR(0, 282, __pyx_L25_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_1); - /* "lxml/_elementpath.py":279 + /* "lxml/_elementpath.py":283 * token = _next() * except StopIteration: * raise SyntaxError("empty path expression") # <<<<<<<<<<<<<< * selector = [] * while 1: */ - __Pyx_TraceLine(279,0,__PYX_ERR(0, 279, __pyx_L25_except_error)) - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_SyntaxError, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 279, __pyx_L25_except_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_SyntaxError, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 283, __pyx_L25_except_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, 279, __pyx_L25_except_error) + __PYX_ERR(0, 283, __pyx_L25_except_error) } goto __pyx_L25_except_error; __pyx_L25_except_error:; - /* "lxml/_elementpath.py":276 + /* "lxml/_elementpath.py":280 * # Python 3 * _next = stream.__next__ * try: # <<<<<<<<<<<<<< @@ -9241,37 +8646,34 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU __pyx_L28_try_end:; } - /* "lxml/_elementpath.py":280 + /* "lxml/_elementpath.py":284 * except StopIteration: * raise SyntaxError("empty path expression") * selector = [] # <<<<<<<<<<<<<< * while 1: * try: */ - __Pyx_TraceLine(280,0,__PYX_ERR(0, 280, __pyx_L1_error)) - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_selector = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":281 + /* "lxml/_elementpath.py":285 * raise SyntaxError("empty path expression") * selector = [] * while 1: # <<<<<<<<<<<<<< * try: * selector.append(ops[token[0]](_next, token)) */ - __Pyx_TraceLine(281,0,__PYX_ERR(0, 281, __pyx_L1_error)) while (1) { - /* "lxml/_elementpath.py":282 + /* "lxml/_elementpath.py":286 * selector = [] * while 1: * try: # <<<<<<<<<<<<<< * selector.append(ops[token[0]](_next, token)) * except StopIteration: */ - __Pyx_TraceLine(282,0,__PYX_ERR(0, 282, __pyx_L33_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -9281,19 +8683,18 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { - /* "lxml/_elementpath.py":283 + /* "lxml/_elementpath.py":287 * while 1: * try: * selector.append(ops[token[0]](_next, token)) # <<<<<<<<<<<<<< * except StopIteration: * raise SyntaxError("invalid path") */ - __Pyx_TraceLine(283,0,__PYX_ERR(0, 283, __pyx_L33_error)) - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ops); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 283, __pyx_L33_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ops); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 287, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_token, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 283, __pyx_L33_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_token, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 287, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 283, __pyx_L33_error) + __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 287, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -9312,7 +8713,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v__next, __pyx_v_token}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L33_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L33_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -9320,13 +8721,13 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v__next, __pyx_v_token}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L33_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L33_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_4 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 283, __pyx_L33_error) + __pyx_t_4 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 287, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -9337,15 +8738,15 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU __Pyx_INCREF(__pyx_v_token); __Pyx_GIVEREF(__pyx_v_token); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_11, __pyx_v_token); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L33_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_selector, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 283, __pyx_L33_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_selector, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 287, __pyx_L33_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":282 + /* "lxml/_elementpath.py":286 * selector = [] * while 1: * try: # <<<<<<<<<<<<<< @@ -9363,40 +8764,38 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":284 + /* "lxml/_elementpath.py":288 * try: * selector.append(ops[token[0]](_next, token)) * except StopIteration: # <<<<<<<<<<<<<< * raise SyntaxError("invalid path") * try: */ - __Pyx_TraceLine(284,0,__PYX_ERR(0, 284, __pyx_L35_except_error)) __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_StopIteration); if (__pyx_t_11) { __Pyx_AddTraceback("lxml._elementpath._build_path_iterator", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_4) < 0) __PYX_ERR(0, 284, __pyx_L35_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_4) < 0) __PYX_ERR(0, 288, __pyx_L35_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_4); - /* "lxml/_elementpath.py":285 + /* "lxml/_elementpath.py":289 * selector.append(ops[token[0]](_next, token)) * except StopIteration: * raise SyntaxError("invalid path") # <<<<<<<<<<<<<< * try: * token = _next() */ - __Pyx_TraceLine(285,0,__PYX_ERR(0, 285, __pyx_L35_except_error)) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_SyntaxError, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 285, __pyx_L35_except_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_SyntaxError, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 289, __pyx_L35_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 285, __pyx_L35_except_error) + __PYX_ERR(0, 289, __pyx_L35_except_error) } goto __pyx_L35_except_error; __pyx_L35_except_error:; - /* "lxml/_elementpath.py":282 + /* "lxml/_elementpath.py":286 * selector = [] * while 1: * try: # <<<<<<<<<<<<<< @@ -9411,14 +8810,13 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU __pyx_L40_try_end:; } - /* "lxml/_elementpath.py":286 + /* "lxml/_elementpath.py":290 * except StopIteration: * raise SyntaxError("invalid path") * try: # <<<<<<<<<<<<<< * token = _next() * if token[0] == "/": */ - __Pyx_TraceLine(286,0,__PYX_ERR(0, 286, __pyx_L43_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -9428,14 +8826,13 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - /* "lxml/_elementpath.py":287 + /* "lxml/_elementpath.py":291 * raise SyntaxError("invalid path") * try: * token = _next() # <<<<<<<<<<<<<< * if token[0] == "/": * token = _next() */ - __Pyx_TraceLine(287,0,__PYX_ERR(0, 287, __pyx_L43_error)) __Pyx_INCREF(__pyx_v__next); __pyx_t_6 = __pyx_v__next; __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -9447,39 +8844,34 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (__pyx_t_1) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 287, __pyx_L43_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 287, __pyx_L43_error) - } + __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 291, __pyx_L43_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_token, __pyx_t_4); __pyx_t_4 = 0; - /* "lxml/_elementpath.py":288 + /* "lxml/_elementpath.py":292 * try: * token = _next() * if token[0] == "/": # <<<<<<<<<<<<<< * token = _next() * except StopIteration: */ - __Pyx_TraceLine(288,0,__PYX_ERR(0, 288, __pyx_L43_error)) - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_token, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 288, __pyx_L43_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_token, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 292, __pyx_L43_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_kp_s__59, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 288, __pyx_L43_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_kp_s__50, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 292, __pyx_L43_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { - /* "lxml/_elementpath.py":289 + /* "lxml/_elementpath.py":293 * token = _next() * if token[0] == "/": * token = _next() # <<<<<<<<<<<<<< * except StopIteration: * break */ - __Pyx_TraceLine(289,0,__PYX_ERR(0, 289, __pyx_L43_error)) __Pyx_INCREF(__pyx_v__next); __pyx_t_6 = __pyx_v__next; __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -9491,18 +8883,15 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (__pyx_t_1) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 289, __pyx_L43_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 289, __pyx_L43_error) - } + __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 293, __pyx_L43_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_token, __pyx_t_4); __pyx_t_4 = 0; - /* "lxml/_elementpath.py":288 + /* "lxml/_elementpath.py":292 * try: * token = _next() * if token[0] == "/": # <<<<<<<<<<<<<< @@ -9511,7 +8900,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU */ } - /* "lxml/_elementpath.py":286 + /* "lxml/_elementpath.py":290 * except StopIteration: * raise SyntaxError("invalid path") * try: # <<<<<<<<<<<<<< @@ -9529,30 +8918,28 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/_elementpath.py":290 + /* "lxml/_elementpath.py":294 * if token[0] == "/": * token = _next() * except StopIteration: # <<<<<<<<<<<<<< * break * _cache[cache_key] = selector */ - __Pyx_TraceLine(290,0,__PYX_ERR(0, 290, __pyx_L45_except_error)) __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_StopIteration); if (__pyx_t_11) { __Pyx_AddTraceback("lxml._elementpath._build_path_iterator", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(0, 290, __pyx_L45_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(0, 294, __pyx_L45_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_1); - /* "lxml/_elementpath.py":291 + /* "lxml/_elementpath.py":295 * token = _next() * except StopIteration: * break # <<<<<<<<<<<<<< * _cache[cache_key] = selector * return selector */ - __Pyx_TraceLine(291,0,__PYX_ERR(0, 291, __pyx_L45_except_error)) goto __pyx_L52_except_break; __pyx_L52_except_break:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -9563,7 +8950,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU goto __pyx_L45_except_error; __pyx_L45_except_error:; - /* "lxml/_elementpath.py":286 + /* "lxml/_elementpath.py":290 * except StopIteration: * raise SyntaxError("invalid path") * try: # <<<<<<<<<<<<<< @@ -9586,33 +8973,31 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU } __pyx_L32_break:; - /* "lxml/_elementpath.py":292 + /* "lxml/_elementpath.py":296 * except StopIteration: * break * _cache[cache_key] = selector # <<<<<<<<<<<<<< * return selector * */ - __Pyx_TraceLine(292,0,__PYX_ERR(0, 292, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cache); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 292, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_cache); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_cache_key, __pyx_v_selector) < 0)) __PYX_ERR(0, 292, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_cache_key, __pyx_v_selector) < 0)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":293 + /* "lxml/_elementpath.py":297 * break * _cache[cache_key] = selector * return selector # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(293,0,__PYX_ERR(0, 293, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_selector); __pyx_r = __pyx_v_selector; goto __pyx_L0; - /* "lxml/_elementpath.py":246 + /* "lxml/_elementpath.py":250 * * * def _build_path_iterator(path, namespaces): # <<<<<<<<<<<<<< @@ -9637,12 +9022,11 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU __Pyx_XDECREF(__pyx_v_path); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/_elementpath.py":299 +/* "lxml/_elementpath.py":303 * # Iterate over the matching nodes * * def iterfind(elem, path, namespaces=None): # <<<<<<<<<<<<<< @@ -9652,7 +9036,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_15_build_path_iterator(CYTHON_UNU /* Python wrapper */ static PyObject *__pyx_pw_4lxml_12_elementpath_18iterfind(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_12_elementpath_18iterfind = {"iterfind", (PyCFunction)__pyx_pw_4lxml_12_elementpath_18iterfind, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_12_elementpath_18iterfind = {"iterfind", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_12_elementpath_18iterfind, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_12_elementpath_18iterfind(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_elem = 0; PyObject *__pyx_v_path = 0; @@ -9686,7 +9070,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_18iterfind(PyObject *__pyx_self, case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("iterfind", 0, 2, 3, 1); __PYX_ERR(0, 299, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("iterfind", 0, 2, 3, 1); __PYX_ERR(0, 303, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -9696,7 +9080,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_18iterfind(PyObject *__pyx_self, } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "iterfind") < 0)) __PYX_ERR(0, 299, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "iterfind") < 0)) __PYX_ERR(0, 303, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -9714,7 +9098,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_18iterfind(PyObject *__pyx_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("iterfind", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 299, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("iterfind", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 303, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml._elementpath.iterfind", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -9732,7 +9116,6 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_17iterfind(CYTHON_UNUSED PyObject PyObject *__pyx_v_result = NULL; PyObject *__pyx_v_select = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -9741,20 +9124,16 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_17iterfind(CYTHON_UNUSED PyObject PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); - PyObject *__pyx_t_8 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__65) __Pyx_RefNannySetupContext("iterfind", 0); - __Pyx_TraceCall("iterfind", __pyx_f[0], 299, 0, __PYX_ERR(0, 299, __pyx_L1_error)); - /* "lxml/_elementpath.py":300 + /* "lxml/_elementpath.py":304 * * def iterfind(elem, path, namespaces=None): * selector = _build_path_iterator(path, namespaces) # <<<<<<<<<<<<<< * result = iter((elem,)) * for select in selector: */ - __Pyx_TraceLine(300,0,__PYX_ERR(0, 300, __pyx_L1_error)) - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_build_path_iterator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_build_path_iterator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -9771,7 +9150,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_17iterfind(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_path, __pyx_v_namespaces}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -9779,13 +9158,13 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_17iterfind(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_path, __pyx_v_namespaces}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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, 300, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 304, __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; @@ -9796,7 +9175,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_17iterfind(CYTHON_UNUSED PyObject __Pyx_INCREF(__pyx_v_namespaces); __Pyx_GIVEREF(__pyx_v_namespaces); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_namespaces); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -9804,57 +9183,55 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_17iterfind(CYTHON_UNUSED PyObject __pyx_v_selector = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/_elementpath.py":301 + /* "lxml/_elementpath.py":305 * def iterfind(elem, path, namespaces=None): * selector = _build_path_iterator(path, namespaces) * result = iter((elem,)) # <<<<<<<<<<<<<< * for select in selector: * result = select(result) */ - __Pyx_TraceLine(301,0,__PYX_ERR(0, 301, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_elem); __Pyx_GIVEREF(__pyx_v_elem); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_elem); - __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_result = __pyx_t_2; __pyx_t_2 = 0; - /* "lxml/_elementpath.py":302 + /* "lxml/_elementpath.py":306 * selector = _build_path_iterator(path, namespaces) * result = iter((elem,)) * for select in selector: # <<<<<<<<<<<<<< * result = select(result) * return result */ - __Pyx_TraceLine(302,0,__PYX_ERR(0, 302, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_v_selector)) || PyTuple_CheckExact(__pyx_v_selector)) { __pyx_t_2 = __pyx_v_selector; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_selector); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_selector); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 302, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 306, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { 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, 302, __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, 306, __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, 302, __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, 306, __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, 302, __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, 306, __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, 302, __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, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -9864,7 +9241,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_17iterfind(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, 302, __pyx_L1_error) + else __PYX_ERR(0, 306, __pyx_L1_error) } break; } @@ -9873,14 +9250,13 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_17iterfind(CYTHON_UNUSED PyObject __Pyx_XDECREF_SET(__pyx_v_select, __pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":303 + /* "lxml/_elementpath.py":307 * result = iter((elem,)) * for select in selector: * result = select(result) # <<<<<<<<<<<<<< * return result * */ - __Pyx_TraceLine(303,0,__PYX_ERR(0, 303, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_select); __pyx_t_5 = __pyx_v_select; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -9892,67 +9268,37 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_17iterfind(CYTHON_UNUSED PyObject __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_result}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_result}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 303, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_v_result); - __Pyx_GIVEREF(__pyx_v_result); - PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_result); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_v_result) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_result); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":302 + /* "lxml/_elementpath.py":306 * selector = _build_path_iterator(path, namespaces) * result = iter((elem,)) * for select in selector: # <<<<<<<<<<<<<< * result = select(result) * return result */ - __Pyx_TraceLine(302,0,__PYX_ERR(0, 302, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/_elementpath.py":304 + /* "lxml/_elementpath.py":308 * for select in selector: * result = select(result) * return result # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(304,0,__PYX_ERR(0, 304, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "lxml/_elementpath.py":299 + /* "lxml/_elementpath.py":303 * # Iterate over the matching nodes * * def iterfind(elem, path, namespaces=None): # <<<<<<<<<<<<<< @@ -9966,7 +9312,6 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_17iterfind(CYTHON_UNUSED PyObject __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("lxml._elementpath.iterfind", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -9974,12 +9319,11 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_17iterfind(CYTHON_UNUSED PyObject __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_select); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/_elementpath.py":310 +/* "lxml/_elementpath.py":314 * # Find first matching object. * * def find(elem, path, namespaces=None): # <<<<<<<<<<<<<< @@ -9989,7 +9333,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_17iterfind(CYTHON_UNUSED PyObject /* Python wrapper */ static PyObject *__pyx_pw_4lxml_12_elementpath_20find(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_12_elementpath_20find = {"find", (PyCFunction)__pyx_pw_4lxml_12_elementpath_20find, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_12_elementpath_20find = {"find", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_12_elementpath_20find, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_12_elementpath_20find(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_elem = 0; PyObject *__pyx_v_path = 0; @@ -10023,7 +9367,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_20find(PyObject *__pyx_self, PyOb case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("find", 0, 2, 3, 1); __PYX_ERR(0, 310, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("find", 0, 2, 3, 1); __PYX_ERR(0, 314, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -10033,7 +9377,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_20find(PyObject *__pyx_self, PyOb } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "find") < 0)) __PYX_ERR(0, 310, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "find") < 0)) __PYX_ERR(0, 314, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -10051,7 +9395,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_20find(PyObject *__pyx_self, PyOb } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("find", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 310, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("find", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 314, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml._elementpath.find", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -10067,7 +9411,6 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_20find(PyObject *__pyx_self, PyOb static PyObject *__pyx_pf_4lxml_12_elementpath_19find(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_elem, PyObject *__pyx_v_path, PyObject *__pyx_v_namespaces) { PyObject *__pyx_v_it = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -10077,19 +9420,16 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_19find(CYTHON_UNUSED PyObject *__ PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__66) __Pyx_RefNannySetupContext("find", 0); - __Pyx_TraceCall("find", __pyx_f[0], 310, 0, __PYX_ERR(0, 310, __pyx_L1_error)); - /* "lxml/_elementpath.py":311 + /* "lxml/_elementpath.py":315 * * def find(elem, path, namespaces=None): * it = iterfind(elem, path, namespaces) # <<<<<<<<<<<<<< * try: * return next(it) */ - __Pyx_TraceLine(311,0,__PYX_ERR(0, 311, __pyx_L1_error)) - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_iterfind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 311, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_iterfind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -10106,7 +9446,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_19find(CYTHON_UNUSED PyObject *__ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_elem, __pyx_v_path, __pyx_v_namespaces}; - __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(0, 311, __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(0, 315, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -10114,13 +9454,13 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_19find(CYTHON_UNUSED PyObject *__ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_elem, __pyx_v_path, __pyx_v_namespaces}; - __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(0, 311, __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(0, 315, __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(0, 311, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 315, __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; @@ -10134,7 +9474,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_19find(CYTHON_UNUSED PyObject *__ __Pyx_INCREF(__pyx_v_namespaces); __Pyx_GIVEREF(__pyx_v_namespaces); PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_namespaces); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -10142,14 +9482,13 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_19find(CYTHON_UNUSED PyObject *__ __pyx_v_it = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/_elementpath.py":312 + /* "lxml/_elementpath.py":316 * def find(elem, path, namespaces=None): * it = iterfind(elem, path, namespaces) * try: # <<<<<<<<<<<<<< * return next(it) * except StopIteration: */ - __Pyx_TraceLine(312,0,__PYX_ERR(0, 312, __pyx_L3_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -10159,22 +9498,21 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_19find(CYTHON_UNUSED PyObject *__ __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { - /* "lxml/_elementpath.py":313 + /* "lxml/_elementpath.py":317 * it = iterfind(elem, path, namespaces) * try: * return next(it) # <<<<<<<<<<<<<< * except StopIteration: * return None */ - __Pyx_TraceLine(313,0,__PYX_ERR(0, 313, __pyx_L3_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyIter_Next(__pyx_v_it); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L3_error) + __pyx_t_1 = __Pyx_PyIter_Next(__pyx_v_it); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 317, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L7_try_return; - /* "lxml/_elementpath.py":312 + /* "lxml/_elementpath.py":316 * def find(elem, path, namespaces=None): * it = iterfind(elem, path, namespaces) * try: # <<<<<<<<<<<<<< @@ -10188,30 +9526,28 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_19find(CYTHON_UNUSED PyObject *__ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":314 + /* "lxml/_elementpath.py":318 * try: * return next(it) * except StopIteration: # <<<<<<<<<<<<<< * return None * */ - __Pyx_TraceLine(314,0,__PYX_ERR(0, 314, __pyx_L5_except_error)) __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_StopIteration); if (__pyx_t_4) { __Pyx_AddTraceback("lxml._elementpath.find", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_5) < 0) __PYX_ERR(0, 314, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_5) < 0) __PYX_ERR(0, 318, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_5); - /* "lxml/_elementpath.py":315 + /* "lxml/_elementpath.py":319 * return next(it) * except StopIteration: * return None # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(315,0,__PYX_ERR(0, 315, __pyx_L5_except_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -10222,7 +9558,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_19find(CYTHON_UNUSED PyObject *__ goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "lxml/_elementpath.py":312 + /* "lxml/_elementpath.py":316 * def find(elem, path, namespaces=None): * it = iterfind(elem, path, namespaces) * try: # <<<<<<<<<<<<<< @@ -10248,7 +9584,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_19find(CYTHON_UNUSED PyObject *__ goto __pyx_L0; } - /* "lxml/_elementpath.py":310 + /* "lxml/_elementpath.py":314 * # Find first matching object. * * def find(elem, path, namespaces=None): # <<<<<<<<<<<<<< @@ -10267,12 +9603,11 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_19find(CYTHON_UNUSED PyObject *__ __pyx_L0:; __Pyx_XDECREF(__pyx_v_it); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/_elementpath.py":321 +/* "lxml/_elementpath.py":325 * # Find all matching objects. * * def findall(elem, path, namespaces=None): # <<<<<<<<<<<<<< @@ -10282,7 +9617,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_19find(CYTHON_UNUSED PyObject *__ /* Python wrapper */ static PyObject *__pyx_pw_4lxml_12_elementpath_22findall(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_12_elementpath_22findall = {"findall", (PyCFunction)__pyx_pw_4lxml_12_elementpath_22findall, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_12_elementpath_22findall = {"findall", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_12_elementpath_22findall, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_12_elementpath_22findall(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_elem = 0; PyObject *__pyx_v_path = 0; @@ -10316,7 +9651,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_22findall(PyObject *__pyx_self, P case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("findall", 0, 2, 3, 1); __PYX_ERR(0, 321, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("findall", 0, 2, 3, 1); __PYX_ERR(0, 325, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -10326,7 +9661,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_22findall(PyObject *__pyx_self, P } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "findall") < 0)) __PYX_ERR(0, 321, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "findall") < 0)) __PYX_ERR(0, 325, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -10344,7 +9679,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_22findall(PyObject *__pyx_self, P } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("findall", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 321, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("findall", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 325, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml._elementpath.findall", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -10359,27 +9694,23 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_22findall(PyObject *__pyx_self, P static PyObject *__pyx_pf_4lxml_12_elementpath_21findall(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_elem, PyObject *__pyx_v_path, PyObject *__pyx_v_namespaces) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__67) __Pyx_RefNannySetupContext("findall", 0); - __Pyx_TraceCall("findall", __pyx_f[0], 321, 0, __PYX_ERR(0, 321, __pyx_L1_error)); - /* "lxml/_elementpath.py":322 + /* "lxml/_elementpath.py":326 * * def findall(elem, path, namespaces=None): * return list(iterfind(elem, path, namespaces)) # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(322,0,__PYX_ERR(0, 322, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_iterfind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_iterfind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -10396,7 +9727,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_21findall(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_elem, __pyx_v_path, __pyx_v_namespaces}; - __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(0, 322, __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(0, 326, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -10404,13 +9735,13 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_21findall(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_elem, __pyx_v_path, __pyx_v_namespaces}; - __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(0, 322, __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(0, 326, __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(0, 322, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 326, __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; @@ -10424,19 +9755,19 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_21findall(CYTHON_UNUSED PyObject __Pyx_INCREF(__pyx_v_namespaces); __Pyx_GIVEREF(__pyx_v_namespaces); PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_namespaces); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __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_t_2 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_2 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 326, __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; - /* "lxml/_elementpath.py":321 + /* "lxml/_elementpath.py":325 * # Find all matching objects. * * def findall(elem, path, namespaces=None): # <<<<<<<<<<<<<< @@ -10454,12 +9785,11 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_21findall(CYTHON_UNUSED PyObject __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/_elementpath.py":328 +/* "lxml/_elementpath.py":332 * # Find text for first matching object. * * def findtext(elem, path, default=None, namespaces=None): # <<<<<<<<<<<<<< @@ -10469,7 +9799,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_21findall(CYTHON_UNUSED PyObject /* Python wrapper */ static PyObject *__pyx_pw_4lxml_12_elementpath_24findtext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_12_elementpath_24findtext = {"findtext", (PyCFunction)__pyx_pw_4lxml_12_elementpath_24findtext, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_12_elementpath_24findtext = {"findtext", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_12_elementpath_24findtext, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_12_elementpath_24findtext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_elem = 0; PyObject *__pyx_v_path = 0; @@ -10507,7 +9837,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_24findtext(PyObject *__pyx_self, case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("findtext", 0, 2, 4, 1); __PYX_ERR(0, 328, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("findtext", 0, 2, 4, 1); __PYX_ERR(0, 332, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -10523,7 +9853,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_24findtext(PyObject *__pyx_self, } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "findtext") < 0)) __PYX_ERR(0, 328, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "findtext") < 0)) __PYX_ERR(0, 332, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -10544,7 +9874,7 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_24findtext(PyObject *__pyx_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("findtext", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 328, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("findtext", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 332, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml._elementpath.findtext", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -10560,7 +9890,6 @@ static PyObject *__pyx_pw_4lxml_12_elementpath_24findtext(PyObject *__pyx_self, static PyObject *__pyx_pf_4lxml_12_elementpath_23findtext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_elem, PyObject *__pyx_v_path, PyObject *__pyx_v_default, PyObject *__pyx_v_namespaces) { PyObject *__pyx_v_el = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -10569,19 +9898,16 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_23findtext(CYTHON_UNUSED PyObject PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; - __Pyx_TraceFrameInit(__pyx_codeobj__68) __Pyx_RefNannySetupContext("findtext", 0); - __Pyx_TraceCall("findtext", __pyx_f[0], 328, 0, __PYX_ERR(0, 328, __pyx_L1_error)); - /* "lxml/_elementpath.py":329 + /* "lxml/_elementpath.py":333 * * def findtext(elem, path, default=None, namespaces=None): * el = find(elem, path, namespaces) # <<<<<<<<<<<<<< * if el is None: * return default */ - __Pyx_TraceLine(329,0,__PYX_ERR(0, 329, __pyx_L1_error)) - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_find); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_find); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -10598,7 +9924,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_23findtext(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_elem, __pyx_v_path, __pyx_v_namespaces}; - __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(0, 329, __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(0, 333, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -10606,13 +9932,13 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_23findtext(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_elem, __pyx_v_path, __pyx_v_namespaces}; - __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(0, 329, __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(0, 333, __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(0, 329, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 333, __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; @@ -10626,7 +9952,7 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_23findtext(CYTHON_UNUSED PyObject __Pyx_INCREF(__pyx_v_namespaces); __Pyx_GIVEREF(__pyx_v_namespaces); PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_namespaces); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -10634,32 +9960,30 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_23findtext(CYTHON_UNUSED PyObject __pyx_v_el = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/_elementpath.py":330 + /* "lxml/_elementpath.py":334 * def findtext(elem, path, default=None, namespaces=None): * el = find(elem, path, namespaces) * if el is None: # <<<<<<<<<<<<<< * return default * else: */ - __Pyx_TraceLine(330,0,__PYX_ERR(0, 330, __pyx_L1_error)) __pyx_t_6 = (__pyx_v_el == Py_None); __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { - /* "lxml/_elementpath.py":331 + /* "lxml/_elementpath.py":335 * el = find(elem, path, namespaces) * if el is None: * return default # <<<<<<<<<<<<<< * else: * return el.text or '' */ - __Pyx_TraceLine(331,0,__PYX_ERR(0, 331, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_default); __pyx_r = __pyx_v_default; goto __pyx_L0; - /* "lxml/_elementpath.py":330 + /* "lxml/_elementpath.py":334 * def findtext(elem, path, default=None, namespaces=None): * el = find(elem, path, namespaces) * if el is None: # <<<<<<<<<<<<<< @@ -10668,17 +9992,16 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_23findtext(CYTHON_UNUSED PyObject */ } - /* "lxml/_elementpath.py":333 + /* "lxml/_elementpath.py":337 * return default * else: * return el.text or '' # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(333,0,__PYX_ERR(0, 333, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_text); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 333, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_text); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 333, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 337, __pyx_L1_error) if (!__pyx_t_7) { __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { @@ -10687,15 +10010,15 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_23findtext(CYTHON_UNUSED PyObject __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L4_bool_binop_done; } - __Pyx_INCREF(__pyx_kp_s__24); - __pyx_t_1 = __pyx_kp_s__24; + __Pyx_INCREF(__pyx_kp_s__17); + __pyx_t_1 = __pyx_kp_s__17; __pyx_L4_bool_binop_done:; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } - /* "lxml/_elementpath.py":328 + /* "lxml/_elementpath.py":332 * # Find text for first matching object. * * def findtext(elem, path, default=None, namespaces=None): # <<<<<<<<<<<<<< @@ -10714,7 +10037,6 @@ static PyObject *__pyx_pf_4lxml_12_elementpath_23findtext(CYTHON_UNUSED PyObject __pyx_L0:; __Pyx_XDECREF(__pyx_v_el); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -12533,6 +11855,15 @@ static struct PyModuleDef __pyx_moduledef = { (freefunc)__pyx_module_cleanup /* m_free */ }; #endif +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1}, @@ -12541,26 +11872,26 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1}, {&__pyx_n_s_SyntaxError, __pyx_k_SyntaxError, sizeof(__pyx_k_SyntaxError), 0, 0, 1, 1}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, + {&__pyx_kp_s__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 0, 1, 0}, + {&__pyx_kp_s__18, __pyx_k__18, sizeof(__pyx_k__18), 0, 0, 1, 0}, + {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0}, + {&__pyx_kp_s__21, __pyx_k__21, sizeof(__pyx_k__21), 0, 0, 1, 0}, + {&__pyx_kp_s__22, __pyx_k__22, sizeof(__pyx_k__22), 0, 0, 1, 0}, {&__pyx_kp_s__24, __pyx_k__24, sizeof(__pyx_k__24), 0, 0, 1, 0}, - {&__pyx_kp_s__26, __pyx_k__26, sizeof(__pyx_k__26), 0, 0, 1, 0}, - {&__pyx_kp_s__29, __pyx_k__29, sizeof(__pyx_k__29), 0, 0, 1, 0}, + {&__pyx_kp_s__25, __pyx_k__25, sizeof(__pyx_k__25), 0, 0, 1, 0}, + {&__pyx_kp_s__28, __pyx_k__28, sizeof(__pyx_k__28), 0, 0, 1, 0}, {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0}, - {&__pyx_kp_s__30, __pyx_k__30, sizeof(__pyx_k__30), 0, 0, 1, 0}, - {&__pyx_kp_s__32, __pyx_k__32, sizeof(__pyx_k__32), 0, 0, 1, 0}, - {&__pyx_kp_s__33, __pyx_k__33, sizeof(__pyx_k__33), 0, 0, 1, 0}, - {&__pyx_kp_s__36, __pyx_k__36, sizeof(__pyx_k__36), 0, 0, 1, 0}, - {&__pyx_n_s__39, __pyx_k__39, sizeof(__pyx_k__39), 0, 0, 1, 1}, - {&__pyx_kp_s__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 1, 0}, - {&__pyx_kp_s__42, __pyx_k__42, sizeof(__pyx_k__42), 0, 0, 1, 0}, - {&__pyx_kp_s__43, __pyx_k__43, sizeof(__pyx_k__43), 0, 0, 1, 0}, - {&__pyx_kp_s__48, __pyx_k__48, sizeof(__pyx_k__48), 0, 0, 1, 0}, - {&__pyx_kp_s__49, __pyx_k__49, sizeof(__pyx_k__49), 0, 0, 1, 0}, - {&__pyx_kp_s__59, __pyx_k__59, sizeof(__pyx_k__59), 0, 0, 1, 0}, - {&__pyx_kp_s__78, __pyx_k__78, sizeof(__pyx_k__78), 0, 0, 1, 0}, - {&__pyx_kp_s__79, __pyx_k__79, sizeof(__pyx_k__79), 0, 0, 1, 0}, - {&__pyx_kp_s__80, __pyx_k__80, sizeof(__pyx_k__80), 0, 0, 1, 0}, - {&__pyx_kp_s__81, __pyx_k__81, sizeof(__pyx_k__81), 0, 0, 1, 0}, - {&__pyx_kp_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 0}, + {&__pyx_n_s__31, __pyx_k__31, sizeof(__pyx_k__31), 0, 0, 1, 1}, + {&__pyx_kp_s__34, __pyx_k__34, sizeof(__pyx_k__34), 0, 0, 1, 0}, + {&__pyx_kp_s__35, __pyx_k__35, sizeof(__pyx_k__35), 0, 0, 1, 0}, + {&__pyx_kp_s__40, __pyx_k__40, sizeof(__pyx_k__40), 0, 0, 1, 0}, + {&__pyx_kp_s__41, __pyx_k__41, sizeof(__pyx_k__41), 0, 0, 1, 0}, + {&__pyx_kp_s__50, __pyx_k__50, sizeof(__pyx_k__50), 0, 0, 1, 0}, + {&__pyx_kp_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 0}, + {&__pyx_kp_s__70, __pyx_k__70, sizeof(__pyx_k__70), 0, 0, 1, 0}, + {&__pyx_kp_s__71, __pyx_k__71, sizeof(__pyx_k__71), 0, 0, 1, 0}, + {&__pyx_kp_s__72, __pyx_k__72, sizeof(__pyx_k__72), 0, 0, 1, 0}, + {&__pyx_kp_s__73, __pyx_k__73, sizeof(__pyx_k__73), 0, 0, 1, 0}, {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, {&__pyx_n_s_build_path_iterator, __pyx_k_build_path_iterator, sizeof(__pyx_k_build_path_iterator), 0, 0, 1, 1}, {&__pyx_n_s_build_path_iterator_locals_gene, __pyx_k_build_path_iterator_locals_gene, sizeof(__pyx_k_build_path_iterator_locals_gene), 0, 0, 1, 1}, @@ -12604,6 +11935,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_lxml__elementpath, __pyx_k_lxml__elementpath, sizeof(__pyx_k_lxml__elementpath), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_match, __pyx_k_match, sizeof(__pyx_k_match), 0, 0, 1, 1}, + {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, {&__pyx_n_s_namespaces, __pyx_k_namespaces, sizeof(__pyx_k_namespaces), 0, 0, 1, 1}, {&__pyx_n_s_next, __pyx_k_next, sizeof(__pyx_k_next), 0, 0, 1, 1}, {&__pyx_n_s_next_2, __pyx_k_next_2, sizeof(__pyx_k_next_2), 0, 0, 1, 1}, @@ -12652,521 +11984,488 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_xpath_tokenizer_re, __pyx_k_xpath_tokenizer_re, sizeof(__pyx_k_xpath_tokenizer_re), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; -static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 79, __pyx_L1_error) - __pyx_builtin_SyntaxError = __Pyx_GetBuiltinName(__pyx_n_s_SyntaxError); if (!__pyx_builtin_SyntaxError) __PYX_ERR(0, 82, __pyx_L1_error) - __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 212, __pyx_L1_error) - __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 226, __pyx_L1_error) - __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 273, __pyx_L1_error) - __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 278, __pyx_L1_error) +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { + __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 83, __pyx_L1_error) + __pyx_builtin_SyntaxError = __Pyx_GetBuiltinName(__pyx_n_s_SyntaxError); if (!__pyx_builtin_SyntaxError) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 230, __pyx_L1_error) + __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 282, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } -static int __Pyx_InitCachedConstants(void) { +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "lxml/_elementpath.py":71 - * - * def xpath_tokenizer(pattern, namespaces=None): - * default_namespace = namespaces.get(None) if namespaces else None # <<<<<<<<<<<<<< - * for token in xpath_tokenizer_re.findall(pattern): - * tag = token[1] - */ - __pyx_tuple__2 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 71, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__2); - __Pyx_GIVEREF(__pyx_tuple__2); - - /* "lxml/_elementpath.py":76 + /* "lxml/_elementpath.py":80 * if tag and tag[0] != "{": * if ":" in tag: * prefix, uri = tag.split(":", 1) # <<<<<<<<<<<<<< * try: * if not namespaces: */ - __pyx_tuple__5 = PyTuple_Pack(2, __pyx_kp_s__4, __pyx_int_1); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 76, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__5); - __Pyx_GIVEREF(__pyx_tuple__5); + __pyx_tuple__4 = PyTuple_Pack(2, __pyx_kp_s__3, __pyx_int_1); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__4); + __Pyx_GIVEREF(__pyx_tuple__4); - /* "lxml/_elementpath.py":93 + /* "lxml/_elementpath.py":97 * def prepare_child(next, token): * tag = token[1] * def select(result): # <<<<<<<<<<<<<< * for elem in result: * for e in elem.iterchildren(tag): */ - __pyx_tuple__7 = PyTuple_Pack(3, __pyx_n_s_result, __pyx_n_s_elem, __pyx_n_s_e); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 93, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__7); - __Pyx_GIVEREF(__pyx_tuple__7); - __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_select, 93, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 93, __pyx_L1_error) - - /* "lxml/_elementpath.py":102 - * def select(result): - * for elem in result: - * for e in elem.iterchildren('*'): # <<<<<<<<<<<<<< - * yield e - * return select - */ - __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s__9); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 102, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__10); - __Pyx_GIVEREF(__pyx_tuple__10); + __pyx_tuple__5 = PyTuple_Pack(3, __pyx_n_s_result, __pyx_n_s_elem, __pyx_n_s_e); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__5); + __Pyx_GIVEREF(__pyx_tuple__5); + __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__5, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_select, 97, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 97, __pyx_L1_error) - /* "lxml/_elementpath.py":100 + /* "lxml/_elementpath.py":104 * * def prepare_star(next, token): * def select(result): # <<<<<<<<<<<<<< * for elem in result: * for e in elem.iterchildren('*'): */ - __pyx_tuple__12 = PyTuple_Pack(3, __pyx_n_s_result, __pyx_n_s_elem, __pyx_n_s_e); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 100, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__12); - __Pyx_GIVEREF(__pyx_tuple__12); - __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_select, 100, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 100, __pyx_L1_error) + __pyx_tuple__8 = PyTuple_Pack(3, __pyx_n_s_result, __pyx_n_s_elem, __pyx_n_s_e); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__8); + __Pyx_GIVEREF(__pyx_tuple__8); + __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__8, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_select, 104, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(0, 104, __pyx_L1_error) - /* "lxml/_elementpath.py":107 + /* "lxml/_elementpath.py":111 * * def prepare_self(next, token): * def select(result): # <<<<<<<<<<<<<< * return result * return select */ - __pyx_tuple__15 = PyTuple_Pack(1, __pyx_n_s_result); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 107, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__15); - __Pyx_GIVEREF(__pyx_tuple__15); - __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_select, 107, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 107, __pyx_L1_error) + __pyx_tuple__10 = PyTuple_Pack(1, __pyx_n_s_result); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__10); + __Pyx_GIVEREF(__pyx_tuple__10); + __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_select, 111, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(0, 111, __pyx_L1_error) - /* "lxml/_elementpath.py":118 + /* "lxml/_elementpath.py":122 * tag = token[1] * else: * raise SyntaxError("invalid descendant") # <<<<<<<<<<<<<< * def select(result): * for elem in result: */ - __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_invalid_descendant); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 118, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__18); - __Pyx_GIVEREF(__pyx_tuple__18); + __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_invalid_descendant); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 122, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__12); + __Pyx_GIVEREF(__pyx_tuple__12); - /* "lxml/_elementpath.py":119 + /* "lxml/_elementpath.py":123 * else: * raise SyntaxError("invalid descendant") * def select(result): # <<<<<<<<<<<<<< * for elem in result: * for e in elem.iterdescendants(tag): */ - __pyx_tuple__19 = PyTuple_Pack(3, __pyx_n_s_result, __pyx_n_s_elem, __pyx_n_s_e); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 119, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__19); - __Pyx_GIVEREF(__pyx_tuple__19); - __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_select, 119, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 119, __pyx_L1_error) + __pyx_tuple__13 = PyTuple_Pack(3, __pyx_n_s_result, __pyx_n_s_elem, __pyx_n_s_e); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__13); + __Pyx_GIVEREF(__pyx_tuple__13); + __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_select, 123, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 123, __pyx_L1_error) - /* "lxml/_elementpath.py":126 + /* "lxml/_elementpath.py":130 * * def prepare_parent(next, token): * def select(result): # <<<<<<<<<<<<<< * for elem in result: * parent = elem.getparent() */ - __pyx_tuple__22 = PyTuple_Pack(3, __pyx_n_s_result, __pyx_n_s_elem, __pyx_n_s_parent); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 126, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__22); - __Pyx_GIVEREF(__pyx_tuple__22); - __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_select, 126, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_tuple__15 = PyTuple_Pack(3, __pyx_n_s_result, __pyx_n_s_elem, __pyx_n_s_parent); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__15); + __Pyx_GIVEREF(__pyx_tuple__15); + __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_select, 130, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 130, __pyx_L1_error) - /* "lxml/_elementpath.py":143 + /* "lxml/_elementpath.py":147 * if token[0] == "]": * break * if token == ('', ''): # <<<<<<<<<<<<<< * # ignore whitespace * continue */ - __pyx_tuple__27 = PyTuple_Pack(2, __pyx_kp_s__24, __pyx_kp_s__24); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 143, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__27); - __Pyx_GIVEREF(__pyx_tuple__27); + __pyx_tuple__19 = PyTuple_Pack(2, __pyx_kp_s__17, __pyx_kp_s__17); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__19); + __Pyx_GIVEREF(__pyx_tuple__19); - /* "lxml/_elementpath.py":146 + /* "lxml/_elementpath.py":150 * # ignore whitespace * continue * if token[0] and token[0][:1] in "'\"": # <<<<<<<<<<<<<< * token = "'", token[0][1:-1] * signature += token[0] or "-" */ - __pyx_slice__28 = PySlice_New(Py_None, __pyx_int_1, Py_None); if (unlikely(!__pyx_slice__28)) __PYX_ERR(0, 146, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__28); - __Pyx_GIVEREF(__pyx_slice__28); + __pyx_slice__20 = PySlice_New(Py_None, __pyx_int_1, Py_None); if (unlikely(!__pyx_slice__20)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__20); + __Pyx_GIVEREF(__pyx_slice__20); - /* "lxml/_elementpath.py":147 + /* "lxml/_elementpath.py":151 * continue * if token[0] and token[0][:1] in "'\"": * token = "'", token[0][1:-1] # <<<<<<<<<<<<<< * signature += token[0] or "-" * predicate.append(token[1]) */ - __pyx_slice__31 = PySlice_New(__pyx_int_1, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__31)) __PYX_ERR(0, 147, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__31); - __Pyx_GIVEREF(__pyx_slice__31); + __pyx_slice__23 = PySlice_New(__pyx_int_1, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__23)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__23); + __Pyx_GIVEREF(__pyx_slice__23); - /* "lxml/_elementpath.py":155 + /* "lxml/_elementpath.py":159 * # [@attribute] predicate * key = predicate[1] * def select(result): # <<<<<<<<<<<<<< * for elem in result: * if elem.get(key) is not None: */ - __pyx_tuple__34 = PyTuple_Pack(2, __pyx_n_s_result, __pyx_n_s_elem); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 155, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__34); - __Pyx_GIVEREF(__pyx_tuple__34); - __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_select, 155, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_tuple__26 = PyTuple_Pack(2, __pyx_n_s_result, __pyx_n_s_elem); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__26); + __Pyx_GIVEREF(__pyx_tuple__26); + __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_select, 159, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 159, __pyx_L1_error) - /* "lxml/_elementpath.py":164 + /* "lxml/_elementpath.py":168 * key = predicate[1] * value = predicate[-1] * def select(result): # <<<<<<<<<<<<<< * for elem in result: * if elem.get(key) == value: */ - __pyx_tuple__37 = PyTuple_Pack(2, __pyx_n_s_result, __pyx_n_s_elem); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 164, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__37); - __Pyx_GIVEREF(__pyx_tuple__37); - __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_select, 164, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 164, __pyx_L1_error) + __pyx_tuple__29 = PyTuple_Pack(2, __pyx_n_s_result, __pyx_n_s_elem); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__29); + __Pyx_GIVEREF(__pyx_tuple__29); + __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_select, 168, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 168, __pyx_L1_error) - /* "lxml/_elementpath.py":172 + /* "lxml/_elementpath.py":176 * # [tag] * tag = predicate[0] * def select(result): # <<<<<<<<<<<<<< * for elem in result: * for _ in elem.iterchildren(tag): */ - __pyx_tuple__40 = PyTuple_Pack(3, __pyx_n_s_result, __pyx_n_s_elem, __pyx_n_s__39); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 172, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__40); - __Pyx_GIVEREF(__pyx_tuple__40); - __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_select, 172, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 172, __pyx_L1_error) + __pyx_tuple__32 = PyTuple_Pack(3, __pyx_n_s_result, __pyx_n_s_elem, __pyx_n_s__31); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__32); + __Pyx_GIVEREF(__pyx_tuple__32); + __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_select, 176, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 176, __pyx_L1_error) - /* "lxml/_elementpath.py":183 + /* "lxml/_elementpath.py":187 * value = predicate[-1] * if tag: * def select(result): # <<<<<<<<<<<<<< * for elem in result: * for e in elem.iterchildren(tag): */ - __pyx_tuple__44 = PyTuple_Pack(3, __pyx_n_s_result, __pyx_n_s_elem, __pyx_n_s_e); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 183, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__44); - __Pyx_GIVEREF(__pyx_tuple__44); - __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_select, 183, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 183, __pyx_L1_error) + __pyx_tuple__36 = PyTuple_Pack(3, __pyx_n_s_result, __pyx_n_s_elem, __pyx_n_s_e); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__36); + __Pyx_GIVEREF(__pyx_tuple__36); + __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_select, 187, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 187, __pyx_L1_error) - /* "lxml/_elementpath.py":190 + /* "lxml/_elementpath.py":194 * break * else: * def select(result): # <<<<<<<<<<<<<< * for elem in result: * if "".join(elem.itertext()) == value: */ - __pyx_tuple__46 = PyTuple_Pack(2, __pyx_n_s_result, __pyx_n_s_elem); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 190, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__46); - __Pyx_GIVEREF(__pyx_tuple__46); - __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_select, 190, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 190, __pyx_L1_error) + __pyx_tuple__38 = PyTuple_Pack(2, __pyx_n_s_result, __pyx_n_s_elem); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 194, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__38); + __Pyx_GIVEREF(__pyx_tuple__38); + __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_select, 194, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 194, __pyx_L1_error) - /* "lxml/_elementpath.py":202 + /* "lxml/_elementpath.py":206 * if index < 0: * if index == -1: * raise SyntaxError( # <<<<<<<<<<<<<< * "indices in path predicates are 1-based, not 0-based") * else: */ - __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_s_indices_in_path_predicates_are_1); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 202, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__50); - __Pyx_GIVEREF(__pyx_tuple__50); + __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s_indices_in_path_predicates_are_1); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__42); + __Pyx_GIVEREF(__pyx_tuple__42); - /* "lxml/_elementpath.py":205 + /* "lxml/_elementpath.py":209 * "indices in path predicates are 1-based, not 0-based") * else: * raise SyntaxError("path index >= 1 expected") # <<<<<<<<<<<<<< * else: * if predicate[0] != "last": */ - __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_s_path_index_1_expected); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 205, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__51); - __Pyx_GIVEREF(__pyx_tuple__51); + __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_s_path_index_1_expected); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__43); + __Pyx_GIVEREF(__pyx_tuple__43); - /* "lxml/_elementpath.py":208 + /* "lxml/_elementpath.py":212 * else: * if predicate[0] != "last": * raise SyntaxError("unsupported function") # <<<<<<<<<<<<<< * if signature == "-()-": * try: */ - __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_s_unsupported_function); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 208, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__52); - __Pyx_GIVEREF(__pyx_tuple__52); + __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s_unsupported_function); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 212, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__44); + __Pyx_GIVEREF(__pyx_tuple__44); - /* "lxml/_elementpath.py":213 + /* "lxml/_elementpath.py":217 * index = int(predicate[2]) - 1 * except ValueError: * raise SyntaxError("unsupported expression") # <<<<<<<<<<<<<< * else: * index = -1 */ - __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_s_unsupported_expression); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 213, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__53); - __Pyx_GIVEREF(__pyx_tuple__53); + __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_unsupported_expression); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__45); + __Pyx_GIVEREF(__pyx_tuple__45); - /* "lxml/_elementpath.py":216 + /* "lxml/_elementpath.py":220 * else: * index = -1 * def select(result): # <<<<<<<<<<<<<< * for elem in result: * parent = elem.getparent() */ - __pyx_tuple__54 = PyTuple_Pack(4, __pyx_n_s_result, __pyx_n_s_elem, __pyx_n_s_parent, __pyx_n_s_elems); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 216, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__54); - __Pyx_GIVEREF(__pyx_tuple__54); - __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 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__elementpath_py, __pyx_n_s_select, 216, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_tuple__46 = PyTuple_Pack(4, __pyx_n_s_result, __pyx_n_s_elem, __pyx_n_s_parent, __pyx_n_s_elems); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__46); + __Pyx_GIVEREF(__pyx_tuple__46); + __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_select, 220, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 220, __pyx_L1_error) - /* "lxml/_elementpath.py":229 + /* "lxml/_elementpath.py":233 * pass * return select * raise SyntaxError("invalid predicate") # <<<<<<<<<<<<<< * * ops = { */ - __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_s_invalid_predicate); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 229, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__56); - __Pyx_GIVEREF(__pyx_tuple__56); + __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_invalid_predicate); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__48); + __Pyx_GIVEREF(__pyx_tuple__48); - /* "lxml/_elementpath.py":248 + /* "lxml/_elementpath.py":252 * def _build_path_iterator(path, namespaces): * """compile selector pattern""" * if path[-1:] == "/": # <<<<<<<<<<<<<< * path += "*" # implicit all (FIXME: keep this?) * */ - __pyx_slice__58 = PySlice_New(__pyx_int_neg_1, Py_None, Py_None); if (unlikely(!__pyx_slice__58)) __PYX_ERR(0, 248, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__58); - __Pyx_GIVEREF(__pyx_slice__58); + __pyx_slice__49 = PySlice_New(__pyx_int_neg_1, Py_None, Py_None); if (unlikely(!__pyx_slice__49)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__49); + __Pyx_GIVEREF(__pyx_slice__49); - /* "lxml/_elementpath.py":254 + /* "lxml/_elementpath.py":258 * if namespaces: * if '' in namespaces: * raise ValueError("empty namespace prefix must be passed as None, not the empty string") # <<<<<<<<<<<<<< * if None in namespaces: * cache_key += (namespaces[None],) + tuple(sorted( */ - __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_s_empty_namespace_prefix_must_be_p); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 254, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__60); - __Pyx_GIVEREF(__pyx_tuple__60); - - /* "lxml/_elementpath.py":268 - * _cache.clear() - * - * if path[:1] == "/": # <<<<<<<<<<<<<< - * raise SyntaxError("cannot use absolute path on element") - * stream = iter(xpath_tokenizer(path, namespaces)) - */ - __pyx_slice__61 = PySlice_New(Py_None, __pyx_int_1, Py_None); if (unlikely(!__pyx_slice__61)) __PYX_ERR(0, 268, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__61); - __Pyx_GIVEREF(__pyx_slice__61); + __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_s_empty_namespace_prefix_must_be_p); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 258, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__51); + __Pyx_GIVEREF(__pyx_tuple__51); - /* "lxml/_elementpath.py":269 + /* "lxml/_elementpath.py":273 * * if path[:1] == "/": * raise SyntaxError("cannot use absolute path on element") # <<<<<<<<<<<<<< * stream = iter(xpath_tokenizer(path, namespaces)) * try: */ - __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_s_cannot_use_absolute_path_on_elem); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 269, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__62); - __Pyx_GIVEREF(__pyx_tuple__62); + __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_s_cannot_use_absolute_path_on_elem); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__52); + __Pyx_GIVEREF(__pyx_tuple__52); - /* "lxml/_elementpath.py":279 + /* "lxml/_elementpath.py":283 * token = _next() * except StopIteration: * raise SyntaxError("empty path expression") # <<<<<<<<<<<<<< * selector = [] * while 1: */ - __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_s_empty_path_expression); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 279, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__63); - __Pyx_GIVEREF(__pyx_tuple__63); + __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_s_empty_path_expression); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 283, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__53); + __Pyx_GIVEREF(__pyx_tuple__53); - /* "lxml/_elementpath.py":285 + /* "lxml/_elementpath.py":289 * selector.append(ops[token[0]](_next, token)) * except StopIteration: * raise SyntaxError("invalid path") # <<<<<<<<<<<<<< * try: * token = _next() */ - __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_s_invalid_path); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 285, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__64); - __Pyx_GIVEREF(__pyx_tuple__64); + __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_s_invalid_path); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__54); + __Pyx_GIVEREF(__pyx_tuple__54); - /* "lxml/_elementpath.py":58 + /* "lxml/_elementpath.py":62 * import re * * xpath_tokenizer_re = re.compile( # <<<<<<<<<<<<<< * "(" * "'[^']*'|\"[^\"]*\"|" */ - __pyx_tuple__69 = PyTuple_Pack(1, __pyx_kp_s_s_s_2); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 58, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__69); - __Pyx_GIVEREF(__pyx_tuple__69); + __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_s_s_s_2); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__55); + __Pyx_GIVEREF(__pyx_tuple__55); - /* "lxml/_elementpath.py":70 + /* "lxml/_elementpath.py":74 * ) * * def xpath_tokenizer(pattern, namespaces=None): # <<<<<<<<<<<<<< * default_namespace = namespaces.get(None) if namespaces else None * for token in xpath_tokenizer_re.findall(pattern): */ - __pyx_tuple__70 = PyTuple_Pack(7, __pyx_n_s_pattern, __pyx_n_s_namespaces, __pyx_n_s_default_namespace, __pyx_n_s_token, __pyx_n_s_tag, __pyx_n_s_prefix, __pyx_n_s_uri); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 70, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__70); - __Pyx_GIVEREF(__pyx_tuple__70); - __pyx_codeobj_ = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 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__elementpath_py, __pyx_n_s_xpath_tokenizer, 70, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj_)) __PYX_ERR(0, 70, __pyx_L1_error) - __pyx_tuple__71 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 70, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__71); - __Pyx_GIVEREF(__pyx_tuple__71); + __pyx_tuple__56 = PyTuple_Pack(7, __pyx_n_s_pattern, __pyx_n_s_namespaces, __pyx_n_s_default_namespace, __pyx_n_s_token, __pyx_n_s_tag, __pyx_n_s_prefix, __pyx_n_s_uri); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 74, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__56); + __Pyx_GIVEREF(__pyx_tuple__56); + __pyx_codeobj_ = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 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__elementpath_py, __pyx_n_s_xpath_tokenizer, 74, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj_)) __PYX_ERR(0, 74, __pyx_L1_error) + __pyx_tuple__57 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 74, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__57); + __Pyx_GIVEREF(__pyx_tuple__57); - /* "lxml/_elementpath.py":91 + /* "lxml/_elementpath.py":95 * * * def prepare_child(next, token): # <<<<<<<<<<<<<< * tag = token[1] * def select(result): */ - __pyx_tuple__72 = PyTuple_Pack(5, __pyx_n_s_next, __pyx_n_s_token, __pyx_n_s_tag, __pyx_n_s_select, __pyx_n_s_select); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 91, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__72); - __Pyx_GIVEREF(__pyx_tuple__72); - __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_prepare_child, 91, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_tuple__58 = PyTuple_Pack(5, __pyx_n_s_next, __pyx_n_s_token, __pyx_n_s_tag, __pyx_n_s_select, __pyx_n_s_select); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 95, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__58); + __Pyx_GIVEREF(__pyx_tuple__58); + __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 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__elementpath_py, __pyx_n_s_prepare_child, 95, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 95, __pyx_L1_error) - /* "lxml/_elementpath.py":99 + /* "lxml/_elementpath.py":103 * return select * * def prepare_star(next, token): # <<<<<<<<<<<<<< * def select(result): * for elem in result: */ - __pyx_tuple__73 = PyTuple_Pack(4, __pyx_n_s_next, __pyx_n_s_token, __pyx_n_s_select, __pyx_n_s_select); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 99, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__73); - __Pyx_GIVEREF(__pyx_tuple__73); - __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 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__elementpath_py, __pyx_n_s_prepare_star, 99, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_tuple__60 = PyTuple_Pack(4, __pyx_n_s_next, __pyx_n_s_token, __pyx_n_s_select, __pyx_n_s_select); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__60); + __Pyx_GIVEREF(__pyx_tuple__60); + __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 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__elementpath_py, __pyx_n_s_prepare_star, 103, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 103, __pyx_L1_error) - /* "lxml/_elementpath.py":106 + /* "lxml/_elementpath.py":110 * return select * * def prepare_self(next, token): # <<<<<<<<<<<<<< * def select(result): * return result */ - __pyx_tuple__74 = PyTuple_Pack(4, __pyx_n_s_next, __pyx_n_s_token, __pyx_n_s_select, __pyx_n_s_select); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 106, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__74); - __Pyx_GIVEREF(__pyx_tuple__74); - __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_prepare_self, 106, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_tuple__62 = PyTuple_Pack(4, __pyx_n_s_next, __pyx_n_s_token, __pyx_n_s_select, __pyx_n_s_select); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__62); + __Pyx_GIVEREF(__pyx_tuple__62); + __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 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__elementpath_py, __pyx_n_s_prepare_self, 110, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 110, __pyx_L1_error) - /* "lxml/_elementpath.py":111 + /* "lxml/_elementpath.py":115 * return select * * def prepare_descendant(next, token): # <<<<<<<<<<<<<< * token = next() * if token[0] == "*": */ - __pyx_tuple__75 = PyTuple_Pack(5, __pyx_n_s_next, __pyx_n_s_token, __pyx_n_s_tag, __pyx_n_s_select, __pyx_n_s_select); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 111, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__75); - __Pyx_GIVEREF(__pyx_tuple__75); - __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 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__elementpath_py, __pyx_n_s_prepare_descendant, 111, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 111, __pyx_L1_error) + __pyx_tuple__64 = PyTuple_Pack(5, __pyx_n_s_next, __pyx_n_s_token, __pyx_n_s_tag, __pyx_n_s_select, __pyx_n_s_select); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__64); + __Pyx_GIVEREF(__pyx_tuple__64); + __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 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__elementpath_py, __pyx_n_s_prepare_descendant, 115, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 115, __pyx_L1_error) - /* "lxml/_elementpath.py":125 + /* "lxml/_elementpath.py":129 * return select * * def prepare_parent(next, token): # <<<<<<<<<<<<<< * def select(result): * for elem in result: */ - __pyx_tuple__76 = PyTuple_Pack(4, __pyx_n_s_next, __pyx_n_s_token, __pyx_n_s_select, __pyx_n_s_select); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 125, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__76); - __Pyx_GIVEREF(__pyx_tuple__76); - __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_prepare_parent, 125, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 125, __pyx_L1_error) + __pyx_tuple__66 = PyTuple_Pack(4, __pyx_n_s_next, __pyx_n_s_token, __pyx_n_s_select, __pyx_n_s_select); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__66); + __Pyx_GIVEREF(__pyx_tuple__66); + __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 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__elementpath_py, __pyx_n_s_prepare_parent, 129, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 129, __pyx_L1_error) - /* "lxml/_elementpath.py":133 + /* "lxml/_elementpath.py":137 * return select * * def prepare_predicate(next, token): # <<<<<<<<<<<<<< * # FIXME: replace with real parser!!! refs: * # http://effbot.org/zone/simple-iterator-parser.htm */ - __pyx_tuple__77 = PyTuple_Pack(15, __pyx_n_s_next, __pyx_n_s_token, __pyx_n_s_signature, __pyx_n_s_predicate, __pyx_n_s_key, __pyx_n_s_select, __pyx_n_s_select, __pyx_n_s_value, __pyx_n_s_select, __pyx_n_s_tag, __pyx_n_s_select, __pyx_n_s_select, __pyx_n_s_select, __pyx_n_s_index, __pyx_n_s_select); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 133, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__77); - __Pyx_GIVEREF(__pyx_tuple__77); - __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(2, 0, 15, 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__elementpath_py, __pyx_n_s_prepare_predicate, 133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_tuple__68 = PyTuple_Pack(15, __pyx_n_s_next, __pyx_n_s_token, __pyx_n_s_signature, __pyx_n_s_predicate, __pyx_n_s_key, __pyx_n_s_select, __pyx_n_s_select, __pyx_n_s_value, __pyx_n_s_select, __pyx_n_s_tag, __pyx_n_s_select, __pyx_n_s_select, __pyx_n_s_select, __pyx_n_s_index, __pyx_n_s_select); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__68); + __Pyx_GIVEREF(__pyx_tuple__68); + __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(2, 0, 15, 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__elementpath_py, __pyx_n_s_prepare_predicate, 137, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 137, __pyx_L1_error) - /* "lxml/_elementpath.py":246 + /* "lxml/_elementpath.py":250 * * * def _build_path_iterator(path, namespaces): # <<<<<<<<<<<<<< * """compile selector pattern""" * if path[-1:] == "/": */ - __pyx_tuple__82 = PyTuple_Pack(9, __pyx_n_s_path, __pyx_n_s_namespaces, __pyx_n_s_cache_key, __pyx_n_s_stream, __pyx_n_s_next_3, __pyx_n_s_token, __pyx_n_s_selector, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 246, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__82); - __Pyx_GIVEREF(__pyx_tuple__82); - __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_build_path_iterator, 246, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 246, __pyx_L1_error) + __pyx_tuple__74 = PyTuple_Pack(9, __pyx_n_s_path, __pyx_n_s_namespaces, __pyx_n_s_cache_key, __pyx_n_s_stream, __pyx_n_s_next_3, __pyx_n_s_token, __pyx_n_s_selector, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__74); + __Pyx_GIVEREF(__pyx_tuple__74); + __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_build_path_iterator, 250, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(0, 250, __pyx_L1_error) - /* "lxml/_elementpath.py":299 + /* "lxml/_elementpath.py":303 * # Iterate over the matching nodes * * def iterfind(elem, path, namespaces=None): # <<<<<<<<<<<<<< * selector = _build_path_iterator(path, namespaces) * result = iter((elem,)) */ - __pyx_tuple__83 = PyTuple_Pack(6, __pyx_n_s_elem, __pyx_n_s_path, __pyx_n_s_namespaces, __pyx_n_s_selector, __pyx_n_s_result, __pyx_n_s_select); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 299, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__83); - __Pyx_GIVEREF(__pyx_tuple__83); - __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 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__elementpath_py, __pyx_n_s_iterfind, 299, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 299, __pyx_L1_error) - __pyx_tuple__84 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 299, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__84); - __Pyx_GIVEREF(__pyx_tuple__84); + __pyx_tuple__76 = PyTuple_Pack(6, __pyx_n_s_elem, __pyx_n_s_path, __pyx_n_s_namespaces, __pyx_n_s_selector, __pyx_n_s_result, __pyx_n_s_select); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 303, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__76); + __Pyx_GIVEREF(__pyx_tuple__76); + __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_iterfind, 303, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_tuple__78 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 303, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__78); + __Pyx_GIVEREF(__pyx_tuple__78); - /* "lxml/_elementpath.py":310 + /* "lxml/_elementpath.py":314 * # Find first matching object. * * def find(elem, path, namespaces=None): # <<<<<<<<<<<<<< * it = iterfind(elem, path, namespaces) * try: */ - __pyx_tuple__85 = PyTuple_Pack(4, __pyx_n_s_elem, __pyx_n_s_path, __pyx_n_s_namespaces, __pyx_n_s_it); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 310, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__85); - __Pyx_GIVEREF(__pyx_tuple__85); - __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 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__elementpath_py, __pyx_n_s_find, 310, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 310, __pyx_L1_error) - __pyx_tuple__86 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 310, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__86); - __Pyx_GIVEREF(__pyx_tuple__86); + __pyx_tuple__79 = PyTuple_Pack(4, __pyx_n_s_elem, __pyx_n_s_path, __pyx_n_s_namespaces, __pyx_n_s_it); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 314, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__79); + __Pyx_GIVEREF(__pyx_tuple__79); + __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 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__elementpath_py, __pyx_n_s_find, 314, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 314, __pyx_L1_error) + __pyx_tuple__81 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 314, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__81); + __Pyx_GIVEREF(__pyx_tuple__81); - /* "lxml/_elementpath.py":321 + /* "lxml/_elementpath.py":325 * # Find all matching objects. * * def findall(elem, path, namespaces=None): # <<<<<<<<<<<<<< * return list(iterfind(elem, path, namespaces)) * */ - __pyx_tuple__87 = PyTuple_Pack(3, __pyx_n_s_elem, __pyx_n_s_path, __pyx_n_s_namespaces); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 321, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__87); - __Pyx_GIVEREF(__pyx_tuple__87); - __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 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__elementpath_py, __pyx_n_s_findall, 321, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 321, __pyx_L1_error) - __pyx_tuple__88 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 321, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__88); - __Pyx_GIVEREF(__pyx_tuple__88); + __pyx_tuple__82 = PyTuple_Pack(3, __pyx_n_s_elem, __pyx_n_s_path, __pyx_n_s_namespaces); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__82); + __Pyx_GIVEREF(__pyx_tuple__82); + __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_findall, 325, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 325, __pyx_L1_error) + __pyx_tuple__84 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__84); + __Pyx_GIVEREF(__pyx_tuple__84); - /* "lxml/_elementpath.py":328 + /* "lxml/_elementpath.py":332 * # Find text for first matching object. * * def findtext(elem, path, default=None, namespaces=None): # <<<<<<<<<<<<<< * el = find(elem, path, namespaces) * if el is None: */ - __pyx_tuple__89 = PyTuple_Pack(5, __pyx_n_s_elem, __pyx_n_s_path, __pyx_n_s_default, __pyx_n_s_namespaces, __pyx_n_s_el); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 328, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__89); - __Pyx_GIVEREF(__pyx_tuple__89); - __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml__elementpath_py, __pyx_n_s_findtext, 328, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 328, __pyx_L1_error) - __pyx_tuple__90 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 328, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__90); - __Pyx_GIVEREF(__pyx_tuple__90); + __pyx_tuple__85 = PyTuple_Pack(5, __pyx_n_s_elem, __pyx_n_s_path, __pyx_n_s_default, __pyx_n_s_namespaces, __pyx_n_s_el); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__85); + __Pyx_GIVEREF(__pyx_tuple__85); + __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 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__elementpath_py, __pyx_n_s_findtext, 332, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 332, __pyx_L1_error) + __pyx_tuple__87 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__87); + __Pyx_GIVEREF(__pyx_tuple__87); __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -13174,7 +12473,7 @@ static int __Pyx_InitCachedConstants(void) { return -1; } -static int __Pyx_InitGlobals(void) { +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error); __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) @@ -13184,13 +12483,13 @@ static int __Pyx_InitGlobals(void) { return -1; } -static int __Pyx_modinit_global_init_code(void); /*proto*/ -static int __Pyx_modinit_variable_export_code(void); /*proto*/ -static int __Pyx_modinit_function_export_code(void); /*proto*/ -static int __Pyx_modinit_type_init_code(void); /*proto*/ -static int __Pyx_modinit_type_import_code(void); /*proto*/ -static int __Pyx_modinit_variable_import_code(void); /*proto*/ -static int __Pyx_modinit_function_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ static int __Pyx_modinit_global_init_code(void) { __Pyx_RefNannyDeclarations @@ -13220,97 +12519,97 @@ static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ - if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct__xpath_tokenizer) < 0) __PYX_ERR(0, 70, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct__xpath_tokenizer) < 0) __PYX_ERR(0, 74, __pyx_L1_error) __pyx_type_4lxml_12_elementpath___pyx_scope_struct__xpath_tokenizer.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_12_elementpath___pyx_scope_struct__xpath_tokenizer.tp_dictoffset && __pyx_type_4lxml_12_elementpath___pyx_scope_struct__xpath_tokenizer.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_12_elementpath___pyx_scope_struct__xpath_tokenizer.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_4lxml_12_elementpath___pyx_scope_struct__xpath_tokenizer = &__pyx_type_4lxml_12_elementpath___pyx_scope_struct__xpath_tokenizer; - if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_1_prepare_child) < 0) __PYX_ERR(0, 91, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_1_prepare_child) < 0) __PYX_ERR(0, 95, __pyx_L1_error) __pyx_type_4lxml_12_elementpath___pyx_scope_struct_1_prepare_child.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_12_elementpath___pyx_scope_struct_1_prepare_child.tp_dictoffset && __pyx_type_4lxml_12_elementpath___pyx_scope_struct_1_prepare_child.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_12_elementpath___pyx_scope_struct_1_prepare_child.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_4lxml_12_elementpath___pyx_scope_struct_1_prepare_child = &__pyx_type_4lxml_12_elementpath___pyx_scope_struct_1_prepare_child; - if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_2_select) < 0) __PYX_ERR(0, 93, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_2_select) < 0) __PYX_ERR(0, 97, __pyx_L1_error) __pyx_type_4lxml_12_elementpath___pyx_scope_struct_2_select.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_12_elementpath___pyx_scope_struct_2_select.tp_dictoffset && __pyx_type_4lxml_12_elementpath___pyx_scope_struct_2_select.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_12_elementpath___pyx_scope_struct_2_select.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_4lxml_12_elementpath___pyx_scope_struct_2_select = &__pyx_type_4lxml_12_elementpath___pyx_scope_struct_2_select; - if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_3_select) < 0) __PYX_ERR(0, 100, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_3_select) < 0) __PYX_ERR(0, 104, __pyx_L1_error) __pyx_type_4lxml_12_elementpath___pyx_scope_struct_3_select.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_12_elementpath___pyx_scope_struct_3_select.tp_dictoffset && __pyx_type_4lxml_12_elementpath___pyx_scope_struct_3_select.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_12_elementpath___pyx_scope_struct_3_select.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_4lxml_12_elementpath___pyx_scope_struct_3_select = &__pyx_type_4lxml_12_elementpath___pyx_scope_struct_3_select; - if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_4_prepare_descendant) < 0) __PYX_ERR(0, 111, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_4_prepare_descendant) < 0) __PYX_ERR(0, 115, __pyx_L1_error) __pyx_type_4lxml_12_elementpath___pyx_scope_struct_4_prepare_descendant.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_12_elementpath___pyx_scope_struct_4_prepare_descendant.tp_dictoffset && __pyx_type_4lxml_12_elementpath___pyx_scope_struct_4_prepare_descendant.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_12_elementpath___pyx_scope_struct_4_prepare_descendant.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_4lxml_12_elementpath___pyx_scope_struct_4_prepare_descendant = &__pyx_type_4lxml_12_elementpath___pyx_scope_struct_4_prepare_descendant; - if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_5_select) < 0) __PYX_ERR(0, 119, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_5_select) < 0) __PYX_ERR(0, 123, __pyx_L1_error) __pyx_type_4lxml_12_elementpath___pyx_scope_struct_5_select.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_12_elementpath___pyx_scope_struct_5_select.tp_dictoffset && __pyx_type_4lxml_12_elementpath___pyx_scope_struct_5_select.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_12_elementpath___pyx_scope_struct_5_select.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_4lxml_12_elementpath___pyx_scope_struct_5_select = &__pyx_type_4lxml_12_elementpath___pyx_scope_struct_5_select; - if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_6_select) < 0) __PYX_ERR(0, 126, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_6_select) < 0) __PYX_ERR(0, 130, __pyx_L1_error) __pyx_type_4lxml_12_elementpath___pyx_scope_struct_6_select.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_12_elementpath___pyx_scope_struct_6_select.tp_dictoffset && __pyx_type_4lxml_12_elementpath___pyx_scope_struct_6_select.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_12_elementpath___pyx_scope_struct_6_select.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_4lxml_12_elementpath___pyx_scope_struct_6_select = &__pyx_type_4lxml_12_elementpath___pyx_scope_struct_6_select; - if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_7_prepare_predicate) < 0) __PYX_ERR(0, 133, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_7_prepare_predicate) < 0) __PYX_ERR(0, 137, __pyx_L1_error) __pyx_type_4lxml_12_elementpath___pyx_scope_struct_7_prepare_predicate.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_12_elementpath___pyx_scope_struct_7_prepare_predicate.tp_dictoffset && __pyx_type_4lxml_12_elementpath___pyx_scope_struct_7_prepare_predicate.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_12_elementpath___pyx_scope_struct_7_prepare_predicate.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_4lxml_12_elementpath___pyx_scope_struct_7_prepare_predicate = &__pyx_type_4lxml_12_elementpath___pyx_scope_struct_7_prepare_predicate; - if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_8_select) < 0) __PYX_ERR(0, 155, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_8_select) < 0) __PYX_ERR(0, 159, __pyx_L1_error) __pyx_type_4lxml_12_elementpath___pyx_scope_struct_8_select.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_12_elementpath___pyx_scope_struct_8_select.tp_dictoffset && __pyx_type_4lxml_12_elementpath___pyx_scope_struct_8_select.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_12_elementpath___pyx_scope_struct_8_select.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_4lxml_12_elementpath___pyx_scope_struct_8_select = &__pyx_type_4lxml_12_elementpath___pyx_scope_struct_8_select; - if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_9_select) < 0) __PYX_ERR(0, 164, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_9_select) < 0) __PYX_ERR(0, 168, __pyx_L1_error) __pyx_type_4lxml_12_elementpath___pyx_scope_struct_9_select.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_12_elementpath___pyx_scope_struct_9_select.tp_dictoffset && __pyx_type_4lxml_12_elementpath___pyx_scope_struct_9_select.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_12_elementpath___pyx_scope_struct_9_select.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_4lxml_12_elementpath___pyx_scope_struct_9_select = &__pyx_type_4lxml_12_elementpath___pyx_scope_struct_9_select; - if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_10_select) < 0) __PYX_ERR(0, 172, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_10_select) < 0) __PYX_ERR(0, 176, __pyx_L1_error) __pyx_type_4lxml_12_elementpath___pyx_scope_struct_10_select.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_12_elementpath___pyx_scope_struct_10_select.tp_dictoffset && __pyx_type_4lxml_12_elementpath___pyx_scope_struct_10_select.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_12_elementpath___pyx_scope_struct_10_select.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_4lxml_12_elementpath___pyx_scope_struct_10_select = &__pyx_type_4lxml_12_elementpath___pyx_scope_struct_10_select; - if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_11_select) < 0) __PYX_ERR(0, 183, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_11_select) < 0) __PYX_ERR(0, 187, __pyx_L1_error) __pyx_type_4lxml_12_elementpath___pyx_scope_struct_11_select.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_12_elementpath___pyx_scope_struct_11_select.tp_dictoffset && __pyx_type_4lxml_12_elementpath___pyx_scope_struct_11_select.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_12_elementpath___pyx_scope_struct_11_select.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_4lxml_12_elementpath___pyx_scope_struct_11_select = &__pyx_type_4lxml_12_elementpath___pyx_scope_struct_11_select; - if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_12_select) < 0) __PYX_ERR(0, 190, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_12_select) < 0) __PYX_ERR(0, 194, __pyx_L1_error) __pyx_type_4lxml_12_elementpath___pyx_scope_struct_12_select.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_12_elementpath___pyx_scope_struct_12_select.tp_dictoffset && __pyx_type_4lxml_12_elementpath___pyx_scope_struct_12_select.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_12_elementpath___pyx_scope_struct_12_select.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_4lxml_12_elementpath___pyx_scope_struct_12_select = &__pyx_type_4lxml_12_elementpath___pyx_scope_struct_12_select; - if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_13_select) < 0) __PYX_ERR(0, 216, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_13_select) < 0) __PYX_ERR(0, 220, __pyx_L1_error) __pyx_type_4lxml_12_elementpath___pyx_scope_struct_13_select.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_12_elementpath___pyx_scope_struct_13_select.tp_dictoffset && __pyx_type_4lxml_12_elementpath___pyx_scope_struct_13_select.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_12_elementpath___pyx_scope_struct_13_select.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_4lxml_12_elementpath___pyx_scope_struct_13_select = &__pyx_type_4lxml_12_elementpath___pyx_scope_struct_13_select; - if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_14__build_path_iterator) < 0) __PYX_ERR(0, 246, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_14__build_path_iterator) < 0) __PYX_ERR(0, 250, __pyx_L1_error) __pyx_type_4lxml_12_elementpath___pyx_scope_struct_14__build_path_iterator.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_12_elementpath___pyx_scope_struct_14__build_path_iterator.tp_dictoffset && __pyx_type_4lxml_12_elementpath___pyx_scope_struct_14__build_path_iterator.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_12_elementpath___pyx_scope_struct_14__build_path_iterator.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_4lxml_12_elementpath___pyx_scope_struct_14__build_path_iterator = &__pyx_type_4lxml_12_elementpath___pyx_scope_struct_14__build_path_iterator; - if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_15_genexpr) < 0) __PYX_ERR(0, 257, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_12_elementpath___pyx_scope_struct_15_genexpr) < 0) __PYX_ERR(0, 261, __pyx_L1_error) __pyx_type_4lxml_12_elementpath___pyx_scope_struct_15_genexpr.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_12_elementpath___pyx_scope_struct_15_genexpr.tp_dictoffset && __pyx_type_4lxml_12_elementpath___pyx_scope_struct_15_genexpr.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_12_elementpath___pyx_scope_struct_15_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; @@ -13361,15 +12660,6 @@ static int __Pyx_modinit_function_import_code(void) { #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC #endif #endif -#ifndef CYTHON_SMALL_CODE -#if defined(__clang__) - #define CYTHON_SMALL_CODE -#elif defined(__GNUC__) && (!(defined(__cplusplus)) || (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4))) - #define CYTHON_SMALL_CODE __attribute__((cold)) -#else - #define CYTHON_SMALL_CODE -#endif -#endif #if PY_MAJOR_VERSION < 3 @@ -13382,11 +12672,36 @@ __Pyx_PyMODINIT_FUNC PyInit__elementpath(void) { return PyModuleDef_Init(&__pyx_moduledef); } -static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name) { +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + #if PY_VERSION_HEX >= 0x030700A1 + static PY_INT64_T main_interpreter_id = -1; + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return (unlikely(current_id == -1)) ? -1 : 0; + } else if (unlikely(main_interpreter_id != current_id)) + #else + static PyInterpreterState *main_interpreter = NULL; + PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; + if (!main_interpreter) { + main_interpreter = current_interpreter; + } else if (unlikely(main_interpreter != current_interpreter)) + #endif + { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) { PyObject *value = PyObject_GetAttrString(spec, from_name); int result = 0; if (likely(value)) { - result = PyDict_SetItemString(moddict, to_name, value); + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } Py_DECREF(value); } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); @@ -13395,8 +12710,10 @@ static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const ch } return result; } -static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { PyObject *module = NULL, *moddict, *modname; + if (__Pyx_check_single_interpreter()) + return NULL; if (__pyx_m) return __Pyx_NewRef(__pyx_m); modname = PyObject_GetAttrString(spec, "name"); @@ -13406,10 +12723,10 @@ static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *d if (unlikely(!module)) goto bad; moddict = PyModule_GetDict(module); if (unlikely(!moddict)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__") < 0)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; return module; bad: Py_XDECREF(module); @@ -13417,16 +12734,19 @@ bad: } -static int __pyx_pymod_exec__elementpath(PyObject *__pyx_pyinit_module) +static CYTHON_SMALL_CODE int __pyx_pymod_exec__elementpath(PyObject *__pyx_pyinit_module) #endif #endif { - __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT - if (__pyx_m && __pyx_m == __pyx_pyinit_module) return 0; + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module '_elementpath' has already been imported. Re-initialisation is not supported."); + return -1; + } #elif PY_MAJOR_VERSION >= 3 if (__pyx_m) return __Pyx_NewRef(__pyx_m); #endif @@ -13441,6 +12761,9 @@ if (!__Pyx_RefNanny) { #endif __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit__elementpath(void)", 0); if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) @@ -13495,7 +12818,7 @@ if (!__Pyx_RefNanny) { if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif if (__pyx_module_is_main_lxml___elementpath) { - if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) } #if PY_MAJOR_VERSION >= 3 { @@ -13521,307 +12844,283 @@ if (!__Pyx_RefNanny) { #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif - __Pyx_TraceCall("__Pyx_PyMODINIT_FUNC PyInit__elementpath(void)", __pyx_f[0], 1, 0, __PYX_ERR(0, 1, __pyx_L1_error)); - /* "lxml/_elementpath.py":56 - * ## + /* "lxml/_elementpath.py":60 + * from __future__ import absolute_import * * import re # <<<<<<<<<<<<<< * * xpath_tokenizer_re = re.compile( */ - __Pyx_TraceLine(56,0,__PYX_ERR(0, 56, __pyx_L1_error)) - __pyx_t_1 = __Pyx_Import(__pyx_n_s_re, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_n_s_re, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_re, __pyx_t_1) < 0) __PYX_ERR(0, 56, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_re, __pyx_t_1) < 0) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":58 + /* "lxml/_elementpath.py":62 * import re * * xpath_tokenizer_re = re.compile( # <<<<<<<<<<<<<< * "(" * "'[^']*'|\"[^\"]*\"|" */ - __Pyx_TraceLine(58,0,__PYX_ERR(0, 58, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_re); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_compile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_compile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_xpath_tokenizer_re, __pyx_t_1) < 0) __PYX_ERR(0, 58, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_xpath_tokenizer_re, __pyx_t_1) < 0) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":70 + /* "lxml/_elementpath.py":74 * ) * * def xpath_tokenizer(pattern, namespaces=None): # <<<<<<<<<<<<<< * default_namespace = namespaces.get(None) if namespaces else None * for token in xpath_tokenizer_re.findall(pattern): */ - __Pyx_TraceLine(70,0,__PYX_ERR(0, 70, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_1xpath_tokenizer, 0, __pyx_n_s_xpath_tokenizer, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj_)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_1xpath_tokenizer, 0, __pyx_n_s_xpath_tokenizer, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj_)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__71); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_xpath_tokenizer, __pyx_t_1) < 0) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__57); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_xpath_tokenizer, __pyx_t_1) < 0) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":91 + /* "lxml/_elementpath.py":95 * * * def prepare_child(next, token): # <<<<<<<<<<<<<< * tag = token[1] * def select(result): */ - __Pyx_TraceLine(91,0,__PYX_ERR(0, 91, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_4prepare_child, 0, __pyx_n_s_prepare_child, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_4prepare_child, 0, __pyx_n_s_prepare_child, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_prepare_child, __pyx_t_1) < 0) __PYX_ERR(0, 91, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_prepare_child, __pyx_t_1) < 0) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":99 + /* "lxml/_elementpath.py":103 * return select * * def prepare_star(next, token): # <<<<<<<<<<<<<< * def select(result): * for elem in result: */ - __Pyx_TraceLine(99,0,__PYX_ERR(0, 99, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_6prepare_star, 0, __pyx_n_s_prepare_star, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_6prepare_star, 0, __pyx_n_s_prepare_star, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_prepare_star, __pyx_t_1) < 0) __PYX_ERR(0, 99, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_prepare_star, __pyx_t_1) < 0) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":106 + /* "lxml/_elementpath.py":110 * return select * * def prepare_self(next, token): # <<<<<<<<<<<<<< * def select(result): * return result */ - __Pyx_TraceLine(106,0,__PYX_ERR(0, 106, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_8prepare_self, 0, __pyx_n_s_prepare_self, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__14)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_8prepare_self, 0, __pyx_n_s_prepare_self, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_prepare_self, __pyx_t_1) < 0) __PYX_ERR(0, 106, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_prepare_self, __pyx_t_1) < 0) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":111 + /* "lxml/_elementpath.py":115 * return select * * def prepare_descendant(next, token): # <<<<<<<<<<<<<< * token = next() * if token[0] == "*": */ - __Pyx_TraceLine(111,0,__PYX_ERR(0, 111, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_10prepare_descendant, 0, __pyx_n_s_prepare_descendant, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__17)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_10prepare_descendant, 0, __pyx_n_s_prepare_descendant, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_prepare_descendant, __pyx_t_1) < 0) __PYX_ERR(0, 111, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_prepare_descendant, __pyx_t_1) < 0) __PYX_ERR(0, 115, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":125 + /* "lxml/_elementpath.py":129 * return select * * def prepare_parent(next, token): # <<<<<<<<<<<<<< * def select(result): * for elem in result: */ - __Pyx_TraceLine(125,0,__PYX_ERR(0, 125, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_12prepare_parent, 0, __pyx_n_s_prepare_parent, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_12prepare_parent, 0, __pyx_n_s_prepare_parent, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_prepare_parent, __pyx_t_1) < 0) __PYX_ERR(0, 125, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_prepare_parent, __pyx_t_1) < 0) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":133 + /* "lxml/_elementpath.py":137 * return select * * def prepare_predicate(next, token): # <<<<<<<<<<<<<< * # FIXME: replace with real parser!!! refs: * # http://effbot.org/zone/simple-iterator-parser.htm */ - __Pyx_TraceLine(133,0,__PYX_ERR(0, 133, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_14prepare_predicate, 0, __pyx_n_s_prepare_predicate, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_14prepare_predicate, 0, __pyx_n_s_prepare_predicate, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_prepare_predicate, __pyx_t_1) < 0) __PYX_ERR(0, 133, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_prepare_predicate, __pyx_t_1) < 0) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":232 + /* "lxml/_elementpath.py":236 * * ops = { * "": prepare_child, # <<<<<<<<<<<<<< * "*": prepare_star, * ".": prepare_self, */ - __Pyx_TraceLine(232,0,__PYX_ERR(0, 232, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_prepare_child); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_prepare_child); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s__24, __pyx_t_2) < 0) __PYX_ERR(0, 232, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s__17, __pyx_t_2) < 0) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/_elementpath.py":233 + /* "lxml/_elementpath.py":237 * ops = { * "": prepare_child, * "*": prepare_star, # <<<<<<<<<<<<<< * ".": prepare_self, * "..": prepare_parent, */ - __Pyx_TraceLine(233,0,__PYX_ERR(0, 233, __pyx_L1_error)) - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_prepare_star); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_prepare_star); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s__9, __pyx_t_2) < 0) __PYX_ERR(0, 232, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s__7, __pyx_t_2) < 0) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/_elementpath.py":234 + /* "lxml/_elementpath.py":238 * "": prepare_child, * "*": prepare_star, * ".": prepare_self, # <<<<<<<<<<<<<< * "..": prepare_parent, * "//": prepare_descendant, */ - __Pyx_TraceLine(234,0,__PYX_ERR(0, 234, __pyx_L1_error)) - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_prepare_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_prepare_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s__78, __pyx_t_2) < 0) __PYX_ERR(0, 232, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s__70, __pyx_t_2) < 0) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/_elementpath.py":235 + /* "lxml/_elementpath.py":239 * "*": prepare_star, * ".": prepare_self, * "..": prepare_parent, # <<<<<<<<<<<<<< * "//": prepare_descendant, * "[": prepare_predicate, */ - __Pyx_TraceLine(235,0,__PYX_ERR(0, 235, __pyx_L1_error)) - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_prepare_parent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_prepare_parent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s__79, __pyx_t_2) < 0) __PYX_ERR(0, 232, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s__71, __pyx_t_2) < 0) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/_elementpath.py":236 + /* "lxml/_elementpath.py":240 * ".": prepare_self, * "..": prepare_parent, * "//": prepare_descendant, # <<<<<<<<<<<<<< * "[": prepare_predicate, * } */ - __Pyx_TraceLine(236,0,__PYX_ERR(0, 236, __pyx_L1_error)) - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_prepare_descendant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_prepare_descendant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s__80, __pyx_t_2) < 0) __PYX_ERR(0, 232, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s__72, __pyx_t_2) < 0) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/_elementpath.py":237 + /* "lxml/_elementpath.py":241 * "..": prepare_parent, * "//": prepare_descendant, * "[": prepare_predicate, # <<<<<<<<<<<<<< * } * */ - __Pyx_TraceLine(237,0,__PYX_ERR(0, 237, __pyx_L1_error)) - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_prepare_predicate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_prepare_predicate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s__81, __pyx_t_2) < 0) __PYX_ERR(0, 232, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s__73, __pyx_t_2) < 0) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ops, __pyx_t_1) < 0) __PYX_ERR(0, 231, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ops, __pyx_t_1) < 0) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":243 + /* "lxml/_elementpath.py":247 * # -------------------------------------------------------------------- * * _cache = {} # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(243,0,__PYX_ERR(0, 243, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_cache, __pyx_t_1) < 0) __PYX_ERR(0, 243, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_cache, __pyx_t_1) < 0) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":246 + /* "lxml/_elementpath.py":250 * * * def _build_path_iterator(path, namespaces): # <<<<<<<<<<<<<< * """compile selector pattern""" * if path[-1:] == "/": */ - __Pyx_TraceLine(246,0,__PYX_ERR(0, 246, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_16_build_path_iterator, 0, __pyx_n_s_build_path_iterator, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_16_build_path_iterator, 0, __pyx_n_s_build_path_iterator, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_build_path_iterator, __pyx_t_1) < 0) __PYX_ERR(0, 246, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_build_path_iterator, __pyx_t_1) < 0) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":299 + /* "lxml/_elementpath.py":303 * # Iterate over the matching nodes * * def iterfind(elem, path, namespaces=None): # <<<<<<<<<<<<<< * selector = _build_path_iterator(path, namespaces) * result = iter((elem,)) */ - __Pyx_TraceLine(299,0,__PYX_ERR(0, 299, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_18iterfind, 0, __pyx_n_s_iterfind, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_18iterfind, 0, __pyx_n_s_iterfind, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__77)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__84); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_iterfind, __pyx_t_1) < 0) __PYX_ERR(0, 299, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__78); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_iterfind, __pyx_t_1) < 0) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":310 + /* "lxml/_elementpath.py":314 * # Find first matching object. * * def find(elem, path, namespaces=None): # <<<<<<<<<<<<<< * it = iterfind(elem, path, namespaces) * try: */ - __Pyx_TraceLine(310,0,__PYX_ERR(0, 310, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_20find, 0, __pyx_n_s_find, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_20find, 0, __pyx_n_s_find, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__86); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_find, __pyx_t_1) < 0) __PYX_ERR(0, 310, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__81); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_find, __pyx_t_1) < 0) __PYX_ERR(0, 314, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":321 + /* "lxml/_elementpath.py":325 * # Find all matching objects. * * def findall(elem, path, namespaces=None): # <<<<<<<<<<<<<< * return list(iterfind(elem, path, namespaces)) * */ - __Pyx_TraceLine(321,0,__PYX_ERR(0, 321, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_22findall, 0, __pyx_n_s_findall, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_22findall, 0, __pyx_n_s_findall, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__88); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_findall, __pyx_t_1) < 0) __PYX_ERR(0, 321, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__84); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_findall, __pyx_t_1) < 0) __PYX_ERR(0, 325, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/_elementpath.py":328 + /* "lxml/_elementpath.py":332 * # Find text for first matching object. * * def findtext(elem, path, default=None, namespaces=None): # <<<<<<<<<<<<<< * el = find(elem, path, namespaces) * if el is None: */ - __Pyx_TraceLine(328,0,__PYX_ERR(0, 328, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_24findtext, 0, __pyx_n_s_findtext, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_12_elementpath_24findtext, 0, __pyx_n_s_findtext, NULL, __pyx_n_s_lxml__elementpath, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__90); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_findtext, __pyx_t_1) < 0) __PYX_ERR(0, 328, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__87); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_findtext, __pyx_t_1) < 0) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "lxml/_elementpath.py":1 - * # # <<<<<<<<<<<<<< - * # ElementTree - * # $Id: ElementPath.py 3375 2008-02-13 08:05:08Z fredrik $ + * # cython: language_level=2 # <<<<<<<<<<<<<< + * + * # */ - __Pyx_TraceLine(1,0,__PYX_ERR(0, 1, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_TraceReturn(Py_None, 0); /*--- Wrapped vars code ---*/ @@ -13832,9 +13131,9 @@ if (!__Pyx_RefNanny) { __Pyx_XDECREF(__pyx_t_2); if (__pyx_m) { if (__pyx_d) { - __Pyx_AddTraceback("init lxml._elementpath", 0, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("init lxml._elementpath", __pyx_clineno, __pyx_lineno, __pyx_filename); } - Py_DECREF(__pyx_m); __pyx_m = 0; + Py_CLEAR(__pyx_m); } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init lxml._elementpath"); } @@ -13849,77 +13148,74 @@ if (!__Pyx_RefNanny) { #endif } -static void __Pyx_CleanupGlobals(void) { +static CYTHON_SMALL_CODE void __Pyx_CleanupGlobals(void) { Py_CLEAR(__pyx_codeobj_); - Py_CLEAR(__pyx_tuple__2); + Py_CLEAR(__pyx_tuple__4); Py_CLEAR(__pyx_tuple__5); Py_CLEAR(__pyx_codeobj__6); - Py_CLEAR(__pyx_tuple__7); - Py_CLEAR(__pyx_codeobj__8); + Py_CLEAR(__pyx_tuple__8); + Py_CLEAR(__pyx_codeobj__9); Py_CLEAR(__pyx_tuple__10); Py_CLEAR(__pyx_codeobj__11); Py_CLEAR(__pyx_tuple__12); - Py_CLEAR(__pyx_codeobj__13); + Py_CLEAR(__pyx_tuple__13); Py_CLEAR(__pyx_codeobj__14); Py_CLEAR(__pyx_tuple__15); Py_CLEAR(__pyx_codeobj__16); - Py_CLEAR(__pyx_codeobj__17); - Py_CLEAR(__pyx_tuple__18); Py_CLEAR(__pyx_tuple__19); - Py_CLEAR(__pyx_codeobj__20); - Py_CLEAR(__pyx_codeobj__21); - Py_CLEAR(__pyx_tuple__22); - Py_CLEAR(__pyx_codeobj__23); - Py_CLEAR(__pyx_codeobj__25); - Py_CLEAR(__pyx_tuple__27); - Py_CLEAR(__pyx_slice__28); - Py_CLEAR(__pyx_slice__31); - Py_CLEAR(__pyx_tuple__34); - Py_CLEAR(__pyx_codeobj__35); - Py_CLEAR(__pyx_tuple__37); - Py_CLEAR(__pyx_codeobj__38); - Py_CLEAR(__pyx_tuple__40); - Py_CLEAR(__pyx_codeobj__41); + Py_CLEAR(__pyx_slice__20); + Py_CLEAR(__pyx_slice__23); + Py_CLEAR(__pyx_tuple__26); + Py_CLEAR(__pyx_codeobj__27); + Py_CLEAR(__pyx_tuple__29); + Py_CLEAR(__pyx_codeobj__30); + Py_CLEAR(__pyx_tuple__32); + Py_CLEAR(__pyx_codeobj__33); + Py_CLEAR(__pyx_tuple__36); + Py_CLEAR(__pyx_codeobj__37); + Py_CLEAR(__pyx_tuple__38); + Py_CLEAR(__pyx_codeobj__39); + Py_CLEAR(__pyx_tuple__42); + Py_CLEAR(__pyx_tuple__43); Py_CLEAR(__pyx_tuple__44); - Py_CLEAR(__pyx_codeobj__45); + Py_CLEAR(__pyx_tuple__45); Py_CLEAR(__pyx_tuple__46); Py_CLEAR(__pyx_codeobj__47); - Py_CLEAR(__pyx_tuple__50); + Py_CLEAR(__pyx_tuple__48); + Py_CLEAR(__pyx_slice__49); Py_CLEAR(__pyx_tuple__51); Py_CLEAR(__pyx_tuple__52); Py_CLEAR(__pyx_tuple__53); Py_CLEAR(__pyx_tuple__54); - Py_CLEAR(__pyx_codeobj__55); + Py_CLEAR(__pyx_tuple__55); Py_CLEAR(__pyx_tuple__56); - Py_CLEAR(__pyx_codeobj__57); - Py_CLEAR(__pyx_slice__58); + Py_CLEAR(__pyx_tuple__57); + Py_CLEAR(__pyx_tuple__58); + Py_CLEAR(__pyx_codeobj__59); Py_CLEAR(__pyx_tuple__60); - Py_CLEAR(__pyx_slice__61); + Py_CLEAR(__pyx_codeobj__61); Py_CLEAR(__pyx_tuple__62); - Py_CLEAR(__pyx_tuple__63); + Py_CLEAR(__pyx_codeobj__63); Py_CLEAR(__pyx_tuple__64); Py_CLEAR(__pyx_codeobj__65); - Py_CLEAR(__pyx_codeobj__66); + Py_CLEAR(__pyx_tuple__66); Py_CLEAR(__pyx_codeobj__67); - Py_CLEAR(__pyx_codeobj__68); - Py_CLEAR(__pyx_tuple__69); - Py_CLEAR(__pyx_tuple__70); - Py_CLEAR(__pyx_tuple__71); - Py_CLEAR(__pyx_tuple__72); - Py_CLEAR(__pyx_tuple__73); + Py_CLEAR(__pyx_tuple__68); + Py_CLEAR(__pyx_codeobj__69); Py_CLEAR(__pyx_tuple__74); - Py_CLEAR(__pyx_tuple__75); + Py_CLEAR(__pyx_codeobj__75); Py_CLEAR(__pyx_tuple__76); - Py_CLEAR(__pyx_tuple__77); + Py_CLEAR(__pyx_codeobj__77); + Py_CLEAR(__pyx_tuple__78); + Py_CLEAR(__pyx_tuple__79); + Py_CLEAR(__pyx_codeobj__80); + Py_CLEAR(__pyx_tuple__81); Py_CLEAR(__pyx_tuple__82); - Py_CLEAR(__pyx_tuple__83); + Py_CLEAR(__pyx_codeobj__83); Py_CLEAR(__pyx_tuple__84); Py_CLEAR(__pyx_tuple__85); - Py_CLEAR(__pyx_tuple__86); + Py_CLEAR(__pyx_codeobj__86); Py_CLEAR(__pyx_tuple__87); - Py_CLEAR(__pyx_tuple__88); - Py_CLEAR(__pyx_tuple__89); - Py_CLEAR(__pyx_tuple__90); /* CodeObjectCache.cleanup */ if (__pyx_code_cache.entries) { __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; @@ -14023,9 +13319,9 @@ static void __pyx_module_cleanup(CYTHON_UNUSED PyObject *self) { static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; - m = PyImport_ImportModule((char *)modname); + m = PyImport_ImportModule(modname); if (!m) goto end; - p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); + p = PyObject_GetAttrString(m, "RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: @@ -14201,183 +13497,19 @@ static void __Pyx_RaiseArgtupleInvalid( } PyErr_Format(PyExc_TypeError, "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", - func_name, more_or_less, num_expected, - (num_expected == 1) ? "" : "s", num_found); -} - -/* PyErrFetchRestore */ -#if CYTHON_FAST_THREAD_STATE -static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { - PyObject *tmp_type, *tmp_value, *tmp_tb; - tmp_type = tstate->curexc_type; - tmp_value = tstate->curexc_value; - tmp_tb = tstate->curexc_traceback; - tstate->curexc_type = type; - tstate->curexc_value = value; - tstate->curexc_traceback = tb; - Py_XDECREF(tmp_type); - Py_XDECREF(tmp_value); - Py_XDECREF(tmp_tb); -} -static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { - *type = tstate->curexc_type; - *value = tstate->curexc_value; - *tb = tstate->curexc_traceback; - tstate->curexc_type = 0; - tstate->curexc_value = 0; - tstate->curexc_traceback = 0; -} -#endif - -/* Profile */ -#if CYTHON_PROFILE -static int __Pyx_TraceSetupAndCall(PyCodeObject** code, - PyFrameObject** frame, - PyThreadState* tstate, - const char *funcname, - const char *srcfile, - int firstlineno) { - PyObject *type, *value, *traceback; - int retval; - if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) { - if (*code == NULL) { - *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno); - if (*code == NULL) return 0; - } - *frame = PyFrame_New( - tstate, /*PyThreadState *tstate*/ - *code, /*PyCodeObject *code*/ - __pyx_d, /*PyObject *globals*/ - 0 /*PyObject *locals*/ - ); - if (*frame == NULL) return 0; - if (CYTHON_TRACE && (*frame)->f_trace == NULL) { - Py_INCREF(Py_None); - (*frame)->f_trace = Py_None; - } -#if PY_VERSION_HEX < 0x030400B1 - } else { - (*frame)->f_tstate = tstate; -#endif - } - __Pyx_PyFrame_SetLineNumber(*frame, firstlineno); - retval = 1; - tstate->tracing++; - tstate->use_tracing = 0; - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); - #if CYTHON_TRACE - if (tstate->c_tracefunc) - retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0; - if (retval && tstate->c_profilefunc) - #endif - retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0; - tstate->use_tracing = (tstate->c_profilefunc || - (CYTHON_TRACE && tstate->c_tracefunc)); - tstate->tracing--; - if (retval) { - __Pyx_ErrRestoreInState(tstate, type, value, traceback); - return tstate->use_tracing && retval; - } else { - Py_XDECREF(type); - Py_XDECREF(value); - Py_XDECREF(traceback); - return -1; - } -} -static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) { - PyObject *py_srcfile = 0; - PyObject *py_funcname = 0; - PyCodeObject *py_code = 0; - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); - py_srcfile = PyString_FromString(srcfile); - #else - py_funcname = PyUnicode_FromString(funcname); - py_srcfile = PyUnicode_FromString(srcfile); - #endif - if (!py_funcname | !py_srcfile) goto bad; - py_code = PyCode_New( - 0, - #if PY_MAJOR_VERSION >= 3 - 0, - #endif - 0, - 0, - CO_OPTIMIZED | CO_NEWLOCALS, - __pyx_empty_bytes, /*PyObject *code,*/ - __pyx_empty_tuple, /*PyObject *consts,*/ - __pyx_empty_tuple, /*PyObject *names,*/ - __pyx_empty_tuple, /*PyObject *varnames,*/ - __pyx_empty_tuple, /*PyObject *freevars,*/ - __pyx_empty_tuple, /*PyObject *cellvars,*/ - py_srcfile, /*PyObject *filename,*/ - py_funcname, /*PyObject *name,*/ - firstlineno, - __pyx_empty_bytes /*PyObject *lnotab*/ - ); -bad: - Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); - return py_code; -} -#endif - -/* PyObjectCall */ -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; - ternaryfunc call = func->ob_type->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) - return NULL; - result = (*call)(func, arg, kw); - Py_LeaveRecursiveCall(); - if (unlikely(!result) && unlikely(!PyErr_Occurred())) { - PyErr_SetString( - PyExc_SystemError, - "NULL result without error in PyObject_Call"); - } - return result; -} -#endif - -/* GetModuleGlobalName */ -static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { - PyObject *result; -#if !CYTHON_AVOID_BORROWED_REFS -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 - result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); - if (likely(result)) { - Py_INCREF(result); - } else if (unlikely(PyErr_Occurred())) { - result = NULL; - } else { -#else - result = PyDict_GetItem(__pyx_d, name); - if (likely(result)) { - Py_INCREF(result); - } else { -#endif -#else - result = PyObject_GetItem(__pyx_d, name); - if (!result) { - PyErr_Clear(); -#endif - result = __Pyx_GetBuiltinName(name); - } - return result; + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); } /* PyCFunctionFastCall */ - #if CYTHON_FAST_PYCCALL +#if CYTHON_FAST_PYCCALL static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { PyCFunctionObject *func = (PyCFunctionObject*)func_obj; PyCFunction meth = PyCFunction_GET_FUNCTION(func); PyObject *self = PyCFunction_GET_SELF(func); int flags = PyCFunction_GET_FLAGS(func); assert(PyCFunction_Check(func)); - assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS))); + assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); assert(nargs >= 0); assert(nargs == 0 || args != NULL); /* _PyCFunction_FastCallDict() must not be called with an exception set, @@ -14385,16 +13517,15 @@ static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, P caller loses its exception */ assert(!PyErr_Occurred()); if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { - return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL); + return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); } else { - return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs); + return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); } } #endif /* PyFunctionFastCall */ - #if CYTHON_FAST_PYCALL -#include "frameobject.h" +#if CYTHON_FAST_PYCALL static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, PyObject *globals) { PyFrameObject *f; @@ -14412,7 +13543,7 @@ static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args if (f == NULL) { return NULL; } - fastlocals = f->f_localsplus; + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); for (i = 0; i < na; i++) { Py_INCREF(*args); fastlocals[i] = *args++; @@ -14512,8 +13643,57 @@ done: #endif #endif +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = func->ob_type->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCall2Args */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args, *result = NULL; + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyFunction_FastCall(function, args, 2); + } + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyCFunction_FastCall(function, args, 2); + } + #endif + args = PyTuple_New(2); + if (unlikely(!args)) goto done; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + Py_INCREF(function); + result = __Pyx_PyObject_Call(function, args, NULL); + Py_DECREF(args); + Py_DECREF(function); +done: + return result; +} + /* PyObjectCallMethO */ - #if CYTHON_COMPILING_IN_CPYTHON +#if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; PyCFunction cfunc; @@ -14533,7 +13713,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject #endif /* PyObjectCallOneArg */ - #if CYTHON_COMPILING_IN_CPYTHON +#if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *result; PyObject *args = PyTuple_New(1); @@ -14572,8 +13752,43 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec } #endif +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if !CYTHON_AVOID_BORROWED_REFS +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 + result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } else if (unlikely(PyErr_Occurred())) { + return NULL; + } +#else + result = PyDict_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } +#endif +#else + result = PyObject_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + /* GetItemInt */ - static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); @@ -14588,7 +13803,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_ if (wraparound & unlikely(i < 0)) { wrapped_i += PyList_GET_SIZE(o); } - if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyList_GET_SIZE(o)))) { + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; @@ -14606,7 +13821,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize if (wraparound & unlikely(i < 0)) { wrapped_i += PyTuple_GET_SIZE(o); } - if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyTuple_GET_SIZE(o)))) { + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; @@ -14622,7 +13837,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); - if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { + if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; @@ -14630,7 +13845,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); - if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; @@ -14660,7 +13875,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, } /* BytesEquals */ - static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else @@ -14707,7 +13922,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, } /* UnicodeEquals */ - static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else @@ -14809,20 +14024,20 @@ return_ne: } /* RaiseTooManyValuesToUnpack */ - static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); } /* RaiseNeedMoreValuesToUnpack */ - static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", index, (index == 1) ? "" : "s"); } /* IterFinish */ - static CYTHON_INLINE int __Pyx_IterFinish(void) { +static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_FAST_THREAD_STATE PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject* exc_type = tstate->curexc_type; @@ -14857,7 +14072,7 @@ return_ne: } /* UnpackItemEndCheck */ - static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { if (unlikely(retval)) { Py_DECREF(retval); __Pyx_RaiseTooManyValuesError(expected); @@ -14868,8 +14083,32 @@ return_ne: return 0; } +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +} +#endif + /* RaiseException */ - #if PY_MAJOR_VERSION < 3 +#if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { __Pyx_PyThreadState_declare @@ -15028,7 +14267,7 @@ bad: #endif /* ObjectGetItem */ - #if CYTHON_USE_TYPE_SLOTS +#if CYTHON_USE_TYPE_SLOTS static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) { PyObject *runerr; Py_ssize_t key_value; @@ -15056,13 +14295,29 @@ static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) { } #endif +/* GetTopmostException */ +#if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + /* SaveResetException */ - #if CYTHON_FAST_THREAD_STATE +#if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { - #if PY_VERSION_HEX >= 0x030700A3 - *type = tstate->exc_state.exc_type; - *value = tstate->exc_state.exc_value; - *tb = tstate->exc_state.exc_traceback; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; #else *type = tstate->exc_type; *value = tstate->exc_value; @@ -15074,13 +14329,14 @@ static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject * } static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; - #if PY_VERSION_HEX >= 0x030700A3 - tmp_type = tstate->exc_state.exc_type; - tmp_value = tstate->exc_state.exc_value; - tmp_tb = tstate->exc_state.exc_traceback; - tstate->exc_state.exc_type = type; - tstate->exc_state.exc_value = value; - tstate->exc_state.exc_traceback = tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; @@ -15096,7 +14352,7 @@ static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject #endif /* PyErrExceptionMatches */ - #if CYTHON_FAST_THREAD_STATE +#if CYTHON_FAST_THREAD_STATE static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(tuple); @@ -15121,11 +14377,12 @@ static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tsta #endif /* GetException */ - #if CYTHON_FAST_THREAD_STATE -static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) #else -static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) #endif +{ PyObject *local_type, *local_value, *local_tb; #if CYTHON_FAST_THREAD_STATE PyObject *tmp_type, *tmp_value, *tmp_tb; @@ -15158,13 +14415,16 @@ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) *value = local_value; *tb = local_tb; #if CYTHON_FAST_THREAD_STATE - #if PY_VERSION_HEX >= 0x030700A3 - tmp_type = tstate->exc_state.exc_type; - tmp_value = tstate->exc_state.exc_value; - tmp_tb = tstate->exc_state.exc_traceback; - tstate->exc_state.exc_type = local_type; - tstate->exc_state.exc_value = local_value; - tstate->exc_state.exc_traceback = local_tb; + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + } #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; @@ -15191,12 +14451,12 @@ bad: } /* None */ - static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { +static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); } /* FetchCommonType */ - static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* fake_module; PyTypeObject* cached_type = NULL; fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); @@ -15235,7 +14495,7 @@ bad: } /* CythonFunction */ - #include +#include static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) { @@ -15257,7 +14517,7 @@ __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure return op->func_doc; } static int -__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value) +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp = op->func_doc; if (value == NULL) { @@ -15269,7 +14529,7 @@ __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value) return 0; } static PyObject * -__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { if (unlikely(op->func_name == NULL)) { #if PY_MAJOR_VERSION >= 3 @@ -15284,14 +14544,15 @@ __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op) return op->func_name; } static int -__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value) +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 - if (unlikely(value == NULL || !PyUnicode_Check(value))) { + if (unlikely(value == NULL || !PyUnicode_Check(value))) #else - if (unlikely(value == NULL || !PyString_Check(value))) { + if (unlikely(value == NULL || !PyString_Check(value))) #endif + { PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; @@ -15303,20 +14564,21 @@ __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value) return 0; } static PyObject * -__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(op->func_qualname); return op->func_qualname; } static int -__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value) +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 - if (unlikely(value == NULL || !PyUnicode_Check(value))) { + if (unlikely(value == NULL || !PyUnicode_Check(value))) #else - if (unlikely(value == NULL || !PyString_Check(value))) { + if (unlikely(value == NULL || !PyString_Check(value))) #endif + { PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; @@ -15338,7 +14600,7 @@ __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure return self; } static PyObject * -__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); @@ -15349,7 +14611,7 @@ __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op) return op->func_dict; } static int -__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value) +__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; if (unlikely(value == NULL)) { @@ -15369,19 +14631,19 @@ __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value) return 0; } static PyObject * -__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(op->func_globals); return op->func_globals; } static PyObject * -__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(Py_None); return Py_None; } static PyObject * -__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = (op->func_code) ? op->func_code : Py_None; Py_INCREF(result); @@ -15410,7 +14672,7 @@ __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { return result; } static int -__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) { +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value) { value = Py_None; @@ -15426,7 +14688,7 @@ __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) { return 0; } static PyObject * -__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) { +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->defaults_tuple; if (unlikely(!result)) { if (op->defaults_getter) { @@ -15440,7 +14702,7 @@ __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) { return result; } static int -__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) { +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value) { value = Py_None; @@ -15456,7 +14718,7 @@ __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) { return 0; } static PyObject * -__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) { +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->defaults_kwdict; if (unlikely(!result)) { if (op->defaults_getter) { @@ -15470,7 +14732,7 @@ __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) { return result; } static int -__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) { +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value || value == Py_None) { value = NULL; @@ -15486,7 +14748,7 @@ __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) { return 0; } static PyObject * -__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) { +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->func_annotations; if (unlikely(!result)) { result = PyDict_New(); @@ -15666,7 +14928,7 @@ static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, Py return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: - return (*(PyCFunctionWithKeywords)meth)(self, arg, kw); + return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { size = PyTuple_GET_SIZE(arg); @@ -15829,7 +15091,7 @@ static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, Py } /* PyObjectCallNoArg */ - #if CYTHON_COMPILING_IN_CPYTHON +#if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { #if CYTHON_FAST_PYCALL if (PyFunction_Check(func)) { @@ -15837,10 +15099,11 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { } #endif #ifdef __Pyx_CyFunction_USED - if (likely(PyCFunction_Check(func) || __Pyx_TypeCheck(func, __pyx_CyFunctionType))) { + if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func))) #else - if (likely(PyCFunction_Check(func))) { + if (likely(PyCFunction_Check(func))) #endif + { if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { return __Pyx_PyObject_CallMethO(func, NULL); } @@ -15850,14 +15113,14 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { #endif /* StringJoin */ - #if !CYTHON_COMPILING_IN_CPYTHON +#if !CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) { return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL); } #endif /* SliceObject */ - static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { @@ -15954,7 +15217,7 @@ bad: } /* PyIntBinop */ - #if !CYTHON_COMPILING_IN_PYPY +#if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { @@ -16075,9 +15338,8 @@ static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_U } #endif -/* PyIntBinop */ - #if !CYTHON_COMPILING_IN_PYPY -static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { +/* PyIntCompare */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) { if (op1 == op2) { Py_RETURN_TRUE; } @@ -16085,89 +15347,66 @@ static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED if (likely(PyInt_CheckExact(op1))) { const long b = intval; long a = PyInt_AS_LONG(op1); - if (a == b) { - Py_RETURN_TRUE; - } else { - Py_RETURN_FALSE; - } + if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE; } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { - const long b = intval; - long a; + int unequal; + unsigned long uintval; + Py_ssize_t size = Py_SIZE(op1); const digit* digits = ((PyLongObject*)op1)->ob_digit; - const Py_ssize_t size = Py_SIZE(op1); - if (likely(__Pyx_sst_abs(size) <= 1)) { - a = likely(size) ? digits[0] : 0; - if (size == -1) a = -a; + if (intval == 0) { + if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } else if (intval < 0) { + if (size >= 0) + Py_RETURN_FALSE; + intval = -intval; + size = -size; } else { - switch (size) { - case -2: - if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - } - CYTHON_FALLTHROUGH; - case 2: - if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - } - CYTHON_FALLTHROUGH; - case -3: - if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - } - CYTHON_FALLTHROUGH; - case 3: - if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - } - CYTHON_FALLTHROUGH; - case -4: - if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { - a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - } - CYTHON_FALLTHROUGH; - case 4: - if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { - a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - } - CYTHON_FALLTHROUGH; - #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15 - default: return PyLong_Type.tp_richcompare(op1, op2, Py_EQ); - #else - default: Py_RETURN_FALSE; - #endif - } - } - if (a == b) { - Py_RETURN_TRUE; - } else { + if (size <= 0) Py_RETURN_FALSE; - } + } + uintval = (unsigned long) intval; +#if PyLong_SHIFT * 4 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 4)) { + unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 3 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 3)) { + unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 2 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 2)) { + unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 1 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 1)) { + unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif + unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); + if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; double a = PyFloat_AS_DOUBLE(op1); - if ((double)a == (double)b) { - Py_RETURN_TRUE; - } else { - Py_RETURN_FALSE; - } + if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE; } - return PyObject_RichCompare(op1, op2, Py_EQ); + return ( + PyObject_RichCompare(op1, op2, Py_EQ)); } -#endif /* IterNext */ - static PyObject *__Pyx_PyIter_Next2Default(PyObject* defval) { +static PyObject *__Pyx_PyIter_Next2Default(PyObject* defval) { PyObject* exc_type; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -16222,7 +15461,7 @@ static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject* } /* PyObject_GenericGetAttrNoDict */ - #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 @@ -16262,7 +15501,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj #endif /* Import */ - static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; @@ -16309,7 +15548,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, - name, global_dict, empty_dict, list, py_level, NULL); + name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( @@ -16326,26 +15565,8 @@ bad: return module; } -/* ModuleImport */ - #ifndef __PYX_HAVE_RT_ImportModule -#define __PYX_HAVE_RT_ImportModule -static PyObject *__Pyx_ImportModule(const char *name) { - PyObject *py_name = 0; - PyObject *py_module = 0; - py_name = __Pyx_PyIdentifier_FromString(name); - if (!py_name) - goto bad; - py_module = PyImport_Import(py_name); - Py_DECREF(py_name); - return py_module; -bad: - Py_XDECREF(py_name); - return 0; -} -#endif - /* RegisterModuleCleanup */ - #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY +#if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY static PyObject* __pyx_module_cleanup_atexit(PyObject *module, CYTHON_UNUSED PyObject *unused) { __pyx_module_cleanup(module); Py_INCREF(Py_None); return Py_None; @@ -16362,7 +15583,7 @@ static int __Pyx_RegisterCleanup(void) { cleanup_func = PyCFunction_New(&cleanup_def, 0); if (!cleanup_func) goto bad; - atexit = __Pyx_ImportModule("atexit"); + atexit = PyImport_ImportModule("atexit"); if (!atexit) goto bad; reg = PyObject_GetAttrString(atexit, "_exithandlers"); @@ -16404,16 +15625,11 @@ bad: Py_XDECREF(res); return ret; } -#else -static int __Pyx_RegisterCleanup(void) { - (void)__Pyx_ImportModule; - return 0; -} #endif /* CLineInTraceback */ - #ifndef CYTHON_CLINE_IN_TRACEBACK -static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) { +#ifndef CYTHON_CLINE_IN_TRACEBACK +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON @@ -16426,7 +15642,9 @@ static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_li #if CYTHON_COMPILING_IN_CPYTHON cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); if (likely(cython_runtime_dict)) { - use_cline = __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback); + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) } else #endif { @@ -16443,7 +15661,7 @@ static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_li c_line = 0; PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); } - else if (PyObject_Not(use_cline) != 0) { + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { c_line = 0; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); @@ -16452,7 +15670,7 @@ static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_li #endif /* CodeObjectCache */ - static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; @@ -16532,7 +15750,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { } /* AddTraceback */ - #include "compile.h" +#include "compile.h" #include "frameobject.h" #include "traceback.h" static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( @@ -16617,8 +15835,8 @@ bad: } /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { - const long neg_one = (long) -1, const_zero = (long) 0; +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { @@ -16648,7 +15866,7 @@ bad: } /* CIntFromPyVerify */ - #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) @@ -16670,8 +15888,8 @@ bad: } /* CIntFromPy */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - const long neg_one = (long) -1, const_zero = (long) 0; +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { @@ -16859,8 +16077,8 @@ raise_neg_overflow: } /* CIntFromPy */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - const int neg_one = (int) -1, const_zero = (int) 0; +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { + const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { @@ -17048,7 +16266,7 @@ raise_neg_overflow: } /* FastTypeChecks */ - #if CYTHON_COMPILING_IN_CPYTHON +#if CYTHON_COMPILING_IN_CPYTHON static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { while (a) { a = a->tp_base; @@ -17148,16 +16366,17 @@ static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObj #endif /* SwapException */ - #if CYTHON_FAST_THREAD_STATE +#if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; - #if PY_VERSION_HEX >= 0x030700A3 - tmp_type = tstate->exc_state.exc_type; - tmp_value = tstate->exc_state.exc_value; - tmp_tb = tstate->exc_state.exc_traceback; - tstate->exc_state.exc_type = *type; - tstate->exc_state.exc_value = *value; - tstate->exc_state.exc_traceback = *tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = *type; + exc_info->exc_value = *value; + exc_info->exc_traceback = *tb; #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; @@ -17181,59 +16400,122 @@ static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, } #endif -/* PyObjectCallMethod1 */ - static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { - PyObject *result = NULL; -#if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(method))) { - PyObject *self = PyMethod_GET_SELF(method); - if (likely(self)) { - PyObject *args; - PyObject *function = PyMethod_GET_FUNCTION(method); - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(function)) { - PyObject *args[2] = {self, arg}; - result = __Pyx_PyFunction_FastCall(function, args, 2); - goto done; - } - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(function)) { - PyObject *args[2] = {self, arg}; - result = __Pyx_PyCFunction_FastCall(function, args, 2); - goto done; +/* PyObjectGetMethod */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if PY_MAJOR_VERSION >= 3 + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type))) + #endif +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; } - #endif - args = PyTuple_New(2); - if (unlikely(!args)) goto done; - Py_INCREF(self); - PyTuple_SET_ITEM(args, 0, self); - Py_INCREF(arg); - PyTuple_SET_ITEM(args, 1, arg); - Py_INCREF(function); - result = __Pyx_PyObject_Call(function, args, NULL); - Py_DECREF(args); - Py_DECREF(function); - return result; } } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (descr != NULL) { + *method = descr; + return 0; + } + PyErr_Format(PyExc_AttributeError, +#if PY_MAJOR_VERSION >= 3 + "'%.50s' object has no attribute '%U'", + tp->tp_name, name); +#else + "'%.50s' object has no attribute '%.400s'", + tp->tp_name, PyString_AS_STRING(name)); #endif - result = __Pyx_PyObject_CallOneArg(method, arg); - goto done; -done: + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} + +/* PyObjectCallMethod1 */ +static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { + PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); + Py_DECREF(method); return result; } static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { - PyObject *method, *result; - method = __Pyx_PyObject_GetAttrStr(obj, method_name); + PyObject *method = NULL, *result; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_Call2Args(method, obj, arg); + Py_DECREF(method); + return result; + } if (unlikely(!method)) return NULL; - result = __Pyx__PyObject_CallMethod1(method, arg); - Py_DECREF(method); - return result; + return __Pyx__PyObject_CallMethod1(method, arg); } /* CoroutineBase */ - #include +#include #include #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom) static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) { @@ -17316,21 +16598,22 @@ static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__p return 0; } static CYTHON_INLINE -void __Pyx_Coroutine_ExceptionClear(__pyx_CoroutineObject *self) { - PyObject *exc_type = self->exc_type; - PyObject *exc_value = self->exc_value; - PyObject *exc_traceback = self->exc_traceback; - self->exc_type = NULL; - self->exc_value = NULL; - self->exc_traceback = NULL; - Py_XDECREF(exc_type); - Py_XDECREF(exc_value); - Py_XDECREF(exc_traceback); +void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) { + PyObject *t, *v, *tb; + t = exc_state->exc_type; + v = exc_state->exc_value; + tb = exc_state->exc_traceback; + exc_state->exc_type = NULL; + exc_state->exc_value = NULL; + exc_state->exc_traceback = NULL; + Py_XDECREF(t); + Py_XDECREF(v); + Py_XDECREF(tb); } #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL) static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) { const char *msg; - if (0) { + if ((0)) { #ifdef __Pyx_Coroutine_USED } else if (__Pyx_Coroutine_Check((PyObject*)gen)) { msg = "coroutine already executing"; @@ -17347,7 +16630,7 @@ static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineOb #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL) static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) { const char *msg; - if (0) { + if ((0)) { #ifdef __Pyx_Coroutine_USED } else if (__Pyx_Coroutine_Check(gen)) { msg = "can't send non-None value to a just-started coroutine"; @@ -17381,6 +16664,7 @@ static PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) { __Pyx_PyThreadState_declare PyThreadState *tstate; + __Pyx_ExcInfoStruct *exc_state; PyObject *retval; assert(!self->is_running); if (unlikely(self->resume_label == 0)) { @@ -17397,33 +16681,47 @@ PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, i #else tstate = __Pyx_PyThreadState_Current; #endif - if (self->exc_type) { -#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON -#else - if (self->exc_traceback) { - PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback; + exc_state = &self->gi_exc_state; + if (exc_state->exc_type) { + #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON + #else + if (exc_state->exc_traceback) { + PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback; PyFrameObject *f = tb->tb_frame; Py_XINCREF(tstate->frame); assert(f->f_back == NULL); f->f_back = tstate->frame; } -#endif - __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value, - &self->exc_traceback); + #endif + } +#if CYTHON_USE_EXC_INFO_STACK + exc_state->previous_item = tstate->exc_info; + tstate->exc_info = exc_state; +#else + if (exc_state->exc_type) { + __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); } else { - __Pyx_Coroutine_ExceptionClear(self); - __Pyx_ExceptionSave(&self->exc_type, &self->exc_value, &self->exc_traceback); + __Pyx_Coroutine_ExceptionClear(exc_state); + __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); } +#endif self->is_running = 1; retval = self->body((PyObject *) self, tstate, value); self->is_running = 0; +#if CYTHON_USE_EXC_INFO_STACK + exc_state = &self->gi_exc_state; + tstate->exc_info = exc_state->previous_item; + exc_state->previous_item = NULL; + __Pyx_Coroutine_ResetFrameBackpointer(exc_state); +#endif return retval; } -static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__pyx_CoroutineObject *self) { - if (likely(self->exc_traceback)) { +static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) { + PyObject *exc_tb = exc_state->exc_traceback; + if (likely(exc_tb)) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON #else - PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback; + PyTracebackObject *tb = (PyTracebackObject *) exc_tb; PyFrameObject *f = tb->tb_frame; Py_CLEAR(f->f_back); #endif @@ -17522,7 +16820,7 @@ static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) { return -1; } else if (__Pyx_CoroutineAwait_CheckExact(yf)) { - retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf); + retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL); if (!retval) return -1; } else @@ -17587,6 +16885,9 @@ static PyObject *__Pyx_Generator_Next(PyObject *self) { } return __Pyx_Coroutine_SendEx(gen, Py_None, 0); } +static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) { + return __Pyx_Coroutine_Close(self); +} static PyObject *__Pyx_Coroutine_Close(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; PyObject *retval, *raised_exception; @@ -17703,23 +17004,24 @@ static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) { return NULL; return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1); } +static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) { + Py_VISIT(exc_state->exc_type); + Py_VISIT(exc_state->exc_value); + Py_VISIT(exc_state->exc_traceback); + return 0; +} static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) { Py_VISIT(gen->closure); Py_VISIT(gen->classobj); Py_VISIT(gen->yieldfrom); - Py_VISIT(gen->exc_type); - Py_VISIT(gen->exc_value); - Py_VISIT(gen->exc_traceback); - return 0; + return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg); } static int __Pyx_Coroutine_clear(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; Py_CLEAR(gen->closure); Py_CLEAR(gen->classobj); Py_CLEAR(gen->yieldfrom); - Py_CLEAR(gen->exc_type); - Py_CLEAR(gen->exc_value); - Py_CLEAR(gen->exc_traceback); + __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state); #ifdef __Pyx_AsyncGen_USED if (__Pyx_AsyncGen_CheckExact(self)) { Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer); @@ -17857,7 +17159,7 @@ static void __Pyx_Coroutine_del(PyObject *self) { #endif } static PyObject * -__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self) +__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context) { PyObject *name = self->gi_name; if (unlikely(!name)) name = Py_None; @@ -17865,14 +17167,15 @@ __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self) return name; } static int -__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value) +__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 - if (unlikely(value == NULL || !PyUnicode_Check(value))) { + if (unlikely(value == NULL || !PyUnicode_Check(value))) #else - if (unlikely(value == NULL || !PyString_Check(value))) { + if (unlikely(value == NULL || !PyString_Check(value))) #endif + { PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; @@ -17884,7 +17187,7 @@ __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value) return 0; } static PyObject * -__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self) +__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context) { PyObject *name = self->gi_qualname; if (unlikely(!name)) name = Py_None; @@ -17892,14 +17195,15 @@ __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self) return name; } static int -__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value) +__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 - if (unlikely(value == NULL || !PyUnicode_Check(value))) { + if (unlikely(value == NULL || !PyUnicode_Check(value))) #else - if (unlikely(value == NULL || !PyString_Check(value))) { + if (unlikely(value == NULL || !PyString_Check(value))) #endif + { PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; @@ -17928,9 +17232,12 @@ static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( gen->resume_label = 0; gen->classobj = NULL; gen->yieldfrom = NULL; - gen->exc_type = NULL; - gen->exc_value = NULL; - gen->exc_traceback = NULL; + gen->gi_exc_state.exc_type = NULL; + gen->gi_exc_state.exc_value = NULL; + gen->gi_exc_state.exc_traceback = NULL; +#if CYTHON_USE_EXC_INFO_STACK + gen->gi_exc_state.previous_item = NULL; +#endif gen->gi_weakreflist = NULL; Py_XINCREF(qualname); gen->gi_qualname = qualname; @@ -17945,7 +17252,7 @@ static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( } /* PatchModuleWithCoroutine */ - static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) { +static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) { #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) int result; PyObject *globals, *result_obj; @@ -17985,7 +17292,7 @@ ignore: } /* PatchGeneratorABC */ - #ifndef CYTHON_REGISTER_ABCS +#ifndef CYTHON_REGISTER_ABCS #define CYTHON_REGISTER_ABCS 1 #endif #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) @@ -18042,12 +17349,12 @@ static int __Pyx_patch_abc(void) { } /* Generator */ - static PyMethodDef __pyx_Generator_methods[] = { +static PyMethodDef __pyx_Generator_methods[] = { {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O, (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")}, {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS, (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")}, - {"close", (PyCFunction) __Pyx_Coroutine_Close, METH_NOARGS, + {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS, (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")}, {0, 0, 0, 0} }; @@ -18134,7 +17441,7 @@ static int __pyx_Generator_init(void) { } /* CheckBinaryVersion */ - static int __Pyx_check_binary_version(void) { +static int __Pyx_check_binary_version(void) { char ctversion[4], rtversion[4]; PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion()); @@ -18150,7 +17457,7 @@ static int __pyx_Generator_init(void) { } /* InitStrings */ - static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { +static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 if (t->is_unicode) { @@ -18259,6 +17566,13 @@ static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { #if PY_MAJOR_VERSION >= 3 if (PyLong_Check(result)) { @@ -18336,7 +17650,7 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else - return PyInt_AsSsize_t(x); + return PyInt_AsSsize_t(b); } #endif if (likely(PyLong_CheckExact(b))) { diff --git a/src/lxml/_elementpath.py b/src/lxml/_elementpath.py index 9360fab..5462df6 100644 --- a/src/lxml/_elementpath.py +++ b/src/lxml/_elementpath.py @@ -1,3 +1,5 @@ +# cython: language_level=2 + # # ElementTree # $Id: ElementPath.py 3375 2008-02-13 08:05:08Z fredrik $ @@ -53,6 +55,8 @@ # you, if needed. ## +from __future__ import absolute_import + import re xpath_tokenizer_re = re.compile( diff --git a/src/lxml/apihelpers.pxi b/src/lxml/apihelpers.pxi index eb122a2..5366fca 100644 --- a/src/lxml/apihelpers.pxi +++ b/src/lxml/apihelpers.pxi @@ -247,7 +247,7 @@ cdef _iter_nsmap(nsmap): if len(nsmap) <= 1: return nsmap.items() # nsmap will usually be a plain unordered dict => avoid type checking overhead - if OrderedDict is not None and type(nsmap) is not dict and isinstance(nsmap, OrderedDict): + if type(nsmap) is not dict and isinstance(nsmap, OrderedDict): return nsmap.items() # keep existing order if None not in nsmap: return sorted(nsmap.items()) @@ -273,8 +273,7 @@ cdef _iter_attrib(attrib): # attrib will usually be a plain unordered dict if type(attrib) is dict: return sorted(attrib.items()) - elif isinstance(attrib, _Attrib) or ( - OrderedDict is not None and isinstance(attrib, OrderedDict)): + elif isinstance(attrib, (_Attrib, OrderedDict)): return attrib.items() else: # assume it's an unordered mapping of some kind @@ -1103,8 +1102,8 @@ cdef int _copyNonElementSiblings(xmlNode* c_node, xmlNode* c_target) except -1: tree.xmlAddPrevSibling(c_target, c_copy) c_sibling = c_sibling.next while c_sibling.next != NULL and \ - (c_sibling.next.type == tree.XML_PI_NODE or \ - c_sibling.next.type == tree.XML_COMMENT_NODE): + (c_sibling.next.type == tree.XML_PI_NODE or + c_sibling.next.type == tree.XML_COMMENT_NODE): c_sibling = c_sibling.next c_copy = tree.xmlDocCopyNode(c_sibling, c_target.doc, 1) if c_copy is NULL: @@ -1341,14 +1340,50 @@ cdef int _addSibling(_Element element, _Element sibling, bint as_next) except -1 moveNodeToDocument(element._doc, c_source_doc, c_node) return 0 -cdef inline int isutf8(const_xmlChar* s): +cdef inline bint isutf8(const_xmlChar* s): cdef xmlChar c = s[0] while c != c'\0': if c & 0x80: - return 1 + return True s += 1 c = s[0] - return 0 + return False + +cdef bint isutf8l(const_xmlChar* s, size_t length): + """ + Search for non-ASCII characters in the string, knowing its length in advance. + """ + cdef int i + cdef unsigned long non_ascii_mask + cdef const unsigned long *lptr = s + + cdef const unsigned long *end = lptr + length // sizeof(unsigned long) + if length >= sizeof(non_ascii_mask): + # Build constant 0x80808080... mask (and let the C compiler fold it). + non_ascii_mask = 0 + for i in range(sizeof(non_ascii_mask) // 2): + non_ascii_mask = (non_ascii_mask << 16) | 0x8080 + + # Advance to long-aligned character before we start reading longs. + while (s) % sizeof(unsigned long) and s < end: + if s[0] & 0x80: + return True + s += 1 + + # Read one long at a time + lptr = s + while lptr < end: + if lptr[0] & non_ascii_mask: + return True + lptr += 1 + s = lptr + + while s < (end + length % sizeof(unsigned long)): + if s[0] & 0x80: + return True + s += 1 + + return False cdef int _is_valid_xml_ascii(bytes pystring): """Check if a string is XML ascii content.""" @@ -1412,7 +1447,7 @@ cdef object funicode(const_xmlChar* s): spos += 1 slen = spos - s if spos[0] != c'\0': - slen += tree.xmlStrlen(spos) + slen += cstring_h.strlen( spos) if is_non_ascii: return s[:slen].decode('UTF-8') return s[:slen] @@ -1521,7 +1556,7 @@ cdef object _encodeFilenameUTF8(object filename): if filename is None: return None elif isinstance(filename, bytes): - if not isutf8(filename): + if not isutf8l(filename, len(filename)): # plain ASCII! return filename c_filename = _cstr(filename) @@ -1658,7 +1693,7 @@ cdef object _namespacedNameFromNsName(const_xmlChar* href, const_xmlChar* name): return python.PyUnicode_FromFormat("{%s}%s", href, name) else: s = python.PyBytes_FromFormat("{%s}%s", href, name) - if python.IS_PYPY and (python.LXML_UNICODE_STRINGS or isutf8(_xcstr(s))): + if python.IS_PYPY and (python.LXML_UNICODE_STRINGS or isutf8l(s, len(s))): return (s).decode('utf8') else: return s diff --git a/src/lxml/builder.c b/src/lxml/builder.c index 586c97a..f4d1360 100644 --- a/src/lxml/builder.c +++ b/src/lxml/builder.c @@ -1,28 +1,27 @@ -/* Generated by Cython 0.28.5 */ +/* Generated by Cython 0.29.2 */ /* BEGIN: Cython Metadata { "distutils": { "define_macros": [ [ - "CYTHON_TRACE_NOGIL", - "1" - ], - [ - "CYTHON_CLINE_IN_TRACEBACK", + "CYTHON_CLINE_IN_TRACEBACK", "0" ] - ], + ], + "extra_compile_args": [ + "-w" + ], "include_dirs": [ - "/usr/include/libxml2", - "src", + "/usr/include/libxml2", + "src", "src/lxml/includes" - ], - "name": "lxml.builder", + ], + "name": "lxml.builder", "sources": [ "src/lxml/builder.py" ] - }, + }, "module_name": "lxml.builder" } END: Cython Metadata */ @@ -34,7 +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_28_5" +#define CYTHON_ABI "0_29_2" +#define CYTHON_HEX_VERSION 0x001D02F0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof @@ -105,6 +105,10 @@ END: Cython Metadata */ #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 #elif defined(PYSTON_VERSION) #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 1 @@ -142,6 +146,10 @@ END: Cython Metadata */ #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 0 @@ -195,11 +203,17 @@ END: Cython Metadata */ #define CYTHON_FAST_PYCALL 1 #endif #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (0 && PY_VERSION_HEX >= 0x03050000) + #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) #endif #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) #endif + #ifndef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) + #endif #endif #if !defined(CYTHON_FAST_PYCCALL) #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) @@ -209,6 +223,9 @@ END: Cython Metadata */ #undef SHIFT #undef BASE #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif #endif #ifndef __has_attribute #define __has_attribute(x) 0 @@ -335,6 +352,9 @@ END: Cython Metadata */ #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) #ifndef METH_FASTCALL #define METH_FASTCALL 0x80 @@ -348,15 +368,40 @@ END: Cython Metadata */ #endif #if CYTHON_FAST_PYCCALL #define __Pyx_PyFastCFunction_Check(func)\ - ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS))))) + ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))))) #else #define __Pyx_PyFastCFunction_Check(func) 0 #endif +#if CYTHON_USE_DICT_VERSIONS +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ + } +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) #define PyObject_Malloc(s) PyMem_Malloc(s) #define PyObject_Free(p) PyMem_Free(p) #define PyObject_Realloc(p) PyMem_Realloc(p) #endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 + #define PyMem_RawMalloc(n) PyMem_Malloc(n) + #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) + #define PyMem_RawFree(p) PyMem_Free(p) +#endif #if CYTHON_COMPILING_IN_PYSTON #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) @@ -464,8 +509,8 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) #endif -#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) -#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else @@ -617,6 +662,9 @@ typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* enc (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) @@ -675,6 +723,7 @@ static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); #define __Pyx_PySequence_Tuple(obj)\ (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) @@ -755,7 +804,7 @@ static int __Pyx_init_sys_getdefaultencoding_params(void) { if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; - __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); + __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); @@ -793,7 +842,6 @@ static const char *__pyx_filename; static const char *__pyx_f[] = { "src/lxml/builder.py", - "src/lxml/builder.pxd", "stringsource", }; @@ -801,7 +849,7 @@ static const char *__pyx_f[] = { struct __pyx_obj_4lxml_7builder_ElementMaker; struct __pyx_obj_4lxml_7builder___pyx_scope_struct____init__; -/* "lxml/builder.pxd":5 +/* "lxml/builder.pxd":6 * cdef object partial * * cdef class ElementMaker: # <<<<<<<<<<<<<< @@ -817,7 +865,7 @@ struct __pyx_obj_4lxml_7builder_ElementMaker { }; -/* "lxml/builder.py":144 +/* "lxml/builder.py":148 * """ * * def __init__(self, typemap=None, # <<<<<<<<<<<<<< @@ -916,244 +964,6 @@ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ 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); -/* PyThreadStateGet.proto */ -#if CYTHON_FAST_THREAD_STATE -#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; -#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; -#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type -#else -#define __Pyx_PyThreadState_declare -#define __Pyx_PyThreadState_assign -#define __Pyx_PyErr_Occurred() PyErr_Occurred() -#endif - -/* PyErrFetchRestore.proto */ -#if CYTHON_FAST_THREAD_STATE -#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) -#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) -#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) -#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) -#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) -static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); -static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); -#if CYTHON_COMPILING_IN_CPYTHON -#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) -#else -#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) -#endif -#else -#define __Pyx_PyErr_Clear() PyErr_Clear() -#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) -#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) -#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) -#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) -#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) -#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) -#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) -#endif - -/* Profile.proto */ -#ifndef CYTHON_PROFILE -#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON - #define CYTHON_PROFILE 0 -#else - #define CYTHON_PROFILE 1 -#endif -#endif -#ifndef CYTHON_TRACE_NOGIL - #define CYTHON_TRACE_NOGIL 0 -#else - #if CYTHON_TRACE_NOGIL && !defined(CYTHON_TRACE) - #define CYTHON_TRACE 1 - #endif -#endif -#ifndef CYTHON_TRACE - #define CYTHON_TRACE 0 -#endif -#if CYTHON_TRACE - #undef CYTHON_PROFILE_REUSE_FRAME -#endif -#ifndef CYTHON_PROFILE_REUSE_FRAME - #define CYTHON_PROFILE_REUSE_FRAME 0 -#endif -#if CYTHON_PROFILE || CYTHON_TRACE - #include "compile.h" - #include "frameobject.h" - #include "traceback.h" - #if CYTHON_PROFILE_REUSE_FRAME - #define CYTHON_FRAME_MODIFIER static - #define CYTHON_FRAME_DEL(frame) - #else - #define CYTHON_FRAME_MODIFIER - #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame) - #endif - #define __Pyx_TraceDeclarations\ - static PyCodeObject *__pyx_frame_code = NULL;\ - CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\ - int __Pyx_use_tracing = 0; - #define __Pyx_TraceFrameInit(codeobj)\ - if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj; - #ifdef WITH_THREAD - #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\ - if (nogil) {\ - if (CYTHON_TRACE_NOGIL) {\ - PyThreadState *tstate;\ - PyGILState_STATE state = PyGILState_Ensure();\ - tstate = __Pyx_PyThreadState_Current;\ - if (unlikely(tstate->use_tracing) && !tstate->tracing &&\ - (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\ - }\ - PyGILState_Release(state);\ - if (unlikely(__Pyx_use_tracing < 0)) goto_error;\ - }\ - } else {\ - PyThreadState* tstate = PyThreadState_GET();\ - if (unlikely(tstate->use_tracing) && !tstate->tracing &&\ - (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\ - if (unlikely(__Pyx_use_tracing < 0)) goto_error;\ - }\ - } - #else - #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\ - { PyThreadState* tstate = PyThreadState_GET();\ - if (unlikely(tstate->use_tracing) && !tstate->tracing &&\ - (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\ - if (unlikely(__Pyx_use_tracing < 0)) goto_error;\ - }\ - } - #endif - #define __Pyx_TraceException()\ - if (likely(!__Pyx_use_tracing)); else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ - if (tstate->use_tracing &&\ - (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ - tstate->tracing++;\ - tstate->use_tracing = 0;\ - PyObject *exc_info = __Pyx_GetExceptionTuple(tstate);\ - if (exc_info) {\ - if (CYTHON_TRACE && tstate->c_tracefunc)\ - tstate->c_tracefunc(\ - tstate->c_traceobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\ - tstate->c_profilefunc(\ - tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\ - Py_DECREF(exc_info);\ - }\ - tstate->use_tracing = 1;\ - tstate->tracing--;\ - }\ - } - static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) { - PyObject *type, *value, *traceback; - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); - tstate->tracing++; - tstate->use_tracing = 0; - if (CYTHON_TRACE && tstate->c_tracefunc) - tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result); - if (tstate->c_profilefunc) - tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result); - CYTHON_FRAME_DEL(frame); - tstate->use_tracing = 1; - tstate->tracing--; - __Pyx_ErrRestoreInState(tstate, type, value, traceback); - } - #ifdef WITH_THREAD - #define __Pyx_TraceReturn(result, nogil)\ - if (likely(!__Pyx_use_tracing)); else {\ - if (nogil) {\ - if (CYTHON_TRACE_NOGIL) {\ - PyThreadState *tstate;\ - PyGILState_STATE state = PyGILState_Ensure();\ - tstate = __Pyx_PyThreadState_Current;\ - if (tstate->use_tracing) {\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\ - }\ - PyGILState_Release(state);\ - }\ - } else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ - if (tstate->use_tracing) {\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\ - }\ - }\ - } - #else - #define __Pyx_TraceReturn(result, nogil)\ - if (likely(!__Pyx_use_tracing)); else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ - if (tstate->use_tracing) {\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\ - }\ - } - #endif - static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno); - static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, PyThreadState* tstate, const char *funcname, const char *srcfile, int firstlineno); -#else - #define __Pyx_TraceDeclarations - #define __Pyx_TraceFrameInit(codeobj) - #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error) if ((1)); else goto_error; - #define __Pyx_TraceException() - #define __Pyx_TraceReturn(result, nogil) -#endif -#if CYTHON_TRACE - static int __Pyx_call_line_trace_func(PyThreadState *tstate, PyFrameObject *frame, int lineno) { - int ret; - PyObject *type, *value, *traceback; - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); - __Pyx_PyFrame_SetLineNumber(frame, lineno); - tstate->tracing++; - tstate->use_tracing = 0; - ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL); - tstate->use_tracing = 1; - tstate->tracing--; - if (likely(!ret)) { - __Pyx_ErrRestoreInState(tstate, type, value, traceback); - } else { - Py_XDECREF(type); - Py_XDECREF(value); - Py_XDECREF(traceback); - } - return ret; - } - #ifdef WITH_THREAD - #define __Pyx_TraceLine(lineno, nogil, goto_error)\ - if (likely(!__Pyx_use_tracing)); else {\ - if (nogil) {\ - if (CYTHON_TRACE_NOGIL) {\ - int ret = 0;\ - PyThreadState *tstate;\ - PyGILState_STATE state = PyGILState_Ensure();\ - tstate = __Pyx_PyThreadState_Current;\ - if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\ - ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\ - }\ - PyGILState_Release(state);\ - if (unlikely(ret)) goto_error;\ - }\ - } else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ - if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\ - int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\ - if (unlikely(ret)) goto_error;\ - }\ - }\ - } - #else - #define __Pyx_TraceLine(lineno, nogil, goto_error)\ - if (likely(!__Pyx_use_tracing)); else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ - if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\ - int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\ - if (unlikely(ret)) goto_error;\ - }\ - } - #endif -#else - #define __Pyx_TraceLine(lineno, nogil, goto_error) if ((1)); else goto_error; -#endif - /* GetItemInt.proto */ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ @@ -1185,6 +995,22 @@ static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) #endif +/* GetTopmostException.proto */ +#if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() PyErr_Occurred() +#endif + /* SaveResetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) @@ -1228,6 +1054,18 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, #else #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) #endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) #endif /* PyObjectCall.proto */ @@ -1245,6 +1083,31 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject /* PyObjectCallOneArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + /* RaiseException.proto */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); @@ -1268,7 +1131,25 @@ static CYTHON_INLINE int __Pyx_IterFinish(void); static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /* GetModuleGlobalName.proto */ -static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +#define __Pyx_GetModuleGlobalNameUncached(var, name) {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif /* None.proto */ static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); @@ -1325,6 +1206,7 @@ typedef struct { PyObject *func_annotations; } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; +#define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType)) #define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\ __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code) static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, @@ -1404,6 +1286,9 @@ static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction * #define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) #endif +/* PyObjectCall2Args.proto */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + /* ListAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { @@ -1421,9 +1306,11 @@ static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif +/* PyObjectGetMethod.proto */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); + /* PyObjectCallMethod1.proto */ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); -static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg); /* append.proto */ static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); @@ -1460,21 +1347,13 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam /* SetupReduce.proto */ static int __Pyx_setup_reduce(PyObject* type_obj); -/* PyIdentifierFromString.proto */ -#if !defined(__Pyx_PyIdentifier_FromString) -#if PY_MAJOR_VERSION < 3 - #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) -#else - #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) -#endif -#endif - -/* ModuleImport.proto */ -static PyObject *__Pyx_ImportModule(const char *name); - /* RegisterModuleCleanup.proto */ static void __pyx_module_cleanup(PyObject *self); +#if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY static int __Pyx_RegisterCleanup(void); +#else +#define __Pyx_RegisterCleanup() (0) +#endif /* CLineInTraceback.proto */ #ifdef CYTHON_CLINE_IN_TRACEBACK @@ -1556,7 +1435,7 @@ static const char __pyx_k_v[] = "v"; static const char __pyx_k_ET[] = "ET"; static const char __pyx_k__2[] = "{"; static const char __pyx_k__3[] = "}"; -static const char __pyx_k__13[] = "*"; +static const char __pyx_k__10[] = "*"; static const char __pyx_k_get[] = "get"; static const char __pyx_k_mro[] = "__mro__"; static const char __pyx_k_new[] = "__new__"; @@ -1607,6 +1486,7 @@ static const char __pyx_k_lxml_etree[] = "lxml.etree"; static const char __pyx_k_pyx_result[] = "__pyx_result"; static const char __pyx_k_PickleError[] = "PickleError"; static const char __pyx_k_makeelement[] = "makeelement"; +static const char __pyx_k_ElementMaker[] = "ElementMaker"; static const char __pyx_k_lxml_builder[] = "lxml.builder"; static const char __pyx_k_pyx_checksum[] = "__pyx_checksum"; static const char __pyx_k_stringsource[] = "stringsource"; @@ -1632,6 +1512,7 @@ static PyObject *__pyx_kp_s_Can_t_add_a_CDATA_section_Elemen; static PyObject *__pyx_n_s_E; static PyObject *__pyx_n_s_ET; static PyObject *__pyx_n_s_Element; +static PyObject *__pyx_n_s_ElementMaker; static PyObject *__pyx_n_s_ElementMaker___reduce_cython; static PyObject *__pyx_n_s_ElementMaker___setstate_cython; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x9f; @@ -1640,7 +1521,7 @@ static PyObject *__pyx_n_s_NameError; static PyObject *__pyx_n_s_PickleError; static PyObject *__pyx_n_s_TypeError; static PyObject *__pyx_n_s_ValueError; -static PyObject *__pyx_n_s__13; +static PyObject *__pyx_n_s__10; static PyObject *__pyx_kp_s__2; static PyObject *__pyx_kp_s__3; static PyObject *__pyx_n_s_add_cdata; @@ -1722,18 +1603,18 @@ static PyObject *__pyx_int_167522209; static PyObject *__pyx_tuple__4; static PyObject *__pyx_tuple__6; static PyObject *__pyx_tuple__8; -static PyObject *__pyx_tuple__14; +static PyObject *__pyx_tuple__11; +static PyObject *__pyx_tuple__13; static PyObject *__pyx_tuple__15; -static PyObject *__pyx_tuple__16; static PyObject *__pyx_codeobj__5; static PyObject *__pyx_codeobj__7; static PyObject *__pyx_codeobj__9; -static PyObject *__pyx_codeobj__10; -static PyObject *__pyx_codeobj__11; static PyObject *__pyx_codeobj__12; +static PyObject *__pyx_codeobj__14; +static PyObject *__pyx_codeobj__16; /* Late includes */ -/* "lxml/builder.py":144 +/* "lxml/builder.py":148 * """ * * def __init__(self, typemap=None, # <<<<<<<<<<<<<< @@ -1756,7 +1637,7 @@ static int __pyx_pw_4lxml_7builder_12ElementMaker_1__init__(PyObject *__pyx_v_se PyObject* values[4] = {0,0,0,0}; values[0] = ((PyObject *)Py_None); - /* "lxml/builder.py":145 + /* "lxml/builder.py":149 * * def __init__(self, typemap=None, * namespace=None, nsmap=None, makeelement=None): # <<<<<<<<<<<<<< @@ -1808,7 +1689,7 @@ static int __pyx_pw_4lxml_7builder_12ElementMaker_1__init__(PyObject *__pyx_v_se } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 144, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 148, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -1831,7 +1712,7 @@ static int __pyx_pw_4lxml_7builder_12ElementMaker_1__init__(PyObject *__pyx_v_se } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 144, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 148, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.builder.ElementMaker.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -1839,7 +1720,7 @@ static int __pyx_pw_4lxml_7builder_12ElementMaker_1__init__(PyObject *__pyx_v_se __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4lxml_7builder_12ElementMaker___init__(((struct __pyx_obj_4lxml_7builder_ElementMaker *)__pyx_v_self), __pyx_v_typemap, __pyx_v_namespace, __pyx_v_nsmap, __pyx_v_makeelement); - /* "lxml/builder.py":144 + /* "lxml/builder.py":148 * """ * * def __init__(self, typemap=None, # <<<<<<<<<<<<<< @@ -1852,7 +1733,7 @@ static int __pyx_pw_4lxml_7builder_12ElementMaker_1__init__(PyObject *__pyx_v_se return __pyx_r; } -/* "lxml/builder.py":169 +/* "lxml/builder.py":173 * typemap = {} * * def add_text(elem, item): # <<<<<<<<<<<<<< @@ -1862,7 +1743,7 @@ static int __pyx_pw_4lxml_7builder_12ElementMaker_1__init__(PyObject *__pyx_v_se /* Python wrapper */ static PyObject *__pyx_pw_4lxml_7builder_12ElementMaker_8__init___1add_text(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_7builder_12ElementMaker_8__init___1add_text = {"add_text", (PyCFunction)__pyx_pw_4lxml_7builder_12ElementMaker_8__init___1add_text, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_7builder_12ElementMaker_8__init___1add_text = {"add_text", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_7builder_12ElementMaker_8__init___1add_text, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_7builder_12ElementMaker_8__init___1add_text(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_elem = 0; PyObject *__pyx_v_item = 0; @@ -1892,11 +1773,11 @@ static PyObject *__pyx_pw_4lxml_7builder_12ElementMaker_8__init___1add_text(PyOb case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("add_text", 1, 2, 2, 1); __PYX_ERR(0, 169, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_text", 1, 2, 2, 1); __PYX_ERR(0, 173, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_text") < 0)) __PYX_ERR(0, 169, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_text") < 0)) __PYX_ERR(0, 173, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -1909,7 +1790,7 @@ static PyObject *__pyx_pw_4lxml_7builder_12ElementMaker_8__init___1add_text(PyOb } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add_text", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 169, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_text", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 173, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.builder.ElementMaker.__init__.add_text", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -1924,7 +1805,6 @@ static PyObject *__pyx_pw_4lxml_7builder_12ElementMaker_8__init___1add_text(PyOb static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___add_text(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_elem, PyObject *__pyx_v_item) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -1937,16 +1817,14 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___add_text(CYTHO PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("add_text", 0); - __Pyx_TraceCall("add_text", __pyx_f[0], 169, 0, __PYX_ERR(0, 169, __pyx_L1_error)); - /* "lxml/builder.py":170 + /* "lxml/builder.py":174 * * def add_text(elem, item): * try: # <<<<<<<<<<<<<< * elem[-1].tail = (elem[-1].tail or "") + item * except IndexError: */ - __Pyx_TraceLine(170,0,__PYX_ERR(0, 170, __pyx_L3_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -1956,20 +1834,19 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___add_text(CYTHO __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "lxml/builder.py":171 + /* "lxml/builder.py":175 * def add_text(elem, item): * try: * elem[-1].tail = (elem[-1].tail or "") + item # <<<<<<<<<<<<<< * except IndexError: * elem.text = (elem.text or "") + item */ - __Pyx_TraceLine(171,0,__PYX_ERR(0, 171, __pyx_L3_error)) - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_elem, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 171, __pyx_L3_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_elem, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 175, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_tail); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 171, __pyx_L3_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_tail); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 175, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __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(0, 171, __pyx_L3_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 175, __pyx_L3_error) if (!__pyx_t_7) { __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { @@ -1981,16 +1858,16 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___add_text(CYTHO __Pyx_INCREF(__pyx_kp_s_); __pyx_t_4 = __pyx_kp_s_; __pyx_L9_bool_binop_done:; - __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_v_item); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 171, __pyx_L3_error) + __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_v_item); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 175, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_elem, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L3_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_elem, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 175, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_PyObject_SetAttrStr(__pyx_t_4, __pyx_n_s_tail, __pyx_t_6) < 0) __PYX_ERR(0, 171, __pyx_L3_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_t_4, __pyx_n_s_tail, __pyx_t_6) < 0) __PYX_ERR(0, 175, __pyx_L3_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/builder.py":170 + /* "lxml/builder.py":174 * * def add_text(elem, item): * try: # <<<<<<<<<<<<<< @@ -2007,33 +1884,31 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___add_text(CYTHO __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/builder.py":172 + /* "lxml/builder.py":176 * try: * elem[-1].tail = (elem[-1].tail or "") + item * except IndexError: # <<<<<<<<<<<<<< * elem.text = (elem.text or "") + item * */ - __Pyx_TraceLine(172,0,__PYX_ERR(0, 172, __pyx_L5_except_error)) __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError); if (__pyx_t_8) { __Pyx_AddTraceback("lxml.builder.ElementMaker.__init__.add_text", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 172, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 176, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); - /* "lxml/builder.py":173 + /* "lxml/builder.py":177 * elem[-1].tail = (elem[-1].tail or "") + item * except IndexError: * elem.text = (elem.text or "") + item # <<<<<<<<<<<<<< * * def add_cdata(elem, cdata): */ - __Pyx_TraceLine(173,0,__PYX_ERR(0, 173, __pyx_L5_except_error)) - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_elem, __pyx_n_s_text); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 173, __pyx_L5_except_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_elem, __pyx_n_s_text); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 177, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 173, __pyx_L5_except_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 177, __pyx_L5_except_error) if (!__pyx_t_7) { __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else { @@ -2045,20 +1920,20 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___add_text(CYTHO __Pyx_INCREF(__pyx_kp_s_); __pyx_t_9 = __pyx_kp_s_; __pyx_L13_bool_binop_done:; - __pyx_t_10 = PyNumber_Add(__pyx_t_9, __pyx_v_item); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 173, __pyx_L5_except_error) + __pyx_t_10 = PyNumber_Add(__pyx_t_9, __pyx_v_item); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 177, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_elem, __pyx_n_s_text, __pyx_t_10) < 0) __PYX_ERR(0, 173, __pyx_L5_except_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_elem, __pyx_n_s_text, __pyx_t_10) < 0) __PYX_ERR(0, 177, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "lxml/builder.py":170 + /* "lxml/builder.py":174 * * def add_text(elem, item): * try: # <<<<<<<<<<<<<< @@ -2078,7 +1953,7 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___add_text(CYTHO __pyx_L8_try_end:; } - /* "lxml/builder.py":169 + /* "lxml/builder.py":173 * typemap = {} * * def add_text(elem, item): # <<<<<<<<<<<<<< @@ -2099,12 +1974,11 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___add_text(CYTHO __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/builder.py":175 +/* "lxml/builder.py":179 * elem.text = (elem.text or "") + item * * def add_cdata(elem, cdata): # <<<<<<<<<<<<<< @@ -2114,7 +1988,7 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___add_text(CYTHO /* Python wrapper */ static PyObject *__pyx_pw_4lxml_7builder_12ElementMaker_8__init___3add_cdata(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_7builder_12ElementMaker_8__init___3add_cdata = {"add_cdata", (PyCFunction)__pyx_pw_4lxml_7builder_12ElementMaker_8__init___3add_cdata, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_7builder_12ElementMaker_8__init___3add_cdata = {"add_cdata", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_7builder_12ElementMaker_8__init___3add_cdata, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_7builder_12ElementMaker_8__init___3add_cdata(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_elem = 0; PyObject *__pyx_v_cdata = 0; @@ -2144,11 +2018,11 @@ static PyObject *__pyx_pw_4lxml_7builder_12ElementMaker_8__init___3add_cdata(PyO case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cdata)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("add_cdata", 1, 2, 2, 1); __PYX_ERR(0, 175, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_cdata", 1, 2, 2, 1); __PYX_ERR(0, 179, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_cdata") < 0)) __PYX_ERR(0, 175, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_cdata") < 0)) __PYX_ERR(0, 179, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -2161,7 +2035,7 @@ static PyObject *__pyx_pw_4lxml_7builder_12ElementMaker_8__init___3add_cdata(PyO } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add_cdata", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 175, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_cdata", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 179, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.builder.ElementMaker.__init__.add_cdata", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -2176,49 +2050,45 @@ static PyObject *__pyx_pw_4lxml_7builder_12ElementMaker_8__init___3add_cdata(PyO static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___2add_cdata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_elem, PyObject *__pyx_v_cdata) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("add_cdata", 0); - __Pyx_TraceCall("add_cdata", __pyx_f[0], 175, 0, __PYX_ERR(0, 175, __pyx_L1_error)); - /* "lxml/builder.py":176 + /* "lxml/builder.py":180 * * def add_cdata(elem, cdata): * if elem.text: # <<<<<<<<<<<<<< * raise ValueError("Can't add a CDATA section. Element already has some text: %r" % elem.text) * elem.text = cdata */ - __Pyx_TraceLine(176,0,__PYX_ERR(0, 176, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_elem, __pyx_n_s_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_elem, __pyx_n_s_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 176, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 180, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_2)) { - /* "lxml/builder.py":177 + /* "lxml/builder.py":181 * def add_cdata(elem, cdata): * if elem.text: * raise ValueError("Can't add a CDATA section. Element already has some text: %r" % elem.text) # <<<<<<<<<<<<<< * elem.text = cdata * */ - __Pyx_TraceLine(177,0,__PYX_ERR(0, 177, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_elem, __pyx_n_s_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_elem, __pyx_n_s_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Can_t_add_a_CDATA_section_Elemen, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Can_t_add_a_CDATA_section_Elemen, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 177, __pyx_L1_error) + __PYX_ERR(0, 181, __pyx_L1_error) - /* "lxml/builder.py":176 + /* "lxml/builder.py":180 * * def add_cdata(elem, cdata): * if elem.text: # <<<<<<<<<<<<<< @@ -2227,17 +2097,16 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___2add_cdata(CYT */ } - /* "lxml/builder.py":178 + /* "lxml/builder.py":182 * if elem.text: * raise ValueError("Can't add a CDATA section. Element already has some text: %r" % elem.text) * elem.text = cdata # <<<<<<<<<<<<<< * * if str not in typemap: */ - __Pyx_TraceLine(178,0,__PYX_ERR(0, 178, __pyx_L1_error)) - if (__Pyx_PyObject_SetAttrStr(__pyx_v_elem, __pyx_n_s_text, __pyx_v_cdata) < 0) __PYX_ERR(0, 178, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_elem, __pyx_n_s_text, __pyx_v_cdata) < 0) __PYX_ERR(0, 182, __pyx_L1_error) - /* "lxml/builder.py":175 + /* "lxml/builder.py":179 * elem.text = (elem.text or "") + item * * def add_cdata(elem, cdata): # <<<<<<<<<<<<<< @@ -2255,12 +2124,11 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___2add_cdata(CYT __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/builder.py":187 +/* "lxml/builder.py":191 * typemap[ET.CDATA] = add_cdata * * def add_dict(elem, item): # <<<<<<<<<<<<<< @@ -2270,7 +2138,7 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___2add_cdata(CYT /* Python wrapper */ static PyObject *__pyx_pw_4lxml_7builder_12ElementMaker_8__init___5add_dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_7builder_12ElementMaker_8__init___5add_dict = {"add_dict", (PyCFunction)__pyx_pw_4lxml_7builder_12ElementMaker_8__init___5add_dict, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_7builder_12ElementMaker_8__init___5add_dict = {"add_dict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_7builder_12ElementMaker_8__init___5add_dict, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_7builder_12ElementMaker_8__init___5add_dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_elem = 0; PyObject *__pyx_v_item = 0; @@ -2300,11 +2168,11 @@ static PyObject *__pyx_pw_4lxml_7builder_12ElementMaker_8__init___5add_dict(PyOb case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("add_dict", 1, 2, 2, 1); __PYX_ERR(0, 187, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_dict", 1, 2, 2, 1); __PYX_ERR(0, 191, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_dict") < 0)) __PYX_ERR(0, 187, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_dict") < 0)) __PYX_ERR(0, 191, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -2317,7 +2185,7 @@ static PyObject *__pyx_pw_4lxml_7builder_12ElementMaker_8__init___5add_dict(PyOb } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add_dict", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 187, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_dict", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 191, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.builder.ElementMaker.__init__.add_dict", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -2337,7 +2205,6 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___4add_dict(PyOb PyObject *__pyx_v_k = NULL; PyObject *__pyx_v_v = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -2353,30 +2220,27 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___4add_dict(PyOb __Pyx_RefNannySetupContext("add_dict", 0); __pyx_outer_scope = (struct __pyx_obj_4lxml_7builder___pyx_scope_struct____init__ *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; - __Pyx_TraceCall("add_dict", __pyx_f[0], 187, 0, __PYX_ERR(0, 187, __pyx_L1_error)); - /* "lxml/builder.py":188 + /* "lxml/builder.py":192 * * def add_dict(elem, item): * attrib = elem.attrib # <<<<<<<<<<<<<< * for k, v in item.items(): * if isinstance(v, basestring): */ - __Pyx_TraceLine(188,0,__PYX_ERR(0, 188, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_elem, __pyx_n_s_attrib); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_elem, __pyx_n_s_attrib); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_attrib = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/builder.py":189 + /* "lxml/builder.py":193 * def add_dict(elem, item): * attrib = elem.attrib * for k, v in item.items(): # <<<<<<<<<<<<<< * if isinstance(v, basestring): * attrib[k] = v */ - __Pyx_TraceLine(189,0,__PYX_ERR(0, 189, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -2388,21 +2252,18 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___4add_dict(PyOb __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error) - } + __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, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; 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_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 193, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -2410,17 +2271,17 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___4add_dict(PyOb if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= 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_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 193, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= 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_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 193, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -2430,7 +2291,7 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___4add_dict(PyOb PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 189, __pyx_L1_error) + else __PYX_ERR(0, 193, __pyx_L1_error) } break; } @@ -2442,7 +2303,7 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___4add_dict(PyOb if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 189, __pyx_L1_error) + __PYX_ERR(0, 193, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -2455,15 +2316,15 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___4add_dict(PyOb __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 193, __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, 189, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 193, __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; @@ -2471,7 +2332,7 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___4add_dict(PyOb __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 189, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 193, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -2479,7 +2340,7 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___4add_dict(PyOb __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 189, __pyx_L1_error) + __PYX_ERR(0, 193, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_3); @@ -2487,32 +2348,30 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___4add_dict(PyOb __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_6); __pyx_t_6 = 0; - /* "lxml/builder.py":190 + /* "lxml/builder.py":194 * attrib = elem.attrib * for k, v in item.items(): * if isinstance(v, basestring): # <<<<<<<<<<<<<< * attrib[k] = v * else: */ - __Pyx_TraceLine(190,0,__PYX_ERR(0, 190, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_basestring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = PyObject_IsInstance(__pyx_v_v, __pyx_t_1); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 190, __pyx_L1_error) + __pyx_t_9 = PyObject_IsInstance(__pyx_v_v, __pyx_t_1); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { - /* "lxml/builder.py":191 + /* "lxml/builder.py":195 * for k, v in item.items(): * if isinstance(v, basestring): * attrib[k] = v # <<<<<<<<<<<<<< * else: * attrib[k] = typemap[type(v)](None, v) */ - __Pyx_TraceLine(191,0,__PYX_ERR(0, 191, __pyx_L1_error)) - if (unlikely(PyObject_SetItem(__pyx_v_attrib, __pyx_v_k, __pyx_v_v) < 0)) __PYX_ERR(0, 191, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_attrib, __pyx_v_k, __pyx_v_v) < 0)) __PYX_ERR(0, 195, __pyx_L1_error) - /* "lxml/builder.py":190 + /* "lxml/builder.py":194 * attrib = elem.attrib * for k, v in item.items(): * if isinstance(v, basestring): # <<<<<<<<<<<<<< @@ -2522,17 +2381,16 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___4add_dict(PyOb goto __pyx_L7; } - /* "lxml/builder.py":193 + /* "lxml/builder.py":197 * attrib[k] = v * else: * attrib[k] = typemap[type(v)](None, v) # <<<<<<<<<<<<<< * if dict not in typemap: * typemap[dict] = add_dict */ - __Pyx_TraceLine(193,0,__PYX_ERR(0, 193, __pyx_L1_error)) /*else*/ { - if (unlikely(!__pyx_cur_scope->__pyx_v_typemap)) { __Pyx_RaiseClosureNameError("typemap"); __PYX_ERR(0, 193, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_cur_scope->__pyx_v_typemap, ((PyObject *)Py_TYPE(__pyx_v_v))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 193, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_v_typemap)) { __Pyx_RaiseClosureNameError("typemap"); __PYX_ERR(0, 197, __pyx_L1_error) } + __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_cur_scope->__pyx_v_typemap, ((PyObject *)Py_TYPE(__pyx_v_v))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = NULL; __pyx_t_11 = 0; @@ -2549,7 +2407,7 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___4add_dict(PyOb #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_3, Py_None, __pyx_v_v}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -2557,13 +2415,13 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___4add_dict(PyOb #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_3, Py_None, __pyx_v_v}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 193, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 197, __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; @@ -2574,28 +2432,27 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___4add_dict(PyOb __Pyx_INCREF(__pyx_v_v); __Pyx_GIVEREF(__pyx_v_v); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_11, __pyx_v_v); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(PyObject_SetItem(__pyx_v_attrib, __pyx_v_k, __pyx_t_1) < 0)) __PYX_ERR(0, 193, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_attrib, __pyx_v_k, __pyx_t_1) < 0)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L7:; - /* "lxml/builder.py":189 + /* "lxml/builder.py":193 * def add_dict(elem, item): * attrib = elem.attrib * for k, v in item.items(): # <<<<<<<<<<<<<< * if isinstance(v, basestring): * attrib[k] = v */ - __Pyx_TraceLine(189,0,__PYX_ERR(0, 189, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/builder.py":187 + /* "lxml/builder.py":191 * typemap[ET.CDATA] = add_cdata * * def add_dict(elem, item): # <<<<<<<<<<<<<< @@ -2619,12 +2476,11 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__init___4add_dict(PyOb __Pyx_XDECREF(__pyx_v_k); __Pyx_XDECREF(__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/builder.py":144 +/* "lxml/builder.py":148 * """ * * def __init__(self, typemap=None, # <<<<<<<<<<<<<< @@ -2638,7 +2494,6 @@ static int __pyx_pf_4lxml_7builder_12ElementMaker___init__(struct __pyx_obj_4lxm PyObject *__pyx_v_add_cdata = 0; PyObject *__pyx_v_add_dict = 0; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -2649,38 +2504,35 @@ static int __pyx_pf_4lxml_7builder_12ElementMaker___init__(struct __pyx_obj_4lxm if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_4lxml_7builder___pyx_scope_struct____init__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 144, __pyx_L1_error) + __PYX_ERR(0, 148, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } - __Pyx_TraceCall("__init__", __pyx_f[0], 144, 0, __PYX_ERR(0, 144, __pyx_L1_error)); __pyx_cur_scope->__pyx_v_typemap = __pyx_v_typemap; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_typemap); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_typemap); - /* "lxml/builder.py":146 + /* "lxml/builder.py":150 * def __init__(self, typemap=None, * namespace=None, nsmap=None, makeelement=None): * if namespace is not None: # <<<<<<<<<<<<<< * self._namespace = '{' + namespace + '}' * else: */ - __Pyx_TraceLine(146,0,__PYX_ERR(0, 146, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_namespace != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/builder.py":147 + /* "lxml/builder.py":151 * namespace=None, nsmap=None, makeelement=None): * if namespace is not None: * self._namespace = '{' + namespace + '}' # <<<<<<<<<<<<<< * else: * self._namespace = None */ - __Pyx_TraceLine(147,0,__PYX_ERR(0, 147, __pyx_L1_error)) - __pyx_t_3 = PyNumber_Add(__pyx_kp_s__2, __pyx_v_namespace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_kp_s__2, __pyx_v_namespace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_kp_s__3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 147, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_kp_s__3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_4); @@ -2689,7 +2541,7 @@ static int __pyx_pf_4lxml_7builder_12ElementMaker___init__(struct __pyx_obj_4lxm __pyx_v_self->_namespace = __pyx_t_4; __pyx_t_4 = 0; - /* "lxml/builder.py":146 + /* "lxml/builder.py":150 * def __init__(self, typemap=None, * namespace=None, nsmap=None, makeelement=None): * if namespace is not None: # <<<<<<<<<<<<<< @@ -2699,14 +2551,13 @@ static int __pyx_pf_4lxml_7builder_12ElementMaker___init__(struct __pyx_obj_4lxm goto __pyx_L3; } - /* "lxml/builder.py":149 + /* "lxml/builder.py":153 * self._namespace = '{' + namespace + '}' * else: * self._namespace = None # <<<<<<<<<<<<<< * * if nsmap: */ - __Pyx_TraceLine(149,0,__PYX_ERR(0, 149, __pyx_L1_error)) /*else*/ { __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); @@ -2716,26 +2567,24 @@ static int __pyx_pf_4lxml_7builder_12ElementMaker___init__(struct __pyx_obj_4lxm } __pyx_L3:; - /* "lxml/builder.py":151 + /* "lxml/builder.py":155 * self._namespace = None * * if nsmap: # <<<<<<<<<<<<<< * self._nsmap = dict(nsmap) * else: */ - __Pyx_TraceLine(151,0,__PYX_ERR(0, 151, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_nsmap); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 151, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_nsmap); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 155, __pyx_L1_error) if (__pyx_t_2) { - /* "lxml/builder.py":152 + /* "lxml/builder.py":156 * * if nsmap: * self._nsmap = dict(nsmap) # <<<<<<<<<<<<<< * else: * self._nsmap = None */ - __Pyx_TraceLine(152,0,__PYX_ERR(0, 152, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_nsmap); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_nsmap); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->_nsmap); @@ -2743,7 +2592,7 @@ static int __pyx_pf_4lxml_7builder_12ElementMaker___init__(struct __pyx_obj_4lxm __pyx_v_self->_nsmap = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/builder.py":151 + /* "lxml/builder.py":155 * self._namespace = None * * if nsmap: # <<<<<<<<<<<<<< @@ -2753,14 +2602,13 @@ static int __pyx_pf_4lxml_7builder_12ElementMaker___init__(struct __pyx_obj_4lxm goto __pyx_L4; } - /* "lxml/builder.py":154 + /* "lxml/builder.py":158 * self._nsmap = dict(nsmap) * else: * self._nsmap = None # <<<<<<<<<<<<<< * * if makeelement is not None: */ - __Pyx_TraceLine(154,0,__PYX_ERR(0, 154, __pyx_L1_error)) /*else*/ { __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); @@ -2770,51 +2618,48 @@ static int __pyx_pf_4lxml_7builder_12ElementMaker___init__(struct __pyx_obj_4lxm } __pyx_L4:; - /* "lxml/builder.py":156 + /* "lxml/builder.py":160 * self._nsmap = None * * if makeelement is not None: # <<<<<<<<<<<<<< * assert callable(makeelement) * self._makeelement = makeelement */ - __Pyx_TraceLine(156,0,__PYX_ERR(0, 156, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_makeelement != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/builder.py":157 + /* "lxml/builder.py":161 * * if makeelement is not None: * assert callable(makeelement) # <<<<<<<<<<<<<< * self._makeelement = makeelement * else: */ - __Pyx_TraceLine(157,0,__PYX_ERR(0, 157, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { - __pyx_t_1 = __Pyx_PyCallable_Check(__pyx_v_makeelement); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 157, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCallable_Check(__pyx_v_makeelement); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 161, __pyx_L1_error) if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetNone(PyExc_AssertionError); - __PYX_ERR(0, 157, __pyx_L1_error) + __PYX_ERR(0, 161, __pyx_L1_error) } } #endif - /* "lxml/builder.py":158 + /* "lxml/builder.py":162 * if makeelement is not None: * assert callable(makeelement) * self._makeelement = makeelement # <<<<<<<<<<<<<< * else: * self._makeelement = ET.Element */ - __Pyx_TraceLine(158,0,__PYX_ERR(0, 158, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_makeelement); __Pyx_GIVEREF(__pyx_v_makeelement); __Pyx_GOTREF(__pyx_v_self->_makeelement); __Pyx_DECREF(__pyx_v_self->_makeelement); __pyx_v_self->_makeelement = __pyx_v_makeelement; - /* "lxml/builder.py":156 + /* "lxml/builder.py":160 * self._nsmap = None * * if makeelement is not None: # <<<<<<<<<<<<<< @@ -2824,16 +2669,15 @@ static int __pyx_pf_4lxml_7builder_12ElementMaker___init__(struct __pyx_obj_4lxm goto __pyx_L5; } - /* "lxml/builder.py":160 + /* "lxml/builder.py":164 * self._makeelement = makeelement * else: * self._makeelement = ET.Element # <<<<<<<<<<<<<< * * # initialize type map for this element factory */ - __Pyx_TraceLine(160,0,__PYX_ERR(0, 160, __pyx_L1_error)) /*else*/ { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_7builder_ET, __pyx_n_s_Element); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 160, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_7builder_ET, __pyx_n_s_Element); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->_makeelement); @@ -2843,33 +2687,31 @@ static int __pyx_pf_4lxml_7builder_12ElementMaker___init__(struct __pyx_obj_4lxm } __pyx_L5:; - /* "lxml/builder.py":164 + /* "lxml/builder.py":168 * # initialize type map for this element factory * * if typemap: # <<<<<<<<<<<<<< * typemap = dict(typemap) * else: */ - __Pyx_TraceLine(164,0,__PYX_ERR(0, 164, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_typemap); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 164, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_typemap); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 168, __pyx_L1_error) if (__pyx_t_1) { - /* "lxml/builder.py":165 + /* "lxml/builder.py":169 * * if typemap: * typemap = dict(typemap) # <<<<<<<<<<<<<< * else: * typemap = {} */ - __Pyx_TraceLine(165,0,__PYX_ERR(0, 165, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_cur_scope->__pyx_v_typemap); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_cur_scope->__pyx_v_typemap); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_typemap); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_typemap, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/builder.py":164 + /* "lxml/builder.py":168 * # initialize type map for this element factory * * if typemap: # <<<<<<<<<<<<<< @@ -2879,16 +2721,15 @@ static int __pyx_pf_4lxml_7builder_12ElementMaker___init__(struct __pyx_obj_4lxm goto __pyx_L6; } - /* "lxml/builder.py":167 + /* "lxml/builder.py":171 * typemap = dict(typemap) * else: * typemap = {} # <<<<<<<<<<<<<< * * def add_text(elem, item): */ - __Pyx_TraceLine(167,0,__PYX_ERR(0, 167, __pyx_L1_error)) /*else*/ { - __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_typemap); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_typemap, __pyx_t_4); @@ -2897,55 +2738,51 @@ static int __pyx_pf_4lxml_7builder_12ElementMaker___init__(struct __pyx_obj_4lxm } __pyx_L6:; - /* "lxml/builder.py":169 + /* "lxml/builder.py":173 * typemap = {} * * def add_text(elem, item): # <<<<<<<<<<<<<< * try: * elem[-1].tail = (elem[-1].tail or "") + item */ - __Pyx_TraceLine(169,0,__PYX_ERR(0, 169, __pyx_L1_error)) - __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_7builder_12ElementMaker_8__init___1add_text, 0, __pyx_n_s_init___locals_add_text, NULL, __pyx_n_s_lxml_builder, __pyx_d, ((PyObject *)__pyx_codeobj__5)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 169, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_7builder_12ElementMaker_8__init___1add_text, 0, __pyx_n_s_init___locals_add_text, NULL, __pyx_n_s_lxml_builder, __pyx_d, ((PyObject *)__pyx_codeobj__5)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_add_text = __pyx_t_4; __pyx_t_4 = 0; - /* "lxml/builder.py":175 + /* "lxml/builder.py":179 * elem.text = (elem.text or "") + item * * def add_cdata(elem, cdata): # <<<<<<<<<<<<<< * if elem.text: * raise ValueError("Can't add a CDATA section. Element already has some text: %r" % elem.text) */ - __Pyx_TraceLine(175,0,__PYX_ERR(0, 175, __pyx_L1_error)) - __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_7builder_12ElementMaker_8__init___3add_cdata, 0, __pyx_n_s_init___locals_add_cdata, NULL, __pyx_n_s_lxml_builder, __pyx_d, ((PyObject *)__pyx_codeobj__7)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 175, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_7builder_12ElementMaker_8__init___3add_cdata, 0, __pyx_n_s_init___locals_add_cdata, NULL, __pyx_n_s_lxml_builder, __pyx_d, ((PyObject *)__pyx_codeobj__7)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_add_cdata = __pyx_t_4; __pyx_t_4 = 0; - /* "lxml/builder.py":180 + /* "lxml/builder.py":184 * elem.text = cdata * * if str not in typemap: # <<<<<<<<<<<<<< * typemap[str] = add_text * if unicode not in typemap: */ - __Pyx_TraceLine(180,0,__PYX_ERR(0, 180, __pyx_L1_error)) - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(((PyObject *)(&PyString_Type)), __pyx_cur_scope->__pyx_v_typemap, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(((PyObject *)(&PyString_Type)), __pyx_cur_scope->__pyx_v_typemap, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 184, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/builder.py":181 + /* "lxml/builder.py":185 * * if str not in typemap: * typemap[str] = add_text # <<<<<<<<<<<<<< * if unicode not in typemap: * typemap[unicode] = add_text */ - __Pyx_TraceLine(181,0,__PYX_ERR(0, 181, __pyx_L1_error)) - if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_typemap, ((PyObject *)(&PyString_Type)), __pyx_v_add_text) < 0)) __PYX_ERR(0, 181, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_typemap, ((PyObject *)(&PyString_Type)), __pyx_v_add_text) < 0)) __PYX_ERR(0, 185, __pyx_L1_error) - /* "lxml/builder.py":180 + /* "lxml/builder.py":184 * elem.text = cdata * * if str not in typemap: # <<<<<<<<<<<<<< @@ -2954,35 +2791,33 @@ static int __pyx_pf_4lxml_7builder_12ElementMaker___init__(struct __pyx_obj_4lxm */ } - /* "lxml/builder.py":182 + /* "lxml/builder.py":186 * if str not in typemap: * typemap[str] = add_text * if unicode not in typemap: # <<<<<<<<<<<<<< * typemap[unicode] = add_text * if ET.CDATA not in typemap: */ - __Pyx_TraceLine(182,0,__PYX_ERR(0, 182, __pyx_L1_error)) - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_cur_scope->__pyx_v_typemap, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 182, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_cur_scope->__pyx_v_typemap, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/builder.py":183 + /* "lxml/builder.py":187 * typemap[str] = add_text * if unicode not in typemap: * typemap[unicode] = add_text # <<<<<<<<<<<<<< * if ET.CDATA not in typemap: * typemap[ET.CDATA] = add_cdata */ - __Pyx_TraceLine(183,0,__PYX_ERR(0, 183, __pyx_L1_error)) - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 183, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_typemap, __pyx_t_4, __pyx_v_add_text) < 0)) __PYX_ERR(0, 183, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_typemap, __pyx_t_4, __pyx_v_add_text) < 0)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/builder.py":182 + /* "lxml/builder.py":186 * if str not in typemap: * typemap[str] = add_text * if unicode not in typemap: # <<<<<<<<<<<<<< @@ -2991,35 +2826,33 @@ static int __pyx_pf_4lxml_7builder_12ElementMaker___init__(struct __pyx_obj_4lxm */ } - /* "lxml/builder.py":184 + /* "lxml/builder.py":188 * if unicode not in typemap: * typemap[unicode] = add_text * if ET.CDATA not in typemap: # <<<<<<<<<<<<<< * typemap[ET.CDATA] = add_cdata * */ - __Pyx_TraceLine(184,0,__PYX_ERR(0, 184, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_7builder_ET, __pyx_n_s_CDATA); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_7builder_ET, __pyx_n_s_CDATA); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_cur_scope->__pyx_v_typemap, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_cur_scope->__pyx_v_typemap, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/builder.py":185 + /* "lxml/builder.py":189 * typemap[unicode] = add_text * if ET.CDATA not in typemap: * typemap[ET.CDATA] = add_cdata # <<<<<<<<<<<<<< * * def add_dict(elem, item): */ - __Pyx_TraceLine(185,0,__PYX_ERR(0, 185, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_7builder_ET, __pyx_n_s_CDATA); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 185, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_7builder_ET, __pyx_n_s_CDATA); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_typemap, __pyx_t_4, __pyx_v_add_cdata) < 0)) __PYX_ERR(0, 185, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_typemap, __pyx_t_4, __pyx_v_add_cdata) < 0)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/builder.py":184 + /* "lxml/builder.py":188 * if unicode not in typemap: * typemap[unicode] = add_text * if ET.CDATA not in typemap: # <<<<<<<<<<<<<< @@ -3028,42 +2861,39 @@ static int __pyx_pf_4lxml_7builder_12ElementMaker___init__(struct __pyx_obj_4lxm */ } - /* "lxml/builder.py":187 + /* "lxml/builder.py":191 * typemap[ET.CDATA] = add_cdata * * def add_dict(elem, item): # <<<<<<<<<<<<<< * attrib = elem.attrib * for k, v in item.items(): */ - __Pyx_TraceLine(187,0,__PYX_ERR(0, 187, __pyx_L1_error)) - __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_7builder_12ElementMaker_8__init___5add_dict, 0, __pyx_n_s_init___locals_add_dict, ((PyObject*)__pyx_cur_scope), __pyx_n_s_lxml_builder, __pyx_d, ((PyObject *)__pyx_codeobj__9)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 187, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_7builder_12ElementMaker_8__init___5add_dict, 0, __pyx_n_s_init___locals_add_dict, ((PyObject*)__pyx_cur_scope), __pyx_n_s_lxml_builder, __pyx_d, ((PyObject *)__pyx_codeobj__9)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_add_dict = __pyx_t_4; __pyx_t_4 = 0; - /* "lxml/builder.py":194 + /* "lxml/builder.py":198 * else: * attrib[k] = typemap[type(v)](None, v) * if dict not in typemap: # <<<<<<<<<<<<<< * typemap[dict] = add_dict * */ - __Pyx_TraceLine(194,0,__PYX_ERR(0, 194, __pyx_L1_error)) - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(((PyObject *)(&PyDict_Type)), __pyx_cur_scope->__pyx_v_typemap, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(((PyObject *)(&PyDict_Type)), __pyx_cur_scope->__pyx_v_typemap, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 198, __pyx_L1_error) __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/builder.py":195 + /* "lxml/builder.py":199 * attrib[k] = typemap[type(v)](None, v) * if dict not in typemap: * typemap[dict] = add_dict # <<<<<<<<<<<<<< * * self._typemap = typemap */ - __Pyx_TraceLine(195,0,__PYX_ERR(0, 195, __pyx_L1_error)) - if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_typemap, ((PyObject *)(&PyDict_Type)), __pyx_v_add_dict) < 0)) __PYX_ERR(0, 195, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_typemap, ((PyObject *)(&PyDict_Type)), __pyx_v_add_dict) < 0)) __PYX_ERR(0, 199, __pyx_L1_error) - /* "lxml/builder.py":194 + /* "lxml/builder.py":198 * else: * attrib[k] = typemap[type(v)](None, v) * if dict not in typemap: # <<<<<<<<<<<<<< @@ -3072,15 +2902,14 @@ static int __pyx_pf_4lxml_7builder_12ElementMaker___init__(struct __pyx_obj_4lxm */ } - /* "lxml/builder.py":197 + /* "lxml/builder.py":201 * typemap[dict] = add_dict * * self._typemap = typemap # <<<<<<<<<<<<<< * * def __call__(self, tag, *children, **attrib): */ - __Pyx_TraceLine(197,0,__PYX_ERR(0, 197, __pyx_L1_error)) - if (!(likely(PyDict_CheckExact(__pyx_cur_scope->__pyx_v_typemap))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_cur_scope->__pyx_v_typemap)->tp_name), 0))) __PYX_ERR(0, 197, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_cur_scope->__pyx_v_typemap))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_cur_scope->__pyx_v_typemap)->tp_name), 0))) __PYX_ERR(0, 201, __pyx_L1_error) __pyx_t_4 = __pyx_cur_scope->__pyx_v_typemap; __Pyx_INCREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); @@ -3089,7 +2918,7 @@ static int __pyx_pf_4lxml_7builder_12ElementMaker___init__(struct __pyx_obj_4lxm __pyx_v_self->_typemap = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/builder.py":144 + /* "lxml/builder.py":148 * """ * * def __init__(self, typemap=None, # <<<<<<<<<<<<<< @@ -3110,12 +2939,11 @@ static int __pyx_pf_4lxml_7builder_12ElementMaker___init__(struct __pyx_obj_4lxm __Pyx_XDECREF(__pyx_v_add_cdata); __Pyx_XDECREF(__pyx_v_add_dict); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/builder.py":199 +/* "lxml/builder.py":203 * self._typemap = typemap * * def __call__(self, tag, *children, **attrib): # <<<<<<<<<<<<<< @@ -3165,7 +2993,7 @@ static PyObject *__pyx_pw_4lxml_7builder_12ElementMaker_3__call__(PyObject *__py } 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_attrib, values, used_pos_args, "__call__") < 0)) __PYX_ERR(0, 199, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_attrib, values, used_pos_args, "__call__") < 0)) __PYX_ERR(0, 203, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; @@ -3176,7 +3004,7 @@ static PyObject *__pyx_pw_4lxml_7builder_12ElementMaker_3__call__(PyObject *__py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 199, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 203, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_children); __pyx_v_children = 0; __Pyx_DECREF(__pyx_v_attrib); __pyx_v_attrib = 0; @@ -3201,7 +3029,6 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_2__call__(struct __pyx_o PyObject *__pyx_v_basetype = NULL; PyObject *__pyx_v_v = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -3212,35 +3039,32 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_2__call__(struct __pyx_o int __pyx_t_7; PyObject *__pyx_t_8 = NULL; Py_ssize_t __pyx_t_9; - PyObject *__pyx_t_10 = NULL; - int __pyx_t_11; - Py_ssize_t __pyx_t_12; - PyObject *(*__pyx_t_13)(PyObject *); + int __pyx_t_10; + Py_ssize_t __pyx_t_11; + PyObject *(*__pyx_t_12)(PyObject *); + PyObject *__pyx_t_13 = NULL; __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[0], 199, 0, __PYX_ERR(0, 199, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_tag); - /* "lxml/builder.py":200 + /* "lxml/builder.py":204 * * def __call__(self, tag, *children, **attrib): * typemap = self._typemap # <<<<<<<<<<<<<< * * if self._namespace is not None and tag[0] != '{': */ - __Pyx_TraceLine(200,0,__PYX_ERR(0, 200, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_typemap; __Pyx_INCREF(__pyx_t_1); __pyx_v_typemap = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/builder.py":202 + /* "lxml/builder.py":206 * typemap = self._typemap * * if self._namespace is not None and tag[0] != '{': # <<<<<<<<<<<<<< * tag = self._namespace + tag * elem = self._makeelement(tag, nsmap=self._nsmap) */ - __Pyx_TraceLine(202,0,__PYX_ERR(0, 202, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_self->_namespace != Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { @@ -3248,28 +3072,27 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_2__call__(struct __pyx_o __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, 202, __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, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__2, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 202, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__2, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 206, __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/builder.py":203 + /* "lxml/builder.py":207 * * if self._namespace is not None and tag[0] != '{': * tag = self._namespace + tag # <<<<<<<<<<<<<< * elem = self._makeelement(tag, nsmap=self._nsmap) * if attrib: */ - __Pyx_TraceLine(203,0,__PYX_ERR(0, 203, __pyx_L1_error)) - __pyx_t_1 = PyNumber_Add(__pyx_v_self->_namespace, __pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_self->_namespace, __pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_tag, __pyx_t_1); __pyx_t_1 = 0; - /* "lxml/builder.py":202 + /* "lxml/builder.py":206 * typemap = self._typemap * * if self._namespace is not None and tag[0] != '{': # <<<<<<<<<<<<<< @@ -3278,53 +3101,50 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_2__call__(struct __pyx_o */ } - /* "lxml/builder.py":204 + /* "lxml/builder.py":208 * if self._namespace is not None and tag[0] != '{': * tag = self._namespace + tag * elem = self._makeelement(tag, nsmap=self._nsmap) # <<<<<<<<<<<<<< * if attrib: * typemap[dict](elem, attrib) */ - __Pyx_TraceLine(204,0,__PYX_ERR(0, 204, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __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_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 204, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_nsmap, __pyx_v_self->_nsmap) < 0) __PYX_ERR(0, 204, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_v_self->_makeelement, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 204, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_nsmap, __pyx_v_self->_nsmap) < 0) __PYX_ERR(0, 208, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_v_self->_makeelement, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_elem = __pyx_t_6; __pyx_t_6 = 0; - /* "lxml/builder.py":205 + /* "lxml/builder.py":209 * tag = self._namespace + tag * elem = self._makeelement(tag, nsmap=self._nsmap) * if attrib: # <<<<<<<<<<<<<< * typemap[dict](elem, attrib) * */ - __Pyx_TraceLine(205,0,__PYX_ERR(0, 205, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_attrib); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 205, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_attrib); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 209, __pyx_L1_error) if (__pyx_t_2) { - /* "lxml/builder.py":206 + /* "lxml/builder.py":210 * elem = self._makeelement(tag, nsmap=self._nsmap) * if attrib: * typemap[dict](elem, attrib) # <<<<<<<<<<<<<< * * for item in children: */ - __Pyx_TraceLine(206,0,__PYX_ERR(0, 206, __pyx_L1_error)) if (unlikely(__pyx_v_typemap == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 206, __pyx_L1_error) + __PYX_ERR(0, 210, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_typemap, ((PyObject *)(&PyDict_Type))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 206, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_typemap, ((PyObject *)(&PyDict_Type))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = NULL; __pyx_t_7 = 0; @@ -3341,7 +3161,7 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_2__call__(struct __pyx_o #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_elem, __pyx_v_attrib}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 206, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_6); } else @@ -3349,13 +3169,13 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_2__call__(struct __pyx_o #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_elem, __pyx_v_attrib}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 206, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 206, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL; @@ -3366,14 +3186,14 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_2__call__(struct __pyx_o __Pyx_INCREF(__pyx_v_attrib); __Pyx_GIVEREF(__pyx_v_attrib); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_attrib); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 206, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "lxml/builder.py":205 + /* "lxml/builder.py":209 * tag = self._namespace + tag * elem = self._makeelement(tag, nsmap=self._nsmap) * if attrib: # <<<<<<<<<<<<<< @@ -3382,46 +3202,43 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_2__call__(struct __pyx_o */ } - /* "lxml/builder.py":208 + /* "lxml/builder.py":212 * typemap[dict](elem, attrib) * * for item in children: # <<<<<<<<<<<<<< * if callable(item): * item = item() */ - __Pyx_TraceLine(208,0,__PYX_ERR(0, 208, __pyx_L1_error)) __pyx_t_6 = __pyx_v_children; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0; for (;;) { 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, 208, __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, 212, __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, 208, __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, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_5); __pyx_t_5 = 0; - /* "lxml/builder.py":209 + /* "lxml/builder.py":213 * * for item in children: * if callable(item): # <<<<<<<<<<<<<< * item = item() * t = typemap.get(type(item)) */ - __Pyx_TraceLine(209,0,__PYX_ERR(0, 209, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyCallable_Check(__pyx_v_item); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 209, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCallable_Check(__pyx_v_item); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 213, __pyx_L1_error) __pyx_t_4 = (__pyx_t_2 != 0); if (__pyx_t_4) { - /* "lxml/builder.py":210 + /* "lxml/builder.py":214 * for item in children: * if callable(item): * item = item() # <<<<<<<<<<<<<< * t = typemap.get(type(item)) * if t is None: */ - __Pyx_TraceLine(210,0,__PYX_ERR(0, 210, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_item); __pyx_t_8 = __pyx_v_item; __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { @@ -3433,18 +3250,15 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_2__call__(struct __pyx_o __Pyx_DECREF_SET(__pyx_t_8, function); } } - if (__pyx_t_1) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 210, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else { - __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 210, __pyx_L1_error) - } + __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_item, __pyx_t_5); __pyx_t_5 = 0; - /* "lxml/builder.py":209 + /* "lxml/builder.py":213 * * for item in children: * if callable(item): # <<<<<<<<<<<<<< @@ -3453,44 +3267,41 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_2__call__(struct __pyx_o */ } - /* "lxml/builder.py":211 + /* "lxml/builder.py":215 * if callable(item): * item = item() * t = typemap.get(type(item)) # <<<<<<<<<<<<<< * if t is None: * if ET.iselement(item): */ - __Pyx_TraceLine(211,0,__PYX_ERR(0, 211, __pyx_L1_error)) if (unlikely(__pyx_v_typemap == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 211, __pyx_L1_error) + __PYX_ERR(0, 215, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyDict_GetItemDefault(__pyx_v_typemap, ((PyObject *)Py_TYPE(__pyx_v_item)), Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 211, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_GetItemDefault(__pyx_v_typemap, ((PyObject *)Py_TYPE(__pyx_v_item)), Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_5); __pyx_t_5 = 0; - /* "lxml/builder.py":212 + /* "lxml/builder.py":216 * item = item() * t = typemap.get(type(item)) * if t is None: # <<<<<<<<<<<<<< * if ET.iselement(item): * elem.append(item) */ - __Pyx_TraceLine(212,0,__PYX_ERR(0, 212, __pyx_L1_error)) __pyx_t_4 = (__pyx_v_t == Py_None); __pyx_t_2 = (__pyx_t_4 != 0); if (__pyx_t_2) { - /* "lxml/builder.py":213 + /* "lxml/builder.py":217 * t = typemap.get(type(item)) * if t is None: * if ET.iselement(item): # <<<<<<<<<<<<<< * elem.append(item) * continue */ - __Pyx_TraceLine(213,0,__PYX_ERR(0, 213, __pyx_L1_error)) - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_7builder_ET, __pyx_n_s_iselement); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_7builder_ET, __pyx_n_s_iselement); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { @@ -3502,64 +3313,34 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_2__call__(struct __pyx_o __Pyx_DECREF_SET(__pyx_t_8, function); } } - if (!__pyx_t_1) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_item); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 213, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_8)) { - PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_item}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 213, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_5); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { - PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_item}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 213, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_5); - } else - #endif - { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 213, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __pyx_t_1 = NULL; - __Pyx_INCREF(__pyx_v_item); - __Pyx_GIVEREF(__pyx_v_item); - PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_item); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 213, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } - } + __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_1, __pyx_v_item) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_item); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { - /* "lxml/builder.py":214 + /* "lxml/builder.py":218 * if t is None: * if ET.iselement(item): * elem.append(item) # <<<<<<<<<<<<<< * continue * for basetype in type(item).__mro__: */ - __Pyx_TraceLine(214,0,__PYX_ERR(0, 214, __pyx_L1_error)) - __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_elem, __pyx_v_item); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 214, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Append(__pyx_v_elem, __pyx_v_item); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 218, __pyx_L1_error) - /* "lxml/builder.py":215 + /* "lxml/builder.py":219 * if ET.iselement(item): * elem.append(item) * continue # <<<<<<<<<<<<<< * for basetype in type(item).__mro__: * # See if the typemap knows of any of this type's bases. */ - __Pyx_TraceLine(215,0,__PYX_ERR(0, 215, __pyx_L1_error)) goto __pyx_L7_continue; - /* "lxml/builder.py":213 + /* "lxml/builder.py":217 * t = typemap.get(type(item)) * if t is None: * if ET.iselement(item): # <<<<<<<<<<<<<< @@ -3568,51 +3349,50 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_2__call__(struct __pyx_o */ } - /* "lxml/builder.py":216 + /* "lxml/builder.py":220 * elem.append(item) * continue * for basetype in type(item).__mro__: # <<<<<<<<<<<<<< * # See if the typemap knows of any of this type's bases. * t = typemap.get(basetype) */ - __Pyx_TraceLine(216,0,__PYX_ERR(0, 216, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_item)), __pyx_n_s_mro); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_item)), __pyx_n_s_mro); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { - __pyx_t_8 = __pyx_t_5; __Pyx_INCREF(__pyx_t_8); __pyx_t_12 = 0; - __pyx_t_13 = NULL; + __pyx_t_8 = __pyx_t_5; __Pyx_INCREF(__pyx_t_8); __pyx_t_11 = 0; + __pyx_t_12 = NULL; } else { - __pyx_t_12 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_11 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_13 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_12 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 220, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { - if (likely(!__pyx_t_13)) { + if (likely(!__pyx_t_12)) { if (likely(PyList_CheckExact(__pyx_t_8))) { - if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_8)) break; + if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_8)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_12); __Pyx_INCREF(__pyx_t_5); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_11); __Pyx_INCREF(__pyx_t_5); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 220, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { - if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_8)) break; + if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_8)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_12); __Pyx_INCREF(__pyx_t_5); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_11); __Pyx_INCREF(__pyx_t_5); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 220, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } } else { - __pyx_t_5 = __pyx_t_13(__pyx_t_8); + __pyx_t_5 = __pyx_t_12(__pyx_t_8); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 216, __pyx_L1_error) + else __PYX_ERR(0, 220, __pyx_L1_error) } break; } @@ -3621,46 +3401,43 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_2__call__(struct __pyx_o __Pyx_XDECREF_SET(__pyx_v_basetype, __pyx_t_5); __pyx_t_5 = 0; - /* "lxml/builder.py":218 + /* "lxml/builder.py":222 * for basetype in type(item).__mro__: * # See if the typemap knows of any of this type's bases. * t = typemap.get(basetype) # <<<<<<<<<<<<<< * if t is not None: * break */ - __Pyx_TraceLine(218,0,__PYX_ERR(0, 218, __pyx_L1_error)) if (unlikely(__pyx_v_typemap == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 218, __pyx_L1_error) + __PYX_ERR(0, 222, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyDict_GetItemDefault(__pyx_v_typemap, __pyx_v_basetype, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 218, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_GetItemDefault(__pyx_v_typemap, __pyx_v_basetype, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_t, __pyx_t_5); __pyx_t_5 = 0; - /* "lxml/builder.py":219 + /* "lxml/builder.py":223 * # See if the typemap knows of any of this type's bases. * t = typemap.get(basetype) * if t is not None: # <<<<<<<<<<<<<< * break * else: */ - __Pyx_TraceLine(219,0,__PYX_ERR(0, 219, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_t != Py_None); __pyx_t_4 = (__pyx_t_2 != 0); if (__pyx_t_4) { - /* "lxml/builder.py":220 + /* "lxml/builder.py":224 * t = typemap.get(basetype) * if t is not None: * break # <<<<<<<<<<<<<< * else: * raise TypeError("bad argument type: %s(%r)" % */ - __Pyx_TraceLine(220,0,__PYX_ERR(0, 220, __pyx_L1_error)) goto __pyx_L13_break; - /* "lxml/builder.py":219 + /* "lxml/builder.py":223 * # See if the typemap knows of any of this type's bases. * t = typemap.get(basetype) * if t is not None: # <<<<<<<<<<<<<< @@ -3669,67 +3446,63 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_2__call__(struct __pyx_o */ } - /* "lxml/builder.py":216 + /* "lxml/builder.py":220 * elem.append(item) * continue * for basetype in type(item).__mro__: # <<<<<<<<<<<<<< * # See if the typemap knows of any of this type's bases. * t = typemap.get(basetype) */ - __Pyx_TraceLine(216,0,__PYX_ERR(0, 216, __pyx_L1_error)) } /*else*/ { - /* "lxml/builder.py":223 + /* "lxml/builder.py":227 * else: * raise TypeError("bad argument type: %s(%r)" % * (type(item).__name__, item)) # <<<<<<<<<<<<<< * v = t(elem, item) * if v: */ - __Pyx_TraceLine(223,0,__PYX_ERR(0, 223, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_item)), __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 223, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_item)), __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 223, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __Pyx_INCREF(__pyx_v_item); __Pyx_GIVEREF(__pyx_v_item); - PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_item); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_item); __pyx_t_5 = 0; - /* "lxml/builder.py":222 + /* "lxml/builder.py":226 * break * else: * raise TypeError("bad argument type: %s(%r)" % # <<<<<<<<<<<<<< * (type(item).__name__, item)) * v = t(elem, item) */ - __Pyx_TraceLine(222,0,__PYX_ERR(0, 222, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_bad_argument_type_s_r, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 222, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_bad_argument_type_s_r, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 222, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_Raise(__pyx_t_10, 0, 0, 0); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 226, __pyx_L1_error) } - /* "lxml/builder.py":216 + /* "lxml/builder.py":220 * elem.append(item) * continue * for basetype in type(item).__mro__: # <<<<<<<<<<<<<< * # See if the typemap knows of any of this type's bases. * t = typemap.get(basetype) */ - __Pyx_TraceLine(216,0,__PYX_ERR(0, 216, __pyx_L1_error)) __pyx_L13_break:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "lxml/builder.py":212 + /* "lxml/builder.py":216 * item = item() * t = typemap.get(type(item)) * if t is None: # <<<<<<<<<<<<<< @@ -3738,121 +3511,118 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_2__call__(struct __pyx_o */ } - /* "lxml/builder.py":224 + /* "lxml/builder.py":228 * raise TypeError("bad argument type: %s(%r)" % * (type(item).__name__, item)) * v = t(elem, item) # <<<<<<<<<<<<<< * if v: * typemap.get(type(v))(elem, v) */ - __Pyx_TraceLine(224,0,__PYX_ERR(0, 224, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_t); - __pyx_t_10 = __pyx_v_t; __pyx_t_5 = NULL; + __pyx_t_1 = __pyx_v_t; __pyx_t_5 = NULL; __pyx_t_7 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_10); + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_10, function); + __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_10)) { + if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_elem, __pyx_v_item}; - __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { + if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_elem, __pyx_v_item}; - __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif { - __pyx_t_1 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_13 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_5) { - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __pyx_t_5 = NULL; + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_v_elem); __Pyx_GIVEREF(__pyx_v_elem); - PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_7, __pyx_v_elem); + PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_7, __pyx_v_elem); __Pyx_INCREF(__pyx_v_item); __Pyx_GIVEREF(__pyx_v_item); - PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_7, __pyx_v_item); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 224, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_7, __pyx_v_item); + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_13, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_8); __pyx_t_8 = 0; - /* "lxml/builder.py":225 + /* "lxml/builder.py":229 * (type(item).__name__, item)) * v = t(elem, item) * if v: # <<<<<<<<<<<<<< * typemap.get(type(v))(elem, v) * */ - __Pyx_TraceLine(225,0,__PYX_ERR(0, 225, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_v); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 225, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_v); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 229, __pyx_L1_error) if (__pyx_t_4) { - /* "lxml/builder.py":226 + /* "lxml/builder.py":230 * v = t(elem, item) * if v: * typemap.get(type(v))(elem, v) # <<<<<<<<<<<<<< * * return elem */ - __Pyx_TraceLine(226,0,__PYX_ERR(0, 226, __pyx_L1_error)) if (unlikely(__pyx_v_typemap == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 226, __pyx_L1_error) + __PYX_ERR(0, 230, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyDict_GetItemDefault(__pyx_v_typemap, ((PyObject *)Py_TYPE(__pyx_v_v)), Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 226, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_1 = NULL; + __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_typemap, ((PyObject *)Py_TYPE(__pyx_v_v)), Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_13 = NULL; __pyx_t_7 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_10); - if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); - __Pyx_INCREF(__pyx_t_1); + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_13)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_10, function); + __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_10)) { - PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_elem, __pyx_v_v}; - __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 226, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_v_elem, __pyx_v_v}; + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 230, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { - PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_elem, __pyx_v_v}; - __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 226, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_v_elem, __pyx_v_v}; + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 230, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif { - __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 226, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__pyx_t_1) { - __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL; + if (__pyx_t_13) { + __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_13); __pyx_t_13 = NULL; } __Pyx_INCREF(__pyx_v_elem); __Pyx_GIVEREF(__pyx_v_elem); @@ -3860,14 +3630,14 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_2__call__(struct __pyx_o __Pyx_INCREF(__pyx_v_v); __Pyx_GIVEREF(__pyx_v_v); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_v_v); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 226, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "lxml/builder.py":225 + /* "lxml/builder.py":229 * (type(item).__name__, item)) * v = t(elem, item) * if v: # <<<<<<<<<<<<<< @@ -3876,32 +3646,30 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_2__call__(struct __pyx_o */ } - /* "lxml/builder.py":208 + /* "lxml/builder.py":212 * typemap[dict](elem, attrib) * * for item in children: # <<<<<<<<<<<<<< * if callable(item): * item = item() */ - __Pyx_TraceLine(208,0,__PYX_ERR(0, 208, __pyx_L1_error)) __pyx_L7_continue:; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "lxml/builder.py":228 + /* "lxml/builder.py":232 * typemap.get(type(v))(elem, v) * * return elem # <<<<<<<<<<<<<< * * def __getattr__(self, tag): */ - __Pyx_TraceLine(228,0,__PYX_ERR(0, 228, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_elem); __pyx_r = __pyx_v_elem; goto __pyx_L0; - /* "lxml/builder.py":199 + /* "lxml/builder.py":203 * self._typemap = typemap * * def __call__(self, tag, *children, **attrib): # <<<<<<<<<<<<<< @@ -3915,7 +3683,7 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_2__call__(struct __pyx_o __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("lxml.builder.ElementMaker.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -3927,12 +3695,11 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_2__call__(struct __pyx_o __Pyx_XDECREF(__pyx_v_v); __Pyx_XDECREF(__pyx_v_tag); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/builder.py":230 +/* "lxml/builder.py":234 * return elem * * def __getattr__(self, tag): # <<<<<<<<<<<<<< @@ -3955,7 +3722,6 @@ static PyObject *__pyx_pw_4lxml_7builder_12ElementMaker_5__getattr__(PyObject *_ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_4__getattr__(struct __pyx_obj_4lxml_7builder_ElementMaker *__pyx_v_self, PyObject *__pyx_v_tag) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -3963,16 +3729,14 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_4__getattr__(struct __py int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__getattr__", 0); - __Pyx_TraceCall("__getattr__", __pyx_f[0], 230, 0, __PYX_ERR(0, 230, __pyx_L1_error)); - /* "lxml/builder.py":231 + /* "lxml/builder.py":235 * * def __getattr__(self, tag): * return partial(self, tag) # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(231,0,__PYX_ERR(0, 231, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_4lxml_7builder_partial); __pyx_t_2 = __pyx_v_4lxml_7builder_partial; __pyx_t_3 = NULL; @@ -3990,7 +3754,7 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_4__getattr__(struct __py #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_tag}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -3998,13 +3762,13 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_4__getattr__(struct __py #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_tag}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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, 231, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 235, __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; @@ -4015,7 +3779,7 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_4__getattr__(struct __py __Pyx_INCREF(__pyx_v_tag); __Pyx_GIVEREF(__pyx_v_tag); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_tag); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -4024,7 +3788,7 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_4__getattr__(struct __py __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/builder.py":230 + /* "lxml/builder.py":234 * return elem * * def __getattr__(self, tag): # <<<<<<<<<<<<<< @@ -4042,12 +3806,11 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_4__getattr__(struct __py __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/builder.pxd":6 +/* "lxml/builder.pxd":7 * * cdef class ElementMaker: * cdef readonly dict _nsmap # <<<<<<<<<<<<<< @@ -4070,27 +3833,21 @@ static PyObject *__pyx_pw_4lxml_7builder_12ElementMaker_6_nsmap_1__get__(PyObjec static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_6_nsmap___get__(struct __pyx_obj_4lxml_7builder_ElementMaker *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 6, 0, __PYX_ERR(1, 6, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_nsmap); __pyx_r = __pyx_v_self->_nsmap; goto __pyx_L0; /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.builder.ElementMaker._nsmap.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/builder.pxd":7 +/* "lxml/builder.pxd":8 * cdef class ElementMaker: * cdef readonly dict _nsmap * cdef readonly dict _typemap # <<<<<<<<<<<<<< @@ -4113,27 +3870,21 @@ static PyObject *__pyx_pw_4lxml_7builder_12ElementMaker_8_typemap_1__get__(PyObj static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8_typemap___get__(struct __pyx_obj_4lxml_7builder_ElementMaker *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 7, 0, __PYX_ERR(1, 7, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_typemap); __pyx_r = __pyx_v_self->_typemap; goto __pyx_L0; /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.builder.ElementMaker._typemap.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/builder.pxd":8 +/* "lxml/builder.pxd":9 * cdef readonly dict _nsmap * cdef readonly dict _typemap * cdef readonly object _namespace # <<<<<<<<<<<<<< @@ -4155,27 +3906,21 @@ static PyObject *__pyx_pw_4lxml_7builder_12ElementMaker_10_namespace_1__get__(Py static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_10_namespace___get__(struct __pyx_obj_4lxml_7builder_ElementMaker *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 8, 0, __PYX_ERR(1, 8, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_namespace); __pyx_r = __pyx_v_self->_namespace; goto __pyx_L0; /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.builder.ElementMaker._namespace.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/builder.pxd":9 +/* "lxml/builder.pxd":10 * cdef readonly dict _typemap * cdef readonly object _namespace * cdef readonly object _makeelement # <<<<<<<<<<<<<< @@ -4196,30 +3941,24 @@ static PyObject *__pyx_pw_4lxml_7builder_12ElementMaker_12_makeelement_1__get__( static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_12_makeelement___get__(struct __pyx_obj_4lxml_7builder_ElementMaker *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 9, 0, __PYX_ERR(1, 9, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_makeelement); __pyx_r = __pyx_v_self->_makeelement; goto __pyx_L0; /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.builder.ElementMaker._makeelement.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef bint use_setstate - * state = (self._makeelement, self._namespace, self._nsmap, self._typemap) + * cdef tuple state + * cdef object _dict */ /* Python wrapper */ @@ -4237,11 +3976,10 @@ static PyObject *__pyx_pw_4lxml_7builder_12ElementMaker_7__reduce_cython__(PyObj } static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_6__reduce_cython__(struct __pyx_obj_4lxml_7builder_ElementMaker *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; - PyObject *__pyx_v_state = NULL; - PyObject *__pyx_v__dict = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -4249,19 +3987,16 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_6__reduce_cython__(struc PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__10) __Pyx_RefNannySetupContext("__reduce_cython__", 0); - __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); - /* "(tree fragment)":3 - * def __reduce_cython__(self): + /* "(tree fragment)":5 + * cdef object _dict * cdef bint use_setstate * state = (self._makeelement, self._namespace, self._nsmap, self._typemap) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ - __Pyx_TraceLine(3,0,__PYX_ERR(2, 3, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->_makeelement); __Pyx_GIVEREF(__pyx_v_self->_makeelement); @@ -4278,61 +4013,57 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_6__reduce_cython__(struc __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":4 + /* "(tree fragment)":6 * cdef bint use_setstate * state = (self._makeelement, self._namespace, self._nsmap, self._typemap) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ - __Pyx_TraceLine(4,0,__PYX_ERR(2, 4, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; - /* "(tree fragment)":5 + /* "(tree fragment)":7 * state = (self._makeelement, self._namespace, self._nsmap, self._typemap) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ - __Pyx_TraceLine(5,0,__PYX_ERR(2, 5, __pyx_L1_error)) __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "(tree fragment)":6 + /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ - __Pyx_TraceLine(6,0,__PYX_ERR(2, 6, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "(tree fragment)":7 + /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self._makeelement is not None or self._namespace is not None or self._nsmap is not None or self._typemap is not None */ - __Pyx_TraceLine(7,0,__PYX_ERR(2, 7, __pyx_L1_error)) __pyx_v_use_setstate = 1; - /* "(tree fragment)":5 + /* "(tree fragment)":7 * state = (self._makeelement, self._namespace, self._nsmap, self._typemap) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< @@ -4342,14 +4073,13 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_6__reduce_cython__(struc goto __pyx_L3; } - /* "(tree fragment)":9 + /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self._makeelement is not None or self._namespace is not None or self._nsmap is not None or self._typemap is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_ElementMaker, (type(self), 0x9fc2fa1, None), state */ - __Pyx_TraceLine(9,0,__PYX_ERR(2, 9, __pyx_L1_error)) /*else*/ { __pyx_t_2 = (__pyx_v_self->_makeelement != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); @@ -4380,29 +4110,27 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_6__reduce_cython__(struc } __pyx_L3:; - /* "(tree fragment)":10 + /* "(tree fragment)":12 * else: * use_setstate = self._makeelement is not None or self._namespace is not None or self._nsmap is not None or self._typemap is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_ElementMaker, (type(self), 0x9fc2fa1, None), state * else: */ - __Pyx_TraceLine(10,0,__PYX_ERR(2, 10, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { - /* "(tree fragment)":11 + /* "(tree fragment)":13 * use_setstate = self._makeelement is not None or self._namespace is not None or self._nsmap is not None or self._typemap is not None * if use_setstate: * return __pyx_unpickle_ElementMaker, (type(self), 0x9fc2fa1, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_ElementMaker, (type(self), 0x9fc2fa1, state) */ - __Pyx_TraceLine(11,0,__PYX_ERR(2, 11, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_ElementMaker); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 11, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_ElementMaker); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); @@ -4413,7 +4141,7 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_6__reduce_cython__(struc __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); @@ -4428,7 +4156,7 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_6__reduce_cython__(struc __pyx_t_6 = 0; goto __pyx_L0; - /* "(tree fragment)":10 + /* "(tree fragment)":12 * else: * use_setstate = self._makeelement is not None or self._namespace is not None or self._nsmap is not None or self._typemap is not None * if use_setstate: # <<<<<<<<<<<<<< @@ -4437,19 +4165,18 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_6__reduce_cython__(struc */ } - /* "(tree fragment)":13 + /* "(tree fragment)":15 * return __pyx_unpickle_ElementMaker, (type(self), 0x9fc2fa1, None), state * else: * return __pyx_unpickle_ElementMaker, (type(self), 0x9fc2fa1, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_ElementMaker__set_state(self, __pyx_state) */ - __Pyx_TraceLine(13,0,__PYX_ERR(2, 13, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_ElementMaker); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_ElementMaker); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); @@ -4460,7 +4187,7 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_6__reduce_cython__(struc __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); @@ -4475,8 +4202,8 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_6__reduce_cython__(struc /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef bint use_setstate - * state = (self._makeelement, self._namespace, self._nsmap, self._typemap) + * cdef tuple state + * cdef object _dict */ /* function exit code */ @@ -4490,12 +4217,11 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_6__reduce_cython__(struc __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "(tree fragment)":14 +/* "(tree fragment)":16 * else: * return __pyx_unpickle_ElementMaker, (type(self), 0x9fc2fa1, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< @@ -4518,25 +4244,21 @@ static PyObject *__pyx_pw_4lxml_7builder_12ElementMaker_9__setstate_cython__(PyO static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__setstate_cython__(struct __pyx_obj_4lxml_7builder_ElementMaker *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__11) __Pyx_RefNannySetupContext("__setstate_cython__", 0); - __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 14, 0, __PYX_ERR(2, 14, __pyx_L1_error)); - /* "(tree fragment)":15 + /* "(tree fragment)":17 * return __pyx_unpickle_ElementMaker, (type(self), 0x9fc2fa1, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_ElementMaker__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(15,0,__PYX_ERR(2, 15, __pyx_L1_error)) - if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 15, __pyx_L1_error) - __pyx_t_1 = __pyx_f_4lxml_7builder___pyx_unpickle_ElementMaker__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_7builder___pyx_unpickle_ElementMaker__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":14 + /* "(tree fragment)":16 * else: * return __pyx_unpickle_ElementMaker, (type(self), 0x9fc2fa1, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< @@ -4552,20 +4274,19 @@ static PyObject *__pyx_pf_4lxml_7builder_12ElementMaker_8__setstate_cython__(str __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_ElementMaker(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0x9fc2fa1: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_4lxml_7builder_1__pyx_unpickle_ElementMaker(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_7builder_1__pyx_unpickle_ElementMaker = {"__pyx_unpickle_ElementMaker", (PyCFunction)__pyx_pw_4lxml_7builder_1__pyx_unpickle_ElementMaker, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_7builder_1__pyx_unpickle_ElementMaker = {"__pyx_unpickle_ElementMaker", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_7builder_1__pyx_unpickle_ElementMaker, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_7builder_1__pyx_unpickle_ElementMaker(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; @@ -4598,17 +4319,17 @@ static PyObject *__pyx_pw_4lxml_7builder_1__pyx_unpickle_ElementMaker(PyObject * case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ElementMaker", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ElementMaker", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ElementMaker", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ElementMaker", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_ElementMaker") < 0)) __PYX_ERR(2, 1, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_ElementMaker") < 0)) __PYX_ERR(1, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -4618,12 +4339,12 @@ static PyObject *__pyx_pw_4lxml_7builder_1__pyx_unpickle_ElementMaker(PyObject * values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; - __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ElementMaker", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ElementMaker", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.builder.__pyx_unpickle_ElementMaker", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -4637,66 +4358,60 @@ static PyObject *__pyx_pw_4lxml_7builder_1__pyx_unpickle_ElementMaker(PyObject * } static PyObject *__pyx_pf_4lxml_7builder___pyx_unpickle_ElementMaker(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { - PyObject *__pyx_v___pyx_PickleError = NULL; - PyObject *__pyx_v___pyx_result = NULL; + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; - __Pyx_TraceFrameInit(__pyx_codeobj__12) + int __pyx_t_6; __Pyx_RefNannySetupContext("__pyx_unpickle_ElementMaker", 0); - __Pyx_TraceCall("__pyx_unpickle_ElementMaker", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); - /* "(tree fragment)":2 - * def __pyx_unpickle_ElementMaker(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result * if __pyx_checksum != 0x9fc2fa1: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x9fc2fa1 = (_makeelement, _namespace, _nsmap, _typemap))" % __pyx_checksum) */ - __Pyx_TraceLine(2,0,__PYX_ERR(2, 2, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x9fc2fa1) != 0); if (__pyx_t_1) { - /* "(tree fragment)":3 - * def __pyx_unpickle_ElementMaker(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":5 + * cdef object __pyx_result * if __pyx_checksum != 0x9fc2fa1: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0x9fc2fa1 = (_makeelement, _namespace, _nsmap, _typemap))" % __pyx_checksum) * __pyx_result = ElementMaker.__new__(__pyx_type) */ - __Pyx_TraceLine(3,0,__PYX_ERR(2, 3, __pyx_L1_error)) - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); - __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "(tree fragment)":4 + /* "(tree fragment)":6 * if __pyx_checksum != 0x9fc2fa1: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x9fc2fa1 = (_makeelement, _namespace, _nsmap, _typemap))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = ElementMaker.__new__(__pyx_type) * if __pyx_state is not None: */ - __Pyx_TraceLine(4,0,__PYX_ERR(2, 4, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x9f, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x9f, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -4710,136 +4425,76 @@ static PyObject *__pyx_pf_4lxml_7builder___pyx_unpickle_ElementMaker(CYTHON_UNUS __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __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_3)) __PYX_ERR(1, 6, __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(2, 4, __pyx_L1_error) + __PYX_ERR(1, 6, __pyx_L1_error) - /* "(tree fragment)":2 - * def __pyx_unpickle_ElementMaker(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result * if __pyx_checksum != 0x9fc2fa1: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x9fc2fa1 = (_makeelement, _namespace, _nsmap, _typemap))" % __pyx_checksum) */ } - /* "(tree fragment)":5 + /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x9fc2fa1 = (_makeelement, _namespace, _nsmap, _typemap))" % __pyx_checksum) * __pyx_result = ElementMaker.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_ElementMaker__set_state( __pyx_result, __pyx_state) */ - __Pyx_TraceLine(5,0,__PYX_ERR(2, 5, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_7builder_ElementMaker), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_7builder_ElementMaker), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = NULL; + __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_6)) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_v___pyx_type); - __Pyx_GIVEREF(__pyx_v___pyx_type); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; - /* "(tree fragment)":6 + /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x9fc2fa1 = (_makeelement, _namespace, _nsmap, _typemap))" % __pyx_checksum) * __pyx_result = ElementMaker.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_ElementMaker__set_state( __pyx_result, __pyx_state) * return __pyx_result */ - __Pyx_TraceLine(6,0,__PYX_ERR(2, 6, __pyx_L1_error)) __pyx_t_1 = (__pyx_v___pyx_state != Py_None); - __pyx_t_7 = (__pyx_t_1 != 0); - if (__pyx_t_7) { + __pyx_t_6 = (__pyx_t_1 != 0); + if (__pyx_t_6) { - /* "(tree fragment)":7 + /* "(tree fragment)":9 * __pyx_result = ElementMaker.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_ElementMaker__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_ElementMaker__set_state(ElementMaker __pyx_result, tuple __pyx_state): */ - __Pyx_TraceLine(7,0,__PYX_ERR(2, 7, __pyx_L1_error)) - if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 7, __pyx_L1_error) - __pyx_t_3 = __pyx_f_4lxml_7builder___pyx_unpickle_ElementMaker__set_state(((struct __pyx_obj_4lxml_7builder_ElementMaker *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_7builder___pyx_unpickle_ElementMaker__set_state(((struct __pyx_obj_4lxml_7builder_ElementMaker *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "(tree fragment)":6 + /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x9fc2fa1 = (_makeelement, _namespace, _nsmap, _typemap))" % __pyx_checksum) * __pyx_result = ElementMaker.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< @@ -4848,14 +4503,13 @@ static PyObject *__pyx_pf_4lxml_7builder___pyx_unpickle_ElementMaker(CYTHON_UNUS */ } - /* "(tree fragment)":8 + /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_ElementMaker__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_ElementMaker__set_state(ElementMaker __pyx_result, tuple __pyx_state): * __pyx_result._makeelement = __pyx_state[0]; __pyx_result._namespace = __pyx_state[1]; __pyx_result._nsmap = __pyx_state[2]; __pyx_result._typemap = __pyx_state[3] */ - __Pyx_TraceLine(8,0,__PYX_ERR(2, 8, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; @@ -4863,8 +4517,8 @@ static PyObject *__pyx_pf_4lxml_7builder___pyx_unpickle_ElementMaker(CYTHON_UNUS /* "(tree fragment)":1 * def __pyx_unpickle_ElementMaker(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0x9fc2fa1: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ /* function exit code */ @@ -4873,19 +4527,17 @@ static PyObject *__pyx_pf_4lxml_7builder___pyx_unpickle_ElementMaker(CYTHON_UNUS __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("lxml.builder.__pyx_unpickle_ElementMaker", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "(tree fragment)":9 +/* "(tree fragment)":11 * __pyx_unpickle_ElementMaker__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_ElementMaker__set_state(ElementMaker __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< @@ -4895,7 +4547,6 @@ static PyObject *__pyx_pf_4lxml_7builder___pyx_unpickle_ElementMaker(CYTHON_UNUS static PyObject *__pyx_f_4lxml_7builder___pyx_unpickle_ElementMaker__set_state(struct __pyx_obj_4lxml_7builder_ElementMaker *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -4905,23 +4556,20 @@ static PyObject *__pyx_f_4lxml_7builder___pyx_unpickle_ElementMaker__set_state(s PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("__pyx_unpickle_ElementMaker__set_state", 0); - __Pyx_TraceCall("__pyx_unpickle_ElementMaker__set_state", __pyx_f[2], 9, 0, __PYX_ERR(2, 9, __pyx_L1_error)); - /* "(tree fragment)":10 + /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_ElementMaker__set_state(ElementMaker __pyx_result, tuple __pyx_state): * __pyx_result._makeelement = __pyx_state[0]; __pyx_result._namespace = __pyx_state[1]; __pyx_result._nsmap = __pyx_state[2]; __pyx_result._typemap = __pyx_state[3] # <<<<<<<<<<<<<< * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[4]) */ - __Pyx_TraceLine(10,0,__PYX_ERR(2, 10, __pyx_L1_error)) if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(1, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->_makeelement); @@ -4930,9 +4578,9 @@ static PyObject *__pyx_f_4lxml_7builder___pyx_unpickle_ElementMaker__set_state(s __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(1, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->_namespace); @@ -4941,11 +4589,11 @@ static PyObject *__pyx_f_4lxml_7builder___pyx_unpickle_ElementMaker__set_state(s __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(1, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->_nsmap); __Pyx_DECREF(__pyx_v___pyx_result->_nsmap); @@ -4953,57 +4601,55 @@ static PyObject *__pyx_f_4lxml_7builder___pyx_unpickle_ElementMaker__set_state(s __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(1, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->_typemap); __Pyx_DECREF(__pyx_v___pyx_result->_typemap); __pyx_v___pyx_result->_typemap = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":11 + /* "(tree fragment)":13 * cdef __pyx_unpickle_ElementMaker__set_state(ElementMaker __pyx_result, tuple __pyx_state): * __pyx_result._makeelement = __pyx_state[0]; __pyx_result._namespace = __pyx_state[1]; __pyx_result._nsmap = __pyx_state[2]; __pyx_result._typemap = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[4]) */ - __Pyx_TraceLine(11,0,__PYX_ERR(2, 11, __pyx_L1_error)) if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(2, 11, __pyx_L1_error) + __PYX_ERR(1, 13, __pyx_L1_error) } - __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 4) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } - __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { - /* "(tree fragment)":12 + /* "(tree fragment)":14 * __pyx_result._makeelement = __pyx_state[0]; __pyx_result._namespace = __pyx_state[1]; __pyx_result._nsmap = __pyx_state[2]; __pyx_result._typemap = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(12,0,__PYX_ERR(2, 12, __pyx_L1_error)) - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 12, __pyx_L1_error) + __PYX_ERR(1, 14, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -5015,45 +4661,15 @@ static PyObject *__pyx_f_4lxml_7builder___pyx_unpickle_ElementMaker__set_state(s __Pyx_DECREF_SET(__pyx_t_7, function); } } - if (!__pyx_t_8) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } - } + __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":11 + /* "(tree fragment)":13 * cdef __pyx_unpickle_ElementMaker__set_state(ElementMaker __pyx_result, tuple __pyx_state): * __pyx_result._makeelement = __pyx_state[0]; __pyx_result._namespace = __pyx_state[1]; __pyx_result._nsmap = __pyx_state[2]; __pyx_result._typemap = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< @@ -5061,7 +4677,7 @@ static PyObject *__pyx_f_4lxml_7builder___pyx_unpickle_ElementMaker__set_state(s */ } - /* "(tree fragment)":9 + /* "(tree fragment)":11 * __pyx_unpickle_ElementMaker__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_ElementMaker__set_state(ElementMaker __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< @@ -5077,12 +4693,10 @@ static PyObject *__pyx_f_4lxml_7builder___pyx_unpickle_ElementMaker__set_state(s __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("lxml.builder.__pyx_unpickle_ElementMaker__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -5380,6 +4994,15 @@ static struct PyModuleDef __pyx_moduledef = { (freefunc)__pyx_module_cleanup /* m_free */ }; #endif +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0}, @@ -5388,6 +5011,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_E, __pyx_k_E, sizeof(__pyx_k_E), 0, 0, 1, 1}, {&__pyx_n_s_ET, __pyx_k_ET, sizeof(__pyx_k_ET), 0, 0, 1, 1}, {&__pyx_n_s_Element, __pyx_k_Element, sizeof(__pyx_k_Element), 0, 0, 1, 1}, + {&__pyx_n_s_ElementMaker, __pyx_k_ElementMaker, sizeof(__pyx_k_ElementMaker), 0, 0, 1, 1}, {&__pyx_n_s_ElementMaker___reduce_cython, __pyx_k_ElementMaker___reduce_cython, sizeof(__pyx_k_ElementMaker___reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_ElementMaker___setstate_cython, __pyx_k_ElementMaker___setstate_cython, sizeof(__pyx_k_ElementMaker___setstate_cython), 0, 0, 1, 1}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0x9f, __pyx_k_Incompatible_checksums_s_vs_0x9f, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x9f), 0, 0, 1, 0}, @@ -5396,7 +5020,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1}, {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, - {&__pyx_n_s__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 0, 1, 1}, + {&__pyx_n_s__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 0, 1, 1}, {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0}, {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0}, {&__pyx_n_s_add_cdata, __pyx_k_add_cdata, sizeof(__pyx_k_add_cdata), 0, 0, 1, 1}, @@ -5460,86 +5084,86 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; -static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_NameError = __Pyx_GetBuiltinName(__pyx_n_s_NameError); if (!__pyx_builtin_NameError) __PYX_ERR(0, 46, __pyx_L1_error) - __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 172, __pyx_L1_error) - __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 177, __pyx_L1_error) - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 222, __pyx_L1_error) +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { + __pyx_builtin_NameError = __Pyx_GetBuiltinName(__pyx_n_s_NameError); if (!__pyx_builtin_NameError) __PYX_ERR(0, 50, __pyx_L1_error) + __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 176, __pyx_L1_error) + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 181, __pyx_L1_error) + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 226, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } -static int __Pyx_InitCachedConstants(void) { +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "lxml/builder.py":169 + /* "lxml/builder.py":173 * typemap = {} * * def add_text(elem, item): # <<<<<<<<<<<<<< * try: * elem[-1].tail = (elem[-1].tail or "") + item */ - __pyx_tuple__4 = PyTuple_Pack(2, __pyx_n_s_elem, __pyx_n_s_item); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 169, __pyx_L1_error) + __pyx_tuple__4 = PyTuple_Pack(2, __pyx_n_s_elem, __pyx_n_s_item); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); - __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_builder_py, __pyx_n_s_add_text, 169, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(0, 169, __pyx_L1_error) + __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_builder_py, __pyx_n_s_add_text, 173, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(0, 173, __pyx_L1_error) - /* "lxml/builder.py":175 + /* "lxml/builder.py":179 * elem.text = (elem.text or "") + item * * def add_cdata(elem, cdata): # <<<<<<<<<<<<<< * if elem.text: * raise ValueError("Can't add a CDATA section. Element already has some text: %r" % elem.text) */ - __pyx_tuple__6 = PyTuple_Pack(2, __pyx_n_s_elem, __pyx_n_s_cdata); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 175, __pyx_L1_error) + __pyx_tuple__6 = PyTuple_Pack(2, __pyx_n_s_elem, __pyx_n_s_cdata); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); - __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__6, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_builder_py, __pyx_n_s_add_cdata, 175, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(0, 175, __pyx_L1_error) + __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__6, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_builder_py, __pyx_n_s_add_cdata, 179, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(0, 179, __pyx_L1_error) - /* "lxml/builder.py":187 + /* "lxml/builder.py":191 * typemap[ET.CDATA] = add_cdata * * def add_dict(elem, item): # <<<<<<<<<<<<<< * attrib = elem.attrib * for k, v in item.items(): */ - __pyx_tuple__8 = PyTuple_Pack(5, __pyx_n_s_elem, __pyx_n_s_item, __pyx_n_s_attrib, __pyx_n_s_k, __pyx_n_s_v); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 187, __pyx_L1_error) + __pyx_tuple__8 = PyTuple_Pack(5, __pyx_n_s_elem, __pyx_n_s_item, __pyx_n_s_attrib, __pyx_n_s_k, __pyx_n_s_v); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); - __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__8, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_builder_py, __pyx_n_s_add_dict, 187, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(0, 187, __pyx_L1_error) + __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__8, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_builder_py, __pyx_n_s_add_dict, 191, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(0, 191, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef bint use_setstate - * state = (self._makeelement, self._namespace, self._nsmap, self._typemap) + * cdef tuple state + * cdef object _dict */ - __pyx_tuple__14 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_use_setstate, __pyx_n_s_state, __pyx_n_s_dict_2); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__14); - __Pyx_GIVEREF(__pyx_tuple__14); - __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__11 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__11); + __Pyx_GIVEREF(__pyx_tuple__11); + __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(1, 1, __pyx_L1_error) - /* "(tree fragment)":14 + /* "(tree fragment)":16 * else: * return __pyx_unpickle_ElementMaker, (type(self), 0x9fc2fa1, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_ElementMaker__set_state(self, __pyx_state) */ - __pyx_tuple__15 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(2, 14, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__15); - __Pyx_GIVEREF(__pyx_tuple__15); - __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(2, 14, __pyx_L1_error) + __pyx_tuple__13 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__13); + __Pyx_GIVEREF(__pyx_tuple__13); + __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(1, 16, __pyx_L1_error) /* "(tree fragment)":1 * def __pyx_unpickle_ElementMaker(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0x9fc2fa1: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ - __pyx_tuple__16 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__16); - __Pyx_GIVEREF(__pyx_tuple__16); - __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ElementMaker, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__15 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__15); + __Pyx_GIVEREF(__pyx_tuple__15); + __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ElementMaker, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -5547,7 +5171,7 @@ static int __Pyx_InitCachedConstants(void) { return -1; } -static int __Pyx_InitGlobals(void) { +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { __pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type; if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error); __pyx_int_167522209 = PyInt_FromLong(167522209L); if (unlikely(!__pyx_int_167522209)) __PYX_ERR(0, 1, __pyx_L1_error) @@ -5556,13 +5180,13 @@ static int __Pyx_InitGlobals(void) { return -1; } -static int __Pyx_modinit_global_init_code(void); /*proto*/ -static int __Pyx_modinit_variable_export_code(void); /*proto*/ -static int __Pyx_modinit_function_export_code(void); /*proto*/ -static int __Pyx_modinit_type_init_code(void); /*proto*/ -static int __Pyx_modinit_type_import_code(void); /*proto*/ -static int __Pyx_modinit_variable_import_code(void); /*proto*/ -static int __Pyx_modinit_function_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ static int __Pyx_modinit_global_init_code(void) { __Pyx_RefNannyDeclarations @@ -5599,12 +5223,12 @@ static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ - if (PyType_Ready(&__pyx_type_4lxml_7builder_ElementMaker) < 0) __PYX_ERR(0, 55, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_7builder_ElementMaker) < 0) __PYX_ERR(0, 59, __pyx_L1_error) __pyx_type_4lxml_7builder_ElementMaker.tp_print = 0; - if (PyObject_SetAttrString(__pyx_m, "ElementMaker", (PyObject *)&__pyx_type_4lxml_7builder_ElementMaker) < 0) __PYX_ERR(0, 55, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4lxml_7builder_ElementMaker) < 0) __PYX_ERR(0, 55, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ElementMaker, (PyObject *)&__pyx_type_4lxml_7builder_ElementMaker) < 0) __PYX_ERR(0, 59, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4lxml_7builder_ElementMaker) < 0) __PYX_ERR(0, 59, __pyx_L1_error) __pyx_ptype_4lxml_7builder_ElementMaker = &__pyx_type_4lxml_7builder_ElementMaker; - if (PyType_Ready(&__pyx_type_4lxml_7builder___pyx_scope_struct____init__) < 0) __PYX_ERR(0, 144, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_7builder___pyx_scope_struct____init__) < 0) __PYX_ERR(0, 148, __pyx_L1_error) __pyx_type_4lxml_7builder___pyx_scope_struct____init__.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_7builder___pyx_scope_struct____init__.tp_dictoffset && __pyx_type_4lxml_7builder___pyx_scope_struct____init__.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_7builder___pyx_scope_struct____init__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; @@ -5655,15 +5279,6 @@ static int __Pyx_modinit_function_import_code(void) { #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC #endif #endif -#ifndef CYTHON_SMALL_CODE -#if defined(__clang__) - #define CYTHON_SMALL_CODE -#elif defined(__GNUC__) && (!(defined(__cplusplus)) || (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4))) - #define CYTHON_SMALL_CODE __attribute__((cold)) -#else - #define CYTHON_SMALL_CODE -#endif -#endif #if PY_MAJOR_VERSION < 3 @@ -5676,11 +5291,36 @@ __Pyx_PyMODINIT_FUNC PyInit_builder(void) { return PyModuleDef_Init(&__pyx_moduledef); } -static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name) { +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + #if PY_VERSION_HEX >= 0x030700A1 + static PY_INT64_T main_interpreter_id = -1; + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return (unlikely(current_id == -1)) ? -1 : 0; + } else if (unlikely(main_interpreter_id != current_id)) + #else + static PyInterpreterState *main_interpreter = NULL; + PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; + if (!main_interpreter) { + main_interpreter = current_interpreter; + } else if (unlikely(main_interpreter != current_interpreter)) + #endif + { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) { PyObject *value = PyObject_GetAttrString(spec, from_name); int result = 0; if (likely(value)) { - result = PyDict_SetItemString(moddict, to_name, value); + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } Py_DECREF(value); } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); @@ -5689,8 +5329,10 @@ static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const ch } return result; } -static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { PyObject *module = NULL, *moddict, *modname; + if (__Pyx_check_single_interpreter()) + return NULL; if (__pyx_m) return __Pyx_NewRef(__pyx_m); modname = PyObject_GetAttrString(spec, "name"); @@ -5700,10 +5342,10 @@ static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *d if (unlikely(!module)) goto bad; moddict = PyModule_GetDict(module); if (unlikely(!moddict)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__") < 0)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; return module; bad: Py_XDECREF(module); @@ -5711,11 +5353,10 @@ bad: } -static int __pyx_pymod_exec_builder(PyObject *__pyx_pyinit_module) +static CYTHON_SMALL_CODE int __pyx_pymod_exec_builder(PyObject *__pyx_pyinit_module) #endif #endif { - __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; @@ -5725,7 +5366,11 @@ static int __pyx_pymod_exec_builder(PyObject *__pyx_pyinit_module) PyObject *__pyx_t_7 = NULL; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT - if (__pyx_m && __pyx_m == __pyx_pyinit_module) return 0; + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'builder' has already been imported. Re-initialisation is not supported."); + return -1; + } #elif PY_MAJOR_VERSION >= 3 if (__pyx_m) return __Pyx_NewRef(__pyx_m); #endif @@ -5740,6 +5385,9 @@ if (!__Pyx_RefNanny) { #endif __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_builder(void)", 0); if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) @@ -5794,7 +5442,7 @@ if (!__Pyx_RefNanny) { if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif if (__pyx_module_is_main_lxml__builder) { - if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) } #if PY_MAJOR_VERSION >= 3 { @@ -5820,22 +5468,20 @@ if (!__Pyx_RefNanny) { #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif - __Pyx_TraceCall("__Pyx_PyMODINIT_FUNC PyInit_builder(void)", __pyx_f[0], 1, 0, __PYX_ERR(0, 1, __pyx_L1_error)); - /* "lxml/builder.py":40 - * """ + /* "lxml/builder.py":44 + * from __future__ import absolute_import * * import lxml.etree as ET # <<<<<<<<<<<<<< * * from functools import partial */ - __Pyx_TraceLine(40,0,__PYX_ERR(0, 40, __pyx_L1_error)) - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_n_s__13); - __Pyx_GIVEREF(__pyx_n_s__13); - PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s__13); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_lxml_etree, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_INCREF(__pyx_n_s__10); + __Pyx_GIVEREF(__pyx_n_s__10); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s__10); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_lxml_etree, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_v_4lxml_7builder_ET); @@ -5843,23 +5489,22 @@ if (!__Pyx_RefNanny) { __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/builder.py":42 + /* "lxml/builder.py":46 * import lxml.etree as ET * * from functools import partial # <<<<<<<<<<<<<< * * try: */ - __Pyx_TraceLine(42,0,__PYX_ERR(0, 42, __pyx_L1_error)) - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_partial); __Pyx_GIVEREF(__pyx_n_s_partial); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_partial); - __pyx_t_1 = __Pyx_Import(__pyx_n_s_functools, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_n_s_functools, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_partial); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_partial); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_v_4lxml_7builder_partial); @@ -5868,14 +5513,13 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/builder.py":44 + /* "lxml/builder.py":48 * from functools import partial * * try: # <<<<<<<<<<<<<< * basestring * except NameError: */ - __Pyx_TraceLine(44,0,__PYX_ERR(0, 44, __pyx_L2_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -5885,19 +5529,18 @@ if (!__Pyx_RefNanny) { __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { - /* "lxml/builder.py":45 + /* "lxml/builder.py":49 * * try: * basestring # <<<<<<<<<<<<<< * except NameError: * basestring = str */ - __Pyx_TraceLine(45,0,__PYX_ERR(0, 45, __pyx_L2_error)) - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L2_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_basestring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/builder.py":44 + /* "lxml/builder.py":48 * from functools import partial * * try: # <<<<<<<<<<<<<< @@ -5913,40 +5556,38 @@ if (!__Pyx_RefNanny) { __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/builder.py":46 + /* "lxml/builder.py":50 * try: * basestring * except NameError: # <<<<<<<<<<<<<< * basestring = str * */ - __Pyx_TraceLine(46,0,__PYX_ERR(0, 46, __pyx_L4_except_error)) __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError); if (__pyx_t_6) { __Pyx_AddTraceback("lxml.builder", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_7) < 0) __PYX_ERR(0, 46, __pyx_L4_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_7) < 0) __PYX_ERR(0, 50, __pyx_L4_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_7); - /* "lxml/builder.py":47 + /* "lxml/builder.py":51 * basestring * except NameError: * basestring = str # <<<<<<<<<<<<<< * * try: */ - __Pyx_TraceLine(47,0,__PYX_ERR(0, 47, __pyx_L4_except_error)) - if (PyDict_SetItem(__pyx_d, __pyx_n_s_basestring, ((PyObject *)(&PyString_Type))) < 0) __PYX_ERR(0, 47, __pyx_L4_except_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; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_basestring, ((PyObject *)(&PyString_Type))) < 0) __PYX_ERR(0, 51, __pyx_L4_except_error) + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L3_exception_handled; } goto __pyx_L4_except_error; __pyx_L4_except_error:; - /* "lxml/builder.py":44 + /* "lxml/builder.py":48 * from functools import partial * * try: # <<<<<<<<<<<<<< @@ -5966,14 +5607,13 @@ if (!__Pyx_RefNanny) { __pyx_L7_try_end:; } - /* "lxml/builder.py":49 + /* "lxml/builder.py":53 * basestring = str * * try: # <<<<<<<<<<<<<< * unicode * except NameError: */ - __Pyx_TraceLine(49,0,__PYX_ERR(0, 49, __pyx_L10_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -5983,19 +5623,18 @@ if (!__Pyx_RefNanny) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "lxml/builder.py":50 + /* "lxml/builder.py":54 * * try: * unicode # <<<<<<<<<<<<<< * except NameError: * unicode = str */ - __Pyx_TraceLine(50,0,__PYX_ERR(0, 50, __pyx_L10_error)) - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 50, __pyx_L10_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 54, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "lxml/builder.py":49 + /* "lxml/builder.py":53 * basestring = str * * try: # <<<<<<<<<<<<<< @@ -6012,40 +5651,38 @@ if (!__Pyx_RefNanny) { __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "lxml/builder.py":51 + /* "lxml/builder.py":55 * try: * unicode * except NameError: # <<<<<<<<<<<<<< * unicode = str * */ - __Pyx_TraceLine(51,0,__PYX_ERR(0, 51, __pyx_L12_except_error)) __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError); if (__pyx_t_6) { __Pyx_AddTraceback("lxml.builder", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 51, __pyx_L12_except_error) + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 55, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_1); - /* "lxml/builder.py":52 + /* "lxml/builder.py":56 * unicode * except NameError: * unicode = str # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(52,0,__PYX_ERR(0, 52, __pyx_L12_except_error)) - if (PyDict_SetItem(__pyx_d, __pyx_n_s_unicode, ((PyObject *)(&PyString_Type))) < 0) __PYX_ERR(0, 52, __pyx_L12_except_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_unicode, ((PyObject *)(&PyString_Type))) < 0) __PYX_ERR(0, 56, __pyx_L12_except_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L11_exception_handled; } goto __pyx_L12_except_error; __pyx_L12_except_error:; - /* "lxml/builder.py":49 + /* "lxml/builder.py":53 * basestring = str * * try: # <<<<<<<<<<<<<< @@ -6067,60 +5704,54 @@ if (!__Pyx_RefNanny) { /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef bint use_setstate - * state = (self._makeelement, self._namespace, self._nsmap, self._typemap) + * cdef tuple state + * cdef object _dict */ - __Pyx_TraceLine(1,0,__PYX_ERR(2, 1, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_7builder_12ElementMaker_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementMaker___reduce_cython, NULL, __pyx_n_s_lxml_builder, __pyx_d, ((PyObject *)__pyx_codeobj__10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_7builder_12ElementMaker_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementMaker___reduce_cython, NULL, __pyx_n_s_lxml_builder, __pyx_d, ((PyObject *)__pyx_codeobj__12)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(2, 1, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":14 + /* "(tree fragment)":16 * else: * return __pyx_unpickle_ElementMaker, (type(self), 0x9fc2fa1, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_ElementMaker__set_state(self, __pyx_state) */ - __Pyx_TraceLine(14,0,__PYX_ERR(2, 14, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_7builder_12ElementMaker_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementMaker___setstate_cython, NULL, __pyx_n_s_lxml_builder, __pyx_d, ((PyObject *)__pyx_codeobj__11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_7builder_12ElementMaker_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementMaker___setstate_cython, NULL, __pyx_n_s_lxml_builder, __pyx_d, ((PyObject *)__pyx_codeobj__14)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(2, 14, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/builder.py":235 + /* "lxml/builder.py":239 * * # create factory object * E = ElementMaker() # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(235,0,__PYX_ERR(0, 235, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_7builder_ElementMaker)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_7builder_ElementMaker)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_E, __pyx_t_1) < 0) __PYX_ERR(0, 235, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_E, __pyx_t_1) < 0) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":1 * def __pyx_unpickle_ElementMaker(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0x9fc2fa1: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ - __Pyx_TraceLine(1,0,__PYX_ERR(2, 1, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_7builder_1__pyx_unpickle_ElementMaker, 0, __pyx_n_s_pyx_unpickle_ElementMaker, NULL, __pyx_n_s_lxml_builder, __pyx_d, ((PyObject *)__pyx_codeobj__12)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_7builder_1__pyx_unpickle_ElementMaker, 0, __pyx_n_s_pyx_unpickle_ElementMaker, NULL, __pyx_n_s_lxml_builder, __pyx_d, ((PyObject *)__pyx_codeobj__16)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ElementMaker, __pyx_t_1) < 0) __PYX_ERR(2, 1, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ElementMaker, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "lxml/builder.py":1 - * # # <<<<<<<<<<<<<< - * # Element generator factory by Fredrik Lundh. + * # cython: language_level=2 # <<<<<<<<<<<<<< + * * # */ - __Pyx_TraceLine(1,0,__PYX_ERR(0, 1, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_TraceReturn(Py_None, 0); /*--- Wrapped vars code ---*/ @@ -6132,9 +5763,9 @@ if (!__Pyx_RefNanny) { __Pyx_XDECREF(__pyx_t_7); if (__pyx_m) { if (__pyx_d) { - __Pyx_AddTraceback("init lxml.builder", 0, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("init lxml.builder", __pyx_clineno, __pyx_lineno, __pyx_filename); } - Py_DECREF(__pyx_m); __pyx_m = 0; + Py_CLEAR(__pyx_m); } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init lxml.builder"); } @@ -6149,19 +5780,19 @@ if (!__Pyx_RefNanny) { #endif } -static void __Pyx_CleanupGlobals(void) { +static CYTHON_SMALL_CODE void __Pyx_CleanupGlobals(void) { Py_CLEAR(__pyx_tuple__4); Py_CLEAR(__pyx_codeobj__5); Py_CLEAR(__pyx_tuple__6); Py_CLEAR(__pyx_codeobj__7); Py_CLEAR(__pyx_tuple__8); Py_CLEAR(__pyx_codeobj__9); - Py_CLEAR(__pyx_codeobj__10); - Py_CLEAR(__pyx_codeobj__11); + Py_CLEAR(__pyx_tuple__11); Py_CLEAR(__pyx_codeobj__12); - Py_CLEAR(__pyx_tuple__14); + Py_CLEAR(__pyx_tuple__13); + Py_CLEAR(__pyx_codeobj__14); Py_CLEAR(__pyx_tuple__15); - Py_CLEAR(__pyx_tuple__16); + Py_CLEAR(__pyx_codeobj__16); /* CodeObjectCache.cleanup */ if (__pyx_code_cache.entries) { __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; @@ -6206,9 +5837,9 @@ static void __pyx_module_cleanup(CYTHON_UNUSED PyObject *self) { static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; - m = PyImport_ImportModule((char *)modname); + m = PyImport_ImportModule(modname); if (!m) goto end; - p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); + p = PyObject_GetAttrString(m, "RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: @@ -6388,123 +6019,6 @@ static void __Pyx_RaiseArgtupleInvalid( (num_expected == 1) ? "" : "s", num_found); } -/* PyErrFetchRestore */ -#if CYTHON_FAST_THREAD_STATE -static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { - PyObject *tmp_type, *tmp_value, *tmp_tb; - tmp_type = tstate->curexc_type; - tmp_value = tstate->curexc_value; - tmp_tb = tstate->curexc_traceback; - tstate->curexc_type = type; - tstate->curexc_value = value; - tstate->curexc_traceback = tb; - Py_XDECREF(tmp_type); - Py_XDECREF(tmp_value); - Py_XDECREF(tmp_tb); -} -static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { - *type = tstate->curexc_type; - *value = tstate->curexc_value; - *tb = tstate->curexc_traceback; - tstate->curexc_type = 0; - tstate->curexc_value = 0; - tstate->curexc_traceback = 0; -} -#endif - -/* Profile */ -#if CYTHON_PROFILE -static int __Pyx_TraceSetupAndCall(PyCodeObject** code, - PyFrameObject** frame, - PyThreadState* tstate, - const char *funcname, - const char *srcfile, - int firstlineno) { - PyObject *type, *value, *traceback; - int retval; - if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) { - if (*code == NULL) { - *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno); - if (*code == NULL) return 0; - } - *frame = PyFrame_New( - tstate, /*PyThreadState *tstate*/ - *code, /*PyCodeObject *code*/ - __pyx_d, /*PyObject *globals*/ - 0 /*PyObject *locals*/ - ); - if (*frame == NULL) return 0; - if (CYTHON_TRACE && (*frame)->f_trace == NULL) { - Py_INCREF(Py_None); - (*frame)->f_trace = Py_None; - } -#if PY_VERSION_HEX < 0x030400B1 - } else { - (*frame)->f_tstate = tstate; -#endif - } - __Pyx_PyFrame_SetLineNumber(*frame, firstlineno); - retval = 1; - tstate->tracing++; - tstate->use_tracing = 0; - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); - #if CYTHON_TRACE - if (tstate->c_tracefunc) - retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0; - if (retval && tstate->c_profilefunc) - #endif - retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0; - tstate->use_tracing = (tstate->c_profilefunc || - (CYTHON_TRACE && tstate->c_tracefunc)); - tstate->tracing--; - if (retval) { - __Pyx_ErrRestoreInState(tstate, type, value, traceback); - return tstate->use_tracing && retval; - } else { - Py_XDECREF(type); - Py_XDECREF(value); - Py_XDECREF(traceback); - return -1; - } -} -static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) { - PyObject *py_srcfile = 0; - PyObject *py_funcname = 0; - PyCodeObject *py_code = 0; - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); - py_srcfile = PyString_FromString(srcfile); - #else - py_funcname = PyUnicode_FromString(funcname); - py_srcfile = PyUnicode_FromString(srcfile); - #endif - if (!py_funcname | !py_srcfile) goto bad; - py_code = PyCode_New( - 0, - #if PY_MAJOR_VERSION >= 3 - 0, - #endif - 0, - 0, - CO_OPTIMIZED | CO_NEWLOCALS, - __pyx_empty_bytes, /*PyObject *code,*/ - __pyx_empty_tuple, /*PyObject *consts,*/ - __pyx_empty_tuple, /*PyObject *names,*/ - __pyx_empty_tuple, /*PyObject *varnames,*/ - __pyx_empty_tuple, /*PyObject *freevars,*/ - __pyx_empty_tuple, /*PyObject *cellvars,*/ - py_srcfile, /*PyObject *filename,*/ - py_funcname, /*PyObject *name,*/ - firstlineno, - __pyx_empty_bytes /*PyObject *lnotab*/ - ); -bad: - Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); - return py_code; -} -#endif - /* GetItemInt */ static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; @@ -6521,7 +6035,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_ if (wraparound & unlikely(i < 0)) { wrapped_i += PyList_GET_SIZE(o); } - if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyList_GET_SIZE(o)))) { + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; @@ -6539,7 +6053,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize if (wraparound & unlikely(i < 0)) { wrapped_i += PyTuple_GET_SIZE(o); } - if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyTuple_GET_SIZE(o)))) { + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; @@ -6555,7 +6069,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); - if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { + if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; @@ -6563,7 +6077,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); - if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; @@ -6606,13 +6120,29 @@ static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr } #endif +/* GetTopmostException */ +#if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + /* SaveResetException */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { - #if PY_VERSION_HEX >= 0x030700A3 - *type = tstate->exc_state.exc_type; - *value = tstate->exc_state.exc_value; - *tb = tstate->exc_state.exc_traceback; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; #else *type = tstate->exc_type; *value = tstate->exc_value; @@ -6624,13 +6154,14 @@ static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject * } static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; - #if PY_VERSION_HEX >= 0x030700A3 - tmp_type = tstate->exc_state.exc_type; - tmp_value = tstate->exc_state.exc_value; - tmp_tb = tstate->exc_state.exc_traceback; - tstate->exc_state.exc_type = type; - tstate->exc_state.exc_value = value; - tstate->exc_state.exc_traceback = tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; @@ -6672,10 +6203,11 @@ static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tsta /* GetException */ #if CYTHON_FAST_THREAD_STATE -static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) #else -static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) #endif +{ PyObject *local_type, *local_value, *local_tb; #if CYTHON_FAST_THREAD_STATE PyObject *tmp_type, *tmp_value, *tmp_tb; @@ -6708,13 +6240,16 @@ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) *value = local_value; *tb = local_tb; #if CYTHON_FAST_THREAD_STATE - #if PY_VERSION_HEX >= 0x030700A3 - tmp_type = tstate->exc_state.exc_type; - tmp_value = tstate->exc_state.exc_value; - tmp_tb = tstate->exc_state.exc_traceback; - tstate->exc_state.exc_type = local_type; - tstate->exc_state.exc_value = local_value; - tstate->exc_state.exc_traceback = local_tb; + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + } #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; @@ -6741,14 +6276,14 @@ bad: } /* PyCFunctionFastCall */ - #if CYTHON_FAST_PYCCALL +#if CYTHON_FAST_PYCCALL static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { PyCFunctionObject *func = (PyCFunctionObject*)func_obj; PyCFunction meth = PyCFunction_GET_FUNCTION(func); PyObject *self = PyCFunction_GET_SELF(func); int flags = PyCFunction_GET_FLAGS(func); assert(PyCFunction_Check(func)); - assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS))); + assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); assert(nargs >= 0); assert(nargs == 0 || args != NULL); /* _PyCFunction_FastCallDict() must not be called with an exception set, @@ -6756,16 +6291,15 @@ static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, P caller loses its exception */ assert(!PyErr_Occurred()); if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { - return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL); + return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); } else { - return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs); + return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); } } #endif /* PyFunctionFastCall */ - #if CYTHON_FAST_PYCALL -#include "frameobject.h" +#if CYTHON_FAST_PYCALL static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, PyObject *globals) { PyFrameObject *f; @@ -6783,7 +6317,7 @@ static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args if (f == NULL) { return NULL; } - fastlocals = f->f_localsplus; + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); for (i = 0; i < na; i++) { Py_INCREF(*args); fastlocals[i] = *args++; @@ -6884,7 +6418,7 @@ done: #endif /* PyObjectCall */ - #if CYTHON_COMPILING_IN_CPYTHON +#if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; ternaryfunc call = func->ob_type->tp_call; @@ -6904,7 +6438,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg #endif /* PyObjectCallMethO */ - #if CYTHON_COMPILING_IN_CPYTHON +#if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; PyCFunction cfunc; @@ -6924,7 +6458,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject #endif /* PyObjectCallOneArg */ - #if CYTHON_COMPILING_IN_CPYTHON +#if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *result; PyObject *args = PyTuple_New(1); @@ -6963,8 +6497,32 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec } #endif +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +} +#endif + /* RaiseException */ - #if PY_MAJOR_VERSION < 3 +#if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { __Pyx_PyThreadState_declare @@ -7123,7 +6681,7 @@ bad: #endif /* PyObjectCallNoArg */ - #if CYTHON_COMPILING_IN_CPYTHON +#if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { #if CYTHON_FAST_PYCALL if (PyFunction_Check(func)) { @@ -7131,10 +6689,11 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { } #endif #ifdef __Pyx_CyFunction_USED - if (likely(PyCFunction_Check(func) || __Pyx_TypeCheck(func, __pyx_CyFunctionType))) { + if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func))) #else - if (likely(PyCFunction_Check(func))) { + if (likely(PyCFunction_Check(func))) #endif + { if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { return __Pyx_PyObject_CallMethO(func, NULL); } @@ -7144,20 +6703,20 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { #endif /* RaiseTooManyValuesToUnpack */ - static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); } /* RaiseNeedMoreValuesToUnpack */ - static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", index, (index == 1) ? "" : "s"); } /* IterFinish */ - static CYTHON_INLINE int __Pyx_IterFinish(void) { +static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_FAST_THREAD_STATE PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject* exc_type = tstate->curexc_type; @@ -7192,7 +6751,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { } /* UnpackItemEndCheck */ - static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { if (unlikely(retval)) { Py_DECREF(retval); __Pyx_RaiseTooManyValuesError(expected); @@ -7204,39 +6763,47 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { } /* GetModuleGlobalName */ - static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ PyObject *result; #if !CYTHON_AVOID_BORROWED_REFS #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { - Py_INCREF(result); + return __Pyx_NewRef(result); } else if (unlikely(PyErr_Occurred())) { - result = NULL; - } else { + return NULL; + } #else result = PyDict_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { - Py_INCREF(result); - } else { + return __Pyx_NewRef(result); + } #endif #else result = PyObject_GetItem(__pyx_d, name); - if (!result) { - PyErr_Clear(); -#endif - result = __Pyx_GetBuiltinName(name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); } - return result; + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); } /* None */ - static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { +static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); } /* ObjectGetItem */ - #if CYTHON_USE_TYPE_SLOTS +#if CYTHON_USE_TYPE_SLOTS static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) { PyObject *runerr; Py_ssize_t key_value; @@ -7265,7 +6832,7 @@ static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) { #endif /* FetchCommonType */ - static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* fake_module; PyTypeObject* cached_type = NULL; fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); @@ -7304,7 +6871,7 @@ bad: } /* CythonFunction */ - #include +#include static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) { @@ -7326,7 +6893,7 @@ __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure return op->func_doc; } static int -__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value) +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp = op->func_doc; if (value == NULL) { @@ -7338,7 +6905,7 @@ __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value) return 0; } static PyObject * -__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { if (unlikely(op->func_name == NULL)) { #if PY_MAJOR_VERSION >= 3 @@ -7353,14 +6920,15 @@ __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op) return op->func_name; } static int -__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value) +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 - if (unlikely(value == NULL || !PyUnicode_Check(value))) { + if (unlikely(value == NULL || !PyUnicode_Check(value))) #else - if (unlikely(value == NULL || !PyString_Check(value))) { + if (unlikely(value == NULL || !PyString_Check(value))) #endif + { PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; @@ -7372,20 +6940,21 @@ __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value) return 0; } static PyObject * -__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(op->func_qualname); return op->func_qualname; } static int -__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value) +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 - if (unlikely(value == NULL || !PyUnicode_Check(value))) { + if (unlikely(value == NULL || !PyUnicode_Check(value))) #else - if (unlikely(value == NULL || !PyString_Check(value))) { + if (unlikely(value == NULL || !PyString_Check(value))) #endif + { PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; @@ -7407,7 +6976,7 @@ __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure return self; } static PyObject * -__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); @@ -7418,7 +6987,7 @@ __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op) return op->func_dict; } static int -__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value) +__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; if (unlikely(value == NULL)) { @@ -7438,19 +7007,19 @@ __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value) return 0; } static PyObject * -__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(op->func_globals); return op->func_globals; } static PyObject * -__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(Py_None); return Py_None; } static PyObject * -__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = (op->func_code) ? op->func_code : Py_None; Py_INCREF(result); @@ -7479,7 +7048,7 @@ __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { return result; } static int -__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) { +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value) { value = Py_None; @@ -7495,7 +7064,7 @@ __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) { return 0; } static PyObject * -__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) { +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->defaults_tuple; if (unlikely(!result)) { if (op->defaults_getter) { @@ -7509,7 +7078,7 @@ __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) { return result; } static int -__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) { +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value) { value = Py_None; @@ -7525,7 +7094,7 @@ __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) { return 0; } static PyObject * -__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) { +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->defaults_kwdict; if (unlikely(!result)) { if (op->defaults_getter) { @@ -7539,7 +7108,7 @@ __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) { return result; } static int -__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) { +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value || value == Py_None) { value = NULL; @@ -7555,7 +7124,7 @@ __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) { return 0; } static PyObject * -__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) { +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->func_annotations; if (unlikely(!result)) { result = PyDict_New(); @@ -7735,7 +7304,7 @@ static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, Py return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: - return (*(PyCFunctionWithKeywords)meth)(self, arg, kw); + return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { size = PyTuple_GET_SIZE(arg); @@ -7898,7 +7467,7 @@ static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, Py } /* BytesEquals */ - static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else @@ -7945,7 +7514,7 @@ static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, Py } /* UnicodeEquals */ - static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else @@ -8047,16 +7616,21 @@ return_ne: } /* DictGetItem */ - #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY +#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { PyObject *value; value = PyDict_GetItemWithError(d, key); if (unlikely(!value)) { if (!PyErr_Occurred()) { - PyObject* args = PyTuple_Pack(1, key); - if (likely(args)) - PyErr_SetObject(PyExc_KeyError, args); - Py_XDECREF(args); + if (unlikely(PyTuple_Check(key))) { + PyObject* args = PyTuple_Pack(1, key); + if (likely(args)) { + PyErr_SetObject(PyExc_KeyError, args); + Py_DECREF(args); + } + } else { + PyErr_SetObject(PyExc_KeyError, key); + } } return NULL; } @@ -8066,7 +7640,7 @@ static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { #endif /* UnpackUnboundCMethod */ - static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { PyObject *method; method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); if (unlikely(!method)) @@ -8079,14 +7653,14 @@ static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { { PyMethodDescrObject *descr = (PyMethodDescrObject*) method; target->func = descr->d_method->ml_meth; - target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST); + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); } #endif return 0; } /* CallUnboundCMethod1 */ - #if CYTHON_COMPILING_IN_CPYTHON +#if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) { if (likely(cfunc->func)) { int flag = cfunc->flag; @@ -8094,12 +7668,12 @@ static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* return (*(cfunc->func))(self, arg); } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) { if (PY_VERSION_HEX >= 0x030700A0) { - return (*(__Pyx_PyCFunctionFast)cfunc->func)(self, &arg, 1); + return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1); } else { - return (*(__Pyx_PyCFunctionFastWithKeywords)cfunc->func)(self, &arg, 1, NULL); + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); } } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) { - return (*(__Pyx_PyCFunctionFastWithKeywords)cfunc->func)(self, &arg, 1, NULL); + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); } } return __Pyx__CallUnboundCMethod1(cfunc, self, arg); @@ -8115,7 +7689,7 @@ static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObje Py_INCREF(arg); PyTuple_SET_ITEM(args, 0, arg); if (cfunc->flag & METH_KEYWORDS) - result = (*(PyCFunctionWithKeywords)cfunc->func)(self, args, NULL); + result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); else result = (*cfunc->func)(self, args); } else { @@ -8138,20 +7712,20 @@ bad: } /* CallUnboundCMethod2 */ - #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1 +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1 static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { if (likely(cfunc->func)) { PyObject *args[2] = {arg1, arg2}; if (cfunc->flag == METH_FASTCALL) { #if PY_VERSION_HEX >= 0x030700A0 - return (*(__Pyx_PyCFunctionFast)cfunc->func)(self, args, 2); + return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2); #else - return (*(__Pyx_PyCFunctionFastWithKeywords)cfunc->func)(self, args, 2, NULL); + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL); #endif } #if PY_VERSION_HEX >= 0x030700A0 if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) - return (*(__Pyx_PyCFunctionFastWithKeywords)cfunc->func)(self, args, 2, NULL); + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL); #endif } return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); @@ -8169,7 +7743,7 @@ static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObje Py_INCREF(arg2); PyTuple_SET_ITEM(args, 1, arg2); if (cfunc->flag & METH_KEYWORDS) - result = (*(PyCFunctionWithKeywords)cfunc->func)(self, args, NULL); + result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); else result = (*cfunc->func)(self, args); } else { @@ -8194,7 +7768,7 @@ bad: } /* dict_getitem_default */ - static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { +static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { PyObject* value; #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY value = PyDict_GetItemWithError(d, key); @@ -8223,59 +7797,151 @@ bad: return value; } -/* PyObjectCallMethod1 */ - static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { - PyObject *result = NULL; -#if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(method))) { - PyObject *self = PyMethod_GET_SELF(method); - if (likely(self)) { - PyObject *args; - PyObject *function = PyMethod_GET_FUNCTION(method); - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(function)) { - PyObject *args[2] = {self, arg}; - result = __Pyx_PyFunction_FastCall(function, args, 2); - goto done; - } - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(function)) { - PyObject *args[2] = {self, arg}; - result = __Pyx_PyCFunction_FastCall(function, args, 2); - goto done; +/* PyObjectCall2Args */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args, *result = NULL; + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyFunction_FastCall(function, args, 2); + } + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyCFunction_FastCall(function, args, 2); + } + #endif + args = PyTuple_New(2); + if (unlikely(!args)) goto done; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + Py_INCREF(function); + result = __Pyx_PyObject_Call(function, args, NULL); + Py_DECREF(args); + Py_DECREF(function); +done: + return result; +} + +/* PyObjectGetMethod */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if PY_MAJOR_VERSION >= 3 + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type))) + #endif +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; } - #endif - args = PyTuple_New(2); - if (unlikely(!args)) goto done; - Py_INCREF(self); - PyTuple_SET_ITEM(args, 0, self); - Py_INCREF(arg); - PyTuple_SET_ITEM(args, 1, arg); - Py_INCREF(function); - result = __Pyx_PyObject_Call(function, args, NULL); - Py_DECREF(args); - Py_DECREF(function); - return result; } } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (descr != NULL) { + *method = descr; + return 0; + } + PyErr_Format(PyExc_AttributeError, +#if PY_MAJOR_VERSION >= 3 + "'%.50s' object has no attribute '%U'", + tp->tp_name, name); +#else + "'%.50s' object has no attribute '%.400s'", + tp->tp_name, PyString_AS_STRING(name)); #endif - result = __Pyx_PyObject_CallOneArg(method, arg); - goto done; -done: + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} + +/* PyObjectCallMethod1 */ +static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { + PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); + Py_DECREF(method); return result; } static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { - PyObject *method, *result; - method = __Pyx_PyObject_GetAttrStr(obj, method_name); + PyObject *method = NULL, *result; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_Call2Args(method, obj, arg); + Py_DECREF(method); + return result; + } if (unlikely(!method)) return NULL; - result = __Pyx__PyObject_CallMethod1(method, arg); - Py_DECREF(method); - return result; + return __Pyx__PyObject_CallMethod1(method, arg); } /* append */ - static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { if (likely(PyList_CheckExact(L))) { if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; } else { @@ -8288,7 +7954,7 @@ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name } /* GetAttr */ - static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { #if CYTHON_USE_TYPE_SLOTS #if PY_MAJOR_VERSION >= 3 if (likely(PyUnicode_Check(n))) @@ -8301,7 +7967,7 @@ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name } /* GetAttr3 */ - static PyObject *__Pyx_GetAttr3Default(PyObject *d) { +static PyObject *__Pyx_GetAttr3Default(PyObject *d) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) @@ -8316,7 +7982,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject } /* Import */ - static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; @@ -8363,7 +8029,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, - name, global_dict, empty_dict, list, py_level, NULL); + name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( @@ -8381,7 +8047,7 @@ bad: } /* ImportFrom */ - static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Format(PyExc_ImportError, @@ -8395,7 +8061,7 @@ bad: } /* HasAttr */ - static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { PyObject *r; if (unlikely(!__Pyx_PyBaseString_Check(n))) { PyErr_SetString(PyExc_TypeError, @@ -8413,7 +8079,7 @@ bad: } /* PyObject_GenericGetAttrNoDict */ - #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 @@ -8453,7 +8119,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj #endif /* PyObject_GenericGetAttr */ - #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { return PyObject_GenericGetAttr(obj, attr_name); @@ -8463,7 +8129,7 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam #endif /* SetupReduce */ - static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { +static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { int ret; PyObject *name_attr; name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name); @@ -8538,26 +8204,8 @@ GOOD: return ret; } -/* ModuleImport */ - #ifndef __PYX_HAVE_RT_ImportModule -#define __PYX_HAVE_RT_ImportModule -static PyObject *__Pyx_ImportModule(const char *name) { - PyObject *py_name = 0; - PyObject *py_module = 0; - py_name = __Pyx_PyIdentifier_FromString(name); - if (!py_name) - goto bad; - py_module = PyImport_Import(py_name); - Py_DECREF(py_name); - return py_module; -bad: - Py_XDECREF(py_name); - return 0; -} -#endif - /* RegisterModuleCleanup */ - #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY +#if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY static PyObject* __pyx_module_cleanup_atexit(PyObject *module, CYTHON_UNUSED PyObject *unused) { __pyx_module_cleanup(module); Py_INCREF(Py_None); return Py_None; @@ -8574,7 +8222,7 @@ static int __Pyx_RegisterCleanup(void) { cleanup_func = PyCFunction_New(&cleanup_def, 0); if (!cleanup_func) goto bad; - atexit = __Pyx_ImportModule("atexit"); + atexit = PyImport_ImportModule("atexit"); if (!atexit) goto bad; reg = PyObject_GetAttrString(atexit, "_exithandlers"); @@ -8616,16 +8264,11 @@ bad: Py_XDECREF(res); return ret; } -#else -static int __Pyx_RegisterCleanup(void) { - (void)__Pyx_ImportModule; - return 0; -} #endif /* CLineInTraceback */ - #ifndef CYTHON_CLINE_IN_TRACEBACK -static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) { +#ifndef CYTHON_CLINE_IN_TRACEBACK +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON @@ -8638,7 +8281,9 @@ static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_li #if CYTHON_COMPILING_IN_CPYTHON cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); if (likely(cython_runtime_dict)) { - use_cline = __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback); + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) } else #endif { @@ -8655,7 +8300,7 @@ static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_li c_line = 0; PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); } - else if (PyObject_Not(use_cline) != 0) { + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { c_line = 0; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); @@ -8664,7 +8309,7 @@ static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_li #endif /* CodeObjectCache */ - static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; @@ -8744,7 +8389,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { } /* AddTraceback */ - #include "compile.h" +#include "compile.h" #include "frameobject.h" #include "traceback.h" static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( @@ -8829,7 +8474,7 @@ bad: } /* CIntFromPyVerify */ - #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) @@ -8851,8 +8496,8 @@ bad: } /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { - const long neg_one = (long) -1, const_zero = (long) 0; +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { @@ -8882,8 +8527,8 @@ bad: } /* CIntFromPy */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - const long neg_one = (long) -1, const_zero = (long) 0; +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { @@ -9071,8 +8716,8 @@ raise_neg_overflow: } /* CIntFromPy */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - const int neg_one = (int) -1, const_zero = (int) 0; +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { + const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { @@ -9260,7 +8905,7 @@ raise_neg_overflow: } /* FastTypeChecks */ - #if CYTHON_COMPILING_IN_CPYTHON +#if CYTHON_COMPILING_IN_CPYTHON static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { while (a) { a = a->tp_base; @@ -9360,7 +9005,7 @@ static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObj #endif /* CheckBinaryVersion */ - static int __Pyx_check_binary_version(void) { +static int __Pyx_check_binary_version(void) { char ctversion[4], rtversion[4]; PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion()); @@ -9376,7 +9021,7 @@ static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObj } /* VoidPtrExport */ - static int __Pyx_ExportVoidPtr(PyObject *name, void *p, const char *sig) { +static int __Pyx_ExportVoidPtr(PyObject *name, void *p, const char *sig) { PyObject *d; PyObject *cobj = 0; d = PyDict_GetItem(__pyx_d, __pyx_n_s_pyx_capi); @@ -9407,7 +9052,7 @@ bad: } /* InitStrings */ - static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { +static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 if (t->is_unicode) { @@ -9516,6 +9161,13 @@ static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { #if PY_MAJOR_VERSION >= 3 if (PyLong_Check(result)) { @@ -9593,7 +9245,7 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else - return PyInt_AsSsize_t(x); + return PyInt_AsSsize_t(b); } #endif if (likely(PyLong_CheckExact(b))) { diff --git a/src/lxml/builder.pxd b/src/lxml/builder.pxd index cc8a9b3..f6b2fb5 100644 --- a/src/lxml/builder.pxd +++ b/src/lxml/builder.pxd @@ -1,3 +1,4 @@ +# cython: language_level=2 cdef object ET cdef object partial diff --git a/src/lxml/builder.py b/src/lxml/builder.py index 9c4431a..a288845 100644 --- a/src/lxml/builder.py +++ b/src/lxml/builder.py @@ -1,3 +1,5 @@ +# cython: language_level=2 + # # Element generator factory by Fredrik Lundh. # @@ -37,6 +39,8 @@ The ``E`` Element factory for generating XML documents. """ +from __future__ import absolute_import + import lxml.etree as ET from functools import partial diff --git a/src/lxml/classlookup.pxi b/src/lxml/classlookup.pxi index f4f15f3..8930225 100644 --- a/src/lxml/classlookup.pxi +++ b/src/lxml/classlookup.pxi @@ -196,7 +196,7 @@ cdef int _validateNodeClass(xmlNode* c_node, cls) except -1: elif c_node.type == tree.XML_PI_NODE: expected = PIBase else: - assert 0, f"Unknown node type: {c_node.type}" + assert False, f"Unknown node type: {c_node.type}" if not (isinstance(cls, type) and issubclass(cls, expected)): raise TypeError( @@ -333,7 +333,7 @@ cdef object _lookupDefaultElementClass(state, _Document _doc, xmlNode* c_node): else: return (state).pi_class else: - assert 0, f"Unknown node type: {c_node.type}" + assert False, f"Unknown node type: {c_node.type}" ################################################################################ diff --git a/src/lxml/doctestcompare.py b/src/lxml/doctestcompare.py index eb7c7f9..1b0daa4 100644 --- a/src/lxml/doctestcompare.py +++ b/src/lxml/doctestcompare.py @@ -209,13 +209,12 @@ class LXMLOutputChecker(OutputChecker): else: return value html = parser is html_fromstring - diff_parts = [] - diff_parts.append('Expected:') - diff_parts.append(self.format_doc(want_doc, html, 2)) - diff_parts.append('Got:') - diff_parts.append(self.format_doc(got_doc, html, 2)) - diff_parts.append('Diff:') - diff_parts.append(self.collect_diff(want_doc, got_doc, html, 2)) + diff_parts = ['Expected:', + self.format_doc(want_doc, html, 2), + 'Got:', + self.format_doc(got_doc, html, 2), + 'Diff:', + self.collect_diff(want_doc, got_doc, html, 2)] return '\n'.join(diff_parts) def html_empty_tag(self, el, html=True): diff --git a/src/lxml/etree.c b/src/lxml/etree.c index ebfda38..4b486f4 100644 --- a/src/lxml/etree.c +++ b/src/lxml/etree.c @@ -1,95 +1,94 @@ -/* Generated by Cython 0.28.5 */ +/* Generated by Cython 0.29.2 */ /* BEGIN: Cython Metadata { "distutils": { "define_macros": [ [ - "CYTHON_TRACE_NOGIL", - "1" - ], - [ - "CYTHON_CLINE_IN_TRACEBACK", + "CYTHON_CLINE_IN_TRACEBACK", "0" ] - ], + ], "depends": [ - "/usr/include/libxml2/libxml/HTMLtree.h", - "/usr/include/libxml2/libxml/chvalid.h", - "/usr/include/libxml2/libxml/encoding.h", - "/usr/include/libxml2/libxml/globals.h", - "/usr/include/libxml2/libxml/hash.h", - "/usr/include/libxml2/libxml/tree.h", - "/usr/include/libxml2/libxml/uri.h", - "/usr/include/libxml2/libxml/valid.h", - "/usr/include/libxml2/libxml/xmlIO.h", - "/usr/include/libxml2/libxml/xmlmemory.h", - "/usr/include/libxml2/libxml/xmlsave.h", - "/usr/include/libxml2/libxml/xmlstring.h", - "/usr/include/libxml2/libxml/xmlversion.h", - "src/lxml/apihelpers.pxi", - "src/lxml/classlookup.pxi", - "src/lxml/cleanup.pxi", - "src/lxml/debug.pxi", - "src/lxml/docloader.pxi", - "src/lxml/dtd.pxi", - "src/lxml/extensions.pxi", - "src/lxml/includes/__init__.pxd", - "src/lxml/includes/c14n.pxd", - "src/lxml/includes/config.pxd", - "src/lxml/includes/dtdvalid.pxd", - "src/lxml/includes/etree_defs.h", - "src/lxml/includes/htmlparser.pxd", - "src/lxml/includes/lxml-version.h", - "src/lxml/includes/relaxng.pxd", - "src/lxml/includes/schematron.pxd", - "src/lxml/includes/tree.pxd", - "src/lxml/includes/uri.pxd", - "src/lxml/includes/xinclude.pxd", - "src/lxml/includes/xmlerror.pxd", - "src/lxml/includes/xmlparser.pxd", - "src/lxml/includes/xmlschema.pxd", - "src/lxml/includes/xpath.pxd", - "src/lxml/includes/xslt.pxd", - "src/lxml/iterparse.pxi", - "src/lxml/lxml_endian.h", - "src/lxml/nsclasses.pxi", - "src/lxml/parser.pxi", - "src/lxml/parsertarget.pxi", - "src/lxml/proxy.pxi", - "src/lxml/public-api.pxi", - "src/lxml/readonlytree.pxi", - "src/lxml/relaxng.pxi", - "src/lxml/saxparser.pxi", - "src/lxml/schematron.pxi", - "src/lxml/serializer.pxi", - "src/lxml/xinclude.pxi", - "src/lxml/xmlerror.pxi", - "src/lxml/xmlid.pxi", - "src/lxml/xmlschema.pxi", - "src/lxml/xpath.pxi", - "src/lxml/xslt.pxi", + "/usr/include/libxml2/libxml/HTMLtree.h", + "/usr/include/libxml2/libxml/chvalid.h", + "/usr/include/libxml2/libxml/encoding.h", + "/usr/include/libxml2/libxml/globals.h", + "/usr/include/libxml2/libxml/hash.h", + "/usr/include/libxml2/libxml/tree.h", + "/usr/include/libxml2/libxml/uri.h", + "/usr/include/libxml2/libxml/valid.h", + "/usr/include/libxml2/libxml/xmlIO.h", + "/usr/include/libxml2/libxml/xmlmemory.h", + "/usr/include/libxml2/libxml/xmlsave.h", + "/usr/include/libxml2/libxml/xmlstring.h", + "/usr/include/libxml2/libxml/xmlversion.h", + "src/lxml/apihelpers.pxi", + "src/lxml/classlookup.pxi", + "src/lxml/cleanup.pxi", + "src/lxml/debug.pxi", + "src/lxml/docloader.pxi", + "src/lxml/dtd.pxi", + "src/lxml/extensions.pxi", + "src/lxml/includes/__init__.pxd", + "src/lxml/includes/c14n.pxd", + "src/lxml/includes/config.pxd", + "src/lxml/includes/dtdvalid.pxd", + "src/lxml/includes/etree_defs.h", + "src/lxml/includes/htmlparser.pxd", + "src/lxml/includes/lxml-version.h", + "src/lxml/includes/relaxng.pxd", + "src/lxml/includes/schematron.pxd", + "src/lxml/includes/tree.pxd", + "src/lxml/includes/uri.pxd", + "src/lxml/includes/xinclude.pxd", + "src/lxml/includes/xmlerror.pxd", + "src/lxml/includes/xmlparser.pxd", + "src/lxml/includes/xmlschema.pxd", + "src/lxml/includes/xpath.pxd", + "src/lxml/includes/xslt.pxd", + "src/lxml/iterparse.pxi", + "src/lxml/lxml_endian.h", + "src/lxml/nsclasses.pxi", + "src/lxml/parser.pxi", + "src/lxml/parsertarget.pxi", + "src/lxml/proxy.pxi", + "src/lxml/public-api.pxi", + "src/lxml/readonlytree.pxi", + "src/lxml/relaxng.pxi", + "src/lxml/saxparser.pxi", + "src/lxml/schematron.pxi", + "src/lxml/serializer.pxi", + "src/lxml/xinclude.pxi", + "src/lxml/xmlerror.pxi", + "src/lxml/xmlid.pxi", + "src/lxml/xmlschema.pxi", + "src/lxml/xpath.pxi", + "src/lxml/xslt.pxi", "src/lxml/xsltext.pxi" - ], + ], + "extra_compile_args": [ + "-w" + ], "include_dirs": [ - "src/lxml", - "src/lxml/includes", - "/usr/include/libxml2", + "src/lxml", + "src/lxml/includes", + "/usr/include/libxml2", "src" - ], + ], "libraries": [ - "xslt", - "exslt", - "xml2", - "rt", - "z", + "xslt", + "exslt", + "xml2", + "rt", + "z", "m" - ], - "name": "lxml.etree", + ], + "name": "lxml.etree", "sources": [ "src/lxml/etree.pyx" ] - }, + }, "module_name": "lxml.etree" } END: Cython Metadata */ @@ -101,7 +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_28_5" +#define CYTHON_ABI "0_29_2" +#define CYTHON_HEX_VERSION 0x001D02F0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof @@ -172,6 +172,10 @@ END: Cython Metadata */ #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 #elif defined(PYSTON_VERSION) #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 1 @@ -209,6 +213,10 @@ END: Cython Metadata */ #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 0 @@ -262,11 +270,17 @@ END: Cython Metadata */ #define CYTHON_FAST_PYCALL 1 #endif #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (0 && PY_VERSION_HEX >= 0x03050000) + #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) #endif #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) #endif + #ifndef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) + #endif #endif #if !defined(CYTHON_FAST_PYCCALL) #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) @@ -276,6 +290,9 @@ END: Cython Metadata */ #undef SHIFT #undef BASE #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif #endif #ifndef __has_attribute #define __has_attribute(x) 0 @@ -402,6 +419,9 @@ END: Cython Metadata */ #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) #ifndef METH_FASTCALL #define METH_FASTCALL 0x80 @@ -415,15 +435,40 @@ END: Cython Metadata */ #endif #if CYTHON_FAST_PYCCALL #define __Pyx_PyFastCFunction_Check(func)\ - ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS))))) + ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))))) #else #define __Pyx_PyFastCFunction_Check(func) 0 #endif +#if CYTHON_USE_DICT_VERSIONS +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ + } +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) #define PyObject_Malloc(s) PyMem_Malloc(s) #define PyObject_Free(p) PyMem_Free(p) #define PyObject_Realloc(p) PyMem_Realloc(p) #endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 + #define PyMem_RawMalloc(n) PyMem_Malloc(n) + #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) + #define PyMem_RawFree(p) PyMem_Free(p) +#endif #if CYTHON_COMPILING_IN_PYSTON #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) @@ -531,8 +576,8 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) #endif -#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) -#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else @@ -731,6 +776,9 @@ typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* enc (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) @@ -789,6 +837,7 @@ static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); #define __Pyx_PySequence_Tuple(obj)\ (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) @@ -869,7 +918,7 @@ static int __Pyx_init_sys_getdefaultencoding_params(void) { if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; - __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); + __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); @@ -915,6 +964,7 @@ static const char *__pyx_f[] = { "src/lxml/readonlytree.pxi", "src/lxml/classlookup.pxi", "src/lxml/serializer.pxi", + "src/lxml/extensions.pxi", "src/lxml/nsclasses.pxi", "src/lxml/docloader.pxi", "src/lxml/saxparser.pxi", @@ -923,7 +973,6 @@ static const char *__pyx_f[] = { "src/lxml/xmlid.pxi", "src/lxml/xinclude.pxi", "src/lxml/cleanup.pxi", - "src/lxml/extensions.pxi", "src/lxml/xpath.pxi", "src/lxml/xsltext.pxi", "src/lxml/dtd.pxi", @@ -1213,7 +1262,7 @@ enum __pyx_t_4lxml_5etree__IterwalkSkipStates { __pyx_e_4lxml_5etree_IWSKIP_CANNOT_SKIP }; -/* "lxml/etree.pyx":141 +/* "lxml/etree.pyx":139 * # PyPy requires us to store a Python reference for the * # namespace in order to keep the byte buffer alive. * cdef struct qname: # <<<<<<<<<<<<<< @@ -1225,7 +1274,7 @@ struct __pyx_t_4lxml_5etree_qname { PyObject *href; }; -/* "lxml/etree.pyx":320 +/* "lxml/etree.pyx":318 * * # type of a function that steps from node to node * ctypedef public xmlNode* (*_node_to_node_function)(xmlNode*) # <<<<<<<<<<<<<< @@ -1272,7 +1321,7 @@ struct __pyx_opt_args_4lxml_5etree__adoptForeignDoc { int is_owned; }; -/* "src/lxml/apihelpers.pxi":322 +/* "src/lxml/apihelpers.pxi":321 * * * ctypedef struct _ns_node_ref: # <<<<<<<<<<<<<< @@ -1296,7 +1345,7 @@ struct __pyx_opt_args_4lxml_5etree__connectGenericErrorLog { int c_domain; }; -/* "lxml/etree.pyx":2727 +/* "lxml/etree.pyx":2725 * self._storeTags(item, seen) * * cdef inline int cacheTags(self, _Document doc, bint force_into_dict=False) except -1: # <<<<<<<<<<<<<< @@ -1326,7 +1375,7 @@ typedef PyObject *(*_element_class_lookup_function)(PyObject *, struct LxmlDocum */ typedef int (*__pyx_t_4lxml_5etree__register_function)(void *, PyObject *, PyObject *); -/* "lxml/etree.pyx":194 +/* "lxml/etree.pyx":192 * * # Error superclass for ElementTree compatibility * cdef class Error(Exception): # <<<<<<<<<<<<<< @@ -1338,7 +1387,7 @@ struct __pyx_obj_4lxml_5etree_Error { }; -/* "lxml/etree.pyx":198 +/* "lxml/etree.pyx":196 * * # module level superclass for all exceptions * cdef class LxmlError(Error): # <<<<<<<<<<<<<< @@ -1350,7 +1399,7 @@ struct __pyx_obj_4lxml_5etree_LxmlError { }; -/* "lxml/etree.pyx":217 +/* "lxml/etree.pyx":215 * """ * * cdef class C14NError(LxmlError): # <<<<<<<<<<<<<< @@ -1362,7 +1411,7 @@ struct __pyx_obj_4lxml_5etree_C14NError { }; -/* "lxml/etree.pyx":271 +/* "lxml/etree.pyx":269 * @cython.final * @cython.internal * cdef class _TempStore: # <<<<<<<<<<<<<< @@ -1376,7 +1425,7 @@ struct __pyx_obj_4lxml_5etree__TempStore { }; -/* "lxml/etree.pyx":287 +/* "lxml/etree.pyx":285 * # class for temporarily storing exceptions raised in extensions * @cython.internal * cdef class _ExceptionContext: # <<<<<<<<<<<<<< @@ -1513,7 +1562,7 @@ struct __pyx_obj_4lxml_5etree_PyErrorLog { }; -/* "lxml/etree.pyx":336 +/* "lxml/etree.pyx":334 * @cython.final * @cython.freelist(8) * cdef public class _Document [ type LxmlDocumentType, object LxmlDocument ]: # <<<<<<<<<<<<<< @@ -1531,7 +1580,7 @@ struct LxmlDocument { __PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlDocumentType; -/* "lxml/etree.pyx":510 +/* "lxml/etree.pyx":508 * * * cdef class DocInfo: # <<<<<<<<<<<<<< @@ -1545,7 +1594,7 @@ struct __pyx_obj_4lxml_5etree_DocInfo { }; -/* "lxml/etree.pyx":685 +/* "lxml/etree.pyx":683 * * @cython.no_gc_clear * cdef public class _Element [ type LxmlElementType, object LxmlElement ]: # <<<<<<<<<<<<<< @@ -1561,7 +1610,7 @@ struct LxmlElement { __PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementType; -/* "lxml/etree.pyx":1625 +/* "lxml/etree.pyx":1623 * * @cython.internal * cdef class __ContentOnlyElement(_Element): # <<<<<<<<<<<<<< @@ -1574,7 +1623,7 @@ struct __pyx_obj_4lxml_5etree___ContentOnlyElement { }; -/* "lxml/etree.pyx":1692 +/* "lxml/etree.pyx":1690 * return [] * * cdef class _Comment(__ContentOnlyElement): # <<<<<<<<<<<<<< @@ -1586,7 +1635,7 @@ struct __pyx_obj_4lxml_5etree__Comment { }; -/* "lxml/etree.pyx":1700 +/* "lxml/etree.pyx":1698 * return "" % strrepr(self.text) * * cdef class _ProcessingInstruction(__ContentOnlyElement): # <<<<<<<<<<<<<< @@ -1598,7 +1647,7 @@ struct __pyx_obj_4lxml_5etree__ProcessingInstruction { }; -/* "lxml/etree.pyx":1751 +/* "lxml/etree.pyx":1749 * cdef object _FIND_PI_ATTRIBUTES = re.compile(ur'\s+(\w+)\s*=\s*(?:\'([^\']*)\'|"([^"]*)")', re.U).findall * * cdef class _Entity(__ContentOnlyElement): # <<<<<<<<<<<<<< @@ -1610,7 +1659,7 @@ struct __pyx_obj_4lxml_5etree__Entity { }; -/* "lxml/etree.pyx":1780 +/* "lxml/etree.pyx":1778 * * * cdef class QName: # <<<<<<<<<<<<<< @@ -1625,7 +1674,7 @@ struct __pyx_obj_4lxml_5etree_QName { }; -/* "lxml/etree.pyx":1849 +/* "lxml/etree.pyx":1847 * * * cdef public class _ElementTree [ type LxmlElementTreeType, # <<<<<<<<<<<<<< @@ -1641,7 +1690,7 @@ struct LxmlElementTree { __PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementTreeType; -/* "lxml/etree.pyx":2397 +/* "lxml/etree.pyx":2395 * @cython.final * @cython.freelist(16) * cdef class _Attrib: # <<<<<<<<<<<<<< @@ -1654,7 +1703,7 @@ struct __pyx_obj_4lxml_5etree__Attrib { }; -/* "lxml/etree.pyx":2535 +/* "lxml/etree.pyx":2533 * @cython.final * @cython.internal * cdef class _AttribIterator: # <<<<<<<<<<<<<< @@ -1669,7 +1718,7 @@ struct __pyx_obj_4lxml_5etree__AttribIterator { }; -/* "lxml/etree.pyx":2576 +/* "lxml/etree.pyx":2574 * * * cdef public class _ElementTagMatcher [ object LxmlElementTagMatcher, # <<<<<<<<<<<<<< @@ -1687,7 +1736,7 @@ struct LxmlElementTagMatcher { __PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementTagMatcherType; -/* "lxml/etree.pyx":2607 +/* "lxml/etree.pyx":2605 * self._name = NULL * * cdef public class _ElementIterator(_ElementTagMatcher) [ # <<<<<<<<<<<<<< @@ -1702,7 +1751,7 @@ struct LxmlElementIterator { __PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementIteratorType; -/* "lxml/etree.pyx":2644 +/* "lxml/etree.pyx":2642 * @cython.final * @cython.internal * cdef class _MultiTagMatcher: # <<<<<<<<<<<<<< @@ -1721,7 +1770,7 @@ struct __pyx_obj_4lxml_5etree__MultiTagMatcher { }; -/* "lxml/etree.pyx":2781 +/* "lxml/etree.pyx":2779 * return False * * cdef class _ElementMatchIterator: # <<<<<<<<<<<<<< @@ -1737,7 +1786,7 @@ struct __pyx_obj_4lxml_5etree__ElementMatchIterator { }; -/* "lxml/etree.pyx":2810 +/* "lxml/etree.pyx":2808 * return current_node * * cdef class ElementChildIterator(_ElementMatchIterator): # <<<<<<<<<<<<<< @@ -1749,7 +1798,7 @@ struct __pyx_obj_4lxml_5etree_ElementChildIterator { }; -/* "lxml/etree.pyx":2830 +/* "lxml/etree.pyx":2828 * self._node = _elementFactory(node._doc, c_node) if c_node is not NULL else None * * cdef class SiblingsIterator(_ElementMatchIterator): # <<<<<<<<<<<<<< @@ -1761,7 +1810,7 @@ struct __pyx_obj_4lxml_5etree_SiblingsIterator { }; -/* "lxml/etree.pyx":2845 +/* "lxml/etree.pyx":2843 * self._storeNext(node) * * cdef class AncestorsIterator(_ElementMatchIterator): # <<<<<<<<<<<<<< @@ -1773,7 +1822,7 @@ struct __pyx_obj_4lxml_5etree_AncestorsIterator { }; -/* "lxml/etree.pyx":2855 +/* "lxml/etree.pyx":2853 * self._storeNext(node) * * cdef class ElementDepthFirstIterator: # <<<<<<<<<<<<<< @@ -1789,7 +1838,7 @@ struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator { }; -/* "lxml/etree.pyx":2931 +/* "lxml/etree.pyx":2929 * return NULL * * cdef class ElementTextIterator: # <<<<<<<<<<<<<< @@ -1803,7 +1852,7 @@ struct __pyx_obj_4lxml_5etree_ElementTextIterator { }; -/* "lxml/etree.pyx":3057 +/* "lxml/etree.pyx":3055 * * * cdef class CDATA: # <<<<<<<<<<<<<< @@ -2721,7 +2770,7 @@ struct __pyx_obj_4lxml_5etree_iterwalk { /* "src/lxml/xmlid.pxi":58 - * return (_elementTreeFactory(doc, None), _IDDict(doc)) + * return _elementTreeFactory(doc, None), _IDDict(doc) * * cdef class _IDDict: # <<<<<<<<<<<<<< * u"""IDDict(self, etree) @@ -3111,7 +3160,7 @@ struct __pyx_obj_4lxml_5etree_XSLTExtension { }; -/* "lxml/etree.pyx":3503 +/* "lxml/etree.pyx":3497 * # Validation * * cdef class DocumentInvalid(LxmlError): # <<<<<<<<<<<<<< @@ -3123,7 +3172,7 @@ struct __pyx_obj_4lxml_5etree_DocumentInvalid { }; -/* "lxml/etree.pyx":3511 +/* "lxml/etree.pyx":3505 * * * cdef class _Validator: # <<<<<<<<<<<<<< @@ -3648,7 +3697,7 @@ struct __pyx_obj_4lxml_5etree___pyx_scope_struct_14_iterentities { -/* "lxml/etree.pyx":271 +/* "lxml/etree.pyx":269 * @cython.final * @cython.internal * cdef class _TempStore: # <<<<<<<<<<<<<< @@ -3665,7 +3714,7 @@ static int __pyx_f_4lxml_5etree_10_TempStore_add(struct __pyx_obj_4lxml_5etree__ static int __pyx_f_4lxml_5etree_10_TempStore_clear(struct __pyx_obj_4lxml_5etree__TempStore *); -/* "lxml/etree.pyx":287 +/* "lxml/etree.pyx":285 * # class for temporarily storing exceptions raised in extensions * @cython.internal * cdef class _ExceptionContext: # <<<<<<<<<<<<<< @@ -3818,7 +3867,7 @@ static struct __pyx_vtabstruct_4lxml_5etree_PyErrorLog *__pyx_vtabptr_4lxml_5etr __PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlDocumentType; -/* "lxml/etree.pyx":336 +/* "lxml/etree.pyx":334 * @cython.final * @cython.freelist(8) * cdef public class _Document [ type LxmlDocumentType, object LxmlDocument ]: # <<<<<<<<<<<<<< @@ -3847,7 +3896,7 @@ static xmlNs *__pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(struct LxmlDocu static int __pyx_f_4lxml_5etree_9_Document__setNodeNs(struct LxmlDocument *, xmlNode *, const xmlChar *); -/* "lxml/etree.pyx":510 +/* "lxml/etree.pyx":508 * * * cdef class DocInfo: # <<<<<<<<<<<<<< @@ -3862,7 +3911,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":1625 +/* "lxml/etree.pyx":1623 * * @cython.internal * cdef class __ContentOnlyElement(_Element): # <<<<<<<<<<<<<< @@ -3876,7 +3925,7 @@ struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement { static struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement *__pyx_vtabptr_4lxml_5etree___ContentOnlyElement; -/* "lxml/etree.pyx":1692 +/* "lxml/etree.pyx":1690 * return [] * * cdef class _Comment(__ContentOnlyElement): # <<<<<<<<<<<<<< @@ -3890,7 +3939,7 @@ struct __pyx_vtabstruct_4lxml_5etree__Comment { static struct __pyx_vtabstruct_4lxml_5etree__Comment *__pyx_vtabptr_4lxml_5etree__Comment; -/* "lxml/etree.pyx":1700 +/* "lxml/etree.pyx":1698 * return "" % strrepr(self.text) * * cdef class _ProcessingInstruction(__ContentOnlyElement): # <<<<<<<<<<<<<< @@ -3904,7 +3953,7 @@ struct __pyx_vtabstruct_4lxml_5etree__ProcessingInstruction { static struct __pyx_vtabstruct_4lxml_5etree__ProcessingInstruction *__pyx_vtabptr_4lxml_5etree__ProcessingInstruction; -/* "lxml/etree.pyx":1751 +/* "lxml/etree.pyx":1749 * cdef object _FIND_PI_ATTRIBUTES = re.compile(ur'\s+(\w+)\s*=\s*(?:\'([^\']*)\'|"([^"]*)")', re.U).findall * * cdef class _Entity(__ContentOnlyElement): # <<<<<<<<<<<<<< @@ -3919,7 +3968,7 @@ static struct __pyx_vtabstruct_4lxml_5etree__Entity *__pyx_vtabptr_4lxml_5etree_ __PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementTreeType; -/* "lxml/etree.pyx":1849 +/* "lxml/etree.pyx":1847 * * * cdef public class _ElementTree [ type LxmlElementTreeType, # <<<<<<<<<<<<<< @@ -3935,7 +3984,7 @@ static int __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(struct LxmlElement __PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementTagMatcherType; -/* "lxml/etree.pyx":2576 +/* "lxml/etree.pyx":2574 * * * cdef public class _ElementTagMatcher [ object LxmlElementTagMatcher, # <<<<<<<<<<<<<< @@ -3950,7 +3999,7 @@ static struct __pyx_vtabstruct_4lxml_5etree__ElementTagMatcher *__pyx_vtabptr_4l __PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementIteratorType; -/* "lxml/etree.pyx":2607 +/* "lxml/etree.pyx":2605 * self._name = NULL * * cdef public class _ElementIterator(_ElementTagMatcher) [ # <<<<<<<<<<<<<< @@ -3965,7 +4014,7 @@ struct __pyx_vtabstruct_4lxml_5etree__ElementIterator { static struct __pyx_vtabstruct_4lxml_5etree__ElementIterator *__pyx_vtabptr_4lxml_5etree__ElementIterator; -/* "lxml/etree.pyx":2644 +/* "lxml/etree.pyx":2642 * @cython.final * @cython.internal * cdef class _MultiTagMatcher: # <<<<<<<<<<<<<< @@ -3998,7 +4047,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":2781 +/* "lxml/etree.pyx":2779 * return False * * cdef class _ElementMatchIterator: # <<<<<<<<<<<<<< @@ -4015,7 +4064,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":2810 +/* "lxml/etree.pyx":2808 * return current_node * * cdef class ElementChildIterator(_ElementMatchIterator): # <<<<<<<<<<<<<< @@ -4029,7 +4078,7 @@ struct __pyx_vtabstruct_4lxml_5etree_ElementChildIterator { static struct __pyx_vtabstruct_4lxml_5etree_ElementChildIterator *__pyx_vtabptr_4lxml_5etree_ElementChildIterator; -/* "lxml/etree.pyx":2830 +/* "lxml/etree.pyx":2828 * self._node = _elementFactory(node._doc, c_node) if c_node is not NULL else None * * cdef class SiblingsIterator(_ElementMatchIterator): # <<<<<<<<<<<<<< @@ -4043,7 +4092,7 @@ struct __pyx_vtabstruct_4lxml_5etree_SiblingsIterator { static struct __pyx_vtabstruct_4lxml_5etree_SiblingsIterator *__pyx_vtabptr_4lxml_5etree_SiblingsIterator; -/* "lxml/etree.pyx":2845 +/* "lxml/etree.pyx":2843 * self._storeNext(node) * * cdef class AncestorsIterator(_ElementMatchIterator): # <<<<<<<<<<<<<< @@ -4057,7 +4106,7 @@ struct __pyx_vtabstruct_4lxml_5etree_AncestorsIterator { static struct __pyx_vtabstruct_4lxml_5etree_AncestorsIterator *__pyx_vtabptr_4lxml_5etree_AncestorsIterator; -/* "lxml/etree.pyx":2855 +/* "lxml/etree.pyx":2853 * self._storeNext(node) * * cdef class ElementDepthFirstIterator: # <<<<<<<<<<<<<< @@ -4827,7 +4876,7 @@ static struct LxmlElement *__pyx_f_4lxml_5etree_8iterwalk__end_node(struct __pyx /* "src/lxml/xmlid.pxi":58 - * return (_elementTreeFactory(doc, None), _IDDict(doc)) + * return _elementTreeFactory(doc, None), _IDDict(doc) * * cdef class _IDDict: # <<<<<<<<<<<<<< * u"""IDDict(self, etree) @@ -5117,7 +5166,7 @@ struct __pyx_vtabstruct_4lxml_5etree_XSLTExtension { static struct __pyx_vtabstruct_4lxml_5etree_XSLTExtension *__pyx_vtabptr_4lxml_5etree_XSLTExtension; -/* "lxml/etree.pyx":3511 +/* "lxml/etree.pyx":3505 * * * cdef class _Validator: # <<<<<<<<<<<<<< @@ -5333,208 +5382,6 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) #endif -/* Profile.proto */ -#ifndef CYTHON_PROFILE -#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON - #define CYTHON_PROFILE 0 -#else - #define CYTHON_PROFILE 1 -#endif -#endif -#ifndef CYTHON_TRACE_NOGIL - #define CYTHON_TRACE_NOGIL 0 -#else - #if CYTHON_TRACE_NOGIL && !defined(CYTHON_TRACE) - #define CYTHON_TRACE 1 - #endif -#endif -#ifndef CYTHON_TRACE - #define CYTHON_TRACE 0 -#endif -#if CYTHON_TRACE - #undef CYTHON_PROFILE_REUSE_FRAME -#endif -#ifndef CYTHON_PROFILE_REUSE_FRAME - #define CYTHON_PROFILE_REUSE_FRAME 0 -#endif -#if CYTHON_PROFILE || CYTHON_TRACE - #include "compile.h" - #include "frameobject.h" - #include "traceback.h" - #if CYTHON_PROFILE_REUSE_FRAME - #define CYTHON_FRAME_MODIFIER static - #define CYTHON_FRAME_DEL(frame) - #else - #define CYTHON_FRAME_MODIFIER - #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame) - #endif - #define __Pyx_TraceDeclarations\ - static PyCodeObject *__pyx_frame_code = NULL;\ - CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\ - int __Pyx_use_tracing = 0; - #define __Pyx_TraceFrameInit(codeobj)\ - if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj; - #ifdef WITH_THREAD - #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\ - if (nogil) {\ - if (CYTHON_TRACE_NOGIL) {\ - PyThreadState *tstate;\ - PyGILState_STATE state = PyGILState_Ensure();\ - tstate = __Pyx_PyThreadState_Current;\ - if (unlikely(tstate->use_tracing) && !tstate->tracing &&\ - (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\ - }\ - PyGILState_Release(state);\ - if (unlikely(__Pyx_use_tracing < 0)) goto_error;\ - }\ - } else {\ - PyThreadState* tstate = PyThreadState_GET();\ - if (unlikely(tstate->use_tracing) && !tstate->tracing &&\ - (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\ - if (unlikely(__Pyx_use_tracing < 0)) goto_error;\ - }\ - } - #else - #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\ - { PyThreadState* tstate = PyThreadState_GET();\ - if (unlikely(tstate->use_tracing) && !tstate->tracing &&\ - (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\ - if (unlikely(__Pyx_use_tracing < 0)) goto_error;\ - }\ - } - #endif - #define __Pyx_TraceException()\ - if (likely(!__Pyx_use_tracing)); else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ - if (tstate->use_tracing &&\ - (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ - tstate->tracing++;\ - tstate->use_tracing = 0;\ - PyObject *exc_info = __Pyx_GetExceptionTuple(tstate);\ - if (exc_info) {\ - if (CYTHON_TRACE && tstate->c_tracefunc)\ - tstate->c_tracefunc(\ - tstate->c_traceobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\ - tstate->c_profilefunc(\ - tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\ - Py_DECREF(exc_info);\ - }\ - tstate->use_tracing = 1;\ - tstate->tracing--;\ - }\ - } - static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) { - PyObject *type, *value, *traceback; - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); - tstate->tracing++; - tstate->use_tracing = 0; - if (CYTHON_TRACE && tstate->c_tracefunc) - tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result); - if (tstate->c_profilefunc) - tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result); - CYTHON_FRAME_DEL(frame); - tstate->use_tracing = 1; - tstate->tracing--; - __Pyx_ErrRestoreInState(tstate, type, value, traceback); - } - #ifdef WITH_THREAD - #define __Pyx_TraceReturn(result, nogil)\ - if (likely(!__Pyx_use_tracing)); else {\ - if (nogil) {\ - if (CYTHON_TRACE_NOGIL) {\ - PyThreadState *tstate;\ - PyGILState_STATE state = PyGILState_Ensure();\ - tstate = __Pyx_PyThreadState_Current;\ - if (tstate->use_tracing) {\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\ - }\ - PyGILState_Release(state);\ - }\ - } else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ - if (tstate->use_tracing) {\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\ - }\ - }\ - } - #else - #define __Pyx_TraceReturn(result, nogil)\ - if (likely(!__Pyx_use_tracing)); else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ - if (tstate->use_tracing) {\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\ - }\ - } - #endif - static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno); - static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, PyThreadState* tstate, const char *funcname, const char *srcfile, int firstlineno); -#else - #define __Pyx_TraceDeclarations - #define __Pyx_TraceFrameInit(codeobj) - #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error) if ((1)); else goto_error; - #define __Pyx_TraceException() - #define __Pyx_TraceReturn(result, nogil) -#endif -#if CYTHON_TRACE - static int __Pyx_call_line_trace_func(PyThreadState *tstate, PyFrameObject *frame, int lineno) { - int ret; - PyObject *type, *value, *traceback; - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); - __Pyx_PyFrame_SetLineNumber(frame, lineno); - tstate->tracing++; - tstate->use_tracing = 0; - ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL); - tstate->use_tracing = 1; - tstate->tracing--; - if (likely(!ret)) { - __Pyx_ErrRestoreInState(tstate, type, value, traceback); - } else { - Py_XDECREF(type); - Py_XDECREF(value); - Py_XDECREF(traceback); - } - return ret; - } - #ifdef WITH_THREAD - #define __Pyx_TraceLine(lineno, nogil, goto_error)\ - if (likely(!__Pyx_use_tracing)); else {\ - if (nogil) {\ - if (CYTHON_TRACE_NOGIL) {\ - int ret = 0;\ - PyThreadState *tstate;\ - PyGILState_STATE state = PyGILState_Ensure();\ - tstate = __Pyx_PyThreadState_Current;\ - if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\ - ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\ - }\ - PyGILState_Release(state);\ - if (unlikely(ret)) goto_error;\ - }\ - } else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ - if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\ - int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\ - if (unlikely(ret)) goto_error;\ - }\ - }\ - } - #else - #define __Pyx_TraceLine(lineno, nogil, goto_error)\ - if (likely(!__Pyx_use_tracing)); else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ - if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\ - int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\ - if (unlikely(ret)) goto_error;\ - }\ - } - #endif -#else - #define __Pyx_TraceLine(lineno, nogil, goto_error) if ((1)); else goto_error; -#endif - /* RaiseException.proto */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); @@ -5554,6 +5401,18 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, #else #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) #endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) #endif /* PyObjectCall.proto */ @@ -5563,6 +5422,9 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif +/* PyObjectCall2Args.proto */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + /* PyObjectCallMethO.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); @@ -5591,11 +5453,11 @@ static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObje (likely((cfunc)->flag == METH_NOARGS) ? (*((cfunc)->func))(self, NULL) :\ (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ?\ (PY_VERSION_HEX >= 0x030700A0 ?\ - (*(__Pyx_PyCFunctionFast)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\ - (*(__Pyx_PyCFunctionFastWithKeywords)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\ + (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\ + (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\ (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\ - (*(__Pyx_PyCFunctionFastWithKeywords)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\ - (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\ + (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\ + (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\ ((cfunc)->flag == METH_VARARGS ? (*((cfunc)->func))(self, __pyx_empty_tuple) :\ __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\ __Pyx__CallUnboundCMethod0(cfunc, self)) @@ -5643,6 +5505,11 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); +/* GetTopmostException.proto */ +#if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + /* SaveResetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) @@ -5866,7 +5733,25 @@ 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); /* GetModuleGlobalName.proto */ -static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +#define __Pyx_GetModuleGlobalNameUncached(var, name) {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif /* ArgTypeTest.proto */ #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ @@ -5896,6 +5781,9 @@ static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *nam PyObject_Format(s, f)) #endif +/* PyObjectGetMethod.proto */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); + /* PyObjectCallMethod0.proto */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); @@ -5934,13 +5822,8 @@ static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } -/* PyIntBinop.proto */ -#if !CYTHON_COMPILING_IN_PYPY -static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace); -#else -#define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\ - PyObject_RichCompare(op1, op2, Py_EQ) - #endif +/* PyIntCompare.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); /* ImportFrom.proto */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); @@ -6093,17 +5976,23 @@ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); /* PyObjectCallMethod1.proto */ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); -static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg); /* CoroutineBase.proto */ typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *); +#if CYTHON_USE_EXC_INFO_STACK +#define __Pyx_ExcInfoStruct _PyErr_StackItem +#else typedef struct { - PyObject_HEAD - __pyx_coroutine_body_t body; - PyObject *closure; PyObject *exc_type; PyObject *exc_value; PyObject *exc_traceback; +} __Pyx_ExcInfoStruct; +#endif +typedef struct { + PyObject_HEAD + __pyx_coroutine_body_t body; + PyObject *closure; + __Pyx_ExcInfoStruct gi_exc_state; PyObject *gi_weakreflist; PyObject *classobj; PyObject *yieldfrom; @@ -6120,18 +6009,24 @@ static __pyx_CoroutineObject *__Pyx__Coroutine_New( static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, PyObject *name, PyObject *qualname, PyObject *module_name); +static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self); static int __Pyx_Coroutine_clear(PyObject *self); static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value); static PyObject *__Pyx_Coroutine_Close(PyObject *self); static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args); +#if CYTHON_USE_EXC_INFO_STACK +#define __Pyx_Coroutine_SwapException(self) +#define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state) +#else #define __Pyx_Coroutine_SwapException(self) {\ - __Pyx_ExceptionSwap(&(self)->exc_type, &(self)->exc_value, &(self)->exc_traceback);\ - __Pyx_Coroutine_ResetFrameBackpointer(self);\ + __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\ + __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\ } #define __Pyx_Coroutine_ResetAndClearException(self) {\ - __Pyx_ExceptionReset((self)->exc_type, (self)->exc_value, (self)->exc_traceback);\ - (self)->exc_type = (self)->exc_value = (self)->exc_traceback = NULL;\ + __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\ + (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\ } +#endif #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue) @@ -6140,7 +6035,7 @@ static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args); __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue) #endif static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue); -static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__pyx_CoroutineObject *self); +static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state); /* PyObject_GenericGetAttrNoDict.proto */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 @@ -6170,7 +6065,7 @@ typedef struct { PyObject_HEAD PyObject *coroutine; } __pyx_CoroutineAwaitObject; -static PyObject *__Pyx_CoroutineAwait_Close(__pyx_CoroutineAwaitObject *self); +static PyObject *__Pyx_CoroutineAwait_Close(__pyx_CoroutineAwaitObject *self, PyObject *arg); static PyObject *__Pyx_CoroutineAwait_Throw(__pyx_CoroutineAwaitObject *self, PyObject *args); /* GetAwaitIter.proto */ @@ -6224,6 +6119,17 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam /* SetVTable.proto */ static int __Pyx_SetVtable(PyObject *dict, void *vtable); +/* TypeImport.proto */ +#ifndef __PYX_HAVE_RT_ImportType_proto +#define __PYX_HAVE_RT_ImportType_proto +enum __Pyx_ImportType_CheckSize { + __Pyx_ImportType_CheckSize_Error = 0, + __Pyx_ImportType_CheckSize_Warn = 1, + __Pyx_ImportType_CheckSize_Ignore = 2 +}; +static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size); +#endif + /* CalculateMetaclass.proto */ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); @@ -6262,6 +6168,7 @@ typedef struct { PyObject *func_annotations; } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; +#define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType)) #define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\ __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code) static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, @@ -6301,27 +6208,20 @@ static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObj static PyObject* __Pyx_patch_inspect(PyObject* module); /* GetNameInClass.proto */ -static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name); +#define __Pyx_GetNameInClass(var, nmspace, name) (var) = __Pyx__GetNameInClass(nmspace, name) +static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name); /* ClassMethod.proto */ #include "descrobject.h" static PyObject* __Pyx_Method_ClassMethod(PyObject *method); -/* PyIdentifierFromString.proto */ -#if !defined(__Pyx_PyIdentifier_FromString) -#if PY_MAJOR_VERSION < 3 - #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) -#else - #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) -#endif -#endif - -/* ModuleImport.proto */ -static PyObject *__Pyx_ImportModule(const char *name); - /* RegisterModuleCleanup.proto */ static void __pyx_module_cleanup(PyObject *self); +#if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY static int __Pyx_RegisterCleanup(void); +#else +#define __Pyx_RegisterCleanup() (0) +#endif /* CLineInTraceback.proto */ #ifdef CYTHON_CLINE_IN_TRACEBACK @@ -6407,9 +6307,6 @@ static int __Pyx_check_binary_version(void); /* FunctionExport.proto */ static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); -/* TypeImport.proto */ -static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); - /* InitStrings.proto */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); @@ -7008,6 +6905,7 @@ static int __pyx_f_4lxml_5etree__appendSibling(struct LxmlElement *, struct Lxml static int __pyx_f_4lxml_5etree__prependSibling(struct LxmlElement *, struct LxmlElement *); /*proto*/ static int __pyx_f_4lxml_5etree__addSibling(struct LxmlElement *, struct LxmlElement *, int); /*proto*/ static CYTHON_INLINE int __pyx_f_4lxml_5etree_isutf8(const xmlChar *); /*proto*/ +static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *, size_t); /*proto*/ static int __pyx_f_4lxml_5etree__is_valid_xml_ascii(PyObject *); /*proto*/ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree_funicodeOrNone(const xmlChar *); /*proto*/ @@ -7167,7 +7065,7 @@ static void __pyx_f_4lxml_5etree__extension_function_call(struct __pyx_obj_4lxml static void __pyx_f_4lxml_5etree__xpath_function_call(xmlXPathParserContext *, int); /*proto*/ static int __pyx_f_4lxml_5etree__register_xpath_function(void *, PyObject *, PyObject *); /*proto*/ static int __pyx_f_4lxml_5etree__unregister_xpath_function(void *, PyObject *, PyObject *); /*proto*/ -static void __pyx_f_4lxml_5etree__registerExsltFunctionsForNamespaces(void *, void *, xmlChar *); /*proto*/ +static void __pyx_f_4lxml_5etree__registerExsltFunctionsForNamespaces(void *, void *, const xmlChar *); /*proto*/ static PyObject *__pyx_f_4lxml_5etree__initXSLTResolverContext(struct __pyx_obj_4lxml_5etree__XSLTResolverContext *, struct __pyx_obj_4lxml_5etree__BaseParser *); /*proto*/ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *, void *, int, int *); /*proto*/ static void __pyx_f_4lxml_5etree__xslt_store_resolver_exception(const xmlChar *, void *, xsltLoadType); /*proto*/ @@ -7258,12 +7156,12 @@ static PyObject *__pyx_builtin_FutureWarning; static PyObject *__pyx_builtin_NotImplemented; static PyObject *__pyx_builtin_DeprecationWarning; static PyObject *__pyx_builtin_StopIteration; -static PyObject *__pyx_builtin_NotImplementedError; static PyObject *__pyx_builtin_ReferenceError; static PyObject *__pyx_builtin_AttributeError; static PyObject *__pyx_builtin_IOError; static PyObject *__pyx_builtin_LookupError; static PyObject *__pyx_builtin_open; +static PyObject *__pyx_builtin_NotImplementedError; static PyObject *__pyx_builtin_AssertionError; static const char __pyx_k_1[] = "[1]"; static const char __pyx_k_A[] = "A"; @@ -7280,6 +7178,8 @@ static const char __pyx_k_s[] = ""; static const char __pyx_k_v[] = "v"; static const char __pyx_k_Ok[] = "Ok"; static const char __pyx_k_PI[] = "PI"; +static const char __pyx_k__2[] = "-"; +static const char __pyx_k__3[] = "."; static const char __pyx_k_dc[] = "dc"; static const char __pyx_k_el[] = "el"; static const char __pyx_k_id[] = "id"; @@ -7297,19 +7197,34 @@ static const char __pyx_k_0_9[] = "[0-9]+"; static const char __pyx_k_DTD[] = "DTD"; static const char __pyx_k_TAG[] = "TAG"; static const char __pyx_k_XML[] = "XML"; -static const char __pyx_k__10[] = "-"; -static const char __pyx_k__11[] = "."; -static const char __pyx_k__22[] = " "; -static const char __pyx_k__23[] = ""; -static const char __pyx_k__31[] = ":"; -static const char __pyx_k__33[] = ": "; -static const char __pyx_k__37[] = "\n"; -static const char __pyx_k__56[] = "="; -static const char __pyx_k__60[] = "'"; -static const char __pyx_k__61[] = "\""; -static const char __pyx_k__63[] = "\" "; -static const char __pyx_k__64[] = ">"; -static const char __pyx_k__65[] = "\">"; +static const char __pyx_k__10[] = " "; +static const char __pyx_k__11[] = ""; +static const char __pyx_k__16[] = ":"; +static const char __pyx_k__17[] = ": "; +static const char __pyx_k__18[] = "\n"; +static const char __pyx_k__20[] = "="; +static const char __pyx_k__21[] = "'"; +static const char __pyx_k__22[] = "\""; +static const char __pyx_k__24[] = "\" "; +static const char __pyx_k__25[] = ">"; +static const char __pyx_k__26[] = "\">"; +static const char __pyx_k__28[] = "&"; +static const char __pyx_k__29[] = ";"; +static const char __pyx_k__30[] = "{"; +static const char __pyx_k__31[] = "}"; +static const char __pyx_k__36[] = "["; +static const char __pyx_k__37[] = "]"; +static const char __pyx_k__38[] = "/"; +static const char __pyx_k__40[] = "*"; +static const char __pyx_k__41[] = "{*}*"; +static const char __pyx_k__44[] = "--"; +static const char __pyx_k__46[] = "?>"; +static const char __pyx_k__47[] = "]]>"; +static const char __pyx_k__51[] = "_"; +static const char __pyx_k__52[] = "': "; +static const char __pyx_k__55[] = ")"; +static const char __pyx_k__78[] = "("; +static const char __pyx_k__79[] = ", "; static const char __pyx_k_add[] = "add"; static const char __pyx_k_all[] = "__all__"; static const char __pyx_k_any[] = "any"; @@ -7351,25 +7266,8 @@ static const char __pyx_k_None[] = "None"; static const char __pyx_k_Type[] = "Type '"; static const char __pyx_k_UTF8[] = "UTF8"; static const char __pyx_k_XSLT[] = "XSLT"; -static const char __pyx_k__112[] = "&"; -static const char __pyx_k__113[] = ";"; -static const char __pyx_k__114[] = "{"; -static const char __pyx_k__115[] = "}"; -static const char __pyx_k__128[] = "["; -static const char __pyx_k__129[] = "]"; -static const char __pyx_k__130[] = "/"; -static const char __pyx_k__160[] = "*"; -static const char __pyx_k__161[] = "{*}*"; -static const char __pyx_k__166[] = "--"; -static const char __pyx_k__170[] = "?>"; -static const char __pyx_k__171[] = "]]>"; -static const char __pyx_k__214[] = "_"; -static const char __pyx_k__234[] = "': "; -static const char __pyx_k__252[] = ")"; -static const char __pyx_k__348[] = "("; -static const char __pyx_k__349[] = ", "; -static const char __pyx_k__663[] = "(\"[^\"]*\")|('[^']*')"; -static const char __pyx_k__665[] = "({[^}]+})"; +static const char __pyx_k__577[] = "(\"[^\"]*\")|('[^']*')"; +static const char __pyx_k__579[] = "({[^}]+})"; static const char __pyx_k_args[] = "args"; static const char __pyx_k_beta[] = "beta"; static const char __pyx_k_c14n[] = "c14n"; @@ -7496,7 +7394,9 @@ static const char __pyx_k_value[] = "value"; static const char __pyx_k_write[] = "write"; static const char __pyx_k_xmlns[] = "xmlns"; static const char __pyx_k_xpath[] = "xpath"; +static const char __pyx_k_Attrib[] = "_Attrib"; static const char __pyx_k_Entity[] = "Entity"; +static const char __pyx_k_IDDict[] = "_IDDict"; static const char __pyx_k_PARSER[] = "PARSER"; static const char __pyx_k_PIBase[] = "PIBase"; static const char __pyx_k_PUBLIC[] = " PUBLIC \""; @@ -7575,6 +7475,7 @@ static const char __pyx_k_xslt_3[] = "xslt"; static const char __pyx_k_BytesIO[] = "BytesIO"; static const char __pyx_k_Comment[] = "Comment"; static const char __pyx_k_DOCTYPE[] = ""; @@ -8444,7 +8377,6 @@ static const char __pyx_k_ListErrorLog_filter_from_fatals[] = "_ListErrorLog.fil static const char __pyx_k_ListErrorLog_filter_from_warnin[] = "_ListErrorLog.filter_from_warnings"; static const char __pyx_k_Not_yet_implemented_result_node[] = "Not yet implemented result node type: "; static const char __pyx_k_ParserSchemaValidationContext_n[] = "_ParserSchemaValidationContext not initialised"; -static const char __pyx_k_PyCapsule_usage_requires_Python[] = "PyCapsule usage requires Python 2.7+"; static const char __pyx_k_PyElementUnicodeResult_getparen[] = "_PyElementUnicodeResult.getparent"; static const char __pyx_k_PythonElementClassLookup_lookup[] = "PythonElementClassLookup.lookup"; static const char __pyx_k_RELAXNG_OK_0_RELAXNG_ERR_MEMORY[] = "RELAXNG_OK=0\nRELAXNG_ERR_MEMORY=1\nRELAXNG_ERR_TYPE=2\nRELAXNG_ERR_TYPEVAL=3\nRELAXNG_ERR_DUPID=4\nRELAXNG_ERR_TYPECMP=5\nRELAXNG_ERR_NOSTATE=6\nRELAXNG_ERR_NODEFINE=7\nRELAXNG_ERR_LISTEXTRA=8\nRELAXNG_ERR_LISTEMPTY=9\nRELAXNG_ERR_INTERNODATA=10\nRELAXNG_ERR_INTERSEQ=11\nRELAXNG_ERR_INTEREXTRA=12\nRELAXNG_ERR_ELEMNAME=13\nRELAXNG_ERR_ATTRNAME=14\nRELAXNG_ERR_ELEMNONS=15\nRELAXNG_ERR_ATTRNONS=16\nRELAXNG_ERR_ELEMWRONGNS=17\nRELAXNG_ERR_ATTRWRONGNS=18\nRELAXNG_ERR_ELEMEXTRANS=19\nRELAXNG_ERR_ATTREXTRANS=20\nRELAXNG_ERR_ELEMNOTEMPTY=21\nRELAXNG_ERR_NOELEM=22\nRELAXNG_ERR_NOTELEM=23\nRELAXNG_ERR_ATTRVALID=24\nRELAXNG_ERR_CONTENTVALID=25\nRELAXNG_ERR_EXTRACONTENT=26\nRELAXNG_ERR_INVALIDATTR=27\nRELAXNG_ERR_DATAELEM=28\nRELAXNG_ERR_VALELEM=29\nRELAXNG_ERR_LISTELEM=30\nRELAXNG_ERR_DATATYPE=31\nRELAXNG_ERR_VALUE=32\nRELAXNG_ERR_LIST=33\nRELAXNG_ERR_NOGRAMMAR=34\nRELAXNG_ERR_EXTRADATA=35\nRELAXNG_ERR_LACKDATA=36\nRELAXNG_ERR_INTERNAL=37\nRELAXNG_ERR_ELEMWRONG=38\nRELAXNG_ERR_TEXTWRONG=39\n"; @@ -8568,6 +8500,7 @@ static PyObject *__pyx_n_b_A; static PyObject *__pyx_n_b_ASCII; static PyObject *__pyx_n_u_ASCII; static PyObject *__pyx_kp_s_All_strings_must_be_XML_compatib; +static PyObject *__pyx_n_s_AncestorsIterator; static PyObject *__pyx_n_s_AppendOnlyElementProxy_append; static PyObject *__pyx_n_s_AppendOnlyElementProxy_extend; static PyObject *__pyx_kp_u_Argument_is_not_a_file_like_obje; @@ -8585,6 +8518,7 @@ static PyObject *__pyx_n_s_AsyncIncrementalFileWriter_meth; static PyObject *__pyx_n_s_AsyncIncrementalFileWriter_writ; static PyObject *__pyx_n_s_AsyncIncrementalFileWriter_writ_2; static PyObject *__pyx_n_s_AsyncIncrementalFileWriter_writ_3; +static PyObject *__pyx_n_s_Attrib; static PyObject *__pyx_n_s_Attrib___copy; static PyObject *__pyx_n_s_Attrib___deepcopy; static PyObject *__pyx_n_s_Attrib_clear; @@ -8600,6 +8534,7 @@ static PyObject *__pyx_n_s_Attrib_update; static PyObject *__pyx_n_s_Attrib_values; static PyObject *__pyx_n_s_AttributeBasedElementClassLookup; static PyObject *__pyx_n_s_AttributeError; +static PyObject *__pyx_n_s_BaseErrorLog; static PyObject *__pyx_n_s_BaseErrorLog_copy; static PyObject *__pyx_n_s_BaseErrorLog_receive; static PyObject *__pyx_n_s_BaseException; @@ -8623,6 +8558,7 @@ static PyObject *__pyx_kp_s_Cannot_specify_encoding_with_C14; static PyObject *__pyx_kp_b_Char_out_of_XML_range; static PyObject *__pyx_n_s_Comment; static PyObject *__pyx_n_s_CommentBase; +static PyObject *__pyx_n_s_Comment_2; static PyObject *__pyx_kp_s_Comment_may_not_contain_or_end_w; static PyObject *__pyx_n_s_ContentOnlyElement_append; static PyObject *__pyx_n_s_ContentOnlyElement_get; @@ -8654,7 +8590,9 @@ static PyObject *__pyx_n_s_DTD_iterelements; static PyObject *__pyx_n_s_DTD_iterentities; static PyObject *__pyx_kp_s_DTD_not_initialised; static PyObject *__pyx_n_s_DeprecationWarning; +static PyObject *__pyx_n_s_DocInfo; static PyObject *__pyx_n_s_DocInfo_clear; +static PyObject *__pyx_n_s_Document; static PyObject *__pyx_n_s_DocumentInvalid; static PyObject *__pyx_kp_u_Document_does_not_comply_with_sc; static PyObject *__pyx_kp_u_Document_is_not_a_valid_Schematr; @@ -8662,6 +8600,7 @@ static PyObject *__pyx_kp_u_Document_is_not_parsable_as_Rela; static PyObject *__pyx_kp_u_Document_is_not_valid_Relax_NG; static PyObject *__pyx_kp_u_Document_is_not_valid_XML_Schema; static PyObject *__pyx_kp_u_Document_is_not_well_formed; +static PyObject *__pyx_n_s_DomainErrorLog; static PyObject *__pyx_n_s_DomainErrorLog_receive; static PyObject *__pyx_n_s_ERROR; static PyObject *__pyx_n_s_ERR_INVALID_CHAR; @@ -8671,13 +8610,20 @@ static PyObject *__pyx_n_s_ETCompatXMLParser; static PyObject *__pyx_n_s_ETXPath; static PyObject *__pyx_n_s_Element; static PyObject *__pyx_n_s_ElementBase; +static PyObject *__pyx_n_s_ElementChildIterator; static PyObject *__pyx_n_s_ElementClassLookup; static PyObject *__pyx_n_s_ElementDefaultClassLookup; +static PyObject *__pyx_n_s_ElementDepthFirstIterator; +static PyObject *__pyx_n_s_ElementIterator; +static PyObject *__pyx_n_s_ElementMatchIterator; static PyObject *__pyx_n_s_ElementNamespaceClassLookup; static PyObject *__pyx_n_s_ElementNamespaceClassLookup_get; static PyObject *__pyx_n_s_ElementStringResult; static PyObject *__pyx_n_s_ElementStringResult_getparent; +static PyObject *__pyx_n_s_ElementTagMatcher; +static PyObject *__pyx_n_s_ElementTextIterator; static PyObject *__pyx_n_s_ElementTree; +static PyObject *__pyx_n_s_ElementTree_2; static PyObject *__pyx_n_s_ElementTree___copy; static PyObject *__pyx_n_s_ElementTree___deepcopy; static PyObject *__pyx_n_s_ElementTree__setroot; @@ -8699,7 +8645,9 @@ static PyObject *__pyx_n_s_ElementTree_xinclude; static PyObject *__pyx_n_s_ElementTree_xmlschema; static PyObject *__pyx_n_s_ElementTree_xpath; static PyObject *__pyx_n_s_ElementTree_xslt; +static PyObject *__pyx_n_s_ElementUnicodeResult; static PyObject *__pyx_n_s_ElementUnicodeResult_getparent; +static PyObject *__pyx_n_s_Element_2; static PyObject *__pyx_n_s_Element___copy; static PyObject *__pyx_n_s_Element___deepcopy; static PyObject *__pyx_n_s_Element___reversed; @@ -8745,10 +8693,12 @@ static PyObject *__pyx_kp_u_Empty_tag_name; static PyObject *__pyx_kp_b_Encoding_error; static PyObject *__pyx_n_s_Entity; static PyObject *__pyx_n_s_EntityBase; +static PyObject *__pyx_n_s_Entity_2; static PyObject *__pyx_kp_u_Entity_class_must_be_subclass_of; static PyObject *__pyx_n_s_Error; static PyObject *__pyx_n_s_ErrorDomains; static PyObject *__pyx_n_s_ErrorLevels; +static PyObject *__pyx_n_s_ErrorLog; static PyObject *__pyx_n_s_ErrorLog___exit; static PyObject *__pyx_n_s_ErrorLog_clear; static PyObject *__pyx_n_s_ErrorLog_copy; @@ -8771,6 +8721,7 @@ static PyObject *__pyx_kp_u_Failed_to_create_file; static PyObject *__pyx_kp_u_Failed_to_create_validation_cont; static PyObject *__pyx_n_s_FallbackElementClassLookup; static PyObject *__pyx_n_s_FallbackElementClassLookup_set_f; +static PyObject *__pyx_n_s_FeedParser; static PyObject *__pyx_n_s_FeedParser_close; static PyObject *__pyx_n_s_FeedParser_feed; static PyObject *__pyx_n_s_FileWriterElement___enter; @@ -8787,7 +8738,9 @@ static PyObject *__pyx_n_u_GlobalErrorLog; static PyObject *__pyx_n_s_GzipFile; static PyObject *__pyx_n_s_HTML; static PyObject *__pyx_n_s_HTMLParser; +static PyObject *__pyx_n_s_HTMLPullParser; static PyObject *__pyx_n_s_HTMLPullParser_read_events; +static PyObject *__pyx_n_s_IDDict; static PyObject *__pyx_n_s_IDDict_copy; static PyObject *__pyx_n_s_IDDict_get; static PyObject *__pyx_n_s_IDDict_has_key; @@ -8861,6 +8814,7 @@ static PyObject *__pyx_kp_s_Libxml2_RelaxNG_error_types; static PyObject *__pyx_kp_s_Libxml2_error_domains; static PyObject *__pyx_kp_s_Libxml2_error_levels; static PyObject *__pyx_kp_s_Libxml2_error_types; +static PyObject *__pyx_n_s_ListErrorLog; static PyObject *__pyx_n_s_ListErrorLog_copy; static PyObject *__pyx_n_s_ListErrorLog_filter_domains; static PyObject *__pyx_n_s_ListErrorLog_filter_from_errors; @@ -8869,6 +8823,7 @@ static PyObject *__pyx_n_s_ListErrorLog_filter_from_level; static PyObject *__pyx_n_s_ListErrorLog_filter_from_warnin; static PyObject *__pyx_n_s_ListErrorLog_filter_levels; static PyObject *__pyx_n_s_ListErrorLog_filter_types; +static PyObject *__pyx_n_s_LogEntry; static PyObject *__pyx_n_s_LookupError; static PyObject *__pyx_n_s_LxmlError; static PyObject *__pyx_n_s_LxmlRegistryError; @@ -8933,10 +8888,10 @@ static PyObject *__pyx_kp_s_ParserSchemaValidationContext_n; static PyObject *__pyx_kp_u_Parsing_requires_string_data; static PyObject *__pyx_kp_s_Prefix_format_reserved_for_inter; static PyObject *__pyx_n_s_ProcessingInstruction; +static PyObject *__pyx_n_s_ProcessingInstruction_2; static PyObject *__pyx_n_s_ProcessingInstruction_get; static PyObject *__pyx_kp_s_Proxy_invalidated; static PyObject *__pyx_kp_u_Proxy_invalidated; -static PyObject *__pyx_kp_s_PyCapsule_usage_requires_Python; static PyObject *__pyx_n_s_PyElementUnicodeResult; static PyObject *__pyx_n_s_PyElementUnicodeResult_getparen; static PyObject *__pyx_n_s_PyErrorLog; @@ -8980,8 +8935,10 @@ static PyObject *__pyx_n_s_Resolver_resolve_file; static PyObject *__pyx_n_s_Resolver_resolve_filename; static PyObject *__pyx_n_s_Resolver_resolve_string; static PyObject *__pyx_kp_b_Resource_error; +static PyObject *__pyx_n_s_RotatingErrorLog; static PyObject *__pyx_n_s_RotatingErrorLog_receive; static PyObject *__pyx_kp_u_SYSTEM; +static PyObject *__pyx_n_s_SaxParserTarget; static PyObject *__pyx_kp_s_Schema_instance_not_initialised; static PyObject *__pyx_n_s_Schematron; static PyObject *__pyx_n_s_SchematronError; @@ -8990,6 +8947,7 @@ static PyObject *__pyx_n_s_SchematronValidateError; static PyObject *__pyx_kp_s_Schematron_instance_not_initiali; static PyObject *__pyx_n_s_SerialisationError; static PyObject *__pyx_kp_u_Serialisation_to_unicode_must_no; +static PyObject *__pyx_n_s_SiblingsIterator; static PyObject *__pyx_kp_b_Stack_usage_error; static PyObject *__pyx_kp_b_Start_of_literal; static PyObject *__pyx_n_s_StopIteration; @@ -9041,6 +8999,7 @@ static PyObject *__pyx_kp_u_Unknown_xpath_result; static PyObject *__pyx_kp_b_Unregistered_function; static PyObject *__pyx_kp_u_Unsupported_element_type; static PyObject *__pyx_kp_u_Unsupported_node_type; +static PyObject *__pyx_n_s_Validator; static PyObject *__pyx_n_s_Validator__append_log_message; static PyObject *__pyx_n_s_Validator__clear_error_log; static PyObject *__pyx_n_s_Validator_assert; @@ -9059,6 +9018,7 @@ static PyObject *__pyx_n_s_XML; static PyObject *__pyx_n_s_XMLDTDID; static PyObject *__pyx_n_s_XMLID; static PyObject *__pyx_n_s_XMLParser; +static PyObject *__pyx_n_s_XMLPullParser; static PyObject *__pyx_n_s_XMLPullParser_read_events; static PyObject *__pyx_n_s_XMLSchema; static PyObject *__pyx_n_s_XMLSchemaError; @@ -9067,7 +9027,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_3167; +static PyObject *__pyx_kp_u_XML_line_3165; 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; @@ -9075,11 +9035,13 @@ static PyObject *__pyx_n_u_XPATH_RANGE; static PyObject *__pyx_n_u_XPATH_USERS; static PyObject *__pyx_n_s_XPath; static PyObject *__pyx_n_s_XPathDocumentEvaluator; +static PyObject *__pyx_n_s_XPathElementEvaluator; static PyObject *__pyx_n_s_XPathElementEvaluator_register_n; static PyObject *__pyx_n_s_XPathElementEvaluator_register_n_2; static PyObject *__pyx_n_s_XPathError; static PyObject *__pyx_n_s_XPathEvalError; static PyObject *__pyx_n_s_XPathEvaluator; +static PyObject *__pyx_n_s_XPathEvaluatorBase; static PyObject *__pyx_n_s_XPathEvaluatorBase_evaluate; static PyObject *__pyx_n_s_XPathFunctionError; static PyObject *__pyx_n_s_XPathResultError; @@ -9100,8 +9062,10 @@ static PyObject *__pyx_n_s_XSLTExtension_apply_templates; static PyObject *__pyx_n_s_XSLTExtension_execute; static PyObject *__pyx_n_s_XSLTExtension_process_children; static PyObject *__pyx_n_s_XSLTParseError; +static PyObject *__pyx_n_s_XSLTProcessingInstruction; static PyObject *__pyx_n_s_XSLTProcessingInstruction_parse; static PyObject *__pyx_n_s_XSLTProcessingInstruction_set; +static PyObject *__pyx_n_s_XSLTResultTree; static PyObject *__pyx_n_s_XSLTResultTree___unicode; static PyObject *__pyx_n_s_XSLTResultTree_write_output; static PyObject *__pyx_n_s_XSLTSaveError; @@ -9113,52 +9077,52 @@ static PyObject *__pyx_n_s_XSLT_set_global_max_depth; static PyObject *__pyx_n_s_XSLT_strparam; static PyObject *__pyx_kp_s_XSLT_stylesheet_not_initialised; static PyObject *__pyx_n_s_XSLT_tostring; -static PyObject *__pyx_kp_b__10; static PyObject *__pyx_kp_u__10; static PyObject *__pyx_kp_b__11; static PyObject *__pyx_kp_s__11; static PyObject *__pyx_kp_u__11; -static PyObject *__pyx_kp_b__112; -static PyObject *__pyx_kp_u__112; -static PyObject *__pyx_kp_b__113; -static PyObject *__pyx_kp_u__113; -static PyObject *__pyx_kp_u__114; -static PyObject *__pyx_kp_u__115; -static PyObject *__pyx_kp_u__128; -static PyObject *__pyx_kp_u__129; -static PyObject *__pyx_kp_s__130; -static PyObject *__pyx_kp_b__160; -static PyObject *__pyx_kp_s__160; -static PyObject *__pyx_kp_s__161; -static PyObject *__pyx_kp_b__166; -static PyObject *__pyx_kp_b__170; -static PyObject *__pyx_kp_b__171; -static PyObject *__pyx_n_s__214; -static PyObject *__pyx_n_u__214; +static PyObject *__pyx_kp_b__16; +static PyObject *__pyx_kp_u__16; +static PyObject *__pyx_kp_u__17; +static PyObject *__pyx_kp_s__18; +static PyObject *__pyx_kp_u__18; +static PyObject *__pyx_kp_b__2; +static PyObject *__pyx_kp_u__2; +static PyObject *__pyx_kp_s__20; +static PyObject *__pyx_kp_b__21; +static PyObject *__pyx_kp_u__21; +static PyObject *__pyx_kp_b__22; +static PyObject *__pyx_kp_s__22; static PyObject *__pyx_kp_u__22; -static PyObject *__pyx_kp_b__23; -static PyObject *__pyx_kp_s__23; -static PyObject *__pyx_kp_u__23; -static PyObject *__pyx_kp_u__234; -static PyObject *__pyx_kp_u__252; -static PyObject *__pyx_kp_b__31; +static PyObject *__pyx_kp_u__24; +static PyObject *__pyx_kp_u__25; +static PyObject *__pyx_kp_u__26; +static PyObject *__pyx_kp_b__28; +static PyObject *__pyx_kp_u__28; +static PyObject *__pyx_kp_b__29; +static PyObject *__pyx_kp_u__29; +static PyObject *__pyx_kp_b__3; +static PyObject *__pyx_kp_s__3; +static PyObject *__pyx_kp_u__3; +static PyObject *__pyx_kp_u__30; static PyObject *__pyx_kp_u__31; -static PyObject *__pyx_kp_u__33; -static PyObject *__pyx_kp_u__348; -static PyObject *__pyx_kp_u__349; -static PyObject *__pyx_kp_s__37; +static PyObject *__pyx_kp_u__36; static PyObject *__pyx_kp_u__37; -static PyObject *__pyx_kp_s__56; -static PyObject *__pyx_kp_b__60; -static PyObject *__pyx_kp_u__60; -static PyObject *__pyx_kp_b__61; -static PyObject *__pyx_kp_s__61; -static PyObject *__pyx_kp_u__61; -static PyObject *__pyx_kp_u__63; -static PyObject *__pyx_kp_u__64; -static PyObject *__pyx_kp_u__65; -static PyObject *__pyx_kp_b__663; -static PyObject *__pyx_kp_b__665; +static PyObject *__pyx_kp_s__38; +static PyObject *__pyx_kp_b__40; +static PyObject *__pyx_kp_s__40; +static PyObject *__pyx_kp_s__41; +static PyObject *__pyx_kp_b__44; +static PyObject *__pyx_kp_b__46; +static PyObject *__pyx_kp_b__47; +static PyObject *__pyx_n_s__51; +static PyObject *__pyx_n_u__51; +static PyObject *__pyx_kp_u__52; +static PyObject *__pyx_kp_u__55; +static PyObject *__pyx_kp_b__577; +static PyObject *__pyx_kp_b__579; +static PyObject *__pyx_kp_u__78; +static PyObject *__pyx_kp_u__79; static PyObject *__pyx_n_s_abspath; static PyObject *__pyx_n_s_accepted_domains; static PyObject *__pyx_n_s_access_control; @@ -9449,6 +9413,7 @@ static PyObject *__pyx_n_s_href_utf; static PyObject *__pyx_n_s_hrefs; static PyObject *__pyx_n_b_html; static PyObject *__pyx_n_s_html; +static PyObject *__pyx_n_s_htmlfile; static PyObject *__pyx_kp_b_http_codespeak_net_lxml_objectif; static PyObject *__pyx_kp_b_http_exslt_org_regular_expressio; static PyObject *__pyx_kp_b_http_purl_org_dc_elements_1_1; @@ -9888,6 +9853,7 @@ static PyObject *__pyx_n_s_xml; static PyObject *__pyx_n_u_xml; static PyObject *__pyx_n_s_xml_declaration; static PyObject *__pyx_kp_u_xml_s_encoding_s_s_s; +static PyObject *__pyx_n_s_xmlfile; static PyObject *__pyx_n_s_xmlfile___aenter; static PyObject *__pyx_n_s_xmlfile___aexit; static PyObject *__pyx_n_s_xmlfile___enter; @@ -10678,677 +10644,619 @@ static PyObject *__pyx_int_neg_4; static PyObject *__pyx_int_neg_100; static PyObject *__pyx_int_neg_200; static PyObject *__pyx_int_neg_300; -static PyObject *__pyx_codeobj_; -static PyObject *__pyx_tuple__8; +static PyObject *__pyx_tuple_; +static PyObject *__pyx_slice__5; +static PyObject *__pyx_slice__6; +static PyObject *__pyx_slice__7; +static PyObject *__pyx_slice__8; +static PyObject *__pyx_tuple__4; static PyObject *__pyx_tuple__9; -static PyObject *__pyx_slice__14; -static PyObject *__pyx_slice__16; -static PyObject *__pyx_slice__18; -static PyObject *__pyx_slice__20; +static PyObject *__pyx_slice__39; +static PyObject *__pyx_slice__50; +static PyObject *__pyx_slice__61; +static PyObject *__pyx_slice__62; +static PyObject *__pyx_slice__76; +static PyObject *__pyx_slice__77; +static PyObject *__pyx_slice__88; static PyObject *__pyx_tuple__12; static PyObject *__pyx_tuple__13; +static PyObject *__pyx_tuple__14; static PyObject *__pyx_tuple__15; -static PyObject *__pyx_tuple__17; static PyObject *__pyx_tuple__19; -static PyObject *__pyx_tuple__21; -static PyObject *__pyx_tuple__24; -static PyObject *__pyx_tuple__25; -static PyObject *__pyx_tuple__26; +static PyObject *__pyx_tuple__23; static PyObject *__pyx_tuple__27; -static PyObject *__pyx_tuple__28; -static PyObject *__pyx_tuple__29; -static PyObject *__pyx_tuple__30; +static PyObject *__pyx_tuple__32; +static PyObject *__pyx_tuple__33; +static PyObject *__pyx_tuple__34; +static PyObject *__pyx_tuple__35; +static PyObject *__pyx_tuple__42; +static PyObject *__pyx_tuple__43; +static PyObject *__pyx_tuple__45; +static PyObject *__pyx_tuple__48; +static PyObject *__pyx_tuple__49; +static PyObject *__pyx_tuple__53; static PyObject *__pyx_tuple__54; -static PyObject *__pyx_tuple__57; +static PyObject *__pyx_tuple__56; +static PyObject *__pyx_tuple__58; static PyObject *__pyx_tuple__59; -static PyObject *__pyx_tuple__62; -static PyObject *__pyx_tuple__78; -static PyObject *__pyx_codeobj__2; -static PyObject *__pyx_codeobj__3; -static PyObject *__pyx_codeobj__4; -static PyObject *__pyx_codeobj__5; -static PyObject *__pyx_codeobj__6; -static PyObject *__pyx_codeobj__7; -static PyObject *__pyx_slice__134; -static PyObject *__pyx_slice__136; -static PyObject *__pyx_slice__138; -static PyObject *__pyx_slice__140; -static PyObject *__pyx_slice__195; -static PyObject *__pyx_slice__213; -static PyObject *__pyx_slice__273; -static PyObject *__pyx_slice__274; -static PyObject *__pyx_slice__276; -static PyObject *__pyx_slice__321; -static PyObject *__pyx_slice__324; -static PyObject *__pyx_slice__346; -static PyObject *__pyx_slice__388; -static PyObject *__pyx_slice__390; -static PyObject *__pyx_tuple__122; +static PyObject *__pyx_tuple__72; +static PyObject *__pyx_tuple__73; +static PyObject *__pyx_tuple__74; +static PyObject *__pyx_tuple__75; +static PyObject *__pyx_tuple__80; +static PyObject *__pyx_tuple__81; +static PyObject *__pyx_tuple__86; +static PyObject *__pyx_tuple__87; +static PyObject *__pyx_tuple__89; +static PyObject *__pyx_tuple__91; +static PyObject *__pyx_tuple__93; +static PyObject *__pyx_tuple__95; +static PyObject *__pyx_tuple__97; +static PyObject *__pyx_tuple__99; +static PyObject *__pyx_tuple__101; +static PyObject *__pyx_tuple__102; +static PyObject *__pyx_tuple__103; +static PyObject *__pyx_tuple__105; +static PyObject *__pyx_tuple__107; +static PyObject *__pyx_tuple__109; +static PyObject *__pyx_tuple__111; +static PyObject *__pyx_tuple__113; +static PyObject *__pyx_tuple__115; +static PyObject *__pyx_tuple__117; +static PyObject *__pyx_tuple__119; +static PyObject *__pyx_tuple__121; static PyObject *__pyx_tuple__123; -static PyObject *__pyx_tuple__124; static PyObject *__pyx_tuple__125; +static PyObject *__pyx_tuple__127; +static PyObject *__pyx_tuple__129; +static PyObject *__pyx_tuple__131; +static PyObject *__pyx_tuple__133; +static PyObject *__pyx_tuple__135; +static PyObject *__pyx_tuple__137; +static PyObject *__pyx_tuple__139; +static PyObject *__pyx_tuple__141; +static PyObject *__pyx_tuple__143; +static PyObject *__pyx_tuple__145; +static PyObject *__pyx_tuple__147; +static PyObject *__pyx_tuple__148; +static PyObject *__pyx_tuple__149; +static PyObject *__pyx_tuple__150; +static PyObject *__pyx_tuple__151; +static PyObject *__pyx_tuple__152; +static PyObject *__pyx_tuple__154; +static PyObject *__pyx_tuple__156; +static PyObject *__pyx_tuple__158; +static PyObject *__pyx_tuple__160; static PyObject *__pyx_tuple__162; -static PyObject *__pyx_tuple__163; -static PyObject *__pyx_tuple__167; +static PyObject *__pyx_tuple__164; +static PyObject *__pyx_tuple__166; static PyObject *__pyx_tuple__168; -static PyObject *__pyx_tuple__179; -static PyObject *__pyx_tuple__183; +static PyObject *__pyx_tuple__170; +static PyObject *__pyx_tuple__172; +static PyObject *__pyx_tuple__174; +static PyObject *__pyx_tuple__176; +static PyObject *__pyx_tuple__178; +static PyObject *__pyx_tuple__180; +static PyObject *__pyx_tuple__182; static PyObject *__pyx_tuple__184; -static PyObject *__pyx_tuple__185; +static PyObject *__pyx_tuple__186; +static PyObject *__pyx_tuple__188; static PyObject *__pyx_tuple__190; -static PyObject *__pyx_tuple__191; -static PyObject *__pyx_tuple__233; -static PyObject *__pyx_tuple__241; -static PyObject *__pyx_tuple__245; -static PyObject *__pyx_tuple__247; +static PyObject *__pyx_tuple__192; +static PyObject *__pyx_tuple__194; +static PyObject *__pyx_tuple__196; +static PyObject *__pyx_tuple__198; +static PyObject *__pyx_tuple__200; +static PyObject *__pyx_tuple__202; +static PyObject *__pyx_tuple__204; +static PyObject *__pyx_tuple__206; +static PyObject *__pyx_tuple__208; +static PyObject *__pyx_tuple__210; +static PyObject *__pyx_tuple__212; +static PyObject *__pyx_tuple__214; +static PyObject *__pyx_tuple__216; +static PyObject *__pyx_tuple__218; +static PyObject *__pyx_tuple__220; +static PyObject *__pyx_tuple__222; +static PyObject *__pyx_tuple__224; +static PyObject *__pyx_tuple__226; +static PyObject *__pyx_tuple__228; +static PyObject *__pyx_tuple__230; +static PyObject *__pyx_tuple__232; +static PyObject *__pyx_tuple__234; +static PyObject *__pyx_tuple__236; +static PyObject *__pyx_tuple__238; +static PyObject *__pyx_tuple__240; +static PyObject *__pyx_tuple__242; +static PyObject *__pyx_tuple__244; +static PyObject *__pyx_tuple__246; +static PyObject *__pyx_tuple__248; +static PyObject *__pyx_tuple__250; +static PyObject *__pyx_tuple__252; +static PyObject *__pyx_tuple__254; static PyObject *__pyx_tuple__256; -static PyObject *__pyx_tuple__257; -static PyObject *__pyx_tuple__261; +static PyObject *__pyx_tuple__258; +static PyObject *__pyx_tuple__260; static PyObject *__pyx_tuple__262; -static PyObject *__pyx_tuple__265; +static PyObject *__pyx_tuple__264; static PyObject *__pyx_tuple__266; static PyObject *__pyx_tuple__268; -static PyObject *__pyx_tuple__271; +static PyObject *__pyx_tuple__270; static PyObject *__pyx_tuple__272; -static PyObject *__pyx_tuple__275; +static PyObject *__pyx_tuple__274; +static PyObject *__pyx_tuple__276; static PyObject *__pyx_tuple__278; -static PyObject *__pyx_tuple__279; -static PyObject *__pyx_tuple__281; +static PyObject *__pyx_tuple__280; static PyObject *__pyx_tuple__282; -static PyObject *__pyx_tuple__297; -static PyObject *__pyx_tuple__299; +static PyObject *__pyx_tuple__284; +static PyObject *__pyx_tuple__286; +static PyObject *__pyx_tuple__288; +static PyObject *__pyx_tuple__290; +static PyObject *__pyx_tuple__292; +static PyObject *__pyx_tuple__294; +static PyObject *__pyx_tuple__296; +static PyObject *__pyx_tuple__298; static PyObject *__pyx_tuple__300; -static PyObject *__pyx_tuple__303; +static PyObject *__pyx_tuple__302; +static PyObject *__pyx_tuple__304; static PyObject *__pyx_tuple__306; -static PyObject *__pyx_tuple__307; static PyObject *__pyx_tuple__308; -static PyObject *__pyx_tuple__309; -static PyObject *__pyx_tuple__311; +static PyObject *__pyx_tuple__310; +static PyObject *__pyx_tuple__312; static PyObject *__pyx_tuple__313; -static PyObject *__pyx_tuple__314; +static PyObject *__pyx_tuple__315; +static PyObject *__pyx_tuple__316; +static PyObject *__pyx_tuple__318; +static PyObject *__pyx_tuple__319; +static PyObject *__pyx_tuple__321; +static PyObject *__pyx_tuple__323; +static PyObject *__pyx_tuple__324; +static PyObject *__pyx_tuple__326; +static PyObject *__pyx_tuple__327; +static PyObject *__pyx_tuple__329; +static PyObject *__pyx_tuple__330; +static PyObject *__pyx_tuple__332; static PyObject *__pyx_tuple__333; +static PyObject *__pyx_tuple__335; static PyObject *__pyx_tuple__336; -static PyObject *__pyx_tuple__337; +static PyObject *__pyx_tuple__338; +static PyObject *__pyx_tuple__339; +static PyObject *__pyx_tuple__341; +static PyObject *__pyx_tuple__343; +static PyObject *__pyx_tuple__345; static PyObject *__pyx_tuple__347; -static PyObject *__pyx_tuple__350; -static PyObject *__pyx_tuple__353; -static PyObject *__pyx_tuple__358; -static PyObject *__pyx_tuple__360; -static PyObject *__pyx_tuple__362; -static PyObject *__pyx_tuple__368; -static PyObject *__pyx_tuple__378; +static PyObject *__pyx_tuple__349; +static PyObject *__pyx_tuple__351; +static PyObject *__pyx_tuple__352; +static PyObject *__pyx_tuple__354; +static PyObject *__pyx_tuple__355; +static PyObject *__pyx_tuple__357; +static PyObject *__pyx_tuple__359; +static PyObject *__pyx_tuple__361; +static PyObject *__pyx_tuple__363; +static PyObject *__pyx_tuple__365; +static PyObject *__pyx_tuple__367; +static PyObject *__pyx_tuple__369; +static PyObject *__pyx_tuple__371; +static PyObject *__pyx_tuple__373; +static PyObject *__pyx_tuple__375; +static PyObject *__pyx_tuple__377; static PyObject *__pyx_tuple__379; -static PyObject *__pyx_tuple__384; +static PyObject *__pyx_tuple__381; +static PyObject *__pyx_tuple__383; static PyObject *__pyx_tuple__385; -static PyObject *__pyx_tuple__386; static PyObject *__pyx_tuple__387; static PyObject *__pyx_tuple__389; -static PyObject *__pyx_tuple__392; +static PyObject *__pyx_tuple__391; static PyObject *__pyx_tuple__393; -static PyObject *__pyx_tuple__399; +static PyObject *__pyx_tuple__394; +static PyObject *__pyx_tuple__396; +static PyObject *__pyx_tuple__398; static PyObject *__pyx_tuple__400; -static PyObject *__pyx_tuple__401; static PyObject *__pyx_tuple__402; -static PyObject *__pyx_tuple__403; static PyObject *__pyx_tuple__404; -static PyObject *__pyx_tuple__405; static PyObject *__pyx_tuple__406; -static PyObject *__pyx_tuple__407; static PyObject *__pyx_tuple__408; -static PyObject *__pyx_tuple__409; static PyObject *__pyx_tuple__410; -static PyObject *__pyx_tuple__411; static PyObject *__pyx_tuple__412; -static PyObject *__pyx_tuple__413; static PyObject *__pyx_tuple__414; -static PyObject *__pyx_tuple__415; static PyObject *__pyx_tuple__416; -static PyObject *__pyx_tuple__417; static PyObject *__pyx_tuple__418; -static PyObject *__pyx_tuple__419; static PyObject *__pyx_tuple__420; -static PyObject *__pyx_tuple__421; static PyObject *__pyx_tuple__422; -static PyObject *__pyx_tuple__423; static PyObject *__pyx_tuple__424; -static PyObject *__pyx_tuple__425; static PyObject *__pyx_tuple__426; -static PyObject *__pyx_tuple__427; static PyObject *__pyx_tuple__428; static PyObject *__pyx_tuple__429; -static PyObject *__pyx_tuple__430; static PyObject *__pyx_tuple__431; -static PyObject *__pyx_tuple__432; static PyObject *__pyx_tuple__433; -static PyObject *__pyx_tuple__434; static PyObject *__pyx_tuple__435; -static PyObject *__pyx_tuple__436; static PyObject *__pyx_tuple__437; -static PyObject *__pyx_tuple__438; static PyObject *__pyx_tuple__439; -static PyObject *__pyx_tuple__440; static PyObject *__pyx_tuple__441; -static PyObject *__pyx_tuple__442; static PyObject *__pyx_tuple__443; -static PyObject *__pyx_tuple__444; static PyObject *__pyx_tuple__445; -static PyObject *__pyx_tuple__446; static PyObject *__pyx_tuple__447; -static PyObject *__pyx_tuple__448; static PyObject *__pyx_tuple__449; -static PyObject *__pyx_tuple__450; static PyObject *__pyx_tuple__451; -static PyObject *__pyx_tuple__452; static PyObject *__pyx_tuple__453; static PyObject *__pyx_tuple__454; -static PyObject *__pyx_tuple__455; static PyObject *__pyx_tuple__456; -static PyObject *__pyx_tuple__457; static PyObject *__pyx_tuple__458; -static PyObject *__pyx_tuple__459; static PyObject *__pyx_tuple__460; -static PyObject *__pyx_tuple__461; static PyObject *__pyx_tuple__462; -static PyObject *__pyx_tuple__463; static PyObject *__pyx_tuple__464; -static PyObject *__pyx_tuple__465; static PyObject *__pyx_tuple__466; -static PyObject *__pyx_tuple__467; static PyObject *__pyx_tuple__468; -static PyObject *__pyx_tuple__469; static PyObject *__pyx_tuple__470; -static PyObject *__pyx_tuple__471; static PyObject *__pyx_tuple__472; static PyObject *__pyx_tuple__473; static PyObject *__pyx_tuple__474; -static PyObject *__pyx_tuple__475; static PyObject *__pyx_tuple__476; -static PyObject *__pyx_tuple__477; static PyObject *__pyx_tuple__478; -static PyObject *__pyx_tuple__479; static PyObject *__pyx_tuple__480; -static PyObject *__pyx_tuple__481; static PyObject *__pyx_tuple__482; -static PyObject *__pyx_tuple__483; static PyObject *__pyx_tuple__484; -static PyObject *__pyx_tuple__485; static PyObject *__pyx_tuple__486; -static PyObject *__pyx_tuple__487; static PyObject *__pyx_tuple__488; -static PyObject *__pyx_tuple__489; static PyObject *__pyx_tuple__490; static PyObject *__pyx_tuple__491; static PyObject *__pyx_tuple__492; static PyObject *__pyx_tuple__493; static PyObject *__pyx_tuple__494; -static PyObject *__pyx_tuple__495; static PyObject *__pyx_tuple__496; -static PyObject *__pyx_tuple__497; static PyObject *__pyx_tuple__498; static PyObject *__pyx_tuple__499; static PyObject *__pyx_tuple__500; static PyObject *__pyx_tuple__501; -static PyObject *__pyx_tuple__502; static PyObject *__pyx_tuple__503; -static PyObject *__pyx_tuple__504; static PyObject *__pyx_tuple__505; -static PyObject *__pyx_tuple__506; static PyObject *__pyx_tuple__507; -static PyObject *__pyx_tuple__508; static PyObject *__pyx_tuple__509; static PyObject *__pyx_tuple__510; static PyObject *__pyx_tuple__511; -static PyObject *__pyx_tuple__512; static PyObject *__pyx_tuple__513; -static PyObject *__pyx_tuple__514; static PyObject *__pyx_tuple__515; -static PyObject *__pyx_tuple__516; static PyObject *__pyx_tuple__517; -static PyObject *__pyx_tuple__518; static PyObject *__pyx_tuple__519; static PyObject *__pyx_tuple__520; -static PyObject *__pyx_tuple__521; static PyObject *__pyx_tuple__522; static PyObject *__pyx_tuple__523; -static PyObject *__pyx_tuple__524; static PyObject *__pyx_tuple__525; static PyObject *__pyx_tuple__526; -static PyObject *__pyx_tuple__527; static PyObject *__pyx_tuple__528; -static PyObject *__pyx_tuple__529; static PyObject *__pyx_tuple__530; -static PyObject *__pyx_tuple__531; static PyObject *__pyx_tuple__532; -static PyObject *__pyx_tuple__533; static PyObject *__pyx_tuple__534; -static PyObject *__pyx_tuple__535; static PyObject *__pyx_tuple__536; -static PyObject *__pyx_tuple__537; static PyObject *__pyx_tuple__538; -static PyObject *__pyx_tuple__539; static PyObject *__pyx_tuple__540; -static PyObject *__pyx_tuple__541; static PyObject *__pyx_tuple__542; -static PyObject *__pyx_tuple__543; static PyObject *__pyx_tuple__544; -static PyObject *__pyx_tuple__545; static PyObject *__pyx_tuple__546; static PyObject *__pyx_tuple__547; -static PyObject *__pyx_tuple__548; static PyObject *__pyx_tuple__549; -static PyObject *__pyx_tuple__550; static PyObject *__pyx_tuple__551; -static PyObject *__pyx_tuple__552; static PyObject *__pyx_tuple__553; static PyObject *__pyx_tuple__554; -static PyObject *__pyx_tuple__555; static PyObject *__pyx_tuple__556; static PyObject *__pyx_tuple__557; -static PyObject *__pyx_tuple__558; static PyObject *__pyx_tuple__559; -static PyObject *__pyx_tuple__560; static PyObject *__pyx_tuple__561; -static PyObject *__pyx_tuple__562; static PyObject *__pyx_tuple__563; -static PyObject *__pyx_tuple__564; static PyObject *__pyx_tuple__565; -static PyObject *__pyx_tuple__566; static PyObject *__pyx_tuple__567; -static PyObject *__pyx_tuple__568; static PyObject *__pyx_tuple__569; -static PyObject *__pyx_tuple__570; static PyObject *__pyx_tuple__571; -static PyObject *__pyx_tuple__572; static PyObject *__pyx_tuple__573; -static PyObject *__pyx_tuple__574; static PyObject *__pyx_tuple__575; -static PyObject *__pyx_tuple__576; -static PyObject *__pyx_tuple__577; static PyObject *__pyx_tuple__578; -static PyObject *__pyx_tuple__579; static PyObject *__pyx_tuple__580; static PyObject *__pyx_tuple__581; -static PyObject *__pyx_tuple__582; static PyObject *__pyx_tuple__583; -static PyObject *__pyx_tuple__584; static PyObject *__pyx_tuple__585; -static PyObject *__pyx_tuple__586; static PyObject *__pyx_tuple__587; -static PyObject *__pyx_tuple__588; static PyObject *__pyx_tuple__589; -static PyObject *__pyx_tuple__590; static PyObject *__pyx_tuple__591; -static PyObject *__pyx_tuple__592; static PyObject *__pyx_tuple__593; -static PyObject *__pyx_tuple__594; static PyObject *__pyx_tuple__595; -static PyObject *__pyx_tuple__596; static PyObject *__pyx_tuple__597; static PyObject *__pyx_tuple__598; -static PyObject *__pyx_tuple__599; static PyObject *__pyx_tuple__600; -static PyObject *__pyx_tuple__601; static PyObject *__pyx_tuple__602; -static PyObject *__pyx_tuple__603; static PyObject *__pyx_tuple__604; -static PyObject *__pyx_tuple__605; static PyObject *__pyx_tuple__606; -static PyObject *__pyx_tuple__607; static PyObject *__pyx_tuple__608; -static PyObject *__pyx_tuple__609; static PyObject *__pyx_tuple__610; -static PyObject *__pyx_tuple__611; static PyObject *__pyx_tuple__612; -static PyObject *__pyx_tuple__613; static PyObject *__pyx_tuple__614; -static PyObject *__pyx_tuple__615; static PyObject *__pyx_tuple__616; -static PyObject *__pyx_tuple__617; static PyObject *__pyx_tuple__618; static PyObject *__pyx_tuple__619; -static PyObject *__pyx_tuple__620; static PyObject *__pyx_tuple__621; static PyObject *__pyx_tuple__622; -static PyObject *__pyx_tuple__623; static PyObject *__pyx_tuple__624; static PyObject *__pyx_tuple__625; -static PyObject *__pyx_tuple__626; static PyObject *__pyx_tuple__627; static PyObject *__pyx_tuple__628; -static PyObject *__pyx_tuple__629; static PyObject *__pyx_tuple__630; -static PyObject *__pyx_tuple__631; static PyObject *__pyx_tuple__632; static PyObject *__pyx_tuple__633; -static PyObject *__pyx_tuple__634; static PyObject *__pyx_tuple__635; -static PyObject *__pyx_tuple__636; static PyObject *__pyx_tuple__637; -static PyObject *__pyx_tuple__638; static PyObject *__pyx_tuple__639; -static PyObject *__pyx_tuple__640; static PyObject *__pyx_tuple__641; -static PyObject *__pyx_tuple__642; -static PyObject *__pyx_tuple__643; -static PyObject *__pyx_tuple__644; -static PyObject *__pyx_tuple__645; -static PyObject *__pyx_tuple__646; -static PyObject *__pyx_tuple__647; -static PyObject *__pyx_tuple__648; -static PyObject *__pyx_tuple__649; -static PyObject *__pyx_tuple__650; -static PyObject *__pyx_tuple__651; -static PyObject *__pyx_tuple__652; -static PyObject *__pyx_tuple__653; -static PyObject *__pyx_tuple__654; -static PyObject *__pyx_tuple__655; -static PyObject *__pyx_tuple__656; -static PyObject *__pyx_tuple__657; -static PyObject *__pyx_tuple__658; -static PyObject *__pyx_tuple__659; -static PyObject *__pyx_tuple__660; -static PyObject *__pyx_tuple__661; -static PyObject *__pyx_tuple__662; -static PyObject *__pyx_tuple__664; -static PyObject *__pyx_tuple__666; -static PyObject *__pyx_tuple__667; -static PyObject *__pyx_tuple__668; -static PyObject *__pyx_tuple__669; -static PyObject *__pyx_tuple__670; -static PyObject *__pyx_tuple__671; -static PyObject *__pyx_tuple__672; -static PyObject *__pyx_tuple__673; -static PyObject *__pyx_tuple__674; -static PyObject *__pyx_tuple__675; -static PyObject *__pyx_tuple__676; -static PyObject *__pyx_tuple__677; -static PyObject *__pyx_tuple__678; -static PyObject *__pyx_tuple__679; -static PyObject *__pyx_tuple__680; -static PyObject *__pyx_tuple__681; -static PyObject *__pyx_tuple__682; -static PyObject *__pyx_tuple__683; -static PyObject *__pyx_tuple__684; -static PyObject *__pyx_tuple__685; -static PyObject *__pyx_tuple__686; -static PyObject *__pyx_tuple__687; -static PyObject *__pyx_tuple__688; -static PyObject *__pyx_tuple__689; -static PyObject *__pyx_tuple__690; -static PyObject *__pyx_tuple__691; -static PyObject *__pyx_tuple__692; -static PyObject *__pyx_tuple__693; -static PyObject *__pyx_tuple__694; -static PyObject *__pyx_tuple__695; -static PyObject *__pyx_tuple__696; -static PyObject *__pyx_tuple__697; -static PyObject *__pyx_tuple__698; -static PyObject *__pyx_tuple__699; -static PyObject *__pyx_tuple__700; -static PyObject *__pyx_codeobj__32; -static PyObject *__pyx_codeobj__34; -static PyObject *__pyx_codeobj__35; -static PyObject *__pyx_codeobj__36; -static PyObject *__pyx_codeobj__38; -static PyObject *__pyx_codeobj__39; -static PyObject *__pyx_codeobj__40; -static PyObject *__pyx_codeobj__41; -static PyObject *__pyx_codeobj__42; -static PyObject *__pyx_codeobj__43; -static PyObject *__pyx_codeobj__44; -static PyObject *__pyx_codeobj__45; -static PyObject *__pyx_codeobj__46; -static PyObject *__pyx_codeobj__47; -static PyObject *__pyx_codeobj__48; -static PyObject *__pyx_codeobj__49; -static PyObject *__pyx_codeobj__50; -static PyObject *__pyx_codeobj__51; -static PyObject *__pyx_codeobj__52; -static PyObject *__pyx_codeobj__53; -static PyObject *__pyx_codeobj__55; -static PyObject *__pyx_codeobj__58; +static PyObject *__pyx_codeobj__57; +static PyObject *__pyx_codeobj__60; +static PyObject *__pyx_codeobj__63; +static PyObject *__pyx_codeobj__64; +static PyObject *__pyx_codeobj__65; static PyObject *__pyx_codeobj__66; static PyObject *__pyx_codeobj__67; static PyObject *__pyx_codeobj__68; static PyObject *__pyx_codeobj__69; static PyObject *__pyx_codeobj__70; static PyObject *__pyx_codeobj__71; -static PyObject *__pyx_codeobj__72; -static PyObject *__pyx_codeobj__73; -static PyObject *__pyx_codeobj__74; -static PyObject *__pyx_codeobj__75; -static PyObject *__pyx_codeobj__76; -static PyObject *__pyx_codeobj__77; -static PyObject *__pyx_codeobj__79; -static PyObject *__pyx_codeobj__80; -static PyObject *__pyx_codeobj__81; static PyObject *__pyx_codeobj__82; static PyObject *__pyx_codeobj__83; static PyObject *__pyx_codeobj__84; static PyObject *__pyx_codeobj__85; -static PyObject *__pyx_codeobj__86; -static PyObject *__pyx_codeobj__87; -static PyObject *__pyx_codeobj__88; -static PyObject *__pyx_codeobj__89; static PyObject *__pyx_codeobj__90; -static PyObject *__pyx_codeobj__91; static PyObject *__pyx_codeobj__92; -static PyObject *__pyx_codeobj__93; static PyObject *__pyx_codeobj__94; -static PyObject *__pyx_codeobj__95; static PyObject *__pyx_codeobj__96; -static PyObject *__pyx_codeobj__97; static PyObject *__pyx_codeobj__98; -static PyObject *__pyx_codeobj__99; static PyObject *__pyx_codeobj__100; -static PyObject *__pyx_codeobj__101; -static PyObject *__pyx_codeobj__102; -static PyObject *__pyx_codeobj__103; static PyObject *__pyx_codeobj__104; -static PyObject *__pyx_codeobj__105; static PyObject *__pyx_codeobj__106; -static PyObject *__pyx_codeobj__107; static PyObject *__pyx_codeobj__108; -static PyObject *__pyx_codeobj__109; static PyObject *__pyx_codeobj__110; -static PyObject *__pyx_codeobj__111; +static PyObject *__pyx_codeobj__112; +static PyObject *__pyx_codeobj__114; static PyObject *__pyx_codeobj__116; -static PyObject *__pyx_codeobj__117; static PyObject *__pyx_codeobj__118; -static PyObject *__pyx_codeobj__119; static PyObject *__pyx_codeobj__120; -static PyObject *__pyx_codeobj__121; +static PyObject *__pyx_codeobj__122; +static PyObject *__pyx_codeobj__124; static PyObject *__pyx_codeobj__126; -static PyObject *__pyx_codeobj__127; -static PyObject *__pyx_codeobj__131; +static PyObject *__pyx_codeobj__128; +static PyObject *__pyx_codeobj__130; static PyObject *__pyx_codeobj__132; -static PyObject *__pyx_codeobj__133; -static PyObject *__pyx_codeobj__135; -static PyObject *__pyx_codeobj__137; -static PyObject *__pyx_codeobj__139; -static PyObject *__pyx_codeobj__141; +static PyObject *__pyx_codeobj__134; +static PyObject *__pyx_codeobj__136; +static PyObject *__pyx_codeobj__138; +static PyObject *__pyx_codeobj__140; static PyObject *__pyx_codeobj__142; -static PyObject *__pyx_codeobj__143; static PyObject *__pyx_codeobj__144; -static PyObject *__pyx_codeobj__145; static PyObject *__pyx_codeobj__146; -static PyObject *__pyx_codeobj__147; -static PyObject *__pyx_codeobj__148; -static PyObject *__pyx_codeobj__149; -static PyObject *__pyx_codeobj__150; -static PyObject *__pyx_codeobj__151; -static PyObject *__pyx_codeobj__152; static PyObject *__pyx_codeobj__153; -static PyObject *__pyx_codeobj__154; static PyObject *__pyx_codeobj__155; -static PyObject *__pyx_codeobj__156; static PyObject *__pyx_codeobj__157; -static PyObject *__pyx_codeobj__158; static PyObject *__pyx_codeobj__159; -static PyObject *__pyx_codeobj__164; +static PyObject *__pyx_codeobj__161; +static PyObject *__pyx_codeobj__163; static PyObject *__pyx_codeobj__165; +static PyObject *__pyx_codeobj__167; static PyObject *__pyx_codeobj__169; -static PyObject *__pyx_codeobj__172; +static PyObject *__pyx_codeobj__171; static PyObject *__pyx_codeobj__173; -static PyObject *__pyx_codeobj__174; static PyObject *__pyx_codeobj__175; -static PyObject *__pyx_codeobj__176; static PyObject *__pyx_codeobj__177; -static PyObject *__pyx_codeobj__178; -static PyObject *__pyx_codeobj__180; +static PyObject *__pyx_codeobj__179; static PyObject *__pyx_codeobj__181; -static PyObject *__pyx_codeobj__182; -static PyObject *__pyx_codeobj__186; +static PyObject *__pyx_codeobj__183; +static PyObject *__pyx_codeobj__185; static PyObject *__pyx_codeobj__187; -static PyObject *__pyx_codeobj__188; static PyObject *__pyx_codeobj__189; -static PyObject *__pyx_codeobj__192; +static PyObject *__pyx_codeobj__191; static PyObject *__pyx_codeobj__193; -static PyObject *__pyx_codeobj__194; -static PyObject *__pyx_codeobj__196; +static PyObject *__pyx_codeobj__195; static PyObject *__pyx_codeobj__197; -static PyObject *__pyx_codeobj__198; static PyObject *__pyx_codeobj__199; -static PyObject *__pyx_codeobj__200; static PyObject *__pyx_codeobj__201; -static PyObject *__pyx_codeobj__202; static PyObject *__pyx_codeobj__203; -static PyObject *__pyx_codeobj__204; static PyObject *__pyx_codeobj__205; -static PyObject *__pyx_codeobj__206; static PyObject *__pyx_codeobj__207; -static PyObject *__pyx_codeobj__208; static PyObject *__pyx_codeobj__209; -static PyObject *__pyx_codeobj__210; static PyObject *__pyx_codeobj__211; -static PyObject *__pyx_codeobj__212; +static PyObject *__pyx_codeobj__213; static PyObject *__pyx_codeobj__215; -static PyObject *__pyx_codeobj__216; static PyObject *__pyx_codeobj__217; -static PyObject *__pyx_codeobj__218; static PyObject *__pyx_codeobj__219; -static PyObject *__pyx_codeobj__220; static PyObject *__pyx_codeobj__221; -static PyObject *__pyx_codeobj__222; static PyObject *__pyx_codeobj__223; -static PyObject *__pyx_codeobj__224; static PyObject *__pyx_codeobj__225; -static PyObject *__pyx_codeobj__226; static PyObject *__pyx_codeobj__227; -static PyObject *__pyx_codeobj__228; static PyObject *__pyx_codeobj__229; -static PyObject *__pyx_codeobj__230; static PyObject *__pyx_codeobj__231; -static PyObject *__pyx_codeobj__232; +static PyObject *__pyx_codeobj__233; static PyObject *__pyx_codeobj__235; -static PyObject *__pyx_codeobj__236; static PyObject *__pyx_codeobj__237; -static PyObject *__pyx_codeobj__238; static PyObject *__pyx_codeobj__239; -static PyObject *__pyx_codeobj__240; -static PyObject *__pyx_codeobj__242; +static PyObject *__pyx_codeobj__241; static PyObject *__pyx_codeobj__243; -static PyObject *__pyx_codeobj__244; -static PyObject *__pyx_codeobj__246; -static PyObject *__pyx_codeobj__248; +static PyObject *__pyx_codeobj__245; +static PyObject *__pyx_codeobj__247; static PyObject *__pyx_codeobj__249; -static PyObject *__pyx_codeobj__250; static PyObject *__pyx_codeobj__251; static PyObject *__pyx_codeobj__253; -static PyObject *__pyx_codeobj__254; static PyObject *__pyx_codeobj__255; -static PyObject *__pyx_codeobj__258; +static PyObject *__pyx_codeobj__257; static PyObject *__pyx_codeobj__259; -static PyObject *__pyx_codeobj__260; +static PyObject *__pyx_codeobj__261; static PyObject *__pyx_codeobj__263; -static PyObject *__pyx_codeobj__264; +static PyObject *__pyx_codeobj__265; static PyObject *__pyx_codeobj__267; static PyObject *__pyx_codeobj__269; -static PyObject *__pyx_codeobj__270; +static PyObject *__pyx_codeobj__271; +static PyObject *__pyx_codeobj__273; +static PyObject *__pyx_codeobj__275; static PyObject *__pyx_codeobj__277; -static PyObject *__pyx_codeobj__280; +static PyObject *__pyx_codeobj__279; +static PyObject *__pyx_codeobj__281; static PyObject *__pyx_codeobj__283; -static PyObject *__pyx_codeobj__284; static PyObject *__pyx_codeobj__285; -static PyObject *__pyx_codeobj__286; static PyObject *__pyx_codeobj__287; -static PyObject *__pyx_codeobj__288; static PyObject *__pyx_codeobj__289; -static PyObject *__pyx_codeobj__290; static PyObject *__pyx_codeobj__291; -static PyObject *__pyx_codeobj__292; static PyObject *__pyx_codeobj__293; -static PyObject *__pyx_codeobj__294; static PyObject *__pyx_codeobj__295; -static PyObject *__pyx_codeobj__296; -static PyObject *__pyx_codeobj__298; +static PyObject *__pyx_codeobj__297; +static PyObject *__pyx_codeobj__299; static PyObject *__pyx_codeobj__301; -static PyObject *__pyx_codeobj__302; -static PyObject *__pyx_codeobj__304; +static PyObject *__pyx_codeobj__303; static PyObject *__pyx_codeobj__305; -static PyObject *__pyx_codeobj__310; -static PyObject *__pyx_codeobj__312; -static PyObject *__pyx_codeobj__315; -static PyObject *__pyx_codeobj__316; +static PyObject *__pyx_codeobj__307; +static PyObject *__pyx_codeobj__309; +static PyObject *__pyx_codeobj__311; +static PyObject *__pyx_codeobj__314; static PyObject *__pyx_codeobj__317; -static PyObject *__pyx_codeobj__318; -static PyObject *__pyx_codeobj__319; static PyObject *__pyx_codeobj__320; static PyObject *__pyx_codeobj__322; -static PyObject *__pyx_codeobj__323; static PyObject *__pyx_codeobj__325; -static PyObject *__pyx_codeobj__326; -static PyObject *__pyx_codeobj__327; static PyObject *__pyx_codeobj__328; -static PyObject *__pyx_codeobj__329; -static PyObject *__pyx_codeobj__330; static PyObject *__pyx_codeobj__331; -static PyObject *__pyx_codeobj__332; static PyObject *__pyx_codeobj__334; -static PyObject *__pyx_codeobj__335; -static PyObject *__pyx_codeobj__338; -static PyObject *__pyx_codeobj__339; +static PyObject *__pyx_codeobj__337; static PyObject *__pyx_codeobj__340; -static PyObject *__pyx_codeobj__341; static PyObject *__pyx_codeobj__342; -static PyObject *__pyx_codeobj__343; static PyObject *__pyx_codeobj__344; -static PyObject *__pyx_codeobj__345; -static PyObject *__pyx_codeobj__351; -static PyObject *__pyx_codeobj__352; -static PyObject *__pyx_codeobj__354; -static PyObject *__pyx_codeobj__355; +static PyObject *__pyx_codeobj__346; +static PyObject *__pyx_codeobj__348; +static PyObject *__pyx_codeobj__350; +static PyObject *__pyx_codeobj__353; static PyObject *__pyx_codeobj__356; -static PyObject *__pyx_codeobj__357; -static PyObject *__pyx_codeobj__359; -static PyObject *__pyx_codeobj__361; -static PyObject *__pyx_codeobj__363; +static PyObject *__pyx_codeobj__358; +static PyObject *__pyx_codeobj__360; +static PyObject *__pyx_codeobj__362; static PyObject *__pyx_codeobj__364; -static PyObject *__pyx_codeobj__365; static PyObject *__pyx_codeobj__366; -static PyObject *__pyx_codeobj__367; -static PyObject *__pyx_codeobj__369; +static PyObject *__pyx_codeobj__368; static PyObject *__pyx_codeobj__370; -static PyObject *__pyx_codeobj__371; static PyObject *__pyx_codeobj__372; -static PyObject *__pyx_codeobj__373; static PyObject *__pyx_codeobj__374; -static PyObject *__pyx_codeobj__375; static PyObject *__pyx_codeobj__376; -static PyObject *__pyx_codeobj__377; +static PyObject *__pyx_codeobj__378; static PyObject *__pyx_codeobj__380; -static PyObject *__pyx_codeobj__381; static PyObject *__pyx_codeobj__382; -static PyObject *__pyx_codeobj__383; -static PyObject *__pyx_codeobj__391; -static PyObject *__pyx_codeobj__394; +static PyObject *__pyx_codeobj__384; +static PyObject *__pyx_codeobj__386; +static PyObject *__pyx_codeobj__388; +static PyObject *__pyx_codeobj__390; +static PyObject *__pyx_codeobj__392; static PyObject *__pyx_codeobj__395; -static PyObject *__pyx_codeobj__396; static PyObject *__pyx_codeobj__397; -static PyObject *__pyx_codeobj__398; +static PyObject *__pyx_codeobj__399; +static PyObject *__pyx_codeobj__401; +static PyObject *__pyx_codeobj__403; +static PyObject *__pyx_codeobj__405; +static PyObject *__pyx_codeobj__407; +static PyObject *__pyx_codeobj__409; +static PyObject *__pyx_codeobj__411; +static PyObject *__pyx_codeobj__413; +static PyObject *__pyx_codeobj__415; +static PyObject *__pyx_codeobj__417; +static PyObject *__pyx_codeobj__419; +static PyObject *__pyx_codeobj__421; +static PyObject *__pyx_codeobj__423; +static PyObject *__pyx_codeobj__425; +static PyObject *__pyx_codeobj__427; +static PyObject *__pyx_codeobj__430; +static PyObject *__pyx_codeobj__432; +static PyObject *__pyx_codeobj__434; +static PyObject *__pyx_codeobj__436; +static PyObject *__pyx_codeobj__438; +static PyObject *__pyx_codeobj__440; +static PyObject *__pyx_codeobj__442; +static PyObject *__pyx_codeobj__444; +static PyObject *__pyx_codeobj__446; +static PyObject *__pyx_codeobj__448; +static PyObject *__pyx_codeobj__450; +static PyObject *__pyx_codeobj__452; +static PyObject *__pyx_codeobj__455; +static PyObject *__pyx_codeobj__457; +static PyObject *__pyx_codeobj__459; +static PyObject *__pyx_codeobj__461; +static PyObject *__pyx_codeobj__463; +static PyObject *__pyx_codeobj__465; +static PyObject *__pyx_codeobj__467; +static PyObject *__pyx_codeobj__469; +static PyObject *__pyx_codeobj__471; +static PyObject *__pyx_codeobj__475; +static PyObject *__pyx_codeobj__477; +static PyObject *__pyx_codeobj__479; +static PyObject *__pyx_codeobj__481; +static PyObject *__pyx_codeobj__483; +static PyObject *__pyx_codeobj__485; +static PyObject *__pyx_codeobj__487; +static PyObject *__pyx_codeobj__489; +static PyObject *__pyx_codeobj__495; +static PyObject *__pyx_codeobj__497; +static PyObject *__pyx_codeobj__502; +static PyObject *__pyx_codeobj__504; +static PyObject *__pyx_codeobj__506; +static PyObject *__pyx_codeobj__508; +static PyObject *__pyx_codeobj__512; +static PyObject *__pyx_codeobj__514; +static PyObject *__pyx_codeobj__516; +static PyObject *__pyx_codeobj__518; +static PyObject *__pyx_codeobj__521; +static PyObject *__pyx_codeobj__524; +static PyObject *__pyx_codeobj__527; +static PyObject *__pyx_codeobj__529; +static PyObject *__pyx_codeobj__531; +static PyObject *__pyx_codeobj__533; +static PyObject *__pyx_codeobj__535; +static PyObject *__pyx_codeobj__537; +static PyObject *__pyx_codeobj__539; +static PyObject *__pyx_codeobj__541; +static PyObject *__pyx_codeobj__543; +static PyObject *__pyx_codeobj__545; +static PyObject *__pyx_codeobj__548; +static PyObject *__pyx_codeobj__550; +static PyObject *__pyx_codeobj__552; +static PyObject *__pyx_codeobj__555; +static PyObject *__pyx_codeobj__558; +static PyObject *__pyx_codeobj__560; +static PyObject *__pyx_codeobj__562; +static PyObject *__pyx_codeobj__564; +static PyObject *__pyx_codeobj__566; +static PyObject *__pyx_codeobj__568; +static PyObject *__pyx_codeobj__570; +static PyObject *__pyx_codeobj__572; +static PyObject *__pyx_codeobj__574; +static PyObject *__pyx_codeobj__576; +static PyObject *__pyx_codeobj__582; +static PyObject *__pyx_codeobj__584; +static PyObject *__pyx_codeobj__586; +static PyObject *__pyx_codeobj__588; +static PyObject *__pyx_codeobj__590; +static PyObject *__pyx_codeobj__592; +static PyObject *__pyx_codeobj__594; +static PyObject *__pyx_codeobj__596; +static PyObject *__pyx_codeobj__599; +static PyObject *__pyx_codeobj__601; +static PyObject *__pyx_codeobj__603; +static PyObject *__pyx_codeobj__605; +static PyObject *__pyx_codeobj__607; +static PyObject *__pyx_codeobj__609; +static PyObject *__pyx_codeobj__611; +static PyObject *__pyx_codeobj__613; +static PyObject *__pyx_codeobj__615; +static PyObject *__pyx_codeobj__617; +static PyObject *__pyx_codeobj__620; +static PyObject *__pyx_codeobj__623; +static PyObject *__pyx_codeobj__626; +static PyObject *__pyx_codeobj__629; +static PyObject *__pyx_codeobj__631; +static PyObject *__pyx_codeobj__634; +static PyObject *__pyx_codeobj__636; +static PyObject *__pyx_codeobj__638; +static PyObject *__pyx_codeobj__640; +static PyObject *__pyx_codeobj__642; /* Late includes */ -/* "lxml/etree.pyx":97 +/* "lxml/etree.pyx":95 * * class _ImmutableMapping(MutableMapping): * def __getitem__(self, key): # <<<<<<<<<<<<<< @@ -11358,7 +11266,7 @@ static PyObject *__pyx_codeobj__398; /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_17_ImmutableMapping_1__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_5etree_17_ImmutableMapping_1__getitem__ = {"__getitem__", (PyCFunction)__pyx_pw_4lxml_5etree_17_ImmutableMapping_1__getitem__, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_5etree_17_ImmutableMapping_1__getitem__ = {"__getitem__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_17_ImmutableMapping_1__getitem__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_5etree_17_ImmutableMapping_1__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_self = 0; PyObject *__pyx_v_key = 0; @@ -11388,11 +11296,11 @@ static PyObject *__pyx_pw_4lxml_5etree_17_ImmutableMapping_1__getitem__(PyObject case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(0, 97, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(0, 95, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) __PYX_ERR(0, 97, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) __PYX_ERR(0, 95, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -11405,7 +11313,7 @@ static PyObject *__pyx_pw_4lxml_5etree_17_ImmutableMapping_1__getitem__(PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 97, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 95, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._ImmutableMapping.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -11420,24 +11328,20 @@ static PyObject *__pyx_pw_4lxml_5etree_17_ImmutableMapping_1__getitem__(PyObject static PyObject *__pyx_pf_4lxml_5etree_17_ImmutableMapping___getitem__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_key) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - __Pyx_TraceFrameInit(__pyx_codeobj_) __Pyx_RefNannySetupContext("__getitem__", 0); - __Pyx_TraceCall("__getitem__", __pyx_f[0], 97, 0, __PYX_ERR(0, 97, __pyx_L1_error)); - /* "lxml/etree.pyx":98 + /* "lxml/etree.pyx":96 * class _ImmutableMapping(MutableMapping): * def __getitem__(self, key): * raise KeyError, key # <<<<<<<<<<<<<< * * def __setitem__(self, key, value): */ - __Pyx_TraceLine(98,0,__PYX_ERR(0, 98, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_KeyError, __pyx_v_key, 0, 0); - __PYX_ERR(0, 98, __pyx_L1_error) + __PYX_ERR(0, 96, __pyx_L1_error) - /* "lxml/etree.pyx":97 + /* "lxml/etree.pyx":95 * * class _ImmutableMapping(MutableMapping): * def __getitem__(self, key): # <<<<<<<<<<<<<< @@ -11450,12 +11354,11 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ImmutableMapping___getitem__(CYTHON_UN __Pyx_AddTraceback("lxml.etree._ImmutableMapping.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":100 +/* "lxml/etree.pyx":98 * raise KeyError, key * * def __setitem__(self, key, value): # <<<<<<<<<<<<<< @@ -11465,7 +11368,7 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ImmutableMapping___getitem__(CYTHON_UN /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_17_ImmutableMapping_3__setitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_5etree_17_ImmutableMapping_3__setitem__ = {"__setitem__", (PyCFunction)__pyx_pw_4lxml_5etree_17_ImmutableMapping_3__setitem__, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_5etree_17_ImmutableMapping_3__setitem__ = {"__setitem__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_17_ImmutableMapping_3__setitem__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_5etree_17_ImmutableMapping_3__setitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_self = 0; PyObject *__pyx_v_key = 0; @@ -11498,17 +11401,17 @@ static PyObject *__pyx_pw_4lxml_5etree_17_ImmutableMapping_3__setitem__(PyObject case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__setitem__", 1, 3, 3, 1); __PYX_ERR(0, 100, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__setitem__", 1, 3, 3, 1); __PYX_ERR(0, 98, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__setitem__", 1, 3, 3, 2); __PYX_ERR(0, 100, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__setitem__", 1, 3, 3, 2); __PYX_ERR(0, 98, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__setitem__") < 0)) __PYX_ERR(0, 100, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__setitem__") < 0)) __PYX_ERR(0, 98, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -11523,7 +11426,7 @@ static PyObject *__pyx_pw_4lxml_5etree_17_ImmutableMapping_3__setitem__(PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__setitem__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 100, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__setitem__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 98, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._ImmutableMapping.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -11538,24 +11441,20 @@ static PyObject *__pyx_pw_4lxml_5etree_17_ImmutableMapping_3__setitem__(PyObject static PyObject *__pyx_pf_4lxml_5etree_17_ImmutableMapping_2__setitem__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_key, CYTHON_UNUSED PyObject *__pyx_v_value) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - __Pyx_TraceFrameInit(__pyx_codeobj__2) __Pyx_RefNannySetupContext("__setitem__", 0); - __Pyx_TraceCall("__setitem__", __pyx_f[0], 100, 0, __PYX_ERR(0, 100, __pyx_L1_error)); - /* "lxml/etree.pyx":101 + /* "lxml/etree.pyx":99 * * def __setitem__(self, key, value): * raise KeyError, key # <<<<<<<<<<<<<< * * def __delitem__(self, key): */ - __Pyx_TraceLine(101,0,__PYX_ERR(0, 101, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_KeyError, __pyx_v_key, 0, 0); - __PYX_ERR(0, 101, __pyx_L1_error) + __PYX_ERR(0, 99, __pyx_L1_error) - /* "lxml/etree.pyx":100 + /* "lxml/etree.pyx":98 * raise KeyError, key * * def __setitem__(self, key, value): # <<<<<<<<<<<<<< @@ -11568,12 +11467,11 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ImmutableMapping_2__setitem__(CYTHON_U __Pyx_AddTraceback("lxml.etree._ImmutableMapping.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":103 +/* "lxml/etree.pyx":101 * raise KeyError, key * * def __delitem__(self, key): # <<<<<<<<<<<<<< @@ -11583,7 +11481,7 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ImmutableMapping_2__setitem__(CYTHON_U /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_17_ImmutableMapping_5__delitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_5etree_17_ImmutableMapping_5__delitem__ = {"__delitem__", (PyCFunction)__pyx_pw_4lxml_5etree_17_ImmutableMapping_5__delitem__, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_5etree_17_ImmutableMapping_5__delitem__ = {"__delitem__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_17_ImmutableMapping_5__delitem__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_5etree_17_ImmutableMapping_5__delitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_self = 0; PyObject *__pyx_v_key = 0; @@ -11613,11 +11511,11 @@ static PyObject *__pyx_pw_4lxml_5etree_17_ImmutableMapping_5__delitem__(PyObject case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__delitem__", 1, 2, 2, 1); __PYX_ERR(0, 103, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__delitem__", 1, 2, 2, 1); __PYX_ERR(0, 101, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__delitem__") < 0)) __PYX_ERR(0, 103, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__delitem__") < 0)) __PYX_ERR(0, 101, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -11630,7 +11528,7 @@ static PyObject *__pyx_pw_4lxml_5etree_17_ImmutableMapping_5__delitem__(PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__delitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 103, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__delitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 101, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._ImmutableMapping.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -11645,24 +11543,20 @@ static PyObject *__pyx_pw_4lxml_5etree_17_ImmutableMapping_5__delitem__(PyObject static PyObject *__pyx_pf_4lxml_5etree_17_ImmutableMapping_4__delitem__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_key) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - __Pyx_TraceFrameInit(__pyx_codeobj__3) __Pyx_RefNannySetupContext("__delitem__", 0); - __Pyx_TraceCall("__delitem__", __pyx_f[0], 103, 0, __PYX_ERR(0, 103, __pyx_L1_error)); - /* "lxml/etree.pyx":104 + /* "lxml/etree.pyx":102 * * def __delitem__(self, key): * raise KeyError, key # <<<<<<<<<<<<<< * * def __contains__(self, key): */ - __Pyx_TraceLine(104,0,__PYX_ERR(0, 104, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_KeyError, __pyx_v_key, 0, 0); - __PYX_ERR(0, 104, __pyx_L1_error) + __PYX_ERR(0, 102, __pyx_L1_error) - /* "lxml/etree.pyx":103 + /* "lxml/etree.pyx":101 * raise KeyError, key * * def __delitem__(self, key): # <<<<<<<<<<<<<< @@ -11675,12 +11569,11 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ImmutableMapping_4__delitem__(CYTHON_U __Pyx_AddTraceback("lxml.etree._ImmutableMapping.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":106 +/* "lxml/etree.pyx":104 * raise KeyError, key * * def __contains__(self, key): # <<<<<<<<<<<<<< @@ -11690,7 +11583,7 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ImmutableMapping_4__delitem__(CYTHON_U /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_17_ImmutableMapping_7__contains__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_5etree_17_ImmutableMapping_7__contains__ = {"__contains__", (PyCFunction)__pyx_pw_4lxml_5etree_17_ImmutableMapping_7__contains__, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_5etree_17_ImmutableMapping_7__contains__ = {"__contains__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_17_ImmutableMapping_7__contains__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_5etree_17_ImmutableMapping_7__contains__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_self = 0; CYTHON_UNUSED PyObject *__pyx_v_key = 0; @@ -11720,11 +11613,11 @@ static PyObject *__pyx_pw_4lxml_5etree_17_ImmutableMapping_7__contains__(PyObjec case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__contains__", 1, 2, 2, 1); __PYX_ERR(0, 106, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__contains__", 1, 2, 2, 1); __PYX_ERR(0, 104, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__contains__") < 0)) __PYX_ERR(0, 106, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__contains__") < 0)) __PYX_ERR(0, 104, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -11737,7 +11630,7 @@ static PyObject *__pyx_pw_4lxml_5etree_17_ImmutableMapping_7__contains__(PyObjec } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__contains__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 106, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__contains__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 104, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._ImmutableMapping.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -11752,26 +11645,22 @@ static PyObject *__pyx_pw_4lxml_5etree_17_ImmutableMapping_7__contains__(PyObjec static PyObject *__pyx_pf_4lxml_5etree_17_ImmutableMapping_6__contains__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_key) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - __Pyx_TraceFrameInit(__pyx_codeobj__4) __Pyx_RefNannySetupContext("__contains__", 0); - __Pyx_TraceCall("__contains__", __pyx_f[0], 106, 0, __PYX_ERR(0, 106, __pyx_L1_error)); - /* "lxml/etree.pyx":107 + /* "lxml/etree.pyx":105 * * def __contains__(self, key): * return False # <<<<<<<<<<<<<< * * def __len__(self): */ - __Pyx_TraceLine(107,0,__PYX_ERR(0, 107, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; - /* "lxml/etree.pyx":106 + /* "lxml/etree.pyx":104 * raise KeyError, key * * def __contains__(self, key): # <<<<<<<<<<<<<< @@ -11780,17 +11669,13 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ImmutableMapping_6__contains__(CYTHON_ */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._ImmutableMapping.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":109 +/* "lxml/etree.pyx":107 * return False * * def __len__(self): # <<<<<<<<<<<<<< @@ -11814,26 +11699,22 @@ static PyObject *__pyx_pw_4lxml_5etree_17_ImmutableMapping_9__len__(PyObject *__ static PyObject *__pyx_pf_4lxml_5etree_17_ImmutableMapping_8__len__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - __Pyx_TraceFrameInit(__pyx_codeobj__5) __Pyx_RefNannySetupContext("__len__", 0); - __Pyx_TraceCall("__len__", __pyx_f[0], 109, 0, __PYX_ERR(0, 109, __pyx_L1_error)); - /* "lxml/etree.pyx":110 + /* "lxml/etree.pyx":108 * * def __len__(self): * return 0 # <<<<<<<<<<<<<< * * def __iter__(self): */ - __Pyx_TraceLine(110,0,__PYX_ERR(0, 110, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_0); __pyx_r = __pyx_int_0; goto __pyx_L0; - /* "lxml/etree.pyx":109 + /* "lxml/etree.pyx":107 * return False * * def __len__(self): # <<<<<<<<<<<<<< @@ -11842,17 +11723,13 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ImmutableMapping_8__len__(CYTHON_UNUSE */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._ImmutableMapping.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":112 +/* "lxml/etree.pyx":110 * return 0 * * def __iter__(self): # <<<<<<<<<<<<<< @@ -11876,26 +11753,22 @@ static PyObject *__pyx_pw_4lxml_5etree_17_ImmutableMapping_11__iter__(PyObject * static PyObject *__pyx_pf_4lxml_5etree_17_ImmutableMapping_10__iter__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - __Pyx_TraceFrameInit(__pyx_codeobj__6) __Pyx_RefNannySetupContext("__iter__", 0); - __Pyx_TraceCall("__iter__", __pyx_f[0], 112, 0, __PYX_ERR(0, 112, __pyx_L1_error)); - /* "lxml/etree.pyx":113 + /* "lxml/etree.pyx":111 * * def __iter__(self): * return ITER_EMPTY # <<<<<<<<<<<<<< * iterkeys = itervalues = iteritems = __iter__ * */ - __Pyx_TraceLine(113,0,__PYX_ERR(0, 113, __pyx_L1_error)) __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":112 + /* "lxml/etree.pyx":110 * return 0 * * def __iter__(self): # <<<<<<<<<<<<<< @@ -11904,17 +11777,13 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ImmutableMapping_10__iter__(CYTHON_UNU */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._ImmutableMapping.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":176 +/* "lxml/etree.pyx":174 * cdef object _check_internal_prefix = re.compile(b"ns\d+$").match * * def register_namespace(prefix, uri): # <<<<<<<<<<<<<< @@ -11925,7 +11794,7 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ImmutableMapping_10__iter__(CYTHON_UNU /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_1register_namespace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_register_namespace[] = "Registers a namespace prefix that newly created Elements in that\n namespace will use. The registry is global, and any existing\n mapping for either the given prefix or the namespace URI will be\n removed.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_1register_namespace = {"register_namespace", (PyCFunction)__pyx_pw_4lxml_5etree_1register_namespace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_register_namespace}; +static PyMethodDef __pyx_mdef_4lxml_5etree_1register_namespace = {"register_namespace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_1register_namespace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_register_namespace}; static PyObject *__pyx_pw_4lxml_5etree_1register_namespace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_prefix = 0; PyObject *__pyx_v_uri = 0; @@ -11955,11 +11824,11 @@ static PyObject *__pyx_pw_4lxml_5etree_1register_namespace(PyObject *__pyx_self, case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_uri)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("register_namespace", 1, 2, 2, 1); __PYX_ERR(0, 176, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("register_namespace", 1, 2, 2, 1); __PYX_ERR(0, 174, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "register_namespace") < 0)) __PYX_ERR(0, 176, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "register_namespace") < 0)) __PYX_ERR(0, 174, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -11972,7 +11841,7 @@ static PyObject *__pyx_pw_4lxml_5etree_1register_namespace(PyObject *__pyx_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("register_namespace", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 176, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("register_namespace", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 174, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.register_namespace", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -11991,47 +11860,42 @@ static PyObject *__pyx_pf_4lxml_5etree_register_namespace(CYTHON_UNUSED PyObject PyObject *__pyx_v_k = NULL; PyObject *__pyx_v_v = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; + int __pyx_t_4; int __pyx_t_5; - int __pyx_t_6; - Py_ssize_t __pyx_t_7; + Py_ssize_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *(*__pyx_t_9)(PyObject *); int __pyx_t_10; - __Pyx_TraceFrameInit(__pyx_codeobj__7) __Pyx_RefNannySetupContext("register_namespace", 0); - __Pyx_TraceCall("register_namespace", __pyx_f[0], 176, 0, __PYX_ERR(0, 176, __pyx_L1_error)); - /* "lxml/etree.pyx":182 + /* "lxml/etree.pyx":180 * removed. * """ * prefix_utf, uri_utf = _utf8(prefix), _utf8(uri) # <<<<<<<<<<<<<< * if _check_internal_prefix(prefix_utf): * raise ValueError("Prefix format reserved for internal use") */ - __Pyx_TraceLine(182,0,__PYX_ERR(0, 182, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_prefix); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_prefix); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree__utf8(__pyx_v_uri); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__utf8(__pyx_v_uri); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_prefix_utf = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_v_uri_utf = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":183 + /* "lxml/etree.pyx":181 * """ * prefix_utf, uri_utf = _utf8(prefix), _utf8(uri) * if _check_internal_prefix(prefix_utf): # <<<<<<<<<<<<<< * raise ValueError("Prefix format reserved for internal use") * _tagValidOrRaise(prefix_utf) */ - __Pyx_TraceLine(183,0,__PYX_ERR(0, 183, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_4lxml_5etree__check_internal_prefix); __pyx_t_1 = __pyx_v_4lxml_5etree__check_internal_prefix; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { @@ -12043,58 +11907,29 @@ static PyObject *__pyx_pf_4lxml_5etree_register_namespace(CYTHON_UNUSED PyObject __Pyx_DECREF_SET(__pyx_t_1, function); } } - if (!__pyx_t_3) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_prefix_utf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_1)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_prefix_utf}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_prefix_utf}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 183, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_v_prefix_utf); - __Pyx_GIVEREF(__pyx_v_prefix_utf); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_prefix_utf); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_prefix_utf) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_prefix_utf); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 183, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(__pyx_t_5)) { + if (unlikely(__pyx_t_4)) { - /* "lxml/etree.pyx":184 + /* "lxml/etree.pyx":182 * prefix_utf, uri_utf = _utf8(prefix), _utf8(uri) * if _check_internal_prefix(prefix_utf): * raise ValueError("Prefix format reserved for internal use") # <<<<<<<<<<<<<< * _tagValidOrRaise(prefix_utf) * _uriValidOrRaise(uri_utf) */ - __Pyx_TraceLine(184,0,__PYX_ERR(0, 184, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __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, 184, __pyx_L1_error) + __PYX_ERR(0, 182, __pyx_L1_error) - /* "lxml/etree.pyx":183 + /* "lxml/etree.pyx":181 * """ * prefix_utf, uri_utf = _utf8(prefix), _utf8(uri) * if _check_internal_prefix(prefix_utf): # <<<<<<<<<<<<<< @@ -12103,51 +11938,48 @@ static PyObject *__pyx_pf_4lxml_5etree_register_namespace(CYTHON_UNUSED PyObject */ } - /* "lxml/etree.pyx":185 + /* "lxml/etree.pyx":183 * if _check_internal_prefix(prefix_utf): * raise ValueError("Prefix format reserved for internal use") * _tagValidOrRaise(prefix_utf) # <<<<<<<<<<<<<< * _uriValidOrRaise(uri_utf) * for k, v in list(_DEFAULT_NAMESPACE_PREFIXES.items()): */ - __Pyx_TraceLine(185,0,__PYX_ERR(0, 185, __pyx_L1_error)) - __pyx_t_6 = __pyx_f_4lxml_5etree__tagValidOrRaise(__pyx_v_prefix_utf); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 185, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree__tagValidOrRaise(__pyx_v_prefix_utf); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 183, __pyx_L1_error) - /* "lxml/etree.pyx":186 + /* "lxml/etree.pyx":184 * raise ValueError("Prefix format reserved for internal use") * _tagValidOrRaise(prefix_utf) * _uriValidOrRaise(uri_utf) # <<<<<<<<<<<<<< * for k, v in list(_DEFAULT_NAMESPACE_PREFIXES.items()): * if k == uri_utf or v == prefix_utf: */ - __Pyx_TraceLine(186,0,__PYX_ERR(0, 186, __pyx_L1_error)) - __pyx_t_6 = __pyx_f_4lxml_5etree__uriValidOrRaise(__pyx_v_uri_utf); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 186, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree__uriValidOrRaise(__pyx_v_uri_utf); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 184, __pyx_L1_error) - /* "lxml/etree.pyx":187 + /* "lxml/etree.pyx":185 * _tagValidOrRaise(prefix_utf) * _uriValidOrRaise(uri_utf) * for k, v in list(_DEFAULT_NAMESPACE_PREFIXES.items()): # <<<<<<<<<<<<<< * if k == uri_utf or v == prefix_utf: * del _DEFAULT_NAMESPACE_PREFIXES[k] */ - __Pyx_TraceLine(187,0,__PYX_ERR(0, 187, __pyx_L1_error)) if (unlikely(__pyx_v_4lxml_5etree__DEFAULT_NAMESPACE_PREFIXES == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); - __PYX_ERR(0, 187, __pyx_L1_error) + __PYX_ERR(0, 185, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_4lxml_5etree__DEFAULT_NAMESPACE_PREFIXES); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_4lxml_5etree__DEFAULT_NAMESPACE_PREFIXES); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error) + __pyx_t_1 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0; + __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { - if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break; + 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_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 187, __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, 185, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __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, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { @@ -12156,36 +11988,36 @@ static PyObject *__pyx_pf_4lxml_5etree_register_namespace(CYTHON_UNUSED PyObject if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 187, __pyx_L1_error) + __PYX_ERR(0, 185, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); } else { - __pyx_t_4 = PyList_GET_ITEM(sequence, 0); - __pyx_t_3 = PyList_GET_ITEM(sequence, 1); + __pyx_t_3 = PyList_GET_ITEM(sequence, 0); + __pyx_t_7 = PyList_GET_ITEM(sequence, 1); } - __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_7); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 187, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 187, __pyx_L1_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; - index = 0; __pyx_t_4 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed; - __Pyx_GOTREF(__pyx_t_4); - index = 1; __pyx_t_3 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed; + index = 0; __pyx_t_3 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 187, __pyx_L1_error) + 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, 185, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_unpacking_done; @@ -12193,48 +12025,46 @@ static PyObject *__pyx_pf_4lxml_5etree_register_namespace(CYTHON_UNUSED PyObject __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 187, __pyx_L1_error) + __PYX_ERR(0, 185, __pyx_L1_error) __pyx_L7_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_4); - __pyx_t_4 = 0; - __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7); + __pyx_t_7 = 0; - /* "lxml/etree.pyx":188 + /* "lxml/etree.pyx":186 * _uriValidOrRaise(uri_utf) * for k, v in list(_DEFAULT_NAMESPACE_PREFIXES.items()): * if k == uri_utf or v == prefix_utf: # <<<<<<<<<<<<<< * del _DEFAULT_NAMESPACE_PREFIXES[k] * _DEFAULT_NAMESPACE_PREFIXES[uri_utf] = prefix_utf */ - __Pyx_TraceLine(188,0,__PYX_ERR(0, 188, __pyx_L1_error)) - __pyx_t_10 = (__Pyx_PyBytes_Equals(__pyx_v_k, __pyx_v_uri_utf, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 188, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PyBytes_Equals(__pyx_v_k, __pyx_v_uri_utf, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 186, __pyx_L1_error) if (!__pyx_t_10) { } else { - __pyx_t_5 = __pyx_t_10; + __pyx_t_4 = __pyx_t_10; goto __pyx_L9_bool_binop_done; } - __pyx_t_10 = (__Pyx_PyBytes_Equals(__pyx_v_v, __pyx_v_prefix_utf, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 188, __pyx_L1_error) - __pyx_t_5 = __pyx_t_10; + __pyx_t_10 = (__Pyx_PyBytes_Equals(__pyx_v_v, __pyx_v_prefix_utf, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 186, __pyx_L1_error) + __pyx_t_4 = __pyx_t_10; __pyx_L9_bool_binop_done:; - if (__pyx_t_5) { + if (__pyx_t_4) { - /* "lxml/etree.pyx":189 + /* "lxml/etree.pyx":187 * for k, v in list(_DEFAULT_NAMESPACE_PREFIXES.items()): * if k == uri_utf or v == prefix_utf: * del _DEFAULT_NAMESPACE_PREFIXES[k] # <<<<<<<<<<<<<< * _DEFAULT_NAMESPACE_PREFIXES[uri_utf] = prefix_utf * */ - __Pyx_TraceLine(189,0,__PYX_ERR(0, 189, __pyx_L1_error)) if (unlikely(__pyx_v_4lxml_5etree__DEFAULT_NAMESPACE_PREFIXES == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 189, __pyx_L1_error) + __PYX_ERR(0, 187, __pyx_L1_error) } - if (unlikely(PyDict_DelItem(__pyx_v_4lxml_5etree__DEFAULT_NAMESPACE_PREFIXES, __pyx_v_k) < 0)) __PYX_ERR(0, 189, __pyx_L1_error) + if (unlikely(PyDict_DelItem(__pyx_v_4lxml_5etree__DEFAULT_NAMESPACE_PREFIXES, __pyx_v_k) < 0)) __PYX_ERR(0, 187, __pyx_L1_error) - /* "lxml/etree.pyx":188 + /* "lxml/etree.pyx":186 * _uriValidOrRaise(uri_utf) * for k, v in list(_DEFAULT_NAMESPACE_PREFIXES.items()): * if k == uri_utf or v == prefix_utf: # <<<<<<<<<<<<<< @@ -12243,32 +12073,30 @@ static PyObject *__pyx_pf_4lxml_5etree_register_namespace(CYTHON_UNUSED PyObject */ } - /* "lxml/etree.pyx":187 + /* "lxml/etree.pyx":185 * _tagValidOrRaise(prefix_utf) * _uriValidOrRaise(uri_utf) * for k, v in list(_DEFAULT_NAMESPACE_PREFIXES.items()): # <<<<<<<<<<<<<< * if k == uri_utf or v == prefix_utf: * del _DEFAULT_NAMESPACE_PREFIXES[k] */ - __Pyx_TraceLine(187,0,__PYX_ERR(0, 187, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":190 + /* "lxml/etree.pyx":188 * if k == uri_utf or v == prefix_utf: * del _DEFAULT_NAMESPACE_PREFIXES[k] * _DEFAULT_NAMESPACE_PREFIXES[uri_utf] = prefix_utf # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(190,0,__PYX_ERR(0, 190, __pyx_L1_error)) if (unlikely(__pyx_v_4lxml_5etree__DEFAULT_NAMESPACE_PREFIXES == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 190, __pyx_L1_error) + __PYX_ERR(0, 188, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_4lxml_5etree__DEFAULT_NAMESPACE_PREFIXES, __pyx_v_uri_utf, __pyx_v_prefix_utf) < 0)) __PYX_ERR(0, 190, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_4lxml_5etree__DEFAULT_NAMESPACE_PREFIXES, __pyx_v_uri_utf, __pyx_v_prefix_utf) < 0)) __PYX_ERR(0, 188, __pyx_L1_error) - /* "lxml/etree.pyx":176 + /* "lxml/etree.pyx":174 * cdef object _check_internal_prefix = re.compile(b"ns\d+$").match * * def register_namespace(prefix, uri): # <<<<<<<<<<<<<< @@ -12283,7 +12111,7 @@ static PyObject *__pyx_pf_4lxml_5etree_register_namespace(CYTHON_UNUSED PyObject __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("lxml.etree.register_namespace", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; @@ -12293,12 +12121,11 @@ static PyObject *__pyx_pf_4lxml_5etree_register_namespace(CYTHON_UNUSED PyObject __Pyx_XDECREF(__pyx_v_k); __Pyx_XDECREF(__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":202 +/* "lxml/etree.pyx":200 * this one. * """ * def __init__(self, message, error_log=None): # <<<<<<<<<<<<<< @@ -12342,7 +12169,7 @@ static int __pyx_pw_4lxml_5etree_9LxmlError_1__init__(PyObject *__pyx_v_self, Py } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 202, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 200, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -12358,7 +12185,7 @@ static int __pyx_pw_4lxml_5etree_9LxmlError_1__init__(PyObject *__pyx_v_self, Py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 202, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 200, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.LxmlError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -12373,26 +12200,22 @@ static int __pyx_pw_4lxml_5etree_9LxmlError_1__init__(PyObject *__pyx_v_self, Py static int __pyx_pf_4lxml_5etree_9LxmlError___init__(struct __pyx_obj_4lxml_5etree_LxmlError *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_error_log) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; + int __pyx_t_4; int __pyx_t_5; - int __pyx_t_6; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 202, 0, __PYX_ERR(0, 202, __pyx_L1_error)); - /* "lxml/etree.pyx":203 + /* "lxml/etree.pyx":201 * """ * def __init__(self, message, error_log=None): * super(_Error, self).__init__(message) # <<<<<<<<<<<<<< * if error_log is None: * self.error_log = __copyGlobalErrorLog() */ - __Pyx_TraceLine(203,0,__PYX_ERR(0, 203, __pyx_L1_error)) - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_4lxml_5etree__Error); __Pyx_GIVEREF(__pyx_v_4lxml_5etree__Error); @@ -12400,10 +12223,10 @@ static int __pyx_pf_4lxml_5etree_9LxmlError___init__(struct __pyx_obj_4lxml_5etr __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -12416,67 +12239,37 @@ static int __pyx_pf_4lxml_5etree_9LxmlError___init__(struct __pyx_obj_4lxml_5etr __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_message}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_message}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 203, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_v_message); - __Pyx_GIVEREF(__pyx_v_message); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_message); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_message) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_message); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __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/etree.pyx":204 + /* "lxml/etree.pyx":202 * def __init__(self, message, error_log=None): * super(_Error, self).__init__(message) * if error_log is None: # <<<<<<<<<<<<<< * self.error_log = __copyGlobalErrorLog() * else: */ - __Pyx_TraceLine(204,0,__PYX_ERR(0, 204, __pyx_L1_error)) - __pyx_t_5 = (__pyx_v_error_log == Py_None); - __pyx_t_6 = (__pyx_t_5 != 0); - if (__pyx_t_6) { + __pyx_t_4 = (__pyx_v_error_log == Py_None); + __pyx_t_5 = (__pyx_t_4 != 0); + if (__pyx_t_5) { - /* "lxml/etree.pyx":205 + /* "lxml/etree.pyx":203 * super(_Error, self).__init__(message) * if error_log is None: * self.error_log = __copyGlobalErrorLog() # <<<<<<<<<<<<<< * else: * self.error_log = error_log.copy() */ - __Pyx_TraceLine(205,0,__PYX_ERR(0, 205, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree___copyGlobalErrorLog(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree___copyGlobalErrorLog(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_error_log, __pyx_t_1) < 0) __PYX_ERR(0, 205, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_error_log, __pyx_t_1) < 0) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":204 + /* "lxml/etree.pyx":202 * def __init__(self, message, error_log=None): * super(_Error, self).__init__(message) * if error_log is None: # <<<<<<<<<<<<<< @@ -12486,41 +12279,37 @@ static int __pyx_pf_4lxml_5etree_9LxmlError___init__(struct __pyx_obj_4lxml_5etr goto __pyx_L3; } - /* "lxml/etree.pyx":207 + /* "lxml/etree.pyx":205 * self.error_log = __copyGlobalErrorLog() * else: * self.error_log = error_log.copy() # <<<<<<<<<<<<<< * * cdef object _Error = Error */ - __Pyx_TraceLine(207,0,__PYX_ERR(0, 207, __pyx_L1_error)) /*else*/ { - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_error_log, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 207, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_error_log, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = NULL; + __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_4)) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error) - } + __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, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_error_log, __pyx_t_1) < 0) __PYX_ERR(0, 207, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_error_log, __pyx_t_1) < 0) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L3:; - /* "lxml/etree.pyx":202 + /* "lxml/etree.pyx":200 * this one. * """ * def __init__(self, message, error_log=None): # <<<<<<<<<<<<<< @@ -12535,16 +12324,14 @@ static int __pyx_pf_4lxml_5etree_9LxmlError___init__(struct __pyx_obj_4lxml_5etr __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("lxml.etree.LxmlError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":222 +/* "lxml/etree.pyx":220 * * # version information * cdef __unpackDottedVersion(version): # <<<<<<<<<<<<<< @@ -12558,163 +12345,181 @@ static PyObject *__pyx_f_4lxml_5etree___unpackDottedVersion(PyObject *__pyx_v_ve PyObject *__pyx_v_item = NULL; PyObject *__pyx_v_count = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - Py_ssize_t __pyx_t_4; - PyObject *(*__pyx_t_5)(PyObject *); - PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + PyObject *(*__pyx_t_6)(PyObject *); PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; - int __pyx_t_9; - PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; - int __pyx_t_13; + PyObject *__pyx_t_13 = NULL; int __pyx_t_14; + int __pyx_t_15; __Pyx_RefNannySetupContext("__unpackDottedVersion", 0); - __Pyx_TraceCall("__unpackDottedVersion", __pyx_f[0], 222, 0, __PYX_ERR(0, 222, __pyx_L1_error)); - /* "lxml/etree.pyx":223 + /* "lxml/etree.pyx":221 * # version information * cdef __unpackDottedVersion(version): * version_list = [] # <<<<<<<<<<<<<< * l = (version.decode("ascii").replace(u'-', u'.').split(u'.') + [0]*4)[:4] * for item in l: */ - __Pyx_TraceLine(223,0,__PYX_ERR(0, 223, __pyx_L1_error)) - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_version_list = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":224 + /* "lxml/etree.pyx":222 * cdef __unpackDottedVersion(version): * version_list = [] * l = (version.decode("ascii").replace(u'-', u'.').split(u'.') + [0]*4)[:4] # <<<<<<<<<<<<<< * for item in l: * try: */ - __Pyx_TraceLine(224,0,__PYX_ERR(0, 224, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_version, __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_version, __pyx_n_s_decode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_n_s_ascii) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s_ascii); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_replace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 222, __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_tuple__12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 222, __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_tuple__13, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(1 * 4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_u__3) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__3); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyList_New(1 * 4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < 4; __pyx_temp++) { __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_int_0); + PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_int_0); } } - __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 224, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 4, NULL, NULL, &__pyx_slice__14, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_l = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_2, 0, 4, NULL, NULL, &__pyx_slice__5, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_l = __pyx_t_3; + __pyx_t_3 = 0; - /* "lxml/etree.pyx":225 + /* "lxml/etree.pyx":223 * version_list = [] * l = (version.decode("ascii").replace(u'-', u'.').split(u'.') + [0]*4)[:4] * for item in l: # <<<<<<<<<<<<<< * try: * item = int(item) */ - __Pyx_TraceLine(225,0,__PYX_ERR(0, 225, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_v_l)) || PyTuple_CheckExact(__pyx_v_l)) { - __pyx_t_1 = __pyx_v_l; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; - __pyx_t_5 = NULL; + __pyx_t_3 = __pyx_v_l; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; + __pyx_t_6 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_l); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 225, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_l); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 223, __pyx_L1_error) } for (;;) { - if (likely(!__pyx_t_5)) { - if (likely(PyList_CheckExact(__pyx_t_1))) { - if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break; + if (likely(!__pyx_t_6)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 225, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 223, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 225, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); #endif } else { - if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 225, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 223, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 225, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); #endif } } else { - __pyx_t_3 = __pyx_t_5(__pyx_t_1); - if (unlikely(!__pyx_t_3)) { + __pyx_t_2 = __pyx_t_6(__pyx_t_3); + if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 225, __pyx_L1_error) + else __PYX_ERR(0, 223, __pyx_L1_error) } break; } - __Pyx_GOTREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_t_2); } - __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_3); - __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_2); + __pyx_t_2 = 0; - /* "lxml/etree.pyx":226 + /* "lxml/etree.pyx":224 * l = (version.decode("ascii").replace(u'-', u'.').split(u'.') + [0]*4)[:4] * for item in l: * try: # <<<<<<<<<<<<<< * item = int(item) * except ValueError: */ - __Pyx_TraceLine(226,0,__PYX_ERR(0, 226, __pyx_L5_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); - __Pyx_XGOTREF(__pyx_t_6); + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { - /* "lxml/etree.pyx":227 + /* "lxml/etree.pyx":225 * for item in l: * try: * item = int(item) # <<<<<<<<<<<<<< * except ValueError: * if item.startswith(u'dev'): */ - __Pyx_TraceLine(227,0,__PYX_ERR(0, 227, __pyx_L5_error)) - __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_item); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 227, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF_SET(__pyx_v_item, __pyx_t_3); - __pyx_t_3 = 0; + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 225, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF_SET(__pyx_v_item, __pyx_t_2); + __pyx_t_2 = 0; - /* "lxml/etree.pyx":226 + /* "lxml/etree.pyx":224 * l = (version.decode("ascii").replace(u'-', u'.').split(u'.') + [0]*4)[:4] * for item in l: * try: # <<<<<<<<<<<<<< @@ -12722,72 +12527,81 @@ static PyObject *__pyx_f_4lxml_5etree___unpackDottedVersion(PyObject *__pyx_v_ve * except ValueError: */ } - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L12_try_end; __pyx_L5_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":228 + /* "lxml/etree.pyx":226 * try: * item = int(item) * except ValueError: # <<<<<<<<<<<<<< * if item.startswith(u'dev'): * count = item[3:] */ - __Pyx_TraceLine(228,0,__PYX_ERR(0, 228, __pyx_L7_except_error)) - __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError); - if (__pyx_t_9) { + __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError); + if (__pyx_t_10) { __Pyx_AddTraceback("lxml.etree.__unpackDottedVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_10) < 0) __PYX_ERR(0, 228, __pyx_L7_except_error) - __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_4) < 0) __PYX_ERR(0, 226, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GOTREF(__pyx_t_10); + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_4); - /* "lxml/etree.pyx":229 + /* "lxml/etree.pyx":227 * item = int(item) * except ValueError: * if item.startswith(u'dev'): # <<<<<<<<<<<<<< * count = item[3:] * item = -300 */ - __Pyx_TraceLine(229,0,__PYX_ERR(0, 229, __pyx_L7_except_error)) - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_startswith); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 229, __pyx_L7_except_error) - __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 229, __pyx_L7_except_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_startswith); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 227, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 229, __pyx_L7_except_error) + __pyx_t_13 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { + __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12); + if (likely(__pyx_t_13)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); + __Pyx_INCREF(__pyx_t_13); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_12, function); + } + } + __pyx_t_11 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_13, __pyx_n_u_dev) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_n_u_dev); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 227, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (__pyx_t_13) { + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 227, __pyx_L7_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (__pyx_t_14) { - /* "lxml/etree.pyx":230 + /* "lxml/etree.pyx":228 * except ValueError: * if item.startswith(u'dev'): * count = item[3:] # <<<<<<<<<<<<<< * item = -300 * elif item.startswith(u'alpha'): */ - __Pyx_TraceLine(230,0,__PYX_ERR(0, 230, __pyx_L7_except_error)) - __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_v_item, 3, 0, NULL, NULL, &__pyx_slice__16, 1, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 230, __pyx_L7_except_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_XDECREF_SET(__pyx_v_count, __pyx_t_12); - __pyx_t_12 = 0; + __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_item, 3, 0, NULL, NULL, &__pyx_slice__6, 1, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 228, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_XDECREF_SET(__pyx_v_count, __pyx_t_11); + __pyx_t_11 = 0; - /* "lxml/etree.pyx":231 + /* "lxml/etree.pyx":229 * if item.startswith(u'dev'): * count = item[3:] * item = -300 # <<<<<<<<<<<<<< * elif item.startswith(u'alpha'): * count = item[5:] */ - __Pyx_TraceLine(231,0,__PYX_ERR(0, 231, __pyx_L7_except_error)) __Pyx_INCREF(__pyx_int_neg_300); __Pyx_DECREF_SET(__pyx_v_item, __pyx_int_neg_300); - /* "lxml/etree.pyx":229 + /* "lxml/etree.pyx":227 * item = int(item) * except ValueError: * if item.startswith(u'dev'): # <<<<<<<<<<<<<< @@ -12797,48 +12611,57 @@ static PyObject *__pyx_f_4lxml_5etree___unpackDottedVersion(PyObject *__pyx_v_ve goto __pyx_L15; } - /* "lxml/etree.pyx":232 + /* "lxml/etree.pyx":230 * count = item[3:] * item = -300 * elif item.startswith(u'alpha'): # <<<<<<<<<<<<<< * count = item[5:] * item = -200 */ - __Pyx_TraceLine(232,0,__PYX_ERR(0, 232, __pyx_L7_except_error)) - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_startswith); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 232, __pyx_L7_except_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_startswith); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 230, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 232, __pyx_L7_except_error) + __pyx_t_13 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { + __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12); + if (likely(__pyx_t_13)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); + __Pyx_INCREF(__pyx_t_13); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_12, function); + } + } + __pyx_t_11 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_13, __pyx_n_u_alpha) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_n_u_alpha); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 230, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 232, __pyx_L7_except_error) + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 230, __pyx_L7_except_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (__pyx_t_13) { + if (__pyx_t_14) { - /* "lxml/etree.pyx":233 + /* "lxml/etree.pyx":231 * item = -300 * elif item.startswith(u'alpha'): * count = item[5:] # <<<<<<<<<<<<<< * item = -200 * elif item.startswith(u'beta'): */ - __Pyx_TraceLine(233,0,__PYX_ERR(0, 233, __pyx_L7_except_error)) - __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_item, 5, 0, NULL, NULL, &__pyx_slice__18, 1, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 233, __pyx_L7_except_error) + __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_item, 5, 0, NULL, NULL, &__pyx_slice__7, 1, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 231, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_XDECREF_SET(__pyx_v_count, __pyx_t_11); __pyx_t_11 = 0; - /* "lxml/etree.pyx":234 + /* "lxml/etree.pyx":232 * elif item.startswith(u'alpha'): * count = item[5:] * item = -200 # <<<<<<<<<<<<<< * elif item.startswith(u'beta'): * count = item[4:] */ - __Pyx_TraceLine(234,0,__PYX_ERR(0, 234, __pyx_L7_except_error)) __Pyx_INCREF(__pyx_int_neg_200); __Pyx_DECREF_SET(__pyx_v_item, __pyx_int_neg_200); - /* "lxml/etree.pyx":232 + /* "lxml/etree.pyx":230 * count = item[3:] * item = -300 * elif item.startswith(u'alpha'): # <<<<<<<<<<<<<< @@ -12848,48 +12671,57 @@ static PyObject *__pyx_f_4lxml_5etree___unpackDottedVersion(PyObject *__pyx_v_ve goto __pyx_L15; } - /* "lxml/etree.pyx":235 + /* "lxml/etree.pyx":233 * count = item[5:] * item = -200 * elif item.startswith(u'beta'): # <<<<<<<<<<<<<< * count = item[4:] * item = -100 */ - __Pyx_TraceLine(235,0,__PYX_ERR(0, 235, __pyx_L7_except_error)) - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_startswith); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 235, __pyx_L7_except_error) - __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 235, __pyx_L7_except_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_startswith); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 233, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 235, __pyx_L7_except_error) + __pyx_t_13 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { + __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12); + if (likely(__pyx_t_13)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); + __Pyx_INCREF(__pyx_t_13); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_12, function); + } + } + __pyx_t_11 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_13, __pyx_n_u_beta) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_n_u_beta); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 233, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (__pyx_t_13) { + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 233, __pyx_L7_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (__pyx_t_14) { - /* "lxml/etree.pyx":236 + /* "lxml/etree.pyx":234 * item = -200 * elif item.startswith(u'beta'): * count = item[4:] # <<<<<<<<<<<<<< * item = -100 * else: */ - __Pyx_TraceLine(236,0,__PYX_ERR(0, 236, __pyx_L7_except_error)) - __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_v_item, 4, 0, NULL, NULL, &__pyx_slice__20, 1, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 236, __pyx_L7_except_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_XDECREF_SET(__pyx_v_count, __pyx_t_12); - __pyx_t_12 = 0; + __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_item, 4, 0, NULL, NULL, &__pyx_slice__8, 1, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 234, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_XDECREF_SET(__pyx_v_count, __pyx_t_11); + __pyx_t_11 = 0; - /* "lxml/etree.pyx":237 + /* "lxml/etree.pyx":235 * elif item.startswith(u'beta'): * count = item[4:] * item = -100 # <<<<<<<<<<<<<< * else: * count = 0 */ - __Pyx_TraceLine(237,0,__PYX_ERR(0, 237, __pyx_L7_except_error)) __Pyx_INCREF(__pyx_int_neg_100); __Pyx_DECREF_SET(__pyx_v_item, __pyx_int_neg_100); - /* "lxml/etree.pyx":235 + /* "lxml/etree.pyx":233 * count = item[5:] * item = -200 * elif item.startswith(u'beta'): # <<<<<<<<<<<<<< @@ -12899,48 +12731,45 @@ static PyObject *__pyx_f_4lxml_5etree___unpackDottedVersion(PyObject *__pyx_v_ve goto __pyx_L15; } - /* "lxml/etree.pyx":239 + /* "lxml/etree.pyx":237 * item = -100 * else: * count = 0 # <<<<<<<<<<<<<< * if count: * item += int(count) */ - __Pyx_TraceLine(239,0,__PYX_ERR(0, 239, __pyx_L7_except_error)) /*else*/ { __Pyx_INCREF(__pyx_int_0); __Pyx_XDECREF_SET(__pyx_v_count, __pyx_int_0); } __pyx_L15:; - /* "lxml/etree.pyx":240 + /* "lxml/etree.pyx":238 * else: * count = 0 * if count: # <<<<<<<<<<<<<< * item += int(count) * version_list.append(item) */ - __Pyx_TraceLine(240,0,__PYX_ERR(0, 240, __pyx_L7_except_error)) - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_count); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 240, __pyx_L7_except_error) - if (__pyx_t_13) { + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_count); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 238, __pyx_L7_except_error) + if (__pyx_t_14) { - /* "lxml/etree.pyx":241 + /* "lxml/etree.pyx":239 * count = 0 * if count: * item += int(count) # <<<<<<<<<<<<<< * version_list.append(item) * return tuple(version_list) */ - __Pyx_TraceLine(241,0,__PYX_ERR(0, 241, __pyx_L7_except_error)) - __pyx_t_12 = __Pyx_PyNumber_Int(__pyx_v_count); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 241, __pyx_L7_except_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_11 = PyNumber_InPlaceAdd(__pyx_v_item, __pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 241, __pyx_L7_except_error) + __pyx_t_11 = __Pyx_PyNumber_Int(__pyx_v_count); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 239, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_DECREF_SET(__pyx_v_item, __pyx_t_11); - __pyx_t_11 = 0; + __pyx_t_12 = PyNumber_InPlaceAdd(__pyx_v_item, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 239, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF_SET(__pyx_v_item, __pyx_t_12); + __pyx_t_12 = 0; - /* "lxml/etree.pyx":240 + /* "lxml/etree.pyx":238 * else: * count = 0 * if count: # <<<<<<<<<<<<<< @@ -12948,71 +12777,68 @@ static PyObject *__pyx_f_4lxml_5etree___unpackDottedVersion(PyObject *__pyx_v_ve * version_list.append(item) */ } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L6_exception_handled; } goto __pyx_L7_except_error; __pyx_L7_except_error:; - /* "lxml/etree.pyx":226 + /* "lxml/etree.pyx":224 * l = (version.decode("ascii").replace(u'-', u'.').split(u'.') + [0]*4)[:4] * for item in l: * try: # <<<<<<<<<<<<<< * item = int(item) * except ValueError: */ - __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L1_error; __pyx_L6_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); __pyx_L12_try_end:; } - /* "lxml/etree.pyx":242 + /* "lxml/etree.pyx":240 * if count: * item += int(count) * version_list.append(item) # <<<<<<<<<<<<<< * return tuple(version_list) * */ - __Pyx_TraceLine(242,0,__PYX_ERR(0, 242, __pyx_L1_error)) - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_version_list, __pyx_v_item); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 242, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_version_list, __pyx_v_item); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 240, __pyx_L1_error) - /* "lxml/etree.pyx":225 + /* "lxml/etree.pyx":223 * version_list = [] * l = (version.decode("ascii").replace(u'-', u'.').split(u'.') + [0]*4)[:4] * for item in l: # <<<<<<<<<<<<<< * try: * item = int(item) */ - __Pyx_TraceLine(225,0,__PYX_ERR(0, 225, __pyx_L1_error)) } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":243 + /* "lxml/etree.pyx":241 * item += int(count) * version_list.append(item) * return tuple(version_list) # <<<<<<<<<<<<<< * * cdef __unpackIntVersion(int c_version): */ - __Pyx_TraceLine(243,0,__PYX_ERR(0, 243, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_AsTuple(__pyx_v_version_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_t_3 = PyList_AsTuple(__pyx_v_version_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":222 + /* "lxml/etree.pyx":220 * * # version information * cdef __unpackDottedVersion(version): # <<<<<<<<<<<<<< @@ -13025,9 +12851,10 @@ static PyObject *__pyx_f_4lxml_5etree___unpackDottedVersion(PyObject *__pyx_v_ve __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("lxml.etree.__unpackDottedVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -13036,12 +12863,11 @@ static PyObject *__pyx_f_4lxml_5etree___unpackDottedVersion(PyObject *__pyx_v_ve __Pyx_XDECREF(__pyx_v_item); __Pyx_XDECREF(__pyx_v_count); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":245 +/* "lxml/etree.pyx":243 * return tuple(version_list) * * cdef __unpackIntVersion(int c_version): # <<<<<<<<<<<<<< @@ -13051,67 +12877,60 @@ static PyObject *__pyx_f_4lxml_5etree___unpackDottedVersion(PyObject *__pyx_v_ve static PyObject *__pyx_f_4lxml_5etree___unpackIntVersion(int __pyx_v_c_version) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__unpackIntVersion", 0); - __Pyx_TraceCall("__unpackIntVersion", __pyx_f[0], 245, 0, __PYX_ERR(0, 245, __pyx_L1_error)); - /* "lxml/etree.pyx":246 + /* "lxml/etree.pyx":244 * * cdef __unpackIntVersion(int c_version): * return ( # <<<<<<<<<<<<<< * ((c_version / (100*100)) % 100), * ((c_version / 100) % 100), */ - __Pyx_TraceLine(246,0,__PYX_ERR(0, 246, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - /* "lxml/etree.pyx":247 + /* "lxml/etree.pyx":245 * cdef __unpackIntVersion(int c_version): * return ( * ((c_version / (100*100)) % 100), # <<<<<<<<<<<<<< * ((c_version / 100) % 100), * (c_version % 100) */ - __Pyx_TraceLine(247,0,__PYX_ERR(0, 247, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyInt_From_long(__Pyx_mod_long(__Pyx_div_long(__pyx_v_c_version, 0x2710), 0x64)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_long(__Pyx_mod_long(__Pyx_div_long(__pyx_v_c_version, 0x2710), 0x64)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "lxml/etree.pyx":248 + /* "lxml/etree.pyx":246 * return ( * ((c_version / (100*100)) % 100), * ((c_version / 100) % 100), # <<<<<<<<<<<<<< * (c_version % 100) * ) */ - __Pyx_TraceLine(248,0,__PYX_ERR(0, 248, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyInt_From_long(__Pyx_mod_long(__Pyx_div_long(__pyx_v_c_version, 0x64), 0x64)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_long(__Pyx_mod_long(__Pyx_div_long(__pyx_v_c_version, 0x64), 0x64)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "lxml/etree.pyx":249 + /* "lxml/etree.pyx":247 * ((c_version / (100*100)) % 100), * ((c_version / 100) % 100), * (c_version % 100) # <<<<<<<<<<<<<< * ) * */ - __Pyx_TraceLine(249,0,__PYX_ERR(0, 249, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyInt_From_long(__Pyx_mod_long(__pyx_v_c_version, 0x64)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_long(__Pyx_mod_long(__pyx_v_c_version, 0x64)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "lxml/etree.pyx":247 + /* "lxml/etree.pyx":245 * cdef __unpackIntVersion(int c_version): * return ( * ((c_version / (100*100)) % 100), # <<<<<<<<<<<<<< * ((c_version / 100) % 100), * (c_version % 100) */ - __Pyx_TraceLine(247,0,__PYX_ERR(0, 247, __pyx_L1_error)) - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 247, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); @@ -13126,7 +12945,7 @@ static PyObject *__pyx_f_4lxml_5etree___unpackIntVersion(int __pyx_v_c_version) __pyx_t_4 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":245 + /* "lxml/etree.pyx":243 * return tuple(version_list) * * cdef __unpackIntVersion(int c_version): # <<<<<<<<<<<<<< @@ -13144,12 +12963,11 @@ static PyObject *__pyx_f_4lxml_5etree___unpackIntVersion(int __pyx_v_c_version) __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":273 +/* "lxml/etree.pyx":271 * cdef class _TempStore: * cdef list _storage * def __init__(self): # <<<<<<<<<<<<<< @@ -13175,21 +12993,18 @@ static int __pyx_pw_4lxml_5etree_10_TempStore_1__init__(PyObject *__pyx_v_self, static int __pyx_pf_4lxml_5etree_10_TempStore___init__(struct __pyx_obj_4lxml_5etree__TempStore *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 273, 0, __PYX_ERR(0, 273, __pyx_L1_error)); - /* "lxml/etree.pyx":274 + /* "lxml/etree.pyx":272 * cdef list _storage * def __init__(self): * self._storage = [] # <<<<<<<<<<<<<< * * cdef int add(self, obj) except -1: */ - __Pyx_TraceLine(274,0,__PYX_ERR(0, 274, __pyx_L1_error)) - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_storage); @@ -13197,7 +13012,7 @@ static int __pyx_pf_4lxml_5etree_10_TempStore___init__(struct __pyx_obj_4lxml_5e __pyx_v_self->_storage = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":273 + /* "lxml/etree.pyx":271 * cdef class _TempStore: * cdef list _storage * def __init__(self): # <<<<<<<<<<<<<< @@ -13213,12 +13028,11 @@ static int __pyx_pf_4lxml_5etree_10_TempStore___init__(struct __pyx_obj_4lxml_5e __Pyx_AddTraceback("lxml.etree._TempStore.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":276 +/* "lxml/etree.pyx":274 * self._storage = [] * * cdef int add(self, obj) except -1: # <<<<<<<<<<<<<< @@ -13228,38 +13042,34 @@ static int __pyx_pf_4lxml_5etree_10_TempStore___init__(struct __pyx_obj_4lxml_5e static int __pyx_f_4lxml_5etree_10_TempStore_add(struct __pyx_obj_4lxml_5etree__TempStore *__pyx_v_self, PyObject *__pyx_v_obj) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("add", 0); - __Pyx_TraceCall("add", __pyx_f[0], 276, 0, __PYX_ERR(0, 276, __pyx_L1_error)); - /* "lxml/etree.pyx":277 + /* "lxml/etree.pyx":275 * * cdef int add(self, obj) except -1: * self._storage.append(obj) # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(277,0,__PYX_ERR(0, 277, __pyx_L1_error)) if (unlikely(__pyx_v_self->_storage == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 277, __pyx_L1_error) + __PYX_ERR(0, 275, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyList_Append(__pyx_v_self->_storage, __pyx_v_obj); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyList_Append(__pyx_v_self->_storage, __pyx_v_obj); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 275, __pyx_L1_error) - /* "lxml/etree.pyx":278 + /* "lxml/etree.pyx":276 * cdef int add(self, obj) except -1: * self._storage.append(obj) * return 0 # <<<<<<<<<<<<<< * * cdef int clear(self) except -1: */ - __Pyx_TraceLine(278,0,__PYX_ERR(0, 278, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":276 + /* "lxml/etree.pyx":274 * self._storage = [] * * cdef int add(self, obj) except -1: # <<<<<<<<<<<<<< @@ -13272,12 +13082,11 @@ static int __pyx_f_4lxml_5etree_10_TempStore_add(struct __pyx_obj_4lxml_5etree__ __Pyx_AddTraceback("lxml.etree._TempStore.add", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":280 +/* "lxml/etree.pyx":278 * return 0 * * cdef int clear(self) except -1: # <<<<<<<<<<<<<< @@ -13287,37 +13096,33 @@ static int __pyx_f_4lxml_5etree_10_TempStore_add(struct __pyx_obj_4lxml_5etree__ static int __pyx_f_4lxml_5etree_10_TempStore_clear(struct __pyx_obj_4lxml_5etree__TempStore *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear", 0); - __Pyx_TraceCall("clear", __pyx_f[0], 280, 0, __PYX_ERR(0, 280, __pyx_L1_error)); - /* "lxml/etree.pyx":281 + /* "lxml/etree.pyx":279 * * cdef int clear(self) except -1: * del self._storage[:] # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(281,0,__PYX_ERR(0, 281, __pyx_L1_error)) if (unlikely(__pyx_v_self->_storage == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 281, __pyx_L1_error) + __PYX_ERR(0, 279, __pyx_L1_error) } - if (__Pyx_PyObject_DelSlice(__pyx_v_self->_storage, 0, 0, NULL, NULL, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 281, __pyx_L1_error) + if (__Pyx_PyObject_DelSlice(__pyx_v_self->_storage, 0, 0, NULL, NULL, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 279, __pyx_L1_error) - /* "lxml/etree.pyx":282 + /* "lxml/etree.pyx":280 * cdef int clear(self) except -1: * del self._storage[:] * return 0 # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(282,0,__PYX_ERR(0, 282, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":280 + /* "lxml/etree.pyx":278 * return 0 * * cdef int clear(self) except -1: # <<<<<<<<<<<<<< @@ -13330,12 +13135,11 @@ static int __pyx_f_4lxml_5etree_10_TempStore_clear(struct __pyx_obj_4lxml_5etree __Pyx_AddTraceback("lxml.etree._TempStore.clear", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":289 +/* "lxml/etree.pyx":287 * cdef class _ExceptionContext: * cdef object _exc_info * cdef int clear(self) except -1: # <<<<<<<<<<<<<< @@ -13345,37 +13149,33 @@ static int __pyx_f_4lxml_5etree_10_TempStore_clear(struct __pyx_obj_4lxml_5etree static int __pyx_f_4lxml_5etree_17_ExceptionContext_clear(struct __pyx_obj_4lxml_5etree__ExceptionContext *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear", 0); - __Pyx_TraceCall("clear", __pyx_f[0], 289, 0, __PYX_ERR(0, 289, __pyx_L1_error)); - /* "lxml/etree.pyx":290 + /* "lxml/etree.pyx":288 * cdef object _exc_info * cdef int clear(self) except -1: * self._exc_info = None # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(290,0,__PYX_ERR(0, 290, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_exc_info); __Pyx_DECREF(__pyx_v_self->_exc_info); __pyx_v_self->_exc_info = Py_None; - /* "lxml/etree.pyx":291 + /* "lxml/etree.pyx":289 * cdef int clear(self) except -1: * self._exc_info = None * return 0 # <<<<<<<<<<<<<< * * cdef void _store_raised(self): */ - __Pyx_TraceLine(291,0,__PYX_ERR(0, 291, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":289 + /* "lxml/etree.pyx":287 * cdef class _ExceptionContext: * cdef object _exc_info * cdef int clear(self) except -1: # <<<<<<<<<<<<<< @@ -13384,16 +13184,12 @@ static int __pyx_f_4lxml_5etree_17_ExceptionContext_clear(struct __pyx_obj_4lxml */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._ExceptionContext.clear", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":293 +/* "lxml/etree.pyx":291 * return 0 * * cdef void _store_raised(self): # <<<<<<<<<<<<<< @@ -13403,7 +13199,6 @@ static int __pyx_f_4lxml_5etree_17_ExceptionContext_clear(struct __pyx_obj_4lxml static void __pyx_f_4lxml_5etree_17_ExceptionContext__store_raised(struct __pyx_obj_4lxml_5etree__ExceptionContext *__pyx_v_self) { PyObject *__pyx_v_e = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -13416,16 +13211,14 @@ static void __pyx_f_4lxml_5etree_17_ExceptionContext__store_raised(struct __pyx_ PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("_store_raised", 0); - __Pyx_TraceCall("_store_raised", __pyx_f[0], 293, 0, __PYX_ERR(0, 293, __pyx_L1_error)); - /* "lxml/etree.pyx":294 + /* "lxml/etree.pyx":292 * * cdef void _store_raised(self): * try: # <<<<<<<<<<<<<< * self._exc_info = sys.exc_info() * except BaseException as e: */ - __Pyx_TraceLine(294,0,__PYX_ERR(0, 294, __pyx_L4_error)) /*try:*/ { { __Pyx_PyThreadState_declare @@ -13436,15 +13229,14 @@ static void __pyx_f_4lxml_5etree_17_ExceptionContext__store_raised(struct __pyx_ __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "lxml/etree.pyx":295 + /* "lxml/etree.pyx":293 * cdef void _store_raised(self): * try: * self._exc_info = sys.exc_info() # <<<<<<<<<<<<<< * except BaseException as e: * self._store_exception(e) */ - __Pyx_TraceLine(295,0,__PYX_ERR(0, 295, __pyx_L6_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 295, __pyx_L6_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 293, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -13456,12 +13248,9 @@ static void __pyx_f_4lxml_5etree_17_ExceptionContext__store_raised(struct __pyx_ __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 295, __pyx_L6_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 295, __pyx_L6_error) - } + __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, 293, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_4); @@ -13470,7 +13259,7 @@ static void __pyx_f_4lxml_5etree_17_ExceptionContext__store_raised(struct __pyx_ __pyx_v_self->_exc_info = __pyx_t_4; __pyx_t_4 = 0; - /* "lxml/etree.pyx":294 + /* "lxml/etree.pyx":292 * * cdef void _store_raised(self): * try: # <<<<<<<<<<<<<< @@ -13487,42 +13276,40 @@ static void __pyx_f_4lxml_5etree_17_ExceptionContext__store_raised(struct __pyx_ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":296 + /* "lxml/etree.pyx":294 * try: * self._exc_info = sys.exc_info() * except BaseException as e: # <<<<<<<<<<<<<< * self._store_exception(e) * finally: */ - __Pyx_TraceLine(296,0,__PYX_ERR(0, 296, __pyx_L8_except_error)) __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException); if (__pyx_t_7) { __Pyx_AddTraceback("lxml.etree._ExceptionContext._store_raised", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 296, __pyx_L8_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 294, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_v_e = __pyx_t_5; - /* "lxml/etree.pyx":297 + /* "lxml/etree.pyx":295 * self._exc_info = sys.exc_info() * except BaseException as e: * self._store_exception(e) # <<<<<<<<<<<<<< * finally: * return # and swallow any further exceptions */ - __Pyx_TraceLine(297,0,__PYX_ERR(0, 297, __pyx_L8_except_error)) - __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_self->__pyx_vtab)->_store_exception(__pyx_v_self, __pyx_v_e); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 297, __pyx_L8_except_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_self->__pyx_vtab)->_store_exception(__pyx_v_self, __pyx_v_e); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 295, __pyx_L8_except_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L7_exception_handled; } goto __pyx_L8_except_error; __pyx_L8_except_error:; - /* "lxml/etree.pyx":294 + /* "lxml/etree.pyx":292 * * cdef void _store_raised(self): * try: # <<<<<<<<<<<<<< @@ -13543,14 +13330,13 @@ static void __pyx_f_4lxml_5etree_17_ExceptionContext__store_raised(struct __pyx_ } } - /* "lxml/etree.pyx":299 + /* "lxml/etree.pyx":297 * self._store_exception(e) * finally: * return # and swallow any further exceptions # <<<<<<<<<<<<<< * * cdef int _store_exception(self, exception) except -1: */ - __Pyx_TraceLine(299,0,__PYX_ERR(0, 299, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ goto __pyx_L0; @@ -13589,7 +13375,7 @@ static void __pyx_f_4lxml_5etree_17_ExceptionContext__store_raised(struct __pyx_ } } - /* "lxml/etree.pyx":293 + /* "lxml/etree.pyx":291 * return 0 * * cdef void _store_raised(self): # <<<<<<<<<<<<<< @@ -13598,18 +13384,12 @@ static void __pyx_f_4lxml_5etree_17_ExceptionContext__store_raised(struct __pyx_ */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_WriteUnraisable("lxml.etree._ExceptionContext._store_raised", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF(__pyx_v_e); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } -/* "lxml/etree.pyx":301 +/* "lxml/etree.pyx":299 * return # and swallow any further exceptions * * cdef int _store_exception(self, exception) except -1: # <<<<<<<<<<<<<< @@ -13619,21 +13399,18 @@ static void __pyx_f_4lxml_5etree_17_ExceptionContext__store_raised(struct __pyx_ static int __pyx_f_4lxml_5etree_17_ExceptionContext__store_exception(struct __pyx_obj_4lxml_5etree__ExceptionContext *__pyx_v_self, PyObject *__pyx_v_exception) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_store_exception", 0); - __Pyx_TraceCall("_store_exception", __pyx_f[0], 301, 0, __PYX_ERR(0, 301, __pyx_L1_error)); - /* "lxml/etree.pyx":302 + /* "lxml/etree.pyx":300 * * cdef int _store_exception(self, exception) except -1: * self._exc_info = (exception, None, None) # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(302,0,__PYX_ERR(0, 302, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_exception); __Pyx_GIVEREF(__pyx_v_exception); @@ -13650,18 +13427,17 @@ static int __pyx_f_4lxml_5etree_17_ExceptionContext__store_exception(struct __py __pyx_v_self->_exc_info = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/etree.pyx":303 + /* "lxml/etree.pyx":301 * cdef int _store_exception(self, exception) except -1: * self._exc_info = (exception, None, None) * return 0 # <<<<<<<<<<<<<< * * cdef bint _has_raised(self) except -1: */ - __Pyx_TraceLine(303,0,__PYX_ERR(0, 303, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":301 + /* "lxml/etree.pyx":299 * return # and swallow any further exceptions * * cdef int _store_exception(self, exception) except -1: # <<<<<<<<<<<<<< @@ -13675,12 +13451,11 @@ static int __pyx_f_4lxml_5etree_17_ExceptionContext__store_exception(struct __py __Pyx_AddTraceback("lxml.etree._ExceptionContext._store_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":305 +/* "lxml/etree.pyx":303 * return 0 * * cdef bint _has_raised(self) except -1: # <<<<<<<<<<<<<< @@ -13690,25 +13465,22 @@ static int __pyx_f_4lxml_5etree_17_ExceptionContext__store_exception(struct __py static int __pyx_f_4lxml_5etree_17_ExceptionContext__has_raised(struct __pyx_obj_4lxml_5etree__ExceptionContext *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_has_raised", 0); - __Pyx_TraceCall("_has_raised", __pyx_f[0], 305, 0, __PYX_ERR(0, 305, __pyx_L1_error)); - /* "lxml/etree.pyx":306 + /* "lxml/etree.pyx":304 * * cdef bint _has_raised(self) except -1: * return self._exc_info is not None # <<<<<<<<<<<<<< * * cdef int _raise_if_stored(self) except -1: */ - __Pyx_TraceLine(306,0,__PYX_ERR(0, 306, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_exc_info != Py_None); __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "lxml/etree.pyx":305 + /* "lxml/etree.pyx":303 * return 0 * * cdef bint _has_raised(self) except -1: # <<<<<<<<<<<<<< @@ -13717,16 +13489,12 @@ static int __pyx_f_4lxml_5etree_17_ExceptionContext__has_raised(struct __pyx_obj */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._ExceptionContext._has_raised", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":308 +/* "lxml/etree.pyx":306 * return self._exc_info is not None * * cdef int _raise_if_stored(self) except -1: # <<<<<<<<<<<<<< @@ -13739,7 +13507,6 @@ static int __pyx_f_4lxml_5etree_17_ExceptionContext__raise_if_stored(struct __py PyObject *__pyx_v_value = NULL; PyObject *__pyx_v_traceback = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -13751,32 +13518,29 @@ static int __pyx_f_4lxml_5etree_17_ExceptionContext__raise_if_stored(struct __py PyObject *(*__pyx_t_8)(PyObject *); int __pyx_t_9; __Pyx_RefNannySetupContext("_raise_if_stored", 0); - __Pyx_TraceCall("_raise_if_stored", __pyx_f[0], 308, 0, __PYX_ERR(0, 308, __pyx_L1_error)); - /* "lxml/etree.pyx":309 + /* "lxml/etree.pyx":307 * * cdef int _raise_if_stored(self) except -1: * if self._exc_info is None: # <<<<<<<<<<<<<< * return 0 * type, value, traceback = self._exc_info */ - __Pyx_TraceLine(309,0,__PYX_ERR(0, 309, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_exc_info == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":310 + /* "lxml/etree.pyx":308 * cdef int _raise_if_stored(self) except -1: * if self._exc_info is None: * return 0 # <<<<<<<<<<<<<< * type, value, traceback = self._exc_info * self._exc_info = None */ - __Pyx_TraceLine(310,0,__PYX_ERR(0, 310, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":309 + /* "lxml/etree.pyx":307 * * cdef int _raise_if_stored(self) except -1: * if self._exc_info is None: # <<<<<<<<<<<<<< @@ -13785,14 +13549,13 @@ static int __pyx_f_4lxml_5etree_17_ExceptionContext__raise_if_stored(struct __py */ } - /* "lxml/etree.pyx":311 + /* "lxml/etree.pyx":309 * if self._exc_info is None: * return 0 * type, value, traceback = self._exc_info # <<<<<<<<<<<<<< * self._exc_info = None * if value is None and traceback is None: */ - __Pyx_TraceLine(311,0,__PYX_ERR(0, 311, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->_exc_info; __Pyx_INCREF(__pyx_t_3); if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { @@ -13801,7 +13564,7 @@ static int __pyx_f_4lxml_5etree_17_ExceptionContext__raise_if_stored(struct __py if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 311, __pyx_L1_error) + __PYX_ERR(0, 309, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -13817,17 +13580,17 @@ static int __pyx_f_4lxml_5etree_17_ExceptionContext__raise_if_stored(struct __py __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 311, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 311, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 311, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 311, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; @@ -13837,7 +13600,7 @@ static int __pyx_f_4lxml_5etree_17_ExceptionContext__raise_if_stored(struct __py __Pyx_GOTREF(__pyx_t_5); index = 2; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 3) < 0) __PYX_ERR(0, 311, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 3) < 0) __PYX_ERR(0, 309, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L5_unpacking_done; @@ -13845,7 +13608,7 @@ static int __pyx_f_4lxml_5etree_17_ExceptionContext__raise_if_stored(struct __py __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 311, __pyx_L1_error) + __PYX_ERR(0, 309, __pyx_L1_error) __pyx_L5_unpacking_done:; } __pyx_v_type = __pyx_t_4; @@ -13855,28 +13618,26 @@ static int __pyx_f_4lxml_5etree_17_ExceptionContext__raise_if_stored(struct __py __pyx_v_traceback = __pyx_t_6; __pyx_t_6 = 0; - /* "lxml/etree.pyx":312 + /* "lxml/etree.pyx":310 * return 0 * type, value, traceback = self._exc_info * self._exc_info = None # <<<<<<<<<<<<<< * if value is None and traceback is None: * raise type */ - __Pyx_TraceLine(312,0,__PYX_ERR(0, 312, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_exc_info); __Pyx_DECREF(__pyx_v_self->_exc_info); __pyx_v_self->_exc_info = Py_None; - /* "lxml/etree.pyx":313 + /* "lxml/etree.pyx":311 * type, value, traceback = self._exc_info * self._exc_info = None * if value is None and traceback is None: # <<<<<<<<<<<<<< * raise type * else: */ - __Pyx_TraceLine(313,0,__PYX_ERR(0, 313, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_value == Py_None); __pyx_t_9 = (__pyx_t_1 != 0); if (__pyx_t_9) { @@ -13890,18 +13651,17 @@ static int __pyx_f_4lxml_5etree_17_ExceptionContext__raise_if_stored(struct __py __pyx_L7_bool_binop_done:; if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":314 + /* "lxml/etree.pyx":312 * self._exc_info = None * if value is None and traceback is None: * raise type # <<<<<<<<<<<<<< * else: * raise type, value, traceback */ - __Pyx_TraceLine(314,0,__PYX_ERR(0, 314, __pyx_L1_error)) __Pyx_Raise(__pyx_v_type, 0, 0, 0); - __PYX_ERR(0, 314, __pyx_L1_error) + __PYX_ERR(0, 312, __pyx_L1_error) - /* "lxml/etree.pyx":313 + /* "lxml/etree.pyx":311 * type, value, traceback = self._exc_info * self._exc_info = None * if value is None and traceback is None: # <<<<<<<<<<<<<< @@ -13910,20 +13670,19 @@ static int __pyx_f_4lxml_5etree_17_ExceptionContext__raise_if_stored(struct __py */ } - /* "lxml/etree.pyx":316 + /* "lxml/etree.pyx":314 * raise type * else: * raise type, value, traceback # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(316,0,__PYX_ERR(0, 316, __pyx_L1_error)) /*else*/ { __Pyx_Raise(__pyx_v_type, __pyx_v_value, __pyx_v_traceback, 0); - __PYX_ERR(0, 316, __pyx_L1_error) + __PYX_ERR(0, 314, __pyx_L1_error) } - /* "lxml/etree.pyx":308 + /* "lxml/etree.pyx":306 * return self._exc_info is not None * * cdef int _raise_if_stored(self) except -1: # <<<<<<<<<<<<<< @@ -13944,7 +13703,6 @@ static int __pyx_f_4lxml_5etree_17_ExceptionContext__raise_if_stored(struct __py __Pyx_XDECREF(__pyx_v_type); __Pyx_XDECREF(__pyx_v_value); __Pyx_XDECREF(__pyx_v_traceback); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -14272,11 +14030,9 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__unregisterProxy(struct LxmlElemen static xmlDoc *__pyx_f_4lxml_5etree__fakeRootDoc(xmlDoc *__pyx_v_c_base_doc, xmlNode *__pyx_v_c_node) { xmlDoc *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlDoc *__pyx_t_1; __Pyx_RefNannySetupContext("_fakeRootDoc", 0); - __Pyx_TraceCall("_fakeRootDoc", __pyx_f[4], 51, 0, __PYX_ERR(4, 51, __pyx_L1_error)); /* "src/lxml/proxy.pxi":52 * @@ -14285,7 +14041,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__fakeRootDoc(xmlDoc *__pyx_v_c_base_doc, xml * * cdef xmlDoc* _plainFakeRootDoc(xmlDoc* c_base_doc, xmlNode* c_node, */ - __Pyx_TraceLine(52,0,__PYX_ERR(4, 52, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__plainFakeRootDoc(__pyx_v_c_base_doc, __pyx_v_c_node, 1); if (unlikely(__pyx_t_1 == ((xmlDoc *)NULL))) __PYX_ERR(4, 52, __pyx_L1_error) __pyx_r = __pyx_t_1; goto __pyx_L0; @@ -14303,7 +14058,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__fakeRootDoc(xmlDoc *__pyx_v_c_base_doc, xml __Pyx_AddTraceback("lxml.etree._fakeRootDoc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -14322,14 +14076,12 @@ static xmlDoc *__pyx_f_4lxml_5etree__plainFakeRootDoc(xmlDoc *__pyx_v_c_base_doc xmlNode *__pyx_v_c_new_root; xmlDoc *__pyx_v_c_doc; xmlDoc *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; xmlDoc *__pyx_t_3; xmlNode *__pyx_t_4; __Pyx_RefNannySetupContext("_plainFakeRootDoc", 0); - __Pyx_TraceCall("_plainFakeRootDoc", __pyx_f[4], 54, 0, __PYX_ERR(4, 54, __pyx_L1_error)); /* "src/lxml/proxy.pxi":63 * cdef xmlNode* c_new_root @@ -14338,7 +14090,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__plainFakeRootDoc(xmlDoc *__pyx_v_c_base_doc * c_root = tree.xmlDocGetRootElement(c_base_doc) * if c_root is c_node: */ - __Pyx_TraceLine(63,0,__PYX_ERR(4, 63, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_with_siblings != 0); if (!__pyx_t_2) { } else { @@ -14363,7 +14114,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__plainFakeRootDoc(xmlDoc *__pyx_v_c_base_doc * if c_root is c_node: * # already the root node, no siblings */ - __Pyx_TraceLine(64,0,__PYX_ERR(4, 64, __pyx_L1_error)) __pyx_v_c_root = xmlDocGetRootElement(__pyx_v_c_base_doc); /* "src/lxml/proxy.pxi":65 @@ -14373,7 +14123,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__plainFakeRootDoc(xmlDoc *__pyx_v_c_base_doc * # already the root node, no siblings * return c_base_doc */ - __Pyx_TraceLine(65,0,__PYX_ERR(4, 65, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_root == __pyx_v_c_node) != 0); if (__pyx_t_1) { @@ -14384,7 +14133,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__plainFakeRootDoc(xmlDoc *__pyx_v_c_base_doc * * c_doc = _copyDoc(c_base_doc, 0) # non recursive! */ - __Pyx_TraceLine(67,0,__PYX_ERR(4, 67, __pyx_L1_error)) __pyx_r = __pyx_v_c_base_doc; goto __pyx_L0; @@ -14413,7 +14161,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__plainFakeRootDoc(xmlDoc *__pyx_v_c_base_doc * c_new_root = tree.xmlDocCopyNode(c_node, c_doc, 2) # non recursive! * tree.xmlDocSetRootElement(c_doc, c_new_root) */ - __Pyx_TraceLine(69,0,__PYX_ERR(4, 69, __pyx_L1_error)) __pyx_t_3 = __pyx_f_4lxml_5etree__copyDoc(__pyx_v_c_base_doc, 0); if (unlikely(__pyx_t_3 == ((xmlDoc *)NULL))) __PYX_ERR(4, 69, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_3; @@ -14424,7 +14171,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__plainFakeRootDoc(xmlDoc *__pyx_v_c_base_doc * tree.xmlDocSetRootElement(c_doc, c_new_root) * _copyParentNamespaces(c_node, c_new_root) */ - __Pyx_TraceLine(70,0,__PYX_ERR(4, 70, __pyx_L1_error)) __pyx_v_c_new_root = xmlDocCopyNode(__pyx_v_c_node, __pyx_v_c_doc, 2); /* "src/lxml/proxy.pxi":71 @@ -14434,7 +14180,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__plainFakeRootDoc(xmlDoc *__pyx_v_c_base_doc * _copyParentNamespaces(c_node, c_new_root) * */ - __Pyx_TraceLine(71,0,__PYX_ERR(4, 71, __pyx_L1_error)) (void)(xmlDocSetRootElement(__pyx_v_c_doc, __pyx_v_c_new_root)); /* "src/lxml/proxy.pxi":72 @@ -14444,7 +14189,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__plainFakeRootDoc(xmlDoc *__pyx_v_c_base_doc * * c_new_root.children = c_node.children */ - __Pyx_TraceLine(72,0,__PYX_ERR(4, 72, __pyx_L1_error)) __pyx_f_4lxml_5etree__copyParentNamespaces(__pyx_v_c_node, __pyx_v_c_new_root); /* "src/lxml/proxy.pxi":74 @@ -14454,7 +14198,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__plainFakeRootDoc(xmlDoc *__pyx_v_c_base_doc * c_new_root.last = c_node.last * c_new_root.next = c_new_root.prev = NULL */ - __Pyx_TraceLine(74,0,__PYX_ERR(4, 74, __pyx_L1_error)) __pyx_t_4 = __pyx_v_c_node->children; __pyx_v_c_new_root->children = __pyx_t_4; @@ -14465,7 +14208,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__plainFakeRootDoc(xmlDoc *__pyx_v_c_base_doc * c_new_root.next = c_new_root.prev = NULL * */ - __Pyx_TraceLine(75,0,__PYX_ERR(4, 75, __pyx_L1_error)) __pyx_t_4 = __pyx_v_c_node->last; __pyx_v_c_new_root->last = __pyx_t_4; @@ -14476,7 +14218,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__plainFakeRootDoc(xmlDoc *__pyx_v_c_base_doc * * # store original node */ - __Pyx_TraceLine(76,0,__PYX_ERR(4, 76, __pyx_L1_error)) __pyx_v_c_new_root->next = NULL; __pyx_v_c_new_root->prev = NULL; @@ -14487,7 +14228,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__plainFakeRootDoc(xmlDoc *__pyx_v_c_base_doc * * # divert parent pointers of children */ - __Pyx_TraceLine(79,0,__PYX_ERR(4, 79, __pyx_L1_error)) __pyx_v_c_doc->_private = __pyx_v_c_node; /* "src/lxml/proxy.pxi":82 @@ -14497,7 +14237,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__plainFakeRootDoc(xmlDoc *__pyx_v_c_base_doc * while c_child is not NULL: * c_child.parent = c_new_root */ - __Pyx_TraceLine(82,0,__PYX_ERR(4, 82, __pyx_L1_error)) __pyx_t_4 = __pyx_v_c_new_root->children; __pyx_v_c_child = __pyx_t_4; @@ -14508,7 +14247,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__plainFakeRootDoc(xmlDoc *__pyx_v_c_base_doc * c_child.parent = c_new_root * c_child = c_child.next */ - __Pyx_TraceLine(83,0,__PYX_ERR(4, 83, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_child != NULL) != 0); if (!__pyx_t_1) break; @@ -14520,7 +14258,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__plainFakeRootDoc(xmlDoc *__pyx_v_c_base_doc * c_child = c_child.next * */ - __Pyx_TraceLine(84,0,__PYX_ERR(4, 84, __pyx_L1_error)) __pyx_v_c_child->parent = __pyx_v_c_new_root; /* "src/lxml/proxy.pxi":85 @@ -14530,7 +14267,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__plainFakeRootDoc(xmlDoc *__pyx_v_c_base_doc * * c_doc.children = c_new_root */ - __Pyx_TraceLine(85,0,__PYX_ERR(4, 85, __pyx_L1_error)) __pyx_t_4 = __pyx_v_c_child->next; __pyx_v_c_child = __pyx_t_4; } @@ -14542,7 +14278,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__plainFakeRootDoc(xmlDoc *__pyx_v_c_base_doc * return c_doc * */ - __Pyx_TraceLine(87,0,__PYX_ERR(4, 87, __pyx_L1_error)) __pyx_v_c_doc->children = __pyx_v_c_new_root; /* "src/lxml/proxy.pxi":88 @@ -14552,7 +14287,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__plainFakeRootDoc(xmlDoc *__pyx_v_c_base_doc * * cdef void _destroyFakeDoc(xmlDoc* c_base_doc, xmlDoc* c_doc): */ - __Pyx_TraceLine(88,0,__PYX_ERR(4, 88, __pyx_L1_error)) __pyx_r = __pyx_v_c_doc; goto __pyx_L0; @@ -14569,7 +14303,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__plainFakeRootDoc(xmlDoc *__pyx_v_c_base_doc __Pyx_AddTraceback("lxml.etree._plainFakeRootDoc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -14586,12 +14319,10 @@ static void __pyx_f_4lxml_5etree__destroyFakeDoc(xmlDoc *__pyx_v_c_base_doc, xml xmlNode *__pyx_v_c_child; xmlNode *__pyx_v_c_parent; xmlNode *__pyx_v_c_root; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlNode *__pyx_t_2; __Pyx_RefNannySetupContext("_destroyFakeDoc", 0); - __Pyx_TraceCall("_destroyFakeDoc", __pyx_f[4], 90, 0, __PYX_ERR(4, 90, __pyx_L1_error)); /* "src/lxml/proxy.pxi":95 * cdef xmlNode* c_parent @@ -14600,7 +14331,6 @@ static void __pyx_f_4lxml_5etree__destroyFakeDoc(xmlDoc *__pyx_v_c_base_doc, xml * return * c_root = tree.xmlDocGetRootElement(c_doc) */ - __Pyx_TraceLine(95,0,__PYX_ERR(4, 95, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_doc == __pyx_v_c_base_doc) != 0); if (__pyx_t_1) { @@ -14611,7 +14341,6 @@ static void __pyx_f_4lxml_5etree__destroyFakeDoc(xmlDoc *__pyx_v_c_base_doc, xml * c_root = tree.xmlDocGetRootElement(c_doc) * */ - __Pyx_TraceLine(96,0,__PYX_ERR(4, 96, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/proxy.pxi":95 @@ -14630,7 +14359,6 @@ static void __pyx_f_4lxml_5etree__destroyFakeDoc(xmlDoc *__pyx_v_c_base_doc, xml * * # restore parent pointers of children */ - __Pyx_TraceLine(97,0,__PYX_ERR(4, 97, __pyx_L1_error)) __pyx_v_c_root = xmlDocGetRootElement(__pyx_v_c_doc); /* "src/lxml/proxy.pxi":100 @@ -14640,7 +14368,6 @@ static void __pyx_f_4lxml_5etree__destroyFakeDoc(xmlDoc *__pyx_v_c_base_doc, xml * c_child = c_root.children * while c_child is not NULL: */ - __Pyx_TraceLine(100,0,__PYX_ERR(4, 100, __pyx_L1_error)) __pyx_v_c_parent = ((xmlNode *)__pyx_v_c_doc->_private); /* "src/lxml/proxy.pxi":101 @@ -14650,7 +14377,6 @@ static void __pyx_f_4lxml_5etree__destroyFakeDoc(xmlDoc *__pyx_v_c_base_doc, xml * while c_child is not NULL: * c_child.parent = c_parent */ - __Pyx_TraceLine(101,0,__PYX_ERR(4, 101, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_root->children; __pyx_v_c_child = __pyx_t_2; @@ -14661,7 +14387,6 @@ static void __pyx_f_4lxml_5etree__destroyFakeDoc(xmlDoc *__pyx_v_c_base_doc, xml * c_child.parent = c_parent * c_child = c_child.next */ - __Pyx_TraceLine(102,0,__PYX_ERR(4, 102, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_child != NULL) != 0); if (!__pyx_t_1) break; @@ -14673,7 +14398,6 @@ static void __pyx_f_4lxml_5etree__destroyFakeDoc(xmlDoc *__pyx_v_c_base_doc, xml * c_child = c_child.next * */ - __Pyx_TraceLine(103,0,__PYX_ERR(4, 103, __pyx_L1_error)) __pyx_v_c_child->parent = __pyx_v_c_parent; /* "src/lxml/proxy.pxi":104 @@ -14683,7 +14407,6 @@ static void __pyx_f_4lxml_5etree__destroyFakeDoc(xmlDoc *__pyx_v_c_base_doc, xml * * # prevent recursive removal of children */ - __Pyx_TraceLine(104,0,__PYX_ERR(4, 104, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_child->next; __pyx_v_c_child = __pyx_t_2; } @@ -14695,7 +14418,6 @@ static void __pyx_f_4lxml_5etree__destroyFakeDoc(xmlDoc *__pyx_v_c_base_doc, xml * tree.xmlFreeDoc(c_doc) * */ - __Pyx_TraceLine(107,0,__PYX_ERR(4, 107, __pyx_L1_error)) __pyx_v_c_root->children = NULL; __pyx_v_c_root->last = NULL; @@ -14706,7 +14428,6 @@ static void __pyx_f_4lxml_5etree__destroyFakeDoc(xmlDoc *__pyx_v_c_base_doc, xml * * cdef _Element _fakeDocElementFactory(_Document doc, xmlNode* c_element): */ - __Pyx_TraceLine(108,0,__PYX_ERR(4, 108, __pyx_L1_error)) xmlFreeDoc(__pyx_v_c_doc); /* "src/lxml/proxy.pxi":90 @@ -14718,11 +14439,7 @@ static void __pyx_f_4lxml_5etree__destroyFakeDoc(xmlDoc *__pyx_v_c_base_doc, xml */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._destroyFakeDoc", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -14736,12 +14453,10 @@ static void __pyx_f_4lxml_5etree__destroyFakeDoc(xmlDoc *__pyx_v_c_base_doc, xml static struct LxmlElement *__pyx_f_4lxml_5etree__fakeDocElementFactory(struct LxmlDocument *__pyx_v_doc, xmlNode *__pyx_v_c_element) { struct LxmlElement *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_fakeDocElementFactory", 0); - __Pyx_TraceCall("_fakeDocElementFactory", __pyx_f[4], 110, 0, __PYX_ERR(4, 110, __pyx_L1_error)); /* "src/lxml/proxy.pxi":119 * instantiate the original node instead. @@ -14750,7 +14465,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__fakeDocElementFactory(struct Lx * if c_element.doc._private is not NULL: * if c_element is c_element.doc.children: */ - __Pyx_TraceLine(119,0,__PYX_ERR(4, 119, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_element->doc != __pyx_v_doc->_c_doc) != 0); if (__pyx_t_1) { @@ -14761,7 +14475,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__fakeDocElementFactory(struct Lx * if c_element is c_element.doc.children: * c_element = c_element.doc._private */ - __Pyx_TraceLine(120,0,__PYX_ERR(4, 120, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_element->doc->_private != NULL) != 0); if (__pyx_t_1) { @@ -14772,7 +14485,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__fakeDocElementFactory(struct Lx * c_element = c_element.doc._private * #assert c_element.type == tree.XML_ELEMENT_NODE */ - __Pyx_TraceLine(121,0,__PYX_ERR(4, 121, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_element == __pyx_v_c_element->doc->children) != 0); if (__pyx_t_1) { @@ -14783,7 +14495,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__fakeDocElementFactory(struct Lx * #assert c_element.type == tree.XML_ELEMENT_NODE * return _elementFactory(doc, c_element) */ - __Pyx_TraceLine(122,0,__PYX_ERR(4, 122, __pyx_L1_error)) __pyx_v_c_element = ((xmlNode *)__pyx_v_c_element->doc->_private); /* "src/lxml/proxy.pxi":121 @@ -14820,7 +14531,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__fakeDocElementFactory(struct Lx * * ################################################################################ */ - __Pyx_TraceLine(124,0,__PYX_ERR(4, 124, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(__pyx_v_doc, __pyx_v_c_element)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -14843,7 +14553,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__fakeDocElementFactory(struct Lx __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -14859,11 +14568,9 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__fakeDocElementFactory(struct Lx static int __pyx_f_4lxml_5etree_attemptDeallocation(xmlNode *__pyx_v_c_node) { xmlNode *__pyx_v_c_top; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("attemptDeallocation", 0); - __Pyx_TraceCall("attemptDeallocation", __pyx_f[4], 129, 0, __PYX_ERR(4, 129, __pyx_L1_error)); /* "src/lxml/proxy.pxi":134 * cdef xmlNode* c_top @@ -14872,7 +14579,6 @@ static int __pyx_f_4lxml_5etree_attemptDeallocation(xmlNode *__pyx_v_c_node) { * #print "not freeing, node is NULL" * return 0 */ - __Pyx_TraceLine(134,0,__PYX_ERR(4, 134, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_1) { @@ -14883,7 +14589,6 @@ static int __pyx_f_4lxml_5etree_attemptDeallocation(xmlNode *__pyx_v_c_node) { * c_top = getDeallocationTop(c_node) * if c_top is not NULL: */ - __Pyx_TraceLine(136,0,__PYX_ERR(4, 136, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -14903,7 +14608,6 @@ static int __pyx_f_4lxml_5etree_attemptDeallocation(xmlNode *__pyx_v_c_node) { * if c_top is not NULL: * #print "freeing:", c_top.name */ - __Pyx_TraceLine(137,0,__PYX_ERR(4, 137, __pyx_L1_error)) __pyx_v_c_top = __pyx_f_4lxml_5etree_getDeallocationTop(__pyx_v_c_node); /* "src/lxml/proxy.pxi":138 @@ -14913,7 +14617,6 @@ static int __pyx_f_4lxml_5etree_attemptDeallocation(xmlNode *__pyx_v_c_node) { * #print "freeing:", c_top.name * _removeText(c_top.next) # tail */ - __Pyx_TraceLine(138,0,__PYX_ERR(4, 138, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_top != NULL) != 0); if (__pyx_t_1) { @@ -14924,7 +14627,6 @@ static int __pyx_f_4lxml_5etree_attemptDeallocation(xmlNode *__pyx_v_c_node) { * tree.xmlFreeNode(c_top) * return 1 */ - __Pyx_TraceLine(140,0,__PYX_ERR(4, 140, __pyx_L1_error)) __pyx_f_4lxml_5etree__removeText(__pyx_v_c_top->next); /* "src/lxml/proxy.pxi":141 @@ -14934,7 +14636,6 @@ static int __pyx_f_4lxml_5etree_attemptDeallocation(xmlNode *__pyx_v_c_node) { * return 1 * return 0 */ - __Pyx_TraceLine(141,0,__PYX_ERR(4, 141, __pyx_L1_error)) xmlFreeNode(__pyx_v_c_top); /* "src/lxml/proxy.pxi":142 @@ -14944,7 +14645,6 @@ static int __pyx_f_4lxml_5etree_attemptDeallocation(xmlNode *__pyx_v_c_node) { * return 0 * */ - __Pyx_TraceLine(142,0,__PYX_ERR(4, 142, __pyx_L1_error)) __pyx_r = 1; goto __pyx_L0; @@ -14964,7 +14664,6 @@ static int __pyx_f_4lxml_5etree_attemptDeallocation(xmlNode *__pyx_v_c_node) { * * cdef xmlNode* getDeallocationTop(xmlNode* c_node): */ - __Pyx_TraceLine(143,0,__PYX_ERR(4, 143, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -14977,11 +14676,7 @@ static int __pyx_f_4lxml_5etree_attemptDeallocation(xmlNode *__pyx_v_c_node) { */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.attemptDeallocation", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -14997,13 +14692,11 @@ static int __pyx_f_4lxml_5etree_attemptDeallocation(xmlNode *__pyx_v_c_node) { static xmlNode *__pyx_f_4lxml_5etree_getDeallocationTop(xmlNode *__pyx_v_c_node) { xmlNode *__pyx_v_c_next; xmlNode *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlNode *__pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("getDeallocationTop", 0); - __Pyx_TraceCall("getDeallocationTop", __pyx_f[4], 145, 0, __PYX_ERR(4, 145, __pyx_L1_error)); /* "src/lxml/proxy.pxi":150 * cdef xmlNode* c_next @@ -15012,7 +14705,6 @@ static xmlNode *__pyx_f_4lxml_5etree_getDeallocationTop(xmlNode *__pyx_v_c_node) * #print "Not freeing: proxies still exist" * return NULL */ - __Pyx_TraceLine(150,0,__PYX_ERR(4, 150, __pyx_L1_error)) __pyx_t_1 = (__pyx_f_4lxml_5etree_hasProxy(__pyx_v_c_node) != 0); if (__pyx_t_1) { @@ -15023,7 +14715,6 @@ static xmlNode *__pyx_f_4lxml_5etree_getDeallocationTop(xmlNode *__pyx_v_c_node) * while c_node.parent is not NULL: * c_node = c_node.parent */ - __Pyx_TraceLine(152,0,__PYX_ERR(4, 152, __pyx_L1_error)) __pyx_r = NULL; goto __pyx_L0; @@ -15043,7 +14734,6 @@ static xmlNode *__pyx_f_4lxml_5etree_getDeallocationTop(xmlNode *__pyx_v_c_node) * c_node = c_node.parent * #print "checking:", c_current.type */ - __Pyx_TraceLine(153,0,__PYX_ERR(4, 153, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_node->parent != NULL) != 0); if (!__pyx_t_1) break; @@ -15055,7 +14745,6 @@ static xmlNode *__pyx_f_4lxml_5etree_getDeallocationTop(xmlNode *__pyx_v_c_node) * #print "checking:", c_current.type * if c_node.type == tree.XML_DOCUMENT_NODE or \ */ - __Pyx_TraceLine(154,0,__PYX_ERR(4, 154, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->parent; __pyx_v_c_node = __pyx_t_2; @@ -15066,18 +14755,8 @@ static xmlNode *__pyx_f_4lxml_5etree_getDeallocationTop(xmlNode *__pyx_v_c_node) * c_node.type == tree.XML_HTML_DOCUMENT_NODE: * #print "not freeing: still in doc" */ - __Pyx_TraceLine(156,0,__PYX_ERR(4, 156, __pyx_L1_error)) switch (__pyx_v_c_node->type) { case XML_DOCUMENT_NODE: - - /* "src/lxml/proxy.pxi":157 - * #print "checking:", c_current.type - * if c_node.type == tree.XML_DOCUMENT_NODE or \ - * c_node.type == tree.XML_HTML_DOCUMENT_NODE: # <<<<<<<<<<<<<< - * #print "not freeing: still in doc" - * return NULL - */ - __Pyx_TraceLine(157,0,__PYX_ERR(4, 157, __pyx_L1_error)) case XML_HTML_DOCUMENT_NODE: /* "src/lxml/proxy.pxi":159 @@ -15087,7 +14766,6 @@ static xmlNode *__pyx_f_4lxml_5etree_getDeallocationTop(xmlNode *__pyx_v_c_node) * # if we're still attached to the document, don't deallocate * if hasProxy(c_node): */ - __Pyx_TraceLine(159,0,__PYX_ERR(4, 159, __pyx_L1_error)) __pyx_r = NULL; goto __pyx_L0; @@ -15109,7 +14787,6 @@ static xmlNode *__pyx_f_4lxml_5etree_getDeallocationTop(xmlNode *__pyx_v_c_node) * #print "Not freeing: proxies still exist" * return NULL */ - __Pyx_TraceLine(161,0,__PYX_ERR(4, 161, __pyx_L1_error)) __pyx_t_1 = (__pyx_f_4lxml_5etree_hasProxy(__pyx_v_c_node) != 0); if (__pyx_t_1) { @@ -15120,7 +14797,6 @@ static xmlNode *__pyx_f_4lxml_5etree_getDeallocationTop(xmlNode *__pyx_v_c_node) * # see whether we have children to deallocate * if not canDeallocateChildNodes(c_node): */ - __Pyx_TraceLine(163,0,__PYX_ERR(4, 163, __pyx_L1_error)) __pyx_r = NULL; goto __pyx_L0; @@ -15141,7 +14817,6 @@ static xmlNode *__pyx_f_4lxml_5etree_getDeallocationTop(xmlNode *__pyx_v_c_node) * return NULL * # see whether we have siblings to deallocate */ - __Pyx_TraceLine(165,0,__PYX_ERR(4, 165, __pyx_L1_error)) __pyx_t_1 = ((!(__pyx_f_4lxml_5etree_canDeallocateChildNodes(__pyx_v_c_node) != 0)) != 0); if (__pyx_t_1) { @@ -15152,7 +14827,6 @@ static xmlNode *__pyx_f_4lxml_5etree_getDeallocationTop(xmlNode *__pyx_v_c_node) * # see whether we have siblings to deallocate * c_next = c_node.prev */ - __Pyx_TraceLine(166,0,__PYX_ERR(4, 166, __pyx_L1_error)) __pyx_r = NULL; goto __pyx_L0; @@ -15172,7 +14846,6 @@ static xmlNode *__pyx_f_4lxml_5etree_getDeallocationTop(xmlNode *__pyx_v_c_node) * while c_next: * if _isElement(c_next): */ - __Pyx_TraceLine(168,0,__PYX_ERR(4, 168, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->prev; __pyx_v_c_next = __pyx_t_2; @@ -15183,7 +14856,6 @@ static xmlNode *__pyx_f_4lxml_5etree_getDeallocationTop(xmlNode *__pyx_v_c_node) * if _isElement(c_next): * if hasProxy(c_next) or not canDeallocateChildNodes(c_next): */ - __Pyx_TraceLine(169,0,__PYX_ERR(4, 169, __pyx_L1_error)) while (1) { __pyx_t_1 = (__pyx_v_c_next != 0); if (!__pyx_t_1) break; @@ -15195,7 +14867,6 @@ static xmlNode *__pyx_f_4lxml_5etree_getDeallocationTop(xmlNode *__pyx_v_c_node) * if hasProxy(c_next) or not canDeallocateChildNodes(c_next): * return NULL */ - __Pyx_TraceLine(170,0,__PYX_ERR(4, 170, __pyx_L1_error)) __pyx_t_1 = (_isElement(__pyx_v_c_next) != 0); if (__pyx_t_1) { @@ -15206,7 +14877,6 @@ static xmlNode *__pyx_f_4lxml_5etree_getDeallocationTop(xmlNode *__pyx_v_c_node) * return NULL * c_next = c_next.prev */ - __Pyx_TraceLine(171,0,__PYX_ERR(4, 171, __pyx_L1_error)) __pyx_t_3 = (__pyx_f_4lxml_5etree_hasProxy(__pyx_v_c_next) != 0); if (!__pyx_t_3) { } else { @@ -15225,7 +14895,6 @@ static xmlNode *__pyx_f_4lxml_5etree_getDeallocationTop(xmlNode *__pyx_v_c_node) * c_next = c_next.prev * c_next = c_node.next */ - __Pyx_TraceLine(172,0,__PYX_ERR(4, 172, __pyx_L1_error)) __pyx_r = NULL; goto __pyx_L0; @@ -15254,7 +14923,6 @@ static xmlNode *__pyx_f_4lxml_5etree_getDeallocationTop(xmlNode *__pyx_v_c_node) * c_next = c_node.next * while c_next: */ - __Pyx_TraceLine(173,0,__PYX_ERR(4, 173, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_next->prev; __pyx_v_c_next = __pyx_t_2; } @@ -15266,7 +14934,6 @@ static xmlNode *__pyx_f_4lxml_5etree_getDeallocationTop(xmlNode *__pyx_v_c_node) * while c_next: * if _isElement(c_next): */ - __Pyx_TraceLine(174,0,__PYX_ERR(4, 174, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->next; __pyx_v_c_next = __pyx_t_2; @@ -15277,7 +14944,6 @@ static xmlNode *__pyx_f_4lxml_5etree_getDeallocationTop(xmlNode *__pyx_v_c_node) * if _isElement(c_next): * if hasProxy(c_next) or not canDeallocateChildNodes(c_next): */ - __Pyx_TraceLine(175,0,__PYX_ERR(4, 175, __pyx_L1_error)) while (1) { __pyx_t_1 = (__pyx_v_c_next != 0); if (!__pyx_t_1) break; @@ -15289,7 +14955,6 @@ static xmlNode *__pyx_f_4lxml_5etree_getDeallocationTop(xmlNode *__pyx_v_c_node) * if hasProxy(c_next) or not canDeallocateChildNodes(c_next): * return NULL */ - __Pyx_TraceLine(176,0,__PYX_ERR(4, 176, __pyx_L1_error)) __pyx_t_1 = (_isElement(__pyx_v_c_next) != 0); if (__pyx_t_1) { @@ -15300,7 +14965,6 @@ static xmlNode *__pyx_f_4lxml_5etree_getDeallocationTop(xmlNode *__pyx_v_c_node) * return NULL * c_next = c_next.next */ - __Pyx_TraceLine(177,0,__PYX_ERR(4, 177, __pyx_L1_error)) __pyx_t_3 = (__pyx_f_4lxml_5etree_hasProxy(__pyx_v_c_next) != 0); if (!__pyx_t_3) { } else { @@ -15319,7 +14983,6 @@ static xmlNode *__pyx_f_4lxml_5etree_getDeallocationTop(xmlNode *__pyx_v_c_node) * c_next = c_next.next * return c_node */ - __Pyx_TraceLine(178,0,__PYX_ERR(4, 178, __pyx_L1_error)) __pyx_r = NULL; goto __pyx_L0; @@ -15348,7 +15011,6 @@ static xmlNode *__pyx_f_4lxml_5etree_getDeallocationTop(xmlNode *__pyx_v_c_node) * return c_node * */ - __Pyx_TraceLine(179,0,__PYX_ERR(4, 179, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_next->next; __pyx_v_c_next = __pyx_t_2; } @@ -15360,7 +15022,6 @@ static xmlNode *__pyx_f_4lxml_5etree_getDeallocationTop(xmlNode *__pyx_v_c_node) * * cdef int canDeallocateChildNodes(xmlNode* c_parent): */ - __Pyx_TraceLine(180,0,__PYX_ERR(4, 180, __pyx_L1_error)) __pyx_r = __pyx_v_c_node; goto __pyx_L0; @@ -15373,11 +15034,7 @@ static xmlNode *__pyx_f_4lxml_5etree_getDeallocationTop(xmlNode *__pyx_v_c_node) */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.getDeallocationTop", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -15393,12 +15050,10 @@ static xmlNode *__pyx_f_4lxml_5etree_getDeallocationTop(xmlNode *__pyx_v_c_node) static int __pyx_f_4lxml_5etree_canDeallocateChildNodes(xmlNode *__pyx_v_c_parent) { xmlNode *__pyx_v_c_node; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlNode *__pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("canDeallocateChildNodes", 0); - __Pyx_TraceCall("canDeallocateChildNodes", __pyx_f[4], 182, 0, __PYX_ERR(4, 182, __pyx_L1_error)); /* "src/lxml/proxy.pxi":184 * cdef int canDeallocateChildNodes(xmlNode* c_parent): @@ -15407,7 +15062,6 @@ static int __pyx_f_4lxml_5etree_canDeallocateChildNodes(xmlNode *__pyx_v_c_paren * tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_parent, c_node, 1) * if hasProxy(c_node): */ - __Pyx_TraceLine(184,0,__PYX_ERR(4, 184, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_parent->children; __pyx_v_c_node = __pyx_t_1; @@ -15418,7 +15072,6 @@ static int __pyx_f_4lxml_5etree_canDeallocateChildNodes(xmlNode *__pyx_v_c_paren * if hasProxy(c_node): * return 0 */ - __Pyx_TraceLine(185,0,__PYX_ERR(4, 185, __pyx_L1_error)) BEGIN_FOR_EACH_ELEMENT_FROM(__pyx_v_c_parent, __pyx_v_c_node, 1); /* "src/lxml/proxy.pxi":186 @@ -15428,7 +15081,6 @@ static int __pyx_f_4lxml_5etree_canDeallocateChildNodes(xmlNode *__pyx_v_c_paren * return 0 * tree.END_FOR_EACH_ELEMENT_FROM(c_node) */ - __Pyx_TraceLine(186,0,__PYX_ERR(4, 186, __pyx_L1_error)) __pyx_t_2 = (__pyx_f_4lxml_5etree_hasProxy(__pyx_v_c_node) != 0); if (__pyx_t_2) { @@ -15439,7 +15091,6 @@ static int __pyx_f_4lxml_5etree_canDeallocateChildNodes(xmlNode *__pyx_v_c_paren * tree.END_FOR_EACH_ELEMENT_FROM(c_node) * return 1 */ - __Pyx_TraceLine(187,0,__PYX_ERR(4, 187, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -15459,7 +15110,6 @@ static int __pyx_f_4lxml_5etree_canDeallocateChildNodes(xmlNode *__pyx_v_c_paren * return 1 * */ - __Pyx_TraceLine(188,0,__PYX_ERR(4, 188, __pyx_L1_error)) END_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node); /* "src/lxml/proxy.pxi":189 @@ -15469,7 +15119,6 @@ static int __pyx_f_4lxml_5etree_canDeallocateChildNodes(xmlNode *__pyx_v_c_paren * * ################################################################################ */ - __Pyx_TraceLine(189,0,__PYX_ERR(4, 189, __pyx_L1_error)) __pyx_r = 1; goto __pyx_L0; @@ -15482,11 +15131,7 @@ static int __pyx_f_4lxml_5etree_canDeallocateChildNodes(xmlNode *__pyx_v_c_paren */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.canDeallocateChildNodes", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -15502,12 +15147,10 @@ static int __pyx_f_4lxml_5etree_canDeallocateChildNodes(xmlNode *__pyx_v_c_paren static void __pyx_f_4lxml_5etree__copyParentNamespaces(xmlNode *__pyx_v_c_from_node, xmlNode *__pyx_v_c_to_node) { xmlNode *__pyx_v_c_parent; xmlNs *__pyx_v_c_new_ns; - __Pyx_TraceDeclarations xmlNode *__pyx_t_1; int __pyx_t_2; int __pyx_t_3; xmlNs *__pyx_t_4; - __Pyx_TraceCall("_copyParentNamespaces", __pyx_f[4], 194, 1, __PYX_ERR(4, 194, __pyx_L1_error)); /* "src/lxml/proxy.pxi":201 * cdef xmlNs* c_new_ns @@ -15516,7 +15159,6 @@ static void __pyx_f_4lxml_5etree__copyParentNamespaces(xmlNode *__pyx_v_c_from_n * while c_parent and (tree._isElementOrXInclude(c_parent) or * c_parent.type == tree.XML_DOCUMENT_NODE): */ - __Pyx_TraceLine(201,1,__PYX_ERR(4, 201, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_from_node->parent; __pyx_v_c_parent = __pyx_t_1; @@ -15527,7 +15169,6 @@ static void __pyx_f_4lxml_5etree__copyParentNamespaces(xmlNode *__pyx_v_c_from_n * c_parent.type == tree.XML_DOCUMENT_NODE): * c_new_ns = c_parent.nsDef */ - __Pyx_TraceLine(202,1,__PYX_ERR(4, 202, __pyx_L1_error)) while (1) { __pyx_t_3 = (__pyx_v_c_parent != 0); if (__pyx_t_3) { @@ -15549,7 +15190,6 @@ static void __pyx_f_4lxml_5etree__copyParentNamespaces(xmlNode *__pyx_v_c_from_n * c_new_ns = c_parent.nsDef * while c_new_ns: */ - __Pyx_TraceLine(203,1,__PYX_ERR(4, 203, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_parent->type == XML_DOCUMENT_NODE) != 0); __pyx_t_2 = __pyx_t_3; __pyx_L5_bool_binop_done:; @@ -15562,7 +15202,6 @@ static void __pyx_f_4lxml_5etree__copyParentNamespaces(xmlNode *__pyx_v_c_from_n * while c_new_ns: * # libxml2 will check if the prefix is already defined */ - __Pyx_TraceLine(204,1,__PYX_ERR(4, 204, __pyx_L1_error)) __pyx_t_4 = __pyx_v_c_parent->nsDef; __pyx_v_c_new_ns = __pyx_t_4; @@ -15573,7 +15212,6 @@ static void __pyx_f_4lxml_5etree__copyParentNamespaces(xmlNode *__pyx_v_c_from_n * # libxml2 will check if the prefix is already defined * tree.xmlNewNs(c_to_node, c_new_ns.href, c_new_ns.prefix) */ - __Pyx_TraceLine(205,1,__PYX_ERR(4, 205, __pyx_L1_error)) while (1) { __pyx_t_2 = (__pyx_v_c_new_ns != 0); if (!__pyx_t_2) break; @@ -15585,7 +15223,6 @@ static void __pyx_f_4lxml_5etree__copyParentNamespaces(xmlNode *__pyx_v_c_from_n * c_new_ns = c_new_ns.next * c_parent = c_parent.parent */ - __Pyx_TraceLine(207,1,__PYX_ERR(4, 207, __pyx_L1_error)) (void)(xmlNewNs(__pyx_v_c_to_node, __pyx_v_c_new_ns->href, __pyx_v_c_new_ns->prefix)); /* "src/lxml/proxy.pxi":208 @@ -15595,7 +15232,6 @@ static void __pyx_f_4lxml_5etree__copyParentNamespaces(xmlNode *__pyx_v_c_from_n * c_parent = c_parent.parent * */ - __Pyx_TraceLine(208,1,__PYX_ERR(4, 208, __pyx_L1_error)) __pyx_t_4 = __pyx_v_c_new_ns->next; __pyx_v_c_new_ns = __pyx_t_4; } @@ -15607,7 +15243,6 @@ static void __pyx_f_4lxml_5etree__copyParentNamespaces(xmlNode *__pyx_v_c_from_n * * */ - __Pyx_TraceLine(209,1,__PYX_ERR(4, 209, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_parent->parent; __pyx_v_c_parent = __pyx_t_1; } @@ -15621,11 +15256,6 @@ static void __pyx_f_4lxml_5etree__copyParentNamespaces(xmlNode *__pyx_v_c_from_n */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._copyParentNamespaces", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); } /* "src/lxml/proxy.pxi":223 @@ -15639,11 +15269,9 @@ static void __pyx_f_4lxml_5etree__copyParentNamespaces(xmlNode *__pyx_v_c_from_n static int __pyx_f_4lxml_5etree__growNsCache(__pyx_t_4lxml_5etree__nscache *__pyx_v_c_ns_cache) { __pyx_t_4lxml_5etree__ns_update_map *__pyx_v_ns_map_ptr; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_growNsCache", 0); - __Pyx_TraceCall("_growNsCache", __pyx_f[4], 223, 0, __PYX_ERR(4, 223, __pyx_L1_error)); /* "src/lxml/proxy.pxi":225 * cdef int _growNsCache(_nscache* c_ns_cache) except -1: @@ -15652,7 +15280,6 @@ static int __pyx_f_4lxml_5etree__growNsCache(__pyx_t_4lxml_5etree__nscache *__py * c_ns_cache.size = 20 * else: */ - __Pyx_TraceLine(225,0,__PYX_ERR(4, 225, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_ns_cache->size == 0) != 0); if (__pyx_t_1) { @@ -15663,7 +15290,6 @@ static int __pyx_f_4lxml_5etree__growNsCache(__pyx_t_4lxml_5etree__nscache *__py * else: * c_ns_cache.size *= 2 */ - __Pyx_TraceLine(226,0,__PYX_ERR(4, 226, __pyx_L1_error)) __pyx_v_c_ns_cache->size = 20; /* "src/lxml/proxy.pxi":225 @@ -15683,7 +15309,6 @@ static int __pyx_f_4lxml_5etree__growNsCache(__pyx_t_4lxml_5etree__nscache *__py * ns_map_ptr = <_ns_update_map*> python.lxml_realloc( * c_ns_cache.ns_map, c_ns_cache.size, sizeof(_ns_update_map)) */ - __Pyx_TraceLine(228,0,__PYX_ERR(4, 228, __pyx_L1_error)) /*else*/ { __pyx_v_c_ns_cache->size = (__pyx_v_c_ns_cache->size * 2); } @@ -15696,7 +15321,6 @@ static int __pyx_f_4lxml_5etree__growNsCache(__pyx_t_4lxml_5etree__nscache *__py * c_ns_cache.ns_map, c_ns_cache.size, sizeof(_ns_update_map)) * if not ns_map_ptr: */ - __Pyx_TraceLine(229,0,__PYX_ERR(4, 229, __pyx_L1_error)) __pyx_v_ns_map_ptr = ((__pyx_t_4lxml_5etree__ns_update_map *)lxml_realloc(__pyx_v_c_ns_cache->ns_map, __pyx_v_c_ns_cache->size, (sizeof(__pyx_t_4lxml_5etree__ns_update_map)))); /* "src/lxml/proxy.pxi":231 @@ -15706,7 +15330,6 @@ static int __pyx_f_4lxml_5etree__growNsCache(__pyx_t_4lxml_5etree__nscache *__py * python.lxml_free(c_ns_cache.ns_map) * c_ns_cache.ns_map = NULL */ - __Pyx_TraceLine(231,0,__PYX_ERR(4, 231, __pyx_L1_error)) __pyx_t_1 = ((!(__pyx_v_ns_map_ptr != 0)) != 0); if (unlikely(__pyx_t_1)) { @@ -15717,7 +15340,6 @@ static int __pyx_f_4lxml_5etree__growNsCache(__pyx_t_4lxml_5etree__nscache *__py * c_ns_cache.ns_map = NULL * raise MemoryError() */ - __Pyx_TraceLine(232,0,__PYX_ERR(4, 232, __pyx_L1_error)) lxml_free(__pyx_v_c_ns_cache->ns_map); /* "src/lxml/proxy.pxi":233 @@ -15727,7 +15349,6 @@ static int __pyx_f_4lxml_5etree__growNsCache(__pyx_t_4lxml_5etree__nscache *__py * raise MemoryError() * c_ns_cache.ns_map = ns_map_ptr */ - __Pyx_TraceLine(233,0,__PYX_ERR(4, 233, __pyx_L1_error)) __pyx_v_c_ns_cache->ns_map = NULL; /* "src/lxml/proxy.pxi":234 @@ -15737,7 +15358,6 @@ static int __pyx_f_4lxml_5etree__growNsCache(__pyx_t_4lxml_5etree__nscache *__py * c_ns_cache.ns_map = ns_map_ptr * return 0 */ - __Pyx_TraceLine(234,0,__PYX_ERR(4, 234, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(4, 234, __pyx_L1_error) /* "src/lxml/proxy.pxi":231 @@ -15756,7 +15376,6 @@ static int __pyx_f_4lxml_5etree__growNsCache(__pyx_t_4lxml_5etree__nscache *__py * return 0 * */ - __Pyx_TraceLine(235,0,__PYX_ERR(4, 235, __pyx_L1_error)) __pyx_v_c_ns_cache->ns_map = __pyx_v_ns_map_ptr; /* "src/lxml/proxy.pxi":236 @@ -15766,7 +15385,6 @@ static int __pyx_f_4lxml_5etree__growNsCache(__pyx_t_4lxml_5etree__nscache *__py * * */ - __Pyx_TraceLine(236,0,__PYX_ERR(4, 236, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -15783,7 +15401,6 @@ static int __pyx_f_4lxml_5etree__growNsCache(__pyx_t_4lxml_5etree__nscache *__py __Pyx_AddTraceback("lxml.etree._growNsCache", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -15798,13 +15415,11 @@ static int __pyx_f_4lxml_5etree__growNsCache(__pyx_t_4lxml_5etree__nscache *__py static CYTHON_INLINE int __pyx_f_4lxml_5etree__appendToNsCache(__pyx_t_4lxml_5etree__nscache *__pyx_v_c_ns_cache, xmlNs *__pyx_v_c_old_ns, xmlNs *__pyx_v_c_new_ns) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __pyx_t_4lxml_5etree__ns_update_map __pyx_t_3; __Pyx_RefNannySetupContext("_appendToNsCache", 0); - __Pyx_TraceCall("_appendToNsCache", __pyx_f[4], 239, 0, __PYX_ERR(4, 239, __pyx_L1_error)); /* "src/lxml/proxy.pxi":241 * cdef inline int _appendToNsCache(_nscache* c_ns_cache, @@ -15813,7 +15428,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__appendToNsCache(__pyx_t_4lxml_5et * _growNsCache(c_ns_cache) * c_ns_cache.ns_map[c_ns_cache.last] = _ns_update_map(old=c_old_ns, new=c_new_ns) */ - __Pyx_TraceLine(241,0,__PYX_ERR(4, 241, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_ns_cache->last >= __pyx_v_c_ns_cache->size) != 0); if (__pyx_t_1) { @@ -15824,7 +15438,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__appendToNsCache(__pyx_t_4lxml_5et * c_ns_cache.ns_map[c_ns_cache.last] = _ns_update_map(old=c_old_ns, new=c_new_ns) * c_ns_cache.last += 1 */ - __Pyx_TraceLine(242,0,__PYX_ERR(4, 242, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__growNsCache(__pyx_v_c_ns_cache); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(4, 242, __pyx_L1_error) /* "src/lxml/proxy.pxi":241 @@ -15843,7 +15456,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__appendToNsCache(__pyx_t_4lxml_5et * c_ns_cache.last += 1 * */ - __Pyx_TraceLine(243,0,__PYX_ERR(4, 243, __pyx_L1_error)) __pyx_t_3.old = __pyx_v_c_old_ns; __pyx_t_3.new = __pyx_v_c_new_ns; (__pyx_v_c_ns_cache->ns_map[__pyx_v_c_ns_cache->last]) = __pyx_t_3; @@ -15855,7 +15467,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__appendToNsCache(__pyx_t_4lxml_5et * * */ - __Pyx_TraceLine(244,0,__PYX_ERR(4, 244, __pyx_L1_error)) __pyx_v_c_ns_cache->last = (__pyx_v_c_ns_cache->last + 1); /* "src/lxml/proxy.pxi":239 @@ -15873,7 +15484,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__appendToNsCache(__pyx_t_4lxml_5et __Pyx_AddTraceback("lxml.etree._appendToNsCache", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -15891,13 +15501,11 @@ static int __pyx_f_4lxml_5etree__stripRedundantNamespaceDeclarations(xmlNode *__ xmlNs *__pyx_v_c_ns_next; xmlNs **__pyx_v_c_nsdef; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; xmlNs *__pyx_t_3; __Pyx_RefNannySetupContext("_stripRedundantNamespaceDeclarations", 0); - __Pyx_TraceCall("_stripRedundantNamespaceDeclarations", __pyx_f[4], 247, 0, __PYX_ERR(4, 247, __pyx_L1_error)); /* "src/lxml/proxy.pxi":257 * cdef xmlNs** c_nsdef @@ -15906,7 +15514,6 @@ static int __pyx_f_4lxml_5etree__stripRedundantNamespaceDeclarations(xmlNode *__ * while c_nsdef[0] is not NULL: * c_ns = tree.xmlSearchNsByHref( */ - __Pyx_TraceLine(257,0,__PYX_ERR(4, 257, __pyx_L1_error)) __pyx_v_c_nsdef = (&__pyx_v_c_element->nsDef); /* "src/lxml/proxy.pxi":258 @@ -15916,7 +15523,6 @@ static int __pyx_f_4lxml_5etree__stripRedundantNamespaceDeclarations(xmlNode *__ * c_ns = tree.xmlSearchNsByHref( * c_element.doc, c_element.parent, c_nsdef[0].href) */ - __Pyx_TraceLine(258,0,__PYX_ERR(4, 258, __pyx_L1_error)) while (1) { __pyx_t_1 = (((__pyx_v_c_nsdef[0]) != NULL) != 0); if (!__pyx_t_1) break; @@ -15928,7 +15534,6 @@ static int __pyx_f_4lxml_5etree__stripRedundantNamespaceDeclarations(xmlNode *__ * c_element.doc, c_element.parent, c_nsdef[0].href) * if c_ns is NULL: */ - __Pyx_TraceLine(259,0,__PYX_ERR(4, 259, __pyx_L1_error)) __pyx_v_c_ns = xmlSearchNsByHref(__pyx_v_c_element->doc, __pyx_v_c_element->parent, (__pyx_v_c_nsdef[0])->href); /* "src/lxml/proxy.pxi":261 @@ -15938,7 +15543,6 @@ static int __pyx_f_4lxml_5etree__stripRedundantNamespaceDeclarations(xmlNode *__ * # new namespace href => keep and cache the ns declaration * _appendToNsCache(c_ns_cache, c_nsdef[0], c_nsdef[0]) */ - __Pyx_TraceLine(261,0,__PYX_ERR(4, 261, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_ns == NULL) != 0); if (__pyx_t_1) { @@ -15949,7 +15553,6 @@ static int __pyx_f_4lxml_5etree__stripRedundantNamespaceDeclarations(xmlNode *__ * c_nsdef = &c_nsdef[0].next * else: */ - __Pyx_TraceLine(263,0,__PYX_ERR(4, 263, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__appendToNsCache(__pyx_v_c_ns_cache, (__pyx_v_c_nsdef[0]), (__pyx_v_c_nsdef[0])); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(4, 263, __pyx_L1_error) /* "src/lxml/proxy.pxi":264 @@ -15959,7 +15562,6 @@ static int __pyx_f_4lxml_5etree__stripRedundantNamespaceDeclarations(xmlNode *__ * else: * # known namespace href => cache mapping and strip old ns */ - __Pyx_TraceLine(264,0,__PYX_ERR(4, 264, __pyx_L1_error)) __pyx_v_c_nsdef = (&(__pyx_v_c_nsdef[0])->next); /* "src/lxml/proxy.pxi":261 @@ -15979,7 +15581,6 @@ static int __pyx_f_4lxml_5etree__stripRedundantNamespaceDeclarations(xmlNode *__ * # cut out c_nsdef.next and prepend it to garbage chain * c_ns_next = c_nsdef[0].next */ - __Pyx_TraceLine(267,0,__PYX_ERR(4, 267, __pyx_L1_error)) /*else*/ { __pyx_t_2 = __pyx_f_4lxml_5etree__appendToNsCache(__pyx_v_c_ns_cache, (__pyx_v_c_nsdef[0]), __pyx_v_c_ns); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(4, 267, __pyx_L1_error) @@ -15990,7 +15591,6 @@ static int __pyx_f_4lxml_5etree__stripRedundantNamespaceDeclarations(xmlNode *__ * c_nsdef[0].next = c_del_ns_list[0] * c_del_ns_list[0] = c_nsdef[0] */ - __Pyx_TraceLine(269,0,__PYX_ERR(4, 269, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_c_nsdef[0])->next; __pyx_v_c_ns_next = __pyx_t_3; @@ -16001,7 +15601,6 @@ static int __pyx_f_4lxml_5etree__stripRedundantNamespaceDeclarations(xmlNode *__ * c_del_ns_list[0] = c_nsdef[0] * c_nsdef[0] = c_ns_next */ - __Pyx_TraceLine(270,0,__PYX_ERR(4, 270, __pyx_L1_error)) (__pyx_v_c_nsdef[0])->next = (__pyx_v_c_del_ns_list[0]); /* "src/lxml/proxy.pxi":271 @@ -16011,7 +15610,6 @@ static int __pyx_f_4lxml_5etree__stripRedundantNamespaceDeclarations(xmlNode *__ * c_nsdef[0] = c_ns_next * return 0 */ - __Pyx_TraceLine(271,0,__PYX_ERR(4, 271, __pyx_L1_error)) (__pyx_v_c_del_ns_list[0]) = (__pyx_v_c_nsdef[0]); /* "src/lxml/proxy.pxi":272 @@ -16021,7 +15619,6 @@ static int __pyx_f_4lxml_5etree__stripRedundantNamespaceDeclarations(xmlNode *__ * return 0 * */ - __Pyx_TraceLine(272,0,__PYX_ERR(4, 272, __pyx_L1_error)) (__pyx_v_c_nsdef[0]) = __pyx_v_c_ns_next; } __pyx_L5:; @@ -16034,7 +15631,6 @@ static int __pyx_f_4lxml_5etree__stripRedundantNamespaceDeclarations(xmlNode *__ * * */ - __Pyx_TraceLine(273,0,__PYX_ERR(4, 273, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -16051,7 +15647,6 @@ static int __pyx_f_4lxml_5etree__stripRedundantNamespaceDeclarations(xmlNode *__ __Pyx_AddTraceback("lxml.etree._stripRedundantNamespaceDeclarations", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -16066,12 +15661,10 @@ static int __pyx_f_4lxml_5etree__stripRedundantNamespaceDeclarations(xmlNode *__ static void __pyx_f_4lxml_5etree__cleanUpFromNamespaceAdaptation(xmlNode *__pyx_v_c_start_node, __pyx_t_4lxml_5etree__nscache *__pyx_v_c_ns_cache, xmlNs *__pyx_v_c_del_ns_list) { xmlNs *__pyx_v_c_ns; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlNs *__pyx_t_2; __Pyx_RefNannySetupContext("_cleanUpFromNamespaceAdaptation", 0); - __Pyx_TraceCall("_cleanUpFromNamespaceAdaptation", __pyx_f[4], 276, 0, __PYX_ERR(4, 276, __pyx_L1_error)); /* "src/lxml/proxy.pxi":282 * # by re-adding the original xmlNs declarations (which might still be used in some @@ -16080,7 +15673,6 @@ static void __pyx_f_4lxml_5etree__cleanUpFromNamespaceAdaptation(xmlNode *__pyx_ * python.lxml_free(c_ns_cache.ns_map) * if c_del_ns_list: */ - __Pyx_TraceLine(282,0,__PYX_ERR(4, 282, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_c_ns_cache->ns_map != 0); if (__pyx_t_1) { @@ -16091,7 +15683,6 @@ static void __pyx_f_4lxml_5etree__cleanUpFromNamespaceAdaptation(xmlNode *__pyx_ * if c_del_ns_list: * if not c_start_node.nsDef: */ - __Pyx_TraceLine(283,0,__PYX_ERR(4, 283, __pyx_L1_error)) lxml_free(__pyx_v_c_ns_cache->ns_map); /* "src/lxml/proxy.pxi":282 @@ -16110,7 +15701,6 @@ static void __pyx_f_4lxml_5etree__cleanUpFromNamespaceAdaptation(xmlNode *__pyx_ * if not c_start_node.nsDef: * c_start_node.nsDef = c_del_ns_list */ - __Pyx_TraceLine(284,0,__PYX_ERR(4, 284, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_c_del_ns_list != 0); if (__pyx_t_1) { @@ -16121,7 +15711,6 @@ static void __pyx_f_4lxml_5etree__cleanUpFromNamespaceAdaptation(xmlNode *__pyx_ * c_start_node.nsDef = c_del_ns_list * else: */ - __Pyx_TraceLine(285,0,__PYX_ERR(4, 285, __pyx_L1_error)) __pyx_t_1 = ((!(__pyx_v_c_start_node->nsDef != 0)) != 0); if (__pyx_t_1) { @@ -16132,7 +15721,6 @@ static void __pyx_f_4lxml_5etree__cleanUpFromNamespaceAdaptation(xmlNode *__pyx_ * else: * c_ns = c_start_node.nsDef */ - __Pyx_TraceLine(286,0,__PYX_ERR(4, 286, __pyx_L1_error)) __pyx_v_c_start_node->nsDef = __pyx_v_c_del_ns_list; /* "src/lxml/proxy.pxi":285 @@ -16152,7 +15740,6 @@ static void __pyx_f_4lxml_5etree__cleanUpFromNamespaceAdaptation(xmlNode *__pyx_ * while c_ns.next: * c_ns = c_ns.next */ - __Pyx_TraceLine(288,0,__PYX_ERR(4, 288, __pyx_L1_error)) /*else*/ { __pyx_t_2 = __pyx_v_c_start_node->nsDef; __pyx_v_c_ns = __pyx_t_2; @@ -16164,7 +15751,6 @@ static void __pyx_f_4lxml_5etree__cleanUpFromNamespaceAdaptation(xmlNode *__pyx_ * c_ns = c_ns.next * c_ns.next = c_del_ns_list */ - __Pyx_TraceLine(289,0,__PYX_ERR(4, 289, __pyx_L1_error)) while (1) { __pyx_t_1 = (__pyx_v_c_ns->next != 0); if (!__pyx_t_1) break; @@ -16176,7 +15762,6 @@ static void __pyx_f_4lxml_5etree__cleanUpFromNamespaceAdaptation(xmlNode *__pyx_ * c_ns.next = c_del_ns_list * */ - __Pyx_TraceLine(290,0,__PYX_ERR(4, 290, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_ns->next; __pyx_v_c_ns = __pyx_t_2; } @@ -16188,7 +15773,6 @@ static void __pyx_f_4lxml_5etree__cleanUpFromNamespaceAdaptation(xmlNode *__pyx_ * * */ - __Pyx_TraceLine(291,0,__PYX_ERR(4, 291, __pyx_L1_error)) __pyx_v_c_ns->next = __pyx_v_c_del_ns_list; } __pyx_L5:; @@ -16211,11 +15795,6 @@ static void __pyx_f_4lxml_5etree__cleanUpFromNamespaceAdaptation(xmlNode *__pyx_ */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._cleanUpFromNamespaceAdaptation", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -16238,7 +15817,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ int __pyx_v_is_prefixed_attr; struct LxmlElement *__pyx_v_proxy = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __pyx_t_4lxml_5etree__nscache __pyx_t_1; int __pyx_t_2; @@ -16256,7 +15834,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ xmlNs *__pyx_t_14; xmlNode *__pyx_t_15; __Pyx_RefNannySetupContext("moveNodeToDocument", 0); - __Pyx_TraceCall("moveNodeToDocument", __pyx_f[4], 294, 0, __PYX_ERR(4, 294, __pyx_L1_error)); /* "src/lxml/proxy.pxi":328 * cdef xmlNode* c_node @@ -16265,7 +15842,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * cdef xmlNs* c_ns * cdef xmlNs* c_ns_next */ - __Pyx_TraceLine(328,0,__PYX_ERR(4, 328, __pyx_L1_error)) __pyx_t_1.ns_map = NULL; __pyx_t_1.size = 0; __pyx_t_1.last = 0; @@ -16278,7 +15854,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * cdef size_t i, proxy_count = 0 * cdef bint is_prefixed_attr */ - __Pyx_TraceLine(332,0,__PYX_ERR(4, 332, __pyx_L1_error)) __pyx_v_c_del_ns_list = NULL; /* "src/lxml/proxy.pxi":333 @@ -16288,7 +15863,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * cdef bint is_prefixed_attr * */ - __Pyx_TraceLine(333,0,__PYX_ERR(4, 333, __pyx_L1_error)) __pyx_v_proxy_count = 0; /* "src/lxml/proxy.pxi":336 @@ -16298,7 +15872,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * return 0 * */ - __Pyx_TraceLine(336,0,__PYX_ERR(4, 336, __pyx_L1_error)) __pyx_t_2 = ((!(_isElementOrXInclude(__pyx_v_c_element) != 0)) != 0); if (__pyx_t_2) { @@ -16309,7 +15882,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * * c_start_node = c_element */ - __Pyx_TraceLine(337,0,__PYX_ERR(4, 337, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -16329,7 +15901,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * * tree.BEGIN_FOR_EACH_FROM(c_element, c_element, 1) */ - __Pyx_TraceLine(339,0,__PYX_ERR(4, 339, __pyx_L1_error)) __pyx_v_c_start_node = __pyx_v_c_element; /* "src/lxml/proxy.pxi":341 @@ -16339,7 +15910,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * if tree._isElementOrXInclude(c_element): * if hasProxy(c_element): */ - __Pyx_TraceLine(341,0,__PYX_ERR(4, 341, __pyx_L1_error)) BEGIN_FOR_EACH_FROM(__pyx_v_c_element, __pyx_v_c_element, 1); /* "src/lxml/proxy.pxi":342 @@ -16349,7 +15919,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * if hasProxy(c_element): * proxy_count += 1 */ - __Pyx_TraceLine(342,0,__PYX_ERR(4, 342, __pyx_L1_error)) __pyx_t_2 = (_isElementOrXInclude(__pyx_v_c_element) != 0); if (__pyx_t_2) { @@ -16360,7 +15929,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * proxy_count += 1 * */ - __Pyx_TraceLine(343,0,__PYX_ERR(4, 343, __pyx_L1_error)) __pyx_t_2 = (__pyx_f_4lxml_5etree_hasProxy(__pyx_v_c_element) != 0); if (__pyx_t_2) { @@ -16371,7 +15939,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * * # 1) cut out namespaces defined here that are already known by */ - __Pyx_TraceLine(344,0,__PYX_ERR(4, 344, __pyx_L1_error)) __pyx_v_proxy_count = (__pyx_v_proxy_count + 1); /* "src/lxml/proxy.pxi":343 @@ -16390,7 +15957,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * try: * _stripRedundantNamespaceDeclarations(c_element, &c_ns_cache, &c_del_ns_list) */ - __Pyx_TraceLine(348,0,__PYX_ERR(4, 348, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_element->nsDef != NULL) != 0); if (__pyx_t_2) { @@ -16401,7 +15967,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * _stripRedundantNamespaceDeclarations(c_element, &c_ns_cache, &c_del_ns_list) * except: */ - __Pyx_TraceLine(349,0,__PYX_ERR(4, 349, __pyx_L7_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -16418,7 +15983,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * except: * _cleanUpFromNamespaceAdaptation(c_start_node, &c_ns_cache, c_del_ns_list) */ - __Pyx_TraceLine(350,0,__PYX_ERR(4, 350, __pyx_L7_error)) __pyx_t_6 = __pyx_f_4lxml_5etree__stripRedundantNamespaceDeclarations(__pyx_v_c_element, (&__pyx_v_c_ns_cache), (&__pyx_v_c_del_ns_list)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(4, 350, __pyx_L7_error) /* "src/lxml/proxy.pxi":349 @@ -16442,7 +16006,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * _cleanUpFromNamespaceAdaptation(c_start_node, &c_ns_cache, c_del_ns_list) * raise */ - __Pyx_TraceLine(351,0,__PYX_ERR(4, 351, __pyx_L9_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree.moveNodeToDocument", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(4, 351, __pyx_L9_except_error) @@ -16457,7 +16020,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * raise * */ - __Pyx_TraceLine(352,0,__PYX_ERR(4, 352, __pyx_L9_except_error)) __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":353 @@ -16467,7 +16029,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * * # 2) make sure the namespaces of an element and its attributes */ - __Pyx_TraceLine(353,0,__PYX_ERR(4, 353, __pyx_L9_except_error)) __Pyx_GIVEREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); @@ -16508,7 +16069,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * while c_node is not NULL: * if c_node.ns is not NULL: */ - __Pyx_TraceLine(357,0,__PYX_ERR(4, 357, __pyx_L1_error)) __pyx_v_c_node = __pyx_v_c_element; /* "src/lxml/proxy.pxi":358 @@ -16518,7 +16078,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * if c_node.ns is not NULL: * c_ns = NULL */ - __Pyx_TraceLine(358,0,__PYX_ERR(4, 358, __pyx_L1_error)) while (1) { __pyx_t_2 = ((__pyx_v_c_node != NULL) != 0); if (!__pyx_t_2) break; @@ -16530,7 +16089,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * c_ns = NULL * is_prefixed_attr = (c_node.type == tree.XML_ATTRIBUTE_NODE and c_node.ns.prefix) */ - __Pyx_TraceLine(359,0,__PYX_ERR(4, 359, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node->ns != NULL) != 0); if (__pyx_t_2) { @@ -16541,7 +16099,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * is_prefixed_attr = (c_node.type == tree.XML_ATTRIBUTE_NODE and c_node.ns.prefix) * for i in range(c_ns_cache.last): */ - __Pyx_TraceLine(360,0,__PYX_ERR(4, 360, __pyx_L1_error)) __pyx_v_c_ns = NULL; /* "src/lxml/proxy.pxi":361 @@ -16551,7 +16108,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * for i in range(c_ns_cache.last): * if c_node.ns is c_ns_cache.ns_map[i].old: */ - __Pyx_TraceLine(361,0,__PYX_ERR(4, 361, __pyx_L1_error)) __pyx_t_10 = ((__pyx_v_c_node->type == XML_ATTRIBUTE_NODE) != 0); if (__pyx_t_10) { } else { @@ -16570,7 +16126,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * if c_node.ns is c_ns_cache.ns_map[i].old: * if is_prefixed_attr and not c_ns_cache.ns_map[i].new.prefix: */ - __Pyx_TraceLine(362,0,__PYX_ERR(4, 362, __pyx_L1_error)) __pyx_t_11 = __pyx_v_c_ns_cache.last; __pyx_t_12 = __pyx_t_11; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) { @@ -16583,7 +16138,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * if is_prefixed_attr and not c_ns_cache.ns_map[i].new.prefix: * # avoid dropping prefix from attributes */ - __Pyx_TraceLine(363,0,__PYX_ERR(4, 363, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node->ns == (__pyx_v_c_ns_cache.ns_map[__pyx_v_i]).old) != 0); if (__pyx_t_2) { @@ -16594,7 +16148,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * # avoid dropping prefix from attributes * continue */ - __Pyx_TraceLine(364,0,__PYX_ERR(4, 364, __pyx_L1_error)) __pyx_t_10 = (__pyx_v_is_prefixed_attr != 0); if (__pyx_t_10) { } else { @@ -16613,7 +16166,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * c_ns = c_ns_cache.ns_map[i].new * break */ - __Pyx_TraceLine(366,0,__PYX_ERR(4, 366, __pyx_L1_error)) goto __pyx_L20_continue; /* "src/lxml/proxy.pxi":364 @@ -16632,7 +16184,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * break * */ - __Pyx_TraceLine(367,0,__PYX_ERR(4, 367, __pyx_L1_error)) __pyx_t_14 = (__pyx_v_c_ns_cache.ns_map[__pyx_v_i]).new; __pyx_v_c_ns = __pyx_t_14; @@ -16643,7 +16194,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * * if c_ns: */ - __Pyx_TraceLine(368,0,__PYX_ERR(4, 368, __pyx_L1_error)) goto __pyx_L21_break; /* "src/lxml/proxy.pxi":363 @@ -16665,7 +16215,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * c_node.ns = c_ns * else: */ - __Pyx_TraceLine(370,0,__PYX_ERR(4, 370, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_c_ns != 0); if (__pyx_t_2) { @@ -16676,7 +16225,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * else: * # not in cache or not acceptable */ - __Pyx_TraceLine(371,0,__PYX_ERR(4, 371, __pyx_L1_error)) __pyx_v_c_node->ns = __pyx_v_c_ns; /* "src/lxml/proxy.pxi":370 @@ -16696,7 +16244,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * c_ns = doc._findOrBuildNodeNs( * c_start_node, c_node.ns.href, c_node.ns.prefix, */ - __Pyx_TraceLine(375,0,__PYX_ERR(4, 375, __pyx_L1_error)) /*else*/ { { __Pyx_PyThreadState_declare @@ -16714,7 +16261,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * c_start_node, c_node.ns.href, c_node.ns.prefix, * c_node.type == tree.XML_ATTRIBUTE_NODE) */ - __Pyx_TraceLine(376,0,__PYX_ERR(4, 376, __pyx_L27_error)) __pyx_t_14 = __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_14 == ((xmlNs *)NULL))) __PYX_ERR(4, 376, __pyx_L27_error) __pyx_v_c_ns = __pyx_t_14; @@ -16725,7 +16271,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * _appendToNsCache(&c_ns_cache, c_node.ns, c_ns) * except: */ - __Pyx_TraceLine(379,0,__PYX_ERR(4, 379, __pyx_L27_error)) __pyx_v_c_node->ns = __pyx_v_c_ns; /* "src/lxml/proxy.pxi":380 @@ -16735,7 +16280,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * except: * _cleanUpFromNamespaceAdaptation(c_start_node, &c_ns_cache, c_del_ns_list) */ - __Pyx_TraceLine(380,0,__PYX_ERR(4, 380, __pyx_L27_error)) __pyx_t_6 = __pyx_f_4lxml_5etree__appendToNsCache((&__pyx_v_c_ns_cache), __pyx_v_c_node->ns, __pyx_v_c_ns); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(4, 380, __pyx_L27_error) /* "src/lxml/proxy.pxi":375 @@ -16762,7 +16306,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * _cleanUpFromNamespaceAdaptation(c_start_node, &c_ns_cache, c_del_ns_list) * raise */ - __Pyx_TraceLine(381,0,__PYX_ERR(4, 381, __pyx_L29_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree.moveNodeToDocument", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7) < 0) __PYX_ERR(4, 381, __pyx_L29_except_error) @@ -16777,7 +16320,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * raise * */ - __Pyx_TraceLine(382,0,__PYX_ERR(4, 382, __pyx_L29_except_error)) __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":383 @@ -16787,7 +16329,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * * if c_node is c_element: */ - __Pyx_TraceLine(383,0,__PYX_ERR(4, 383, __pyx_L29_except_error)) __Pyx_GIVEREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_7); @@ -16830,7 +16371,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * # after the element, continue with its attributes * c_node = c_element.properties */ - __Pyx_TraceLine(385,0,__PYX_ERR(4, 385, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node == __pyx_v_c_element) != 0); if (__pyx_t_2) { @@ -16841,7 +16381,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * else: * c_node = c_node.next */ - __Pyx_TraceLine(387,0,__PYX_ERR(4, 387, __pyx_L1_error)) __pyx_v_c_node = ((xmlNode *)__pyx_v_c_element->properties); /* "src/lxml/proxy.pxi":385 @@ -16861,7 +16400,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * tree.END_FOR_EACH_FROM(c_element) * */ - __Pyx_TraceLine(389,0,__PYX_ERR(4, 389, __pyx_L1_error)) /*else*/ { __pyx_t_15 = __pyx_v_c_node->next; __pyx_v_c_node = __pyx_t_15; @@ -16885,7 +16423,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * * # free now unused namespace declarations */ - __Pyx_TraceLine(390,0,__PYX_ERR(4, 390, __pyx_L1_error)) END_FOR_EACH_FROM(__pyx_v_c_element); /* "src/lxml/proxy.pxi":393 @@ -16895,7 +16432,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * tree.xmlFreeNsList(c_del_ns_list) * */ - __Pyx_TraceLine(393,0,__PYX_ERR(4, 393, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_del_ns_list != NULL) != 0); if (__pyx_t_2) { @@ -16906,7 +16442,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * * # cleanup */ - __Pyx_TraceLine(394,0,__PYX_ERR(4, 394, __pyx_L1_error)) xmlFreeNsList(__pyx_v_c_del_ns_list); /* "src/lxml/proxy.pxi":393 @@ -16925,7 +16460,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * python.lxml_free(c_ns_cache.ns_map) * */ - __Pyx_TraceLine(397,0,__PYX_ERR(4, 397, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_ns_cache.ns_map != NULL) != 0); if (__pyx_t_2) { @@ -16936,7 +16470,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * * # 3) fix the names in the tree if we moved it from a different thread */ - __Pyx_TraceLine(398,0,__PYX_ERR(4, 398, __pyx_L1_error)) lxml_free(__pyx_v_c_ns_cache.ns_map); /* "src/lxml/proxy.pxi":397 @@ -16955,7 +16488,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * fixThreadDictNames(c_start_node, c_source_doc.dict, doc._c_doc.dict) * */ - __Pyx_TraceLine(401,0,__PYX_ERR(4, 401, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_doc->_c_doc->dict != __pyx_v_c_source_doc->dict) != 0); if (__pyx_t_2) { @@ -16966,7 +16498,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * * # 4) fix _Document references */ - __Pyx_TraceLine(402,0,__PYX_ERR(4, 402, __pyx_L1_error)) __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":401 @@ -16985,7 +16516,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * if proxy_count == 1 and c_start_node._private is not NULL: * proxy = getProxy(c_start_node) */ - __Pyx_TraceLine(406,0,__PYX_ERR(4, 406, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_proxy_count > 0) != 0); if (__pyx_t_2) { @@ -16996,7 +16526,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * proxy = getProxy(c_start_node) * if proxy is not None: */ - __Pyx_TraceLine(407,0,__PYX_ERR(4, 407, __pyx_L1_error)) __pyx_t_10 = ((__pyx_v_proxy_count == 1) != 0); if (__pyx_t_10) { } else { @@ -17015,7 +16544,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * if proxy is not None: * if proxy._doc is not doc: */ - __Pyx_TraceLine(408,0,__PYX_ERR(4, 408, __pyx_L1_error)) __pyx_t_7 = ((PyObject *)__pyx_f_4lxml_5etree_getProxy(__pyx_v_c_start_node)); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_proxy = ((struct LxmlElement *)__pyx_t_7); @@ -17028,7 +16556,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * if proxy._doc is not doc: * proxy._doc = doc */ - __Pyx_TraceLine(409,0,__PYX_ERR(4, 409, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)__pyx_v_proxy) != Py_None); __pyx_t_10 = (__pyx_t_2 != 0); if (__pyx_t_10) { @@ -17040,7 +16567,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * proxy._doc = doc * else: */ - __Pyx_TraceLine(410,0,__PYX_ERR(4, 410, __pyx_L1_error)) __pyx_t_10 = (__pyx_v_proxy->_doc != __pyx_v_doc); __pyx_t_2 = (__pyx_t_10 != 0); if (__pyx_t_2) { @@ -17052,7 +16578,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * else: * fixElementDocument(c_start_node, doc, proxy_count) */ - __Pyx_TraceLine(411,0,__PYX_ERR(4, 411, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_doc)); __Pyx_GIVEREF(((PyObject *)__pyx_v_doc)); __Pyx_GOTREF(__pyx_v_proxy->_doc); @@ -17085,7 +16610,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * else: * fixElementDocument(c_start_node, doc, proxy_count) */ - __Pyx_TraceLine(413,0,__PYX_ERR(4, 413, __pyx_L1_error)) /*else*/ { __pyx_f_4lxml_5etree_fixElementDocument(__pyx_v_c_start_node, __pyx_v_doc, __pyx_v_proxy_count); } @@ -17108,7 +16632,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * * return 0 */ - __Pyx_TraceLine(415,0,__PYX_ERR(4, 415, __pyx_L1_error)) /*else*/ { __pyx_f_4lxml_5etree_fixElementDocument(__pyx_v_c_start_node, __pyx_v_doc, __pyx_v_proxy_count); } @@ -17130,7 +16653,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * * */ - __Pyx_TraceLine(417,0,__PYX_ERR(4, 417, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -17151,7 +16673,6 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_proxy); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -17167,13 +16688,11 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, struct LxmlDocument *__pyx_v_doc, size_t __pyx_v_proxy_count) { xmlNode *__pyx_v_c_node; struct LxmlElement *__pyx_v_proxy = 0; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("fixElementDocument", 0); - __Pyx_TraceCall("fixElementDocument", __pyx_f[4], 420, 0, __PYX_ERR(4, 420, __pyx_L1_error)); /* "src/lxml/proxy.pxi":422 * cdef void fixElementDocument(xmlNode* c_element, _Document doc, @@ -17182,7 +16701,6 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_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) */ - __Pyx_TraceLine(422,0,__PYX_ERR(4, 422, __pyx_L1_error)) __pyx_v_c_node = __pyx_v_c_element; /* "src/lxml/proxy.pxi":423 @@ -17192,7 +16710,6 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, * tree.BEGIN_FOR_EACH_FROM(c_element, c_node, 1) * if c_node._private is not NULL: */ - __Pyx_TraceLine(423,0,__PYX_ERR(4, 423, __pyx_L1_error)) __Pyx_INCREF(Py_None); __pyx_v_proxy = ((struct LxmlElement *)Py_None); @@ -17203,7 +16720,6 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, * if c_node._private is not NULL: * proxy = getProxy(c_node) */ - __Pyx_TraceLine(424,0,__PYX_ERR(4, 424, __pyx_L1_error)) BEGIN_FOR_EACH_FROM(__pyx_v_c_element, __pyx_v_c_node, 1); /* "src/lxml/proxy.pxi":425 @@ -17213,7 +16729,6 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, * proxy = getProxy(c_node) * if proxy is not None: */ - __Pyx_TraceLine(425,0,__PYX_ERR(4, 425, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node->_private != NULL) != 0); if (__pyx_t_1) { @@ -17224,7 +16739,6 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, * if proxy is not None: * if proxy._doc is not doc: */ - __Pyx_TraceLine(426,0,__PYX_ERR(4, 426, __pyx_L1_error)) __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree_getProxy(__pyx_v_c_node)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_proxy, ((struct LxmlElement *)__pyx_t_2)); @@ -17237,7 +16751,6 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, * if proxy._doc is not doc: * proxy._doc = doc */ - __Pyx_TraceLine(427,0,__PYX_ERR(4, 427, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_proxy) != Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { @@ -17249,7 +16762,6 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, * proxy._doc = doc * proxy_count -= 1 */ - __Pyx_TraceLine(428,0,__PYX_ERR(4, 428, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_proxy->_doc != __pyx_v_doc); __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { @@ -17261,7 +16773,6 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, * proxy_count -= 1 * if proxy_count == 0: */ - __Pyx_TraceLine(429,0,__PYX_ERR(4, 429, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_doc)); __Pyx_GIVEREF(((PyObject *)__pyx_v_doc)); __Pyx_GOTREF(__pyx_v_proxy->_doc); @@ -17284,7 +16795,6 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, * if proxy_count == 0: * return */ - __Pyx_TraceLine(430,0,__PYX_ERR(4, 430, __pyx_L1_error)) __pyx_v_proxy_count = (__pyx_v_proxy_count - 1); /* "src/lxml/proxy.pxi":431 @@ -17294,7 +16804,6 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, * return * tree.END_FOR_EACH_FROM(c_node) */ - __Pyx_TraceLine(431,0,__PYX_ERR(4, 431, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_proxy_count == 0) != 0); if (__pyx_t_1) { @@ -17305,7 +16814,6 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, * tree.END_FOR_EACH_FROM(c_node) * */ - __Pyx_TraceLine(432,0,__PYX_ERR(4, 432, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/proxy.pxi":431 @@ -17342,7 +16850,6 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, * * */ - __Pyx_TraceLine(433,0,__PYX_ERR(4, 433, __pyx_L1_error)) END_FOR_EACH_FROM(__pyx_v_c_node); /* "src/lxml/proxy.pxi":420 @@ -17360,7 +16867,6 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, __Pyx_WriteUnraisable("lxml.etree.fixElementDocument", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_proxy); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -17373,10 +16879,8 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, */ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, xmlDict *__pyx_v_c_src_dict, xmlDict *__pyx_v_c_dict) { - __Pyx_TraceDeclarations int __pyx_t_1; xmlNode *__pyx_t_2; - __Pyx_TraceCall("fixThreadDictNames", __pyx_f[4], 436, 1, __PYX_ERR(4, 436, __pyx_L1_error)); /* "src/lxml/proxy.pxi":443 * # this should only be called when the element is based on a @@ -17385,9 +16889,9 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, * c_element.type == tree.XML_HTML_DOCUMENT_NODE: * # may define "xml" namespace */ - __Pyx_TraceLine(443,1,__PYX_ERR(4, 443, __pyx_L1_error)) switch (__pyx_v_c_element->type) { case XML_DOCUMENT_NODE: + case XML_HTML_DOCUMENT_NODE: /* "src/lxml/proxy.pxi":444 * # different libxml2 tag name dictionary @@ -17396,8 +16900,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, * # may define "xml" namespace * fixThreadDictNsForNode(c_element, c_src_dict, c_dict) */ - __Pyx_TraceLine(444,1,__PYX_ERR(4, 444, __pyx_L1_error)) - case XML_HTML_DOCUMENT_NODE: + __pyx_t_1 = 1; /* "src/lxml/proxy.pxi":443 * # this should only be called when the element is based on a @@ -17406,8 +16909,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, * c_element.type == tree.XML_HTML_DOCUMENT_NODE: * # may define "xml" namespace */ - __Pyx_TraceLine(443,1,__PYX_ERR(4, 443, __pyx_L1_error)) - __pyx_t_1 = 1; break; default: __pyx_t_1 = 0; @@ -17422,7 +16923,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, * if c_element.doc.extSubset: * fixThreadDictNamesForDtd(c_element.doc.extSubset, c_src_dict, c_dict) */ - __Pyx_TraceLine(446,1,__PYX_ERR(4, 446, __pyx_L1_error)) __pyx_f_4lxml_5etree_fixThreadDictNsForNode(__pyx_v_c_element, __pyx_v_c_src_dict, __pyx_v_c_dict); /* "src/lxml/proxy.pxi":447 @@ -17432,7 +16932,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, * fixThreadDictNamesForDtd(c_element.doc.extSubset, c_src_dict, c_dict) * if c_element.doc.intSubset: */ - __Pyx_TraceLine(447,1,__PYX_ERR(4, 447, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_c_element->doc->extSubset != 0); if (__pyx_t_1) { @@ -17443,7 +16942,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, * if c_element.doc.intSubset: * fixThreadDictNamesForDtd(c_element.doc.intSubset, c_src_dict, c_dict) */ - __Pyx_TraceLine(448,1,__PYX_ERR(4, 448, __pyx_L1_error)) __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(__pyx_v_c_element->doc->extSubset, __pyx_v_c_src_dict, __pyx_v_c_dict); /* "src/lxml/proxy.pxi":447 @@ -17462,7 +16960,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, * fixThreadDictNamesForDtd(c_element.doc.intSubset, c_src_dict, c_dict) * c_element = c_element.children */ - __Pyx_TraceLine(449,1,__PYX_ERR(4, 449, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_c_element->doc->intSubset != 0); if (__pyx_t_1) { @@ -17473,7 +16970,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, * c_element = c_element.children * while c_element is not NULL: */ - __Pyx_TraceLine(450,1,__PYX_ERR(4, 450, __pyx_L1_error)) __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(__pyx_v_c_element->doc->intSubset, __pyx_v_c_src_dict, __pyx_v_c_dict); /* "src/lxml/proxy.pxi":449 @@ -17492,7 +16988,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, * while c_element is not NULL: * fixThreadDictNamesForNode(c_element, c_src_dict, c_dict) */ - __Pyx_TraceLine(451,1,__PYX_ERR(4, 451, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_element->children; __pyx_v_c_element = __pyx_t_2; @@ -17503,7 +16998,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, * fixThreadDictNamesForNode(c_element, c_src_dict, c_dict) * c_element = c_element.next */ - __Pyx_TraceLine(452,1,__PYX_ERR(4, 452, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_element != NULL) != 0); if (!__pyx_t_1) break; @@ -17515,7 +17009,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, * c_element = c_element.next * elif tree._isElementOrXInclude(c_element): */ - __Pyx_TraceLine(453,1,__PYX_ERR(4, 453, __pyx_L1_error)) __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(__pyx_v_c_element, __pyx_v_c_src_dict, __pyx_v_c_dict); /* "src/lxml/proxy.pxi":454 @@ -17525,7 +17018,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, * elif tree._isElementOrXInclude(c_element): * fixThreadDictNamesForNode(c_element, c_src_dict, c_dict) */ - __Pyx_TraceLine(454,1,__PYX_ERR(4, 454, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_element->next; __pyx_v_c_element = __pyx_t_2; } @@ -17547,7 +17039,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, * fixThreadDictNamesForNode(c_element, c_src_dict, c_dict) * */ - __Pyx_TraceLine(455,1,__PYX_ERR(4, 455, __pyx_L1_error)) __pyx_t_1 = (_isElementOrXInclude(__pyx_v_c_element) != 0); if (__pyx_t_1) { @@ -17558,7 +17049,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, * * */ - __Pyx_TraceLine(456,1,__PYX_ERR(4, 456, __pyx_L1_error)) __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(__pyx_v_c_element, __pyx_v_c_src_dict, __pyx_v_c_dict); /* "src/lxml/proxy.pxi":455 @@ -17580,11 +17070,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.fixThreadDictNames", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); } /* "src/lxml/proxy.pxi":459 @@ -17597,10 +17082,8 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, static CYTHON_INLINE void __pyx_f_4lxml_5etree__fixThreadDictPtr(const xmlChar **__pyx_v_c_ptr, xmlDict *__pyx_v_c_src_dict, xmlDict *__pyx_v_c_dict) { const xmlChar *__pyx_v_c_str; - __Pyx_TraceDeclarations int __pyx_t_1; int __pyx_t_2; - __Pyx_TraceCall("_fixThreadDictPtr", __pyx_f[4], 459, 1, __PYX_ERR(4, 459, __pyx_L1_error)); /* "src/lxml/proxy.pxi":462 * tree.xmlDict* c_src_dict, @@ -17609,7 +17092,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree__fixThreadDictPtr(const xmlChar * * 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 */ - __Pyx_TraceLine(462,1,__PYX_ERR(4, 462, __pyx_L1_error)) __pyx_v_c_str = (__pyx_v_c_ptr[0]); /* "src/lxml/proxy.pxi":463 @@ -17619,7 +17101,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree__fixThreadDictPtr(const xmlChar * * # return value can be NULL on memory error, but we don't handle that here * c_str = tree.xmlDictLookup(c_dict, c_str, -1) */ - __Pyx_TraceLine(463,1,__PYX_ERR(4, 463, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_c_str != 0); if (__pyx_t_2) { } else { @@ -17644,7 +17125,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree__fixThreadDictPtr(const xmlChar * * if c_str: * c_ptr[0] = c_str */ - __Pyx_TraceLine(465,1,__PYX_ERR(4, 465, __pyx_L1_error)) __pyx_v_c_str = xmlDictLookup(__pyx_v_c_dict, __pyx_v_c_str, -1); /* "src/lxml/proxy.pxi":466 @@ -17654,7 +17134,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree__fixThreadDictPtr(const xmlChar * * c_ptr[0] = c_str * */ - __Pyx_TraceLine(466,1,__PYX_ERR(4, 466, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_c_str != 0); if (__pyx_t_1) { @@ -17665,7 +17144,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree__fixThreadDictPtr(const xmlChar * * * */ - __Pyx_TraceLine(467,1,__PYX_ERR(4, 467, __pyx_L1_error)) (__pyx_v_c_ptr[0]) = __pyx_v_c_str; /* "src/lxml/proxy.pxi":466 @@ -17695,11 +17173,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree__fixThreadDictPtr(const xmlChar * */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._fixThreadDictPtr", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); } /* "src/lxml/proxy.pxi":470 @@ -17712,8 +17185,6 @@ 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; - __Pyx_TraceDeclarations - __Pyx_TraceCall("fixThreadDictNamesForNode", __pyx_f[4], 470, 1, __PYX_ERR(4, 470, __pyx_L1_error)); /* "src/lxml/proxy.pxi":473 * tree.xmlDict* c_src_dict, @@ -17722,7 +17193,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el * tree.BEGIN_FOR_EACH_FROM(c_element, c_node, 1) * if c_node.type in (tree.XML_ELEMENT_NODE, tree.XML_XINCLUDE_START): */ - __Pyx_TraceLine(473,1,__PYX_ERR(4, 473, __pyx_L1_error)) __pyx_v_c_node = __pyx_v_c_element; /* "src/lxml/proxy.pxi":474 @@ -17732,7 +17202,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el * if c_node.type in (tree.XML_ELEMENT_NODE, tree.XML_XINCLUDE_START): * fixThreadDictNamesForAttributes( */ - __Pyx_TraceLine(474,1,__PYX_ERR(4, 474, __pyx_L1_error)) BEGIN_FOR_EACH_FROM(__pyx_v_c_element, __pyx_v_c_node, 1); /* "src/lxml/proxy.pxi":475 @@ -17742,7 +17211,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el * fixThreadDictNamesForAttributes( * c_node.properties, c_src_dict, c_dict) */ - __Pyx_TraceLine(475,1,__PYX_ERR(4, 475, __pyx_L1_error)) switch (__pyx_v_c_node->type) { case XML_ELEMENT_NODE: case XML_XINCLUDE_START: @@ -17754,7 +17222,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el * c_node.properties, c_src_dict, c_dict) * fixThreadDictNsForNode(c_node, c_src_dict, c_dict) */ - __Pyx_TraceLine(476,1,__PYX_ERR(4, 476, __pyx_L1_error)) __pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(__pyx_v_c_node->properties, __pyx_v_c_src_dict, __pyx_v_c_dict); /* "src/lxml/proxy.pxi":478 @@ -17764,7 +17231,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el * _fixThreadDictPtr(&c_node.name, c_src_dict, c_dict) * elif c_node.type == tree.XML_TEXT_NODE: */ - __Pyx_TraceLine(478,1,__PYX_ERR(4, 478, __pyx_L1_error)) __pyx_f_4lxml_5etree_fixThreadDictNsForNode(__pyx_v_c_node, __pyx_v_c_src_dict, __pyx_v_c_dict); /* "src/lxml/proxy.pxi":479 @@ -17774,7 +17240,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el * elif c_node.type == tree.XML_TEXT_NODE: * # libxml2's SAX2 parser interns some indentation space */ - __Pyx_TraceLine(479,1,__PYX_ERR(4, 479, __pyx_L1_error)) __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_node->name), __pyx_v_c_src_dict, __pyx_v_c_dict); /* "src/lxml/proxy.pxi":475 @@ -17785,15 +17250,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el * c_node.properties, c_src_dict, c_dict) */ break; - - /* "src/lxml/proxy.pxi":480 - * 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: # <<<<<<<<<<<<<< - * # libxml2's SAX2 parser interns some indentation space - * fixThreadDictContentForNode(c_node, c_src_dict, c_dict) - */ - __Pyx_TraceLine(480,1,__PYX_ERR(4, 480, __pyx_L1_error)) case XML_TEXT_NODE: /* "src/lxml/proxy.pxi":482 @@ -17803,7 +17259,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el * elif c_node.type == tree.XML_COMMENT_NODE: * pass # don't touch c_node.name */ - __Pyx_TraceLine(482,1,__PYX_ERR(4, 482, __pyx_L1_error)) __pyx_f_4lxml_5etree_fixThreadDictContentForNode(__pyx_v_c_node, __pyx_v_c_src_dict, __pyx_v_c_dict); /* "src/lxml/proxy.pxi":480 @@ -17814,6 +17269,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el * fixThreadDictContentForNode(c_node, c_src_dict, c_dict) */ break; + case XML_COMMENT_NODE: /* "src/lxml/proxy.pxi":483 * # libxml2's SAX2 parser interns some indentation space @@ -17822,8 +17278,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el * pass # don't touch c_node.name * else: */ - __Pyx_TraceLine(483,1,__PYX_ERR(4, 483, __pyx_L1_error)) - case XML_COMMENT_NODE: break; default: @@ -17834,7 +17288,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el * tree.END_FOR_EACH_FROM(c_node) * */ - __Pyx_TraceLine(486,1,__PYX_ERR(4, 486, __pyx_L1_error)) __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_node->name), __pyx_v_c_src_dict, __pyx_v_c_dict); break; } @@ -17846,7 +17299,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el * * */ - __Pyx_TraceLine(487,1,__PYX_ERR(4, 487, __pyx_L1_error)) END_FOR_EACH_FROM(__pyx_v_c_node); /* "src/lxml/proxy.pxi":470 @@ -17858,11 +17310,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.fixThreadDictNamesForNode", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); } /* "src/lxml/proxy.pxi":490 @@ -17876,11 +17323,9 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(xmlAttr *__pyx_v_c_attr, xmlDict *__pyx_v_c_src_dict, xmlDict *__pyx_v_c_dict) { xmlNode *__pyx_v_c_child; xmlNode *__pyx_v_c_node; - __Pyx_TraceDeclarations int __pyx_t_1; int __pyx_t_2; xmlNode *__pyx_t_3; - __Pyx_TraceCall("fixThreadDictNamesForAttributes", __pyx_f[4], 490, 1, __PYX_ERR(4, 490, __pyx_L1_error)); /* "src/lxml/proxy.pxi":494 * tree.xmlDict* c_dict) nogil: @@ -17889,7 +17334,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(x * while c_node is not NULL: * if c_node.type not in (tree.XML_TEXT_NODE, tree.XML_COMMENT_NODE): */ - __Pyx_TraceLine(494,1,__PYX_ERR(4, 494, __pyx_L1_error)) __pyx_v_c_node = ((xmlNode *)__pyx_v_c_attr); /* "src/lxml/proxy.pxi":495 @@ -17899,7 +17343,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(x * if c_node.type not in (tree.XML_TEXT_NODE, tree.XML_COMMENT_NODE): * _fixThreadDictPtr(&c_node.name, c_src_dict, c_dict) */ - __Pyx_TraceLine(495,1,__PYX_ERR(4, 495, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_node != NULL) != 0); if (!__pyx_t_1) break; @@ -17911,7 +17354,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(x * _fixThreadDictPtr(&c_node.name, c_src_dict, c_dict) * # libxml2 keeps some (!) attribute values in the dict */ - __Pyx_TraceLine(496,1,__PYX_ERR(4, 496, __pyx_L1_error)) switch (__pyx_v_c_node->type) { case XML_TEXT_NODE: case XML_COMMENT_NODE: @@ -17931,7 +17373,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(x * # libxml2 keeps some (!) attribute values in the dict * c_child = c_node.children */ - __Pyx_TraceLine(497,1,__PYX_ERR(4, 497, __pyx_L1_error)) __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_node->name), __pyx_v_c_src_dict, __pyx_v_c_dict); /* "src/lxml/proxy.pxi":496 @@ -17950,7 +17391,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(x * while c_child is not NULL: * fixThreadDictContentForNode(c_child, c_src_dict, c_dict) */ - __Pyx_TraceLine(499,1,__PYX_ERR(4, 499, __pyx_L1_error)) __pyx_t_3 = __pyx_v_c_node->children; __pyx_v_c_child = __pyx_t_3; @@ -17961,7 +17401,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(x * fixThreadDictContentForNode(c_child, c_src_dict, c_dict) * c_child = c_child.next */ - __Pyx_TraceLine(500,1,__PYX_ERR(4, 500, __pyx_L1_error)) while (1) { __pyx_t_2 = ((__pyx_v_c_child != NULL) != 0); if (!__pyx_t_2) break; @@ -17973,7 +17412,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(x * c_child = c_child.next * c_node = c_node.next */ - __Pyx_TraceLine(501,1,__PYX_ERR(4, 501, __pyx_L1_error)) __pyx_f_4lxml_5etree_fixThreadDictContentForNode(__pyx_v_c_child, __pyx_v_c_src_dict, __pyx_v_c_dict); /* "src/lxml/proxy.pxi":502 @@ -17983,7 +17421,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(x * c_node = c_node.next * */ - __Pyx_TraceLine(502,1,__PYX_ERR(4, 502, __pyx_L1_error)) __pyx_t_3 = __pyx_v_c_child->next; __pyx_v_c_child = __pyx_t_3; } @@ -17995,7 +17432,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(x * * */ - __Pyx_TraceLine(503,1,__PYX_ERR(4, 503, __pyx_L1_error)) __pyx_t_3 = __pyx_v_c_node->next; __pyx_v_c_node = __pyx_t_3; } @@ -18009,11 +17445,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(x */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.fixThreadDictNamesForAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); } /* "src/lxml/proxy.pxi":506 @@ -18025,10 +17456,8 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(x */ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictContentForNode(xmlNode *__pyx_v_c_node, xmlDict *__pyx_v_c_src_dict, xmlDict *__pyx_v_c_dict) { - __Pyx_TraceDeclarations int __pyx_t_1; int __pyx_t_2; - __Pyx_TraceCall("fixThreadDictContentForNode", __pyx_f[4], 506, 1, __PYX_ERR(4, 506, __pyx_L1_error)); /* "src/lxml/proxy.pxi":509 * tree.xmlDict* c_src_dict, @@ -18037,7 +17466,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictContentForNode(xmlNo * c_node.content is not &c_node.properties: * if tree.xmlDictOwns(c_src_dict, c_node.content): */ - __Pyx_TraceLine(509,1,__PYX_ERR(4, 509, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node->content != NULL) != 0); if (__pyx_t_2) { } else { @@ -18052,7 +17480,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictContentForNode(xmlNo * if tree.xmlDictOwns(c_src_dict, c_node.content): * # result can be NULL on memory error, but we don't handle that here */ - __Pyx_TraceLine(510,1,__PYX_ERR(4, 510, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node->content != ((xmlChar *)(&__pyx_v_c_node->properties))) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; @@ -18064,7 +17491,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictContentForNode(xmlNo * c_node.content is not &c_node.properties: * if tree.xmlDictOwns(c_src_dict, c_node.content): */ - __Pyx_TraceLine(509,1,__PYX_ERR(4, 509, __pyx_L1_error)) if (__pyx_t_1) { /* "src/lxml/proxy.pxi":511 @@ -18074,7 +17500,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictContentForNode(xmlNo * # 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) */ - __Pyx_TraceLine(511,1,__PYX_ERR(4, 511, __pyx_L1_error)) __pyx_t_1 = (xmlDictOwns(__pyx_v_c_src_dict, __pyx_v_c_node->content) != 0); if (__pyx_t_1) { @@ -18085,7 +17510,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictContentForNode(xmlNo * * */ - __Pyx_TraceLine(513,1,__PYX_ERR(4, 513, __pyx_L1_error)) __pyx_v_c_node->content = ((xmlChar *)xmlDictLookup(__pyx_v_c_dict, __pyx_v_c_node->content, -1)); /* "src/lxml/proxy.pxi":511 @@ -18115,11 +17539,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictContentForNode(xmlNo */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.fixThreadDictContentForNode", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); } /* "src/lxml/proxy.pxi":516 @@ -18132,10 +17551,8 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictContentForNode(xmlNo static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNsForNode(xmlNode *__pyx_v_c_node, xmlDict *__pyx_v_c_src_dict, xmlDict *__pyx_v_c_dict) { xmlNs *__pyx_v_c_ns; - __Pyx_TraceDeclarations xmlNs *__pyx_t_1; int __pyx_t_2; - __Pyx_TraceCall("fixThreadDictNsForNode", __pyx_f[4], 516, 1, __PYX_ERR(4, 516, __pyx_L1_error)); /* "src/lxml/proxy.pxi":519 * tree.xmlDict* c_src_dict, @@ -18144,7 +17561,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNsForNode(xmlNode *_ * while c_ns is not NULL: * _fixThreadDictPtr(&c_ns.href, c_src_dict, c_dict) */ - __Pyx_TraceLine(519,1,__PYX_ERR(4, 519, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_node->nsDef; __pyx_v_c_ns = __pyx_t_1; @@ -18155,7 +17571,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNsForNode(xmlNode *_ * _fixThreadDictPtr(&c_ns.href, c_src_dict, c_dict) * _fixThreadDictPtr(&c_ns.prefix, c_src_dict, c_dict) */ - __Pyx_TraceLine(520,1,__PYX_ERR(4, 520, __pyx_L1_error)) while (1) { __pyx_t_2 = ((__pyx_v_c_ns != NULL) != 0); if (!__pyx_t_2) break; @@ -18167,7 +17582,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNsForNode(xmlNode *_ * _fixThreadDictPtr(&c_ns.prefix, c_src_dict, c_dict) * c_ns = c_ns.next */ - __Pyx_TraceLine(521,1,__PYX_ERR(4, 521, __pyx_L1_error)) __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_ns->href), __pyx_v_c_src_dict, __pyx_v_c_dict); /* "src/lxml/proxy.pxi":522 @@ -18177,7 +17591,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNsForNode(xmlNode *_ * c_ns = c_ns.next * */ - __Pyx_TraceLine(522,1,__PYX_ERR(4, 522, __pyx_L1_error)) __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_ns->prefix), __pyx_v_c_src_dict, __pyx_v_c_dict); /* "src/lxml/proxy.pxi":523 @@ -18187,7 +17600,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNsForNode(xmlNode *_ * * */ - __Pyx_TraceLine(523,1,__PYX_ERR(4, 523, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_ns->next; __pyx_v_c_ns = __pyx_t_1; } @@ -18201,11 +17613,6 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNsForNode(xmlNode *_ */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.fixThreadDictNsForNode", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); } /* "src/lxml/proxy.pxi":526 @@ -18221,11 +17628,9 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, xmlElement *__pyx_v_c_element; xmlAttribute *__pyx_v_c_attribute; xmlEntity *__pyx_v_c_entity; - __Pyx_TraceDeclarations xmlNode *__pyx_t_1; int __pyx_t_2; xmlAttribute *__pyx_t_3; - __Pyx_TraceCall("fixThreadDictNamesForDtd", __pyx_f[4], 526, 1, __PYX_ERR(4, 526, __pyx_L1_error)); /* "src/lxml/proxy.pxi":534 * cdef tree.xmlEntity* c_entity @@ -18234,7 +17639,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, * while c_node: * if c_node.type == tree.XML_ELEMENT_DECL: */ - __Pyx_TraceLine(534,1,__PYX_ERR(4, 534, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_dtd->children; __pyx_v_c_node = __pyx_t_1; @@ -18245,7 +17649,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, * if c_node.type == tree.XML_ELEMENT_DECL: * c_element = c_node */ - __Pyx_TraceLine(535,1,__PYX_ERR(4, 535, __pyx_L1_error)) while (1) { __pyx_t_2 = (__pyx_v_c_node != 0); if (!__pyx_t_2) break; @@ -18257,7 +17660,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, * c_element = c_node * if c_element.content: */ - __Pyx_TraceLine(536,1,__PYX_ERR(4, 536, __pyx_L1_error)) switch (__pyx_v_c_node->type) { case XML_ELEMENT_DECL: @@ -18268,7 +17670,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, * if c_element.content: * _fixThreadDictPtr(&c_element.content.name, c_src_dict, c_dict) */ - __Pyx_TraceLine(537,1,__PYX_ERR(4, 537, __pyx_L1_error)) __pyx_v_c_element = ((xmlElement *)__pyx_v_c_node); /* "src/lxml/proxy.pxi":538 @@ -18278,7 +17679,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, * _fixThreadDictPtr(&c_element.content.name, c_src_dict, c_dict) * _fixThreadDictPtr(&c_element.content.prefix, c_src_dict, c_dict) */ - __Pyx_TraceLine(538,1,__PYX_ERR(4, 538, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_c_element->content != 0); if (__pyx_t_2) { @@ -18289,7 +17689,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, * _fixThreadDictPtr(&c_element.content.prefix, c_src_dict, c_dict) * c_attribute = c_element.attributes */ - __Pyx_TraceLine(539,1,__PYX_ERR(4, 539, __pyx_L1_error)) __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_element->content->name), __pyx_v_c_src_dict, __pyx_v_c_dict); /* "src/lxml/proxy.pxi":540 @@ -18299,7 +17698,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, * c_attribute = c_element.attributes * while c_attribute: */ - __Pyx_TraceLine(540,1,__PYX_ERR(4, 540, __pyx_L1_error)) __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_element->content->prefix), __pyx_v_c_src_dict, __pyx_v_c_dict); /* "src/lxml/proxy.pxi":538 @@ -18318,7 +17716,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, * while c_attribute: * _fixThreadDictPtr(&c_attribute.defaultValue, c_src_dict, c_dict) */ - __Pyx_TraceLine(541,1,__PYX_ERR(4, 541, __pyx_L1_error)) __pyx_t_3 = __pyx_v_c_element->attributes; __pyx_v_c_attribute = __pyx_t_3; @@ -18329,7 +17726,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, * _fixThreadDictPtr(&c_attribute.defaultValue, c_src_dict, c_dict) * _fixThreadDictPtr(&c_attribute.name, c_src_dict, c_dict) */ - __Pyx_TraceLine(542,1,__PYX_ERR(4, 542, __pyx_L1_error)) while (1) { __pyx_t_2 = (__pyx_v_c_attribute != 0); if (!__pyx_t_2) break; @@ -18341,7 +17737,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, * _fixThreadDictPtr(&c_attribute.name, c_src_dict, c_dict) * _fixThreadDictPtr(&c_attribute.prefix, c_src_dict, c_dict) */ - __Pyx_TraceLine(543,1,__PYX_ERR(4, 543, __pyx_L1_error)) __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_attribute->defaultValue), __pyx_v_c_src_dict, __pyx_v_c_dict); /* "src/lxml/proxy.pxi":544 @@ -18351,7 +17746,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, * _fixThreadDictPtr(&c_attribute.prefix, c_src_dict, c_dict) * _fixThreadDictPtr(&c_attribute.elem, c_src_dict, c_dict) */ - __Pyx_TraceLine(544,1,__PYX_ERR(4, 544, __pyx_L1_error)) __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_attribute->name), __pyx_v_c_src_dict, __pyx_v_c_dict); /* "src/lxml/proxy.pxi":545 @@ -18361,7 +17755,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, * _fixThreadDictPtr(&c_attribute.elem, c_src_dict, c_dict) * c_attribute = c_attribute.nexth */ - __Pyx_TraceLine(545,1,__PYX_ERR(4, 545, __pyx_L1_error)) __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_attribute->prefix), __pyx_v_c_src_dict, __pyx_v_c_dict); /* "src/lxml/proxy.pxi":546 @@ -18371,7 +17764,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, * c_attribute = c_attribute.nexth * elif c_node.type == tree.XML_ENTITY_DECL: */ - __Pyx_TraceLine(546,1,__PYX_ERR(4, 546, __pyx_L1_error)) __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_attribute->elem), __pyx_v_c_src_dict, __pyx_v_c_dict); /* "src/lxml/proxy.pxi":547 @@ -18381,7 +17773,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, * elif c_node.type == tree.XML_ENTITY_DECL: * c_entity = c_node */ - __Pyx_TraceLine(547,1,__PYX_ERR(4, 547, __pyx_L1_error)) __pyx_t_3 = __pyx_v_c_attribute->nexth; __pyx_v_c_attribute = __pyx_t_3; } @@ -18394,15 +17785,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, * if c_element.content: */ break; - - /* "src/lxml/proxy.pxi":548 - * _fixThreadDictPtr(&c_attribute.elem, c_src_dict, c_dict) - * c_attribute = c_attribute.nexth - * elif c_node.type == tree.XML_ENTITY_DECL: # <<<<<<<<<<<<<< - * c_entity = c_node - * _fixThreadDictPtr(&c_entity.name, c_src_dict, c_dict) - */ - __Pyx_TraceLine(548,1,__PYX_ERR(4, 548, __pyx_L1_error)) case XML_ENTITY_DECL: /* "src/lxml/proxy.pxi":549 @@ -18412,7 +17794,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, * _fixThreadDictPtr(&c_entity.name, c_src_dict, c_dict) * _fixThreadDictPtr(&c_entity.ExternalID, c_src_dict, c_dict) */ - __Pyx_TraceLine(549,1,__PYX_ERR(4, 549, __pyx_L1_error)) __pyx_v_c_entity = ((xmlEntity *)__pyx_v_c_node); /* "src/lxml/proxy.pxi":550 @@ -18422,7 +17803,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, * _fixThreadDictPtr(&c_entity.ExternalID, c_src_dict, c_dict) * _fixThreadDictPtr(&c_entity.SystemID, c_src_dict, c_dict) */ - __Pyx_TraceLine(550,1,__PYX_ERR(4, 550, __pyx_L1_error)) __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_entity->name), __pyx_v_c_src_dict, __pyx_v_c_dict); /* "src/lxml/proxy.pxi":551 @@ -18432,7 +17812,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, * _fixThreadDictPtr(&c_entity.SystemID, c_src_dict, c_dict) * _fixThreadDictPtr(&c_entity.content, c_src_dict, c_dict) */ - __Pyx_TraceLine(551,1,__PYX_ERR(4, 551, __pyx_L1_error)) __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_entity->ExternalID), __pyx_v_c_src_dict, __pyx_v_c_dict); /* "src/lxml/proxy.pxi":552 @@ -18442,7 +17821,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, * _fixThreadDictPtr(&c_entity.content, c_src_dict, c_dict) * c_node = c_node.next */ - __Pyx_TraceLine(552,1,__PYX_ERR(4, 552, __pyx_L1_error)) __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_entity->SystemID), __pyx_v_c_src_dict, __pyx_v_c_dict); /* "src/lxml/proxy.pxi":553 @@ -18452,7 +17830,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, * c_node = c_node.next * */ - __Pyx_TraceLine(553,1,__PYX_ERR(4, 553, __pyx_L1_error)) __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":548 @@ -18473,7 +17850,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, * * */ - __Pyx_TraceLine(554,1,__PYX_ERR(4, 554, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_node->next; __pyx_v_c_node = __pyx_t_1; } @@ -18487,11 +17863,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.fixThreadDictNamesForDtd", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); } /* "src/lxml/proxy.pxi":560 @@ -18508,7 +17879,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ xmlElementType __pyx_v_doc_type; xmlNode *__pyx_v_c_node; struct LxmlDocument *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -18516,7 +17886,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ xmlElementType __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_adoptForeignDoc", 0); - __Pyx_TraceCall("_adoptForeignDoc", __pyx_f[4], 560, 0, __PYX_ERR(4, 560, __pyx_L1_error)); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_parser = __pyx_optional_args->parser; @@ -18533,7 +17902,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ * raise ValueError("Illegal document provided: NULL") * if c_doc.type not in (tree.XML_DOCUMENT_NODE, tree.XML_HTML_DOCUMENT_NODE): */ - __Pyx_TraceLine(565,0,__PYX_ERR(4, 565, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_doc == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -18544,8 +17912,7 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ * if c_doc.type not in (tree.XML_DOCUMENT_NODE, tree.XML_HTML_DOCUMENT_NODE): * doc_type = c_doc.type */ - __Pyx_TraceLine(566,0,__PYX_ERR(4, 566, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 566, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 566, __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; @@ -18567,7 +17934,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ * doc_type = c_doc.type * if is_owned: */ - __Pyx_TraceLine(567,0,__PYX_ERR(4, 567, __pyx_L1_error)) switch (__pyx_v_c_doc->type) { case XML_DOCUMENT_NODE: case XML_HTML_DOCUMENT_NODE: @@ -18587,7 +17953,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ * if is_owned: * tree.xmlFreeDoc(c_doc) */ - __Pyx_TraceLine(568,0,__PYX_ERR(4, 568, __pyx_L1_error)) __pyx_t_4 = __pyx_v_c_doc->type; __pyx_v_doc_type = __pyx_t_4; @@ -18598,7 +17963,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ * tree.xmlFreeDoc(c_doc) * raise ValueError(f"Illegal document provided: expected XML or HTML, found {doc_type}") */ - __Pyx_TraceLine(569,0,__PYX_ERR(4, 569, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_is_owned != 0); if (__pyx_t_3) { @@ -18609,7 +17973,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ * raise ValueError(f"Illegal document provided: expected XML or HTML, found {doc_type}") * */ - __Pyx_TraceLine(570,0,__PYX_ERR(4, 570, __pyx_L1_error)) xmlFreeDoc(__pyx_v_c_doc); /* "src/lxml/proxy.pxi":569 @@ -18628,7 +17991,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ * * cdef xmlNode* c_node = c_doc */ - __Pyx_TraceLine(571,0,__PYX_ERR(4, 571, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyUnicode_From_xmlElementType(__pyx_v_doc_type, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 571, __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, 571, __pyx_L1_error) @@ -18657,7 +18019,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ * * if is_owned: */ - __Pyx_TraceLine(573,0,__PYX_ERR(4, 573, __pyx_L1_error)) __pyx_v_c_node = ((xmlNode *)__pyx_v_c_doc); /* "src/lxml/proxy.pxi":575 @@ -18667,7 +18028,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ * tree.BEGIN_FOR_EACH_FROM(c_doc, c_node, 1) * c_node._private = NULL */ - __Pyx_TraceLine(575,0,__PYX_ERR(4, 575, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_is_owned != 0); if (__pyx_t_3) { @@ -18678,7 +18038,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ * c_node._private = NULL * tree.END_FOR_EACH_FROM(c_node) */ - __Pyx_TraceLine(576,0,__PYX_ERR(4, 576, __pyx_L1_error)) BEGIN_FOR_EACH_FROM(((xmlNode *)__pyx_v_c_doc), __pyx_v_c_node, 1); /* "src/lxml/proxy.pxi":577 @@ -18688,7 +18047,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ * tree.END_FOR_EACH_FROM(c_node) * else: */ - __Pyx_TraceLine(577,0,__PYX_ERR(4, 577, __pyx_L1_error)) __pyx_v_c_node->_private = NULL; /* "src/lxml/proxy.pxi":578 @@ -18698,7 +18056,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ * else: * # create a fresh copy that lxml owns */ - __Pyx_TraceLine(578,0,__PYX_ERR(4, 578, __pyx_L1_error)) END_FOR_EACH_FROM(__pyx_v_c_node); /* "src/lxml/proxy.pxi":575 @@ -18718,7 +18075,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ * if c_doc is NULL: * raise MemoryError() */ - __Pyx_TraceLine(581,0,__PYX_ERR(4, 581, __pyx_L1_error)) /*else*/ { __pyx_v_c_doc = xmlCopyDoc(__pyx_v_c_doc, 1); @@ -18729,7 +18085,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ * raise MemoryError() * */ - __Pyx_TraceLine(582,0,__PYX_ERR(4, 582, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_doc == NULL) != 0); if (unlikely(__pyx_t_3)) { @@ -18740,7 +18095,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ * * return _documentFactory(c_doc, parser) */ - __Pyx_TraceLine(583,0,__PYX_ERR(4, 583, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(4, 583, __pyx_L1_error) /* "src/lxml/proxy.pxi":582 @@ -18759,7 +18113,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ * * return _documentFactory(c_doc, parser) # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(585,0,__PYX_ERR(4, 585, __pyx_L1_error)) __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, 585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -18783,7 +18136,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -18798,7 +18150,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ static void __pyx_f_4lxml_5etree_displayNode(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_indent) { xmlNode *__pyx_v_c_child; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -18812,7 +18163,6 @@ static void __pyx_f_4lxml_5etree_displayNode(xmlNode *__pyx_v_c_node, PyObject * PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; __Pyx_RefNannySetupContext("displayNode", 0); - __Pyx_TraceCall("displayNode", __pyx_f[5], 6, 0, __PYX_ERR(5, 6, __pyx_L1_error)); /* "src/lxml/apihelpers.pxi":9 * # to help with debugging @@ -18821,7 +18171,6 @@ static void __pyx_f_4lxml_5etree_displayNode(xmlNode *__pyx_v_c_node, PyObject * * print indent * u' ', c_node * c_child = c_node.children */ - __Pyx_TraceLine(9,0,__PYX_ERR(5, 9, __pyx_L4_error)) /*try:*/ { /* "src/lxml/apihelpers.pxi":10 @@ -18831,8 +18180,7 @@ static void __pyx_f_4lxml_5etree_displayNode(xmlNode *__pyx_v_c_node, PyObject * * c_child = c_node.children * while c_child is not NULL: */ - __Pyx_TraceLine(10,0,__PYX_ERR(5, 10, __pyx_L4_error)) - __pyx_t_1 = PyNumber_Multiply(__pyx_v_indent, __pyx_kp_u__22); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10, __pyx_L4_error) + __pyx_t_1 = PyNumber_Multiply(__pyx_v_indent, __pyx_kp_u__10); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_long(((long)__pyx_v_c_node)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 10, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); @@ -18854,7 +18202,6 @@ static void __pyx_f_4lxml_5etree_displayNode(xmlNode *__pyx_v_c_node, PyObject * * while c_child is not NULL: * displayNode(c_child, indent + 1) */ - __Pyx_TraceLine(11,0,__PYX_ERR(5, 11, __pyx_L4_error)) __pyx_t_4 = __pyx_v_c_node->children; __pyx_v_c_child = __pyx_t_4; @@ -18865,7 +18212,6 @@ static void __pyx_f_4lxml_5etree_displayNode(xmlNode *__pyx_v_c_node, PyObject * * displayNode(c_child, indent + 1) * c_child = c_child.next */ - __Pyx_TraceLine(12,0,__PYX_ERR(5, 12, __pyx_L4_error)) while (1) { __pyx_t_5 = ((__pyx_v_c_child != NULL) != 0); if (!__pyx_t_5) break; @@ -18877,7 +18223,6 @@ static void __pyx_f_4lxml_5etree_displayNode(xmlNode *__pyx_v_c_node, PyObject * * c_child = c_child.next * finally: */ - __Pyx_TraceLine(13,0,__PYX_ERR(5, 13, __pyx_L4_error)) __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_indent, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 13, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_3); __pyx_f_4lxml_5etree_displayNode(__pyx_v_c_child, __pyx_t_3); @@ -18890,7 +18235,6 @@ static void __pyx_f_4lxml_5etree_displayNode(xmlNode *__pyx_v_c_node, PyObject * * finally: * return # swallow any exceptions */ - __Pyx_TraceLine(14,0,__PYX_ERR(5, 14, __pyx_L4_error)) __pyx_t_4 = __pyx_v_c_child->next; __pyx_v_c_child = __pyx_t_4; } @@ -18903,7 +18247,6 @@ static void __pyx_f_4lxml_5etree_displayNode(xmlNode *__pyx_v_c_node, PyObject * * * cdef inline int _assertValidNode(_Element element) except -1: */ - __Pyx_TraceLine(16,0,__PYX_ERR(5, 16, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ goto __pyx_L0; @@ -18951,13 +18294,7 @@ static void __pyx_f_4lxml_5etree_displayNode(xmlNode *__pyx_v_c_node, PyObject * */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_WriteUnraisable("lxml.etree.displayNode", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -18971,12 +18308,10 @@ static void __pyx_f_4lxml_5etree_displayNode(xmlNode *__pyx_v_c_node, PyObject * static CYTHON_INLINE int __pyx_f_4lxml_5etree__assertValidNode(struct LxmlElement *__pyx_v_element) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_assertValidNode", 0); - __Pyx_TraceCall("_assertValidNode", __pyx_f[5], 18, 0, __PYX_ERR(5, 18, __pyx_L1_error)); /* "src/lxml/apihelpers.pxi":19 * @@ -18985,13 +18320,12 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__assertValidNode(struct LxmlElemen * * cdef inline int _assertValidDoc(_Document doc) except -1: */ - __Pyx_TraceLine(19,0,__PYX_ERR(5, 19, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_element->_c_node != NULL) != 0))) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_element)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_invalid_Element_proxy_at_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 19, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_invalid_Element_proxy_at_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyErr_SetObject(PyExc_AssertionError, __pyx_t_2); @@ -19018,7 +18352,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__assertValidNode(struct LxmlElemen __Pyx_AddTraceback("lxml.etree._assertValidNode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -19033,12 +18366,10 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__assertValidNode(struct LxmlElemen static CYTHON_INLINE int __pyx_f_4lxml_5etree__assertValidDoc(struct LxmlDocument *__pyx_v_doc) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_assertValidDoc", 0); - __Pyx_TraceCall("_assertValidDoc", __pyx_f[5], 21, 0, __PYX_ERR(5, 21, __pyx_L1_error)); /* "src/lxml/apihelpers.pxi":22 * @@ -19047,13 +18378,12 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__assertValidDoc(struct LxmlDocumen * * cdef _Document _documentOrRaise(object input): */ - __Pyx_TraceLine(22,0,__PYX_ERR(5, 22, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_doc->_c_doc != NULL) != 0))) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_doc)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_invalid_Document_proxy_at_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 22, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_invalid_Document_proxy_at_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyErr_SetObject(PyExc_AssertionError, __pyx_t_2); @@ -19080,7 +18410,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__assertValidDoc(struct LxmlDocumen __Pyx_AddTraceback("lxml.etree._assertValidDoc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -19096,7 +18425,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__assertValidDoc(struct LxmlDocumen static struct LxmlDocument *__pyx_f_4lxml_5etree__documentOrRaise(PyObject *__pyx_v_input) { struct LxmlDocument *__pyx_v_doc = 0; struct LxmlDocument *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -19105,7 +18433,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__documentOrRaise(PyObject *__py PyObject *__pyx_t_5 = NULL; int __pyx_t_6; __Pyx_RefNannySetupContext("_documentOrRaise", 0); - __Pyx_TraceCall("_documentOrRaise", __pyx_f[5], 24, 0, __PYX_ERR(5, 24, __pyx_L1_error)); /* "src/lxml/apihelpers.pxi":31 * """ @@ -19114,7 +18441,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__documentOrRaise(PyObject *__py * if (<_ElementTree>input)._context_node is not None: * doc = (<_ElementTree>input)._context_node._doc */ - __Pyx_TraceLine(31,0,__PYX_ERR(5, 31, __pyx_L1_error)) __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_input, __pyx_ptype_4lxml_5etree__ElementTree); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -19126,7 +18452,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__documentOrRaise(PyObject *__py * doc = (<_ElementTree>input)._context_node._doc * else: */ - __Pyx_TraceLine(32,0,__PYX_ERR(5, 32, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)((struct LxmlElementTree *)__pyx_v_input)->_context_node) != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -19138,7 +18463,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__documentOrRaise(PyObject *__py * else: * doc = None */ - __Pyx_TraceLine(33,0,__PYX_ERR(5, 33, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)((struct LxmlElementTree *)__pyx_v_input)->_context_node->_doc); __Pyx_INCREF(__pyx_t_3); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_3); @@ -19161,7 +18485,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__documentOrRaise(PyObject *__py * elif isinstance(input, _Element): * doc = (<_Element>input)._doc */ - __Pyx_TraceLine(35,0,__PYX_ERR(5, 35, __pyx_L1_error)) /*else*/ { __Pyx_INCREF(Py_None); __pyx_v_doc = ((struct LxmlDocument *)Py_None); @@ -19185,7 +18508,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__documentOrRaise(PyObject *__py * doc = (<_Element>input)._doc * elif isinstance(input, _Document): */ - __Pyx_TraceLine(36,0,__PYX_ERR(5, 36, __pyx_L1_error)) __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_input, __pyx_ptype_4lxml_5etree__Element); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -19197,7 +18519,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__documentOrRaise(PyObject *__py * elif isinstance(input, _Document): * doc = <_Document>input */ - __Pyx_TraceLine(37,0,__PYX_ERR(5, 37, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)((struct LxmlElement *)__pyx_v_input)->_doc); __Pyx_INCREF(__pyx_t_3); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_3); @@ -19220,7 +18541,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__documentOrRaise(PyObject *__py * doc = <_Document>input * else: */ - __Pyx_TraceLine(38,0,__PYX_ERR(5, 38, __pyx_L1_error)) __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_input, __pyx_ptype_4lxml_5etree__Document); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { @@ -19232,7 +18552,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__documentOrRaise(PyObject *__py * else: * raise TypeError, f"Invalid input object: {python._fqtypename(input).decode('utf8')}" */ - __Pyx_TraceLine(39,0,__PYX_ERR(5, 39, __pyx_L1_error)) __pyx_t_3 = __pyx_v_input; __Pyx_INCREF(__pyx_t_3); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_3); @@ -19255,7 +18574,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__documentOrRaise(PyObject *__py * if doc is None: * raise ValueError, f"Input object has no document: {python._fqtypename(input).decode('utf8')}" */ - __Pyx_TraceLine(41,0,__PYX_ERR(5, 41, __pyx_L1_error)) /*else*/ { __pyx_t_4 = _fqtypename(__pyx_v_input); __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 41, __pyx_L1_error) @@ -19276,7 +18594,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__documentOrRaise(PyObject *__py * raise ValueError, f"Input object has no document: {python._fqtypename(input).decode('utf8')}" * _assertValidDoc(doc) */ - __Pyx_TraceLine(42,0,__PYX_ERR(5, 42, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_doc) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { @@ -19288,7 +18605,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__documentOrRaise(PyObject *__py * _assertValidDoc(doc) * return doc */ - __Pyx_TraceLine(43,0,__PYX_ERR(5, 43, __pyx_L1_error)) __pyx_t_4 = _fqtypename(__pyx_v_input); __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -19315,7 +18631,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__documentOrRaise(PyObject *__py * return doc * */ - __Pyx_TraceLine(44,0,__PYX_ERR(5, 44, __pyx_L1_error)) __pyx_t_6 = __pyx_f_4lxml_5etree__assertValidDoc(__pyx_v_doc); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(5, 44, __pyx_L1_error) /* "src/lxml/apihelpers.pxi":45 @@ -19325,7 +18640,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__documentOrRaise(PyObject *__py * * cdef _Element _rootNodeOrRaise(object input): */ - __Pyx_TraceLine(45,0,__PYX_ERR(5, 45, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_doc)); __pyx_r = __pyx_v_doc; @@ -19348,7 +18662,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__documentOrRaise(PyObject *__py __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -19364,7 +18677,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__documentOrRaise(PyObject *__py static struct LxmlElement *__pyx_f_4lxml_5etree__rootNodeOrRaise(PyObject *__pyx_v_input) { struct LxmlElement *__pyx_v_node = 0; struct LxmlElement *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -19374,7 +18686,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__rootNodeOrRaise(PyObject *__pyx int __pyx_t_6; int __pyx_t_7; __Pyx_RefNannySetupContext("_rootNodeOrRaise", 0); - __Pyx_TraceCall("_rootNodeOrRaise", __pyx_f[5], 47, 0, __PYX_ERR(5, 47, __pyx_L1_error)); /* "src/lxml/apihelpers.pxi":54 * """ @@ -19383,7 +18694,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__rootNodeOrRaise(PyObject *__pyx * node = (<_ElementTree>input)._context_node * elif isinstance(input, _Element): */ - __Pyx_TraceLine(54,0,__PYX_ERR(5, 54, __pyx_L1_error)) __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_input, __pyx_ptype_4lxml_5etree__ElementTree); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -19395,7 +18705,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__rootNodeOrRaise(PyObject *__pyx * elif isinstance(input, _Element): * node = <_Element>input */ - __Pyx_TraceLine(55,0,__PYX_ERR(5, 55, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)((struct LxmlElementTree *)__pyx_v_input)->_context_node); __Pyx_INCREF(__pyx_t_3); __pyx_v_node = ((struct LxmlElement *)__pyx_t_3); @@ -19418,7 +18727,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__rootNodeOrRaise(PyObject *__pyx * node = <_Element>input * elif isinstance(input, _Document): */ - __Pyx_TraceLine(56,0,__PYX_ERR(5, 56, __pyx_L1_error)) __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_input, __pyx_ptype_4lxml_5etree__Element); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -19430,7 +18738,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__rootNodeOrRaise(PyObject *__pyx * elif isinstance(input, _Document): * node = (<_Document>input).getroot() */ - __Pyx_TraceLine(57,0,__PYX_ERR(5, 57, __pyx_L1_error)) __pyx_t_3 = __pyx_v_input; __Pyx_INCREF(__pyx_t_3); __pyx_v_node = ((struct LxmlElement *)__pyx_t_3); @@ -19453,7 +18760,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__rootNodeOrRaise(PyObject *__pyx * node = (<_Document>input).getroot() * else: */ - __Pyx_TraceLine(58,0,__PYX_ERR(5, 58, __pyx_L1_error)) __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_input, __pyx_ptype_4lxml_5etree__Document); __pyx_t_2 = (__pyx_t_1 != 0); if (likely(__pyx_t_2)) { @@ -19465,7 +18771,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__rootNodeOrRaise(PyObject *__pyx * else: * raise TypeError, f"Invalid input object: {python._fqtypename(input).decode('utf8')}" */ - __Pyx_TraceLine(59,0,__PYX_ERR(5, 59, __pyx_L1_error)) __pyx_t_3 = __pyx_f_4lxml_5etree_9_Document_getroot(((struct LxmlDocument *)__pyx_v_input)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(5, 59, __pyx_L1_error) @@ -19489,7 +18794,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__rootNodeOrRaise(PyObject *__pyx * if (node is None or not node._c_node or * node._c_node.type != tree.XML_ELEMENT_NODE): */ - __Pyx_TraceLine(61,0,__PYX_ERR(5, 61, __pyx_L1_error)) /*else*/ { __pyx_t_4 = _fqtypename(__pyx_v_input); __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 61, __pyx_L1_error) @@ -19510,7 +18814,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__rootNodeOrRaise(PyObject *__pyx * node._c_node.type != tree.XML_ELEMENT_NODE): * raise ValueError, f"Input object is not an XML element: {python._fqtypename(input).decode('utf8')}" */ - __Pyx_TraceLine(62,0,__PYX_ERR(5, 62, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_node) == Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (!__pyx_t_6) { @@ -19532,7 +18835,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__rootNodeOrRaise(PyObject *__pyx * raise ValueError, f"Input object is not an XML element: {python._fqtypename(input).decode('utf8')}" * _assertValidNode(node) */ - __Pyx_TraceLine(63,0,__PYX_ERR(5, 63, __pyx_L1_error)) __pyx_t_6 = ((__pyx_v_node->_c_node->type != XML_ELEMENT_NODE) != 0); __pyx_t_2 = __pyx_t_6; __pyx_L5_bool_binop_done:; @@ -19544,7 +18846,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__rootNodeOrRaise(PyObject *__pyx * node._c_node.type != tree.XML_ELEMENT_NODE): * raise ValueError, f"Input object is not an XML element: {python._fqtypename(input).decode('utf8')}" */ - __Pyx_TraceLine(62,0,__PYX_ERR(5, 62, __pyx_L1_error)) if (unlikely(__pyx_t_2)) { /* "src/lxml/apihelpers.pxi":64 @@ -19554,7 +18855,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__rootNodeOrRaise(PyObject *__pyx * _assertValidNode(node) * return node */ - __Pyx_TraceLine(64,0,__PYX_ERR(5, 64, __pyx_L1_error)) __pyx_t_4 = _fqtypename(__pyx_v_input); __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -19581,7 +18881,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__rootNodeOrRaise(PyObject *__pyx * return node * */ - __Pyx_TraceLine(65,0,__PYX_ERR(5, 65, __pyx_L1_error)) __pyx_t_7 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_node); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(5, 65, __pyx_L1_error) /* "src/lxml/apihelpers.pxi":66 @@ -19591,7 +18890,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__rootNodeOrRaise(PyObject *__pyx * * cdef bint _isAncestorOrSame(xmlNode* c_ancestor, xmlNode* c_node): */ - __Pyx_TraceLine(66,0,__PYX_ERR(5, 66, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_node)); __pyx_r = __pyx_v_node; @@ -19614,7 +18912,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__rootNodeOrRaise(PyObject *__pyx __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_node); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -19629,12 +18926,10 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__rootNodeOrRaise(PyObject *__pyx static int __pyx_f_4lxml_5etree__isAncestorOrSame(xmlNode *__pyx_v_c_ancestor, xmlNode *__pyx_v_c_node) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlNode *__pyx_t_2; __Pyx_RefNannySetupContext("_isAncestorOrSame", 0); - __Pyx_TraceCall("_isAncestorOrSame", __pyx_f[5], 68, 0, __PYX_ERR(5, 68, __pyx_L1_error)); /* "src/lxml/apihelpers.pxi":69 * @@ -19643,7 +18938,6 @@ static int __pyx_f_4lxml_5etree__isAncestorOrSame(xmlNode *__pyx_v_c_ancestor, x * if c_node is c_ancestor: * return True */ - __Pyx_TraceLine(69,0,__PYX_ERR(5, 69, __pyx_L1_error)) while (1) { __pyx_t_1 = (__pyx_v_c_node != 0); if (!__pyx_t_1) break; @@ -19655,7 +18949,6 @@ static int __pyx_f_4lxml_5etree__isAncestorOrSame(xmlNode *__pyx_v_c_ancestor, x * return True * c_node = c_node.parent */ - __Pyx_TraceLine(70,0,__PYX_ERR(5, 70, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node == __pyx_v_c_ancestor) != 0); if (__pyx_t_1) { @@ -19666,7 +18959,6 @@ static int __pyx_f_4lxml_5etree__isAncestorOrSame(xmlNode *__pyx_v_c_ancestor, x * c_node = c_node.parent * return False */ - __Pyx_TraceLine(71,0,__PYX_ERR(5, 71, __pyx_L1_error)) __pyx_r = 1; goto __pyx_L0; @@ -19686,7 +18978,6 @@ static int __pyx_f_4lxml_5etree__isAncestorOrSame(xmlNode *__pyx_v_c_ancestor, x * return False * */ - __Pyx_TraceLine(72,0,__PYX_ERR(5, 72, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->parent; __pyx_v_c_node = __pyx_t_2; } @@ -19698,7 +18989,6 @@ static int __pyx_f_4lxml_5etree__isAncestorOrSame(xmlNode *__pyx_v_c_ancestor, x * * cdef _Element _makeElement(tag, xmlDoc* c_doc, _Document doc, */ - __Pyx_TraceLine(73,0,__PYX_ERR(5, 73, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -19711,11 +19001,7 @@ static int __pyx_f_4lxml_5etree__isAncestorOrSame(xmlNode *__pyx_v_c_ancestor, x */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._isAncestorOrSame", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -19733,7 +19019,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t PyObject *__pyx_v_ns_utf = NULL; PyObject *__pyx_v_name_utf = NULL; struct LxmlElement *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -19748,7 +19033,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; __Pyx_RefNannySetupContext("_makeElement", 0); - __Pyx_TraceCall("_makeElement", __pyx_f[5], 75, 0, __PYX_ERR(5, 75, __pyx_L1_error)); __Pyx_INCREF((PyObject *)__pyx_v_doc); /* "src/lxml/apihelpers.pxi":93 @@ -19758,7 +19042,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * c_doc = doc._c_doc * ns_utf, name_utf = _getNsTag(tag) */ - __Pyx_TraceLine(93,0,__PYX_ERR(5, 93, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_doc) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -19770,7 +19053,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * ns_utf, name_utf = _getNsTag(tag) * if parser is not None and parser._for_html: */ - __Pyx_TraceLine(94,0,__PYX_ERR(5, 94, __pyx_L1_error)) __pyx_t_3 = __pyx_v_doc->_c_doc; __pyx_v_c_doc = __pyx_t_3; @@ -19790,7 +19072,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * if parser is not None and parser._for_html: * _htmlTagValidOrRaise(name_utf) */ - __Pyx_TraceLine(95,0,__PYX_ERR(5, 95, __pyx_L1_error)) __pyx_t_4 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(__pyx_t_4 != Py_None)) { @@ -19828,7 +19109,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * _htmlTagValidOrRaise(name_utf) * if c_doc is NULL: */ - __Pyx_TraceLine(96,0,__PYX_ERR(5, 96, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_parser) != Py_None); __pyx_t_7 = (__pyx_t_1 != 0); if (__pyx_t_7) { @@ -19848,7 +19128,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * if c_doc is NULL: * c_doc = _newHTMLDoc() */ - __Pyx_TraceLine(97,0,__PYX_ERR(5, 97, __pyx_L1_error)) __pyx_t_8 = __pyx_f_4lxml_5etree__htmlTagValidOrRaise(__pyx_v_name_utf); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(5, 97, __pyx_L1_error) /* "src/lxml/apihelpers.pxi":98 @@ -19858,7 +19137,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * c_doc = _newHTMLDoc() * else: */ - __Pyx_TraceLine(98,0,__PYX_ERR(5, 98, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_doc == NULL) != 0); if (__pyx_t_2) { @@ -19869,7 +19147,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * else: * _tagValidOrRaise(name_utf) */ - __Pyx_TraceLine(99,0,__PYX_ERR(5, 99, __pyx_L1_error)) __pyx_t_3 = __pyx_f_4lxml_5etree__newHTMLDoc(); if (unlikely(__pyx_t_3 == ((xmlDoc *)NULL))) __PYX_ERR(5, 99, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_3; @@ -19899,7 +19176,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * if c_doc is NULL: * c_doc = _newXMLDoc() */ - __Pyx_TraceLine(101,0,__PYX_ERR(5, 101, __pyx_L1_error)) /*else*/ { __pyx_t_8 = __pyx_f_4lxml_5etree__tagValidOrRaise(__pyx_v_name_utf); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(5, 101, __pyx_L1_error) @@ -19910,7 +19186,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * c_doc = _newXMLDoc() * c_node = _createElement(c_doc, name_utf) */ - __Pyx_TraceLine(102,0,__PYX_ERR(5, 102, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_doc == NULL) != 0); if (__pyx_t_2) { @@ -19921,7 +19196,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * c_node = _createElement(c_doc, name_utf) * if c_node is NULL: */ - __Pyx_TraceLine(103,0,__PYX_ERR(5, 103, __pyx_L1_error)) __pyx_t_3 = __pyx_f_4lxml_5etree__newXMLDoc(); if (unlikely(__pyx_t_3 == ((xmlDoc *)NULL))) __PYX_ERR(5, 103, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_3; @@ -19943,7 +19217,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * if c_node is NULL: * if doc is None and c_doc is not NULL: */ - __Pyx_TraceLine(104,0,__PYX_ERR(5, 104, __pyx_L1_error)) __pyx_t_9 = __pyx_f_4lxml_5etree__createElement(__pyx_v_c_doc, __pyx_v_name_utf); if (unlikely(__pyx_t_9 == ((xmlNode *)NULL))) __PYX_ERR(5, 104, __pyx_L1_error) __pyx_v_c_node = __pyx_t_9; @@ -19954,7 +19227,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * if doc is None and c_doc is not NULL: * tree.xmlFreeDoc(c_doc) */ - __Pyx_TraceLine(105,0,__PYX_ERR(5, 105, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_2) { @@ -19965,7 +19237,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * tree.xmlFreeDoc(c_doc) * raise MemoryError() */ - __Pyx_TraceLine(106,0,__PYX_ERR(5, 106, __pyx_L1_error)) __pyx_t_7 = (((PyObject *)__pyx_v_doc) == Py_None); __pyx_t_1 = (__pyx_t_7 != 0); if (__pyx_t_1) { @@ -19985,7 +19256,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * raise MemoryError() * try: */ - __Pyx_TraceLine(107,0,__PYX_ERR(5, 107, __pyx_L1_error)) xmlFreeDoc(__pyx_v_c_doc); /* "src/lxml/apihelpers.pxi":106 @@ -20004,7 +19274,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * try: * if doc is None: */ - __Pyx_TraceLine(108,0,__PYX_ERR(5, 108, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(5, 108, __pyx_L1_error) /* "src/lxml/apihelpers.pxi":105 @@ -20023,7 +19292,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * if doc is None: * tree.xmlDocSetRootElement(c_doc, c_node) */ - __Pyx_TraceLine(109,0,__PYX_ERR(5, 109, __pyx_L13_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -20040,7 +19308,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * tree.xmlDocSetRootElement(c_doc, c_node) * doc = _documentFactory(c_doc, parser) */ - __Pyx_TraceLine(110,0,__PYX_ERR(5, 110, __pyx_L13_error)) __pyx_t_2 = (((PyObject *)__pyx_v_doc) == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -20052,7 +19319,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * doc = _documentFactory(c_doc, parser) * if text is not None: */ - __Pyx_TraceLine(111,0,__PYX_ERR(5, 111, __pyx_L13_error)) (void)(xmlDocSetRootElement(__pyx_v_c_doc, __pyx_v_c_node)); /* "src/lxml/apihelpers.pxi":112 @@ -20062,7 +19328,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * if text is not None: * _setNodeText(c_node, text) */ - __Pyx_TraceLine(112,0,__PYX_ERR(5, 112, __pyx_L13_error)) __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, __pyx_v_parser)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 112, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_doc, ((struct LxmlDocument *)__pyx_t_4)); @@ -20084,7 +19349,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * _setNodeText(c_node, text) * if tail is not None: */ - __Pyx_TraceLine(113,0,__PYX_ERR(5, 113, __pyx_L13_error)) __pyx_t_1 = (__pyx_v_text != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -20096,7 +19360,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * if tail is not None: * _setTailText(c_node, tail) */ - __Pyx_TraceLine(114,0,__PYX_ERR(5, 114, __pyx_L13_error)) __pyx_t_8 = __pyx_f_4lxml_5etree__setNodeText(__pyx_v_c_node, __pyx_v_text); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(5, 114, __pyx_L13_error) /* "src/lxml/apihelpers.pxi":113 @@ -20115,7 +19378,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * _setTailText(c_node, tail) * # add namespaces to node if necessary */ - __Pyx_TraceLine(115,0,__PYX_ERR(5, 115, __pyx_L13_error)) __pyx_t_2 = (__pyx_v_tail != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -20127,7 +19389,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * # add namespaces to node if necessary * _setNodeNamespaces(c_node, doc, ns_utf, nsmap) */ - __Pyx_TraceLine(116,0,__PYX_ERR(5, 116, __pyx_L13_error)) __pyx_t_8 = __pyx_f_4lxml_5etree__setTailText(__pyx_v_c_node, __pyx_v_tail); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(5, 116, __pyx_L13_error) /* "src/lxml/apihelpers.pxi":115 @@ -20146,7 +19407,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * _initNodeAttributes(c_node, doc, attrib, extra_attrs) * return _elementFactory(doc, c_node) */ - __Pyx_TraceLine(118,0,__PYX_ERR(5, 118, __pyx_L13_error)) __pyx_t_8 = __pyx_f_4lxml_5etree__setNodeNamespaces(__pyx_v_c_node, __pyx_v_doc, __pyx_v_ns_utf, __pyx_v_nsmap); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(5, 118, __pyx_L13_error) /* "src/lxml/apihelpers.pxi":119 @@ -20156,7 +19416,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * return _elementFactory(doc, c_node) * except: */ - __Pyx_TraceLine(119,0,__PYX_ERR(5, 119, __pyx_L13_error)) __pyx_t_4 = __pyx_f_4lxml_5etree__initNodeAttributes(__pyx_v_c_node, __pyx_v_doc, __pyx_v_attrib, __pyx_v_extra_attrs); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 119, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -20168,7 +19427,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * except: * # free allocated c_node/c_doc unless Python does it for us */ - __Pyx_TraceLine(120,0,__PYX_ERR(5, 120, __pyx_L13_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(__pyx_v_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 120, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_4); @@ -20196,7 +19454,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * # free allocated c_node/c_doc unless Python does it for us * if c_node.doc is not c_doc: */ - __Pyx_TraceLine(121,0,__PYX_ERR(5, 121, __pyx_L15_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._makeElement", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(5, 121, __pyx_L15_except_error) @@ -20211,7 +19468,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * # node not yet in document => will not be freed by document * if tail is not None: */ - __Pyx_TraceLine(123,0,__PYX_ERR(5, 123, __pyx_L15_except_error)) __pyx_t_1 = ((__pyx_v_c_node->doc != __pyx_v_c_doc) != 0); if (__pyx_t_1) { @@ -20222,7 +19478,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * _removeText(c_node.next) # tail * tree.xmlFreeNode(c_node) */ - __Pyx_TraceLine(125,0,__PYX_ERR(5, 125, __pyx_L15_except_error)) __pyx_t_1 = (__pyx_v_tail != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -20234,7 +19489,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * tree.xmlFreeNode(c_node) * if doc is None: */ - __Pyx_TraceLine(126,0,__PYX_ERR(5, 126, __pyx_L15_except_error)) __pyx_f_4lxml_5etree__removeText(__pyx_v_c_node->next); /* "src/lxml/apihelpers.pxi":125 @@ -20253,7 +19507,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * if doc is None: * # c_doc will not be freed by doc */ - __Pyx_TraceLine(127,0,__PYX_ERR(5, 127, __pyx_L15_except_error)) xmlFreeNode(__pyx_v_c_node); /* "src/lxml/apihelpers.pxi":123 @@ -20272,7 +19525,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * # c_doc will not be freed by doc * tree.xmlFreeDoc(c_doc) */ - __Pyx_TraceLine(128,0,__PYX_ERR(5, 128, __pyx_L15_except_error)) __pyx_t_2 = (((PyObject *)__pyx_v_doc) == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -20284,7 +19536,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * raise * */ - __Pyx_TraceLine(130,0,__PYX_ERR(5, 130, __pyx_L15_except_error)) xmlFreeDoc(__pyx_v_c_doc); /* "src/lxml/apihelpers.pxi":128 @@ -20303,7 +19554,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t * * cdef int _initNewElement(_Element element, bint is_html, name_utf, ns_utf, */ - __Pyx_TraceLine(131,0,__PYX_ERR(5, 131, __pyx_L15_except_error)) __Pyx_GIVEREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); @@ -20353,7 +19603,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeElement(PyObject *__pyx_v_t __Pyx_XDECREF(__pyx_v_name_utf); __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -20371,7 +19620,6 @@ static int __pyx_f_4lxml_5etree__initNewElement(struct LxmlElement *__pyx_v_elem xmlNode *__pyx_v_c_node; struct LxmlDocument *__pyx_v_doc = 0; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -20381,7 +19629,6 @@ static int __pyx_f_4lxml_5etree__initNewElement(struct LxmlElement *__pyx_v_elem PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("_initNewElement", 0); - __Pyx_TraceCall("_initNewElement", __pyx_f[5], 133, 0, __PYX_ERR(5, 133, __pyx_L1_error)); /* "src/lxml/apihelpers.pxi":143 * cdef xmlNode* c_node @@ -20390,7 +19637,6 @@ static int __pyx_f_4lxml_5etree__initNewElement(struct LxmlElement *__pyx_v_elem * _htmlTagValidOrRaise(name_utf) * c_doc = _newHTMLDoc() */ - __Pyx_TraceLine(143,0,__PYX_ERR(5, 143, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_is_html != 0); if (__pyx_t_1) { @@ -20401,7 +19647,6 @@ static int __pyx_f_4lxml_5etree__initNewElement(struct LxmlElement *__pyx_v_elem * c_doc = _newHTMLDoc() * else: */ - __Pyx_TraceLine(144,0,__PYX_ERR(5, 144, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__htmlTagValidOrRaise(__pyx_v_name_utf); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 144, __pyx_L1_error) /* "src/lxml/apihelpers.pxi":145 @@ -20411,7 +19656,6 @@ static int __pyx_f_4lxml_5etree__initNewElement(struct LxmlElement *__pyx_v_elem * else: * _tagValidOrRaise(name_utf) */ - __Pyx_TraceLine(145,0,__PYX_ERR(5, 145, __pyx_L1_error)) __pyx_t_3 = __pyx_f_4lxml_5etree__newHTMLDoc(); if (unlikely(__pyx_t_3 == ((xmlDoc *)NULL))) __PYX_ERR(5, 145, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_3; @@ -20432,7 +19676,6 @@ static int __pyx_f_4lxml_5etree__initNewElement(struct LxmlElement *__pyx_v_elem * c_doc = _newXMLDoc() * c_node = _createElement(c_doc, name_utf) */ - __Pyx_TraceLine(147,0,__PYX_ERR(5, 147, __pyx_L1_error)) /*else*/ { __pyx_t_2 = __pyx_f_4lxml_5etree__tagValidOrRaise(__pyx_v_name_utf); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 147, __pyx_L1_error) @@ -20443,7 +19686,6 @@ static int __pyx_f_4lxml_5etree__initNewElement(struct LxmlElement *__pyx_v_elem * c_node = _createElement(c_doc, name_utf) * if c_node is NULL: */ - __Pyx_TraceLine(148,0,__PYX_ERR(5, 148, __pyx_L1_error)) __pyx_t_3 = __pyx_f_4lxml_5etree__newXMLDoc(); if (unlikely(__pyx_t_3 == ((xmlDoc *)NULL))) __PYX_ERR(5, 148, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_3; } @@ -20456,7 +19698,6 @@ static int __pyx_f_4lxml_5etree__initNewElement(struct LxmlElement *__pyx_v_elem * if c_node is NULL: * if c_doc is not NULL: */ - __Pyx_TraceLine(149,0,__PYX_ERR(5, 149, __pyx_L1_error)) __pyx_t_4 = __pyx_f_4lxml_5etree__createElement(__pyx_v_c_doc, __pyx_v_name_utf); if (unlikely(__pyx_t_4 == ((xmlNode *)NULL))) __PYX_ERR(5, 149, __pyx_L1_error) __pyx_v_c_node = __pyx_t_4; @@ -20467,7 +19708,6 @@ static int __pyx_f_4lxml_5etree__initNewElement(struct LxmlElement *__pyx_v_elem * if c_doc is not NULL: * tree.xmlFreeDoc(c_doc) */ - __Pyx_TraceLine(150,0,__PYX_ERR(5, 150, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_1) { @@ -20478,7 +19718,6 @@ static int __pyx_f_4lxml_5etree__initNewElement(struct LxmlElement *__pyx_v_elem * tree.xmlFreeDoc(c_doc) * raise MemoryError() */ - __Pyx_TraceLine(151,0,__PYX_ERR(5, 151, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_doc != NULL) != 0); if (__pyx_t_1) { @@ -20489,7 +19728,6 @@ static int __pyx_f_4lxml_5etree__initNewElement(struct LxmlElement *__pyx_v_elem * raise MemoryError() * tree.xmlDocSetRootElement(c_doc, c_node) */ - __Pyx_TraceLine(152,0,__PYX_ERR(5, 152, __pyx_L1_error)) xmlFreeDoc(__pyx_v_c_doc); /* "src/lxml/apihelpers.pxi":151 @@ -20508,7 +19746,6 @@ static int __pyx_f_4lxml_5etree__initNewElement(struct LxmlElement *__pyx_v_elem * tree.xmlDocSetRootElement(c_doc, c_node) * doc = _documentFactory(c_doc, parser) */ - __Pyx_TraceLine(153,0,__PYX_ERR(5, 153, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(5, 153, __pyx_L1_error) /* "src/lxml/apihelpers.pxi":150 @@ -20527,7 +19764,6 @@ static int __pyx_f_4lxml_5etree__initNewElement(struct LxmlElement *__pyx_v_elem * doc = _documentFactory(c_doc, parser) * # add namespaces to node if necessary */ - __Pyx_TraceLine(154,0,__PYX_ERR(5, 154, __pyx_L1_error)) (void)(xmlDocSetRootElement(__pyx_v_c_doc, __pyx_v_c_node)); /* "src/lxml/apihelpers.pxi":155 @@ -20537,7 +19773,6 @@ static int __pyx_f_4lxml_5etree__initNewElement(struct LxmlElement *__pyx_v_elem * # add namespaces to node if necessary * _setNodeNamespaces(c_node, doc, ns_utf, nsmap) */ - __Pyx_TraceLine(155,0,__PYX_ERR(5, 155, __pyx_L1_error)) __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, __pyx_v_parser)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_5); @@ -20550,7 +19785,6 @@ static int __pyx_f_4lxml_5etree__initNewElement(struct LxmlElement *__pyx_v_elem * _initNodeAttributes(c_node, doc, attrib, extra_attrs) * _registerProxy(element, doc, c_node) */ - __Pyx_TraceLine(157,0,__PYX_ERR(5, 157, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__setNodeNamespaces(__pyx_v_c_node, __pyx_v_doc, __pyx_v_ns_utf, __pyx_v_nsmap); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 157, __pyx_L1_error) /* "src/lxml/apihelpers.pxi":158 @@ -20560,7 +19794,6 @@ static int __pyx_f_4lxml_5etree__initNewElement(struct LxmlElement *__pyx_v_elem * _registerProxy(element, doc, c_node) * element._init() */ - __Pyx_TraceLine(158,0,__PYX_ERR(5, 158, __pyx_L1_error)) __pyx_t_5 = __pyx_f_4lxml_5etree__initNodeAttributes(__pyx_v_c_node, __pyx_v_doc, __pyx_v_attrib, __pyx_v_extra_attrs); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -20572,7 +19805,6 @@ static int __pyx_f_4lxml_5etree__initNewElement(struct LxmlElement *__pyx_v_elem * element._init() * return 0 */ - __Pyx_TraceLine(159,0,__PYX_ERR(5, 159, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__registerProxy(__pyx_v_element, __pyx_v_doc, __pyx_v_c_node); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 159, __pyx_L1_error) /* "src/lxml/apihelpers.pxi":160 @@ -20582,7 +19814,6 @@ static int __pyx_f_4lxml_5etree__initNewElement(struct LxmlElement *__pyx_v_elem * return 0 * */ - __Pyx_TraceLine(160,0,__PYX_ERR(5, 160, __pyx_L1_error)) __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_element), __pyx_n_s_init_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; @@ -20595,12 +19826,9 @@ static int __pyx_f_4lxml_5etree__initNewElement(struct LxmlElement *__pyx_v_elem __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (__pyx_t_7) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 160, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else { - __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 160, __pyx_L1_error) - } + __pyx_t_5 = (__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_5)) __PYX_ERR(5, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -20612,7 +19840,6 @@ static int __pyx_f_4lxml_5etree__initNewElement(struct LxmlElement *__pyx_v_elem * * cdef _Element _makeSubElement(_Element parent, tag, text, tail, */ - __Pyx_TraceLine(161,0,__PYX_ERR(5, 161, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -20633,7 +19860,6 @@ static int __pyx_f_4lxml_5etree__initNewElement(struct LxmlElement *__pyx_v_elem __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_doc); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -20652,7 +19878,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeSubElement(struct LxmlEleme PyObject *__pyx_v_ns_utf = NULL; PyObject *__pyx_v_name_utf = NULL; struct LxmlElement *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -20668,7 +19893,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeSubElement(struct LxmlEleme PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; __Pyx_RefNannySetupContext("_makeSubElement", 0); - __Pyx_TraceCall("_makeSubElement", __pyx_f[5], 163, 0, __PYX_ERR(5, 163, __pyx_L1_error)); /* "src/lxml/apihelpers.pxi":170 * cdef xmlNode* c_node @@ -20677,7 +19901,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeSubElement(struct LxmlEleme * return None * _assertValidNode(parent) */ - __Pyx_TraceLine(170,0,__PYX_ERR(5, 170, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)__pyx_v_parent) == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (!__pyx_t_3) { @@ -20698,7 +19921,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeSubElement(struct LxmlEleme * _assertValidNode(parent) * ns_utf, name_utf = _getNsTag(tag) */ - __Pyx_TraceLine(171,0,__PYX_ERR(5, 171, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_r = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -20719,7 +19941,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeSubElement(struct LxmlEleme * ns_utf, name_utf = _getNsTag(tag) * c_doc = parent._doc._c_doc */ - __Pyx_TraceLine(172,0,__PYX_ERR(5, 172, __pyx_L1_error)) __pyx_t_4 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_parent); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(5, 172, __pyx_L1_error) /* "src/lxml/apihelpers.pxi":173 @@ -20729,7 +19950,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeSubElement(struct LxmlEleme * c_doc = parent._doc._c_doc * */ - __Pyx_TraceLine(173,0,__PYX_ERR(5, 173, __pyx_L1_error)) __pyx_t_5 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_tag); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (likely(__pyx_t_5 != Py_None)) { @@ -20767,7 +19987,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeSubElement(struct LxmlEleme * * if parent._doc._parser is not None and parent._doc._parser._for_html: */ - __Pyx_TraceLine(174,0,__PYX_ERR(5, 174, __pyx_L1_error)) __pyx_t_8 = __pyx_v_parent->_doc->_c_doc; __pyx_v_c_doc = __pyx_t_8; @@ -20778,7 +19997,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeSubElement(struct LxmlEleme * _htmlTagValidOrRaise(name_utf) * else: */ - __Pyx_TraceLine(176,0,__PYX_ERR(5, 176, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)__pyx_v_parent->_doc->_parser) != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -20798,7 +20016,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeSubElement(struct LxmlEleme * else: * _tagValidOrRaise(name_utf) */ - __Pyx_TraceLine(177,0,__PYX_ERR(5, 177, __pyx_L1_error)) __pyx_t_4 = __pyx_f_4lxml_5etree__htmlTagValidOrRaise(__pyx_v_name_utf); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(5, 177, __pyx_L1_error) /* "src/lxml/apihelpers.pxi":176 @@ -20818,7 +20035,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeSubElement(struct LxmlEleme * * c_node = _createElement(c_doc, name_utf) */ - __Pyx_TraceLine(179,0,__PYX_ERR(5, 179, __pyx_L1_error)) /*else*/ { __pyx_t_4 = __pyx_f_4lxml_5etree__tagValidOrRaise(__pyx_v_name_utf); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(5, 179, __pyx_L1_error) } @@ -20831,7 +20047,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeSubElement(struct LxmlEleme * if c_node is NULL: * raise MemoryError() */ - __Pyx_TraceLine(181,0,__PYX_ERR(5, 181, __pyx_L1_error)) __pyx_t_9 = __pyx_f_4lxml_5etree__createElement(__pyx_v_c_doc, __pyx_v_name_utf); if (unlikely(__pyx_t_9 == ((xmlNode *)NULL))) __PYX_ERR(5, 181, __pyx_L1_error) __pyx_v_c_node = __pyx_t_9; @@ -20842,7 +20057,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeSubElement(struct LxmlEleme * raise MemoryError() * tree.xmlAddChild(parent._c_node, c_node) */ - __Pyx_TraceLine(182,0,__PYX_ERR(5, 182, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -20853,7 +20067,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeSubElement(struct LxmlEleme * tree.xmlAddChild(parent._c_node, c_node) * */ - __Pyx_TraceLine(183,0,__PYX_ERR(5, 183, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(5, 183, __pyx_L1_error) /* "src/lxml/apihelpers.pxi":182 @@ -20872,7 +20085,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeSubElement(struct LxmlEleme * * try: */ - __Pyx_TraceLine(184,0,__PYX_ERR(5, 184, __pyx_L1_error)) (void)(xmlAddChild(__pyx_v_parent->_c_node, __pyx_v_c_node)); /* "src/lxml/apihelpers.pxi":186 @@ -20882,7 +20094,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeSubElement(struct LxmlEleme * if text is not None: * _setNodeText(c_node, text) */ - __Pyx_TraceLine(186,0,__PYX_ERR(5, 186, __pyx_L10_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -20899,7 +20110,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeSubElement(struct LxmlEleme * _setNodeText(c_node, text) * if tail is not None: */ - __Pyx_TraceLine(187,0,__PYX_ERR(5, 187, __pyx_L10_error)) __pyx_t_1 = (__pyx_v_text != Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { @@ -20911,7 +20121,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeSubElement(struct LxmlEleme * if tail is not None: * _setTailText(c_node, tail) */ - __Pyx_TraceLine(188,0,__PYX_ERR(5, 188, __pyx_L10_error)) __pyx_t_4 = __pyx_f_4lxml_5etree__setNodeText(__pyx_v_c_node, __pyx_v_text); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(5, 188, __pyx_L10_error) /* "src/lxml/apihelpers.pxi":187 @@ -20930,7 +20139,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeSubElement(struct LxmlEleme * _setTailText(c_node, tail) * */ - __Pyx_TraceLine(189,0,__PYX_ERR(5, 189, __pyx_L10_error)) __pyx_t_3 = (__pyx_v_tail != Py_None); __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { @@ -20942,7 +20150,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeSubElement(struct LxmlEleme * * # add namespaces to node if necessary */ - __Pyx_TraceLine(190,0,__PYX_ERR(5, 190, __pyx_L10_error)) __pyx_t_4 = __pyx_f_4lxml_5etree__setTailText(__pyx_v_c_node, __pyx_v_tail); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(5, 190, __pyx_L10_error) /* "src/lxml/apihelpers.pxi":189 @@ -20961,7 +20168,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeSubElement(struct LxmlEleme * _initNodeAttributes(c_node, parent._doc, attrib, extra_attrs) * return _elementFactory(parent._doc, c_node) */ - __Pyx_TraceLine(193,0,__PYX_ERR(5, 193, __pyx_L10_error)) __pyx_t_5 = ((PyObject *)__pyx_v_parent->_doc); __Pyx_INCREF(__pyx_t_5); __pyx_t_4 = __pyx_f_4lxml_5etree__setNodeNamespaces(__pyx_v_c_node, ((struct LxmlDocument *)__pyx_t_5), __pyx_v_ns_utf, __pyx_v_nsmap); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(5, 193, __pyx_L10_error) @@ -20974,7 +20180,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeSubElement(struct LxmlEleme * return _elementFactory(parent._doc, c_node) * except: */ - __Pyx_TraceLine(194,0,__PYX_ERR(5, 194, __pyx_L10_error)) __pyx_t_5 = ((PyObject *)__pyx_v_parent->_doc); __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = __pyx_f_4lxml_5etree__initNodeAttributes(__pyx_v_c_node, ((struct LxmlDocument *)__pyx_t_5), __pyx_v_attrib, __pyx_v_extra_attrs); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 194, __pyx_L10_error) @@ -20989,7 +20194,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeSubElement(struct LxmlEleme * except: * # make sure we clean up in case of an error */ - __Pyx_TraceLine(195,0,__PYX_ERR(5, 195, __pyx_L10_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_7 = ((PyObject *)__pyx_v_parent->_doc); __Pyx_INCREF(__pyx_t_7); @@ -21020,7 +20224,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeSubElement(struct LxmlEleme * # make sure we clean up in case of an error * _removeNode(parent._doc, c_node) */ - __Pyx_TraceLine(196,0,__PYX_ERR(5, 196, __pyx_L12_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._makeSubElement", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(5, 196, __pyx_L12_except_error) @@ -21035,7 +20238,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeSubElement(struct LxmlEleme * raise * */ - __Pyx_TraceLine(198,0,__PYX_ERR(5, 198, __pyx_L12_except_error)) __pyx_t_13 = ((PyObject *)__pyx_v_parent->_doc); __Pyx_INCREF(__pyx_t_13); __pyx_t_4 = __pyx_f_4lxml_5etree__removeNode(((struct LxmlDocument *)__pyx_t_13), __pyx_v_c_node); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(5, 198, __pyx_L12_except_error) @@ -21048,7 +20250,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeSubElement(struct LxmlEleme * * */ - __Pyx_TraceLine(199,0,__PYX_ERR(5, 199, __pyx_L12_except_error)) __Pyx_GIVEREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_6); @@ -21098,7 +20299,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__makeSubElement(struct LxmlEleme __Pyx_XDECREF(__pyx_v_ns_utf); __Pyx_XDECREF(__pyx_v_name_utf); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -21120,7 +20320,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru PyObject *__pyx_v_prefix_utf = NULL; const xmlChar *__pyx_v_c_prefix; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -21134,7 +20333,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru int __pyx_t_10; int __pyx_t_11; __Pyx_RefNannySetupContext("_setNodeNamespaces", 0); - __Pyx_TraceCall("_setNodeNamespaces", __pyx_f[5], 202, 0, __PYX_ERR(5, 202, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_node_ns_utf); /* "src/lxml/apihelpers.pxi":212 @@ -21144,7 +20342,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru * for prefix, href in _iter_nsmap(nsmap): * href_utf = _utf8(href) */ - __Pyx_TraceLine(212,0,__PYX_ERR(5, 212, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_nsmap); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(5, 212, __pyx_L1_error) if (__pyx_t_1) { @@ -21155,7 +20352,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru * href_utf = _utf8(href) * _uriValidOrRaise(href_utf) */ - __Pyx_TraceLine(213,0,__PYX_ERR(5, 213, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__iter_nsmap(__pyx_v_nsmap); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { @@ -21256,7 +20452,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru * _uriValidOrRaise(href_utf) * c_href = _xcstr(href_utf) */ - __Pyx_TraceLine(214,0,__PYX_ERR(5, 214, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__utf8(__pyx_v_href); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_href_utf, ((PyObject*)__pyx_t_2)); @@ -21269,7 +20464,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru * c_href = _xcstr(href_utf) * if prefix is not None: */ - __Pyx_TraceLine(215,0,__PYX_ERR(5, 215, __pyx_L1_error)) __pyx_t_10 = __pyx_f_4lxml_5etree__uriValidOrRaise(__pyx_v_href_utf); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 215, __pyx_L1_error) /* "src/lxml/apihelpers.pxi":216 @@ -21279,7 +20473,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru * if prefix is not None: * prefix_utf = _utf8(prefix) */ - __Pyx_TraceLine(216,0,__PYX_ERR(5, 216, __pyx_L1_error)) __pyx_v_c_href = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_href_utf); /* "src/lxml/apihelpers.pxi":217 @@ -21289,7 +20482,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru * prefix_utf = _utf8(prefix) * _prefixValidOrRaise(prefix_utf) */ - __Pyx_TraceLine(217,0,__PYX_ERR(5, 217, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_prefix != Py_None); __pyx_t_11 = (__pyx_t_1 != 0); if (__pyx_t_11) { @@ -21301,7 +20493,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru * _prefixValidOrRaise(prefix_utf) * c_prefix = _xcstr(prefix_utf) */ - __Pyx_TraceLine(218,0,__PYX_ERR(5, 218, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__utf8(__pyx_v_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_prefix_utf, ((PyObject*)__pyx_t_2)); @@ -21314,7 +20505,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru * c_prefix = _xcstr(prefix_utf) * else: */ - __Pyx_TraceLine(219,0,__PYX_ERR(5, 219, __pyx_L1_error)) __pyx_t_10 = __pyx_f_4lxml_5etree__prefixValidOrRaise(__pyx_v_prefix_utf); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 219, __pyx_L1_error) /* "src/lxml/apihelpers.pxi":220 @@ -21324,7 +20514,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru * else: * c_prefix = NULL */ - __Pyx_TraceLine(220,0,__PYX_ERR(5, 220, __pyx_L1_error)) __pyx_v_c_prefix = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_prefix_utf); /* "src/lxml/apihelpers.pxi":217 @@ -21344,7 +20533,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru * # add namespace with prefix if it is not already known * c_ns = tree.xmlSearchNs(doc._c_doc, c_node, c_prefix) */ - __Pyx_TraceLine(222,0,__PYX_ERR(5, 222, __pyx_L1_error)) /*else*/ { __pyx_v_c_prefix = ((const xmlChar *)NULL); } @@ -21357,7 +20545,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru * if c_ns is NULL or \ * c_ns.href is NULL or \ */ - __Pyx_TraceLine(224,0,__PYX_ERR(5, 224, __pyx_L1_error)) __pyx_v_c_ns = xmlSearchNs(__pyx_v_doc->_c_doc, __pyx_v_c_node, __pyx_v_c_prefix); /* "src/lxml/apihelpers.pxi":225 @@ -21367,7 +20554,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru * c_ns.href is NULL or \ * tree.xmlStrcmp(c_ns.href, c_href) != 0: */ - __Pyx_TraceLine(225,0,__PYX_ERR(5, 225, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_ns == NULL) != 0); if (!__pyx_t_1) { } else { @@ -21382,7 +20568,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru * tree.xmlStrcmp(c_ns.href, c_href) != 0: * c_ns = tree.xmlNewNs(c_node, c_href, c_prefix) */ - __Pyx_TraceLine(226,0,__PYX_ERR(5, 226, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_ns->href == NULL) != 0); if (!__pyx_t_1) { } else { @@ -21397,7 +20582,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru * c_ns = tree.xmlNewNs(c_node, c_href, c_prefix) * if href_utf == node_ns_utf: */ - __Pyx_TraceLine(227,0,__PYX_ERR(5, 227, __pyx_L1_error)) __pyx_t_1 = ((xmlStrcmp(__pyx_v_c_ns->href, __pyx_v_c_href) != 0) != 0); __pyx_t_11 = __pyx_t_1; __pyx_L10_bool_binop_done:; @@ -21409,7 +20593,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru * c_ns.href is NULL or \ * tree.xmlStrcmp(c_ns.href, c_href) != 0: */ - __Pyx_TraceLine(225,0,__PYX_ERR(5, 225, __pyx_L1_error)) if (__pyx_t_11) { /* "src/lxml/apihelpers.pxi":228 @@ -21419,7 +20602,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru * if href_utf == node_ns_utf: * tree.xmlSetNs(c_node, c_ns) */ - __Pyx_TraceLine(228,0,__PYX_ERR(5, 228, __pyx_L1_error)) __pyx_v_c_ns = xmlNewNs(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_prefix); /* "src/lxml/apihelpers.pxi":225 @@ -21438,7 +20620,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru * tree.xmlSetNs(c_node, c_ns) * node_ns_utf = None */ - __Pyx_TraceLine(229,0,__PYX_ERR(5, 229, __pyx_L1_error)) __pyx_t_11 = (__Pyx_PyBytes_Equals(__pyx_v_href_utf, __pyx_v_node_ns_utf, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(5, 229, __pyx_L1_error) if (__pyx_t_11) { @@ -21449,7 +20630,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru * node_ns_utf = None * */ - __Pyx_TraceLine(230,0,__PYX_ERR(5, 230, __pyx_L1_error)) xmlSetNs(__pyx_v_c_node, __pyx_v_c_ns); /* "src/lxml/apihelpers.pxi":231 @@ -21459,7 +20639,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru * * if node_ns_utf is not None: */ - __Pyx_TraceLine(231,0,__PYX_ERR(5, 231, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_node_ns_utf, Py_None); @@ -21479,7 +20658,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru * href_utf = _utf8(href) * _uriValidOrRaise(href_utf) */ - __Pyx_TraceLine(213,0,__PYX_ERR(5, 213, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -21499,7 +20677,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru * _uriValidOrRaise(node_ns_utf) * doc._setNodeNs(c_node, _xcstr(node_ns_utf)) */ - __Pyx_TraceLine(233,0,__PYX_ERR(5, 233, __pyx_L1_error)) __pyx_t_11 = (__pyx_v_node_ns_utf != Py_None); __pyx_t_1 = (__pyx_t_11 != 0); if (__pyx_t_1) { @@ -21511,7 +20688,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru * doc._setNodeNs(c_node, _xcstr(node_ns_utf)) * return 0 */ - __Pyx_TraceLine(234,0,__PYX_ERR(5, 234, __pyx_L1_error)) __pyx_t_10 = __pyx_f_4lxml_5etree__uriValidOrRaise(__pyx_v_node_ns_utf); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 234, __pyx_L1_error) /* "src/lxml/apihelpers.pxi":235 @@ -21521,7 +20697,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru * return 0 * */ - __Pyx_TraceLine(235,0,__PYX_ERR(5, 235, __pyx_L1_error)) __pyx_t_10 = __pyx_f_4lxml_5etree_9_Document__setNodeNs(__pyx_v_doc, __pyx_v_c_node, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_node_ns_utf)); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 235, __pyx_L1_error) /* "src/lxml/apihelpers.pxi":233 @@ -21540,7 +20715,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru * * */ - __Pyx_TraceLine(236,0,__PYX_ERR(5, 236, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -21567,7 +20741,6 @@ static int __pyx_f_4lxml_5etree__setNodeNamespaces(xmlNode *__pyx_v_c_node, stru __Pyx_XDECREF(__pyx_v_href_utf); __Pyx_XDECREF(__pyx_v_prefix_utf); __Pyx_XDECREF(__pyx_v_node_ns_utf); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -21586,7 +20759,6 @@ static PyObject *__pyx_f_4lxml_5etree__iter_nsmap(PyObject *__pyx_v_nsmap) { PyObject *__pyx_v_k = NULL; PyObject *__pyx_v_v = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; @@ -21602,7 +20774,6 @@ static PyObject *__pyx_f_4lxml_5etree__iter_nsmap(PyObject *__pyx_v_nsmap) { PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); __Pyx_RefNannySetupContext("_iter_nsmap", 0); - __Pyx_TraceCall("_iter_nsmap", __pyx_f[5], 239, 0, __PYX_ERR(5, 239, __pyx_L1_error)); /* "src/lxml/apihelpers.pxi":247 * in Py3.x. @@ -21611,7 +20782,6 @@ static PyObject *__pyx_f_4lxml_5etree__iter_nsmap(PyObject *__pyx_v_nsmap) { * return nsmap.items() * # nsmap will usually be a plain unordered dict => avoid type checking overhead */ - __Pyx_TraceLine(247,0,__PYX_ERR(5, 247, __pyx_L1_error)) __pyx_t_1 = PyObject_Length(__pyx_v_nsmap); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(5, 247, __pyx_L1_error) __pyx_t_2 = ((__pyx_t_1 <= 1) != 0); if (__pyx_t_2) { @@ -21621,9 +20791,8 @@ static PyObject *__pyx_f_4lxml_5etree__iter_nsmap(PyObject *__pyx_v_nsmap) { * if len(nsmap) <= 1: * return nsmap.items() # <<<<<<<<<<<<<< * # nsmap will usually be a plain unordered dict => avoid type checking overhead - * if OrderedDict is not None and type(nsmap) is not dict and isinstance(nsmap, OrderedDict): + * if type(nsmap) is not dict and isinstance(nsmap, OrderedDict): */ - __Pyx_TraceLine(248,0,__PYX_ERR(5, 248, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_nsmap, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -21637,12 +20806,9 @@ static PyObject *__pyx_f_4lxml_5etree__iter_nsmap(PyObject *__pyx_v_nsmap) { __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 248, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 248, __pyx_L1_error) - } + __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(5, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; @@ -21661,42 +20827,33 @@ static PyObject *__pyx_f_4lxml_5etree__iter_nsmap(PyObject *__pyx_v_nsmap) { /* "src/lxml/apihelpers.pxi":250 * return nsmap.items() * # nsmap will usually be a plain unordered dict => avoid type checking overhead - * if OrderedDict is not None and type(nsmap) is not dict and isinstance(nsmap, OrderedDict): # <<<<<<<<<<<<<< + * if type(nsmap) is not dict and isinstance(nsmap, OrderedDict): # <<<<<<<<<<<<<< * return nsmap.items() # keep existing order * if None not in nsmap: */ - __Pyx_TraceLine(250,0,__PYX_ERR(5, 250, __pyx_L1_error)) - __pyx_t_6 = (__pyx_v_4lxml_5etree_OrderedDict != Py_None); + __pyx_t_6 = (((PyObject *)Py_TYPE(__pyx_v_nsmap)) != ((PyObject *)(&PyDict_Type))); __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { } else { __pyx_t_2 = __pyx_t_7; goto __pyx_L5_bool_binop_done; } - __pyx_t_7 = (((PyObject *)Py_TYPE(__pyx_v_nsmap)) != ((PyObject *)(&PyDict_Type))); - __pyx_t_6 = (__pyx_t_7 != 0); - if (__pyx_t_6) { - } else { - __pyx_t_2 = __pyx_t_6; - goto __pyx_L5_bool_binop_done; - } __pyx_t_3 = __pyx_v_4lxml_5etree_OrderedDict; __Pyx_INCREF(__pyx_t_3); - __pyx_t_6 = PyObject_IsInstance(__pyx_v_nsmap, __pyx_t_3); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(5, 250, __pyx_L1_error) + __pyx_t_7 = PyObject_IsInstance(__pyx_v_nsmap, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(5, 250, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = (__pyx_t_6 != 0); - __pyx_t_2 = __pyx_t_7; + __pyx_t_6 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_6; __pyx_L5_bool_binop_done:; if (__pyx_t_2) { /* "src/lxml/apihelpers.pxi":251 * # nsmap will usually be a plain unordered dict => avoid type checking overhead - * if OrderedDict is not None and type(nsmap) is not dict and isinstance(nsmap, OrderedDict): + * if type(nsmap) is not dict and isinstance(nsmap, OrderedDict): * return nsmap.items() # keep existing order # <<<<<<<<<<<<<< * if None not in nsmap: * return sorted(nsmap.items()) */ - __Pyx_TraceLine(251,0,__PYX_ERR(5, 251, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_nsmap, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -21710,12 +20867,9 @@ static PyObject *__pyx_f_4lxml_5etree__iter_nsmap(PyObject *__pyx_v_nsmap) { __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 251, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 251, __pyx_L1_error) - } + __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(5, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; @@ -21725,23 +20879,22 @@ static PyObject *__pyx_f_4lxml_5etree__iter_nsmap(PyObject *__pyx_v_nsmap) { /* "src/lxml/apihelpers.pxi":250 * return nsmap.items() * # nsmap will usually be a plain unordered dict => avoid type checking overhead - * if OrderedDict is not None and type(nsmap) is not dict and isinstance(nsmap, OrderedDict): # <<<<<<<<<<<<<< + * if type(nsmap) is not dict and isinstance(nsmap, OrderedDict): # <<<<<<<<<<<<<< * return nsmap.items() # keep existing order * if None not in nsmap: */ } /* "src/lxml/apihelpers.pxi":252 - * if OrderedDict is not None and type(nsmap) is not dict and isinstance(nsmap, OrderedDict): + * if type(nsmap) is not dict and isinstance(nsmap, OrderedDict): * return nsmap.items() # keep existing order * if None not in nsmap: # <<<<<<<<<<<<<< * return sorted(nsmap.items()) * */ - __Pyx_TraceLine(252,0,__PYX_ERR(5, 252, __pyx_L1_error)) __pyx_t_2 = (__Pyx_PySequence_ContainsTF(Py_None, __pyx_v_nsmap, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(5, 252, __pyx_L1_error) - __pyx_t_7 = (__pyx_t_2 != 0); - if (__pyx_t_7) { + __pyx_t_6 = (__pyx_t_2 != 0); + if (__pyx_t_6) { /* "src/lxml/apihelpers.pxi":253 * return nsmap.items() # keep existing order @@ -21750,7 +20903,6 @@ static PyObject *__pyx_f_4lxml_5etree__iter_nsmap(PyObject *__pyx_v_nsmap) { * * # Move the default namespace to the end. This makes sure libxml2 */ - __Pyx_TraceLine(253,0,__PYX_ERR(5, 253, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_nsmap, __pyx_n_s_items); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -21764,12 +20916,9 @@ static PyObject *__pyx_f_4lxml_5etree__iter_nsmap(PyObject *__pyx_v_nsmap) { __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (__pyx_t_8) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 253, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 253, __pyx_L1_error) - } + __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 253, __pyx_L1_error) @@ -21783,7 +20932,7 @@ static PyObject *__pyx_f_4lxml_5etree__iter_nsmap(PyObject *__pyx_v_nsmap) { goto __pyx_L0; /* "src/lxml/apihelpers.pxi":252 - * if OrderedDict is not None and type(nsmap) is not dict and isinstance(nsmap, OrderedDict): + * if type(nsmap) is not dict and isinstance(nsmap, OrderedDict): * return nsmap.items() # keep existing order * if None not in nsmap: # <<<<<<<<<<<<<< * return sorted(nsmap.items()) @@ -21798,7 +20947,6 @@ static PyObject *__pyx_f_4lxml_5etree__iter_nsmap(PyObject *__pyx_v_nsmap) { * nsdefs = [(k, v) for k, v in nsmap.items() if k is not None] * nsdefs.sort() */ - __Pyx_TraceLine(261,0,__PYX_ERR(5, 261, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_nsmap, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_default_ns = __pyx_t_3; @@ -21811,7 +20959,6 @@ static PyObject *__pyx_f_4lxml_5etree__iter_nsmap(PyObject *__pyx_v_nsmap) { * nsdefs.sort() * nsdefs.append((None, default_ns)) */ - __Pyx_TraceLine(262,0,__PYX_ERR(5, 262, __pyx_L1_error)) __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_nsmap, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 262, __pyx_L1_error) @@ -21826,12 +20973,9 @@ static PyObject *__pyx_f_4lxml_5etree__iter_nsmap(PyObject *__pyx_v_nsmap) { __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_8) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 262, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } else { - __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 262, __pyx_L1_error) - } + __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { @@ -21905,27 +21049,27 @@ static PyObject *__pyx_f_4lxml_5etree__iter_nsmap(PyObject *__pyx_v_nsmap) { __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; - index = 0; __pyx_t_8 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_8)) goto __pyx_L11_unpacking_failed; + index = 0; __pyx_t_8 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_8)) goto __pyx_L10_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - index = 1; __pyx_t_11 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_11)) goto __pyx_L11_unpacking_failed; + index = 1; __pyx_t_11 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_11)) goto __pyx_L10_unpacking_failed; __Pyx_GOTREF(__pyx_t_11); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) __PYX_ERR(5, 262, __pyx_L1_error) __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - goto __pyx_L12_unpacking_done; - __pyx_L11_unpacking_failed:; + goto __pyx_L11_unpacking_done; + __pyx_L10_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 262, __pyx_L1_error) - __pyx_L12_unpacking_done:; + __pyx_L11_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_11); __pyx_t_11 = 0; - __pyx_t_7 = (__pyx_v_k != Py_None); - __pyx_t_2 = (__pyx_t_7 != 0); + __pyx_t_6 = (__pyx_v_k != Py_None); + __pyx_t_2 = (__pyx_t_6 != 0); if (__pyx_t_2) { __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -21950,7 +21094,6 @@ static PyObject *__pyx_f_4lxml_5etree__iter_nsmap(PyObject *__pyx_v_nsmap) { * nsdefs.append((None, default_ns)) * return nsdefs */ - __Pyx_TraceLine(263,0,__PYX_ERR(5, 263, __pyx_L1_error)) __pyx_t_9 = PyList_Sort(__pyx_v_nsdefs); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(5, 263, __pyx_L1_error) /* "src/lxml/apihelpers.pxi":264 @@ -21960,7 +21103,6 @@ static PyObject *__pyx_f_4lxml_5etree__iter_nsmap(PyObject *__pyx_v_nsmap) { * return nsdefs * */ - __Pyx_TraceLine(264,0,__PYX_ERR(5, 264, __pyx_L1_error)) __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(Py_None); @@ -21979,7 +21121,6 @@ static PyObject *__pyx_f_4lxml_5etree__iter_nsmap(PyObject *__pyx_v_nsmap) { * * */ - __Pyx_TraceLine(265,0,__PYX_ERR(5, 265, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_nsdefs); __pyx_r = __pyx_v_nsdefs; @@ -22009,7 +21150,6 @@ static PyObject *__pyx_f_4lxml_5etree__iter_nsmap(PyObject *__pyx_v_nsmap) { __Pyx_XDECREF(__pyx_v_k); __Pyx_XDECREF(__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -22024,7 +21164,6 @@ static PyObject *__pyx_f_4lxml_5etree__iter_nsmap(PyObject *__pyx_v_nsmap) { static PyObject *__pyx_f_4lxml_5etree__iter_attrib(PyObject *__pyx_v_attrib) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -22035,16 +21174,14 @@ static PyObject *__pyx_f_4lxml_5etree__iter_attrib(PyObject *__pyx_v_attrib) { int __pyx_t_7; int __pyx_t_8; __Pyx_RefNannySetupContext("_iter_attrib", 0); - __Pyx_TraceCall("_iter_attrib", __pyx_f[5], 268, 0, __PYX_ERR(5, 268, __pyx_L1_error)); /* "src/lxml/apihelpers.pxi":274 * """ * # attrib will usually be a plain unordered dict * if type(attrib) is dict: # <<<<<<<<<<<<<< * return sorted(attrib.items()) - * elif isinstance(attrib, _Attrib) or ( + * elif isinstance(attrib, (_Attrib, OrderedDict)): */ - __Pyx_TraceLine(274,0,__PYX_ERR(5, 274, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_attrib)) == ((PyObject *)(&PyDict_Type))); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -22053,10 +21190,9 @@ static PyObject *__pyx_f_4lxml_5etree__iter_attrib(PyObject *__pyx_v_attrib) { * # attrib will usually be a plain unordered dict * if type(attrib) is dict: * return sorted(attrib.items()) # <<<<<<<<<<<<<< - * elif isinstance(attrib, _Attrib) or ( - * OrderedDict is not None and isinstance(attrib, OrderedDict)): + * elif isinstance(attrib, (_Attrib, OrderedDict)): + * return attrib.items() */ - __Pyx_TraceLine(275,0,__PYX_ERR(5, 275, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrib, __pyx_n_s_items); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -22070,12 +21206,9 @@ static PyObject *__pyx_f_4lxml_5etree__iter_attrib(PyObject *__pyx_v_attrib) { __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 275, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 275, __pyx_L1_error) - } + __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, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 275, __pyx_L1_error) @@ -22093,18 +21226,19 @@ static PyObject *__pyx_f_4lxml_5etree__iter_attrib(PyObject *__pyx_v_attrib) { * # attrib will usually be a plain unordered dict * if type(attrib) is dict: # <<<<<<<<<<<<<< * return sorted(attrib.items()) - * elif isinstance(attrib, _Attrib) or ( + * elif isinstance(attrib, (_Attrib, OrderedDict)): */ } /* "src/lxml/apihelpers.pxi":276 * if type(attrib) is dict: * return sorted(attrib.items()) - * elif isinstance(attrib, _Attrib) or ( # <<<<<<<<<<<<<< - * OrderedDict is not None and isinstance(attrib, OrderedDict)): + * elif isinstance(attrib, (_Attrib, OrderedDict)): # <<<<<<<<<<<<<< * return attrib.items() + * else: */ - __Pyx_TraceLine(276,0,__PYX_ERR(5, 276, __pyx_L1_error)) + __Pyx_INCREF(__pyx_v_4lxml_5etree_OrderedDict); + __pyx_t_3 = __pyx_v_4lxml_5etree_OrderedDict; __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_attrib, __pyx_ptype_4lxml_5etree__Attrib); __pyx_t_8 = (__pyx_t_1 != 0); if (!__pyx_t_8) { @@ -22112,50 +21246,23 @@ static PyObject *__pyx_f_4lxml_5etree__iter_attrib(PyObject *__pyx_v_attrib) { __pyx_t_2 = __pyx_t_8; goto __pyx_L4_bool_binop_done; } - - /* "src/lxml/apihelpers.pxi":277 - * return sorted(attrib.items()) - * elif isinstance(attrib, _Attrib) or ( - * OrderedDict is not None and isinstance(attrib, OrderedDict)): # <<<<<<<<<<<<<< - * return attrib.items() - * else: - */ - __Pyx_TraceLine(277,0,__PYX_ERR(5, 277, __pyx_L1_error)) - __pyx_t_8 = (__pyx_v_4lxml_5etree_OrderedDict != Py_None); + __pyx_t_8 = PyObject_IsInstance(__pyx_v_attrib, __pyx_t_3); __pyx_t_1 = (__pyx_t_8 != 0); - if (__pyx_t_1) { - } else { - __pyx_t_2 = __pyx_t_1; - goto __pyx_L4_bool_binop_done; - } - __pyx_t_3 = __pyx_v_4lxml_5etree_OrderedDict; - __Pyx_INCREF(__pyx_t_3); - __pyx_t_1 = PyObject_IsInstance(__pyx_v_attrib, __pyx_t_3); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 277, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_8 = (__pyx_t_1 != 0); - __pyx_t_2 = __pyx_t_8; + __pyx_t_2 = __pyx_t_1; __pyx_L4_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":276 - * if type(attrib) is dict: + /* "src/lxml/apihelpers.pxi":277 * return sorted(attrib.items()) - * elif isinstance(attrib, _Attrib) or ( # <<<<<<<<<<<<<< - * OrderedDict is not None and isinstance(attrib, OrderedDict)): - * return attrib.items() - */ - __Pyx_TraceLine(276,0,__PYX_ERR(5, 276, __pyx_L1_error)) - if (__pyx_t_2) { - - /* "src/lxml/apihelpers.pxi":278 - * elif isinstance(attrib, _Attrib) or ( - * OrderedDict is not None and isinstance(attrib, OrderedDict)): + * elif isinstance(attrib, (_Attrib, OrderedDict)): * return attrib.items() # <<<<<<<<<<<<<< * else: * # assume it's an unordered mapping of some kind */ - __Pyx_TraceLine(278,0,__PYX_ERR(5, 278, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrib, __pyx_n_s_items); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 278, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrib, __pyx_n_s_items); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -22167,12 +21274,9 @@ static PyObject *__pyx_f_4lxml_5etree__iter_attrib(PyObject *__pyx_v_attrib) { __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (__pyx_t_4) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 278, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 278, __pyx_L1_error) - } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_3; @@ -22182,23 +21286,22 @@ static PyObject *__pyx_f_4lxml_5etree__iter_attrib(PyObject *__pyx_v_attrib) { /* "src/lxml/apihelpers.pxi":276 * if type(attrib) is dict: * return sorted(attrib.items()) - * elif isinstance(attrib, _Attrib) or ( # <<<<<<<<<<<<<< - * OrderedDict is not None and isinstance(attrib, OrderedDict)): + * elif isinstance(attrib, (_Attrib, OrderedDict)): # <<<<<<<<<<<<<< * return attrib.items() + * else: */ } - /* "src/lxml/apihelpers.pxi":281 + /* "src/lxml/apihelpers.pxi":280 * else: * # assume it's an unordered mapping of some kind * return sorted(attrib.items()) # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(281,0,__PYX_ERR(5, 281, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrib, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 281, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrib, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -22210,20 +21313,17 @@ static PyObject *__pyx_f_4lxml_5etree__iter_attrib(PyObject *__pyx_v_attrib) { __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_6) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 281, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 281, __pyx_L1_error) - } + __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 281, __pyx_L1_error) + __pyx_t_4 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = PyList_Sort(__pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(5, 281, __pyx_L1_error) + __pyx_t_7 = PyList_Sort(__pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(5, 280, __pyx_L1_error) __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; @@ -22247,12 +21347,11 @@ static PyObject *__pyx_f_4lxml_5etree__iter_attrib(PyObject *__pyx_v_attrib) { __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":284 +/* "src/lxml/apihelpers.pxi":283 * * * cdef _initNodeAttributes(xmlNode* c_node, _Document doc, attrib, dict extra): # <<<<<<<<<<<<<< @@ -22266,7 +21365,6 @@ static PyObject *__pyx_f_4lxml_5etree__initNodeAttributes(xmlNode *__pyx_v_c_nod PyObject *__pyx_v_name = NULL; PyObject *__pyx_v_value = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -22283,16 +21381,14 @@ static PyObject *__pyx_f_4lxml_5etree__initNodeAttributes(xmlNode *__pyx_v_c_nod int __pyx_t_13; PyObject *(*__pyx_t_14)(PyObject *); __Pyx_RefNannySetupContext("_initNodeAttributes", 0); - __Pyx_TraceCall("_initNodeAttributes", __pyx_f[5], 284, 0, __PYX_ERR(5, 284, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":289 + /* "src/lxml/apihelpers.pxi":288 * cdef bint is_html * cdef xmlNs* c_ns * if attrib is not None and not hasattr(attrib, u'items'): # <<<<<<<<<<<<<< * raise TypeError, f"Invalid attribute dictionary: {python._fqtypename(attrib).decode('utf8')}" * if not attrib and not extra: */ - __Pyx_TraceLine(289,0,__PYX_ERR(5, 289, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_attrib != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -22300,31 +21396,30 @@ static PyObject *__pyx_f_4lxml_5etree__initNodeAttributes(xmlNode *__pyx_v_c_nod __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_HasAttr(__pyx_v_attrib, __pyx_n_u_items); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(5, 289, __pyx_L1_error) + __pyx_t_3 = __Pyx_HasAttr(__pyx_v_attrib, __pyx_n_u_items); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(5, 288, __pyx_L1_error) __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (unlikely(__pyx_t_1)) { - /* "src/lxml/apihelpers.pxi":290 + /* "src/lxml/apihelpers.pxi":289 * cdef xmlNs* c_ns * if attrib is not None and not hasattr(attrib, u'items'): * raise TypeError, f"Invalid attribute dictionary: {python._fqtypename(attrib).decode('utf8')}" # <<<<<<<<<<<<<< * if not attrib and not extra: * return # nothing to do */ - __Pyx_TraceLine(290,0,__PYX_ERR(5, 290, __pyx_L1_error)) __pyx_t_4 = _fqtypename(__pyx_v_attrib); - __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 290, __pyx_L1_error) + __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Invalid_attribute_dictionary, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 290, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Invalid_attribute_dictionary, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_builtin_TypeError, __pyx_t_6, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(5, 290, __pyx_L1_error) + __PYX_ERR(5, 289, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":289 + /* "src/lxml/apihelpers.pxi":288 * cdef bint is_html * cdef xmlNs* c_ns * if attrib is not None and not hasattr(attrib, u'items'): # <<<<<<<<<<<<<< @@ -22333,40 +21428,38 @@ static PyObject *__pyx_f_4lxml_5etree__initNodeAttributes(xmlNode *__pyx_v_c_nod */ } - /* "src/lxml/apihelpers.pxi":291 + /* "src/lxml/apihelpers.pxi":290 * if attrib is not None and not hasattr(attrib, u'items'): * raise TypeError, f"Invalid attribute dictionary: {python._fqtypename(attrib).decode('utf8')}" * if not attrib and not extra: # <<<<<<<<<<<<<< * return # nothing to do * is_html = doc._parser._for_html */ - __Pyx_TraceLine(291,0,__PYX_ERR(5, 291, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_attrib); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(5, 291, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_attrib); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(5, 290, __pyx_L1_error) __pyx_t_3 = ((!__pyx_t_2) != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L7_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_extra); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(5, 291, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_extra); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(5, 290, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_3) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L7_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":292 + /* "src/lxml/apihelpers.pxi":291 * raise TypeError, f"Invalid attribute dictionary: {python._fqtypename(attrib).decode('utf8')}" * if not attrib and not extra: * return # nothing to do # <<<<<<<<<<<<<< * is_html = doc._parser._for_html * seen = set() */ - __Pyx_TraceLine(292,0,__PYX_ERR(5, 292, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":291 + /* "src/lxml/apihelpers.pxi":290 * if attrib is not None and not hasattr(attrib, u'items'): * raise TypeError, f"Invalid attribute dictionary: {python._fqtypename(attrib).decode('utf8')}" * if not attrib and not extra: # <<<<<<<<<<<<<< @@ -22375,73 +21468,69 @@ static PyObject *__pyx_f_4lxml_5etree__initNodeAttributes(xmlNode *__pyx_v_c_nod */ } - /* "src/lxml/apihelpers.pxi":293 + /* "src/lxml/apihelpers.pxi":292 * if not attrib and not extra: * return # nothing to do * is_html = doc._parser._for_html # <<<<<<<<<<<<<< * seen = set() * if extra: */ - __Pyx_TraceLine(293,0,__PYX_ERR(5, 293, __pyx_L1_error)) __pyx_t_1 = __pyx_v_doc->_parser->_for_html; __pyx_v_is_html = __pyx_t_1; - /* "src/lxml/apihelpers.pxi":294 + /* "src/lxml/apihelpers.pxi":293 * return # nothing to do * is_html = doc._parser._for_html * seen = set() # <<<<<<<<<<<<<< * if extra: * for name, value in sorted(extra.items()): */ - __Pyx_TraceLine(294,0,__PYX_ERR(5, 294, __pyx_L1_error)) - __pyx_t_6 = PySet_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 294, __pyx_L1_error) + __pyx_t_6 = PySet_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_seen = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "src/lxml/apihelpers.pxi":295 + /* "src/lxml/apihelpers.pxi":294 * is_html = doc._parser._for_html * seen = set() * if extra: # <<<<<<<<<<<<<< * for name, value in sorted(extra.items()): * _addAttributeToNode(c_node, doc, is_html, name, value, seen) */ - __Pyx_TraceLine(295,0,__PYX_ERR(5, 295, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_extra); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(5, 295, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_extra); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(5, 294, __pyx_L1_error) if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":296 + /* "src/lxml/apihelpers.pxi":295 * seen = set() * if extra: * for name, value in sorted(extra.items()): # <<<<<<<<<<<<<< * _addAttributeToNode(c_node, doc, is_html, name, value, seen) * if attrib: */ - __Pyx_TraceLine(296,0,__PYX_ERR(5, 296, __pyx_L1_error)) if (unlikely(__pyx_v_extra == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); - __PYX_ERR(5, 296, __pyx_L1_error) + __PYX_ERR(5, 295, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyDict_Items(__pyx_v_extra); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 296, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_Items(__pyx_v_extra); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 296, __pyx_L1_error) + __pyx_t_7 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_8 = PyList_Sort(__pyx_t_6); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(5, 296, __pyx_L1_error) + __pyx_t_8 = PyList_Sort(__pyx_t_6); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(5, 295, __pyx_L1_error) if (unlikely(__pyx_t_6 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(5, 296, __pyx_L1_error) + __PYX_ERR(5, 295, __pyx_L1_error) } __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; for (;;) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(5, 296, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(5, 295, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 296, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { @@ -22450,7 +21539,7 @@ static PyObject *__pyx_f_4lxml_5etree__initNodeAttributes(xmlNode *__pyx_v_c_nod if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(5, 296, __pyx_L1_error) + __PYX_ERR(5, 295, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -22463,15 +21552,15 @@ static PyObject *__pyx_f_4lxml_5etree__initNodeAttributes(xmlNode *__pyx_v_c_nod __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_10); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 296, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 296, __pyx_L1_error) + __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 295, __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(5, 296, __pyx_L1_error) + __pyx_t_11 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 295, __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; @@ -22479,7 +21568,7 @@ static PyObject *__pyx_f_4lxml_5etree__initNodeAttributes(xmlNode *__pyx_v_c_nod __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L12_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(5, 296, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(5, 295, __pyx_L1_error) __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L13_unpacking_done; @@ -22487,7 +21576,7 @@ static PyObject *__pyx_f_4lxml_5etree__initNodeAttributes(xmlNode *__pyx_v_c_nod __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(5, 296, __pyx_L1_error) + __PYX_ERR(5, 295, __pyx_L1_error) __pyx_L13_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5); @@ -22495,28 +21584,26 @@ static PyObject *__pyx_f_4lxml_5etree__initNodeAttributes(xmlNode *__pyx_v_c_nod __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_10); __pyx_t_10 = 0; - /* "src/lxml/apihelpers.pxi":297 + /* "src/lxml/apihelpers.pxi":296 * if extra: * for name, value in sorted(extra.items()): * _addAttributeToNode(c_node, doc, is_html, name, value, seen) # <<<<<<<<<<<<<< * if attrib: * for name, value in _iter_attrib(attrib): */ - __Pyx_TraceLine(297,0,__PYX_ERR(5, 297, __pyx_L1_error)) - __pyx_t_13 = __pyx_f_4lxml_5etree__addAttributeToNode(__pyx_v_c_node, __pyx_v_doc, __pyx_v_is_html, __pyx_v_name, __pyx_v_value, __pyx_v_seen); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(5, 297, __pyx_L1_error) + __pyx_t_13 = __pyx_f_4lxml_5etree__addAttributeToNode(__pyx_v_c_node, __pyx_v_doc, __pyx_v_is_html, __pyx_v_name, __pyx_v_value, __pyx_v_seen); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(5, 296, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":296 + /* "src/lxml/apihelpers.pxi":295 * seen = set() * if extra: * for name, value in sorted(extra.items()): # <<<<<<<<<<<<<< * _addAttributeToNode(c_node, doc, is_html, name, value, seen) * if attrib: */ - __Pyx_TraceLine(296,0,__PYX_ERR(5, 296, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "src/lxml/apihelpers.pxi":295 + /* "src/lxml/apihelpers.pxi":294 * is_html = doc._parser._for_html * seen = set() * if extra: # <<<<<<<<<<<<<< @@ -22525,34 +21612,32 @@ static PyObject *__pyx_f_4lxml_5etree__initNodeAttributes(xmlNode *__pyx_v_c_nod */ } - /* "src/lxml/apihelpers.pxi":298 + /* "src/lxml/apihelpers.pxi":297 * for name, value in sorted(extra.items()): * _addAttributeToNode(c_node, doc, is_html, name, value, seen) * if attrib: # <<<<<<<<<<<<<< * for name, value in _iter_attrib(attrib): * _addAttributeToNode(c_node, doc, is_html, name, value, seen) */ - __Pyx_TraceLine(298,0,__PYX_ERR(5, 298, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_attrib); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(5, 298, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_attrib); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(5, 297, __pyx_L1_error) if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":299 + /* "src/lxml/apihelpers.pxi":298 * _addAttributeToNode(c_node, doc, is_html, name, value, seen) * if attrib: * for name, value in _iter_attrib(attrib): # <<<<<<<<<<<<<< * _addAttributeToNode(c_node, doc, is_html, name, value, seen) * */ - __Pyx_TraceLine(299,0,__PYX_ERR(5, 299, __pyx_L1_error)) - __pyx_t_7 = __pyx_f_4lxml_5etree__iter_attrib(__pyx_v_attrib); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 299, __pyx_L1_error) + __pyx_t_7 = __pyx_f_4lxml_5etree__iter_attrib(__pyx_v_attrib); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) { __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0; __pyx_t_14 = NULL; } else { - __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 299, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_14 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 299, __pyx_L1_error) + __pyx_t_14 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 298, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { @@ -22560,17 +21645,17 @@ static PyObject *__pyx_f_4lxml_5etree__initNodeAttributes(xmlNode *__pyx_v_c_nod 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_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(5, 299, __pyx_L1_error) + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(5, 298, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 299, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(5, 299, __pyx_L1_error) + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(5, 298, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 299, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -22580,7 +21665,7 @@ static PyObject *__pyx_f_4lxml_5etree__initNodeAttributes(xmlNode *__pyx_v_c_nod PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(5, 299, __pyx_L1_error) + else __PYX_ERR(5, 298, __pyx_L1_error) } break; } @@ -22592,7 +21677,7 @@ static PyObject *__pyx_f_4lxml_5etree__initNodeAttributes(xmlNode *__pyx_v_c_nod if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(5, 299, __pyx_L1_error) + __PYX_ERR(5, 298, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -22605,15 +21690,15 @@ static PyObject *__pyx_f_4lxml_5etree__initNodeAttributes(xmlNode *__pyx_v_c_nod __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 299, __pyx_L1_error) + __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 299, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { Py_ssize_t index = -1; - __pyx_t_11 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 299, __pyx_L1_error) + __pyx_t_11 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext; @@ -22621,7 +21706,7 @@ static PyObject *__pyx_f_4lxml_5etree__initNodeAttributes(xmlNode *__pyx_v_c_nod __Pyx_GOTREF(__pyx_t_10); index = 1; __pyx_t_5 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_5)) goto __pyx_L17_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(5, 299, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(5, 298, __pyx_L1_error) __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L18_unpacking_done; @@ -22629,7 +21714,7 @@ static PyObject *__pyx_f_4lxml_5etree__initNodeAttributes(xmlNode *__pyx_v_c_nod __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(5, 299, __pyx_L1_error) + __PYX_ERR(5, 298, __pyx_L1_error) __pyx_L18_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_10); @@ -22637,28 +21722,26 @@ static PyObject *__pyx_f_4lxml_5etree__initNodeAttributes(xmlNode *__pyx_v_c_nod __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_5); __pyx_t_5 = 0; - /* "src/lxml/apihelpers.pxi":300 + /* "src/lxml/apihelpers.pxi":299 * if attrib: * for name, value in _iter_attrib(attrib): * _addAttributeToNode(c_node, doc, is_html, name, value, seen) # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(300,0,__PYX_ERR(5, 300, __pyx_L1_error)) - __pyx_t_13 = __pyx_f_4lxml_5etree__addAttributeToNode(__pyx_v_c_node, __pyx_v_doc, __pyx_v_is_html, __pyx_v_name, __pyx_v_value, __pyx_v_seen); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(5, 300, __pyx_L1_error) + __pyx_t_13 = __pyx_f_4lxml_5etree__addAttributeToNode(__pyx_v_c_node, __pyx_v_doc, __pyx_v_is_html, __pyx_v_name, __pyx_v_value, __pyx_v_seen); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(5, 299, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":299 + /* "src/lxml/apihelpers.pxi":298 * _addAttributeToNode(c_node, doc, is_html, name, value, seen) * if attrib: * for name, value in _iter_attrib(attrib): # <<<<<<<<<<<<<< * _addAttributeToNode(c_node, doc, is_html, name, value, seen) * */ - __Pyx_TraceLine(299,0,__PYX_ERR(5, 299, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "src/lxml/apihelpers.pxi":298 + /* "src/lxml/apihelpers.pxi":297 * for name, value in sorted(extra.items()): * _addAttributeToNode(c_node, doc, is_html, name, value, seen) * if attrib: # <<<<<<<<<<<<<< @@ -22667,7 +21750,7 @@ static PyObject *__pyx_f_4lxml_5etree__initNodeAttributes(xmlNode *__pyx_v_c_nod */ } - /* "src/lxml/apihelpers.pxi":284 + /* "src/lxml/apihelpers.pxi":283 * * * cdef _initNodeAttributes(xmlNode* c_node, _Document doc, attrib, dict extra): # <<<<<<<<<<<<<< @@ -22691,12 +21774,11 @@ static PyObject *__pyx_f_4lxml_5etree__initNodeAttributes(xmlNode *__pyx_v_c_nod __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_value); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":303 +/* "src/lxml/apihelpers.pxi":302 * * * cdef int _addAttributeToNode(xmlNode* c_node, _Document doc, bint is_html, # <<<<<<<<<<<<<< @@ -22711,7 +21793,6 @@ static int __pyx_f_4lxml_5etree__addAttributeToNode(xmlNode *__pyx_v_c_node, str PyObject *__pyx_v_value_utf = NULL; xmlNs *__pyx_v_c_ns; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -22722,17 +21803,15 @@ static int __pyx_f_4lxml_5etree__addAttributeToNode(xmlNode *__pyx_v_c_node, str int __pyx_t_7; xmlNs *__pyx_t_8; __Pyx_RefNannySetupContext("_addAttributeToNode", 0); - __Pyx_TraceCall("_addAttributeToNode", __pyx_f[5], 303, 0, __PYX_ERR(5, 303, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":305 + /* "src/lxml/apihelpers.pxi":304 * cdef int _addAttributeToNode(xmlNode* c_node, _Document doc, bint is_html, * name, value, set seen_tags) except -1: * ns_utf, name_utf = tag = _getNsTag(name) # <<<<<<<<<<<<<< * if tag in seen_tags: * return 0 */ - __Pyx_TraceLine(305,0,__PYX_ERR(5, 305, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 305, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(__pyx_t_1 != Py_None)) { PyObject* sequence = __pyx_t_1; @@ -22740,7 +21819,7 @@ static int __pyx_f_4lxml_5etree__addAttributeToNode(xmlNode *__pyx_v_c_node, str if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(5, 305, __pyx_L1_error) + __PYX_ERR(5, 304, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); @@ -22748,13 +21827,13 @@ static int __pyx_f_4lxml_5etree__addAttributeToNode(xmlNode *__pyx_v_c_node, str __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 305, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 305, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(5, 305, __pyx_L1_error) + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(5, 304, __pyx_L1_error) } __pyx_v_ns_utf = __pyx_t_2; __pyx_t_2 = 0; @@ -22764,34 +21843,32 @@ static int __pyx_f_4lxml_5etree__addAttributeToNode(xmlNode *__pyx_v_c_node, str __pyx_v_tag = ((PyObject*)__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/apihelpers.pxi":306 + /* "src/lxml/apihelpers.pxi":305 * name, value, set seen_tags) except -1: * ns_utf, name_utf = tag = _getNsTag(name) * if tag in seen_tags: # <<<<<<<<<<<<<< * return 0 * seen_tags.add(tag) */ - __Pyx_TraceLine(306,0,__PYX_ERR(5, 306, __pyx_L1_error)) if (unlikely(__pyx_v_seen_tags == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(5, 306, __pyx_L1_error) + __PYX_ERR(5, 305, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PySet_ContainsTF(__pyx_v_tag, __pyx_v_seen_tags, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(5, 306, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PySet_ContainsTF(__pyx_v_tag, __pyx_v_seen_tags, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(5, 305, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "src/lxml/apihelpers.pxi":307 + /* "src/lxml/apihelpers.pxi":306 * ns_utf, name_utf = tag = _getNsTag(name) * if tag in seen_tags: * return 0 # <<<<<<<<<<<<<< * seen_tags.add(tag) * if not is_html: */ - __Pyx_TraceLine(307,0,__PYX_ERR(5, 307, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":306 + /* "src/lxml/apihelpers.pxi":305 * name, value, set seen_tags) except -1: * ns_utf, name_utf = tag = _getNsTag(name) * if tag in seen_tags: # <<<<<<<<<<<<<< @@ -22800,42 +21877,39 @@ static int __pyx_f_4lxml_5etree__addAttributeToNode(xmlNode *__pyx_v_c_node, str */ } - /* "src/lxml/apihelpers.pxi":308 + /* "src/lxml/apihelpers.pxi":307 * if tag in seen_tags: * return 0 * seen_tags.add(tag) # <<<<<<<<<<<<<< * if not is_html: * _attributeValidOrRaise(name_utf) */ - __Pyx_TraceLine(308,0,__PYX_ERR(5, 308, __pyx_L1_error)) if (unlikely(__pyx_v_seen_tags == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add"); - __PYX_ERR(5, 308, __pyx_L1_error) + __PYX_ERR(5, 307, __pyx_L1_error) } - __pyx_t_6 = PySet_Add(__pyx_v_seen_tags, __pyx_v_tag); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(5, 308, __pyx_L1_error) + __pyx_t_6 = PySet_Add(__pyx_v_seen_tags, __pyx_v_tag); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(5, 307, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":309 + /* "src/lxml/apihelpers.pxi":308 * return 0 * seen_tags.add(tag) * if not is_html: # <<<<<<<<<<<<<< * _attributeValidOrRaise(name_utf) * value_utf = _utf8(value) */ - __Pyx_TraceLine(309,0,__PYX_ERR(5, 309, __pyx_L1_error)) __pyx_t_5 = ((!(__pyx_v_is_html != 0)) != 0); if (__pyx_t_5) { - /* "src/lxml/apihelpers.pxi":310 + /* "src/lxml/apihelpers.pxi":309 * seen_tags.add(tag) * if not is_html: * _attributeValidOrRaise(name_utf) # <<<<<<<<<<<<<< * value_utf = _utf8(value) * if ns_utf is None: */ - __Pyx_TraceLine(310,0,__PYX_ERR(5, 310, __pyx_L1_error)) - __pyx_t_7 = __pyx_f_4lxml_5etree__attributeValidOrRaise(__pyx_v_name_utf); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(5, 310, __pyx_L1_error) + __pyx_t_7 = __pyx_f_4lxml_5etree__attributeValidOrRaise(__pyx_v_name_utf); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(5, 309, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":309 + /* "src/lxml/apihelpers.pxi":308 * return 0 * seen_tags.add(tag) * if not is_html: # <<<<<<<<<<<<<< @@ -22844,42 +21918,39 @@ static int __pyx_f_4lxml_5etree__addAttributeToNode(xmlNode *__pyx_v_c_node, str */ } - /* "src/lxml/apihelpers.pxi":311 + /* "src/lxml/apihelpers.pxi":310 * if not is_html: * _attributeValidOrRaise(name_utf) * value_utf = _utf8(value) # <<<<<<<<<<<<<< * if ns_utf is None: * tree.xmlNewProp(c_node, _xcstr(name_utf), _xcstr(value_utf)) */ - __Pyx_TraceLine(311,0,__PYX_ERR(5, 311, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 311, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_value_utf = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/apihelpers.pxi":312 + /* "src/lxml/apihelpers.pxi":311 * _attributeValidOrRaise(name_utf) * value_utf = _utf8(value) * if ns_utf is None: # <<<<<<<<<<<<<< * tree.xmlNewProp(c_node, _xcstr(name_utf), _xcstr(value_utf)) * else: */ - __Pyx_TraceLine(312,0,__PYX_ERR(5, 312, __pyx_L1_error)) __pyx_t_5 = (__pyx_v_ns_utf == Py_None); __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { - /* "src/lxml/apihelpers.pxi":313 + /* "src/lxml/apihelpers.pxi":312 * value_utf = _utf8(value) * if ns_utf is None: * tree.xmlNewProp(c_node, _xcstr(name_utf), _xcstr(value_utf)) # <<<<<<<<<<<<<< * else: * _uriValidOrRaise(ns_utf) */ - __Pyx_TraceLine(313,0,__PYX_ERR(5, 313, __pyx_L1_error)) (void)(xmlNewProp(__pyx_v_c_node, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_name_utf), (const xmlChar*)PyBytes_AS_STRING(__pyx_v_value_utf))); - /* "src/lxml/apihelpers.pxi":312 + /* "src/lxml/apihelpers.pxi":311 * _attributeValidOrRaise(name_utf) * value_utf = _utf8(value) * if ns_utf is None: # <<<<<<<<<<<<<< @@ -22889,52 +21960,48 @@ static int __pyx_f_4lxml_5etree__addAttributeToNode(xmlNode *__pyx_v_c_node, str goto __pyx_L5; } - /* "src/lxml/apihelpers.pxi":315 + /* "src/lxml/apihelpers.pxi":314 * tree.xmlNewProp(c_node, _xcstr(name_utf), _xcstr(value_utf)) * else: * _uriValidOrRaise(ns_utf) # <<<<<<<<<<<<<< * c_ns = doc._findOrBuildNodeNs(c_node, _xcstr(ns_utf), NULL, 1) * tree.xmlNewNsProp(c_node, c_ns, */ - __Pyx_TraceLine(315,0,__PYX_ERR(5, 315, __pyx_L1_error)) /*else*/ { - __pyx_t_7 = __pyx_f_4lxml_5etree__uriValidOrRaise(__pyx_v_ns_utf); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(5, 315, __pyx_L1_error) + __pyx_t_7 = __pyx_f_4lxml_5etree__uriValidOrRaise(__pyx_v_ns_utf); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(5, 314, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":316 + /* "src/lxml/apihelpers.pxi":315 * else: * _uriValidOrRaise(ns_utf) * c_ns = doc._findOrBuildNodeNs(c_node, _xcstr(ns_utf), NULL, 1) # <<<<<<<<<<<<<< * tree.xmlNewNsProp(c_node, c_ns, * _xcstr(name_utf), _xcstr(value_utf)) */ - __Pyx_TraceLine(316,0,__PYX_ERR(5, 316, __pyx_L1_error)) - __pyx_t_8 = __pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(__pyx_v_doc, __pyx_v_c_node, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_ns_utf), NULL, 1); if (unlikely(__pyx_t_8 == ((xmlNs *)NULL))) __PYX_ERR(5, 316, __pyx_L1_error) + __pyx_t_8 = __pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(__pyx_v_doc, __pyx_v_c_node, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_ns_utf), NULL, 1); if (unlikely(__pyx_t_8 == ((xmlNs *)NULL))) __PYX_ERR(5, 315, __pyx_L1_error) __pyx_v_c_ns = __pyx_t_8; - /* "src/lxml/apihelpers.pxi":317 + /* "src/lxml/apihelpers.pxi":316 * _uriValidOrRaise(ns_utf) * c_ns = doc._findOrBuildNodeNs(c_node, _xcstr(ns_utf), NULL, 1) * tree.xmlNewNsProp(c_node, c_ns, # <<<<<<<<<<<<<< * _xcstr(name_utf), _xcstr(value_utf)) * return 0 */ - __Pyx_TraceLine(317,0,__PYX_ERR(5, 317, __pyx_L1_error)) (void)(xmlNewNsProp(__pyx_v_c_node, __pyx_v_c_ns, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_name_utf), (const xmlChar*)PyBytes_AS_STRING(__pyx_v_value_utf))); } __pyx_L5:; - /* "src/lxml/apihelpers.pxi":319 + /* "src/lxml/apihelpers.pxi":318 * tree.xmlNewNsProp(c_node, c_ns, * _xcstr(name_utf), _xcstr(value_utf)) * return 0 # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(319,0,__PYX_ERR(5, 319, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":303 + /* "src/lxml/apihelpers.pxi":302 * * * cdef int _addAttributeToNode(xmlNode* c_node, _Document doc, bint is_html, # <<<<<<<<<<<<<< @@ -22954,12 +22021,11 @@ static int __pyx_f_4lxml_5etree__addAttributeToNode(xmlNode *__pyx_v_c_node, str __Pyx_XDECREF(__pyx_v_name_utf); __Pyx_XDECREF(__pyx_v_tag); __Pyx_XDECREF(__pyx_v_value_utf); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":327 +/* "src/lxml/apihelpers.pxi":326 * * * cdef int _collectNsDefs(xmlNode* c_element, _ns_node_ref **_c_ns_list, # <<<<<<<<<<<<<< @@ -22974,100 +22040,90 @@ static int __pyx_f_4lxml_5etree__collectNsDefs(xmlNode *__pyx_v_c_element, __pyx xmlNs *__pyx_v_c_nsdef; __pyx_t_4lxml_5etree__ns_node_ref *__pyx_v_c_nsref_ptr; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlNs *__pyx_t_1; int __pyx_t_2; __pyx_t_4lxml_5etree__ns_node_ref __pyx_t_3; __Pyx_RefNannySetupContext("_collectNsDefs", 0); - __Pyx_TraceCall("_collectNsDefs", __pyx_f[5], 327, 0, __PYX_ERR(5, 327, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":329 + /* "src/lxml/apihelpers.pxi":328 * cdef int _collectNsDefs(xmlNode* c_element, _ns_node_ref **_c_ns_list, * size_t *_c_ns_list_len, size_t *_c_ns_list_size) except -1: * c_ns_list = _c_ns_list[0] # <<<<<<<<<<<<<< * cdef size_t c_ns_list_len = _c_ns_list_len[0] * cdef size_t c_ns_list_size = _c_ns_list_size[0] */ - __Pyx_TraceLine(329,0,__PYX_ERR(5, 329, __pyx_L1_error)) __pyx_v_c_ns_list = (__pyx_v__c_ns_list[0]); - /* "src/lxml/apihelpers.pxi":330 + /* "src/lxml/apihelpers.pxi":329 * size_t *_c_ns_list_len, size_t *_c_ns_list_size) except -1: * c_ns_list = _c_ns_list[0] * cdef size_t c_ns_list_len = _c_ns_list_len[0] # <<<<<<<<<<<<<< * cdef size_t c_ns_list_size = _c_ns_list_size[0] * */ - __Pyx_TraceLine(330,0,__PYX_ERR(5, 330, __pyx_L1_error)) __pyx_v_c_ns_list_len = (__pyx_v__c_ns_list_len[0]); - /* "src/lxml/apihelpers.pxi":331 + /* "src/lxml/apihelpers.pxi":330 * c_ns_list = _c_ns_list[0] * cdef size_t c_ns_list_len = _c_ns_list_len[0] * cdef size_t c_ns_list_size = _c_ns_list_size[0] # <<<<<<<<<<<<<< * * c_nsdef = c_element.nsDef */ - __Pyx_TraceLine(331,0,__PYX_ERR(5, 331, __pyx_L1_error)) __pyx_v_c_ns_list_size = (__pyx_v__c_ns_list_size[0]); - /* "src/lxml/apihelpers.pxi":333 + /* "src/lxml/apihelpers.pxi":332 * cdef size_t c_ns_list_size = _c_ns_list_size[0] * * c_nsdef = c_element.nsDef # <<<<<<<<<<<<<< * while c_nsdef is not NULL: * if c_ns_list_len >= c_ns_list_size: */ - __Pyx_TraceLine(333,0,__PYX_ERR(5, 333, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_element->nsDef; __pyx_v_c_nsdef = __pyx_t_1; - /* "src/lxml/apihelpers.pxi":334 + /* "src/lxml/apihelpers.pxi":333 * * c_nsdef = c_element.nsDef * while c_nsdef is not NULL: # <<<<<<<<<<<<<< * if c_ns_list_len >= c_ns_list_size: * if c_ns_list is NULL: */ - __Pyx_TraceLine(334,0,__PYX_ERR(5, 334, __pyx_L1_error)) while (1) { __pyx_t_2 = ((__pyx_v_c_nsdef != NULL) != 0); if (!__pyx_t_2) break; - /* "src/lxml/apihelpers.pxi":335 + /* "src/lxml/apihelpers.pxi":334 * c_nsdef = c_element.nsDef * while c_nsdef is not NULL: * if c_ns_list_len >= c_ns_list_size: # <<<<<<<<<<<<<< * if c_ns_list is NULL: * c_ns_list_size = 20 */ - __Pyx_TraceLine(335,0,__PYX_ERR(5, 335, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_ns_list_len >= __pyx_v_c_ns_list_size) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":336 + /* "src/lxml/apihelpers.pxi":335 * while c_nsdef is not NULL: * if c_ns_list_len >= c_ns_list_size: * if c_ns_list is NULL: # <<<<<<<<<<<<<< * c_ns_list_size = 20 * else: */ - __Pyx_TraceLine(336,0,__PYX_ERR(5, 336, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_ns_list == NULL) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":337 + /* "src/lxml/apihelpers.pxi":336 * if c_ns_list_len >= c_ns_list_size: * if c_ns_list is NULL: * c_ns_list_size = 20 # <<<<<<<<<<<<<< * else: * c_ns_list_size *= 2 */ - __Pyx_TraceLine(337,0,__PYX_ERR(5, 337, __pyx_L1_error)) __pyx_v_c_ns_list_size = 20; - /* "src/lxml/apihelpers.pxi":336 + /* "src/lxml/apihelpers.pxi":335 * while c_nsdef is not NULL: * if c_ns_list_len >= c_ns_list_size: * if c_ns_list is NULL: # <<<<<<<<<<<<<< @@ -23077,72 +22133,66 @@ static int __pyx_f_4lxml_5etree__collectNsDefs(xmlNode *__pyx_v_c_element, __pyx goto __pyx_L6; } - /* "src/lxml/apihelpers.pxi":339 + /* "src/lxml/apihelpers.pxi":338 * c_ns_list_size = 20 * else: * c_ns_list_size *= 2 # <<<<<<<<<<<<<< * c_nsref_ptr = <_ns_node_ref*> python.lxml_realloc( * c_ns_list, c_ns_list_size, sizeof(_ns_node_ref)) */ - __Pyx_TraceLine(339,0,__PYX_ERR(5, 339, __pyx_L1_error)) /*else*/ { __pyx_v_c_ns_list_size = (__pyx_v_c_ns_list_size * 2); } __pyx_L6:; - /* "src/lxml/apihelpers.pxi":340 + /* "src/lxml/apihelpers.pxi":339 * else: * c_ns_list_size *= 2 * c_nsref_ptr = <_ns_node_ref*> python.lxml_realloc( # <<<<<<<<<<<<<< * c_ns_list, c_ns_list_size, sizeof(_ns_node_ref)) * if c_nsref_ptr is NULL: */ - __Pyx_TraceLine(340,0,__PYX_ERR(5, 340, __pyx_L1_error)) __pyx_v_c_nsref_ptr = ((__pyx_t_4lxml_5etree__ns_node_ref *)lxml_realloc(__pyx_v_c_ns_list, __pyx_v_c_ns_list_size, (sizeof(__pyx_t_4lxml_5etree__ns_node_ref)))); - /* "src/lxml/apihelpers.pxi":342 + /* "src/lxml/apihelpers.pxi":341 * c_nsref_ptr = <_ns_node_ref*> python.lxml_realloc( * c_ns_list, c_ns_list_size, sizeof(_ns_node_ref)) * if c_nsref_ptr is NULL: # <<<<<<<<<<<<<< * if c_ns_list is not NULL: * python.lxml_free(c_ns_list) */ - __Pyx_TraceLine(342,0,__PYX_ERR(5, 342, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_nsref_ptr == NULL) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":343 + /* "src/lxml/apihelpers.pxi":342 * c_ns_list, c_ns_list_size, sizeof(_ns_node_ref)) * if c_nsref_ptr is NULL: * if c_ns_list is not NULL: # <<<<<<<<<<<<<< * python.lxml_free(c_ns_list) * _c_ns_list[0] = NULL */ - __Pyx_TraceLine(343,0,__PYX_ERR(5, 343, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_ns_list != NULL) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":344 + /* "src/lxml/apihelpers.pxi":343 * if c_nsref_ptr is NULL: * if c_ns_list is not NULL: * python.lxml_free(c_ns_list) # <<<<<<<<<<<<<< * _c_ns_list[0] = NULL * raise MemoryError() */ - __Pyx_TraceLine(344,0,__PYX_ERR(5, 344, __pyx_L1_error)) lxml_free(__pyx_v_c_ns_list); - /* "src/lxml/apihelpers.pxi":345 + /* "src/lxml/apihelpers.pxi":344 * if c_ns_list is not NULL: * python.lxml_free(c_ns_list) * _c_ns_list[0] = NULL # <<<<<<<<<<<<<< * raise MemoryError() * c_ns_list = c_nsref_ptr */ - __Pyx_TraceLine(345,0,__PYX_ERR(5, 345, __pyx_L1_error)) (__pyx_v__c_ns_list[0]) = NULL; - /* "src/lxml/apihelpers.pxi":343 + /* "src/lxml/apihelpers.pxi":342 * c_ns_list, c_ns_list_size, sizeof(_ns_node_ref)) * if c_nsref_ptr is NULL: * if c_ns_list is not NULL: # <<<<<<<<<<<<<< @@ -23151,17 +22201,16 @@ static int __pyx_f_4lxml_5etree__collectNsDefs(xmlNode *__pyx_v_c_element, __pyx */ } - /* "src/lxml/apihelpers.pxi":346 + /* "src/lxml/apihelpers.pxi":345 * python.lxml_free(c_ns_list) * _c_ns_list[0] = NULL * raise MemoryError() # <<<<<<<<<<<<<< * c_ns_list = c_nsref_ptr * */ - __Pyx_TraceLine(346,0,__PYX_ERR(5, 346, __pyx_L1_error)) - PyErr_NoMemory(); __PYX_ERR(5, 346, __pyx_L1_error) + PyErr_NoMemory(); __PYX_ERR(5, 345, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":342 + /* "src/lxml/apihelpers.pxi":341 * c_nsref_ptr = <_ns_node_ref*> python.lxml_realloc( * c_ns_list, c_ns_list_size, sizeof(_ns_node_ref)) * if c_nsref_ptr is NULL: # <<<<<<<<<<<<<< @@ -23170,17 +22219,16 @@ static int __pyx_f_4lxml_5etree__collectNsDefs(xmlNode *__pyx_v_c_element, __pyx */ } - /* "src/lxml/apihelpers.pxi":347 + /* "src/lxml/apihelpers.pxi":346 * _c_ns_list[0] = NULL * raise MemoryError() * c_ns_list = c_nsref_ptr # <<<<<<<<<<<<<< * * c_ns_list[c_ns_list_len] = _ns_node_ref(c_nsdef, c_element) */ - __Pyx_TraceLine(347,0,__PYX_ERR(5, 347, __pyx_L1_error)) __pyx_v_c_ns_list = __pyx_v_c_nsref_ptr; - /* "src/lxml/apihelpers.pxi":335 + /* "src/lxml/apihelpers.pxi":334 * c_nsdef = c_element.nsDef * while c_nsdef is not NULL: * if c_ns_list_len >= c_ns_list_size: # <<<<<<<<<<<<<< @@ -23189,71 +22237,65 @@ static int __pyx_f_4lxml_5etree__collectNsDefs(xmlNode *__pyx_v_c_element, __pyx */ } - /* "src/lxml/apihelpers.pxi":349 + /* "src/lxml/apihelpers.pxi":348 * c_ns_list = c_nsref_ptr * * c_ns_list[c_ns_list_len] = _ns_node_ref(c_nsdef, c_element) # <<<<<<<<<<<<<< * c_ns_list_len += 1 * c_nsdef = c_nsdef.next */ - __Pyx_TraceLine(349,0,__PYX_ERR(5, 349, __pyx_L1_error)) __pyx_t_3.ns = __pyx_v_c_nsdef; __pyx_t_3.node = __pyx_v_c_element; (__pyx_v_c_ns_list[__pyx_v_c_ns_list_len]) = __pyx_t_3; - /* "src/lxml/apihelpers.pxi":350 + /* "src/lxml/apihelpers.pxi":349 * * c_ns_list[c_ns_list_len] = _ns_node_ref(c_nsdef, c_element) * c_ns_list_len += 1 # <<<<<<<<<<<<<< * c_nsdef = c_nsdef.next * */ - __Pyx_TraceLine(350,0,__PYX_ERR(5, 350, __pyx_L1_error)) __pyx_v_c_ns_list_len = (__pyx_v_c_ns_list_len + 1); - /* "src/lxml/apihelpers.pxi":351 + /* "src/lxml/apihelpers.pxi":350 * c_ns_list[c_ns_list_len] = _ns_node_ref(c_nsdef, c_element) * c_ns_list_len += 1 * c_nsdef = c_nsdef.next # <<<<<<<<<<<<<< * * _c_ns_list_size[0] = c_ns_list_size */ - __Pyx_TraceLine(351,0,__PYX_ERR(5, 351, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_nsdef->next; __pyx_v_c_nsdef = __pyx_t_1; } - /* "src/lxml/apihelpers.pxi":353 + /* "src/lxml/apihelpers.pxi":352 * c_nsdef = c_nsdef.next * * _c_ns_list_size[0] = c_ns_list_size # <<<<<<<<<<<<<< * _c_ns_list_len[0] = c_ns_list_len * _c_ns_list[0] = c_ns_list */ - __Pyx_TraceLine(353,0,__PYX_ERR(5, 353, __pyx_L1_error)) (__pyx_v__c_ns_list_size[0]) = __pyx_v_c_ns_list_size; - /* "src/lxml/apihelpers.pxi":354 + /* "src/lxml/apihelpers.pxi":353 * * _c_ns_list_size[0] = c_ns_list_size * _c_ns_list_len[0] = c_ns_list_len # <<<<<<<<<<<<<< * _c_ns_list[0] = c_ns_list * */ - __Pyx_TraceLine(354,0,__PYX_ERR(5, 354, __pyx_L1_error)) (__pyx_v__c_ns_list_len[0]) = __pyx_v_c_ns_list_len; - /* "src/lxml/apihelpers.pxi":355 + /* "src/lxml/apihelpers.pxi":354 * _c_ns_list_size[0] = c_ns_list_size * _c_ns_list_len[0] = c_ns_list_len * _c_ns_list[0] = c_ns_list # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(355,0,__PYX_ERR(5, 355, __pyx_L1_error)) (__pyx_v__c_ns_list[0]) = __pyx_v_c_ns_list; - /* "src/lxml/apihelpers.pxi":327 + /* "src/lxml/apihelpers.pxi":326 * * * cdef int _collectNsDefs(xmlNode* c_element, _ns_node_ref **_c_ns_list, # <<<<<<<<<<<<<< @@ -23268,12 +22310,11 @@ static int __pyx_f_4lxml_5etree__collectNsDefs(xmlNode *__pyx_v_c_element, __pyx __Pyx_AddTraceback("lxml.etree._collectNsDefs", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":358 +/* "src/lxml/apihelpers.pxi":357 * * * cdef int _removeUnusedNamespaceDeclarations(xmlNode* c_element, set prefixes_to_keep) except -1: # <<<<<<<<<<<<<< @@ -23289,7 +22330,6 @@ static int __pyx_f_4lxml_5etree__removeUnusedNamespaceDeclarations(xmlNode *__py size_t __pyx_v_i; xmlNs *__pyx_v_c_nsdef; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -23302,46 +22342,41 @@ static int __pyx_f_4lxml_5etree__removeUnusedNamespaceDeclarations(xmlNode *__py int __pyx_t_9; xmlNs *__pyx_t_10; __Pyx_RefNannySetupContext("_removeUnusedNamespaceDeclarations", 0); - __Pyx_TraceCall("_removeUnusedNamespaceDeclarations", __pyx_f[5], 358, 0, __PYX_ERR(5, 358, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":366 + /* "src/lxml/apihelpers.pxi":365 * """ * cdef xmlNode* c_node * cdef _ns_node_ref* c_ns_list = NULL # <<<<<<<<<<<<<< * cdef size_t c_ns_list_size = 0 * cdef size_t c_ns_list_len = 0 */ - __Pyx_TraceLine(366,0,__PYX_ERR(5, 366, __pyx_L1_error)) __pyx_v_c_ns_list = NULL; - /* "src/lxml/apihelpers.pxi":367 + /* "src/lxml/apihelpers.pxi":366 * cdef xmlNode* c_node * cdef _ns_node_ref* c_ns_list = NULL * cdef size_t c_ns_list_size = 0 # <<<<<<<<<<<<<< * cdef size_t c_ns_list_len = 0 * cdef size_t i */ - __Pyx_TraceLine(367,0,__PYX_ERR(5, 367, __pyx_L1_error)) __pyx_v_c_ns_list_size = 0; - /* "src/lxml/apihelpers.pxi":368 + /* "src/lxml/apihelpers.pxi":367 * cdef _ns_node_ref* c_ns_list = NULL * cdef size_t c_ns_list_size = 0 * cdef size_t c_ns_list_len = 0 # <<<<<<<<<<<<<< * cdef size_t i * */ - __Pyx_TraceLine(368,0,__PYX_ERR(5, 368, __pyx_L1_error)) __pyx_v_c_ns_list_len = 0; - /* "src/lxml/apihelpers.pxi":371 + /* "src/lxml/apihelpers.pxi":370 * cdef size_t i * * if c_element.parent and c_element.parent.type == tree.XML_DOCUMENT_NODE: # <<<<<<<<<<<<<< * # include declarations on the document node * _collectNsDefs(c_element.parent, &c_ns_list, &c_ns_list_len, &c_ns_list_size) */ - __Pyx_TraceLine(371,0,__PYX_ERR(5, 371, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_c_element->parent != 0); if (__pyx_t_2) { } else { @@ -23353,17 +22388,16 @@ static int __pyx_f_4lxml_5etree__removeUnusedNamespaceDeclarations(xmlNode *__py __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":373 + /* "src/lxml/apihelpers.pxi":372 * if c_element.parent and c_element.parent.type == tree.XML_DOCUMENT_NODE: * # include declarations on the document node * _collectNsDefs(c_element.parent, &c_ns_list, &c_ns_list_len, &c_ns_list_size) # <<<<<<<<<<<<<< * * tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_element, c_element, 1) */ - __Pyx_TraceLine(373,0,__PYX_ERR(5, 373, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree__collectNsDefs(__pyx_v_c_element->parent, (&__pyx_v_c_ns_list), (&__pyx_v_c_ns_list_len), (&__pyx_v_c_ns_list_size)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(5, 373, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__collectNsDefs(__pyx_v_c_element->parent, (&__pyx_v_c_ns_list), (&__pyx_v_c_ns_list_len), (&__pyx_v_c_ns_list_size)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(5, 372, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":371 + /* "src/lxml/apihelpers.pxi":370 * cdef size_t i * * if c_element.parent and c_element.parent.type == tree.XML_DOCUMENT_NODE: # <<<<<<<<<<<<<< @@ -23372,38 +22406,35 @@ static int __pyx_f_4lxml_5etree__removeUnusedNamespaceDeclarations(xmlNode *__py */ } - /* "src/lxml/apihelpers.pxi":375 + /* "src/lxml/apihelpers.pxi":374 * _collectNsDefs(c_element.parent, &c_ns_list, &c_ns_list_len, &c_ns_list_size) * * tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_element, c_element, 1) # <<<<<<<<<<<<<< * # collect all new namespace declarations into the ns list * if c_element.nsDef: */ - __Pyx_TraceLine(375,0,__PYX_ERR(5, 375, __pyx_L1_error)) BEGIN_FOR_EACH_ELEMENT_FROM(__pyx_v_c_element, __pyx_v_c_element, 1); - /* "src/lxml/apihelpers.pxi":377 + /* "src/lxml/apihelpers.pxi":376 * tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_element, c_element, 1) * # collect all new namespace declarations into the ns list * if c_element.nsDef: # <<<<<<<<<<<<<< * _collectNsDefs(c_element, &c_ns_list, &c_ns_list_len, &c_ns_list_size) * */ - __Pyx_TraceLine(377,0,__PYX_ERR(5, 377, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_c_element->nsDef != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":378 + /* "src/lxml/apihelpers.pxi":377 * # collect all new namespace declarations into the ns list * if c_element.nsDef: * _collectNsDefs(c_element, &c_ns_list, &c_ns_list_len, &c_ns_list_size) # <<<<<<<<<<<<<< * * # remove all namespace declarations from the list that are referenced */ - __Pyx_TraceLine(378,0,__PYX_ERR(5, 378, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree__collectNsDefs(__pyx_v_c_element, (&__pyx_v_c_ns_list), (&__pyx_v_c_ns_list_len), (&__pyx_v_c_ns_list_size)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(5, 378, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__collectNsDefs(__pyx_v_c_element, (&__pyx_v_c_ns_list), (&__pyx_v_c_ns_list_len), (&__pyx_v_c_ns_list_size)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(5, 377, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":377 + /* "src/lxml/apihelpers.pxi":376 * tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_element, c_element, 1) * # collect all new namespace declarations into the ns list * if c_element.nsDef: # <<<<<<<<<<<<<< @@ -23412,14 +22443,13 @@ static int __pyx_f_4lxml_5etree__removeUnusedNamespaceDeclarations(xmlNode *__py */ } - /* "src/lxml/apihelpers.pxi":381 + /* "src/lxml/apihelpers.pxi":380 * * # remove all namespace declarations from the list that are referenced * if c_ns_list_len and c_element.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< * c_node = c_element * while c_node and c_ns_list_len: */ - __Pyx_TraceLine(381,0,__PYX_ERR(5, 381, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_c_ns_list_len != 0); if (__pyx_t_2) { } else { @@ -23431,24 +22461,22 @@ static int __pyx_f_4lxml_5etree__removeUnusedNamespaceDeclarations(xmlNode *__py __pyx_L8_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":382 + /* "src/lxml/apihelpers.pxi":381 * # remove all namespace declarations from the list that are referenced * if c_ns_list_len and c_element.type == tree.XML_ELEMENT_NODE: * c_node = c_element # <<<<<<<<<<<<<< * while c_node and c_ns_list_len: * if c_node.ns: */ - __Pyx_TraceLine(382,0,__PYX_ERR(5, 382, __pyx_L1_error)) __pyx_v_c_node = __pyx_v_c_element; - /* "src/lxml/apihelpers.pxi":383 + /* "src/lxml/apihelpers.pxi":382 * if c_ns_list_len and c_element.type == tree.XML_ELEMENT_NODE: * c_node = c_element * while c_node and c_ns_list_len: # <<<<<<<<<<<<<< * if c_node.ns: * for i in range(c_ns_list_len): */ - __Pyx_TraceLine(383,0,__PYX_ERR(5, 383, __pyx_L1_error)) while (1) { __pyx_t_2 = (__pyx_v_c_node != 0); if (__pyx_t_2) { @@ -23461,72 +22489,66 @@ static int __pyx_f_4lxml_5etree__removeUnusedNamespaceDeclarations(xmlNode *__py __pyx_L12_bool_binop_done:; if (!__pyx_t_1) break; - /* "src/lxml/apihelpers.pxi":384 + /* "src/lxml/apihelpers.pxi":383 * c_node = c_element * while c_node and c_ns_list_len: * if c_node.ns: # <<<<<<<<<<<<<< * for i in range(c_ns_list_len): * if c_node.ns is c_ns_list[i].ns: */ - __Pyx_TraceLine(384,0,__PYX_ERR(5, 384, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_c_node->ns != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":385 + /* "src/lxml/apihelpers.pxi":384 * while c_node and c_ns_list_len: * if c_node.ns: * for i in range(c_ns_list_len): # <<<<<<<<<<<<<< * if c_node.ns is c_ns_list[i].ns: * c_ns_list_len -= 1 */ - __Pyx_TraceLine(385,0,__PYX_ERR(5, 385, __pyx_L1_error)) __pyx_t_4 = __pyx_v_c_ns_list_len; __pyx_t_5 = __pyx_t_4; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; - /* "src/lxml/apihelpers.pxi":386 + /* "src/lxml/apihelpers.pxi":385 * if c_node.ns: * for i in range(c_ns_list_len): * if c_node.ns is c_ns_list[i].ns: # <<<<<<<<<<<<<< * c_ns_list_len -= 1 * c_ns_list[i] = c_ns_list[c_ns_list_len] */ - __Pyx_TraceLine(386,0,__PYX_ERR(5, 386, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node->ns == (__pyx_v_c_ns_list[__pyx_v_i]).ns) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":387 + /* "src/lxml/apihelpers.pxi":386 * for i in range(c_ns_list_len): * if c_node.ns is c_ns_list[i].ns: * c_ns_list_len -= 1 # <<<<<<<<<<<<<< * c_ns_list[i] = c_ns_list[c_ns_list_len] * #c_ns_list[c_ns_list_len] = _ns_node_ref(NULL, NULL) */ - __Pyx_TraceLine(387,0,__PYX_ERR(5, 387, __pyx_L1_error)) __pyx_v_c_ns_list_len = (__pyx_v_c_ns_list_len - 1); - /* "src/lxml/apihelpers.pxi":388 + /* "src/lxml/apihelpers.pxi":387 * if c_node.ns is c_ns_list[i].ns: * c_ns_list_len -= 1 * c_ns_list[i] = c_ns_list[c_ns_list_len] # <<<<<<<<<<<<<< * #c_ns_list[c_ns_list_len] = _ns_node_ref(NULL, NULL) * break */ - __Pyx_TraceLine(388,0,__PYX_ERR(5, 388, __pyx_L1_error)) (__pyx_v_c_ns_list[__pyx_v_i]) = (__pyx_v_c_ns_list[__pyx_v_c_ns_list_len]); - /* "src/lxml/apihelpers.pxi":390 + /* "src/lxml/apihelpers.pxi":389 * c_ns_list[i] = c_ns_list[c_ns_list_len] * #c_ns_list[c_ns_list_len] = _ns_node_ref(NULL, NULL) * break # <<<<<<<<<<<<<< * if c_node is c_element: * # continue with attributes */ - __Pyx_TraceLine(390,0,__PYX_ERR(5, 390, __pyx_L1_error)) goto __pyx_L16_break; - /* "src/lxml/apihelpers.pxi":386 + /* "src/lxml/apihelpers.pxi":385 * if c_node.ns: * for i in range(c_ns_list_len): * if c_node.ns is c_ns_list[i].ns: # <<<<<<<<<<<<<< @@ -23537,7 +22559,7 @@ static int __pyx_f_4lxml_5etree__removeUnusedNamespaceDeclarations(xmlNode *__py } __pyx_L16_break:; - /* "src/lxml/apihelpers.pxi":384 + /* "src/lxml/apihelpers.pxi":383 * c_node = c_element * while c_node and c_ns_list_len: * if c_node.ns: # <<<<<<<<<<<<<< @@ -23546,28 +22568,26 @@ static int __pyx_f_4lxml_5etree__removeUnusedNamespaceDeclarations(xmlNode *__py */ } - /* "src/lxml/apihelpers.pxi":391 + /* "src/lxml/apihelpers.pxi":390 * #c_ns_list[c_ns_list_len] = _ns_node_ref(NULL, NULL) * break * if c_node is c_element: # <<<<<<<<<<<<<< * # continue with attributes * c_node = c_element.properties */ - __Pyx_TraceLine(391,0,__PYX_ERR(5, 391, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node == __pyx_v_c_element) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":393 + /* "src/lxml/apihelpers.pxi":392 * if c_node is c_element: * # continue with attributes * c_node = c_element.properties # <<<<<<<<<<<<<< * else: * c_node = c_node.next */ - __Pyx_TraceLine(393,0,__PYX_ERR(5, 393, __pyx_L1_error)) __pyx_v_c_node = ((xmlNode *)__pyx_v_c_element->properties); - /* "src/lxml/apihelpers.pxi":391 + /* "src/lxml/apihelpers.pxi":390 * #c_ns_list[c_ns_list_len] = _ns_node_ref(NULL, NULL) * break * if c_node is c_element: # <<<<<<<<<<<<<< @@ -23577,14 +22597,13 @@ static int __pyx_f_4lxml_5etree__removeUnusedNamespaceDeclarations(xmlNode *__py goto __pyx_L18; } - /* "src/lxml/apihelpers.pxi":395 + /* "src/lxml/apihelpers.pxi":394 * c_node = c_element.properties * else: * c_node = c_node.next # <<<<<<<<<<<<<< * tree.END_FOR_EACH_ELEMENT_FROM(c_element) * */ - __Pyx_TraceLine(395,0,__PYX_ERR(5, 395, __pyx_L1_error)) /*else*/ { __pyx_t_7 = __pyx_v_c_node->next; __pyx_v_c_node = __pyx_t_7; @@ -23592,7 +22611,7 @@ static int __pyx_f_4lxml_5etree__removeUnusedNamespaceDeclarations(xmlNode *__py __pyx_L18:; } - /* "src/lxml/apihelpers.pxi":381 + /* "src/lxml/apihelpers.pxi":380 * * # remove all namespace declarations from the list that are referenced * if c_ns_list_len and c_element.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< @@ -23601,39 +22620,36 @@ static int __pyx_f_4lxml_5etree__removeUnusedNamespaceDeclarations(xmlNode *__py */ } - /* "src/lxml/apihelpers.pxi":396 + /* "src/lxml/apihelpers.pxi":395 * else: * c_node = c_node.next * tree.END_FOR_EACH_ELEMENT_FROM(c_element) # <<<<<<<<<<<<<< * * if c_ns_list is NULL: */ - __Pyx_TraceLine(396,0,__PYX_ERR(5, 396, __pyx_L1_error)) END_FOR_EACH_ELEMENT_FROM(__pyx_v_c_element); - /* "src/lxml/apihelpers.pxi":398 + /* "src/lxml/apihelpers.pxi":397 * tree.END_FOR_EACH_ELEMENT_FROM(c_element) * * if c_ns_list is NULL: # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(398,0,__PYX_ERR(5, 398, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_ns_list == NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":399 + /* "src/lxml/apihelpers.pxi":398 * * if c_ns_list is NULL: * return 0 # <<<<<<<<<<<<<< * * # free all namespace declarations that remained in the list, */ - __Pyx_TraceLine(399,0,__PYX_ERR(5, 399, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":398 + /* "src/lxml/apihelpers.pxi":397 * tree.END_FOR_EACH_ELEMENT_FROM(c_element) * * if c_ns_list is NULL: # <<<<<<<<<<<<<< @@ -23642,69 +22658,65 @@ static int __pyx_f_4lxml_5etree__removeUnusedNamespaceDeclarations(xmlNode *__py */ } - /* "src/lxml/apihelpers.pxi":404 + /* "src/lxml/apihelpers.pxi":403 * # except for those we should keep explicitly * cdef xmlNs* c_nsdef * for i in range(c_ns_list_len): # <<<<<<<<<<<<<< * if prefixes_to_keep is not None: * if c_ns_list[i].ns.prefix and c_ns_list[i].ns.prefix in prefixes_to_keep: */ - __Pyx_TraceLine(404,0,__PYX_ERR(5, 404, __pyx_L1_error)) __pyx_t_4 = __pyx_v_c_ns_list_len; __pyx_t_5 = __pyx_t_4; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; - /* "src/lxml/apihelpers.pxi":405 + /* "src/lxml/apihelpers.pxi":404 * cdef xmlNs* c_nsdef * for i in range(c_ns_list_len): * if prefixes_to_keep is not None: # <<<<<<<<<<<<<< * if c_ns_list[i].ns.prefix and c_ns_list[i].ns.prefix in prefixes_to_keep: * continue */ - __Pyx_TraceLine(405,0,__PYX_ERR(5, 405, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_prefixes_to_keep != ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":406 + /* "src/lxml/apihelpers.pxi":405 * for i in range(c_ns_list_len): * if prefixes_to_keep is not None: * if c_ns_list[i].ns.prefix and c_ns_list[i].ns.prefix in prefixes_to_keep: # <<<<<<<<<<<<<< * continue * c_node = c_ns_list[i].node */ - __Pyx_TraceLine(406,0,__PYX_ERR(5, 406, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_ns_list[__pyx_v_i]).ns->prefix != 0); if (__pyx_t_1) { } else { __pyx_t_2 = __pyx_t_1; goto __pyx_L24_bool_binop_done; } - __pyx_t_8 = __Pyx_PyBytes_FromCString((__pyx_v_c_ns_list[__pyx_v_i]).ns->prefix); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 406, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyBytes_FromCString((__pyx_v_c_ns_list[__pyx_v_i]).ns->prefix); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (unlikely(__pyx_v_prefixes_to_keep == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(5, 406, __pyx_L1_error) + __PYX_ERR(5, 405, __pyx_L1_error) } - __pyx_t_1 = (__Pyx_PySet_ContainsTF(__pyx_t_8, __pyx_v_prefixes_to_keep, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(5, 406, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySet_ContainsTF(__pyx_t_8, __pyx_v_prefixes_to_keep, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(5, 405, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = (__pyx_t_1 != 0); __pyx_t_2 = __pyx_t_9; __pyx_L24_bool_binop_done:; if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":407 + /* "src/lxml/apihelpers.pxi":406 * if prefixes_to_keep is not None: * if c_ns_list[i].ns.prefix and c_ns_list[i].ns.prefix in prefixes_to_keep: * continue # <<<<<<<<<<<<<< * c_node = c_ns_list[i].node * c_nsdef = c_node.nsDef */ - __Pyx_TraceLine(407,0,__PYX_ERR(5, 407, __pyx_L1_error)) goto __pyx_L20_continue; - /* "src/lxml/apihelpers.pxi":406 + /* "src/lxml/apihelpers.pxi":405 * for i in range(c_ns_list_len): * if prefixes_to_keep is not None: * if c_ns_list[i].ns.prefix and c_ns_list[i].ns.prefix in prefixes_to_keep: # <<<<<<<<<<<<<< @@ -23713,7 +22725,7 @@ static int __pyx_f_4lxml_5etree__removeUnusedNamespaceDeclarations(xmlNode *__py */ } - /* "src/lxml/apihelpers.pxi":405 + /* "src/lxml/apihelpers.pxi":404 * cdef xmlNs* c_nsdef * for i in range(c_ns_list_len): * if prefixes_to_keep is not None: # <<<<<<<<<<<<<< @@ -23722,51 +22734,47 @@ static int __pyx_f_4lxml_5etree__removeUnusedNamespaceDeclarations(xmlNode *__py */ } - /* "src/lxml/apihelpers.pxi":408 + /* "src/lxml/apihelpers.pxi":407 * if c_ns_list[i].ns.prefix and c_ns_list[i].ns.prefix in prefixes_to_keep: * continue * c_node = c_ns_list[i].node # <<<<<<<<<<<<<< * c_nsdef = c_node.nsDef * if c_nsdef is c_ns_list[i].ns: */ - __Pyx_TraceLine(408,0,__PYX_ERR(5, 408, __pyx_L1_error)) __pyx_t_7 = (__pyx_v_c_ns_list[__pyx_v_i]).node; __pyx_v_c_node = __pyx_t_7; - /* "src/lxml/apihelpers.pxi":409 + /* "src/lxml/apihelpers.pxi":408 * continue * c_node = c_ns_list[i].node * c_nsdef = c_node.nsDef # <<<<<<<<<<<<<< * if c_nsdef is c_ns_list[i].ns: * c_node.nsDef = c_node.nsDef.next */ - __Pyx_TraceLine(409,0,__PYX_ERR(5, 409, __pyx_L1_error)) __pyx_t_10 = __pyx_v_c_node->nsDef; __pyx_v_c_nsdef = __pyx_t_10; - /* "src/lxml/apihelpers.pxi":410 + /* "src/lxml/apihelpers.pxi":409 * c_node = c_ns_list[i].node * c_nsdef = c_node.nsDef * if c_nsdef is c_ns_list[i].ns: # <<<<<<<<<<<<<< * c_node.nsDef = c_node.nsDef.next * else: */ - __Pyx_TraceLine(410,0,__PYX_ERR(5, 410, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_nsdef == (__pyx_v_c_ns_list[__pyx_v_i]).ns) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":411 + /* "src/lxml/apihelpers.pxi":410 * c_nsdef = c_node.nsDef * if c_nsdef is c_ns_list[i].ns: * c_node.nsDef = c_node.nsDef.next # <<<<<<<<<<<<<< * else: * while c_nsdef.next is not c_ns_list[i].ns: */ - __Pyx_TraceLine(411,0,__PYX_ERR(5, 411, __pyx_L1_error)) __pyx_t_10 = __pyx_v_c_node->nsDef->next; __pyx_v_c_node->nsDef = __pyx_t_10; - /* "src/lxml/apihelpers.pxi":410 + /* "src/lxml/apihelpers.pxi":409 * c_node = c_ns_list[i].node * c_nsdef = c_node.nsDef * if c_nsdef is c_ns_list[i].ns: # <<<<<<<<<<<<<< @@ -23776,78 +22784,72 @@ static int __pyx_f_4lxml_5etree__removeUnusedNamespaceDeclarations(xmlNode *__py goto __pyx_L26; } - /* "src/lxml/apihelpers.pxi":413 + /* "src/lxml/apihelpers.pxi":412 * c_node.nsDef = c_node.nsDef.next * else: * while c_nsdef.next is not c_ns_list[i].ns: # <<<<<<<<<<<<<< * c_nsdef = c_nsdef.next * c_nsdef.next = c_nsdef.next.next */ - __Pyx_TraceLine(413,0,__PYX_ERR(5, 413, __pyx_L1_error)) /*else*/ { while (1) { __pyx_t_2 = ((__pyx_v_c_nsdef->next != (__pyx_v_c_ns_list[__pyx_v_i]).ns) != 0); if (!__pyx_t_2) break; - /* "src/lxml/apihelpers.pxi":414 + /* "src/lxml/apihelpers.pxi":413 * else: * while c_nsdef.next is not c_ns_list[i].ns: * c_nsdef = c_nsdef.next # <<<<<<<<<<<<<< * c_nsdef.next = c_nsdef.next.next * tree.xmlFreeNs(c_ns_list[i].ns) */ - __Pyx_TraceLine(414,0,__PYX_ERR(5, 414, __pyx_L1_error)) __pyx_t_10 = __pyx_v_c_nsdef->next; __pyx_v_c_nsdef = __pyx_t_10; } - /* "src/lxml/apihelpers.pxi":415 + /* "src/lxml/apihelpers.pxi":414 * while c_nsdef.next is not c_ns_list[i].ns: * c_nsdef = c_nsdef.next * c_nsdef.next = c_nsdef.next.next # <<<<<<<<<<<<<< * tree.xmlFreeNs(c_ns_list[i].ns) * */ - __Pyx_TraceLine(415,0,__PYX_ERR(5, 415, __pyx_L1_error)) __pyx_t_10 = __pyx_v_c_nsdef->next->next; __pyx_v_c_nsdef->next = __pyx_t_10; } __pyx_L26:; - /* "src/lxml/apihelpers.pxi":416 + /* "src/lxml/apihelpers.pxi":415 * c_nsdef = c_nsdef.next * c_nsdef.next = c_nsdef.next.next * tree.xmlFreeNs(c_ns_list[i].ns) # <<<<<<<<<<<<<< * * if c_ns_list is not NULL: */ - __Pyx_TraceLine(416,0,__PYX_ERR(5, 416, __pyx_L1_error)) xmlFreeNs((__pyx_v_c_ns_list[__pyx_v_i]).ns); __pyx_L20_continue:; } - /* "src/lxml/apihelpers.pxi":418 + /* "src/lxml/apihelpers.pxi":417 * tree.xmlFreeNs(c_ns_list[i].ns) * * if c_ns_list is not NULL: # <<<<<<<<<<<<<< * python.lxml_free(c_ns_list) * return 0 */ - __Pyx_TraceLine(418,0,__PYX_ERR(5, 418, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_ns_list != NULL) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":419 + /* "src/lxml/apihelpers.pxi":418 * * if c_ns_list is not NULL: * python.lxml_free(c_ns_list) # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(419,0,__PYX_ERR(5, 419, __pyx_L1_error)) lxml_free(__pyx_v_c_ns_list); - /* "src/lxml/apihelpers.pxi":418 + /* "src/lxml/apihelpers.pxi":417 * tree.xmlFreeNs(c_ns_list[i].ns) * * if c_ns_list is not NULL: # <<<<<<<<<<<<<< @@ -23856,18 +22858,17 @@ static int __pyx_f_4lxml_5etree__removeUnusedNamespaceDeclarations(xmlNode *__py */ } - /* "src/lxml/apihelpers.pxi":420 + /* "src/lxml/apihelpers.pxi":419 * if c_ns_list is not NULL: * python.lxml_free(c_ns_list) * return 0 # <<<<<<<<<<<<<< * * cdef xmlNs* _searchNsByHref(xmlNode* c_node, const_xmlChar* c_href, bint is_attribute): */ - __Pyx_TraceLine(420,0,__PYX_ERR(5, 420, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":358 + /* "src/lxml/apihelpers.pxi":357 * * * cdef int _removeUnusedNamespaceDeclarations(xmlNode* c_element, set prefixes_to_keep) except -1: # <<<<<<<<<<<<<< @@ -23881,12 +22882,11 @@ static int __pyx_f_4lxml_5etree__removeUnusedNamespaceDeclarations(xmlNode *__py __Pyx_AddTraceback("lxml.etree._removeUnusedNamespaceDeclarations", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":422 +/* "src/lxml/apihelpers.pxi":421 * return 0 * * cdef xmlNs* _searchNsByHref(xmlNode* c_node, const_xmlChar* c_href, bint is_attribute): # <<<<<<<<<<<<<< @@ -23899,33 +22899,29 @@ static xmlNs *__pyx_f_4lxml_5etree__searchNsByHref(xmlNode *__pyx_v_c_node, cons xmlNs *__pyx_v_c_default_ns; xmlNode *__pyx_v_c_element; xmlNs *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; xmlNode *__pyx_t_3; xmlNs *__pyx_t_4; __Pyx_RefNannySetupContext("_searchNsByHref", 0); - __Pyx_TraceCall("_searchNsByHref", __pyx_f[5], 422, 0, __PYX_ERR(5, 422, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":431 + /* "src/lxml/apihelpers.pxi":430 * """ * cdef xmlNs* c_ns * cdef xmlNs* c_default_ns = NULL # <<<<<<<<<<<<<< * cdef xmlNode* c_element * if c_href is NULL or c_node is NULL or c_node.type == tree.XML_ENTITY_REF_NODE: */ - __Pyx_TraceLine(431,0,__PYX_ERR(5, 431, __pyx_L1_error)) __pyx_v_c_default_ns = NULL; - /* "src/lxml/apihelpers.pxi":433 + /* "src/lxml/apihelpers.pxi":432 * cdef xmlNs* c_default_ns = NULL * cdef xmlNode* c_element * if c_href is NULL or c_node is NULL or c_node.type == tree.XML_ENTITY_REF_NODE: # <<<<<<<<<<<<<< * return NULL * if tree.xmlStrcmp(c_href, tree.XML_XML_NAMESPACE) == 0: */ - __Pyx_TraceLine(433,0,__PYX_ERR(5, 433, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_href == NULL) != 0); if (!__pyx_t_2) { } else { @@ -23943,18 +22939,17 @@ static xmlNs *__pyx_f_4lxml_5etree__searchNsByHref(xmlNode *__pyx_v_c_node, cons __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":434 + /* "src/lxml/apihelpers.pxi":433 * cdef xmlNode* c_element * if c_href is NULL or c_node is NULL or c_node.type == tree.XML_ENTITY_REF_NODE: * return NULL # <<<<<<<<<<<<<< * if tree.xmlStrcmp(c_href, tree.XML_XML_NAMESPACE) == 0: * # no special cases here, let libxml2 handle this */ - __Pyx_TraceLine(434,0,__PYX_ERR(5, 434, __pyx_L1_error)) __pyx_r = NULL; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":433 + /* "src/lxml/apihelpers.pxi":432 * cdef xmlNs* c_default_ns = NULL * cdef xmlNode* c_element * if c_href is NULL or c_node is NULL or c_node.type == tree.XML_ENTITY_REF_NODE: # <<<<<<<<<<<<<< @@ -23963,29 +22958,27 @@ static xmlNs *__pyx_f_4lxml_5etree__searchNsByHref(xmlNode *__pyx_v_c_node, cons */ } - /* "src/lxml/apihelpers.pxi":435 + /* "src/lxml/apihelpers.pxi":434 * if c_href is NULL or c_node is NULL or c_node.type == tree.XML_ENTITY_REF_NODE: * return NULL * if tree.xmlStrcmp(c_href, tree.XML_XML_NAMESPACE) == 0: # <<<<<<<<<<<<<< * # no special cases here, let libxml2 handle this * return tree.xmlSearchNsByHref(c_node.doc, c_node, c_href) */ - __Pyx_TraceLine(435,0,__PYX_ERR(5, 435, __pyx_L1_error)) __pyx_t_1 = ((xmlStrcmp(__pyx_v_c_href, XML_XML_NAMESPACE) == 0) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":437 + /* "src/lxml/apihelpers.pxi":436 * if tree.xmlStrcmp(c_href, tree.XML_XML_NAMESPACE) == 0: * # no special cases here, let libxml2 handle this * return tree.xmlSearchNsByHref(c_node.doc, c_node, c_href) # <<<<<<<<<<<<<< * if c_node.type == tree.XML_ATTRIBUTE_NODE: * is_attribute = 1 */ - __Pyx_TraceLine(437,0,__PYX_ERR(5, 437, __pyx_L1_error)) __pyx_r = xmlSearchNsByHref(__pyx_v_c_node->doc, __pyx_v_c_node, __pyx_v_c_href); goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":435 + /* "src/lxml/apihelpers.pxi":434 * if c_href is NULL or c_node is NULL or c_node.type == tree.XML_ENTITY_REF_NODE: * return NULL * if tree.xmlStrcmp(c_href, tree.XML_XML_NAMESPACE) == 0: # <<<<<<<<<<<<<< @@ -23994,28 +22987,26 @@ static xmlNs *__pyx_f_4lxml_5etree__searchNsByHref(xmlNode *__pyx_v_c_node, cons */ } - /* "src/lxml/apihelpers.pxi":438 + /* "src/lxml/apihelpers.pxi":437 * # no special cases here, let libxml2 handle this * return tree.xmlSearchNsByHref(c_node.doc, c_node, c_href) * if c_node.type == tree.XML_ATTRIBUTE_NODE: # <<<<<<<<<<<<<< * is_attribute = 1 * while c_node is not NULL and c_node.type != tree.XML_ELEMENT_NODE: */ - __Pyx_TraceLine(438,0,__PYX_ERR(5, 438, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node->type == XML_ATTRIBUTE_NODE) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":439 + /* "src/lxml/apihelpers.pxi":438 * return tree.xmlSearchNsByHref(c_node.doc, c_node, c_href) * if c_node.type == tree.XML_ATTRIBUTE_NODE: * is_attribute = 1 # <<<<<<<<<<<<<< * while c_node is not NULL and c_node.type != tree.XML_ELEMENT_NODE: * c_node = c_node.parent */ - __Pyx_TraceLine(439,0,__PYX_ERR(5, 439, __pyx_L1_error)) __pyx_v_is_attribute = 1; - /* "src/lxml/apihelpers.pxi":438 + /* "src/lxml/apihelpers.pxi":437 * # no special cases here, let libxml2 handle this * return tree.xmlSearchNsByHref(c_node.doc, c_node, c_href) * if c_node.type == tree.XML_ATTRIBUTE_NODE: # <<<<<<<<<<<<<< @@ -24024,14 +23015,13 @@ static xmlNs *__pyx_f_4lxml_5etree__searchNsByHref(xmlNode *__pyx_v_c_node, cons */ } - /* "src/lxml/apihelpers.pxi":440 + /* "src/lxml/apihelpers.pxi":439 * if c_node.type == tree.XML_ATTRIBUTE_NODE: * is_attribute = 1 * while c_node is not NULL and c_node.type != tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< * c_node = c_node.parent * c_element = c_node */ - __Pyx_TraceLine(440,0,__PYX_ERR(5, 440, __pyx_L1_error)) while (1) { __pyx_t_2 = ((__pyx_v_c_node != NULL) != 0); if (__pyx_t_2) { @@ -24044,82 +23034,75 @@ static xmlNs *__pyx_f_4lxml_5etree__searchNsByHref(xmlNode *__pyx_v_c_node, cons __pyx_L11_bool_binop_done:; if (!__pyx_t_1) break; - /* "src/lxml/apihelpers.pxi":441 + /* "src/lxml/apihelpers.pxi":440 * is_attribute = 1 * while c_node is not NULL and c_node.type != tree.XML_ELEMENT_NODE: * c_node = c_node.parent # <<<<<<<<<<<<<< * c_element = c_node * while c_node is not NULL: */ - __Pyx_TraceLine(441,0,__PYX_ERR(5, 441, __pyx_L1_error)) __pyx_t_3 = __pyx_v_c_node->parent; __pyx_v_c_node = __pyx_t_3; } - /* "src/lxml/apihelpers.pxi":442 + /* "src/lxml/apihelpers.pxi":441 * while c_node is not NULL and c_node.type != tree.XML_ELEMENT_NODE: * c_node = c_node.parent * c_element = c_node # <<<<<<<<<<<<<< * while c_node is not NULL: * if c_node.type == tree.XML_ELEMENT_NODE: */ - __Pyx_TraceLine(442,0,__PYX_ERR(5, 442, __pyx_L1_error)) __pyx_v_c_element = __pyx_v_c_node; - /* "src/lxml/apihelpers.pxi":443 + /* "src/lxml/apihelpers.pxi":442 * c_node = c_node.parent * c_element = c_node * while c_node is not NULL: # <<<<<<<<<<<<<< * if c_node.type == tree.XML_ELEMENT_NODE: * c_ns = c_node.nsDef */ - __Pyx_TraceLine(443,0,__PYX_ERR(5, 443, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_node != NULL) != 0); if (!__pyx_t_1) break; - /* "src/lxml/apihelpers.pxi":444 + /* "src/lxml/apihelpers.pxi":443 * c_element = c_node * while c_node is not NULL: * if c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< * c_ns = c_node.nsDef * while c_ns is not NULL: */ - __Pyx_TraceLine(444,0,__PYX_ERR(5, 444, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":445 + /* "src/lxml/apihelpers.pxi":444 * while c_node is not NULL: * if c_node.type == tree.XML_ELEMENT_NODE: * c_ns = c_node.nsDef # <<<<<<<<<<<<<< * while c_ns is not NULL: * if c_ns.href is not NULL and tree.xmlStrcmp(c_href, c_ns.href) == 0: */ - __Pyx_TraceLine(445,0,__PYX_ERR(5, 445, __pyx_L1_error)) __pyx_t_4 = __pyx_v_c_node->nsDef; __pyx_v_c_ns = __pyx_t_4; - /* "src/lxml/apihelpers.pxi":446 + /* "src/lxml/apihelpers.pxi":445 * if c_node.type == tree.XML_ELEMENT_NODE: * c_ns = c_node.nsDef * while c_ns is not NULL: # <<<<<<<<<<<<<< * if c_ns.href is not NULL and tree.xmlStrcmp(c_href, c_ns.href) == 0: * if c_ns.prefix is NULL and is_attribute: */ - __Pyx_TraceLine(446,0,__PYX_ERR(5, 446, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_ns != NULL) != 0); if (!__pyx_t_1) break; - /* "src/lxml/apihelpers.pxi":447 + /* "src/lxml/apihelpers.pxi":446 * c_ns = c_node.nsDef * while c_ns is not NULL: * if c_ns.href is not NULL and tree.xmlStrcmp(c_href, c_ns.href) == 0: # <<<<<<<<<<<<<< * if c_ns.prefix is NULL and is_attribute: * # for attributes, continue searching a named */ - __Pyx_TraceLine(447,0,__PYX_ERR(5, 447, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_ns->href != NULL) != 0); if (__pyx_t_2) { } else { @@ -24131,14 +23114,13 @@ static xmlNs *__pyx_f_4lxml_5etree__searchNsByHref(xmlNode *__pyx_v_c_node, cons __pyx_L19_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":448 + /* "src/lxml/apihelpers.pxi":447 * while c_ns is not NULL: * if c_ns.href is not NULL and tree.xmlStrcmp(c_href, c_ns.href) == 0: * if c_ns.prefix is NULL and is_attribute: # <<<<<<<<<<<<<< * # for attributes, continue searching a named * # prefix, but keep the first default namespace */ - __Pyx_TraceLine(448,0,__PYX_ERR(5, 448, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_ns->prefix == NULL) != 0); if (__pyx_t_2) { } else { @@ -24150,28 +23132,26 @@ static xmlNs *__pyx_f_4lxml_5etree__searchNsByHref(xmlNode *__pyx_v_c_node, cons __pyx_L22_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":452 + /* "src/lxml/apihelpers.pxi":451 * # prefix, but keep the first default namespace * # declaration that we found * if c_default_ns is NULL: # <<<<<<<<<<<<<< * c_default_ns = c_ns * elif tree.xmlSearchNs( */ - __Pyx_TraceLine(452,0,__PYX_ERR(5, 452, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_default_ns == NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":453 + /* "src/lxml/apihelpers.pxi":452 * # declaration that we found * if c_default_ns is NULL: * c_default_ns = c_ns # <<<<<<<<<<<<<< * elif tree.xmlSearchNs( * c_element.doc, c_element, c_ns.prefix) is c_ns: */ - __Pyx_TraceLine(453,0,__PYX_ERR(5, 453, __pyx_L1_error)) __pyx_v_c_default_ns = __pyx_v_c_ns; - /* "src/lxml/apihelpers.pxi":452 + /* "src/lxml/apihelpers.pxi":451 * # prefix, but keep the first default namespace * # declaration that we found * if c_default_ns is NULL: # <<<<<<<<<<<<<< @@ -24180,7 +23160,7 @@ static xmlNs *__pyx_f_4lxml_5etree__searchNsByHref(xmlNode *__pyx_v_c_node, cons */ } - /* "src/lxml/apihelpers.pxi":448 + /* "src/lxml/apihelpers.pxi":447 * while c_ns is not NULL: * if c_ns.href is not NULL and tree.xmlStrcmp(c_href, c_ns.href) == 0: * if c_ns.prefix is NULL and is_attribute: # <<<<<<<<<<<<<< @@ -24190,38 +23170,35 @@ static xmlNs *__pyx_f_4lxml_5etree__searchNsByHref(xmlNode *__pyx_v_c_node, cons goto __pyx_L21; } - /* "src/lxml/apihelpers.pxi":455 + /* "src/lxml/apihelpers.pxi":454 * c_default_ns = c_ns * elif tree.xmlSearchNs( * c_element.doc, c_element, c_ns.prefix) is c_ns: # <<<<<<<<<<<<<< * # start node is in namespace scope => found! * return c_ns */ - __Pyx_TraceLine(455,0,__PYX_ERR(5, 455, __pyx_L1_error)) __pyx_t_1 = ((xmlSearchNs(__pyx_v_c_element->doc, __pyx_v_c_element, __pyx_v_c_ns->prefix) == __pyx_v_c_ns) != 0); - /* "src/lxml/apihelpers.pxi":454 + /* "src/lxml/apihelpers.pxi":453 * if c_default_ns is NULL: * c_default_ns = c_ns * elif tree.xmlSearchNs( # <<<<<<<<<<<<<< * c_element.doc, c_element, c_ns.prefix) is c_ns: * # start node is in namespace scope => found! */ - __Pyx_TraceLine(454,0,__PYX_ERR(5, 454, __pyx_L1_error)) if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":457 + /* "src/lxml/apihelpers.pxi":456 * c_element.doc, c_element, c_ns.prefix) is c_ns: * # start node is in namespace scope => found! * return c_ns # <<<<<<<<<<<<<< * c_ns = c_ns.next * if c_node is not c_element and c_node.ns is not NULL: */ - __Pyx_TraceLine(457,0,__PYX_ERR(5, 457, __pyx_L1_error)) __pyx_r = __pyx_v_c_ns; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":454 + /* "src/lxml/apihelpers.pxi":453 * if c_default_ns is NULL: * c_default_ns = c_ns * elif tree.xmlSearchNs( # <<<<<<<<<<<<<< @@ -24231,7 +23208,7 @@ static xmlNs *__pyx_f_4lxml_5etree__searchNsByHref(xmlNode *__pyx_v_c_node, cons } __pyx_L21:; - /* "src/lxml/apihelpers.pxi":447 + /* "src/lxml/apihelpers.pxi":446 * c_ns = c_node.nsDef * while c_ns is not NULL: * if c_ns.href is not NULL and tree.xmlStrcmp(c_href, c_ns.href) == 0: # <<<<<<<<<<<<<< @@ -24240,26 +23217,24 @@ static xmlNs *__pyx_f_4lxml_5etree__searchNsByHref(xmlNode *__pyx_v_c_node, cons */ } - /* "src/lxml/apihelpers.pxi":458 + /* "src/lxml/apihelpers.pxi":457 * # start node is in namespace scope => found! * return c_ns * c_ns = c_ns.next # <<<<<<<<<<<<<< * if c_node is not c_element and c_node.ns is not NULL: * # optimise: the node may have the namespace itself */ - __Pyx_TraceLine(458,0,__PYX_ERR(5, 458, __pyx_L1_error)) __pyx_t_4 = __pyx_v_c_ns->next; __pyx_v_c_ns = __pyx_t_4; } - /* "src/lxml/apihelpers.pxi":459 + /* "src/lxml/apihelpers.pxi":458 * return c_ns * c_ns = c_ns.next * if c_node is not c_element and c_node.ns is not NULL: # <<<<<<<<<<<<<< * # optimise: the node may have the namespace itself * c_ns = c_node.ns */ - __Pyx_TraceLine(459,0,__PYX_ERR(5, 459, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node != __pyx_v_c_element) != 0); if (__pyx_t_2) { } else { @@ -24271,25 +23246,23 @@ static xmlNs *__pyx_f_4lxml_5etree__searchNsByHref(xmlNode *__pyx_v_c_node, cons __pyx_L26_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":461 + /* "src/lxml/apihelpers.pxi":460 * if c_node is not c_element and c_node.ns is not NULL: * # optimise: the node may have the namespace itself * c_ns = c_node.ns # <<<<<<<<<<<<<< * if c_ns.href is not NULL and tree.xmlStrcmp(c_href, c_ns.href) == 0: * if c_ns.prefix is NULL and is_attribute: */ - __Pyx_TraceLine(461,0,__PYX_ERR(5, 461, __pyx_L1_error)) __pyx_t_4 = __pyx_v_c_node->ns; __pyx_v_c_ns = __pyx_t_4; - /* "src/lxml/apihelpers.pxi":462 + /* "src/lxml/apihelpers.pxi":461 * # optimise: the node may have the namespace itself * c_ns = c_node.ns * if c_ns.href is not NULL and tree.xmlStrcmp(c_href, c_ns.href) == 0: # <<<<<<<<<<<<<< * if c_ns.prefix is NULL and is_attribute: * # for attributes, continue searching a named */ - __Pyx_TraceLine(462,0,__PYX_ERR(5, 462, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_ns->href != NULL) != 0); if (__pyx_t_2) { } else { @@ -24301,14 +23274,13 @@ static xmlNs *__pyx_f_4lxml_5etree__searchNsByHref(xmlNode *__pyx_v_c_node, cons __pyx_L29_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":463 + /* "src/lxml/apihelpers.pxi":462 * c_ns = c_node.ns * if c_ns.href is not NULL and tree.xmlStrcmp(c_href, c_ns.href) == 0: * if c_ns.prefix is NULL and is_attribute: # <<<<<<<<<<<<<< * # for attributes, continue searching a named * # prefix, but keep the first default namespace */ - __Pyx_TraceLine(463,0,__PYX_ERR(5, 463, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_ns->prefix == NULL) != 0); if (__pyx_t_2) { } else { @@ -24320,28 +23292,26 @@ static xmlNs *__pyx_f_4lxml_5etree__searchNsByHref(xmlNode *__pyx_v_c_node, cons __pyx_L32_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":467 + /* "src/lxml/apihelpers.pxi":466 * # prefix, but keep the first default namespace * # declaration that we found * if c_default_ns is NULL: # <<<<<<<<<<<<<< * c_default_ns = c_ns * elif tree.xmlSearchNs( */ - __Pyx_TraceLine(467,0,__PYX_ERR(5, 467, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_default_ns == NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":468 + /* "src/lxml/apihelpers.pxi":467 * # declaration that we found * if c_default_ns is NULL: * c_default_ns = c_ns # <<<<<<<<<<<<<< * elif tree.xmlSearchNs( * c_element.doc, c_element, c_ns.prefix) is c_ns: */ - __Pyx_TraceLine(468,0,__PYX_ERR(5, 468, __pyx_L1_error)) __pyx_v_c_default_ns = __pyx_v_c_ns; - /* "src/lxml/apihelpers.pxi":467 + /* "src/lxml/apihelpers.pxi":466 * # prefix, but keep the first default namespace * # declaration that we found * if c_default_ns is NULL: # <<<<<<<<<<<<<< @@ -24350,7 +23320,7 @@ static xmlNs *__pyx_f_4lxml_5etree__searchNsByHref(xmlNode *__pyx_v_c_node, cons */ } - /* "src/lxml/apihelpers.pxi":463 + /* "src/lxml/apihelpers.pxi":462 * c_ns = c_node.ns * if c_ns.href is not NULL and tree.xmlStrcmp(c_href, c_ns.href) == 0: * if c_ns.prefix is NULL and is_attribute: # <<<<<<<<<<<<<< @@ -24360,38 +23330,35 @@ static xmlNs *__pyx_f_4lxml_5etree__searchNsByHref(xmlNode *__pyx_v_c_node, cons goto __pyx_L31; } - /* "src/lxml/apihelpers.pxi":470 + /* "src/lxml/apihelpers.pxi":469 * c_default_ns = c_ns * elif tree.xmlSearchNs( * c_element.doc, c_element, c_ns.prefix) is c_ns: # <<<<<<<<<<<<<< * # start node is in namespace scope => found! * return c_ns */ - __Pyx_TraceLine(470,0,__PYX_ERR(5, 470, __pyx_L1_error)) __pyx_t_1 = ((xmlSearchNs(__pyx_v_c_element->doc, __pyx_v_c_element, __pyx_v_c_ns->prefix) == __pyx_v_c_ns) != 0); - /* "src/lxml/apihelpers.pxi":469 + /* "src/lxml/apihelpers.pxi":468 * if c_default_ns is NULL: * c_default_ns = c_ns * elif tree.xmlSearchNs( # <<<<<<<<<<<<<< * c_element.doc, c_element, c_ns.prefix) is c_ns: * # start node is in namespace scope => found! */ - __Pyx_TraceLine(469,0,__PYX_ERR(5, 469, __pyx_L1_error)) if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":472 + /* "src/lxml/apihelpers.pxi":471 * c_element.doc, c_element, c_ns.prefix) is c_ns: * # start node is in namespace scope => found! * return c_ns # <<<<<<<<<<<<<< * c_node = c_node.parent * # nothing found => use a matching default namespace or fail */ - __Pyx_TraceLine(472,0,__PYX_ERR(5, 472, __pyx_L1_error)) __pyx_r = __pyx_v_c_ns; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":469 + /* "src/lxml/apihelpers.pxi":468 * if c_default_ns is NULL: * c_default_ns = c_ns * elif tree.xmlSearchNs( # <<<<<<<<<<<<<< @@ -24401,7 +23368,7 @@ static xmlNs *__pyx_f_4lxml_5etree__searchNsByHref(xmlNode *__pyx_v_c_node, cons } __pyx_L31:; - /* "src/lxml/apihelpers.pxi":462 + /* "src/lxml/apihelpers.pxi":461 * # optimise: the node may have the namespace itself * c_ns = c_node.ns * if c_ns.href is not NULL and tree.xmlStrcmp(c_href, c_ns.href) == 0: # <<<<<<<<<<<<<< @@ -24410,7 +23377,7 @@ static xmlNs *__pyx_f_4lxml_5etree__searchNsByHref(xmlNode *__pyx_v_c_node, cons */ } - /* "src/lxml/apihelpers.pxi":459 + /* "src/lxml/apihelpers.pxi":458 * return c_ns * c_ns = c_ns.next * if c_node is not c_element and c_node.ns is not NULL: # <<<<<<<<<<<<<< @@ -24419,7 +23386,7 @@ static xmlNs *__pyx_f_4lxml_5etree__searchNsByHref(xmlNode *__pyx_v_c_node, cons */ } - /* "src/lxml/apihelpers.pxi":444 + /* "src/lxml/apihelpers.pxi":443 * c_element = c_node * while c_node is not NULL: * if c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< @@ -24428,52 +23395,48 @@ static xmlNs *__pyx_f_4lxml_5etree__searchNsByHref(xmlNode *__pyx_v_c_node, cons */ } - /* "src/lxml/apihelpers.pxi":473 + /* "src/lxml/apihelpers.pxi":472 * # start node is in namespace scope => found! * return c_ns * c_node = c_node.parent # <<<<<<<<<<<<<< * # nothing found => use a matching default namespace or fail * if c_default_ns is not NULL: */ - __Pyx_TraceLine(473,0,__PYX_ERR(5, 473, __pyx_L1_error)) __pyx_t_3 = __pyx_v_c_node->parent; __pyx_v_c_node = __pyx_t_3; } - /* "src/lxml/apihelpers.pxi":475 + /* "src/lxml/apihelpers.pxi":474 * c_node = c_node.parent * # nothing found => use a matching default namespace or fail * if c_default_ns is not NULL: # <<<<<<<<<<<<<< * if tree.xmlSearchNs(c_element.doc, c_element, NULL) is c_default_ns: * return c_default_ns */ - __Pyx_TraceLine(475,0,__PYX_ERR(5, 475, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_default_ns != NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":476 + /* "src/lxml/apihelpers.pxi":475 * # nothing found => use a matching default namespace or fail * if c_default_ns is not NULL: * if tree.xmlSearchNs(c_element.doc, c_element, NULL) is c_default_ns: # <<<<<<<<<<<<<< * return c_default_ns * return NULL */ - __Pyx_TraceLine(476,0,__PYX_ERR(5, 476, __pyx_L1_error)) __pyx_t_1 = ((xmlSearchNs(__pyx_v_c_element->doc, __pyx_v_c_element, NULL) == __pyx_v_c_default_ns) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":477 + /* "src/lxml/apihelpers.pxi":476 * if c_default_ns is not NULL: * if tree.xmlSearchNs(c_element.doc, c_element, NULL) is c_default_ns: * return c_default_ns # <<<<<<<<<<<<<< * return NULL * */ - __Pyx_TraceLine(477,0,__PYX_ERR(5, 477, __pyx_L1_error)) __pyx_r = __pyx_v_c_default_ns; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":476 + /* "src/lxml/apihelpers.pxi":475 * # nothing found => use a matching default namespace or fail * if c_default_ns is not NULL: * if tree.xmlSearchNs(c_element.doc, c_element, NULL) is c_default_ns: # <<<<<<<<<<<<<< @@ -24482,7 +23445,7 @@ static xmlNs *__pyx_f_4lxml_5etree__searchNsByHref(xmlNode *__pyx_v_c_node, cons */ } - /* "src/lxml/apihelpers.pxi":475 + /* "src/lxml/apihelpers.pxi":474 * c_node = c_node.parent * # nothing found => use a matching default namespace or fail * if c_default_ns is not NULL: # <<<<<<<<<<<<<< @@ -24491,18 +23454,17 @@ static xmlNs *__pyx_f_4lxml_5etree__searchNsByHref(xmlNode *__pyx_v_c_node, cons */ } - /* "src/lxml/apihelpers.pxi":478 + /* "src/lxml/apihelpers.pxi":477 * if tree.xmlSearchNs(c_element.doc, c_element, NULL) is c_default_ns: * return c_default_ns * return NULL # <<<<<<<<<<<<<< * * cdef int _replaceNodeByChildren(_Document doc, xmlNode* c_node) except -1: */ - __Pyx_TraceLine(478,0,__PYX_ERR(5, 478, __pyx_L1_error)) __pyx_r = NULL; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":422 + /* "src/lxml/apihelpers.pxi":421 * return 0 * * cdef xmlNs* _searchNsByHref(xmlNode* c_node, const_xmlChar* c_href, bint is_attribute): # <<<<<<<<<<<<<< @@ -24511,16 +23473,12 @@ static xmlNs *__pyx_f_4lxml_5etree__searchNsByHref(xmlNode *__pyx_v_c_node, cons */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._searchNsByHref", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":480 +/* "src/lxml/apihelpers.pxi":479 * return NULL * * cdef int _replaceNodeByChildren(_Document doc, xmlNode* c_node) except -1: # <<<<<<<<<<<<<< @@ -24532,47 +23490,42 @@ static int __pyx_f_4lxml_5etree__replaceNodeByChildren(struct LxmlDocument *__py xmlNode *__pyx_v_c_parent; xmlNode *__pyx_v_c_child; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlNode *__pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("_replaceNodeByChildren", 0); - __Pyx_TraceCall("_replaceNodeByChildren", __pyx_f[5], 480, 0, __PYX_ERR(5, 480, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":484 + /* "src/lxml/apihelpers.pxi":483 * cdef xmlNode* c_parent * cdef xmlNode* c_child * if c_node.children is NULL: # <<<<<<<<<<<<<< * tree.xmlUnlinkNode(c_node) * return 0 */ - __Pyx_TraceLine(484,0,__PYX_ERR(5, 484, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node->children == NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":485 + /* "src/lxml/apihelpers.pxi":484 * cdef xmlNode* c_child * if c_node.children is NULL: * tree.xmlUnlinkNode(c_node) # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(485,0,__PYX_ERR(5, 485, __pyx_L1_error)) xmlUnlinkNode(__pyx_v_c_node); - /* "src/lxml/apihelpers.pxi":486 + /* "src/lxml/apihelpers.pxi":485 * if c_node.children is NULL: * tree.xmlUnlinkNode(c_node) * return 0 # <<<<<<<<<<<<<< * * c_parent = c_node.parent */ - __Pyx_TraceLine(486,0,__PYX_ERR(5, 486, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":484 + /* "src/lxml/apihelpers.pxi":483 * cdef xmlNode* c_parent * cdef xmlNode* c_child * if c_node.children is NULL: # <<<<<<<<<<<<<< @@ -24581,119 +23534,109 @@ static int __pyx_f_4lxml_5etree__replaceNodeByChildren(struct LxmlDocument *__py */ } - /* "src/lxml/apihelpers.pxi":488 + /* "src/lxml/apihelpers.pxi":487 * return 0 * * c_parent = c_node.parent # <<<<<<<<<<<<<< * # fix parent links of children * c_child = c_node.children */ - __Pyx_TraceLine(488,0,__PYX_ERR(5, 488, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->parent; __pyx_v_c_parent = __pyx_t_2; - /* "src/lxml/apihelpers.pxi":490 + /* "src/lxml/apihelpers.pxi":489 * c_parent = c_node.parent * # fix parent links of children * c_child = c_node.children # <<<<<<<<<<<<<< * while c_child is not NULL: * c_child.parent = c_parent */ - __Pyx_TraceLine(490,0,__PYX_ERR(5, 490, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->children; __pyx_v_c_child = __pyx_t_2; - /* "src/lxml/apihelpers.pxi":491 + /* "src/lxml/apihelpers.pxi":490 * # fix parent links of children * c_child = c_node.children * while c_child is not NULL: # <<<<<<<<<<<<<< * c_child.parent = c_parent * c_child = c_child.next */ - __Pyx_TraceLine(491,0,__PYX_ERR(5, 491, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_child != NULL) != 0); if (!__pyx_t_1) break; - /* "src/lxml/apihelpers.pxi":492 + /* "src/lxml/apihelpers.pxi":491 * c_child = c_node.children * while c_child is not NULL: * c_child.parent = c_parent # <<<<<<<<<<<<<< * c_child = c_child.next * */ - __Pyx_TraceLine(492,0,__PYX_ERR(5, 492, __pyx_L1_error)) __pyx_v_c_child->parent = __pyx_v_c_parent; - /* "src/lxml/apihelpers.pxi":493 + /* "src/lxml/apihelpers.pxi":492 * while c_child is not NULL: * c_child.parent = c_parent * c_child = c_child.next # <<<<<<<<<<<<<< * * # fix namespace references of children if their parent's namespace */ - __Pyx_TraceLine(493,0,__PYX_ERR(5, 493, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_child->next; __pyx_v_c_child = __pyx_t_2; } - /* "src/lxml/apihelpers.pxi":497 + /* "src/lxml/apihelpers.pxi":496 * # fix namespace references of children if their parent's namespace * # declarations get lost * if c_node.nsDef is not NULL: # <<<<<<<<<<<<<< * c_child = c_node.children * while c_child is not NULL: */ - __Pyx_TraceLine(497,0,__PYX_ERR(5, 497, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node->nsDef != NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":498 + /* "src/lxml/apihelpers.pxi":497 * # declarations get lost * if c_node.nsDef is not NULL: * c_child = c_node.children # <<<<<<<<<<<<<< * while c_child is not NULL: * moveNodeToDocument(doc, doc._c_doc, c_child) */ - __Pyx_TraceLine(498,0,__PYX_ERR(5, 498, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->children; __pyx_v_c_child = __pyx_t_2; - /* "src/lxml/apihelpers.pxi":499 + /* "src/lxml/apihelpers.pxi":498 * if c_node.nsDef is not NULL: * c_child = c_node.children * while c_child is not NULL: # <<<<<<<<<<<<<< * moveNodeToDocument(doc, doc._c_doc, c_child) * c_child = c_child.next */ - __Pyx_TraceLine(499,0,__PYX_ERR(5, 499, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_child != NULL) != 0); if (!__pyx_t_1) break; - /* "src/lxml/apihelpers.pxi":500 + /* "src/lxml/apihelpers.pxi":499 * c_child = c_node.children * while c_child is not NULL: * moveNodeToDocument(doc, doc._c_doc, c_child) # <<<<<<<<<<<<<< * c_child = c_child.next * */ - __Pyx_TraceLine(500,0,__PYX_ERR(5, 500, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree_moveNodeToDocument(__pyx_v_doc, __pyx_v_doc->_c_doc, __pyx_v_c_child); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(5, 500, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_moveNodeToDocument(__pyx_v_doc, __pyx_v_doc->_c_doc, __pyx_v_c_child); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(5, 499, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":501 + /* "src/lxml/apihelpers.pxi":500 * while c_child is not NULL: * moveNodeToDocument(doc, doc._c_doc, c_child) * c_child = c_child.next # <<<<<<<<<<<<<< * * # fix sibling links to/from child slice */ - __Pyx_TraceLine(501,0,__PYX_ERR(5, 501, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_child->next; __pyx_v_c_child = __pyx_t_2; } - /* "src/lxml/apihelpers.pxi":497 + /* "src/lxml/apihelpers.pxi":496 * # fix namespace references of children if their parent's namespace * # declarations get lost * if c_node.nsDef is not NULL: # <<<<<<<<<<<<<< @@ -24702,29 +23645,27 @@ static int __pyx_f_4lxml_5etree__replaceNodeByChildren(struct LxmlDocument *__py */ } - /* "src/lxml/apihelpers.pxi":504 + /* "src/lxml/apihelpers.pxi":503 * * # fix sibling links to/from child slice * if c_node.prev is NULL: # <<<<<<<<<<<<<< * c_parent.children = c_node.children * else: */ - __Pyx_TraceLine(504,0,__PYX_ERR(5, 504, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node->prev == NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":505 + /* "src/lxml/apihelpers.pxi":504 * # fix sibling links to/from child slice * if c_node.prev is NULL: * c_parent.children = c_node.children # <<<<<<<<<<<<<< * else: * c_node.prev.next = c_node.children */ - __Pyx_TraceLine(505,0,__PYX_ERR(5, 505, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->children; __pyx_v_c_parent->children = __pyx_t_2; - /* "src/lxml/apihelpers.pxi":504 + /* "src/lxml/apihelpers.pxi":503 * * # fix sibling links to/from child slice * if c_node.prev is NULL: # <<<<<<<<<<<<<< @@ -24734,54 +23675,50 @@ static int __pyx_f_4lxml_5etree__replaceNodeByChildren(struct LxmlDocument *__py goto __pyx_L9; } - /* "src/lxml/apihelpers.pxi":507 + /* "src/lxml/apihelpers.pxi":506 * c_parent.children = c_node.children * else: * c_node.prev.next = c_node.children # <<<<<<<<<<<<<< * c_node.children.prev = c_node.prev * if c_node.next is NULL: */ - __Pyx_TraceLine(507,0,__PYX_ERR(5, 507, __pyx_L1_error)) /*else*/ { __pyx_t_2 = __pyx_v_c_node->children; __pyx_v_c_node->prev->next = __pyx_t_2; - /* "src/lxml/apihelpers.pxi":508 + /* "src/lxml/apihelpers.pxi":507 * else: * c_node.prev.next = c_node.children * c_node.children.prev = c_node.prev # <<<<<<<<<<<<<< * if c_node.next is NULL: * c_parent.last = c_node.last */ - __Pyx_TraceLine(508,0,__PYX_ERR(5, 508, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->prev; __pyx_v_c_node->children->prev = __pyx_t_2; } __pyx_L9:; - /* "src/lxml/apihelpers.pxi":509 + /* "src/lxml/apihelpers.pxi":508 * c_node.prev.next = c_node.children * c_node.children.prev = c_node.prev * if c_node.next is NULL: # <<<<<<<<<<<<<< * c_parent.last = c_node.last * else: */ - __Pyx_TraceLine(509,0,__PYX_ERR(5, 509, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node->next == NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":510 + /* "src/lxml/apihelpers.pxi":509 * c_node.children.prev = c_node.prev * if c_node.next is NULL: * c_parent.last = c_node.last # <<<<<<<<<<<<<< * else: * c_node.next.prev = c_node.last */ - __Pyx_TraceLine(510,0,__PYX_ERR(5, 510, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->last; __pyx_v_c_parent->last = __pyx_t_2; - /* "src/lxml/apihelpers.pxi":509 + /* "src/lxml/apihelpers.pxi":508 * c_node.prev.next = c_node.children * c_node.children.prev = c_node.prev * if c_node.next is NULL: # <<<<<<<<<<<<<< @@ -24791,66 +23728,61 @@ static int __pyx_f_4lxml_5etree__replaceNodeByChildren(struct LxmlDocument *__py goto __pyx_L10; } - /* "src/lxml/apihelpers.pxi":512 + /* "src/lxml/apihelpers.pxi":511 * c_parent.last = c_node.last * else: * c_node.next.prev = c_node.last # <<<<<<<<<<<<<< * c_node.last.next = c_node.next * */ - __Pyx_TraceLine(512,0,__PYX_ERR(5, 512, __pyx_L1_error)) /*else*/ { __pyx_t_2 = __pyx_v_c_node->last; __pyx_v_c_node->next->prev = __pyx_t_2; - /* "src/lxml/apihelpers.pxi":513 + /* "src/lxml/apihelpers.pxi":512 * else: * c_node.next.prev = c_node.last * c_node.last.next = c_node.next # <<<<<<<<<<<<<< * * # unlink c_node */ - __Pyx_TraceLine(513,0,__PYX_ERR(5, 513, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->next; __pyx_v_c_node->last->next = __pyx_t_2; } __pyx_L10:; - /* "src/lxml/apihelpers.pxi":516 + /* "src/lxml/apihelpers.pxi":515 * * # unlink c_node * c_node.children = c_node.last = NULL # <<<<<<<<<<<<<< * c_node.parent = c_node.next = c_node.prev = NULL * return 0 */ - __Pyx_TraceLine(516,0,__PYX_ERR(5, 516, __pyx_L1_error)) __pyx_v_c_node->children = NULL; __pyx_v_c_node->last = NULL; - /* "src/lxml/apihelpers.pxi":517 + /* "src/lxml/apihelpers.pxi":516 * # unlink c_node * c_node.children = c_node.last = NULL * c_node.parent = c_node.next = c_node.prev = NULL # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(517,0,__PYX_ERR(5, 517, __pyx_L1_error)) __pyx_v_c_node->parent = NULL; __pyx_v_c_node->next = NULL; __pyx_v_c_node->prev = NULL; - /* "src/lxml/apihelpers.pxi":518 + /* "src/lxml/apihelpers.pxi":517 * c_node.children = c_node.last = NULL * c_node.parent = c_node.next = c_node.prev = NULL * return 0 # <<<<<<<<<<<<<< * * cdef object _attributeValue(xmlNode* c_element, xmlAttr* c_attrib_node): */ - __Pyx_TraceLine(518,0,__PYX_ERR(5, 518, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":480 + /* "src/lxml/apihelpers.pxi":479 * return NULL * * cdef int _replaceNodeByChildren(_Document doc, xmlNode* c_node) except -1: # <<<<<<<<<<<<<< @@ -24863,12 +23795,11 @@ static int __pyx_f_4lxml_5etree__replaceNodeByChildren(struct LxmlDocument *__py __Pyx_AddTraceback("lxml.etree._replaceNodeByChildren", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":520 +/* "src/lxml/apihelpers.pxi":519 * return 0 * * cdef object _attributeValue(xmlNode* c_element, xmlAttr* c_attrib_node): # <<<<<<<<<<<<<< @@ -24881,7 +23812,6 @@ static PyObject *__pyx_f_4lxml_5etree__attributeValue(xmlNode *__pyx_v_c_element xmlChar *__pyx_v_value; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -24894,60 +23824,54 @@ static PyObject *__pyx_f_4lxml_5etree__attributeValue(xmlNode *__pyx_v_c_element PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("_attributeValue", 0); - __Pyx_TraceCall("_attributeValue", __pyx_f[5], 520, 0, __PYX_ERR(5, 520, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":521 + /* "src/lxml/apihelpers.pxi":520 * * cdef object _attributeValue(xmlNode* c_element, xmlAttr* c_attrib_node): * c_href = _getNs(c_attrib_node) # <<<<<<<<<<<<<< * value = tree.xmlGetNsProp(c_element, c_attrib_node.name, c_href) * try: */ - __Pyx_TraceLine(521,0,__PYX_ERR(5, 521, __pyx_L1_error)) __pyx_v_c_href = _getNs(((xmlNode *)__pyx_v_c_attrib_node)); - /* "src/lxml/apihelpers.pxi":522 + /* "src/lxml/apihelpers.pxi":521 * cdef object _attributeValue(xmlNode* c_element, xmlAttr* c_attrib_node): * c_href = _getNs(c_attrib_node) * value = tree.xmlGetNsProp(c_element, c_attrib_node.name, c_href) # <<<<<<<<<<<<<< * try: * result = funicode(value) */ - __Pyx_TraceLine(522,0,__PYX_ERR(5, 522, __pyx_L1_error)) __pyx_v_value = xmlGetNsProp(__pyx_v_c_element, __pyx_v_c_attrib_node->name, __pyx_v_c_href); - /* "src/lxml/apihelpers.pxi":523 + /* "src/lxml/apihelpers.pxi":522 * c_href = _getNs(c_attrib_node) * value = tree.xmlGetNsProp(c_element, c_attrib_node.name, c_href) * try: # <<<<<<<<<<<<<< * result = funicode(value) * finally: */ - __Pyx_TraceLine(523,0,__PYX_ERR(5, 523, __pyx_L4_error)) /*try:*/ { - /* "src/lxml/apihelpers.pxi":524 + /* "src/lxml/apihelpers.pxi":523 * value = tree.xmlGetNsProp(c_element, c_attrib_node.name, c_href) * try: * result = funicode(value) # <<<<<<<<<<<<<< * finally: * tree.xmlFree(value) */ - __Pyx_TraceLine(524,0,__PYX_ERR(5, 524, __pyx_L4_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_funicode(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 524, __pyx_L4_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_funicode(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 523, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = __pyx_t_1; __pyx_t_1 = 0; } - /* "src/lxml/apihelpers.pxi":526 + /* "src/lxml/apihelpers.pxi":525 * result = funicode(value) * finally: * tree.xmlFree(value) # <<<<<<<<<<<<<< * return result * */ - __Pyx_TraceLine(526,0,__PYX_ERR(5, 526, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ xmlFree(__pyx_v_value); @@ -24988,20 +23912,19 @@ static PyObject *__pyx_f_4lxml_5etree__attributeValue(xmlNode *__pyx_v_c_element __pyx_L5:; } - /* "src/lxml/apihelpers.pxi":527 + /* "src/lxml/apihelpers.pxi":526 * finally: * tree.xmlFree(value) * return result # <<<<<<<<<<<<<< * * cdef object _attributeValueFromNsName(xmlNode* c_element, */ - __Pyx_TraceLine(527,0,__PYX_ERR(5, 527, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":520 + /* "src/lxml/apihelpers.pxi":519 * return 0 * * cdef object _attributeValue(xmlNode* c_element, xmlAttr* c_attrib_node): # <<<<<<<<<<<<<< @@ -25017,12 +23940,11 @@ static PyObject *__pyx_f_4lxml_5etree__attributeValue(xmlNode *__pyx_v_c_element __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":529 +/* "src/lxml/apihelpers.pxi":528 * return result * * cdef object _attributeValueFromNsName(xmlNode* c_element, # <<<<<<<<<<<<<< @@ -25034,7 +23956,6 @@ static PyObject *__pyx_f_4lxml_5etree__attributeValueFromNsName(xmlNode *__pyx_v xmlChar *__pyx_v_c_result; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -25048,42 +23969,38 @@ static PyObject *__pyx_f_4lxml_5etree__attributeValueFromNsName(xmlNode *__pyx_v PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; __Pyx_RefNannySetupContext("_attributeValueFromNsName", 0); - __Pyx_TraceCall("_attributeValueFromNsName", __pyx_f[5], 529, 0, __PYX_ERR(5, 529, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":531 + /* "src/lxml/apihelpers.pxi":530 * cdef object _attributeValueFromNsName(xmlNode* c_element, * const_xmlChar* c_href, const_xmlChar* c_name): * c_result = tree.xmlGetNsProp(c_element, c_name, c_href) # <<<<<<<<<<<<<< * if c_result is NULL: * return None */ - __Pyx_TraceLine(531,0,__PYX_ERR(5, 531, __pyx_L1_error)) __pyx_v_c_result = xmlGetNsProp(__pyx_v_c_element, __pyx_v_c_name, __pyx_v_c_href); - /* "src/lxml/apihelpers.pxi":532 + /* "src/lxml/apihelpers.pxi":531 * const_xmlChar* c_href, const_xmlChar* c_name): * c_result = tree.xmlGetNsProp(c_element, c_name, c_href) * if c_result is NULL: # <<<<<<<<<<<<<< * return None * try: */ - __Pyx_TraceLine(532,0,__PYX_ERR(5, 532, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_result == NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":533 + /* "src/lxml/apihelpers.pxi":532 * c_result = tree.xmlGetNsProp(c_element, c_name, c_href) * if c_result is NULL: * return None # <<<<<<<<<<<<<< * try: * result = funicode(c_result) */ - __Pyx_TraceLine(533,0,__PYX_ERR(5, 533, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":532 + /* "src/lxml/apihelpers.pxi":531 * const_xmlChar* c_href, const_xmlChar* c_name): * c_result = tree.xmlGetNsProp(c_element, c_name, c_href) * if c_result is NULL: # <<<<<<<<<<<<<< @@ -25092,38 +24009,35 @@ static PyObject *__pyx_f_4lxml_5etree__attributeValueFromNsName(xmlNode *__pyx_v */ } - /* "src/lxml/apihelpers.pxi":534 + /* "src/lxml/apihelpers.pxi":533 * if c_result is NULL: * return None * try: # <<<<<<<<<<<<<< * result = funicode(c_result) * finally: */ - __Pyx_TraceLine(534,0,__PYX_ERR(5, 534, __pyx_L5_error)) /*try:*/ { - /* "src/lxml/apihelpers.pxi":535 + /* "src/lxml/apihelpers.pxi":534 * return None * try: * result = funicode(c_result) # <<<<<<<<<<<<<< * finally: * tree.xmlFree(c_result) */ - __Pyx_TraceLine(535,0,__PYX_ERR(5, 535, __pyx_L5_error)) - __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 535, __pyx_L5_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 534, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_result = __pyx_t_2; __pyx_t_2 = 0; } - /* "src/lxml/apihelpers.pxi":537 + /* "src/lxml/apihelpers.pxi":536 * result = funicode(c_result) * finally: * tree.xmlFree(c_result) # <<<<<<<<<<<<<< * return result * */ - __Pyx_TraceLine(537,0,__PYX_ERR(5, 537, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ xmlFree(__pyx_v_c_result); @@ -25164,20 +24078,19 @@ static PyObject *__pyx_f_4lxml_5etree__attributeValueFromNsName(xmlNode *__pyx_v __pyx_L6:; } - /* "src/lxml/apihelpers.pxi":538 + /* "src/lxml/apihelpers.pxi":537 * finally: * tree.xmlFree(c_result) * return result # <<<<<<<<<<<<<< * * cdef object _getNodeAttributeValue(xmlNode* c_node, key, default): */ - __Pyx_TraceLine(538,0,__PYX_ERR(5, 538, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":529 + /* "src/lxml/apihelpers.pxi":528 * return result * * cdef object _attributeValueFromNsName(xmlNode* c_element, # <<<<<<<<<<<<<< @@ -25193,12 +24106,11 @@ static PyObject *__pyx_f_4lxml_5etree__attributeValueFromNsName(xmlNode *__pyx_v __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":540 +/* "src/lxml/apihelpers.pxi":539 * return result * * cdef object _getNodeAttributeValue(xmlNode* c_node, key, default): # <<<<<<<<<<<<<< @@ -25213,7 +24125,6 @@ static PyObject *__pyx_f_4lxml_5etree__getNodeAttributeValue(xmlNode *__pyx_v_c_ xmlChar *__pyx_v_c_result; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -25230,17 +24141,15 @@ static PyObject *__pyx_f_4lxml_5etree__getNodeAttributeValue(xmlNode *__pyx_v_c_ PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; __Pyx_RefNannySetupContext("_getNodeAttributeValue", 0); - __Pyx_TraceCall("_getNodeAttributeValue", __pyx_f[5], 540, 0, __PYX_ERR(5, 540, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":541 + /* "src/lxml/apihelpers.pxi":540 * * cdef object _getNodeAttributeValue(xmlNode* c_node, key, default): * ns, tag = _getNsTag(key) # <<<<<<<<<<<<<< * c_href = NULL if ns is None else _xcstr(ns) * c_result = tree.xmlGetNsProp(c_node, _xcstr(tag), c_href) */ - __Pyx_TraceLine(541,0,__PYX_ERR(5, 541, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 541, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(__pyx_t_1 != Py_None)) { PyObject* sequence = __pyx_t_1; @@ -25248,7 +24157,7 @@ static PyObject *__pyx_f_4lxml_5etree__getNodeAttributeValue(xmlNode *__pyx_v_c_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(5, 541, __pyx_L1_error) + __PYX_ERR(5, 540, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); @@ -25256,28 +24165,27 @@ static PyObject *__pyx_f_4lxml_5etree__getNodeAttributeValue(xmlNode *__pyx_v_c_ __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 541, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 541, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(5, 541, __pyx_L1_error) + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(5, 540, __pyx_L1_error) } __pyx_v_ns = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_tag = __pyx_t_3; __pyx_t_3 = 0; - /* "src/lxml/apihelpers.pxi":542 + /* "src/lxml/apihelpers.pxi":541 * cdef object _getNodeAttributeValue(xmlNode* c_node, key, default): * ns, tag = _getNsTag(key) * c_href = NULL if ns is None else _xcstr(ns) # <<<<<<<<<<<<<< * c_result = tree.xmlGetNsProp(c_node, _xcstr(tag), c_href) * if c_result is NULL: */ - __Pyx_TraceLine(542,0,__PYX_ERR(5, 542, __pyx_L1_error)) __pyx_t_5 = (__pyx_v_ns == Py_None); if ((__pyx_t_5 != 0)) { __pyx_t_4 = ((const xmlChar *)NULL); @@ -25286,41 +24194,38 @@ static PyObject *__pyx_f_4lxml_5etree__getNodeAttributeValue(xmlNode *__pyx_v_c_ } __pyx_v_c_href = __pyx_t_4; - /* "src/lxml/apihelpers.pxi":543 + /* "src/lxml/apihelpers.pxi":542 * ns, tag = _getNsTag(key) * c_href = NULL if ns is None else _xcstr(ns) * c_result = tree.xmlGetNsProp(c_node, _xcstr(tag), c_href) # <<<<<<<<<<<<<< * if c_result is NULL: * # XXX free namespace that is not in use..? */ - __Pyx_TraceLine(543,0,__PYX_ERR(5, 543, __pyx_L1_error)) __pyx_v_c_result = xmlGetNsProp(__pyx_v_c_node, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_tag), __pyx_v_c_href); - /* "src/lxml/apihelpers.pxi":544 + /* "src/lxml/apihelpers.pxi":543 * c_href = NULL if ns is None else _xcstr(ns) * c_result = tree.xmlGetNsProp(c_node, _xcstr(tag), c_href) * if c_result is NULL: # <<<<<<<<<<<<<< * # XXX free namespace that is not in use..? * return default */ - __Pyx_TraceLine(544,0,__PYX_ERR(5, 544, __pyx_L1_error)) __pyx_t_5 = ((__pyx_v_c_result == NULL) != 0); if (__pyx_t_5) { - /* "src/lxml/apihelpers.pxi":546 + /* "src/lxml/apihelpers.pxi":545 * if c_result is NULL: * # XXX free namespace that is not in use..? * return default # <<<<<<<<<<<<<< * try: * result = funicode(c_result) */ - __Pyx_TraceLine(546,0,__PYX_ERR(5, 546, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_default); __pyx_r = __pyx_v_default; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":544 + /* "src/lxml/apihelpers.pxi":543 * c_href = NULL if ns is None else _xcstr(ns) * c_result = tree.xmlGetNsProp(c_node, _xcstr(tag), c_href) * if c_result is NULL: # <<<<<<<<<<<<<< @@ -25329,38 +24234,35 @@ static PyObject *__pyx_f_4lxml_5etree__getNodeAttributeValue(xmlNode *__pyx_v_c_ */ } - /* "src/lxml/apihelpers.pxi":547 + /* "src/lxml/apihelpers.pxi":546 * # XXX free namespace that is not in use..? * return default * try: # <<<<<<<<<<<<<< * result = funicode(c_result) * finally: */ - __Pyx_TraceLine(547,0,__PYX_ERR(5, 547, __pyx_L5_error)) /*try:*/ { - /* "src/lxml/apihelpers.pxi":548 + /* "src/lxml/apihelpers.pxi":547 * return default * try: * result = funicode(c_result) # <<<<<<<<<<<<<< * finally: * tree.xmlFree(c_result) */ - __Pyx_TraceLine(548,0,__PYX_ERR(5, 548, __pyx_L5_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 548, __pyx_L5_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 547, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = __pyx_t_1; __pyx_t_1 = 0; } - /* "src/lxml/apihelpers.pxi":550 + /* "src/lxml/apihelpers.pxi":549 * result = funicode(c_result) * finally: * tree.xmlFree(c_result) # <<<<<<<<<<<<<< * return result * */ - __Pyx_TraceLine(550,0,__PYX_ERR(5, 550, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ xmlFree(__pyx_v_c_result); @@ -25403,20 +24305,19 @@ static PyObject *__pyx_f_4lxml_5etree__getNodeAttributeValue(xmlNode *__pyx_v_c_ __pyx_L6:; } - /* "src/lxml/apihelpers.pxi":551 + /* "src/lxml/apihelpers.pxi":550 * finally: * tree.xmlFree(c_result) * return result # <<<<<<<<<<<<<< * * cdef inline object _getAttributeValue(_Element element, key, default): */ - __Pyx_TraceLine(551,0,__PYX_ERR(5, 551, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":540 + /* "src/lxml/apihelpers.pxi":539 * return result * * cdef object _getNodeAttributeValue(xmlNode* c_node, key, default): # <<<<<<<<<<<<<< @@ -25436,12 +24337,11 @@ static PyObject *__pyx_f_4lxml_5etree__getNodeAttributeValue(xmlNode *__pyx_v_c_ __Pyx_XDECREF(__pyx_v_tag); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":553 +/* "src/lxml/apihelpers.pxi":552 * return result * * cdef inline object _getAttributeValue(_Element element, key, default): # <<<<<<<<<<<<<< @@ -25451,28 +24351,25 @@ static PyObject *__pyx_f_4lxml_5etree__getNodeAttributeValue(xmlNode *__pyx_v_c_ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree__getAttributeValue(struct LxmlElement *__pyx_v_element, PyObject *__pyx_v_key, PyObject *__pyx_v_default) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_getAttributeValue", 0); - __Pyx_TraceCall("_getAttributeValue", __pyx_f[5], 553, 0, __PYX_ERR(5, 553, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":554 + /* "src/lxml/apihelpers.pxi":553 * * cdef inline object _getAttributeValue(_Element element, key, default): * return _getNodeAttributeValue(element._c_node, key, default) # <<<<<<<<<<<<<< * * cdef int _setAttributeValue(_Element element, key, value) except -1: */ - __Pyx_TraceLine(554,0,__PYX_ERR(5, 554, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree__getNodeAttributeValue(__pyx_v_element->_c_node, __pyx_v_key, __pyx_v_default); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 554, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__getNodeAttributeValue(__pyx_v_element->_c_node, __pyx_v_key, __pyx_v_default); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":553 + /* "src/lxml/apihelpers.pxi":552 * return result * * cdef inline object _getAttributeValue(_Element element, key, default): # <<<<<<<<<<<<<< @@ -25487,12 +24384,11 @@ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree__getAttributeValue(struct Lx __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":556 +/* "src/lxml/apihelpers.pxi":555 * return _getNodeAttributeValue(element._c_node, key, default) * * cdef int _setAttributeValue(_Element element, key, value) except -1: # <<<<<<<<<<<<<< @@ -25508,7 +24404,6 @@ static int __pyx_f_4lxml_5etree__setAttributeValue(struct LxmlElement *__pyx_v_e int __pyx_v_is_html; const xmlChar *__pyx_v_c_tag; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -25519,18 +24414,16 @@ static int __pyx_f_4lxml_5etree__setAttributeValue(struct LxmlElement *__pyx_v_e int __pyx_t_7; xmlNs *__pyx_t_8; __Pyx_RefNannySetupContext("_setAttributeValue", 0); - __Pyx_TraceCall("_setAttributeValue", __pyx_f[5], 556, 0, __PYX_ERR(5, 556, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_value); - /* "src/lxml/apihelpers.pxi":559 + /* "src/lxml/apihelpers.pxi":558 * cdef const_xmlChar* c_value * cdef xmlNs* c_ns * ns, tag = _getNsTag(key) # <<<<<<<<<<<<<< * is_html = element._doc._parser._for_html * if not is_html: */ - __Pyx_TraceLine(559,0,__PYX_ERR(5, 559, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 559, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(__pyx_t_1 != Py_None)) { PyObject* sequence = __pyx_t_1; @@ -25538,7 +24431,7 @@ static int __pyx_f_4lxml_5etree__setAttributeValue(struct LxmlElement *__pyx_v_e if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(5, 559, __pyx_L1_error) + __PYX_ERR(5, 558, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); @@ -25546,53 +24439,50 @@ static int __pyx_f_4lxml_5etree__setAttributeValue(struct LxmlElement *__pyx_v_e __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 559, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 559, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(5, 559, __pyx_L1_error) + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(5, 558, __pyx_L1_error) } __pyx_v_ns = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_tag = __pyx_t_3; __pyx_t_3 = 0; - /* "src/lxml/apihelpers.pxi":560 + /* "src/lxml/apihelpers.pxi":559 * cdef xmlNs* c_ns * ns, tag = _getNsTag(key) * is_html = element._doc._parser._for_html # <<<<<<<<<<<<<< * if not is_html: * _attributeValidOrRaise(tag) */ - __Pyx_TraceLine(560,0,__PYX_ERR(5, 560, __pyx_L1_error)) __pyx_t_4 = __pyx_v_element->_doc->_parser->_for_html; __pyx_v_is_html = __pyx_t_4; - /* "src/lxml/apihelpers.pxi":561 + /* "src/lxml/apihelpers.pxi":560 * ns, tag = _getNsTag(key) * is_html = element._doc._parser._for_html * if not is_html: # <<<<<<<<<<<<<< * _attributeValidOrRaise(tag) * c_tag = _xcstr(tag) */ - __Pyx_TraceLine(561,0,__PYX_ERR(5, 561, __pyx_L1_error)) __pyx_t_4 = ((!(__pyx_v_is_html != 0)) != 0); if (__pyx_t_4) { - /* "src/lxml/apihelpers.pxi":562 + /* "src/lxml/apihelpers.pxi":561 * is_html = element._doc._parser._for_html * if not is_html: * _attributeValidOrRaise(tag) # <<<<<<<<<<<<<< * c_tag = _xcstr(tag) * if value is None and is_html: */ - __Pyx_TraceLine(562,0,__PYX_ERR(5, 562, __pyx_L1_error)) - __pyx_t_5 = __pyx_f_4lxml_5etree__attributeValidOrRaise(__pyx_v_tag); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(5, 562, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree__attributeValidOrRaise(__pyx_v_tag); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(5, 561, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":561 + /* "src/lxml/apihelpers.pxi":560 * ns, tag = _getNsTag(key) * is_html = element._doc._parser._for_html * if not is_html: # <<<<<<<<<<<<<< @@ -25601,24 +24491,22 @@ static int __pyx_f_4lxml_5etree__setAttributeValue(struct LxmlElement *__pyx_v_e */ } - /* "src/lxml/apihelpers.pxi":563 + /* "src/lxml/apihelpers.pxi":562 * if not is_html: * _attributeValidOrRaise(tag) * c_tag = _xcstr(tag) # <<<<<<<<<<<<<< * if value is None and is_html: * c_value = NULL */ - __Pyx_TraceLine(563,0,__PYX_ERR(5, 563, __pyx_L1_error)) __pyx_v_c_tag = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_tag); - /* "src/lxml/apihelpers.pxi":564 + /* "src/lxml/apihelpers.pxi":563 * _attributeValidOrRaise(tag) * c_tag = _xcstr(tag) * if value is None and is_html: # <<<<<<<<<<<<<< * c_value = NULL * else: */ - __Pyx_TraceLine(564,0,__PYX_ERR(5, 564, __pyx_L1_error)) __pyx_t_6 = (__pyx_v_value == Py_None); __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { @@ -25631,17 +24519,16 @@ static int __pyx_f_4lxml_5etree__setAttributeValue(struct LxmlElement *__pyx_v_e __pyx_L5_bool_binop_done:; if (__pyx_t_4) { - /* "src/lxml/apihelpers.pxi":565 + /* "src/lxml/apihelpers.pxi":564 * c_tag = _xcstr(tag) * if value is None and is_html: * c_value = NULL # <<<<<<<<<<<<<< * else: * if isinstance(value, QName): */ - __Pyx_TraceLine(565,0,__PYX_ERR(5, 565, __pyx_L1_error)) __pyx_v_c_value = NULL; - /* "src/lxml/apihelpers.pxi":564 + /* "src/lxml/apihelpers.pxi":563 * _attributeValidOrRaise(tag) * c_tag = _xcstr(tag) * if value is None and is_html: # <<<<<<<<<<<<<< @@ -25651,33 +24538,31 @@ static int __pyx_f_4lxml_5etree__setAttributeValue(struct LxmlElement *__pyx_v_e goto __pyx_L4; } - /* "src/lxml/apihelpers.pxi":567 + /* "src/lxml/apihelpers.pxi":566 * c_value = NULL * else: * if isinstance(value, QName): # <<<<<<<<<<<<<< * value = _resolveQNameText(element, value) * else: */ - __Pyx_TraceLine(567,0,__PYX_ERR(5, 567, __pyx_L1_error)) /*else*/ { __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_4lxml_5etree_QName); __pyx_t_7 = (__pyx_t_4 != 0); if (__pyx_t_7) { - /* "src/lxml/apihelpers.pxi":568 + /* "src/lxml/apihelpers.pxi":567 * else: * if isinstance(value, QName): * value = _resolveQNameText(element, value) # <<<<<<<<<<<<<< * else: * value = _utf8(value) */ - __Pyx_TraceLine(568,0,__PYX_ERR(5, 568, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__resolveQNameText(__pyx_v_element, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 568, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__resolveQNameText(__pyx_v_element, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/apihelpers.pxi":567 + /* "src/lxml/apihelpers.pxi":566 * c_value = NULL * else: * if isinstance(value, QName): # <<<<<<<<<<<<<< @@ -25687,57 +24572,53 @@ static int __pyx_f_4lxml_5etree__setAttributeValue(struct LxmlElement *__pyx_v_e goto __pyx_L7; } - /* "src/lxml/apihelpers.pxi":570 + /* "src/lxml/apihelpers.pxi":569 * value = _resolveQNameText(element, value) * else: * value = _utf8(value) # <<<<<<<<<<<<<< * c_value = _xcstr(value) * if ns is None: */ - __Pyx_TraceLine(570,0,__PYX_ERR(5, 570, __pyx_L1_error)) /*else*/ { - __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 570, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; } __pyx_L7:; - /* "src/lxml/apihelpers.pxi":571 + /* "src/lxml/apihelpers.pxi":570 * else: * value = _utf8(value) * c_value = _xcstr(value) # <<<<<<<<<<<<<< * if ns is None: * c_ns = NULL */ - __Pyx_TraceLine(571,0,__PYX_ERR(5, 571, __pyx_L1_error)) __pyx_v_c_value = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_value); } __pyx_L4:; - /* "src/lxml/apihelpers.pxi":572 + /* "src/lxml/apihelpers.pxi":571 * value = _utf8(value) * c_value = _xcstr(value) * if ns is None: # <<<<<<<<<<<<<< * c_ns = NULL * else: */ - __Pyx_TraceLine(572,0,__PYX_ERR(5, 572, __pyx_L1_error)) __pyx_t_7 = (__pyx_v_ns == Py_None); __pyx_t_4 = (__pyx_t_7 != 0); if (__pyx_t_4) { - /* "src/lxml/apihelpers.pxi":573 + /* "src/lxml/apihelpers.pxi":572 * c_value = _xcstr(value) * if ns is None: * c_ns = NULL # <<<<<<<<<<<<<< * else: * c_ns = element._doc._findOrBuildNodeNs(element._c_node, _xcstr(ns), NULL, 1) */ - __Pyx_TraceLine(573,0,__PYX_ERR(5, 573, __pyx_L1_error)) __pyx_v_c_ns = NULL; - /* "src/lxml/apihelpers.pxi":572 + /* "src/lxml/apihelpers.pxi":571 * value = _utf8(value) * c_value = _xcstr(value) * if ns is None: # <<<<<<<<<<<<<< @@ -25747,42 +24628,39 @@ static int __pyx_f_4lxml_5etree__setAttributeValue(struct LxmlElement *__pyx_v_e goto __pyx_L8; } - /* "src/lxml/apihelpers.pxi":575 + /* "src/lxml/apihelpers.pxi":574 * c_ns = NULL * else: * c_ns = element._doc._findOrBuildNodeNs(element._c_node, _xcstr(ns), NULL, 1) # <<<<<<<<<<<<<< * tree.xmlSetNsProp(element._c_node, c_ns, c_tag, c_value) * return 0 */ - __Pyx_TraceLine(575,0,__PYX_ERR(5, 575, __pyx_L1_error)) /*else*/ { - __pyx_t_8 = __pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(__pyx_v_element->_doc, __pyx_v_element->_c_node, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_ns), NULL, 1); if (unlikely(__pyx_t_8 == ((xmlNs *)NULL))) __PYX_ERR(5, 575, __pyx_L1_error) + __pyx_t_8 = __pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(__pyx_v_element->_doc, __pyx_v_element->_c_node, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_ns), NULL, 1); if (unlikely(__pyx_t_8 == ((xmlNs *)NULL))) __PYX_ERR(5, 574, __pyx_L1_error) __pyx_v_c_ns = __pyx_t_8; } __pyx_L8:; - /* "src/lxml/apihelpers.pxi":576 + /* "src/lxml/apihelpers.pxi":575 * else: * c_ns = element._doc._findOrBuildNodeNs(element._c_node, _xcstr(ns), NULL, 1) * tree.xmlSetNsProp(element._c_node, c_ns, c_tag, c_value) # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(576,0,__PYX_ERR(5, 576, __pyx_L1_error)) (void)(xmlSetNsProp(__pyx_v_element->_c_node, __pyx_v_c_ns, __pyx_v_c_tag, __pyx_v_c_value)); - /* "src/lxml/apihelpers.pxi":577 + /* "src/lxml/apihelpers.pxi":576 * c_ns = element._doc._findOrBuildNodeNs(element._c_node, _xcstr(ns), NULL, 1) * tree.xmlSetNsProp(element._c_node, c_ns, c_tag, c_value) * return 0 # <<<<<<<<<<<<<< * * cdef int _delAttribute(_Element element, key) except -1: */ - __Pyx_TraceLine(577,0,__PYX_ERR(5, 577, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":556 + /* "src/lxml/apihelpers.pxi":555 * return _getNodeAttributeValue(element._c_node, key, default) * * cdef int _setAttributeValue(_Element element, key, value) except -1: # <<<<<<<<<<<<<< @@ -25801,12 +24679,11 @@ static int __pyx_f_4lxml_5etree__setAttributeValue(struct LxmlElement *__pyx_v_e __Pyx_XDECREF(__pyx_v_ns); __Pyx_XDECREF(__pyx_v_tag); __Pyx_XDECREF(__pyx_v_value); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":579 +/* "src/lxml/apihelpers.pxi":578 * return 0 * * cdef int _delAttribute(_Element element, key) except -1: # <<<<<<<<<<<<<< @@ -25819,7 +24696,6 @@ static int __pyx_f_4lxml_5etree__delAttribute(struct LxmlElement *__pyx_v_elemen PyObject *__pyx_v_tag = NULL; const xmlChar *__pyx_v_c_href; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -25827,17 +24703,15 @@ static int __pyx_f_4lxml_5etree__delAttribute(struct LxmlElement *__pyx_v_elemen const xmlChar *__pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("_delAttribute", 0); - __Pyx_TraceCall("_delAttribute", __pyx_f[5], 579, 0, __PYX_ERR(5, 579, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":580 + /* "src/lxml/apihelpers.pxi":579 * * cdef int _delAttribute(_Element element, key) except -1: * ns, tag = _getNsTag(key) # <<<<<<<<<<<<<< * c_href = NULL if ns is None else _xcstr(ns) * if _delAttributeFromNsName(element._c_node, c_href, _xcstr(tag)): */ - __Pyx_TraceLine(580,0,__PYX_ERR(5, 580, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 580, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(__pyx_t_1 != Py_None)) { PyObject* sequence = __pyx_t_1; @@ -25845,7 +24719,7 @@ static int __pyx_f_4lxml_5etree__delAttribute(struct LxmlElement *__pyx_v_elemen if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(5, 580, __pyx_L1_error) + __PYX_ERR(5, 579, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); @@ -25853,28 +24727,27 @@ static int __pyx_f_4lxml_5etree__delAttribute(struct LxmlElement *__pyx_v_elemen __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 580, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 580, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(5, 580, __pyx_L1_error) + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(5, 579, __pyx_L1_error) } __pyx_v_ns = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_tag = __pyx_t_3; __pyx_t_3 = 0; - /* "src/lxml/apihelpers.pxi":581 + /* "src/lxml/apihelpers.pxi":580 * cdef int _delAttribute(_Element element, key) except -1: * ns, tag = _getNsTag(key) * c_href = NULL if ns is None else _xcstr(ns) # <<<<<<<<<<<<<< * if _delAttributeFromNsName(element._c_node, c_href, _xcstr(tag)): * raise KeyError, key */ - __Pyx_TraceLine(581,0,__PYX_ERR(5, 581, __pyx_L1_error)) __pyx_t_5 = (__pyx_v_ns == Py_None); if ((__pyx_t_5 != 0)) { __pyx_t_4 = ((const xmlChar *)NULL); @@ -25883,29 +24756,27 @@ static int __pyx_f_4lxml_5etree__delAttribute(struct LxmlElement *__pyx_v_elemen } __pyx_v_c_href = __pyx_t_4; - /* "src/lxml/apihelpers.pxi":582 + /* "src/lxml/apihelpers.pxi":581 * ns, tag = _getNsTag(key) * c_href = NULL if ns is None else _xcstr(ns) * if _delAttributeFromNsName(element._c_node, c_href, _xcstr(tag)): # <<<<<<<<<<<<<< * raise KeyError, key * return 0 */ - __Pyx_TraceLine(582,0,__PYX_ERR(5, 582, __pyx_L1_error)) __pyx_t_5 = (__pyx_f_4lxml_5etree__delAttributeFromNsName(__pyx_v_element->_c_node, __pyx_v_c_href, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_tag)) != 0); if (unlikely(__pyx_t_5)) { - /* "src/lxml/apihelpers.pxi":583 + /* "src/lxml/apihelpers.pxi":582 * c_href = NULL if ns is None else _xcstr(ns) * if _delAttributeFromNsName(element._c_node, c_href, _xcstr(tag)): * raise KeyError, key # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(583,0,__PYX_ERR(5, 583, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_KeyError, __pyx_v_key, 0, 0); - __PYX_ERR(5, 583, __pyx_L1_error) + __PYX_ERR(5, 582, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":582 + /* "src/lxml/apihelpers.pxi":581 * ns, tag = _getNsTag(key) * c_href = NULL if ns is None else _xcstr(ns) * if _delAttributeFromNsName(element._c_node, c_href, _xcstr(tag)): # <<<<<<<<<<<<<< @@ -25914,18 +24785,17 @@ static int __pyx_f_4lxml_5etree__delAttribute(struct LxmlElement *__pyx_v_elemen */ } - /* "src/lxml/apihelpers.pxi":584 + /* "src/lxml/apihelpers.pxi":583 * if _delAttributeFromNsName(element._c_node, c_href, _xcstr(tag)): * raise KeyError, key * return 0 # <<<<<<<<<<<<<< * * cdef int _delAttributeFromNsName(xmlNode* c_node, const_xmlChar* c_href, const_xmlChar* c_name): */ - __Pyx_TraceLine(584,0,__PYX_ERR(5, 584, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":579 + /* "src/lxml/apihelpers.pxi":578 * return 0 * * cdef int _delAttribute(_Element element, key) except -1: # <<<<<<<<<<<<<< @@ -25943,12 +24813,11 @@ static int __pyx_f_4lxml_5etree__delAttribute(struct LxmlElement *__pyx_v_elemen __pyx_L0:; __Pyx_XDECREF(__pyx_v_ns); __Pyx_XDECREF(__pyx_v_tag); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":586 +/* "src/lxml/apihelpers.pxi":585 * return 0 * * cdef int _delAttributeFromNsName(xmlNode* c_node, const_xmlChar* c_href, const_xmlChar* c_name): # <<<<<<<<<<<<<< @@ -25959,45 +24828,40 @@ static int __pyx_f_4lxml_5etree__delAttribute(struct LxmlElement *__pyx_v_elemen static int __pyx_f_4lxml_5etree__delAttributeFromNsName(xmlNode *__pyx_v_c_node, const xmlChar *__pyx_v_c_href, const xmlChar *__pyx_v_c_name) { xmlAttr *__pyx_v_c_attr; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_delAttributeFromNsName", 0); - __Pyx_TraceCall("_delAttributeFromNsName", __pyx_f[5], 586, 0, __PYX_ERR(5, 586, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":587 + /* "src/lxml/apihelpers.pxi":586 * * cdef int _delAttributeFromNsName(xmlNode* c_node, const_xmlChar* c_href, const_xmlChar* c_name): * c_attr = tree.xmlHasNsProp(c_node, c_name, c_href) # <<<<<<<<<<<<<< * if c_attr is NULL: * # XXX free namespace that is not in use..? */ - __Pyx_TraceLine(587,0,__PYX_ERR(5, 587, __pyx_L1_error)) __pyx_v_c_attr = xmlHasNsProp(__pyx_v_c_node, __pyx_v_c_name, __pyx_v_c_href); - /* "src/lxml/apihelpers.pxi":588 + /* "src/lxml/apihelpers.pxi":587 * cdef int _delAttributeFromNsName(xmlNode* c_node, const_xmlChar* c_href, const_xmlChar* c_name): * c_attr = tree.xmlHasNsProp(c_node, c_name, c_href) * if c_attr is NULL: # <<<<<<<<<<<<<< * # XXX free namespace that is not in use..? * return -1 */ - __Pyx_TraceLine(588,0,__PYX_ERR(5, 588, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_attr == NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":590 + /* "src/lxml/apihelpers.pxi":589 * if c_attr is NULL: * # XXX free namespace that is not in use..? * return -1 # <<<<<<<<<<<<<< * tree.xmlRemoveProp(c_attr) * return 0 */ - __Pyx_TraceLine(590,0,__PYX_ERR(5, 590, __pyx_L1_error)) __pyx_r = -1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":588 + /* "src/lxml/apihelpers.pxi":587 * cdef int _delAttributeFromNsName(xmlNode* c_node, const_xmlChar* c_href, const_xmlChar* c_name): * c_attr = tree.xmlHasNsProp(c_node, c_name, c_href) * if c_attr is NULL: # <<<<<<<<<<<<<< @@ -26006,28 +24870,26 @@ static int __pyx_f_4lxml_5etree__delAttributeFromNsName(xmlNode *__pyx_v_c_node, */ } - /* "src/lxml/apihelpers.pxi":591 + /* "src/lxml/apihelpers.pxi":590 * # XXX free namespace that is not in use..? * return -1 * tree.xmlRemoveProp(c_attr) # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(591,0,__PYX_ERR(5, 591, __pyx_L1_error)) (void)(xmlRemoveProp(__pyx_v_c_attr)); - /* "src/lxml/apihelpers.pxi":592 + /* "src/lxml/apihelpers.pxi":591 * return -1 * tree.xmlRemoveProp(c_attr) * return 0 # <<<<<<<<<<<<<< * * cdef list _collectAttributes(xmlNode* c_node, int collecttype): */ - __Pyx_TraceLine(592,0,__PYX_ERR(5, 592, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":586 + /* "src/lxml/apihelpers.pxi":585 * return 0 * * cdef int _delAttributeFromNsName(xmlNode* c_node, const_xmlChar* c_href, const_xmlChar* c_name): # <<<<<<<<<<<<<< @@ -26036,16 +24898,12 @@ static int __pyx_f_4lxml_5etree__delAttributeFromNsName(xmlNode *__pyx_v_c_node, */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._delAttributeFromNsName", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":594 +/* "src/lxml/apihelpers.pxi":593 * return 0 * * cdef list _collectAttributes(xmlNode* c_node, int collecttype): # <<<<<<<<<<<<<< @@ -26059,7 +24917,6 @@ static PyObject *__pyx_f_4lxml_5etree__collectAttributes(xmlNode *__pyx_v_c_node PyObject *__pyx_v_attributes = NULL; PyObject *__pyx_v_item = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlAttr *__pyx_t_1; int __pyx_t_2; @@ -26067,63 +24924,57 @@ static PyObject *__pyx_f_4lxml_5etree__collectAttributes(xmlNode *__pyx_v_c_node PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_collectAttributes", 0); - __Pyx_TraceCall("_collectAttributes", __pyx_f[5], 594, 0, __PYX_ERR(5, 594, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":599 + /* "src/lxml/apihelpers.pxi":598 * """ * cdef Py_ssize_t count * c_attr = c_node.properties # <<<<<<<<<<<<<< * count = 0 * while c_attr is not NULL: */ - __Pyx_TraceLine(599,0,__PYX_ERR(5, 599, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_node->properties; __pyx_v_c_attr = __pyx_t_1; - /* "src/lxml/apihelpers.pxi":600 + /* "src/lxml/apihelpers.pxi":599 * cdef Py_ssize_t count * c_attr = c_node.properties * count = 0 # <<<<<<<<<<<<<< * while c_attr is not NULL: * if c_attr.type == tree.XML_ATTRIBUTE_NODE: */ - __Pyx_TraceLine(600,0,__PYX_ERR(5, 600, __pyx_L1_error)) __pyx_v_count = 0; - /* "src/lxml/apihelpers.pxi":601 + /* "src/lxml/apihelpers.pxi":600 * c_attr = c_node.properties * count = 0 * while c_attr is not NULL: # <<<<<<<<<<<<<< * if c_attr.type == tree.XML_ATTRIBUTE_NODE: * count += 1 */ - __Pyx_TraceLine(601,0,__PYX_ERR(5, 601, __pyx_L1_error)) while (1) { __pyx_t_2 = ((__pyx_v_c_attr != NULL) != 0); if (!__pyx_t_2) break; - /* "src/lxml/apihelpers.pxi":602 + /* "src/lxml/apihelpers.pxi":601 * count = 0 * while c_attr is not NULL: * if c_attr.type == tree.XML_ATTRIBUTE_NODE: # <<<<<<<<<<<<<< * count += 1 * c_attr = c_attr.next */ - __Pyx_TraceLine(602,0,__PYX_ERR(5, 602, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_attr->type == XML_ATTRIBUTE_NODE) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":603 + /* "src/lxml/apihelpers.pxi":602 * while c_attr is not NULL: * if c_attr.type == tree.XML_ATTRIBUTE_NODE: * count += 1 # <<<<<<<<<<<<<< * c_attr = c_attr.next * */ - __Pyx_TraceLine(603,0,__PYX_ERR(5, 603, __pyx_L1_error)) __pyx_v_count = (__pyx_v_count + 1); - /* "src/lxml/apihelpers.pxi":602 + /* "src/lxml/apihelpers.pxi":601 * count = 0 * while c_attr is not NULL: * if c_attr.type == tree.XML_ATTRIBUTE_NODE: # <<<<<<<<<<<<<< @@ -26132,45 +24983,42 @@ static PyObject *__pyx_f_4lxml_5etree__collectAttributes(xmlNode *__pyx_v_c_node */ } - /* "src/lxml/apihelpers.pxi":604 + /* "src/lxml/apihelpers.pxi":603 * if c_attr.type == tree.XML_ATTRIBUTE_NODE: * count += 1 * c_attr = c_attr.next # <<<<<<<<<<<<<< * * if not count: */ - __Pyx_TraceLine(604,0,__PYX_ERR(5, 604, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_attr->next; __pyx_v_c_attr = __pyx_t_1; } - /* "src/lxml/apihelpers.pxi":606 + /* "src/lxml/apihelpers.pxi":605 * c_attr = c_attr.next * * if not count: # <<<<<<<<<<<<<< * return [] * */ - __Pyx_TraceLine(606,0,__PYX_ERR(5, 606, __pyx_L1_error)) __pyx_t_2 = ((!(__pyx_v_count != 0)) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":607 + /* "src/lxml/apihelpers.pxi":606 * * if not count: * return [] # <<<<<<<<<<<<<< * * attributes = [None] * count */ - __Pyx_TraceLine(607,0,__PYX_ERR(5, 607, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 607, __pyx_L1_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":606 + /* "src/lxml/apihelpers.pxi":605 * c_attr = c_attr.next * * if not count: # <<<<<<<<<<<<<< @@ -26179,15 +25027,14 @@ static PyObject *__pyx_f_4lxml_5etree__collectAttributes(xmlNode *__pyx_v_c_node */ } - /* "src/lxml/apihelpers.pxi":609 + /* "src/lxml/apihelpers.pxi":608 * return [] * * attributes = [None] * count # <<<<<<<<<<<<<< * c_attr = c_node.properties * count = 0 */ - __Pyx_TraceLine(609,0,__PYX_ERR(5, 609, __pyx_L1_error)) - __pyx_t_3 = PyList_New(1 * ((__pyx_v_count<0) ? 0:__pyx_v_count)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 609, __pyx_L1_error) + __pyx_t_3 = PyList_New(1 * ((__pyx_v_count<0) ? 0:__pyx_v_count)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_count; __pyx_temp++) { @@ -26199,75 +25046,69 @@ static PyObject *__pyx_f_4lxml_5etree__collectAttributes(xmlNode *__pyx_v_c_node __pyx_v_attributes = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "src/lxml/apihelpers.pxi":610 + /* "src/lxml/apihelpers.pxi":609 * * attributes = [None] * count * c_attr = c_node.properties # <<<<<<<<<<<<<< * count = 0 * while c_attr is not NULL: */ - __Pyx_TraceLine(610,0,__PYX_ERR(5, 610, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_node->properties; __pyx_v_c_attr = __pyx_t_1; - /* "src/lxml/apihelpers.pxi":611 + /* "src/lxml/apihelpers.pxi":610 * attributes = [None] * count * c_attr = c_node.properties * count = 0 # <<<<<<<<<<<<<< * while c_attr is not NULL: * if c_attr.type == tree.XML_ATTRIBUTE_NODE: */ - __Pyx_TraceLine(611,0,__PYX_ERR(5, 611, __pyx_L1_error)) __pyx_v_count = 0; - /* "src/lxml/apihelpers.pxi":612 + /* "src/lxml/apihelpers.pxi":611 * c_attr = c_node.properties * count = 0 * while c_attr is not NULL: # <<<<<<<<<<<<<< * if c_attr.type == tree.XML_ATTRIBUTE_NODE: * if collecttype == 1: */ - __Pyx_TraceLine(612,0,__PYX_ERR(5, 612, __pyx_L1_error)) while (1) { __pyx_t_2 = ((__pyx_v_c_attr != NULL) != 0); if (!__pyx_t_2) break; - /* "src/lxml/apihelpers.pxi":613 + /* "src/lxml/apihelpers.pxi":612 * count = 0 * while c_attr is not NULL: * if c_attr.type == tree.XML_ATTRIBUTE_NODE: # <<<<<<<<<<<<<< * if collecttype == 1: * item = _namespacedName(c_attr) */ - __Pyx_TraceLine(613,0,__PYX_ERR(5, 613, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_attr->type == XML_ATTRIBUTE_NODE) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":614 + /* "src/lxml/apihelpers.pxi":613 * while c_attr is not NULL: * if c_attr.type == tree.XML_ATTRIBUTE_NODE: * if collecttype == 1: # <<<<<<<<<<<<<< * item = _namespacedName(c_attr) * elif collecttype == 2: */ - __Pyx_TraceLine(614,0,__PYX_ERR(5, 614, __pyx_L1_error)) switch (__pyx_v_collecttype) { case 1: - /* "src/lxml/apihelpers.pxi":615 + /* "src/lxml/apihelpers.pxi":614 * if c_attr.type == tree.XML_ATTRIBUTE_NODE: * if collecttype == 1: * item = _namespacedName(c_attr) # <<<<<<<<<<<<<< * elif collecttype == 2: * item = _attributeValue(c_node, c_attr) */ - __Pyx_TraceLine(615,0,__PYX_ERR(5, 615, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree__namespacedName(((xmlNode *)__pyx_v_c_attr)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 615, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__namespacedName(((xmlNode *)__pyx_v_c_attr)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_3); __pyx_t_3 = 0; - /* "src/lxml/apihelpers.pxi":614 + /* "src/lxml/apihelpers.pxi":613 * while c_attr is not NULL: * if c_attr.type == tree.XML_ATTRIBUTE_NODE: * if collecttype == 1: # <<<<<<<<<<<<<< @@ -26275,31 +25116,21 @@ static PyObject *__pyx_f_4lxml_5etree__collectAttributes(xmlNode *__pyx_v_c_node * elif collecttype == 2: */ break; - - /* "src/lxml/apihelpers.pxi":616 - * if collecttype == 1: - * item = _namespacedName(c_attr) - * elif collecttype == 2: # <<<<<<<<<<<<<< - * item = _attributeValue(c_node, c_attr) - * else: - */ - __Pyx_TraceLine(616,0,__PYX_ERR(5, 616, __pyx_L1_error)) case 2: - /* "src/lxml/apihelpers.pxi":617 + /* "src/lxml/apihelpers.pxi":616 * item = _namespacedName(c_attr) * elif collecttype == 2: * item = _attributeValue(c_node, c_attr) # <<<<<<<<<<<<<< * else: * item = (_namespacedName(c_attr), */ - __Pyx_TraceLine(617,0,__PYX_ERR(5, 617, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree__attributeValue(__pyx_v_c_node, __pyx_v_c_attr); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 617, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__attributeValue(__pyx_v_c_node, __pyx_v_c_attr); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_3); __pyx_t_3 = 0; - /* "src/lxml/apihelpers.pxi":616 + /* "src/lxml/apihelpers.pxi":615 * if collecttype == 1: * item = _namespacedName(c_attr) * elif collecttype == 2: # <<<<<<<<<<<<<< @@ -26309,37 +25140,34 @@ static PyObject *__pyx_f_4lxml_5etree__collectAttributes(xmlNode *__pyx_v_c_node break; default: - /* "src/lxml/apihelpers.pxi":619 + /* "src/lxml/apihelpers.pxi":618 * item = _attributeValue(c_node, c_attr) * else: * item = (_namespacedName(c_attr), # <<<<<<<<<<<<<< * _attributeValue(c_node, c_attr)) * attributes[count] = item */ - __Pyx_TraceLine(619,0,__PYX_ERR(5, 619, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree__namespacedName(((xmlNode *)__pyx_v_c_attr)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 619, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__namespacedName(((xmlNode *)__pyx_v_c_attr)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "src/lxml/apihelpers.pxi":620 + /* "src/lxml/apihelpers.pxi":619 * else: * item = (_namespacedName(c_attr), * _attributeValue(c_node, c_attr)) # <<<<<<<<<<<<<< * attributes[count] = item * count += 1 */ - __Pyx_TraceLine(620,0,__PYX_ERR(5, 620, __pyx_L1_error)) - __pyx_t_4 = __pyx_f_4lxml_5etree__attributeValue(__pyx_v_c_node, __pyx_v_c_attr); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 620, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__attributeValue(__pyx_v_c_node, __pyx_v_c_attr); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "src/lxml/apihelpers.pxi":619 + /* "src/lxml/apihelpers.pxi":618 * item = _attributeValue(c_node, c_attr) * else: * item = (_namespacedName(c_attr), # <<<<<<<<<<<<<< * _attributeValue(c_node, c_attr)) * attributes[count] = item */ - __Pyx_TraceLine(619,0,__PYX_ERR(5, 619, __pyx_L1_error)) - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 619, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); @@ -26352,27 +25180,25 @@ static PyObject *__pyx_f_4lxml_5etree__collectAttributes(xmlNode *__pyx_v_c_node break; } - /* "src/lxml/apihelpers.pxi":621 + /* "src/lxml/apihelpers.pxi":620 * item = (_namespacedName(c_attr), * _attributeValue(c_node, c_attr)) * attributes[count] = item # <<<<<<<<<<<<<< * count += 1 * c_attr = c_attr.next */ - __Pyx_TraceLine(621,0,__PYX_ERR(5, 621, __pyx_L1_error)) - if (unlikely(__Pyx_SetItemInt(__pyx_v_attributes, __pyx_v_count, __pyx_v_item, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0)) __PYX_ERR(5, 621, __pyx_L1_error) + if (unlikely(__Pyx_SetItemInt(__pyx_v_attributes, __pyx_v_count, __pyx_v_item, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0)) __PYX_ERR(5, 620, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":622 + /* "src/lxml/apihelpers.pxi":621 * _attributeValue(c_node, c_attr)) * attributes[count] = item * count += 1 # <<<<<<<<<<<<<< * c_attr = c_attr.next * return attributes */ - __Pyx_TraceLine(622,0,__PYX_ERR(5, 622, __pyx_L1_error)) __pyx_v_count = (__pyx_v_count + 1); - /* "src/lxml/apihelpers.pxi":613 + /* "src/lxml/apihelpers.pxi":612 * count = 0 * while c_attr is not NULL: * if c_attr.type == tree.XML_ATTRIBUTE_NODE: # <<<<<<<<<<<<<< @@ -26381,32 +25207,30 @@ static PyObject *__pyx_f_4lxml_5etree__collectAttributes(xmlNode *__pyx_v_c_node */ } - /* "src/lxml/apihelpers.pxi":623 + /* "src/lxml/apihelpers.pxi":622 * attributes[count] = item * count += 1 * c_attr = c_attr.next # <<<<<<<<<<<<<< * return attributes * */ - __Pyx_TraceLine(623,0,__PYX_ERR(5, 623, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_attr->next; __pyx_v_c_attr = __pyx_t_1; } - /* "src/lxml/apihelpers.pxi":624 + /* "src/lxml/apihelpers.pxi":623 * count += 1 * c_attr = c_attr.next * return attributes # <<<<<<<<<<<<<< * * cdef object __RE_XML_ENCODING = re.compile( */ - __Pyx_TraceLine(624,0,__PYX_ERR(5, 624, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_attributes); __pyx_r = __pyx_v_attributes; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":594 + /* "src/lxml/apihelpers.pxi":593 * return 0 * * cdef list _collectAttributes(xmlNode* c_node, int collecttype): # <<<<<<<<<<<<<< @@ -26425,12 +25249,11 @@ static PyObject *__pyx_f_4lxml_5etree__collectAttributes(xmlNode *__pyx_v_c_node __Pyx_XDECREF(__pyx_v_attributes); __Pyx_XDECREF(__pyx_v_item); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":632 +/* "src/lxml/apihelpers.pxi":631 * cdef object __HAS_XML_ENCODING = __RE_XML_ENCODING.match * * cdef object _stripEncodingDeclaration(object xml_string): # <<<<<<<<<<<<<< @@ -26440,7 +25263,6 @@ static PyObject *__pyx_f_4lxml_5etree__collectAttributes(xmlNode *__pyx_v_c_node static PyObject *__pyx_f_4lxml_5etree__stripEncodingDeclaration(PyObject *__pyx_v_xml_string) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -26448,16 +25270,14 @@ static PyObject *__pyx_f_4lxml_5etree__stripEncodingDeclaration(PyObject *__pyx_ int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_stripEncodingDeclaration", 0); - __Pyx_TraceCall("_stripEncodingDeclaration", __pyx_f[5], 632, 0, __PYX_ERR(5, 632, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":634 + /* "src/lxml/apihelpers.pxi":633 * cdef object _stripEncodingDeclaration(object xml_string): * # this is a hack to remove the XML encoding declaration from unicode * return __REPLACE_XML_ENCODING(ur'\g<1>\g<2>', xml_string) # <<<<<<<<<<<<<< * * cdef bint _hasEncodingDeclaration(object xml_string) except -1: */ - __Pyx_TraceLine(634,0,__PYX_ERR(5, 634, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_4lxml_5etree___REPLACE_XML_ENCODING); __pyx_t_2 = __pyx_v_4lxml_5etree___REPLACE_XML_ENCODING; __pyx_t_3 = NULL; @@ -26475,7 +25295,7 @@ static PyObject *__pyx_f_4lxml_5etree__stripEncodingDeclaration(PyObject *__pyx_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_u_g_1_g_2, __pyx_v_xml_string}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 634, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 633, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -26483,13 +25303,13 @@ static PyObject *__pyx_f_4lxml_5etree__stripEncodingDeclaration(PyObject *__pyx_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_u_g_1_g_2, __pyx_v_xml_string}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 634, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 633, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 634, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 633, __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; @@ -26500,7 +25320,7 @@ static PyObject *__pyx_f_4lxml_5etree__stripEncodingDeclaration(PyObject *__pyx_ __Pyx_INCREF(__pyx_v_xml_string); __Pyx_GIVEREF(__pyx_v_xml_string); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_xml_string); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 634, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -26509,7 +25329,7 @@ static PyObject *__pyx_f_4lxml_5etree__stripEncodingDeclaration(PyObject *__pyx_ __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":632 + /* "src/lxml/apihelpers.pxi":631 * cdef object __HAS_XML_ENCODING = __RE_XML_ENCODING.match * * cdef object _stripEncodingDeclaration(object xml_string): # <<<<<<<<<<<<<< @@ -26527,12 +25347,11 @@ static PyObject *__pyx_f_4lxml_5etree__stripEncodingDeclaration(PyObject *__pyx_ __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":636 +/* "src/lxml/apihelpers.pxi":635 * return __REPLACE_XML_ENCODING(ur'\g<1>\g<2>', xml_string) * * cdef bint _hasEncodingDeclaration(object xml_string) except -1: # <<<<<<<<<<<<<< @@ -26542,24 +25361,20 @@ static PyObject *__pyx_f_4lxml_5etree__stripEncodingDeclaration(PyObject *__pyx_ static int __pyx_f_4lxml_5etree__hasEncodingDeclaration(PyObject *__pyx_v_xml_string) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; + int __pyx_t_4; __Pyx_RefNannySetupContext("_hasEncodingDeclaration", 0); - __Pyx_TraceCall("_hasEncodingDeclaration", __pyx_f[5], 636, 0, __PYX_ERR(5, 636, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":638 + /* "src/lxml/apihelpers.pxi":637 * cdef bint _hasEncodingDeclaration(object xml_string) except -1: * # check if a (unicode) string has an XML encoding declaration * return __HAS_XML_ENCODING(xml_string) is not None # <<<<<<<<<<<<<< * * cdef inline bint _hasText(xmlNode* c_node): */ - __Pyx_TraceLine(638,0,__PYX_ERR(5, 638, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_4lxml_5etree___HAS_XML_ENCODING); __pyx_t_2 = __pyx_v_4lxml_5etree___HAS_XML_ENCODING; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -26571,45 +25386,17 @@ static int __pyx_f_4lxml_5etree__hasEncodingDeclaration(PyObject *__pyx_v_xml_st __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_xml_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 638, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_xml_string}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 638, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_xml_string}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 638, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 638, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_v_xml_string); - __Pyx_GIVEREF(__pyx_v_xml_string); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_xml_string); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 638, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_xml_string) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_xml_string); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = (__pyx_t_1 != Py_None); + __pyx_t_4 = (__pyx_t_1 != Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = __pyx_t_5; + __pyx_r = __pyx_t_4; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":636 + /* "src/lxml/apihelpers.pxi":635 * return __REPLACE_XML_ENCODING(ur'\g<1>\g<2>', xml_string) * * cdef bint _hasEncodingDeclaration(object xml_string) except -1: # <<<<<<<<<<<<<< @@ -26622,16 +25409,14 @@ static int __pyx_f_4lxml_5etree__hasEncodingDeclaration(PyObject *__pyx_v_xml_st __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("lxml.etree._hasEncodingDeclaration", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":640 +/* "src/lxml/apihelpers.pxi":639 * return __HAS_XML_ENCODING(xml_string) is not None * * cdef inline bint _hasText(xmlNode* c_node): # <<<<<<<<<<<<<< @@ -26641,21 +25426,18 @@ static int __pyx_f_4lxml_5etree__hasEncodingDeclaration(PyObject *__pyx_v_xml_st static CYTHON_INLINE int __pyx_f_4lxml_5etree__hasText(xmlNode *__pyx_v_c_node) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_hasText", 0); - __Pyx_TraceCall("_hasText", __pyx_f[5], 640, 0, __PYX_ERR(5, 640, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":641 + /* "src/lxml/apihelpers.pxi":640 * * cdef inline bint _hasText(xmlNode* c_node): * return c_node is not NULL and _textNodeOrSkip(c_node.children) is not NULL # <<<<<<<<<<<<<< * * cdef inline bint _hasTail(xmlNode* c_node): */ - __Pyx_TraceLine(641,0,__PYX_ERR(5, 641, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node != NULL) != 0); if (__pyx_t_2) { } else { @@ -26668,7 +25450,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__hasText(xmlNode *__pyx_v_c_node) __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":640 + /* "src/lxml/apihelpers.pxi":639 * return __HAS_XML_ENCODING(xml_string) is not None * * cdef inline bint _hasText(xmlNode* c_node): # <<<<<<<<<<<<<< @@ -26677,16 +25459,12 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__hasText(xmlNode *__pyx_v_c_node) */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._hasText", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":643 +/* "src/lxml/apihelpers.pxi":642 * return c_node is not NULL and _textNodeOrSkip(c_node.children) is not NULL * * cdef inline bint _hasTail(xmlNode* c_node): # <<<<<<<<<<<<<< @@ -26696,21 +25474,18 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__hasText(xmlNode *__pyx_v_c_node) static CYTHON_INLINE int __pyx_f_4lxml_5etree__hasTail(xmlNode *__pyx_v_c_node) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_hasTail", 0); - __Pyx_TraceCall("_hasTail", __pyx_f[5], 643, 0, __PYX_ERR(5, 643, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":644 + /* "src/lxml/apihelpers.pxi":643 * * cdef inline bint _hasTail(xmlNode* c_node): * return c_node is not NULL and _textNodeOrSkip(c_node.next) is not NULL # <<<<<<<<<<<<<< * * cdef _collectText(xmlNode* c_node): */ - __Pyx_TraceLine(644,0,__PYX_ERR(5, 644, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node != NULL) != 0); if (__pyx_t_2) { } else { @@ -26723,7 +25498,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__hasTail(xmlNode *__pyx_v_c_node) __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":643 + /* "src/lxml/apihelpers.pxi":642 * return c_node is not NULL and _textNodeOrSkip(c_node.children) is not NULL * * cdef inline bint _hasTail(xmlNode* c_node): # <<<<<<<<<<<<<< @@ -26732,16 +25507,12 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__hasTail(xmlNode *__pyx_v_c_node) */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._hasTail", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":646 +/* "src/lxml/apihelpers.pxi":645 * return c_node is not NULL and _textNodeOrSkip(c_node.next) is not NULL * * cdef _collectText(xmlNode* c_node): # <<<<<<<<<<<<<< @@ -26755,7 +25526,6 @@ static PyObject *__pyx_f_4lxml_5etree__collectText(xmlNode *__pyx_v_c_node) { xmlNode *__pyx_v_c_node_cur; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlNode *__pyx_t_1; int __pyx_t_2; @@ -26764,75 +25534,68 @@ static PyObject *__pyx_f_4lxml_5etree__collectText(xmlNode *__pyx_v_c_node) { PyObject *__pyx_t_5 = NULL; unsigned char *__pyx_t_6; __Pyx_RefNannySetupContext("_collectText", 0); - __Pyx_TraceCall("_collectText", __pyx_f[5], 646, 0, __PYX_ERR(5, 646, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":657 + /* "src/lxml/apihelpers.pxi":656 * cdef xmlNode* c_node_cur * # check for multiple text nodes * scount = 0 # <<<<<<<<<<<<<< * c_text = NULL * c_node_cur = c_node = _textNodeOrSkip(c_node) */ - __Pyx_TraceLine(657,0,__PYX_ERR(5, 657, __pyx_L1_error)) __pyx_v_scount = 0; - /* "src/lxml/apihelpers.pxi":658 + /* "src/lxml/apihelpers.pxi":657 * # check for multiple text nodes * scount = 0 * c_text = NULL # <<<<<<<<<<<<<< * c_node_cur = c_node = _textNodeOrSkip(c_node) * while c_node_cur is not NULL: */ - __Pyx_TraceLine(658,0,__PYX_ERR(5, 658, __pyx_L1_error)) __pyx_v_c_text = NULL; - /* "src/lxml/apihelpers.pxi":659 + /* "src/lxml/apihelpers.pxi":658 * scount = 0 * c_text = NULL * c_node_cur = c_node = _textNodeOrSkip(c_node) # <<<<<<<<<<<<<< * while c_node_cur is not NULL: * if c_node_cur.content[0] != c'\0': */ - __Pyx_TraceLine(659,0,__PYX_ERR(5, 659, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__textNodeOrSkip(__pyx_v_c_node); __pyx_v_c_node_cur = __pyx_t_1; __pyx_v_c_node = __pyx_t_1; - /* "src/lxml/apihelpers.pxi":660 + /* "src/lxml/apihelpers.pxi":659 * c_text = NULL * c_node_cur = c_node = _textNodeOrSkip(c_node) * while c_node_cur is not NULL: # <<<<<<<<<<<<<< * if c_node_cur.content[0] != c'\0': * c_text = c_node_cur.content */ - __Pyx_TraceLine(660,0,__PYX_ERR(5, 660, __pyx_L1_error)) while (1) { __pyx_t_2 = ((__pyx_v_c_node_cur != NULL) != 0); if (!__pyx_t_2) break; - /* "src/lxml/apihelpers.pxi":661 + /* "src/lxml/apihelpers.pxi":660 * c_node_cur = c_node = _textNodeOrSkip(c_node) * while c_node_cur is not NULL: * if c_node_cur.content[0] != c'\0': # <<<<<<<<<<<<<< * c_text = c_node_cur.content * scount += 1 */ - __Pyx_TraceLine(661,0,__PYX_ERR(5, 661, __pyx_L1_error)) __pyx_t_2 = (((__pyx_v_c_node_cur->content[0]) != '\x00') != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":662 + /* "src/lxml/apihelpers.pxi":661 * while c_node_cur is not NULL: * if c_node_cur.content[0] != c'\0': * c_text = c_node_cur.content # <<<<<<<<<<<<<< * scount += 1 * c_node_cur = _textNodeOrSkip(c_node_cur.next) */ - __Pyx_TraceLine(662,0,__PYX_ERR(5, 662, __pyx_L1_error)) __pyx_t_3 = __pyx_v_c_node_cur->content; __pyx_v_c_text = __pyx_t_3; - /* "src/lxml/apihelpers.pxi":661 + /* "src/lxml/apihelpers.pxi":660 * c_node_cur = c_node = _textNodeOrSkip(c_node) * while c_node_cur is not NULL: * if c_node_cur.content[0] != c'\0': # <<<<<<<<<<<<<< @@ -26841,50 +25604,46 @@ static PyObject *__pyx_f_4lxml_5etree__collectText(xmlNode *__pyx_v_c_node) { */ } - /* "src/lxml/apihelpers.pxi":663 + /* "src/lxml/apihelpers.pxi":662 * if c_node_cur.content[0] != c'\0': * c_text = c_node_cur.content * scount += 1 # <<<<<<<<<<<<<< * c_node_cur = _textNodeOrSkip(c_node_cur.next) * */ - __Pyx_TraceLine(663,0,__PYX_ERR(5, 663, __pyx_L1_error)) __pyx_v_scount = (__pyx_v_scount + 1); - /* "src/lxml/apihelpers.pxi":664 + /* "src/lxml/apihelpers.pxi":663 * c_text = c_node_cur.content * scount += 1 * c_node_cur = _textNodeOrSkip(c_node_cur.next) # <<<<<<<<<<<<<< * * # handle two most common cases first */ - __Pyx_TraceLine(664,0,__PYX_ERR(5, 664, __pyx_L1_error)) __pyx_v_c_node_cur = __pyx_f_4lxml_5etree__textNodeOrSkip(__pyx_v_c_node_cur->next); } - /* "src/lxml/apihelpers.pxi":667 + /* "src/lxml/apihelpers.pxi":666 * * # handle two most common cases first * if c_text is NULL: # <<<<<<<<<<<<<< * return '' if scount > 0 else None * if scount == 1: */ - __Pyx_TraceLine(667,0,__PYX_ERR(5, 667, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_text == NULL) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":668 + /* "src/lxml/apihelpers.pxi":667 * # handle two most common cases first * if c_text is NULL: * return '' if scount > 0 else None # <<<<<<<<<<<<<< * if scount == 1: * return funicode(c_text) */ - __Pyx_TraceLine(668,0,__PYX_ERR(5, 668, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); if (((__pyx_v_scount > 0) != 0)) { - __Pyx_INCREF(__pyx_kp_s__23); - __pyx_t_4 = __pyx_kp_s__23; + __Pyx_INCREF(__pyx_kp_s__11); + __pyx_t_4 = __pyx_kp_s__11; } else { __Pyx_INCREF(Py_None); __pyx_t_4 = Py_None; @@ -26893,7 +25652,7 @@ static PyObject *__pyx_f_4lxml_5etree__collectText(xmlNode *__pyx_v_c_node) { __pyx_t_4 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":667 + /* "src/lxml/apihelpers.pxi":666 * * # handle two most common cases first * if c_text is NULL: # <<<<<<<<<<<<<< @@ -26902,33 +25661,31 @@ static PyObject *__pyx_f_4lxml_5etree__collectText(xmlNode *__pyx_v_c_node) { */ } - /* "src/lxml/apihelpers.pxi":669 + /* "src/lxml/apihelpers.pxi":668 * if c_text is NULL: * return '' if scount > 0 else None * if scount == 1: # <<<<<<<<<<<<<< * return funicode(c_text) * */ - __Pyx_TraceLine(669,0,__PYX_ERR(5, 669, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_scount == 1) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":670 + /* "src/lxml/apihelpers.pxi":669 * return '' if scount > 0 else None * if scount == 1: * return funicode(c_text) # <<<<<<<<<<<<<< * * # the rest is not performance critical anymore */ - __Pyx_TraceLine(670,0,__PYX_ERR(5, 670, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_text); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 670, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_text); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":669 + /* "src/lxml/apihelpers.pxi":668 * if c_text is NULL: * return '' if scount > 0 else None * if scount == 1: # <<<<<<<<<<<<<< @@ -26937,77 +25694,72 @@ static PyObject *__pyx_f_4lxml_5etree__collectText(xmlNode *__pyx_v_c_node) { */ } - /* "src/lxml/apihelpers.pxi":673 + /* "src/lxml/apihelpers.pxi":672 * * # the rest is not performance critical anymore * result = b'' # <<<<<<<<<<<<<< * while c_node is not NULL: * result += c_node.content */ - __Pyx_TraceLine(673,0,__PYX_ERR(5, 673, __pyx_L1_error)) - __Pyx_INCREF(__pyx_kp_b__23); - __pyx_v_result = __pyx_kp_b__23; + __Pyx_INCREF(__pyx_kp_b__11); + __pyx_v_result = __pyx_kp_b__11; - /* "src/lxml/apihelpers.pxi":674 + /* "src/lxml/apihelpers.pxi":673 * # the rest is not performance critical anymore * result = b'' * while c_node is not NULL: # <<<<<<<<<<<<<< * result += c_node.content * c_node = _textNodeOrSkip(c_node.next) */ - __Pyx_TraceLine(674,0,__PYX_ERR(5, 674, __pyx_L1_error)) while (1) { __pyx_t_2 = ((__pyx_v_c_node != NULL) != 0); if (!__pyx_t_2) break; - /* "src/lxml/apihelpers.pxi":675 + /* "src/lxml/apihelpers.pxi":674 * result = b'' * while c_node is not NULL: * result += c_node.content # <<<<<<<<<<<<<< * c_node = _textNodeOrSkip(c_node.next) * return funicode(result) */ - __Pyx_TraceLine(675,0,__PYX_ERR(5, 675, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyBytes_FromCString(((unsigned char *)__pyx_v_c_node->content)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 675, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBytes_FromCString(((unsigned char *)__pyx_v_c_node->content)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 675, __pyx_L1_error) + __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_5)); __pyx_t_5 = 0; - /* "src/lxml/apihelpers.pxi":676 + /* "src/lxml/apihelpers.pxi":675 * while c_node is not NULL: * result += c_node.content * c_node = _textNodeOrSkip(c_node.next) # <<<<<<<<<<<<<< * return funicode(result) * */ - __Pyx_TraceLine(676,0,__PYX_ERR(5, 676, __pyx_L1_error)) __pyx_v_c_node = __pyx_f_4lxml_5etree__textNodeOrSkip(__pyx_v_c_node->next); } - /* "src/lxml/apihelpers.pxi":677 + /* "src/lxml/apihelpers.pxi":676 * result += c_node.content * c_node = _textNodeOrSkip(c_node.next) * return funicode(result) # <<<<<<<<<<<<<< * * cdef void _removeText(xmlNode* c_node): */ - __Pyx_TraceLine(677,0,__PYX_ERR(5, 677, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_result == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(5, 677, __pyx_L1_error) + __PYX_ERR(5, 676, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyBytes_AsWritableUString(__pyx_v_result); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(5, 677, __pyx_L1_error) - __pyx_t_5 = __pyx_f_4lxml_5etree_funicode(((const xmlChar *)((unsigned char *)__pyx_t_6))); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 677, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyBytes_AsWritableUString(__pyx_v_result); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(5, 676, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree_funicode(((const xmlChar *)((unsigned char *)__pyx_t_6))); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":646 + /* "src/lxml/apihelpers.pxi":645 * return c_node is not NULL and _textNodeOrSkip(c_node.next) is not NULL * * cdef _collectText(xmlNode* c_node): # <<<<<<<<<<<<<< @@ -27024,12 +25776,11 @@ static PyObject *__pyx_f_4lxml_5etree__collectText(xmlNode *__pyx_v_c_node) { __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":679 +/* "src/lxml/apihelpers.pxi":678 * return funicode(result) * * cdef void _removeText(xmlNode* c_node): # <<<<<<<<<<<<<< @@ -27039,76 +25790,68 @@ static PyObject *__pyx_f_4lxml_5etree__collectText(xmlNode *__pyx_v_c_node) { static void __pyx_f_4lxml_5etree__removeText(xmlNode *__pyx_v_c_node) { xmlNode *__pyx_v_c_next; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_removeText", 0); - __Pyx_TraceCall("_removeText", __pyx_f[5], 679, 0, __PYX_ERR(5, 679, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":685 + /* "src/lxml/apihelpers.pxi":684 * """ * cdef xmlNode* c_next * c_node = _textNodeOrSkip(c_node) # <<<<<<<<<<<<<< * while c_node is not NULL: * c_next = _textNodeOrSkip(c_node.next) */ - __Pyx_TraceLine(685,0,__PYX_ERR(5, 685, __pyx_L1_error)) __pyx_v_c_node = __pyx_f_4lxml_5etree__textNodeOrSkip(__pyx_v_c_node); - /* "src/lxml/apihelpers.pxi":686 + /* "src/lxml/apihelpers.pxi":685 * cdef xmlNode* c_next * c_node = _textNodeOrSkip(c_node) * while c_node is not NULL: # <<<<<<<<<<<<<< * c_next = _textNodeOrSkip(c_node.next) * tree.xmlUnlinkNode(c_node) */ - __Pyx_TraceLine(686,0,__PYX_ERR(5, 686, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_node != NULL) != 0); if (!__pyx_t_1) break; - /* "src/lxml/apihelpers.pxi":687 + /* "src/lxml/apihelpers.pxi":686 * c_node = _textNodeOrSkip(c_node) * while c_node is not NULL: * c_next = _textNodeOrSkip(c_node.next) # <<<<<<<<<<<<<< * tree.xmlUnlinkNode(c_node) * tree.xmlFreeNode(c_node) */ - __Pyx_TraceLine(687,0,__PYX_ERR(5, 687, __pyx_L1_error)) __pyx_v_c_next = __pyx_f_4lxml_5etree__textNodeOrSkip(__pyx_v_c_node->next); - /* "src/lxml/apihelpers.pxi":688 + /* "src/lxml/apihelpers.pxi":687 * while c_node is not NULL: * c_next = _textNodeOrSkip(c_node.next) * tree.xmlUnlinkNode(c_node) # <<<<<<<<<<<<<< * tree.xmlFreeNode(c_node) * c_node = c_next */ - __Pyx_TraceLine(688,0,__PYX_ERR(5, 688, __pyx_L1_error)) xmlUnlinkNode(__pyx_v_c_node); - /* "src/lxml/apihelpers.pxi":689 + /* "src/lxml/apihelpers.pxi":688 * c_next = _textNodeOrSkip(c_node.next) * tree.xmlUnlinkNode(c_node) * tree.xmlFreeNode(c_node) # <<<<<<<<<<<<<< * c_node = c_next * */ - __Pyx_TraceLine(689,0,__PYX_ERR(5, 689, __pyx_L1_error)) xmlFreeNode(__pyx_v_c_node); - /* "src/lxml/apihelpers.pxi":690 + /* "src/lxml/apihelpers.pxi":689 * tree.xmlUnlinkNode(c_node) * tree.xmlFreeNode(c_node) * c_node = c_next # <<<<<<<<<<<<<< * * cdef xmlNode* _createTextNode(xmlDoc* doc, value) except NULL: */ - __Pyx_TraceLine(690,0,__PYX_ERR(5, 690, __pyx_L1_error)) __pyx_v_c_node = __pyx_v_c_next; } - /* "src/lxml/apihelpers.pxi":679 + /* "src/lxml/apihelpers.pxi":678 * return funicode(result) * * cdef void _removeText(xmlNode* c_node): # <<<<<<<<<<<<<< @@ -27117,15 +25860,10 @@ static void __pyx_f_4lxml_5etree__removeText(xmlNode *__pyx_v_c_node) { */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._removeText", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } -/* "src/lxml/apihelpers.pxi":692 +/* "src/lxml/apihelpers.pxi":691 * c_node = c_next * * cdef xmlNode* _createTextNode(xmlDoc* doc, value) except NULL: # <<<<<<<<<<<<<< @@ -27137,62 +25875,56 @@ static xmlNode *__pyx_f_4lxml_5etree__createTextNode(xmlDoc *__pyx_v_doc, PyObje xmlNode *__pyx_v_c_text_node; PyObject *__pyx_v_text = NULL; xmlNode *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_createTextNode", 0); - __Pyx_TraceCall("_createTextNode", __pyx_f[5], 692, 0, __PYX_ERR(5, 692, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":694 + /* "src/lxml/apihelpers.pxi":693 * cdef xmlNode* _createTextNode(xmlDoc* doc, value) except NULL: * cdef xmlNode* c_text_node * if isinstance(value, CDATA): # <<<<<<<<<<<<<< * c_text_node = tree.xmlNewCDataBlock( * doc, _xcstr((value)._utf8_data), */ - __Pyx_TraceLine(694,0,__PYX_ERR(5, 694, __pyx_L1_error)) __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_4lxml_5etree_CDATA); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":696 + /* "src/lxml/apihelpers.pxi":695 * if isinstance(value, CDATA): * c_text_node = tree.xmlNewCDataBlock( * doc, _xcstr((value)._utf8_data), # <<<<<<<<<<<<<< * python.PyBytes_GET_SIZE((value)._utf8_data)) * else: */ - __Pyx_TraceLine(696,0,__PYX_ERR(5, 696, __pyx_L1_error)) __pyx_t_3 = ((struct __pyx_obj_4lxml_5etree_CDATA *)__pyx_v_value)->_utf8_data; __Pyx_INCREF(__pyx_t_3); - /* "src/lxml/apihelpers.pxi":697 + /* "src/lxml/apihelpers.pxi":696 * c_text_node = tree.xmlNewCDataBlock( * doc, _xcstr((value)._utf8_data), * python.PyBytes_GET_SIZE((value)._utf8_data)) # <<<<<<<<<<<<<< * else: * text = _utf8(value) */ - __Pyx_TraceLine(697,0,__PYX_ERR(5, 697, __pyx_L1_error)) __pyx_t_4 = ((struct __pyx_obj_4lxml_5etree_CDATA *)__pyx_v_value)->_utf8_data; __Pyx_INCREF(__pyx_t_4); - /* "src/lxml/apihelpers.pxi":695 + /* "src/lxml/apihelpers.pxi":694 * cdef xmlNode* c_text_node * if isinstance(value, CDATA): * c_text_node = tree.xmlNewCDataBlock( # <<<<<<<<<<<<<< * doc, _xcstr((value)._utf8_data), * python.PyBytes_GET_SIZE((value)._utf8_data)) */ - __Pyx_TraceLine(695,0,__PYX_ERR(5, 695, __pyx_L1_error)) __pyx_v_c_text_node = xmlNewCDataBlock(__pyx_v_doc, (const xmlChar*)PyBytes_AS_STRING(__pyx_t_3), PyBytes_GET_SIZE(__pyx_t_4)); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":694 + /* "src/lxml/apihelpers.pxi":693 * cdef xmlNode* _createTextNode(xmlDoc* doc, value) except NULL: * cdef xmlNode* c_text_node * if isinstance(value, CDATA): # <<<<<<<<<<<<<< @@ -27202,54 +25934,50 @@ static xmlNode *__pyx_f_4lxml_5etree__createTextNode(xmlDoc *__pyx_v_doc, PyObje goto __pyx_L3; } - /* "src/lxml/apihelpers.pxi":699 + /* "src/lxml/apihelpers.pxi":698 * python.PyBytes_GET_SIZE((value)._utf8_data)) * else: * text = _utf8(value) # <<<<<<<<<<<<<< * c_text_node = tree.xmlNewDocText(doc, _xcstr(text)) * if not c_text_node: */ - __Pyx_TraceLine(699,0,__PYX_ERR(5, 699, __pyx_L1_error)) /*else*/ { - __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 699, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_text = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":700 + /* "src/lxml/apihelpers.pxi":699 * else: * text = _utf8(value) * c_text_node = tree.xmlNewDocText(doc, _xcstr(text)) # <<<<<<<<<<<<<< * if not c_text_node: * raise MemoryError() */ - __Pyx_TraceLine(700,0,__PYX_ERR(5, 700, __pyx_L1_error)) __pyx_v_c_text_node = xmlNewDocText(__pyx_v_doc, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_text)); } __pyx_L3:; - /* "src/lxml/apihelpers.pxi":701 + /* "src/lxml/apihelpers.pxi":700 * text = _utf8(value) * c_text_node = tree.xmlNewDocText(doc, _xcstr(text)) * if not c_text_node: # <<<<<<<<<<<<<< * raise MemoryError() * return c_text_node */ - __Pyx_TraceLine(701,0,__PYX_ERR(5, 701, __pyx_L1_error)) __pyx_t_2 = ((!(__pyx_v_c_text_node != 0)) != 0); if (unlikely(__pyx_t_2)) { - /* "src/lxml/apihelpers.pxi":702 + /* "src/lxml/apihelpers.pxi":701 * c_text_node = tree.xmlNewDocText(doc, _xcstr(text)) * if not c_text_node: * raise MemoryError() # <<<<<<<<<<<<<< * return c_text_node * */ - __Pyx_TraceLine(702,0,__PYX_ERR(5, 702, __pyx_L1_error)) - PyErr_NoMemory(); __PYX_ERR(5, 702, __pyx_L1_error) + PyErr_NoMemory(); __PYX_ERR(5, 701, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":701 + /* "src/lxml/apihelpers.pxi":700 * text = _utf8(value) * c_text_node = tree.xmlNewDocText(doc, _xcstr(text)) * if not c_text_node: # <<<<<<<<<<<<<< @@ -27258,18 +25986,17 @@ static xmlNode *__pyx_f_4lxml_5etree__createTextNode(xmlDoc *__pyx_v_doc, PyObje */ } - /* "src/lxml/apihelpers.pxi":703 + /* "src/lxml/apihelpers.pxi":702 * if not c_text_node: * raise MemoryError() * return c_text_node # <<<<<<<<<<<<<< * * cdef int _setNodeText(xmlNode* c_node, value) except -1: */ - __Pyx_TraceLine(703,0,__PYX_ERR(5, 703, __pyx_L1_error)) __pyx_r = __pyx_v_c_text_node; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":692 + /* "src/lxml/apihelpers.pxi":691 * c_node = c_next * * cdef xmlNode* _createTextNode(xmlDoc* doc, value) except NULL: # <<<<<<<<<<<<<< @@ -27285,12 +26012,11 @@ static xmlNode *__pyx_f_4lxml_5etree__createTextNode(xmlDoc *__pyx_v_doc, PyObje __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_text); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":705 +/* "src/lxml/apihelpers.pxi":704 * return c_text_node * * cdef int _setNodeText(xmlNode* c_node, value) except -1: # <<<<<<<<<<<<<< @@ -27301,48 +26027,43 @@ static xmlNode *__pyx_f_4lxml_5etree__createTextNode(xmlDoc *__pyx_v_doc, PyObje static int __pyx_f_4lxml_5etree__setNodeText(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_value) { xmlNode *__pyx_v_c_text_node; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; xmlNode *__pyx_t_3; __Pyx_RefNannySetupContext("_setNodeText", 0); - __Pyx_TraceCall("_setNodeText", __pyx_f[5], 705, 0, __PYX_ERR(5, 705, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":707 + /* "src/lxml/apihelpers.pxi":706 * cdef int _setNodeText(xmlNode* c_node, value) except -1: * # remove all text nodes at the start first * _removeText(c_node.children) # <<<<<<<<<<<<<< * if value is None: * return 0 */ - __Pyx_TraceLine(707,0,__PYX_ERR(5, 707, __pyx_L1_error)) __pyx_f_4lxml_5etree__removeText(__pyx_v_c_node->children); - /* "src/lxml/apihelpers.pxi":708 + /* "src/lxml/apihelpers.pxi":707 * # remove all text nodes at the start first * _removeText(c_node.children) * if value is None: # <<<<<<<<<<<<<< * return 0 * # now add new text node with value at start */ - __Pyx_TraceLine(708,0,__PYX_ERR(5, 708, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_value == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":709 + /* "src/lxml/apihelpers.pxi":708 * _removeText(c_node.children) * if value is None: * return 0 # <<<<<<<<<<<<<< * # now add new text node with value at start * c_text_node = _createTextNode(c_node.doc, value) */ - __Pyx_TraceLine(709,0,__PYX_ERR(5, 709, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":708 + /* "src/lxml/apihelpers.pxi":707 * # remove all text nodes at the start first * _removeText(c_node.children) * if value is None: # <<<<<<<<<<<<<< @@ -27351,39 +26072,36 @@ static int __pyx_f_4lxml_5etree__setNodeText(xmlNode *__pyx_v_c_node, PyObject * */ } - /* "src/lxml/apihelpers.pxi":711 + /* "src/lxml/apihelpers.pxi":710 * return 0 * # now add new text node with value at start * c_text_node = _createTextNode(c_node.doc, value) # <<<<<<<<<<<<<< * if c_node.children is NULL: * tree.xmlAddChild(c_node, c_text_node) */ - __Pyx_TraceLine(711,0,__PYX_ERR(5, 711, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree__createTextNode(__pyx_v_c_node->doc, __pyx_v_value); if (unlikely(__pyx_t_3 == ((xmlNode *)NULL))) __PYX_ERR(5, 711, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__createTextNode(__pyx_v_c_node->doc, __pyx_v_value); if (unlikely(__pyx_t_3 == ((xmlNode *)NULL))) __PYX_ERR(5, 710, __pyx_L1_error) __pyx_v_c_text_node = __pyx_t_3; - /* "src/lxml/apihelpers.pxi":712 + /* "src/lxml/apihelpers.pxi":711 * # now add new text node with value at start * c_text_node = _createTextNode(c_node.doc, value) * if c_node.children is NULL: # <<<<<<<<<<<<<< * tree.xmlAddChild(c_node, c_text_node) * else: */ - __Pyx_TraceLine(712,0,__PYX_ERR(5, 712, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node->children == NULL) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":713 + /* "src/lxml/apihelpers.pxi":712 * c_text_node = _createTextNode(c_node.doc, value) * if c_node.children is NULL: * tree.xmlAddChild(c_node, c_text_node) # <<<<<<<<<<<<<< * else: * tree.xmlAddPrevSibling(c_node.children, c_text_node) */ - __Pyx_TraceLine(713,0,__PYX_ERR(5, 713, __pyx_L1_error)) (void)(xmlAddChild(__pyx_v_c_node, __pyx_v_c_text_node)); - /* "src/lxml/apihelpers.pxi":712 + /* "src/lxml/apihelpers.pxi":711 * # now add new text node with value at start * c_text_node = _createTextNode(c_node.doc, value) * if c_node.children is NULL: # <<<<<<<<<<<<<< @@ -27393,31 +26111,29 @@ static int __pyx_f_4lxml_5etree__setNodeText(xmlNode *__pyx_v_c_node, PyObject * goto __pyx_L4; } - /* "src/lxml/apihelpers.pxi":715 + /* "src/lxml/apihelpers.pxi":714 * tree.xmlAddChild(c_node, c_text_node) * else: * tree.xmlAddPrevSibling(c_node.children, c_text_node) # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(715,0,__PYX_ERR(5, 715, __pyx_L1_error)) /*else*/ { (void)(xmlAddPrevSibling(__pyx_v_c_node->children, __pyx_v_c_text_node)); } __pyx_L4:; - /* "src/lxml/apihelpers.pxi":716 + /* "src/lxml/apihelpers.pxi":715 * else: * tree.xmlAddPrevSibling(c_node.children, c_text_node) * return 0 # <<<<<<<<<<<<<< * * cdef int _setTailText(xmlNode* c_node, value) except -1: */ - __Pyx_TraceLine(716,0,__PYX_ERR(5, 716, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":705 + /* "src/lxml/apihelpers.pxi":704 * return c_text_node * * cdef int _setNodeText(xmlNode* c_node, value) except -1: # <<<<<<<<<<<<<< @@ -27430,12 +26146,11 @@ static int __pyx_f_4lxml_5etree__setNodeText(xmlNode *__pyx_v_c_node, PyObject * __Pyx_AddTraceback("lxml.etree._setNodeText", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":718 +/* "src/lxml/apihelpers.pxi":717 * return 0 * * cdef int _setTailText(xmlNode* c_node, value) except -1: # <<<<<<<<<<<<<< @@ -27446,48 +26161,43 @@ static int __pyx_f_4lxml_5etree__setNodeText(xmlNode *__pyx_v_c_node, PyObject * static int __pyx_f_4lxml_5etree__setTailText(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_value) { xmlNode *__pyx_v_c_text_node; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; xmlNode *__pyx_t_3; __Pyx_RefNannySetupContext("_setTailText", 0); - __Pyx_TraceCall("_setTailText", __pyx_f[5], 718, 0, __PYX_ERR(5, 718, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":720 + /* "src/lxml/apihelpers.pxi":719 * cdef int _setTailText(xmlNode* c_node, value) except -1: * # remove all text nodes at the start first * _removeText(c_node.next) # <<<<<<<<<<<<<< * if value is None: * return 0 */ - __Pyx_TraceLine(720,0,__PYX_ERR(5, 720, __pyx_L1_error)) __pyx_f_4lxml_5etree__removeText(__pyx_v_c_node->next); - /* "src/lxml/apihelpers.pxi":721 + /* "src/lxml/apihelpers.pxi":720 * # remove all text nodes at the start first * _removeText(c_node.next) * if value is None: # <<<<<<<<<<<<<< * return 0 * # now append new text node with value */ - __Pyx_TraceLine(721,0,__PYX_ERR(5, 721, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_value == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":722 + /* "src/lxml/apihelpers.pxi":721 * _removeText(c_node.next) * if value is None: * return 0 # <<<<<<<<<<<<<< * # now append new text node with value * c_text_node = _createTextNode(c_node.doc, value) */ - __Pyx_TraceLine(722,0,__PYX_ERR(5, 722, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":721 + /* "src/lxml/apihelpers.pxi":720 * # remove all text nodes at the start first * _removeText(c_node.next) * if value is None: # <<<<<<<<<<<<<< @@ -27496,39 +26206,36 @@ static int __pyx_f_4lxml_5etree__setTailText(xmlNode *__pyx_v_c_node, PyObject * */ } - /* "src/lxml/apihelpers.pxi":724 + /* "src/lxml/apihelpers.pxi":723 * return 0 * # now append new text node with value * c_text_node = _createTextNode(c_node.doc, value) # <<<<<<<<<<<<<< * tree.xmlAddNextSibling(c_node, c_text_node) * return 0 */ - __Pyx_TraceLine(724,0,__PYX_ERR(5, 724, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree__createTextNode(__pyx_v_c_node->doc, __pyx_v_value); if (unlikely(__pyx_t_3 == ((xmlNode *)NULL))) __PYX_ERR(5, 724, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__createTextNode(__pyx_v_c_node->doc, __pyx_v_value); if (unlikely(__pyx_t_3 == ((xmlNode *)NULL))) __PYX_ERR(5, 723, __pyx_L1_error) __pyx_v_c_text_node = __pyx_t_3; - /* "src/lxml/apihelpers.pxi":725 + /* "src/lxml/apihelpers.pxi":724 * # now append new text node with value * c_text_node = _createTextNode(c_node.doc, value) * tree.xmlAddNextSibling(c_node, c_text_node) # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(725,0,__PYX_ERR(5, 725, __pyx_L1_error)) (void)(xmlAddNextSibling(__pyx_v_c_node, __pyx_v_c_text_node)); - /* "src/lxml/apihelpers.pxi":726 + /* "src/lxml/apihelpers.pxi":725 * c_text_node = _createTextNode(c_node.doc, value) * tree.xmlAddNextSibling(c_node, c_text_node) * return 0 # <<<<<<<<<<<<<< * * cdef bytes _resolveQNameText(_Element element, value): */ - __Pyx_TraceLine(726,0,__PYX_ERR(5, 726, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":718 + /* "src/lxml/apihelpers.pxi":717 * return 0 * * cdef int _setTailText(xmlNode* c_node, value) except -1: # <<<<<<<<<<<<<< @@ -27541,12 +26248,11 @@ static int __pyx_f_4lxml_5etree__setTailText(xmlNode *__pyx_v_c_node, PyObject * __Pyx_AddTraceback("lxml.etree._setTailText", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":728 +/* "src/lxml/apihelpers.pxi":727 * return 0 * * cdef bytes _resolveQNameText(_Element element, value): # <<<<<<<<<<<<<< @@ -27559,7 +26265,6 @@ static PyObject *__pyx_f_4lxml_5etree__resolveQNameText(struct LxmlElement *__py PyObject *__pyx_v_ns = NULL; PyObject *__pyx_v_tag = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -27568,17 +26273,15 @@ static PyObject *__pyx_f_4lxml_5etree__resolveQNameText(struct LxmlElement *__py int __pyx_t_5; xmlNs *__pyx_t_6; __Pyx_RefNannySetupContext("_resolveQNameText", 0); - __Pyx_TraceCall("_resolveQNameText", __pyx_f[5], 728, 0, __PYX_ERR(5, 728, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":730 + /* "src/lxml/apihelpers.pxi":729 * cdef bytes _resolveQNameText(_Element element, value): * cdef xmlNs* c_ns * ns, tag = _getNsTag(value) # <<<<<<<<<<<<<< * if ns is None: * return tag */ - __Pyx_TraceLine(730,0,__PYX_ERR(5, 730, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 730, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(__pyx_t_1 != Py_None)) { PyObject* sequence = __pyx_t_1; @@ -27586,7 +26289,7 @@ static PyObject *__pyx_f_4lxml_5etree__resolveQNameText(struct LxmlElement *__py if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(5, 730, __pyx_L1_error) + __PYX_ERR(5, 729, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); @@ -27594,47 +26297,45 @@ static PyObject *__pyx_f_4lxml_5etree__resolveQNameText(struct LxmlElement *__py __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 730, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 730, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(5, 730, __pyx_L1_error) + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(5, 729, __pyx_L1_error) } __pyx_v_ns = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_tag = __pyx_t_3; __pyx_t_3 = 0; - /* "src/lxml/apihelpers.pxi":731 + /* "src/lxml/apihelpers.pxi":730 * cdef xmlNs* c_ns * ns, tag = _getNsTag(value) * if ns is None: # <<<<<<<<<<<<<< * return tag * else: */ - __Pyx_TraceLine(731,0,__PYX_ERR(5, 731, __pyx_L1_error)) __pyx_t_4 = (__pyx_v_ns == Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "src/lxml/apihelpers.pxi":732 + /* "src/lxml/apihelpers.pxi":731 * ns, tag = _getNsTag(value) * if ns is None: * return tag # <<<<<<<<<<<<<< * else: * c_ns = element._doc._findOrBuildNodeNs( */ - __Pyx_TraceLine(732,0,__PYX_ERR(5, 732, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - if (!(likely(PyBytes_CheckExact(__pyx_v_tag))||((__pyx_v_tag) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_tag)->tp_name), 0))) __PYX_ERR(5, 732, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_v_tag))||((__pyx_v_tag) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_tag)->tp_name), 0))) __PYX_ERR(5, 731, __pyx_L1_error) __Pyx_INCREF(__pyx_v_tag); __pyx_r = ((PyObject*)__pyx_v_tag); goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":731 + /* "src/lxml/apihelpers.pxi":730 * cdef xmlNs* c_ns * ns, tag = _getNsTag(value) * if ns is None: # <<<<<<<<<<<<<< @@ -27643,44 +26344,41 @@ static PyObject *__pyx_f_4lxml_5etree__resolveQNameText(struct LxmlElement *__py */ } - /* "src/lxml/apihelpers.pxi":734 + /* "src/lxml/apihelpers.pxi":733 * return tag * else: * c_ns = element._doc._findOrBuildNodeNs( # <<<<<<<<<<<<<< * element._c_node, _xcstr(ns), NULL, 0) * return python.PyBytes_FromFormat('%s:%s', c_ns.prefix, _cstr(tag)) */ - __Pyx_TraceLine(734,0,__PYX_ERR(5, 734, __pyx_L1_error)) /*else*/ { - /* "src/lxml/apihelpers.pxi":735 + /* "src/lxml/apihelpers.pxi":734 * else: * c_ns = element._doc._findOrBuildNodeNs( * element._c_node, _xcstr(ns), NULL, 0) # <<<<<<<<<<<<<< * return python.PyBytes_FromFormat('%s:%s', c_ns.prefix, _cstr(tag)) * */ - __Pyx_TraceLine(735,0,__PYX_ERR(5, 735, __pyx_L1_error)) - __pyx_t_6 = __pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(__pyx_v_element->_doc, __pyx_v_element->_c_node, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_ns), NULL, 0); if (unlikely(__pyx_t_6 == ((xmlNs *)NULL))) __PYX_ERR(5, 734, __pyx_L1_error) + __pyx_t_6 = __pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(__pyx_v_element->_doc, __pyx_v_element->_c_node, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_ns), NULL, 0); if (unlikely(__pyx_t_6 == ((xmlNs *)NULL))) __PYX_ERR(5, 733, __pyx_L1_error) __pyx_v_c_ns = __pyx_t_6; - /* "src/lxml/apihelpers.pxi":736 + /* "src/lxml/apihelpers.pxi":735 * c_ns = element._doc._findOrBuildNodeNs( * element._c_node, _xcstr(ns), NULL, 0) * return python.PyBytes_FromFormat('%s:%s', c_ns.prefix, _cstr(tag)) # <<<<<<<<<<<<<< * * cdef inline bint _hasChild(xmlNode* c_node): */ - __Pyx_TraceLine(736,0,__PYX_ERR(5, 736, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyBytes_FromFormat(((char *)"%s:%s"), __pyx_v_c_ns->prefix, PyBytes_AS_STRING(__pyx_v_tag)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 736, __pyx_L1_error) + __pyx_t_1 = PyBytes_FromFormat(((char *)"%s:%s"), __pyx_v_c_ns->prefix, PyBytes_AS_STRING(__pyx_v_tag)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 735, __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":728 + /* "src/lxml/apihelpers.pxi":727 * return 0 * * cdef bytes _resolveQNameText(_Element element, value): # <<<<<<<<<<<<<< @@ -27699,12 +26397,11 @@ static PyObject *__pyx_f_4lxml_5etree__resolveQNameText(struct LxmlElement *__py __Pyx_XDECREF(__pyx_v_ns); __Pyx_XDECREF(__pyx_v_tag); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":738 +/* "src/lxml/apihelpers.pxi":737 * return python.PyBytes_FromFormat('%s:%s', c_ns.prefix, _cstr(tag)) * * cdef inline bint _hasChild(xmlNode* c_node): # <<<<<<<<<<<<<< @@ -27714,21 +26411,18 @@ static PyObject *__pyx_f_4lxml_5etree__resolveQNameText(struct LxmlElement *__py static CYTHON_INLINE int __pyx_f_4lxml_5etree__hasChild(xmlNode *__pyx_v_c_node) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_hasChild", 0); - __Pyx_TraceCall("_hasChild", __pyx_f[5], 738, 0, __PYX_ERR(5, 738, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":739 + /* "src/lxml/apihelpers.pxi":738 * * cdef inline bint _hasChild(xmlNode* c_node): * return c_node is not NULL and _findChildForwards(c_node, 0) is not NULL # <<<<<<<<<<<<<< * * cdef inline Py_ssize_t _countElements(xmlNode* c_node): */ - __Pyx_TraceLine(739,0,__PYX_ERR(5, 739, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node != NULL) != 0); if (__pyx_t_2) { } else { @@ -27741,7 +26435,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__hasChild(xmlNode *__pyx_v_c_node) __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":738 + /* "src/lxml/apihelpers.pxi":737 * return python.PyBytes_FromFormat('%s:%s', c_ns.prefix, _cstr(tag)) * * cdef inline bint _hasChild(xmlNode* c_node): # <<<<<<<<<<<<<< @@ -27750,16 +26444,12 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__hasChild(xmlNode *__pyx_v_c_node) */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._hasChild", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":741 +/* "src/lxml/apihelpers.pxi":740 * return c_node is not NULL and _findChildForwards(c_node, 0) is not NULL * * cdef inline Py_ssize_t _countElements(xmlNode* c_node): # <<<<<<<<<<<<<< @@ -27770,57 +26460,51 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__hasChild(xmlNode *__pyx_v_c_node) static CYTHON_INLINE Py_ssize_t __pyx_f_4lxml_5etree__countElements(xmlNode *__pyx_v_c_node) { Py_ssize_t __pyx_v_count; Py_ssize_t __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlNode *__pyx_t_2; __Pyx_RefNannySetupContext("_countElements", 0); - __Pyx_TraceCall("_countElements", __pyx_f[5], 741, 0, __PYX_ERR(5, 741, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":744 + /* "src/lxml/apihelpers.pxi":743 * u"Counts the elements within the following siblings and the node itself." * cdef Py_ssize_t count * count = 0 # <<<<<<<<<<<<<< * while c_node is not NULL: * if _isElement(c_node): */ - __Pyx_TraceLine(744,0,__PYX_ERR(5, 744, __pyx_L1_error)) __pyx_v_count = 0; - /* "src/lxml/apihelpers.pxi":745 + /* "src/lxml/apihelpers.pxi":744 * cdef Py_ssize_t count * count = 0 * while c_node is not NULL: # <<<<<<<<<<<<<< * if _isElement(c_node): * count += 1 */ - __Pyx_TraceLine(745,0,__PYX_ERR(5, 745, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_node != NULL) != 0); if (!__pyx_t_1) break; - /* "src/lxml/apihelpers.pxi":746 + /* "src/lxml/apihelpers.pxi":745 * count = 0 * while c_node is not NULL: * if _isElement(c_node): # <<<<<<<<<<<<<< * count += 1 * c_node = c_node.next */ - __Pyx_TraceLine(746,0,__PYX_ERR(5, 746, __pyx_L1_error)) __pyx_t_1 = (_isElement(__pyx_v_c_node) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":747 + /* "src/lxml/apihelpers.pxi":746 * while c_node is not NULL: * if _isElement(c_node): * count += 1 # <<<<<<<<<<<<<< * c_node = c_node.next * return count */ - __Pyx_TraceLine(747,0,__PYX_ERR(5, 747, __pyx_L1_error)) __pyx_v_count = (__pyx_v_count + 1); - /* "src/lxml/apihelpers.pxi":746 + /* "src/lxml/apihelpers.pxi":745 * count = 0 * while c_node is not NULL: * if _isElement(c_node): # <<<<<<<<<<<<<< @@ -27829,30 +26513,28 @@ static CYTHON_INLINE Py_ssize_t __pyx_f_4lxml_5etree__countElements(xmlNode *__p */ } - /* "src/lxml/apihelpers.pxi":748 + /* "src/lxml/apihelpers.pxi":747 * if _isElement(c_node): * count += 1 * c_node = c_node.next # <<<<<<<<<<<<<< * return count * */ - __Pyx_TraceLine(748,0,__PYX_ERR(5, 748, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->next; __pyx_v_c_node = __pyx_t_2; } - /* "src/lxml/apihelpers.pxi":749 + /* "src/lxml/apihelpers.pxi":748 * count += 1 * c_node = c_node.next * return count # <<<<<<<<<<<<<< * * cdef int _findChildSlice( */ - __Pyx_TraceLine(749,0,__PYX_ERR(5, 749, __pyx_L1_error)) __pyx_r = __pyx_v_count; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":741 + /* "src/lxml/apihelpers.pxi":740 * return c_node is not NULL and _findChildForwards(c_node, 0) is not NULL * * cdef inline Py_ssize_t _countElements(xmlNode* c_node): # <<<<<<<<<<<<<< @@ -27861,16 +26543,12 @@ static CYTHON_INLINE Py_ssize_t __pyx_f_4lxml_5etree__countElements(xmlNode *__p */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._countElements", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":751 +/* "src/lxml/apihelpers.pxi":750 * return count * * cdef int _findChildSlice( # <<<<<<<<<<<<<< @@ -27883,90 +26561,81 @@ static int __pyx_f_4lxml_5etree__findChildSlice(PyObject *__pyx_v_sliceobject, x Py_ssize_t __pyx_v_stop; Py_ssize_t __pyx_v_childcount; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("_findChildSlice", 0); - __Pyx_TraceCall("_findChildSlice", __pyx_f[5], 751, 0, __PYX_ERR(5, 751, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":759 + /* "src/lxml/apihelpers.pxi":758 * pointer arguments. * """ * cdef Py_ssize_t start = 0, stop = 0, childcount # <<<<<<<<<<<<<< * childcount = _countElements(c_parent.children) * if childcount == 0: */ - __Pyx_TraceLine(759,0,__PYX_ERR(5, 759, __pyx_L1_error)) __pyx_v_start = 0; __pyx_v_stop = 0; - /* "src/lxml/apihelpers.pxi":760 + /* "src/lxml/apihelpers.pxi":759 * """ * cdef Py_ssize_t start = 0, stop = 0, childcount * childcount = _countElements(c_parent.children) # <<<<<<<<<<<<<< * if childcount == 0: * c_start_node[0] = NULL */ - __Pyx_TraceLine(760,0,__PYX_ERR(5, 760, __pyx_L1_error)) __pyx_v_childcount = __pyx_f_4lxml_5etree__countElements(__pyx_v_c_parent->children); - /* "src/lxml/apihelpers.pxi":761 + /* "src/lxml/apihelpers.pxi":760 * cdef Py_ssize_t start = 0, stop = 0, childcount * childcount = _countElements(c_parent.children) * if childcount == 0: # <<<<<<<<<<<<<< * c_start_node[0] = NULL * c_length[0] = 0 */ - __Pyx_TraceLine(761,0,__PYX_ERR(5, 761, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_childcount == 0) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":762 + /* "src/lxml/apihelpers.pxi":761 * childcount = _countElements(c_parent.children) * if childcount == 0: * c_start_node[0] = NULL # <<<<<<<<<<<<<< * c_length[0] = 0 * if sliceobject.step is None: */ - __Pyx_TraceLine(762,0,__PYX_ERR(5, 762, __pyx_L1_error)) (__pyx_v_c_start_node[0]) = NULL; - /* "src/lxml/apihelpers.pxi":763 + /* "src/lxml/apihelpers.pxi":762 * if childcount == 0: * c_start_node[0] = NULL * c_length[0] = 0 # <<<<<<<<<<<<<< * if sliceobject.step is None: * c_step[0] = 1 */ - __Pyx_TraceLine(763,0,__PYX_ERR(5, 763, __pyx_L1_error)) (__pyx_v_c_length[0]) = 0; - /* "src/lxml/apihelpers.pxi":764 + /* "src/lxml/apihelpers.pxi":763 * c_start_node[0] = NULL * c_length[0] = 0 * if sliceobject.step is None: # <<<<<<<<<<<<<< * c_step[0] = 1 * else: */ - __Pyx_TraceLine(764,0,__PYX_ERR(5, 764, __pyx_L1_error)) __pyx_t_1 = (((PySliceObject*)__pyx_v_sliceobject)->step == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":765 + /* "src/lxml/apihelpers.pxi":764 * c_length[0] = 0 * if sliceobject.step is None: * c_step[0] = 1 # <<<<<<<<<<<<<< * else: * python._PyEval_SliceIndex(sliceobject.step, c_step) */ - __Pyx_TraceLine(765,0,__PYX_ERR(5, 765, __pyx_L1_error)) (__pyx_v_c_step[0]) = 1; - /* "src/lxml/apihelpers.pxi":764 + /* "src/lxml/apihelpers.pxi":763 * c_start_node[0] = NULL * c_length[0] = 0 * if sliceobject.step is None: # <<<<<<<<<<<<<< @@ -27976,34 +26645,32 @@ static int __pyx_f_4lxml_5etree__findChildSlice(PyObject *__pyx_v_sliceobject, x goto __pyx_L4; } - /* "src/lxml/apihelpers.pxi":767 + /* "src/lxml/apihelpers.pxi":766 * c_step[0] = 1 * else: * python._PyEval_SliceIndex(sliceobject.step, c_step) # <<<<<<<<<<<<<< * return 0 * python.PySlice_GetIndicesEx( */ - __Pyx_TraceLine(767,0,__PYX_ERR(5, 767, __pyx_L1_error)) /*else*/ { __pyx_t_3 = ((PySliceObject*)__pyx_v_sliceobject)->step; __Pyx_INCREF(__pyx_t_3); - __pyx_t_4 = _PyEval_SliceIndex(__pyx_t_3, __pyx_v_c_step); if (unlikely(__pyx_t_4 == ((int)0))) __PYX_ERR(5, 767, __pyx_L1_error) + __pyx_t_4 = _PyEval_SliceIndex(__pyx_t_3, __pyx_v_c_step); if (unlikely(__pyx_t_4 == ((int)0))) __PYX_ERR(5, 766, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L4:; - /* "src/lxml/apihelpers.pxi":768 + /* "src/lxml/apihelpers.pxi":767 * else: * python._PyEval_SliceIndex(sliceobject.step, c_step) * return 0 # <<<<<<<<<<<<<< * python.PySlice_GetIndicesEx( * sliceobject, childcount, &start, &stop, c_step, c_length) */ - __Pyx_TraceLine(768,0,__PYX_ERR(5, 768, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":761 + /* "src/lxml/apihelpers.pxi":760 * cdef Py_ssize_t start = 0, stop = 0, childcount * childcount = _countElements(c_parent.children) * if childcount == 0: # <<<<<<<<<<<<<< @@ -28012,38 +26679,35 @@ static int __pyx_f_4lxml_5etree__findChildSlice(PyObject *__pyx_v_sliceobject, x */ } - /* "src/lxml/apihelpers.pxi":769 + /* "src/lxml/apihelpers.pxi":768 * python._PyEval_SliceIndex(sliceobject.step, c_step) * return 0 * python.PySlice_GetIndicesEx( # <<<<<<<<<<<<<< * sliceobject, childcount, &start, &stop, c_step, c_length) * if start > childcount / 2: */ - __Pyx_TraceLine(769,0,__PYX_ERR(5, 769, __pyx_L1_error)) - __pyx_t_4 = _lx_PySlice_GetIndicesEx(__pyx_v_sliceobject, __pyx_v_childcount, (&__pyx_v_start), (&__pyx_v_stop), __pyx_v_c_step, __pyx_v_c_length); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(5, 769, __pyx_L1_error) + __pyx_t_4 = _lx_PySlice_GetIndicesEx(__pyx_v_sliceobject, __pyx_v_childcount, (&__pyx_v_start), (&__pyx_v_stop), __pyx_v_c_step, __pyx_v_c_length); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(5, 768, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":771 + /* "src/lxml/apihelpers.pxi":770 * python.PySlice_GetIndicesEx( * sliceobject, childcount, &start, &stop, c_step, c_length) * if start > childcount / 2: # <<<<<<<<<<<<<< * c_start_node[0] = _findChildBackwards(c_parent, childcount - start - 1) * else: */ - __Pyx_TraceLine(771,0,__PYX_ERR(5, 771, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_start > __Pyx_div_Py_ssize_t(__pyx_v_childcount, 2)) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":772 + /* "src/lxml/apihelpers.pxi":771 * sliceobject, childcount, &start, &stop, c_step, c_length) * if start > childcount / 2: * c_start_node[0] = _findChildBackwards(c_parent, childcount - start - 1) # <<<<<<<<<<<<<< * else: * c_start_node[0] = _findChild(c_parent, start) */ - __Pyx_TraceLine(772,0,__PYX_ERR(5, 772, __pyx_L1_error)) (__pyx_v_c_start_node[0]) = __pyx_f_4lxml_5etree__findChildBackwards(__pyx_v_c_parent, ((__pyx_v_childcount - __pyx_v_start) - 1)); - /* "src/lxml/apihelpers.pxi":771 + /* "src/lxml/apihelpers.pxi":770 * python.PySlice_GetIndicesEx( * sliceobject, childcount, &start, &stop, c_step, c_length) * if start > childcount / 2: # <<<<<<<<<<<<<< @@ -28053,31 +26717,29 @@ static int __pyx_f_4lxml_5etree__findChildSlice(PyObject *__pyx_v_sliceobject, x goto __pyx_L5; } - /* "src/lxml/apihelpers.pxi":774 + /* "src/lxml/apihelpers.pxi":773 * c_start_node[0] = _findChildBackwards(c_parent, childcount - start - 1) * else: * c_start_node[0] = _findChild(c_parent, start) # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(774,0,__PYX_ERR(5, 774, __pyx_L1_error)) /*else*/ { (__pyx_v_c_start_node[0]) = __pyx_f_4lxml_5etree__findChild(__pyx_v_c_parent, __pyx_v_start); } __pyx_L5:; - /* "src/lxml/apihelpers.pxi":775 + /* "src/lxml/apihelpers.pxi":774 * else: * c_start_node[0] = _findChild(c_parent, start) * return 0 # <<<<<<<<<<<<<< * * cdef bint _isFullSlice(slice sliceobject) except -1: */ - __Pyx_TraceLine(775,0,__PYX_ERR(5, 775, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":751 + /* "src/lxml/apihelpers.pxi":750 * return count * * cdef int _findChildSlice( # <<<<<<<<<<<<<< @@ -28091,12 +26753,11 @@ static int __pyx_f_4lxml_5etree__findChildSlice(PyObject *__pyx_v_sliceobject, x __Pyx_AddTraceback("lxml.etree._findChildSlice", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":777 +/* "src/lxml/apihelpers.pxi":776 * return 0 * * cdef bint _isFullSlice(slice sliceobject) except -1: # <<<<<<<<<<<<<< @@ -28107,7 +26768,6 @@ static int __pyx_f_4lxml_5etree__findChildSlice(PyObject *__pyx_v_sliceobject, x static int __pyx_f_4lxml_5etree__isFullSlice(PyObject *__pyx_v_sliceobject) { Py_ssize_t __pyx_v_step; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -28115,42 +26775,38 @@ static int __pyx_f_4lxml_5etree__isFullSlice(PyObject *__pyx_v_sliceobject) { PyObject *__pyx_t_4 = NULL; int __pyx_t_5; __Pyx_RefNannySetupContext("_isFullSlice", 0); - __Pyx_TraceCall("_isFullSlice", __pyx_f[5], 777, 0, __PYX_ERR(5, 777, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":780 + /* "src/lxml/apihelpers.pxi":779 * u"""Conservative guess if this slice is a full slice as in ``s[:]``. * """ * cdef Py_ssize_t step = 0 # <<<<<<<<<<<<<< * if sliceobject is None: * return 0 */ - __Pyx_TraceLine(780,0,__PYX_ERR(5, 780, __pyx_L1_error)) __pyx_v_step = 0; - /* "src/lxml/apihelpers.pxi":781 + /* "src/lxml/apihelpers.pxi":780 * """ * cdef Py_ssize_t step = 0 * if sliceobject is None: # <<<<<<<<<<<<<< * return 0 * if sliceobject.start is None and \ */ - __Pyx_TraceLine(781,0,__PYX_ERR(5, 781, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_sliceobject == ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":782 + /* "src/lxml/apihelpers.pxi":781 * cdef Py_ssize_t step = 0 * if sliceobject is None: * return 0 # <<<<<<<<<<<<<< * if sliceobject.start is None and \ * sliceobject.stop is None: */ - __Pyx_TraceLine(782,0,__PYX_ERR(5, 782, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":781 + /* "src/lxml/apihelpers.pxi":780 * """ * cdef Py_ssize_t step = 0 * if sliceobject is None: # <<<<<<<<<<<<<< @@ -28159,14 +26815,13 @@ static int __pyx_f_4lxml_5etree__isFullSlice(PyObject *__pyx_v_sliceobject) { */ } - /* "src/lxml/apihelpers.pxi":783 + /* "src/lxml/apihelpers.pxi":782 * if sliceobject is None: * return 0 * if sliceobject.start is None and \ # <<<<<<<<<<<<<< * sliceobject.stop is None: * if sliceobject.step is None: */ - __Pyx_TraceLine(783,0,__PYX_ERR(5, 783, __pyx_L1_error)) __pyx_t_1 = (((PySliceObject*)__pyx_v_sliceobject)->start == Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { @@ -28175,53 +26830,49 @@ static int __pyx_f_4lxml_5etree__isFullSlice(PyObject *__pyx_v_sliceobject) { goto __pyx_L5_bool_binop_done; } - /* "src/lxml/apihelpers.pxi":784 + /* "src/lxml/apihelpers.pxi":783 * return 0 * if sliceobject.start is None and \ * sliceobject.stop is None: # <<<<<<<<<<<<<< * if sliceobject.step is None: * return 1 */ - __Pyx_TraceLine(784,0,__PYX_ERR(5, 784, __pyx_L1_error)) __pyx_t_3 = (((PySliceObject*)__pyx_v_sliceobject)->stop == Py_None); __pyx_t_1 = (__pyx_t_3 != 0); __pyx_t_2 = __pyx_t_1; __pyx_L5_bool_binop_done:; - /* "src/lxml/apihelpers.pxi":783 + /* "src/lxml/apihelpers.pxi":782 * if sliceobject is None: * return 0 * if sliceobject.start is None and \ # <<<<<<<<<<<<<< * sliceobject.stop is None: * if sliceobject.step is None: */ - __Pyx_TraceLine(783,0,__PYX_ERR(5, 783, __pyx_L1_error)) if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":785 + /* "src/lxml/apihelpers.pxi":784 * if sliceobject.start is None and \ * sliceobject.stop is None: * if sliceobject.step is None: # <<<<<<<<<<<<<< * return 1 * python._PyEval_SliceIndex(sliceobject.step, &step) */ - __Pyx_TraceLine(785,0,__PYX_ERR(5, 785, __pyx_L1_error)) __pyx_t_2 = (((PySliceObject*)__pyx_v_sliceobject)->step == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":786 + /* "src/lxml/apihelpers.pxi":785 * sliceobject.stop is None: * if sliceobject.step is None: * return 1 # <<<<<<<<<<<<<< * python._PyEval_SliceIndex(sliceobject.step, &step) * if step == 1: */ - __Pyx_TraceLine(786,0,__PYX_ERR(5, 786, __pyx_L1_error)) __pyx_r = 1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":785 + /* "src/lxml/apihelpers.pxi":784 * if sliceobject.start is None and \ * sliceobject.stop is None: * if sliceobject.step is None: # <<<<<<<<<<<<<< @@ -28230,42 +26881,39 @@ static int __pyx_f_4lxml_5etree__isFullSlice(PyObject *__pyx_v_sliceobject) { */ } - /* "src/lxml/apihelpers.pxi":787 + /* "src/lxml/apihelpers.pxi":786 * if sliceobject.step is None: * return 1 * python._PyEval_SliceIndex(sliceobject.step, &step) # <<<<<<<<<<<<<< * if step == 1: * return 1 */ - __Pyx_TraceLine(787,0,__PYX_ERR(5, 787, __pyx_L1_error)) __pyx_t_4 = ((PySliceObject*)__pyx_v_sliceobject)->step; __Pyx_INCREF(__pyx_t_4); - __pyx_t_5 = _PyEval_SliceIndex(__pyx_t_4, (&__pyx_v_step)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(5, 787, __pyx_L1_error) + __pyx_t_5 = _PyEval_SliceIndex(__pyx_t_4, (&__pyx_v_step)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(5, 786, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":788 + /* "src/lxml/apihelpers.pxi":787 * return 1 * python._PyEval_SliceIndex(sliceobject.step, &step) * if step == 1: # <<<<<<<<<<<<<< * return 1 * return 0 */ - __Pyx_TraceLine(788,0,__PYX_ERR(5, 788, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_step == 1) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":789 + /* "src/lxml/apihelpers.pxi":788 * python._PyEval_SliceIndex(sliceobject.step, &step) * if step == 1: * return 1 # <<<<<<<<<<<<<< * return 0 * return 0 */ - __Pyx_TraceLine(789,0,__PYX_ERR(5, 789, __pyx_L1_error)) __pyx_r = 1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":788 + /* "src/lxml/apihelpers.pxi":787 * return 1 * python._PyEval_SliceIndex(sliceobject.step, &step) * if step == 1: # <<<<<<<<<<<<<< @@ -28274,18 +26922,17 @@ static int __pyx_f_4lxml_5etree__isFullSlice(PyObject *__pyx_v_sliceobject) { */ } - /* "src/lxml/apihelpers.pxi":790 + /* "src/lxml/apihelpers.pxi":789 * if step == 1: * return 1 * return 0 # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(790,0,__PYX_ERR(5, 790, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":783 + /* "src/lxml/apihelpers.pxi":782 * if sliceobject is None: * return 0 * if sliceobject.start is None and \ # <<<<<<<<<<<<<< @@ -28294,18 +26941,17 @@ static int __pyx_f_4lxml_5etree__isFullSlice(PyObject *__pyx_v_sliceobject) { */ } - /* "src/lxml/apihelpers.pxi":791 + /* "src/lxml/apihelpers.pxi":790 * return 1 * return 0 * return 0 # <<<<<<<<<<<<<< * * cdef _collectChildren(_Element element): */ - __Pyx_TraceLine(791,0,__PYX_ERR(5, 791, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":777 + /* "src/lxml/apihelpers.pxi":776 * return 0 * * cdef bint _isFullSlice(slice sliceobject) except -1: # <<<<<<<<<<<<<< @@ -28319,12 +26965,11 @@ static int __pyx_f_4lxml_5etree__isFullSlice(PyObject *__pyx_v_sliceobject) { __Pyx_AddTraceback("lxml.etree._isFullSlice", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":793 +/* "src/lxml/apihelpers.pxi":792 * return 0 * * cdef _collectChildren(_Element element): # <<<<<<<<<<<<<< @@ -28336,7 +26981,6 @@ static PyObject *__pyx_f_4lxml_5etree__collectChildren(struct LxmlElement *__pyx xmlNode *__pyx_v_c_node; PyObject *__pyx_v_result = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; xmlNode *__pyx_t_2; @@ -28344,65 +26988,59 @@ static PyObject *__pyx_f_4lxml_5etree__collectChildren(struct LxmlElement *__pyx PyObject *__pyx_t_4 = NULL; int __pyx_t_5; __Pyx_RefNannySetupContext("_collectChildren", 0); - __Pyx_TraceCall("_collectChildren", __pyx_f[5], 793, 0, __PYX_ERR(5, 793, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":795 + /* "src/lxml/apihelpers.pxi":794 * cdef _collectChildren(_Element element): * cdef xmlNode* c_node * cdef list result = [] # <<<<<<<<<<<<<< * c_node = element._c_node.children * if c_node is not NULL: */ - __Pyx_TraceLine(795,0,__PYX_ERR(5, 795, __pyx_L1_error)) - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 795, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 794, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/apihelpers.pxi":796 + /* "src/lxml/apihelpers.pxi":795 * cdef xmlNode* c_node * cdef list result = [] * c_node = element._c_node.children # <<<<<<<<<<<<<< * if c_node is not NULL: * if not _isElement(c_node): */ - __Pyx_TraceLine(796,0,__PYX_ERR(5, 796, __pyx_L1_error)) __pyx_t_2 = __pyx_v_element->_c_node->children; __pyx_v_c_node = __pyx_t_2; - /* "src/lxml/apihelpers.pxi":797 + /* "src/lxml/apihelpers.pxi":796 * cdef list result = [] * c_node = element._c_node.children * if c_node is not NULL: # <<<<<<<<<<<<<< * if not _isElement(c_node): * c_node = _nextElement(c_node) */ - __Pyx_TraceLine(797,0,__PYX_ERR(5, 797, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_node != NULL) != 0); if (__pyx_t_3) { - /* "src/lxml/apihelpers.pxi":798 + /* "src/lxml/apihelpers.pxi":797 * c_node = element._c_node.children * if c_node is not NULL: * if not _isElement(c_node): # <<<<<<<<<<<<<< * c_node = _nextElement(c_node) * while c_node is not NULL: */ - __Pyx_TraceLine(798,0,__PYX_ERR(5, 798, __pyx_L1_error)) __pyx_t_3 = ((!(_isElement(__pyx_v_c_node) != 0)) != 0); if (__pyx_t_3) { - /* "src/lxml/apihelpers.pxi":799 + /* "src/lxml/apihelpers.pxi":798 * if c_node is not NULL: * if not _isElement(c_node): * c_node = _nextElement(c_node) # <<<<<<<<<<<<<< * while c_node is not NULL: * result.append(_elementFactory(element._doc, c_node)) */ - __Pyx_TraceLine(799,0,__PYX_ERR(5, 799, __pyx_L1_error)) __pyx_v_c_node = __pyx_f_4lxml_5etree__nextElement(__pyx_v_c_node); - /* "src/lxml/apihelpers.pxi":798 + /* "src/lxml/apihelpers.pxi":797 * c_node = element._c_node.children * if c_node is not NULL: * if not _isElement(c_node): # <<<<<<<<<<<<<< @@ -28411,46 +27049,43 @@ static PyObject *__pyx_f_4lxml_5etree__collectChildren(struct LxmlElement *__pyx */ } - /* "src/lxml/apihelpers.pxi":800 + /* "src/lxml/apihelpers.pxi":799 * if not _isElement(c_node): * c_node = _nextElement(c_node) * while c_node is not NULL: # <<<<<<<<<<<<<< * result.append(_elementFactory(element._doc, c_node)) * c_node = _nextElement(c_node) */ - __Pyx_TraceLine(800,0,__PYX_ERR(5, 800, __pyx_L1_error)) while (1) { __pyx_t_3 = ((__pyx_v_c_node != NULL) != 0); if (!__pyx_t_3) break; - /* "src/lxml/apihelpers.pxi":801 + /* "src/lxml/apihelpers.pxi":800 * c_node = _nextElement(c_node) * while c_node is not NULL: * result.append(_elementFactory(element._doc, c_node)) # <<<<<<<<<<<<<< * c_node = _nextElement(c_node) * return result */ - __Pyx_TraceLine(801,0,__PYX_ERR(5, 801, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_v_element->_doc); __Pyx_INCREF(__pyx_t_1); - __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_1), __pyx_v_c_node)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 801, __pyx_L1_error) + __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_1), __pyx_v_c_node)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(5, 801, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(5, 800, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":802 + /* "src/lxml/apihelpers.pxi":801 * while c_node is not NULL: * result.append(_elementFactory(element._doc, c_node)) * c_node = _nextElement(c_node) # <<<<<<<<<<<<<< * return result * */ - __Pyx_TraceLine(802,0,__PYX_ERR(5, 802, __pyx_L1_error)) __pyx_v_c_node = __pyx_f_4lxml_5etree__nextElement(__pyx_v_c_node); } - /* "src/lxml/apihelpers.pxi":797 + /* "src/lxml/apihelpers.pxi":796 * cdef list result = [] * c_node = element._c_node.children * if c_node is not NULL: # <<<<<<<<<<<<<< @@ -28459,20 +27094,19 @@ static PyObject *__pyx_f_4lxml_5etree__collectChildren(struct LxmlElement *__pyx */ } - /* "src/lxml/apihelpers.pxi":803 + /* "src/lxml/apihelpers.pxi":802 * result.append(_elementFactory(element._doc, c_node)) * c_node = _nextElement(c_node) * return result # <<<<<<<<<<<<<< * * cdef inline xmlNode* _findChild(xmlNode* c_node, Py_ssize_t index): */ - __Pyx_TraceLine(803,0,__PYX_ERR(5, 803, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":793 + /* "src/lxml/apihelpers.pxi":792 * return 0 * * cdef _collectChildren(_Element element): # <<<<<<<<<<<<<< @@ -28489,12 +27123,11 @@ static PyObject *__pyx_f_4lxml_5etree__collectChildren(struct LxmlElement *__pyx __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":805 +/* "src/lxml/apihelpers.pxi":804 * return result * * cdef inline xmlNode* _findChild(xmlNode* c_node, Py_ssize_t index): # <<<<<<<<<<<<<< @@ -28504,35 +27137,31 @@ static PyObject *__pyx_f_4lxml_5etree__collectChildren(struct LxmlElement *__pyx static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__findChild(xmlNode *__pyx_v_c_node, Py_ssize_t __pyx_v_index) { xmlNode *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_findChild", 0); - __Pyx_TraceCall("_findChild", __pyx_f[5], 805, 0, __PYX_ERR(5, 805, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":806 + /* "src/lxml/apihelpers.pxi":805 * * cdef inline xmlNode* _findChild(xmlNode* c_node, Py_ssize_t index): * if index < 0: # <<<<<<<<<<<<<< * return _findChildBackwards(c_node, -index - 1) * else: */ - __Pyx_TraceLine(806,0,__PYX_ERR(5, 806, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_index < 0) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":807 + /* "src/lxml/apihelpers.pxi":806 * cdef inline xmlNode* _findChild(xmlNode* c_node, Py_ssize_t index): * if index < 0: * return _findChildBackwards(c_node, -index - 1) # <<<<<<<<<<<<<< * else: * return _findChildForwards(c_node, index) */ - __Pyx_TraceLine(807,0,__PYX_ERR(5, 807, __pyx_L1_error)) __pyx_r = __pyx_f_4lxml_5etree__findChildBackwards(__pyx_v_c_node, ((-__pyx_v_index) - 1)); goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":806 + /* "src/lxml/apihelpers.pxi":805 * * cdef inline xmlNode* _findChild(xmlNode* c_node, Py_ssize_t index): * if index < 0: # <<<<<<<<<<<<<< @@ -28541,20 +27170,19 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__findChild(xmlNode *__pyx_v_c */ } - /* "src/lxml/apihelpers.pxi":809 + /* "src/lxml/apihelpers.pxi":808 * return _findChildBackwards(c_node, -index - 1) * else: * return _findChildForwards(c_node, index) # <<<<<<<<<<<<<< * * cdef inline xmlNode* _findChildForwards(xmlNode* c_node, Py_ssize_t index): */ - __Pyx_TraceLine(809,0,__PYX_ERR(5, 809, __pyx_L1_error)) /*else*/ { __pyx_r = __pyx_f_4lxml_5etree__findChildForwards(__pyx_v_c_node, __pyx_v_index); goto __pyx_L0; } - /* "src/lxml/apihelpers.pxi":805 + /* "src/lxml/apihelpers.pxi":804 * return result * * cdef inline xmlNode* _findChild(xmlNode* c_node, Py_ssize_t index): # <<<<<<<<<<<<<< @@ -28563,16 +27191,12 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__findChild(xmlNode *__pyx_v_c */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._findChild", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":811 +/* "src/lxml/apihelpers.pxi":810 * return _findChildForwards(c_node, index) * * cdef inline xmlNode* _findChildForwards(xmlNode* c_node, Py_ssize_t index): # <<<<<<<<<<<<<< @@ -28584,80 +27208,72 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__findChildForwards(xmlNode *_ xmlNode *__pyx_v_c_child; Py_ssize_t __pyx_v_c; xmlNode *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlNode *__pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_findChildForwards", 0); - __Pyx_TraceCall("_findChildForwards", __pyx_f[5], 811, 0, __PYX_ERR(5, 811, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":816 + /* "src/lxml/apihelpers.pxi":815 * cdef xmlNode* c_child * cdef Py_ssize_t c * c_child = c_node.children # <<<<<<<<<<<<<< * c = 0 * while c_child is not NULL: */ - __Pyx_TraceLine(816,0,__PYX_ERR(5, 816, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_node->children; __pyx_v_c_child = __pyx_t_1; - /* "src/lxml/apihelpers.pxi":817 + /* "src/lxml/apihelpers.pxi":816 * cdef Py_ssize_t c * c_child = c_node.children * c = 0 # <<<<<<<<<<<<<< * while c_child is not NULL: * if _isElement(c_child): */ - __Pyx_TraceLine(817,0,__PYX_ERR(5, 817, __pyx_L1_error)) __pyx_v_c = 0; - /* "src/lxml/apihelpers.pxi":818 + /* "src/lxml/apihelpers.pxi":817 * c_child = c_node.children * c = 0 * while c_child is not NULL: # <<<<<<<<<<<<<< * if _isElement(c_child): * if c == index: */ - __Pyx_TraceLine(818,0,__PYX_ERR(5, 818, __pyx_L1_error)) while (1) { __pyx_t_2 = ((__pyx_v_c_child != NULL) != 0); if (!__pyx_t_2) break; - /* "src/lxml/apihelpers.pxi":819 + /* "src/lxml/apihelpers.pxi":818 * c = 0 * while c_child is not NULL: * if _isElement(c_child): # <<<<<<<<<<<<<< * if c == index: * return c_child */ - __Pyx_TraceLine(819,0,__PYX_ERR(5, 819, __pyx_L1_error)) __pyx_t_2 = (_isElement(__pyx_v_c_child) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":820 + /* "src/lxml/apihelpers.pxi":819 * while c_child is not NULL: * if _isElement(c_child): * if c == index: # <<<<<<<<<<<<<< * return c_child * c += 1 */ - __Pyx_TraceLine(820,0,__PYX_ERR(5, 820, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c == __pyx_v_index) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":821 + /* "src/lxml/apihelpers.pxi":820 * if _isElement(c_child): * if c == index: * return c_child # <<<<<<<<<<<<<< * c += 1 * c_child = c_child.next */ - __Pyx_TraceLine(821,0,__PYX_ERR(5, 821, __pyx_L1_error)) __pyx_r = __pyx_v_c_child; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":820 + /* "src/lxml/apihelpers.pxi":819 * while c_child is not NULL: * if _isElement(c_child): * if c == index: # <<<<<<<<<<<<<< @@ -28666,17 +27282,16 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__findChildForwards(xmlNode *_ */ } - /* "src/lxml/apihelpers.pxi":822 + /* "src/lxml/apihelpers.pxi":821 * if c == index: * return c_child * c += 1 # <<<<<<<<<<<<<< * c_child = c_child.next * return NULL */ - __Pyx_TraceLine(822,0,__PYX_ERR(5, 822, __pyx_L1_error)) __pyx_v_c = (__pyx_v_c + 1); - /* "src/lxml/apihelpers.pxi":819 + /* "src/lxml/apihelpers.pxi":818 * c = 0 * while c_child is not NULL: * if _isElement(c_child): # <<<<<<<<<<<<<< @@ -28685,30 +27300,28 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__findChildForwards(xmlNode *_ */ } - /* "src/lxml/apihelpers.pxi":823 + /* "src/lxml/apihelpers.pxi":822 * return c_child * c += 1 * c_child = c_child.next # <<<<<<<<<<<<<< * return NULL * */ - __Pyx_TraceLine(823,0,__PYX_ERR(5, 823, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_child->next; __pyx_v_c_child = __pyx_t_1; } - /* "src/lxml/apihelpers.pxi":824 + /* "src/lxml/apihelpers.pxi":823 * c += 1 * c_child = c_child.next * return NULL # <<<<<<<<<<<<<< * * cdef inline xmlNode* _findChildBackwards(xmlNode* c_node, Py_ssize_t index): */ - __Pyx_TraceLine(824,0,__PYX_ERR(5, 824, __pyx_L1_error)) __pyx_r = NULL; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":811 + /* "src/lxml/apihelpers.pxi":810 * return _findChildForwards(c_node, index) * * cdef inline xmlNode* _findChildForwards(xmlNode* c_node, Py_ssize_t index): # <<<<<<<<<<<<<< @@ -28717,16 +27330,12 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__findChildForwards(xmlNode *_ */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._findChildForwards", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":826 +/* "src/lxml/apihelpers.pxi":825 * return NULL * * cdef inline xmlNode* _findChildBackwards(xmlNode* c_node, Py_ssize_t index): # <<<<<<<<<<<<<< @@ -28738,80 +27347,72 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__findChildBackwards(xmlNode * xmlNode *__pyx_v_c_child; Py_ssize_t __pyx_v_c; xmlNode *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlNode *__pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_findChildBackwards", 0); - __Pyx_TraceCall("_findChildBackwards", __pyx_f[5], 826, 0, __PYX_ERR(5, 826, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":832 + /* "src/lxml/apihelpers.pxi":831 * cdef xmlNode* c_child * cdef Py_ssize_t c * c_child = c_node.last # <<<<<<<<<<<<<< * c = 0 * while c_child is not NULL: */ - __Pyx_TraceLine(832,0,__PYX_ERR(5, 832, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_node->last; __pyx_v_c_child = __pyx_t_1; - /* "src/lxml/apihelpers.pxi":833 + /* "src/lxml/apihelpers.pxi":832 * cdef Py_ssize_t c * c_child = c_node.last * c = 0 # <<<<<<<<<<<<<< * while c_child is not NULL: * if _isElement(c_child): */ - __Pyx_TraceLine(833,0,__PYX_ERR(5, 833, __pyx_L1_error)) __pyx_v_c = 0; - /* "src/lxml/apihelpers.pxi":834 + /* "src/lxml/apihelpers.pxi":833 * c_child = c_node.last * c = 0 * while c_child is not NULL: # <<<<<<<<<<<<<< * if _isElement(c_child): * if c == index: */ - __Pyx_TraceLine(834,0,__PYX_ERR(5, 834, __pyx_L1_error)) while (1) { __pyx_t_2 = ((__pyx_v_c_child != NULL) != 0); if (!__pyx_t_2) break; - /* "src/lxml/apihelpers.pxi":835 + /* "src/lxml/apihelpers.pxi":834 * c = 0 * while c_child is not NULL: * if _isElement(c_child): # <<<<<<<<<<<<<< * if c == index: * return c_child */ - __Pyx_TraceLine(835,0,__PYX_ERR(5, 835, __pyx_L1_error)) __pyx_t_2 = (_isElement(__pyx_v_c_child) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":836 + /* "src/lxml/apihelpers.pxi":835 * while c_child is not NULL: * if _isElement(c_child): * if c == index: # <<<<<<<<<<<<<< * return c_child * c += 1 */ - __Pyx_TraceLine(836,0,__PYX_ERR(5, 836, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c == __pyx_v_index) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":837 + /* "src/lxml/apihelpers.pxi":836 * if _isElement(c_child): * if c == index: * return c_child # <<<<<<<<<<<<<< * c += 1 * c_child = c_child.prev */ - __Pyx_TraceLine(837,0,__PYX_ERR(5, 837, __pyx_L1_error)) __pyx_r = __pyx_v_c_child; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":836 + /* "src/lxml/apihelpers.pxi":835 * while c_child is not NULL: * if _isElement(c_child): * if c == index: # <<<<<<<<<<<<<< @@ -28820,17 +27421,16 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__findChildBackwards(xmlNode * */ } - /* "src/lxml/apihelpers.pxi":838 + /* "src/lxml/apihelpers.pxi":837 * if c == index: * return c_child * c += 1 # <<<<<<<<<<<<<< * c_child = c_child.prev * return NULL */ - __Pyx_TraceLine(838,0,__PYX_ERR(5, 838, __pyx_L1_error)) __pyx_v_c = (__pyx_v_c + 1); - /* "src/lxml/apihelpers.pxi":835 + /* "src/lxml/apihelpers.pxi":834 * c = 0 * while c_child is not NULL: * if _isElement(c_child): # <<<<<<<<<<<<<< @@ -28839,30 +27439,28 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__findChildBackwards(xmlNode * */ } - /* "src/lxml/apihelpers.pxi":839 + /* "src/lxml/apihelpers.pxi":838 * return c_child * c += 1 * c_child = c_child.prev # <<<<<<<<<<<<<< * return NULL * */ - __Pyx_TraceLine(839,0,__PYX_ERR(5, 839, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_child->prev; __pyx_v_c_child = __pyx_t_1; } - /* "src/lxml/apihelpers.pxi":840 + /* "src/lxml/apihelpers.pxi":839 * c += 1 * c_child = c_child.prev * return NULL # <<<<<<<<<<<<<< * * cdef inline xmlNode* _textNodeOrSkip(xmlNode* c_node) nogil: */ - __Pyx_TraceLine(840,0,__PYX_ERR(5, 840, __pyx_L1_error)) __pyx_r = NULL; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":826 + /* "src/lxml/apihelpers.pxi":825 * return NULL * * cdef inline xmlNode* _findChildBackwards(xmlNode* c_node, Py_ssize_t index): # <<<<<<<<<<<<<< @@ -28871,16 +27469,12 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__findChildBackwards(xmlNode * */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._findChildBackwards", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":842 +/* "src/lxml/apihelpers.pxi":841 * return NULL * * cdef inline xmlNode* _textNodeOrSkip(xmlNode* c_node) nogil: # <<<<<<<<<<<<<< @@ -28890,56 +27484,42 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__findChildBackwards(xmlNode * static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__textNodeOrSkip(xmlNode *__pyx_v_c_node) { xmlNode *__pyx_r; - __Pyx_TraceDeclarations int __pyx_t_1; xmlNode *__pyx_t_2; - __Pyx_TraceCall("_textNodeOrSkip", __pyx_f[5], 842, 1, __PYX_ERR(5, 842, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":849 + /* "src/lxml/apihelpers.pxi":848 * nodes. * """ * while c_node is not NULL: # <<<<<<<<<<<<<< * if c_node.type == tree.XML_TEXT_NODE or \ * c_node.type == tree.XML_CDATA_SECTION_NODE: */ - __Pyx_TraceLine(849,1,__PYX_ERR(5, 849, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_node != NULL) != 0); if (!__pyx_t_1) break; - /* "src/lxml/apihelpers.pxi":850 + /* "src/lxml/apihelpers.pxi":849 * """ * while c_node is not NULL: * if c_node.type == tree.XML_TEXT_NODE or \ # <<<<<<<<<<<<<< * c_node.type == tree.XML_CDATA_SECTION_NODE: * return c_node */ - __Pyx_TraceLine(850,1,__PYX_ERR(5, 850, __pyx_L1_error)) switch (__pyx_v_c_node->type) { case XML_TEXT_NODE: - - /* "src/lxml/apihelpers.pxi":851 - * while c_node is not NULL: - * if c_node.type == tree.XML_TEXT_NODE or \ - * c_node.type == tree.XML_CDATA_SECTION_NODE: # <<<<<<<<<<<<<< - * return c_node - * elif c_node.type == tree.XML_XINCLUDE_START or \ - */ - __Pyx_TraceLine(851,1,__PYX_ERR(5, 851, __pyx_L1_error)) case XML_CDATA_SECTION_NODE: - /* "src/lxml/apihelpers.pxi":852 + /* "src/lxml/apihelpers.pxi":851 * if c_node.type == tree.XML_TEXT_NODE or \ * c_node.type == tree.XML_CDATA_SECTION_NODE: * return c_node # <<<<<<<<<<<<<< * elif c_node.type == tree.XML_XINCLUDE_START or \ * c_node.type == tree.XML_XINCLUDE_END: */ - __Pyx_TraceLine(852,1,__PYX_ERR(5, 852, __pyx_L1_error)) __pyx_r = __pyx_v_c_node; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":850 + /* "src/lxml/apihelpers.pxi":849 * """ * while c_node is not NULL: * if c_node.type == tree.XML_TEXT_NODE or \ # <<<<<<<<<<<<<< @@ -28947,39 +27527,28 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__textNodeOrSkip(xmlNode *__py * return c_node */ break; + case XML_XINCLUDE_START: - /* "src/lxml/apihelpers.pxi":853 + /* "src/lxml/apihelpers.pxi":852 * c_node.type == tree.XML_CDATA_SECTION_NODE: * return c_node * elif c_node.type == tree.XML_XINCLUDE_START or \ # <<<<<<<<<<<<<< * c_node.type == tree.XML_XINCLUDE_END: * c_node = c_node.next */ - __Pyx_TraceLine(853,1,__PYX_ERR(5, 853, __pyx_L1_error)) - case XML_XINCLUDE_START: - - /* "src/lxml/apihelpers.pxi":854 - * return c_node - * elif c_node.type == tree.XML_XINCLUDE_START or \ - * c_node.type == tree.XML_XINCLUDE_END: # <<<<<<<<<<<<<< - * c_node = c_node.next - * else: - */ - __Pyx_TraceLine(854,1,__PYX_ERR(5, 854, __pyx_L1_error)) case XML_XINCLUDE_END: - /* "src/lxml/apihelpers.pxi":855 + /* "src/lxml/apihelpers.pxi":854 * elif c_node.type == tree.XML_XINCLUDE_START or \ * c_node.type == tree.XML_XINCLUDE_END: * c_node = c_node.next # <<<<<<<<<<<<<< * else: * return NULL */ - __Pyx_TraceLine(855,1,__PYX_ERR(5, 855, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->next; __pyx_v_c_node = __pyx_t_2; - /* "src/lxml/apihelpers.pxi":853 + /* "src/lxml/apihelpers.pxi":852 * c_node.type == tree.XML_CDATA_SECTION_NODE: * return c_node * elif c_node.type == tree.XML_XINCLUDE_START or \ # <<<<<<<<<<<<<< @@ -28989,32 +27558,30 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__textNodeOrSkip(xmlNode *__py break; default: - /* "src/lxml/apihelpers.pxi":857 + /* "src/lxml/apihelpers.pxi":856 * c_node = c_node.next * else: * return NULL # <<<<<<<<<<<<<< * return NULL * */ - __Pyx_TraceLine(857,1,__PYX_ERR(5, 857, __pyx_L1_error)) __pyx_r = NULL; goto __pyx_L0; break; } } - /* "src/lxml/apihelpers.pxi":858 + /* "src/lxml/apihelpers.pxi":857 * else: * return NULL * return NULL # <<<<<<<<<<<<<< * * cdef inline xmlNode* _nextElement(xmlNode* c_node): */ - __Pyx_TraceLine(858,1,__PYX_ERR(5, 858, __pyx_L1_error)) __pyx_r = NULL; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":842 + /* "src/lxml/apihelpers.pxi":841 * return NULL * * cdef inline xmlNode* _textNodeOrSkip(xmlNode* c_node) nogil: # <<<<<<<<<<<<<< @@ -29023,15 +27590,11 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__textNodeOrSkip(xmlNode *__py */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._textNodeOrSkip", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":860 +/* "src/lxml/apihelpers.pxi":859 * return NULL * * cdef inline xmlNode* _nextElement(xmlNode* c_node): # <<<<<<<<<<<<<< @@ -29041,36 +27604,32 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__textNodeOrSkip(xmlNode *__py static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__nextElement(xmlNode *__pyx_v_c_node) { xmlNode *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlNode *__pyx_t_2; __Pyx_RefNannySetupContext("_nextElement", 0); - __Pyx_TraceCall("_nextElement", __pyx_f[5], 860, 0, __PYX_ERR(5, 860, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":863 + /* "src/lxml/apihelpers.pxi":862 * u"""Given a node, find the next sibling that is an element. * """ * if c_node is NULL: # <<<<<<<<<<<<<< * return NULL * c_node = c_node.next */ - __Pyx_TraceLine(863,0,__PYX_ERR(5, 863, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":864 + /* "src/lxml/apihelpers.pxi":863 * """ * if c_node is NULL: * return NULL # <<<<<<<<<<<<<< * c_node = c_node.next * while c_node is not NULL: */ - __Pyx_TraceLine(864,0,__PYX_ERR(5, 864, __pyx_L1_error)) __pyx_r = NULL; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":863 + /* "src/lxml/apihelpers.pxi":862 * u"""Given a node, find the next sibling that is an element. * """ * if c_node is NULL: # <<<<<<<<<<<<<< @@ -29079,52 +27638,48 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__nextElement(xmlNode *__pyx_v */ } - /* "src/lxml/apihelpers.pxi":865 + /* "src/lxml/apihelpers.pxi":864 * if c_node is NULL: * return NULL * c_node = c_node.next # <<<<<<<<<<<<<< * while c_node is not NULL: * if _isElement(c_node): */ - __Pyx_TraceLine(865,0,__PYX_ERR(5, 865, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->next; __pyx_v_c_node = __pyx_t_2; - /* "src/lxml/apihelpers.pxi":866 + /* "src/lxml/apihelpers.pxi":865 * return NULL * c_node = c_node.next * while c_node is not NULL: # <<<<<<<<<<<<<< * if _isElement(c_node): * return c_node */ - __Pyx_TraceLine(866,0,__PYX_ERR(5, 866, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_node != NULL) != 0); if (!__pyx_t_1) break; - /* "src/lxml/apihelpers.pxi":867 + /* "src/lxml/apihelpers.pxi":866 * c_node = c_node.next * while c_node is not NULL: * if _isElement(c_node): # <<<<<<<<<<<<<< * return c_node * c_node = c_node.next */ - __Pyx_TraceLine(867,0,__PYX_ERR(5, 867, __pyx_L1_error)) __pyx_t_1 = (_isElement(__pyx_v_c_node) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":868 + /* "src/lxml/apihelpers.pxi":867 * while c_node is not NULL: * if _isElement(c_node): * return c_node # <<<<<<<<<<<<<< * c_node = c_node.next * return NULL */ - __Pyx_TraceLine(868,0,__PYX_ERR(5, 868, __pyx_L1_error)) __pyx_r = __pyx_v_c_node; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":867 + /* "src/lxml/apihelpers.pxi":866 * c_node = c_node.next * while c_node is not NULL: * if _isElement(c_node): # <<<<<<<<<<<<<< @@ -29133,30 +27688,28 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__nextElement(xmlNode *__pyx_v */ } - /* "src/lxml/apihelpers.pxi":869 + /* "src/lxml/apihelpers.pxi":868 * if _isElement(c_node): * return c_node * c_node = c_node.next # <<<<<<<<<<<<<< * return NULL * */ - __Pyx_TraceLine(869,0,__PYX_ERR(5, 869, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->next; __pyx_v_c_node = __pyx_t_2; } - /* "src/lxml/apihelpers.pxi":870 + /* "src/lxml/apihelpers.pxi":869 * return c_node * c_node = c_node.next * return NULL # <<<<<<<<<<<<<< * * cdef inline xmlNode* _previousElement(xmlNode* c_node): */ - __Pyx_TraceLine(870,0,__PYX_ERR(5, 870, __pyx_L1_error)) __pyx_r = NULL; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":860 + /* "src/lxml/apihelpers.pxi":859 * return NULL * * cdef inline xmlNode* _nextElement(xmlNode* c_node): # <<<<<<<<<<<<<< @@ -29165,16 +27718,12 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__nextElement(xmlNode *__pyx_v */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._nextElement", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":872 +/* "src/lxml/apihelpers.pxi":871 * return NULL * * cdef inline xmlNode* _previousElement(xmlNode* c_node): # <<<<<<<<<<<<<< @@ -29184,36 +27733,32 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__nextElement(xmlNode *__pyx_v static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__previousElement(xmlNode *__pyx_v_c_node) { xmlNode *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlNode *__pyx_t_2; __Pyx_RefNannySetupContext("_previousElement", 0); - __Pyx_TraceCall("_previousElement", __pyx_f[5], 872, 0, __PYX_ERR(5, 872, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":875 + /* "src/lxml/apihelpers.pxi":874 * u"""Given a node, find the next sibling that is an element. * """ * if c_node is NULL: # <<<<<<<<<<<<<< * return NULL * c_node = c_node.prev */ - __Pyx_TraceLine(875,0,__PYX_ERR(5, 875, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":876 + /* "src/lxml/apihelpers.pxi":875 * """ * if c_node is NULL: * return NULL # <<<<<<<<<<<<<< * c_node = c_node.prev * while c_node is not NULL: */ - __Pyx_TraceLine(876,0,__PYX_ERR(5, 876, __pyx_L1_error)) __pyx_r = NULL; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":875 + /* "src/lxml/apihelpers.pxi":874 * u"""Given a node, find the next sibling that is an element. * """ * if c_node is NULL: # <<<<<<<<<<<<<< @@ -29222,52 +27767,48 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__previousElement(xmlNode *__p */ } - /* "src/lxml/apihelpers.pxi":877 + /* "src/lxml/apihelpers.pxi":876 * if c_node is NULL: * return NULL * c_node = c_node.prev # <<<<<<<<<<<<<< * while c_node is not NULL: * if _isElement(c_node): */ - __Pyx_TraceLine(877,0,__PYX_ERR(5, 877, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->prev; __pyx_v_c_node = __pyx_t_2; - /* "src/lxml/apihelpers.pxi":878 + /* "src/lxml/apihelpers.pxi":877 * return NULL * c_node = c_node.prev * while c_node is not NULL: # <<<<<<<<<<<<<< * if _isElement(c_node): * return c_node */ - __Pyx_TraceLine(878,0,__PYX_ERR(5, 878, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_node != NULL) != 0); if (!__pyx_t_1) break; - /* "src/lxml/apihelpers.pxi":879 + /* "src/lxml/apihelpers.pxi":878 * c_node = c_node.prev * while c_node is not NULL: * if _isElement(c_node): # <<<<<<<<<<<<<< * return c_node * c_node = c_node.prev */ - __Pyx_TraceLine(879,0,__PYX_ERR(5, 879, __pyx_L1_error)) __pyx_t_1 = (_isElement(__pyx_v_c_node) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":880 + /* "src/lxml/apihelpers.pxi":879 * while c_node is not NULL: * if _isElement(c_node): * return c_node # <<<<<<<<<<<<<< * c_node = c_node.prev * return NULL */ - __Pyx_TraceLine(880,0,__PYX_ERR(5, 880, __pyx_L1_error)) __pyx_r = __pyx_v_c_node; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":879 + /* "src/lxml/apihelpers.pxi":878 * c_node = c_node.prev * while c_node is not NULL: * if _isElement(c_node): # <<<<<<<<<<<<<< @@ -29276,30 +27817,28 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__previousElement(xmlNode *__p */ } - /* "src/lxml/apihelpers.pxi":881 + /* "src/lxml/apihelpers.pxi":880 * if _isElement(c_node): * return c_node * c_node = c_node.prev # <<<<<<<<<<<<<< * return NULL * */ - __Pyx_TraceLine(881,0,__PYX_ERR(5, 881, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->prev; __pyx_v_c_node = __pyx_t_2; } - /* "src/lxml/apihelpers.pxi":882 + /* "src/lxml/apihelpers.pxi":881 * return c_node * c_node = c_node.prev * return NULL # <<<<<<<<<<<<<< * * cdef inline xmlNode* _parentElement(xmlNode* c_node): */ - __Pyx_TraceLine(882,0,__PYX_ERR(5, 882, __pyx_L1_error)) __pyx_r = NULL; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":872 + /* "src/lxml/apihelpers.pxi":871 * return NULL * * cdef inline xmlNode* _previousElement(xmlNode* c_node): # <<<<<<<<<<<<<< @@ -29308,16 +27847,12 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__previousElement(xmlNode *__p */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._previousElement", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":884 +/* "src/lxml/apihelpers.pxi":883 * return NULL * * cdef inline xmlNode* _parentElement(xmlNode* c_node): # <<<<<<<<<<<<<< @@ -29327,22 +27862,19 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__previousElement(xmlNode *__p static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__parentElement(xmlNode *__pyx_v_c_node) { xmlNode *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; xmlNode *__pyx_t_3; __Pyx_RefNannySetupContext("_parentElement", 0); - __Pyx_TraceCall("_parentElement", __pyx_f[5], 884, 0, __PYX_ERR(5, 884, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":886 + /* "src/lxml/apihelpers.pxi":885 * cdef inline xmlNode* _parentElement(xmlNode* c_node): * u"Given a node, find the parent element." * if c_node is NULL or not _isElement(c_node): # <<<<<<<<<<<<<< * return NULL * c_node = c_node.parent */ - __Pyx_TraceLine(886,0,__PYX_ERR(5, 886, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node == NULL) != 0); if (!__pyx_t_2) { } else { @@ -29354,18 +27886,17 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__parentElement(xmlNode *__pyx __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":887 + /* "src/lxml/apihelpers.pxi":886 * u"Given a node, find the parent element." * if c_node is NULL or not _isElement(c_node): * return NULL # <<<<<<<<<<<<<< * c_node = c_node.parent * if c_node is NULL or not _isElement(c_node): */ - __Pyx_TraceLine(887,0,__PYX_ERR(5, 887, __pyx_L1_error)) __pyx_r = NULL; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":886 + /* "src/lxml/apihelpers.pxi":885 * cdef inline xmlNode* _parentElement(xmlNode* c_node): * u"Given a node, find the parent element." * if c_node is NULL or not _isElement(c_node): # <<<<<<<<<<<<<< @@ -29374,25 +27905,23 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__parentElement(xmlNode *__pyx */ } - /* "src/lxml/apihelpers.pxi":888 + /* "src/lxml/apihelpers.pxi":887 * if c_node is NULL or not _isElement(c_node): * return NULL * c_node = c_node.parent # <<<<<<<<<<<<<< * if c_node is NULL or not _isElement(c_node): * return NULL */ - __Pyx_TraceLine(888,0,__PYX_ERR(5, 888, __pyx_L1_error)) __pyx_t_3 = __pyx_v_c_node->parent; __pyx_v_c_node = __pyx_t_3; - /* "src/lxml/apihelpers.pxi":889 + /* "src/lxml/apihelpers.pxi":888 * return NULL * c_node = c_node.parent * if c_node is NULL or not _isElement(c_node): # <<<<<<<<<<<<<< * return NULL * return c_node */ - __Pyx_TraceLine(889,0,__PYX_ERR(5, 889, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node == NULL) != 0); if (!__pyx_t_2) { } else { @@ -29404,18 +27933,17 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__parentElement(xmlNode *__pyx __pyx_L7_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":890 + /* "src/lxml/apihelpers.pxi":889 * c_node = c_node.parent * if c_node is NULL or not _isElement(c_node): * return NULL # <<<<<<<<<<<<<< * return c_node * */ - __Pyx_TraceLine(890,0,__PYX_ERR(5, 890, __pyx_L1_error)) __pyx_r = NULL; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":889 + /* "src/lxml/apihelpers.pxi":888 * return NULL * c_node = c_node.parent * if c_node is NULL or not _isElement(c_node): # <<<<<<<<<<<<<< @@ -29424,18 +27952,17 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__parentElement(xmlNode *__pyx */ } - /* "src/lxml/apihelpers.pxi":891 + /* "src/lxml/apihelpers.pxi":890 * if c_node is NULL or not _isElement(c_node): * return NULL * return c_node # <<<<<<<<<<<<<< * * cdef inline bint _tagMatches(xmlNode* c_node, const_xmlChar* c_href, const_xmlChar* c_name): */ - __Pyx_TraceLine(891,0,__PYX_ERR(5, 891, __pyx_L1_error)) __pyx_r = __pyx_v_c_node; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":884 + /* "src/lxml/apihelpers.pxi":883 * return NULL * * cdef inline xmlNode* _parentElement(xmlNode* c_node): # <<<<<<<<<<<<<< @@ -29444,16 +27971,12 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__parentElement(xmlNode *__pyx */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._parentElement", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":893 +/* "src/lxml/apihelpers.pxi":892 * return c_node * * cdef inline bint _tagMatches(xmlNode* c_node, const_xmlChar* c_href, const_xmlChar* c_name): # <<<<<<<<<<<<<< @@ -29464,36 +27987,32 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__parentElement(xmlNode *__pyx static CYTHON_INLINE int __pyx_f_4lxml_5etree__tagMatches(xmlNode *__pyx_v_c_node, const xmlChar *__pyx_v_c_href, const xmlChar *__pyx_v_c_name) { const xmlChar *__pyx_v_c_node_href; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_tagMatches", 0); - __Pyx_TraceCall("_tagMatches", __pyx_f[5], 893, 0, __PYX_ERR(5, 893, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":907 + /* "src/lxml/apihelpers.pxi":906 * * its name string equals the c_name string * """ * if c_node is NULL: # <<<<<<<<<<<<<< * return 0 * if c_node.type != tree.XML_ELEMENT_NODE: */ - __Pyx_TraceLine(907,0,__PYX_ERR(5, 907, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":908 + /* "src/lxml/apihelpers.pxi":907 * """ * if c_node is NULL: * return 0 # <<<<<<<<<<<<<< * if c_node.type != tree.XML_ELEMENT_NODE: * # not an element, only succeed if we match everything */ - __Pyx_TraceLine(908,0,__PYX_ERR(5, 908, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":907 + /* "src/lxml/apihelpers.pxi":906 * * its name string equals the c_name string * """ * if c_node is NULL: # <<<<<<<<<<<<<< @@ -29502,25 +28021,23 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__tagMatches(xmlNode *__pyx_v_c_nod */ } - /* "src/lxml/apihelpers.pxi":909 + /* "src/lxml/apihelpers.pxi":908 * if c_node is NULL: * return 0 * if c_node.type != tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< * # not an element, only succeed if we match everything * return c_name is NULL and c_href is NULL */ - __Pyx_TraceLine(909,0,__PYX_ERR(5, 909, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node->type != XML_ELEMENT_NODE) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":911 + /* "src/lxml/apihelpers.pxi":910 * if c_node.type != tree.XML_ELEMENT_NODE: * # not an element, only succeed if we match everything * return c_name is NULL and c_href is NULL # <<<<<<<<<<<<<< * if c_name is NULL: * if c_href is NULL: */ - __Pyx_TraceLine(911,0,__PYX_ERR(5, 911, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_name == NULL) != 0); if (__pyx_t_2) { } else { @@ -29533,7 +28050,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__tagMatches(xmlNode *__pyx_v_c_nod __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":909 + /* "src/lxml/apihelpers.pxi":908 * if c_node is NULL: * return 0 * if c_node.type != tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< @@ -29542,40 +28059,37 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__tagMatches(xmlNode *__pyx_v_c_nod */ } - /* "src/lxml/apihelpers.pxi":912 + /* "src/lxml/apihelpers.pxi":911 * # not an element, only succeed if we match everything * return c_name is NULL and c_href is NULL * if c_name is NULL: # <<<<<<<<<<<<<< * if c_href is NULL: * # always match */ - __Pyx_TraceLine(912,0,__PYX_ERR(5, 912, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_name == NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":913 + /* "src/lxml/apihelpers.pxi":912 * return c_name is NULL and c_href is NULL * if c_name is NULL: * if c_href is NULL: # <<<<<<<<<<<<<< * # always match * return 1 */ - __Pyx_TraceLine(913,0,__PYX_ERR(5, 913, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_href == NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":915 + /* "src/lxml/apihelpers.pxi":914 * if c_href is NULL: * # always match * return 1 # <<<<<<<<<<<<<< * else: * c_node_href = _getNs(c_node) */ - __Pyx_TraceLine(915,0,__PYX_ERR(5, 915, __pyx_L1_error)) __pyx_r = 1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":913 + /* "src/lxml/apihelpers.pxi":912 * return c_name is NULL and c_href is NULL * if c_name is NULL: * if c_href is NULL: # <<<<<<<<<<<<<< @@ -29584,40 +28098,37 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__tagMatches(xmlNode *__pyx_v_c_nod */ } - /* "src/lxml/apihelpers.pxi":917 + /* "src/lxml/apihelpers.pxi":916 * return 1 * else: * c_node_href = _getNs(c_node) # <<<<<<<<<<<<<< * if c_node_href is NULL: * return c_href[0] == c'\0' */ - __Pyx_TraceLine(917,0,__PYX_ERR(5, 917, __pyx_L1_error)) /*else*/ { __pyx_v_c_node_href = _getNs(__pyx_v_c_node); - /* "src/lxml/apihelpers.pxi":918 + /* "src/lxml/apihelpers.pxi":917 * else: * c_node_href = _getNs(c_node) * if c_node_href is NULL: # <<<<<<<<<<<<<< * return c_href[0] == c'\0' * else: */ - __Pyx_TraceLine(918,0,__PYX_ERR(5, 918, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node_href == NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":919 + /* "src/lxml/apihelpers.pxi":918 * c_node_href = _getNs(c_node) * if c_node_href is NULL: * return c_href[0] == c'\0' # <<<<<<<<<<<<<< * else: * return tree.xmlStrcmp(c_node_href, c_href) == 0 */ - __Pyx_TraceLine(919,0,__PYX_ERR(5, 919, __pyx_L1_error)) __pyx_r = ((__pyx_v_c_href[0]) == '\x00'); goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":918 + /* "src/lxml/apihelpers.pxi":917 * else: * c_node_href = _getNs(c_node) * if c_node_href is NULL: # <<<<<<<<<<<<<< @@ -29626,21 +28137,20 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__tagMatches(xmlNode *__pyx_v_c_nod */ } - /* "src/lxml/apihelpers.pxi":921 + /* "src/lxml/apihelpers.pxi":920 * return c_href[0] == c'\0' * else: * return tree.xmlStrcmp(c_node_href, c_href) == 0 # <<<<<<<<<<<<<< * elif c_href is NULL: * if _getNs(c_node) is not NULL: */ - __Pyx_TraceLine(921,0,__PYX_ERR(5, 921, __pyx_L1_error)) /*else*/ { __pyx_r = (xmlStrcmp(__pyx_v_c_node_href, __pyx_v_c_href) == 0); goto __pyx_L0; } } - /* "src/lxml/apihelpers.pxi":912 + /* "src/lxml/apihelpers.pxi":911 * # not an element, only succeed if we match everything * return c_name is NULL and c_href is NULL * if c_name is NULL: # <<<<<<<<<<<<<< @@ -29649,40 +28159,37 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__tagMatches(xmlNode *__pyx_v_c_nod */ } - /* "src/lxml/apihelpers.pxi":922 + /* "src/lxml/apihelpers.pxi":921 * else: * return tree.xmlStrcmp(c_node_href, c_href) == 0 * elif c_href is NULL: # <<<<<<<<<<<<<< * if _getNs(c_node) is not NULL: * return 0 */ - __Pyx_TraceLine(922,0,__PYX_ERR(5, 922, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_href == NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":923 + /* "src/lxml/apihelpers.pxi":922 * return tree.xmlStrcmp(c_node_href, c_href) == 0 * elif c_href is NULL: * if _getNs(c_node) is not NULL: # <<<<<<<<<<<<<< * return 0 * return c_node.name == c_name or tree.xmlStrcmp(c_node.name, c_name) == 0 */ - __Pyx_TraceLine(923,0,__PYX_ERR(5, 923, __pyx_L1_error)) __pyx_t_1 = ((_getNs(__pyx_v_c_node) != NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":924 + /* "src/lxml/apihelpers.pxi":923 * elif c_href is NULL: * if _getNs(c_node) is not NULL: * return 0 # <<<<<<<<<<<<<< * return c_node.name == c_name or tree.xmlStrcmp(c_node.name, c_name) == 0 * elif c_node.name == c_name or tree.xmlStrcmp(c_node.name, c_name) == 0: */ - __Pyx_TraceLine(924,0,__PYX_ERR(5, 924, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":923 + /* "src/lxml/apihelpers.pxi":922 * return tree.xmlStrcmp(c_node_href, c_href) == 0 * elif c_href is NULL: * if _getNs(c_node) is not NULL: # <<<<<<<<<<<<<< @@ -29691,14 +28198,13 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__tagMatches(xmlNode *__pyx_v_c_nod */ } - /* "src/lxml/apihelpers.pxi":925 + /* "src/lxml/apihelpers.pxi":924 * if _getNs(c_node) is not NULL: * return 0 * return c_node.name == c_name or tree.xmlStrcmp(c_node.name, c_name) == 0 # <<<<<<<<<<<<<< * elif c_node.name == c_name or tree.xmlStrcmp(c_node.name, c_name) == 0: * c_node_href = _getNs(c_node) */ - __Pyx_TraceLine(925,0,__PYX_ERR(5, 925, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node->name == __pyx_v_c_name) != 0); if (!__pyx_t_2) { } else { @@ -29711,7 +28217,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__tagMatches(xmlNode *__pyx_v_c_nod __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":922 + /* "src/lxml/apihelpers.pxi":921 * else: * return tree.xmlStrcmp(c_node_href, c_href) == 0 * elif c_href is NULL: # <<<<<<<<<<<<<< @@ -29720,14 +28226,13 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__tagMatches(xmlNode *__pyx_v_c_nod */ } - /* "src/lxml/apihelpers.pxi":926 + /* "src/lxml/apihelpers.pxi":925 * return 0 * return c_node.name == c_name or tree.xmlStrcmp(c_node.name, c_name) == 0 * elif c_node.name == c_name or tree.xmlStrcmp(c_node.name, c_name) == 0: # <<<<<<<<<<<<<< * c_node_href = _getNs(c_node) * if c_node_href is NULL: */ - __Pyx_TraceLine(926,0,__PYX_ERR(5, 926, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node->name == __pyx_v_c_name) != 0); if (!__pyx_t_2) { } else { @@ -29739,39 +28244,36 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__tagMatches(xmlNode *__pyx_v_c_nod __pyx_L13_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":927 + /* "src/lxml/apihelpers.pxi":926 * return c_node.name == c_name or tree.xmlStrcmp(c_node.name, c_name) == 0 * elif c_node.name == c_name or tree.xmlStrcmp(c_node.name, c_name) == 0: * c_node_href = _getNs(c_node) # <<<<<<<<<<<<<< * if c_node_href is NULL: * return c_href[0] == c'\0' */ - __Pyx_TraceLine(927,0,__PYX_ERR(5, 927, __pyx_L1_error)) __pyx_v_c_node_href = _getNs(__pyx_v_c_node); - /* "src/lxml/apihelpers.pxi":928 + /* "src/lxml/apihelpers.pxi":927 * elif c_node.name == c_name or tree.xmlStrcmp(c_node.name, c_name) == 0: * c_node_href = _getNs(c_node) * if c_node_href is NULL: # <<<<<<<<<<<<<< * return c_href[0] == c'\0' * else: */ - __Pyx_TraceLine(928,0,__PYX_ERR(5, 928, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node_href == NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":929 + /* "src/lxml/apihelpers.pxi":928 * c_node_href = _getNs(c_node) * if c_node_href is NULL: * return c_href[0] == c'\0' # <<<<<<<<<<<<<< * else: * return tree.xmlStrcmp(c_node_href, c_href) == 0 */ - __Pyx_TraceLine(929,0,__PYX_ERR(5, 929, __pyx_L1_error)) __pyx_r = ((__pyx_v_c_href[0]) == '\x00'); goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":928 + /* "src/lxml/apihelpers.pxi":927 * elif c_node.name == c_name or tree.xmlStrcmp(c_node.name, c_name) == 0: * c_node_href = _getNs(c_node) * if c_node_href is NULL: # <<<<<<<<<<<<<< @@ -29780,20 +28282,19 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__tagMatches(xmlNode *__pyx_v_c_nod */ } - /* "src/lxml/apihelpers.pxi":931 + /* "src/lxml/apihelpers.pxi":930 * return c_href[0] == c'\0' * else: * return tree.xmlStrcmp(c_node_href, c_href) == 0 # <<<<<<<<<<<<<< * else: * return 0 */ - __Pyx_TraceLine(931,0,__PYX_ERR(5, 931, __pyx_L1_error)) /*else*/ { __pyx_r = (xmlStrcmp(__pyx_v_c_node_href, __pyx_v_c_href) == 0); goto __pyx_L0; } - /* "src/lxml/apihelpers.pxi":926 + /* "src/lxml/apihelpers.pxi":925 * return 0 * return c_node.name == c_name or tree.xmlStrcmp(c_node.name, c_name) == 0 * elif c_node.name == c_name or tree.xmlStrcmp(c_node.name, c_name) == 0: # <<<<<<<<<<<<<< @@ -29802,20 +28303,19 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__tagMatches(xmlNode *__pyx_v_c_nod */ } - /* "src/lxml/apihelpers.pxi":933 + /* "src/lxml/apihelpers.pxi":932 * return tree.xmlStrcmp(c_node_href, c_href) == 0 * else: * return 0 # <<<<<<<<<<<<<< * * cdef inline bint _tagMatchesExactly(xmlNode* c_node, qname* c_qname): */ - __Pyx_TraceLine(933,0,__PYX_ERR(5, 933, __pyx_L1_error)) /*else*/ { __pyx_r = 0; goto __pyx_L0; } - /* "src/lxml/apihelpers.pxi":893 + /* "src/lxml/apihelpers.pxi":892 * return c_node * * cdef inline bint _tagMatches(xmlNode* c_node, const_xmlChar* c_href, const_xmlChar* c_name): # <<<<<<<<<<<<<< @@ -29824,16 +28324,12 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__tagMatches(xmlNode *__pyx_v_c_nod */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._tagMatches", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":935 +/* "src/lxml/apihelpers.pxi":934 * return 0 * * cdef inline bint _tagMatchesExactly(xmlNode* c_node, qname* c_qname): # <<<<<<<<<<<<<< @@ -29843,23 +28339,20 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__tagMatches(xmlNode *__pyx_v_c_nod static CYTHON_INLINE int __pyx_f_4lxml_5etree__tagMatchesExactly(xmlNode *__pyx_v_c_node, struct __pyx_t_4lxml_5etree_qname *__pyx_v_c_qname) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_tagMatchesExactly", 0); - __Pyx_TraceCall("_tagMatchesExactly", __pyx_f[5], 935, 0, __PYX_ERR(5, 935, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":953 + /* "src/lxml/apihelpers.pxi":952 * * its name string points to the same address (!) as c_name * """ * return _nsTagMatchesExactly(_getNs(c_node), c_node.name, c_qname) # <<<<<<<<<<<<<< * * cdef inline bint _nsTagMatchesExactly(const_xmlChar* c_node_href, */ - __Pyx_TraceLine(953,0,__PYX_ERR(5, 953, __pyx_L1_error)) __pyx_r = __pyx_f_4lxml_5etree__nsTagMatchesExactly(_getNs(__pyx_v_c_node), __pyx_v_c_node->name, __pyx_v_c_qname); goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":935 + /* "src/lxml/apihelpers.pxi":934 * return 0 * * cdef inline bint _tagMatchesExactly(xmlNode* c_node, qname* c_qname): # <<<<<<<<<<<<<< @@ -29868,16 +28361,12 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__tagMatchesExactly(xmlNode *__pyx_ */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._tagMatchesExactly", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":955 +/* "src/lxml/apihelpers.pxi":954 * return _nsTagMatchesExactly(_getNs(c_node), c_node.name, c_qname) * * cdef inline bint _nsTagMatchesExactly(const_xmlChar* c_node_href, # <<<<<<<<<<<<<< @@ -29888,21 +28377,18 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__tagMatchesExactly(xmlNode *__pyx_ static CYTHON_INLINE int __pyx_f_4lxml_5etree__nsTagMatchesExactly(const xmlChar *__pyx_v_c_node_href, const xmlChar *__pyx_v_c_node_name, struct __pyx_t_4lxml_5etree_qname *__pyx_v_c_qname) { char *__pyx_v_c_href; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_nsTagMatchesExactly", 0); - __Pyx_TraceCall("_nsTagMatchesExactly", __pyx_f[5], 955, 0, __PYX_ERR(5, 955, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":976 + /* "src/lxml/apihelpers.pxi":975 * """ * cdef char* c_href * if c_qname.c_name is not NULL and c_qname.c_name is not c_node_name: # <<<<<<<<<<<<<< * return 0 * if c_qname.href is NULL: */ - __Pyx_TraceLine(976,0,__PYX_ERR(5, 976, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_qname->c_name != NULL) != 0); if (__pyx_t_2) { } else { @@ -29914,18 +28400,17 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__nsTagMatchesExactly(const xmlChar __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":977 + /* "src/lxml/apihelpers.pxi":976 * cdef char* c_href * if c_qname.c_name is not NULL and c_qname.c_name is not c_node_name: * return 0 # <<<<<<<<<<<<<< * if c_qname.href is NULL: * return 1 */ - __Pyx_TraceLine(977,0,__PYX_ERR(5, 977, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":976 + /* "src/lxml/apihelpers.pxi":975 * """ * cdef char* c_href * if c_qname.c_name is not NULL and c_qname.c_name is not c_node_name: # <<<<<<<<<<<<<< @@ -29934,29 +28419,27 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__nsTagMatchesExactly(const xmlChar */ } - /* "src/lxml/apihelpers.pxi":978 + /* "src/lxml/apihelpers.pxi":977 * if c_qname.c_name is not NULL and c_qname.c_name is not c_node_name: * return 0 * if c_qname.href is NULL: # <<<<<<<<<<<<<< * return 1 * c_href = python.__cstr(c_qname.href) */ - __Pyx_TraceLine(978,0,__PYX_ERR(5, 978, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_qname->href == NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":979 + /* "src/lxml/apihelpers.pxi":978 * return 0 * if c_qname.href is NULL: * return 1 # <<<<<<<<<<<<<< * c_href = python.__cstr(c_qname.href) * if c_href[0] == '\0': */ - __Pyx_TraceLine(979,0,__PYX_ERR(5, 979, __pyx_L1_error)) __pyx_r = 1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":978 + /* "src/lxml/apihelpers.pxi":977 * if c_qname.c_name is not NULL and c_qname.c_name is not c_node_name: * return 0 * if c_qname.href is NULL: # <<<<<<<<<<<<<< @@ -29965,35 +28448,32 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__nsTagMatchesExactly(const xmlChar */ } - /* "src/lxml/apihelpers.pxi":980 + /* "src/lxml/apihelpers.pxi":979 * if c_qname.href is NULL: * return 1 * c_href = python.__cstr(c_qname.href) # <<<<<<<<<<<<<< * if c_href[0] == '\0': * return c_node_href is NULL or c_node_href[0] == '\0' */ - __Pyx_TraceLine(980,0,__PYX_ERR(5, 980, __pyx_L1_error)) __pyx_v_c_href = PyBytes_AS_STRING(__pyx_v_c_qname->href); - /* "src/lxml/apihelpers.pxi":981 + /* "src/lxml/apihelpers.pxi":980 * return 1 * c_href = python.__cstr(c_qname.href) * if c_href[0] == '\0': # <<<<<<<<<<<<<< * return c_node_href is NULL or c_node_href[0] == '\0' * elif c_node_href is NULL: */ - __Pyx_TraceLine(981,0,__PYX_ERR(5, 981, __pyx_L1_error)) __pyx_t_1 = (((__pyx_v_c_href[0]) == '\x00') != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":982 + /* "src/lxml/apihelpers.pxi":981 * c_href = python.__cstr(c_qname.href) * if c_href[0] == '\0': * return c_node_href is NULL or c_node_href[0] == '\0' # <<<<<<<<<<<<<< * elif c_node_href is NULL: * return 0 */ - __Pyx_TraceLine(982,0,__PYX_ERR(5, 982, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node_href == NULL) != 0); if (!__pyx_t_2) { } else { @@ -30006,7 +28486,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__nsTagMatchesExactly(const xmlChar __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":981 + /* "src/lxml/apihelpers.pxi":980 * return 1 * c_href = python.__cstr(c_qname.href) * if c_href[0] == '\0': # <<<<<<<<<<<<<< @@ -30015,29 +28495,27 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__nsTagMatchesExactly(const xmlChar */ } - /* "src/lxml/apihelpers.pxi":983 + /* "src/lxml/apihelpers.pxi":982 * if c_href[0] == '\0': * return c_node_href is NULL or c_node_href[0] == '\0' * elif c_node_href is NULL: # <<<<<<<<<<<<<< * return 0 * else: */ - __Pyx_TraceLine(983,0,__PYX_ERR(5, 983, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node_href == NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":984 + /* "src/lxml/apihelpers.pxi":983 * return c_node_href is NULL or c_node_href[0] == '\0' * elif c_node_href is NULL: * return 0 # <<<<<<<<<<<<<< * else: * return tree.xmlStrcmp(c_href, c_node_href) == 0 */ - __Pyx_TraceLine(984,0,__PYX_ERR(5, 984, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":983 + /* "src/lxml/apihelpers.pxi":982 * if c_href[0] == '\0': * return c_node_href is NULL or c_node_href[0] == '\0' * elif c_node_href is NULL: # <<<<<<<<<<<<<< @@ -30046,20 +28524,19 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__nsTagMatchesExactly(const xmlChar */ } - /* "src/lxml/apihelpers.pxi":986 + /* "src/lxml/apihelpers.pxi":985 * return 0 * else: * return tree.xmlStrcmp(c_href, c_node_href) == 0 # <<<<<<<<<<<<<< * * cdef Py_ssize_t _mapTagsToQnameMatchArray(xmlDoc* c_doc, list ns_tags, */ - __Pyx_TraceLine(986,0,__PYX_ERR(5, 986, __pyx_L1_error)) /*else*/ { __pyx_r = (xmlStrcmp(((const xmlChar *)__pyx_v_c_href), __pyx_v_c_node_href) == 0); goto __pyx_L0; } - /* "src/lxml/apihelpers.pxi":955 + /* "src/lxml/apihelpers.pxi":954 * return _nsTagMatchesExactly(_getNs(c_node), c_node.name, c_qname) * * cdef inline bint _nsTagMatchesExactly(const_xmlChar* c_node_href, # <<<<<<<<<<<<<< @@ -30068,16 +28545,12 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__nsTagMatchesExactly(const xmlChar */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._nsTagMatchesExactly", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":988 +/* "src/lxml/apihelpers.pxi":987 * return tree.xmlStrcmp(c_href, c_node_href) == 0 * * cdef Py_ssize_t _mapTagsToQnameMatchArray(xmlDoc* c_doc, list ns_tags, # <<<<<<<<<<<<<< @@ -30092,7 +28565,6 @@ static Py_ssize_t __pyx_f_4lxml_5etree__mapTagsToQnameMatchArray(xmlDoc *__pyx_v PyObject *__pyx_v_tag = 0; const xmlChar *__pyx_v_c_tag; Py_ssize_t __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; @@ -30107,37 +28579,34 @@ static Py_ssize_t __pyx_f_4lxml_5etree__mapTagsToQnameMatchArray(xmlDoc *__pyx_v Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; __Pyx_RefNannySetupContext("_mapTagsToQnameMatchArray", 0); - __Pyx_TraceCall("_mapTagsToQnameMatchArray", __pyx_f[5], 988, 0, __PYX_ERR(5, 988, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":996 + /* "src/lxml/apihelpers.pxi":995 * if it is not NULL. * """ * cdef Py_ssize_t count = 0, i # <<<<<<<<<<<<<< * cdef bytes ns, tag * for ns, tag in ns_tags: */ - __Pyx_TraceLine(996,0,__PYX_ERR(5, 996, __pyx_L1_error)) __pyx_v_count = 0; - /* "src/lxml/apihelpers.pxi":998 + /* "src/lxml/apihelpers.pxi":997 * cdef Py_ssize_t count = 0, i * cdef bytes ns, tag * for ns, tag in ns_tags: # <<<<<<<<<<<<<< * if tag is None: * c_tag = NULL */ - __Pyx_TraceLine(998,0,__PYX_ERR(5, 998, __pyx_L1_error)) if (unlikely(__pyx_v_ns_tags == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(5, 998, __pyx_L1_error) + __PYX_ERR(5, 997, __pyx_L1_error) } __pyx_t_1 = __pyx_v_ns_tags; __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(5, 998, __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(5, 997, __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(5, 998, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { @@ -30146,7 +28615,7 @@ static Py_ssize_t __pyx_f_4lxml_5etree__mapTagsToQnameMatchArray(xmlDoc *__pyx_v if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(5, 998, __pyx_L1_error) + __PYX_ERR(5, 997, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -30159,15 +28628,15 @@ static Py_ssize_t __pyx_f_4lxml_5etree__mapTagsToQnameMatchArray(xmlDoc *__pyx_v __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(5, 998, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 998, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 997, __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(5, 998, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 997, __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; @@ -30175,7 +28644,7 @@ static Py_ssize_t __pyx_f_4lxml_5etree__mapTagsToQnameMatchArray(xmlDoc *__pyx_v __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(5, 998, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(5, 997, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L6_unpacking_done; @@ -30183,39 +28652,37 @@ static Py_ssize_t __pyx_f_4lxml_5etree__mapTagsToQnameMatchArray(xmlDoc *__pyx_v __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(5, 998, __pyx_L1_error) + __PYX_ERR(5, 997, __pyx_L1_error) __pyx_L6_unpacking_done:; } - if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(5, 998, __pyx_L1_error) - if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(5, 998, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(5, 997, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(5, 997, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_ns, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_tag, ((PyObject*)__pyx_t_5)); __pyx_t_5 = 0; - /* "src/lxml/apihelpers.pxi":999 + /* "src/lxml/apihelpers.pxi":998 * cdef bytes ns, tag * for ns, tag in ns_tags: * if tag is None: # <<<<<<<<<<<<<< * c_tag = NULL * elif force_into_dict: */ - __Pyx_TraceLine(999,0,__PYX_ERR(5, 999, __pyx_L1_error)) __pyx_t_8 = (__pyx_v_tag == ((PyObject*)Py_None)); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { - /* "src/lxml/apihelpers.pxi":1000 + /* "src/lxml/apihelpers.pxi":999 * for ns, tag in ns_tags: * if tag is None: * c_tag = NULL # <<<<<<<<<<<<<< * elif force_into_dict: * c_tag = tree.xmlDictLookup(c_doc.dict, _xcstr(tag), len(tag)) */ - __Pyx_TraceLine(1000,0,__PYX_ERR(5, 1000, __pyx_L1_error)) __pyx_v_c_tag = ((const xmlChar *)NULL); - /* "src/lxml/apihelpers.pxi":999 + /* "src/lxml/apihelpers.pxi":998 * cdef bytes ns, tag * for ns, tag in ns_tags: * if tag is None: # <<<<<<<<<<<<<< @@ -30225,78 +28692,72 @@ static Py_ssize_t __pyx_f_4lxml_5etree__mapTagsToQnameMatchArray(xmlDoc *__pyx_v goto __pyx_L7; } - /* "src/lxml/apihelpers.pxi":1001 + /* "src/lxml/apihelpers.pxi":1000 * if tag is None: * c_tag = NULL * elif force_into_dict: # <<<<<<<<<<<<<< * c_tag = tree.xmlDictLookup(c_doc.dict, _xcstr(tag), len(tag)) * if c_tag is NULL: */ - __Pyx_TraceLine(1001,0,__PYX_ERR(5, 1001, __pyx_L1_error)) __pyx_t_9 = (__pyx_v_force_into_dict != 0); if (__pyx_t_9) { - /* "src/lxml/apihelpers.pxi":1002 + /* "src/lxml/apihelpers.pxi":1001 * c_tag = NULL * elif force_into_dict: * c_tag = tree.xmlDictLookup(c_doc.dict, _xcstr(tag), len(tag)) # <<<<<<<<<<<<<< * if c_tag is NULL: * # clean up before raising the error */ - __Pyx_TraceLine(1002,0,__PYX_ERR(5, 1002, __pyx_L1_error)) if (unlikely(__pyx_v_tag == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(5, 1002, __pyx_L1_error) + __PYX_ERR(5, 1001, __pyx_L1_error) } - __pyx_t_10 = PyBytes_GET_SIZE(__pyx_v_tag); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(5, 1002, __pyx_L1_error) + __pyx_t_10 = PyBytes_GET_SIZE(__pyx_v_tag); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(5, 1001, __pyx_L1_error) __pyx_v_c_tag = xmlDictLookup(__pyx_v_c_doc->dict, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_tag), __pyx_t_10); - /* "src/lxml/apihelpers.pxi":1003 + /* "src/lxml/apihelpers.pxi":1002 * elif force_into_dict: * c_tag = tree.xmlDictLookup(c_doc.dict, _xcstr(tag), len(tag)) * if c_tag is NULL: # <<<<<<<<<<<<<< * # clean up before raising the error * for i in xrange(count): */ - __Pyx_TraceLine(1003,0,__PYX_ERR(5, 1003, __pyx_L1_error)) __pyx_t_9 = ((__pyx_v_c_tag == NULL) != 0); if (__pyx_t_9) { - /* "src/lxml/apihelpers.pxi":1005 + /* "src/lxml/apihelpers.pxi":1004 * if c_tag is NULL: * # clean up before raising the error * for i in xrange(count): # <<<<<<<<<<<<<< * cpython.ref.Py_XDECREF(c_ns_tags[i].href) * raise MemoryError() */ - __Pyx_TraceLine(1005,0,__PYX_ERR(5, 1005, __pyx_L1_error)) __pyx_t_10 = __pyx_v_count; __pyx_t_11 = __pyx_t_10; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; - /* "src/lxml/apihelpers.pxi":1006 + /* "src/lxml/apihelpers.pxi":1005 * # clean up before raising the error * for i in xrange(count): * cpython.ref.Py_XDECREF(c_ns_tags[i].href) # <<<<<<<<<<<<<< * raise MemoryError() * else: */ - __Pyx_TraceLine(1006,0,__PYX_ERR(5, 1006, __pyx_L1_error)) Py_XDECREF((__pyx_v_c_ns_tags[__pyx_v_i]).href); } - /* "src/lxml/apihelpers.pxi":1007 + /* "src/lxml/apihelpers.pxi":1006 * for i in xrange(count): * cpython.ref.Py_XDECREF(c_ns_tags[i].href) * raise MemoryError() # <<<<<<<<<<<<<< * else: * c_tag = tree.xmlDictExists(c_doc.dict, _xcstr(tag), len(tag)) */ - __Pyx_TraceLine(1007,0,__PYX_ERR(5, 1007, __pyx_L1_error)) - PyErr_NoMemory(); __PYX_ERR(5, 1007, __pyx_L1_error) + PyErr_NoMemory(); __PYX_ERR(5, 1006, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1003 + /* "src/lxml/apihelpers.pxi":1002 * elif force_into_dict: * c_tag = tree.xmlDictLookup(c_doc.dict, _xcstr(tag), len(tag)) * if c_tag is NULL: # <<<<<<<<<<<<<< @@ -30305,7 +28766,7 @@ static Py_ssize_t __pyx_f_4lxml_5etree__mapTagsToQnameMatchArray(xmlDoc *__pyx_v */ } - /* "src/lxml/apihelpers.pxi":1001 + /* "src/lxml/apihelpers.pxi":1000 * if tag is None: * c_tag = NULL * elif force_into_dict: # <<<<<<<<<<<<<< @@ -30315,44 +28776,41 @@ static Py_ssize_t __pyx_f_4lxml_5etree__mapTagsToQnameMatchArray(xmlDoc *__pyx_v goto __pyx_L7; } - /* "src/lxml/apihelpers.pxi":1009 + /* "src/lxml/apihelpers.pxi":1008 * raise MemoryError() * else: * c_tag = tree.xmlDictExists(c_doc.dict, _xcstr(tag), len(tag)) # <<<<<<<<<<<<<< * if c_tag is NULL: * # not in the dict => not in the document */ - __Pyx_TraceLine(1009,0,__PYX_ERR(5, 1009, __pyx_L1_error)) /*else*/ { if (unlikely(__pyx_v_tag == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(5, 1009, __pyx_L1_error) + __PYX_ERR(5, 1008, __pyx_L1_error) } - __pyx_t_10 = PyBytes_GET_SIZE(__pyx_v_tag); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(5, 1009, __pyx_L1_error) + __pyx_t_10 = PyBytes_GET_SIZE(__pyx_v_tag); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(5, 1008, __pyx_L1_error) __pyx_v_c_tag = xmlDictExists(__pyx_v_c_doc->dict, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_tag), __pyx_t_10); - /* "src/lxml/apihelpers.pxi":1010 + /* "src/lxml/apihelpers.pxi":1009 * else: * c_tag = tree.xmlDictExists(c_doc.dict, _xcstr(tag), len(tag)) * if c_tag is NULL: # <<<<<<<<<<<<<< * # not in the dict => not in the document * continue */ - __Pyx_TraceLine(1010,0,__PYX_ERR(5, 1010, __pyx_L1_error)) __pyx_t_9 = ((__pyx_v_c_tag == NULL) != 0); if (__pyx_t_9) { - /* "src/lxml/apihelpers.pxi":1012 + /* "src/lxml/apihelpers.pxi":1011 * if c_tag is NULL: * # not in the dict => not in the document * continue # <<<<<<<<<<<<<< * c_ns_tags[count].c_name = c_tag * if ns is None: */ - __Pyx_TraceLine(1012,0,__PYX_ERR(5, 1012, __pyx_L1_error)) goto __pyx_L3_continue; - /* "src/lxml/apihelpers.pxi":1010 + /* "src/lxml/apihelpers.pxi":1009 * else: * c_tag = tree.xmlDictExists(c_doc.dict, _xcstr(tag), len(tag)) * if c_tag is NULL: # <<<<<<<<<<<<<< @@ -30363,39 +28821,36 @@ static Py_ssize_t __pyx_f_4lxml_5etree__mapTagsToQnameMatchArray(xmlDoc *__pyx_v } __pyx_L7:; - /* "src/lxml/apihelpers.pxi":1013 + /* "src/lxml/apihelpers.pxi":1012 * # not in the dict => not in the document * continue * c_ns_tags[count].c_name = c_tag # <<<<<<<<<<<<<< * if ns is None: * c_ns_tags[count].href = NULL */ - __Pyx_TraceLine(1013,0,__PYX_ERR(5, 1013, __pyx_L1_error)) (__pyx_v_c_ns_tags[__pyx_v_count]).c_name = __pyx_v_c_tag; - /* "src/lxml/apihelpers.pxi":1014 + /* "src/lxml/apihelpers.pxi":1013 * continue * c_ns_tags[count].c_name = c_tag * if ns is None: # <<<<<<<<<<<<<< * c_ns_tags[count].href = NULL * else: */ - __Pyx_TraceLine(1014,0,__PYX_ERR(5, 1014, __pyx_L1_error)) __pyx_t_9 = (__pyx_v_ns == ((PyObject*)Py_None)); __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { - /* "src/lxml/apihelpers.pxi":1015 + /* "src/lxml/apihelpers.pxi":1014 * c_ns_tags[count].c_name = c_tag * if ns is None: * c_ns_tags[count].href = NULL # <<<<<<<<<<<<<< * else: * cpython.ref.Py_INCREF(ns) # keep an owned reference! */ - __Pyx_TraceLine(1015,0,__PYX_ERR(5, 1015, __pyx_L1_error)) (__pyx_v_c_ns_tags[__pyx_v_count]).href = NULL; - /* "src/lxml/apihelpers.pxi":1014 + /* "src/lxml/apihelpers.pxi":1013 * continue * c_ns_tags[count].c_name = c_tag * if ns is None: # <<<<<<<<<<<<<< @@ -30405,63 +28860,58 @@ static Py_ssize_t __pyx_f_4lxml_5etree__mapTagsToQnameMatchArray(xmlDoc *__pyx_v goto __pyx_L12; } - /* "src/lxml/apihelpers.pxi":1017 + /* "src/lxml/apihelpers.pxi":1016 * c_ns_tags[count].href = NULL * else: * cpython.ref.Py_INCREF(ns) # keep an owned reference! # <<<<<<<<<<<<<< * c_ns_tags[count].href = ns * count += 1 */ - __Pyx_TraceLine(1017,0,__PYX_ERR(5, 1017, __pyx_L1_error)) /*else*/ { Py_INCREF(__pyx_v_ns); - /* "src/lxml/apihelpers.pxi":1018 + /* "src/lxml/apihelpers.pxi":1017 * else: * cpython.ref.Py_INCREF(ns) # keep an owned reference! * c_ns_tags[count].href = ns # <<<<<<<<<<<<<< * count += 1 * return count */ - __Pyx_TraceLine(1018,0,__PYX_ERR(5, 1018, __pyx_L1_error)) (__pyx_v_c_ns_tags[__pyx_v_count]).href = ((PyObject *)__pyx_v_ns); } __pyx_L12:; - /* "src/lxml/apihelpers.pxi":1019 + /* "src/lxml/apihelpers.pxi":1018 * cpython.ref.Py_INCREF(ns) # keep an owned reference! * c_ns_tags[count].href = ns * count += 1 # <<<<<<<<<<<<<< * return count * */ - __Pyx_TraceLine(1019,0,__PYX_ERR(5, 1019, __pyx_L1_error)) __pyx_v_count = (__pyx_v_count + 1); - /* "src/lxml/apihelpers.pxi":998 + /* "src/lxml/apihelpers.pxi":997 * cdef Py_ssize_t count = 0, i * cdef bytes ns, tag * for ns, tag in ns_tags: # <<<<<<<<<<<<<< * if tag is None: * c_tag = NULL */ - __Pyx_TraceLine(998,0,__PYX_ERR(5, 998, __pyx_L1_error)) __pyx_L3_continue:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/apihelpers.pxi":1020 + /* "src/lxml/apihelpers.pxi":1019 * c_ns_tags[count].href = ns * count += 1 * return count # <<<<<<<<<<<<<< * * cdef int _removeNode(_Document doc, xmlNode* c_node) except -1: */ - __Pyx_TraceLine(1020,0,__PYX_ERR(5, 1020, __pyx_L1_error)) __pyx_r = __pyx_v_count; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":988 + /* "src/lxml/apihelpers.pxi":987 * return tree.xmlStrcmp(c_href, c_node_href) == 0 * * cdef Py_ssize_t _mapTagsToQnameMatchArray(xmlDoc* c_doc, list ns_tags, # <<<<<<<<<<<<<< @@ -30481,12 +28931,11 @@ static Py_ssize_t __pyx_f_4lxml_5etree__mapTagsToQnameMatchArray(xmlDoc *__pyx_v __pyx_L0:; __Pyx_XDECREF(__pyx_v_ns); __Pyx_XDECREF(__pyx_v_tag); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1022 +/* "src/lxml/apihelpers.pxi":1021 * return count * * cdef int _removeNode(_Document doc, xmlNode* c_node) except -1: # <<<<<<<<<<<<<< @@ -30497,67 +28946,60 @@ static Py_ssize_t __pyx_f_4lxml_5etree__mapTagsToQnameMatchArray(xmlDoc *__pyx_v static int __pyx_f_4lxml_5etree__removeNode(struct LxmlDocument *__pyx_v_doc, xmlNode *__pyx_v_c_node) { xmlNode *__pyx_v_c_next; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlNode *__pyx_t_1; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("_removeNode", 0); - __Pyx_TraceCall("_removeNode", __pyx_f[5], 1022, 0, __PYX_ERR(5, 1022, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1027 + /* "src/lxml/apihelpers.pxi":1026 * """ * cdef xmlNode* c_next * c_next = c_node.next # <<<<<<<<<<<<<< * tree.xmlUnlinkNode(c_node) * _moveTail(c_next, c_node) */ - __Pyx_TraceLine(1027,0,__PYX_ERR(5, 1027, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_node->next; __pyx_v_c_next = __pyx_t_1; - /* "src/lxml/apihelpers.pxi":1028 + /* "src/lxml/apihelpers.pxi":1027 * cdef xmlNode* c_next * c_next = c_node.next * tree.xmlUnlinkNode(c_node) # <<<<<<<<<<<<<< * _moveTail(c_next, c_node) * if not attemptDeallocation(c_node): */ - __Pyx_TraceLine(1028,0,__PYX_ERR(5, 1028, __pyx_L1_error)) xmlUnlinkNode(__pyx_v_c_node); - /* "src/lxml/apihelpers.pxi":1029 + /* "src/lxml/apihelpers.pxi":1028 * c_next = c_node.next * tree.xmlUnlinkNode(c_node) * _moveTail(c_next, c_node) # <<<<<<<<<<<<<< * if not attemptDeallocation(c_node): * # make namespaces absolute */ - __Pyx_TraceLine(1029,0,__PYX_ERR(5, 1029, __pyx_L1_error)) __pyx_f_4lxml_5etree__moveTail(__pyx_v_c_next, __pyx_v_c_node); - /* "src/lxml/apihelpers.pxi":1030 + /* "src/lxml/apihelpers.pxi":1029 * tree.xmlUnlinkNode(c_node) * _moveTail(c_next, c_node) * if not attemptDeallocation(c_node): # <<<<<<<<<<<<<< * # make namespaces absolute * moveNodeToDocument(doc, c_node.doc, c_node) */ - __Pyx_TraceLine(1030,0,__PYX_ERR(5, 1030, __pyx_L1_error)) __pyx_t_2 = ((!(__pyx_f_4lxml_5etree_attemptDeallocation(__pyx_v_c_node) != 0)) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1032 + /* "src/lxml/apihelpers.pxi":1031 * if not attemptDeallocation(c_node): * # make namespaces absolute * moveNodeToDocument(doc, c_node.doc, c_node) # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(1032,0,__PYX_ERR(5, 1032, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree_moveNodeToDocument(__pyx_v_doc, __pyx_v_c_node->doc, __pyx_v_c_node); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(5, 1032, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_moveNodeToDocument(__pyx_v_doc, __pyx_v_c_node->doc, __pyx_v_c_node); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(5, 1031, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1030 + /* "src/lxml/apihelpers.pxi":1029 * tree.xmlUnlinkNode(c_node) * _moveTail(c_next, c_node) * if not attemptDeallocation(c_node): # <<<<<<<<<<<<<< @@ -30566,18 +29008,17 @@ static int __pyx_f_4lxml_5etree__removeNode(struct LxmlDocument *__pyx_v_doc, xm */ } - /* "src/lxml/apihelpers.pxi":1033 + /* "src/lxml/apihelpers.pxi":1032 * # make namespaces absolute * moveNodeToDocument(doc, c_node.doc, c_node) * return 0 # <<<<<<<<<<<<<< * * cdef int _removeSiblings(xmlNode* c_element, tree.xmlElementType node_type, bint with_tail) except -1: */ - __Pyx_TraceLine(1033,0,__PYX_ERR(5, 1033, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1022 + /* "src/lxml/apihelpers.pxi":1021 * return count * * cdef int _removeNode(_Document doc, xmlNode* c_node) except -1: # <<<<<<<<<<<<<< @@ -30590,12 +29031,11 @@ static int __pyx_f_4lxml_5etree__removeNode(struct LxmlDocument *__pyx_v_doc, xm __Pyx_AddTraceback("lxml.etree._removeNode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1035 +/* "src/lxml/apihelpers.pxi":1034 * return 0 * * cdef int _removeSiblings(xmlNode* c_element, tree.xmlElementType node_type, bint with_tail) except -1: # <<<<<<<<<<<<<< @@ -30607,79 +29047,71 @@ static int __pyx_f_4lxml_5etree__removeSiblings(xmlNode *__pyx_v_c_element, xmlE xmlNode *__pyx_v_c_node; xmlNode *__pyx_v_c_next; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlNode *__pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_removeSiblings", 0); - __Pyx_TraceCall("_removeSiblings", __pyx_f[5], 1035, 0, __PYX_ERR(5, 1035, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1038 + /* "src/lxml/apihelpers.pxi":1037 * cdef xmlNode* c_node * cdef xmlNode* c_next * c_node = c_element.next # <<<<<<<<<<<<<< * while c_node is not NULL: * c_next = _nextElement(c_node) */ - __Pyx_TraceLine(1038,0,__PYX_ERR(5, 1038, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_element->next; __pyx_v_c_node = __pyx_t_1; - /* "src/lxml/apihelpers.pxi":1039 + /* "src/lxml/apihelpers.pxi":1038 * cdef xmlNode* c_next * c_node = c_element.next * while c_node is not NULL: # <<<<<<<<<<<<<< * c_next = _nextElement(c_node) * if c_node.type == node_type: */ - __Pyx_TraceLine(1039,0,__PYX_ERR(5, 1039, __pyx_L1_error)) while (1) { __pyx_t_2 = ((__pyx_v_c_node != NULL) != 0); if (!__pyx_t_2) break; - /* "src/lxml/apihelpers.pxi":1040 + /* "src/lxml/apihelpers.pxi":1039 * c_node = c_element.next * while c_node is not NULL: * c_next = _nextElement(c_node) # <<<<<<<<<<<<<< * if c_node.type == node_type: * if with_tail: */ - __Pyx_TraceLine(1040,0,__PYX_ERR(5, 1040, __pyx_L1_error)) __pyx_v_c_next = __pyx_f_4lxml_5etree__nextElement(__pyx_v_c_node); - /* "src/lxml/apihelpers.pxi":1041 + /* "src/lxml/apihelpers.pxi":1040 * while c_node is not NULL: * c_next = _nextElement(c_node) * if c_node.type == node_type: # <<<<<<<<<<<<<< * if with_tail: * _removeText(c_node.next) */ - __Pyx_TraceLine(1041,0,__PYX_ERR(5, 1041, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node->type == __pyx_v_node_type) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1042 + /* "src/lxml/apihelpers.pxi":1041 * c_next = _nextElement(c_node) * if c_node.type == node_type: * if with_tail: # <<<<<<<<<<<<<< * _removeText(c_node.next) * tree.xmlUnlinkNode(c_node) */ - __Pyx_TraceLine(1042,0,__PYX_ERR(5, 1042, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_with_tail != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1043 + /* "src/lxml/apihelpers.pxi":1042 * if c_node.type == node_type: * if with_tail: * _removeText(c_node.next) # <<<<<<<<<<<<<< * tree.xmlUnlinkNode(c_node) * attemptDeallocation(c_node) */ - __Pyx_TraceLine(1043,0,__PYX_ERR(5, 1043, __pyx_L1_error)) __pyx_f_4lxml_5etree__removeText(__pyx_v_c_node->next); - /* "src/lxml/apihelpers.pxi":1042 + /* "src/lxml/apihelpers.pxi":1041 * c_next = _nextElement(c_node) * if c_node.type == node_type: * if with_tail: # <<<<<<<<<<<<<< @@ -30688,27 +29120,25 @@ static int __pyx_f_4lxml_5etree__removeSiblings(xmlNode *__pyx_v_c_element, xmlE */ } - /* "src/lxml/apihelpers.pxi":1044 + /* "src/lxml/apihelpers.pxi":1043 * if with_tail: * _removeText(c_node.next) * tree.xmlUnlinkNode(c_node) # <<<<<<<<<<<<<< * attemptDeallocation(c_node) * c_node = c_next */ - __Pyx_TraceLine(1044,0,__PYX_ERR(5, 1044, __pyx_L1_error)) xmlUnlinkNode(__pyx_v_c_node); - /* "src/lxml/apihelpers.pxi":1045 + /* "src/lxml/apihelpers.pxi":1044 * _removeText(c_node.next) * tree.xmlUnlinkNode(c_node) * attemptDeallocation(c_node) # <<<<<<<<<<<<<< * c_node = c_next * c_node = c_element.prev */ - __Pyx_TraceLine(1045,0,__PYX_ERR(5, 1045, __pyx_L1_error)) (void)(__pyx_f_4lxml_5etree_attemptDeallocation(__pyx_v_c_node)); - /* "src/lxml/apihelpers.pxi":1041 + /* "src/lxml/apihelpers.pxi":1040 * while c_node is not NULL: * c_next = _nextElement(c_node) * if c_node.type == node_type: # <<<<<<<<<<<<<< @@ -30717,83 +29147,76 @@ static int __pyx_f_4lxml_5etree__removeSiblings(xmlNode *__pyx_v_c_element, xmlE */ } - /* "src/lxml/apihelpers.pxi":1046 + /* "src/lxml/apihelpers.pxi":1045 * tree.xmlUnlinkNode(c_node) * attemptDeallocation(c_node) * c_node = c_next # <<<<<<<<<<<<<< * c_node = c_element.prev * while c_node is not NULL: */ - __Pyx_TraceLine(1046,0,__PYX_ERR(5, 1046, __pyx_L1_error)) __pyx_v_c_node = __pyx_v_c_next; } - /* "src/lxml/apihelpers.pxi":1047 + /* "src/lxml/apihelpers.pxi":1046 * attemptDeallocation(c_node) * c_node = c_next * c_node = c_element.prev # <<<<<<<<<<<<<< * while c_node is not NULL: * c_next = _previousElement(c_node) */ - __Pyx_TraceLine(1047,0,__PYX_ERR(5, 1047, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_element->prev; __pyx_v_c_node = __pyx_t_1; - /* "src/lxml/apihelpers.pxi":1048 + /* "src/lxml/apihelpers.pxi":1047 * c_node = c_next * c_node = c_element.prev * while c_node is not NULL: # <<<<<<<<<<<<<< * c_next = _previousElement(c_node) * if c_node.type == node_type: */ - __Pyx_TraceLine(1048,0,__PYX_ERR(5, 1048, __pyx_L1_error)) while (1) { __pyx_t_2 = ((__pyx_v_c_node != NULL) != 0); if (!__pyx_t_2) break; - /* "src/lxml/apihelpers.pxi":1049 + /* "src/lxml/apihelpers.pxi":1048 * c_node = c_element.prev * while c_node is not NULL: * c_next = _previousElement(c_node) # <<<<<<<<<<<<<< * if c_node.type == node_type: * if with_tail: */ - __Pyx_TraceLine(1049,0,__PYX_ERR(5, 1049, __pyx_L1_error)) __pyx_v_c_next = __pyx_f_4lxml_5etree__previousElement(__pyx_v_c_node); - /* "src/lxml/apihelpers.pxi":1050 + /* "src/lxml/apihelpers.pxi":1049 * while c_node is not NULL: * c_next = _previousElement(c_node) * if c_node.type == node_type: # <<<<<<<<<<<<<< * if with_tail: * _removeText(c_node.next) */ - __Pyx_TraceLine(1050,0,__PYX_ERR(5, 1050, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node->type == __pyx_v_node_type) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1051 + /* "src/lxml/apihelpers.pxi":1050 * c_next = _previousElement(c_node) * if c_node.type == node_type: * if with_tail: # <<<<<<<<<<<<<< * _removeText(c_node.next) * tree.xmlUnlinkNode(c_node) */ - __Pyx_TraceLine(1051,0,__PYX_ERR(5, 1051, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_with_tail != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1052 + /* "src/lxml/apihelpers.pxi":1051 * if c_node.type == node_type: * if with_tail: * _removeText(c_node.next) # <<<<<<<<<<<<<< * tree.xmlUnlinkNode(c_node) * attemptDeallocation(c_node) */ - __Pyx_TraceLine(1052,0,__PYX_ERR(5, 1052, __pyx_L1_error)) __pyx_f_4lxml_5etree__removeText(__pyx_v_c_node->next); - /* "src/lxml/apihelpers.pxi":1051 + /* "src/lxml/apihelpers.pxi":1050 * c_next = _previousElement(c_node) * if c_node.type == node_type: * if with_tail: # <<<<<<<<<<<<<< @@ -30802,27 +29225,25 @@ static int __pyx_f_4lxml_5etree__removeSiblings(xmlNode *__pyx_v_c_element, xmlE */ } - /* "src/lxml/apihelpers.pxi":1053 + /* "src/lxml/apihelpers.pxi":1052 * if with_tail: * _removeText(c_node.next) * tree.xmlUnlinkNode(c_node) # <<<<<<<<<<<<<< * attemptDeallocation(c_node) * c_node = c_next */ - __Pyx_TraceLine(1053,0,__PYX_ERR(5, 1053, __pyx_L1_error)) xmlUnlinkNode(__pyx_v_c_node); - /* "src/lxml/apihelpers.pxi":1054 + /* "src/lxml/apihelpers.pxi":1053 * _removeText(c_node.next) * tree.xmlUnlinkNode(c_node) * attemptDeallocation(c_node) # <<<<<<<<<<<<<< * c_node = c_next * return 0 */ - __Pyx_TraceLine(1054,0,__PYX_ERR(5, 1054, __pyx_L1_error)) (void)(__pyx_f_4lxml_5etree_attemptDeallocation(__pyx_v_c_node)); - /* "src/lxml/apihelpers.pxi":1050 + /* "src/lxml/apihelpers.pxi":1049 * while c_node is not NULL: * c_next = _previousElement(c_node) * if c_node.type == node_type: # <<<<<<<<<<<<<< @@ -30831,29 +29252,27 @@ static int __pyx_f_4lxml_5etree__removeSiblings(xmlNode *__pyx_v_c_element, xmlE */ } - /* "src/lxml/apihelpers.pxi":1055 + /* "src/lxml/apihelpers.pxi":1054 * tree.xmlUnlinkNode(c_node) * attemptDeallocation(c_node) * c_node = c_next # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(1055,0,__PYX_ERR(5, 1055, __pyx_L1_error)) __pyx_v_c_node = __pyx_v_c_next; } - /* "src/lxml/apihelpers.pxi":1056 + /* "src/lxml/apihelpers.pxi":1055 * attemptDeallocation(c_node) * c_node = c_next * return 0 # <<<<<<<<<<<<<< * * cdef void _moveTail(xmlNode* c_tail, xmlNode* c_target): */ - __Pyx_TraceLine(1056,0,__PYX_ERR(5, 1056, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1035 + /* "src/lxml/apihelpers.pxi":1034 * return 0 * * cdef int _removeSiblings(xmlNode* c_element, tree.xmlElementType node_type, bint with_tail) except -1: # <<<<<<<<<<<<<< @@ -30862,16 +29281,12 @@ static int __pyx_f_4lxml_5etree__removeSiblings(xmlNode *__pyx_v_c_element, xmlE */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._removeSiblings", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1058 +/* "src/lxml/apihelpers.pxi":1057 * return 0 * * cdef void _moveTail(xmlNode* c_tail, xmlNode* c_target): # <<<<<<<<<<<<<< @@ -30881,66 +29296,59 @@ static int __pyx_f_4lxml_5etree__removeSiblings(xmlNode *__pyx_v_c_element, xmlE static void __pyx_f_4lxml_5etree__moveTail(xmlNode *__pyx_v_c_tail, xmlNode *__pyx_v_c_target) { xmlNode *__pyx_v_c_next; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_moveTail", 0); - __Pyx_TraceCall("_moveTail", __pyx_f[5], 1058, 0, __PYX_ERR(5, 1058, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1062 + /* "src/lxml/apihelpers.pxi":1061 * # tail support: look for any text nodes trailing this node and * # move them too * c_tail = _textNodeOrSkip(c_tail) # <<<<<<<<<<<<<< * while c_tail is not NULL: * c_next = _textNodeOrSkip(c_tail.next) */ - __Pyx_TraceLine(1062,0,__PYX_ERR(5, 1062, __pyx_L1_error)) __pyx_v_c_tail = __pyx_f_4lxml_5etree__textNodeOrSkip(__pyx_v_c_tail); - /* "src/lxml/apihelpers.pxi":1063 + /* "src/lxml/apihelpers.pxi":1062 * # move them too * c_tail = _textNodeOrSkip(c_tail) * while c_tail is not NULL: # <<<<<<<<<<<<<< * c_next = _textNodeOrSkip(c_tail.next) * c_target = tree.xmlAddNextSibling(c_target, c_tail) */ - __Pyx_TraceLine(1063,0,__PYX_ERR(5, 1063, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_tail != NULL) != 0); if (!__pyx_t_1) break; - /* "src/lxml/apihelpers.pxi":1064 + /* "src/lxml/apihelpers.pxi":1063 * c_tail = _textNodeOrSkip(c_tail) * while c_tail is not NULL: * c_next = _textNodeOrSkip(c_tail.next) # <<<<<<<<<<<<<< * c_target = tree.xmlAddNextSibling(c_target, c_tail) * c_tail = c_next */ - __Pyx_TraceLine(1064,0,__PYX_ERR(5, 1064, __pyx_L1_error)) __pyx_v_c_next = __pyx_f_4lxml_5etree__textNodeOrSkip(__pyx_v_c_tail->next); - /* "src/lxml/apihelpers.pxi":1065 + /* "src/lxml/apihelpers.pxi":1064 * while c_tail is not NULL: * c_next = _textNodeOrSkip(c_tail.next) * c_target = tree.xmlAddNextSibling(c_target, c_tail) # <<<<<<<<<<<<<< * c_tail = c_next * */ - __Pyx_TraceLine(1065,0,__PYX_ERR(5, 1065, __pyx_L1_error)) __pyx_v_c_target = xmlAddNextSibling(__pyx_v_c_target, __pyx_v_c_tail); - /* "src/lxml/apihelpers.pxi":1066 + /* "src/lxml/apihelpers.pxi":1065 * c_next = _textNodeOrSkip(c_tail.next) * c_target = tree.xmlAddNextSibling(c_target, c_tail) * c_tail = c_next # <<<<<<<<<<<<<< * * cdef int _copyTail(xmlNode* c_tail, xmlNode* c_target) except -1: */ - __Pyx_TraceLine(1066,0,__PYX_ERR(5, 1066, __pyx_L1_error)) __pyx_v_c_tail = __pyx_v_c_next; } - /* "src/lxml/apihelpers.pxi":1058 + /* "src/lxml/apihelpers.pxi":1057 * return 0 * * cdef void _moveTail(xmlNode* c_tail, xmlNode* c_target): # <<<<<<<<<<<<<< @@ -30949,15 +29357,10 @@ static void __pyx_f_4lxml_5etree__moveTail(xmlNode *__pyx_v_c_tail, xmlNode *__p */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._moveTail", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } -/* "src/lxml/apihelpers.pxi":1068 +/* "src/lxml/apihelpers.pxi":1067 * c_tail = c_next * * cdef int _copyTail(xmlNode* c_tail, xmlNode* c_target) except -1: # <<<<<<<<<<<<<< @@ -30968,56 +29371,50 @@ static void __pyx_f_4lxml_5etree__moveTail(xmlNode *__pyx_v_c_tail, xmlNode *__p static int __pyx_f_4lxml_5etree__copyTail(xmlNode *__pyx_v_c_tail, xmlNode *__pyx_v_c_target) { xmlNode *__pyx_v_c_new_tail; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_copyTail", 0); - __Pyx_TraceCall("_copyTail", __pyx_f[5], 1068, 0, __PYX_ERR(5, 1068, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1072 + /* "src/lxml/apihelpers.pxi":1071 * # tail copying support: look for any text nodes trailing this node and * # copy it to the target node * c_tail = _textNodeOrSkip(c_tail) # <<<<<<<<<<<<<< * while c_tail is not NULL: * if c_target.doc is not c_tail.doc: */ - __Pyx_TraceLine(1072,0,__PYX_ERR(5, 1072, __pyx_L1_error)) __pyx_v_c_tail = __pyx_f_4lxml_5etree__textNodeOrSkip(__pyx_v_c_tail); - /* "src/lxml/apihelpers.pxi":1073 + /* "src/lxml/apihelpers.pxi":1072 * # copy it to the target node * c_tail = _textNodeOrSkip(c_tail) * while c_tail is not NULL: # <<<<<<<<<<<<<< * if c_target.doc is not c_tail.doc: * c_new_tail = tree.xmlDocCopyNode(c_tail, c_target.doc, 0) */ - __Pyx_TraceLine(1073,0,__PYX_ERR(5, 1073, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_tail != NULL) != 0); if (!__pyx_t_1) break; - /* "src/lxml/apihelpers.pxi":1074 + /* "src/lxml/apihelpers.pxi":1073 * c_tail = _textNodeOrSkip(c_tail) * while c_tail is not NULL: * if c_target.doc is not c_tail.doc: # <<<<<<<<<<<<<< * c_new_tail = tree.xmlDocCopyNode(c_tail, c_target.doc, 0) * else: */ - __Pyx_TraceLine(1074,0,__PYX_ERR(5, 1074, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_target->doc != __pyx_v_c_tail->doc) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1075 + /* "src/lxml/apihelpers.pxi":1074 * while c_tail is not NULL: * if c_target.doc is not c_tail.doc: * c_new_tail = tree.xmlDocCopyNode(c_tail, c_target.doc, 0) # <<<<<<<<<<<<<< * else: * c_new_tail = tree.xmlCopyNode(c_tail, 0) */ - __Pyx_TraceLine(1075,0,__PYX_ERR(5, 1075, __pyx_L1_error)) __pyx_v_c_new_tail = xmlDocCopyNode(__pyx_v_c_tail, __pyx_v_c_target->doc, 0); - /* "src/lxml/apihelpers.pxi":1074 + /* "src/lxml/apihelpers.pxi":1073 * c_tail = _textNodeOrSkip(c_tail) * while c_tail is not NULL: * if c_target.doc is not c_tail.doc: # <<<<<<<<<<<<<< @@ -31027,41 +29424,38 @@ static int __pyx_f_4lxml_5etree__copyTail(xmlNode *__pyx_v_c_tail, xmlNode *__py goto __pyx_L5; } - /* "src/lxml/apihelpers.pxi":1077 + /* "src/lxml/apihelpers.pxi":1076 * c_new_tail = tree.xmlDocCopyNode(c_tail, c_target.doc, 0) * else: * c_new_tail = tree.xmlCopyNode(c_tail, 0) # <<<<<<<<<<<<<< * if c_new_tail is NULL: * raise MemoryError() */ - __Pyx_TraceLine(1077,0,__PYX_ERR(5, 1077, __pyx_L1_error)) /*else*/ { __pyx_v_c_new_tail = xmlCopyNode(__pyx_v_c_tail, 0); } __pyx_L5:; - /* "src/lxml/apihelpers.pxi":1078 + /* "src/lxml/apihelpers.pxi":1077 * else: * c_new_tail = tree.xmlCopyNode(c_tail, 0) * if c_new_tail is NULL: # <<<<<<<<<<<<<< * raise MemoryError() * c_target = tree.xmlAddNextSibling(c_target, c_new_tail) */ - __Pyx_TraceLine(1078,0,__PYX_ERR(5, 1078, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_new_tail == NULL) != 0); if (unlikely(__pyx_t_1)) { - /* "src/lxml/apihelpers.pxi":1079 + /* "src/lxml/apihelpers.pxi":1078 * c_new_tail = tree.xmlCopyNode(c_tail, 0) * if c_new_tail is NULL: * raise MemoryError() # <<<<<<<<<<<<<< * c_target = tree.xmlAddNextSibling(c_target, c_new_tail) * c_tail = _textNodeOrSkip(c_tail.next) */ - __Pyx_TraceLine(1079,0,__PYX_ERR(5, 1079, __pyx_L1_error)) - PyErr_NoMemory(); __PYX_ERR(5, 1079, __pyx_L1_error) + PyErr_NoMemory(); __PYX_ERR(5, 1078, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1078 + /* "src/lxml/apihelpers.pxi":1077 * else: * c_new_tail = tree.xmlCopyNode(c_tail, 0) * if c_new_tail is NULL: # <<<<<<<<<<<<<< @@ -31070,39 +29464,36 @@ static int __pyx_f_4lxml_5etree__copyTail(xmlNode *__pyx_v_c_tail, xmlNode *__py */ } - /* "src/lxml/apihelpers.pxi":1080 + /* "src/lxml/apihelpers.pxi":1079 * if c_new_tail is NULL: * raise MemoryError() * c_target = tree.xmlAddNextSibling(c_target, c_new_tail) # <<<<<<<<<<<<<< * c_tail = _textNodeOrSkip(c_tail.next) * return 0 */ - __Pyx_TraceLine(1080,0,__PYX_ERR(5, 1080, __pyx_L1_error)) __pyx_v_c_target = xmlAddNextSibling(__pyx_v_c_target, __pyx_v_c_new_tail); - /* "src/lxml/apihelpers.pxi":1081 + /* "src/lxml/apihelpers.pxi":1080 * raise MemoryError() * c_target = tree.xmlAddNextSibling(c_target, c_new_tail) * c_tail = _textNodeOrSkip(c_tail.next) # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(1081,0,__PYX_ERR(5, 1081, __pyx_L1_error)) __pyx_v_c_tail = __pyx_f_4lxml_5etree__textNodeOrSkip(__pyx_v_c_tail->next); } - /* "src/lxml/apihelpers.pxi":1082 + /* "src/lxml/apihelpers.pxi":1081 * c_target = tree.xmlAddNextSibling(c_target, c_new_tail) * c_tail = _textNodeOrSkip(c_tail.next) * return 0 # <<<<<<<<<<<<<< * * cdef int _copyNonElementSiblings(xmlNode* c_node, xmlNode* c_target) except -1: */ - __Pyx_TraceLine(1082,0,__PYX_ERR(5, 1082, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1068 + /* "src/lxml/apihelpers.pxi":1067 * c_tail = c_next * * cdef int _copyTail(xmlNode* c_tail, xmlNode* c_target) except -1: # <<<<<<<<<<<<<< @@ -31115,12 +29506,11 @@ static int __pyx_f_4lxml_5etree__copyTail(xmlNode *__pyx_v_c_tail, xmlNode *__py __Pyx_AddTraceback("lxml.etree._copyTail", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1084 +/* "src/lxml/apihelpers.pxi":1083 * return 0 * * cdef int _copyNonElementSiblings(xmlNode* c_node, xmlNode* c_target) except -1: # <<<<<<<<<<<<<< @@ -31132,33 +29522,29 @@ static int __pyx_f_4lxml_5etree__copyNonElementSiblings(xmlNode *__pyx_v_c_node, xmlNode *__pyx_v_c_copy; xmlNode *__pyx_v_c_sibling; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; xmlNode *__pyx_t_3; xmlDtd *__pyx_t_4; __Pyx_RefNannySetupContext("_copyNonElementSiblings", 0); - __Pyx_TraceCall("_copyNonElementSiblings", __pyx_f[5], 1084, 0, __PYX_ERR(5, 1084, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1086 + /* "src/lxml/apihelpers.pxi":1085 * cdef int _copyNonElementSiblings(xmlNode* c_node, xmlNode* c_target) except -1: * cdef xmlNode* c_copy * cdef xmlNode* c_sibling = c_node # <<<<<<<<<<<<<< * while c_sibling.prev != NULL and \ * (c_sibling.prev.type == tree.XML_PI_NODE or */ - __Pyx_TraceLine(1086,0,__PYX_ERR(5, 1086, __pyx_L1_error)) __pyx_v_c_sibling = __pyx_v_c_node; - /* "src/lxml/apihelpers.pxi":1087 + /* "src/lxml/apihelpers.pxi":1086 * cdef xmlNode* c_copy * cdef xmlNode* c_sibling = c_node * while c_sibling.prev != NULL and \ # <<<<<<<<<<<<<< * (c_sibling.prev.type == tree.XML_PI_NODE or * c_sibling.prev.type == tree.XML_COMMENT_NODE or */ - __Pyx_TraceLine(1087,0,__PYX_ERR(5, 1087, __pyx_L1_error)) while (1) { __pyx_t_2 = ((__pyx_v_c_sibling->prev != NULL) != 0); if (__pyx_t_2) { @@ -31167,45 +29553,33 @@ static int __pyx_f_4lxml_5etree__copyNonElementSiblings(xmlNode *__pyx_v_c_node, goto __pyx_L5_bool_binop_done; } - /* "src/lxml/apihelpers.pxi":1088 + /* "src/lxml/apihelpers.pxi":1087 * cdef xmlNode* c_sibling = c_node * while c_sibling.prev != NULL and \ * (c_sibling.prev.type == tree.XML_PI_NODE or # <<<<<<<<<<<<<< * c_sibling.prev.type == tree.XML_COMMENT_NODE or * c_sibling.prev.type == tree.XML_DTD_NODE): */ - __Pyx_TraceLine(1088,0,__PYX_ERR(5, 1088, __pyx_L1_error)) switch (__pyx_v_c_sibling->prev->type) { case XML_PI_NODE: + case XML_COMMENT_NODE: - /* "src/lxml/apihelpers.pxi":1089 + /* "src/lxml/apihelpers.pxi":1088 * while c_sibling.prev != NULL and \ * (c_sibling.prev.type == tree.XML_PI_NODE or * c_sibling.prev.type == tree.XML_COMMENT_NODE or # <<<<<<<<<<<<<< * c_sibling.prev.type == tree.XML_DTD_NODE): * c_sibling = c_sibling.prev */ - __Pyx_TraceLine(1089,0,__PYX_ERR(5, 1089, __pyx_L1_error)) - case XML_COMMENT_NODE: - - /* "src/lxml/apihelpers.pxi":1090 - * (c_sibling.prev.type == tree.XML_PI_NODE or - * c_sibling.prev.type == tree.XML_COMMENT_NODE or - * c_sibling.prev.type == tree.XML_DTD_NODE): # <<<<<<<<<<<<<< - * c_sibling = c_sibling.prev - * while c_sibling != c_node: - */ - __Pyx_TraceLine(1090,0,__PYX_ERR(5, 1090, __pyx_L1_error)) case XML_DTD_NODE: - /* "src/lxml/apihelpers.pxi":1088 + /* "src/lxml/apihelpers.pxi":1087 * cdef xmlNode* c_sibling = c_node * while c_sibling.prev != NULL and \ * (c_sibling.prev.type == tree.XML_PI_NODE or # <<<<<<<<<<<<<< * c_sibling.prev.type == tree.XML_COMMENT_NODE or * c_sibling.prev.type == tree.XML_DTD_NODE): */ - __Pyx_TraceLine(1088,0,__PYX_ERR(5, 1088, __pyx_L1_error)) __pyx_t_2 = 1; break; default: @@ -31216,74 +29590,68 @@ static int __pyx_f_4lxml_5etree__copyNonElementSiblings(xmlNode *__pyx_v_c_node, __pyx_L5_bool_binop_done:; if (!__pyx_t_1) break; - /* "src/lxml/apihelpers.pxi":1091 + /* "src/lxml/apihelpers.pxi":1090 * c_sibling.prev.type == tree.XML_COMMENT_NODE or * c_sibling.prev.type == tree.XML_DTD_NODE): * c_sibling = c_sibling.prev # <<<<<<<<<<<<<< * while c_sibling != c_node: * if c_sibling.type == tree.XML_DTD_NODE: */ - __Pyx_TraceLine(1091,0,__PYX_ERR(5, 1091, __pyx_L1_error)) __pyx_t_3 = __pyx_v_c_sibling->prev; __pyx_v_c_sibling = __pyx_t_3; } - /* "src/lxml/apihelpers.pxi":1092 + /* "src/lxml/apihelpers.pxi":1091 * c_sibling.prev.type == tree.XML_DTD_NODE): * c_sibling = c_sibling.prev * while c_sibling != c_node: # <<<<<<<<<<<<<< * if c_sibling.type == tree.XML_DTD_NODE: * c_copy = _copyDtd(c_sibling) */ - __Pyx_TraceLine(1092,0,__PYX_ERR(5, 1092, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_sibling != __pyx_v_c_node) != 0); if (!__pyx_t_1) break; - /* "src/lxml/apihelpers.pxi":1093 + /* "src/lxml/apihelpers.pxi":1092 * c_sibling = c_sibling.prev * while c_sibling != c_node: * if c_sibling.type == tree.XML_DTD_NODE: # <<<<<<<<<<<<<< * c_copy = _copyDtd(c_sibling) * if c_sibling == c_node.doc.intSubset: */ - __Pyx_TraceLine(1093,0,__PYX_ERR(5, 1093, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_sibling->type == XML_DTD_NODE) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1094 + /* "src/lxml/apihelpers.pxi":1093 * while c_sibling != c_node: * if c_sibling.type == tree.XML_DTD_NODE: * c_copy = _copyDtd(c_sibling) # <<<<<<<<<<<<<< * if c_sibling == c_node.doc.intSubset: * c_target.doc.intSubset = c_copy */ - __Pyx_TraceLine(1094,0,__PYX_ERR(5, 1094, __pyx_L1_error)) - __pyx_t_4 = __pyx_f_4lxml_5etree__copyDtd(((xmlDtd *)__pyx_v_c_sibling)); if (unlikely(__pyx_t_4 == ((xmlDtd *)NULL))) __PYX_ERR(5, 1094, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__copyDtd(((xmlDtd *)__pyx_v_c_sibling)); if (unlikely(__pyx_t_4 == ((xmlDtd *)NULL))) __PYX_ERR(5, 1093, __pyx_L1_error) __pyx_v_c_copy = ((xmlNode *)__pyx_t_4); - /* "src/lxml/apihelpers.pxi":1095 + /* "src/lxml/apihelpers.pxi":1094 * if c_sibling.type == tree.XML_DTD_NODE: * c_copy = _copyDtd(c_sibling) * if c_sibling == c_node.doc.intSubset: # <<<<<<<<<<<<<< * c_target.doc.intSubset = c_copy * else: # c_sibling == c_node.doc.extSubset */ - __Pyx_TraceLine(1095,0,__PYX_ERR(5, 1095, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_sibling == ((xmlNode *)__pyx_v_c_node->doc->intSubset)) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1096 + /* "src/lxml/apihelpers.pxi":1095 * c_copy = _copyDtd(c_sibling) * if c_sibling == c_node.doc.intSubset: * c_target.doc.intSubset = c_copy # <<<<<<<<<<<<<< * else: # c_sibling == c_node.doc.extSubset * c_target.doc.extSubset = c_copy */ - __Pyx_TraceLine(1096,0,__PYX_ERR(5, 1096, __pyx_L1_error)) __pyx_v_c_target->doc->intSubset = ((xmlDtd *)__pyx_v_c_copy); - /* "src/lxml/apihelpers.pxi":1095 + /* "src/lxml/apihelpers.pxi":1094 * if c_sibling.type == tree.XML_DTD_NODE: * c_copy = _copyDtd(c_sibling) * if c_sibling == c_node.doc.intSubset: # <<<<<<<<<<<<<< @@ -31293,20 +29661,19 @@ static int __pyx_f_4lxml_5etree__copyNonElementSiblings(xmlNode *__pyx_v_c_node, goto __pyx_L10; } - /* "src/lxml/apihelpers.pxi":1098 + /* "src/lxml/apihelpers.pxi":1097 * c_target.doc.intSubset = c_copy * else: # c_sibling == c_node.doc.extSubset * c_target.doc.extSubset = c_copy # <<<<<<<<<<<<<< * else: * c_copy = tree.xmlDocCopyNode(c_sibling, c_target.doc, 1) */ - __Pyx_TraceLine(1098,0,__PYX_ERR(5, 1098, __pyx_L1_error)) /*else*/ { __pyx_v_c_target->doc->extSubset = ((xmlDtd *)__pyx_v_c_copy); } __pyx_L10:; - /* "src/lxml/apihelpers.pxi":1093 + /* "src/lxml/apihelpers.pxi":1092 * c_sibling = c_sibling.prev * while c_sibling != c_node: * if c_sibling.type == tree.XML_DTD_NODE: # <<<<<<<<<<<<<< @@ -31316,39 +29683,36 @@ static int __pyx_f_4lxml_5etree__copyNonElementSiblings(xmlNode *__pyx_v_c_node, goto __pyx_L9; } - /* "src/lxml/apihelpers.pxi":1100 + /* "src/lxml/apihelpers.pxi":1099 * c_target.doc.extSubset = c_copy * else: * c_copy = tree.xmlDocCopyNode(c_sibling, c_target.doc, 1) # <<<<<<<<<<<<<< * if c_copy is NULL: * raise MemoryError() */ - __Pyx_TraceLine(1100,0,__PYX_ERR(5, 1100, __pyx_L1_error)) /*else*/ { __pyx_v_c_copy = xmlDocCopyNode(__pyx_v_c_sibling, __pyx_v_c_target->doc, 1); - /* "src/lxml/apihelpers.pxi":1101 + /* "src/lxml/apihelpers.pxi":1100 * else: * c_copy = tree.xmlDocCopyNode(c_sibling, c_target.doc, 1) * if c_copy is NULL: # <<<<<<<<<<<<<< * raise MemoryError() * tree.xmlAddPrevSibling(c_target, c_copy) */ - __Pyx_TraceLine(1101,0,__PYX_ERR(5, 1101, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_copy == NULL) != 0); if (unlikely(__pyx_t_1)) { - /* "src/lxml/apihelpers.pxi":1102 + /* "src/lxml/apihelpers.pxi":1101 * c_copy = tree.xmlDocCopyNode(c_sibling, c_target.doc, 1) * if c_copy is NULL: * raise MemoryError() # <<<<<<<<<<<<<< * tree.xmlAddPrevSibling(c_target, c_copy) * c_sibling = c_sibling.next */ - __Pyx_TraceLine(1102,0,__PYX_ERR(5, 1102, __pyx_L1_error)) - PyErr_NoMemory(); __PYX_ERR(5, 1102, __pyx_L1_error) + PyErr_NoMemory(); __PYX_ERR(5, 1101, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1101 + /* "src/lxml/apihelpers.pxi":1100 * else: * c_copy = tree.xmlDocCopyNode(c_sibling, c_target.doc, 1) * if c_copy is NULL: # <<<<<<<<<<<<<< @@ -31359,36 +29723,33 @@ static int __pyx_f_4lxml_5etree__copyNonElementSiblings(xmlNode *__pyx_v_c_node, } __pyx_L9:; - /* "src/lxml/apihelpers.pxi":1103 + /* "src/lxml/apihelpers.pxi":1102 * if c_copy is NULL: * raise MemoryError() * tree.xmlAddPrevSibling(c_target, c_copy) # <<<<<<<<<<<<<< * c_sibling = c_sibling.next * while c_sibling.next != NULL and \ */ - __Pyx_TraceLine(1103,0,__PYX_ERR(5, 1103, __pyx_L1_error)) (void)(xmlAddPrevSibling(__pyx_v_c_target, __pyx_v_c_copy)); - /* "src/lxml/apihelpers.pxi":1104 + /* "src/lxml/apihelpers.pxi":1103 * raise MemoryError() * tree.xmlAddPrevSibling(c_target, c_copy) * c_sibling = c_sibling.next # <<<<<<<<<<<<<< * while c_sibling.next != NULL and \ - * (c_sibling.next.type == tree.XML_PI_NODE or \ + * (c_sibling.next.type == tree.XML_PI_NODE or */ - __Pyx_TraceLine(1104,0,__PYX_ERR(5, 1104, __pyx_L1_error)) __pyx_t_3 = __pyx_v_c_sibling->next; __pyx_v_c_sibling = __pyx_t_3; } - /* "src/lxml/apihelpers.pxi":1105 + /* "src/lxml/apihelpers.pxi":1104 * tree.xmlAddPrevSibling(c_target, c_copy) * c_sibling = c_sibling.next * while c_sibling.next != NULL and \ # <<<<<<<<<<<<<< - * (c_sibling.next.type == tree.XML_PI_NODE or \ - * c_sibling.next.type == tree.XML_COMMENT_NODE): + * (c_sibling.next.type == tree.XML_PI_NODE or + * c_sibling.next.type == tree.XML_COMMENT_NODE): */ - __Pyx_TraceLine(1105,0,__PYX_ERR(5, 1105, __pyx_L1_error)) while (1) { __pyx_t_2 = ((__pyx_v_c_sibling->next != NULL) != 0); if (__pyx_t_2) { @@ -31397,36 +29758,33 @@ static int __pyx_f_4lxml_5etree__copyNonElementSiblings(xmlNode *__pyx_v_c_node, goto __pyx_L14_bool_binop_done; } - /* "src/lxml/apihelpers.pxi":1106 + /* "src/lxml/apihelpers.pxi":1105 * c_sibling = c_sibling.next * while c_sibling.next != NULL and \ - * (c_sibling.next.type == tree.XML_PI_NODE or \ # <<<<<<<<<<<<<< - * c_sibling.next.type == tree.XML_COMMENT_NODE): + * (c_sibling.next.type == tree.XML_PI_NODE or # <<<<<<<<<<<<<< + * c_sibling.next.type == tree.XML_COMMENT_NODE): * c_sibling = c_sibling.next */ - __Pyx_TraceLine(1106,0,__PYX_ERR(5, 1106, __pyx_L1_error)) switch (__pyx_v_c_sibling->next->type) { case XML_PI_NODE: + case XML_COMMENT_NODE: - /* "src/lxml/apihelpers.pxi":1107 + /* "src/lxml/apihelpers.pxi":1106 * while c_sibling.next != NULL and \ - * (c_sibling.next.type == tree.XML_PI_NODE or \ - * c_sibling.next.type == tree.XML_COMMENT_NODE): # <<<<<<<<<<<<<< + * (c_sibling.next.type == tree.XML_PI_NODE or + * c_sibling.next.type == tree.XML_COMMENT_NODE): # <<<<<<<<<<<<<< * c_sibling = c_sibling.next * c_copy = tree.xmlDocCopyNode(c_sibling, c_target.doc, 1) */ - __Pyx_TraceLine(1107,0,__PYX_ERR(5, 1107, __pyx_L1_error)) - case XML_COMMENT_NODE: + __pyx_t_2 = 1; - /* "src/lxml/apihelpers.pxi":1106 + /* "src/lxml/apihelpers.pxi":1105 * c_sibling = c_sibling.next * while c_sibling.next != NULL and \ - * (c_sibling.next.type == tree.XML_PI_NODE or \ # <<<<<<<<<<<<<< - * c_sibling.next.type == tree.XML_COMMENT_NODE): + * (c_sibling.next.type == tree.XML_PI_NODE or # <<<<<<<<<<<<<< + * c_sibling.next.type == tree.XML_COMMENT_NODE): * c_sibling = c_sibling.next */ - __Pyx_TraceLine(1106,0,__PYX_ERR(5, 1106, __pyx_L1_error)) - __pyx_t_2 = 1; break; default: __pyx_t_2 = 0; @@ -31436,49 +29794,45 @@ static int __pyx_f_4lxml_5etree__copyNonElementSiblings(xmlNode *__pyx_v_c_node, __pyx_L14_bool_binop_done:; if (!__pyx_t_1) break; - /* "src/lxml/apihelpers.pxi":1108 - * (c_sibling.next.type == tree.XML_PI_NODE or \ - * c_sibling.next.type == tree.XML_COMMENT_NODE): + /* "src/lxml/apihelpers.pxi":1107 + * (c_sibling.next.type == tree.XML_PI_NODE or + * c_sibling.next.type == tree.XML_COMMENT_NODE): * c_sibling = c_sibling.next # <<<<<<<<<<<<<< * c_copy = tree.xmlDocCopyNode(c_sibling, c_target.doc, 1) * if c_copy is NULL: */ - __Pyx_TraceLine(1108,0,__PYX_ERR(5, 1108, __pyx_L1_error)) __pyx_t_3 = __pyx_v_c_sibling->next; __pyx_v_c_sibling = __pyx_t_3; - /* "src/lxml/apihelpers.pxi":1109 - * c_sibling.next.type == tree.XML_COMMENT_NODE): + /* "src/lxml/apihelpers.pxi":1108 + * c_sibling.next.type == tree.XML_COMMENT_NODE): * c_sibling = c_sibling.next * c_copy = tree.xmlDocCopyNode(c_sibling, c_target.doc, 1) # <<<<<<<<<<<<<< * if c_copy is NULL: * raise MemoryError() */ - __Pyx_TraceLine(1109,0,__PYX_ERR(5, 1109, __pyx_L1_error)) __pyx_v_c_copy = xmlDocCopyNode(__pyx_v_c_sibling, __pyx_v_c_target->doc, 1); - /* "src/lxml/apihelpers.pxi":1110 + /* "src/lxml/apihelpers.pxi":1109 * c_sibling = c_sibling.next * c_copy = tree.xmlDocCopyNode(c_sibling, c_target.doc, 1) * if c_copy is NULL: # <<<<<<<<<<<<<< * raise MemoryError() * tree.xmlAddNextSibling(c_target, c_copy) */ - __Pyx_TraceLine(1110,0,__PYX_ERR(5, 1110, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_copy == NULL) != 0); if (unlikely(__pyx_t_1)) { - /* "src/lxml/apihelpers.pxi":1111 + /* "src/lxml/apihelpers.pxi":1110 * c_copy = tree.xmlDocCopyNode(c_sibling, c_target.doc, 1) * if c_copy is NULL: * raise MemoryError() # <<<<<<<<<<<<<< * tree.xmlAddNextSibling(c_target, c_copy) * */ - __Pyx_TraceLine(1111,0,__PYX_ERR(5, 1111, __pyx_L1_error)) - PyErr_NoMemory(); __PYX_ERR(5, 1111, __pyx_L1_error) + PyErr_NoMemory(); __PYX_ERR(5, 1110, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1110 + /* "src/lxml/apihelpers.pxi":1109 * c_sibling = c_sibling.next * c_copy = tree.xmlDocCopyNode(c_sibling, c_target.doc, 1) * if c_copy is NULL: # <<<<<<<<<<<<<< @@ -31487,18 +29841,17 @@ static int __pyx_f_4lxml_5etree__copyNonElementSiblings(xmlNode *__pyx_v_c_node, */ } - /* "src/lxml/apihelpers.pxi":1112 + /* "src/lxml/apihelpers.pxi":1111 * if c_copy is NULL: * raise MemoryError() * tree.xmlAddNextSibling(c_target, c_copy) # <<<<<<<<<<<<<< * * cdef int _deleteSlice(_Document doc, xmlNode* c_node, */ - __Pyx_TraceLine(1112,0,__PYX_ERR(5, 1112, __pyx_L1_error)) (void)(xmlAddNextSibling(__pyx_v_c_target, __pyx_v_c_copy)); } - /* "src/lxml/apihelpers.pxi":1084 + /* "src/lxml/apihelpers.pxi":1083 * return 0 * * cdef int _copyNonElementSiblings(xmlNode* c_node, xmlNode* c_target) except -1: # <<<<<<<<<<<<<< @@ -31513,12 +29866,11 @@ static int __pyx_f_4lxml_5etree__copyNonElementSiblings(xmlNode *__pyx_v_c_node, __Pyx_AddTraceback("lxml.etree._copyNonElementSiblings", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1114 +/* "src/lxml/apihelpers.pxi":1113 * tree.xmlAddNextSibling(c_target, c_copy) * * cdef int _deleteSlice(_Document doc, xmlNode* c_node, # <<<<<<<<<<<<<< @@ -31532,7 +29884,6 @@ static int __pyx_f_4lxml_5etree__deleteSlice(struct LxmlDocument *__pyx_v_doc, x CYTHON_UNUSED Py_ssize_t __pyx_v_i; _node_to_node_function __pyx_v_next_element; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -31541,31 +29892,28 @@ static int __pyx_f_4lxml_5etree__deleteSlice(struct LxmlDocument *__pyx_v_doc, x Py_ssize_t __pyx_t_5; int __pyx_t_6; __Pyx_RefNannySetupContext("_deleteSlice", 0); - __Pyx_TraceCall("_deleteSlice", __pyx_f[5], 1114, 0, __PYX_ERR(5, 1114, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1122 + /* "src/lxml/apihelpers.pxi":1121 * cdef Py_ssize_t c, i * cdef _node_to_node_function next_element * if c_node is NULL: # <<<<<<<<<<<<<< * return 0 * if step > 0: */ - __Pyx_TraceLine(1122,0,__PYX_ERR(5, 1122, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1123 + /* "src/lxml/apihelpers.pxi":1122 * cdef _node_to_node_function next_element * if c_node is NULL: * return 0 # <<<<<<<<<<<<<< * if step > 0: * next_element = _nextElement */ - __Pyx_TraceLine(1123,0,__PYX_ERR(5, 1123, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1122 + /* "src/lxml/apihelpers.pxi":1121 * cdef Py_ssize_t c, i * cdef _node_to_node_function next_element * if c_node is NULL: # <<<<<<<<<<<<<< @@ -31574,28 +29922,26 @@ static int __pyx_f_4lxml_5etree__deleteSlice(struct LxmlDocument *__pyx_v_doc, x */ } - /* "src/lxml/apihelpers.pxi":1124 + /* "src/lxml/apihelpers.pxi":1123 * if c_node is NULL: * return 0 * if step > 0: # <<<<<<<<<<<<<< * next_element = _nextElement * else: */ - __Pyx_TraceLine(1124,0,__PYX_ERR(5, 1124, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_step > 0) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1125 + /* "src/lxml/apihelpers.pxi":1124 * return 0 * if step > 0: * next_element = _nextElement # <<<<<<<<<<<<<< * else: * step = -step */ - __Pyx_TraceLine(1125,0,__PYX_ERR(5, 1125, __pyx_L1_error)) __pyx_v_next_element = __pyx_f_4lxml_5etree__nextElement; - /* "src/lxml/apihelpers.pxi":1124 + /* "src/lxml/apihelpers.pxi":1123 * if c_node is NULL: * return 0 * if step > 0: # <<<<<<<<<<<<<< @@ -31605,57 +29951,52 @@ static int __pyx_f_4lxml_5etree__deleteSlice(struct LxmlDocument *__pyx_v_doc, x goto __pyx_L4; } - /* "src/lxml/apihelpers.pxi":1127 + /* "src/lxml/apihelpers.pxi":1126 * next_element = _nextElement * else: * step = -step # <<<<<<<<<<<<<< * next_element = _previousElement * # now start deleting nodes */ - __Pyx_TraceLine(1127,0,__PYX_ERR(5, 1127, __pyx_L1_error)) /*else*/ { __pyx_v_step = (-__pyx_v_step); - /* "src/lxml/apihelpers.pxi":1128 + /* "src/lxml/apihelpers.pxi":1127 * else: * step = -step * next_element = _previousElement # <<<<<<<<<<<<<< * # now start deleting nodes * c = 0 */ - __Pyx_TraceLine(1128,0,__PYX_ERR(5, 1128, __pyx_L1_error)) __pyx_v_next_element = __pyx_f_4lxml_5etree__previousElement; } __pyx_L4:; - /* "src/lxml/apihelpers.pxi":1130 + /* "src/lxml/apihelpers.pxi":1129 * next_element = _previousElement * # now start deleting nodes * c = 0 # <<<<<<<<<<<<<< * c_next = c_node * while c_node is not NULL and c < count: */ - __Pyx_TraceLine(1130,0,__PYX_ERR(5, 1130, __pyx_L1_error)) __pyx_v_c = 0; - /* "src/lxml/apihelpers.pxi":1131 + /* "src/lxml/apihelpers.pxi":1130 * # now start deleting nodes * c = 0 * c_next = c_node # <<<<<<<<<<<<<< * while c_node is not NULL and c < count: * for i in range(step): */ - __Pyx_TraceLine(1131,0,__PYX_ERR(5, 1131, __pyx_L1_error)) __pyx_v_c_next = __pyx_v_c_node; - /* "src/lxml/apihelpers.pxi":1132 + /* "src/lxml/apihelpers.pxi":1131 * c = 0 * c_next = c_node * while c_node is not NULL and c < count: # <<<<<<<<<<<<<< * for i in range(step): * c_next = next_element(c_next) */ - __Pyx_TraceLine(1132,0,__PYX_ERR(5, 1132, __pyx_L1_error)) while (1) { __pyx_t_2 = ((__pyx_v_c_node != NULL) != 0); if (__pyx_t_2) { @@ -31668,73 +30009,67 @@ static int __pyx_f_4lxml_5etree__deleteSlice(struct LxmlDocument *__pyx_v_doc, x __pyx_L7_bool_binop_done:; if (!__pyx_t_1) break; - /* "src/lxml/apihelpers.pxi":1133 + /* "src/lxml/apihelpers.pxi":1132 * c_next = c_node * while c_node is not NULL and c < count: * for i in range(step): # <<<<<<<<<<<<<< * c_next = next_element(c_next) * _removeNode(doc, c_node) */ - __Pyx_TraceLine(1133,0,__PYX_ERR(5, 1133, __pyx_L1_error)) __pyx_t_3 = __pyx_v_step; __pyx_t_4 = __pyx_t_3; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; - /* "src/lxml/apihelpers.pxi":1134 + /* "src/lxml/apihelpers.pxi":1133 * while c_node is not NULL and c < count: * for i in range(step): * c_next = next_element(c_next) # <<<<<<<<<<<<<< * _removeNode(doc, c_node) * c += 1 */ - __Pyx_TraceLine(1134,0,__PYX_ERR(5, 1134, __pyx_L1_error)) __pyx_v_c_next = __pyx_v_next_element(__pyx_v_c_next); } - /* "src/lxml/apihelpers.pxi":1135 + /* "src/lxml/apihelpers.pxi":1134 * for i in range(step): * c_next = next_element(c_next) * _removeNode(doc, c_node) # <<<<<<<<<<<<<< * c += 1 * c_node = c_next */ - __Pyx_TraceLine(1135,0,__PYX_ERR(5, 1135, __pyx_L1_error)) - __pyx_t_6 = __pyx_f_4lxml_5etree__removeNode(__pyx_v_doc, __pyx_v_c_node); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(5, 1135, __pyx_L1_error) + __pyx_t_6 = __pyx_f_4lxml_5etree__removeNode(__pyx_v_doc, __pyx_v_c_node); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(5, 1134, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1136 + /* "src/lxml/apihelpers.pxi":1135 * c_next = next_element(c_next) * _removeNode(doc, c_node) * c += 1 # <<<<<<<<<<<<<< * c_node = c_next * return 0 */ - __Pyx_TraceLine(1136,0,__PYX_ERR(5, 1136, __pyx_L1_error)) __pyx_v_c = (__pyx_v_c + 1); - /* "src/lxml/apihelpers.pxi":1137 + /* "src/lxml/apihelpers.pxi":1136 * _removeNode(doc, c_node) * c += 1 * c_node = c_next # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(1137,0,__PYX_ERR(5, 1137, __pyx_L1_error)) __pyx_v_c_node = __pyx_v_c_next; } - /* "src/lxml/apihelpers.pxi":1138 + /* "src/lxml/apihelpers.pxi":1137 * c += 1 * c_node = c_next * return 0 # <<<<<<<<<<<<<< * * cdef int _replaceSlice(_Element parent, xmlNode* c_node, */ - __Pyx_TraceLine(1138,0,__PYX_ERR(5, 1138, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1114 + /* "src/lxml/apihelpers.pxi":1113 * tree.xmlAddNextSibling(c_target, c_copy) * * cdef int _deleteSlice(_Document doc, xmlNode* c_node, # <<<<<<<<<<<<<< @@ -31747,12 +30082,11 @@ static int __pyx_f_4lxml_5etree__deleteSlice(struct LxmlDocument *__pyx_v_doc, x __Pyx_AddTraceback("lxml.etree._deleteSlice", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1140 +/* "src/lxml/apihelpers.pxi":1139 * return 0 * * cdef int _replaceSlice(_Element parent, xmlNode* c_node, # <<<<<<<<<<<<<< @@ -31770,7 +30104,6 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent Py_ssize_t __pyx_v_c; _node_to_node_function __pyx_v_next_element; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -31787,48 +30120,44 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent Py_ssize_t __pyx_t_13; xmlDoc *__pyx_t_14; __Pyx_RefNannySetupContext("_replaceSlice", 0); - __Pyx_TraceCall("_replaceSlice", __pyx_f[5], 1140, 0, __PYX_ERR(5, 1140, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_elements); - /* "src/lxml/apihelpers.pxi":1155 + /* "src/lxml/apihelpers.pxi":1154 * cdef Py_ssize_t seqlength, i, c * cdef _node_to_node_function next_element * assert step > 0 # <<<<<<<<<<<<<< * if left_to_right: * next_element = _nextElement */ - __Pyx_TraceLine(1155,0,__PYX_ERR(5, 1155, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_step > 0) != 0))) { PyErr_SetNone(PyExc_AssertionError); - __PYX_ERR(5, 1155, __pyx_L1_error) + __PYX_ERR(5, 1154, __pyx_L1_error) } } #endif - /* "src/lxml/apihelpers.pxi":1156 + /* "src/lxml/apihelpers.pxi":1155 * cdef _node_to_node_function next_element * assert step > 0 * if left_to_right: # <<<<<<<<<<<<<< * next_element = _nextElement * else: */ - __Pyx_TraceLine(1156,0,__PYX_ERR(5, 1156, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_left_to_right != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1157 + /* "src/lxml/apihelpers.pxi":1156 * assert step > 0 * if left_to_right: * next_element = _nextElement # <<<<<<<<<<<<<< * else: * next_element = _previousElement */ - __Pyx_TraceLine(1157,0,__PYX_ERR(5, 1157, __pyx_L1_error)) __pyx_v_next_element = __pyx_f_4lxml_5etree__nextElement; - /* "src/lxml/apihelpers.pxi":1156 + /* "src/lxml/apihelpers.pxi":1155 * cdef _node_to_node_function next_element * assert step > 0 * if left_to_right: # <<<<<<<<<<<<<< @@ -31838,27 +30167,25 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent goto __pyx_L3; } - /* "src/lxml/apihelpers.pxi":1159 + /* "src/lxml/apihelpers.pxi":1158 * next_element = _nextElement * else: * next_element = _previousElement # <<<<<<<<<<<<<< * * if not isinstance(elements, (list, tuple)): */ - __Pyx_TraceLine(1159,0,__PYX_ERR(5, 1159, __pyx_L1_error)) /*else*/ { __pyx_v_next_element = __pyx_f_4lxml_5etree__previousElement; } __pyx_L3:; - /* "src/lxml/apihelpers.pxi":1161 + /* "src/lxml/apihelpers.pxi":1160 * next_element = _previousElement * * if not isinstance(elements, (list, tuple)): # <<<<<<<<<<<<<< * elements = list(elements) * */ - __Pyx_TraceLine(1161,0,__PYX_ERR(5, 1161, __pyx_L1_error)) __pyx_t_2 = PyList_Check(__pyx_v_elements); __pyx_t_3 = (__pyx_t_2 != 0); if (!__pyx_t_3) { @@ -31873,20 +30200,19 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1162 + /* "src/lxml/apihelpers.pxi":1161 * * if not isinstance(elements, (list, tuple)): * elements = list(elements) # <<<<<<<<<<<<<< * * if step > 1: */ - __Pyx_TraceLine(1162,0,__PYX_ERR(5, 1162, __pyx_L1_error)) - __pyx_t_4 = PySequence_List(__pyx_v_elements); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1162, __pyx_L1_error) + __pyx_t_4 = PySequence_List(__pyx_v_elements); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_elements, __pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1161 + /* "src/lxml/apihelpers.pxi":1160 * next_element = _previousElement * * if not isinstance(elements, (list, tuple)): # <<<<<<<<<<<<<< @@ -31895,48 +30221,44 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent */ } - /* "src/lxml/apihelpers.pxi":1164 + /* "src/lxml/apihelpers.pxi":1163 * elements = list(elements) * * if step > 1: # <<<<<<<<<<<<<< * # *replacing* children stepwise with list => check size! * seqlength = len(elements) */ - __Pyx_TraceLine(1164,0,__PYX_ERR(5, 1164, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_step > 1) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1166 + /* "src/lxml/apihelpers.pxi":1165 * if step > 1: * # *replacing* children stepwise with list => check size! * seqlength = len(elements) # <<<<<<<<<<<<<< * if seqlength != slicelength: * raise ValueError, f"attempt to assign sequence of size {seqlength} " \ */ - __Pyx_TraceLine(1166,0,__PYX_ERR(5, 1166, __pyx_L1_error)) - __pyx_t_5 = PyObject_Length(__pyx_v_elements); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(5, 1166, __pyx_L1_error) + __pyx_t_5 = PyObject_Length(__pyx_v_elements); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(5, 1165, __pyx_L1_error) __pyx_v_seqlength = __pyx_t_5; - /* "src/lxml/apihelpers.pxi":1167 + /* "src/lxml/apihelpers.pxi":1166 * # *replacing* children stepwise with list => check size! * seqlength = len(elements) * if seqlength != slicelength: # <<<<<<<<<<<<<< * raise ValueError, f"attempt to assign sequence of size {seqlength} " \ * f"to extended slice of size {slicelength}" */ - __Pyx_TraceLine(1167,0,__PYX_ERR(5, 1167, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_seqlength != __pyx_v_slicelength) != 0); if (unlikely(__pyx_t_2)) { - /* "src/lxml/apihelpers.pxi":1168 + /* "src/lxml/apihelpers.pxi":1167 * seqlength = len(elements) * if seqlength != slicelength: * raise ValueError, f"attempt to assign sequence of size {seqlength} " \ # <<<<<<<<<<<<<< * f"to extended slice of size {slicelength}" * */ - __Pyx_TraceLine(1168,0,__PYX_ERR(5, 1168, __pyx_L1_error)) - __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1168, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_6 = 127; @@ -31944,7 +30266,7 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent __pyx_t_5 += 35; __Pyx_GIVEREF(__pyx_kp_u_attempt_to_assign_sequence_of_si); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_attempt_to_assign_sequence_of_si); - __pyx_t_7 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_seqlength, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1168, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_seqlength, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); @@ -31955,37 +30277,35 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent __Pyx_GIVEREF(__pyx_kp_u_to_extended_slice_of_size); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_to_extended_slice_of_size); - /* "src/lxml/apihelpers.pxi":1169 + /* "src/lxml/apihelpers.pxi":1168 * if seqlength != slicelength: * raise ValueError, f"attempt to assign sequence of size {seqlength} " \ * f"to extended slice of size {slicelength}" # <<<<<<<<<<<<<< * * if c_node is NULL: */ - __Pyx_TraceLine(1169,0,__PYX_ERR(5, 1169, __pyx_L1_error)) - __pyx_t_7 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_slicelength, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1169, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_slicelength, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_7); __pyx_t_7 = 0; - /* "src/lxml/apihelpers.pxi":1168 + /* "src/lxml/apihelpers.pxi":1167 * seqlength = len(elements) * if seqlength != slicelength: * raise ValueError, f"attempt to assign sequence of size {seqlength} " \ # <<<<<<<<<<<<<< * f"to extended slice of size {slicelength}" * */ - __Pyx_TraceLine(1168,0,__PYX_ERR(5, 1168, __pyx_L1_error)) - __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1168, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1167, __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(5, 1168, __pyx_L1_error) + __PYX_ERR(5, 1167, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1167 + /* "src/lxml/apihelpers.pxi":1166 * # *replacing* children stepwise with list => check size! * seqlength = len(elements) * if seqlength != slicelength: # <<<<<<<<<<<<<< @@ -31994,7 +30314,7 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent */ } - /* "src/lxml/apihelpers.pxi":1164 + /* "src/lxml/apihelpers.pxi":1163 * elements = list(elements) * * if step > 1: # <<<<<<<<<<<<<< @@ -32003,60 +30323,57 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent */ } - /* "src/lxml/apihelpers.pxi":1171 + /* "src/lxml/apihelpers.pxi":1170 * f"to extended slice of size {slicelength}" * * if c_node is NULL: # <<<<<<<<<<<<<< * # no children yet => add all elements straight away * if left_to_right: */ - __Pyx_TraceLine(1171,0,__PYX_ERR(5, 1171, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1173 + /* "src/lxml/apihelpers.pxi":1172 * if c_node is NULL: * # no children yet => add all elements straight away * if left_to_right: # <<<<<<<<<<<<<< * for element in elements: * assert element is not None, u"Node must not be None" */ - __Pyx_TraceLine(1173,0,__PYX_ERR(5, 1173, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_left_to_right != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1174 + /* "src/lxml/apihelpers.pxi":1173 * # no children yet => add all elements straight away * if left_to_right: * for element in elements: # <<<<<<<<<<<<<< * assert element is not None, u"Node must not be None" * _appendChild(parent, element) */ - __Pyx_TraceLine(1174,0,__PYX_ERR(5, 1174, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_v_elements)) || PyTuple_CheckExact(__pyx_v_elements)) { __pyx_t_7 = __pyx_v_elements; __Pyx_INCREF(__pyx_t_7); __pyx_t_5 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1174, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1174, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1173, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_8)) { if (likely(PyList_CheckExact(__pyx_t_7))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(5, 1174, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(5, 1173, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1174, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(5, 1174, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(5, 1173, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1174, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -32066,56 +30383,53 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(5, 1174, __pyx_L1_error) + else __PYX_ERR(5, 1173, __pyx_L1_error) } break; } __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(5, 1174, __pyx_L1_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(5, 1173, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_element, ((struct LxmlElement *)__pyx_t_4)); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1175 + /* "src/lxml/apihelpers.pxi":1174 * if left_to_right: * for element in elements: * assert element is not None, u"Node must not be None" # <<<<<<<<<<<<<< * _appendChild(parent, element) * else: */ - __Pyx_TraceLine(1175,0,__PYX_ERR(5, 1175, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_2 = (((PyObject *)__pyx_v_element) != Py_None); if (unlikely(!(__pyx_t_2 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_Node_must_not_be_None); - __PYX_ERR(5, 1175, __pyx_L1_error) + __PYX_ERR(5, 1174, __pyx_L1_error) } } #endif - /* "src/lxml/apihelpers.pxi":1176 + /* "src/lxml/apihelpers.pxi":1175 * for element in elements: * assert element is not None, u"Node must not be None" * _appendChild(parent, element) # <<<<<<<<<<<<<< * else: * for element in elements: */ - __Pyx_TraceLine(1176,0,__PYX_ERR(5, 1176, __pyx_L1_error)) - __pyx_t_9 = __pyx_f_4lxml_5etree__appendChild(__pyx_v_parent, __pyx_v_element); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(5, 1176, __pyx_L1_error) + __pyx_t_9 = __pyx_f_4lxml_5etree__appendChild(__pyx_v_parent, __pyx_v_element); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(5, 1175, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1174 + /* "src/lxml/apihelpers.pxi":1173 * # no children yet => add all elements straight away * if left_to_right: * for element in elements: # <<<<<<<<<<<<<< * assert element is not None, u"Node must not be None" * _appendChild(parent, element) */ - __Pyx_TraceLine(1174,0,__PYX_ERR(5, 1174, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "src/lxml/apihelpers.pxi":1173 + /* "src/lxml/apihelpers.pxi":1172 * if c_node is NULL: * # no children yet => add all elements straight away * if left_to_right: # <<<<<<<<<<<<<< @@ -32125,39 +30439,38 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent goto __pyx_L10; } - /* "src/lxml/apihelpers.pxi":1178 + /* "src/lxml/apihelpers.pxi":1177 * _appendChild(parent, element) * else: * for element in elements: # <<<<<<<<<<<<<< * assert element is not None, u"Node must not be None" * _prependChild(parent, element) */ - __Pyx_TraceLine(1178,0,__PYX_ERR(5, 1178, __pyx_L1_error)) /*else*/ { if (likely(PyList_CheckExact(__pyx_v_elements)) || PyTuple_CheckExact(__pyx_v_elements)) { __pyx_t_7 = __pyx_v_elements; __Pyx_INCREF(__pyx_t_7); __pyx_t_5 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1178, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1178, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1177, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_8)) { if (likely(PyList_CheckExact(__pyx_t_7))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(5, 1178, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(5, 1177, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1178, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(5, 1178, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(5, 1177, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1178, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -32167,69 +30480,65 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(5, 1178, __pyx_L1_error) + else __PYX_ERR(5, 1177, __pyx_L1_error) } break; } __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(5, 1178, __pyx_L1_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(5, 1177, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_element, ((struct LxmlElement *)__pyx_t_4)); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1179 + /* "src/lxml/apihelpers.pxi":1178 * else: * for element in elements: * assert element is not None, u"Node must not be None" # <<<<<<<<<<<<<< * _prependChild(parent, element) * return 0 */ - __Pyx_TraceLine(1179,0,__PYX_ERR(5, 1179, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_2 = (((PyObject *)__pyx_v_element) != Py_None); if (unlikely(!(__pyx_t_2 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_Node_must_not_be_None); - __PYX_ERR(5, 1179, __pyx_L1_error) + __PYX_ERR(5, 1178, __pyx_L1_error) } } #endif - /* "src/lxml/apihelpers.pxi":1180 + /* "src/lxml/apihelpers.pxi":1179 * for element in elements: * assert element is not None, u"Node must not be None" * _prependChild(parent, element) # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(1180,0,__PYX_ERR(5, 1180, __pyx_L1_error)) - __pyx_t_9 = __pyx_f_4lxml_5etree__prependChild(__pyx_v_parent, __pyx_v_element); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(5, 1180, __pyx_L1_error) + __pyx_t_9 = __pyx_f_4lxml_5etree__prependChild(__pyx_v_parent, __pyx_v_element); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(5, 1179, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1178 + /* "src/lxml/apihelpers.pxi":1177 * _appendChild(parent, element) * else: * for element in elements: # <<<<<<<<<<<<<< * assert element is not None, u"Node must not be None" * _prependChild(parent, element) */ - __Pyx_TraceLine(1178,0,__PYX_ERR(5, 1178, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_L10:; - /* "src/lxml/apihelpers.pxi":1181 + /* "src/lxml/apihelpers.pxi":1180 * assert element is not None, u"Node must not be None" * _prependChild(parent, element) * return 0 # <<<<<<<<<<<<<< * * # remove the elements first as some might be re-added */ - __Pyx_TraceLine(1181,0,__PYX_ERR(5, 1181, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1171 + /* "src/lxml/apihelpers.pxi":1170 * f"to extended slice of size {slicelength}" * * if c_node is NULL: # <<<<<<<<<<<<<< @@ -32238,28 +30547,26 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent */ } - /* "src/lxml/apihelpers.pxi":1184 + /* "src/lxml/apihelpers.pxi":1183 * * # remove the elements first as some might be re-added * if left_to_right: # <<<<<<<<<<<<<< * # L->R, remember left neighbour * c_orig_neighbour = _previousElement(c_node) */ - __Pyx_TraceLine(1184,0,__PYX_ERR(5, 1184, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_left_to_right != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1186 + /* "src/lxml/apihelpers.pxi":1185 * if left_to_right: * # L->R, remember left neighbour * c_orig_neighbour = _previousElement(c_node) # <<<<<<<<<<<<<< * else: * # R->L, remember right neighbour */ - __Pyx_TraceLine(1186,0,__PYX_ERR(5, 1186, __pyx_L1_error)) __pyx_v_c_orig_neighbour = __pyx_f_4lxml_5etree__previousElement(__pyx_v_c_node); - /* "src/lxml/apihelpers.pxi":1184 + /* "src/lxml/apihelpers.pxi":1183 * * # remove the elements first as some might be re-added * if left_to_right: # <<<<<<<<<<<<<< @@ -32269,47 +30576,43 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent goto __pyx_L15; } - /* "src/lxml/apihelpers.pxi":1189 + /* "src/lxml/apihelpers.pxi":1188 * else: * # R->L, remember right neighbour * c_orig_neighbour = _nextElement(c_node) # <<<<<<<<<<<<<< * * # We remove the original slice elements one by one. Since we hold */ - __Pyx_TraceLine(1189,0,__PYX_ERR(5, 1189, __pyx_L1_error)) /*else*/ { __pyx_v_c_orig_neighbour = __pyx_f_4lxml_5etree__nextElement(__pyx_v_c_node); } __pyx_L15:; - /* "src/lxml/apihelpers.pxi":1195 + /* "src/lxml/apihelpers.pxi":1194 * # safe to let _removeNode() try (and fail) to free them even if * # the element itself or one of its descendents will be reinserted. * c = 0 # <<<<<<<<<<<<<< * c_next = c_node * while c_node is not NULL and c < slicelength: */ - __Pyx_TraceLine(1195,0,__PYX_ERR(5, 1195, __pyx_L1_error)) __pyx_v_c = 0; - /* "src/lxml/apihelpers.pxi":1196 + /* "src/lxml/apihelpers.pxi":1195 * # the element itself or one of its descendents will be reinserted. * c = 0 * c_next = c_node # <<<<<<<<<<<<<< * while c_node is not NULL and c < slicelength: * for i in range(step): */ - __Pyx_TraceLine(1196,0,__PYX_ERR(5, 1196, __pyx_L1_error)) __pyx_v_c_next = __pyx_v_c_node; - /* "src/lxml/apihelpers.pxi":1197 + /* "src/lxml/apihelpers.pxi":1196 * c = 0 * c_next = c_node * while c_node is not NULL and c < slicelength: # <<<<<<<<<<<<<< * for i in range(step): * c_next = next_element(c_next) */ - __Pyx_TraceLine(1197,0,__PYX_ERR(5, 1197, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_node != NULL) != 0); if (__pyx_t_1) { @@ -32322,110 +30625,101 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent __pyx_L18_bool_binop_done:; if (!__pyx_t_2) break; - /* "src/lxml/apihelpers.pxi":1198 + /* "src/lxml/apihelpers.pxi":1197 * c_next = c_node * while c_node is not NULL and c < slicelength: * for i in range(step): # <<<<<<<<<<<<<< * c_next = next_element(c_next) * _removeNode(parent._doc, c_node) */ - __Pyx_TraceLine(1198,0,__PYX_ERR(5, 1198, __pyx_L1_error)) __pyx_t_5 = __pyx_v_step; __pyx_t_10 = __pyx_t_5; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; - /* "src/lxml/apihelpers.pxi":1199 + /* "src/lxml/apihelpers.pxi":1198 * while c_node is not NULL and c < slicelength: * for i in range(step): * c_next = next_element(c_next) # <<<<<<<<<<<<<< * _removeNode(parent._doc, c_node) * c += 1 */ - __Pyx_TraceLine(1199,0,__PYX_ERR(5, 1199, __pyx_L1_error)) __pyx_v_c_next = __pyx_v_next_element(__pyx_v_c_next); } - /* "src/lxml/apihelpers.pxi":1200 + /* "src/lxml/apihelpers.pxi":1199 * for i in range(step): * c_next = next_element(c_next) * _removeNode(parent._doc, c_node) # <<<<<<<<<<<<<< * c += 1 * c_node = c_next */ - __Pyx_TraceLine(1200,0,__PYX_ERR(5, 1200, __pyx_L1_error)) __pyx_t_7 = ((PyObject *)__pyx_v_parent->_doc); __Pyx_INCREF(__pyx_t_7); - __pyx_t_9 = __pyx_f_4lxml_5etree__removeNode(((struct LxmlDocument *)__pyx_t_7), __pyx_v_c_node); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(5, 1200, __pyx_L1_error) + __pyx_t_9 = __pyx_f_4lxml_5etree__removeNode(((struct LxmlDocument *)__pyx_t_7), __pyx_v_c_node); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(5, 1199, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "src/lxml/apihelpers.pxi":1201 + /* "src/lxml/apihelpers.pxi":1200 * c_next = next_element(c_next) * _removeNode(parent._doc, c_node) * c += 1 # <<<<<<<<<<<<<< * c_node = c_next * */ - __Pyx_TraceLine(1201,0,__PYX_ERR(5, 1201, __pyx_L1_error)) __pyx_v_c = (__pyx_v_c + 1); - /* "src/lxml/apihelpers.pxi":1202 + /* "src/lxml/apihelpers.pxi":1201 * _removeNode(parent._doc, c_node) * c += 1 * c_node = c_next # <<<<<<<<<<<<<< * * # make sure each element is inserted only once */ - __Pyx_TraceLine(1202,0,__PYX_ERR(5, 1202, __pyx_L1_error)) __pyx_v_c_node = __pyx_v_c_next; } - /* "src/lxml/apihelpers.pxi":1205 + /* "src/lxml/apihelpers.pxi":1204 * * # make sure each element is inserted only once * elements = iter(elements) # <<<<<<<<<<<<<< * * # find the first node right of the new insertion point */ - __Pyx_TraceLine(1205,0,__PYX_ERR(5, 1205, __pyx_L1_error)) - __pyx_t_7 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1205, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF_SET(__pyx_v_elements, __pyx_t_7); __pyx_t_7 = 0; - /* "src/lxml/apihelpers.pxi":1208 + /* "src/lxml/apihelpers.pxi":1207 * * # find the first node right of the new insertion point * if left_to_right: # <<<<<<<<<<<<<< * if c_orig_neighbour is not NULL: * c_node = next_element(c_orig_neighbour) */ - __Pyx_TraceLine(1208,0,__PYX_ERR(5, 1208, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_left_to_right != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1209 + /* "src/lxml/apihelpers.pxi":1208 * # find the first node right of the new insertion point * if left_to_right: * if c_orig_neighbour is not NULL: # <<<<<<<<<<<<<< * c_node = next_element(c_orig_neighbour) * else: */ - __Pyx_TraceLine(1209,0,__PYX_ERR(5, 1209, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_orig_neighbour != NULL) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1210 + /* "src/lxml/apihelpers.pxi":1209 * if left_to_right: * if c_orig_neighbour is not NULL: * c_node = next_element(c_orig_neighbour) # <<<<<<<<<<<<<< * else: * # before the first element */ - __Pyx_TraceLine(1210,0,__PYX_ERR(5, 1210, __pyx_L1_error)) __pyx_v_c_node = __pyx_v_next_element(__pyx_v_c_orig_neighbour); - /* "src/lxml/apihelpers.pxi":1209 + /* "src/lxml/apihelpers.pxi":1208 * # find the first node right of the new insertion point * if left_to_right: * if c_orig_neighbour is not NULL: # <<<<<<<<<<<<<< @@ -32435,20 +30729,19 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent goto __pyx_L23; } - /* "src/lxml/apihelpers.pxi":1213 + /* "src/lxml/apihelpers.pxi":1212 * else: * # before the first element * c_node = _findChildForwards(parent._c_node, 0) # <<<<<<<<<<<<<< * elif c_orig_neighbour is NULL: * # at the end, but reversed stepping */ - __Pyx_TraceLine(1213,0,__PYX_ERR(5, 1213, __pyx_L1_error)) /*else*/ { __pyx_v_c_node = __pyx_f_4lxml_5etree__findChildForwards(__pyx_v_parent->_c_node, 0); } __pyx_L23:; - /* "src/lxml/apihelpers.pxi":1208 + /* "src/lxml/apihelpers.pxi":1207 * * # find the first node right of the new insertion point * if left_to_right: # <<<<<<<<<<<<<< @@ -32458,49 +30751,47 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent goto __pyx_L22; } - /* "src/lxml/apihelpers.pxi":1214 + /* "src/lxml/apihelpers.pxi":1213 * # before the first element * c_node = _findChildForwards(parent._c_node, 0) * elif c_orig_neighbour is NULL: # <<<<<<<<<<<<<< * # at the end, but reversed stepping * # append one element and go to the next insertion point */ - __Pyx_TraceLine(1214,0,__PYX_ERR(5, 1214, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_orig_neighbour == NULL) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1217 + /* "src/lxml/apihelpers.pxi":1216 * # at the end, but reversed stepping * # append one element and go to the next insertion point * for element in elements: # <<<<<<<<<<<<<< * assert element is not None, u"Node must not be None" * _appendChild(parent, element) */ - __Pyx_TraceLine(1217,0,__PYX_ERR(5, 1217, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_v_elements)) || PyTuple_CheckExact(__pyx_v_elements)) { __pyx_t_7 = __pyx_v_elements; __Pyx_INCREF(__pyx_t_7); __pyx_t_5 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1217, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1217, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1216, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_8)) { if (likely(PyList_CheckExact(__pyx_t_7))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(5, 1217, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(5, 1216, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1217, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(5, 1217, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(5, 1216, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1217, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -32510,101 +30801,94 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(5, 1217, __pyx_L1_error) + else __PYX_ERR(5, 1216, __pyx_L1_error) } break; } __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(5, 1217, __pyx_L1_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(5, 1216, __pyx_L1_error) __pyx_v_element = ((struct LxmlElement *)__pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1218 + /* "src/lxml/apihelpers.pxi":1217 * # append one element and go to the next insertion point * for element in elements: * assert element is not None, u"Node must not be None" # <<<<<<<<<<<<<< * _appendChild(parent, element) * c_node = element._c_node */ - __Pyx_TraceLine(1218,0,__PYX_ERR(5, 1218, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_2 = (((PyObject *)__pyx_v_element) != Py_None); if (unlikely(!(__pyx_t_2 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_Node_must_not_be_None); - __PYX_ERR(5, 1218, __pyx_L1_error) + __PYX_ERR(5, 1217, __pyx_L1_error) } } #endif - /* "src/lxml/apihelpers.pxi":1219 + /* "src/lxml/apihelpers.pxi":1218 * for element in elements: * assert element is not None, u"Node must not be None" * _appendChild(parent, element) # <<<<<<<<<<<<<< * c_node = element._c_node * if slicelength > 0: */ - __Pyx_TraceLine(1219,0,__PYX_ERR(5, 1219, __pyx_L1_error)) - __pyx_t_9 = __pyx_f_4lxml_5etree__appendChild(__pyx_v_parent, __pyx_v_element); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(5, 1219, __pyx_L1_error) + __pyx_t_9 = __pyx_f_4lxml_5etree__appendChild(__pyx_v_parent, __pyx_v_element); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(5, 1218, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1220 + /* "src/lxml/apihelpers.pxi":1219 * assert element is not None, u"Node must not be None" * _appendChild(parent, element) * c_node = element._c_node # <<<<<<<<<<<<<< * if slicelength > 0: * slicelength -= 1 */ - __Pyx_TraceLine(1220,0,__PYX_ERR(5, 1220, __pyx_L1_error)) __pyx_t_12 = __pyx_v_element->_c_node; __pyx_v_c_node = __pyx_t_12; - /* "src/lxml/apihelpers.pxi":1221 + /* "src/lxml/apihelpers.pxi":1220 * _appendChild(parent, element) * c_node = element._c_node * if slicelength > 0: # <<<<<<<<<<<<<< * slicelength -= 1 * for i in range(1, step): */ - __Pyx_TraceLine(1221,0,__PYX_ERR(5, 1221, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_slicelength > 0) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1222 + /* "src/lxml/apihelpers.pxi":1221 * c_node = element._c_node * if slicelength > 0: * slicelength -= 1 # <<<<<<<<<<<<<< * for i in range(1, step): * c_node = next_element(c_node) */ - __Pyx_TraceLine(1222,0,__PYX_ERR(5, 1222, __pyx_L1_error)) __pyx_v_slicelength = (__pyx_v_slicelength - 1); - /* "src/lxml/apihelpers.pxi":1223 + /* "src/lxml/apihelpers.pxi":1222 * if slicelength > 0: * slicelength -= 1 * for i in range(1, step): # <<<<<<<<<<<<<< * c_node = next_element(c_node) * break */ - __Pyx_TraceLine(1223,0,__PYX_ERR(5, 1223, __pyx_L1_error)) __pyx_t_10 = __pyx_v_step; __pyx_t_11 = __pyx_t_10; for (__pyx_t_13 = 1; __pyx_t_13 < __pyx_t_11; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; - /* "src/lxml/apihelpers.pxi":1224 + /* "src/lxml/apihelpers.pxi":1223 * slicelength -= 1 * for i in range(1, step): * c_node = next_element(c_node) # <<<<<<<<<<<<<< * break * */ - __Pyx_TraceLine(1224,0,__PYX_ERR(5, 1224, __pyx_L1_error)) __pyx_v_c_node = __pyx_v_next_element(__pyx_v_c_node); } - /* "src/lxml/apihelpers.pxi":1221 + /* "src/lxml/apihelpers.pxi":1220 * _appendChild(parent, element) * c_node = element._c_node * if slicelength > 0: # <<<<<<<<<<<<<< @@ -32613,29 +30897,27 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent */ } - /* "src/lxml/apihelpers.pxi":1225 + /* "src/lxml/apihelpers.pxi":1224 * for i in range(1, step): * c_node = next_element(c_node) * break # <<<<<<<<<<<<<< * * if left_to_right: */ - __Pyx_TraceLine(1225,0,__PYX_ERR(5, 1225, __pyx_L1_error)) goto __pyx_L25_break; - /* "src/lxml/apihelpers.pxi":1217 + /* "src/lxml/apihelpers.pxi":1216 * # at the end, but reversed stepping * # append one element and go to the next insertion point * for element in elements: # <<<<<<<<<<<<<< * assert element is not None, u"Node must not be None" * _appendChild(parent, element) */ - __Pyx_TraceLine(1217,0,__PYX_ERR(5, 1217, __pyx_L1_error)) } __pyx_L25_break:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "src/lxml/apihelpers.pxi":1214 + /* "src/lxml/apihelpers.pxi":1213 * # before the first element * c_node = _findChildForwards(parent._c_node, 0) * elif c_orig_neighbour is NULL: # <<<<<<<<<<<<<< @@ -32645,28 +30927,26 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent } __pyx_L22:; - /* "src/lxml/apihelpers.pxi":1227 + /* "src/lxml/apihelpers.pxi":1226 * break * * if left_to_right: # <<<<<<<<<<<<<< * # adjust step size after removing slice as we are not stepping * # over the newly inserted elements */ - __Pyx_TraceLine(1227,0,__PYX_ERR(5, 1227, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_left_to_right != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1230 + /* "src/lxml/apihelpers.pxi":1229 * # adjust step size after removing slice as we are not stepping * # over the newly inserted elements * step -= 1 # <<<<<<<<<<<<<< * * # now insert elements where we removed them */ - __Pyx_TraceLine(1230,0,__PYX_ERR(5, 1230, __pyx_L1_error)) __pyx_v_step = (__pyx_v_step - 1); - /* "src/lxml/apihelpers.pxi":1227 + /* "src/lxml/apihelpers.pxi":1226 * break * * if left_to_right: # <<<<<<<<<<<<<< @@ -32675,49 +30955,47 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent */ } - /* "src/lxml/apihelpers.pxi":1233 + /* "src/lxml/apihelpers.pxi":1232 * * # now insert elements where we removed them * if c_node is not NULL: # <<<<<<<<<<<<<< * for element in elements: * assert element is not None, u"Node must not be None" */ - __Pyx_TraceLine(1233,0,__PYX_ERR(5, 1233, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node != NULL) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1234 + /* "src/lxml/apihelpers.pxi":1233 * # now insert elements where we removed them * if c_node is not NULL: * for element in elements: # <<<<<<<<<<<<<< * assert element is not None, u"Node must not be None" * _assertValidNode(element) */ - __Pyx_TraceLine(1234,0,__PYX_ERR(5, 1234, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_v_elements)) || PyTuple_CheckExact(__pyx_v_elements)) { __pyx_t_7 = __pyx_v_elements; __Pyx_INCREF(__pyx_t_7); __pyx_t_5 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1234, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1234, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1233, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_8)) { if (likely(PyList_CheckExact(__pyx_t_7))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(5, 1234, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(5, 1233, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1234, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(5, 1234, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(5, 1233, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1234, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -32727,166 +31005,153 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(5, 1234, __pyx_L1_error) + else __PYX_ERR(5, 1233, __pyx_L1_error) } break; } __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(5, 1234, __pyx_L1_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(5, 1233, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_element, ((struct LxmlElement *)__pyx_t_4)); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1235 + /* "src/lxml/apihelpers.pxi":1234 * if c_node is not NULL: * for element in elements: * assert element is not None, u"Node must not be None" # <<<<<<<<<<<<<< * _assertValidNode(element) * # move element and tail over */ - __Pyx_TraceLine(1235,0,__PYX_ERR(5, 1235, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_2 = (((PyObject *)__pyx_v_element) != Py_None); if (unlikely(!(__pyx_t_2 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_Node_must_not_be_None); - __PYX_ERR(5, 1235, __pyx_L1_error) + __PYX_ERR(5, 1234, __pyx_L1_error) } } #endif - /* "src/lxml/apihelpers.pxi":1236 + /* "src/lxml/apihelpers.pxi":1235 * for element in elements: * assert element is not None, u"Node must not be None" * _assertValidNode(element) # <<<<<<<<<<<<<< * # move element and tail over * c_source_doc = element._c_node.doc */ - __Pyx_TraceLine(1236,0,__PYX_ERR(5, 1236, __pyx_L1_error)) - __pyx_t_9 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(5, 1236, __pyx_L1_error) + __pyx_t_9 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(5, 1235, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1238 + /* "src/lxml/apihelpers.pxi":1237 * _assertValidNode(element) * # move element and tail over * c_source_doc = element._c_node.doc # <<<<<<<<<<<<<< * c_next = element._c_node.next * tree.xmlAddPrevSibling(c_node, element._c_node) */ - __Pyx_TraceLine(1238,0,__PYX_ERR(5, 1238, __pyx_L1_error)) __pyx_t_14 = __pyx_v_element->_c_node->doc; __pyx_v_c_source_doc = __pyx_t_14; - /* "src/lxml/apihelpers.pxi":1239 + /* "src/lxml/apihelpers.pxi":1238 * # move element and tail over * c_source_doc = element._c_node.doc * c_next = element._c_node.next # <<<<<<<<<<<<<< * tree.xmlAddPrevSibling(c_node, element._c_node) * _moveTail(c_next, element._c_node) */ - __Pyx_TraceLine(1239,0,__PYX_ERR(5, 1239, __pyx_L1_error)) __pyx_t_12 = __pyx_v_element->_c_node->next; __pyx_v_c_next = __pyx_t_12; - /* "src/lxml/apihelpers.pxi":1240 + /* "src/lxml/apihelpers.pxi":1239 * c_source_doc = element._c_node.doc * c_next = element._c_node.next * tree.xmlAddPrevSibling(c_node, element._c_node) # <<<<<<<<<<<<<< * _moveTail(c_next, element._c_node) * */ - __Pyx_TraceLine(1240,0,__PYX_ERR(5, 1240, __pyx_L1_error)) (void)(xmlAddPrevSibling(__pyx_v_c_node, __pyx_v_element->_c_node)); - /* "src/lxml/apihelpers.pxi":1241 + /* "src/lxml/apihelpers.pxi":1240 * c_next = element._c_node.next * tree.xmlAddPrevSibling(c_node, element._c_node) * _moveTail(c_next, element._c_node) # <<<<<<<<<<<<<< * * # integrate element into new document */ - __Pyx_TraceLine(1241,0,__PYX_ERR(5, 1241, __pyx_L1_error)) __pyx_f_4lxml_5etree__moveTail(__pyx_v_c_next, __pyx_v_element->_c_node); - /* "src/lxml/apihelpers.pxi":1244 + /* "src/lxml/apihelpers.pxi":1243 * * # integrate element into new document * moveNodeToDocument(parent._doc, c_source_doc, element._c_node) # <<<<<<<<<<<<<< * * # stop at the end of the slice */ - __Pyx_TraceLine(1244,0,__PYX_ERR(5, 1244, __pyx_L1_error)) __pyx_t_4 = ((PyObject *)__pyx_v_parent->_doc); __Pyx_INCREF(__pyx_t_4); - __pyx_t_9 = __pyx_f_4lxml_5etree_moveNodeToDocument(((struct LxmlDocument *)__pyx_t_4), __pyx_v_c_source_doc, __pyx_v_element->_c_node); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(5, 1244, __pyx_L1_error) + __pyx_t_9 = __pyx_f_4lxml_5etree_moveNodeToDocument(((struct LxmlDocument *)__pyx_t_4), __pyx_v_c_source_doc, __pyx_v_element->_c_node); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(5, 1243, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1247 + /* "src/lxml/apihelpers.pxi":1246 * * # stop at the end of the slice * if slicelength > 0: # <<<<<<<<<<<<<< * slicelength -= 1 * for i in range(step): */ - __Pyx_TraceLine(1247,0,__PYX_ERR(5, 1247, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_slicelength > 0) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1248 + /* "src/lxml/apihelpers.pxi":1247 * # stop at the end of the slice * if slicelength > 0: * slicelength -= 1 # <<<<<<<<<<<<<< * for i in range(step): * c_node = next_element(c_node) */ - __Pyx_TraceLine(1248,0,__PYX_ERR(5, 1248, __pyx_L1_error)) __pyx_v_slicelength = (__pyx_v_slicelength - 1); - /* "src/lxml/apihelpers.pxi":1249 + /* "src/lxml/apihelpers.pxi":1248 * if slicelength > 0: * slicelength -= 1 * for i in range(step): # <<<<<<<<<<<<<< * c_node = next_element(c_node) * if c_node is NULL: */ - __Pyx_TraceLine(1249,0,__PYX_ERR(5, 1249, __pyx_L1_error)) __pyx_t_10 = __pyx_v_step; __pyx_t_11 = __pyx_t_10; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_11; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; - /* "src/lxml/apihelpers.pxi":1250 + /* "src/lxml/apihelpers.pxi":1249 * slicelength -= 1 * for i in range(step): * c_node = next_element(c_node) # <<<<<<<<<<<<<< * if c_node is NULL: * break */ - __Pyx_TraceLine(1250,0,__PYX_ERR(5, 1250, __pyx_L1_error)) __pyx_v_c_node = __pyx_v_next_element(__pyx_v_c_node); } - /* "src/lxml/apihelpers.pxi":1251 + /* "src/lxml/apihelpers.pxi":1250 * for i in range(step): * c_node = next_element(c_node) * if c_node is NULL: # <<<<<<<<<<<<<< * break * else: */ - __Pyx_TraceLine(1251,0,__PYX_ERR(5, 1251, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1252 + /* "src/lxml/apihelpers.pxi":1251 * c_node = next_element(c_node) * if c_node is NULL: * break # <<<<<<<<<<<<<< * else: * # everything inserted */ - __Pyx_TraceLine(1252,0,__PYX_ERR(5, 1252, __pyx_L1_error)) goto __pyx_L32_break; - /* "src/lxml/apihelpers.pxi":1251 + /* "src/lxml/apihelpers.pxi":1250 * for i in range(step): * c_node = next_element(c_node) * if c_node is NULL: # <<<<<<<<<<<<<< @@ -32895,7 +31160,7 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent */ } - /* "src/lxml/apihelpers.pxi":1247 + /* "src/lxml/apihelpers.pxi":1246 * * # stop at the end of the slice * if slicelength > 0: # <<<<<<<<<<<<<< @@ -32904,42 +31169,39 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent */ } - /* "src/lxml/apihelpers.pxi":1234 + /* "src/lxml/apihelpers.pxi":1233 * # now insert elements where we removed them * if c_node is not NULL: * for element in elements: # <<<<<<<<<<<<<< * assert element is not None, u"Node must not be None" * _assertValidNode(element) */ - __Pyx_TraceLine(1234,0,__PYX_ERR(5, 1234, __pyx_L1_error)) } /*else*/ { - /* "src/lxml/apihelpers.pxi":1255 + /* "src/lxml/apihelpers.pxi":1254 * else: * # everything inserted * return 0 # <<<<<<<<<<<<<< * * # append the remaining elements at the respective end */ - __Pyx_TraceLine(1255,0,__PYX_ERR(5, 1255, __pyx_L1_error)) __pyx_r = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L0; } - /* "src/lxml/apihelpers.pxi":1234 + /* "src/lxml/apihelpers.pxi":1233 * # now insert elements where we removed them * if c_node is not NULL: * for element in elements: # <<<<<<<<<<<<<< * assert element is not None, u"Node must not be None" * _assertValidNode(element) */ - __Pyx_TraceLine(1234,0,__PYX_ERR(5, 1234, __pyx_L1_error)) __pyx_L32_break:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "src/lxml/apihelpers.pxi":1233 + /* "src/lxml/apihelpers.pxi":1232 * * # now insert elements where we removed them * if c_node is not NULL: # <<<<<<<<<<<<<< @@ -32948,49 +31210,47 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent */ } - /* "src/lxml/apihelpers.pxi":1258 + /* "src/lxml/apihelpers.pxi":1257 * * # append the remaining elements at the respective end * if left_to_right: # <<<<<<<<<<<<<< * for element in elements: * assert element is not None, u"Node must not be None" */ - __Pyx_TraceLine(1258,0,__PYX_ERR(5, 1258, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_left_to_right != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1259 + /* "src/lxml/apihelpers.pxi":1258 * # append the remaining elements at the respective end * if left_to_right: * for element in elements: # <<<<<<<<<<<<<< * assert element is not None, u"Node must not be None" * _assertValidNode(element) */ - __Pyx_TraceLine(1259,0,__PYX_ERR(5, 1259, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_v_elements)) || PyTuple_CheckExact(__pyx_v_elements)) { __pyx_t_7 = __pyx_v_elements; __Pyx_INCREF(__pyx_t_7); __pyx_t_5 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1259, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1259, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1258, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_8)) { if (likely(PyList_CheckExact(__pyx_t_7))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(5, 1259, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(5, 1258, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1259, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(5, 1259, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(5, 1258, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1259, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -33000,66 +31260,62 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(5, 1259, __pyx_L1_error) + else __PYX_ERR(5, 1258, __pyx_L1_error) } break; } __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(5, 1259, __pyx_L1_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(5, 1258, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_element, ((struct LxmlElement *)__pyx_t_4)); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1260 + /* "src/lxml/apihelpers.pxi":1259 * if left_to_right: * for element in elements: * assert element is not None, u"Node must not be None" # <<<<<<<<<<<<<< * _assertValidNode(element) * _appendChild(parent, element) */ - __Pyx_TraceLine(1260,0,__PYX_ERR(5, 1260, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_2 = (((PyObject *)__pyx_v_element) != Py_None); if (unlikely(!(__pyx_t_2 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_Node_must_not_be_None); - __PYX_ERR(5, 1260, __pyx_L1_error) + __PYX_ERR(5, 1259, __pyx_L1_error) } } #endif - /* "src/lxml/apihelpers.pxi":1261 + /* "src/lxml/apihelpers.pxi":1260 * for element in elements: * assert element is not None, u"Node must not be None" * _assertValidNode(element) # <<<<<<<<<<<<<< * _appendChild(parent, element) * else: */ - __Pyx_TraceLine(1261,0,__PYX_ERR(5, 1261, __pyx_L1_error)) - __pyx_t_9 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(5, 1261, __pyx_L1_error) + __pyx_t_9 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(5, 1260, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1262 + /* "src/lxml/apihelpers.pxi":1261 * assert element is not None, u"Node must not be None" * _assertValidNode(element) * _appendChild(parent, element) # <<<<<<<<<<<<<< * else: * for element in elements: */ - __Pyx_TraceLine(1262,0,__PYX_ERR(5, 1262, __pyx_L1_error)) - __pyx_t_9 = __pyx_f_4lxml_5etree__appendChild(__pyx_v_parent, __pyx_v_element); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(5, 1262, __pyx_L1_error) + __pyx_t_9 = __pyx_f_4lxml_5etree__appendChild(__pyx_v_parent, __pyx_v_element); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(5, 1261, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1259 + /* "src/lxml/apihelpers.pxi":1258 * # append the remaining elements at the respective end * if left_to_right: * for element in elements: # <<<<<<<<<<<<<< * assert element is not None, u"Node must not be None" * _assertValidNode(element) */ - __Pyx_TraceLine(1259,0,__PYX_ERR(5, 1259, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "src/lxml/apihelpers.pxi":1258 + /* "src/lxml/apihelpers.pxi":1257 * * # append the remaining elements at the respective end * if left_to_right: # <<<<<<<<<<<<<< @@ -33069,39 +31325,38 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent goto __pyx_L38; } - /* "src/lxml/apihelpers.pxi":1264 + /* "src/lxml/apihelpers.pxi":1263 * _appendChild(parent, element) * else: * for element in elements: # <<<<<<<<<<<<<< * assert element is not None, u"Node must not be None" * _assertValidNode(element) */ - __Pyx_TraceLine(1264,0,__PYX_ERR(5, 1264, __pyx_L1_error)) /*else*/ { if (likely(PyList_CheckExact(__pyx_v_elements)) || PyTuple_CheckExact(__pyx_v_elements)) { __pyx_t_7 = __pyx_v_elements; __Pyx_INCREF(__pyx_t_7); __pyx_t_5 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1264, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1264, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1263, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_8)) { if (likely(PyList_CheckExact(__pyx_t_7))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(5, 1264, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(5, 1263, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1264, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(5, 1264, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(5, 1263, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1264, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -33111,79 +31366,74 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(5, 1264, __pyx_L1_error) + else __PYX_ERR(5, 1263, __pyx_L1_error) } break; } __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(5, 1264, __pyx_L1_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(5, 1263, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_element, ((struct LxmlElement *)__pyx_t_4)); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1265 + /* "src/lxml/apihelpers.pxi":1264 * else: * for element in elements: * assert element is not None, u"Node must not be None" # <<<<<<<<<<<<<< * _assertValidNode(element) * _prependChild(parent, element) */ - __Pyx_TraceLine(1265,0,__PYX_ERR(5, 1265, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_2 = (((PyObject *)__pyx_v_element) != Py_None); if (unlikely(!(__pyx_t_2 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_Node_must_not_be_None); - __PYX_ERR(5, 1265, __pyx_L1_error) + __PYX_ERR(5, 1264, __pyx_L1_error) } } #endif - /* "src/lxml/apihelpers.pxi":1266 + /* "src/lxml/apihelpers.pxi":1265 * for element in elements: * assert element is not None, u"Node must not be None" * _assertValidNode(element) # <<<<<<<<<<<<<< * _prependChild(parent, element) * */ - __Pyx_TraceLine(1266,0,__PYX_ERR(5, 1266, __pyx_L1_error)) - __pyx_t_9 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(5, 1266, __pyx_L1_error) + __pyx_t_9 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(5, 1265, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1267 + /* "src/lxml/apihelpers.pxi":1266 * assert element is not None, u"Node must not be None" * _assertValidNode(element) * _prependChild(parent, element) # <<<<<<<<<<<<<< * * return 0 */ - __Pyx_TraceLine(1267,0,__PYX_ERR(5, 1267, __pyx_L1_error)) - __pyx_t_9 = __pyx_f_4lxml_5etree__prependChild(__pyx_v_parent, __pyx_v_element); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(5, 1267, __pyx_L1_error) + __pyx_t_9 = __pyx_f_4lxml_5etree__prependChild(__pyx_v_parent, __pyx_v_element); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(5, 1266, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1264 + /* "src/lxml/apihelpers.pxi":1263 * _appendChild(parent, element) * else: * for element in elements: # <<<<<<<<<<<<<< * assert element is not None, u"Node must not be None" * _assertValidNode(element) */ - __Pyx_TraceLine(1264,0,__PYX_ERR(5, 1264, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_L38:; - /* "src/lxml/apihelpers.pxi":1269 + /* "src/lxml/apihelpers.pxi":1268 * _prependChild(parent, element) * * return 0 # <<<<<<<<<<<<<< * * cdef int _appendChild(_Element parent, _Element child) except -1: */ - __Pyx_TraceLine(1269,0,__PYX_ERR(5, 1269, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1140 + /* "src/lxml/apihelpers.pxi":1139 * return 0 * * cdef int _replaceSlice(_Element parent, xmlNode* c_node, # <<<<<<<<<<<<<< @@ -33200,12 +31450,11 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_element); __Pyx_XDECREF(__pyx_v_elements); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1271 +/* "src/lxml/apihelpers.pxi":1270 * return 0 * * cdef int _appendChild(_Element parent, _Element child) except -1: # <<<<<<<<<<<<<< @@ -33218,7 +31467,6 @@ static int __pyx_f_4lxml_5etree__appendChild(struct LxmlElement *__pyx_v_parent, xmlDoc *__pyx_v_c_source_doc; xmlNode *__pyx_v_c_next; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlNode *__pyx_t_1; xmlDoc *__pyx_t_2; @@ -33226,56 +31474,51 @@ static int __pyx_f_4lxml_5etree__appendChild(struct LxmlElement *__pyx_v_parent, PyObject *__pyx_t_4 = NULL; int __pyx_t_5; __Pyx_RefNannySetupContext("_appendChild", 0); - __Pyx_TraceCall("_appendChild", __pyx_f[5], 1271, 0, __PYX_ERR(5, 1271, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1274 + /* "src/lxml/apihelpers.pxi":1273 * u"""Append a new child to a parent element. * """ * c_node = child._c_node # <<<<<<<<<<<<<< * c_source_doc = c_node.doc * # prevent cycles */ - __Pyx_TraceLine(1274,0,__PYX_ERR(5, 1274, __pyx_L1_error)) __pyx_t_1 = __pyx_v_child->_c_node; __pyx_v_c_node = __pyx_t_1; - /* "src/lxml/apihelpers.pxi":1275 + /* "src/lxml/apihelpers.pxi":1274 * """ * c_node = child._c_node * c_source_doc = c_node.doc # <<<<<<<<<<<<<< * # prevent cycles * if _isAncestorOrSame(c_node, parent._c_node): */ - __Pyx_TraceLine(1275,0,__PYX_ERR(5, 1275, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->doc; __pyx_v_c_source_doc = __pyx_t_2; - /* "src/lxml/apihelpers.pxi":1277 + /* "src/lxml/apihelpers.pxi":1276 * c_source_doc = c_node.doc * # prevent cycles * if _isAncestorOrSame(c_node, parent._c_node): # <<<<<<<<<<<<<< * raise ValueError("cannot append parent to itself") * # store possible text node */ - __Pyx_TraceLine(1277,0,__PYX_ERR(5, 1277, __pyx_L1_error)) __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":1278 + /* "src/lxml/apihelpers.pxi":1277 * # 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_TraceLine(1278,0,__PYX_ERR(5, 1278, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1278, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1277, __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, 1278, __pyx_L1_error) + __PYX_ERR(5, 1277, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1277 + /* "src/lxml/apihelpers.pxi":1276 * c_source_doc = c_node.doc * # prevent cycles * if _isAncestorOrSame(c_node, parent._c_node): # <<<<<<<<<<<<<< @@ -33284,72 +31527,66 @@ static int __pyx_f_4lxml_5etree__appendChild(struct LxmlElement *__pyx_v_parent, */ } - /* "src/lxml/apihelpers.pxi":1280 + /* "src/lxml/apihelpers.pxi":1279 * raise ValueError("cannot append parent to itself") * # store possible text node * c_next = c_node.next # <<<<<<<<<<<<<< * # move node itself * tree.xmlUnlinkNode(c_node) */ - __Pyx_TraceLine(1280,0,__PYX_ERR(5, 1280, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_node->next; __pyx_v_c_next = __pyx_t_1; - /* "src/lxml/apihelpers.pxi":1282 + /* "src/lxml/apihelpers.pxi":1281 * c_next = c_node.next * # move node itself * tree.xmlUnlinkNode(c_node) # <<<<<<<<<<<<<< * tree.xmlAddChild(parent._c_node, c_node) * _moveTail(c_next, c_node) */ - __Pyx_TraceLine(1282,0,__PYX_ERR(5, 1282, __pyx_L1_error)) xmlUnlinkNode(__pyx_v_c_node); - /* "src/lxml/apihelpers.pxi":1283 + /* "src/lxml/apihelpers.pxi":1282 * # move node itself * tree.xmlUnlinkNode(c_node) * tree.xmlAddChild(parent._c_node, c_node) # <<<<<<<<<<<<<< * _moveTail(c_next, c_node) * # uh oh, elements may be pointing to different doc when */ - __Pyx_TraceLine(1283,0,__PYX_ERR(5, 1283, __pyx_L1_error)) (void)(xmlAddChild(__pyx_v_parent->_c_node, __pyx_v_c_node)); - /* "src/lxml/apihelpers.pxi":1284 + /* "src/lxml/apihelpers.pxi":1283 * tree.xmlUnlinkNode(c_node) * tree.xmlAddChild(parent._c_node, c_node) * _moveTail(c_next, c_node) # <<<<<<<<<<<<<< * # uh oh, elements may be pointing to different doc when * # parent element has moved; change them too.. */ - __Pyx_TraceLine(1284,0,__PYX_ERR(5, 1284, __pyx_L1_error)) __pyx_f_4lxml_5etree__moveTail(__pyx_v_c_next, __pyx_v_c_node); - /* "src/lxml/apihelpers.pxi":1287 + /* "src/lxml/apihelpers.pxi":1286 * # 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) # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(1287,0,__PYX_ERR(5, 1287, __pyx_L1_error)) __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, 1287, __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, 1286, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1288 + /* "src/lxml/apihelpers.pxi":1287 * # parent element has moved; change them too.. * moveNodeToDocument(parent._doc, c_source_doc, c_node) * return 0 # <<<<<<<<<<<<<< * * cdef int _prependChild(_Element parent, _Element child) except -1: */ - __Pyx_TraceLine(1288,0,__PYX_ERR(5, 1288, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1271 + /* "src/lxml/apihelpers.pxi":1270 * return 0 * * cdef int _appendChild(_Element parent, _Element child) except -1: # <<<<<<<<<<<<<< @@ -33363,12 +31600,11 @@ static int __pyx_f_4lxml_5etree__appendChild(struct LxmlElement *__pyx_v_parent, __Pyx_AddTraceback("lxml.etree._appendChild", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1290 +/* "src/lxml/apihelpers.pxi":1289 * return 0 * * cdef int _prependChild(_Element parent, _Element child) except -1: # <<<<<<<<<<<<<< @@ -33382,7 +31618,6 @@ static int __pyx_f_4lxml_5etree__prependChild(struct LxmlElement *__pyx_v_parent xmlNode *__pyx_v_c_next; xmlNode *__pyx_v_c_child; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlNode *__pyx_t_1; xmlDoc *__pyx_t_2; @@ -33390,56 +31625,51 @@ static int __pyx_f_4lxml_5etree__prependChild(struct LxmlElement *__pyx_v_parent PyObject *__pyx_t_4 = NULL; int __pyx_t_5; __Pyx_RefNannySetupContext("_prependChild", 0); - __Pyx_TraceCall("_prependChild", __pyx_f[5], 1290, 0, __PYX_ERR(5, 1290, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1293 + /* "src/lxml/apihelpers.pxi":1292 * u"""Prepend a new child to a parent element. * """ * c_node = child._c_node # <<<<<<<<<<<<<< * c_source_doc = c_node.doc * # prevent cycles */ - __Pyx_TraceLine(1293,0,__PYX_ERR(5, 1293, __pyx_L1_error)) __pyx_t_1 = __pyx_v_child->_c_node; __pyx_v_c_node = __pyx_t_1; - /* "src/lxml/apihelpers.pxi":1294 + /* "src/lxml/apihelpers.pxi":1293 * """ * c_node = child._c_node * c_source_doc = c_node.doc # <<<<<<<<<<<<<< * # prevent cycles * if _isAncestorOrSame(c_node, parent._c_node): */ - __Pyx_TraceLine(1294,0,__PYX_ERR(5, 1294, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->doc; __pyx_v_c_source_doc = __pyx_t_2; - /* "src/lxml/apihelpers.pxi":1296 + /* "src/lxml/apihelpers.pxi":1295 * c_source_doc = c_node.doc * # prevent cycles * if _isAncestorOrSame(c_node, parent._c_node): # <<<<<<<<<<<<<< * raise ValueError("cannot append parent to itself") * # store possible text node */ - __Pyx_TraceLine(1296,0,__PYX_ERR(5, 1296, __pyx_L1_error)) __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":1297 + /* "src/lxml/apihelpers.pxi":1296 * # 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_TraceLine(1297,0,__PYX_ERR(5, 1297, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1297, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1296, __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, 1297, __pyx_L1_error) + __PYX_ERR(5, 1296, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1296 + /* "src/lxml/apihelpers.pxi":1295 * c_source_doc = c_node.doc * # prevent cycles * if _isAncestorOrSame(c_node, parent._c_node): # <<<<<<<<<<<<<< @@ -33448,59 +31678,54 @@ static int __pyx_f_4lxml_5etree__prependChild(struct LxmlElement *__pyx_v_parent */ } - /* "src/lxml/apihelpers.pxi":1299 + /* "src/lxml/apihelpers.pxi":1298 * raise ValueError("cannot append parent to itself") * # store possible text node * c_next = c_node.next # <<<<<<<<<<<<<< * # move node itself * c_child = _findChildForwards(parent._c_node, 0) */ - __Pyx_TraceLine(1299,0,__PYX_ERR(5, 1299, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_node->next; __pyx_v_c_next = __pyx_t_1; - /* "src/lxml/apihelpers.pxi":1301 + /* "src/lxml/apihelpers.pxi":1300 * c_next = c_node.next * # move node itself * c_child = _findChildForwards(parent._c_node, 0) # <<<<<<<<<<<<<< * if c_child is NULL: * tree.xmlUnlinkNode(c_node) */ - __Pyx_TraceLine(1301,0,__PYX_ERR(5, 1301, __pyx_L1_error)) __pyx_v_c_child = __pyx_f_4lxml_5etree__findChildForwards(__pyx_v_parent->_c_node, 0); - /* "src/lxml/apihelpers.pxi":1302 + /* "src/lxml/apihelpers.pxi":1301 * # move node itself * c_child = _findChildForwards(parent._c_node, 0) * if c_child is NULL: # <<<<<<<<<<<<<< * tree.xmlUnlinkNode(c_node) * tree.xmlAddChild(parent._c_node, c_node) */ - __Pyx_TraceLine(1302,0,__PYX_ERR(5, 1302, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_child == NULL) != 0); if (__pyx_t_3) { - /* "src/lxml/apihelpers.pxi":1303 + /* "src/lxml/apihelpers.pxi":1302 * c_child = _findChildForwards(parent._c_node, 0) * if c_child is NULL: * tree.xmlUnlinkNode(c_node) # <<<<<<<<<<<<<< * tree.xmlAddChild(parent._c_node, c_node) * else: */ - __Pyx_TraceLine(1303,0,__PYX_ERR(5, 1303, __pyx_L1_error)) xmlUnlinkNode(__pyx_v_c_node); - /* "src/lxml/apihelpers.pxi":1304 + /* "src/lxml/apihelpers.pxi":1303 * if c_child is NULL: * tree.xmlUnlinkNode(c_node) * tree.xmlAddChild(parent._c_node, c_node) # <<<<<<<<<<<<<< * else: * tree.xmlAddPrevSibling(c_child, c_node) */ - __Pyx_TraceLine(1304,0,__PYX_ERR(5, 1304, __pyx_L1_error)) (void)(xmlAddChild(__pyx_v_parent->_c_node, __pyx_v_c_node)); - /* "src/lxml/apihelpers.pxi":1302 + /* "src/lxml/apihelpers.pxi":1301 * # move node itself * c_child = _findChildForwards(parent._c_node, 0) * if c_child is NULL: # <<<<<<<<<<<<<< @@ -33510,54 +31735,50 @@ static int __pyx_f_4lxml_5etree__prependChild(struct LxmlElement *__pyx_v_parent goto __pyx_L4; } - /* "src/lxml/apihelpers.pxi":1306 + /* "src/lxml/apihelpers.pxi":1305 * tree.xmlAddChild(parent._c_node, c_node) * else: * tree.xmlAddPrevSibling(c_child, c_node) # <<<<<<<<<<<<<< * _moveTail(c_next, c_node) * # uh oh, elements may be pointing to different doc when */ - __Pyx_TraceLine(1306,0,__PYX_ERR(5, 1306, __pyx_L1_error)) /*else*/ { (void)(xmlAddPrevSibling(__pyx_v_c_child, __pyx_v_c_node)); } __pyx_L4:; - /* "src/lxml/apihelpers.pxi":1307 + /* "src/lxml/apihelpers.pxi":1306 * else: * tree.xmlAddPrevSibling(c_child, c_node) * _moveTail(c_next, c_node) # <<<<<<<<<<<<<< * # uh oh, elements may be pointing to different doc when * # parent element has moved; change them too.. */ - __Pyx_TraceLine(1307,0,__PYX_ERR(5, 1307, __pyx_L1_error)) __pyx_f_4lxml_5etree__moveTail(__pyx_v_c_next, __pyx_v_c_node); - /* "src/lxml/apihelpers.pxi":1310 + /* "src/lxml/apihelpers.pxi":1309 * # 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) # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(1310,0,__PYX_ERR(5, 1310, __pyx_L1_error)) __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, 1310, __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, 1309, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1311 + /* "src/lxml/apihelpers.pxi":1310 * # parent element has moved; change them too.. * moveNodeToDocument(parent._doc, c_source_doc, c_node) * return 0 # <<<<<<<<<<<<<< * * cdef int _appendSibling(_Element element, _Element sibling) except -1: */ - __Pyx_TraceLine(1311,0,__PYX_ERR(5, 1311, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1290 + /* "src/lxml/apihelpers.pxi":1289 * return 0 * * cdef int _prependChild(_Element parent, _Element child) except -1: # <<<<<<<<<<<<<< @@ -33571,12 +31792,11 @@ static int __pyx_f_4lxml_5etree__prependChild(struct LxmlElement *__pyx_v_parent __Pyx_AddTraceback("lxml.etree._prependChild", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1313 +/* "src/lxml/apihelpers.pxi":1312 * return 0 * * cdef int _appendSibling(_Element element, _Element sibling) except -1: # <<<<<<<<<<<<<< @@ -33586,25 +31806,22 @@ static int __pyx_f_4lxml_5etree__prependChild(struct LxmlElement *__pyx_v_parent static int __pyx_f_4lxml_5etree__appendSibling(struct LxmlElement *__pyx_v_element, struct LxmlElement *__pyx_v_sibling) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_appendSibling", 0); - __Pyx_TraceCall("_appendSibling", __pyx_f[5], 1313, 0, __PYX_ERR(5, 1313, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1316 + /* "src/lxml/apihelpers.pxi":1315 * 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_TraceLine(1316,0,__PYX_ERR(5, 1316, __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, 1316, __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, 1315, __pyx_L1_error) __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1313 + /* "src/lxml/apihelpers.pxi":1312 * return 0 * * cdef int _appendSibling(_Element element, _Element sibling) except -1: # <<<<<<<<<<<<<< @@ -33617,12 +31834,11 @@ static int __pyx_f_4lxml_5etree__appendSibling(struct LxmlElement *__pyx_v_eleme __Pyx_AddTraceback("lxml.etree._appendSibling", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1318 +/* "src/lxml/apihelpers.pxi":1317 * return _addSibling(element, sibling, as_next=True) * * cdef int _prependSibling(_Element element, _Element sibling) except -1: # <<<<<<<<<<<<<< @@ -33632,25 +31848,22 @@ static int __pyx_f_4lxml_5etree__appendSibling(struct LxmlElement *__pyx_v_eleme static int __pyx_f_4lxml_5etree__prependSibling(struct LxmlElement *__pyx_v_element, struct LxmlElement *__pyx_v_sibling) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_prependSibling", 0); - __Pyx_TraceCall("_prependSibling", __pyx_f[5], 1318, 0, __PYX_ERR(5, 1318, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1321 + /* "src/lxml/apihelpers.pxi":1320 * 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_TraceLine(1321,0,__PYX_ERR(5, 1321, __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, 1321, __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, 1320, __pyx_L1_error) __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1318 + /* "src/lxml/apihelpers.pxi":1317 * return _addSibling(element, sibling, as_next=True) * * cdef int _prependSibling(_Element element, _Element sibling) except -1: # <<<<<<<<<<<<<< @@ -33663,12 +31876,11 @@ static int __pyx_f_4lxml_5etree__prependSibling(struct LxmlElement *__pyx_v_elem __Pyx_AddTraceback("lxml.etree._prependSibling", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1323 +/* "src/lxml/apihelpers.pxi":1322 * return _addSibling(element, sibling, as_next=False) * * cdef int _addSibling(_Element element, _Element sibling, bint as_next) except -1: # <<<<<<<<<<<<<< @@ -33681,7 +31893,6 @@ static int __pyx_f_4lxml_5etree__addSibling(struct LxmlElement *__pyx_v_element, xmlDoc *__pyx_v_c_source_doc; xmlNode *__pyx_v_c_next; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlNode *__pyx_t_1; xmlDoc *__pyx_t_2; @@ -33689,64 +31900,58 @@ static int __pyx_f_4lxml_5etree__addSibling(struct LxmlElement *__pyx_v_element, PyObject *__pyx_t_4 = NULL; int __pyx_t_5; __Pyx_RefNannySetupContext("_addSibling", 0); - __Pyx_TraceCall("_addSibling", __pyx_f[5], 1323, 0, __PYX_ERR(5, 1323, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1324 + /* "src/lxml/apihelpers.pxi":1323 * * cdef int _addSibling(_Element element, _Element sibling, bint as_next) except -1: * c_node = sibling._c_node # <<<<<<<<<<<<<< * c_source_doc = c_node.doc * # prevent cycles */ - __Pyx_TraceLine(1324,0,__PYX_ERR(5, 1324, __pyx_L1_error)) __pyx_t_1 = __pyx_v_sibling->_c_node; __pyx_v_c_node = __pyx_t_1; - /* "src/lxml/apihelpers.pxi":1325 + /* "src/lxml/apihelpers.pxi":1324 * cdef int _addSibling(_Element element, _Element sibling, bint as_next) except -1: * c_node = sibling._c_node * c_source_doc = c_node.doc # <<<<<<<<<<<<<< * # prevent cycles * if _isAncestorOrSame(c_node, element._c_node): */ - __Pyx_TraceLine(1325,0,__PYX_ERR(5, 1325, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->doc; __pyx_v_c_source_doc = __pyx_t_2; - /* "src/lxml/apihelpers.pxi":1327 + /* "src/lxml/apihelpers.pxi":1326 * c_source_doc = c_node.doc * # prevent cycles * if _isAncestorOrSame(c_node, element._c_node): # <<<<<<<<<<<<<< * if element._c_node is c_node: * return 0 # nothing to do */ - __Pyx_TraceLine(1327,0,__PYX_ERR(5, 1327, __pyx_L1_error)) __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":1328 + /* "src/lxml/apihelpers.pxi":1327 * # prevent cycles * if _isAncestorOrSame(c_node, element._c_node): * if element._c_node is c_node: # <<<<<<<<<<<<<< * return 0 # nothing to do * raise ValueError("cannot add ancestor as sibling, please break cycle first") */ - __Pyx_TraceLine(1328,0,__PYX_ERR(5, 1328, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_element->_c_node == __pyx_v_c_node) != 0); if (__pyx_t_3) { - /* "src/lxml/apihelpers.pxi":1329 + /* "src/lxml/apihelpers.pxi":1328 * if _isAncestorOrSame(c_node, element._c_node): * 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 */ - __Pyx_TraceLine(1329,0,__PYX_ERR(5, 1329, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1328 + /* "src/lxml/apihelpers.pxi":1327 * # prevent cycles * if _isAncestorOrSame(c_node, element._c_node): * if element._c_node is c_node: # <<<<<<<<<<<<<< @@ -33755,21 +31960,20 @@ static int __pyx_f_4lxml_5etree__addSibling(struct LxmlElement *__pyx_v_element, */ } - /* "src/lxml/apihelpers.pxi":1330 + /* "src/lxml/apihelpers.pxi":1329 * 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_TraceLine(1330,0,__PYX_ERR(5, 1330, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1330, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1329, __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, 1330, __pyx_L1_error) + __PYX_ERR(5, 1329, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1327 + /* "src/lxml/apihelpers.pxi":1326 * c_source_doc = c_node.doc * # prevent cycles * if _isAncestorOrSame(c_node, element._c_node): # <<<<<<<<<<<<<< @@ -33778,39 +31982,36 @@ static int __pyx_f_4lxml_5etree__addSibling(struct LxmlElement *__pyx_v_element, */ } - /* "src/lxml/apihelpers.pxi":1332 + /* "src/lxml/apihelpers.pxi":1331 * raise ValueError("cannot add ancestor as sibling, please break cycle first") * # store possible text node * c_next = c_node.next # <<<<<<<<<<<<<< * # move node itself * if as_next: */ - __Pyx_TraceLine(1332,0,__PYX_ERR(5, 1332, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_node->next; __pyx_v_c_next = __pyx_t_1; - /* "src/lxml/apihelpers.pxi":1334 + /* "src/lxml/apihelpers.pxi":1333 * c_next = c_node.next * # move node itself * if as_next: # <<<<<<<<<<<<<< * tree.xmlAddNextSibling(element._c_node, c_node) * else: */ - __Pyx_TraceLine(1334,0,__PYX_ERR(5, 1334, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_as_next != 0); if (__pyx_t_3) { - /* "src/lxml/apihelpers.pxi":1335 + /* "src/lxml/apihelpers.pxi":1334 * # move node itself * if as_next: * tree.xmlAddNextSibling(element._c_node, c_node) # <<<<<<<<<<<<<< * else: * tree.xmlAddPrevSibling(element._c_node, c_node) */ - __Pyx_TraceLine(1335,0,__PYX_ERR(5, 1335, __pyx_L1_error)) (void)(xmlAddNextSibling(__pyx_v_element->_c_node, __pyx_v_c_node)); - /* "src/lxml/apihelpers.pxi":1334 + /* "src/lxml/apihelpers.pxi":1333 * c_next = c_node.next * # move node itself * if as_next: # <<<<<<<<<<<<<< @@ -33820,54 +32021,50 @@ static int __pyx_f_4lxml_5etree__addSibling(struct LxmlElement *__pyx_v_element, goto __pyx_L5; } - /* "src/lxml/apihelpers.pxi":1337 + /* "src/lxml/apihelpers.pxi":1336 * tree.xmlAddNextSibling(element._c_node, c_node) * else: * tree.xmlAddPrevSibling(element._c_node, c_node) # <<<<<<<<<<<<<< * _moveTail(c_next, c_node) * # uh oh, elements may be pointing to different doc when */ - __Pyx_TraceLine(1337,0,__PYX_ERR(5, 1337, __pyx_L1_error)) /*else*/ { (void)(xmlAddPrevSibling(__pyx_v_element->_c_node, __pyx_v_c_node)); } __pyx_L5:; - /* "src/lxml/apihelpers.pxi":1338 + /* "src/lxml/apihelpers.pxi":1337 * else: * tree.xmlAddPrevSibling(element._c_node, c_node) * _moveTail(c_next, c_node) # <<<<<<<<<<<<<< * # uh oh, elements may be pointing to different doc when * # parent element has moved; change them too.. */ - __Pyx_TraceLine(1338,0,__PYX_ERR(5, 1338, __pyx_L1_error)) __pyx_f_4lxml_5etree__moveTail(__pyx_v_c_next, __pyx_v_c_node); - /* "src/lxml/apihelpers.pxi":1341 + /* "src/lxml/apihelpers.pxi":1340 * # 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) # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(1341,0,__PYX_ERR(5, 1341, __pyx_L1_error)) __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, 1341, __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, 1340, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1342 + /* "src/lxml/apihelpers.pxi":1341 * # parent element has moved; change them too.. * moveNodeToDocument(element._doc, c_source_doc, c_node) * return 0 # <<<<<<<<<<<<<< * - * cdef inline int isutf8(const_xmlChar* s): + * cdef inline bint isutf8(const_xmlChar* s): */ - __Pyx_TraceLine(1342,0,__PYX_ERR(5, 1342, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1323 + /* "src/lxml/apihelpers.pxi":1322 * return _addSibling(element, sibling, as_next=False) * * cdef int _addSibling(_Element element, _Element sibling, bint as_next) except -1: # <<<<<<<<<<<<<< @@ -33881,15 +32078,14 @@ static int __pyx_f_4lxml_5etree__addSibling(struct LxmlElement *__pyx_v_element, __Pyx_AddTraceback("lxml.etree._addSibling", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1344 +/* "src/lxml/apihelpers.pxi":1343 * return 0 * - * cdef inline int isutf8(const_xmlChar* s): # <<<<<<<<<<<<<< + * cdef inline bint isutf8(const_xmlChar* s): # <<<<<<<<<<<<<< * cdef xmlChar c = s[0] * while c != c'\0': */ @@ -33897,117 +32093,412 @@ static int __pyx_f_4lxml_5etree__addSibling(struct LxmlElement *__pyx_v_element, static CYTHON_INLINE int __pyx_f_4lxml_5etree_isutf8(const xmlChar *__pyx_v_s) { xmlChar __pyx_v_c; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("isutf8", 0); - __Pyx_TraceCall("isutf8", __pyx_f[5], 1344, 0, __PYX_ERR(5, 1344, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1345 + /* "src/lxml/apihelpers.pxi":1344 * - * cdef inline int isutf8(const_xmlChar* s): + * cdef inline bint isutf8(const_xmlChar* s): * cdef xmlChar c = s[0] # <<<<<<<<<<<<<< * while c != c'\0': * if c & 0x80: */ - __Pyx_TraceLine(1345,0,__PYX_ERR(5, 1345, __pyx_L1_error)) __pyx_v_c = (__pyx_v_s[0]); - /* "src/lxml/apihelpers.pxi":1346 - * cdef inline int isutf8(const_xmlChar* s): + /* "src/lxml/apihelpers.pxi":1345 + * cdef inline bint isutf8(const_xmlChar* s): * cdef xmlChar c = s[0] * while c != c'\0': # <<<<<<<<<<<<<< * if c & 0x80: - * return 1 + * return True */ - __Pyx_TraceLine(1346,0,__PYX_ERR(5, 1346, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_c != '\x00') != 0); if (!__pyx_t_1) break; - /* "src/lxml/apihelpers.pxi":1347 + /* "src/lxml/apihelpers.pxi":1346 * cdef xmlChar c = s[0] * while c != c'\0': * if c & 0x80: # <<<<<<<<<<<<<< - * return 1 + * return True * s += 1 */ - __Pyx_TraceLine(1347,0,__PYX_ERR(5, 1347, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c & 0x80) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1348 + /* "src/lxml/apihelpers.pxi":1347 * while c != c'\0': * if c & 0x80: - * return 1 # <<<<<<<<<<<<<< + * return True # <<<<<<<<<<<<<< * s += 1 * c = s[0] */ - __Pyx_TraceLine(1348,0,__PYX_ERR(5, 1348, __pyx_L1_error)) __pyx_r = 1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1347 + /* "src/lxml/apihelpers.pxi":1346 * cdef xmlChar c = s[0] * while c != c'\0': * if c & 0x80: # <<<<<<<<<<<<<< - * return 1 + * return True * s += 1 */ } - /* "src/lxml/apihelpers.pxi":1349 + /* "src/lxml/apihelpers.pxi":1348 * if c & 0x80: - * return 1 + * return True * s += 1 # <<<<<<<<<<<<<< * c = s[0] - * return 0 + * return False */ - __Pyx_TraceLine(1349,0,__PYX_ERR(5, 1349, __pyx_L1_error)) __pyx_v_s = (__pyx_v_s + 1); - /* "src/lxml/apihelpers.pxi":1350 - * return 1 + /* "src/lxml/apihelpers.pxi":1349 + * return True * s += 1 * c = s[0] # <<<<<<<<<<<<<< - * return 0 + * return False * */ - __Pyx_TraceLine(1350,0,__PYX_ERR(5, 1350, __pyx_L1_error)) __pyx_v_c = (__pyx_v_s[0]); } - /* "src/lxml/apihelpers.pxi":1351 + /* "src/lxml/apihelpers.pxi":1350 * s += 1 * c = s[0] - * return 0 # <<<<<<<<<<<<<< + * return False # <<<<<<<<<<<<<< * - * cdef int _is_valid_xml_ascii(bytes pystring): + * cdef bint isutf8l(const_xmlChar* s, size_t length): */ - __Pyx_TraceLine(1351,0,__PYX_ERR(5, 1351, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1344 + /* "src/lxml/apihelpers.pxi":1343 * return 0 * - * cdef inline int isutf8(const_xmlChar* s): # <<<<<<<<<<<<<< + * cdef inline bint isutf8(const_xmlChar* s): # <<<<<<<<<<<<<< * cdef xmlChar c = s[0] * while c != c'\0': */ /* function exit code */ + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "src/lxml/apihelpers.pxi":1352 + * return False + * + * cdef bint isutf8l(const_xmlChar* s, size_t length): # <<<<<<<<<<<<<< + * """ + * Search for non-ASCII characters in the string, knowing its length in advance. + */ + +static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v_length) { + CYTHON_UNUSED int __pyx_v_i; + unsigned long __pyx_v_non_ascii_mask; + unsigned long const *__pyx_v_lptr; + unsigned long const *__pyx_v_end; + int __pyx_r; + __Pyx_RefNannyDeclarations + size_t __pyx_t_1; + int __pyx_t_2; + size_t __pyx_t_3; + int __pyx_t_4; + int __pyx_t_5; + __Pyx_RefNannySetupContext("isutf8l", 0); + + /* "src/lxml/apihelpers.pxi":1358 + * cdef int i + * cdef unsigned long non_ascii_mask + * cdef const unsigned long *lptr = s # <<<<<<<<<<<<<< + * + * cdef const unsigned long *end = lptr + length // sizeof(unsigned long) + */ + __pyx_v_lptr = ((unsigned long const *)__pyx_v_s); + + /* "src/lxml/apihelpers.pxi":1360 + * cdef const unsigned long *lptr = s + * + * cdef const unsigned long *end = lptr + length // sizeof(unsigned long) # <<<<<<<<<<<<<< + * if length >= sizeof(non_ascii_mask): + * # Build constant 0x80808080... mask (and let the C compiler fold it). + */ + __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, 1360, __pyx_L1_error) + } + __pyx_v_end = (__pyx_v_lptr + (__pyx_v_length / __pyx_t_1)); + + /* "src/lxml/apihelpers.pxi":1361 + * + * cdef const unsigned long *end = lptr + length // sizeof(unsigned long) + * if length >= sizeof(non_ascii_mask): # <<<<<<<<<<<<<< + * # Build constant 0x80808080... mask (and let the C compiler fold it). + * non_ascii_mask = 0 + */ + __pyx_t_2 = ((__pyx_v_length >= (sizeof(__pyx_v_non_ascii_mask))) != 0); + if (__pyx_t_2) { + + /* "src/lxml/apihelpers.pxi":1363 + * if length >= sizeof(non_ascii_mask): + * # Build constant 0x80808080... mask (and let the C compiler fold it). + * non_ascii_mask = 0 # <<<<<<<<<<<<<< + * for i in range(sizeof(non_ascii_mask) // 2): + * non_ascii_mask = (non_ascii_mask << 16) | 0x8080 + */ + __pyx_v_non_ascii_mask = 0; + + /* "src/lxml/apihelpers.pxi":1364 + * # Build constant 0x80808080... mask (and let the C compiler fold it). + * non_ascii_mask = 0 + * for i in range(sizeof(non_ascii_mask) // 2): # <<<<<<<<<<<<<< + * non_ascii_mask = (non_ascii_mask << 16) | 0x8080 + * + */ + __pyx_t_1 = ((sizeof(__pyx_v_non_ascii_mask)) / 2); + __pyx_t_3 = __pyx_t_1; + 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":1365 + * non_ascii_mask = 0 + * for i in range(sizeof(non_ascii_mask) // 2): + * non_ascii_mask = (non_ascii_mask << 16) | 0x8080 # <<<<<<<<<<<<<< + * + * # Advance to long-aligned character before we start reading longs. + */ + __pyx_v_non_ascii_mask = ((__pyx_v_non_ascii_mask << 16) | 0x8080); + } + + /* "src/lxml/apihelpers.pxi":1368 + * + * # Advance to long-aligned character before we start reading longs. + * while (s) % sizeof(unsigned long) and s < end: # <<<<<<<<<<<<<< + * if s[0] & 0x80: + * return True + */ + while (1) { + __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, 1368, __pyx_L1_error) + } + __pyx_t_5 = ((((size_t)__pyx_v_s) % __pyx_t_1) != 0); + if (__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_5 = ((__pyx_v_s < ((const xmlChar *)__pyx_v_end)) != 0); + __pyx_t_2 = __pyx_t_5; + __pyx_L8_bool_binop_done:; + if (!__pyx_t_2) break; + + /* "src/lxml/apihelpers.pxi":1369 + * # Advance to long-aligned character before we start reading longs. + * while (s) % sizeof(unsigned long) and s < end: + * if s[0] & 0x80: # <<<<<<<<<<<<<< + * return True + * s += 1 + */ + __pyx_t_2 = (((__pyx_v_s[0]) & 0x80) != 0); + if (__pyx_t_2) { + + /* "src/lxml/apihelpers.pxi":1370 + * while (s) % sizeof(unsigned long) and s < end: + * if s[0] & 0x80: + * return True # <<<<<<<<<<<<<< + * s += 1 + * + */ + __pyx_r = 1; + goto __pyx_L0; + + /* "src/lxml/apihelpers.pxi":1369 + * # Advance to long-aligned character before we start reading longs. + * while (s) % sizeof(unsigned long) and s < end: + * if s[0] & 0x80: # <<<<<<<<<<<<<< + * return True + * s += 1 + */ + } + + /* "src/lxml/apihelpers.pxi":1371 + * if s[0] & 0x80: + * return True + * s += 1 # <<<<<<<<<<<<<< + * + * # Read one long at a time + */ + __pyx_v_s = (__pyx_v_s + 1); + } + + /* "src/lxml/apihelpers.pxi":1374 + * + * # Read one long at a time + * lptr = s # <<<<<<<<<<<<<< + * while lptr < end: + * if lptr[0] & non_ascii_mask: + */ + __pyx_v_lptr = ((unsigned long const *)__pyx_v_s); + + /* "src/lxml/apihelpers.pxi":1375 + * # Read one long at a time + * lptr = s + * while lptr < end: # <<<<<<<<<<<<<< + * if lptr[0] & non_ascii_mask: + * return True + */ + while (1) { + __pyx_t_2 = ((__pyx_v_lptr < __pyx_v_end) != 0); + if (!__pyx_t_2) break; + + /* "src/lxml/apihelpers.pxi":1376 + * lptr = s + * while lptr < end: + * if lptr[0] & non_ascii_mask: # <<<<<<<<<<<<<< + * return True + * lptr += 1 + */ + __pyx_t_2 = (((__pyx_v_lptr[0]) & __pyx_v_non_ascii_mask) != 0); + if (__pyx_t_2) { + + /* "src/lxml/apihelpers.pxi":1377 + * while lptr < end: + * if lptr[0] & non_ascii_mask: + * return True # <<<<<<<<<<<<<< + * lptr += 1 + * s = lptr + */ + __pyx_r = 1; + goto __pyx_L0; + + /* "src/lxml/apihelpers.pxi":1376 + * lptr = s + * while lptr < end: + * if lptr[0] & non_ascii_mask: # <<<<<<<<<<<<<< + * return True + * lptr += 1 + */ + } + + /* "src/lxml/apihelpers.pxi":1378 + * if lptr[0] & non_ascii_mask: + * return True + * lptr += 1 # <<<<<<<<<<<<<< + * s = lptr + * + */ + __pyx_v_lptr = (__pyx_v_lptr + 1); + } + + /* "src/lxml/apihelpers.pxi":1379 + * return True + * lptr += 1 + * s = lptr # <<<<<<<<<<<<<< + * + * while s < (end + length % sizeof(unsigned long)): + */ + __pyx_v_s = ((const xmlChar *)__pyx_v_lptr); + + /* "src/lxml/apihelpers.pxi":1361 + * + * cdef const unsigned long *end = lptr + length // sizeof(unsigned long) + * if length >= sizeof(non_ascii_mask): # <<<<<<<<<<<<<< + * # Build constant 0x80808080... mask (and let the C compiler fold it). + * non_ascii_mask = 0 + */ + } + + /* "src/lxml/apihelpers.pxi":1381 + * s = lptr + * + * while s < (end + length % sizeof(unsigned long)): # <<<<<<<<<<<<<< + * if s[0] & 0x80: + * return True + */ + while (1) { + __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, 1381, __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":1382 + * + * while s < (end + length % sizeof(unsigned long)): + * if s[0] & 0x80: # <<<<<<<<<<<<<< + * return True + * s += 1 + */ + __pyx_t_2 = (((__pyx_v_s[0]) & 0x80) != 0); + if (__pyx_t_2) { + + /* "src/lxml/apihelpers.pxi":1383 + * while s < (end + length % sizeof(unsigned long)): + * if s[0] & 0x80: + * return True # <<<<<<<<<<<<<< + * s += 1 + * + */ + __pyx_r = 1; + goto __pyx_L0; + + /* "src/lxml/apihelpers.pxi":1382 + * + * while s < (end + length % sizeof(unsigned long)): + * if s[0] & 0x80: # <<<<<<<<<<<<<< + * return True + * s += 1 + */ + } + + /* "src/lxml/apihelpers.pxi":1384 + * if s[0] & 0x80: + * return True + * s += 1 # <<<<<<<<<<<<<< + * + * return False + */ + __pyx_v_s = (__pyx_v_s + 1); + } + + /* "src/lxml/apihelpers.pxi":1386 + * s += 1 + * + * return False # <<<<<<<<<<<<<< + * + * cdef int _is_valid_xml_ascii(bytes pystring): + */ + __pyx_r = 0; + goto __pyx_L0; + + /* "src/lxml/apihelpers.pxi":1352 + * return False + * + * cdef bint isutf8l(const_xmlChar* s, size_t length): # <<<<<<<<<<<<<< + * """ + * Search for non-ASCII characters in the string, knowing its length in advance. + */ + + /* function exit code */ __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.isutf8", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __Pyx_WriteUnraisable("lxml.etree.isutf8l", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1353 - * return 0 +/* "src/lxml/apihelpers.pxi":1388 + * return False * * cdef int _is_valid_xml_ascii(bytes pystring): # <<<<<<<<<<<<<< * """Check if a string is XML ascii content.""" @@ -34017,7 +32508,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_isutf8(const xmlChar *__pyx_v_s) { static int __pyx_f_4lxml_5etree__is_valid_xml_ascii(PyObject *__pyx_v_pystring) { signed char __pyx_v_ch; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; char *__pyx_t_2; @@ -34026,19 +32516,17 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_ascii(PyObject *__pyx_v_pystring) char *__pyx_t_5; int __pyx_t_6; __Pyx_RefNannySetupContext("_is_valid_xml_ascii", 0); - __Pyx_TraceCall("_is_valid_xml_ascii", __pyx_f[5], 1353, 0, __PYX_ERR(5, 1353, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1358 + /* "src/lxml/apihelpers.pxi":1393 * # When ch is a *signed* char, non-ascii characters are negative integers * # and xmlIsChar_ch does not accept them. * for ch in pystring: # <<<<<<<<<<<<<< * if not tree.xmlIsChar_ch(ch): * return 0 */ - __Pyx_TraceLine(1358,0,__PYX_ERR(5, 1358, __pyx_L1_error)) if (unlikely(__pyx_v_pystring == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable"); - __PYX_ERR(5, 1358, __pyx_L1_error) + __PYX_ERR(5, 1393, __pyx_L1_error) } __Pyx_INCREF(__pyx_v_pystring); __pyx_t_1 = __pyx_v_pystring; @@ -34048,30 +32536,28 @@ 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":1359 + /* "src/lxml/apihelpers.pxi":1394 * # and xmlIsChar_ch does not accept them. * for ch in pystring: * if not tree.xmlIsChar_ch(ch): # <<<<<<<<<<<<<< * return 0 * return 1 */ - __Pyx_TraceLine(1359,0,__PYX_ERR(5, 1359, __pyx_L1_error)) __pyx_t_6 = ((!(xmlIsChar_ch(__pyx_v_ch) != 0)) != 0); if (__pyx_t_6) { - /* "src/lxml/apihelpers.pxi":1360 + /* "src/lxml/apihelpers.pxi":1395 * for ch in pystring: * if not tree.xmlIsChar_ch(ch): * return 0 # <<<<<<<<<<<<<< * return 1 * */ - __Pyx_TraceLine(1360,0,__PYX_ERR(5, 1360, __pyx_L1_error)) __pyx_r = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1359 + /* "src/lxml/apihelpers.pxi":1394 * # and xmlIsChar_ch does not accept them. * for ch in pystring: * if not tree.xmlIsChar_ch(ch): # <<<<<<<<<<<<<< @@ -34082,19 +32568,18 @@ 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":1361 + /* "src/lxml/apihelpers.pxi":1396 * if not tree.xmlIsChar_ch(ch): * return 0 * return 1 # <<<<<<<<<<<<<< * * cdef bint _is_valid_xml_utf8(bytes pystring): */ - __Pyx_TraceLine(1361,0,__PYX_ERR(5, 1361, __pyx_L1_error)) __pyx_r = 1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1353 - * return 0 + /* "src/lxml/apihelpers.pxi":1388 + * return False * * cdef int _is_valid_xml_ascii(bytes pystring): # <<<<<<<<<<<<<< * """Check if a string is XML ascii content.""" @@ -34107,12 +32592,11 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_ascii(PyObject *__pyx_v_pystring) __Pyx_WriteUnraisable("lxml.etree._is_valid_xml_ascii", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1363 +/* "src/lxml/apihelpers.pxi":1398 * return 1 * * cdef bint _is_valid_xml_utf8(bytes pystring): # <<<<<<<<<<<<<< @@ -34125,71 +32609,64 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { const xmlChar *__pyx_v_c_end; unsigned long __pyx_v_next3; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("_is_valid_xml_utf8", 0); - __Pyx_TraceCall("_is_valid_xml_utf8", __pyx_f[5], 1363, 0, __PYX_ERR(5, 1363, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1365 + /* "src/lxml/apihelpers.pxi":1400 * 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) # <<<<<<<<<<<<<< * cdef const_xmlChar* c_end = s + len(pystring) * cdef unsigned long next3 = 0 */ - __Pyx_TraceLine(1365,0,__PYX_ERR(5, 1365, __pyx_L1_error)) __pyx_v_s = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_pystring); - /* "src/lxml/apihelpers.pxi":1366 + /* "src/lxml/apihelpers.pxi":1401 * 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) # <<<<<<<<<<<<<< * cdef unsigned long next3 = 0 * if s < c_end - 2: */ - __Pyx_TraceLine(1366,0,__PYX_ERR(5, 1366, __pyx_L1_error)) if (unlikely(__pyx_v_pystring == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(5, 1366, __pyx_L1_error) + __PYX_ERR(5, 1401, __pyx_L1_error) } - __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_pystring); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(5, 1366, __pyx_L1_error) + __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_pystring); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(5, 1401, __pyx_L1_error) __pyx_v_c_end = (__pyx_v_s + __pyx_t_1); - /* "src/lxml/apihelpers.pxi":1367 + /* "src/lxml/apihelpers.pxi":1402 * cdef const_xmlChar* s = _xcstr(pystring) * cdef const_xmlChar* c_end = s + len(pystring) * cdef unsigned long next3 = 0 # <<<<<<<<<<<<<< * if s < c_end - 2: * next3 = (s[0] << 8) | (s[1]) */ - __Pyx_TraceLine(1367,0,__PYX_ERR(5, 1367, __pyx_L1_error)) __pyx_v_next3 = 0; - /* "src/lxml/apihelpers.pxi":1368 + /* "src/lxml/apihelpers.pxi":1403 * cdef const_xmlChar* c_end = s + len(pystring) * cdef unsigned long next3 = 0 * if s < c_end - 2: # <<<<<<<<<<<<<< * next3 = (s[0] << 8) | (s[1]) * */ - __Pyx_TraceLine(1368,0,__PYX_ERR(5, 1368, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_s < (__pyx_v_c_end - 2)) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1369 + /* "src/lxml/apihelpers.pxi":1404 * cdef unsigned long next3 = 0 * if s < c_end - 2: * next3 = (s[0] << 8) | (s[1]) # <<<<<<<<<<<<<< * * while s < c_end - 2: */ - __Pyx_TraceLine(1369,0,__PYX_ERR(5, 1369, __pyx_L1_error)) __pyx_v_next3 = (((__pyx_v_s[0]) << 8) | (__pyx_v_s[1])); - /* "src/lxml/apihelpers.pxi":1368 + /* "src/lxml/apihelpers.pxi":1403 * cdef const_xmlChar* c_end = s + len(pystring) * cdef unsigned long next3 = 0 * if s < c_end - 2: # <<<<<<<<<<<<<< @@ -34198,63 +32675,58 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { */ } - /* "src/lxml/apihelpers.pxi":1371 + /* "src/lxml/apihelpers.pxi":1406 * next3 = (s[0] << 8) | (s[1]) * * while s < c_end - 2: # <<<<<<<<<<<<<< * next3 = 0x00ffffff & ((next3 << 8) | s[2]) * if s[0] & 0x80: */ - __Pyx_TraceLine(1371,0,__PYX_ERR(5, 1371, __pyx_L1_error)) while (1) { __pyx_t_2 = ((__pyx_v_s < (__pyx_v_c_end - 2)) != 0); if (!__pyx_t_2) break; - /* "src/lxml/apihelpers.pxi":1372 + /* "src/lxml/apihelpers.pxi":1407 * * while s < c_end - 2: * next3 = 0x00ffffff & ((next3 << 8) | s[2]) # <<<<<<<<<<<<<< * if s[0] & 0x80: * # 0xefbfbe and 0xefbfbf are utf-8 encodings of */ - __Pyx_TraceLine(1372,0,__PYX_ERR(5, 1372, __pyx_L1_error)) __pyx_v_next3 = (0x00ffffff & ((__pyx_v_next3 << 8) | (__pyx_v_s[2]))); - /* "src/lxml/apihelpers.pxi":1373 + /* "src/lxml/apihelpers.pxi":1408 * while s < c_end - 2: * next3 = 0x00ffffff & ((next3 << 8) | s[2]) * if s[0] & 0x80: # <<<<<<<<<<<<<< * # 0xefbfbe and 0xefbfbf are utf-8 encodings of * # forbidden characters \ufffe and \uffff */ - __Pyx_TraceLine(1373,0,__PYX_ERR(5, 1373, __pyx_L1_error)) __pyx_t_2 = (((__pyx_v_s[0]) & 0x80) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1376 + /* "src/lxml/apihelpers.pxi":1411 * # 0xefbfbe and 0xefbfbf are utf-8 encodings of * # forbidden characters \ufffe and \uffff * if next3 == 0x00efbfbe or next3 == 0x00efbfbf: # <<<<<<<<<<<<<< * return 0 * # 0xeda080 and 0xedbfbf are utf-8 encodings of */ - __Pyx_TraceLine(1376,0,__PYX_ERR(5, 1376, __pyx_L1_error)) switch (__pyx_v_next3) { case 0x00efbfbe: case 0x00efbfbf: - /* "src/lxml/apihelpers.pxi":1377 + /* "src/lxml/apihelpers.pxi":1412 * # forbidden characters \ufffe and \uffff * if next3 == 0x00efbfbe or next3 == 0x00efbfbf: * return 0 # <<<<<<<<<<<<<< * # 0xeda080 and 0xedbfbf are utf-8 encodings of * # \ud800 and \udfff. Anything between them (inclusive) */ - __Pyx_TraceLine(1377,0,__PYX_ERR(5, 1377, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1376 + /* "src/lxml/apihelpers.pxi":1411 * # 0xefbfbe and 0xefbfbf are utf-8 encodings of * # forbidden characters \ufffe and \uffff * if next3 == 0x00efbfbe or next3 == 0x00efbfbf: # <<<<<<<<<<<<<< @@ -34265,14 +32737,13 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { default: break; } - /* "src/lxml/apihelpers.pxi":1381 + /* "src/lxml/apihelpers.pxi":1416 * # \ud800 and \udfff. Anything between them (inclusive) * # is forbidden, because they are surrogate blocks in utf-16. * if 0x00eda080 <= next3 <= 0x00edbfbf: # <<<<<<<<<<<<<< * return 0 * elif not tree.xmlIsChar_ch(s[0]): */ - __Pyx_TraceLine(1381,0,__PYX_ERR(5, 1381, __pyx_L1_error)) __pyx_t_2 = (0x00eda080 <= __pyx_v_next3); if (__pyx_t_2) { __pyx_t_2 = (__pyx_v_next3 <= 0x00edbfbf); @@ -34280,18 +32751,17 @@ 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":1382 + /* "src/lxml/apihelpers.pxi":1417 * # is forbidden, because they are surrogate blocks in utf-16. * if 0x00eda080 <= next3 <= 0x00edbfbf: * return 0 # <<<<<<<<<<<<<< * elif not tree.xmlIsChar_ch(s[0]): * return 0 # invalid ascii char */ - __Pyx_TraceLine(1382,0,__PYX_ERR(5, 1382, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1381 + /* "src/lxml/apihelpers.pxi":1416 * # \ud800 and \udfff. Anything between them (inclusive) * # is forbidden, because they are surrogate blocks in utf-16. * if 0x00eda080 <= next3 <= 0x00edbfbf: # <<<<<<<<<<<<<< @@ -34300,7 +32770,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { */ } - /* "src/lxml/apihelpers.pxi":1373 + /* "src/lxml/apihelpers.pxi":1408 * while s < c_end - 2: * next3 = 0x00ffffff & ((next3 << 8) | s[2]) * if s[0] & 0x80: # <<<<<<<<<<<<<< @@ -34310,29 +32780,27 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { goto __pyx_L6; } - /* "src/lxml/apihelpers.pxi":1383 + /* "src/lxml/apihelpers.pxi":1418 * if 0x00eda080 <= next3 <= 0x00edbfbf: * return 0 * elif not tree.xmlIsChar_ch(s[0]): # <<<<<<<<<<<<<< * return 0 # invalid ascii char * s += 1 */ - __Pyx_TraceLine(1383,0,__PYX_ERR(5, 1383, __pyx_L1_error)) __pyx_t_3 = ((!(xmlIsChar_ch((__pyx_v_s[0])) != 0)) != 0); if (__pyx_t_3) { - /* "src/lxml/apihelpers.pxi":1384 + /* "src/lxml/apihelpers.pxi":1419 * return 0 * elif not tree.xmlIsChar_ch(s[0]): * return 0 # invalid ascii char # <<<<<<<<<<<<<< * s += 1 * */ - __Pyx_TraceLine(1384,0,__PYX_ERR(5, 1384, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1383 + /* "src/lxml/apihelpers.pxi":1418 * if 0x00eda080 <= next3 <= 0x00edbfbf: * return 0 * elif not tree.xmlIsChar_ch(s[0]): # <<<<<<<<<<<<<< @@ -34342,37 +32810,34 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { } __pyx_L6:; - /* "src/lxml/apihelpers.pxi":1385 + /* "src/lxml/apihelpers.pxi":1420 * elif not tree.xmlIsChar_ch(s[0]): * return 0 # invalid ascii char * s += 1 # <<<<<<<<<<<<<< * * while s < c_end: */ - __Pyx_TraceLine(1385,0,__PYX_ERR(5, 1385, __pyx_L1_error)) __pyx_v_s = (__pyx_v_s + 1); } - /* "src/lxml/apihelpers.pxi":1387 + /* "src/lxml/apihelpers.pxi":1422 * s += 1 * * while s < c_end: # <<<<<<<<<<<<<< * if not s[0] & 0x80 and not tree.xmlIsChar_ch(s[0]): * return 0 # invalid ascii char */ - __Pyx_TraceLine(1387,0,__PYX_ERR(5, 1387, __pyx_L1_error)) while (1) { __pyx_t_3 = ((__pyx_v_s < __pyx_v_c_end) != 0); if (!__pyx_t_3) break; - /* "src/lxml/apihelpers.pxi":1388 + /* "src/lxml/apihelpers.pxi":1423 * * while s < c_end: * if not s[0] & 0x80 and not tree.xmlIsChar_ch(s[0]): # <<<<<<<<<<<<<< * return 0 # invalid ascii char * s += 1 */ - __Pyx_TraceLine(1388,0,__PYX_ERR(5, 1388, __pyx_L1_error)) __pyx_t_2 = ((!(((__pyx_v_s[0]) & 0x80) != 0)) != 0); if (__pyx_t_2) { } else { @@ -34384,18 +32849,17 @@ 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":1389 + /* "src/lxml/apihelpers.pxi":1424 * while s < c_end: * if not s[0] & 0x80 and not tree.xmlIsChar_ch(s[0]): * return 0 # invalid ascii char # <<<<<<<<<<<<<< * s += 1 * */ - __Pyx_TraceLine(1389,0,__PYX_ERR(5, 1389, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1388 + /* "src/lxml/apihelpers.pxi":1423 * * while s < c_end: * if not s[0] & 0x80 and not tree.xmlIsChar_ch(s[0]): # <<<<<<<<<<<<<< @@ -34404,29 +32868,27 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { */ } - /* "src/lxml/apihelpers.pxi":1390 + /* "src/lxml/apihelpers.pxi":1425 * if not s[0] & 0x80 and not tree.xmlIsChar_ch(s[0]): * return 0 # invalid ascii char * s += 1 # <<<<<<<<<<<<<< * * return 1 */ - __Pyx_TraceLine(1390,0,__PYX_ERR(5, 1390, __pyx_L1_error)) __pyx_v_s = (__pyx_v_s + 1); } - /* "src/lxml/apihelpers.pxi":1392 + /* "src/lxml/apihelpers.pxi":1427 * s += 1 * * return 1 # <<<<<<<<<<<<<< * * cdef inline object funicodeOrNone(const_xmlChar* s): */ - __Pyx_TraceLine(1392,0,__PYX_ERR(5, 1392, __pyx_L1_error)) __pyx_r = 1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1363 + /* "src/lxml/apihelpers.pxi":1398 * return 1 * * cdef bint _is_valid_xml_utf8(bytes pystring): # <<<<<<<<<<<<<< @@ -34439,12 +32901,11 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { __Pyx_WriteUnraisable("lxml.etree._is_valid_xml_utf8", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1394 +/* "src/lxml/apihelpers.pxi":1429 * return 1 * * cdef inline object funicodeOrNone(const_xmlChar* s): # <<<<<<<<<<<<<< @@ -34454,24 +32915,21 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree_funicodeOrNone(const xmlChar *__pyx_v_s) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("funicodeOrNone", 0); - __Pyx_TraceCall("funicodeOrNone", __pyx_f[5], 1394, 0, __PYX_ERR(5, 1394, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1395 + /* "src/lxml/apihelpers.pxi":1430 * * cdef inline object funicodeOrNone(const_xmlChar* s): * return funicode(s) if s is not NULL else None # <<<<<<<<<<<<<< * * cdef inline object funicodeOrEmpty(const_xmlChar* s): */ - __Pyx_TraceLine(1395,0,__PYX_ERR(5, 1395, __pyx_L1_error)) __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, 1395, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; @@ -34483,7 +32941,7 @@ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree_funicodeOrNone(const xmlChar __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1394 + /* "src/lxml/apihelpers.pxi":1429 * return 1 * * cdef inline object funicodeOrNone(const_xmlChar* s): # <<<<<<<<<<<<<< @@ -34499,12 +32957,11 @@ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree_funicodeOrNone(const xmlChar __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1397 +/* "src/lxml/apihelpers.pxi":1432 * return funicode(s) if s is not NULL else None * * cdef inline object funicodeOrEmpty(const_xmlChar* s): # <<<<<<<<<<<<<< @@ -34514,36 +32971,33 @@ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree_funicodeOrNone(const xmlChar static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree_funicodeOrEmpty(const xmlChar *__pyx_v_s) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("funicodeOrEmpty", 0); - __Pyx_TraceCall("funicodeOrEmpty", __pyx_f[5], 1397, 0, __PYX_ERR(5, 1397, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1398 + /* "src/lxml/apihelpers.pxi":1433 * * cdef inline object funicodeOrEmpty(const_xmlChar* s): * return funicode(s) if s is not NULL else '' # <<<<<<<<<<<<<< * * cdef object funicode(const_xmlChar* s): */ - __Pyx_TraceLine(1398,0,__PYX_ERR(5, 1398, __pyx_L1_error)) __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, 1398, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; } else { - __Pyx_INCREF(__pyx_kp_s__23); - __pyx_t_1 = __pyx_kp_s__23; + __Pyx_INCREF(__pyx_kp_s__11); + __pyx_t_1 = __pyx_kp_s__11; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1397 + /* "src/lxml/apihelpers.pxi":1432 * return funicode(s) if s is not NULL else None * * cdef inline object funicodeOrEmpty(const_xmlChar* s): # <<<<<<<<<<<<<< @@ -34559,12 +33013,11 @@ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree_funicodeOrEmpty(const xmlCha __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1400 +/* "src/lxml/apihelpers.pxi":1435 * return funicode(s) if s is not NULL else '' * * cdef object funicode(const_xmlChar* s): # <<<<<<<<<<<<<< @@ -34577,40 +33030,36 @@ static PyObject *__pyx_f_4lxml_5etree_funicode(const xmlChar *__pyx_v_s) { const xmlChar *__pyx_v_spos; int __pyx_v_is_non_ascii; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("funicode", 0); - __Pyx_TraceCall("funicode", __pyx_f[5], 1400, 0, __PYX_ERR(5, 1400, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1404 + /* "src/lxml/apihelpers.pxi":1439 * cdef const_xmlChar* spos * cdef bint is_non_ascii * if python.LXML_UNICODE_STRINGS: # <<<<<<<<<<<<<< * return s.decode('UTF-8') * spos = s */ - __Pyx_TraceLine(1404,0,__PYX_ERR(5, 1404, __pyx_L1_error)) __pyx_t_1 = (LXML_UNICODE_STRINGS != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1405 + /* "src/lxml/apihelpers.pxi":1440 * cdef bint is_non_ascii * if python.LXML_UNICODE_STRINGS: * return s.decode('UTF-8') # <<<<<<<<<<<<<< * spos = s * is_non_ascii = 0 */ - __Pyx_TraceLine(1405,0,__PYX_ERR(5, 1405, __pyx_L1_error)) __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, 1405, __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, 1440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1404 + /* "src/lxml/apihelpers.pxi":1439 * cdef const_xmlChar* spos * cdef bint is_non_ascii * if python.LXML_UNICODE_STRINGS: # <<<<<<<<<<<<<< @@ -34619,70 +33068,64 @@ static PyObject *__pyx_f_4lxml_5etree_funicode(const xmlChar *__pyx_v_s) { */ } - /* "src/lxml/apihelpers.pxi":1406 + /* "src/lxml/apihelpers.pxi":1441 * if python.LXML_UNICODE_STRINGS: * return s.decode('UTF-8') * spos = s # <<<<<<<<<<<<<< * is_non_ascii = 0 * while spos[0] != c'\0': */ - __Pyx_TraceLine(1406,0,__PYX_ERR(5, 1406, __pyx_L1_error)) __pyx_v_spos = __pyx_v_s; - /* "src/lxml/apihelpers.pxi":1407 + /* "src/lxml/apihelpers.pxi":1442 * return s.decode('UTF-8') * spos = s * is_non_ascii = 0 # <<<<<<<<<<<<<< * while spos[0] != c'\0': * if spos[0] & 0x80: */ - __Pyx_TraceLine(1407,0,__PYX_ERR(5, 1407, __pyx_L1_error)) __pyx_v_is_non_ascii = 0; - /* "src/lxml/apihelpers.pxi":1408 + /* "src/lxml/apihelpers.pxi":1443 * spos = s * is_non_ascii = 0 * while spos[0] != c'\0': # <<<<<<<<<<<<<< * if spos[0] & 0x80: * is_non_ascii = 1 */ - __Pyx_TraceLine(1408,0,__PYX_ERR(5, 1408, __pyx_L1_error)) while (1) { __pyx_t_1 = (((__pyx_v_spos[0]) != '\x00') != 0); if (!__pyx_t_1) break; - /* "src/lxml/apihelpers.pxi":1409 + /* "src/lxml/apihelpers.pxi":1444 * is_non_ascii = 0 * while spos[0] != c'\0': * if spos[0] & 0x80: # <<<<<<<<<<<<<< * is_non_ascii = 1 * break */ - __Pyx_TraceLine(1409,0,__PYX_ERR(5, 1409, __pyx_L1_error)) __pyx_t_1 = (((__pyx_v_spos[0]) & 0x80) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1410 + /* "src/lxml/apihelpers.pxi":1445 * while spos[0] != c'\0': * if spos[0] & 0x80: * is_non_ascii = 1 # <<<<<<<<<<<<<< * break * spos += 1 */ - __Pyx_TraceLine(1410,0,__PYX_ERR(5, 1410, __pyx_L1_error)) __pyx_v_is_non_ascii = 1; - /* "src/lxml/apihelpers.pxi":1411 + /* "src/lxml/apihelpers.pxi":1446 * if spos[0] & 0x80: * is_non_ascii = 1 * break # <<<<<<<<<<<<<< * spos += 1 * slen = spos - s */ - __Pyx_TraceLine(1411,0,__PYX_ERR(5, 1411, __pyx_L1_error)) goto __pyx_L5_break; - /* "src/lxml/apihelpers.pxi":1409 + /* "src/lxml/apihelpers.pxi":1444 * is_non_ascii = 0 * while spos[0] != c'\0': * if spos[0] & 0x80: # <<<<<<<<<<<<<< @@ -34691,110 +33134,103 @@ static PyObject *__pyx_f_4lxml_5etree_funicode(const xmlChar *__pyx_v_s) { */ } - /* "src/lxml/apihelpers.pxi":1412 + /* "src/lxml/apihelpers.pxi":1447 * is_non_ascii = 1 * break * spos += 1 # <<<<<<<<<<<<<< * slen = spos - s * if spos[0] != c'\0': */ - __Pyx_TraceLine(1412,0,__PYX_ERR(5, 1412, __pyx_L1_error)) __pyx_v_spos = (__pyx_v_spos + 1); } __pyx_L5_break:; - /* "src/lxml/apihelpers.pxi":1413 + /* "src/lxml/apihelpers.pxi":1448 * break * spos += 1 * slen = spos - s # <<<<<<<<<<<<<< * if spos[0] != c'\0': - * slen += tree.xmlStrlen(spos) + * slen += cstring_h.strlen( spos) */ - __Pyx_TraceLine(1413,0,__PYX_ERR(5, 1413, __pyx_L1_error)) __pyx_v_slen = (__pyx_v_spos - __pyx_v_s); - /* "src/lxml/apihelpers.pxi":1414 + /* "src/lxml/apihelpers.pxi":1449 * spos += 1 * slen = spos - s * if spos[0] != c'\0': # <<<<<<<<<<<<<< - * slen += tree.xmlStrlen(spos) + * slen += cstring_h.strlen( spos) * if is_non_ascii: */ - __Pyx_TraceLine(1414,0,__PYX_ERR(5, 1414, __pyx_L1_error)) __pyx_t_1 = (((__pyx_v_spos[0]) != '\x00') != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1415 + /* "src/lxml/apihelpers.pxi":1450 * slen = spos - s * if spos[0] != c'\0': - * slen += tree.xmlStrlen(spos) # <<<<<<<<<<<<<< + * slen += cstring_h.strlen( spos) # <<<<<<<<<<<<<< * if is_non_ascii: * return s[:slen].decode('UTF-8') */ - __Pyx_TraceLine(1415,0,__PYX_ERR(5, 1415, __pyx_L1_error)) - __pyx_v_slen = (__pyx_v_slen + xmlStrlen(__pyx_v_spos)); + __pyx_v_slen = (__pyx_v_slen + strlen(((char const *)__pyx_v_spos))); - /* "src/lxml/apihelpers.pxi":1414 + /* "src/lxml/apihelpers.pxi":1449 * spos += 1 * slen = spos - s * if spos[0] != c'\0': # <<<<<<<<<<<<<< - * slen += tree.xmlStrlen(spos) + * slen += cstring_h.strlen( spos) * if is_non_ascii: */ } - /* "src/lxml/apihelpers.pxi":1416 + /* "src/lxml/apihelpers.pxi":1451 * if spos[0] != c'\0': - * slen += tree.xmlStrlen(spos) + * slen += cstring_h.strlen( spos) * if is_non_ascii: # <<<<<<<<<<<<<< * return s[:slen].decode('UTF-8') * return s[:slen] */ - __Pyx_TraceLine(1416,0,__PYX_ERR(5, 1416, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_is_non_ascii != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1417 - * slen += tree.xmlStrlen(spos) + /* "src/lxml/apihelpers.pxi":1452 + * slen += cstring_h.strlen( spos) * if is_non_ascii: * return s[:slen].decode('UTF-8') # <<<<<<<<<<<<<< * return s[:slen] * */ - __Pyx_TraceLine(1417,0,__PYX_ERR(5, 1417, __pyx_L1_error)) __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, 1417, __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, 1452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1416 + /* "src/lxml/apihelpers.pxi":1451 * if spos[0] != c'\0': - * slen += tree.xmlStrlen(spos) + * slen += cstring_h.strlen( spos) * if is_non_ascii: # <<<<<<<<<<<<<< * return s[:slen].decode('UTF-8') * return s[:slen] */ } - /* "src/lxml/apihelpers.pxi":1418 + /* "src/lxml/apihelpers.pxi":1453 * if is_non_ascii: * return s[:slen].decode('UTF-8') * return s[:slen] # <<<<<<<<<<<<<< * * cdef bytes _utf8(object s): */ - __Pyx_TraceLine(1418,0,__PYX_ERR(5, 1418, __pyx_L1_error)) __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, 1418, __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, 1453, __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":1400 + /* "src/lxml/apihelpers.pxi":1435 * return funicode(s) if s is not NULL else '' * * cdef object funicode(const_xmlChar* s): # <<<<<<<<<<<<<< @@ -34809,12 +33245,11 @@ static PyObject *__pyx_f_4lxml_5etree_funicode(const xmlChar *__pyx_v_s) { __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1420 +/* "src/lxml/apihelpers.pxi":1455 * return s[:slen] * * cdef bytes _utf8(object s): # <<<<<<<<<<<<<< @@ -34826,7 +33261,6 @@ static PyObject *__pyx_f_4lxml_5etree__utf8(PyObject *__pyx_v_s) { int __pyx_v_valid; PyObject *__pyx_v_utf8_string = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -34834,16 +33268,14 @@ static PyObject *__pyx_f_4lxml_5etree__utf8(PyObject *__pyx_v_s) { PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_utf8", 0); - __Pyx_TraceCall("_utf8", __pyx_f[5], 1420, 0, __PYX_ERR(5, 1420, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1427 + /* "src/lxml/apihelpers.pxi":1462 * cdef int valid * cdef bytes utf8_string * if python.IS_PYTHON2 and type(s) is bytes: # <<<<<<<<<<<<<< * utf8_string = s * valid = _is_valid_xml_ascii(utf8_string) */ - __Pyx_TraceLine(1427,0,__PYX_ERR(5, 1427, __pyx_L1_error)) __pyx_t_2 = (IS_PYTHON2 != 0); if (__pyx_t_2) { } else { @@ -34856,30 +33288,28 @@ static PyObject *__pyx_f_4lxml_5etree__utf8(PyObject *__pyx_v_s) { __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1428 + /* "src/lxml/apihelpers.pxi":1463 * cdef bytes utf8_string * if python.IS_PYTHON2 and type(s) is bytes: * utf8_string = s # <<<<<<<<<<<<<< * valid = _is_valid_xml_ascii(utf8_string) * elif isinstance(s, unicode): */ - __Pyx_TraceLine(1428,0,__PYX_ERR(5, 1428, __pyx_L1_error)) __pyx_t_4 = __pyx_v_s; __Pyx_INCREF(__pyx_t_4); __pyx_v_utf8_string = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1429 + /* "src/lxml/apihelpers.pxi":1464 * if python.IS_PYTHON2 and type(s) is bytes: * utf8_string = s * valid = _is_valid_xml_ascii(utf8_string) # <<<<<<<<<<<<<< * elif isinstance(s, unicode): * utf8_string = (s).encode('utf8') */ - __Pyx_TraceLine(1429,0,__PYX_ERR(5, 1429, __pyx_L1_error)) __pyx_v_valid = __pyx_f_4lxml_5etree__is_valid_xml_ascii(__pyx_v_utf8_string); - /* "src/lxml/apihelpers.pxi":1427 + /* "src/lxml/apihelpers.pxi":1462 * cdef int valid * cdef bytes utf8_string * if python.IS_PYTHON2 and type(s) is bytes: # <<<<<<<<<<<<<< @@ -34889,46 +33319,43 @@ static PyObject *__pyx_f_4lxml_5etree__utf8(PyObject *__pyx_v_s) { goto __pyx_L3; } - /* "src/lxml/apihelpers.pxi":1430 + /* "src/lxml/apihelpers.pxi":1465 * utf8_string = s * valid = _is_valid_xml_ascii(utf8_string) * elif isinstance(s, unicode): # <<<<<<<<<<<<<< * utf8_string = (s).encode('utf8') * valid = _is_valid_xml_utf8(utf8_string) */ - __Pyx_TraceLine(1430,0,__PYX_ERR(5, 1430, __pyx_L1_error)) __pyx_t_1 = PyUnicode_Check(__pyx_v_s); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { - /* "src/lxml/apihelpers.pxi":1431 + /* "src/lxml/apihelpers.pxi":1466 * valid = _is_valid_xml_ascii(utf8_string) * elif isinstance(s, unicode): * utf8_string = (s).encode('utf8') # <<<<<<<<<<<<<< * valid = _is_valid_xml_utf8(utf8_string) * elif isinstance(s, (bytes, bytearray)): */ - __Pyx_TraceLine(1431,0,__PYX_ERR(5, 1431, __pyx_L1_error)) if (unlikely(__pyx_v_s == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode"); - __PYX_ERR(5, 1431, __pyx_L1_error) + __PYX_ERR(5, 1466, __pyx_L1_error) } - __pyx_t_4 = PyUnicode_AsUTF8String(((PyObject*)__pyx_v_s)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1431, __pyx_L1_error) + __pyx_t_4 = PyUnicode_AsUTF8String(((PyObject*)__pyx_v_s)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_utf8_string = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1432 + /* "src/lxml/apihelpers.pxi":1467 * elif isinstance(s, unicode): * utf8_string = (s).encode('utf8') * valid = _is_valid_xml_utf8(utf8_string) # <<<<<<<<<<<<<< * elif isinstance(s, (bytes, bytearray)): * utf8_string = bytes(s) */ - __Pyx_TraceLine(1432,0,__PYX_ERR(5, 1432, __pyx_L1_error)) __pyx_v_valid = __pyx_f_4lxml_5etree__is_valid_xml_utf8(__pyx_v_utf8_string); - /* "src/lxml/apihelpers.pxi":1430 + /* "src/lxml/apihelpers.pxi":1465 * utf8_string = s * valid = _is_valid_xml_ascii(utf8_string) * elif isinstance(s, unicode): # <<<<<<<<<<<<<< @@ -34938,14 +33365,13 @@ static PyObject *__pyx_f_4lxml_5etree__utf8(PyObject *__pyx_v_s) { goto __pyx_L3; } - /* "src/lxml/apihelpers.pxi":1433 + /* "src/lxml/apihelpers.pxi":1468 * utf8_string = (s).encode('utf8') * valid = _is_valid_xml_utf8(utf8_string) * elif isinstance(s, (bytes, bytearray)): # <<<<<<<<<<<<<< * utf8_string = bytes(s) * valid = _is_valid_xml_ascii(utf8_string) */ - __Pyx_TraceLine(1433,0,__PYX_ERR(5, 1433, __pyx_L1_error)) __pyx_t_1 = PyBytes_Check(__pyx_v_s); __pyx_t_2 = (__pyx_t_1 != 0); if (!__pyx_t_2) { @@ -34960,30 +33386,28 @@ 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":1434 + /* "src/lxml/apihelpers.pxi":1469 * 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_TraceLine(1434,0,__PYX_ERR(5, 1434, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_s); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1434, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_s); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_utf8_string = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1435 + /* "src/lxml/apihelpers.pxi":1470 * elif isinstance(s, (bytes, bytearray)): * utf8_string = bytes(s) * valid = _is_valid_xml_ascii(utf8_string) # <<<<<<<<<<<<<< * else: * raise TypeError("Argument must be bytes or unicode, got '%.200s'" % type(s).__name__) */ - __Pyx_TraceLine(1435,0,__PYX_ERR(5, 1435, __pyx_L1_error)) __pyx_v_valid = __pyx_f_4lxml_5etree__is_valid_xml_ascii(__pyx_v_utf8_string); - /* "src/lxml/apihelpers.pxi":1433 + /* "src/lxml/apihelpers.pxi":1468 * utf8_string = (s).encode('utf8') * valid = _is_valid_xml_utf8(utf8_string) * elif isinstance(s, (bytes, bytearray)): # <<<<<<<<<<<<<< @@ -34993,55 +33417,52 @@ static PyObject *__pyx_f_4lxml_5etree__utf8(PyObject *__pyx_v_s) { goto __pyx_L3; } - /* "src/lxml/apihelpers.pxi":1437 + /* "src/lxml/apihelpers.pxi":1472 * valid = _is_valid_xml_ascii(utf8_string) * else: * raise TypeError("Argument must be bytes or unicode, got '%.200s'" % type(s).__name__) # <<<<<<<<<<<<<< * if not valid: * raise ValueError( */ - __Pyx_TraceLine(1437,0,__PYX_ERR(5, 1437, __pyx_L1_error)) /*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, 1437, __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, 1472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Argument_must_be_bytes_or_unicod, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1437, __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, 1472, __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, 1437, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1472, __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, 1437, __pyx_L1_error) + __PYX_ERR(5, 1472, __pyx_L1_error) } __pyx_L3:; - /* "src/lxml/apihelpers.pxi":1438 + /* "src/lxml/apihelpers.pxi":1473 * else: * 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") */ - __Pyx_TraceLine(1438,0,__PYX_ERR(5, 1438, __pyx_L1_error)) __pyx_t_1 = ((!(__pyx_v_valid != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "src/lxml/apihelpers.pxi":1439 + /* "src/lxml/apihelpers.pxi":1474 * 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_TraceLine(1439,0,__PYX_ERR(5, 1439, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1439, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1474, __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, 1439, __pyx_L1_error) + __PYX_ERR(5, 1474, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1438 + /* "src/lxml/apihelpers.pxi":1473 * else: * raise TypeError("Argument must be bytes or unicode, got '%.200s'" % type(s).__name__) * if not valid: # <<<<<<<<<<<<<< @@ -35050,20 +33471,19 @@ static PyObject *__pyx_f_4lxml_5etree__utf8(PyObject *__pyx_v_s) { */ } - /* "src/lxml/apihelpers.pxi":1441 + /* "src/lxml/apihelpers.pxi":1476 * raise ValueError( * "All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters") * return utf8_string # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(1441,0,__PYX_ERR(5, 1441, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_utf8_string); __pyx_r = __pyx_v_utf8_string; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1420 + /* "src/lxml/apihelpers.pxi":1455 * return s[:slen] * * cdef bytes _utf8(object s): # <<<<<<<<<<<<<< @@ -35080,12 +33500,11 @@ static PyObject *__pyx_f_4lxml_5etree__utf8(PyObject *__pyx_v_s) { __pyx_L0:; __Pyx_XDECREF(__pyx_v_utf8_string); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1444 +/* "src/lxml/apihelpers.pxi":1479 * * * cdef bytes _utf8orNone(object s): # <<<<<<<<<<<<<< @@ -35095,26 +33514,23 @@ static PyObject *__pyx_f_4lxml_5etree__utf8(PyObject *__pyx_v_s) { static PyObject *__pyx_f_4lxml_5etree__utf8orNone(PyObject *__pyx_v_s) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_utf8orNone", 0); - __Pyx_TraceCall("_utf8orNone", __pyx_f[5], 1444, 0, __PYX_ERR(5, 1444, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1445 + /* "src/lxml/apihelpers.pxi":1480 * * cdef bytes _utf8orNone(object s): * return _utf8(s) if s is not None else None # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(1445,0,__PYX_ERR(5, 1445, __pyx_L1_error)) __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, 1445, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_s); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; @@ -35126,7 +33542,7 @@ static PyObject *__pyx_f_4lxml_5etree__utf8orNone(PyObject *__pyx_v_s) { __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1444 + /* "src/lxml/apihelpers.pxi":1479 * * * cdef bytes _utf8orNone(object s): # <<<<<<<<<<<<<< @@ -35142,12 +33558,11 @@ static PyObject *__pyx_f_4lxml_5etree__utf8orNone(PyObject *__pyx_v_s) { __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1448 +/* "src/lxml/apihelpers.pxi":1483 * * * cdef strrepr(s): # <<<<<<<<<<<<<< @@ -35157,31 +33572,41 @@ static PyObject *__pyx_f_4lxml_5etree__utf8orNone(PyObject *__pyx_v_s) { static PyObject *__pyx_f_4lxml_5etree_strrepr(PyObject *__pyx_v_s) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("strrepr", 0); - __Pyx_TraceCall("strrepr", __pyx_f[5], 1448, 0, __PYX_ERR(5, 1448, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1452 + /* "src/lxml/apihelpers.pxi":1487 * methods, e.g. _Element.__repr__(). * """ * return s.encode('unicode-escape') if python.IS_PYTHON2 else s # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(1452,0,__PYX_ERR(5, 1452, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); if ((IS_PYTHON2 != 0)) { - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1452, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1452, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_1 = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __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, 1487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __pyx_t_2; + __pyx_t_2 = 0; } else { __Pyx_INCREF(__pyx_v_s); __pyx_t_1 = __pyx_v_s; @@ -35190,7 +33615,7 @@ static PyObject *__pyx_f_4lxml_5etree_strrepr(PyObject *__pyx_v_s) { __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1448 + /* "src/lxml/apihelpers.pxi":1483 * * * cdef strrepr(s): # <<<<<<<<<<<<<< @@ -35203,16 +33628,16 @@ static PyObject *__pyx_f_4lxml_5etree_strrepr(PyObject *__pyx_v_s) { __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("lxml.etree.strrepr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1455 +/* "src/lxml/apihelpers.pxi":1490 * * * cdef bint _isFilePath(const_xmlChar* c_path): # <<<<<<<<<<<<<< @@ -35222,37 +33647,33 @@ static PyObject *__pyx_f_4lxml_5etree_strrepr(PyObject *__pyx_v_s) { static int __pyx_f_4lxml_5etree__isFilePath(const xmlChar *__pyx_v_c_path) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("_isFilePath", 0); - __Pyx_TraceCall("_isFilePath", __pyx_f[5], 1455, 0, __PYX_ERR(5, 1455, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1459 + /* "src/lxml/apihelpers.pxi":1494 * cdef xmlChar c * # test if it looks like an absolute Unix path or a Windows network path * if c_path[0] == c'/': # <<<<<<<<<<<<<< * return 1 * */ - __Pyx_TraceLine(1459,0,__PYX_ERR(5, 1459, __pyx_L1_error)) __pyx_t_1 = (((__pyx_v_c_path[0]) == '/') != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1460 + /* "src/lxml/apihelpers.pxi":1495 * # test if it looks like an absolute Unix path or a Windows network path * if c_path[0] == c'/': * return 1 # <<<<<<<<<<<<<< * * # test if it looks like an absolute Windows path or URL */ - __Pyx_TraceLine(1460,0,__PYX_ERR(5, 1460, __pyx_L1_error)) __pyx_r = 1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1459 + /* "src/lxml/apihelpers.pxi":1494 * cdef xmlChar c * # test if it looks like an absolute Unix path or a Windows network path * if c_path[0] == c'/': # <<<<<<<<<<<<<< @@ -35261,14 +33682,13 @@ static int __pyx_f_4lxml_5etree__isFilePath(const xmlChar *__pyx_v_c_path) { */ } - /* "src/lxml/apihelpers.pxi":1463 + /* "src/lxml/apihelpers.pxi":1498 * * # 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 * if c_path[0] == c':' and c_path[1] in b'\0\\': */ - __Pyx_TraceLine(1463,0,__PYX_ERR(5, 1463, __pyx_L1_error)) __pyx_t_2 = ('a' <= (__pyx_v_c_path[0])); if (__pyx_t_2) { __pyx_t_2 = ((__pyx_v_c_path[0]) <= 'z'); @@ -35288,24 +33708,22 @@ 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":1464 + /* "src/lxml/apihelpers.pxi":1499 * # 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 # <<<<<<<<<<<<<< * if c_path[0] == c':' and c_path[1] in b'\0\\': * return 1 # C: or C:\... */ - __Pyx_TraceLine(1464,0,__PYX_ERR(5, 1464, __pyx_L1_error)) __pyx_v_c_path = (__pyx_v_c_path + 1); - /* "src/lxml/apihelpers.pxi":1465 + /* "src/lxml/apihelpers.pxi":1500 * 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\\': # <<<<<<<<<<<<<< * return 1 # C: or C:\... * */ - __Pyx_TraceLine(1465,0,__PYX_ERR(5, 1465, __pyx_L1_error)) __pyx_t_2 = (((__pyx_v_c_path[0]) == ':') != 0); if (__pyx_t_2) { } else { @@ -35326,18 +33744,17 @@ 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":1466 + /* "src/lxml/apihelpers.pxi":1501 * c_path += 1 * if c_path[0] == c':' and c_path[1] in b'\0\\': * return 1 # C: or C:\... # <<<<<<<<<<<<<< * * # test if it looks like a URL with scheme:// */ - __Pyx_TraceLine(1466,0,__PYX_ERR(5, 1466, __pyx_L1_error)) __pyx_r = 1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1465 + /* "src/lxml/apihelpers.pxi":1500 * 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\\': # <<<<<<<<<<<<<< @@ -35346,14 +33763,13 @@ static int __pyx_f_4lxml_5etree__isFilePath(const xmlChar *__pyx_v_c_path) { */ } - /* "src/lxml/apihelpers.pxi":1469 + /* "src/lxml/apihelpers.pxi":1504 * * # 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 * if c_path[0] == c':' and c_path[1] == c'/' and c_path[2] == c'/': */ - __Pyx_TraceLine(1469,0,__PYX_ERR(5, 1469, __pyx_L1_error)) while (1) { __pyx_t_3 = ('a' <= (__pyx_v_c_path[0])); if (__pyx_t_3) { @@ -35374,25 +33790,23 @@ 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":1470 + /* "src/lxml/apihelpers.pxi":1505 * # 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 # <<<<<<<<<<<<<< * if c_path[0] == c':' and c_path[1] == c'/' and c_path[2] == c'/': * return 0 */ - __Pyx_TraceLine(1470,0,__PYX_ERR(5, 1470, __pyx_L1_error)) __pyx_v_c_path = (__pyx_v_c_path + 1); } - /* "src/lxml/apihelpers.pxi":1471 + /* "src/lxml/apihelpers.pxi":1506 * 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'/': # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(1471,0,__PYX_ERR(5, 1471, __pyx_L1_error)) __pyx_t_3 = (((__pyx_v_c_path[0]) == ':') != 0); if (__pyx_t_3) { } else { @@ -35410,18 +33824,17 @@ 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":1472 + /* "src/lxml/apihelpers.pxi":1507 * c_path += 1 * if c_path[0] == c':' and c_path[1] == c'/' and c_path[2] == c'/': * return 0 # <<<<<<<<<<<<<< * * # assume it's a relative path */ - __Pyx_TraceLine(1472,0,__PYX_ERR(5, 1472, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1471 + /* "src/lxml/apihelpers.pxi":1506 * 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'/': # <<<<<<<<<<<<<< @@ -35430,7 +33843,7 @@ static int __pyx_f_4lxml_5etree__isFilePath(const xmlChar *__pyx_v_c_path) { */ } - /* "src/lxml/apihelpers.pxi":1463 + /* "src/lxml/apihelpers.pxi":1498 * * # 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': # <<<<<<<<<<<<<< @@ -35439,18 +33852,17 @@ static int __pyx_f_4lxml_5etree__isFilePath(const xmlChar *__pyx_v_c_path) { */ } - /* "src/lxml/apihelpers.pxi":1475 + /* "src/lxml/apihelpers.pxi":1510 * * # assume it's a relative path * return 1 # <<<<<<<<<<<<<< * * cdef object _encodeFilename(object filename): */ - __Pyx_TraceLine(1475,0,__PYX_ERR(5, 1475, __pyx_L1_error)) __pyx_r = 1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1455 + /* "src/lxml/apihelpers.pxi":1490 * * * cdef bint _isFilePath(const_xmlChar* c_path): # <<<<<<<<<<<<<< @@ -35459,16 +33871,12 @@ static int __pyx_f_4lxml_5etree__isFilePath(const xmlChar *__pyx_v_c_path) { */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._isFilePath", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1477 +/* "src/lxml/apihelpers.pxi":1512 * return 1 * * cdef object _encodeFilename(object filename): # <<<<<<<<<<<<<< @@ -35479,7 +33887,6 @@ static int __pyx_f_4lxml_5etree__isFilePath(const xmlChar *__pyx_v_c_path) { static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename) { PyObject *__pyx_v_filename8 = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -35490,33 +33897,30 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename PyObject *__pyx_t_7 = NULL; int __pyx_t_8; __Pyx_RefNannySetupContext("_encodeFilename", 0); - __Pyx_TraceCall("_encodeFilename", __pyx_f[5], 1477, 0, __PYX_ERR(5, 1477, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1480 + /* "src/lxml/apihelpers.pxi":1515 * u"""Make sure a filename is 8-bit encoded (or None). * """ * if filename is None: # <<<<<<<<<<<<<< * return None * elif isinstance(filename, bytes): */ - __Pyx_TraceLine(1480,0,__PYX_ERR(5, 1480, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_filename == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1481 + /* "src/lxml/apihelpers.pxi":1516 * """ * if filename is None: * return None # <<<<<<<<<<<<<< * elif isinstance(filename, bytes): * return filename */ - __Pyx_TraceLine(1481,0,__PYX_ERR(5, 1481, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1480 + /* "src/lxml/apihelpers.pxi":1515 * u"""Make sure a filename is 8-bit encoded (or None). * """ * if filename is None: # <<<<<<<<<<<<<< @@ -35525,32 +33929,30 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename */ } - /* "src/lxml/apihelpers.pxi":1482 + /* "src/lxml/apihelpers.pxi":1517 * if filename is None: * return None * elif isinstance(filename, bytes): # <<<<<<<<<<<<<< * return filename * elif isinstance(filename, unicode): */ - __Pyx_TraceLine(1482,0,__PYX_ERR(5, 1482, __pyx_L1_error)) __pyx_t_2 = PyBytes_Check(__pyx_v_filename); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1483 + /* "src/lxml/apihelpers.pxi":1518 * return None * elif isinstance(filename, bytes): * return filename # <<<<<<<<<<<<<< * elif isinstance(filename, unicode): * filename8 = (filename).encode('utf8') */ - __Pyx_TraceLine(1483,0,__PYX_ERR(5, 1483, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_filename); __pyx_r = __pyx_v_filename; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1482 + /* "src/lxml/apihelpers.pxi":1517 * if filename is None: * return None * elif isinstance(filename, bytes): # <<<<<<<<<<<<<< @@ -35559,55 +33961,51 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename */ } - /* "src/lxml/apihelpers.pxi":1484 + /* "src/lxml/apihelpers.pxi":1519 * elif isinstance(filename, bytes): * return filename * elif isinstance(filename, unicode): # <<<<<<<<<<<<<< * filename8 = (filename).encode('utf8') * if _isFilePath(filename8): */ - __Pyx_TraceLine(1484,0,__PYX_ERR(5, 1484, __pyx_L1_error)) __pyx_t_1 = PyUnicode_Check(__pyx_v_filename); __pyx_t_2 = (__pyx_t_1 != 0); if (likely(__pyx_t_2)) { - /* "src/lxml/apihelpers.pxi":1485 + /* "src/lxml/apihelpers.pxi":1520 * return filename * elif isinstance(filename, unicode): * filename8 = (filename).encode('utf8') # <<<<<<<<<<<<<< * if _isFilePath(filename8): * try: */ - __Pyx_TraceLine(1485,0,__PYX_ERR(5, 1485, __pyx_L1_error)) if (unlikely(__pyx_v_filename == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode"); - __PYX_ERR(5, 1485, __pyx_L1_error) + __PYX_ERR(5, 1520, __pyx_L1_error) } - __pyx_t_3 = PyUnicode_AsUTF8String(((PyObject*)__pyx_v_filename)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1485, __pyx_L1_error) + __pyx_t_3 = PyUnicode_AsUTF8String(((PyObject*)__pyx_v_filename)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_filename8 = __pyx_t_3; __pyx_t_3 = 0; - /* "src/lxml/apihelpers.pxi":1486 + /* "src/lxml/apihelpers.pxi":1521 * elif isinstance(filename, unicode): * filename8 = (filename).encode('utf8') * if _isFilePath(filename8): # <<<<<<<<<<<<<< * try: * return python.PyUnicode_AsEncodedString( */ - __Pyx_TraceLine(1486,0,__PYX_ERR(5, 1486, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_AsWritableUString(__pyx_v_filename8); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(5, 1486, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_AsWritableUString(__pyx_v_filename8); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(5, 1521, __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":1487 + /* "src/lxml/apihelpers.pxi":1522 * filename8 = (filename).encode('utf8') * if _isFilePath(filename8): * try: # <<<<<<<<<<<<<< * return python.PyUnicode_AsEncodedString( * filename, _C_FILENAME_ENCODING, NULL) */ - __Pyx_TraceLine(1487,0,__PYX_ERR(5, 1487, __pyx_L5_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -35617,31 +34015,29 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { - /* "src/lxml/apihelpers.pxi":1488 + /* "src/lxml/apihelpers.pxi":1523 * if _isFilePath(filename8): * try: * return python.PyUnicode_AsEncodedString( # <<<<<<<<<<<<<< * filename, _C_FILENAME_ENCODING, NULL) * except UnicodeEncodeError: */ - __Pyx_TraceLine(1488,0,__PYX_ERR(5, 1488, __pyx_L5_error)) __Pyx_XDECREF(__pyx_r); - /* "src/lxml/apihelpers.pxi":1489 + /* "src/lxml/apihelpers.pxi":1524 * try: * return python.PyUnicode_AsEncodedString( * filename, _C_FILENAME_ENCODING, NULL) # <<<<<<<<<<<<<< * except UnicodeEncodeError: * pass */ - __Pyx_TraceLine(1489,0,__PYX_ERR(5, 1489, __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, 1488, __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, 1523, __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":1487 + /* "src/lxml/apihelpers.pxi":1522 * filename8 = (filename).encode('utf8') * if _isFilePath(filename8): * try: # <<<<<<<<<<<<<< @@ -35652,14 +34048,13 @@ 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":1490 + /* "src/lxml/apihelpers.pxi":1525 * return python.PyUnicode_AsEncodedString( * filename, _C_FILENAME_ENCODING, NULL) * except UnicodeEncodeError: # <<<<<<<<<<<<<< * pass * return filename8 */ - __Pyx_TraceLine(1490,0,__PYX_ERR(5, 1490, __pyx_L7_except_error)) __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeEncodeError); if (__pyx_t_8) { __Pyx_ErrRestore(0,0,0); @@ -35668,7 +34063,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":1487 + /* "src/lxml/apihelpers.pxi":1522 * filename8 = (filename).encode('utf8') * if _isFilePath(filename8): * try: # <<<<<<<<<<<<<< @@ -35693,7 +34088,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":1486 + /* "src/lxml/apihelpers.pxi":1521 * elif isinstance(filename, unicode): * filename8 = (filename).encode('utf8') * if _isFilePath(filename8): # <<<<<<<<<<<<<< @@ -35702,20 +34097,19 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename */ } - /* "src/lxml/apihelpers.pxi":1492 + /* "src/lxml/apihelpers.pxi":1527 * except UnicodeEncodeError: * pass * return filename8 # <<<<<<<<<<<<<< * else: * raise TypeError("Argument must be string or unicode.") */ - __Pyx_TraceLine(1492,0,__PYX_ERR(5, 1492, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_filename8); __pyx_r = __pyx_v_filename8; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1484 + /* "src/lxml/apihelpers.pxi":1519 * elif isinstance(filename, bytes): * return filename * elif isinstance(filename, unicode): # <<<<<<<<<<<<<< @@ -35724,23 +34118,22 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename */ } - /* "src/lxml/apihelpers.pxi":1494 + /* "src/lxml/apihelpers.pxi":1529 * return filename8 * else: * raise TypeError("Argument must be string or unicode.") # <<<<<<<<<<<<<< * * cdef object _decodeFilename(const_xmlChar* c_path): */ - __Pyx_TraceLine(1494,0,__PYX_ERR(5, 1494, __pyx_L1_error)) /*else*/ { - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1494, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1529, __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, 1494, __pyx_L1_error) + __PYX_ERR(5, 1529, __pyx_L1_error) } - /* "src/lxml/apihelpers.pxi":1477 + /* "src/lxml/apihelpers.pxi":1512 * return 1 * * cdef object _encodeFilename(object filename): # <<<<<<<<<<<<<< @@ -35756,12 +34149,11 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename __pyx_L0:; __Pyx_XDECREF(__pyx_v_filename8); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1496 +/* "src/lxml/apihelpers.pxi":1531 * raise TypeError("Argument must be string or unicode.") * * cdef object _decodeFilename(const_xmlChar* c_path): # <<<<<<<<<<<<<< @@ -35771,28 +34163,25 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename static PyObject *__pyx_f_4lxml_5etree__decodeFilename(const xmlChar *__pyx_v_c_path) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_decodeFilename", 0); - __Pyx_TraceCall("_decodeFilename", __pyx_f[5], 1496, 0, __PYX_ERR(5, 1496, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1499 + /* "src/lxml/apihelpers.pxi":1534 * u"""Make the filename a unicode string if we are in Py3. * """ * return _decodeFilenameWithLength(c_path, tree.xmlStrlen(c_path)) # <<<<<<<<<<<<<< * * cdef object _decodeFilenameWithLength(const_xmlChar* c_path, size_t c_len): */ - __Pyx_TraceLine(1499,0,__PYX_ERR(5, 1499, __pyx_L1_error)) __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, 1499, __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, 1534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1496 + /* "src/lxml/apihelpers.pxi":1531 * raise TypeError("Argument must be string or unicode.") * * cdef object _decodeFilename(const_xmlChar* c_path): # <<<<<<<<<<<<<< @@ -35807,12 +34196,11 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilename(const xmlChar *__pyx_v_c_p __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1501 +/* "src/lxml/apihelpers.pxi":1536 * return _decodeFilenameWithLength(c_path, tree.xmlStrlen(c_path)) * * cdef object _decodeFilenameWithLength(const_xmlChar* c_path, size_t c_len): # <<<<<<<<<<<<<< @@ -35822,7 +34210,6 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilename(const xmlChar *__pyx_v_c_p static PyObject *__pyx_f_4lxml_5etree__decodeFilenameWithLength(const xmlChar *__pyx_v_c_path, size_t __pyx_v_c_len) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -35834,27 +34221,24 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilenameWithLength(const xmlChar *_ PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("_decodeFilenameWithLength", 0); - __Pyx_TraceCall("_decodeFilenameWithLength", __pyx_f[5], 1501, 0, __PYX_ERR(5, 1501, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1504 + /* "src/lxml/apihelpers.pxi":1539 * u"""Make the filename a unicode string if we are in Py3. * """ * if _isFilePath(c_path): # <<<<<<<<<<<<<< * try: * return python.PyUnicode_Decode( */ - __Pyx_TraceLine(1504,0,__PYX_ERR(5, 1504, __pyx_L1_error)) __pyx_t_1 = (__pyx_f_4lxml_5etree__isFilePath(__pyx_v_c_path) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1505 + /* "src/lxml/apihelpers.pxi":1540 * """ * if _isFilePath(c_path): * try: # <<<<<<<<<<<<<< * return python.PyUnicode_Decode( * c_path, c_len, _C_FILENAME_ENCODING, NULL) */ - __Pyx_TraceLine(1505,0,__PYX_ERR(5, 1505, __pyx_L4_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -35864,31 +34248,29 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilenameWithLength(const xmlChar *_ __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { - /* "src/lxml/apihelpers.pxi":1506 + /* "src/lxml/apihelpers.pxi":1541 * if _isFilePath(c_path): * try: * return python.PyUnicode_Decode( # <<<<<<<<<<<<<< * c_path, c_len, _C_FILENAME_ENCODING, NULL) * except UnicodeDecodeError: */ - __Pyx_TraceLine(1506,0,__PYX_ERR(5, 1506, __pyx_L4_error)) __Pyx_XDECREF(__pyx_r); - /* "src/lxml/apihelpers.pxi":1507 + /* "src/lxml/apihelpers.pxi":1542 * try: * return python.PyUnicode_Decode( * c_path, c_len, _C_FILENAME_ENCODING, NULL) # <<<<<<<<<<<<<< * except UnicodeDecodeError: * pass */ - __Pyx_TraceLine(1507,0,__PYX_ERR(5, 1507, __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, 1506, __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, 1541, __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":1505 + /* "src/lxml/apihelpers.pxi":1540 * """ * if _isFilePath(c_path): * try: # <<<<<<<<<<<<<< @@ -35899,14 +34281,13 @@ 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":1508 + /* "src/lxml/apihelpers.pxi":1543 * return python.PyUnicode_Decode( * c_path, c_len, _C_FILENAME_ENCODING, NULL) * except UnicodeDecodeError: # <<<<<<<<<<<<<< * pass * try: */ - __Pyx_TraceLine(1508,0,__PYX_ERR(5, 1508, __pyx_L6_except_error)) __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); if (__pyx_t_6) { __Pyx_ErrRestore(0,0,0); @@ -35915,7 +34296,7 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilenameWithLength(const xmlChar *_ goto __pyx_L6_except_error; __pyx_L6_except_error:; - /* "src/lxml/apihelpers.pxi":1505 + /* "src/lxml/apihelpers.pxi":1540 * """ * if _isFilePath(c_path): * try: # <<<<<<<<<<<<<< @@ -35940,7 +34321,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":1504 + /* "src/lxml/apihelpers.pxi":1539 * u"""Make the filename a unicode string if we are in Py3. * """ * if _isFilePath(c_path): # <<<<<<<<<<<<<< @@ -35949,14 +34330,13 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilenameWithLength(const xmlChar *_ */ } - /* "src/lxml/apihelpers.pxi":1510 + /* "src/lxml/apihelpers.pxi":1545 * except UnicodeDecodeError: * pass * try: # <<<<<<<<<<<<<< * return (c_path)[:c_len].decode('UTF-8') * except UnicodeDecodeError: */ - __Pyx_TraceLine(1510,0,__PYX_ERR(5, 1510, __pyx_L10_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -35966,22 +34346,21 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilenameWithLength(const xmlChar *_ __Pyx_XGOTREF(__pyx_t_2); /*try:*/ { - /* "src/lxml/apihelpers.pxi":1511 + /* "src/lxml/apihelpers.pxi":1546 * pass * try: * return (c_path)[:c_len].decode('UTF-8') # <<<<<<<<<<<<<< * except UnicodeDecodeError: * # this is a stupid fallback, but it might still work... */ - __Pyx_TraceLine(1511,0,__PYX_ERR(5, 1511, __pyx_L10_error)) __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, 1511, __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, 1546, __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":1510 + /* "src/lxml/apihelpers.pxi":1545 * except UnicodeDecodeError: * pass * try: # <<<<<<<<<<<<<< @@ -35992,32 +34371,30 @@ 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":1512 + /* "src/lxml/apihelpers.pxi":1547 * try: * return (c_path)[:c_len].decode('UTF-8') * except UnicodeDecodeError: # <<<<<<<<<<<<<< * # this is a stupid fallback, but it might still work... * return (c_path)[:c_len].decode('latin-1', 'replace') */ - __Pyx_TraceLine(1512,0,__PYX_ERR(5, 1512, __pyx_L12_except_error)) __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, 1512, __pyx_L12_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(5, 1547, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); - /* "src/lxml/apihelpers.pxi":1514 + /* "src/lxml/apihelpers.pxi":1549 * except UnicodeDecodeError: * # this is a stupid fallback, but it might still work... * return (c_path)[:c_len].decode('latin-1', 'replace') # <<<<<<<<<<<<<< * * cdef object _encodeFilenameUTF8(object filename): */ - __Pyx_TraceLine(1514,0,__PYX_ERR(5, 1514, __pyx_L12_except_error)) __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, 1514, __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, 1549, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_r = __pyx_t_9; __pyx_t_9 = 0; @@ -36029,7 +34406,7 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilenameWithLength(const xmlChar *_ goto __pyx_L12_except_error; __pyx_L12_except_error:; - /* "src/lxml/apihelpers.pxi":1510 + /* "src/lxml/apihelpers.pxi":1545 * except UnicodeDecodeError: * pass * try: # <<<<<<<<<<<<<< @@ -36055,7 +34432,7 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilenameWithLength(const xmlChar *_ goto __pyx_L0; } - /* "src/lxml/apihelpers.pxi":1501 + /* "src/lxml/apihelpers.pxi":1536 * return _decodeFilenameWithLength(c_path, tree.xmlStrlen(c_path)) * * cdef object _decodeFilenameWithLength(const_xmlChar* c_path, size_t c_len): # <<<<<<<<<<<<<< @@ -36073,12 +34450,11 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilenameWithLength(const xmlChar *_ __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1516 +/* "src/lxml/apihelpers.pxi":1551 * return (c_path)[:c_len].decode('latin-1', 'replace') * * cdef object _encodeFilenameUTF8(object filename): # <<<<<<<<<<<<<< @@ -36090,15 +34466,14 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file char *__pyx_v_c_filename; PyObject *__pyx_v_decode_exc = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; const xmlChar *__pyx_t_3; - PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; - Py_ssize_t __pyx_t_7; + PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; @@ -36110,34 +34485,31 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; __Pyx_RefNannySetupContext("_encodeFilenameUTF8", 0); - __Pyx_TraceCall("_encodeFilenameUTF8", __pyx_f[5], 1516, 0, __PYX_ERR(5, 1516, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_filename); - /* "src/lxml/apihelpers.pxi":1521 + /* "src/lxml/apihelpers.pxi":1556 * """ * cdef char* c_filename * if filename is None: # <<<<<<<<<<<<<< * return None * elif isinstance(filename, bytes): */ - __Pyx_TraceLine(1521,0,__PYX_ERR(5, 1521, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_filename == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1522 + /* "src/lxml/apihelpers.pxi":1557 * cdef char* c_filename * if filename is None: * return None # <<<<<<<<<<<<<< * elif isinstance(filename, bytes): - * if not isutf8(filename): + * if not isutf8l(filename, len(filename)): */ - __Pyx_TraceLine(1522,0,__PYX_ERR(5, 1522, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1521 + /* "src/lxml/apihelpers.pxi":1556 * """ * cdef char* c_filename * if filename is None: # <<<<<<<<<<<<<< @@ -36146,111 +34518,109 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file */ } - /* "src/lxml/apihelpers.pxi":1523 + /* "src/lxml/apihelpers.pxi":1558 * if filename is None: * return None * elif isinstance(filename, bytes): # <<<<<<<<<<<<<< - * if not isutf8(filename): + * if not isutf8l(filename, len(filename)): * # plain ASCII! */ - __Pyx_TraceLine(1523,0,__PYX_ERR(5, 1523, __pyx_L1_error)) __pyx_t_2 = PyBytes_Check(__pyx_v_filename); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1524 + /* "src/lxml/apihelpers.pxi":1559 * return None * elif isinstance(filename, bytes): - * if not isutf8(filename): # <<<<<<<<<<<<<< + * if not isutf8l(filename, len(filename)): # <<<<<<<<<<<<<< * # plain ASCII! * return filename */ - __Pyx_TraceLine(1524,0,__PYX_ERR(5, 1524, __pyx_L1_error)) if (unlikely(__pyx_v_filename == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(5, 1524, __pyx_L1_error) + __PYX_ERR(5, 1559, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_PyBytes_AsUString(__pyx_v_filename); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(5, 1559, __pyx_L1_error) + if (unlikely(__pyx_v_filename == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(5, 1559, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyBytes_AsUString(__pyx_v_filename); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(5, 1524, __pyx_L1_error) - __pyx_t_1 = ((!(__pyx_f_4lxml_5etree_isutf8(__pyx_t_3) != 0)) != 0); + __pyx_t_4 = PyBytes_GET_SIZE(((PyObject*)__pyx_v_filename)); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(5, 1559, __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":1526 - * if not isutf8(filename): + /* "src/lxml/apihelpers.pxi":1561 + * if not isutf8l(filename, len(filename)): * # plain ASCII! * return filename # <<<<<<<<<<<<<< * c_filename = _cstr(filename) * try: */ - __Pyx_TraceLine(1526,0,__PYX_ERR(5, 1526, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_filename); __pyx_r = __pyx_v_filename; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1524 + /* "src/lxml/apihelpers.pxi":1559 * return None * elif isinstance(filename, bytes): - * if not isutf8(filename): # <<<<<<<<<<<<<< + * if not isutf8l(filename, len(filename)): # <<<<<<<<<<<<<< * # plain ASCII! * return filename */ } - /* "src/lxml/apihelpers.pxi":1527 + /* "src/lxml/apihelpers.pxi":1562 * # plain ASCII! * return filename * c_filename = _cstr(filename) # <<<<<<<<<<<<<< * try: * # try to decode with default encoding */ - __Pyx_TraceLine(1527,0,__PYX_ERR(5, 1527, __pyx_L1_error)) __pyx_v_c_filename = PyBytes_AS_STRING(__pyx_v_filename); - /* "src/lxml/apihelpers.pxi":1528 + /* "src/lxml/apihelpers.pxi":1563 * return filename * c_filename = _cstr(filename) * try: # <<<<<<<<<<<<<< * # try to decode with default encoding * filename = python.PyUnicode_Decode( */ - __Pyx_TraceLine(1528,0,__PYX_ERR(5, 1528, __pyx_L5_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); - __Pyx_XGOTREF(__pyx_t_4); + __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { - /* "src/lxml/apihelpers.pxi":1531 + /* "src/lxml/apihelpers.pxi":1566 * # try to decode with default encoding * filename = python.PyUnicode_Decode( * c_filename, len(filename), # <<<<<<<<<<<<<< * _C_FILENAME_ENCODING, NULL) * except UnicodeDecodeError as decode_exc: */ - __Pyx_TraceLine(1531,0,__PYX_ERR(5, 1531, __pyx_L5_error)) if (unlikely(__pyx_v_filename == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(5, 1531, __pyx_L5_error) + __PYX_ERR(5, 1566, __pyx_L5_error) } - __pyx_t_7 = PyBytes_GET_SIZE(((PyObject*)__pyx_v_filename)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(5, 1531, __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, 1566, __pyx_L5_error) - /* "src/lxml/apihelpers.pxi":1530 + /* "src/lxml/apihelpers.pxi":1565 * try: * # try to decode with default encoding * filename = python.PyUnicode_Decode( # <<<<<<<<<<<<<< * c_filename, len(filename), * _C_FILENAME_ENCODING, NULL) */ - __Pyx_TraceLine(1530,0,__PYX_ERR(5, 1530, __pyx_L5_error)) - __pyx_t_8 = PyUnicode_Decode(__pyx_v_c_filename, __pyx_t_7, __pyx_v_4lxml_5etree__C_FILENAME_ENCODING, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1530, __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, 1565, __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":1528 + /* "src/lxml/apihelpers.pxi":1563 * return filename * c_filename = _cstr(filename) * try: # <<<<<<<<<<<<<< @@ -36258,39 +34628,37 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file * filename = python.PyUnicode_Decode( */ } - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L10_try_end; __pyx_L5_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "src/lxml/apihelpers.pxi":1533 + /* "src/lxml/apihelpers.pxi":1568 * c_filename, len(filename), * _C_FILENAME_ENCODING, NULL) * except UnicodeDecodeError as decode_exc: # <<<<<<<<<<<<<< * try: * # try if it's proper UTF-8 */ - __Pyx_TraceLine(1533,0,__PYX_ERR(5, 1533, __pyx_L7_except_error)) __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, 1533, __pyx_L7_except_error) + if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_10, &__pyx_t_11) < 0) __PYX_ERR(5, 1568, __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":1534 + /* "src/lxml/apihelpers.pxi":1569 * _C_FILENAME_ENCODING, NULL) * except UnicodeDecodeError as decode_exc: * try: # <<<<<<<<<<<<<< * # try if it's proper UTF-8 * (filename).decode('utf8') */ - __Pyx_TraceLine(1534,0,__PYX_ERR(5, 1534, __pyx_L13_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -36300,30 +34668,28 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file __Pyx_XGOTREF(__pyx_t_14); /*try:*/ { - /* "src/lxml/apihelpers.pxi":1536 + /* "src/lxml/apihelpers.pxi":1571 * try: * # try if it's proper UTF-8 * (filename).decode('utf8') # <<<<<<<<<<<<<< * return filename * except UnicodeDecodeError: */ - __Pyx_TraceLine(1536,0,__PYX_ERR(5, 1536, __pyx_L13_error)) if (unlikely(__pyx_v_filename == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); - __PYX_ERR(5, 1536, __pyx_L13_error) + __PYX_ERR(5, 1571, __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, 1536, __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, 1571, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - /* "src/lxml/apihelpers.pxi":1537 + /* "src/lxml/apihelpers.pxi":1572 * # try if it's proper UTF-8 * (filename).decode('utf8') * return filename # <<<<<<<<<<<<<< * except UnicodeDecodeError: * raise decode_exc # otherwise re-raise original exception */ - __Pyx_TraceLine(1537,0,__PYX_ERR(5, 1537, __pyx_L13_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_filename); __pyx_r = __pyx_v_filename; @@ -36332,7 +34698,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":1534 + /* "src/lxml/apihelpers.pxi":1569 * _C_FILENAME_ENCODING, NULL) * except UnicodeDecodeError as decode_exc: * try: # <<<<<<<<<<<<<< @@ -36343,37 +34709,35 @@ 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":1538 + /* "src/lxml/apihelpers.pxi":1573 * (filename).decode('utf8') * return filename * except UnicodeDecodeError: # <<<<<<<<<<<<<< * raise decode_exc # otherwise re-raise original exception * if isinstance(filename, unicode): */ - __Pyx_TraceLine(1538,0,__PYX_ERR(5, 1538, __pyx_L15_except_error)) __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, 1538, __pyx_L15_except_error) + if (__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0) __PYX_ERR(5, 1573, __pyx_L15_except_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_GOTREF(__pyx_t_16); __Pyx_GOTREF(__pyx_t_17); - /* "src/lxml/apihelpers.pxi":1539 + /* "src/lxml/apihelpers.pxi":1574 * return filename * except UnicodeDecodeError: * raise decode_exc # otherwise re-raise original exception # <<<<<<<<<<<<<< * if isinstance(filename, unicode): * return (filename).encode('utf8') */ - __Pyx_TraceLine(1539,0,__PYX_ERR(5, 1539, __pyx_L15_except_error)) __Pyx_Raise(__pyx_v_decode_exc, 0, 0, 0); - __PYX_ERR(5, 1539, __pyx_L15_except_error) + __PYX_ERR(5, 1574, __pyx_L15_except_error) } goto __pyx_L15_except_error; __pyx_L15_except_error:; - /* "src/lxml/apihelpers.pxi":1534 + /* "src/lxml/apihelpers.pxi":1569 * _C_FILENAME_ENCODING, NULL) * except UnicodeDecodeError as decode_exc: * try: # <<<<<<<<<<<<<< @@ -36396,68 +34760,66 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file goto __pyx_L7_except_error; __pyx_L7_except_error:; - /* "src/lxml/apihelpers.pxi":1528 + /* "src/lxml/apihelpers.pxi":1563 * return filename * c_filename = _cstr(filename) * try: # <<<<<<<<<<<<<< * # try to decode with default encoding * filename = python.PyUnicode_Decode( */ - __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); - __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L1_error; __pyx_L8_except_return:; - __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); - __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L0; __pyx_L10_try_end:; } - /* "src/lxml/apihelpers.pxi":1523 + /* "src/lxml/apihelpers.pxi":1558 * if filename is None: * return None * elif isinstance(filename, bytes): # <<<<<<<<<<<<<< - * if not isutf8(filename): + * if not isutf8l(filename, len(filename)): * # plain ASCII! */ } - /* "src/lxml/apihelpers.pxi":1540 + /* "src/lxml/apihelpers.pxi":1575 * except UnicodeDecodeError: * raise decode_exc # otherwise re-raise original exception * if isinstance(filename, unicode): # <<<<<<<<<<<<<< * return (filename).encode('utf8') * else: */ - __Pyx_TraceLine(1540,0,__PYX_ERR(5, 1540, __pyx_L1_error)) __pyx_t_1 = PyUnicode_Check(__pyx_v_filename); __pyx_t_2 = (__pyx_t_1 != 0); if (likely(__pyx_t_2)) { - /* "src/lxml/apihelpers.pxi":1541 + /* "src/lxml/apihelpers.pxi":1576 * raise decode_exc # otherwise re-raise original exception * if isinstance(filename, unicode): * return (filename).encode('utf8') # <<<<<<<<<<<<<< * else: * raise TypeError("Argument must be string or unicode.") */ - __Pyx_TraceLine(1541,0,__PYX_ERR(5, 1541, __pyx_L1_error)) __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, 1541, __pyx_L1_error) + __PYX_ERR(5, 1576, __pyx_L1_error) } - __pyx_t_11 = PyUnicode_AsUTF8String(((PyObject*)__pyx_v_filename)); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 1541, __pyx_L1_error) + __pyx_t_11 = PyUnicode_AsUTF8String(((PyObject*)__pyx_v_filename)); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 1576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_r = __pyx_t_11; __pyx_t_11 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1540 + /* "src/lxml/apihelpers.pxi":1575 * except UnicodeDecodeError: * raise decode_exc # otherwise re-raise original exception * if isinstance(filename, unicode): # <<<<<<<<<<<<<< @@ -36466,23 +34828,22 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file */ } - /* "src/lxml/apihelpers.pxi":1543 + /* "src/lxml/apihelpers.pxi":1578 * return (filename).encode('utf8') * else: * raise TypeError("Argument must be string or unicode.") # <<<<<<<<<<<<<< * * cdef tuple _getNsTag(tag): */ - __Pyx_TraceLine(1543,0,__PYX_ERR(5, 1543, __pyx_L1_error)) /*else*/ { - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 1543, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 1578, __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, 1543, __pyx_L1_error) + __PYX_ERR(5, 1578, __pyx_L1_error) } - /* "src/lxml/apihelpers.pxi":1516 + /* "src/lxml/apihelpers.pxi":1551 * return (c_path)[:c_len].decode('latin-1', 'replace') * * cdef object _encodeFilenameUTF8(object filename): # <<<<<<<<<<<<<< @@ -36504,12 +34865,11 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file __Pyx_XDECREF(__pyx_v_decode_exc); __Pyx_XDECREF(__pyx_v_filename); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1545 +/* "src/lxml/apihelpers.pxi":1580 * raise TypeError("Argument must be string or unicode.") * * cdef tuple _getNsTag(tag): # <<<<<<<<<<<<<< @@ -36519,28 +34879,25 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file static PyObject *__pyx_f_4lxml_5etree__getNsTag(PyObject *__pyx_v_tag) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_getNsTag", 0); - __Pyx_TraceCall("_getNsTag", __pyx_f[5], 1545, 0, __PYX_ERR(5, 1545, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1549 + /* "src/lxml/apihelpers.pxi":1584 * Return None for NS uri if no namespace URI provided. * """ * return __getNsTag(tag, 0) # <<<<<<<<<<<<<< * * cdef tuple _getNsTagWithEmptyNs(tag): */ - __Pyx_TraceLine(1549,0,__PYX_ERR(5, 1549, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree___getNsTag(__pyx_v_tag, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1549, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree___getNsTag(__pyx_v_tag, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1584, __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":1545 + /* "src/lxml/apihelpers.pxi":1580 * raise TypeError("Argument must be string or unicode.") * * cdef tuple _getNsTag(tag): # <<<<<<<<<<<<<< @@ -36555,12 +34912,11 @@ static PyObject *__pyx_f_4lxml_5etree__getNsTag(PyObject *__pyx_v_tag) { __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1551 +/* "src/lxml/apihelpers.pxi":1586 * return __getNsTag(tag, 0) * * cdef tuple _getNsTagWithEmptyNs(tag): # <<<<<<<<<<<<<< @@ -36570,28 +34926,25 @@ static PyObject *__pyx_f_4lxml_5etree__getNsTag(PyObject *__pyx_v_tag) { static PyObject *__pyx_f_4lxml_5etree__getNsTagWithEmptyNs(PyObject *__pyx_v_tag) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_getNsTagWithEmptyNs", 0); - __Pyx_TraceCall("_getNsTagWithEmptyNs", __pyx_f[5], 1551, 0, __PYX_ERR(5, 1551, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1556 + /* "src/lxml/apihelpers.pxi":1591 * part is '{}'. * """ * return __getNsTag(tag, 1) # <<<<<<<<<<<<<< * * cdef tuple __getNsTag(tag, bint empty_ns): */ - __Pyx_TraceLine(1556,0,__PYX_ERR(5, 1556, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree___getNsTag(__pyx_v_tag, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1556, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree___getNsTag(__pyx_v_tag, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1591, __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":1551 + /* "src/lxml/apihelpers.pxi":1586 * return __getNsTag(tag, 0) * * cdef tuple _getNsTagWithEmptyNs(tag): # <<<<<<<<<<<<<< @@ -36606,12 +34959,11 @@ static PyObject *__pyx_f_4lxml_5etree__getNsTagWithEmptyNs(PyObject *__pyx_v_tag __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1558 +/* "src/lxml/apihelpers.pxi":1593 * return __getNsTag(tag, 1) * * cdef tuple __getNsTag(tag, bint empty_ns): # <<<<<<<<<<<<<< @@ -36626,7 +34978,6 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py Py_ssize_t __pyx_v_nslen; PyObject *__pyx_v_ns = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -36634,28 +34985,25 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__getNsTag", 0); - __Pyx_TraceCall("__getNsTag", __pyx_f[5], 1558, 0, __PYX_ERR(5, 1558, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_tag); - /* "src/lxml/apihelpers.pxi":1563 + /* "src/lxml/apihelpers.pxi":1598 * cdef Py_ssize_t taglen * cdef Py_ssize_t nslen * cdef bytes ns = None # <<<<<<<<<<<<<< * # _isString() is much faster than isinstance() * if not _isString(tag) and isinstance(tag, QName): */ - __Pyx_TraceLine(1563,0,__PYX_ERR(5, 1563, __pyx_L1_error)) __Pyx_INCREF(Py_None); __pyx_v_ns = ((PyObject*)Py_None); - /* "src/lxml/apihelpers.pxi":1565 + /* "src/lxml/apihelpers.pxi":1600 * cdef bytes ns = None * # _isString() is much faster than isinstance() * if not _isString(tag) and isinstance(tag, QName): # <<<<<<<<<<<<<< * tag = (tag).text * tag = _utf8(tag) */ - __Pyx_TraceLine(1565,0,__PYX_ERR(5, 1565, __pyx_L1_error)) __pyx_t_2 = ((!(_isString(__pyx_v_tag) != 0)) != 0); if (__pyx_t_2) { } else { @@ -36668,20 +35016,19 @@ 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":1566 + /* "src/lxml/apihelpers.pxi":1601 * # _isString() is much faster than isinstance() * if not _isString(tag) and isinstance(tag, QName): * tag = (tag).text # <<<<<<<<<<<<<< * tag = _utf8(tag) * c_tag = _cstr(tag) */ - __Pyx_TraceLine(1566,0,__PYX_ERR(5, 1566, __pyx_L1_error)) __pyx_t_4 = ((struct __pyx_obj_4lxml_5etree_QName *)__pyx_v_tag)->text; __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_tag, __pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1565 + /* "src/lxml/apihelpers.pxi":1600 * cdef bytes ns = None * # _isString() is much faster than isinstance() * if not _isString(tag) and isinstance(tag, QName): # <<<<<<<<<<<<<< @@ -36690,83 +35037,76 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py */ } - /* "src/lxml/apihelpers.pxi":1567 + /* "src/lxml/apihelpers.pxi":1602 * if not _isString(tag) and isinstance(tag, QName): * tag = (tag).text * tag = _utf8(tag) # <<<<<<<<<<<<<< * c_tag = _cstr(tag) * if c_tag[0] == c'{': */ - __Pyx_TraceLine(1567,0,__PYX_ERR(5, 1567, __pyx_L1_error)) - __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_v_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1567, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_v_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1602, __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":1568 + /* "src/lxml/apihelpers.pxi":1603 * tag = (tag).text * tag = _utf8(tag) * c_tag = _cstr(tag) # <<<<<<<<<<<<<< * if c_tag[0] == c'{': * c_tag += 1 */ - __Pyx_TraceLine(1568,0,__PYX_ERR(5, 1568, __pyx_L1_error)) __pyx_v_c_tag = PyBytes_AS_STRING(__pyx_v_tag); - /* "src/lxml/apihelpers.pxi":1569 + /* "src/lxml/apihelpers.pxi":1604 * tag = _utf8(tag) * c_tag = _cstr(tag) * if c_tag[0] == c'{': # <<<<<<<<<<<<<< * c_tag += 1 * c_ns_end = cstring_h.strchr(c_tag, c'}') */ - __Pyx_TraceLine(1569,0,__PYX_ERR(5, 1569, __pyx_L1_error)) __pyx_t_1 = (((__pyx_v_c_tag[0]) == '{') != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1570 + /* "src/lxml/apihelpers.pxi":1605 * c_tag = _cstr(tag) * if c_tag[0] == c'{': * c_tag += 1 # <<<<<<<<<<<<<< * c_ns_end = cstring_h.strchr(c_tag, c'}') * if c_ns_end is NULL: */ - __Pyx_TraceLine(1570,0,__PYX_ERR(5, 1570, __pyx_L1_error)) __pyx_v_c_tag = (__pyx_v_c_tag + 1); - /* "src/lxml/apihelpers.pxi":1571 + /* "src/lxml/apihelpers.pxi":1606 * if c_tag[0] == c'{': * c_tag += 1 * c_ns_end = cstring_h.strchr(c_tag, c'}') # <<<<<<<<<<<<<< * if c_ns_end is NULL: * raise ValueError, u"Invalid tag name" */ - __Pyx_TraceLine(1571,0,__PYX_ERR(5, 1571, __pyx_L1_error)) __pyx_v_c_ns_end = strchr(__pyx_v_c_tag, '}'); - /* "src/lxml/apihelpers.pxi":1572 + /* "src/lxml/apihelpers.pxi":1607 * c_tag += 1 * c_ns_end = cstring_h.strchr(c_tag, c'}') * if c_ns_end is NULL: # <<<<<<<<<<<<<< * raise ValueError, u"Invalid tag name" * nslen = c_ns_end - c_tag */ - __Pyx_TraceLine(1572,0,__PYX_ERR(5, 1572, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_ns_end == NULL) != 0); if (unlikely(__pyx_t_1)) { - /* "src/lxml/apihelpers.pxi":1573 + /* "src/lxml/apihelpers.pxi":1608 * c_ns_end = cstring_h.strchr(c_tag, c'}') * if c_ns_end is NULL: * raise ValueError, u"Invalid tag name" # <<<<<<<<<<<<<< * nslen = c_ns_end - c_tag * taglen = python.PyBytes_GET_SIZE(tag) - nslen - 2 */ - __Pyx_TraceLine(1573,0,__PYX_ERR(5, 1573, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Invalid_tag_name, 0, 0); - __PYX_ERR(5, 1573, __pyx_L1_error) + __PYX_ERR(5, 1608, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1572 + /* "src/lxml/apihelpers.pxi":1607 * c_tag += 1 * c_ns_end = cstring_h.strchr(c_tag, c'}') * if c_ns_end is NULL: # <<<<<<<<<<<<<< @@ -36775,49 +35115,45 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py */ } - /* "src/lxml/apihelpers.pxi":1574 + /* "src/lxml/apihelpers.pxi":1609 * if c_ns_end is NULL: * raise ValueError, u"Invalid tag name" * nslen = c_ns_end - c_tag # <<<<<<<<<<<<<< * taglen = python.PyBytes_GET_SIZE(tag) - nslen - 2 * if taglen == 0: */ - __Pyx_TraceLine(1574,0,__PYX_ERR(5, 1574, __pyx_L1_error)) __pyx_v_nslen = (__pyx_v_c_ns_end - __pyx_v_c_tag); - /* "src/lxml/apihelpers.pxi":1575 + /* "src/lxml/apihelpers.pxi":1610 * raise ValueError, u"Invalid tag name" * nslen = c_ns_end - c_tag * taglen = python.PyBytes_GET_SIZE(tag) - nslen - 2 # <<<<<<<<<<<<<< * if taglen == 0: * raise ValueError, u"Empty tag name" */ - __Pyx_TraceLine(1575,0,__PYX_ERR(5, 1575, __pyx_L1_error)) __pyx_v_taglen = ((PyBytes_GET_SIZE(__pyx_v_tag) - __pyx_v_nslen) - 2); - /* "src/lxml/apihelpers.pxi":1576 + /* "src/lxml/apihelpers.pxi":1611 * nslen = c_ns_end - c_tag * taglen = python.PyBytes_GET_SIZE(tag) - nslen - 2 * if taglen == 0: # <<<<<<<<<<<<<< * raise ValueError, u"Empty tag name" * if nslen > 0: */ - __Pyx_TraceLine(1576,0,__PYX_ERR(5, 1576, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_taglen == 0) != 0); if (unlikely(__pyx_t_1)) { - /* "src/lxml/apihelpers.pxi":1577 + /* "src/lxml/apihelpers.pxi":1612 * taglen = python.PyBytes_GET_SIZE(tag) - nslen - 2 * if taglen == 0: * raise ValueError, u"Empty tag name" # <<<<<<<<<<<<<< * if nslen > 0: * ns = c_tag[:nslen] */ - __Pyx_TraceLine(1577,0,__PYX_ERR(5, 1577, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Empty_tag_name, 0, 0); - __PYX_ERR(5, 1577, __pyx_L1_error) + __PYX_ERR(5, 1612, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1576 + /* "src/lxml/apihelpers.pxi":1611 * nslen = c_ns_end - c_tag * taglen = python.PyBytes_GET_SIZE(tag) - nslen - 2 * if taglen == 0: # <<<<<<<<<<<<<< @@ -36826,26 +35162,24 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py */ } - /* "src/lxml/apihelpers.pxi":1578 + /* "src/lxml/apihelpers.pxi":1613 * if taglen == 0: * raise ValueError, u"Empty tag name" * if nslen > 0: # <<<<<<<<<<<<<< * ns = c_tag[:nslen] * elif empty_ns: */ - __Pyx_TraceLine(1578,0,__PYX_ERR(5, 1578, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_nslen > 0) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1579 + /* "src/lxml/apihelpers.pxi":1614 * raise ValueError, u"Empty tag name" * if nslen > 0: * ns = c_tag[:nslen] # <<<<<<<<<<<<<< * elif empty_ns: * ns = b'' */ - __Pyx_TraceLine(1579,0,__PYX_ERR(5, 1579, __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, 1579, __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, 1614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); @@ -36853,7 +35187,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":1578 + /* "src/lxml/apihelpers.pxi":1613 * if taglen == 0: * raise ValueError, u"Empty tag name" * if nslen > 0: # <<<<<<<<<<<<<< @@ -36863,29 +35197,27 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py goto __pyx_L9; } - /* "src/lxml/apihelpers.pxi":1580 + /* "src/lxml/apihelpers.pxi":1615 * if nslen > 0: * ns = c_tag[:nslen] * elif empty_ns: # <<<<<<<<<<<<<< * ns = b'' * tag = c_ns_end[1:taglen+1] */ - __Pyx_TraceLine(1580,0,__PYX_ERR(5, 1580, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_empty_ns != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1581 + /* "src/lxml/apihelpers.pxi":1616 * ns = c_tag[:nslen] * elif empty_ns: * ns = b'' # <<<<<<<<<<<<<< * tag = c_ns_end[1:taglen+1] * elif python.PyBytes_GET_SIZE(tag) == 0: */ - __Pyx_TraceLine(1581,0,__PYX_ERR(5, 1581, __pyx_L1_error)) - __Pyx_INCREF(__pyx_kp_b__23); - __Pyx_DECREF_SET(__pyx_v_ns, __pyx_kp_b__23); + __Pyx_INCREF(__pyx_kp_b__11); + __Pyx_DECREF_SET(__pyx_v_ns, __pyx_kp_b__11); - /* "src/lxml/apihelpers.pxi":1580 + /* "src/lxml/apihelpers.pxi":1615 * if nslen > 0: * ns = c_tag[:nslen] * elif empty_ns: # <<<<<<<<<<<<<< @@ -36895,15 +35227,14 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py } __pyx_L9:; - /* "src/lxml/apihelpers.pxi":1582 + /* "src/lxml/apihelpers.pxi":1617 * 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_TraceLine(1582,0,__PYX_ERR(5, 1582, __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, 1582, __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, 1617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); @@ -36911,7 +35242,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":1569 + /* "src/lxml/apihelpers.pxi":1604 * tag = _utf8(tag) * c_tag = _cstr(tag) * if c_tag[0] == c'{': # <<<<<<<<<<<<<< @@ -36921,29 +35252,27 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py goto __pyx_L6; } - /* "src/lxml/apihelpers.pxi":1583 + /* "src/lxml/apihelpers.pxi":1618 * ns = b'' * tag = c_ns_end[1:taglen+1] * elif python.PyBytes_GET_SIZE(tag) == 0: # <<<<<<<<<<<<<< * raise ValueError, u"Empty tag name" * return ns, tag */ - __Pyx_TraceLine(1583,0,__PYX_ERR(5, 1583, __pyx_L1_error)) __pyx_t_1 = ((PyBytes_GET_SIZE(__pyx_v_tag) == 0) != 0); if (unlikely(__pyx_t_1)) { - /* "src/lxml/apihelpers.pxi":1584 + /* "src/lxml/apihelpers.pxi":1619 * tag = c_ns_end[1:taglen+1] * elif python.PyBytes_GET_SIZE(tag) == 0: * raise ValueError, u"Empty tag name" # <<<<<<<<<<<<<< * return ns, tag * */ - __Pyx_TraceLine(1584,0,__PYX_ERR(5, 1584, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Empty_tag_name, 0, 0); - __PYX_ERR(5, 1584, __pyx_L1_error) + __PYX_ERR(5, 1619, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1583 + /* "src/lxml/apihelpers.pxi":1618 * ns = b'' * tag = c_ns_end[1:taglen+1] * elif python.PyBytes_GET_SIZE(tag) == 0: # <<<<<<<<<<<<<< @@ -36953,16 +35282,15 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py } __pyx_L6:; - /* "src/lxml/apihelpers.pxi":1585 + /* "src/lxml/apihelpers.pxi":1620 * elif python.PyBytes_GET_SIZE(tag) == 0: * raise ValueError, u"Empty tag name" * return ns, tag # <<<<<<<<<<<<<< * * cdef inline int _pyXmlNameIsValid(name_utf8): */ - __Pyx_TraceLine(1585,0,__PYX_ERR(5, 1585, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1585, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_ns); __Pyx_GIVEREF(__pyx_v_ns); @@ -36974,7 +35302,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":1558 + /* "src/lxml/apihelpers.pxi":1593 * return __getNsTag(tag, 1) * * cdef tuple __getNsTag(tag, bint empty_ns): # <<<<<<<<<<<<<< @@ -36992,12 +35320,11 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py __Pyx_XDECREF(__pyx_v_ns); __Pyx_XDECREF(__pyx_v_tag); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1587 +/* "src/lxml/apihelpers.pxi":1622 * return ns, tag * * cdef inline int _pyXmlNameIsValid(name_utf8): # <<<<<<<<<<<<<< @@ -37007,35 +35334,32 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py static CYTHON_INLINE int __pyx_f_4lxml_5etree__pyXmlNameIsValid(PyObject *__pyx_v_name_utf8) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("_pyXmlNameIsValid", 0); - __Pyx_TraceCall("_pyXmlNameIsValid", __pyx_f[5], 1587, 0, __PYX_ERR(5, 1587, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1588 + /* "src/lxml/apihelpers.pxi":1623 * * cdef inline int _pyXmlNameIsValid(name_utf8): * return _xmlNameIsValid(_xcstr(name_utf8)) and b':' not in name_utf8 # <<<<<<<<<<<<<< * * cdef inline int _pyHtmlNameIsValid(name_utf8): */ - __Pyx_TraceLine(1588,0,__PYX_ERR(5, 1588, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__xmlNameIsValid((const xmlChar*)PyBytes_AS_STRING(__pyx_v_name_utf8)); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L3_bool_binop_done; } - __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__31, __pyx_v_name_utf8, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(5, 1588, __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, 1623, __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":1587 + /* "src/lxml/apihelpers.pxi":1622 * return ns, tag * * cdef inline int _pyXmlNameIsValid(name_utf8): # <<<<<<<<<<<<<< @@ -37048,12 +35372,11 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__pyXmlNameIsValid(PyObject *__pyx_ __Pyx_WriteUnraisable("lxml.etree._pyXmlNameIsValid", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1590 +/* "src/lxml/apihelpers.pxi":1625 * return _xmlNameIsValid(_xcstr(name_utf8)) and b':' not in name_utf8 * * cdef inline int _pyHtmlNameIsValid(name_utf8): # <<<<<<<<<<<<<< @@ -37063,23 +35386,20 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__pyXmlNameIsValid(PyObject *__pyx_ static CYTHON_INLINE int __pyx_f_4lxml_5etree__pyHtmlNameIsValid(PyObject *__pyx_v_name_utf8) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_pyHtmlNameIsValid", 0); - __Pyx_TraceCall("_pyHtmlNameIsValid", __pyx_f[5], 1590, 0, __PYX_ERR(5, 1590, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1591 + /* "src/lxml/apihelpers.pxi":1626 * * cdef inline int _pyHtmlNameIsValid(name_utf8): * return _htmlNameIsValid(_xcstr(name_utf8)) # <<<<<<<<<<<<<< * * cdef inline int _xmlNameIsValid(const_xmlChar* c_name): */ - __Pyx_TraceLine(1591,0,__PYX_ERR(5, 1591, __pyx_L1_error)) __pyx_r = __pyx_f_4lxml_5etree__htmlNameIsValid((const xmlChar*)PyBytes_AS_STRING(__pyx_v_name_utf8)); goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1590 + /* "src/lxml/apihelpers.pxi":1625 * return _xmlNameIsValid(_xcstr(name_utf8)) and b':' not in name_utf8 * * cdef inline int _pyHtmlNameIsValid(name_utf8): # <<<<<<<<<<<<<< @@ -37088,16 +35408,12 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__pyHtmlNameIsValid(PyObject *__pyx */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._pyHtmlNameIsValid", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1593 +/* "src/lxml/apihelpers.pxi":1628 * return _htmlNameIsValid(_xcstr(name_utf8)) * * cdef inline int _xmlNameIsValid(const_xmlChar* c_name): # <<<<<<<<<<<<<< @@ -37107,23 +35423,20 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__pyHtmlNameIsValid(PyObject *__pyx static CYTHON_INLINE int __pyx_f_4lxml_5etree__xmlNameIsValid(const xmlChar *__pyx_v_c_name) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_xmlNameIsValid", 0); - __Pyx_TraceCall("_xmlNameIsValid", __pyx_f[5], 1593, 0, __PYX_ERR(5, 1593, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1594 + /* "src/lxml/apihelpers.pxi":1629 * * cdef inline int _xmlNameIsValid(const_xmlChar* c_name): * return tree.xmlValidateNameValue(c_name) # <<<<<<<<<<<<<< * * cdef int _htmlNameIsValid(const_xmlChar* c_name): */ - __Pyx_TraceLine(1594,0,__PYX_ERR(5, 1594, __pyx_L1_error)) __pyx_r = xmlValidateNameValue(__pyx_v_c_name); goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1593 + /* "src/lxml/apihelpers.pxi":1628 * return _htmlNameIsValid(_xcstr(name_utf8)) * * cdef inline int _xmlNameIsValid(const_xmlChar* c_name): # <<<<<<<<<<<<<< @@ -37132,16 +35445,12 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__xmlNameIsValid(const xmlChar *__p */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._xmlNameIsValid", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1596 +/* "src/lxml/apihelpers.pxi":1631 * return tree.xmlValidateNameValue(c_name) * * cdef int _htmlNameIsValid(const_xmlChar* c_name): # <<<<<<<<<<<<<< @@ -37151,21 +35460,18 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__xmlNameIsValid(const xmlChar *__p static int __pyx_f_4lxml_5etree__htmlNameIsValid(const xmlChar *__pyx_v_c_name) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_htmlNameIsValid", 0); - __Pyx_TraceCall("_htmlNameIsValid", __pyx_f[5], 1596, 0, __PYX_ERR(5, 1596, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1597 + /* "src/lxml/apihelpers.pxi":1632 * * cdef int _htmlNameIsValid(const_xmlChar* c_name): * if c_name is NULL or c_name[0] == c'\0': # <<<<<<<<<<<<<< * return 0 * while c_name[0] != c'\0': */ - __Pyx_TraceLine(1597,0,__PYX_ERR(5, 1597, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_name == NULL) != 0); if (!__pyx_t_2) { } else { @@ -37177,18 +35483,17 @@ 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":1598 + /* "src/lxml/apihelpers.pxi":1633 * cdef int _htmlNameIsValid(const_xmlChar* c_name): * if c_name is NULL or c_name[0] == c'\0': * return 0 # <<<<<<<<<<<<<< * while c_name[0] != c'\0': * if c_name[0] in b'&<>/"\'\t\n\x0B\x0C\r ': */ - __Pyx_TraceLine(1598,0,__PYX_ERR(5, 1598, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1597 + /* "src/lxml/apihelpers.pxi":1632 * * cdef int _htmlNameIsValid(const_xmlChar* c_name): * if c_name is NULL or c_name[0] == c'\0': # <<<<<<<<<<<<<< @@ -37197,26 +35502,24 @@ static int __pyx_f_4lxml_5etree__htmlNameIsValid(const xmlChar *__pyx_v_c_name) */ } - /* "src/lxml/apihelpers.pxi":1599 + /* "src/lxml/apihelpers.pxi":1634 * if c_name is NULL or c_name[0] == c'\0': * return 0 * while c_name[0] != c'\0': # <<<<<<<<<<<<<< * if c_name[0] in b'&<>/"\'\t\n\x0B\x0C\r ': * return 0 */ - __Pyx_TraceLine(1599,0,__PYX_ERR(5, 1599, __pyx_L1_error)) while (1) { __pyx_t_1 = (((__pyx_v_c_name[0]) != '\x00') != 0); if (!__pyx_t_1) break; - /* "src/lxml/apihelpers.pxi":1600 + /* "src/lxml/apihelpers.pxi":1635 * return 0 * while c_name[0] != c'\0': * if c_name[0] in b'&<>/"\'\t\n\x0B\x0C\r ': # <<<<<<<<<<<<<< * return 0 * c_name += 1 */ - __Pyx_TraceLine(1600,0,__PYX_ERR(5, 1600, __pyx_L1_error)) switch ((__pyx_v_c_name[0])) { case '\t': case '\n': @@ -37231,18 +35534,17 @@ static int __pyx_f_4lxml_5etree__htmlNameIsValid(const xmlChar *__pyx_v_c_name) case '<': case '>': - /* "src/lxml/apihelpers.pxi":1601 + /* "src/lxml/apihelpers.pxi":1636 * while c_name[0] != c'\0': * if c_name[0] in b'&<>/"\'\t\n\x0B\x0C\r ': * return 0 # <<<<<<<<<<<<<< * c_name += 1 * return 1 */ - __Pyx_TraceLine(1601,0,__PYX_ERR(5, 1601, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1600 + /* "src/lxml/apihelpers.pxi":1635 * return 0 * while c_name[0] != c'\0': * if c_name[0] in b'&<>/"\'\t\n\x0B\x0C\r ': # <<<<<<<<<<<<<< @@ -37253,29 +35555,27 @@ static int __pyx_f_4lxml_5etree__htmlNameIsValid(const xmlChar *__pyx_v_c_name) default: break; } - /* "src/lxml/apihelpers.pxi":1602 + /* "src/lxml/apihelpers.pxi":1637 * if c_name[0] in b'&<>/"\'\t\n\x0B\x0C\r ': * return 0 * c_name += 1 # <<<<<<<<<<<<<< * return 1 * */ - __Pyx_TraceLine(1602,0,__PYX_ERR(5, 1602, __pyx_L1_error)) __pyx_v_c_name = (__pyx_v_c_name + 1); } - /* "src/lxml/apihelpers.pxi":1603 + /* "src/lxml/apihelpers.pxi":1638 * return 0 * c_name += 1 * return 1 # <<<<<<<<<<<<<< * * cdef bint _characterReferenceIsValid(const_xmlChar* c_name): */ - __Pyx_TraceLine(1603,0,__PYX_ERR(5, 1603, __pyx_L1_error)) __pyx_r = 1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1596 + /* "src/lxml/apihelpers.pxi":1631 * return tree.xmlValidateNameValue(c_name) * * cdef int _htmlNameIsValid(const_xmlChar* c_name): # <<<<<<<<<<<<<< @@ -37284,16 +35584,12 @@ static int __pyx_f_4lxml_5etree__htmlNameIsValid(const xmlChar *__pyx_v_c_name) */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._htmlNameIsValid", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1605 +/* "src/lxml/apihelpers.pxi":1640 * return 1 * * cdef bint _characterReferenceIsValid(const_xmlChar* c_name): # <<<<<<<<<<<<<< @@ -37304,45 +35600,40 @@ static int __pyx_f_4lxml_5etree__htmlNameIsValid(const xmlChar *__pyx_v_c_name) static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_v_c_name) { int __pyx_v_is_hex; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_characterReferenceIsValid", 0); - __Pyx_TraceCall("_characterReferenceIsValid", __pyx_f[5], 1605, 0, __PYX_ERR(5, 1605, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1607 + /* "src/lxml/apihelpers.pxi":1642 * cdef bint _characterReferenceIsValid(const_xmlChar* c_name): * cdef bint is_hex * if c_name[0] == c'x': # <<<<<<<<<<<<<< * c_name += 1 * is_hex = 1 */ - __Pyx_TraceLine(1607,0,__PYX_ERR(5, 1607, __pyx_L1_error)) __pyx_t_1 = (((__pyx_v_c_name[0]) == 'x') != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1608 + /* "src/lxml/apihelpers.pxi":1643 * cdef bint is_hex * if c_name[0] == c'x': * c_name += 1 # <<<<<<<<<<<<<< * is_hex = 1 * else: */ - __Pyx_TraceLine(1608,0,__PYX_ERR(5, 1608, __pyx_L1_error)) __pyx_v_c_name = (__pyx_v_c_name + 1); - /* "src/lxml/apihelpers.pxi":1609 + /* "src/lxml/apihelpers.pxi":1644 * if c_name[0] == c'x': * c_name += 1 * is_hex = 1 # <<<<<<<<<<<<<< * else: * is_hex = 0 */ - __Pyx_TraceLine(1609,0,__PYX_ERR(5, 1609, __pyx_L1_error)) __pyx_v_is_hex = 1; - /* "src/lxml/apihelpers.pxi":1607 + /* "src/lxml/apihelpers.pxi":1642 * cdef bint _characterReferenceIsValid(const_xmlChar* c_name): * cdef bint is_hex * if c_name[0] == c'x': # <<<<<<<<<<<<<< @@ -37352,42 +35643,39 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ goto __pyx_L3; } - /* "src/lxml/apihelpers.pxi":1611 + /* "src/lxml/apihelpers.pxi":1646 * is_hex = 1 * else: * is_hex = 0 # <<<<<<<<<<<<<< * if c_name[0] == c'\0': * return 0 */ - __Pyx_TraceLine(1611,0,__PYX_ERR(5, 1611, __pyx_L1_error)) /*else*/ { __pyx_v_is_hex = 0; } __pyx_L3:; - /* "src/lxml/apihelpers.pxi":1612 + /* "src/lxml/apihelpers.pxi":1647 * else: * is_hex = 0 * if c_name[0] == c'\0': # <<<<<<<<<<<<<< * return 0 * while c_name[0] != c'\0': */ - __Pyx_TraceLine(1612,0,__PYX_ERR(5, 1612, __pyx_L1_error)) __pyx_t_1 = (((__pyx_v_c_name[0]) == '\x00') != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1613 + /* "src/lxml/apihelpers.pxi":1648 * is_hex = 0 * if c_name[0] == c'\0': * return 0 # <<<<<<<<<<<<<< * while c_name[0] != c'\0': * if c_name[0] < c'0' or c_name[0] > c'9': */ - __Pyx_TraceLine(1613,0,__PYX_ERR(5, 1613, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1612 + /* "src/lxml/apihelpers.pxi":1647 * else: * is_hex = 0 * if c_name[0] == c'\0': # <<<<<<<<<<<<<< @@ -37396,26 +35684,24 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ */ } - /* "src/lxml/apihelpers.pxi":1614 + /* "src/lxml/apihelpers.pxi":1649 * if c_name[0] == c'\0': * return 0 * while c_name[0] != c'\0': # <<<<<<<<<<<<<< * if c_name[0] < c'0' or c_name[0] > c'9': * if not is_hex: */ - __Pyx_TraceLine(1614,0,__PYX_ERR(5, 1614, __pyx_L1_error)) while (1) { __pyx_t_1 = (((__pyx_v_c_name[0]) != '\x00') != 0); if (!__pyx_t_1) break; - /* "src/lxml/apihelpers.pxi":1615 + /* "src/lxml/apihelpers.pxi":1650 * return 0 * while c_name[0] != c'\0': * if c_name[0] < c'0' or c_name[0] > c'9': # <<<<<<<<<<<<<< * if not is_hex: * return 0 */ - __Pyx_TraceLine(1615,0,__PYX_ERR(5, 1615, __pyx_L1_error)) __pyx_t_2 = (((__pyx_v_c_name[0]) < '0') != 0); if (!__pyx_t_2) { } else { @@ -37427,29 +35713,27 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ __pyx_L8_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1616 + /* "src/lxml/apihelpers.pxi":1651 * while c_name[0] != c'\0': * if c_name[0] < c'0' or c_name[0] > c'9': * if not is_hex: # <<<<<<<<<<<<<< * return 0 * if not (c'a' <= c_name[0] <= c'f'): */ - __Pyx_TraceLine(1616,0,__PYX_ERR(5, 1616, __pyx_L1_error)) __pyx_t_1 = ((!(__pyx_v_is_hex != 0)) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1617 + /* "src/lxml/apihelpers.pxi":1652 * if c_name[0] < c'0' or c_name[0] > c'9': * if not is_hex: * return 0 # <<<<<<<<<<<<<< * if not (c'a' <= c_name[0] <= c'f'): * if not (c'A' <= c_name[0] <= c'F'): */ - __Pyx_TraceLine(1617,0,__PYX_ERR(5, 1617, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1616 + /* "src/lxml/apihelpers.pxi":1651 * while c_name[0] != c'\0': * if c_name[0] < c'0' or c_name[0] > c'9': * if not is_hex: # <<<<<<<<<<<<<< @@ -37458,14 +35742,13 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ */ } - /* "src/lxml/apihelpers.pxi":1618 + /* "src/lxml/apihelpers.pxi":1653 * if not is_hex: * return 0 * if not (c'a' <= c_name[0] <= c'f'): # <<<<<<<<<<<<<< * if not (c'A' <= c_name[0] <= c'F'): * return 0 */ - __Pyx_TraceLine(1618,0,__PYX_ERR(5, 1618, __pyx_L1_error)) __pyx_t_1 = ('a' <= (__pyx_v_c_name[0])); if (__pyx_t_1) { __pyx_t_1 = ((__pyx_v_c_name[0]) <= 'f'); @@ -37473,14 +35756,13 @@ 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":1619 + /* "src/lxml/apihelpers.pxi":1654 * return 0 * if not (c'a' <= c_name[0] <= c'f'): * if not (c'A' <= c_name[0] <= c'F'): # <<<<<<<<<<<<<< * return 0 * c_name += 1 */ - __Pyx_TraceLine(1619,0,__PYX_ERR(5, 1619, __pyx_L1_error)) __pyx_t_2 = ('A' <= (__pyx_v_c_name[0])); if (__pyx_t_2) { __pyx_t_2 = ((__pyx_v_c_name[0]) <= 'F'); @@ -37488,18 +35770,17 @@ 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":1620 + /* "src/lxml/apihelpers.pxi":1655 * if not (c'a' <= c_name[0] <= c'f'): * if not (c'A' <= c_name[0] <= c'F'): * return 0 # <<<<<<<<<<<<<< * c_name += 1 * return 1 */ - __Pyx_TraceLine(1620,0,__PYX_ERR(5, 1620, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1619 + /* "src/lxml/apihelpers.pxi":1654 * return 0 * if not (c'a' <= c_name[0] <= c'f'): * if not (c'A' <= c_name[0] <= c'F'): # <<<<<<<<<<<<<< @@ -37508,7 +35789,7 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ */ } - /* "src/lxml/apihelpers.pxi":1618 + /* "src/lxml/apihelpers.pxi":1653 * if not is_hex: * return 0 * if not (c'a' <= c_name[0] <= c'f'): # <<<<<<<<<<<<<< @@ -37517,7 +35798,7 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ */ } - /* "src/lxml/apihelpers.pxi":1615 + /* "src/lxml/apihelpers.pxi":1650 * return 0 * while c_name[0] != c'\0': * if c_name[0] < c'0' or c_name[0] > c'9': # <<<<<<<<<<<<<< @@ -37526,29 +35807,27 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ */ } - /* "src/lxml/apihelpers.pxi":1621 + /* "src/lxml/apihelpers.pxi":1656 * if not (c'A' <= c_name[0] <= c'F'): * return 0 * c_name += 1 # <<<<<<<<<<<<<< * return 1 * */ - __Pyx_TraceLine(1621,0,__PYX_ERR(5, 1621, __pyx_L1_error)) __pyx_v_c_name = (__pyx_v_c_name + 1); } - /* "src/lxml/apihelpers.pxi":1622 + /* "src/lxml/apihelpers.pxi":1657 * return 0 * c_name += 1 * return 1 # <<<<<<<<<<<<<< * * cdef int _tagValidOrRaise(tag_utf) except -1: */ - __Pyx_TraceLine(1622,0,__PYX_ERR(5, 1622, __pyx_L1_error)) __pyx_r = 1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1605 + /* "src/lxml/apihelpers.pxi":1640 * return 1 * * cdef bint _characterReferenceIsValid(const_xmlChar* c_name): # <<<<<<<<<<<<<< @@ -37557,16 +35836,12 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._characterReferenceIsValid", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1624 +/* "src/lxml/apihelpers.pxi":1659 * return 1 * * cdef int _tagValidOrRaise(tag_utf) except -1: # <<<<<<<<<<<<<< @@ -37576,53 +35851,49 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ static int __pyx_f_4lxml_5etree__tagValidOrRaise(PyObject *__pyx_v_tag_utf) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_tagValidOrRaise", 0); - __Pyx_TraceCall("_tagValidOrRaise", __pyx_f[5], 1624, 0, __PYX_ERR(5, 1624, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1625 + /* "src/lxml/apihelpers.pxi":1660 * * cdef int _tagValidOrRaise(tag_utf) except -1: * if not _pyXmlNameIsValid(tag_utf): # <<<<<<<<<<<<<< * raise ValueError(f"Invalid tag name {(tag_utf).decode('utf8')!r}") * return 0 */ - __Pyx_TraceLine(1625,0,__PYX_ERR(5, 1625, __pyx_L1_error)) __pyx_t_1 = ((!(__pyx_f_4lxml_5etree__pyXmlNameIsValid(__pyx_v_tag_utf) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "src/lxml/apihelpers.pxi":1626 + /* "src/lxml/apihelpers.pxi":1661 * cdef int _tagValidOrRaise(tag_utf) except -1: * if not _pyXmlNameIsValid(tag_utf): * raise ValueError(f"Invalid tag name {(tag_utf).decode('utf8')!r}") # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(1626,0,__PYX_ERR(5, 1626, __pyx_L1_error)) if (unlikely(__pyx_v_tag_utf == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); - __PYX_ERR(5, 1626, __pyx_L1_error) + __PYX_ERR(5, 1661, __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, 1626, __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, 1661, __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, 1626, __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, 1661, __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, 1626, __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, 1661, __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, 1626, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1661, __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, 1626, __pyx_L1_error) + __PYX_ERR(5, 1661, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1625 + /* "src/lxml/apihelpers.pxi":1660 * * cdef int _tagValidOrRaise(tag_utf) except -1: * if not _pyXmlNameIsValid(tag_utf): # <<<<<<<<<<<<<< @@ -37631,18 +35902,17 @@ static int __pyx_f_4lxml_5etree__tagValidOrRaise(PyObject *__pyx_v_tag_utf) { */ } - /* "src/lxml/apihelpers.pxi":1627 + /* "src/lxml/apihelpers.pxi":1662 * if not _pyXmlNameIsValid(tag_utf): * raise ValueError(f"Invalid tag name {(tag_utf).decode('utf8')!r}") * return 0 # <<<<<<<<<<<<<< * * cdef int _htmlTagValidOrRaise(tag_utf) except -1: */ - __Pyx_TraceLine(1627,0,__PYX_ERR(5, 1627, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1624 + /* "src/lxml/apihelpers.pxi":1659 * return 1 * * cdef int _tagValidOrRaise(tag_utf) except -1: # <<<<<<<<<<<<<< @@ -37657,12 +35927,11 @@ static int __pyx_f_4lxml_5etree__tagValidOrRaise(PyObject *__pyx_v_tag_utf) { __Pyx_AddTraceback("lxml.etree._tagValidOrRaise", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1629 +/* "src/lxml/apihelpers.pxi":1664 * return 0 * * cdef int _htmlTagValidOrRaise(tag_utf) except -1: # <<<<<<<<<<<<<< @@ -37672,53 +35941,49 @@ static int __pyx_f_4lxml_5etree__tagValidOrRaise(PyObject *__pyx_v_tag_utf) { static int __pyx_f_4lxml_5etree__htmlTagValidOrRaise(PyObject *__pyx_v_tag_utf) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_htmlTagValidOrRaise", 0); - __Pyx_TraceCall("_htmlTagValidOrRaise", __pyx_f[5], 1629, 0, __PYX_ERR(5, 1629, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1630 + /* "src/lxml/apihelpers.pxi":1665 * * cdef int _htmlTagValidOrRaise(tag_utf) except -1: * if not _pyHtmlNameIsValid(tag_utf): # <<<<<<<<<<<<<< * raise ValueError(f"Invalid HTML tag name {(tag_utf).decode('utf8')!r}") * return 0 */ - __Pyx_TraceLine(1630,0,__PYX_ERR(5, 1630, __pyx_L1_error)) __pyx_t_1 = ((!(__pyx_f_4lxml_5etree__pyHtmlNameIsValid(__pyx_v_tag_utf) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "src/lxml/apihelpers.pxi":1631 + /* "src/lxml/apihelpers.pxi":1666 * cdef int _htmlTagValidOrRaise(tag_utf) except -1: * if not _pyHtmlNameIsValid(tag_utf): * raise ValueError(f"Invalid HTML tag name {(tag_utf).decode('utf8')!r}") # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(1631,0,__PYX_ERR(5, 1631, __pyx_L1_error)) if (unlikely(__pyx_v_tag_utf == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); - __PYX_ERR(5, 1631, __pyx_L1_error) + __PYX_ERR(5, 1666, __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, 1631, __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, 1666, __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, 1631, __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, 1666, __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, 1631, __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, 1666, __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, 1631, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1666, __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, 1631, __pyx_L1_error) + __PYX_ERR(5, 1666, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1630 + /* "src/lxml/apihelpers.pxi":1665 * * cdef int _htmlTagValidOrRaise(tag_utf) except -1: * if not _pyHtmlNameIsValid(tag_utf): # <<<<<<<<<<<<<< @@ -37727,18 +35992,17 @@ static int __pyx_f_4lxml_5etree__htmlTagValidOrRaise(PyObject *__pyx_v_tag_utf) */ } - /* "src/lxml/apihelpers.pxi":1632 + /* "src/lxml/apihelpers.pxi":1667 * if not _pyHtmlNameIsValid(tag_utf): * raise ValueError(f"Invalid HTML tag name {(tag_utf).decode('utf8')!r}") * return 0 # <<<<<<<<<<<<<< * * cdef int _attributeValidOrRaise(name_utf) except -1: */ - __Pyx_TraceLine(1632,0,__PYX_ERR(5, 1632, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1629 + /* "src/lxml/apihelpers.pxi":1664 * return 0 * * cdef int _htmlTagValidOrRaise(tag_utf) except -1: # <<<<<<<<<<<<<< @@ -37753,12 +36017,11 @@ static int __pyx_f_4lxml_5etree__htmlTagValidOrRaise(PyObject *__pyx_v_tag_utf) __Pyx_AddTraceback("lxml.etree._htmlTagValidOrRaise", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1634 +/* "src/lxml/apihelpers.pxi":1669 * return 0 * * cdef int _attributeValidOrRaise(name_utf) except -1: # <<<<<<<<<<<<<< @@ -37768,53 +36031,49 @@ static int __pyx_f_4lxml_5etree__htmlTagValidOrRaise(PyObject *__pyx_v_tag_utf) static int __pyx_f_4lxml_5etree__attributeValidOrRaise(PyObject *__pyx_v_name_utf) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_attributeValidOrRaise", 0); - __Pyx_TraceCall("_attributeValidOrRaise", __pyx_f[5], 1634, 0, __PYX_ERR(5, 1634, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1635 + /* "src/lxml/apihelpers.pxi":1670 * * cdef int _attributeValidOrRaise(name_utf) except -1: * if not _pyXmlNameIsValid(name_utf): # <<<<<<<<<<<<<< * raise ValueError(f"Invalid attribute name {(name_utf).decode('utf8')!r}") * return 0 */ - __Pyx_TraceLine(1635,0,__PYX_ERR(5, 1635, __pyx_L1_error)) __pyx_t_1 = ((!(__pyx_f_4lxml_5etree__pyXmlNameIsValid(__pyx_v_name_utf) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "src/lxml/apihelpers.pxi":1636 + /* "src/lxml/apihelpers.pxi":1671 * cdef int _attributeValidOrRaise(name_utf) except -1: * if not _pyXmlNameIsValid(name_utf): * raise ValueError(f"Invalid attribute name {(name_utf).decode('utf8')!r}") # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(1636,0,__PYX_ERR(5, 1636, __pyx_L1_error)) if (unlikely(__pyx_v_name_utf == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); - __PYX_ERR(5, 1636, __pyx_L1_error) + __PYX_ERR(5, 1671, __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, 1636, __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, 1671, __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, 1636, __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, 1671, __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, 1636, __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, 1671, __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, 1636, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1671, __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, 1636, __pyx_L1_error) + __PYX_ERR(5, 1671, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1635 + /* "src/lxml/apihelpers.pxi":1670 * * cdef int _attributeValidOrRaise(name_utf) except -1: * if not _pyXmlNameIsValid(name_utf): # <<<<<<<<<<<<<< @@ -37823,18 +36082,17 @@ static int __pyx_f_4lxml_5etree__attributeValidOrRaise(PyObject *__pyx_v_name_ut */ } - /* "src/lxml/apihelpers.pxi":1637 + /* "src/lxml/apihelpers.pxi":1672 * if not _pyXmlNameIsValid(name_utf): * raise ValueError(f"Invalid attribute name {(name_utf).decode('utf8')!r}") * return 0 # <<<<<<<<<<<<<< * * cdef int _prefixValidOrRaise(tag_utf) except -1: */ - __Pyx_TraceLine(1637,0,__PYX_ERR(5, 1637, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1634 + /* "src/lxml/apihelpers.pxi":1669 * return 0 * * cdef int _attributeValidOrRaise(name_utf) except -1: # <<<<<<<<<<<<<< @@ -37849,12 +36107,11 @@ static int __pyx_f_4lxml_5etree__attributeValidOrRaise(PyObject *__pyx_v_name_ut __Pyx_AddTraceback("lxml.etree._attributeValidOrRaise", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1639 +/* "src/lxml/apihelpers.pxi":1674 * return 0 * * cdef int _prefixValidOrRaise(tag_utf) except -1: # <<<<<<<<<<<<<< @@ -37864,53 +36121,49 @@ static int __pyx_f_4lxml_5etree__attributeValidOrRaise(PyObject *__pyx_v_name_ut static int __pyx_f_4lxml_5etree__prefixValidOrRaise(PyObject *__pyx_v_tag_utf) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_prefixValidOrRaise", 0); - __Pyx_TraceCall("_prefixValidOrRaise", __pyx_f[5], 1639, 0, __PYX_ERR(5, 1639, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1640 + /* "src/lxml/apihelpers.pxi":1675 * * cdef int _prefixValidOrRaise(tag_utf) except -1: * if not _pyXmlNameIsValid(tag_utf): # <<<<<<<<<<<<<< * raise ValueError(f"Invalid namespace prefix {(tag_utf).decode('utf8')!r}") * return 0 */ - __Pyx_TraceLine(1640,0,__PYX_ERR(5, 1640, __pyx_L1_error)) __pyx_t_1 = ((!(__pyx_f_4lxml_5etree__pyXmlNameIsValid(__pyx_v_tag_utf) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "src/lxml/apihelpers.pxi":1641 + /* "src/lxml/apihelpers.pxi":1676 * cdef int _prefixValidOrRaise(tag_utf) except -1: * if not _pyXmlNameIsValid(tag_utf): * raise ValueError(f"Invalid namespace prefix {(tag_utf).decode('utf8')!r}") # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(1641,0,__PYX_ERR(5, 1641, __pyx_L1_error)) if (unlikely(__pyx_v_tag_utf == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); - __PYX_ERR(5, 1641, __pyx_L1_error) + __PYX_ERR(5, 1676, __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, 1641, __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, 1676, __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, 1641, __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, 1676, __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, 1641, __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, 1676, __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, 1641, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1676, __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, 1641, __pyx_L1_error) + __PYX_ERR(5, 1676, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1640 + /* "src/lxml/apihelpers.pxi":1675 * * cdef int _prefixValidOrRaise(tag_utf) except -1: * if not _pyXmlNameIsValid(tag_utf): # <<<<<<<<<<<<<< @@ -37919,18 +36172,17 @@ static int __pyx_f_4lxml_5etree__prefixValidOrRaise(PyObject *__pyx_v_tag_utf) { */ } - /* "src/lxml/apihelpers.pxi":1642 + /* "src/lxml/apihelpers.pxi":1677 * if not _pyXmlNameIsValid(tag_utf): * raise ValueError(f"Invalid namespace prefix {(tag_utf).decode('utf8')!r}") * return 0 # <<<<<<<<<<<<<< * * cdef int _uriValidOrRaise(uri_utf) except -1: */ - __Pyx_TraceLine(1642,0,__PYX_ERR(5, 1642, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1639 + /* "src/lxml/apihelpers.pxi":1674 * return 0 * * cdef int _prefixValidOrRaise(tag_utf) except -1: # <<<<<<<<<<<<<< @@ -37945,12 +36197,11 @@ static int __pyx_f_4lxml_5etree__prefixValidOrRaise(PyObject *__pyx_v_tag_utf) { __Pyx_AddTraceback("lxml.etree._prefixValidOrRaise", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1644 +/* "src/lxml/apihelpers.pxi":1679 * return 0 * * cdef int _uriValidOrRaise(uri_utf) except -1: # <<<<<<<<<<<<<< @@ -37961,63 +36212,58 @@ static int __pyx_f_4lxml_5etree__prefixValidOrRaise(PyObject *__pyx_v_tag_utf) { static int __pyx_f_4lxml_5etree__uriValidOrRaise(PyObject *__pyx_v_uri_utf) { xmlURI *__pyx_v_c_uri; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_uriValidOrRaise", 0); - __Pyx_TraceCall("_uriValidOrRaise", __pyx_f[5], 1644, 0, __PYX_ERR(5, 1644, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1645 + /* "src/lxml/apihelpers.pxi":1680 * * cdef int _uriValidOrRaise(uri_utf) except -1: * 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}") */ - __Pyx_TraceLine(1645,0,__PYX_ERR(5, 1645, __pyx_L1_error)) __pyx_v_c_uri = xmlParseURI(PyBytes_AS_STRING(__pyx_v_uri_utf)); - /* "src/lxml/apihelpers.pxi":1646 + /* "src/lxml/apihelpers.pxi":1681 * cdef int _uriValidOrRaise(uri_utf) except -1: * 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}") * uri.xmlFreeURI(c_uri) */ - __Pyx_TraceLine(1646,0,__PYX_ERR(5, 1646, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_uri == NULL) != 0); if (unlikely(__pyx_t_1)) { - /* "src/lxml/apihelpers.pxi":1647 + /* "src/lxml/apihelpers.pxi":1682 * 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}") # <<<<<<<<<<<<<< * uri.xmlFreeURI(c_uri) * return 0 */ - __Pyx_TraceLine(1647,0,__PYX_ERR(5, 1647, __pyx_L1_error)) if (unlikely(__pyx_v_uri_utf == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); - __PYX_ERR(5, 1647, __pyx_L1_error) + __PYX_ERR(5, 1682, __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, 1647, __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, 1682, __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, 1647, __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, 1682, __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, 1647, __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, 1682, __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, 1647, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1682, __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, 1647, __pyx_L1_error) + __PYX_ERR(5, 1682, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1646 + /* "src/lxml/apihelpers.pxi":1681 * cdef int _uriValidOrRaise(uri_utf) except -1: * cdef uri.xmlURI* c_uri = uri.xmlParseURI(_cstr(uri_utf)) * if c_uri is NULL: # <<<<<<<<<<<<<< @@ -38026,28 +36272,26 @@ static int __pyx_f_4lxml_5etree__uriValidOrRaise(PyObject *__pyx_v_uri_utf) { */ } - /* "src/lxml/apihelpers.pxi":1648 + /* "src/lxml/apihelpers.pxi":1683 * if c_uri is NULL: * raise ValueError(f"Invalid namespace URI {(uri_utf).decode('utf8')!r}") * uri.xmlFreeURI(c_uri) # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(1648,0,__PYX_ERR(5, 1648, __pyx_L1_error)) xmlFreeURI(__pyx_v_c_uri); - /* "src/lxml/apihelpers.pxi":1649 + /* "src/lxml/apihelpers.pxi":1684 * raise ValueError(f"Invalid namespace URI {(uri_utf).decode('utf8')!r}") * uri.xmlFreeURI(c_uri) * return 0 # <<<<<<<<<<<<<< * * cdef inline object _namespacedName(xmlNode* c_node): */ - __Pyx_TraceLine(1649,0,__PYX_ERR(5, 1649, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1644 + /* "src/lxml/apihelpers.pxi":1679 * return 0 * * cdef int _uriValidOrRaise(uri_utf) except -1: # <<<<<<<<<<<<<< @@ -38062,12 +36306,11 @@ static int __pyx_f_4lxml_5etree__uriValidOrRaise(PyObject *__pyx_v_uri_utf) { __Pyx_AddTraceback("lxml.etree._uriValidOrRaise", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1651 +/* "src/lxml/apihelpers.pxi":1686 * return 0 * * cdef inline object _namespacedName(xmlNode* c_node): # <<<<<<<<<<<<<< @@ -38077,28 +36320,25 @@ static int __pyx_f_4lxml_5etree__uriValidOrRaise(PyObject *__pyx_v_uri_utf) { static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree__namespacedName(xmlNode *__pyx_v_c_node) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_namespacedName", 0); - __Pyx_TraceCall("_namespacedName", __pyx_f[5], 1651, 0, __PYX_ERR(5, 1651, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1652 + /* "src/lxml/apihelpers.pxi":1687 * * cdef inline object _namespacedName(xmlNode* c_node): * return _namespacedNameFromNsName(_getNs(c_node), c_node.name) # <<<<<<<<<<<<<< * * cdef object _namespacedNameFromNsName(const_xmlChar* href, const_xmlChar* name): */ - __Pyx_TraceLine(1652,0,__PYX_ERR(5, 1652, __pyx_L1_error)) __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, 1652, __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, 1687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1651 + /* "src/lxml/apihelpers.pxi":1686 * return 0 * * cdef inline object _namespacedName(xmlNode* c_node): # <<<<<<<<<<<<<< @@ -38113,12 +36353,11 @@ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree__namespacedName(xmlNode *__p __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1654 +/* "src/lxml/apihelpers.pxi":1689 * return _namespacedNameFromNsName(_getNs(c_node), c_node.name) * * cdef object _namespacedNameFromNsName(const_xmlChar* href, const_xmlChar* name): # <<<<<<<<<<<<<< @@ -38129,41 +36368,39 @@ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree__namespacedName(xmlNode *__p static PyObject *__pyx_f_4lxml_5etree__namespacedNameFromNsName(const xmlChar *__pyx_v_href, const xmlChar *__pyx_v_name) { PyObject *__pyx_v_s = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; + const xmlChar *__pyx_t_4; + Py_ssize_t __pyx_t_5; __Pyx_RefNannySetupContext("_namespacedNameFromNsName", 0); - __Pyx_TraceCall("_namespacedNameFromNsName", __pyx_f[5], 1654, 0, __PYX_ERR(5, 1654, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1655 + /* "src/lxml/apihelpers.pxi":1690 * * cdef object _namespacedNameFromNsName(const_xmlChar* href, const_xmlChar* name): * if href is NULL: # <<<<<<<<<<<<<< * return funicode(name) * elif not python.IS_PYPY and (python.LXML_UNICODE_STRINGS or isutf8(name) or isutf8(href)): */ - __Pyx_TraceLine(1655,0,__PYX_ERR(5, 1655, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_href == NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1656 + /* "src/lxml/apihelpers.pxi":1691 * cdef object _namespacedNameFromNsName(const_xmlChar* href, const_xmlChar* name): * if href is NULL: * 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) */ - __Pyx_TraceLine(1656,0,__PYX_ERR(5, 1656, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1656, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1655 + /* "src/lxml/apihelpers.pxi":1690 * * cdef object _namespacedNameFromNsName(const_xmlChar* href, const_xmlChar* name): * if href is NULL: # <<<<<<<<<<<<<< @@ -38172,14 +36409,13 @@ static PyObject *__pyx_f_4lxml_5etree__namespacedNameFromNsName(const xmlChar *_ */ } - /* "src/lxml/apihelpers.pxi":1657 + /* "src/lxml/apihelpers.pxi":1692 * if href is NULL: * 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) * else: */ - __Pyx_TraceLine(1657,0,__PYX_ERR(5, 1657, __pyx_L1_error)) __pyx_t_3 = ((!(IS_PYPY != 0)) != 0); if (__pyx_t_3) { } else { @@ -38203,22 +36439,21 @@ static PyObject *__pyx_f_4lxml_5etree__namespacedNameFromNsName(const xmlChar *_ __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1658 + /* "src/lxml/apihelpers.pxi":1693 * 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) # <<<<<<<<<<<<<< * else: * s = python.PyBytes_FromFormat("{%s}%s", href, name) */ - __Pyx_TraceLine(1658,0,__PYX_ERR(5, 1658, __pyx_L1_error)) __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, 1658, __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, 1693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1657 + /* "src/lxml/apihelpers.pxi":1692 * if href is NULL: * return funicode(name) * elif not python.IS_PYPY and (python.LXML_UNICODE_STRINGS or isutf8(name) or isutf8(href)): # <<<<<<<<<<<<<< @@ -38227,28 +36462,26 @@ static PyObject *__pyx_f_4lxml_5etree__namespacedNameFromNsName(const xmlChar *_ */ } - /* "src/lxml/apihelpers.pxi":1660 + /* "src/lxml/apihelpers.pxi":1695 * return python.PyUnicode_FromFormat("{%s}%s", href, name) * else: * s = python.PyBytes_FromFormat("{%s}%s", href, name) # <<<<<<<<<<<<<< - * if python.IS_PYPY and (python.LXML_UNICODE_STRINGS or isutf8(_xcstr(s))): + * if python.IS_PYPY and (python.LXML_UNICODE_STRINGS or isutf8l(s, len(s))): * return (s).decode('utf8') */ - __Pyx_TraceLine(1660,0,__PYX_ERR(5, 1660, __pyx_L1_error)) /*else*/ { - __pyx_t_2 = PyBytes_FromFormat(((char *)"{%s}%s"), __pyx_v_href, __pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1660, __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, 1695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_s = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "src/lxml/apihelpers.pxi":1661 + /* "src/lxml/apihelpers.pxi":1696 * else: * s = python.PyBytes_FromFormat("{%s}%s", href, name) - * if python.IS_PYPY and (python.LXML_UNICODE_STRINGS or isutf8(_xcstr(s))): # <<<<<<<<<<<<<< + * if python.IS_PYPY and (python.LXML_UNICODE_STRINGS or isutf8l(s, len(s))): # <<<<<<<<<<<<<< * return (s).decode('utf8') * else: */ - __Pyx_TraceLine(1661,0,__PYX_ERR(5, 1661, __pyx_L1_error)) __pyx_t_3 = (IS_PYPY != 0); if (__pyx_t_3) { } else { @@ -38261,47 +36494,55 @@ static PyObject *__pyx_f_4lxml_5etree__namespacedNameFromNsName(const xmlChar *_ __pyx_t_1 = __pyx_t_3; goto __pyx_L9_bool_binop_done; } - __pyx_t_3 = (__pyx_f_4lxml_5etree_isutf8((const xmlChar*)PyBytes_AS_STRING(__pyx_v_s)) != 0); + if (unlikely(__pyx_v_s == Py_None)) { + PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); + __PYX_ERR(5, 1696, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_PyBytes_AsUString(__pyx_v_s); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(5, 1696, __pyx_L1_error) + if (unlikely(__pyx_v_s == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(5, 1696, __pyx_L1_error) + } + __pyx_t_5 = PyBytes_GET_SIZE(__pyx_v_s); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(5, 1696, __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":1662 + /* "src/lxml/apihelpers.pxi":1697 * s = python.PyBytes_FromFormat("{%s}%s", href, name) - * if python.IS_PYPY and (python.LXML_UNICODE_STRINGS or isutf8(_xcstr(s))): + * if python.IS_PYPY and (python.LXML_UNICODE_STRINGS or isutf8l(s, len(s))): * return (s).decode('utf8') # <<<<<<<<<<<<<< * else: * return s */ - __Pyx_TraceLine(1662,0,__PYX_ERR(5, 1662, __pyx_L1_error)) __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, 1662, __pyx_L1_error) + __PYX_ERR(5, 1697, __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, 1662, __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, 1697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1661 + /* "src/lxml/apihelpers.pxi":1696 * else: * s = python.PyBytes_FromFormat("{%s}%s", href, name) - * if python.IS_PYPY and (python.LXML_UNICODE_STRINGS or isutf8(_xcstr(s))): # <<<<<<<<<<<<<< + * if python.IS_PYPY and (python.LXML_UNICODE_STRINGS or isutf8l(s, len(s))): # <<<<<<<<<<<<<< * return (s).decode('utf8') * else: */ } - /* "src/lxml/apihelpers.pxi":1664 + /* "src/lxml/apihelpers.pxi":1699 * return (s).decode('utf8') * else: * return s # <<<<<<<<<<<<<< * * cdef _getFilenameForFile(source): */ - __Pyx_TraceLine(1664,0,__PYX_ERR(5, 1664, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_s); @@ -38310,7 +36551,7 @@ static PyObject *__pyx_f_4lxml_5etree__namespacedNameFromNsName(const xmlChar *_ } } - /* "src/lxml/apihelpers.pxi":1654 + /* "src/lxml/apihelpers.pxi":1689 * return _namespacedNameFromNsName(_getNs(c_node), c_node.name) * * cdef object _namespacedNameFromNsName(const_xmlChar* href, const_xmlChar* name): # <<<<<<<<<<<<<< @@ -38326,12 +36567,11 @@ static PyObject *__pyx_f_4lxml_5etree__namespacedNameFromNsName(const xmlChar *_ __pyx_L0:; __Pyx_XDECREF(__pyx_v_s); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1666 +/* "src/lxml/apihelpers.pxi":1701 * return s * * cdef _getFilenameForFile(source): # <<<<<<<<<<<<<< @@ -38342,7 +36582,6 @@ static PyObject *__pyx_f_4lxml_5etree__namespacedNameFromNsName(const xmlChar *_ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_source) { PyObject *__pyx_v_filename = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -38351,18 +36590,15 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; - PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("_getFilenameForFile", 0); - __Pyx_TraceCall("_getFilenameForFile", __pyx_f[5], 1666, 0, __PYX_ERR(5, 1666, __pyx_L1_error)); - /* "src/lxml/apihelpers.pxi":1672 + /* "src/lxml/apihelpers.pxi":1707 * """ * # urllib2 provides a geturl() method * try: # <<<<<<<<<<<<<< * return source.geturl() * except: */ - __Pyx_TraceLine(1672,0,__PYX_ERR(5, 1672, __pyx_L3_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -38372,16 +36608,15 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "src/lxml/apihelpers.pxi":1673 + /* "src/lxml/apihelpers.pxi":1708 * # urllib2 provides a geturl() method * try: * return source.geturl() # <<<<<<<<<<<<<< * except: * pass */ - __Pyx_TraceLine(1673,0,__PYX_ERR(5, 1673, __pyx_L3_error)) __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, 1673, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_geturl); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1708, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -38393,19 +36628,16 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1673, __pyx_L3_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1673, __pyx_L3_error) - } + __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, 1708, __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":1672 + /* "src/lxml/apihelpers.pxi":1707 * """ * # urllib2 provides a geturl() method * try: # <<<<<<<<<<<<<< @@ -38418,21 +36650,20 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1674 + /* "src/lxml/apihelpers.pxi":1709 * try: * return source.geturl() * except: # <<<<<<<<<<<<<< * pass * # file instances have a name attribute */ - __Pyx_TraceLine(1674,0,__PYX_ERR(5, 1674, __pyx_L5_except_error)) /*except:*/ { __Pyx_ErrRestore(0,0,0); goto __pyx_L4_exception_handled; } - __pyx_L5_except_error:; + __pyx_L7_try_return:; - /* "src/lxml/apihelpers.pxi":1672 + /* "src/lxml/apihelpers.pxi":1707 * """ * # urllib2 provides a geturl() method * try: # <<<<<<<<<<<<<< @@ -38443,12 +36674,6 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); - goto __pyx_L1_error; - __pyx_L7_try_return:; - __Pyx_XGIVEREF(__pyx_t_1); - __Pyx_XGIVEREF(__pyx_t_2); - __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); @@ -38457,14 +36682,13 @@ 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":1677 + /* "src/lxml/apihelpers.pxi":1712 * pass * # file instances have a name attribute * try: # <<<<<<<<<<<<<< * filename = source.name * if _isString(filename): */ - __Pyx_TraceLine(1677,0,__PYX_ERR(5, 1677, __pyx_L9_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -38474,38 +36698,35 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour __Pyx_XGOTREF(__pyx_t_1); /*try:*/ { - /* "src/lxml/apihelpers.pxi":1678 + /* "src/lxml/apihelpers.pxi":1713 * # file instances have a name attribute * try: * filename = source.name # <<<<<<<<<<<<<< * if _isString(filename): * return os_path_abspath(filename) */ - __Pyx_TraceLine(1678,0,__PYX_ERR(5, 1678, __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, 1678, __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, 1713, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_filename = __pyx_t_4; __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1679 + /* "src/lxml/apihelpers.pxi":1714 * try: * filename = source.name * if _isString(filename): # <<<<<<<<<<<<<< * return os_path_abspath(filename) * except: */ - __Pyx_TraceLine(1679,0,__PYX_ERR(5, 1679, __pyx_L9_error)) __pyx_t_7 = (_isString(__pyx_v_filename) != 0); if (__pyx_t_7) { - /* "src/lxml/apihelpers.pxi":1680 + /* "src/lxml/apihelpers.pxi":1715 * filename = source.name * if _isString(filename): * return os_path_abspath(filename) # <<<<<<<<<<<<<< * except: * pass */ - __Pyx_TraceLine(1680,0,__PYX_ERR(5, 1680, __pyx_L9_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_4lxml_5etree_os_path_abspath); __pyx_t_5 = __pyx_v_4lxml_5etree_os_path_abspath; __pyx_t_6 = NULL; @@ -38518,44 +36739,16 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1680, __pyx_L9_error) - __Pyx_GOTREF(__pyx_t_4); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_filename}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1680, __pyx_L9_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_filename}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1680, __pyx_L9_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1680, __pyx_L9_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_v_filename); - __Pyx_GIVEREF(__pyx_v_filename); - PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_filename); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1680, __pyx_L9_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } - } + __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, 1715, __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":1679 + /* "src/lxml/apihelpers.pxi":1714 * try: * filename = source.name * if _isString(filename): # <<<<<<<<<<<<<< @@ -38564,7 +36757,7 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour */ } - /* "src/lxml/apihelpers.pxi":1677 + /* "src/lxml/apihelpers.pxi":1712 * pass * # file instances have a name attribute * try: # <<<<<<<<<<<<<< @@ -38578,25 +36771,23 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour goto __pyx_L14_try_end; __pyx_L9_error:; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1681 + /* "src/lxml/apihelpers.pxi":1716 * if _isString(filename): * return os_path_abspath(filename) * except: # <<<<<<<<<<<<<< * pass * # gzip file instances have a filename attribute (before Py3k) */ - __Pyx_TraceLine(1681,0,__PYX_ERR(5, 1681, __pyx_L11_except_error)) /*except:*/ { __Pyx_ErrRestore(0,0,0); goto __pyx_L10_exception_handled; } - __pyx_L11_except_error:; + __pyx_L13_try_return:; - /* "src/lxml/apihelpers.pxi":1677 + /* "src/lxml/apihelpers.pxi":1712 * pass * # file instances have a name attribute * try: # <<<<<<<<<<<<<< @@ -38607,12 +36798,6 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); - goto __pyx_L1_error; - __pyx_L13_try_return:; - __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_XGIVEREF(__pyx_t_2); - __Pyx_XGIVEREF(__pyx_t_1); - __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); goto __pyx_L0; __pyx_L10_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); @@ -38622,14 +36807,13 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour __pyx_L14_try_end:; } - /* "src/lxml/apihelpers.pxi":1684 + /* "src/lxml/apihelpers.pxi":1719 * pass * # gzip file instances have a filename attribute (before Py3k) * try: # <<<<<<<<<<<<<< * filename = source.filename * if _isString(filename): */ - __Pyx_TraceLine(1684,0,__PYX_ERR(5, 1684, __pyx_L16_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -38639,88 +36823,57 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "src/lxml/apihelpers.pxi":1685 + /* "src/lxml/apihelpers.pxi":1720 * # gzip file instances have a filename attribute (before Py3k) * try: * filename = source.filename # <<<<<<<<<<<<<< * if _isString(filename): * return os_path_abspath(filename) */ - __Pyx_TraceLine(1685,0,__PYX_ERR(5, 1685, __pyx_L16_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1685, __pyx_L16_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1720, __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":1686 + /* "src/lxml/apihelpers.pxi":1721 * try: * filename = source.filename * if _isString(filename): # <<<<<<<<<<<<<< * return os_path_abspath(filename) * except: */ - __Pyx_TraceLine(1686,0,__PYX_ERR(5, 1686, __pyx_L16_error)) __pyx_t_7 = (_isString(__pyx_v_filename) != 0); if (__pyx_t_7) { - /* "src/lxml/apihelpers.pxi":1687 + /* "src/lxml/apihelpers.pxi":1722 * filename = source.filename * if _isString(filename): * return os_path_abspath(filename) # <<<<<<<<<<<<<< * except: * pass */ - __Pyx_TraceLine(1687,0,__PYX_ERR(5, 1687, __pyx_L16_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_4lxml_5etree_os_path_abspath); - __pyx_t_5 = __pyx_v_4lxml_5etree_os_path_abspath; __pyx_t_8 = NULL; + __pyx_t_5 = __pyx_v_4lxml_5etree_os_path_abspath; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_8)) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_8) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1687, __pyx_L16_error) - __Pyx_GOTREF(__pyx_t_4); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_filename}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1687, __pyx_L16_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_filename}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1687, __pyx_L16_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 1687, __pyx_L16_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL; - __Pyx_INCREF(__pyx_v_filename); - __Pyx_GIVEREF(__pyx_v_filename); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_filename); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1687, __pyx_L16_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __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, 1722, __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":1686 + /* "src/lxml/apihelpers.pxi":1721 * try: * filename = source.filename * if _isString(filename): # <<<<<<<<<<<<<< @@ -38729,7 +36882,7 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour */ } - /* "src/lxml/apihelpers.pxi":1684 + /* "src/lxml/apihelpers.pxi":1719 * pass * # gzip file instances have a filename attribute (before Py3k) * try: # <<<<<<<<<<<<<< @@ -38742,26 +36895,24 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L21_try_end; __pyx_L16_error:; - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1688 + /* "src/lxml/apihelpers.pxi":1723 * if _isString(filename): * return os_path_abspath(filename) * except: # <<<<<<<<<<<<<< * pass * # can't determine filename */ - __Pyx_TraceLine(1688,0,__PYX_ERR(5, 1688, __pyx_L18_except_error)) /*except:*/ { __Pyx_ErrRestore(0,0,0); goto __pyx_L17_exception_handled; } - __pyx_L18_except_error:; + __pyx_L20_try_return:; - /* "src/lxml/apihelpers.pxi":1684 + /* "src/lxml/apihelpers.pxi":1719 * pass * # gzip file instances have a filename attribute (before Py3k) * try: # <<<<<<<<<<<<<< @@ -38772,12 +36923,6 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); - goto __pyx_L1_error; - __pyx_L20_try_return:; - __Pyx_XGIVEREF(__pyx_t_1); - __Pyx_XGIVEREF(__pyx_t_2); - __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L17_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); @@ -38787,17 +36932,16 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour __pyx_L21_try_end:; } - /* "src/lxml/apihelpers.pxi":1691 + /* "src/lxml/apihelpers.pxi":1726 * pass * # can't determine filename * return None # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(1691,0,__PYX_ERR(5, 1691, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1666 + /* "src/lxml/apihelpers.pxi":1701 * return s * * cdef _getFilenameForFile(source): # <<<<<<<<<<<<<< @@ -38806,17 +36950,9 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_AddTraceback("lxml.etree._getFilenameForFile", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_filename); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -38846,14 +36982,11 @@ static PyObject *__pyx_pw_4lxml_5etree_3clear_error_log(PyObject *__pyx_self, CY static PyObject *__pyx_pf_4lxml_5etree_2clear_error_log(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__32) __Pyx_RefNannySetupContext("clear_error_log", 0); - __Pyx_TraceCall("clear_error_log", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":21 * current thread. @@ -38862,7 +36995,6 @@ static PyObject *__pyx_pf_4lxml_5etree_2clear_error_log(CYTHON_UNUSED PyObject * * * */ - __Pyx_TraceLine(21,0,__PYX_ERR(1, 21, __pyx_L1_error)) __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__getThreadErrorLog(__pyx_n_u_GlobalErrorLog)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_clear); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 21, __pyx_L1_error) @@ -38878,12 +37010,9 @@ static PyObject *__pyx_pf_4lxml_5etree_2clear_error_log(CYTHON_UNUSED PyObject * __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 21, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 21, __pyx_L1_error) - } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -38907,7 +37036,6 @@ static PyObject *__pyx_pf_4lxml_5etree_2clear_error_log(CYTHON_UNUSED PyObject * __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -38921,10 +37049,8 @@ static PyObject *__pyx_pf_4lxml_5etree_2clear_error_log(CYTHON_UNUSED PyObject * */ static void __pyx_f_4lxml_5etree__initThreadLogging(void) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_initThreadLogging", 0); - __Pyx_TraceCall("_initThreadLogging", __pyx_f[1], 26, 0, __PYX_ERR(1, 26, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":28 * cdef void _initThreadLogging(): @@ -38933,7 +37059,6 @@ static void __pyx_f_4lxml_5etree__initThreadLogging(void) { * * # Divert XSLT error messages to the global XSLT error log instead of stderr. */ - __Pyx_TraceLine(28,0,__PYX_ERR(1, 28, __pyx_L1_error)) __pyx_f_4lxml_5etree__connectGenericErrorLog(Py_None, NULL); /* "src/lxml/xmlerror.pxi":31 @@ -38943,7 +37068,6 @@ static void __pyx_f_4lxml_5etree__initThreadLogging(void) { * * */ - __Pyx_TraceLine(31,0,__PYX_ERR(1, 31, __pyx_L1_error)) xsltSetGenericErrorFunc(NULL, ((xmlGenericErrorFunc)__pyx_f_4lxml_5etree__receiveXSLTError)); /* "src/lxml/xmlerror.pxi":26 @@ -38955,11 +37079,6 @@ static void __pyx_f_4lxml_5etree__initThreadLogging(void) { */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._initThreadLogging", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -38983,10 +37102,8 @@ static void __pyx_pw_4lxml_5etree_9_LogEntry_1__dealloc__(PyObject *__pyx_v_self } static void __pyx_pf_4lxml_5etree_9_LogEntry___dealloc__(struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_v_self) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - __Pyx_TraceCall("__dealloc__", __pyx_f[1], 63, 0, __PYX_ERR(1, 63, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":64 * @@ -38995,7 +37112,6 @@ static void __pyx_pf_4lxml_5etree_9_LogEntry___dealloc__(struct __pyx_obj_4lxml_ * tree.xmlFree(self._c_filename) * tree.xmlFree(self._c_path) */ - __Pyx_TraceLine(64,0,__PYX_ERR(1, 64, __pyx_L1_error)) xmlFree(__pyx_v_self->_c_message); /* "src/lxml/xmlerror.pxi":65 @@ -39005,7 +37121,6 @@ static void __pyx_pf_4lxml_5etree_9_LogEntry___dealloc__(struct __pyx_obj_4lxml_ * tree.xmlFree(self._c_path) * */ - __Pyx_TraceLine(65,0,__PYX_ERR(1, 65, __pyx_L1_error)) xmlFree(__pyx_v_self->_c_filename); /* "src/lxml/xmlerror.pxi":66 @@ -39015,7 +37130,6 @@ static void __pyx_pf_4lxml_5etree_9_LogEntry___dealloc__(struct __pyx_obj_4lxml_ * * @cython.final */ - __Pyx_TraceLine(66,0,__PYX_ERR(1, 66, __pyx_L1_error)) xmlFree(__pyx_v_self->_c_path); /* "src/lxml/xmlerror.pxi":63 @@ -39027,11 +37141,6 @@ static void __pyx_pf_4lxml_5etree_9_LogEntry___dealloc__(struct __pyx_obj_4lxml_ */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._LogEntry.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -39045,13 +37154,11 @@ static void __pyx_pf_4lxml_5etree_9_LogEntry___dealloc__(struct __pyx_obj_4lxml_ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_v_self, xmlError *__pyx_v_error) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("_setError", 0); - __Pyx_TraceCall("_setError", __pyx_f[1], 69, 0, __PYX_ERR(1, 69, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":70 * @cython.final @@ -39060,7 +37167,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm * self.type = error.code * self.level = error.level */ - __Pyx_TraceLine(70,0,__PYX_ERR(1, 70, __pyx_L1_error)) __pyx_t_1 = __pyx_v_error->domain; __pyx_v_self->domain = __pyx_t_1; @@ -39071,7 +37177,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm * self.level = error.level * self.line = error.line */ - __Pyx_TraceLine(71,0,__PYX_ERR(1, 71, __pyx_L1_error)) __pyx_t_1 = __pyx_v_error->code; __pyx_v_self->type = __pyx_t_1; @@ -39082,7 +37187,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm * self.line = error.line * self.column = error.int2 */ - __Pyx_TraceLine(72,0,__PYX_ERR(1, 72, __pyx_L1_error)) __pyx_v_self->level = ((int)__pyx_v_error->level); /* "src/lxml/xmlerror.pxi":73 @@ -39092,7 +37196,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm * self.column = error.int2 * self._c_message = NULL */ - __Pyx_TraceLine(73,0,__PYX_ERR(1, 73, __pyx_L1_error)) __pyx_t_1 = __pyx_v_error->line; __pyx_v_self->line = __pyx_t_1; @@ -39103,7 +37206,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm * self._c_message = NULL * self._c_filename = NULL */ - __Pyx_TraceLine(74,0,__PYX_ERR(1, 74, __pyx_L1_error)) __pyx_t_1 = __pyx_v_error->int2; __pyx_v_self->column = __pyx_t_1; @@ -39114,7 +37216,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm * self._c_filename = NULL * self._c_path = NULL */ - __Pyx_TraceLine(75,0,__PYX_ERR(1, 75, __pyx_L1_error)) __pyx_v_self->_c_message = NULL; /* "src/lxml/xmlerror.pxi":76 @@ -39124,7 +37225,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm * self._c_path = NULL * if (error.message is NULL or */ - __Pyx_TraceLine(76,0,__PYX_ERR(1, 76, __pyx_L1_error)) __pyx_v_self->_c_filename = NULL; /* "src/lxml/xmlerror.pxi":77 @@ -39134,7 +37234,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm * if (error.message is NULL or * error.message[0] == b'\0' or */ - __Pyx_TraceLine(77,0,__PYX_ERR(1, 77, __pyx_L1_error)) __pyx_v_self->_c_path = NULL; /* "src/lxml/xmlerror.pxi":78 @@ -39144,7 +37243,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm * error.message[0] == b'\0' or * error.message[0] == b'\n' and error.message[1] == b'\0'): */ - __Pyx_TraceLine(78,0,__PYX_ERR(1, 78, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_error->message == NULL) != 0); if (!__pyx_t_3) { } else { @@ -39159,7 +37257,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm * error.message[0] == b'\n' and error.message[1] == b'\0'): * self._message = u"unknown error" */ - __Pyx_TraceLine(79,0,__PYX_ERR(1, 79, __pyx_L1_error)) __pyx_t_3 = (((__pyx_v_error->message[0]) == '\x00') != 0); if (!__pyx_t_3) { } else { @@ -39174,7 +37271,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm * self._message = u"unknown error" * else: */ - __Pyx_TraceLine(80,0,__PYX_ERR(1, 80, __pyx_L1_error)) __pyx_t_3 = (((__pyx_v_error->message[0]) == '\n') != 0); if (__pyx_t_3) { } else { @@ -39192,7 +37288,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm * error.message[0] == b'\0' or * error.message[0] == b'\n' and error.message[1] == b'\0'): */ - __Pyx_TraceLine(78,0,__PYX_ERR(1, 78, __pyx_L1_error)) if (__pyx_t_2) { /* "src/lxml/xmlerror.pxi":81 @@ -39202,7 +37297,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm * else: * self._message = None */ - __Pyx_TraceLine(81,0,__PYX_ERR(1, 81, __pyx_L1_error)) __Pyx_INCREF(__pyx_kp_u_unknown_error); __Pyx_GIVEREF(__pyx_kp_u_unknown_error); __Pyx_GOTREF(__pyx_v_self->_message); @@ -39226,7 +37320,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm * self._c_message = tree.xmlStrdup( * error.message) */ - __Pyx_TraceLine(83,0,__PYX_ERR(1, 83, __pyx_L1_error)) /*else*/ { __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); @@ -39241,7 +37334,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm * error.message) * if not self._c_message: */ - __Pyx_TraceLine(84,0,__PYX_ERR(1, 84, __pyx_L1_error)) __pyx_v_self->_c_message = ((char *)xmlStrdup(((const xmlChar *)__pyx_v_error->message))); /* "src/lxml/xmlerror.pxi":86 @@ -39251,7 +37343,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm * raise MemoryError() * if error.file is NULL: */ - __Pyx_TraceLine(86,0,__PYX_ERR(1, 86, __pyx_L1_error)) __pyx_t_2 = ((!(__pyx_v_self->_c_message != 0)) != 0); if (unlikely(__pyx_t_2)) { @@ -39262,7 +37353,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm * if error.file is NULL: * self._filename = u'' */ - __Pyx_TraceLine(87,0,__PYX_ERR(1, 87, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(1, 87, __pyx_L1_error) /* "src/lxml/xmlerror.pxi":86 @@ -39283,7 +37373,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm * self._filename = u'' * else: */ - __Pyx_TraceLine(88,0,__PYX_ERR(1, 88, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_error->file == NULL) != 0); if (__pyx_t_2) { @@ -39294,7 +37383,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm * else: * self._filename = None */ - __Pyx_TraceLine(89,0,__PYX_ERR(1, 89, __pyx_L1_error)) __Pyx_INCREF(__pyx_kp_u_string); __Pyx_GIVEREF(__pyx_kp_u_string); __Pyx_GOTREF(__pyx_v_self->_filename); @@ -39318,7 +37406,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm * self._c_filename = tree.xmlStrdup( error.file) * if not self._c_filename: */ - __Pyx_TraceLine(91,0,__PYX_ERR(1, 91, __pyx_L1_error)) /*else*/ { __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); @@ -39333,7 +37420,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm * if not self._c_filename: * raise MemoryError() */ - __Pyx_TraceLine(92,0,__PYX_ERR(1, 92, __pyx_L1_error)) __pyx_v_self->_c_filename = xmlStrdup(((const xmlChar *)__pyx_v_error->file)); /* "src/lxml/xmlerror.pxi":93 @@ -39343,7 +37429,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm * raise MemoryError() * if error.node is not NULL: */ - __Pyx_TraceLine(93,0,__PYX_ERR(1, 93, __pyx_L1_error)) __pyx_t_2 = ((!(__pyx_v_self->_c_filename != 0)) != 0); if (unlikely(__pyx_t_2)) { @@ -39354,7 +37439,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm * if error.node is not NULL: * self._c_path = tree.xmlGetNodePath( error.node) */ - __Pyx_TraceLine(94,0,__PYX_ERR(1, 94, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(1, 94, __pyx_L1_error) /* "src/lxml/xmlerror.pxi":93 @@ -39375,7 +37459,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm * self._c_path = tree.xmlGetNodePath( error.node) * */ - __Pyx_TraceLine(95,0,__PYX_ERR(1, 95, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_error->node != NULL) != 0); if (__pyx_t_2) { @@ -39386,7 +37469,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm * * @cython.final */ - __Pyx_TraceLine(96,0,__PYX_ERR(1, 96, __pyx_L1_error)) __pyx_v_self->_c_path = xmlGetNodePath(((xmlNode *)__pyx_v_error->node)); /* "src/lxml/xmlerror.pxi":95 @@ -39414,7 +37496,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -39429,11 +37510,9 @@ 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 *__pyx_v_self, int __pyx_v_domain, int __pyx_v_type, int __pyx_v_level, int __pyx_v_line, PyObject *__pyx_v_message, PyObject *__pyx_v_filename) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_setGeneric", 0); - __Pyx_TraceCall("_setGeneric", __pyx_f[1], 99, 0, __PYX_ERR(1, 99, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":101 * cdef _setGeneric(self, int domain, int type, int level, int line, @@ -39442,7 +37521,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setGeneric(struct __pyx_obj_4l * self.type = type * self.level = level */ - __Pyx_TraceLine(101,0,__PYX_ERR(1, 101, __pyx_L1_error)) __pyx_v_self->domain = __pyx_v_domain; /* "src/lxml/xmlerror.pxi":102 @@ -39452,7 +37530,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setGeneric(struct __pyx_obj_4l * self.level = level * self.line = line */ - __Pyx_TraceLine(102,0,__PYX_ERR(1, 102, __pyx_L1_error)) __pyx_v_self->type = __pyx_v_type; /* "src/lxml/xmlerror.pxi":103 @@ -39462,7 +37539,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setGeneric(struct __pyx_obj_4l * self.line = line * self.column = 0 */ - __Pyx_TraceLine(103,0,__PYX_ERR(1, 103, __pyx_L1_error)) __pyx_v_self->level = __pyx_v_level; /* "src/lxml/xmlerror.pxi":104 @@ -39472,7 +37548,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setGeneric(struct __pyx_obj_4l * self.column = 0 * self._message = message */ - __Pyx_TraceLine(104,0,__PYX_ERR(1, 104, __pyx_L1_error)) __pyx_v_self->line = __pyx_v_line; /* "src/lxml/xmlerror.pxi":105 @@ -39482,7 +37557,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setGeneric(struct __pyx_obj_4l * self._message = message * self._filename = filename */ - __Pyx_TraceLine(105,0,__PYX_ERR(1, 105, __pyx_L1_error)) __pyx_v_self->column = 0; /* "src/lxml/xmlerror.pxi":106 @@ -39492,7 +37566,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setGeneric(struct __pyx_obj_4l * self._filename = filename * self._c_path = NULL */ - __Pyx_TraceLine(106,0,__PYX_ERR(1, 106, __pyx_L1_error)) if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_message))||((__pyx_v_message) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_v_message)->tp_name), 0))) __PYX_ERR(1, 106, __pyx_L1_error) __pyx_t_1 = __pyx_v_message; __Pyx_INCREF(__pyx_t_1); @@ -39509,7 +37582,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setGeneric(struct __pyx_obj_4l * self._c_path = NULL * */ - __Pyx_TraceLine(107,0,__PYX_ERR(1, 107, __pyx_L1_error)) if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_filename))||((__pyx_v_filename) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_v_filename)->tp_name), 0))) __PYX_ERR(1, 107, __pyx_L1_error) __pyx_t_1 = __pyx_v_filename; __Pyx_INCREF(__pyx_t_1); @@ -39526,7 +37598,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setGeneric(struct __pyx_obj_4l * * def __repr__(self): */ - __Pyx_TraceLine(108,0,__PYX_ERR(1, 108, __pyx_L1_error)) __pyx_v_self->_c_path = NULL; /* "src/lxml/xmlerror.pxi":99 @@ -39546,7 +37617,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setGeneric(struct __pyx_obj_4l __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -39574,7 +37644,6 @@ static PyObject *__pyx_pw_4lxml_5etree_9_LogEntry_3__repr__(PyObject *__pyx_v_se static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_2__repr__(struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; @@ -39582,7 +37651,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_2__repr__(struct __pyx_obj_4lx PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[1], 110, 0, __PYX_ERR(1, 110, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":111 * @@ -39591,7 +37659,6 @@ 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) */ - __Pyx_TraceLine(111,0,__PYX_ERR(1, 111, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(13); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -39605,7 +37672,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_2__repr__(struct __pyx_obj_4lx * self.domain_name, self.type_name, self.message) * */ - __Pyx_TraceLine(112,0,__PYX_ERR(1, 112, __pyx_L1_error)) __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 112, __pyx_L1_error) @@ -39616,30 +37682,30 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_2__repr__(struct __pyx_obj_4lx __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __pyx_t_5 = 0; - __Pyx_INCREF(__pyx_kp_u__31); + __Pyx_INCREF(__pyx_kp_u__16); __pyx_t_2 += 1; - __Pyx_GIVEREF(__pyx_kp_u__31); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u__31); + __Pyx_GIVEREF(__pyx_kp_u__16); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u__16); __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_self->line, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_5); __pyx_t_5 = 0; - __Pyx_INCREF(__pyx_kp_u__31); + __Pyx_INCREF(__pyx_kp_u__16); __pyx_t_2 += 1; - __Pyx_GIVEREF(__pyx_kp_u__31); - PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_kp_u__31); + __Pyx_GIVEREF(__pyx_kp_u__16); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_kp_u__16); __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_self->column, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_t_5); __pyx_t_5 = 0; - __Pyx_INCREF(__pyx_kp_u__31); + __Pyx_INCREF(__pyx_kp_u__16); __pyx_t_2 += 1; - __Pyx_GIVEREF(__pyx_kp_u__31); - PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_kp_u__31); + __Pyx_GIVEREF(__pyx_kp_u__16); + PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_kp_u__16); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_level_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 112, __pyx_L1_error) @@ -39650,10 +37716,10 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_2__repr__(struct __pyx_obj_4lx __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_t_4); __pyx_t_4 = 0; - __Pyx_INCREF(__pyx_kp_u__31); + __Pyx_INCREF(__pyx_kp_u__16); __pyx_t_2 += 1; - __Pyx_GIVEREF(__pyx_kp_u__31); - PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_kp_u__31); + __Pyx_GIVEREF(__pyx_kp_u__16); + PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_kp_u__16); /* "src/lxml/xmlerror.pxi":113 * return u"%s:%d:%d:%s:%s:%s: %s" % ( @@ -39662,7 +37728,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_2__repr__(struct __pyx_obj_4lx * * property domain_name: */ - __Pyx_TraceLine(113,0,__PYX_ERR(1, 113, __pyx_L1_error)) __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); __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 113, __pyx_L1_error) @@ -39673,10 +37738,10 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_2__repr__(struct __pyx_obj_4lx __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_t_5); __pyx_t_5 = 0; - __Pyx_INCREF(__pyx_kp_u__31); + __Pyx_INCREF(__pyx_kp_u__16); __pyx_t_2 += 1; - __Pyx_GIVEREF(__pyx_kp_u__31); - PyTuple_SET_ITEM(__pyx_t_1, 9, __pyx_kp_u__31); + __Pyx_GIVEREF(__pyx_kp_u__16); + PyTuple_SET_ITEM(__pyx_t_1, 9, __pyx_kp_u__16); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 113, __pyx_L1_error) @@ -39687,10 +37752,10 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_2__repr__(struct __pyx_obj_4lx __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 10, __pyx_t_4); __pyx_t_4 = 0; - __Pyx_INCREF(__pyx_kp_u__33); + __Pyx_INCREF(__pyx_kp_u__17); __pyx_t_2 += 2; - __Pyx_GIVEREF(__pyx_kp_u__33); - PyTuple_SET_ITEM(__pyx_t_1, 11, __pyx_kp_u__33); + __Pyx_GIVEREF(__pyx_kp_u__17); + PyTuple_SET_ITEM(__pyx_t_1, 11, __pyx_kp_u__17); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_message); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 113, __pyx_L1_error) @@ -39709,7 +37774,6 @@ 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) */ - __Pyx_TraceLine(111,0,__PYX_ERR(1, 111, __pyx_L1_error)) __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 13, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -39734,7 +37798,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_2__repr__(struct __pyx_obj_4lx __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -39762,7 +37825,6 @@ static PyObject *__pyx_pw_4lxml_5etree_9_LogEntry_11domain_name_1__get__(PyObjec static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_11domain_name___get__(struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -39771,7 +37833,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_11domain_name___get__(struct _ int __pyx_t_5; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 118, 0, __PYX_ERR(1, 118, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":119 * """ @@ -39780,9 +37841,8 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_11domain_name___get__(struct _ * * property type_name: */ - __Pyx_TraceLine(119,0,__PYX_ERR(1, 119, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ErrorDomains); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 119, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ErrorDomains); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getName); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -39859,7 +37919,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_11domain_name___get__(struct _ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -39888,7 +37947,6 @@ static PyObject *__pyx_pw_4lxml_5etree_9_LogEntry_9type_name_1__get__(PyObject * static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_9type_name___get__(struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_v_self) { PyObject *__pyx_v_getName = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -39898,7 +37956,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_9type_name___get__(struct __py int __pyx_t_6; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 124, 0, __PYX_ERR(1, 124, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":125 * """ @@ -39907,10 +37964,9 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_9type_name___get__(struct __py * getName = RelaxNGErrorTypes._getName * else: */ - __Pyx_TraceLine(125,0,__PYX_ERR(1, 125, __pyx_L1_error)) __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); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ErrorDomains); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 125, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ErrorDomains); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_RELAXNGV); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -39929,8 +37985,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_9type_name___get__(struct __py * else: * getName = ErrorTypes._getName */ - __Pyx_TraceLine(126,0,__PYX_ERR(1, 126, __pyx_L1_error)) - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_RelaxNGErrorTypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 126, __pyx_L1_error) + __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); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getName); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -39955,9 +38010,8 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_9type_name___get__(struct __py * return getName(self.type, u"unknown") * */ - __Pyx_TraceLine(128,0,__PYX_ERR(1, 128, __pyx_L1_error)) /*else*/ { - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ErrorTypes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 128, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ErrorTypes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getName); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -39974,7 +38028,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_9type_name___get__(struct __py * * property level_name: */ - __Pyx_TraceLine(129,0,__PYX_ERR(1, 129, __pyx_L1_error)) __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) __Pyx_GOTREF(__pyx_t_3); @@ -40050,7 +38103,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_9type_name___get__(struct __py __pyx_L0:; __Pyx_XDECREF(__pyx_v_getName); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -40078,7 +38130,6 @@ static PyObject *__pyx_pw_4lxml_5etree_9_LogEntry_10level_name_1__get__(PyObject static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_10level_name___get__(struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -40087,7 +38138,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_10level_name___get__(struct __ int __pyx_t_5; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 134, 0, __PYX_ERR(1, 134, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":135 * """ @@ -40096,9 +38146,8 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_10level_name___get__(struct __ * * property message: */ - __Pyx_TraceLine(135,0,__PYX_ERR(1, 135, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ErrorLevels); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 135, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ErrorLevels); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getName); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -40175,7 +38224,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_10level_name___get__(struct __ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -40204,7 +38252,6 @@ static PyObject *__pyx_pw_4lxml_5etree_9_LogEntry_7message_1__get__(PyObject *__ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_v_self) { size_t __pyx_v_size; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -40222,7 +38269,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 138, 0, __PYX_ERR(1, 138, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":140 * def __get__(self): @@ -40231,7 +38277,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ * return self._message * if self._c_message is NULL: */ - __Pyx_TraceLine(140,0,__PYX_ERR(1, 140, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_message != ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -40243,7 +38288,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ * if self._c_message is NULL: * return None */ - __Pyx_TraceLine(141,0,__PYX_ERR(1, 141, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_message); __pyx_r = __pyx_v_self->_message; @@ -40265,7 +38309,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ * return None * size = cstring_h.strlen(self._c_message) */ - __Pyx_TraceLine(142,0,__PYX_ERR(1, 142, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->_c_message == NULL) != 0); if (__pyx_t_2) { @@ -40276,7 +38319,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ * size = cstring_h.strlen(self._c_message) * if size > 0 and self._c_message[size-1] == '\n': */ - __Pyx_TraceLine(143,0,__PYX_ERR(1, 143, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -40297,7 +38339,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ * if size > 0 and self._c_message[size-1] == '\n': * size -= 1 # strip EOL */ - __Pyx_TraceLine(144,0,__PYX_ERR(1, 144, __pyx_L1_error)) __pyx_v_size = strlen(__pyx_v_self->_c_message); /* "src/lxml/xmlerror.pxi":145 @@ -40307,7 +38348,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ * size -= 1 # strip EOL * # cannot use funicode() here because the message may contain */ - __Pyx_TraceLine(145,0,__PYX_ERR(1, 145, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_size > 0) != 0); if (__pyx_t_1) { } else { @@ -40326,7 +38366,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ * # cannot use funicode() here because the message may contain * # byte encoded file paths etc. */ - __Pyx_TraceLine(146,0,__PYX_ERR(1, 146, __pyx_L1_error)) __pyx_v_size = (__pyx_v_size - 1); /* "src/lxml/xmlerror.pxi":145 @@ -40345,7 +38384,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ * self._message = self._c_message[:size].decode('utf8') * except UnicodeDecodeError: */ - __Pyx_TraceLine(149,0,__PYX_ERR(1, 149, __pyx_L8_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -40362,7 +38400,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ * except UnicodeDecodeError: * try: */ - __Pyx_TraceLine(150,0,__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, 150, __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) @@ -40394,7 +38431,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ * try: * self._message = self._c_message[:size].decode( */ - __Pyx_TraceLine(151,0,__PYX_ERR(1, 151, __pyx_L10_except_error)) __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); @@ -40410,7 +38446,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ * self._message = self._c_message[:size].decode( * 'ascii', 'backslashreplace') */ - __Pyx_TraceLine(152,0,__PYX_ERR(1, 152, __pyx_L16_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -40427,7 +38462,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ * 'ascii', 'backslashreplace') * except UnicodeDecodeError: */ - __Pyx_TraceLine(153,0,__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, 153, __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) @@ -40459,7 +38493,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ * self._message = u'' * if self._c_message: */ - __Pyx_TraceLine(155,0,__PYX_ERR(1, 155, __pyx_L18_except_error)) __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); @@ -40475,15 +38508,14 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ * if self._c_message: * # clean up early */ - __Pyx_TraceLine(156,0,__PYX_ERR(1, 156, __pyx_L18_except_error)) __Pyx_INCREF(__pyx_kp_u_undecodable_error_message); __Pyx_GIVEREF(__pyx_kp_u_undecodable_error_message); __Pyx_GOTREF(__pyx_v_self->_message); __Pyx_DECREF(__pyx_v_self->_message); __pyx_v_self->_message = ((PyObject*)__pyx_kp_u_undecodable_error_message); - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; goto __pyx_L17_exception_handled; } goto __pyx_L18_except_error; @@ -40508,9 +38540,9 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); __pyx_L23_try_end:; } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L9_exception_handled; } goto __pyx_L10_except_error; @@ -40543,7 +38575,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ * # clean up early * tree.xmlFree(self._c_message) */ - __Pyx_TraceLine(157,0,__PYX_ERR(1, 157, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_self->_c_message != 0); if (__pyx_t_2) { @@ -40554,7 +38585,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ * self._c_message = NULL * return self._message */ - __Pyx_TraceLine(159,0,__PYX_ERR(1, 159, __pyx_L1_error)) xmlFree(__pyx_v_self->_c_message); /* "src/lxml/xmlerror.pxi":160 @@ -40564,7 +38594,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ * return self._message * */ - __Pyx_TraceLine(160,0,__PYX_ERR(1, 160, __pyx_L1_error)) __pyx_v_self->_c_message = NULL; /* "src/lxml/xmlerror.pxi":157 @@ -40583,7 +38612,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ * * property filename: */ - __Pyx_TraceLine(161,0,__PYX_ERR(1, 161, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_message); __pyx_r = __pyx_v_self->_message; @@ -40609,7 +38637,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -40637,13 +38664,11 @@ static PyObject *__pyx_pw_4lxml_5etree_9_LogEntry_8filename_1__get__(PyObject *_ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_8filename___get__(struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 164, 0, __PYX_ERR(1, 164, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":165 * property filename: @@ -40652,7 +38677,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_8filename___get__(struct __pyx * if self._c_filename is not NULL: * self._filename = _decodeFilename(self._c_filename) */ - __Pyx_TraceLine(165,0,__PYX_ERR(1, 165, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_filename == ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -40664,7 +38688,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_8filename___get__(struct __pyx * self._filename = _decodeFilename(self._c_filename) * # clean up early */ - __Pyx_TraceLine(166,0,__PYX_ERR(1, 166, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->_c_filename != NULL) != 0); if (__pyx_t_2) { @@ -40675,7 +38698,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_8filename___get__(struct __pyx * # clean up early * tree.xmlFree(self._c_filename) */ - __Pyx_TraceLine(167,0,__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, 167, __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) @@ -40692,7 +38714,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_8filename___get__(struct __pyx * self._c_filename = NULL * return self._filename */ - __Pyx_TraceLine(169,0,__PYX_ERR(1, 169, __pyx_L1_error)) xmlFree(__pyx_v_self->_c_filename); /* "src/lxml/xmlerror.pxi":170 @@ -40702,7 +38723,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_8filename___get__(struct __pyx * return self._filename * */ - __Pyx_TraceLine(170,0,__PYX_ERR(1, 170, __pyx_L1_error)) __pyx_v_self->_c_filename = NULL; /* "src/lxml/xmlerror.pxi":166 @@ -40730,7 +38750,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_8filename___get__(struct __pyx * * property path: */ - __Pyx_TraceLine(171,0,__PYX_ERR(1, 171, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_filename); __pyx_r = __pyx_v_self->_filename; @@ -40751,7 +38770,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_8filename___get__(struct __pyx __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -40779,12 +38797,10 @@ static PyObject *__pyx_pw_4lxml_5etree_9_LogEntry_4path_1__get__(PyObject *__pyx static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_4path___get__(struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 176, 0, __PYX_ERR(1, 176, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":177 * """ @@ -40793,7 +38809,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_4path___get__(struct __pyx_obj * * */ - __Pyx_TraceLine(177,0,__PYX_ERR(1, 177, __pyx_L1_error)) __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) @@ -40824,7 +38839,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_4path___get__(struct __pyx_obj __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -40852,11 +38866,9 @@ static PyObject *__pyx_pw_4lxml_5etree_9_LogEntry_6domain_1__get__(PyObject *__p static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_6domain___get__(struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 52, 0, __PYX_ERR(1, 52, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->domain); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -40871,7 +38883,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_6domain___get__(struct __pyx_o __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -40899,11 +38910,9 @@ static PyObject *__pyx_pw_4lxml_5etree_9_LogEntry_4type_1__get__(PyObject *__pyx static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_4type___get__(struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 53, 0, __PYX_ERR(1, 53, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -40918,7 +38927,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_4type___get__(struct __pyx_obj __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -40946,11 +38954,9 @@ static PyObject *__pyx_pw_4lxml_5etree_9_LogEntry_5level_1__get__(PyObject *__py static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_5level___get__(struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 54, 0, __PYX_ERR(1, 54, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->level); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -40965,7 +38971,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_5level___get__(struct __pyx_ob __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -40993,11 +38998,9 @@ static PyObject *__pyx_pw_4lxml_5etree_9_LogEntry_4line_1__get__(PyObject *__pyx static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_4line___get__(struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 55, 0, __PYX_ERR(1, 55, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->line); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -41012,7 +39015,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_4line___get__(struct __pyx_obj __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -41040,11 +39042,9 @@ static PyObject *__pyx_pw_4lxml_5etree_9_LogEntry_6column_1__get__(PyObject *__p static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_6column___get__(struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 56, 0, __PYX_ERR(1, 56, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->column); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -41059,7 +39059,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_6column___get__(struct __pyx_o __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -41135,11 +39134,9 @@ static int __pyx_pw_4lxml_5etree_13_BaseErrorLog_1__init__(PyObject *__pyx_v_sel static int __pyx_pf_4lxml_5etree_13_BaseErrorLog___init__(struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_v_self, PyObject *__pyx_v_first_error, PyObject *__pyx_v_last_error) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[1], 183, 0, __PYX_ERR(1, 183, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":184 * cdef readonly object last_error @@ -41148,7 +39145,6 @@ static int __pyx_pf_4lxml_5etree_13_BaseErrorLog___init__(struct __pyx_obj_4lxml * self.last_error = last_error * */ - __Pyx_TraceLine(184,0,__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, 184, __pyx_L1_error) __pyx_t_1 = __pyx_v_first_error; __Pyx_INCREF(__pyx_t_1); @@ -41165,7 +39161,6 @@ static int __pyx_pf_4lxml_5etree_13_BaseErrorLog___init__(struct __pyx_obj_4lxml * * cpdef copy(self): */ - __Pyx_TraceLine(185,0,__PYX_ERR(1, 185, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_last_error); __Pyx_GIVEREF(__pyx_v_last_error); __Pyx_GOTREF(__pyx_v_self->last_error); @@ -41188,7 +39183,6 @@ static int __pyx_pf_4lxml_5etree_13_BaseErrorLog___init__(struct __pyx_obj_4lxml __Pyx_AddTraceback("lxml.etree._BaseErrorLog.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -41204,48 +39198,58 @@ static int __pyx_pf_4lxml_5etree_13_BaseErrorLog___init__(struct __pyx_obj_4lxml static PyObject *__pyx_pw_4lxml_5etree_13_BaseErrorLog_3copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog_copy(struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_v_self, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__34) __Pyx_RefNannySetupContext("copy", 0); - __Pyx_TraceCall("copy", __pyx_f[1], 187, 0, __PYX_ERR(1, 187, __pyx_L1_error)); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __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_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4lxml_5etree_13_BaseErrorLog_3copy)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); + 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 + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #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_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); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } } + __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) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 187, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 187, __pyx_L1_error) + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; } - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } /* "src/lxml/xmlerror.pxi":188 @@ -41255,7 +39259,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog_copy(struct __pyx_obj_4lxm * * def __repr__(self): */ - __Pyx_TraceLine(188,0,__PYX_ERR(1, 188, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -41290,7 +39293,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog_copy(struct __pyx_obj_4lxm __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -41311,12 +39313,9 @@ static PyObject *__pyx_pw_4lxml_5etree_13_BaseErrorLog_3copy(PyObject *__pyx_v_s static PyObject *__pyx_pf_4lxml_5etree_13_BaseErrorLog_2copy(struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__34) __Pyx_RefNannySetupContext("copy", 0); - __Pyx_TraceCall("copy (wrapper)", __pyx_f[1], 187, 0, __PYX_ERR(1, 187, __pyx_L1_error)); __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_GOTREF(__pyx_t_1); @@ -41331,7 +39330,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_BaseErrorLog_2copy(struct __pyx_obj_4l __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -41359,10 +39357,8 @@ static PyObject *__pyx_pw_4lxml_5etree_13_BaseErrorLog_5__repr__(PyObject *__pyx static PyObject *__pyx_pf_4lxml_5etree_13_BaseErrorLog_4__repr__(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[1], 190, 0, __PYX_ERR(1, 190, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":191 * @@ -41371,10 +39367,9 @@ static PyObject *__pyx_pf_4lxml_5etree_13_BaseErrorLog_4__repr__(CYTHON_UNUSED s * * cpdef receive(self, _LogEntry entry): */ - __Pyx_TraceLine(191,0,__PYX_ERR(1, 191, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_kp_u__23); - __pyx_r = __pyx_kp_u__23; + __Pyx_INCREF(__pyx_kp_u__11); + __pyx_r = __pyx_kp_u__11; goto __pyx_L0; /* "src/lxml/xmlerror.pxi":190 @@ -41386,12 +39381,8 @@ static PyObject *__pyx_pf_4lxml_5etree_13_BaseErrorLog_4__repr__(CYTHON_UNUSED s */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._BaseErrorLog.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -41407,74 +39398,58 @@ static PyObject *__pyx_pf_4lxml_5etree_13_BaseErrorLog_4__repr__(CYTHON_UNUSED s static PyObject *__pyx_pw_4lxml_5etree_13_BaseErrorLog_7receive(PyObject *__pyx_v_self, PyObject *__pyx_v_entry); /*proto*/ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog_receive(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_v_entry, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__35) __Pyx_RefNannySetupContext("receive", 0); - __Pyx_TraceCall("receive", __pyx_f[1], 193, 0, __PYX_ERR(1, 193, __pyx_L1_error)); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __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_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4lxml_5etree_13_BaseErrorLog_7receive)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); + 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 + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #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_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); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } } - } - if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_entry)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 193, __pyx_L1_error) + __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) __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_entry)}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 193, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_entry)}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 193, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 193, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_entry)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_entry)); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_entry)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 193, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } /* "src/lxml/xmlerror.pxi":194 @@ -41484,7 +39459,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog_receive(CYTHON_UNUSED stru * * @cython.final */ - __Pyx_TraceLine(194,0,__PYX_ERR(1, 194, __pyx_L1_error)) /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -41494,12 +39468,10 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog_receive(CYTHON_UNUSED stru __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("lxml.etree._BaseErrorLog.receive", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -41533,12 +39505,9 @@ static PyObject *__pyx_pw_4lxml_5etree_13_BaseErrorLog_7receive(PyObject *__pyx_ static PyObject *__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) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__35) __Pyx_RefNannySetupContext("receive", 0); - __Pyx_TraceCall("receive (wrapper)", __pyx_f[1], 193, 0, __PYX_ERR(1, 193, __pyx_L1_error)); __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_GOTREF(__pyx_t_1); @@ -41553,7 +39522,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_BaseErrorLog_6receive(struct __pyx_obj __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -41570,13 +39538,11 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml int __pyx_v_is_error; struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_v_entry = 0; struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_v_global_log = 0; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("_receive", 0); - __Pyx_TraceCall("_receive", __pyx_f[1], 197, 0, __PYX_ERR(1, 197, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":201 * cdef _LogEntry entry @@ -41585,7 +39551,6 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml * entry._setError(error) * is_error = error.level == xmlerror.XML_ERR_ERROR or \ */ - __Pyx_TraceLine(201,0,__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, 201, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_entry = ((struct __pyx_obj_4lxml_5etree__LogEntry *)__pyx_t_1); @@ -41598,7 +39563,6 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml * is_error = error.level == xmlerror.XML_ERR_ERROR or \ * error.level == xmlerror.XML_ERR_FATAL */ - __Pyx_TraceLine(202,0,__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, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -41610,9 +39574,9 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml * error.level == xmlerror.XML_ERR_FATAL * global_log = _getThreadErrorLog(GLOBAL_ERROR_LOG) */ - __Pyx_TraceLine(203,0,__PYX_ERR(1, 203, __pyx_L1_error)) switch (__pyx_v_error->level) { case XML_ERR_ERROR: + case XML_ERR_FATAL: /* "src/lxml/xmlerror.pxi":204 * entry._setError(error) @@ -41621,8 +39585,7 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml * global_log = _getThreadErrorLog(GLOBAL_ERROR_LOG) * if global_log is not self: */ - __Pyx_TraceLine(204,0,__PYX_ERR(1, 204, __pyx_L1_error)) - case XML_ERR_FATAL: + __pyx_t_2 = 1; /* "src/lxml/xmlerror.pxi":203 * entry = _LogEntry.__new__(_LogEntry) @@ -41631,8 +39594,6 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml * error.level == xmlerror.XML_ERR_FATAL * global_log = _getThreadErrorLog(GLOBAL_ERROR_LOG) */ - __Pyx_TraceLine(203,0,__PYX_ERR(1, 203, __pyx_L1_error)) - __pyx_t_2 = 1; break; default: __pyx_t_2 = 0; @@ -41647,7 +39608,6 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml * if global_log is not self: * global_log.receive(entry) */ - __Pyx_TraceLine(205,0,__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, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_global_log = ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_t_1); @@ -41660,7 +39620,6 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml * global_log.receive(entry) * if is_error: */ - __Pyx_TraceLine(206,0,__PYX_ERR(1, 206, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_global_log != __pyx_v_self); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -41672,7 +39631,6 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml * if is_error: * global_log.last_error = entry */ - __Pyx_TraceLine(207,0,__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, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -41684,7 +39642,6 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml * global_log.last_error = entry * self.receive(entry) */ - __Pyx_TraceLine(208,0,__PYX_ERR(1, 208, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_is_error != 0); if (__pyx_t_3) { @@ -41695,7 +39652,6 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml * self.receive(entry) * if is_error: */ - __Pyx_TraceLine(209,0,__PYX_ERR(1, 209, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_entry)); __Pyx_GIVEREF(((PyObject *)__pyx_v_entry)); __Pyx_GOTREF(__pyx_v_global_log->last_error); @@ -41727,7 +39683,6 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml * if is_error: * self.last_error = entry */ - __Pyx_TraceLine(210,0,__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, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -41739,7 +39694,6 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml * self.last_error = entry * */ - __Pyx_TraceLine(211,0,__PYX_ERR(1, 211, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_is_error != 0); if (__pyx_t_3) { @@ -41750,7 +39704,6 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml * * @cython.final */ - __Pyx_TraceLine(212,0,__PYX_ERR(1, 212, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_entry)); __Pyx_GIVEREF(((PyObject *)__pyx_v_entry)); __Pyx_GOTREF(__pyx_v_self->last_error); @@ -41782,7 +39735,6 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_entry); __Pyx_XDECREF((PyObject *)__pyx_v_global_log); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -41798,13 +39750,11 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob int __pyx_v_is_error; struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_v_entry = 0; struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_v_global_log = 0; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("_receiveGeneric", 0); - __Pyx_TraceCall("_receiveGeneric", __pyx_f[1], 215, 0, __PYX_ERR(1, 215, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":220 * cdef _LogEntry entry @@ -41813,7 +39763,6 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob * entry._setGeneric(domain, type, level, line, message, filename) * is_error = level == xmlerror.XML_ERR_ERROR or \ */ - __Pyx_TraceLine(220,0,__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, 220, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_entry = ((struct __pyx_obj_4lxml_5etree__LogEntry *)__pyx_t_1); @@ -41826,7 +39775,6 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob * is_error = level == xmlerror.XML_ERR_ERROR or \ * level == xmlerror.XML_ERR_FATAL */ - __Pyx_TraceLine(221,0,__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, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -41838,9 +39786,9 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob * level == xmlerror.XML_ERR_FATAL * global_log = _getThreadErrorLog(GLOBAL_ERROR_LOG) */ - __Pyx_TraceLine(222,0,__PYX_ERR(1, 222, __pyx_L1_error)) switch (__pyx_v_level) { case XML_ERR_ERROR: + case XML_ERR_FATAL: /* "src/lxml/xmlerror.pxi":223 * entry._setGeneric(domain, type, level, line, message, filename) @@ -41849,8 +39797,7 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob * global_log = _getThreadErrorLog(GLOBAL_ERROR_LOG) * if global_log is not self: */ - __Pyx_TraceLine(223,0,__PYX_ERR(1, 223, __pyx_L1_error)) - case XML_ERR_FATAL: + __pyx_t_2 = 1; /* "src/lxml/xmlerror.pxi":222 * entry = _LogEntry.__new__(_LogEntry) @@ -41859,8 +39806,6 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob * level == xmlerror.XML_ERR_FATAL * global_log = _getThreadErrorLog(GLOBAL_ERROR_LOG) */ - __Pyx_TraceLine(222,0,__PYX_ERR(1, 222, __pyx_L1_error)) - __pyx_t_2 = 1; break; default: __pyx_t_2 = 0; @@ -41875,7 +39820,6 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob * if global_log is not self: * global_log.receive(entry) */ - __Pyx_TraceLine(224,0,__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, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_global_log = ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_t_1); @@ -41888,7 +39832,6 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob * global_log.receive(entry) * if is_error: */ - __Pyx_TraceLine(225,0,__PYX_ERR(1, 225, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_global_log != __pyx_v_self); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -41900,7 +39843,6 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob * if is_error: * global_log.last_error = entry */ - __Pyx_TraceLine(226,0,__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, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -41912,7 +39854,6 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob * global_log.last_error = entry * self.receive(entry) */ - __Pyx_TraceLine(227,0,__PYX_ERR(1, 227, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_is_error != 0); if (__pyx_t_3) { @@ -41923,7 +39864,6 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob * self.receive(entry) * if is_error: */ - __Pyx_TraceLine(228,0,__PYX_ERR(1, 228, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_entry)); __Pyx_GIVEREF(((PyObject *)__pyx_v_entry)); __Pyx_GOTREF(__pyx_v_global_log->last_error); @@ -41955,7 +39895,6 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob * if is_error: * self.last_error = entry */ - __Pyx_TraceLine(229,0,__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, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -41967,7 +39906,6 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob * self.last_error = entry * */ - __Pyx_TraceLine(230,0,__PYX_ERR(1, 230, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_is_error != 0); if (__pyx_t_3) { @@ -41978,7 +39916,6 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob * * @cython.final */ - __Pyx_TraceLine(231,0,__PYX_ERR(1, 231, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_entry)); __Pyx_GIVEREF(((PyObject *)__pyx_v_entry)); __Pyx_GOTREF(__pyx_v_self->last_error); @@ -42010,7 +39947,6 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_entry); __Pyx_XDECREF((PyObject *)__pyx_v_global_log); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -42029,7 +39965,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc int __pyx_v_column; PyObject *__pyx_v_filename = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -42044,7 +39979,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; __Pyx_RefNannySetupContext("_buildParseException", 0); - __Pyx_TraceCall("_buildParseException", __pyx_f[1], 234, 0, __PYX_ERR(1, 234, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":235 * @cython.final @@ -42053,7 +39987,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc * if self._first_error is None: * return exctype(default_message, code, 0, 0) */ - __Pyx_TraceLine(235,0,__PYX_ERR(1, 235, __pyx_L1_error)) __pyx_v_code = XML_ERR_INTERNAL_ERROR; /* "src/lxml/xmlerror.pxi":236 @@ -42063,7 +39996,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc * return exctype(default_message, code, 0, 0) * message = self._first_error.message */ - __Pyx_TraceLine(236,0,__PYX_ERR(1, 236, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_self->_first_error) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -42075,7 +40007,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc * message = self._first_error.message * if message: */ - __Pyx_TraceLine(237,0,__PYX_ERR(1, 237, __pyx_L1_error)) __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_GOTREF(__pyx_t_4); @@ -42153,7 +40084,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc * if message: * code = self._first_error.type */ - __Pyx_TraceLine(238,0,__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, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_message = __pyx_t_3; @@ -42166,7 +40096,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc * code = self._first_error.type * else: */ - __Pyx_TraceLine(239,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, 239, __pyx_L1_error) if (__pyx_t_2) { @@ -42177,7 +40106,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc * else: * message = default_message */ - __Pyx_TraceLine(240,0,__PYX_ERR(1, 240, __pyx_L1_error)) __pyx_t_7 = __pyx_v_self->_first_error->type; __pyx_v_code = __pyx_t_7; @@ -42198,7 +40126,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc * line = self._first_error.line * column = self._first_error.column */ - __Pyx_TraceLine(242,0,__PYX_ERR(1, 242, __pyx_L1_error)) /*else*/ { __Pyx_INCREF(__pyx_v_default_message); __Pyx_DECREF_SET(__pyx_v_message, __pyx_v_default_message); @@ -42212,7 +40139,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc * column = self._first_error.column * filename = self._first_error.filename */ - __Pyx_TraceLine(243,0,__PYX_ERR(1, 243, __pyx_L1_error)) __pyx_t_7 = __pyx_v_self->_first_error->line; __pyx_v_line = __pyx_t_7; @@ -42223,7 +40149,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc * filename = self._first_error.filename * if line > 0: */ - __Pyx_TraceLine(244,0,__PYX_ERR(1, 244, __pyx_L1_error)) __pyx_t_7 = __pyx_v_self->_first_error->column; __pyx_v_column = __pyx_t_7; @@ -42234,7 +40159,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc * if line > 0: * if column > 0: */ - __Pyx_TraceLine(245,0,__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, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_filename = __pyx_t_3; @@ -42247,7 +40171,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc * if column > 0: * message = f"{message}, line {line}, column {column}" */ - __Pyx_TraceLine(246,0,__PYX_ERR(1, 246, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_line > 0) != 0); if (__pyx_t_2) { @@ -42258,7 +40181,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc * message = f"{message}, line {line}, column {column}" * else: */ - __Pyx_TraceLine(247,0,__PYX_ERR(1, 247, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_column > 0) != 0); if (__pyx_t_2) { @@ -42269,7 +40191,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc * else: * message = f"{message}, line {line}" */ - __Pyx_TraceLine(248,0,__PYX_ERR(1, 248, __pyx_L1_error)) __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = 0; @@ -42324,7 +40245,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc * return exctype(message, code, line, column, filename) * */ - __Pyx_TraceLine(250,0,__PYX_ERR(1, 250, __pyx_L1_error)) /*else*/ { __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -42371,7 +40291,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc * * @cython.final */ - __Pyx_TraceLine(251,0,__PYX_ERR(1, 251, __pyx_L1_error)) __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_GOTREF(__pyx_t_5); @@ -42467,7 +40386,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc __Pyx_XDECREF(__pyx_v_message); __Pyx_XDECREF(__pyx_v_filename); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -42483,7 +40401,6 @@ 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 *__pyx_v_self, PyObject *__pyx_v_default_message) { PyObject *__pyx_v_message = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -42492,7 +40409,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str Py_UCS4 __pyx_t_5; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("_buildExceptionMessage", 0); - __Pyx_TraceCall("_buildExceptionMessage", __pyx_f[1], 254, 0, __PYX_ERR(1, 254, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":255 * @cython.final @@ -42501,7 +40417,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str * return default_message * if self._first_error.message: */ - __Pyx_TraceLine(255,0,__PYX_ERR(1, 255, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_self->_first_error) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -42513,7 +40428,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str * if self._first_error.message: * message = self._first_error.message */ - __Pyx_TraceLine(256,0,__PYX_ERR(1, 256, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_default_message); __pyx_r = __pyx_v_default_message; @@ -42535,7 +40449,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str * message = self._first_error.message * elif default_message is None: */ - __Pyx_TraceLine(257,0,__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, 257, __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) @@ -42549,7 +40462,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str * elif default_message is None: * return None */ - __Pyx_TraceLine(258,0,__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, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_message = __pyx_t_3; @@ -42572,7 +40484,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str * return None * else: */ - __Pyx_TraceLine(259,0,__PYX_ERR(1, 259, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_default_message == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -42584,7 +40495,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str * else: * message = default_message */ - __Pyx_TraceLine(260,0,__PYX_ERR(1, 260, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -42605,7 +40515,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str * if self._first_error.line > 0: * if self._first_error.column > 0: */ - __Pyx_TraceLine(262,0,__PYX_ERR(1, 262, __pyx_L1_error)) /*else*/ { __Pyx_INCREF(__pyx_v_default_message); __pyx_v_message = __pyx_v_default_message; @@ -42619,7 +40528,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str * if self._first_error.column > 0: * message = f"{message}, line {self._first_error.line}, column {self._first_error.column}" */ - __Pyx_TraceLine(263,0,__PYX_ERR(1, 263, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_first_error->line > 0) != 0); if (__pyx_t_1) { @@ -42630,7 +40538,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str * message = f"{message}, line {self._first_error.line}, column {self._first_error.column}" * else: */ - __Pyx_TraceLine(264,0,__PYX_ERR(1, 264, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_first_error->column > 0) != 0); if (__pyx_t_1) { @@ -42641,7 +40548,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str * else: * message = f"{message}, line {self._first_error.line}" */ - __Pyx_TraceLine(265,0,__PYX_ERR(1, 265, __pyx_L1_error)) __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = 0; @@ -42696,7 +40602,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str * return message * */ - __Pyx_TraceLine(267,0,__PYX_ERR(1, 267, __pyx_L1_error)) /*else*/ { __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); @@ -42743,7 +40648,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str * * cdef class _ListErrorLog(_BaseErrorLog): */ - __Pyx_TraceLine(268,0,__PYX_ERR(1, 268, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_message); __pyx_r = __pyx_v_message; @@ -42766,7 +40670,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str __pyx_L0:; __Pyx_XDECREF(__pyx_v_message); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -42794,22 +40697,16 @@ static PyObject *__pyx_pw_4lxml_5etree_13_BaseErrorLog_10last_error_1__get__(PyO static PyObject *__pyx_pf_4lxml_5etree_13_BaseErrorLog_10last_error___get__(struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 182, 0, __PYX_ERR(1, 182, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->last_error); __pyx_r = __pyx_v_self->last_error; goto __pyx_L0; /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._BaseErrorLog.last_error.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -42896,7 +40793,6 @@ static int __pyx_pw_4lxml_5etree_13_ListErrorLog_1__init__(PyObject *__pyx_v_sel static int __pyx_pf_4lxml_5etree_13_ListErrorLog___init__(struct __pyx_obj_4lxml_5etree__ListErrorLog *__pyx_v_self, PyObject *__pyx_v_entries, PyObject *__pyx_v_first_error, PyObject *__pyx_v_last_error) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -42906,7 +40802,6 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog___init__(struct __pyx_obj_4lxml int __pyx_t_6; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[1], 274, 0, __PYX_ERR(1, 274, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_first_error); __Pyx_INCREF(__pyx_v_last_error); @@ -42917,7 +40812,6 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog___init__(struct __pyx_obj_4lxml * if first_error is None: * first_error = entries[0] */ - __Pyx_TraceLine(275,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, 275, __pyx_L1_error) if (__pyx_t_1) { @@ -42928,7 +40822,6 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog___init__(struct __pyx_obj_4lxml * first_error = entries[0] * if last_error is None: */ - __Pyx_TraceLine(276,0,__PYX_ERR(1, 276, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_first_error == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -42940,7 +40833,6 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog___init__(struct __pyx_obj_4lxml * if last_error is None: * last_error = entries[-1] */ - __Pyx_TraceLine(277,0,__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, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_first_error, __pyx_t_3); @@ -42962,7 +40854,6 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog___init__(struct __pyx_obj_4lxml * last_error = entries[-1] * _BaseErrorLog.__init__(self, first_error, last_error) */ - __Pyx_TraceLine(278,0,__PYX_ERR(1, 278, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_last_error == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -42974,7 +40865,6 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog___init__(struct __pyx_obj_4lxml * _BaseErrorLog.__init__(self, first_error, last_error) * self._entries = entries */ - __Pyx_TraceLine(279,0,__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, 279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_last_error, __pyx_t_3); @@ -43005,7 +40895,6 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog___init__(struct __pyx_obj_4lxml * self._entries = entries * */ - __Pyx_TraceLine(280,0,__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, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; @@ -43065,7 +40954,6 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog___init__(struct __pyx_obj_4lxml * * cpdef copy(self): */ - __Pyx_TraceLine(281,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, 281, __pyx_L1_error) __pyx_t_3 = __pyx_v_entries; __Pyx_INCREF(__pyx_t_3); @@ -43096,7 +40984,6 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog___init__(struct __pyx_obj_4lxml __pyx_L0:; __Pyx_XDECREF(__pyx_v_first_error); __Pyx_XDECREF(__pyx_v_last_error); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -43113,49 +41000,59 @@ static PyObject *__pyx_pw_4lxml_5etree_13_ListErrorLog_3copy(PyObject *__pyx_v_s static PyObject *__pyx_f_4lxml_5etree_13_ListErrorLog_copy(struct __pyx_obj_4lxml_5etree__ListErrorLog *__pyx_v_self, int __pyx_skip_dispatch) { struct __pyx_obj_4lxml_5etree__ListErrorLog *__pyx_v_log = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; - __Pyx_TraceFrameInit(__pyx_codeobj__36) __Pyx_RefNannySetupContext("copy", 0); - __Pyx_TraceCall("copy", __pyx_f[1], 283, 0, __PYX_ERR(1, 283, __pyx_L1_error)); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __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_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4lxml_5etree_13_ListErrorLog_3copy)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); + 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 + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #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_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); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } } + __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) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 283, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 283, __pyx_L1_error) + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; } - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } /* "src/lxml/xmlerror.pxi":287 @@ -43165,7 +41062,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_ListErrorLog_copy(struct __pyx_obj_4lxm * self._entries, self._first_error, self.last_error) * log._offset = self._offset */ - __Pyx_TraceLine(287,0,__PYX_ERR(1, 287, __pyx_L1_error)) __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->_entries); @@ -43190,7 +41086,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_ListErrorLog_copy(struct __pyx_obj_4lxm * return log * */ - __Pyx_TraceLine(289,0,__PYX_ERR(1, 289, __pyx_L1_error)) __pyx_t_5 = __pyx_v_self->_offset; __pyx_v_log->_offset = __pyx_t_5; @@ -43201,7 +41096,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_ListErrorLog_copy(struct __pyx_obj_4lxm * * def __iter__(self): */ - __Pyx_TraceLine(290,0,__PYX_ERR(1, 290, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_log)); __pyx_r = ((PyObject *)__pyx_v_log); @@ -43226,7 +41120,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_ListErrorLog_copy(struct __pyx_obj_4lxm __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_log); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -43248,12 +41141,9 @@ static PyObject *__pyx_pw_4lxml_5etree_13_ListErrorLog_3copy(PyObject *__pyx_v_s static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_2copy(struct __pyx_obj_4lxml_5etree__ListErrorLog *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__36) __Pyx_RefNannySetupContext("copy", 0); - __Pyx_TraceCall("copy (wrapper)", __pyx_f[1], 283, 0, __PYX_ERR(1, 283, __pyx_L1_error)); __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_GOTREF(__pyx_t_1); @@ -43268,7 +41158,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_2copy(struct __pyx_obj_4l __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -43297,7 +41186,6 @@ static PyObject *__pyx_pw_4lxml_5etree_13_ListErrorLog_5__iter__(PyObject *__pyx static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_4__iter__(struct __pyx_obj_4lxml_5etree__ListErrorLog *__pyx_v_self) { PyObject *__pyx_v_entries = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -43307,7 +41195,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_4__iter__(struct __pyx_ob int __pyx_t_6; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__iter__", 0); - __Pyx_TraceCall("__iter__", __pyx_f[1], 292, 0, __PYX_ERR(1, 292, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":293 * @@ -43316,7 +41203,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_4__iter__(struct __pyx_ob * if self._offset: * entries = islice(entries, self._offset) */ - __Pyx_TraceLine(293,0,__PYX_ERR(1, 293, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_entries; __Pyx_INCREF(__pyx_t_1); __pyx_v_entries = __pyx_t_1; @@ -43329,7 +41215,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_4__iter__(struct __pyx_ob * entries = islice(entries, self._offset) * return iter(entries) */ - __Pyx_TraceLine(294,0,__PYX_ERR(1, 294, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_self->_offset != 0); if (__pyx_t_2) { @@ -43340,7 +41225,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_4__iter__(struct __pyx_ob * return iter(entries) * */ - __Pyx_TraceLine(295,0,__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, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_4lxml_5etree_islice); @@ -43410,7 +41294,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_4__iter__(struct __pyx_ob * * def __repr__(self): */ - __Pyx_TraceLine(296,0,__PYX_ERR(1, 296, __pyx_L1_error)) __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_GOTREF(__pyx_t_1); @@ -43438,7 +41321,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_4__iter__(struct __pyx_ob __pyx_L0:; __Pyx_XDECREF(__pyx_v_entries); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -43467,7 +41349,6 @@ static PyObject *__pyx_pw_4lxml_5etree_13_ListErrorLog_7__repr__(PyObject *__pyx static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_6__repr__(struct __pyx_obj_4lxml_5etree__ListErrorLog *__pyx_v_self) { PyObject *__pyx_v_entry = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -43475,7 +41356,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_6__repr__(struct __pyx_ob PyObject *(*__pyx_t_4)(PyObject *); PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[1], 298, 0, __PYX_ERR(1, 298, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":299 * @@ -43484,7 +41364,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_6__repr__(struct __pyx_ob * * def __getitem__(self, index): */ - __Pyx_TraceLine(299,0,__PYX_ERR(1, 299, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -43535,7 +41414,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_6__repr__(struct __pyx_ob __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__37, __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, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; @@ -43560,7 +41439,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_6__repr__(struct __pyx_ob __pyx_L0:; __Pyx_XDECREF(__pyx_v_entry); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -43588,13 +41466,11 @@ static PyObject *__pyx_pw_4lxml_5etree_13_ListErrorLog_9__getitem__(PyObject *__ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_8__getitem__(struct __pyx_obj_4lxml_5etree__ListErrorLog *__pyx_v_self, PyObject *__pyx_v_index) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__getitem__", 0); - __Pyx_TraceCall("__getitem__", __pyx_f[1], 301, 0, __PYX_ERR(1, 301, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_index); /* "src/lxml/xmlerror.pxi":302 @@ -43604,7 +41480,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_8__getitem__(struct __pyx * index += self._offset * return self._entries[index] */ - __Pyx_TraceLine(302,0,__PYX_ERR(1, 302, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_offset != 0); if (__pyx_t_1) { @@ -43615,7 +41490,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_8__getitem__(struct __pyx * return self._entries[index] * */ - __Pyx_TraceLine(303,0,__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, 303, __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) @@ -43640,7 +41514,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_8__getitem__(struct __pyx * * def __len__(self): */ - __Pyx_TraceLine(304,0,__PYX_ERR(1, 304, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->_entries == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); @@ -43669,7 +41542,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_8__getitem__(struct __pyx __pyx_L0:; __Pyx_XDECREF(__pyx_v_index); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -43697,12 +41569,10 @@ static Py_ssize_t __pyx_pw_4lxml_5etree_13_ListErrorLog_11__len__(PyObject *__py static Py_ssize_t __pyx_pf_4lxml_5etree_13_ListErrorLog_10__len__(struct __pyx_obj_4lxml_5etree__ListErrorLog *__pyx_v_self) { Py_ssize_t __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; __Pyx_RefNannySetupContext("__len__", 0); - __Pyx_TraceCall("__len__", __pyx_f[1], 306, 0, __PYX_ERR(1, 306, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":307 * @@ -43711,7 +41581,6 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_13_ListErrorLog_10__len__(struct __pyx_o * * def __contains__(self, error_type): */ - __Pyx_TraceLine(307,0,__PYX_ERR(1, 307, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_entries; __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { @@ -43737,7 +41606,6 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_13_ListErrorLog_10__len__(struct __pyx_o __Pyx_AddTraceback("lxml.etree._ListErrorLog.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -43767,7 +41635,6 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog_12__contains__(struct __pyx_obj Py_ssize_t __pyx_v_i; PyObject *__pyx_v_entry = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -43776,7 +41643,6 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog_12__contains__(struct __pyx_obj int __pyx_t_5; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__contains__", 0); - __Pyx_TraceCall("__contains__", __pyx_f[1], 309, 0, __PYX_ERR(1, 309, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":311 * def __contains__(self, error_type): @@ -43785,7 +41651,6 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog_12__contains__(struct __pyx_obj * if i < self._offset: * continue */ - __Pyx_TraceLine(311,0,__PYX_ERR(1, 311, __pyx_L1_error)) __pyx_t_1 = 0; __pyx_t_2 = __pyx_v_self->_entries; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; for (;;) { @@ -43808,7 +41673,6 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog_12__contains__(struct __pyx_obj * continue * if entry.type == error_type: */ - __Pyx_TraceLine(312,0,__PYX_ERR(1, 312, __pyx_L1_error)) __pyx_t_5 = ((__pyx_v_i < __pyx_v_self->_offset) != 0); if (__pyx_t_5) { @@ -43819,7 +41683,6 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog_12__contains__(struct __pyx_obj * if entry.type == error_type: * return True */ - __Pyx_TraceLine(313,0,__PYX_ERR(1, 313, __pyx_L1_error)) goto __pyx_L3_continue; /* "src/lxml/xmlerror.pxi":312 @@ -43838,7 +41701,6 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog_12__contains__(struct __pyx_obj * return True * return False */ - __Pyx_TraceLine(314,0,__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, 314, __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) @@ -43854,7 +41716,6 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog_12__contains__(struct __pyx_obj * return False * */ - __Pyx_TraceLine(315,0,__PYX_ERR(1, 315, __pyx_L1_error)) __pyx_r = 1; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; @@ -43875,7 +41736,6 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog_12__contains__(struct __pyx_obj * if i < self._offset: * continue */ - __Pyx_TraceLine(311,0,__PYX_ERR(1, 311, __pyx_L1_error)) __pyx_L3_continue:; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -43887,7 +41747,6 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog_12__contains__(struct __pyx_obj * * def __nonzero__(self): */ - __Pyx_TraceLine(316,0,__PYX_ERR(1, 316, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -43908,7 +41767,6 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog_12__contains__(struct __pyx_obj __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_entry); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -43936,12 +41794,10 @@ static int __pyx_pw_4lxml_5etree_13_ListErrorLog_15__nonzero__(PyObject *__pyx_v static int __pyx_pf_4lxml_5etree_13_ListErrorLog_14__nonzero__(struct __pyx_obj_4lxml_5etree__ListErrorLog *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; __Pyx_RefNannySetupContext("__nonzero__", 0); - __Pyx_TraceCall("__nonzero__", __pyx_f[1], 318, 0, __PYX_ERR(1, 318, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":319 * @@ -43950,7 +41806,6 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog_14__nonzero__(struct __pyx_obj_ * * def filter_domains(self, domains): */ - __Pyx_TraceLine(319,0,__PYX_ERR(1, 319, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_entries; __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { @@ -43976,7 +41831,6 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog_14__nonzero__(struct __pyx_obj_ __Pyx_AddTraceback("lxml.etree._ListErrorLog.__nonzero__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -44008,7 +41862,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_16filter_domains(struct _ struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_v_entry = 0; PyObject *__pyx_v_filtered = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -44018,9 +41871,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_16filter_domains(struct _ Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); PyObject *__pyx_t_8 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__38) __Pyx_RefNannySetupContext("filter_domains", 0); - __Pyx_TraceCall("filter_domains", __pyx_f[1], 321, 0, __PYX_ERR(1, 321, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_domains); /* "src/lxml/xmlerror.pxi":326 @@ -44030,7 +41881,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_16filter_domains(struct _ * domains = (domains,) * filtered = [entry for entry in self if entry.domain in domains] */ - __Pyx_TraceLine(326,0,__PYX_ERR(1, 326, __pyx_L1_error)) __pyx_t_2 = PyInt_Check(__pyx_v_domains); __pyx_t_3 = (__pyx_t_2 != 0); if (!__pyx_t_3) { @@ -44052,7 +41902,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_16filter_domains(struct _ * filtered = [entry for entry in self if entry.domain in domains] * return _ListErrorLog(filtered, None, None) */ - __Pyx_TraceLine(327,0,__PYX_ERR(1, 327, __pyx_L1_error)) __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_domains); @@ -44077,7 +41926,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_16filter_domains(struct _ * return _ListErrorLog(filtered, None, None) * */ - __Pyx_TraceLine(328,0,__PYX_ERR(1, 328, __pyx_L1_error)) __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self))) { @@ -44142,7 +41990,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_16filter_domains(struct _ * * def filter_types(self, types): */ - __Pyx_TraceLine(329,0,__PYX_ERR(1, 329, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -44182,7 +42029,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_16filter_domains(struct _ __Pyx_XDECREF(__pyx_v_filtered); __Pyx_XDECREF(__pyx_v_domains); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -44214,7 +42060,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_18filter_types(struct __p struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_v_entry = 0; PyObject *__pyx_v_filtered = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -44224,9 +42069,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_18filter_types(struct __p Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); PyObject *__pyx_t_8 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__39) __Pyx_RefNannySetupContext("filter_types", 0); - __Pyx_TraceCall("filter_types", __pyx_f[1], 331, 0, __PYX_ERR(1, 331, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_types); /* "src/lxml/xmlerror.pxi":338 @@ -44236,7 +42079,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_18filter_types(struct __p * types = (types,) * filtered = [entry for entry in self if entry.type in types] */ - __Pyx_TraceLine(338,0,__PYX_ERR(1, 338, __pyx_L1_error)) __pyx_t_2 = PyInt_Check(__pyx_v_types); __pyx_t_3 = (__pyx_t_2 != 0); if (!__pyx_t_3) { @@ -44258,7 +42100,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_18filter_types(struct __p * filtered = [entry for entry in self if entry.type in types] * return _ListErrorLog(filtered, None, None) */ - __Pyx_TraceLine(339,0,__PYX_ERR(1, 339, __pyx_L1_error)) __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_types); @@ -44283,7 +42124,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_18filter_types(struct __p * return _ListErrorLog(filtered, None, None) * */ - __Pyx_TraceLine(340,0,__PYX_ERR(1, 340, __pyx_L1_error)) __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self))) { @@ -44348,7 +42188,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_18filter_types(struct __p * * def filter_levels(self, levels): */ - __Pyx_TraceLine(341,0,__PYX_ERR(1, 341, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -44388,7 +42227,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_18filter_types(struct __p __Pyx_XDECREF(__pyx_v_filtered); __Pyx_XDECREF(__pyx_v_types); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -44420,7 +42258,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_20filter_levels(struct __ struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_v_entry = 0; PyObject *__pyx_v_filtered = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -44430,9 +42267,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_20filter_levels(struct __ Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); PyObject *__pyx_t_8 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__40) __Pyx_RefNannySetupContext("filter_levels", 0); - __Pyx_TraceCall("filter_levels", __pyx_f[1], 343, 0, __PYX_ERR(1, 343, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_levels); /* "src/lxml/xmlerror.pxi":350 @@ -44442,7 +42277,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_20filter_levels(struct __ * levels = (levels,) * filtered = [entry for entry in self if entry.level in levels] */ - __Pyx_TraceLine(350,0,__PYX_ERR(1, 350, __pyx_L1_error)) __pyx_t_2 = PyInt_Check(__pyx_v_levels); __pyx_t_3 = (__pyx_t_2 != 0); if (!__pyx_t_3) { @@ -44464,7 +42298,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_20filter_levels(struct __ * filtered = [entry for entry in self if entry.level in levels] * return _ListErrorLog(filtered, None, None) */ - __Pyx_TraceLine(351,0,__PYX_ERR(1, 351, __pyx_L1_error)) __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_levels); @@ -44489,7 +42322,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_20filter_levels(struct __ * return _ListErrorLog(filtered, None, None) * */ - __Pyx_TraceLine(352,0,__PYX_ERR(1, 352, __pyx_L1_error)) __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self))) { @@ -44554,7 +42386,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_20filter_levels(struct __ * * def filter_from_level(self, level): */ - __Pyx_TraceLine(353,0,__PYX_ERR(1, 353, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -44594,7 +42425,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_20filter_levels(struct __ __Pyx_XDECREF(__pyx_v_filtered); __Pyx_XDECREF(__pyx_v_levels); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -44626,7 +42456,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_22filter_from_level(struc struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_v_entry = 0; PyObject *__pyx_v_filtered = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -44635,9 +42464,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_22filter_from_level(struc PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; - __Pyx_TraceFrameInit(__pyx_codeobj__41) __Pyx_RefNannySetupContext("filter_from_level", 0); - __Pyx_TraceCall("filter_from_level", __pyx_f[1], 355, 0, __PYX_ERR(1, 355, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":361 * """ @@ -44646,7 +42473,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_22filter_from_level(struc * return _ListErrorLog(filtered, None, None) * */ - __Pyx_TraceLine(361,0,__PYX_ERR(1, 361, __pyx_L1_error)) __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self))) { @@ -44712,7 +42538,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_22filter_from_level(struc * * def filter_from_fatals(self): */ - __Pyx_TraceLine(362,0,__PYX_ERR(1, 362, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -44752,7 +42577,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_22filter_from_level(struc __Pyx_XDECREF((PyObject *)__pyx_v_entry); __Pyx_XDECREF(__pyx_v_filtered); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -44782,16 +42606,12 @@ static PyObject *__pyx_pw_4lxml_5etree_13_ListErrorLog_25filter_from_fatals(PyOb static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_24filter_from_fatals(struct __pyx_obj_4lxml_5etree__ListErrorLog *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__42) __Pyx_RefNannySetupContext("filter_from_fatals", 0); - __Pyx_TraceCall("filter_from_fatals", __pyx_f[1], 364, 0, __PYX_ERR(1, 364, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":369 * Convenience method to get all fatal error messages. @@ -44800,11 +42620,10 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_24filter_from_fatals(stru * * def filter_from_errors(self): */ - __Pyx_TraceLine(369,0,__PYX_ERR(1, 369, __pyx_L1_error)) __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_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_GetModuleGlobalName(__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, 369, __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_GOTREF(__pyx_t_4); @@ -44819,41 +42638,11 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_24filter_from_fatals(stru __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 369, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 369, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 369, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 369, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 369, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - } + __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) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -44873,12 +42662,10 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_24filter_from_fatals(stru __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("lxml.etree._ListErrorLog.filter_from_fatals", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -44908,16 +42695,12 @@ static PyObject *__pyx_pw_4lxml_5etree_13_ListErrorLog_27filter_from_errors(PyOb static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_26filter_from_errors(struct __pyx_obj_4lxml_5etree__ListErrorLog *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__43) __Pyx_RefNannySetupContext("filter_from_errors", 0); - __Pyx_TraceCall("filter_from_errors", __pyx_f[1], 371, 0, __PYX_ERR(1, 371, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":376 * Convenience method to get all error messages or worse. @@ -44926,11 +42709,10 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_26filter_from_errors(stru * * def filter_from_warnings(self): */ - __Pyx_TraceLine(376,0,__PYX_ERR(1, 376, __pyx_L1_error)) __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_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_GetModuleGlobalName(__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, 376, __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_GOTREF(__pyx_t_4); @@ -44945,41 +42727,11 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_26filter_from_errors(stru __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 376, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 376, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 376, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 376, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 376, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - } + __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) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -44999,12 +42751,10 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_26filter_from_errors(stru __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("lxml.etree._ListErrorLog.filter_from_errors", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -45034,16 +42784,12 @@ static PyObject *__pyx_pw_4lxml_5etree_13_ListErrorLog_29filter_from_warnings(Py static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_28filter_from_warnings(struct __pyx_obj_4lxml_5etree__ListErrorLog *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__44) __Pyx_RefNannySetupContext("filter_from_warnings", 0); - __Pyx_TraceCall("filter_from_warnings", __pyx_f[1], 378, 0, __PYX_ERR(1, 378, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":383 * Convenience method to get all warnings or worse. @@ -45052,11 +42798,10 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_28filter_from_warnings(st * * */ - __Pyx_TraceLine(383,0,__PYX_ERR(1, 383, __pyx_L1_error)) __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_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_GetModuleGlobalName(__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, 383, __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_GOTREF(__pyx_t_4); @@ -45071,41 +42816,11 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_28filter_from_warnings(st __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 383, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 383, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 383, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 383, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 383, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - } + __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) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -45125,12 +42840,10 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_28filter_from_warnings(st __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("lxml.etree._ListErrorLog.filter_from_warnings", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -45145,11 +42858,9 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_28filter_from_warnings(st static int __pyx_f_4lxml_5etree_16_ErrorLogContext_push_error_log(struct __pyx_obj_4lxml_5etree__ErrorLogContext *__pyx_v_self, struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_v_log) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("push_error_log", 0); - __Pyx_TraceCall("push_error_log", __pyx_f[1], 400, 0, __PYX_ERR(1, 400, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":401 * @@ -45158,7 +42869,6 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_push_error_log(struct __pyx_o * self.old_error_context = xmlerror.xmlStructuredErrorContext * xmlerror.xmlSetStructuredErrorFunc( */ - __Pyx_TraceLine(401,0,__PYX_ERR(1, 401, __pyx_L1_error)) __pyx_v_self->old_error_func = xmlStructuredError; /* "src/lxml/xmlerror.pxi":402 @@ -45168,7 +42878,6 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_push_error_log(struct __pyx_o * xmlerror.xmlSetStructuredErrorFunc( * log, _receiveError) */ - __Pyx_TraceLine(402,0,__PYX_ERR(1, 402, __pyx_L1_error)) __pyx_v_self->old_error_context = xmlStructuredErrorContext; /* "src/lxml/xmlerror.pxi":403 @@ -45178,7 +42887,6 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_push_error_log(struct __pyx_o * log, _receiveError) * */ - __Pyx_TraceLine(403,0,__PYX_ERR(1, 403, __pyx_L1_error)) xmlSetStructuredErrorFunc(((void *)__pyx_v_log), ((xmlStructuredErrorFunc)__pyx_f_4lxml_5etree__receiveError)); /* "src/lxml/xmlerror.pxi":407 @@ -45188,7 +42896,6 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_push_error_log(struct __pyx_o * self.old_xslt_error_context = xslt.xsltGenericErrorContext * self.old_xslt_error_log = _getThreadErrorLog(XSLT_ERROR_LOG) */ - __Pyx_TraceLine(407,0,__PYX_ERR(1, 407, __pyx_L1_error)) __pyx_v_self->old_xslt_error_func = xsltGenericError; /* "src/lxml/xmlerror.pxi":408 @@ -45198,7 +42905,6 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_push_error_log(struct __pyx_o * self.old_xslt_error_log = _getThreadErrorLog(XSLT_ERROR_LOG) * _setThreadErrorLog(XSLT_ERROR_LOG, log) */ - __Pyx_TraceLine(408,0,__PYX_ERR(1, 408, __pyx_L1_error)) __pyx_v_self->old_xslt_error_context = xsltGenericErrorContext; /* "src/lxml/xmlerror.pxi":409 @@ -45208,7 +42914,6 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_push_error_log(struct __pyx_o * _setThreadErrorLog(XSLT_ERROR_LOG, log) * xslt.xsltSetGenericErrorFunc( */ - __Pyx_TraceLine(409,0,__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, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -45224,7 +42929,6 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_push_error_log(struct __pyx_o * xslt.xsltSetGenericErrorFunc( * NULL, _receiveXSLTError) */ - __Pyx_TraceLine(410,0,__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, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -45236,7 +42940,6 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_push_error_log(struct __pyx_o * NULL, _receiveXSLTError) * return 0 */ - __Pyx_TraceLine(411,0,__PYX_ERR(1, 411, __pyx_L1_error)) xsltSetGenericErrorFunc(NULL, ((xmlGenericErrorFunc)__pyx_f_4lxml_5etree__receiveXSLTError)); /* "src/lxml/xmlerror.pxi":413 @@ -45246,7 +42949,6 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_push_error_log(struct __pyx_o * * cdef int pop_error_log(self) except -1: */ - __Pyx_TraceLine(413,0,__PYX_ERR(1, 413, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -45264,7 +42966,6 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_push_error_log(struct __pyx_o __Pyx_AddTraceback("lxml.etree._ErrorLogContext.push_error_log", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -45279,12 +42980,10 @@ 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 *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("pop_error_log", 0); - __Pyx_TraceCall("pop_error_log", __pyx_f[1], 415, 0, __PYX_ERR(1, 415, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":416 * @@ -45293,7 +42992,6 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_pop_error_log(struct __pyx_ob * self.old_error_context, self.old_error_func) * xslt.xsltSetGenericErrorFunc( */ - __Pyx_TraceLine(416,0,__PYX_ERR(1, 416, __pyx_L1_error)) xmlSetStructuredErrorFunc(__pyx_v_self->old_error_context, __pyx_v_self->old_error_func); /* "src/lxml/xmlerror.pxi":418 @@ -45303,7 +43001,6 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_pop_error_log(struct __pyx_ob * self.old_xslt_error_context, self.old_xslt_error_func) * _setThreadErrorLog(XSLT_ERROR_LOG, self.old_xslt_error_log) */ - __Pyx_TraceLine(418,0,__PYX_ERR(1, 418, __pyx_L1_error)) xsltSetGenericErrorFunc(__pyx_v_self->old_xslt_error_context, __pyx_v_self->old_xslt_error_func); /* "src/lxml/xmlerror.pxi":420 @@ -45313,7 +43010,6 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_pop_error_log(struct __pyx_ob * self.old_xslt_error_log= None * return 0 */ - __Pyx_TraceLine(420,0,__PYX_ERR(1, 420, __pyx_L1_error)) __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) @@ -45328,7 +43024,6 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_pop_error_log(struct __pyx_ob * return 0 * */ - __Pyx_TraceLine(421,0,__PYX_ERR(1, 421, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->old_xslt_error_log); @@ -45342,7 +43037,6 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_pop_error_log(struct __pyx_ob * * */ - __Pyx_TraceLine(422,0,__PYX_ERR(1, 422, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -45361,7 +43055,6 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_pop_error_log(struct __pyx_ob __Pyx_AddTraceback("lxml.etree._ErrorLogContext.pop_error_log", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -45392,11 +43085,9 @@ static int __pyx_pw_4lxml_5etree_9_ErrorLog_1__cinit__(PyObject *__pyx_v_self, P static int __pyx_pf_4lxml_5etree_9_ErrorLog___cinit__(struct __pyx_obj_4lxml_5etree__ErrorLog *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[1], 427, 0, __PYX_ERR(1, 427, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":428 * cdef list _logContexts @@ -45405,7 +43096,6 @@ static int __pyx_pf_4lxml_5etree_9_ErrorLog___cinit__(struct __pyx_obj_4lxml_5et * * def __init__(self): */ - __Pyx_TraceLine(428,0,__PYX_ERR(1, 428, __pyx_L1_error)) __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -45430,7 +43120,6 @@ static int __pyx_pf_4lxml_5etree_9_ErrorLog___cinit__(struct __pyx_obj_4lxml_5et __Pyx_AddTraceback("lxml.etree._ErrorLog.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -45461,7 +43150,6 @@ static int __pyx_pw_4lxml_5etree_9_ErrorLog_3__init__(PyObject *__pyx_v_self, Py static int __pyx_pf_4lxml_5etree_9_ErrorLog_2__init__(struct __pyx_obj_4lxml_5etree__ErrorLog *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -45470,7 +43158,6 @@ static int __pyx_pf_4lxml_5etree_9_ErrorLog_2__init__(struct __pyx_obj_4lxml_5et int __pyx_t_5; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[1], 430, 0, __PYX_ERR(1, 430, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":431 * @@ -45479,7 +43166,6 @@ static int __pyx_pf_4lxml_5etree_9_ErrorLog_2__init__(struct __pyx_obj_4lxml_5et * * @cython.final */ - __Pyx_TraceLine(431,0,__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, 431, __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) @@ -45559,7 +43245,6 @@ static int __pyx_pf_4lxml_5etree_9_ErrorLog_2__init__(struct __pyx_obj_4lxml_5et __Pyx_AddTraceback("lxml.etree._ErrorLog.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -45574,11 +43259,9 @@ static int __pyx_pf_4lxml_5etree_9_ErrorLog_2__init__(struct __pyx_obj_4lxml_5et static int __pyx_f_4lxml_5etree_9_ErrorLog___enter__(struct __pyx_obj_4lxml_5etree__ErrorLog *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__enter__", 0); - __Pyx_TraceCall("__enter__", __pyx_f[1], 434, 0, __PYX_ERR(1, 434, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":435 * @cython.final @@ -45587,7 +43270,6 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog___enter__(struct __pyx_obj_4lxml_5etr * * def __exit__(self, *args): */ - __Pyx_TraceLine(435,0,__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, 435, __pyx_L1_error) __pyx_r = __pyx_t_1; goto __pyx_L0; @@ -45605,7 +43287,6 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog___enter__(struct __pyx_obj_4lxml_5etr __Pyx_AddTraceback("lxml.etree._ErrorLog.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -45620,7 +43301,7 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog___enter__(struct __pyx_obj_4lxml_5etr /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_9_ErrorLog_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_5etree_9_ErrorLog_5__exit__ = {"__exit__", (PyCFunction)__pyx_pw_4lxml_5etree_9_ErrorLog_5__exit__, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_5etree_9_ErrorLog_5__exit__ = {"__exit__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_9_ErrorLog_5__exit__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_5etree_9_ErrorLog_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_args = 0; PyObject *__pyx_r = 0; @@ -45639,12 +43320,9 @@ static PyObject *__pyx_pw_4lxml_5etree_9_ErrorLog_5__exit__(PyObject *__pyx_v_se static PyObject *__pyx_pf_4lxml_5etree_9_ErrorLog_4__exit__(struct __pyx_obj_4lxml_5etree__ErrorLog *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; - __Pyx_TraceFrameInit(__pyx_codeobj__45) __Pyx_RefNannySetupContext("__exit__", 0); - __Pyx_TraceCall("__exit__", __pyx_f[1], 437, 0, __PYX_ERR(1, 437, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":439 * def __exit__(self, *args): @@ -45653,7 +43331,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_ErrorLog_4__exit__(struct __pyx_obj_4lx * * @cython.final */ - __Pyx_TraceLine(439,0,__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, 439, __pyx_L1_error) /* "src/lxml/xmlerror.pxi":437 @@ -45672,7 +43349,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_ErrorLog_4__exit__(struct __pyx_obj_4lx __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -45688,13 +43364,11 @@ static PyObject *__pyx_pf_4lxml_5etree_9_ErrorLog_4__exit__(struct __pyx_obj_4lx static int __pyx_f_4lxml_5etree_9_ErrorLog_connect(struct __pyx_obj_4lxml_5etree__ErrorLog *__pyx_v_self) { struct __pyx_obj_4lxml_5etree__ErrorLogContext *__pyx_v_context = 0; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("connect", 0); - __Pyx_TraceCall("connect", __pyx_f[1], 442, 0, __PYX_ERR(1, 442, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":443 * @cython.final @@ -45703,7 +43377,6 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog_connect(struct __pyx_obj_4lxml_5etree * del self._entries[:] * */ - __Pyx_TraceLine(443,0,__PYX_ERR(1, 443, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base._first_error); @@ -45717,7 +43390,6 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog_connect(struct __pyx_obj_4lxml_5etree * * cdef _ErrorLogContext context = _ErrorLogContext.__new__(_ErrorLogContext) */ - __Pyx_TraceLine(444,0,__PYX_ERR(1, 444, __pyx_L1_error)) 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) @@ -45731,7 +43403,6 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog_connect(struct __pyx_obj_4lxml_5etree * context.push_error_log(self) * self._logContexts.append(context) */ - __Pyx_TraceLine(446,0,__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, 446, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ErrorLogContext *)__pyx_t_1); @@ -45744,7 +43415,6 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog_connect(struct __pyx_obj_4lxml_5etree * self._logContexts.append(context) * return 0 */ - __Pyx_TraceLine(447,0,__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, 447, __pyx_L1_error) /* "src/lxml/xmlerror.pxi":448 @@ -45754,7 +43424,6 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog_connect(struct __pyx_obj_4lxml_5etree * return 0 * */ - __Pyx_TraceLine(448,0,__PYX_ERR(1, 448, __pyx_L1_error)) 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) @@ -45768,7 +43437,6 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog_connect(struct __pyx_obj_4lxml_5etree * * @cython.final */ - __Pyx_TraceLine(449,0,__PYX_ERR(1, 449, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -45787,7 +43455,6 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog_connect(struct __pyx_obj_4lxml_5etree __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -45803,12 +43470,10 @@ 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 *__pyx_v_self) { struct __pyx_obj_4lxml_5etree__ErrorLogContext *__pyx_v_context = 0; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("disconnect", 0); - __Pyx_TraceCall("disconnect", __pyx_f[1], 452, 0, __PYX_ERR(1, 452, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":453 * @cython.final @@ -45817,7 +43482,6 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog_disconnect(struct __pyx_obj_4lxml_5et * context.pop_error_log() * return 0 */ - __Pyx_TraceLine(453,0,__PYX_ERR(1, 453, __pyx_L1_error)) 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) @@ -45835,7 +43499,6 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog_disconnect(struct __pyx_obj_4lxml_5et * return 0 * */ - __Pyx_TraceLine(454,0,__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, 454, __pyx_L1_error) /* "src/lxml/xmlerror.pxi":455 @@ -45845,7 +43508,6 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog_disconnect(struct __pyx_obj_4lxml_5et * * cpdef clear(self): */ - __Pyx_TraceLine(455,0,__PYX_ERR(1, 455, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -45864,7 +43526,6 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog_disconnect(struct __pyx_obj_4lxml_5et __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -45880,48 +43541,58 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog_disconnect(struct __pyx_obj_4lxml_5et static PyObject *__pyx_pw_4lxml_5etree_9_ErrorLog_7clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_clear(struct __pyx_obj_4lxml_5etree__ErrorLog *__pyx_v_self, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__46) __Pyx_RefNannySetupContext("clear", 0); - __Pyx_TraceCall("clear", __pyx_f[1], 457, 0, __PYX_ERR(1, 457, __pyx_L1_error)); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __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_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4lxml_5etree_9_ErrorLog_7clear)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); + 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 + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #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_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); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } } + __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) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 457, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 457, __pyx_L1_error) + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; } - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } /* "src/lxml/xmlerror.pxi":458 @@ -45931,7 +43602,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_clear(struct __pyx_obj_4lxml_5e * self.last_error = None * self._offset = 0 */ - __Pyx_TraceLine(458,0,__PYX_ERR(1, 458, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base._first_error); @@ -45945,7 +43615,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_clear(struct __pyx_obj_4lxml_5e * self._offset = 0 * del self._entries[:] */ - __Pyx_TraceLine(459,0,__PYX_ERR(1, 459, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base.last_error); @@ -45959,7 +43628,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_clear(struct __pyx_obj_4lxml_5e * del self._entries[:] * */ - __Pyx_TraceLine(460,0,__PYX_ERR(1, 460, __pyx_L1_error)) __pyx_v_self->__pyx_base._offset = 0; /* "src/lxml/xmlerror.pxi":461 @@ -45969,7 +43637,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_clear(struct __pyx_obj_4lxml_5e * * cpdef copy(self): */ - __Pyx_TraceLine(461,0,__PYX_ERR(1, 461, __pyx_L1_error)) 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) @@ -45996,7 +43663,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_clear(struct __pyx_obj_4lxml_5e __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -46017,12 +43683,9 @@ static PyObject *__pyx_pw_4lxml_5etree_9_ErrorLog_7clear(PyObject *__pyx_v_self, static PyObject *__pyx_pf_4lxml_5etree_9_ErrorLog_6clear(struct __pyx_obj_4lxml_5etree__ErrorLog *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__46) __Pyx_RefNannySetupContext("clear", 0); - __Pyx_TraceCall("clear (wrapper)", __pyx_f[1], 457, 0, __PYX_ERR(1, 457, __pyx_L1_error)); __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_GOTREF(__pyx_t_1); @@ -46037,7 +43700,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_ErrorLog_6clear(struct __pyx_obj_4lxml_ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -46053,48 +43715,58 @@ static PyObject *__pyx_pf_4lxml_5etree_9_ErrorLog_6clear(struct __pyx_obj_4lxml_ static PyObject *__pyx_pw_4lxml_5etree_9_ErrorLog_9copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_copy(struct __pyx_obj_4lxml_5etree__ErrorLog *__pyx_v_self, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__47) __Pyx_RefNannySetupContext("copy", 0); - __Pyx_TraceCall("copy", __pyx_f[1], 463, 0, __PYX_ERR(1, 463, __pyx_L1_error)); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __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_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4lxml_5etree_9_ErrorLog_9copy)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); + 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 + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #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_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); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } } + __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) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 463, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 463, __pyx_L1_error) + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; } - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } /* "src/lxml/xmlerror.pxi":466 @@ -46104,7 +43776,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_copy(struct __pyx_obj_4lxml_5et * self._entries[self._offset:], * self._first_error, self.last_error) */ - __Pyx_TraceLine(466,0,__PYX_ERR(1, 466, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); /* "src/lxml/xmlerror.pxi":467 @@ -46114,7 +43785,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_copy(struct __pyx_obj_4lxml_5et * self._first_error, self.last_error) * */ - __Pyx_TraceLine(467,0,__PYX_ERR(1, 467, __pyx_L1_error)) 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) @@ -46129,7 +43799,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_copy(struct __pyx_obj_4lxml_5et * self._entries[self._offset:], * self._first_error, self.last_error) */ - __Pyx_TraceLine(466,0,__PYX_ERR(1, 466, __pyx_L1_error)) __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); @@ -46166,7 +43835,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_copy(struct __pyx_obj_4lxml_5et __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -46188,12 +43856,9 @@ static PyObject *__pyx_pw_4lxml_5etree_9_ErrorLog_9copy(PyObject *__pyx_v_self, static PyObject *__pyx_pf_4lxml_5etree_9_ErrorLog_8copy(struct __pyx_obj_4lxml_5etree__ErrorLog *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__47) __Pyx_RefNannySetupContext("copy", 0); - __Pyx_TraceCall("copy (wrapper)", __pyx_f[1], 463, 0, __PYX_ERR(1, 463, __pyx_L1_error)); __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_GOTREF(__pyx_t_1); @@ -46208,7 +43873,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_ErrorLog_8copy(struct __pyx_obj_4lxml_5 __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -46236,12 +43900,10 @@ static PyObject *__pyx_pw_4lxml_5etree_9_ErrorLog_11__iter__(PyObject *__pyx_v_s static PyObject *__pyx_pf_4lxml_5etree_9_ErrorLog_10__iter__(struct __pyx_obj_4lxml_5etree__ErrorLog *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__iter__", 0); - __Pyx_TraceCall("__iter__", __pyx_f[1], 470, 0, __PYX_ERR(1, 470, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":471 * @@ -46250,7 +43912,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_ErrorLog_10__iter__(struct __pyx_obj_4l * * cpdef receive(self, _LogEntry entry): */ - __Pyx_TraceLine(471,0,__PYX_ERR(1, 471, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->__pyx_base._entries == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); @@ -46281,7 +43942,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_ErrorLog_10__iter__(struct __pyx_obj_4l __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -46297,78 +43957,62 @@ static PyObject *__pyx_pf_4lxml_5etree_9_ErrorLog_10__iter__(struct __pyx_obj_4l static PyObject *__pyx_pw_4lxml_5etree_9_ErrorLog_13receive(PyObject *__pyx_v_self, PyObject *__pyx_v_entry); /*proto*/ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_receive(struct __pyx_obj_4lxml_5etree__ErrorLog *__pyx_v_self, struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_v_entry, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; + int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; - int __pyx_t_9; - __Pyx_TraceFrameInit(__pyx_codeobj__48) __Pyx_RefNannySetupContext("receive", 0); - __Pyx_TraceCall("receive", __pyx_f[1], 473, 0, __PYX_ERR(1, 473, __pyx_L1_error)); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __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_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4lxml_5etree_9_ErrorLog_13receive)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); + 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 + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #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_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); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } } - } - if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_entry)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 473, __pyx_L1_error) + __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) __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_entry)}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 473, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_entry)}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 473, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 473, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_entry)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_entry)); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_entry)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 473, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } /* "src/lxml/xmlerror.pxi":474 @@ -46378,18 +44022,17 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_receive(struct __pyx_obj_4lxml_ * self._first_error = entry * self._entries.append(entry) */ - __Pyx_TraceLine(474,0,__PYX_ERR(1, 474, __pyx_L1_error)) - __pyx_t_7 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._first_error) == Py_None); - __pyx_t_8 = (__pyx_t_7 != 0); - if (__pyx_t_8) { + __pyx_t_6 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._first_error) == Py_None); + __pyx_t_7 = (__pyx_t_6 != 0); + if (__pyx_t_7) { } else { - __pyx_t_6 = __pyx_t_8; + __pyx_t_5 = __pyx_t_7; goto __pyx_L4_bool_binop_done; } - __pyx_t_8 = ((__pyx_v_entry->level >= XML_ERR_ERROR) != 0); - __pyx_t_6 = __pyx_t_8; + __pyx_t_7 = ((__pyx_v_entry->level >= XML_ERR_ERROR) != 0); + __pyx_t_5 = __pyx_t_7; __pyx_L4_bool_binop_done:; - if (__pyx_t_6) { + if (__pyx_t_5) { /* "src/lxml/xmlerror.pxi":475 * cpdef receive(self, _LogEntry entry): @@ -46398,7 +44041,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_receive(struct __pyx_obj_4lxml_ * self._entries.append(entry) * */ - __Pyx_TraceLine(475,0,__PYX_ERR(1, 475, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_entry)); __Pyx_GIVEREF(((PyObject *)__pyx_v_entry)); __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base._first_error); @@ -46421,12 +44063,11 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_receive(struct __pyx_obj_4lxml_ * * cdef class _DomainErrorLog(_ErrorLog): */ - __Pyx_TraceLine(476,0,__PYX_ERR(1, 476, __pyx_L1_error)) 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_t_9 = __Pyx_PyList_Append(__pyx_v_self->__pyx_base._entries, ((PyObject *)__pyx_v_entry)); if (unlikely(__pyx_t_9 == ((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, 476, __pyx_L1_error) /* "src/lxml/xmlerror.pxi":473 * return iter(self._entries[self._offset:]) @@ -46444,12 +44085,10 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_receive(struct __pyx_obj_4lxml_ __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("lxml.etree._ErrorLog.receive", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -46475,12 +44114,9 @@ static PyObject *__pyx_pw_4lxml_5etree_9_ErrorLog_13receive(PyObject *__pyx_v_se static PyObject *__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) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__48) __Pyx_RefNannySetupContext("receive", 0); - __Pyx_TraceCall("receive (wrapper)", __pyx_f[1], 473, 0, __PYX_ERR(1, 473, __pyx_L1_error)); __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_GOTREF(__pyx_t_1); @@ -46495,7 +44131,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_ErrorLog_12receive(struct __pyx_obj_4lx __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -46560,14 +44195,11 @@ static int __pyx_pw_4lxml_5etree_15_DomainErrorLog_1__init__(PyObject *__pyx_v_s static int __pyx_pf_4lxml_5etree_15_DomainErrorLog___init__(struct __pyx_obj_4lxml_5etree__DomainErrorLog *__pyx_v_self, PyObject *__pyx_v_domains) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[1], 479, 0, __PYX_ERR(1, 479, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":480 * cdef class _DomainErrorLog(_ErrorLog): @@ -46576,7 +44208,6 @@ static int __pyx_pf_4lxml_5etree_15_DomainErrorLog___init__(struct __pyx_obj_4lx * self._accepted_domains = tuple(domains) * */ - __Pyx_TraceLine(480,0,__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, 480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; @@ -46589,38 +44220,10 @@ static int __pyx_pf_4lxml_5etree_15_DomainErrorLog___init__(struct __pyx_obj_4lx __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 480, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 480, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 480, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 480, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_self)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject *)__pyx_v_self)); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 480, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __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) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -46631,7 +44234,6 @@ static int __pyx_pf_4lxml_5etree_15_DomainErrorLog___init__(struct __pyx_obj_4lx * * cpdef receive(self, _LogEntry entry): */ - __Pyx_TraceLine(481,0,__PYX_ERR(1, 481, __pyx_L1_error)) __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_domains); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 481, __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) @@ -46652,11 +44254,9 @@ static int __pyx_pf_4lxml_5etree_15_DomainErrorLog___init__(struct __pyx_obj_4lx __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("lxml.etree._DomainErrorLog.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -46672,76 +44272,60 @@ static int __pyx_pf_4lxml_5etree_15_DomainErrorLog___init__(struct __pyx_obj_4lx static PyObject *__pyx_pw_4lxml_5etree_15_DomainErrorLog_3receive(PyObject *__pyx_v_self, PyObject *__pyx_v_entry); /*proto*/ static PyObject *__pyx_f_4lxml_5etree_15_DomainErrorLog_receive(struct __pyx_obj_4lxml_5etree__DomainErrorLog *__pyx_v_self, struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_v_entry, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; + int __pyx_t_5; int __pyx_t_6; - int __pyx_t_7; - __Pyx_TraceFrameInit(__pyx_codeobj__49) __Pyx_RefNannySetupContext("receive", 0); - __Pyx_TraceCall("receive", __pyx_f[1], 483, 0, __PYX_ERR(1, 483, __pyx_L1_error)); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __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_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4lxml_5etree_15_DomainErrorLog_3receive)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); + 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 + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #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_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); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } } - } - if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_entry)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 483, __pyx_L1_error) + __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) __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_entry)}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 483, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_entry)}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 483, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 483, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_entry)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_entry)); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_entry)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 483, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } /* "src/lxml/xmlerror.pxi":484 @@ -46751,16 +44335,15 @@ static PyObject *__pyx_f_4lxml_5etree_15_DomainErrorLog_receive(struct __pyx_obj * _ErrorLog.receive(self, entry) * */ - __Pyx_TraceLine(484,0,__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, 484, __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_GOTREF(__pyx_t_2); - __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_6 < 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, 484, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_7 = (__pyx_t_6 != 0); - if (__pyx_t_7) { + __pyx_t_6 = (__pyx_t_5 != 0); + if (__pyx_t_6) { /* "src/lxml/xmlerror.pxi":485 * cpdef receive(self, _LogEntry entry): @@ -46769,7 +44352,6 @@ static PyObject *__pyx_f_4lxml_5etree_15_DomainErrorLog_receive(struct __pyx_obj * * cdef class _RotatingErrorLog(_ErrorLog): */ - __Pyx_TraceLine(485,0,__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, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -46799,12 +44381,10 @@ static PyObject *__pyx_f_4lxml_5etree_15_DomainErrorLog_receive(struct __pyx_obj __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("lxml.etree._DomainErrorLog.receive", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -46830,12 +44410,9 @@ static PyObject *__pyx_pw_4lxml_5etree_15_DomainErrorLog_3receive(PyObject *__py static PyObject *__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) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__49) __Pyx_RefNannySetupContext("receive", 0); - __Pyx_TraceCall("receive (wrapper)", __pyx_f[1], 483, 0, __PYX_ERR(1, 483, __pyx_L1_error)); __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_GOTREF(__pyx_t_1); @@ -46850,7 +44427,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DomainErrorLog_2receive(struct __pyx_o __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -46915,15 +44491,12 @@ static int __pyx_pw_4lxml_5etree_17_RotatingErrorLog_1__init__(PyObject *__pyx_v static int __pyx_pf_4lxml_5etree_17_RotatingErrorLog___init__(struct __pyx_obj_4lxml_5etree__RotatingErrorLog *__pyx_v_self, PyObject *__pyx_v_max_len) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; + int __pyx_t_4; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[1], 489, 0, __PYX_ERR(1, 489, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":490 * cdef int _max_len @@ -46932,7 +44505,6 @@ static int __pyx_pf_4lxml_5etree_17_RotatingErrorLog___init__(struct __pyx_obj_4 * self._max_len = max_len * */ - __Pyx_TraceLine(490,0,__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, 490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; @@ -46945,38 +44517,10 @@ static int __pyx_pf_4lxml_5etree_17_RotatingErrorLog___init__(struct __pyx_obj_4 __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 490, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 490, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 490, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 490, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_self)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject *)__pyx_v_self)); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 490, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __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) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -46987,9 +44531,8 @@ static int __pyx_pf_4lxml_5etree_17_RotatingErrorLog___init__(struct __pyx_obj_4 * * cpdef receive(self, _LogEntry entry): */ - __Pyx_TraceLine(491,0,__PYX_ERR(1, 491, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_max_len); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 491, __pyx_L1_error) - __pyx_v_self->_max_len = __pyx_t_5; + __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_v_self->_max_len = __pyx_t_4; /* "src/lxml/xmlerror.pxi":489 * cdef class _RotatingErrorLog(_ErrorLog): @@ -47006,11 +44549,9 @@ static int __pyx_pf_4lxml_5etree_17_RotatingErrorLog___init__(struct __pyx_obj_4 __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("lxml.etree._RotatingErrorLog.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -47027,80 +44568,64 @@ static PyObject *__pyx_pw_4lxml_5etree_17_RotatingErrorLog_3receive(PyObject *__ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_obj_4lxml_5etree__RotatingErrorLog *__pyx_v_self, struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_v_entry, int __pyx_skip_dispatch) { int __pyx_v_offset; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; + int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; - int __pyx_t_9; - Py_ssize_t __pyx_t_10; - int __pyx_t_11; - __Pyx_TraceFrameInit(__pyx_codeobj__50) + Py_ssize_t __pyx_t_9; + int __pyx_t_10; __Pyx_RefNannySetupContext("receive", 0); - __Pyx_TraceCall("receive", __pyx_f[1], 493, 0, __PYX_ERR(1, 493, __pyx_L1_error)); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __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_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4lxml_5etree_17_RotatingErrorLog_3receive)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); + 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 + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #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_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); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } } - } - if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_entry)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 493, __pyx_L1_error) + __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) __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_entry)}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 493, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_entry)}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 493, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 493, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_entry)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_entry)); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_entry)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 493, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } /* "src/lxml/xmlerror.pxi":494 @@ -47110,18 +44635,17 @@ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_o * self._first_error = entry * self._entries.append(entry) */ - __Pyx_TraceLine(494,0,__PYX_ERR(1, 494, __pyx_L1_error)) - __pyx_t_7 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._first_error) == Py_None); - __pyx_t_8 = (__pyx_t_7 != 0); - if (__pyx_t_8) { + __pyx_t_6 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._first_error) == Py_None); + __pyx_t_7 = (__pyx_t_6 != 0); + if (__pyx_t_7) { } else { - __pyx_t_6 = __pyx_t_8; + __pyx_t_5 = __pyx_t_7; goto __pyx_L4_bool_binop_done; } - __pyx_t_8 = ((__pyx_v_entry->level >= XML_ERR_ERROR) != 0); - __pyx_t_6 = __pyx_t_8; + __pyx_t_7 = ((__pyx_v_entry->level >= XML_ERR_ERROR) != 0); + __pyx_t_5 = __pyx_t_7; __pyx_L4_bool_binop_done:; - if (__pyx_t_6) { + if (__pyx_t_5) { /* "src/lxml/xmlerror.pxi":495 * cpdef receive(self, _LogEntry entry): @@ -47130,7 +44654,6 @@ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_o * self._entries.append(entry) * */ - __Pyx_TraceLine(495,0,__PYX_ERR(1, 495, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_entry)); __Pyx_GIVEREF(((PyObject *)__pyx_v_entry)); __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._first_error); @@ -47153,12 +44676,11 @@ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_o * * if len(self._entries) > self._max_len: */ - __Pyx_TraceLine(496,0,__PYX_ERR(1, 496, __pyx_L1_error)) 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_t_9 = __Pyx_PyList_Append(__pyx_v_self->__pyx_base.__pyx_base._entries, ((PyObject *)__pyx_v_entry)); if (unlikely(__pyx_t_9 == ((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, 496, __pyx_L1_error) /* "src/lxml/xmlerror.pxi":498 * self._entries.append(entry) @@ -47167,17 +44689,16 @@ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_o * self._offset += 1 * if self._offset > self._max_len // 3: */ - __Pyx_TraceLine(498,0,__PYX_ERR(1, 498, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx_base._entries; __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_t_10 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_10 == ((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, 498, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = ((__pyx_t_10 > __pyx_v_self->_max_len) != 0); - if (__pyx_t_6) { + __pyx_t_5 = ((__pyx_t_9 > __pyx_v_self->_max_len) != 0); + if (__pyx_t_5) { /* "src/lxml/xmlerror.pxi":499 * @@ -47186,7 +44707,6 @@ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_o * if self._offset > self._max_len // 3: * offset = self._offset */ - __Pyx_TraceLine(499,0,__PYX_ERR(1, 499, __pyx_L1_error)) __pyx_v_self->__pyx_base.__pyx_base._offset = (__pyx_v_self->__pyx_base.__pyx_base._offset + 1); /* "src/lxml/xmlerror.pxi":500 @@ -47196,9 +44716,8 @@ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_o * offset = self._offset * self._offset = 0 */ - __Pyx_TraceLine(500,0,__PYX_ERR(1, 500, __pyx_L1_error)) - __pyx_t_6 = ((__pyx_v_self->__pyx_base.__pyx_base._offset > __Pyx_div_long(__pyx_v_self->_max_len, 3)) != 0); - if (__pyx_t_6) { + __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 * self._offset += 1 @@ -47207,9 +44726,8 @@ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_o * self._offset = 0 * del self._entries[:offset] */ - __Pyx_TraceLine(501,0,__PYX_ERR(1, 501, __pyx_L1_error)) - __pyx_t_11 = __pyx_v_self->__pyx_base.__pyx_base._offset; - __pyx_v_offset = __pyx_t_11; + __pyx_t_10 = __pyx_v_self->__pyx_base.__pyx_base._offset; + __pyx_v_offset = __pyx_t_10; /* "src/lxml/xmlerror.pxi":502 * if self._offset > self._max_len // 3: @@ -47218,7 +44736,6 @@ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_o * del self._entries[:offset] * */ - __Pyx_TraceLine(502,0,__PYX_ERR(1, 502, __pyx_L1_error)) __pyx_v_self->__pyx_base.__pyx_base._offset = 0; /* "src/lxml/xmlerror.pxi":503 @@ -47228,7 +44745,6 @@ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_o * * cdef class PyErrorLog(_BaseErrorLog): */ - __Pyx_TraceLine(503,0,__PYX_ERR(1, 503, __pyx_L1_error)) 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) @@ -47269,12 +44785,10 @@ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_o __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("lxml.etree._RotatingErrorLog.receive", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -47300,12 +44814,9 @@ static PyObject *__pyx_pw_4lxml_5etree_17_RotatingErrorLog_3receive(PyObject *__ static PyObject *__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) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__50) __Pyx_RefNannySetupContext("receive", 0); - __Pyx_TraceCall("receive (wrapper)", __pyx_f[1], 493, 0, __PYX_ERR(1, 493, __pyx_L1_error)); __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_GOTREF(__pyx_t_1); @@ -47320,7 +44831,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_RotatingErrorLog_2receive(struct __pyx __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -47405,7 +44915,6 @@ static int __pyx_pw_4lxml_5etree_10PyErrorLog_1__init__(PyObject *__pyx_v_self, static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5etree_PyErrorLog *__pyx_v_self, PyObject *__pyx_v_logger_name, PyObject *__pyx_v_logger) { PyObject *__pyx_v_logging = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -47415,7 +44924,6 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e int __pyx_t_6; int __pyx_t_7; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[1], 528, 0, __PYX_ERR(1, 528, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_logger); /* "src/lxml/xmlerror.pxi":529 @@ -47425,7 +44933,6 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e * import logging * self.level_map = { */ - __Pyx_TraceLine(529,0,__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, 529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; @@ -47485,7 +44992,6 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e * self.level_map = { * ErrorLevels.WARNING : logging.WARNING, */ - __Pyx_TraceLine(530,0,__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, 530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_logging = __pyx_t_1; @@ -47498,10 +45004,9 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e * ErrorLevels.ERROR : logging.ERROR, * ErrorLevels.FATAL : logging.CRITICAL */ - __Pyx_TraceLine(532,0,__PYX_ERR(1, 532, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__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, 532, __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_GOTREF(__pyx_t_5); @@ -47519,8 +45024,7 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e * ErrorLevels.FATAL : logging.CRITICAL * } */ - __Pyx_TraceLine(533,0,__PYX_ERR(1, 533, __pyx_L1_error)) - __pyx_t_2 = __Pyx_GetModuleGlobalName(__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, 533, __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_GOTREF(__pyx_t_5); @@ -47538,8 +45042,7 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e * } * self._map_level = self.level_map.get */ - __Pyx_TraceLine(534,0,__PYX_ERR(1, 534, __pyx_L1_error)) - __pyx_t_2 = __Pyx_GetModuleGlobalName(__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, 534, __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_GOTREF(__pyx_t_5); @@ -47557,7 +45060,6 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e * ErrorLevels.WARNING : logging.WARNING, * ErrorLevels.ERROR : logging.ERROR, */ - __Pyx_TraceLine(531,0,__PYX_ERR(1, 531, __pyx_L1_error)) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->level_map); __Pyx_DECREF(__pyx_v_self->level_map); @@ -47571,7 +45073,6 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e * if logger is None: * if logger_name: */ - __Pyx_TraceLine(536,0,__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, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -47587,7 +45088,6 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e * if logger_name: * logger = logging.getLogger(logger_name) */ - __Pyx_TraceLine(537,0,__PYX_ERR(1, 537, __pyx_L1_error)) __pyx_t_6 = (__pyx_v_logger == Py_None); __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { @@ -47599,7 +45099,6 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e * logger = logging.getLogger(logger_name) * else: */ - __Pyx_TraceLine(538,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, 538, __pyx_L1_error) if (__pyx_t_7) { @@ -47610,7 +45109,6 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e * else: * logger = logging.getLogger() */ - __Pyx_TraceLine(539,0,__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, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; @@ -47623,38 +45121,10 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_logger_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 539, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_logger_name}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 539, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_logger_name}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 539, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 539, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_INCREF(__pyx_v_logger_name); - __Pyx_GIVEREF(__pyx_v_logger_name); - PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_logger_name); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 539, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - } + __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) + __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; @@ -47676,26 +45146,22 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e * self._log = logger.log * */ - __Pyx_TraceLine(541,0,__PYX_ERR(1, 541, __pyx_L1_error)) /*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_GOTREF(__pyx_t_2); - __pyx_t_3 = NULL; + __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_3)) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 541, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 541, __pyx_L1_error) - } + __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) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_logger, __pyx_t_1); @@ -47719,7 +45185,6 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e * * cpdef copy(self): */ - __Pyx_TraceLine(542,0,__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, 542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -47749,7 +45214,6 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e __pyx_L0:; __Pyx_XDECREF(__pyx_v_logging); __Pyx_XDECREF(__pyx_v_logger); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -47765,48 +45229,58 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e static PyObject *__pyx_pw_4lxml_5etree_10PyErrorLog_3copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_4lxml_5etree_10PyErrorLog_copy(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree_PyErrorLog *__pyx_v_self, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__51) __Pyx_RefNannySetupContext("copy", 0); - __Pyx_TraceCall("copy", __pyx_f[1], 544, 0, __PYX_ERR(1, 544, __pyx_L1_error)); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __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_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4lxml_5etree_10PyErrorLog_3copy)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); + 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 + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #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_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); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } } + __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) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 544, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 544, __pyx_L1_error) + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; } - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } /* "src/lxml/xmlerror.pxi":547 @@ -47816,7 +45290,6 @@ static PyObject *__pyx_f_4lxml_5etree_10PyErrorLog_copy(CYTHON_UNUSED struct __p * * def log(self, log_entry, message, *args): */ - __Pyx_TraceLine(547,0,__PYX_ERR(1, 547, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -47856,7 +45329,6 @@ static PyObject *__pyx_f_4lxml_5etree_10PyErrorLog_copy(CYTHON_UNUSED struct __p __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -47878,12 +45350,9 @@ static PyObject *__pyx_pw_4lxml_5etree_10PyErrorLog_3copy(PyObject *__pyx_v_self static PyObject *__pyx_pf_4lxml_5etree_10PyErrorLog_2copy(struct __pyx_obj_4lxml_5etree_PyErrorLog *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__51) __Pyx_RefNannySetupContext("copy", 0); - __Pyx_TraceCall("copy (wrapper)", __pyx_f[1], 544, 0, __PYX_ERR(1, 544, __pyx_L1_error)); __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_GOTREF(__pyx_t_1); @@ -47898,7 +45367,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10PyErrorLog_2copy(struct __pyx_obj_4lxml __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -47914,7 +45382,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10PyErrorLog_2copy(struct __pyx_obj_4lxml /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_10PyErrorLog_5log(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_10PyErrorLog_4log[] = "log(self, log_entry, message, *args)\n\n Called by the .receive() method to log a _LogEntry instance to\n the Python logging system. This handles the error level\n mapping.\n\n In the default implementation, the ``message`` argument\n receives a complete log line, and there are no further\n ``args``. To change the message format, it is best to\n override the .receive() method instead of this one.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_10PyErrorLog_5log = {"log", (PyCFunction)__pyx_pw_4lxml_5etree_10PyErrorLog_5log, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_10PyErrorLog_4log}; +static PyMethodDef __pyx_mdef_4lxml_5etree_10PyErrorLog_5log = {"log", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_10PyErrorLog_5log, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_10PyErrorLog_4log}; static PyObject *__pyx_pw_4lxml_5etree_10PyErrorLog_5log(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_log_entry = 0; PyObject *__pyx_v_message = 0; @@ -47990,7 +45458,6 @@ static PyObject *__pyx_pw_4lxml_5etree_10PyErrorLog_5log(PyObject *__pyx_v_self, static PyObject *__pyx_pf_4lxml_5etree_10PyErrorLog_4log(struct __pyx_obj_4lxml_5etree_PyErrorLog *__pyx_v_self, PyObject *__pyx_v_log_entry, PyObject *__pyx_v_message, PyObject *__pyx_v_args) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -47998,9 +45465,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10PyErrorLog_4log(struct __pyx_obj_4lxml_ PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__52) __Pyx_RefNannySetupContext("log", 0); - __Pyx_TraceCall("log", __pyx_f[1], 549, 0, __PYX_ERR(1, 549, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":562 * """ @@ -48009,7 +45474,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10PyErrorLog_4log(struct __pyx_obj_4lxml_ * message, *args * ) */ - __Pyx_TraceLine(562,0,__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, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_self->_map_level); @@ -48068,7 +45532,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10PyErrorLog_4log(struct __pyx_obj_4lxml_ * self._map_level(log_entry.level, 0), * message, *args */ - __Pyx_TraceLine(561,0,__PYX_ERR(1, 561, __pyx_L1_error)) __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); @@ -48085,7 +45548,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10PyErrorLog_4log(struct __pyx_obj_4lxml_ * ) * */ - __Pyx_TraceLine(563,0,__PYX_ERR(1, 563, __pyx_L1_error)) __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -48097,7 +45559,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10PyErrorLog_4log(struct __pyx_obj_4lxml_ * self._map_level(log_entry.level, 0), * message, *args */ - __Pyx_TraceLine(561,0,__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, 561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -48124,7 +45585,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10PyErrorLog_4log(struct __pyx_obj_4lxml_ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -48140,75 +45600,60 @@ static PyObject *__pyx_pf_4lxml_5etree_10PyErrorLog_4log(struct __pyx_obj_4lxml_ static PyObject *__pyx_pw_4lxml_5etree_10PyErrorLog_7receive(PyObject *__pyx_v_self, PyObject *__pyx_v_log_entry); /*proto*/ static PyObject *__pyx_f_4lxml_5etree_10PyErrorLog_receive(struct __pyx_obj_4lxml_5etree_PyErrorLog *__pyx_v_self, struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_v_log_entry, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; - __Pyx_TraceFrameInit(__pyx_codeobj__53) + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("receive", 0); - __Pyx_TraceCall("receive", __pyx_f[1], 566, 0, __PYX_ERR(1, 566, __pyx_L1_error)); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __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_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4lxml_5etree_10PyErrorLog_7receive)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); + 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 + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #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_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); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } } - } - if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_log_entry)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 566, __pyx_L1_error) + __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) __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_log_entry)}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 566, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_log_entry)}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 566, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 566, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_log_entry)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_log_entry)); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_log_entry)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 566, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } /* "src/lxml/xmlerror.pxi":577 @@ -48218,56 +45663,55 @@ static PyObject *__pyx_f_4lxml_5etree_10PyErrorLog_receive(struct __pyx_obj_4lxm * * # thread-local, global list log to collect error output messages from */ - __Pyx_TraceLine(577,0,__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, 577, __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_GOTREF(__pyx_t_3); - __pyx_t_5 = NULL; - __pyx_t_6 = 0; + __pyx_t_4 = NULL; + __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_5)) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); - __pyx_t_6 = 1; + __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_log_entry), __pyx_t_3}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 577, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + 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_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_log_entry), __pyx_t_3}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 577, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + 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_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_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 577, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__pyx_t_5) { - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 577, __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; } __Pyx_INCREF(((PyObject *)__pyx_v_log_entry)); __Pyx_GIVEREF(((PyObject *)__pyx_v_log_entry)); - PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, ((PyObject *)__pyx_v_log_entry)); + PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_log_entry)); __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __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_4, 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, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __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; @@ -48288,12 +45732,11 @@ static PyObject *__pyx_f_4lxml_5etree_10PyErrorLog_receive(struct __pyx_obj_4lxm __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("lxml.etree.PyErrorLog.receive", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -48320,12 +45763,9 @@ static PyObject *__pyx_pw_4lxml_5etree_10PyErrorLog_7receive(PyObject *__pyx_v_s static PyObject *__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) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__53) __Pyx_RefNannySetupContext("receive", 0); - __Pyx_TraceCall("receive (wrapper)", __pyx_f[1], 566, 0, __PYX_ERR(1, 566, __pyx_L1_error)); __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_GOTREF(__pyx_t_1); @@ -48340,7 +45780,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10PyErrorLog_6receive(struct __pyx_obj_4l __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -48368,22 +45807,16 @@ static PyObject *__pyx_pw_4lxml_5etree_10PyErrorLog_9level_map_1__get__(PyObject static PyObject *__pyx_pf_4lxml_5etree_10PyErrorLog_9level_map___get__(struct __pyx_obj_4lxml_5etree_PyErrorLog *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 525, 0, __PYX_ERR(1, 525, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->level_map); __pyx_r = __pyx_v_self->level_map; goto __pyx_L0; /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.PyErrorLog.level_map.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -48400,7 +45833,6 @@ static struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_f_4lxml_5etree__getThr PyObject *__pyx_v_thread_dict; struct __pyx_obj_4lxml_5etree__RotatingErrorLog *__pyx_v_log = NULL; struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -48412,7 +45844,6 @@ static struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_f_4lxml_5etree__getThr PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("_getThreadErrorLog", 0); - __Pyx_TraceCall("_getThreadErrorLog", __pyx_f[1], 585, 0, __PYX_ERR(1, 585, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":588 * u"""Retrieve the current error log with name 'name' of this thread.""" @@ -48421,7 +45852,6 @@ static struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_f_4lxml_5etree__getThr * if thread_dict is NULL: * return __GLOBAL_ERROR_LOG */ - __Pyx_TraceLine(588,0,__PYX_ERR(1, 588, __pyx_L1_error)) __pyx_v_thread_dict = PyThreadState_GetDict(); /* "src/lxml/xmlerror.pxi":589 @@ -48431,7 +45861,6 @@ static struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_f_4lxml_5etree__getThr * return __GLOBAL_ERROR_LOG * try: */ - __Pyx_TraceLine(589,0,__PYX_ERR(1, 589, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_thread_dict == NULL) != 0); if (__pyx_t_1) { @@ -48442,7 +45871,6 @@ static struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_f_4lxml_5etree__getThr * try: * return (thread_dict)[name] */ - __Pyx_TraceLine(590,0,__PYX_ERR(1, 590, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_4lxml_5etree___GLOBAL_ERROR_LOG)); __pyx_r = __pyx_v_4lxml_5etree___GLOBAL_ERROR_LOG; @@ -48464,7 +45892,6 @@ static struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_f_4lxml_5etree__getThr * return (thread_dict)[name] * except KeyError: */ - __Pyx_TraceLine(591,0,__PYX_ERR(1, 591, __pyx_L4_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -48481,7 +45908,6 @@ static struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_f_4lxml_5etree__getThr * except KeyError: * log = (thread_dict)[name] = \ */ - __Pyx_TraceLine(592,0,__PYX_ERR(1, 592, __pyx_L4_error)) __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_GOTREF(__pyx_t_5); @@ -48508,7 +45934,6 @@ static struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_f_4lxml_5etree__getThr * log = (thread_dict)[name] = \ * _RotatingErrorLog(__MAX_LOG_SIZE) */ - __Pyx_TraceLine(593,0,__PYX_ERR(1, 593, __pyx_L6_except_error)) __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_6) { __Pyx_AddTraceback("lxml.etree._getThreadErrorLog", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -48524,8 +45949,7 @@ static struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_f_4lxml_5etree__getThr * return log * */ - __Pyx_TraceLine(595,0,__PYX_ERR(1, 595, __pyx_L6_except_error)) - __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__RotatingErrorLog), __pyx_tuple__54, 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, 595, __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); @@ -48537,7 +45961,6 @@ static struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_f_4lxml_5etree__getThr * _RotatingErrorLog(__MAX_LOG_SIZE) * return log */ - __Pyx_TraceLine(594,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, 594, __pyx_L6_except_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -48548,7 +45971,6 @@ static struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_f_4lxml_5etree__getThr * * */ - __Pyx_TraceLine(596,0,__PYX_ERR(1, 596, __pyx_L6_except_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_log)); __pyx_r = ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_log); @@ -48605,7 +46027,6 @@ static struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_f_4lxml_5etree__getThr __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_log); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -48621,11 +46042,9 @@ static struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_f_4lxml_5etree__getThr static PyObject *__pyx_f_4lxml_5etree__setThreadErrorLog(PyObject *__pyx_v_name, struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_v_log) { PyObject *__pyx_v_thread_dict; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_setThreadErrorLog", 0); - __Pyx_TraceCall("_setThreadErrorLog", __pyx_f[1], 599, 0, __PYX_ERR(1, 599, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":602 * u"""Set the global error log of this thread.""" @@ -48634,7 +46053,6 @@ static PyObject *__pyx_f_4lxml_5etree__setThreadErrorLog(PyObject *__pyx_v_name, * if thread_dict is NULL: * if name == GLOBAL_ERROR_LOG: */ - __Pyx_TraceLine(602,0,__PYX_ERR(1, 602, __pyx_L1_error)) __pyx_v_thread_dict = PyThreadState_GetDict(); /* "src/lxml/xmlerror.pxi":603 @@ -48644,7 +46062,6 @@ static PyObject *__pyx_f_4lxml_5etree__setThreadErrorLog(PyObject *__pyx_v_name, * if name == GLOBAL_ERROR_LOG: * global __GLOBAL_ERROR_LOG */ - __Pyx_TraceLine(603,0,__PYX_ERR(1, 603, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_thread_dict == NULL) != 0); if (__pyx_t_1) { @@ -48655,7 +46072,6 @@ static PyObject *__pyx_f_4lxml_5etree__setThreadErrorLog(PyObject *__pyx_v_name, * global __GLOBAL_ERROR_LOG * __GLOBAL_ERROR_LOG = log */ - __Pyx_TraceLine(604,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, 604, __pyx_L1_error) if (__pyx_t_1) { @@ -48666,7 +46082,6 @@ static PyObject *__pyx_f_4lxml_5etree__setThreadErrorLog(PyObject *__pyx_v_name, * else: * (thread_dict)[name] = log */ - __Pyx_TraceLine(606,0,__PYX_ERR(1, 606, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_log)); __Pyx_XGOTREF(((PyObject *)__pyx_v_4lxml_5etree___GLOBAL_ERROR_LOG)); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree___GLOBAL_ERROR_LOG, __pyx_v_log); @@ -48698,7 +46113,6 @@ static PyObject *__pyx_f_4lxml_5etree__setThreadErrorLog(PyObject *__pyx_v_name, * * */ - __Pyx_TraceLine(608,0,__PYX_ERR(1, 608, __pyx_L1_error)) /*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) } @@ -48720,7 +46134,6 @@ static PyObject *__pyx_f_4lxml_5etree__setThreadErrorLog(PyObject *__pyx_v_name, __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -48735,12 +46148,10 @@ static PyObject *__pyx_f_4lxml_5etree__setThreadErrorLog(PyObject *__pyx_v_name, static PyObject *__pyx_f_4lxml_5etree___copyGlobalErrorLog(void) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__copyGlobalErrorLog", 0); - __Pyx_TraceCall("__copyGlobalErrorLog", __pyx_f[1], 611, 0, __PYX_ERR(1, 611, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":613 * cdef __copyGlobalErrorLog(): @@ -48749,7 +46160,6 @@ static PyObject *__pyx_f_4lxml_5etree___copyGlobalErrorLog(void) { * * */ - __Pyx_TraceLine(613,0,__PYX_ERR(1, 613, __pyx_L1_error)) __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_GOTREF(__pyx_t_1); @@ -48776,7 +46186,6 @@ static PyObject *__pyx_f_4lxml_5etree___copyGlobalErrorLog(void) { __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -48811,12 +46220,9 @@ static PyObject *__pyx_pw_4lxml_5etree_5use_global_python_log(PyObject *__pyx_se static PyObject *__pyx_pf_4lxml_5etree_4use_global_python_log(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4lxml_5etree_PyErrorLog *__pyx_v_log) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__55) __Pyx_RefNannySetupContext("use_global_python_log", 0); - __Pyx_TraceCall("use_global_python_log", __pyx_f[1], 616, 0, __PYX_ERR(1, 616, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":629 * function will only set the global error log of the current thread. @@ -48825,7 +46231,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4use_global_python_log(CYTHON_UNUSED PyOb * * */ - __Pyx_TraceLine(629,0,__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, 629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -48847,7 +46252,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4use_global_python_log(CYTHON_UNUSED PyOb __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -48862,7 +46266,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4use_global_python_log(CYTHON_UNUSED PyOb static void __pyx_f_4lxml_5etree__forwardError(void *__pyx_v_c_log_handler, xmlError *__pyx_v_error) { struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_v_log_handler = 0; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -48870,7 +46273,6 @@ static void __pyx_f_4lxml_5etree__forwardError(void *__pyx_v_c_log_handler, xmlE PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_forwardError", 0); - __Pyx_TraceCall("_forwardError", __pyx_f[1], 633, 0, __PYX_ERR(1, 633, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":635 * cdef void _forwardError(void* c_log_handler, xmlerror.xmlError* error) with gil: @@ -48879,7 +46281,6 @@ static void __pyx_f_4lxml_5etree__forwardError(void *__pyx_v_c_log_handler, xmlE * log_handler = <_BaseErrorLog>c_log_handler * elif error.domain == xmlerror.XML_FROM_XSLT: */ - __Pyx_TraceLine(635,0,__PYX_ERR(1, 635, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_log_handler != NULL) != 0); if (__pyx_t_1) { @@ -48890,7 +46291,6 @@ static void __pyx_f_4lxml_5etree__forwardError(void *__pyx_v_c_log_handler, xmlE * elif error.domain == xmlerror.XML_FROM_XSLT: * log_handler = _getThreadErrorLog(XSLT_ERROR_LOG) */ - __Pyx_TraceLine(636,0,__PYX_ERR(1, 636, __pyx_L1_error)) __pyx_t_2 = ((PyObject *)__pyx_v_c_log_handler); __Pyx_INCREF(__pyx_t_2); __pyx_v_log_handler = ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_t_2); @@ -48913,7 +46313,6 @@ static void __pyx_f_4lxml_5etree__forwardError(void *__pyx_v_c_log_handler, xmlE * log_handler = _getThreadErrorLog(XSLT_ERROR_LOG) * else: */ - __Pyx_TraceLine(637,0,__PYX_ERR(1, 637, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_error->domain == XML_FROM_XSLT) != 0); if (__pyx_t_1) { @@ -48924,7 +46323,6 @@ static void __pyx_f_4lxml_5etree__forwardError(void *__pyx_v_c_log_handler, xmlE * else: * log_handler = _getThreadErrorLog(GLOBAL_ERROR_LOG) */ - __Pyx_TraceLine(638,0,__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, 638, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_log_handler = ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_t_2); @@ -48947,7 +46345,6 @@ static void __pyx_f_4lxml_5etree__forwardError(void *__pyx_v_c_log_handler, xmlE * log_handler._receive(error) * */ - __Pyx_TraceLine(640,0,__PYX_ERR(1, 640, __pyx_L1_error)) /*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_GOTREF(__pyx_t_2); @@ -48963,7 +46360,6 @@ static void __pyx_f_4lxml_5etree__forwardError(void *__pyx_v_c_log_handler, xmlE * * */ - __Pyx_TraceLine(641,0,__PYX_ERR(1, 641, __pyx_L1_error)) __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(__pyx_v_log_handler, __pyx_v_error); /* "src/lxml/xmlerror.pxi":633 @@ -48981,7 +46377,6 @@ static void __pyx_f_4lxml_5etree__forwardError(void *__pyx_v_c_log_handler, xmlE __Pyx_WriteUnraisable("lxml.etree._forwardError", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_log_handler); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); @@ -48997,8 +46392,6 @@ 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) { - __Pyx_TraceDeclarations - __Pyx_TraceCall("_receiveError", __pyx_f[1], 644, 1, __PYX_ERR(1, 644, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":647 * # no Python objects here, may be called without thread context ! @@ -49007,7 +46400,6 @@ static void __pyx_f_4lxml_5etree__receiveError(void *__pyx_v_c_log_handler, xmlE * * */ - __Pyx_TraceLine(647,1,__PYX_ERR(1, 647, __pyx_L1_error)) __pyx_f_4lxml_5etree__forwardError(__pyx_v_c_log_handler, __pyx_v_error); /* "src/lxml/xmlerror.pxi":644 @@ -49019,11 +46411,6 @@ static void __pyx_f_4lxml_5etree__receiveError(void *__pyx_v_c_log_handler, xmlE */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._receiveError", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); } /* "src/lxml/xmlerror.pxi":650 @@ -49036,8 +46423,6 @@ 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; - __Pyx_TraceDeclarations - __Pyx_TraceCall("_receiveXSLTError", __pyx_f[1], 650, 1, __PYX_ERR(1, 650, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":653 * # no Python objects here, may be called without thread context ! @@ -49046,7 +46431,6 @@ static void __pyx_f_4lxml_5etree__receiveXSLTError(void *__pyx_v_c_log_handler, * _receiveGenericError(c_log_handler, xmlerror.XML_FROM_XSLT, msg, args) * cvarargs.va_end(args) */ - __Pyx_TraceLine(653,1,__PYX_ERR(1, 653, __pyx_L1_error)) va_start(__pyx_v_args, __pyx_v_msg); /* "src/lxml/xmlerror.pxi":654 @@ -49056,7 +46440,6 @@ static void __pyx_f_4lxml_5etree__receiveXSLTError(void *__pyx_v_c_log_handler, * cvarargs.va_end(args) * */ - __Pyx_TraceLine(654,1,__PYX_ERR(1, 654, __pyx_L1_error)) __pyx_f_4lxml_5etree__receiveGenericError(__pyx_v_c_log_handler, XML_FROM_XSLT, __pyx_v_msg, __pyx_v_args); /* "src/lxml/xmlerror.pxi":655 @@ -49066,7 +46449,6 @@ static void __pyx_f_4lxml_5etree__receiveXSLTError(void *__pyx_v_c_log_handler, * * cdef void _receiveRelaxNGParseError(void* c_log_handler, char* msg, ...) nogil: */ - __Pyx_TraceLine(655,1,__PYX_ERR(1, 655, __pyx_L1_error)) va_end(__pyx_v_args); /* "src/lxml/xmlerror.pxi":650 @@ -49078,11 +46460,6 @@ static void __pyx_f_4lxml_5etree__receiveXSLTError(void *__pyx_v_c_log_handler, */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._receiveXSLTError", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); } /* "src/lxml/xmlerror.pxi":657 @@ -49095,8 +46472,6 @@ 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; - __Pyx_TraceDeclarations - __Pyx_TraceCall("_receiveRelaxNGParseError", __pyx_f[1], 657, 1, __PYX_ERR(1, 657, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":660 * # no Python objects here, may be called without thread context ! @@ -49105,7 +46480,6 @@ static void __pyx_f_4lxml_5etree__receiveRelaxNGParseError(void *__pyx_v_c_log_h * _receiveGenericError(c_log_handler, xmlerror.XML_FROM_RELAXNGP, msg, args) * cvarargs.va_end(args) */ - __Pyx_TraceLine(660,1,__PYX_ERR(1, 660, __pyx_L1_error)) va_start(__pyx_v_args, __pyx_v_msg); /* "src/lxml/xmlerror.pxi":661 @@ -49115,7 +46489,6 @@ static void __pyx_f_4lxml_5etree__receiveRelaxNGParseError(void *__pyx_v_c_log_h * cvarargs.va_end(args) * */ - __Pyx_TraceLine(661,1,__PYX_ERR(1, 661, __pyx_L1_error)) __pyx_f_4lxml_5etree__receiveGenericError(__pyx_v_c_log_handler, XML_FROM_RELAXNGP, __pyx_v_msg, __pyx_v_args); /* "src/lxml/xmlerror.pxi":662 @@ -49125,7 +46498,6 @@ static void __pyx_f_4lxml_5etree__receiveRelaxNGParseError(void *__pyx_v_c_log_h * * cdef void _receiveRelaxNGValidationError(void* c_log_handler, char* msg, ...) nogil: */ - __Pyx_TraceLine(662,1,__PYX_ERR(1, 662, __pyx_L1_error)) va_end(__pyx_v_args); /* "src/lxml/xmlerror.pxi":657 @@ -49137,11 +46509,6 @@ static void __pyx_f_4lxml_5etree__receiveRelaxNGParseError(void *__pyx_v_c_log_h */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._receiveRelaxNGParseError", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); } /* "src/lxml/xmlerror.pxi":664 @@ -49154,8 +46521,6 @@ 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; - __Pyx_TraceDeclarations - __Pyx_TraceCall("_receiveRelaxNGValidationError", __pyx_f[1], 664, 1, __PYX_ERR(1, 664, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":667 * # no Python objects here, may be called without thread context ! @@ -49164,7 +46529,6 @@ static void __pyx_f_4lxml_5etree__receiveRelaxNGValidationError(void *__pyx_v_c_ * _receiveGenericError(c_log_handler, xmlerror.XML_FROM_RELAXNGV, msg, args) * cvarargs.va_end(args) */ - __Pyx_TraceLine(667,1,__PYX_ERR(1, 667, __pyx_L1_error)) va_start(__pyx_v_args, __pyx_v_msg); /* "src/lxml/xmlerror.pxi":668 @@ -49174,7 +46538,6 @@ static void __pyx_f_4lxml_5etree__receiveRelaxNGValidationError(void *__pyx_v_c_ * cvarargs.va_end(args) * */ - __Pyx_TraceLine(668,1,__PYX_ERR(1, 668, __pyx_L1_error)) __pyx_f_4lxml_5etree__receiveGenericError(__pyx_v_c_log_handler, XML_FROM_RELAXNGV, __pyx_v_msg, __pyx_v_args); /* "src/lxml/xmlerror.pxi":669 @@ -49184,7 +46547,6 @@ static void __pyx_f_4lxml_5etree__receiveRelaxNGValidationError(void *__pyx_v_c_ * * # dummy function: no log output at all */ - __Pyx_TraceLine(669,1,__PYX_ERR(1, 669, __pyx_L1_error)) va_end(__pyx_v_args); /* "src/lxml/xmlerror.pxi":664 @@ -49196,11 +46558,6 @@ static void __pyx_f_4lxml_5etree__receiveRelaxNGValidationError(void *__pyx_v_c_ */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._receiveRelaxNGValidationError", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); } /* "src/lxml/xmlerror.pxi":672 @@ -49212,15 +46569,8 @@ static void __pyx_f_4lxml_5etree__receiveRelaxNGValidationError(void *__pyx_v_c_ */ static void __pyx_f_4lxml_5etree__nullGenericErrorFunc(CYTHON_UNUSED void *__pyx_v_ctxt, CYTHON_UNUSED char *__pyx_v_msg, ...) { - __Pyx_TraceDeclarations - __Pyx_TraceCall("_nullGenericErrorFunc", __pyx_f[1], 672, 1, __PYX_ERR(1, 672, __pyx_L1_error)); /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._nullGenericErrorFunc", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); } /* "src/lxml/xmlerror.pxi":676 @@ -49235,13 +46585,11 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, int __pyx_v_c_domain = ((int)-1); xmlGenericErrorFunc __pyx_v_error_func; void *__pyx_v_c_log; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("_connectGenericErrorLog", 0); - __Pyx_TraceCall("_connectGenericErrorLog", __pyx_f[1], 676, 0, __PYX_ERR(1, 676, __pyx_L1_error)); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_c_domain = __pyx_optional_args->c_domain; @@ -49255,7 +46603,6 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, * c_log = log * if c_domain == xmlerror.XML_FROM_XSLT: */ - __Pyx_TraceLine(677,0,__PYX_ERR(1, 677, __pyx_L1_error)) __pyx_v_error_func = NULL; /* "src/lxml/xmlerror.pxi":678 @@ -49265,7 +46612,6 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, * if c_domain == xmlerror.XML_FROM_XSLT: * error_func = _receiveXSLTError */ - __Pyx_TraceLine(678,0,__PYX_ERR(1, 678, __pyx_L1_error)) __pyx_v_c_log = ((void *)__pyx_v_log); /* "src/lxml/xmlerror.pxi":679 @@ -49275,7 +46621,6 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, * error_func = _receiveXSLTError * elif c_domain == xmlerror.XML_FROM_RELAXNGP: */ - __Pyx_TraceLine(679,0,__PYX_ERR(1, 679, __pyx_L1_error)) switch (__pyx_v_c_domain) { case XML_FROM_XSLT: @@ -49286,7 +46631,6 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, * elif c_domain == xmlerror.XML_FROM_RELAXNGP: * error_func = _receiveRelaxNGParseError */ - __Pyx_TraceLine(680,0,__PYX_ERR(1, 680, __pyx_L1_error)) __pyx_v_error_func = ((xmlGenericErrorFunc)__pyx_f_4lxml_5etree__receiveXSLTError); /* "src/lxml/xmlerror.pxi":679 @@ -49297,15 +46641,6 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, * elif c_domain == xmlerror.XML_FROM_RELAXNGP: */ break; - - /* "src/lxml/xmlerror.pxi":681 - * if c_domain == xmlerror.XML_FROM_XSLT: - * error_func = _receiveXSLTError - * elif c_domain == xmlerror.XML_FROM_RELAXNGP: # <<<<<<<<<<<<<< - * error_func = _receiveRelaxNGParseError - * elif c_domain == xmlerror.XML_FROM_RELAXNGV: - */ - __Pyx_TraceLine(681,0,__PYX_ERR(1, 681, __pyx_L1_error)) case XML_FROM_RELAXNGP: /* "src/lxml/xmlerror.pxi":682 @@ -49315,7 +46650,6 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, * elif c_domain == xmlerror.XML_FROM_RELAXNGV: * error_func = _receiveRelaxNGValidationError */ - __Pyx_TraceLine(682,0,__PYX_ERR(1, 682, __pyx_L1_error)) __pyx_v_error_func = ((xmlGenericErrorFunc)__pyx_f_4lxml_5etree__receiveRelaxNGParseError); /* "src/lxml/xmlerror.pxi":681 @@ -49326,15 +46660,6 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, * elif c_domain == xmlerror.XML_FROM_RELAXNGV: */ break; - - /* "src/lxml/xmlerror.pxi":683 - * elif c_domain == xmlerror.XML_FROM_RELAXNGP: - * error_func = _receiveRelaxNGParseError - * elif c_domain == xmlerror.XML_FROM_RELAXNGV: # <<<<<<<<<<<<<< - * error_func = _receiveRelaxNGValidationError - * - */ - __Pyx_TraceLine(683,0,__PYX_ERR(1, 683, __pyx_L1_error)) case XML_FROM_RELAXNGV: /* "src/lxml/xmlerror.pxi":684 @@ -49344,7 +46669,6 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, * * if log is None or error_func is NULL: */ - __Pyx_TraceLine(684,0,__PYX_ERR(1, 684, __pyx_L1_error)) __pyx_v_error_func = ((xmlGenericErrorFunc)__pyx_f_4lxml_5etree__receiveRelaxNGValidationError); /* "src/lxml/xmlerror.pxi":683 @@ -49365,7 +46689,6 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, * c_log = NULL * error_func = _nullGenericErrorFunc */ - __Pyx_TraceLine(686,0,__PYX_ERR(1, 686, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_log == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (!__pyx_t_3) { @@ -49385,7 +46708,6 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, * error_func = _nullGenericErrorFunc * xmlerror.xmlSetGenericErrorFunc(c_log, error_func) */ - __Pyx_TraceLine(687,0,__PYX_ERR(1, 687, __pyx_L1_error)) __pyx_v_c_log = NULL; /* "src/lxml/xmlerror.pxi":688 @@ -49395,7 +46717,6 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, * xmlerror.xmlSetGenericErrorFunc(c_log, error_func) * */ - __Pyx_TraceLine(688,0,__PYX_ERR(1, 688, __pyx_L1_error)) __pyx_v_error_func = ((xmlGenericErrorFunc)__pyx_f_4lxml_5etree__nullGenericErrorFunc); /* "src/lxml/xmlerror.pxi":686 @@ -49414,7 +46735,6 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, * * */ - __Pyx_TraceLine(689,0,__PYX_ERR(1, 689, __pyx_L1_error)) xmlSetGenericErrorFunc(__pyx_v_c_log, __pyx_v_error_func); /* "src/lxml/xmlerror.pxi":676 @@ -49426,11 +46746,6 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._connectGenericErrorLog", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -49454,10 +46769,8 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle int __pyx_v_element_size; int __pyx_v_format_count; int __pyx_v_c_int; - __Pyx_TraceDeclarations int __pyx_t_1; int __pyx_t_2; - __Pyx_TraceCall("_receiveGenericError", __pyx_f[1], 692, 1, __PYX_ERR(1, 692, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":703 * cdef char* c_str @@ -49466,7 +46779,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * return * if msg[0] in b'\n\0': */ - __Pyx_TraceLine(703,1,__PYX_ERR(1, 703, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_msg == NULL) != 0); if (__pyx_t_1) { @@ -49477,7 +46789,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * if msg[0] in b'\n\0': * return */ - __Pyx_TraceLine(704,1,__PYX_ERR(1, 704, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/xmlerror.pxi":703 @@ -49496,7 +46807,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * return * */ - __Pyx_TraceLine(705,1,__PYX_ERR(1, 705, __pyx_L1_error)) switch ((__pyx_v_msg[0])) { case '\x00': case '\n': @@ -49508,7 +46818,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * * c_text = c_element = c_error.file = c_error.node = NULL */ - __Pyx_TraceLine(706,1,__PYX_ERR(1, 706, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/xmlerror.pxi":705 @@ -49529,7 +46838,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * c_error.line = 0 * */ - __Pyx_TraceLine(708,1,__PYX_ERR(1, 708, __pyx_L1_error)) __pyx_v_c_text = NULL; __pyx_v_c_element = NULL; __pyx_v_c_error.file = NULL; @@ -49542,7 +46850,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * * # parse "NAME %s" chunks from the format string */ - __Pyx_TraceLine(709,1,__PYX_ERR(1, 709, __pyx_L1_error)) __pyx_v_c_error.line = 0; /* "src/lxml/xmlerror.pxi":712 @@ -49552,7 +46859,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * format_count = 0 * while c_pos[0]: */ - __Pyx_TraceLine(712,1,__PYX_ERR(1, 712, __pyx_L1_error)) __pyx_v_c_name_pos = __pyx_v_msg; __pyx_v_c_pos = __pyx_v_msg; @@ -49563,7 +46869,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * while c_pos[0]: * if c_pos[0] == b'%': */ - __Pyx_TraceLine(713,1,__PYX_ERR(1, 713, __pyx_L1_error)) __pyx_v_format_count = 0; /* "src/lxml/xmlerror.pxi":714 @@ -49573,7 +46878,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * if c_pos[0] == b'%': * c_pos += 1 */ - __Pyx_TraceLine(714,1,__PYX_ERR(1, 714, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_pos[0]) != 0); if (!__pyx_t_1) break; @@ -49585,7 +46889,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * c_pos += 1 * if c_pos[0] == b's': # "%s" */ - __Pyx_TraceLine(715,1,__PYX_ERR(1, 715, __pyx_L1_error)) __pyx_t_1 = (((__pyx_v_c_pos[0]) == '%') != 0); if (__pyx_t_1) { @@ -49596,7 +46899,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * if c_pos[0] == b's': # "%s" * format_count += 1 */ - __Pyx_TraceLine(716,1,__PYX_ERR(1, 716, __pyx_L1_error)) __pyx_v_c_pos = (__pyx_v_c_pos + 1); /* "src/lxml/xmlerror.pxi":717 @@ -49606,7 +46908,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * format_count += 1 * c_str = cvarargs.va_charptr(args) */ - __Pyx_TraceLine(717,1,__PYX_ERR(1, 717, __pyx_L1_error)) __pyx_t_1 = (((__pyx_v_c_pos[0]) == 's') != 0); if (__pyx_t_1) { @@ -49617,7 +46918,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * c_str = cvarargs.va_charptr(args) * if c_pos == msg + 1: */ - __Pyx_TraceLine(718,1,__PYX_ERR(1, 718, __pyx_L1_error)) __pyx_v_format_count = (__pyx_v_format_count + 1); /* "src/lxml/xmlerror.pxi":719 @@ -49627,7 +46927,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * if c_pos == msg + 1: * c_text = c_str # msg == "%s..." */ - __Pyx_TraceLine(719,1,__PYX_ERR(1, 719, __pyx_L1_error)) __pyx_v_c_str = va_charptr(__pyx_v_args); /* "src/lxml/xmlerror.pxi":720 @@ -49637,7 +46936,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * c_text = c_str # msg == "%s..." * elif c_name_pos[0] == b'e': */ - __Pyx_TraceLine(720,1,__PYX_ERR(1, 720, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_pos == (__pyx_v_msg + 1)) != 0); if (__pyx_t_1) { @@ -49648,7 +46946,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * elif c_name_pos[0] == b'e': * if cstring_h.strncmp(c_name_pos, 'element %s', 10) == 0: */ - __Pyx_TraceLine(721,1,__PYX_ERR(1, 721, __pyx_L1_error)) __pyx_v_c_text = __pyx_v_c_str; /* "src/lxml/xmlerror.pxi":720 @@ -49668,7 +46965,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * if cstring_h.strncmp(c_name_pos, 'element %s', 10) == 0: * c_element = c_str */ - __Pyx_TraceLine(722,1,__PYX_ERR(1, 722, __pyx_L1_error)) __pyx_t_1 = (((__pyx_v_c_name_pos[0]) == 'e') != 0); if (__pyx_t_1) { @@ -49679,7 +46975,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * c_element = c_str * elif c_name_pos[0] == b'f': */ - __Pyx_TraceLine(723,1,__PYX_ERR(1, 723, __pyx_L1_error)) __pyx_t_1 = ((strncmp(__pyx_v_c_name_pos, ((char const *)"element %s"), 10) == 0) != 0); if (__pyx_t_1) { @@ -49690,7 +46985,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * elif c_name_pos[0] == b'f': * if cstring_h.strncmp(c_name_pos, 'file %s', 7) == 0: */ - __Pyx_TraceLine(724,1,__PYX_ERR(1, 724, __pyx_L1_error)) __pyx_v_c_element = __pyx_v_c_str; /* "src/lxml/xmlerror.pxi":723 @@ -49719,7 +47013,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * if cstring_h.strncmp(c_name_pos, 'file %s', 7) == 0: * if cstring_h.strncmp('string://__STRING__XSLT', */ - __Pyx_TraceLine(725,1,__PYX_ERR(1, 725, __pyx_L1_error)) __pyx_t_1 = (((__pyx_v_c_name_pos[0]) == 'f') != 0); if (__pyx_t_1) { @@ -49730,7 +47023,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * if cstring_h.strncmp('string://__STRING__XSLT', * c_str, 23) == 0: */ - __Pyx_TraceLine(726,1,__PYX_ERR(1, 726, __pyx_L1_error)) __pyx_t_1 = ((strncmp(__pyx_v_c_name_pos, ((char const *)"file %s"), 7) == 0) != 0); if (__pyx_t_1) { @@ -49741,7 +47033,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * c_str = '' * c_error.file = c_str */ - __Pyx_TraceLine(728,1,__PYX_ERR(1, 728, __pyx_L1_error)) __pyx_t_1 = ((strncmp(((char const *)"string://__STRING__XSLT"), __pyx_v_c_str, 23) == 0) != 0); /* "src/lxml/xmlerror.pxi":727 @@ -49751,7 +47042,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * c_str, 23) == 0: * c_str = '' */ - __Pyx_TraceLine(727,1,__PYX_ERR(1, 727, __pyx_L1_error)) if (__pyx_t_1) { /* "src/lxml/xmlerror.pxi":729 @@ -49761,7 +47051,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * c_error.file = c_str * elif c_pos[0] == b'd': # "%d" */ - __Pyx_TraceLine(729,1,__PYX_ERR(1, 729, __pyx_L1_error)) __pyx_v_c_str = ((char *)""); /* "src/lxml/xmlerror.pxi":727 @@ -49780,7 +47069,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * elif c_pos[0] == b'd': # "%d" * format_count += 1 */ - __Pyx_TraceLine(730,1,__PYX_ERR(1, 730, __pyx_L1_error)) __pyx_v_c_error.file = __pyx_v_c_str; /* "src/lxml/xmlerror.pxi":726 @@ -49819,7 +47107,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * format_count += 1 * c_int = cvarargs.va_int(args) */ - __Pyx_TraceLine(731,1,__PYX_ERR(1, 731, __pyx_L1_error)) __pyx_t_1 = (((__pyx_v_c_pos[0]) == 'd') != 0); if (__pyx_t_1) { @@ -49830,7 +47117,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * c_int = cvarargs.va_int(args) * if cstring_h.strncmp(c_name_pos, 'line %d', 7) == 0: */ - __Pyx_TraceLine(732,1,__PYX_ERR(1, 732, __pyx_L1_error)) __pyx_v_format_count = (__pyx_v_format_count + 1); /* "src/lxml/xmlerror.pxi":733 @@ -49840,7 +47126,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * if cstring_h.strncmp(c_name_pos, 'line %d', 7) == 0: * c_error.line = c_int */ - __Pyx_TraceLine(733,1,__PYX_ERR(1, 733, __pyx_L1_error)) __pyx_v_c_int = va_int(__pyx_v_args); /* "src/lxml/xmlerror.pxi":734 @@ -49850,7 +47135,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * c_error.line = c_int * elif c_pos[0] != b'%': # "%%" == "%" */ - __Pyx_TraceLine(734,1,__PYX_ERR(1, 734, __pyx_L1_error)) __pyx_t_1 = ((strncmp(__pyx_v_c_name_pos, ((char const *)"line %d"), 7) == 0) != 0); if (__pyx_t_1) { @@ -49861,7 +47145,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * elif c_pos[0] != b'%': # "%%" == "%" * format_count += 1 */ - __Pyx_TraceLine(735,1,__PYX_ERR(1, 735, __pyx_L1_error)) __pyx_v_c_error.line = __pyx_v_c_int; /* "src/lxml/xmlerror.pxi":734 @@ -49890,7 +47173,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * format_count += 1 * break # unexpected format or end of string => abort */ - __Pyx_TraceLine(736,1,__PYX_ERR(1, 736, __pyx_L1_error)) __pyx_t_1 = (((__pyx_v_c_pos[0]) != '%') != 0); if (__pyx_t_1) { @@ -49901,7 +47183,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * break # unexpected format or end of string => abort * elif c_pos[0] == b' ': */ - __Pyx_TraceLine(737,1,__PYX_ERR(1, 737, __pyx_L1_error)) __pyx_v_format_count = (__pyx_v_format_count + 1); /* "src/lxml/xmlerror.pxi":738 @@ -49911,7 +47192,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * elif c_pos[0] == b' ': * if c_pos[1] != b'%': */ - __Pyx_TraceLine(738,1,__PYX_ERR(1, 738, __pyx_L1_error)) goto __pyx_L5_break; /* "src/lxml/xmlerror.pxi":736 @@ -49941,7 +47221,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * if c_pos[1] != b'%': * c_name_pos = c_pos + 1 */ - __Pyx_TraceLine(739,1,__PYX_ERR(1, 739, __pyx_L1_error)) __pyx_t_1 = (((__pyx_v_c_pos[0]) == ' ') != 0); if (__pyx_t_1) { @@ -49952,7 +47231,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * c_name_pos = c_pos + 1 * c_pos += 1 */ - __Pyx_TraceLine(740,1,__PYX_ERR(1, 740, __pyx_L1_error)) __pyx_t_1 = (((__pyx_v_c_pos[1]) != '%') != 0); if (__pyx_t_1) { @@ -49963,7 +47241,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * c_pos += 1 * */ - __Pyx_TraceLine(741,1,__PYX_ERR(1, 741, __pyx_L1_error)) __pyx_v_c_name_pos = (__pyx_v_c_pos + 1); /* "src/lxml/xmlerror.pxi":740 @@ -49992,7 +47269,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * * c_message = NULL */ - __Pyx_TraceLine(742,1,__PYX_ERR(1, 742, __pyx_L1_error)) __pyx_v_c_pos = (__pyx_v_c_pos + 1); } __pyx_L5_break:; @@ -50004,7 +47280,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * if c_text is NULL: * if c_element is not NULL and format_count == 1: */ - __Pyx_TraceLine(744,1,__PYX_ERR(1, 744, __pyx_L1_error)) __pyx_v_c_message = NULL; /* "src/lxml/xmlerror.pxi":745 @@ -50014,7 +47289,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * if c_element is not NULL and format_count == 1: * # special case: a single occurrence of 'element %s' */ - __Pyx_TraceLine(745,1,__PYX_ERR(1, 745, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_text == NULL) != 0); if (__pyx_t_1) { @@ -50025,7 +47299,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * # special case: a single occurrence of 'element %s' * text_size = cstring_h.strlen(msg) */ - __Pyx_TraceLine(746,1,__PYX_ERR(1, 746, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_element != NULL) != 0); if (__pyx_t_2) { } else { @@ -50044,7 +47317,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * element_size = cstring_h.strlen(c_element) * c_message = stdlib.malloc( */ - __Pyx_TraceLine(748,1,__PYX_ERR(1, 748, __pyx_L1_error)) __pyx_v_text_size = strlen(__pyx_v_msg); /* "src/lxml/xmlerror.pxi":749 @@ -50054,7 +47326,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * c_message = stdlib.malloc( * (text_size + element_size + 1) * sizeof(char)) */ - __Pyx_TraceLine(749,1,__PYX_ERR(1, 749, __pyx_L1_error)) __pyx_v_element_size = strlen(__pyx_v_c_element); /* "src/lxml/xmlerror.pxi":750 @@ -50064,7 +47335,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * (text_size + element_size + 1) * sizeof(char)) * stdio.sprintf(c_message, msg, c_element) */ - __Pyx_TraceLine(750,1,__PYX_ERR(1, 750, __pyx_L1_error)) __pyx_v_c_message = ((char *)malloc((((__pyx_v_text_size + __pyx_v_element_size) + 1) * (sizeof(char))))); /* "src/lxml/xmlerror.pxi":752 @@ -50074,7 +47344,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * c_error.message = c_message * else: */ - __Pyx_TraceLine(752,1,__PYX_ERR(1, 752, __pyx_L1_error)) (void)(sprintf(__pyx_v_c_message, __pyx_v_msg, __pyx_v_c_element)); /* "src/lxml/xmlerror.pxi":753 @@ -50084,7 +47353,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * else: * c_error.message = '' */ - __Pyx_TraceLine(753,1,__PYX_ERR(1, 753, __pyx_L1_error)) __pyx_v_c_error.message = __pyx_v_c_message; /* "src/lxml/xmlerror.pxi":746 @@ -50104,7 +47372,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * elif c_element is NULL: * c_error.message = c_text */ - __Pyx_TraceLine(755,1,__PYX_ERR(1, 755, __pyx_L1_error)) /*else*/ { __pyx_v_c_error.message = ((char *)""); } @@ -50127,7 +47394,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * c_error.message = c_text * else: */ - __Pyx_TraceLine(756,1,__PYX_ERR(1, 756, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_element == NULL) != 0); if (__pyx_t_1) { @@ -50138,7 +47404,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * else: * text_size = cstring_h.strlen(c_text) */ - __Pyx_TraceLine(757,1,__PYX_ERR(1, 757, __pyx_L1_error)) __pyx_v_c_error.message = __pyx_v_c_text; /* "src/lxml/xmlerror.pxi":756 @@ -50158,7 +47423,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * element_size = cstring_h.strlen(c_element) * c_message = stdlib.malloc( */ - __Pyx_TraceLine(759,1,__PYX_ERR(1, 759, __pyx_L1_error)) /*else*/ { __pyx_v_text_size = strlen(__pyx_v_c_text); @@ -50169,7 +47433,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * c_message = stdlib.malloc( * (text_size + 12 + element_size + 1) * sizeof(char)) */ - __Pyx_TraceLine(760,1,__PYX_ERR(1, 760, __pyx_L1_error)) __pyx_v_element_size = strlen(__pyx_v_c_element); /* "src/lxml/xmlerror.pxi":761 @@ -50179,7 +47442,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * (text_size + 12 + element_size + 1) * sizeof(char)) * stdio.sprintf(c_message, "%s, element '%s'", c_text, c_element) */ - __Pyx_TraceLine(761,1,__PYX_ERR(1, 761, __pyx_L1_error)) __pyx_v_c_message = ((char *)malloc(((((__pyx_v_text_size + 12) + __pyx_v_element_size) + 1) * (sizeof(char))))); /* "src/lxml/xmlerror.pxi":763 @@ -50189,7 +47451,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * c_error.message = c_message * */ - __Pyx_TraceLine(763,1,__PYX_ERR(1, 763, __pyx_L1_error)) (void)(sprintf(__pyx_v_c_message, ((char const *)"%s, element '%s'"), __pyx_v_c_text, __pyx_v_c_element)); /* "src/lxml/xmlerror.pxi":764 @@ -50199,7 +47460,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * * c_error.domain = c_domain */ - __Pyx_TraceLine(764,1,__PYX_ERR(1, 764, __pyx_L1_error)) __pyx_v_c_error.message = __pyx_v_c_message; } __pyx_L14:; @@ -50211,7 +47471,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * c_error.code = xmlerror.XML_ERR_OK # what else? * c_error.level = xmlerror.XML_ERR_ERROR # what else? */ - __Pyx_TraceLine(766,1,__PYX_ERR(1, 766, __pyx_L1_error)) __pyx_v_c_error.domain = __pyx_v_c_domain; /* "src/lxml/xmlerror.pxi":767 @@ -50221,7 +47480,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * c_error.level = xmlerror.XML_ERR_ERROR # what else? * c_error.int2 = 0 */ - __Pyx_TraceLine(767,1,__PYX_ERR(1, 767, __pyx_L1_error)) __pyx_v_c_error.code = XML_ERR_OK; /* "src/lxml/xmlerror.pxi":768 @@ -50231,7 +47489,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * c_error.int2 = 0 * */ - __Pyx_TraceLine(768,1,__PYX_ERR(1, 768, __pyx_L1_error)) __pyx_v_c_error.level = XML_ERR_ERROR; /* "src/lxml/xmlerror.pxi":769 @@ -50241,7 +47498,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * * _forwardError(c_log_handler, &c_error) */ - __Pyx_TraceLine(769,1,__PYX_ERR(1, 769, __pyx_L1_error)) __pyx_v_c_error.int2 = 0; /* "src/lxml/xmlerror.pxi":771 @@ -50251,7 +47507,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * * if c_message is not NULL: */ - __Pyx_TraceLine(771,1,__PYX_ERR(1, 771, __pyx_L1_error)) __pyx_f_4lxml_5etree__forwardError(__pyx_v_c_log_handler, (&__pyx_v_c_error)); /* "src/lxml/xmlerror.pxi":773 @@ -50261,7 +47516,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * stdlib.free(c_message) * */ - __Pyx_TraceLine(773,1,__PYX_ERR(1, 773, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_message != NULL) != 0); if (__pyx_t_1) { @@ -50272,7 +47526,6 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle * * ################################################################################ */ - __Pyx_TraceLine(774,1,__PYX_ERR(1, 774, __pyx_L1_error)) free(__pyx_v_c_message); /* "src/lxml/xmlerror.pxi":773 @@ -50293,11 +47546,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._receiveGenericError", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); } /* "src/lxml/xmlerror.pxi":780 @@ -50317,7 +47566,6 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { PyObject *__pyx_v_name = NULL; PyObject *__pyx_v_value = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -50333,7 +47581,6 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { PyObject *(*__pyx_t_12)(PyObject *); int __pyx_t_13; __Pyx_RefNannySetupContext("__initErrorConstants", 0); - __Pyx_TraceCall("__initErrorConstants", __pyx_f[1], 780, 0, __PYX_ERR(1, 780, __pyx_L1_error)); /* "src/lxml/xmlerror.pxi":783 * "Called at setup time to parse the constants and build the classes below." @@ -50342,8 +47589,7 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { * (ErrorDomains, __ERROR_DOMAINS), * (ErrorTypes, __PARSER_ERROR_TYPES), */ - __Pyx_TraceLine(783,0,__PYX_ERR(1, 783, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetModuleGlobalName(__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, 783, __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_GOTREF(__pyx_t_2); @@ -50361,8 +47607,7 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { * (ErrorTypes, __PARSER_ERROR_TYPES), * (RelaxNGErrorTypes, __RELAXNG_ERROR_TYPES)) */ - __Pyx_TraceLine(784,0,__PYX_ERR(1, 784, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetModuleGlobalName(__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, 784, __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_GOTREF(__pyx_t_3); @@ -50380,8 +47625,7 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { * (RelaxNGErrorTypes, __RELAXNG_ERROR_TYPES)) * */ - __Pyx_TraceLine(785,0,__PYX_ERR(1, 785, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetModuleGlobalName(__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, 785, __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_GOTREF(__pyx_t_4); @@ -50399,8 +47643,7 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { * * for cls, constants in const_defs: */ - __Pyx_TraceLine(786,0,__PYX_ERR(1, 786, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetModuleGlobalName(__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, 786, __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_GOTREF(__pyx_t_5); @@ -50418,7 +47661,6 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { * (ErrorDomains, __ERROR_DOMAINS), * (ErrorTypes, __PARSER_ERROR_TYPES), */ - __Pyx_TraceLine(783,0,__PYX_ERR(1, 783, __pyx_L1_error)) __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); @@ -50443,7 +47685,6 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { * reverse_dict = {} * cls._names = reverse_dict */ - __Pyx_TraceLine(788,0,__PYX_ERR(1, 788, __pyx_L1_error)) __pyx_t_1 = __pyx_v_const_defs; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; for (;;) { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break; @@ -50488,7 +47729,6 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { * cls._names = reverse_dict * cls._getName = reverse_dict.get */ - __Pyx_TraceLine(789,0,__PYX_ERR(1, 789, __pyx_L1_error)) __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_reverse_dict, ((PyObject*)__pyx_t_5)); @@ -50501,7 +47741,6 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { * cls._getName = reverse_dict.get * for line in constants.splitlines(): */ - __Pyx_TraceLine(790,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, 790, __pyx_L1_error) /* "src/lxml/xmlerror.pxi":791 @@ -50511,7 +47750,6 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { * for line in constants.splitlines(): * if not line: */ - __Pyx_TraceLine(791,0,__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, 791, __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) @@ -50524,7 +47762,6 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { * if not line: * continue */ - __Pyx_TraceLine(792,0,__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, 792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; @@ -50537,12 +47774,9 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (__pyx_t_4) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 792, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 792, __pyx_L1_error) - } + __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) __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)) { @@ -50595,7 +47829,6 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { * continue * name, value = line.split('=') */ - __Pyx_TraceLine(793,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, 793, __pyx_L1_error) __pyx_t_10 = ((!__pyx_t_9) != 0); if (__pyx_t_10) { @@ -50607,7 +47840,6 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { * name, value = line.split('=') * value = int(value) */ - __Pyx_TraceLine(794,0,__PYX_ERR(1, 794, __pyx_L1_error)) goto __pyx_L5_continue; /* "src/lxml/xmlerror.pxi":793 @@ -50626,14 +47858,25 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { * value = int(value) * setattr(cls, name, value) */ - __Pyx_TraceLine(795,0,__PYX_ERR(1, 795, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 795, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__57, NULL); 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, 795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { - PyObject* sequence = __pyx_t_4; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __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) + __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))) { + PyObject* sequence = __pyx_t_5; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); @@ -50642,29 +47885,29 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { - __pyx_t_5 = PyList_GET_ITEM(sequence, 0); + __pyx_t_4 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } - __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 795, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 795, __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_GOTREF(__pyx_t_2); #endif - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; - __pyx_t_11 = PyObject_GetIter(__pyx_t_4); 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, 795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext; - index = 0; __pyx_t_5 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_5)) goto __pyx_L8_unpacking_failed; - __Pyx_GOTREF(__pyx_t_5); + index = 0; __pyx_t_4 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_4)) goto __pyx_L8_unpacking_failed; + __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) @@ -50678,8 +47921,8 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { __PYX_ERR(1, 795, __pyx_L1_error) __pyx_L9_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5); - __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_4); + __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_2); __pyx_t_2 = 0; @@ -50690,11 +47933,10 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { * setattr(cls, name, value) * reverse_dict[value] = name */ - __Pyx_TraceLine(796,0,__PYX_ERR(1, 796, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 796, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4); - __pyx_t_4 = 0; + __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 796, __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 * name, value = line.split('=') @@ -50703,7 +47945,6 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { * reverse_dict[value] = name * */ - __Pyx_TraceLine(797,0,__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, 797, __pyx_L1_error) /* "src/lxml/xmlerror.pxi":798 @@ -50713,7 +47954,6 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { * * # discard the global tuple references after use */ - __Pyx_TraceLine(798,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, 798, __pyx_L1_error) /* "src/lxml/xmlerror.pxi":792 @@ -50723,7 +47963,6 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { * if not line: * continue */ - __Pyx_TraceLine(792,0,__PYX_ERR(1, 792, __pyx_L1_error)) __pyx_L5_continue:; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -50735,7 +47974,6 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { * reverse_dict = {} * cls._names = reverse_dict */ - __Pyx_TraceLine(788,0,__PYX_ERR(1, 788, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -50746,7 +47984,6 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { * * */ - __Pyx_TraceLine(801,0,__PYX_ERR(1, 801, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_4lxml_5etree___ERROR_LEVELS); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree___ERROR_LEVELS, Py_None); @@ -50793,12 +48030,11 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_value); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":347 +/* "lxml/etree.pyx":345 * cdef _BaseParser _parser * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -50818,22 +48054,19 @@ static void __pyx_pw_4lxml_5etree_9_Document_1__dealloc__(PyObject *__pyx_v_self } static void __pyx_pf_4lxml_5etree_9_Document___dealloc__(struct LxmlDocument *__pyx_v_self) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - __Pyx_TraceCall("__dealloc__", __pyx_f[0], 347, 0, __PYX_ERR(0, 347, __pyx_L1_error)); - /* "lxml/etree.pyx":351 + /* "lxml/etree.pyx":349 * # to clean the whole thing up, as all nodes have a reference to * # the document * tree.xmlFreeDoc(self._c_doc) # <<<<<<<<<<<<<< * * @cython.final */ - __Pyx_TraceLine(351,0,__PYX_ERR(0, 351, __pyx_L1_error)) xmlFreeDoc(__pyx_v_self->_c_doc); - /* "lxml/etree.pyx":347 + /* "lxml/etree.pyx":345 * cdef _BaseParser _parser * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -50842,15 +48075,10 @@ static void __pyx_pf_4lxml_5etree_9_Document___dealloc__(struct LxmlDocument *__ */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._Document.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } -/* "lxml/etree.pyx":354 +/* "lxml/etree.pyx":352 * * @cython.final * cdef getroot(self): # <<<<<<<<<<<<<< @@ -50861,47 +48089,42 @@ static void __pyx_pf_4lxml_5etree_9_Document___dealloc__(struct LxmlDocument *__ static PyObject *__pyx_f_4lxml_5etree_9_Document_getroot(struct LxmlDocument *__pyx_v_self) { xmlNode *__pyx_v_c_node; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getroot", 0); - __Pyx_TraceCall("getroot", __pyx_f[0], 354, 0, __PYX_ERR(0, 354, __pyx_L1_error)); - /* "lxml/etree.pyx":357 + /* "lxml/etree.pyx":355 * # return an element proxy for the document root * cdef xmlNode* c_node * c_node = tree.xmlDocGetRootElement(self._c_doc) # <<<<<<<<<<<<<< * if c_node is NULL: * return None */ - __Pyx_TraceLine(357,0,__PYX_ERR(0, 357, __pyx_L1_error)) __pyx_v_c_node = xmlDocGetRootElement(__pyx_v_self->_c_doc); - /* "lxml/etree.pyx":358 + /* "lxml/etree.pyx":356 * cdef xmlNode* c_node * c_node = tree.xmlDocGetRootElement(self._c_doc) * if c_node is NULL: # <<<<<<<<<<<<<< * return None * return _elementFactory(self, c_node) */ - __Pyx_TraceLine(358,0,__PYX_ERR(0, 358, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":359 + /* "lxml/etree.pyx":357 * c_node = tree.xmlDocGetRootElement(self._c_doc) * if c_node is NULL: * return None # <<<<<<<<<<<<<< * return _elementFactory(self, c_node) * */ - __Pyx_TraceLine(359,0,__PYX_ERR(0, 359, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/etree.pyx":358 + /* "lxml/etree.pyx":356 * cdef xmlNode* c_node * c_node = tree.xmlDocGetRootElement(self._c_doc) * if c_node is NULL: # <<<<<<<<<<<<<< @@ -50910,22 +48133,21 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_getroot(struct LxmlDocument *__ */ } - /* "lxml/etree.pyx":360 + /* "lxml/etree.pyx":358 * if c_node is NULL: * return None * return _elementFactory(self, c_node) # <<<<<<<<<<<<<< * * @cython.final */ - __Pyx_TraceLine(360,0,__PYX_ERR(0, 360, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(__pyx_v_self, __pyx_v_c_node)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(__pyx_v_self, __pyx_v_c_node)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":354 + /* "lxml/etree.pyx":352 * * @cython.final * cdef getroot(self): # <<<<<<<<<<<<<< @@ -50940,12 +48162,11 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_getroot(struct LxmlDocument *__ __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":363 +/* "lxml/etree.pyx":361 * * @cython.final * cdef bint hasdoctype(self): # <<<<<<<<<<<<<< @@ -50955,21 +48176,18 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_getroot(struct LxmlDocument *__ static int __pyx_f_4lxml_5etree_9_Document_hasdoctype(struct LxmlDocument *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("hasdoctype", 0); - __Pyx_TraceCall("hasdoctype", __pyx_f[0], 363, 0, __PYX_ERR(0, 363, __pyx_L1_error)); - /* "lxml/etree.pyx":365 + /* "lxml/etree.pyx":363 * cdef bint hasdoctype(self): * # DOCTYPE gets parsed into internal subset (xmlDTD*) * return self._c_doc is not NULL and self._c_doc.intSubset is not NULL # <<<<<<<<<<<<<< * * @cython.final */ - __Pyx_TraceLine(365,0,__PYX_ERR(0, 365, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->_c_doc != NULL) != 0); if (__pyx_t_2) { } else { @@ -50982,7 +48200,7 @@ static int __pyx_f_4lxml_5etree_9_Document_hasdoctype(struct LxmlDocument *__pyx __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "lxml/etree.pyx":363 + /* "lxml/etree.pyx":361 * * @cython.final * cdef bint hasdoctype(self): # <<<<<<<<<<<<<< @@ -50991,16 +48209,12 @@ static int __pyx_f_4lxml_5etree_9_Document_hasdoctype(struct LxmlDocument *__pyx */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._Document.hasdoctype", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":368 +/* "lxml/etree.pyx":366 * * @cython.final * cdef getdoctype(self): # <<<<<<<<<<<<<< @@ -51015,7 +48229,6 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_getdoctype(struct LxmlDocument PyObject *__pyx_v_sys_url = NULL; PyObject *__pyx_v_root_name = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlDtd *__pyx_t_1; int __pyx_t_2; @@ -51023,77 +48236,70 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_getdoctype(struct LxmlDocument int __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("getdoctype", 0); - __Pyx_TraceCall("getdoctype", __pyx_f[0], 368, 0, __PYX_ERR(0, 368, __pyx_L1_error)); - /* "lxml/etree.pyx":372 + /* "lxml/etree.pyx":370 * cdef tree.xmlDtd* c_dtd * cdef xmlNode* c_root_node * public_id = None # <<<<<<<<<<<<<< * sys_url = None * c_dtd = self._c_doc.intSubset */ - __Pyx_TraceLine(372,0,__PYX_ERR(0, 372, __pyx_L1_error)) __Pyx_INCREF(Py_None); __pyx_v_public_id = Py_None; - /* "lxml/etree.pyx":373 + /* "lxml/etree.pyx":371 * cdef xmlNode* c_root_node * public_id = None * sys_url = None # <<<<<<<<<<<<<< * c_dtd = self._c_doc.intSubset * if c_dtd is not NULL: */ - __Pyx_TraceLine(373,0,__PYX_ERR(0, 373, __pyx_L1_error)) __Pyx_INCREF(Py_None); __pyx_v_sys_url = Py_None; - /* "lxml/etree.pyx":374 + /* "lxml/etree.pyx":372 * public_id = None * sys_url = None * c_dtd = self._c_doc.intSubset # <<<<<<<<<<<<<< * if c_dtd is not NULL: * if c_dtd.ExternalID is not NULL: */ - __Pyx_TraceLine(374,0,__PYX_ERR(0, 374, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_c_doc->intSubset; __pyx_v_c_dtd = __pyx_t_1; - /* "lxml/etree.pyx":375 + /* "lxml/etree.pyx":373 * sys_url = None * c_dtd = self._c_doc.intSubset * if c_dtd is not NULL: # <<<<<<<<<<<<<< * if c_dtd.ExternalID is not NULL: * public_id = funicode(c_dtd.ExternalID) */ - __Pyx_TraceLine(375,0,__PYX_ERR(0, 375, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_dtd != NULL) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":376 + /* "lxml/etree.pyx":374 * c_dtd = self._c_doc.intSubset * if c_dtd is not NULL: * if c_dtd.ExternalID is not NULL: # <<<<<<<<<<<<<< * public_id = funicode(c_dtd.ExternalID) * if c_dtd.SystemID is not NULL: */ - __Pyx_TraceLine(376,0,__PYX_ERR(0, 376, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_dtd->ExternalID != NULL) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":377 + /* "lxml/etree.pyx":375 * if c_dtd is not NULL: * if c_dtd.ExternalID is not NULL: * public_id = funicode(c_dtd.ExternalID) # <<<<<<<<<<<<<< * if c_dtd.SystemID is not NULL: * sys_url = funicode(c_dtd.SystemID) */ - __Pyx_TraceLine(377,0,__PYX_ERR(0, 377, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_dtd->ExternalID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_dtd->ExternalID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_public_id, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":376 + /* "lxml/etree.pyx":374 * c_dtd = self._c_doc.intSubset * if c_dtd is not NULL: * if c_dtd.ExternalID is not NULL: # <<<<<<<<<<<<<< @@ -51102,31 +48308,29 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_getdoctype(struct LxmlDocument */ } - /* "lxml/etree.pyx":378 + /* "lxml/etree.pyx":376 * if c_dtd.ExternalID is not NULL: * public_id = funicode(c_dtd.ExternalID) * if c_dtd.SystemID is not NULL: # <<<<<<<<<<<<<< * sys_url = funicode(c_dtd.SystemID) * c_dtd = self._c_doc.extSubset */ - __Pyx_TraceLine(378,0,__PYX_ERR(0, 378, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_dtd->SystemID != NULL) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":379 + /* "lxml/etree.pyx":377 * public_id = funicode(c_dtd.ExternalID) * if c_dtd.SystemID is not NULL: * sys_url = funicode(c_dtd.SystemID) # <<<<<<<<<<<<<< * c_dtd = self._c_doc.extSubset * if c_dtd is not NULL: */ - __Pyx_TraceLine(379,0,__PYX_ERR(0, 379, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_dtd->SystemID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 379, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_dtd->SystemID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_sys_url, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":378 + /* "lxml/etree.pyx":376 * if c_dtd.ExternalID is not NULL: * public_id = funicode(c_dtd.ExternalID) * if c_dtd.SystemID is not NULL: # <<<<<<<<<<<<<< @@ -51135,7 +48339,7 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_getdoctype(struct LxmlDocument */ } - /* "lxml/etree.pyx":375 + /* "lxml/etree.pyx":373 * sys_url = None * c_dtd = self._c_doc.intSubset * if c_dtd is not NULL: # <<<<<<<<<<<<<< @@ -51144,37 +48348,34 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_getdoctype(struct LxmlDocument */ } - /* "lxml/etree.pyx":380 + /* "lxml/etree.pyx":378 * if c_dtd.SystemID is not NULL: * sys_url = funicode(c_dtd.SystemID) * c_dtd = self._c_doc.extSubset # <<<<<<<<<<<<<< * if c_dtd is not NULL: * if not public_id and c_dtd.ExternalID is not NULL: */ - __Pyx_TraceLine(380,0,__PYX_ERR(0, 380, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_c_doc->extSubset; __pyx_v_c_dtd = __pyx_t_1; - /* "lxml/etree.pyx":381 + /* "lxml/etree.pyx":379 * sys_url = funicode(c_dtd.SystemID) * c_dtd = self._c_doc.extSubset * if c_dtd is not NULL: # <<<<<<<<<<<<<< * if not public_id and c_dtd.ExternalID is not NULL: * public_id = funicode(c_dtd.ExternalID) */ - __Pyx_TraceLine(381,0,__PYX_ERR(0, 381, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_dtd != NULL) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":382 + /* "lxml/etree.pyx":380 * c_dtd = self._c_doc.extSubset * if c_dtd is not NULL: * if not public_id and c_dtd.ExternalID is not NULL: # <<<<<<<<<<<<<< * public_id = funicode(c_dtd.ExternalID) * if not sys_url and c_dtd.SystemID is not NULL: */ - __Pyx_TraceLine(382,0,__PYX_ERR(0, 382, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_public_id); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 382, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_public_id); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 380, __pyx_L1_error) __pyx_t_5 = ((!__pyx_t_4) != 0); if (__pyx_t_5) { } else { @@ -51186,20 +48387,19 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_getdoctype(struct LxmlDocument __pyx_L8_bool_binop_done:; if (__pyx_t_2) { - /* "lxml/etree.pyx":383 + /* "lxml/etree.pyx":381 * if c_dtd is not NULL: * if not public_id and c_dtd.ExternalID is not NULL: * public_id = funicode(c_dtd.ExternalID) # <<<<<<<<<<<<<< * if not sys_url and c_dtd.SystemID is not NULL: * sys_url = funicode(c_dtd.SystemID) */ - __Pyx_TraceLine(383,0,__PYX_ERR(0, 383, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_dtd->ExternalID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 383, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_dtd->ExternalID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_public_id, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":382 + /* "lxml/etree.pyx":380 * c_dtd = self._c_doc.extSubset * if c_dtd is not NULL: * if not public_id and c_dtd.ExternalID is not NULL: # <<<<<<<<<<<<<< @@ -51208,15 +48408,14 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_getdoctype(struct LxmlDocument */ } - /* "lxml/etree.pyx":384 + /* "lxml/etree.pyx":382 * if not public_id and c_dtd.ExternalID is not NULL: * public_id = funicode(c_dtd.ExternalID) * if not sys_url and c_dtd.SystemID is not NULL: # <<<<<<<<<<<<<< * sys_url = funicode(c_dtd.SystemID) * c_root_node = tree.xmlDocGetRootElement(self._c_doc) */ - __Pyx_TraceLine(384,0,__PYX_ERR(0, 384, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_sys_url); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 384, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_sys_url); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 382, __pyx_L1_error) __pyx_t_4 = ((!__pyx_t_5) != 0); if (__pyx_t_4) { } else { @@ -51228,20 +48427,19 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_getdoctype(struct LxmlDocument __pyx_L11_bool_binop_done:; if (__pyx_t_2) { - /* "lxml/etree.pyx":385 + /* "lxml/etree.pyx":383 * public_id = funicode(c_dtd.ExternalID) * if not sys_url and c_dtd.SystemID is not NULL: * sys_url = funicode(c_dtd.SystemID) # <<<<<<<<<<<<<< * c_root_node = tree.xmlDocGetRootElement(self._c_doc) * if c_root_node is NULL: */ - __Pyx_TraceLine(385,0,__PYX_ERR(0, 385, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_dtd->SystemID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 385, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_dtd->SystemID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_sys_url, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":384 + /* "lxml/etree.pyx":382 * if not public_id and c_dtd.ExternalID is not NULL: * public_id = funicode(c_dtd.ExternalID) * if not sys_url and c_dtd.SystemID is not NULL: # <<<<<<<<<<<<<< @@ -51250,7 +48448,7 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_getdoctype(struct LxmlDocument */ } - /* "lxml/etree.pyx":381 + /* "lxml/etree.pyx":379 * sys_url = funicode(c_dtd.SystemID) * c_dtd = self._c_doc.extSubset * if c_dtd is not NULL: # <<<<<<<<<<<<<< @@ -51259,39 +48457,36 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_getdoctype(struct LxmlDocument */ } - /* "lxml/etree.pyx":386 + /* "lxml/etree.pyx":384 * if not sys_url and c_dtd.SystemID is not NULL: * sys_url = funicode(c_dtd.SystemID) * c_root_node = tree.xmlDocGetRootElement(self._c_doc) # <<<<<<<<<<<<<< * if c_root_node is NULL: * root_name = None */ - __Pyx_TraceLine(386,0,__PYX_ERR(0, 386, __pyx_L1_error)) __pyx_v_c_root_node = xmlDocGetRootElement(__pyx_v_self->_c_doc); - /* "lxml/etree.pyx":387 + /* "lxml/etree.pyx":385 * sys_url = funicode(c_dtd.SystemID) * c_root_node = tree.xmlDocGetRootElement(self._c_doc) * if c_root_node is NULL: # <<<<<<<<<<<<<< * root_name = None * else: */ - __Pyx_TraceLine(387,0,__PYX_ERR(0, 387, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_root_node == NULL) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":388 + /* "lxml/etree.pyx":386 * c_root_node = tree.xmlDocGetRootElement(self._c_doc) * if c_root_node is NULL: * root_name = None # <<<<<<<<<<<<<< * else: * root_name = funicode(c_root_node.name) */ - __Pyx_TraceLine(388,0,__PYX_ERR(0, 388, __pyx_L1_error)) __Pyx_INCREF(Py_None); __pyx_v_root_name = Py_None; - /* "lxml/etree.pyx":387 + /* "lxml/etree.pyx":385 * sys_url = funicode(c_dtd.SystemID) * c_root_node = tree.xmlDocGetRootElement(self._c_doc) * if c_root_node is NULL: # <<<<<<<<<<<<<< @@ -51301,32 +48496,30 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_getdoctype(struct LxmlDocument goto __pyx_L13; } - /* "lxml/etree.pyx":390 + /* "lxml/etree.pyx":388 * root_name = None * else: * root_name = funicode(c_root_node.name) # <<<<<<<<<<<<<< - * return (root_name, public_id, sys_url) + * return root_name, public_id, sys_url * */ - __Pyx_TraceLine(390,0,__PYX_ERR(0, 390, __pyx_L1_error)) /*else*/ { - __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_root_node->name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 390, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_root_node->name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_root_name = __pyx_t_3; __pyx_t_3 = 0; } __pyx_L13:; - /* "lxml/etree.pyx":391 + /* "lxml/etree.pyx":389 * else: * root_name = funicode(c_root_node.name) - * return (root_name, public_id, sys_url) # <<<<<<<<<<<<<< + * return root_name, public_id, sys_url # <<<<<<<<<<<<<< * * @cython.final */ - __Pyx_TraceLine(391,0,__PYX_ERR(0, 391, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 391, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_root_name); __Pyx_GIVEREF(__pyx_v_root_name); @@ -51341,7 +48534,7 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_getdoctype(struct LxmlDocument __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":368 + /* "lxml/etree.pyx":366 * * @cython.final * cdef getdoctype(self): # <<<<<<<<<<<<<< @@ -51359,12 +48552,11 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_getdoctype(struct LxmlDocument __Pyx_XDECREF(__pyx_v_sys_url); __Pyx_XDECREF(__pyx_v_root_name); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":394 +/* "lxml/etree.pyx":392 * * @cython.final * cdef getxmlinfo(self): # <<<<<<<<<<<<<< @@ -51377,48 +48569,43 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_getxmlinfo(struct LxmlDocument PyObject *__pyx_v_version = NULL; PyObject *__pyx_v_encoding = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlDoc *__pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("getxmlinfo", 0); - __Pyx_TraceCall("getxmlinfo", __pyx_f[0], 394, 0, __PYX_ERR(0, 394, __pyx_L1_error)); - /* "lxml/etree.pyx":396 + /* "lxml/etree.pyx":394 * cdef getxmlinfo(self): * # return XML version and encoding (or None if not known) * cdef xmlDoc* c_doc = self._c_doc # <<<<<<<<<<<<<< * if c_doc.version is NULL: * version = None */ - __Pyx_TraceLine(396,0,__PYX_ERR(0, 396, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_c_doc; __pyx_v_c_doc = __pyx_t_1; - /* "lxml/etree.pyx":397 + /* "lxml/etree.pyx":395 * # return XML version and encoding (or None if not known) * cdef xmlDoc* c_doc = self._c_doc * if c_doc.version is NULL: # <<<<<<<<<<<<<< * version = None * else: */ - __Pyx_TraceLine(397,0,__PYX_ERR(0, 397, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_doc->version == NULL) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":398 + /* "lxml/etree.pyx":396 * cdef xmlDoc* c_doc = self._c_doc * if c_doc.version is NULL: * version = None # <<<<<<<<<<<<<< * else: * version = funicode(c_doc.version) */ - __Pyx_TraceLine(398,0,__PYX_ERR(0, 398, __pyx_L1_error)) __Pyx_INCREF(Py_None); __pyx_v_version = Py_None; - /* "lxml/etree.pyx":397 + /* "lxml/etree.pyx":395 * # return XML version and encoding (or None if not known) * cdef xmlDoc* c_doc = self._c_doc * if c_doc.version is NULL: # <<<<<<<<<<<<<< @@ -51428,45 +48615,42 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_getxmlinfo(struct LxmlDocument goto __pyx_L3; } - /* "lxml/etree.pyx":400 + /* "lxml/etree.pyx":398 * version = None * else: * version = funicode(c_doc.version) # <<<<<<<<<<<<<< * if c_doc.encoding is NULL: * encoding = None */ - __Pyx_TraceLine(400,0,__PYX_ERR(0, 400, __pyx_L1_error)) /*else*/ { - __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_doc->version); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 400, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_doc->version); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_version = __pyx_t_3; __pyx_t_3 = 0; } __pyx_L3:; - /* "lxml/etree.pyx":401 + /* "lxml/etree.pyx":399 * else: * version = funicode(c_doc.version) * if c_doc.encoding is NULL: # <<<<<<<<<<<<<< * encoding = None * else: */ - __Pyx_TraceLine(401,0,__PYX_ERR(0, 401, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_doc->encoding == NULL) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":402 + /* "lxml/etree.pyx":400 * version = funicode(c_doc.version) * if c_doc.encoding is NULL: * encoding = None # <<<<<<<<<<<<<< * else: * encoding = funicode(c_doc.encoding) */ - __Pyx_TraceLine(402,0,__PYX_ERR(0, 402, __pyx_L1_error)) __Pyx_INCREF(Py_None); __pyx_v_encoding = Py_None; - /* "lxml/etree.pyx":401 + /* "lxml/etree.pyx":399 * else: * version = funicode(c_doc.version) * if c_doc.encoding is NULL: # <<<<<<<<<<<<<< @@ -51476,32 +48660,30 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_getxmlinfo(struct LxmlDocument goto __pyx_L4; } - /* "lxml/etree.pyx":404 + /* "lxml/etree.pyx":402 * encoding = None * else: * encoding = funicode(c_doc.encoding) # <<<<<<<<<<<<<< - * return (version, encoding) + * return version, encoding * */ - __Pyx_TraceLine(404,0,__PYX_ERR(0, 404, __pyx_L1_error)) /*else*/ { - __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_doc->encoding); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 404, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_doc->encoding); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_encoding = __pyx_t_3; __pyx_t_3 = 0; } __pyx_L4:; - /* "lxml/etree.pyx":405 + /* "lxml/etree.pyx":403 * else: * encoding = funicode(c_doc.encoding) - * return (version, encoding) # <<<<<<<<<<<<<< + * return version, encoding # <<<<<<<<<<<<<< * * @cython.final */ - __Pyx_TraceLine(405,0,__PYX_ERR(0, 405, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 405, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_version); __Pyx_GIVEREF(__pyx_v_version); @@ -51513,7 +48695,7 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_getxmlinfo(struct LxmlDocument __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":394 + /* "lxml/etree.pyx":392 * * @cython.final * cdef getxmlinfo(self): # <<<<<<<<<<<<<< @@ -51530,12 +48712,11 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_getxmlinfo(struct LxmlDocument __Pyx_XDECREF(__pyx_v_version); __Pyx_XDECREF(__pyx_v_encoding); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":408 +/* "lxml/etree.pyx":406 * * @cython.final * cdef isstandalone(self): # <<<<<<<<<<<<<< @@ -51545,37 +48726,33 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_getxmlinfo(struct LxmlDocument static PyObject *__pyx_f_4lxml_5etree_9_Document_isstandalone(struct LxmlDocument *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("isstandalone", 0); - __Pyx_TraceCall("isstandalone", __pyx_f[0], 408, 0, __PYX_ERR(0, 408, __pyx_L1_error)); - /* "lxml/etree.pyx":411 + /* "lxml/etree.pyx":409 * # returns True for "standalone=true", * # False for "standalone=false", None if not provided * if self._c_doc.standalone == -1: # <<<<<<<<<<<<<< * return None * else: */ - __Pyx_TraceLine(411,0,__PYX_ERR(0, 411, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_c_doc->standalone == -1L) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":412 + /* "lxml/etree.pyx":410 * # False for "standalone=false", None if not provided * if self._c_doc.standalone == -1: * return None # <<<<<<<<<<<<<< * else: * return (self._c_doc.standalone == 1) */ - __Pyx_TraceLine(412,0,__PYX_ERR(0, 412, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/etree.pyx":411 + /* "lxml/etree.pyx":409 * # returns True for "standalone=true", * # False for "standalone=false", None if not provided * if self._c_doc.standalone == -1: # <<<<<<<<<<<<<< @@ -51584,24 +48761,23 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_isstandalone(struct LxmlDocumen */ } - /* "lxml/etree.pyx":414 + /* "lxml/etree.pyx":412 * return None * else: * return (self._c_doc.standalone == 1) # <<<<<<<<<<<<<< * * @cython.final */ - __Pyx_TraceLine(414,0,__PYX_ERR(0, 414, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyBool_FromLong(((__pyx_v_self->_c_doc->standalone == 1) != 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 414, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(((__pyx_v_self->_c_doc->standalone == 1) != 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } - /* "lxml/etree.pyx":408 + /* "lxml/etree.pyx":406 * * @cython.final * cdef isstandalone(self): # <<<<<<<<<<<<<< @@ -51616,12 +48792,11 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_isstandalone(struct LxmlDocumen __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":417 +/* "lxml/etree.pyx":415 * * @cython.final * cdef bytes buildNewPrefix(self): # <<<<<<<<<<<<<< @@ -51632,53 +48807,49 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_isstandalone(struct LxmlDocumen static PyObject *__pyx_f_4lxml_5etree_9_Document_buildNewPrefix(struct LxmlDocument *__pyx_v_self) { PyObject *__pyx_v_ns = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("buildNewPrefix", 0); - __Pyx_TraceCall("buildNewPrefix", __pyx_f[0], 417, 0, __PYX_ERR(0, 417, __pyx_L1_error)); - /* "lxml/etree.pyx":420 + /* "lxml/etree.pyx":418 * # get a new unique prefix ("nsX") for this document * cdef bytes ns * if self._ns_counter < len(_PREFIX_CACHE): # <<<<<<<<<<<<<< * ns = _PREFIX_CACHE[self._ns_counter] * else: */ - __Pyx_TraceLine(420,0,__PYX_ERR(0, 420, __pyx_L1_error)) __pyx_t_1 = __pyx_v_4lxml_5etree__PREFIX_CACHE; __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, 420, __pyx_L1_error) + __PYX_ERR(0, 418, __pyx_L1_error) } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 420, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 418, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = ((__pyx_v_self->_ns_counter < __pyx_t_2) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":421 + /* "lxml/etree.pyx":419 * cdef bytes ns * if self._ns_counter < len(_PREFIX_CACHE): * ns = _PREFIX_CACHE[self._ns_counter] # <<<<<<<<<<<<<< * else: * ns = python.PyBytes_FromFormat("ns%d", self._ns_counter) */ - __Pyx_TraceLine(421,0,__PYX_ERR(0, 421, __pyx_L1_error)) if (unlikely(__pyx_v_4lxml_5etree__PREFIX_CACHE == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 421, __pyx_L1_error) + __PYX_ERR(0, 419, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_4lxml_5etree__PREFIX_CACHE, __pyx_v_self->_ns_counter, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 421, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_4lxml_5etree__PREFIX_CACHE, __pyx_v_self->_ns_counter, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 421, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 419, __pyx_L1_error) __pyx_v_ns = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":420 + /* "lxml/etree.pyx":418 * # get a new unique prefix ("nsX") for this document * cdef bytes ns * if self._ns_counter < len(_PREFIX_CACHE): # <<<<<<<<<<<<<< @@ -51688,48 +48859,45 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_buildNewPrefix(struct LxmlDocum goto __pyx_L3; } - /* "lxml/etree.pyx":423 + /* "lxml/etree.pyx":421 * ns = _PREFIX_CACHE[self._ns_counter] * else: * ns = python.PyBytes_FromFormat("ns%d", self._ns_counter) # <<<<<<<<<<<<<< * if self._prefix_tail is not None: * ns += self._prefix_tail */ - __Pyx_TraceLine(423,0,__PYX_ERR(0, 423, __pyx_L1_error)) /*else*/ { - __pyx_t_1 = PyBytes_FromFormat(((char *)"ns%d"), __pyx_v_self->_ns_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 423, __pyx_L1_error) + __pyx_t_1 = PyBytes_FromFormat(((char *)"ns%d"), __pyx_v_self->_ns_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ns = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; } __pyx_L3:; - /* "lxml/etree.pyx":424 + /* "lxml/etree.pyx":422 * else: * ns = python.PyBytes_FromFormat("ns%d", self._ns_counter) * if self._prefix_tail is not None: # <<<<<<<<<<<<<< * ns += self._prefix_tail * self._ns_counter += 1 */ - __Pyx_TraceLine(424,0,__PYX_ERR(0, 424, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_self->_prefix_tail != ((PyObject*)Py_None)); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { - /* "lxml/etree.pyx":425 + /* "lxml/etree.pyx":423 * ns = python.PyBytes_FromFormat("ns%d", self._ns_counter) * if self._prefix_tail is not None: * ns += self._prefix_tail # <<<<<<<<<<<<<< * self._ns_counter += 1 * if self._ns_counter < 0: */ - __Pyx_TraceLine(425,0,__PYX_ERR(0, 425, __pyx_L1_error)) - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_ns, __pyx_v_self->_prefix_tail); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error) + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_ns, __pyx_v_self->_prefix_tail); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_ns, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "lxml/etree.pyx":424 + /* "lxml/etree.pyx":422 * else: * ns = python.PyBytes_FromFormat("ns%d", self._ns_counter) * if self._prefix_tail is not None: # <<<<<<<<<<<<<< @@ -51738,64 +48906,59 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_buildNewPrefix(struct LxmlDocum */ } - /* "lxml/etree.pyx":426 + /* "lxml/etree.pyx":424 * if self._prefix_tail is not None: * ns += self._prefix_tail * self._ns_counter += 1 # <<<<<<<<<<<<<< * if self._ns_counter < 0: * # overflow! */ - __Pyx_TraceLine(426,0,__PYX_ERR(0, 426, __pyx_L1_error)) __pyx_v_self->_ns_counter = (__pyx_v_self->_ns_counter + 1); - /* "lxml/etree.pyx":427 + /* "lxml/etree.pyx":425 * ns += self._prefix_tail * self._ns_counter += 1 * if self._ns_counter < 0: # <<<<<<<<<<<<<< * # overflow! * self._ns_counter = 0 */ - __Pyx_TraceLine(427,0,__PYX_ERR(0, 427, __pyx_L1_error)) __pyx_t_4 = ((__pyx_v_self->_ns_counter < 0) != 0); if (__pyx_t_4) { - /* "lxml/etree.pyx":429 + /* "lxml/etree.pyx":427 * if self._ns_counter < 0: * # overflow! * self._ns_counter = 0 # <<<<<<<<<<<<<< * if self._prefix_tail is None: * self._prefix_tail = b"A" */ - __Pyx_TraceLine(429,0,__PYX_ERR(0, 429, __pyx_L1_error)) __pyx_v_self->_ns_counter = 0; - /* "lxml/etree.pyx":430 + /* "lxml/etree.pyx":428 * # overflow! * self._ns_counter = 0 * if self._prefix_tail is None: # <<<<<<<<<<<<<< * self._prefix_tail = b"A" * else: */ - __Pyx_TraceLine(430,0,__PYX_ERR(0, 430, __pyx_L1_error)) __pyx_t_4 = (__pyx_v_self->_prefix_tail == ((PyObject*)Py_None)); __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":431 + /* "lxml/etree.pyx":429 * self._ns_counter = 0 * if self._prefix_tail is None: * self._prefix_tail = b"A" # <<<<<<<<<<<<<< * else: * self._prefix_tail += b"A" */ - __Pyx_TraceLine(431,0,__PYX_ERR(0, 431, __pyx_L1_error)) __Pyx_INCREF(__pyx_n_b_A); __Pyx_GIVEREF(__pyx_n_b_A); __Pyx_GOTREF(__pyx_v_self->_prefix_tail); __Pyx_DECREF(__pyx_v_self->_prefix_tail); __pyx_v_self->_prefix_tail = __pyx_n_b_A; - /* "lxml/etree.pyx":430 + /* "lxml/etree.pyx":428 * # overflow! * self._ns_counter = 0 * if self._prefix_tail is None: # <<<<<<<<<<<<<< @@ -51805,16 +48968,15 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_buildNewPrefix(struct LxmlDocum goto __pyx_L6; } - /* "lxml/etree.pyx":433 + /* "lxml/etree.pyx":431 * self._prefix_tail = b"A" * else: * self._prefix_tail += b"A" # <<<<<<<<<<<<<< * return ns * */ - __Pyx_TraceLine(433,0,__PYX_ERR(0, 433, __pyx_L1_error)) /*else*/ { - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_self->_prefix_tail, __pyx_n_b_A); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error) + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_self->_prefix_tail, __pyx_n_b_A); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_prefix_tail); @@ -51824,7 +48986,7 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_buildNewPrefix(struct LxmlDocum } __pyx_L6:; - /* "lxml/etree.pyx":427 + /* "lxml/etree.pyx":425 * ns += self._prefix_tail * self._ns_counter += 1 * if self._ns_counter < 0: # <<<<<<<<<<<<<< @@ -51833,20 +48995,19 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_buildNewPrefix(struct LxmlDocum */ } - /* "lxml/etree.pyx":434 + /* "lxml/etree.pyx":432 * else: * self._prefix_tail += b"A" * return ns # <<<<<<<<<<<<<< * * @cython.final */ - __Pyx_TraceLine(434,0,__PYX_ERR(0, 434, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_ns); __pyx_r = __pyx_v_ns; goto __pyx_L0; - /* "lxml/etree.pyx":417 + /* "lxml/etree.pyx":415 * * @cython.final * cdef bytes buildNewPrefix(self): # <<<<<<<<<<<<<< @@ -51862,12 +49023,11 @@ static PyObject *__pyx_f_4lxml_5etree_9_Document_buildNewPrefix(struct LxmlDocum __pyx_L0:; __Pyx_XDECREF(__pyx_v_ns); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":437 +/* "lxml/etree.pyx":435 * * @cython.final * cdef xmlNs* _findOrBuildNodeNs(self, xmlNode* c_node, # <<<<<<<<<<<<<< @@ -51880,7 +49040,6 @@ static xmlNs *__pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(struct LxmlDocu PyObject *__pyx_v_dict_result; PyObject *__pyx_v_prefix = NULL; xmlNs *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -51889,40 +49048,36 @@ static xmlNs *__pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(struct LxmlDocu PyObject *__pyx_t_5 = NULL; int __pyx_t_6; __Pyx_RefNannySetupContext("_findOrBuildNodeNs", 0); - __Pyx_TraceCall("_findOrBuildNodeNs", __pyx_f[0], 437, 0, __PYX_ERR(0, 437, __pyx_L1_error)); - /* "lxml/etree.pyx":446 + /* "lxml/etree.pyx":444 * cdef xmlNs* c_doc_ns * cdef python.PyObject* dict_result * if c_node.type != tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< * assert c_node.type == tree.XML_ELEMENT_NODE, \ * u"invalid node type %d, expected %d" % ( */ - __Pyx_TraceLine(446,0,__PYX_ERR(0, 446, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node->type != XML_ELEMENT_NODE) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":447 + /* "lxml/etree.pyx":445 * cdef python.PyObject* dict_result * if c_node.type != tree.XML_ELEMENT_NODE: * assert c_node.type == tree.XML_ELEMENT_NODE, \ # <<<<<<<<<<<<<< * u"invalid node type %d, expected %d" % ( * c_node.type, tree.XML_ELEMENT_NODE) */ - __Pyx_TraceLine(447,0,__PYX_ERR(0, 447, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0))) { - /* "lxml/etree.pyx":448 + /* "lxml/etree.pyx":446 * if c_node.type != tree.XML_ELEMENT_NODE: * assert c_node.type == tree.XML_ELEMENT_NODE, \ * u"invalid node type %d, expected %d" % ( # <<<<<<<<<<<<<< * c_node.type, tree.XML_ELEMENT_NODE) * # look for existing ns declaration */ - __Pyx_TraceLine(448,0,__PYX_ERR(0, 448, __pyx_L1_error)) - __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 448, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = 127; @@ -51931,15 +49086,14 @@ static xmlNs *__pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(struct LxmlDocu __Pyx_GIVEREF(__pyx_kp_u_invalid_node_type); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_invalid_node_type); - /* "lxml/etree.pyx":449 + /* "lxml/etree.pyx":447 * assert c_node.type == tree.XML_ELEMENT_NODE, \ * u"invalid node type %d, expected %d" % ( * c_node.type, tree.XML_ELEMENT_NODE) # <<<<<<<<<<<<<< * # look for existing ns declaration * c_ns = _searchNsByHref(c_node, c_href, is_attribute) */ - __Pyx_TraceLine(449,0,__PYX_ERR(0, 449, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyUnicode_From_xmlElementType(__pyx_v_c_node->type, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 449, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_From_xmlElementType(__pyx_v_c_node->type, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 447, __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); @@ -51950,7 +49104,7 @@ static xmlNs *__pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(struct LxmlDocu __pyx_t_3 += 11; __Pyx_GIVEREF(__pyx_kp_u_expected); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_expected); - __pyx_t_5 = __Pyx_PyUnicode_From_xmlElementType(XML_ELEMENT_NODE, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 449, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_From_xmlElementType(XML_ELEMENT_NODE, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 447, __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); @@ -51958,25 +49112,24 @@ static xmlNs *__pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(struct LxmlDocu PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_5); __pyx_t_5 = 0; - /* "lxml/etree.pyx":448 + /* "lxml/etree.pyx":446 * if c_node.type != tree.XML_ELEMENT_NODE: * assert c_node.type == tree.XML_ELEMENT_NODE, \ * u"invalid node type %d, expected %d" % ( # <<<<<<<<<<<<<< * c_node.type, tree.XML_ELEMENT_NODE) * # look for existing ns declaration */ - __Pyx_TraceLine(448,0,__PYX_ERR(0, 448, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_2, 4, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 448, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_2, 4, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyErr_SetObject(PyExc_AssertionError, __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 447, __pyx_L1_error) + __PYX_ERR(0, 445, __pyx_L1_error) } } #endif - /* "lxml/etree.pyx":446 + /* "lxml/etree.pyx":444 * cdef xmlNs* c_doc_ns * cdef python.PyObject* dict_result * if c_node.type != tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< @@ -51985,35 +49138,32 @@ static xmlNs *__pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(struct LxmlDocu */ } - /* "lxml/etree.pyx":451 + /* "lxml/etree.pyx":449 * c_node.type, tree.XML_ELEMENT_NODE) * # look for existing ns declaration * c_ns = _searchNsByHref(c_node, c_href, is_attribute) # <<<<<<<<<<<<<< * if c_ns is not NULL: * if is_attribute and c_ns.prefix is NULL: */ - __Pyx_TraceLine(451,0,__PYX_ERR(0, 451, __pyx_L1_error)) __pyx_v_c_ns = __pyx_f_4lxml_5etree__searchNsByHref(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_is_attribute); - /* "lxml/etree.pyx":452 + /* "lxml/etree.pyx":450 * # look for existing ns declaration * c_ns = _searchNsByHref(c_node, c_href, is_attribute) * if c_ns is not NULL: # <<<<<<<<<<<<<< * if is_attribute and c_ns.prefix is NULL: * # do not put namespaced attributes into the default */ - __Pyx_TraceLine(452,0,__PYX_ERR(0, 452, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_ns != NULL) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":453 + /* "lxml/etree.pyx":451 * c_ns = _searchNsByHref(c_node, c_href, is_attribute) * if c_ns is not NULL: * if is_attribute and c_ns.prefix is NULL: # <<<<<<<<<<<<<< * # do not put namespaced attributes into the default * # namespace as this would break serialisation */ - __Pyx_TraceLine(453,0,__PYX_ERR(0, 453, __pyx_L1_error)) __pyx_t_6 = (__pyx_v_is_attribute != 0); if (__pyx_t_6) { } else { @@ -52027,21 +49177,20 @@ static xmlNs *__pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(struct LxmlDocu goto __pyx_L5; } - /* "lxml/etree.pyx":458 + /* "lxml/etree.pyx":456 * pass * else: * return c_ns # <<<<<<<<<<<<<< * * # none found => determine a suitable new prefix */ - __Pyx_TraceLine(458,0,__PYX_ERR(0, 458, __pyx_L1_error)) /*else*/ { __pyx_r = __pyx_v_c_ns; goto __pyx_L0; } __pyx_L5:; - /* "lxml/etree.pyx":452 + /* "lxml/etree.pyx":450 * # look for existing ns declaration * c_ns = _searchNsByHref(c_node, c_href, is_attribute) * if c_ns is not NULL: # <<<<<<<<<<<<<< @@ -52050,67 +49199,62 @@ static xmlNs *__pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(struct LxmlDocu */ } - /* "lxml/etree.pyx":461 + /* "lxml/etree.pyx":459 * * # none found => determine a suitable new prefix * if c_prefix is NULL: # <<<<<<<<<<<<<< * dict_result = python.PyDict_GetItem( * _DEFAULT_NAMESPACE_PREFIXES, c_href) */ - __Pyx_TraceLine(461,0,__PYX_ERR(0, 461, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_prefix == NULL) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":463 + /* "lxml/etree.pyx":461 * if c_prefix is NULL: * dict_result = python.PyDict_GetItem( * _DEFAULT_NAMESPACE_PREFIXES, c_href) # <<<<<<<<<<<<<< * if dict_result is not NULL: * prefix = dict_result */ - __Pyx_TraceLine(463,0,__PYX_ERR(0, 463, __pyx_L1_error)) __pyx_t_5 = __pyx_v_4lxml_5etree__DEFAULT_NAMESPACE_PREFIXES; __Pyx_INCREF(__pyx_t_5); - __pyx_t_2 = __Pyx_PyBytes_FromCString(((unsigned char *)__pyx_v_c_href)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromCString(((unsigned char *)__pyx_v_c_href)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "lxml/etree.pyx":462 + /* "lxml/etree.pyx":460 * # none found => determine a suitable new prefix * if c_prefix is NULL: * dict_result = python.PyDict_GetItem( # <<<<<<<<<<<<<< * _DEFAULT_NAMESPACE_PREFIXES, c_href) * if dict_result is not NULL: */ - __Pyx_TraceLine(462,0,__PYX_ERR(0, 462, __pyx_L1_error)) __pyx_v_dict_result = PyDict_GetItem(__pyx_t_5, __pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":464 + /* "lxml/etree.pyx":462 * dict_result = python.PyDict_GetItem( * _DEFAULT_NAMESPACE_PREFIXES, c_href) * if dict_result is not NULL: # <<<<<<<<<<<<<< * prefix = dict_result * else: */ - __Pyx_TraceLine(464,0,__PYX_ERR(0, 464, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_dict_result != NULL) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":465 + /* "lxml/etree.pyx":463 * _DEFAULT_NAMESPACE_PREFIXES, c_href) * if dict_result is not NULL: * prefix = dict_result # <<<<<<<<<<<<<< * else: * prefix = self.buildNewPrefix() */ - __Pyx_TraceLine(465,0,__PYX_ERR(0, 465, __pyx_L1_error)) __pyx_t_2 = ((PyObject *)__pyx_v_dict_result); __Pyx_INCREF(__pyx_t_2); __pyx_v_prefix = __pyx_t_2; __pyx_t_2 = 0; - /* "lxml/etree.pyx":464 + /* "lxml/etree.pyx":462 * dict_result = python.PyDict_GetItem( * _DEFAULT_NAMESPACE_PREFIXES, c_href) * if dict_result is not NULL: # <<<<<<<<<<<<<< @@ -52120,33 +49264,31 @@ static xmlNs *__pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(struct LxmlDocu goto __pyx_L9; } - /* "lxml/etree.pyx":467 + /* "lxml/etree.pyx":465 * prefix = dict_result * else: * prefix = self.buildNewPrefix() # <<<<<<<<<<<<<< * c_prefix = _xcstr(prefix) * */ - __Pyx_TraceLine(467,0,__PYX_ERR(0, 467, __pyx_L1_error)) /*else*/ { - __pyx_t_2 = __pyx_f_4lxml_5etree_9_Document_buildNewPrefix(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 467, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_9_Document_buildNewPrefix(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_prefix = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L9:; - /* "lxml/etree.pyx":468 + /* "lxml/etree.pyx":466 * else: * prefix = self.buildNewPrefix() * c_prefix = _xcstr(prefix) # <<<<<<<<<<<<<< * * # make sure the prefix is not in use already */ - __Pyx_TraceLine(468,0,__PYX_ERR(0, 468, __pyx_L1_error)) __pyx_v_c_prefix = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_prefix); - /* "lxml/etree.pyx":461 + /* "lxml/etree.pyx":459 * * # none found => determine a suitable new prefix * if c_prefix is NULL: # <<<<<<<<<<<<<< @@ -52155,74 +49297,68 @@ static xmlNs *__pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(struct LxmlDocu */ } - /* "lxml/etree.pyx":471 + /* "lxml/etree.pyx":469 * * # make sure the prefix is not in use already * while tree.xmlSearchNs(self._c_doc, c_node, c_prefix) is not NULL: # <<<<<<<<<<<<<< * prefix = self.buildNewPrefix() * c_prefix = _xcstr(prefix) */ - __Pyx_TraceLine(471,0,__PYX_ERR(0, 471, __pyx_L1_error)) while (1) { __pyx_t_1 = ((xmlSearchNs(__pyx_v_self->_c_doc, __pyx_v_c_node, __pyx_v_c_prefix) != NULL) != 0); if (!__pyx_t_1) break; - /* "lxml/etree.pyx":472 + /* "lxml/etree.pyx":470 * # make sure the prefix is not in use already * while tree.xmlSearchNs(self._c_doc, c_node, c_prefix) is not NULL: * prefix = self.buildNewPrefix() # <<<<<<<<<<<<<< * c_prefix = _xcstr(prefix) * */ - __Pyx_TraceLine(472,0,__PYX_ERR(0, 472, __pyx_L1_error)) - __pyx_t_2 = __pyx_f_4lxml_5etree_9_Document_buildNewPrefix(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 472, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_9_Document_buildNewPrefix(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_prefix, __pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":473 + /* "lxml/etree.pyx":471 * while tree.xmlSearchNs(self._c_doc, c_node, c_prefix) is not NULL: * prefix = self.buildNewPrefix() * c_prefix = _xcstr(prefix) # <<<<<<<<<<<<<< * * # declare the namespace and return it */ - __Pyx_TraceLine(473,0,__PYX_ERR(0, 473, __pyx_L1_error)) __pyx_v_c_prefix = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_prefix); } - /* "lxml/etree.pyx":476 + /* "lxml/etree.pyx":474 * * # declare the namespace and return it * c_ns = tree.xmlNewNs(c_node, c_href, c_prefix) # <<<<<<<<<<<<<< * if c_ns is NULL: * raise MemoryError() */ - __Pyx_TraceLine(476,0,__PYX_ERR(0, 476, __pyx_L1_error)) __pyx_v_c_ns = xmlNewNs(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_prefix); - /* "lxml/etree.pyx":477 + /* "lxml/etree.pyx":475 * # declare the namespace and return it * c_ns = tree.xmlNewNs(c_node, c_href, c_prefix) * if c_ns is NULL: # <<<<<<<<<<<<<< * raise MemoryError() * return c_ns */ - __Pyx_TraceLine(477,0,__PYX_ERR(0, 477, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_ns == NULL) != 0); if (unlikely(__pyx_t_1)) { - /* "lxml/etree.pyx":478 + /* "lxml/etree.pyx":476 * c_ns = tree.xmlNewNs(c_node, c_href, c_prefix) * if c_ns is NULL: * raise MemoryError() # <<<<<<<<<<<<<< * return c_ns * */ - __Pyx_TraceLine(478,0,__PYX_ERR(0, 478, __pyx_L1_error)) - PyErr_NoMemory(); __PYX_ERR(0, 478, __pyx_L1_error) + PyErr_NoMemory(); __PYX_ERR(0, 476, __pyx_L1_error) - /* "lxml/etree.pyx":477 + /* "lxml/etree.pyx":475 * # declare the namespace and return it * c_ns = tree.xmlNewNs(c_node, c_href, c_prefix) * if c_ns is NULL: # <<<<<<<<<<<<<< @@ -52231,18 +49367,17 @@ static xmlNs *__pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(struct LxmlDocu */ } - /* "lxml/etree.pyx":479 + /* "lxml/etree.pyx":477 * if c_ns is NULL: * raise MemoryError() * return c_ns # <<<<<<<<<<<<<< * * @cython.final */ - __Pyx_TraceLine(479,0,__PYX_ERR(0, 479, __pyx_L1_error)) __pyx_r = __pyx_v_c_ns; goto __pyx_L0; - /* "lxml/etree.pyx":437 + /* "lxml/etree.pyx":435 * * @cython.final * cdef xmlNs* _findOrBuildNodeNs(self, xmlNode* c_node, # <<<<<<<<<<<<<< @@ -52258,12 +49393,11 @@ static xmlNs *__pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(struct LxmlDocu __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_prefix); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":482 +/* "lxml/etree.pyx":480 * * @cython.final * cdef int _setNodeNs(self, xmlNode* c_node, const_xmlChar* c_href) except -1: # <<<<<<<<<<<<<< @@ -52274,34 +49408,30 @@ static xmlNs *__pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(struct LxmlDocu static int __pyx_f_4lxml_5etree_9_Document__setNodeNs(struct LxmlDocument *__pyx_v_self, xmlNode *__pyx_v_c_node, const xmlChar *__pyx_v_c_href) { xmlNs *__pyx_v_c_ns; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlNs *__pyx_t_1; __Pyx_RefNannySetupContext("_setNodeNs", 0); - __Pyx_TraceCall("_setNodeNs", __pyx_f[0], 482, 0, __PYX_ERR(0, 482, __pyx_L1_error)); - /* "lxml/etree.pyx":484 + /* "lxml/etree.pyx":482 * cdef int _setNodeNs(self, xmlNode* c_node, const_xmlChar* c_href) except -1: * u"Lookup namespace structure and set it for the node." * c_ns = self._findOrBuildNodeNs(c_node, c_href, NULL, 0) # <<<<<<<<<<<<<< * tree.xmlSetNs(c_node, c_ns) * */ - __Pyx_TraceLine(484,0,__PYX_ERR(0, 484, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(__pyx_v_self, __pyx_v_c_node, __pyx_v_c_href, NULL, 0); if (unlikely(__pyx_t_1 == ((xmlNs *)NULL))) __PYX_ERR(0, 484, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(__pyx_v_self, __pyx_v_c_node, __pyx_v_c_href, NULL, 0); if (unlikely(__pyx_t_1 == ((xmlNs *)NULL))) __PYX_ERR(0, 482, __pyx_L1_error) __pyx_v_c_ns = __pyx_t_1; - /* "lxml/etree.pyx":485 + /* "lxml/etree.pyx":483 * u"Lookup namespace structure and set it for the node." * c_ns = self._findOrBuildNodeNs(c_node, c_href, NULL, 0) * tree.xmlSetNs(c_node, c_ns) # <<<<<<<<<<<<<< * * cdef tuple __initPrefixCache(): */ - __Pyx_TraceLine(485,0,__PYX_ERR(0, 485, __pyx_L1_error)) xmlSetNs(__pyx_v_c_node, __pyx_v_c_ns); - /* "lxml/etree.pyx":482 + /* "lxml/etree.pyx":480 * * @cython.final * cdef int _setNodeNs(self, xmlNode* c_node, const_xmlChar* c_href) except -1: # <<<<<<<<<<<<<< @@ -52316,12 +49446,11 @@ static int __pyx_f_4lxml_5etree_9_Document__setNodeNs(struct LxmlDocument *__pyx __Pyx_AddTraceback("lxml.etree._Document._setNodeNs", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":487 +/* "lxml/etree.pyx":485 * tree.xmlSetNs(c_node, c_ns) * * cdef tuple __initPrefixCache(): # <<<<<<<<<<<<<< @@ -52332,58 +49461,53 @@ static int __pyx_f_4lxml_5etree_9_Document__setNodeNs(struct LxmlDocument *__pyx static PyObject *__pyx_f_4lxml_5etree___initPrefixCache(void) { int __pyx_v_i; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__initPrefixCache", 0); - __Pyx_TraceCall("__initPrefixCache", __pyx_f[0], 487, 0, __PYX_ERR(0, 487, __pyx_L1_error)); - /* "lxml/etree.pyx":489 + /* "lxml/etree.pyx":487 * cdef tuple __initPrefixCache(): * cdef int i * return tuple([ python.PyBytes_FromFormat("ns%d", i) # <<<<<<<<<<<<<< * for i in range(30) ]) * */ - __Pyx_TraceLine(489,0,__PYX_ERR(0, 489, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "lxml/etree.pyx":490 + /* "lxml/etree.pyx":488 * cdef int i * return tuple([ python.PyBytes_FromFormat("ns%d", i) * for i in range(30) ]) # <<<<<<<<<<<<<< * * cdef tuple _PREFIX_CACHE = __initPrefixCache() */ - __Pyx_TraceLine(490,0,__PYX_ERR(0, 490, __pyx_L1_error)) for (__pyx_t_2 = 0; __pyx_t_2 < 30; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; - /* "lxml/etree.pyx":489 + /* "lxml/etree.pyx":487 * cdef tuple __initPrefixCache(): * cdef int i * return tuple([ python.PyBytes_FromFormat("ns%d", i) # <<<<<<<<<<<<<< * for i in range(30) ]) * */ - __Pyx_TraceLine(489,0,__PYX_ERR(0, 489, __pyx_L1_error)) - __pyx_t_3 = PyBytes_FromFormat(((char *)"ns%d"), __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error) + __pyx_t_3 = PyBytes_FromFormat(((char *)"ns%d"), __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 489, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_3 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error) + __pyx_t_3 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":487 + /* "lxml/etree.pyx":485 * tree.xmlSetNs(c_node, c_ns) * * cdef tuple __initPrefixCache(): # <<<<<<<<<<<<<< @@ -52399,12 +49523,11 @@ static PyObject *__pyx_f_4lxml_5etree___initPrefixCache(void) { __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":494 +/* "lxml/etree.pyx":492 * cdef tuple _PREFIX_CACHE = __initPrefixCache() * * cdef _Document _documentFactory(xmlDoc* c_doc, _BaseParser parser): # <<<<<<<<<<<<<< @@ -52415,88 +49538,80 @@ static PyObject *__pyx_f_4lxml_5etree___initPrefixCache(void) { static struct LxmlDocument *__pyx_f_4lxml_5etree__documentFactory(xmlDoc *__pyx_v_c_doc, struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_parser) { struct LxmlDocument *__pyx_v_result = 0; struct LxmlDocument *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("_documentFactory", 0); - __Pyx_TraceCall("_documentFactory", __pyx_f[0], 494, 0, __PYX_ERR(0, 494, __pyx_L1_error)); __Pyx_INCREF((PyObject *)__pyx_v_parser); - /* "lxml/etree.pyx":496 + /* "lxml/etree.pyx":494 * cdef _Document _documentFactory(xmlDoc* c_doc, _BaseParser parser): * cdef _Document result * result = _Document.__new__(_Document) # <<<<<<<<<<<<<< * result._c_doc = c_doc * result._ns_counter = 0 */ - __Pyx_TraceLine(496,0,__PYX_ERR(0, 496, __pyx_L1_error)) - __pyx_t_1 = ((PyObject *)__pyx_tp_new_4lxml_5etree__Document(((PyTypeObject *)__pyx_ptype_4lxml_5etree__Document), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 496, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_4lxml_5etree__Document(((PyTypeObject *)__pyx_ptype_4lxml_5etree__Document), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_result = ((struct LxmlDocument *)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":497 + /* "lxml/etree.pyx":495 * cdef _Document result * result = _Document.__new__(_Document) * result._c_doc = c_doc # <<<<<<<<<<<<<< * result._ns_counter = 0 * result._prefix_tail = None */ - __Pyx_TraceLine(497,0,__PYX_ERR(0, 497, __pyx_L1_error)) __pyx_v_result->_c_doc = __pyx_v_c_doc; - /* "lxml/etree.pyx":498 + /* "lxml/etree.pyx":496 * result = _Document.__new__(_Document) * result._c_doc = c_doc * result._ns_counter = 0 # <<<<<<<<<<<<<< * result._prefix_tail = None * if parser is None: */ - __Pyx_TraceLine(498,0,__PYX_ERR(0, 498, __pyx_L1_error)) __pyx_v_result->_ns_counter = 0; - /* "lxml/etree.pyx":499 + /* "lxml/etree.pyx":497 * result._c_doc = c_doc * result._ns_counter = 0 * result._prefix_tail = None # <<<<<<<<<<<<<< * if parser is None: * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() */ - __Pyx_TraceLine(499,0,__PYX_ERR(0, 499, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_result->_prefix_tail); __Pyx_DECREF(__pyx_v_result->_prefix_tail); __pyx_v_result->_prefix_tail = ((PyObject*)Py_None); - /* "lxml/etree.pyx":500 + /* "lxml/etree.pyx":498 * result._ns_counter = 0 * result._prefix_tail = None * if parser is None: # <<<<<<<<<<<<<< * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * result._parser = parser */ - __Pyx_TraceLine(500,0,__PYX_ERR(0, 500, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)__pyx_v_parser) == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":501 + /* "lxml/etree.pyx":499 * result._prefix_tail = None * if parser is None: * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() # <<<<<<<<<<<<<< * result._parser = parser * return result */ - __Pyx_TraceLine(501,0,__PYX_ERR(0, 501, __pyx_L1_error)) - __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext_getDefaultParser(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext_getDefaultParser(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_parser, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_1)); __pyx_t_1 = 0; - /* "lxml/etree.pyx":500 + /* "lxml/etree.pyx":498 * result._ns_counter = 0 * result._prefix_tail = None * if parser is None: # <<<<<<<<<<<<<< @@ -52505,34 +49620,32 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__documentFactory(xmlDoc *__pyx_ */ } - /* "lxml/etree.pyx":502 + /* "lxml/etree.pyx":500 * if parser is None: * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * result._parser = parser # <<<<<<<<<<<<<< * return result * */ - __Pyx_TraceLine(502,0,__PYX_ERR(0, 502, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_parser)); __Pyx_GIVEREF(((PyObject *)__pyx_v_parser)); __Pyx_GOTREF(__pyx_v_result->_parser); __Pyx_DECREF(((PyObject *)__pyx_v_result->_parser)); __pyx_v_result->_parser = __pyx_v_parser; - /* "lxml/etree.pyx":503 + /* "lxml/etree.pyx":501 * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * result._parser = parser * return result # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(503,0,__PYX_ERR(0, 503, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "lxml/etree.pyx":494 + /* "lxml/etree.pyx":492 * cdef tuple _PREFIX_CACHE = __initPrefixCache() * * cdef _Document _documentFactory(xmlDoc* c_doc, _BaseParser parser): # <<<<<<<<<<<<<< @@ -52549,12 +49662,11 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__documentFactory(xmlDoc *__pyx_ __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_parser); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":513 +/* "lxml/etree.pyx":511 * u"Document information provided by parser and DTD." * cdef _Document _doc * def __cinit__(self, tree): # <<<<<<<<<<<<<< @@ -52588,7 +49700,7 @@ static int __pyx_pw_4lxml_5etree_7DocInfo_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, 513, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 511, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -52599,7 +49711,7 @@ static int __pyx_pw_4lxml_5etree_7DocInfo_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, 513, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 511, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.DocInfo.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -52617,7 +49729,6 @@ static int __pyx_pf_4lxml_5etree_7DocInfo___cinit__(struct __pyx_obj_4lxml_5etre PyObject *__pyx_v_public_id = NULL; PyObject *__pyx_v_system_url = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -52629,17 +49740,15 @@ static int __pyx_pf_4lxml_5etree_7DocInfo___cinit__(struct __pyx_obj_4lxml_5etre int __pyx_t_8; int __pyx_t_9; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[0], 513, 0, __PYX_ERR(0, 513, __pyx_L1_error)); - /* "lxml/etree.pyx":515 + /* "lxml/etree.pyx":513 * def __cinit__(self, tree): * u"Create a DocInfo object for an ElementTree object or root Element." * self._doc = _documentOrRaise(tree) # <<<<<<<<<<<<<< * root_name, public_id, system_url = self._doc.getdoctype() * if not root_name and (public_id or system_url): */ - __Pyx_TraceLine(515,0,__PYX_ERR(0, 515, __pyx_L1_error)) - __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__documentOrRaise(__pyx_v_tree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__documentOrRaise(__pyx_v_tree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_doc); @@ -52647,15 +49756,14 @@ static int __pyx_pf_4lxml_5etree_7DocInfo___cinit__(struct __pyx_obj_4lxml_5etre __pyx_v_self->_doc = ((struct LxmlDocument *)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":516 + /* "lxml/etree.pyx":514 * u"Create a DocInfo object for an ElementTree object or root Element." * self._doc = _documentOrRaise(tree) * root_name, public_id, system_url = self._doc.getdoctype() # <<<<<<<<<<<<<< * if not root_name and (public_id or system_url): * raise ValueError, u"Could not find root node" */ - __Pyx_TraceLine(516,0,__PYX_ERR(0, 516, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_9_Document_getdoctype(__pyx_v_self->_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_9_Document_getdoctype(__pyx_v_self->_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; @@ -52663,7 +49771,7 @@ static int __pyx_pf_4lxml_5etree_7DocInfo___cinit__(struct __pyx_obj_4lxml_5etre if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 516, __pyx_L1_error) + __PYX_ERR(0, 514, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -52679,17 +49787,17 @@ static int __pyx_pf_4lxml_5etree_7DocInfo___cinit__(struct __pyx_obj_4lxml_5etre __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 516, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 516, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 516, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 516, __pyx_L1_error) + __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; @@ -52699,7 +49807,7 @@ static int __pyx_pf_4lxml_5etree_7DocInfo___cinit__(struct __pyx_obj_4lxml_5etre __Pyx_GOTREF(__pyx_t_3); index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 516, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 514, __pyx_L1_error) __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_unpacking_done; @@ -52707,7 +49815,7 @@ static int __pyx_pf_4lxml_5etree_7DocInfo___cinit__(struct __pyx_obj_4lxml_5etre __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 516, __pyx_L1_error) + __PYX_ERR(0, 514, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_root_name = __pyx_t_2; @@ -52717,44 +49825,42 @@ static int __pyx_pf_4lxml_5etree_7DocInfo___cinit__(struct __pyx_obj_4lxml_5etre __pyx_v_system_url = __pyx_t_4; __pyx_t_4 = 0; - /* "lxml/etree.pyx":517 + /* "lxml/etree.pyx":515 * self._doc = _documentOrRaise(tree) * root_name, public_id, system_url = self._doc.getdoctype() * if not root_name and (public_id or system_url): # <<<<<<<<<<<<<< * raise ValueError, u"Could not find root node" * */ - __Pyx_TraceLine(517,0,__PYX_ERR(0, 517, __pyx_L1_error)) - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_root_name); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 517, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_root_name); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 515, __pyx_L1_error) __pyx_t_9 = ((!__pyx_t_8) != 0); if (__pyx_t_9) { } else { __pyx_t_7 = __pyx_t_9; goto __pyx_L6_bool_binop_done; } - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_public_id); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 517, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_public_id); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 515, __pyx_L1_error) if (!__pyx_t_9) { } else { __pyx_t_7 = __pyx_t_9; goto __pyx_L6_bool_binop_done; } - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_system_url); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 517, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_system_url); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 515, __pyx_L1_error) __pyx_t_7 = __pyx_t_9; __pyx_L6_bool_binop_done:; if (unlikely(__pyx_t_7)) { - /* "lxml/etree.pyx":518 + /* "lxml/etree.pyx":516 * root_name, public_id, system_url = self._doc.getdoctype() * if not root_name and (public_id or system_url): * raise ValueError, u"Could not find root node" # <<<<<<<<<<<<<< * * property root_name: */ - __Pyx_TraceLine(518,0,__PYX_ERR(0, 518, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Could_not_find_root_node, 0, 0); - __PYX_ERR(0, 518, __pyx_L1_error) + __PYX_ERR(0, 516, __pyx_L1_error) - /* "lxml/etree.pyx":517 + /* "lxml/etree.pyx":515 * self._doc = _documentOrRaise(tree) * root_name, public_id, system_url = self._doc.getdoctype() * if not root_name and (public_id or system_url): # <<<<<<<<<<<<<< @@ -52763,7 +49869,7 @@ static int __pyx_pf_4lxml_5etree_7DocInfo___cinit__(struct __pyx_obj_4lxml_5etre */ } - /* "lxml/etree.pyx":513 + /* "lxml/etree.pyx":511 * u"Document information provided by parser and DTD." * cdef _Document _doc * def __cinit__(self, tree): # <<<<<<<<<<<<<< @@ -52786,12 +49892,11 @@ static int __pyx_pf_4lxml_5etree_7DocInfo___cinit__(struct __pyx_obj_4lxml_5etre __Pyx_XDECREF(__pyx_v_root_name); __Pyx_XDECREF(__pyx_v_public_id); __Pyx_XDECREF(__pyx_v_system_url); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":522 +/* "lxml/etree.pyx":520 * property root_name: * u"Returns the name of the root node as defined by the DOCTYPE." * def __get__(self): # <<<<<<<<<<<<<< @@ -52817,7 +49922,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_9root_name___get__(struct __pyx_ CYTHON_UNUSED PyObject *__pyx_v_public_id = NULL; CYTHON_UNUSED PyObject *__pyx_v_system_url = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -52826,17 +49930,15 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_9root_name___get__(struct __pyx_ PyObject *__pyx_t_5 = NULL; PyObject *(*__pyx_t_6)(PyObject *); __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 522, 0, __PYX_ERR(0, 522, __pyx_L1_error)); - /* "lxml/etree.pyx":523 + /* "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 * */ - __Pyx_TraceLine(523,0,__PYX_ERR(0, 523, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_9_Document_getdoctype(__pyx_v_self->_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error) + __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) __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; @@ -52844,7 +49946,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_9root_name___get__(struct __pyx_ if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 523, __pyx_L1_error) + __PYX_ERR(0, 521, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -52860,17 +49962,17 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_9root_name___get__(struct __pyx_ __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 523, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 523, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 523, __pyx_L1_error) + __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; @@ -52880,7 +49982,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_9root_name___get__(struct __pyx_ __Pyx_GOTREF(__pyx_t_3); index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 523, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 521, __pyx_L1_error) __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_unpacking_done; @@ -52888,7 +49990,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_9root_name___get__(struct __pyx_ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 523, __pyx_L1_error) + __PYX_ERR(0, 521, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_root_name = __pyx_t_2; @@ -52898,20 +50000,19 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_9root_name___get__(struct __pyx_ __pyx_v_system_url = __pyx_t_4; __pyx_t_4 = 0; - /* "lxml/etree.pyx":524 + /* "lxml/etree.pyx":522 * def __get__(self): * root_name, public_id, system_url = self._doc.getdoctype() * return root_name # <<<<<<<<<<<<<< * * @cython.final */ - __Pyx_TraceLine(524,0,__PYX_ERR(0, 524, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_root_name); __pyx_r = __pyx_v_root_name; goto __pyx_L0; - /* "lxml/etree.pyx":522 + /* "lxml/etree.pyx":520 * property root_name: * u"Returns the name of the root node as defined by the DOCTYPE." * def __get__(self): # <<<<<<<<<<<<<< @@ -52933,12 +50034,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_9root_name___get__(struct __pyx_ __Pyx_XDECREF(__pyx_v_public_id); __Pyx_XDECREF(__pyx_v_system_url); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":527 +/* "lxml/etree.pyx":525 * * @cython.final * cdef tree.xmlDtd* _get_c_dtd(self): # <<<<<<<<<<<<<< @@ -52951,48 +50051,43 @@ static xmlDtd *__pyx_f_4lxml_5etree_7DocInfo__get_c_dtd(struct __pyx_obj_4lxml_5 xmlNode *__pyx_v_c_root_node; const xmlChar *__pyx_v_c_name; xmlDtd *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlDoc *__pyx_t_1; int __pyx_t_2; const xmlChar *__pyx_t_3; __Pyx_RefNannySetupContext("_get_c_dtd", 0); - __Pyx_TraceCall("_get_c_dtd", __pyx_f[0], 527, 0, __PYX_ERR(0, 527, __pyx_L1_error)); - /* "lxml/etree.pyx":529 + /* "lxml/etree.pyx":527 * cdef tree.xmlDtd* _get_c_dtd(self): * u"""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 */ - __Pyx_TraceLine(529,0,__PYX_ERR(0, 529, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_doc->_c_doc; __pyx_v_c_doc = __pyx_t_1; - /* "lxml/etree.pyx":533 + /* "lxml/etree.pyx":531 * cdef const_xmlChar* c_name * * if c_doc.intSubset: # <<<<<<<<<<<<<< * return c_doc.intSubset * */ - __Pyx_TraceLine(533,0,__PYX_ERR(0, 533, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_c_doc->intSubset != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":534 + /* "lxml/etree.pyx":532 * * if c_doc.intSubset: * return c_doc.intSubset # <<<<<<<<<<<<<< * * c_root_node = tree.xmlDocGetRootElement(c_doc) */ - __Pyx_TraceLine(534,0,__PYX_ERR(0, 534, __pyx_L1_error)) __pyx_r = __pyx_v_c_doc->intSubset; goto __pyx_L0; - /* "lxml/etree.pyx":533 + /* "lxml/etree.pyx":531 * cdef const_xmlChar* c_name * * if c_doc.intSubset: # <<<<<<<<<<<<<< @@ -53001,24 +50096,22 @@ static xmlDtd *__pyx_f_4lxml_5etree_7DocInfo__get_c_dtd(struct __pyx_obj_4lxml_5 */ } - /* "lxml/etree.pyx":536 + /* "lxml/etree.pyx":534 * return c_doc.intSubset * * c_root_node = tree.xmlDocGetRootElement(c_doc) # <<<<<<<<<<<<<< * c_name = c_root_node.name if c_root_node else NULL * return tree.xmlCreateIntSubset(c_doc, c_name, NULL, NULL) */ - __Pyx_TraceLine(536,0,__PYX_ERR(0, 536, __pyx_L1_error)) __pyx_v_c_root_node = xmlDocGetRootElement(__pyx_v_c_doc); - /* "lxml/etree.pyx":537 + /* "lxml/etree.pyx":535 * * c_root_node = tree.xmlDocGetRootElement(c_doc) * c_name = c_root_node.name if c_root_node else NULL # <<<<<<<<<<<<<< * return tree.xmlCreateIntSubset(c_doc, c_name, NULL, NULL) * */ - __Pyx_TraceLine(537,0,__PYX_ERR(0, 537, __pyx_L1_error)) if ((__pyx_v_c_root_node != 0)) { __pyx_t_3 = __pyx_v_c_root_node->name; } else { @@ -53026,18 +50119,17 @@ static xmlDtd *__pyx_f_4lxml_5etree_7DocInfo__get_c_dtd(struct __pyx_obj_4lxml_5 } __pyx_v_c_name = __pyx_t_3; - /* "lxml/etree.pyx":538 + /* "lxml/etree.pyx":536 * c_root_node = tree.xmlDocGetRootElement(c_doc) * c_name = c_root_node.name if c_root_node else NULL * return tree.xmlCreateIntSubset(c_doc, c_name, NULL, NULL) # <<<<<<<<<<<<<< * * def clear(self): */ - __Pyx_TraceLine(538,0,__PYX_ERR(0, 538, __pyx_L1_error)) __pyx_r = xmlCreateIntSubset(__pyx_v_c_doc, __pyx_v_c_name, NULL, NULL); goto __pyx_L0; - /* "lxml/etree.pyx":527 + /* "lxml/etree.pyx":525 * * @cython.final * cdef tree.xmlDtd* _get_c_dtd(self): # <<<<<<<<<<<<<< @@ -53046,16 +50138,12 @@ static xmlDtd *__pyx_f_4lxml_5etree_7DocInfo__get_c_dtd(struct __pyx_obj_4lxml_5 */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.DocInfo._get_c_dtd", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":540 +/* "lxml/etree.pyx":538 * return tree.xmlCreateIntSubset(c_doc, c_name, NULL, NULL) * * def clear(self): # <<<<<<<<<<<<<< @@ -53082,59 +50170,52 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_2clear(struct __pyx_obj_4lxml_5e xmlDoc *__pyx_v_c_doc; xmlNode *__pyx_v_c_dtd; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlDoc *__pyx_t_1; int __pyx_t_2; - __Pyx_TraceFrameInit(__pyx_codeobj__58) __Pyx_RefNannySetupContext("clear", 0); - __Pyx_TraceCall("clear", __pyx_f[0], 540, 0, __PYX_ERR(0, 540, __pyx_L1_error)); - /* "lxml/etree.pyx":542 + /* "lxml/etree.pyx":540 * def clear(self): * u"""Removes DOCTYPE and internal subset from the document.""" * cdef xmlDoc* c_doc = self._doc._c_doc # <<<<<<<<<<<<<< * cdef tree.xmlNode* c_dtd = c_doc.intSubset * if c_dtd is NULL: */ - __Pyx_TraceLine(542,0,__PYX_ERR(0, 542, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_doc->_c_doc; __pyx_v_c_doc = __pyx_t_1; - /* "lxml/etree.pyx":543 + /* "lxml/etree.pyx":541 * u"""Removes DOCTYPE and internal subset from the document.""" * cdef xmlDoc* c_doc = self._doc._c_doc * cdef tree.xmlNode* c_dtd = c_doc.intSubset # <<<<<<<<<<<<<< * if c_dtd is NULL: * return */ - __Pyx_TraceLine(543,0,__PYX_ERR(0, 543, __pyx_L1_error)) __pyx_v_c_dtd = ((xmlNode *)__pyx_v_c_doc->intSubset); - /* "lxml/etree.pyx":544 + /* "lxml/etree.pyx":542 * cdef xmlDoc* c_doc = self._doc._c_doc * cdef tree.xmlNode* c_dtd = c_doc.intSubset * if c_dtd is NULL: # <<<<<<<<<<<<<< * return * tree.xmlUnlinkNode(c_dtd) */ - __Pyx_TraceLine(544,0,__PYX_ERR(0, 544, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_dtd == NULL) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":545 + /* "lxml/etree.pyx":543 * cdef tree.xmlNode* c_dtd = c_doc.intSubset * if c_dtd is NULL: * return # <<<<<<<<<<<<<< * tree.xmlUnlinkNode(c_dtd) * tree.xmlFreeNode(c_dtd) */ - __Pyx_TraceLine(545,0,__PYX_ERR(0, 545, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/etree.pyx":544 + /* "lxml/etree.pyx":542 * cdef xmlDoc* c_doc = self._doc._c_doc * cdef tree.xmlNode* c_dtd = c_doc.intSubset * if c_dtd is NULL: # <<<<<<<<<<<<<< @@ -53143,27 +50224,25 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_2clear(struct __pyx_obj_4lxml_5e */ } - /* "lxml/etree.pyx":546 + /* "lxml/etree.pyx":544 * if c_dtd is NULL: * return * tree.xmlUnlinkNode(c_dtd) # <<<<<<<<<<<<<< * tree.xmlFreeNode(c_dtd) * */ - __Pyx_TraceLine(546,0,__PYX_ERR(0, 546, __pyx_L1_error)) xmlUnlinkNode(__pyx_v_c_dtd); - /* "lxml/etree.pyx":547 + /* "lxml/etree.pyx":545 * return * tree.xmlUnlinkNode(c_dtd) * tree.xmlFreeNode(c_dtd) # <<<<<<<<<<<<<< * * property public_id: */ - __Pyx_TraceLine(547,0,__PYX_ERR(0, 547, __pyx_L1_error)) xmlFreeNode(__pyx_v_c_dtd); - /* "lxml/etree.pyx":540 + /* "lxml/etree.pyx":538 * return tree.xmlCreateIntSubset(c_doc, c_name, NULL, NULL) * * def clear(self): # <<<<<<<<<<<<<< @@ -53173,18 +50252,13 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_2clear(struct __pyx_obj_4lxml_5e /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.DocInfo.clear", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":555 +/* "lxml/etree.pyx":553 * exist, setting this variable (even to None) will create one. * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -53210,7 +50284,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_9public_id___get__(struct __pyx_ PyObject *__pyx_v_public_id = NULL; CYTHON_UNUSED PyObject *__pyx_v_system_url = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -53219,17 +50292,15 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_9public_id___get__(struct __pyx_ PyObject *__pyx_t_5 = NULL; PyObject *(*__pyx_t_6)(PyObject *); __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 555, 0, __PYX_ERR(0, 555, __pyx_L1_error)); - /* "lxml/etree.pyx":556 + /* "lxml/etree.pyx":554 * """ * def __get__(self): * root_name, public_id, system_url = self._doc.getdoctype() # <<<<<<<<<<<<<< * return public_id * */ - __Pyx_TraceLine(556,0,__PYX_ERR(0, 556, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_9_Document_getdoctype(__pyx_v_self->_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_9_Document_getdoctype(__pyx_v_self->_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; @@ -53237,7 +50308,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_9public_id___get__(struct __pyx_ if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 556, __pyx_L1_error) + __PYX_ERR(0, 554, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -53253,17 +50324,17 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_9public_id___get__(struct __pyx_ __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 556, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 556, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 556, __pyx_L1_error) + __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; @@ -53273,7 +50344,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_9public_id___get__(struct __pyx_ __Pyx_GOTREF(__pyx_t_3); index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 556, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 554, __pyx_L1_error) __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_unpacking_done; @@ -53281,7 +50352,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_9public_id___get__(struct __pyx_ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 556, __pyx_L1_error) + __PYX_ERR(0, 554, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_root_name = __pyx_t_2; @@ -53291,20 +50362,19 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_9public_id___get__(struct __pyx_ __pyx_v_system_url = __pyx_t_4; __pyx_t_4 = 0; - /* "lxml/etree.pyx":557 + /* "lxml/etree.pyx":555 * def __get__(self): * root_name, public_id, system_url = self._doc.getdoctype() * return public_id # <<<<<<<<<<<<<< * * def __set__(self, value): */ - __Pyx_TraceLine(557,0,__PYX_ERR(0, 557, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_public_id); __pyx_r = __pyx_v_public_id; goto __pyx_L0; - /* "lxml/etree.pyx":555 + /* "lxml/etree.pyx":553 * exist, setting this variable (even to None) will create one. * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -53326,12 +50396,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_9public_id___get__(struct __pyx_ __Pyx_XDECREF(__pyx_v_public_id); __Pyx_XDECREF(__pyx_v_system_url); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":559 +/* "lxml/etree.pyx":557 * return public_id * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -53357,50 +50426,45 @@ static int __pyx_pf_4lxml_5etree_7DocInfo_9public_id_2__set__(struct __pyx_obj_4 PyObject *__pyx_v_match = NULL; xmlDtd *__pyx_v_c_dtd; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - Py_ssize_t __pyx_t_7; - Py_UCS4 __pyx_t_8; + Py_ssize_t __pyx_t_6; + Py_UCS4 __pyx_t_7; + PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[0], 559, 0, __PYX_ERR(0, 559, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_value); - /* "lxml/etree.pyx":560 + /* "lxml/etree.pyx":558 * * def __set__(self, value): * cdef xmlChar* c_value = NULL # <<<<<<<<<<<<<< * if value is not None: * match = _find_invalid_public_id_characters(value) */ - __Pyx_TraceLine(560,0,__PYX_ERR(0, 560, __pyx_L1_error)) __pyx_v_c_value = NULL; - /* "lxml/etree.pyx":561 + /* "lxml/etree.pyx":559 * def __set__(self, value): * cdef xmlChar* c_value = NULL * if value is not None: # <<<<<<<<<<<<<< * match = _find_invalid_public_id_characters(value) * if match: */ - __Pyx_TraceLine(561,0,__PYX_ERR(0, 561, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_value != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":562 + /* "lxml/etree.pyx":560 * cdef xmlChar* c_value = NULL * if value is not None: * match = _find_invalid_public_id_characters(value) # <<<<<<<<<<<<<< * if match: * raise ValueError, f'Invalid character(s) {match.group(0)!r} in public_id.' */ - __Pyx_TraceLine(562,0,__PYX_ERR(0, 562, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_4lxml_5etree__find_invalid_public_id_characters); __pyx_t_4 = __pyx_v_4lxml_5etree__find_invalid_public_id_characters; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -53412,94 +50476,76 @@ static int __pyx_pf_4lxml_5etree_7DocInfo_9public_id_2__set__(struct __pyx_obj_4 __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_value}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_value}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 562, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_INCREF(__pyx_v_value); - __Pyx_GIVEREF(__pyx_v_value); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_value); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_value); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 560, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_match = __pyx_t_3; __pyx_t_3 = 0; - /* "lxml/etree.pyx":563 + /* "lxml/etree.pyx":561 * if value is not None: * match = _find_invalid_public_id_characters(value) * if match: # <<<<<<<<<<<<<< * raise ValueError, f'Invalid character(s) {match.group(0)!r} in public_id.' * value = _utf8(value) */ - __Pyx_TraceLine(563,0,__PYX_ERR(0, 563, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_match); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 563, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_match); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 561, __pyx_L1_error) if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":564 + /* "lxml/etree.pyx":562 * match = _find_invalid_public_id_characters(value) * if match: * raise ValueError, f'Invalid character(s) {match.group(0)!r} in public_id.' # <<<<<<<<<<<<<< * value = _utf8(value) * c_value = tree.xmlStrdup(_xcstr(value)) */ - __Pyx_TraceLine(564,0,__PYX_ERR(0, 564, __pyx_L1_error)) - __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 564, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = 0; - __pyx_t_8 = 127; + __pyx_t_6 = 0; + __pyx_t_7 = 127; __Pyx_INCREF(__pyx_kp_u_Invalid_character_s); - __pyx_t_7 += 21; + __pyx_t_6 += 21; __Pyx_GIVEREF(__pyx_kp_u_Invalid_character_s); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Invalid_character_s); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 564, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 562, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_int_0); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 564, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 562, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_6), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 564, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_8; - __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); - __pyx_t_4 = 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; + __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); + __pyx_t_5 = 0; __Pyx_INCREF(__pyx_kp_u_in_public_id); - __pyx_t_7 += 14; + __pyx_t_6 += 14; __Pyx_GIVEREF(__pyx_kp_u_in_public_id); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_in_public_id); - __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 564, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 562, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __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, 564, __pyx_L1_error) + __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_5, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 562, __pyx_L1_error) - /* "lxml/etree.pyx":563 + /* "lxml/etree.pyx":561 * if value is not None: * match = _find_invalid_public_id_characters(value) * if match: # <<<<<<<<<<<<<< @@ -53508,51 +50554,47 @@ static int __pyx_pf_4lxml_5etree_7DocInfo_9public_id_2__set__(struct __pyx_obj_4 */ } - /* "lxml/etree.pyx":565 + /* "lxml/etree.pyx":563 * if match: * raise ValueError, f'Invalid character(s) {match.group(0)!r} in public_id.' * value = _utf8(value) # <<<<<<<<<<<<<< * c_value = tree.xmlStrdup(_xcstr(value)) * if not c_value: */ - __Pyx_TraceLine(565,0,__PYX_ERR(0, 565, __pyx_L1_error)) - __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 565, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4); - __pyx_t_4 = 0; + __pyx_t_5 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_5); + __pyx_t_5 = 0; - /* "lxml/etree.pyx":566 + /* "lxml/etree.pyx":564 * raise ValueError, f'Invalid character(s) {match.group(0)!r} in public_id.' * value = _utf8(value) * c_value = tree.xmlStrdup(_xcstr(value)) # <<<<<<<<<<<<<< * if not c_value: * raise MemoryError() */ - __Pyx_TraceLine(566,0,__PYX_ERR(0, 566, __pyx_L1_error)) __pyx_v_c_value = xmlStrdup((const xmlChar*)PyBytes_AS_STRING(__pyx_v_value)); - /* "lxml/etree.pyx":567 + /* "lxml/etree.pyx":565 * value = _utf8(value) * c_value = tree.xmlStrdup(_xcstr(value)) * if not c_value: # <<<<<<<<<<<<<< * raise MemoryError() * */ - __Pyx_TraceLine(567,0,__PYX_ERR(0, 567, __pyx_L1_error)) __pyx_t_2 = ((!(__pyx_v_c_value != 0)) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":568 + /* "lxml/etree.pyx":566 * c_value = tree.xmlStrdup(_xcstr(value)) * if not c_value: * raise MemoryError() # <<<<<<<<<<<<<< * * c_dtd = self._get_c_dtd() */ - __Pyx_TraceLine(568,0,__PYX_ERR(0, 568, __pyx_L1_error)) - PyErr_NoMemory(); __PYX_ERR(0, 568, __pyx_L1_error) + PyErr_NoMemory(); __PYX_ERR(0, 566, __pyx_L1_error) - /* "lxml/etree.pyx":567 + /* "lxml/etree.pyx":565 * value = _utf8(value) * c_value = tree.xmlStrdup(_xcstr(value)) * if not c_value: # <<<<<<<<<<<<<< @@ -53561,7 +50603,7 @@ static int __pyx_pf_4lxml_5etree_7DocInfo_9public_id_2__set__(struct __pyx_obj_4 */ } - /* "lxml/etree.pyx":561 + /* "lxml/etree.pyx":559 * def __set__(self, value): * cdef xmlChar* c_value = NULL * if value is not None: # <<<<<<<<<<<<<< @@ -53570,48 +50612,44 @@ static int __pyx_pf_4lxml_5etree_7DocInfo_9public_id_2__set__(struct __pyx_obj_4 */ } - /* "lxml/etree.pyx":570 + /* "lxml/etree.pyx":568 * raise MemoryError() * * c_dtd = self._get_c_dtd() # <<<<<<<<<<<<<< * if not c_dtd: * tree.xmlFree(c_value) */ - __Pyx_TraceLine(570,0,__PYX_ERR(0, 570, __pyx_L1_error)) __pyx_v_c_dtd = __pyx_f_4lxml_5etree_7DocInfo__get_c_dtd(__pyx_v_self); - /* "lxml/etree.pyx":571 + /* "lxml/etree.pyx":569 * * c_dtd = self._get_c_dtd() * if not c_dtd: # <<<<<<<<<<<<<< * tree.xmlFree(c_value) * raise MemoryError() */ - __Pyx_TraceLine(571,0,__PYX_ERR(0, 571, __pyx_L1_error)) __pyx_t_2 = ((!(__pyx_v_c_dtd != 0)) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":572 + /* "lxml/etree.pyx":570 * c_dtd = self._get_c_dtd() * if not c_dtd: * tree.xmlFree(c_value) # <<<<<<<<<<<<<< * raise MemoryError() * if c_dtd.ExternalID: */ - __Pyx_TraceLine(572,0,__PYX_ERR(0, 572, __pyx_L1_error)) xmlFree(__pyx_v_c_value); - /* "lxml/etree.pyx":573 + /* "lxml/etree.pyx":571 * if not c_dtd: * tree.xmlFree(c_value) * raise MemoryError() # <<<<<<<<<<<<<< * if c_dtd.ExternalID: * tree.xmlFree(c_dtd.ExternalID) */ - __Pyx_TraceLine(573,0,__PYX_ERR(0, 573, __pyx_L1_error)) - PyErr_NoMemory(); __PYX_ERR(0, 573, __pyx_L1_error) + PyErr_NoMemory(); __PYX_ERR(0, 571, __pyx_L1_error) - /* "lxml/etree.pyx":571 + /* "lxml/etree.pyx":569 * * c_dtd = self._get_c_dtd() * if not c_dtd: # <<<<<<<<<<<<<< @@ -53620,28 +50658,26 @@ static int __pyx_pf_4lxml_5etree_7DocInfo_9public_id_2__set__(struct __pyx_obj_4 */ } - /* "lxml/etree.pyx":574 + /* "lxml/etree.pyx":572 * tree.xmlFree(c_value) * raise MemoryError() * if c_dtd.ExternalID: # <<<<<<<<<<<<<< * tree.xmlFree(c_dtd.ExternalID) * c_dtd.ExternalID = c_value */ - __Pyx_TraceLine(574,0,__PYX_ERR(0, 574, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_c_dtd->ExternalID != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":575 + /* "lxml/etree.pyx":573 * raise MemoryError() * if c_dtd.ExternalID: * tree.xmlFree(c_dtd.ExternalID) # <<<<<<<<<<<<<< * c_dtd.ExternalID = c_value * */ - __Pyx_TraceLine(575,0,__PYX_ERR(0, 575, __pyx_L1_error)) xmlFree(((void *)__pyx_v_c_dtd->ExternalID)); - /* "lxml/etree.pyx":574 + /* "lxml/etree.pyx":572 * tree.xmlFree(c_value) * raise MemoryError() * if c_dtd.ExternalID: # <<<<<<<<<<<<<< @@ -53650,17 +50686,16 @@ static int __pyx_pf_4lxml_5etree_7DocInfo_9public_id_2__set__(struct __pyx_obj_4 */ } - /* "lxml/etree.pyx":576 + /* "lxml/etree.pyx":574 * if c_dtd.ExternalID: * tree.xmlFree(c_dtd.ExternalID) * c_dtd.ExternalID = c_value # <<<<<<<<<<<<<< * * property system_url: */ - __Pyx_TraceLine(576,0,__PYX_ERR(0, 576, __pyx_L1_error)) __pyx_v_c_dtd->ExternalID = __pyx_v_c_value; - /* "lxml/etree.pyx":559 + /* "lxml/etree.pyx":557 * return public_id * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -53675,18 +50710,17 @@ static int __pyx_pf_4lxml_5etree_7DocInfo_9public_id_2__set__(struct __pyx_obj_4 __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("lxml.etree.DocInfo.public_id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_match); __Pyx_XDECREF(__pyx_v_value); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":584 +/* "lxml/etree.pyx":582 * exist, setting this variable (even to None) will create one. * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -53712,7 +50746,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_10system_url___get__(struct __py CYTHON_UNUSED PyObject *__pyx_v_public_id = NULL; PyObject *__pyx_v_system_url = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -53721,17 +50754,15 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_10system_url___get__(struct __py PyObject *__pyx_t_5 = NULL; PyObject *(*__pyx_t_6)(PyObject *); __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 584, 0, __PYX_ERR(0, 584, __pyx_L1_error)); - /* "lxml/etree.pyx":585 + /* "lxml/etree.pyx":583 * """ * def __get__(self): * root_name, public_id, system_url = self._doc.getdoctype() # <<<<<<<<<<<<<< * return system_url * */ - __Pyx_TraceLine(585,0,__PYX_ERR(0, 585, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_9_Document_getdoctype(__pyx_v_self->_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_9_Document_getdoctype(__pyx_v_self->_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; @@ -53739,7 +50770,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_10system_url___get__(struct __py if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 585, __pyx_L1_error) + __PYX_ERR(0, 583, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -53755,17 +50786,17 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_10system_url___get__(struct __py __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 585, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 585, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 585, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 585, __pyx_L1_error) + __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; @@ -53775,7 +50806,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_10system_url___get__(struct __py __Pyx_GOTREF(__pyx_t_3); index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 585, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 583, __pyx_L1_error) __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_unpacking_done; @@ -53783,7 +50814,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_10system_url___get__(struct __py __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 585, __pyx_L1_error) + __PYX_ERR(0, 583, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_root_name = __pyx_t_2; @@ -53793,20 +50824,19 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_10system_url___get__(struct __py __pyx_v_system_url = __pyx_t_4; __pyx_t_4 = 0; - /* "lxml/etree.pyx":586 + /* "lxml/etree.pyx":584 * def __get__(self): * root_name, public_id, system_url = self._doc.getdoctype() * return system_url # <<<<<<<<<<<<<< * * def __set__(self, value): */ - __Pyx_TraceLine(586,0,__PYX_ERR(0, 586, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_system_url); __pyx_r = __pyx_v_system_url; goto __pyx_L0; - /* "lxml/etree.pyx":584 + /* "lxml/etree.pyx":582 * exist, setting this variable (even to None) will create one. * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -53828,12 +50858,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_10system_url___get__(struct __py __Pyx_XDECREF(__pyx_v_public_id); __Pyx_XDECREF(__pyx_v_system_url); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":588 +/* "lxml/etree.pyx":586 * return system_url * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -53859,86 +50888,79 @@ static int __pyx_pf_4lxml_5etree_7DocInfo_10system_url_2__set__(struct __pyx_obj PyObject *__pyx_v_bvalue = NULL; xmlDtd *__pyx_v_c_dtd; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[0], 588, 0, __PYX_ERR(0, 588, __pyx_L1_error)); - /* "lxml/etree.pyx":589 + /* "lxml/etree.pyx":587 * * def __set__(self, value): * cdef xmlChar* c_value = NULL # <<<<<<<<<<<<<< * if value is not None: * bvalue = _utf8(value) */ - __Pyx_TraceLine(589,0,__PYX_ERR(0, 589, __pyx_L1_error)) __pyx_v_c_value = NULL; - /* "lxml/etree.pyx":590 + /* "lxml/etree.pyx":588 * def __set__(self, value): * cdef xmlChar* c_value = NULL * if value is not None: # <<<<<<<<<<<<<< * bvalue = _utf8(value) * # sys_url may be any valid unicode string that can be */ - __Pyx_TraceLine(590,0,__PYX_ERR(0, 590, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_value != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":591 + /* "lxml/etree.pyx":589 * cdef xmlChar* c_value = NULL * if value is not None: * bvalue = _utf8(value) # <<<<<<<<<<<<<< * # sys_url may be any valid unicode string that can be * # enclosed in single quotes or quotes. */ - __Pyx_TraceLine(591,0,__PYX_ERR(0, 591, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 591, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_bvalue = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":594 + /* "lxml/etree.pyx":592 * # sys_url may be any valid unicode string that can be * # enclosed in single quotes or quotes. * if b"'" in bvalue and b'"' in bvalue: # <<<<<<<<<<<<<< * raise ValueError( * 'System URL may not contain both single (\') and double quotes (").') */ - __Pyx_TraceLine(594,0,__PYX_ERR(0, 594, __pyx_L1_error)) - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__60, __pyx_v_bvalue, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 594, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__21, __pyx_v_bvalue, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 592, __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_4 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__61, __pyx_v_bvalue, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 594, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__22, __pyx_v_bvalue, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 592, __pyx_L1_error) __pyx_t_1 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_1; __pyx_L5_bool_binop_done:; if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":595 + /* "lxml/etree.pyx":593 * # enclosed in single quotes or quotes. * if b"'" in bvalue and b'"' in bvalue: * raise ValueError( # <<<<<<<<<<<<<< * 'System URL may not contain both single (\') and double quotes (").') * c_value = tree.xmlStrdup(_xcstr(bvalue)) */ - __Pyx_TraceLine(595,0,__PYX_ERR(0, 595, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 595, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 593, __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, 595, __pyx_L1_error) + __PYX_ERR(0, 593, __pyx_L1_error) - /* "lxml/etree.pyx":594 + /* "lxml/etree.pyx":592 * # sys_url may be any valid unicode string that can be * # enclosed in single quotes or quotes. * if b"'" in bvalue and b'"' in bvalue: # <<<<<<<<<<<<<< @@ -53947,38 +50969,35 @@ static int __pyx_pf_4lxml_5etree_7DocInfo_10system_url_2__set__(struct __pyx_obj */ } - /* "lxml/etree.pyx":597 + /* "lxml/etree.pyx":595 * raise ValueError( * 'System URL may not contain both single (\') and double quotes (").') * c_value = tree.xmlStrdup(_xcstr(bvalue)) # <<<<<<<<<<<<<< * if not c_value: * raise MemoryError() */ - __Pyx_TraceLine(597,0,__PYX_ERR(0, 597, __pyx_L1_error)) __pyx_v_c_value = xmlStrdup((const xmlChar*)PyBytes_AS_STRING(__pyx_v_bvalue)); - /* "lxml/etree.pyx":598 + /* "lxml/etree.pyx":596 * 'System URL may not contain both single (\') and double quotes (").') * c_value = tree.xmlStrdup(_xcstr(bvalue)) * if not c_value: # <<<<<<<<<<<<<< * raise MemoryError() * */ - __Pyx_TraceLine(598,0,__PYX_ERR(0, 598, __pyx_L1_error)) __pyx_t_2 = ((!(__pyx_v_c_value != 0)) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":599 + /* "lxml/etree.pyx":597 * c_value = tree.xmlStrdup(_xcstr(bvalue)) * if not c_value: * raise MemoryError() # <<<<<<<<<<<<<< * * c_dtd = self._get_c_dtd() */ - __Pyx_TraceLine(599,0,__PYX_ERR(0, 599, __pyx_L1_error)) - PyErr_NoMemory(); __PYX_ERR(0, 599, __pyx_L1_error) + PyErr_NoMemory(); __PYX_ERR(0, 597, __pyx_L1_error) - /* "lxml/etree.pyx":598 + /* "lxml/etree.pyx":596 * 'System URL may not contain both single (\') and double quotes (").') * c_value = tree.xmlStrdup(_xcstr(bvalue)) * if not c_value: # <<<<<<<<<<<<<< @@ -53987,7 +51006,7 @@ static int __pyx_pf_4lxml_5etree_7DocInfo_10system_url_2__set__(struct __pyx_obj */ } - /* "lxml/etree.pyx":590 + /* "lxml/etree.pyx":588 * def __set__(self, value): * cdef xmlChar* c_value = NULL * if value is not None: # <<<<<<<<<<<<<< @@ -53996,48 +51015,44 @@ static int __pyx_pf_4lxml_5etree_7DocInfo_10system_url_2__set__(struct __pyx_obj */ } - /* "lxml/etree.pyx":601 + /* "lxml/etree.pyx":599 * raise MemoryError() * * c_dtd = self._get_c_dtd() # <<<<<<<<<<<<<< * if not c_dtd: * tree.xmlFree(c_value) */ - __Pyx_TraceLine(601,0,__PYX_ERR(0, 601, __pyx_L1_error)) __pyx_v_c_dtd = __pyx_f_4lxml_5etree_7DocInfo__get_c_dtd(__pyx_v_self); - /* "lxml/etree.pyx":602 + /* "lxml/etree.pyx":600 * * c_dtd = self._get_c_dtd() * if not c_dtd: # <<<<<<<<<<<<<< * tree.xmlFree(c_value) * raise MemoryError() */ - __Pyx_TraceLine(602,0,__PYX_ERR(0, 602, __pyx_L1_error)) __pyx_t_2 = ((!(__pyx_v_c_dtd != 0)) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":603 + /* "lxml/etree.pyx":601 * c_dtd = self._get_c_dtd() * if not c_dtd: * tree.xmlFree(c_value) # <<<<<<<<<<<<<< * raise MemoryError() * if c_dtd.SystemID: */ - __Pyx_TraceLine(603,0,__PYX_ERR(0, 603, __pyx_L1_error)) xmlFree(__pyx_v_c_value); - /* "lxml/etree.pyx":604 + /* "lxml/etree.pyx":602 * if not c_dtd: * tree.xmlFree(c_value) * raise MemoryError() # <<<<<<<<<<<<<< * if c_dtd.SystemID: * tree.xmlFree(c_dtd.SystemID) */ - __Pyx_TraceLine(604,0,__PYX_ERR(0, 604, __pyx_L1_error)) - PyErr_NoMemory(); __PYX_ERR(0, 604, __pyx_L1_error) + PyErr_NoMemory(); __PYX_ERR(0, 602, __pyx_L1_error) - /* "lxml/etree.pyx":602 + /* "lxml/etree.pyx":600 * * c_dtd = self._get_c_dtd() * if not c_dtd: # <<<<<<<<<<<<<< @@ -54046,28 +51061,26 @@ static int __pyx_pf_4lxml_5etree_7DocInfo_10system_url_2__set__(struct __pyx_obj */ } - /* "lxml/etree.pyx":605 + /* "lxml/etree.pyx":603 * tree.xmlFree(c_value) * raise MemoryError() * if c_dtd.SystemID: # <<<<<<<<<<<<<< * tree.xmlFree(c_dtd.SystemID) * c_dtd.SystemID = c_value */ - __Pyx_TraceLine(605,0,__PYX_ERR(0, 605, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_c_dtd->SystemID != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":606 + /* "lxml/etree.pyx":604 * raise MemoryError() * if c_dtd.SystemID: * tree.xmlFree(c_dtd.SystemID) # <<<<<<<<<<<<<< * c_dtd.SystemID = c_value * */ - __Pyx_TraceLine(606,0,__PYX_ERR(0, 606, __pyx_L1_error)) xmlFree(((void *)__pyx_v_c_dtd->SystemID)); - /* "lxml/etree.pyx":605 + /* "lxml/etree.pyx":603 * tree.xmlFree(c_value) * raise MemoryError() * if c_dtd.SystemID: # <<<<<<<<<<<<<< @@ -54076,17 +51089,16 @@ static int __pyx_pf_4lxml_5etree_7DocInfo_10system_url_2__set__(struct __pyx_obj */ } - /* "lxml/etree.pyx":607 + /* "lxml/etree.pyx":605 * if c_dtd.SystemID: * tree.xmlFree(c_dtd.SystemID) * c_dtd.SystemID = c_value # <<<<<<<<<<<<<< * * property xml_version: */ - __Pyx_TraceLine(607,0,__PYX_ERR(0, 607, __pyx_L1_error)) __pyx_v_c_dtd->SystemID = __pyx_v_c_value; - /* "lxml/etree.pyx":588 + /* "lxml/etree.pyx":586 * return system_url * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -54103,12 +51115,11 @@ static int __pyx_pf_4lxml_5etree_7DocInfo_10system_url_2__set__(struct __pyx_obj __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_bvalue); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":611 +/* "lxml/etree.pyx":609 * property xml_version: * u"Returns the XML version as declared by the document." * def __get__(self): # <<<<<<<<<<<<<< @@ -54133,7 +51144,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_11xml_version___get__(struct __p PyObject *__pyx_v_xml_version = NULL; CYTHON_UNUSED PyObject *__pyx_v_encoding = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -54141,17 +51151,15 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_11xml_version___get__(struct __p PyObject *__pyx_t_4 = NULL; PyObject *(*__pyx_t_5)(PyObject *); __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 611, 0, __PYX_ERR(0, 611, __pyx_L1_error)); - /* "lxml/etree.pyx":612 + /* "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 * */ - __Pyx_TraceLine(612,0,__PYX_ERR(0, 612, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_9_Document_getxmlinfo(__pyx_v_self->_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error) + __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) __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; @@ -54159,7 +51167,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_11xml_version___get__(struct __p if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 612, __pyx_L1_error) + __PYX_ERR(0, 610, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -54172,15 +51180,15 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_11xml_version___get__(struct __p __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 612, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 612, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; @@ -54188,7 +51196,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_11xml_version___get__(struct __p __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 612, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 610, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_unpacking_done; @@ -54196,7 +51204,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_11xml_version___get__(struct __p __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 612, __pyx_L1_error) + __PYX_ERR(0, 610, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_xml_version = __pyx_t_2; @@ -54204,20 +51212,19 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_11xml_version___get__(struct __p __pyx_v_encoding = __pyx_t_3; __pyx_t_3 = 0; - /* "lxml/etree.pyx":613 + /* "lxml/etree.pyx":611 * def __get__(self): * xml_version, encoding = self._doc.getxmlinfo() * return xml_version # <<<<<<<<<<<<<< * * property encoding: */ - __Pyx_TraceLine(613,0,__PYX_ERR(0, 613, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_xml_version); __pyx_r = __pyx_v_xml_version; goto __pyx_L0; - /* "lxml/etree.pyx":611 + /* "lxml/etree.pyx":609 * property xml_version: * u"Returns the XML version as declared by the document." * def __get__(self): # <<<<<<<<<<<<<< @@ -54237,12 +51244,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_11xml_version___get__(struct __p __Pyx_XDECREF(__pyx_v_xml_version); __Pyx_XDECREF(__pyx_v_encoding); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":617 +/* "lxml/etree.pyx":615 * property encoding: * u"Returns the encoding name as declared by the document." * def __get__(self): # <<<<<<<<<<<<<< @@ -54267,7 +51273,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_8encoding___get__(struct __pyx_o CYTHON_UNUSED PyObject *__pyx_v_xml_version = NULL; PyObject *__pyx_v_encoding = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -54275,17 +51280,15 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_8encoding___get__(struct __pyx_o PyObject *__pyx_t_4 = NULL; PyObject *(*__pyx_t_5)(PyObject *); __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 617, 0, __PYX_ERR(0, 617, __pyx_L1_error)); - /* "lxml/etree.pyx":618 + /* "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 * */ - __Pyx_TraceLine(618,0,__PYX_ERR(0, 618, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_9_Document_getxmlinfo(__pyx_v_self->_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error) + __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) __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; @@ -54293,7 +51296,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_8encoding___get__(struct __pyx_o if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 618, __pyx_L1_error) + __PYX_ERR(0, 616, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -54306,15 +51309,15 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_8encoding___get__(struct __pyx_o __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 618, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 618, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 618, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; @@ -54322,7 +51325,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_8encoding___get__(struct __pyx_o __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 618, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 616, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_unpacking_done; @@ -54330,7 +51333,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_8encoding___get__(struct __pyx_o __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 618, __pyx_L1_error) + __PYX_ERR(0, 616, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_xml_version = __pyx_t_2; @@ -54338,20 +51341,19 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_8encoding___get__(struct __pyx_o __pyx_v_encoding = __pyx_t_3; __pyx_t_3 = 0; - /* "lxml/etree.pyx":619 + /* "lxml/etree.pyx":617 * def __get__(self): * xml_version, encoding = self._doc.getxmlinfo() * return encoding # <<<<<<<<<<<<<< * * property standalone: */ - __Pyx_TraceLine(619,0,__PYX_ERR(0, 619, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_encoding); __pyx_r = __pyx_v_encoding; goto __pyx_L0; - /* "lxml/etree.pyx":617 + /* "lxml/etree.pyx":615 * property encoding: * u"Returns the encoding name as declared by the document." * def __get__(self): # <<<<<<<<<<<<<< @@ -54371,12 +51373,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_8encoding___get__(struct __pyx_o __Pyx_XDECREF(__pyx_v_xml_version); __Pyx_XDECREF(__pyx_v_encoding); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":629 +/* "lxml/etree.pyx":627 * ``standalone`` flag was set to ``'yes'`` or not. * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -54399,28 +51400,25 @@ static PyObject *__pyx_pw_4lxml_5etree_7DocInfo_10standalone_1__get__(PyObject * static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_10standalone___get__(struct __pyx_obj_4lxml_5etree_DocInfo *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 629, 0, __PYX_ERR(0, 629, __pyx_L1_error)); - /* "lxml/etree.pyx":630 + /* "lxml/etree.pyx":628 * """ * def __get__(self): * return self._doc.isstandalone() # <<<<<<<<<<<<<< * * property URL: */ - __Pyx_TraceLine(630,0,__PYX_ERR(0, 630, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree_9_Document_isstandalone(__pyx_v_self->_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_9_Document_isstandalone(__pyx_v_self->_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":629 + /* "lxml/etree.pyx":627 * ``standalone`` flag was set to ``'yes'`` or not. * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -54435,12 +51433,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_10standalone___get__(struct __py __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":634 +/* "lxml/etree.pyx":632 * property URL: * u"The source URL of the document (or None if unknown)." * def __get__(self): # <<<<<<<<<<<<<< @@ -54463,37 +51460,33 @@ static PyObject *__pyx_pw_4lxml_5etree_7DocInfo_3URL_1__get__(PyObject *__pyx_v_ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_3URL___get__(struct __pyx_obj_4lxml_5etree_DocInfo *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 634, 0, __PYX_ERR(0, 634, __pyx_L1_error)); - /* "lxml/etree.pyx":635 + /* "lxml/etree.pyx":633 * u"The source URL of the document (or None if unknown)." * def __get__(self): * if self._doc._c_doc.URL is NULL: # <<<<<<<<<<<<<< * return None * return _decodeFilename(self._doc._c_doc.URL) */ - __Pyx_TraceLine(635,0,__PYX_ERR(0, 635, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_doc->_c_doc->URL == NULL) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":636 + /* "lxml/etree.pyx":634 * def __get__(self): * if self._doc._c_doc.URL is NULL: * return None # <<<<<<<<<<<<<< * return _decodeFilename(self._doc._c_doc.URL) * def __set__(self, url): */ - __Pyx_TraceLine(636,0,__PYX_ERR(0, 636, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/etree.pyx":635 + /* "lxml/etree.pyx":633 * u"The source URL of the document (or None if unknown)." * def __get__(self): * if self._doc._c_doc.URL is NULL: # <<<<<<<<<<<<<< @@ -54502,22 +51495,21 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_3URL___get__(struct __pyx_obj_4l */ } - /* "lxml/etree.pyx":637 + /* "lxml/etree.pyx":635 * if self._doc._c_doc.URL is NULL: * return None * return _decodeFilename(self._doc._c_doc.URL) # <<<<<<<<<<<<<< * def __set__(self, url): * url = _encodeFilename(url) */ - __Pyx_TraceLine(637,0,__PYX_ERR(0, 637, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_4lxml_5etree__decodeFilename(__pyx_v_self->_doc->_c_doc->URL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 637, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__decodeFilename(__pyx_v_self->_doc->_c_doc->URL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":634 + /* "lxml/etree.pyx":632 * property URL: * u"The source URL of the document (or None if unknown)." * def __get__(self): # <<<<<<<<<<<<<< @@ -54532,12 +51524,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_3URL___get__(struct __pyx_obj_4l __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":638 +/* "lxml/etree.pyx":636 * return None * return _decodeFilename(self._doc._c_doc.URL) * def __set__(self, url): # <<<<<<<<<<<<<< @@ -54561,63 +51552,57 @@ static int __pyx_pw_4lxml_5etree_7DocInfo_3URL_3__set__(PyObject *__pyx_v_self, static int __pyx_pf_4lxml_5etree_7DocInfo_3URL_2__set__(struct __pyx_obj_4lxml_5etree_DocInfo *__pyx_v_self, PyObject *__pyx_v_url) { const xmlChar *__pyx_v_c_oldurl; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; const xmlChar *__pyx_t_2; int __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[0], 638, 0, __PYX_ERR(0, 638, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_url); - /* "lxml/etree.pyx":639 + /* "lxml/etree.pyx":637 * return _decodeFilename(self._doc._c_doc.URL) * def __set__(self, url): * url = _encodeFilename(url) # <<<<<<<<<<<<<< * c_oldurl = self._doc._c_doc.URL * if url is None: */ - __Pyx_TraceLine(639,0,__PYX_ERR(0, 639, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_url); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_url); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_url, __pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":640 + /* "lxml/etree.pyx":638 * def __set__(self, url): * url = _encodeFilename(url) * c_oldurl = self._doc._c_doc.URL # <<<<<<<<<<<<<< * if url is None: * self._doc._c_doc.URL = NULL */ - __Pyx_TraceLine(640,0,__PYX_ERR(0, 640, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_doc->_c_doc->URL; __pyx_v_c_oldurl = __pyx_t_2; - /* "lxml/etree.pyx":641 + /* "lxml/etree.pyx":639 * url = _encodeFilename(url) * c_oldurl = self._doc._c_doc.URL * if url is None: # <<<<<<<<<<<<<< * self._doc._c_doc.URL = NULL * else: */ - __Pyx_TraceLine(641,0,__PYX_ERR(0, 641, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_url == Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { - /* "lxml/etree.pyx":642 + /* "lxml/etree.pyx":640 * c_oldurl = self._doc._c_doc.URL * if url is None: * self._doc._c_doc.URL = NULL # <<<<<<<<<<<<<< * else: * self._doc._c_doc.URL = tree.xmlStrdup(_xcstr(url)) */ - __Pyx_TraceLine(642,0,__PYX_ERR(0, 642, __pyx_L1_error)) __pyx_v_self->_doc->_c_doc->URL = NULL; - /* "lxml/etree.pyx":641 + /* "lxml/etree.pyx":639 * url = _encodeFilename(url) * c_oldurl = self._doc._c_doc.URL * if url is None: # <<<<<<<<<<<<<< @@ -54627,41 +51612,38 @@ static int __pyx_pf_4lxml_5etree_7DocInfo_3URL_2__set__(struct __pyx_obj_4lxml_5 goto __pyx_L3; } - /* "lxml/etree.pyx":644 + /* "lxml/etree.pyx":642 * self._doc._c_doc.URL = NULL * else: * self._doc._c_doc.URL = tree.xmlStrdup(_xcstr(url)) # <<<<<<<<<<<<<< * if c_oldurl is not NULL: * tree.xmlFree(c_oldurl) */ - __Pyx_TraceLine(644,0,__PYX_ERR(0, 644, __pyx_L1_error)) /*else*/ { __pyx_v_self->_doc->_c_doc->URL = xmlStrdup((const xmlChar*)PyBytes_AS_STRING(__pyx_v_url)); } __pyx_L3:; - /* "lxml/etree.pyx":645 + /* "lxml/etree.pyx":643 * else: * self._doc._c_doc.URL = tree.xmlStrdup(_xcstr(url)) * if c_oldurl is not NULL: # <<<<<<<<<<<<<< * tree.xmlFree(c_oldurl) * */ - __Pyx_TraceLine(645,0,__PYX_ERR(0, 645, __pyx_L1_error)) __pyx_t_4 = ((__pyx_v_c_oldurl != NULL) != 0); if (__pyx_t_4) { - /* "lxml/etree.pyx":646 + /* "lxml/etree.pyx":644 * self._doc._c_doc.URL = tree.xmlStrdup(_xcstr(url)) * if c_oldurl is not NULL: * tree.xmlFree(c_oldurl) # <<<<<<<<<<<<<< * * property doctype: */ - __Pyx_TraceLine(646,0,__PYX_ERR(0, 646, __pyx_L1_error)) xmlFree(((void *)__pyx_v_c_oldurl)); - /* "lxml/etree.pyx":645 + /* "lxml/etree.pyx":643 * else: * self._doc._c_doc.URL = tree.xmlStrdup(_xcstr(url)) * if c_oldurl is not NULL: # <<<<<<<<<<<<<< @@ -54670,7 +51652,7 @@ static int __pyx_pf_4lxml_5etree_7DocInfo_3URL_2__set__(struct __pyx_obj_4lxml_5 */ } - /* "lxml/etree.pyx":638 + /* "lxml/etree.pyx":636 * return None * return _decodeFilename(self._doc._c_doc.URL) * def __set__(self, url): # <<<<<<<<<<<<<< @@ -54687,12 +51669,11 @@ static int __pyx_pf_4lxml_5etree_7DocInfo_3URL_2__set__(struct __pyx_obj_4lxml_5 __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_url); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":650 +/* "lxml/etree.pyx":648 * property doctype: * u"Returns a DOCTYPE declaration string for the document." * def __get__(self): # <<<<<<<<<<<<<< @@ -54719,7 +51700,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob PyObject *__pyx_v_system_url = NULL; PyObject *__pyx_v_quoted_system_url = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -54732,17 +51712,15 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob Py_ssize_t __pyx_t_9; Py_UCS4 __pyx_t_10; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 650, 0, __PYX_ERR(0, 650, __pyx_L1_error)); - /* "lxml/etree.pyx":651 + /* "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 */ - __Pyx_TraceLine(651,0,__PYX_ERR(0, 651, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_9_Document_getdoctype(__pyx_v_self->_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L1_error) + __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); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; @@ -54750,7 +51728,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 651, __pyx_L1_error) + __PYX_ERR(0, 649, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -54766,17 +51744,17 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 651, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 651, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 651, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 651, __pyx_L1_error) + __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; @@ -54786,7 +51764,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob __Pyx_GOTREF(__pyx_t_3); index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 651, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 649, __pyx_L1_error) __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_unpacking_done; @@ -54794,7 +51772,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 651, __pyx_L1_error) + __PYX_ERR(0, 649, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_root_name = __pyx_t_2; @@ -54804,63 +51782,60 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob __pyx_v_system_url = __pyx_t_4; __pyx_t_4 = 0; - /* "lxml/etree.pyx":652 + /* "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 */ - __Pyx_TraceLine(652,0,__PYX_ERR(0, 652, __pyx_L1_error)) - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_system_url); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 652, __pyx_L1_error) + __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":657 + /* "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: */ - __Pyx_TraceLine(657,0,__PYX_ERR(0, 657, __pyx_L1_error)) - __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s__61, __pyx_v_system_url, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 657, __pyx_L1_error) + __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":658 + /* "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}"' */ - __Pyx_TraceLine(658,0,__PYX_ERR(0, 658, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = 0; __pyx_t_10 = 127; - __Pyx_INCREF(__pyx_kp_u__60); + __Pyx_INCREF(__pyx_kp_u__21); __pyx_t_9 += 1; - __Pyx_GIVEREF(__pyx_kp_u__60); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__60); - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_system_url, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 658, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__21); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__21); + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_system_url, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_10; __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); __pyx_t_4 = 0; - __Pyx_INCREF(__pyx_kp_u__60); + __Pyx_INCREF(__pyx_kp_u__21); __pyx_t_9 += 1; - __Pyx_GIVEREF(__pyx_kp_u__60); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__60); - __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 658, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__21); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__21); + __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_quoted_system_url = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":657 + /* "lxml/etree.pyx":655 * # contains both a single quote and a double quote, XML * # standard is being violated. * if '"' in system_url: # <<<<<<<<<<<<<< @@ -54870,35 +51845,34 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob goto __pyx_L6; } - /* "lxml/etree.pyx":660 + /* "lxml/etree.pyx":658 * quoted_system_url = f"'{system_url}'" * else: * quoted_system_url = f'"{system_url}"' # <<<<<<<<<<<<<< * if public_id: * if system_url: */ - __Pyx_TraceLine(660,0,__PYX_ERR(0, 660, __pyx_L1_error)) /*else*/ { - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 660, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = 0; __pyx_t_10 = 127; - __Pyx_INCREF(__pyx_kp_u__61); + __Pyx_INCREF(__pyx_kp_u__22); __pyx_t_9 += 1; - __Pyx_GIVEREF(__pyx_kp_u__61); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u__61); - __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_system_url, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__22); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u__22); + __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_system_url, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_10; __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_1 = 0; - __Pyx_INCREF(__pyx_kp_u__61); + __Pyx_INCREF(__pyx_kp_u__22); __pyx_t_9 += 1; - __Pyx_GIVEREF(__pyx_kp_u__61); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__61); - __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__22); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__22); + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_quoted_system_url = ((PyObject*)__pyx_t_1); @@ -54906,7 +51880,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob } __pyx_L6:; - /* "lxml/etree.pyx":652 + /* "lxml/etree.pyx":650 * def __get__(self): * root_name, public_id, system_url = self._doc.getdoctype() * if system_url: # <<<<<<<<<<<<<< @@ -54915,38 +51889,35 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob */ } - /* "lxml/etree.pyx":661 + /* "lxml/etree.pyx":659 * else: * quoted_system_url = f'"{system_url}"' * if public_id: # <<<<<<<<<<<<<< * if system_url: * return f'' */ - __Pyx_TraceLine(661,0,__PYX_ERR(0, 661, __pyx_L1_error)) - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_public_id); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 661, __pyx_L1_error) + __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":662 + /* "lxml/etree.pyx":660 * quoted_system_url = f'"{system_url}"' * if public_id: * if system_url: # <<<<<<<<<<<<<< * return f'' * else: */ - __Pyx_TraceLine(662,0,__PYX_ERR(0, 662, __pyx_L1_error)) - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_system_url); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 662, __pyx_L1_error) + __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":663 + /* "lxml/etree.pyx":661 * if public_id: * if system_url: * return f'' # <<<<<<<<<<<<<< * else: * return f'' */ - __Pyx_TraceLine(663,0,__PYX_ERR(0, 663, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = 0; __pyx_t_10 = 127; @@ -54954,7 +51925,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob __pyx_t_9 += 10; __Pyx_GIVEREF(__pyx_kp_u_DOCTYPE); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_DOCTYPE); - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_root_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_root_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_10; __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); @@ -54965,35 +51936,35 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob __pyx_t_9 += 9; __Pyx_GIVEREF(__pyx_kp_u_PUBLIC); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_PUBLIC); - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_public_id, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_public_id, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_10; __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4); __pyx_t_4 = 0; - __Pyx_INCREF(__pyx_kp_u__63); + __Pyx_INCREF(__pyx_kp_u__24); __pyx_t_9 += 2; - __Pyx_GIVEREF(__pyx_kp_u__63); - PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__63); - if (unlikely(!__pyx_v_quoted_system_url)) { __Pyx_RaiseUnboundLocalError("quoted_system_url"); __PYX_ERR(0, 663, __pyx_L1_error) } + __Pyx_GIVEREF(__pyx_kp_u__24); + PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__24); + if (unlikely(!__pyx_v_quoted_system_url)) { __Pyx_RaiseUnboundLocalError("quoted_system_url"); __PYX_ERR(0, 661, __pyx_L1_error) } __Pyx_INCREF(__pyx_v_quoted_system_url); __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_quoted_system_url) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_quoted_system_url) : __pyx_t_10; __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_v_quoted_system_url); __Pyx_GIVEREF(__pyx_v_quoted_system_url); PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_v_quoted_system_url); - __Pyx_INCREF(__pyx_kp_u__64); + __Pyx_INCREF(__pyx_kp_u__25); __pyx_t_9 += 1; - __Pyx_GIVEREF(__pyx_kp_u__64); - PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__64); - __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__25); + PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__25); + __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":662 + /* "lxml/etree.pyx":660 * quoted_system_url = f'"{system_url}"' * if public_id: * if system_url: # <<<<<<<<<<<<<< @@ -55002,17 +51973,16 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob */ } - /* "lxml/etree.pyx":665 + /* "lxml/etree.pyx":663 * return f'' * else: * return f'' # <<<<<<<<<<<<<< * elif system_url: * return f'' */ - __Pyx_TraceLine(665,0,__PYX_ERR(0, 665, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 665, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = 0; __pyx_t_10 = 127; @@ -55020,7 +51990,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob __pyx_t_9 += 10; __Pyx_GIVEREF(__pyx_kp_u_DOCTYPE); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_DOCTYPE); - __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_root_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_root_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_10; __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); @@ -55031,18 +52001,18 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob __pyx_t_9 += 9; __Pyx_GIVEREF(__pyx_kp_u_PUBLIC); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_PUBLIC); - __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_public_id, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_public_id, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_10; __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_1); __pyx_t_1 = 0; - __Pyx_INCREF(__pyx_kp_u__65); + __Pyx_INCREF(__pyx_kp_u__26); __pyx_t_9 += 2; - __Pyx_GIVEREF(__pyx_kp_u__65); - PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_kp_u__65); - __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__26); + PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_kp_u__26); + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_1; @@ -55050,7 +52020,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob goto __pyx_L0; } - /* "lxml/etree.pyx":661 + /* "lxml/etree.pyx":659 * else: * quoted_system_url = f'"{system_url}"' * if public_id: # <<<<<<<<<<<<<< @@ -55059,27 +52029,25 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob */ } - /* "lxml/etree.pyx":666 + /* "lxml/etree.pyx":664 * else: * return f'' * elif system_url: # <<<<<<<<<<<<<< * return f'' * elif self._doc.hasdoctype(): */ - __Pyx_TraceLine(666,0,__PYX_ERR(0, 666, __pyx_L1_error)) - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_system_url); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 666, __pyx_L1_error) + __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":667 + /* "lxml/etree.pyx":665 * return f'' * elif system_url: * return f'' # <<<<<<<<<<<<<< * elif self._doc.hasdoctype(): * return f'' */ - __Pyx_TraceLine(667,0,__PYX_ERR(0, 667, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = 0; __pyx_t_10 = 127; @@ -55087,7 +52055,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob __pyx_t_9 += 10; __Pyx_GIVEREF(__pyx_kp_u_DOCTYPE); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_DOCTYPE); - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_root_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 667, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_root_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_10; __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); @@ -55098,24 +52066,24 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob __pyx_t_9 += 8; __Pyx_GIVEREF(__pyx_kp_u_SYSTEM); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_SYSTEM); - if (unlikely(!__pyx_v_quoted_system_url)) { __Pyx_RaiseUnboundLocalError("quoted_system_url"); __PYX_ERR(0, 667, __pyx_L1_error) } + if (unlikely(!__pyx_v_quoted_system_url)) { __Pyx_RaiseUnboundLocalError("quoted_system_url"); __PYX_ERR(0, 665, __pyx_L1_error) } __Pyx_INCREF(__pyx_v_quoted_system_url); __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_quoted_system_url) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_quoted_system_url) : __pyx_t_10; __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_v_quoted_system_url); __Pyx_GIVEREF(__pyx_v_quoted_system_url); PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_quoted_system_url); - __Pyx_INCREF(__pyx_kp_u__64); + __Pyx_INCREF(__pyx_kp_u__25); __pyx_t_9 += 1; - __Pyx_GIVEREF(__pyx_kp_u__64); - PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__64); - __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 667, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__25); + PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__25); + __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":666 + /* "lxml/etree.pyx":664 * else: * return f'' * elif system_url: # <<<<<<<<<<<<<< @@ -55124,27 +52092,25 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob */ } - /* "lxml/etree.pyx":668 + /* "lxml/etree.pyx":666 * elif system_url: * return f'' * elif self._doc.hasdoctype(): # <<<<<<<<<<<<<< * return f'' * else: */ - __Pyx_TraceLine(668,0,__PYX_ERR(0, 668, __pyx_L1_error)) __pyx_t_8 = (__pyx_f_4lxml_5etree_9_Document_hasdoctype(__pyx_v_self->_doc) != 0); if (__pyx_t_8) { - /* "lxml/etree.pyx":669 + /* "lxml/etree.pyx":667 * return f'' * elif self._doc.hasdoctype(): * return f'' # <<<<<<<<<<<<<< * else: * return u'' */ - __Pyx_TraceLine(669,0,__PYX_ERR(0, 669, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 669, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = 0; __pyx_t_10 = 127; @@ -55152,25 +52118,25 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob __pyx_t_9 += 10; __Pyx_GIVEREF(__pyx_kp_u_DOCTYPE); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_DOCTYPE); - __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_root_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_root_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_10; __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_1 = 0; - __Pyx_INCREF(__pyx_kp_u__64); + __Pyx_INCREF(__pyx_kp_u__25); __pyx_t_9 += 1; - __Pyx_GIVEREF(__pyx_kp_u__64); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__64); - __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__25); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__25); + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __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":668 + /* "lxml/etree.pyx":666 * elif system_url: * return f'' * elif self._doc.hasdoctype(): # <<<<<<<<<<<<<< @@ -55179,22 +52145,21 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob */ } - /* "lxml/etree.pyx":671 + /* "lxml/etree.pyx":669 * return f'' * else: * return u'' # <<<<<<<<<<<<<< * * property internalDTD: */ - __Pyx_TraceLine(671,0,__PYX_ERR(0, 671, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_kp_u__23); - __pyx_r = __pyx_kp_u__23; + __Pyx_INCREF(__pyx_kp_u__11); + __pyx_r = __pyx_kp_u__11; goto __pyx_L0; } - /* "lxml/etree.pyx":650 + /* "lxml/etree.pyx":648 * property doctype: * u"Returns a DOCTYPE declaration string for the document." * def __get__(self): # <<<<<<<<<<<<<< @@ -55217,12 +52182,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob __Pyx_XDECREF(__pyx_v_system_url); __Pyx_XDECREF(__pyx_v_quoted_system_url); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":675 +/* "lxml/etree.pyx":673 * property internalDTD: * u"Returns a DTD validator based on the internal subset of the document." * def __get__(self): # <<<<<<<<<<<<<< @@ -55245,28 +52209,25 @@ static PyObject *__pyx_pw_4lxml_5etree_7DocInfo_11internalDTD_1__get__(PyObject static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_11internalDTD___get__(struct __pyx_obj_4lxml_5etree_DocInfo *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 675, 0, __PYX_ERR(0, 675, __pyx_L1_error)); - /* "lxml/etree.pyx":676 + /* "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) # <<<<<<<<<<<<<< * * property externalDTD: */ - __Pyx_TraceLine(676,0,__PYX_ERR(0, 676, __pyx_L1_error)) __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, 676, __pyx_L1_error) + __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) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":675 + /* "lxml/etree.pyx":673 * property internalDTD: * u"Returns a DTD validator based on the internal subset of the document." * def __get__(self): # <<<<<<<<<<<<<< @@ -55281,12 +52242,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_11internalDTD___get__(struct __p __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":680 +/* "lxml/etree.pyx":678 * property externalDTD: * u"Returns a DTD validator based on the external subset of the document." * def __get__(self): # <<<<<<<<<<<<<< @@ -55309,28 +52269,25 @@ static PyObject *__pyx_pw_4lxml_5etree_7DocInfo_11externalDTD_1__get__(PyObject static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_11externalDTD___get__(struct __pyx_obj_4lxml_5etree_DocInfo *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 680, 0, __PYX_ERR(0, 680, __pyx_L1_error)); - /* "lxml/etree.pyx":681 + /* "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) # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(681,0,__PYX_ERR(0, 681, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__dtdFactory(__pyx_v_self->_doc->_c_doc->extSubset)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__dtdFactory(__pyx_v_self->_doc->_c_doc->extSubset)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":680 + /* "lxml/etree.pyx":678 * property externalDTD: * u"Returns a DTD validator based on the external subset of the document." * def __get__(self): # <<<<<<<<<<<<<< @@ -55345,12 +52302,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_11externalDTD___get__(struct __p __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":697 +/* "lxml/etree.pyx":695 * cdef object _tag * * def _init(self): # <<<<<<<<<<<<<< @@ -55375,26 +52331,17 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_1_init(PyObject *__pyx_v_self, static PyObject *__pyx_pf_4lxml_5etree_8_Element__init(CYTHON_UNUSED struct LxmlElement *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - __Pyx_TraceFrameInit(__pyx_codeobj__66) __Pyx_RefNannySetupContext("_init", 0); - __Pyx_TraceCall("_init", __pyx_f[0], 697, 0, __PYX_ERR(0, 697, __pyx_L1_error)); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._Element._init", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":704 +/* "lxml/etree.pyx":702 * """ * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -55414,45 +52361,40 @@ static void __pyx_pw_4lxml_5etree_8_Element_3__dealloc__(PyObject *__pyx_v_self) } static void __pyx_pf_4lxml_5etree_8_Element_2__dealloc__(struct LxmlElement *__pyx_v_self) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("__dealloc__", 0); - __Pyx_TraceCall("__dealloc__", __pyx_f[0], 704, 0, __PYX_ERR(0, 704, __pyx_L1_error)); - /* "lxml/etree.pyx":707 + /* "lxml/etree.pyx":705 * #print "trying to free node:", self._c_node * #displayNode(self._c_node, 0) * if self._c_node is not NULL: # <<<<<<<<<<<<<< * _unregisterProxy(self) * attemptDeallocation(self._c_node) */ - __Pyx_TraceLine(707,0,__PYX_ERR(0, 707, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_c_node != NULL) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":708 + /* "lxml/etree.pyx":706 * #displayNode(self._c_node, 0) * if self._c_node is not NULL: * _unregisterProxy(self) # <<<<<<<<<<<<<< * attemptDeallocation(self._c_node) * */ - __Pyx_TraceLine(708,0,__PYX_ERR(0, 708, __pyx_L1_error)) - __pyx_t_2 = __pyx_f_4lxml_5etree__unregisterProxy(__pyx_v_self); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 708, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__unregisterProxy(__pyx_v_self); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 706, __pyx_L1_error) - /* "lxml/etree.pyx":709 + /* "lxml/etree.pyx":707 * if self._c_node is not NULL: * _unregisterProxy(self) * attemptDeallocation(self._c_node) # <<<<<<<<<<<<<< * * # MANIPULATORS */ - __Pyx_TraceLine(709,0,__PYX_ERR(0, 709, __pyx_L1_error)) (void)(__pyx_f_4lxml_5etree_attemptDeallocation(__pyx_v_self->_c_node)); - /* "lxml/etree.pyx":707 + /* "lxml/etree.pyx":705 * #print "trying to free node:", self._c_node * #displayNode(self._c_node, 0) * if self._c_node is not NULL: # <<<<<<<<<<<<<< @@ -55461,7 +52403,7 @@ static void __pyx_pf_4lxml_5etree_8_Element_2__dealloc__(struct LxmlElement *__p */ } - /* "lxml/etree.pyx":704 + /* "lxml/etree.pyx":702 * """ * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -55474,11 +52416,10 @@ static void __pyx_pf_4lxml_5etree_8_Element_2__dealloc__(struct LxmlElement *__p __pyx_L1_error:; __Pyx_WriteUnraisable("lxml.etree._Element.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } -/* "lxml/etree.pyx":713 +/* "lxml/etree.pyx":711 * # MANIPULATORS * * def __setitem__(self, x, value): # <<<<<<<<<<<<<< @@ -55512,7 +52453,6 @@ static int __pyx_pf_4lxml_5etree_8_Element_4__setitem__(struct LxmlElement *__py Py_ssize_t __pyx_v_slicelength; Py_ssize_t __pyx_v_step; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -55522,63 +52462,57 @@ static int __pyx_pf_4lxml_5etree_8_Element_4__setitem__(struct LxmlElement *__py xmlDoc *__pyx_t_6; xmlNode *__pyx_t_7; __Pyx_RefNannySetupContext("__setitem__", 0); - __Pyx_TraceCall("__setitem__", __pyx_f[0], 713, 0, __PYX_ERR(0, 713, __pyx_L1_error)); - /* "lxml/etree.pyx":718 + /* "lxml/etree.pyx":716 * Replaces the given subelement index or slice. * """ * cdef xmlNode* c_node = NULL # <<<<<<<<<<<<<< * cdef xmlNode* c_next * cdef xmlDoc* c_source_doc */ - __Pyx_TraceLine(718,0,__PYX_ERR(0, 718, __pyx_L1_error)) __pyx_v_c_node = NULL; - /* "lxml/etree.pyx":723 + /* "lxml/etree.pyx":721 * cdef _Element element * cdef bint left_to_right * cdef Py_ssize_t slicelength = 0, step = 0 # <<<<<<<<<<<<<< * _assertValidNode(self) * if value is None: */ - __Pyx_TraceLine(723,0,__PYX_ERR(0, 723, __pyx_L1_error)) __pyx_v_slicelength = 0; __pyx_v_step = 0; - /* "lxml/etree.pyx":724 + /* "lxml/etree.pyx":722 * cdef bint left_to_right * cdef Py_ssize_t slicelength = 0, step = 0 * _assertValidNode(self) # <<<<<<<<<<<<<< * if value is None: * raise ValueError, u"cannot assign None" */ - __Pyx_TraceLine(724,0,__PYX_ERR(0, 724, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 724, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 722, __pyx_L1_error) - /* "lxml/etree.pyx":725 + /* "lxml/etree.pyx":723 * cdef Py_ssize_t slicelength = 0, step = 0 * _assertValidNode(self) * if value is None: # <<<<<<<<<<<<<< * raise ValueError, u"cannot assign None" * if isinstance(x, slice): */ - __Pyx_TraceLine(725,0,__PYX_ERR(0, 725, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_value == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_3)) { - /* "lxml/etree.pyx":726 + /* "lxml/etree.pyx":724 * _assertValidNode(self) * if value is None: * raise ValueError, u"cannot assign None" # <<<<<<<<<<<<<< * if isinstance(x, slice): * # slice assignment */ - __Pyx_TraceLine(726,0,__PYX_ERR(0, 726, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_cannot_assign_None, 0, 0); - __PYX_ERR(0, 726, __pyx_L1_error) + __PYX_ERR(0, 724, __pyx_L1_error) - /* "lxml/etree.pyx":725 + /* "lxml/etree.pyx":723 * cdef Py_ssize_t slicelength = 0, step = 0 * _assertValidNode(self) * if value is None: # <<<<<<<<<<<<<< @@ -55587,50 +52521,46 @@ static int __pyx_pf_4lxml_5etree_8_Element_4__setitem__(struct LxmlElement *__py */ } - /* "lxml/etree.pyx":727 + /* "lxml/etree.pyx":725 * if value is None: * raise ValueError, u"cannot assign None" * if isinstance(x, slice): # <<<<<<<<<<<<<< * # slice assignment * _findChildSlice(x, self._c_node, &c_node, &step, &slicelength) */ - __Pyx_TraceLine(727,0,__PYX_ERR(0, 727, __pyx_L1_error)) __pyx_t_3 = PySlice_Check(__pyx_v_x); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":729 + /* "lxml/etree.pyx":727 * if isinstance(x, slice): * # slice assignment * _findChildSlice(x, self._c_node, &c_node, &step, &slicelength) # <<<<<<<<<<<<<< * if step > 0: * left_to_right = 1 */ - __Pyx_TraceLine(729,0,__PYX_ERR(0, 729, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__findChildSlice(((PyObject*)__pyx_v_x), __pyx_v_self->_c_node, (&__pyx_v_c_node), (&__pyx_v_step), (&__pyx_v_slicelength)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 729, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__findChildSlice(((PyObject*)__pyx_v_x), __pyx_v_self->_c_node, (&__pyx_v_c_node), (&__pyx_v_step), (&__pyx_v_slicelength)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 727, __pyx_L1_error) - /* "lxml/etree.pyx":730 + /* "lxml/etree.pyx":728 * # slice assignment * _findChildSlice(x, self._c_node, &c_node, &step, &slicelength) * if step > 0: # <<<<<<<<<<<<<< * left_to_right = 1 * else: */ - __Pyx_TraceLine(730,0,__PYX_ERR(0, 730, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_step > 0) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":731 + /* "lxml/etree.pyx":729 * _findChildSlice(x, self._c_node, &c_node, &step, &slicelength) * if step > 0: * left_to_right = 1 # <<<<<<<<<<<<<< * else: * left_to_right = 0 */ - __Pyx_TraceLine(731,0,__PYX_ERR(0, 731, __pyx_L1_error)) __pyx_v_left_to_right = 1; - /* "lxml/etree.pyx":730 + /* "lxml/etree.pyx":728 * # slice assignment * _findChildSlice(x, self._c_node, &c_node, &step, &slicelength) * if step > 0: # <<<<<<<<<<<<<< @@ -55640,51 +52570,47 @@ static int __pyx_pf_4lxml_5etree_8_Element_4__setitem__(struct LxmlElement *__py goto __pyx_L5; } - /* "lxml/etree.pyx":733 + /* "lxml/etree.pyx":731 * left_to_right = 1 * else: * left_to_right = 0 # <<<<<<<<<<<<<< * step = -step * _replaceSlice(self, c_node, slicelength, step, left_to_right, value) */ - __Pyx_TraceLine(733,0,__PYX_ERR(0, 733, __pyx_L1_error)) /*else*/ { __pyx_v_left_to_right = 0; - /* "lxml/etree.pyx":734 + /* "lxml/etree.pyx":732 * else: * left_to_right = 0 * step = -step # <<<<<<<<<<<<<< * _replaceSlice(self, c_node, slicelength, step, left_to_right, value) * return */ - __Pyx_TraceLine(734,0,__PYX_ERR(0, 734, __pyx_L1_error)) __pyx_v_step = (-__pyx_v_step); } __pyx_L5:; - /* "lxml/etree.pyx":735 + /* "lxml/etree.pyx":733 * left_to_right = 0 * step = -step * _replaceSlice(self, c_node, slicelength, step, left_to_right, value) # <<<<<<<<<<<<<< * return * else: */ - __Pyx_TraceLine(735,0,__PYX_ERR(0, 735, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__replaceSlice(__pyx_v_self, __pyx_v_c_node, __pyx_v_slicelength, __pyx_v_step, __pyx_v_left_to_right, __pyx_v_value); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 735, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__replaceSlice(__pyx_v_self, __pyx_v_c_node, __pyx_v_slicelength, __pyx_v_step, __pyx_v_left_to_right, __pyx_v_value); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 733, __pyx_L1_error) - /* "lxml/etree.pyx":736 + /* "lxml/etree.pyx":734 * step = -step * _replaceSlice(self, c_node, slicelength, step, left_to_right, value) * return # <<<<<<<<<<<<<< * else: * # otherwise: normal item assignment */ - __Pyx_TraceLine(736,0,__PYX_ERR(0, 736, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":727 + /* "lxml/etree.pyx":725 * if value is None: * raise ValueError, u"cannot assign None" * if isinstance(x, slice): # <<<<<<<<<<<<<< @@ -55693,65 +52619,60 @@ static int __pyx_pf_4lxml_5etree_8_Element_4__setitem__(struct LxmlElement *__py */ } - /* "lxml/etree.pyx":739 + /* "lxml/etree.pyx":737 * else: * # otherwise: normal item assignment * element = value # <<<<<<<<<<<<<< * _assertValidNode(element) * c_node = _findChild(self._c_node, x) */ - __Pyx_TraceLine(739,0,__PYX_ERR(0, 739, __pyx_L1_error)) /*else*/ { - if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(0, 739, __pyx_L1_error) + if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(0, 737, __pyx_L1_error) __pyx_t_4 = __pyx_v_value; __Pyx_INCREF(__pyx_t_4); __pyx_v_element = ((struct LxmlElement *)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":740 + /* "lxml/etree.pyx":738 * # otherwise: normal item assignment * element = value * _assertValidNode(element) # <<<<<<<<<<<<<< * c_node = _findChild(self._c_node, x) * if c_node is NULL: */ - __Pyx_TraceLine(740,0,__PYX_ERR(0, 740, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 740, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 738, __pyx_L1_error) - /* "lxml/etree.pyx":741 + /* "lxml/etree.pyx":739 * element = value * _assertValidNode(element) * c_node = _findChild(self._c_node, x) # <<<<<<<<<<<<<< * if c_node is NULL: * raise IndexError, u"list index out of range" */ - __Pyx_TraceLine(741,0,__PYX_ERR(0, 741, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_x); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 741, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_x); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 739, __pyx_L1_error) __pyx_v_c_node = __pyx_f_4lxml_5etree__findChild(__pyx_v_self->_c_node, __pyx_t_5); - /* "lxml/etree.pyx":742 + /* "lxml/etree.pyx":740 * _assertValidNode(element) * c_node = _findChild(self._c_node, x) * if c_node is NULL: # <<<<<<<<<<<<<< * raise IndexError, u"list index out of range" * c_source_doc = element._c_node.doc */ - __Pyx_TraceLine(742,0,__PYX_ERR(0, 742, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node == NULL) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":743 + /* "lxml/etree.pyx":741 * c_node = _findChild(self._c_node, x) * if c_node is NULL: * raise IndexError, u"list index out of range" # <<<<<<<<<<<<<< * c_source_doc = element._c_node.doc * c_next = element._c_node.next */ - __Pyx_TraceLine(743,0,__PYX_ERR(0, 743, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_IndexError, __pyx_kp_u_list_index_out_of_range, 0, 0); - __PYX_ERR(0, 743, __pyx_L1_error) + __PYX_ERR(0, 741, __pyx_L1_error) - /* "lxml/etree.pyx":742 + /* "lxml/etree.pyx":740 * _assertValidNode(element) * c_node = _findChild(self._c_node, x) * if c_node is NULL: # <<<<<<<<<<<<<< @@ -55760,96 +52681,88 @@ static int __pyx_pf_4lxml_5etree_8_Element_4__setitem__(struct LxmlElement *__py */ } - /* "lxml/etree.pyx":744 + /* "lxml/etree.pyx":742 * if c_node is NULL: * raise IndexError, u"list index out of range" * c_source_doc = element._c_node.doc # <<<<<<<<<<<<<< * c_next = element._c_node.next * _removeText(c_node.next) */ - __Pyx_TraceLine(744,0,__PYX_ERR(0, 744, __pyx_L1_error)) __pyx_t_6 = __pyx_v_element->_c_node->doc; __pyx_v_c_source_doc = __pyx_t_6; - /* "lxml/etree.pyx":745 + /* "lxml/etree.pyx":743 * raise IndexError, u"list index out of range" * c_source_doc = element._c_node.doc * c_next = element._c_node.next # <<<<<<<<<<<<<< * _removeText(c_node.next) * tree.xmlReplaceNode(c_node, element._c_node) */ - __Pyx_TraceLine(745,0,__PYX_ERR(0, 745, __pyx_L1_error)) __pyx_t_7 = __pyx_v_element->_c_node->next; __pyx_v_c_next = __pyx_t_7; - /* "lxml/etree.pyx":746 + /* "lxml/etree.pyx":744 * c_source_doc = element._c_node.doc * c_next = element._c_node.next * _removeText(c_node.next) # <<<<<<<<<<<<<< * tree.xmlReplaceNode(c_node, element._c_node) * _moveTail(c_next, element._c_node) */ - __Pyx_TraceLine(746,0,__PYX_ERR(0, 746, __pyx_L1_error)) __pyx_f_4lxml_5etree__removeText(__pyx_v_c_node->next); - /* "lxml/etree.pyx":747 + /* "lxml/etree.pyx":745 * c_next = element._c_node.next * _removeText(c_node.next) * tree.xmlReplaceNode(c_node, element._c_node) # <<<<<<<<<<<<<< * _moveTail(c_next, element._c_node) * moveNodeToDocument(self._doc, c_source_doc, element._c_node) */ - __Pyx_TraceLine(747,0,__PYX_ERR(0, 747, __pyx_L1_error)) (void)(xmlReplaceNode(__pyx_v_c_node, __pyx_v_element->_c_node)); - /* "lxml/etree.pyx":748 + /* "lxml/etree.pyx":746 * _removeText(c_node.next) * tree.xmlReplaceNode(c_node, element._c_node) * _moveTail(c_next, element._c_node) # <<<<<<<<<<<<<< * moveNodeToDocument(self._doc, c_source_doc, element._c_node) * if not attemptDeallocation(c_node): */ - __Pyx_TraceLine(748,0,__PYX_ERR(0, 748, __pyx_L1_error)) __pyx_f_4lxml_5etree__moveTail(__pyx_v_c_next, __pyx_v_element->_c_node); - /* "lxml/etree.pyx":749 + /* "lxml/etree.pyx":747 * tree.xmlReplaceNode(c_node, element._c_node) * _moveTail(c_next, element._c_node) * moveNodeToDocument(self._doc, c_source_doc, element._c_node) # <<<<<<<<<<<<<< * if not attemptDeallocation(c_node): * moveNodeToDocument(self._doc, c_node.doc, c_node) */ - __Pyx_TraceLine(749,0,__PYX_ERR(0, 749, __pyx_L1_error)) __pyx_t_4 = ((PyObject *)__pyx_v_self->_doc); __Pyx_INCREF(__pyx_t_4); - __pyx_t_1 = __pyx_f_4lxml_5etree_moveNodeToDocument(((struct LxmlDocument *)__pyx_t_4), __pyx_v_c_source_doc, __pyx_v_element->_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 749, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_moveNodeToDocument(((struct LxmlDocument *)__pyx_t_4), __pyx_v_c_source_doc, __pyx_v_element->_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":750 + /* "lxml/etree.pyx":748 * _moveTail(c_next, element._c_node) * moveNodeToDocument(self._doc, c_source_doc, element._c_node) * if not attemptDeallocation(c_node): # <<<<<<<<<<<<<< * moveNodeToDocument(self._doc, c_node.doc, c_node) * */ - __Pyx_TraceLine(750,0,__PYX_ERR(0, 750, __pyx_L1_error)) __pyx_t_2 = ((!(__pyx_f_4lxml_5etree_attemptDeallocation(__pyx_v_c_node) != 0)) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":751 + /* "lxml/etree.pyx":749 * moveNodeToDocument(self._doc, c_source_doc, element._c_node) * if not attemptDeallocation(c_node): * moveNodeToDocument(self._doc, c_node.doc, c_node) # <<<<<<<<<<<<<< * * def __delitem__(self, x): */ - __Pyx_TraceLine(751,0,__PYX_ERR(0, 751, __pyx_L1_error)) __pyx_t_4 = ((PyObject *)__pyx_v_self->_doc); __Pyx_INCREF(__pyx_t_4); - __pyx_t_1 = __pyx_f_4lxml_5etree_moveNodeToDocument(((struct LxmlDocument *)__pyx_t_4), __pyx_v_c_node->doc, __pyx_v_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 751, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_moveNodeToDocument(((struct LxmlDocument *)__pyx_t_4), __pyx_v_c_node->doc, __pyx_v_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 749, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":750 + /* "lxml/etree.pyx":748 * _moveTail(c_next, element._c_node) * moveNodeToDocument(self._doc, c_source_doc, element._c_node) * if not attemptDeallocation(c_node): # <<<<<<<<<<<<<< @@ -55859,7 +52772,7 @@ static int __pyx_pf_4lxml_5etree_8_Element_4__setitem__(struct LxmlElement *__py } } - /* "lxml/etree.pyx":713 + /* "lxml/etree.pyx":711 * # MANIPULATORS * * def __setitem__(self, x, value): # <<<<<<<<<<<<<< @@ -55876,12 +52789,11 @@ static int __pyx_pf_4lxml_5etree_8_Element_4__setitem__(struct LxmlElement *__py __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_element); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":753 +/* "lxml/etree.pyx":751 * moveNodeToDocument(self._doc, c_node.doc, c_node) * * def __delitem__(self, x): # <<<<<<<<<<<<<< @@ -55912,7 +52824,6 @@ static int __pyx_pf_4lxml_5etree_8_Element_6__delitem__(struct LxmlElement *__py Py_ssize_t __pyx_v_step; Py_ssize_t __pyx_v_slicelength; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -55922,107 +52833,97 @@ static int __pyx_pf_4lxml_5etree_8_Element_6__delitem__(struct LxmlElement *__py Py_ssize_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__delitem__", 0); - __Pyx_TraceCall("__delitem__", __pyx_f[0], 753, 0, __PYX_ERR(0, 753, __pyx_L1_error)); - /* "lxml/etree.pyx":758 + /* "lxml/etree.pyx":756 * Deletes the given subelement or a slice. * """ * cdef xmlNode* c_node = NULL # <<<<<<<<<<<<<< * cdef xmlNode* c_next * cdef Py_ssize_t step = 0, slicelength = 0 */ - __Pyx_TraceLine(758,0,__PYX_ERR(0, 758, __pyx_L1_error)) __pyx_v_c_node = NULL; - /* "lxml/etree.pyx":760 + /* "lxml/etree.pyx":758 * cdef xmlNode* c_node = NULL * cdef xmlNode* c_next * cdef Py_ssize_t step = 0, slicelength = 0 # <<<<<<<<<<<<<< * _assertValidNode(self) * if isinstance(x, slice): */ - __Pyx_TraceLine(760,0,__PYX_ERR(0, 760, __pyx_L1_error)) __pyx_v_step = 0; __pyx_v_slicelength = 0; - /* "lxml/etree.pyx":761 + /* "lxml/etree.pyx":759 * cdef xmlNode* c_next * cdef Py_ssize_t step = 0, slicelength = 0 * _assertValidNode(self) # <<<<<<<<<<<<<< * if isinstance(x, slice): * # slice deletion */ - __Pyx_TraceLine(761,0,__PYX_ERR(0, 761, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 761, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 759, __pyx_L1_error) - /* "lxml/etree.pyx":762 + /* "lxml/etree.pyx":760 * cdef Py_ssize_t step = 0, slicelength = 0 * _assertValidNode(self) * if isinstance(x, slice): # <<<<<<<<<<<<<< * # slice deletion * if _isFullSlice(x): */ - __Pyx_TraceLine(762,0,__PYX_ERR(0, 762, __pyx_L1_error)) __pyx_t_2 = PySlice_Check(__pyx_v_x); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":764 + /* "lxml/etree.pyx":762 * if isinstance(x, slice): * # slice deletion * if _isFullSlice(x): # <<<<<<<<<<<<<< * c_node = self._c_node.children * if c_node is not NULL: */ - __Pyx_TraceLine(764,0,__PYX_ERR(0, 764, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree__isFullSlice(((PyObject*)__pyx_v_x)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 764, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__isFullSlice(((PyObject*)__pyx_v_x)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 762, __pyx_L1_error) __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":765 + /* "lxml/etree.pyx":763 * # slice deletion * if _isFullSlice(x): * c_node = self._c_node.children # <<<<<<<<<<<<<< * if c_node is not NULL: * if not _isElement(c_node): */ - __Pyx_TraceLine(765,0,__PYX_ERR(0, 765, __pyx_L1_error)) __pyx_t_4 = __pyx_v_self->_c_node->children; __pyx_v_c_node = __pyx_t_4; - /* "lxml/etree.pyx":766 + /* "lxml/etree.pyx":764 * if _isFullSlice(x): * c_node = self._c_node.children * if c_node is not NULL: # <<<<<<<<<<<<<< * if not _isElement(c_node): * c_node = _nextElement(c_node) */ - __Pyx_TraceLine(766,0,__PYX_ERR(0, 766, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node != NULL) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":767 + /* "lxml/etree.pyx":765 * c_node = self._c_node.children * if c_node is not NULL: * if not _isElement(c_node): # <<<<<<<<<<<<<< * c_node = _nextElement(c_node) * while c_node is not NULL: */ - __Pyx_TraceLine(767,0,__PYX_ERR(0, 767, __pyx_L1_error)) __pyx_t_2 = ((!(_isElement(__pyx_v_c_node) != 0)) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":768 + /* "lxml/etree.pyx":766 * if c_node is not NULL: * if not _isElement(c_node): * c_node = _nextElement(c_node) # <<<<<<<<<<<<<< * while c_node is not NULL: * c_next = _nextElement(c_node) */ - __Pyx_TraceLine(768,0,__PYX_ERR(0, 768, __pyx_L1_error)) __pyx_v_c_node = __pyx_f_4lxml_5etree__nextElement(__pyx_v_c_node); - /* "lxml/etree.pyx":767 + /* "lxml/etree.pyx":765 * c_node = self._c_node.children * if c_node is not NULL: * if not _isElement(c_node): # <<<<<<<<<<<<<< @@ -56031,53 +52932,49 @@ static int __pyx_pf_4lxml_5etree_8_Element_6__delitem__(struct LxmlElement *__py */ } - /* "lxml/etree.pyx":769 + /* "lxml/etree.pyx":767 * if not _isElement(c_node): * c_node = _nextElement(c_node) * while c_node is not NULL: # <<<<<<<<<<<<<< * c_next = _nextElement(c_node) * _removeNode(self._doc, c_node) */ - __Pyx_TraceLine(769,0,__PYX_ERR(0, 769, __pyx_L1_error)) while (1) { __pyx_t_2 = ((__pyx_v_c_node != NULL) != 0); if (!__pyx_t_2) break; - /* "lxml/etree.pyx":770 + /* "lxml/etree.pyx":768 * c_node = _nextElement(c_node) * while c_node is not NULL: * c_next = _nextElement(c_node) # <<<<<<<<<<<<<< * _removeNode(self._doc, c_node) * c_node = c_next */ - __Pyx_TraceLine(770,0,__PYX_ERR(0, 770, __pyx_L1_error)) __pyx_v_c_next = __pyx_f_4lxml_5etree__nextElement(__pyx_v_c_node); - /* "lxml/etree.pyx":771 + /* "lxml/etree.pyx":769 * while c_node is not NULL: * c_next = _nextElement(c_node) * _removeNode(self._doc, c_node) # <<<<<<<<<<<<<< * c_node = c_next * else: */ - __Pyx_TraceLine(771,0,__PYX_ERR(0, 771, __pyx_L1_error)) __pyx_t_5 = ((PyObject *)__pyx_v_self->_doc); __Pyx_INCREF(__pyx_t_5); - __pyx_t_1 = __pyx_f_4lxml_5etree__removeNode(((struct LxmlDocument *)__pyx_t_5), __pyx_v_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 771, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__removeNode(((struct LxmlDocument *)__pyx_t_5), __pyx_v_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 769, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/etree.pyx":772 + /* "lxml/etree.pyx":770 * c_next = _nextElement(c_node) * _removeNode(self._doc, c_node) * c_node = c_next # <<<<<<<<<<<<<< * else: * _findChildSlice(x, self._c_node, &c_node, &step, &slicelength) */ - __Pyx_TraceLine(772,0,__PYX_ERR(0, 772, __pyx_L1_error)) __pyx_v_c_node = __pyx_v_c_next; } - /* "lxml/etree.pyx":766 + /* "lxml/etree.pyx":764 * if _isFullSlice(x): * c_node = self._c_node.children * if c_node is not NULL: # <<<<<<<<<<<<<< @@ -56086,7 +52983,7 @@ static int __pyx_pf_4lxml_5etree_8_Element_6__delitem__(struct LxmlElement *__py */ } - /* "lxml/etree.pyx":764 + /* "lxml/etree.pyx":762 * if isinstance(x, slice): * # slice deletion * if _isFullSlice(x): # <<<<<<<<<<<<<< @@ -56096,33 +52993,31 @@ static int __pyx_pf_4lxml_5etree_8_Element_6__delitem__(struct LxmlElement *__py goto __pyx_L4; } - /* "lxml/etree.pyx":774 + /* "lxml/etree.pyx":772 * c_node = c_next * else: * _findChildSlice(x, self._c_node, &c_node, &step, &slicelength) # <<<<<<<<<<<<<< * _deleteSlice(self._doc, c_node, slicelength, step) * else: */ - __Pyx_TraceLine(774,0,__PYX_ERR(0, 774, __pyx_L1_error)) /*else*/ { - __pyx_t_1 = __pyx_f_4lxml_5etree__findChildSlice(((PyObject*)__pyx_v_x), __pyx_v_self->_c_node, (&__pyx_v_c_node), (&__pyx_v_step), (&__pyx_v_slicelength)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 774, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__findChildSlice(((PyObject*)__pyx_v_x), __pyx_v_self->_c_node, (&__pyx_v_c_node), (&__pyx_v_step), (&__pyx_v_slicelength)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 772, __pyx_L1_error) - /* "lxml/etree.pyx":775 + /* "lxml/etree.pyx":773 * else: * _findChildSlice(x, self._c_node, &c_node, &step, &slicelength) * _deleteSlice(self._doc, c_node, slicelength, step) # <<<<<<<<<<<<<< * else: * # item deletion */ - __Pyx_TraceLine(775,0,__PYX_ERR(0, 775, __pyx_L1_error)) __pyx_t_5 = ((PyObject *)__pyx_v_self->_doc); __Pyx_INCREF(__pyx_t_5); - __pyx_t_1 = __pyx_f_4lxml_5etree__deleteSlice(((struct LxmlDocument *)__pyx_t_5), __pyx_v_c_node, __pyx_v_slicelength, __pyx_v_step); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 775, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__deleteSlice(((struct LxmlDocument *)__pyx_t_5), __pyx_v_c_node, __pyx_v_slicelength, __pyx_v_step); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 773, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_L4:; - /* "lxml/etree.pyx":762 + /* "lxml/etree.pyx":760 * cdef Py_ssize_t step = 0, slicelength = 0 * _assertValidNode(self) * if isinstance(x, slice): # <<<<<<<<<<<<<< @@ -56132,47 +53027,44 @@ static int __pyx_pf_4lxml_5etree_8_Element_6__delitem__(struct LxmlElement *__py goto __pyx_L3; } - /* "lxml/etree.pyx":778 + /* "lxml/etree.pyx":776 * else: * # item deletion * c_node = _findChild(self._c_node, x) # <<<<<<<<<<<<<< * if c_node is NULL: * raise IndexError, f"index out of range: {x}" */ - __Pyx_TraceLine(778,0,__PYX_ERR(0, 778, __pyx_L1_error)) /*else*/ { - __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_x); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 778, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_x); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 776, __pyx_L1_error) __pyx_v_c_node = __pyx_f_4lxml_5etree__findChild(__pyx_v_self->_c_node, __pyx_t_6); - /* "lxml/etree.pyx":779 + /* "lxml/etree.pyx":777 * # item deletion * c_node = _findChild(self._c_node, x) * if c_node is NULL: # <<<<<<<<<<<<<< * raise IndexError, f"index out of range: {x}" * _removeText(c_node.next) */ - __Pyx_TraceLine(779,0,__PYX_ERR(0, 779, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node == NULL) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":780 + /* "lxml/etree.pyx":778 * c_node = _findChild(self._c_node, x) * if c_node is NULL: * raise IndexError, f"index out of range: {x}" # <<<<<<<<<<<<<< * _removeText(c_node.next) * _removeNode(self._doc, c_node) */ - __Pyx_TraceLine(780,0,__PYX_ERR(0, 780, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_x, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 780, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_x, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_index_out_of_range, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 780, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_index_out_of_range, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_7, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 780, __pyx_L1_error) + __PYX_ERR(0, 778, __pyx_L1_error) - /* "lxml/etree.pyx":779 + /* "lxml/etree.pyx":777 * # item deletion * c_node = _findChild(self._c_node, x) * if c_node is NULL: # <<<<<<<<<<<<<< @@ -56181,32 +53073,30 @@ static int __pyx_pf_4lxml_5etree_8_Element_6__delitem__(struct LxmlElement *__py */ } - /* "lxml/etree.pyx":781 + /* "lxml/etree.pyx":779 * if c_node is NULL: * raise IndexError, f"index out of range: {x}" * _removeText(c_node.next) # <<<<<<<<<<<<<< * _removeNode(self._doc, c_node) * */ - __Pyx_TraceLine(781,0,__PYX_ERR(0, 781, __pyx_L1_error)) __pyx_f_4lxml_5etree__removeText(__pyx_v_c_node->next); - /* "lxml/etree.pyx":782 + /* "lxml/etree.pyx":780 * raise IndexError, f"index out of range: {x}" * _removeText(c_node.next) * _removeNode(self._doc, c_node) # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __Pyx_TraceLine(782,0,__PYX_ERR(0, 782, __pyx_L1_error)) __pyx_t_7 = ((PyObject *)__pyx_v_self->_doc); __Pyx_INCREF(__pyx_t_7); - __pyx_t_1 = __pyx_f_4lxml_5etree__removeNode(((struct LxmlDocument *)__pyx_t_7), __pyx_v_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 782, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__removeNode(((struct LxmlDocument *)__pyx_t_7), __pyx_v_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 780, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_L3:; - /* "lxml/etree.pyx":753 + /* "lxml/etree.pyx":751 * moveNodeToDocument(self._doc, c_node.doc, c_node) * * def __delitem__(self, x): # <<<<<<<<<<<<<< @@ -56223,12 +53113,11 @@ static int __pyx_pf_4lxml_5etree_8_Element_6__delitem__(struct LxmlElement *__py __Pyx_AddTraceback("lxml.etree._Element.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":784 +/* "lxml/etree.pyx":782 * _removeNode(self._doc, c_node) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -56253,25 +53142,21 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_9__deepcopy__(PyObject *__pyx_v static PyObject *__pyx_pf_4lxml_5etree_8_Element_8__deepcopy__(struct LxmlElement *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_memo) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__67) __Pyx_RefNannySetupContext("__deepcopy__", 0); - __Pyx_TraceCall("__deepcopy__", __pyx_f[0], 784, 0, __PYX_ERR(0, 784, __pyx_L1_error)); - /* "lxml/etree.pyx":786 + /* "lxml/etree.pyx":784 * def __deepcopy__(self, memo): * u"__deepcopy__(self, memo)" * return self.__copy__() # <<<<<<<<<<<<<< * * def __copy__(self): */ - __Pyx_TraceLine(786,0,__PYX_ERR(0, 786, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 786, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 784, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -56283,19 +53168,16 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_8__deepcopy__(struct LxmlElemen __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 786, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 786, __pyx_L1_error) - } + __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, 784, __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":784 + /* "lxml/etree.pyx":782 * _removeNode(self._doc, c_node) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -56312,12 +53194,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_8__deepcopy__(struct LxmlElemen __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":788 +/* "lxml/etree.pyx":786 * return self.__copy__() * * def __copy__(self): # <<<<<<<<<<<<<< @@ -56346,7 +53227,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_10__copy__(struct LxmlElement * struct LxmlDocument *__pyx_v_new_doc = 0; PyObject *__pyx_v_root = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlDoc *__pyx_t_2; @@ -56355,86 +53235,78 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_10__copy__(struct LxmlElement * int __pyx_t_5; int __pyx_t_6; xmlNode *__pyx_t_7; - __Pyx_TraceFrameInit(__pyx_codeobj__68) __Pyx_RefNannySetupContext("__copy__", 0); - __Pyx_TraceCall("__copy__", __pyx_f[0], 788, 0, __PYX_ERR(0, 788, __pyx_L1_error)); - /* "lxml/etree.pyx":793 + /* "lxml/etree.pyx":791 * cdef xmlNode* c_node * cdef _Document new_doc * _assertValidNode(self) # <<<<<<<<<<<<<< * c_doc = _copyDocRoot(self._doc._c_doc, self._c_node) # recursive * new_doc = _documentFactory(c_doc, self._doc._parser) */ - __Pyx_TraceLine(793,0,__PYX_ERR(0, 793, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 793, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 791, __pyx_L1_error) - /* "lxml/etree.pyx":794 + /* "lxml/etree.pyx":792 * cdef _Document new_doc * _assertValidNode(self) * c_doc = _copyDocRoot(self._doc._c_doc, self._c_node) # recursive # <<<<<<<<<<<<<< * new_doc = _documentFactory(c_doc, self._doc._parser) * root = new_doc.getroot() */ - __Pyx_TraceLine(794,0,__PYX_ERR(0, 794, __pyx_L1_error)) - __pyx_t_2 = __pyx_f_4lxml_5etree__copyDocRoot(__pyx_v_self->_doc->_c_doc, __pyx_v_self->_c_node); if (unlikely(__pyx_t_2 == ((xmlDoc *)NULL))) __PYX_ERR(0, 794, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__copyDocRoot(__pyx_v_self->_doc->_c_doc, __pyx_v_self->_c_node); if (unlikely(__pyx_t_2 == ((xmlDoc *)NULL))) __PYX_ERR(0, 792, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_2; - /* "lxml/etree.pyx":795 + /* "lxml/etree.pyx":793 * _assertValidNode(self) * c_doc = _copyDocRoot(self._doc._c_doc, self._c_node) # recursive * new_doc = _documentFactory(c_doc, self._doc._parser) # <<<<<<<<<<<<<< * root = new_doc.getroot() * if root is not None: */ - __Pyx_TraceLine(795,0,__PYX_ERR(0, 795, __pyx_L1_error)) __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, 795, __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, 793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_new_doc = ((struct LxmlDocument *)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":796 + /* "lxml/etree.pyx":794 * c_doc = _copyDocRoot(self._doc._c_doc, self._c_node) # recursive * new_doc = _documentFactory(c_doc, self._doc._parser) * root = new_doc.getroot() # <<<<<<<<<<<<<< * if root is not None: * return root */ - __Pyx_TraceLine(796,0,__PYX_ERR(0, 796, __pyx_L1_error)) - __pyx_t_4 = __pyx_f_4lxml_5etree_9_Document_getroot(__pyx_v_new_doc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 796, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree_9_Document_getroot(__pyx_v_new_doc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 794, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_root = __pyx_t_4; __pyx_t_4 = 0; - /* "lxml/etree.pyx":797 + /* "lxml/etree.pyx":795 * new_doc = _documentFactory(c_doc, self._doc._parser) * root = new_doc.getroot() * if root is not None: # <<<<<<<<<<<<<< * return root * # Comment/PI */ - __Pyx_TraceLine(797,0,__PYX_ERR(0, 797, __pyx_L1_error)) __pyx_t_5 = (__pyx_v_root != Py_None); __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "lxml/etree.pyx":798 + /* "lxml/etree.pyx":796 * root = new_doc.getroot() * if root is not None: * return root # <<<<<<<<<<<<<< * # Comment/PI * c_node = c_doc.children */ - __Pyx_TraceLine(798,0,__PYX_ERR(0, 798, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_root); __pyx_r = __pyx_v_root; goto __pyx_L0; - /* "lxml/etree.pyx":797 + /* "lxml/etree.pyx":795 * new_doc = _documentFactory(c_doc, self._doc._parser) * root = new_doc.getroot() * if root is not None: # <<<<<<<<<<<<<< @@ -56443,25 +53315,23 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_10__copy__(struct LxmlElement * */ } - /* "lxml/etree.pyx":800 + /* "lxml/etree.pyx":798 * return root * # Comment/PI * c_node = c_doc.children # <<<<<<<<<<<<<< * while c_node is not NULL and c_node.type != self._c_node.type: * c_node = c_node.next */ - __Pyx_TraceLine(800,0,__PYX_ERR(0, 800, __pyx_L1_error)) __pyx_t_7 = __pyx_v_c_doc->children; __pyx_v_c_node = __pyx_t_7; - /* "lxml/etree.pyx":801 + /* "lxml/etree.pyx":799 * # Comment/PI * c_node = c_doc.children * while c_node is not NULL and c_node.type != self._c_node.type: # <<<<<<<<<<<<<< * c_node = c_node.next * if c_node is NULL: */ - __Pyx_TraceLine(801,0,__PYX_ERR(0, 801, __pyx_L1_error)) while (1) { __pyx_t_5 = ((__pyx_v_c_node != NULL) != 0); if (__pyx_t_5) { @@ -56474,42 +53344,39 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_10__copy__(struct LxmlElement * __pyx_L6_bool_binop_done:; if (!__pyx_t_6) break; - /* "lxml/etree.pyx":802 + /* "lxml/etree.pyx":800 * c_node = c_doc.children * while c_node is not NULL and c_node.type != self._c_node.type: * c_node = c_node.next # <<<<<<<<<<<<<< * if c_node is NULL: * return None */ - __Pyx_TraceLine(802,0,__PYX_ERR(0, 802, __pyx_L1_error)) __pyx_t_7 = __pyx_v_c_node->next; __pyx_v_c_node = __pyx_t_7; } - /* "lxml/etree.pyx":803 + /* "lxml/etree.pyx":801 * while c_node is not NULL and c_node.type != self._c_node.type: * c_node = c_node.next * if c_node is NULL: # <<<<<<<<<<<<<< * return None * return _elementFactory(new_doc, c_node) */ - __Pyx_TraceLine(803,0,__PYX_ERR(0, 803, __pyx_L1_error)) __pyx_t_6 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_6) { - /* "lxml/etree.pyx":804 + /* "lxml/etree.pyx":802 * c_node = c_node.next * if c_node is NULL: * return None # <<<<<<<<<<<<<< * return _elementFactory(new_doc, c_node) * */ - __Pyx_TraceLine(804,0,__PYX_ERR(0, 804, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/etree.pyx":803 + /* "lxml/etree.pyx":801 * while c_node is not NULL and c_node.type != self._c_node.type: * c_node = c_node.next * if c_node is NULL: # <<<<<<<<<<<<<< @@ -56518,22 +53385,21 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_10__copy__(struct LxmlElement * */ } - /* "lxml/etree.pyx":805 + /* "lxml/etree.pyx":803 * if c_node is NULL: * return None * return _elementFactory(new_doc, c_node) # <<<<<<<<<<<<<< * * def set(self, key, value): */ - __Pyx_TraceLine(805,0,__PYX_ERR(0, 805, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(__pyx_v_new_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 805, __pyx_L1_error) + __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(__pyx_v_new_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 803, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":788 + /* "lxml/etree.pyx":786 * return self.__copy__() * * def __copy__(self): # <<<<<<<<<<<<<< @@ -56551,12 +53417,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_10__copy__(struct LxmlElement * __Pyx_XDECREF((PyObject *)__pyx_v_new_doc); __Pyx_XDECREF(__pyx_v_root); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":807 +/* "lxml/etree.pyx":805 * return _elementFactory(new_doc, c_node) * * def set(self, key, value): # <<<<<<<<<<<<<< @@ -56567,7 +53432,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_10__copy__(struct LxmlElement * /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_8_Element_13set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_8_Element_12set[] = "set(self, key, value)\n\n Sets an element attribute.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_13set = {"set", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_13set, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_12set}; +static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_13set = {"set", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_13set, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_12set}; static PyObject *__pyx_pw_4lxml_5etree_8_Element_13set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_key = 0; PyObject *__pyx_v_value = 0; @@ -56597,11 +53462,11 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_13set(PyObject *__pyx_v_self, 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, 807, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); __PYX_ERR(0, 805, __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, 807, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) __PYX_ERR(0, 805, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -56614,7 +53479,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_13set(PyObject *__pyx_v_self, 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, 807, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 805, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._Element.set", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -56629,34 +53494,29 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_13set(PyObject *__pyx_v_self, P static PyObject *__pyx_pf_4lxml_5etree_8_Element_12set(struct LxmlElement *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; - __Pyx_TraceFrameInit(__pyx_codeobj__69) __Pyx_RefNannySetupContext("set", 0); - __Pyx_TraceCall("set", __pyx_f[0], 807, 0, __PYX_ERR(0, 807, __pyx_L1_error)); - /* "lxml/etree.pyx":812 + /* "lxml/etree.pyx":810 * Sets an element attribute. * """ * _assertValidNode(self) # <<<<<<<<<<<<<< * _setAttributeValue(self, key, value) * */ - __Pyx_TraceLine(812,0,__PYX_ERR(0, 812, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 812, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 810, __pyx_L1_error) - /* "lxml/etree.pyx":813 + /* "lxml/etree.pyx":811 * """ * _assertValidNode(self) * _setAttributeValue(self, key, value) # <<<<<<<<<<<<<< * * def append(self, _Element element not None): */ - __Pyx_TraceLine(813,0,__PYX_ERR(0, 813, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__setAttributeValue(__pyx_v_self, __pyx_v_key, __pyx_v_value); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 813, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__setAttributeValue(__pyx_v_self, __pyx_v_key, __pyx_v_value); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 811, __pyx_L1_error) - /* "lxml/etree.pyx":807 + /* "lxml/etree.pyx":805 * return _elementFactory(new_doc, c_node) * * def set(self, key, value): # <<<<<<<<<<<<<< @@ -56672,12 +53532,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_12set(struct LxmlElement *__pyx __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":815 +/* "lxml/etree.pyx":813 * _setAttributeValue(self, key, value) * * def append(self, _Element element not None): # <<<<<<<<<<<<<< @@ -56693,7 +53552,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_15append(PyObject *__pyx_v_self PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("append (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_5etree__Element, 0, "element", 0))) __PYX_ERR(0, 815, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_5etree__Element, 0, "element", 0))) __PYX_ERR(0, 813, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_8_Element_14append(((struct LxmlElement *)__pyx_v_self), ((struct LxmlElement *)__pyx_v_element)); /* function exit code */ @@ -56707,44 +53566,38 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_15append(PyObject *__pyx_v_self static PyObject *__pyx_pf_4lxml_5etree_8_Element_14append(struct LxmlElement *__pyx_v_self, struct LxmlElement *__pyx_v_element) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; - __Pyx_TraceFrameInit(__pyx_codeobj__70) __Pyx_RefNannySetupContext("append", 0); - __Pyx_TraceCall("append", __pyx_f[0], 815, 0, __PYX_ERR(0, 815, __pyx_L1_error)); - /* "lxml/etree.pyx":820 + /* "lxml/etree.pyx":818 * Adds a subelement to the end of this element. * """ * _assertValidNode(self) # <<<<<<<<<<<<<< * _assertValidNode(element) * _appendChild(self, element) */ - __Pyx_TraceLine(820,0,__PYX_ERR(0, 820, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 820, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 818, __pyx_L1_error) - /* "lxml/etree.pyx":821 + /* "lxml/etree.pyx":819 * """ * _assertValidNode(self) * _assertValidNode(element) # <<<<<<<<<<<<<< * _appendChild(self, element) * */ - __Pyx_TraceLine(821,0,__PYX_ERR(0, 821, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 821, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 819, __pyx_L1_error) - /* "lxml/etree.pyx":822 + /* "lxml/etree.pyx":820 * _assertValidNode(self) * _assertValidNode(element) * _appendChild(self, element) # <<<<<<<<<<<<<< * * def addnext(self, _Element element not None): */ - __Pyx_TraceLine(822,0,__PYX_ERR(0, 822, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__appendChild(__pyx_v_self, __pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 822, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__appendChild(__pyx_v_self, __pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 820, __pyx_L1_error) - /* "lxml/etree.pyx":815 + /* "lxml/etree.pyx":813 * _setAttributeValue(self, key, value) * * def append(self, _Element element not None): # <<<<<<<<<<<<<< @@ -56760,12 +53613,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_14append(struct LxmlElement *__ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":824 +/* "lxml/etree.pyx":822 * _appendChild(self, element) * * def addnext(self, _Element element not None): # <<<<<<<<<<<<<< @@ -56781,7 +53633,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_17addnext(PyObject *__pyx_v_sel PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addnext (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_5etree__Element, 0, "element", 0))) __PYX_ERR(0, 824, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_5etree__Element, 0, "element", 0))) __PYX_ERR(0, 822, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_8_Element_16addnext(((struct LxmlElement *)__pyx_v_self), ((struct LxmlElement *)__pyx_v_element)); /* function exit code */ @@ -56795,43 +53647,37 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_17addnext(PyObject *__pyx_v_sel static PyObject *__pyx_pf_4lxml_5etree_8_Element_16addnext(struct LxmlElement *__pyx_v_self, struct LxmlElement *__pyx_v_element) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; - __Pyx_TraceFrameInit(__pyx_codeobj__71) __Pyx_RefNannySetupContext("addnext", 0); - __Pyx_TraceCall("addnext", __pyx_f[0], 824, 0, __PYX_ERR(0, 824, __pyx_L1_error)); - /* "lxml/etree.pyx":834 + /* "lxml/etree.pyx":832 * discarded when adding at the root level. * """ * _assertValidNode(self) # <<<<<<<<<<<<<< * _assertValidNode(element) * if self._c_node.parent != NULL and not _isElement(self._c_node.parent): */ - __Pyx_TraceLine(834,0,__PYX_ERR(0, 834, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 834, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 832, __pyx_L1_error) - /* "lxml/etree.pyx":835 + /* "lxml/etree.pyx":833 * """ * _assertValidNode(self) * _assertValidNode(element) # <<<<<<<<<<<<<< * if self._c_node.parent != NULL and not _isElement(self._c_node.parent): * if element._c_node.type != tree.XML_PI_NODE: */ - __Pyx_TraceLine(835,0,__PYX_ERR(0, 835, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 835, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 833, __pyx_L1_error) - /* "lxml/etree.pyx":836 + /* "lxml/etree.pyx":834 * _assertValidNode(self) * _assertValidNode(element) * if self._c_node.parent != NULL and not _isElement(self._c_node.parent): # <<<<<<<<<<<<<< * if element._c_node.type != tree.XML_PI_NODE: * if element._c_node.type != tree.XML_COMMENT_NODE: */ - __Pyx_TraceLine(836,0,__PYX_ERR(0, 836, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_self->_c_node->parent != NULL) != 0); if (__pyx_t_3) { } else { @@ -56843,40 +53689,37 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_16addnext(struct LxmlElement *_ __pyx_L4_bool_binop_done:; if (__pyx_t_2) { - /* "lxml/etree.pyx":837 + /* "lxml/etree.pyx":835 * _assertValidNode(element) * if self._c_node.parent != NULL and not _isElement(self._c_node.parent): * if element._c_node.type != tree.XML_PI_NODE: # <<<<<<<<<<<<<< * if element._c_node.type != tree.XML_COMMENT_NODE: * raise TypeError, u"Only processing instructions and comments can be siblings of the root element" */ - __Pyx_TraceLine(837,0,__PYX_ERR(0, 837, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_element->_c_node->type != XML_PI_NODE) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":838 + /* "lxml/etree.pyx":836 * if self._c_node.parent != NULL and not _isElement(self._c_node.parent): * if element._c_node.type != tree.XML_PI_NODE: * if element._c_node.type != tree.XML_COMMENT_NODE: # <<<<<<<<<<<<<< * raise TypeError, u"Only processing instructions and comments can be siblings of the root element" * element.tail = None */ - __Pyx_TraceLine(838,0,__PYX_ERR(0, 838, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_element->_c_node->type != XML_COMMENT_NODE) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":839 + /* "lxml/etree.pyx":837 * if element._c_node.type != tree.XML_PI_NODE: * if element._c_node.type != tree.XML_COMMENT_NODE: * raise TypeError, u"Only processing instructions and comments can be siblings of the root element" # <<<<<<<<<<<<<< * element.tail = None * _appendSibling(self, element) */ - __Pyx_TraceLine(839,0,__PYX_ERR(0, 839, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Only_processing_instructions_and, 0, 0); - __PYX_ERR(0, 839, __pyx_L1_error) + __PYX_ERR(0, 837, __pyx_L1_error) - /* "lxml/etree.pyx":838 + /* "lxml/etree.pyx":836 * if self._c_node.parent != NULL and not _isElement(self._c_node.parent): * if element._c_node.type != tree.XML_PI_NODE: * if element._c_node.type != tree.XML_COMMENT_NODE: # <<<<<<<<<<<<<< @@ -56885,7 +53728,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_16addnext(struct LxmlElement *_ */ } - /* "lxml/etree.pyx":837 + /* "lxml/etree.pyx":835 * _assertValidNode(element) * if self._c_node.parent != NULL and not _isElement(self._c_node.parent): * if element._c_node.type != tree.XML_PI_NODE: # <<<<<<<<<<<<<< @@ -56894,17 +53737,16 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_16addnext(struct LxmlElement *_ */ } - /* "lxml/etree.pyx":840 + /* "lxml/etree.pyx":838 * if element._c_node.type != tree.XML_COMMENT_NODE: * raise TypeError, u"Only processing instructions and comments can be siblings of the root element" * element.tail = None # <<<<<<<<<<<<<< * _appendSibling(self, element) * */ - __Pyx_TraceLine(840,0,__PYX_ERR(0, 840, __pyx_L1_error)) - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_element), __pyx_n_s_tail, Py_None) < 0) __PYX_ERR(0, 840, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_element), __pyx_n_s_tail, Py_None) < 0) __PYX_ERR(0, 838, __pyx_L1_error) - /* "lxml/etree.pyx":836 + /* "lxml/etree.pyx":834 * _assertValidNode(self) * _assertValidNode(element) * if self._c_node.parent != NULL and not _isElement(self._c_node.parent): # <<<<<<<<<<<<<< @@ -56913,17 +53755,16 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_16addnext(struct LxmlElement *_ */ } - /* "lxml/etree.pyx":841 + /* "lxml/etree.pyx":839 * raise TypeError, u"Only processing instructions and comments can be siblings of the root element" * element.tail = None * _appendSibling(self, element) # <<<<<<<<<<<<<< * * def addprevious(self, _Element element not None): */ - __Pyx_TraceLine(841,0,__PYX_ERR(0, 841, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__appendSibling(__pyx_v_self, __pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 841, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__appendSibling(__pyx_v_self, __pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 839, __pyx_L1_error) - /* "lxml/etree.pyx":824 + /* "lxml/etree.pyx":822 * _appendChild(self, element) * * def addnext(self, _Element element not None): # <<<<<<<<<<<<<< @@ -56939,12 +53780,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_16addnext(struct LxmlElement *_ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":843 +/* "lxml/etree.pyx":841 * _appendSibling(self, element) * * def addprevious(self, _Element element not None): # <<<<<<<<<<<<<< @@ -56960,7 +53800,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_19addprevious(PyObject *__pyx_v PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("addprevious (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_5etree__Element, 0, "element", 0))) __PYX_ERR(0, 843, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_5etree__Element, 0, "element", 0))) __PYX_ERR(0, 841, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_8_Element_18addprevious(((struct LxmlElement *)__pyx_v_self), ((struct LxmlElement *)__pyx_v_element)); /* function exit code */ @@ -56974,43 +53814,37 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_19addprevious(PyObject *__pyx_v static PyObject *__pyx_pf_4lxml_5etree_8_Element_18addprevious(struct LxmlElement *__pyx_v_self, struct LxmlElement *__pyx_v_element) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; - __Pyx_TraceFrameInit(__pyx_codeobj__72) __Pyx_RefNannySetupContext("addprevious", 0); - __Pyx_TraceCall("addprevious", __pyx_f[0], 843, 0, __PYX_ERR(0, 843, __pyx_L1_error)); - /* "lxml/etree.pyx":853 + /* "lxml/etree.pyx":851 * automatically discarded when adding at the root level. * """ * _assertValidNode(self) # <<<<<<<<<<<<<< * _assertValidNode(element) * if self._c_node.parent != NULL and not _isElement(self._c_node.parent): */ - __Pyx_TraceLine(853,0,__PYX_ERR(0, 853, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 853, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 851, __pyx_L1_error) - /* "lxml/etree.pyx":854 + /* "lxml/etree.pyx":852 * """ * _assertValidNode(self) * _assertValidNode(element) # <<<<<<<<<<<<<< * if self._c_node.parent != NULL and not _isElement(self._c_node.parent): * if element._c_node.type != tree.XML_PI_NODE: */ - __Pyx_TraceLine(854,0,__PYX_ERR(0, 854, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 854, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 852, __pyx_L1_error) - /* "lxml/etree.pyx":855 + /* "lxml/etree.pyx":853 * _assertValidNode(self) * _assertValidNode(element) * if self._c_node.parent != NULL and not _isElement(self._c_node.parent): # <<<<<<<<<<<<<< * if element._c_node.type != tree.XML_PI_NODE: * if element._c_node.type != tree.XML_COMMENT_NODE: */ - __Pyx_TraceLine(855,0,__PYX_ERR(0, 855, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_self->_c_node->parent != NULL) != 0); if (__pyx_t_3) { } else { @@ -57022,40 +53856,37 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_18addprevious(struct LxmlElemen __pyx_L4_bool_binop_done:; if (__pyx_t_2) { - /* "lxml/etree.pyx":856 + /* "lxml/etree.pyx":854 * _assertValidNode(element) * if self._c_node.parent != NULL and not _isElement(self._c_node.parent): * if element._c_node.type != tree.XML_PI_NODE: # <<<<<<<<<<<<<< * if element._c_node.type != tree.XML_COMMENT_NODE: * raise TypeError, u"Only processing instructions and comments can be siblings of the root element" */ - __Pyx_TraceLine(856,0,__PYX_ERR(0, 856, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_element->_c_node->type != XML_PI_NODE) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":857 + /* "lxml/etree.pyx":855 * if self._c_node.parent != NULL and not _isElement(self._c_node.parent): * if element._c_node.type != tree.XML_PI_NODE: * if element._c_node.type != tree.XML_COMMENT_NODE: # <<<<<<<<<<<<<< * raise TypeError, u"Only processing instructions and comments can be siblings of the root element" * element.tail = None */ - __Pyx_TraceLine(857,0,__PYX_ERR(0, 857, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_element->_c_node->type != XML_COMMENT_NODE) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":858 + /* "lxml/etree.pyx":856 * if element._c_node.type != tree.XML_PI_NODE: * if element._c_node.type != tree.XML_COMMENT_NODE: * raise TypeError, u"Only processing instructions and comments can be siblings of the root element" # <<<<<<<<<<<<<< * element.tail = None * _prependSibling(self, element) */ - __Pyx_TraceLine(858,0,__PYX_ERR(0, 858, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Only_processing_instructions_and, 0, 0); - __PYX_ERR(0, 858, __pyx_L1_error) + __PYX_ERR(0, 856, __pyx_L1_error) - /* "lxml/etree.pyx":857 + /* "lxml/etree.pyx":855 * if self._c_node.parent != NULL and not _isElement(self._c_node.parent): * if element._c_node.type != tree.XML_PI_NODE: * if element._c_node.type != tree.XML_COMMENT_NODE: # <<<<<<<<<<<<<< @@ -57064,7 +53895,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_18addprevious(struct LxmlElemen */ } - /* "lxml/etree.pyx":856 + /* "lxml/etree.pyx":854 * _assertValidNode(element) * if self._c_node.parent != NULL and not _isElement(self._c_node.parent): * if element._c_node.type != tree.XML_PI_NODE: # <<<<<<<<<<<<<< @@ -57073,17 +53904,16 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_18addprevious(struct LxmlElemen */ } - /* "lxml/etree.pyx":859 + /* "lxml/etree.pyx":857 * if element._c_node.type != tree.XML_COMMENT_NODE: * raise TypeError, u"Only processing instructions and comments can be siblings of the root element" * element.tail = None # <<<<<<<<<<<<<< * _prependSibling(self, element) * */ - __Pyx_TraceLine(859,0,__PYX_ERR(0, 859, __pyx_L1_error)) - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_element), __pyx_n_s_tail, Py_None) < 0) __PYX_ERR(0, 859, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_element), __pyx_n_s_tail, Py_None) < 0) __PYX_ERR(0, 857, __pyx_L1_error) - /* "lxml/etree.pyx":855 + /* "lxml/etree.pyx":853 * _assertValidNode(self) * _assertValidNode(element) * if self._c_node.parent != NULL and not _isElement(self._c_node.parent): # <<<<<<<<<<<<<< @@ -57092,17 +53922,16 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_18addprevious(struct LxmlElemen */ } - /* "lxml/etree.pyx":860 + /* "lxml/etree.pyx":858 * raise TypeError, u"Only processing instructions and comments can be siblings of the root element" * element.tail = None * _prependSibling(self, element) # <<<<<<<<<<<<<< * * def extend(self, elements): */ - __Pyx_TraceLine(860,0,__PYX_ERR(0, 860, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__prependSibling(__pyx_v_self, __pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 860, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__prependSibling(__pyx_v_self, __pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 858, __pyx_L1_error) - /* "lxml/etree.pyx":843 + /* "lxml/etree.pyx":841 * _appendSibling(self, element) * * def addprevious(self, _Element element not None): # <<<<<<<<<<<<<< @@ -57118,12 +53947,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_18addprevious(struct LxmlElemen __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":862 +/* "lxml/etree.pyx":860 * _prependSibling(self, element) * * def extend(self, elements): # <<<<<<<<<<<<<< @@ -57149,7 +53977,6 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_21extend(PyObject *__pyx_v_self static PyObject *__pyx_pf_4lxml_5etree_8_Element_20extend(struct LxmlElement *__pyx_v_self, PyObject *__pyx_v_elements) { struct LxmlElement *__pyx_v_element = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -57158,52 +53985,48 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_20extend(struct LxmlElement *__ PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; - __Pyx_TraceFrameInit(__pyx_codeobj__73) __Pyx_RefNannySetupContext("extend", 0); - __Pyx_TraceCall("extend", __pyx_f[0], 862, 0, __PYX_ERR(0, 862, __pyx_L1_error)); - /* "lxml/etree.pyx":868 + /* "lxml/etree.pyx":866 * """ * cdef _Element element * _assertValidNode(self) # <<<<<<<<<<<<<< * for element in elements: * if element is None: */ - __Pyx_TraceLine(868,0,__PYX_ERR(0, 868, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 868, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 866, __pyx_L1_error) - /* "lxml/etree.pyx":869 + /* "lxml/etree.pyx":867 * cdef _Element element * _assertValidNode(self) * for element in elements: # <<<<<<<<<<<<<< * if element is None: * raise TypeError, u"Node must not be None" */ - __Pyx_TraceLine(869,0,__PYX_ERR(0, 869, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_v_elements)) || PyTuple_CheckExact(__pyx_v_elements)) { __pyx_t_2 = __pyx_v_elements; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 869, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 867, __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(0, 869, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 867, __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(0, 869, __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(0, 867, __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(0, 869, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 867, __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(0, 869, __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(0, 867, __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(0, 869, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -57213,40 +54036,38 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_20extend(struct LxmlElement *__ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 869, __pyx_L1_error) + else __PYX_ERR(0, 867, __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__Element))))) __PYX_ERR(0, 869, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(0, 867, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_element, ((struct LxmlElement *)__pyx_t_5)); __pyx_t_5 = 0; - /* "lxml/etree.pyx":870 + /* "lxml/etree.pyx":868 * _assertValidNode(self) * for element in elements: * if element is None: # <<<<<<<<<<<<<< * raise TypeError, u"Node must not be None" * _assertValidNode(element) */ - __Pyx_TraceLine(870,0,__PYX_ERR(0, 870, __pyx_L1_error)) __pyx_t_6 = (((PyObject *)__pyx_v_element) == Py_None); __pyx_t_7 = (__pyx_t_6 != 0); if (unlikely(__pyx_t_7)) { - /* "lxml/etree.pyx":871 + /* "lxml/etree.pyx":869 * for element in elements: * if element is None: * raise TypeError, u"Node must not be None" # <<<<<<<<<<<<<< * _assertValidNode(element) * _appendChild(self, element) */ - __Pyx_TraceLine(871,0,__PYX_ERR(0, 871, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Node_must_not_be_None, 0, 0); - __PYX_ERR(0, 871, __pyx_L1_error) + __PYX_ERR(0, 869, __pyx_L1_error) - /* "lxml/etree.pyx":870 + /* "lxml/etree.pyx":868 * _assertValidNode(self) * for element in elements: * if element is None: # <<<<<<<<<<<<<< @@ -57255,38 +54076,35 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_20extend(struct LxmlElement *__ */ } - /* "lxml/etree.pyx":872 + /* "lxml/etree.pyx":870 * if element is None: * raise TypeError, u"Node must not be None" * _assertValidNode(element) # <<<<<<<<<<<<<< * _appendChild(self, element) * */ - __Pyx_TraceLine(872,0,__PYX_ERR(0, 872, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 872, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 870, __pyx_L1_error) - /* "lxml/etree.pyx":873 + /* "lxml/etree.pyx":871 * raise TypeError, u"Node must not be None" * _assertValidNode(element) * _appendChild(self, element) # <<<<<<<<<<<<<< * * def clear(self): */ - __Pyx_TraceLine(873,0,__PYX_ERR(0, 873, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__appendChild(__pyx_v_self, __pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 873, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__appendChild(__pyx_v_self, __pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 871, __pyx_L1_error) - /* "lxml/etree.pyx":869 + /* "lxml/etree.pyx":867 * cdef _Element element * _assertValidNode(self) * for element in elements: # <<<<<<<<<<<<<< * if element is None: * raise TypeError, u"Node must not be None" */ - __Pyx_TraceLine(869,0,__PYX_ERR(0, 869, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":862 + /* "lxml/etree.pyx":860 * _prependSibling(self, element) * * def extend(self, elements): # <<<<<<<<<<<<<< @@ -57305,12 +54123,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_20extend(struct LxmlElement *__ __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_element); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":875 +/* "lxml/etree.pyx":873 * _appendChild(self, element) * * def clear(self): # <<<<<<<<<<<<<< @@ -57339,157 +54156,141 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_22clear(struct LxmlElement *__p xmlNode *__pyx_v_c_node; xmlNode *__pyx_v_c_node_next; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlNode *__pyx_t_2; xmlAttr *__pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__74) __Pyx_RefNannySetupContext("clear", 0); - __Pyx_TraceCall("clear", __pyx_f[0], 875, 0, __PYX_ERR(0, 875, __pyx_L1_error)); - /* "lxml/etree.pyx":885 + /* "lxml/etree.pyx":883 * cdef xmlNode* c_node * cdef xmlNode* c_node_next * _assertValidNode(self) # <<<<<<<<<<<<<< * c_node = self._c_node * # remove self.text and self.tail */ - __Pyx_TraceLine(885,0,__PYX_ERR(0, 885, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 885, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 883, __pyx_L1_error) - /* "lxml/etree.pyx":886 + /* "lxml/etree.pyx":884 * cdef xmlNode* c_node_next * _assertValidNode(self) * c_node = self._c_node # <<<<<<<<<<<<<< * # remove self.text and self.tail * _removeText(c_node.children) */ - __Pyx_TraceLine(886,0,__PYX_ERR(0, 886, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_c_node; __pyx_v_c_node = __pyx_t_2; - /* "lxml/etree.pyx":888 + /* "lxml/etree.pyx":886 * c_node = self._c_node * # remove self.text and self.tail * _removeText(c_node.children) # <<<<<<<<<<<<<< * _removeText(c_node.next) * # remove all attributes */ - __Pyx_TraceLine(888,0,__PYX_ERR(0, 888, __pyx_L1_error)) __pyx_f_4lxml_5etree__removeText(__pyx_v_c_node->children); - /* "lxml/etree.pyx":889 + /* "lxml/etree.pyx":887 * # remove self.text and self.tail * _removeText(c_node.children) * _removeText(c_node.next) # <<<<<<<<<<<<<< * # remove all attributes * c_attr = c_node.properties */ - __Pyx_TraceLine(889,0,__PYX_ERR(0, 889, __pyx_L1_error)) __pyx_f_4lxml_5etree__removeText(__pyx_v_c_node->next); - /* "lxml/etree.pyx":891 + /* "lxml/etree.pyx":889 * _removeText(c_node.next) * # remove all attributes * c_attr = c_node.properties # <<<<<<<<<<<<<< * while c_attr is not NULL: * c_attr_next = c_attr.next */ - __Pyx_TraceLine(891,0,__PYX_ERR(0, 891, __pyx_L1_error)) __pyx_t_3 = __pyx_v_c_node->properties; __pyx_v_c_attr = __pyx_t_3; - /* "lxml/etree.pyx":892 + /* "lxml/etree.pyx":890 * # remove all attributes * c_attr = c_node.properties * while c_attr is not NULL: # <<<<<<<<<<<<<< * c_attr_next = c_attr.next * tree.xmlRemoveProp(c_attr) */ - __Pyx_TraceLine(892,0,__PYX_ERR(0, 892, __pyx_L1_error)) while (1) { __pyx_t_4 = ((__pyx_v_c_attr != NULL) != 0); if (!__pyx_t_4) break; - /* "lxml/etree.pyx":893 + /* "lxml/etree.pyx":891 * c_attr = c_node.properties * while c_attr is not NULL: * c_attr_next = c_attr.next # <<<<<<<<<<<<<< * tree.xmlRemoveProp(c_attr) * c_attr = c_attr_next */ - __Pyx_TraceLine(893,0,__PYX_ERR(0, 893, __pyx_L1_error)) __pyx_t_3 = __pyx_v_c_attr->next; __pyx_v_c_attr_next = __pyx_t_3; - /* "lxml/etree.pyx":894 + /* "lxml/etree.pyx":892 * while c_attr is not NULL: * c_attr_next = c_attr.next * tree.xmlRemoveProp(c_attr) # <<<<<<<<<<<<<< * c_attr = c_attr_next * # remove all subelements */ - __Pyx_TraceLine(894,0,__PYX_ERR(0, 894, __pyx_L1_error)) (void)(xmlRemoveProp(__pyx_v_c_attr)); - /* "lxml/etree.pyx":895 + /* "lxml/etree.pyx":893 * c_attr_next = c_attr.next * tree.xmlRemoveProp(c_attr) * c_attr = c_attr_next # <<<<<<<<<<<<<< * # remove all subelements * c_node = c_node.children */ - __Pyx_TraceLine(895,0,__PYX_ERR(0, 895, __pyx_L1_error)) __pyx_v_c_attr = __pyx_v_c_attr_next; } - /* "lxml/etree.pyx":897 + /* "lxml/etree.pyx":895 * c_attr = c_attr_next * # remove all subelements * c_node = c_node.children # <<<<<<<<<<<<<< * if c_node is not NULL: * if not _isElement(c_node): */ - __Pyx_TraceLine(897,0,__PYX_ERR(0, 897, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->children; __pyx_v_c_node = __pyx_t_2; - /* "lxml/etree.pyx":898 + /* "lxml/etree.pyx":896 * # remove all subelements * c_node = c_node.children * if c_node is not NULL: # <<<<<<<<<<<<<< * if not _isElement(c_node): * c_node = _nextElement(c_node) */ - __Pyx_TraceLine(898,0,__PYX_ERR(0, 898, __pyx_L1_error)) __pyx_t_4 = ((__pyx_v_c_node != NULL) != 0); if (__pyx_t_4) { - /* "lxml/etree.pyx":899 + /* "lxml/etree.pyx":897 * c_node = c_node.children * if c_node is not NULL: * if not _isElement(c_node): # <<<<<<<<<<<<<< * c_node = _nextElement(c_node) * while c_node is not NULL: */ - __Pyx_TraceLine(899,0,__PYX_ERR(0, 899, __pyx_L1_error)) __pyx_t_4 = ((!(_isElement(__pyx_v_c_node) != 0)) != 0); if (__pyx_t_4) { - /* "lxml/etree.pyx":900 + /* "lxml/etree.pyx":898 * if c_node is not NULL: * if not _isElement(c_node): * c_node = _nextElement(c_node) # <<<<<<<<<<<<<< * while c_node is not NULL: * c_node_next = _nextElement(c_node) */ - __Pyx_TraceLine(900,0,__PYX_ERR(0, 900, __pyx_L1_error)) __pyx_v_c_node = __pyx_f_4lxml_5etree__nextElement(__pyx_v_c_node); - /* "lxml/etree.pyx":899 + /* "lxml/etree.pyx":897 * c_node = c_node.children * if c_node is not NULL: * if not _isElement(c_node): # <<<<<<<<<<<<<< @@ -57498,53 +54299,49 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_22clear(struct LxmlElement *__p */ } - /* "lxml/etree.pyx":901 + /* "lxml/etree.pyx":899 * if not _isElement(c_node): * c_node = _nextElement(c_node) * while c_node is not NULL: # <<<<<<<<<<<<<< * c_node_next = _nextElement(c_node) * _removeNode(self._doc, c_node) */ - __Pyx_TraceLine(901,0,__PYX_ERR(0, 901, __pyx_L1_error)) while (1) { __pyx_t_4 = ((__pyx_v_c_node != NULL) != 0); if (!__pyx_t_4) break; - /* "lxml/etree.pyx":902 + /* "lxml/etree.pyx":900 * c_node = _nextElement(c_node) * while c_node is not NULL: * c_node_next = _nextElement(c_node) # <<<<<<<<<<<<<< * _removeNode(self._doc, c_node) * c_node = c_node_next */ - __Pyx_TraceLine(902,0,__PYX_ERR(0, 902, __pyx_L1_error)) __pyx_v_c_node_next = __pyx_f_4lxml_5etree__nextElement(__pyx_v_c_node); - /* "lxml/etree.pyx":903 + /* "lxml/etree.pyx":901 * while c_node is not NULL: * c_node_next = _nextElement(c_node) * _removeNode(self._doc, c_node) # <<<<<<<<<<<<<< * c_node = c_node_next * */ - __Pyx_TraceLine(903,0,__PYX_ERR(0, 903, __pyx_L1_error)) __pyx_t_5 = ((PyObject *)__pyx_v_self->_doc); __Pyx_INCREF(__pyx_t_5); - __pyx_t_1 = __pyx_f_4lxml_5etree__removeNode(((struct LxmlDocument *)__pyx_t_5), __pyx_v_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 903, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__removeNode(((struct LxmlDocument *)__pyx_t_5), __pyx_v_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 901, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/etree.pyx":904 + /* "lxml/etree.pyx":902 * c_node_next = _nextElement(c_node) * _removeNode(self._doc, c_node) * c_node = c_node_next # <<<<<<<<<<<<<< * * def insert(self, index, _Element element not None): */ - __Pyx_TraceLine(904,0,__PYX_ERR(0, 904, __pyx_L1_error)) __pyx_v_c_node = __pyx_v_c_node_next; } - /* "lxml/etree.pyx":898 + /* "lxml/etree.pyx":896 * # remove all subelements * c_node = c_node.children * if c_node is not NULL: # <<<<<<<<<<<<<< @@ -57553,7 +54350,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_22clear(struct LxmlElement *__p */ } - /* "lxml/etree.pyx":875 + /* "lxml/etree.pyx":873 * _appendChild(self, element) * * def clear(self): # <<<<<<<<<<<<<< @@ -57570,12 +54367,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_22clear(struct LxmlElement *__p __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":906 +/* "lxml/etree.pyx":904 * c_node = c_node_next * * def insert(self, index, _Element element not None): # <<<<<<<<<<<<<< @@ -57586,7 +54382,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_22clear(struct LxmlElement *__p /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_8_Element_25insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_8_Element_24insert[] = "insert(self, index, element)\n\n Inserts a subelement at the given position in this element\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_25insert = {"insert", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_25insert, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_24insert}; +static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_25insert = {"insert", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_25insert, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_24insert}; static PyObject *__pyx_pw_4lxml_5etree_8_Element_25insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_index = 0; struct LxmlElement *__pyx_v_element = 0; @@ -57616,11 +54412,11 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_25insert(PyObject *__pyx_v_self case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_element)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, 1); __PYX_ERR(0, 906, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, 1); __PYX_ERR(0, 904, __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, 906, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "insert") < 0)) __PYX_ERR(0, 904, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -57633,13 +54429,13 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_25insert(PyObject *__pyx_v_self } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 906, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 904, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._Element.insert", __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, 0, "element", 0))) __PYX_ERR(0, 906, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_5etree__Element, 0, "element", 0))) __PYX_ERR(0, 904, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_8_Element_24insert(((struct LxmlElement *)__pyx_v_self), __pyx_v_index, __pyx_v_element); /* function exit code */ @@ -57656,7 +54452,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_24insert(struct LxmlElement *__ xmlNode *__pyx_v_c_next; xmlDoc *__pyx_v_c_source_doc; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; Py_ssize_t __pyx_t_2; @@ -57664,75 +54459,67 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_24insert(struct LxmlElement *__ xmlDoc *__pyx_t_4; xmlNode *__pyx_t_5; PyObject *__pyx_t_6 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__75) __Pyx_RefNannySetupContext("insert", 0); - __Pyx_TraceCall("insert", __pyx_f[0], 906, 0, __PYX_ERR(0, 906, __pyx_L1_error)); - /* "lxml/etree.pyx":914 + /* "lxml/etree.pyx":912 * cdef xmlNode* c_next * cdef xmlDoc* c_source_doc * _assertValidNode(self) # <<<<<<<<<<<<<< * _assertValidNode(element) * c_node = _findChild(self._c_node, index) */ - __Pyx_TraceLine(914,0,__PYX_ERR(0, 914, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 914, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 912, __pyx_L1_error) - /* "lxml/etree.pyx":915 + /* "lxml/etree.pyx":913 * cdef xmlDoc* c_source_doc * _assertValidNode(self) * _assertValidNode(element) # <<<<<<<<<<<<<< * c_node = _findChild(self._c_node, index) * if c_node is NULL: */ - __Pyx_TraceLine(915,0,__PYX_ERR(0, 915, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 915, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 913, __pyx_L1_error) - /* "lxml/etree.pyx":916 + /* "lxml/etree.pyx":914 * _assertValidNode(self) * _assertValidNode(element) * c_node = _findChild(self._c_node, index) # <<<<<<<<<<<<<< * if c_node is NULL: * _appendChild(self, element) */ - __Pyx_TraceLine(916,0,__PYX_ERR(0, 916, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 916, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 914, __pyx_L1_error) __pyx_v_c_node = __pyx_f_4lxml_5etree__findChild(__pyx_v_self->_c_node, __pyx_t_2); - /* "lxml/etree.pyx":917 + /* "lxml/etree.pyx":915 * _assertValidNode(element) * c_node = _findChild(self._c_node, index) * if c_node is NULL: # <<<<<<<<<<<<<< * _appendChild(self, element) * return */ - __Pyx_TraceLine(917,0,__PYX_ERR(0, 917, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":918 + /* "lxml/etree.pyx":916 * c_node = _findChild(self._c_node, index) * if c_node is NULL: * _appendChild(self, element) # <<<<<<<<<<<<<< * return * c_source_doc = element._c_node.doc */ - __Pyx_TraceLine(918,0,__PYX_ERR(0, 918, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__appendChild(__pyx_v_self, __pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 918, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__appendChild(__pyx_v_self, __pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 916, __pyx_L1_error) - /* "lxml/etree.pyx":919 + /* "lxml/etree.pyx":917 * if c_node is NULL: * _appendChild(self, element) * return # <<<<<<<<<<<<<< * c_source_doc = element._c_node.doc * c_next = element._c_node.next */ - __Pyx_TraceLine(919,0,__PYX_ERR(0, 919, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/etree.pyx":917 + /* "lxml/etree.pyx":915 * _assertValidNode(element) * c_node = _findChild(self._c_node, index) * if c_node is NULL: # <<<<<<<<<<<<<< @@ -57741,62 +54528,57 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_24insert(struct LxmlElement *__ */ } - /* "lxml/etree.pyx":920 + /* "lxml/etree.pyx":918 * _appendChild(self, element) * return * c_source_doc = element._c_node.doc # <<<<<<<<<<<<<< * c_next = element._c_node.next * tree.xmlAddPrevSibling(c_node, element._c_node) */ - __Pyx_TraceLine(920,0,__PYX_ERR(0, 920, __pyx_L1_error)) __pyx_t_4 = __pyx_v_element->_c_node->doc; __pyx_v_c_source_doc = __pyx_t_4; - /* "lxml/etree.pyx":921 + /* "lxml/etree.pyx":919 * return * c_source_doc = element._c_node.doc * c_next = element._c_node.next # <<<<<<<<<<<<<< * tree.xmlAddPrevSibling(c_node, element._c_node) * _moveTail(c_next, element._c_node) */ - __Pyx_TraceLine(921,0,__PYX_ERR(0, 921, __pyx_L1_error)) __pyx_t_5 = __pyx_v_element->_c_node->next; __pyx_v_c_next = __pyx_t_5; - /* "lxml/etree.pyx":922 + /* "lxml/etree.pyx":920 * c_source_doc = element._c_node.doc * c_next = element._c_node.next * tree.xmlAddPrevSibling(c_node, element._c_node) # <<<<<<<<<<<<<< * _moveTail(c_next, element._c_node) * moveNodeToDocument(self._doc, c_source_doc, element._c_node) */ - __Pyx_TraceLine(922,0,__PYX_ERR(0, 922, __pyx_L1_error)) (void)(xmlAddPrevSibling(__pyx_v_c_node, __pyx_v_element->_c_node)); - /* "lxml/etree.pyx":923 + /* "lxml/etree.pyx":921 * c_next = element._c_node.next * tree.xmlAddPrevSibling(c_node, element._c_node) * _moveTail(c_next, element._c_node) # <<<<<<<<<<<<<< * moveNodeToDocument(self._doc, c_source_doc, element._c_node) * */ - __Pyx_TraceLine(923,0,__PYX_ERR(0, 923, __pyx_L1_error)) __pyx_f_4lxml_5etree__moveTail(__pyx_v_c_next, __pyx_v_element->_c_node); - /* "lxml/etree.pyx":924 + /* "lxml/etree.pyx":922 * tree.xmlAddPrevSibling(c_node, element._c_node) * _moveTail(c_next, element._c_node) * moveNodeToDocument(self._doc, c_source_doc, element._c_node) # <<<<<<<<<<<<<< * * def remove(self, _Element element not None): */ - __Pyx_TraceLine(924,0,__PYX_ERR(0, 924, __pyx_L1_error)) __pyx_t_6 = ((PyObject *)__pyx_v_self->_doc); __Pyx_INCREF(__pyx_t_6); - __pyx_t_1 = __pyx_f_4lxml_5etree_moveNodeToDocument(((struct LxmlDocument *)__pyx_t_6), __pyx_v_c_source_doc, __pyx_v_element->_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 924, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_moveNodeToDocument(((struct LxmlDocument *)__pyx_t_6), __pyx_v_c_source_doc, __pyx_v_element->_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 922, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "lxml/etree.pyx":906 + /* "lxml/etree.pyx":904 * c_node = c_node_next * * def insert(self, index, _Element element not None): # <<<<<<<<<<<<<< @@ -57813,12 +54595,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_24insert(struct LxmlElement *__ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":926 +/* "lxml/etree.pyx":924 * moveNodeToDocument(self._doc, c_source_doc, element._c_node) * * def remove(self, _Element element not None): # <<<<<<<<<<<<<< @@ -57834,7 +54615,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_27remove(PyObject *__pyx_v_self PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("remove (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_5etree__Element, 0, "element", 0))) __PYX_ERR(0, 926, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_5etree__Element, 0, "element", 0))) __PYX_ERR(0, 924, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_8_Element_26remove(((struct LxmlElement *)__pyx_v_self), ((struct LxmlElement *)__pyx_v_element)); /* function exit code */ @@ -57850,70 +54631,62 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_26remove(struct LxmlElement *__ xmlNode *__pyx_v_c_node; xmlNode *__pyx_v_c_next; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlNode *__pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__76) __Pyx_RefNannySetupContext("remove", 0); - __Pyx_TraceCall("remove", __pyx_f[0], 926, 0, __PYX_ERR(0, 926, __pyx_L1_error)); - /* "lxml/etree.pyx":935 + /* "lxml/etree.pyx":933 * cdef xmlNode* c_node * cdef xmlNode* c_next * _assertValidNode(self) # <<<<<<<<<<<<<< * _assertValidNode(element) * c_node = element._c_node */ - __Pyx_TraceLine(935,0,__PYX_ERR(0, 935, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 935, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 933, __pyx_L1_error) - /* "lxml/etree.pyx":936 + /* "lxml/etree.pyx":934 * cdef xmlNode* c_next * _assertValidNode(self) * _assertValidNode(element) # <<<<<<<<<<<<<< * c_node = element._c_node * if c_node.parent is not self._c_node: */ - __Pyx_TraceLine(936,0,__PYX_ERR(0, 936, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 936, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 934, __pyx_L1_error) - /* "lxml/etree.pyx":937 + /* "lxml/etree.pyx":935 * _assertValidNode(self) * _assertValidNode(element) * c_node = element._c_node # <<<<<<<<<<<<<< * if c_node.parent is not self._c_node: * raise ValueError, u"Element is not a child of this node." */ - __Pyx_TraceLine(937,0,__PYX_ERR(0, 937, __pyx_L1_error)) __pyx_t_2 = __pyx_v_element->_c_node; __pyx_v_c_node = __pyx_t_2; - /* "lxml/etree.pyx":938 + /* "lxml/etree.pyx":936 * _assertValidNode(element) * c_node = element._c_node * if c_node.parent is not self._c_node: # <<<<<<<<<<<<<< * raise ValueError, u"Element is not a child of this node." * c_next = element._c_node.next */ - __Pyx_TraceLine(938,0,__PYX_ERR(0, 938, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_node->parent != __pyx_v_self->_c_node) != 0); if (unlikely(__pyx_t_3)) { - /* "lxml/etree.pyx":939 + /* "lxml/etree.pyx":937 * c_node = element._c_node * if c_node.parent is not self._c_node: * raise ValueError, u"Element is not a child of this node." # <<<<<<<<<<<<<< * c_next = element._c_node.next * tree.xmlUnlinkNode(c_node) */ - __Pyx_TraceLine(939,0,__PYX_ERR(0, 939, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Element_is_not_a_child_of_this_n, 0, 0); - __PYX_ERR(0, 939, __pyx_L1_error) + __PYX_ERR(0, 937, __pyx_L1_error) - /* "lxml/etree.pyx":938 + /* "lxml/etree.pyx":936 * _assertValidNode(element) * c_node = element._c_node * if c_node.parent is not self._c_node: # <<<<<<<<<<<<<< @@ -57922,51 +54695,47 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_26remove(struct LxmlElement *__ */ } - /* "lxml/etree.pyx":940 + /* "lxml/etree.pyx":938 * if c_node.parent is not self._c_node: * raise ValueError, u"Element is not a child of this node." * c_next = element._c_node.next # <<<<<<<<<<<<<< * tree.xmlUnlinkNode(c_node) * _moveTail(c_next, c_node) */ - __Pyx_TraceLine(940,0,__PYX_ERR(0, 940, __pyx_L1_error)) __pyx_t_2 = __pyx_v_element->_c_node->next; __pyx_v_c_next = __pyx_t_2; - /* "lxml/etree.pyx":941 + /* "lxml/etree.pyx":939 * raise ValueError, u"Element is not a child of this node." * c_next = element._c_node.next * tree.xmlUnlinkNode(c_node) # <<<<<<<<<<<<<< * _moveTail(c_next, c_node) * # fix namespace declarations */ - __Pyx_TraceLine(941,0,__PYX_ERR(0, 941, __pyx_L1_error)) xmlUnlinkNode(__pyx_v_c_node); - /* "lxml/etree.pyx":942 + /* "lxml/etree.pyx":940 * c_next = element._c_node.next * tree.xmlUnlinkNode(c_node) * _moveTail(c_next, c_node) # <<<<<<<<<<<<<< * # fix namespace declarations * moveNodeToDocument(self._doc, c_node.doc, c_node) */ - __Pyx_TraceLine(942,0,__PYX_ERR(0, 942, __pyx_L1_error)) __pyx_f_4lxml_5etree__moveTail(__pyx_v_c_next, __pyx_v_c_node); - /* "lxml/etree.pyx":944 + /* "lxml/etree.pyx":942 * _moveTail(c_next, c_node) * # fix namespace declarations * moveNodeToDocument(self._doc, c_node.doc, c_node) # <<<<<<<<<<<<<< * * def replace(self, _Element old_element not None, */ - __Pyx_TraceLine(944,0,__PYX_ERR(0, 944, __pyx_L1_error)) __pyx_t_4 = ((PyObject *)__pyx_v_self->_doc); __Pyx_INCREF(__pyx_t_4); - __pyx_t_1 = __pyx_f_4lxml_5etree_moveNodeToDocument(((struct LxmlDocument *)__pyx_t_4), __pyx_v_c_node->doc, __pyx_v_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 944, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_moveNodeToDocument(((struct LxmlDocument *)__pyx_t_4), __pyx_v_c_node->doc, __pyx_v_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 942, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":926 + /* "lxml/etree.pyx":924 * moveNodeToDocument(self._doc, c_source_doc, element._c_node) * * def remove(self, _Element element not None): # <<<<<<<<<<<<<< @@ -57983,12 +54752,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_26remove(struct LxmlElement *__ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":946 +/* "lxml/etree.pyx":944 * moveNodeToDocument(self._doc, c_node.doc, c_node) * * def replace(self, _Element old_element not None, # <<<<<<<<<<<<<< @@ -57999,7 +54767,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_26remove(struct LxmlElement *__ /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_8_Element_29replace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_8_Element_28replace[] = "replace(self, old_element, new_element)\n\n Replaces a subelement with the element passed as second argument.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_29replace = {"replace", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_29replace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_28replace}; +static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_29replace = {"replace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_29replace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_28replace}; static PyObject *__pyx_pw_4lxml_5etree_8_Element_29replace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct LxmlElement *__pyx_v_old_element = 0; struct LxmlElement *__pyx_v_new_element = 0; @@ -58029,11 +54797,11 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_29replace(PyObject *__pyx_v_sel case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_new_element)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("replace", 1, 2, 2, 1); __PYX_ERR(0, 946, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("replace", 1, 2, 2, 1); __PYX_ERR(0, 944, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "replace") < 0)) __PYX_ERR(0, 946, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "replace") < 0)) __PYX_ERR(0, 944, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -58046,14 +54814,14 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_29replace(PyObject *__pyx_v_sel } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("replace", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 946, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("replace", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 944, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._Element.replace", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old_element), __pyx_ptype_4lxml_5etree__Element, 0, "old_element", 0))) __PYX_ERR(0, 946, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_element), __pyx_ptype_4lxml_5etree__Element, 0, "new_element", 0))) __PYX_ERR(0, 947, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old_element), __pyx_ptype_4lxml_5etree__Element, 0, "old_element", 0))) __PYX_ERR(0, 944, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_element), __pyx_ptype_4lxml_5etree__Element, 0, "new_element", 0))) __PYX_ERR(0, 945, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_8_Element_28replace(((struct LxmlElement *)__pyx_v_self), __pyx_v_old_element, __pyx_v_new_element); /* function exit code */ @@ -58072,81 +54840,72 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_28replace(struct LxmlElement *_ xmlNode *__pyx_v_c_new_next; xmlDoc *__pyx_v_c_source_doc; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlNode *__pyx_t_2; int __pyx_t_3; xmlDoc *__pyx_t_4; PyObject *__pyx_t_5 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__77) __Pyx_RefNannySetupContext("replace", 0); - __Pyx_TraceCall("replace", __pyx_f[0], 946, 0, __PYX_ERR(0, 946, __pyx_L1_error)); - /* "lxml/etree.pyx":957 + /* "lxml/etree.pyx":955 * cdef xmlNode* c_new_next * cdef xmlDoc* c_source_doc * _assertValidNode(self) # <<<<<<<<<<<<<< * _assertValidNode(old_element) * _assertValidNode(new_element) */ - __Pyx_TraceLine(957,0,__PYX_ERR(0, 957, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 957, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 955, __pyx_L1_error) - /* "lxml/etree.pyx":958 + /* "lxml/etree.pyx":956 * cdef xmlDoc* c_source_doc * _assertValidNode(self) * _assertValidNode(old_element) # <<<<<<<<<<<<<< * _assertValidNode(new_element) * c_old_node = old_element._c_node */ - __Pyx_TraceLine(958,0,__PYX_ERR(0, 958, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_old_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 958, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_old_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 956, __pyx_L1_error) - /* "lxml/etree.pyx":959 + /* "lxml/etree.pyx":957 * _assertValidNode(self) * _assertValidNode(old_element) * _assertValidNode(new_element) # <<<<<<<<<<<<<< * c_old_node = old_element._c_node * if c_old_node.parent is not self._c_node: */ - __Pyx_TraceLine(959,0,__PYX_ERR(0, 959, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_new_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 959, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_new_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 957, __pyx_L1_error) - /* "lxml/etree.pyx":960 + /* "lxml/etree.pyx":958 * _assertValidNode(old_element) * _assertValidNode(new_element) * c_old_node = old_element._c_node # <<<<<<<<<<<<<< * if c_old_node.parent is not self._c_node: * raise ValueError, u"Element is not a child of this node." */ - __Pyx_TraceLine(960,0,__PYX_ERR(0, 960, __pyx_L1_error)) __pyx_t_2 = __pyx_v_old_element->_c_node; __pyx_v_c_old_node = __pyx_t_2; - /* "lxml/etree.pyx":961 + /* "lxml/etree.pyx":959 * _assertValidNode(new_element) * c_old_node = old_element._c_node * if c_old_node.parent is not self._c_node: # <<<<<<<<<<<<<< * raise ValueError, u"Element is not a child of this node." * c_old_next = c_old_node.next */ - __Pyx_TraceLine(961,0,__PYX_ERR(0, 961, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_old_node->parent != __pyx_v_self->_c_node) != 0); if (unlikely(__pyx_t_3)) { - /* "lxml/etree.pyx":962 + /* "lxml/etree.pyx":960 * c_old_node = old_element._c_node * if c_old_node.parent is not self._c_node: * raise ValueError, u"Element is not a child of this node." # <<<<<<<<<<<<<< * c_old_next = c_old_node.next * c_new_node = new_element._c_node */ - __Pyx_TraceLine(962,0,__PYX_ERR(0, 962, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Element_is_not_a_child_of_this_n, 0, 0); - __PYX_ERR(0, 962, __pyx_L1_error) + __PYX_ERR(0, 960, __pyx_L1_error) - /* "lxml/etree.pyx":961 + /* "lxml/etree.pyx":959 * _assertValidNode(new_element) * c_old_node = old_element._c_node * if c_old_node.parent is not self._c_node: # <<<<<<<<<<<<<< @@ -58155,107 +54914,98 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_28replace(struct LxmlElement *_ */ } - /* "lxml/etree.pyx":963 + /* "lxml/etree.pyx":961 * if c_old_node.parent is not self._c_node: * raise ValueError, u"Element is not a child of this node." * c_old_next = c_old_node.next # <<<<<<<<<<<<<< * c_new_node = new_element._c_node * c_new_next = c_new_node.next */ - __Pyx_TraceLine(963,0,__PYX_ERR(0, 963, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_old_node->next; __pyx_v_c_old_next = __pyx_t_2; - /* "lxml/etree.pyx":964 + /* "lxml/etree.pyx":962 * raise ValueError, u"Element is not a child of this node." * c_old_next = c_old_node.next * c_new_node = new_element._c_node # <<<<<<<<<<<<<< * c_new_next = c_new_node.next * c_source_doc = c_new_node.doc */ - __Pyx_TraceLine(964,0,__PYX_ERR(0, 964, __pyx_L1_error)) __pyx_t_2 = __pyx_v_new_element->_c_node; __pyx_v_c_new_node = __pyx_t_2; - /* "lxml/etree.pyx":965 + /* "lxml/etree.pyx":963 * c_old_next = c_old_node.next * c_new_node = new_element._c_node * c_new_next = c_new_node.next # <<<<<<<<<<<<<< * c_source_doc = c_new_node.doc * tree.xmlReplaceNode(c_old_node, c_new_node) */ - __Pyx_TraceLine(965,0,__PYX_ERR(0, 965, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_new_node->next; __pyx_v_c_new_next = __pyx_t_2; - /* "lxml/etree.pyx":966 + /* "lxml/etree.pyx":964 * c_new_node = new_element._c_node * c_new_next = c_new_node.next * c_source_doc = c_new_node.doc # <<<<<<<<<<<<<< * tree.xmlReplaceNode(c_old_node, c_new_node) * _moveTail(c_new_next, c_new_node) */ - __Pyx_TraceLine(966,0,__PYX_ERR(0, 966, __pyx_L1_error)) __pyx_t_4 = __pyx_v_c_new_node->doc; __pyx_v_c_source_doc = __pyx_t_4; - /* "lxml/etree.pyx":967 + /* "lxml/etree.pyx":965 * c_new_next = c_new_node.next * c_source_doc = c_new_node.doc * tree.xmlReplaceNode(c_old_node, c_new_node) # <<<<<<<<<<<<<< * _moveTail(c_new_next, c_new_node) * _moveTail(c_old_next, c_old_node) */ - __Pyx_TraceLine(967,0,__PYX_ERR(0, 967, __pyx_L1_error)) (void)(xmlReplaceNode(__pyx_v_c_old_node, __pyx_v_c_new_node)); - /* "lxml/etree.pyx":968 + /* "lxml/etree.pyx":966 * c_source_doc = c_new_node.doc * tree.xmlReplaceNode(c_old_node, c_new_node) * _moveTail(c_new_next, c_new_node) # <<<<<<<<<<<<<< * _moveTail(c_old_next, c_old_node) * moveNodeToDocument(self._doc, c_source_doc, c_new_node) */ - __Pyx_TraceLine(968,0,__PYX_ERR(0, 968, __pyx_L1_error)) __pyx_f_4lxml_5etree__moveTail(__pyx_v_c_new_next, __pyx_v_c_new_node); - /* "lxml/etree.pyx":969 + /* "lxml/etree.pyx":967 * tree.xmlReplaceNode(c_old_node, c_new_node) * _moveTail(c_new_next, c_new_node) * _moveTail(c_old_next, c_old_node) # <<<<<<<<<<<<<< * moveNodeToDocument(self._doc, c_source_doc, c_new_node) * # fix namespace declarations */ - __Pyx_TraceLine(969,0,__PYX_ERR(0, 969, __pyx_L1_error)) __pyx_f_4lxml_5etree__moveTail(__pyx_v_c_old_next, __pyx_v_c_old_node); - /* "lxml/etree.pyx":970 + /* "lxml/etree.pyx":968 * _moveTail(c_new_next, c_new_node) * _moveTail(c_old_next, c_old_node) * moveNodeToDocument(self._doc, c_source_doc, c_new_node) # <<<<<<<<<<<<<< * # fix namespace declarations * moveNodeToDocument(self._doc, c_old_node.doc, c_old_node) */ - __Pyx_TraceLine(970,0,__PYX_ERR(0, 970, __pyx_L1_error)) __pyx_t_5 = ((PyObject *)__pyx_v_self->_doc); __Pyx_INCREF(__pyx_t_5); - __pyx_t_1 = __pyx_f_4lxml_5etree_moveNodeToDocument(((struct LxmlDocument *)__pyx_t_5), __pyx_v_c_source_doc, __pyx_v_c_new_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 970, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_moveNodeToDocument(((struct LxmlDocument *)__pyx_t_5), __pyx_v_c_source_doc, __pyx_v_c_new_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 968, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/etree.pyx":972 + /* "lxml/etree.pyx":970 * moveNodeToDocument(self._doc, c_source_doc, c_new_node) * # fix namespace declarations * moveNodeToDocument(self._doc, c_old_node.doc, c_old_node) # <<<<<<<<<<<<<< * * # PROPERTIES */ - __Pyx_TraceLine(972,0,__PYX_ERR(0, 972, __pyx_L1_error)) __pyx_t_5 = ((PyObject *)__pyx_v_self->_doc); __Pyx_INCREF(__pyx_t_5); - __pyx_t_1 = __pyx_f_4lxml_5etree_moveNodeToDocument(((struct LxmlDocument *)__pyx_t_5), __pyx_v_c_old_node->doc, __pyx_v_c_old_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 972, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_moveNodeToDocument(((struct LxmlDocument *)__pyx_t_5), __pyx_v_c_old_node->doc, __pyx_v_c_old_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 970, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/etree.pyx":946 + /* "lxml/etree.pyx":944 * moveNodeToDocument(self._doc, c_node.doc, c_node) * * def replace(self, _Element old_element not None, # <<<<<<<<<<<<<< @@ -58272,12 +55022,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_28replace(struct LxmlElement *_ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":978 +/* "lxml/etree.pyx":976 * u"""Element tag * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -58300,41 +55049,37 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_3tag_1__get__(PyObject *__pyx_v static PyObject *__pyx_pf_4lxml_5etree_8_Element_3tag___get__(struct LxmlElement *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 978, 0, __PYX_ERR(0, 978, __pyx_L1_error)); - /* "lxml/etree.pyx":979 + /* "lxml/etree.pyx":977 * """ * def __get__(self): * if self._tag is not None: # <<<<<<<<<<<<<< * return self._tag * _assertValidNode(self) */ - __Pyx_TraceLine(979,0,__PYX_ERR(0, 979, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_tag != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":980 + /* "lxml/etree.pyx":978 * def __get__(self): * if self._tag is not None: * return self._tag # <<<<<<<<<<<<<< * _assertValidNode(self) * self._tag = _namespacedName(self._c_node) */ - __Pyx_TraceLine(980,0,__PYX_ERR(0, 980, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_tag); __pyx_r = __pyx_v_self->_tag; goto __pyx_L0; - /* "lxml/etree.pyx":979 + /* "lxml/etree.pyx":977 * """ * def __get__(self): * if self._tag is not None: # <<<<<<<<<<<<<< @@ -58343,25 +55088,23 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_3tag___get__(struct LxmlElement */ } - /* "lxml/etree.pyx":981 + /* "lxml/etree.pyx":979 * if self._tag is not None: * return self._tag * _assertValidNode(self) # <<<<<<<<<<<<<< * self._tag = _namespacedName(self._c_node) * return self._tag */ - __Pyx_TraceLine(981,0,__PYX_ERR(0, 981, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 981, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 979, __pyx_L1_error) - /* "lxml/etree.pyx":982 + /* "lxml/etree.pyx":980 * return self._tag * _assertValidNode(self) * self._tag = _namespacedName(self._c_node) # <<<<<<<<<<<<<< * return self._tag * */ - __Pyx_TraceLine(982,0,__PYX_ERR(0, 982, __pyx_L1_error)) - __pyx_t_4 = __pyx_f_4lxml_5etree__namespacedName(__pyx_v_self->_c_node); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 982, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__namespacedName(__pyx_v_self->_c_node); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 980, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->_tag); @@ -58369,20 +55112,19 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_3tag___get__(struct LxmlElement __pyx_v_self->_tag = __pyx_t_4; __pyx_t_4 = 0; - /* "lxml/etree.pyx":983 + /* "lxml/etree.pyx":981 * _assertValidNode(self) * self._tag = _namespacedName(self._c_node) * return self._tag # <<<<<<<<<<<<<< * * def __set__(self, value): */ - __Pyx_TraceLine(983,0,__PYX_ERR(0, 983, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_tag); __pyx_r = __pyx_v_self->_tag; goto __pyx_L0; - /* "lxml/etree.pyx":978 + /* "lxml/etree.pyx":976 * u"""Element tag * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -58397,12 +55139,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_3tag___get__(struct LxmlElement __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":985 +/* "lxml/etree.pyx":983 * return self._tag * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -58428,7 +55169,6 @@ static int __pyx_pf_4lxml_5etree_8_Element_3tag_2__set__(struct LxmlElement *__p PyObject *__pyx_v_ns = NULL; PyObject *__pyx_v_name = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -58438,27 +55178,24 @@ static int __pyx_pf_4lxml_5etree_8_Element_3tag_2__set__(struct LxmlElement *__p int __pyx_t_6; int __pyx_t_7; __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[0], 985, 0, __PYX_ERR(0, 985, __pyx_L1_error)); - /* "lxml/etree.pyx":987 + /* "lxml/etree.pyx":985 * def __set__(self, value): * cdef _BaseParser parser * _assertValidNode(self) # <<<<<<<<<<<<<< * ns, name = _getNsTag(value) * parser = self._doc._parser */ - __Pyx_TraceLine(987,0,__PYX_ERR(0, 987, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 987, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 985, __pyx_L1_error) - /* "lxml/etree.pyx":988 + /* "lxml/etree.pyx":986 * cdef _BaseParser parser * _assertValidNode(self) * ns, name = _getNsTag(value) # <<<<<<<<<<<<<< * parser = self._doc._parser * if parser is not None and parser._for_html: */ - __Pyx_TraceLine(988,0,__PYX_ERR(0, 988, __pyx_L1_error)) - __pyx_t_2 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 988, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (likely(__pyx_t_2 != Py_None)) { PyObject* sequence = __pyx_t_2; @@ -58466,7 +55203,7 @@ static int __pyx_pf_4lxml_5etree_8_Element_3tag_2__set__(struct LxmlElement *__p if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 988, __pyx_L1_error) + __PYX_ERR(0, 986, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); @@ -58474,41 +55211,39 @@ static int __pyx_pf_4lxml_5etree_8_Element_3tag_2__set__(struct LxmlElement *__p __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, 988, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 988, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 988, __pyx_L1_error) + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 986, __pyx_L1_error) } __pyx_v_ns = __pyx_t_3; __pyx_t_3 = 0; __pyx_v_name = __pyx_t_4; __pyx_t_4 = 0; - /* "lxml/etree.pyx":989 + /* "lxml/etree.pyx":987 * _assertValidNode(self) * ns, name = _getNsTag(value) * parser = self._doc._parser # <<<<<<<<<<<<<< * if parser is not None and parser._for_html: * _htmlTagValidOrRaise(name) */ - __Pyx_TraceLine(989,0,__PYX_ERR(0, 989, __pyx_L1_error)) __pyx_t_2 = ((PyObject *)__pyx_v_self->_doc->_parser); __Pyx_INCREF(__pyx_t_2); __pyx_v_parser = ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":990 + /* "lxml/etree.pyx":988 * ns, name = _getNsTag(value) * parser = self._doc._parser * if parser is not None and parser._for_html: # <<<<<<<<<<<<<< * _htmlTagValidOrRaise(name) * else: */ - __Pyx_TraceLine(990,0,__PYX_ERR(0, 990, __pyx_L1_error)) __pyx_t_6 = (((PyObject *)__pyx_v_parser) != Py_None); __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { @@ -58521,17 +55256,16 @@ static int __pyx_pf_4lxml_5etree_8_Element_3tag_2__set__(struct LxmlElement *__p __pyx_L4_bool_binop_done:; if (__pyx_t_5) { - /* "lxml/etree.pyx":991 + /* "lxml/etree.pyx":989 * parser = self._doc._parser * if parser is not None and parser._for_html: * _htmlTagValidOrRaise(name) # <<<<<<<<<<<<<< * else: * _tagValidOrRaise(name) */ - __Pyx_TraceLine(991,0,__PYX_ERR(0, 991, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__htmlTagValidOrRaise(__pyx_v_name); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 991, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__htmlTagValidOrRaise(__pyx_v_name); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 989, __pyx_L1_error) - /* "lxml/etree.pyx":990 + /* "lxml/etree.pyx":988 * ns, name = _getNsTag(value) * parser = self._doc._parser * if parser is not None and parser._for_html: # <<<<<<<<<<<<<< @@ -58541,66 +55275,61 @@ static int __pyx_pf_4lxml_5etree_8_Element_3tag_2__set__(struct LxmlElement *__p goto __pyx_L3; } - /* "lxml/etree.pyx":993 + /* "lxml/etree.pyx":991 * _htmlTagValidOrRaise(name) * else: * _tagValidOrRaise(name) # <<<<<<<<<<<<<< * self._tag = value * tree.xmlNodeSetName(self._c_node, _xcstr(name)) */ - __Pyx_TraceLine(993,0,__PYX_ERR(0, 993, __pyx_L1_error)) /*else*/ { - __pyx_t_1 = __pyx_f_4lxml_5etree__tagValidOrRaise(__pyx_v_name); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 993, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__tagValidOrRaise(__pyx_v_name); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 991, __pyx_L1_error) } __pyx_L3:; - /* "lxml/etree.pyx":994 + /* "lxml/etree.pyx":992 * else: * _tagValidOrRaise(name) * self._tag = value # <<<<<<<<<<<<<< * tree.xmlNodeSetName(self._c_node, _xcstr(name)) * if ns is None: */ - __Pyx_TraceLine(994,0,__PYX_ERR(0, 994, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->_tag); __Pyx_DECREF(__pyx_v_self->_tag); __pyx_v_self->_tag = __pyx_v_value; - /* "lxml/etree.pyx":995 + /* "lxml/etree.pyx":993 * _tagValidOrRaise(name) * self._tag = value * tree.xmlNodeSetName(self._c_node, _xcstr(name)) # <<<<<<<<<<<<<< * if ns is None: * self._c_node.ns = NULL */ - __Pyx_TraceLine(995,0,__PYX_ERR(0, 995, __pyx_L1_error)) xmlNodeSetName(__pyx_v_self->_c_node, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_name)); - /* "lxml/etree.pyx":996 + /* "lxml/etree.pyx":994 * self._tag = value * tree.xmlNodeSetName(self._c_node, _xcstr(name)) * if ns is None: # <<<<<<<<<<<<<< * self._c_node.ns = NULL * else: */ - __Pyx_TraceLine(996,0,__PYX_ERR(0, 996, __pyx_L1_error)) __pyx_t_5 = (__pyx_v_ns == Py_None); __pyx_t_7 = (__pyx_t_5 != 0); if (__pyx_t_7) { - /* "lxml/etree.pyx":997 + /* "lxml/etree.pyx":995 * tree.xmlNodeSetName(self._c_node, _xcstr(name)) * if ns is None: * self._c_node.ns = NULL # <<<<<<<<<<<<<< * else: * self._doc._setNodeNs(self._c_node, _xcstr(ns)) */ - __Pyx_TraceLine(997,0,__PYX_ERR(0, 997, __pyx_L1_error)) __pyx_v_self->_c_node->ns = NULL; - /* "lxml/etree.pyx":996 + /* "lxml/etree.pyx":994 * self._tag = value * tree.xmlNodeSetName(self._c_node, _xcstr(name)) * if ns is None: # <<<<<<<<<<<<<< @@ -58610,20 +55339,19 @@ static int __pyx_pf_4lxml_5etree_8_Element_3tag_2__set__(struct LxmlElement *__p goto __pyx_L6; } - /* "lxml/etree.pyx":999 + /* "lxml/etree.pyx":997 * self._c_node.ns = NULL * else: * self._doc._setNodeNs(self._c_node, _xcstr(ns)) # <<<<<<<<<<<<<< * * property attrib: */ - __Pyx_TraceLine(999,0,__PYX_ERR(0, 999, __pyx_L1_error)) /*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, 999, __pyx_L1_error) + __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) } __pyx_L6:; - /* "lxml/etree.pyx":985 + /* "lxml/etree.pyx":983 * return self._tag * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -58644,12 +55372,11 @@ static int __pyx_pf_4lxml_5etree_8_Element_3tag_2__set__(struct LxmlElement *__p __Pyx_XDECREF((PyObject *)__pyx_v_parser); __Pyx_XDECREF(__pyx_v_ns); __Pyx_XDECREF(__pyx_v_name); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1005 +/* "lxml/etree.pyx":1003 * keys(), values() and items() to access element attributes. * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -58672,35 +55399,32 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_6attrib_1__get__(PyObject *__py static PyObject *__pyx_pf_4lxml_5etree_8_Element_6attrib___get__(struct LxmlElement *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 1005, 0, __PYX_ERR(0, 1005, __pyx_L1_error)); - /* "lxml/etree.pyx":1006 + /* "lxml/etree.pyx":1004 * """ * def __get__(self): * return _Attrib.__new__(_Attrib, self) # <<<<<<<<<<<<<< * * property text: */ - __Pyx_TraceLine(1006,0,__PYX_ERR(0, 1006, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1004, __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 = ((PyObject *)__pyx_tp_new_4lxml_5etree__Attrib(((PyTypeObject *)__pyx_ptype_4lxml_5etree__Attrib), __pyx_t_1, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1006, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_tp_new_4lxml_5etree__Attrib(((PyTypeObject *)__pyx_ptype_4lxml_5etree__Attrib), __pyx_t_1, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1004, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1005 + /* "lxml/etree.pyx":1003 * keys(), values() and items() to access element attributes. * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -58716,12 +55440,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_6attrib___get__(struct LxmlElem __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1012 +/* "lxml/etree.pyx":1010 * the value None, if there was no text. * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -58744,39 +55467,35 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_4text_1__get__(PyObject *__pyx_ static PyObject *__pyx_pf_4lxml_5etree_8_Element_4text___get__(struct LxmlElement *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 1012, 0, __PYX_ERR(0, 1012, __pyx_L1_error)); - /* "lxml/etree.pyx":1013 + /* "lxml/etree.pyx":1011 * """ * def __get__(self): * _assertValidNode(self) # <<<<<<<<<<<<<< * return _collectText(self._c_node.children) * */ - __Pyx_TraceLine(1013,0,__PYX_ERR(0, 1013, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1013, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1011, __pyx_L1_error) - /* "lxml/etree.pyx":1014 + /* "lxml/etree.pyx":1012 * def __get__(self): * _assertValidNode(self) * return _collectText(self._c_node.children) # <<<<<<<<<<<<<< * * def __set__(self, value): */ - __Pyx_TraceLine(1014,0,__PYX_ERR(0, 1014, __pyx_L1_error)) __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(0, 1014, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__collectText(__pyx_v_self->_c_node->children); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1012, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1012 + /* "lxml/etree.pyx":1010 * the value None, if there was no text. * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -58791,12 +55510,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_4text___get__(struct LxmlElemen __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1016 +/* "lxml/etree.pyx":1014 * return _collectText(self._c_node.children) * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -58819,7 +55537,6 @@ static int __pyx_pw_4lxml_5etree_8_Element_4text_3__set__(PyObject *__pyx_v_self static int __pyx_pf_4lxml_5etree_8_Element_4text_2__set__(struct LxmlElement *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -58827,52 +55544,48 @@ static int __pyx_pf_4lxml_5etree_8_Element_4text_2__set__(struct LxmlElement *__ PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[0], 1016, 0, __PYX_ERR(0, 1016, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_value); - /* "lxml/etree.pyx":1017 + /* "lxml/etree.pyx":1015 * * def __set__(self, value): * _assertValidNode(self) # <<<<<<<<<<<<<< * if isinstance(value, QName): * value = _resolveQNameText(self, value).decode('utf8') */ - __Pyx_TraceLine(1017,0,__PYX_ERR(0, 1017, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1017, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1015, __pyx_L1_error) - /* "lxml/etree.pyx":1018 + /* "lxml/etree.pyx":1016 * def __set__(self, value): * _assertValidNode(self) * if isinstance(value, QName): # <<<<<<<<<<<<<< * value = _resolveQNameText(self, value).decode('utf8') * _setNodeText(self._c_node, value) */ - __Pyx_TraceLine(1018,0,__PYX_ERR(0, 1018, __pyx_L1_error)) __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_4lxml_5etree_QName); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":1019 + /* "lxml/etree.pyx":1017 * _assertValidNode(self) * if isinstance(value, QName): * value = _resolveQNameText(self, value).decode('utf8') # <<<<<<<<<<<<<< * _setNodeText(self._c_node, value) * */ - __Pyx_TraceLine(1019,0,__PYX_ERR(0, 1019, __pyx_L1_error)) - __pyx_t_4 = __pyx_f_4lxml_5etree__resolveQNameText(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1019, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__resolveQNameText(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(__pyx_t_4 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); - __PYX_ERR(0, 1019, __pyx_L1_error) + __PYX_ERR(0, 1017, __pyx_L1_error) } - __pyx_t_5 = __Pyx_decode_bytes(__pyx_t_4, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1019, __pyx_L1_error) + __pyx_t_5 = __Pyx_decode_bytes(__pyx_t_4, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_5); __pyx_t_5 = 0; - /* "lxml/etree.pyx":1018 + /* "lxml/etree.pyx":1016 * def __set__(self, value): * _assertValidNode(self) * if isinstance(value, QName): # <<<<<<<<<<<<<< @@ -58881,17 +55594,16 @@ static int __pyx_pf_4lxml_5etree_8_Element_4text_2__set__(struct LxmlElement *__ */ } - /* "lxml/etree.pyx":1020 + /* "lxml/etree.pyx":1018 * if isinstance(value, QName): * value = _resolveQNameText(self, value).decode('utf8') * _setNodeText(self._c_node, value) # <<<<<<<<<<<<<< * * # using 'del el.text' is the wrong thing to do */ - __Pyx_TraceLine(1020,0,__PYX_ERR(0, 1020, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__setNodeText(__pyx_v_self->_c_node, __pyx_v_value); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1020, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__setNodeText(__pyx_v_self->_c_node, __pyx_v_value); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1018, __pyx_L1_error) - /* "lxml/etree.pyx":1016 + /* "lxml/etree.pyx":1014 * return _collectText(self._c_node.children) * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -58909,12 +55621,11 @@ static int __pyx_pf_4lxml_5etree_8_Element_4text_2__set__(struct LxmlElement *__ __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_value); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1031 +/* "lxml/etree.pyx":1029 * there was no text. * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -58937,39 +55648,35 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_4tail_1__get__(PyObject *__pyx_ static PyObject *__pyx_pf_4lxml_5etree_8_Element_4tail___get__(struct LxmlElement *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 1031, 0, __PYX_ERR(0, 1031, __pyx_L1_error)); - /* "lxml/etree.pyx":1032 + /* "lxml/etree.pyx":1030 * """ * def __get__(self): * _assertValidNode(self) # <<<<<<<<<<<<<< * return _collectText(self._c_node.next) * */ - __Pyx_TraceLine(1032,0,__PYX_ERR(0, 1032, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1032, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1030, __pyx_L1_error) - /* "lxml/etree.pyx":1033 + /* "lxml/etree.pyx":1031 * def __get__(self): * _assertValidNode(self) * return _collectText(self._c_node.next) # <<<<<<<<<<<<<< * * def __set__(self, value): */ - __Pyx_TraceLine(1033,0,__PYX_ERR(0, 1033, __pyx_L1_error)) __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(0, 1033, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__collectText(__pyx_v_self->_c_node->next); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1031 + /* "lxml/etree.pyx":1029 * there was no text. * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -58984,12 +55691,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_4tail___get__(struct LxmlElemen __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1035 +/* "lxml/etree.pyx":1033 * return _collectText(self._c_node.next) * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -59012,33 +55718,29 @@ static int __pyx_pw_4lxml_5etree_8_Element_4tail_3__set__(PyObject *__pyx_v_self static int __pyx_pf_4lxml_5etree_8_Element_4tail_2__set__(struct LxmlElement *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[0], 1035, 0, __PYX_ERR(0, 1035, __pyx_L1_error)); - /* "lxml/etree.pyx":1036 + /* "lxml/etree.pyx":1034 * * def __set__(self, value): * _assertValidNode(self) # <<<<<<<<<<<<<< * _setTailText(self._c_node, value) * */ - __Pyx_TraceLine(1036,0,__PYX_ERR(0, 1036, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1036, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1034, __pyx_L1_error) - /* "lxml/etree.pyx":1037 + /* "lxml/etree.pyx":1035 * def __set__(self, value): * _assertValidNode(self) * _setTailText(self._c_node, value) # <<<<<<<<<<<<<< * * # using 'del el.tail' is the wrong thing to do */ - __Pyx_TraceLine(1037,0,__PYX_ERR(0, 1037, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__setTailText(__pyx_v_self->_c_node, __pyx_v_value); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1037, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__setTailText(__pyx_v_self->_c_node, __pyx_v_value); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1035, __pyx_L1_error) - /* "lxml/etree.pyx":1035 + /* "lxml/etree.pyx":1033 * return _collectText(self._c_node.next) * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -59053,12 +55755,11 @@ static int __pyx_pf_4lxml_5etree_8_Element_4tail_2__set__(struct LxmlElement *__ __Pyx_AddTraceback("lxml.etree._Element.tail.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1047 +/* "lxml/etree.pyx":1045 * u"""Namespace prefix or None. * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -59081,51 +55782,46 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_6prefix_1__get__(PyObject *__py static PyObject *__pyx_pf_4lxml_5etree_8_Element_6prefix___get__(struct LxmlElement *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 1047, 0, __PYX_ERR(0, 1047, __pyx_L1_error)); - /* "lxml/etree.pyx":1048 + /* "lxml/etree.pyx":1046 * """ * 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) */ - __Pyx_TraceLine(1048,0,__PYX_ERR(0, 1048, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_c_node->ns != NULL) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":1049 + /* "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 */ - __Pyx_TraceLine(1049,0,__PYX_ERR(0, 1049, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_c_node->ns->prefix != NULL) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":1050 + /* "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 * */ - __Pyx_TraceLine(1050,0,__PYX_ERR(0, 1050, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->_c_node->ns->prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1050, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->_c_node->ns->prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1048, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1049 + /* "lxml/etree.pyx":1047 * def __get__(self): * if self._c_node.ns is not NULL: * if self._c_node.ns.prefix is not NULL: # <<<<<<<<<<<<<< @@ -59134,7 +55830,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_6prefix___get__(struct LxmlElem */ } - /* "lxml/etree.pyx":1048 + /* "lxml/etree.pyx":1046 * """ * def __get__(self): * if self._c_node.ns is not NULL: # <<<<<<<<<<<<<< @@ -59143,19 +55839,18 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_6prefix___get__(struct LxmlElem */ } - /* "lxml/etree.pyx":1051 + /* "lxml/etree.pyx":1049 * if self._c_node.ns.prefix is not NULL: * return funicode(self._c_node.ns.prefix) * return None # <<<<<<<<<<<<<< * * # not in ElementTree, read-only */ - __Pyx_TraceLine(1051,0,__PYX_ERR(0, 1051, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/etree.pyx":1047 + /* "lxml/etree.pyx":1045 * u"""Namespace prefix or None. * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -59170,12 +55865,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_6prefix___get__(struct LxmlElem __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1057 +/* "lxml/etree.pyx":1055 * u"""Original line number as found by the parser or None if unknown. * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -59199,45 +55893,40 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_10sourceline_1__get__(PyObject static PyObject *__pyx_pf_4lxml_5etree_8_Element_10sourceline___get__(struct LxmlElement *__pyx_v_self) { long __pyx_v_line; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 1057, 0, __PYX_ERR(0, 1057, __pyx_L1_error)); - /* "lxml/etree.pyx":1059 + /* "lxml/etree.pyx":1057 * def __get__(self): * cdef long line * _assertValidNode(self) # <<<<<<<<<<<<<< * line = tree.xmlGetLineNo(self._c_node) * return line if line > 0 else None */ - __Pyx_TraceLine(1059,0,__PYX_ERR(0, 1059, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1059, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1057, __pyx_L1_error) - /* "lxml/etree.pyx":1060 + /* "lxml/etree.pyx":1058 * cdef long line * _assertValidNode(self) * line = tree.xmlGetLineNo(self._c_node) # <<<<<<<<<<<<<< * return line if line > 0 else None * */ - __Pyx_TraceLine(1060,0,__PYX_ERR(0, 1060, __pyx_L1_error)) __pyx_v_line = xmlGetLineNo(__pyx_v_self->_c_node); - /* "lxml/etree.pyx":1061 + /* "lxml/etree.pyx":1059 * _assertValidNode(self) * line = tree.xmlGetLineNo(self._c_node) * return line if line > 0 else None # <<<<<<<<<<<<<< * * def __set__(self, line): */ - __Pyx_TraceLine(1061,0,__PYX_ERR(0, 1061, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); if (((__pyx_v_line > 0) != 0)) { - __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1061, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1059, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; @@ -59249,7 +55938,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_10sourceline___get__(struct Lxm __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1057 + /* "lxml/etree.pyx":1055 * u"""Original line number as found by the parser or None if unknown. * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -59265,12 +55954,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_10sourceline___get__(struct Lxm __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1063 +/* "lxml/etree.pyx":1061 * return line if line > 0 else None * * def __set__(self, line): # <<<<<<<<<<<<<< @@ -59293,49 +55981,44 @@ static int __pyx_pw_4lxml_5etree_8_Element_10sourceline_3__set__(PyObject *__pyx static int __pyx_pf_4lxml_5etree_8_Element_10sourceline_2__set__(struct LxmlElement *__pyx_v_self, PyObject *__pyx_v_line) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; unsigned short __pyx_t_4; __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[0], 1063, 0, __PYX_ERR(0, 1063, __pyx_L1_error)); - /* "lxml/etree.pyx":1064 + /* "lxml/etree.pyx":1062 * * def __set__(self, line): * _assertValidNode(self) # <<<<<<<<<<<<<< * if line <= 0: * self._c_node.line = 0 */ - __Pyx_TraceLine(1064,0,__PYX_ERR(0, 1064, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1064, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1062, __pyx_L1_error) - /* "lxml/etree.pyx":1065 + /* "lxml/etree.pyx":1063 * def __set__(self, line): * _assertValidNode(self) * if line <= 0: # <<<<<<<<<<<<<< * self._c_node.line = 0 * else: */ - __Pyx_TraceLine(1065,0,__PYX_ERR(0, 1065, __pyx_L1_error)) - __pyx_t_2 = PyObject_RichCompare(__pyx_v_line, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1065, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1065, __pyx_L1_error) + __pyx_t_2 = PyObject_RichCompare(__pyx_v_line, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1063, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1063, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { - /* "lxml/etree.pyx":1066 + /* "lxml/etree.pyx":1064 * _assertValidNode(self) * if line <= 0: * self._c_node.line = 0 # <<<<<<<<<<<<<< * else: * self._c_node.line = line */ - __Pyx_TraceLine(1066,0,__PYX_ERR(0, 1066, __pyx_L1_error)) __pyx_v_self->_c_node->line = 0; - /* "lxml/etree.pyx":1065 + /* "lxml/etree.pyx":1063 * def __set__(self, line): * _assertValidNode(self) * if line <= 0: # <<<<<<<<<<<<<< @@ -59345,21 +56028,20 @@ static int __pyx_pf_4lxml_5etree_8_Element_10sourceline_2__set__(struct LxmlElem goto __pyx_L3; } - /* "lxml/etree.pyx":1068 + /* "lxml/etree.pyx":1066 * self._c_node.line = 0 * else: * self._c_node.line = line # <<<<<<<<<<<<<< * * # not in ElementTree, read-only */ - __Pyx_TraceLine(1068,0,__PYX_ERR(0, 1068, __pyx_L1_error)) /*else*/ { - __pyx_t_4 = __Pyx_PyInt_As_unsigned_short(__pyx_v_line); if (unlikely((__pyx_t_4 == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 1068, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_unsigned_short(__pyx_v_line); if (unlikely((__pyx_t_4 == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 1066, __pyx_L1_error) __pyx_v_self->_c_node->line = __pyx_t_4; } __pyx_L3:; - /* "lxml/etree.pyx":1063 + /* "lxml/etree.pyx":1061 * return line if line > 0 else None * * def __set__(self, line): # <<<<<<<<<<<<<< @@ -59375,12 +56057,11 @@ static int __pyx_pf_4lxml_5etree_8_Element_10sourceline_2__set__(struct LxmlElem __Pyx_AddTraceback("lxml.etree._Element.sourceline.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1078 +/* "lxml/etree.pyx":1076 * Note that changing the returned dict has no effect on the Element. * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -59407,7 +56088,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_5nsmap___get__(struct LxmlEleme PyObject *__pyx_v_nsmap = NULL; PyObject *__pyx_v_prefix = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -59416,50 +56096,45 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_5nsmap___get__(struct LxmlEleme int __pyx_t_5; xmlNs *__pyx_t_6; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 1078, 0, __PYX_ERR(0, 1078, __pyx_L1_error)); - /* "lxml/etree.pyx":1081 + /* "lxml/etree.pyx":1079 * cdef xmlNode* c_node * cdef xmlNs* c_ns * _assertValidNode(self) # <<<<<<<<<<<<<< * nsmap = {} * c_node = self._c_node */ - __Pyx_TraceLine(1081,0,__PYX_ERR(0, 1081, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1081, __pyx_L1_error) + __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":1082 + /* "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: */ - __Pyx_TraceLine(1082,0,__PYX_ERR(0, 1082, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1082, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_nsmap = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":1083 + /* "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 */ - __Pyx_TraceLine(1083,0,__PYX_ERR(0, 1083, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->_c_node; __pyx_v_c_node = __pyx_t_3; - /* "lxml/etree.pyx":1084 + /* "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: */ - __Pyx_TraceLine(1084,0,__PYX_ERR(0, 1084, __pyx_L1_error)) while (1) { __pyx_t_5 = ((__pyx_v_c_node != NULL) != 0); if (__pyx_t_5) { @@ -59472,68 +56147,63 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_5nsmap___get__(struct LxmlEleme __pyx_L5_bool_binop_done:; if (!__pyx_t_4) break; - /* "lxml/etree.pyx":1085 + /* "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) */ - __Pyx_TraceLine(1085,0,__PYX_ERR(0, 1085, __pyx_L1_error)) __pyx_t_6 = __pyx_v_c_node->nsDef; __pyx_v_c_ns = __pyx_t_6; - /* "lxml/etree.pyx":1086 + /* "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: */ - __Pyx_TraceLine(1086,0,__PYX_ERR(0, 1086, __pyx_L1_error)) while (1) { __pyx_t_4 = ((__pyx_v_c_ns != NULL) != 0); if (!__pyx_t_4) break; - /* "lxml/etree.pyx":1087 + /* "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) */ - __Pyx_TraceLine(1087,0,__PYX_ERR(0, 1087, __pyx_L1_error)) - __pyx_t_2 = __pyx_f_4lxml_5etree_funicodeOrNone(__pyx_v_c_ns->prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1087, __pyx_L1_error) + __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); __Pyx_XDECREF_SET(__pyx_v_prefix, __pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":1088 + /* "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 */ - __Pyx_TraceLine(1088,0,__PYX_ERR(0, 1088, __pyx_L1_error)) - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_prefix, __pyx_v_nsmap, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1088, __pyx_L1_error) + __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":1089 + /* "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 */ - __Pyx_TraceLine(1089,0,__PYX_ERR(0, 1089, __pyx_L1_error)) - __pyx_t_2 = __pyx_f_4lxml_5etree_funicodeOrNone(__pyx_v_c_ns->href); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1089, __pyx_L1_error) + __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); - if (unlikely(PyDict_SetItem(__pyx_v_nsmap, __pyx_v_prefix, __pyx_t_2) < 0)) __PYX_ERR(0, 1089, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_nsmap, __pyx_v_prefix, __pyx_t_2) < 0)) __PYX_ERR(0, 1087, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":1088 + /* "lxml/etree.pyx":1086 * while c_ns is not NULL: * prefix = funicodeOrNone(c_ns.prefix) * if prefix not in nsmap: # <<<<<<<<<<<<<< @@ -59542,44 +56212,41 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_5nsmap___get__(struct LxmlEleme */ } - /* "lxml/etree.pyx":1090 + /* "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 */ - __Pyx_TraceLine(1090,0,__PYX_ERR(0, 1090, __pyx_L1_error)) __pyx_t_6 = __pyx_v_c_ns->next; __pyx_v_c_ns = __pyx_t_6; } - /* "lxml/etree.pyx":1091 + /* "lxml/etree.pyx":1089 * nsmap[prefix] = funicodeOrNone(c_ns.href) * c_ns = c_ns.next * c_node = c_node.parent # <<<<<<<<<<<<<< * return nsmap * */ - __Pyx_TraceLine(1091,0,__PYX_ERR(0, 1091, __pyx_L1_error)) __pyx_t_3 = __pyx_v_c_node->parent; __pyx_v_c_node = __pyx_t_3; } - /* "lxml/etree.pyx":1092 + /* "lxml/etree.pyx":1090 * c_ns = c_ns.next * c_node = c_node.parent * return nsmap # <<<<<<<<<<<<<< * * # not in ElementTree, read-only */ - __Pyx_TraceLine(1092,0,__PYX_ERR(0, 1092, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_nsmap); __pyx_r = __pyx_v_nsmap; goto __pyx_L0; - /* "lxml/etree.pyx":1078 + /* "lxml/etree.pyx":1076 * Note that changing the returned dict has no effect on the Element. * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -59596,12 +56263,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_5nsmap___get__(struct LxmlEleme __Pyx_XDECREF(__pyx_v_nsmap); __Pyx_XDECREF(__pyx_v_prefix); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1106 +/* "lxml/etree.pyx":1104 * Element, regardless of the document type (XML or HTML). * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -59626,7 +56292,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_4base___get__(struct LxmlElemen xmlChar *__pyx_v_c_base; PyObject *__pyx_v_base = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -59640,63 +56305,57 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_4base___get__(struct LxmlElemen PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 1106, 0, __PYX_ERR(0, 1106, __pyx_L1_error)); - /* "lxml/etree.pyx":1107 + /* "lxml/etree.pyx":1105 * """ * def __get__(self): * _assertValidNode(self) # <<<<<<<<<<<<<< * c_base = tree.xmlNodeGetBase(self._doc._c_doc, self._c_node) * if c_base is NULL: */ - __Pyx_TraceLine(1107,0,__PYX_ERR(0, 1107, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1107, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1105, __pyx_L1_error) - /* "lxml/etree.pyx":1108 + /* "lxml/etree.pyx":1106 * def __get__(self): * _assertValidNode(self) * c_base = tree.xmlNodeGetBase(self._doc._c_doc, self._c_node) # <<<<<<<<<<<<<< * if c_base is NULL: * if self._doc._c_doc.URL is NULL: */ - __Pyx_TraceLine(1108,0,__PYX_ERR(0, 1108, __pyx_L1_error)) __pyx_v_c_base = xmlNodeGetBase(__pyx_v_self->_doc->_c_doc, __pyx_v_self->_c_node); - /* "lxml/etree.pyx":1109 + /* "lxml/etree.pyx":1107 * _assertValidNode(self) * c_base = tree.xmlNodeGetBase(self._doc._c_doc, self._c_node) * if c_base is NULL: # <<<<<<<<<<<<<< * if self._doc._c_doc.URL is NULL: * return None */ - __Pyx_TraceLine(1109,0,__PYX_ERR(0, 1109, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_base == NULL) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1110 + /* "lxml/etree.pyx":1108 * c_base = tree.xmlNodeGetBase(self._doc._c_doc, self._c_node) * if c_base is NULL: * if self._doc._c_doc.URL is NULL: # <<<<<<<<<<<<<< * return None * return _decodeFilename(self._doc._c_doc.URL) */ - __Pyx_TraceLine(1110,0,__PYX_ERR(0, 1110, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->_doc->_c_doc->URL == NULL) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1111 + /* "lxml/etree.pyx":1109 * if c_base is NULL: * if self._doc._c_doc.URL is NULL: * return None # <<<<<<<<<<<<<< * return _decodeFilename(self._doc._c_doc.URL) * try: */ - __Pyx_TraceLine(1111,0,__PYX_ERR(0, 1111, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/etree.pyx":1110 + /* "lxml/etree.pyx":1108 * c_base = tree.xmlNodeGetBase(self._doc._c_doc, self._c_node) * if c_base is NULL: * if self._doc._c_doc.URL is NULL: # <<<<<<<<<<<<<< @@ -59705,22 +56364,21 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_4base___get__(struct LxmlElemen */ } - /* "lxml/etree.pyx":1112 + /* "lxml/etree.pyx":1110 * if self._doc._c_doc.URL is NULL: * return None * return _decodeFilename(self._doc._c_doc.URL) # <<<<<<<<<<<<<< * try: * base = _decodeFilename(c_base) */ - __Pyx_TraceLine(1112,0,__PYX_ERR(0, 1112, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_4lxml_5etree__decodeFilename(__pyx_v_self->_doc->_c_doc->URL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1112, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__decodeFilename(__pyx_v_self->_doc->_c_doc->URL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1109 + /* "lxml/etree.pyx":1107 * _assertValidNode(self) * c_base = tree.xmlNodeGetBase(self._doc._c_doc, self._c_node) * if c_base is NULL: # <<<<<<<<<<<<<< @@ -59729,38 +56387,35 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_4base___get__(struct LxmlElemen */ } - /* "lxml/etree.pyx":1113 + /* "lxml/etree.pyx":1111 * return None * return _decodeFilename(self._doc._c_doc.URL) * try: # <<<<<<<<<<<<<< * base = _decodeFilename(c_base) * finally: */ - __Pyx_TraceLine(1113,0,__PYX_ERR(0, 1113, __pyx_L6_error)) /*try:*/ { - /* "lxml/etree.pyx":1114 + /* "lxml/etree.pyx":1112 * return _decodeFilename(self._doc._c_doc.URL) * try: * base = _decodeFilename(c_base) # <<<<<<<<<<<<<< * finally: * tree.xmlFree(c_base) */ - __Pyx_TraceLine(1114,0,__PYX_ERR(0, 1114, __pyx_L6_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree__decodeFilename(__pyx_v_c_base); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1114, __pyx_L6_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__decodeFilename(__pyx_v_c_base); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1112, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_base = __pyx_t_3; __pyx_t_3 = 0; } - /* "lxml/etree.pyx":1116 + /* "lxml/etree.pyx":1114 * base = _decodeFilename(c_base) * finally: * tree.xmlFree(c_base) # <<<<<<<<<<<<<< * return base * */ - __Pyx_TraceLine(1116,0,__PYX_ERR(0, 1116, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ xmlFree(__pyx_v_c_base); @@ -59801,20 +56456,19 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_4base___get__(struct LxmlElemen __pyx_L7:; } - /* "lxml/etree.pyx":1117 + /* "lxml/etree.pyx":1115 * finally: * tree.xmlFree(c_base) * return base # <<<<<<<<<<<<<< * * def __set__(self, url): */ - __Pyx_TraceLine(1117,0,__PYX_ERR(0, 1117, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_base); __pyx_r = __pyx_v_base; goto __pyx_L0; - /* "lxml/etree.pyx":1106 + /* "lxml/etree.pyx":1104 * Element, regardless of the document type (XML or HTML). * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -59830,12 +56484,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_4base___get__(struct LxmlElemen __pyx_L0:; __Pyx_XDECREF(__pyx_v_base); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1119 +/* "lxml/etree.pyx":1117 * return base * * def __set__(self, url): # <<<<<<<<<<<<<< @@ -59859,49 +56512,44 @@ static int __pyx_pw_4lxml_5etree_8_Element_4base_3__set__(PyObject *__pyx_v_self static int __pyx_pf_4lxml_5etree_8_Element_4base_2__set__(struct LxmlElement *__pyx_v_self, PyObject *__pyx_v_url) { const xmlChar *__pyx_v_c_base; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[0], 1119, 0, __PYX_ERR(0, 1119, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_url); - /* "lxml/etree.pyx":1120 + /* "lxml/etree.pyx":1118 * * def __set__(self, url): * _assertValidNode(self) # <<<<<<<<<<<<<< * if url is None: * c_base = NULL */ - __Pyx_TraceLine(1120,0,__PYX_ERR(0, 1120, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1120, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1118, __pyx_L1_error) - /* "lxml/etree.pyx":1121 + /* "lxml/etree.pyx":1119 * def __set__(self, url): * _assertValidNode(self) * if url is None: # <<<<<<<<<<<<<< * c_base = NULL * else: */ - __Pyx_TraceLine(1121,0,__PYX_ERR(0, 1121, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_url == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":1122 + /* "lxml/etree.pyx":1120 * _assertValidNode(self) * if url is None: * c_base = NULL # <<<<<<<<<<<<<< * else: * url = _encodeFilename(url) */ - __Pyx_TraceLine(1122,0,__PYX_ERR(0, 1122, __pyx_L1_error)) __pyx_v_c_base = ((const xmlChar *)NULL); - /* "lxml/etree.pyx":1121 + /* "lxml/etree.pyx":1119 * def __set__(self, url): * _assertValidNode(self) * if url is None: # <<<<<<<<<<<<<< @@ -59911,43 +56559,40 @@ static int __pyx_pf_4lxml_5etree_8_Element_4base_2__set__(struct LxmlElement *__ goto __pyx_L3; } - /* "lxml/etree.pyx":1124 + /* "lxml/etree.pyx":1122 * c_base = NULL * else: * url = _encodeFilename(url) # <<<<<<<<<<<<<< * c_base = _xcstr(url) * tree.xmlNodeSetBase(self._c_node, c_base) */ - __Pyx_TraceLine(1124,0,__PYX_ERR(0, 1124, __pyx_L1_error)) /*else*/ { - __pyx_t_4 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_url); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1124, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_url); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_url, __pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":1125 + /* "lxml/etree.pyx":1123 * else: * url = _encodeFilename(url) * c_base = _xcstr(url) # <<<<<<<<<<<<<< * tree.xmlNodeSetBase(self._c_node, c_base) * */ - __Pyx_TraceLine(1125,0,__PYX_ERR(0, 1125, __pyx_L1_error)) __pyx_v_c_base = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_url); } __pyx_L3:; - /* "lxml/etree.pyx":1126 + /* "lxml/etree.pyx":1124 * url = _encodeFilename(url) * c_base = _xcstr(url) * tree.xmlNodeSetBase(self._c_node, c_base) # <<<<<<<<<<<<<< * * # ACCESSORS */ - __Pyx_TraceLine(1126,0,__PYX_ERR(0, 1126, __pyx_L1_error)) xmlNodeSetBase(__pyx_v_self->_c_node, __pyx_v_c_base); - /* "lxml/etree.pyx":1119 + /* "lxml/etree.pyx":1117 * return base * * def __set__(self, url): # <<<<<<<<<<<<<< @@ -59964,12 +56609,11 @@ static int __pyx_pf_4lxml_5etree_8_Element_4base_2__set__(struct LxmlElement *__ __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_url); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1129 +/* "lxml/etree.pyx":1127 * * # ACCESSORS * def __repr__(self): # <<<<<<<<<<<<<< @@ -59996,31 +56640,28 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_31__repr__(PyObject *__pyx_v_se static PyObject *__pyx_pf_4lxml_5etree_8_Element_30__repr__(struct LxmlElement *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[0], 1129, 0, __PYX_ERR(0, 1129, __pyx_L1_error)); - /* "lxml/etree.pyx":1131 + /* "lxml/etree.pyx":1129 * def __repr__(self): * u"__repr__(self)" * return "" % (strrepr(self.tag), id(self)) # <<<<<<<<<<<<<< * * def __getitem__(self, x): */ - __Pyx_TraceLine(1131,0,__PYX_ERR(0, 1131, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1131, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1129, __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, 1131, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_strrepr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1131, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1131, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); @@ -60028,14 +56669,14 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_30__repr__(struct LxmlElement * PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); __pyx_t_2 = 0; __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Element_s_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1131, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Element_s_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1129, __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":1129 + /* "lxml/etree.pyx":1127 * * # ACCESSORS * def __repr__(self): # <<<<<<<<<<<<<< @@ -60052,12 +56693,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_30__repr__(struct LxmlElement * __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1133 +/* "lxml/etree.pyx":1131 * return "" % (strrepr(self.tag), id(self)) * * def __getitem__(self, x): # <<<<<<<<<<<<<< @@ -60091,7 +56731,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_32__getitem__(struct LxmlElemen _node_to_node_function __pyx_v_next_element; PyObject *__pyx_v_result = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -60103,79 +56742,72 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_32__getitem__(struct LxmlElemen Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; __Pyx_RefNannySetupContext("__getitem__", 0); - __Pyx_TraceCall("__getitem__", __pyx_f[0], 1133, 0, __PYX_ERR(0, 1133, __pyx_L1_error)); - /* "lxml/etree.pyx":1137 + /* "lxml/etree.pyx":1135 * slice. * """ * cdef xmlNode* c_node = NULL # <<<<<<<<<<<<<< * cdef Py_ssize_t step = 0, slicelength = 0 * cdef Py_ssize_t c, i */ - __Pyx_TraceLine(1137,0,__PYX_ERR(0, 1137, __pyx_L1_error)) __pyx_v_c_node = NULL; - /* "lxml/etree.pyx":1138 + /* "lxml/etree.pyx":1136 * """ * cdef xmlNode* c_node = NULL * cdef Py_ssize_t step = 0, slicelength = 0 # <<<<<<<<<<<<<< * cdef Py_ssize_t c, i * cdef _node_to_node_function next_element */ - __Pyx_TraceLine(1138,0,__PYX_ERR(0, 1138, __pyx_L1_error)) __pyx_v_step = 0; __pyx_v_slicelength = 0; - /* "lxml/etree.pyx":1142 + /* "lxml/etree.pyx":1140 * cdef _node_to_node_function next_element * cdef list result * _assertValidNode(self) # <<<<<<<<<<<<<< * if isinstance(x, slice): * # slicing */ - __Pyx_TraceLine(1142,0,__PYX_ERR(0, 1142, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1142, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1140, __pyx_L1_error) - /* "lxml/etree.pyx":1143 + /* "lxml/etree.pyx":1141 * cdef list result * _assertValidNode(self) * if isinstance(x, slice): # <<<<<<<<<<<<<< * # slicing * if _isFullSlice(x): */ - __Pyx_TraceLine(1143,0,__PYX_ERR(0, 1143, __pyx_L1_error)) __pyx_t_2 = PySlice_Check(__pyx_v_x); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":1145 + /* "lxml/etree.pyx":1143 * if isinstance(x, slice): * # slicing * if _isFullSlice(x): # <<<<<<<<<<<<<< * return _collectChildren(self) * _findChildSlice(x, self._c_node, &c_node, &step, &slicelength) */ - __Pyx_TraceLine(1145,0,__PYX_ERR(0, 1145, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree__isFullSlice(((PyObject*)__pyx_v_x)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1145, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__isFullSlice(((PyObject*)__pyx_v_x)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1143, __pyx_L1_error) __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1146 + /* "lxml/etree.pyx":1144 * # slicing * if _isFullSlice(x): * return _collectChildren(self) # <<<<<<<<<<<<<< * _findChildSlice(x, self._c_node, &c_node, &step, &slicelength) * if c_node is NULL: */ - __Pyx_TraceLine(1146,0,__PYX_ERR(0, 1146, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_4lxml_5etree__collectChildren(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1146, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__collectChildren(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1145 + /* "lxml/etree.pyx":1143 * if isinstance(x, slice): * # slicing * if _isFullSlice(x): # <<<<<<<<<<<<<< @@ -60184,43 +56816,40 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_32__getitem__(struct LxmlElemen */ } - /* "lxml/etree.pyx":1147 + /* "lxml/etree.pyx":1145 * if _isFullSlice(x): * return _collectChildren(self) * _findChildSlice(x, self._c_node, &c_node, &step, &slicelength) # <<<<<<<<<<<<<< * if c_node is NULL: * return [] */ - __Pyx_TraceLine(1147,0,__PYX_ERR(0, 1147, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__findChildSlice(((PyObject*)__pyx_v_x), __pyx_v_self->_c_node, (&__pyx_v_c_node), (&__pyx_v_step), (&__pyx_v_slicelength)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1147, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__findChildSlice(((PyObject*)__pyx_v_x), __pyx_v_self->_c_node, (&__pyx_v_c_node), (&__pyx_v_step), (&__pyx_v_slicelength)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1145, __pyx_L1_error) - /* "lxml/etree.pyx":1148 + /* "lxml/etree.pyx":1146 * return _collectChildren(self) * _findChildSlice(x, self._c_node, &c_node, &step, &slicelength) * if c_node is NULL: # <<<<<<<<<<<<<< * return [] * if step > 0: */ - __Pyx_TraceLine(1148,0,__PYX_ERR(0, 1148, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1149 + /* "lxml/etree.pyx":1147 * _findChildSlice(x, self._c_node, &c_node, &step, &slicelength) * if c_node is NULL: * return [] # <<<<<<<<<<<<<< * if step > 0: * next_element = _nextElement */ - __Pyx_TraceLine(1149,0,__PYX_ERR(0, 1149, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1149, __pyx_L1_error) + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1148 + /* "lxml/etree.pyx":1146 * return _collectChildren(self) * _findChildSlice(x, self._c_node, &c_node, &step, &slicelength) * if c_node is NULL: # <<<<<<<<<<<<<< @@ -60229,28 +56858,26 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_32__getitem__(struct LxmlElemen */ } - /* "lxml/etree.pyx":1150 + /* "lxml/etree.pyx":1148 * if c_node is NULL: * return [] * if step > 0: # <<<<<<<<<<<<<< * next_element = _nextElement * else: */ - __Pyx_TraceLine(1150,0,__PYX_ERR(0, 1150, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_step > 0) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1151 + /* "lxml/etree.pyx":1149 * return [] * if step > 0: * next_element = _nextElement # <<<<<<<<<<<<<< * else: * step = -step */ - __Pyx_TraceLine(1151,0,__PYX_ERR(0, 1151, __pyx_L1_error)) __pyx_v_next_element = __pyx_f_4lxml_5etree__nextElement; - /* "lxml/etree.pyx":1150 + /* "lxml/etree.pyx":1148 * if c_node is NULL: * return [] * if step > 0: # <<<<<<<<<<<<<< @@ -60260,60 +56887,55 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_32__getitem__(struct LxmlElemen goto __pyx_L6; } - /* "lxml/etree.pyx":1153 + /* "lxml/etree.pyx":1151 * next_element = _nextElement * else: * step = -step # <<<<<<<<<<<<<< * next_element = _previousElement * result = [] */ - __Pyx_TraceLine(1153,0,__PYX_ERR(0, 1153, __pyx_L1_error)) /*else*/ { __pyx_v_step = (-__pyx_v_step); - /* "lxml/etree.pyx":1154 + /* "lxml/etree.pyx":1152 * else: * step = -step * next_element = _previousElement # <<<<<<<<<<<<<< * result = [] * c = 0 */ - __Pyx_TraceLine(1154,0,__PYX_ERR(0, 1154, __pyx_L1_error)) __pyx_v_next_element = __pyx_f_4lxml_5etree__previousElement; } __pyx_L6:; - /* "lxml/etree.pyx":1155 + /* "lxml/etree.pyx":1153 * step = -step * next_element = _previousElement * result = [] # <<<<<<<<<<<<<< * c = 0 * while c_node is not NULL and c < slicelength: */ - __Pyx_TraceLine(1155,0,__PYX_ERR(0, 1155, __pyx_L1_error)) - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1155, __pyx_L1_error) + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_result = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":1156 + /* "lxml/etree.pyx":1154 * next_element = _previousElement * result = [] * c = 0 # <<<<<<<<<<<<<< * while c_node is not NULL and c < slicelength: * result.append(_elementFactory(self._doc, c_node)) */ - __Pyx_TraceLine(1156,0,__PYX_ERR(0, 1156, __pyx_L1_error)) __pyx_v_c = 0; - /* "lxml/etree.pyx":1157 + /* "lxml/etree.pyx":1155 * result = [] * c = 0 * while c_node is not NULL and c < slicelength: # <<<<<<<<<<<<<< * result.append(_elementFactory(self._doc, c_node)) * c += 1 */ - __Pyx_TraceLine(1157,0,__PYX_ERR(0, 1157, __pyx_L1_error)) while (1) { __pyx_t_3 = ((__pyx_v_c_node != NULL) != 0); if (__pyx_t_3) { @@ -60326,71 +56948,66 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_32__getitem__(struct LxmlElemen __pyx_L9_bool_binop_done:; if (!__pyx_t_2) break; - /* "lxml/etree.pyx":1158 + /* "lxml/etree.pyx":1156 * c = 0 * while c_node is not NULL and c < slicelength: * result.append(_elementFactory(self._doc, c_node)) # <<<<<<<<<<<<<< * c += 1 * for i in range(step): */ - __Pyx_TraceLine(1158,0,__PYX_ERR(0, 1158, __pyx_L1_error)) __pyx_t_4 = ((PyObject *)__pyx_v_self->_doc); __Pyx_INCREF(__pyx_t_4); - __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_4), __pyx_v_c_node)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1158, __pyx_L1_error) + __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_4), __pyx_v_c_node)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_5); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1158, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_5); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1156, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/etree.pyx":1159 + /* "lxml/etree.pyx":1157 * while c_node is not NULL and c < slicelength: * result.append(_elementFactory(self._doc, c_node)) * c += 1 # <<<<<<<<<<<<<< * for i in range(step): * c_node = next_element(c_node) */ - __Pyx_TraceLine(1159,0,__PYX_ERR(0, 1159, __pyx_L1_error)) __pyx_v_c = (__pyx_v_c + 1); - /* "lxml/etree.pyx":1160 + /* "lxml/etree.pyx":1158 * result.append(_elementFactory(self._doc, c_node)) * c += 1 * for i in range(step): # <<<<<<<<<<<<<< * c_node = next_element(c_node) * return result */ - __Pyx_TraceLine(1160,0,__PYX_ERR(0, 1160, __pyx_L1_error)) __pyx_t_7 = __pyx_v_step; __pyx_t_8 = __pyx_t_7; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; - /* "lxml/etree.pyx":1161 + /* "lxml/etree.pyx":1159 * c += 1 * for i in range(step): * c_node = next_element(c_node) # <<<<<<<<<<<<<< * return result * else: */ - __Pyx_TraceLine(1161,0,__PYX_ERR(0, 1161, __pyx_L1_error)) __pyx_v_c_node = __pyx_v_next_element(__pyx_v_c_node); } } - /* "lxml/etree.pyx":1162 + /* "lxml/etree.pyx":1160 * for i in range(step): * c_node = next_element(c_node) * return result # <<<<<<<<<<<<<< * else: * # indexing */ - __Pyx_TraceLine(1162,0,__PYX_ERR(0, 1162, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "lxml/etree.pyx":1143 + /* "lxml/etree.pyx":1141 * cdef list result * _assertValidNode(self) * if isinstance(x, slice): # <<<<<<<<<<<<<< @@ -60399,41 +57016,38 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_32__getitem__(struct LxmlElemen */ } - /* "lxml/etree.pyx":1165 + /* "lxml/etree.pyx":1163 * else: * # indexing * c_node = _findChild(self._c_node, x) # <<<<<<<<<<<<<< * if c_node is NULL: * raise IndexError, u"list index out of range" */ - __Pyx_TraceLine(1165,0,__PYX_ERR(0, 1165, __pyx_L1_error)) /*else*/ { - __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_x); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1165, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_x); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1163, __pyx_L1_error) __pyx_v_c_node = __pyx_f_4lxml_5etree__findChild(__pyx_v_self->_c_node, __pyx_t_7); - /* "lxml/etree.pyx":1166 + /* "lxml/etree.pyx":1164 * # indexing * c_node = _findChild(self._c_node, x) * if c_node is NULL: # <<<<<<<<<<<<<< * raise IndexError, u"list index out of range" * return _elementFactory(self._doc, c_node) */ - __Pyx_TraceLine(1166,0,__PYX_ERR(0, 1166, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node == NULL) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":1167 + /* "lxml/etree.pyx":1165 * c_node = _findChild(self._c_node, x) * if c_node is NULL: * raise IndexError, u"list index out of range" # <<<<<<<<<<<<<< * return _elementFactory(self._doc, c_node) * */ - __Pyx_TraceLine(1167,0,__PYX_ERR(0, 1167, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_IndexError, __pyx_kp_u_list_index_out_of_range, 0, 0); - __PYX_ERR(0, 1167, __pyx_L1_error) + __PYX_ERR(0, 1165, __pyx_L1_error) - /* "lxml/etree.pyx":1166 + /* "lxml/etree.pyx":1164 * # indexing * c_node = _findChild(self._c_node, x) * if c_node is NULL: # <<<<<<<<<<<<<< @@ -60442,18 +57056,17 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_32__getitem__(struct LxmlElemen */ } - /* "lxml/etree.pyx":1168 + /* "lxml/etree.pyx":1166 * if c_node is NULL: * raise IndexError, u"list index out of range" * return _elementFactory(self._doc, c_node) # <<<<<<<<<<<<<< * * def __len__(self): */ - __Pyx_TraceLine(1168,0,__PYX_ERR(0, 1168, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_5 = ((PyObject *)__pyx_v_self->_doc); __Pyx_INCREF(__pyx_t_5); - __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_5), __pyx_v_c_node)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1168, __pyx_L1_error) + __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_5), __pyx_v_c_node)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_4; @@ -60461,7 +57074,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_32__getitem__(struct LxmlElemen goto __pyx_L0; } - /* "lxml/etree.pyx":1133 + /* "lxml/etree.pyx":1131 * return "" % (strrepr(self.tag), id(self)) * * def __getitem__(self, x): # <<<<<<<<<<<<<< @@ -60478,12 +57091,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_32__getitem__(struct LxmlElemen __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1170 +/* "lxml/etree.pyx":1168 * return _elementFactory(self._doc, c_node) * * def __len__(self): # <<<<<<<<<<<<<< @@ -60510,34 +57122,30 @@ static Py_ssize_t __pyx_pw_4lxml_5etree_8_Element_35__len__(PyObject *__pyx_v_se static Py_ssize_t __pyx_pf_4lxml_5etree_8_Element_34__len__(struct LxmlElement *__pyx_v_self) { Py_ssize_t __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__len__", 0); - __Pyx_TraceCall("__len__", __pyx_f[0], 1170, 0, __PYX_ERR(0, 1170, __pyx_L1_error)); - /* "lxml/etree.pyx":1175 + /* "lxml/etree.pyx":1173 * Returns the number of subelements. * """ * _assertValidNode(self) # <<<<<<<<<<<<<< * return _countElements(self._c_node.children) * */ - __Pyx_TraceLine(1175,0,__PYX_ERR(0, 1175, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1175, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1173, __pyx_L1_error) - /* "lxml/etree.pyx":1176 + /* "lxml/etree.pyx":1174 * """ * _assertValidNode(self) * return _countElements(self._c_node.children) # <<<<<<<<<<<<<< * * def __nonzero__(self): */ - __Pyx_TraceLine(1176,0,__PYX_ERR(0, 1176, __pyx_L1_error)) __pyx_r = __pyx_f_4lxml_5etree__countElements(__pyx_v_self->_c_node->children); goto __pyx_L0; - /* "lxml/etree.pyx":1170 + /* "lxml/etree.pyx":1168 * return _elementFactory(self._doc, c_node) * * def __len__(self): # <<<<<<<<<<<<<< @@ -60550,12 +57158,11 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_8_Element_34__len__(struct LxmlElement * __Pyx_AddTraceback("lxml.etree._Element.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1178 +/* "lxml/etree.pyx":1176 * return _countElements(self._c_node.children) * * def __nonzero__(self): # <<<<<<<<<<<<<< @@ -60579,73 +57186,66 @@ static int __pyx_pw_4lxml_5etree_8_Element_37__nonzero__(PyObject *__pyx_v_self) static int __pyx_pf_4lxml_5etree_8_Element_36__nonzero__(struct LxmlElement *__pyx_v_self) { PyObject *__pyx_v_warnings = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("__nonzero__", 0); - __Pyx_TraceCall("__nonzero__", __pyx_f[0], 1178, 0, __PYX_ERR(0, 1178, __pyx_L1_error)); - /* "lxml/etree.pyx":1180 + /* "lxml/etree.pyx":1178 * def __nonzero__(self): * #u"__nonzero__(self)" # currently fails in Py3.1 * import warnings # <<<<<<<<<<<<<< * warnings.warn( * u"The behavior of this method will change in future versions. " */ - __Pyx_TraceLine(1180,0,__PYX_ERR(0, 1180, __pyx_L1_error)) - __pyx_t_1 = __Pyx_Import(__pyx_n_s_warnings, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1180, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_n_s_warnings, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_warnings = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/etree.pyx":1181 + /* "lxml/etree.pyx":1179 * #u"__nonzero__(self)" # currently fails in Py3.1 * import warnings * warnings.warn( # <<<<<<<<<<<<<< * u"The behavior of this method will change in future versions. " * u"Use specific 'len(elem)' or 'elem is not None' test instead.", */ - __Pyx_TraceLine(1181,0,__PYX_ERR(0, 1181, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_warnings, __pyx_n_s_warn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1181, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_warnings, __pyx_n_s_warn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "lxml/etree.pyx":1184 + /* "lxml/etree.pyx":1182 * u"The behavior of this method will change in future versions. " * u"Use specific 'len(elem)' or 'elem is not None' test instead.", * FutureWarning # <<<<<<<<<<<<<< * ) * # emulate old behaviour */ - __Pyx_TraceLine(1184,0,__PYX_ERR(0, 1184, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1181, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1179, __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/etree.pyx":1187 + /* "lxml/etree.pyx":1185 * ) * # emulate old behaviour * _assertValidNode(self) # <<<<<<<<<<<<<< * return _hasChild(self._c_node) * */ - __Pyx_TraceLine(1187,0,__PYX_ERR(0, 1187, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1187, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1185, __pyx_L1_error) - /* "lxml/etree.pyx":1188 + /* "lxml/etree.pyx":1186 * # emulate old behaviour * _assertValidNode(self) * return _hasChild(self._c_node) # <<<<<<<<<<<<<< * * def __contains__(self, element): */ - __Pyx_TraceLine(1188,0,__PYX_ERR(0, 1188, __pyx_L1_error)) __pyx_r = __pyx_f_4lxml_5etree__hasChild(__pyx_v_self->_c_node); goto __pyx_L0; - /* "lxml/etree.pyx":1178 + /* "lxml/etree.pyx":1176 * return _countElements(self._c_node.children) * * def __nonzero__(self): # <<<<<<<<<<<<<< @@ -60661,12 +57261,11 @@ static int __pyx_pf_4lxml_5etree_8_Element_36__nonzero__(struct LxmlElement *__p __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_warnings); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1190 +/* "lxml/etree.pyx":1188 * return _hasChild(self._c_node) * * def __contains__(self, element): # <<<<<<<<<<<<<< @@ -60694,49 +57293,44 @@ static int __pyx_pw_4lxml_5etree_8_Element_39__contains__(PyObject *__pyx_v_self static int __pyx_pf_4lxml_5etree_8_Element_38__contains__(struct LxmlElement *__pyx_v_self, PyObject *__pyx_v_element) { xmlNode *__pyx_v_c_node; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; xmlNode *__pyx_t_4; __Pyx_RefNannySetupContext("__contains__", 0); - __Pyx_TraceCall("__contains__", __pyx_f[0], 1190, 0, __PYX_ERR(0, 1190, __pyx_L1_error)); - /* "lxml/etree.pyx":1193 + /* "lxml/etree.pyx":1191 * u"__contains__(self, element)" * cdef xmlNode* c_node * _assertValidNode(self) # <<<<<<<<<<<<<< * if not isinstance(element, _Element): * return 0 */ - __Pyx_TraceLine(1193,0,__PYX_ERR(0, 1193, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1193, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1191, __pyx_L1_error) - /* "lxml/etree.pyx":1194 + /* "lxml/etree.pyx":1192 * cdef xmlNode* c_node * _assertValidNode(self) * if not isinstance(element, _Element): # <<<<<<<<<<<<<< * return 0 * c_node = (<_Element>element)._c_node */ - __Pyx_TraceLine(1194,0,__PYX_ERR(0, 1194, __pyx_L1_error)) __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_element, __pyx_ptype_4lxml_5etree__Element); __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":1195 + /* "lxml/etree.pyx":1193 * _assertValidNode(self) * if not isinstance(element, _Element): * return 0 # <<<<<<<<<<<<<< * c_node = (<_Element>element)._c_node * return c_node is not NULL and c_node.parent is self._c_node */ - __Pyx_TraceLine(1195,0,__PYX_ERR(0, 1195, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1194 + /* "lxml/etree.pyx":1192 * cdef xmlNode* c_node * _assertValidNode(self) * if not isinstance(element, _Element): # <<<<<<<<<<<<<< @@ -60745,25 +57339,23 @@ static int __pyx_pf_4lxml_5etree_8_Element_38__contains__(struct LxmlElement *__ */ } - /* "lxml/etree.pyx":1196 + /* "lxml/etree.pyx":1194 * if not isinstance(element, _Element): * return 0 * c_node = (<_Element>element)._c_node # <<<<<<<<<<<<<< * return c_node is not NULL and c_node.parent is self._c_node * */ - __Pyx_TraceLine(1196,0,__PYX_ERR(0, 1196, __pyx_L1_error)) __pyx_t_4 = ((struct LxmlElement *)__pyx_v_element)->_c_node; __pyx_v_c_node = __pyx_t_4; - /* "lxml/etree.pyx":1197 + /* "lxml/etree.pyx":1195 * return 0 * c_node = (<_Element>element)._c_node * return c_node is not NULL and c_node.parent is self._c_node # <<<<<<<<<<<<<< * * def __iter__(self): */ - __Pyx_TraceLine(1197,0,__PYX_ERR(0, 1197, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_c_node != NULL); if (__pyx_t_3) { } else { @@ -60776,7 +57368,7 @@ static int __pyx_pf_4lxml_5etree_8_Element_38__contains__(struct LxmlElement *__ __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "lxml/etree.pyx":1190 + /* "lxml/etree.pyx":1188 * return _hasChild(self._c_node) * * def __contains__(self, element): # <<<<<<<<<<<<<< @@ -60789,12 +57381,11 @@ static int __pyx_pf_4lxml_5etree_8_Element_38__contains__(struct LxmlElement *__ __Pyx_AddTraceback("lxml.etree._Element.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1199 +/* "lxml/etree.pyx":1197 * return c_node is not NULL and c_node.parent is self._c_node * * def __iter__(self): # <<<<<<<<<<<<<< @@ -60821,28 +57412,25 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_41__iter__(PyObject *__pyx_v_se static PyObject *__pyx_pf_4lxml_5etree_8_Element_40__iter__(struct LxmlElement *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__iter__", 0); - __Pyx_TraceCall("__iter__", __pyx_f[0], 1199, 0, __PYX_ERR(0, 1199, __pyx_L1_error)); - /* "lxml/etree.pyx":1201 + /* "lxml/etree.pyx":1199 * def __iter__(self): * u"__iter__(self)" * return ElementChildIterator(self) # <<<<<<<<<<<<<< * * def __reversed__(self): */ - __Pyx_TraceLine(1201,0,__PYX_ERR(0, 1201, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree_ElementChildIterator), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1201, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree_ElementChildIterator), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1199 + /* "lxml/etree.pyx":1197 * return c_node is not NULL and c_node.parent is self._c_node * * def __iter__(self): # <<<<<<<<<<<<<< @@ -60857,12 +57445,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_40__iter__(struct LxmlElement * __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1203 +/* "lxml/etree.pyx":1201 * return ElementChildIterator(self) * * def __reversed__(self): # <<<<<<<<<<<<<< @@ -60887,33 +57474,29 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_43__reversed__(PyObject *__pyx_ static PyObject *__pyx_pf_4lxml_5etree_8_Element_42__reversed__(struct LxmlElement *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__79) __Pyx_RefNannySetupContext("__reversed__", 0); - __Pyx_TraceCall("__reversed__", __pyx_f[0], 1203, 0, __PYX_ERR(0, 1203, __pyx_L1_error)); - /* "lxml/etree.pyx":1205 + /* "lxml/etree.pyx":1203 * def __reversed__(self): * u"__reversed__(self)" * return ElementChildIterator(self, reversed=True) # <<<<<<<<<<<<<< * * def index(self, _Element child not None, start=None, stop=None): */ - __Pyx_TraceLine(1205,0,__PYX_ERR(0, 1205, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1205, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1203, __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(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1205, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_reversed, Py_True) < 0) __PYX_ERR(0, 1205, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_ElementChildIterator), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1205, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_reversed, Py_True) < 0) __PYX_ERR(0, 1203, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_ElementChildIterator), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1203, __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; @@ -60921,7 +57504,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_42__reversed__(struct LxmlEleme __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1203 + /* "lxml/etree.pyx":1201 * return ElementChildIterator(self) * * def __reversed__(self): # <<<<<<<<<<<<<< @@ -60938,12 +57521,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_42__reversed__(struct LxmlEleme __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1207 +/* "lxml/etree.pyx":1205 * return ElementChildIterator(self, reversed=True) * * def index(self, _Element child not None, start=None, stop=None): # <<<<<<<<<<<<<< @@ -60954,7 +57536,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_42__reversed__(struct LxmlEleme /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_8_Element_45index(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_8_Element_44index[] = "index(self, child, start=None, stop=None)\n\n Find the position of the child within the parent.\n\n This method is not part of the original ElementTree API.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_45index = {"index", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_45index, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_44index}; +static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_45index = {"index", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_45index, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_44index}; static PyObject *__pyx_pw_4lxml_5etree_8_Element_45index(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct LxmlElement *__pyx_v_child = 0; PyObject *__pyx_v_start = 0; @@ -60999,7 +57581,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_45index(PyObject *__pyx_v_self, } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "index") < 0)) __PYX_ERR(0, 1207, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "index") < 0)) __PYX_ERR(0, 1205, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -61018,13 +57600,13 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_45index(PyObject *__pyx_v_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("index", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1207, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("index", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1205, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._Element.index", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_child), __pyx_ptype_4lxml_5etree__Element, 0, "child", 0))) __PYX_ERR(0, 1207, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_child), __pyx_ptype_4lxml_5etree__Element, 0, "child", 0))) __PYX_ERR(0, 1205, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_8_Element_44index(((struct LxmlElement *)__pyx_v_self), __pyx_v_child, __pyx_v_start, __pyx_v_stop); /* function exit code */ @@ -61044,7 +57626,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p xmlNode *__pyx_v_c_child; xmlNode *__pyx_v_c_start_node; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlNode *__pyx_t_2; @@ -61053,64 +57634,57 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p int __pyx_t_5; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; - __Pyx_TraceFrameInit(__pyx_codeobj__80) __Pyx_RefNannySetupContext("index", 0); - __Pyx_TraceCall("index", __pyx_f[0], 1207, 0, __PYX_ERR(0, 1207, __pyx_L1_error)); - /* "lxml/etree.pyx":1218 + /* "lxml/etree.pyx":1216 * cdef xmlNode* c_child * cdef xmlNode* c_start_node * _assertValidNode(self) # <<<<<<<<<<<<<< * _assertValidNode(child) * c_child = child._c_node */ - __Pyx_TraceLine(1218,0,__PYX_ERR(0, 1218, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1218, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1216, __pyx_L1_error) - /* "lxml/etree.pyx":1219 + /* "lxml/etree.pyx":1217 * cdef xmlNode* c_start_node * _assertValidNode(self) * _assertValidNode(child) # <<<<<<<<<<<<<< * c_child = child._c_node * if c_child.parent is not self._c_node: */ - __Pyx_TraceLine(1219,0,__PYX_ERR(0, 1219, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_child); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1219, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_child); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1217, __pyx_L1_error) - /* "lxml/etree.pyx":1220 + /* "lxml/etree.pyx":1218 * _assertValidNode(self) * _assertValidNode(child) * c_child = child._c_node # <<<<<<<<<<<<<< * if c_child.parent is not self._c_node: * raise ValueError, u"Element is not a child of this node." */ - __Pyx_TraceLine(1220,0,__PYX_ERR(0, 1220, __pyx_L1_error)) __pyx_t_2 = __pyx_v_child->_c_node; __pyx_v_c_child = __pyx_t_2; - /* "lxml/etree.pyx":1221 + /* "lxml/etree.pyx":1219 * _assertValidNode(child) * c_child = child._c_node * if c_child.parent is not self._c_node: # <<<<<<<<<<<<<< * raise ValueError, u"Element is not a child of this node." * */ - __Pyx_TraceLine(1221,0,__PYX_ERR(0, 1221, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_child->parent != __pyx_v_self->_c_node) != 0); if (unlikely(__pyx_t_3)) { - /* "lxml/etree.pyx":1222 + /* "lxml/etree.pyx":1220 * c_child = child._c_node * if c_child.parent is not self._c_node: * raise ValueError, u"Element is not a child of this node." # <<<<<<<<<<<<<< * * # handle the unbounded search straight away (normal case) */ - __Pyx_TraceLine(1222,0,__PYX_ERR(0, 1222, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Element_is_not_a_child_of_this_n, 0, 0); - __PYX_ERR(0, 1222, __pyx_L1_error) + __PYX_ERR(0, 1220, __pyx_L1_error) - /* "lxml/etree.pyx":1221 + /* "lxml/etree.pyx":1219 * _assertValidNode(child) * c_child = child._c_node * if c_child.parent is not self._c_node: # <<<<<<<<<<<<<< @@ -61119,14 +57693,13 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p */ } - /* "lxml/etree.pyx":1225 + /* "lxml/etree.pyx":1223 * * # handle the unbounded search straight away (normal case) * if stop is None and (start is None or start == 0): # <<<<<<<<<<<<<< * k = 0 * c_child = c_child.prev */ - __Pyx_TraceLine(1225,0,__PYX_ERR(0, 1225, __pyx_L1_error)) __pyx_t_4 = (__pyx_v_stop == Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { @@ -61141,69 +57714,64 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p __pyx_t_3 = __pyx_t_4; goto __pyx_L5_bool_binop_done; } - __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_start, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1225, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_start, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1225, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1223, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = __pyx_t_4; __pyx_L5_bool_binop_done:; if (__pyx_t_3) { - /* "lxml/etree.pyx":1226 + /* "lxml/etree.pyx":1224 * # handle the unbounded search straight away (normal case) * if stop is None and (start is None or start == 0): * k = 0 # <<<<<<<<<<<<<< * c_child = c_child.prev * while c_child is not NULL: */ - __Pyx_TraceLine(1226,0,__PYX_ERR(0, 1226, __pyx_L1_error)) __pyx_v_k = 0; - /* "lxml/etree.pyx":1227 + /* "lxml/etree.pyx":1225 * if stop is None and (start is None or start == 0): * k = 0 * c_child = c_child.prev # <<<<<<<<<<<<<< * while c_child is not NULL: * if _isElement(c_child): */ - __Pyx_TraceLine(1227,0,__PYX_ERR(0, 1227, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_child->prev; __pyx_v_c_child = __pyx_t_2; - /* "lxml/etree.pyx":1228 + /* "lxml/etree.pyx":1226 * k = 0 * c_child = c_child.prev * while c_child is not NULL: # <<<<<<<<<<<<<< * if _isElement(c_child): * k += 1 */ - __Pyx_TraceLine(1228,0,__PYX_ERR(0, 1228, __pyx_L1_error)) while (1) { __pyx_t_3 = ((__pyx_v_c_child != NULL) != 0); if (!__pyx_t_3) break; - /* "lxml/etree.pyx":1229 + /* "lxml/etree.pyx":1227 * c_child = c_child.prev * while c_child is not NULL: * if _isElement(c_child): # <<<<<<<<<<<<<< * k += 1 * c_child = c_child.prev */ - __Pyx_TraceLine(1229,0,__PYX_ERR(0, 1229, __pyx_L1_error)) __pyx_t_3 = (_isElement(__pyx_v_c_child) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":1230 + /* "lxml/etree.pyx":1228 * while c_child is not NULL: * if _isElement(c_child): * k += 1 # <<<<<<<<<<<<<< * c_child = c_child.prev * return k */ - __Pyx_TraceLine(1230,0,__PYX_ERR(0, 1230, __pyx_L1_error)) __pyx_v_k = (__pyx_v_k + 1); - /* "lxml/etree.pyx":1229 + /* "lxml/etree.pyx":1227 * c_child = c_child.prev * while c_child is not NULL: * if _isElement(c_child): # <<<<<<<<<<<<<< @@ -61212,34 +57780,32 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p */ } - /* "lxml/etree.pyx":1231 + /* "lxml/etree.pyx":1229 * if _isElement(c_child): * k += 1 * c_child = c_child.prev # <<<<<<<<<<<<<< * return k * */ - __Pyx_TraceLine(1231,0,__PYX_ERR(0, 1231, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_child->prev; __pyx_v_c_child = __pyx_t_2; } - /* "lxml/etree.pyx":1232 + /* "lxml/etree.pyx":1230 * k += 1 * c_child = c_child.prev * return k # <<<<<<<<<<<<<< * * # check indices */ - __Pyx_TraceLine(1232,0,__PYX_ERR(0, 1232, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1232, __pyx_L1_error) + __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1225 + /* "lxml/etree.pyx":1223 * * # handle the unbounded search straight away (normal case) * if stop is None and (start is None or start == 0): # <<<<<<<<<<<<<< @@ -61248,29 +57814,27 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p */ } - /* "lxml/etree.pyx":1235 + /* "lxml/etree.pyx":1233 * * # check indices * if start is None: # <<<<<<<<<<<<<< * c_start = 0 * else: */ - __Pyx_TraceLine(1235,0,__PYX_ERR(0, 1235, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_start == Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { - /* "lxml/etree.pyx":1236 + /* "lxml/etree.pyx":1234 * # check indices * if start is None: * c_start = 0 # <<<<<<<<<<<<<< * else: * c_start = start */ - __Pyx_TraceLine(1236,0,__PYX_ERR(0, 1236, __pyx_L1_error)) __pyx_v_c_start = 0; - /* "lxml/etree.pyx":1235 + /* "lxml/etree.pyx":1233 * * # check indices * if start is None: # <<<<<<<<<<<<<< @@ -61280,43 +57844,40 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p goto __pyx_L11; } - /* "lxml/etree.pyx":1238 + /* "lxml/etree.pyx":1236 * c_start = 0 * else: * c_start = start # <<<<<<<<<<<<<< * if stop is None: * c_stop = 0 */ - __Pyx_TraceLine(1238,0,__PYX_ERR(0, 1238, __pyx_L1_error)) /*else*/ { - __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_start); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1238, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_start); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1236, __pyx_L1_error) __pyx_v_c_start = __pyx_t_7; } __pyx_L11:; - /* "lxml/etree.pyx":1239 + /* "lxml/etree.pyx":1237 * else: * c_start = start * if stop is None: # <<<<<<<<<<<<<< * c_stop = 0 * else: */ - __Pyx_TraceLine(1239,0,__PYX_ERR(0, 1239, __pyx_L1_error)) __pyx_t_4 = (__pyx_v_stop == Py_None); __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":1240 + /* "lxml/etree.pyx":1238 * c_start = start * if stop is None: * c_stop = 0 # <<<<<<<<<<<<<< * else: * c_stop = stop */ - __Pyx_TraceLine(1240,0,__PYX_ERR(0, 1240, __pyx_L1_error)) __pyx_v_c_stop = 0; - /* "lxml/etree.pyx":1239 + /* "lxml/etree.pyx":1237 * else: * c_start = start * if stop is None: # <<<<<<<<<<<<<< @@ -61326,26 +57887,24 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p goto __pyx_L12; } - /* "lxml/etree.pyx":1242 + /* "lxml/etree.pyx":1240 * c_stop = 0 * else: * c_stop = stop # <<<<<<<<<<<<<< * if c_stop == 0 or \ * c_start >= c_stop and (c_stop > 0 or c_start < 0): */ - __Pyx_TraceLine(1242,0,__PYX_ERR(0, 1242, __pyx_L1_error)) /*else*/ { - __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_stop); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1242, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_stop); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1240, __pyx_L1_error) __pyx_v_c_stop = __pyx_t_7; - /* "lxml/etree.pyx":1243 + /* "lxml/etree.pyx":1241 * else: * c_stop = stop * if c_stop == 0 or \ # <<<<<<<<<<<<<< * c_start >= c_stop and (c_stop > 0 or c_start < 0): * raise ValueError, u"list.index(x): x not in slice" */ - __Pyx_TraceLine(1243,0,__PYX_ERR(0, 1243, __pyx_L1_error)) __pyx_t_4 = ((__pyx_v_c_stop == 0) != 0); if (!__pyx_t_4) { } else { @@ -61353,14 +57912,13 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p goto __pyx_L14_bool_binop_done; } - /* "lxml/etree.pyx":1244 + /* "lxml/etree.pyx":1242 * c_stop = stop * if c_stop == 0 or \ * c_start >= c_stop and (c_stop > 0 or c_start < 0): # <<<<<<<<<<<<<< * raise ValueError, u"list.index(x): x not in slice" * */ - __Pyx_TraceLine(1244,0,__PYX_ERR(0, 1244, __pyx_L1_error)) __pyx_t_4 = ((__pyx_v_c_start >= __pyx_v_c_stop) != 0); if (__pyx_t_4) { } else { @@ -61377,28 +57935,26 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p __pyx_t_3 = __pyx_t_4; __pyx_L14_bool_binop_done:; - /* "lxml/etree.pyx":1243 + /* "lxml/etree.pyx":1241 * else: * c_stop = stop * if c_stop == 0 or \ # <<<<<<<<<<<<<< * c_start >= c_stop and (c_stop > 0 or c_start < 0): * raise ValueError, u"list.index(x): x not in slice" */ - __Pyx_TraceLine(1243,0,__PYX_ERR(0, 1243, __pyx_L1_error)) if (unlikely(__pyx_t_3)) { - /* "lxml/etree.pyx":1245 + /* "lxml/etree.pyx":1243 * if c_stop == 0 or \ * c_start >= c_stop and (c_stop > 0 or c_start < 0): * raise ValueError, u"list.index(x): x not in slice" # <<<<<<<<<<<<<< * * # for negative slice indices, check slice before searching index */ - __Pyx_TraceLine(1245,0,__PYX_ERR(0, 1245, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_list_index_x_x_not_in_slice, 0, 0); - __PYX_ERR(0, 1245, __pyx_L1_error) + __PYX_ERR(0, 1243, __pyx_L1_error) - /* "lxml/etree.pyx":1243 + /* "lxml/etree.pyx":1241 * else: * c_stop = stop * if c_stop == 0 or \ # <<<<<<<<<<<<<< @@ -61409,14 +57965,13 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p } __pyx_L12:; - /* "lxml/etree.pyx":1248 + /* "lxml/etree.pyx":1246 * * # for negative slice indices, check slice before searching index * if c_start < 0 or c_stop < 0: # <<<<<<<<<<<<<< * # start from right, at most up to leftmost(c_start, c_stop) * if c_start < c_stop: */ - __Pyx_TraceLine(1248,0,__PYX_ERR(0, 1248, __pyx_L1_error)) __pyx_t_4 = ((__pyx_v_c_start < 0) != 0); if (!__pyx_t_4) { } else { @@ -61428,28 +57983,26 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p __pyx_L19_bool_binop_done:; if (__pyx_t_3) { - /* "lxml/etree.pyx":1250 + /* "lxml/etree.pyx":1248 * if c_start < 0 or c_stop < 0: * # start from right, at most up to leftmost(c_start, c_stop) * if c_start < c_stop: # <<<<<<<<<<<<<< * k = -c_start * else: */ - __Pyx_TraceLine(1250,0,__PYX_ERR(0, 1250, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_start < __pyx_v_c_stop) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":1251 + /* "lxml/etree.pyx":1249 * # start from right, at most up to leftmost(c_start, c_stop) * if c_start < c_stop: * k = -c_start # <<<<<<<<<<<<<< * else: * k = -c_stop */ - __Pyx_TraceLine(1251,0,__PYX_ERR(0, 1251, __pyx_L1_error)) __pyx_v_k = (-__pyx_v_c_start); - /* "lxml/etree.pyx":1250 + /* "lxml/etree.pyx":1248 * if c_start < 0 or c_stop < 0: * # start from right, at most up to leftmost(c_start, c_stop) * if c_start < c_stop: # <<<<<<<<<<<<<< @@ -61459,48 +58012,44 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p goto __pyx_L21; } - /* "lxml/etree.pyx":1253 + /* "lxml/etree.pyx":1251 * k = -c_start * else: * k = -c_stop # <<<<<<<<<<<<<< * c_start_node = self._c_node.last * l = 1 */ - __Pyx_TraceLine(1253,0,__PYX_ERR(0, 1253, __pyx_L1_error)) /*else*/ { __pyx_v_k = (-__pyx_v_c_stop); } __pyx_L21:; - /* "lxml/etree.pyx":1254 + /* "lxml/etree.pyx":1252 * else: * k = -c_stop * c_start_node = self._c_node.last # <<<<<<<<<<<<<< * l = 1 * while c_start_node != c_child and l < k: */ - __Pyx_TraceLine(1254,0,__PYX_ERR(0, 1254, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_c_node->last; __pyx_v_c_start_node = __pyx_t_2; - /* "lxml/etree.pyx":1255 + /* "lxml/etree.pyx":1253 * k = -c_stop * c_start_node = self._c_node.last * l = 1 # <<<<<<<<<<<<<< * while c_start_node != c_child and l < k: * if _isElement(c_start_node): */ - __Pyx_TraceLine(1255,0,__PYX_ERR(0, 1255, __pyx_L1_error)) __pyx_v_l = 1; - /* "lxml/etree.pyx":1256 + /* "lxml/etree.pyx":1254 * c_start_node = self._c_node.last * l = 1 * while c_start_node != c_child and l < k: # <<<<<<<<<<<<<< * if _isElement(c_start_node): * l += 1 */ - __Pyx_TraceLine(1256,0,__PYX_ERR(0, 1256, __pyx_L1_error)) while (1) { __pyx_t_4 = ((__pyx_v_c_start_node != __pyx_v_c_child) != 0); if (__pyx_t_4) { @@ -61513,28 +58062,26 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p __pyx_L24_bool_binop_done:; if (!__pyx_t_3) break; - /* "lxml/etree.pyx":1257 + /* "lxml/etree.pyx":1255 * l = 1 * while c_start_node != c_child and l < k: * if _isElement(c_start_node): # <<<<<<<<<<<<<< * l += 1 * c_start_node = c_start_node.prev */ - __Pyx_TraceLine(1257,0,__PYX_ERR(0, 1257, __pyx_L1_error)) __pyx_t_3 = (_isElement(__pyx_v_c_start_node) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":1258 + /* "lxml/etree.pyx":1256 * while c_start_node != c_child and l < k: * if _isElement(c_start_node): * l += 1 # <<<<<<<<<<<<<< * c_start_node = c_start_node.prev * if c_start_node == c_child: */ - __Pyx_TraceLine(1258,0,__PYX_ERR(0, 1258, __pyx_L1_error)) __pyx_v_l = (__pyx_v_l + 1); - /* "lxml/etree.pyx":1257 + /* "lxml/etree.pyx":1255 * l = 1 * while c_start_node != c_child and l < k: * if _isElement(c_start_node): # <<<<<<<<<<<<<< @@ -61543,37 +58090,34 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p */ } - /* "lxml/etree.pyx":1259 + /* "lxml/etree.pyx":1257 * if _isElement(c_start_node): * l += 1 * c_start_node = c_start_node.prev # <<<<<<<<<<<<<< * if c_start_node == c_child: * # found! before slice end? */ - __Pyx_TraceLine(1259,0,__PYX_ERR(0, 1259, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_start_node->prev; __pyx_v_c_start_node = __pyx_t_2; } - /* "lxml/etree.pyx":1260 + /* "lxml/etree.pyx":1258 * l += 1 * c_start_node = c_start_node.prev * if c_start_node == c_child: # <<<<<<<<<<<<<< * # found! before slice end? * if c_stop < 0 and l <= -c_stop: */ - __Pyx_TraceLine(1260,0,__PYX_ERR(0, 1260, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_start_node == __pyx_v_c_child) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":1262 + /* "lxml/etree.pyx":1260 * if c_start_node == c_child: * # found! before slice end? * if c_stop < 0 and l <= -c_stop: # <<<<<<<<<<<<<< * raise ValueError, u"list.index(x): x not in slice" * elif c_start < 0: */ - __Pyx_TraceLine(1262,0,__PYX_ERR(0, 1262, __pyx_L1_error)) __pyx_t_4 = ((__pyx_v_c_stop < 0) != 0); if (__pyx_t_4) { } else { @@ -61585,18 +58129,17 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p __pyx_L29_bool_binop_done:; if (unlikely(__pyx_t_3)) { - /* "lxml/etree.pyx":1263 + /* "lxml/etree.pyx":1261 * # found! before slice end? * if c_stop < 0 and l <= -c_stop: * raise ValueError, u"list.index(x): x not in slice" # <<<<<<<<<<<<<< * elif c_start < 0: * raise ValueError, u"list.index(x): x not in slice" */ - __Pyx_TraceLine(1263,0,__PYX_ERR(0, 1263, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_list_index_x_x_not_in_slice, 0, 0); - __PYX_ERR(0, 1263, __pyx_L1_error) + __PYX_ERR(0, 1261, __pyx_L1_error) - /* "lxml/etree.pyx":1262 + /* "lxml/etree.pyx":1260 * if c_start_node == c_child: * # found! before slice end? * if c_stop < 0 and l <= -c_stop: # <<<<<<<<<<<<<< @@ -61605,7 +58148,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p */ } - /* "lxml/etree.pyx":1260 + /* "lxml/etree.pyx":1258 * l += 1 * c_start_node = c_start_node.prev * if c_start_node == c_child: # <<<<<<<<<<<<<< @@ -61615,29 +58158,27 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p goto __pyx_L27; } - /* "lxml/etree.pyx":1264 + /* "lxml/etree.pyx":1262 * if c_stop < 0 and l <= -c_stop: * raise ValueError, u"list.index(x): x not in slice" * elif c_start < 0: # <<<<<<<<<<<<<< * raise ValueError, u"list.index(x): x not in slice" * */ - __Pyx_TraceLine(1264,0,__PYX_ERR(0, 1264, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_start < 0) != 0); if (unlikely(__pyx_t_3)) { - /* "lxml/etree.pyx":1265 + /* "lxml/etree.pyx":1263 * raise ValueError, u"list.index(x): x not in slice" * elif c_start < 0: * raise ValueError, u"list.index(x): x not in slice" # <<<<<<<<<<<<<< * * # now determine the index backwards from child */ - __Pyx_TraceLine(1265,0,__PYX_ERR(0, 1265, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_list_index_x_x_not_in_slice, 0, 0); - __PYX_ERR(0, 1265, __pyx_L1_error) + __PYX_ERR(0, 1263, __pyx_L1_error) - /* "lxml/etree.pyx":1264 + /* "lxml/etree.pyx":1262 * if c_stop < 0 and l <= -c_stop: * raise ValueError, u"list.index(x): x not in slice" * elif c_start < 0: # <<<<<<<<<<<<<< @@ -61647,7 +58188,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p } __pyx_L27:; - /* "lxml/etree.pyx":1248 + /* "lxml/etree.pyx":1246 * * # for negative slice indices, check slice before searching index * if c_start < 0 or c_stop < 0: # <<<<<<<<<<<<<< @@ -61656,46 +58197,42 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p */ } - /* "lxml/etree.pyx":1268 + /* "lxml/etree.pyx":1266 * * # now determine the index backwards from child * c_child = c_child.prev # <<<<<<<<<<<<<< * k = 0 * if c_stop > 0: */ - __Pyx_TraceLine(1268,0,__PYX_ERR(0, 1268, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_child->prev; __pyx_v_c_child = __pyx_t_2; - /* "lxml/etree.pyx":1269 + /* "lxml/etree.pyx":1267 * # now determine the index backwards from child * c_child = c_child.prev * k = 0 # <<<<<<<<<<<<<< * if c_stop > 0: * # we can optimize: stop after c_stop elements if not found */ - __Pyx_TraceLine(1269,0,__PYX_ERR(0, 1269, __pyx_L1_error)) __pyx_v_k = 0; - /* "lxml/etree.pyx":1270 + /* "lxml/etree.pyx":1268 * c_child = c_child.prev * k = 0 * if c_stop > 0: # <<<<<<<<<<<<<< * # we can optimize: stop after c_stop elements if not found * while c_child != NULL and k < c_stop: */ - __Pyx_TraceLine(1270,0,__PYX_ERR(0, 1270, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_stop > 0) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":1272 + /* "lxml/etree.pyx":1270 * if c_stop > 0: * # we can optimize: stop after c_stop elements if not found * while c_child != NULL and k < c_stop: # <<<<<<<<<<<<<< * if _isElement(c_child): * k += 1 */ - __Pyx_TraceLine(1272,0,__PYX_ERR(0, 1272, __pyx_L1_error)) while (1) { __pyx_t_4 = ((__pyx_v_c_child != NULL) != 0); if (__pyx_t_4) { @@ -61708,28 +58245,26 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p __pyx_L34_bool_binop_done:; if (!__pyx_t_3) break; - /* "lxml/etree.pyx":1273 + /* "lxml/etree.pyx":1271 * # we can optimize: stop after c_stop elements if not found * while c_child != NULL and k < c_stop: * if _isElement(c_child): # <<<<<<<<<<<<<< * k += 1 * c_child = c_child.prev */ - __Pyx_TraceLine(1273,0,__PYX_ERR(0, 1273, __pyx_L1_error)) __pyx_t_3 = (_isElement(__pyx_v_c_child) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":1274 + /* "lxml/etree.pyx":1272 * while c_child != NULL and k < c_stop: * if _isElement(c_child): * k += 1 # <<<<<<<<<<<<<< * c_child = c_child.prev * if k < c_stop: */ - __Pyx_TraceLine(1274,0,__PYX_ERR(0, 1274, __pyx_L1_error)) __pyx_v_k = (__pyx_v_k + 1); - /* "lxml/etree.pyx":1273 + /* "lxml/etree.pyx":1271 * # we can optimize: stop after c_stop elements if not found * while c_child != NULL and k < c_stop: * if _isElement(c_child): # <<<<<<<<<<<<<< @@ -61738,45 +58273,42 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p */ } - /* "lxml/etree.pyx":1275 + /* "lxml/etree.pyx":1273 * if _isElement(c_child): * k += 1 * c_child = c_child.prev # <<<<<<<<<<<<<< * if k < c_stop: * return k */ - __Pyx_TraceLine(1275,0,__PYX_ERR(0, 1275, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_child->prev; __pyx_v_c_child = __pyx_t_2; } - /* "lxml/etree.pyx":1276 + /* "lxml/etree.pyx":1274 * k += 1 * c_child = c_child.prev * if k < c_stop: # <<<<<<<<<<<<<< * return k * else: */ - __Pyx_TraceLine(1276,0,__PYX_ERR(0, 1276, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_k < __pyx_v_c_stop) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":1277 + /* "lxml/etree.pyx":1275 * c_child = c_child.prev * if k < c_stop: * return k # <<<<<<<<<<<<<< * else: * # traverse all */ - __Pyx_TraceLine(1277,0,__PYX_ERR(0, 1277, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1277, __pyx_L1_error) + __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1276 + /* "lxml/etree.pyx":1274 * k += 1 * c_child = c_child.prev * if k < c_stop: # <<<<<<<<<<<<<< @@ -61785,7 +58317,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p */ } - /* "lxml/etree.pyx":1270 + /* "lxml/etree.pyx":1268 * c_child = c_child.prev * k = 0 * if c_stop > 0: # <<<<<<<<<<<<<< @@ -61795,41 +58327,38 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p goto __pyx_L31; } - /* "lxml/etree.pyx":1280 + /* "lxml/etree.pyx":1278 * else: * # traverse all * while c_child != NULL: # <<<<<<<<<<<<<< * if _isElement(c_child): * k = k + 1 */ - __Pyx_TraceLine(1280,0,__PYX_ERR(0, 1280, __pyx_L1_error)) /*else*/ { while (1) { __pyx_t_3 = ((__pyx_v_c_child != NULL) != 0); if (!__pyx_t_3) break; - /* "lxml/etree.pyx":1281 + /* "lxml/etree.pyx":1279 * # traverse all * while c_child != NULL: * if _isElement(c_child): # <<<<<<<<<<<<<< * k = k + 1 * c_child = c_child.prev */ - __Pyx_TraceLine(1281,0,__PYX_ERR(0, 1281, __pyx_L1_error)) __pyx_t_3 = (_isElement(__pyx_v_c_child) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":1282 + /* "lxml/etree.pyx":1280 * while c_child != NULL: * if _isElement(c_child): * k = k + 1 # <<<<<<<<<<<<<< * c_child = c_child.prev * if c_start > 0: */ - __Pyx_TraceLine(1282,0,__PYX_ERR(0, 1282, __pyx_L1_error)) __pyx_v_k = (__pyx_v_k + 1); - /* "lxml/etree.pyx":1281 + /* "lxml/etree.pyx":1279 * # traverse all * while c_child != NULL: * if _isElement(c_child): # <<<<<<<<<<<<<< @@ -61838,56 +58367,52 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p */ } - /* "lxml/etree.pyx":1283 + /* "lxml/etree.pyx":1281 * if _isElement(c_child): * k = k + 1 * c_child = c_child.prev # <<<<<<<<<<<<<< * if c_start > 0: * if k >= c_start: */ - __Pyx_TraceLine(1283,0,__PYX_ERR(0, 1283, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_child->prev; __pyx_v_c_child = __pyx_t_2; } - /* "lxml/etree.pyx":1284 + /* "lxml/etree.pyx":1282 * k = k + 1 * c_child = c_child.prev * if c_start > 0: # <<<<<<<<<<<<<< * if k >= c_start: * return k */ - __Pyx_TraceLine(1284,0,__PYX_ERR(0, 1284, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_start > 0) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":1285 + /* "lxml/etree.pyx":1283 * c_child = c_child.prev * if c_start > 0: * if k >= c_start: # <<<<<<<<<<<<<< * return k * else: */ - __Pyx_TraceLine(1285,0,__PYX_ERR(0, 1285, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_k >= __pyx_v_c_start) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":1286 + /* "lxml/etree.pyx":1284 * if c_start > 0: * if k >= c_start: * return k # <<<<<<<<<<<<<< * else: * return k */ - __Pyx_TraceLine(1286,0,__PYX_ERR(0, 1286, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1286, __pyx_L1_error) + __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1285 + /* "lxml/etree.pyx":1283 * c_child = c_child.prev * if c_start > 0: * if k >= c_start: # <<<<<<<<<<<<<< @@ -61896,7 +58421,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p */ } - /* "lxml/etree.pyx":1284 + /* "lxml/etree.pyx":1282 * k = k + 1 * c_child = c_child.prev * if c_start > 0: # <<<<<<<<<<<<<< @@ -61906,17 +58431,16 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p goto __pyx_L41; } - /* "lxml/etree.pyx":1288 + /* "lxml/etree.pyx":1286 * return k * else: * return k # <<<<<<<<<<<<<< * if c_start != 0 or c_stop != 0: * raise ValueError, u"list.index(x): x not in slice" */ - __Pyx_TraceLine(1288,0,__PYX_ERR(0, 1288, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1288, __pyx_L1_error) + __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; @@ -61926,14 +58450,13 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p } __pyx_L31:; - /* "lxml/etree.pyx":1289 + /* "lxml/etree.pyx":1287 * else: * return k * if c_start != 0 or c_stop != 0: # <<<<<<<<<<<<<< * raise ValueError, u"list.index(x): x not in slice" * else: */ - __Pyx_TraceLine(1289,0,__PYX_ERR(0, 1289, __pyx_L1_error)) __pyx_t_4 = ((__pyx_v_c_start != 0) != 0); if (!__pyx_t_4) { } else { @@ -61945,18 +58468,17 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p __pyx_L44_bool_binop_done:; if (unlikely(__pyx_t_3)) { - /* "lxml/etree.pyx":1290 + /* "lxml/etree.pyx":1288 * return k * if c_start != 0 or c_stop != 0: * raise ValueError, u"list.index(x): x not in slice" # <<<<<<<<<<<<<< * else: * raise ValueError, u"list.index(x): x not in list" */ - __Pyx_TraceLine(1290,0,__PYX_ERR(0, 1290, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_list_index_x_x_not_in_slice, 0, 0); - __PYX_ERR(0, 1290, __pyx_L1_error) + __PYX_ERR(0, 1288, __pyx_L1_error) - /* "lxml/etree.pyx":1289 + /* "lxml/etree.pyx":1287 * else: * return k * if c_start != 0 or c_stop != 0: # <<<<<<<<<<<<<< @@ -61965,20 +58487,19 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p */ } - /* "lxml/etree.pyx":1292 + /* "lxml/etree.pyx":1290 * raise ValueError, u"list.index(x): x not in slice" * else: * raise ValueError, u"list.index(x): x not in list" # <<<<<<<<<<<<<< * * def get(self, key, default=None): */ - __Pyx_TraceLine(1292,0,__PYX_ERR(0, 1292, __pyx_L1_error)) /*else*/ { __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_list_index_x_x_not_in_list, 0, 0); - __PYX_ERR(0, 1292, __pyx_L1_error) + __PYX_ERR(0, 1290, __pyx_L1_error) } - /* "lxml/etree.pyx":1207 + /* "lxml/etree.pyx":1205 * return ElementChildIterator(self, reversed=True) * * def index(self, _Element child not None, start=None, stop=None): # <<<<<<<<<<<<<< @@ -61993,12 +58514,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1294 +/* "lxml/etree.pyx":1292 * raise ValueError, u"list.index(x): x not in list" * * def get(self, key, default=None): # <<<<<<<<<<<<<< @@ -62009,7 +58529,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_44index(struct LxmlElement *__p /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_8_Element_47get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_8_Element_46get[] = "get(self, key, default=None)\n\n Gets an element attribute.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_47get = {"get", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_47get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_46get}; +static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_47get = {"get", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_47get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_46get}; static PyObject *__pyx_pw_4lxml_5etree_8_Element_47get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_key = 0; PyObject *__pyx_v_default = 0; @@ -62044,7 +58564,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_47get(PyObject *__pyx_v_self, P } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) __PYX_ERR(0, 1294, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) __PYX_ERR(0, 1292, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -62060,7 +58580,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_47get(PyObject *__pyx_v_self, P } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1294, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1292, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._Element.get", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -62075,40 +58595,35 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_47get(PyObject *__pyx_v_self, P static PyObject *__pyx_pf_4lxml_5etree_8_Element_46get(struct LxmlElement *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__81) __Pyx_RefNannySetupContext("get", 0); - __Pyx_TraceCall("get", __pyx_f[0], 1294, 0, __PYX_ERR(0, 1294, __pyx_L1_error)); - /* "lxml/etree.pyx":1299 + /* "lxml/etree.pyx":1297 * Gets an element attribute. * """ * _assertValidNode(self) # <<<<<<<<<<<<<< * return _getAttributeValue(self, key, default) * */ - __Pyx_TraceLine(1299,0,__PYX_ERR(0, 1299, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1299, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1297, __pyx_L1_error) - /* "lxml/etree.pyx":1300 + /* "lxml/etree.pyx":1298 * """ * _assertValidNode(self) * return _getAttributeValue(self, key, default) # <<<<<<<<<<<<<< * * def keys(self): */ - __Pyx_TraceLine(1300,0,__PYX_ERR(0, 1300, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_4lxml_5etree__getAttributeValue(__pyx_v_self, __pyx_v_key, __pyx_v_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1300, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__getAttributeValue(__pyx_v_self, __pyx_v_key, __pyx_v_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1294 + /* "lxml/etree.pyx":1292 * raise ValueError, u"list.index(x): x not in list" * * def get(self, key, default=None): # <<<<<<<<<<<<<< @@ -62123,12 +58638,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_46get(struct LxmlElement *__pyx __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1302 +/* "lxml/etree.pyx":1300 * return _getAttributeValue(self, key, default) * * def keys(self): # <<<<<<<<<<<<<< @@ -62153,40 +58667,35 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_49keys(PyObject *__pyx_v_self, static PyObject *__pyx_pf_4lxml_5etree_8_Element_48keys(struct LxmlElement *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__82) __Pyx_RefNannySetupContext("keys", 0); - __Pyx_TraceCall("keys", __pyx_f[0], 1302, 0, __PYX_ERR(0, 1302, __pyx_L1_error)); - /* "lxml/etree.pyx":1308 + /* "lxml/etree.pyx":1306 * arbitrary order (just like for an ordinary Python dictionary). * """ * _assertValidNode(self) # <<<<<<<<<<<<<< * return _collectAttributes(self._c_node, 1) * */ - __Pyx_TraceLine(1308,0,__PYX_ERR(0, 1308, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1308, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1306, __pyx_L1_error) - /* "lxml/etree.pyx":1309 + /* "lxml/etree.pyx":1307 * """ * _assertValidNode(self) * return _collectAttributes(self._c_node, 1) # <<<<<<<<<<<<<< * * def values(self): */ - __Pyx_TraceLine(1309,0,__PYX_ERR(0, 1309, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->_c_node, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1309, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->_c_node, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1302 + /* "lxml/etree.pyx":1300 * return _getAttributeValue(self, key, default) * * def keys(self): # <<<<<<<<<<<<<< @@ -62201,12 +58710,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_48keys(struct LxmlElement *__py __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1311 +/* "lxml/etree.pyx":1309 * return _collectAttributes(self._c_node, 1) * * def values(self): # <<<<<<<<<<<<<< @@ -62231,40 +58739,35 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_51values(PyObject *__pyx_v_self static PyObject *__pyx_pf_4lxml_5etree_8_Element_50values(struct LxmlElement *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__83) __Pyx_RefNannySetupContext("values", 0); - __Pyx_TraceCall("values", __pyx_f[0], 1311, 0, __PYX_ERR(0, 1311, __pyx_L1_error)); - /* "lxml/etree.pyx":1317 + /* "lxml/etree.pyx":1315 * attributes are returned in an arbitrary order. * """ * _assertValidNode(self) # <<<<<<<<<<<<<< * return _collectAttributes(self._c_node, 2) * */ - __Pyx_TraceLine(1317,0,__PYX_ERR(0, 1317, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1317, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1315, __pyx_L1_error) - /* "lxml/etree.pyx":1318 + /* "lxml/etree.pyx":1316 * """ * _assertValidNode(self) * return _collectAttributes(self._c_node, 2) # <<<<<<<<<<<<<< * * def items(self): */ - __Pyx_TraceLine(1318,0,__PYX_ERR(0, 1318, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->_c_node, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1318, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->_c_node, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1311 + /* "lxml/etree.pyx":1309 * return _collectAttributes(self._c_node, 1) * * def values(self): # <<<<<<<<<<<<<< @@ -62279,12 +58782,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_50values(struct LxmlElement *__ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1320 +/* "lxml/etree.pyx":1318 * return _collectAttributes(self._c_node, 2) * * def items(self): # <<<<<<<<<<<<<< @@ -62309,40 +58811,35 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_53items(PyObject *__pyx_v_self, static PyObject *__pyx_pf_4lxml_5etree_8_Element_52items(struct LxmlElement *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__84) __Pyx_RefNannySetupContext("items", 0); - __Pyx_TraceCall("items", __pyx_f[0], 1320, 0, __PYX_ERR(0, 1320, __pyx_L1_error)); - /* "lxml/etree.pyx":1326 + /* "lxml/etree.pyx":1324 * an arbitrary order. * """ * _assertValidNode(self) # <<<<<<<<<<<<<< * return _collectAttributes(self._c_node, 3) * */ - __Pyx_TraceLine(1326,0,__PYX_ERR(0, 1326, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1326, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1324, __pyx_L1_error) - /* "lxml/etree.pyx":1327 + /* "lxml/etree.pyx":1325 * """ * _assertValidNode(self) * return _collectAttributes(self._c_node, 3) # <<<<<<<<<<<<<< * * def getchildren(self): */ - __Pyx_TraceLine(1327,0,__PYX_ERR(0, 1327, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->_c_node, 3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1327, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->_c_node, 3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1320 + /* "lxml/etree.pyx":1318 * return _collectAttributes(self._c_node, 2) * * def items(self): # <<<<<<<<<<<<<< @@ -62357,12 +58854,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_52items(struct LxmlElement *__p __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1329 +/* "lxml/etree.pyx":1327 * return _collectAttributes(self._c_node, 3) * * def getchildren(self): # <<<<<<<<<<<<<< @@ -62387,40 +58883,35 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_55getchildren(PyObject *__pyx_v static PyObject *__pyx_pf_4lxml_5etree_8_Element_54getchildren(struct LxmlElement *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__85) __Pyx_RefNannySetupContext("getchildren", 0); - __Pyx_TraceCall("getchildren", __pyx_f[0], 1329, 0, __PYX_ERR(0, 1329, __pyx_L1_error)); - /* "lxml/etree.pyx":1339 + /* "lxml/etree.pyx":1337 * ``list(element)`` or simply iterate over elements. * """ * _assertValidNode(self) # <<<<<<<<<<<<<< * return _collectChildren(self) * */ - __Pyx_TraceLine(1339,0,__PYX_ERR(0, 1339, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1339, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1337, __pyx_L1_error) - /* "lxml/etree.pyx":1340 + /* "lxml/etree.pyx":1338 * """ * _assertValidNode(self) * return _collectChildren(self) # <<<<<<<<<<<<<< * * def getparent(self): */ - __Pyx_TraceLine(1340,0,__PYX_ERR(0, 1340, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_4lxml_5etree__collectChildren(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1340, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__collectChildren(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1329 + /* "lxml/etree.pyx":1327 * return _collectAttributes(self._c_node, 3) * * def getchildren(self): # <<<<<<<<<<<<<< @@ -62435,12 +58926,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_54getchildren(struct LxmlElemen __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1342 +/* "lxml/etree.pyx":1340 * return _collectChildren(self) * * def getparent(self): # <<<<<<<<<<<<<< @@ -62466,49 +58956,43 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_57getparent(PyObject *__pyx_v_s static PyObject *__pyx_pf_4lxml_5etree_8_Element_56getparent(struct LxmlElement *__pyx_v_self) { xmlNode *__pyx_v_c_node; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__86) __Pyx_RefNannySetupContext("getparent", 0); - __Pyx_TraceCall("getparent", __pyx_f[0], 1342, 0, __PYX_ERR(0, 1342, __pyx_L1_error)); - /* "lxml/etree.pyx":1349 + /* "lxml/etree.pyx":1347 * cdef xmlNode* c_node * #_assertValidNode(self) # not needed * c_node = _parentElement(self._c_node) # <<<<<<<<<<<<<< * if c_node is NULL: * return None */ - __Pyx_TraceLine(1349,0,__PYX_ERR(0, 1349, __pyx_L1_error)) __pyx_v_c_node = __pyx_f_4lxml_5etree__parentElement(__pyx_v_self->_c_node); - /* "lxml/etree.pyx":1350 + /* "lxml/etree.pyx":1348 * #_assertValidNode(self) # not needed * c_node = _parentElement(self._c_node) * if c_node is NULL: # <<<<<<<<<<<<<< * return None * return _elementFactory(self._doc, c_node) */ - __Pyx_TraceLine(1350,0,__PYX_ERR(0, 1350, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":1351 + /* "lxml/etree.pyx":1349 * c_node = _parentElement(self._c_node) * if c_node is NULL: * return None # <<<<<<<<<<<<<< * return _elementFactory(self._doc, c_node) * */ - __Pyx_TraceLine(1351,0,__PYX_ERR(0, 1351, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/etree.pyx":1350 + /* "lxml/etree.pyx":1348 * #_assertValidNode(self) # not needed * c_node = _parentElement(self._c_node) * if c_node is NULL: # <<<<<<<<<<<<<< @@ -62517,25 +59001,24 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_56getparent(struct LxmlElement */ } - /* "lxml/etree.pyx":1352 + /* "lxml/etree.pyx":1350 * if c_node is NULL: * return None * return _elementFactory(self._doc, c_node) # <<<<<<<<<<<<<< * * def getnext(self): */ - __Pyx_TraceLine(1352,0,__PYX_ERR(0, 1352, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = ((PyObject *)__pyx_v_self->_doc); __Pyx_INCREF(__pyx_t_2); - __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_2), __pyx_v_c_node)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1352, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_2), __pyx_v_c_node)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1342 + /* "lxml/etree.pyx":1340 * return _collectChildren(self) * * def getparent(self): # <<<<<<<<<<<<<< @@ -62551,12 +59034,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_56getparent(struct LxmlElement __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1354 +/* "lxml/etree.pyx":1352 * return _elementFactory(self._doc, c_node) * * def getnext(self): # <<<<<<<<<<<<<< @@ -62582,49 +59064,43 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_59getnext(PyObject *__pyx_v_sel static PyObject *__pyx_pf_4lxml_5etree_8_Element_58getnext(struct LxmlElement *__pyx_v_self) { xmlNode *__pyx_v_c_node; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__87) __Pyx_RefNannySetupContext("getnext", 0); - __Pyx_TraceCall("getnext", __pyx_f[0], 1354, 0, __PYX_ERR(0, 1354, __pyx_L1_error)); - /* "lxml/etree.pyx":1361 + /* "lxml/etree.pyx":1359 * cdef xmlNode* c_node * #_assertValidNode(self) # not needed * c_node = _nextElement(self._c_node) # <<<<<<<<<<<<<< * if c_node is NULL: * return None */ - __Pyx_TraceLine(1361,0,__PYX_ERR(0, 1361, __pyx_L1_error)) __pyx_v_c_node = __pyx_f_4lxml_5etree__nextElement(__pyx_v_self->_c_node); - /* "lxml/etree.pyx":1362 + /* "lxml/etree.pyx":1360 * #_assertValidNode(self) # not needed * c_node = _nextElement(self._c_node) * if c_node is NULL: # <<<<<<<<<<<<<< * return None * return _elementFactory(self._doc, c_node) */ - __Pyx_TraceLine(1362,0,__PYX_ERR(0, 1362, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":1363 + /* "lxml/etree.pyx":1361 * c_node = _nextElement(self._c_node) * if c_node is NULL: * return None # <<<<<<<<<<<<<< * return _elementFactory(self._doc, c_node) * */ - __Pyx_TraceLine(1363,0,__PYX_ERR(0, 1363, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/etree.pyx":1362 + /* "lxml/etree.pyx":1360 * #_assertValidNode(self) # not needed * c_node = _nextElement(self._c_node) * if c_node is NULL: # <<<<<<<<<<<<<< @@ -62633,25 +59109,24 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_58getnext(struct LxmlElement *_ */ } - /* "lxml/etree.pyx":1364 + /* "lxml/etree.pyx":1362 * if c_node is NULL: * return None * return _elementFactory(self._doc, c_node) # <<<<<<<<<<<<<< * * def getprevious(self): */ - __Pyx_TraceLine(1364,0,__PYX_ERR(0, 1364, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = ((PyObject *)__pyx_v_self->_doc); __Pyx_INCREF(__pyx_t_2); - __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_2), __pyx_v_c_node)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1364, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_2), __pyx_v_c_node)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1354 + /* "lxml/etree.pyx":1352 * return _elementFactory(self._doc, c_node) * * def getnext(self): # <<<<<<<<<<<<<< @@ -62667,12 +59142,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_58getnext(struct LxmlElement *_ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1366 +/* "lxml/etree.pyx":1364 * return _elementFactory(self._doc, c_node) * * def getprevious(self): # <<<<<<<<<<<<<< @@ -62698,49 +59172,43 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_61getprevious(PyObject *__pyx_v static PyObject *__pyx_pf_4lxml_5etree_8_Element_60getprevious(struct LxmlElement *__pyx_v_self) { xmlNode *__pyx_v_c_node; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__88) __Pyx_RefNannySetupContext("getprevious", 0); - __Pyx_TraceCall("getprevious", __pyx_f[0], 1366, 0, __PYX_ERR(0, 1366, __pyx_L1_error)); - /* "lxml/etree.pyx":1373 + /* "lxml/etree.pyx":1371 * cdef xmlNode* c_node * #_assertValidNode(self) # not needed * c_node = _previousElement(self._c_node) # <<<<<<<<<<<<<< * if c_node is NULL: * return None */ - __Pyx_TraceLine(1373,0,__PYX_ERR(0, 1373, __pyx_L1_error)) __pyx_v_c_node = __pyx_f_4lxml_5etree__previousElement(__pyx_v_self->_c_node); - /* "lxml/etree.pyx":1374 + /* "lxml/etree.pyx":1372 * #_assertValidNode(self) # not needed * c_node = _previousElement(self._c_node) * if c_node is NULL: # <<<<<<<<<<<<<< * return None * return _elementFactory(self._doc, c_node) */ - __Pyx_TraceLine(1374,0,__PYX_ERR(0, 1374, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":1375 + /* "lxml/etree.pyx":1373 * c_node = _previousElement(self._c_node) * if c_node is NULL: * return None # <<<<<<<<<<<<<< * return _elementFactory(self._doc, c_node) * */ - __Pyx_TraceLine(1375,0,__PYX_ERR(0, 1375, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/etree.pyx":1374 + /* "lxml/etree.pyx":1372 * #_assertValidNode(self) # not needed * c_node = _previousElement(self._c_node) * if c_node is NULL: # <<<<<<<<<<<<<< @@ -62749,25 +59217,24 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_60getprevious(struct LxmlElemen */ } - /* "lxml/etree.pyx":1376 + /* "lxml/etree.pyx":1374 * if c_node is NULL: * return None * return _elementFactory(self._doc, c_node) # <<<<<<<<<<<<<< * * def itersiblings(self, tag=None, *tags, preceding=False): */ - __Pyx_TraceLine(1376,0,__PYX_ERR(0, 1376, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = ((PyObject *)__pyx_v_self->_doc); __Pyx_INCREF(__pyx_t_2); - __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_2), __pyx_v_c_node)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1376, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_2), __pyx_v_c_node)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1366 + /* "lxml/etree.pyx":1364 * return _elementFactory(self._doc, c_node) * * def getprevious(self): # <<<<<<<<<<<<<< @@ -62783,12 +59250,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_60getprevious(struct LxmlElemen __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1378 +/* "lxml/etree.pyx":1376 * return _elementFactory(self._doc, c_node) * * def itersiblings(self, tag=None, *tags, preceding=False): # <<<<<<<<<<<<<< @@ -62799,7 +59265,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_60getprevious(struct LxmlElemen /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_8_Element_63itersiblings(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_8_Element_62itersiblings[] = "itersiblings(self, tag=None, *tags, preceding=False)\n\n Iterate over the following or preceding siblings of this element.\n\n The direction is determined by the 'preceding' keyword which\n defaults to False, i.e. forward iteration over the following\n siblings. When True, the iterator yields the preceding\n siblings in reverse document order, i.e. starting right before\n the current element and going backwards.\n\n Can be restricted to find only elements with specific tags,\n see `iter`.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_63itersiblings = {"itersiblings", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_63itersiblings, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_62itersiblings}; +static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_63itersiblings = {"itersiblings", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_63itersiblings, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_62itersiblings}; static PyObject *__pyx_pw_4lxml_5etree_8_Element_63itersiblings(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tag = 0; PyObject *__pyx_v_preceding = 0; @@ -62846,7 +59312,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_63itersiblings(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, "itersiblings") < 0)) __PYX_ERR(0, 1378, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "itersiblings") < 0)) __PYX_ERR(0, 1376, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -62876,50 +59342,45 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_63itersiblings(PyObject *__pyx_ static PyObject *__pyx_pf_4lxml_5etree_8_Element_62itersiblings(struct LxmlElement *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_preceding, PyObject *__pyx_v_tags) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__89) __Pyx_RefNannySetupContext("itersiblings", 0); - __Pyx_TraceCall("itersiblings", __pyx_f[0], 1378, 0, __PYX_ERR(0, 1378, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_tags); - /* "lxml/etree.pyx":1392 + /* "lxml/etree.pyx":1390 * see `iter`. * """ * if tag is not None: # <<<<<<<<<<<<<< * tags += (tag,) * return SiblingsIterator(self, tags, preceding=preceding) */ - __Pyx_TraceLine(1392,0,__PYX_ERR(0, 1392, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_tag != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1393 + /* "lxml/etree.pyx":1391 * """ * if tag is not None: * tags += (tag,) # <<<<<<<<<<<<<< * return SiblingsIterator(self, tags, preceding=preceding) * */ - __Pyx_TraceLine(1393,0,__PYX_ERR(0, 1393, __pyx_L1_error)) - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1393, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1391, __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, 1393, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1391, __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":1392 + /* "lxml/etree.pyx":1390 * see `iter`. * """ * if tag is not None: # <<<<<<<<<<<<<< @@ -62928,16 +59389,15 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_62itersiblings(struct LxmlEleme */ } - /* "lxml/etree.pyx":1394 + /* "lxml/etree.pyx":1392 * if tag is not None: * tags += (tag,) * return SiblingsIterator(self, tags, preceding=preceding) # <<<<<<<<<<<<<< * * def iterancestors(self, tag=None, *tags): */ - __Pyx_TraceLine(1394,0,__PYX_ERR(0, 1394, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1394, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -62945,10 +59405,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, 1394, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1392, __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, 1394, __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, 1394, __pyx_L1_error) + 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) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -62956,7 +59416,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_62itersiblings(struct LxmlEleme __pyx_t_5 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1378 + /* "lxml/etree.pyx":1376 * return _elementFactory(self._doc, c_node) * * def itersiblings(self, tag=None, *tags, preceding=False): # <<<<<<<<<<<<<< @@ -62974,12 +59434,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_62itersiblings(struct LxmlEleme __pyx_L0:; __Pyx_XDECREF(__pyx_v_tags); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1396 +/* "lxml/etree.pyx":1394 * return SiblingsIterator(self, tags, preceding=preceding) * * def iterancestors(self, tag=None, *tags): # <<<<<<<<<<<<<< @@ -62990,7 +59449,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_62itersiblings(struct LxmlEleme /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_8_Element_65iterancestors(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_8_Element_64iterancestors[] = "iterancestors(self, tag=None, *tags)\n\n Iterate over the ancestors of this element (from parent to parent).\n\n Can be restricted to find only elements with specific tags,\n see `iter`.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_65iterancestors = {"iterancestors", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_65iterancestors, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_64iterancestors}; +static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_65iterancestors = {"iterancestors", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_65iterancestors, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_64iterancestors}; static PyObject *__pyx_pw_4lxml_5etree_8_Element_65iterancestors(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tag = 0; PyObject *__pyx_v_tags = 0; @@ -63030,7 +59489,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, 1396, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "iterancestors") < 0)) __PYX_ERR(0, 1394, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -63059,49 +59518,44 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_65iterancestors(PyObject *__pyx static PyObject *__pyx_pf_4lxml_5etree_8_Element_64iterancestors(struct LxmlElement *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_tags) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__90) __Pyx_RefNannySetupContext("iterancestors", 0); - __Pyx_TraceCall("iterancestors", __pyx_f[0], 1396, 0, __PYX_ERR(0, 1396, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_tags); - /* "lxml/etree.pyx":1404 + /* "lxml/etree.pyx":1402 * see `iter`. * """ * if tag is not None: # <<<<<<<<<<<<<< * tags += (tag,) * return AncestorsIterator(self, tags) */ - __Pyx_TraceLine(1404,0,__PYX_ERR(0, 1404, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_tag != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1405 + /* "lxml/etree.pyx":1403 * """ * if tag is not None: * tags += (tag,) # <<<<<<<<<<<<<< * return AncestorsIterator(self, tags) * */ - __Pyx_TraceLine(1405,0,__PYX_ERR(0, 1405, __pyx_L1_error)) - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1405, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1403, __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, 1405, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1403, __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":1404 + /* "lxml/etree.pyx":1402 * see `iter`. * """ * if tag is not None: # <<<<<<<<<<<<<< @@ -63110,16 +59564,15 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_64iterancestors(struct LxmlElem */ } - /* "lxml/etree.pyx":1406 + /* "lxml/etree.pyx":1404 * if tag is not None: * tags += (tag,) * return AncestorsIterator(self, tags) # <<<<<<<<<<<<<< * * def iterdescendants(self, tag=None, *tags): */ - __Pyx_TraceLine(1406,0,__PYX_ERR(0, 1406, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1406, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -63127,14 +59580,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, 1406, __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, 1404, __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":1396 + /* "lxml/etree.pyx":1394 * return SiblingsIterator(self, tags, preceding=preceding) * * def iterancestors(self, tag=None, *tags): # <<<<<<<<<<<<<< @@ -63151,12 +59604,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_64iterancestors(struct LxmlElem __pyx_L0:; __Pyx_XDECREF(__pyx_v_tags); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1408 +/* "lxml/etree.pyx":1406 * return AncestorsIterator(self, tags) * * def iterdescendants(self, tag=None, *tags): # <<<<<<<<<<<<<< @@ -63167,7 +59619,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_64iterancestors(struct LxmlElem /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_8_Element_67iterdescendants(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_8_Element_66iterdescendants[] = "iterdescendants(self, tag=None, *tags)\n\n Iterate over the descendants of this element in document order.\n\n As opposed to ``el.iter()``, this iterator does not yield the element\n itself. The returned elements can be restricted to find only elements\n with specific tags, see `iter`.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_67iterdescendants = {"iterdescendants", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_67iterdescendants, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_66iterdescendants}; +static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_67iterdescendants = {"iterdescendants", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_67iterdescendants, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_66iterdescendants}; static PyObject *__pyx_pw_4lxml_5etree_8_Element_67iterdescendants(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tag = 0; PyObject *__pyx_v_tags = 0; @@ -63207,7 +59659,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, 1408, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "iterdescendants") < 0)) __PYX_ERR(0, 1406, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -63236,50 +59688,45 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_67iterdescendants(PyObject *__p static PyObject *__pyx_pf_4lxml_5etree_8_Element_66iterdescendants(struct LxmlElement *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_tags) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__91) __Pyx_RefNannySetupContext("iterdescendants", 0); - __Pyx_TraceCall("iterdescendants", __pyx_f[0], 1408, 0, __PYX_ERR(0, 1408, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_tags); - /* "lxml/etree.pyx":1417 + /* "lxml/etree.pyx":1415 * with specific tags, see `iter`. * """ * if tag is not None: # <<<<<<<<<<<<<< * tags += (tag,) * return ElementDepthFirstIterator(self, tags, inclusive=False) */ - __Pyx_TraceLine(1417,0,__PYX_ERR(0, 1417, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_tag != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1418 + /* "lxml/etree.pyx":1416 * """ * if tag is not None: * tags += (tag,) # <<<<<<<<<<<<<< * return ElementDepthFirstIterator(self, tags, inclusive=False) * */ - __Pyx_TraceLine(1418,0,__PYX_ERR(0, 1418, __pyx_L1_error)) - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1418, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1416, __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, 1418, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1416, __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":1417 + /* "lxml/etree.pyx":1415 * with specific tags, see `iter`. * """ * if tag is not None: # <<<<<<<<<<<<<< @@ -63288,16 +59735,15 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_66iterdescendants(struct LxmlEl */ } - /* "lxml/etree.pyx":1419 + /* "lxml/etree.pyx":1417 * if tag is not None: * tags += (tag,) * return ElementDepthFirstIterator(self, tags, inclusive=False) # <<<<<<<<<<<<<< * * def iterchildren(self, tag=None, *tags, reversed=False): */ - __Pyx_TraceLine(1419,0,__PYX_ERR(0, 1419, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1419, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -63305,10 +59751,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, 1419, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_inclusive, Py_False) < 0) __PYX_ERR(0, 1419, __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, 1419, __pyx_L1_error) + 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) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -63316,7 +59762,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_66iterdescendants(struct LxmlEl __pyx_t_5 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1408 + /* "lxml/etree.pyx":1406 * return AncestorsIterator(self, tags) * * def iterdescendants(self, tag=None, *tags): # <<<<<<<<<<<<<< @@ -63334,12 +59780,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_66iterdescendants(struct LxmlEl __pyx_L0:; __Pyx_XDECREF(__pyx_v_tags); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1421 +/* "lxml/etree.pyx":1419 * return ElementDepthFirstIterator(self, tags, inclusive=False) * * def iterchildren(self, tag=None, *tags, reversed=False): # <<<<<<<<<<<<<< @@ -63350,7 +59795,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_66iterdescendants(struct LxmlEl /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_8_Element_69iterchildren(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_8_Element_68iterchildren[] = "iterchildren(self, tag=None, *tags, reversed=False)\n\n Iterate over the children of this element.\n\n As opposed to using normal iteration on this element, the returned\n elements can be reversed with the 'reversed' keyword and restricted\n to find only elements with specific tags, see `iter`.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_69iterchildren = {"iterchildren", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_69iterchildren, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_68iterchildren}; +static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_69iterchildren = {"iterchildren", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_69iterchildren, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_68iterchildren}; static PyObject *__pyx_pw_4lxml_5etree_8_Element_69iterchildren(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tag = 0; PyObject *__pyx_v_reversed = 0; @@ -63397,7 +59842,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, 1421, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "iterchildren") < 0)) __PYX_ERR(0, 1419, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -63427,50 +59872,45 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_69iterchildren(PyObject *__pyx_ static PyObject *__pyx_pf_4lxml_5etree_8_Element_68iterchildren(struct LxmlElement *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_reversed, PyObject *__pyx_v_tags) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__92) __Pyx_RefNannySetupContext("iterchildren", 0); - __Pyx_TraceCall("iterchildren", __pyx_f[0], 1421, 0, __PYX_ERR(0, 1421, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_tags); - /* "lxml/etree.pyx":1430 + /* "lxml/etree.pyx":1428 * to find only elements with specific tags, see `iter`. * """ * if tag is not None: # <<<<<<<<<<<<<< * tags += (tag,) * return ElementChildIterator(self, tags, reversed=reversed) */ - __Pyx_TraceLine(1430,0,__PYX_ERR(0, 1430, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_tag != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1431 + /* "lxml/etree.pyx":1429 * """ * if tag is not None: * tags += (tag,) # <<<<<<<<<<<<<< * return ElementChildIterator(self, tags, reversed=reversed) * */ - __Pyx_TraceLine(1431,0,__PYX_ERR(0, 1431, __pyx_L1_error)) - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1431, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1429, __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, 1431, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1429, __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":1430 + /* "lxml/etree.pyx":1428 * to find only elements with specific tags, see `iter`. * """ * if tag is not None: # <<<<<<<<<<<<<< @@ -63479,16 +59919,15 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_68iterchildren(struct LxmlEleme */ } - /* "lxml/etree.pyx":1432 + /* "lxml/etree.pyx":1430 * if tag is not None: * tags += (tag,) * return ElementChildIterator(self, tags, reversed=reversed) # <<<<<<<<<<<<<< * * def getroottree(self): */ - __Pyx_TraceLine(1432,0,__PYX_ERR(0, 1432, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1432, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -63496,10 +59935,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, 1432, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1430, __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, 1432, __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, 1432, __pyx_L1_error) + 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) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -63507,7 +59946,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_68iterchildren(struct LxmlEleme __pyx_t_5 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1421 + /* "lxml/etree.pyx":1419 * return ElementDepthFirstIterator(self, tags, inclusive=False) * * def iterchildren(self, tag=None, *tags, reversed=False): # <<<<<<<<<<<<<< @@ -63525,12 +59964,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_68iterchildren(struct LxmlEleme __pyx_L0:; __Pyx_XDECREF(__pyx_v_tags); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1434 +/* "lxml/etree.pyx":1432 * return ElementChildIterator(self, tags, reversed=reversed) * * def getroottree(self): # <<<<<<<<<<<<<< @@ -63555,47 +59993,42 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_71getroottree(PyObject *__pyx_v static PyObject *__pyx_pf_4lxml_5etree_8_Element_70getroottree(struct LxmlElement *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__93) __Pyx_RefNannySetupContext("getroottree", 0); - __Pyx_TraceCall("getroottree", __pyx_f[0], 1434, 0, __PYX_ERR(0, 1434, __pyx_L1_error)); - /* "lxml/etree.pyx":1443 + /* "lxml/etree.pyx":1441 * returns None (for the root element) and then build an ElementTree for * the last parent that was returned.""" * _assertValidDoc(self._doc) # <<<<<<<<<<<<<< * return _elementTreeFactory(self._doc, None) * */ - __Pyx_TraceLine(1443,0,__PYX_ERR(0, 1443, __pyx_L1_error)) __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, 1443, __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, 1441, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":1444 + /* "lxml/etree.pyx":1442 * the last parent that was returned.""" * _assertValidDoc(self._doc) * return _elementTreeFactory(self._doc, None) # <<<<<<<<<<<<<< * * def getiterator(self, tag=None, *tags): */ - __Pyx_TraceLine(1444,0,__PYX_ERR(0, 1444, __pyx_L1_error)) __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, 1444, __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, 1442, __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":1434 + /* "lxml/etree.pyx":1432 * return ElementChildIterator(self, tags, reversed=reversed) * * def getroottree(self): # <<<<<<<<<<<<<< @@ -63611,12 +60044,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_70getroottree(struct LxmlElemen __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1446 +/* "lxml/etree.pyx":1444 * return _elementTreeFactory(self._doc, None) * * def getiterator(self, tag=None, *tags): # <<<<<<<<<<<<<< @@ -63627,7 +60059,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_70getroottree(struct LxmlElemen /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_8_Element_73getiterator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_8_Element_72getiterator[] = "getiterator(self, tag=None, *tags)\n\n Returns a sequence or iterator of all elements in the subtree in\n document order (depth first pre-order), starting with this\n element.\n\n Can be restricted to find only elements with specific tags,\n see `iter`.\n\n :deprecated: Note that this method is deprecated as of\n ElementTree 1.3 and lxml 2.0. It returns an iterator in\n lxml, which diverges from the original ElementTree\n behaviour. If you want an efficient iterator, use the\n ``element.iter()`` method instead. You should only use this\n method in new code if you require backwards compatibility\n with older versions of lxml or ElementTree.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_73getiterator = {"getiterator", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_73getiterator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_72getiterator}; +static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_73getiterator = {"getiterator", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_73getiterator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_72getiterator}; static PyObject *__pyx_pw_4lxml_5etree_8_Element_73getiterator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tag = 0; PyObject *__pyx_v_tags = 0; @@ -63667,7 +60099,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, 1446, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "getiterator") < 0)) __PYX_ERR(0, 1444, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -63696,49 +60128,44 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_73getiterator(PyObject *__pyx_v static PyObject *__pyx_pf_4lxml_5etree_8_Element_72getiterator(struct LxmlElement *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_tags) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__94) __Pyx_RefNannySetupContext("getiterator", 0); - __Pyx_TraceCall("getiterator", __pyx_f[0], 1446, 0, __PYX_ERR(0, 1446, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_tags); - /* "lxml/etree.pyx":1464 + /* "lxml/etree.pyx":1462 * with older versions of lxml or ElementTree. * """ * if tag is not None: # <<<<<<<<<<<<<< * tags += (tag,) * return ElementDepthFirstIterator(self, tags) */ - __Pyx_TraceLine(1464,0,__PYX_ERR(0, 1464, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_tag != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1465 + /* "lxml/etree.pyx":1463 * """ * if tag is not None: * tags += (tag,) # <<<<<<<<<<<<<< * return ElementDepthFirstIterator(self, tags) * */ - __Pyx_TraceLine(1465,0,__PYX_ERR(0, 1465, __pyx_L1_error)) - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1465, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1463, __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, 1465, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1463, __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":1464 + /* "lxml/etree.pyx":1462 * with older versions of lxml or ElementTree. * """ * if tag is not None: # <<<<<<<<<<<<<< @@ -63747,16 +60174,15 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_72getiterator(struct LxmlElemen */ } - /* "lxml/etree.pyx":1466 + /* "lxml/etree.pyx":1464 * if tag is not None: * tags += (tag,) * return ElementDepthFirstIterator(self, tags) # <<<<<<<<<<<<<< * * def iter(self, tag=None, *tags): */ - __Pyx_TraceLine(1466,0,__PYX_ERR(0, 1466, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1466, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -63764,14 +60190,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, 1466, __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, 1464, __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":1446 + /* "lxml/etree.pyx":1444 * return _elementTreeFactory(self._doc, None) * * def getiterator(self, tag=None, *tags): # <<<<<<<<<<<<<< @@ -63788,12 +60214,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_72getiterator(struct LxmlElemen __pyx_L0:; __Pyx_XDECREF(__pyx_v_tags); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1468 +/* "lxml/etree.pyx":1466 * return ElementDepthFirstIterator(self, tags) * * def iter(self, tag=None, *tags): # <<<<<<<<<<<<<< @@ -63804,7 +60229,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_72getiterator(struct LxmlElemen /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_8_Element_75iter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_8_Element_74iter[] = "iter(self, tag=None, *tags)\n\n Iterate over all elements in the subtree in document order (depth\n first pre-order), starting with this element.\n\n Can be restricted to find only elements with specific tags:\n pass ``\"{ns}localname\"`` as tag. Either or both of ``ns`` and\n ``localname`` can be ``*`` for a wildcard; ``ns`` can be empty\n for no namespace. ``\"localname\"`` is equivalent to ``\"{}localname\"``\n (i.e. no namespace) but ``\"*\"`` is ``\"{*}*\"`` (any or no namespace),\n not ``\"{}*\"``.\n\n You can also pass the Element, Comment, ProcessingInstruction and\n Entity factory functions to look only for the specific element type.\n\n Passing multiple tags (or a sequence of tags) instead of a single tag\n will let the iterator return all elements matching any of these tags,\n in document order.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_75iter = {"iter", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_75iter, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_74iter}; +static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_75iter = {"iter", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_75iter, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_74iter}; static PyObject *__pyx_pw_4lxml_5etree_8_Element_75iter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tag = 0; PyObject *__pyx_v_tags = 0; @@ -63844,7 +60269,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, 1468, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "iter") < 0)) __PYX_ERR(0, 1466, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -63873,49 +60298,44 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_75iter(PyObject *__pyx_v_self, static PyObject *__pyx_pf_4lxml_5etree_8_Element_74iter(struct LxmlElement *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_tags) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__95) __Pyx_RefNannySetupContext("iter", 0); - __Pyx_TraceCall("iter", __pyx_f[0], 1468, 0, __PYX_ERR(0, 1468, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_tags); - /* "lxml/etree.pyx":1488 + /* "lxml/etree.pyx":1486 * in document order. * """ * if tag is not None: # <<<<<<<<<<<<<< * tags += (tag,) * return ElementDepthFirstIterator(self, tags) */ - __Pyx_TraceLine(1488,0,__PYX_ERR(0, 1488, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_tag != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1489 + /* "lxml/etree.pyx":1487 * """ * if tag is not None: * tags += (tag,) # <<<<<<<<<<<<<< * return ElementDepthFirstIterator(self, tags) * */ - __Pyx_TraceLine(1489,0,__PYX_ERR(0, 1489, __pyx_L1_error)) - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1489, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1487, __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, 1489, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1487, __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":1488 + /* "lxml/etree.pyx":1486 * in document order. * """ * if tag is not None: # <<<<<<<<<<<<<< @@ -63924,16 +60344,15 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_74iter(struct LxmlElement *__py */ } - /* "lxml/etree.pyx":1490 + /* "lxml/etree.pyx":1488 * if tag is not None: * tags += (tag,) * return ElementDepthFirstIterator(self, tags) # <<<<<<<<<<<<<< * * def itertext(self, tag=None, *tags, with_tail=True): */ - __Pyx_TraceLine(1490,0,__PYX_ERR(0, 1490, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1490, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -63941,14 +60360,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, 1490, __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, 1488, __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":1468 + /* "lxml/etree.pyx":1466 * return ElementDepthFirstIterator(self, tags) * * def iter(self, tag=None, *tags): # <<<<<<<<<<<<<< @@ -63965,12 +60384,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_74iter(struct LxmlElement *__py __pyx_L0:; __Pyx_XDECREF(__pyx_v_tags); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1492 +/* "lxml/etree.pyx":1490 * return ElementDepthFirstIterator(self, tags) * * def itertext(self, tag=None, *tags, with_tail=True): # <<<<<<<<<<<<<< @@ -63981,7 +60399,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_74iter(struct LxmlElement *__py /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_8_Element_77itertext(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_8_Element_76itertext[] = "itertext(self, tag=None, *tags, with_tail=True)\n\n Iterates over the text content of a subtree.\n\n You can pass tag names to restrict text content to specific elements,\n see `iter`.\n\n You can set the ``with_tail`` keyword argument to ``False`` to skip\n over tail text.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_77itertext = {"itertext", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_77itertext, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_76itertext}; +static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_77itertext = {"itertext", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_77itertext, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_76itertext}; static PyObject *__pyx_pw_4lxml_5etree_8_Element_77itertext(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tag = 0; PyObject *__pyx_v_with_tail = 0; @@ -64028,7 +60446,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, 1492, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "itertext") < 0)) __PYX_ERR(0, 1490, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -64058,50 +60476,45 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_77itertext(PyObject *__pyx_v_se static PyObject *__pyx_pf_4lxml_5etree_8_Element_76itertext(struct LxmlElement *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_with_tail, PyObject *__pyx_v_tags) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__96) __Pyx_RefNannySetupContext("itertext", 0); - __Pyx_TraceCall("itertext", __pyx_f[0], 1492, 0, __PYX_ERR(0, 1492, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_tags); - /* "lxml/etree.pyx":1503 + /* "lxml/etree.pyx":1501 * over tail text. * """ * if tag is not None: # <<<<<<<<<<<<<< * tags += (tag,) * return ElementTextIterator(self, tags, with_tail=with_tail) */ - __Pyx_TraceLine(1503,0,__PYX_ERR(0, 1503, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_tag != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1504 + /* "lxml/etree.pyx":1502 * """ * if tag is not None: * tags += (tag,) # <<<<<<<<<<<<<< * return ElementTextIterator(self, tags, with_tail=with_tail) * */ - __Pyx_TraceLine(1504,0,__PYX_ERR(0, 1504, __pyx_L1_error)) - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1504, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1502, __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, 1504, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1502, __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":1503 + /* "lxml/etree.pyx":1501 * over tail text. * """ * if tag is not None: # <<<<<<<<<<<<<< @@ -64110,16 +60523,15 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_76itertext(struct LxmlElement * */ } - /* "lxml/etree.pyx":1505 + /* "lxml/etree.pyx":1503 * if tag is not None: * tags += (tag,) * return ElementTextIterator(self, tags, with_tail=with_tail) # <<<<<<<<<<<<<< * * def makeelement(self, _tag, attrib=None, nsmap=None, **_extra): */ - __Pyx_TraceLine(1505,0,__PYX_ERR(0, 1505, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1505, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -64127,10 +60539,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, 1505, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1503, __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, 1505, __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, 1505, __pyx_L1_error) + 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) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -64138,7 +60550,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_76itertext(struct LxmlElement * __pyx_t_5 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1492 + /* "lxml/etree.pyx":1490 * return ElementDepthFirstIterator(self, tags) * * def itertext(self, tag=None, *tags, with_tail=True): # <<<<<<<<<<<<<< @@ -64156,12 +60568,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_76itertext(struct LxmlElement * __pyx_L0:; __Pyx_XDECREF(__pyx_v_tags); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1507 +/* "lxml/etree.pyx":1505 * return ElementTextIterator(self, tags, with_tail=with_tail) * * def makeelement(self, _tag, attrib=None, nsmap=None, **_extra): # <<<<<<<<<<<<<< @@ -64172,7 +60583,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_76itertext(struct LxmlElement * /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_8_Element_79makeelement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_8_Element_78makeelement[] = "makeelement(self, _tag, attrib=None, nsmap=None, **_extra)\n\n Creates a new element associated with the same document.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_79makeelement = {"makeelement", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_79makeelement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_78makeelement}; +static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_79makeelement = {"makeelement", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_79makeelement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_78makeelement}; static PyObject *__pyx_pw_4lxml_5etree_8_Element_79makeelement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v__tag = 0; PyObject *__pyx_v_attrib = 0; @@ -64220,7 +60631,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, 1507, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__extra, values, pos_args, "makeelement") < 0)) __PYX_ERR(0, 1505, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -64239,7 +60650,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, 1507, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("makeelement", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1505, __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); @@ -64256,56 +60667,50 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_79makeelement(PyObject *__pyx_v static PyObject *__pyx_pf_4lxml_5etree_8_Element_78makeelement(struct LxmlElement *__pyx_v_self, PyObject *__pyx_v__tag, PyObject *__pyx_v_attrib, PyObject *__pyx_v_nsmap, PyObject *__pyx_v__extra) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__97) __Pyx_RefNannySetupContext("makeelement", 0); - __Pyx_TraceCall("makeelement", __pyx_f[0], 1507, 0, __PYX_ERR(0, 1507, __pyx_L1_error)); - /* "lxml/etree.pyx":1512 + /* "lxml/etree.pyx":1510 * Creates a new element associated with the same document. * """ * _assertValidDoc(self._doc) # <<<<<<<<<<<<<< * return _makeElement(_tag, NULL, self._doc, None, None, None, * attrib, nsmap, _extra) */ - __Pyx_TraceLine(1512,0,__PYX_ERR(0, 1512, __pyx_L1_error)) __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, 1512, __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, 1510, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":1513 + /* "lxml/etree.pyx":1511 * """ * _assertValidDoc(self._doc) * return _makeElement(_tag, NULL, self._doc, None, None, None, # <<<<<<<<<<<<<< * attrib, nsmap, _extra) * */ - __Pyx_TraceLine(1513,0,__PYX_ERR(0, 1513, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_v_self->_doc); __Pyx_INCREF(__pyx_t_1); - /* "lxml/etree.pyx":1514 + /* "lxml/etree.pyx":1512 * _assertValidDoc(self._doc) * return _makeElement(_tag, NULL, self._doc, None, None, None, * attrib, nsmap, _extra) # <<<<<<<<<<<<<< * * def find(self, path, namespaces=None): */ - __Pyx_TraceLine(1514,0,__PYX_ERR(0, 1514, __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, 1513, __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, 1511, __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":1507 + /* "lxml/etree.pyx":1505 * return ElementTextIterator(self, tags, with_tail=with_tail) * * def makeelement(self, _tag, attrib=None, nsmap=None, **_extra): # <<<<<<<<<<<<<< @@ -64321,12 +60726,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_78makeelement(struct LxmlElemen __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1516 +/* "lxml/etree.pyx":1514 * attrib, nsmap, _extra) * * def find(self, path, namespaces=None): # <<<<<<<<<<<<<< @@ -64337,7 +60741,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_78makeelement(struct LxmlElemen /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_8_Element_81find(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_8_Element_80find[] = "find(self, path, namespaces=None)\n\n Finds the first matching subelement, by tag name or path.\n\n The optional ``namespaces`` argument accepts a\n prefix-to-namespace mapping that allows the usage of XPath\n prefixes in the path expression.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_81find = {"find", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_81find, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_80find}; +static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_81find = {"find", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_81find, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_80find}; static PyObject *__pyx_pw_4lxml_5etree_8_Element_81find(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_path = 0; PyObject *__pyx_v_namespaces = 0; @@ -64372,7 +60776,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, 1516, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "find") < 0)) __PYX_ERR(0, 1514, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -64388,7 +60792,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, 1516, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("find", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1514, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._Element.find", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -64403,7 +60807,6 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_81find(PyObject *__pyx_v_self, static PyObject *__pyx_pf_4lxml_5etree_8_Element_80find(struct LxmlElement *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_namespaces) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -64412,37 +60815,33 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_80find(struct LxmlElement *__py PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__98) __Pyx_RefNannySetupContext("find", 0); - __Pyx_TraceCall("find", __pyx_f[0], 1516, 0, __PYX_ERR(0, 1516, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_path); - /* "lxml/etree.pyx":1525 + /* "lxml/etree.pyx":1523 * prefixes in the path expression. * """ * if isinstance(path, QName): # <<<<<<<<<<<<<< * path = (path).text * return _elementpath.find(self, path, namespaces) */ - __Pyx_TraceLine(1525,0,__PYX_ERR(0, 1525, __pyx_L1_error)) __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_path, __pyx_ptype_4lxml_5etree_QName); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1526 + /* "lxml/etree.pyx":1524 * """ * if isinstance(path, QName): * path = (path).text # <<<<<<<<<<<<<< * return _elementpath.find(self, path, namespaces) * */ - __Pyx_TraceLine(1526,0,__PYX_ERR(0, 1526, __pyx_L1_error)) __pyx_t_3 = ((struct __pyx_obj_4lxml_5etree_QName *)__pyx_v_path)->text; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":1525 + /* "lxml/etree.pyx":1523 * prefixes in the path expression. * """ * if isinstance(path, QName): # <<<<<<<<<<<<<< @@ -64451,16 +60850,15 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_80find(struct LxmlElement *__py */ } - /* "lxml/etree.pyx":1527 + /* "lxml/etree.pyx":1525 * if isinstance(path, QName): * path = (path).text * return _elementpath.find(self, path, namespaces) # <<<<<<<<<<<<<< * * def findtext(self, path, default=None, namespaces=None): */ - __Pyx_TraceLine(1527,0,__PYX_ERR(0, 1527, __pyx_L1_error)) __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, 1527, __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, 1525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -64477,7 +60875,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, 1527, __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, 1525, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -64485,13 +60883,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, 1527, __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, 1525, __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, 1527, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1525, __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; @@ -64505,7 +60903,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, 1527, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -64514,7 +60912,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_80find(struct LxmlElement *__py __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1516 + /* "lxml/etree.pyx":1514 * attrib, nsmap, _extra) * * def find(self, path, namespaces=None): # <<<<<<<<<<<<<< @@ -64533,12 +60931,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_80find(struct LxmlElement *__py __pyx_L0:; __Pyx_XDECREF(__pyx_v_path); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1529 +/* "lxml/etree.pyx":1527 * return _elementpath.find(self, path, namespaces) * * def findtext(self, path, default=None, namespaces=None): # <<<<<<<<<<<<<< @@ -64549,7 +60946,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_80find(struct LxmlElement *__py /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_8_Element_83findtext(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_8_Element_82findtext[] = "findtext(self, path, default=None, namespaces=None)\n\n Finds text for the first matching subelement, by tag name or path.\n\n The optional ``namespaces`` argument accepts a\n prefix-to-namespace mapping that allows the usage of XPath\n prefixes in the path expression.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_83findtext = {"findtext", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_83findtext, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_82findtext}; +static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_83findtext = {"findtext", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_83findtext, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_82findtext}; static PyObject *__pyx_pw_4lxml_5etree_8_Element_83findtext(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_path = 0; PyObject *__pyx_v_default = 0; @@ -64594,7 +60991,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, 1529, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "findtext") < 0)) __PYX_ERR(0, 1527, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -64613,7 +61010,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, 1529, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("findtext", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1527, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._Element.findtext", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -64628,7 +61025,6 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_83findtext(PyObject *__pyx_v_se static PyObject *__pyx_pf_4lxml_5etree_8_Element_82findtext(struct LxmlElement *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_default, PyObject *__pyx_v_namespaces) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -64637,37 +61033,33 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_82findtext(struct LxmlElement * PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__99) __Pyx_RefNannySetupContext("findtext", 0); - __Pyx_TraceCall("findtext", __pyx_f[0], 1529, 0, __PYX_ERR(0, 1529, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_path); - /* "lxml/etree.pyx":1538 + /* "lxml/etree.pyx":1536 * prefixes in the path expression. * """ * if isinstance(path, QName): # <<<<<<<<<<<<<< * path = (path).text * return _elementpath.findtext(self, path, default, namespaces) */ - __Pyx_TraceLine(1538,0,__PYX_ERR(0, 1538, __pyx_L1_error)) __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_path, __pyx_ptype_4lxml_5etree_QName); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1539 + /* "lxml/etree.pyx":1537 * """ * if isinstance(path, QName): * path = (path).text # <<<<<<<<<<<<<< * return _elementpath.findtext(self, path, default, namespaces) * */ - __Pyx_TraceLine(1539,0,__PYX_ERR(0, 1539, __pyx_L1_error)) __pyx_t_3 = ((struct __pyx_obj_4lxml_5etree_QName *)__pyx_v_path)->text; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":1538 + /* "lxml/etree.pyx":1536 * prefixes in the path expression. * """ * if isinstance(path, QName): # <<<<<<<<<<<<<< @@ -64676,16 +61068,15 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_82findtext(struct LxmlElement * */ } - /* "lxml/etree.pyx":1540 + /* "lxml/etree.pyx":1538 * if isinstance(path, QName): * path = (path).text * return _elementpath.findtext(self, path, default, namespaces) # <<<<<<<<<<<<<< * * def findall(self, path, namespaces=None): */ - __Pyx_TraceLine(1540,0,__PYX_ERR(0, 1540, __pyx_L1_error)) __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, 1540, __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, 1538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -64702,7 +61093,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, 1540, __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, 1538, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -64710,13 +61101,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, 1540, __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, 1538, __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, 1540, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1538, __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; @@ -64733,7 +61124,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, 1540, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -64742,7 +61133,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_82findtext(struct LxmlElement * __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1529 + /* "lxml/etree.pyx":1527 * return _elementpath.find(self, path, namespaces) * * def findtext(self, path, default=None, namespaces=None): # <<<<<<<<<<<<<< @@ -64761,12 +61152,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_82findtext(struct LxmlElement * __pyx_L0:; __Pyx_XDECREF(__pyx_v_path); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1542 +/* "lxml/etree.pyx":1540 * return _elementpath.findtext(self, path, default, namespaces) * * def findall(self, path, namespaces=None): # <<<<<<<<<<<<<< @@ -64777,7 +61167,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_82findtext(struct LxmlElement * /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_8_Element_85findall(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_8_Element_84findall[] = "findall(self, path, namespaces=None)\n\n Finds all matching subelements, by tag name or path.\n\n The optional ``namespaces`` argument accepts a\n prefix-to-namespace mapping that allows the usage of XPath\n prefixes in the path expression.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_85findall = {"findall", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_85findall, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_84findall}; +static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_85findall = {"findall", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_85findall, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_84findall}; static PyObject *__pyx_pw_4lxml_5etree_8_Element_85findall(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_path = 0; PyObject *__pyx_v_namespaces = 0; @@ -64812,7 +61202,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, 1542, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "findall") < 0)) __PYX_ERR(0, 1540, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -64828,7 +61218,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, 1542, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("findall", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1540, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._Element.findall", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -64843,7 +61233,6 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_85findall(PyObject *__pyx_v_sel static PyObject *__pyx_pf_4lxml_5etree_8_Element_84findall(struct LxmlElement *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_namespaces) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -64852,37 +61241,33 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_84findall(struct LxmlElement *_ PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__100) __Pyx_RefNannySetupContext("findall", 0); - __Pyx_TraceCall("findall", __pyx_f[0], 1542, 0, __PYX_ERR(0, 1542, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_path); - /* "lxml/etree.pyx":1551 + /* "lxml/etree.pyx":1549 * prefixes in the path expression. * """ * if isinstance(path, QName): # <<<<<<<<<<<<<< * path = (path).text * return _elementpath.findall(self, path, namespaces) */ - __Pyx_TraceLine(1551,0,__PYX_ERR(0, 1551, __pyx_L1_error)) __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_path, __pyx_ptype_4lxml_5etree_QName); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1552 + /* "lxml/etree.pyx":1550 * """ * if isinstance(path, QName): * path = (path).text # <<<<<<<<<<<<<< * return _elementpath.findall(self, path, namespaces) * */ - __Pyx_TraceLine(1552,0,__PYX_ERR(0, 1552, __pyx_L1_error)) __pyx_t_3 = ((struct __pyx_obj_4lxml_5etree_QName *)__pyx_v_path)->text; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":1551 + /* "lxml/etree.pyx":1549 * prefixes in the path expression. * """ * if isinstance(path, QName): # <<<<<<<<<<<<<< @@ -64891,16 +61276,15 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_84findall(struct LxmlElement *_ */ } - /* "lxml/etree.pyx":1553 + /* "lxml/etree.pyx":1551 * if isinstance(path, QName): * path = (path).text * return _elementpath.findall(self, path, namespaces) # <<<<<<<<<<<<<< * * def iterfind(self, path, namespaces=None): */ - __Pyx_TraceLine(1553,0,__PYX_ERR(0, 1553, __pyx_L1_error)) __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, 1553, __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, 1551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -64917,7 +61301,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, 1553, __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, 1551, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -64925,13 +61309,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, 1553, __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, 1551, __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, 1553, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1551, __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; @@ -64945,7 +61329,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, 1553, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -64954,7 +61338,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_84findall(struct LxmlElement *_ __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1542 + /* "lxml/etree.pyx":1540 * return _elementpath.findtext(self, path, default, namespaces) * * def findall(self, path, namespaces=None): # <<<<<<<<<<<<<< @@ -64973,12 +61357,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_84findall(struct LxmlElement *_ __pyx_L0:; __Pyx_XDECREF(__pyx_v_path); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1555 +/* "lxml/etree.pyx":1553 * return _elementpath.findall(self, path, namespaces) * * def iterfind(self, path, namespaces=None): # <<<<<<<<<<<<<< @@ -64989,7 +61372,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_84findall(struct LxmlElement *_ /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_8_Element_87iterfind(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_8_Element_86iterfind[] = "iterfind(self, path, namespaces=None)\n\n Iterates over all matching subelements, by tag name or path.\n\n The optional ``namespaces`` argument accepts a\n prefix-to-namespace mapping that allows the usage of XPath\n prefixes in the path expression.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_87iterfind = {"iterfind", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_87iterfind, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_86iterfind}; +static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_87iterfind = {"iterfind", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_87iterfind, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_86iterfind}; static PyObject *__pyx_pw_4lxml_5etree_8_Element_87iterfind(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_path = 0; PyObject *__pyx_v_namespaces = 0; @@ -65024,7 +61407,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, 1555, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "iterfind") < 0)) __PYX_ERR(0, 1553, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -65040,7 +61423,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, 1555, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("iterfind", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1553, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._Element.iterfind", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -65055,7 +61438,6 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_87iterfind(PyObject *__pyx_v_se static PyObject *__pyx_pf_4lxml_5etree_8_Element_86iterfind(struct LxmlElement *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_namespaces) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -65064,37 +61446,33 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_86iterfind(struct LxmlElement * PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__101) __Pyx_RefNannySetupContext("iterfind", 0); - __Pyx_TraceCall("iterfind", __pyx_f[0], 1555, 0, __PYX_ERR(0, 1555, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_path); - /* "lxml/etree.pyx":1564 + /* "lxml/etree.pyx":1562 * prefixes in the path expression. * """ * if isinstance(path, QName): # <<<<<<<<<<<<<< * path = (path).text * return _elementpath.iterfind(self, path, namespaces) */ - __Pyx_TraceLine(1564,0,__PYX_ERR(0, 1564, __pyx_L1_error)) __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_path, __pyx_ptype_4lxml_5etree_QName); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1565 + /* "lxml/etree.pyx":1563 * """ * if isinstance(path, QName): * path = (path).text # <<<<<<<<<<<<<< * return _elementpath.iterfind(self, path, namespaces) * */ - __Pyx_TraceLine(1565,0,__PYX_ERR(0, 1565, __pyx_L1_error)) __pyx_t_3 = ((struct __pyx_obj_4lxml_5etree_QName *)__pyx_v_path)->text; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":1564 + /* "lxml/etree.pyx":1562 * prefixes in the path expression. * """ * if isinstance(path, QName): # <<<<<<<<<<<<<< @@ -65103,16 +61481,15 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_86iterfind(struct LxmlElement * */ } - /* "lxml/etree.pyx":1566 + /* "lxml/etree.pyx":1564 * if isinstance(path, QName): * path = (path).text * return _elementpath.iterfind(self, path, namespaces) # <<<<<<<<<<<<<< * * def xpath(self, _path, *, namespaces=None, extensions=None, */ - __Pyx_TraceLine(1566,0,__PYX_ERR(0, 1566, __pyx_L1_error)) __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, 1566, __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, 1564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -65129,7 +61506,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, 1566, __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, 1564, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -65137,13 +61514,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, 1566, __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, 1564, __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, 1566, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1564, __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; @@ -65157,7 +61534,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, 1566, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -65166,7 +61543,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_86iterfind(struct LxmlElement * __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1555 + /* "lxml/etree.pyx":1553 * return _elementpath.findall(self, path, namespaces) * * def iterfind(self, path, namespaces=None): # <<<<<<<<<<<<<< @@ -65185,12 +61562,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_86iterfind(struct LxmlElement * __pyx_L0:; __Pyx_XDECREF(__pyx_v_path); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1568 +/* "lxml/etree.pyx":1566 * return _elementpath.iterfind(self, path, namespaces) * * def xpath(self, _path, *, namespaces=None, extensions=None, # <<<<<<<<<<<<<< @@ -65201,7 +61577,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_86iterfind(struct LxmlElement * /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_8_Element_89xpath(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_8_Element_88xpath[] = "xpath(self, _path, namespaces=None, extensions=None, smart_strings=True, **_variables)\n\n Evaluate an xpath expression using the element as context node.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_89xpath = {"xpath", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_89xpath, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_88xpath}; +static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_89xpath = {"xpath", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_89xpath, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_88xpath}; static PyObject *__pyx_pw_4lxml_5etree_8_Element_89xpath(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v__path = 0; PyObject *__pyx_v_namespaces = 0; @@ -65219,7 +61595,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":1569 + /* "lxml/etree.pyx":1567 * * def xpath(self, _path, *, namespaces=None, extensions=None, * smart_strings=True, **_variables): # <<<<<<<<<<<<<< @@ -65250,7 +61626,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, 1568, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__variables, values, pos_args, "xpath") < 0)) __PYX_ERR(0, 1566, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -65264,7 +61640,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, 1568, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("xpath", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1566, __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); @@ -65273,7 +61649,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":1568 + /* "lxml/etree.pyx":1566 * return _elementpath.iterfind(self, path, namespaces) * * def xpath(self, _path, *, namespaces=None, extensions=None, # <<<<<<<<<<<<<< @@ -65290,89 +61666,81 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_89xpath(PyObject *__pyx_v_self, static PyObject *__pyx_pf_4lxml_5etree_8_Element_88xpath(struct LxmlElement *__pyx_v_self, PyObject *__pyx_v__path, PyObject *__pyx_v_namespaces, PyObject *__pyx_v_extensions, PyObject *__pyx_v_smart_strings, PyObject *__pyx_v__variables) { struct __pyx_obj_4lxml_5etree_XPathElementEvaluator *__pyx_v_evaluator = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__102) __Pyx_RefNannySetupContext("xpath", 0); - __Pyx_TraceCall("xpath", __pyx_f[0], 1568, 0, __PYX_ERR(0, 1568, __pyx_L1_error)); - /* "lxml/etree.pyx":1574 + /* "lxml/etree.pyx":1572 * Evaluate an xpath expression using the element as context node. * """ * evaluator = XPathElementEvaluator(self, namespaces=namespaces, # <<<<<<<<<<<<<< * extensions=extensions, * smart_strings=smart_strings) */ - __Pyx_TraceLine(1574,0,__PYX_ERR(0, 1574, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1574, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1572, __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, 1574, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1572, __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, 1574, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_namespaces, __pyx_v_namespaces) < 0) __PYX_ERR(0, 1572, __pyx_L1_error) - /* "lxml/etree.pyx":1575 + /* "lxml/etree.pyx":1573 * """ * evaluator = XPathElementEvaluator(self, namespaces=namespaces, * extensions=extensions, # <<<<<<<<<<<<<< * smart_strings=smart_strings) * return evaluator(_path, **_variables) */ - __Pyx_TraceLine(1575,0,__PYX_ERR(0, 1575, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_extensions, __pyx_v_extensions) < 0) __PYX_ERR(0, 1574, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_extensions, __pyx_v_extensions) < 0) __PYX_ERR(0, 1572, __pyx_L1_error) - /* "lxml/etree.pyx":1576 + /* "lxml/etree.pyx":1574 * evaluator = XPathElementEvaluator(self, namespaces=namespaces, * extensions=extensions, * smart_strings=smart_strings) # <<<<<<<<<<<<<< * return evaluator(_path, **_variables) * */ - __Pyx_TraceLine(1576,0,__PYX_ERR(0, 1576, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_smart_strings, __pyx_v_smart_strings) < 0) __PYX_ERR(0, 1574, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_smart_strings, __pyx_v_smart_strings) < 0) __PYX_ERR(0, 1572, __pyx_L1_error) - /* "lxml/etree.pyx":1574 + /* "lxml/etree.pyx":1572 * Evaluate an xpath expression using the element as context node. * """ * evaluator = XPathElementEvaluator(self, namespaces=namespaces, # <<<<<<<<<<<<<< * extensions=extensions, * smart_strings=smart_strings) */ - __Pyx_TraceLine(1574,0,__PYX_ERR(0, 1574, __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, 1574, __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, 1572, __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":1577 + /* "lxml/etree.pyx":1575 * extensions=extensions, * smart_strings=smart_strings) * return evaluator(_path, **_variables) # <<<<<<<<<<<<<< * * def cssselect(self, expr, *, translator='xml'): */ - __Pyx_TraceLine(1577,0,__PYX_ERR(0, 1577, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1577, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1575, __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, 1577, __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, 1575, __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":1568 + /* "lxml/etree.pyx":1566 * return _elementpath.iterfind(self, path, namespaces) * * def xpath(self, _path, *, namespaces=None, extensions=None, # <<<<<<<<<<<<<< @@ -65390,12 +61758,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_88xpath(struct LxmlElement *__p __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_evaluator); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1579 +/* "lxml/etree.pyx":1577 * return evaluator(_path, **_variables) * * def cssselect(self, expr, *, translator='xml'): # <<<<<<<<<<<<<< @@ -65406,7 +61773,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_88xpath(struct LxmlElement *__p /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_8_Element_91cssselect(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_8_Element_90cssselect[] = "\n Run the CSS expression on this element and its children,\n returning a list of the results.\n\n Equivalent to lxml.cssselect.CSSSelect(expr)(self) -- note\n that pre-compiling the expression can provide a substantial\n speedup.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_91cssselect = {"cssselect", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_91cssselect, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_90cssselect}; +static PyMethodDef __pyx_mdef_4lxml_5etree_8_Element_91cssselect = {"cssselect", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_91cssselect, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_90cssselect}; static PyObject *__pyx_pw_4lxml_5etree_8_Element_91cssselect(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_expr = 0; PyObject *__pyx_v_translator = 0; @@ -65438,7 +61805,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, 1579, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cssselect") < 0)) __PYX_ERR(0, 1577, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -65450,7 +61817,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, 1579, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("cssselect", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1577, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._Element.cssselect", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -65466,57 +61833,52 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_91cssselect(PyObject *__pyx_v_s static PyObject *__pyx_pf_4lxml_5etree_8_Element_90cssselect(struct LxmlElement *__pyx_v_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_translator) { PyObject *__pyx_v_CSSSelector = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__103) __Pyx_RefNannySetupContext("cssselect", 0); - __Pyx_TraceCall("cssselect", __pyx_f[0], 1579, 0, __PYX_ERR(0, 1579, __pyx_L1_error)); - /* "lxml/etree.pyx":1589 + /* "lxml/etree.pyx":1587 * """ * # Do the import here to make the dependency optional. * from lxml.cssselect import CSSSelector # <<<<<<<<<<<<<< * return CSSSelector(expr, translator=translator)(self) * */ - __Pyx_TraceLine(1589,0,__PYX_ERR(0, 1589, __pyx_L1_error)) - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1589, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1587, __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, 1589, __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, 1587, __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, 1589, __pyx_L1_error) + __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_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":1590 + /* "lxml/etree.pyx":1588 * # Do the import here to make the dependency optional. * from lxml.cssselect import CSSSelector * return CSSSelector(expr, translator=translator)(self) # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(1590,0,__PYX_ERR(0, 1590, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1590, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1588, __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, 1590, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1588, __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, 1590, __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, 1590, __pyx_L1_error) + 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) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -65530,44 +61892,16 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_90cssselect(struct LxmlElement __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_3) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1590, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1590, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1590, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1590, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_self)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_1, 0+1, ((PyObject *)__pyx_v_self)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1590, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - } + __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) + __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":1579 + /* "lxml/etree.pyx":1577 * return evaluator(_path, **_variables) * * def cssselect(self, expr, *, translator='xml'): # <<<<<<<<<<<<<< @@ -65586,12 +61920,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_90cssselect(struct LxmlElement __pyx_L0:; __Pyx_XDECREF(__pyx_v_CSSSelector); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1599 +/* "lxml/etree.pyx":1597 * * @cython.linetrace(False) * cdef _Element _elementFactory(_Document doc, xmlNode* c_node): # <<<<<<<<<<<<<< @@ -65612,19 +61945,19 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("_elementFactory", 0); - /* "lxml/etree.pyx":1601 + /* "lxml/etree.pyx":1599 * 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, 1601, __pyx_L1_error) + __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_GOTREF(__pyx_t_1); __pyx_v_result = ((struct LxmlElement *)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":1602 + /* "lxml/etree.pyx":1600 * cdef _Element result * result = getProxy(c_node) * if result is not None: # <<<<<<<<<<<<<< @@ -65635,7 +61968,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":1603 + /* "lxml/etree.pyx":1601 * result = getProxy(c_node) * if result is not None: * return result # <<<<<<<<<<<<<< @@ -65647,7 +61980,7 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "lxml/etree.pyx":1602 + /* "lxml/etree.pyx":1600 * cdef _Element result * result = getProxy(c_node) * if result is not None: # <<<<<<<<<<<<<< @@ -65656,7 +61989,7 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum */ } - /* "lxml/etree.pyx":1604 + /* "lxml/etree.pyx":1602 * if result is not None: * return result * if c_node is NULL: # <<<<<<<<<<<<<< @@ -65666,7 +61999,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":1605 + /* "lxml/etree.pyx":1603 * return result * if c_node is NULL: * return None # <<<<<<<<<<<<<< @@ -65677,7 +62010,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":1604 + /* "lxml/etree.pyx":1602 * if result is not None: * return result * if c_node is NULL: # <<<<<<<<<<<<<< @@ -65686,7 +62019,7 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum */ } - /* "lxml/etree.pyx":1608 + /* "lxml/etree.pyx":1606 * * element_class = LOOKUP_ELEMENT_CLASS( * ELEMENT_CLASS_LOOKUP_STATE, doc, c_node) # <<<<<<<<<<<<<< @@ -65696,20 +62029,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":1607 + /* "lxml/etree.pyx":1605 * 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, 1607, __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, 1605, __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":1609 + /* "lxml/etree.pyx":1607 * element_class = LOOKUP_ELEMENT_CLASS( * ELEMENT_CLASS_LOOKUP_STATE, doc, c_node) * if hasProxy(c_node): # <<<<<<<<<<<<<< @@ -65719,7 +62052,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":1611 + /* "lxml/etree.pyx":1609 * if hasProxy(c_node): * # prevent re-entry race condition - we just called into Python * return getProxy(c_node) # <<<<<<<<<<<<<< @@ -65727,13 +62060,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, 1611, __pyx_L1_error) + __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_GOTREF(__pyx_t_4); __pyx_r = ((struct LxmlElement *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1609 + /* "lxml/etree.pyx":1607 * element_class = LOOKUP_ELEMENT_CLASS( * ELEMENT_CLASS_LOOKUP_STATE, doc, c_node) * if hasProxy(c_node): # <<<<<<<<<<<<<< @@ -65742,20 +62075,20 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum */ } - /* "lxml/etree.pyx":1612 + /* "lxml/etree.pyx":1610 * # 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, 1612, __pyx_L1_error) + __pyx_t_4 = PY_NEW(__pyx_v_element_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1610, __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, 1612, __pyx_L1_error) + 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) __Pyx_DECREF_SET(__pyx_v_result, ((struct LxmlElement *)__pyx_t_4)); __pyx_t_4 = 0; - /* "lxml/etree.pyx":1613 + /* "lxml/etree.pyx":1611 * return getProxy(c_node) * result = NEW_ELEMENT(element_class) * if hasProxy(c_node): # <<<<<<<<<<<<<< @@ -65765,7 +62098,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":1615 + /* "lxml/etree.pyx":1613 * if hasProxy(c_node): * # prevent re-entry race condition - we just called into Python * result._c_node = NULL # <<<<<<<<<<<<<< @@ -65774,7 +62107,7 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum */ __pyx_v_result->_c_node = NULL; - /* "lxml/etree.pyx":1616 + /* "lxml/etree.pyx":1614 * # prevent re-entry race condition - we just called into Python * result._c_node = NULL * return getProxy(c_node) # <<<<<<<<<<<<<< @@ -65782,13 +62115,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, 1616, __pyx_L1_error) + __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_GOTREF(__pyx_t_4); __pyx_r = ((struct LxmlElement *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1613 + /* "lxml/etree.pyx":1611 * return getProxy(c_node) * result = NEW_ELEMENT(element_class) * if hasProxy(c_node): # <<<<<<<<<<<<<< @@ -65797,16 +62130,16 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum */ } - /* "lxml/etree.pyx":1618 + /* "lxml/etree.pyx":1616 * 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, 1618, __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, 1616, __pyx_L1_error) - /* "lxml/etree.pyx":1619 + /* "lxml/etree.pyx":1617 * * _registerProxy(result, doc, c_node) * if element_class is not _Element: # <<<<<<<<<<<<<< @@ -65817,14 +62150,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":1620 + /* "lxml/etree.pyx":1618 * _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, 1620, __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, 1618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -65836,17 +62169,14 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum __Pyx_DECREF_SET(__pyx_t_1, function); } } - if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1620, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1620, __pyx_L1_error) - } + __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) __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":1619 + /* "lxml/etree.pyx":1617 * * _registerProxy(result, doc, c_node) * if element_class is not _Element: # <<<<<<<<<<<<<< @@ -65855,7 +62185,7 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum */ } - /* "lxml/etree.pyx":1621 + /* "lxml/etree.pyx":1619 * if element_class is not _Element: * result._init() * return result # <<<<<<<<<<<<<< @@ -65867,7 +62197,7 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "lxml/etree.pyx":1599 + /* "lxml/etree.pyx":1597 * * @cython.linetrace(False) * cdef _Element _elementFactory(_Document doc, xmlNode* c_node): # <<<<<<<<<<<<<< @@ -65890,7 +62220,7 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum return __pyx_r; } -/* "lxml/etree.pyx":1626 +/* "lxml/etree.pyx":1624 * @cython.internal * cdef class __ContentOnlyElement(_Element): * cdef int _raiseImmutable(self) except -1: # <<<<<<<<<<<<<< @@ -65900,23 +62230,20 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum static int __pyx_f_4lxml_5etree_20__ContentOnlyElement__raiseImmutable(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree___ContentOnlyElement *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_raiseImmutable", 0); - __Pyx_TraceCall("_raiseImmutable", __pyx_f[0], 1626, 0, __PYX_ERR(0, 1626, __pyx_L1_error)); - /* "lxml/etree.pyx":1627 + /* "lxml/etree.pyx":1625 * cdef class __ContentOnlyElement(_Element): * cdef int _raiseImmutable(self) except -1: * raise TypeError, u"this element does not have children or attributes" # <<<<<<<<<<<<<< * * def set(self, key, value): */ - __Pyx_TraceLine(1627,0,__PYX_ERR(0, 1627, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_this_element_does_not_have_child, 0, 0); - __PYX_ERR(0, 1627, __pyx_L1_error) + __PYX_ERR(0, 1625, __pyx_L1_error) - /* "lxml/etree.pyx":1626 + /* "lxml/etree.pyx":1624 * @cython.internal * cdef class __ContentOnlyElement(_Element): * cdef int _raiseImmutable(self) except -1: # <<<<<<<<<<<<<< @@ -65928,12 +62255,11 @@ static int __pyx_f_4lxml_5etree_20__ContentOnlyElement__raiseImmutable(CYTHON_UN __pyx_L1_error:; __Pyx_AddTraceback("lxml.etree.__ContentOnlyElement._raiseImmutable", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1629 +/* "lxml/etree.pyx":1627 * raise TypeError, u"this element does not have children or attributes" * * def set(self, key, value): # <<<<<<<<<<<<<< @@ -65944,7 +62270,7 @@ static int __pyx_f_4lxml_5etree_20__ContentOnlyElement__raiseImmutable(CYTHON_UN /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_20__ContentOnlyElement_1set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_20__ContentOnlyElement_set[] = "set(self, key, value)"; -static PyMethodDef __pyx_mdef_4lxml_5etree_20__ContentOnlyElement_1set = {"set", (PyCFunction)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_1set, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_20__ContentOnlyElement_set}; +static PyMethodDef __pyx_mdef_4lxml_5etree_20__ContentOnlyElement_1set = {"set", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_1set, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_20__ContentOnlyElement_set}; static PyObject *__pyx_pw_4lxml_5etree_20__ContentOnlyElement_1set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_key = 0; CYTHON_UNUSED PyObject *__pyx_v_value = 0; @@ -65974,11 +62300,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, 1629, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); __PYX_ERR(0, 1627, __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, 1629, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) __PYX_ERR(0, 1627, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -65991,7 +62317,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, 1629, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1627, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.__ContentOnlyElement.set", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -66006,24 +62332,20 @@ static PyObject *__pyx_pw_4lxml_5etree_20__ContentOnlyElement_1set(PyObject *__p static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_set(struct __pyx_obj_4lxml_5etree___ContentOnlyElement *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_key, CYTHON_UNUSED PyObject *__pyx_v_value) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; - __Pyx_TraceFrameInit(__pyx_codeobj__104) __Pyx_RefNannySetupContext("set", 0); - __Pyx_TraceCall("set", __pyx_f[0], 1629, 0, __PYX_ERR(0, 1629, __pyx_L1_error)); - /* "lxml/etree.pyx":1631 + /* "lxml/etree.pyx":1629 * def set(self, key, value): * u"set(self, key, value)" * self._raiseImmutable() # <<<<<<<<<<<<<< * * def append(self, value): */ - __Pyx_TraceLine(1631,0,__PYX_ERR(0, 1631, __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, 1631, __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, 1629, __pyx_L1_error) - /* "lxml/etree.pyx":1629 + /* "lxml/etree.pyx":1627 * raise TypeError, u"this element does not have children or attributes" * * def set(self, key, value): # <<<<<<<<<<<<<< @@ -66039,12 +62361,11 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_set(struct __pyx_o __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1633 +/* "lxml/etree.pyx":1631 * self._raiseImmutable() * * def append(self, value): # <<<<<<<<<<<<<< @@ -66069,24 +62390,20 @@ static PyObject *__pyx_pw_4lxml_5etree_20__ContentOnlyElement_3append(PyObject * static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_2append(struct __pyx_obj_4lxml_5etree___ContentOnlyElement *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; - __Pyx_TraceFrameInit(__pyx_codeobj__105) __Pyx_RefNannySetupContext("append", 0); - __Pyx_TraceCall("append", __pyx_f[0], 1633, 0, __PYX_ERR(0, 1633, __pyx_L1_error)); - /* "lxml/etree.pyx":1635 + /* "lxml/etree.pyx":1633 * def append(self, value): * u"append(self, value)" * self._raiseImmutable() # <<<<<<<<<<<<<< * * def insert(self, index, value): */ - __Pyx_TraceLine(1635,0,__PYX_ERR(0, 1635, __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, 1635, __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, 1633, __pyx_L1_error) - /* "lxml/etree.pyx":1633 + /* "lxml/etree.pyx":1631 * self._raiseImmutable() * * def append(self, value): # <<<<<<<<<<<<<< @@ -66102,12 +62419,11 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_2append(struct __p __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1637 +/* "lxml/etree.pyx":1635 * self._raiseImmutable() * * def insert(self, index, value): # <<<<<<<<<<<<<< @@ -66118,7 +62434,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_2append(struct __p /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_20__ContentOnlyElement_5insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_20__ContentOnlyElement_4insert[] = "insert(self, index, value)"; -static PyMethodDef __pyx_mdef_4lxml_5etree_20__ContentOnlyElement_5insert = {"insert", (PyCFunction)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_5insert, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_20__ContentOnlyElement_4insert}; +static PyMethodDef __pyx_mdef_4lxml_5etree_20__ContentOnlyElement_5insert = {"insert", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_5insert, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_20__ContentOnlyElement_4insert}; static PyObject *__pyx_pw_4lxml_5etree_20__ContentOnlyElement_5insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_index = 0; CYTHON_UNUSED PyObject *__pyx_v_value = 0; @@ -66148,11 +62464,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, 1637, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, 1); __PYX_ERR(0, 1635, __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, 1637, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "insert") < 0)) __PYX_ERR(0, 1635, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -66165,7 +62481,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, 1637, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1635, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.__ContentOnlyElement.insert", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -66180,24 +62496,20 @@ static PyObject *__pyx_pw_4lxml_5etree_20__ContentOnlyElement_5insert(PyObject * static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_4insert(struct __pyx_obj_4lxml_5etree___ContentOnlyElement *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_index, CYTHON_UNUSED PyObject *__pyx_v_value) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; - __Pyx_TraceFrameInit(__pyx_codeobj__106) __Pyx_RefNannySetupContext("insert", 0); - __Pyx_TraceCall("insert", __pyx_f[0], 1637, 0, __PYX_ERR(0, 1637, __pyx_L1_error)); - /* "lxml/etree.pyx":1639 + /* "lxml/etree.pyx":1637 * def insert(self, index, value): * u"insert(self, index, value)" * self._raiseImmutable() # <<<<<<<<<<<<<< * * def __setitem__(self, index, value): */ - __Pyx_TraceLine(1639,0,__PYX_ERR(0, 1639, __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, 1639, __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, 1637, __pyx_L1_error) - /* "lxml/etree.pyx":1637 + /* "lxml/etree.pyx":1635 * self._raiseImmutable() * * def insert(self, index, value): # <<<<<<<<<<<<<< @@ -66213,12 +62525,11 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_4insert(struct __p __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1641 +/* "lxml/etree.pyx":1639 * self._raiseImmutable() * * def __setitem__(self, index, value): # <<<<<<<<<<<<<< @@ -66245,23 +62556,20 @@ static int __pyx_pw_4lxml_5etree_20__ContentOnlyElement_7__setitem__(PyObject *_ static int __pyx_pf_4lxml_5etree_20__ContentOnlyElement_6__setitem__(struct __pyx_obj_4lxml_5etree___ContentOnlyElement *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_index, CYTHON_UNUSED PyObject *__pyx_v_value) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__setitem__", 0); - __Pyx_TraceCall("__setitem__", __pyx_f[0], 1641, 0, __PYX_ERR(0, 1641, __pyx_L1_error)); - /* "lxml/etree.pyx":1643 + /* "lxml/etree.pyx":1641 * def __setitem__(self, index, value): * u"__setitem__(self, index, value)" * self._raiseImmutable() # <<<<<<<<<<<<<< * * property attrib: */ - __Pyx_TraceLine(1643,0,__PYX_ERR(0, 1643, __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, 1643, __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, 1641, __pyx_L1_error) - /* "lxml/etree.pyx":1641 + /* "lxml/etree.pyx":1639 * self._raiseImmutable() * * def __setitem__(self, index, value): # <<<<<<<<<<<<<< @@ -66276,12 +62584,11 @@ static int __pyx_pf_4lxml_5etree_20__ContentOnlyElement_6__setitem__(struct __py __Pyx_AddTraceback("lxml.etree.__ContentOnlyElement.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1646 +/* "lxml/etree.pyx":1644 * * property attrib: * def __get__(self): # <<<<<<<<<<<<<< @@ -66304,25 +62611,22 @@ static PyObject *__pyx_pw_4lxml_5etree_20__ContentOnlyElement_6attrib_1__get__(P static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_6attrib___get__(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree___ContentOnlyElement *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 1646, 0, __PYX_ERR(0, 1646, __pyx_L1_error)); - /* "lxml/etree.pyx":1647 + /* "lxml/etree.pyx":1645 * property attrib: * def __get__(self): * return IMMUTABLE_EMPTY_MAPPING # <<<<<<<<<<<<<< * * property text: */ - __Pyx_TraceLine(1647,0,__PYX_ERR(0, 1647, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_4lxml_5etree_IMMUTABLE_EMPTY_MAPPING); __pyx_r = __pyx_v_4lxml_5etree_IMMUTABLE_EMPTY_MAPPING; goto __pyx_L0; - /* "lxml/etree.pyx":1646 + /* "lxml/etree.pyx":1644 * * property attrib: * def __get__(self): # <<<<<<<<<<<<<< @@ -66331,17 +62635,13 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_6attrib___get__(CY */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.__ContentOnlyElement.attrib.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1650 +/* "lxml/etree.pyx":1648 * * property text: * def __get__(self): # <<<<<<<<<<<<<< @@ -66364,39 +62664,35 @@ static PyObject *__pyx_pw_4lxml_5etree_20__ContentOnlyElement_4text_1__get__(PyO static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_4text___get__(struct __pyx_obj_4lxml_5etree___ContentOnlyElement *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 1650, 0, __PYX_ERR(0, 1650, __pyx_L1_error)); - /* "lxml/etree.pyx":1651 + /* "lxml/etree.pyx":1649 * property text: * def __get__(self): * _assertValidNode(self) # <<<<<<<<<<<<<< * return funicodeOrEmpty(self._c_node.content) * */ - __Pyx_TraceLine(1651,0,__PYX_ERR(0, 1651, __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, 1651, __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, 1649, __pyx_L1_error) - /* "lxml/etree.pyx":1652 + /* "lxml/etree.pyx":1650 * def __get__(self): * _assertValidNode(self) * return funicodeOrEmpty(self._c_node.content) # <<<<<<<<<<<<<< * * def __set__(self, value): */ - __Pyx_TraceLine(1652,0,__PYX_ERR(0, 1652, __pyx_L1_error)) __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, 1652, __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, 1650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1650 + /* "lxml/etree.pyx":1648 * * property text: * def __get__(self): # <<<<<<<<<<<<<< @@ -66411,12 +62707,11 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_4text___get__(stru __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1654 +/* "lxml/etree.pyx":1652 * return funicodeOrEmpty(self._c_node.content) * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -66440,49 +62735,44 @@ static int __pyx_pw_4lxml_5etree_20__ContentOnlyElement_4text_3__set__(PyObject static int __pyx_pf_4lxml_5etree_20__ContentOnlyElement_4text_2__set__(struct __pyx_obj_4lxml_5etree___ContentOnlyElement *__pyx_v_self, PyObject *__pyx_v_value) { const xmlChar *__pyx_v_c_text; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[0], 1654, 0, __PYX_ERR(0, 1654, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_value); - /* "lxml/etree.pyx":1656 + /* "lxml/etree.pyx":1654 * def __set__(self, value): * cdef tree.xmlDict* c_dict * _assertValidNode(self) # <<<<<<<<<<<<<< * if value is None: * c_text = NULL */ - __Pyx_TraceLine(1656,0,__PYX_ERR(0, 1656, __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, 1656, __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, 1654, __pyx_L1_error) - /* "lxml/etree.pyx":1657 + /* "lxml/etree.pyx":1655 * cdef tree.xmlDict* c_dict * _assertValidNode(self) * if value is None: # <<<<<<<<<<<<<< * c_text = NULL * else: */ - __Pyx_TraceLine(1657,0,__PYX_ERR(0, 1657, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_value == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":1658 + /* "lxml/etree.pyx":1656 * _assertValidNode(self) * if value is None: * c_text = NULL # <<<<<<<<<<<<<< * else: * value = _utf8(value) */ - __Pyx_TraceLine(1658,0,__PYX_ERR(0, 1658, __pyx_L1_error)) __pyx_v_c_text = ((const xmlChar *)NULL); - /* "lxml/etree.pyx":1657 + /* "lxml/etree.pyx":1655 * cdef tree.xmlDict* c_dict * _assertValidNode(self) * if value is None: # <<<<<<<<<<<<<< @@ -66492,43 +62782,40 @@ static int __pyx_pf_4lxml_5etree_20__ContentOnlyElement_4text_2__set__(struct __ goto __pyx_L3; } - /* "lxml/etree.pyx":1660 + /* "lxml/etree.pyx":1658 * c_text = NULL * else: * value = _utf8(value) # <<<<<<<<<<<<<< * c_text = _xcstr(value) * tree.xmlNodeSetContent(self._c_node, c_text) */ - __Pyx_TraceLine(1660,0,__PYX_ERR(0, 1660, __pyx_L1_error)) /*else*/ { - __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1660, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":1661 + /* "lxml/etree.pyx":1659 * else: * value = _utf8(value) * c_text = _xcstr(value) # <<<<<<<<<<<<<< * tree.xmlNodeSetContent(self._c_node, c_text) * */ - __Pyx_TraceLine(1661,0,__PYX_ERR(0, 1661, __pyx_L1_error)) __pyx_v_c_text = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_value); } __pyx_L3:; - /* "lxml/etree.pyx":1662 + /* "lxml/etree.pyx":1660 * value = _utf8(value) * c_text = _xcstr(value) * tree.xmlNodeSetContent(self._c_node, c_text) # <<<<<<<<<<<<<< * * # ACCESSORS */ - __Pyx_TraceLine(1662,0,__PYX_ERR(0, 1662, __pyx_L1_error)) xmlNodeSetContent(__pyx_v_self->__pyx_base._c_node, __pyx_v_c_text); - /* "lxml/etree.pyx":1654 + /* "lxml/etree.pyx":1652 * return funicodeOrEmpty(self._c_node.content) * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -66545,12 +62832,11 @@ static int __pyx_pf_4lxml_5etree_20__ContentOnlyElement_4text_2__set__(struct __ __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_value); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1665 +/* "lxml/etree.pyx":1663 * * # ACCESSORS * def __getitem__(self, x): # <<<<<<<<<<<<<< @@ -66577,42 +62863,38 @@ static PyObject *__pyx_pw_4lxml_5etree_20__ContentOnlyElement_9__getitem__(PyObj static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_8__getitem__(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree___ContentOnlyElement *__pyx_v_self, PyObject *__pyx_v_x) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__getitem__", 0); - __Pyx_TraceCall("__getitem__", __pyx_f[0], 1665, 0, __PYX_ERR(0, 1665, __pyx_L1_error)); - /* "lxml/etree.pyx":1667 + /* "lxml/etree.pyx":1665 * def __getitem__(self, x): * u"__getitem__(self, x)" * if isinstance(x, slice): # <<<<<<<<<<<<<< * return [] * else: */ - __Pyx_TraceLine(1667,0,__PYX_ERR(0, 1667, __pyx_L1_error)) __pyx_t_1 = PySlice_Check(__pyx_v_x); __pyx_t_2 = (__pyx_t_1 != 0); if (likely(__pyx_t_2)) { - /* "lxml/etree.pyx":1668 + /* "lxml/etree.pyx":1666 * u"__getitem__(self, x)" * if isinstance(x, slice): * return [] # <<<<<<<<<<<<<< * else: * raise IndexError, u"list index out of range" */ - __Pyx_TraceLine(1668,0,__PYX_ERR(0, 1668, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1668, __pyx_L1_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1666, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1667 + /* "lxml/etree.pyx":1665 * def __getitem__(self, x): * u"__getitem__(self, x)" * if isinstance(x, slice): # <<<<<<<<<<<<<< @@ -66621,20 +62903,19 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_8__getitem__(CYTHO */ } - /* "lxml/etree.pyx":1670 + /* "lxml/etree.pyx":1668 * return [] * else: * raise IndexError, u"list index out of range" # <<<<<<<<<<<<<< * * def __len__(self): */ - __Pyx_TraceLine(1670,0,__PYX_ERR(0, 1670, __pyx_L1_error)) /*else*/ { __Pyx_Raise(__pyx_builtin_IndexError, __pyx_kp_u_list_index_out_of_range, 0, 0); - __PYX_ERR(0, 1670, __pyx_L1_error) + __PYX_ERR(0, 1668, __pyx_L1_error) } - /* "lxml/etree.pyx":1665 + /* "lxml/etree.pyx":1663 * * # ACCESSORS * def __getitem__(self, x): # <<<<<<<<<<<<<< @@ -66649,12 +62930,11 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_8__getitem__(CYTHO __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1672 +/* "lxml/etree.pyx":1670 * raise IndexError, u"list index out of range" * * def __len__(self): # <<<<<<<<<<<<<< @@ -66681,23 +62961,20 @@ static Py_ssize_t __pyx_pw_4lxml_5etree_20__ContentOnlyElement_11__len__(PyObjec static Py_ssize_t __pyx_pf_4lxml_5etree_20__ContentOnlyElement_10__len__(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree___ContentOnlyElement *__pyx_v_self) { Py_ssize_t __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - __Pyx_TraceCall("__len__", __pyx_f[0], 1672, 0, __PYX_ERR(0, 1672, __pyx_L1_error)); - /* "lxml/etree.pyx":1674 + /* "lxml/etree.pyx":1672 * def __len__(self): * u"__len__(self)" * return 0 # <<<<<<<<<<<<<< * * def get(self, key, default=None): */ - __Pyx_TraceLine(1674,0,__PYX_ERR(0, 1674, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1672 + /* "lxml/etree.pyx":1670 * raise IndexError, u"list index out of range" * * def __len__(self): # <<<<<<<<<<<<<< @@ -66706,16 +62983,12 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_20__ContentOnlyElement_10__len__(CYTHON_ */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.__ContentOnlyElement.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1676 +/* "lxml/etree.pyx":1674 * return 0 * * def get(self, key, default=None): # <<<<<<<<<<<<<< @@ -66726,7 +62999,7 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_20__ContentOnlyElement_10__len__(CYTHON_ /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_20__ContentOnlyElement_13get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_20__ContentOnlyElement_12get[] = "get(self, key, default=None)"; -static PyMethodDef __pyx_mdef_4lxml_5etree_20__ContentOnlyElement_13get = {"get", (PyCFunction)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_13get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_20__ContentOnlyElement_12get}; +static PyMethodDef __pyx_mdef_4lxml_5etree_20__ContentOnlyElement_13get = {"get", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_13get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_20__ContentOnlyElement_12get}; static PyObject *__pyx_pw_4lxml_5etree_20__ContentOnlyElement_13get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_key = 0; CYTHON_UNUSED PyObject *__pyx_v_default = 0; @@ -66761,7 +63034,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, 1676, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) __PYX_ERR(0, 1674, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -66777,7 +63050,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, 1676, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1674, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.__ContentOnlyElement.get", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -66792,25 +63065,21 @@ static PyObject *__pyx_pw_4lxml_5etree_20__ContentOnlyElement_13get(PyObject *__ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_12get(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree___ContentOnlyElement *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_key, CYTHON_UNUSED PyObject *__pyx_v_default) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - __Pyx_TraceFrameInit(__pyx_codeobj__107) __Pyx_RefNannySetupContext("get", 0); - __Pyx_TraceCall("get", __pyx_f[0], 1676, 0, __PYX_ERR(0, 1676, __pyx_L1_error)); - /* "lxml/etree.pyx":1678 + /* "lxml/etree.pyx":1676 * def get(self, key, default=None): * u"get(self, key, default=None)" * return None # <<<<<<<<<<<<<< * * def keys(self): */ - __Pyx_TraceLine(1678,0,__PYX_ERR(0, 1678, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/etree.pyx":1676 + /* "lxml/etree.pyx":1674 * return 0 * * def get(self, key, default=None): # <<<<<<<<<<<<<< @@ -66819,17 +63088,13 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_12get(CYTHON_UNUSE */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.__ContentOnlyElement.get", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1680 +/* "lxml/etree.pyx":1678 * return None * * def keys(self): # <<<<<<<<<<<<<< @@ -66854,29 +63119,25 @@ static PyObject *__pyx_pw_4lxml_5etree_20__ContentOnlyElement_15keys(PyObject *_ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_14keys(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree___ContentOnlyElement *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__108) __Pyx_RefNannySetupContext("keys", 0); - __Pyx_TraceCall("keys", __pyx_f[0], 1680, 0, __PYX_ERR(0, 1680, __pyx_L1_error)); - /* "lxml/etree.pyx":1682 + /* "lxml/etree.pyx":1680 * def keys(self): * u"keys(self)" * return [] # <<<<<<<<<<<<<< * * def items(self): */ - __Pyx_TraceLine(1682,0,__PYX_ERR(0, 1682, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1682, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1680 + /* "lxml/etree.pyx":1678 * return None * * def keys(self): # <<<<<<<<<<<<<< @@ -66891,12 +63152,11 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_14keys(CYTHON_UNUS __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1684 +/* "lxml/etree.pyx":1682 * return [] * * def items(self): # <<<<<<<<<<<<<< @@ -66921,29 +63181,25 @@ static PyObject *__pyx_pw_4lxml_5etree_20__ContentOnlyElement_17items(PyObject * static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_16items(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree___ContentOnlyElement *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__109) __Pyx_RefNannySetupContext("items", 0); - __Pyx_TraceCall("items", __pyx_f[0], 1684, 0, __PYX_ERR(0, 1684, __pyx_L1_error)); - /* "lxml/etree.pyx":1686 + /* "lxml/etree.pyx":1684 * def items(self): * u"items(self)" * return [] # <<<<<<<<<<<<<< * * def values(self): */ - __Pyx_TraceLine(1686,0,__PYX_ERR(0, 1686, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1686, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1684 + /* "lxml/etree.pyx":1682 * return [] * * def items(self): # <<<<<<<<<<<<<< @@ -66958,12 +63214,11 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_16items(CYTHON_UNU __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1688 +/* "lxml/etree.pyx":1686 * return [] * * def values(self): # <<<<<<<<<<<<<< @@ -66988,29 +63243,25 @@ static PyObject *__pyx_pw_4lxml_5etree_20__ContentOnlyElement_19values(PyObject static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_18values(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree___ContentOnlyElement *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__110) __Pyx_RefNannySetupContext("values", 0); - __Pyx_TraceCall("values", __pyx_f[0], 1688, 0, __PYX_ERR(0, 1688, __pyx_L1_error)); - /* "lxml/etree.pyx":1690 + /* "lxml/etree.pyx":1688 * def values(self): * u"values(self)" * return [] # <<<<<<<<<<<<<< * * cdef class _Comment(__ContentOnlyElement): */ - __Pyx_TraceLine(1690,0,__PYX_ERR(0, 1690, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1690, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1688 + /* "lxml/etree.pyx":1686 * return [] * * def values(self): # <<<<<<<<<<<<<< @@ -67025,12 +63276,11 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_18values(CYTHON_UN __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1694 +/* "lxml/etree.pyx":1692 * cdef class _Comment(__ContentOnlyElement): * property tag: * def __get__(self): # <<<<<<<<<<<<<< @@ -67053,28 +63303,25 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Comment_3tag_1__get__(PyObject *__pyx_v static PyObject *__pyx_pf_4lxml_5etree_8_Comment_3tag___get__(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree__Comment *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 1694, 0, __PYX_ERR(0, 1694, __pyx_L1_error)); - /* "lxml/etree.pyx":1695 + /* "lxml/etree.pyx":1693 * property tag: * def __get__(self): * return Comment # <<<<<<<<<<<<<< * * def __repr__(self): */ - __Pyx_TraceLine(1695,0,__PYX_ERR(0, 1695, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Comment); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1695, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Comment); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1694 + /* "lxml/etree.pyx":1692 * cdef class _Comment(__ContentOnlyElement): * property tag: * def __get__(self): # <<<<<<<<<<<<<< @@ -67089,12 +63336,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Comment_3tag___get__(CYTHON_UNUSED stru __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1697 +/* "lxml/etree.pyx":1695 * return Comment * * def __repr__(self): # <<<<<<<<<<<<<< @@ -67117,35 +63363,32 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Comment_1__repr__(PyObject *__pyx_v_sel static PyObject *__pyx_pf_4lxml_5etree_8_Comment___repr__(struct __pyx_obj_4lxml_5etree__Comment *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[0], 1697, 0, __PYX_ERR(0, 1697, __pyx_L1_error)); - /* "lxml/etree.pyx":1698 + /* "lxml/etree.pyx":1696 * * def __repr__(self): * return "" % strrepr(self.text) # <<<<<<<<<<<<<< * * cdef class _ProcessingInstruction(__ContentOnlyElement): */ - __Pyx_TraceLine(1698,0,__PYX_ERR(0, 1698, __pyx_L1_error)) __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, 1698, __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, 1696, __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, 1698, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_strrepr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1698, __pyx_L1_error) + __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_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":1697 + /* "lxml/etree.pyx":1695 * return Comment * * def __repr__(self): # <<<<<<<<<<<<<< @@ -67161,12 +63404,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Comment___repr__(struct __pyx_obj_4lxml __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1702 +/* "lxml/etree.pyx":1700 * cdef class _ProcessingInstruction(__ContentOnlyElement): * property tag: * def __get__(self): # <<<<<<<<<<<<<< @@ -67189,28 +63431,25 @@ static PyObject *__pyx_pw_4lxml_5etree_22_ProcessingInstruction_3tag_1__get__(Py static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_3tag___get__(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree__ProcessingInstruction *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 1702, 0, __PYX_ERR(0, 1702, __pyx_L1_error)); - /* "lxml/etree.pyx":1703 + /* "lxml/etree.pyx":1701 * property tag: * def __get__(self): * return ProcessingInstruction # <<<<<<<<<<<<<< * * property target: */ - __Pyx_TraceLine(1703,0,__PYX_ERR(0, 1703, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ProcessingInstruction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1703, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ProcessingInstruction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1702 + /* "lxml/etree.pyx":1700 * cdef class _ProcessingInstruction(__ContentOnlyElement): * property tag: * def __get__(self): # <<<<<<<<<<<<<< @@ -67225,12 +63464,11 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_3tag___get__(CYT __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1707 +/* "lxml/etree.pyx":1705 * property target: * # not in ElementTree * def __get__(self): # <<<<<<<<<<<<<< @@ -67253,39 +63491,35 @@ static PyObject *__pyx_pw_4lxml_5etree_22_ProcessingInstruction_6target_1__get__ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_6target___get__(struct __pyx_obj_4lxml_5etree__ProcessingInstruction *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 1707, 0, __PYX_ERR(0, 1707, __pyx_L1_error)); - /* "lxml/etree.pyx":1708 + /* "lxml/etree.pyx":1706 * # not in ElementTree * def __get__(self): * _assertValidNode(self) # <<<<<<<<<<<<<< * return funicode(self._c_node.name) * */ - __Pyx_TraceLine(1708,0,__PYX_ERR(0, 1708, __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, 1708, __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, 1706, __pyx_L1_error) - /* "lxml/etree.pyx":1709 + /* "lxml/etree.pyx":1707 * def __get__(self): * _assertValidNode(self) * return funicode(self._c_node.name) # <<<<<<<<<<<<<< * * def __set__(self, value): */ - __Pyx_TraceLine(1709,0,__PYX_ERR(0, 1709, __pyx_L1_error)) __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, 1709, __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, 1707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1707 + /* "lxml/etree.pyx":1705 * property target: * # not in ElementTree * def __get__(self): # <<<<<<<<<<<<<< @@ -67300,12 +63534,11 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_6target___get__( __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1711 +/* "lxml/etree.pyx":1709 * return funicode(self._c_node.name) * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -67329,58 +63562,52 @@ static int __pyx_pw_4lxml_5etree_22_ProcessingInstruction_6target_3__set__(PyObj static int __pyx_pf_4lxml_5etree_22_ProcessingInstruction_6target_2__set__(struct __pyx_obj_4lxml_5etree__ProcessingInstruction *__pyx_v_self, PyObject *__pyx_v_value) { const xmlChar *__pyx_v_c_text; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[0], 1711, 0, __PYX_ERR(0, 1711, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_value); - /* "lxml/etree.pyx":1712 + /* "lxml/etree.pyx":1710 * * def __set__(self, value): * _assertValidNode(self) # <<<<<<<<<<<<<< * value = _utf8(value) * c_text = _xcstr(value) */ - __Pyx_TraceLine(1712,0,__PYX_ERR(0, 1712, __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, 1712, __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, 1710, __pyx_L1_error) - /* "lxml/etree.pyx":1713 + /* "lxml/etree.pyx":1711 * def __set__(self, value): * _assertValidNode(self) * value = _utf8(value) # <<<<<<<<<<<<<< * c_text = _xcstr(value) * tree.xmlNodeSetName(self._c_node, c_text) */ - __Pyx_TraceLine(1713,0,__PYX_ERR(0, 1713, __pyx_L1_error)) - __pyx_t_2 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1713, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1711, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":1714 + /* "lxml/etree.pyx":1712 * _assertValidNode(self) * value = _utf8(value) * c_text = _xcstr(value) # <<<<<<<<<<<<<< * tree.xmlNodeSetName(self._c_node, c_text) * */ - __Pyx_TraceLine(1714,0,__PYX_ERR(0, 1714, __pyx_L1_error)) __pyx_v_c_text = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_value); - /* "lxml/etree.pyx":1715 + /* "lxml/etree.pyx":1713 * value = _utf8(value) * c_text = _xcstr(value) * tree.xmlNodeSetName(self._c_node, c_text) # <<<<<<<<<<<<<< * * def __repr__(self): */ - __Pyx_TraceLine(1715,0,__PYX_ERR(0, 1715, __pyx_L1_error)) xmlNodeSetName(__pyx_v_self->__pyx_base.__pyx_base._c_node, __pyx_v_c_text); - /* "lxml/etree.pyx":1711 + /* "lxml/etree.pyx":1709 * return funicode(self._c_node.name) * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -67397,12 +63624,11 @@ static int __pyx_pf_4lxml_5etree_22_ProcessingInstruction_6target_2__set__(struc __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_value); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1717 +/* "lxml/etree.pyx":1715 * tree.xmlNodeSetName(self._c_node, c_text) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -67426,74 +63652,67 @@ static PyObject *__pyx_pw_4lxml_5etree_22_ProcessingInstruction_1__repr__(PyObje static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction___repr__(struct __pyx_obj_4lxml_5etree__ProcessingInstruction *__pyx_v_self) { PyObject *__pyx_v_text = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[0], 1717, 0, __PYX_ERR(0, 1717, __pyx_L1_error)); - /* "lxml/etree.pyx":1718 + /* "lxml/etree.pyx":1716 * * def __repr__(self): * text = self.text # <<<<<<<<<<<<<< * if text: * return "" % (strrepr(self.target), */ - __Pyx_TraceLine(1718,0,__PYX_ERR(0, 1718, __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, 1718, __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, 1716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_text = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/etree.pyx":1719 + /* "lxml/etree.pyx":1717 * def __repr__(self): * text = self.text * if text: # <<<<<<<<<<<<<< * return "" % (strrepr(self.target), * strrepr(text)) */ - __Pyx_TraceLine(1719,0,__PYX_ERR(0, 1719, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_text); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1719, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_text); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1717, __pyx_L1_error) if (__pyx_t_2) { - /* "lxml/etree.pyx":1720 + /* "lxml/etree.pyx":1718 * text = self.text * if text: * return "" % (strrepr(self.target), # <<<<<<<<<<<<<< * strrepr(text)) * else: */ - __Pyx_TraceLine(1720,0,__PYX_ERR(0, 1720, __pyx_L1_error)) __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, 1720, __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, 1718, __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, 1720, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_strrepr(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":1721 + /* "lxml/etree.pyx":1719 * if text: * return "" % (strrepr(self.target), * strrepr(text)) # <<<<<<<<<<<<<< * else: * return "" % strrepr(self.target) */ - __Pyx_TraceLine(1721,0,__PYX_ERR(0, 1721, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_strrepr(__pyx_v_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1721, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_strrepr(__pyx_v_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "lxml/etree.pyx":1720 + /* "lxml/etree.pyx":1718 * text = self.text * if text: * return "" % (strrepr(self.target), # <<<<<<<<<<<<<< * strrepr(text)) * else: */ - __Pyx_TraceLine(1720,0,__PYX_ERR(0, 1720, __pyx_L1_error)) - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1720, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); @@ -67501,14 +63720,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, 1720, __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, 1718, __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":1719 + /* "lxml/etree.pyx":1717 * def __repr__(self): * text = self.text * if text: # <<<<<<<<<<<<<< @@ -67517,22 +63736,21 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction___repr__(struct */ } - /* "lxml/etree.pyx":1723 + /* "lxml/etree.pyx":1721 * strrepr(text)) * else: * return "" % strrepr(self.target) # <<<<<<<<<<<<<< * * def get(self, key, default=None): */ - __Pyx_TraceLine(1723,0,__PYX_ERR(0, 1723, __pyx_L1_error)) /*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, 1723, __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, 1721, __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, 1723, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree_strrepr(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1723, __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, 1721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_1; @@ -67540,7 +63758,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction___repr__(struct goto __pyx_L0; } - /* "lxml/etree.pyx":1717 + /* "lxml/etree.pyx":1715 * tree.xmlNodeSetName(self._c_node, c_text) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -67558,12 +63776,11 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction___repr__(struct __pyx_L0:; __Pyx_XDECREF(__pyx_v_text); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1725 +/* "lxml/etree.pyx":1723 * return "" % strrepr(self.target) * * def get(self, key, default=None): # <<<<<<<<<<<<<< @@ -67574,7 +63791,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction___repr__(struct /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_22_ProcessingInstruction_3get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_22_ProcessingInstruction_2get[] = "get(self, key, default=None)\n\n Try to parse pseudo-attributes from the text content of the\n processing instruction, search for one with the given key as\n name and return its associated value.\n\n Note that this is only a convenience method for the most\n common case that all text content is structured in\n attribute-like name-value pairs with properly quoted values.\n It is not guaranteed to work for all possible text content.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_22_ProcessingInstruction_3get = {"get", (PyCFunction)__pyx_pw_4lxml_5etree_22_ProcessingInstruction_3get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_22_ProcessingInstruction_2get}; +static PyMethodDef __pyx_mdef_4lxml_5etree_22_ProcessingInstruction_3get = {"get", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_22_ProcessingInstruction_3get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_22_ProcessingInstruction_2get}; static PyObject *__pyx_pw_4lxml_5etree_22_ProcessingInstruction_3get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_key = 0; PyObject *__pyx_v_default = 0; @@ -67609,7 +63826,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, 1725, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) __PYX_ERR(0, 1723, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -67625,7 +63842,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, 1725, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1723, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._ProcessingInstruction.get", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -67640,29 +63857,25 @@ static PyObject *__pyx_pw_4lxml_5etree_22_ProcessingInstruction_3get(PyObject *_ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_2get(struct __pyx_obj_4lxml_5etree__ProcessingInstruction *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__111) __Pyx_RefNannySetupContext("get", 0); - __Pyx_TraceCall("get", __pyx_f[0], 1725, 0, __PYX_ERR(0, 1725, __pyx_L1_error)); - /* "lxml/etree.pyx":1737 + /* "lxml/etree.pyx":1735 * It is not guaranteed to work for all possible text content. * """ * return self.attrib.get(key, default) # <<<<<<<<<<<<<< * * property attrib: */ - __Pyx_TraceLine(1737,0,__PYX_ERR(0, 1737, __pyx_L1_error)) __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, 1737, __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, 1735, __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, 1737, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -67680,7 +63893,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, 1737, __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, 1735, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -67688,13 +63901,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, 1737, __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, 1735, __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, 1737, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1735, __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; @@ -67705,7 +63918,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, 1737, __pyx_L1_error) + __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_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -67714,7 +63927,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_2get(struct __py __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1725 + /* "lxml/etree.pyx":1723 * return "" % strrepr(self.target) * * def get(self, key, default=None): # <<<<<<<<<<<<<< @@ -67732,12 +63945,11 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_2get(struct __py __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1745 +/* "lxml/etree.pyx":1743 * XML node, although this is not guaranteed to stay this way. * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -67763,46 +63975,42 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_6attrib___get__( PyObject *__pyx_7genexpr__pyx_v_value1 = NULL; PyObject *__pyx_7genexpr__pyx_v_value2 = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - Py_ssize_t __pyx_t_7; - PyObject *(*__pyx_t_8)(PyObject *); + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *(*__pyx_t_10)(PyObject *); int __pyx_t_11; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 1745, 0, __PYX_ERR(0, 1745, __pyx_L1_error)); - /* "lxml/etree.pyx":1746 + /* "lxml/etree.pyx":1744 * """ * def __get__(self): * return { attr : (value1 or value2) # <<<<<<<<<<<<<< * for attr, value1, value2 in _FIND_PI_ATTRIBUTES(u' ' + self.text) } * */ - __Pyx_TraceLine(1746,0,__PYX_ERR(0, 1746, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1746, __pyx_L5_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1744, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); - /* "lxml/etree.pyx":1747 + /* "lxml/etree.pyx":1745 * def __get__(self): * 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_TraceLine(1747,0,__PYX_ERR(0, 1747, __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, 1747, __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, 1745, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyNumber_Add(__pyx_kp_u__22, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1747, __pyx_L5_error) + __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_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_INCREF(__pyx_v_4lxml_5etree__FIND_PI_ATTRIBUTES); @@ -67816,77 +64024,47 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_6attrib___get__( __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (!__pyx_t_5) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1747, __pyx_L5_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1747, __pyx_L5_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1747, __pyx_L5_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1747, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1747, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __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) + __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_7 = 0; - __pyx_t_8 = NULL; + __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; + __pyx_t_7 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1747, __pyx_L5_error) + __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_GOTREF(__pyx_t_3); - __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1747, __pyx_L5_error) + __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1745, __pyx_L5_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { - if (likely(!__pyx_t_8)) { + if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_3))) { - if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break; + 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_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1747, __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, 1745, __pyx_L5_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1747, __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, 1745, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { - if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + 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_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1747, __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, 1745, __pyx_L5_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1747, __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, 1745, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); #endif } } else { - __pyx_t_2 = __pyx_t_8(__pyx_t_3); + __pyx_t_2 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1747, __pyx_L5_error) + else __PYX_ERR(0, 1745, __pyx_L5_error) } break; } @@ -67898,43 +64076,43 @@ 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, 1747, __pyx_L5_error) + __PYX_ERR(0, 1745, __pyx_L5_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); - __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2); } else { - __pyx_t_6 = PyList_GET_ITEM(sequence, 0); - __pyx_t_4 = PyList_GET_ITEM(sequence, 1); - __pyx_t_5 = PyList_GET_ITEM(sequence, 2); + __pyx_t_4 = PyList_GET_ITEM(sequence, 0); + __pyx_t_5 = PyList_GET_ITEM(sequence, 1); + __pyx_t_8 = PyList_GET_ITEM(sequence, 2); } - __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_8); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1747, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1747, __pyx_L5_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1745, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1747, __pyx_L5_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1745, __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_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, 1747, __pyx_L5_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1745, __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; - index = 0; __pyx_t_6 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_6)) goto __pyx_L8_unpacking_failed; - __Pyx_GOTREF(__pyx_t_6); - index = 1; __pyx_t_4 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L8_unpacking_failed; + index = 0; __pyx_t_4 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - index = 2; __pyx_t_5 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_5)) goto __pyx_L8_unpacking_failed; + index = 1; __pyx_t_5 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_5)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 3) < 0) __PYX_ERR(0, 1747, __pyx_L5_error) + 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) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L9_unpacking_done; @@ -67942,25 +64120,24 @@ 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, 1747, __pyx_L5_error) + __PYX_ERR(0, 1745, __pyx_L5_error) __pyx_L9_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_attr, __pyx_t_6); - __pyx_t_6 = 0; - __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_value1, __pyx_t_4); + __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_attr, __pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_value2, __pyx_t_5); + __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_value1, __pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_value2, __pyx_t_8); + __pyx_t_8 = 0; - /* "lxml/etree.pyx":1746 + /* "lxml/etree.pyx":1744 * """ * def __get__(self): * return { attr : (value1 or value2) # <<<<<<<<<<<<<< * for attr, value1, value2 in _FIND_PI_ATTRIBUTES(u' ' + self.text) } * */ - __Pyx_TraceLine(1746,0,__PYX_ERR(0, 1746, __pyx_L5_error)) - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_7genexpr__pyx_v_value1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1746, __pyx_L5_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_7genexpr__pyx_v_value1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1744, __pyx_L5_error) if (!__pyx_t_11) { } else { __Pyx_INCREF(__pyx_7genexpr__pyx_v_value1); @@ -67970,17 +64147,16 @@ 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, 1746, __pyx_L5_error) + if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_7genexpr__pyx_v_attr, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 1744, __pyx_L5_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":1747 + /* "lxml/etree.pyx":1745 * def __get__(self): * 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_TraceLine(1747,0,__PYX_ERR(0, 1747, __pyx_L5_error)) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_7genexpr__pyx_v_attr); __pyx_7genexpr__pyx_v_attr = 0; @@ -67998,7 +64174,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_6attrib___get__( __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1745 + /* "lxml/etree.pyx":1743 * XML node, although this is not guaranteed to stay this way. * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -68013,7 +64189,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_6attrib___get__( __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("lxml.etree._ProcessingInstruction.attrib.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; @@ -68022,12 +64198,11 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_6attrib___get__( __Pyx_XDECREF(__pyx_7genexpr__pyx_v_value1); __Pyx_XDECREF(__pyx_7genexpr__pyx_v_value2); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1753 +/* "lxml/etree.pyx":1751 * cdef class _Entity(__ContentOnlyElement): * property tag: * def __get__(self): # <<<<<<<<<<<<<< @@ -68050,28 +64225,25 @@ static PyObject *__pyx_pw_4lxml_5etree_7_Entity_3tag_1__get__(PyObject *__pyx_v_ static PyObject *__pyx_pf_4lxml_5etree_7_Entity_3tag___get__(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree__Entity *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 1753, 0, __PYX_ERR(0, 1753, __pyx_L1_error)); - /* "lxml/etree.pyx":1754 + /* "lxml/etree.pyx":1752 * property tag: * def __get__(self): * return Entity # <<<<<<<<<<<<<< * * property name: */ - __Pyx_TraceLine(1754,0,__PYX_ERR(0, 1754, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Entity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1754, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Entity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1752, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1753 + /* "lxml/etree.pyx":1751 * cdef class _Entity(__ContentOnlyElement): * property tag: * def __get__(self): # <<<<<<<<<<<<<< @@ -68086,12 +64258,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Entity_3tag___get__(CYTHON_UNUSED struc __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1758 +/* "lxml/etree.pyx":1756 * property name: * # not in ElementTree * def __get__(self): # <<<<<<<<<<<<<< @@ -68114,39 +64285,35 @@ static PyObject *__pyx_pw_4lxml_5etree_7_Entity_4name_1__get__(PyObject *__pyx_v static PyObject *__pyx_pf_4lxml_5etree_7_Entity_4name___get__(struct __pyx_obj_4lxml_5etree__Entity *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 1758, 0, __PYX_ERR(0, 1758, __pyx_L1_error)); - /* "lxml/etree.pyx":1759 + /* "lxml/etree.pyx":1757 * # not in ElementTree * def __get__(self): * _assertValidNode(self) # <<<<<<<<<<<<<< * return funicode(self._c_node.name) * */ - __Pyx_TraceLine(1759,0,__PYX_ERR(0, 1759, __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, 1759, __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, 1757, __pyx_L1_error) - /* "lxml/etree.pyx":1760 + /* "lxml/etree.pyx":1758 * def __get__(self): * _assertValidNode(self) * return funicode(self._c_node.name) # <<<<<<<<<<<<<< * * def __set__(self, value): */ - __Pyx_TraceLine(1760,0,__PYX_ERR(0, 1760, __pyx_L1_error)) __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, 1760, __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, 1758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1758 + /* "lxml/etree.pyx":1756 * property name: * # not in ElementTree * def __get__(self): # <<<<<<<<<<<<<< @@ -68161,12 +64328,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Entity_4name___get__(struct __pyx_obj_4 __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1762 +/* "lxml/etree.pyx":1760 * return funicode(self._c_node.name) * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -68190,7 +64356,6 @@ static int __pyx_pw_4lxml_5etree_7_Entity_4name_3__set__(PyObject *__pyx_v_self, static int __pyx_pf_4lxml_5etree_7_Entity_4name_2__set__(struct __pyx_obj_4lxml_5etree__Entity *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_v_value_utf = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -68201,61 +64366,56 @@ static int __pyx_pf_4lxml_5etree_7_Entity_4name_2__set__(struct __pyx_obj_4lxml_ Py_UCS4 __pyx_t_7; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[0], 1762, 0, __PYX_ERR(0, 1762, __pyx_L1_error)); - /* "lxml/etree.pyx":1763 + /* "lxml/etree.pyx":1761 * * def __set__(self, value): * _assertValidNode(self) # <<<<<<<<<<<<<< * value_utf = _utf8(value) * if b'&' in value_utf or b';' in value_utf: */ - __Pyx_TraceLine(1763,0,__PYX_ERR(0, 1763, __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, 1763, __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, 1761, __pyx_L1_error) - /* "lxml/etree.pyx":1764 + /* "lxml/etree.pyx":1762 * 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_TraceLine(1764,0,__PYX_ERR(0, 1764, __pyx_L1_error)) - __pyx_t_2 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1764, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_value_utf = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":1765 + /* "lxml/etree.pyx":1763 * _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_TraceLine(1765,0,__PYX_ERR(0, 1765, __pyx_L1_error)) - __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__112, __pyx_v_value_utf, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1765, __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, 1763, __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__113, __pyx_v_value_utf, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1765, __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, 1763, __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":1766 + /* "lxml/etree.pyx":1764 * 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_TraceLine(1766,0,__PYX_ERR(0, 1766, __pyx_L1_error)) - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1766, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = 0; __pyx_t_7 = 127; @@ -68263,25 +64423,25 @@ 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, 1766, __pyx_L1_error) + __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_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); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_8); __pyx_t_8 = 0; - __Pyx_INCREF(__pyx_kp_u__60); + __Pyx_INCREF(__pyx_kp_u__21); __pyx_t_6 += 1; - __Pyx_GIVEREF(__pyx_kp_u__60); - PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__60); - __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1766, __pyx_L1_error) + __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_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, 1766, __pyx_L1_error) + __PYX_ERR(0, 1764, __pyx_L1_error) - /* "lxml/etree.pyx":1765 + /* "lxml/etree.pyx":1763 * _assertValidNode(self) * value_utf = _utf8(value) * if b'&' in value_utf or b';' in value_utf: # <<<<<<<<<<<<<< @@ -68290,17 +64450,16 @@ static int __pyx_pf_4lxml_5etree_7_Entity_4name_2__set__(struct __pyx_obj_4lxml_ */ } - /* "lxml/etree.pyx":1767 + /* "lxml/etree.pyx":1765 * 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: */ - __Pyx_TraceLine(1767,0,__PYX_ERR(0, 1767, __pyx_L1_error)) xmlNodeSetName(__pyx_v_self->__pyx_base.__pyx_base._c_node, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_value_utf)); - /* "lxml/etree.pyx":1762 + /* "lxml/etree.pyx":1760 * return funicode(self._c_node.name) * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -68318,12 +64477,11 @@ static int __pyx_pf_4lxml_5etree_7_Entity_4name_2__set__(struct __pyx_obj_4lxml_ __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_value_utf); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1772 +/* "lxml/etree.pyx":1770 * # FIXME: should this be None or '&[VALUE];' or the resolved * # entity value ? * def __get__(self): # <<<<<<<<<<<<<< @@ -68346,7 +64504,6 @@ static PyObject *__pyx_pw_4lxml_5etree_7_Entity_4text_1__get__(PyObject *__pyx_v static PyObject *__pyx_pf_4lxml_5etree_7_Entity_4text___get__(struct __pyx_obj_4lxml_5etree__Entity *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -68355,38 +64512,35 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Entity_4text___get__(struct __pyx_obj_4 PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 1772, 0, __PYX_ERR(0, 1772, __pyx_L1_error)); - /* "lxml/etree.pyx":1773 + /* "lxml/etree.pyx":1771 * # entity value ? * def __get__(self): * _assertValidNode(self) # <<<<<<<<<<<<<< * return f'&{funicode(self._c_node.name)};' * */ - __Pyx_TraceLine(1773,0,__PYX_ERR(0, 1773, __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, 1773, __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, 1771, __pyx_L1_error) - /* "lxml/etree.pyx":1774 + /* "lxml/etree.pyx":1772 * def __get__(self): * _assertValidNode(self) * return f'&{funicode(self._c_node.name)};' # <<<<<<<<<<<<<< * * def __repr__(self): */ - __Pyx_TraceLine(1774,0,__PYX_ERR(0, 1774, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1774, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1772, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = 127; - __Pyx_INCREF(__pyx_kp_u__112); + __Pyx_INCREF(__pyx_kp_u__28); __pyx_t_3 += 1; - __Pyx_GIVEREF(__pyx_kp_u__112); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u__112); - __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, 1774, __pyx_L1_error) + __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_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1774, __pyx_L1_error) + __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_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; @@ -68394,18 +64548,18 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Entity_4text___get__(struct __pyx_obj_4 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6); __pyx_t_6 = 0; - __Pyx_INCREF(__pyx_kp_u__113); + __Pyx_INCREF(__pyx_kp_u__29); __pyx_t_3 += 1; - __Pyx_GIVEREF(__pyx_kp_u__113); - PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__113); - __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1774, __pyx_L1_error) + __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_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":1772 + /* "lxml/etree.pyx":1770 * # FIXME: should this be None or '&[VALUE];' or the resolved * # entity value ? * def __get__(self): # <<<<<<<<<<<<<< @@ -68422,12 +64576,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Entity_4text___get__(struct __pyx_obj_4 __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1776 +/* "lxml/etree.pyx":1774 * return f'&{funicode(self._c_node.name)};' * * def __repr__(self): # <<<<<<<<<<<<<< @@ -68450,35 +64603,32 @@ static PyObject *__pyx_pw_4lxml_5etree_7_Entity_1__repr__(PyObject *__pyx_v_self static PyObject *__pyx_pf_4lxml_5etree_7_Entity___repr__(struct __pyx_obj_4lxml_5etree__Entity *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[0], 1776, 0, __PYX_ERR(0, 1776, __pyx_L1_error)); - /* "lxml/etree.pyx":1777 + /* "lxml/etree.pyx":1775 * * def __repr__(self): * return "&%s;" % strrepr(self.name) # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(1777,0,__PYX_ERR(0, 1777, __pyx_L1_error)) __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, 1777, __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, 1775, __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, 1777, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_strrepr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1777, __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, 1775, __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":1776 + /* "lxml/etree.pyx":1774 * return f'&{funicode(self._c_node.name)};' * * def __repr__(self): # <<<<<<<<<<<<<< @@ -68494,12 +64644,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Entity___repr__(struct __pyx_obj_4lxml_ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1804 +/* "lxml/etree.pyx":1802 * cdef readonly unicode localname * cdef readonly unicode namespace * def __init__(self, text_or_uri_or_element, tag=None): # <<<<<<<<<<<<<< @@ -68543,7 +64692,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, 1804, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1802, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -68559,7 +64708,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, 1804, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1802, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.QName.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -68576,7 +64725,6 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q PyObject *__pyx_v_ns_utf = NULL; PyObject *__pyx_v_tag_utf = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -68587,30 +64735,27 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q Py_ssize_t __pyx_t_7; Py_UCS4 __pyx_t_8; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 1804, 0, __PYX_ERR(0, 1804, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_text_or_uri_or_element); __Pyx_INCREF(__pyx_v_tag); - /* "lxml/etree.pyx":1805 + /* "lxml/etree.pyx":1803 * cdef readonly unicode namespace * def __init__(self, text_or_uri_or_element, tag=None): * if text_or_uri_or_element is None: # <<<<<<<<<<<<<< * # Allow None as no namespace. * text_or_uri_or_element, tag = tag, None */ - __Pyx_TraceLine(1805,0,__PYX_ERR(0, 1805, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_text_or_uri_or_element == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1807 + /* "lxml/etree.pyx":1805 * if text_or_uri_or_element is None: * # Allow None as no namespace. * text_or_uri_or_element, tag = tag, None # <<<<<<<<<<<<<< * if not _isString(text_or_uri_or_element): * if isinstance(text_or_uri_or_element, _Element): */ - __Pyx_TraceLine(1807,0,__PYX_ERR(0, 1807, __pyx_L1_error)) __pyx_t_3 = __pyx_v_tag; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = Py_None; @@ -68620,7 +64765,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":1805 + /* "lxml/etree.pyx":1803 * cdef readonly unicode namespace * def __init__(self, text_or_uri_or_element, tag=None): * if text_or_uri_or_element is None: # <<<<<<<<<<<<<< @@ -68629,71 +64774,66 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q */ } - /* "lxml/etree.pyx":1808 + /* "lxml/etree.pyx":1806 * # Allow None as no namespace. * text_or_uri_or_element, tag = tag, None * 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 */ - __Pyx_TraceLine(1808,0,__PYX_ERR(0, 1808, __pyx_L1_error)) __pyx_t_2 = ((!(_isString(__pyx_v_text_or_uri_or_element) != 0)) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1809 + /* "lxml/etree.pyx":1807 * text_or_uri_or_element, tag = tag, None * 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): */ - __Pyx_TraceLine(1809,0,__PYX_ERR(0, 1809, __pyx_L1_error)) __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_text_or_uri_or_element, __pyx_ptype_4lxml_5etree__Element); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":1810 + /* "lxml/etree.pyx":1808 * 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_TraceLine(1810,0,__PYX_ERR(0, 1810, __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, 1810, __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, 1808, __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":1811 + /* "lxml/etree.pyx":1809 * 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}" * elif isinstance(text_or_uri_or_element, QName): */ - __Pyx_TraceLine(1811,0,__PYX_ERR(0, 1811, __pyx_L1_error)) __pyx_t_1 = ((!(_isString(__pyx_v_text_or_uri_or_element) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "lxml/etree.pyx":1812 + /* "lxml/etree.pyx":1810 * 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_TraceLine(1812,0,__PYX_ERR(0, 1812, __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, 1812, __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, 1810, __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, 1812, __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, 1810, __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, 1812, __pyx_L1_error) + __PYX_ERR(0, 1810, __pyx_L1_error) - /* "lxml/etree.pyx":1811 + /* "lxml/etree.pyx":1809 * 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): # <<<<<<<<<<<<<< @@ -68702,7 +64842,7 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q */ } - /* "lxml/etree.pyx":1809 + /* "lxml/etree.pyx":1807 * text_or_uri_or_element, tag = tag, None * if not _isString(text_or_uri_or_element): * if isinstance(text_or_uri_or_element, _Element): # <<<<<<<<<<<<<< @@ -68712,32 +64852,30 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q goto __pyx_L5; } - /* "lxml/etree.pyx":1813 + /* "lxml/etree.pyx":1811 * 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 * elif text_or_uri_or_element is not None: */ - __Pyx_TraceLine(1813,0,__PYX_ERR(0, 1813, __pyx_L1_error)) __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_text_or_uri_or_element, __pyx_ptype_4lxml_5etree_QName); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1814 + /* "lxml/etree.pyx":1812 * 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 # <<<<<<<<<<<<<< * elif text_or_uri_or_element is not None: * text_or_uri_or_element = unicode(text_or_uri_or_element) */ - __Pyx_TraceLine(1814,0,__PYX_ERR(0, 1814, __pyx_L1_error)) __pyx_t_3 = ((struct __pyx_obj_4lxml_5etree_QName *)__pyx_v_text_or_uri_or_element)->text; __Pyx_INCREF(__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":1811 * 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): # <<<<<<<<<<<<<< @@ -68747,32 +64885,30 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q goto __pyx_L5; } - /* "lxml/etree.pyx":1815 + /* "lxml/etree.pyx":1813 * 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: # <<<<<<<<<<<<<< * text_or_uri_or_element = unicode(text_or_uri_or_element) * else: */ - __Pyx_TraceLine(1815,0,__PYX_ERR(0, 1815, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_text_or_uri_or_element != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { - /* "lxml/etree.pyx":1816 + /* "lxml/etree.pyx":1814 * 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_TraceLine(1816,0,__PYX_ERR(0, 1816, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_v_text_or_uri_or_element); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1816, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_text_or_uri_or_element, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":1815 + /* "lxml/etree.pyx":1813 * 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: # <<<<<<<<<<<<<< @@ -68782,27 +64918,26 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q goto __pyx_L5; } - /* "lxml/etree.pyx":1818 + /* "lxml/etree.pyx":1816 * 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}" # <<<<<<<<<<<<<< * * ns_utf, tag_utf = _getNsTag(text_or_uri_or_element) */ - __Pyx_TraceLine(1818,0,__PYX_ERR(0, 1818, __pyx_L1_error)) /*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, 1818, __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, 1816, __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, 1818, __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, 1816, __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, 1818, __pyx_L1_error) + __PYX_ERR(0, 1816, __pyx_L1_error) } __pyx_L5:; - /* "lxml/etree.pyx":1808 + /* "lxml/etree.pyx":1806 * # Allow None as no namespace. * text_or_uri_or_element, tag = tag, None * if not _isString(text_or_uri_or_element): # <<<<<<<<<<<<<< @@ -68811,15 +64946,14 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q */ } - /* "lxml/etree.pyx":1820 + /* "lxml/etree.pyx":1818 * 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_TraceLine(1820,0,__PYX_ERR(0, 1820, __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, 1820, __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, 1818, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(__pyx_t_4 != Py_None)) { PyObject* sequence = __pyx_t_4; @@ -68827,7 +64961,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, 1820, __pyx_L1_error) + __PYX_ERR(0, 1818, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); @@ -68835,56 +64969,53 @@ 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, 1820, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1818, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1820, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1818, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1820, __pyx_L1_error) + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1818, __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":1821 + /* "lxml/etree.pyx":1819 * * ns_utf, tag_utf = _getNsTag(text_or_uri_or_element) * if tag is not None: # <<<<<<<<<<<<<< * # either ('ns', 'tag') or ('{ns}oldtag', 'newtag') * if ns_utf is None: */ - __Pyx_TraceLine(1821,0,__PYX_ERR(0, 1821, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_tag != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1823 + /* "lxml/etree.pyx":1821 * if tag is not None: * # either ('ns', 'tag') or ('{ns}oldtag', 'newtag') * if ns_utf is None: # <<<<<<<<<<<<<< * ns_utf = tag_utf # case 1: namespace ended up as tag name * tag_utf = _utf8(tag) */ - __Pyx_TraceLine(1823,0,__PYX_ERR(0, 1823, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_ns_utf == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":1824 + /* "lxml/etree.pyx":1822 * # either ('ns', 'tag') or ('{ns}oldtag', 'newtag') * if ns_utf is None: * ns_utf = tag_utf # case 1: namespace ended up as tag name # <<<<<<<<<<<<<< * tag_utf = _utf8(tag) * _tagValidOrRaise(tag_utf) */ - __Pyx_TraceLine(1824,0,__PYX_ERR(0, 1824, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_tag_utf); __Pyx_DECREF_SET(__pyx_v_ns_utf, __pyx_v_tag_utf); - /* "lxml/etree.pyx":1823 + /* "lxml/etree.pyx":1821 * if tag is not None: * # either ('ns', 'tag') or ('{ns}oldtag', 'newtag') * if ns_utf is None: # <<<<<<<<<<<<<< @@ -68893,20 +65024,19 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q */ } - /* "lxml/etree.pyx":1825 + /* "lxml/etree.pyx":1823 * 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_TraceLine(1825,0,__PYX_ERR(0, 1825, __pyx_L1_error)) - __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_v_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1825, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_v_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1823, __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":1821 + /* "lxml/etree.pyx":1819 * * ns_utf, tag_utf = _getNsTag(text_or_uri_or_element) * if tag is not None: # <<<<<<<<<<<<<< @@ -68915,29 +65045,27 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q */ } - /* "lxml/etree.pyx":1826 + /* "lxml/etree.pyx":1824 * 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_TraceLine(1826,0,__PYX_ERR(0, 1826, __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, 1826, __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, 1824, __pyx_L1_error) - /* "lxml/etree.pyx":1827 + /* "lxml/etree.pyx":1825 * tag_utf = _utf8(tag) * _tagValidOrRaise(tag_utf) * self.localname = (tag_utf).decode('utf8') # <<<<<<<<<<<<<< * if ns_utf is None: * self.namespace = None */ - __Pyx_TraceLine(1827,0,__PYX_ERR(0, 1827, __pyx_L1_error)) if (unlikely(__pyx_v_tag_utf == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); - __PYX_ERR(0, 1827, __pyx_L1_error) + __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, 1827, __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_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->localname); @@ -68945,40 +65073,37 @@ 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":1828 + /* "lxml/etree.pyx":1826 * _tagValidOrRaise(tag_utf) * self.localname = (tag_utf).decode('utf8') * if ns_utf is None: # <<<<<<<<<<<<<< * self.namespace = None * self.text = self.localname */ - __Pyx_TraceLine(1828,0,__PYX_ERR(0, 1828, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_ns_utf == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1829 + /* "lxml/etree.pyx":1827 * self.localname = (tag_utf).decode('utf8') * if ns_utf is None: * self.namespace = None # <<<<<<<<<<<<<< * self.text = self.localname * else: */ - __Pyx_TraceLine(1829,0,__PYX_ERR(0, 1829, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->namespace); __Pyx_DECREF(__pyx_v_self->namespace); __pyx_v_self->namespace = ((PyObject*)Py_None); - /* "lxml/etree.pyx":1830 + /* "lxml/etree.pyx":1828 * if ns_utf is None: * self.namespace = None * self.text = self.localname # <<<<<<<<<<<<<< * else: * self.namespace = (ns_utf).decode('utf8') */ - __Pyx_TraceLine(1830,0,__PYX_ERR(0, 1830, __pyx_L1_error)) __pyx_t_4 = __pyx_v_self->localname; __Pyx_INCREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); @@ -68987,7 +65112,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":1828 + /* "lxml/etree.pyx":1826 * _tagValidOrRaise(tag_utf) * self.localname = (tag_utf).decode('utf8') * if ns_utf is None: # <<<<<<<<<<<<<< @@ -68997,20 +65122,19 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q goto __pyx_L9; } - /* "lxml/etree.pyx":1832 + /* "lxml/etree.pyx":1830 * self.text = self.localname * else: * self.namespace = (ns_utf).decode('utf8') # <<<<<<<<<<<<<< * self.text = u"{%s}%s" % (self.namespace, self.localname) * def __str__(self): */ - __Pyx_TraceLine(1832,0,__PYX_ERR(0, 1832, __pyx_L1_error)) /*else*/ { if (unlikely(__pyx_v_ns_utf == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); - __PYX_ERR(0, 1832, __pyx_L1_error) + __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, 1832, __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_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->namespace); @@ -69018,41 +65142,40 @@ 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":1833 + /* "lxml/etree.pyx":1831 * else: * self.namespace = (ns_utf).decode('utf8') * self.text = u"{%s}%s" % (self.namespace, self.localname) # <<<<<<<<<<<<<< * def __str__(self): * return self.text */ - __Pyx_TraceLine(1833,0,__PYX_ERR(0, 1833, __pyx_L1_error)) - __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1833, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = 0; __pyx_t_8 = 127; - __Pyx_INCREF(__pyx_kp_u__114); + __Pyx_INCREF(__pyx_kp_u__30); __pyx_t_7 += 1; - __Pyx_GIVEREF(__pyx_kp_u__114); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u__114); - __pyx_t_5 = __Pyx_PyUnicode_Unicode(__pyx_v_self->namespace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1833, __pyx_L1_error) + __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_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, 1, __pyx_t_5); __pyx_t_5 = 0; - __Pyx_INCREF(__pyx_kp_u__115); + __Pyx_INCREF(__pyx_kp_u__31); __pyx_t_7 += 1; - __Pyx_GIVEREF(__pyx_kp_u__115); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__115); - __pyx_t_5 = __Pyx_PyUnicode_Unicode(__pyx_v_self->localname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1833, __pyx_L1_error) + __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_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, 1833, __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, 1831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GIVEREF(__pyx_t_5); @@ -69063,7 +65186,7 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q } __pyx_L9:; - /* "lxml/etree.pyx":1804 + /* "lxml/etree.pyx":1802 * cdef readonly unicode localname * cdef readonly unicode namespace * def __init__(self, text_or_uri_or_element, tag=None): # <<<<<<<<<<<<<< @@ -69085,12 +65208,11 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q __Pyx_XDECREF(__pyx_v_tag_utf); __Pyx_XDECREF(__pyx_v_text_or_uri_or_element); __Pyx_XDECREF(__pyx_v_tag); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1834 +/* "lxml/etree.pyx":1832 * self.namespace = (ns_utf).decode('utf8') * self.text = u"{%s}%s" % (self.namespace, self.localname) * def __str__(self): # <<<<<<<<<<<<<< @@ -69113,25 +65235,22 @@ static PyObject *__pyx_pw_4lxml_5etree_5QName_3__str__(PyObject *__pyx_v_self) { static PyObject *__pyx_pf_4lxml_5etree_5QName_2__str__(struct __pyx_obj_4lxml_5etree_QName *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__", 0); - __Pyx_TraceCall("__str__", __pyx_f[0], 1834, 0, __PYX_ERR(0, 1834, __pyx_L1_error)); - /* "lxml/etree.pyx":1835 + /* "lxml/etree.pyx":1833 * self.text = u"{%s}%s" % (self.namespace, self.localname) * def __str__(self): * return self.text # <<<<<<<<<<<<<< * def __hash__(self): * return hash(self.text) */ - __Pyx_TraceLine(1835,0,__PYX_ERR(0, 1835, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->text); __pyx_r = __pyx_v_self->text; goto __pyx_L0; - /* "lxml/etree.pyx":1834 + /* "lxml/etree.pyx":1832 * self.namespace = (ns_utf).decode('utf8') * self.text = u"{%s}%s" % (self.namespace, self.localname) * def __str__(self): # <<<<<<<<<<<<<< @@ -69140,17 +65259,13 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_2__str__(struct __pyx_obj_4lxml_5e */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.QName.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1836 +/* "lxml/etree.pyx":1834 * def __str__(self): * return self.text * def __hash__(self): # <<<<<<<<<<<<<< @@ -69173,29 +65288,26 @@ static Py_hash_t __pyx_pw_4lxml_5etree_5QName_5__hash__(PyObject *__pyx_v_self) static Py_hash_t __pyx_pf_4lxml_5etree_5QName_4__hash__(struct __pyx_obj_4lxml_5etree_QName *__pyx_v_self) { Py_hash_t __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_hash_t __pyx_t_2; __Pyx_RefNannySetupContext("__hash__", 0); - __Pyx_TraceCall("__hash__", __pyx_f[0], 1836, 0, __PYX_ERR(0, 1836, __pyx_L1_error)); - /* "lxml/etree.pyx":1837 + /* "lxml/etree.pyx":1835 * return self.text * def __hash__(self): * return hash(self.text) # <<<<<<<<<<<<<< * def __richcmp__(self, other, int op): * try: */ - __Pyx_TraceLine(1837,0,__PYX_ERR(0, 1837, __pyx_L1_error)) __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, 1837, __pyx_L1_error) + __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_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "lxml/etree.pyx":1836 + /* "lxml/etree.pyx":1834 * def __str__(self): * return self.text * def __hash__(self): # <<<<<<<<<<<<<< @@ -69210,12 +65322,11 @@ static Py_hash_t __pyx_pf_4lxml_5etree_5QName_4__hash__(struct __pyx_obj_4lxml_5 __pyx_r = -1; __pyx_L0:; if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1838 +/* "lxml/etree.pyx":1836 * def __hash__(self): * return hash(self.text) * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< @@ -69238,7 +65349,6 @@ static PyObject *__pyx_pw_4lxml_5etree_5QName_7__richcmp__(PyObject *__pyx_v_sel static PyObject *__pyx_pf_4lxml_5etree_5QName_6__richcmp__(struct __pyx_obj_4lxml_5etree_QName *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -69250,17 +65360,15 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_6__richcmp__(struct __pyx_obj_4lxm PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("__richcmp__", 0); - __Pyx_TraceCall("__richcmp__", __pyx_f[0], 1838, 0, __PYX_ERR(0, 1838, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_other); - /* "lxml/etree.pyx":1839 + /* "lxml/etree.pyx":1837 * return hash(self.text) * def __richcmp__(self, other, int op): * try: # <<<<<<<<<<<<<< * if type(other) is QName: * other = (other).text */ - __Pyx_TraceLine(1839,0,__PYX_ERR(0, 1839, __pyx_L3_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -69270,32 +65378,30 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_6__richcmp__(struct __pyx_obj_4lxm __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "lxml/etree.pyx":1840 + /* "lxml/etree.pyx":1838 * def __richcmp__(self, other, int op): * try: * if type(other) is QName: # <<<<<<<<<<<<<< * other = (other).text * elif not isinstance(other, unicode): */ - __Pyx_TraceLine(1840,0,__PYX_ERR(0, 1840, __pyx_L3_error)) __pyx_t_4 = (((PyObject *)Py_TYPE(__pyx_v_other)) == ((PyObject *)__pyx_ptype_4lxml_5etree_QName)); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "lxml/etree.pyx":1841 + /* "lxml/etree.pyx":1839 * try: * if type(other) is QName: * other = (other).text # <<<<<<<<<<<<<< * elif not isinstance(other, unicode): * other = unicode(other) */ - __Pyx_TraceLine(1841,0,__PYX_ERR(0, 1841, __pyx_L3_error)) __pyx_t_6 = ((struct __pyx_obj_4lxml_5etree_QName *)__pyx_v_other)->text; __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_other, __pyx_t_6); __pyx_t_6 = 0; - /* "lxml/etree.pyx":1840 + /* "lxml/etree.pyx":1838 * def __richcmp__(self, other, int op): * try: * if type(other) is QName: # <<<<<<<<<<<<<< @@ -69305,32 +65411,30 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_6__richcmp__(struct __pyx_obj_4lxm goto __pyx_L9; } - /* "lxml/etree.pyx":1842 + /* "lxml/etree.pyx":1840 * if type(other) is QName: * other = (other).text * elif not isinstance(other, unicode): # <<<<<<<<<<<<<< * other = unicode(other) * except (ValueError, UnicodeDecodeError): */ - __Pyx_TraceLine(1842,0,__PYX_ERR(0, 1842, __pyx_L3_error)) __pyx_t_5 = PyUnicode_Check(__pyx_v_other); __pyx_t_4 = ((!(__pyx_t_5 != 0)) != 0); if (__pyx_t_4) { - /* "lxml/etree.pyx":1843 + /* "lxml/etree.pyx":1841 * other = (other).text * elif not isinstance(other, unicode): * other = unicode(other) # <<<<<<<<<<<<<< * except (ValueError, UnicodeDecodeError): * return NotImplemented */ - __Pyx_TraceLine(1843,0,__PYX_ERR(0, 1843, __pyx_L3_error)) - __pyx_t_6 = __Pyx_PyObject_Unicode(__pyx_v_other); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1843, __pyx_L3_error) + __pyx_t_6 = __Pyx_PyObject_Unicode(__pyx_v_other); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1841, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_other, __pyx_t_6); __pyx_t_6 = 0; - /* "lxml/etree.pyx":1842 + /* "lxml/etree.pyx":1840 * if type(other) is QName: * other = (other).text * elif not isinstance(other, unicode): # <<<<<<<<<<<<<< @@ -69340,7 +65444,7 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_6__richcmp__(struct __pyx_obj_4lxm } __pyx_L9:; - /* "lxml/etree.pyx":1839 + /* "lxml/etree.pyx":1837 * return hash(self.text) * def __richcmp__(self, other, int op): * try: # <<<<<<<<<<<<<< @@ -69355,30 +65459,28 @@ 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":1844 + /* "lxml/etree.pyx":1842 * elif not isinstance(other, unicode): * other = unicode(other) * except (ValueError, UnicodeDecodeError): # <<<<<<<<<<<<<< * return NotImplemented * return python.PyObject_RichCompare(self.text, other, op) */ - __Pyx_TraceLine(1844,0,__PYX_ERR(0, 1844, __pyx_L5_except_error)) __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, 1844, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 1842, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_9); - /* "lxml/etree.pyx":1845 + /* "lxml/etree.pyx":1843 * other = unicode(other) * except (ValueError, UnicodeDecodeError): * return NotImplemented # <<<<<<<<<<<<<< * return python.PyObject_RichCompare(self.text, other, op) * */ - __Pyx_TraceLine(1845,0,__PYX_ERR(0, 1845, __pyx_L5_except_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_builtin_NotImplemented); __pyx_r = __pyx_builtin_NotImplemented; @@ -69390,7 +65492,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":1839 + /* "lxml/etree.pyx":1837 * return hash(self.text) * def __richcmp__(self, other, int op): * try: # <<<<<<<<<<<<<< @@ -69411,25 +65513,24 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_6__richcmp__(struct __pyx_obj_4lxm __pyx_L8_try_end:; } - /* "lxml/etree.pyx":1846 + /* "lxml/etree.pyx":1844 * except (ValueError, UnicodeDecodeError): * return NotImplemented * return python.PyObject_RichCompare(self.text, other, op) # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(1846,0,__PYX_ERR(0, 1846, __pyx_L1_error)) __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, 1846, __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, 1844, __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":1838 + /* "lxml/etree.pyx":1836 * def __hash__(self): * return hash(self.text) * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< @@ -69447,12 +65548,11 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_6__richcmp__(struct __pyx_obj_4lxm __pyx_L0:; __Pyx_XDECREF(__pyx_v_other); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1801 +/* "lxml/etree.pyx":1799 * their text content. * """ * cdef readonly unicode text # <<<<<<<<<<<<<< @@ -69475,27 +65575,21 @@ static PyObject *__pyx_pw_4lxml_5etree_5QName_4text_1__get__(PyObject *__pyx_v_s static PyObject *__pyx_pf_4lxml_5etree_5QName_4text___get__(struct __pyx_obj_4lxml_5etree_QName *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 1801, 0, __PYX_ERR(0, 1801, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->text); __pyx_r = __pyx_v_self->text; goto __pyx_L0; /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.QName.text.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1802 +/* "lxml/etree.pyx":1800 * """ * cdef readonly unicode text * cdef readonly unicode localname # <<<<<<<<<<<<<< @@ -69518,27 +65612,21 @@ static PyObject *__pyx_pw_4lxml_5etree_5QName_9localname_1__get__(PyObject *__py static PyObject *__pyx_pf_4lxml_5etree_5QName_9localname___get__(struct __pyx_obj_4lxml_5etree_QName *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 1802, 0, __PYX_ERR(0, 1802, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->localname); __pyx_r = __pyx_v_self->localname; goto __pyx_L0; /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.QName.localname.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1803 +/* "lxml/etree.pyx":1801 * cdef readonly unicode text * cdef readonly unicode localname * cdef readonly unicode namespace # <<<<<<<<<<<<<< @@ -69561,27 +65649,21 @@ static PyObject *__pyx_pw_4lxml_5etree_5QName_9namespace_1__get__(PyObject *__py static PyObject *__pyx_pf_4lxml_5etree_5QName_9namespace___get__(struct __pyx_obj_4lxml_5etree_QName *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 1803, 0, __PYX_ERR(0, 1803, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->namespace); __pyx_r = __pyx_v_self->namespace; goto __pyx_L0; /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.QName.namespace.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1859 +/* "lxml/etree.pyx":1857 * * @cython.final * cdef int _assertHasRoot(self) except -1: # <<<<<<<<<<<<<< @@ -69591,42 +65673,38 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_9namespace___get__(struct __pyx_ob static int __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(struct LxmlElementTree *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_assertHasRoot", 0); - __Pyx_TraceCall("_assertHasRoot", __pyx_f[0], 1859, 0, __PYX_ERR(0, 1859, __pyx_L1_error)); - /* "lxml/etree.pyx":1865 + /* "lxml/etree.pyx":1863 * the caller program. * """ * assert self._context_node is not None, \ # <<<<<<<<<<<<<< * u"ElementTree not initialized, missing root" * return 0 */ - __Pyx_TraceLine(1865,0,__PYX_ERR(0, 1865, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __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, 1865, __pyx_L1_error) + __PYX_ERR(0, 1863, __pyx_L1_error) } } #endif - /* "lxml/etree.pyx":1867 + /* "lxml/etree.pyx":1865 * assert self._context_node is not None, \ * u"ElementTree not initialized, missing root" * return 0 # <<<<<<<<<<<<<< * * def parse(self, source, _BaseParser parser=None, *, base_url=None): */ - __Pyx_TraceLine(1867,0,__PYX_ERR(0, 1867, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1859 + /* "lxml/etree.pyx":1857 * * @cython.final * cdef int _assertHasRoot(self) except -1: # <<<<<<<<<<<<<< @@ -69639,12 +65717,11 @@ static int __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(struct LxmlElement __Pyx_AddTraceback("lxml.etree._ElementTree._assertHasRoot", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1869 +/* "lxml/etree.pyx":1867 * return 0 * * def parse(self, source, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< @@ -69655,7 +65732,7 @@ static int __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(struct LxmlElement /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_1parse(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_12_ElementTree_parse[] = "parse(self, source, parser=None, base_url=None)\n\n Updates self with the content of source and returns its root\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_12_ElementTree_1parse = {"parse", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_1parse, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_parse}; +static PyMethodDef __pyx_mdef_4lxml_5etree_12_ElementTree_1parse = {"parse", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ElementTree_1parse, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_parse}; static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_1parse(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_source = 0; struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_parser = 0; @@ -69697,7 +65774,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, 1869, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse") < 0)) __PYX_ERR(0, 1867, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -69714,13 +65791,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, 1869, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("parse", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1867, __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, 1869, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) __PYX_ERR(0, 1867, __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 */ @@ -69736,7 +65813,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_parse(struct LxmlElementTr struct LxmlDocument *__pyx_v_doc = 0; PyObject *__pyx_v_result_container = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -69748,29 +65824,25 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_parse(struct LxmlElementTr PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; - __Pyx_TraceFrameInit(__pyx_codeobj__116) __Pyx_RefNannySetupContext("parse", 0); - __Pyx_TraceCall("parse", __pyx_f[0], 1869, 0, __PYX_ERR(0, 1869, __pyx_L1_error)); - /* "lxml/etree.pyx":1874 + /* "lxml/etree.pyx":1872 * Updates self with the content of source and returns its root * """ * cdef _Document doc = None # <<<<<<<<<<<<<< * try: * doc = _parseDocument(source, parser, base_url) */ - __Pyx_TraceLine(1874,0,__PYX_ERR(0, 1874, __pyx_L1_error)) __Pyx_INCREF(Py_None); __pyx_v_doc = ((struct LxmlDocument *)Py_None); - /* "lxml/etree.pyx":1875 + /* "lxml/etree.pyx":1873 * """ * cdef _Document doc = None * try: # <<<<<<<<<<<<<< * doc = _parseDocument(source, parser, base_url) * self._context_node = doc.getroot() */ - __Pyx_TraceLine(1875,0,__PYX_ERR(0, 1875, __pyx_L3_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -69780,63 +65852,59 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_parse(struct LxmlElementTr __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "lxml/etree.pyx":1876 + /* "lxml/etree.pyx":1874 * cdef _Document doc = None * try: * doc = _parseDocument(source, parser, base_url) # <<<<<<<<<<<<<< * self._context_node = doc.getroot() * if self._context_node is None: */ - __Pyx_TraceLine(1876,0,__PYX_ERR(0, 1876, __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, 1876, __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, 1874, __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":1877 + /* "lxml/etree.pyx":1875 * try: * doc = _parseDocument(source, parser, base_url) * self._context_node = doc.getroot() # <<<<<<<<<<<<<< * if self._context_node is None: * self._doc = doc */ - __Pyx_TraceLine(1877,0,__PYX_ERR(0, 1877, __pyx_L3_error)) - __pyx_t_4 = __pyx_f_4lxml_5etree_9_Document_getroot(__pyx_v_doc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1877, __pyx_L3_error) + __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_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, 1877, __pyx_L3_error) + 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) __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":1878 + /* "lxml/etree.pyx":1876 * doc = _parseDocument(source, parser, base_url) * self._context_node = doc.getroot() * if self._context_node is None: # <<<<<<<<<<<<<< * self._doc = doc * except _TargetParserResult as result_container: */ - __Pyx_TraceLine(1878,0,__PYX_ERR(0, 1878, __pyx_L3_error)) __pyx_t_5 = (((PyObject *)__pyx_v_self->_context_node) == Py_None); __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "lxml/etree.pyx":1879 + /* "lxml/etree.pyx":1877 * self._context_node = doc.getroot() * if self._context_node is None: * self._doc = doc # <<<<<<<<<<<<<< * except _TargetParserResult as result_container: * # raises a TypeError if we don't get an _Element */ - __Pyx_TraceLine(1879,0,__PYX_ERR(0, 1879, __pyx_L3_error)) __Pyx_INCREF(((PyObject *)__pyx_v_doc)); __Pyx_GIVEREF(((PyObject *)__pyx_v_doc)); __Pyx_GOTREF(__pyx_v_self->_doc); __Pyx_DECREF(((PyObject *)__pyx_v_self->_doc)); __pyx_v_self->_doc = __pyx_v_doc; - /* "lxml/etree.pyx":1878 + /* "lxml/etree.pyx":1876 * doc = _parseDocument(source, parser, base_url) * self._context_node = doc.getroot() * if self._context_node is None: # <<<<<<<<<<<<<< @@ -69845,7 +65913,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_parse(struct LxmlElementTr */ } - /* "lxml/etree.pyx":1875 + /* "lxml/etree.pyx":1873 * """ * cdef _Document doc = None * try: # <<<<<<<<<<<<<< @@ -69860,16 +65928,15 @@ 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":1880 + /* "lxml/etree.pyx":1878 * if self._context_node is None: * self._doc = doc * except _TargetParserResult as result_container: # <<<<<<<<<<<<<< * # raises a TypeError if we don't get an _Element * self._context_node = result_container.result */ - __Pyx_TraceLine(1880,0,__PYX_ERR(0, 1880, __pyx_L5_except_error)) __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_7, &__pyx_t_8); - __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_TargetParserResult); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1880, __pyx_L5_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_TargetParserResult); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1878, __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; @@ -69877,38 +65944,37 @@ 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, 1880, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_4) < 0) __PYX_ERR(0, 1878, __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":1882 + /* "lxml/etree.pyx":1880 * 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_TraceLine(1882,0,__PYX_ERR(0, 1882, __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, 1882, __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, 1880, __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, 1882, __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, 1880, __pyx_L5_except_error) __Pyx_GIVEREF(__pyx_t_9); __Pyx_GOTREF(__pyx_v_self->_context_node); __Pyx_DECREF(((PyObject *)__pyx_v_self->_context_node)); __pyx_v_self->_context_node = ((struct LxmlElement *)__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "lxml/etree.pyx":1875 + /* "lxml/etree.pyx":1873 * """ * cdef _Document doc = None * try: # <<<<<<<<<<<<<< @@ -69928,20 +65994,19 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_parse(struct LxmlElementTr __pyx_L8_try_end:; } - /* "lxml/etree.pyx":1883 + /* "lxml/etree.pyx":1881 * # raises a TypeError if we don't get an _Element * self._context_node = result_container.result * return self._context_node # <<<<<<<<<<<<<< * * def _setroot(self, _Element root not None): */ - __Pyx_TraceLine(1883,0,__PYX_ERR(0, 1883, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->_context_node)); __pyx_r = ((PyObject *)__pyx_v_self->_context_node); goto __pyx_L0; - /* "lxml/etree.pyx":1869 + /* "lxml/etree.pyx":1867 * return 0 * * def parse(self, source, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< @@ -69961,12 +66026,11 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_parse(struct LxmlElementTr __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XDECREF(__pyx_v_result_container); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1885 +/* "lxml/etree.pyx":1883 * return self._context_node * * def _setroot(self, _Element root not None): # <<<<<<<<<<<<<< @@ -69982,7 +66046,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, 1885, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_5etree__Element, 0, "root", 0))) __PYX_ERR(0, 1883, __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 */ @@ -69996,47 +66060,41 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_3_setroot(PyObject *__pyx_ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_2_setroot(struct LxmlElementTree *__pyx_v_self, struct LxmlElement *__pyx_v_root) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; - __Pyx_TraceFrameInit(__pyx_codeobj__117) __Pyx_RefNannySetupContext("_setroot", 0); - __Pyx_TraceCall("_setroot", __pyx_f[0], 1885, 0, __PYX_ERR(0, 1885, __pyx_L1_error)); - /* "lxml/etree.pyx":1890 + /* "lxml/etree.pyx":1888 * 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_TraceLine(1890,0,__PYX_ERR(0, 1890, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_root); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1890, __pyx_L1_error) + __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) - /* "lxml/etree.pyx":1891 + /* "lxml/etree.pyx":1889 * """ * _assertValidNode(root) * 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 */ - __Pyx_TraceLine(1891,0,__PYX_ERR(0, 1891, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_root->_c_node->type != XML_ELEMENT_NODE) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":1892 + /* "lxml/etree.pyx":1890 * _assertValidNode(root) * 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 * self._doc = None */ - __Pyx_TraceLine(1892,0,__PYX_ERR(0, 1892, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Only_elements_can_be_the_root_of, 0, 0); - __PYX_ERR(0, 1892, __pyx_L1_error) + __PYX_ERR(0, 1890, __pyx_L1_error) - /* "lxml/etree.pyx":1891 + /* "lxml/etree.pyx":1889 * """ * _assertValidNode(root) * if root._c_node.type != tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< @@ -70045,35 +66103,33 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_2_setroot(struct LxmlEleme */ } - /* "lxml/etree.pyx":1893 + /* "lxml/etree.pyx":1891 * 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 # <<<<<<<<<<<<<< * self._doc = None * */ - __Pyx_TraceLine(1893,0,__PYX_ERR(0, 1893, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_root)); __Pyx_GIVEREF(((PyObject *)__pyx_v_root)); __Pyx_GOTREF(__pyx_v_self->_context_node); __Pyx_DECREF(((PyObject *)__pyx_v_self->_context_node)); __pyx_v_self->_context_node = __pyx_v_root; - /* "lxml/etree.pyx":1894 + /* "lxml/etree.pyx":1892 * raise TypeError, u"Only elements can be the root of an ElementTree" * self._context_node = root * self._doc = None # <<<<<<<<<<<<<< * * def getroot(self): */ - __Pyx_TraceLine(1894,0,__PYX_ERR(0, 1894, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_doc); __Pyx_DECREF(((PyObject *)__pyx_v_self->_doc)); __pyx_v_self->_doc = ((struct LxmlDocument *)Py_None); - /* "lxml/etree.pyx":1885 + /* "lxml/etree.pyx":1883 * return self._context_node * * def _setroot(self, _Element root not None): # <<<<<<<<<<<<<< @@ -70089,12 +66145,11 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_2_setroot(struct LxmlEleme __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1896 +/* "lxml/etree.pyx":1894 * self._doc = None * * def getroot(self): # <<<<<<<<<<<<<< @@ -70119,26 +66174,22 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_5getroot(PyObject *__pyx_v static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_4getroot(struct LxmlElementTree *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - __Pyx_TraceFrameInit(__pyx_codeobj__118) __Pyx_RefNannySetupContext("getroot", 0); - __Pyx_TraceCall("getroot", __pyx_f[0], 1896, 0, __PYX_ERR(0, 1896, __pyx_L1_error)); - /* "lxml/etree.pyx":1901 + /* "lxml/etree.pyx":1899 * Gets the root element for this tree. * """ * return self._context_node # <<<<<<<<<<<<<< * * def __copy__(self): */ - __Pyx_TraceLine(1901,0,__PYX_ERR(0, 1901, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->_context_node)); __pyx_r = ((PyObject *)__pyx_v_self->_context_node); goto __pyx_L0; - /* "lxml/etree.pyx":1896 + /* "lxml/etree.pyx":1894 * self._doc = None * * def getroot(self): # <<<<<<<<<<<<<< @@ -70147,17 +66198,13 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_4getroot(struct LxmlElemen */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._ElementTree.getroot", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1903 +/* "lxml/etree.pyx":1901 * return self._context_node * * def __copy__(self): # <<<<<<<<<<<<<< @@ -70181,29 +66228,25 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_7__copy__(PyObject *__pyx_ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_6__copy__(struct LxmlElementTree *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__119) __Pyx_RefNannySetupContext("__copy__", 0); - __Pyx_TraceCall("__copy__", __pyx_f[0], 1903, 0, __PYX_ERR(0, 1903, __pyx_L1_error)); - /* "lxml/etree.pyx":1904 + /* "lxml/etree.pyx":1902 * * def __copy__(self): * return _elementTreeFactory(self._doc, self._context_node) # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __Pyx_TraceLine(1904,0,__PYX_ERR(0, 1904, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_v_self->_doc); __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, 1904, __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, 1902, __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; @@ -70211,7 +66254,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_6__copy__(struct LxmlEleme __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1903 + /* "lxml/etree.pyx":1901 * return self._context_node * * def __copy__(self): # <<<<<<<<<<<<<< @@ -70228,12 +66271,11 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_6__copy__(struct LxmlEleme __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1906 +/* "lxml/etree.pyx":1904 * return _elementTreeFactory(self._doc, self._context_node) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -70260,7 +66302,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_8__deepcopy__(struct LxmlE struct LxmlDocument *__pyx_v_doc = 0; xmlDoc *__pyx_v_c_doc; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -70268,31 +66309,27 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_8__deepcopy__(struct LxmlE PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; - __Pyx_TraceFrameInit(__pyx_codeobj__120) __Pyx_RefNannySetupContext("__deepcopy__", 0); - __Pyx_TraceCall("__deepcopy__", __pyx_f[0], 1906, 0, __PYX_ERR(0, 1906, __pyx_L1_error)); - /* "lxml/etree.pyx":1910 + /* "lxml/etree.pyx":1908 * cdef _Document doc * cdef xmlDoc* c_doc * if self._context_node is not None: # <<<<<<<<<<<<<< * root = self._context_node.__copy__() * assert root is not None */ - __Pyx_TraceLine(1910,0,__PYX_ERR(0, 1910, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_self->_context_node) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1911 + /* "lxml/etree.pyx":1909 * cdef xmlDoc* c_doc * if self._context_node is not None: * root = self._context_node.__copy__() # <<<<<<<<<<<<<< * assert root is not None * _assertValidNode(root) */ - __Pyx_TraceLine(1911,0,__PYX_ERR(0, 1911, __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, 1911, __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, 1909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -70304,72 +66341,65 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_8__deepcopy__(struct LxmlE __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1911, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1911, __pyx_L1_error) - } + __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) __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, 1911, __pyx_L1_error) + 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) __pyx_v_root = ((struct LxmlElement *)__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":1912 + /* "lxml/etree.pyx":1910 * if self._context_node is not None: * root = self._context_node.__copy__() * assert root is not None # <<<<<<<<<<<<<< * _assertValidNode(root) * _copyNonElementSiblings(self._context_node._c_node, root._c_node) */ - __Pyx_TraceLine(1912,0,__PYX_ERR(0, 1912, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_2 = (((PyObject *)__pyx_v_root) != Py_None); if (unlikely(!(__pyx_t_2 != 0))) { PyErr_SetNone(PyExc_AssertionError); - __PYX_ERR(0, 1912, __pyx_L1_error) + __PYX_ERR(0, 1910, __pyx_L1_error) } } #endif - /* "lxml/etree.pyx":1913 + /* "lxml/etree.pyx":1911 * 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_TraceLine(1913,0,__PYX_ERR(0, 1913, __pyx_L1_error)) - __pyx_t_6 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_root); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1913, __pyx_L1_error) + __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) - /* "lxml/etree.pyx":1914 + /* "lxml/etree.pyx":1912 * 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_TraceLine(1914,0,__PYX_ERR(0, 1914, __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, 1914, __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, 1912, __pyx_L1_error) - /* "lxml/etree.pyx":1915 + /* "lxml/etree.pyx":1913 * _assertValidNode(root) * _copyNonElementSiblings(self._context_node._c_node, root._c_node) * return _elementTreeFactory(None, root) # <<<<<<<<<<<<<< * elif self._doc is not None: * _assertValidDoc(self._doc) */ - __Pyx_TraceLine(1915,0,__PYX_ERR(0, 1915, __pyx_L1_error)) __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, 1915, __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, 1913, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1910 + /* "lxml/etree.pyx":1908 * cdef _Document doc * cdef xmlDoc* c_doc * if self._context_node is not None: # <<<<<<<<<<<<<< @@ -70378,63 +66408,58 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_8__deepcopy__(struct LxmlE */ } - /* "lxml/etree.pyx":1916 + /* "lxml/etree.pyx":1914 * _copyNonElementSiblings(self._context_node._c_node, root._c_node) * return _elementTreeFactory(None, root) * elif self._doc is not None: # <<<<<<<<<<<<<< * _assertValidDoc(self._doc) * c_doc = tree.xmlCopyDoc(self._doc._c_doc, 1) */ - __Pyx_TraceLine(1916,0,__PYX_ERR(0, 1916, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)__pyx_v_self->_doc) != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":1917 + /* "lxml/etree.pyx":1915 * return _elementTreeFactory(None, root) * elif self._doc is not None: * _assertValidDoc(self._doc) # <<<<<<<<<<<<<< * c_doc = tree.xmlCopyDoc(self._doc._c_doc, 1) * if c_doc is NULL: */ - __Pyx_TraceLine(1917,0,__PYX_ERR(0, 1917, __pyx_L1_error)) __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, 1917, __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, 1915, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":1918 + /* "lxml/etree.pyx":1916 * elif self._doc is not None: * _assertValidDoc(self._doc) * c_doc = tree.xmlCopyDoc(self._doc._c_doc, 1) # <<<<<<<<<<<<<< * if c_doc is NULL: * raise MemoryError() */ - __Pyx_TraceLine(1918,0,__PYX_ERR(0, 1918, __pyx_L1_error)) __pyx_v_c_doc = xmlCopyDoc(__pyx_v_self->_doc->_c_doc, 1); - /* "lxml/etree.pyx":1919 + /* "lxml/etree.pyx":1917 * _assertValidDoc(self._doc) * c_doc = tree.xmlCopyDoc(self._doc._c_doc, 1) * if c_doc is NULL: # <<<<<<<<<<<<<< * raise MemoryError() * doc = _documentFactory(c_doc, self._doc._parser) */ - __Pyx_TraceLine(1919,0,__PYX_ERR(0, 1919, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_doc == NULL) != 0); if (unlikely(__pyx_t_1)) { - /* "lxml/etree.pyx":1920 + /* "lxml/etree.pyx":1918 * 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) */ - __Pyx_TraceLine(1920,0,__PYX_ERR(0, 1920, __pyx_L1_error)) - PyErr_NoMemory(); __PYX_ERR(0, 1920, __pyx_L1_error) + PyErr_NoMemory(); __PYX_ERR(0, 1918, __pyx_L1_error) - /* "lxml/etree.pyx":1919 + /* "lxml/etree.pyx":1917 * _assertValidDoc(self._doc) * c_doc = tree.xmlCopyDoc(self._doc._c_doc, 1) * if c_doc is NULL: # <<<<<<<<<<<<<< @@ -70443,38 +66468,36 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_8__deepcopy__(struct LxmlE */ } - /* "lxml/etree.pyx":1921 + /* "lxml/etree.pyx":1919 * if c_doc is NULL: * raise MemoryError() * doc = _documentFactory(c_doc, self._doc._parser) # <<<<<<<<<<<<<< * return _elementTreeFactory(doc, None) * else: */ - __Pyx_TraceLine(1921,0,__PYX_ERR(0, 1921, __pyx_L1_error)) __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, 1921, __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, 1919, __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":1922 + /* "lxml/etree.pyx":1920 * raise MemoryError() * doc = _documentFactory(c_doc, self._doc._parser) * return _elementTreeFactory(doc, None) # <<<<<<<<<<<<<< * else: * # so what ... */ - __Pyx_TraceLine(1922,0,__PYX_ERR(0, 1922, __pyx_L1_error)) __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, 1922, __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, 1920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1916 + /* "lxml/etree.pyx":1914 * _copyNonElementSiblings(self._context_node._c_node, root._c_node) * return _elementTreeFactory(None, root) * elif self._doc is not None: # <<<<<<<<<<<<<< @@ -70483,14 +66506,13 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_8__deepcopy__(struct LxmlE */ } - /* "lxml/etree.pyx":1925 + /* "lxml/etree.pyx":1923 * else: * # so what ... * return self # <<<<<<<<<<<<<< * * # not in ElementTree */ - __Pyx_TraceLine(1925,0,__PYX_ERR(0, 1925, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); @@ -70498,7 +66520,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_8__deepcopy__(struct LxmlE goto __pyx_L0; } - /* "lxml/etree.pyx":1906 + /* "lxml/etree.pyx":1904 * return _elementTreeFactory(self._doc, self._context_node) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -70517,12 +66539,11 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_8__deepcopy__(struct LxmlE __Pyx_XDECREF((PyObject *)__pyx_v_root); __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1930 +/* "lxml/etree.pyx":1928 * property docinfo: * u"""Information about the document provided by parser and DTD.""" * def __get__(self): # <<<<<<<<<<<<<< @@ -70545,39 +66566,35 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_7docinfo_1__get__(PyObject static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_7docinfo___get__(struct LxmlElementTree *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 1930, 0, __PYX_ERR(0, 1930, __pyx_L1_error)); - /* "lxml/etree.pyx":1931 + /* "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) * */ - __Pyx_TraceLine(1931,0,__PYX_ERR(0, 1931, __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, 1931, __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, 1929, __pyx_L1_error) - /* "lxml/etree.pyx":1932 + /* "lxml/etree.pyx":1930 * def __get__(self): * self._assertHasRoot() * return DocInfo(self._context_node._doc) # <<<<<<<<<<<<<< * * # not in ElementTree, read-only */ - __Pyx_TraceLine(1932,0,__PYX_ERR(0, 1932, __pyx_L1_error)) __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, 1932, __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, 1930, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1930 + /* "lxml/etree.pyx":1928 * property docinfo: * u"""Information about the document provided by parser and DTD.""" * def __get__(self): # <<<<<<<<<<<<<< @@ -70592,12 +66609,11 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_7docinfo___get__(struct Lx __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1938 +/* "lxml/etree.pyx":1936 * u"""The parser that was used to parse the document in this ElementTree. * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -70620,22 +66636,19 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_6parser_1__get__(PyObject static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_6parser___get__(struct LxmlElementTree *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 1938, 0, __PYX_ERR(0, 1938, __pyx_L1_error)); - /* "lxml/etree.pyx":1939 + /* "lxml/etree.pyx":1937 * """ * def __get__(self): * if self._context_node is not None and \ # <<<<<<<<<<<<<< * self._context_node._doc is not None: * return self._context_node._doc._parser */ - __Pyx_TraceLine(1939,0,__PYX_ERR(0, 1939, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)__pyx_v_self->_context_node) != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -70644,43 +66657,40 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_6parser___get__(struct Lxm goto __pyx_L4_bool_binop_done; } - /* "lxml/etree.pyx":1940 + /* "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: */ - __Pyx_TraceLine(1940,0,__PYX_ERR(0, 1940, __pyx_L1_error)) __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":1939 + /* "lxml/etree.pyx":1937 * """ * def __get__(self): * if self._context_node is not None and \ # <<<<<<<<<<<<<< * self._context_node._doc is not None: * return self._context_node._doc._parser */ - __Pyx_TraceLine(1939,0,__PYX_ERR(0, 1939, __pyx_L1_error)) if (__pyx_t_1) { - /* "lxml/etree.pyx":1941 + /* "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 */ - __Pyx_TraceLine(1941,0,__PYX_ERR(0, 1941, __pyx_L1_error)) __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":1939 + /* "lxml/etree.pyx":1937 * """ * def __get__(self): * if self._context_node is not None and \ # <<<<<<<<<<<<<< @@ -70689,32 +66699,30 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_6parser___get__(struct Lxm */ } - /* "lxml/etree.pyx":1942 + /* "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 */ - __Pyx_TraceLine(1942,0,__PYX_ERR(0, 1942, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_self->_doc) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1943 + /* "lxml/etree.pyx":1941 * return self._context_node._doc._parser * if self._doc is not None: * return self._doc._parser # <<<<<<<<<<<<<< * return None * */ - __Pyx_TraceLine(1943,0,__PYX_ERR(0, 1943, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->_doc->_parser)); __pyx_r = ((PyObject *)__pyx_v_self->_doc->_parser); goto __pyx_L0; - /* "lxml/etree.pyx":1942 + /* "lxml/etree.pyx":1940 * self._context_node._doc is not None: * return self._context_node._doc._parser * if self._doc is not None: # <<<<<<<<<<<<<< @@ -70723,19 +66731,18 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_6parser___get__(struct Lxm */ } - /* "lxml/etree.pyx":1944 + /* "lxml/etree.pyx":1942 * if self._doc is not None: * return self._doc._parser * return None # <<<<<<<<<<<<<< * * def write(self, file, *, encoding=None, method=u"xml", */ - __Pyx_TraceLine(1944,0,__PYX_ERR(0, 1944, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/etree.pyx":1938 + /* "lxml/etree.pyx":1936 * u"""The parser that was used to parse the document in this ElementTree. * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -70744,17 +66751,13 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_6parser___get__(struct Lxm */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._ElementTree.parser.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":1946 +/* "lxml/etree.pyx":1944 * return None * * def write(self, file, *, encoding=None, method=u"xml", # <<<<<<<<<<<<<< @@ -70765,7 +66768,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_6parser___get__(struct Lxm /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_11write(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_12_ElementTree_10write[] = "write(self, file, encoding=None, method=\"xml\",\n pretty_print=False, xml_declaration=None, with_tail=True,\n standalone=None, doctype=None, compression=0,\n exclusive=False, with_comments=True, inclusive_ns_prefixes=None)\n\n Write the tree to a filename, file or file-like object.\n\n Defaults to ASCII encoding and writing a declaration as needed.\n\n The keyword argument 'method' selects the output method:\n 'xml', 'html', 'text' or 'c14n'. Default is 'xml'.\n\n The ``exclusive`` and ``with_comments`` arguments are only\n used with C14N output, where they request exclusive and\n uncommented C14N serialisation respectively.\n\n Passing a boolean value to the ``standalone`` option will\n output an XML declaration with the corresponding\n ``standalone`` flag.\n\n The ``doctype`` option allows passing in a plain string that will\n be serialised before the XML tree. Note that passing in non\n well-formed content here will make the XML output non well-formed.\n Also, an existing doctype in the document tree will not be removed\n when serialising an ElementTree instance.\n\n The ``compression`` option enables GZip compression level 1-9.\n\n The ``inclusive_ns_prefixes`` should be a list of namespace strings\n (i.e. ['xs', 'xsi']) that will be promoted to the top-level element\n during exclusive C14N serialisation. This parameter is ignored if\n exclusive mode=False.\n\n If exclusive=True and no list is provided, a namespace will only be\n rendered if it is used by the immediate parent or one of its attributes\n and its prefix and values have not already been rendered by an ancestor\n of the namespace node's parent element.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_12_ElementTree_11write = {"write", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_11write, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_10write}; +static PyMethodDef __pyx_mdef_4lxml_5etree_12_ElementTree_11write = {"write", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ElementTree_11write, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_10write}; static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_11write(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_file = 0; PyObject *__pyx_v_encoding = 0; @@ -70789,7 +66792,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":1947 + /* "lxml/etree.pyx":1945 * * def write(self, file, *, encoding=None, method=u"xml", * pretty_print=False, xml_declaration=None, with_tail=True, # <<<<<<<<<<<<<< @@ -70800,7 +66803,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":1948 + /* "lxml/etree.pyx":1946 * def write(self, file, *, encoding=None, method=u"xml", * pretty_print=False, xml_declaration=None, with_tail=True, * standalone=None, doctype=None, compression=0, # <<<<<<<<<<<<<< @@ -70811,7 +66814,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":1949 + /* "lxml/etree.pyx":1947 * pretty_print=False, xml_declaration=None, with_tail=True, * standalone=None, doctype=None, compression=0, * exclusive=False, with_comments=True, inclusive_ns_prefixes=None, # <<<<<<<<<<<<<< @@ -70822,7 +66825,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":1950 + /* "lxml/etree.pyx":1948 * standalone=None, doctype=None, compression=0, * exclusive=False, with_comments=True, inclusive_ns_prefixes=None, * docstring=None): # <<<<<<<<<<<<<< @@ -70853,7 +66856,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, 1946, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write") < 0)) __PYX_ERR(0, 1944, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -70876,7 +66879,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, 1946, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("write", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1944, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._ElementTree.write", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -70884,7 +66887,7 @@ 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":1946 + /* "lxml/etree.pyx":1944 * return None * * def write(self, file, *, encoding=None, method=u"xml", # <<<<<<<<<<<<<< @@ -70902,7 +66905,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement int __pyx_v_is_standalone; PyObject *__pyx_v_warnings = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -70911,44 +66913,39 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__121) __Pyx_RefNannySetupContext("write", 0); - __Pyx_TraceCall("write", __pyx_f[0], 1946, 0, __PYX_ERR(0, 1946, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_encoding); __Pyx_INCREF(__pyx_v_doctype); __Pyx_INCREF(__pyx_v_compression); - /* "lxml/etree.pyx":1992 + /* "lxml/etree.pyx":1990 * cdef int is_standalone * * self._assertHasRoot() # <<<<<<<<<<<<<< * _assertValidNode(self._context_node) * if compression is None or compression < 0: */ - __Pyx_TraceLine(1992,0,__PYX_ERR(0, 1992, __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, 1992, __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, 1990, __pyx_L1_error) - /* "lxml/etree.pyx":1993 + /* "lxml/etree.pyx":1991 * * self._assertHasRoot() * _assertValidNode(self._context_node) # <<<<<<<<<<<<<< * if compression is None or compression < 0: * compression = 0 */ - __Pyx_TraceLine(1993,0,__PYX_ERR(0, 1993, __pyx_L1_error)) __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, 1993, __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, 1991, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":1994 + /* "lxml/etree.pyx":1992 * self._assertHasRoot() * _assertValidNode(self._context_node) * if compression is None or compression < 0: # <<<<<<<<<<<<<< * compression = 0 * */ - __Pyx_TraceLine(1994,0,__PYX_ERR(0, 1994, __pyx_L1_error)) __pyx_t_4 = (__pyx_v_compression == Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (!__pyx_t_5) { @@ -70956,25 +66953,24 @@ 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, 1994, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1994, __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, 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_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":1995 + /* "lxml/etree.pyx":1993 * _assertValidNode(self._context_node) * if compression is None or compression < 0: * compression = 0 # <<<<<<<<<<<<<< * * # C14N serialisation */ - __Pyx_TraceLine(1995,0,__PYX_ERR(0, 1995, __pyx_L1_error)) __Pyx_INCREF(__pyx_int_0); __Pyx_DECREF_SET(__pyx_v_compression, __pyx_int_0); - /* "lxml/etree.pyx":1994 + /* "lxml/etree.pyx":1992 * self._assertHasRoot() * _assertValidNode(self._context_node) * if compression is None or compression < 0: # <<<<<<<<<<<<<< @@ -70983,44 +66979,41 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement */ } - /* "lxml/etree.pyx":1998 + /* "lxml/etree.pyx":1996 * * # C14N serialisation * if method == 'c14n': # <<<<<<<<<<<<<< * if encoding is not None: * raise ValueError("Cannot specify encoding with C14N") */ - __Pyx_TraceLine(1998,0,__PYX_ERR(0, 1998, __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, 1998, __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, 1996, __pyx_L1_error) if (__pyx_t_3) { - /* "lxml/etree.pyx":1999 + /* "lxml/etree.pyx":1997 * # C14N serialisation * if method == 'c14n': * if encoding is not None: # <<<<<<<<<<<<<< * raise ValueError("Cannot specify encoding with C14N") * if xml_declaration: */ - __Pyx_TraceLine(1999,0,__PYX_ERR(0, 1999, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_encoding != Py_None); __pyx_t_5 = (__pyx_t_3 != 0); if (unlikely(__pyx_t_5)) { - /* "lxml/etree.pyx":2000 + /* "lxml/etree.pyx":1998 * 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_TraceLine(2000,0,__PYX_ERR(0, 2000, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__122, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2000, __pyx_L1_error) + __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_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, 1998, __pyx_L1_error) - /* "lxml/etree.pyx":1999 + /* "lxml/etree.pyx":1997 * # C14N serialisation * if method == 'c14n': * if encoding is not None: # <<<<<<<<<<<<<< @@ -71029,32 +67022,30 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement */ } - /* "lxml/etree.pyx":2001 + /* "lxml/etree.pyx":1999 * if encoding is not None: * raise ValueError("Cannot specify encoding with C14N") * if xml_declaration: # <<<<<<<<<<<<<< * raise ValueError("Cannot enable XML declaration in C14N") * */ - __Pyx_TraceLine(2001,0,__PYX_ERR(0, 2001, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_xml_declaration); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2001, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_xml_declaration); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1999, __pyx_L1_error) if (unlikely(__pyx_t_5)) { - /* "lxml/etree.pyx":2002 + /* "lxml/etree.pyx":2000 * 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_TraceLine(2002,0,__PYX_ERR(0, 2002, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__123, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2002, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 2002, __pyx_L1_error) + __PYX_ERR(0, 2000, __pyx_L1_error) - /* "lxml/etree.pyx":2001 + /* "lxml/etree.pyx":1999 * if encoding is not None: * raise ValueError("Cannot specify encoding with C14N") * if xml_declaration: # <<<<<<<<<<<<<< @@ -71063,55 +67054,51 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement */ } - /* "lxml/etree.pyx":2004 + /* "lxml/etree.pyx":2002 * raise ValueError("Cannot enable XML declaration in C14N") * * _tofilelikeC14N(file, self._context_node, exclusive, with_comments, # <<<<<<<<<<<<<< * compression, inclusive_ns_prefixes) * return */ - __Pyx_TraceLine(2004,0,__PYX_ERR(0, 2004, __pyx_L1_error)) __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, 2004, __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, 2004, __pyx_L1_error) + __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) - /* "lxml/etree.pyx":2005 + /* "lxml/etree.pyx":2003 * * _tofilelikeC14N(file, self._context_node, exclusive, with_comments, * compression, inclusive_ns_prefixes) # <<<<<<<<<<<<<< * return * if not with_comments: */ - __Pyx_TraceLine(2005,0,__PYX_ERR(0, 2005, __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, 2005, __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, 2003, __pyx_L1_error) - /* "lxml/etree.pyx":2004 + /* "lxml/etree.pyx":2002 * raise ValueError("Cannot enable XML declaration in C14N") * * _tofilelikeC14N(file, self._context_node, exclusive, with_comments, # <<<<<<<<<<<<<< * compression, inclusive_ns_prefixes) * return */ - __Pyx_TraceLine(2004,0,__PYX_ERR(0, 2004, __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, 2004, __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, 2002, __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":2006 + /* "lxml/etree.pyx":2004 * _tofilelikeC14N(file, self._context_node, exclusive, with_comments, * compression, inclusive_ns_prefixes) * return # <<<<<<<<<<<<<< * if not with_comments: * raise ValueError("Can only discard comments in C14N serialisation") */ - __Pyx_TraceLine(2006,0,__PYX_ERR(0, 2006, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/etree.pyx":1998 + /* "lxml/etree.pyx":1996 * * # C14N serialisation * if method == 'c14n': # <<<<<<<<<<<<<< @@ -71120,33 +67107,31 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement */ } - /* "lxml/etree.pyx":2007 + /* "lxml/etree.pyx":2005 * 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_TraceLine(2007,0,__PYX_ERR(0, 2007, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_with_comments); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2007, __pyx_L1_error) + __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_5 = ((!__pyx_t_3) != 0); if (unlikely(__pyx_t_5)) { - /* "lxml/etree.pyx":2008 + /* "lxml/etree.pyx":2006 * 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_TraceLine(2008,0,__PYX_ERR(0, 2008, __pyx_L1_error)) - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__124, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2008, __pyx_L1_error) + __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_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 2008, __pyx_L1_error) + __PYX_ERR(0, 2006, __pyx_L1_error) - /* "lxml/etree.pyx":2007 + /* "lxml/etree.pyx":2005 * compression, inclusive_ns_prefixes) * return * if not with_comments: # <<<<<<<<<<<<<< @@ -71155,53 +67140,49 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement */ } - /* "lxml/etree.pyx":2010 + /* "lxml/etree.pyx":2008 * raise ValueError("Can only discard comments in C14N serialisation") * # suppress decl. in default case (purely for ElementTree compatibility) * if xml_declaration is not None: # <<<<<<<<<<<<<< * write_declaration = xml_declaration * if encoding is None: */ - __Pyx_TraceLine(2010,0,__PYX_ERR(0, 2010, __pyx_L1_error)) __pyx_t_5 = (__pyx_v_xml_declaration != Py_None); __pyx_t_3 = (__pyx_t_5 != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2011 + /* "lxml/etree.pyx":2009 * # 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_TraceLine(2011,0,__PYX_ERR(0, 2011, __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, 2011, __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, 2009, __pyx_L1_error) __pyx_v_write_declaration = __pyx_t_3; - /* "lxml/etree.pyx":2012 + /* "lxml/etree.pyx":2010 * if xml_declaration is not None: * write_declaration = xml_declaration * if encoding is None: # <<<<<<<<<<<<<< * encoding = u'ASCII' * else: */ - __Pyx_TraceLine(2012,0,__PYX_ERR(0, 2012, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_encoding == Py_None); __pyx_t_5 = (__pyx_t_3 != 0); if (__pyx_t_5) { - /* "lxml/etree.pyx":2013 + /* "lxml/etree.pyx":2011 * write_declaration = xml_declaration * if encoding is None: * encoding = u'ASCII' # <<<<<<<<<<<<<< * else: * encoding = encoding.upper() */ - __Pyx_TraceLine(2013,0,__PYX_ERR(0, 2013, __pyx_L1_error)) __Pyx_INCREF(__pyx_n_u_ASCII); __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_n_u_ASCII); - /* "lxml/etree.pyx":2012 + /* "lxml/etree.pyx":2010 * if xml_declaration is not None: * write_declaration = xml_declaration * if encoding is None: # <<<<<<<<<<<<<< @@ -71211,16 +67192,15 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement goto __pyx_L11; } - /* "lxml/etree.pyx":2015 + /* "lxml/etree.pyx":2013 * encoding = u'ASCII' * else: * encoding = encoding.upper() # <<<<<<<<<<<<<< * elif encoding is None: * encoding = u'ASCII' */ - __Pyx_TraceLine(2015,0,__PYX_ERR(0, 2015, __pyx_L1_error)) /*else*/ { - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s_upper); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2015, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -71232,12 +67212,9 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_7) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2015, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else { - __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2015, __pyx_L1_error) - } + __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) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_t_6); @@ -71245,7 +67222,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement } __pyx_L11:; - /* "lxml/etree.pyx":2010 + /* "lxml/etree.pyx":2008 * raise ValueError("Can only discard comments in C14N serialisation") * # suppress decl. in default case (purely for ElementTree compatibility) * if xml_declaration is not None: # <<<<<<<<<<<<<< @@ -71255,40 +67232,37 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement goto __pyx_L10; } - /* "lxml/etree.pyx":2016 + /* "lxml/etree.pyx":2014 * else: * encoding = encoding.upper() * elif encoding is None: # <<<<<<<<<<<<<< * encoding = u'ASCII' * write_declaration = 0 */ - __Pyx_TraceLine(2016,0,__PYX_ERR(0, 2016, __pyx_L1_error)) __pyx_t_5 = (__pyx_v_encoding == Py_None); __pyx_t_3 = (__pyx_t_5 != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2017 + /* "lxml/etree.pyx":2015 * encoding = encoding.upper() * elif encoding is None: * encoding = u'ASCII' # <<<<<<<<<<<<<< * write_declaration = 0 * else: */ - __Pyx_TraceLine(2017,0,__PYX_ERR(0, 2017, __pyx_L1_error)) __Pyx_INCREF(__pyx_n_u_ASCII); __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_n_u_ASCII); - /* "lxml/etree.pyx":2018 + /* "lxml/etree.pyx":2016 * elif encoding is None: * encoding = u'ASCII' * write_declaration = 0 # <<<<<<<<<<<<<< * else: * encoding = encoding.upper() */ - __Pyx_TraceLine(2018,0,__PYX_ERR(0, 2018, __pyx_L1_error)) __pyx_v_write_declaration = 0; - /* "lxml/etree.pyx":2016 + /* "lxml/etree.pyx":2014 * else: * encoding = encoding.upper() * elif encoding is None: # <<<<<<<<<<<<<< @@ -71298,16 +67272,15 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement goto __pyx_L10; } - /* "lxml/etree.pyx":2020 + /* "lxml/etree.pyx":2018 * write_declaration = 0 * else: * encoding = encoding.upper() # <<<<<<<<<<<<<< * write_declaration = encoding not in \ * (u'US-ASCII', u'ASCII', u'UTF8', u'UTF-8') */ - __Pyx_TraceLine(2020,0,__PYX_ERR(0, 2020, __pyx_L1_error)) /*else*/ { - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s_upper); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2020, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -71319,46 +67292,42 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_7) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2020, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else { - __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2020, __pyx_L1_error) - } + __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) __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":2021 + /* "lxml/etree.pyx":2019 * else: * encoding = encoding.upper() * write_declaration = encoding not in \ # <<<<<<<<<<<<<< * (u'US-ASCII', u'ASCII', u'UTF8', u'UTF-8') * if standalone is None: */ - __Pyx_TraceLine(2021,0,__PYX_ERR(0, 2021, __pyx_L1_error)) __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, 2021, __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, 2019, __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, 2021, __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, 2019, __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, 2021, __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, 2019, __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, 2021, __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, 2019, __pyx_L1_error) __pyx_t_3 = __pyx_t_5; __pyx_L12_bool_binop_done:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -71366,29 +67335,27 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement } __pyx_L10:; - /* "lxml/etree.pyx":2023 + /* "lxml/etree.pyx":2021 * write_declaration = encoding not in \ * (u'US-ASCII', u'ASCII', u'UTF8', u'UTF-8') * if standalone is None: # <<<<<<<<<<<<<< * is_standalone = -1 * elif standalone: */ - __Pyx_TraceLine(2023,0,__PYX_ERR(0, 2023, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_standalone == Py_None); __pyx_t_5 = (__pyx_t_3 != 0); if (__pyx_t_5) { - /* "lxml/etree.pyx":2024 + /* "lxml/etree.pyx":2022 * (u'US-ASCII', u'ASCII', u'UTF8', u'UTF-8') * if standalone is None: * is_standalone = -1 # <<<<<<<<<<<<<< * elif standalone: * write_declaration = 1 */ - __Pyx_TraceLine(2024,0,__PYX_ERR(0, 2024, __pyx_L1_error)) __pyx_v_is_standalone = -1; - /* "lxml/etree.pyx":2023 + /* "lxml/etree.pyx":2021 * write_declaration = encoding not in \ * (u'US-ASCII', u'ASCII', u'UTF8', u'UTF-8') * if standalone is None: # <<<<<<<<<<<<<< @@ -71398,38 +67365,35 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement goto __pyx_L16; } - /* "lxml/etree.pyx":2025 + /* "lxml/etree.pyx":2023 * if standalone is None: * is_standalone = -1 * elif standalone: # <<<<<<<<<<<<<< * write_declaration = 1 * is_standalone = 1 */ - __Pyx_TraceLine(2025,0,__PYX_ERR(0, 2025, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_standalone); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2025, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_standalone); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2023, __pyx_L1_error) if (__pyx_t_5) { - /* "lxml/etree.pyx":2026 + /* "lxml/etree.pyx":2024 * is_standalone = -1 * elif standalone: * write_declaration = 1 # <<<<<<<<<<<<<< * is_standalone = 1 * else: */ - __Pyx_TraceLine(2026,0,__PYX_ERR(0, 2026, __pyx_L1_error)) __pyx_v_write_declaration = 1; - /* "lxml/etree.pyx":2027 + /* "lxml/etree.pyx":2025 * elif standalone: * write_declaration = 1 * is_standalone = 1 # <<<<<<<<<<<<<< * else: * write_declaration = 1 */ - __Pyx_TraceLine(2027,0,__PYX_ERR(0, 2027, __pyx_L1_error)) __pyx_v_is_standalone = 1; - /* "lxml/etree.pyx":2025 + /* "lxml/etree.pyx":2023 * if standalone is None: * is_standalone = -1 * elif standalone: # <<<<<<<<<<<<<< @@ -71439,37 +67403,34 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement goto __pyx_L16; } - /* "lxml/etree.pyx":2029 + /* "lxml/etree.pyx":2027 * is_standalone = 1 * else: * write_declaration = 1 # <<<<<<<<<<<<<< * is_standalone = 0 * */ - __Pyx_TraceLine(2029,0,__PYX_ERR(0, 2029, __pyx_L1_error)) /*else*/ { __pyx_v_write_declaration = 1; - /* "lxml/etree.pyx":2030 + /* "lxml/etree.pyx":2028 * else: * write_declaration = 1 * is_standalone = 0 # <<<<<<<<<<<<<< * * if docstring is not None and doctype is None: */ - __Pyx_TraceLine(2030,0,__PYX_ERR(0, 2030, __pyx_L1_error)) __pyx_v_is_standalone = 0; } __pyx_L16:; - /* "lxml/etree.pyx":2032 + /* "lxml/etree.pyx":2030 * is_standalone = 0 * * if docstring is not None and doctype is None: # <<<<<<<<<<<<<< * import warnings * warnings.warn( */ - __Pyx_TraceLine(2032,0,__PYX_ERR(0, 2032, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_docstring != Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { @@ -71483,55 +67444,51 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement __pyx_L18_bool_binop_done:; if (__pyx_t_5) { - /* "lxml/etree.pyx":2033 + /* "lxml/etree.pyx":2031 * * if docstring is not None and doctype is None: * import warnings # <<<<<<<<<<<<<< * warnings.warn( * "The 'docstring' option is deprecated. Use 'doctype' instead.", */ - __Pyx_TraceLine(2033,0,__PYX_ERR(0, 2033, __pyx_L1_error)) - __pyx_t_6 = __Pyx_Import(__pyx_n_s_warnings, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2033, __pyx_L1_error) + __pyx_t_6 = __Pyx_Import(__pyx_n_s_warnings, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_warnings = __pyx_t_6; __pyx_t_6 = 0; - /* "lxml/etree.pyx":2034 + /* "lxml/etree.pyx":2032 * if docstring is not None and doctype is None: * import warnings * warnings.warn( # <<<<<<<<<<<<<< * "The 'docstring' option is deprecated. Use 'doctype' instead.", * DeprecationWarning) */ - __Pyx_TraceLine(2034,0,__PYX_ERR(0, 2034, __pyx_L1_error)) - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_warnings, __pyx_n_s_warn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2034, __pyx_L1_error) + __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_GOTREF(__pyx_t_6); - /* "lxml/etree.pyx":2036 + /* "lxml/etree.pyx":2034 * warnings.warn( * "The 'docstring' option is deprecated. Use 'doctype' instead.", * DeprecationWarning) # <<<<<<<<<<<<<< * doctype = docstring * */ - __Pyx_TraceLine(2036,0,__PYX_ERR(0, 2036, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__125, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2034, __pyx_L1_error) + __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_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":2037 + /* "lxml/etree.pyx":2035 * "The 'docstring' option is deprecated. Use 'doctype' instead.", * DeprecationWarning) * doctype = docstring # <<<<<<<<<<<<<< * * _tofilelike(file, self._context_node, encoding, doctype, method, */ - __Pyx_TraceLine(2037,0,__PYX_ERR(0, 2037, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_docstring); __Pyx_DECREF_SET(__pyx_v_doctype, __pyx_v_docstring); - /* "lxml/etree.pyx":2032 + /* "lxml/etree.pyx":2030 * is_standalone = 0 * * if docstring is not None and doctype is None: # <<<<<<<<<<<<<< @@ -71540,52 +67497,48 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement */ } - /* "lxml/etree.pyx":2039 + /* "lxml/etree.pyx":2037 * doctype = docstring * * _tofilelike(file, self._context_node, encoding, doctype, method, # <<<<<<<<<<<<<< * write_declaration, 1, pretty_print, with_tail, * is_standalone, compression) */ - __Pyx_TraceLine(2039,0,__PYX_ERR(0, 2039, __pyx_L1_error)) __pyx_t_2 = ((PyObject *)__pyx_v_self->_context_node); __Pyx_INCREF(__pyx_t_2); - /* "lxml/etree.pyx":2040 + /* "lxml/etree.pyx":2038 * * _tofilelike(file, self._context_node, encoding, doctype, method, * write_declaration, 1, pretty_print, with_tail, # <<<<<<<<<<<<<< * is_standalone, compression) * */ - __Pyx_TraceLine(2040,0,__PYX_ERR(0, 2040, __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, 2040, __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, 2040, __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, 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) - /* "lxml/etree.pyx":2041 + /* "lxml/etree.pyx":2039 * _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_TraceLine(2041,0,__PYX_ERR(0, 2041, __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, 2041, __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, 2039, __pyx_L1_error) - /* "lxml/etree.pyx":2039 + /* "lxml/etree.pyx":2037 * doctype = docstring * * _tofilelike(file, self._context_node, encoding, doctype, method, # <<<<<<<<<<<<<< * write_declaration, 1, pretty_print, with_tail, * is_standalone, compression) */ - __Pyx_TraceLine(2039,0,__PYX_ERR(0, 2039, __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, 2039, __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, 2037, __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":1946 + /* "lxml/etree.pyx":1944 * return None * * def write(self, file, *, encoding=None, method=u"xml", # <<<<<<<<<<<<<< @@ -71608,12 +67561,11 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement __Pyx_XDECREF(__pyx_v_doctype); __Pyx_XDECREF(__pyx_v_compression); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2043 +/* "lxml/etree.pyx":2041 * is_standalone, compression) * * def getpath(self, _Element element not None): # <<<<<<<<<<<<<< @@ -71629,7 +67581,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, 2043, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_5etree__Element, 0, "element", 0))) __PYX_ERR(0, 2041, __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 */ @@ -71648,66 +67600,59 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_12getpath(struct LxmlEleme xmlChar *__pyx_v_c_path; PyObject *__pyx_v_path = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; xmlDoc *__pyx_t_5; - __Pyx_TraceFrameInit(__pyx_codeobj__126) __Pyx_RefNannySetupContext("getpath", 0); - __Pyx_TraceCall("getpath", __pyx_f[0], 2043, 0, __PYX_ERR(0, 2043, __pyx_L1_error)); - /* "lxml/etree.pyx":2058 + /* "lxml/etree.pyx":2056 * cdef _Element root * cdef xmlDoc* c_doc * _assertValidNode(element) # <<<<<<<<<<<<<< * if self._context_node is not None: * root = self._context_node */ - __Pyx_TraceLine(2058,0,__PYX_ERR(0, 2058, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2058, __pyx_L1_error) + __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) - /* "lxml/etree.pyx":2059 + /* "lxml/etree.pyx":2057 * cdef xmlDoc* c_doc * _assertValidNode(element) * if self._context_node is not None: # <<<<<<<<<<<<<< * root = self._context_node * doc = root._doc */ - __Pyx_TraceLine(2059,0,__PYX_ERR(0, 2059, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)__pyx_v_self->_context_node) != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2060 + /* "lxml/etree.pyx":2058 * _assertValidNode(element) * if self._context_node is not None: * root = self._context_node # <<<<<<<<<<<<<< * doc = root._doc * elif self._doc is not None: */ - __Pyx_TraceLine(2060,0,__PYX_ERR(0, 2060, __pyx_L1_error)) __pyx_t_4 = ((PyObject *)__pyx_v_self->_context_node); __Pyx_INCREF(__pyx_t_4); __pyx_v_root = ((struct LxmlElement *)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":2061 + /* "lxml/etree.pyx":2059 * if self._context_node is not None: * root = self._context_node * doc = root._doc # <<<<<<<<<<<<<< * elif self._doc is not None: * doc = self._doc */ - __Pyx_TraceLine(2061,0,__PYX_ERR(0, 2061, __pyx_L1_error)) __pyx_t_4 = ((PyObject *)__pyx_v_root->_doc); __Pyx_INCREF(__pyx_t_4); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":2059 + /* "lxml/etree.pyx":2057 * cdef xmlDoc* c_doc * _assertValidNode(element) * if self._context_node is not None: # <<<<<<<<<<<<<< @@ -71717,46 +67662,43 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_12getpath(struct LxmlEleme goto __pyx_L3; } - /* "lxml/etree.pyx":2062 + /* "lxml/etree.pyx":2060 * root = self._context_node * doc = root._doc * elif self._doc is not None: # <<<<<<<<<<<<<< * doc = self._doc * root = doc.getroot() */ - __Pyx_TraceLine(2062,0,__PYX_ERR(0, 2062, __pyx_L1_error)) __pyx_t_3 = (((PyObject *)__pyx_v_self->_doc) != Py_None); __pyx_t_2 = (__pyx_t_3 != 0); if (likely(__pyx_t_2)) { - /* "lxml/etree.pyx":2063 + /* "lxml/etree.pyx":2061 * doc = root._doc * elif self._doc is not None: * doc = self._doc # <<<<<<<<<<<<<< * root = doc.getroot() * else: */ - __Pyx_TraceLine(2063,0,__PYX_ERR(0, 2063, __pyx_L1_error)) __pyx_t_4 = ((PyObject *)__pyx_v_self->_doc); __Pyx_INCREF(__pyx_t_4); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":2064 + /* "lxml/etree.pyx":2062 * elif self._doc is not None: * doc = self._doc * root = doc.getroot() # <<<<<<<<<<<<<< * else: * raise ValueError, u"Element is not in this tree." */ - __Pyx_TraceLine(2064,0,__PYX_ERR(0, 2064, __pyx_L1_error)) - __pyx_t_4 = __pyx_f_4lxml_5etree_9_Document_getroot(__pyx_v_doc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2064, __pyx_L1_error) + __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_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, 2064, __pyx_L1_error) + 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) __pyx_v_root = ((struct LxmlElement *)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":2062 + /* "lxml/etree.pyx":2060 * root = self._context_node * doc = root._doc * elif self._doc is not None: # <<<<<<<<<<<<<< @@ -71766,64 +67708,59 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_12getpath(struct LxmlEleme goto __pyx_L3; } - /* "lxml/etree.pyx":2066 + /* "lxml/etree.pyx":2064 * root = doc.getroot() * else: * raise ValueError, u"Element is not in this tree." # <<<<<<<<<<<<<< * _assertValidDoc(doc) * _assertValidNode(root) */ - __Pyx_TraceLine(2066,0,__PYX_ERR(0, 2066, __pyx_L1_error)) /*else*/ { __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Element_is_not_in_this_tree, 0, 0); - __PYX_ERR(0, 2066, __pyx_L1_error) + __PYX_ERR(0, 2064, __pyx_L1_error) } __pyx_L3:; - /* "lxml/etree.pyx":2067 + /* "lxml/etree.pyx":2065 * else: * raise ValueError, u"Element is not in this tree." * _assertValidDoc(doc) # <<<<<<<<<<<<<< * _assertValidNode(root) * if element._doc is not doc: */ - __Pyx_TraceLine(2067,0,__PYX_ERR(0, 2067, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidDoc(__pyx_v_doc); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2067, __pyx_L1_error) + __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) - /* "lxml/etree.pyx":2068 + /* "lxml/etree.pyx":2066 * 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_TraceLine(2068,0,__PYX_ERR(0, 2068, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_root); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2068, __pyx_L1_error) + __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) - /* "lxml/etree.pyx":2069 + /* "lxml/etree.pyx":2067 * _assertValidDoc(doc) * _assertValidNode(root) * if element._doc is not doc: # <<<<<<<<<<<<<< * raise ValueError, u"Element is not in this tree." * */ - __Pyx_TraceLine(2069,0,__PYX_ERR(0, 2069, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_element->_doc != __pyx_v_doc); __pyx_t_3 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_3)) { - /* "lxml/etree.pyx":2070 + /* "lxml/etree.pyx":2068 * _assertValidNode(root) * if element._doc is not doc: * raise ValueError, u"Element is not in this tree." # <<<<<<<<<<<<<< * * c_doc = _fakeRootDoc(doc._c_doc, root._c_node) */ - __Pyx_TraceLine(2070,0,__PYX_ERR(0, 2070, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Element_is_not_in_this_tree, 0, 0); - __PYX_ERR(0, 2070, __pyx_L1_error) + __PYX_ERR(0, 2068, __pyx_L1_error) - /* "lxml/etree.pyx":2069 + /* "lxml/etree.pyx":2067 * _assertValidDoc(doc) * _assertValidNode(root) * if element._doc is not doc: # <<<<<<<<<<<<<< @@ -71832,59 +67769,54 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_12getpath(struct LxmlEleme */ } - /* "lxml/etree.pyx":2072 + /* "lxml/etree.pyx":2070 * 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_TraceLine(2072,0,__PYX_ERR(0, 2072, __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, 2072, __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, 2070, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_5; - /* "lxml/etree.pyx":2073 + /* "lxml/etree.pyx":2071 * * c_doc = _fakeRootDoc(doc._c_doc, root._c_node) * c_path = tree.xmlGetNodePath(element._c_node) # <<<<<<<<<<<<<< * _destroyFakeDoc(doc._c_doc, c_doc) * if c_path is NULL: */ - __Pyx_TraceLine(2073,0,__PYX_ERR(0, 2073, __pyx_L1_error)) __pyx_v_c_path = xmlGetNodePath(__pyx_v_element->_c_node); - /* "lxml/etree.pyx":2074 + /* "lxml/etree.pyx":2072 * c_doc = _fakeRootDoc(doc._c_doc, root._c_node) * c_path = tree.xmlGetNodePath(element._c_node) * _destroyFakeDoc(doc._c_doc, c_doc) # <<<<<<<<<<<<<< * if c_path is NULL: * raise MemoryError() */ - __Pyx_TraceLine(2074,0,__PYX_ERR(0, 2074, __pyx_L1_error)) __pyx_f_4lxml_5etree__destroyFakeDoc(__pyx_v_doc->_c_doc, __pyx_v_c_doc); - /* "lxml/etree.pyx":2075 + /* "lxml/etree.pyx":2073 * c_path = tree.xmlGetNodePath(element._c_node) * _destroyFakeDoc(doc._c_doc, c_doc) * if c_path is NULL: # <<<<<<<<<<<<<< * raise MemoryError() * path = funicode(c_path) */ - __Pyx_TraceLine(2075,0,__PYX_ERR(0, 2075, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_path == NULL) != 0); if (unlikely(__pyx_t_3)) { - /* "lxml/etree.pyx":2076 + /* "lxml/etree.pyx":2074 * _destroyFakeDoc(doc._c_doc, c_doc) * if c_path is NULL: * raise MemoryError() # <<<<<<<<<<<<<< * path = funicode(c_path) * tree.xmlFree(c_path) */ - __Pyx_TraceLine(2076,0,__PYX_ERR(0, 2076, __pyx_L1_error)) - PyErr_NoMemory(); __PYX_ERR(0, 2076, __pyx_L1_error) + PyErr_NoMemory(); __PYX_ERR(0, 2074, __pyx_L1_error) - /* "lxml/etree.pyx":2075 + /* "lxml/etree.pyx":2073 * c_path = tree.xmlGetNodePath(element._c_node) * _destroyFakeDoc(doc._c_doc, c_doc) * if c_path is NULL: # <<<<<<<<<<<<<< @@ -71893,43 +67825,40 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_12getpath(struct LxmlEleme */ } - /* "lxml/etree.pyx":2077 + /* "lxml/etree.pyx":2075 * if c_path is NULL: * raise MemoryError() * path = funicode(c_path) # <<<<<<<<<<<<<< * tree.xmlFree(c_path) * return path */ - __Pyx_TraceLine(2077,0,__PYX_ERR(0, 2077, __pyx_L1_error)) - __pyx_t_4 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2077, __pyx_L1_error) + __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_GOTREF(__pyx_t_4); __pyx_v_path = __pyx_t_4; __pyx_t_4 = 0; - /* "lxml/etree.pyx":2078 + /* "lxml/etree.pyx":2076 * raise MemoryError() * path = funicode(c_path) * tree.xmlFree(c_path) # <<<<<<<<<<<<<< * return path * */ - __Pyx_TraceLine(2078,0,__PYX_ERR(0, 2078, __pyx_L1_error)) xmlFree(__pyx_v_c_path); - /* "lxml/etree.pyx":2079 + /* "lxml/etree.pyx":2077 * path = funicode(c_path) * tree.xmlFree(c_path) * return path # <<<<<<<<<<<<<< * * def getelementpath(self, _Element element not None): */ - __Pyx_TraceLine(2079,0,__PYX_ERR(0, 2079, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_path); __pyx_r = __pyx_v_path; goto __pyx_L0; - /* "lxml/etree.pyx":2043 + /* "lxml/etree.pyx":2041 * is_standalone, compression) * * def getpath(self, _Element element not None): # <<<<<<<<<<<<<< @@ -71947,12 +67876,11 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_12getpath(struct LxmlEleme __Pyx_XDECREF((PyObject *)__pyx_v_root); __Pyx_XDECREF(__pyx_v_path); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2081 +/* "lxml/etree.pyx":2079 * return path * * def getelementpath(self, _Element element not None): # <<<<<<<<<<<<<< @@ -71968,7 +67896,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, 2081, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_5etree__Element, 0, "element", 0))) __PYX_ERR(0, 2079, __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 */ @@ -71990,7 +67918,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx PyObject *__pyx_v_tag = NULL; xmlNode *__pyx_v_c_node; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -72002,43 +67929,38 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx Py_UCS4 __pyx_t_8; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; - __Pyx_TraceFrameInit(__pyx_codeobj__127) __Pyx_RefNannySetupContext("getelementpath", 0); - __Pyx_TraceCall("getelementpath", __pyx_f[0], 2081, 0, __PYX_ERR(0, 2081, __pyx_L1_error)); - /* "lxml/etree.pyx":2095 + /* "lxml/etree.pyx":2093 * 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_TraceLine(2095,0,__PYX_ERR(0, 2095, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2095, __pyx_L1_error) + __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) - /* "lxml/etree.pyx":2096 + /* "lxml/etree.pyx":2094 * cdef Py_ssize_t count * _assertValidNode(element) * if element._c_node.type != tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< * raise ValueError, u"input is not an Element" * if self._context_node is not None: */ - __Pyx_TraceLine(2096,0,__PYX_ERR(0, 2096, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_element->_c_node->type != XML_ELEMENT_NODE) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":2097 + /* "lxml/etree.pyx":2095 * _assertValidNode(element) * if element._c_node.type != tree.XML_ELEMENT_NODE: * raise ValueError, u"input is not an Element" # <<<<<<<<<<<<<< * if self._context_node is not None: * root = self._context_node */ - __Pyx_TraceLine(2097,0,__PYX_ERR(0, 2097, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_input_is_not_an_Element, 0, 0); - __PYX_ERR(0, 2097, __pyx_L1_error) + __PYX_ERR(0, 2095, __pyx_L1_error) - /* "lxml/etree.pyx":2096 + /* "lxml/etree.pyx":2094 * cdef Py_ssize_t count * _assertValidNode(element) * if element._c_node.type != tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< @@ -72047,32 +67969,30 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx */ } - /* "lxml/etree.pyx":2098 + /* "lxml/etree.pyx":2096 * if element._c_node.type != tree.XML_ELEMENT_NODE: * raise ValueError, u"input is not an Element" * if self._context_node is not None: # <<<<<<<<<<<<<< * root = self._context_node * elif self._doc is not None: */ - __Pyx_TraceLine(2098,0,__PYX_ERR(0, 2098, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)__pyx_v_self->_context_node) != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2099 + /* "lxml/etree.pyx":2097 * raise ValueError, u"input is not an Element" * if self._context_node is not None: * root = self._context_node # <<<<<<<<<<<<<< * elif self._doc is not None: * root = self._doc.getroot() */ - __Pyx_TraceLine(2099,0,__PYX_ERR(0, 2099, __pyx_L1_error)) __pyx_t_4 = ((PyObject *)__pyx_v_self->_context_node); __Pyx_INCREF(__pyx_t_4); __pyx_v_root = ((struct LxmlElement *)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":2098 + /* "lxml/etree.pyx":2096 * if element._c_node.type != tree.XML_ELEMENT_NODE: * raise ValueError, u"input is not an Element" * if self._context_node is not None: # <<<<<<<<<<<<<< @@ -72082,33 +68002,31 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx goto __pyx_L4; } - /* "lxml/etree.pyx":2100 + /* "lxml/etree.pyx":2098 * if self._context_node is not None: * root = self._context_node * elif self._doc is not None: # <<<<<<<<<<<<<< * root = self._doc.getroot() * else: */ - __Pyx_TraceLine(2100,0,__PYX_ERR(0, 2100, __pyx_L1_error)) __pyx_t_3 = (((PyObject *)__pyx_v_self->_doc) != Py_None); __pyx_t_2 = (__pyx_t_3 != 0); if (likely(__pyx_t_2)) { - /* "lxml/etree.pyx":2101 + /* "lxml/etree.pyx":2099 * 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_TraceLine(2101,0,__PYX_ERR(0, 2101, __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, 2101, __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, 2099, __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, 2101, __pyx_L1_error) + 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) __pyx_v_root = ((struct LxmlElement *)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":2100 + /* "lxml/etree.pyx":2098 * if self._context_node is not None: * root = self._context_node * elif self._doc is not None: # <<<<<<<<<<<<<< @@ -72118,54 +68036,50 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx goto __pyx_L4; } - /* "lxml/etree.pyx":2103 + /* "lxml/etree.pyx":2101 * root = self._doc.getroot() * else: * raise ValueError, u"Element is not in this tree" # <<<<<<<<<<<<<< * _assertValidNode(root) * if element._doc is not root._doc: */ - __Pyx_TraceLine(2103,0,__PYX_ERR(0, 2103, __pyx_L1_error)) /*else*/ { __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Element_is_not_in_this_tree_2, 0, 0); - __PYX_ERR(0, 2103, __pyx_L1_error) + __PYX_ERR(0, 2101, __pyx_L1_error) } __pyx_L4:; - /* "lxml/etree.pyx":2104 + /* "lxml/etree.pyx":2102 * 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_TraceLine(2104,0,__PYX_ERR(0, 2104, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_root); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2104, __pyx_L1_error) + __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) - /* "lxml/etree.pyx":2105 + /* "lxml/etree.pyx":2103 * 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_TraceLine(2105,0,__PYX_ERR(0, 2105, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_element->_doc != __pyx_v_root->_doc); __pyx_t_3 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_3)) { - /* "lxml/etree.pyx":2106 + /* "lxml/etree.pyx":2104 * _assertValidNode(root) * if element._doc is not root._doc: * raise ValueError, u"Element is not in this tree" # <<<<<<<<<<<<<< * * path = [] */ - __Pyx_TraceLine(2106,0,__PYX_ERR(0, 2106, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Element_is_not_in_this_tree_2, 0, 0); - __PYX_ERR(0, 2106, __pyx_L1_error) + __PYX_ERR(0, 2104, __pyx_L1_error) - /* "lxml/etree.pyx":2105 + /* "lxml/etree.pyx":2103 * raise ValueError, u"Element is not in this tree" * _assertValidNode(root) * if element._doc is not root._doc: # <<<<<<<<<<<<<< @@ -72174,98 +68088,90 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx */ } - /* "lxml/etree.pyx":2108 + /* "lxml/etree.pyx":2106 * raise ValueError, u"Element is not in this tree" * * path = [] # <<<<<<<<<<<<<< * c_element = element._c_node * while c_element is not root._c_node: */ - __Pyx_TraceLine(2108,0,__PYX_ERR(0, 2108, __pyx_L1_error)) - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2108, __pyx_L1_error) + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_path = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":2109 + /* "lxml/etree.pyx":2107 * * path = [] * c_element = element._c_node # <<<<<<<<<<<<<< * while c_element is not root._c_node: * c_name = c_element.name */ - __Pyx_TraceLine(2109,0,__PYX_ERR(0, 2109, __pyx_L1_error)) __pyx_t_5 = __pyx_v_element->_c_node; __pyx_v_c_element = __pyx_t_5; - /* "lxml/etree.pyx":2110 + /* "lxml/etree.pyx":2108 * path = [] * c_element = element._c_node * while c_element is not root._c_node: # <<<<<<<<<<<<<< * c_name = c_element.name * c_href = _getNs(c_element) */ - __Pyx_TraceLine(2110,0,__PYX_ERR(0, 2110, __pyx_L1_error)) while (1) { __pyx_t_3 = ((__pyx_v_c_element != __pyx_v_root->_c_node) != 0); if (!__pyx_t_3) break; - /* "lxml/etree.pyx":2111 + /* "lxml/etree.pyx":2109 * c_element = element._c_node * while c_element is not root._c_node: * c_name = c_element.name # <<<<<<<<<<<<<< * c_href = _getNs(c_element) * tag = _namespacedNameFromNsName(c_href, c_name) */ - __Pyx_TraceLine(2111,0,__PYX_ERR(0, 2111, __pyx_L1_error)) __pyx_t_6 = __pyx_v_c_element->name; __pyx_v_c_name = __pyx_t_6; - /* "lxml/etree.pyx":2112 + /* "lxml/etree.pyx":2110 * while c_element is not root._c_node: * c_name = c_element.name * c_href = _getNs(c_element) # <<<<<<<<<<<<<< * tag = _namespacedNameFromNsName(c_href, c_name) * if c_href is NULL: */ - __Pyx_TraceLine(2112,0,__PYX_ERR(0, 2112, __pyx_L1_error)) __pyx_v_c_href = _getNs(__pyx_v_c_element); - /* "lxml/etree.pyx":2113 + /* "lxml/etree.pyx":2111 * 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_TraceLine(2113,0,__PYX_ERR(0, 2113, __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, 2113, __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, 2111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_tag, __pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":2114 + /* "lxml/etree.pyx":2112 * c_href = _getNs(c_element) * tag = _namespacedNameFromNsName(c_href, c_name) * if c_href is NULL: # <<<<<<<<<<<<<< * c_href = b'' # no namespace (NULL is wildcard) * # use tag[N] if there are preceding siblings with the same tag */ - __Pyx_TraceLine(2114,0,__PYX_ERR(0, 2114, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_href == NULL) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2115 + /* "lxml/etree.pyx":2113 * tag = _namespacedNameFromNsName(c_href, c_name) * if c_href is NULL: * c_href = b'' # no namespace (NULL is wildcard) # <<<<<<<<<<<<<< * # use tag[N] if there are preceding siblings with the same tag * count = 0 */ - __Pyx_TraceLine(2115,0,__PYX_ERR(0, 2115, __pyx_L1_error)) __pyx_v_c_href = ((const xmlChar *)((const xmlChar *)((char const *)""))); - /* "lxml/etree.pyx":2114 + /* "lxml/etree.pyx":2112 * c_href = _getNs(c_element) * tag = _namespacedNameFromNsName(c_href, c_name) * if c_href is NULL: # <<<<<<<<<<<<<< @@ -72274,72 +68180,66 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx */ } - /* "lxml/etree.pyx":2117 + /* "lxml/etree.pyx":2115 * c_href = b'' # no namespace (NULL is wildcard) * # use tag[N] if there are preceding siblings with the same tag * count = 0 # <<<<<<<<<<<<<< * c_node = c_element.prev * while c_node is not NULL: */ - __Pyx_TraceLine(2117,0,__PYX_ERR(0, 2117, __pyx_L1_error)) __pyx_v_count = 0; - /* "lxml/etree.pyx":2118 + /* "lxml/etree.pyx":2116 * # use tag[N] if there are preceding siblings with the same tag * count = 0 * c_node = c_element.prev # <<<<<<<<<<<<<< * while c_node is not NULL: * if c_node.type == tree.XML_ELEMENT_NODE: */ - __Pyx_TraceLine(2118,0,__PYX_ERR(0, 2118, __pyx_L1_error)) __pyx_t_5 = __pyx_v_c_element->prev; __pyx_v_c_node = __pyx_t_5; - /* "lxml/etree.pyx":2119 + /* "lxml/etree.pyx":2117 * count = 0 * c_node = c_element.prev * while c_node is not NULL: # <<<<<<<<<<<<<< * if c_node.type == tree.XML_ELEMENT_NODE: * if _tagMatches(c_node, c_href, c_name): */ - __Pyx_TraceLine(2119,0,__PYX_ERR(0, 2119, __pyx_L1_error)) while (1) { __pyx_t_3 = ((__pyx_v_c_node != NULL) != 0); if (!__pyx_t_3) break; - /* "lxml/etree.pyx":2120 + /* "lxml/etree.pyx":2118 * c_node = c_element.prev * while c_node is not NULL: * if c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< * if _tagMatches(c_node, c_href, c_name): * count += 1 */ - __Pyx_TraceLine(2120,0,__PYX_ERR(0, 2120, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2121 + /* "lxml/etree.pyx":2119 * while c_node is not NULL: * if c_node.type == tree.XML_ELEMENT_NODE: * if _tagMatches(c_node, c_href, c_name): # <<<<<<<<<<<<<< * count += 1 * c_node = c_node.prev */ - __Pyx_TraceLine(2121,0,__PYX_ERR(0, 2121, __pyx_L1_error)) __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":2122 + /* "lxml/etree.pyx":2120 * if c_node.type == tree.XML_ELEMENT_NODE: * if _tagMatches(c_node, c_href, c_name): * count += 1 # <<<<<<<<<<<<<< * c_node = c_node.prev * if count: */ - __Pyx_TraceLine(2122,0,__PYX_ERR(0, 2122, __pyx_L1_error)) __pyx_v_count = (__pyx_v_count + 1); - /* "lxml/etree.pyx":2121 + /* "lxml/etree.pyx":2119 * while c_node is not NULL: * if c_node.type == tree.XML_ELEMENT_NODE: * if _tagMatches(c_node, c_href, c_name): # <<<<<<<<<<<<<< @@ -72348,7 +68248,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx */ } - /* "lxml/etree.pyx":2120 + /* "lxml/etree.pyx":2118 * c_node = c_element.prev * while c_node is not NULL: * if c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< @@ -72357,69 +68257,66 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx */ } - /* "lxml/etree.pyx":2123 + /* "lxml/etree.pyx":2121 * if _tagMatches(c_node, c_href, c_name): * count += 1 * c_node = c_node.prev # <<<<<<<<<<<<<< * if count: * tag = f'{tag}[{count+1}]' */ - __Pyx_TraceLine(2123,0,__PYX_ERR(0, 2123, __pyx_L1_error)) __pyx_t_5 = __pyx_v_c_node->prev; __pyx_v_c_node = __pyx_t_5; } - /* "lxml/etree.pyx":2124 + /* "lxml/etree.pyx":2122 * count += 1 * c_node = c_node.prev * if count: # <<<<<<<<<<<<<< * tag = f'{tag}[{count+1}]' * else: */ - __Pyx_TraceLine(2124,0,__PYX_ERR(0, 2124, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_count != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2125 + /* "lxml/etree.pyx":2123 * 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_TraceLine(2125,0,__PYX_ERR(0, 2125, __pyx_L1_error)) - __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2125, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2123, __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, 2125, __pyx_L1_error) + __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_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); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9); __pyx_t_9 = 0; - __Pyx_INCREF(__pyx_kp_u__128); + __Pyx_INCREF(__pyx_kp_u__36); __pyx_t_7 += 1; - __Pyx_GIVEREF(__pyx_kp_u__128); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_u__128); - __pyx_t_9 = __Pyx_PyUnicode_From_Py_ssize_t((__pyx_v_count + 1), 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2125, __pyx_L1_error) + __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_GOTREF(__pyx_t_9); __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_9); __pyx_t_9 = 0; - __Pyx_INCREF(__pyx_kp_u__129); + __Pyx_INCREF(__pyx_kp_u__37); __pyx_t_7 += 1; - __Pyx_GIVEREF(__pyx_kp_u__129); - PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_kp_u__129); - __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2125, __pyx_L1_error) + __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_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":2124 + /* "lxml/etree.pyx":2122 * count += 1 * c_node = c_node.prev * if count: # <<<<<<<<<<<<<< @@ -72429,76 +68326,70 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx goto __pyx_L13; } - /* "lxml/etree.pyx":2128 + /* "lxml/etree.pyx":2126 * else: * # use tag[1] if there are following siblings with the same tag * c_node = c_element.next # <<<<<<<<<<<<<< * while c_node is not NULL: * if c_node.type == tree.XML_ELEMENT_NODE: */ - __Pyx_TraceLine(2128,0,__PYX_ERR(0, 2128, __pyx_L1_error)) /*else*/ { __pyx_t_5 = __pyx_v_c_element->next; __pyx_v_c_node = __pyx_t_5; - /* "lxml/etree.pyx":2129 + /* "lxml/etree.pyx":2127 * # use tag[1] if there are following siblings with the same tag * c_node = c_element.next * while c_node is not NULL: # <<<<<<<<<<<<<< * if c_node.type == tree.XML_ELEMENT_NODE: * if _tagMatches(c_node, c_href, c_name): */ - __Pyx_TraceLine(2129,0,__PYX_ERR(0, 2129, __pyx_L1_error)) while (1) { __pyx_t_3 = ((__pyx_v_c_node != NULL) != 0); if (!__pyx_t_3) break; - /* "lxml/etree.pyx":2130 + /* "lxml/etree.pyx":2128 * c_node = c_element.next * while c_node is not NULL: * if c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< * if _tagMatches(c_node, c_href, c_name): * tag += '[1]' */ - __Pyx_TraceLine(2130,0,__PYX_ERR(0, 2130, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2131 + /* "lxml/etree.pyx":2129 * while c_node is not NULL: * if c_node.type == tree.XML_ELEMENT_NODE: * if _tagMatches(c_node, c_href, c_name): # <<<<<<<<<<<<<< * tag += '[1]' * break */ - __Pyx_TraceLine(2131,0,__PYX_ERR(0, 2131, __pyx_L1_error)) __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":2132 + /* "lxml/etree.pyx":2130 * 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_TraceLine(2132,0,__PYX_ERR(0, 2132, __pyx_L1_error)) - __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_v_tag, __pyx_kp_s_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2132, __pyx_L1_error) + __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_GOTREF(__pyx_t_9); __Pyx_DECREF_SET(__pyx_v_tag, __pyx_t_9); __pyx_t_9 = 0; - /* "lxml/etree.pyx":2133 + /* "lxml/etree.pyx":2131 * if _tagMatches(c_node, c_href, c_name): * tag += '[1]' * break # <<<<<<<<<<<<<< * c_node = c_node.next * */ - __Pyx_TraceLine(2133,0,__PYX_ERR(0, 2133, __pyx_L1_error)) goto __pyx_L15_break; - /* "lxml/etree.pyx":2131 + /* "lxml/etree.pyx":2129 * while c_node is not NULL: * if c_node.type == tree.XML_ELEMENT_NODE: * if _tagMatches(c_node, c_href, c_name): # <<<<<<<<<<<<<< @@ -72507,7 +68398,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx */ } - /* "lxml/etree.pyx":2130 + /* "lxml/etree.pyx":2128 * c_node = c_element.next * while c_node is not NULL: * if c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< @@ -72516,14 +68407,13 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx */ } - /* "lxml/etree.pyx":2134 + /* "lxml/etree.pyx":2132 * tag += '[1]' * break * c_node = c_node.next # <<<<<<<<<<<<<< * * path.append(tag) */ - __Pyx_TraceLine(2134,0,__PYX_ERR(0, 2134, __pyx_L1_error)) __pyx_t_5 = __pyx_v_c_node->next; __pyx_v_c_node = __pyx_t_5; } @@ -72531,35 +68421,32 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx } __pyx_L13:; - /* "lxml/etree.pyx":2136 + /* "lxml/etree.pyx":2134 * 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_TraceLine(2136,0,__PYX_ERR(0, 2136, __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, 2136, __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, 2134, __pyx_L1_error) - /* "lxml/etree.pyx":2137 + /* "lxml/etree.pyx":2135 * * path.append(tag) * 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." */ - __Pyx_TraceLine(2137,0,__PYX_ERR(0, 2137, __pyx_L1_error)) __pyx_t_5 = __pyx_v_c_element->parent; __pyx_v_c_element = __pyx_t_5; - /* "lxml/etree.pyx":2138 + /* "lxml/etree.pyx":2136 * path.append(tag) * 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." * if not path: */ - __Pyx_TraceLine(2138,0,__PYX_ERR(0, 2138, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_element == NULL) != 0); if (!__pyx_t_2) { } else { @@ -72571,18 +68458,17 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __pyx_L19_bool_binop_done:; if (unlikely(__pyx_t_3)) { - /* "lxml/etree.pyx":2139 + /* "lxml/etree.pyx":2137 * 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." # <<<<<<<<<<<<<< * if not path: * return '.' */ - __Pyx_TraceLine(2139,0,__PYX_ERR(0, 2139, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Element_is_not_in_this_tree, 0, 0); - __PYX_ERR(0, 2139, __pyx_L1_error) + __PYX_ERR(0, 2137, __pyx_L1_error) - /* "lxml/etree.pyx":2138 + /* "lxml/etree.pyx":2136 * path.append(tag) * c_element = c_element.parent * if c_element is NULL or c_element.type != tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< @@ -72592,32 +68478,30 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx } } - /* "lxml/etree.pyx":2140 + /* "lxml/etree.pyx":2138 * 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: # <<<<<<<<<<<<<< * return '.' * path.reverse() */ - __Pyx_TraceLine(2140,0,__PYX_ERR(0, 2140, __pyx_L1_error)) __pyx_t_3 = (PyList_GET_SIZE(__pyx_v_path) != 0); __pyx_t_2 = ((!__pyx_t_3) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":2141 + /* "lxml/etree.pyx":2139 * raise ValueError, u"Element is not in this tree." * if not path: * return '.' # <<<<<<<<<<<<<< * path.reverse() * return '/'.join(path) */ - __Pyx_TraceLine(2141,0,__PYX_ERR(0, 2141, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_kp_s__11); - __pyx_r = __pyx_kp_s__11; + __Pyx_INCREF(__pyx_kp_s__3); + __pyx_r = __pyx_kp_s__3; goto __pyx_L0; - /* "lxml/etree.pyx":2140 + /* "lxml/etree.pyx":2138 * 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: # <<<<<<<<<<<<<< @@ -72626,32 +68510,30 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx */ } - /* "lxml/etree.pyx":2142 + /* "lxml/etree.pyx":2140 * if not path: * return '.' * path.reverse() # <<<<<<<<<<<<<< * return '/'.join(path) * */ - __Pyx_TraceLine(2142,0,__PYX_ERR(0, 2142, __pyx_L1_error)) - __pyx_t_10 = PyList_Reverse(__pyx_v_path); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2142, __pyx_L1_error) + __pyx_t_10 = PyList_Reverse(__pyx_v_path); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2140, __pyx_L1_error) - /* "lxml/etree.pyx":2143 + /* "lxml/etree.pyx":2141 * return '.' * path.reverse() * return '/'.join(path) # <<<<<<<<<<<<<< * * def getiterator(self, tag=None, *tags): */ - __Pyx_TraceLine(2143,0,__PYX_ERR(0, 2143, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_9 = __Pyx_PyString_Join(__pyx_kp_s__130, __pyx_v_path); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2143, __pyx_L1_error) + __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_GOTREF(__pyx_t_9); __pyx_r = __pyx_t_9; __pyx_t_9 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2081 + /* "lxml/etree.pyx":2079 * return path * * def getelementpath(self, _Element element not None): # <<<<<<<<<<<<<< @@ -72670,12 +68552,11 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __Pyx_XDECREF(__pyx_v_path); __Pyx_XDECREF(__pyx_v_tag); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2145 +/* "lxml/etree.pyx":2143 * return '/'.join(path) * * def getiterator(self, tag=None, *tags): # <<<<<<<<<<<<<< @@ -72686,7 +68567,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_17getiterator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_12_ElementTree_16getiterator[] = "getiterator(self, *tags, tag=None)\n\n Returns a sequence or iterator of all elements in document order\n (depth first pre-order), starting with the root element.\n\n Can be restricted to find only elements with specific tags,\n see `_Element.iter`.\n\n :deprecated: Note that this method is deprecated as of\n ElementTree 1.3 and lxml 2.0. It returns an iterator in\n lxml, which diverges from the original ElementTree\n behaviour. If you want an efficient iterator, use the\n ``tree.iter()`` method instead. You should only use this\n method in new code if you require backwards compatibility\n with older versions of lxml or ElementTree.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_12_ElementTree_17getiterator = {"getiterator", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_17getiterator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_16getiterator}; +static PyMethodDef __pyx_mdef_4lxml_5etree_12_ElementTree_17getiterator = {"getiterator", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ElementTree_17getiterator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_16getiterator}; static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_17getiterator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tag = 0; PyObject *__pyx_v_tags = 0; @@ -72726,7 +68607,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, 2145, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "getiterator") < 0)) __PYX_ERR(0, 2143, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -72756,27 +68637,23 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_17getiterator(PyObject *__ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_16getiterator(struct LxmlElementTree *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_tags) { PyObject *__pyx_v_root = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; - __Pyx_TraceFrameInit(__pyx_codeobj__131) __Pyx_RefNannySetupContext("getiterator", 0); - __Pyx_TraceCall("getiterator", __pyx_f[0], 2145, 0, __PYX_ERR(0, 2145, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_tags); - /* "lxml/etree.pyx":2162 + /* "lxml/etree.pyx":2160 * with older versions of lxml or ElementTree. * """ * root = self.getroot() # <<<<<<<<<<<<<< * if root is None: * return ITER_EMPTY */ - __Pyx_TraceLine(2162,0,__PYX_ERR(0, 2162, __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, 2162, __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, 2160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -72788,43 +68665,38 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_16getiterator(struct LxmlE __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2162, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2162, __pyx_L1_error) - } + __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) __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":2163 + /* "lxml/etree.pyx":2161 * """ * root = self.getroot() * if root is None: # <<<<<<<<<<<<<< * return ITER_EMPTY * if tag is not None: */ - __Pyx_TraceLine(2163,0,__PYX_ERR(0, 2163, __pyx_L1_error)) __pyx_t_4 = (__pyx_v_root == Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "lxml/etree.pyx":2164 + /* "lxml/etree.pyx":2162 * root = self.getroot() * if root is None: * return ITER_EMPTY # <<<<<<<<<<<<<< * if tag is not None: * tags += (tag,) */ - __Pyx_TraceLine(2164,0,__PYX_ERR(0, 2164, __pyx_L1_error)) __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":2163 + /* "lxml/etree.pyx":2161 * """ * root = self.getroot() * if root is None: # <<<<<<<<<<<<<< @@ -72833,38 +68705,36 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_16getiterator(struct LxmlE */ } - /* "lxml/etree.pyx":2165 + /* "lxml/etree.pyx":2163 * if root is None: * return ITER_EMPTY * if tag is not None: # <<<<<<<<<<<<<< * tags += (tag,) * return root.getiterator(*tags) */ - __Pyx_TraceLine(2165,0,__PYX_ERR(0, 2165, __pyx_L1_error)) __pyx_t_5 = (__pyx_v_tag != Py_None); __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { - /* "lxml/etree.pyx":2166 + /* "lxml/etree.pyx":2164 * return ITER_EMPTY * if tag is not None: * tags += (tag,) # <<<<<<<<<<<<<< * return root.getiterator(*tags) * */ - __Pyx_TraceLine(2166,0,__PYX_ERR(0, 2166, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2166, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2164, __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, 2166, __pyx_L1_error) + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2164, __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":2165 + /* "lxml/etree.pyx":2163 * if root is None: * return ITER_EMPTY * if tag is not None: # <<<<<<<<<<<<<< @@ -72873,25 +68743,24 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_16getiterator(struct LxmlE */ } - /* "lxml/etree.pyx":2167 + /* "lxml/etree.pyx":2165 * if tag is not None: * tags += (tag,) * return root.getiterator(*tags) # <<<<<<<<<<<<<< * * def iter(self, tag=None, *tags): */ - __Pyx_TraceLine(2167,0,__PYX_ERR(0, 2167, __pyx_L1_error)) __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, 2167, __pyx_L1_error) + __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_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, 2167, __pyx_L1_error) + __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_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":2145 + /* "lxml/etree.pyx":2143 * return '/'.join(path) * * def getiterator(self, tag=None, *tags): # <<<<<<<<<<<<<< @@ -72910,12 +68779,11 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_16getiterator(struct LxmlE __Pyx_XDECREF(__pyx_v_tags); __Pyx_XDECREF(__pyx_v_root); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2169 +/* "lxml/etree.pyx":2167 * return root.getiterator(*tags) * * def iter(self, tag=None, *tags): # <<<<<<<<<<<<<< @@ -72926,7 +68794,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_16getiterator(struct LxmlE /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_19iter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_12_ElementTree_18iter[] = "iter(self, tag=None, *tags)\n\n Creates an iterator for the root element. The iterator loops over\n all elements in this tree, in document order. Note that siblings\n of the root element (comments or processing instructions) are not\n returned by the iterator.\n\n Can be restricted to find only elements with specific tags,\n see `_Element.iter`.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_12_ElementTree_19iter = {"iter", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_19iter, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_18iter}; +static PyMethodDef __pyx_mdef_4lxml_5etree_12_ElementTree_19iter = {"iter", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ElementTree_19iter, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_18iter}; static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_19iter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tag = 0; PyObject *__pyx_v_tags = 0; @@ -72966,7 +68834,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, 2169, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "iter") < 0)) __PYX_ERR(0, 2167, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -72996,27 +68864,23 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_19iter(PyObject *__pyx_v_s static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_18iter(struct LxmlElementTree *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_tags) { PyObject *__pyx_v_root = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; - __Pyx_TraceFrameInit(__pyx_codeobj__132) __Pyx_RefNannySetupContext("iter", 0); - __Pyx_TraceCall("iter", __pyx_f[0], 2169, 0, __PYX_ERR(0, 2169, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_tags); - /* "lxml/etree.pyx":2180 + /* "lxml/etree.pyx":2178 * see `_Element.iter`. * """ * root = self.getroot() # <<<<<<<<<<<<<< * if root is None: * return ITER_EMPTY */ - __Pyx_TraceLine(2180,0,__PYX_ERR(0, 2180, __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, 2180, __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, 2178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -73028,43 +68892,38 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_18iter(struct LxmlElementT __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2180, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2180, __pyx_L1_error) - } + __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) __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":2181 + /* "lxml/etree.pyx":2179 * """ * root = self.getroot() * if root is None: # <<<<<<<<<<<<<< * return ITER_EMPTY * if tag is not None: */ - __Pyx_TraceLine(2181,0,__PYX_ERR(0, 2181, __pyx_L1_error)) __pyx_t_4 = (__pyx_v_root == Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "lxml/etree.pyx":2182 + /* "lxml/etree.pyx":2180 * root = self.getroot() * if root is None: * return ITER_EMPTY # <<<<<<<<<<<<<< * if tag is not None: * tags += (tag,) */ - __Pyx_TraceLine(2182,0,__PYX_ERR(0, 2182, __pyx_L1_error)) __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":2181 + /* "lxml/etree.pyx":2179 * """ * root = self.getroot() * if root is None: # <<<<<<<<<<<<<< @@ -73073,38 +68932,36 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_18iter(struct LxmlElementT */ } - /* "lxml/etree.pyx":2183 + /* "lxml/etree.pyx":2181 * if root is None: * return ITER_EMPTY * if tag is not None: # <<<<<<<<<<<<<< * tags += (tag,) * return root.iter(*tags) */ - __Pyx_TraceLine(2183,0,__PYX_ERR(0, 2183, __pyx_L1_error)) __pyx_t_5 = (__pyx_v_tag != Py_None); __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { - /* "lxml/etree.pyx":2184 + /* "lxml/etree.pyx":2182 * return ITER_EMPTY * if tag is not None: * tags += (tag,) # <<<<<<<<<<<<<< * return root.iter(*tags) * */ - __Pyx_TraceLine(2184,0,__PYX_ERR(0, 2184, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2184, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2182, __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, 2184, __pyx_L1_error) + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2182, __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":2183 + /* "lxml/etree.pyx":2181 * if root is None: * return ITER_EMPTY * if tag is not None: # <<<<<<<<<<<<<< @@ -73113,25 +68970,24 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_18iter(struct LxmlElementT */ } - /* "lxml/etree.pyx":2185 + /* "lxml/etree.pyx":2183 * if tag is not None: * tags += (tag,) * return root.iter(*tags) # <<<<<<<<<<<<<< * * def find(self, path, namespaces=None): */ - __Pyx_TraceLine(2185,0,__PYX_ERR(0, 2185, __pyx_L1_error)) __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, 2185, __pyx_L1_error) + __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_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, 2185, __pyx_L1_error) + __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_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":2169 + /* "lxml/etree.pyx":2167 * return root.getiterator(*tags) * * def iter(self, tag=None, *tags): # <<<<<<<<<<<<<< @@ -73150,12 +69006,11 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_18iter(struct LxmlElementT __Pyx_XDECREF(__pyx_v_tags); __Pyx_XDECREF(__pyx_v_root); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2187 +/* "lxml/etree.pyx":2185 * return root.iter(*tags) * * def find(self, path, namespaces=None): # <<<<<<<<<<<<<< @@ -73166,7 +69021,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_18iter(struct LxmlElementT /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_21find(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_12_ElementTree_20find[] = "find(self, path, namespaces=None)\n\n Finds the first toplevel element with given tag. Same as\n ``tree.getroot().find(path)``.\n\n The optional ``namespaces`` argument accepts a\n prefix-to-namespace mapping that allows the usage of XPath\n prefixes in the path expression.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_12_ElementTree_21find = {"find", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_21find, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_20find}; +static PyMethodDef __pyx_mdef_4lxml_5etree_12_ElementTree_21find = {"find", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ElementTree_21find, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_20find}; static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_21find(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_path = 0; PyObject *__pyx_v_namespaces = 0; @@ -73201,7 +69056,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, 2187, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "find") < 0)) __PYX_ERR(0, 2185, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -73217,7 +69072,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, 2187, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("find", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2185, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._ElementTree.find", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -73233,7 +69088,6 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_21find(PyObject *__pyx_v_s static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_20find(struct LxmlElementTree *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_namespaces) { PyObject *__pyx_v_root = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -73241,30 +69095,26 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_20find(struct LxmlElementT PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__133) __Pyx_RefNannySetupContext("find", 0); - __Pyx_TraceCall("find", __pyx_f[0], 2187, 0, __PYX_ERR(0, 2187, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_path); - /* "lxml/etree.pyx":2197 + /* "lxml/etree.pyx":2195 * prefixes in the path expression. * """ * self._assertHasRoot() # <<<<<<<<<<<<<< * root = self.getroot() * if _isString(path): */ - __Pyx_TraceLine(2197,0,__PYX_ERR(0, 2197, __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, 2197, __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, 2195, __pyx_L1_error) - /* "lxml/etree.pyx":2198 + /* "lxml/etree.pyx":2196 * """ * self._assertHasRoot() * root = self.getroot() # <<<<<<<<<<<<<< * if _isString(path): * if path[:1] == "/": */ - __Pyx_TraceLine(2198,0,__PYX_ERR(0, 2198, __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, 2198, __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, 2196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -73276,56 +69126,50 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_20find(struct LxmlElementT __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2198, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2198, __pyx_L1_error) - } + __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) __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":2199 + /* "lxml/etree.pyx":2197 * self._assertHasRoot() * root = self.getroot() * if _isString(path): # <<<<<<<<<<<<<< * if path[:1] == "/": * path = "." + path */ - __Pyx_TraceLine(2199,0,__PYX_ERR(0, 2199, __pyx_L1_error)) __pyx_t_5 = (_isString(__pyx_v_path) != 0); if (__pyx_t_5) { - /* "lxml/etree.pyx":2200 + /* "lxml/etree.pyx":2198 * root = self.getroot() * if _isString(path): * if path[:1] == "/": # <<<<<<<<<<<<<< * path = "." + path * return root.find(path, namespaces) */ - __Pyx_TraceLine(2200,0,__PYX_ERR(0, 2200, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_path, 0, 1, NULL, NULL, &__pyx_slice__134, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2200, __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, 2198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__130, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2200, __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, 2198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { - /* "lxml/etree.pyx":2201 + /* "lxml/etree.pyx":2199 * if _isString(path): * if path[:1] == "/": * path = "." + path # <<<<<<<<<<<<<< * return root.find(path, namespaces) * */ - __Pyx_TraceLine(2201,0,__PYX_ERR(0, 2201, __pyx_L1_error)) - __pyx_t_2 = PyNumber_Add(__pyx_kp_s__11, __pyx_v_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2201, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2200 + /* "lxml/etree.pyx":2198 * root = self.getroot() * if _isString(path): * if path[:1] == "/": # <<<<<<<<<<<<<< @@ -73334,7 +69178,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_20find(struct LxmlElementT */ } - /* "lxml/etree.pyx":2199 + /* "lxml/etree.pyx":2197 * self._assertHasRoot() * root = self.getroot() * if _isString(path): # <<<<<<<<<<<<<< @@ -73343,16 +69187,15 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_20find(struct LxmlElementT */ } - /* "lxml/etree.pyx":2202 + /* "lxml/etree.pyx":2200 * if path[:1] == "/": * path = "." + path * return root.find(path, namespaces) # <<<<<<<<<<<<<< * * def findtext(self, path, default=None, namespaces=None): */ - __Pyx_TraceLine(2202,0,__PYX_ERR(0, 2202, __pyx_L1_error)) __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, 2202, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_1 = 0; @@ -73369,7 +69212,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, 2202, __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, 2200, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -73377,13 +69220,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, 2202, __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, 2200, __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, 2202, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2200, __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; @@ -73394,7 +69237,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, 2202, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -73403,7 +69246,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_20find(struct LxmlElementT __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2187 + /* "lxml/etree.pyx":2185 * return root.iter(*tags) * * def find(self, path, namespaces=None): # <<<<<<<<<<<<<< @@ -73423,12 +69266,11 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_20find(struct LxmlElementT __Pyx_XDECREF(__pyx_v_root); __Pyx_XDECREF(__pyx_v_path); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2204 +/* "lxml/etree.pyx":2202 * return root.find(path, namespaces) * * def findtext(self, path, default=None, namespaces=None): # <<<<<<<<<<<<<< @@ -73439,7 +69281,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_20find(struct LxmlElementT /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_23findtext(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_12_ElementTree_22findtext[] = "findtext(self, path, default=None, namespaces=None)\n\n Finds the text for the first element matching the ElementPath\n expression. Same as getroot().findtext(path)\n\n The optional ``namespaces`` argument accepts a\n prefix-to-namespace mapping that allows the usage of XPath\n prefixes in the path expression.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_12_ElementTree_23findtext = {"findtext", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_23findtext, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_22findtext}; +static PyMethodDef __pyx_mdef_4lxml_5etree_12_ElementTree_23findtext = {"findtext", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ElementTree_23findtext, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_22findtext}; static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_23findtext(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_path = 0; PyObject *__pyx_v_default = 0; @@ -73484,7 +69326,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, 2204, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "findtext") < 0)) __PYX_ERR(0, 2202, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -73503,7 +69345,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, 2204, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("findtext", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2202, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._ElementTree.findtext", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -73519,7 +69361,6 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_23findtext(PyObject *__pyx static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_22findtext(struct LxmlElementTree *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_default, PyObject *__pyx_v_namespaces) { PyObject *__pyx_v_root = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -73527,30 +69368,26 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_22findtext(struct LxmlElem PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__135) __Pyx_RefNannySetupContext("findtext", 0); - __Pyx_TraceCall("findtext", __pyx_f[0], 2204, 0, __PYX_ERR(0, 2204, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_path); - /* "lxml/etree.pyx":2214 + /* "lxml/etree.pyx":2212 * prefixes in the path expression. * """ * self._assertHasRoot() # <<<<<<<<<<<<<< * root = self.getroot() * if _isString(path): */ - __Pyx_TraceLine(2214,0,__PYX_ERR(0, 2214, __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, 2214, __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, 2212, __pyx_L1_error) - /* "lxml/etree.pyx":2215 + /* "lxml/etree.pyx":2213 * """ * self._assertHasRoot() * root = self.getroot() # <<<<<<<<<<<<<< * if _isString(path): * if path[:1] == "/": */ - __Pyx_TraceLine(2215,0,__PYX_ERR(0, 2215, __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, 2215, __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, 2213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -73562,56 +69399,50 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_22findtext(struct LxmlElem __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2215, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2215, __pyx_L1_error) - } + __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) __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":2216 + /* "lxml/etree.pyx":2214 * self._assertHasRoot() * root = self.getroot() * if _isString(path): # <<<<<<<<<<<<<< * if path[:1] == "/": * path = "." + path */ - __Pyx_TraceLine(2216,0,__PYX_ERR(0, 2216, __pyx_L1_error)) __pyx_t_5 = (_isString(__pyx_v_path) != 0); if (__pyx_t_5) { - /* "lxml/etree.pyx":2217 + /* "lxml/etree.pyx":2215 * root = self.getroot() * if _isString(path): * if path[:1] == "/": # <<<<<<<<<<<<<< * path = "." + path * return root.findtext(path, default, namespaces) */ - __Pyx_TraceLine(2217,0,__PYX_ERR(0, 2217, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_path, 0, 1, NULL, NULL, &__pyx_slice__136, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2217, __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, 2215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__130, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2217, __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, 2215, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { - /* "lxml/etree.pyx":2218 + /* "lxml/etree.pyx":2216 * if _isString(path): * if path[:1] == "/": * path = "." + path # <<<<<<<<<<<<<< * return root.findtext(path, default, namespaces) * */ - __Pyx_TraceLine(2218,0,__PYX_ERR(0, 2218, __pyx_L1_error)) - __pyx_t_2 = PyNumber_Add(__pyx_kp_s__11, __pyx_v_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2218, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2217 + /* "lxml/etree.pyx":2215 * root = self.getroot() * if _isString(path): * if path[:1] == "/": # <<<<<<<<<<<<<< @@ -73620,7 +69451,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_22findtext(struct LxmlElem */ } - /* "lxml/etree.pyx":2216 + /* "lxml/etree.pyx":2214 * self._assertHasRoot() * root = self.getroot() * if _isString(path): # <<<<<<<<<<<<<< @@ -73629,16 +69460,15 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_22findtext(struct LxmlElem */ } - /* "lxml/etree.pyx":2219 + /* "lxml/etree.pyx":2217 * if path[:1] == "/": * path = "." + path * return root.findtext(path, default, namespaces) # <<<<<<<<<<<<<< * * def findall(self, path, namespaces=None): */ - __Pyx_TraceLine(2219,0,__PYX_ERR(0, 2219, __pyx_L1_error)) __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, 2219, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_1 = 0; @@ -73655,7 +69485,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, 2219, __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, 2217, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -73663,13 +69493,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, 2219, __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, 2217, __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, 2219, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3+__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2217, __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; @@ -73683,7 +69513,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, 2219, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -73692,7 +69522,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_22findtext(struct LxmlElem __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2204 + /* "lxml/etree.pyx":2202 * return root.find(path, namespaces) * * def findtext(self, path, default=None, namespaces=None): # <<<<<<<<<<<<<< @@ -73712,12 +69542,11 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_22findtext(struct LxmlElem __Pyx_XDECREF(__pyx_v_root); __Pyx_XDECREF(__pyx_v_path); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2221 +/* "lxml/etree.pyx":2219 * return root.findtext(path, default, namespaces) * * def findall(self, path, namespaces=None): # <<<<<<<<<<<<<< @@ -73728,7 +69557,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_22findtext(struct LxmlElem /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_25findall(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_12_ElementTree_24findall[] = "findall(self, path, namespaces=None)\n\n Finds all elements matching the ElementPath expression. Same as\n getroot().findall(path).\n\n The optional ``namespaces`` argument accepts a\n prefix-to-namespace mapping that allows the usage of XPath\n prefixes in the path expression.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_12_ElementTree_25findall = {"findall", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_25findall, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_24findall}; +static PyMethodDef __pyx_mdef_4lxml_5etree_12_ElementTree_25findall = {"findall", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ElementTree_25findall, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_24findall}; static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_25findall(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_path = 0; PyObject *__pyx_v_namespaces = 0; @@ -73763,7 +69592,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, 2221, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "findall") < 0)) __PYX_ERR(0, 2219, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -73779,7 +69608,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, 2221, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("findall", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2219, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._ElementTree.findall", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -73795,7 +69624,6 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_25findall(PyObject *__pyx_ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_24findall(struct LxmlElementTree *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_namespaces) { PyObject *__pyx_v_root = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -73803,30 +69631,26 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_24findall(struct LxmlEleme PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__137) __Pyx_RefNannySetupContext("findall", 0); - __Pyx_TraceCall("findall", __pyx_f[0], 2221, 0, __PYX_ERR(0, 2221, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_path); - /* "lxml/etree.pyx":2231 + /* "lxml/etree.pyx":2229 * prefixes in the path expression. * """ * self._assertHasRoot() # <<<<<<<<<<<<<< * root = self.getroot() * if _isString(path): */ - __Pyx_TraceLine(2231,0,__PYX_ERR(0, 2231, __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, 2231, __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, 2229, __pyx_L1_error) - /* "lxml/etree.pyx":2232 + /* "lxml/etree.pyx":2230 * """ * self._assertHasRoot() * root = self.getroot() # <<<<<<<<<<<<<< * if _isString(path): * if path[:1] == "/": */ - __Pyx_TraceLine(2232,0,__PYX_ERR(0, 2232, __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, 2232, __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, 2230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -73838,56 +69662,50 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_24findall(struct LxmlEleme __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2232, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2232, __pyx_L1_error) - } + __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) __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":2233 + /* "lxml/etree.pyx":2231 * self._assertHasRoot() * root = self.getroot() * if _isString(path): # <<<<<<<<<<<<<< * if path[:1] == "/": * path = "." + path */ - __Pyx_TraceLine(2233,0,__PYX_ERR(0, 2233, __pyx_L1_error)) __pyx_t_5 = (_isString(__pyx_v_path) != 0); if (__pyx_t_5) { - /* "lxml/etree.pyx":2234 + /* "lxml/etree.pyx":2232 * root = self.getroot() * if _isString(path): * if path[:1] == "/": # <<<<<<<<<<<<<< * path = "." + path * return root.findall(path, namespaces) */ - __Pyx_TraceLine(2234,0,__PYX_ERR(0, 2234, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_path, 0, 1, NULL, NULL, &__pyx_slice__138, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2234, __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, 2232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__130, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2234, __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, 2232, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { - /* "lxml/etree.pyx":2235 + /* "lxml/etree.pyx":2233 * if _isString(path): * if path[:1] == "/": * path = "." + path # <<<<<<<<<<<<<< * return root.findall(path, namespaces) * */ - __Pyx_TraceLine(2235,0,__PYX_ERR(0, 2235, __pyx_L1_error)) - __pyx_t_2 = PyNumber_Add(__pyx_kp_s__11, __pyx_v_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2235, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2234 + /* "lxml/etree.pyx":2232 * root = self.getroot() * if _isString(path): * if path[:1] == "/": # <<<<<<<<<<<<<< @@ -73896,7 +69714,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_24findall(struct LxmlEleme */ } - /* "lxml/etree.pyx":2233 + /* "lxml/etree.pyx":2231 * self._assertHasRoot() * root = self.getroot() * if _isString(path): # <<<<<<<<<<<<<< @@ -73905,16 +69723,15 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_24findall(struct LxmlEleme */ } - /* "lxml/etree.pyx":2236 + /* "lxml/etree.pyx":2234 * if path[:1] == "/": * path = "." + path * return root.findall(path, namespaces) # <<<<<<<<<<<<<< * * def iterfind(self, path, namespaces=None): */ - __Pyx_TraceLine(2236,0,__PYX_ERR(0, 2236, __pyx_L1_error)) __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, 2236, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_1 = 0; @@ -73931,7 +69748,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, 2236, __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, 2234, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -73939,13 +69756,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, 2236, __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, 2234, __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, 2236, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2234, __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; @@ -73956,7 +69773,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, 2236, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -73965,7 +69782,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_24findall(struct LxmlEleme __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2221 + /* "lxml/etree.pyx":2219 * return root.findtext(path, default, namespaces) * * def findall(self, path, namespaces=None): # <<<<<<<<<<<<<< @@ -73985,12 +69802,11 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_24findall(struct LxmlEleme __Pyx_XDECREF(__pyx_v_root); __Pyx_XDECREF(__pyx_v_path); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2238 +/* "lxml/etree.pyx":2236 * return root.findall(path, namespaces) * * def iterfind(self, path, namespaces=None): # <<<<<<<<<<<<<< @@ -74001,7 +69817,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_24findall(struct LxmlEleme /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_27iterfind(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_12_ElementTree_26iterfind[] = "iterfind(self, path, namespaces=None)\n\n Iterates over all elements matching the ElementPath expression.\n Same as getroot().iterfind(path).\n\n The optional ``namespaces`` argument accepts a\n prefix-to-namespace mapping that allows the usage of XPath\n prefixes in the path expression.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_12_ElementTree_27iterfind = {"iterfind", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_27iterfind, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_26iterfind}; +static PyMethodDef __pyx_mdef_4lxml_5etree_12_ElementTree_27iterfind = {"iterfind", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ElementTree_27iterfind, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_26iterfind}; static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_27iterfind(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_path = 0; PyObject *__pyx_v_namespaces = 0; @@ -74036,7 +69852,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, 2238, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "iterfind") < 0)) __PYX_ERR(0, 2236, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -74052,7 +69868,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, 2238, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("iterfind", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2236, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._ElementTree.iterfind", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -74068,7 +69884,6 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_27iterfind(PyObject *__pyx static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_26iterfind(struct LxmlElementTree *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_namespaces) { PyObject *__pyx_v_root = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -74076,30 +69891,26 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_26iterfind(struct LxmlElem PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__139) __Pyx_RefNannySetupContext("iterfind", 0); - __Pyx_TraceCall("iterfind", __pyx_f[0], 2238, 0, __PYX_ERR(0, 2238, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_path); - /* "lxml/etree.pyx":2248 + /* "lxml/etree.pyx":2246 * prefixes in the path expression. * """ * self._assertHasRoot() # <<<<<<<<<<<<<< * root = self.getroot() * if _isString(path): */ - __Pyx_TraceLine(2248,0,__PYX_ERR(0, 2248, __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, 2248, __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, 2246, __pyx_L1_error) - /* "lxml/etree.pyx":2249 + /* "lxml/etree.pyx":2247 * """ * self._assertHasRoot() * root = self.getroot() # <<<<<<<<<<<<<< * if _isString(path): * if path[:1] == "/": */ - __Pyx_TraceLine(2249,0,__PYX_ERR(0, 2249, __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, 2249, __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, 2247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -74111,56 +69922,50 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_26iterfind(struct LxmlElem __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2249, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2249, __pyx_L1_error) - } + __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) __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":2250 + /* "lxml/etree.pyx":2248 * self._assertHasRoot() * root = self.getroot() * if _isString(path): # <<<<<<<<<<<<<< * if path[:1] == "/": * path = "." + path */ - __Pyx_TraceLine(2250,0,__PYX_ERR(0, 2250, __pyx_L1_error)) __pyx_t_5 = (_isString(__pyx_v_path) != 0); if (__pyx_t_5) { - /* "lxml/etree.pyx":2251 + /* "lxml/etree.pyx":2249 * root = self.getroot() * if _isString(path): * if path[:1] == "/": # <<<<<<<<<<<<<< * path = "." + path * return root.iterfind(path, namespaces) */ - __Pyx_TraceLine(2251,0,__PYX_ERR(0, 2251, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_path, 0, 1, NULL, NULL, &__pyx_slice__140, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2251, __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, 2249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__130, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2251, __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, 2249, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { - /* "lxml/etree.pyx":2252 + /* "lxml/etree.pyx":2250 * if _isString(path): * if path[:1] == "/": * path = "." + path # <<<<<<<<<<<<<< * return root.iterfind(path, namespaces) * */ - __Pyx_TraceLine(2252,0,__PYX_ERR(0, 2252, __pyx_L1_error)) - __pyx_t_2 = PyNumber_Add(__pyx_kp_s__11, __pyx_v_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2252, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2251 + /* "lxml/etree.pyx":2249 * root = self.getroot() * if _isString(path): * if path[:1] == "/": # <<<<<<<<<<<<<< @@ -74169,7 +69974,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_26iterfind(struct LxmlElem */ } - /* "lxml/etree.pyx":2250 + /* "lxml/etree.pyx":2248 * self._assertHasRoot() * root = self.getroot() * if _isString(path): # <<<<<<<<<<<<<< @@ -74178,16 +69983,15 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_26iterfind(struct LxmlElem */ } - /* "lxml/etree.pyx":2253 + /* "lxml/etree.pyx":2251 * if path[:1] == "/": * path = "." + path * return root.iterfind(path, namespaces) # <<<<<<<<<<<<<< * * def xpath(self, _path, *, namespaces=None, extensions=None, */ - __Pyx_TraceLine(2253,0,__PYX_ERR(0, 2253, __pyx_L1_error)) __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, 2253, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_1 = 0; @@ -74204,7 +70008,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, 2253, __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, 2251, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -74212,13 +70016,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, 2253, __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, 2251, __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, 2253, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2251, __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; @@ -74229,7 +70033,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, 2253, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -74238,7 +70042,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_26iterfind(struct LxmlElem __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2238 + /* "lxml/etree.pyx":2236 * return root.findall(path, namespaces) * * def iterfind(self, path, namespaces=None): # <<<<<<<<<<<<<< @@ -74258,12 +70062,11 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_26iterfind(struct LxmlElem __Pyx_XDECREF(__pyx_v_root); __Pyx_XDECREF(__pyx_v_path); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2255 +/* "lxml/etree.pyx":2253 * return root.iterfind(path, namespaces) * * def xpath(self, _path, *, namespaces=None, extensions=None, # <<<<<<<<<<<<<< @@ -74274,7 +70077,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_26iterfind(struct LxmlElem /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_29xpath(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_12_ElementTree_28xpath[] = "xpath(self, _path, namespaces=None, extensions=None, smart_strings=True, **_variables)\n\n XPath evaluate in context of document.\n\n ``namespaces`` is an optional dictionary with prefix to namespace URI\n mappings, used by XPath. ``extensions`` defines additional extension\n functions.\n\n Returns a list (nodeset), or bool, float or string.\n\n In case of a list result, return Element for element nodes,\n string for text and attribute values.\n\n Note: if you are going to apply multiple XPath expressions\n against the same document, it is more efficient to use\n XPathEvaluator directly.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_12_ElementTree_29xpath = {"xpath", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_29xpath, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_28xpath}; +static PyMethodDef __pyx_mdef_4lxml_5etree_12_ElementTree_29xpath = {"xpath", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ElementTree_29xpath, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_28xpath}; static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_29xpath(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v__path = 0; PyObject *__pyx_v_namespaces = 0; @@ -74292,7 +70095,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":2256 + /* "lxml/etree.pyx":2254 * * def xpath(self, _path, *, namespaces=None, extensions=None, * smart_strings=True, **_variables): # <<<<<<<<<<<<<< @@ -74323,7 +70126,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, 2255, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__variables, values, pos_args, "xpath") < 0)) __PYX_ERR(0, 2253, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -74337,7 +70140,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, 2255, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("xpath", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2253, __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); @@ -74346,7 +70149,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":2255 + /* "lxml/etree.pyx":2253 * return root.iterfind(path, namespaces) * * def xpath(self, _path, *, namespaces=None, extensions=None, # <<<<<<<<<<<<<< @@ -74363,100 +70166,91 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_29xpath(PyObject *__pyx_v_ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_28xpath(struct LxmlElementTree *__pyx_v_self, PyObject *__pyx_v__path, PyObject *__pyx_v_namespaces, PyObject *__pyx_v_extensions, PyObject *__pyx_v_smart_strings, PyObject *__pyx_v__variables) { struct __pyx_obj_4lxml_5etree_XPathDocumentEvaluator *__pyx_v_evaluator = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__141) __Pyx_RefNannySetupContext("xpath", 0); - __Pyx_TraceCall("xpath", __pyx_f[0], 2255, 0, __PYX_ERR(0, 2255, __pyx_L1_error)); - /* "lxml/etree.pyx":2274 + /* "lxml/etree.pyx":2272 * XPathEvaluator directly. * """ * self._assertHasRoot() # <<<<<<<<<<<<<< * evaluator = XPathDocumentEvaluator(self, namespaces=namespaces, * extensions=extensions, */ - __Pyx_TraceLine(2274,0,__PYX_ERR(0, 2274, __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, 2274, __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, 2272, __pyx_L1_error) - /* "lxml/etree.pyx":2275 + /* "lxml/etree.pyx":2273 * """ * self._assertHasRoot() * evaluator = XPathDocumentEvaluator(self, namespaces=namespaces, # <<<<<<<<<<<<<< * extensions=extensions, * smart_strings=smart_strings) */ - __Pyx_TraceLine(2275,0,__PYX_ERR(0, 2275, __pyx_L1_error)) - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2275, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2273, __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, 2275, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2273, __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, 2275, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_namespaces, __pyx_v_namespaces) < 0) __PYX_ERR(0, 2273, __pyx_L1_error) - /* "lxml/etree.pyx":2276 + /* "lxml/etree.pyx":2274 * self._assertHasRoot() * evaluator = XPathDocumentEvaluator(self, namespaces=namespaces, * extensions=extensions, # <<<<<<<<<<<<<< * smart_strings=smart_strings) * return evaluator(_path, **_variables) */ - __Pyx_TraceLine(2276,0,__PYX_ERR(0, 2276, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_extensions, __pyx_v_extensions) < 0) __PYX_ERR(0, 2275, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_extensions, __pyx_v_extensions) < 0) __PYX_ERR(0, 2273, __pyx_L1_error) - /* "lxml/etree.pyx":2277 + /* "lxml/etree.pyx":2275 * evaluator = XPathDocumentEvaluator(self, namespaces=namespaces, * extensions=extensions, * smart_strings=smart_strings) # <<<<<<<<<<<<<< * return evaluator(_path, **_variables) * */ - __Pyx_TraceLine(2277,0,__PYX_ERR(0, 2277, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_smart_strings, __pyx_v_smart_strings) < 0) __PYX_ERR(0, 2275, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_smart_strings, __pyx_v_smart_strings) < 0) __PYX_ERR(0, 2273, __pyx_L1_error) - /* "lxml/etree.pyx":2275 + /* "lxml/etree.pyx":2273 * """ * self._assertHasRoot() * evaluator = XPathDocumentEvaluator(self, namespaces=namespaces, # <<<<<<<<<<<<<< * extensions=extensions, * smart_strings=smart_strings) */ - __Pyx_TraceLine(2275,0,__PYX_ERR(0, 2275, __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, 2275, __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, 2273, __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":2278 + /* "lxml/etree.pyx":2276 * extensions=extensions, * smart_strings=smart_strings) * return evaluator(_path, **_variables) # <<<<<<<<<<<<<< * * def xslt(self, _xslt, extensions=None, access_control=None, **_kw): */ - __Pyx_TraceLine(2278,0,__PYX_ERR(0, 2278, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2278, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2276, __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, 2278, __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, 2276, __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":2255 + /* "lxml/etree.pyx":2253 * return root.iterfind(path, namespaces) * * def xpath(self, _path, *, namespaces=None, extensions=None, # <<<<<<<<<<<<<< @@ -74474,12 +70268,11 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_28xpath(struct LxmlElement __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_evaluator); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2280 +/* "lxml/etree.pyx":2278 * return evaluator(_path, **_variables) * * def xslt(self, _xslt, extensions=None, access_control=None, **_kw): # <<<<<<<<<<<<<< @@ -74490,7 +70283,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_28xpath(struct LxmlElement /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_31xslt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_12_ElementTree_30xslt[] = "xslt(self, _xslt, extensions=None, access_control=None, **_kw)\n\n Transform this document using other document.\n\n xslt is a tree that should be XSLT\n keyword parameters are XSLT transformation parameters.\n\n Returns the transformed tree.\n\n Note: if you are going to apply the same XSLT stylesheet against\n multiple documents, it is more efficient to use the XSLT\n class directly.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_12_ElementTree_31xslt = {"xslt", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_31xslt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_30xslt}; +static PyMethodDef __pyx_mdef_4lxml_5etree_12_ElementTree_31xslt = {"xslt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ElementTree_31xslt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_30xslt}; static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_31xslt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v__xslt = 0; PyObject *__pyx_v_extensions = 0; @@ -74538,7 +70331,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, 2280, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__kw, values, pos_args, "xslt") < 0)) __PYX_ERR(0, 2278, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -74557,7 +70350,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, 2280, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("xslt", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2278, __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); @@ -74575,90 +70368,82 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_31xslt(PyObject *__pyx_v_s static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_30xslt(struct LxmlElementTree *__pyx_v_self, PyObject *__pyx_v__xslt, PyObject *__pyx_v_extensions, PyObject *__pyx_v_access_control, PyObject *__pyx_v__kw) { struct __pyx_obj_4lxml_5etree_XSLT *__pyx_v_style = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__142) __Pyx_RefNannySetupContext("xslt", 0); - __Pyx_TraceCall("xslt", __pyx_f[0], 2280, 0, __PYX_ERR(0, 2280, __pyx_L1_error)); - /* "lxml/etree.pyx":2294 + /* "lxml/etree.pyx":2292 * class directly. * """ * self._assertHasRoot() # <<<<<<<<<<<<<< * style = XSLT(_xslt, extensions=extensions, * access_control=access_control) */ - __Pyx_TraceLine(2294,0,__PYX_ERR(0, 2294, __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, 2294, __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, 2292, __pyx_L1_error) - /* "lxml/etree.pyx":2295 + /* "lxml/etree.pyx":2293 * """ * self._assertHasRoot() * style = XSLT(_xslt, extensions=extensions, # <<<<<<<<<<<<<< * access_control=access_control) * return style(self, **_kw) */ - __Pyx_TraceLine(2295,0,__PYX_ERR(0, 2295, __pyx_L1_error)) - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2295, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2293, __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, 2295, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2293, __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, 2295, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_extensions, __pyx_v_extensions) < 0) __PYX_ERR(0, 2293, __pyx_L1_error) - /* "lxml/etree.pyx":2296 + /* "lxml/etree.pyx":2294 * self._assertHasRoot() * style = XSLT(_xslt, extensions=extensions, * access_control=access_control) # <<<<<<<<<<<<<< * return style(self, **_kw) * */ - __Pyx_TraceLine(2296,0,__PYX_ERR(0, 2296, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_access_control, __pyx_v_access_control) < 0) __PYX_ERR(0, 2295, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_access_control, __pyx_v_access_control) < 0) __PYX_ERR(0, 2293, __pyx_L1_error) - /* "lxml/etree.pyx":2295 + /* "lxml/etree.pyx":2293 * """ * self._assertHasRoot() * style = XSLT(_xslt, extensions=extensions, # <<<<<<<<<<<<<< * access_control=access_control) * return style(self, **_kw) */ - __Pyx_TraceLine(2295,0,__PYX_ERR(0, 2295, __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, 2295, __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, 2293, __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":2297 + /* "lxml/etree.pyx":2295 * style = XSLT(_xslt, extensions=extensions, * access_control=access_control) * return style(self, **_kw) # <<<<<<<<<<<<<< * * def relaxng(self, relaxng): */ - __Pyx_TraceLine(2297,0,__PYX_ERR(0, 2297, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2297, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2295, __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, 2297, __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, 2295, __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":2280 + /* "lxml/etree.pyx":2278 * return evaluator(_path, **_variables) * * def xslt(self, _xslt, extensions=None, access_control=None, **_kw): # <<<<<<<<<<<<<< @@ -74676,12 +70461,11 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_30xslt(struct LxmlElementT __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_style); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2299 +/* "lxml/etree.pyx":2297 * return style(self, **_kw) * * def relaxng(self, relaxng): # <<<<<<<<<<<<<< @@ -74707,50 +70491,43 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_33relaxng(PyObject *__pyx_ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_32relaxng(struct LxmlElementTree *__pyx_v_self, PyObject *__pyx_v_relaxng) { struct __pyx_obj_4lxml_5etree_RelaxNG *__pyx_v_schema = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__143) __Pyx_RefNannySetupContext("relaxng", 0); - __Pyx_TraceCall("relaxng", __pyx_f[0], 2299, 0, __PYX_ERR(0, 2299, __pyx_L1_error)); - /* "lxml/etree.pyx":2313 + /* "lxml/etree.pyx":2311 * class directly. * """ * self._assertHasRoot() # <<<<<<<<<<<<<< * schema = RelaxNG(relaxng) * return schema.validate(self) */ - __Pyx_TraceLine(2313,0,__PYX_ERR(0, 2313, __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, 2313, __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, 2311, __pyx_L1_error) - /* "lxml/etree.pyx":2314 + /* "lxml/etree.pyx":2312 * """ * self._assertHasRoot() * schema = RelaxNG(relaxng) # <<<<<<<<<<<<<< * return schema.validate(self) * */ - __Pyx_TraceLine(2314,0,__PYX_ERR(0, 2314, __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, 2314, __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, 2312, __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":2315 + /* "lxml/etree.pyx":2313 * self._assertHasRoot() * schema = RelaxNG(relaxng) * return schema.validate(self) # <<<<<<<<<<<<<< * * def xmlschema(self, xmlschema): */ - __Pyx_TraceLine(2315,0,__PYX_ERR(0, 2315, __pyx_L1_error)) __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, 2315, __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, 2313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -74762,44 +70539,16 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_32relaxng(struct LxmlEleme __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2315, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_self)}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2315, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_self)}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2315, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2315, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_self)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_self)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2315, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - } + __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) + __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":2299 + /* "lxml/etree.pyx":2297 * return style(self, **_kw) * * def relaxng(self, relaxng): # <<<<<<<<<<<<<< @@ -74812,18 +70561,16 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_32relaxng(struct LxmlEleme __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("lxml.etree._ElementTree.relaxng", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_schema); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2317 +/* "lxml/etree.pyx":2315 * return schema.validate(self) * * def xmlschema(self, xmlschema): # <<<<<<<<<<<<<< @@ -74849,50 +70596,43 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_35xmlschema(PyObject *__py static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_34xmlschema(struct LxmlElementTree *__pyx_v_self, PyObject *__pyx_v_xmlschema) { struct __pyx_obj_4lxml_5etree_XMLSchema *__pyx_v_schema = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__144) __Pyx_RefNannySetupContext("xmlschema", 0); - __Pyx_TraceCall("xmlschema", __pyx_f[0], 2317, 0, __PYX_ERR(0, 2317, __pyx_L1_error)); - /* "lxml/etree.pyx":2331 + /* "lxml/etree.pyx":2329 * class directly. * """ * self._assertHasRoot() # <<<<<<<<<<<<<< * schema = XMLSchema(xmlschema) * return schema.validate(self) */ - __Pyx_TraceLine(2331,0,__PYX_ERR(0, 2331, __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, 2331, __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, 2329, __pyx_L1_error) - /* "lxml/etree.pyx":2332 + /* "lxml/etree.pyx":2330 * """ * self._assertHasRoot() * schema = XMLSchema(xmlschema) # <<<<<<<<<<<<<< * return schema.validate(self) * */ - __Pyx_TraceLine(2332,0,__PYX_ERR(0, 2332, __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, 2332, __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, 2330, __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":2333 + /* "lxml/etree.pyx":2331 * self._assertHasRoot() * schema = XMLSchema(xmlschema) * return schema.validate(self) # <<<<<<<<<<<<<< * * def xinclude(self): */ - __Pyx_TraceLine(2333,0,__PYX_ERR(0, 2333, __pyx_L1_error)) __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, 2333, __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, 2331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -74904,44 +70644,16 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_34xmlschema(struct LxmlEle __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2333, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_self)}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2333, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_self)}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2333, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2333, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_self)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_self)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2333, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - } + __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) + __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":2317 + /* "lxml/etree.pyx":2315 * return schema.validate(self) * * def xmlschema(self, xmlschema): # <<<<<<<<<<<<<< @@ -74954,18 +70666,16 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_34xmlschema(struct LxmlEle __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("lxml.etree._ElementTree.xmlschema", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_schema); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2335 +/* "lxml/etree.pyx":2333 * return schema.validate(self) * * def xinclude(self): # <<<<<<<<<<<<<< @@ -74990,36 +70700,30 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_37xinclude(PyObject *__pyx static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_36xinclude(struct LxmlElementTree *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__145) __Pyx_RefNannySetupContext("xinclude", 0); - __Pyx_TraceCall("xinclude", __pyx_f[0], 2335, 0, __PYX_ERR(0, 2335, __pyx_L1_error)); - /* "lxml/etree.pyx":2347 + /* "lxml/etree.pyx":2345 * due to restrictions of libxml2 <= 2.6.29. * """ * self._assertHasRoot() # <<<<<<<<<<<<<< * XInclude()(self._context_node) * */ - __Pyx_TraceLine(2347,0,__PYX_ERR(0, 2347, __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, 2347, __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, 2345, __pyx_L1_error) - /* "lxml/etree.pyx":2348 + /* "lxml/etree.pyx":2346 * """ * self._assertHasRoot() * XInclude()(self._context_node) # <<<<<<<<<<<<<< * * def write_c14n(self, file, *, exclusive=False, with_comments=True, */ - __Pyx_TraceLine(2348,0,__PYX_ERR(0, 2348, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree_XInclude)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2348, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -75031,42 +70735,14 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_36xinclude(struct LxmlElem __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self->_context_node)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2348, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_self->_context_node)}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2348, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_self->_context_node)}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2348, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2348, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_self->_context_node)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_context_node)); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_self->_context_node)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2348, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - } + __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) + __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":2335 + /* "lxml/etree.pyx":2333 * return schema.validate(self) * * def xinclude(self): # <<<<<<<<<<<<<< @@ -75081,17 +70757,15 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_36xinclude(struct LxmlElem __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("lxml.etree._ElementTree.xinclude", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2350 +/* "lxml/etree.pyx":2348 * XInclude()(self._context_node) * * def write_c14n(self, file, *, exclusive=False, with_comments=True, # <<<<<<<<<<<<<< @@ -75102,7 +70776,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_36xinclude(struct LxmlElem /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_39write_c14n(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_12_ElementTree_38write_c14n[] = "write_c14n(self, file, exclusive=False, with_comments=True,\n compression=0, inclusive_ns_prefixes=None)\n\n C14N write of document. Always writes UTF-8.\n\n The ``compression`` option enables GZip compression level 1-9.\n\n The ``inclusive_ns_prefixes`` should be a list of namespace strings\n (i.e. ['xs', 'xsi']) that will be promoted to the top-level element\n during exclusive C14N serialisation. This parameter is ignored if\n exclusive mode=False.\n\n If exclusive=True and no list is provided, a namespace will only be\n rendered if it is used by the immediate parent or one of its attributes\n and its prefix and values have not already been rendered by an ancestor\n of the namespace node's parent element.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_12_ElementTree_39write_c14n = {"write_c14n", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_39write_c14n, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_38write_c14n}; +static PyMethodDef __pyx_mdef_4lxml_5etree_12_ElementTree_39write_c14n = {"write_c14n", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ElementTree_39write_c14n, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_38write_c14n}; static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_39write_c14n(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_file = 0; PyObject *__pyx_v_exclusive = 0; @@ -75119,7 +70793,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":2351 + /* "lxml/etree.pyx":2349 * * def write_c14n(self, file, *, exclusive=False, with_comments=True, * compression=0, inclusive_ns_prefixes=None): # <<<<<<<<<<<<<< @@ -75150,7 +70824,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, 2350, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_c14n") < 0)) __PYX_ERR(0, 2348, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -75165,7 +70839,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, 2350, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("write_c14n", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2348, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._ElementTree.write_c14n", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -75173,7 +70847,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":2350 + /* "lxml/etree.pyx":2348 * XInclude()(self._context_node) * * def write_c14n(self, file, *, exclusive=False, with_comments=True, # <<<<<<<<<<<<<< @@ -75188,7 +70862,6 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_39write_c14n(PyObject *__p static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_38write_c14n(struct LxmlElementTree *__pyx_v_self, PyObject *__pyx_v_file, PyObject *__pyx_v_exclusive, PyObject *__pyx_v_with_comments, PyObject *__pyx_v_compression, PyObject *__pyx_v_inclusive_ns_prefixes) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -75196,42 +70869,37 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_38write_c14n(struct LxmlEl int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__146) __Pyx_RefNannySetupContext("write_c14n", 0); - __Pyx_TraceCall("write_c14n", __pyx_f[0], 2350, 0, __PYX_ERR(0, 2350, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_compression); - /* "lxml/etree.pyx":2369 + /* "lxml/etree.pyx":2367 * of the namespace node's parent element. * """ * self._assertHasRoot() # <<<<<<<<<<<<<< * _assertValidNode(self._context_node) * if compression is None or compression < 0: */ - __Pyx_TraceLine(2369,0,__PYX_ERR(0, 2369, __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, 2369, __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, 2367, __pyx_L1_error) - /* "lxml/etree.pyx":2370 + /* "lxml/etree.pyx":2368 * """ * self._assertHasRoot() * _assertValidNode(self._context_node) # <<<<<<<<<<<<<< * if compression is None or compression < 0: * compression = 0 */ - __Pyx_TraceLine(2370,0,__PYX_ERR(0, 2370, __pyx_L1_error)) __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, 2370, __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, 2368, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2371 + /* "lxml/etree.pyx":2369 * self._assertHasRoot() * _assertValidNode(self._context_node) * if compression is None or compression < 0: # <<<<<<<<<<<<<< * compression = 0 * */ - __Pyx_TraceLine(2371,0,__PYX_ERR(0, 2371, __pyx_L1_error)) __pyx_t_4 = (__pyx_v_compression == Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (!__pyx_t_5) { @@ -75239,25 +70907,24 @@ 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, 2371, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2371, __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, 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_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":2372 + /* "lxml/etree.pyx":2370 * _assertValidNode(self._context_node) * if compression is None or compression < 0: * compression = 0 # <<<<<<<<<<<<<< * * _tofilelikeC14N(file, self._context_node, exclusive, with_comments, */ - __Pyx_TraceLine(2372,0,__PYX_ERR(0, 2372, __pyx_L1_error)) __Pyx_INCREF(__pyx_int_0); __Pyx_DECREF_SET(__pyx_v_compression, __pyx_int_0); - /* "lxml/etree.pyx":2371 + /* "lxml/etree.pyx":2369 * self._assertHasRoot() * _assertValidNode(self._context_node) * if compression is None or compression < 0: # <<<<<<<<<<<<<< @@ -75266,43 +70933,40 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_38write_c14n(struct LxmlEl */ } - /* "lxml/etree.pyx":2374 + /* "lxml/etree.pyx":2372 * compression = 0 * * _tofilelikeC14N(file, self._context_node, exclusive, with_comments, # <<<<<<<<<<<<<< * compression, inclusive_ns_prefixes) * */ - __Pyx_TraceLine(2374,0,__PYX_ERR(0, 2374, __pyx_L1_error)) __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, 2374, __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, 2374, __pyx_L1_error) + __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) - /* "lxml/etree.pyx":2375 + /* "lxml/etree.pyx":2373 * * _tofilelikeC14N(file, self._context_node, exclusive, with_comments, * compression, inclusive_ns_prefixes) # <<<<<<<<<<<<<< * * cdef _ElementTree _elementTreeFactory(_Document doc, _Element context_node): */ - __Pyx_TraceLine(2375,0,__PYX_ERR(0, 2375, __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, 2375, __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, 2373, __pyx_L1_error) - /* "lxml/etree.pyx":2374 + /* "lxml/etree.pyx":2372 * compression = 0 * * _tofilelikeC14N(file, self._context_node, exclusive, with_comments, # <<<<<<<<<<<<<< * compression, inclusive_ns_prefixes) * */ - __Pyx_TraceLine(2374,0,__PYX_ERR(0, 2374, __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, 2374, __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, 2372, __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":2350 + /* "lxml/etree.pyx":2348 * XInclude()(self._context_node) * * def write_c14n(self, file, *, exclusive=False, with_comments=True, # <<<<<<<<<<<<<< @@ -75321,12 +70985,11 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_38write_c14n(struct LxmlEl __pyx_L0:; __Pyx_XDECREF(__pyx_v_compression); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2377 +/* "lxml/etree.pyx":2375 * compression, inclusive_ns_prefixes) * * cdef _ElementTree _elementTreeFactory(_Document doc, _Element context_node): # <<<<<<<<<<<<<< @@ -75336,28 +70999,25 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_38write_c14n(struct LxmlEl static struct LxmlElementTree *__pyx_f_4lxml_5etree__elementTreeFactory(struct LxmlDocument *__pyx_v_doc, struct LxmlElement *__pyx_v_context_node) { struct LxmlElementTree *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_elementTreeFactory", 0); - __Pyx_TraceCall("_elementTreeFactory", __pyx_f[0], 2377, 0, __PYX_ERR(0, 2377, __pyx_L1_error)); - /* "lxml/etree.pyx":2378 + /* "lxml/etree.pyx":2376 * * cdef _ElementTree _elementTreeFactory(_Document doc, _Element context_node): * return _newElementTree(doc, context_node, _ElementTree) # <<<<<<<<<<<<<< * * cdef _ElementTree _newElementTree(_Document doc, _Element context_node, */ - __Pyx_TraceLine(2378,0,__PYX_ERR(0, 2378, __pyx_L1_error)) __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, 2378, __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, 2376, __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":2377 + /* "lxml/etree.pyx":2375 * compression, inclusive_ns_prefixes) * * cdef _ElementTree _elementTreeFactory(_Document doc, _Element context_node): # <<<<<<<<<<<<<< @@ -75372,12 +71032,11 @@ static struct LxmlElementTree *__pyx_f_4lxml_5etree__elementTreeFactory(struct L __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2380 +/* "lxml/etree.pyx":2378 * return _newElementTree(doc, context_node, _ElementTree) * * cdef _ElementTree _newElementTree(_Document doc, _Element context_node, # <<<<<<<<<<<<<< @@ -75388,7 +71047,6 @@ static struct LxmlElementTree *__pyx_f_4lxml_5etree__elementTreeFactory(struct L static struct LxmlElementTree *__pyx_f_4lxml_5etree__newElementTree(struct LxmlDocument *__pyx_v_doc, struct LxmlElement *__pyx_v_context_node, PyObject *__pyx_v_baseclass) { struct LxmlElementTree *__pyx_v_result = 0; struct LxmlElementTree *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -75398,17 +71056,15 @@ static struct LxmlElementTree *__pyx_f_4lxml_5etree__newElementTree(struct LxmlD int __pyx_t_6; int __pyx_t_7; __Pyx_RefNannySetupContext("_newElementTree", 0); - __Pyx_TraceCall("_newElementTree", __pyx_f[0], 2380, 0, __PYX_ERR(0, 2380, __pyx_L1_error)); __Pyx_INCREF((PyObject *)__pyx_v_context_node); - /* "lxml/etree.pyx":2383 + /* "lxml/etree.pyx":2381 * object baseclass): * cdef _ElementTree result * result = baseclass() # <<<<<<<<<<<<<< * if context_node is None and doc is not None: * context_node = doc.getroot() */ - __Pyx_TraceLine(2383,0,__PYX_ERR(0, 2383, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_baseclass); __pyx_t_2 = __pyx_v_baseclass; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -75420,26 +71076,22 @@ static struct LxmlElementTree *__pyx_f_4lxml_5etree__newElementTree(struct LxmlD __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2383, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2383, __pyx_L1_error) - } + __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) __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, 2383, __pyx_L1_error) + 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) __pyx_v_result = ((struct LxmlElementTree *)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2384 + /* "lxml/etree.pyx":2382 * cdef _ElementTree result * result = baseclass() * if context_node is None and doc is not None: # <<<<<<<<<<<<<< * context_node = doc.getroot() * if context_node is None: */ - __Pyx_TraceLine(2384,0,__PYX_ERR(0, 2384, __pyx_L1_error)) __pyx_t_5 = (((PyObject *)__pyx_v_context_node) == Py_None); __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { @@ -75453,21 +71105,20 @@ static struct LxmlElementTree *__pyx_f_4lxml_5etree__newElementTree(struct LxmlD __pyx_L4_bool_binop_done:; if (__pyx_t_4) { - /* "lxml/etree.pyx":2385 + /* "lxml/etree.pyx":2383 * result = baseclass() * if context_node is None and doc is not None: * context_node = doc.getroot() # <<<<<<<<<<<<<< * if context_node is None: * _assertValidDoc(doc) */ - __Pyx_TraceLine(2385,0,__PYX_ERR(0, 2385, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_9_Document_getroot(__pyx_v_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2385, __pyx_L1_error) + __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_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, 2385, __pyx_L1_error) + 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) __Pyx_DECREF_SET(__pyx_v_context_node, ((struct LxmlElement *)__pyx_t_1)); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2384 + /* "lxml/etree.pyx":2382 * cdef _ElementTree result * result = baseclass() * if context_node is None and doc is not None: # <<<<<<<<<<<<<< @@ -75476,43 +71127,40 @@ static struct LxmlElementTree *__pyx_f_4lxml_5etree__newElementTree(struct LxmlD */ } - /* "lxml/etree.pyx":2386 + /* "lxml/etree.pyx":2384 * if context_node is None and doc is not None: * context_node = doc.getroot() * if context_node is None: # <<<<<<<<<<<<<< * _assertValidDoc(doc) * result._doc = doc */ - __Pyx_TraceLine(2386,0,__PYX_ERR(0, 2386, __pyx_L1_error)) __pyx_t_4 = (((PyObject *)__pyx_v_context_node) == Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "lxml/etree.pyx":2387 + /* "lxml/etree.pyx":2385 * context_node = doc.getroot() * if context_node is None: * _assertValidDoc(doc) # <<<<<<<<<<<<<< * result._doc = doc * else: */ - __Pyx_TraceLine(2387,0,__PYX_ERR(0, 2387, __pyx_L1_error)) - __pyx_t_7 = __pyx_f_4lxml_5etree__assertValidDoc(__pyx_v_doc); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 2387, __pyx_L1_error) + __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) - /* "lxml/etree.pyx":2388 + /* "lxml/etree.pyx":2386 * if context_node is None: * _assertValidDoc(doc) * result._doc = doc # <<<<<<<<<<<<<< * else: * _assertValidNode(context_node) */ - __Pyx_TraceLine(2388,0,__PYX_ERR(0, 2388, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_doc)); __Pyx_GIVEREF(((PyObject *)__pyx_v_doc)); __Pyx_GOTREF(__pyx_v_result->_doc); __Pyx_DECREF(((PyObject *)__pyx_v_result->_doc)); __pyx_v_result->_doc = __pyx_v_doc; - /* "lxml/etree.pyx":2386 + /* "lxml/etree.pyx":2384 * if context_node is None and doc is not None: * context_node = doc.getroot() * if context_node is None: # <<<<<<<<<<<<<< @@ -75522,47 +71170,44 @@ static struct LxmlElementTree *__pyx_f_4lxml_5etree__newElementTree(struct LxmlD goto __pyx_L6; } - /* "lxml/etree.pyx":2390 + /* "lxml/etree.pyx":2388 * result._doc = doc * else: * _assertValidNode(context_node) # <<<<<<<<<<<<<< * result._context_node = context_node * return result */ - __Pyx_TraceLine(2390,0,__PYX_ERR(0, 2390, __pyx_L1_error)) /*else*/ { - __pyx_t_7 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_context_node); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 2390, __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, 2388, __pyx_L1_error) } __pyx_L6:; - /* "lxml/etree.pyx":2391 + /* "lxml/etree.pyx":2389 * else: * _assertValidNode(context_node) * result._context_node = context_node # <<<<<<<<<<<<<< * return result * */ - __Pyx_TraceLine(2391,0,__PYX_ERR(0, 2391, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_context_node)); __Pyx_GIVEREF(((PyObject *)__pyx_v_context_node)); __Pyx_GOTREF(__pyx_v_result->_context_node); __Pyx_DECREF(((PyObject *)__pyx_v_result->_context_node)); __pyx_v_result->_context_node = __pyx_v_context_node; - /* "lxml/etree.pyx":2392 + /* "lxml/etree.pyx":2390 * _assertValidNode(context_node) * result._context_node = context_node * return result # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(2392,0,__PYX_ERR(0, 2392, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "lxml/etree.pyx":2380 + /* "lxml/etree.pyx":2378 * return _newElementTree(doc, context_node, _ElementTree) * * cdef _ElementTree _newElementTree(_Document doc, _Element context_node, # <<<<<<<<<<<<<< @@ -75581,12 +71226,11 @@ static struct LxmlElementTree *__pyx_f_4lxml_5etree__newElementTree(struct LxmlD __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_context_node); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2401 +/* "lxml/etree.pyx":2399 * """ * cdef _Element _element * def __cinit__(self, _Element element not None): # <<<<<<<<<<<<<< @@ -75620,7 +71264,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, 2401, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2399, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -75631,13 +71275,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, 2401, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2399, __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, 2401, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_5etree__Element, 0, "element", 0))) __PYX_ERR(0, 2399, __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 */ @@ -75651,37 +71295,33 @@ static int __pyx_pw_4lxml_5etree_7_Attrib_1__cinit__(PyObject *__pyx_v_self, PyO static int __pyx_pf_4lxml_5etree_7_Attrib___cinit__(struct __pyx_obj_4lxml_5etree__Attrib *__pyx_v_self, struct LxmlElement *__pyx_v_element) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[0], 2401, 0, __PYX_ERR(0, 2401, __pyx_L1_error)); - /* "lxml/etree.pyx":2402 + /* "lxml/etree.pyx":2400 * cdef _Element _element * def __cinit__(self, _Element element not None): * _assertValidNode(element) # <<<<<<<<<<<<<< * self._element = element * */ - __Pyx_TraceLine(2402,0,__PYX_ERR(0, 2402, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2402, __pyx_L1_error) + __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) - /* "lxml/etree.pyx":2403 + /* "lxml/etree.pyx":2401 * def __cinit__(self, _Element element not None): * _assertValidNode(element) * self._element = element # <<<<<<<<<<<<<< * * # MANIPULATORS */ - __Pyx_TraceLine(2403,0,__PYX_ERR(0, 2403, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_element)); __Pyx_GIVEREF(((PyObject *)__pyx_v_element)); __Pyx_GOTREF(__pyx_v_self->_element); __Pyx_DECREF(((PyObject *)__pyx_v_self->_element)); __pyx_v_self->_element = __pyx_v_element; - /* "lxml/etree.pyx":2401 + /* "lxml/etree.pyx":2399 * """ * cdef _Element _element * def __cinit__(self, _Element element not None): # <<<<<<<<<<<<<< @@ -75696,12 +71336,11 @@ static int __pyx_pf_4lxml_5etree_7_Attrib___cinit__(struct __pyx_obj_4lxml_5etre __Pyx_AddTraceback("lxml.etree._Attrib.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2406 +/* "lxml/etree.pyx":2404 * * # MANIPULATORS * def __setitem__(self, key, value): # <<<<<<<<<<<<<< @@ -75724,40 +71363,36 @@ static int __pyx_pw_4lxml_5etree_7_Attrib_3__setitem__(PyObject *__pyx_v_self, P static int __pyx_pf_4lxml_5etree_7_Attrib_2__setitem__(struct __pyx_obj_4lxml_5etree__Attrib *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("__setitem__", 0); - __Pyx_TraceCall("__setitem__", __pyx_f[0], 2406, 0, __PYX_ERR(0, 2406, __pyx_L1_error)); - /* "lxml/etree.pyx":2407 + /* "lxml/etree.pyx":2405 * # MANIPULATORS * def __setitem__(self, key, value): * _assertValidNode(self._element) # <<<<<<<<<<<<<< * _setAttributeValue(self._element, key, value) * */ - __Pyx_TraceLine(2407,0,__PYX_ERR(0, 2407, __pyx_L1_error)) __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, 2407, __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, 2405, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2408 + /* "lxml/etree.pyx":2406 * def __setitem__(self, key, value): * _assertValidNode(self._element) * _setAttributeValue(self._element, key, value) # <<<<<<<<<<<<<< * * def __delitem__(self, key): */ - __Pyx_TraceLine(2408,0,__PYX_ERR(0, 2408, __pyx_L1_error)) __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, 2408, __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, 2406, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2406 + /* "lxml/etree.pyx":2404 * * # MANIPULATORS * def __setitem__(self, key, value): # <<<<<<<<<<<<<< @@ -75773,12 +71408,11 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_2__setitem__(struct __pyx_obj_4lxml_5e __Pyx_AddTraceback("lxml.etree._Attrib.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2410 +/* "lxml/etree.pyx":2408 * _setAttributeValue(self._element, key, value) * * def __delitem__(self, key): # <<<<<<<<<<<<<< @@ -75801,40 +71435,36 @@ static int __pyx_pw_4lxml_5etree_7_Attrib_5__delitem__(PyObject *__pyx_v_self, P static int __pyx_pf_4lxml_5etree_7_Attrib_4__delitem__(struct __pyx_obj_4lxml_5etree__Attrib *__pyx_v_self, PyObject *__pyx_v_key) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("__delitem__", 0); - __Pyx_TraceCall("__delitem__", __pyx_f[0], 2410, 0, __PYX_ERR(0, 2410, __pyx_L1_error)); - /* "lxml/etree.pyx":2411 + /* "lxml/etree.pyx":2409 * * def __delitem__(self, key): * _assertValidNode(self._element) # <<<<<<<<<<<<<< * _delAttribute(self._element, key) * */ - __Pyx_TraceLine(2411,0,__PYX_ERR(0, 2411, __pyx_L1_error)) __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, 2411, __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, 2409, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2412 + /* "lxml/etree.pyx":2410 * def __delitem__(self, key): * _assertValidNode(self._element) * _delAttribute(self._element, key) # <<<<<<<<<<<<<< * * def update(self, sequence_or_dict): */ - __Pyx_TraceLine(2412,0,__PYX_ERR(0, 2412, __pyx_L1_error)) __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, 2412, __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, 2410, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2410 + /* "lxml/etree.pyx":2408 * _setAttributeValue(self._element, key, value) * * def __delitem__(self, key): # <<<<<<<<<<<<<< @@ -75850,12 +71480,11 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_4__delitem__(struct __pyx_obj_4lxml_5e __Pyx_AddTraceback("lxml.etree._Attrib.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2414 +/* "lxml/etree.pyx":2412 * _delAttribute(self._element, key) * * def update(self, sequence_or_dict): # <<<<<<<<<<<<<< @@ -75881,7 +71510,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_6update(struct __pyx_obj_4lxml_5 PyObject *__pyx_v_key = NULL; PyObject *__pyx_v_value = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -75895,32 +71523,28 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_6update(struct __pyx_obj_4lxml_5 PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *(*__pyx_t_12)(PyObject *); - __Pyx_TraceFrameInit(__pyx_codeobj__147) __Pyx_RefNannySetupContext("update", 0); - __Pyx_TraceCall("update", __pyx_f[0], 2414, 0, __PYX_ERR(0, 2414, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_sequence_or_dict); - /* "lxml/etree.pyx":2415 + /* "lxml/etree.pyx":2413 * * def update(self, sequence_or_dict): * _assertValidNode(self._element) # <<<<<<<<<<<<<< * if isinstance(sequence_or_dict, (dict, _Attrib)): * sequence_or_dict = sequence_or_dict.items() */ - __Pyx_TraceLine(2415,0,__PYX_ERR(0, 2415, __pyx_L1_error)) __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, 2415, __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, 2413, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2416 + /* "lxml/etree.pyx":2414 * def update(self, sequence_or_dict): * _assertValidNode(self._element) * if isinstance(sequence_or_dict, (dict, _Attrib)): # <<<<<<<<<<<<<< * sequence_or_dict = sequence_or_dict.items() * for key, value in sequence_or_dict: */ - __Pyx_TraceLine(2416,0,__PYX_ERR(0, 2416, __pyx_L1_error)) __pyx_t_4 = PyDict_Check(__pyx_v_sequence_or_dict); __pyx_t_5 = (__pyx_t_4 != 0); if (!__pyx_t_5) { @@ -75935,15 +71559,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":2417 + /* "lxml/etree.pyx":2415 * _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_TraceLine(2417,0,__PYX_ERR(0, 2417, __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, 2417, __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, 2415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -75955,18 +71578,15 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_6update(struct __pyx_obj_4lxml_5 __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (__pyx_t_7) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2417, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2417, __pyx_L1_error) - } + __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) __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":2416 + /* "lxml/etree.pyx":2414 * def update(self, sequence_or_dict): * _assertValidNode(self._element) * if isinstance(sequence_or_dict, (dict, _Attrib)): # <<<<<<<<<<<<<< @@ -75975,38 +71595,37 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_6update(struct __pyx_obj_4lxml_5 */ } - /* "lxml/etree.pyx":2418 + /* "lxml/etree.pyx":2416 * 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_TraceLine(2418,0,__PYX_ERR(0, 2418, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_v_sequence_or_dict)) || PyTuple_CheckExact(__pyx_v_sequence_or_dict)) { __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, 2418, __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, 2416, __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, 2418, __pyx_L1_error) + __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2416, __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, 2418, __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, 2416, __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, 2418, __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, 2416, __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, 2418, __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, 2416, __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, 2418, __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, 2416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } @@ -76016,7 +71635,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, 2418, __pyx_L1_error) + else __PYX_ERR(0, 2416, __pyx_L1_error) } break; } @@ -76028,7 +71647,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, 2418, __pyx_L1_error) + __PYX_ERR(0, 2416, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -76041,15 +71660,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, 2418, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2418, __pyx_L1_error) + __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2416, __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, 2418, __pyx_L1_error) + __pyx_t_11 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2416, __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; @@ -76057,7 +71676,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, 2418, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 2416, __pyx_L1_error) __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L9_unpacking_done; @@ -76065,7 +71684,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, 2418, __pyx_L1_error) + __PYX_ERR(0, 2416, __pyx_L1_error) __pyx_L9_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_7); @@ -76073,31 +71692,29 @@ 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":2419 + /* "lxml/etree.pyx":2417 * sequence_or_dict = sequence_or_dict.items() * for key, value in sequence_or_dict: * _setAttributeValue(self._element, key, value) # <<<<<<<<<<<<<< * * def pop(self, key, *default): */ - __Pyx_TraceLine(2419,0,__PYX_ERR(0, 2419, __pyx_L1_error)) __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, 2419, __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, 2417, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "lxml/etree.pyx":2418 + /* "lxml/etree.pyx":2416 * 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_TraceLine(2418,0,__PYX_ERR(0, 2418, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2414 + /* "lxml/etree.pyx":2412 * _delAttribute(self._element, key) * * def update(self, sequence_or_dict): # <<<<<<<<<<<<<< @@ -76121,12 +71738,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_6update(struct __pyx_obj_4lxml_5 __Pyx_XDECREF(__pyx_v_value); __Pyx_XDECREF(__pyx_v_sequence_or_dict); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2421 +/* "lxml/etree.pyx":2419 * _setAttributeValue(self._element, key, value) * * def pop(self, key, *default): # <<<<<<<<<<<<<< @@ -76136,7 +71752,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_6update(struct __pyx_obj_4lxml_5 /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_7_Attrib_9pop(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_5etree_7_Attrib_9pop = {"pop", (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_9pop, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_5etree_7_Attrib_9pop = {"pop", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_7_Attrib_9pop, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_5etree_7_Attrib_9pop(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_key = 0; PyObject *__pyx_v_default = 0; @@ -76173,7 +71789,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, 2421, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "pop") < 0)) __PYX_ERR(0, 2419, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; @@ -76184,7 +71800,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, 2421, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("pop", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2419, __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); @@ -76202,7 +71818,6 @@ static PyObject *__pyx_pw_4lxml_5etree_7_Attrib_9pop(PyObject *__pyx_v_self, PyO static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_8pop(struct __pyx_obj_4lxml_5etree__Attrib *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; @@ -76210,41 +71825,37 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_8pop(struct __pyx_obj_4lxml_5etr PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; - __Pyx_TraceFrameInit(__pyx_codeobj__148) __Pyx_RefNannySetupContext("pop", 0); - __Pyx_TraceCall("pop", __pyx_f[0], 2421, 0, __PYX_ERR(0, 2421, __pyx_L1_error)); - /* "lxml/etree.pyx":2422 + /* "lxml/etree.pyx":2420 * * 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_TraceLine(2422,0,__PYX_ERR(0, 2422, __pyx_L1_error)) - __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_default); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2422, __pyx_L1_error) + __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_2 = ((__pyx_t_1 > 1) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":2423 + /* "lxml/etree.pyx":2421 * 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_TraceLine(2423,0,__PYX_ERR(0, 2423, __pyx_L1_error)) - __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_default); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2423, __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, 2423, __pyx_L1_error) + __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_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, 2423, __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, 2421, __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, 2423, __pyx_L1_error) + __PYX_ERR(0, 2421, __pyx_L1_error) - /* "lxml/etree.pyx":2422 + /* "lxml/etree.pyx":2420 * * def pop(self, key, *default): * if len(default) > 1: # <<<<<<<<<<<<<< @@ -76253,71 +71864,66 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_8pop(struct __pyx_obj_4lxml_5etr */ } - /* "lxml/etree.pyx":2424 + /* "lxml/etree.pyx":2422 * 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) * if result is None: */ - __Pyx_TraceLine(2424,0,__PYX_ERR(0, 2424, __pyx_L1_error)) __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, 2424, __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, 2422, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":2425 + /* "lxml/etree.pyx":2423 * raise TypeError, f"pop expected at most 2 arguments, got {len(default)+1}" * _assertValidNode(self._element) * result = _getAttributeValue(self._element, key, None) # <<<<<<<<<<<<<< * if result is None: * if not default: */ - __Pyx_TraceLine(2425,0,__PYX_ERR(0, 2425, __pyx_L1_error)) __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, 2425, __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, 2423, __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":2426 + /* "lxml/etree.pyx":2424 * _assertValidNode(self._element) * result = _getAttributeValue(self._element, key, None) * if result is None: # <<<<<<<<<<<<<< * if not default: * raise KeyError, key */ - __Pyx_TraceLine(2426,0,__PYX_ERR(0, 2426, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_result == Py_None); __pyx_t_6 = (__pyx_t_2 != 0); if (__pyx_t_6) { - /* "lxml/etree.pyx":2427 + /* "lxml/etree.pyx":2425 * result = _getAttributeValue(self._element, key, None) * if result is None: * if not default: # <<<<<<<<<<<<<< * raise KeyError, key * result = default[0] */ - __Pyx_TraceLine(2427,0,__PYX_ERR(0, 2427, __pyx_L1_error)) __pyx_t_6 = (PyTuple_GET_SIZE(__pyx_v_default) != 0); __pyx_t_2 = ((!__pyx_t_6) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":2428 + /* "lxml/etree.pyx":2426 * if result is None: * if not default: * raise KeyError, key # <<<<<<<<<<<<<< * result = default[0] * else: */ - __Pyx_TraceLine(2428,0,__PYX_ERR(0, 2428, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_KeyError, __pyx_v_key, 0, 0); - __PYX_ERR(0, 2428, __pyx_L1_error) + __PYX_ERR(0, 2426, __pyx_L1_error) - /* "lxml/etree.pyx":2427 + /* "lxml/etree.pyx":2425 * result = _getAttributeValue(self._element, key, None) * if result is None: * if not default: # <<<<<<<<<<<<<< @@ -76326,20 +71932,19 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_8pop(struct __pyx_obj_4lxml_5etr */ } - /* "lxml/etree.pyx":2429 + /* "lxml/etree.pyx":2427 * if not default: * raise KeyError, key * result = default[0] # <<<<<<<<<<<<<< * else: * _delAttribute(self._element, key) */ - __Pyx_TraceLine(2429,0,__PYX_ERR(0, 2429, __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, 2429, __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, 2427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":2426 + /* "lxml/etree.pyx":2424 * _assertValidNode(self._element) * result = _getAttributeValue(self._element, key, None) * if result is None: # <<<<<<<<<<<<<< @@ -76349,36 +71954,34 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_8pop(struct __pyx_obj_4lxml_5etr goto __pyx_L4; } - /* "lxml/etree.pyx":2431 + /* "lxml/etree.pyx":2429 * result = default[0] * else: * _delAttribute(self._element, key) # <<<<<<<<<<<<<< * return result * */ - __Pyx_TraceLine(2431,0,__PYX_ERR(0, 2431, __pyx_L1_error)) /*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, 2431, __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, 2429, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L4:; - /* "lxml/etree.pyx":2432 + /* "lxml/etree.pyx":2430 * else: * _delAttribute(self._element, key) * return result # <<<<<<<<<<<<<< * * def clear(self): */ - __Pyx_TraceLine(2432,0,__PYX_ERR(0, 2432, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "lxml/etree.pyx":2421 + /* "lxml/etree.pyx":2419 * _setAttributeValue(self._element, key, value) * * def pop(self, key, *default): # <<<<<<<<<<<<<< @@ -76395,12 +71998,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_8pop(struct __pyx_obj_4lxml_5etr __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2434 +/* "lxml/etree.pyx":2432 * return result * * def clear(self): # <<<<<<<<<<<<<< @@ -76425,64 +72027,57 @@ static PyObject *__pyx_pw_4lxml_5etree_7_Attrib_11clear(PyObject *__pyx_v_self, static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_10clear(struct __pyx_obj_4lxml_5etree__Attrib *__pyx_v_self) { xmlNode *__pyx_v_c_node; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; xmlNode *__pyx_t_3; int __pyx_t_4; - __Pyx_TraceFrameInit(__pyx_codeobj__149) __Pyx_RefNannySetupContext("clear", 0); - __Pyx_TraceCall("clear", __pyx_f[0], 2434, 0, __PYX_ERR(0, 2434, __pyx_L1_error)); - /* "lxml/etree.pyx":2435 + /* "lxml/etree.pyx":2433 * * def clear(self): * _assertValidNode(self._element) # <<<<<<<<<<<<<< * cdef xmlNode* c_node = self._element._c_node * while c_node.properties is not NULL: */ - __Pyx_TraceLine(2435,0,__PYX_ERR(0, 2435, __pyx_L1_error)) __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, 2435, __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, 2433, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2436 + /* "lxml/etree.pyx":2434 * def clear(self): * _assertValidNode(self._element) * cdef xmlNode* c_node = self._element._c_node # <<<<<<<<<<<<<< * while c_node.properties is not NULL: * tree.xmlRemoveProp(c_node.properties) */ - __Pyx_TraceLine(2436,0,__PYX_ERR(0, 2436, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->_element->_c_node; __pyx_v_c_node = __pyx_t_3; - /* "lxml/etree.pyx":2437 + /* "lxml/etree.pyx":2435 * _assertValidNode(self._element) * cdef xmlNode* c_node = self._element._c_node * while c_node.properties is not NULL: # <<<<<<<<<<<<<< * tree.xmlRemoveProp(c_node.properties) * */ - __Pyx_TraceLine(2437,0,__PYX_ERR(0, 2437, __pyx_L1_error)) while (1) { __pyx_t_4 = ((__pyx_v_c_node->properties != NULL) != 0); if (!__pyx_t_4) break; - /* "lxml/etree.pyx":2438 + /* "lxml/etree.pyx":2436 * cdef xmlNode* c_node = self._element._c_node * while c_node.properties is not NULL: * tree.xmlRemoveProp(c_node.properties) # <<<<<<<<<<<<<< * * # ACCESSORS */ - __Pyx_TraceLine(2438,0,__PYX_ERR(0, 2438, __pyx_L1_error)) (void)(xmlRemoveProp(__pyx_v_c_node->properties)); } - /* "lxml/etree.pyx":2434 + /* "lxml/etree.pyx":2432 * return result * * def clear(self): # <<<<<<<<<<<<<< @@ -76499,12 +72094,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_10clear(struct __pyx_obj_4lxml_5 __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2441 +/* "lxml/etree.pyx":2439 * * # ACCESSORS * def __repr__(self): # <<<<<<<<<<<<<< @@ -76527,49 +72121,45 @@ static PyObject *__pyx_pw_4lxml_5etree_7_Attrib_13__repr__(PyObject *__pyx_v_sel static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_12__repr__(struct __pyx_obj_4lxml_5etree__Attrib *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[0], 2441, 0, __PYX_ERR(0, 2441, __pyx_L1_error)); - /* "lxml/etree.pyx":2442 + /* "lxml/etree.pyx":2440 * # ACCESSORS * def __repr__(self): * _assertValidNode(self._element) # <<<<<<<<<<<<<< * return repr(dict( _collectAttributes(self._element._c_node, 3) )) * */ - __Pyx_TraceLine(2442,0,__PYX_ERR(0, 2442, __pyx_L1_error)) __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, 2442, __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, 2440, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2443 + /* "lxml/etree.pyx":2441 * def __repr__(self): * _assertValidNode(self._element) * return repr(dict( _collectAttributes(self._element._c_node, 3) )) # <<<<<<<<<<<<<< * * def __copy__(self): */ - __Pyx_TraceLine(2443,0,__PYX_ERR(0, 2443, __pyx_L1_error)) __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, 2443, __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, 2441, __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, 2443, __pyx_L1_error) + __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_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, 2443, __pyx_L1_error) + __pyx_t_1 = PyObject_Repr(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2441, __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":2441 + /* "lxml/etree.pyx":2439 * * # ACCESSORS * def __repr__(self): # <<<<<<<<<<<<<< @@ -76585,12 +72175,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_12__repr__(struct __pyx_obj_4lxm __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2445 +/* "lxml/etree.pyx":2443 * return repr(dict( _collectAttributes(self._element._c_node, 3) )) * * def __copy__(self): # <<<<<<<<<<<<<< @@ -76614,47 +72203,42 @@ static PyObject *__pyx_pw_4lxml_5etree_7_Attrib_15__copy__(PyObject *__pyx_v_sel static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_14__copy__(struct __pyx_obj_4lxml_5etree__Attrib *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__150) __Pyx_RefNannySetupContext("__copy__", 0); - __Pyx_TraceCall("__copy__", __pyx_f[0], 2445, 0, __PYX_ERR(0, 2445, __pyx_L1_error)); - /* "lxml/etree.pyx":2446 + /* "lxml/etree.pyx":2444 * * def __copy__(self): * _assertValidNode(self._element) # <<<<<<<<<<<<<< * return dict(_collectAttributes(self._element._c_node, 3)) * */ - __Pyx_TraceLine(2446,0,__PYX_ERR(0, 2446, __pyx_L1_error)) __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, 2446, __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":2447 + /* "lxml/etree.pyx":2445 * def __copy__(self): * _assertValidNode(self._element) * return dict(_collectAttributes(self._element._c_node, 3)) # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __Pyx_TraceLine(2447,0,__PYX_ERR(0, 2447, __pyx_L1_error)) __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, 2447, __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, 2445, __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, 2447, __pyx_L1_error) + __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_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":2445 + /* "lxml/etree.pyx":2443 * return repr(dict( _collectAttributes(self._element._c_node, 3) )) * * def __copy__(self): # <<<<<<<<<<<<<< @@ -76670,12 +72254,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_14__copy__(struct __pyx_obj_4lxm __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2449 +/* "lxml/etree.pyx":2447 * return dict(_collectAttributes(self._element._c_node, 3)) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -76699,47 +72282,42 @@ static PyObject *__pyx_pw_4lxml_5etree_7_Attrib_17__deepcopy__(PyObject *__pyx_v static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_16__deepcopy__(struct __pyx_obj_4lxml_5etree__Attrib *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_memo) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__151) __Pyx_RefNannySetupContext("__deepcopy__", 0); - __Pyx_TraceCall("__deepcopy__", __pyx_f[0], 2449, 0, __PYX_ERR(0, 2449, __pyx_L1_error)); - /* "lxml/etree.pyx":2450 + /* "lxml/etree.pyx":2448 * * def __deepcopy__(self, memo): * _assertValidNode(self._element) # <<<<<<<<<<<<<< * return dict(_collectAttributes(self._element._c_node, 3)) * */ - __Pyx_TraceLine(2450,0,__PYX_ERR(0, 2450, __pyx_L1_error)) __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, 2450, __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, 2448, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2451 + /* "lxml/etree.pyx":2449 * def __deepcopy__(self, memo): * _assertValidNode(self._element) * return dict(_collectAttributes(self._element._c_node, 3)) # <<<<<<<<<<<<<< * * def __getitem__(self, key): */ - __Pyx_TraceLine(2451,0,__PYX_ERR(0, 2451, __pyx_L1_error)) __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, 2451, __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, 2449, __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, 2451, __pyx_L1_error) + __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_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":2449 + /* "lxml/etree.pyx":2447 * return dict(_collectAttributes(self._element._c_node, 3)) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -76755,12 +72333,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_16__deepcopy__(struct __pyx_obj_ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2453 +/* "lxml/etree.pyx":2451 * return dict(_collectAttributes(self._element._c_node, 3)) * * def __getitem__(self, key): # <<<<<<<<<<<<<< @@ -76784,7 +72361,6 @@ static PyObject *__pyx_pw_4lxml_5etree_7_Attrib_19__getitem__(PyObject *__pyx_v_ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_18__getitem__(struct __pyx_obj_4lxml_5etree__Attrib *__pyx_v_self, PyObject *__pyx_v_key) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -76792,61 +72368,56 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_18__getitem__(struct __pyx_obj_4 int __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("__getitem__", 0); - __Pyx_TraceCall("__getitem__", __pyx_f[0], 2453, 0, __PYX_ERR(0, 2453, __pyx_L1_error)); - /* "lxml/etree.pyx":2454 + /* "lxml/etree.pyx":2452 * * def __getitem__(self, key): * _assertValidNode(self._element) # <<<<<<<<<<<<<< * result = _getAttributeValue(self._element, key, None) * if result is None: */ - __Pyx_TraceLine(2454,0,__PYX_ERR(0, 2454, __pyx_L1_error)) __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, 2454, __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, 2452, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2455 + /* "lxml/etree.pyx":2453 * def __getitem__(self, key): * _assertValidNode(self._element) * result = _getAttributeValue(self._element, key, None) # <<<<<<<<<<<<<< * if result is None: * raise KeyError, key */ - __Pyx_TraceLine(2455,0,__PYX_ERR(0, 2455, __pyx_L1_error)) __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, 2455, __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, 2453, __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":2456 + /* "lxml/etree.pyx":2454 * _assertValidNode(self._element) * result = _getAttributeValue(self._element, key, None) * if result is None: # <<<<<<<<<<<<<< * raise KeyError, key * return result */ - __Pyx_TraceLine(2456,0,__PYX_ERR(0, 2456, __pyx_L1_error)) __pyx_t_4 = (__pyx_v_result == Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (unlikely(__pyx_t_5)) { - /* "lxml/etree.pyx":2457 + /* "lxml/etree.pyx":2455 * result = _getAttributeValue(self._element, key, None) * if result is None: * raise KeyError, key # <<<<<<<<<<<<<< * return result * */ - __Pyx_TraceLine(2457,0,__PYX_ERR(0, 2457, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_KeyError, __pyx_v_key, 0, 0); - __PYX_ERR(0, 2457, __pyx_L1_error) + __PYX_ERR(0, 2455, __pyx_L1_error) - /* "lxml/etree.pyx":2456 + /* "lxml/etree.pyx":2454 * _assertValidNode(self._element) * result = _getAttributeValue(self._element, key, None) * if result is None: # <<<<<<<<<<<<<< @@ -76855,20 +72426,19 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_18__getitem__(struct __pyx_obj_4 */ } - /* "lxml/etree.pyx":2458 + /* "lxml/etree.pyx":2456 * if result is None: * raise KeyError, key * return result # <<<<<<<<<<<<<< * * def __bool__(self): */ - __Pyx_TraceLine(2458,0,__PYX_ERR(0, 2458, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "lxml/etree.pyx":2453 + /* "lxml/etree.pyx":2451 * return dict(_collectAttributes(self._element._c_node, 3)) * * def __getitem__(self, key): # <<<<<<<<<<<<<< @@ -76885,12 +72455,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_18__getitem__(struct __pyx_obj_4 __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2460 +/* "lxml/etree.pyx":2458 * return result * * def __bool__(self): # <<<<<<<<<<<<<< @@ -76914,74 +72483,67 @@ static int __pyx_pw_4lxml_5etree_7_Attrib_21__bool__(PyObject *__pyx_v_self) { static int __pyx_pf_4lxml_5etree_7_Attrib_20__bool__(struct __pyx_obj_4lxml_5etree__Attrib *__pyx_v_self) { xmlAttr *__pyx_v_c_attr; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; xmlAttr *__pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("__bool__", 0); - __Pyx_TraceCall("__bool__", __pyx_f[0], 2460, 0, __PYX_ERR(0, 2460, __pyx_L1_error)); - /* "lxml/etree.pyx":2461 + /* "lxml/etree.pyx":2459 * * def __bool__(self): * _assertValidNode(self._element) # <<<<<<<<<<<<<< * cdef xmlAttr* c_attr = self._element._c_node.properties * while c_attr is not NULL: */ - __Pyx_TraceLine(2461,0,__PYX_ERR(0, 2461, __pyx_L1_error)) __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, 2461, __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":2462 + /* "lxml/etree.pyx":2460 * def __bool__(self): * _assertValidNode(self._element) * cdef xmlAttr* c_attr = self._element._c_node.properties # <<<<<<<<<<<<<< * while c_attr is not NULL: * if c_attr.type == tree.XML_ATTRIBUTE_NODE: */ - __Pyx_TraceLine(2462,0,__PYX_ERR(0, 2462, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->_element->_c_node->properties; __pyx_v_c_attr = __pyx_t_3; - /* "lxml/etree.pyx":2463 + /* "lxml/etree.pyx":2461 * _assertValidNode(self._element) * cdef xmlAttr* c_attr = self._element._c_node.properties * while c_attr is not NULL: # <<<<<<<<<<<<<< * if c_attr.type == tree.XML_ATTRIBUTE_NODE: * return 1 */ - __Pyx_TraceLine(2463,0,__PYX_ERR(0, 2463, __pyx_L1_error)) while (1) { __pyx_t_4 = ((__pyx_v_c_attr != NULL) != 0); if (!__pyx_t_4) break; - /* "lxml/etree.pyx":2464 + /* "lxml/etree.pyx":2462 * cdef xmlAttr* c_attr = self._element._c_node.properties * while c_attr is not NULL: * if c_attr.type == tree.XML_ATTRIBUTE_NODE: # <<<<<<<<<<<<<< * return 1 * c_attr = c_attr.next */ - __Pyx_TraceLine(2464,0,__PYX_ERR(0, 2464, __pyx_L1_error)) __pyx_t_4 = ((__pyx_v_c_attr->type == XML_ATTRIBUTE_NODE) != 0); if (__pyx_t_4) { - /* "lxml/etree.pyx":2465 + /* "lxml/etree.pyx":2463 * while c_attr is not NULL: * if c_attr.type == tree.XML_ATTRIBUTE_NODE: * return 1 # <<<<<<<<<<<<<< * c_attr = c_attr.next * return 0 */ - __Pyx_TraceLine(2465,0,__PYX_ERR(0, 2465, __pyx_L1_error)) __pyx_r = 1; goto __pyx_L0; - /* "lxml/etree.pyx":2464 + /* "lxml/etree.pyx":2462 * cdef xmlAttr* c_attr = self._element._c_node.properties * while c_attr is not NULL: * if c_attr.type == tree.XML_ATTRIBUTE_NODE: # <<<<<<<<<<<<<< @@ -76990,30 +72552,28 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_20__bool__(struct __pyx_obj_4lxml_5etr */ } - /* "lxml/etree.pyx":2466 + /* "lxml/etree.pyx":2464 * if c_attr.type == tree.XML_ATTRIBUTE_NODE: * return 1 * c_attr = c_attr.next # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(2466,0,__PYX_ERR(0, 2466, __pyx_L1_error)) __pyx_t_3 = __pyx_v_c_attr->next; __pyx_v_c_attr = __pyx_t_3; } - /* "lxml/etree.pyx":2467 + /* "lxml/etree.pyx":2465 * return 1 * c_attr = c_attr.next * return 0 # <<<<<<<<<<<<<< * * def __len__(self): */ - __Pyx_TraceLine(2467,0,__PYX_ERR(0, 2467, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2460 + /* "lxml/etree.pyx":2458 * return result * * def __bool__(self): # <<<<<<<<<<<<<< @@ -77027,12 +72587,11 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_20__bool__(struct __pyx_obj_4lxml_5etr __Pyx_AddTraceback("lxml.etree._Attrib.__bool__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2469 +/* "lxml/etree.pyx":2467 * return 0 * * def __len__(self): # <<<<<<<<<<<<<< @@ -77057,83 +72616,75 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_7_Attrib_22__len__(struct __pyx_obj_4lxm xmlAttr *__pyx_v_c_attr; Py_ssize_t __pyx_v_c; Py_ssize_t __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; xmlAttr *__pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("__len__", 0); - __Pyx_TraceCall("__len__", __pyx_f[0], 2469, 0, __PYX_ERR(0, 2469, __pyx_L1_error)); - /* "lxml/etree.pyx":2470 + /* "lxml/etree.pyx":2468 * * def __len__(self): * _assertValidNode(self._element) # <<<<<<<<<<<<<< * cdef xmlAttr* c_attr = self._element._c_node.properties * cdef Py_ssize_t c = 0 */ - __Pyx_TraceLine(2470,0,__PYX_ERR(0, 2470, __pyx_L1_error)) __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, 2470, __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, 2468, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2471 + /* "lxml/etree.pyx":2469 * def __len__(self): * _assertValidNode(self._element) * cdef xmlAttr* c_attr = self._element._c_node.properties # <<<<<<<<<<<<<< * cdef Py_ssize_t c = 0 * while c_attr is not NULL: */ - __Pyx_TraceLine(2471,0,__PYX_ERR(0, 2471, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->_element->_c_node->properties; __pyx_v_c_attr = __pyx_t_3; - /* "lxml/etree.pyx":2472 + /* "lxml/etree.pyx":2470 * _assertValidNode(self._element) * cdef xmlAttr* c_attr = self._element._c_node.properties * cdef Py_ssize_t c = 0 # <<<<<<<<<<<<<< * while c_attr is not NULL: * if c_attr.type == tree.XML_ATTRIBUTE_NODE: */ - __Pyx_TraceLine(2472,0,__PYX_ERR(0, 2472, __pyx_L1_error)) __pyx_v_c = 0; - /* "lxml/etree.pyx":2473 + /* "lxml/etree.pyx":2471 * cdef xmlAttr* c_attr = self._element._c_node.properties * cdef Py_ssize_t c = 0 * while c_attr is not NULL: # <<<<<<<<<<<<<< * if c_attr.type == tree.XML_ATTRIBUTE_NODE: * c += 1 */ - __Pyx_TraceLine(2473,0,__PYX_ERR(0, 2473, __pyx_L1_error)) while (1) { __pyx_t_4 = ((__pyx_v_c_attr != NULL) != 0); if (!__pyx_t_4) break; - /* "lxml/etree.pyx":2474 + /* "lxml/etree.pyx":2472 * cdef Py_ssize_t c = 0 * while c_attr is not NULL: * if c_attr.type == tree.XML_ATTRIBUTE_NODE: # <<<<<<<<<<<<<< * c += 1 * c_attr = c_attr.next */ - __Pyx_TraceLine(2474,0,__PYX_ERR(0, 2474, __pyx_L1_error)) __pyx_t_4 = ((__pyx_v_c_attr->type == XML_ATTRIBUTE_NODE) != 0); if (__pyx_t_4) { - /* "lxml/etree.pyx":2475 + /* "lxml/etree.pyx":2473 * while c_attr is not NULL: * if c_attr.type == tree.XML_ATTRIBUTE_NODE: * c += 1 # <<<<<<<<<<<<<< * c_attr = c_attr.next * return c */ - __Pyx_TraceLine(2475,0,__PYX_ERR(0, 2475, __pyx_L1_error)) __pyx_v_c = (__pyx_v_c + 1); - /* "lxml/etree.pyx":2474 + /* "lxml/etree.pyx":2472 * cdef Py_ssize_t c = 0 * while c_attr is not NULL: * if c_attr.type == tree.XML_ATTRIBUTE_NODE: # <<<<<<<<<<<<<< @@ -77142,30 +72693,28 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_7_Attrib_22__len__(struct __pyx_obj_4lxm */ } - /* "lxml/etree.pyx":2476 + /* "lxml/etree.pyx":2474 * if c_attr.type == tree.XML_ATTRIBUTE_NODE: * c += 1 * c_attr = c_attr.next # <<<<<<<<<<<<<< * return c * */ - __Pyx_TraceLine(2476,0,__PYX_ERR(0, 2476, __pyx_L1_error)) __pyx_t_3 = __pyx_v_c_attr->next; __pyx_v_c_attr = __pyx_t_3; } - /* "lxml/etree.pyx":2477 + /* "lxml/etree.pyx":2475 * c += 1 * c_attr = c_attr.next * return c # <<<<<<<<<<<<<< * * def get(self, key, default=None): */ - __Pyx_TraceLine(2477,0,__PYX_ERR(0, 2477, __pyx_L1_error)) __pyx_r = __pyx_v_c; goto __pyx_L0; - /* "lxml/etree.pyx":2469 + /* "lxml/etree.pyx":2467 * return 0 * * def __len__(self): # <<<<<<<<<<<<<< @@ -77179,12 +72728,11 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_7_Attrib_22__len__(struct __pyx_obj_4lxm __Pyx_AddTraceback("lxml.etree._Attrib.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2479 +/* "lxml/etree.pyx":2477 * return c * * def get(self, key, default=None): # <<<<<<<<<<<<<< @@ -77194,7 +72742,7 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_7_Attrib_22__len__(struct __pyx_obj_4lxm /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_7_Attrib_25get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_5etree_7_Attrib_25get = {"get", (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_25get, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_5etree_7_Attrib_25get = {"get", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_7_Attrib_25get, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_5etree_7_Attrib_25get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_key = 0; PyObject *__pyx_v_default = 0; @@ -77229,7 +72777,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, 2479, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) __PYX_ERR(0, 2477, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -77245,7 +72793,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, 2479, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2477, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._Attrib.get", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -77260,47 +72808,42 @@ static PyObject *__pyx_pw_4lxml_5etree_7_Attrib_25get(PyObject *__pyx_v_self, Py static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_24get(struct __pyx_obj_4lxml_5etree__Attrib *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__152) __Pyx_RefNannySetupContext("get", 0); - __Pyx_TraceCall("get", __pyx_f[0], 2479, 0, __PYX_ERR(0, 2479, __pyx_L1_error)); - /* "lxml/etree.pyx":2480 + /* "lxml/etree.pyx":2478 * * def get(self, key, default=None): * _assertValidNode(self._element) # <<<<<<<<<<<<<< * return _getAttributeValue(self._element, key, default) * */ - __Pyx_TraceLine(2480,0,__PYX_ERR(0, 2480, __pyx_L1_error)) __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, 2480, __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, 2478, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2481 + /* "lxml/etree.pyx":2479 * def get(self, key, default=None): * _assertValidNode(self._element) * return _getAttributeValue(self._element, key, default) # <<<<<<<<<<<<<< * * def keys(self): */ - __Pyx_TraceLine(2481,0,__PYX_ERR(0, 2481, __pyx_L1_error)) __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, 2481, __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, 2479, __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":2479 + /* "lxml/etree.pyx":2477 * return c * * def get(self, key, default=None): # <<<<<<<<<<<<<< @@ -77316,12 +72859,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_24get(struct __pyx_obj_4lxml_5et __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2483 +/* "lxml/etree.pyx":2481 * return _getAttributeValue(self._element, key, default) * * def keys(self): # <<<<<<<<<<<<<< @@ -77345,43 +72887,38 @@ static PyObject *__pyx_pw_4lxml_5etree_7_Attrib_27keys(PyObject *__pyx_v_self, C static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_26keys(struct __pyx_obj_4lxml_5etree__Attrib *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; - __Pyx_TraceFrameInit(__pyx_codeobj__153) __Pyx_RefNannySetupContext("keys", 0); - __Pyx_TraceCall("keys", __pyx_f[0], 2483, 0, __PYX_ERR(0, 2483, __pyx_L1_error)); - /* "lxml/etree.pyx":2484 + /* "lxml/etree.pyx":2482 * * def keys(self): * _assertValidNode(self._element) # <<<<<<<<<<<<<< * return _collectAttributes(self._element._c_node, 1) * */ - __Pyx_TraceLine(2484,0,__PYX_ERR(0, 2484, __pyx_L1_error)) __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, 2484, __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, 2482, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2485 + /* "lxml/etree.pyx":2483 * def keys(self): * _assertValidNode(self._element) * return _collectAttributes(self._element._c_node, 1) # <<<<<<<<<<<<<< * * def __iter__(self): */ - __Pyx_TraceLine(2485,0,__PYX_ERR(0, 2485, __pyx_L1_error)) __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, 2485, __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, 2483, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2483 + /* "lxml/etree.pyx":2481 * return _getAttributeValue(self._element, key, default) * * def keys(self): # <<<<<<<<<<<<<< @@ -77396,12 +72933,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_26keys(struct __pyx_obj_4lxml_5e __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2487 +/* "lxml/etree.pyx":2485 * return _collectAttributes(self._element._c_node, 1) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -77424,46 +72960,42 @@ static PyObject *__pyx_pw_4lxml_5etree_7_Attrib_29__iter__(PyObject *__pyx_v_sel static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_28__iter__(struct __pyx_obj_4lxml_5etree__Attrib *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__iter__", 0); - __Pyx_TraceCall("__iter__", __pyx_f[0], 2487, 0, __PYX_ERR(0, 2487, __pyx_L1_error)); - /* "lxml/etree.pyx":2488 + /* "lxml/etree.pyx":2486 * * def __iter__(self): * _assertValidNode(self._element) # <<<<<<<<<<<<<< * return iter(_collectAttributes(self._element._c_node, 1)) * */ - __Pyx_TraceLine(2488,0,__PYX_ERR(0, 2488, __pyx_L1_error)) __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, 2488, __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, 2486, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2489 + /* "lxml/etree.pyx":2487 * def __iter__(self): * _assertValidNode(self._element) * return iter(_collectAttributes(self._element._c_node, 1)) # <<<<<<<<<<<<<< * * def iterkeys(self): */ - __Pyx_TraceLine(2489,0,__PYX_ERR(0, 2489, __pyx_L1_error)) __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, 2489, __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, 2487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2489, __pyx_L1_error) + __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2487, __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":2487 + /* "lxml/etree.pyx":2485 * return _collectAttributes(self._element._c_node, 1) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -77479,12 +73011,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_28__iter__(struct __pyx_obj_4lxm __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2491 +/* "lxml/etree.pyx":2489 * return iter(_collectAttributes(self._element._c_node, 1)) * * def iterkeys(self): # <<<<<<<<<<<<<< @@ -77508,47 +73039,42 @@ static PyObject *__pyx_pw_4lxml_5etree_7_Attrib_31iterkeys(PyObject *__pyx_v_sel static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_30iterkeys(struct __pyx_obj_4lxml_5etree__Attrib *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__154) __Pyx_RefNannySetupContext("iterkeys", 0); - __Pyx_TraceCall("iterkeys", __pyx_f[0], 2491, 0, __PYX_ERR(0, 2491, __pyx_L1_error)); - /* "lxml/etree.pyx":2492 + /* "lxml/etree.pyx":2490 * * def iterkeys(self): * _assertValidNode(self._element) # <<<<<<<<<<<<<< * return iter(_collectAttributes(self._element._c_node, 1)) * */ - __Pyx_TraceLine(2492,0,__PYX_ERR(0, 2492, __pyx_L1_error)) __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, 2492, __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, 2490, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2493 + /* "lxml/etree.pyx":2491 * def iterkeys(self): * _assertValidNode(self._element) * return iter(_collectAttributes(self._element._c_node, 1)) # <<<<<<<<<<<<<< * * def values(self): */ - __Pyx_TraceLine(2493,0,__PYX_ERR(0, 2493, __pyx_L1_error)) __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, 2493, __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, 2491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2493, __pyx_L1_error) + __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2491, __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":2491 + /* "lxml/etree.pyx":2489 * return iter(_collectAttributes(self._element._c_node, 1)) * * def iterkeys(self): # <<<<<<<<<<<<<< @@ -77564,12 +73090,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_30iterkeys(struct __pyx_obj_4lxm __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2495 +/* "lxml/etree.pyx":2493 * return iter(_collectAttributes(self._element._c_node, 1)) * * def values(self): # <<<<<<<<<<<<<< @@ -77593,43 +73118,38 @@ static PyObject *__pyx_pw_4lxml_5etree_7_Attrib_33values(PyObject *__pyx_v_self, static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_32values(struct __pyx_obj_4lxml_5etree__Attrib *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; - __Pyx_TraceFrameInit(__pyx_codeobj__155) __Pyx_RefNannySetupContext("values", 0); - __Pyx_TraceCall("values", __pyx_f[0], 2495, 0, __PYX_ERR(0, 2495, __pyx_L1_error)); - /* "lxml/etree.pyx":2496 + /* "lxml/etree.pyx":2494 * * def values(self): * _assertValidNode(self._element) # <<<<<<<<<<<<<< * return _collectAttributes(self._element._c_node, 2) * */ - __Pyx_TraceLine(2496,0,__PYX_ERR(0, 2496, __pyx_L1_error)) __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, 2496, __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, 2494, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2497 + /* "lxml/etree.pyx":2495 * def values(self): * _assertValidNode(self._element) * return _collectAttributes(self._element._c_node, 2) # <<<<<<<<<<<<<< * * def itervalues(self): */ - __Pyx_TraceLine(2497,0,__PYX_ERR(0, 2497, __pyx_L1_error)) __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, 2497, __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, 2495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2495 + /* "lxml/etree.pyx":2493 * return iter(_collectAttributes(self._element._c_node, 1)) * * def values(self): # <<<<<<<<<<<<<< @@ -77644,12 +73164,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_32values(struct __pyx_obj_4lxml_ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2499 +/* "lxml/etree.pyx":2497 * return _collectAttributes(self._element._c_node, 2) * * def itervalues(self): # <<<<<<<<<<<<<< @@ -77673,47 +73192,42 @@ static PyObject *__pyx_pw_4lxml_5etree_7_Attrib_35itervalues(PyObject *__pyx_v_s static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_34itervalues(struct __pyx_obj_4lxml_5etree__Attrib *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__156) __Pyx_RefNannySetupContext("itervalues", 0); - __Pyx_TraceCall("itervalues", __pyx_f[0], 2499, 0, __PYX_ERR(0, 2499, __pyx_L1_error)); - /* "lxml/etree.pyx":2500 + /* "lxml/etree.pyx":2498 * * def itervalues(self): * _assertValidNode(self._element) # <<<<<<<<<<<<<< * return iter(_collectAttributes(self._element._c_node, 2)) * */ - __Pyx_TraceLine(2500,0,__PYX_ERR(0, 2500, __pyx_L1_error)) __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, 2500, __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, 2498, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2501 + /* "lxml/etree.pyx":2499 * def itervalues(self): * _assertValidNode(self._element) * return iter(_collectAttributes(self._element._c_node, 2)) # <<<<<<<<<<<<<< * * def items(self): */ - __Pyx_TraceLine(2501,0,__PYX_ERR(0, 2501, __pyx_L1_error)) __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, 2501, __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, 2499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2501, __pyx_L1_error) + __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2499, __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":2499 + /* "lxml/etree.pyx":2497 * return _collectAttributes(self._element._c_node, 2) * * def itervalues(self): # <<<<<<<<<<<<<< @@ -77729,12 +73243,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_34itervalues(struct __pyx_obj_4l __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2503 +/* "lxml/etree.pyx":2501 * return iter(_collectAttributes(self._element._c_node, 2)) * * def items(self): # <<<<<<<<<<<<<< @@ -77758,43 +73271,38 @@ static PyObject *__pyx_pw_4lxml_5etree_7_Attrib_37items(PyObject *__pyx_v_self, static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_36items(struct __pyx_obj_4lxml_5etree__Attrib *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; - __Pyx_TraceFrameInit(__pyx_codeobj__157) __Pyx_RefNannySetupContext("items", 0); - __Pyx_TraceCall("items", __pyx_f[0], 2503, 0, __PYX_ERR(0, 2503, __pyx_L1_error)); - /* "lxml/etree.pyx":2504 + /* "lxml/etree.pyx":2502 * * def items(self): * _assertValidNode(self._element) # <<<<<<<<<<<<<< * return _collectAttributes(self._element._c_node, 3) * */ - __Pyx_TraceLine(2504,0,__PYX_ERR(0, 2504, __pyx_L1_error)) __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, 2504, __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, 2502, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2505 + /* "lxml/etree.pyx":2503 * def items(self): * _assertValidNode(self._element) * return _collectAttributes(self._element._c_node, 3) # <<<<<<<<<<<<<< * * def iteritems(self): */ - __Pyx_TraceLine(2505,0,__PYX_ERR(0, 2505, __pyx_L1_error)) __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, 2505, __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, 2503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2503 + /* "lxml/etree.pyx":2501 * return iter(_collectAttributes(self._element._c_node, 2)) * * def items(self): # <<<<<<<<<<<<<< @@ -77809,12 +73317,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_36items(struct __pyx_obj_4lxml_5 __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2507 +/* "lxml/etree.pyx":2505 * return _collectAttributes(self._element._c_node, 3) * * def iteritems(self): # <<<<<<<<<<<<<< @@ -77838,47 +73345,42 @@ static PyObject *__pyx_pw_4lxml_5etree_7_Attrib_39iteritems(PyObject *__pyx_v_se static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_38iteritems(struct __pyx_obj_4lxml_5etree__Attrib *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__158) __Pyx_RefNannySetupContext("iteritems", 0); - __Pyx_TraceCall("iteritems", __pyx_f[0], 2507, 0, __PYX_ERR(0, 2507, __pyx_L1_error)); - /* "lxml/etree.pyx":2508 + /* "lxml/etree.pyx":2506 * * def iteritems(self): * _assertValidNode(self._element) # <<<<<<<<<<<<<< * return iter(_collectAttributes(self._element._c_node, 3)) * */ - __Pyx_TraceLine(2508,0,__PYX_ERR(0, 2508, __pyx_L1_error)) __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, 2508, __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, 2506, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2509 + /* "lxml/etree.pyx":2507 * def iteritems(self): * _assertValidNode(self._element) * return iter(_collectAttributes(self._element._c_node, 3)) # <<<<<<<<<<<<<< * * def has_key(self, key): */ - __Pyx_TraceLine(2509,0,__PYX_ERR(0, 2509, __pyx_L1_error)) __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, 2509, __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, 2507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2509, __pyx_L1_error) + __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2507, __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":2507 + /* "lxml/etree.pyx":2505 * return _collectAttributes(self._element._c_node, 3) * * def iteritems(self): # <<<<<<<<<<<<<< @@ -77894,12 +73396,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_38iteritems(struct __pyx_obj_4lx __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2511 +/* "lxml/etree.pyx":2509 * return iter(_collectAttributes(self._element._c_node, 3)) * * def has_key(self, key): # <<<<<<<<<<<<<< @@ -77923,45 +73424,40 @@ static PyObject *__pyx_pw_4lxml_5etree_7_Attrib_41has_key(PyObject *__pyx_v_self static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_40has_key(struct __pyx_obj_4lxml_5etree__Attrib *__pyx_v_self, PyObject *__pyx_v_key) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; - __Pyx_TraceFrameInit(__pyx_codeobj__159) __Pyx_RefNannySetupContext("has_key", 0); - __Pyx_TraceCall("has_key", __pyx_f[0], 2511, 0, __PYX_ERR(0, 2511, __pyx_L1_error)); - /* "lxml/etree.pyx":2512 + /* "lxml/etree.pyx":2510 * * def has_key(self, key): * _assertValidNode(self._element) # <<<<<<<<<<<<<< * return key in self * */ - __Pyx_TraceLine(2512,0,__PYX_ERR(0, 2512, __pyx_L1_error)) __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, 2512, __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, 2510, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2513 + /* "lxml/etree.pyx":2511 * def has_key(self, key): * _assertValidNode(self._element) * return key in self # <<<<<<<<<<<<<< * * def __contains__(self, key): */ - __Pyx_TraceLine(2513,0,__PYX_ERR(0, 2513, __pyx_L1_error)) __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, 2513, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2513, __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, 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_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2511 + /* "lxml/etree.pyx":2509 * return iter(_collectAttributes(self._element._c_node, 3)) * * def has_key(self, key): # <<<<<<<<<<<<<< @@ -77976,12 +73472,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_40has_key(struct __pyx_obj_4lxml __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2515 +/* "lxml/etree.pyx":2513 * return key in self * * def __contains__(self, key): # <<<<<<<<<<<<<< @@ -78008,7 +73503,6 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_42__contains__(struct __pyx_obj_4lxml_ PyObject *__pyx_v_tag = NULL; const xmlChar *__pyx_v_c_href; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -78018,30 +73512,27 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_42__contains__(struct __pyx_obj_4lxml_ const xmlChar *__pyx_t_6; int __pyx_t_7; __Pyx_RefNannySetupContext("__contains__", 0); - __Pyx_TraceCall("__contains__", __pyx_f[0], 2515, 0, __PYX_ERR(0, 2515, __pyx_L1_error)); - /* "lxml/etree.pyx":2516 + /* "lxml/etree.pyx":2514 * * def __contains__(self, key): * _assertValidNode(self._element) # <<<<<<<<<<<<<< * cdef xmlNode* c_node * ns, tag = _getNsTag(key) */ - __Pyx_TraceLine(2516,0,__PYX_ERR(0, 2516, __pyx_L1_error)) __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, 2516, __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, 2514, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2518 + /* "lxml/etree.pyx":2516 * _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_TraceLine(2518,0,__PYX_ERR(0, 2518, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2518, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(__pyx_t_1 != Py_None)) { PyObject* sequence = __pyx_t_1; @@ -78049,7 +73540,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, 2518, __pyx_L1_error) + __PYX_ERR(0, 2516, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); @@ -78057,39 +73548,37 @@ 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, 2518, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2518, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 2518, __pyx_L1_error) + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 2516, __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":2519 + /* "lxml/etree.pyx":2517 * cdef xmlNode* c_node * ns, tag = _getNsTag(key) * 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 */ - __Pyx_TraceLine(2519,0,__PYX_ERR(0, 2519, __pyx_L1_error)) __pyx_t_5 = __pyx_v_self->_element->_c_node; __pyx_v_c_node = __pyx_t_5; - /* "lxml/etree.pyx":2520 + /* "lxml/etree.pyx":2518 * ns, tag = _getNsTag(key) * 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 * */ - __Pyx_TraceLine(2520,0,__PYX_ERR(0, 2520, __pyx_L1_error)) __pyx_t_7 = (__pyx_v_ns == Py_None); if ((__pyx_t_7 != 0)) { __pyx_t_6 = ((const xmlChar *)NULL); @@ -78098,14 +73587,13 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_42__contains__(struct __pyx_obj_4lxml_ } __pyx_v_c_href = __pyx_t_6; - /* "lxml/etree.pyx":2521 + /* "lxml/etree.pyx":2519 * 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 # <<<<<<<<<<<<<< * * def __richcmp__(self, other, int op): */ - __Pyx_TraceLine(2521,0,__PYX_ERR(0, 2521, __pyx_L1_error)) if ((xmlHasNsProp(__pyx_v_c_node, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_tag), __pyx_v_c_href) != 0)) { __pyx_t_2 = 1; } else { @@ -78114,7 +73602,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":2515 + /* "lxml/etree.pyx":2513 * return key in self * * def __contains__(self, key): # <<<<<<<<<<<<<< @@ -78132,12 +73620,11 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_42__contains__(struct __pyx_obj_4lxml_ __pyx_L0:; __Pyx_XDECREF(__pyx_v_ns); __Pyx_XDECREF(__pyx_v_tag); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2523 +/* "lxml/etree.pyx":2521 * return 1 if tree.xmlHasNsProp(c_node, _xcstr(tag), c_href) else 0 * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< @@ -78161,7 +73648,6 @@ static PyObject *__pyx_pw_4lxml_5etree_7_Attrib_45__richcmp__(PyObject *__pyx_v_ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_44__richcmp__(struct __pyx_obj_4lxml_5etree__Attrib *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { PyObject *__pyx_v_one = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -78173,17 +73659,15 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_44__richcmp__(struct __pyx_obj_4 int __pyx_t_8; int __pyx_t_9; __Pyx_RefNannySetupContext("__richcmp__", 0); - __Pyx_TraceCall("__richcmp__", __pyx_f[0], 2523, 0, __PYX_ERR(0, 2523, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_other); - /* "lxml/etree.pyx":2524 + /* "lxml/etree.pyx":2522 * * def __richcmp__(self, other, int op): * try: # <<<<<<<<<<<<<< * one = dict(self.items()) * if not isinstance(other, dict): */ - __Pyx_TraceLine(2524,0,__PYX_ERR(0, 2524, __pyx_L3_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -78193,15 +73677,14 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_44__richcmp__(struct __pyx_obj_4 __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "lxml/etree.pyx":2525 + /* "lxml/etree.pyx":2523 * def __richcmp__(self, other, int op): * try: * one = dict(self.items()) # <<<<<<<<<<<<<< * if not isinstance(other, dict): * other = dict(other) */ - __Pyx_TraceLine(2525,0,__PYX_ERR(0, 2525, __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, 2525, __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, 2523, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -78213,46 +73696,41 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_44__richcmp__(struct __pyx_obj_4 __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2525, __pyx_L3_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2525, __pyx_L3_error) - } + __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) __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, 2525, __pyx_L3_error) + __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_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":2526 + /* "lxml/etree.pyx":2524 * try: * one = dict(self.items()) * if not isinstance(other, dict): # <<<<<<<<<<<<<< * other = dict(other) * except (TypeError, ValueError): */ - __Pyx_TraceLine(2526,0,__PYX_ERR(0, 2526, __pyx_L3_error)) __pyx_t_7 = PyDict_Check(__pyx_v_other); __pyx_t_8 = ((!(__pyx_t_7 != 0)) != 0); if (__pyx_t_8) { - /* "lxml/etree.pyx":2527 + /* "lxml/etree.pyx":2525 * one = dict(self.items()) * if not isinstance(other, dict): * other = dict(other) # <<<<<<<<<<<<<< * except (TypeError, ValueError): * return NotImplemented */ - __Pyx_TraceLine(2527,0,__PYX_ERR(0, 2527, __pyx_L3_error)) - __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_other); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2527, __pyx_L3_error) + __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_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_other, __pyx_t_5); __pyx_t_5 = 0; - /* "lxml/etree.pyx":2526 + /* "lxml/etree.pyx":2524 * try: * one = dict(self.items()) * if not isinstance(other, dict): # <<<<<<<<<<<<<< @@ -78261,7 +73739,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_44__richcmp__(struct __pyx_obj_4 */ } - /* "lxml/etree.pyx":2524 + /* "lxml/etree.pyx":2522 * * def __richcmp__(self, other, int op): * try: # <<<<<<<<<<<<<< @@ -78278,30 +73756,28 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_44__richcmp__(struct __pyx_obj_4 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/etree.pyx":2528 + /* "lxml/etree.pyx":2526 * if not isinstance(other, dict): * other = dict(other) * except (TypeError, ValueError): # <<<<<<<<<<<<<< * return NotImplemented * return python.PyObject_RichCompare(one, other, op) */ - __Pyx_TraceLine(2528,0,__PYX_ERR(0, 2528, __pyx_L5_except_error)) __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, 2528, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(0, 2526, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); - /* "lxml/etree.pyx":2529 + /* "lxml/etree.pyx":2527 * other = dict(other) * except (TypeError, ValueError): * return NotImplemented # <<<<<<<<<<<<<< * return python.PyObject_RichCompare(one, other, op) * */ - __Pyx_TraceLine(2529,0,__PYX_ERR(0, 2529, __pyx_L5_except_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_builtin_NotImplemented); __pyx_r = __pyx_builtin_NotImplemented; @@ -78313,7 +73789,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":2524 + /* "lxml/etree.pyx":2522 * * def __richcmp__(self, other, int op): * try: # <<<<<<<<<<<<<< @@ -78334,22 +73810,21 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_44__richcmp__(struct __pyx_obj_4 __pyx_L8_try_end:; } - /* "lxml/etree.pyx":2530 + /* "lxml/etree.pyx":2528 * except (TypeError, ValueError): * return NotImplemented * return python.PyObject_RichCompare(one, other, op) # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(2530,0,__PYX_ERR(0, 2530, __pyx_L1_error)) __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, 2530, __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, 2528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2523 + /* "lxml/etree.pyx":2521 * return 1 if tree.xmlHasNsProp(c_node, _xcstr(tag), c_href) else 0 * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< @@ -78368,12 +73843,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_44__richcmp__(struct __pyx_obj_4 __Pyx_XDECREF(__pyx_v_one); __Pyx_XDECREF(__pyx_v_other); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2542 +/* "lxml/etree.pyx":2540 * cdef xmlAttr* _c_attr * cdef int _keysvalues # 1 - keys, 2 - values, 3 - items (key, value) * def __iter__(self): # <<<<<<<<<<<<<< @@ -78396,25 +73870,22 @@ static PyObject *__pyx_pw_4lxml_5etree_15_AttribIterator_1__iter__(PyObject *__p static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator___iter__(struct __pyx_obj_4lxml_5etree__AttribIterator *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 0); - __Pyx_TraceCall("__iter__", __pyx_f[0], 2542, 0, __PYX_ERR(0, 2542, __pyx_L1_error)); - /* "lxml/etree.pyx":2543 + /* "lxml/etree.pyx":2541 * cdef int _keysvalues # 1 - keys, 2 - values, 3 - items (key, value) * def __iter__(self): * return self # <<<<<<<<<<<<<< * * def __next__(self): */ - __Pyx_TraceLine(2543,0,__PYX_ERR(0, 2543, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "lxml/etree.pyx":2542 + /* "lxml/etree.pyx":2540 * cdef xmlAttr* _c_attr * cdef int _keysvalues # 1 - keys, 2 - values, 3 - items (key, value) * def __iter__(self): # <<<<<<<<<<<<<< @@ -78423,17 +73894,13 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator___iter__(struct __pyx_o */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._AttribIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2545 +/* "lxml/etree.pyx":2543 * return self * * def __next__(self): # <<<<<<<<<<<<<< @@ -78457,7 +73924,6 @@ static PyObject *__pyx_pw_4lxml_5etree_15_AttribIterator_3__next__(PyObject *__p static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_obj_4lxml_5etree__AttribIterator *__pyx_v_self) { xmlAttr *__pyx_v_c_attr; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -78466,32 +73932,29 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__next__", 0); - __Pyx_TraceCall("__next__", __pyx_f[0], 2545, 0, __PYX_ERR(0, 2545, __pyx_L1_error)); - /* "lxml/etree.pyx":2547 + /* "lxml/etree.pyx":2545 * def __next__(self): * cdef xmlAttr* c_attr * if self._node is None: # <<<<<<<<<<<<<< * raise StopIteration * c_attr = self._c_attr */ - __Pyx_TraceLine(2547,0,__PYX_ERR(0, 2547, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_self->_node) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":2548 + /* "lxml/etree.pyx":2546 * cdef xmlAttr* c_attr * if self._node is None: * raise StopIteration # <<<<<<<<<<<<<< * c_attr = self._c_attr * while c_attr is not NULL and c_attr.type != tree.XML_ATTRIBUTE_NODE: */ - __Pyx_TraceLine(2548,0,__PYX_ERR(0, 2548, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); - __PYX_ERR(0, 2548, __pyx_L1_error) + __PYX_ERR(0, 2546, __pyx_L1_error) - /* "lxml/etree.pyx":2547 + /* "lxml/etree.pyx":2545 * def __next__(self): * cdef xmlAttr* c_attr * if self._node is None: # <<<<<<<<<<<<<< @@ -78500,25 +73963,23 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ */ } - /* "lxml/etree.pyx":2549 + /* "lxml/etree.pyx":2547 * if self._node is None: * raise StopIteration * c_attr = self._c_attr # <<<<<<<<<<<<<< * while c_attr is not NULL and c_attr.type != tree.XML_ATTRIBUTE_NODE: * c_attr = c_attr.next */ - __Pyx_TraceLine(2549,0,__PYX_ERR(0, 2549, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->_c_attr; __pyx_v_c_attr = __pyx_t_3; - /* "lxml/etree.pyx":2550 + /* "lxml/etree.pyx":2548 * raise StopIteration * c_attr = self._c_attr * while c_attr is not NULL and c_attr.type != tree.XML_ATTRIBUTE_NODE: # <<<<<<<<<<<<<< * c_attr = c_attr.next * if c_attr is NULL: */ - __Pyx_TraceLine(2550,0,__PYX_ERR(0, 2550, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_attr != NULL) != 0); if (__pyx_t_1) { @@ -78531,55 +73992,51 @@ 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":2551 + /* "lxml/etree.pyx":2549 * c_attr = self._c_attr * while c_attr is not NULL and c_attr.type != tree.XML_ATTRIBUTE_NODE: * c_attr = c_attr.next # <<<<<<<<<<<<<< * if c_attr is NULL: * self._node = None */ - __Pyx_TraceLine(2551,0,__PYX_ERR(0, 2551, __pyx_L1_error)) __pyx_t_3 = __pyx_v_c_attr->next; __pyx_v_c_attr = __pyx_t_3; } - /* "lxml/etree.pyx":2552 + /* "lxml/etree.pyx":2550 * while c_attr is not NULL and c_attr.type != tree.XML_ATTRIBUTE_NODE: * c_attr = c_attr.next * if c_attr is NULL: # <<<<<<<<<<<<<< * self._node = None * raise StopIteration */ - __Pyx_TraceLine(2552,0,__PYX_ERR(0, 2552, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_attr == NULL) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":2553 + /* "lxml/etree.pyx":2551 * c_attr = c_attr.next * if c_attr is NULL: * self._node = None # <<<<<<<<<<<<<< * raise StopIteration * */ - __Pyx_TraceLine(2553,0,__PYX_ERR(0, 2553, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_node); __Pyx_DECREF(((PyObject *)__pyx_v_self->_node)); __pyx_v_self->_node = ((struct LxmlElement *)Py_None); - /* "lxml/etree.pyx":2554 + /* "lxml/etree.pyx":2552 * if c_attr is NULL: * self._node = None * raise StopIteration # <<<<<<<<<<<<<< * * self._c_attr = c_attr.next */ - __Pyx_TraceLine(2554,0,__PYX_ERR(0, 2554, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); - __PYX_ERR(0, 2554, __pyx_L1_error) + __PYX_ERR(0, 2552, __pyx_L1_error) - /* "lxml/etree.pyx":2552 + /* "lxml/etree.pyx":2550 * while c_attr is not NULL and c_attr.type != tree.XML_ATTRIBUTE_NODE: * c_attr = c_attr.next * if c_attr is NULL: # <<<<<<<<<<<<<< @@ -78588,44 +74045,41 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ */ } - /* "lxml/etree.pyx":2556 + /* "lxml/etree.pyx":2554 * raise StopIteration * * self._c_attr = c_attr.next # <<<<<<<<<<<<<< * if self._keysvalues == 1: * return _namespacedName(c_attr) */ - __Pyx_TraceLine(2556,0,__PYX_ERR(0, 2556, __pyx_L1_error)) __pyx_t_3 = __pyx_v_c_attr->next; __pyx_v_self->_c_attr = __pyx_t_3; - /* "lxml/etree.pyx":2557 + /* "lxml/etree.pyx":2555 * * self._c_attr = c_attr.next * if self._keysvalues == 1: # <<<<<<<<<<<<<< * return _namespacedName(c_attr) * elif self._keysvalues == 2: */ - __Pyx_TraceLine(2557,0,__PYX_ERR(0, 2557, __pyx_L1_error)) switch (__pyx_v_self->_keysvalues) { case 1: - /* "lxml/etree.pyx":2558 + /* "lxml/etree.pyx":2556 * self._c_attr = c_attr.next * if self._keysvalues == 1: * return _namespacedName(c_attr) # <<<<<<<<<<<<<< * elif self._keysvalues == 2: * return _attributeValue(self._node._c_node, c_attr) */ - __Pyx_TraceLine(2558,0,__PYX_ERR(0, 2558, __pyx_L1_error)) __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, 2558, __pyx_L1_error) + __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_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2557 + /* "lxml/etree.pyx":2555 * * self._c_attr = c_attr.next * if self._keysvalues == 1: # <<<<<<<<<<<<<< @@ -78633,33 +74087,23 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ * elif self._keysvalues == 2: */ break; - - /* "lxml/etree.pyx":2559 - * if self._keysvalues == 1: - * return _namespacedName(c_attr) - * elif self._keysvalues == 2: # <<<<<<<<<<<<<< - * return _attributeValue(self._node._c_node, c_attr) - * else: - */ - __Pyx_TraceLine(2559,0,__PYX_ERR(0, 2559, __pyx_L1_error)) case 2: - /* "lxml/etree.pyx":2560 + /* "lxml/etree.pyx":2558 * return _namespacedName(c_attr) * elif self._keysvalues == 2: * return _attributeValue(self._node._c_node, c_attr) # <<<<<<<<<<<<<< * else: * return (_namespacedName(c_attr), */ - __Pyx_TraceLine(2560,0,__PYX_ERR(0, 2560, __pyx_L1_error)) __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, 2560, __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, 2558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2559 + /* "lxml/etree.pyx":2557 * if self._keysvalues == 1: * return _namespacedName(c_attr) * elif self._keysvalues == 2: # <<<<<<<<<<<<<< @@ -78669,38 +74113,35 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ break; default: - /* "lxml/etree.pyx":2562 + /* "lxml/etree.pyx":2560 * return _attributeValue(self._node._c_node, c_attr) * else: * return (_namespacedName(c_attr), # <<<<<<<<<<<<<< * _attributeValue(self._node._c_node, c_attr)) * */ - __Pyx_TraceLine(2562,0,__PYX_ERR(0, 2562, __pyx_L1_error)) __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, 2562, __pyx_L1_error) + __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_GOTREF(__pyx_t_4); - /* "lxml/etree.pyx":2563 + /* "lxml/etree.pyx":2561 * else: * return (_namespacedName(c_attr), * _attributeValue(self._node._c_node, c_attr)) # <<<<<<<<<<<<<< * * cdef object _attributeIteratorFactory(_Element element, int keysvalues): */ - __Pyx_TraceLine(2563,0,__PYX_ERR(0, 2563, __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, 2563, __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, 2561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - /* "lxml/etree.pyx":2562 + /* "lxml/etree.pyx":2560 * return _attributeValue(self._node._c_node, c_attr) * else: * return (_namespacedName(c_attr), # <<<<<<<<<<<<<< * _attributeValue(self._node._c_node, c_attr)) * */ - __Pyx_TraceLine(2562,0,__PYX_ERR(0, 2562, __pyx_L1_error)) - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2562, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); @@ -78714,7 +74155,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ break; } - /* "lxml/etree.pyx":2545 + /* "lxml/etree.pyx":2543 * return self * * def __next__(self): # <<<<<<<<<<<<<< @@ -78731,12 +74172,11 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2565 +/* "lxml/etree.pyx":2563 * _attributeValue(self._node._c_node, c_attr)) * * cdef object _attributeIteratorFactory(_Element element, int keysvalues): # <<<<<<<<<<<<<< @@ -78747,39 +74187,35 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ static PyObject *__pyx_f_4lxml_5etree__attributeIteratorFactory(struct LxmlElement *__pyx_v_element, int __pyx_v_keysvalues) { struct __pyx_obj_4lxml_5etree__AttribIterator *__pyx_v_attribs = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; xmlAttr *__pyx_t_3; __Pyx_RefNannySetupContext("_attributeIteratorFactory", 0); - __Pyx_TraceCall("_attributeIteratorFactory", __pyx_f[0], 2565, 0, __PYX_ERR(0, 2565, __pyx_L1_error)); - /* "lxml/etree.pyx":2567 + /* "lxml/etree.pyx":2565 * cdef object _attributeIteratorFactory(_Element element, int keysvalues): * cdef _AttribIterator attribs * if element._c_node.properties is NULL: # <<<<<<<<<<<<<< * return ITER_EMPTY * attribs = _AttribIterator() */ - __Pyx_TraceLine(2567,0,__PYX_ERR(0, 2567, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_element->_c_node->properties == NULL) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":2568 + /* "lxml/etree.pyx":2566 * cdef _AttribIterator attribs * if element._c_node.properties is NULL: * return ITER_EMPTY # <<<<<<<<<<<<<< * attribs = _AttribIterator() * attribs._node = element */ - __Pyx_TraceLine(2568,0,__PYX_ERR(0, 2568, __pyx_L1_error)) __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":2567 + /* "lxml/etree.pyx":2565 * cdef object _attributeIteratorFactory(_Element element, int keysvalues): * cdef _AttribIterator attribs * if element._c_node.properties is NULL: # <<<<<<<<<<<<<< @@ -78788,68 +74224,63 @@ static PyObject *__pyx_f_4lxml_5etree__attributeIteratorFactory(struct LxmlEleme */ } - /* "lxml/etree.pyx":2569 + /* "lxml/etree.pyx":2567 * if element._c_node.properties is NULL: * return ITER_EMPTY * attribs = _AttribIterator() # <<<<<<<<<<<<<< * attribs._node = element * attribs._c_attr = element._c_node.properties */ - __Pyx_TraceLine(2569,0,__PYX_ERR(0, 2569, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__AttribIterator)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2569, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); __pyx_v_attribs = ((struct __pyx_obj_4lxml_5etree__AttribIterator *)__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2570 + /* "lxml/etree.pyx":2568 * return ITER_EMPTY * attribs = _AttribIterator() * attribs._node = element # <<<<<<<<<<<<<< * attribs._c_attr = element._c_node.properties * attribs._keysvalues = keysvalues */ - __Pyx_TraceLine(2570,0,__PYX_ERR(0, 2570, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_element)); __Pyx_GIVEREF(((PyObject *)__pyx_v_element)); __Pyx_GOTREF(__pyx_v_attribs->_node); __Pyx_DECREF(((PyObject *)__pyx_v_attribs->_node)); __pyx_v_attribs->_node = __pyx_v_element; - /* "lxml/etree.pyx":2571 + /* "lxml/etree.pyx":2569 * attribs = _AttribIterator() * attribs._node = element * attribs._c_attr = element._c_node.properties # <<<<<<<<<<<<<< * attribs._keysvalues = keysvalues * return attribs */ - __Pyx_TraceLine(2571,0,__PYX_ERR(0, 2571, __pyx_L1_error)) __pyx_t_3 = __pyx_v_element->_c_node->properties; __pyx_v_attribs->_c_attr = __pyx_t_3; - /* "lxml/etree.pyx":2572 + /* "lxml/etree.pyx":2570 * attribs._node = element * attribs._c_attr = element._c_node.properties * attribs._keysvalues = keysvalues # <<<<<<<<<<<<<< * return attribs * */ - __Pyx_TraceLine(2572,0,__PYX_ERR(0, 2572, __pyx_L1_error)) __pyx_v_attribs->_keysvalues = __pyx_v_keysvalues; - /* "lxml/etree.pyx":2573 + /* "lxml/etree.pyx":2571 * attribs._c_attr = element._c_node.properties * attribs._keysvalues = keysvalues * return attribs # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(2573,0,__PYX_ERR(0, 2573, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_attribs)); __pyx_r = ((PyObject *)__pyx_v_attribs); goto __pyx_L0; - /* "lxml/etree.pyx":2565 + /* "lxml/etree.pyx":2563 * _attributeValue(self._node._c_node, c_attr)) * * cdef object _attributeIteratorFactory(_Element element, int keysvalues): # <<<<<<<<<<<<<< @@ -78865,12 +74296,11 @@ static PyObject *__pyx_f_4lxml_5etree__attributeIteratorFactory(struct LxmlEleme __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_attribs); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2585 +/* "lxml/etree.pyx":2583 * cdef char* _href * cdef char* _name * cdef _initTagMatch(self, tag): # <<<<<<<<<<<<<< @@ -78880,57 +74310,51 @@ static PyObject *__pyx_f_4lxml_5etree__attributeIteratorFactory(struct LxmlEleme static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct LxmlElementTagMatcher *__pyx_v_self, PyObject *__pyx_v_tag) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_initTagMatch", 0); - __Pyx_TraceCall("_initTagMatch", __pyx_f[0], 2585, 0, __PYX_ERR(0, 2585, __pyx_L1_error)); - /* "lxml/etree.pyx":2586 + /* "lxml/etree.pyx":2584 * cdef char* _name * cdef _initTagMatch(self, tag): * self._href = NULL # <<<<<<<<<<<<<< * self._name = NULL * if tag is None: */ - __Pyx_TraceLine(2586,0,__PYX_ERR(0, 2586, __pyx_L1_error)) __pyx_v_self->_href = NULL; - /* "lxml/etree.pyx":2587 + /* "lxml/etree.pyx":2585 * cdef _initTagMatch(self, tag): * self._href = NULL * self._name = NULL # <<<<<<<<<<<<<< * if tag is None: * self._node_type = 0 */ - __Pyx_TraceLine(2587,0,__PYX_ERR(0, 2587, __pyx_L1_error)) __pyx_v_self->_name = NULL; - /* "lxml/etree.pyx":2588 + /* "lxml/etree.pyx":2586 * self._href = NULL * self._name = NULL * if tag is None: # <<<<<<<<<<<<<< * self._node_type = 0 * elif tag is Comment: */ - __Pyx_TraceLine(2588,0,__PYX_ERR(0, 2588, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_tag == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":2589 + /* "lxml/etree.pyx":2587 * self._name = NULL * if tag is None: * self._node_type = 0 # <<<<<<<<<<<<<< * elif tag is Comment: * self._node_type = tree.XML_COMMENT_NODE */ - __Pyx_TraceLine(2589,0,__PYX_ERR(0, 2589, __pyx_L1_error)) __pyx_v_self->_node_type = 0; - /* "lxml/etree.pyx":2588 + /* "lxml/etree.pyx":2586 * self._href = NULL * self._name = NULL * if tag is None: # <<<<<<<<<<<<<< @@ -78940,32 +74364,30 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct goto __pyx_L3; } - /* "lxml/etree.pyx":2590 + /* "lxml/etree.pyx":2588 * if tag is None: * self._node_type = 0 * elif tag is Comment: # <<<<<<<<<<<<<< * self._node_type = tree.XML_COMMENT_NODE * elif tag is ProcessingInstruction: */ - __Pyx_TraceLine(2590,0,__PYX_ERR(0, 2590, __pyx_L1_error)) - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Comment); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2590, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Comment); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2588, __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":2591 + /* "lxml/etree.pyx":2589 * self._node_type = 0 * elif tag is Comment: * self._node_type = tree.XML_COMMENT_NODE # <<<<<<<<<<<<<< * elif tag is ProcessingInstruction: * self._node_type = tree.XML_PI_NODE */ - __Pyx_TraceLine(2591,0,__PYX_ERR(0, 2591, __pyx_L1_error)) __pyx_v_self->_node_type = XML_COMMENT_NODE; - /* "lxml/etree.pyx":2590 + /* "lxml/etree.pyx":2588 * if tag is None: * self._node_type = 0 * elif tag is Comment: # <<<<<<<<<<<<<< @@ -78975,32 +74397,30 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct goto __pyx_L3; } - /* "lxml/etree.pyx":2592 + /* "lxml/etree.pyx":2590 * 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_TraceLine(2592,0,__PYX_ERR(0, 2592, __pyx_L1_error)) - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ProcessingInstruction); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2592, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ProcessingInstruction); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2590, __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":2593 + /* "lxml/etree.pyx":2591 * self._node_type = tree.XML_COMMENT_NODE * elif tag is ProcessingInstruction: * self._node_type = tree.XML_PI_NODE # <<<<<<<<<<<<<< * elif tag is Entity: * self._node_type = tree.XML_ENTITY_REF_NODE */ - __Pyx_TraceLine(2593,0,__PYX_ERR(0, 2593, __pyx_L1_error)) __pyx_v_self->_node_type = XML_PI_NODE; - /* "lxml/etree.pyx":2592 + /* "lxml/etree.pyx":2590 * elif tag is Comment: * self._node_type = tree.XML_COMMENT_NODE * elif tag is ProcessingInstruction: # <<<<<<<<<<<<<< @@ -79010,32 +74430,30 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct goto __pyx_L3; } - /* "lxml/etree.pyx":2594 + /* "lxml/etree.pyx":2592 * 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_TraceLine(2594,0,__PYX_ERR(0, 2594, __pyx_L1_error)) - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Entity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2594, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Entity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2592, __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":2595 + /* "lxml/etree.pyx":2593 * self._node_type = tree.XML_PI_NODE * elif tag is Entity: * self._node_type = tree.XML_ENTITY_REF_NODE # <<<<<<<<<<<<<< * elif tag is Element: * self._node_type = tree.XML_ELEMENT_NODE */ - __Pyx_TraceLine(2595,0,__PYX_ERR(0, 2595, __pyx_L1_error)) __pyx_v_self->_node_type = XML_ENTITY_REF_NODE; - /* "lxml/etree.pyx":2594 + /* "lxml/etree.pyx":2592 * elif tag is ProcessingInstruction: * self._node_type = tree.XML_PI_NODE * elif tag is Entity: # <<<<<<<<<<<<<< @@ -79045,32 +74463,30 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct goto __pyx_L3; } - /* "lxml/etree.pyx":2596 + /* "lxml/etree.pyx":2594 * 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_TraceLine(2596,0,__PYX_ERR(0, 2596, __pyx_L1_error)) - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Element); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2596, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Element); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2594, __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":2597 + /* "lxml/etree.pyx":2595 * self._node_type = tree.XML_ENTITY_REF_NODE * elif tag is Element: * self._node_type = tree.XML_ELEMENT_NODE # <<<<<<<<<<<<<< * else: * self._node_type = tree.XML_ELEMENT_NODE */ - __Pyx_TraceLine(2597,0,__PYX_ERR(0, 2597, __pyx_L1_error)) __pyx_v_self->_node_type = XML_ELEMENT_NODE; - /* "lxml/etree.pyx":2596 + /* "lxml/etree.pyx":2594 * elif tag is Entity: * self._node_type = tree.XML_ENTITY_REF_NODE * elif tag is Element: # <<<<<<<<<<<<<< @@ -79080,26 +74496,24 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct goto __pyx_L3; } - /* "lxml/etree.pyx":2599 + /* "lxml/etree.pyx":2597 * self._node_type = tree.XML_ELEMENT_NODE * else: * self._node_type = tree.XML_ELEMENT_NODE # <<<<<<<<<<<<<< * self._pystrings = _getNsTag(tag) * if self._pystrings[0] is not None: */ - __Pyx_TraceLine(2599,0,__PYX_ERR(0, 2599, __pyx_L1_error)) /*else*/ { __pyx_v_self->_node_type = XML_ELEMENT_NODE; - /* "lxml/etree.pyx":2600 + /* "lxml/etree.pyx":2598 * 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_TraceLine(2600,0,__PYX_ERR(0, 2600, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_tag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2600, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_tag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_pystrings); @@ -79107,35 +74521,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":2601 + /* "lxml/etree.pyx":2599 * 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_TraceLine(2601,0,__PYX_ERR(0, 2601, __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, 2601, __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, 2599, __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":2602 + /* "lxml/etree.pyx":2600 * 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_TraceLine(2602,0,__PYX_ERR(0, 2602, __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, 2602, __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, 2600, __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":2601 + /* "lxml/etree.pyx":2599 * self._node_type = tree.XML_ELEMENT_NODE * self._pystrings = _getNsTag(tag) * if self._pystrings[0] is not None: # <<<<<<<<<<<<<< @@ -79144,27 +74556,25 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct */ } - /* "lxml/etree.pyx":2603 + /* "lxml/etree.pyx":2601 * 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_TraceLine(2603,0,__PYX_ERR(0, 2603, __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, 2603, __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, 2601, __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":2604 + /* "lxml/etree.pyx":2602 * 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_TraceLine(2604,0,__PYX_ERR(0, 2604, __pyx_L1_error)) __pyx_t_2 = (((__pyx_v_self->_name[0]) == '*') != 0); if (__pyx_t_2) { } else { @@ -79176,17 +74586,16 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct __pyx_L6_bool_binop_done:; if (__pyx_t_1) { - /* "lxml/etree.pyx":2605 + /* "lxml/etree.pyx":2603 * self._name = _cstr(self._pystrings[1]) * if self._name[0] == c'*' and self._name[1] == c'\0': * self._name = NULL # <<<<<<<<<<<<<< * * cdef public class _ElementIterator(_ElementTagMatcher) [ */ - __Pyx_TraceLine(2605,0,__PYX_ERR(0, 2605, __pyx_L1_error)) __pyx_v_self->_name = NULL; - /* "lxml/etree.pyx":2604 + /* "lxml/etree.pyx":2602 * self._href = _cstr(self._pystrings[0]) * self._name = _cstr(self._pystrings[1]) * if self._name[0] == c'*' and self._name[1] == c'\0': # <<<<<<<<<<<<<< @@ -79197,7 +74606,7 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct } __pyx_L3:; - /* "lxml/etree.pyx":2585 + /* "lxml/etree.pyx":2583 * cdef char* _href * cdef char* _name * cdef _initTagMatch(self, tag): # <<<<<<<<<<<<<< @@ -79214,12 +74623,11 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2615 +/* "lxml/etree.pyx":2613 * cdef _Element _node * cdef _node_to_node_function _next_element * def __iter__(self): # <<<<<<<<<<<<<< @@ -79242,25 +74650,22 @@ static PyObject *__pyx_pw_4lxml_5etree_16_ElementIterator_1__iter__(PyObject *__ static PyObject *__pyx_pf_4lxml_5etree_16_ElementIterator___iter__(struct LxmlElementIterator *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 0); - __Pyx_TraceCall("__iter__", __pyx_f[0], 2615, 0, __PYX_ERR(0, 2615, __pyx_L1_error)); - /* "lxml/etree.pyx":2616 + /* "lxml/etree.pyx":2614 * cdef _node_to_node_function _next_element * def __iter__(self): * return self # <<<<<<<<<<<<<< * * cdef void _storeNext(self, _Element node): */ - __Pyx_TraceLine(2616,0,__PYX_ERR(0, 2616, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "lxml/etree.pyx":2615 + /* "lxml/etree.pyx":2613 * cdef _Element _node * cdef _node_to_node_function _next_element * def __iter__(self): # <<<<<<<<<<<<<< @@ -79269,17 +74674,13 @@ static PyObject *__pyx_pf_4lxml_5etree_16_ElementIterator___iter__(struct LxmlEl */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._ElementIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2618 +/* "lxml/etree.pyx":2616 * return self * * cdef void _storeNext(self, _Element node): # <<<<<<<<<<<<<< @@ -79289,33 +74690,29 @@ static PyObject *__pyx_pf_4lxml_5etree_16_ElementIterator___iter__(struct LxmlEl static void __pyx_f_4lxml_5etree_16_ElementIterator__storeNext(struct LxmlElementIterator *__pyx_v_self, struct LxmlElement *__pyx_v_node) { xmlNode *__pyx_v_c_node; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_storeNext", 0); - __Pyx_TraceCall("_storeNext", __pyx_f[0], 2618, 0, __PYX_ERR(0, 2618, __pyx_L1_error)); - /* "lxml/etree.pyx":2620 + /* "lxml/etree.pyx":2618 * cdef void _storeNext(self, _Element node): * cdef xmlNode* c_node * c_node = self._next_element(node._c_node) # <<<<<<<<<<<<<< * while c_node is not NULL and \ * self._node_type != 0 and \ */ - __Pyx_TraceLine(2620,0,__PYX_ERR(0, 2620, __pyx_L1_error)) __pyx_v_c_node = __pyx_v_self->_next_element(__pyx_v_node->_c_node); - /* "lxml/etree.pyx":2621 + /* "lxml/etree.pyx":2619 * cdef xmlNode* c_node * c_node = self._next_element(node._c_node) * while c_node is not NULL and \ # <<<<<<<<<<<<<< * self._node_type != 0 and \ * (self._node_type != c_node.type or */ - __Pyx_TraceLine(2621,0,__PYX_ERR(0, 2621, __pyx_L1_error)) while (1) { __pyx_t_2 = ((__pyx_v_c_node != NULL) != 0); if (__pyx_t_2) { @@ -79324,14 +74721,13 @@ static void __pyx_f_4lxml_5etree_16_ElementIterator__storeNext(struct LxmlElemen goto __pyx_L5_bool_binop_done; } - /* "lxml/etree.pyx":2622 + /* "lxml/etree.pyx":2620 * c_node = self._next_element(node._c_node) * while c_node is not NULL and \ * self._node_type != 0 and \ # <<<<<<<<<<<<<< * (self._node_type != c_node.type or * not _tagMatches(c_node, self._href, self._name)): */ - __Pyx_TraceLine(2622,0,__PYX_ERR(0, 2622, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->__pyx_base._node_type != 0) != 0); if (__pyx_t_2) { } else { @@ -79339,14 +74735,13 @@ static void __pyx_f_4lxml_5etree_16_ElementIterator__storeNext(struct LxmlElemen goto __pyx_L5_bool_binop_done; } - /* "lxml/etree.pyx":2623 + /* "lxml/etree.pyx":2621 * while c_node is not NULL and \ * self._node_type != 0 and \ * (self._node_type != c_node.type or # <<<<<<<<<<<<<< * not _tagMatches(c_node, self._href, self._name)): * c_node = self._next_element(c_node) */ - __Pyx_TraceLine(2623,0,__PYX_ERR(0, 2623, __pyx_L1_error)) __pyx_t_2 = ((((xmlElementType)__pyx_v_self->__pyx_base._node_type) != __pyx_v_c_node->type) != 0); if (!__pyx_t_2) { } else { @@ -79354,56 +74749,52 @@ static void __pyx_f_4lxml_5etree_16_ElementIterator__storeNext(struct LxmlElemen goto __pyx_L5_bool_binop_done; } - /* "lxml/etree.pyx":2624 + /* "lxml/etree.pyx":2622 * self._node_type != 0 and \ * (self._node_type != c_node.type or * not _tagMatches(c_node, self._href, self._name)): # <<<<<<<<<<<<<< * c_node = self._next_element(c_node) * if c_node is NULL: */ - __Pyx_TraceLine(2624,0,__PYX_ERR(0, 2624, __pyx_L1_error)) __pyx_t_2 = ((!(__pyx_f_4lxml_5etree__tagMatches(__pyx_v_c_node, ((const xmlChar *)__pyx_v_self->__pyx_base._href), ((const xmlChar *)__pyx_v_self->__pyx_base._name)) != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L5_bool_binop_done:; if (!__pyx_t_1) break; - /* "lxml/etree.pyx":2625 + /* "lxml/etree.pyx":2623 * (self._node_type != c_node.type or * not _tagMatches(c_node, self._href, self._name)): * c_node = self._next_element(c_node) # <<<<<<<<<<<<<< * if c_node is NULL: * self._node = None */ - __Pyx_TraceLine(2625,0,__PYX_ERR(0, 2625, __pyx_L1_error)) __pyx_v_c_node = __pyx_v_self->_next_element(__pyx_v_c_node); } - /* "lxml/etree.pyx":2626 + /* "lxml/etree.pyx":2624 * not _tagMatches(c_node, self._href, self._name)): * c_node = self._next_element(c_node) * if c_node is NULL: # <<<<<<<<<<<<<< * self._node = None * else: */ - __Pyx_TraceLine(2626,0,__PYX_ERR(0, 2626, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":2627 + /* "lxml/etree.pyx":2625 * c_node = self._next_element(c_node) * if c_node is NULL: * self._node = None # <<<<<<<<<<<<<< * else: * # Python ref: */ - __Pyx_TraceLine(2627,0,__PYX_ERR(0, 2627, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_node); __Pyx_DECREF(((PyObject *)__pyx_v_self->_node)); __pyx_v_self->_node = ((struct LxmlElement *)Py_None); - /* "lxml/etree.pyx":2626 + /* "lxml/etree.pyx":2624 * not _tagMatches(c_node, self._href, self._name)): * c_node = self._next_element(c_node) * if c_node is NULL: # <<<<<<<<<<<<<< @@ -79413,18 +74804,17 @@ static void __pyx_f_4lxml_5etree_16_ElementIterator__storeNext(struct LxmlElemen goto __pyx_L9; } - /* "lxml/etree.pyx":2630 + /* "lxml/etree.pyx":2628 * else: * # Python ref: * self._node = _elementFactory(node._doc, c_node) # <<<<<<<<<<<<<< * * def __next__(self): */ - __Pyx_TraceLine(2630,0,__PYX_ERR(0, 2630, __pyx_L1_error)) /*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, 2630, __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, 2628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_4); @@ -79435,7 +74825,7 @@ static void __pyx_f_4lxml_5etree_16_ElementIterator__storeNext(struct LxmlElemen } __pyx_L9:; - /* "lxml/etree.pyx":2618 + /* "lxml/etree.pyx":2616 * return self * * cdef void _storeNext(self, _Element node): # <<<<<<<<<<<<<< @@ -79450,11 +74840,10 @@ static void __pyx_f_4lxml_5etree_16_ElementIterator__storeNext(struct LxmlElemen __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("lxml.etree._ElementIterator._storeNext", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } -/* "lxml/etree.pyx":2632 +/* "lxml/etree.pyx":2630 * self._node = _elementFactory(node._doc, c_node) * * def __next__(self): # <<<<<<<<<<<<<< @@ -79478,38 +74867,34 @@ static PyObject *__pyx_pw_4lxml_5etree_16_ElementIterator_3__next__(PyObject *__ static PyObject *__pyx_pf_4lxml_5etree_16_ElementIterator_2__next__(struct LxmlElementIterator *__pyx_v_self) { struct LxmlElement *__pyx_v_current_node = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__next__", 0); - __Pyx_TraceCall("__next__", __pyx_f[0], 2632, 0, __PYX_ERR(0, 2632, __pyx_L1_error)); - /* "lxml/etree.pyx":2635 + /* "lxml/etree.pyx":2633 * cdef xmlNode* c_node * cdef _Element current_node * if self._node is None: # <<<<<<<<<<<<<< * raise StopIteration * # Python ref: */ - __Pyx_TraceLine(2635,0,__PYX_ERR(0, 2635, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_self->_node) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":2636 + /* "lxml/etree.pyx":2634 * cdef _Element current_node * if self._node is None: * raise StopIteration # <<<<<<<<<<<<<< * # Python ref: * current_node = self._node */ - __Pyx_TraceLine(2636,0,__PYX_ERR(0, 2636, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); - __PYX_ERR(0, 2636, __pyx_L1_error) + __PYX_ERR(0, 2634, __pyx_L1_error) - /* "lxml/etree.pyx":2635 + /* "lxml/etree.pyx":2633 * cdef xmlNode* c_node * cdef _Element current_node * if self._node is None: # <<<<<<<<<<<<<< @@ -79518,43 +74903,40 @@ static PyObject *__pyx_pf_4lxml_5etree_16_ElementIterator_2__next__(struct LxmlE */ } - /* "lxml/etree.pyx":2638 + /* "lxml/etree.pyx":2636 * raise StopIteration * # Python ref: * current_node = self._node # <<<<<<<<<<<<<< * self._storeNext(current_node) * return current_node */ - __Pyx_TraceLine(2638,0,__PYX_ERR(0, 2638, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_v_self->_node); __Pyx_INCREF(__pyx_t_3); __pyx_v_current_node = ((struct LxmlElement *)__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":2639 + /* "lxml/etree.pyx":2637 * # Python ref: * current_node = self._node * self._storeNext(current_node) # <<<<<<<<<<<<<< * return current_node * */ - __Pyx_TraceLine(2639,0,__PYX_ERR(0, 2639, __pyx_L1_error)) ((struct __pyx_vtabstruct_4lxml_5etree__ElementIterator *)__pyx_v_self->__pyx_base.__pyx_vtab)->_storeNext(__pyx_v_self, __pyx_v_current_node); - /* "lxml/etree.pyx":2640 + /* "lxml/etree.pyx":2638 * current_node = self._node * self._storeNext(current_node) * return current_node # <<<<<<<<<<<<<< * * @cython.final */ - __Pyx_TraceLine(2640,0,__PYX_ERR(0, 2640, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_current_node)); __pyx_r = ((PyObject *)__pyx_v_current_node); goto __pyx_L0; - /* "lxml/etree.pyx":2632 + /* "lxml/etree.pyx":2630 * self._node = _elementFactory(node._doc, c_node) * * def __next__(self): # <<<<<<<<<<<<<< @@ -79570,12 +74952,11 @@ static PyObject *__pyx_pf_4lxml_5etree_16_ElementIterator_2__next__(struct LxmlE __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_current_node); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2655 +/* "lxml/etree.pyx":2653 * cdef int _node_types * * def __cinit__(self, tags): # <<<<<<<<<<<<<< @@ -79609,7 +74990,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, 2655, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2653, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -79620,7 +75001,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, 2655, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2653, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._MultiTagMatcher.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -79635,21 +75016,18 @@ static int __pyx_pw_4lxml_5etree_16_MultiTagMatcher_1__cinit__(PyObject *__pyx_v static int __pyx_pf_4lxml_5etree_16_MultiTagMatcher___cinit__(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *__pyx_v_self, PyObject *__pyx_v_tags) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[0], 2655, 0, __PYX_ERR(0, 2655, __pyx_L1_error)); - /* "lxml/etree.pyx":2656 + /* "lxml/etree.pyx":2654 * * def __cinit__(self, tags): * self._py_tags = [] # <<<<<<<<<<<<<< * self.initTagMatch(tags) * */ - __Pyx_TraceLine(2656,0,__PYX_ERR(0, 2656, __pyx_L1_error)) - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2656, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_py_tags); @@ -79657,19 +75035,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":2657 + /* "lxml/etree.pyx":2655 * def __cinit__(self, tags): * self._py_tags = [] * self.initTagMatch(tags) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ - __Pyx_TraceLine(2657,0,__PYX_ERR(0, 2657, __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, 2657, __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, 2655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2655 + /* "lxml/etree.pyx":2653 * cdef int _node_types * * def __cinit__(self, tags): # <<<<<<<<<<<<<< @@ -79685,12 +75062,11 @@ static int __pyx_pf_4lxml_5etree_16_MultiTagMatcher___cinit__(struct __pyx_obj_4 __Pyx_AddTraceback("lxml.etree._MultiTagMatcher.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2659 +/* "lxml/etree.pyx":2657 * self.initTagMatch(tags) * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -79710,22 +75086,19 @@ static void __pyx_pw_4lxml_5etree_16_MultiTagMatcher_3__dealloc__(PyObject *__py } static void __pyx_pf_4lxml_5etree_16_MultiTagMatcher_2__dealloc__(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *__pyx_v_self) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - __Pyx_TraceCall("__dealloc__", __pyx_f[0], 2659, 0, __PYX_ERR(0, 2659, __pyx_L1_error)); - /* "lxml/etree.pyx":2660 + /* "lxml/etree.pyx":2658 * * def __dealloc__(self): * self._clear() # <<<<<<<<<<<<<< * * cdef bint rejectsAll(self): */ - __Pyx_TraceLine(2660,0,__PYX_ERR(0, 2660, __pyx_L1_error)) __pyx_f_4lxml_5etree_16_MultiTagMatcher__clear(__pyx_v_self); - /* "lxml/etree.pyx":2659 + /* "lxml/etree.pyx":2657 * self.initTagMatch(tags) * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -79734,15 +75107,10 @@ static void __pyx_pf_4lxml_5etree_16_MultiTagMatcher_2__dealloc__(struct __pyx_o */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._MultiTagMatcher.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } -/* "lxml/etree.pyx":2662 +/* "lxml/etree.pyx":2660 * self._clear() * * cdef bint rejectsAll(self): # <<<<<<<<<<<<<< @@ -79752,21 +75120,18 @@ static void __pyx_pf_4lxml_5etree_16_MultiTagMatcher_2__dealloc__(struct __pyx_o static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_rejectsAll(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("rejectsAll", 0); - __Pyx_TraceCall("rejectsAll", __pyx_f[0], 2662, 0, __PYX_ERR(0, 2662, __pyx_L1_error)); - /* "lxml/etree.pyx":2663 + /* "lxml/etree.pyx":2661 * * cdef bint rejectsAll(self): * return not self._tag_count and not self._node_types # <<<<<<<<<<<<<< * * cdef bint rejectsAllAttributes(self): */ - __Pyx_TraceLine(2663,0,__PYX_ERR(0, 2663, __pyx_L1_error)) __pyx_t_2 = ((!(__pyx_v_self->_tag_count != 0)) != 0); if (__pyx_t_2) { } else { @@ -79779,7 +75144,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":2662 + /* "lxml/etree.pyx":2660 * self._clear() * * cdef bint rejectsAll(self): # <<<<<<<<<<<<<< @@ -79788,16 +75153,12 @@ static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_rejectsAll(struct __pyx_obj_4 */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._MultiTagMatcher.rejectsAll", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2665 +/* "lxml/etree.pyx":2663 * return not self._tag_count and not self._node_types * * cdef bint rejectsAllAttributes(self): # <<<<<<<<<<<<<< @@ -79807,23 +75168,20 @@ static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_rejectsAll(struct __pyx_obj_4 static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_rejectsAllAttributes(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("rejectsAllAttributes", 0); - __Pyx_TraceCall("rejectsAllAttributes", __pyx_f[0], 2665, 0, __PYX_ERR(0, 2665, __pyx_L1_error)); - /* "lxml/etree.pyx":2666 + /* "lxml/etree.pyx":2664 * * cdef bint rejectsAllAttributes(self): * return not self._tag_count # <<<<<<<<<<<<<< * * cdef bint matchesType(self, int node_type): */ - __Pyx_TraceLine(2666,0,__PYX_ERR(0, 2666, __pyx_L1_error)) __pyx_r = (!(__pyx_v_self->_tag_count != 0)); goto __pyx_L0; - /* "lxml/etree.pyx":2665 + /* "lxml/etree.pyx":2663 * return not self._tag_count and not self._node_types * * cdef bint rejectsAllAttributes(self): # <<<<<<<<<<<<<< @@ -79832,16 +75190,12 @@ static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_rejectsAllAttributes(struct _ */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._MultiTagMatcher.rejectsAllAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2668 +/* "lxml/etree.pyx":2666 * return not self._tag_count * * cdef bint matchesType(self, int node_type): # <<<<<<<<<<<<<< @@ -79851,21 +75205,18 @@ static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_rejectsAllAttributes(struct _ static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesType(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *__pyx_v_self, int __pyx_v_node_type) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("matchesType", 0); - __Pyx_TraceCall("matchesType", __pyx_f[0], 2668, 0, __PYX_ERR(0, 2668, __pyx_L1_error)); - /* "lxml/etree.pyx":2669 + /* "lxml/etree.pyx":2667 * * cdef bint matchesType(self, int node_type): * if node_type == tree.XML_ELEMENT_NODE and self._tag_count: # <<<<<<<<<<<<<< * return True * return self._node_types & (1 << node_type) */ - __Pyx_TraceLine(2669,0,__PYX_ERR(0, 2669, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_node_type == XML_ELEMENT_NODE) != 0); if (__pyx_t_2) { } else { @@ -79877,18 +75228,17 @@ static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesType(struct __pyx_obj_ __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "lxml/etree.pyx":2670 + /* "lxml/etree.pyx":2668 * cdef bint matchesType(self, int node_type): * if node_type == tree.XML_ELEMENT_NODE and self._tag_count: * return True # <<<<<<<<<<<<<< * return self._node_types & (1 << node_type) * */ - __Pyx_TraceLine(2670,0,__PYX_ERR(0, 2670, __pyx_L1_error)) __pyx_r = 1; goto __pyx_L0; - /* "lxml/etree.pyx":2669 + /* "lxml/etree.pyx":2667 * * cdef bint matchesType(self, int node_type): * if node_type == tree.XML_ELEMENT_NODE and self._tag_count: # <<<<<<<<<<<<<< @@ -79897,18 +75247,17 @@ static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesType(struct __pyx_obj_ */ } - /* "lxml/etree.pyx":2671 + /* "lxml/etree.pyx":2669 * if node_type == tree.XML_ELEMENT_NODE and self._tag_count: * return True * return self._node_types & (1 << node_type) # <<<<<<<<<<<<<< * * cdef void _clear(self): */ - __Pyx_TraceLine(2671,0,__PYX_ERR(0, 2671, __pyx_L1_error)) __pyx_r = (__pyx_v_self->_node_types & (1 << __pyx_v_node_type)); goto __pyx_L0; - /* "lxml/etree.pyx":2668 + /* "lxml/etree.pyx":2666 * return not self._tag_count * * cdef bint matchesType(self, int node_type): # <<<<<<<<<<<<<< @@ -79917,16 +75266,12 @@ static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesType(struct __pyx_obj_ */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._MultiTagMatcher.matchesType", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2673 +/* "lxml/etree.pyx":2671 * return self._node_types & (1 << node_type) * * cdef void _clear(self): # <<<<<<<<<<<<<< @@ -79937,92 +75282,83 @@ static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesType(struct __pyx_obj_ static void __pyx_f_4lxml_5etree_16_MultiTagMatcher__clear(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *__pyx_v_self) { size_t __pyx_v_i; size_t __pyx_v_count; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations size_t __pyx_t_1; int __pyx_t_2; size_t __pyx_t_3; size_t __pyx_t_4; __Pyx_RefNannySetupContext("_clear", 0); - __Pyx_TraceCall("_clear", __pyx_f[0], 2673, 0, __PYX_ERR(0, 2673, __pyx_L1_error)); - /* "lxml/etree.pyx":2675 + /* "lxml/etree.pyx":2673 * cdef void _clear(self): * cdef size_t i, count * count = self._tag_count # <<<<<<<<<<<<<< * self._tag_count = 0 * if self._cached_tags: */ - __Pyx_TraceLine(2675,0,__PYX_ERR(0, 2675, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_tag_count; __pyx_v_count = __pyx_t_1; - /* "lxml/etree.pyx":2676 + /* "lxml/etree.pyx":2674 * cdef size_t i, count * count = self._tag_count * self._tag_count = 0 # <<<<<<<<<<<<<< * if self._cached_tags: * for i in xrange(count): */ - __Pyx_TraceLine(2676,0,__PYX_ERR(0, 2676, __pyx_L1_error)) __pyx_v_self->_tag_count = 0; - /* "lxml/etree.pyx":2677 + /* "lxml/etree.pyx":2675 * count = self._tag_count * self._tag_count = 0 * if self._cached_tags: # <<<<<<<<<<<<<< * for i in xrange(count): * cpython.ref.Py_XDECREF(self._cached_tags[i].href) */ - __Pyx_TraceLine(2677,0,__PYX_ERR(0, 2677, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_self->_cached_tags != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":2678 + /* "lxml/etree.pyx":2676 * self._tag_count = 0 * if self._cached_tags: * for i in xrange(count): # <<<<<<<<<<<<<< * cpython.ref.Py_XDECREF(self._cached_tags[i].href) * python.lxml_free(self._cached_tags) */ - __Pyx_TraceLine(2678,0,__PYX_ERR(0, 2678, __pyx_L1_error)) __pyx_t_1 = __pyx_v_count; __pyx_t_3 = __pyx_t_1; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; - /* "lxml/etree.pyx":2679 + /* "lxml/etree.pyx":2677 * if self._cached_tags: * for i in xrange(count): * cpython.ref.Py_XDECREF(self._cached_tags[i].href) # <<<<<<<<<<<<<< * python.lxml_free(self._cached_tags) * self._cached_tags = NULL */ - __Pyx_TraceLine(2679,0,__PYX_ERR(0, 2679, __pyx_L1_error)) Py_XDECREF((__pyx_v_self->_cached_tags[__pyx_v_i]).href); } - /* "lxml/etree.pyx":2680 + /* "lxml/etree.pyx":2678 * for i in xrange(count): * cpython.ref.Py_XDECREF(self._cached_tags[i].href) * python.lxml_free(self._cached_tags) # <<<<<<<<<<<<<< * self._cached_tags = NULL * */ - __Pyx_TraceLine(2680,0,__PYX_ERR(0, 2680, __pyx_L1_error)) lxml_free(__pyx_v_self->_cached_tags); - /* "lxml/etree.pyx":2681 + /* "lxml/etree.pyx":2679 * cpython.ref.Py_XDECREF(self._cached_tags[i].href) * python.lxml_free(self._cached_tags) * self._cached_tags = NULL # <<<<<<<<<<<<<< * * cdef initTagMatch(self, tags): */ - __Pyx_TraceLine(2681,0,__PYX_ERR(0, 2681, __pyx_L1_error)) __pyx_v_self->_cached_tags = NULL; - /* "lxml/etree.pyx":2677 + /* "lxml/etree.pyx":2675 * count = self._tag_count * self._tag_count = 0 * if self._cached_tags: # <<<<<<<<<<<<<< @@ -80031,7 +75367,7 @@ static void __pyx_f_4lxml_5etree_16_MultiTagMatcher__clear(struct __pyx_obj_4lxm */ } - /* "lxml/etree.pyx":2673 + /* "lxml/etree.pyx":2671 * return self._node_types & (1 << node_type) * * cdef void _clear(self): # <<<<<<<<<<<<<< @@ -80040,15 +75376,10 @@ static void __pyx_f_4lxml_5etree_16_MultiTagMatcher__clear(struct __pyx_obj_4lxm */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._MultiTagMatcher._clear", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } -/* "lxml/etree.pyx":2683 +/* "lxml/etree.pyx":2681 * self._cached_tags = NULL * * cdef initTagMatch(self, tags): # <<<<<<<<<<<<<< @@ -80058,7 +75389,6 @@ static void __pyx_f_4lxml_5etree_16_MultiTagMatcher__clear(struct __pyx_obj_4lxm static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher_initTagMatch(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *__pyx_v_self, PyObject *__pyx_v_tags) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -80066,54 +75396,49 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher_initTagMatch(struct __p PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("initTagMatch", 0); - __Pyx_TraceCall("initTagMatch", __pyx_f[0], 2683, 0, __PYX_ERR(0, 2683, __pyx_L1_error)); - /* "lxml/etree.pyx":2684 + /* "lxml/etree.pyx":2682 * * cdef initTagMatch(self, tags): * self._cached_doc = None # <<<<<<<<<<<<<< * del self._py_tags[:] * self._clear() */ - __Pyx_TraceLine(2684,0,__PYX_ERR(0, 2684, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_cached_doc); __Pyx_DECREF(((PyObject *)__pyx_v_self->_cached_doc)); __pyx_v_self->_cached_doc = ((struct LxmlDocument *)Py_None); - /* "lxml/etree.pyx":2685 + /* "lxml/etree.pyx":2683 * cdef initTagMatch(self, tags): * self._cached_doc = None * del self._py_tags[:] # <<<<<<<<<<<<<< * self._clear() * if tags is None or tags == (): */ - __Pyx_TraceLine(2685,0,__PYX_ERR(0, 2685, __pyx_L1_error)) if (unlikely(__pyx_v_self->_py_tags == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2685, __pyx_L1_error) + __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, 2685, __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) - /* "lxml/etree.pyx":2686 + /* "lxml/etree.pyx":2684 * self._cached_doc = None * del self._py_tags[:] * self._clear() # <<<<<<<<<<<<<< * if tags is None or tags == (): * # no selection in tags argument => match anything */ - __Pyx_TraceLine(2686,0,__PYX_ERR(0, 2686, __pyx_L1_error)) __pyx_f_4lxml_5etree_16_MultiTagMatcher__clear(__pyx_v_self); - /* "lxml/etree.pyx":2687 + /* "lxml/etree.pyx":2685 * del self._py_tags[:] * self._clear() * if tags is None or tags == (): # <<<<<<<<<<<<<< * # no selection in tags argument => match anything * self._node_types = ( */ - __Pyx_TraceLine(2687,0,__PYX_ERR(0, 2687, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_tags == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (!__pyx_t_3) { @@ -80121,24 +75446,23 @@ 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, 2687, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2687, __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, 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_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":2689 + /* "lxml/etree.pyx":2687 * if tags is None or tags == (): * # no selection in tags argument => match anything * self._node_types = ( # <<<<<<<<<<<<<< * 1 << tree.XML_COMMENT_NODE | * 1 << tree.XML_PI_NODE | */ - __Pyx_TraceLine(2689,0,__PYX_ERR(0, 2689, __pyx_L1_error)) __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":2687 + /* "lxml/etree.pyx":2685 * del self._py_tags[:] * self._clear() * if tags is None or tags == (): # <<<<<<<<<<<<<< @@ -80148,35 +75472,33 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher_initTagMatch(struct __p goto __pyx_L3; } - /* "lxml/etree.pyx":2695 + /* "lxml/etree.pyx":2693 * 1 << tree.XML_ELEMENT_NODE) * else: * self._node_types = 0 # <<<<<<<<<<<<<< * self._storeTags(tags, set()) * */ - __Pyx_TraceLine(2695,0,__PYX_ERR(0, 2695, __pyx_L1_error)) /*else*/ { __pyx_v_self->_node_types = 0; - /* "lxml/etree.pyx":2696 + /* "lxml/etree.pyx":2694 * else: * self._node_types = 0 * self._storeTags(tags, set()) # <<<<<<<<<<<<<< * * cdef _storeTags(self, tag, set seen): */ - __Pyx_TraceLine(2696,0,__PYX_ERR(0, 2696, __pyx_L1_error)) - __pyx_t_4 = PySet_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2696, __pyx_L1_error) + __pyx_t_4 = PySet_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2694, __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, 2696, __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, 2694, __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":2683 + /* "lxml/etree.pyx":2681 * self._cached_tags = NULL * * cdef initTagMatch(self, tags): # <<<<<<<<<<<<<< @@ -80194,12 +75516,11 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher_initTagMatch(struct __p __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2698 +/* "lxml/etree.pyx":2696 * self._storeTags(tags, set()) * * cdef _storeTags(self, tag, set seen): # <<<<<<<<<<<<<< @@ -80212,7 +75533,6 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx PyObject *__pyx_v_name = NULL; PyObject *__pyx_v_item = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -80223,34 +75543,31 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx Py_ssize_t __pyx_t_7; PyObject *(*__pyx_t_8)(PyObject *); __Pyx_RefNannySetupContext("_storeTags", 0); - __Pyx_TraceCall("_storeTags", __pyx_f[0], 2698, 0, __PYX_ERR(0, 2698, __pyx_L1_error)); - /* "lxml/etree.pyx":2699 + /* "lxml/etree.pyx":2697 * * cdef _storeTags(self, tag, set seen): * if tag is Comment: # <<<<<<<<<<<<<< * self._node_types |= 1 << tree.XML_COMMENT_NODE * elif tag is ProcessingInstruction: */ - __Pyx_TraceLine(2699,0,__PYX_ERR(0, 2699, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Comment); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2699, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Comment); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2697, __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":2700 + /* "lxml/etree.pyx":2698 * cdef _storeTags(self, tag, set seen): * if tag is Comment: * self._node_types |= 1 << tree.XML_COMMENT_NODE # <<<<<<<<<<<<<< * elif tag is ProcessingInstruction: * self._node_types |= 1 << tree.XML_PI_NODE */ - __Pyx_TraceLine(2700,0,__PYX_ERR(0, 2700, __pyx_L1_error)) __pyx_v_self->_node_types = (__pyx_v_self->_node_types | (1 << XML_COMMENT_NODE)); - /* "lxml/etree.pyx":2699 + /* "lxml/etree.pyx":2697 * * cdef _storeTags(self, tag, set seen): * if tag is Comment: # <<<<<<<<<<<<<< @@ -80260,32 +75577,30 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx goto __pyx_L3; } - /* "lxml/etree.pyx":2701 + /* "lxml/etree.pyx":2699 * 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_TraceLine(2701,0,__PYX_ERR(0, 2701, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ProcessingInstruction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2701, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ProcessingInstruction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2699, __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":2702 + /* "lxml/etree.pyx":2700 * self._node_types |= 1 << tree.XML_COMMENT_NODE * 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 */ - __Pyx_TraceLine(2702,0,__PYX_ERR(0, 2702, __pyx_L1_error)) __pyx_v_self->_node_types = (__pyx_v_self->_node_types | (1 << XML_PI_NODE)); - /* "lxml/etree.pyx":2701 + /* "lxml/etree.pyx":2699 * if tag is Comment: * self._node_types |= 1 << tree.XML_COMMENT_NODE * elif tag is ProcessingInstruction: # <<<<<<<<<<<<<< @@ -80295,32 +75610,30 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx goto __pyx_L3; } - /* "lxml/etree.pyx":2703 + /* "lxml/etree.pyx":2701 * 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_TraceLine(2703,0,__PYX_ERR(0, 2703, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Entity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2703, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Entity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2701, __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":2704 + /* "lxml/etree.pyx":2702 * 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: * self._node_types |= 1 << tree.XML_ELEMENT_NODE */ - __Pyx_TraceLine(2704,0,__PYX_ERR(0, 2704, __pyx_L1_error)) __pyx_v_self->_node_types = (__pyx_v_self->_node_types | (1 << XML_ENTITY_REF_NODE)); - /* "lxml/etree.pyx":2703 + /* "lxml/etree.pyx":2701 * elif tag is ProcessingInstruction: * self._node_types |= 1 << tree.XML_PI_NODE * elif tag is Entity: # <<<<<<<<<<<<<< @@ -80330,32 +75643,30 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx goto __pyx_L3; } - /* "lxml/etree.pyx":2705 + /* "lxml/etree.pyx":2703 * 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_TraceLine(2705,0,__PYX_ERR(0, 2705, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Element); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2705, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Element); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2703, __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":2706 + /* "lxml/etree.pyx":2704 * 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): * if tag in seen: */ - __Pyx_TraceLine(2706,0,__PYX_ERR(0, 2706, __pyx_L1_error)) __pyx_v_self->_node_types = (__pyx_v_self->_node_types | (1 << XML_ELEMENT_NODE)); - /* "lxml/etree.pyx":2705 + /* "lxml/etree.pyx":2703 * elif tag is Entity: * self._node_types |= 1 << tree.XML_ENTITY_REF_NODE * elif tag is Element: # <<<<<<<<<<<<<< @@ -80365,46 +75676,43 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx goto __pyx_L3; } - /* "lxml/etree.pyx":2707 + /* "lxml/etree.pyx":2705 * elif tag is Element: * self._node_types |= 1 << tree.XML_ELEMENT_NODE * elif python._isString(tag): # <<<<<<<<<<<<<< * if tag in seen: * return */ - __Pyx_TraceLine(2707,0,__PYX_ERR(0, 2707, __pyx_L1_error)) __pyx_t_2 = (_isString(__pyx_v_tag) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":2708 + /* "lxml/etree.pyx":2706 * self._node_types |= 1 << tree.XML_ELEMENT_NODE * elif python._isString(tag): * if tag in seen: # <<<<<<<<<<<<<< * return * seen.add(tag) */ - __Pyx_TraceLine(2708,0,__PYX_ERR(0, 2708, __pyx_L1_error)) if (unlikely(__pyx_v_seen == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 2708, __pyx_L1_error) + __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, 2708, __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_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2709 + /* "lxml/etree.pyx":2707 * elif python._isString(tag): * if tag in seen: * return # <<<<<<<<<<<<<< * seen.add(tag) * if tag in ('*', '{*}*'): */ - __Pyx_TraceLine(2709,0,__PYX_ERR(0, 2709, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/etree.pyx":2708 + /* "lxml/etree.pyx":2706 * self._node_types |= 1 << tree.XML_ELEMENT_NODE * elif python._isString(tag): * if tag in seen: # <<<<<<<<<<<<<< @@ -80413,54 +75721,51 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx */ } - /* "lxml/etree.pyx":2710 + /* "lxml/etree.pyx":2708 * if tag in seen: * return * seen.add(tag) # <<<<<<<<<<<<<< * if tag in ('*', '{*}*'): * self._node_types |= 1 << tree.XML_ELEMENT_NODE */ - __Pyx_TraceLine(2710,0,__PYX_ERR(0, 2710, __pyx_L1_error)) if (unlikely(__pyx_v_seen == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add"); - __PYX_ERR(0, 2710, __pyx_L1_error) + __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, 2710, __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) - /* "lxml/etree.pyx":2711 + /* "lxml/etree.pyx":2709 * return * seen.add(tag) * if tag in ('*', '{*}*'): # <<<<<<<<<<<<<< * self._node_types |= 1 << tree.XML_ELEMENT_NODE * else: */ - __Pyx_TraceLine(2711,0,__PYX_ERR(0, 2711, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_tag); __pyx_t_1 = __pyx_v_tag; - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__160, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2711, __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, 2709, __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__161, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2711, __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, 2709, __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":2712 + /* "lxml/etree.pyx":2710 * seen.add(tag) * if tag in ('*', '{*}*'): * self._node_types |= 1 << tree.XML_ELEMENT_NODE # <<<<<<<<<<<<<< * else: * href, name = _getNsTag(tag) */ - __Pyx_TraceLine(2712,0,__PYX_ERR(0, 2712, __pyx_L1_error)) __pyx_v_self->_node_types = (__pyx_v_self->_node_types | (1 << XML_ELEMENT_NODE)); - /* "lxml/etree.pyx":2711 + /* "lxml/etree.pyx":2709 * return * seen.add(tag) * if tag in ('*', '{*}*'): # <<<<<<<<<<<<<< @@ -80470,16 +75775,15 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx goto __pyx_L5; } - /* "lxml/etree.pyx":2714 + /* "lxml/etree.pyx":2712 * self._node_types |= 1 << tree.XML_ELEMENT_NODE * else: * href, name = _getNsTag(tag) # <<<<<<<<<<<<<< * if name == b'*': * name = None */ - __Pyx_TraceLine(2714,0,__PYX_ERR(0, 2714, __pyx_L1_error)) /*else*/ { - __pyx_t_1 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2714, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(__pyx_t_1 != Py_None)) { PyObject* sequence = __pyx_t_1; @@ -80487,7 +75791,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, 2714, __pyx_L1_error) + __PYX_ERR(0, 2712, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); @@ -80495,43 +75799,41 @@ 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, 2714, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2714, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 2714, __pyx_L1_error) + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 2712, __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":2715 + /* "lxml/etree.pyx":2713 * else: * href, name = _getNsTag(tag) * if name == b'*': # <<<<<<<<<<<<<< * name = None * if href is None: */ - __Pyx_TraceLine(2715,0,__PYX_ERR(0, 2715, __pyx_L1_error)) - __pyx_t_2 = (__Pyx_PyBytes_Equals(__pyx_v_name, __pyx_kp_b__160, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2715, __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, 2713, __pyx_L1_error) if (__pyx_t_2) { - /* "lxml/etree.pyx":2716 + /* "lxml/etree.pyx":2714 * href, name = _getNsTag(tag) * if name == b'*': * name = None # <<<<<<<<<<<<<< * if href is None: * href = b'' # no namespace */ - __Pyx_TraceLine(2716,0,__PYX_ERR(0, 2716, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_name, Py_None); - /* "lxml/etree.pyx":2715 + /* "lxml/etree.pyx":2713 * else: * href, name = _getNsTag(tag) * if name == b'*': # <<<<<<<<<<<<<< @@ -80540,30 +75842,28 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx */ } - /* "lxml/etree.pyx":2717 + /* "lxml/etree.pyx":2715 * if name == b'*': * name = None * if href is None: # <<<<<<<<<<<<<< * href = b'' # no namespace * elif href == b'*': */ - __Pyx_TraceLine(2717,0,__PYX_ERR(0, 2717, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_href == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2718 + /* "lxml/etree.pyx":2716 * name = None * if href is None: * href = b'' # no namespace # <<<<<<<<<<<<<< * elif href == b'*': * href = None # wildcard: any namespace, including none */ - __Pyx_TraceLine(2718,0,__PYX_ERR(0, 2718, __pyx_L1_error)) - __Pyx_INCREF(__pyx_kp_b__23); - __Pyx_DECREF_SET(__pyx_v_href, __pyx_kp_b__23); + __Pyx_INCREF(__pyx_kp_b__11); + __Pyx_DECREF_SET(__pyx_v_href, __pyx_kp_b__11); - /* "lxml/etree.pyx":2717 + /* "lxml/etree.pyx":2715 * if name == b'*': * name = None * if href is None: # <<<<<<<<<<<<<< @@ -80573,29 +75873,27 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx goto __pyx_L9; } - /* "lxml/etree.pyx":2719 + /* "lxml/etree.pyx":2717 * 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_TraceLine(2719,0,__PYX_ERR(0, 2719, __pyx_L1_error)) - __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_v_href, __pyx_kp_b__160, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2719, __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, 2717, __pyx_L1_error) if (__pyx_t_3) { - /* "lxml/etree.pyx":2720 + /* "lxml/etree.pyx":2718 * href = b'' # no namespace * elif href == b'*': * href = None # wildcard: any namespace, including none # <<<<<<<<<<<<<< * self._py_tags.append((href, name)) * else: */ - __Pyx_TraceLine(2720,0,__PYX_ERR(0, 2720, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_href, Py_None); - /* "lxml/etree.pyx":2719 + /* "lxml/etree.pyx":2717 * if href is None: * href = b'' # no namespace * elif href == b'*': # <<<<<<<<<<<<<< @@ -80605,19 +75903,18 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx } __pyx_L9:; - /* "lxml/etree.pyx":2721 + /* "lxml/etree.pyx":2719 * elif href == b'*': * href = None # wildcard: any namespace, including none * self._py_tags.append((href, name)) # <<<<<<<<<<<<<< * else: * # support a sequence of tags */ - __Pyx_TraceLine(2721,0,__PYX_ERR(0, 2721, __pyx_L1_error)) if (unlikely(__pyx_v_self->_py_tags == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 2721, __pyx_L1_error) + __PYX_ERR(0, 2719, __pyx_L1_error) } - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2721, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_href); __Pyx_GIVEREF(__pyx_v_href); @@ -80625,12 +75922,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, 2721, __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, 2719, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L5:; - /* "lxml/etree.pyx":2707 + /* "lxml/etree.pyx":2705 * elif tag is Element: * self._node_types |= 1 << tree.XML_ELEMENT_NODE * elif python._isString(tag): # <<<<<<<<<<<<<< @@ -80640,39 +75937,38 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx goto __pyx_L3; } - /* "lxml/etree.pyx":2724 + /* "lxml/etree.pyx":2722 * else: * # support a sequence of tags * for item in tag: # <<<<<<<<<<<<<< * self._storeTags(item, seen) * */ - __Pyx_TraceLine(2724,0,__PYX_ERR(0, 2724, __pyx_L1_error)) /*else*/ { if (likely(PyList_CheckExact(__pyx_v_tag)) || PyTuple_CheckExact(__pyx_v_tag)) { __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, 2724, __pyx_L1_error) + __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_GOTREF(__pyx_t_1); - __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2724, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2722, __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, 2724, __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, 2722, __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, 2724, __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, 2722, __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, 2724, __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, 2722, __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, 2724, __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, 2722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } @@ -80682,7 +75978,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, 2724, __pyx_L1_error) + else __PYX_ERR(0, 2722, __pyx_L1_error) } break; } @@ -80691,32 +75987,30 @@ 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":2725 + /* "lxml/etree.pyx":2723 * # 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_TraceLine(2725,0,__PYX_ERR(0, 2725, __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, 2725, __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, 2723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "lxml/etree.pyx":2724 + /* "lxml/etree.pyx":2722 * else: * # support a sequence of tags * for item in tag: # <<<<<<<<<<<<<< * self._storeTags(item, seen) * */ - __Pyx_TraceLine(2724,0,__PYX_ERR(0, 2724, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L3:; - /* "lxml/etree.pyx":2698 + /* "lxml/etree.pyx":2696 * self._storeTags(tags, set()) * * cdef _storeTags(self, tag, set seen): # <<<<<<<<<<<<<< @@ -80738,12 +76032,11 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_item); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2727 +/* "lxml/etree.pyx":2725 * self._storeTags(item, seen) * * cdef inline int cacheTags(self, _Document doc, bint force_into_dict=False) except -1: # <<<<<<<<<<<<<< @@ -80755,7 +76048,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc int __pyx_v_force_into_dict = ((int)0); size_t __pyx_v_dict_size; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -80763,31 +76055,28 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; __Pyx_RefNannySetupContext("cacheTags", 0); - __Pyx_TraceCall("cacheTags", __pyx_f[0], 2727, 0, __PYX_ERR(0, 2727, __pyx_L1_error)); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_force_into_dict = __pyx_optional_args->force_into_dict; } } - /* "lxml/etree.pyx":2731 + /* "lxml/etree.pyx":2729 * 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) # <<<<<<<<<<<<<< * if doc is self._cached_doc and dict_size == self._cached_size: * # doc and dict didn't change => names already cached */ - __Pyx_TraceLine(2731,0,__PYX_ERR(0, 2731, __pyx_L1_error)) __pyx_v_dict_size = xmlDictSize(__pyx_v_doc->_c_doc->dict); - /* "lxml/etree.pyx":2732 + /* "lxml/etree.pyx":2730 * """ * cdef size_t dict_size = tree.xmlDictSize(doc._c_doc.dict) * if doc is self._cached_doc and dict_size == self._cached_size: # <<<<<<<<<<<<<< * # doc and dict didn't change => names already cached * return 0 */ - __Pyx_TraceLine(2732,0,__PYX_ERR(0, 2732, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_doc == __pyx_v_self->_cached_doc); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -80800,18 +76089,17 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "lxml/etree.pyx":2734 + /* "lxml/etree.pyx":2732 * if doc is self._cached_doc and dict_size == self._cached_size: * # doc and dict didn't change => names already cached * return 0 # <<<<<<<<<<<<<< * self._tag_count = 0 * if not self._py_tags: */ - __Pyx_TraceLine(2734,0,__PYX_ERR(0, 2734, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2732 + /* "lxml/etree.pyx":2730 * """ * cdef size_t dict_size = tree.xmlDictSize(doc._c_doc.dict) * if doc is self._cached_doc and dict_size == self._cached_size: # <<<<<<<<<<<<<< @@ -80820,64 +76108,59 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc */ } - /* "lxml/etree.pyx":2735 + /* "lxml/etree.pyx":2733 * # doc and dict didn't change => names already cached * return 0 * self._tag_count = 0 # <<<<<<<<<<<<<< * if not self._py_tags: * self._cached_doc = doc */ - __Pyx_TraceLine(2735,0,__PYX_ERR(0, 2735, __pyx_L1_error)) __pyx_v_self->_tag_count = 0; - /* "lxml/etree.pyx":2736 + /* "lxml/etree.pyx":2734 * return 0 * self._tag_count = 0 * if not self._py_tags: # <<<<<<<<<<<<<< * self._cached_doc = doc * self._cached_size = dict_size */ - __Pyx_TraceLine(2736,0,__PYX_ERR(0, 2736, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_py_tags != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_py_tags) != 0); __pyx_t_3 = ((!__pyx_t_1) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2737 + /* "lxml/etree.pyx":2735 * self._tag_count = 0 * if not self._py_tags: * self._cached_doc = doc # <<<<<<<<<<<<<< * self._cached_size = dict_size * return 0 */ - __Pyx_TraceLine(2737,0,__PYX_ERR(0, 2737, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_doc)); __Pyx_GIVEREF(((PyObject *)__pyx_v_doc)); __Pyx_GOTREF(__pyx_v_self->_cached_doc); __Pyx_DECREF(((PyObject *)__pyx_v_self->_cached_doc)); __pyx_v_self->_cached_doc = __pyx_v_doc; - /* "lxml/etree.pyx":2738 + /* "lxml/etree.pyx":2736 * if not self._py_tags: * self._cached_doc = doc * self._cached_size = dict_size # <<<<<<<<<<<<<< * return 0 * if not self._cached_tags: */ - __Pyx_TraceLine(2738,0,__PYX_ERR(0, 2738, __pyx_L1_error)) __pyx_v_self->_cached_size = __pyx_v_dict_size; - /* "lxml/etree.pyx":2739 + /* "lxml/etree.pyx":2737 * self._cached_doc = doc * self._cached_size = dict_size * return 0 # <<<<<<<<<<<<<< * if not self._cached_tags: * self._cached_tags = python.lxml_malloc(len(self._py_tags), sizeof(qname)) */ - __Pyx_TraceLine(2739,0,__PYX_ERR(0, 2739, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2736 + /* "lxml/etree.pyx":2734 * return 0 * self._tag_count = 0 * if not self._py_tags: # <<<<<<<<<<<<<< @@ -80886,71 +76169,66 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc */ } - /* "lxml/etree.pyx":2740 + /* "lxml/etree.pyx":2738 * self._cached_size = dict_size * return 0 * if not self._cached_tags: # <<<<<<<<<<<<<< * self._cached_tags = python.lxml_malloc(len(self._py_tags), sizeof(qname)) * if not self._cached_tags: */ - __Pyx_TraceLine(2740,0,__PYX_ERR(0, 2740, __pyx_L1_error)) __pyx_t_3 = ((!(__pyx_v_self->_cached_tags != 0)) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2741 + /* "lxml/etree.pyx":2739 * return 0 * if not self._cached_tags: * self._cached_tags = python.lxml_malloc(len(self._py_tags), sizeof(qname)) # <<<<<<<<<<<<<< * if not self._cached_tags: * self._cached_doc = None */ - __Pyx_TraceLine(2741,0,__PYX_ERR(0, 2741, __pyx_L1_error)) __pyx_t_4 = __pyx_v_self->_py_tags; __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, 2741, __pyx_L1_error) + __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, 2741, __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_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":2742 + /* "lxml/etree.pyx":2740 * if not self._cached_tags: * self._cached_tags = python.lxml_malloc(len(self._py_tags), sizeof(qname)) * if not self._cached_tags: # <<<<<<<<<<<<<< * self._cached_doc = None * raise MemoryError() */ - __Pyx_TraceLine(2742,0,__PYX_ERR(0, 2742, __pyx_L1_error)) __pyx_t_3 = ((!(__pyx_v_self->_cached_tags != 0)) != 0); if (unlikely(__pyx_t_3)) { - /* "lxml/etree.pyx":2743 + /* "lxml/etree.pyx":2741 * self._cached_tags = python.lxml_malloc(len(self._py_tags), sizeof(qname)) * if not self._cached_tags: * self._cached_doc = None # <<<<<<<<<<<<<< * raise MemoryError() * self._tag_count = _mapTagsToQnameMatchArray( */ - __Pyx_TraceLine(2743,0,__PYX_ERR(0, 2743, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_cached_doc); __Pyx_DECREF(((PyObject *)__pyx_v_self->_cached_doc)); __pyx_v_self->_cached_doc = ((struct LxmlDocument *)Py_None); - /* "lxml/etree.pyx":2744 + /* "lxml/etree.pyx":2742 * 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) */ - __Pyx_TraceLine(2744,0,__PYX_ERR(0, 2744, __pyx_L1_error)) - PyErr_NoMemory(); __PYX_ERR(0, 2744, __pyx_L1_error) + PyErr_NoMemory(); __PYX_ERR(0, 2742, __pyx_L1_error) - /* "lxml/etree.pyx":2742 + /* "lxml/etree.pyx":2740 * if not self._cached_tags: * self._cached_tags = python.lxml_malloc(len(self._py_tags), sizeof(qname)) * if not self._cached_tags: # <<<<<<<<<<<<<< @@ -80959,7 +76237,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc */ } - /* "lxml/etree.pyx":2740 + /* "lxml/etree.pyx":2738 * self._cached_size = dict_size * return 0 * if not self._cached_tags: # <<<<<<<<<<<<<< @@ -80968,65 +76246,60 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc */ } - /* "lxml/etree.pyx":2746 + /* "lxml/etree.pyx":2744 * raise MemoryError() * self._tag_count = _mapTagsToQnameMatchArray( * doc._c_doc, self._py_tags, self._cached_tags, force_into_dict) # <<<<<<<<<<<<<< * self._cached_doc = doc * self._cached_size = dict_size */ - __Pyx_TraceLine(2746,0,__PYX_ERR(0, 2746, __pyx_L1_error)) __pyx_t_4 = __pyx_v_self->_py_tags; __Pyx_INCREF(__pyx_t_4); - /* "lxml/etree.pyx":2745 + /* "lxml/etree.pyx":2743 * 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_TraceLine(2745,0,__PYX_ERR(0, 2745, __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, 2745, __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, 2743, __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":2747 + /* "lxml/etree.pyx":2745 * self._tag_count = _mapTagsToQnameMatchArray( * doc._c_doc, self._py_tags, self._cached_tags, force_into_dict) * self._cached_doc = doc # <<<<<<<<<<<<<< * self._cached_size = dict_size * return 0 */ - __Pyx_TraceLine(2747,0,__PYX_ERR(0, 2747, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_doc)); __Pyx_GIVEREF(((PyObject *)__pyx_v_doc)); __Pyx_GOTREF(__pyx_v_self->_cached_doc); __Pyx_DECREF(((PyObject *)__pyx_v_self->_cached_doc)); __pyx_v_self->_cached_doc = __pyx_v_doc; - /* "lxml/etree.pyx":2748 + /* "lxml/etree.pyx":2746 * doc._c_doc, self._py_tags, self._cached_tags, force_into_dict) * self._cached_doc = doc * self._cached_size = dict_size # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(2748,0,__PYX_ERR(0, 2748, __pyx_L1_error)) __pyx_v_self->_cached_size = __pyx_v_dict_size; - /* "lxml/etree.pyx":2749 + /* "lxml/etree.pyx":2747 * self._cached_doc = doc * self._cached_size = dict_size * return 0 # <<<<<<<<<<<<<< * * cdef inline bint matches(self, xmlNode* c_node): */ - __Pyx_TraceLine(2749,0,__PYX_ERR(0, 2749, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2727 + /* "lxml/etree.pyx":2725 * self._storeTags(item, seen) * * cdef inline int cacheTags(self, _Document doc, bint force_into_dict=False) except -1: # <<<<<<<<<<<<<< @@ -81040,12 +76313,11 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc __Pyx_AddTraceback("lxml.etree._MultiTagMatcher.cacheTags", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2751 +/* "lxml/etree.pyx":2749 * return 0 * * cdef inline bint matches(self, xmlNode* c_node): # <<<<<<<<<<<<<< @@ -81056,38 +76328,34 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matches(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *__pyx_v_self, xmlNode *__pyx_v_c_node) { struct __pyx_t_4lxml_5etree_qname *__pyx_v_c_qname; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; struct __pyx_t_4lxml_5etree_qname *__pyx_t_2; struct __pyx_t_4lxml_5etree_qname *__pyx_t_3; struct __pyx_t_4lxml_5etree_qname *__pyx_t_4; __Pyx_RefNannySetupContext("matches", 0); - __Pyx_TraceCall("matches", __pyx_f[0], 2751, 0, __PYX_ERR(0, 2751, __pyx_L1_error)); - /* "lxml/etree.pyx":2753 + /* "lxml/etree.pyx":2751 * cdef inline bint matches(self, xmlNode* c_node): * cdef qname* c_qname * if self._node_types & (1 << c_node.type): # <<<<<<<<<<<<<< * return True * elif c_node.type == tree.XML_ELEMENT_NODE: */ - __Pyx_TraceLine(2753,0,__PYX_ERR(0, 2753, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_node_types & (1 << __pyx_v_c_node->type)) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":2754 + /* "lxml/etree.pyx":2752 * cdef qname* c_qname * if self._node_types & (1 << c_node.type): * return True # <<<<<<<<<<<<<< * elif c_node.type == tree.XML_ELEMENT_NODE: * for c_qname in self._cached_tags[:self._tag_count]: */ - __Pyx_TraceLine(2754,0,__PYX_ERR(0, 2754, __pyx_L1_error)) __pyx_r = 1; goto __pyx_L0; - /* "lxml/etree.pyx":2753 + /* "lxml/etree.pyx":2751 * cdef inline bint matches(self, xmlNode* c_node): * cdef qname* c_qname * if self._node_types & (1 << c_node.type): # <<<<<<<<<<<<<< @@ -81096,53 +76364,49 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matches(struct */ } - /* "lxml/etree.pyx":2755 + /* "lxml/etree.pyx":2753 * if self._node_types & (1 << c_node.type): * return True * elif c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< * for c_qname in self._cached_tags[:self._tag_count]: * if _tagMatchesExactly(c_node, c_qname): */ - __Pyx_TraceLine(2755,0,__PYX_ERR(0, 2755, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":2756 + /* "lxml/etree.pyx":2754 * return True * elif c_node.type == tree.XML_ELEMENT_NODE: * for c_qname in self._cached_tags[:self._tag_count]: # <<<<<<<<<<<<<< * if _tagMatchesExactly(c_node, c_qname): * return True */ - __Pyx_TraceLine(2756,0,__PYX_ERR(0, 2756, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_self->_cached_tags + __pyx_v_self->_tag_count); for (__pyx_t_4 = __pyx_v_self->_cached_tags; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) { __pyx_t_2 = __pyx_t_4; __pyx_v_c_qname = __pyx_t_2; - /* "lxml/etree.pyx":2757 + /* "lxml/etree.pyx":2755 * elif c_node.type == tree.XML_ELEMENT_NODE: * for c_qname in self._cached_tags[:self._tag_count]: * if _tagMatchesExactly(c_node, c_qname): # <<<<<<<<<<<<<< * return True * return False */ - __Pyx_TraceLine(2757,0,__PYX_ERR(0, 2757, __pyx_L1_error)) __pyx_t_1 = (__pyx_f_4lxml_5etree__tagMatchesExactly(__pyx_v_c_node, __pyx_v_c_qname) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":2758 + /* "lxml/etree.pyx":2756 * for c_qname in self._cached_tags[:self._tag_count]: * if _tagMatchesExactly(c_node, c_qname): * return True # <<<<<<<<<<<<<< * return False * */ - __Pyx_TraceLine(2758,0,__PYX_ERR(0, 2758, __pyx_L1_error)) __pyx_r = 1; goto __pyx_L0; - /* "lxml/etree.pyx":2757 + /* "lxml/etree.pyx":2755 * elif c_node.type == tree.XML_ELEMENT_NODE: * for c_qname in self._cached_tags[:self._tag_count]: * if _tagMatchesExactly(c_node, c_qname): # <<<<<<<<<<<<<< @@ -81152,7 +76416,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matches(struct } } - /* "lxml/etree.pyx":2755 + /* "lxml/etree.pyx":2753 * if self._node_types & (1 << c_node.type): * return True * elif c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< @@ -81161,18 +76425,17 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matches(struct */ } - /* "lxml/etree.pyx":2759 + /* "lxml/etree.pyx":2757 * if _tagMatchesExactly(c_node, c_qname): * return True * return False # <<<<<<<<<<<<<< * * cdef inline bint matchesNsTag(self, const_xmlChar* c_href, */ - __Pyx_TraceLine(2759,0,__PYX_ERR(0, 2759, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2751 + /* "lxml/etree.pyx":2749 * return 0 * * cdef inline bint matches(self, xmlNode* c_node): # <<<<<<<<<<<<<< @@ -81181,16 +76444,12 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matches(struct */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._MultiTagMatcher.matches", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2761 +/* "lxml/etree.pyx":2759 * return False * * cdef inline bint matchesNsTag(self, const_xmlChar* c_href, # <<<<<<<<<<<<<< @@ -81201,38 +76460,34 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matches(struct static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesNsTag(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *__pyx_v_self, const xmlChar *__pyx_v_c_href, const xmlChar *__pyx_v_c_name) { struct __pyx_t_4lxml_5etree_qname *__pyx_v_c_qname; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; struct __pyx_t_4lxml_5etree_qname *__pyx_t_2; struct __pyx_t_4lxml_5etree_qname *__pyx_t_3; struct __pyx_t_4lxml_5etree_qname *__pyx_t_4; __Pyx_RefNannySetupContext("matchesNsTag", 0); - __Pyx_TraceCall("matchesNsTag", __pyx_f[0], 2761, 0, __PYX_ERR(0, 2761, __pyx_L1_error)); - /* "lxml/etree.pyx":2764 + /* "lxml/etree.pyx":2762 * const_xmlChar* c_name): * cdef qname* c_qname * if self._node_types & (1 << tree.XML_ELEMENT_NODE): # <<<<<<<<<<<<<< * return True * for c_qname in self._cached_tags[:self._tag_count]: */ - __Pyx_TraceLine(2764,0,__PYX_ERR(0, 2764, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_node_types & (1 << XML_ELEMENT_NODE)) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":2765 + /* "lxml/etree.pyx":2763 * cdef qname* c_qname * if self._node_types & (1 << tree.XML_ELEMENT_NODE): * return True # <<<<<<<<<<<<<< * for c_qname in self._cached_tags[:self._tag_count]: * if _nsTagMatchesExactly(c_href, c_name, c_qname): */ - __Pyx_TraceLine(2765,0,__PYX_ERR(0, 2765, __pyx_L1_error)) __pyx_r = 1; goto __pyx_L0; - /* "lxml/etree.pyx":2764 + /* "lxml/etree.pyx":2762 * const_xmlChar* c_name): * cdef qname* c_qname * if self._node_types & (1 << tree.XML_ELEMENT_NODE): # <<<<<<<<<<<<<< @@ -81241,42 +76496,39 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesNsTag(st */ } - /* "lxml/etree.pyx":2766 + /* "lxml/etree.pyx":2764 * if self._node_types & (1 << tree.XML_ELEMENT_NODE): * return True * for c_qname in self._cached_tags[:self._tag_count]: # <<<<<<<<<<<<<< * if _nsTagMatchesExactly(c_href, c_name, c_qname): * return True */ - __Pyx_TraceLine(2766,0,__PYX_ERR(0, 2766, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_self->_cached_tags + __pyx_v_self->_tag_count); for (__pyx_t_4 = __pyx_v_self->_cached_tags; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) { __pyx_t_2 = __pyx_t_4; __pyx_v_c_qname = __pyx_t_2; - /* "lxml/etree.pyx":2767 + /* "lxml/etree.pyx":2765 * return True * for c_qname in self._cached_tags[:self._tag_count]: * if _nsTagMatchesExactly(c_href, c_name, c_qname): # <<<<<<<<<<<<<< * return True * return False */ - __Pyx_TraceLine(2767,0,__PYX_ERR(0, 2767, __pyx_L1_error)) __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":2768 + /* "lxml/etree.pyx":2766 * for c_qname in self._cached_tags[:self._tag_count]: * if _nsTagMatchesExactly(c_href, c_name, c_qname): * return True # <<<<<<<<<<<<<< * return False * */ - __Pyx_TraceLine(2768,0,__PYX_ERR(0, 2768, __pyx_L1_error)) __pyx_r = 1; goto __pyx_L0; - /* "lxml/etree.pyx":2767 + /* "lxml/etree.pyx":2765 * return True * for c_qname in self._cached_tags[:self._tag_count]: * if _nsTagMatchesExactly(c_href, c_name, c_qname): # <<<<<<<<<<<<<< @@ -81286,18 +76538,17 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesNsTag(st } } - /* "lxml/etree.pyx":2769 + /* "lxml/etree.pyx":2767 * if _nsTagMatchesExactly(c_href, c_name, c_qname): * return True * return False # <<<<<<<<<<<<<< * * cdef inline bint matchesAttribute(self, xmlAttr* c_attr): */ - __Pyx_TraceLine(2769,0,__PYX_ERR(0, 2769, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2761 + /* "lxml/etree.pyx":2759 * return False * * cdef inline bint matchesNsTag(self, const_xmlChar* c_href, # <<<<<<<<<<<<<< @@ -81306,16 +76557,12 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesNsTag(st */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._MultiTagMatcher.matchesNsTag", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2771 +/* "lxml/etree.pyx":2769 * return False * * cdef inline bint matchesAttribute(self, xmlAttr* c_attr): # <<<<<<<<<<<<<< @@ -81326,51 +76573,46 @@ 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 *__pyx_v_self, xmlAttr *__pyx_v_c_attr) { struct __pyx_t_4lxml_5etree_qname *__pyx_v_c_qname; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations struct __pyx_t_4lxml_5etree_qname *__pyx_t_1; struct __pyx_t_4lxml_5etree_qname *__pyx_t_2; struct __pyx_t_4lxml_5etree_qname *__pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("matchesAttribute", 0); - __Pyx_TraceCall("matchesAttribute", __pyx_f[0], 2771, 0, __PYX_ERR(0, 2771, __pyx_L1_error)); - /* "lxml/etree.pyx":2776 + /* "lxml/etree.pyx":2774 * """ * cdef qname* c_qname * for c_qname in self._cached_tags[:self._tag_count]: # <<<<<<<<<<<<<< * if _tagMatchesExactly(c_attr, c_qname): * return True */ - __Pyx_TraceLine(2776,0,__PYX_ERR(0, 2776, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_self->_cached_tags + __pyx_v_self->_tag_count); for (__pyx_t_3 = __pyx_v_self->_cached_tags; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) { __pyx_t_1 = __pyx_t_3; __pyx_v_c_qname = __pyx_t_1; - /* "lxml/etree.pyx":2777 + /* "lxml/etree.pyx":2775 * cdef qname* c_qname * for c_qname in self._cached_tags[:self._tag_count]: * if _tagMatchesExactly(c_attr, c_qname): # <<<<<<<<<<<<<< * return True * return False */ - __Pyx_TraceLine(2777,0,__PYX_ERR(0, 2777, __pyx_L1_error)) __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":2778 + /* "lxml/etree.pyx":2776 * for c_qname in self._cached_tags[:self._tag_count]: * if _tagMatchesExactly(c_attr, c_qname): * return True # <<<<<<<<<<<<<< * return False * */ - __Pyx_TraceLine(2778,0,__PYX_ERR(0, 2778, __pyx_L1_error)) __pyx_r = 1; goto __pyx_L0; - /* "lxml/etree.pyx":2777 + /* "lxml/etree.pyx":2775 * cdef qname* c_qname * for c_qname in self._cached_tags[:self._tag_count]: * if _tagMatchesExactly(c_attr, c_qname): # <<<<<<<<<<<<<< @@ -81380,18 +76622,17 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesAttribut } } - /* "lxml/etree.pyx":2779 + /* "lxml/etree.pyx":2777 * if _tagMatchesExactly(c_attr, c_qname): * return True * return False # <<<<<<<<<<<<<< * * cdef class _ElementMatchIterator: */ - __Pyx_TraceLine(2779,0,__PYX_ERR(0, 2779, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2771 + /* "lxml/etree.pyx":2769 * return False * * cdef inline bint matchesAttribute(self, xmlAttr* c_attr): # <<<<<<<<<<<<<< @@ -81400,16 +76641,12 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesAttribut */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._MultiTagMatcher.matchesAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2787 +/* "lxml/etree.pyx":2785 * * @cython.final * cdef _initTagMatcher(self, tags): # <<<<<<<<<<<<<< @@ -81419,27 +76656,24 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesAttribut static PyObject *__pyx_f_4lxml_5etree_21_ElementMatchIterator__initTagMatcher(struct __pyx_obj_4lxml_5etree__ElementMatchIterator *__pyx_v_self, PyObject *__pyx_v_tags) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_initTagMatcher", 0); - __Pyx_TraceCall("_initTagMatcher", __pyx_f[0], 2787, 0, __PYX_ERR(0, 2787, __pyx_L1_error)); - /* "lxml/etree.pyx":2788 + /* "lxml/etree.pyx":2786 * @cython.final * cdef _initTagMatcher(self, tags): * self._matcher = _MultiTagMatcher.__new__(_MultiTagMatcher, tags) # <<<<<<<<<<<<<< * * def __iter__(self): */ - __Pyx_TraceLine(2788,0,__PYX_ERR(0, 2788, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2788, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2786, __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, 2788, __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, 2786, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); @@ -81448,7 +76682,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":2787 + /* "lxml/etree.pyx":2785 * * @cython.final * cdef _initTagMatcher(self, tags): # <<<<<<<<<<<<<< @@ -81466,12 +76700,11 @@ static PyObject *__pyx_f_4lxml_5etree_21_ElementMatchIterator__initTagMatcher(st __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2790 +/* "lxml/etree.pyx":2788 * self._matcher = _MultiTagMatcher.__new__(_MultiTagMatcher, tags) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -81494,25 +76727,22 @@ static PyObject *__pyx_pw_4lxml_5etree_21_ElementMatchIterator_1__iter__(PyObjec static PyObject *__pyx_pf_4lxml_5etree_21_ElementMatchIterator___iter__(struct __pyx_obj_4lxml_5etree__ElementMatchIterator *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 0); - __Pyx_TraceCall("__iter__", __pyx_f[0], 2790, 0, __PYX_ERR(0, 2790, __pyx_L1_error)); - /* "lxml/etree.pyx":2791 + /* "lxml/etree.pyx":2789 * * def __iter__(self): * return self # <<<<<<<<<<<<<< * * @cython.final */ - __Pyx_TraceLine(2791,0,__PYX_ERR(0, 2791, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "lxml/etree.pyx":2790 + /* "lxml/etree.pyx":2788 * self._matcher = _MultiTagMatcher.__new__(_MultiTagMatcher, tags) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -81521,17 +76751,13 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ElementMatchIterator___iter__(struct _ */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._ElementMatchIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2794 +/* "lxml/etree.pyx":2792 * * @cython.final * cdef int _storeNext(self, _Element node) except -1: # <<<<<<<<<<<<<< @@ -81542,7 +76768,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ElementMatchIterator___iter__(struct _ static int __pyx_f_4lxml_5etree_21_ElementMatchIterator__storeNext(struct __pyx_obj_4lxml_5etree__ElementMatchIterator *__pyx_v_self, struct LxmlElement *__pyx_v_node) { xmlNode *__pyx_v_c_node; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -81551,39 +76776,35 @@ static int __pyx_f_4lxml_5etree_21_ElementMatchIterator__storeNext(struct __pyx_ PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("_storeNext", 0); - __Pyx_TraceCall("_storeNext", __pyx_f[0], 2794, 0, __PYX_ERR(0, 2794, __pyx_L1_error)); - /* "lxml/etree.pyx":2795 + /* "lxml/etree.pyx":2793 * @cython.final * cdef int _storeNext(self, _Element node) except -1: * 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): */ - __Pyx_TraceLine(2795,0,__PYX_ERR(0, 2795, __pyx_L1_error)) __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, 2795, __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, 2793, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2796 + /* "lxml/etree.pyx":2794 * cdef int _storeNext(self, _Element node) except -1: * 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): * c_node = self._next_element(c_node) */ - __Pyx_TraceLine(2796,0,__PYX_ERR(0, 2796, __pyx_L1_error)) __pyx_v_c_node = __pyx_v_self->_next_element(__pyx_v_node->_c_node); - /* "lxml/etree.pyx":2797 + /* "lxml/etree.pyx":2795 * 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): # <<<<<<<<<<<<<< * c_node = self._next_element(c_node) * # store Python ref to next node to make sure it's kept alive */ - __Pyx_TraceLine(2797,0,__PYX_ERR(0, 2797, __pyx_L1_error)) while (1) { __pyx_t_4 = ((__pyx_v_c_node != NULL) != 0); if (__pyx_t_4) { @@ -81596,29 +76817,27 @@ static int __pyx_f_4lxml_5etree_21_ElementMatchIterator__storeNext(struct __pyx_ __pyx_L5_bool_binop_done:; if (!__pyx_t_3) break; - /* "lxml/etree.pyx":2798 + /* "lxml/etree.pyx":2796 * 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) # <<<<<<<<<<<<<< * # 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 */ - __Pyx_TraceLine(2798,0,__PYX_ERR(0, 2798, __pyx_L1_error)) __pyx_v_c_node = __pyx_v_self->_next_element(__pyx_v_c_node); } - /* "lxml/etree.pyx":2800 + /* "lxml/etree.pyx":2798 * 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 # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(2800,0,__PYX_ERR(0, 2800, __pyx_L1_error)) 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, 2800, __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, 2798, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __pyx_t_6; @@ -81633,18 +76852,17 @@ 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":2801 + /* "lxml/etree.pyx":2799 * # 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 # <<<<<<<<<<<<<< * * def __next__(self): */ - __Pyx_TraceLine(2801,0,__PYX_ERR(0, 2801, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2794 + /* "lxml/etree.pyx":2792 * * @cython.final * cdef int _storeNext(self, _Element node) except -1: # <<<<<<<<<<<<<< @@ -81660,12 +76878,11 @@ static int __pyx_f_4lxml_5etree_21_ElementMatchIterator__storeNext(struct __pyx_ __Pyx_AddTraceback("lxml.etree._ElementMatchIterator._storeNext", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2803 +/* "lxml/etree.pyx":2801 * return 0 * * def __next__(self): # <<<<<<<<<<<<<< @@ -81689,52 +76906,47 @@ static PyObject *__pyx_pw_4lxml_5etree_21_ElementMatchIterator_3__next__(PyObjec static PyObject *__pyx_pf_4lxml_5etree_21_ElementMatchIterator_2__next__(struct __pyx_obj_4lxml_5etree__ElementMatchIterator *__pyx_v_self) { struct LxmlElement *__pyx_v_current_node = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("__next__", 0); - __Pyx_TraceCall("__next__", __pyx_f[0], 2803, 0, __PYX_ERR(0, 2803, __pyx_L1_error)); - /* "lxml/etree.pyx":2804 + /* "lxml/etree.pyx":2802 * * def __next__(self): * cdef _Element current_node = self._node # <<<<<<<<<<<<<< * if current_node is None: * raise StopIteration */ - __Pyx_TraceLine(2804,0,__PYX_ERR(0, 2804, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_v_self->_node); __Pyx_INCREF(__pyx_t_1); __pyx_v_current_node = ((struct LxmlElement *)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2805 + /* "lxml/etree.pyx":2803 * def __next__(self): * cdef _Element current_node = self._node * if current_node is None: # <<<<<<<<<<<<<< * raise StopIteration * self._storeNext(current_node) */ - __Pyx_TraceLine(2805,0,__PYX_ERR(0, 2805, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)__pyx_v_current_node) == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_3)) { - /* "lxml/etree.pyx":2806 + /* "lxml/etree.pyx":2804 * cdef _Element current_node = self._node * if current_node is None: * raise StopIteration # <<<<<<<<<<<<<< * self._storeNext(current_node) * return current_node */ - __Pyx_TraceLine(2806,0,__PYX_ERR(0, 2806, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); - __PYX_ERR(0, 2806, __pyx_L1_error) + __PYX_ERR(0, 2804, __pyx_L1_error) - /* "lxml/etree.pyx":2805 + /* "lxml/etree.pyx":2803 * def __next__(self): * cdef _Element current_node = self._node * if current_node is None: # <<<<<<<<<<<<<< @@ -81743,30 +76955,28 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ElementMatchIterator_2__next__(struct */ } - /* "lxml/etree.pyx":2807 + /* "lxml/etree.pyx":2805 * if current_node is None: * raise StopIteration * self._storeNext(current_node) # <<<<<<<<<<<<<< * return current_node * */ - __Pyx_TraceLine(2807,0,__PYX_ERR(0, 2807, __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, 2807, __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, 2805, __pyx_L1_error) - /* "lxml/etree.pyx":2808 + /* "lxml/etree.pyx":2806 * raise StopIteration * self._storeNext(current_node) * return current_node # <<<<<<<<<<<<<< * * cdef class ElementChildIterator(_ElementMatchIterator): */ - __Pyx_TraceLine(2808,0,__PYX_ERR(0, 2808, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_current_node)); __pyx_r = ((PyObject *)__pyx_v_current_node); goto __pyx_L0; - /* "lxml/etree.pyx":2803 + /* "lxml/etree.pyx":2801 * return 0 * * def __next__(self): # <<<<<<<<<<<<<< @@ -81782,12 +76992,11 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ElementMatchIterator_2__next__(struct __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_current_node); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2814 +/* "lxml/etree.pyx":2812 * Iterates over the children of an element. * """ * def __cinit__(self, _Element node not None, tag=None, *, bint reversed=False): # <<<<<<<<<<<<<< @@ -81837,7 +77046,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, 2814, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2812, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -81851,20 +77060,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, 2814, __pyx_L3_error) + __pyx_v_reversed = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_reversed == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2812, __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, 2814, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2812, __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, 2814, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_node), __pyx_ptype_4lxml_5etree__Element, 0, "node", 0))) __PYX_ERR(0, 2812, __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 */ @@ -81879,7 +77088,6 @@ static int __pyx_pw_4lxml_5etree_20ElementChildIterator_1__cinit__(PyObject *__p static int __pyx_pf_4lxml_5etree_20ElementChildIterator___cinit__(struct __pyx_obj_4lxml_5etree_ElementChildIterator *__pyx_v_self, struct LxmlElement *__pyx_v_node, PyObject *__pyx_v_tag, int __pyx_v_reversed) { xmlNode *__pyx_v_c_node; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -81888,62 +77096,56 @@ static int __pyx_pf_4lxml_5etree_20ElementChildIterator___cinit__(struct __pyx_o PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[0], 2814, 0, __PYX_ERR(0, 2814, __pyx_L1_error)); - /* "lxml/etree.pyx":2816 + /* "lxml/etree.pyx":2814 * def __cinit__(self, _Element node not None, tag=None, *, bint reversed=False): * cdef xmlNode* c_node * _assertValidNode(node) # <<<<<<<<<<<<<< * self._initTagMatcher(tag) * if reversed: */ - __Pyx_TraceLine(2816,0,__PYX_ERR(0, 2816, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2816, __pyx_L1_error) + __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) - /* "lxml/etree.pyx":2817 + /* "lxml/etree.pyx":2815 * cdef xmlNode* c_node * _assertValidNode(node) * self._initTagMatcher(tag) # <<<<<<<<<<<<<< * if reversed: * c_node = _findChildBackwards(node._c_node, 0) */ - __Pyx_TraceLine(2817,0,__PYX_ERR(0, 2817, __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, 2817, __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, 2815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2818 + /* "lxml/etree.pyx":2816 * _assertValidNode(node) * self._initTagMatcher(tag) * if reversed: # <<<<<<<<<<<<<< * c_node = _findChildBackwards(node._c_node, 0) * self._next_element = _previousElement */ - __Pyx_TraceLine(2818,0,__PYX_ERR(0, 2818, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_reversed != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2819 + /* "lxml/etree.pyx":2817 * self._initTagMatcher(tag) * if reversed: * c_node = _findChildBackwards(node._c_node, 0) # <<<<<<<<<<<<<< * self._next_element = _previousElement * else: */ - __Pyx_TraceLine(2819,0,__PYX_ERR(0, 2819, __pyx_L1_error)) __pyx_v_c_node = __pyx_f_4lxml_5etree__findChildBackwards(__pyx_v_node->_c_node, 0); - /* "lxml/etree.pyx":2820 + /* "lxml/etree.pyx":2818 * if reversed: * c_node = _findChildBackwards(node._c_node, 0) * self._next_element = _previousElement # <<<<<<<<<<<<<< * else: * c_node = _findChildForwards(node._c_node, 0) */ - __Pyx_TraceLine(2820,0,__PYX_ERR(0, 2820, __pyx_L1_error)) __pyx_v_self->__pyx_base._next_element = __pyx_f_4lxml_5etree__previousElement; - /* "lxml/etree.pyx":2818 + /* "lxml/etree.pyx":2816 * _assertValidNode(node) * self._initTagMatcher(tag) * if reversed: # <<<<<<<<<<<<<< @@ -81953,50 +77155,46 @@ static int __pyx_pf_4lxml_5etree_20ElementChildIterator___cinit__(struct __pyx_o goto __pyx_L3; } - /* "lxml/etree.pyx":2822 + /* "lxml/etree.pyx":2820 * self._next_element = _previousElement * else: * c_node = _findChildForwards(node._c_node, 0) # <<<<<<<<<<<<<< * self._next_element = _nextElement * self._matcher.cacheTags(node._doc) */ - __Pyx_TraceLine(2822,0,__PYX_ERR(0, 2822, __pyx_L1_error)) /*else*/ { __pyx_v_c_node = __pyx_f_4lxml_5etree__findChildForwards(__pyx_v_node->_c_node, 0); - /* "lxml/etree.pyx":2823 + /* "lxml/etree.pyx":2821 * else: * c_node = _findChildForwards(node._c_node, 0) * self._next_element = _nextElement # <<<<<<<<<<<<<< * self._matcher.cacheTags(node._doc) * while c_node is not NULL and not self._matcher.matches(c_node): */ - __Pyx_TraceLine(2823,0,__PYX_ERR(0, 2823, __pyx_L1_error)) __pyx_v_self->__pyx_base._next_element = __pyx_f_4lxml_5etree__nextElement; } __pyx_L3:; - /* "lxml/etree.pyx":2824 + /* "lxml/etree.pyx":2822 * c_node = _findChildForwards(node._c_node, 0) * self._next_element = _nextElement * 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) */ - __Pyx_TraceLine(2824,0,__PYX_ERR(0, 2824, __pyx_L1_error)) __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, 2824, __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, 2822, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2825 + /* "lxml/etree.pyx":2823 * self._next_element = _nextElement * 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) * # store Python ref to next node to make sure it's kept alive */ - __Pyx_TraceLine(2825,0,__PYX_ERR(0, 2825, __pyx_L1_error)) while (1) { __pyx_t_4 = ((__pyx_v_c_node != NULL) != 0); if (__pyx_t_4) { @@ -82009,29 +77207,27 @@ static int __pyx_pf_4lxml_5etree_20ElementChildIterator___cinit__(struct __pyx_o __pyx_L6_bool_binop_done:; if (!__pyx_t_3) break; - /* "lxml/etree.pyx":2826 + /* "lxml/etree.pyx":2824 * 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) # <<<<<<<<<<<<<< * # 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 */ - __Pyx_TraceLine(2826,0,__PYX_ERR(0, 2826, __pyx_L1_error)) __pyx_v_c_node = __pyx_v_self->__pyx_base._next_element(__pyx_v_c_node); } - /* "lxml/etree.pyx":2828 + /* "lxml/etree.pyx":2826 * 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 # <<<<<<<<<<<<<< * * cdef class SiblingsIterator(_ElementMatchIterator): */ - __Pyx_TraceLine(2828,0,__PYX_ERR(0, 2828, __pyx_L1_error)) 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, 2828, __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, 2826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __pyx_t_6; @@ -82046,7 +77242,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":2814 + /* "lxml/etree.pyx":2812 * Iterates over the children of an element. * """ * def __cinit__(self, _Element node not None, tag=None, *, bint reversed=False): # <<<<<<<<<<<<<< @@ -82064,12 +77260,11 @@ static int __pyx_pf_4lxml_5etree_20ElementChildIterator___cinit__(struct __pyx_o __Pyx_AddTraceback("lxml.etree.ElementChildIterator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2836 +/* "lxml/etree.pyx":2834 * You can pass the boolean keyword ``preceding`` to specify the direction. * """ * def __cinit__(self, _Element node not None, tag=None, *, bint preceding=False): # <<<<<<<<<<<<<< @@ -82119,7 +77314,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, 2836, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2834, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -82133,20 +77328,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, 2836, __pyx_L3_error) + __pyx_v_preceding = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_preceding == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2834, __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, 2836, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2834, __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, 2836, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_node), __pyx_ptype_4lxml_5etree__Element, 0, "node", 0))) __PYX_ERR(0, 2834, __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 */ @@ -82160,58 +77355,52 @@ static int __pyx_pw_4lxml_5etree_16SiblingsIterator_1__cinit__(PyObject *__pyx_v static int __pyx_pf_4lxml_5etree_16SiblingsIterator___cinit__(struct __pyx_obj_4lxml_5etree_SiblingsIterator *__pyx_v_self, struct LxmlElement *__pyx_v_node, PyObject *__pyx_v_tag, int __pyx_v_preceding) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[0], 2836, 0, __PYX_ERR(0, 2836, __pyx_L1_error)); - /* "lxml/etree.pyx":2837 + /* "lxml/etree.pyx":2835 * """ * def __cinit__(self, _Element node not None, tag=None, *, bint preceding=False): * _assertValidNode(node) # <<<<<<<<<<<<<< * self._initTagMatcher(tag) * if preceding: */ - __Pyx_TraceLine(2837,0,__PYX_ERR(0, 2837, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2837, __pyx_L1_error) + __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) - /* "lxml/etree.pyx":2838 + /* "lxml/etree.pyx":2836 * def __cinit__(self, _Element node not None, tag=None, *, bint preceding=False): * _assertValidNode(node) * self._initTagMatcher(tag) # <<<<<<<<<<<<<< * if preceding: * self._next_element = _previousElement */ - __Pyx_TraceLine(2838,0,__PYX_ERR(0, 2838, __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, 2838, __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, 2836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2839 + /* "lxml/etree.pyx":2837 * _assertValidNode(node) * self._initTagMatcher(tag) * if preceding: # <<<<<<<<<<<<<< * self._next_element = _previousElement * else: */ - __Pyx_TraceLine(2839,0,__PYX_ERR(0, 2839, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_preceding != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2840 + /* "lxml/etree.pyx":2838 * self._initTagMatcher(tag) * if preceding: * self._next_element = _previousElement # <<<<<<<<<<<<<< * else: * self._next_element = _nextElement */ - __Pyx_TraceLine(2840,0,__PYX_ERR(0, 2840, __pyx_L1_error)) __pyx_v_self->__pyx_base._next_element = __pyx_f_4lxml_5etree__previousElement; - /* "lxml/etree.pyx":2839 + /* "lxml/etree.pyx":2837 * _assertValidNode(node) * self._initTagMatcher(tag) * if preceding: # <<<<<<<<<<<<<< @@ -82221,30 +77410,28 @@ static int __pyx_pf_4lxml_5etree_16SiblingsIterator___cinit__(struct __pyx_obj_4 goto __pyx_L3; } - /* "lxml/etree.pyx":2842 + /* "lxml/etree.pyx":2840 * self._next_element = _previousElement * else: * self._next_element = _nextElement # <<<<<<<<<<<<<< * self._storeNext(node) * */ - __Pyx_TraceLine(2842,0,__PYX_ERR(0, 2842, __pyx_L1_error)) /*else*/ { __pyx_v_self->__pyx_base._next_element = __pyx_f_4lxml_5etree__nextElement; } __pyx_L3:; - /* "lxml/etree.pyx":2843 + /* "lxml/etree.pyx":2841 * else: * self._next_element = _nextElement * self._storeNext(node) # <<<<<<<<<<<<<< * * cdef class AncestorsIterator(_ElementMatchIterator): */ - __Pyx_TraceLine(2843,0,__PYX_ERR(0, 2843, __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, 2843, __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, 2841, __pyx_L1_error) - /* "lxml/etree.pyx":2836 + /* "lxml/etree.pyx":2834 * You can pass the boolean keyword ``preceding`` to specify the direction. * """ * def __cinit__(self, _Element node not None, tag=None, *, bint preceding=False): # <<<<<<<<<<<<<< @@ -82260,12 +77447,11 @@ static int __pyx_pf_4lxml_5etree_16SiblingsIterator___cinit__(struct __pyx_obj_4 __Pyx_AddTraceback("lxml.etree.SiblingsIterator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2849 +/* "lxml/etree.pyx":2847 * Iterates over the ancestors of an element (from parent to parent). * """ * def __cinit__(self, _Element node not None, tag=None): # <<<<<<<<<<<<<< @@ -82309,7 +77495,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, 2849, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2847, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -82325,13 +77511,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, 2849, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2847, __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, 2849, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_node), __pyx_ptype_4lxml_5etree__Element, 0, "node", 0))) __PYX_ERR(0, 2847, __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 */ @@ -82345,56 +77531,50 @@ static int __pyx_pw_4lxml_5etree_17AncestorsIterator_1__cinit__(PyObject *__pyx_ static int __pyx_pf_4lxml_5etree_17AncestorsIterator___cinit__(struct __pyx_obj_4lxml_5etree_AncestorsIterator *__pyx_v_self, struct LxmlElement *__pyx_v_node, PyObject *__pyx_v_tag) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[0], 2849, 0, __PYX_ERR(0, 2849, __pyx_L1_error)); - /* "lxml/etree.pyx":2850 + /* "lxml/etree.pyx":2848 * """ * def __cinit__(self, _Element node not None, tag=None): * _assertValidNode(node) # <<<<<<<<<<<<<< * self._initTagMatcher(tag) * self._next_element = _parentElement */ - __Pyx_TraceLine(2850,0,__PYX_ERR(0, 2850, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2850, __pyx_L1_error) + __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) - /* "lxml/etree.pyx":2851 + /* "lxml/etree.pyx":2849 * def __cinit__(self, _Element node not None, tag=None): * _assertValidNode(node) * self._initTagMatcher(tag) # <<<<<<<<<<<<<< * self._next_element = _parentElement * self._storeNext(node) */ - __Pyx_TraceLine(2851,0,__PYX_ERR(0, 2851, __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, 2851, __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, 2849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2852 + /* "lxml/etree.pyx":2850 * _assertValidNode(node) * self._initTagMatcher(tag) * self._next_element = _parentElement # <<<<<<<<<<<<<< * self._storeNext(node) * */ - __Pyx_TraceLine(2852,0,__PYX_ERR(0, 2852, __pyx_L1_error)) __pyx_v_self->__pyx_base._next_element = __pyx_f_4lxml_5etree__parentElement; - /* "lxml/etree.pyx":2853 + /* "lxml/etree.pyx":2851 * self._initTagMatcher(tag) * self._next_element = _parentElement * self._storeNext(node) # <<<<<<<<<<<<<< * * cdef class ElementDepthFirstIterator: */ - __Pyx_TraceLine(2853,0,__PYX_ERR(0, 2853, __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, 2853, __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, 2851, __pyx_L1_error) - /* "lxml/etree.pyx":2849 + /* "lxml/etree.pyx":2847 * Iterates over the ancestors of an element (from parent to parent). * """ * def __cinit__(self, _Element node not None, tag=None): # <<<<<<<<<<<<<< @@ -82410,12 +77590,11 @@ static int __pyx_pf_4lxml_5etree_17AncestorsIterator___cinit__(struct __pyx_obj_ __Pyx_AddTraceback("lxml.etree.AncestorsIterator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2880 +/* "lxml/etree.pyx":2878 * cdef _Element _top_node * cdef _MultiTagMatcher _matcher * def __cinit__(self, _Element node not None, tag=None, *, bint inclusive=True): # <<<<<<<<<<<<<< @@ -82465,7 +77644,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, 2880, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2878, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -82479,20 +77658,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, 2880, __pyx_L3_error) + __pyx_v_inclusive = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_inclusive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2878, __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, 2880, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2878, __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, 2880, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_node), __pyx_ptype_4lxml_5etree__Element, 0, "node", 0))) __PYX_ERR(0, 2878, __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 */ @@ -82506,7 +77685,6 @@ static int __pyx_pw_4lxml_5etree_25ElementDepthFirstIterator_1__cinit__(PyObject static int __pyx_pf_4lxml_5etree_25ElementDepthFirstIterator___cinit__(struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *__pyx_v_self, struct LxmlElement *__pyx_v_node, PyObject *__pyx_v_tag, int __pyx_v_inclusive) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -82514,60 +77692,55 @@ static int __pyx_pf_4lxml_5etree_25ElementDepthFirstIterator___cinit__(struct __ int __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[0], 2880, 0, __PYX_ERR(0, 2880, __pyx_L1_error)); - /* "lxml/etree.pyx":2881 + /* "lxml/etree.pyx":2879 * 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_TraceLine(2881,0,__PYX_ERR(0, 2881, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2881, __pyx_L1_error) + __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) - /* "lxml/etree.pyx":2882 + /* "lxml/etree.pyx":2880 * def __cinit__(self, _Element node not None, tag=None, *, bint inclusive=True): * _assertValidNode(node) * self._top_node = node # <<<<<<<<<<<<<< * self._next_node = node * self._matcher = _MultiTagMatcher.__new__(_MultiTagMatcher, tag) */ - __Pyx_TraceLine(2882,0,__PYX_ERR(0, 2882, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_node)); __Pyx_GIVEREF(((PyObject *)__pyx_v_node)); __Pyx_GOTREF(__pyx_v_self->_top_node); __Pyx_DECREF(((PyObject *)__pyx_v_self->_top_node)); __pyx_v_self->_top_node = __pyx_v_node; - /* "lxml/etree.pyx":2883 + /* "lxml/etree.pyx":2881 * _assertValidNode(node) * self._top_node = node * self._next_node = node # <<<<<<<<<<<<<< * self._matcher = _MultiTagMatcher.__new__(_MultiTagMatcher, tag) * self._matcher.cacheTags(node._doc) */ - __Pyx_TraceLine(2883,0,__PYX_ERR(0, 2883, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_node)); __Pyx_GIVEREF(((PyObject *)__pyx_v_node)); __Pyx_GOTREF(__pyx_v_self->_next_node); __Pyx_DECREF(((PyObject *)__pyx_v_self->_next_node)); __pyx_v_self->_next_node = __pyx_v_node; - /* "lxml/etree.pyx":2884 + /* "lxml/etree.pyx":2882 * 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_TraceLine(2884,0,__PYX_ERR(0, 2884, __pyx_L1_error)) - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2884, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2882, __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, 2884, __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, 2882, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); @@ -82576,27 +77749,25 @@ 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":2885 + /* "lxml/etree.pyx":2883 * 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): * # find start node (this cannot raise StopIteration, self._next_node != None) */ - __Pyx_TraceLine(2885,0,__PYX_ERR(0, 2885, __pyx_L1_error)) __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, 2885, __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, 2883, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":2886 + /* "lxml/etree.pyx":2884 * self._matcher = _MultiTagMatcher.__new__(_MultiTagMatcher, tag) * self._matcher.cacheTags(node._doc) * if not inclusive or not self._matcher.matches(node._c_node): # <<<<<<<<<<<<<< * # find start node (this cannot raise StopIteration, self._next_node != None) * next(self) */ - __Pyx_TraceLine(2886,0,__PYX_ERR(0, 2886, __pyx_L1_error)) __pyx_t_5 = ((!(__pyx_v_inclusive != 0)) != 0); if (!__pyx_t_5) { } else { @@ -82608,19 +77779,18 @@ static int __pyx_pf_4lxml_5etree_25ElementDepthFirstIterator___cinit__(struct __ __pyx_L4_bool_binop_done:; if (__pyx_t_4) { - /* "lxml/etree.pyx":2888 + /* "lxml/etree.pyx":2886 * 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_TraceLine(2888,0,__PYX_ERR(0, 2888, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyIter_Next(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2888, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyIter_Next(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":2886 + /* "lxml/etree.pyx":2884 * self._matcher = _MultiTagMatcher.__new__(_MultiTagMatcher, tag) * self._matcher.cacheTags(node._doc) * if not inclusive or not self._matcher.matches(node._c_node): # <<<<<<<<<<<<<< @@ -82629,7 +77799,7 @@ static int __pyx_pf_4lxml_5etree_25ElementDepthFirstIterator___cinit__(struct __ */ } - /* "lxml/etree.pyx":2880 + /* "lxml/etree.pyx":2878 * cdef _Element _top_node * cdef _MultiTagMatcher _matcher * def __cinit__(self, _Element node not None, tag=None, *, bint inclusive=True): # <<<<<<<<<<<<<< @@ -82646,12 +77816,11 @@ static int __pyx_pf_4lxml_5etree_25ElementDepthFirstIterator___cinit__(struct __ __Pyx_AddTraceback("lxml.etree.ElementDepthFirstIterator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2890 +/* "lxml/etree.pyx":2888 * next(self) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -82674,25 +77843,22 @@ static PyObject *__pyx_pw_4lxml_5etree_25ElementDepthFirstIterator_3__iter__(PyO static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_2__iter__(struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 0); - __Pyx_TraceCall("__iter__", __pyx_f[0], 2890, 0, __PYX_ERR(0, 2890, __pyx_L1_error)); - /* "lxml/etree.pyx":2891 + /* "lxml/etree.pyx":2889 * * def __iter__(self): * return self # <<<<<<<<<<<<<< * * def __next__(self): */ - __Pyx_TraceLine(2891,0,__PYX_ERR(0, 2891, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "lxml/etree.pyx":2890 + /* "lxml/etree.pyx":2888 * next(self) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -82701,17 +77867,13 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_2__iter__(str */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.ElementDepthFirstIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2893 +/* "lxml/etree.pyx":2891 * return self * * def __next__(self): # <<<<<<<<<<<<<< @@ -82736,7 +77898,6 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_4__next__(str xmlNode *__pyx_v_c_node; struct LxmlElement *__pyx_v_current_node = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -82745,45 +77906,41 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_4__next__(str int __pyx_t_5; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__next__", 0); - __Pyx_TraceCall("__next__", __pyx_f[0], 2893, 0, __PYX_ERR(0, 2893, __pyx_L1_error)); - /* "lxml/etree.pyx":2895 + /* "lxml/etree.pyx":2893 * def __next__(self): * cdef xmlNode* c_node * cdef _Element current_node = self._next_node # <<<<<<<<<<<<<< * if current_node is None: * raise StopIteration */ - __Pyx_TraceLine(2895,0,__PYX_ERR(0, 2895, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_v_self->_next_node); __Pyx_INCREF(__pyx_t_1); __pyx_v_current_node = ((struct LxmlElement *)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2896 + /* "lxml/etree.pyx":2894 * cdef xmlNode* c_node * cdef _Element current_node = self._next_node * if current_node is None: # <<<<<<<<<<<<<< * raise StopIteration * c_node = current_node._c_node */ - __Pyx_TraceLine(2896,0,__PYX_ERR(0, 2896, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)__pyx_v_current_node) == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_3)) { - /* "lxml/etree.pyx":2897 + /* "lxml/etree.pyx":2895 * cdef _Element current_node = self._next_node * if current_node is None: * raise StopIteration # <<<<<<<<<<<<<< * c_node = current_node._c_node * self._matcher.cacheTags(current_node._doc) */ - __Pyx_TraceLine(2897,0,__PYX_ERR(0, 2897, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); - __PYX_ERR(0, 2897, __pyx_L1_error) + __PYX_ERR(0, 2895, __pyx_L1_error) - /* "lxml/etree.pyx":2896 + /* "lxml/etree.pyx":2894 * cdef xmlNode* c_node * cdef _Element current_node = self._next_node * if current_node is None: # <<<<<<<<<<<<<< @@ -82792,52 +77949,48 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_4__next__(str */ } - /* "lxml/etree.pyx":2898 + /* "lxml/etree.pyx":2896 * if current_node is None: * raise StopIteration * c_node = current_node._c_node # <<<<<<<<<<<<<< * self._matcher.cacheTags(current_node._doc) * if not self._matcher._tag_count: */ - __Pyx_TraceLine(2898,0,__PYX_ERR(0, 2898, __pyx_L1_error)) __pyx_t_4 = __pyx_v_current_node->_c_node; __pyx_v_c_node = __pyx_t_4; - /* "lxml/etree.pyx":2899 + /* "lxml/etree.pyx":2897 * raise StopIteration * c_node = current_node._c_node * self._matcher.cacheTags(current_node._doc) # <<<<<<<<<<<<<< * if not self._matcher._tag_count: * # no tag name was found in the dict => not in document either */ - __Pyx_TraceLine(2899,0,__PYX_ERR(0, 2899, __pyx_L1_error)) __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, 2899, __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, 2897, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2900 + /* "lxml/etree.pyx":2898 * c_node = current_node._c_node * self._matcher.cacheTags(current_node._doc) * if not self._matcher._tag_count: # <<<<<<<<<<<<<< * # no tag name was found in the dict => not in document either * # try to match by node type */ - __Pyx_TraceLine(2900,0,__PYX_ERR(0, 2900, __pyx_L1_error)) __pyx_t_3 = ((!(__pyx_v_self->_matcher->_tag_count != 0)) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2903 + /* "lxml/etree.pyx":2901 * # no tag name was found in the dict => not in document either * # try to match by node type * c_node = self._nextNodeAnyTag(c_node) # <<<<<<<<<<<<<< * else: * c_node = self._nextNodeMatchTag(c_node) */ - __Pyx_TraceLine(2903,0,__PYX_ERR(0, 2903, __pyx_L1_error)) __pyx_v_c_node = __pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeAnyTag(__pyx_v_self, __pyx_v_c_node); - /* "lxml/etree.pyx":2900 + /* "lxml/etree.pyx":2898 * c_node = current_node._c_node * self._matcher.cacheTags(current_node._doc) * if not self._matcher._tag_count: # <<<<<<<<<<<<<< @@ -82847,45 +78000,42 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_4__next__(str goto __pyx_L4; } - /* "lxml/etree.pyx":2905 + /* "lxml/etree.pyx":2903 * c_node = self._nextNodeAnyTag(c_node) * else: * c_node = self._nextNodeMatchTag(c_node) # <<<<<<<<<<<<<< * if c_node is NULL: * self._next_node = None */ - __Pyx_TraceLine(2905,0,__PYX_ERR(0, 2905, __pyx_L1_error)) /*else*/ { __pyx_v_c_node = __pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeMatchTag(__pyx_v_self, __pyx_v_c_node); } __pyx_L4:; - /* "lxml/etree.pyx":2906 + /* "lxml/etree.pyx":2904 * else: * c_node = self._nextNodeMatchTag(c_node) * if c_node is NULL: # <<<<<<<<<<<<<< * self._next_node = None * else: */ - __Pyx_TraceLine(2906,0,__PYX_ERR(0, 2906, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2907 + /* "lxml/etree.pyx":2905 * c_node = self._nextNodeMatchTag(c_node) * if c_node is NULL: * self._next_node = None # <<<<<<<<<<<<<< * else: * self._next_node = _elementFactory(current_node._doc, c_node) */ - __Pyx_TraceLine(2907,0,__PYX_ERR(0, 2907, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_next_node); __Pyx_DECREF(((PyObject *)__pyx_v_self->_next_node)); __pyx_v_self->_next_node = ((struct LxmlElement *)Py_None); - /* "lxml/etree.pyx":2906 + /* "lxml/etree.pyx":2904 * else: * c_node = self._nextNodeMatchTag(c_node) * if c_node is NULL: # <<<<<<<<<<<<<< @@ -82895,18 +78045,17 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_4__next__(str goto __pyx_L5; } - /* "lxml/etree.pyx":2909 + /* "lxml/etree.pyx":2907 * self._next_node = None * else: * self._next_node = _elementFactory(current_node._doc, c_node) # <<<<<<<<<<<<<< * return current_node * */ - __Pyx_TraceLine(2909,0,__PYX_ERR(0, 2909, __pyx_L1_error)) /*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, 2909, __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, 2907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_6); @@ -82917,20 +78066,19 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_4__next__(str } __pyx_L5:; - /* "lxml/etree.pyx":2910 + /* "lxml/etree.pyx":2908 * else: * self._next_node = _elementFactory(current_node._doc, c_node) * return current_node # <<<<<<<<<<<<<< * * @cython.final */ - __Pyx_TraceLine(2910,0,__PYX_ERR(0, 2910, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_current_node)); __pyx_r = ((PyObject *)__pyx_v_current_node); goto __pyx_L0; - /* "lxml/etree.pyx":2893 + /* "lxml/etree.pyx":2891 * return self * * def __next__(self): # <<<<<<<<<<<<<< @@ -82947,12 +78095,11 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_4__next__(str __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_current_node); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2913 +/* "lxml/etree.pyx":2911 * * @cython.final * cdef xmlNode* _nextNodeAnyTag(self, xmlNode* c_node): # <<<<<<<<<<<<<< @@ -82963,47 +78110,42 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_4__next__(str static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeAnyTag(struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *__pyx_v_self, xmlNode *__pyx_v_c_node) { int __pyx_v_node_types; xmlNode *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_nextNodeAnyTag", 0); - __Pyx_TraceCall("_nextNodeAnyTag", __pyx_f[0], 2913, 0, __PYX_ERR(0, 2913, __pyx_L1_error)); - /* "lxml/etree.pyx":2914 + /* "lxml/etree.pyx":2912 * @cython.final * cdef xmlNode* _nextNodeAnyTag(self, xmlNode* c_node): * cdef int node_types = self._matcher._node_types # <<<<<<<<<<<<<< * if not node_types: * return NULL */ - __Pyx_TraceLine(2914,0,__PYX_ERR(0, 2914, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_matcher->_node_types; __pyx_v_node_types = __pyx_t_1; - /* "lxml/etree.pyx":2915 + /* "lxml/etree.pyx":2913 * cdef xmlNode* _nextNodeAnyTag(self, xmlNode* c_node): * cdef int node_types = self._matcher._node_types * if not node_types: # <<<<<<<<<<<<<< * return NULL * tree.BEGIN_FOR_EACH_ELEMENT_FROM(self._top_node._c_node, c_node, 0) */ - __Pyx_TraceLine(2915,0,__PYX_ERR(0, 2915, __pyx_L1_error)) __pyx_t_2 = ((!(__pyx_v_node_types != 0)) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":2916 + /* "lxml/etree.pyx":2914 * cdef int node_types = self._matcher._node_types * if not node_types: * return NULL # <<<<<<<<<<<<<< * tree.BEGIN_FOR_EACH_ELEMENT_FROM(self._top_node._c_node, c_node, 0) * if node_types & (1 << c_node.type): */ - __Pyx_TraceLine(2916,0,__PYX_ERR(0, 2916, __pyx_L1_error)) __pyx_r = NULL; goto __pyx_L0; - /* "lxml/etree.pyx":2915 + /* "lxml/etree.pyx":2913 * cdef xmlNode* _nextNodeAnyTag(self, xmlNode* c_node): * cdef int node_types = self._matcher._node_types * if not node_types: # <<<<<<<<<<<<<< @@ -83012,39 +78154,36 @@ static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeAnyTag */ } - /* "lxml/etree.pyx":2917 + /* "lxml/etree.pyx":2915 * if not node_types: * return NULL * tree.BEGIN_FOR_EACH_ELEMENT_FROM(self._top_node._c_node, c_node, 0) # <<<<<<<<<<<<<< * if node_types & (1 << c_node.type): * return c_node */ - __Pyx_TraceLine(2917,0,__PYX_ERR(0, 2917, __pyx_L1_error)) BEGIN_FOR_EACH_ELEMENT_FROM(__pyx_v_self->_top_node->_c_node, __pyx_v_c_node, 0); - /* "lxml/etree.pyx":2918 + /* "lxml/etree.pyx":2916 * return NULL * tree.BEGIN_FOR_EACH_ELEMENT_FROM(self._top_node._c_node, c_node, 0) * if node_types & (1 << c_node.type): # <<<<<<<<<<<<<< * return c_node * tree.END_FOR_EACH_ELEMENT_FROM(c_node) */ - __Pyx_TraceLine(2918,0,__PYX_ERR(0, 2918, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_node_types & (1 << __pyx_v_c_node->type)) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":2919 + /* "lxml/etree.pyx":2917 * tree.BEGIN_FOR_EACH_ELEMENT_FROM(self._top_node._c_node, c_node, 0) * if node_types & (1 << c_node.type): * return c_node # <<<<<<<<<<<<<< * tree.END_FOR_EACH_ELEMENT_FROM(c_node) * return NULL */ - __Pyx_TraceLine(2919,0,__PYX_ERR(0, 2919, __pyx_L1_error)) __pyx_r = __pyx_v_c_node; goto __pyx_L0; - /* "lxml/etree.pyx":2918 + /* "lxml/etree.pyx":2916 * return NULL * tree.BEGIN_FOR_EACH_ELEMENT_FROM(self._top_node._c_node, c_node, 0) * if node_types & (1 << c_node.type): # <<<<<<<<<<<<<< @@ -83053,28 +78192,26 @@ static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeAnyTag */ } - /* "lxml/etree.pyx":2920 + /* "lxml/etree.pyx":2918 * if node_types & (1 << c_node.type): * return c_node * tree.END_FOR_EACH_ELEMENT_FROM(c_node) # <<<<<<<<<<<<<< * return NULL * */ - __Pyx_TraceLine(2920,0,__PYX_ERR(0, 2920, __pyx_L1_error)) END_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node); - /* "lxml/etree.pyx":2921 + /* "lxml/etree.pyx":2919 * return c_node * tree.END_FOR_EACH_ELEMENT_FROM(c_node) * return NULL # <<<<<<<<<<<<<< * * @cython.final */ - __Pyx_TraceLine(2921,0,__PYX_ERR(0, 2921, __pyx_L1_error)) __pyx_r = NULL; goto __pyx_L0; - /* "lxml/etree.pyx":2913 + /* "lxml/etree.pyx":2911 * * @cython.final * cdef xmlNode* _nextNodeAnyTag(self, xmlNode* c_node): # <<<<<<<<<<<<<< @@ -83083,16 +78220,12 @@ static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeAnyTag */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.ElementDepthFirstIterator._nextNodeAnyTag", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2924 +/* "lxml/etree.pyx":2922 * * @cython.final * cdef xmlNode* _nextNodeMatchTag(self, xmlNode* c_node): # <<<<<<<<<<<<<< @@ -83102,45 +78235,40 @@ static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeAnyTag static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeMatchTag(struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *__pyx_v_self, xmlNode *__pyx_v_c_node) { xmlNode *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_nextNodeMatchTag", 0); - __Pyx_TraceCall("_nextNodeMatchTag", __pyx_f[0], 2924, 0, __PYX_ERR(0, 2924, __pyx_L1_error)); - /* "lxml/etree.pyx":2925 + /* "lxml/etree.pyx":2923 * @cython.final * 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): * return c_node */ - __Pyx_TraceLine(2925,0,__PYX_ERR(0, 2925, __pyx_L1_error)) BEGIN_FOR_EACH_ELEMENT_FROM(__pyx_v_self->_top_node->_c_node, __pyx_v_c_node, 0); - /* "lxml/etree.pyx":2926 + /* "lxml/etree.pyx":2924 * 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): # <<<<<<<<<<<<<< * return c_node * tree.END_FOR_EACH_ELEMENT_FROM(c_node) */ - __Pyx_TraceLine(2926,0,__PYX_ERR(0, 2926, __pyx_L1_error)) __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":2927 + /* "lxml/etree.pyx":2925 * tree.BEGIN_FOR_EACH_ELEMENT_FROM(self._top_node._c_node, c_node, 0) * if self._matcher.matches(c_node): * return c_node # <<<<<<<<<<<<<< * tree.END_FOR_EACH_ELEMENT_FROM(c_node) * return NULL */ - __Pyx_TraceLine(2927,0,__PYX_ERR(0, 2927, __pyx_L1_error)) __pyx_r = __pyx_v_c_node; goto __pyx_L0; - /* "lxml/etree.pyx":2926 + /* "lxml/etree.pyx":2924 * 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): # <<<<<<<<<<<<<< @@ -83149,28 +78277,26 @@ static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeMatchT */ } - /* "lxml/etree.pyx":2928 + /* "lxml/etree.pyx":2926 * if self._matcher.matches(c_node): * return c_node * tree.END_FOR_EACH_ELEMENT_FROM(c_node) # <<<<<<<<<<<<<< * return NULL * */ - __Pyx_TraceLine(2928,0,__PYX_ERR(0, 2928, __pyx_L1_error)) END_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node); - /* "lxml/etree.pyx":2929 + /* "lxml/etree.pyx":2927 * return c_node * tree.END_FOR_EACH_ELEMENT_FROM(c_node) * return NULL # <<<<<<<<<<<<<< * * cdef class ElementTextIterator: */ - __Pyx_TraceLine(2929,0,__PYX_ERR(0, 2929, __pyx_L1_error)) __pyx_r = NULL; goto __pyx_L0; - /* "lxml/etree.pyx":2924 + /* "lxml/etree.pyx":2922 * * @cython.final * cdef xmlNode* _nextNodeMatchTag(self, xmlNode* c_node): # <<<<<<<<<<<<<< @@ -83179,16 +78305,12 @@ static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeMatchT */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.ElementDepthFirstIterator._nextNodeMatchTag", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2943 +/* "lxml/etree.pyx":2941 * cdef object _nextEvent * cdef _Element _start_element * def __cinit__(self, _Element element not None, tag=None, *, bint with_tail=True): # <<<<<<<<<<<<<< @@ -83238,7 +78360,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, 2943, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2941, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -83252,20 +78374,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, 2943, __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, 2941, __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, 2943, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2941, __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, 2943, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_5etree__Element, 0, "element", 0))) __PYX_ERR(0, 2941, __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 */ @@ -83280,7 +78402,6 @@ static int __pyx_pw_4lxml_5etree_19ElementTextIterator_1__cinit__(PyObject *__py static int __pyx_pf_4lxml_5etree_19ElementTextIterator___cinit__(struct __pyx_obj_4lxml_5etree_ElementTextIterator *__pyx_v_self, struct LxmlElement *__pyx_v_element, PyObject *__pyx_v_tag, int __pyx_v_with_tail) { PyObject *__pyx_v_events = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -83288,41 +78409,37 @@ static int __pyx_pf_4lxml_5etree_19ElementTextIterator___cinit__(struct __pyx_ob PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[0], 2943, 0, __PYX_ERR(0, 2943, __pyx_L1_error)); - /* "lxml/etree.pyx":2944 + /* "lxml/etree.pyx":2942 * 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_TraceLine(2944,0,__PYX_ERR(0, 2944, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2944, __pyx_L1_error) + __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) - /* "lxml/etree.pyx":2945 + /* "lxml/etree.pyx":2943 * def __cinit__(self, _Element element not None, tag=None, *, bint with_tail=True): * _assertValidNode(element) * if with_tail: # <<<<<<<<<<<<<< * events = (u"start", u"end") * else: */ - __Pyx_TraceLine(2945,0,__PYX_ERR(0, 2945, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_with_tail != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":2946 + /* "lxml/etree.pyx":2944 * _assertValidNode(element) * if with_tail: * events = (u"start", u"end") # <<<<<<<<<<<<<< * else: * events = (u"start",) */ - __Pyx_TraceLine(2946,0,__PYX_ERR(0, 2946, __pyx_L1_error)) - __Pyx_INCREF(__pyx_tuple__162); - __pyx_v_events = __pyx_tuple__162; + __Pyx_INCREF(__pyx_tuple__42); + __pyx_v_events = __pyx_tuple__42; - /* "lxml/etree.pyx":2945 + /* "lxml/etree.pyx":2943 * def __cinit__(self, _Element element not None, tag=None, *, bint with_tail=True): * _assertValidNode(element) * if with_tail: # <<<<<<<<<<<<<< @@ -83332,56 +78449,53 @@ static int __pyx_pf_4lxml_5etree_19ElementTextIterator___cinit__(struct __pyx_ob goto __pyx_L3; } - /* "lxml/etree.pyx":2948 + /* "lxml/etree.pyx":2946 * events = (u"start", u"end") * else: * events = (u"start",) # <<<<<<<<<<<<<< * self._start_element = element * self._nextEvent = iterwalk(element, events=events, tag=tag).__next__ */ - __Pyx_TraceLine(2948,0,__PYX_ERR(0, 2948, __pyx_L1_error)) /*else*/ { - __Pyx_INCREF(__pyx_tuple__163); - __pyx_v_events = __pyx_tuple__163; + __Pyx_INCREF(__pyx_tuple__43); + __pyx_v_events = __pyx_tuple__43; } __pyx_L3:; - /* "lxml/etree.pyx":2949 + /* "lxml/etree.pyx":2947 * else: * events = (u"start",) * self._start_element = element # <<<<<<<<<<<<<< * self._nextEvent = iterwalk(element, events=events, tag=tag).__next__ * */ - __Pyx_TraceLine(2949,0,__PYX_ERR(0, 2949, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_element)); __Pyx_GIVEREF(((PyObject *)__pyx_v_element)); __Pyx_GOTREF(__pyx_v_self->_start_element); __Pyx_DECREF(((PyObject *)__pyx_v_self->_start_element)); __pyx_v_self->_start_element = __pyx_v_element; - /* "lxml/etree.pyx":2950 + /* "lxml/etree.pyx":2948 * events = (u"start",) * self._start_element = element * self._nextEvent = iterwalk(element, events=events, tag=tag).__next__ # <<<<<<<<<<<<<< * * def __iter__(self): */ - __Pyx_TraceLine(2950,0,__PYX_ERR(0, 2950, __pyx_L1_error)) - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2950, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2948, __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, 2950, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2948, __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, 2950, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_tag, __pyx_v_tag) < 0) __PYX_ERR(0, 2950, __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, 2950, __pyx_L1_error) + 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) __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, 2950, __pyx_L1_error) + __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_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_4); @@ -83390,7 +78504,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":2943 + /* "lxml/etree.pyx":2941 * cdef object _nextEvent * cdef _Element _start_element * def __cinit__(self, _Element element not None, tag=None, *, bint with_tail=True): # <<<<<<<<<<<<<< @@ -83409,12 +78523,11 @@ static int __pyx_pf_4lxml_5etree_19ElementTextIterator___cinit__(struct __pyx_ob __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_events); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2952 +/* "lxml/etree.pyx":2950 * self._nextEvent = iterwalk(element, events=events, tag=tag).__next__ * * def __iter__(self): # <<<<<<<<<<<<<< @@ -83437,25 +78550,22 @@ static PyObject *__pyx_pw_4lxml_5etree_19ElementTextIterator_3__iter__(PyObject static PyObject *__pyx_pf_4lxml_5etree_19ElementTextIterator_2__iter__(struct __pyx_obj_4lxml_5etree_ElementTextIterator *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 0); - __Pyx_TraceCall("__iter__", __pyx_f[0], 2952, 0, __PYX_ERR(0, 2952, __pyx_L1_error)); - /* "lxml/etree.pyx":2953 + /* "lxml/etree.pyx":2951 * * def __iter__(self): * return self # <<<<<<<<<<<<<< * * def __next__(self): */ - __Pyx_TraceLine(2953,0,__PYX_ERR(0, 2953, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "lxml/etree.pyx":2952 + /* "lxml/etree.pyx":2950 * self._nextEvent = iterwalk(element, events=events, tag=tag).__next__ * * def __iter__(self): # <<<<<<<<<<<<<< @@ -83464,17 +78574,13 @@ static PyObject *__pyx_pf_4lxml_5etree_19ElementTextIterator_2__iter__(struct __ */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.ElementTextIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2955 +/* "lxml/etree.pyx":2953 * return self * * def __next__(self): # <<<<<<<<<<<<<< @@ -83500,7 +78606,6 @@ static PyObject *__pyx_pf_4lxml_5etree_19ElementTextIterator_4__next__(struct __ PyObject *__pyx_v_result = NULL; PyObject *__pyx_v_event = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -83510,40 +78615,36 @@ static PyObject *__pyx_pf_4lxml_5etree_19ElementTextIterator_4__next__(struct __ PyObject *__pyx_t_6 = NULL; PyObject *(*__pyx_t_7)(PyObject *); __Pyx_RefNannySetupContext("__next__", 0); - __Pyx_TraceCall("__next__", __pyx_f[0], 2955, 0, __PYX_ERR(0, 2955, __pyx_L1_error)); - /* "lxml/etree.pyx":2957 + /* "lxml/etree.pyx":2955 * def __next__(self): * cdef _Element element * result = None # <<<<<<<<<<<<<< * while result is None: * event, element = self._nextEvent() # raises StopIteration */ - __Pyx_TraceLine(2957,0,__PYX_ERR(0, 2957, __pyx_L1_error)) __Pyx_INCREF(Py_None); __pyx_v_result = Py_None; - /* "lxml/etree.pyx":2958 + /* "lxml/etree.pyx":2956 * cdef _Element element * result = None * while result is None: # <<<<<<<<<<<<<< * event, element = self._nextEvent() # raises StopIteration * if event == u"start": */ - __Pyx_TraceLine(2958,0,__PYX_ERR(0, 2958, __pyx_L1_error)) while (1) { __pyx_t_1 = (__pyx_v_result == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (!__pyx_t_2) break; - /* "lxml/etree.pyx":2959 + /* "lxml/etree.pyx":2957 * result = None * while result is None: * event, element = self._nextEvent() # raises StopIteration # <<<<<<<<<<<<<< * if event == u"start": * result = element.text */ - __Pyx_TraceLine(2959,0,__PYX_ERR(0, 2959, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_self->_nextEvent); __pyx_t_4 = __pyx_v_self->_nextEvent; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -83555,12 +78656,9 @@ static PyObject *__pyx_pf_4lxml_5etree_19ElementTextIterator_4__next__(struct __ __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2959, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2959, __pyx_L1_error) - } + __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) __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))) { @@ -83569,7 +78667,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, 2959, __pyx_L1_error) + __PYX_ERR(0, 2957, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -83582,15 +78680,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, 2959, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2959, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2957, __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, 2959, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2957, __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; @@ -83598,7 +78696,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, 2959, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 2957, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L6_unpacking_done; @@ -83606,40 +78704,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, 2959, __pyx_L1_error) + __PYX_ERR(0, 2957, __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, 2959, __pyx_L1_error) + 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) __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":2960 + /* "lxml/etree.pyx":2958 * 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_TraceLine(2960,0,__PYX_ERR(0, 2960, __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, 2960, __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, 2958, __pyx_L1_error) if (__pyx_t_2) { - /* "lxml/etree.pyx":2961 + /* "lxml/etree.pyx":2959 * event, element = self._nextEvent() # raises StopIteration * if event == u"start": * result = element.text # <<<<<<<<<<<<<< * elif element is not self._start_element: * result = element.tail */ - __Pyx_TraceLine(2961,0,__PYX_ERR(0, 2961, __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, 2961, __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, 2959, __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":2958 * while result is None: * event, element = self._nextEvent() # raises StopIteration * if event == u"start": # <<<<<<<<<<<<<< @@ -83649,32 +78745,30 @@ static PyObject *__pyx_pf_4lxml_5etree_19ElementTextIterator_4__next__(struct __ goto __pyx_L7; } - /* "lxml/etree.pyx":2962 + /* "lxml/etree.pyx":2960 * if event == u"start": * result = element.text * elif element is not self._start_element: # <<<<<<<<<<<<<< * result = element.tail * return result */ - __Pyx_TraceLine(2962,0,__PYX_ERR(0, 2962, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_element != __pyx_v_self->_start_element); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":2963 + /* "lxml/etree.pyx":2961 * result = element.text * elif element is not self._start_element: * result = element.tail # <<<<<<<<<<<<<< * return result * */ - __Pyx_TraceLine(2963,0,__PYX_ERR(0, 2963, __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, 2963, __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, 2961, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":2962 + /* "lxml/etree.pyx":2960 * if event == u"start": * result = element.text * elif element is not self._start_element: # <<<<<<<<<<<<<< @@ -83685,20 +78779,19 @@ static PyObject *__pyx_pf_4lxml_5etree_19ElementTextIterator_4__next__(struct __ __pyx_L7:; } - /* "lxml/etree.pyx":2964 + /* "lxml/etree.pyx":2962 * elif element is not self._start_element: * result = element.tail * return result # <<<<<<<<<<<<<< * * cdef xmlNode* _createElement(xmlDoc* c_doc, object name_utf) except NULL: */ - __Pyx_TraceLine(2964,0,__PYX_ERR(0, 2964, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "lxml/etree.pyx":2955 + /* "lxml/etree.pyx":2953 * return self * * def __next__(self): # <<<<<<<<<<<<<< @@ -83719,12 +78812,11 @@ static PyObject *__pyx_pf_4lxml_5etree_19ElementTextIterator_4__next__(struct __ __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_event); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2966 +/* "lxml/etree.pyx":2964 * return result * * cdef xmlNode* _createElement(xmlDoc* c_doc, object name_utf) except NULL: # <<<<<<<<<<<<<< @@ -83735,33 +78827,29 @@ static PyObject *__pyx_pf_4lxml_5etree_19ElementTextIterator_4__next__(struct __ static xmlNode *__pyx_f_4lxml_5etree__createElement(xmlDoc *__pyx_v_c_doc, PyObject *__pyx_v_name_utf) { xmlNode *__pyx_v_c_node; xmlNode *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_createElement", 0); - __Pyx_TraceCall("_createElement", __pyx_f[0], 2966, 0, __PYX_ERR(0, 2966, __pyx_L1_error)); - /* "lxml/etree.pyx":2968 + /* "lxml/etree.pyx":2966 * 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) # <<<<<<<<<<<<<< * return c_node * */ - __Pyx_TraceLine(2968,0,__PYX_ERR(0, 2968, __pyx_L1_error)) __pyx_v_c_node = xmlNewDocNode(__pyx_v_c_doc, NULL, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_name_utf), NULL); - /* "lxml/etree.pyx":2969 + /* "lxml/etree.pyx":2967 * cdef xmlNode* c_node * c_node = tree.xmlNewDocNode(c_doc, NULL, _xcstr(name_utf), NULL) * return c_node # <<<<<<<<<<<<<< * * cdef xmlNode* _createComment(xmlDoc* c_doc, const_xmlChar* text): */ - __Pyx_TraceLine(2969,0,__PYX_ERR(0, 2969, __pyx_L1_error)) __pyx_r = __pyx_v_c_node; goto __pyx_L0; - /* "lxml/etree.pyx":2966 + /* "lxml/etree.pyx":2964 * return result * * cdef xmlNode* _createElement(xmlDoc* c_doc, object name_utf) except NULL: # <<<<<<<<<<<<<< @@ -83770,16 +78858,12 @@ static xmlNode *__pyx_f_4lxml_5etree__createElement(xmlDoc *__pyx_v_c_doc, PyObj */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._createElement", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2971 +/* "lxml/etree.pyx":2969 * return c_node * * cdef xmlNode* _createComment(xmlDoc* c_doc, const_xmlChar* text): # <<<<<<<<<<<<<< @@ -83790,33 +78874,29 @@ static xmlNode *__pyx_f_4lxml_5etree__createElement(xmlDoc *__pyx_v_c_doc, PyObj static xmlNode *__pyx_f_4lxml_5etree__createComment(xmlDoc *__pyx_v_c_doc, const xmlChar *__pyx_v_text) { xmlNode *__pyx_v_c_node; xmlNode *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_createComment", 0); - __Pyx_TraceCall("_createComment", __pyx_f[0], 2971, 0, __PYX_ERR(0, 2971, __pyx_L1_error)); - /* "lxml/etree.pyx":2973 + /* "lxml/etree.pyx":2971 * cdef xmlNode* _createComment(xmlDoc* c_doc, const_xmlChar* text): * cdef xmlNode* c_node * c_node = tree.xmlNewDocComment(c_doc, text) # <<<<<<<<<<<<<< * return c_node * */ - __Pyx_TraceLine(2973,0,__PYX_ERR(0, 2973, __pyx_L1_error)) __pyx_v_c_node = xmlNewDocComment(__pyx_v_c_doc, __pyx_v_text); - /* "lxml/etree.pyx":2974 + /* "lxml/etree.pyx":2972 * cdef xmlNode* c_node * c_node = tree.xmlNewDocComment(c_doc, text) * return c_node # <<<<<<<<<<<<<< * * cdef xmlNode* _createPI(xmlDoc* c_doc, const_xmlChar* target, const_xmlChar* text): */ - __Pyx_TraceLine(2974,0,__PYX_ERR(0, 2974, __pyx_L1_error)) __pyx_r = __pyx_v_c_node; goto __pyx_L0; - /* "lxml/etree.pyx":2971 + /* "lxml/etree.pyx":2969 * return c_node * * cdef xmlNode* _createComment(xmlDoc* c_doc, const_xmlChar* text): # <<<<<<<<<<<<<< @@ -83825,16 +78905,12 @@ static xmlNode *__pyx_f_4lxml_5etree__createComment(xmlDoc *__pyx_v_c_doc, const */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._createComment", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2976 +/* "lxml/etree.pyx":2974 * return c_node * * cdef xmlNode* _createPI(xmlDoc* c_doc, const_xmlChar* target, const_xmlChar* text): # <<<<<<<<<<<<<< @@ -83845,33 +78921,29 @@ static xmlNode *__pyx_f_4lxml_5etree__createComment(xmlDoc *__pyx_v_c_doc, const static xmlNode *__pyx_f_4lxml_5etree__createPI(xmlDoc *__pyx_v_c_doc, const xmlChar *__pyx_v_target, const xmlChar *__pyx_v_text) { xmlNode *__pyx_v_c_node; xmlNode *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_createPI", 0); - __Pyx_TraceCall("_createPI", __pyx_f[0], 2976, 0, __PYX_ERR(0, 2976, __pyx_L1_error)); - /* "lxml/etree.pyx":2978 + /* "lxml/etree.pyx":2976 * cdef xmlNode* _createPI(xmlDoc* c_doc, const_xmlChar* target, const_xmlChar* text): * cdef xmlNode* c_node * c_node = tree.xmlNewDocPI(c_doc, target, text) # <<<<<<<<<<<<<< * return c_node * */ - __Pyx_TraceLine(2978,0,__PYX_ERR(0, 2978, __pyx_L1_error)) __pyx_v_c_node = xmlNewDocPI(__pyx_v_c_doc, __pyx_v_target, __pyx_v_text); - /* "lxml/etree.pyx":2979 + /* "lxml/etree.pyx":2977 * cdef xmlNode* c_node * c_node = tree.xmlNewDocPI(c_doc, target, text) * return c_node # <<<<<<<<<<<<<< * * cdef xmlNode* _createEntity(xmlDoc* c_doc, const_xmlChar* name): */ - __Pyx_TraceLine(2979,0,__PYX_ERR(0, 2979, __pyx_L1_error)) __pyx_r = __pyx_v_c_node; goto __pyx_L0; - /* "lxml/etree.pyx":2976 + /* "lxml/etree.pyx":2974 * return c_node * * cdef xmlNode* _createPI(xmlDoc* c_doc, const_xmlChar* target, const_xmlChar* text): # <<<<<<<<<<<<<< @@ -83880,16 +78952,12 @@ static xmlNode *__pyx_f_4lxml_5etree__createPI(xmlDoc *__pyx_v_c_doc, const xmlC */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._createPI", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2981 +/* "lxml/etree.pyx":2979 * return c_node * * cdef xmlNode* _createEntity(xmlDoc* c_doc, const_xmlChar* name): # <<<<<<<<<<<<<< @@ -83900,33 +78968,29 @@ static xmlNode *__pyx_f_4lxml_5etree__createPI(xmlDoc *__pyx_v_c_doc, const xmlC static xmlNode *__pyx_f_4lxml_5etree__createEntity(xmlDoc *__pyx_v_c_doc, const xmlChar *__pyx_v_name) { xmlNode *__pyx_v_c_node; xmlNode *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_createEntity", 0); - __Pyx_TraceCall("_createEntity", __pyx_f[0], 2981, 0, __PYX_ERR(0, 2981, __pyx_L1_error)); - /* "lxml/etree.pyx":2983 + /* "lxml/etree.pyx":2981 * cdef xmlNode* _createEntity(xmlDoc* c_doc, const_xmlChar* name): * cdef xmlNode* c_node * c_node = tree.xmlNewReference(c_doc, name) # <<<<<<<<<<<<<< * return c_node * */ - __Pyx_TraceLine(2983,0,__PYX_ERR(0, 2983, __pyx_L1_error)) __pyx_v_c_node = xmlNewReference(__pyx_v_c_doc, __pyx_v_name); - /* "lxml/etree.pyx":2984 + /* "lxml/etree.pyx":2982 * cdef xmlNode* c_node * c_node = tree.xmlNewReference(c_doc, name) * return c_node # <<<<<<<<<<<<<< * * # module-level API for ElementTree */ - __Pyx_TraceLine(2984,0,__PYX_ERR(0, 2984, __pyx_L1_error)) __pyx_r = __pyx_v_c_node; goto __pyx_L0; - /* "lxml/etree.pyx":2981 + /* "lxml/etree.pyx":2979 * return c_node * * cdef xmlNode* _createEntity(xmlDoc* c_doc, const_xmlChar* name): # <<<<<<<<<<<<<< @@ -83935,16 +78999,12 @@ static xmlNode *__pyx_f_4lxml_5etree__createEntity(xmlDoc *__pyx_v_c_doc, const */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._createEntity", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":2988 +/* "lxml/etree.pyx":2986 * # module-level API for ElementTree * * def Element(_tag, attrib=None, nsmap=None, **_extra): # <<<<<<<<<<<<<< @@ -83955,7 +79015,7 @@ static xmlNode *__pyx_f_4lxml_5etree__createEntity(xmlDoc *__pyx_v_c_doc, const /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_7Element(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_6Element[] = "Element(_tag, attrib=None, nsmap=None, **_extra)\n\n Element factory. This function returns an object implementing the\n Element interface.\n\n Also look at the `_Element.makeelement()` and\n `_BaseParser.makeelement()` methods, which provide a faster way to\n create an Element within a specific document or parser context.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_7Element = {"Element", (PyCFunction)__pyx_pw_4lxml_5etree_7Element, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_6Element}; +static PyMethodDef __pyx_mdef_4lxml_5etree_7Element = {"Element", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_7Element, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_6Element}; static PyObject *__pyx_pw_4lxml_5etree_7Element(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v__tag = 0; PyObject *__pyx_v_attrib = 0; @@ -84003,7 +79063,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, 2988, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__extra, values, pos_args, "Element") < 0)) __PYX_ERR(0, 2986, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -84022,7 +79082,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, 2988, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("Element", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2986, __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); @@ -84039,38 +79099,33 @@ static PyObject *__pyx_pw_4lxml_5etree_7Element(PyObject *__pyx_self, PyObject * static PyObject *__pyx_pf_4lxml_5etree_6Element(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v__tag, PyObject *__pyx_v_attrib, PyObject *__pyx_v_nsmap, PyObject *__pyx_v__extra) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__164) __Pyx_RefNannySetupContext("Element", 0); - __Pyx_TraceCall("Element", __pyx_f[0], 2988, 0, __PYX_ERR(0, 2988, __pyx_L1_error)); - /* "lxml/etree.pyx":2998 + /* "lxml/etree.pyx":2996 * create an Element within a specific document or parser context. * """ * return _makeElement(_tag, NULL, None, None, None, None, # <<<<<<<<<<<<<< * attrib, nsmap, _extra) * */ - __Pyx_TraceLine(2998,0,__PYX_ERR(0, 2998, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - /* "lxml/etree.pyx":2999 + /* "lxml/etree.pyx":2997 * """ * return _makeElement(_tag, NULL, None, None, None, None, * attrib, nsmap, _extra) # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(2999,0,__PYX_ERR(0, 2999, __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, 2998, __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, 2996, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2988 + /* "lxml/etree.pyx":2986 * # module-level API for ElementTree * * def Element(_tag, attrib=None, nsmap=None, **_extra): # <<<<<<<<<<<<<< @@ -84085,12 +79140,11 @@ static PyObject *__pyx_pf_4lxml_5etree_6Element(CYTHON_UNUSED PyObject *__pyx_se __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":3002 +/* "lxml/etree.pyx":3000 * * * def Comment(text=None): # <<<<<<<<<<<<<< @@ -84101,7 +79155,7 @@ static PyObject *__pyx_pf_4lxml_5etree_6Element(CYTHON_UNUSED PyObject *__pyx_se /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_9Comment(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_8Comment[] = "Comment(text=None)\n\n Comment element factory. This factory function creates a special element that will\n be serialized as an XML comment.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_9Comment = {"Comment", (PyCFunction)__pyx_pw_4lxml_5etree_9Comment, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8Comment}; +static PyMethodDef __pyx_mdef_4lxml_5etree_9Comment = {"Comment", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_9Comment, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8Comment}; static PyObject *__pyx_pw_4lxml_5etree_9Comment(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_text = 0; PyObject *__pyx_r = 0; @@ -84129,7 +79183,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, 3002, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Comment") < 0)) __PYX_ERR(0, 3000, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -84143,7 +79197,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, 3002, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("Comment", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3000, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.Comment", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -84161,43 +79215,39 @@ static PyObject *__pyx_pf_4lxml_5etree_8Comment(CYTHON_UNUSED PyObject *__pyx_se xmlNode *__pyx_v_c_node; xmlDoc *__pyx_v_c_doc; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; - xmlDoc *__pyx_t_6; - __Pyx_TraceFrameInit(__pyx_codeobj__165) + PyObject *__pyx_t_6 = NULL; + xmlDoc *__pyx_t_7; __Pyx_RefNannySetupContext("Comment", 0); - __Pyx_TraceCall("Comment", __pyx_f[0], 3002, 0, __PYX_ERR(0, 3002, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_text); - /* "lxml/etree.pyx":3012 + /* "lxml/etree.pyx":3010 * cdef xmlDoc* c_doc * * if text is None: # <<<<<<<<<<<<<< * text = b'' * else: */ - __Pyx_TraceLine(3012,0,__PYX_ERR(0, 3012, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_text == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":3013 + /* "lxml/etree.pyx":3011 * * if text is None: * text = b'' # <<<<<<<<<<<<<< * else: * text = _utf8(text) */ - __Pyx_TraceLine(3013,0,__PYX_ERR(0, 3013, __pyx_L1_error)) - __Pyx_INCREF(__pyx_kp_b__23); - __Pyx_DECREF_SET(__pyx_v_text, __pyx_kp_b__23); + __Pyx_INCREF(__pyx_kp_b__11); + __Pyx_DECREF_SET(__pyx_v_text, __pyx_kp_b__11); - /* "lxml/etree.pyx":3012 + /* "lxml/etree.pyx":3010 * cdef xmlDoc* c_doc * * if text is None: # <<<<<<<<<<<<<< @@ -84207,61 +79257,70 @@ static PyObject *__pyx_pf_4lxml_5etree_8Comment(CYTHON_UNUSED PyObject *__pyx_se goto __pyx_L3; } - /* "lxml/etree.pyx":3015 + /* "lxml/etree.pyx":3013 * text = b'' * else: * text = _utf8(text) # <<<<<<<<<<<<<< * if b'--' in text or text.endswith(b'-'): * raise ValueError("Comment may not contain '--' or end with '-'") */ - __Pyx_TraceLine(3015,0,__PYX_ERR(0, 3015, __pyx_L1_error)) /*else*/ { - __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3015, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_text, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":3016 + /* "lxml/etree.pyx":3014 * else: * text = _utf8(text) * if b'--' in text or text.endswith(b'-'): # <<<<<<<<<<<<<< * raise ValueError("Comment may not contain '--' or end with '-'") * */ - __Pyx_TraceLine(3016,0,__PYX_ERR(0, 3016, __pyx_L1_error)) - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__166, __pyx_v_text, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3016, __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, 3014, __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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_text, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3016, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__167, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3016, __pyx_L1_error) + __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_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3016, __pyx_L1_error) + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __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) + __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_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":3017 + /* "lxml/etree.pyx":3015 * text = _utf8(text) * if b'--' in text or text.endswith(b'-'): * raise ValueError("Comment may not contain '--' or end with '-'") # <<<<<<<<<<<<<< * * c_doc = _newXMLDoc() */ - __Pyx_TraceLine(3017,0,__PYX_ERR(0, 3017, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__168, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3017, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_Raise(__pyx_t_5, 0, 0, 0); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 3017, __pyx_L1_error) + __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_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) - /* "lxml/etree.pyx":3016 + /* "lxml/etree.pyx":3014 * else: * text = _utf8(text) * if b'--' in text or text.endswith(b'-'): # <<<<<<<<<<<<<< @@ -84272,66 +79331,61 @@ static PyObject *__pyx_pf_4lxml_5etree_8Comment(CYTHON_UNUSED PyObject *__pyx_se } __pyx_L3:; - /* "lxml/etree.pyx":3019 + /* "lxml/etree.pyx":3017 * 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_TraceLine(3019,0,__PYX_ERR(0, 3019, __pyx_L1_error)) - __pyx_t_6 = __pyx_f_4lxml_5etree__newXMLDoc(); if (unlikely(__pyx_t_6 == ((xmlDoc *)NULL))) __PYX_ERR(0, 3019, __pyx_L1_error) - __pyx_v_c_doc = __pyx_t_6; + __pyx_t_7 = __pyx_f_4lxml_5etree__newXMLDoc(); if (unlikely(__pyx_t_7 == ((xmlDoc *)NULL))) __PYX_ERR(0, 3017, __pyx_L1_error) + __pyx_v_c_doc = __pyx_t_7; - /* "lxml/etree.pyx":3020 + /* "lxml/etree.pyx":3018 * * c_doc = _newXMLDoc() * doc = _documentFactory(c_doc, None) # <<<<<<<<<<<<<< * c_node = _createComment(c_doc, _xcstr(text)) * tree.xmlAddChild(c_doc, c_node) */ - __Pyx_TraceLine(3020,0,__PYX_ERR(0, 3020, __pyx_L1_error)) - __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3020, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_5); - __pyx_t_5 = 0; + __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_GOTREF(__pyx_t_3); + __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_3); + __pyx_t_3 = 0; - /* "lxml/etree.pyx":3021 + /* "lxml/etree.pyx":3019 * c_doc = _newXMLDoc() * doc = _documentFactory(c_doc, None) * c_node = _createComment(c_doc, _xcstr(text)) # <<<<<<<<<<<<<< * tree.xmlAddChild(c_doc, c_node) * return _elementFactory(doc, c_node) */ - __Pyx_TraceLine(3021,0,__PYX_ERR(0, 3021, __pyx_L1_error)) __pyx_v_c_node = __pyx_f_4lxml_5etree__createComment(__pyx_v_c_doc, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_text)); - /* "lxml/etree.pyx":3022 + /* "lxml/etree.pyx":3020 * doc = _documentFactory(c_doc, None) * c_node = _createComment(c_doc, _xcstr(text)) * tree.xmlAddChild(c_doc, c_node) # <<<<<<<<<<<<<< * return _elementFactory(doc, c_node) * */ - __Pyx_TraceLine(3022,0,__PYX_ERR(0, 3022, __pyx_L1_error)) (void)(xmlAddChild(((xmlNode *)__pyx_v_c_doc), __pyx_v_c_node)); - /* "lxml/etree.pyx":3023 + /* "lxml/etree.pyx":3021 * c_node = _createComment(c_doc, _xcstr(text)) * tree.xmlAddChild(c_doc, c_node) * return _elementFactory(doc, c_node) # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(3023,0,__PYX_ERR(0, 3023, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(__pyx_v_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3023, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_r = __pyx_t_5; - __pyx_t_5 = 0; + __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_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3002 + /* "lxml/etree.pyx":3000 * * * def Comment(text=None): # <<<<<<<<<<<<<< @@ -84343,18 +79397,18 @@ static PyObject *__pyx_pf_4lxml_5etree_8Comment(CYTHON_UNUSED PyObject *__pyx_se __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("lxml.etree.Comment", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XDECREF(__pyx_v_text); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":3026 +/* "lxml/etree.pyx":3024 * * * def ProcessingInstruction(target, text=None): # <<<<<<<<<<<<<< @@ -84365,7 +79419,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8Comment(CYTHON_UNUSED PyObject *__pyx_se /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_11ProcessingInstruction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_10ProcessingInstruction[] = "ProcessingInstruction(target, text=None)\n\n ProcessingInstruction element factory. This factory function creates a\n special element that will be serialized as an XML processing instruction.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_11ProcessingInstruction = {"ProcessingInstruction", (PyCFunction)__pyx_pw_4lxml_5etree_11ProcessingInstruction, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_10ProcessingInstruction}; +static PyMethodDef __pyx_mdef_4lxml_5etree_11ProcessingInstruction = {"ProcessingInstruction", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_11ProcessingInstruction, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_10ProcessingInstruction}; static PyObject *__pyx_pw_4lxml_5etree_11ProcessingInstruction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_target = 0; PyObject *__pyx_v_text = 0; @@ -84400,7 +79454,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, 3026, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ProcessingInstruction") < 0)) __PYX_ERR(0, 3024, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -84416,7 +79470,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, 3026, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("ProcessingInstruction", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3024, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.ProcessingInstruction", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -84434,7 +79488,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10ProcessingInstruction(CYTHON_UNUSED PyO xmlNode *__pyx_v_c_node; xmlDoc *__pyx_v_c_doc; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -84445,44 +79498,39 @@ static PyObject *__pyx_pf_4lxml_5etree_10ProcessingInstruction(CYTHON_UNUSED PyO Py_UCS4 __pyx_t_7; int __pyx_t_8; xmlDoc *__pyx_t_9; - __Pyx_TraceFrameInit(__pyx_codeobj__169) __Pyx_RefNannySetupContext("ProcessingInstruction", 0); - __Pyx_TraceCall("ProcessingInstruction", __pyx_f[0], 3026, 0, __PYX_ERR(0, 3026, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_target); __Pyx_INCREF(__pyx_v_text); - /* "lxml/etree.pyx":3036 + /* "lxml/etree.pyx":3034 * cdef xmlDoc* c_doc * * target = _utf8(target) # <<<<<<<<<<<<<< * _tagValidOrRaise(target) * if target.lower() == b'xml': */ - __Pyx_TraceLine(3036,0,__PYX_ERR(0, 3036, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_target); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3036, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_target); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_target, __pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3037 + /* "lxml/etree.pyx":3035 * * target = _utf8(target) * _tagValidOrRaise(target) # <<<<<<<<<<<<<< * if target.lower() == b'xml': * raise ValueError, f"Invalid PI name '{target}'" */ - __Pyx_TraceLine(3037,0,__PYX_ERR(0, 3037, __pyx_L1_error)) - __pyx_t_2 = __pyx_f_4lxml_5etree__tagValidOrRaise(__pyx_v_target); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 3037, __pyx_L1_error) + __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) - /* "lxml/etree.pyx":3038 + /* "lxml/etree.pyx":3036 * target = _utf8(target) * _tagValidOrRaise(target) * if target.lower() == b'xml': # <<<<<<<<<<<<<< * raise ValueError, f"Invalid PI name '{target}'" * */ - __Pyx_TraceLine(3038,0,__PYX_ERR(0, 3038, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_lower); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3038, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -84494,27 +79542,23 @@ static PyObject *__pyx_pf_4lxml_5etree_10ProcessingInstruction(CYTHON_UNUSED PyO __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3038, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3038, __pyx_L1_error) - } + __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) __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, 3038, __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, 3036, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_5)) { - /* "lxml/etree.pyx":3039 + /* "lxml/etree.pyx":3037 * _tagValidOrRaise(target) * if target.lower() == b'xml': * raise ValueError, f"Invalid PI name '{target}'" # <<<<<<<<<<<<<< * * if text is None: */ - __Pyx_TraceLine(3039,0,__PYX_ERR(0, 3039, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3039, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = 0; __pyx_t_7 = 127; @@ -84522,25 +79566,25 @@ 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, 3039, __pyx_L1_error) + __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_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); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); __pyx_t_3 = 0; - __Pyx_INCREF(__pyx_kp_u__60); + __Pyx_INCREF(__pyx_kp_u__21); __pyx_t_6 += 1; - __Pyx_GIVEREF(__pyx_kp_u__60); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__60); - __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3039, __pyx_L1_error) + __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_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, 3039, __pyx_L1_error) + __PYX_ERR(0, 3037, __pyx_L1_error) - /* "lxml/etree.pyx":3038 + /* "lxml/etree.pyx":3036 * target = _utf8(target) * _tagValidOrRaise(target) * if target.lower() == b'xml': # <<<<<<<<<<<<<< @@ -84549,30 +79593,28 @@ static PyObject *__pyx_pf_4lxml_5etree_10ProcessingInstruction(CYTHON_UNUSED PyO */ } - /* "lxml/etree.pyx":3041 + /* "lxml/etree.pyx":3039 * raise ValueError, f"Invalid PI name '{target}'" * * if text is None: # <<<<<<<<<<<<<< * text = b'' * else: */ - __Pyx_TraceLine(3041,0,__PYX_ERR(0, 3041, __pyx_L1_error)) __pyx_t_5 = (__pyx_v_text == Py_None); __pyx_t_8 = (__pyx_t_5 != 0); if (__pyx_t_8) { - /* "lxml/etree.pyx":3042 + /* "lxml/etree.pyx":3040 * * if text is None: * text = b'' # <<<<<<<<<<<<<< * else: * text = _utf8(text) */ - __Pyx_TraceLine(3042,0,__PYX_ERR(0, 3042, __pyx_L1_error)) - __Pyx_INCREF(__pyx_kp_b__23); - __Pyx_DECREF_SET(__pyx_v_text, __pyx_kp_b__23); + __Pyx_INCREF(__pyx_kp_b__11); + __Pyx_DECREF_SET(__pyx_v_text, __pyx_kp_b__11); - /* "lxml/etree.pyx":3041 + /* "lxml/etree.pyx":3039 * raise ValueError, f"Invalid PI name '{target}'" * * if text is None: # <<<<<<<<<<<<<< @@ -84582,44 +79624,41 @@ static PyObject *__pyx_pf_4lxml_5etree_10ProcessingInstruction(CYTHON_UNUSED PyO goto __pyx_L4; } - /* "lxml/etree.pyx":3044 + /* "lxml/etree.pyx":3042 * text = b'' * else: * text = _utf8(text) # <<<<<<<<<<<<<< * if b'?>' in text: * raise ValueError, "PI text must not contain '?>'" */ - __Pyx_TraceLine(3044,0,__PYX_ERR(0, 3044, __pyx_L1_error)) /*else*/ { - __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3044, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_text, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":3045 + /* "lxml/etree.pyx":3043 * else: * text = _utf8(text) * if b'?>' in text: # <<<<<<<<<<<<<< * raise ValueError, "PI text must not contain '?>'" * */ - __Pyx_TraceLine(3045,0,__PYX_ERR(0, 3045, __pyx_L1_error)) - __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__170, __pyx_v_text, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3045, __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, 3043, __pyx_L1_error) __pyx_t_5 = (__pyx_t_8 != 0); if (unlikely(__pyx_t_5)) { - /* "lxml/etree.pyx":3046 + /* "lxml/etree.pyx":3044 * text = _utf8(text) * if b'?>' in text: * raise ValueError, "PI text must not contain '?>'" # <<<<<<<<<<<<<< * * c_doc = _newXMLDoc() */ - __Pyx_TraceLine(3046,0,__PYX_ERR(0, 3046, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_PI_text_must_not_contain, 0, 0); - __PYX_ERR(0, 3046, __pyx_L1_error) + __PYX_ERR(0, 3044, __pyx_L1_error) - /* "lxml/etree.pyx":3045 + /* "lxml/etree.pyx":3043 * else: * text = _utf8(text) * if b'?>' in text: # <<<<<<<<<<<<<< @@ -84630,66 +79669,61 @@ static PyObject *__pyx_pf_4lxml_5etree_10ProcessingInstruction(CYTHON_UNUSED PyO } __pyx_L4:; - /* "lxml/etree.pyx":3048 + /* "lxml/etree.pyx":3046 * 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_TraceLine(3048,0,__PYX_ERR(0, 3048, __pyx_L1_error)) - __pyx_t_9 = __pyx_f_4lxml_5etree__newXMLDoc(); if (unlikely(__pyx_t_9 == ((xmlDoc *)NULL))) __PYX_ERR(0, 3048, __pyx_L1_error) + __pyx_t_9 = __pyx_f_4lxml_5etree__newXMLDoc(); if (unlikely(__pyx_t_9 == ((xmlDoc *)NULL))) __PYX_ERR(0, 3046, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_9; - /* "lxml/etree.pyx":3049 + /* "lxml/etree.pyx":3047 * * c_doc = _newXMLDoc() * doc = _documentFactory(c_doc, None) # <<<<<<<<<<<<<< * c_node = _createPI(c_doc, _xcstr(target), _xcstr(text)) * tree.xmlAddChild(c_doc, c_node) */ - __Pyx_TraceLine(3049,0,__PYX_ERR(0, 3049, __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, 3049, __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, 3047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":3050 + /* "lxml/etree.pyx":3048 * c_doc = _newXMLDoc() * doc = _documentFactory(c_doc, None) * c_node = _createPI(c_doc, _xcstr(target), _xcstr(text)) # <<<<<<<<<<<<<< * tree.xmlAddChild(c_doc, c_node) * return _elementFactory(doc, c_node) */ - __Pyx_TraceLine(3050,0,__PYX_ERR(0, 3050, __pyx_L1_error)) __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":3051 + /* "lxml/etree.pyx":3049 * doc = _documentFactory(c_doc, None) * c_node = _createPI(c_doc, _xcstr(target), _xcstr(text)) * tree.xmlAddChild(c_doc, c_node) # <<<<<<<<<<<<<< * return _elementFactory(doc, c_node) * */ - __Pyx_TraceLine(3051,0,__PYX_ERR(0, 3051, __pyx_L1_error)) (void)(xmlAddChild(((xmlNode *)__pyx_v_c_doc), __pyx_v_c_node)); - /* "lxml/etree.pyx":3052 + /* "lxml/etree.pyx":3050 * c_node = _createPI(c_doc, _xcstr(target), _xcstr(text)) * tree.xmlAddChild(c_doc, c_node) * return _elementFactory(doc, c_node) # <<<<<<<<<<<<<< * * PI = ProcessingInstruction */ - __Pyx_TraceLine(3052,0,__PYX_ERR(0, 3052, __pyx_L1_error)) __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, 3052, __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, 3050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3026 + /* "lxml/etree.pyx":3024 * * * def ProcessingInstruction(target, text=None): # <<<<<<<<<<<<<< @@ -84709,12 +79743,11 @@ static PyObject *__pyx_pf_4lxml_5etree_10ProcessingInstruction(CYTHON_UNUSED PyO __Pyx_XDECREF(__pyx_v_target); __Pyx_XDECREF(__pyx_v_text); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":3072 +/* "lxml/etree.pyx":3070 * """ * cdef bytes _utf8_data * def __cinit__(self, data): # <<<<<<<<<<<<<< @@ -84748,7 +79781,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, 3072, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 3070, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -84759,7 +79792,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, 3072, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3070, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.CDATA.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -84775,51 +79808,46 @@ static int __pyx_pw_4lxml_5etree_5CDATA_1__cinit__(PyObject *__pyx_v_self, PyObj static int __pyx_pf_4lxml_5etree_5CDATA___cinit__(struct __pyx_obj_4lxml_5etree_CDATA *__pyx_v_self, PyObject *__pyx_v_data) { PyObject *__pyx_v__utf8_data = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[0], 3072, 0, __PYX_ERR(0, 3072, __pyx_L1_error)); - /* "lxml/etree.pyx":3073 + /* "lxml/etree.pyx":3071 * cdef bytes _utf8_data * def __cinit__(self, data): * _utf8_data = _utf8(data) # <<<<<<<<<<<<<< * if b']]>' in _utf8_data: * raise ValueError, "']]>' not allowed inside CDATA" */ - __Pyx_TraceLine(3073,0,__PYX_ERR(0, 3073, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3073, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__utf8_data = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3074 + /* "lxml/etree.pyx":3072 * 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_TraceLine(3074,0,__PYX_ERR(0, 3074, __pyx_L1_error)) - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__171, __pyx_v__utf8_data, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3074, __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, 3072, __pyx_L1_error) __pyx_t_3 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_3)) { - /* "lxml/etree.pyx":3075 + /* "lxml/etree.pyx":3073 * _utf8_data = _utf8(data) * if b']]>' in _utf8_data: * raise ValueError, "']]>' not allowed inside CDATA" # <<<<<<<<<<<<<< * self._utf8_data = _utf8_data * */ - __Pyx_TraceLine(3075,0,__PYX_ERR(0, 3075, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_not_allowed_inside_CDATA, 0, 0); - __PYX_ERR(0, 3075, __pyx_L1_error) + __PYX_ERR(0, 3073, __pyx_L1_error) - /* "lxml/etree.pyx":3074 + /* "lxml/etree.pyx":3072 * def __cinit__(self, data): * _utf8_data = _utf8(data) * if b']]>' in _utf8_data: # <<<<<<<<<<<<<< @@ -84828,21 +79856,20 @@ static int __pyx_pf_4lxml_5etree_5CDATA___cinit__(struct __pyx_obj_4lxml_5etree_ */ } - /* "lxml/etree.pyx":3076 + /* "lxml/etree.pyx":3074 * if b']]>' in _utf8_data: * raise ValueError, "']]>' not allowed inside CDATA" * self._utf8_data = _utf8_data # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(3076,0,__PYX_ERR(0, 3076, __pyx_L1_error)) __Pyx_INCREF(__pyx_v__utf8_data); __Pyx_GIVEREF(__pyx_v__utf8_data); __Pyx_GOTREF(__pyx_v_self->_utf8_data); __Pyx_DECREF(__pyx_v_self->_utf8_data); __pyx_v_self->_utf8_data = __pyx_v__utf8_data; - /* "lxml/etree.pyx":3072 + /* "lxml/etree.pyx":3070 * """ * cdef bytes _utf8_data * def __cinit__(self, data): # <<<<<<<<<<<<<< @@ -84859,12 +79886,11 @@ static int __pyx_pf_4lxml_5etree_5CDATA___cinit__(struct __pyx_obj_4lxml_5etree_ __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v__utf8_data); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":3079 +/* "lxml/etree.pyx":3077 * * * def Entity(name): # <<<<<<<<<<<<<< @@ -84894,7 +79920,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12Entity(CYTHON_UNUSED PyObject *__pyx_se PyObject *__pyx_v_name_utf = NULL; const xmlChar *__pyx_v_c_name; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -84902,64 +79927,57 @@ static PyObject *__pyx_pf_4lxml_5etree_12Entity(CYTHON_UNUSED PyObject *__pyx_se Py_UCS4 __pyx_t_4; PyObject *__pyx_t_5 = NULL; xmlDoc *__pyx_t_6; - __Pyx_TraceFrameInit(__pyx_codeobj__172) __Pyx_RefNannySetupContext("Entity", 0); - __Pyx_TraceCall("Entity", __pyx_f[0], 3079, 0, __PYX_ERR(0, 3079, __pyx_L1_error)); - /* "lxml/etree.pyx":3091 + /* "lxml/etree.pyx":3089 * cdef xmlNode* c_node * cdef xmlDoc* c_doc * name_utf = _utf8(name) # <<<<<<<<<<<<<< * c_name = _xcstr(name_utf) * if c_name[0] == c'#': */ - __Pyx_TraceLine(3091,0,__PYX_ERR(0, 3091, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3091, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_name_utf = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3092 + /* "lxml/etree.pyx":3090 * cdef xmlDoc* c_doc * name_utf = _utf8(name) * c_name = _xcstr(name_utf) # <<<<<<<<<<<<<< * if c_name[0] == c'#': * if not _characterReferenceIsValid(c_name + 1): */ - __Pyx_TraceLine(3092,0,__PYX_ERR(0, 3092, __pyx_L1_error)) __pyx_v_c_name = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_name_utf); - /* "lxml/etree.pyx":3093 + /* "lxml/etree.pyx":3091 * name_utf = _utf8(name) * c_name = _xcstr(name_utf) * if c_name[0] == c'#': # <<<<<<<<<<<<<< * if not _characterReferenceIsValid(c_name + 1): * raise ValueError, f"Invalid character reference: '{name}'" */ - __Pyx_TraceLine(3093,0,__PYX_ERR(0, 3093, __pyx_L1_error)) __pyx_t_2 = (((__pyx_v_c_name[0]) == '#') != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":3094 + /* "lxml/etree.pyx":3092 * c_name = _xcstr(name_utf) * if c_name[0] == c'#': * if not _characterReferenceIsValid(c_name + 1): # <<<<<<<<<<<<<< * raise ValueError, f"Invalid character reference: '{name}'" * elif not _xmlNameIsValid(c_name): */ - __Pyx_TraceLine(3094,0,__PYX_ERR(0, 3094, __pyx_L1_error)) __pyx_t_2 = ((!(__pyx_f_4lxml_5etree__characterReferenceIsValid((__pyx_v_c_name + 1)) != 0)) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":3095 + /* "lxml/etree.pyx":3093 * 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_TraceLine(3095,0,__PYX_ERR(0, 3095, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3095, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = 0; __pyx_t_4 = 127; @@ -84967,25 +79985,25 @@ 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, 3095, __pyx_L1_error) + __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_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); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5); __pyx_t_5 = 0; - __Pyx_INCREF(__pyx_kp_u__60); + __Pyx_INCREF(__pyx_kp_u__21); __pyx_t_3 += 1; - __Pyx_GIVEREF(__pyx_kp_u__60); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__60); - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3095, __pyx_L1_error) + __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_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, 3095, __pyx_L1_error) + __PYX_ERR(0, 3093, __pyx_L1_error) - /* "lxml/etree.pyx":3094 + /* "lxml/etree.pyx":3092 * c_name = _xcstr(name_utf) * if c_name[0] == c'#': * if not _characterReferenceIsValid(c_name + 1): # <<<<<<<<<<<<<< @@ -84994,7 +80012,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12Entity(CYTHON_UNUSED PyObject *__pyx_se */ } - /* "lxml/etree.pyx":3093 + /* "lxml/etree.pyx":3091 * name_utf = _utf8(name) * c_name = _xcstr(name_utf) * if c_name[0] == c'#': # <<<<<<<<<<<<<< @@ -85004,26 +80022,24 @@ static PyObject *__pyx_pf_4lxml_5etree_12Entity(CYTHON_UNUSED PyObject *__pyx_se goto __pyx_L3; } - /* "lxml/etree.pyx":3096 + /* "lxml/etree.pyx":3094 * 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}'" * c_doc = _newXMLDoc() */ - __Pyx_TraceLine(3096,0,__PYX_ERR(0, 3096, __pyx_L1_error)) __pyx_t_2 = ((!(__pyx_f_4lxml_5etree__xmlNameIsValid(__pyx_v_c_name) != 0)) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":3097 + /* "lxml/etree.pyx":3095 * 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_TraceLine(3097,0,__PYX_ERR(0, 3097, __pyx_L1_error)) - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3097, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3095, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = 0; __pyx_t_4 = 127; @@ -85031,25 +80047,25 @@ 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, 3097, __pyx_L1_error) + __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_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); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __pyx_t_1 = 0; - __Pyx_INCREF(__pyx_kp_u__60); + __Pyx_INCREF(__pyx_kp_u__21); __pyx_t_3 += 1; - __Pyx_GIVEREF(__pyx_kp_u__60); - PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__60); - __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3097, __pyx_L1_error) + __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_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, 3097, __pyx_L1_error) + __PYX_ERR(0, 3095, __pyx_L1_error) - /* "lxml/etree.pyx":3096 + /* "lxml/etree.pyx":3094 * if not _characterReferenceIsValid(c_name + 1): * raise ValueError, f"Invalid character reference: '{name}'" * elif not _xmlNameIsValid(c_name): # <<<<<<<<<<<<<< @@ -85059,66 +80075,61 @@ static PyObject *__pyx_pf_4lxml_5etree_12Entity(CYTHON_UNUSED PyObject *__pyx_se } __pyx_L3:; - /* "lxml/etree.pyx":3098 + /* "lxml/etree.pyx":3096 * 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_TraceLine(3098,0,__PYX_ERR(0, 3098, __pyx_L1_error)) - __pyx_t_6 = __pyx_f_4lxml_5etree__newXMLDoc(); if (unlikely(__pyx_t_6 == ((xmlDoc *)NULL))) __PYX_ERR(0, 3098, __pyx_L1_error) + __pyx_t_6 = __pyx_f_4lxml_5etree__newXMLDoc(); if (unlikely(__pyx_t_6 == ((xmlDoc *)NULL))) __PYX_ERR(0, 3096, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_6; - /* "lxml/etree.pyx":3099 + /* "lxml/etree.pyx":3097 * 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_TraceLine(3099,0,__PYX_ERR(0, 3099, __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, 3099, __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, 3097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3100 + /* "lxml/etree.pyx":3098 * c_doc = _newXMLDoc() * doc = _documentFactory(c_doc, None) * c_node = _createEntity(c_doc, c_name) # <<<<<<<<<<<<<< * tree.xmlAddChild(c_doc, c_node) * return _elementFactory(doc, c_node) */ - __Pyx_TraceLine(3100,0,__PYX_ERR(0, 3100, __pyx_L1_error)) __pyx_v_c_node = __pyx_f_4lxml_5etree__createEntity(__pyx_v_c_doc, __pyx_v_c_name); - /* "lxml/etree.pyx":3101 + /* "lxml/etree.pyx":3099 * doc = _documentFactory(c_doc, None) * c_node = _createEntity(c_doc, c_name) * tree.xmlAddChild(c_doc, c_node) # <<<<<<<<<<<<<< * return _elementFactory(doc, c_node) * */ - __Pyx_TraceLine(3101,0,__PYX_ERR(0, 3101, __pyx_L1_error)) (void)(xmlAddChild(((xmlNode *)__pyx_v_c_doc), __pyx_v_c_node)); - /* "lxml/etree.pyx":3102 + /* "lxml/etree.pyx":3100 * c_node = _createEntity(c_doc, c_name) * tree.xmlAddChild(c_doc, c_node) * return _elementFactory(doc, c_node) # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(3102,0,__PYX_ERR(0, 3102, __pyx_L1_error)) __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, 3102, __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, 3100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3079 + /* "lxml/etree.pyx":3077 * * * def Entity(name): # <<<<<<<<<<<<<< @@ -85136,12 +80147,11 @@ static PyObject *__pyx_pf_4lxml_5etree_12Entity(CYTHON_UNUSED PyObject *__pyx_se __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XDECREF(__pyx_v_name_utf); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":3105 +/* "lxml/etree.pyx":3103 * * * def SubElement(_Element _parent not None, _tag, # <<<<<<<<<<<<<< @@ -85152,7 +80162,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12Entity(CYTHON_UNUSED PyObject *__pyx_se /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_15SubElement(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_14SubElement[] = "SubElement(_parent, _tag, attrib=None, nsmap=None, **_extra)\n\n Subelement factory. This function creates an element instance, and\n appends it to an existing element.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_15SubElement = {"SubElement", (PyCFunction)__pyx_pw_4lxml_5etree_15SubElement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_14SubElement}; +static PyMethodDef __pyx_mdef_4lxml_5etree_15SubElement = {"SubElement", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_15SubElement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_14SubElement}; static PyObject *__pyx_pw_4lxml_5etree_15SubElement(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct LxmlElement *__pyx_v__parent = 0; PyObject *__pyx_v__tag = 0; @@ -85168,7 +80178,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":3106 + /* "lxml/etree.pyx":3104 * * def SubElement(_Element _parent not None, _tag, * attrib=None, nsmap=None, **_extra): # <<<<<<<<<<<<<< @@ -85201,7 +80211,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, 3105, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("SubElement", 0, 2, 4, 1); __PYX_ERR(0, 3103, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -85217,7 +80227,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, 3105, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__extra, values, pos_args, "SubElement") < 0)) __PYX_ERR(0, 3103, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -85238,17 +80248,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, 3105, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("SubElement", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3103, __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, 3105, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v__parent), __pyx_ptype_4lxml_5etree__Element, 0, "_parent", 0))) __PYX_ERR(0, 3103, __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":3105 + /* "lxml/etree.pyx":3103 * * * def SubElement(_Element _parent not None, _tag, # <<<<<<<<<<<<<< @@ -85268,29 +80278,25 @@ static PyObject *__pyx_pw_4lxml_5etree_15SubElement(PyObject *__pyx_self, PyObje static PyObject *__pyx_pf_4lxml_5etree_14SubElement(CYTHON_UNUSED PyObject *__pyx_self, struct LxmlElement *__pyx_v__parent, PyObject *__pyx_v__tag, PyObject *__pyx_v_attrib, PyObject *__pyx_v_nsmap, PyObject *__pyx_v__extra) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__173) __Pyx_RefNannySetupContext("SubElement", 0); - __Pyx_TraceCall("SubElement", __pyx_f[0], 3105, 0, __PYX_ERR(0, 3105, __pyx_L1_error)); - /* "lxml/etree.pyx":3112 + /* "lxml/etree.pyx":3110 * appends it to an existing element. * """ * return _makeSubElement(_parent, _tag, None, None, attrib, nsmap, _extra) # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(3112,0,__PYX_ERR(0, 3112, __pyx_L1_error)) __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, 3112, __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, 3110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3105 + /* "lxml/etree.pyx":3103 * * * def SubElement(_Element _parent not None, _tag, # <<<<<<<<<<<<<< @@ -85305,12 +80311,11 @@ static PyObject *__pyx_pf_4lxml_5etree_14SubElement(CYTHON_UNUSED PyObject *__py __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":3115 +/* "lxml/etree.pyx":3113 * * * def ElementTree(_Element element=None, *, file=None, _BaseParser parser=None): # <<<<<<<<<<<<<< @@ -85321,7 +80326,7 @@ static PyObject *__pyx_pf_4lxml_5etree_14SubElement(CYTHON_UNUSED PyObject *__py /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_17ElementTree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_16ElementTree[] = "ElementTree(element=None, file=None, parser=None)\n\n ElementTree wrapper class.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_17ElementTree = {"ElementTree", (PyCFunction)__pyx_pw_4lxml_5etree_17ElementTree, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_16ElementTree}; +static PyMethodDef __pyx_mdef_4lxml_5etree_17ElementTree = {"ElementTree", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_17ElementTree, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_16ElementTree}; static PyObject *__pyx_pw_4lxml_5etree_17ElementTree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct LxmlElement *__pyx_v_element = 0; PyObject *__pyx_v_file = 0; @@ -85360,7 +80365,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, 3115, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ElementTree") < 0)) __PYX_ERR(0, 3113, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -85376,14 +80381,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, 3115, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("ElementTree", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3113, __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, 3115, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) __PYX_ERR(0, 3115, __pyx_L1_error) + 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) __pyx_r = __pyx_pf_4lxml_5etree_16ElementTree(__pyx_self, __pyx_v_element, __pyx_v_file, __pyx_v_parser); /* function exit code */ @@ -85400,7 +80405,6 @@ static PyObject *__pyx_pf_4lxml_5etree_16ElementTree(CYTHON_UNUSED PyObject *__p struct LxmlDocument *__pyx_v_doc = 0; PyObject *__pyx_v_result_container = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -85413,36 +80417,32 @@ static PyObject *__pyx_pf_4lxml_5etree_16ElementTree(CYTHON_UNUSED PyObject *__p PyObject *__pyx_t_9 = NULL; int __pyx_t_10; xmlDoc *__pyx_t_11; - __Pyx_TraceFrameInit(__pyx_codeobj__174) __Pyx_RefNannySetupContext("ElementTree", 0); - __Pyx_TraceCall("ElementTree", __pyx_f[0], 3115, 0, __PYX_ERR(0, 3115, __pyx_L1_error)); - /* "lxml/etree.pyx":3127 + /* "lxml/etree.pyx":3125 * cdef _Document doc * * if element is not None: # <<<<<<<<<<<<<< * doc = element._doc * elif file is not None: */ - __Pyx_TraceLine(3127,0,__PYX_ERR(0, 3127, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_element) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":3128 + /* "lxml/etree.pyx":3126 * * if element is not None: * doc = element._doc # <<<<<<<<<<<<<< * elif file is not None: * try: */ - __Pyx_TraceLine(3128,0,__PYX_ERR(0, 3128, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_v_element->_doc); __Pyx_INCREF(__pyx_t_3); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":3127 + /* "lxml/etree.pyx":3125 * cdef _Document doc * * if element is not None: # <<<<<<<<<<<<<< @@ -85452,26 +80452,24 @@ static PyObject *__pyx_pf_4lxml_5etree_16ElementTree(CYTHON_UNUSED PyObject *__p goto __pyx_L3; } - /* "lxml/etree.pyx":3129 + /* "lxml/etree.pyx":3127 * if element is not None: * doc = element._doc * elif file is not None: # <<<<<<<<<<<<<< * try: * doc = _parseDocument(file, parser, None) */ - __Pyx_TraceLine(3129,0,__PYX_ERR(0, 3129, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_file != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":3130 + /* "lxml/etree.pyx":3128 * doc = element._doc * elif file is not None: * try: # <<<<<<<<<<<<<< * doc = _parseDocument(file, parser, None) * except _TargetParserResult as result_container: */ - __Pyx_TraceLine(3130,0,__PYX_ERR(0, 3130, __pyx_L4_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -85481,20 +80479,19 @@ static PyObject *__pyx_pf_4lxml_5etree_16ElementTree(CYTHON_UNUSED PyObject *__p __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { - /* "lxml/etree.pyx":3131 + /* "lxml/etree.pyx":3129 * elif file is not None: * try: * doc = _parseDocument(file, parser, None) # <<<<<<<<<<<<<< * except _TargetParserResult as result_container: * return result_container.result */ - __Pyx_TraceLine(3131,0,__PYX_ERR(0, 3131, __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, 3131, __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, 3129, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":3130 + /* "lxml/etree.pyx":3128 * doc = element._doc * elif file is not None: * try: # <<<<<<<<<<<<<< @@ -85509,16 +80506,15 @@ 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":3132 + /* "lxml/etree.pyx":3130 * try: * doc = _parseDocument(file, parser, None) * except _TargetParserResult as result_container: # <<<<<<<<<<<<<< * return result_container.result * else: */ - __Pyx_TraceLine(3132,0,__PYX_ERR(0, 3132, __pyx_L6_except_error)) __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_7, &__pyx_t_8); - __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_TargetParserResult); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3132, __pyx_L6_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_TargetParserResult); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3130, __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; @@ -85526,23 +80522,22 @@ 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, 3132, __pyx_L6_except_error) + if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_3) < 0) __PYX_ERR(0, 3130, __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":3133 + /* "lxml/etree.pyx":3131 * doc = _parseDocument(file, parser, None) * except _TargetParserResult as result_container: * return result_container.result # <<<<<<<<<<<<<< * else: * c_doc = _newXMLDoc() */ - __Pyx_TraceLine(3133,0,__PYX_ERR(0, 3133, __pyx_L6_except_error)) __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, 3133, __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, 3131, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_r = __pyx_t_9; __pyx_t_9 = 0; @@ -85554,7 +80549,7 @@ static PyObject *__pyx_pf_4lxml_5etree_16ElementTree(CYTHON_UNUSED PyObject *__p goto __pyx_L6_except_error; __pyx_L6_except_error:; - /* "lxml/etree.pyx":3130 + /* "lxml/etree.pyx":3128 * doc = element._doc * elif file is not None: * try: # <<<<<<<<<<<<<< @@ -85575,7 +80570,7 @@ static PyObject *__pyx_pf_4lxml_5etree_16ElementTree(CYTHON_UNUSED PyObject *__p __pyx_L9_try_end:; } - /* "lxml/etree.pyx":3129 + /* "lxml/etree.pyx":3127 * if element is not None: * doc = element._doc * elif file is not None: # <<<<<<<<<<<<<< @@ -85585,49 +80580,46 @@ static PyObject *__pyx_pf_4lxml_5etree_16ElementTree(CYTHON_UNUSED PyObject *__p goto __pyx_L3; } - /* "lxml/etree.pyx":3135 + /* "lxml/etree.pyx":3133 * return result_container.result * else: * c_doc = _newXMLDoc() # <<<<<<<<<<<<<< * doc = _documentFactory(c_doc, parser) * */ - __Pyx_TraceLine(3135,0,__PYX_ERR(0, 3135, __pyx_L1_error)) /*else*/ { - __pyx_t_11 = __pyx_f_4lxml_5etree__newXMLDoc(); if (unlikely(__pyx_t_11 == ((xmlDoc *)NULL))) __PYX_ERR(0, 3135, __pyx_L1_error) + __pyx_t_11 = __pyx_f_4lxml_5etree__newXMLDoc(); if (unlikely(__pyx_t_11 == ((xmlDoc *)NULL))) __PYX_ERR(0, 3133, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_11; - /* "lxml/etree.pyx":3136 + /* "lxml/etree.pyx":3134 * else: * c_doc = _newXMLDoc() * doc = _documentFactory(c_doc, parser) # <<<<<<<<<<<<<< * * return _elementTreeFactory(doc, element) */ - __Pyx_TraceLine(3136,0,__PYX_ERR(0, 3136, __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, 3136, __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, 3134, __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":3138 + /* "lxml/etree.pyx":3136 * doc = _documentFactory(c_doc, parser) * * return _elementTreeFactory(doc, element) # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(3138,0,__PYX_ERR(0, 3138, __pyx_L1_error)) __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, 3138, __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, 3136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3115 + /* "lxml/etree.pyx":3113 * * * def ElementTree(_Element element=None, *, file=None, _BaseParser parser=None): # <<<<<<<<<<<<<< @@ -85647,12 +80639,11 @@ static PyObject *__pyx_pf_4lxml_5etree_16ElementTree(CYTHON_UNUSED PyObject *__p __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XDECREF(__pyx_v_result_container); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":3141 +/* "lxml/etree.pyx":3139 * * * def HTML(text, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< @@ -85663,7 +80654,7 @@ static PyObject *__pyx_pf_4lxml_5etree_16ElementTree(CYTHON_UNUSED PyObject *__p /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_19HTML(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_18HTML[] = "HTML(text, parser=None, base_url=None)\n\n Parses an HTML document from a string constant. Returns the root\n node (or the result returned by a parser target). This function\n can be used to embed \"HTML literals\" in Python code.\n\n To override the parser with a different ``HTMLParser`` you can pass it to\n the ``parser`` keyword argument.\n\n The ``base_url`` keyword argument allows to set the original base URL of\n the document to support relative Paths when looking up external entities\n (DTD, XInclude, ...).\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_19HTML = {"HTML", (PyCFunction)__pyx_pw_4lxml_5etree_19HTML, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_18HTML}; +static PyMethodDef __pyx_mdef_4lxml_5etree_19HTML = {"HTML", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_19HTML, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_18HTML}; static PyObject *__pyx_pw_4lxml_5etree_19HTML(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_text = 0; struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_parser = 0; @@ -85705,7 +80696,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, 3141, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "HTML") < 0)) __PYX_ERR(0, 3139, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -85722,13 +80713,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, 3141, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("HTML", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3139, __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, 3141, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) __PYX_ERR(0, 3139, __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 */ @@ -85744,7 +80735,6 @@ static PyObject *__pyx_pf_4lxml_5etree_18HTML(CYTHON_UNUSED PyObject *__pyx_self struct LxmlDocument *__pyx_v_doc = 0; PyObject *__pyx_v_result_container = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -85756,60 +80746,54 @@ static PyObject *__pyx_pf_4lxml_5etree_18HTML(CYTHON_UNUSED PyObject *__pyx_self PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; - __Pyx_TraceFrameInit(__pyx_codeobj__175) __Pyx_RefNannySetupContext("HTML", 0); - __Pyx_TraceCall("HTML", __pyx_f[0], 3141, 0, __PYX_ERR(0, 3141, __pyx_L1_error)); __Pyx_INCREF((PyObject *)__pyx_v_parser); - /* "lxml/etree.pyx":3156 + /* "lxml/etree.pyx":3154 * """ * cdef _Document doc * if parser is None: # <<<<<<<<<<<<<< * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * if not isinstance(parser, HTMLParser): */ - __Pyx_TraceLine(3156,0,__PYX_ERR(0, 3156, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_parser) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":3157 + /* "lxml/etree.pyx":3155 * cdef _Document doc * if parser is None: * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() # <<<<<<<<<<<<<< * if not isinstance(parser, HTMLParser): * parser = __DEFAULT_HTML_PARSER */ - __Pyx_TraceLine(3157,0,__PYX_ERR(0, 3157, __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, 3157, __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, 3155, __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":3158 + /* "lxml/etree.pyx":3156 * if parser is None: * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * if not isinstance(parser, HTMLParser): # <<<<<<<<<<<<<< * parser = __DEFAULT_HTML_PARSER * try: */ - __Pyx_TraceLine(3158,0,__PYX_ERR(0, 3158, __pyx_L1_error)) __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree_HTMLParser); __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":3159 + /* "lxml/etree.pyx":3157 * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * if not isinstance(parser, HTMLParser): * parser = __DEFAULT_HTML_PARSER # <<<<<<<<<<<<<< * try: * doc = _parseMemoryDocument(text, base_url, parser) */ - __Pyx_TraceLine(3159,0,__PYX_ERR(0, 3159, __pyx_L1_error)) __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":3158 + /* "lxml/etree.pyx":3156 * if parser is None: * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * if not isinstance(parser, HTMLParser): # <<<<<<<<<<<<<< @@ -85818,7 +80802,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18HTML(CYTHON_UNUSED PyObject *__pyx_self */ } - /* "lxml/etree.pyx":3156 + /* "lxml/etree.pyx":3154 * """ * cdef _Document doc * if parser is None: # <<<<<<<<<<<<<< @@ -85827,14 +80811,13 @@ static PyObject *__pyx_pf_4lxml_5etree_18HTML(CYTHON_UNUSED PyObject *__pyx_self */ } - /* "lxml/etree.pyx":3160 + /* "lxml/etree.pyx":3158 * if not isinstance(parser, HTMLParser): * parser = __DEFAULT_HTML_PARSER * try: # <<<<<<<<<<<<<< * doc = _parseMemoryDocument(text, base_url, parser) * return doc.getroot() */ - __Pyx_TraceLine(3160,0,__PYX_ERR(0, 3160, __pyx_L5_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -85844,35 +80827,33 @@ static PyObject *__pyx_pf_4lxml_5etree_18HTML(CYTHON_UNUSED PyObject *__pyx_self __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { - /* "lxml/etree.pyx":3161 + /* "lxml/etree.pyx":3159 * parser = __DEFAULT_HTML_PARSER * try: * doc = _parseMemoryDocument(text, base_url, parser) # <<<<<<<<<<<<<< * return doc.getroot() * except _TargetParserResult as result_container: */ - __Pyx_TraceLine(3161,0,__PYX_ERR(0, 3161, __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, 3161, __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, 3159, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":3162 + /* "lxml/etree.pyx":3160 * try: * doc = _parseMemoryDocument(text, base_url, parser) * return doc.getroot() # <<<<<<<<<<<<<< * except _TargetParserResult as result_container: * return result_container.result */ - __Pyx_TraceLine(3162,0,__PYX_ERR(0, 3162, __pyx_L5_error)) __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, 3162, __pyx_L5_error) + __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_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L9_try_return; - /* "lxml/etree.pyx":3160 + /* "lxml/etree.pyx":3158 * if not isinstance(parser, HTMLParser): * parser = __DEFAULT_HTML_PARSER * try: # <<<<<<<<<<<<<< @@ -85883,16 +80864,15 @@ 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":3163 + /* "lxml/etree.pyx":3161 * doc = _parseMemoryDocument(text, base_url, parser) * return doc.getroot() * except _TargetParserResult as result_container: # <<<<<<<<<<<<<< * return result_container.result * */ - __Pyx_TraceLine(3163,0,__PYX_ERR(0, 3163, __pyx_L7_except_error)) __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_7, &__pyx_t_8); - __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_TargetParserResult); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3163, __pyx_L7_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_TargetParserResult); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3161, __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; @@ -85900,23 +80880,22 @@ 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, 3163, __pyx_L7_except_error) + if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_3) < 0) __PYX_ERR(0, 3161, __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":3164 + /* "lxml/etree.pyx":3162 * return doc.getroot() * except _TargetParserResult as result_container: * return result_container.result # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(3164,0,__PYX_ERR(0, 3164, __pyx_L7_except_error)) __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, 3164, __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, 3162, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_r = __pyx_t_9; __pyx_t_9 = 0; @@ -85928,7 +80907,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":3160 + /* "lxml/etree.pyx":3158 * if not isinstance(parser, HTMLParser): * parser = __DEFAULT_HTML_PARSER * try: # <<<<<<<<<<<<<< @@ -85954,7 +80933,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18HTML(CYTHON_UNUSED PyObject *__pyx_self goto __pyx_L0; } - /* "lxml/etree.pyx":3141 + /* "lxml/etree.pyx":3139 * * * def HTML(text, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< @@ -85975,12 +80954,11 @@ static PyObject *__pyx_pf_4lxml_5etree_18HTML(CYTHON_UNUSED PyObject *__pyx_self __Pyx_XDECREF(__pyx_v_result_container); __Pyx_XDECREF((PyObject *)__pyx_v_parser); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":3167 +/* "lxml/etree.pyx":3165 * * * def XML(text, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< @@ -85991,7 +80969,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18HTML(CYTHON_UNUSED PyObject *__pyx_self /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_21XML(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_20XML[] = "XML(text, parser=None, base_url=None)\n\n Parses an XML document or fragment from a string constant.\n Returns the root node (or the result returned by a parser target).\n This function can be used to embed \"XML literals\" in Python code,\n like in\n\n >>> root = XML(\"\")\n >>> print(root.tag)\n root\n\n To override the parser with a different ``XMLParser`` you can pass it to\n the ``parser`` keyword argument.\n\n The ``base_url`` keyword argument allows to set the original base URL of\n the document to support relative Paths when looking up external entities\n (DTD, XInclude, ...).\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_21XML = {"XML", (PyCFunction)__pyx_pw_4lxml_5etree_21XML, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_20XML}; +static PyMethodDef __pyx_mdef_4lxml_5etree_21XML = {"XML", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_21XML, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_20XML}; static PyObject *__pyx_pw_4lxml_5etree_21XML(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_text = 0; struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_parser = 0; @@ -86033,7 +81011,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, 3167, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "XML") < 0)) __PYX_ERR(0, 3165, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -86050,13 +81028,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, 3167, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("XML", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3165, __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, 3167, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) __PYX_ERR(0, 3165, __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 */ @@ -86072,7 +81050,6 @@ static PyObject *__pyx_pf_4lxml_5etree_20XML(CYTHON_UNUSED PyObject *__pyx_self, struct LxmlDocument *__pyx_v_doc = 0; PyObject *__pyx_v_result_container = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -86084,60 +81061,54 @@ static PyObject *__pyx_pf_4lxml_5etree_20XML(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; - __Pyx_TraceFrameInit(__pyx_codeobj__176) __Pyx_RefNannySetupContext("XML", 0); - __Pyx_TraceCall("XML", __pyx_f[0], 3167, 0, __PYX_ERR(0, 3167, __pyx_L1_error)); __Pyx_INCREF((PyObject *)__pyx_v_parser); - /* "lxml/etree.pyx":3187 + /* "lxml/etree.pyx":3185 * """ * cdef _Document doc * if parser is None: # <<<<<<<<<<<<<< * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * if not isinstance(parser, XMLParser): */ - __Pyx_TraceLine(3187,0,__PYX_ERR(0, 3187, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_parser) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":3188 + /* "lxml/etree.pyx":3186 * cdef _Document doc * if parser is None: * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() # <<<<<<<<<<<<<< * if not isinstance(parser, XMLParser): * parser = __DEFAULT_XML_PARSER */ - __Pyx_TraceLine(3188,0,__PYX_ERR(0, 3188, __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, 3188, __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, 3186, __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":3189 + /* "lxml/etree.pyx":3187 * if parser is None: * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * if not isinstance(parser, XMLParser): # <<<<<<<<<<<<<< * parser = __DEFAULT_XML_PARSER * try: */ - __Pyx_TraceLine(3189,0,__PYX_ERR(0, 3189, __pyx_L1_error)) __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree_XMLParser); __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":3190 + /* "lxml/etree.pyx":3188 * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * if not isinstance(parser, XMLParser): * parser = __DEFAULT_XML_PARSER # <<<<<<<<<<<<<< * try: * doc = _parseMemoryDocument(text, base_url, parser) */ - __Pyx_TraceLine(3190,0,__PYX_ERR(0, 3190, __pyx_L1_error)) __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":3189 + /* "lxml/etree.pyx":3187 * if parser is None: * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * if not isinstance(parser, XMLParser): # <<<<<<<<<<<<<< @@ -86146,7 +81117,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20XML(CYTHON_UNUSED PyObject *__pyx_self, */ } - /* "lxml/etree.pyx":3187 + /* "lxml/etree.pyx":3185 * """ * cdef _Document doc * if parser is None: # <<<<<<<<<<<<<< @@ -86155,14 +81126,13 @@ static PyObject *__pyx_pf_4lxml_5etree_20XML(CYTHON_UNUSED PyObject *__pyx_self, */ } - /* "lxml/etree.pyx":3191 + /* "lxml/etree.pyx":3189 * if not isinstance(parser, XMLParser): * parser = __DEFAULT_XML_PARSER * try: # <<<<<<<<<<<<<< * doc = _parseMemoryDocument(text, base_url, parser) * return doc.getroot() */ - __Pyx_TraceLine(3191,0,__PYX_ERR(0, 3191, __pyx_L5_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -86172,35 +81142,33 @@ static PyObject *__pyx_pf_4lxml_5etree_20XML(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { - /* "lxml/etree.pyx":3192 + /* "lxml/etree.pyx":3190 * parser = __DEFAULT_XML_PARSER * try: * doc = _parseMemoryDocument(text, base_url, parser) # <<<<<<<<<<<<<< * return doc.getroot() * except _TargetParserResult as result_container: */ - __Pyx_TraceLine(3192,0,__PYX_ERR(0, 3192, __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, 3192, __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, 3190, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":3193 + /* "lxml/etree.pyx":3191 * try: * doc = _parseMemoryDocument(text, base_url, parser) * return doc.getroot() # <<<<<<<<<<<<<< * except _TargetParserResult as result_container: * return result_container.result */ - __Pyx_TraceLine(3193,0,__PYX_ERR(0, 3193, __pyx_L5_error)) __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, 3193, __pyx_L5_error) + __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_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L9_try_return; - /* "lxml/etree.pyx":3191 + /* "lxml/etree.pyx":3189 * if not isinstance(parser, XMLParser): * parser = __DEFAULT_XML_PARSER * try: # <<<<<<<<<<<<<< @@ -86211,16 +81179,15 @@ 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":3194 + /* "lxml/etree.pyx":3192 * doc = _parseMemoryDocument(text, base_url, parser) * return doc.getroot() * except _TargetParserResult as result_container: # <<<<<<<<<<<<<< * return result_container.result * */ - __Pyx_TraceLine(3194,0,__PYX_ERR(0, 3194, __pyx_L7_except_error)) __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_7, &__pyx_t_8); - __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_TargetParserResult); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3194, __pyx_L7_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_TargetParserResult); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3192, __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; @@ -86228,23 +81195,22 @@ 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, 3194, __pyx_L7_except_error) + if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_3) < 0) __PYX_ERR(0, 3192, __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":3195 + /* "lxml/etree.pyx":3193 * return doc.getroot() * except _TargetParserResult as result_container: * return result_container.result # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(3195,0,__PYX_ERR(0, 3195, __pyx_L7_except_error)) __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, 3195, __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, 3193, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_r = __pyx_t_9; __pyx_t_9 = 0; @@ -86256,7 +81222,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":3191 + /* "lxml/etree.pyx":3189 * if not isinstance(parser, XMLParser): * parser = __DEFAULT_XML_PARSER * try: # <<<<<<<<<<<<<< @@ -86282,7 +81248,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20XML(CYTHON_UNUSED PyObject *__pyx_self, goto __pyx_L0; } - /* "lxml/etree.pyx":3167 + /* "lxml/etree.pyx":3165 * * * def XML(text, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< @@ -86303,12 +81269,11 @@ static PyObject *__pyx_pf_4lxml_5etree_20XML(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_XDECREF(__pyx_v_result_container); __Pyx_XDECREF((PyObject *)__pyx_v_parser); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":3198 +/* "lxml/etree.pyx":3196 * * * def fromstring(text, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< @@ -86319,7 +81284,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20XML(CYTHON_UNUSED PyObject *__pyx_self, /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_23fromstring(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_22fromstring[] = "fromstring(text, parser=None, base_url=None)\n\n Parses an XML document or fragment from a string. Returns the\n root node (or the result returned by a parser target).\n\n To override the default parser with a different parser you can pass it to\n the ``parser`` keyword argument.\n\n The ``base_url`` keyword argument allows to set the original base URL of\n the document to support relative Paths when looking up external entities\n (DTD, XInclude, ...).\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_23fromstring = {"fromstring", (PyCFunction)__pyx_pw_4lxml_5etree_23fromstring, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_22fromstring}; +static PyMethodDef __pyx_mdef_4lxml_5etree_23fromstring = {"fromstring", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_23fromstring, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_22fromstring}; static PyObject *__pyx_pw_4lxml_5etree_23fromstring(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_text = 0; struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_parser = 0; @@ -86361,7 +81326,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, 3198, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fromstring") < 0)) __PYX_ERR(0, 3196, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -86378,13 +81343,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, 3198, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("fromstring", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3196, __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, 3198, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) __PYX_ERR(0, 3196, __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 */ @@ -86400,7 +81365,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22fromstring(CYTHON_UNUSED PyObject *__py struct LxmlDocument *__pyx_v_doc = 0; PyObject *__pyx_v_result_container = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -86410,18 +81374,15 @@ static PyObject *__pyx_pf_4lxml_5etree_22fromstring(CYTHON_UNUSED PyObject *__py PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; - __Pyx_TraceFrameInit(__pyx_codeobj__177) __Pyx_RefNannySetupContext("fromstring", 0); - __Pyx_TraceCall("fromstring", __pyx_f[0], 3198, 0, __PYX_ERR(0, 3198, __pyx_L1_error)); - /* "lxml/etree.pyx":3212 + /* "lxml/etree.pyx":3210 * """ * cdef _Document doc * try: # <<<<<<<<<<<<<< * doc = _parseMemoryDocument(text, base_url, parser) * return doc.getroot() */ - __Pyx_TraceLine(3212,0,__PYX_ERR(0, 3212, __pyx_L3_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -86431,35 +81392,33 @@ static PyObject *__pyx_pf_4lxml_5etree_22fromstring(CYTHON_UNUSED PyObject *__py __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "lxml/etree.pyx":3213 + /* "lxml/etree.pyx":3211 * cdef _Document doc * try: * doc = _parseMemoryDocument(text, base_url, parser) # <<<<<<<<<<<<<< * return doc.getroot() * except _TargetParserResult as result_container: */ - __Pyx_TraceLine(3213,0,__PYX_ERR(0, 3213, __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, 3213, __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, 3211, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":3214 + /* "lxml/etree.pyx":3212 * try: * doc = _parseMemoryDocument(text, base_url, parser) * return doc.getroot() # <<<<<<<<<<<<<< * except _TargetParserResult as result_container: * return result_container.result */ - __Pyx_TraceLine(3214,0,__PYX_ERR(0, 3214, __pyx_L3_error)) __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, 3214, __pyx_L3_error) + __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_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L7_try_return; - /* "lxml/etree.pyx":3212 + /* "lxml/etree.pyx":3210 * """ * cdef _Document doc * try: # <<<<<<<<<<<<<< @@ -86470,16 +81429,15 @@ 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":3215 + /* "lxml/etree.pyx":3213 * doc = _parseMemoryDocument(text, base_url, parser) * return doc.getroot() * except _TargetParserResult as result_container: # <<<<<<<<<<<<<< * return result_container.result * */ - __Pyx_TraceLine(3215,0,__PYX_ERR(0, 3215, __pyx_L5_except_error)) __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_TargetParserResult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3215, __pyx_L5_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_TargetParserResult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3213, __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; @@ -86487,23 +81445,22 @@ 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, 3215, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 3213, __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":3216 + /* "lxml/etree.pyx":3214 * return doc.getroot() * except _TargetParserResult as result_container: * return result_container.result # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(3216,0,__PYX_ERR(0, 3216, __pyx_L5_except_error)) __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, 3216, __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, 3214, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; @@ -86515,7 +81472,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22fromstring(CYTHON_UNUSED PyObject *__py goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "lxml/etree.pyx":3212 + /* "lxml/etree.pyx":3210 * """ * cdef _Document doc * try: # <<<<<<<<<<<<<< @@ -86541,7 +81498,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22fromstring(CYTHON_UNUSED PyObject *__py goto __pyx_L0; } - /* "lxml/etree.pyx":3198 + /* "lxml/etree.pyx":3196 * * * def fromstring(text, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< @@ -86561,12 +81518,11 @@ static PyObject *__pyx_pf_4lxml_5etree_22fromstring(CYTHON_UNUSED PyObject *__py __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XDECREF(__pyx_v_result_container); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":3219 +/* "lxml/etree.pyx":3217 * * * def fromstringlist(strings, _BaseParser parser=None): # <<<<<<<<<<<<<< @@ -86577,7 +81533,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22fromstring(CYTHON_UNUSED PyObject *__py /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_25fromstringlist(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_24fromstringlist[] = "fromstringlist(strings, parser=None)\n\n Parses an XML document from a sequence of strings. Returns the\n root node (or the result returned by a parser target).\n\n To override the default parser with a different parser you can pass it to\n the ``parser`` keyword argument.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_25fromstringlist = {"fromstringlist", (PyCFunction)__pyx_pw_4lxml_5etree_25fromstringlist, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_24fromstringlist}; +static PyMethodDef __pyx_mdef_4lxml_5etree_25fromstringlist = {"fromstringlist", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_25fromstringlist, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_24fromstringlist}; static PyObject *__pyx_pw_4lxml_5etree_25fromstringlist(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_strings = 0; struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_parser = 0; @@ -86612,7 +81568,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, 3219, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fromstringlist") < 0)) __PYX_ERR(0, 3217, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -86628,13 +81584,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, 3219, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("fromstringlist", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3217, __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, 3219, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) __PYX_ERR(0, 3217, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_24fromstringlist(__pyx_self, __pyx_v_strings, __pyx_v_parser); /* function exit code */ @@ -86650,7 +81606,6 @@ static PyObject *__pyx_pf_4lxml_5etree_24fromstringlist(CYTHON_UNUSED PyObject * PyObject *__pyx_v_feed = NULL; PyObject *__pyx_v_data = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -86661,20 +81616,16 @@ static PyObject *__pyx_pf_4lxml_5etree_24fromstringlist(CYTHON_UNUSED PyObject * PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__178) __Pyx_RefNannySetupContext("fromstringlist", 0); - __Pyx_TraceCall("fromstringlist", __pyx_f[0], 3219, 0, __PYX_ERR(0, 3219, __pyx_L1_error)); __Pyx_INCREF((PyObject *)__pyx_v_parser); - /* "lxml/etree.pyx":3229 + /* "lxml/etree.pyx":3227 * """ * cdef _Document doc * if isinstance(strings, (bytes, unicode)): # <<<<<<<<<<<<<< * raise ValueError("passing a single string into fromstringlist() is not" * " efficient, use fromstring() instead") */ - __Pyx_TraceLine(3229,0,__PYX_ERR(0, 3229, __pyx_L1_error)) __pyx_t_2 = PyBytes_Check(__pyx_v_strings); __pyx_t_3 = (__pyx_t_2 != 0); if (!__pyx_t_3) { @@ -86689,21 +81640,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":3230 + /* "lxml/etree.pyx":3228 * 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_TraceLine(3230,0,__PYX_ERR(0, 3230, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__179, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3230, __pyx_L1_error) + __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_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 3230, __pyx_L1_error) + __PYX_ERR(0, 3228, __pyx_L1_error) - /* "lxml/etree.pyx":3229 + /* "lxml/etree.pyx":3227 * """ * cdef _Document doc * if isinstance(strings, (bytes, unicode)): # <<<<<<<<<<<<<< @@ -86712,32 +81662,30 @@ static PyObject *__pyx_pf_4lxml_5etree_24fromstringlist(CYTHON_UNUSED PyObject * */ } - /* "lxml/etree.pyx":3232 + /* "lxml/etree.pyx":3230 * raise ValueError("passing a single string into fromstringlist() is not" * " efficient, use fromstring() instead") * if parser is None: # <<<<<<<<<<<<<< * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * feed = parser.feed */ - __Pyx_TraceLine(3232,0,__PYX_ERR(0, 3232, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)__pyx_v_parser) == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":3233 + /* "lxml/etree.pyx":3231 * " efficient, use fromstring() instead") * if parser is None: * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() # <<<<<<<<<<<<<< * feed = parser.feed * for data in strings: */ - __Pyx_TraceLine(3233,0,__PYX_ERR(0, 3233, __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, 3233, __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, 3231, __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":3232 + /* "lxml/etree.pyx":3230 * raise ValueError("passing a single string into fromstringlist() is not" * " efficient, use fromstring() instead") * if parser is None: # <<<<<<<<<<<<<< @@ -86746,51 +81694,49 @@ static PyObject *__pyx_pf_4lxml_5etree_24fromstringlist(CYTHON_UNUSED PyObject * */ } - /* "lxml/etree.pyx":3234 + /* "lxml/etree.pyx":3232 * if parser is None: * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * feed = parser.feed # <<<<<<<<<<<<<< * for data in strings: * feed(data) */ - __Pyx_TraceLine(3234,0,__PYX_ERR(0, 3234, __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, 3234, __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, 3232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_feed = __pyx_t_4; __pyx_t_4 = 0; - /* "lxml/etree.pyx":3235 + /* "lxml/etree.pyx":3233 * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * feed = parser.feed * for data in strings: # <<<<<<<<<<<<<< * feed(data) * return parser.close() */ - __Pyx_TraceLine(3235,0,__PYX_ERR(0, 3235, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_v_strings)) || PyTuple_CheckExact(__pyx_v_strings)) { __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, 3235, __pyx_L1_error) + __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_GOTREF(__pyx_t_4); - __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3235, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3233, __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, 3235, __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, 3233, __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, 3235, __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, 3233, __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, 3235, __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, 3233, __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, 3235, __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, 3233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -86800,7 +81746,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, 3235, __pyx_L1_error) + else __PYX_ERR(0, 3233, __pyx_L1_error) } break; } @@ -86809,14 +81755,13 @@ 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":3236 + /* "lxml/etree.pyx":3234 * feed = parser.feed * for data in strings: * feed(data) # <<<<<<<<<<<<<< * return parser.close() * */ - __Pyx_TraceLine(3236,0,__PYX_ERR(0, 3236, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_feed); __pyx_t_8 = __pyx_v_feed; __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { @@ -86828,62 +81773,32 @@ static PyObject *__pyx_pf_4lxml_5etree_24fromstringlist(CYTHON_UNUSED PyObject * __Pyx_DECREF_SET(__pyx_t_8, function); } } - if (!__pyx_t_9) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_data); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3236, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_8)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_data}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3236, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_7); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_data}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3236, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_7); - } else - #endif - { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3236, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; - __Pyx_INCREF(__pyx_v_data); - __Pyx_GIVEREF(__pyx_v_data); - PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_data); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3236, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } - } + __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) + __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":3235 + /* "lxml/etree.pyx":3233 * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * feed = parser.feed * for data in strings: # <<<<<<<<<<<<<< * feed(data) * return parser.close() */ - __Pyx_TraceLine(3235,0,__PYX_ERR(0, 3235, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":3237 + /* "lxml/etree.pyx":3235 * for data in strings: * feed(data) * return parser.close() # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(3237,0,__PYX_ERR(0, 3237, __pyx_L1_error)) __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, 3237, __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, 3235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -86895,19 +81810,16 @@ static PyObject *__pyx_pf_4lxml_5etree_24fromstringlist(CYTHON_UNUSED PyObject * __Pyx_DECREF_SET(__pyx_t_7, function); } } - if (__pyx_t_8) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3237, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3237, __pyx_L1_error) - } + __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) __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":3219 + /* "lxml/etree.pyx":3217 * * * def fromstringlist(strings, _BaseParser parser=None): # <<<<<<<<<<<<<< @@ -86921,7 +81833,6 @@ static PyObject *__pyx_pf_4lxml_5etree_24fromstringlist(CYTHON_UNUSED PyObject * __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); - __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("lxml.etree.fromstringlist", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -86929,12 +81840,11 @@ static PyObject *__pyx_pf_4lxml_5etree_24fromstringlist(CYTHON_UNUSED PyObject * __Pyx_XDECREF(__pyx_v_data); __Pyx_XDECREF((PyObject *)__pyx_v_parser); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":3240 +/* "lxml/etree.pyx":3238 * * * def iselement(element): # <<<<<<<<<<<<<< @@ -86959,35 +81869,31 @@ static PyObject *__pyx_pw_4lxml_5etree_27iselement(PyObject *__pyx_self, PyObjec static PyObject *__pyx_pf_4lxml_5etree_26iselement(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_element) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__180) __Pyx_RefNannySetupContext("iselement", 0); - __Pyx_TraceCall("iselement", __pyx_f[0], 3240, 0, __PYX_ERR(0, 3240, __pyx_L1_error)); - /* "lxml/etree.pyx":3245 + /* "lxml/etree.pyx":3243 * Checks if an object appears to be a valid element object. * """ * return isinstance(element, _Element) and (<_Element>element)._c_node is not NULL # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(3245,0,__PYX_ERR(0, 3245, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __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, 3245, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3243, __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, 3245, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; @@ -86996,7 +81902,7 @@ static PyObject *__pyx_pf_4lxml_5etree_26iselement(CYTHON_UNUSED PyObject *__pyx __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3240 + /* "lxml/etree.pyx":3238 * * * def iselement(element): # <<<<<<<<<<<<<< @@ -87012,12 +81918,11 @@ static PyObject *__pyx_pf_4lxml_5etree_26iselement(CYTHON_UNUSED PyObject *__pyx __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":3248 +/* "lxml/etree.pyx":3246 * * * def dump(_Element elem not None, *, bint pretty_print=True, with_tail=True): # <<<<<<<<<<<<<< @@ -87028,7 +81933,7 @@ static PyObject *__pyx_pf_4lxml_5etree_26iselement(CYTHON_UNUSED PyObject *__pyx /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_29dump(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_28dump[] = "dump(elem, pretty_print=True, with_tail=True)\n\n Writes an element tree or element structure to sys.stdout. This function\n should be used for debugging only.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_29dump = {"dump", (PyCFunction)__pyx_pw_4lxml_5etree_29dump, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_28dump}; +static PyMethodDef __pyx_mdef_4lxml_5etree_29dump = {"dump", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_29dump, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_28dump}; static PyObject *__pyx_pw_4lxml_5etree_29dump(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct LxmlElement *__pyx_v_elem = 0; int __pyx_v_pretty_print; @@ -87063,7 +81968,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, 3248, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dump") < 0)) __PYX_ERR(0, 3246, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -87072,7 +81977,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, 3248, __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, 3246, __pyx_L3_error) } else { __pyx_v_pretty_print = ((int)((int)1)); } @@ -87080,13 +81985,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, 3248, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("dump", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3246, __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, 3248, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elem), __pyx_ptype_4lxml_5etree__Element, 0, "elem", 0))) __PYX_ERR(0, 3246, __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 */ @@ -87101,48 +82006,43 @@ static PyObject *__pyx_pw_4lxml_5etree_29dump(PyObject *__pyx_self, PyObject *__ static PyObject *__pyx_pf_4lxml_5etree_28dump(CYTHON_UNUSED PyObject *__pyx_self, struct LxmlElement *__pyx_v_elem, int __pyx_v_pretty_print, PyObject *__pyx_v_with_tail) { PyObject *__pyx_v_xml = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; - __Pyx_TraceFrameInit(__pyx_codeobj__181) __Pyx_RefNannySetupContext("dump", 0); - __Pyx_TraceCall("dump", __pyx_f[0], 3248, 0, __PYX_ERR(0, 3248, __pyx_L1_error)); - /* "lxml/etree.pyx":3254 + /* "lxml/etree.pyx":3252 * 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_TraceLine(3254,0,__PYX_ERR(0, 3254, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3254, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tostring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3254, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3252, __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, 3254, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3252, __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, 3254, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_pretty_print); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3252, __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, 3254, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pretty_print, __pyx_t_4) < 0) __PYX_ERR(0, 3252, __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, 3254, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_with_tail, __pyx_v_with_tail) < 0) __PYX_ERR(0, 3252, __pyx_L1_error) - /* "lxml/etree.pyx":3255 + /* "lxml/etree.pyx":3253 * """ * xml = tostring(elem, pretty_print=pretty_print, with_tail=with_tail, * encoding=None if python.IS_PYTHON2 else 'unicode') # <<<<<<<<<<<<<< * if not pretty_print: * xml += '\n' */ - __Pyx_TraceLine(3255,0,__PYX_ERR(0, 3255, __pyx_L1_error)) if ((IS_PYTHON2 != 0)) { __Pyx_INCREF(Py_None); __pyx_t_4 = Py_None; @@ -87150,18 +82050,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, 3254, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_encoding, __pyx_t_4) < 0) __PYX_ERR(0, 3252, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":3254 + /* "lxml/etree.pyx":3252 * 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_TraceLine(3254,0,__PYX_ERR(0, 3254, __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, 3254, __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, 3252, __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; @@ -87169,31 +82068,29 @@ 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":3256 + /* "lxml/etree.pyx":3254 * xml = tostring(elem, pretty_print=pretty_print, with_tail=with_tail, * encoding=None if python.IS_PYTHON2 else 'unicode') * if not pretty_print: # <<<<<<<<<<<<<< * xml += '\n' * sys.stdout.write(xml) */ - __Pyx_TraceLine(3256,0,__PYX_ERR(0, 3256, __pyx_L1_error)) __pyx_t_5 = ((!(__pyx_v_pretty_print != 0)) != 0); if (__pyx_t_5) { - /* "lxml/etree.pyx":3257 + /* "lxml/etree.pyx":3255 * encoding=None if python.IS_PYTHON2 else 'unicode') * if not pretty_print: * xml += '\n' # <<<<<<<<<<<<<< * sys.stdout.write(xml) * */ - __Pyx_TraceLine(3257,0,__PYX_ERR(0, 3257, __pyx_L1_error)) - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_xml, __pyx_kp_s__37); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3257, __pyx_L1_error) + __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_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_xml, __pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":3256 + /* "lxml/etree.pyx":3254 * xml = tostring(elem, pretty_print=pretty_print, with_tail=with_tail, * encoding=None if python.IS_PYTHON2 else 'unicode') * if not pretty_print: # <<<<<<<<<<<<<< @@ -87202,17 +82099,16 @@ static PyObject *__pyx_pf_4lxml_5etree_28dump(CYTHON_UNUSED PyObject *__pyx_self */ } - /* "lxml/etree.pyx":3258 + /* "lxml/etree.pyx":3256 * if not pretty_print: * xml += '\n' * sys.stdout.write(xml) # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(3258,0,__PYX_ERR(0, 3258, __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, 3258, __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, 3256, __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, 3258, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -87225,42 +82121,14 @@ static PyObject *__pyx_pf_4lxml_5etree_28dump(CYTHON_UNUSED PyObject *__pyx_self __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_xml); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3258, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_xml}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3258, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_xml}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3258, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - { - __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3258, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_v_xml); - __Pyx_GIVEREF(__pyx_v_xml); - PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_xml); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3258, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - } + __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) + __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":3248 + /* "lxml/etree.pyx":3246 * * * def dump(_Element elem not None, *, bint pretty_print=True, with_tail=True): # <<<<<<<<<<<<<< @@ -87281,12 +82149,11 @@ static PyObject *__pyx_pf_4lxml_5etree_28dump(CYTHON_UNUSED PyObject *__pyx_self __pyx_L0:; __Pyx_XDECREF(__pyx_v_xml); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":3261 +/* "lxml/etree.pyx":3259 * * * def tostring(element_or_tree, *, encoding=None, method="xml", # <<<<<<<<<<<<<< @@ -87296,8 +82163,8 @@ static PyObject *__pyx_pf_4lxml_5etree_28dump(CYTHON_UNUSED PyObject *__pyx_self /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_31tostring(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_4lxml_5etree_30tostring[] = "tostring(element_or_tree, encoding=None, method=\"xml\",\n xml_declaration=None, pretty_print=False, with_tail=True,\n standalone=None, doctype=None,\n exclusive=False, with_comments=True, inclusive_ns_prefixes=None)\n\n Serialize an element to an encoded string representation of its XML\n tree.\n\n Defaults to ASCII encoding without XML declaration. This\n behaviour can be configured with the keyword arguments 'encoding'\n (string) and 'xml_declaration' (bool). Note that changing the\n encoding to a non UTF-8 compatible encoding will enable a\n declaration by default.\n\n You can also serialise to a Unicode string without declaration by\n passing the ``unicode`` function as encoding (or ``str`` in Py3),\n or the name 'unicode'. This changes the return value from a byte\n string to an unencoded unicode string.\n\n The keyword argument 'pretty_print' (bool) enables formatted XML.\n\n The keyword argument 'method' selects the output method: 'xml',\n 'html', plain 'text' (text content without tags) or 'c14n'.\n Default is 'xml'.\n\n The ``exclusive`` and ``with_comments`` arguments are only used\n with C14N output, where they request exclusive and uncommented\n C14N serialisation respectively.\n\n Passing a boolean value to the ``standalone`` option will output\n an XML declaration with the corresponding ``standalone`` flag.\n\n The ``doctype`` option allows passing in a plain string that will\n be serialised before the XML tree. Note that passing in non\n well-formed content here will make the XML output non well-formed.\n Also, an existing doctype in the document tree will not be removed\n when serialising an ElementTree instance.\n\n You can prevent the tail text of the element from being serialised\n by passing the boolean ``with_tail`` option. This has no impact\n on the tail text of children, which will always be serialised.""\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_31tostring = {"tostring", (PyCFunction)__pyx_pw_4lxml_5etree_31tostring, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_30tostring}; +static char __pyx_doc_4lxml_5etree_30tostring[] = "tostring(element_or_tree, encoding=None, method=\"xml\",\n xml_declaration=None, pretty_print=False, with_tail=True,\n standalone=None, doctype=None,\n exclusive=False, with_comments=True, inclusive_ns_prefixes=None)\n\n Serialize an element to an encoded string representation of its XML\n tree.\n\n Defaults to ASCII encoding without XML declaration. This\n behaviour can be configured with the keyword arguments 'encoding'\n (string) and 'xml_declaration' (bool). Note that changing the\n encoding to a non UTF-8 compatible encoding will enable a\n declaration by default.\n\n You can also serialise to a Unicode string without declaration by\n passing the name ``'unicode'`` as encoding (or the ``str`` function\n in Py3 or ``unicode`` in Py2). This changes the return value from\n a byte string to an unencoded unicode string.\n\n The keyword argument 'pretty_print' (bool) enables formatted XML.\n\n The keyword argument 'method' selects the output method: 'xml',\n 'html', plain 'text' (text content without tags) or 'c14n'.\n Default is 'xml'.\n\n The ``exclusive`` and ``with_comments`` arguments are only used\n with C14N output, where they request exclusive and uncommented\n C14N serialisation respectively.\n\n Passing a boolean value to the ``standalone`` option will output\n an XML declaration with the corresponding ``standalone`` flag.\n\n The ``doctype`` option allows passing in a plain string that will\n be serialised before the XML tree. Note that passing in non\n well-formed content here will make the XML output non well-formed.\n Also, an existing doctype in the document tree will not be removed\n when serialising an ElementTree instance.\n\n You can prevent the tail text of the element from being serialised\n by passing the boolean ``with_tail`` option. This has no impact\n on the tail text of children, which will always be seria""lised.\n "; +static PyMethodDef __pyx_mdef_4lxml_5etree_31tostring = {"tostring", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_31tostring, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_30tostring}; static PyObject *__pyx_pw_4lxml_5etree_31tostring(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_element_or_tree = 0; PyObject *__pyx_v_encoding = 0; @@ -87319,7 +82186,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":3262 + /* "lxml/etree.pyx":3260 * * def tostring(element_or_tree, *, encoding=None, method="xml", * xml_declaration=None, bint pretty_print=False, bint with_tail=True, # <<<<<<<<<<<<<< @@ -87328,7 +82195,7 @@ static PyObject *__pyx_pw_4lxml_5etree_31tostring(PyObject *__pyx_self, PyObject */ values[3] = ((PyObject *)((PyObject *)Py_None)); - /* "lxml/etree.pyx":3263 + /* "lxml/etree.pyx":3261 * def tostring(element_or_tree, *, encoding=None, method="xml", * xml_declaration=None, bint pretty_print=False, bint with_tail=True, * standalone=None, doctype=None, # <<<<<<<<<<<<<< @@ -87338,7 +82205,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":3264 + /* "lxml/etree.pyx":3262 * 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): # <<<<<<<<<<<<<< @@ -87369,7 +82236,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, 3261, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tostring") < 0)) __PYX_ERR(0, 3259, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -87381,10 +82248,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, 3262, __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, 3260, __pyx_L3_error) } else { - /* "lxml/etree.pyx":3262 + /* "lxml/etree.pyx":3260 * * def tostring(element_or_tree, *, encoding=None, method="xml", * xml_declaration=None, bint pretty_print=False, bint with_tail=True, # <<<<<<<<<<<<<< @@ -87394,17 +82261,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, 3262, __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, 3260, __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, 3264, __pyx_L3_error) + __pyx_v_exclusive = __Pyx_PyObject_IsTrue(values[8]); if (unlikely((__pyx_v_exclusive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3262, __pyx_L3_error) } else { - /* "lxml/etree.pyx":3264 + /* "lxml/etree.pyx":3262 * 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): # <<<<<<<<<<<<<< @@ -87414,7 +82281,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, 3264, __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, 3262, __pyx_L3_error) } else { __pyx_v_with_comments = ((int)((int)1)); } @@ -87422,7 +82289,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, 3261, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("tostring", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3259, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.tostring", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -87430,7 +82297,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":3261 + /* "lxml/etree.pyx":3259 * * * def tostring(element_or_tree, *, encoding=None, method="xml", # <<<<<<<<<<<<<< @@ -87447,7 +82314,6 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ int __pyx_v_write_declaration; int __pyx_v_is_standalone; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -87458,49 +82324,44 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ Py_ssize_t __pyx_t_7; Py_UCS4 __pyx_t_8; const char *__pyx_t_9; - __Pyx_TraceFrameInit(__pyx_codeobj__182) __Pyx_RefNannySetupContext("tostring", 0); - __Pyx_TraceCall("tostring", __pyx_f[0], 3261, 0, __PYX_ERR(0, 3261, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_encoding); - /* "lxml/etree.pyx":3310 + /* "lxml/etree.pyx":3308 * cdef int is_standalone * # C14N serialisation * if method == 'c14n': # <<<<<<<<<<<<<< * if encoding is not None: * raise ValueError("Cannot specify encoding with C14N") */ - __Pyx_TraceLine(3310,0,__PYX_ERR(0, 3310, __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, 3310, __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, 3308, __pyx_L1_error) if (__pyx_t_1) { - /* "lxml/etree.pyx":3311 + /* "lxml/etree.pyx":3309 * # C14N serialisation * if method == 'c14n': * if encoding is not None: # <<<<<<<<<<<<<< * raise ValueError("Cannot specify encoding with C14N") * if xml_declaration: */ - __Pyx_TraceLine(3311,0,__PYX_ERR(0, 3311, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_encoding != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":3312 + /* "lxml/etree.pyx":3310 * 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_TraceLine(3312,0,__PYX_ERR(0, 3312, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__183, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3312, __pyx_L1_error) + __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_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, 3310, __pyx_L1_error) - /* "lxml/etree.pyx":3311 + /* "lxml/etree.pyx":3309 * # C14N serialisation * if method == 'c14n': * if encoding is not None: # <<<<<<<<<<<<<< @@ -87509,32 +82370,30 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ */ } - /* "lxml/etree.pyx":3313 + /* "lxml/etree.pyx":3311 * 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_TraceLine(3313,0,__PYX_ERR(0, 3313, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_xml_declaration); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3313, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_xml_declaration); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3311, __pyx_L1_error) if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":3314 + /* "lxml/etree.pyx":3312 * 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_TraceLine(3314,0,__PYX_ERR(0, 3314, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__184, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3314, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3314, __pyx_L1_error) + __PYX_ERR(0, 3312, __pyx_L1_error) - /* "lxml/etree.pyx":3313 + /* "lxml/etree.pyx":3311 * if encoding is not None: * raise ValueError("Cannot specify encoding with C14N") * if xml_declaration: # <<<<<<<<<<<<<< @@ -87543,22 +82402,21 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ */ } - /* "lxml/etree.pyx":3315 + /* "lxml/etree.pyx":3313 * 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: * raise ValueError("Can only discard comments in C14N serialisation") */ - __Pyx_TraceLine(3315,0,__PYX_ERR(0, 3315, __pyx_L1_error)) __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, 3315, __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, 3313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3310 + /* "lxml/etree.pyx":3308 * cdef int is_standalone * # C14N serialisation * if method == 'c14n': # <<<<<<<<<<<<<< @@ -87567,32 +82425,30 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ */ } - /* "lxml/etree.pyx":3316 + /* "lxml/etree.pyx":3314 * raise ValueError("Cannot enable XML declaration in C14N") * 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'): */ - __Pyx_TraceLine(3316,0,__PYX_ERR(0, 3316, __pyx_L1_error)) __pyx_t_2 = ((!(__pyx_v_with_comments != 0)) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":3317 + /* "lxml/etree.pyx":3315 * 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_TraceLine(3317,0,__PYX_ERR(0, 3317, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__185, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3317, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3317, __pyx_L1_error) + __PYX_ERR(0, 3315, __pyx_L1_error) - /* "lxml/etree.pyx":3316 + /* "lxml/etree.pyx":3314 * raise ValueError("Cannot enable XML declaration in C14N") * return _tostringC14N(element_or_tree, exclusive, with_comments, inclusive_ns_prefixes) * if not with_comments: # <<<<<<<<<<<<<< @@ -87601,14 +82457,13 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ */ } - /* "lxml/etree.pyx":3318 + /* "lxml/etree.pyx":3316 * 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: * raise ValueError, \ */ - __Pyx_TraceLine(3318,0,__PYX_ERR(0, 3318, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_encoding == ((PyObject *)(&PyUnicode_Type))); __pyx_t_4 = (__pyx_t_1 != 0); if (!__pyx_t_4) { @@ -87623,7 +82478,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, 3318, __pyx_L1_error) + __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_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -87635,43 +82490,38 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3318, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3318, __pyx_L1_error) - } + __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) __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, 3318, __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, 3316, __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":3319 + /* "lxml/etree.pyx":3317 * 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_TraceLine(3319,0,__PYX_ERR(0, 3319, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_xml_declaration); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3319, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_xml_declaration); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3317, __pyx_L1_error) if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":3320 + /* "lxml/etree.pyx":3318 * 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" * write_declaration = 0 */ - __Pyx_TraceLine(3320,0,__PYX_ERR(0, 3320, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Serialisation_to_unicode_must_no, 0, 0); - __PYX_ERR(0, 3320, __pyx_L1_error) + __PYX_ERR(0, 3318, __pyx_L1_error) - /* "lxml/etree.pyx":3319 + /* "lxml/etree.pyx":3317 * 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: # <<<<<<<<<<<<<< @@ -87680,28 +82530,26 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ */ } - /* "lxml/etree.pyx":3322 + /* "lxml/etree.pyx":3320 * raise ValueError, \ * u"Serialisation to unicode must not request an XML declaration" * write_declaration = 0 # <<<<<<<<<<<<<< * encoding = unicode * elif xml_declaration is None: */ - __Pyx_TraceLine(3322,0,__PYX_ERR(0, 3322, __pyx_L1_error)) __pyx_v_write_declaration = 0; - /* "lxml/etree.pyx":3323 + /* "lxml/etree.pyx":3321 * u"Serialisation to unicode must not request an XML declaration" * write_declaration = 0 * encoding = unicode # <<<<<<<<<<<<<< * elif xml_declaration is None: * # by default, write an XML declaration only for non-standard encodings */ - __Pyx_TraceLine(3323,0,__PYX_ERR(0, 3323, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)(&PyUnicode_Type))); __Pyx_DECREF_SET(__pyx_v_encoding, ((PyObject *)(&PyUnicode_Type))); - /* "lxml/etree.pyx":3318 + /* "lxml/etree.pyx":3316 * 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'): # <<<<<<<<<<<<<< @@ -87711,26 +82559,24 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ goto __pyx_L7; } - /* "lxml/etree.pyx":3324 + /* "lxml/etree.pyx":3322 * write_declaration = 0 * encoding = unicode * 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 \ */ - __Pyx_TraceLine(3324,0,__PYX_ERR(0, 3324, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_xml_declaration == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":3326 + /* "lxml/etree.pyx":3324 * 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 \ # <<<<<<<<<<<<<< * (u'ASCII', u'UTF-8', u'UTF8', u'US-ASCII') * else: */ - __Pyx_TraceLine(3326,0,__PYX_ERR(0, 3326, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_encoding != Py_None); __pyx_t_4 = (__pyx_t_2 != 0); if (__pyx_t_4) { @@ -87738,7 +82584,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, 3326, __pyx_L1_error) + __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_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -87750,33 +82596,30 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3326, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3326, __pyx_L1_error) - } + __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) __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, 3326, __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, 3324, __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, 3326, __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, 3324, __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, 3326, __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, 3324, __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, 3326, __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, 3324, __pyx_L1_error) __pyx_t_4 = __pyx_t_2; __pyx_L14_bool_binop_done:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -87785,7 +82628,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":3324 + /* "lxml/etree.pyx":3322 * write_declaration = 0 * encoding = unicode * elif xml_declaration is None: # <<<<<<<<<<<<<< @@ -87795,44 +82638,41 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ goto __pyx_L7; } - /* "lxml/etree.pyx":3329 + /* "lxml/etree.pyx":3327 * (u'ASCII', u'UTF-8', u'UTF8', u'US-ASCII') * else: * write_declaration = xml_declaration # <<<<<<<<<<<<<< * if encoding is None: * encoding = u'ASCII' */ - __Pyx_TraceLine(3329,0,__PYX_ERR(0, 3329, __pyx_L1_error)) /*else*/ { - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_xml_declaration); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3329, __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, 3327, __pyx_L1_error) __pyx_v_write_declaration = __pyx_t_1; } __pyx_L7:; - /* "lxml/etree.pyx":3330 + /* "lxml/etree.pyx":3328 * else: * write_declaration = xml_declaration * if encoding is None: # <<<<<<<<<<<<<< * encoding = u'ASCII' * if standalone is None: */ - __Pyx_TraceLine(3330,0,__PYX_ERR(0, 3330, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_encoding == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":3331 + /* "lxml/etree.pyx":3329 * write_declaration = xml_declaration * if encoding is None: * encoding = u'ASCII' # <<<<<<<<<<<<<< * if standalone is None: * is_standalone = -1 */ - __Pyx_TraceLine(3331,0,__PYX_ERR(0, 3331, __pyx_L1_error)) __Pyx_INCREF(__pyx_n_u_ASCII); __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_n_u_ASCII); - /* "lxml/etree.pyx":3330 + /* "lxml/etree.pyx":3328 * else: * write_declaration = xml_declaration * if encoding is None: # <<<<<<<<<<<<<< @@ -87841,29 +82681,27 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ */ } - /* "lxml/etree.pyx":3332 + /* "lxml/etree.pyx":3330 * if encoding is None: * encoding = u'ASCII' * if standalone is None: # <<<<<<<<<<<<<< * is_standalone = -1 * elif standalone: */ - __Pyx_TraceLine(3332,0,__PYX_ERR(0, 3332, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_standalone == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":3333 + /* "lxml/etree.pyx":3331 * encoding = u'ASCII' * if standalone is None: * is_standalone = -1 # <<<<<<<<<<<<<< * elif standalone: * write_declaration = 1 */ - __Pyx_TraceLine(3333,0,__PYX_ERR(0, 3333, __pyx_L1_error)) __pyx_v_is_standalone = -1; - /* "lxml/etree.pyx":3332 + /* "lxml/etree.pyx":3330 * if encoding is None: * encoding = u'ASCII' * if standalone is None: # <<<<<<<<<<<<<< @@ -87873,38 +82711,35 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ goto __pyx_L19; } - /* "lxml/etree.pyx":3334 + /* "lxml/etree.pyx":3332 * if standalone is None: * is_standalone = -1 * elif standalone: # <<<<<<<<<<<<<< * write_declaration = 1 * is_standalone = 1 */ - __Pyx_TraceLine(3334,0,__PYX_ERR(0, 3334, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_standalone); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3334, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_standalone); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3332, __pyx_L1_error) if (__pyx_t_1) { - /* "lxml/etree.pyx":3335 + /* "lxml/etree.pyx":3333 * is_standalone = -1 * elif standalone: * write_declaration = 1 # <<<<<<<<<<<<<< * is_standalone = 1 * else: */ - __Pyx_TraceLine(3335,0,__PYX_ERR(0, 3335, __pyx_L1_error)) __pyx_v_write_declaration = 1; - /* "lxml/etree.pyx":3336 + /* "lxml/etree.pyx":3334 * elif standalone: * write_declaration = 1 * is_standalone = 1 # <<<<<<<<<<<<<< * else: * write_declaration = 1 */ - __Pyx_TraceLine(3336,0,__PYX_ERR(0, 3336, __pyx_L1_error)) __pyx_v_is_standalone = 1; - /* "lxml/etree.pyx":3334 + /* "lxml/etree.pyx":3332 * if standalone is None: * is_standalone = -1 * elif standalone: # <<<<<<<<<<<<<< @@ -87914,66 +82749,61 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ goto __pyx_L19; } - /* "lxml/etree.pyx":3338 + /* "lxml/etree.pyx":3336 * is_standalone = 1 * else: * write_declaration = 1 # <<<<<<<<<<<<<< * is_standalone = 0 * */ - __Pyx_TraceLine(3338,0,__PYX_ERR(0, 3338, __pyx_L1_error)) /*else*/ { __pyx_v_write_declaration = 1; - /* "lxml/etree.pyx":3339 + /* "lxml/etree.pyx":3337 * else: * write_declaration = 1 * is_standalone = 0 # <<<<<<<<<<<<<< * * if isinstance(element_or_tree, _Element): */ - __Pyx_TraceLine(3339,0,__PYX_ERR(0, 3339, __pyx_L1_error)) __pyx_v_is_standalone = 0; } __pyx_L19:; - /* "lxml/etree.pyx":3341 + /* "lxml/etree.pyx":3339 * is_standalone = 0 * * if isinstance(element_or_tree, _Element): # <<<<<<<<<<<<<< * return _tostring(<_Element>element_or_tree, encoding, doctype, method, * write_declaration, 0, pretty_print, with_tail, */ - __Pyx_TraceLine(3341,0,__PYX_ERR(0, 3341, __pyx_L1_error)) __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_element_or_tree, __pyx_ptype_4lxml_5etree__Element); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":3342 + /* "lxml/etree.pyx":3340 * * if isinstance(element_or_tree, _Element): * return _tostring(<_Element>element_or_tree, encoding, doctype, method, # <<<<<<<<<<<<<< * write_declaration, 0, pretty_print, with_tail, * is_standalone) */ - __Pyx_TraceLine(3342,0,__PYX_ERR(0, 3342, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - /* "lxml/etree.pyx":3344 + /* "lxml/etree.pyx":3342 * 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_TraceLine(3344,0,__PYX_ERR(0, 3344, __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, 3342, __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, 3340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3341 + /* "lxml/etree.pyx":3339 * is_standalone = 0 * * if isinstance(element_or_tree, _Element): # <<<<<<<<<<<<<< @@ -87982,46 +82812,43 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ */ } - /* "lxml/etree.pyx":3345 + /* "lxml/etree.pyx":3343 * write_declaration, 0, pretty_print, with_tail, * is_standalone) * elif isinstance(element_or_tree, _ElementTree): # <<<<<<<<<<<<<< * return _tostring((<_ElementTree>element_or_tree)._context_node, * encoding, doctype, method, write_declaration, 1, */ - __Pyx_TraceLine(3345,0,__PYX_ERR(0, 3345, __pyx_L1_error)) __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_element_or_tree, __pyx_ptype_4lxml_5etree__ElementTree); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { - /* "lxml/etree.pyx":3346 + /* "lxml/etree.pyx":3344 * is_standalone) * elif isinstance(element_or_tree, _ElementTree): * return _tostring((<_ElementTree>element_or_tree)._context_node, # <<<<<<<<<<<<<< * encoding, doctype, method, write_declaration, 1, * pretty_print, with_tail, is_standalone) */ - __Pyx_TraceLine(3346,0,__PYX_ERR(0, 3346, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_3 = ((PyObject *)((struct LxmlElementTree *)__pyx_v_element_or_tree)->_context_node); __Pyx_INCREF(__pyx_t_3); - /* "lxml/etree.pyx":3348 + /* "lxml/etree.pyx":3346 * 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_TraceLine(3348,0,__PYX_ERR(0, 3348, __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, 3346, __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, 3344, __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":3345 + /* "lxml/etree.pyx":3343 * write_declaration, 0, pretty_print, with_tail, * is_standalone) * elif isinstance(element_or_tree, _ElementTree): # <<<<<<<<<<<<<< @@ -88030,16 +82857,15 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ */ } - /* "lxml/etree.pyx":3350 + /* "lxml/etree.pyx":3348 * pretty_print, with_tail, is_standalone) * else: * raise TypeError, f"Type '{python._fqtypename(element_or_tree).decode('utf8')}' cannot be serialized." # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(3350,0,__PYX_ERR(0, 3350, __pyx_L1_error)) /*else*/ { - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3350, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = 0; __pyx_t_8 = 127; @@ -88048,7 +82874,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, 3350, __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, 3348, __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; @@ -88060,15 +82886,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, 3350, __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, 3348, __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, 3350, __pyx_L1_error) + __PYX_ERR(0, 3348, __pyx_L1_error) } - /* "lxml/etree.pyx":3261 + /* "lxml/etree.pyx":3259 * * * def tostring(element_or_tree, *, encoding=None, method="xml", # <<<<<<<<<<<<<< @@ -88086,12 +82912,11 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ __pyx_L0:; __Pyx_XDECREF(__pyx_v_encoding); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":3354 +/* "lxml/etree.pyx":3352 * * * def tostringlist(element_or_tree, *args, **kwargs): # <<<<<<<<<<<<<< @@ -88102,7 +82927,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_33tostringlist(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_32tostringlist[] = "tostringlist(element_or_tree, *args, **kwargs)\n\n Serialize an element to an encoded string representation of its XML\n tree, stored in a list of partial strings.\n\n This is purely for ElementTree 1.3 compatibility. The result is a\n single string wrapped in a list.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_33tostringlist = {"tostringlist", (PyCFunction)__pyx_pw_4lxml_5etree_33tostringlist, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_32tostringlist}; +static PyMethodDef __pyx_mdef_4lxml_5etree_33tostringlist = {"tostringlist", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_33tostringlist, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_32tostringlist}; static PyObject *__pyx_pw_4lxml_5etree_33tostringlist(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_element_or_tree = 0; PyObject *__pyx_v_args = 0; @@ -88143,7 +82968,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, 3354, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "tostringlist") < 0)) __PYX_ERR(0, 3352, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; @@ -88154,7 +82979,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, 3354, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("tostringlist", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3352, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; @@ -88173,39 +82998,35 @@ static PyObject *__pyx_pw_4lxml_5etree_33tostringlist(PyObject *__pyx_self, PyOb static PyObject *__pyx_pf_4lxml_5etree_32tostringlist(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_element_or_tree, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__186) __Pyx_RefNannySetupContext("tostringlist", 0); - __Pyx_TraceCall("tostringlist", __pyx_f[0], 3354, 0, __PYX_ERR(0, 3354, __pyx_L1_error)); - /* "lxml/etree.pyx":3363 + /* "lxml/etree.pyx":3361 * single string wrapped in a list. * """ * return [tostring(element_or_tree, *args, **kwargs)] # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(3363,0,__PYX_ERR(0, 3363, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3363, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tostring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3363, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3361, __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, 3363, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3361, __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, 3363, __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, 3361, __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, 3363, __pyx_L1_error) + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); @@ -88214,7 +83035,7 @@ static PyObject *__pyx_pf_4lxml_5etree_32tostringlist(CYTHON_UNUSED PyObject *__ __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3354 + /* "lxml/etree.pyx":3352 * * * def tostringlist(element_or_tree, *args, **kwargs): # <<<<<<<<<<<<<< @@ -88231,12 +83052,11 @@ static PyObject *__pyx_pf_4lxml_5etree_32tostringlist(CYTHON_UNUSED PyObject *__ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":3366 +/* "lxml/etree.pyx":3364 * * * def tounicode(element_or_tree, *, method=u"xml", bint pretty_print=False, # <<<<<<<<<<<<<< @@ -88247,7 +83067,7 @@ static PyObject *__pyx_pf_4lxml_5etree_32tostringlist(CYTHON_UNUSED PyObject *__ /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_35tounicode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_34tounicode[] = "tounicode(element_or_tree, method=\"xml\", pretty_print=False,\n with_tail=True, doctype=None)\n\n Serialize an element to the Python unicode representation of its XML\n tree.\n\n :deprecated: use ``tostring(el, encoding='unicode')`` instead.\n\n Note that the result does not carry an XML encoding declaration and is\n therefore not necessarily suited for serialization to byte streams without\n further treatment.\n\n The boolean keyword argument 'pretty_print' enables formatted XML.\n\n The keyword argument 'method' selects the output method: 'xml',\n 'html' or plain 'text'.\n\n You can prevent the tail text of the element from being serialised\n by passing the boolean ``with_tail`` option. This has no impact\n on the tail text of children, which will always be serialised.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_35tounicode = {"tounicode", (PyCFunction)__pyx_pw_4lxml_5etree_35tounicode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_34tounicode}; +static PyMethodDef __pyx_mdef_4lxml_5etree_35tounicode = {"tounicode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_35tounicode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_34tounicode}; static PyObject *__pyx_pw_4lxml_5etree_35tounicode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_element_or_tree = 0; PyObject *__pyx_v_method = 0; @@ -88262,7 +83082,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":3367 + /* "lxml/etree.pyx":3365 * * def tounicode(element_or_tree, *, method=u"xml", bint pretty_print=False, * bint with_tail=True, doctype=None): # <<<<<<<<<<<<<< @@ -88293,7 +83113,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, 3366, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tounicode") < 0)) __PYX_ERR(0, 3364, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -88303,10 +83123,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, 3366, __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, 3364, __pyx_L3_error) } else { - /* "lxml/etree.pyx":3366 + /* "lxml/etree.pyx":3364 * * * def tounicode(element_or_tree, *, method=u"xml", bint pretty_print=False, # <<<<<<<<<<<<<< @@ -88316,10 +83136,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, 3367, __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, 3365, __pyx_L3_error) } else { - /* "lxml/etree.pyx":3367 + /* "lxml/etree.pyx":3365 * * def tounicode(element_or_tree, *, method=u"xml", bint pretty_print=False, * bint with_tail=True, doctype=None): # <<<<<<<<<<<<<< @@ -88332,7 +83152,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, 3366, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("tounicode", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3364, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.tounicode", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -88340,7 +83160,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":3366 + /* "lxml/etree.pyx":3364 * * * def tounicode(element_or_tree, *, method=u"xml", bint pretty_print=False, # <<<<<<<<<<<<<< @@ -88355,7 +83175,6 @@ static PyObject *__pyx_pw_4lxml_5etree_35tounicode(PyObject *__pyx_self, PyObjec static PyObject *__pyx_pf_4lxml_5etree_34tounicode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_element_or_tree, PyObject *__pyx_v_method, int __pyx_v_pretty_print, int __pyx_v_with_tail, PyObject *__pyx_v_doctype) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -88363,47 +83182,42 @@ static PyObject *__pyx_pf_4lxml_5etree_34tounicode(CYTHON_UNUSED PyObject *__pyx PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; Py_UCS4 __pyx_t_6; - __Pyx_TraceFrameInit(__pyx_codeobj__187) __Pyx_RefNannySetupContext("tounicode", 0); - __Pyx_TraceCall("tounicode", __pyx_f[0], 3366, 0, __PYX_ERR(0, 3366, __pyx_L1_error)); - /* "lxml/etree.pyx":3389 + /* "lxml/etree.pyx":3387 * on the tail text of children, which will always be serialised. * """ * if isinstance(element_or_tree, _Element): # <<<<<<<<<<<<<< * return _tostring(<_Element>element_or_tree, unicode, doctype, method, * 0, 0, pretty_print, with_tail, -1) */ - __Pyx_TraceLine(3389,0,__PYX_ERR(0, 3389, __pyx_L1_error)) __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_element_or_tree, __pyx_ptype_4lxml_5etree__Element); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":3390 + /* "lxml/etree.pyx":3388 * """ * 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): */ - __Pyx_TraceLine(3390,0,__PYX_ERR(0, 3390, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - /* "lxml/etree.pyx":3391 + /* "lxml/etree.pyx":3389 * 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_TraceLine(3391,0,__PYX_ERR(0, 3391, __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, 3390, __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, 3388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3389 + /* "lxml/etree.pyx":3387 * on the tail text of children, which will always be serialised. * """ * if isinstance(element_or_tree, _Element): # <<<<<<<<<<<<<< @@ -88412,46 +83226,43 @@ static PyObject *__pyx_pf_4lxml_5etree_34tounicode(CYTHON_UNUSED PyObject *__pyx */ } - /* "lxml/etree.pyx":3392 + /* "lxml/etree.pyx":3390 * 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, * unicode, doctype, method, 0, 1, pretty_print, */ - __Pyx_TraceLine(3392,0,__PYX_ERR(0, 3392, __pyx_L1_error)) __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_element_or_tree, __pyx_ptype_4lxml_5etree__ElementTree); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { - /* "lxml/etree.pyx":3393 + /* "lxml/etree.pyx":3391 * 0, 0, pretty_print, with_tail, -1) * elif isinstance(element_or_tree, _ElementTree): * return _tostring((<_ElementTree>element_or_tree)._context_node, # <<<<<<<<<<<<<< * unicode, doctype, method, 0, 1, pretty_print, * with_tail, -1) */ - __Pyx_TraceLine(3393,0,__PYX_ERR(0, 3393, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_3 = ((PyObject *)((struct LxmlElementTree *)__pyx_v_element_or_tree)->_context_node); __Pyx_INCREF(__pyx_t_3); - /* "lxml/etree.pyx":3395 + /* "lxml/etree.pyx":3393 * 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_TraceLine(3395,0,__PYX_ERR(0, 3395, __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, 3393, __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, 3391, __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":3392 + /* "lxml/etree.pyx":3390 * return _tostring(<_Element>element_or_tree, unicode, doctype, method, * 0, 0, pretty_print, with_tail, -1) * elif isinstance(element_or_tree, _ElementTree): # <<<<<<<<<<<<<< @@ -88460,16 +83271,15 @@ static PyObject *__pyx_pf_4lxml_5etree_34tounicode(CYTHON_UNUSED PyObject *__pyx */ } - /* "lxml/etree.pyx":3397 + /* "lxml/etree.pyx":3395 * with_tail, -1) * else: * raise TypeError, f"Type '{type(element_or_tree)}' cannot be serialized." # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(3397,0,__PYX_ERR(0, 3397, __pyx_L1_error)) /*else*/ { - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3397, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_6 = 127; @@ -88477,7 +83287,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, 3397, __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, 3395, __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); @@ -88488,15 +83298,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, 3397, __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, 3395, __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, 3397, __pyx_L1_error) + __PYX_ERR(0, 3395, __pyx_L1_error) } - /* "lxml/etree.pyx":3366 + /* "lxml/etree.pyx":3364 * * * def tounicode(element_or_tree, *, method=u"xml", bint pretty_print=False, # <<<<<<<<<<<<<< @@ -88512,12 +83322,11 @@ static PyObject *__pyx_pf_4lxml_5etree_34tounicode(CYTHON_UNUSED PyObject *__pyx __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":3400 +/* "lxml/etree.pyx":3398 * * * def parse(source, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< @@ -88528,7 +83337,7 @@ static PyObject *__pyx_pf_4lxml_5etree_34tounicode(CYTHON_UNUSED PyObject *__pyx /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_37parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_36parse[] = "parse(source, parser=None, base_url=None)\n\n Return an ElementTree object loaded with source elements. If no parser\n is provided as second argument, the default parser is used.\n\n The ``source`` can be any of the following:\n\n - a file name/path\n - a file object\n - a file-like object\n - a URL using the HTTP or FTP protocol\n\n To parse from a string, use the ``fromstring()`` function instead.\n\n Note that it is generally faster to parse from a file path or URL\n than from an open file object or file-like object. Transparent\n decompression from gzip compressed sources is supported (unless\n explicitly disabled in libxml2).\n\n The ``base_url`` keyword allows setting a URL for the document\n when parsing from a file-like object. This is needed when looking\n up external entities (DTD, XInclude, ...) with relative paths.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_37parse = {"parse", (PyCFunction)__pyx_pw_4lxml_5etree_37parse, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_36parse}; +static PyMethodDef __pyx_mdef_4lxml_5etree_37parse = {"parse", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_37parse, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_36parse}; static PyObject *__pyx_pw_4lxml_5etree_37parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_source = 0; struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_parser = 0; @@ -88570,7 +83379,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, 3400, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse") < 0)) __PYX_ERR(0, 3398, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -88587,13 +83396,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, 3400, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("parse", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3398, __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, 3400, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) __PYX_ERR(0, 3398, __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 */ @@ -88609,7 +83418,6 @@ static PyObject *__pyx_pf_4lxml_5etree_36parse(CYTHON_UNUSED PyObject *__pyx_sel struct LxmlDocument *__pyx_v_doc = 0; PyObject *__pyx_v_result_container = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -88619,18 +83427,15 @@ static PyObject *__pyx_pf_4lxml_5etree_36parse(CYTHON_UNUSED PyObject *__pyx_sel PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; - __Pyx_TraceFrameInit(__pyx_codeobj__188) __Pyx_RefNannySetupContext("parse", 0); - __Pyx_TraceCall("parse", __pyx_f[0], 3400, 0, __PYX_ERR(0, 3400, __pyx_L1_error)); - /* "lxml/etree.pyx":3425 + /* "lxml/etree.pyx":3423 * """ * cdef _Document doc * try: # <<<<<<<<<<<<<< * doc = _parseDocument(source, parser, base_url) * return _elementTreeFactory(doc, None) */ - __Pyx_TraceLine(3425,0,__PYX_ERR(0, 3425, __pyx_L3_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -88640,35 +83445,33 @@ static PyObject *__pyx_pf_4lxml_5etree_36parse(CYTHON_UNUSED PyObject *__pyx_sel __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "lxml/etree.pyx":3426 + /* "lxml/etree.pyx":3424 * cdef _Document doc * try: * doc = _parseDocument(source, parser, base_url) # <<<<<<<<<<<<<< * return _elementTreeFactory(doc, None) * except _TargetParserResult as result_container: */ - __Pyx_TraceLine(3426,0,__PYX_ERR(0, 3426, __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, 3426, __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, 3424, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":3427 + /* "lxml/etree.pyx":3425 * try: * doc = _parseDocument(source, parser, base_url) * return _elementTreeFactory(doc, None) # <<<<<<<<<<<<<< * except _TargetParserResult as result_container: * return result_container.result */ - __Pyx_TraceLine(3427,0,__PYX_ERR(0, 3427, __pyx_L3_error)) __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, 3427, __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, 3425, __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":3425 + /* "lxml/etree.pyx":3423 * """ * cdef _Document doc * try: # <<<<<<<<<<<<<< @@ -88679,16 +83482,15 @@ 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":3428 + /* "lxml/etree.pyx":3426 * doc = _parseDocument(source, parser, base_url) * return _elementTreeFactory(doc, None) * except _TargetParserResult as result_container: # <<<<<<<<<<<<<< * return result_container.result * */ - __Pyx_TraceLine(3428,0,__PYX_ERR(0, 3428, __pyx_L5_except_error)) __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_TargetParserResult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3428, __pyx_L5_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_TargetParserResult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3426, __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; @@ -88696,23 +83498,22 @@ 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, 3428, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 3426, __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":3429 + /* "lxml/etree.pyx":3427 * return _elementTreeFactory(doc, None) * except _TargetParserResult as result_container: * return result_container.result # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(3429,0,__PYX_ERR(0, 3429, __pyx_L5_except_error)) __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, 3429, __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, 3427, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; @@ -88724,7 +83525,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":3425 + /* "lxml/etree.pyx":3423 * """ * cdef _Document doc * try: # <<<<<<<<<<<<<< @@ -88750,7 +83551,7 @@ static PyObject *__pyx_pf_4lxml_5etree_36parse(CYTHON_UNUSED PyObject *__pyx_sel goto __pyx_L0; } - /* "lxml/etree.pyx":3400 + /* "lxml/etree.pyx":3398 * * * def parse(source, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< @@ -88770,12 +83571,11 @@ static PyObject *__pyx_pf_4lxml_5etree_36parse(CYTHON_UNUSED PyObject *__pyx_sel __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XDECREF(__pyx_v_result_container); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":3432 +/* "lxml/etree.pyx":3430 * * * def adopt_external_document(capsule, _BaseParser parser=None): # <<<<<<<<<<<<<< @@ -88785,8 +83585,8 @@ static PyObject *__pyx_pf_4lxml_5etree_36parse(CYTHON_UNUSED PyObject *__pyx_sel /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_39adopt_external_document(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_4lxml_5etree_38adopt_external_document[] = "adopt_external_document(capsule, parser=None)\n\n Unpack a libxml2 document pointer from a PyCapsule and wrap it in an\n lxml ElementTree object.\n\n This allows external libraries to build XML/HTML trees using libxml2\n and then pass them efficiently into lxml for further processing.\n Requires Python 2.7 or later.\n\n If a ``parser`` is provided, it will be used for configuring the\n lxml document. No parsing will be done.\n\n The capsule must have the name ``\"libxml2:xmlDoc\"`` and its pointer\n value must reference a correct libxml2 document of type ``xmlDoc*``.\n The creator of the capsule must take care to correctly clean up the\n document using an appropriate capsule destructor. By default, the\n libxml2 document will be copied to let lxml safely own the memory\n of the internal tree that it uses.\n\n If the capsule context is non-NULL, it must point to a C string that\n can be compared using ``strcmp()``. If the context string equals\n ``\"destructor:xmlFreeDoc\"``, the libxml2 document will not be copied\n but the capsule invalidated instead by clearing its destructor and\n name. That way, lxml takes ownership of the libxml2 document in memory\n without creating a copy first, and the capsule destructor will not be\n called. The document will then eventually be cleaned up by lxml using\n the libxml2 API function ``xmlFreeDoc()`` once it is no longer used.\n\n If no copy is made, later modifications of the tree outside of lxml\n should not be attempted after transferring the ownership.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_39adopt_external_document = {"adopt_external_document", (PyCFunction)__pyx_pw_4lxml_5etree_39adopt_external_document, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_38adopt_external_document}; +static char __pyx_doc_4lxml_5etree_38adopt_external_document[] = "adopt_external_document(capsule, parser=None)\n\n Unpack a libxml2 document pointer from a PyCapsule and wrap it in an\n lxml ElementTree object.\n\n This allows external libraries to build XML/HTML trees using libxml2\n and then pass them efficiently into lxml for further processing.\n\n If a ``parser`` is provided, it will be used for configuring the\n lxml document. No parsing will be done.\n\n The capsule must have the name ``\"libxml2:xmlDoc\"`` and its pointer\n value must reference a correct libxml2 document of type ``xmlDoc*``.\n The creator of the capsule must take care to correctly clean up the\n document using an appropriate capsule destructor. By default, the\n libxml2 document will be copied to let lxml safely own the memory\n of the internal tree that it uses.\n\n If the capsule context is non-NULL, it must point to a C string that\n can be compared using ``strcmp()``. If the context string equals\n ``\"destructor:xmlFreeDoc\"``, the libxml2 document will not be copied\n but the capsule invalidated instead by clearing its destructor and\n name. That way, lxml takes ownership of the libxml2 document in memory\n without creating a copy first, and the capsule destructor will not be\n called. The document will then eventually be cleaned up by lxml using\n the libxml2 API function ``xmlFreeDoc()`` once it is no longer used.\n\n If no copy is made, later modifications of the tree outside of lxml\n should not be attempted after transferring the ownership.\n "; +static PyMethodDef __pyx_mdef_4lxml_5etree_39adopt_external_document = {"adopt_external_document", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_39adopt_external_document, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_38adopt_external_document}; static PyObject *__pyx_pw_4lxml_5etree_39adopt_external_document(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_capsule = 0; struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_parser = 0; @@ -88821,7 +83621,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, 3432, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "adopt_external_document") < 0)) __PYX_ERR(0, 3430, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -88837,13 +83637,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, 3432, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("adopt_external_document", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3430, __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, 3432, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) __PYX_ERR(0, 3430, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_38adopt_external_document(__pyx_self, __pyx_v_capsule, __pyx_v_parser); /* function exit code */ @@ -88860,103 +83660,61 @@ static PyObject *__pyx_pf_4lxml_5etree_38adopt_external_document(CYTHON_UNUSED P int __pyx_v_is_owned; struct LxmlDocument *__pyx_v_doc = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - int __pyx_t_1; + void *__pyx_t_1; PyObject *__pyx_t_2 = NULL; - void *__pyx_t_3; - struct __pyx_opt_args_4lxml_5etree__adoptForeignDoc __pyx_t_4; - __Pyx_TraceFrameInit(__pyx_codeobj__189) + struct __pyx_opt_args_4lxml_5etree__adoptForeignDoc __pyx_t_3; __Pyx_RefNannySetupContext("adopt_external_document", 0); - __Pyx_TraceCall("adopt_external_document", __pyx_f[0], 3432, 0, __PYX_ERR(0, 3432, __pyx_L1_error)); - - /* "lxml/etree.pyx":3464 - * should not be attempted after transferring the ownership. - * """ - * if python.PY_VERSION_HEX < 0x02070000: # <<<<<<<<<<<<<< - * raise NotImplementedError("PyCapsule usage requires Python 2.7+") - * - */ - __Pyx_TraceLine(3464,0,__PYX_ERR(0, 3464, __pyx_L1_error)) - __pyx_t_1 = ((PY_VERSION_HEX < 0x02070000) != 0); - if (unlikely(__pyx_t_1)) { - /* "lxml/etree.pyx":3465 + /* "lxml/etree.pyx":3462 * """ - * if python.PY_VERSION_HEX < 0x02070000: - * raise NotImplementedError("PyCapsule usage requires Python 2.7+") # <<<<<<<<<<<<<< - * - * cdef xmlDoc* c_doc - */ - __Pyx_TraceLine(3465,0,__PYX_ERR(0, 3465, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__190, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3465, __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, 3465, __pyx_L1_error) - - /* "lxml/etree.pyx":3464 - * should not be attempted after transferring the ownership. - * """ - * if python.PY_VERSION_HEX < 0x02070000: # <<<<<<<<<<<<<< - * raise NotImplementedError("PyCapsule usage requires Python 2.7+") - * - */ - } - - /* "lxml/etree.pyx":3468 - * * 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) */ - __Pyx_TraceLine(3468,0,__PYX_ERR(0, 3468, __pyx_L1_error)) __pyx_v_is_owned = 0; - /* "lxml/etree.pyx":3469 + /* "lxml/etree.pyx":3463 * 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_TraceLine(3469,0,__PYX_ERR(0, 3469, __pyx_L1_error)) - __pyx_t_3 = lxml_unpack_xmldoc_capsule(__pyx_v_capsule, (&__pyx_v_is_owned)); if (unlikely(__pyx_t_3 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 3469, __pyx_L1_error) - __pyx_v_c_doc = ((xmlDoc *)__pyx_t_3); + __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_v_c_doc = ((xmlDoc *)__pyx_t_1); - /* "lxml/etree.pyx":3470 + /* "lxml/etree.pyx":3464 * 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_TraceLine(3470,0,__PYX_ERR(0, 3470, __pyx_L1_error)) - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.parser = __pyx_v_parser; - __pyx_t_4.is_owned = __pyx_v_is_owned; - __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__adoptForeignDoc(__pyx_v_c_doc, &__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3470, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":3471 + /* "lxml/etree.pyx":3465 * c_doc = python.lxml_unpack_xmldoc_capsule(capsule, &is_owned) * doc = _adoptForeignDoc(c_doc, parser, is_owned) * return _elementTreeFactory(doc, None) # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(3471,0,__PYX_ERR(0, 3471, __pyx_L1_error)) __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, 3471, __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, 3465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3432 + /* "lxml/etree.pyx":3430 * * * def adopt_external_document(capsule, _BaseParser parser=None): # <<<<<<<<<<<<<< @@ -88972,7 +83730,6 @@ static PyObject *__pyx_pf_4lxml_5etree_38adopt_external_document(CYTHON_UNUSED P __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -89003,10 +83760,8 @@ static int __pyx_pw_4lxml_5etree_14_ReadOnlyProxy_1__cinit__(PyObject *__pyx_v_s static int __pyx_pf_4lxml_5etree_14_ReadOnlyProxy___cinit__(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[6], 10, 0, __PYX_ERR(6, 10, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":11 * cdef list _dependent_proxies @@ -89015,7 +83770,6 @@ static int __pyx_pf_4lxml_5etree_14_ReadOnlyProxy___cinit__(struct __pyx_obj_4lx * self._free_after_use = 0 * */ - __Pyx_TraceLine(11,0,__PYX_ERR(6, 11, __pyx_L1_error)) __pyx_v_self->_c_node = NULL; /* "src/lxml/readonlytree.pxi":12 @@ -89025,7 +83779,6 @@ static int __pyx_pf_4lxml_5etree_14_ReadOnlyProxy___cinit__(struct __pyx_obj_4lx * * cdef int _assertNode(self) except -1: */ - __Pyx_TraceLine(12,0,__PYX_ERR(6, 12, __pyx_L1_error)) __pyx_v_self->_free_after_use = 0; /* "src/lxml/readonlytree.pxi":10 @@ -89038,12 +83791,6 @@ static int __pyx_pf_4lxml_5etree_14_ReadOnlyProxy___cinit__(struct __pyx_obj_4lx /* function exit code */ __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._ReadOnlyProxy.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -89058,12 +83805,10 @@ static int __pyx_pf_4lxml_5etree_14_ReadOnlyProxy___cinit__(struct __pyx_obj_4lx static int __pyx_f_4lxml_5etree_14_ReadOnlyProxy__assertNode(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_assertNode", 0); - __Pyx_TraceCall("_assertNode", __pyx_f[6], 14, 0, __PYX_ERR(6, 14, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":17 * u"""This is our way of saying: this proxy is invalid! @@ -89072,7 +83817,6 @@ static int __pyx_f_4lxml_5etree_14_ReadOnlyProxy__assertNode(struct __pyx_obj_4l * raise ReferenceError("Proxy invalidated!") * return 0 */ - __Pyx_TraceLine(17,0,__PYX_ERR(6, 17, __pyx_L1_error)) __pyx_t_1 = ((!(__pyx_v_self->_c_node != 0)) != 0); if (unlikely(__pyx_t_1)) { @@ -89083,8 +83827,7 @@ static int __pyx_f_4lxml_5etree_14_ReadOnlyProxy__assertNode(struct __pyx_obj_4l * return 0 * */ - __Pyx_TraceLine(18,0,__PYX_ERR(6, 18, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ReferenceError, __pyx_tuple__191, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 18, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ReferenceError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 18, __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; @@ -89106,7 +83849,6 @@ static int __pyx_f_4lxml_5etree_14_ReadOnlyProxy__assertNode(struct __pyx_obj_4l * * cdef int _raise_unsupported_type(self) except -1: */ - __Pyx_TraceLine(19,0,__PYX_ERR(6, 19, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -89124,7 +83866,6 @@ static int __pyx_f_4lxml_5etree_14_ReadOnlyProxy__assertNode(struct __pyx_obj_4l __Pyx_AddTraceback("lxml.etree._ReadOnlyProxy._assertNode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -89139,12 +83880,10 @@ static int __pyx_f_4lxml_5etree_14_ReadOnlyProxy__assertNode(struct __pyx_obj_4l static int __pyx_f_4lxml_5etree_14_ReadOnlyProxy__raise_unsupported_type(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_raise_unsupported_type", 0); - __Pyx_TraceCall("_raise_unsupported_type", __pyx_f[6], 21, 0, __PYX_ERR(6, 21, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":22 * @@ -89153,7 +83892,6 @@ static int __pyx_f_4lxml_5etree_14_ReadOnlyProxy__raise_unsupported_type(struct * * cdef void free_after_use(self): */ - __Pyx_TraceLine(22,0,__PYX_ERR(6, 22, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyUnicode_From_xmlElementType(__pyx_v_self->_c_node->type, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unsupported_node_type, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 22, __pyx_L1_error) @@ -89180,7 +83918,6 @@ static int __pyx_f_4lxml_5etree_14_ReadOnlyProxy__raise_unsupported_type(struct __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("lxml.etree._ReadOnlyProxy._raise_unsupported_type", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -89194,10 +83931,8 @@ static int __pyx_f_4lxml_5etree_14_ReadOnlyProxy__raise_unsupported_type(struct */ static void __pyx_f_4lxml_5etree_14_ReadOnlyProxy_free_after_use(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_v_self) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("free_after_use", 0); - __Pyx_TraceCall("free_after_use", __pyx_f[6], 24, 0, __PYX_ERR(6, 24, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":27 * u"""Should the xmlNode* be freed when releasing the proxy? @@ -89206,7 +83941,6 @@ static void __pyx_f_4lxml_5etree_14_ReadOnlyProxy_free_after_use(struct __pyx_ob * * property tag: */ - __Pyx_TraceLine(27,0,__PYX_ERR(6, 27, __pyx_L1_error)) __pyx_v_self->_free_after_use = 1; /* "src/lxml/readonlytree.pxi":24 @@ -89218,11 +83952,6 @@ static void __pyx_f_4lxml_5etree_14_ReadOnlyProxy_free_after_use(struct __pyx_ob */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._ReadOnlyProxy.free_after_use", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -89249,12 +83978,10 @@ static PyObject *__pyx_pw_4lxml_5etree_14_ReadOnlyProxy_3tag_1__get__(PyObject * static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_3tag___get__(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[6], 32, 0, __PYX_ERR(6, 32, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":33 * """ @@ -89263,7 +83990,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_3tag___get__(struct __py * if self._c_node.type == tree.XML_ELEMENT_NODE: * return _namespacedName(self._c_node) */ - __Pyx_TraceLine(33,0,__PYX_ERR(6, 33, __pyx_L1_error)) __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 @@ -89273,7 +83999,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_3tag___get__(struct __py * return _namespacedName(self._c_node) * elif self._c_node.type == tree.XML_PI_NODE: */ - __Pyx_TraceLine(34,0,__PYX_ERR(6, 34, __pyx_L1_error)) switch (__pyx_v_self->_c_node->type) { case XML_ELEMENT_NODE: @@ -89284,7 +84009,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_3tag___get__(struct __py * elif self._c_node.type == tree.XML_PI_NODE: * return ProcessingInstruction */ - __Pyx_TraceLine(35,0,__PYX_ERR(6, 35, __pyx_L1_error)) __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) __Pyx_GOTREF(__pyx_t_2); @@ -89300,15 +84024,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_3tag___get__(struct __py * elif self._c_node.type == tree.XML_PI_NODE: */ break; - - /* "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: - */ - __Pyx_TraceLine(36,0,__PYX_ERR(6, 36, __pyx_L1_error)) case XML_PI_NODE: /* "src/lxml/readonlytree.pxi":37 @@ -89318,9 +84033,8 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_3tag___get__(struct __py * elif self._c_node.type == tree.XML_COMMENT_NODE: * return Comment */ - __Pyx_TraceLine(37,0,__PYX_ERR(6, 37, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ProcessingInstruction); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 37, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ProcessingInstruction); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -89334,15 +84048,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_3tag___get__(struct __py * elif self._c_node.type == tree.XML_COMMENT_NODE: */ break; - - /* "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: - */ - __Pyx_TraceLine(38,0,__PYX_ERR(6, 38, __pyx_L1_error)) case XML_COMMENT_NODE: /* "src/lxml/readonlytree.pxi":39 @@ -89352,9 +84057,8 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_3tag___get__(struct __py * elif self._c_node.type == tree.XML_ENTITY_REF_NODE: * return Entity */ - __Pyx_TraceLine(39,0,__PYX_ERR(6, 39, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Comment); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 39, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Comment); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -89368,15 +84072,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_3tag___get__(struct __py * elif self._c_node.type == tree.XML_ENTITY_REF_NODE: */ break; - - /* "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: - */ - __Pyx_TraceLine(40,0,__PYX_ERR(6, 40, __pyx_L1_error)) case XML_ENTITY_REF_NODE: /* "src/lxml/readonlytree.pxi":41 @@ -89386,9 +84081,8 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_3tag___get__(struct __py * else: * self._raise_unsupported_type() */ - __Pyx_TraceLine(41,0,__PYX_ERR(6, 41, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Entity); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 41, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Entity); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -89411,7 +84105,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_3tag___get__(struct __py * * property text: */ - __Pyx_TraceLine(43,0,__PYX_ERR(6, 43, __pyx_L1_error)) __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; } @@ -89433,7 +84126,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_3tag___get__(struct __py __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -89461,7 +84153,6 @@ static PyObject *__pyx_pw_4lxml_5etree_14_ReadOnlyProxy_4text_1__get__(PyObject static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4text___get__(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -89471,7 +84162,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4text___get__(struct __p PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[6], 49, 0, __PYX_ERR(6, 49, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":50 * """ @@ -89480,7 +84170,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4text___get__(struct __p * if self._c_node.type == tree.XML_ELEMENT_NODE: * return _collectText(self._c_node.children) */ - __Pyx_TraceLine(50,0,__PYX_ERR(6, 50, __pyx_L1_error)) __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 @@ -89490,7 +84179,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4text___get__(struct __p * return _collectText(self._c_node.children) * elif self._c_node.type in (tree.XML_PI_NODE, */ - __Pyx_TraceLine(51,0,__PYX_ERR(6, 51, __pyx_L1_error)) switch (__pyx_v_self->_c_node->type) { case XML_ELEMENT_NODE: @@ -89501,7 +84189,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4text___get__(struct __p * elif self._c_node.type in (tree.XML_PI_NODE, * tree.XML_COMMENT_NODE): */ - __Pyx_TraceLine(52,0,__PYX_ERR(6, 52, __pyx_L1_error)) __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) __Pyx_GOTREF(__pyx_t_2); @@ -89517,6 +84204,7 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4text___get__(struct __p * 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: @@ -89525,17 +84213,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4text___get__(struct __p * tree.XML_COMMENT_NODE): * if self._c_node.content is NULL: */ - __Pyx_TraceLine(53,0,__PYX_ERR(6, 53, __pyx_L1_error)) - case XML_PI_NODE: - - /* "src/lxml/readonlytree.pxi":54 - * 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 '' - */ - __Pyx_TraceLine(54,0,__PYX_ERR(6, 54, __pyx_L1_error)) case XML_COMMENT_NODE: /* "src/lxml/readonlytree.pxi":55 @@ -89545,7 +84222,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4text___get__(struct __p * return '' * else: */ - __Pyx_TraceLine(55,0,__PYX_ERR(6, 55, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_self->_c_node->content == NULL) != 0); if (__pyx_t_3) { @@ -89556,10 +84232,9 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4text___get__(struct __p * else: * return funicode(self._c_node.content) */ - __Pyx_TraceLine(56,0,__PYX_ERR(6, 56, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_kp_s__23); - __pyx_r = __pyx_kp_s__23; + __Pyx_INCREF(__pyx_kp_s__11); + __pyx_r = __pyx_kp_s__11; goto __pyx_L0; /* "src/lxml/readonlytree.pxi":55 @@ -89578,7 +84253,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4text___get__(struct __p * elif self._c_node.type == tree.XML_ENTITY_REF_NODE: * return f'&{funicode(self._c_node.name)};' */ - __Pyx_TraceLine(58,0,__PYX_ERR(6, 58, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->_c_node->content); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 58, __pyx_L1_error) @@ -89596,15 +84270,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4text___get__(struct __p * if self._c_node.content is NULL: */ break; - - /* "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: - */ - __Pyx_TraceLine(59,0,__PYX_ERR(6, 59, __pyx_L1_error)) case XML_ENTITY_REF_NODE: /* "src/lxml/readonlytree.pxi":60 @@ -89614,16 +84279,15 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4text___get__(struct __p * else: * self._raise_unsupported_type() */ - __Pyx_TraceLine(60,0,__PYX_ERR(6, 60, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = 127; - __Pyx_INCREF(__pyx_kp_u__112); + __Pyx_INCREF(__pyx_kp_u__28); __pyx_t_4 += 1; - __Pyx_GIVEREF(__pyx_kp_u__112); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u__112); + __Pyx_GIVEREF(__pyx_kp_u__28); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u__28); __pyx_t_6 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->_c_node->name); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 60, __pyx_L1_error) @@ -89634,10 +84298,10 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4text___get__(struct __p __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7); __pyx_t_7 = 0; - __Pyx_INCREF(__pyx_kp_u__113); + __Pyx_INCREF(__pyx_kp_u__29); __pyx_t_4 += 1; - __Pyx_GIVEREF(__pyx_kp_u__113); - PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__113); + __Pyx_GIVEREF(__pyx_kp_u__29); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__29); __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -89662,7 +84326,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4text___get__(struct __p * * property tail: */ - __Pyx_TraceLine(62,0,__PYX_ERR(6, 62, __pyx_L1_error)) __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; } @@ -89686,7 +84349,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4text___get__(struct __p __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -89714,12 +84376,10 @@ static PyObject *__pyx_pw_4lxml_5etree_14_ReadOnlyProxy_4tail_1__get__(PyObject static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4tail___get__(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[6], 69, 0, __PYX_ERR(6, 69, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":70 * """ @@ -89728,7 +84388,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4tail___get__(struct __p * return _collectText(self._c_node.next) * */ - __Pyx_TraceLine(70,0,__PYX_ERR(6, 70, __pyx_L1_error)) __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 @@ -89738,7 +84397,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4tail___get__(struct __p * * property sourceline: */ - __Pyx_TraceLine(71,0,__PYX_ERR(6, 71, __pyx_L1_error)) __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) __Pyx_GOTREF(__pyx_t_2); @@ -89761,7 +84419,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4tail___get__(struct __p __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -89790,13 +84447,11 @@ static PyObject *__pyx_pw_4lxml_5etree_14_ReadOnlyProxy_10sourceline_1__get__(Py static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_10sourceline___get__(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_v_self) { long __pyx_v_line; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[6], 76, 0, __PYX_ERR(6, 76, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":78 * def __get__(self): @@ -89805,7 +84460,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_10sourceline___get__(str * line = tree.xmlGetLineNo(self._c_node) * if line > 0: */ - __Pyx_TraceLine(78,0,__PYX_ERR(6, 78, __pyx_L1_error)) __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 @@ -89815,7 +84469,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_10sourceline___get__(str * if line > 0: * return line */ - __Pyx_TraceLine(79,0,__PYX_ERR(6, 79, __pyx_L1_error)) __pyx_v_line = xmlGetLineNo(__pyx_v_self->_c_node); /* "src/lxml/readonlytree.pxi":80 @@ -89825,7 +84478,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_10sourceline___get__(str * return line * else: */ - __Pyx_TraceLine(80,0,__PYX_ERR(6, 80, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_line > 0) != 0); if (__pyx_t_2) { @@ -89836,7 +84488,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_10sourceline___get__(str * else: * return None */ - __Pyx_TraceLine(81,0,__PYX_ERR(6, 81, __pyx_L1_error)) __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) __Pyx_GOTREF(__pyx_t_3); @@ -89860,7 +84511,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_10sourceline___get__(str * * def __repr__(self): */ - __Pyx_TraceLine(83,0,__PYX_ERR(6, 83, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -89882,7 +84532,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_10sourceline___get__(str __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -89911,7 +84560,6 @@ static PyObject *__pyx_pw_4lxml_5etree_14_ReadOnlyProxy_3__repr__(PyObject *__py static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_2__repr__(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_v_self) { PyObject *__pyx_v_text = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -89919,7 +84567,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_2__repr__(struct __pyx_o PyObject *__pyx_t_4 = NULL; int __pyx_t_5; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[6], 85, 0, __PYX_ERR(6, 85, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":86 * @@ -89928,7 +84575,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_2__repr__(struct __pyx_o * if self._c_node.type == tree.XML_ELEMENT_NODE: * return "" % (strrepr(self.tag), id(self)) */ - __Pyx_TraceLine(86,0,__PYX_ERR(6, 86, __pyx_L1_error)) __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, 86, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":87 @@ -89938,7 +84584,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_2__repr__(struct __pyx_o * return "" % (strrepr(self.tag), id(self)) * elif self._c_node.type == tree.XML_COMMENT_NODE: */ - __Pyx_TraceLine(87,0,__PYX_ERR(6, 87, __pyx_L1_error)) switch (__pyx_v_self->_c_node->type) { case XML_ELEMENT_NODE: @@ -89949,7 +84594,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_2__repr__(struct __pyx_o * elif self._c_node.type == tree.XML_COMMENT_NODE: * return "" % strrepr(self.text) */ - __Pyx_TraceLine(88,0,__PYX_ERR(6, 88, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -89981,15 +84625,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_2__repr__(struct __pyx_o * elif self._c_node.type == tree.XML_COMMENT_NODE: */ break; - - /* "src/lxml/readonlytree.pxi":89 - * if self._c_node.type == tree.XML_ELEMENT_NODE: - * return "" % (strrepr(self.tag), id(self)) - * elif self._c_node.type == tree.XML_COMMENT_NODE: # <<<<<<<<<<<<<< - * return "" % strrepr(self.text) - * elif self._c_node.type == tree.XML_ENTITY_NODE: - */ - __Pyx_TraceLine(89,0,__PYX_ERR(6, 89, __pyx_L1_error)) case XML_COMMENT_NODE: /* "src/lxml/readonlytree.pxi":90 @@ -89999,14 +84634,13 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_2__repr__(struct __pyx_o * elif self._c_node.type == tree.XML_ENTITY_NODE: * return "&%s;" % strrepr(funicode(self._c_node.name)) */ - __Pyx_TraceLine(90,0,__PYX_ERR(6, 90, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_text); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_f_4lxml_5etree_strrepr(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 90, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyString_FormatSafe(__pyx_kp_s_s, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; @@ -90021,15 +84655,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_2__repr__(struct __pyx_o * elif self._c_node.type == tree.XML_ENTITY_NODE: */ break; - - /* "src/lxml/readonlytree.pxi":91 - * elif self._c_node.type == tree.XML_COMMENT_NODE: - * return "" % strrepr(self.text) - * elif self._c_node.type == tree.XML_ENTITY_NODE: # <<<<<<<<<<<<<< - * return "&%s;" % strrepr(funicode(self._c_node.name)) - * elif self._c_node.type == tree.XML_PI_NODE: - */ - __Pyx_TraceLine(91,0,__PYX_ERR(6, 91, __pyx_L1_error)) case XML_ENTITY_NODE: /* "src/lxml/readonlytree.pxi":92 @@ -90039,14 +84664,13 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_2__repr__(struct __pyx_o * elif self._c_node.type == tree.XML_PI_NODE: * text = self.text */ - __Pyx_TraceLine(92,0,__PYX_ERR(6, 92, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->_c_node->name); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_f_4lxml_5etree_strrepr(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 92, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyString_FormatSafe(__pyx_kp_s_s_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; @@ -90061,15 +84685,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_2__repr__(struct __pyx_o * elif self._c_node.type == tree.XML_PI_NODE: */ break; - - /* "src/lxml/readonlytree.pxi":93 - * elif self._c_node.type == tree.XML_ENTITY_NODE: - * return "&%s;" % strrepr(funicode(self._c_node.name)) - * elif self._c_node.type == tree.XML_PI_NODE: # <<<<<<<<<<<<<< - * text = self.text - * if text: - */ - __Pyx_TraceLine(93,0,__PYX_ERR(6, 93, __pyx_L1_error)) case XML_PI_NODE: /* "src/lxml/readonlytree.pxi":94 @@ -90079,7 +84694,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_2__repr__(struct __pyx_o * if text: * return "" % (strrepr(self.target), text) */ - __Pyx_TraceLine(94,0,__PYX_ERR(6, 94, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_text); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_text = __pyx_t_2; @@ -90092,7 +84706,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_2__repr__(struct __pyx_o * return "" % (strrepr(self.target), text) * else: */ - __Pyx_TraceLine(95,0,__PYX_ERR(6, 95, __pyx_L1_error)) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_text); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(6, 95, __pyx_L1_error) if (__pyx_t_5) { @@ -90103,7 +84716,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_2__repr__(struct __pyx_o * else: * return "" % strrepr(self.target) */ - __Pyx_TraceLine(96,0,__PYX_ERR(6, 96, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_target); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -90141,7 +84753,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_2__repr__(struct __pyx_o * else: * self._raise_unsupported_type() */ - __Pyx_TraceLine(98,0,__PYX_ERR(6, 98, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_target); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 98, __pyx_L1_error) @@ -90149,7 +84760,7 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_2__repr__(struct __pyx_o __pyx_t_2 = __pyx_f_4lxml_5etree_strrepr(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_2, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 98, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_FormatSafe(__pyx_kp_s_s_2, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_4; @@ -90174,7 +84785,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_2__repr__(struct __pyx_o * * def __getitem__(self, x): */ - __Pyx_TraceLine(100,0,__PYX_ERR(6, 100, __pyx_L1_error)) __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, 100, __pyx_L1_error) break; } @@ -90199,7 +84809,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_2__repr__(struct __pyx_o __pyx_L0:; __Pyx_XDECREF(__pyx_v_text); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -90238,7 +84847,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py _node_to_node_function __pyx_v_next_element; PyObject *__pyx_v_result = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -90248,7 +84856,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py int __pyx_t_6; Py_ssize_t __pyx_t_7; __Pyx_RefNannySetupContext("__getitem__", 0); - __Pyx_TraceCall("__getitem__", __pyx_f[6], 102, 0, __PYX_ERR(6, 102, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":106 * slice. @@ -90257,7 +84864,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py * cdef Py_ssize_t step = 0, slicelength = 0 * cdef Py_ssize_t c, i */ - __Pyx_TraceLine(106,0,__PYX_ERR(6, 106, __pyx_L1_error)) __pyx_v_c_node = NULL; /* "src/lxml/readonlytree.pxi":107 @@ -90267,7 +84873,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py * cdef Py_ssize_t c, i * cdef _node_to_node_function next_element */ - __Pyx_TraceLine(107,0,__PYX_ERR(6, 107, __pyx_L1_error)) __pyx_v_step = 0; __pyx_v_slicelength = 0; @@ -90278,7 +84883,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py * if isinstance(x, slice): * # slicing */ - __Pyx_TraceLine(111,0,__PYX_ERR(6, 111, __pyx_L1_error)) __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, 111, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":112 @@ -90288,7 +84892,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py * # slicing * if _isFullSlice(x): */ - __Pyx_TraceLine(112,0,__PYX_ERR(6, 112, __pyx_L1_error)) __pyx_t_2 = PySlice_Check(__pyx_v_x); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -90300,7 +84903,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py * return _collectChildren(self) * _findChildSlice(x, self._c_node, &c_node, &step, &slicelength) */ - __Pyx_TraceLine(114,0,__PYX_ERR(6, 114, __pyx_L1_error)) __pyx_t_3 = __pyx_f_4lxml_5etree__isFullSlice(((PyObject*)__pyx_v_x)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(6, 114, __pyx_L1_error) __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { @@ -90312,7 +84914,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py * _findChildSlice(x, self._c_node, &c_node, &step, &slicelength) * if c_node is NULL: */ - __Pyx_TraceLine(115,0,__PYX_ERR(6, 115, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); if (!(likely(((((PyObject *)__pyx_v_self)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(6, 115, __pyx_L1_error) __pyx_t_4 = __pyx_f_4lxml_5etree__collectChildren(((struct LxmlElement *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 115, __pyx_L1_error) @@ -90337,7 +84938,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py * if c_node is NULL: * return [] */ - __Pyx_TraceLine(116,0,__PYX_ERR(6, 116, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__findChildSlice(((PyObject*)__pyx_v_x), __pyx_v_self->_c_node, (&__pyx_v_c_node), (&__pyx_v_step), (&__pyx_v_slicelength)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 116, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":117 @@ -90347,7 +84947,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py * return [] * if step > 0: */ - __Pyx_TraceLine(117,0,__PYX_ERR(6, 117, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_2) { @@ -90358,7 +84957,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py * if step > 0: * next_element = _nextElement */ - __Pyx_TraceLine(118,0,__PYX_ERR(6, 118, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -90382,7 +84980,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py * next_element = _nextElement * else: */ - __Pyx_TraceLine(119,0,__PYX_ERR(6, 119, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_step > 0) != 0); if (__pyx_t_2) { @@ -90393,7 +84990,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py * else: * step = -step */ - __Pyx_TraceLine(120,0,__PYX_ERR(6, 120, __pyx_L1_error)) __pyx_v_next_element = __pyx_f_4lxml_5etree__nextElement; /* "src/lxml/readonlytree.pxi":119 @@ -90413,7 +85009,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py * next_element = _previousElement * result = [] */ - __Pyx_TraceLine(122,0,__PYX_ERR(6, 122, __pyx_L1_error)) /*else*/ { __pyx_v_step = (-__pyx_v_step); @@ -90424,7 +85019,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py * result = [] * c = 0 */ - __Pyx_TraceLine(123,0,__PYX_ERR(6, 123, __pyx_L1_error)) __pyx_v_next_element = __pyx_f_4lxml_5etree__previousElement; } __pyx_L6:; @@ -90436,7 +85030,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py * c = 0 * while c_node is not NULL and c < slicelength: */ - __Pyx_TraceLine(124,0,__PYX_ERR(6, 124, __pyx_L1_error)) __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_result = ((PyObject*)__pyx_t_4); @@ -90449,7 +85042,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py * while c_node is not NULL and c < slicelength: * result.append(_newReadOnlyProxy(self._source_proxy, c_node)) */ - __Pyx_TraceLine(125,0,__PYX_ERR(6, 125, __pyx_L1_error)) __pyx_v_c = 0; /* "src/lxml/readonlytree.pxi":126 @@ -90459,7 +85051,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py * result.append(_newReadOnlyProxy(self._source_proxy, c_node)) * result.append(_elementFactory(self._doc, c_node)) */ - __Pyx_TraceLine(126,0,__PYX_ERR(6, 126, __pyx_L1_error)) while (1) { __pyx_t_3 = ((__pyx_v_c_node != NULL) != 0); if (__pyx_t_3) { @@ -90479,7 +85070,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py * result.append(_elementFactory(self._doc, c_node)) * c = c + 1 */ - __Pyx_TraceLine(127,0,__PYX_ERR(6, 127, __pyx_L1_error)) __pyx_t_4 = ((PyObject *)__pyx_v_self->_source_proxy); __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_5etree__newReadOnlyProxy(((struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *)__pyx_t_4), __pyx_v_c_node)); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 127, __pyx_L1_error) @@ -90495,7 +85085,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py * c = c + 1 * for i from 0 <= i < step: */ - __Pyx_TraceLine(128,0,__PYX_ERR(6, 128, __pyx_L1_error)) __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_doc); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_5etree__Document))))) __PYX_ERR(6, 128, __pyx_L1_error) @@ -90512,7 +85101,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py * for i from 0 <= i < step: * c_node = next_element(c_node) */ - __Pyx_TraceLine(129,0,__PYX_ERR(6, 129, __pyx_L1_error)) __pyx_v_c = (__pyx_v_c + 1); /* "src/lxml/readonlytree.pxi":130 @@ -90522,7 +85110,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py * c_node = next_element(c_node) * return result */ - __Pyx_TraceLine(130,0,__PYX_ERR(6, 130, __pyx_L1_error)) __pyx_t_7 = __pyx_v_step; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { @@ -90533,7 +85120,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py * return result * else: */ - __Pyx_TraceLine(131,0,__PYX_ERR(6, 131, __pyx_L1_error)) __pyx_v_c_node = __pyx_v_next_element(__pyx_v_c_node); } } @@ -90545,7 +85131,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py * else: * # indexing */ - __Pyx_TraceLine(132,0,__PYX_ERR(6, 132, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; @@ -90567,7 +85152,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py * if c_node is NULL: * raise IndexError, u"list index out of range" */ - __Pyx_TraceLine(135,0,__PYX_ERR(6, 135, __pyx_L1_error)) /*else*/ { __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_x); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(6, 135, __pyx_L1_error) __pyx_v_c_node = __pyx_f_4lxml_5etree__findChild(__pyx_v_self->_c_node, __pyx_t_7); @@ -90579,7 +85163,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py * raise IndexError, u"list index out of range" * return _newReadOnlyProxy(self._source_proxy, c_node) */ - __Pyx_TraceLine(136,0,__PYX_ERR(6, 136, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node == NULL) != 0); if (unlikely(__pyx_t_2)) { @@ -90590,7 +85173,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py * return _newReadOnlyProxy(self._source_proxy, c_node) * */ - __Pyx_TraceLine(137,0,__PYX_ERR(6, 137, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_IndexError, __pyx_kp_u_list_index_out_of_range, 0, 0); __PYX_ERR(6, 137, __pyx_L1_error) @@ -90610,7 +85192,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py * * def __len__(self): */ - __Pyx_TraceLine(138,0,__PYX_ERR(6, 138, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_4 = ((PyObject *)__pyx_v_self->_source_proxy); __Pyx_INCREF(__pyx_t_4); @@ -90639,7 +85220,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4__getitem__(struct __py __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -90673,13 +85253,11 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_14_ReadOnlyProxy_6__len__(struct __pyx_o Py_ssize_t __pyx_v_c; xmlNode *__pyx_v_c_node; Py_ssize_t __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlNode *__pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("__len__", 0); - __Pyx_TraceCall("__len__", __pyx_f[6], 140, 0, __PYX_ERR(6, 140, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":145 * cdef Py_ssize_t c @@ -90688,7 +85266,6 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_14_ReadOnlyProxy_6__len__(struct __pyx_o * c = 0 * c_node = self._c_node.children */ - __Pyx_TraceLine(145,0,__PYX_ERR(6, 145, __pyx_L1_error)) __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, 145, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":146 @@ -90698,7 +85275,6 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_14_ReadOnlyProxy_6__len__(struct __pyx_o * c_node = self._c_node.children * while c_node is not NULL: */ - __Pyx_TraceLine(146,0,__PYX_ERR(6, 146, __pyx_L1_error)) __pyx_v_c = 0; /* "src/lxml/readonlytree.pxi":147 @@ -90708,7 +85284,6 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_14_ReadOnlyProxy_6__len__(struct __pyx_o * while c_node is not NULL: * if tree._isElement(c_node): */ - __Pyx_TraceLine(147,0,__PYX_ERR(6, 147, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_c_node->children; __pyx_v_c_node = __pyx_t_2; @@ -90719,7 +85294,6 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_14_ReadOnlyProxy_6__len__(struct __pyx_o * if tree._isElement(c_node): * c = c + 1 */ - __Pyx_TraceLine(148,0,__PYX_ERR(6, 148, __pyx_L1_error)) while (1) { __pyx_t_3 = ((__pyx_v_c_node != NULL) != 0); if (!__pyx_t_3) break; @@ -90731,7 +85305,6 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_14_ReadOnlyProxy_6__len__(struct __pyx_o * c = c + 1 * c_node = c_node.next */ - __Pyx_TraceLine(149,0,__PYX_ERR(6, 149, __pyx_L1_error)) __pyx_t_3 = (_isElement(__pyx_v_c_node) != 0); if (__pyx_t_3) { @@ -90742,7 +85315,6 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_14_ReadOnlyProxy_6__len__(struct __pyx_o * c_node = c_node.next * return c */ - __Pyx_TraceLine(150,0,__PYX_ERR(6, 150, __pyx_L1_error)) __pyx_v_c = (__pyx_v_c + 1); /* "src/lxml/readonlytree.pxi":149 @@ -90761,7 +85333,6 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_14_ReadOnlyProxy_6__len__(struct __pyx_o * return c * */ - __Pyx_TraceLine(151,0,__PYX_ERR(6, 151, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->next; __pyx_v_c_node = __pyx_t_2; } @@ -90773,7 +85344,6 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_14_ReadOnlyProxy_6__len__(struct __pyx_o * * def __nonzero__(self): */ - __Pyx_TraceLine(152,0,__PYX_ERR(6, 152, __pyx_L1_error)) __pyx_r = __pyx_v_c; goto __pyx_L0; @@ -90790,7 +85360,6 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_14_ReadOnlyProxy_6__len__(struct __pyx_o __Pyx_AddTraceback("lxml.etree._ReadOnlyProxy.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -90819,11 +85388,9 @@ static int __pyx_pw_4lxml_5etree_14_ReadOnlyProxy_9__nonzero__(PyObject *__pyx_v static int __pyx_pf_4lxml_5etree_14_ReadOnlyProxy_8__nonzero__(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_v_self) { xmlNode *__pyx_v_c_node; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__nonzero__", 0); - __Pyx_TraceCall("__nonzero__", __pyx_f[6], 154, 0, __PYX_ERR(6, 154, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":156 * def __nonzero__(self): @@ -90832,7 +85399,6 @@ static int __pyx_pf_4lxml_5etree_14_ReadOnlyProxy_8__nonzero__(struct __pyx_obj_ * c_node = _findChildBackwards(self._c_node, 0) * return c_node != NULL */ - __Pyx_TraceLine(156,0,__PYX_ERR(6, 156, __pyx_L1_error)) __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, 156, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":157 @@ -90842,7 +85408,6 @@ static int __pyx_pf_4lxml_5etree_14_ReadOnlyProxy_8__nonzero__(struct __pyx_obj_ * return c_node != NULL * */ - __Pyx_TraceLine(157,0,__PYX_ERR(6, 157, __pyx_L1_error)) __pyx_v_c_node = __pyx_f_4lxml_5etree__findChildBackwards(__pyx_v_self->_c_node, 0); /* "src/lxml/readonlytree.pxi":158 @@ -90852,7 +85417,6 @@ static int __pyx_pf_4lxml_5etree_14_ReadOnlyProxy_8__nonzero__(struct __pyx_obj_ * * def __deepcopy__(self, memo): */ - __Pyx_TraceLine(158,0,__PYX_ERR(6, 158, __pyx_L1_error)) __pyx_r = (__pyx_v_c_node != NULL); goto __pyx_L0; @@ -90869,7 +85433,6 @@ static int __pyx_pf_4lxml_5etree_14_ReadOnlyProxy_8__nonzero__(struct __pyx_obj_ __Pyx_AddTraceback("lxml.etree._ReadOnlyProxy.__nonzero__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -90899,12 +85462,9 @@ static PyObject *__pyx_pw_4lxml_5etree_14_ReadOnlyProxy_11__deepcopy__(PyObject static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_10__deepcopy__(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_memo) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__192) __Pyx_RefNannySetupContext("__deepcopy__", 0); - __Pyx_TraceCall("__deepcopy__", __pyx_f[6], 160, 0, __PYX_ERR(6, 160, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":162 * def __deepcopy__(self, memo): @@ -90913,7 +85473,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_10__deepcopy__(struct __ * * cpdef __copy__(self): */ - __Pyx_TraceLine(162,0,__PYX_ERR(6, 162, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy *)__pyx_v_self->__pyx_vtab)->__pyx___copy__(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -90936,7 +85495,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_10__deepcopy__(struct __ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -90956,7 +85514,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy___copy__(struct __pyx_obj struct LxmlDocument *__pyx_v_new_doc = 0; PyObject *__pyx_v_root = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -90966,42 +85523,53 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy___copy__(struct __pyx_obj xmlDoc *__pyx_t_6; int __pyx_t_7; xmlNode *__pyx_t_8; - __Pyx_TraceFrameInit(__pyx_codeobj__193) __Pyx_RefNannySetupContext("__copy__", 0); - __Pyx_TraceCall("__copy__", __pyx_f[6], 164, 0, __PYX_ERR(6, 164, __pyx_L1_error)); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 164, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4lxml_5etree_14_ReadOnlyProxy_13__copy__)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); + 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 + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 164, __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_14_ReadOnlyProxy_13__copy__)) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } } + __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(6, 164, __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; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 164, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 164, __pyx_L1_error) + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; } - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } /* "src/lxml/readonlytree.pxi":169 @@ -91011,7 +85579,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy___copy__(struct __pyx_obj * return self * c_doc = _copyDocRoot(self._c_node.doc, self._c_node) # recursive */ - __Pyx_TraceLine(169,0,__PYX_ERR(6, 169, __pyx_L1_error)) __pyx_t_5 = ((__pyx_v_self->_c_node == NULL) != 0); if (__pyx_t_5) { @@ -91022,7 +85589,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy___copy__(struct __pyx_obj * c_doc = _copyDocRoot(self._c_node.doc, self._c_node) # recursive * new_doc = _documentFactory(c_doc, None) */ - __Pyx_TraceLine(170,0,__PYX_ERR(6, 170, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); @@ -91044,7 +85610,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy___copy__(struct __pyx_obj * new_doc = _documentFactory(c_doc, None) * root = new_doc.getroot() */ - __Pyx_TraceLine(171,0,__PYX_ERR(6, 171, __pyx_L1_error)) __pyx_t_6 = __pyx_f_4lxml_5etree__copyDocRoot(__pyx_v_self->_c_node->doc, __pyx_v_self->_c_node); if (unlikely(__pyx_t_6 == ((xmlDoc *)NULL))) __PYX_ERR(6, 171, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_6; @@ -91055,7 +85620,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy___copy__(struct __pyx_obj * root = new_doc.getroot() * if root is not None: */ - __Pyx_TraceLine(172,0,__PYX_ERR(6, 172, __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(6, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_new_doc = ((struct LxmlDocument *)__pyx_t_1); @@ -91068,7 +85632,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy___copy__(struct __pyx_obj * if root is not None: * return root */ - __Pyx_TraceLine(173,0,__PYX_ERR(6, 173, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_9_Document_getroot(__pyx_v_new_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_root = __pyx_t_1; @@ -91081,7 +85644,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy___copy__(struct __pyx_obj * return root * # Comment/PI */ - __Pyx_TraceLine(174,0,__PYX_ERR(6, 174, __pyx_L1_error)) __pyx_t_5 = (__pyx_v_root != Py_None); __pyx_t_7 = (__pyx_t_5 != 0); if (__pyx_t_7) { @@ -91093,7 +85655,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy___copy__(struct __pyx_obj * # Comment/PI * c_node = c_doc.children */ - __Pyx_TraceLine(175,0,__PYX_ERR(6, 175, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_root); __pyx_r = __pyx_v_root; @@ -91115,7 +85676,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy___copy__(struct __pyx_obj * while c_node is not NULL and c_node.type != self._c_node.type: * c_node = c_node.next */ - __Pyx_TraceLine(177,0,__PYX_ERR(6, 177, __pyx_L1_error)) __pyx_t_8 = __pyx_v_c_doc->children; __pyx_v_c_node = __pyx_t_8; @@ -91126,7 +85686,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy___copy__(struct __pyx_obj * c_node = c_node.next * if c_node is NULL: */ - __Pyx_TraceLine(178,0,__PYX_ERR(6, 178, __pyx_L1_error)) while (1) { __pyx_t_5 = ((__pyx_v_c_node != NULL) != 0); if (__pyx_t_5) { @@ -91146,7 +85705,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy___copy__(struct __pyx_obj * if c_node is NULL: * return None */ - __Pyx_TraceLine(179,0,__PYX_ERR(6, 179, __pyx_L1_error)) __pyx_t_8 = __pyx_v_c_node->next; __pyx_v_c_node = __pyx_t_8; } @@ -91158,7 +85716,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy___copy__(struct __pyx_obj * return None * return _elementFactory(new_doc, c_node) */ - __Pyx_TraceLine(180,0,__PYX_ERR(6, 180, __pyx_L1_error)) __pyx_t_7 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_7) { @@ -91169,7 +85726,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy___copy__(struct __pyx_obj * return _elementFactory(new_doc, c_node) * */ - __Pyx_TraceLine(181,0,__PYX_ERR(6, 181, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -91190,7 +85746,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy___copy__(struct __pyx_obj * * def __iter__(self): */ - __Pyx_TraceLine(182,0,__PYX_ERR(6, 182, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(__pyx_v_new_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -91218,7 +85773,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy___copy__(struct __pyx_obj __Pyx_XDECREF((PyObject *)__pyx_v_new_doc); __Pyx_XDECREF(__pyx_v_root); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -91240,12 +85794,9 @@ static PyObject *__pyx_pw_4lxml_5etree_14_ReadOnlyProxy_13__copy__(PyObject *__p static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_12__copy__(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__193) __Pyx_RefNannySetupContext("__copy__", 0); - __Pyx_TraceCall("__copy__ (wrapper)", __pyx_f[6], 164, 0, __PYX_ERR(6, 164, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4lxml_5etree_14_ReadOnlyProxy___copy__(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -91260,7 +85811,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_12__copy__(struct __pyx_ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -91288,12 +85838,10 @@ static PyObject *__pyx_pw_4lxml_5etree_14_ReadOnlyProxy_15__iter__(PyObject *__p static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_14__iter__(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__iter__", 0); - __Pyx_TraceCall("__iter__", __pyx_f[6], 184, 0, __PYX_ERR(6, 184, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":185 * @@ -91302,7 +85850,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_14__iter__(struct __pyx_ * * def iterchildren(self, tag=None, *, reversed=False): */ - __Pyx_TraceLine(185,0,__PYX_ERR(6, 185, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy *)__pyx_v_self->__pyx_vtab)->getchildren(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -91329,7 +85876,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_14__iter__(struct __pyx_ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -91345,7 +85891,7 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_14__iter__(struct __pyx_ /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_14_ReadOnlyProxy_17iterchildren(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_14_ReadOnlyProxy_16iterchildren[] = "iterchildren(self, tag=None, reversed=False)\n\n Iterate over the children of this element.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_14_ReadOnlyProxy_17iterchildren = {"iterchildren", (PyCFunction)__pyx_pw_4lxml_5etree_14_ReadOnlyProxy_17iterchildren, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_14_ReadOnlyProxy_16iterchildren}; +static PyMethodDef __pyx_mdef_4lxml_5etree_14_ReadOnlyProxy_17iterchildren = {"iterchildren", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_14_ReadOnlyProxy_17iterchildren, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_14_ReadOnlyProxy_16iterchildren}; static PyObject *__pyx_pw_4lxml_5etree_14_ReadOnlyProxy_17iterchildren(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tag = 0; PyObject *__pyx_v_reversed = 0; @@ -91412,7 +85958,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_16iterchildren(struct __ PyObject *__pyx_v_children = NULL; PyObject *__pyx_v_el = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -91423,9 +85968,7 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_16iterchildren(struct __ PyObject *(*__pyx_t_7)(PyObject *); PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__194) __Pyx_RefNannySetupContext("iterchildren", 0); - __Pyx_TraceCall("iterchildren", __pyx_f[6], 187, 0, __PYX_ERR(6, 187, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":192 * Iterate over the children of this element. @@ -91434,7 +85977,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_16iterchildren(struct __ * if tag is not None and tag != '*': * children = [ el for el in children if el.tag == tag ] */ - __Pyx_TraceLine(192,0,__PYX_ERR(6, 192, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy *)__pyx_v_self->__pyx_vtab)->getchildren(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_children = __pyx_t_1; @@ -91447,7 +85989,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_16iterchildren(struct __ * children = [ el for el in children if el.tag == tag ] * if reversed: */ - __Pyx_TraceLine(193,0,__PYX_ERR(6, 193, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_tag != Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { @@ -91455,7 +85996,7 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_16iterchildren(struct __ __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_tag, __pyx_kp_s__160, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(6, 193, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_tag, __pyx_kp_s__40, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(6, 193, __pyx_L1_error) __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { @@ -91467,7 +86008,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_16iterchildren(struct __ * if reversed: * children = children[::-1] */ - __Pyx_TraceLine(194,0,__PYX_ERR(6, 194, __pyx_L1_error)) __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_v_children)) || PyTuple_CheckExact(__pyx_v_children)) { @@ -91541,7 +86081,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_16iterchildren(struct __ * children = children[::-1] * return iter(children) */ - __Pyx_TraceLine(195,0,__PYX_ERR(6, 195, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_reversed); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(6, 195, __pyx_L1_error) if (__pyx_t_2) { @@ -91552,8 +86091,7 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_16iterchildren(struct __ * return iter(children) * */ - __Pyx_TraceLine(196,0,__PYX_ERR(6, 196, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_children, __pyx_slice__195); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 196, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_children, __pyx_slice__50); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_children, __pyx_t_1); __pyx_t_1 = 0; @@ -91574,7 +86112,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_16iterchildren(struct __ * * cpdef getchildren(self): */ - __Pyx_TraceLine(197,0,__PYX_ERR(6, 197, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyObject_GetIter(__pyx_v_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -91602,7 +86139,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_16iterchildren(struct __ __Pyx_XDECREF(__pyx_v_children); __Pyx_XDECREF(__pyx_v_el); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -91620,7 +86156,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy_getchildren(struct __pyx_ xmlNode *__pyx_v_c_node; PyObject *__pyx_v_result = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -91630,42 +86165,53 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy_getchildren(struct __pyx_ xmlNode *__pyx_t_6; int __pyx_t_7; int __pyx_t_8; - __Pyx_TraceFrameInit(__pyx_codeobj__196) __Pyx_RefNannySetupContext("getchildren", 0); - __Pyx_TraceCall("getchildren", __pyx_f[6], 199, 0, __PYX_ERR(6, 199, __pyx_L1_error)); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getchildren); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 199, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4lxml_5etree_14_ReadOnlyProxy_19getchildren)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); + 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 + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getchildren); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 199, __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_14_ReadOnlyProxy_19getchildren)) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } } + __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(6, 199, __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; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 199, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 199, __pyx_L1_error) + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; } - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } /* "src/lxml/readonlytree.pxi":205 @@ -91675,7 +86221,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy_getchildren(struct __pyx_ * result = [] * c_node = self._c_node.children */ - __Pyx_TraceLine(205,0,__PYX_ERR(6, 205, __pyx_L1_error)) __pyx_t_5 = ((struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy *)__pyx_v_self->__pyx_vtab)->_assertNode(__pyx_v_self); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(6, 205, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":206 @@ -91685,7 +86230,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy_getchildren(struct __pyx_ * c_node = self._c_node.children * while c_node is not NULL: */ - __Pyx_TraceLine(206,0,__PYX_ERR(6, 206, __pyx_L1_error)) __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((PyObject*)__pyx_t_1); @@ -91698,7 +86242,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy_getchildren(struct __pyx_ * while c_node is not NULL: * if tree._isElement(c_node): */ - __Pyx_TraceLine(207,0,__PYX_ERR(6, 207, __pyx_L1_error)) __pyx_t_6 = __pyx_v_self->_c_node->children; __pyx_v_c_node = __pyx_t_6; @@ -91709,7 +86252,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy_getchildren(struct __pyx_ * if tree._isElement(c_node): * result.append(_newReadOnlyProxy(self._source_proxy, c_node)) */ - __Pyx_TraceLine(208,0,__PYX_ERR(6, 208, __pyx_L1_error)) while (1) { __pyx_t_7 = ((__pyx_v_c_node != NULL) != 0); if (!__pyx_t_7) break; @@ -91721,7 +86263,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy_getchildren(struct __pyx_ * result.append(_newReadOnlyProxy(self._source_proxy, c_node)) * c_node = c_node.next */ - __Pyx_TraceLine(209,0,__PYX_ERR(6, 209, __pyx_L1_error)) __pyx_t_7 = (_isElement(__pyx_v_c_node) != 0); if (__pyx_t_7) { @@ -91732,7 +86273,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy_getchildren(struct __pyx_ * c_node = c_node.next * return result */ - __Pyx_TraceLine(210,0,__PYX_ERR(6, 210, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_v_self->_source_proxy); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__newReadOnlyProxy(((struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *)__pyx_t_1), __pyx_v_c_node)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 210, __pyx_L1_error) @@ -91757,7 +86297,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy_getchildren(struct __pyx_ * return result * */ - __Pyx_TraceLine(211,0,__PYX_ERR(6, 211, __pyx_L1_error)) __pyx_t_6 = __pyx_v_c_node->next; __pyx_v_c_node = __pyx_t_6; } @@ -91769,7 +86308,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy_getchildren(struct __pyx_ * * def getparent(self): */ - __Pyx_TraceLine(212,0,__PYX_ERR(6, 212, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; @@ -91794,7 +86332,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy_getchildren(struct __pyx_ __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -91816,12 +86353,9 @@ static PyObject *__pyx_pw_4lxml_5etree_14_ReadOnlyProxy_19getchildren(PyObject * static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_18getchildren(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__196) __Pyx_RefNannySetupContext("getchildren", 0); - __Pyx_TraceCall("getchildren (wrapper)", __pyx_f[6], 199, 0, __PYX_ERR(6, 199, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4lxml_5etree_14_ReadOnlyProxy_getchildren(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -91836,7 +86370,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_18getchildren(struct __p __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -91867,7 +86400,6 @@ static PyObject *__pyx_pw_4lxml_5etree_14_ReadOnlyProxy_21getparent(PyObject *__ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_20getparent(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_v_self) { xmlNode *__pyx_v_c_parent; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlNode *__pyx_t_2; @@ -91875,9 +86407,7 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_20getparent(struct __pyx int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__197) __Pyx_RefNannySetupContext("getparent", 0); - __Pyx_TraceCall("getparent", __pyx_f[6], 214, 0, __PYX_ERR(6, 214, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":218 * """ @@ -91886,7 +86416,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_20getparent(struct __pyx * c_parent = self._c_node.parent * if c_parent is NULL or not tree._isElement(c_parent): */ - __Pyx_TraceLine(218,0,__PYX_ERR(6, 218, __pyx_L1_error)) __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, 218, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":219 @@ -91896,7 +86425,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_20getparent(struct __pyx * if c_parent is NULL or not tree._isElement(c_parent): * return None */ - __Pyx_TraceLine(219,0,__PYX_ERR(6, 219, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_c_node->parent; __pyx_v_c_parent = __pyx_t_2; @@ -91907,7 +86435,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_20getparent(struct __pyx * return None * else: */ - __Pyx_TraceLine(220,0,__PYX_ERR(6, 220, __pyx_L1_error)) __pyx_t_4 = ((__pyx_v_c_parent == NULL) != 0); if (!__pyx_t_4) { } else { @@ -91926,7 +86453,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_20getparent(struct __pyx * else: * return _newReadOnlyProxy(self._source_proxy, c_parent) */ - __Pyx_TraceLine(221,0,__PYX_ERR(6, 221, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -91947,7 +86473,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_20getparent(struct __pyx * * def getnext(self): */ - __Pyx_TraceLine(223,0,__PYX_ERR(6, 223, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_5 = ((PyObject *)__pyx_v_self->_source_proxy); @@ -91976,7 +86501,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_20getparent(struct __pyx __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -92007,15 +86531,12 @@ static PyObject *__pyx_pw_4lxml_5etree_14_ReadOnlyProxy_23getnext(PyObject *__py static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_22getnext(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_v_self) { xmlNode *__pyx_v_c_node; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__198) __Pyx_RefNannySetupContext("getnext", 0); - __Pyx_TraceCall("getnext", __pyx_f[6], 225, 0, __PYX_ERR(6, 225, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":229 * """ @@ -92024,7 +86545,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_22getnext(struct __pyx_o * c_node = _nextElement(self._c_node) * if c_node is not NULL: */ - __Pyx_TraceLine(229,0,__PYX_ERR(6, 229, __pyx_L1_error)) __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, 229, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":230 @@ -92034,7 +86554,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_22getnext(struct __pyx_o * if c_node is not NULL: * return _newReadOnlyProxy(self._source_proxy, c_node) */ - __Pyx_TraceLine(230,0,__PYX_ERR(6, 230, __pyx_L1_error)) __pyx_v_c_node = __pyx_f_4lxml_5etree__nextElement(__pyx_v_self->_c_node); /* "src/lxml/readonlytree.pxi":231 @@ -92044,7 +86563,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_22getnext(struct __pyx_o * return _newReadOnlyProxy(self._source_proxy, c_node) * return None */ - __Pyx_TraceLine(231,0,__PYX_ERR(6, 231, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node != NULL) != 0); if (__pyx_t_2) { @@ -92055,7 +86573,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_22getnext(struct __pyx_o * return None * */ - __Pyx_TraceLine(232,0,__PYX_ERR(6, 232, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_3 = ((PyObject *)__pyx_v_self->_source_proxy); __Pyx_INCREF(__pyx_t_3); @@ -92082,7 +86599,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_22getnext(struct __pyx_o * * def getprevious(self): */ - __Pyx_TraceLine(233,0,__PYX_ERR(6, 233, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -92103,7 +86619,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_22getnext(struct __pyx_o __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -92134,15 +86649,12 @@ static PyObject *__pyx_pw_4lxml_5etree_14_ReadOnlyProxy_25getprevious(PyObject * static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_24getprevious(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_v_self) { xmlNode *__pyx_v_c_node; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__199) __Pyx_RefNannySetupContext("getprevious", 0); - __Pyx_TraceCall("getprevious", __pyx_f[6], 235, 0, __PYX_ERR(6, 235, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":239 * """ @@ -92151,7 +86663,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_24getprevious(struct __p * c_node = _previousElement(self._c_node) * if c_node is not NULL: */ - __Pyx_TraceLine(239,0,__PYX_ERR(6, 239, __pyx_L1_error)) __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, 239, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":240 @@ -92161,7 +86672,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_24getprevious(struct __p * if c_node is not NULL: * return _newReadOnlyProxy(self._source_proxy, c_node) */ - __Pyx_TraceLine(240,0,__PYX_ERR(6, 240, __pyx_L1_error)) __pyx_v_c_node = __pyx_f_4lxml_5etree__previousElement(__pyx_v_self->_c_node); /* "src/lxml/readonlytree.pxi":241 @@ -92171,7 +86681,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_24getprevious(struct __p * return _newReadOnlyProxy(self._source_proxy, c_node) * return None */ - __Pyx_TraceLine(241,0,__PYX_ERR(6, 241, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node != NULL) != 0); if (__pyx_t_2) { @@ -92182,7 +86691,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_24getprevious(struct __p * return None * */ - __Pyx_TraceLine(242,0,__PYX_ERR(6, 242, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_3 = ((PyObject *)__pyx_v_self->_source_proxy); __Pyx_INCREF(__pyx_t_3); @@ -92209,7 +86717,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_24getprevious(struct __p * * */ - __Pyx_TraceLine(243,0,__PYX_ERR(6, 243, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -92230,7 +86737,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_24getprevious(struct __p __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -92258,12 +86764,10 @@ static PyObject *__pyx_pw_4lxml_5etree_16_ReadOnlyPIProxy_6target_1__get__(PyObj static PyObject *__pyx_pf_4lxml_5etree_16_ReadOnlyPIProxy_6target___get__(struct __pyx_obj_4lxml_5etree__ReadOnlyPIProxy *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[6], 251, 0, __PYX_ERR(6, 251, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":252 * property target: @@ -92272,7 +86776,6 @@ static PyObject *__pyx_pf_4lxml_5etree_16_ReadOnlyPIProxy_6target___get__(struct * return funicode(self._c_node.name) * */ - __Pyx_TraceLine(252,0,__PYX_ERR(6, 252, __pyx_L1_error)) __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 @@ -92282,7 +86785,6 @@ static PyObject *__pyx_pf_4lxml_5etree_16_ReadOnlyPIProxy_6target___get__(struct * * @cython.final */ - __Pyx_TraceLine(253,0,__PYX_ERR(6, 253, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->__pyx_base._c_node->name); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -92305,7 +86807,6 @@ static PyObject *__pyx_pf_4lxml_5etree_16_ReadOnlyPIProxy_6target___get__(struct __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -92333,11 +86834,9 @@ static PyObject *__pyx_pw_4lxml_5etree_20_ReadOnlyEntityProxy_4name_1__get__(PyO static PyObject *__pyx_pf_4lxml_5etree_20_ReadOnlyEntityProxy_4name___get__(struct __pyx_obj_4lxml_5etree__ReadOnlyEntityProxy *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[6], 260, 0, __PYX_ERR(6, 260, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":261 * property name: @@ -92346,7 +86845,6 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ReadOnlyEntityProxy_4name___get__(stru * * def __set__(self, value): */ - __Pyx_TraceLine(261,0,__PYX_ERR(6, 261, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->__pyx_base._c_node->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -92369,7 +86867,6 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ReadOnlyEntityProxy_4name___get__(stru __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -92398,7 +86895,6 @@ static int __pyx_pw_4lxml_5etree_20_ReadOnlyEntityProxy_4name_3__set__(PyObject static int __pyx_pf_4lxml_5etree_20_ReadOnlyEntityProxy_4name_2__set__(struct __pyx_obj_4lxml_5etree__ReadOnlyEntityProxy *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_v_value_utf = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -92408,7 +86904,6 @@ static int __pyx_pf_4lxml_5etree_20_ReadOnlyEntityProxy_4name_2__set__(struct __ Py_UCS4 __pyx_t_6; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[6], 263, 0, __PYX_ERR(6, 263, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":264 * @@ -92417,7 +86912,6 @@ static int __pyx_pf_4lxml_5etree_20_ReadOnlyEntityProxy_4name_2__set__(struct __ * if u'&' in value or u';' in value: * raise ValueError(f"Invalid entity name '{value}'") */ - __Pyx_TraceLine(264,0,__PYX_ERR(6, 264, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_value_utf = ((PyObject*)__pyx_t_1); @@ -92430,15 +86924,14 @@ 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)) */ - __Pyx_TraceLine(265,0,__PYX_ERR(6, 265, __pyx_L1_error)) - __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__112, __pyx_v_value, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(6, 265, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__28, __pyx_v_value, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(6, 265, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); if (!__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } - __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__113, __pyx_v_value, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(6, 265, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__29, __pyx_v_value, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(6, 265, __pyx_L1_error) __pyx_t_3 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_3; __pyx_L4_bool_binop_done:; @@ -92451,7 +86944,6 @@ static int __pyx_pf_4lxml_5etree_20_ReadOnlyEntityProxy_4name_2__set__(struct __ * tree.xmlNodeSetName(self._c_node, _xcstr(value_utf)) * */ - __Pyx_TraceLine(266,0,__PYX_ERR(6, 266, __pyx_L1_error)) __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = 0; @@ -92467,10 +86959,10 @@ static int __pyx_pf_4lxml_5etree_20_ReadOnlyEntityProxy_4name_2__set__(struct __ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7); __pyx_t_7 = 0; - __Pyx_INCREF(__pyx_kp_u__60); + __Pyx_INCREF(__pyx_kp_u__21); __pyx_t_5 += 1; - __Pyx_GIVEREF(__pyx_kp_u__60); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__60); + __Pyx_GIVEREF(__pyx_kp_u__21); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__21); __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -92497,7 +86989,6 @@ static int __pyx_pf_4lxml_5etree_20_ReadOnlyEntityProxy_4name_2__set__(struct __ * * property text: */ - __Pyx_TraceLine(267,0,__PYX_ERR(6, 267, __pyx_L1_error)) xmlNodeSetName(__pyx_v_self->__pyx_base._c_node, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_value_utf)); /* "src/lxml/readonlytree.pxi":263 @@ -92518,7 +87009,6 @@ static int __pyx_pf_4lxml_5etree_20_ReadOnlyEntityProxy_4name_2__set__(struct __ __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_value_utf); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -92546,7 +87036,6 @@ static PyObject *__pyx_pw_4lxml_5etree_20_ReadOnlyEntityProxy_4text_1__get__(PyO static PyObject *__pyx_pf_4lxml_5etree_20_ReadOnlyEntityProxy_4text___get__(struct __pyx_obj_4lxml_5etree__ReadOnlyEntityProxy *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; @@ -92554,7 +87043,6 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ReadOnlyEntityProxy_4text___get__(stru PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[6], 270, 0, __PYX_ERR(6, 270, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":271 * property text: @@ -92563,16 +87051,15 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ReadOnlyEntityProxy_4text___get__(stru * * */ - __Pyx_TraceLine(271,0,__PYX_ERR(6, 271, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; - __Pyx_INCREF(__pyx_kp_u__112); + __Pyx_INCREF(__pyx_kp_u__28); __pyx_t_2 += 1; - __Pyx_GIVEREF(__pyx_kp_u__112); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__112); + __Pyx_GIVEREF(__pyx_kp_u__28); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__28); __pyx_t_4 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->__pyx_base._c_node->name); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 271, __pyx_L1_error) @@ -92583,10 +87070,10 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ReadOnlyEntityProxy_4text___get__(stru __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5); __pyx_t_5 = 0; - __Pyx_INCREF(__pyx_kp_u__113); + __Pyx_INCREF(__pyx_kp_u__29); __pyx_t_2 += 1; - __Pyx_GIVEREF(__pyx_kp_u__113); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__113); + __Pyx_GIVEREF(__pyx_kp_u__29); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__29); __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -92611,7 +87098,6 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ReadOnlyEntityProxy_4text___get__(stru __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -92639,13 +87125,11 @@ static PyObject *__pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_6attrib_1__get__( static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_6attrib___get__(struct __pyx_obj_4lxml_5etree__ReadOnlyElementProxy *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[6], 279, 0, __PYX_ERR(6, 279, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":280 * property attrib: @@ -92654,7 +87138,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_6attrib___get__(s * return dict(_collectAttributes(self._c_node, 3)) * */ - __Pyx_TraceLine(280,0,__PYX_ERR(6, 280, __pyx_L1_error)) __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 @@ -92664,7 +87147,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_6attrib___get__(s * * property prefix: */ - __Pyx_TraceLine(281,0,__PYX_ERR(6, 281, __pyx_L1_error)) __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) __Pyx_GOTREF(__pyx_t_2); @@ -92691,7 +87173,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_6attrib___get__(s __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -92719,13 +87200,11 @@ static PyObject *__pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_6prefix_1__get__( static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_6prefix___get__(struct __pyx_obj_4lxml_5etree__ReadOnlyElementProxy *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[6], 286, 0, __PYX_ERR(6, 286, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":287 * """ @@ -92734,7 +87213,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_6prefix___get__(s * if self._c_node.ns is not NULL: * if self._c_node.ns.prefix is not NULL: */ - __Pyx_TraceLine(287,0,__PYX_ERR(6, 287, __pyx_L1_error)) __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 @@ -92744,7 +87222,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_6prefix___get__(s * if self._c_node.ns.prefix is not NULL: * return funicode(self._c_node.ns.prefix) */ - __Pyx_TraceLine(288,0,__PYX_ERR(6, 288, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->__pyx_base._c_node->ns != NULL) != 0); if (__pyx_t_2) { @@ -92755,7 +87232,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_6prefix___get__(s * return funicode(self._c_node.ns.prefix) * return None */ - __Pyx_TraceLine(289,0,__PYX_ERR(6, 289, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->__pyx_base._c_node->ns->prefix != NULL) != 0); if (__pyx_t_2) { @@ -92766,7 +87242,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_6prefix___get__(s * return None * */ - __Pyx_TraceLine(290,0,__PYX_ERR(6, 290, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->__pyx_base._c_node->ns->prefix); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -92799,7 +87274,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_6prefix___get__(s * * def get(self, key, default=None): */ - __Pyx_TraceLine(291,0,__PYX_ERR(6, 291, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -92819,7 +87293,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_6prefix___get__(s __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -92835,7 +87308,7 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_6prefix___get__(s /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_1get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_21_ReadOnlyElementProxy_get[] = "Gets an element attribute.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_21_ReadOnlyElementProxy_1get = {"get", (PyCFunction)__pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_1get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_21_ReadOnlyElementProxy_get}; +static PyMethodDef __pyx_mdef_4lxml_5etree_21_ReadOnlyElementProxy_1get = {"get", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_1get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_21_ReadOnlyElementProxy_get}; static PyObject *__pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_1get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_key = 0; PyObject *__pyx_v_default = 0; @@ -92901,13 +87374,10 @@ static PyObject *__pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_1get(PyObject *__ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_get(struct __pyx_obj_4lxml_5etree__ReadOnlyElementProxy *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__200) __Pyx_RefNannySetupContext("get", 0); - __Pyx_TraceCall("get", __pyx_f[6], 293, 0, __PYX_ERR(6, 293, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":296 * u"""Gets an element attribute. @@ -92916,7 +87386,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_get(struct __pyx_ * return _getNodeAttributeValue(self._c_node, key, default) * */ - __Pyx_TraceLine(296,0,__PYX_ERR(6, 296, __pyx_L1_error)) __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, 296, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":297 @@ -92926,7 +87395,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_get(struct __pyx_ * * def keys(self): */ - __Pyx_TraceLine(297,0,__PYX_ERR(6, 297, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_4lxml_5etree__getNodeAttributeValue(__pyx_v_self->__pyx_base._c_node, __pyx_v_key, __pyx_v_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -92949,7 +87417,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_get(struct __pyx_ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -92979,13 +87446,10 @@ static PyObject *__pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_3keys(PyObject *_ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_2keys(struct __pyx_obj_4lxml_5etree__ReadOnlyElementProxy *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__201) __Pyx_RefNannySetupContext("keys", 0); - __Pyx_TraceCall("keys", __pyx_f[6], 299, 0, __PYX_ERR(6, 299, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":303 * arbitrary order (just like for an ordinary Python dictionary). @@ -92994,7 +87458,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_2keys(struct __py * return _collectAttributes(self._c_node, 1) * */ - __Pyx_TraceLine(303,0,__PYX_ERR(6, 303, __pyx_L1_error)) __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, 303, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":304 @@ -93004,7 +87467,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_2keys(struct __py * * def values(self): */ - __Pyx_TraceLine(304,0,__PYX_ERR(6, 304, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->__pyx_base._c_node, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -93027,7 +87489,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_2keys(struct __py __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -93057,13 +87518,10 @@ static PyObject *__pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_5values(PyObject static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_4values(struct __pyx_obj_4lxml_5etree__ReadOnlyElementProxy *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__202) __Pyx_RefNannySetupContext("values", 0); - __Pyx_TraceCall("values", __pyx_f[6], 306, 0, __PYX_ERR(6, 306, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":310 * in an arbitrary order. @@ -93072,7 +87530,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_4values(struct __ * return _collectAttributes(self._c_node, 2) * */ - __Pyx_TraceLine(310,0,__PYX_ERR(6, 310, __pyx_L1_error)) __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, 310, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":311 @@ -93082,7 +87539,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_4values(struct __ * * def items(self): */ - __Pyx_TraceLine(311,0,__PYX_ERR(6, 311, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->__pyx_base._c_node, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -93105,7 +87561,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_4values(struct __ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -93135,13 +87590,10 @@ static PyObject *__pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_7items(PyObject * static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_6items(struct __pyx_obj_4lxml_5etree__ReadOnlyElementProxy *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__203) __Pyx_RefNannySetupContext("items", 0); - __Pyx_TraceCall("items", __pyx_f[6], 313, 0, __PYX_ERR(6, 313, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":317 * in an arbitrary order. @@ -93150,7 +87602,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_6items(struct __p * return _collectAttributes(self._c_node, 3) * */ - __Pyx_TraceLine(317,0,__PYX_ERR(6, 317, __pyx_L1_error)) __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, 317, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":318 @@ -93160,7 +87611,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_6items(struct __p * * cdef _ReadOnlyProxy _newReadOnlyProxy( */ - __Pyx_TraceLine(318,0,__PYX_ERR(6, 318, __pyx_L1_error)) __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, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -93183,7 +87633,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_6items(struct __p __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -93199,12 +87648,10 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_6items(struct __p static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newReadOnlyProxy(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_v_source_proxy, xmlNode *__pyx_v_c_node) { struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_v_el = 0; struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_newReadOnlyProxy", 0); - __Pyx_TraceCall("_newReadOnlyProxy", __pyx_f[6], 320, 0, __PYX_ERR(6, 320, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":323 * _ReadOnlyProxy source_proxy, xmlNode* c_node): @@ -93213,7 +87660,6 @@ static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newRe * el = _ReadOnlyElementProxy.__new__(_ReadOnlyElementProxy) * elif c_node.type == tree.XML_PI_NODE: */ - __Pyx_TraceLine(323,0,__PYX_ERR(6, 323, __pyx_L1_error)) switch (__pyx_v_c_node->type) { case XML_ELEMENT_NODE: @@ -93224,7 +87670,6 @@ static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newRe * elif c_node.type == tree.XML_PI_NODE: * el = _ReadOnlyPIProxy.__new__(_ReadOnlyPIProxy) */ - __Pyx_TraceLine(324,0,__PYX_ERR(6, 324, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_tp_new_4lxml_5etree__ReadOnlyElementProxy(((PyTypeObject *)__pyx_ptype_4lxml_5etree__ReadOnlyElementProxy), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 324, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_1), __pyx_ptype_4lxml_5etree__ReadOnlyProxy)))) __PYX_ERR(6, 324, __pyx_L1_error) @@ -93239,15 +87684,6 @@ static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newRe * elif c_node.type == tree.XML_PI_NODE: */ break; - - /* "src/lxml/readonlytree.pxi":325 - * if c_node.type == tree.XML_ELEMENT_NODE: - * el = _ReadOnlyElementProxy.__new__(_ReadOnlyElementProxy) - * elif c_node.type == tree.XML_PI_NODE: # <<<<<<<<<<<<<< - * el = _ReadOnlyPIProxy.__new__(_ReadOnlyPIProxy) - * elif c_node.type in (tree.XML_COMMENT_NODE, - */ - __Pyx_TraceLine(325,0,__PYX_ERR(6, 325, __pyx_L1_error)) case XML_PI_NODE: /* "src/lxml/readonlytree.pxi":326 @@ -93257,7 +87693,6 @@ static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newRe * elif c_node.type in (tree.XML_COMMENT_NODE, * tree.XML_ENTITY_REF_NODE): */ - __Pyx_TraceLine(326,0,__PYX_ERR(6, 326, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_tp_new_4lxml_5etree__ReadOnlyPIProxy(((PyTypeObject *)__pyx_ptype_4lxml_5etree__ReadOnlyPIProxy), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 326, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_1), __pyx_ptype_4lxml_5etree__ReadOnlyProxy)))) __PYX_ERR(6, 326, __pyx_L1_error) @@ -93272,6 +87707,7 @@ static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newRe * elif c_node.type in (tree.XML_COMMENT_NODE, */ break; + case XML_COMMENT_NODE: /* "src/lxml/readonlytree.pxi":327 * elif c_node.type == tree.XML_PI_NODE: @@ -93280,17 +87716,6 @@ static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newRe * tree.XML_ENTITY_REF_NODE): * el = _ReadOnlyProxy.__new__(_ReadOnlyProxy) */ - __Pyx_TraceLine(327,0,__PYX_ERR(6, 327, __pyx_L1_error)) - case XML_COMMENT_NODE: - - /* "src/lxml/readonlytree.pxi":328 - * el = _ReadOnlyPIProxy.__new__(_ReadOnlyPIProxy) - * elif c_node.type in (tree.XML_COMMENT_NODE, - * tree.XML_ENTITY_REF_NODE): # <<<<<<<<<<<<<< - * el = _ReadOnlyProxy.__new__(_ReadOnlyProxy) - * else: - */ - __Pyx_TraceLine(328,0,__PYX_ERR(6, 328, __pyx_L1_error)) case XML_ENTITY_REF_NODE: /* "src/lxml/readonlytree.pxi":329 @@ -93300,7 +87725,6 @@ static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newRe * else: * raise TypeError(f"Unsupported element type: {c_node.type}") */ - __Pyx_TraceLine(329,0,__PYX_ERR(6, 329, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_tp_new_4lxml_5etree__ReadOnlyProxy(((PyTypeObject *)__pyx_ptype_4lxml_5etree__ReadOnlyProxy), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 329, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_el = ((struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *)__pyx_t_1); @@ -93323,7 +87747,6 @@ static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newRe * el._c_node = c_node * _initReadOnlyProxy(el, source_proxy) */ - __Pyx_TraceLine(331,0,__PYX_ERR(6, 331, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyUnicode_From_xmlElementType(__pyx_v_c_node->type, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unsupported_element_type, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 331, __pyx_L1_error) @@ -93345,7 +87768,6 @@ static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newRe * _initReadOnlyProxy(el, source_proxy) * return el */ - __Pyx_TraceLine(332,0,__PYX_ERR(6, 332, __pyx_L1_error)) __pyx_v_el->_c_node = __pyx_v_c_node; /* "src/lxml/readonlytree.pxi":333 @@ -93355,7 +87777,6 @@ static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newRe * return el * */ - __Pyx_TraceLine(333,0,__PYX_ERR(6, 333, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__initReadOnlyProxy(__pyx_v_el, __pyx_v_source_proxy); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -93367,7 +87788,6 @@ static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newRe * * cdef inline _initReadOnlyProxy(_ReadOnlyProxy el, */ - __Pyx_TraceLine(334,0,__PYX_ERR(6, 334, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_el)); __pyx_r = __pyx_v_el; @@ -93390,7 +87810,6 @@ static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newRe __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_el); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -93405,14 +87824,12 @@ static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newRe static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree__initReadOnlyProxy(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_v_el, struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_v_source_proxy) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("_initReadOnlyProxy", 0); - __Pyx_TraceCall("_initReadOnlyProxy", __pyx_f[6], 336, 0, __PYX_ERR(6, 336, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":338 * cdef inline _initReadOnlyProxy(_ReadOnlyProxy el, @@ -93421,7 +87838,6 @@ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree__initReadOnlyProxy(struct __ * el._source_proxy = el * el._dependent_proxies = [el] */ - __Pyx_TraceLine(338,0,__PYX_ERR(6, 338, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_source_proxy) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -93433,7 +87849,6 @@ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree__initReadOnlyProxy(struct __ * el._dependent_proxies = [el] * else: */ - __Pyx_TraceLine(339,0,__PYX_ERR(6, 339, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_el)); __Pyx_GIVEREF(((PyObject *)__pyx_v_el)); __Pyx_GOTREF(__pyx_v_el->_source_proxy); @@ -93447,7 +87862,6 @@ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree__initReadOnlyProxy(struct __ * else: * el._source_proxy = source_proxy */ - __Pyx_TraceLine(340,0,__PYX_ERR(6, 340, __pyx_L1_error)) __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_el)); @@ -93476,7 +87890,6 @@ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree__initReadOnlyProxy(struct __ * source_proxy._dependent_proxies.append(el) * */ - __Pyx_TraceLine(342,0,__PYX_ERR(6, 342, __pyx_L1_error)) /*else*/ { __Pyx_INCREF(((PyObject *)__pyx_v_source_proxy)); __Pyx_GIVEREF(((PyObject *)__pyx_v_source_proxy)); @@ -93491,7 +87904,6 @@ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree__initReadOnlyProxy(struct __ * * cdef _freeReadOnlyProxies(_ReadOnlyProxy sourceProxy): */ - __Pyx_TraceLine(343,0,__PYX_ERR(6, 343, __pyx_L1_error)) if (unlikely(__pyx_v_source_proxy->_dependent_proxies == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); __PYX_ERR(6, 343, __pyx_L1_error) @@ -93517,7 +87929,6 @@ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree__initReadOnlyProxy(struct __ __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -93534,7 +87945,6 @@ static PyObject *__pyx_f_4lxml_5etree__freeReadOnlyProxies(struct __pyx_obj_4lxm xmlNode *__pyx_v_c_node; struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_v_el = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -93543,7 +87953,6 @@ static PyObject *__pyx_f_4lxml_5etree__freeReadOnlyProxies(struct __pyx_obj_4lxm PyObject *__pyx_t_5 = NULL; xmlNode *__pyx_t_6; __Pyx_RefNannySetupContext("_freeReadOnlyProxies", 0); - __Pyx_TraceCall("_freeReadOnlyProxies", __pyx_f[6], 345, 0, __PYX_ERR(6, 345, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":348 * cdef xmlNode* c_node @@ -93552,7 +87961,6 @@ static PyObject *__pyx_f_4lxml_5etree__freeReadOnlyProxies(struct __pyx_obj_4lxm * return * if sourceProxy._dependent_proxies is None: */ - __Pyx_TraceLine(348,0,__PYX_ERR(6, 348, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_sourceProxy) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -93564,7 +87972,6 @@ static PyObject *__pyx_f_4lxml_5etree__freeReadOnlyProxies(struct __pyx_obj_4lxm * if sourceProxy._dependent_proxies is None: * return */ - __Pyx_TraceLine(349,0,__PYX_ERR(6, 349, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -93585,7 +87992,6 @@ static PyObject *__pyx_f_4lxml_5etree__freeReadOnlyProxies(struct __pyx_obj_4lxm * return * for el in sourceProxy._dependent_proxies: */ - __Pyx_TraceLine(350,0,__PYX_ERR(6, 350, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_sourceProxy->_dependent_proxies == ((PyObject*)Py_None)); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -93597,7 +88003,6 @@ static PyObject *__pyx_f_4lxml_5etree__freeReadOnlyProxies(struct __pyx_obj_4lxm * for el in sourceProxy._dependent_proxies: * c_node = el._c_node */ - __Pyx_TraceLine(351,0,__PYX_ERR(6, 351, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -93618,7 +88023,6 @@ static PyObject *__pyx_f_4lxml_5etree__freeReadOnlyProxies(struct __pyx_obj_4lxm * c_node = el._c_node * el._c_node = NULL */ - __Pyx_TraceLine(352,0,__PYX_ERR(6, 352, __pyx_L1_error)) if (unlikely(__pyx_v_sourceProxy->_dependent_proxies == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(6, 352, __pyx_L1_error) @@ -93643,7 +88047,6 @@ static PyObject *__pyx_f_4lxml_5etree__freeReadOnlyProxies(struct __pyx_obj_4lxm * el._c_node = NULL * if el._free_after_use: */ - __Pyx_TraceLine(353,0,__PYX_ERR(6, 353, __pyx_L1_error)) __pyx_t_6 = __pyx_v_el->_c_node; __pyx_v_c_node = __pyx_t_6; @@ -93654,7 +88057,6 @@ static PyObject *__pyx_f_4lxml_5etree__freeReadOnlyProxies(struct __pyx_obj_4lxm * if el._free_after_use: * tree.xmlFreeNode(c_node) */ - __Pyx_TraceLine(354,0,__PYX_ERR(6, 354, __pyx_L1_error)) __pyx_v_el->_c_node = NULL; /* "src/lxml/readonlytree.pxi":355 @@ -93664,7 +88066,6 @@ static PyObject *__pyx_f_4lxml_5etree__freeReadOnlyProxies(struct __pyx_obj_4lxm * tree.xmlFreeNode(c_node) * del sourceProxy._dependent_proxies[:] */ - __Pyx_TraceLine(355,0,__PYX_ERR(6, 355, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_el->_free_after_use != 0); if (__pyx_t_1) { @@ -93675,7 +88076,6 @@ static PyObject *__pyx_f_4lxml_5etree__freeReadOnlyProxies(struct __pyx_obj_4lxm * del sourceProxy._dependent_proxies[:] * */ - __Pyx_TraceLine(356,0,__PYX_ERR(6, 356, __pyx_L1_error)) xmlFreeNode(__pyx_v_c_node); /* "src/lxml/readonlytree.pxi":355 @@ -93694,7 +88094,6 @@ static PyObject *__pyx_f_4lxml_5etree__freeReadOnlyProxies(struct __pyx_obj_4lxm * c_node = el._c_node * el._c_node = NULL */ - __Pyx_TraceLine(352,0,__PYX_ERR(6, 352, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -93705,7 +88104,6 @@ static PyObject *__pyx_f_4lxml_5etree__freeReadOnlyProxies(struct __pyx_obj_4lxm * * # opaque wrapper around non-element nodes, e.g. the document node */ - __Pyx_TraceLine(357,0,__PYX_ERR(6, 357, __pyx_L1_error)) if (unlikely(__pyx_v_sourceProxy->_dependent_proxies == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(6, 357, __pyx_L1_error) @@ -93731,7 +88129,6 @@ static PyObject *__pyx_f_4lxml_5etree__freeReadOnlyProxies(struct __pyx_obj_4lxm __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_el); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -93762,10 +88159,8 @@ static int __pyx_pw_4lxml_5etree_18_OpaqueNodeWrapper_1__init__(PyObject *__pyx_ static int __pyx_pf_4lxml_5etree_18_OpaqueNodeWrapper___init__(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree__OpaqueNodeWrapper *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[6], 367, 0, __PYX_ERR(6, 367, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":368 * cdef tree.xmlNode* _c_node @@ -93774,7 +88169,6 @@ static int __pyx_pf_4lxml_5etree_18_OpaqueNodeWrapper___init__(CYTHON_UNUSED str * * @cython.final */ - __Pyx_TraceLine(368,0,__PYX_ERR(6, 368, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_This_type_cannot_be_instantiated, 0, 0); __PYX_ERR(6, 368, __pyx_L1_error) @@ -93790,7 +88184,6 @@ static int __pyx_pf_4lxml_5etree_18_OpaqueNodeWrapper___init__(CYTHON_UNUSED str __pyx_L1_error:; __Pyx_AddTraceback("lxml.etree._OpaqueNodeWrapper.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -93805,10 +88198,8 @@ static int __pyx_pf_4lxml_5etree_18_OpaqueNodeWrapper___init__(CYTHON_UNUSED str static int __pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper__assertNode(struct __pyx_obj_4lxml_5etree__OpaqueDocumentWrapper *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_assertNode", 0); - __Pyx_TraceCall("_assertNode", __pyx_f[6], 373, 0, __PYX_ERR(6, 373, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":376 * u"""This is our way of saying: this proxy is invalid! @@ -93817,7 +88208,6 @@ static int __pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper__assertNode(struct __py * return 0 * */ - __Pyx_TraceLine(376,0,__PYX_ERR(6, 376, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_self->__pyx_base._c_node != NULL) != 0))) { @@ -93834,7 +88224,6 @@ static int __pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper__assertNode(struct __py * * cpdef append(self, other_element): */ - __Pyx_TraceLine(377,0,__PYX_ERR(6, 377, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -93851,7 +88240,6 @@ static int __pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper__assertNode(struct __py __Pyx_AddTraceback("lxml.etree._OpaqueDocumentWrapper._assertNode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -93869,7 +88257,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper_append(struct __p xmlNode *__pyx_v_c_next; xmlNode *__pyx_v_c_node; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlNode *__pyx_t_2; @@ -93877,9 +88264,7 @@ static PyObject *__pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper_append(struct __p int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__204) __Pyx_RefNannySetupContext("append", 0); - __Pyx_TraceCall("append", __pyx_f[6], 379, 0, __PYX_ERR(6, 379, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":384 * cdef xmlNode* c_next @@ -93888,7 +88273,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper_append(struct __p * c_node = _roNodeOf(other_element) * if c_node.type == tree.XML_ELEMENT_NODE: */ - __Pyx_TraceLine(384,0,__PYX_ERR(6, 384, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper__assertNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 384, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":385 @@ -93898,7 +88282,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper_append(struct __p * if c_node.type == tree.XML_ELEMENT_NODE: * if tree.xmlDocGetRootElement(self._c_node) is not NULL: */ - __Pyx_TraceLine(385,0,__PYX_ERR(6, 385, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__roNodeOf(__pyx_v_other_element); if (unlikely(__pyx_t_2 == ((xmlNode *)NULL))) __PYX_ERR(6, 385, __pyx_L1_error) __pyx_v_c_node = __pyx_t_2; @@ -93909,7 +88292,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper_append(struct __p * if tree.xmlDocGetRootElement(self._c_node) is not NULL: * raise ValueError, u"cannot append, document already has a root element" */ - __Pyx_TraceLine(386,0,__PYX_ERR(6, 386, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0); if (__pyx_t_3) { @@ -93920,7 +88302,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper_append(struct __p * raise ValueError, u"cannot append, document already has a root element" * elif c_node.type not in (tree.XML_PI_NODE, tree.XML_COMMENT_NODE): */ - __Pyx_TraceLine(387,0,__PYX_ERR(6, 387, __pyx_L1_error)) __pyx_t_3 = ((xmlDocGetRootElement(((xmlDoc *)__pyx_v_self->__pyx_base._c_node)) != NULL) != 0); if (unlikely(__pyx_t_3)) { @@ -93931,7 +88312,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper_append(struct __p * elif c_node.type not in (tree.XML_PI_NODE, tree.XML_COMMENT_NODE): * raise TypeError, f"unsupported element type for top-level node: {c_node.type}" */ - __Pyx_TraceLine(388,0,__PYX_ERR(6, 388, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_cannot_append_document_already_h, 0, 0); __PYX_ERR(6, 388, __pyx_L1_error) @@ -93961,7 +88341,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper_append(struct __p * raise TypeError, f"unsupported element type for top-level node: {c_node.type}" * c_node = _copyNodeToDoc(c_node, self._c_node) */ - __Pyx_TraceLine(389,0,__PYX_ERR(6, 389, __pyx_L1_error)) switch (__pyx_v_c_node->type) { case XML_PI_NODE: case XML_COMMENT_NODE: @@ -93981,7 +88360,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper_append(struct __p * c_node = _copyNodeToDoc(c_node, self._c_node) * c_next = c_node.next */ - __Pyx_TraceLine(390,0,__PYX_ERR(6, 390, __pyx_L1_error)) __pyx_t_5 = __Pyx_PyUnicode_From_xmlElementType(__pyx_v_c_node->type, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_unsupported_element_type_for_top, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 390, __pyx_L1_error) @@ -94008,7 +88386,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper_append(struct __p * c_next = c_node.next * tree.xmlAddChild(self._c_node, c_node) */ - __Pyx_TraceLine(391,0,__PYX_ERR(6, 391, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__copyNodeToDoc(__pyx_v_c_node, ((xmlDoc *)__pyx_v_self->__pyx_base._c_node)); if (unlikely(__pyx_t_2 == ((xmlNode *)NULL))) __PYX_ERR(6, 391, __pyx_L1_error) __pyx_v_c_node = __pyx_t_2; @@ -94019,7 +88396,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper_append(struct __p * tree.xmlAddChild(self._c_node, c_node) * _moveTail(c_next, c_node) */ - __Pyx_TraceLine(392,0,__PYX_ERR(6, 392, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->next; __pyx_v_c_next = __pyx_t_2; @@ -94030,7 +88406,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper_append(struct __p * _moveTail(c_next, c_node) * */ - __Pyx_TraceLine(393,0,__PYX_ERR(6, 393, __pyx_L1_error)) (void)(xmlAddChild(__pyx_v_self->__pyx_base._c_node, __pyx_v_c_node)); /* "src/lxml/readonlytree.pxi":394 @@ -94040,7 +88415,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper_append(struct __p * * def extend(self, elements): */ - __Pyx_TraceLine(394,0,__PYX_ERR(6, 394, __pyx_L1_error)) __pyx_f_4lxml_5etree__moveTail(__pyx_v_c_next, __pyx_v_c_node); /* "src/lxml/readonlytree.pxi":379 @@ -94061,7 +88435,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper_append(struct __p __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -94083,12 +88456,9 @@ static PyObject *__pyx_pw_4lxml_5etree_22_OpaqueDocumentWrapper_1append(PyObject static PyObject *__pyx_pf_4lxml_5etree_22_OpaqueDocumentWrapper_append(struct __pyx_obj_4lxml_5etree__OpaqueDocumentWrapper *__pyx_v_self, PyObject *__pyx_v_other_element) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__204) __Pyx_RefNannySetupContext("append", 0); - __Pyx_TraceCall("append (wrapper)", __pyx_f[6], 379, 0, __PYX_ERR(6, 379, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper_append(__pyx_v_self, __pyx_v_other_element, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -94103,7 +88473,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_OpaqueDocumentWrapper_append(struct __ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -94134,16 +88503,13 @@ static PyObject *__pyx_pw_4lxml_5etree_22_OpaqueDocumentWrapper_3extend(PyObject static PyObject *__pyx_pf_4lxml_5etree_22_OpaqueDocumentWrapper_2extend(struct __pyx_obj_4lxml_5etree__OpaqueDocumentWrapper *__pyx_v_self, PyObject *__pyx_v_elements) { PyObject *__pyx_v_element = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *(*__pyx_t_4)(PyObject *); PyObject *__pyx_t_5 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__205) __Pyx_RefNannySetupContext("extend", 0); - __Pyx_TraceCall("extend", __pyx_f[6], 396, 0, __PYX_ERR(6, 396, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":400 * children. @@ -94152,7 +88518,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_OpaqueDocumentWrapper_2extend(struct _ * for element in elements: * self.append(element) */ - __Pyx_TraceLine(400,0,__PYX_ERR(6, 400, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper__assertNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 400, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":401 @@ -94162,7 +88527,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_OpaqueDocumentWrapper_2extend(struct _ * self.append(element) * */ - __Pyx_TraceLine(401,0,__PYX_ERR(6, 401, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_v_elements)) || PyTuple_CheckExact(__pyx_v_elements)) { __pyx_t_2 = __pyx_v_elements; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; @@ -94212,7 +88576,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_OpaqueDocumentWrapper_2extend(struct _ * * cdef _OpaqueNodeWrapper _newOpaqueAppendOnlyNodeWrapper(xmlNode* c_node): */ - __Pyx_TraceLine(402,0,__PYX_ERR(6, 402, __pyx_L1_error)) __pyx_t_5 = __pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper_append(__pyx_v_self, __pyx_v_element, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -94224,7 +88587,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_OpaqueDocumentWrapper_2extend(struct _ * self.append(element) * */ - __Pyx_TraceLine(401,0,__PYX_ERR(6, 401, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -94247,7 +88609,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_OpaqueDocumentWrapper_2extend(struct _ __pyx_L0:; __Pyx_XDECREF(__pyx_v_element); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -94263,11 +88624,9 @@ static PyObject *__pyx_pf_4lxml_5etree_22_OpaqueDocumentWrapper_2extend(struct _ static struct __pyx_obj_4lxml_5etree__OpaqueNodeWrapper *__pyx_f_4lxml_5etree__newOpaqueAppendOnlyNodeWrapper(xmlNode *__pyx_v_c_node) { struct __pyx_obj_4lxml_5etree__OpaqueNodeWrapper *__pyx_v_node = 0; struct __pyx_obj_4lxml_5etree__OpaqueNodeWrapper *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_newOpaqueAppendOnlyNodeWrapper", 0); - __Pyx_TraceCall("_newOpaqueAppendOnlyNodeWrapper", __pyx_f[6], 404, 0, __PYX_ERR(6, 404, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":406 * cdef _OpaqueNodeWrapper _newOpaqueAppendOnlyNodeWrapper(xmlNode* c_node): @@ -94276,7 +88635,6 @@ static struct __pyx_obj_4lxml_5etree__OpaqueNodeWrapper *__pyx_f_4lxml_5etree__n * node = _OpaqueDocumentWrapper.__new__(_OpaqueDocumentWrapper) * else: */ - __Pyx_TraceLine(406,0,__PYX_ERR(6, 406, __pyx_L1_error)) switch (__pyx_v_c_node->type) { case XML_DOCUMENT_NODE: case XML_HTML_DOCUMENT_NODE: @@ -94288,7 +88646,6 @@ static struct __pyx_obj_4lxml_5etree__OpaqueNodeWrapper *__pyx_f_4lxml_5etree__n * else: * node = _OpaqueNodeWrapper.__new__(_OpaqueNodeWrapper) */ - __Pyx_TraceLine(407,0,__PYX_ERR(6, 407, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_tp_new_4lxml_5etree__OpaqueDocumentWrapper(((PyTypeObject *)__pyx_ptype_4lxml_5etree__OpaqueDocumentWrapper), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 407, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_1), __pyx_ptype_4lxml_5etree__OpaqueNodeWrapper)))) __PYX_ERR(6, 407, __pyx_L1_error) @@ -94312,7 +88669,6 @@ static struct __pyx_obj_4lxml_5etree__OpaqueNodeWrapper *__pyx_f_4lxml_5etree__n * node._c_node = c_node * return node */ - __Pyx_TraceLine(409,0,__PYX_ERR(6, 409, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_tp_new_4lxml_5etree__OpaqueNodeWrapper(((PyTypeObject *)__pyx_ptype_4lxml_5etree__OpaqueNodeWrapper), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 409, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_node = ((struct __pyx_obj_4lxml_5etree__OpaqueNodeWrapper *)__pyx_t_1); @@ -94327,7 +88683,6 @@ static struct __pyx_obj_4lxml_5etree__OpaqueNodeWrapper *__pyx_f_4lxml_5etree__n * return node * */ - __Pyx_TraceLine(410,0,__PYX_ERR(6, 410, __pyx_L1_error)) __pyx_v_node->_c_node = __pyx_v_c_node; /* "src/lxml/readonlytree.pxi":411 @@ -94337,7 +88692,6 @@ static struct __pyx_obj_4lxml_5etree__OpaqueNodeWrapper *__pyx_f_4lxml_5etree__n * * # element proxies that allow restricted modification */ - __Pyx_TraceLine(411,0,__PYX_ERR(6, 411, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_node)); __pyx_r = __pyx_v_node; @@ -94359,7 +88713,6 @@ static struct __pyx_obj_4lxml_5etree__OpaqueNodeWrapper *__pyx_f_4lxml_5etree__n __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_node); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -94387,13 +88740,11 @@ static PyObject *__pyx_pw_4lxml_5etree_23_ModifyContentOnlyProxy_4text_1__get__( static PyObject *__pyx_pf_4lxml_5etree_23_ModifyContentOnlyProxy_4text___get__(struct __pyx_obj_4lxml_5etree__ModifyContentOnlyProxy *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[6], 420, 0, __PYX_ERR(6, 420, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":421 * property text: @@ -94402,7 +88753,6 @@ static PyObject *__pyx_pf_4lxml_5etree_23_ModifyContentOnlyProxy_4text___get__(s * if self._c_node.content is NULL: * return '' */ - __Pyx_TraceLine(421,0,__PYX_ERR(6, 421, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyProxy *)__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, 421, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":422 @@ -94412,7 +88762,6 @@ static PyObject *__pyx_pf_4lxml_5etree_23_ModifyContentOnlyProxy_4text___get__(s * return '' * else: */ - __Pyx_TraceLine(422,0,__PYX_ERR(6, 422, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->__pyx_base._c_node->content == NULL) != 0); if (__pyx_t_2) { @@ -94423,10 +88772,9 @@ static PyObject *__pyx_pf_4lxml_5etree_23_ModifyContentOnlyProxy_4text___get__(s * else: * return funicode(self._c_node.content) */ - __Pyx_TraceLine(423,0,__PYX_ERR(6, 423, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_kp_s__23); - __pyx_r = __pyx_kp_s__23; + __Pyx_INCREF(__pyx_kp_s__11); + __pyx_r = __pyx_kp_s__11; goto __pyx_L0; /* "src/lxml/readonlytree.pxi":422 @@ -94445,7 +88793,6 @@ static PyObject *__pyx_pf_4lxml_5etree_23_ModifyContentOnlyProxy_4text___get__(s * * def __set__(self, value): */ - __Pyx_TraceLine(425,0,__PYX_ERR(6, 425, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->__pyx_base._c_node->content); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 425, __pyx_L1_error) @@ -94470,7 +88817,6 @@ static PyObject *__pyx_pf_4lxml_5etree_23_ModifyContentOnlyProxy_4text___get__(s __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -94499,14 +88845,12 @@ static int __pyx_pw_4lxml_5etree_23_ModifyContentOnlyProxy_4text_3__set__(PyObje static int __pyx_pf_4lxml_5etree_23_ModifyContentOnlyProxy_4text_2__set__(struct __pyx_obj_4lxml_5etree__ModifyContentOnlyProxy *__pyx_v_self, PyObject *__pyx_v_value) { const xmlChar *__pyx_v_c_text; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[6], 427, 0, __PYX_ERR(6, 427, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_value); /* "src/lxml/readonlytree.pxi":429 @@ -94516,7 +88860,6 @@ static int __pyx_pf_4lxml_5etree_23_ModifyContentOnlyProxy_4text_2__set__(struct * if value is None: * c_text = NULL */ - __Pyx_TraceLine(429,0,__PYX_ERR(6, 429, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyProxy *)__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, 429, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":430 @@ -94526,7 +88869,6 @@ static int __pyx_pf_4lxml_5etree_23_ModifyContentOnlyProxy_4text_2__set__(struct * c_text = NULL * else: */ - __Pyx_TraceLine(430,0,__PYX_ERR(6, 430, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_value == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -94538,7 +88880,6 @@ static int __pyx_pf_4lxml_5etree_23_ModifyContentOnlyProxy_4text_2__set__(struct * else: * value = _utf8(value) */ - __Pyx_TraceLine(431,0,__PYX_ERR(6, 431, __pyx_L1_error)) __pyx_v_c_text = ((const xmlChar *)NULL); /* "src/lxml/readonlytree.pxi":430 @@ -94558,7 +88899,6 @@ static int __pyx_pf_4lxml_5etree_23_ModifyContentOnlyProxy_4text_2__set__(struct * c_text = _xcstr(value) * tree.xmlNodeSetContent(self._c_node, c_text) */ - __Pyx_TraceLine(433,0,__PYX_ERR(6, 433, __pyx_L1_error)) /*else*/ { __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -94572,7 +88912,6 @@ static int __pyx_pf_4lxml_5etree_23_ModifyContentOnlyProxy_4text_2__set__(struct * tree.xmlNodeSetContent(self._c_node, c_text) * */ - __Pyx_TraceLine(434,0,__PYX_ERR(6, 434, __pyx_L1_error)) __pyx_v_c_text = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_value); } __pyx_L3:; @@ -94584,7 +88923,6 @@ static int __pyx_pf_4lxml_5etree_23_ModifyContentOnlyProxy_4text_2__set__(struct * * @cython.final */ - __Pyx_TraceLine(435,0,__PYX_ERR(6, 435, __pyx_L1_error)) xmlNodeSetContent(__pyx_v_self->__pyx_base._c_node, __pyx_v_c_text); /* "src/lxml/readonlytree.pxi":427 @@ -94604,7 +88942,6 @@ static int __pyx_pf_4lxml_5etree_23_ModifyContentOnlyProxy_4text_2__set__(struct __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_value); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -94632,12 +88969,10 @@ static PyObject *__pyx_pw_4lxml_5etree_25_ModifyContentOnlyPIProxy_6target_1__ge static PyObject *__pyx_pf_4lxml_5etree_25_ModifyContentOnlyPIProxy_6target___get__(struct __pyx_obj_4lxml_5etree__ModifyContentOnlyPIProxy *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[6], 444, 0, __PYX_ERR(6, 444, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":445 * property target: @@ -94646,7 +88981,6 @@ static PyObject *__pyx_pf_4lxml_5etree_25_ModifyContentOnlyPIProxy_6target___get * return funicode(self._c_node.name) * */ - __Pyx_TraceLine(445,0,__PYX_ERR(6, 445, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyPIProxy *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._assertNode(((struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 445, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":446 @@ -94656,7 +88990,6 @@ static PyObject *__pyx_pf_4lxml_5etree_25_ModifyContentOnlyPIProxy_6target___get * * def __set__(self, value): */ - __Pyx_TraceLine(446,0,__PYX_ERR(6, 446, __pyx_L1_error)) __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(6, 446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -94679,7 +89012,6 @@ static PyObject *__pyx_pf_4lxml_5etree_25_ModifyContentOnlyPIProxy_6target___get __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -94708,12 +89040,10 @@ static int __pyx_pw_4lxml_5etree_25_ModifyContentOnlyPIProxy_6target_3__set__(Py static int __pyx_pf_4lxml_5etree_25_ModifyContentOnlyPIProxy_6target_2__set__(struct __pyx_obj_4lxml_5etree__ModifyContentOnlyPIProxy *__pyx_v_self, PyObject *__pyx_v_value) { const xmlChar *__pyx_v_c_text; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[6], 448, 0, __PYX_ERR(6, 448, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_value); /* "src/lxml/readonlytree.pxi":449 @@ -94723,7 +89053,6 @@ static int __pyx_pf_4lxml_5etree_25_ModifyContentOnlyPIProxy_6target_2__set__(st * value = _utf8(value) * c_text = _xcstr(value) */ - __Pyx_TraceLine(449,0,__PYX_ERR(6, 449, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyPIProxy *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._assertNode(((struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 449, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":450 @@ -94733,7 +89062,6 @@ static int __pyx_pf_4lxml_5etree_25_ModifyContentOnlyPIProxy_6target_2__set__(st * c_text = _xcstr(value) * tree.xmlNodeSetName(self._c_node, c_text) */ - __Pyx_TraceLine(450,0,__PYX_ERR(6, 450, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2); @@ -94746,7 +89074,6 @@ static int __pyx_pf_4lxml_5etree_25_ModifyContentOnlyPIProxy_6target_2__set__(st * tree.xmlNodeSetName(self._c_node, c_text) * */ - __Pyx_TraceLine(451,0,__PYX_ERR(6, 451, __pyx_L1_error)) __pyx_v_c_text = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_value); /* "src/lxml/readonlytree.pxi":452 @@ -94756,7 +89083,6 @@ static int __pyx_pf_4lxml_5etree_25_ModifyContentOnlyPIProxy_6target_2__set__(st * * @cython.final */ - __Pyx_TraceLine(452,0,__PYX_ERR(6, 452, __pyx_L1_error)) xmlNodeSetName(__pyx_v_self->__pyx_base.__pyx_base._c_node, __pyx_v_c_text); /* "src/lxml/readonlytree.pxi":448 @@ -94776,7 +89102,6 @@ static int __pyx_pf_4lxml_5etree_25_ModifyContentOnlyPIProxy_6target_2__set__(st __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_value); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -94804,11 +89129,9 @@ static PyObject *__pyx_pw_4lxml_5etree_29_ModifyContentOnlyEntityProxy_4name_1__ static PyObject *__pyx_pf_4lxml_5etree_29_ModifyContentOnlyEntityProxy_4name___get__(struct __pyx_obj_4lxml_5etree__ModifyContentOnlyEntityProxy *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[6], 459, 0, __PYX_ERR(6, 459, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":460 * property name: @@ -94817,7 +89140,6 @@ static PyObject *__pyx_pf_4lxml_5etree_29_ModifyContentOnlyEntityProxy_4name___g * * def __set__(self, value): */ - __Pyx_TraceLine(460,0,__PYX_ERR(6, 460, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->__pyx_base.__pyx_base._c_node->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -94840,7 +89162,6 @@ static PyObject *__pyx_pf_4lxml_5etree_29_ModifyContentOnlyEntityProxy_4name___g __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -94869,7 +89190,6 @@ static int __pyx_pw_4lxml_5etree_29_ModifyContentOnlyEntityProxy_4name_3__set__( static int __pyx_pf_4lxml_5etree_29_ModifyContentOnlyEntityProxy_4name_2__set__(struct __pyx_obj_4lxml_5etree__ModifyContentOnlyEntityProxy *__pyx_v_self, PyObject *__pyx_v_value) { const xmlChar *__pyx_v_c_text; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -94879,7 +89199,6 @@ static int __pyx_pf_4lxml_5etree_29_ModifyContentOnlyEntityProxy_4name_2__set__( Py_UCS4 __pyx_t_6; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[6], 462, 0, __PYX_ERR(6, 462, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_value); /* "src/lxml/readonlytree.pxi":463 @@ -94889,7 +89208,6 @@ static int __pyx_pf_4lxml_5etree_29_ModifyContentOnlyEntityProxy_4name_2__set__( * assert u'&' not in value and u';' not in value, \ * f"Invalid entity name '{value}'" */ - __Pyx_TraceLine(463,0,__PYX_ERR(6, 463, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_1); @@ -94902,17 +89220,16 @@ static int __pyx_pf_4lxml_5etree_29_ModifyContentOnlyEntityProxy_4name_2__set__( * f"Invalid entity name '{value}'" * c_text = _xcstr(value) */ - __Pyx_TraceLine(464,0,__PYX_ERR(6, 464, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { - __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__112, __pyx_v_value, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(6, 464, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__28, __pyx_v_value, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(6, 464, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L3_bool_binop_done; } - __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__113, __pyx_v_value, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(6, 464, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__29, __pyx_v_value, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(6, 464, __pyx_L1_error) __pyx_t_3 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_3; __pyx_L3_bool_binop_done:; @@ -94925,7 +89242,6 @@ static int __pyx_pf_4lxml_5etree_29_ModifyContentOnlyEntityProxy_4name_2__set__( * c_text = _xcstr(value) * tree.xmlNodeSetName(self._c_node, c_text) */ - __Pyx_TraceLine(465,0,__PYX_ERR(6, 465, __pyx_L1_error)) __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = 0; @@ -94941,10 +89257,10 @@ static int __pyx_pf_4lxml_5etree_29_ModifyContentOnlyEntityProxy_4name_2__set__( __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7); __pyx_t_7 = 0; - __Pyx_INCREF(__pyx_kp_u__60); + __Pyx_INCREF(__pyx_kp_u__21); __pyx_t_5 += 1; - __Pyx_GIVEREF(__pyx_kp_u__60); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__60); + __Pyx_GIVEREF(__pyx_kp_u__21); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__21); __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -94962,7 +89278,6 @@ static int __pyx_pf_4lxml_5etree_29_ModifyContentOnlyEntityProxy_4name_2__set__( * tree.xmlNodeSetName(self._c_node, c_text) * */ - __Pyx_TraceLine(466,0,__PYX_ERR(6, 466, __pyx_L1_error)) __pyx_v_c_text = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_value); /* "src/lxml/readonlytree.pxi":467 @@ -94972,7 +89287,6 @@ static int __pyx_pf_4lxml_5etree_29_ModifyContentOnlyEntityProxy_4name_2__set__( * * */ - __Pyx_TraceLine(467,0,__PYX_ERR(6, 467, __pyx_L1_error)) xmlNodeSetName(__pyx_v_self->__pyx_base.__pyx_base._c_node, __pyx_v_c_text); /* "src/lxml/readonlytree.pxi":462 @@ -94993,7 +89307,6 @@ static int __pyx_pf_4lxml_5etree_29_ModifyContentOnlyEntityProxy_4name_2__set__( __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_value); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -95011,13 +89324,10 @@ static PyObject *__pyx_f_4lxml_5etree_23_AppendOnlyElementProxy_append(struct __ xmlNode *__pyx_v_c_next; xmlNode *__pyx_v_c_node; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlNode *__pyx_t_2; - __Pyx_TraceFrameInit(__pyx_codeobj__206) __Pyx_RefNannySetupContext("append", 0); - __Pyx_TraceCall("append", __pyx_f[6], 476, 0, __PYX_ERR(6, 476, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":481 * cdef xmlNode* c_next @@ -95026,7 +89336,6 @@ static PyObject *__pyx_f_4lxml_5etree_23_AppendOnlyElementProxy_append(struct __ * c_node = _roNodeOf(other_element) * c_node = _copyNodeToDoc(c_node, self._c_node.doc) */ - __Pyx_TraceLine(481,0,__PYX_ERR(6, 481, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__AppendOnlyElementProxy *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._assertNode(((struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 481, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":482 @@ -95036,7 +89345,6 @@ static PyObject *__pyx_f_4lxml_5etree_23_AppendOnlyElementProxy_append(struct __ * c_node = _copyNodeToDoc(c_node, self._c_node.doc) * c_next = c_node.next */ - __Pyx_TraceLine(482,0,__PYX_ERR(6, 482, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__roNodeOf(__pyx_v_other_element); if (unlikely(__pyx_t_2 == ((xmlNode *)NULL))) __PYX_ERR(6, 482, __pyx_L1_error) __pyx_v_c_node = __pyx_t_2; @@ -95047,7 +89355,6 @@ static PyObject *__pyx_f_4lxml_5etree_23_AppendOnlyElementProxy_append(struct __ * c_next = c_node.next * tree.xmlAddChild(self._c_node, c_node) */ - __Pyx_TraceLine(483,0,__PYX_ERR(6, 483, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__copyNodeToDoc(__pyx_v_c_node, __pyx_v_self->__pyx_base.__pyx_base._c_node->doc); if (unlikely(__pyx_t_2 == ((xmlNode *)NULL))) __PYX_ERR(6, 483, __pyx_L1_error) __pyx_v_c_node = __pyx_t_2; @@ -95058,7 +89365,6 @@ static PyObject *__pyx_f_4lxml_5etree_23_AppendOnlyElementProxy_append(struct __ * tree.xmlAddChild(self._c_node, c_node) * _moveTail(c_next, c_node) */ - __Pyx_TraceLine(484,0,__PYX_ERR(6, 484, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->next; __pyx_v_c_next = __pyx_t_2; @@ -95069,7 +89375,6 @@ static PyObject *__pyx_f_4lxml_5etree_23_AppendOnlyElementProxy_append(struct __ * _moveTail(c_next, c_node) * */ - __Pyx_TraceLine(485,0,__PYX_ERR(6, 485, __pyx_L1_error)) (void)(xmlAddChild(__pyx_v_self->__pyx_base.__pyx_base._c_node, __pyx_v_c_node)); /* "src/lxml/readonlytree.pxi":486 @@ -95079,7 +89384,6 @@ static PyObject *__pyx_f_4lxml_5etree_23_AppendOnlyElementProxy_append(struct __ * * def extend(self, elements): */ - __Pyx_TraceLine(486,0,__PYX_ERR(6, 486, __pyx_L1_error)) __pyx_f_4lxml_5etree__moveTail(__pyx_v_c_next, __pyx_v_c_node); /* "src/lxml/readonlytree.pxi":476 @@ -95098,7 +89402,6 @@ static PyObject *__pyx_f_4lxml_5etree_23_AppendOnlyElementProxy_append(struct __ __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -95120,12 +89423,9 @@ static PyObject *__pyx_pw_4lxml_5etree_23_AppendOnlyElementProxy_1append(PyObjec static PyObject *__pyx_pf_4lxml_5etree_23_AppendOnlyElementProxy_append(struct __pyx_obj_4lxml_5etree__AppendOnlyElementProxy *__pyx_v_self, PyObject *__pyx_v_other_element) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__206) __Pyx_RefNannySetupContext("append", 0); - __Pyx_TraceCall("append (wrapper)", __pyx_f[6], 476, 0, __PYX_ERR(6, 476, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4lxml_5etree_23_AppendOnlyElementProxy_append(__pyx_v_self, __pyx_v_other_element, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -95140,7 +89440,6 @@ static PyObject *__pyx_pf_4lxml_5etree_23_AppendOnlyElementProxy_append(struct _ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -95171,16 +89470,13 @@ static PyObject *__pyx_pw_4lxml_5etree_23_AppendOnlyElementProxy_3extend(PyObjec static PyObject *__pyx_pf_4lxml_5etree_23_AppendOnlyElementProxy_2extend(struct __pyx_obj_4lxml_5etree__AppendOnlyElementProxy *__pyx_v_self, PyObject *__pyx_v_elements) { PyObject *__pyx_v_element = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *(*__pyx_t_4)(PyObject *); PyObject *__pyx_t_5 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__207) __Pyx_RefNannySetupContext("extend", 0); - __Pyx_TraceCall("extend", __pyx_f[6], 488, 0, __PYX_ERR(6, 488, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":492 * children. @@ -95189,7 +89485,6 @@ static PyObject *__pyx_pf_4lxml_5etree_23_AppendOnlyElementProxy_2extend(struct * for element in elements: * self.append(element) */ - __Pyx_TraceLine(492,0,__PYX_ERR(6, 492, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__AppendOnlyElementProxy *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._assertNode(((struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 492, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":493 @@ -95199,7 +89494,6 @@ static PyObject *__pyx_pf_4lxml_5etree_23_AppendOnlyElementProxy_2extend(struct * self.append(element) * */ - __Pyx_TraceLine(493,0,__PYX_ERR(6, 493, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_v_elements)) || PyTuple_CheckExact(__pyx_v_elements)) { __pyx_t_2 = __pyx_v_elements; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; @@ -95249,7 +89543,6 @@ static PyObject *__pyx_pf_4lxml_5etree_23_AppendOnlyElementProxy_2extend(struct * * property text: */ - __Pyx_TraceLine(494,0,__PYX_ERR(6, 494, __pyx_L1_error)) __pyx_t_5 = __pyx_f_4lxml_5etree_23_AppendOnlyElementProxy_append(__pyx_v_self, __pyx_v_element, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -95261,7 +89554,6 @@ static PyObject *__pyx_pf_4lxml_5etree_23_AppendOnlyElementProxy_2extend(struct * self.append(element) * */ - __Pyx_TraceLine(493,0,__PYX_ERR(6, 493, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -95284,7 +89576,6 @@ static PyObject *__pyx_pf_4lxml_5etree_23_AppendOnlyElementProxy_2extend(struct __pyx_L0:; __Pyx_XDECREF(__pyx_v_element); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -95312,12 +89603,10 @@ static PyObject *__pyx_pw_4lxml_5etree_23_AppendOnlyElementProxy_4text_1__get__( static PyObject *__pyx_pf_4lxml_5etree_23_AppendOnlyElementProxy_4text___get__(struct __pyx_obj_4lxml_5etree__AppendOnlyElementProxy *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[6], 500, 0, __PYX_ERR(6, 500, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":501 * """ @@ -95326,7 +89615,6 @@ static PyObject *__pyx_pf_4lxml_5etree_23_AppendOnlyElementProxy_4text___get__(s * return _collectText(self._c_node.children) * */ - __Pyx_TraceLine(501,0,__PYX_ERR(6, 501, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__AppendOnlyElementProxy *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._assertNode(((struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 501, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":502 @@ -95336,7 +89624,6 @@ static PyObject *__pyx_pf_4lxml_5etree_23_AppendOnlyElementProxy_4text___get__(s * * def __set__(self, value): */ - __Pyx_TraceLine(502,0,__PYX_ERR(6, 502, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_4lxml_5etree__collectText(__pyx_v_self->__pyx_base.__pyx_base._c_node->children); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -95359,7 +89646,6 @@ static PyObject *__pyx_pf_4lxml_5etree_23_AppendOnlyElementProxy_4text___get__(s __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -95387,7 +89673,6 @@ static int __pyx_pw_4lxml_5etree_23_AppendOnlyElementProxy_4text_3__set__(PyObje static int __pyx_pf_4lxml_5etree_23_AppendOnlyElementProxy_4text_2__set__(struct __pyx_obj_4lxml_5etree__AppendOnlyElementProxy *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -95395,7 +89680,6 @@ static int __pyx_pf_4lxml_5etree_23_AppendOnlyElementProxy_4text_2__set__(struct PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[6], 504, 0, __PYX_ERR(6, 504, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_value); /* "src/lxml/readonlytree.pxi":505 @@ -95405,7 +89689,6 @@ static int __pyx_pf_4lxml_5etree_23_AppendOnlyElementProxy_4text_2__set__(struct * if isinstance(value, QName): * value = _resolveQNameText(self, value).decode('utf8') */ - __Pyx_TraceLine(505,0,__PYX_ERR(6, 505, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__AppendOnlyElementProxy *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._assertNode(((struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 505, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":506 @@ -95415,7 +89698,6 @@ static int __pyx_pf_4lxml_5etree_23_AppendOnlyElementProxy_4text_2__set__(struct * value = _resolveQNameText(self, value).decode('utf8') * _setNodeText(self._c_node, value) */ - __Pyx_TraceLine(506,0,__PYX_ERR(6, 506, __pyx_L1_error)) __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_4lxml_5etree_QName); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -95427,7 +89709,6 @@ static int __pyx_pf_4lxml_5etree_23_AppendOnlyElementProxy_4text_2__set__(struct * _setNodeText(self._c_node, value) * */ - __Pyx_TraceLine(507,0,__PYX_ERR(6, 507, __pyx_L1_error)) if (!(likely(((((PyObject *)__pyx_v_self)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(6, 507, __pyx_L1_error) __pyx_t_4 = __pyx_f_4lxml_5etree__resolveQNameText(((struct LxmlElement *)__pyx_v_self), __pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -95457,7 +89738,6 @@ static int __pyx_pf_4lxml_5etree_23_AppendOnlyElementProxy_4text_2__set__(struct * * */ - __Pyx_TraceLine(508,0,__PYX_ERR(6, 508, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__setNodeText(__pyx_v_self->__pyx_base.__pyx_base._c_node, __pyx_v_value); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 508, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":504 @@ -95478,7 +89758,6 @@ static int __pyx_pf_4lxml_5etree_23_AppendOnlyElementProxy_4text_2__set__(struct __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_value); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -95494,12 +89773,10 @@ static int __pyx_pf_4lxml_5etree_23_AppendOnlyElementProxy_4text_2__set__(struct static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newAppendOnlyProxy(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_v_source_proxy, xmlNode *__pyx_v_c_node) { struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_v_el = 0; struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_newAppendOnlyProxy", 0); - __Pyx_TraceCall("_newAppendOnlyProxy", __pyx_f[6], 511, 0, __PYX_ERR(6, 511, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":514 * _ReadOnlyProxy source_proxy, xmlNode* c_node): @@ -95508,7 +89785,6 @@ static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newAp * el = _AppendOnlyElementProxy.__new__(_AppendOnlyElementProxy) * elif c_node.type == tree.XML_PI_NODE: */ - __Pyx_TraceLine(514,0,__PYX_ERR(6, 514, __pyx_L1_error)) switch (__pyx_v_c_node->type) { case XML_ELEMENT_NODE: @@ -95519,7 +89795,6 @@ static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newAp * elif c_node.type == tree.XML_PI_NODE: * el = _ModifyContentOnlyPIProxy.__new__(_ModifyContentOnlyPIProxy) */ - __Pyx_TraceLine(515,0,__PYX_ERR(6, 515, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_tp_new_4lxml_5etree__AppendOnlyElementProxy(((PyTypeObject *)__pyx_ptype_4lxml_5etree__AppendOnlyElementProxy), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 515, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_1), __pyx_ptype_4lxml_5etree__ReadOnlyProxy)))) __PYX_ERR(6, 515, __pyx_L1_error) @@ -95534,15 +89809,6 @@ static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newAp * elif c_node.type == tree.XML_PI_NODE: */ break; - - /* "src/lxml/readonlytree.pxi":516 - * if c_node.type == tree.XML_ELEMENT_NODE: - * el = _AppendOnlyElementProxy.__new__(_AppendOnlyElementProxy) - * elif c_node.type == tree.XML_PI_NODE: # <<<<<<<<<<<<<< - * el = _ModifyContentOnlyPIProxy.__new__(_ModifyContentOnlyPIProxy) - * elif c_node.type == tree.XML_COMMENT_NODE: - */ - __Pyx_TraceLine(516,0,__PYX_ERR(6, 516, __pyx_L1_error)) case XML_PI_NODE: /* "src/lxml/readonlytree.pxi":517 @@ -95552,7 +89818,6 @@ static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newAp * elif c_node.type == tree.XML_COMMENT_NODE: * el = _ModifyContentOnlyProxy.__new__(_ModifyContentOnlyProxy) */ - __Pyx_TraceLine(517,0,__PYX_ERR(6, 517, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_tp_new_4lxml_5etree__ModifyContentOnlyPIProxy(((PyTypeObject *)__pyx_ptype_4lxml_5etree__ModifyContentOnlyPIProxy), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 517, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_1), __pyx_ptype_4lxml_5etree__ReadOnlyProxy)))) __PYX_ERR(6, 517, __pyx_L1_error) @@ -95567,15 +89832,6 @@ static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newAp * elif c_node.type == tree.XML_COMMENT_NODE: */ break; - - /* "src/lxml/readonlytree.pxi":518 - * elif c_node.type == tree.XML_PI_NODE: - * el = _ModifyContentOnlyPIProxy.__new__(_ModifyContentOnlyPIProxy) - * elif c_node.type == tree.XML_COMMENT_NODE: # <<<<<<<<<<<<<< - * el = _ModifyContentOnlyProxy.__new__(_ModifyContentOnlyProxy) - * else: - */ - __Pyx_TraceLine(518,0,__PYX_ERR(6, 518, __pyx_L1_error)) case XML_COMMENT_NODE: /* "src/lxml/readonlytree.pxi":519 @@ -95585,7 +89841,6 @@ static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newAp * else: * raise TypeError(f"Unsupported element type: {c_node.type}") */ - __Pyx_TraceLine(519,0,__PYX_ERR(6, 519, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_tp_new_4lxml_5etree__ModifyContentOnlyProxy(((PyTypeObject *)__pyx_ptype_4lxml_5etree__ModifyContentOnlyProxy), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 519, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_1), __pyx_ptype_4lxml_5etree__ReadOnlyProxy)))) __PYX_ERR(6, 519, __pyx_L1_error) @@ -95609,7 +89864,6 @@ static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newAp * el._c_node = c_node * _initReadOnlyProxy(el, source_proxy) */ - __Pyx_TraceLine(521,0,__PYX_ERR(6, 521, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyUnicode_From_xmlElementType(__pyx_v_c_node->type, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unsupported_element_type, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 521, __pyx_L1_error) @@ -95631,7 +89885,6 @@ static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newAp * _initReadOnlyProxy(el, source_proxy) * return el */ - __Pyx_TraceLine(522,0,__PYX_ERR(6, 522, __pyx_L1_error)) __pyx_v_el->_c_node = __pyx_v_c_node; /* "src/lxml/readonlytree.pxi":523 @@ -95641,7 +89894,6 @@ static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newAp * return el * */ - __Pyx_TraceLine(523,0,__PYX_ERR(6, 523, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__initReadOnlyProxy(__pyx_v_el, __pyx_v_source_proxy); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -95653,7 +89905,6 @@ static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newAp * * cdef xmlNode* _roNodeOf(element) except NULL: */ - __Pyx_TraceLine(524,0,__PYX_ERR(6, 524, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_el)); __pyx_r = __pyx_v_el; @@ -95676,7 +89927,6 @@ static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newAp __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_el); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -95692,7 +89942,6 @@ static struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_f_4lxml_5etree__newAp static xmlNode *__pyx_f_4lxml_5etree__roNodeOf(PyObject *__pyx_v_element) { xmlNode *__pyx_v_c_node; xmlNode *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -95700,7 +89949,6 @@ static xmlNode *__pyx_f_4lxml_5etree__roNodeOf(PyObject *__pyx_v_element) { PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_roNodeOf", 0); - __Pyx_TraceCall("_roNodeOf", __pyx_f[6], 526, 0, __PYX_ERR(6, 526, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":528 * cdef xmlNode* _roNodeOf(element) except NULL: @@ -95709,7 +89957,6 @@ static xmlNode *__pyx_f_4lxml_5etree__roNodeOf(PyObject *__pyx_v_element) { * c_node = (<_Element>element)._c_node * elif isinstance(element, _ReadOnlyProxy): */ - __Pyx_TraceLine(528,0,__PYX_ERR(6, 528, __pyx_L1_error)) __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_element, __pyx_ptype_4lxml_5etree__Element); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -95721,7 +89968,6 @@ static xmlNode *__pyx_f_4lxml_5etree__roNodeOf(PyObject *__pyx_v_element) { * elif isinstance(element, _ReadOnlyProxy): * c_node = (<_ReadOnlyProxy>element)._c_node */ - __Pyx_TraceLine(529,0,__PYX_ERR(6, 529, __pyx_L1_error)) __pyx_t_3 = ((struct LxmlElement *)__pyx_v_element)->_c_node; __pyx_v_c_node = __pyx_t_3; @@ -95742,7 +89988,6 @@ static xmlNode *__pyx_f_4lxml_5etree__roNodeOf(PyObject *__pyx_v_element) { * c_node = (<_ReadOnlyProxy>element)._c_node * elif isinstance(element, _OpaqueNodeWrapper): */ - __Pyx_TraceLine(530,0,__PYX_ERR(6, 530, __pyx_L1_error)) __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_element, __pyx_ptype_4lxml_5etree__ReadOnlyProxy); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -95754,7 +89999,6 @@ static xmlNode *__pyx_f_4lxml_5etree__roNodeOf(PyObject *__pyx_v_element) { * elif isinstance(element, _OpaqueNodeWrapper): * c_node = (<_OpaqueNodeWrapper>element)._c_node */ - __Pyx_TraceLine(531,0,__PYX_ERR(6, 531, __pyx_L1_error)) __pyx_t_3 = ((struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *)__pyx_v_element)->_c_node; __pyx_v_c_node = __pyx_t_3; @@ -95775,7 +90019,6 @@ static xmlNode *__pyx_f_4lxml_5etree__roNodeOf(PyObject *__pyx_v_element) { * c_node = (<_OpaqueNodeWrapper>element)._c_node * else: */ - __Pyx_TraceLine(532,0,__PYX_ERR(6, 532, __pyx_L1_error)) __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_element, __pyx_ptype_4lxml_5etree__OpaqueNodeWrapper); __pyx_t_2 = (__pyx_t_1 != 0); if (likely(__pyx_t_2)) { @@ -95787,7 +90030,6 @@ static xmlNode *__pyx_f_4lxml_5etree__roNodeOf(PyObject *__pyx_v_element) { * else: * raise TypeError, f"invalid argument type {type(element)}" */ - __Pyx_TraceLine(533,0,__PYX_ERR(6, 533, __pyx_L1_error)) __pyx_t_3 = ((struct __pyx_obj_4lxml_5etree__OpaqueNodeWrapper *)__pyx_v_element)->_c_node; __pyx_v_c_node = __pyx_t_3; @@ -95808,7 +90050,6 @@ static xmlNode *__pyx_f_4lxml_5etree__roNodeOf(PyObject *__pyx_v_element) { * * if c_node is NULL: */ - __Pyx_TraceLine(535,0,__PYX_ERR(6, 535, __pyx_L1_error)) /*else*/ { __pyx_t_4 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_element)), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -95828,7 +90069,6 @@ static xmlNode *__pyx_f_4lxml_5etree__roNodeOf(PyObject *__pyx_v_element) { * raise TypeError, u"invalid element" * return c_node */ - __Pyx_TraceLine(537,0,__PYX_ERR(6, 537, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node == NULL) != 0); if (unlikely(__pyx_t_2)) { @@ -95839,7 +90079,6 @@ static xmlNode *__pyx_f_4lxml_5etree__roNodeOf(PyObject *__pyx_v_element) { * return c_node * */ - __Pyx_TraceLine(538,0,__PYX_ERR(6, 538, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_invalid_element, 0, 0); __PYX_ERR(6, 538, __pyx_L1_error) @@ -95859,7 +90098,6 @@ static xmlNode *__pyx_f_4lxml_5etree__roNodeOf(PyObject *__pyx_v_element) { * * cdef xmlNode* _nonRoNodeOf(element) except NULL: */ - __Pyx_TraceLine(539,0,__PYX_ERR(6, 539, __pyx_L1_error)) __pyx_r = __pyx_v_c_node; goto __pyx_L0; @@ -95878,7 +90116,6 @@ static xmlNode *__pyx_f_4lxml_5etree__roNodeOf(PyObject *__pyx_v_element) { __Pyx_AddTraceback("lxml.etree._roNodeOf", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -95894,7 +90131,6 @@ static xmlNode *__pyx_f_4lxml_5etree__roNodeOf(PyObject *__pyx_v_element) { static xmlNode *__pyx_f_4lxml_5etree__nonRoNodeOf(PyObject *__pyx_v_element) { xmlNode *__pyx_v_c_node; xmlNode *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -95902,7 +90138,6 @@ static xmlNode *__pyx_f_4lxml_5etree__nonRoNodeOf(PyObject *__pyx_v_element) { PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_nonRoNodeOf", 0); - __Pyx_TraceCall("_nonRoNodeOf", __pyx_f[6], 541, 0, __PYX_ERR(6, 541, __pyx_L1_error)); /* "src/lxml/readonlytree.pxi":543 * cdef xmlNode* _nonRoNodeOf(element) except NULL: @@ -95911,7 +90146,6 @@ static xmlNode *__pyx_f_4lxml_5etree__nonRoNodeOf(PyObject *__pyx_v_element) { * c_node = (<_Element>element)._c_node * elif isinstance(element, _AppendOnlyElementProxy): */ - __Pyx_TraceLine(543,0,__PYX_ERR(6, 543, __pyx_L1_error)) __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_element, __pyx_ptype_4lxml_5etree__Element); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -95923,7 +90157,6 @@ static xmlNode *__pyx_f_4lxml_5etree__nonRoNodeOf(PyObject *__pyx_v_element) { * elif isinstance(element, _AppendOnlyElementProxy): * c_node = (<_AppendOnlyElementProxy>element)._c_node */ - __Pyx_TraceLine(544,0,__PYX_ERR(6, 544, __pyx_L1_error)) __pyx_t_3 = ((struct LxmlElement *)__pyx_v_element)->_c_node; __pyx_v_c_node = __pyx_t_3; @@ -95944,7 +90177,6 @@ static xmlNode *__pyx_f_4lxml_5etree__nonRoNodeOf(PyObject *__pyx_v_element) { * c_node = (<_AppendOnlyElementProxy>element)._c_node * elif isinstance(element, _OpaqueNodeWrapper): */ - __Pyx_TraceLine(545,0,__PYX_ERR(6, 545, __pyx_L1_error)) __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_element, __pyx_ptype_4lxml_5etree__AppendOnlyElementProxy); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -95956,7 +90188,6 @@ static xmlNode *__pyx_f_4lxml_5etree__nonRoNodeOf(PyObject *__pyx_v_element) { * elif isinstance(element, _OpaqueNodeWrapper): * c_node = (<_OpaqueNodeWrapper>element)._c_node */ - __Pyx_TraceLine(546,0,__PYX_ERR(6, 546, __pyx_L1_error)) __pyx_t_3 = ((struct __pyx_obj_4lxml_5etree__AppendOnlyElementProxy *)__pyx_v_element)->__pyx_base.__pyx_base._c_node; __pyx_v_c_node = __pyx_t_3; @@ -95977,7 +90208,6 @@ static xmlNode *__pyx_f_4lxml_5etree__nonRoNodeOf(PyObject *__pyx_v_element) { * c_node = (<_OpaqueNodeWrapper>element)._c_node * else: */ - __Pyx_TraceLine(547,0,__PYX_ERR(6, 547, __pyx_L1_error)) __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_element, __pyx_ptype_4lxml_5etree__OpaqueNodeWrapper); __pyx_t_2 = (__pyx_t_1 != 0); if (likely(__pyx_t_2)) { @@ -95989,7 +90219,6 @@ static xmlNode *__pyx_f_4lxml_5etree__nonRoNodeOf(PyObject *__pyx_v_element) { * else: * raise TypeError, f"invalid argument type {type(element)}" */ - __Pyx_TraceLine(548,0,__PYX_ERR(6, 548, __pyx_L1_error)) __pyx_t_3 = ((struct __pyx_obj_4lxml_5etree__OpaqueNodeWrapper *)__pyx_v_element)->_c_node; __pyx_v_c_node = __pyx_t_3; @@ -96010,7 +90239,6 @@ static xmlNode *__pyx_f_4lxml_5etree__nonRoNodeOf(PyObject *__pyx_v_element) { * * if c_node is NULL: */ - __Pyx_TraceLine(550,0,__PYX_ERR(6, 550, __pyx_L1_error)) /*else*/ { __pyx_t_4 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_element)), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -96030,7 +90258,6 @@ static xmlNode *__pyx_f_4lxml_5etree__nonRoNodeOf(PyObject *__pyx_v_element) { * raise TypeError, u"invalid element" * return c_node */ - __Pyx_TraceLine(552,0,__PYX_ERR(6, 552, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node == NULL) != 0); if (unlikely(__pyx_t_2)) { @@ -96040,7 +90267,6 @@ static xmlNode *__pyx_f_4lxml_5etree__nonRoNodeOf(PyObject *__pyx_v_element) { * raise TypeError, u"invalid element" # <<<<<<<<<<<<<< * return c_node */ - __Pyx_TraceLine(553,0,__PYX_ERR(6, 553, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_invalid_element, 0, 0); __PYX_ERR(6, 553, __pyx_L1_error) @@ -96058,7 +90284,6 @@ static xmlNode *__pyx_f_4lxml_5etree__nonRoNodeOf(PyObject *__pyx_v_element) { * raise TypeError, u"invalid element" * return c_node # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(554,0,__PYX_ERR(6, 554, __pyx_L1_error)) __pyx_r = __pyx_v_c_node; goto __pyx_L0; @@ -96077,7 +90302,6 @@ static xmlNode *__pyx_f_4lxml_5etree__nonRoNodeOf(PyObject *__pyx_v_element) { __Pyx_AddTraceback("lxml.etree._nonRoNodeOf", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -96176,7 +90400,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * PyObject *__pyx_v_tag = NULL; PyObject *__pyx_v_child = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -96195,7 +90418,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * Py_ssize_t __pyx_t_15; int __pyx_t_16; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[7], 42, 0, __PYX_ERR(7, 42, __pyx_L1_error)); /* "src/lxml/classlookup.pxi":45 * u"""ElementBase(*children, attrib=None, nsmap=None, **_extra) @@ -96204,7 +90426,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * cdef _BaseParser parser * cdef _Element last_child */ - __Pyx_TraceLine(45,0,__PYX_ERR(7, 45, __pyx_L1_error)) __pyx_v_is_html = 0; /* "src/lxml/classlookup.pxi":49 @@ -96214,7 +90435,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * try: * namespace = _utf8(_getattr(self, 'NAMESPACE')) */ - __Pyx_TraceLine(49,0,__PYX_ERR(7, 49, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s_getattribute); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__getattr = __pyx_t_1; @@ -96227,7 +90447,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * namespace = _utf8(_getattr(self, 'NAMESPACE')) * except AttributeError: */ - __Pyx_TraceLine(50,0,__PYX_ERR(7, 50, __pyx_L3_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -96244,7 +90463,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * except AttributeError: * namespace = None */ - __Pyx_TraceLine(51,0,__PYX_ERR(7, 51, __pyx_L3_error)) __Pyx_INCREF(__pyx_v__getattr); __pyx_t_5 = __pyx_v__getattr; __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -96322,7 +90540,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * namespace = None * try: */ - __Pyx_TraceLine(52,0,__PYX_ERR(7, 52, __pyx_L5_except_error)) __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_7) { __Pyx_AddTraceback("lxml.etree.ElementBase.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -96338,12 +90555,11 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * try: * ns, tag = _getNsTag(_getattr(self, 'TAG')) */ - __Pyx_TraceLine(53,0,__PYX_ERR(7, 53, __pyx_L5_except_error)) __Pyx_INCREF(Py_None); __Pyx_XDECREF_SET(__pyx_v_namespace, Py_None); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; @@ -96376,7 +90592,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * ns, tag = _getNsTag(_getattr(self, 'TAG')) * if ns is not None: */ - __Pyx_TraceLine(54,0,__PYX_ERR(7, 54, __pyx_L11_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -96393,7 +90608,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * if ns is not None: * namespace = ns */ - __Pyx_TraceLine(55,0,__PYX_ERR(7, 55, __pyx_L11_error)) __Pyx_INCREF(__pyx_v__getattr); __pyx_t_1 = __pyx_v__getattr; __pyx_t_5 = NULL; __pyx_t_7 = 0; @@ -96478,7 +90692,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * namespace = ns * except AttributeError: */ - __Pyx_TraceLine(56,0,__PYX_ERR(7, 56, __pyx_L11_error)) __pyx_t_9 = (__pyx_v_ns != Py_None); __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { @@ -96490,7 +90703,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * except AttributeError: * tag = _utf8(_getattr(_getattr(self, '__class__'), '__name__')) */ - __Pyx_TraceLine(57,0,__PYX_ERR(7, 57, __pyx_L11_error)) __Pyx_INCREF(__pyx_v_ns); __Pyx_DECREF_SET(__pyx_v_namespace, __pyx_v_ns); @@ -96528,7 +90740,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * tag = _utf8(_getattr(_getattr(self, '__class__'), '__name__')) * if b'.' in tag: */ - __Pyx_TraceLine(58,0,__PYX_ERR(7, 58, __pyx_L13_except_error)) __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_7) { __Pyx_AddTraceback("lxml.etree.ElementBase.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -96544,7 +90755,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * if b'.' in tag: * tag = tag.split(b'.')[-1] */ - __Pyx_TraceLine(59,0,__PYX_ERR(7, 59, __pyx_L13_except_error)) __Pyx_INCREF(__pyx_v__getattr); __pyx_t_12 = __pyx_v__getattr; __pyx_t_13 = NULL; __pyx_t_7 = 0; @@ -96652,8 +90862,7 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * tag = tag.split(b'.')[-1] * try: */ - __Pyx_TraceLine(60,0,__PYX_ERR(7, 60, __pyx_L13_except_error)) - __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__11, __pyx_v_tag, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(7, 60, __pyx_L13_except_error) + __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__3, __pyx_v_tag, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(7, 60, __pyx_L13_except_error) __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { @@ -96664,8 +90873,7 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * try: * parser = _getattr(self, 'PARSER') */ - __Pyx_TraceLine(61,0,__PYX_ERR(7, 61, __pyx_L13_except_error)) - __pyx_t_12 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyBytes_Type_split, __pyx_v_tag, __pyx_kp_b__11); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 61, __pyx_L13_except_error) + __pyx_t_12 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyBytes_Type_split, __pyx_v_tag, __pyx_kp_b__3); if (unlikely(!__pyx_t_12)) __PYX_ERR(7, 61, __pyx_L13_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_12, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 61, __pyx_L13_except_error) __Pyx_GOTREF(__pyx_t_5); @@ -96681,9 +90889,9 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * try: */ } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L12_exception_handled; } goto __pyx_L13_except_error; @@ -96716,7 +90924,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * parser = _getattr(self, 'PARSER') * except AttributeError: */ - __Pyx_TraceLine(62,0,__PYX_ERR(7, 62, __pyx_L21_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -96733,7 +90940,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * except AttributeError: * parser = None */ - __Pyx_TraceLine(63,0,__PYX_ERR(7, 63, __pyx_L21_error)) __Pyx_INCREF(__pyx_v__getattr); __pyx_t_6 = __pyx_v__getattr; __pyx_t_1 = NULL; __pyx_t_7 = 0; @@ -96813,7 +91019,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * parser = None * for child in children: */ - __Pyx_TraceLine(64,0,__PYX_ERR(7, 64, __pyx_L23_except_error)) __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_7) { __Pyx_AddTraceback("lxml.etree.ElementBase.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -96829,7 +91034,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * for child in children: * if isinstance(child, _Element): */ - __Pyx_TraceLine(65,0,__PYX_ERR(7, 65, __pyx_L23_except_error)) __Pyx_INCREF(Py_None); __Pyx_XDECREF_SET(__pyx_v_parser, ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None)); @@ -96840,7 +91044,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * if isinstance(child, _Element): * parser = (<_Element>child)._doc._parser */ - __Pyx_TraceLine(66,0,__PYX_ERR(7, 66, __pyx_L23_except_error)) __pyx_t_1 = __pyx_v_children; __Pyx_INCREF(__pyx_t_1); __pyx_t_15 = 0; for (;;) { if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_1)) break; @@ -96860,7 +91063,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * parser = (<_Element>child)._doc._parser * break */ - __Pyx_TraceLine(67,0,__PYX_ERR(7, 67, __pyx_L23_except_error)) __pyx_t_9 = __Pyx_TypeCheck(__pyx_v_child, __pyx_ptype_4lxml_5etree__Element); __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { @@ -96872,7 +91074,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * break * if isinstance(parser, HTMLParser): */ - __Pyx_TraceLine(68,0,__PYX_ERR(7, 68, __pyx_L23_except_error)) __pyx_t_12 = ((PyObject *)((struct LxmlElement *)__pyx_v_child)->_doc->_parser); __Pyx_INCREF(__pyx_t_12); __Pyx_DECREF_SET(__pyx_v_parser, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_12)); @@ -96885,7 +91086,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * if isinstance(parser, HTMLParser): * is_html = 1 */ - __Pyx_TraceLine(69,0,__PYX_ERR(7, 69, __pyx_L23_except_error)) goto __pyx_L30_break; /* "src/lxml/classlookup.pxi":67 @@ -96904,13 +91104,12 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * if isinstance(child, _Element): * parser = (<_Element>child)._doc._parser */ - __Pyx_TraceLine(66,0,__PYX_ERR(7, 66, __pyx_L23_except_error)) } __pyx_L30_break:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L22_exception_handled; } goto __pyx_L23_except_error; @@ -96943,7 +91142,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * is_html = 1 * if namespace is None: */ - __Pyx_TraceLine(70,0,__PYX_ERR(7, 70, __pyx_L1_error)) __pyx_t_10 = __Pyx_TypeCheck(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree_HTMLParser); __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { @@ -96955,7 +91153,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * if namespace is None: * try: */ - __Pyx_TraceLine(71,0,__PYX_ERR(7, 71, __pyx_L1_error)) __pyx_v_is_html = 1; /* "src/lxml/classlookup.pxi":70 @@ -96974,7 +91171,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * try: * is_html = _getattr(self, 'HTML') */ - __Pyx_TraceLine(72,0,__PYX_ERR(7, 72, __pyx_L1_error)) __pyx_t_9 = (__pyx_v_namespace == Py_None); __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { @@ -96986,7 +91182,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * is_html = _getattr(self, 'HTML') * except AttributeError: */ - __Pyx_TraceLine(73,0,__PYX_ERR(7, 73, __pyx_L34_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -97003,7 +91198,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * except AttributeError: * pass */ - __Pyx_TraceLine(74,0,__PYX_ERR(7, 74, __pyx_L34_error)) __Pyx_INCREF(__pyx_v__getattr); __pyx_t_6 = __pyx_v__getattr; __pyx_t_8 = NULL; __pyx_t_7 = 0; @@ -97083,7 +91277,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * pass * _initNewElement(self, is_html, tag, namespace, parser, */ - __Pyx_TraceLine(75,0,__PYX_ERR(7, 75, __pyx_L36_except_error)) __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_7) { __Pyx_ErrRestore(0,0,0); @@ -97128,7 +91321,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * attrib, nsmap, _extra) * last_child = None */ - __Pyx_TraceLine(77,0,__PYX_ERR(7, 77, __pyx_L1_error)) __pyx_t_7 = __pyx_f_4lxml_5etree__initNewElement(((struct LxmlElement *)__pyx_v_self), __pyx_v_is_html, __pyx_v_tag, __pyx_v_namespace, __pyx_v_parser, __pyx_v_attrib, __pyx_v_nsmap, __pyx_v__extra); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(7, 77, __pyx_L1_error) /* "src/lxml/classlookup.pxi":79 @@ -97138,7 +91330,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * for child in children: * if _isString(child): */ - __Pyx_TraceLine(79,0,__PYX_ERR(7, 79, __pyx_L1_error)) __Pyx_INCREF(Py_None); __pyx_v_last_child = ((struct LxmlElement *)Py_None); @@ -97149,7 +91340,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * if _isString(child): * if last_child is None: */ - __Pyx_TraceLine(80,0,__PYX_ERR(7, 80, __pyx_L1_error)) __pyx_t_5 = __pyx_v_children; __Pyx_INCREF(__pyx_t_5); __pyx_t_15 = 0; for (;;) { if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_5)) break; @@ -97169,7 +91359,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * if last_child is None: * _setNodeText(self._c_node, */ - __Pyx_TraceLine(81,0,__PYX_ERR(7, 81, __pyx_L1_error)) __pyx_t_10 = (_isString(__pyx_v_child) != 0); if (__pyx_t_10) { @@ -97180,7 +91369,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * _setNodeText(self._c_node, * (_collectText(self._c_node.children) or '') + child) */ - __Pyx_TraceLine(82,0,__PYX_ERR(7, 82, __pyx_L1_error)) __pyx_t_10 = (((PyObject *)__pyx_v_last_child) == Py_None); __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { @@ -97192,7 +91380,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * else: * _setTailText(last_child._c_node, */ - __Pyx_TraceLine(84,0,__PYX_ERR(7, 84, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__collectText(__pyx_v_self->__pyx_base._c_node->children); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(7, 84, __pyx_L1_error) @@ -97204,8 +91391,8 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L44_bool_binop_done; } - __Pyx_INCREF(__pyx_kp_s__23); - __pyx_t_6 = __pyx_kp_s__23; + __Pyx_INCREF(__pyx_kp_s__11); + __pyx_t_6 = __pyx_kp_s__11; __pyx_L44_bool_binop_done:; __pyx_t_1 = PyNumber_Add(__pyx_t_6, __pyx_v_child); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -97218,7 +91405,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * (_collectText(self._c_node.children) or '') + child) * else: */ - __Pyx_TraceLine(83,0,__PYX_ERR(7, 83, __pyx_L1_error)) __pyx_t_7 = __pyx_f_4lxml_5etree__setNodeText(__pyx_v_self->__pyx_base._c_node, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(7, 83, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -97239,7 +91425,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * (_collectText(last_child._c_node.next) or '') + child) * elif isinstance(child, _Element): */ - __Pyx_TraceLine(86,0,__PYX_ERR(7, 86, __pyx_L1_error)) /*else*/ { /* "src/lxml/classlookup.pxi":87 @@ -97249,7 +91434,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * elif isinstance(child, _Element): * last_child = child */ - __Pyx_TraceLine(87,0,__PYX_ERR(7, 87, __pyx_L1_error)) __pyx_t_6 = __pyx_f_4lxml_5etree__collectText(__pyx_v_last_child->_c_node->next); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(7, 87, __pyx_L1_error) @@ -97261,8 +91445,8 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L46_bool_binop_done; } - __Pyx_INCREF(__pyx_kp_s__23); - __pyx_t_1 = __pyx_kp_s__23; + __Pyx_INCREF(__pyx_kp_s__11); + __pyx_t_1 = __pyx_kp_s__11; __pyx_L46_bool_binop_done:; __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_v_child); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); @@ -97275,7 +91459,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * (_collectText(last_child._c_node.next) or '') + child) * elif isinstance(child, _Element): */ - __Pyx_TraceLine(86,0,__PYX_ERR(7, 86, __pyx_L1_error)) __pyx_t_7 = __pyx_f_4lxml_5etree__setTailText(__pyx_v_last_child->_c_node, __pyx_t_6); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(7, 86, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -97298,7 +91481,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * last_child = child * _appendChild(self, last_child) */ - __Pyx_TraceLine(88,0,__PYX_ERR(7, 88, __pyx_L1_error)) __pyx_t_9 = __Pyx_TypeCheck(__pyx_v_child, __pyx_ptype_4lxml_5etree__Element); __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { @@ -97310,7 +91492,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * _appendChild(self, last_child) * elif isinstance(child, type) and issubclass(child, ElementBase): */ - __Pyx_TraceLine(89,0,__PYX_ERR(7, 89, __pyx_L1_error)) if (!(likely(((__pyx_v_child) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_child, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(7, 89, __pyx_L1_error) __pyx_t_6 = __pyx_v_child; __Pyx_INCREF(__pyx_t_6); @@ -97324,7 +91505,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * elif isinstance(child, type) and issubclass(child, ElementBase): * last_child = child() */ - __Pyx_TraceLine(90,0,__PYX_ERR(7, 90, __pyx_L1_error)) __pyx_t_7 = __pyx_f_4lxml_5etree__appendChild(((struct LxmlElement *)__pyx_v_self), __pyx_v_last_child); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(7, 90, __pyx_L1_error) /* "src/lxml/classlookup.pxi":88 @@ -97344,7 +91524,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * last_child = child() * _appendChild(self, last_child) */ - __Pyx_TraceLine(91,0,__PYX_ERR(7, 91, __pyx_L1_error)) __pyx_t_9 = PyType_Check(__pyx_v_child); __pyx_t_16 = (__pyx_t_9 != 0); if (__pyx_t_16) { @@ -97365,7 +91544,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * _appendChild(self, last_child) * else: */ - __Pyx_TraceLine(92,0,__PYX_ERR(7, 92, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_child); __pyx_t_1 = __pyx_v_child; __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { @@ -97377,12 +91555,9 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * __Pyx_DECREF_SET(__pyx_t_1, function); } } - if (__pyx_t_8) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 92, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } else { - __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 92, __pyx_L1_error) - } + __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(7, 92, __pyx_L1_error) @@ -97396,7 +91571,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * else: * raise TypeError, f"Invalid child type: {type(child)!r}" */ - __Pyx_TraceLine(93,0,__PYX_ERR(7, 93, __pyx_L1_error)) __pyx_t_7 = __pyx_f_4lxml_5etree__appendChild(((struct LxmlElement *)__pyx_v_self), __pyx_v_last_child); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(7, 93, __pyx_L1_error) /* "src/lxml/classlookup.pxi":91 @@ -97416,7 +91590,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * * cdef class CommentBase(_Comment): */ - __Pyx_TraceLine(95,0,__PYX_ERR(7, 95, __pyx_L1_error)) /*else*/ { __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(((PyObject *)Py_TYPE(__pyx_v_child))), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); @@ -97436,7 +91609,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * * if _isString(child): * if last_child is None: */ - __Pyx_TraceLine(80,0,__PYX_ERR(7, 80, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -97470,7 +91642,6 @@ static int __pyx_pf_4lxml_5etree_11ElementBase___init__(struct LxmlElementBase * __Pyx_XDECREF(__pyx_v_ns); __Pyx_XDECREF(__pyx_v_tag); __Pyx_XDECREF(__pyx_v_child); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -97537,7 +91708,6 @@ static int __pyx_pf_4lxml_5etree_11CommentBase___init__(struct __pyx_obj_4lxml_5 struct LxmlDocument *__pyx_v_doc = 0; xmlDoc *__pyx_v_c_doc; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -97547,7 +91717,6 @@ static int __pyx_pf_4lxml_5etree_11CommentBase___init__(struct __pyx_obj_4lxml_5 PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[7], 109, 0, __PYX_ERR(7, 109, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_text); /* "src/lxml/classlookup.pxi":113 @@ -97557,7 +91726,6 @@ static int __pyx_pf_4lxml_5etree_11CommentBase___init__(struct __pyx_obj_4lxml_5 * text = b'' * else: */ - __Pyx_TraceLine(113,0,__PYX_ERR(7, 113, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_text == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -97569,9 +91737,8 @@ static int __pyx_pf_4lxml_5etree_11CommentBase___init__(struct __pyx_obj_4lxml_5 * else: * text = _utf8(text) */ - __Pyx_TraceLine(114,0,__PYX_ERR(7, 114, __pyx_L1_error)) - __Pyx_INCREF(__pyx_kp_b__23); - __Pyx_DECREF_SET(__pyx_v_text, __pyx_kp_b__23); + __Pyx_INCREF(__pyx_kp_b__11); + __Pyx_DECREF_SET(__pyx_v_text, __pyx_kp_b__11); /* "src/lxml/classlookup.pxi":113 * cdef _Document doc @@ -97590,7 +91757,6 @@ static int __pyx_pf_4lxml_5etree_11CommentBase___init__(struct __pyx_obj_4lxml_5 * c_doc = _newXMLDoc() * doc = _documentFactory(c_doc, None) */ - __Pyx_TraceLine(116,0,__PYX_ERR(7, 116, __pyx_L1_error)) /*else*/ { __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -97606,7 +91772,6 @@ static int __pyx_pf_4lxml_5etree_11CommentBase___init__(struct __pyx_obj_4lxml_5 * doc = _documentFactory(c_doc, None) * self._c_node = _createComment(c_doc, _xcstr(text)) */ - __Pyx_TraceLine(117,0,__PYX_ERR(7, 117, __pyx_L1_error)) __pyx_t_4 = __pyx_f_4lxml_5etree__newXMLDoc(); if (unlikely(__pyx_t_4 == ((xmlDoc *)NULL))) __PYX_ERR(7, 117, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_4; @@ -97617,7 +91782,6 @@ static int __pyx_pf_4lxml_5etree_11CommentBase___init__(struct __pyx_obj_4lxml_5 * self._c_node = _createComment(c_doc, _xcstr(text)) * if self._c_node is NULL: */ - __Pyx_TraceLine(118,0,__PYX_ERR(7, 118, __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(7, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_3); @@ -97630,7 +91794,6 @@ static int __pyx_pf_4lxml_5etree_11CommentBase___init__(struct __pyx_obj_4lxml_5 * if self._c_node is NULL: * raise MemoryError() */ - __Pyx_TraceLine(119,0,__PYX_ERR(7, 119, __pyx_L1_error)) __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._c_node = __pyx_f_4lxml_5etree__createComment(__pyx_v_c_doc, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_text)); /* "src/lxml/classlookup.pxi":120 @@ -97640,7 +91803,6 @@ static int __pyx_pf_4lxml_5etree_11CommentBase___init__(struct __pyx_obj_4lxml_5 * raise MemoryError() * tree.xmlAddChild(c_doc, self._c_node) */ - __Pyx_TraceLine(120,0,__PYX_ERR(7, 120, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._c_node == NULL) != 0); if (unlikely(__pyx_t_2)) { @@ -97651,7 +91813,6 @@ static int __pyx_pf_4lxml_5etree_11CommentBase___init__(struct __pyx_obj_4lxml_5 * tree.xmlAddChild(c_doc, self._c_node) * _registerProxy(self, doc, self._c_node) */ - __Pyx_TraceLine(121,0,__PYX_ERR(7, 121, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(7, 121, __pyx_L1_error) /* "src/lxml/classlookup.pxi":120 @@ -97670,7 +91831,6 @@ static int __pyx_pf_4lxml_5etree_11CommentBase___init__(struct __pyx_obj_4lxml_5 * _registerProxy(self, doc, self._c_node) * self._init() */ - __Pyx_TraceLine(122,0,__PYX_ERR(7, 122, __pyx_L1_error)) (void)(xmlAddChild(((xmlNode *)__pyx_v_c_doc), __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._c_node)); /* "src/lxml/classlookup.pxi":123 @@ -97680,7 +91840,6 @@ static int __pyx_pf_4lxml_5etree_11CommentBase___init__(struct __pyx_obj_4lxml_5 * self._init() * */ - __Pyx_TraceLine(123,0,__PYX_ERR(7, 123, __pyx_L1_error)) __pyx_t_5 = __pyx_f_4lxml_5etree__registerProxy(((struct LxmlElement *)__pyx_v_self), __pyx_v_doc, __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 123, __pyx_L1_error) /* "src/lxml/classlookup.pxi":124 @@ -97690,7 +91849,6 @@ static int __pyx_pf_4lxml_5etree_11CommentBase___init__(struct __pyx_obj_4lxml_5 * * cdef class PIBase(_ProcessingInstruction): */ - __Pyx_TraceLine(124,0,__PYX_ERR(7, 124, __pyx_L1_error)) __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; @@ -97703,12 +91861,9 @@ static int __pyx_pf_4lxml_5etree_11CommentBase___init__(struct __pyx_obj_4lxml_5 __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (__pyx_t_7) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 124, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 124, __pyx_L1_error) - } + __pyx_t_3 = (__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_3)) __PYX_ERR(7, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -97733,7 +91888,6 @@ static int __pyx_pf_4lxml_5etree_11CommentBase___init__(struct __pyx_obj_4lxml_5 __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XDECREF(__pyx_v_text); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -97815,7 +91969,6 @@ static int __pyx_pf_4lxml_5etree_6PIBase___init__(struct __pyx_obj_4lxml_5etree_ struct LxmlDocument *__pyx_v_doc = 0; xmlDoc *__pyx_v_c_doc; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -97825,7 +91978,6 @@ static int __pyx_pf_4lxml_5etree_6PIBase___init__(struct __pyx_obj_4lxml_5etree_ PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[7], 139, 0, __PYX_ERR(7, 139, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_target); __Pyx_INCREF(__pyx_v_text); @@ -97836,7 +91988,6 @@ static int __pyx_pf_4lxml_5etree_6PIBase___init__(struct __pyx_obj_4lxml_5etree_ * if text is None: * text = b'' */ - __Pyx_TraceLine(143,0,__PYX_ERR(7, 143, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_target); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_target, __pyx_t_1); @@ -97849,7 +92000,6 @@ static int __pyx_pf_4lxml_5etree_6PIBase___init__(struct __pyx_obj_4lxml_5etree_ * text = b'' * else: */ - __Pyx_TraceLine(144,0,__PYX_ERR(7, 144, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_text == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -97861,9 +92011,8 @@ static int __pyx_pf_4lxml_5etree_6PIBase___init__(struct __pyx_obj_4lxml_5etree_ * else: * text = _utf8(text) */ - __Pyx_TraceLine(145,0,__PYX_ERR(7, 145, __pyx_L1_error)) - __Pyx_INCREF(__pyx_kp_b__23); - __Pyx_DECREF_SET(__pyx_v_text, __pyx_kp_b__23); + __Pyx_INCREF(__pyx_kp_b__11); + __Pyx_DECREF_SET(__pyx_v_text, __pyx_kp_b__11); /* "src/lxml/classlookup.pxi":144 * cdef xmlDoc* c_doc @@ -97882,7 +92031,6 @@ static int __pyx_pf_4lxml_5etree_6PIBase___init__(struct __pyx_obj_4lxml_5etree_ * c_doc = _newXMLDoc() * doc = _documentFactory(c_doc, None) */ - __Pyx_TraceLine(147,0,__PYX_ERR(7, 147, __pyx_L1_error)) /*else*/ { __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -97898,7 +92046,6 @@ static int __pyx_pf_4lxml_5etree_6PIBase___init__(struct __pyx_obj_4lxml_5etree_ * doc = _documentFactory(c_doc, None) * self._c_node = _createPI(c_doc, _xcstr(target), _xcstr(text)) */ - __Pyx_TraceLine(148,0,__PYX_ERR(7, 148, __pyx_L1_error)) __pyx_t_4 = __pyx_f_4lxml_5etree__newXMLDoc(); if (unlikely(__pyx_t_4 == ((xmlDoc *)NULL))) __PYX_ERR(7, 148, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_4; @@ -97909,7 +92056,6 @@ static int __pyx_pf_4lxml_5etree_6PIBase___init__(struct __pyx_obj_4lxml_5etree_ * self._c_node = _createPI(c_doc, _xcstr(target), _xcstr(text)) * if self._c_node is NULL: */ - __Pyx_TraceLine(149,0,__PYX_ERR(7, 149, __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(7, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_1); @@ -97922,7 +92068,6 @@ static int __pyx_pf_4lxml_5etree_6PIBase___init__(struct __pyx_obj_4lxml_5etree_ * if self._c_node is NULL: * raise MemoryError() */ - __Pyx_TraceLine(150,0,__PYX_ERR(7, 150, __pyx_L1_error)) __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._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)); /* "src/lxml/classlookup.pxi":151 @@ -97932,7 +92077,6 @@ static int __pyx_pf_4lxml_5etree_6PIBase___init__(struct __pyx_obj_4lxml_5etree_ * raise MemoryError() * tree.xmlAddChild(c_doc, self._c_node) */ - __Pyx_TraceLine(151,0,__PYX_ERR(7, 151, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._c_node == NULL) != 0); if (unlikely(__pyx_t_3)) { @@ -97943,7 +92087,6 @@ static int __pyx_pf_4lxml_5etree_6PIBase___init__(struct __pyx_obj_4lxml_5etree_ * tree.xmlAddChild(c_doc, self._c_node) * _registerProxy(self, doc, self._c_node) */ - __Pyx_TraceLine(152,0,__PYX_ERR(7, 152, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(7, 152, __pyx_L1_error) /* "src/lxml/classlookup.pxi":151 @@ -97962,7 +92105,6 @@ static int __pyx_pf_4lxml_5etree_6PIBase___init__(struct __pyx_obj_4lxml_5etree_ * _registerProxy(self, doc, self._c_node) * self._init() */ - __Pyx_TraceLine(153,0,__PYX_ERR(7, 153, __pyx_L1_error)) (void)(xmlAddChild(((xmlNode *)__pyx_v_c_doc), __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._c_node)); /* "src/lxml/classlookup.pxi":154 @@ -97972,7 +92114,6 @@ static int __pyx_pf_4lxml_5etree_6PIBase___init__(struct __pyx_obj_4lxml_5etree_ * self._init() * */ - __Pyx_TraceLine(154,0,__PYX_ERR(7, 154, __pyx_L1_error)) __pyx_t_5 = __pyx_f_4lxml_5etree__registerProxy(((struct LxmlElement *)__pyx_v_self), __pyx_v_doc, __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 154, __pyx_L1_error) /* "src/lxml/classlookup.pxi":155 @@ -97982,7 +92123,6 @@ static int __pyx_pf_4lxml_5etree_6PIBase___init__(struct __pyx_obj_4lxml_5etree_ * * cdef class EntityBase(_Entity): */ - __Pyx_TraceLine(155,0,__PYX_ERR(7, 155, __pyx_L1_error)) __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; @@ -97995,12 +92135,9 @@ static int __pyx_pf_4lxml_5etree_6PIBase___init__(struct __pyx_obj_4lxml_5etree_ __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (__pyx_t_7) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 155, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 155, __pyx_L1_error) - } + __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(7, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -98026,7 +92163,6 @@ static int __pyx_pf_4lxml_5etree_6PIBase___init__(struct __pyx_obj_4lxml_5etree_ __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XDECREF(__pyx_v_target); __Pyx_XDECREF(__pyx_v_text); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -98095,7 +92231,6 @@ static int __pyx_pf_4lxml_5etree_10EntityBase___init__(struct __pyx_obj_4lxml_5e PyObject *__pyx_v_name_utf = NULL; const xmlChar *__pyx_v_c_name; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -98106,7 +92241,6 @@ static int __pyx_pf_4lxml_5etree_10EntityBase___init__(struct __pyx_obj_4lxml_5e int __pyx_t_7; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[7], 169, 0, __PYX_ERR(7, 169, __pyx_L1_error)); /* "src/lxml/classlookup.pxi":172 * cdef _Document doc @@ -98115,7 +92249,6 @@ static int __pyx_pf_4lxml_5etree_10EntityBase___init__(struct __pyx_obj_4lxml_5e * c_name = _xcstr(name_utf) * if c_name[0] == c'#': */ - __Pyx_TraceLine(172,0,__PYX_ERR(7, 172, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_name_utf = ((PyObject*)__pyx_t_1); @@ -98128,7 +92261,6 @@ static int __pyx_pf_4lxml_5etree_10EntityBase___init__(struct __pyx_obj_4lxml_5e * if c_name[0] == c'#': * if not _characterReferenceIsValid(c_name + 1): */ - __Pyx_TraceLine(173,0,__PYX_ERR(7, 173, __pyx_L1_error)) __pyx_v_c_name = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_name_utf); /* "src/lxml/classlookup.pxi":174 @@ -98138,7 +92270,6 @@ static int __pyx_pf_4lxml_5etree_10EntityBase___init__(struct __pyx_obj_4lxml_5e * if not _characterReferenceIsValid(c_name + 1): * raise ValueError, f"Invalid character reference: '{name}'" */ - __Pyx_TraceLine(174,0,__PYX_ERR(7, 174, __pyx_L1_error)) __pyx_t_2 = (((__pyx_v_c_name[0]) == '#') != 0); if (__pyx_t_2) { @@ -98149,7 +92280,6 @@ static int __pyx_pf_4lxml_5etree_10EntityBase___init__(struct __pyx_obj_4lxml_5e * raise ValueError, f"Invalid character reference: '{name}'" * elif not _xmlNameIsValid(c_name): */ - __Pyx_TraceLine(175,0,__PYX_ERR(7, 175, __pyx_L1_error)) __pyx_t_2 = ((!(__pyx_f_4lxml_5etree__characterReferenceIsValid((__pyx_v_c_name + 1)) != 0)) != 0); if (unlikely(__pyx_t_2)) { @@ -98160,7 +92290,6 @@ static int __pyx_pf_4lxml_5etree_10EntityBase___init__(struct __pyx_obj_4lxml_5e * elif not _xmlNameIsValid(c_name): * raise ValueError, f"Invalid entity reference: '{name}'" */ - __Pyx_TraceLine(176,0,__PYX_ERR(7, 176, __pyx_L1_error)) __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = 0; @@ -98176,10 +92305,10 @@ static int __pyx_pf_4lxml_5etree_10EntityBase___init__(struct __pyx_obj_4lxml_5e __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5); __pyx_t_5 = 0; - __Pyx_INCREF(__pyx_kp_u__60); + __Pyx_INCREF(__pyx_kp_u__21); __pyx_t_3 += 1; - __Pyx_GIVEREF(__pyx_kp_u__60); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__60); + __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(7, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -98213,7 +92342,6 @@ static int __pyx_pf_4lxml_5etree_10EntityBase___init__(struct __pyx_obj_4lxml_5e * raise ValueError, f"Invalid entity reference: '{name}'" * c_doc = _newXMLDoc() */ - __Pyx_TraceLine(177,0,__PYX_ERR(7, 177, __pyx_L1_error)) __pyx_t_2 = ((!(__pyx_f_4lxml_5etree__xmlNameIsValid(__pyx_v_c_name) != 0)) != 0); if (unlikely(__pyx_t_2)) { @@ -98224,7 +92352,6 @@ static int __pyx_pf_4lxml_5etree_10EntityBase___init__(struct __pyx_obj_4lxml_5e * c_doc = _newXMLDoc() * doc = _documentFactory(c_doc, None) */ - __Pyx_TraceLine(178,0,__PYX_ERR(7, 178, __pyx_L1_error)) __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = 0; @@ -98240,10 +92367,10 @@ static int __pyx_pf_4lxml_5etree_10EntityBase___init__(struct __pyx_obj_4lxml_5e __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __pyx_t_1 = 0; - __Pyx_INCREF(__pyx_kp_u__60); + __Pyx_INCREF(__pyx_kp_u__21); __pyx_t_3 += 1; - __Pyx_GIVEREF(__pyx_kp_u__60); - PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__60); + __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(7, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -98268,7 +92395,6 @@ static int __pyx_pf_4lxml_5etree_10EntityBase___init__(struct __pyx_obj_4lxml_5e * doc = _documentFactory(c_doc, None) * self._c_node = _createEntity(c_doc, c_name) */ - __Pyx_TraceLine(179,0,__PYX_ERR(7, 179, __pyx_L1_error)) __pyx_t_6 = __pyx_f_4lxml_5etree__newXMLDoc(); if (unlikely(__pyx_t_6 == ((xmlDoc *)NULL))) __PYX_ERR(7, 179, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_6; @@ -98279,7 +92405,6 @@ static int __pyx_pf_4lxml_5etree_10EntityBase___init__(struct __pyx_obj_4lxml_5e * self._c_node = _createEntity(c_doc, c_name) * if self._c_node is NULL: */ - __Pyx_TraceLine(180,0,__PYX_ERR(7, 180, __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(7, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_1); @@ -98292,7 +92417,6 @@ static int __pyx_pf_4lxml_5etree_10EntityBase___init__(struct __pyx_obj_4lxml_5e * if self._c_node is NULL: * raise MemoryError() */ - __Pyx_TraceLine(181,0,__PYX_ERR(7, 181, __pyx_L1_error)) __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._c_node = __pyx_f_4lxml_5etree__createEntity(__pyx_v_c_doc, __pyx_v_c_name); /* "src/lxml/classlookup.pxi":182 @@ -98302,7 +92426,6 @@ static int __pyx_pf_4lxml_5etree_10EntityBase___init__(struct __pyx_obj_4lxml_5e * raise MemoryError() * tree.xmlAddChild(c_doc, self._c_node) */ - __Pyx_TraceLine(182,0,__PYX_ERR(7, 182, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._c_node == NULL) != 0); if (unlikely(__pyx_t_2)) { @@ -98313,7 +92436,6 @@ static int __pyx_pf_4lxml_5etree_10EntityBase___init__(struct __pyx_obj_4lxml_5e * tree.xmlAddChild(c_doc, self._c_node) * _registerProxy(self, doc, self._c_node) */ - __Pyx_TraceLine(183,0,__PYX_ERR(7, 183, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(7, 183, __pyx_L1_error) /* "src/lxml/classlookup.pxi":182 @@ -98332,7 +92454,6 @@ static int __pyx_pf_4lxml_5etree_10EntityBase___init__(struct __pyx_obj_4lxml_5e * _registerProxy(self, doc, self._c_node) * self._init() */ - __Pyx_TraceLine(184,0,__PYX_ERR(7, 184, __pyx_L1_error)) (void)(xmlAddChild(((xmlNode *)__pyx_v_c_doc), __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._c_node)); /* "src/lxml/classlookup.pxi":185 @@ -98342,7 +92463,6 @@ static int __pyx_pf_4lxml_5etree_10EntityBase___init__(struct __pyx_obj_4lxml_5e * self._init() * */ - __Pyx_TraceLine(185,0,__PYX_ERR(7, 185, __pyx_L1_error)) __pyx_t_7 = __pyx_f_4lxml_5etree__registerProxy(((struct LxmlElement *)__pyx_v_self), __pyx_v_doc, __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(7, 185, __pyx_L1_error) /* "src/lxml/classlookup.pxi":186 @@ -98352,7 +92472,6 @@ static int __pyx_pf_4lxml_5etree_10EntityBase___init__(struct __pyx_obj_4lxml_5e * * */ - __Pyx_TraceLine(186,0,__PYX_ERR(7, 186, __pyx_L1_error)) __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = NULL; @@ -98365,12 +92484,9 @@ static int __pyx_pf_4lxml_5etree_10EntityBase___init__(struct __pyx_obj_4lxml_5e __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (__pyx_t_8) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 186, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 186, __pyx_L1_error) - } + __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -98395,7 +92511,6 @@ static int __pyx_pf_4lxml_5etree_10EntityBase___init__(struct __pyx_obj_4lxml_5e __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XDECREF(__pyx_v_name_utf); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -98411,7 +92526,6 @@ static int __pyx_pf_4lxml_5etree_10EntityBase___init__(struct __pyx_obj_4lxml_5e static int __pyx_f_4lxml_5etree__validateNodeClass(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_cls) { PyTypeObject *__pyx_v_expected = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -98421,7 +92535,6 @@ static int __pyx_f_4lxml_5etree__validateNodeClass(xmlNode *__pyx_v_c_node, PyOb Py_ssize_t __pyx_t_6; Py_UCS4 __pyx_t_7; __Pyx_RefNannySetupContext("_validateNodeClass", 0); - __Pyx_TraceCall("_validateNodeClass", __pyx_f[7], 189, 0, __PYX_ERR(7, 189, __pyx_L1_error)); /* "src/lxml/classlookup.pxi":190 * @@ -98430,7 +92543,6 @@ static int __pyx_f_4lxml_5etree__validateNodeClass(xmlNode *__pyx_v_c_node, PyOb * expected = ElementBase * elif c_node.type == tree.XML_COMMENT_NODE: */ - __Pyx_TraceLine(190,0,__PYX_ERR(7, 190, __pyx_L1_error)) switch (__pyx_v_c_node->type) { case XML_ELEMENT_NODE: @@ -98441,7 +92553,6 @@ static int __pyx_f_4lxml_5etree__validateNodeClass(xmlNode *__pyx_v_c_node, PyOb * elif c_node.type == tree.XML_COMMENT_NODE: * expected = CommentBase */ - __Pyx_TraceLine(191,0,__PYX_ERR(7, 191, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_5etree_ElementBase)); __pyx_v_expected = __pyx_ptype_4lxml_5etree_ElementBase; @@ -98453,15 +92564,6 @@ static int __pyx_f_4lxml_5etree__validateNodeClass(xmlNode *__pyx_v_c_node, PyOb * elif c_node.type == tree.XML_COMMENT_NODE: */ break; - - /* "src/lxml/classlookup.pxi":192 - * if c_node.type == tree.XML_ELEMENT_NODE: - * expected = ElementBase - * elif c_node.type == tree.XML_COMMENT_NODE: # <<<<<<<<<<<<<< - * expected = CommentBase - * elif c_node.type == tree.XML_ENTITY_REF_NODE: - */ - __Pyx_TraceLine(192,0,__PYX_ERR(7, 192, __pyx_L1_error)) case XML_COMMENT_NODE: /* "src/lxml/classlookup.pxi":193 @@ -98471,7 +92573,6 @@ static int __pyx_f_4lxml_5etree__validateNodeClass(xmlNode *__pyx_v_c_node, PyOb * elif c_node.type == tree.XML_ENTITY_REF_NODE: * expected = EntityBase */ - __Pyx_TraceLine(193,0,__PYX_ERR(7, 193, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_5etree_CommentBase)); __pyx_v_expected = __pyx_ptype_4lxml_5etree_CommentBase; @@ -98483,15 +92584,6 @@ static int __pyx_f_4lxml_5etree__validateNodeClass(xmlNode *__pyx_v_c_node, PyOb * elif c_node.type == tree.XML_ENTITY_REF_NODE: */ break; - - /* "src/lxml/classlookup.pxi":194 - * elif c_node.type == tree.XML_COMMENT_NODE: - * expected = CommentBase - * elif c_node.type == tree.XML_ENTITY_REF_NODE: # <<<<<<<<<<<<<< - * expected = EntityBase - * elif c_node.type == tree.XML_PI_NODE: - */ - __Pyx_TraceLine(194,0,__PYX_ERR(7, 194, __pyx_L1_error)) case XML_ENTITY_REF_NODE: /* "src/lxml/classlookup.pxi":195 @@ -98501,7 +92593,6 @@ static int __pyx_f_4lxml_5etree__validateNodeClass(xmlNode *__pyx_v_c_node, PyOb * elif c_node.type == tree.XML_PI_NODE: * expected = PIBase */ - __Pyx_TraceLine(195,0,__PYX_ERR(7, 195, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_5etree_EntityBase)); __pyx_v_expected = __pyx_ptype_4lxml_5etree_EntityBase; @@ -98513,15 +92604,6 @@ static int __pyx_f_4lxml_5etree__validateNodeClass(xmlNode *__pyx_v_c_node, PyOb * elif c_node.type == tree.XML_PI_NODE: */ break; - - /* "src/lxml/classlookup.pxi":196 - * elif c_node.type == tree.XML_ENTITY_REF_NODE: - * expected = EntityBase - * elif c_node.type == tree.XML_PI_NODE: # <<<<<<<<<<<<<< - * expected = PIBase - * else: - */ - __Pyx_TraceLine(196,0,__PYX_ERR(7, 196, __pyx_L1_error)) case XML_PI_NODE: /* "src/lxml/classlookup.pxi":197 @@ -98529,9 +92611,8 @@ static int __pyx_f_4lxml_5etree__validateNodeClass(xmlNode *__pyx_v_c_node, PyOb * elif c_node.type == tree.XML_PI_NODE: * expected = PIBase # <<<<<<<<<<<<<< * else: - * assert 0, f"Unknown node type: {c_node.type}" + * assert False, f"Unknown node type: {c_node.type}" */ - __Pyx_TraceLine(197,0,__PYX_ERR(7, 197, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_5etree_PIBase)); __pyx_v_expected = __pyx_ptype_4lxml_5etree_PIBase; @@ -98548,11 +92629,10 @@ static int __pyx_f_4lxml_5etree__validateNodeClass(xmlNode *__pyx_v_c_node, PyOb /* "src/lxml/classlookup.pxi":199 * expected = PIBase * else: - * assert 0, f"Unknown node type: {c_node.type}" # <<<<<<<<<<<<<< + * assert False, f"Unknown node type: {c_node.type}" # <<<<<<<<<<<<<< * * if not (isinstance(cls, type) and issubclass(cls, expected)): */ - __Pyx_TraceLine(199,0,__PYX_ERR(7, 199, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!0)) { @@ -98571,13 +92651,12 @@ static int __pyx_f_4lxml_5etree__validateNodeClass(xmlNode *__pyx_v_c_node, PyOb } /* "src/lxml/classlookup.pxi":201 - * assert 0, f"Unknown node type: {c_node.type}" + * assert False, f"Unknown node type: {c_node.type}" * * if not (isinstance(cls, type) and issubclass(cls, expected)): # <<<<<<<<<<<<<< * raise TypeError( * f"result of class lookup must be subclass of {type(expected)}, got {type(cls)}") */ - __Pyx_TraceLine(201,0,__PYX_ERR(7, 201, __pyx_L1_error)) __pyx_t_4 = PyType_Check(__pyx_v_cls); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { @@ -98600,7 +92679,6 @@ static int __pyx_f_4lxml_5etree__validateNodeClass(xmlNode *__pyx_v_c_node, PyOb * return 0 * */ - __Pyx_TraceLine(203,0,__PYX_ERR(7, 203, __pyx_L1_error)) __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = 0; @@ -98639,7 +92717,6 @@ static int __pyx_f_4lxml_5etree__validateNodeClass(xmlNode *__pyx_v_c_node, PyOb * f"result of class lookup must be subclass of {type(expected)}, got {type(cls)}") * return 0 */ - __Pyx_TraceLine(202,0,__PYX_ERR(7, 202, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -98648,7 +92725,7 @@ static int __pyx_f_4lxml_5etree__validateNodeClass(xmlNode *__pyx_v_c_node, PyOb __PYX_ERR(7, 202, __pyx_L1_error) /* "src/lxml/classlookup.pxi":201 - * assert 0, f"Unknown node type: {c_node.type}" + * assert False, f"Unknown node type: {c_node.type}" * * if not (isinstance(cls, type) and issubclass(cls, expected)): # <<<<<<<<<<<<<< * raise TypeError( @@ -98663,7 +92740,6 @@ static int __pyx_f_4lxml_5etree__validateNodeClass(xmlNode *__pyx_v_c_node, PyOb * * */ - __Pyx_TraceLine(204,0,__PYX_ERR(7, 204, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -98683,7 +92759,6 @@ static int __pyx_f_4lxml_5etree__validateNodeClass(xmlNode *__pyx_v_c_node, PyOb __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_expected); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -98714,10 +92789,8 @@ static int __pyx_pw_4lxml_5etree_26FallbackElementClassLookup_1__cinit__(PyObjec static int __pyx_pf_4lxml_5etree_26FallbackElementClassLookup___cinit__(struct LxmlFallbackElementClassLookup *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[7], 230, 0, __PYX_ERR(7, 230, __pyx_L1_error)); /* "src/lxml/classlookup.pxi":232 * def __cinit__(self): @@ -98726,7 +92799,6 @@ static int __pyx_pf_4lxml_5etree_26FallbackElementClassLookup___cinit__(struct L * * def __init__(self, ElementClassLookup fallback=None): */ - __Pyx_TraceLine(232,0,__PYX_ERR(7, 232, __pyx_L1_error)) __pyx_v_self->_fallback_function = __pyx_f_4lxml_5etree__lookupDefaultElementClass; /* "src/lxml/classlookup.pxi":230 @@ -98739,12 +92811,6 @@ static int __pyx_pf_4lxml_5etree_26FallbackElementClassLookup___cinit__(struct L /* function exit code */ __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.FallbackElementClassLookup.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -98820,12 +92886,10 @@ static int __pyx_pw_4lxml_5etree_26FallbackElementClassLookup_3__init__(PyObject static int __pyx_pf_4lxml_5etree_26FallbackElementClassLookup_2__init__(struct LxmlFallbackElementClassLookup *__pyx_v_self, struct LxmlElementClassLookup *__pyx_v_fallback) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[7], 234, 0, __PYX_ERR(7, 234, __pyx_L1_error)); /* "src/lxml/classlookup.pxi":235 * @@ -98834,7 +92898,6 @@ static int __pyx_pf_4lxml_5etree_26FallbackElementClassLookup_2__init__(struct L * self._setFallback(fallback) * else: */ - __Pyx_TraceLine(235,0,__PYX_ERR(7, 235, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_fallback) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -98846,7 +92909,6 @@ static int __pyx_pf_4lxml_5etree_26FallbackElementClassLookup_2__init__(struct L * else: * self._fallback_function = _lookupDefaultElementClass */ - __Pyx_TraceLine(236,0,__PYX_ERR(7, 236, __pyx_L1_error)) ((struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup *)__pyx_v_self->__pyx_vtab)->_setFallback(__pyx_v_self, __pyx_v_fallback); /* "src/lxml/classlookup.pxi":235 @@ -98866,7 +92928,6 @@ static int __pyx_pf_4lxml_5etree_26FallbackElementClassLookup_2__init__(struct L * * cdef void _setFallback(self, ElementClassLookup lookup): */ - __Pyx_TraceLine(238,0,__PYX_ERR(7, 238, __pyx_L1_error)) /*else*/ { __pyx_v_self->_fallback_function = __pyx_f_4lxml_5etree__lookupDefaultElementClass; } @@ -98882,12 +92943,6 @@ static int __pyx_pf_4lxml_5etree_26FallbackElementClassLookup_2__init__(struct L /* function exit code */ __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.FallbackElementClassLookup.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -98901,12 +92956,10 @@ static int __pyx_pf_4lxml_5etree_26FallbackElementClassLookup_2__init__(struct L */ static void __pyx_f_4lxml_5etree_26FallbackElementClassLookup__setFallback(struct LxmlFallbackElementClassLookup *__pyx_v_self, struct LxmlElementClassLookup *__pyx_v_lookup) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations _element_class_lookup_function __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_setFallback", 0); - __Pyx_TraceCall("_setFallback", __pyx_f[7], 240, 0, __PYX_ERR(7, 240, __pyx_L1_error)); /* "src/lxml/classlookup.pxi":243 * u"""Sets the fallback scheme for this lookup method. @@ -98915,7 +92968,6 @@ static void __pyx_f_4lxml_5etree_26FallbackElementClassLookup__setFallback(struc * self._fallback_function = lookup._lookup_function * if self._fallback_function is NULL: */ - __Pyx_TraceLine(243,0,__PYX_ERR(7, 243, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_lookup)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lookup)); __Pyx_GOTREF(__pyx_v_self->fallback); @@ -98929,7 +92981,6 @@ static void __pyx_f_4lxml_5etree_26FallbackElementClassLookup__setFallback(struc * if self._fallback_function is NULL: * self._fallback_function = _lookupDefaultElementClass */ - __Pyx_TraceLine(244,0,__PYX_ERR(7, 244, __pyx_L1_error)) __pyx_t_1 = __pyx_v_lookup->_lookup_function; __pyx_v_self->_fallback_function = __pyx_t_1; @@ -98940,7 +92991,6 @@ static void __pyx_f_4lxml_5etree_26FallbackElementClassLookup__setFallback(struc * self._fallback_function = _lookupDefaultElementClass * */ - __Pyx_TraceLine(245,0,__PYX_ERR(7, 245, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->_fallback_function == NULL) != 0); if (__pyx_t_2) { @@ -98951,7 +93001,6 @@ static void __pyx_f_4lxml_5etree_26FallbackElementClassLookup__setFallback(struc * * def set_fallback(self, ElementClassLookup lookup not None): */ - __Pyx_TraceLine(246,0,__PYX_ERR(7, 246, __pyx_L1_error)) __pyx_v_self->_fallback_function = __pyx_f_4lxml_5etree__lookupDefaultElementClass; /* "src/lxml/classlookup.pxi":245 @@ -98972,11 +93021,6 @@ static void __pyx_f_4lxml_5etree_26FallbackElementClassLookup__setFallback(struc */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.FallbackElementClassLookup._setFallback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -99010,11 +93054,8 @@ static PyObject *__pyx_pw_4lxml_5etree_26FallbackElementClassLookup_5set_fallbac static PyObject *__pyx_pf_4lxml_5etree_26FallbackElementClassLookup_4set_fallback(struct LxmlFallbackElementClassLookup *__pyx_v_self, struct LxmlElementClassLookup *__pyx_v_lookup) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - __Pyx_TraceFrameInit(__pyx_codeobj__208) __Pyx_RefNannySetupContext("set_fallback", 0); - __Pyx_TraceCall("set_fallback", __pyx_f[7], 248, 0, __PYX_ERR(7, 248, __pyx_L1_error)); /* "src/lxml/classlookup.pxi":253 * Sets the fallback scheme for this lookup method. @@ -99023,7 +93064,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26FallbackElementClassLookup_4set_fallbac * * cdef inline object _callLookupFallback(FallbackElementClassLookup lookup, */ - __Pyx_TraceLine(253,0,__PYX_ERR(7, 253, __pyx_L1_error)) ((struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup *)__pyx_v_self->__pyx_vtab)->_setFallback(__pyx_v_self, __pyx_v_lookup); /* "src/lxml/classlookup.pxi":248 @@ -99036,13 +93076,7 @@ static PyObject *__pyx_pf_4lxml_5etree_26FallbackElementClassLookup_4set_fallbac /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.FallbackElementClassLookup.set_fallback", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -99070,22 +93104,16 @@ static PyObject *__pyx_pw_4lxml_5etree_26FallbackElementClassLookup_8fallback_1_ static PyObject *__pyx_pf_4lxml_5etree_26FallbackElementClassLookup_8fallback___get__(struct LxmlFallbackElementClassLookup *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[7], 228, 0, __PYX_ERR(7, 228, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->fallback)); __pyx_r = ((PyObject *)__pyx_v_self->fallback); goto __pyx_L0; /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.FallbackElementClassLookup.fallback.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -99100,12 +93128,10 @@ static PyObject *__pyx_pf_4lxml_5etree_26FallbackElementClassLookup_8fallback___ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree__callLookupFallback(struct LxmlFallbackElementClassLookup *__pyx_v_lookup, struct LxmlDocument *__pyx_v_doc, xmlNode *__pyx_v_c_node) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_callLookupFallback", 0); - __Pyx_TraceCall("_callLookupFallback", __pyx_f[7], 255, 0, __PYX_ERR(7, 255, __pyx_L1_error)); /* "src/lxml/classlookup.pxi":257 * cdef inline object _callLookupFallback(FallbackElementClassLookup lookup, @@ -99114,7 +93140,6 @@ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree__callLookupFallback(struct L * * */ - __Pyx_TraceLine(257,0,__PYX_ERR(7, 257, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_v_lookup->fallback); __Pyx_INCREF(__pyx_t_1); @@ -99141,7 +93166,6 @@ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree__callLookupFallback(struct L __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -99172,10 +93196,8 @@ static int __pyx_pw_4lxml_5etree_25ElementDefaultClassLookup_1__cinit__(PyObject static int __pyx_pf_4lxml_5etree_25ElementDefaultClassLookup___cinit__(struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[7], 275, 0, __PYX_ERR(7, 275, __pyx_L1_error)); /* "src/lxml/classlookup.pxi":276 * cdef readonly object entity_class @@ -99184,7 +93206,6 @@ static int __pyx_pf_4lxml_5etree_25ElementDefaultClassLookup___cinit__(struct __ * * def __init__(self, element=None, comment=None, pi=None, entity=None): */ - __Pyx_TraceLine(276,0,__PYX_ERR(7, 276, __pyx_L1_error)) __pyx_v_self->__pyx_base._lookup_function = __pyx_f_4lxml_5etree__lookupDefaultElementClass; /* "src/lxml/classlookup.pxi":275 @@ -99197,12 +93218,6 @@ static int __pyx_pf_4lxml_5etree_25ElementDefaultClassLookup___cinit__(struct __ /* function exit code */ __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.ElementDefaultClassLookup.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -99312,12 +93327,10 @@ static int __pyx_pw_4lxml_5etree_25ElementDefaultClassLookup_3__init__(PyObject static int __pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_2__init__(struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *__pyx_v_self, PyObject *__pyx_v_element, PyObject *__pyx_v_comment, PyObject *__pyx_v_pi, PyObject *__pyx_v_entity) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[7], 278, 0, __PYX_ERR(7, 278, __pyx_L1_error)); /* "src/lxml/classlookup.pxi":279 * @@ -99326,7 +93339,6 @@ static int __pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_2__init__(struct __ * self.element_class = _Element * elif issubclass(element, ElementBase): */ - __Pyx_TraceLine(279,0,__PYX_ERR(7, 279, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_element == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -99338,7 +93350,6 @@ static int __pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_2__init__(struct __ * elif issubclass(element, ElementBase): * self.element_class = element */ - __Pyx_TraceLine(280,0,__PYX_ERR(7, 280, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_5etree__Element)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_5etree__Element)); __Pyx_GOTREF(__pyx_v_self->element_class); @@ -99362,7 +93373,6 @@ static int __pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_2__init__(struct __ * self.element_class = element * else: */ - __Pyx_TraceLine(281,0,__PYX_ERR(7, 281, __pyx_L1_error)) __pyx_t_2 = PyObject_IsSubclass(__pyx_v_element, ((PyObject *)__pyx_ptype_4lxml_5etree_ElementBase)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 281, __pyx_L1_error) __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { @@ -99374,7 +93384,6 @@ static int __pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_2__init__(struct __ * else: * raise TypeError, u"element class must be subclass of ElementBase" */ - __Pyx_TraceLine(282,0,__PYX_ERR(7, 282, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_element); __Pyx_GIVEREF(__pyx_v_element); __Pyx_GOTREF(__pyx_v_self->element_class); @@ -99398,7 +93407,6 @@ static int __pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_2__init__(struct __ * * if comment is None: */ - __Pyx_TraceLine(284,0,__PYX_ERR(7, 284, __pyx_L1_error)) /*else*/ { __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_element_class_must_be_subclass_o, 0, 0); __PYX_ERR(7, 284, __pyx_L1_error) @@ -99412,7 +93420,6 @@ static int __pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_2__init__(struct __ * self.comment_class = _Comment * elif issubclass(comment, CommentBase): */ - __Pyx_TraceLine(286,0,__PYX_ERR(7, 286, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_comment == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -99424,7 +93431,6 @@ static int __pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_2__init__(struct __ * elif issubclass(comment, CommentBase): * self.comment_class = comment */ - __Pyx_TraceLine(287,0,__PYX_ERR(7, 287, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_5etree__Comment)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_5etree__Comment)); __Pyx_GOTREF(__pyx_v_self->comment_class); @@ -99448,7 +93454,6 @@ static int __pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_2__init__(struct __ * self.comment_class = comment * else: */ - __Pyx_TraceLine(288,0,__PYX_ERR(7, 288, __pyx_L1_error)) __pyx_t_2 = PyObject_IsSubclass(__pyx_v_comment, ((PyObject *)__pyx_ptype_4lxml_5etree_CommentBase)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 288, __pyx_L1_error) __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { @@ -99460,7 +93465,6 @@ static int __pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_2__init__(struct __ * else: * raise TypeError, u"comment class must be subclass of CommentBase" */ - __Pyx_TraceLine(289,0,__PYX_ERR(7, 289, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_comment); __Pyx_GIVEREF(__pyx_v_comment); __Pyx_GOTREF(__pyx_v_self->comment_class); @@ -99484,7 +93488,6 @@ static int __pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_2__init__(struct __ * * if entity is None: */ - __Pyx_TraceLine(291,0,__PYX_ERR(7, 291, __pyx_L1_error)) /*else*/ { __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_comment_class_must_be_subclass_o, 0, 0); __PYX_ERR(7, 291, __pyx_L1_error) @@ -99498,7 +93501,6 @@ static int __pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_2__init__(struct __ * self.entity_class = _Entity * elif issubclass(entity, EntityBase): */ - __Pyx_TraceLine(293,0,__PYX_ERR(7, 293, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_entity == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -99510,7 +93512,6 @@ static int __pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_2__init__(struct __ * elif issubclass(entity, EntityBase): * self.entity_class = entity */ - __Pyx_TraceLine(294,0,__PYX_ERR(7, 294, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_5etree__Entity)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_5etree__Entity)); __Pyx_GOTREF(__pyx_v_self->entity_class); @@ -99534,7 +93535,6 @@ static int __pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_2__init__(struct __ * self.entity_class = entity * else: */ - __Pyx_TraceLine(295,0,__PYX_ERR(7, 295, __pyx_L1_error)) __pyx_t_2 = PyObject_IsSubclass(__pyx_v_entity, ((PyObject *)__pyx_ptype_4lxml_5etree_EntityBase)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 295, __pyx_L1_error) __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { @@ -99546,7 +93546,6 @@ static int __pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_2__init__(struct __ * else: * raise TypeError, u"Entity class must be subclass of EntityBase" */ - __Pyx_TraceLine(296,0,__PYX_ERR(7, 296, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_entity); __Pyx_GIVEREF(__pyx_v_entity); __Pyx_GOTREF(__pyx_v_self->entity_class); @@ -99570,7 +93569,6 @@ static int __pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_2__init__(struct __ * * if pi is None: */ - __Pyx_TraceLine(298,0,__PYX_ERR(7, 298, __pyx_L1_error)) /*else*/ { __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Entity_class_must_be_subclass_of, 0, 0); __PYX_ERR(7, 298, __pyx_L1_error) @@ -99584,7 +93582,6 @@ static int __pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_2__init__(struct __ * self.pi_class = None # special case, see below * elif issubclass(pi, PIBase): */ - __Pyx_TraceLine(300,0,__PYX_ERR(7, 300, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_pi == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -99596,7 +93593,6 @@ static int __pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_2__init__(struct __ * elif issubclass(pi, PIBase): * self.pi_class = pi */ - __Pyx_TraceLine(301,0,__PYX_ERR(7, 301, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->pi_class); @@ -99620,7 +93616,6 @@ static int __pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_2__init__(struct __ * self.pi_class = pi * else: */ - __Pyx_TraceLine(302,0,__PYX_ERR(7, 302, __pyx_L1_error)) __pyx_t_2 = PyObject_IsSubclass(__pyx_v_pi, ((PyObject *)__pyx_ptype_4lxml_5etree_PIBase)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 302, __pyx_L1_error) __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { @@ -99632,7 +93627,6 @@ static int __pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_2__init__(struct __ * else: * raise TypeError, u"PI class must be subclass of PIBase" */ - __Pyx_TraceLine(303,0,__PYX_ERR(7, 303, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_pi); __Pyx_GIVEREF(__pyx_v_pi); __Pyx_GOTREF(__pyx_v_self->pi_class); @@ -99656,7 +93650,6 @@ static int __pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_2__init__(struct __ * * cdef object _lookupDefaultElementClass(state, _Document _doc, xmlNode* c_node): */ - __Pyx_TraceLine(305,0,__PYX_ERR(7, 305, __pyx_L1_error)) /*else*/ { __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_PI_class_must_be_subclass_of_PIB, 0, 0); __PYX_ERR(7, 305, __pyx_L1_error) @@ -99678,7 +93671,6 @@ static int __pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_2__init__(struct __ __Pyx_AddTraceback("lxml.etree.ElementDefaultClassLookup.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -99706,22 +93698,16 @@ static PyObject *__pyx_pw_4lxml_5etree_25ElementDefaultClassLookup_13element_cla static PyObject *__pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_13element_class___get__(struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[7], 271, 0, __PYX_ERR(7, 271, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->element_class); __pyx_r = __pyx_v_self->element_class; goto __pyx_L0; /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.ElementDefaultClassLookup.element_class.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -99749,22 +93735,16 @@ static PyObject *__pyx_pw_4lxml_5etree_25ElementDefaultClassLookup_13comment_cla static PyObject *__pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_13comment_class___get__(struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[7], 272, 0, __PYX_ERR(7, 272, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->comment_class); __pyx_r = __pyx_v_self->comment_class; goto __pyx_L0; /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.ElementDefaultClassLookup.comment_class.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -99792,22 +93772,16 @@ static PyObject *__pyx_pw_4lxml_5etree_25ElementDefaultClassLookup_8pi_class_1__ static PyObject *__pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_8pi_class___get__(struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[7], 273, 0, __PYX_ERR(7, 273, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->pi_class); __pyx_r = __pyx_v_self->pi_class; goto __pyx_L0; /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.ElementDefaultClassLookup.pi_class.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -99835,22 +93809,16 @@ static PyObject *__pyx_pw_4lxml_5etree_25ElementDefaultClassLookup_12entity_clas static PyObject *__pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_12entity_class___get__(struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[7], 274, 0, __PYX_ERR(7, 274, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->entity_class); __pyx_r = __pyx_v_self->entity_class; goto __pyx_L0; /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.ElementDefaultClassLookup.entity_class.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -99865,7 +93833,6 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDefaultClassLookup_12entity_clas static PyObject *__pyx_f_4lxml_5etree__lookupDefaultElementClass(PyObject *__pyx_v_state, CYTHON_UNUSED struct LxmlDocument *__pyx_v__doc, xmlNode *__pyx_v_c_node) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -99873,7 +93840,6 @@ static PyObject *__pyx_f_4lxml_5etree__lookupDefaultElementClass(PyObject *__pyx PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_lookupDefaultElementClass", 0); - __Pyx_TraceCall("_lookupDefaultElementClass", __pyx_f[7], 307, 0, __PYX_ERR(7, 307, __pyx_L1_error)); /* "src/lxml/classlookup.pxi":309 * cdef object _lookupDefaultElementClass(state, _Document _doc, xmlNode* c_node): @@ -99882,7 +93848,6 @@ static PyObject *__pyx_f_4lxml_5etree__lookupDefaultElementClass(PyObject *__pyx * if state is not None: * return (state).element_class */ - __Pyx_TraceLine(309,0,__PYX_ERR(7, 309, __pyx_L1_error)) switch (__pyx_v_c_node->type) { case XML_ELEMENT_NODE: @@ -99893,7 +93858,6 @@ static PyObject *__pyx_f_4lxml_5etree__lookupDefaultElementClass(PyObject *__pyx * return (state).element_class * else: */ - __Pyx_TraceLine(310,0,__PYX_ERR(7, 310, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_state != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -99905,7 +93869,6 @@ static PyObject *__pyx_f_4lxml_5etree__lookupDefaultElementClass(PyObject *__pyx * else: * return _Element */ - __Pyx_TraceLine(311,0,__PYX_ERR(7, 311, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *)__pyx_v_state)->element_class); __pyx_r = ((struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *)__pyx_v_state)->element_class; @@ -99927,7 +93890,6 @@ static PyObject *__pyx_f_4lxml_5etree__lookupDefaultElementClass(PyObject *__pyx * elif c_node.type == tree.XML_COMMENT_NODE: * if state is not None: */ - __Pyx_TraceLine(313,0,__PYX_ERR(7, 313, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_5etree__Element)); @@ -99943,15 +93905,6 @@ static PyObject *__pyx_f_4lxml_5etree__lookupDefaultElementClass(PyObject *__pyx * return (state).element_class */ break; - - /* "src/lxml/classlookup.pxi":314 - * else: - * return _Element - * elif c_node.type == tree.XML_COMMENT_NODE: # <<<<<<<<<<<<<< - * if state is not None: - * return (state).comment_class - */ - __Pyx_TraceLine(314,0,__PYX_ERR(7, 314, __pyx_L1_error)) case XML_COMMENT_NODE: /* "src/lxml/classlookup.pxi":315 @@ -99961,7 +93914,6 @@ static PyObject *__pyx_f_4lxml_5etree__lookupDefaultElementClass(PyObject *__pyx * return (state).comment_class * else: */ - __Pyx_TraceLine(315,0,__PYX_ERR(7, 315, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_state != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -99973,7 +93925,6 @@ static PyObject *__pyx_f_4lxml_5etree__lookupDefaultElementClass(PyObject *__pyx * else: * return _Comment */ - __Pyx_TraceLine(316,0,__PYX_ERR(7, 316, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *)__pyx_v_state)->comment_class); __pyx_r = ((struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *)__pyx_v_state)->comment_class; @@ -99995,7 +93946,6 @@ static PyObject *__pyx_f_4lxml_5etree__lookupDefaultElementClass(PyObject *__pyx * elif c_node.type == tree.XML_ENTITY_REF_NODE: * if state is not None: */ - __Pyx_TraceLine(318,0,__PYX_ERR(7, 318, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_5etree__Comment)); @@ -100011,15 +93961,6 @@ static PyObject *__pyx_f_4lxml_5etree__lookupDefaultElementClass(PyObject *__pyx * return (state).comment_class */ break; - - /* "src/lxml/classlookup.pxi":319 - * else: - * return _Comment - * elif c_node.type == tree.XML_ENTITY_REF_NODE: # <<<<<<<<<<<<<< - * if state is not None: - * return (state).entity_class - */ - __Pyx_TraceLine(319,0,__PYX_ERR(7, 319, __pyx_L1_error)) case XML_ENTITY_REF_NODE: /* "src/lxml/classlookup.pxi":320 @@ -100029,7 +93970,6 @@ static PyObject *__pyx_f_4lxml_5etree__lookupDefaultElementClass(PyObject *__pyx * return (state).entity_class * else: */ - __Pyx_TraceLine(320,0,__PYX_ERR(7, 320, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_state != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -100041,7 +93981,6 @@ static PyObject *__pyx_f_4lxml_5etree__lookupDefaultElementClass(PyObject *__pyx * else: * return _Entity */ - __Pyx_TraceLine(321,0,__PYX_ERR(7, 321, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *)__pyx_v_state)->entity_class); __pyx_r = ((struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *)__pyx_v_state)->entity_class; @@ -100063,7 +94002,6 @@ static PyObject *__pyx_f_4lxml_5etree__lookupDefaultElementClass(PyObject *__pyx * elif c_node.type == tree.XML_PI_NODE: * if state is None or (state).pi_class is None: */ - __Pyx_TraceLine(323,0,__PYX_ERR(7, 323, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_5etree__Entity)); @@ -100079,15 +94017,6 @@ static PyObject *__pyx_f_4lxml_5etree__lookupDefaultElementClass(PyObject *__pyx * return (state).entity_class */ break; - - /* "src/lxml/classlookup.pxi":324 - * else: - * return _Entity - * elif c_node.type == tree.XML_PI_NODE: # <<<<<<<<<<<<<< - * if state is None or (state).pi_class is None: - * # special case XSLT-PI - */ - __Pyx_TraceLine(324,0,__PYX_ERR(7, 324, __pyx_L1_error)) case XML_PI_NODE: /* "src/lxml/classlookup.pxi":325 @@ -100097,7 +94026,6 @@ static PyObject *__pyx_f_4lxml_5etree__lookupDefaultElementClass(PyObject *__pyx * # special case XSLT-PI * if c_node.name is not NULL and c_node.content is not NULL: */ - __Pyx_TraceLine(325,0,__PYX_ERR(7, 325, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_state == Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (!__pyx_t_3) { @@ -100118,7 +94046,6 @@ static PyObject *__pyx_f_4lxml_5etree__lookupDefaultElementClass(PyObject *__pyx * if tree.xmlStrcmp(c_node.name, "xml-stylesheet") == 0: * if tree.xmlStrstr(c_node.content, "text/xsl") is not NULL or \ */ - __Pyx_TraceLine(327,0,__PYX_ERR(7, 327, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node->name != NULL) != 0); if (__pyx_t_1) { } else { @@ -100137,7 +94064,6 @@ static PyObject *__pyx_f_4lxml_5etree__lookupDefaultElementClass(PyObject *__pyx * if tree.xmlStrstr(c_node.content, "text/xsl") is not NULL or \ * tree.xmlStrstr(c_node.content, "text/xml") is not NULL: */ - __Pyx_TraceLine(328,0,__PYX_ERR(7, 328, __pyx_L1_error)) __pyx_t_2 = ((xmlStrcmp(__pyx_v_c_node->name, ((unsigned char *)((unsigned char *)((char const *)"xml-stylesheet")))) == 0) != 0); if (__pyx_t_2) { @@ -100148,7 +94074,6 @@ static PyObject *__pyx_f_4lxml_5etree__lookupDefaultElementClass(PyObject *__pyx * tree.xmlStrstr(c_node.content, "text/xml") is not NULL: * return _XSLTProcessingInstruction */ - __Pyx_TraceLine(329,0,__PYX_ERR(7, 329, __pyx_L1_error)) __pyx_t_1 = ((xmlStrstr(__pyx_v_c_node->content, ((unsigned char *)((unsigned char *)((char const *)"text/xsl")))) != NULL) != 0); if (!__pyx_t_1) { } else { @@ -100163,7 +94088,6 @@ static PyObject *__pyx_f_4lxml_5etree__lookupDefaultElementClass(PyObject *__pyx * return _XSLTProcessingInstruction * return _ProcessingInstruction */ - __Pyx_TraceLine(330,0,__PYX_ERR(7, 330, __pyx_L1_error)) __pyx_t_1 = ((xmlStrstr(__pyx_v_c_node->content, ((unsigned char *)((unsigned char *)((char const *)"text/xml")))) != NULL) != 0); __pyx_t_2 = __pyx_t_1; __pyx_L14_bool_binop_done:; @@ -100175,7 +94099,6 @@ static PyObject *__pyx_f_4lxml_5etree__lookupDefaultElementClass(PyObject *__pyx * tree.xmlStrstr(c_node.content, "text/xml") is not NULL: * return _XSLTProcessingInstruction */ - __Pyx_TraceLine(329,0,__PYX_ERR(7, 329, __pyx_L1_error)) if (__pyx_t_2) { /* "src/lxml/classlookup.pxi":331 @@ -100185,7 +94108,6 @@ static PyObject *__pyx_f_4lxml_5etree__lookupDefaultElementClass(PyObject *__pyx * return _ProcessingInstruction * else: */ - __Pyx_TraceLine(331,0,__PYX_ERR(7, 331, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_5etree__XSLTProcessingInstruction)); __pyx_r = ((PyObject *)__pyx_ptype_4lxml_5etree__XSLTProcessingInstruction); @@ -100225,7 +94147,6 @@ static PyObject *__pyx_f_4lxml_5etree__lookupDefaultElementClass(PyObject *__pyx * else: * return (state).pi_class */ - __Pyx_TraceLine(332,0,__PYX_ERR(7, 332, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_5etree__ProcessingInstruction)); __pyx_r = ((PyObject *)__pyx_ptype_4lxml_5etree__ProcessingInstruction); @@ -100245,9 +94166,8 @@ static PyObject *__pyx_f_4lxml_5etree__lookupDefaultElementClass(PyObject *__pyx * else: * return (state).pi_class # <<<<<<<<<<<<<< * else: - * assert 0, f"Unknown node type: {c_node.type}" + * assert False, f"Unknown node type: {c_node.type}" */ - __Pyx_TraceLine(334,0,__PYX_ERR(7, 334, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *)__pyx_v_state)->pi_class); @@ -100268,11 +94188,10 @@ static PyObject *__pyx_f_4lxml_5etree__lookupDefaultElementClass(PyObject *__pyx /* "src/lxml/classlookup.pxi":336 * return (state).pi_class * else: - * assert 0, f"Unknown node type: {c_node.type}" # <<<<<<<<<<<<<< + * assert False, f"Unknown node type: {c_node.type}" # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(336,0,__PYX_ERR(7, 336, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!0)) { @@ -100308,7 +94227,6 @@ static PyObject *__pyx_f_4lxml_5etree__lookupDefaultElementClass(PyObject *__pyx __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -100339,10 +94257,8 @@ static int __pyx_pw_4lxml_5etree_32AttributeBasedElementClassLookup_1__cinit__(P static int __pyx_pf_4lxml_5etree_32AttributeBasedElementClassLookup___cinit__(struct __pyx_obj_4lxml_5etree_AttributeBasedElementClassLookup *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[7], 359, 0, __PYX_ERR(7, 359, __pyx_L1_error)); /* "src/lxml/classlookup.pxi":360 * cdef const_xmlChar* _c_name @@ -100351,7 +94267,6 @@ static int __pyx_pf_4lxml_5etree_32AttributeBasedElementClassLookup___cinit__(st * * def __init__(self, attribute_name, class_mapping, */ - __Pyx_TraceLine(360,0,__PYX_ERR(7, 360, __pyx_L1_error)) __pyx_v_self->__pyx_base.__pyx_base._lookup_function = __pyx_f_4lxml_5etree__attribute_class_lookup; /* "src/lxml/classlookup.pxi":359 @@ -100364,12 +94279,6 @@ static int __pyx_pf_4lxml_5etree_32AttributeBasedElementClassLookup___cinit__(st /* function exit code */ __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.AttributeBasedElementClassLookup.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -100483,7 +94392,6 @@ static int __pyx_pf_4lxml_5etree_32AttributeBasedElementClassLookup_2__init__(st PyObject *__pyx_v_ns = NULL; PyObject *__pyx_v_name = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -100493,7 +94401,6 @@ static int __pyx_pf_4lxml_5etree_32AttributeBasedElementClassLookup_2__init__(st int __pyx_t_6; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[7], 362, 0, __PYX_ERR(7, 362, __pyx_L1_error)); /* "src/lxml/classlookup.pxi":364 * def __init__(self, attribute_name, class_mapping, @@ -100502,7 +94409,6 @@ static int __pyx_pf_4lxml_5etree_32AttributeBasedElementClassLookup_2__init__(st * ns, name = self._pytag * if ns is None: */ - __Pyx_TraceLine(364,0,__PYX_ERR(7, 364, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_attribute_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -100518,7 +94424,6 @@ static int __pyx_pf_4lxml_5etree_32AttributeBasedElementClassLookup_2__init__(st * if ns is None: * self._c_ns = NULL */ - __Pyx_TraceLine(365,0,__PYX_ERR(7, 365, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_pytag; __Pyx_INCREF(__pyx_t_1); if (likely(__pyx_t_1 != Py_None)) { @@ -100556,7 +94461,6 @@ static int __pyx_pf_4lxml_5etree_32AttributeBasedElementClassLookup_2__init__(st * self._c_ns = NULL * else: */ - __Pyx_TraceLine(366,0,__PYX_ERR(7, 366, __pyx_L1_error)) __pyx_t_4 = (__pyx_v_ns == Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { @@ -100568,7 +94472,6 @@ static int __pyx_pf_4lxml_5etree_32AttributeBasedElementClassLookup_2__init__(st * else: * self._c_ns = _xcstr(ns) */ - __Pyx_TraceLine(367,0,__PYX_ERR(7, 367, __pyx_L1_error)) __pyx_v_self->_c_ns = NULL; /* "src/lxml/classlookup.pxi":366 @@ -100588,7 +94491,6 @@ static int __pyx_pf_4lxml_5etree_32AttributeBasedElementClassLookup_2__init__(st * self._c_name = _xcstr(name) * self._class_mapping = dict(class_mapping) */ - __Pyx_TraceLine(369,0,__PYX_ERR(7, 369, __pyx_L1_error)) /*else*/ { __pyx_v_self->_c_ns = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_ns); } @@ -100601,7 +94503,6 @@ static int __pyx_pf_4lxml_5etree_32AttributeBasedElementClassLookup_2__init__(st * self._class_mapping = dict(class_mapping) * */ - __Pyx_TraceLine(370,0,__PYX_ERR(7, 370, __pyx_L1_error)) __pyx_v_self->_c_name = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_name); /* "src/lxml/classlookup.pxi":371 @@ -100611,7 +94512,6 @@ static int __pyx_pf_4lxml_5etree_32AttributeBasedElementClassLookup_2__init__(st * * FallbackElementClassLookup.__init__(self, fallback) */ - __Pyx_TraceLine(371,0,__PYX_ERR(7, 371, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_class_mapping); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -100627,7 +94527,6 @@ static int __pyx_pf_4lxml_5etree_32AttributeBasedElementClassLookup_2__init__(st * * cdef object _attribute_class_lookup(state, _Document doc, xmlNode* c_node): */ - __Pyx_TraceLine(373,0,__PYX_ERR(7, 373, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree_FallbackElementClassLookup), __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; @@ -100698,7 +94597,6 @@ static int __pyx_pf_4lxml_5etree_32AttributeBasedElementClassLookup_2__init__(st __pyx_L0:; __Pyx_XDECREF(__pyx_v_ns); __Pyx_XDECREF(__pyx_v_name); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -100717,13 +94615,11 @@ static PyObject *__pyx_f_4lxml_5etree__attribute_class_lookup(PyObject *__pyx_v_ PyObject *__pyx_v_value = NULL; PyObject *__pyx_v_cls = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("_attribute_class_lookup", 0); - __Pyx_TraceCall("_attribute_class_lookup", __pyx_f[7], 375, 0, __PYX_ERR(7, 375, __pyx_L1_error)); /* "src/lxml/classlookup.pxi":379 * cdef python.PyObject* dict_result @@ -100732,7 +94628,6 @@ static PyObject *__pyx_f_4lxml_5etree__attribute_class_lookup(PyObject *__pyx_v_ * if c_node.type == tree.XML_ELEMENT_NODE: * value = _attributeValueFromNsName( */ - __Pyx_TraceLine(379,0,__PYX_ERR(7, 379, __pyx_L1_error)) __pyx_t_1 = __pyx_v_state; __Pyx_INCREF(__pyx_t_1); __pyx_v_lookup = ((struct __pyx_obj_4lxml_5etree_AttributeBasedElementClassLookup *)__pyx_t_1); @@ -100745,7 +94640,6 @@ static PyObject *__pyx_f_4lxml_5etree__attribute_class_lookup(PyObject *__pyx_v_ * value = _attributeValueFromNsName( * c_node, lookup._c_ns, lookup._c_name) */ - __Pyx_TraceLine(380,0,__PYX_ERR(7, 380, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0); if (__pyx_t_2) { @@ -100756,7 +94650,6 @@ static PyObject *__pyx_f_4lxml_5etree__attribute_class_lookup(PyObject *__pyx_v_ * c_node, lookup._c_ns, lookup._c_name) * dict_result = python.PyDict_GetItem(lookup._class_mapping, value) */ - __Pyx_TraceLine(381,0,__PYX_ERR(7, 381, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__attributeValueFromNsName(__pyx_v_c_node, __pyx_v_lookup->_c_ns, __pyx_v_lookup->_c_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_value = __pyx_t_1; @@ -100769,7 +94662,6 @@ static PyObject *__pyx_f_4lxml_5etree__attribute_class_lookup(PyObject *__pyx_v_ * if dict_result is not NULL: * cls = dict_result */ - __Pyx_TraceLine(383,0,__PYX_ERR(7, 383, __pyx_L1_error)) __pyx_t_1 = __pyx_v_lookup->_class_mapping; __Pyx_INCREF(__pyx_t_1); __pyx_v_dict_result = PyDict_GetItem(__pyx_t_1, __pyx_v_value); @@ -100782,7 +94674,6 @@ static PyObject *__pyx_f_4lxml_5etree__attribute_class_lookup(PyObject *__pyx_v_ * cls = dict_result * _validateNodeClass(c_node, cls) */ - __Pyx_TraceLine(384,0,__PYX_ERR(7, 384, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_dict_result != NULL) != 0); if (__pyx_t_2) { @@ -100793,7 +94684,6 @@ static PyObject *__pyx_f_4lxml_5etree__attribute_class_lookup(PyObject *__pyx_v_ * _validateNodeClass(c_node, cls) * return cls */ - __Pyx_TraceLine(385,0,__PYX_ERR(7, 385, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_v_dict_result); __Pyx_INCREF(__pyx_t_1); __pyx_v_cls = __pyx_t_1; @@ -100806,7 +94696,6 @@ static PyObject *__pyx_f_4lxml_5etree__attribute_class_lookup(PyObject *__pyx_v_ * return cls * return _callLookupFallback(lookup, doc, c_node) */ - __Pyx_TraceLine(386,0,__PYX_ERR(7, 386, __pyx_L1_error)) __pyx_t_3 = __pyx_f_4lxml_5etree__validateNodeClass(__pyx_v_c_node, __pyx_v_cls); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 386, __pyx_L1_error) /* "src/lxml/classlookup.pxi":387 @@ -100816,7 +94705,6 @@ static PyObject *__pyx_f_4lxml_5etree__attribute_class_lookup(PyObject *__pyx_v_ * return _callLookupFallback(lookup, doc, c_node) * */ - __Pyx_TraceLine(387,0,__PYX_ERR(7, 387, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_cls); __pyx_r = __pyx_v_cls; @@ -100847,7 +94735,6 @@ static PyObject *__pyx_f_4lxml_5etree__attribute_class_lookup(PyObject *__pyx_v_ * * */ - __Pyx_TraceLine(388,0,__PYX_ERR(7, 388, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4lxml_5etree__callLookupFallback(((struct LxmlFallbackElementClassLookup *)__pyx_v_lookup), __pyx_v_doc, __pyx_v_c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -100873,7 +94760,6 @@ static PyObject *__pyx_f_4lxml_5etree__attribute_class_lookup(PyObject *__pyx_v_ __Pyx_XDECREF(__pyx_v_value); __Pyx_XDECREF(__pyx_v_cls); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -100904,10 +94790,8 @@ static int __pyx_pw_4lxml_5etree_29ParserBasedElementClassLookup_1__cinit__(PyOb static int __pyx_pf_4lxml_5etree_29ParserBasedElementClassLookup___cinit__(struct __pyx_obj_4lxml_5etree_ParserBasedElementClassLookup *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[7], 398, 0, __PYX_ERR(7, 398, __pyx_L1_error)); /* "src/lxml/classlookup.pxi":399 * """ @@ -100916,7 +94800,6 @@ static int __pyx_pf_4lxml_5etree_29ParserBasedElementClassLookup___cinit__(struc * * cdef object _parser_class_lookup(state, _Document doc, xmlNode* c_node): */ - __Pyx_TraceLine(399,0,__PYX_ERR(7, 399, __pyx_L1_error)) __pyx_v_self->__pyx_base.__pyx_base._lookup_function = __pyx_f_4lxml_5etree__parser_class_lookup; /* "src/lxml/classlookup.pxi":398 @@ -100929,12 +94812,6 @@ static int __pyx_pf_4lxml_5etree_29ParserBasedElementClassLookup___cinit__(struc /* function exit code */ __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.ParserBasedElementClassLookup.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -100949,14 +94826,12 @@ static int __pyx_pf_4lxml_5etree_29ParserBasedElementClassLookup___cinit__(struc static PyObject *__pyx_f_4lxml_5etree__parser_class_lookup(PyObject *__pyx_v_state, struct LxmlDocument *__pyx_v_doc, xmlNode *__pyx_v_c_node) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_parser_class_lookup", 0); - __Pyx_TraceCall("_parser_class_lookup", __pyx_f[7], 401, 0, __PYX_ERR(7, 401, __pyx_L1_error)); /* "src/lxml/classlookup.pxi":402 * @@ -100965,7 +94840,6 @@ static PyObject *__pyx_f_4lxml_5etree__parser_class_lookup(PyObject *__pyx_v_sta * return doc._parser._class_lookup._lookup_function( * doc._parser._class_lookup, doc, c_node) */ - __Pyx_TraceLine(402,0,__PYX_ERR(7, 402, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_doc->_parser->_class_lookup) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -100977,7 +94851,6 @@ static PyObject *__pyx_f_4lxml_5etree__parser_class_lookup(PyObject *__pyx_v_sta * doc._parser._class_lookup, doc, c_node) * return _callLookupFallback(state, doc, c_node) */ - __Pyx_TraceLine(403,0,__PYX_ERR(7, 403, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); /* "src/lxml/classlookup.pxi":404 @@ -100987,7 +94860,6 @@ static PyObject *__pyx_f_4lxml_5etree__parser_class_lookup(PyObject *__pyx_v_sta * return _callLookupFallback(state, doc, c_node) * */ - __Pyx_TraceLine(404,0,__PYX_ERR(7, 404, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_v_doc->_parser->_class_lookup); __Pyx_INCREF(__pyx_t_3); @@ -100998,7 +94870,6 @@ static PyObject *__pyx_f_4lxml_5etree__parser_class_lookup(PyObject *__pyx_v_sta * doc._parser._class_lookup, doc, c_node) * return _callLookupFallback(state, doc, c_node) */ - __Pyx_TraceLine(403,0,__PYX_ERR(7, 403, __pyx_L1_error)) __pyx_t_4 = __pyx_v_doc->_parser->_class_lookup->_lookup_function(__pyx_t_3, __pyx_v_doc, __pyx_v_c_node); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -101022,7 +94893,6 @@ static PyObject *__pyx_f_4lxml_5etree__parser_class_lookup(PyObject *__pyx_v_sta * * */ - __Pyx_TraceLine(405,0,__PYX_ERR(7, 405, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __pyx_f_4lxml_5etree__callLookupFallback(((struct LxmlFallbackElementClassLookup *)__pyx_v_state), __pyx_v_doc, __pyx_v_c_node); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -101046,7 +94916,6 @@ static PyObject *__pyx_f_4lxml_5etree__parser_class_lookup(PyObject *__pyx_v_sta __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -101077,10 +94946,8 @@ static int __pyx_pw_4lxml_5etree_24CustomElementClassLookup_1__cinit__(PyObject static int __pyx_pf_4lxml_5etree_24CustomElementClassLookup___cinit__(struct __pyx_obj_4lxml_5etree_CustomElementClassLookup *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[7], 427, 0, __PYX_ERR(7, 427, __pyx_L1_error)); /* "src/lxml/classlookup.pxi":428 * """ @@ -101089,7 +94956,6 @@ static int __pyx_pf_4lxml_5etree_24CustomElementClassLookup___cinit__(struct __p * * def lookup(self, type, doc, namespace, name): */ - __Pyx_TraceLine(428,0,__PYX_ERR(7, 428, __pyx_L1_error)) __pyx_v_self->__pyx_base.__pyx_base._lookup_function = __pyx_f_4lxml_5etree__custom_class_lookup; /* "src/lxml/classlookup.pxi":427 @@ -101102,12 +94968,6 @@ static int __pyx_pf_4lxml_5etree_24CustomElementClassLookup___cinit__(struct __p /* function exit code */ __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.CustomElementClassLookup.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -101123,7 +94983,7 @@ static int __pyx_pf_4lxml_5etree_24CustomElementClassLookup___cinit__(struct __p /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_24CustomElementClassLookup_3lookup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_24CustomElementClassLookup_2lookup[] = "lookup(self, type, doc, namespace, name)"; -static PyMethodDef __pyx_mdef_4lxml_5etree_24CustomElementClassLookup_3lookup = {"lookup", (PyCFunction)__pyx_pw_4lxml_5etree_24CustomElementClassLookup_3lookup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_24CustomElementClassLookup_2lookup}; +static PyMethodDef __pyx_mdef_4lxml_5etree_24CustomElementClassLookup_3lookup = {"lookup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_24CustomElementClassLookup_3lookup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_24CustomElementClassLookup_2lookup}; static PyObject *__pyx_pw_4lxml_5etree_24CustomElementClassLookup_3lookup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_type = 0; CYTHON_UNUSED PyObject *__pyx_v_doc = 0; @@ -101207,11 +95067,8 @@ static PyObject *__pyx_pw_4lxml_5etree_24CustomElementClassLookup_3lookup(PyObje static PyObject *__pyx_pf_4lxml_5etree_24CustomElementClassLookup_2lookup(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree_CustomElementClassLookup *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_type, CYTHON_UNUSED PyObject *__pyx_v_doc, CYTHON_UNUSED PyObject *__pyx_v_namespace, CYTHON_UNUSED PyObject *__pyx_v_name) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - __Pyx_TraceFrameInit(__pyx_codeobj__209) __Pyx_RefNannySetupContext("lookup", 0); - __Pyx_TraceCall("lookup", __pyx_f[7], 430, 0, __PYX_ERR(7, 430, __pyx_L1_error)); /* "src/lxml/classlookup.pxi":432 * def lookup(self, type, doc, namespace, name): @@ -101220,7 +95077,6 @@ static PyObject *__pyx_pf_4lxml_5etree_24CustomElementClassLookup_2lookup(CYTHON * * cdef object _custom_class_lookup(state, _Document doc, xmlNode* c_node): */ - __Pyx_TraceLine(432,0,__PYX_ERR(7, 432, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -101234,12 +95090,8 @@ static PyObject *__pyx_pf_4lxml_5etree_24CustomElementClassLookup_2lookup(CYTHON */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.CustomElementClassLookup.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -101260,7 +95112,6 @@ static PyObject *__pyx_f_4lxml_5etree__custom_class_lookup(PyObject *__pyx_v_sta PyObject *__pyx_v_ns = NULL; PyObject *__pyx_v_cls = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -101270,7 +95121,6 @@ static PyObject *__pyx_f_4lxml_5etree__custom_class_lookup(PyObject *__pyx_v_sta PyObject *__pyx_t_6 = NULL; int __pyx_t_7; __Pyx_RefNannySetupContext("_custom_class_lookup", 0); - __Pyx_TraceCall("_custom_class_lookup", __pyx_f[7], 434, 0, __PYX_ERR(7, 434, __pyx_L1_error)); /* "src/lxml/classlookup.pxi":437 * cdef CustomElementClassLookup lookup @@ -101279,7 +95129,6 @@ static PyObject *__pyx_f_4lxml_5etree__custom_class_lookup(PyObject *__pyx_v_sta * * if c_node.type == tree.XML_ELEMENT_NODE: */ - __Pyx_TraceLine(437,0,__PYX_ERR(7, 437, __pyx_L1_error)) __pyx_t_1 = __pyx_v_state; __Pyx_INCREF(__pyx_t_1); __pyx_v_lookup = ((struct __pyx_obj_4lxml_5etree_CustomElementClassLookup *)__pyx_t_1); @@ -101292,7 +95141,6 @@ static PyObject *__pyx_f_4lxml_5etree__custom_class_lookup(PyObject *__pyx_v_sta * element_type = u"element" * elif c_node.type == tree.XML_COMMENT_NODE: */ - __Pyx_TraceLine(439,0,__PYX_ERR(7, 439, __pyx_L1_error)) switch (__pyx_v_c_node->type) { case XML_ELEMENT_NODE: @@ -101303,7 +95151,6 @@ static PyObject *__pyx_f_4lxml_5etree__custom_class_lookup(PyObject *__pyx_v_sta * elif c_node.type == tree.XML_COMMENT_NODE: * element_type = u"comment" */ - __Pyx_TraceLine(440,0,__PYX_ERR(7, 440, __pyx_L1_error)) __Pyx_INCREF(__pyx_n_u_element); __pyx_v_element_type = __pyx_n_u_element; @@ -101315,15 +95162,6 @@ static PyObject *__pyx_f_4lxml_5etree__custom_class_lookup(PyObject *__pyx_v_sta * elif c_node.type == tree.XML_COMMENT_NODE: */ break; - - /* "src/lxml/classlookup.pxi":441 - * if c_node.type == tree.XML_ELEMENT_NODE: - * element_type = u"element" - * elif c_node.type == tree.XML_COMMENT_NODE: # <<<<<<<<<<<<<< - * element_type = u"comment" - * elif c_node.type == tree.XML_PI_NODE: - */ - __Pyx_TraceLine(441,0,__PYX_ERR(7, 441, __pyx_L1_error)) case XML_COMMENT_NODE: /* "src/lxml/classlookup.pxi":442 @@ -101333,7 +95171,6 @@ static PyObject *__pyx_f_4lxml_5etree__custom_class_lookup(PyObject *__pyx_v_sta * elif c_node.type == tree.XML_PI_NODE: * element_type = u"PI" */ - __Pyx_TraceLine(442,0,__PYX_ERR(7, 442, __pyx_L1_error)) __Pyx_INCREF(__pyx_n_u_comment); __pyx_v_element_type = __pyx_n_u_comment; @@ -101345,15 +95182,6 @@ static PyObject *__pyx_f_4lxml_5etree__custom_class_lookup(PyObject *__pyx_v_sta * elif c_node.type == tree.XML_PI_NODE: */ break; - - /* "src/lxml/classlookup.pxi":443 - * elif c_node.type == tree.XML_COMMENT_NODE: - * element_type = u"comment" - * elif c_node.type == tree.XML_PI_NODE: # <<<<<<<<<<<<<< - * element_type = u"PI" - * elif c_node.type == tree.XML_ENTITY_REF_NODE: - */ - __Pyx_TraceLine(443,0,__PYX_ERR(7, 443, __pyx_L1_error)) case XML_PI_NODE: /* "src/lxml/classlookup.pxi":444 @@ -101363,7 +95191,6 @@ static PyObject *__pyx_f_4lxml_5etree__custom_class_lookup(PyObject *__pyx_v_sta * elif c_node.type == tree.XML_ENTITY_REF_NODE: * element_type = u"entity" */ - __Pyx_TraceLine(444,0,__PYX_ERR(7, 444, __pyx_L1_error)) __Pyx_INCREF(__pyx_n_u_PI); __pyx_v_element_type = __pyx_n_u_PI; @@ -101375,15 +95202,6 @@ static PyObject *__pyx_f_4lxml_5etree__custom_class_lookup(PyObject *__pyx_v_sta * elif c_node.type == tree.XML_ENTITY_REF_NODE: */ break; - - /* "src/lxml/classlookup.pxi":445 - * elif c_node.type == tree.XML_PI_NODE: - * element_type = u"PI" - * elif c_node.type == tree.XML_ENTITY_REF_NODE: # <<<<<<<<<<<<<< - * element_type = u"entity" - * else: - */ - __Pyx_TraceLine(445,0,__PYX_ERR(7, 445, __pyx_L1_error)) case XML_ENTITY_REF_NODE: /* "src/lxml/classlookup.pxi":446 @@ -101393,7 +95211,6 @@ static PyObject *__pyx_f_4lxml_5etree__custom_class_lookup(PyObject *__pyx_v_sta * else: * element_type = u"element" */ - __Pyx_TraceLine(446,0,__PYX_ERR(7, 446, __pyx_L1_error)) __Pyx_INCREF(__pyx_n_u_entity); __pyx_v_element_type = __pyx_n_u_entity; @@ -101414,7 +95231,6 @@ static PyObject *__pyx_f_4lxml_5etree__custom_class_lookup(PyObject *__pyx_v_sta * if c_node.name is NULL: * name = None */ - __Pyx_TraceLine(448,0,__PYX_ERR(7, 448, __pyx_L1_error)) __Pyx_INCREF(__pyx_n_u_element); __pyx_v_element_type = __pyx_n_u_element; break; @@ -101427,7 +95243,6 @@ static PyObject *__pyx_f_4lxml_5etree__custom_class_lookup(PyObject *__pyx_v_sta * name = None * else: */ - __Pyx_TraceLine(449,0,__PYX_ERR(7, 449, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node->name == NULL) != 0); if (__pyx_t_2) { @@ -101438,7 +95253,6 @@ static PyObject *__pyx_f_4lxml_5etree__custom_class_lookup(PyObject *__pyx_v_sta * else: * name = funicode(c_node.name) */ - __Pyx_TraceLine(450,0,__PYX_ERR(7, 450, __pyx_L1_error)) __Pyx_INCREF(Py_None); __pyx_v_name = Py_None; @@ -101459,7 +95273,6 @@ static PyObject *__pyx_f_4lxml_5etree__custom_class_lookup(PyObject *__pyx_v_sta * c_str = tree._getNs(c_node) * ns = funicode(c_str) if c_str is not NULL else None */ - __Pyx_TraceLine(452,0,__PYX_ERR(7, 452, __pyx_L1_error)) /*else*/ { __pyx_t_1 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_node->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -101475,7 +95288,6 @@ static PyObject *__pyx_f_4lxml_5etree__custom_class_lookup(PyObject *__pyx_v_sta * ns = funicode(c_str) if c_str is not NULL else None * */ - __Pyx_TraceLine(453,0,__PYX_ERR(7, 453, __pyx_L1_error)) __pyx_v_c_str = _getNs(__pyx_v_c_node); /* "src/lxml/classlookup.pxi":454 @@ -101485,7 +95297,6 @@ static PyObject *__pyx_f_4lxml_5etree__custom_class_lookup(PyObject *__pyx_v_sta * * cls = lookup.lookup(element_type, doc, ns, name) */ - __Pyx_TraceLine(454,0,__PYX_ERR(7, 454, __pyx_L1_error)) if (((__pyx_v_c_str != NULL) != 0)) { __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_str); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -101505,7 +95316,6 @@ static PyObject *__pyx_f_4lxml_5etree__custom_class_lookup(PyObject *__pyx_v_sta * if cls is not None: * _validateNodeClass(c_node, cls) */ - __Pyx_TraceLine(456,0,__PYX_ERR(7, 456, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_lookup), __pyx_n_s_lookup); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; @@ -101569,7 +95379,6 @@ static PyObject *__pyx_f_4lxml_5etree__custom_class_lookup(PyObject *__pyx_v_sta * _validateNodeClass(c_node, cls) * return cls */ - __Pyx_TraceLine(457,0,__PYX_ERR(7, 457, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_cls != Py_None); __pyx_t_7 = (__pyx_t_2 != 0); if (__pyx_t_7) { @@ -101581,7 +95390,6 @@ static PyObject *__pyx_f_4lxml_5etree__custom_class_lookup(PyObject *__pyx_v_sta * return cls * return _callLookupFallback(lookup, doc, c_node) */ - __Pyx_TraceLine(458,0,__PYX_ERR(7, 458, __pyx_L1_error)) __pyx_t_5 = __pyx_f_4lxml_5etree__validateNodeClass(__pyx_v_c_node, __pyx_v_cls); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 458, __pyx_L1_error) /* "src/lxml/classlookup.pxi":459 @@ -101591,7 +95399,6 @@ static PyObject *__pyx_f_4lxml_5etree__custom_class_lookup(PyObject *__pyx_v_sta * return _callLookupFallback(lookup, doc, c_node) * */ - __Pyx_TraceLine(459,0,__PYX_ERR(7, 459, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_cls); __pyx_r = __pyx_v_cls; @@ -101613,7 +95420,6 @@ static PyObject *__pyx_f_4lxml_5etree__custom_class_lookup(PyObject *__pyx_v_sta * * */ - __Pyx_TraceLine(460,0,__PYX_ERR(7, 460, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4lxml_5etree__callLookupFallback(((struct LxmlFallbackElementClassLookup *)__pyx_v_lookup), __pyx_v_doc, __pyx_v_c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -101644,7 +95450,6 @@ static PyObject *__pyx_f_4lxml_5etree__custom_class_lookup(PyObject *__pyx_v_sta __Pyx_XDECREF(__pyx_v_ns); __Pyx_XDECREF(__pyx_v_cls); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -101675,10 +95480,8 @@ static int __pyx_pw_4lxml_5etree_24PythonElementClassLookup_1__cinit__(PyObject static int __pyx_pf_4lxml_5etree_24PythonElementClassLookup___cinit__(struct __pyx_obj_4lxml_5etree_PythonElementClassLookup *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[7], 509, 0, __PYX_ERR(7, 509, __pyx_L1_error)); /* "src/lxml/classlookup.pxi":510 * """ @@ -101687,7 +95490,6 @@ static int __pyx_pf_4lxml_5etree_24PythonElementClassLookup___cinit__(struct __p * * def lookup(self, doc, element): */ - __Pyx_TraceLine(510,0,__PYX_ERR(7, 510, __pyx_L1_error)) __pyx_v_self->__pyx_base.__pyx_base._lookup_function = __pyx_f_4lxml_5etree__python_class_lookup; /* "src/lxml/classlookup.pxi":509 @@ -101700,12 +95502,6 @@ static int __pyx_pf_4lxml_5etree_24PythonElementClassLookup___cinit__(struct __p /* function exit code */ __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.PythonElementClassLookup.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -101721,7 +95517,7 @@ static int __pyx_pf_4lxml_5etree_24PythonElementClassLookup___cinit__(struct __p /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_24PythonElementClassLookup_3lookup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_24PythonElementClassLookup_2lookup[] = "lookup(self, doc, element)\n\n Override this method to implement your own lookup scheme.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_24PythonElementClassLookup_3lookup = {"lookup", (PyCFunction)__pyx_pw_4lxml_5etree_24PythonElementClassLookup_3lookup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_24PythonElementClassLookup_2lookup}; +static PyMethodDef __pyx_mdef_4lxml_5etree_24PythonElementClassLookup_3lookup = {"lookup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_24PythonElementClassLookup_3lookup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_24PythonElementClassLookup_2lookup}; static PyObject *__pyx_pw_4lxml_5etree_24PythonElementClassLookup_3lookup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_doc = 0; CYTHON_UNUSED PyObject *__pyx_v_element = 0; @@ -101783,11 +95579,8 @@ static PyObject *__pyx_pw_4lxml_5etree_24PythonElementClassLookup_3lookup(PyObje static PyObject *__pyx_pf_4lxml_5etree_24PythonElementClassLookup_2lookup(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree_PythonElementClassLookup *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_doc, CYTHON_UNUSED PyObject *__pyx_v_element) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - __Pyx_TraceFrameInit(__pyx_codeobj__210) __Pyx_RefNannySetupContext("lookup", 0); - __Pyx_TraceCall("lookup", __pyx_f[7], 512, 0, __PYX_ERR(7, 512, __pyx_L1_error)); /* "src/lxml/classlookup.pxi":517 * Override this method to implement your own lookup scheme. @@ -101796,7 +95589,6 @@ static PyObject *__pyx_pf_4lxml_5etree_24PythonElementClassLookup_2lookup(CYTHON * * cdef object _python_class_lookup(state, _Document doc, tree.xmlNode* c_node): */ - __Pyx_TraceLine(517,0,__PYX_ERR(7, 517, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -101810,12 +95602,8 @@ static PyObject *__pyx_pf_4lxml_5etree_24PythonElementClassLookup_2lookup(CYTHON */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.PythonElementClassLookup.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -101833,7 +95621,6 @@ static PyObject *__pyx_f_4lxml_5etree__python_class_lookup(PyObject *__pyx_v_sta struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *__pyx_v_proxy = 0; PyObject *__pyx_v_cls = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -101843,7 +95630,6 @@ static PyObject *__pyx_f_4lxml_5etree__python_class_lookup(PyObject *__pyx_v_sta int __pyx_t_6; int __pyx_t_7; __Pyx_RefNannySetupContext("_python_class_lookup", 0); - __Pyx_TraceCall("_python_class_lookup", __pyx_f[7], 519, 0, __PYX_ERR(7, 519, __pyx_L1_error)); /* "src/lxml/classlookup.pxi":522 * cdef PythonElementClassLookup lookup @@ -101852,7 +95638,6 @@ static PyObject *__pyx_f_4lxml_5etree__python_class_lookup(PyObject *__pyx_v_sta * * proxy = _newReadOnlyProxy(None, c_node) */ - __Pyx_TraceLine(522,0,__PYX_ERR(7, 522, __pyx_L1_error)) __pyx_t_1 = __pyx_v_state; __Pyx_INCREF(__pyx_t_1); __pyx_v_lookup = ((struct __pyx_obj_4lxml_5etree_PythonElementClassLookup *)__pyx_t_1); @@ -101865,7 +95650,6 @@ static PyObject *__pyx_f_4lxml_5etree__python_class_lookup(PyObject *__pyx_v_sta * cls = lookup.lookup(doc, proxy) * _freeReadOnlyProxies(proxy) */ - __Pyx_TraceLine(524,0,__PYX_ERR(7, 524, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__newReadOnlyProxy(((struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *)Py_None), __pyx_v_c_node)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_proxy = ((struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *)__pyx_t_1); @@ -101878,7 +95662,6 @@ static PyObject *__pyx_f_4lxml_5etree__python_class_lookup(PyObject *__pyx_v_sta * _freeReadOnlyProxies(proxy) * */ - __Pyx_TraceLine(525,0,__PYX_ERR(7, 525, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_lookup), __pyx_n_s_lookup); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; @@ -101936,7 +95719,6 @@ static PyObject *__pyx_f_4lxml_5etree__python_class_lookup(PyObject *__pyx_v_sta * * if cls is not None: */ - __Pyx_TraceLine(526,0,__PYX_ERR(7, 526, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__freeReadOnlyProxies(__pyx_v_proxy); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -101948,7 +95730,6 @@ static PyObject *__pyx_f_4lxml_5etree__python_class_lookup(PyObject *__pyx_v_sta * _validateNodeClass(c_node, cls) * return cls */ - __Pyx_TraceLine(528,0,__PYX_ERR(7, 528, __pyx_L1_error)) __pyx_t_6 = (__pyx_v_cls != Py_None); __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { @@ -101960,7 +95741,6 @@ static PyObject *__pyx_f_4lxml_5etree__python_class_lookup(PyObject *__pyx_v_sta * return cls * return _callLookupFallback(lookup, doc, c_node) */ - __Pyx_TraceLine(529,0,__PYX_ERR(7, 529, __pyx_L1_error)) __pyx_t_4 = __pyx_f_4lxml_5etree__validateNodeClass(__pyx_v_c_node, __pyx_v_cls); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(7, 529, __pyx_L1_error) /* "src/lxml/classlookup.pxi":530 @@ -101970,7 +95750,6 @@ static PyObject *__pyx_f_4lxml_5etree__python_class_lookup(PyObject *__pyx_v_sta * return _callLookupFallback(lookup, doc, c_node) * */ - __Pyx_TraceLine(530,0,__PYX_ERR(7, 530, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_cls); __pyx_r = __pyx_v_cls; @@ -101992,7 +95771,6 @@ static PyObject *__pyx_f_4lxml_5etree__python_class_lookup(PyObject *__pyx_v_sta * * ################################################################################ */ - __Pyx_TraceLine(531,0,__PYX_ERR(7, 531, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4lxml_5etree__callLookupFallback(((struct LxmlFallbackElementClassLookup *)__pyx_v_lookup), __pyx_v_doc, __pyx_v_c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -102021,7 +95799,6 @@ static PyObject *__pyx_f_4lxml_5etree__python_class_lookup(PyObject *__pyx_v_sta __Pyx_XDECREF((PyObject *)__pyx_v_proxy); __Pyx_XDECREF(__pyx_v_cls); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -102035,12 +95812,10 @@ static PyObject *__pyx_f_4lxml_5etree__python_class_lookup(PyObject *__pyx_v_sta */ static void __pyx_f_4lxml_5etree__setElementClassLookupFunction(_element_class_lookup_function __pyx_v_function, PyObject *__pyx_v_state) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; _element_class_lookup_function __pyx_t_2; __Pyx_RefNannySetupContext("_setElementClassLookupFunction", 0); - __Pyx_TraceCall("_setElementClassLookupFunction", __pyx_f[7], 539, 0, __PYX_ERR(7, 539, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_state); /* "src/lxml/classlookup.pxi":542 @@ -102050,7 +95825,6 @@ static void __pyx_f_4lxml_5etree__setElementClassLookupFunction(_element_class_l * state = DEFAULT_ELEMENT_CLASS_LOOKUP * function = DEFAULT_ELEMENT_CLASS_LOOKUP._lookup_function */ - __Pyx_TraceLine(542,0,__PYX_ERR(7, 542, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_function == NULL) != 0); if (__pyx_t_1) { @@ -102061,7 +95835,6 @@ static void __pyx_f_4lxml_5etree__setElementClassLookupFunction(_element_class_l * function = DEFAULT_ELEMENT_CLASS_LOOKUP._lookup_function * */ - __Pyx_TraceLine(543,0,__PYX_ERR(7, 543, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_4lxml_5etree_DEFAULT_ELEMENT_CLASS_LOOKUP)); __Pyx_DECREF_SET(__pyx_v_state, ((PyObject *)__pyx_v_4lxml_5etree_DEFAULT_ELEMENT_CLASS_LOOKUP)); @@ -102072,7 +95845,6 @@ static void __pyx_f_4lxml_5etree__setElementClassLookupFunction(_element_class_l * * ELEMENT_CLASS_LOOKUP_STATE = state */ - __Pyx_TraceLine(544,0,__PYX_ERR(7, 544, __pyx_L1_error)) __pyx_t_2 = __pyx_v_4lxml_5etree_DEFAULT_ELEMENT_CLASS_LOOKUP->__pyx_base.__pyx_base._lookup_function; __pyx_v_function = __pyx_t_2; @@ -102092,7 +95864,6 @@ static void __pyx_f_4lxml_5etree__setElementClassLookupFunction(_element_class_l * LOOKUP_ELEMENT_CLASS = function * */ - __Pyx_TraceLine(546,0,__PYX_ERR(7, 546, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_state); __Pyx_XGOTREF(__pyx_v_4lxml_5etree_ELEMENT_CLASS_LOOKUP_STATE); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree_ELEMENT_CLASS_LOOKUP_STATE, __pyx_v_state); @@ -102105,7 +95876,6 @@ static void __pyx_f_4lxml_5etree__setElementClassLookupFunction(_element_class_l * * def set_element_class_lookup(ElementClassLookup lookup = None): */ - __Pyx_TraceLine(547,0,__PYX_ERR(7, 547, __pyx_L1_error)) __pyx_v_4lxml_5etree_LOOKUP_ELEMENT_CLASS = __pyx_v_function; /* "src/lxml/classlookup.pxi":539 @@ -102117,12 +95887,7 @@ static void __pyx_f_4lxml_5etree__setElementClassLookupFunction(_element_class_l */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._setElementClassLookupFunction", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -102137,7 +95902,7 @@ static void __pyx_f_4lxml_5etree__setElementClassLookupFunction(_element_class_l /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_41set_element_class_lookup(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_40set_element_class_lookup[] = "set_element_class_lookup(lookup = None)\n\n Set the global default element class lookup method.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_41set_element_class_lookup = {"set_element_class_lookup", (PyCFunction)__pyx_pw_4lxml_5etree_41set_element_class_lookup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_40set_element_class_lookup}; +static PyMethodDef __pyx_mdef_4lxml_5etree_41set_element_class_lookup = {"set_element_class_lookup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_41set_element_class_lookup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_40set_element_class_lookup}; static PyObject *__pyx_pw_4lxml_5etree_41set_element_class_lookup(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct LxmlElementClassLookup *__pyx_v_lookup = 0; PyObject *__pyx_r = 0; @@ -102199,14 +95964,11 @@ static PyObject *__pyx_pw_4lxml_5etree_41set_element_class_lookup(PyObject *__py static PyObject *__pyx_pf_4lxml_5etree_40set_element_class_lookup(CYTHON_UNUSED PyObject *__pyx_self, struct LxmlElementClassLookup *__pyx_v_lookup) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; - __Pyx_TraceFrameInit(__pyx_codeobj__211) __Pyx_RefNannySetupContext("set_element_class_lookup", 0); - __Pyx_TraceCall("set_element_class_lookup", __pyx_f[7], 549, 0, __PYX_ERR(7, 549, __pyx_L1_error)); /* "src/lxml/classlookup.pxi":554 * Set the global default element class lookup method. @@ -102215,7 +95977,6 @@ static PyObject *__pyx_pf_4lxml_5etree_40set_element_class_lookup(CYTHON_UNUSED * _setElementClassLookupFunction(NULL, None) * else: */ - __Pyx_TraceLine(554,0,__PYX_ERR(7, 554, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)__pyx_v_lookup) == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (!__pyx_t_3) { @@ -102235,7 +95996,6 @@ static PyObject *__pyx_pf_4lxml_5etree_40set_element_class_lookup(CYTHON_UNUSED * else: * _setElementClassLookupFunction(lookup._lookup_function, lookup) */ - __Pyx_TraceLine(555,0,__PYX_ERR(7, 555, __pyx_L1_error)) __pyx_f_4lxml_5etree__setElementClassLookupFunction(NULL, Py_None); /* "src/lxml/classlookup.pxi":554 @@ -102255,7 +96015,6 @@ static PyObject *__pyx_pf_4lxml_5etree_40set_element_class_lookup(CYTHON_UNUSED * * # default setup: parser delegation */ - __Pyx_TraceLine(557,0,__PYX_ERR(7, 557, __pyx_L1_error)) /*else*/ { __pyx_f_4lxml_5etree__setElementClassLookupFunction(__pyx_v_lookup->_lookup_function, ((PyObject *)__pyx_v_lookup)); } @@ -102271,13 +96030,7 @@ static PyObject *__pyx_pf_4lxml_5etree_40set_element_class_lookup(CYTHON_UNUSED /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.set_element_class_lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -102316,7 +96069,7 @@ static int __pyx_pw_4lxml_5etree_18_NamespaceRegistry_1__cinit__(PyObject *__pyx 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(9, 19, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(10, 19, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -102327,7 +96080,7 @@ static int __pyx_pw_4lxml_5etree_18_NamespaceRegistry_1__cinit__(PyObject *__pyx } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(9, 19, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 19, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._NamespaceRegistry.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -102342,13 +96095,11 @@ static int __pyx_pw_4lxml_5etree_18_NamespaceRegistry_1__cinit__(PyObject *__pyx static int __pyx_pf_4lxml_5etree_18_NamespaceRegistry___cinit__(struct __pyx_obj_4lxml_5etree__NamespaceRegistry *__pyx_v_self, PyObject *__pyx_v_ns_uri) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[9], 19, 0, __PYX_ERR(9, 19, __pyx_L1_error)); /* "src/lxml/nsclasses.pxi":20 * cdef char* _c_ns_uri_utf @@ -102357,7 +96108,6 @@ static int __pyx_pf_4lxml_5etree_18_NamespaceRegistry___cinit__(struct __pyx_obj * if ns_uri is None: * self._ns_uri_utf = None */ - __Pyx_TraceLine(20,0,__PYX_ERR(9, 20, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_ns_uri); __Pyx_GIVEREF(__pyx_v_ns_uri); __Pyx_GOTREF(__pyx_v_self->_ns_uri); @@ -102371,7 +96121,6 @@ static int __pyx_pf_4lxml_5etree_18_NamespaceRegistry___cinit__(struct __pyx_obj * self._ns_uri_utf = None * self._c_ns_uri_utf = NULL */ - __Pyx_TraceLine(21,0,__PYX_ERR(9, 21, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_ns_uri == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -102383,7 +96132,6 @@ static int __pyx_pf_4lxml_5etree_18_NamespaceRegistry___cinit__(struct __pyx_obj * self._c_ns_uri_utf = NULL * else: */ - __Pyx_TraceLine(22,0,__PYX_ERR(9, 22, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_ns_uri_utf); @@ -102397,7 +96145,6 @@ static int __pyx_pf_4lxml_5etree_18_NamespaceRegistry___cinit__(struct __pyx_obj * else: * self._ns_uri_utf = _utf8(ns_uri) */ - __Pyx_TraceLine(23,0,__PYX_ERR(9, 23, __pyx_L1_error)) __pyx_v_self->_c_ns_uri_utf = NULL; /* "src/lxml/nsclasses.pxi":21 @@ -102417,9 +96164,8 @@ static int __pyx_pf_4lxml_5etree_18_NamespaceRegistry___cinit__(struct __pyx_obj * self._c_ns_uri_utf = _cstr(self._ns_uri_utf) * self._entries = {} */ - __Pyx_TraceLine(25,0,__PYX_ERR(9, 25, __pyx_L1_error)) /*else*/ { - __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_ns_uri); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 25, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_ns_uri); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_ns_uri_utf); @@ -102434,7 +96180,6 @@ static int __pyx_pf_4lxml_5etree_18_NamespaceRegistry___cinit__(struct __pyx_obj * self._entries = {} * */ - __Pyx_TraceLine(26,0,__PYX_ERR(9, 26, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->_ns_uri_utf; __Pyx_INCREF(__pyx_t_3); __pyx_v_self->_c_ns_uri_utf = PyBytes_AS_STRING(__pyx_t_3); @@ -102449,8 +96194,7 @@ static int __pyx_pf_4lxml_5etree_18_NamespaceRegistry___cinit__(struct __pyx_obj * * def update(self, class_dict_iterable): */ - __Pyx_TraceLine(27,0,__PYX_ERR(9, 27, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 27, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_entries); @@ -102474,7 +96218,6 @@ static int __pyx_pf_4lxml_5etree_18_NamespaceRegistry___cinit__(struct __pyx_obj __Pyx_AddTraceback("lxml.etree._NamespaceRegistry.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -102506,7 +96249,6 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_2update(struct __pyx PyObject *__pyx_v_name = NULL; PyObject *__pyx_v_item = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -102519,9 +96261,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_2update(struct __pyx PyObject *__pyx_t_9 = NULL; PyObject *(*__pyx_t_10)(PyObject *); int __pyx_t_11; - __Pyx_TraceFrameInit(__pyx_codeobj__212) __Pyx_RefNannySetupContext("update", 0); - __Pyx_TraceCall("update", __pyx_f[9], 29, 0, __PYX_ERR(9, 29, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_class_dict_iterable); /* "src/lxml/nsclasses.pxi":41 @@ -102531,8 +96271,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_2update(struct __pyx * class_dict_iterable = class_dict_iterable.items() * for name, item in class_dict_iterable: */ - __Pyx_TraceLine(41,0,__PYX_ERR(9, 41, __pyx_L1_error)) - __pyx_t_1 = __Pyx_HasAttr(__pyx_v_class_dict_iterable, __pyx_n_u_items); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(9, 41, __pyx_L1_error) + __pyx_t_1 = __Pyx_HasAttr(__pyx_v_class_dict_iterable, __pyx_n_u_items); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(10, 41, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -102543,8 +96282,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_2update(struct __pyx * for name, item in class_dict_iterable: * if (name is None or name[:1] != '_') and callable(item): */ - __Pyx_TraceLine(42,0,__PYX_ERR(9, 42, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_class_dict_iterable, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 42, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_class_dict_iterable, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -102556,12 +96294,9 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_2update(struct __pyx __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 42, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 42, __pyx_L1_error) - } + __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(10, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_class_dict_iterable, __pyx_t_3); @@ -102583,31 +96318,30 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_2update(struct __pyx * if (name is None or name[:1] != '_') and callable(item): * self[name] = item */ - __Pyx_TraceLine(43,0,__PYX_ERR(9, 43, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_v_class_dict_iterable)) || PyTuple_CheckExact(__pyx_v_class_dict_iterable)) { __pyx_t_3 = __pyx_v_class_dict_iterable; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_class_dict_iterable); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 43, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_class_dict_iterable); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 43, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(10, 43, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { 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_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(9, 43, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(10, 43, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 43, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(9, 43, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(10, 43, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 43, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -102617,7 +96351,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_2update(struct __pyx PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(9, 43, __pyx_L1_error) + else __PYX_ERR(10, 43, __pyx_L1_error) } break; } @@ -102629,7 +96363,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_2update(struct __pyx if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(9, 43, __pyx_L1_error) + __PYX_ERR(10, 43, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -102642,15 +96376,15 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_2update(struct __pyx __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_8); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 43, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(9, 43, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(10, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(9, 43, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(10, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; @@ -102658,7 +96392,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_2update(struct __pyx __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(9, 43, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(10, 43, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L7_unpacking_done; @@ -102666,7 +96400,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_2update(struct __pyx __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(9, 43, __pyx_L1_error) + __PYX_ERR(10, 43, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5); @@ -102681,16 +96415,15 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_2update(struct __pyx * self[name] = item * */ - __Pyx_TraceLine(44,0,__PYX_ERR(9, 44, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_name == Py_None); __pyx_t_11 = (__pyx_t_1 != 0); if (!__pyx_t_11) { } else { goto __pyx_L10_next_and; } - __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_name, 0, 1, NULL, NULL, &__pyx_slice__213, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 44, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_name, 0, 1, NULL, NULL, &__pyx_slice__39, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s__214, Py_NE)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(9, 44, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s__51, Py_NE)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(10, 44, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_11) { } else { @@ -102698,7 +96431,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_2update(struct __pyx goto __pyx_L9_bool_binop_done; } __pyx_L10_next_and:; - __pyx_t_11 = __Pyx_PyCallable_Check(__pyx_v_item); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(9, 44, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyCallable_Check(__pyx_v_item); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(10, 44, __pyx_L1_error) __pyx_t_1 = (__pyx_t_11 != 0); __pyx_t_2 = __pyx_t_1; __pyx_L9_bool_binop_done:; @@ -102711,8 +96444,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_2update(struct __pyx * * def __getitem__(self, name): */ - __Pyx_TraceLine(45,0,__PYX_ERR(9, 45, __pyx_L1_error)) - if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_name, __pyx_v_item) < 0)) __PYX_ERR(9, 45, __pyx_L1_error) + if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_name, __pyx_v_item) < 0)) __PYX_ERR(10, 45, __pyx_L1_error) /* "src/lxml/nsclasses.pxi":44 * class_dict_iterable = class_dict_iterable.items() @@ -102730,7 +96462,6 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_2update(struct __pyx * if (name is None or name[:1] != '_') and callable(item): * self[name] = item */ - __Pyx_TraceLine(43,0,__PYX_ERR(9, 43, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -102758,7 +96489,6 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_2update(struct __pyx __Pyx_XDECREF(__pyx_v_item); __Pyx_XDECREF(__pyx_v_class_dict_iterable); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -102786,13 +96516,11 @@ static PyObject *__pyx_pw_4lxml_5etree_18_NamespaceRegistry_5__getitem__(PyObjec static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_4__getitem__(struct __pyx_obj_4lxml_5etree__NamespaceRegistry *__pyx_v_self, PyObject *__pyx_v_name) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__getitem__", 0); - __Pyx_TraceCall("__getitem__", __pyx_f[9], 47, 0, __PYX_ERR(9, 47, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_name); /* "src/lxml/nsclasses.pxi":48 @@ -102802,7 +96530,6 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_4__getitem__(struct * name = _utf8(name) * return self._get(name) */ - __Pyx_TraceLine(48,0,__PYX_ERR(9, 48, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_name != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -102814,8 +96541,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_4__getitem__(struct * return self._get(name) * */ - __Pyx_TraceLine(49,0,__PYX_ERR(9, 49, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 49, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_3); __pyx_t_3 = 0; @@ -102836,9 +96562,8 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_4__getitem__(struct * * def __delitem__(self, name): */ - __Pyx_TraceLine(50,0,__PYX_ERR(9, 50, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree__NamespaceRegistry *)__pyx_v_self->__pyx_vtab)->_get(__pyx_v_self, __pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 50, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree__NamespaceRegistry *)__pyx_v_self->__pyx_vtab)->_get(__pyx_v_self, __pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -102860,7 +96585,6 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_4__getitem__(struct __pyx_L0:; __Pyx_XDECREF(__pyx_v_name); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -102888,13 +96612,11 @@ static int __pyx_pw_4lxml_5etree_18_NamespaceRegistry_7__delitem__(PyObject *__p static int __pyx_pf_4lxml_5etree_18_NamespaceRegistry_6__delitem__(struct __pyx_obj_4lxml_5etree__NamespaceRegistry *__pyx_v_self, PyObject *__pyx_v_name) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__delitem__", 0); - __Pyx_TraceCall("__delitem__", __pyx_f[9], 52, 0, __PYX_ERR(9, 52, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_name); /* "src/lxml/nsclasses.pxi":53 @@ -102904,7 +96626,6 @@ static int __pyx_pf_4lxml_5etree_18_NamespaceRegistry_6__delitem__(struct __pyx_ * name = _utf8(name) * del self._entries[name] */ - __Pyx_TraceLine(53,0,__PYX_ERR(9, 53, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_name != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -102916,8 +96637,7 @@ static int __pyx_pf_4lxml_5etree_18_NamespaceRegistry_6__delitem__(struct __pyx_ * del self._entries[name] * */ - __Pyx_TraceLine(54,0,__PYX_ERR(9, 54, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 54, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_3); __pyx_t_3 = 0; @@ -102938,12 +96658,11 @@ static int __pyx_pf_4lxml_5etree_18_NamespaceRegistry_6__delitem__(struct __pyx_ * * cdef object _get(self, object name): */ - __Pyx_TraceLine(55,0,__PYX_ERR(9, 55, __pyx_L1_error)) if (unlikely(__pyx_v_self->_entries == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(9, 55, __pyx_L1_error) + __PYX_ERR(10, 55, __pyx_L1_error) } - if (unlikely(PyDict_DelItem(__pyx_v_self->_entries, __pyx_v_name) < 0)) __PYX_ERR(9, 55, __pyx_L1_error) + if (unlikely(PyDict_DelItem(__pyx_v_self->_entries, __pyx_v_name) < 0)) __PYX_ERR(10, 55, __pyx_L1_error) /* "src/lxml/nsclasses.pxi":52 * return self._get(name) @@ -102962,7 +96681,6 @@ static int __pyx_pf_4lxml_5etree_18_NamespaceRegistry_6__delitem__(struct __pyx_ __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_name); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -102978,12 +96696,10 @@ static int __pyx_pf_4lxml_5etree_18_NamespaceRegistry_6__delitem__(struct __pyx_ static PyObject *__pyx_f_4lxml_5etree_18_NamespaceRegistry__get(struct __pyx_obj_4lxml_5etree__NamespaceRegistry *__pyx_v_self, PyObject *__pyx_v_name) { PyObject *__pyx_v_dict_result; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("_get", 0); - __Pyx_TraceCall("_get", __pyx_f[9], 57, 0, __PYX_ERR(9, 57, __pyx_L1_error)); /* "src/lxml/nsclasses.pxi":59 * cdef object _get(self, object name): @@ -102992,7 +96708,6 @@ static PyObject *__pyx_f_4lxml_5etree_18_NamespaceRegistry__get(struct __pyx_obj * if dict_result is NULL: * raise KeyError, u"Name not registered." */ - __Pyx_TraceLine(59,0,__PYX_ERR(9, 59, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_entries; __Pyx_INCREF(__pyx_t_1); __pyx_v_dict_result = PyDict_GetItem(__pyx_t_1, __pyx_v_name); @@ -103005,7 +96720,6 @@ static PyObject *__pyx_f_4lxml_5etree_18_NamespaceRegistry__get(struct __pyx_obj * raise KeyError, u"Name not registered." * return dict_result */ - __Pyx_TraceLine(60,0,__PYX_ERR(9, 60, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_dict_result == NULL) != 0); if (unlikely(__pyx_t_2)) { @@ -103016,9 +96730,8 @@ static PyObject *__pyx_f_4lxml_5etree_18_NamespaceRegistry__get(struct __pyx_obj * return dict_result * */ - __Pyx_TraceLine(61,0,__PYX_ERR(9, 61, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_KeyError, __pyx_kp_u_Name_not_registered, 0, 0); - __PYX_ERR(9, 61, __pyx_L1_error) + __PYX_ERR(10, 61, __pyx_L1_error) /* "src/lxml/nsclasses.pxi":60 * cdef python.PyObject* dict_result @@ -103036,7 +96749,6 @@ static PyObject *__pyx_f_4lxml_5etree_18_NamespaceRegistry__get(struct __pyx_obj * * cdef object _getForString(self, char* name): */ - __Pyx_TraceLine(62,0,__PYX_ERR(9, 62, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_dict_result)); __pyx_r = ((PyObject *)__pyx_v_dict_result); @@ -103057,7 +96769,6 @@ static PyObject *__pyx_f_4lxml_5etree_18_NamespaceRegistry__get(struct __pyx_obj __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -103073,13 +96784,11 @@ static PyObject *__pyx_f_4lxml_5etree_18_NamespaceRegistry__get(struct __pyx_obj static PyObject *__pyx_f_4lxml_5etree_18_NamespaceRegistry__getForString(struct __pyx_obj_4lxml_5etree__NamespaceRegistry *__pyx_v_self, char *__pyx_v_name) { PyObject *__pyx_v_dict_result; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("_getForString", 0); - __Pyx_TraceCall("_getForString", __pyx_f[9], 64, 0, __PYX_ERR(9, 64, __pyx_L1_error)); /* "src/lxml/nsclasses.pxi":66 * cdef object _getForString(self, char* name): @@ -103088,10 +96797,9 @@ static PyObject *__pyx_f_4lxml_5etree_18_NamespaceRegistry__getForString(struct * if dict_result is NULL: * raise KeyError, u"Name not registered." */ - __Pyx_TraceLine(66,0,__PYX_ERR(9, 66, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_entries; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 66, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_dict_result = PyDict_GetItem(__pyx_t_1, __pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -103104,7 +96812,6 @@ static PyObject *__pyx_f_4lxml_5etree_18_NamespaceRegistry__getForString(struct * raise KeyError, u"Name not registered." * return dict_result */ - __Pyx_TraceLine(67,0,__PYX_ERR(9, 67, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_dict_result == NULL) != 0); if (unlikely(__pyx_t_3)) { @@ -103115,9 +96822,8 @@ static PyObject *__pyx_f_4lxml_5etree_18_NamespaceRegistry__getForString(struct * return dict_result * */ - __Pyx_TraceLine(68,0,__PYX_ERR(9, 68, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_KeyError, __pyx_kp_u_Name_not_registered, 0, 0); - __PYX_ERR(9, 68, __pyx_L1_error) + __PYX_ERR(10, 68, __pyx_L1_error) /* "src/lxml/nsclasses.pxi":67 * cdef python.PyObject* dict_result @@ -103135,7 +96841,6 @@ static PyObject *__pyx_f_4lxml_5etree_18_NamespaceRegistry__getForString(struct * * def __iter__(self): */ - __Pyx_TraceLine(69,0,__PYX_ERR(9, 69, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_dict_result)); __pyx_r = ((PyObject *)__pyx_v_dict_result); @@ -103157,7 +96862,6 @@ static PyObject *__pyx_f_4lxml_5etree_18_NamespaceRegistry__getForString(struct __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -103185,12 +96889,10 @@ static PyObject *__pyx_pw_4lxml_5etree_18_NamespaceRegistry_9__iter__(PyObject * static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_8__iter__(struct __pyx_obj_4lxml_5etree__NamespaceRegistry *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__iter__", 0); - __Pyx_TraceCall("__iter__", __pyx_f[9], 71, 0, __PYX_ERR(9, 71, __pyx_L1_error)); /* "src/lxml/nsclasses.pxi":72 * @@ -103199,11 +96901,10 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_8__iter__(struct __p * * def items(self): */ - __Pyx_TraceLine(72,0,__PYX_ERR(9, 72, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_v_self->_entries; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 72, __pyx_L1_error) + __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; @@ -103226,7 +96927,6 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_8__iter__(struct __p __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -103255,13 +96955,10 @@ static PyObject *__pyx_pw_4lxml_5etree_18_NamespaceRegistry_11items(PyObject *__ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_10items(struct __pyx_obj_4lxml_5etree__NamespaceRegistry *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__215) __Pyx_RefNannySetupContext("items", 0); - __Pyx_TraceCall("items", __pyx_f[9], 74, 0, __PYX_ERR(9, 74, __pyx_L1_error)); /* "src/lxml/nsclasses.pxi":75 * @@ -103270,15 +96967,14 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_10items(struct __pyx * * def iteritems(self): */ - __Pyx_TraceLine(75,0,__PYX_ERR(9, 75, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->_entries == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); - __PYX_ERR(9, 75, __pyx_L1_error) + __PYX_ERR(10, 75, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_self->_entries); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 75, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_self->_entries); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 75, __pyx_L1_error) + __pyx_t_2 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; @@ -103301,7 +96997,6 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_10items(struct __pyx __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -103330,13 +97025,10 @@ static PyObject *__pyx_pw_4lxml_5etree_18_NamespaceRegistry_13iteritems(PyObject static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_12iteritems(struct __pyx_obj_4lxml_5etree__NamespaceRegistry *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__216) __Pyx_RefNannySetupContext("iteritems", 0); - __Pyx_TraceCall("iteritems", __pyx_f[9], 77, 0, __PYX_ERR(9, 77, __pyx_L1_error)); /* "src/lxml/nsclasses.pxi":78 * @@ -103345,15 +97037,14 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_12iteritems(struct _ * * def clear(self): */ - __Pyx_TraceLine(78,0,__PYX_ERR(9, 78, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->_entries == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); - __PYX_ERR(9, 78, __pyx_L1_error) + __PYX_ERR(10, 78, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_self->_entries); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 78, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_self->_entries); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 78, __pyx_L1_error) + __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; @@ -103376,7 +97067,6 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_12iteritems(struct _ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -103405,12 +97095,9 @@ static PyObject *__pyx_pw_4lxml_5etree_18_NamespaceRegistry_15clear(PyObject *__ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_14clear(struct __pyx_obj_4lxml_5etree__NamespaceRegistry *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; - __Pyx_TraceFrameInit(__pyx_codeobj__217) __Pyx_RefNannySetupContext("clear", 0); - __Pyx_TraceCall("clear", __pyx_f[9], 80, 0, __PYX_ERR(9, 80, __pyx_L1_error)); /* "src/lxml/nsclasses.pxi":81 * @@ -103419,12 +97106,11 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_14clear(struct __pyx * * def __call__(self, obj): */ - __Pyx_TraceLine(81,0,__PYX_ERR(9, 81, __pyx_L1_error)) if (unlikely(__pyx_v_self->_entries == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "clear"); - __PYX_ERR(9, 81, __pyx_L1_error) + __PYX_ERR(10, 81, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Clear(__pyx_v_self->_entries); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(9, 81, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Clear(__pyx_v_self->_entries); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(10, 81, __pyx_L1_error) /* "src/lxml/nsclasses.pxi":80 * return iter(self._entries.items()) @@ -103442,7 +97128,6 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_14clear(struct __pyx __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -103481,7 +97166,7 @@ static PyObject *__pyx_pw_4lxml_5etree_18_NamespaceRegistry_17__call__(PyObject else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(9, 83, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(10, 83, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -103492,7 +97177,7 @@ static PyObject *__pyx_pw_4lxml_5etree_18_NamespaceRegistry_17__call__(PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(9, 83, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 83, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._NamespaceRegistry.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -103507,7 +97192,6 @@ static PyObject *__pyx_pw_4lxml_5etree_18_NamespaceRegistry_17__call__(PyObject static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_16__call__(struct __pyx_obj_4lxml_5etree__NamespaceRegistry *__pyx_v_self, PyObject *__pyx_v_obj) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -103519,7 +97203,6 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_16__call__(struct __ int __pyx_t_8; PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[9], 83, 0, __PYX_ERR(9, 83, __pyx_L1_error)); /* "src/lxml/nsclasses.pxi":92 * # class elementname(ElementBase): pass @@ -103528,7 +97211,6 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_16__call__(struct __ * # @ns(None) or @ns('tag') * return partial(self.__deco, obj) */ - __Pyx_TraceLine(92,0,__PYX_ERR(9, 92, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_obj == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (!__pyx_t_3) { @@ -103548,9 +97230,8 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_16__call__(struct __ * # plain @ns decorator * self[obj.__name__] = obj */ - __Pyx_TraceLine(94,0,__PYX_ERR(9, 94, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_deco); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 94, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_deco); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_4lxml_5etree_partial); __pyx_t_6 = __pyx_v_4lxml_5etree_partial; __pyx_t_7 = NULL; @@ -103568,7 +97249,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_16__call__(struct __ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_5, __pyx_v_obj}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 94, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 94, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -103577,14 +97258,14 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_16__call__(struct __ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_5, __pyx_v_obj}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 94, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 94, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(9, 94, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(10, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -103595,7 +97276,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_16__call__(struct __ __Pyx_GIVEREF(__pyx_v_obj); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_obj); __pyx_t_5 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 94, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -103620,10 +97301,9 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_16__call__(struct __ * return obj * */ - __Pyx_TraceLine(96,0,__PYX_ERR(9, 96, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 96, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_t_4, __pyx_v_obj) < 0)) __PYX_ERR(9, 96, __pyx_L1_error) + if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_t_4, __pyx_v_obj) < 0)) __PYX_ERR(10, 96, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "src/lxml/nsclasses.pxi":97 @@ -103633,7 +97313,6 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_16__call__(struct __ * * def __deco(self, name, obj): */ - __Pyx_TraceLine(97,0,__PYX_ERR(9, 97, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_obj); __pyx_r = __pyx_v_obj; @@ -103658,7 +97337,6 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_16__call__(struct __ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -103673,7 +97351,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_16__call__(struct __ /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_18_NamespaceRegistry_19__deco(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_5etree_18_NamespaceRegistry_19__deco = {"__deco", (PyCFunction)__pyx_pw_4lxml_5etree_18_NamespaceRegistry_19__deco, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_5etree_18_NamespaceRegistry_19__deco = {"__deco", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_18_NamespaceRegistry_19__deco, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_5etree_18_NamespaceRegistry_19__deco(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyObject *__pyx_v_obj = 0; @@ -103703,11 +97381,11 @@ static PyObject *__pyx_pw_4lxml_5etree_18_NamespaceRegistry_19__deco(PyObject *_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__deco", 1, 2, 2, 1); __PYX_ERR(9, 99, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__deco", 1, 2, 2, 1); __PYX_ERR(10, 99, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__deco") < 0)) __PYX_ERR(9, 99, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__deco") < 0)) __PYX_ERR(10, 99, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -103720,7 +97398,7 @@ static PyObject *__pyx_pw_4lxml_5etree_18_NamespaceRegistry_19__deco(PyObject *_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__deco", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(9, 99, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__deco", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 99, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._NamespaceRegistry.__deco", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -103735,11 +97413,8 @@ static PyObject *__pyx_pw_4lxml_5etree_18_NamespaceRegistry_19__deco(PyObject *_ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_18__deco(struct __pyx_obj_4lxml_5etree__NamespaceRegistry *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_obj) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - __Pyx_TraceFrameInit(__pyx_codeobj__218) __Pyx_RefNannySetupContext("__deco", 0); - __Pyx_TraceCall("__deco", __pyx_f[9], 99, 0, __PYX_ERR(9, 99, __pyx_L1_error)); /* "src/lxml/nsclasses.pxi":100 * @@ -103748,8 +97423,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_18__deco(struct __py * return obj * */ - __Pyx_TraceLine(100,0,__PYX_ERR(9, 100, __pyx_L1_error)) - if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_name, __pyx_v_obj) < 0)) __PYX_ERR(9, 100, __pyx_L1_error) + if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_name, __pyx_v_obj) < 0)) __PYX_ERR(10, 100, __pyx_L1_error) /* "src/lxml/nsclasses.pxi":101 * def __deco(self, name, obj): @@ -103758,7 +97432,6 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_18__deco(struct __py * * */ - __Pyx_TraceLine(101,0,__PYX_ERR(9, 101, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_obj); __pyx_r = __pyx_v_obj; @@ -103778,7 +97451,6 @@ static PyObject *__pyx_pf_4lxml_5etree_18_NamespaceRegistry_18__deco(struct __py __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -103806,14 +97478,12 @@ static int __pyx_pw_4lxml_5etree_23_ClassNamespaceRegistry_1__setitem__(PyObject static int __pyx_pf_4lxml_5etree_23_ClassNamespaceRegistry___setitem__(struct __pyx_obj_4lxml_5etree__ClassNamespaceRegistry *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_item) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__setitem__", 0); - __Pyx_TraceCall("__setitem__", __pyx_f[9], 108, 0, __PYX_ERR(9, 108, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_name); /* "src/lxml/nsclasses.pxi":109 @@ -103823,7 +97493,6 @@ static int __pyx_pf_4lxml_5etree_23_ClassNamespaceRegistry___setitem__(struct __ * raise NamespaceRegistryError, \ * u"Registered element classes must be subtypes of ElementBase" */ - __Pyx_TraceLine(109,0,__PYX_ERR(9, 109, __pyx_L1_error)) __pyx_t_2 = PyType_Check(__pyx_v_item); __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0); if (!__pyx_t_3) { @@ -103831,7 +97500,7 @@ static int __pyx_pf_4lxml_5etree_23_ClassNamespaceRegistry___setitem__(struct __ __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = PyObject_IsSubclass(__pyx_v_item, ((PyObject *)__pyx_ptype_4lxml_5etree_ElementBase)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(9, 109, __pyx_L1_error) + __pyx_t_3 = PyObject_IsSubclass(__pyx_v_item, ((PyObject *)__pyx_ptype_4lxml_5etree_ElementBase)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(10, 109, __pyx_L1_error) __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; @@ -103844,9 +97513,8 @@ static int __pyx_pf_4lxml_5etree_23_ClassNamespaceRegistry___setitem__(struct __ * u"Registered element classes must be subtypes of ElementBase" * if name is not None: */ - __Pyx_TraceLine(110,0,__PYX_ERR(9, 110, __pyx_L1_error)) __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_NamespaceRegistryError), __pyx_kp_u_Registered_element_classes_must, 0, 0); - __PYX_ERR(9, 110, __pyx_L1_error) + __PYX_ERR(10, 110, __pyx_L1_error) /* "src/lxml/nsclasses.pxi":109 * u"Dictionary-like registry for namespace implementation classes" @@ -103864,7 +97532,6 @@ static int __pyx_pf_4lxml_5etree_23_ClassNamespaceRegistry___setitem__(struct __ * name = _utf8(name) * self._entries[name] = item */ - __Pyx_TraceLine(112,0,__PYX_ERR(9, 112, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_name != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -103876,8 +97543,7 @@ static int __pyx_pf_4lxml_5etree_23_ClassNamespaceRegistry___setitem__(struct __ * self._entries[name] = item * */ - __Pyx_TraceLine(113,0,__PYX_ERR(9, 113, __pyx_L1_error)) - __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_v_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 113, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_v_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_4); __pyx_t_4 = 0; @@ -103898,12 +97564,11 @@ static int __pyx_pf_4lxml_5etree_23_ClassNamespaceRegistry___setitem__(struct __ * * def __repr__(self): */ - __Pyx_TraceLine(114,0,__PYX_ERR(9, 114, __pyx_L1_error)) if (unlikely(__pyx_v_self->__pyx_base._entries == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(9, 114, __pyx_L1_error) + __PYX_ERR(10, 114, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_self->__pyx_base._entries, __pyx_v_name, __pyx_v_item) < 0)) __PYX_ERR(9, 114, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->__pyx_base._entries, __pyx_v_name, __pyx_v_item) < 0)) __PYX_ERR(10, 114, __pyx_L1_error) /* "src/lxml/nsclasses.pxi":108 * cdef class _ClassNamespaceRegistry(_NamespaceRegistry): @@ -103922,7 +97587,6 @@ static int __pyx_pf_4lxml_5etree_23_ClassNamespaceRegistry___setitem__(struct __ __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_name); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -103950,11 +97614,9 @@ static PyObject *__pyx_pw_4lxml_5etree_23_ClassNamespaceRegistry_3__repr__(PyObj static PyObject *__pyx_pf_4lxml_5etree_23_ClassNamespaceRegistry_2__repr__(struct __pyx_obj_4lxml_5etree__ClassNamespaceRegistry *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[9], 116, 0, __PYX_ERR(9, 116, __pyx_L1_error)); /* "src/lxml/nsclasses.pxi":117 * @@ -103963,9 +97625,8 @@ static PyObject *__pyx_pf_4lxml_5etree_23_ClassNamespaceRegistry_2__repr__(struc * * */ - __Pyx_TraceLine(117,0,__PYX_ERR(9, 117, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_Namespace_r, __pyx_v_self->__pyx_base._ns_uri); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 117, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Namespace_r, __pyx_v_self->__pyx_base._ns_uri); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -103986,7 +97647,6 @@ static PyObject *__pyx_pf_4lxml_5etree_23_ClassNamespaceRegistry_2__repr__(struc __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -104017,11 +97677,9 @@ static int __pyx_pw_4lxml_5etree_27ElementNamespaceClassLookup_1__cinit__(PyObje static int __pyx_pf_4lxml_5etree_27ElementNamespaceClassLookup___cinit__(struct __pyx_obj_4lxml_5etree_ElementNamespaceClassLookup *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[9], 140, 0, __PYX_ERR(9, 140, __pyx_L1_error)); /* "src/lxml/nsclasses.pxi":141 * cdef dict _namespace_registries @@ -104030,8 +97688,7 @@ static int __pyx_pf_4lxml_5etree_27ElementNamespaceClassLookup___cinit__(struct * * def __init__(self, ElementClassLookup fallback=None): */ - __Pyx_TraceLine(141,0,__PYX_ERR(9, 141, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 141, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_namespace_registries); @@ -104055,7 +97712,6 @@ static int __pyx_pf_4lxml_5etree_27ElementNamespaceClassLookup___cinit__(struct __Pyx_AddTraceback("lxml.etree.ElementNamespaceClassLookup.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -104097,7 +97753,7 @@ static int __pyx_pw_4lxml_5etree_27ElementNamespaceClassLookup_3__init__(PyObjec } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(9, 143, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(10, 143, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -104111,13 +97767,13 @@ static int __pyx_pw_4lxml_5etree_27ElementNamespaceClassLookup_3__init__(PyObjec } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(9, 143, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 143, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.ElementNamespaceClassLookup.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fallback), __pyx_ptype_4lxml_5etree_ElementClassLookup, 1, "fallback", 0))) __PYX_ERR(9, 143, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fallback), __pyx_ptype_4lxml_5etree_ElementClassLookup, 1, "fallback", 0))) __PYX_ERR(10, 143, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_27ElementNamespaceClassLookup_2__init__(((struct __pyx_obj_4lxml_5etree_ElementNamespaceClassLookup *)__pyx_v_self), __pyx_v_fallback); /* function exit code */ @@ -104131,7 +97787,6 @@ static int __pyx_pw_4lxml_5etree_27ElementNamespaceClassLookup_3__init__(PyObjec static int __pyx_pf_4lxml_5etree_27ElementNamespaceClassLookup_2__init__(struct __pyx_obj_4lxml_5etree_ElementNamespaceClassLookup *__pyx_v_self, struct LxmlElementClassLookup *__pyx_v_fallback) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -104139,7 +97794,6 @@ static int __pyx_pf_4lxml_5etree_27ElementNamespaceClassLookup_2__init__(struct int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[9], 143, 0, __PYX_ERR(9, 143, __pyx_L1_error)); /* "src/lxml/nsclasses.pxi":144 * @@ -104148,8 +97802,7 @@ static int __pyx_pf_4lxml_5etree_27ElementNamespaceClassLookup_2__init__(struct * self._lookup_function = _find_nselement_class * */ - __Pyx_TraceLine(144,0,__PYX_ERR(9, 144, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree_FallbackElementClassLookup), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 144, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree_FallbackElementClassLookup), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -104166,7 +97819,7 @@ static int __pyx_pf_4lxml_5etree_27ElementNamespaceClassLookup_2__init__(struct #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_fallback)}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 144, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 144, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -104174,13 +97827,13 @@ static int __pyx_pf_4lxml_5etree_27ElementNamespaceClassLookup_2__init__(struct #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_fallback)}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 144, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 144, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 144, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 144, __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; @@ -104191,7 +97844,7 @@ static int __pyx_pf_4lxml_5etree_27ElementNamespaceClassLookup_2__init__(struct __Pyx_INCREF(((PyObject *)__pyx_v_fallback)); __Pyx_GIVEREF(((PyObject *)__pyx_v_fallback)); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, ((PyObject *)__pyx_v_fallback)); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 144, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -104205,7 +97858,6 @@ static int __pyx_pf_4lxml_5etree_27ElementNamespaceClassLookup_2__init__(struct * * def get_namespace(self, ns_uri): */ - __Pyx_TraceLine(145,0,__PYX_ERR(9, 145, __pyx_L1_error)) __pyx_v_self->__pyx_base.__pyx_base._lookup_function = __pyx_f_4lxml_5etree__find_nselement_class; /* "src/lxml/nsclasses.pxi":143 @@ -104227,7 +97879,6 @@ static int __pyx_pf_4lxml_5etree_27ElementNamespaceClassLookup_2__init__(struct __Pyx_AddTraceback("lxml.etree.ElementNamespaceClassLookup.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -104259,7 +97910,6 @@ static PyObject *__pyx_pf_4lxml_5etree_27ElementNamespaceClassLookup_4get_namesp PyObject *__pyx_v_ns_utf = NULL; struct __pyx_obj_4lxml_5etree__ClassNamespaceRegistry *__pyx_v_registry = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -104270,9 +97920,7 @@ static PyObject *__pyx_pf_4lxml_5etree_27ElementNamespaceClassLookup_4get_namesp PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__219) __Pyx_RefNannySetupContext("get_namespace", 0); - __Pyx_TraceCall("get_namespace", __pyx_f[9], 147, 0, __PYX_ERR(9, 147, __pyx_L1_error)); /* "src/lxml/nsclasses.pxi":154 * @@ -104281,8 +97929,7 @@ static PyObject *__pyx_pf_4lxml_5etree_27ElementNamespaceClassLookup_4get_namesp * ns_utf = _utf8(ns_uri) * else: */ - __Pyx_TraceLine(154,0,__PYX_ERR(9, 154, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ns_uri); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(9, 154, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ns_uri); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(10, 154, __pyx_L1_error) if (__pyx_t_1) { /* "src/lxml/nsclasses.pxi":155 @@ -104292,8 +97939,7 @@ static PyObject *__pyx_pf_4lxml_5etree_27ElementNamespaceClassLookup_4get_namesp * else: * ns_utf = None */ - __Pyx_TraceLine(155,0,__PYX_ERR(9, 155, __pyx_L1_error)) - __pyx_t_2 = __pyx_f_4lxml_5etree__utf8(__pyx_v_ns_uri); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 155, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__utf8(__pyx_v_ns_uri); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_ns_utf = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; @@ -104315,7 +97961,6 @@ static PyObject *__pyx_pf_4lxml_5etree_27ElementNamespaceClassLookup_4get_namesp * try: * return self._namespace_registries[ns_utf] */ - __Pyx_TraceLine(157,0,__PYX_ERR(9, 157, __pyx_L1_error)) /*else*/ { __Pyx_INCREF(Py_None); __pyx_v_ns_utf = ((PyObject*)Py_None); @@ -104329,7 +97974,6 @@ static PyObject *__pyx_pf_4lxml_5etree_27ElementNamespaceClassLookup_4get_namesp * return self._namespace_registries[ns_utf] * except KeyError: */ - __Pyx_TraceLine(158,0,__PYX_ERR(9, 158, __pyx_L4_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -104346,13 +97990,12 @@ static PyObject *__pyx_pf_4lxml_5etree_27ElementNamespaceClassLookup_4get_namesp * except KeyError: * registry = self._namespace_registries[ns_utf] = \ */ - __Pyx_TraceLine(159,0,__PYX_ERR(9, 159, __pyx_L4_error)) __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->_namespace_registries == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(9, 159, __pyx_L4_error) + __PYX_ERR(10, 159, __pyx_L4_error) } - __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->_namespace_registries, __pyx_v_ns_utf); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 159, __pyx_L4_error) + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->_namespace_registries, __pyx_v_ns_utf); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 159, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -104376,11 +98019,10 @@ static PyObject *__pyx_pf_4lxml_5etree_27ElementNamespaceClassLookup_4get_namesp * registry = self._namespace_registries[ns_utf] = \ * _ClassNamespaceRegistry(ns_uri) */ - __Pyx_TraceLine(160,0,__PYX_ERR(9, 160, __pyx_L6_except_error)) __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_6) { __Pyx_AddTraceback("lxml.etree.ElementNamespaceClassLookup.get_namespace", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(9, 160, __pyx_L6_except_error) + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(10, 160, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); @@ -104392,8 +98034,7 @@ static PyObject *__pyx_pf_4lxml_5etree_27ElementNamespaceClassLookup_4get_namesp * return registry * */ - __Pyx_TraceLine(162,0,__PYX_ERR(9, 162, __pyx_L6_except_error)) - __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree__ClassNamespaceRegistry), __pyx_v_ns_uri); if (unlikely(!__pyx_t_9)) __PYX_ERR(9, 162, __pyx_L6_except_error) + __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree__ClassNamespaceRegistry), __pyx_v_ns_uri); if (unlikely(!__pyx_t_9)) __PYX_ERR(10, 162, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_9); __pyx_v_registry = ((struct __pyx_obj_4lxml_5etree__ClassNamespaceRegistry *)__pyx_t_9); @@ -104405,12 +98046,11 @@ static PyObject *__pyx_pf_4lxml_5etree_27ElementNamespaceClassLookup_4get_namesp * _ClassNamespaceRegistry(ns_uri) * return registry */ - __Pyx_TraceLine(161,0,__PYX_ERR(9, 161, __pyx_L6_except_error)) if (unlikely(__pyx_v_self->_namespace_registries == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(9, 161, __pyx_L6_except_error) + __PYX_ERR(10, 161, __pyx_L6_except_error) } - if (unlikely(PyDict_SetItem(__pyx_v_self->_namespace_registries, __pyx_v_ns_utf, __pyx_t_9) < 0)) __PYX_ERR(9, 161, __pyx_L6_except_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->_namespace_registries, __pyx_v_ns_utf, __pyx_t_9) < 0)) __PYX_ERR(10, 161, __pyx_L6_except_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "src/lxml/nsclasses.pxi":163 @@ -104420,7 +98060,6 @@ static PyObject *__pyx_pf_4lxml_5etree_27ElementNamespaceClassLookup_4get_namesp * * cdef object _find_nselement_class(state, _Document doc, xmlNode* c_node): */ - __Pyx_TraceLine(163,0,__PYX_ERR(9, 163, __pyx_L6_except_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_registry)); __pyx_r = ((PyObject *)__pyx_v_registry); @@ -104478,7 +98117,6 @@ static PyObject *__pyx_pf_4lxml_5etree_27ElementNamespaceClassLookup_4get_namesp __Pyx_XDECREF(__pyx_v_ns_utf); __Pyx_XDECREF((PyObject *)__pyx_v_registry); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -104498,14 +98136,12 @@ static PyObject *__pyx_f_4lxml_5etree__find_nselement_class(PyObject *__pyx_v_st const xmlChar *__pyx_v_c_namespace_utf; PyObject *__pyx_v_classes = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_find_nselement_class", 0); - __Pyx_TraceCall("_find_nselement_class", __pyx_f[9], 165, 0, __PYX_ERR(9, 165, __pyx_L1_error)); /* "src/lxml/nsclasses.pxi":169 * cdef ElementNamespaceClassLookup lookup @@ -104514,7 +98150,6 @@ static PyObject *__pyx_f_4lxml_5etree__find_nselement_class(PyObject *__pyx_v_st * return _lookupDefaultElementClass(None, doc, c_node) * */ - __Pyx_TraceLine(169,0,__PYX_ERR(9, 169, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_state == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -104526,9 +98161,8 @@ static PyObject *__pyx_f_4lxml_5etree__find_nselement_class(PyObject *__pyx_v_st * * lookup = state */ - __Pyx_TraceLine(170,0,__PYX_ERR(9, 170, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_4lxml_5etree__lookupDefaultElementClass(Py_None, __pyx_v_doc, __pyx_v_c_node); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 170, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__lookupDefaultElementClass(Py_None, __pyx_v_doc, __pyx_v_c_node); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -104550,7 +98184,6 @@ static PyObject *__pyx_f_4lxml_5etree__find_nselement_class(PyObject *__pyx_v_st * if c_node.type != tree.XML_ELEMENT_NODE: * return _callLookupFallback(lookup, doc, c_node) */ - __Pyx_TraceLine(172,0,__PYX_ERR(9, 172, __pyx_L1_error)) __pyx_t_3 = __pyx_v_state; __Pyx_INCREF(__pyx_t_3); __pyx_v_lookup = ((struct __pyx_obj_4lxml_5etree_ElementNamespaceClassLookup *)__pyx_t_3); @@ -104563,7 +98196,6 @@ static PyObject *__pyx_f_4lxml_5etree__find_nselement_class(PyObject *__pyx_v_st * return _callLookupFallback(lookup, doc, c_node) * */ - __Pyx_TraceLine(173,0,__PYX_ERR(9, 173, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node->type != XML_ELEMENT_NODE) != 0); if (__pyx_t_2) { @@ -104574,9 +98206,8 @@ static PyObject *__pyx_f_4lxml_5etree__find_nselement_class(PyObject *__pyx_v_st * * c_namespace_utf = _getNs(c_node) */ - __Pyx_TraceLine(174,0,__PYX_ERR(9, 174, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_4lxml_5etree__callLookupFallback(((struct LxmlFallbackElementClassLookup *)__pyx_v_lookup), __pyx_v_doc, __pyx_v_c_node); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 174, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__callLookupFallback(((struct LxmlFallbackElementClassLookup *)__pyx_v_lookup), __pyx_v_doc, __pyx_v_c_node); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -104598,7 +98229,6 @@ static PyObject *__pyx_f_4lxml_5etree__find_nselement_class(PyObject *__pyx_v_st * if c_namespace_utf is not NULL: * dict_result = python.PyDict_GetItem( */ - __Pyx_TraceLine(176,0,__PYX_ERR(9, 176, __pyx_L1_error)) __pyx_v_c_namespace_utf = _getNs(__pyx_v_c_node); /* "src/lxml/nsclasses.pxi":177 @@ -104608,7 +98238,6 @@ static PyObject *__pyx_f_4lxml_5etree__find_nselement_class(PyObject *__pyx_v_st * dict_result = python.PyDict_GetItem( * lookup._namespace_registries, c_namespace_utf) */ - __Pyx_TraceLine(177,0,__PYX_ERR(9, 177, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_namespace_utf != NULL) != 0); if (__pyx_t_2) { @@ -104619,10 +98248,9 @@ static PyObject *__pyx_f_4lxml_5etree__find_nselement_class(PyObject *__pyx_v_st * else: * dict_result = python.PyDict_GetItem( */ - __Pyx_TraceLine(179,0,__PYX_ERR(9, 179, __pyx_L1_error)) __pyx_t_3 = __pyx_v_lookup->_namespace_registries; __Pyx_INCREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyBytes_FromCString(((unsigned char *)__pyx_v_c_namespace_utf)); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 179, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBytes_FromCString(((unsigned char *)__pyx_v_c_namespace_utf)); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "src/lxml/nsclasses.pxi":178 @@ -104632,7 +98260,6 @@ static PyObject *__pyx_f_4lxml_5etree__find_nselement_class(PyObject *__pyx_v_st * lookup._namespace_registries, c_namespace_utf) * else: */ - __Pyx_TraceLine(178,0,__PYX_ERR(9, 178, __pyx_L1_error)) __pyx_v_dict_result = PyDict_GetItem(__pyx_t_3, __pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -104654,7 +98281,6 @@ static PyObject *__pyx_f_4lxml_5etree__find_nselement_class(PyObject *__pyx_v_st * lookup._namespace_registries, None) * if dict_result is not NULL: */ - __Pyx_TraceLine(181,0,__PYX_ERR(9, 181, __pyx_L1_error)) /*else*/ { /* "src/lxml/nsclasses.pxi":182 @@ -104664,7 +98290,6 @@ static PyObject *__pyx_f_4lxml_5etree__find_nselement_class(PyObject *__pyx_v_st * if dict_result is not NULL: * registry = <_NamespaceRegistry>dict_result */ - __Pyx_TraceLine(182,0,__PYX_ERR(9, 182, __pyx_L1_error)) __pyx_t_4 = __pyx_v_lookup->_namespace_registries; __Pyx_INCREF(__pyx_t_4); @@ -104675,7 +98300,6 @@ static PyObject *__pyx_f_4lxml_5etree__find_nselement_class(PyObject *__pyx_v_st * lookup._namespace_registries, None) * if dict_result is not NULL: */ - __Pyx_TraceLine(181,0,__PYX_ERR(9, 181, __pyx_L1_error)) __pyx_v_dict_result = PyDict_GetItem(__pyx_t_4, Py_None); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -104688,7 +98312,6 @@ static PyObject *__pyx_f_4lxml_5etree__find_nselement_class(PyObject *__pyx_v_st * registry = <_NamespaceRegistry>dict_result * classes = registry._entries */ - __Pyx_TraceLine(183,0,__PYX_ERR(9, 183, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_dict_result != NULL) != 0); if (__pyx_t_2) { @@ -104699,7 +98322,6 @@ static PyObject *__pyx_f_4lxml_5etree__find_nselement_class(PyObject *__pyx_v_st * classes = registry._entries * */ - __Pyx_TraceLine(184,0,__PYX_ERR(9, 184, __pyx_L1_error)) __pyx_t_4 = ((PyObject *)__pyx_v_dict_result); __Pyx_INCREF(__pyx_t_4); __pyx_v_registry = ((struct __pyx_obj_4lxml_5etree__NamespaceRegistry *)__pyx_t_4); @@ -104712,7 +98334,6 @@ static PyObject *__pyx_f_4lxml_5etree__find_nselement_class(PyObject *__pyx_v_st * * if c_node.name is not NULL: */ - __Pyx_TraceLine(185,0,__PYX_ERR(9, 185, __pyx_L1_error)) __pyx_t_4 = __pyx_v_registry->_entries; __Pyx_INCREF(__pyx_t_4); __pyx_v_classes = ((PyObject*)__pyx_t_4); @@ -104725,7 +98346,6 @@ static PyObject *__pyx_f_4lxml_5etree__find_nselement_class(PyObject *__pyx_v_st * dict_result = python.PyDict_GetItem( * classes, c_node.name) */ - __Pyx_TraceLine(187,0,__PYX_ERR(9, 187, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node->name != NULL) != 0); if (__pyx_t_2) { @@ -104736,8 +98356,7 @@ static PyObject *__pyx_f_4lxml_5etree__find_nselement_class(PyObject *__pyx_v_st * else: * dict_result = NULL */ - __Pyx_TraceLine(189,0,__PYX_ERR(9, 189, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyBytes_FromCString(((unsigned char *)__pyx_v_c_node->name)); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 189, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBytes_FromCString(((unsigned char *)__pyx_v_c_node->name)); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "src/lxml/nsclasses.pxi":188 @@ -104747,7 +98366,6 @@ static PyObject *__pyx_f_4lxml_5etree__find_nselement_class(PyObject *__pyx_v_st * classes, c_node.name) * else: */ - __Pyx_TraceLine(188,0,__PYX_ERR(9, 188, __pyx_L1_error)) __pyx_v_dict_result = PyDict_GetItem(__pyx_v_classes, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -104768,7 +98386,6 @@ static PyObject *__pyx_f_4lxml_5etree__find_nselement_class(PyObject *__pyx_v_st * * if dict_result is NULL: */ - __Pyx_TraceLine(191,0,__PYX_ERR(9, 191, __pyx_L1_error)) /*else*/ { __pyx_v_dict_result = NULL; } @@ -104781,7 +98398,6 @@ static PyObject *__pyx_f_4lxml_5etree__find_nselement_class(PyObject *__pyx_v_st * dict_result = python.PyDict_GetItem(classes, None) * */ - __Pyx_TraceLine(193,0,__PYX_ERR(9, 193, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_dict_result == NULL) != 0); if (__pyx_t_2) { @@ -104792,7 +98408,6 @@ static PyObject *__pyx_f_4lxml_5etree__find_nselement_class(PyObject *__pyx_v_st * * if dict_result is not NULL: */ - __Pyx_TraceLine(194,0,__PYX_ERR(9, 194, __pyx_L1_error)) __pyx_v_dict_result = PyDict_GetItem(__pyx_v_classes, Py_None); /* "src/lxml/nsclasses.pxi":193 @@ -104811,7 +98426,6 @@ static PyObject *__pyx_f_4lxml_5etree__find_nselement_class(PyObject *__pyx_v_st * return dict_result * return _callLookupFallback(lookup, doc, c_node) */ - __Pyx_TraceLine(196,0,__PYX_ERR(9, 196, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_dict_result != NULL) != 0); if (__pyx_t_2) { @@ -104822,7 +98436,6 @@ static PyObject *__pyx_f_4lxml_5etree__find_nselement_class(PyObject *__pyx_v_st * return _callLookupFallback(lookup, doc, c_node) * */ - __Pyx_TraceLine(197,0,__PYX_ERR(9, 197, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_dict_result)); __pyx_r = ((PyObject *)__pyx_v_dict_result); @@ -104853,9 +98466,8 @@ static PyObject *__pyx_f_4lxml_5etree__find_nselement_class(PyObject *__pyx_v_st * * */ - __Pyx_TraceLine(198,0,__PYX_ERR(9, 198, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_4lxml_5etree__callLookupFallback(((struct LxmlFallbackElementClassLookup *)__pyx_v_lookup), __pyx_v_doc, __pyx_v_c_node); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 198, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__callLookupFallback(((struct LxmlFallbackElementClassLookup *)__pyx_v_lookup), __pyx_v_doc, __pyx_v_c_node); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; @@ -104880,7 +98492,6 @@ static PyObject *__pyx_f_4lxml_5etree__find_nselement_class(PyObject *__pyx_v_st __Pyx_XDECREF((PyObject *)__pyx_v_registry); __Pyx_XDECREF(__pyx_v_classes); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -104912,7 +98523,6 @@ static PyObject *__pyx_pf_4lxml_5etree_42FunctionNamespace(CYTHON_UNUSED PyObjec PyObject *__pyx_v_ns_utf = NULL; struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry *__pyx_v_registry = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -104923,9 +98533,7 @@ static PyObject *__pyx_pf_4lxml_5etree_42FunctionNamespace(CYTHON_UNUSED PyObjec int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__220) __Pyx_RefNannySetupContext("FunctionNamespace", 0); - __Pyx_TraceCall("FunctionNamespace", __pyx_f[9], 207, 0, __PYX_ERR(9, 207, __pyx_L1_error)); /* "src/lxml/nsclasses.pxi":228 * ... return x + 3 @@ -104934,10 +98542,9 @@ static PyObject *__pyx_pf_4lxml_5etree_42FunctionNamespace(CYTHON_UNUSED PyObjec * try: * return __FUNCTION_NAMESPACE_REGISTRIES[ns_utf] */ - __Pyx_TraceLine(228,0,__PYX_ERR(9, 228, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ns_uri); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(9, 228, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ns_uri); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(10, 228, __pyx_L1_error) if (__pyx_t_2) { - __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_ns_uri); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 228, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_ns_uri); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; @@ -104955,7 +98562,6 @@ static PyObject *__pyx_pf_4lxml_5etree_42FunctionNamespace(CYTHON_UNUSED PyObjec * return __FUNCTION_NAMESPACE_REGISTRIES[ns_utf] * except KeyError: */ - __Pyx_TraceLine(229,0,__PYX_ERR(9, 229, __pyx_L3_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -104972,13 +98578,12 @@ static PyObject *__pyx_pf_4lxml_5etree_42FunctionNamespace(CYTHON_UNUSED PyObjec * except KeyError: * registry = __FUNCTION_NAMESPACE_REGISTRIES[ns_utf] = \ */ - __Pyx_TraceLine(230,0,__PYX_ERR(9, 230, __pyx_L3_error)) __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_4lxml_5etree___FUNCTION_NAMESPACE_REGISTRIES == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(9, 230, __pyx_L3_error) + __PYX_ERR(10, 230, __pyx_L3_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_4lxml_5etree___FUNCTION_NAMESPACE_REGISTRIES, __pyx_v_ns_utf); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 230, __pyx_L3_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_4lxml_5etree___FUNCTION_NAMESPACE_REGISTRIES, __pyx_v_ns_utf); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 230, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -105003,11 +98608,10 @@ static PyObject *__pyx_pf_4lxml_5etree_42FunctionNamespace(CYTHON_UNUSED PyObjec * registry = __FUNCTION_NAMESPACE_REGISTRIES[ns_utf] = \ * _XPathFunctionNamespaceRegistry(ns_uri) */ - __Pyx_TraceLine(231,0,__PYX_ERR(9, 231, __pyx_L5_except_error)) __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_7) { __Pyx_AddTraceback("lxml.etree.FunctionNamespace", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_8) < 0) __PYX_ERR(9, 231, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_8) < 0) __PYX_ERR(10, 231, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_8); @@ -105019,8 +98623,7 @@ static PyObject *__pyx_pf_4lxml_5etree_42FunctionNamespace(CYTHON_UNUSED PyObjec * return registry * */ - __Pyx_TraceLine(233,0,__PYX_ERR(9, 233, __pyx_L5_except_error)) - __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree__XPathFunctionNamespaceRegistry), __pyx_v_ns_uri); if (unlikely(!__pyx_t_9)) __PYX_ERR(9, 233, __pyx_L5_except_error) + __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree__XPathFunctionNamespaceRegistry), __pyx_v_ns_uri); if (unlikely(!__pyx_t_9)) __PYX_ERR(10, 233, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_9); __pyx_v_registry = ((struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry *)__pyx_t_9); @@ -105032,12 +98635,11 @@ static PyObject *__pyx_pf_4lxml_5etree_42FunctionNamespace(CYTHON_UNUSED PyObjec * _XPathFunctionNamespaceRegistry(ns_uri) * return registry */ - __Pyx_TraceLine(232,0,__PYX_ERR(9, 232, __pyx_L5_except_error)) if (unlikely(__pyx_v_4lxml_5etree___FUNCTION_NAMESPACE_REGISTRIES == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(9, 232, __pyx_L5_except_error) + __PYX_ERR(10, 232, __pyx_L5_except_error) } - if (unlikely(PyDict_SetItem(__pyx_v_4lxml_5etree___FUNCTION_NAMESPACE_REGISTRIES, __pyx_v_ns_utf, __pyx_t_9) < 0)) __PYX_ERR(9, 232, __pyx_L5_except_error) + if (unlikely(PyDict_SetItem(__pyx_v_4lxml_5etree___FUNCTION_NAMESPACE_REGISTRIES, __pyx_v_ns_utf, __pyx_t_9) < 0)) __PYX_ERR(10, 232, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "src/lxml/nsclasses.pxi":234 @@ -105047,7 +98649,6 @@ static PyObject *__pyx_pf_4lxml_5etree_42FunctionNamespace(CYTHON_UNUSED PyObjec * * @cython.internal */ - __Pyx_TraceLine(234,0,__PYX_ERR(9, 234, __pyx_L5_except_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_registry)); __pyx_r = ((PyObject *)__pyx_v_registry); @@ -105105,7 +98706,6 @@ static PyObject *__pyx_pf_4lxml_5etree_42FunctionNamespace(CYTHON_UNUSED PyObjec __Pyx_XDECREF(__pyx_v_ns_utf); __Pyx_XDECREF((PyObject *)__pyx_v_registry); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -105133,13 +98733,11 @@ static int __pyx_pw_4lxml_5etree_26_FunctionNamespaceRegistry_1__setitem__(PyObj static int __pyx_pf_4lxml_5etree_26_FunctionNamespaceRegistry___setitem__(struct __pyx_obj_4lxml_5etree__FunctionNamespaceRegistry *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_item) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__setitem__", 0); - __Pyx_TraceCall("__setitem__", __pyx_f[9], 238, 0, __PYX_ERR(9, 238, __pyx_L1_error)); /* "src/lxml/nsclasses.pxi":239 * cdef class _FunctionNamespaceRegistry(_NamespaceRegistry): @@ -105148,8 +98746,7 @@ static int __pyx_pf_4lxml_5etree_26_FunctionNamespaceRegistry___setitem__(struct * raise NamespaceRegistryError, \ * u"Registered functions must be callable." */ - __Pyx_TraceLine(239,0,__PYX_ERR(9, 239, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyCallable_Check(__pyx_v_item); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(9, 239, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCallable_Check(__pyx_v_item); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(10, 239, __pyx_L1_error) __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (unlikely(__pyx_t_2)) { @@ -105160,9 +98757,8 @@ static int __pyx_pf_4lxml_5etree_26_FunctionNamespaceRegistry___setitem__(struct * u"Registered functions must be callable." * if not name: */ - __Pyx_TraceLine(240,0,__PYX_ERR(9, 240, __pyx_L1_error)) __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_NamespaceRegistryError), __pyx_kp_u_Registered_functions_must_be_cal, 0, 0); - __PYX_ERR(9, 240, __pyx_L1_error) + __PYX_ERR(10, 240, __pyx_L1_error) /* "src/lxml/nsclasses.pxi":239 * cdef class _FunctionNamespaceRegistry(_NamespaceRegistry): @@ -105180,8 +98776,7 @@ static int __pyx_pf_4lxml_5etree_26_FunctionNamespaceRegistry___setitem__(struct * raise ValueError, \ * u"extensions must have non empty names" */ - __Pyx_TraceLine(242,0,__PYX_ERR(9, 242, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_name); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(9, 242, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_name); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(10, 242, __pyx_L1_error) __pyx_t_1 = ((!__pyx_t_2) != 0); if (unlikely(__pyx_t_1)) { @@ -105192,9 +98787,8 @@ static int __pyx_pf_4lxml_5etree_26_FunctionNamespaceRegistry___setitem__(struct * u"extensions must have non empty names" * self._entries[_utf8(name)] = item */ - __Pyx_TraceLine(243,0,__PYX_ERR(9, 243, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_extensions_must_have_non_empty_n, 0, 0); - __PYX_ERR(9, 243, __pyx_L1_error) + __PYX_ERR(10, 243, __pyx_L1_error) /* "src/lxml/nsclasses.pxi":242 * raise NamespaceRegistryError, \ @@ -105212,14 +98806,13 @@ static int __pyx_pf_4lxml_5etree_26_FunctionNamespaceRegistry___setitem__(struct * * def __repr__(self): */ - __Pyx_TraceLine(245,0,__PYX_ERR(9, 245, __pyx_L1_error)) if (unlikely(__pyx_v_self->__pyx_base._entries == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(9, 245, __pyx_L1_error) + __PYX_ERR(10, 245, __pyx_L1_error) } - __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 245, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (unlikely(PyDict_SetItem(__pyx_v_self->__pyx_base._entries, __pyx_t_3, __pyx_v_item) < 0)) __PYX_ERR(9, 245, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->__pyx_base._entries, __pyx_t_3, __pyx_v_item) < 0)) __PYX_ERR(10, 245, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/lxml/nsclasses.pxi":238 @@ -105238,7 +98831,6 @@ static int __pyx_pf_4lxml_5etree_26_FunctionNamespaceRegistry___setitem__(struct __Pyx_AddTraceback("lxml.etree._FunctionNamespaceRegistry.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -105266,11 +98858,9 @@ static PyObject *__pyx_pw_4lxml_5etree_26_FunctionNamespaceRegistry_3__repr__(Py static PyObject *__pyx_pf_4lxml_5etree_26_FunctionNamespaceRegistry_2__repr__(struct __pyx_obj_4lxml_5etree__FunctionNamespaceRegistry *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[9], 247, 0, __PYX_ERR(9, 247, __pyx_L1_error)); /* "src/lxml/nsclasses.pxi":248 * @@ -105279,9 +98869,8 @@ static PyObject *__pyx_pf_4lxml_5etree_26_FunctionNamespaceRegistry_2__repr__(st * * @cython.final */ - __Pyx_TraceLine(248,0,__PYX_ERR(9, 248, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_FunctionNamespace_r, __pyx_v_self->__pyx_base._ns_uri); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 248, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_FunctionNamespace_r, __pyx_v_self->__pyx_base._ns_uri); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -105302,7 +98891,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_FunctionNamespaceRegistry_2__repr__(st __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -105330,10 +98918,8 @@ static int __pyx_pw_4lxml_5etree_31_XPathFunctionNamespaceRegistry_6prefix_1__de static int __pyx_pf_4lxml_5etree_31_XPathFunctionNamespaceRegistry_6prefix___del__(struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); - __Pyx_TraceCall("__del__", __pyx_f[9], 258, 0, __PYX_ERR(9, 258, __pyx_L1_error)); /* "src/lxml/nsclasses.pxi":259 * u"Namespace prefix for extension functions." @@ -105342,7 +98928,6 @@ static int __pyx_pf_4lxml_5etree_31_XPathFunctionNamespaceRegistry_6prefix___del * self._prefix_utf = None * def __get__(self): */ - __Pyx_TraceLine(259,0,__PYX_ERR(9, 259, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_prefix); @@ -105356,7 +98941,6 @@ static int __pyx_pf_4lxml_5etree_31_XPathFunctionNamespaceRegistry_6prefix___del * def __get__(self): * if self._prefix is None: */ - __Pyx_TraceLine(260,0,__PYX_ERR(9, 260, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_prefix_utf); @@ -105373,12 +98957,6 @@ static int __pyx_pf_4lxml_5etree_31_XPathFunctionNamespaceRegistry_6prefix___del /* function exit code */ __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._XPathFunctionNamespaceRegistry.prefix.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -105406,12 +98984,10 @@ static PyObject *__pyx_pw_4lxml_5etree_31_XPathFunctionNamespaceRegistry_6prefix static PyObject *__pyx_pf_4lxml_5etree_31_XPathFunctionNamespaceRegistry_6prefix_2__get__(struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[9], 261, 0, __PYX_ERR(9, 261, __pyx_L1_error)); /* "src/lxml/nsclasses.pxi":262 * self._prefix_utf = None @@ -105420,7 +98996,6 @@ static PyObject *__pyx_pf_4lxml_5etree_31_XPathFunctionNamespaceRegistry_6prefix * return '' * else: */ - __Pyx_TraceLine(262,0,__PYX_ERR(9, 262, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_prefix == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -105432,10 +99007,9 @@ static PyObject *__pyx_pf_4lxml_5etree_31_XPathFunctionNamespaceRegistry_6prefix * else: * return self._prefix */ - __Pyx_TraceLine(263,0,__PYX_ERR(9, 263, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_kp_s__23); - __pyx_r = __pyx_kp_s__23; + __Pyx_INCREF(__pyx_kp_s__11); + __pyx_r = __pyx_kp_s__11; goto __pyx_L0; /* "src/lxml/nsclasses.pxi":262 @@ -105454,7 +99028,6 @@ static PyObject *__pyx_pf_4lxml_5etree_31_XPathFunctionNamespaceRegistry_6prefix * def __set__(self, prefix): * if prefix == '': */ - __Pyx_TraceLine(265,0,__PYX_ERR(9, 265, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_prefix); @@ -105471,12 +99044,8 @@ static PyObject *__pyx_pf_4lxml_5etree_31_XPathFunctionNamespaceRegistry_6prefix */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._XPathFunctionNamespaceRegistry.prefix.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -105504,13 +99073,11 @@ static int __pyx_pw_4lxml_5etree_31_XPathFunctionNamespaceRegistry_6prefix_5__se static int __pyx_pf_4lxml_5etree_31_XPathFunctionNamespaceRegistry_6prefix_4__set__(struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry *__pyx_v_self, PyObject *__pyx_v_prefix) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[9], 266, 0, __PYX_ERR(9, 266, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_prefix); /* "src/lxml/nsclasses.pxi":267 @@ -105520,8 +99087,7 @@ static int __pyx_pf_4lxml_5etree_31_XPathFunctionNamespaceRegistry_6prefix_4__se * prefix = None # empty prefix * self._prefix_utf = _utf8(prefix) if prefix is not None else None */ - __Pyx_TraceLine(267,0,__PYX_ERR(9, 267, __pyx_L1_error)) - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_prefix, __pyx_kp_s__23, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(9, 267, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_prefix, __pyx_kp_s__11, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(10, 267, __pyx_L1_error) if (__pyx_t_1) { /* "src/lxml/nsclasses.pxi":268 @@ -105531,7 +99097,6 @@ static int __pyx_pf_4lxml_5etree_31_XPathFunctionNamespaceRegistry_6prefix_4__se * self._prefix_utf = _utf8(prefix) if prefix is not None else None * self._prefix = prefix */ - __Pyx_TraceLine(268,0,__PYX_ERR(9, 268, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_prefix, Py_None); @@ -105551,10 +99116,9 @@ static int __pyx_pf_4lxml_5etree_31_XPathFunctionNamespaceRegistry_6prefix_4__se * self._prefix = prefix * */ - __Pyx_TraceLine(269,0,__PYX_ERR(9, 269, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_prefix != Py_None); if ((__pyx_t_1 != 0)) { - __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_prefix); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 269, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_prefix); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; @@ -105575,7 +99139,6 @@ static int __pyx_pf_4lxml_5etree_31_XPathFunctionNamespaceRegistry_6prefix_4__se * * cdef list _find_all_extension_prefixes(): */ - __Pyx_TraceLine(270,0,__PYX_ERR(9, 270, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_prefix); __Pyx_GIVEREF(__pyx_v_prefix); __Pyx_GOTREF(__pyx_v_self->_prefix); @@ -105600,7 +99163,6 @@ static int __pyx_pf_4lxml_5etree_31_XPathFunctionNamespaceRegistry_6prefix_4__se __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_prefix); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -105617,7 +99179,6 @@ static PyObject *__pyx_f_4lxml_5etree__find_all_extension_prefixes(void) { struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry *__pyx_v_registry = 0; PyObject *__pyx_v_ns_prefixes = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; @@ -105629,7 +99190,6 @@ static PyObject *__pyx_f_4lxml_5etree__find_all_extension_prefixes(void) { int __pyx_t_8; int __pyx_t_9; __Pyx_RefNannySetupContext("_find_all_extension_prefixes", 0); - __Pyx_TraceCall("_find_all_extension_prefixes", __pyx_f[9], 272, 0, __PYX_ERR(9, 272, __pyx_L1_error)); /* "src/lxml/nsclasses.pxi":275 * u"Internal lookup function to find all function prefixes for XSLT/XPath." @@ -105638,8 +99198,7 @@ static PyObject *__pyx_f_4lxml_5etree__find_all_extension_prefixes(void) { * for registry in __FUNCTION_NAMESPACE_REGISTRIES.itervalues(): * if registry._prefix_utf is not None: */ - __Pyx_TraceLine(275,0,__PYX_ERR(9, 275, __pyx_L1_error)) - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 275, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ns_prefixes = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; @@ -105651,13 +99210,12 @@ static PyObject *__pyx_f_4lxml_5etree__find_all_extension_prefixes(void) { * if registry._prefix_utf is not None: * if registry._ns_uri_utf is not None: */ - __Pyx_TraceLine(276,0,__PYX_ERR(9, 276, __pyx_L1_error)) __pyx_t_2 = 0; if (unlikely(__pyx_v_4lxml_5etree___FUNCTION_NAMESPACE_REGISTRIES == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "itervalues"); - __PYX_ERR(9, 276, __pyx_L1_error) + __PYX_ERR(10, 276, __pyx_L1_error) } - __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_4lxml_5etree___FUNCTION_NAMESPACE_REGISTRIES, 1, __pyx_n_s_itervalues, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 276, __pyx_L1_error) + __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_4lxml_5etree___FUNCTION_NAMESPACE_REGISTRIES, 1, __pyx_n_s_itervalues, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_5; @@ -105665,9 +99223,9 @@ static PyObject *__pyx_f_4lxml_5etree__find_all_extension_prefixes(void) { while (1) { __pyx_t_6 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, NULL, &__pyx_t_5, NULL, __pyx_t_4); if (unlikely(__pyx_t_6 == 0)) break; - if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(9, 276, __pyx_L1_error) + if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(10, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_5etree__XPathFunctionNamespaceRegistry))))) __PYX_ERR(9, 276, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_5etree__XPathFunctionNamespaceRegistry))))) __PYX_ERR(10, 276, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_registry, ((struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry *)__pyx_t_5)); __pyx_t_5 = 0; @@ -105678,7 +99236,6 @@ static PyObject *__pyx_f_4lxml_5etree__find_all_extension_prefixes(void) { * if registry._ns_uri_utf is not None: * ns_prefixes.append( */ - __Pyx_TraceLine(277,0,__PYX_ERR(9, 277, __pyx_L1_error)) __pyx_t_7 = (__pyx_v_registry->_prefix_utf != ((PyObject*)Py_None)); __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { @@ -105690,7 +99247,6 @@ static PyObject *__pyx_f_4lxml_5etree__find_all_extension_prefixes(void) { * ns_prefixes.append( * (registry._prefix_utf, registry._ns_uri_utf)) */ - __Pyx_TraceLine(278,0,__PYX_ERR(9, 278, __pyx_L1_error)) __pyx_t_8 = (__pyx_v_registry->__pyx_base.__pyx_base._ns_uri_utf != ((PyObject*)Py_None)); __pyx_t_7 = (__pyx_t_8 != 0); if (__pyx_t_7) { @@ -105701,8 +99257,7 @@ static PyObject *__pyx_f_4lxml_5etree__find_all_extension_prefixes(void) { * (registry._prefix_utf, registry._ns_uri_utf)) # <<<<<<<<<<<<<< * return ns_prefixes */ - __Pyx_TraceLine(280,0,__PYX_ERR(9, 280, __pyx_L1_error)) - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 280, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_registry->_prefix_utf); __Pyx_GIVEREF(__pyx_v_registry->_prefix_utf); @@ -105718,8 +99273,7 @@ static PyObject *__pyx_f_4lxml_5etree__find_all_extension_prefixes(void) { * (registry._prefix_utf, registry._ns_uri_utf)) * return ns_prefixes */ - __Pyx_TraceLine(279,0,__PYX_ERR(9, 279, __pyx_L1_error)) - __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_ns_prefixes, __pyx_t_5); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(9, 279, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_ns_prefixes, __pyx_t_5); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(10, 279, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "src/lxml/nsclasses.pxi":278 @@ -105747,7 +99301,6 @@ static PyObject *__pyx_f_4lxml_5etree__find_all_extension_prefixes(void) { * (registry._prefix_utf, registry._ns_uri_utf)) * return ns_prefixes # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(281,0,__PYX_ERR(9, 281, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_ns_prefixes); __pyx_r = __pyx_v_ns_prefixes; @@ -105771,7 +99324,6 @@ static PyObject *__pyx_f_4lxml_5etree__find_all_extension_prefixes(void) { __Pyx_XDECREF((PyObject *)__pyx_v_registry); __Pyx_XDECREF(__pyx_v_ns_prefixes); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -105802,10 +99354,8 @@ static int __pyx_pw_4lxml_5etree_14_InputDocument_1__cinit__(PyObject *__pyx_v_s static int __pyx_pf_4lxml_5etree_14_InputDocument___cinit__(struct __pyx_obj_4lxml_5etree__InputDocument *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[10], 19, 0, __PYX_ERR(10, 19, __pyx_L1_error)); /* "src/lxml/docloader.pxi":20 * @@ -105814,7 +99364,6 @@ static int __pyx_pf_4lxml_5etree_14_InputDocument___cinit__(struct __pyx_obj_4lx * * */ - __Pyx_TraceLine(20,0,__PYX_ERR(10, 20, __pyx_L1_error)) __pyx_v_self->_type = __pyx_e_4lxml_5etree_PARSER_DATA_INVALID; /* "src/lxml/docloader.pxi":19 @@ -105827,12 +99376,6 @@ static int __pyx_pf_4lxml_5etree_14_InputDocument___cinit__(struct __pyx_obj_4lx /* function exit code */ __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._InputDocument.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -105848,7 +99391,7 @@ static int __pyx_pf_4lxml_5etree_14_InputDocument___cinit__(struct __pyx_obj_4lx /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_8Resolver_1resolve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_8Resolver_resolve[] = "resolve(self, system_url, public_id, context)\n\n Override this method to resolve an external source by\n ``system_url`` and ``public_id``. The third argument is an\n opaque context object.\n\n Return the result of one of the ``resolve_*()`` methods.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_8Resolver_1resolve = {"resolve", (PyCFunction)__pyx_pw_4lxml_5etree_8Resolver_1resolve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8Resolver_resolve}; +static PyMethodDef __pyx_mdef_4lxml_5etree_8Resolver_1resolve = {"resolve", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8Resolver_1resolve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8Resolver_resolve}; static PyObject *__pyx_pw_4lxml_5etree_8Resolver_1resolve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_system_url = 0; CYTHON_UNUSED PyObject *__pyx_v_public_id = 0; @@ -105881,17 +99424,17 @@ static PyObject *__pyx_pw_4lxml_5etree_8Resolver_1resolve(PyObject *__pyx_v_self case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_public_id)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("resolve", 1, 3, 3, 1); __PYX_ERR(10, 25, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("resolve", 1, 3, 3, 1); __PYX_ERR(11, 25, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_context)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("resolve", 1, 3, 3, 2); __PYX_ERR(10, 25, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("resolve", 1, 3, 3, 2); __PYX_ERR(11, 25, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "resolve") < 0)) __PYX_ERR(10, 25, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "resolve") < 0)) __PYX_ERR(11, 25, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -105906,7 +99449,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8Resolver_1resolve(PyObject *__pyx_v_self } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("resolve", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 25, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("resolve", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 25, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.Resolver.resolve", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -105921,11 +99464,8 @@ static PyObject *__pyx_pw_4lxml_5etree_8Resolver_1resolve(PyObject *__pyx_v_self static PyObject *__pyx_pf_4lxml_5etree_8Resolver_resolve(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree_Resolver *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_system_url, CYTHON_UNUSED PyObject *__pyx_v_public_id, CYTHON_UNUSED PyObject *__pyx_v_context) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - __Pyx_TraceFrameInit(__pyx_codeobj__221) __Pyx_RefNannySetupContext("resolve", 0); - __Pyx_TraceCall("resolve", __pyx_f[10], 25, 0, __PYX_ERR(10, 25, __pyx_L1_error)); /* "src/lxml/docloader.pxi":34 * Return the result of one of the ``resolve_*()`` methods. @@ -105934,7 +99474,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_resolve(CYTHON_UNUSED struct __ * * def resolve_empty(self, context): */ - __Pyx_TraceLine(34,0,__PYX_ERR(10, 34, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -105948,12 +99487,8 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_resolve(CYTHON_UNUSED struct __ */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.Resolver.resolve", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -105984,12 +99519,9 @@ static PyObject *__pyx_pw_4lxml_5etree_8Resolver_3resolve_empty(PyObject *__pyx_ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_2resolve_empty(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree_Resolver *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_context) { struct __pyx_obj_4lxml_5etree__InputDocument *__pyx_v_doc_ref = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__222) __Pyx_RefNannySetupContext("resolve_empty", 0); - __Pyx_TraceCall("resolve_empty", __pyx_f[10], 36, 0, __PYX_ERR(10, 36, __pyx_L1_error)); /* "src/lxml/docloader.pxi":44 * """ @@ -105998,8 +99530,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_2resolve_empty(CYTHON_UNUSED st * doc_ref._type = PARSER_DATA_EMPTY * return doc_ref */ - __Pyx_TraceLine(44,0,__PYX_ERR(10, 44, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__InputDocument)); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 44, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__InputDocument)); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_doc_ref = ((struct __pyx_obj_4lxml_5etree__InputDocument *)__pyx_t_1); __pyx_t_1 = 0; @@ -106011,7 +99542,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_2resolve_empty(CYTHON_UNUSED st * return doc_ref * */ - __Pyx_TraceLine(45,0,__PYX_ERR(10, 45, __pyx_L1_error)) __pyx_v_doc_ref->_type = __pyx_e_4lxml_5etree_PARSER_DATA_EMPTY; /* "src/lxml/docloader.pxi":46 @@ -106021,7 +99551,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_2resolve_empty(CYTHON_UNUSED st * * def resolve_string(self, string, context, *, base_url=None): */ - __Pyx_TraceLine(46,0,__PYX_ERR(10, 46, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_doc_ref)); __pyx_r = ((PyObject *)__pyx_v_doc_ref); @@ -106043,7 +99572,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_2resolve_empty(CYTHON_UNUSED st __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_doc_ref); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -106059,7 +99587,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_2resolve_empty(CYTHON_UNUSED st /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_8Resolver_5resolve_string(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_8Resolver_4resolve_string[] = "resolve_string(self, string, context, base_url=None)\n\n Return a parsable string as input document.\n\n Pass data string and context as parameters. You can pass the\n source URL or filename through the ``base_url`` keyword\n argument.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_8Resolver_5resolve_string = {"resolve_string", (PyCFunction)__pyx_pw_4lxml_5etree_8Resolver_5resolve_string, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8Resolver_4resolve_string}; +static PyMethodDef __pyx_mdef_4lxml_5etree_8Resolver_5resolve_string = {"resolve_string", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8Resolver_5resolve_string, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8Resolver_4resolve_string}; static PyObject *__pyx_pw_4lxml_5etree_8Resolver_5resolve_string(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_string = 0; CYTHON_UNUSED PyObject *__pyx_v_context = 0; @@ -106091,7 +99619,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8Resolver_5resolve_string(PyObject *__pyx case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_context)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("resolve_string", 1, 2, 2, 1); __PYX_ERR(10, 48, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("resolve_string", 1, 2, 2, 1); __PYX_ERR(11, 48, __pyx_L3_error) } } if (kw_args == 1) { @@ -106100,7 +99628,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8Resolver_5resolve_string(PyObject *__pyx if (value) { values[index] = value; kw_args--; } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "resolve_string") < 0)) __PYX_ERR(10, 48, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "resolve_string") < 0)) __PYX_ERR(11, 48, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -106114,7 +99642,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8Resolver_5resolve_string(PyObject *__pyx } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("resolve_string", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 48, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("resolve_string", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 48, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.Resolver.resolve_string", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -106130,14 +99658,11 @@ static PyObject *__pyx_pw_4lxml_5etree_8Resolver_5resolve_string(PyObject *__pyx static PyObject *__pyx_pf_4lxml_5etree_8Resolver_4resolve_string(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree_Resolver *__pyx_v_self, PyObject *__pyx_v_string, CYTHON_UNUSED PyObject *__pyx_v_context, PyObject *__pyx_v_base_url) { struct __pyx_obj_4lxml_5etree__InputDocument *__pyx_v_doc_ref = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__223) __Pyx_RefNannySetupContext("resolve_string", 0); - __Pyx_TraceCall("resolve_string", __pyx_f[10], 48, 0, __PYX_ERR(10, 48, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_string); /* "src/lxml/docloader.pxi":58 @@ -106147,7 +99672,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_4resolve_string(CYTHON_UNUSED s * string = (string).encode('utf8') * elif not isinstance(string, bytes): */ - __Pyx_TraceLine(58,0,__PYX_ERR(10, 58, __pyx_L1_error)) __pyx_t_1 = PyUnicode_Check(__pyx_v_string); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -106159,12 +99683,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_4resolve_string(CYTHON_UNUSED s * elif not isinstance(string, bytes): * raise TypeError, "argument must be a byte string or unicode string" */ - __Pyx_TraceLine(59,0,__PYX_ERR(10, 59, __pyx_L1_error)) if (unlikely(__pyx_v_string == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode"); - __PYX_ERR(10, 59, __pyx_L1_error) + __PYX_ERR(11, 59, __pyx_L1_error) } - __pyx_t_3 = PyUnicode_AsUTF8String(((PyObject*)__pyx_v_string)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 59, __pyx_L1_error) + __pyx_t_3 = PyUnicode_AsUTF8String(((PyObject*)__pyx_v_string)); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_string, __pyx_t_3); __pyx_t_3 = 0; @@ -106186,7 +99709,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_4resolve_string(CYTHON_UNUSED s * raise TypeError, "argument must be a byte string or unicode string" * doc_ref = _InputDocument() */ - __Pyx_TraceLine(60,0,__PYX_ERR(10, 60, __pyx_L1_error)) __pyx_t_2 = PyBytes_Check(__pyx_v_string); __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); if (unlikely(__pyx_t_1)) { @@ -106198,9 +99720,8 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_4resolve_string(CYTHON_UNUSED s * doc_ref = _InputDocument() * doc_ref._type = PARSER_DATA_STRING */ - __Pyx_TraceLine(61,0,__PYX_ERR(10, 61, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_argument_must_be_a_byte_string_o, 0, 0); - __PYX_ERR(10, 61, __pyx_L1_error) + __PYX_ERR(11, 61, __pyx_L1_error) /* "src/lxml/docloader.pxi":60 * if isinstance(string, unicode): @@ -106219,8 +99740,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_4resolve_string(CYTHON_UNUSED s * doc_ref._type = PARSER_DATA_STRING * doc_ref._data_bytes = string */ - __Pyx_TraceLine(62,0,__PYX_ERR(10, 62, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__InputDocument)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 62, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__InputDocument)); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_doc_ref = ((struct __pyx_obj_4lxml_5etree__InputDocument *)__pyx_t_3); __pyx_t_3 = 0; @@ -106232,7 +99752,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_4resolve_string(CYTHON_UNUSED s * doc_ref._data_bytes = string * if base_url is not None: */ - __Pyx_TraceLine(63,0,__PYX_ERR(10, 63, __pyx_L1_error)) __pyx_v_doc_ref->_type = __pyx_e_4lxml_5etree_PARSER_DATA_STRING; /* "src/lxml/docloader.pxi":64 @@ -106242,8 +99761,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_4resolve_string(CYTHON_UNUSED s * if base_url is not None: * doc_ref._filename = _encodeFilename(base_url) */ - __Pyx_TraceLine(64,0,__PYX_ERR(10, 64, __pyx_L1_error)) - if (!(likely(PyBytes_CheckExact(__pyx_v_string))||((__pyx_v_string) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_string)->tp_name), 0))) __PYX_ERR(10, 64, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_v_string))||((__pyx_v_string) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_string)->tp_name), 0))) __PYX_ERR(11, 64, __pyx_L1_error) __pyx_t_3 = __pyx_v_string; __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); @@ -106259,7 +99777,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_4resolve_string(CYTHON_UNUSED s * doc_ref._filename = _encodeFilename(base_url) * return doc_ref */ - __Pyx_TraceLine(65,0,__PYX_ERR(10, 65, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_base_url != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -106271,8 +99788,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_4resolve_string(CYTHON_UNUSED s * return doc_ref * */ - __Pyx_TraceLine(66,0,__PYX_ERR(10, 66, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_base_url); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 66, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_base_url); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_doc_ref->_filename); @@ -106296,7 +99812,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_4resolve_string(CYTHON_UNUSED s * * def resolve_filename(self, filename, context): */ - __Pyx_TraceLine(67,0,__PYX_ERR(10, 67, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_doc_ref)); __pyx_r = ((PyObject *)__pyx_v_doc_ref); @@ -106319,7 +99834,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_4resolve_string(CYTHON_UNUSED s __Pyx_XDECREF((PyObject *)__pyx_v_doc_ref); __Pyx_XDECREF(__pyx_v_string); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -106335,7 +99849,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_4resolve_string(CYTHON_UNUSED s /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_8Resolver_7resolve_filename(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_8Resolver_6resolve_filename[] = "resolve_filename(self, filename, context)\n\n Return the name of a parsable file as input document.\n\n Pass filename and context as parameters. You can also pass a\n URL with an HTTP, FTP or file target.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_8Resolver_7resolve_filename = {"resolve_filename", (PyCFunction)__pyx_pw_4lxml_5etree_8Resolver_7resolve_filename, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8Resolver_6resolve_filename}; +static PyMethodDef __pyx_mdef_4lxml_5etree_8Resolver_7resolve_filename = {"resolve_filename", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8Resolver_7resolve_filename, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8Resolver_6resolve_filename}; static PyObject *__pyx_pw_4lxml_5etree_8Resolver_7resolve_filename(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_filename = 0; CYTHON_UNUSED PyObject *__pyx_v_context = 0; @@ -106365,11 +99879,11 @@ static PyObject *__pyx_pw_4lxml_5etree_8Resolver_7resolve_filename(PyObject *__p case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_context)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("resolve_filename", 1, 2, 2, 1); __PYX_ERR(10, 69, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("resolve_filename", 1, 2, 2, 1); __PYX_ERR(11, 69, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "resolve_filename") < 0)) __PYX_ERR(10, 69, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "resolve_filename") < 0)) __PYX_ERR(11, 69, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -106382,7 +99896,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8Resolver_7resolve_filename(PyObject *__p } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("resolve_filename", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 69, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("resolve_filename", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 69, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.Resolver.resolve_filename", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -106398,12 +99912,9 @@ static PyObject *__pyx_pw_4lxml_5etree_8Resolver_7resolve_filename(PyObject *__p static PyObject *__pyx_pf_4lxml_5etree_8Resolver_6resolve_filename(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree_Resolver *__pyx_v_self, PyObject *__pyx_v_filename, CYTHON_UNUSED PyObject *__pyx_v_context) { struct __pyx_obj_4lxml_5etree__InputDocument *__pyx_v_doc_ref = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__224) __Pyx_RefNannySetupContext("resolve_filename", 0); - __Pyx_TraceCall("resolve_filename", __pyx_f[10], 69, 0, __PYX_ERR(10, 69, __pyx_L1_error)); /* "src/lxml/docloader.pxi":78 * """ @@ -106412,8 +99923,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_6resolve_filename(CYTHON_UNUSED * doc_ref._type = PARSER_DATA_FILENAME * doc_ref._filename = _encodeFilename(filename) */ - __Pyx_TraceLine(78,0,__PYX_ERR(10, 78, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__InputDocument)); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 78, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__InputDocument)); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_doc_ref = ((struct __pyx_obj_4lxml_5etree__InputDocument *)__pyx_t_1); __pyx_t_1 = 0; @@ -106425,7 +99935,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_6resolve_filename(CYTHON_UNUSED * doc_ref._filename = _encodeFilename(filename) * return doc_ref */ - __Pyx_TraceLine(79,0,__PYX_ERR(10, 79, __pyx_L1_error)) __pyx_v_doc_ref->_type = __pyx_e_4lxml_5etree_PARSER_DATA_FILENAME; /* "src/lxml/docloader.pxi":80 @@ -106435,8 +99944,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_6resolve_filename(CYTHON_UNUSED * return doc_ref * */ - __Pyx_TraceLine(80,0,__PYX_ERR(10, 80, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 80, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_doc_ref->_filename); @@ -106451,7 +99959,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_6resolve_filename(CYTHON_UNUSED * * def resolve_file(self, f, context, *, base_url=None, bint close=True): */ - __Pyx_TraceLine(81,0,__PYX_ERR(10, 81, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_doc_ref)); __pyx_r = ((PyObject *)__pyx_v_doc_ref); @@ -106473,7 +99980,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_6resolve_filename(CYTHON_UNUSED __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_doc_ref); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -106489,7 +99995,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_6resolve_filename(CYTHON_UNUSED /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_8Resolver_9resolve_file(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_8Resolver_8resolve_file[] = "resolve_file(self, f, context, base_url=None, close=True)\n\n Return an open file-like object as input document.\n\n Pass open file and context as parameters. You can pass the\n base URL or filename of the file through the ``base_url``\n keyword argument. If the ``close`` flag is True (the\n default), the file will be closed after reading.\n\n Note that using ``.resolve_filename()`` is more efficient,\n especially in threaded environments.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_8Resolver_9resolve_file = {"resolve_file", (PyCFunction)__pyx_pw_4lxml_5etree_8Resolver_9resolve_file, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8Resolver_8resolve_file}; +static PyMethodDef __pyx_mdef_4lxml_5etree_8Resolver_9resolve_file = {"resolve_file", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8Resolver_9resolve_file, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8Resolver_8resolve_file}; static PyObject *__pyx_pw_4lxml_5etree_8Resolver_9resolve_file(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_f = 0; CYTHON_UNUSED PyObject *__pyx_v_context = 0; @@ -106522,7 +100028,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8Resolver_9resolve_file(PyObject *__pyx_v case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_context)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("resolve_file", 1, 2, 2, 1); __PYX_ERR(10, 83, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("resolve_file", 1, 2, 2, 1); __PYX_ERR(11, 83, __pyx_L3_error) } } if (kw_args > 0 && likely(kw_args <= 2)) { @@ -106533,7 +100039,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8Resolver_9resolve_file(PyObject *__pyx_v } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "resolve_file") < 0)) __PYX_ERR(10, 83, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "resolve_file") < 0)) __PYX_ERR(11, 83, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -106545,14 +100051,14 @@ static PyObject *__pyx_pw_4lxml_5etree_8Resolver_9resolve_file(PyObject *__pyx_v __pyx_v_context = values[1]; __pyx_v_base_url = values[2]; if (values[3]) { - __pyx_v_close = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_close == (int)-1) && PyErr_Occurred())) __PYX_ERR(10, 83, __pyx_L3_error) + __pyx_v_close = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_close == (int)-1) && PyErr_Occurred())) __PYX_ERR(11, 83, __pyx_L3_error) } else { __pyx_v_close = ((int)1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("resolve_file", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 83, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("resolve_file", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 83, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.Resolver.resolve_file", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -106568,7 +100074,6 @@ static PyObject *__pyx_pw_4lxml_5etree_8Resolver_9resolve_file(PyObject *__pyx_v static PyObject *__pyx_pf_4lxml_5etree_8Resolver_8resolve_file(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree_Resolver *__pyx_v_self, PyObject *__pyx_v_f, CYTHON_UNUSED PyObject *__pyx_v_context, PyObject *__pyx_v_base_url, int __pyx_v_close) { struct __pyx_obj_4lxml_5etree__InputDocument *__pyx_v_doc_ref = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -106579,9 +100084,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_8resolve_file(CYTHON_UNUSED str PyObject *__pyx_t_7 = NULL; int __pyx_t_8; int __pyx_t_9; - __Pyx_TraceFrameInit(__pyx_codeobj__225) __Pyx_RefNannySetupContext("resolve_file", 0); - __Pyx_TraceCall("resolve_file", __pyx_f[10], 83, 0, __PYX_ERR(10, 83, __pyx_L1_error)); /* "src/lxml/docloader.pxi":97 * """ @@ -106590,7 +100093,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_8resolve_file(CYTHON_UNUSED str * f.read * except AttributeError: */ - __Pyx_TraceLine(97,0,__PYX_ERR(10, 97, __pyx_L3_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -106607,8 +100109,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_8resolve_file(CYTHON_UNUSED str * except AttributeError: * raise TypeError, u"Argument is not a file-like object" */ - __Pyx_TraceLine(98,0,__PYX_ERR(10, 98, __pyx_L3_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_read); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 98, __pyx_L3_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_read); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 98, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -106634,11 +100135,10 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_8resolve_file(CYTHON_UNUSED str * raise TypeError, u"Argument is not a file-like object" * doc_ref = _InputDocument() */ - __Pyx_TraceLine(99,0,__PYX_ERR(10, 99, __pyx_L5_except_error)) __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_5) { __Pyx_AddTraceback("lxml.etree.Resolver.resolve_file", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(10, 99, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(11, 99, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); @@ -106650,9 +100150,8 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_8resolve_file(CYTHON_UNUSED str * doc_ref = _InputDocument() * doc_ref._type = PARSER_DATA_FILE */ - __Pyx_TraceLine(100,0,__PYX_ERR(10, 100, __pyx_L5_except_error)) __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Argument_is_not_a_file_like_obje, 0, 0); - __PYX_ERR(10, 100, __pyx_L5_except_error) + __PYX_ERR(11, 100, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; @@ -106679,8 +100178,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_8resolve_file(CYTHON_UNUSED str * doc_ref._type = PARSER_DATA_FILE * if base_url is not None: */ - __Pyx_TraceLine(101,0,__PYX_ERR(10, 101, __pyx_L1_error)) - __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__InputDocument)); if (unlikely(!__pyx_t_7)) __PYX_ERR(10, 101, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__InputDocument)); if (unlikely(!__pyx_t_7)) __PYX_ERR(11, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_doc_ref = ((struct __pyx_obj_4lxml_5etree__InputDocument *)__pyx_t_7); __pyx_t_7 = 0; @@ -106692,7 +100190,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_8resolve_file(CYTHON_UNUSED str * if base_url is not None: * doc_ref._filename = _encodeFilename(base_url) */ - __Pyx_TraceLine(102,0,__PYX_ERR(10, 102, __pyx_L1_error)) __pyx_v_doc_ref->_type = __pyx_e_4lxml_5etree_PARSER_DATA_FILE; /* "src/lxml/docloader.pxi":103 @@ -106702,7 +100199,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_8resolve_file(CYTHON_UNUSED str * doc_ref._filename = _encodeFilename(base_url) * else: */ - __Pyx_TraceLine(103,0,__PYX_ERR(10, 103, __pyx_L1_error)) __pyx_t_8 = (__pyx_v_base_url != Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { @@ -106714,8 +100210,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_8resolve_file(CYTHON_UNUSED str * else: * doc_ref._filename = _getFilenameForFile(f) */ - __Pyx_TraceLine(104,0,__PYX_ERR(10, 104, __pyx_L1_error)) - __pyx_t_7 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_base_url); if (unlikely(!__pyx_t_7)) __PYX_ERR(10, 104, __pyx_L1_error) + __pyx_t_7 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_base_url); if (unlikely(!__pyx_t_7)) __PYX_ERR(11, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __Pyx_GOTREF(__pyx_v_doc_ref->_filename); @@ -106740,9 +100235,8 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_8resolve_file(CYTHON_UNUSED str * doc_ref._close_file = close * doc_ref._file = f */ - __Pyx_TraceLine(106,0,__PYX_ERR(10, 106, __pyx_L1_error)) /*else*/ { - __pyx_t_7 = __pyx_f_4lxml_5etree__getFilenameForFile(__pyx_v_f); if (unlikely(!__pyx_t_7)) __PYX_ERR(10, 106, __pyx_L1_error) + __pyx_t_7 = __pyx_f_4lxml_5etree__getFilenameForFile(__pyx_v_f); if (unlikely(!__pyx_t_7)) __PYX_ERR(11, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __Pyx_GOTREF(__pyx_v_doc_ref->_filename); @@ -106759,7 +100253,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_8resolve_file(CYTHON_UNUSED str * doc_ref._file = f * return doc_ref */ - __Pyx_TraceLine(107,0,__PYX_ERR(10, 107, __pyx_L1_error)) __pyx_v_doc_ref->_close_file = __pyx_v_close; /* "src/lxml/docloader.pxi":108 @@ -106769,7 +100262,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_8resolve_file(CYTHON_UNUSED str * return doc_ref * */ - __Pyx_TraceLine(108,0,__PYX_ERR(10, 108, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_f); __Pyx_GIVEREF(__pyx_v_f); __Pyx_GOTREF(__pyx_v_doc_ref->_file); @@ -106783,7 +100275,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_8resolve_file(CYTHON_UNUSED str * * @cython.final */ - __Pyx_TraceLine(109,0,__PYX_ERR(10, 109, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_doc_ref)); __pyx_r = ((PyObject *)__pyx_v_doc_ref); @@ -106807,7 +100298,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8Resolver_8resolve_file(CYTHON_UNUSED str __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_doc_ref); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -106849,7 +100339,7 @@ static int __pyx_pw_4lxml_5etree_17_ResolverRegistry_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(10, 116, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(11, 116, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -106863,13 +100353,13 @@ static int __pyx_pw_4lxml_5etree_17_ResolverRegistry_1__cinit__(PyObject *__pyx_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 116, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 116, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._ResolverRegistry.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_default_resolver), __pyx_ptype_4lxml_5etree_Resolver, 1, "default_resolver", 0))) __PYX_ERR(10, 116, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_default_resolver), __pyx_ptype_4lxml_5etree_Resolver, 1, "default_resolver", 0))) __PYX_ERR(11, 116, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_17_ResolverRegistry___cinit__(((struct __pyx_obj_4lxml_5etree__ResolverRegistry *)__pyx_v_self), __pyx_v_default_resolver); /* function exit code */ @@ -106883,11 +100373,9 @@ static int __pyx_pw_4lxml_5etree_17_ResolverRegistry_1__cinit__(PyObject *__pyx_ static int __pyx_pf_4lxml_5etree_17_ResolverRegistry___cinit__(struct __pyx_obj_4lxml_5etree__ResolverRegistry *__pyx_v_self, struct __pyx_obj_4lxml_5etree_Resolver *__pyx_v_default_resolver) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[10], 116, 0, __PYX_ERR(10, 116, __pyx_L1_error)); /* "src/lxml/docloader.pxi":117 * cdef Resolver _default_resolver @@ -106896,8 +100384,7 @@ static int __pyx_pf_4lxml_5etree_17_ResolverRegistry___cinit__(struct __pyx_obj_ * self._default_resolver = default_resolver * */ - __Pyx_TraceLine(117,0,__PYX_ERR(10, 117, __pyx_L1_error)) - __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 117, __pyx_L1_error) + __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_resolvers); @@ -106912,7 +100399,6 @@ static int __pyx_pf_4lxml_5etree_17_ResolverRegistry___cinit__(struct __pyx_obj_ * * def add(self, Resolver resolver not None): */ - __Pyx_TraceLine(118,0,__PYX_ERR(10, 118, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_default_resolver)); __Pyx_GIVEREF(((PyObject *)__pyx_v_default_resolver)); __Pyx_GOTREF(__pyx_v_self->_default_resolver); @@ -106935,7 +100421,6 @@ static int __pyx_pf_4lxml_5etree_17_ResolverRegistry___cinit__(struct __pyx_obj_ __Pyx_AddTraceback("lxml.etree._ResolverRegistry.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -106956,7 +100441,7 @@ static PyObject *__pyx_pw_4lxml_5etree_17_ResolverRegistry_3add(PyObject *__pyx_ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_resolver), __pyx_ptype_4lxml_5etree_Resolver, 0, "resolver", 0))) __PYX_ERR(10, 120, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_resolver), __pyx_ptype_4lxml_5etree_Resolver, 0, "resolver", 0))) __PYX_ERR(11, 120, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_17_ResolverRegistry_2add(((struct __pyx_obj_4lxml_5etree__ResolverRegistry *)__pyx_v_self), ((struct __pyx_obj_4lxml_5etree_Resolver *)__pyx_v_resolver)); /* function exit code */ @@ -106970,15 +100455,11 @@ static PyObject *__pyx_pw_4lxml_5etree_17_ResolverRegistry_3add(PyObject *__pyx_ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_2add(struct __pyx_obj_4lxml_5etree__ResolverRegistry *__pyx_v_self, struct __pyx_obj_4lxml_5etree_Resolver *__pyx_v_resolver) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__226) __Pyx_RefNannySetupContext("add", 0); - __Pyx_TraceCall("add", __pyx_f[10], 120, 0, __PYX_ERR(10, 120, __pyx_L1_error)); /* "src/lxml/docloader.pxi":131 * until the first match is found. @@ -106987,8 +100468,7 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_2add(struct __pyx_obj * * def remove(self, resolver): */ - __Pyx_TraceLine(131,0,__PYX_ERR(10, 131, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_resolvers, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 131, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_resolvers, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -107000,38 +100480,10 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_2add(struct __pyx_obj __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_resolver)); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 131, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)__pyx_v_resolver)}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 131, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)__pyx_v_resolver)}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 131, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 131, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_resolver)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_resolver)); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject *)__pyx_v_resolver)); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 131, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_resolver)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_resolver)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 131, __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; @@ -107050,12 +100502,10 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_2add(struct __pyx_obj __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("lxml.etree._ResolverRegistry.add", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -107085,15 +100535,11 @@ static PyObject *__pyx_pw_4lxml_5etree_17_ResolverRegistry_5remove(PyObject *__p static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_4remove(struct __pyx_obj_4lxml_5etree__ResolverRegistry *__pyx_v_self, PyObject *__pyx_v_resolver) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__227) __Pyx_RefNannySetupContext("remove", 0); - __Pyx_TraceCall("remove", __pyx_f[10], 133, 0, __PYX_ERR(10, 133, __pyx_L1_error)); /* "src/lxml/docloader.pxi":135 * def remove(self, resolver): @@ -107102,8 +100548,7 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_4remove(struct __pyx_ * * cdef _ResolverRegistry _copy(self): */ - __Pyx_TraceLine(135,0,__PYX_ERR(10, 135, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_resolvers, __pyx_n_s_discard); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 135, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_resolvers, __pyx_n_s_discard); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -107115,38 +100560,10 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_4remove(struct __pyx_ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_resolver); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 135, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_resolver}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 135, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_resolver}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 135, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 135, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_v_resolver); - __Pyx_GIVEREF(__pyx_v_resolver); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_resolver); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 135, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_resolver) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_resolver); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 135, __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; @@ -107165,12 +100582,10 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_4remove(struct __pyx_ __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("lxml.etree._ResolverRegistry.remove", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -107186,13 +100601,11 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_4remove(struct __pyx_ static struct __pyx_obj_4lxml_5etree__ResolverRegistry *__pyx_f_4lxml_5etree_17_ResolverRegistry__copy(struct __pyx_obj_4lxml_5etree__ResolverRegistry *__pyx_v_self) { struct __pyx_obj_4lxml_5etree__ResolverRegistry *__pyx_v_registry = 0; struct __pyx_obj_4lxml_5etree__ResolverRegistry *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_copy", 0); - __Pyx_TraceCall("_copy", __pyx_f[10], 137, 0, __PYX_ERR(10, 137, __pyx_L1_error)); /* "src/lxml/docloader.pxi":139 * cdef _ResolverRegistry _copy(self): @@ -107201,8 +100614,7 @@ static struct __pyx_obj_4lxml_5etree__ResolverRegistry *__pyx_f_4lxml_5etree_17_ * registry._resolvers = self._resolvers.copy() * return registry */ - __Pyx_TraceLine(139,0,__PYX_ERR(10, 139, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree__ResolverRegistry), ((PyObject *)__pyx_v_self->_default_resolver)); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 139, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree__ResolverRegistry), ((PyObject *)__pyx_v_self->_default_resolver)); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_registry = ((struct __pyx_obj_4lxml_5etree__ResolverRegistry *)__pyx_t_1); __pyx_t_1 = 0; @@ -107214,8 +100626,7 @@ static struct __pyx_obj_4lxml_5etree__ResolverRegistry *__pyx_f_4lxml_5etree_17_ * return registry * */ - __Pyx_TraceLine(140,0,__PYX_ERR(10, 140, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_resolvers, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 140, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_resolvers, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -107227,12 +100638,9 @@ static struct __pyx_obj_4lxml_5etree__ResolverRegistry *__pyx_f_4lxml_5etree_17_ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 140, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 140, __pyx_L1_error) - } + __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(11, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_1); @@ -107248,7 +100656,6 @@ static struct __pyx_obj_4lxml_5etree__ResolverRegistry *__pyx_f_4lxml_5etree_17_ * * def copy(self): */ - __Pyx_TraceLine(141,0,__PYX_ERR(10, 141, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_registry)); __pyx_r = __pyx_v_registry; @@ -107272,7 +100679,6 @@ static struct __pyx_obj_4lxml_5etree__ResolverRegistry *__pyx_f_4lxml_5etree_17_ __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_registry); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -107302,12 +100708,9 @@ static PyObject *__pyx_pw_4lxml_5etree_17_ResolverRegistry_7copy(PyObject *__pyx static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_6copy(struct __pyx_obj_4lxml_5etree__ResolverRegistry *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__228) __Pyx_RefNannySetupContext("copy", 0); - __Pyx_TraceCall("copy", __pyx_f[10], 143, 0, __PYX_ERR(10, 143, __pyx_L1_error)); /* "src/lxml/docloader.pxi":145 * def copy(self): @@ -107316,9 +100719,8 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_6copy(struct __pyx_ob * * def resolve(self, system_url, public_id, context): */ - __Pyx_TraceLine(145,0,__PYX_ERR(10, 145, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_17_ResolverRegistry__copy(__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 145, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_17_ResolverRegistry__copy(__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -107339,7 +100741,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_6copy(struct __pyx_ob __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -107355,7 +100756,7 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_6copy(struct __pyx_ob /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_17_ResolverRegistry_9resolve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_17_ResolverRegistry_8resolve[] = "resolve(self, system_url, public_id, context)"; -static PyMethodDef __pyx_mdef_4lxml_5etree_17_ResolverRegistry_9resolve = {"resolve", (PyCFunction)__pyx_pw_4lxml_5etree_17_ResolverRegistry_9resolve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_17_ResolverRegistry_8resolve}; +static PyMethodDef __pyx_mdef_4lxml_5etree_17_ResolverRegistry_9resolve = {"resolve", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_17_ResolverRegistry_9resolve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_17_ResolverRegistry_8resolve}; static PyObject *__pyx_pw_4lxml_5etree_17_ResolverRegistry_9resolve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_system_url = 0; PyObject *__pyx_v_public_id = 0; @@ -107388,17 +100789,17 @@ static PyObject *__pyx_pw_4lxml_5etree_17_ResolverRegistry_9resolve(PyObject *__ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_public_id)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("resolve", 1, 3, 3, 1); __PYX_ERR(10, 147, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("resolve", 1, 3, 3, 1); __PYX_ERR(11, 147, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_context)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("resolve", 1, 3, 3, 2); __PYX_ERR(10, 147, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("resolve", 1, 3, 3, 2); __PYX_ERR(11, 147, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "resolve") < 0)) __PYX_ERR(10, 147, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "resolve") < 0)) __PYX_ERR(11, 147, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -107413,7 +100814,7 @@ static PyObject *__pyx_pw_4lxml_5etree_17_ResolverRegistry_9resolve(PyObject *__ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("resolve", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 147, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("resolve", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 147, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._ResolverRegistry.resolve", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -107430,7 +100831,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_8resolve(struct __pyx PyObject *__pyx_v_resolver = NULL; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; @@ -107442,9 +100842,7 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_8resolve(struct __pyx PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; - __Pyx_TraceFrameInit(__pyx_codeobj__229) __Pyx_RefNannySetupContext("resolve", 0); - __Pyx_TraceCall("resolve", __pyx_f[10], 147, 0, __PYX_ERR(10, 147, __pyx_L1_error)); /* "src/lxml/docloader.pxi":149 * def resolve(self, system_url, public_id, context): @@ -107453,31 +100851,30 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_8resolve(struct __pyx * result = resolver.resolve(system_url, public_id, context) * if result is not None: */ - __Pyx_TraceLine(149,0,__PYX_ERR(10, 149, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_v_self->_resolvers)) || PyTuple_CheckExact(__pyx_v_self->_resolvers)) { __pyx_t_1 = __pyx_v_self->_resolvers; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->_resolvers); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 149, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->_resolvers); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 149, __pyx_L1_error) + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 149, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_2 >= 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_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(10, 149, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(11, 149, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 149, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(10, 149, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(11, 149, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 149, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -107487,7 +100884,7 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_8resolve(struct __pyx PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(10, 149, __pyx_L1_error) + else __PYX_ERR(11, 149, __pyx_L1_error) } break; } @@ -107503,8 +100900,7 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_8resolve(struct __pyx * if result is not None: * return result */ - __Pyx_TraceLine(150,0,__PYX_ERR(10, 150, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_resolver, __pyx_n_s_resolve); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 150, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_resolver, __pyx_n_s_resolve); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -107521,7 +100917,7 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_8resolve(struct __pyx #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_system_url, __pyx_v_public_id, __pyx_v_context}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 150, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 150, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -107529,13 +100925,13 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_8resolve(struct __pyx #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_system_url, __pyx_v_public_id, __pyx_v_context}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 150, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 150, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { - __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(10, 150, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(11, 150, __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; @@ -107549,7 +100945,7 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_8resolve(struct __pyx __Pyx_INCREF(__pyx_v_context); __Pyx_GIVEREF(__pyx_v_context); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_v_context); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 150, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -107564,7 +100960,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_8resolve(struct __pyx * return result * if self._default_resolver is None: */ - __Pyx_TraceLine(151,0,__PYX_ERR(10, 151, __pyx_L1_error)) __pyx_t_9 = (__pyx_v_result != Py_None); __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { @@ -107576,7 +100971,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_8resolve(struct __pyx * if self._default_resolver is None: * return None */ - __Pyx_TraceLine(152,0,__PYX_ERR(10, 152, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; @@ -107599,7 +100993,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_8resolve(struct __pyx * result = resolver.resolve(system_url, public_id, context) * if result is not None: */ - __Pyx_TraceLine(149,0,__PYX_ERR(10, 149, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -107610,7 +101003,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_8resolve(struct __pyx * return None * return self._default_resolver.resolve(system_url, public_id, context) */ - __Pyx_TraceLine(153,0,__PYX_ERR(10, 153, __pyx_L1_error)) __pyx_t_10 = (((PyObject *)__pyx_v_self->_default_resolver) == Py_None); __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { @@ -107622,7 +101014,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_8resolve(struct __pyx * return self._default_resolver.resolve(system_url, public_id, context) * */ - __Pyx_TraceLine(154,0,__PYX_ERR(10, 154, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -107643,9 +101034,8 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_8resolve(struct __pyx * * def __repr__(self): */ - __Pyx_TraceLine(155,0,__PYX_ERR(10, 155, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_default_resolver), __pyx_n_s_resolve); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 155, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_default_resolver), __pyx_n_s_resolve); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_7 = 0; @@ -107662,7 +101052,7 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_8resolve(struct __pyx #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_system_url, __pyx_v_public_id, __pyx_v_context}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 155, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 155, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -107670,13 +101060,13 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_8resolve(struct __pyx #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_system_url, __pyx_v_public_id, __pyx_v_context}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 155, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 155, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(10, 155, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(11, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -107690,7 +101080,7 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_8resolve(struct __pyx __Pyx_INCREF(__pyx_v_context); __Pyx_GIVEREF(__pyx_v_context); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_v_context); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 155, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -107720,7 +101110,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_8resolve(struct __pyx __Pyx_XDECREF(__pyx_v_resolver); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -107748,12 +101137,10 @@ static PyObject *__pyx_pw_4lxml_5etree_17_ResolverRegistry_11__repr__(PyObject * static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_10__repr__(struct __pyx_obj_4lxml_5etree__ResolverRegistry *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[10], 157, 0, __PYX_ERR(10, 157, __pyx_L1_error)); /* "src/lxml/docloader.pxi":158 * @@ -107762,11 +101149,10 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_10__repr__(struct __p * * */ - __Pyx_TraceLine(158,0,__PYX_ERR(10, 158, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_v_self->_resolvers; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 158, __pyx_L1_error) + __pyx_t_2 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; @@ -107789,7 +101175,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_10__repr__(struct __p __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -107804,11 +101189,9 @@ static PyObject *__pyx_pf_4lxml_5etree_17_ResolverRegistry_10__repr__(struct __p static int __pyx_f_4lxml_5etree_16_ResolverContext_clear(struct __pyx_obj_4lxml_5etree__ResolverContext *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("clear", 0); - __Pyx_TraceCall("clear", __pyx_f[10], 166, 0, __PYX_ERR(10, 166, __pyx_L1_error)); /* "src/lxml/docloader.pxi":167 * @@ -107817,8 +101200,7 @@ static int __pyx_f_4lxml_5etree_16_ResolverContext_clear(struct __pyx_obj_4lxml_ * self._storage.clear() * return 0 */ - __Pyx_TraceLine(167,0,__PYX_ERR(10, 167, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_17_ExceptionContext_clear(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(10, 167, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_17_ExceptionContext_clear(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(11, 167, __pyx_L1_error) /* "src/lxml/docloader.pxi":168 * cdef int clear(self) except -1: @@ -107827,8 +101209,7 @@ static int __pyx_f_4lxml_5etree_16_ResolverContext_clear(struct __pyx_obj_4lxml_ * return 0 * */ - __Pyx_TraceLine(168,0,__PYX_ERR(10, 168, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_10_TempStore_clear(__pyx_v_self->_storage); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(10, 168, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_10_TempStore_clear(__pyx_v_self->_storage); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(11, 168, __pyx_L1_error) /* "src/lxml/docloader.pxi":169 * _ExceptionContext.clear(self) @@ -107837,7 +101218,6 @@ static int __pyx_f_4lxml_5etree_16_ResolverContext_clear(struct __pyx_obj_4lxml_ * * */ - __Pyx_TraceLine(169,0,__PYX_ERR(10, 169, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -107854,7 +101234,6 @@ static int __pyx_f_4lxml_5etree_16_ResolverContext_clear(struct __pyx_obj_4lxml_ __Pyx_AddTraceback("lxml.etree._ResolverContext.clear", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -107869,13 +101248,11 @@ static int __pyx_f_4lxml_5etree_16_ResolverContext_clear(struct __pyx_obj_4lxml_ static PyObject *__pyx_f_4lxml_5etree__initResolverContext(struct __pyx_obj_4lxml_5etree__ResolverContext *__pyx_v_context, struct __pyx_obj_4lxml_5etree__ResolverRegistry *__pyx_v_resolvers) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_initResolverContext", 0); - __Pyx_TraceCall("_initResolverContext", __pyx_f[10], 172, 0, __PYX_ERR(10, 172, __pyx_L1_error)); /* "src/lxml/docloader.pxi":174 * cdef _initResolverContext(_ResolverContext context, @@ -107884,7 +101261,6 @@ static PyObject *__pyx_f_4lxml_5etree__initResolverContext(struct __pyx_obj_4lxm * context._resolvers = _ResolverRegistry() * else: */ - __Pyx_TraceLine(174,0,__PYX_ERR(10, 174, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_resolvers) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -107896,8 +101272,7 @@ static PyObject *__pyx_f_4lxml_5etree__initResolverContext(struct __pyx_obj_4lxm * else: * context._resolvers = resolvers */ - __Pyx_TraceLine(175,0,__PYX_ERR(10, 175, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__ResolverRegistry)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 175, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__ResolverRegistry)); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_context->_resolvers); @@ -107921,7 +101296,6 @@ static PyObject *__pyx_f_4lxml_5etree__initResolverContext(struct __pyx_obj_4lxm * context._resolvers = resolvers # <<<<<<<<<<<<<< * context._storage = _TempStore() */ - __Pyx_TraceLine(177,0,__PYX_ERR(10, 177, __pyx_L1_error)) /*else*/ { __Pyx_INCREF(((PyObject *)__pyx_v_resolvers)); __Pyx_GIVEREF(((PyObject *)__pyx_v_resolvers)); @@ -107936,8 +101310,7 @@ static PyObject *__pyx_f_4lxml_5etree__initResolverContext(struct __pyx_obj_4lxm * context._resolvers = resolvers * context._storage = _TempStore() # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(178,0,__PYX_ERR(10, 178, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__TempStore)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 178, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__TempStore)); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_context->_storage); @@ -107962,7 +101335,6 @@ static PyObject *__pyx_f_4lxml_5etree__initResolverContext(struct __pyx_obj_4lxm __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -107977,7 +101349,7 @@ static PyObject *__pyx_f_4lxml_5etree__initResolverContext(struct __pyx_obj_4lxm /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_10ParseError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_5etree_10ParseError_1__init__ = {"__init__", (PyCFunction)__pyx_pw_4lxml_5etree_10ParseError_1__init__, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_5etree_10ParseError_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_10ParseError_1__init__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_5etree_10ParseError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_message = 0; @@ -108087,15 +101459,11 @@ static PyObject *__pyx_pw_4lxml_5etree_10ParseError_1__init__(PyObject *__pyx_se static PyObject *__pyx_pf_4lxml_5etree_10ParseError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_code, PyObject *__pyx_v_line, PyObject *__pyx_v_column, PyObject *__pyx_v_filename) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__230) __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[2], 12, 0, __PYX_ERR(2, 12, __pyx_L1_error)); /* "src/lxml/parser.pxi":13 * """ @@ -108104,7 +101472,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10ParseError___init__(CYTHON_UNUSED PyObj * self.lineno, self.offset = (line, column - 1) * self.code = code */ - __Pyx_TraceLine(13,0,__PYX_ERR(2, 13, __pyx_L1_error)) __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_4lxml_5etree__ParseError); @@ -108129,38 +101496,10 @@ static PyObject *__pyx_pf_4lxml_5etree_10ParseError___init__(CYTHON_UNUSED PyObj __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_message}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_message}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_v_message); - __Pyx_GIVEREF(__pyx_v_message); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_message); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_message) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_message); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __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; @@ -108171,7 +101510,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10ParseError___init__(CYTHON_UNUSED PyObj * self.code = code * self.filename = filename */ - __Pyx_TraceLine(14,0,__PYX_ERR(2, 14, __pyx_L1_error)) __pyx_t_1 = __pyx_v_line; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_v_column, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 14, __pyx_L1_error) @@ -108188,7 +101526,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10ParseError___init__(CYTHON_UNUSED PyObj * self.filename = filename * */ - __Pyx_TraceLine(15,0,__PYX_ERR(2, 15, __pyx_L1_error)) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_code, __pyx_v_code) < 0) __PYX_ERR(2, 15, __pyx_L1_error) /* "src/lxml/parser.pxi":16 @@ -108198,7 +101535,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10ParseError___init__(CYTHON_UNUSED PyObj * * @property */ - __Pyx_TraceLine(16,0,__PYX_ERR(2, 16, __pyx_L1_error)) if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_filename, __pyx_v_filename) < 0) __PYX_ERR(2, 16, __pyx_L1_error) /* "src/lxml/parser.pxi":12 @@ -108216,12 +101552,10 @@ static PyObject *__pyx_pf_4lxml_5etree_10ParseError___init__(CYTHON_UNUSED PyObj __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("lxml.etree.ParseError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -108250,14 +101584,11 @@ static PyObject *__pyx_pw_4lxml_5etree_10ParseError_3position(PyObject *__pyx_se static PyObject *__pyx_pf_4lxml_5etree_10ParseError_2position(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__231) __Pyx_RefNannySetupContext("position", 0); - __Pyx_TraceCall("position", __pyx_f[2], 19, 0, __PYX_ERR(2, 19, __pyx_L1_error)); /* "src/lxml/parser.pxi":20 * @property @@ -108266,7 +101597,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10ParseError_2position(CYTHON_UNUSED PyOb * * @position.setter */ - __Pyx_TraceLine(20,0,__PYX_ERR(2, 20, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lineno); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -108304,7 +101634,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10ParseError_2position(CYTHON_UNUSED PyOb __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -108319,7 +101648,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10ParseError_2position(CYTHON_UNUSED PyOb /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_10ParseError_5position(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_5etree_10ParseError_5position = {"position", (PyCFunction)__pyx_pw_4lxml_5etree_10ParseError_5position, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_5etree_10ParseError_5position = {"position", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_10ParseError_5position, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_5etree_10ParseError_5position(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_new_pos = 0; @@ -108382,15 +101711,12 @@ static PyObject *__pyx_pw_4lxml_5etree_10ParseError_5position(PyObject *__pyx_se static PyObject *__pyx_pf_4lxml_5etree_10ParseError_4position(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_new_pos) { PyObject *__pyx_v_column = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *(*__pyx_t_4)(PyObject *); - __Pyx_TraceFrameInit(__pyx_codeobj__232) __Pyx_RefNannySetupContext("position", 0); - __Pyx_TraceCall("position", __pyx_f[2], 23, 0, __PYX_ERR(2, 23, __pyx_L1_error)); /* "src/lxml/parser.pxi":24 * @position.setter @@ -108399,7 +101725,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10ParseError_4position(CYTHON_UNUSED PyOb * self.offset = column - 1 * */ - __Pyx_TraceLine(24,0,__PYX_ERR(2, 24, __pyx_L1_error)) if ((likely(PyTuple_CheckExact(__pyx_v_new_pos))) || (PyList_CheckExact(__pyx_v_new_pos))) { PyObject* sequence = __pyx_v_new_pos; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); @@ -108456,7 +101781,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10ParseError_4position(CYTHON_UNUSED PyOb * * cdef object _ParseError = ParseError */ - __Pyx_TraceLine(25,0,__PYX_ERR(2, 25, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_v_column, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_offset, __pyx_t_2) < 0) __PYX_ERR(2, 25, __pyx_L1_error) @@ -108482,7 +101806,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10ParseError_4position(CYTHON_UNUSED PyOb __pyx_L0:; __Pyx_XDECREF(__pyx_v_column); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -108513,11 +101836,9 @@ static int __pyx_pw_4lxml_5etree_24_ParserDictionaryContext_1__cinit__(PyObject static int __pyx_pf_4lxml_5etree_24_ParserDictionaryContext___cinit__(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[2], 55, 0, __PYX_ERR(2, 55, __pyx_L1_error)); /* "src/lxml/parser.pxi":56 * @@ -108526,7 +101847,6 @@ static int __pyx_pf_4lxml_5etree_24_ParserDictionaryContext___cinit__(struct __p * self._implied_parser_contexts = [] * */ - __Pyx_TraceLine(56,0,__PYX_ERR(2, 56, __pyx_L1_error)) __pyx_v_self->_c_dict = NULL; /* "src/lxml/parser.pxi":57 @@ -108536,7 +101856,6 @@ static int __pyx_pf_4lxml_5etree_24_ParserDictionaryContext___cinit__(struct __p * * def __dealloc__(self): */ - __Pyx_TraceLine(57,0,__PYX_ERR(2, 57, __pyx_L1_error)) __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -108561,7 +101880,6 @@ static int __pyx_pf_4lxml_5etree_24_ParserDictionaryContext___cinit__(struct __p __Pyx_AddTraceback("lxml.etree._ParserDictionaryContext.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -108586,11 +101904,9 @@ static void __pyx_pw_4lxml_5etree_24_ParserDictionaryContext_3__dealloc__(PyObje } static void __pyx_pf_4lxml_5etree_24_ParserDictionaryContext_2__dealloc__(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_v_self) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__dealloc__", 0); - __Pyx_TraceCall("__dealloc__", __pyx_f[2], 59, 0, __PYX_ERR(2, 59, __pyx_L1_error)); /* "src/lxml/parser.pxi":60 * @@ -108599,7 +101915,6 @@ static void __pyx_pf_4lxml_5etree_24_ParserDictionaryContext_2__dealloc__(struct * xmlparser.xmlDictFree(self._c_dict) * */ - __Pyx_TraceLine(60,0,__PYX_ERR(2, 60, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_c_dict != NULL) != 0); if (__pyx_t_1) { @@ -108610,7 +101925,6 @@ static void __pyx_pf_4lxml_5etree_24_ParserDictionaryContext_2__dealloc__(struct * * cdef void initMainParserContext(self): */ - __Pyx_TraceLine(61,0,__PYX_ERR(2, 61, __pyx_L1_error)) xmlDictFree(__pyx_v_self->_c_dict); /* "src/lxml/parser.pxi":60 @@ -108631,11 +101945,6 @@ static void __pyx_pf_4lxml_5etree_24_ParserDictionaryContext_2__dealloc__(struct */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._ParserDictionaryContext.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -108649,11 +101958,9 @@ static void __pyx_pf_4lxml_5etree_24_ParserDictionaryContext_2__dealloc__(struct static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initMainParserContext(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_v_self) { PyObject *__pyx_v_thread_dict; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("initMainParserContext", 0); - __Pyx_TraceCall("initMainParserContext", __pyx_f[2], 63, 0, __PYX_ERR(2, 63, __pyx_L1_error)); /* "src/lxml/parser.pxi":66 * u"""Put the global context into the thread dictionary of the main @@ -108662,7 +101969,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initMainParserContex * if thread_dict is not NULL: * (thread_dict)[u"_ParserDictionaryContext"] = self */ - __Pyx_TraceLine(66,0,__PYX_ERR(2, 66, __pyx_L1_error)) __pyx_v_thread_dict = PyThreadState_GetDict(); /* "src/lxml/parser.pxi":67 @@ -108672,7 +101978,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initMainParserContex * (thread_dict)[u"_ParserDictionaryContext"] = self * */ - __Pyx_TraceLine(67,0,__PYX_ERR(2, 67, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_thread_dict != NULL) != 0); if (__pyx_t_1) { @@ -108683,7 +101988,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initMainParserContex * * cdef _ParserDictionaryContext _findThreadParserContext(self): */ - __Pyx_TraceLine(68,0,__PYX_ERR(2, 68, __pyx_L1_error)) if (unlikely(((PyObject *)__pyx_v_thread_dict) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(2, 68, __pyx_L1_error) @@ -108712,7 +102016,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initMainParserContex __pyx_L1_error:; __Pyx_WriteUnraisable("lxml.etree._ParserDictionaryContext.initMainParserContext", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -108730,13 +102033,11 @@ static struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_f_4lxml_5et PyObject *__pyx_v_d = NULL; PyObject *__pyx_v_result; struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_findThreadParserContext", 0); - __Pyx_TraceCall("_findThreadParserContext", __pyx_f[2], 70, 0, __PYX_ERR(2, 70, __pyx_L1_error)); /* "src/lxml/parser.pxi":73 * u"Find (or create) the _ParserDictionaryContext object for the current thread" @@ -108745,7 +102046,6 @@ static struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_f_4lxml_5et * if thread_dict is NULL: * return self */ - __Pyx_TraceLine(73,0,__PYX_ERR(2, 73, __pyx_L1_error)) __pyx_v_thread_dict = PyThreadState_GetDict(); /* "src/lxml/parser.pxi":74 @@ -108755,7 +102055,6 @@ static struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_f_4lxml_5et * return self * d = thread_dict */ - __Pyx_TraceLine(74,0,__PYX_ERR(2, 74, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_thread_dict == NULL) != 0); if (__pyx_t_1) { @@ -108766,7 +102065,6 @@ static struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_f_4lxml_5et * d = thread_dict * result = python.PyDict_GetItem(d, u"_ParserDictionaryContext") */ - __Pyx_TraceLine(75,0,__PYX_ERR(2, 75, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = __pyx_v_self; @@ -108788,7 +102086,6 @@ static struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_f_4lxml_5et * result = python.PyDict_GetItem(d, u"_ParserDictionaryContext") * if result is not NULL: */ - __Pyx_TraceLine(76,0,__PYX_ERR(2, 76, __pyx_L1_error)) __pyx_t_2 = ((PyObject *)__pyx_v_thread_dict); __Pyx_INCREF(__pyx_t_2); __pyx_v_d = ((PyObject*)__pyx_t_2); @@ -108801,7 +102098,6 @@ static struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_f_4lxml_5et * if result is not NULL: * return result */ - __Pyx_TraceLine(77,0,__PYX_ERR(2, 77, __pyx_L1_error)) __pyx_v_result = PyDict_GetItem(__pyx_v_d, __pyx_n_u_ParserDictionaryContext); /* "src/lxml/parser.pxi":78 @@ -108811,7 +102107,6 @@ static struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_f_4lxml_5et * return result * context = <_ParserDictionaryContext>_ParserDictionaryContext.__new__(_ParserDictionaryContext) */ - __Pyx_TraceLine(78,0,__PYX_ERR(2, 78, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_result != NULL) != 0); if (__pyx_t_1) { @@ -108822,7 +102117,6 @@ static struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_f_4lxml_5et * context = <_ParserDictionaryContext>_ParserDictionaryContext.__new__(_ParserDictionaryContext) * d[u"_ParserDictionaryContext"] = context */ - __Pyx_TraceLine(79,0,__PYX_ERR(2, 79, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); if (!(likely(((((PyObject *)__pyx_v_result)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_result), __pyx_ptype_4lxml_5etree__ParserDictionaryContext))))) __PYX_ERR(2, 79, __pyx_L1_error) __Pyx_INCREF(((PyObject *)__pyx_v_result)); @@ -108845,7 +102139,6 @@ static struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_f_4lxml_5et * d[u"_ParserDictionaryContext"] = context * return context */ - __Pyx_TraceLine(80,0,__PYX_ERR(2, 80, __pyx_L1_error)) __pyx_t_2 = ((PyObject *)__pyx_tp_new_4lxml_5etree__ParserDictionaryContext(((PyTypeObject *)__pyx_ptype_4lxml_5etree__ParserDictionaryContext), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 80, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_3 = ((PyObject *)__pyx_t_2); @@ -108861,7 +102154,6 @@ static struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_f_4lxml_5et * return context * */ - __Pyx_TraceLine(81,0,__PYX_ERR(2, 81, __pyx_L1_error)) if (unlikely(__pyx_v_d == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(2, 81, __pyx_L1_error) @@ -108875,7 +102167,6 @@ static struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_f_4lxml_5et * * cdef void setDefaultParser(self, _BaseParser parser): */ - __Pyx_TraceLine(82,0,__PYX_ERR(2, 82, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_context)); __pyx_r = __pyx_v_context; @@ -108899,7 +102190,6 @@ static struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_f_4lxml_5et __Pyx_XDECREF((PyObject *)__pyx_v_context); __Pyx_XDECREF(__pyx_v_d); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -108914,11 +102204,9 @@ static struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_f_4lxml_5et static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_setDefaultParser(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_v_self, struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_parser) { struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_v_context = 0; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("setDefaultParser", 0); - __Pyx_TraceCall("setDefaultParser", __pyx_f[2], 84, 0, __PYX_ERR(2, 84, __pyx_L1_error)); /* "src/lxml/parser.pxi":87 * u"Set the default parser for the current thread" @@ -108927,7 +102215,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_setDefaultParser(str * context._default_parser = parser * */ - __Pyx_TraceLine(87,0,__PYX_ERR(2, 87, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext__findThreadParserContext(__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *)__pyx_t_1); @@ -108940,7 +102227,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_setDefaultParser(str * * cdef _BaseParser getDefaultParser(self): */ - __Pyx_TraceLine(88,0,__PYX_ERR(2, 88, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_parser)); __Pyx_GIVEREF(((PyObject *)__pyx_v_parser)); __Pyx_GOTREF(__pyx_v_context->_default_parser); @@ -108962,7 +102248,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_setDefaultParser(str __Pyx_WriteUnraisable("lxml.etree._ParserDictionaryContext.setDefaultParser", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -108977,13 +102262,11 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_setDefaultParser(str static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_24_ParserDictionaryContext_getDefaultParser(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_v_self) { struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_v_context = 0; struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("getDefaultParser", 0); - __Pyx_TraceCall("getDefaultParser", __pyx_f[2], 90, 0, __PYX_ERR(2, 90, __pyx_L1_error)); /* "src/lxml/parser.pxi":93 * u"Return (or create) the default parser of the current thread" @@ -108992,7 +102275,6 @@ static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_24_Parser * if context._default_parser is None: * if self._default_parser is None: */ - __Pyx_TraceLine(93,0,__PYX_ERR(2, 93, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext__findThreadParserContext(__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *)__pyx_t_1); @@ -109005,7 +102287,6 @@ static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_24_Parser * if self._default_parser is None: * self._default_parser = __DEFAULT_XML_PARSER._copy() */ - __Pyx_TraceLine(94,0,__PYX_ERR(2, 94, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)__pyx_v_context->_default_parser) == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -109017,7 +102298,6 @@ static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_24_Parser * self._default_parser = __DEFAULT_XML_PARSER._copy() * if context is not self: */ - __Pyx_TraceLine(95,0,__PYX_ERR(2, 95, __pyx_L1_error)) __pyx_t_3 = (((PyObject *)__pyx_v_self->_default_parser) == Py_None); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { @@ -109029,7 +102309,6 @@ static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_24_Parser * if context is not self: * context._default_parser = self._default_parser._copy() */ - __Pyx_TraceLine(96,0,__PYX_ERR(2, 96, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree_XMLParser *)__pyx_v_4lxml_5etree___DEFAULT_XML_PARSER->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._copy(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_4lxml_5etree___DEFAULT_XML_PARSER))); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -109054,7 +102333,6 @@ static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_24_Parser * context._default_parser = self._default_parser._copy() * return context._default_parser */ - __Pyx_TraceLine(97,0,__PYX_ERR(2, 97, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_context != __pyx_v_self); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -109066,7 +102344,6 @@ static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_24_Parser * return context._default_parser * */ - __Pyx_TraceLine(98,0,__PYX_ERR(2, 98, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->_default_parser->__pyx_vtab)->_copy(__pyx_v_self->_default_parser)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -109100,7 +102377,6 @@ static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_24_Parser * * cdef tree.xmlDict* _getThreadDict(self, tree.xmlDict* default): */ - __Pyx_TraceLine(99,0,__PYX_ERR(2, 99, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_context->_default_parser)); __pyx_r = __pyx_v_context->_default_parser; @@ -109122,7 +102398,6 @@ static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_24_Parser __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -109138,13 +102413,11 @@ static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_24_Parser static xmlDict *__pyx_f_4lxml_5etree_24_ParserDictionaryContext__getThreadDict(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_v_self, xmlDict *__pyx_v_default) { struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_v_context = 0; xmlDict *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("_getThreadDict", 0); - __Pyx_TraceCall("_getThreadDict", __pyx_f[2], 101, 0, __PYX_ERR(2, 101, __pyx_L1_error)); /* "src/lxml/parser.pxi":104 * u"Return the thread-local dict or create a new one if necessary." @@ -109153,7 +102426,6 @@ static xmlDict *__pyx_f_4lxml_5etree_24_ParserDictionaryContext__getThreadDict(s * if context._c_dict is NULL: * # thread dict not yet set up => use default or create a new one */ - __Pyx_TraceLine(104,0,__PYX_ERR(2, 104, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext__findThreadParserContext(__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *)__pyx_t_1); @@ -109166,7 +102438,6 @@ static xmlDict *__pyx_f_4lxml_5etree_24_ParserDictionaryContext__getThreadDict(s * # thread dict not yet set up => use default or create a new one * if default is not NULL: */ - __Pyx_TraceLine(105,0,__PYX_ERR(2, 105, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_context->_c_dict == NULL) != 0); if (__pyx_t_2) { @@ -109177,7 +102448,6 @@ static xmlDict *__pyx_f_4lxml_5etree_24_ParserDictionaryContext__getThreadDict(s * context._c_dict = default * xmlparser.xmlDictReference(default) */ - __Pyx_TraceLine(107,0,__PYX_ERR(2, 107, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_default != NULL) != 0); if (__pyx_t_2) { @@ -109188,7 +102458,6 @@ static xmlDict *__pyx_f_4lxml_5etree_24_ParserDictionaryContext__getThreadDict(s * xmlparser.xmlDictReference(default) * return default */ - __Pyx_TraceLine(108,0,__PYX_ERR(2, 108, __pyx_L1_error)) __pyx_v_context->_c_dict = __pyx_v_default; /* "src/lxml/parser.pxi":109 @@ -109198,7 +102467,6 @@ static xmlDict *__pyx_f_4lxml_5etree_24_ParserDictionaryContext__getThreadDict(s * return default * if self._c_dict is NULL: */ - __Pyx_TraceLine(109,0,__PYX_ERR(2, 109, __pyx_L1_error)) (void)(xmlDictReference(__pyx_v_default)); /* "src/lxml/parser.pxi":110 @@ -109208,7 +102476,6 @@ static xmlDict *__pyx_f_4lxml_5etree_24_ParserDictionaryContext__getThreadDict(s * if self._c_dict is NULL: * self._c_dict = xmlparser.xmlDictCreate() */ - __Pyx_TraceLine(110,0,__PYX_ERR(2, 110, __pyx_L1_error)) __pyx_r = __pyx_v_default; goto __pyx_L0; @@ -109228,7 +102495,6 @@ static xmlDict *__pyx_f_4lxml_5etree_24_ParserDictionaryContext__getThreadDict(s * self._c_dict = xmlparser.xmlDictCreate() * if context is not self: */ - __Pyx_TraceLine(111,0,__PYX_ERR(2, 111, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->_c_dict == NULL) != 0); if (__pyx_t_2) { @@ -109239,7 +102505,6 @@ static xmlDict *__pyx_f_4lxml_5etree_24_ParserDictionaryContext__getThreadDict(s * if context is not self: * context._c_dict = xmlparser.xmlDictCreateSub(self._c_dict) */ - __Pyx_TraceLine(112,0,__PYX_ERR(2, 112, __pyx_L1_error)) __pyx_v_self->_c_dict = xmlDictCreate(); /* "src/lxml/parser.pxi":111 @@ -109258,7 +102523,6 @@ static xmlDict *__pyx_f_4lxml_5etree_24_ParserDictionaryContext__getThreadDict(s * context._c_dict = xmlparser.xmlDictCreateSub(self._c_dict) * return context._c_dict */ - __Pyx_TraceLine(113,0,__PYX_ERR(2, 113, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_context != __pyx_v_self); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -109270,7 +102534,6 @@ static xmlDict *__pyx_f_4lxml_5etree_24_ParserDictionaryContext__getThreadDict(s * return context._c_dict * */ - __Pyx_TraceLine(114,0,__PYX_ERR(2, 114, __pyx_L1_error)) __pyx_v_context->_c_dict = xmlDictCreateSub(__pyx_v_self->_c_dict); /* "src/lxml/parser.pxi":113 @@ -109298,7 +102561,6 @@ static xmlDict *__pyx_f_4lxml_5etree_24_ParserDictionaryContext__getThreadDict(s * * cdef void initThreadDictRef(self, tree.xmlDict** c_dict_ref): */ - __Pyx_TraceLine(115,0,__PYX_ERR(2, 115, __pyx_L1_error)) __pyx_r = __pyx_v_context->_c_dict; goto __pyx_L0; @@ -109317,7 +102579,6 @@ static xmlDict *__pyx_f_4lxml_5etree_24_ParserDictionaryContext__getThreadDict(s __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -109333,11 +102594,9 @@ static xmlDict *__pyx_f_4lxml_5etree_24_ParserDictionaryContext__getThreadDict(s static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initThreadDictRef(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_v_self, xmlDict **__pyx_v_c_dict_ref) { xmlDict *__pyx_v_c_dict; xmlDict *__pyx_v_c_thread_dict; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("initThreadDictRef", 0); - __Pyx_TraceCall("initThreadDictRef", __pyx_f[2], 117, 0, __PYX_ERR(2, 117, __pyx_L1_error)); /* "src/lxml/parser.pxi":118 * @@ -109346,7 +102605,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initThreadDictRef(st * c_thread_dict = self._getThreadDict(c_dict) * if c_dict is c_thread_dict: */ - __Pyx_TraceLine(118,0,__PYX_ERR(2, 118, __pyx_L1_error)) __pyx_v_c_dict = (__pyx_v_c_dict_ref[0]); /* "src/lxml/parser.pxi":119 @@ -109356,7 +102614,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initThreadDictRef(st * if c_dict is c_thread_dict: * return */ - __Pyx_TraceLine(119,0,__PYX_ERR(2, 119, __pyx_L1_error)) __pyx_v_c_thread_dict = __pyx_f_4lxml_5etree_24_ParserDictionaryContext__getThreadDict(__pyx_v_self, __pyx_v_c_dict); /* "src/lxml/parser.pxi":120 @@ -109366,7 +102623,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initThreadDictRef(st * return * if c_dict is not NULL: */ - __Pyx_TraceLine(120,0,__PYX_ERR(2, 120, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_dict == __pyx_v_c_thread_dict) != 0); if (__pyx_t_1) { @@ -109377,7 +102633,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initThreadDictRef(st * if c_dict is not NULL: * xmlparser.xmlDictFree(c_dict) */ - __Pyx_TraceLine(121,0,__PYX_ERR(2, 121, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/parser.pxi":120 @@ -109396,7 +102651,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initThreadDictRef(st * xmlparser.xmlDictFree(c_dict) * c_dict_ref[0] = c_thread_dict */ - __Pyx_TraceLine(122,0,__PYX_ERR(2, 122, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_dict != NULL) != 0); if (__pyx_t_1) { @@ -109407,7 +102661,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initThreadDictRef(st * c_dict_ref[0] = c_thread_dict * xmlparser.xmlDictReference(c_thread_dict) */ - __Pyx_TraceLine(123,0,__PYX_ERR(2, 123, __pyx_L1_error)) xmlDictFree(__pyx_v_c_dict); /* "src/lxml/parser.pxi":122 @@ -109426,7 +102679,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initThreadDictRef(st * xmlparser.xmlDictReference(c_thread_dict) * */ - __Pyx_TraceLine(124,0,__PYX_ERR(2, 124, __pyx_L1_error)) (__pyx_v_c_dict_ref[0]) = __pyx_v_c_thread_dict; /* "src/lxml/parser.pxi":125 @@ -109436,7 +102688,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initThreadDictRef(st * * cdef void initParserDict(self, xmlparser.xmlParserCtxt* pctxt): */ - __Pyx_TraceLine(125,0,__PYX_ERR(2, 125, __pyx_L1_error)) (void)(xmlDictReference(__pyx_v_c_thread_dict)); /* "src/lxml/parser.pxi":117 @@ -109448,11 +102699,7 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initThreadDictRef(st */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._ParserDictionaryContext.initThreadDictRef", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -109465,10 +102712,8 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initThreadDictRef(st */ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initParserDict(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_v_self, xmlParserCtxt *__pyx_v_pctxt) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("initParserDict", 0); - __Pyx_TraceCall("initParserDict", __pyx_f[2], 127, 0, __PYX_ERR(2, 127, __pyx_L1_error)); /* "src/lxml/parser.pxi":129 * cdef void initParserDict(self, xmlparser.xmlParserCtxt* pctxt): @@ -109477,7 +102722,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initParserDict(struc * pctxt.dictNames = 1 * */ - __Pyx_TraceLine(129,0,__PYX_ERR(2, 129, __pyx_L1_error)) __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initThreadDictRef(__pyx_v_self, (&__pyx_v_pctxt->dict)); /* "src/lxml/parser.pxi":130 @@ -109487,7 +102731,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initParserDict(struc * * cdef void initXPathParserDict(self, xpath.xmlXPathContext* pctxt): */ - __Pyx_TraceLine(130,0,__PYX_ERR(2, 130, __pyx_L1_error)) __pyx_v_pctxt->dictNames = 1; /* "src/lxml/parser.pxi":127 @@ -109499,11 +102742,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initParserDict(struc */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._ParserDictionaryContext.initParserDict", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -109516,10 +102754,8 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initParserDict(struc */ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initXPathParserDict(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_v_self, xmlXPathContext *__pyx_v_pctxt) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("initXPathParserDict", 0); - __Pyx_TraceCall("initXPathParserDict", __pyx_f[2], 132, 0, __PYX_ERR(2, 132, __pyx_L1_error)); /* "src/lxml/parser.pxi":134 * cdef void initXPathParserDict(self, xpath.xmlXPathContext* pctxt): @@ -109528,7 +102764,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initXPathParserDict( * * cdef void initDocDict(self, xmlDoc* result): */ - __Pyx_TraceLine(134,0,__PYX_ERR(2, 134, __pyx_L1_error)) __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initThreadDictRef(__pyx_v_self, (&__pyx_v_pctxt->dict)); /* "src/lxml/parser.pxi":132 @@ -109540,11 +102775,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initXPathParserDict( */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._ParserDictionaryContext.initXPathParserDict", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -109557,10 +102787,8 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initXPathParserDict( */ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initDocDict(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_v_self, xmlDoc *__pyx_v_result) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("initDocDict", 0); - __Pyx_TraceCall("initDocDict", __pyx_f[2], 136, 0, __PYX_ERR(2, 136, __pyx_L1_error)); /* "src/lxml/parser.pxi":141 * # This case should only occur for new documents with empty dicts, @@ -109569,7 +102797,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initDocDict(struct _ * * cdef _ParserContext findImpliedContext(self): */ - __Pyx_TraceLine(141,0,__PYX_ERR(2, 141, __pyx_L1_error)) __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initThreadDictRef(__pyx_v_self, (&__pyx_v_result->dict)); /* "src/lxml/parser.pxi":136 @@ -109581,11 +102808,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initDocDict(struct _ */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._ParserDictionaryContext.initDocDict", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -109601,12 +102823,10 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_24_Par struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_v_context = 0; struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_v_implied_context = 0; struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("findImpliedContext", 0); - __Pyx_TraceCall("findImpliedContext", __pyx_f[2], 143, 0, __PYX_ERR(2, 143, __pyx_L1_error)); /* "src/lxml/parser.pxi":153 * @@ -109615,7 +102835,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_24_Par * if context._implied_parser_contexts: * implied_context = context._implied_parser_contexts[-1] */ - __Pyx_TraceLine(153,0,__PYX_ERR(2, 153, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext__findThreadParserContext(__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *)__pyx_t_1); @@ -109628,7 +102847,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_24_Par * implied_context = context._implied_parser_contexts[-1] * return implied_context */ - __Pyx_TraceLine(154,0,__PYX_ERR(2, 154, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_context->_implied_parser_contexts != Py_None)&&(PyList_GET_SIZE(__pyx_v_context->_implied_parser_contexts) != 0); if (__pyx_t_2) { @@ -109639,7 +102857,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_24_Par * return implied_context * return None */ - __Pyx_TraceLine(155,0,__PYX_ERR(2, 155, __pyx_L1_error)) if (unlikely(__pyx_v_context->_implied_parser_contexts == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(2, 155, __pyx_L1_error) @@ -109657,7 +102874,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_24_Par * return None * */ - __Pyx_TraceLine(156,0,__PYX_ERR(2, 156, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_implied_context)); __pyx_r = __pyx_v_implied_context; @@ -109679,7 +102895,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_24_Par * * cdef void pushImpliedContextFromParser(self, _BaseParser parser): */ - __Pyx_TraceLine(157,0,__PYX_ERR(2, 157, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_r = ((struct __pyx_obj_4lxml_5etree__ParserContext *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -109701,7 +102916,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_24_Par __Pyx_XDECREF((PyObject *)__pyx_v_context); __Pyx_XDECREF((PyObject *)__pyx_v_implied_context); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -109715,13 +102929,11 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_24_Par */ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_pushImpliedContextFromParser(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_v_self, struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_parser) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("pushImpliedContextFromParser", 0); - __Pyx_TraceCall("pushImpliedContextFromParser", __pyx_f[2], 159, 0, __PYX_ERR(2, 159, __pyx_L1_error)); /* "src/lxml/parser.pxi":161 * cdef void pushImpliedContextFromParser(self, _BaseParser parser): @@ -109730,7 +102942,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_pushImpliedContextFr * self.pushImpliedContext(parser._getParserContext()) * else: */ - __Pyx_TraceLine(161,0,__PYX_ERR(2, 161, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_parser) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -109742,7 +102953,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_pushImpliedContextFr * else: * self.pushImpliedContext(None) */ - __Pyx_TraceLine(162,0,__PYX_ERR(2, 162, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_parser->__pyx_vtab)->_getParserContext(__pyx_v_parser)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_f_4lxml_5etree_24_ParserDictionaryContext_pushImpliedContext(__pyx_v_self, ((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_3)); @@ -109765,7 +102975,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_pushImpliedContextFr * * cdef void pushImpliedContext(self, _ParserContext parser_context): */ - __Pyx_TraceLine(164,0,__PYX_ERR(2, 164, __pyx_L1_error)) /*else*/ { __pyx_f_4lxml_5etree_24_ParserDictionaryContext_pushImpliedContext(__pyx_v_self, ((struct __pyx_obj_4lxml_5etree__ParserContext *)Py_None)); } @@ -109785,7 +102994,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_pushImpliedContextFr __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("lxml.etree._ParserDictionaryContext.pushImpliedContextFromParser", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -109799,12 +103007,10 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_pushImpliedContextFr static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_pushImpliedContext(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_v_self, struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_v_parser_context) { struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_v_context = 0; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("pushImpliedContext", 0); - __Pyx_TraceCall("pushImpliedContext", __pyx_f[2], 166, 0, __PYX_ERR(2, 166, __pyx_L1_error)); /* "src/lxml/parser.pxi":169 * u"Push a new implied context object." @@ -109813,7 +103019,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_pushImpliedContext(s * context._implied_parser_contexts.append(parser_context) * */ - __Pyx_TraceLine(169,0,__PYX_ERR(2, 169, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext__findThreadParserContext(__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *)__pyx_t_1); @@ -109826,7 +103031,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_pushImpliedContext(s * * cdef void popImpliedContext(self): */ - __Pyx_TraceLine(170,0,__PYX_ERR(2, 170, __pyx_L1_error)) if (unlikely(__pyx_v_context->_implied_parser_contexts == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); __PYX_ERR(2, 170, __pyx_L1_error) @@ -109848,7 +103052,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_pushImpliedContext(s __Pyx_WriteUnraisable("lxml.etree._ParserDictionaryContext.pushImpliedContext", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -109862,11 +103065,9 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_pushImpliedContext(s static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_popImpliedContext(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_v_self) { struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_v_context = 0; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("popImpliedContext", 0); - __Pyx_TraceCall("popImpliedContext", __pyx_f[2], 172, 0, __PYX_ERR(2, 172, __pyx_L1_error)); /* "src/lxml/parser.pxi":175 * u"Pop the current implied context object." @@ -109875,7 +103076,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_popImpliedContext(st * context._implied_parser_contexts.pop() * */ - __Pyx_TraceLine(175,0,__PYX_ERR(2, 175, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext__findThreadParserContext(__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *)__pyx_t_1); @@ -109888,7 +103088,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_popImpliedContext(st * * cdef _ParserDictionaryContext __GLOBAL_PARSER_CONTEXT = _ParserDictionaryContext() */ - __Pyx_TraceLine(176,0,__PYX_ERR(2, 176, __pyx_L1_error)) if (unlikely(__pyx_v_context->_implied_parser_contexts == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop"); __PYX_ERR(2, 176, __pyx_L1_error) @@ -109912,7 +103111,6 @@ static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_popImpliedContext(st __Pyx_WriteUnraisable("lxml.etree._ParserDictionaryContext.popImpliedContext", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -109930,13 +103128,11 @@ static int __pyx_f_4lxml_5etree__setupPythonUnicode(void) { Py_UNICODE *__pyx_v_uchars; const xmlChar *__pyx_v_buffer; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations Py_UNICODE __pyx_t_1[7]; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("_setupPythonUnicode", 0); - __Pyx_TraceCall("_setupPythonUnicode", __pyx_f[2], 188, 0, __PYX_ERR(2, 188, __pyx_L1_error)); /* "src/lxml/parser.pxi":197 * cdef Py_ssize_t l @@ -109945,7 +103141,6 @@ static int __pyx_f_4lxml_5etree__setupPythonUnicode(void) { * cdef const_xmlChar* buffer = uchars * # apparently, libxml2 can't detect UTF-16 on some systems */ - __Pyx_TraceLine(197,0,__PYX_ERR(2, 197, __pyx_L1_error)) __pyx_t_1[0] = '<'; __pyx_t_1[1] = 't'; __pyx_t_1[2] = 'e'; @@ -109962,7 +103157,6 @@ static int __pyx_f_4lxml_5etree__setupPythonUnicode(void) { * # apparently, libxml2 can't detect UTF-16 on some systems * if (buffer[0] == c'<' and buffer[1] == c'\0' and */ - __Pyx_TraceLine(198,0,__PYX_ERR(2, 198, __pyx_L1_error)) __pyx_v_buffer = ((const xmlChar *)__pyx_v_uchars); /* "src/lxml/parser.pxi":200 @@ -109972,7 +103166,6 @@ static int __pyx_f_4lxml_5etree__setupPythonUnicode(void) { * buffer[2] == c't' and buffer[3] == c'\0'): * enc = "UTF-16LE" */ - __Pyx_TraceLine(200,0,__PYX_ERR(2, 200, __pyx_L1_error)) __pyx_t_3 = (((__pyx_v_buffer[0]) == '<') != 0); if (__pyx_t_3) { } else { @@ -109993,7 +103186,6 @@ static int __pyx_f_4lxml_5etree__setupPythonUnicode(void) { * enc = "UTF-16LE" * elif (buffer[0] == c'\0' and buffer[1] == c'<' and */ - __Pyx_TraceLine(201,0,__PYX_ERR(2, 201, __pyx_L1_error)) __pyx_t_3 = (((__pyx_v_buffer[2]) == 't') != 0); if (__pyx_t_3) { } else { @@ -110011,7 +103203,6 @@ static int __pyx_f_4lxml_5etree__setupPythonUnicode(void) { * buffer[2] == c't' and buffer[3] == c'\0'): * enc = "UTF-16LE" */ - __Pyx_TraceLine(200,0,__PYX_ERR(2, 200, __pyx_L1_error)) if (__pyx_t_2) { /* "src/lxml/parser.pxi":202 @@ -110021,7 +103212,6 @@ static int __pyx_f_4lxml_5etree__setupPythonUnicode(void) { * elif (buffer[0] == c'\0' and buffer[1] == c'<' and * buffer[2] == c'\0' and buffer[3] == c't'): */ - __Pyx_TraceLine(202,0,__PYX_ERR(2, 202, __pyx_L1_error)) __pyx_v_enc = ((const char *)"UTF-16LE"); /* "src/lxml/parser.pxi":200 @@ -110041,7 +103231,6 @@ static int __pyx_f_4lxml_5etree__setupPythonUnicode(void) { * buffer[2] == c'\0' and buffer[3] == c't'): * enc = "UTF-16BE" */ - __Pyx_TraceLine(203,0,__PYX_ERR(2, 203, __pyx_L1_error)) __pyx_t_3 = (((__pyx_v_buffer[0]) == '\x00') != 0); if (__pyx_t_3) { } else { @@ -110062,7 +103251,6 @@ static int __pyx_f_4lxml_5etree__setupPythonUnicode(void) { * enc = "UTF-16BE" * else: */ - __Pyx_TraceLine(204,0,__PYX_ERR(2, 204, __pyx_L1_error)) __pyx_t_3 = (((__pyx_v_buffer[2]) == '\x00') != 0); if (__pyx_t_3) { } else { @@ -110080,7 +103268,6 @@ static int __pyx_f_4lxml_5etree__setupPythonUnicode(void) { * buffer[2] == c'\0' and buffer[3] == c't'): * enc = "UTF-16BE" */ - __Pyx_TraceLine(203,0,__PYX_ERR(2, 203, __pyx_L1_error)) if (__pyx_t_2) { /* "src/lxml/parser.pxi":205 @@ -110090,7 +103277,6 @@ static int __pyx_f_4lxml_5etree__setupPythonUnicode(void) { * else: * # let libxml2 give it a try */ - __Pyx_TraceLine(205,0,__PYX_ERR(2, 205, __pyx_L1_error)) __pyx_v_enc = ((const char *)"UTF-16BE"); /* "src/lxml/parser.pxi":203 @@ -110110,7 +103296,6 @@ static int __pyx_f_4lxml_5etree__setupPythonUnicode(void) { * if enc is NULL: * # not my fault, it's YOUR broken system :) */ - __Pyx_TraceLine(208,0,__PYX_ERR(2, 208, __pyx_L1_error)) /*else*/ { __pyx_v_enc = __pyx_f_4lxml_5etree__findEncodingName(__pyx_v_buffer, ((sizeof(Py_UNICODE)) * 7)); @@ -110121,7 +103306,6 @@ static int __pyx_f_4lxml_5etree__setupPythonUnicode(void) { * # not my fault, it's YOUR broken system :) * return 0 */ - __Pyx_TraceLine(209,0,__PYX_ERR(2, 209, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_enc == NULL) != 0); if (__pyx_t_2) { @@ -110132,7 +103316,6 @@ static int __pyx_f_4lxml_5etree__setupPythonUnicode(void) { * enchandler = tree.xmlFindCharEncodingHandler(enc) * if enchandler is not NULL: */ - __Pyx_TraceLine(211,0,__PYX_ERR(2, 211, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -110154,7 +103337,6 @@ static int __pyx_f_4lxml_5etree__setupPythonUnicode(void) { * if enchandler is not NULL: * global _UNICODE_ENCODING */ - __Pyx_TraceLine(212,0,__PYX_ERR(2, 212, __pyx_L1_error)) __pyx_v_enchandler = xmlFindCharEncodingHandler(__pyx_v_enc); /* "src/lxml/parser.pxi":213 @@ -110164,7 +103346,6 @@ static int __pyx_f_4lxml_5etree__setupPythonUnicode(void) { * global _UNICODE_ENCODING * tree.xmlCharEncCloseFunc(enchandler) */ - __Pyx_TraceLine(213,0,__PYX_ERR(2, 213, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_enchandler != NULL) != 0); if (__pyx_t_2) { @@ -110175,7 +103356,6 @@ static int __pyx_f_4lxml_5etree__setupPythonUnicode(void) { * _UNICODE_ENCODING = enc * return 0 */ - __Pyx_TraceLine(215,0,__PYX_ERR(2, 215, __pyx_L1_error)) (void)(xmlCharEncCloseFunc(__pyx_v_enchandler)); /* "src/lxml/parser.pxi":216 @@ -110185,7 +103365,6 @@ static int __pyx_f_4lxml_5etree__setupPythonUnicode(void) { * return 0 * */ - __Pyx_TraceLine(216,0,__PYX_ERR(2, 216, __pyx_L1_error)) __pyx_v_4lxml_5etree__UNICODE_ENCODING = __pyx_v_enc; /* "src/lxml/parser.pxi":213 @@ -110204,7 +103383,6 @@ static int __pyx_f_4lxml_5etree__setupPythonUnicode(void) { * * cdef const_char* _findEncodingName(const_xmlChar* buffer, int size): */ - __Pyx_TraceLine(217,0,__PYX_ERR(2, 217, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -110217,11 +103395,7 @@ static int __pyx_f_4lxml_5etree__setupPythonUnicode(void) { */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._setupPythonUnicode", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -110237,12 +103411,10 @@ static int __pyx_f_4lxml_5etree__setupPythonUnicode(void) { static const char *__pyx_f_4lxml_5etree__findEncodingName(const xmlChar *__pyx_v_buffer, int __pyx_v_size) { xmlCharEncoding __pyx_v_enc; const char *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_findEncodingName", 0); - __Pyx_TraceCall("_findEncodingName", __pyx_f[2], 219, 0, __PYX_ERR(2, 219, __pyx_L1_error)); /* "src/lxml/parser.pxi":222 * u"Work around bug in libxml2: find iconv name of encoding on our own." @@ -110251,7 +103423,6 @@ static const char *__pyx_f_4lxml_5etree__findEncodingName(const xmlChar *__pyx_v * if enc == tree.XML_CHAR_ENCODING_UTF16LE: * if size >= 4 and (buffer[0] == '\xFF' and */ - __Pyx_TraceLine(222,0,__PYX_ERR(2, 222, __pyx_L1_error)) __pyx_v_enc = xmlDetectCharEncoding(__pyx_v_buffer, __pyx_v_size); /* "src/lxml/parser.pxi":223 @@ -110261,7 +103432,6 @@ static const char *__pyx_f_4lxml_5etree__findEncodingName(const xmlChar *__pyx_v * if size >= 4 and (buffer[0] == '\xFF' and * buffer[1] == '\xFE' and */ - __Pyx_TraceLine(223,0,__PYX_ERR(2, 223, __pyx_L1_error)) switch (__pyx_v_enc) { case XML_CHAR_ENCODING_UTF16LE: @@ -110272,7 +103442,6 @@ static const char *__pyx_f_4lxml_5etree__findEncodingName(const xmlChar *__pyx_v * buffer[1] == '\xFE' and * buffer[2] == 0 and buffer[3] == 0): */ - __Pyx_TraceLine(224,0,__PYX_ERR(2, 224, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_size >= 4) != 0); if (__pyx_t_2) { } else { @@ -110293,7 +103462,6 @@ static const char *__pyx_f_4lxml_5etree__findEncodingName(const xmlChar *__pyx_v * buffer[2] == 0 and buffer[3] == 0): * return "UTF-32LE" # according to BOM */ - __Pyx_TraceLine(225,0,__PYX_ERR(2, 225, __pyx_L1_error)) __pyx_t_2 = (((__pyx_v_buffer[1]) == ((const xmlChar)'\xFE')) != 0); if (__pyx_t_2) { } else { @@ -110308,7 +103476,6 @@ static const char *__pyx_f_4lxml_5etree__findEncodingName(const xmlChar *__pyx_v * return "UTF-32LE" # according to BOM * else: */ - __Pyx_TraceLine(226,0,__PYX_ERR(2, 226, __pyx_L1_error)) __pyx_t_2 = (((__pyx_v_buffer[2]) == 0) != 0); if (__pyx_t_2) { } else { @@ -110326,7 +103493,6 @@ static const char *__pyx_f_4lxml_5etree__findEncodingName(const xmlChar *__pyx_v * buffer[1] == '\xFE' and * buffer[2] == 0 and buffer[3] == 0): */ - __Pyx_TraceLine(224,0,__PYX_ERR(2, 224, __pyx_L1_error)) if (__pyx_t_1) { /* "src/lxml/parser.pxi":227 @@ -110336,7 +103502,6 @@ static const char *__pyx_f_4lxml_5etree__findEncodingName(const xmlChar *__pyx_v * else: * return "UTF-16LE" */ - __Pyx_TraceLine(227,0,__PYX_ERR(2, 227, __pyx_L1_error)) __pyx_r = ((const char *)"UTF-32LE"); goto __pyx_L0; @@ -110356,7 +103521,6 @@ static const char *__pyx_f_4lxml_5etree__findEncodingName(const xmlChar *__pyx_v * elif enc == tree.XML_CHAR_ENCODING_UTF16BE: * return "UTF-16BE" */ - __Pyx_TraceLine(229,0,__PYX_ERR(2, 229, __pyx_L1_error)) /*else*/ { __pyx_r = ((const char *)"UTF-16LE"); goto __pyx_L0; @@ -110370,15 +103534,6 @@ static const char *__pyx_f_4lxml_5etree__findEncodingName(const xmlChar *__pyx_v * buffer[1] == '\xFE' and */ break; - - /* "src/lxml/parser.pxi":230 - * else: - * return "UTF-16LE" - * elif enc == tree.XML_CHAR_ENCODING_UTF16BE: # <<<<<<<<<<<<<< - * return "UTF-16BE" - * elif enc == tree.XML_CHAR_ENCODING_UCS4LE: - */ - __Pyx_TraceLine(230,0,__PYX_ERR(2, 230, __pyx_L1_error)) case XML_CHAR_ENCODING_UTF16BE: /* "src/lxml/parser.pxi":231 @@ -110388,7 +103543,6 @@ static const char *__pyx_f_4lxml_5etree__findEncodingName(const xmlChar *__pyx_v * elif enc == tree.XML_CHAR_ENCODING_UCS4LE: * return "UCS-4LE" */ - __Pyx_TraceLine(231,0,__PYX_ERR(2, 231, __pyx_L1_error)) __pyx_r = ((const char *)"UTF-16BE"); goto __pyx_L0; @@ -110400,15 +103554,6 @@ static const char *__pyx_f_4lxml_5etree__findEncodingName(const xmlChar *__pyx_v * elif enc == tree.XML_CHAR_ENCODING_UCS4LE: */ break; - - /* "src/lxml/parser.pxi":232 - * elif enc == tree.XML_CHAR_ENCODING_UTF16BE: - * return "UTF-16BE" - * elif enc == tree.XML_CHAR_ENCODING_UCS4LE: # <<<<<<<<<<<<<< - * return "UCS-4LE" - * elif enc == tree.XML_CHAR_ENCODING_UCS4BE: - */ - __Pyx_TraceLine(232,0,__PYX_ERR(2, 232, __pyx_L1_error)) case XML_CHAR_ENCODING_UCS4LE: /* "src/lxml/parser.pxi":233 @@ -110418,7 +103563,6 @@ static const char *__pyx_f_4lxml_5etree__findEncodingName(const xmlChar *__pyx_v * elif enc == tree.XML_CHAR_ENCODING_UCS4BE: * return "UCS-4BE" */ - __Pyx_TraceLine(233,0,__PYX_ERR(2, 233, __pyx_L1_error)) __pyx_r = ((const char *)"UCS-4LE"); goto __pyx_L0; @@ -110430,15 +103574,6 @@ static const char *__pyx_f_4lxml_5etree__findEncodingName(const xmlChar *__pyx_v * elif enc == tree.XML_CHAR_ENCODING_UCS4BE: */ break; - - /* "src/lxml/parser.pxi":234 - * elif enc == tree.XML_CHAR_ENCODING_UCS4LE: - * return "UCS-4LE" - * elif enc == tree.XML_CHAR_ENCODING_UCS4BE: # <<<<<<<<<<<<<< - * return "UCS-4BE" - * elif enc == tree.XML_CHAR_ENCODING_NONE: - */ - __Pyx_TraceLine(234,0,__PYX_ERR(2, 234, __pyx_L1_error)) case XML_CHAR_ENCODING_UCS4BE: /* "src/lxml/parser.pxi":235 @@ -110448,7 +103583,6 @@ static const char *__pyx_f_4lxml_5etree__findEncodingName(const xmlChar *__pyx_v * elif enc == tree.XML_CHAR_ENCODING_NONE: * return NULL */ - __Pyx_TraceLine(235,0,__PYX_ERR(2, 235, __pyx_L1_error)) __pyx_r = ((const char *)"UCS-4BE"); goto __pyx_L0; @@ -110460,15 +103594,6 @@ static const char *__pyx_f_4lxml_5etree__findEncodingName(const xmlChar *__pyx_v * elif enc == tree.XML_CHAR_ENCODING_NONE: */ break; - - /* "src/lxml/parser.pxi":236 - * elif enc == tree.XML_CHAR_ENCODING_UCS4BE: - * return "UCS-4BE" - * elif enc == tree.XML_CHAR_ENCODING_NONE: # <<<<<<<<<<<<<< - * return NULL - * else: - */ - __Pyx_TraceLine(236,0,__PYX_ERR(2, 236, __pyx_L1_error)) case XML_CHAR_ENCODING_NONE: /* "src/lxml/parser.pxi":237 @@ -110478,7 +103603,6 @@ static const char *__pyx_f_4lxml_5etree__findEncodingName(const xmlChar *__pyx_v * else: * # returns a constant char*, no need to free it */ - __Pyx_TraceLine(237,0,__PYX_ERR(2, 237, __pyx_L1_error)) __pyx_r = NULL; goto __pyx_L0; @@ -110499,7 +103623,6 @@ static const char *__pyx_f_4lxml_5etree__findEncodingName(const xmlChar *__pyx_v * * _setupPythonUnicode() */ - __Pyx_TraceLine(240,0,__PYX_ERR(2, 240, __pyx_L1_error)) __pyx_r = xmlGetCharEncodingName(__pyx_v_enc); goto __pyx_L0; break; @@ -110514,11 +103637,7 @@ static const char *__pyx_f_4lxml_5etree__findEncodingName(const xmlChar *__pyx_v */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._findEncodingName", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -110643,13 +103762,11 @@ static int __pyx_pw_4lxml_5etree_18_FileReaderContext_1__cinit__(PyObject *__pyx static int __pyx_pf_4lxml_5etree_18_FileReaderContext___cinit__(struct __pyx_obj_4lxml_5etree__FileReaderContext *__pyx_v_self, PyObject *__pyx_v_filelike, PyObject *__pyx_v_exc_context, PyObject *__pyx_v_url, PyObject *__pyx_v_encoding, int __pyx_v_close_file) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[2], 260, 0, __PYX_ERR(2, 260, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_url); /* "src/lxml/parser.pxi":261 @@ -110659,7 +103776,6 @@ static int __pyx_pf_4lxml_5etree_18_FileReaderContext___cinit__(struct __pyx_obj * self._filelike = filelike * self._close_file_after_read = close_file */ - __Pyx_TraceLine(261,0,__PYX_ERR(2, 261, __pyx_L1_error)) if (!(likely(__Pyx_TypeTest(__pyx_v_exc_context, __pyx_ptype_4lxml_5etree__ExceptionContext)))) __PYX_ERR(2, 261, __pyx_L1_error) __pyx_t_1 = __pyx_v_exc_context; __Pyx_INCREF(__pyx_t_1); @@ -110676,7 +103792,6 @@ static int __pyx_pf_4lxml_5etree_18_FileReaderContext___cinit__(struct __pyx_obj * self._close_file_after_read = close_file * self._encoding = encoding */ - __Pyx_TraceLine(262,0,__PYX_ERR(2, 262, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_filelike); __Pyx_GIVEREF(__pyx_v_filelike); __Pyx_GOTREF(__pyx_v_self->_filelike); @@ -110690,7 +103805,6 @@ static int __pyx_pf_4lxml_5etree_18_FileReaderContext___cinit__(struct __pyx_obj * self._encoding = encoding * if url is None: */ - __Pyx_TraceLine(263,0,__PYX_ERR(2, 263, __pyx_L1_error)) __pyx_v_self->_close_file_after_read = __pyx_v_close_file; /* "src/lxml/parser.pxi":264 @@ -110700,7 +103814,6 @@ static int __pyx_pf_4lxml_5etree_18_FileReaderContext___cinit__(struct __pyx_obj * if url is None: * self._c_url = NULL */ - __Pyx_TraceLine(264,0,__PYX_ERR(2, 264, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_encoding); __Pyx_GIVEREF(__pyx_v_encoding); __Pyx_GOTREF(__pyx_v_self->_encoding); @@ -110714,7 +103827,6 @@ static int __pyx_pf_4lxml_5etree_18_FileReaderContext___cinit__(struct __pyx_obj * self._c_url = NULL * else: */ - __Pyx_TraceLine(265,0,__PYX_ERR(2, 265, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_url == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -110726,7 +103838,6 @@ static int __pyx_pf_4lxml_5etree_18_FileReaderContext___cinit__(struct __pyx_obj * else: * url = _encodeFilename(url) */ - __Pyx_TraceLine(266,0,__PYX_ERR(2, 266, __pyx_L1_error)) __pyx_v_self->_c_url = NULL; /* "src/lxml/parser.pxi":265 @@ -110746,7 +103857,6 @@ static int __pyx_pf_4lxml_5etree_18_FileReaderContext___cinit__(struct __pyx_obj * self._c_url = _cstr(url) * self._url = url */ - __Pyx_TraceLine(268,0,__PYX_ERR(2, 268, __pyx_L1_error)) /*else*/ { __pyx_t_1 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_url); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -110760,7 +103870,6 @@ static int __pyx_pf_4lxml_5etree_18_FileReaderContext___cinit__(struct __pyx_obj * self._url = url * self._bytes = b'' */ - __Pyx_TraceLine(269,0,__PYX_ERR(2, 269, __pyx_L1_error)) __pyx_v_self->_c_url = PyBytes_AS_STRING(__pyx_v_url); } __pyx_L3:; @@ -110772,7 +103881,6 @@ static int __pyx_pf_4lxml_5etree_18_FileReaderContext___cinit__(struct __pyx_obj * self._bytes = b'' * self._bytes_read = 0 */ - __Pyx_TraceLine(270,0,__PYX_ERR(2, 270, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_url); __Pyx_GIVEREF(__pyx_v_url); __Pyx_GOTREF(__pyx_v_self->_url); @@ -110786,12 +103894,11 @@ static int __pyx_pf_4lxml_5etree_18_FileReaderContext___cinit__(struct __pyx_obj * self._bytes_read = 0 * */ - __Pyx_TraceLine(271,0,__PYX_ERR(2, 271, __pyx_L1_error)) - __Pyx_INCREF(__pyx_kp_b__23); - __Pyx_GIVEREF(__pyx_kp_b__23); + __Pyx_INCREF(__pyx_kp_b__11); + __Pyx_GIVEREF(__pyx_kp_b__11); __Pyx_GOTREF(__pyx_v_self->_bytes); __Pyx_DECREF(__pyx_v_self->_bytes); - __pyx_v_self->_bytes = __pyx_kp_b__23; + __pyx_v_self->_bytes = __pyx_kp_b__11; /* "src/lxml/parser.pxi":272 * self._url = url @@ -110800,7 +103907,6 @@ static int __pyx_pf_4lxml_5etree_18_FileReaderContext___cinit__(struct __pyx_obj * * cdef _close_file(self): */ - __Pyx_TraceLine(272,0,__PYX_ERR(2, 272, __pyx_L1_error)) __pyx_v_self->_bytes_read = 0; /* "src/lxml/parser.pxi":260 @@ -110820,7 +103926,6 @@ static int __pyx_pf_4lxml_5etree_18_FileReaderContext___cinit__(struct __pyx_obj __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_url); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -110836,7 +103941,6 @@ static int __pyx_pf_4lxml_5etree_18_FileReaderContext___cinit__(struct __pyx_obj static PyObject *__pyx_f_4lxml_5etree_18_FileReaderContext__close_file(struct __pyx_obj_4lxml_5etree__FileReaderContext *__pyx_v_self) { PyObject *__pyx_v_close = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -110854,7 +103958,6 @@ static PyObject *__pyx_f_4lxml_5etree_18_FileReaderContext__close_file(struct __ PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; __Pyx_RefNannySetupContext("_close_file", 0); - __Pyx_TraceCall("_close_file", __pyx_f[2], 274, 0, __PYX_ERR(2, 274, __pyx_L1_error)); /* "src/lxml/parser.pxi":275 * @@ -110863,7 +103966,6 @@ static PyObject *__pyx_f_4lxml_5etree_18_FileReaderContext__close_file(struct __ * return * try: */ - __Pyx_TraceLine(275,0,__PYX_ERR(2, 275, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_self->_filelike == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (!__pyx_t_3) { @@ -110883,7 +103985,6 @@ static PyObject *__pyx_f_4lxml_5etree_18_FileReaderContext__close_file(struct __ * try: * close = self._filelike.close */ - __Pyx_TraceLine(276,0,__PYX_ERR(2, 276, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -110904,7 +104005,6 @@ static PyObject *__pyx_f_4lxml_5etree_18_FileReaderContext__close_file(struct __ * close = self._filelike.close * except AttributeError: */ - __Pyx_TraceLine(277,0,__PYX_ERR(2, 277, __pyx_L7_error)) /*try:*/ { { __Pyx_PyThreadState_declare @@ -110922,7 +104022,6 @@ static PyObject *__pyx_f_4lxml_5etree_18_FileReaderContext__close_file(struct __ * except AttributeError: * close = None */ - __Pyx_TraceLine(278,0,__PYX_ERR(2, 278, __pyx_L9_error)) __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_filelike, __pyx_n_s_close); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 278, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_close = __pyx_t_7; @@ -110950,7 +104049,6 @@ static PyObject *__pyx_f_4lxml_5etree_18_FileReaderContext__close_file(struct __ * close = None * finally: */ - __Pyx_TraceLine(279,0,__PYX_ERR(2, 279, __pyx_L11_except_error)) __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_8) { __Pyx_AddTraceback("lxml.etree._FileReaderContext._close_file", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -110966,12 +104064,11 @@ static PyObject *__pyx_f_4lxml_5etree_18_FileReaderContext__close_file(struct __ * finally: * self._filelike = None */ - __Pyx_TraceLine(280,0,__PYX_ERR(2, 280, __pyx_L11_except_error)) __Pyx_INCREF(Py_None); __Pyx_XDECREF_SET(__pyx_v_close, Py_None); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L10_exception_handled; } goto __pyx_L11_except_error; @@ -111005,7 +104102,6 @@ static PyObject *__pyx_f_4lxml_5etree_18_FileReaderContext__close_file(struct __ * if close is not None: * close() */ - __Pyx_TraceLine(282,0,__PYX_ERR(2, 282, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ __Pyx_INCREF(Py_None); @@ -111063,7 +104159,6 @@ static PyObject *__pyx_f_4lxml_5etree_18_FileReaderContext__close_file(struct __ * close() * */ - __Pyx_TraceLine(283,0,__PYX_ERR(2, 283, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_close != Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { @@ -111075,7 +104170,6 @@ static PyObject *__pyx_f_4lxml_5etree_18_FileReaderContext__close_file(struct __ * * cdef xmlparser.xmlParserInputBuffer* _createParserInputBuffer(self): */ - __Pyx_TraceLine(284,0,__PYX_ERR(2, 284, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_close); __pyx_t_9 = __pyx_v_close; __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { @@ -111087,12 +104181,9 @@ static PyObject *__pyx_f_4lxml_5etree_18_FileReaderContext__close_file(struct __ __Pyx_DECREF_SET(__pyx_t_9, function); } } - if (__pyx_t_7) { - __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 284, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else { - __pyx_t_10 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 284, __pyx_L1_error) - } + __pyx_t_10 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -111126,7 +104217,6 @@ static PyObject *__pyx_f_4lxml_5etree_18_FileReaderContext__close_file(struct __ __pyx_L0:; __Pyx_XDECREF(__pyx_v_close); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -111143,12 +104233,10 @@ static xmlParserInputBuffer *__pyx_f_4lxml_5etree_18_FileReaderContext__createPa FILE *__pyx_v_c_stream; xmlParserInputBuffer *__pyx_v_c_buffer; xmlParserInputBuffer *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("_createParserInputBuffer", 0); - __Pyx_TraceCall("_createParserInputBuffer", __pyx_f[2], 286, 0, __PYX_ERR(2, 286, __pyx_L1_error)); /* "src/lxml/parser.pxi":289 * cdef stdio.FILE* c_stream @@ -111157,7 +104245,6 @@ static xmlParserInputBuffer *__pyx_f_4lxml_5etree_18_FileReaderContext__createPa * c_stream = python.PyFile_AsFile(self._filelike) * if c_stream is NULL: */ - __Pyx_TraceLine(289,0,__PYX_ERR(2, 289, __pyx_L1_error)) __pyx_v_c_buffer = xmlAllocParserInputBuffer(0); /* "src/lxml/parser.pxi":290 @@ -111167,7 +104254,6 @@ static xmlParserInputBuffer *__pyx_f_4lxml_5etree_18_FileReaderContext__createPa * if c_stream is NULL: * c_buffer.readcallback = _readFilelikeParser */ - __Pyx_TraceLine(290,0,__PYX_ERR(2, 290, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_filelike; __Pyx_INCREF(__pyx_t_1); __pyx_v_c_stream = PyFile_AsFile(__pyx_t_1); @@ -111180,7 +104266,6 @@ static xmlParserInputBuffer *__pyx_f_4lxml_5etree_18_FileReaderContext__createPa * c_buffer.readcallback = _readFilelikeParser * c_buffer.context = self */ - __Pyx_TraceLine(291,0,__PYX_ERR(2, 291, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_stream == NULL) != 0); if (__pyx_t_2) { @@ -111191,7 +104276,6 @@ static xmlParserInputBuffer *__pyx_f_4lxml_5etree_18_FileReaderContext__createPa * c_buffer.context = self * else: */ - __Pyx_TraceLine(292,0,__PYX_ERR(2, 292, __pyx_L1_error)) __pyx_v_c_buffer->readcallback = __pyx_f_4lxml_5etree__readFilelikeParser; /* "src/lxml/parser.pxi":293 @@ -111201,7 +104285,6 @@ static xmlParserInputBuffer *__pyx_f_4lxml_5etree_18_FileReaderContext__createPa * else: * c_buffer.readcallback = _readFileParser */ - __Pyx_TraceLine(293,0,__PYX_ERR(2, 293, __pyx_L1_error)) __pyx_v_c_buffer->context = ((PyObject *)__pyx_v_self); /* "src/lxml/parser.pxi":291 @@ -111221,7 +104304,6 @@ static xmlParserInputBuffer *__pyx_f_4lxml_5etree_18_FileReaderContext__createPa * c_buffer.context = c_stream * return c_buffer */ - __Pyx_TraceLine(295,0,__PYX_ERR(2, 295, __pyx_L1_error)) /*else*/ { __pyx_v_c_buffer->readcallback = __pyx_f_4lxml_5etree__readFileParser; @@ -111232,7 +104314,6 @@ static xmlParserInputBuffer *__pyx_f_4lxml_5etree_18_FileReaderContext__createPa * return c_buffer * */ - __Pyx_TraceLine(296,0,__PYX_ERR(2, 296, __pyx_L1_error)) __pyx_v_c_buffer->context = __pyx_v_c_stream; } __pyx_L3:; @@ -111244,7 +104325,6 @@ static xmlParserInputBuffer *__pyx_f_4lxml_5etree_18_FileReaderContext__createPa * * cdef xmlparser.xmlParserInput* _createParserInput( */ - __Pyx_TraceLine(297,0,__PYX_ERR(2, 297, __pyx_L1_error)) __pyx_r = __pyx_v_c_buffer; goto __pyx_L0; @@ -111257,12 +104337,7 @@ static xmlParserInputBuffer *__pyx_f_4lxml_5etree_18_FileReaderContext__createPa */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_WriteUnraisable("lxml.etree._FileReaderContext._createParserInputBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -111278,10 +104353,8 @@ static xmlParserInputBuffer *__pyx_f_4lxml_5etree_18_FileReaderContext__createPa static xmlParserInput *__pyx_f_4lxml_5etree_18_FileReaderContext__createParserInput(struct __pyx_obj_4lxml_5etree__FileReaderContext *__pyx_v_self, xmlParserCtxt *__pyx_v_ctxt) { xmlParserInputBuffer *__pyx_v_c_buffer; xmlParserInput *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_createParserInput", 0); - __Pyx_TraceCall("_createParserInput", __pyx_f[2], 299, 0, __PYX_ERR(2, 299, __pyx_L1_error)); /* "src/lxml/parser.pxi":302 * self, xmlparser.xmlParserCtxt* ctxt): @@ -111290,7 +104363,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree_18_FileReaderContext__createParserIn * return xmlparser.xmlNewIOInputStream(ctxt, c_buffer, 0) * */ - __Pyx_TraceLine(302,0,__PYX_ERR(2, 302, __pyx_L1_error)) __pyx_v_c_buffer = __pyx_f_4lxml_5etree_18_FileReaderContext__createParserInputBuffer(__pyx_v_self); /* "src/lxml/parser.pxi":303 @@ -111300,7 +104372,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree_18_FileReaderContext__createParserIn * * cdef tree.xmlDtd* _readDtd(self): */ - __Pyx_TraceLine(303,0,__PYX_ERR(2, 303, __pyx_L1_error)) __pyx_r = xmlNewIOInputStream(__pyx_v_ctxt, __pyx_v_c_buffer, 0); goto __pyx_L0; @@ -111313,11 +104384,7 @@ static xmlParserInput *__pyx_f_4lxml_5etree_18_FileReaderContext__createParserIn */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._FileReaderContext._createParserInput", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -111333,10 +104400,8 @@ static xmlParserInput *__pyx_f_4lxml_5etree_18_FileReaderContext__createParserIn static xmlDtd *__pyx_f_4lxml_5etree_18_FileReaderContext__readDtd(struct __pyx_obj_4lxml_5etree__FileReaderContext *__pyx_v_self) { xmlParserInputBuffer *__pyx_v_c_buffer; xmlDtd *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_readDtd", 0); - __Pyx_TraceCall("_readDtd", __pyx_f[2], 305, 0, __PYX_ERR(2, 305, __pyx_L1_error)); /* "src/lxml/parser.pxi":307 * cdef tree.xmlDtd* _readDtd(self): @@ -111345,7 +104410,6 @@ static xmlDtd *__pyx_f_4lxml_5etree_18_FileReaderContext__readDtd(struct __pyx_o * with nogil: * return xmlparser.xmlIOParseDTD(NULL, c_buffer, 0) */ - __Pyx_TraceLine(307,0,__PYX_ERR(2, 307, __pyx_L1_error)) __pyx_v_c_buffer = __pyx_f_4lxml_5etree_18_FileReaderContext__createParserInputBuffer(__pyx_v_self); /* "src/lxml/parser.pxi":308 @@ -111355,7 +104419,6 @@ static xmlDtd *__pyx_f_4lxml_5etree_18_FileReaderContext__readDtd(struct __pyx_o * return xmlparser.xmlIOParseDTD(NULL, c_buffer, 0) * */ - __Pyx_TraceLine(308,0,__PYX_ERR(2, 308, __pyx_L1_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -111371,7 +104434,6 @@ static xmlDtd *__pyx_f_4lxml_5etree_18_FileReaderContext__readDtd(struct __pyx_o * * cdef xmlDoc* _readDoc(self, xmlparser.xmlParserCtxt* ctxt, int options): */ - __Pyx_TraceLine(309,1,__PYX_ERR(2, 309, __pyx_L4_error)) __pyx_r = xmlIOParseDTD(NULL, __pyx_v_c_buffer, 0); goto __pyx_L3_return; } @@ -111383,7 +104445,6 @@ static xmlDtd *__pyx_f_4lxml_5etree_18_FileReaderContext__readDtd(struct __pyx_o * return xmlparser.xmlIOParseDTD(NULL, c_buffer, 0) * */ - __Pyx_TraceLine(308,1,__PYX_ERR(2, 308, __pyx_L1_error)) /*finally:*/ { __pyx_L3_return: { #ifdef WITH_THREAD @@ -111392,13 +104453,6 @@ static xmlDtd *__pyx_f_4lxml_5etree_18_FileReaderContext__readDtd(struct __pyx_o #endif goto __pyx_L0; } - __pyx_L4_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L1_error; - } } } @@ -111411,11 +104465,7 @@ static xmlDtd *__pyx_f_4lxml_5etree_18_FileReaderContext__readDtd(struct __pyx_o */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._FileReaderContext._readDtd", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -111436,7 +104486,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o void *__pyx_v_c_callback_context; int __pyx_v_orig_options; xmlDoc *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -111451,7 +104500,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; __Pyx_RefNannySetupContext("_readDoc", 0); - __Pyx_TraceCall("_readDoc", __pyx_f[2], 311, 0, __PYX_ERR(2, 311, __pyx_L1_error)); /* "src/lxml/parser.pxi":319 * cdef void* c_callback_context @@ -111460,7 +104508,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o * c_encoding = NULL * else: */ - __Pyx_TraceLine(319,0,__PYX_ERR(2, 319, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_encoding == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -111472,7 +104519,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o * else: * c_encoding = _cstr(self._encoding) */ - __Pyx_TraceLine(320,0,__PYX_ERR(2, 320, __pyx_L1_error)) __pyx_v_c_encoding = NULL; /* "src/lxml/parser.pxi":319 @@ -111492,7 +104538,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o * * c_stream = python.PyFile_AsFile(self._filelike) */ - __Pyx_TraceLine(322,0,__PYX_ERR(2, 322, __pyx_L1_error)) /*else*/ { __pyx_t_3 = __pyx_v_self->_encoding; __Pyx_INCREF(__pyx_t_3); @@ -111508,7 +104553,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o * if c_stream is NULL: * c_read_callback = _readFilelikeParser */ - __Pyx_TraceLine(324,0,__PYX_ERR(2, 324, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->_filelike; __Pyx_INCREF(__pyx_t_3); __pyx_v_c_stream = PyFile_AsFile(__pyx_t_3); @@ -111521,7 +104565,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o * c_read_callback = _readFilelikeParser * c_callback_context = self */ - __Pyx_TraceLine(325,0,__PYX_ERR(2, 325, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_stream == NULL) != 0); if (__pyx_t_2) { @@ -111532,7 +104575,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o * c_callback_context = self * else: */ - __Pyx_TraceLine(326,0,__PYX_ERR(2, 326, __pyx_L1_error)) __pyx_v_c_read_callback = __pyx_f_4lxml_5etree__readFilelikeParser; /* "src/lxml/parser.pxi":327 @@ -111542,7 +104584,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o * else: * c_read_callback = _readFileParser */ - __Pyx_TraceLine(327,0,__PYX_ERR(2, 327, __pyx_L1_error)) __pyx_v_c_callback_context = ((PyObject *)__pyx_v_self); /* "src/lxml/parser.pxi":325 @@ -111562,7 +104603,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o * c_callback_context = c_stream * */ - __Pyx_TraceLine(329,0,__PYX_ERR(2, 329, __pyx_L1_error)) /*else*/ { __pyx_v_c_read_callback = __pyx_f_4lxml_5etree__readFileParser; @@ -111573,7 +104613,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o * * orig_options = ctxt.options */ - __Pyx_TraceLine(330,0,__PYX_ERR(2, 330, __pyx_L1_error)) __pyx_v_c_callback_context = __pyx_v_c_stream; } __pyx_L4:; @@ -111585,7 +104624,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o * with nogil: * if ctxt.html: */ - __Pyx_TraceLine(332,0,__PYX_ERR(2, 332, __pyx_L1_error)) __pyx_t_4 = __pyx_v_ctxt->options; __pyx_v_orig_options = __pyx_t_4; @@ -111596,7 +104634,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o * if ctxt.html: * result = htmlparser.htmlCtxtReadIO( */ - __Pyx_TraceLine(333,0,__PYX_ERR(2, 333, __pyx_L1_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -111612,7 +104649,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o * result = htmlparser.htmlCtxtReadIO( * ctxt, c_read_callback, NULL, c_callback_context, */ - __Pyx_TraceLine(334,1,__PYX_ERR(2, 334, __pyx_L6_error)) __pyx_t_2 = (__pyx_v_ctxt->html != 0); if (__pyx_t_2) { @@ -111623,7 +104659,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o * ctxt, c_read_callback, NULL, c_callback_context, * self._c_url, c_encoding, options) */ - __Pyx_TraceLine(335,1,__PYX_ERR(2, 335, __pyx_L6_error)) __pyx_v_result = htmlCtxtReadIO(__pyx_v_ctxt, __pyx_v_c_read_callback, NULL, __pyx_v_c_callback_context, __pyx_v_self->_c_url, __pyx_v_c_encoding, __pyx_v_options); /* "src/lxml/parser.pxi":338 @@ -111633,7 +104668,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o * if _fixHtmlDictNames(ctxt.dict, result) < 0: * tree.xmlFreeDoc(result) */ - __Pyx_TraceLine(338,1,__PYX_ERR(2, 338, __pyx_L6_error)) __pyx_t_2 = ((__pyx_v_result != NULL) != 0); if (__pyx_t_2) { @@ -111644,7 +104678,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o * tree.xmlFreeDoc(result) * result = NULL */ - __Pyx_TraceLine(339,1,__PYX_ERR(2, 339, __pyx_L6_error)) __pyx_t_2 = ((__pyx_f_4lxml_5etree__fixHtmlDictNames(__pyx_v_ctxt->dict, __pyx_v_result) < 0) != 0); if (__pyx_t_2) { @@ -111655,7 +104688,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o * result = NULL * else: */ - __Pyx_TraceLine(340,1,__PYX_ERR(2, 340, __pyx_L6_error)) xmlFreeDoc(__pyx_v_result); /* "src/lxml/parser.pxi":341 @@ -111665,7 +104697,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o * else: * result = xmlparser.xmlCtxtReadIO( */ - __Pyx_TraceLine(341,1,__PYX_ERR(2, 341, __pyx_L6_error)) __pyx_v_result = NULL; /* "src/lxml/parser.pxi":339 @@ -111703,7 +104734,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o * ctxt, c_read_callback, NULL, c_callback_context, * self._c_url, c_encoding, options) */ - __Pyx_TraceLine(343,1,__PYX_ERR(2, 343, __pyx_L6_error)) /*else*/ { /* "src/lxml/parser.pxi":345 @@ -111713,7 +104743,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o * ctxt.options = orig_options # work around libxml2 problem * try: */ - __Pyx_TraceLine(345,1,__PYX_ERR(2, 345, __pyx_L6_error)) __pyx_v_result = xmlCtxtReadIO(__pyx_v_ctxt, __pyx_v_c_read_callback, NULL, __pyx_v_c_callback_context, __pyx_v_self->_c_url, __pyx_v_c_encoding, __pyx_v_options); } __pyx_L8:; @@ -111726,7 +104755,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o * if ctxt.html: * result = htmlparser.htmlCtxtReadIO( */ - __Pyx_TraceLine(333,1,__PYX_ERR(2, 333, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -111735,13 +104763,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o #endif goto __pyx_L7; } - __pyx_L6_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L1_error; - } __pyx_L7:; } } @@ -111753,7 +104774,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o * try: * self._close_file() */ - __Pyx_TraceLine(346,0,__PYX_ERR(2, 346, __pyx_L1_error)) __pyx_v_ctxt->options = __pyx_v_orig_options; /* "src/lxml/parser.pxi":347 @@ -111763,7 +104783,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o * self._close_file() * except: */ - __Pyx_TraceLine(347,0,__PYX_ERR(2, 347, __pyx_L12_error)) /*try:*/ { { __Pyx_PyThreadState_declare @@ -111781,7 +104800,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o * except: * self._exc_context._store_raised() */ - __Pyx_TraceLine(348,0,__PYX_ERR(2, 348, __pyx_L14_error)) __pyx_t_3 = __pyx_f_4lxml_5etree_18_FileReaderContext__close_file(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 348, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -111808,7 +104826,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o * self._exc_context._store_raised() * finally: */ - __Pyx_TraceLine(349,0,__PYX_ERR(2, 349, __pyx_L16_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._FileReaderContext._readDoc", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(2, 349, __pyx_L16_except_error) @@ -111823,11 +104840,10 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o * finally: * return result # swallow any exceptions */ - __Pyx_TraceLine(350,0,__PYX_ERR(2, 350, __pyx_L16_except_error)) ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_self->_exc_context->__pyx_vtab)->_store_raised(__pyx_v_self->_exc_context); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L15_exception_handled; } __pyx_L16_except_error:; @@ -111860,7 +104876,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o * * cdef int copyToBuffer(self, char* c_buffer, int c_requested): */ - __Pyx_TraceLine(352,0,__PYX_ERR(2, 352, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ __pyx_r = __pyx_v_result; @@ -111910,14 +104925,7 @@ static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_o */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_WriteUnraisable("lxml.etree._FileReaderContext._readDoc", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -111936,7 +104944,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o Py_ssize_t __pyx_v_byte_count; Py_ssize_t __pyx_v_remaining; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -111946,14 +104953,13 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; - int __pyx_t_10; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; __Pyx_RefNannySetupContext("copyToBuffer", 0); - __Pyx_TraceCall("copyToBuffer", __pyx_f[2], 354, 0, __PYX_ERR(2, 354, __pyx_L1_error)); /* "src/lxml/parser.pxi":355 * @@ -111962,7 +104968,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * cdef char* c_start * cdef Py_ssize_t byte_count, remaining */ - __Pyx_TraceLine(355,0,__PYX_ERR(2, 355, __pyx_L1_error)) __pyx_v_c_byte_count = 0; /* "src/lxml/parser.pxi":358 @@ -111972,7 +104977,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * return 0 * try: */ - __Pyx_TraceLine(358,0,__PYX_ERR(2, 358, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_bytes_read < 0) != 0); if (__pyx_t_1) { @@ -111983,7 +104987,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * try: * byte_count = python.PyBytes_GET_SIZE(self._bytes) */ - __Pyx_TraceLine(359,0,__PYX_ERR(2, 359, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -112003,7 +105006,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * byte_count = python.PyBytes_GET_SIZE(self._bytes) * remaining = byte_count - self._bytes_read */ - __Pyx_TraceLine(360,0,__PYX_ERR(2, 360, __pyx_L5_error)) /*try:*/ { { __Pyx_PyThreadState_declare @@ -112021,7 +105023,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * remaining = byte_count - self._bytes_read * while c_requested > remaining: */ - __Pyx_TraceLine(361,0,__PYX_ERR(2, 361, __pyx_L7_error)) __pyx_t_5 = __pyx_v_self->_bytes; __Pyx_INCREF(__pyx_t_5); __pyx_v_byte_count = PyBytes_GET_SIZE(__pyx_t_5); @@ -112034,7 +105035,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * while c_requested > remaining: * c_start = _cstr(self._bytes) + self._bytes_read */ - __Pyx_TraceLine(362,0,__PYX_ERR(2, 362, __pyx_L7_error)) __pyx_v_remaining = (__pyx_v_byte_count - __pyx_v_self->_bytes_read); /* "src/lxml/parser.pxi":363 @@ -112044,7 +105044,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * c_start = _cstr(self._bytes) + self._bytes_read * cstring_h.memcpy(c_buffer, c_start, remaining) */ - __Pyx_TraceLine(363,0,__PYX_ERR(2, 363, __pyx_L7_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_requested > __pyx_v_remaining) != 0); if (!__pyx_t_1) break; @@ -112056,7 +105055,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * cstring_h.memcpy(c_buffer, c_start, remaining) * c_byte_count += remaining */ - __Pyx_TraceLine(364,0,__PYX_ERR(2, 364, __pyx_L7_error)) __pyx_t_5 = __pyx_v_self->_bytes; __Pyx_INCREF(__pyx_t_5); __pyx_v_c_start = (PyBytes_AS_STRING(__pyx_t_5) + __pyx_v_self->_bytes_read); @@ -112069,7 +105067,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * c_byte_count += remaining * c_buffer += remaining */ - __Pyx_TraceLine(365,0,__PYX_ERR(2, 365, __pyx_L7_error)) (void)(memcpy(__pyx_v_c_buffer, __pyx_v_c_start, __pyx_v_remaining)); /* "src/lxml/parser.pxi":366 @@ -112079,7 +105076,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * c_buffer += remaining * c_requested -= remaining */ - __Pyx_TraceLine(366,0,__PYX_ERR(2, 366, __pyx_L7_error)) __pyx_v_c_byte_count = (__pyx_v_c_byte_count + __pyx_v_remaining); /* "src/lxml/parser.pxi":367 @@ -112089,7 +105085,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * c_requested -= remaining * */ - __Pyx_TraceLine(367,0,__PYX_ERR(2, 367, __pyx_L7_error)) __pyx_v_c_buffer = (__pyx_v_c_buffer + __pyx_v_remaining); /* "src/lxml/parser.pxi":368 @@ -112099,7 +105094,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * * self._bytes = self._filelike.read(c_requested) */ - __Pyx_TraceLine(368,0,__PYX_ERR(2, 368, __pyx_L7_error)) __pyx_v_c_requested = (__pyx_v_c_requested - __pyx_v_remaining); /* "src/lxml/parser.pxi":370 @@ -112109,7 +105103,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * if not isinstance(self._bytes, bytes): * if isinstance(self._bytes, unicode): */ - __Pyx_TraceLine(370,0,__PYX_ERR(2, 370, __pyx_L7_error)) __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_filelike, __pyx_n_s_read); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 370, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_c_requested); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 370, __pyx_L7_error) @@ -112124,41 +105117,11 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (!__pyx_t_8) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 370, __pyx_L7_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_5); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 370, __pyx_L7_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 370, __pyx_L7_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else - #endif - { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 370, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_7); - __pyx_t_7 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 370, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } - } + __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 370, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_self->_bytes); @@ -112173,13 +105136,12 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * if isinstance(self._bytes, unicode): * if self._encoding is None: */ - __Pyx_TraceLine(371,0,__PYX_ERR(2, 371, __pyx_L7_error)) __pyx_t_5 = __pyx_v_self->_bytes; __Pyx_INCREF(__pyx_t_5); __pyx_t_1 = PyBytes_Check(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_10 = ((!(__pyx_t_1 != 0)) != 0); - if (__pyx_t_10) { + __pyx_t_9 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_9) { /* "src/lxml/parser.pxi":372 * self._bytes = self._filelike.read(c_requested) @@ -112188,12 +105150,11 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * if self._encoding is None: * self._bytes = (self._bytes).encode('utf8') */ - __Pyx_TraceLine(372,0,__PYX_ERR(2, 372, __pyx_L7_error)) __pyx_t_5 = __pyx_v_self->_bytes; __Pyx_INCREF(__pyx_t_5); - __pyx_t_10 = PyUnicode_Check(__pyx_t_5); + __pyx_t_9 = PyUnicode_Check(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_1 = (__pyx_t_10 != 0); + __pyx_t_1 = (__pyx_t_9 != 0); if (likely(__pyx_t_1)) { /* "src/lxml/parser.pxi":373 @@ -112203,10 +105164,9 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * self._bytes = (self._bytes).encode('utf8') * else: */ - __Pyx_TraceLine(373,0,__PYX_ERR(2, 373, __pyx_L7_error)) __pyx_t_1 = (__pyx_v_self->_encoding == Py_None); - __pyx_t_10 = (__pyx_t_1 != 0); - if (__pyx_t_10) { + __pyx_t_9 = (__pyx_t_1 != 0); + if (__pyx_t_9) { /* "src/lxml/parser.pxi":374 * if isinstance(self._bytes, unicode): @@ -112215,7 +105175,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * else: * self._bytes = python.PyUnicode_AsEncodedString( */ - __Pyx_TraceLine(374,0,__PYX_ERR(2, 374, __pyx_L7_error)) if (unlikely(__pyx_v_self->_bytes == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode"); __PYX_ERR(2, 374, __pyx_L7_error) @@ -112245,7 +105204,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * self._bytes, _cstr(self._encoding), NULL) * else: */ - __Pyx_TraceLine(376,0,__PYX_ERR(2, 376, __pyx_L7_error)) /*else*/ { /* "src/lxml/parser.pxi":377 @@ -112255,7 +105213,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * else: * self._close_file() */ - __Pyx_TraceLine(377,0,__PYX_ERR(2, 377, __pyx_L7_error)) __pyx_t_5 = __pyx_v_self->_bytes; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = __pyx_v_self->_encoding; @@ -112268,16 +105225,15 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * self._bytes, _cstr(self._encoding), NULL) * else: */ - __Pyx_TraceLine(376,0,__PYX_ERR(2, 376, __pyx_L7_error)) - __pyx_t_9 = PyUnicode_AsEncodedString(__pyx_t_5, PyBytes_AS_STRING(__pyx_t_6), NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 376, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_9); + __pyx_t_7 = PyUnicode_AsEncodedString(__pyx_t_5, PyBytes_AS_STRING(__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 376, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GIVEREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_7); __Pyx_GOTREF(__pyx_v_self->_bytes); __Pyx_DECREF(__pyx_v_self->_bytes); - __pyx_v_self->_bytes = __pyx_t_9; - __pyx_t_9 = 0; + __pyx_v_self->_bytes = __pyx_t_7; + __pyx_t_7 = 0; } __pyx_L17:; @@ -112298,11 +105254,10 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * raise TypeError, \ * u"reading from file-like objects must return byte strings or unicode strings" */ - __Pyx_TraceLine(379,0,__PYX_ERR(2, 379, __pyx_L7_error)) /*else*/ { - __pyx_t_9 = __pyx_f_4lxml_5etree_18_FileReaderContext__close_file(__pyx_v_self); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 379, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_7 = __pyx_f_4lxml_5etree_18_FileReaderContext__close_file(__pyx_v_self); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 379, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "src/lxml/parser.pxi":380 * else: @@ -112311,7 +105266,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * u"reading from file-like objects must return byte strings or unicode strings" * */ - __Pyx_TraceLine(380,0,__PYX_ERR(2, 380, __pyx_L7_error)) __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_reading_from_file_like_objects_m, 0, 0); __PYX_ERR(2, 380, __pyx_L7_error) } @@ -112333,11 +105287,10 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * if remaining == 0: * self._bytes_read = -1 */ - __Pyx_TraceLine(383,0,__PYX_ERR(2, 383, __pyx_L7_error)) - __pyx_t_9 = __pyx_v_self->_bytes; - __Pyx_INCREF(__pyx_t_9); - __pyx_v_remaining = PyBytes_GET_SIZE(__pyx_t_9); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_7 = __pyx_v_self->_bytes; + __Pyx_INCREF(__pyx_t_7); + __pyx_v_remaining = PyBytes_GET_SIZE(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "src/lxml/parser.pxi":384 * @@ -112346,9 +105299,8 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * self._bytes_read = -1 * self._close_file() */ - __Pyx_TraceLine(384,0,__PYX_ERR(2, 384, __pyx_L7_error)) - __pyx_t_10 = ((__pyx_v_remaining == 0) != 0); - if (__pyx_t_10) { + __pyx_t_9 = ((__pyx_v_remaining == 0) != 0); + if (__pyx_t_9) { /* "src/lxml/parser.pxi":385 * remaining = python.PyBytes_GET_SIZE(self._bytes) @@ -112357,7 +105309,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * self._close_file() * return c_byte_count */ - __Pyx_TraceLine(385,0,__PYX_ERR(2, 385, __pyx_L7_error)) __pyx_v_self->_bytes_read = -1L; /* "src/lxml/parser.pxi":386 @@ -112367,10 +105318,9 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * return c_byte_count * self._bytes_read = 0 */ - __Pyx_TraceLine(386,0,__PYX_ERR(2, 386, __pyx_L7_error)) - __pyx_t_9 = __pyx_f_4lxml_5etree_18_FileReaderContext__close_file(__pyx_v_self); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 386, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_7 = __pyx_f_4lxml_5etree_18_FileReaderContext__close_file(__pyx_v_self); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 386, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "src/lxml/parser.pxi":387 * self._bytes_read = -1 @@ -112379,7 +105329,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * self._bytes_read = 0 * */ - __Pyx_TraceLine(387,0,__PYX_ERR(2, 387, __pyx_L7_error)) __pyx_r = __pyx_v_c_byte_count; goto __pyx_L11_try_return; @@ -112399,7 +105348,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * * if c_requested > 0: */ - __Pyx_TraceLine(388,0,__PYX_ERR(2, 388, __pyx_L7_error)) __pyx_v_self->_bytes_read = 0; } @@ -112410,9 +105358,8 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * c_start = _cstr(self._bytes) + self._bytes_read * cstring_h.memcpy(c_buffer, c_start, c_requested) */ - __Pyx_TraceLine(390,0,__PYX_ERR(2, 390, __pyx_L7_error)) - __pyx_t_10 = ((__pyx_v_c_requested > 0) != 0); - if (__pyx_t_10) { + __pyx_t_9 = ((__pyx_v_c_requested > 0) != 0); + if (__pyx_t_9) { /* "src/lxml/parser.pxi":391 * @@ -112421,11 +105368,10 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * cstring_h.memcpy(c_buffer, c_start, c_requested) * c_byte_count += c_requested */ - __Pyx_TraceLine(391,0,__PYX_ERR(2, 391, __pyx_L7_error)) - __pyx_t_9 = __pyx_v_self->_bytes; - __Pyx_INCREF(__pyx_t_9); - __pyx_v_c_start = (PyBytes_AS_STRING(__pyx_t_9) + __pyx_v_self->_bytes_read); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_7 = __pyx_v_self->_bytes; + __Pyx_INCREF(__pyx_t_7); + __pyx_v_c_start = (PyBytes_AS_STRING(__pyx_t_7) + __pyx_v_self->_bytes_read); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "src/lxml/parser.pxi":392 * if c_requested > 0: @@ -112434,7 +105380,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * c_byte_count += c_requested * self._bytes_read += c_requested */ - __Pyx_TraceLine(392,0,__PYX_ERR(2, 392, __pyx_L7_error)) (void)(memcpy(__pyx_v_c_buffer, __pyx_v_c_start, __pyx_v_c_requested)); /* "src/lxml/parser.pxi":393 @@ -112444,7 +105389,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * self._bytes_read += c_requested * except: */ - __Pyx_TraceLine(393,0,__PYX_ERR(2, 393, __pyx_L7_error)) __pyx_v_c_byte_count = (__pyx_v_c_byte_count + __pyx_v_c_requested); /* "src/lxml/parser.pxi":394 @@ -112454,7 +105398,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * except: * c_byte_count = -1 */ - __Pyx_TraceLine(394,0,__PYX_ERR(2, 394, __pyx_L7_error)) __pyx_v_self->_bytes_read = (__pyx_v_self->_bytes_read + __pyx_v_c_requested); /* "src/lxml/parser.pxi":390 @@ -112480,10 +105423,9 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o goto __pyx_L12_try_end; __pyx_L7_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "src/lxml/parser.pxi":395 * c_byte_count += c_requested @@ -112492,11 +105434,10 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * c_byte_count = -1 * self._exc_context._store_raised() */ - __Pyx_TraceLine(395,0,__PYX_ERR(2, 395, __pyx_L9_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._FileReaderContext.copyToBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(2, 395, __pyx_L9_except_error) - __Pyx_GOTREF(__pyx_t_9); + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(2, 395, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); @@ -112507,7 +105448,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * self._exc_context._store_raised() * try: */ - __Pyx_TraceLine(396,0,__PYX_ERR(2, 396, __pyx_L9_except_error)) __pyx_v_c_byte_count = -1; /* "src/lxml/parser.pxi":397 @@ -112517,7 +105457,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * try: * self._close_file() */ - __Pyx_TraceLine(397,0,__PYX_ERR(2, 397, __pyx_L9_except_error)) ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_self->_exc_context->__pyx_vtab)->_store_raised(__pyx_v_self->_exc_context); /* "src/lxml/parser.pxi":398 @@ -112527,14 +105466,13 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * self._close_file() * except: */ - __Pyx_TraceLine(398,0,__PYX_ERR(2, 398, __pyx_L22_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); + __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { /* "src/lxml/parser.pxi":399 @@ -112544,10 +105482,9 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * except: * self._exc_context._store_raised() */ - __Pyx_TraceLine(399,0,__PYX_ERR(2, 399, __pyx_L22_error)) - __pyx_t_7 = __pyx_f_4lxml_5etree_18_FileReaderContext__close_file(__pyx_v_self); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 399, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_8 = __pyx_f_4lxml_5etree_18_FileReaderContext__close_file(__pyx_v_self); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 399, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "src/lxml/parser.pxi":398 * c_byte_count = -1 @@ -112557,13 +105494,12 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * except: */ } + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L29_try_end; __pyx_L22_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "src/lxml/parser.pxi":400 * try: @@ -112572,12 +105508,11 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * self._exc_context._store_raised() * finally: */ - __Pyx_TraceLine(400,0,__PYX_ERR(2, 400, __pyx_L24_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._FileReaderContext.copyToBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_14) < 0) __PYX_ERR(2, 400, __pyx_L24_except_error) - __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_13, &__pyx_t_14) < 0) __PYX_ERR(2, 400, __pyx_L24_except_error) __Pyx_GOTREF(__pyx_t_8); + __Pyx_GOTREF(__pyx_t_13); __Pyx_GOTREF(__pyx_t_14); /* "src/lxml/parser.pxi":401 @@ -112587,11 +105522,10 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * finally: * return c_byte_count # swallow any exceptions */ - __Pyx_TraceLine(401,0,__PYX_ERR(2, 401, __pyx_L24_except_error)) ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_self->_exc_context->__pyx_vtab)->_store_raised(__pyx_v_self->_exc_context); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L23_exception_handled; } __pyx_L24_except_error:; @@ -112603,21 +105537,21 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * self._close_file() * except: */ + __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); goto __pyx_L9_except_error; __pyx_L23_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); __pyx_L29_try_end:; } - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; @@ -112656,7 +105590,6 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o * * cdef int _readFilelikeParser(void* ctxt, char* c_buffer, int c_size) with gil: */ - __Pyx_TraceLine(403,0,__PYX_ERR(2, 403, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ __pyx_r = __pyx_v_c_byte_count; @@ -112666,36 +105599,36 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign - __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11); + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2) < 0)) __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); - __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_10); { __pyx_r = __pyx_v_c_byte_count; goto __pyx_L32_return; } __pyx_L32_return:; if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10); } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; + __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; goto __pyx_L0; } __pyx_L4_return: { @@ -112713,17 +105646,7 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_XDECREF(__pyx_t_14); - __Pyx_WriteUnraisable("lxml.etree._FileReaderContext.copyToBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -112738,13 +105661,11 @@ static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_o static int __pyx_f_4lxml_5etree__readFilelikeParser(void *__pyx_v_ctxt, char *__pyx_v_c_buffer, int __pyx_v_c_size) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_readFilelikeParser", 0); - __Pyx_TraceCall("_readFilelikeParser", __pyx_f[2], 405, 0, __PYX_ERR(2, 405, __pyx_L1_error)); /* "src/lxml/parser.pxi":406 * @@ -112753,7 +105674,6 @@ static int __pyx_f_4lxml_5etree__readFilelikeParser(void *__pyx_v_ctxt, char *__ * * cdef int _readFileParser(void* ctxt, char* c_buffer, int c_size) nogil: */ - __Pyx_TraceLine(406,0,__PYX_ERR(2, 406, __pyx_L1_error)) __pyx_r = __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(((struct __pyx_obj_4lxml_5etree__FileReaderContext *)__pyx_v_ctxt), __pyx_v_c_buffer, __pyx_v_c_size); goto __pyx_L0; @@ -112766,11 +105686,7 @@ static int __pyx_f_4lxml_5etree__readFilelikeParser(void *__pyx_v_ctxt, char *__ */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._readFilelikeParser", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); @@ -112788,8 +105704,6 @@ static int __pyx_f_4lxml_5etree__readFilelikeParser(void *__pyx_v_ctxt, char *__ static int __pyx_f_4lxml_5etree__readFileParser(void *__pyx_v_ctxt, char *__pyx_v_c_buffer, int __pyx_v_c_size) { int __pyx_r; - __Pyx_TraceDeclarations - __Pyx_TraceCall("_readFileParser", __pyx_f[2], 408, 1, __PYX_ERR(2, 408, __pyx_L1_error)); /* "src/lxml/parser.pxi":409 * @@ -112798,7 +105712,6 @@ static int __pyx_f_4lxml_5etree__readFileParser(void *__pyx_v_ctxt, char *__pyx_ * * ############################################################ */ - __Pyx_TraceLine(409,1,__PYX_ERR(2, 409, __pyx_L1_error)) __pyx_r = fread(__pyx_v_c_buffer, 1, __pyx_v_c_size, ((FILE *)__pyx_v_ctxt)); goto __pyx_L0; @@ -112811,11 +105724,7 @@ static int __pyx_f_4lxml_5etree__readFileParser(void *__pyx_v_ctxt, char *__pyx_ */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._readFileParser", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); return __pyx_r; } @@ -112838,7 +105747,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ PyObject *__pyx_v_filename = NULL; char *__pyx_v_c_filename; xmlParserInput *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -112855,7 +105763,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_local_resolver", 0); - __Pyx_TraceCall("_local_resolver", __pyx_f[2], 415, 0, __PYX_ERR(2, 415, __pyx_L1_error)); /* "src/lxml/parser.pxi":424 * # passed, check to see if the thread state object has an implied @@ -112864,7 +105771,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * context = <_ResolverContext>c_context._private * else: */ - __Pyx_TraceLine(424,0,__PYX_ERR(2, 424, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_context->_private != NULL) != 0); if (__pyx_t_1) { @@ -112875,7 +105781,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * else: * context = __GLOBAL_PARSER_CONTEXT.findImpliedContext() */ - __Pyx_TraceLine(425,0,__PYX_ERR(2, 425, __pyx_L1_error)) __pyx_t_2 = ((PyObject *)__pyx_v_c_context->_private); __Pyx_INCREF(__pyx_t_2); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ResolverContext *)__pyx_t_2); @@ -112898,7 +105803,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * * if context is None: */ - __Pyx_TraceLine(427,0,__PYX_ERR(2, 427, __pyx_L1_error)) /*else*/ { __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext_findImpliedContext(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -112914,7 +105818,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * if __DEFAULT_ENTITY_LOADER is NULL: * return NULL */ - __Pyx_TraceLine(429,0,__PYX_ERR(2, 429, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_context) == Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { @@ -112926,7 +105829,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * return NULL * with nogil: */ - __Pyx_TraceLine(430,0,__PYX_ERR(2, 430, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_4lxml_5etree___DEFAULT_ENTITY_LOADER == NULL) != 0); if (__pyx_t_3) { @@ -112937,7 +105839,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * with nogil: * # free the GIL as we might do serious I/O here (e.g. HTTP) */ - __Pyx_TraceLine(431,0,__PYX_ERR(2, 431, __pyx_L1_error)) __pyx_r = NULL; goto __pyx_L0; @@ -112957,7 +105858,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * # free the GIL as we might do serious I/O here (e.g. HTTP) * c_input = __DEFAULT_ENTITY_LOADER(c_url, c_pubid, c_context) */ - __Pyx_TraceLine(432,0,__PYX_ERR(2, 432, __pyx_L1_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -112973,7 +105873,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * return c_input * */ - __Pyx_TraceLine(434,1,__PYX_ERR(2, 434, __pyx_L7_error)) __pyx_v_c_input = __pyx_v_4lxml_5etree___DEFAULT_ENTITY_LOADER(__pyx_v_c_url, __pyx_v_c_pubid, __pyx_v_c_context); } @@ -112984,7 +105883,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * # free the GIL as we might do serious I/O here (e.g. HTTP) * c_input = __DEFAULT_ENTITY_LOADER(c_url, c_pubid, c_context) */ - __Pyx_TraceLine(432,1,__PYX_ERR(2, 432, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -112993,13 +105891,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ #endif goto __pyx_L8; } - __pyx_L7_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L1_error; - } __pyx_L8:; } } @@ -113011,7 +105902,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * * try: */ - __Pyx_TraceLine(435,0,__PYX_ERR(2, 435, __pyx_L1_error)) __pyx_r = __pyx_v_c_input; goto __pyx_L0; @@ -113031,7 +105921,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * if c_url is NULL: * url = None */ - __Pyx_TraceLine(437,0,__PYX_ERR(2, 437, __pyx_L9_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -113048,7 +105937,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * url = None * else: */ - __Pyx_TraceLine(438,0,__PYX_ERR(2, 438, __pyx_L9_error)) __pyx_t_3 = ((__pyx_v_c_url == NULL) != 0); if (__pyx_t_3) { @@ -113059,7 +105947,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * else: * # parsing a related document (DTD etc.) => UTF-8 encoded URL? */ - __Pyx_TraceLine(439,0,__PYX_ERR(2, 439, __pyx_L9_error)) __Pyx_INCREF(Py_None); __pyx_v_url = Py_None; @@ -113080,7 +105967,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * if c_pubid is NULL: * pubid = None */ - __Pyx_TraceLine(442,0,__PYX_ERR(2, 442, __pyx_L9_error)) /*else*/ { __pyx_t_2 = __pyx_f_4lxml_5etree__decodeFilename(((const xmlChar *)__pyx_v_c_url)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 442, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_2); @@ -113096,7 +105982,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * pubid = None * else: */ - __Pyx_TraceLine(443,0,__PYX_ERR(2, 443, __pyx_L9_error)) __pyx_t_3 = ((__pyx_v_c_pubid == NULL) != 0); if (__pyx_t_3) { @@ -113107,7 +105992,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * else: * pubid = funicode(c_pubid) # always UTF-8 */ - __Pyx_TraceLine(444,0,__PYX_ERR(2, 444, __pyx_L9_error)) __Pyx_INCREF(Py_None); __pyx_v_pubid = Py_None; @@ -113128,7 +106012,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * * doc_ref = context._resolvers.resolve(url, pubid, context) */ - __Pyx_TraceLine(446,0,__PYX_ERR(2, 446, __pyx_L9_error)) /*else*/ { __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(((const xmlChar *)__pyx_v_c_pubid)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 446, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_2); @@ -113144,7 +106027,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * except: * context._store_raised() */ - __Pyx_TraceLine(448,0,__PYX_ERR(2, 448, __pyx_L9_error)) __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_context->_resolvers), __pyx_n_s_resolve); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 448, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; @@ -113224,7 +106106,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * context._store_raised() * return NULL */ - __Pyx_TraceLine(449,0,__PYX_ERR(2, 449, __pyx_L11_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._local_resolver", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_10) < 0) __PYX_ERR(2, 449, __pyx_L11_except_error) @@ -113239,7 +106120,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * return NULL * */ - __Pyx_TraceLine(450,0,__PYX_ERR(2, 450, __pyx_L11_except_error)) ((struct __pyx_vtabstruct_4lxml_5etree__ResolverContext *)__pyx_v_context->__pyx_base.__pyx_vtab)->__pyx_base._store_raised(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_v_context)); /* "src/lxml/parser.pxi":451 @@ -113249,7 +106129,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * * if doc_ref is not None: */ - __Pyx_TraceLine(451,0,__PYX_ERR(2, 451, __pyx_L11_except_error)) __pyx_r = NULL; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -113286,7 +106165,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * if doc_ref._type == PARSER_DATA_STRING: * data = doc_ref._data_bytes */ - __Pyx_TraceLine(453,0,__PYX_ERR(2, 453, __pyx_L1_error)) __pyx_t_3 = (((PyObject *)__pyx_v_doc_ref) != Py_None); __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { @@ -113298,7 +106176,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * data = doc_ref._data_bytes * filename = doc_ref._filename */ - __Pyx_TraceLine(454,0,__PYX_ERR(2, 454, __pyx_L1_error)) switch (__pyx_v_doc_ref->_type) { case __pyx_e_4lxml_5etree_PARSER_DATA_STRING: @@ -113309,7 +106186,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * filename = doc_ref._filename * if not filename: */ - __Pyx_TraceLine(455,0,__PYX_ERR(2, 455, __pyx_L1_error)) __pyx_t_10 = __pyx_v_doc_ref->_data_bytes; __Pyx_INCREF(__pyx_t_10); __pyx_v_data = __pyx_t_10; @@ -113322,7 +106198,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * if not filename: * filename = None */ - __Pyx_TraceLine(456,0,__PYX_ERR(2, 456, __pyx_L1_error)) __pyx_t_10 = __pyx_v_doc_ref->_filename; __Pyx_INCREF(__pyx_t_10); __pyx_v_filename = __pyx_t_10; @@ -113335,7 +106210,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * filename = None * elif not isinstance(filename, bytes): */ - __Pyx_TraceLine(457,0,__PYX_ERR(2, 457, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 457, __pyx_L1_error) __pyx_t_3 = ((!__pyx_t_1) != 0); if (__pyx_t_3) { @@ -113347,7 +106221,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * elif not isinstance(filename, bytes): * # most likely a text URL */ - __Pyx_TraceLine(458,0,__PYX_ERR(2, 458, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_filename, Py_None); @@ -113368,7 +106241,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * # most likely a text URL * filename = filename.encode('utf8') */ - __Pyx_TraceLine(459,0,__PYX_ERR(2, 459, __pyx_L1_error)) __pyx_t_3 = PyBytes_Check(__pyx_v_filename); __pyx_t_1 = ((!(__pyx_t_3 != 0)) != 0); if (__pyx_t_1) { @@ -113380,14 +106252,25 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * if not isinstance(filename, bytes): * filename = None */ - __Pyx_TraceLine(461,0,__PYX_ERR(2, 461, __pyx_L1_error)) - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_encode); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 461, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__233, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 461, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_encode); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_7); - __pyx_t_7 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_10 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, __pyx_n_s_utf8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_n_s_utf8); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 461, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_10); + __pyx_t_10 = 0; /* "src/lxml/parser.pxi":462 * # most likely a text URL @@ -113396,7 +106279,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * filename = None * */ - __Pyx_TraceLine(462,0,__PYX_ERR(2, 462, __pyx_L1_error)) __pyx_t_1 = PyBytes_Check(__pyx_v_filename); __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_3) { @@ -113408,7 +106290,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * * c_input = xmlparser.xmlNewInputStream(c_context) */ - __Pyx_TraceLine(463,0,__PYX_ERR(2, 463, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_filename, Py_None); @@ -113438,7 +106319,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * if c_input is not NULL: * if filename is not None: */ - __Pyx_TraceLine(465,0,__PYX_ERR(2, 465, __pyx_L1_error)) __pyx_v_c_input = xmlNewInputStream(__pyx_v_c_context); /* "src/lxml/parser.pxi":466 @@ -113448,7 +106328,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * if filename is not None: * c_input.filename = tree.xmlStrdup(_xcstr(filename)) */ - __Pyx_TraceLine(466,0,__PYX_ERR(2, 466, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_input != NULL) != 0); if (__pyx_t_3) { @@ -113459,7 +106338,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * c_input.filename = tree.xmlStrdup(_xcstr(filename)) * c_input.base = _xcstr(data) */ - __Pyx_TraceLine(467,0,__PYX_ERR(2, 467, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_filename != Py_None); __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { @@ -113471,7 +106349,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * c_input.base = _xcstr(data) * c_input.length = python.PyBytes_GET_SIZE(data) */ - __Pyx_TraceLine(468,0,__PYX_ERR(2, 468, __pyx_L1_error)) __pyx_v_c_input->filename = ((char *)xmlStrdup((const xmlChar*)PyBytes_AS_STRING(__pyx_v_filename))); /* "src/lxml/parser.pxi":467 @@ -113490,7 +106367,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * c_input.length = python.PyBytes_GET_SIZE(data) * c_input.cur = c_input.base */ - __Pyx_TraceLine(469,0,__PYX_ERR(2, 469, __pyx_L1_error)) __pyx_v_c_input->base = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_data); /* "src/lxml/parser.pxi":470 @@ -113500,7 +106376,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * c_input.cur = c_input.base * c_input.end = c_input.base + c_input.length */ - __Pyx_TraceLine(470,0,__PYX_ERR(2, 470, __pyx_L1_error)) __pyx_v_c_input->length = PyBytes_GET_SIZE(__pyx_v_data); /* "src/lxml/parser.pxi":471 @@ -113510,7 +106385,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * c_input.end = c_input.base + c_input.length * elif doc_ref._type == PARSER_DATA_FILENAME: */ - __Pyx_TraceLine(471,0,__PYX_ERR(2, 471, __pyx_L1_error)) __pyx_t_11 = __pyx_v_c_input->base; __pyx_v_c_input->cur = __pyx_t_11; @@ -113521,7 +106395,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * elif doc_ref._type == PARSER_DATA_FILENAME: * data = None */ - __Pyx_TraceLine(472,0,__PYX_ERR(2, 472, __pyx_L1_error)) __pyx_v_c_input->end = (__pyx_v_c_input->base + __pyx_v_c_input->length); /* "src/lxml/parser.pxi":466 @@ -113541,15 +106414,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * filename = doc_ref._filename */ break; - - /* "src/lxml/parser.pxi":473 - * c_input.cur = c_input.base - * c_input.end = c_input.base + c_input.length - * elif doc_ref._type == PARSER_DATA_FILENAME: # <<<<<<<<<<<<<< - * data = None - * c_filename = _cstr(doc_ref._filename) - */ - __Pyx_TraceLine(473,0,__PYX_ERR(2, 473, __pyx_L1_error)) case __pyx_e_4lxml_5etree_PARSER_DATA_FILENAME: /* "src/lxml/parser.pxi":474 @@ -113559,7 +106423,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * c_filename = _cstr(doc_ref._filename) * with nogil: */ - __Pyx_TraceLine(474,0,__PYX_ERR(2, 474, __pyx_L1_error)) __Pyx_INCREF(Py_None); __pyx_v_data = Py_None; @@ -113570,11 +106433,10 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * with nogil: * # free the GIL as we might do serious I/O here */ - __Pyx_TraceLine(475,0,__PYX_ERR(2, 475, __pyx_L1_error)) - __pyx_t_7 = __pyx_v_doc_ref->_filename; - __Pyx_INCREF(__pyx_t_7); - __pyx_v_c_filename = PyBytes_AS_STRING(__pyx_t_7); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_10 = __pyx_v_doc_ref->_filename; + __Pyx_INCREF(__pyx_t_10); + __pyx_v_c_filename = PyBytes_AS_STRING(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "src/lxml/parser.pxi":476 * data = None @@ -113583,7 +106445,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * # free the GIL as we might do serious I/O here * c_input = xmlparser.xmlNewInputFromFile( */ - __Pyx_TraceLine(476,0,__PYX_ERR(2, 476, __pyx_L1_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -113599,7 +106460,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * c_context, c_filename) * elif doc_ref._type == PARSER_DATA_FILE: */ - __Pyx_TraceLine(478,1,__PYX_ERR(2, 478, __pyx_L25_error)) __pyx_v_c_input = xmlNewInputFromFile(__pyx_v_c_context, __pyx_v_c_filename); } @@ -113610,7 +106470,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * # free the GIL as we might do serious I/O here * c_input = xmlparser.xmlNewInputFromFile( */ - __Pyx_TraceLine(476,1,__PYX_ERR(2, 476, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -113619,13 +106478,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ #endif goto __pyx_L26; } - __pyx_L25_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L1_error; - } __pyx_L26:; } } @@ -113638,15 +106490,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * c_filename = _cstr(doc_ref._filename) */ break; - - /* "src/lxml/parser.pxi":480 - * c_input = xmlparser.xmlNewInputFromFile( - * c_context, c_filename) - * elif doc_ref._type == PARSER_DATA_FILE: # <<<<<<<<<<<<<< - * file_context = _FileReaderContext(doc_ref._file, context, url, - * None, doc_ref._close_file) - */ - __Pyx_TraceLine(480,0,__PYX_ERR(2, 480, __pyx_L1_error)) case __pyx_e_4lxml_5etree_PARSER_DATA_FILE: /* "src/lxml/parser.pxi":482 @@ -113656,9 +106499,8 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * c_input = file_context._createParserInput(c_context) * data = file_context */ - __Pyx_TraceLine(482,0,__PYX_ERR(2, 482, __pyx_L1_error)) - __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_doc_ref->_close_file); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 482, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_10 = __Pyx_PyBool_FromLong(__pyx_v_doc_ref->_close_file); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 482, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); /* "src/lxml/parser.pxi":481 * c_context, c_filename) @@ -113667,29 +106509,28 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * None, doc_ref._close_file) * c_input = file_context._createParserInput(c_context) */ - __Pyx_TraceLine(481,0,__PYX_ERR(2, 481, __pyx_L1_error)) - __pyx_t_10 = PyTuple_New(5); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 481, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); + __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 481, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_doc_ref->_file); __Pyx_GIVEREF(__pyx_v_doc_ref->_file); - PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_doc_ref->_file); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_doc_ref->_file); __Pyx_INCREF(((PyObject *)__pyx_v_context)); __Pyx_GIVEREF(((PyObject *)__pyx_v_context)); - PyTuple_SET_ITEM(__pyx_t_10, 1, ((PyObject *)__pyx_v_context)); + PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_context)); __Pyx_INCREF(__pyx_v_url); __Pyx_GIVEREF(__pyx_v_url); - PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_url); + PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_url); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - PyTuple_SET_ITEM(__pyx_t_10, 3, Py_None); - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_7); - __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__FileReaderContext), __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 481, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_v_file_context = ((struct __pyx_obj_4lxml_5etree__FileReaderContext *)__pyx_t_7); - __pyx_t_7 = 0; + PyTuple_SET_ITEM(__pyx_t_7, 3, Py_None); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_10); + __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__FileReaderContext), __pyx_t_7, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 481, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_file_context = ((struct __pyx_obj_4lxml_5etree__FileReaderContext *)__pyx_t_10); + __pyx_t_10 = 0; /* "src/lxml/parser.pxi":483 * file_context = _FileReaderContext(doc_ref._file, context, url, @@ -113698,7 +106539,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * data = file_context * else: */ - __Pyx_TraceLine(483,0,__PYX_ERR(2, 483, __pyx_L1_error)) __pyx_v_c_input = __pyx_f_4lxml_5etree_18_FileReaderContext__createParserInput(__pyx_v_file_context, __pyx_v_c_context); /* "src/lxml/parser.pxi":484 @@ -113708,7 +106548,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * else: * data = None */ - __Pyx_TraceLine(484,0,__PYX_ERR(2, 484, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_file_context)); __pyx_v_data = ((PyObject *)__pyx_v_file_context); @@ -113729,7 +106568,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * c_input = NULL * */ - __Pyx_TraceLine(486,0,__PYX_ERR(2, 486, __pyx_L1_error)) __Pyx_INCREF(Py_None); __pyx_v_data = Py_None; @@ -113740,7 +106578,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * * if data is not None: */ - __Pyx_TraceLine(487,0,__PYX_ERR(2, 487, __pyx_L1_error)) __pyx_v_c_input = NULL; break; } @@ -113752,7 +106589,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * context._storage.add(data) * if c_input is not NULL: */ - __Pyx_TraceLine(489,0,__PYX_ERR(2, 489, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_data != Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { @@ -113764,7 +106600,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * if c_input is not NULL: * return c_input */ - __Pyx_TraceLine(490,0,__PYX_ERR(2, 490, __pyx_L1_error)) __pyx_t_9 = __pyx_f_4lxml_5etree_10_TempStore_add(__pyx_v_context->_storage, __pyx_v_data); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(2, 490, __pyx_L1_error) /* "src/lxml/parser.pxi":489 @@ -113783,7 +106618,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * return c_input * */ - __Pyx_TraceLine(491,0,__PYX_ERR(2, 491, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_input != NULL) != 0); if (__pyx_t_3) { @@ -113794,7 +106628,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * * if __DEFAULT_ENTITY_LOADER is NULL: */ - __Pyx_TraceLine(492,0,__PYX_ERR(2, 492, __pyx_L1_error)) __pyx_r = __pyx_v_c_input; goto __pyx_L0; @@ -113823,7 +106656,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * return NULL * */ - __Pyx_TraceLine(494,0,__PYX_ERR(2, 494, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_4lxml_5etree___DEFAULT_ENTITY_LOADER == NULL) != 0); if (__pyx_t_3) { @@ -113834,7 +106666,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * * with nogil: */ - __Pyx_TraceLine(495,0,__PYX_ERR(2, 495, __pyx_L1_error)) __pyx_r = NULL; goto __pyx_L0; @@ -113854,7 +106685,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * # free the GIL as we might do serious I/O here (e.g. HTTP) * c_input = __DEFAULT_ENTITY_LOADER(c_url, c_pubid, c_context) */ - __Pyx_TraceLine(497,0,__PYX_ERR(2, 497, __pyx_L1_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -113870,7 +106700,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * return c_input * */ - __Pyx_TraceLine(499,1,__PYX_ERR(2, 499, __pyx_L31_error)) __pyx_v_c_input = __pyx_v_4lxml_5etree___DEFAULT_ENTITY_LOADER(__pyx_v_c_url, __pyx_v_c_pubid, __pyx_v_c_context); } @@ -113881,7 +106710,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * # free the GIL as we might do serious I/O here (e.g. HTTP) * c_input = __DEFAULT_ENTITY_LOADER(c_url, c_pubid, c_context) */ - __Pyx_TraceLine(497,1,__PYX_ERR(2, 497, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -113890,13 +106718,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ #endif goto __pyx_L32; } - __pyx_L31_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L1_error; - } __pyx_L32:; } } @@ -113908,7 +106729,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ * * cdef xmlparser.xmlExternalEntityLoader __DEFAULT_ENTITY_LOADER */ - __Pyx_TraceLine(500,0,__PYX_ERR(2, 500, __pyx_L1_error)) __pyx_r = __pyx_v_c_input; goto __pyx_L0; @@ -113936,7 +106756,6 @@ static xmlParserInput *__pyx_f_4lxml_5etree__local_resolver(const char *__pyx_v_ __Pyx_XDECREF(__pyx_v_pubid); __Pyx_XDECREF(__pyx_v_data); __Pyx_XDECREF(__pyx_v_filename); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); @@ -113970,12 +106789,10 @@ static int __pyx_pw_4lxml_5etree_14_ParserContext_1__cinit__(PyObject *__pyx_v_s static int __pyx_pf_4lxml_5etree_14_ParserContext___cinit__(struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[2], 521, 0, __PYX_ERR(2, 521, __pyx_L1_error)); /* "src/lxml/parser.pxi":522 * @@ -113984,7 +106801,6 @@ static int __pyx_pf_4lxml_5etree_14_ParserContext___cinit__(struct __pyx_obj_4lx * self._collect_ids = True * if not config.ENABLE_THREADING: */ - __Pyx_TraceLine(522,0,__PYX_ERR(2, 522, __pyx_L1_error)) __pyx_v_self->_c_ctxt = NULL; /* "src/lxml/parser.pxi":523 @@ -113994,7 +106810,6 @@ static int __pyx_pf_4lxml_5etree_14_ParserContext___cinit__(struct __pyx_obj_4lx * if not config.ENABLE_THREADING: * self._lock = NULL */ - __Pyx_TraceLine(523,0,__PYX_ERR(2, 523, __pyx_L1_error)) __pyx_v_self->_collect_ids = 1; /* "src/lxml/parser.pxi":524 @@ -114004,7 +106819,6 @@ static int __pyx_pf_4lxml_5etree_14_ParserContext___cinit__(struct __pyx_obj_4lx * self._lock = NULL * else: */ - __Pyx_TraceLine(524,0,__PYX_ERR(2, 524, __pyx_L1_error)) __pyx_t_1 = ((!(ENABLE_THREADING != 0)) != 0); if (__pyx_t_1) { @@ -114015,7 +106829,6 @@ static int __pyx_pf_4lxml_5etree_14_ParserContext___cinit__(struct __pyx_obj_4lx * else: * self._lock = python.PyThread_allocate_lock() */ - __Pyx_TraceLine(525,0,__PYX_ERR(2, 525, __pyx_L1_error)) __pyx_v_self->_lock = NULL; /* "src/lxml/parser.pxi":524 @@ -114035,7 +106848,6 @@ static int __pyx_pf_4lxml_5etree_14_ParserContext___cinit__(struct __pyx_obj_4lx * self._error_log = _ErrorLog() * */ - __Pyx_TraceLine(527,0,__PYX_ERR(2, 527, __pyx_L1_error)) /*else*/ { __pyx_v_self->_lock = PyThread_allocate_lock(); } @@ -114048,7 +106860,6 @@ static int __pyx_pf_4lxml_5etree_14_ParserContext___cinit__(struct __pyx_obj_4lx * * def __dealloc__(self): */ - __Pyx_TraceLine(528,0,__PYX_ERR(2, 528, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__ErrorLog)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -114073,7 +106884,6 @@ static int __pyx_pf_4lxml_5etree_14_ParserContext___cinit__(struct __pyx_obj_4lx __Pyx_AddTraceback("lxml.etree._ParserContext.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -114098,13 +106908,11 @@ static void __pyx_pw_4lxml_5etree_14_ParserContext_3__dealloc__(PyObject *__pyx_ } static void __pyx_pf_4lxml_5etree_14_ParserContext_2__dealloc__(struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_v_self) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("__dealloc__", 0); - __Pyx_TraceCall("__dealloc__", __pyx_f[2], 530, 0, __PYX_ERR(2, 530, __pyx_L1_error)); /* "src/lxml/parser.pxi":531 * @@ -114113,7 +106921,6 @@ static void __pyx_pf_4lxml_5etree_14_ParserContext_2__dealloc__(struct __pyx_obj * python.PyThread_free_lock(self._lock) * self._lock = NULL */ - __Pyx_TraceLine(531,0,__PYX_ERR(2, 531, __pyx_L1_error)) __pyx_t_2 = (ENABLE_THREADING != 0); if (__pyx_t_2) { } else { @@ -114132,7 +106939,6 @@ static void __pyx_pf_4lxml_5etree_14_ParserContext_2__dealloc__(struct __pyx_obj * self._lock = NULL * if self._c_ctxt is not NULL: */ - __Pyx_TraceLine(532,0,__PYX_ERR(2, 532, __pyx_L1_error)) PyThread_free_lock(__pyx_v_self->_lock); /* "src/lxml/parser.pxi":533 @@ -114142,7 +106948,6 @@ static void __pyx_pf_4lxml_5etree_14_ParserContext_2__dealloc__(struct __pyx_obj * if self._c_ctxt is not NULL: * if self._validator is not NULL and self._validator is not None: */ - __Pyx_TraceLine(533,0,__PYX_ERR(2, 533, __pyx_L1_error)) __pyx_v_self->_lock = NULL; /* "src/lxml/parser.pxi":531 @@ -114161,7 +106966,6 @@ static void __pyx_pf_4lxml_5etree_14_ParserContext_2__dealloc__(struct __pyx_obj * if self._validator is not NULL and self._validator is not None: * # If the parser was not closed correctly (e.g. interrupted iterparse()), */ - __Pyx_TraceLine(534,0,__PYX_ERR(2, 534, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_c_ctxt != NULL) != 0); if (__pyx_t_1) { @@ -114172,7 +106976,6 @@ static void __pyx_pf_4lxml_5etree_14_ParserContext_2__dealloc__(struct __pyx_obj * # If the parser was not closed correctly (e.g. interrupted iterparse()), * # and the schema validator wasn't freed and cleaned up yet, the libxml2 SAX */ - __Pyx_TraceLine(535,0,__PYX_ERR(2, 535, __pyx_L1_error)) __pyx_t_2 = ((((void *)__pyx_v_self->_validator) != NULL) != 0); if (__pyx_t_2) { } else { @@ -114192,7 +106995,6 @@ static void __pyx_pf_4lxml_5etree_14_ParserContext_2__dealloc__(struct __pyx_obj * xmlparser.xmlFreeParserCtxt(self._c_ctxt) * */ - __Pyx_TraceLine(541,0,__PYX_ERR(2, 541, __pyx_L1_error)) __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_disconnect(__pyx_v_self->_validator); /* "src/lxml/parser.pxi":535 @@ -114211,7 +107013,6 @@ static void __pyx_pf_4lxml_5etree_14_ParserContext_2__dealloc__(struct __pyx_obj * * cdef _ParserContext _copy(self): */ - __Pyx_TraceLine(542,0,__PYX_ERR(2, 542, __pyx_L1_error)) xmlFreeParserCtxt(__pyx_v_self->_c_ctxt); /* "src/lxml/parser.pxi":534 @@ -114232,11 +107033,6 @@ static void __pyx_pf_4lxml_5etree_14_ParserContext_2__dealloc__(struct __pyx_obj */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._ParserContext.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -114251,14 +107047,12 @@ static void __pyx_pf_4lxml_5etree_14_ParserContext_2__dealloc__(struct __pyx_obj static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_14_ParserContext__copy(struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_v_self) { struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_v_context = 0; struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("_copy", 0); - __Pyx_TraceCall("_copy", __pyx_f[2], 544, 0, __PYX_ERR(2, 544, __pyx_L1_error)); /* "src/lxml/parser.pxi":546 * cdef _ParserContext _copy(self): @@ -114267,7 +107061,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_14_Par * context._collect_ids = self._collect_ids * context._validator = self._validator.copy() */ - __Pyx_TraceLine(546,0,__PYX_ERR(2, 546, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; @@ -114280,12 +107073,9 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_14_Par __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 546, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 546, __pyx_L1_error) - } + __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(2, 546, __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__ParserContext))))) __PYX_ERR(2, 546, __pyx_L1_error) @@ -114299,7 +107089,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_14_Par * context._validator = self._validator.copy() * _initParserContext(context, self._resolvers._copy(), NULL) */ - __Pyx_TraceLine(547,0,__PYX_ERR(2, 547, __pyx_L1_error)) __pyx_t_4 = __pyx_v_self->_collect_ids; __pyx_v_context->_collect_ids = __pyx_t_4; @@ -114310,7 +107099,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_14_Par * _initParserContext(context, self._resolvers._copy(), NULL) * return context */ - __Pyx_TraceLine(548,0,__PYX_ERR(2, 548, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_copy(__pyx_v_self->_validator)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -114326,7 +107114,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_14_Par * return context * */ - __Pyx_TraceLine(549,0,__PYX_ERR(2, 549, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_17_ResolverRegistry__copy(__pyx_v_self->__pyx_base._resolvers)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_f_4lxml_5etree__initParserContext(__pyx_v_context, ((struct __pyx_obj_4lxml_5etree__ResolverRegistry *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 549, __pyx_L1_error) @@ -114341,7 +107128,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_14_Par * * cdef void _initParserContext(self, xmlparser.xmlParserCtxt* c_ctxt): */ - __Pyx_TraceLine(550,0,__PYX_ERR(2, 550, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_context)); __pyx_r = __pyx_v_context; @@ -114365,7 +107151,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_14_Par __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -114379,10 +107164,8 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_14_Par */ static void __pyx_f_4lxml_5etree_14_ParserContext__initParserContext(struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_v_self, xmlParserCtxt *__pyx_v_c_ctxt) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_initParserContext", 0); - __Pyx_TraceCall("_initParserContext", __pyx_f[2], 552, 0, __PYX_ERR(2, 552, __pyx_L1_error)); /* "src/lxml/parser.pxi":553 * @@ -114391,7 +107174,6 @@ static void __pyx_f_4lxml_5etree_14_ParserContext__initParserContext(struct __py * c_ctxt._private = self * */ - __Pyx_TraceLine(553,0,__PYX_ERR(2, 553, __pyx_L1_error)) __pyx_v_self->_c_ctxt = __pyx_v_c_ctxt; /* "src/lxml/parser.pxi":554 @@ -114401,7 +107183,6 @@ static void __pyx_f_4lxml_5etree_14_ParserContext__initParserContext(struct __py * * cdef void _resetParserContext(self): */ - __Pyx_TraceLine(554,0,__PYX_ERR(2, 554, __pyx_L1_error)) __pyx_v_c_ctxt->_private = ((void *)__pyx_v_self); /* "src/lxml/parser.pxi":552 @@ -114413,11 +107194,6 @@ static void __pyx_f_4lxml_5etree_14_ParserContext__initParserContext(struct __py */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._ParserContext._initParserContext", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -114430,11 +107206,9 @@ static void __pyx_f_4lxml_5etree_14_ParserContext__initParserContext(struct __py */ static void __pyx_f_4lxml_5etree_14_ParserContext__resetParserContext(struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_v_self) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_resetParserContext", 0); - __Pyx_TraceCall("_resetParserContext", __pyx_f[2], 556, 0, __PYX_ERR(2, 556, __pyx_L1_error)); /* "src/lxml/parser.pxi":557 * @@ -114443,7 +107217,6 @@ static void __pyx_f_4lxml_5etree_14_ParserContext__resetParserContext(struct __p * if self._c_ctxt.html: * htmlparser.htmlCtxtReset(self._c_ctxt) */ - __Pyx_TraceLine(557,0,__PYX_ERR(2, 557, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_c_ctxt != NULL) != 0); if (__pyx_t_1) { @@ -114454,7 +107227,6 @@ static void __pyx_f_4lxml_5etree_14_ParserContext__resetParserContext(struct __p * htmlparser.htmlCtxtReset(self._c_ctxt) * self._c_ctxt.disableSAX = 0 # work around bug in libxml2 */ - __Pyx_TraceLine(558,0,__PYX_ERR(2, 558, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_c_ctxt->html != 0); if (__pyx_t_1) { @@ -114465,7 +107237,6 @@ static void __pyx_f_4lxml_5etree_14_ParserContext__resetParserContext(struct __p * self._c_ctxt.disableSAX = 0 # work around bug in libxml2 * else: */ - __Pyx_TraceLine(559,0,__PYX_ERR(2, 559, __pyx_L1_error)) htmlCtxtReset(__pyx_v_self->_c_ctxt); /* "src/lxml/parser.pxi":560 @@ -114475,7 +107246,6 @@ static void __pyx_f_4lxml_5etree_14_ParserContext__resetParserContext(struct __p * else: * xmlparser.xmlClearParserCtxt(self._c_ctxt) */ - __Pyx_TraceLine(560,0,__PYX_ERR(2, 560, __pyx_L1_error)) __pyx_v_self->_c_ctxt->disableSAX = 0; /* "src/lxml/parser.pxi":558 @@ -114495,7 +107265,6 @@ static void __pyx_f_4lxml_5etree_14_ParserContext__resetParserContext(struct __p * * cdef int prepare(self) except -1: */ - __Pyx_TraceLine(562,0,__PYX_ERR(2, 562, __pyx_L1_error)) /*else*/ { xmlClearParserCtxt(__pyx_v_self->_c_ctxt); } @@ -114519,11 +107288,6 @@ static void __pyx_f_4lxml_5etree_14_ParserContext__resetParserContext(struct __p */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._ParserContext._resetParserContext", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -114538,14 +107302,12 @@ static void __pyx_f_4lxml_5etree_14_ParserContext__resetParserContext(struct __p static int __pyx_f_4lxml_5etree_14_ParserContext_prepare(struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_v_self) { int __pyx_v_result; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("prepare", 0); - __Pyx_TraceCall("prepare", __pyx_f[2], 564, 0, __PYX_ERR(2, 564, __pyx_L1_error)); /* "src/lxml/parser.pxi":566 * cdef int prepare(self) except -1: @@ -114554,7 +107316,6 @@ static int __pyx_f_4lxml_5etree_14_ParserContext_prepare(struct __pyx_obj_4lxml_ * with nogil: * result = python.PyThread_acquire_lock( */ - __Pyx_TraceLine(566,0,__PYX_ERR(2, 566, __pyx_L1_error)) __pyx_t_2 = (ENABLE_THREADING != 0); if (__pyx_t_2) { } else { @@ -114573,7 +107334,6 @@ static int __pyx_f_4lxml_5etree_14_ParserContext_prepare(struct __pyx_obj_4lxml_ * result = python.PyThread_acquire_lock( * self._lock, python.WAIT_LOCK) */ - __Pyx_TraceLine(567,0,__PYX_ERR(2, 567, __pyx_L1_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -114589,7 +107349,6 @@ static int __pyx_f_4lxml_5etree_14_ParserContext_prepare(struct __pyx_obj_4lxml_ * self._lock, python.WAIT_LOCK) * if result == 0: */ - __Pyx_TraceLine(568,1,__PYX_ERR(2, 568, __pyx_L7_error)) __pyx_v_result = PyThread_acquire_lock(__pyx_v_self->_lock, WAIT_LOCK); } @@ -114600,7 +107359,6 @@ static int __pyx_f_4lxml_5etree_14_ParserContext_prepare(struct __pyx_obj_4lxml_ * result = python.PyThread_acquire_lock( * self._lock, python.WAIT_LOCK) */ - __Pyx_TraceLine(567,1,__PYX_ERR(2, 567, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -114609,13 +107367,6 @@ static int __pyx_f_4lxml_5etree_14_ParserContext_prepare(struct __pyx_obj_4lxml_ #endif goto __pyx_L8; } - __pyx_L7_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L1_error; - } __pyx_L8:; } } @@ -114627,7 +107378,6 @@ static int __pyx_f_4lxml_5etree_14_ParserContext_prepare(struct __pyx_obj_4lxml_ * raise ParserError, u"parser locking failed" * self._error_log.clear() */ - __Pyx_TraceLine(570,0,__PYX_ERR(2, 570, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_result == 0) != 0); if (unlikely(__pyx_t_1)) { @@ -114638,7 +107388,6 @@ static int __pyx_f_4lxml_5etree_14_ParserContext_prepare(struct __pyx_obj_4lxml_ * self._error_log.clear() * self._doc = None */ - __Pyx_TraceLine(571,0,__PYX_ERR(2, 571, __pyx_L1_error)) __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_ParserError), __pyx_kp_u_parser_locking_failed, 0, 0); __PYX_ERR(2, 571, __pyx_L1_error) @@ -114667,7 +107416,6 @@ static int __pyx_f_4lxml_5etree_14_ParserContext_prepare(struct __pyx_obj_4lxml_ * self._doc = None * self._c_ctxt.sax.serror = _receiveParserError */ - __Pyx_TraceLine(572,0,__PYX_ERR(2, 572, __pyx_L1_error)) __pyx_t_3 = ((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_3)) __PYX_ERR(2, 572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -114679,7 +107427,6 @@ static int __pyx_f_4lxml_5etree_14_ParserContext_prepare(struct __pyx_obj_4lxml_ * self._c_ctxt.sax.serror = _receiveParserError * if self._validator is not None: */ - __Pyx_TraceLine(573,0,__PYX_ERR(2, 573, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_doc); @@ -114693,7 +107440,6 @@ static int __pyx_f_4lxml_5etree_14_ParserContext_prepare(struct __pyx_obj_4lxml_ * if self._validator is not None: * self._validator.connect(self._c_ctxt, self._error_log) */ - __Pyx_TraceLine(574,0,__PYX_ERR(2, 574, __pyx_L1_error)) __pyx_v_self->_c_ctxt->sax->serror = __pyx_f_4lxml_5etree__receiveParserError; /* "src/lxml/parser.pxi":575 @@ -114703,7 +107449,6 @@ static int __pyx_f_4lxml_5etree_14_ParserContext_prepare(struct __pyx_obj_4lxml_ * self._validator.connect(self._c_ctxt, self._error_log) * return 0 */ - __Pyx_TraceLine(575,0,__PYX_ERR(2, 575, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_self->_validator) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -114715,7 +107460,6 @@ static int __pyx_f_4lxml_5etree_14_ParserContext_prepare(struct __pyx_obj_4lxml_ * return 0 * */ - __Pyx_TraceLine(576,0,__PYX_ERR(2, 576, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_v_self->_error_log); __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_connect(__pyx_v_self->_validator, __pyx_v_self->_c_ctxt, ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_t_3)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 576, __pyx_L1_error) @@ -114737,7 +107481,6 @@ static int __pyx_f_4lxml_5etree_14_ParserContext_prepare(struct __pyx_obj_4lxml_ * * cdef int cleanup(self) except -1: */ - __Pyx_TraceLine(577,0,__PYX_ERR(2, 577, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -114755,7 +107498,6 @@ static int __pyx_f_4lxml_5etree_14_ParserContext_prepare(struct __pyx_obj_4lxml_ __Pyx_AddTraceback("lxml.etree._ParserContext.prepare", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -114770,13 +107512,11 @@ static int __pyx_f_4lxml_5etree_14_ParserContext_prepare(struct __pyx_obj_4lxml_ static int __pyx_f_4lxml_5etree_14_ParserContext_cleanup(struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("cleanup", 0); - __Pyx_TraceCall("cleanup", __pyx_f[2], 579, 0, __PYX_ERR(2, 579, __pyx_L1_error)); /* "src/lxml/parser.pxi":580 * @@ -114785,7 +107525,6 @@ static int __pyx_f_4lxml_5etree_14_ParserContext_cleanup(struct __pyx_obj_4lxml_ * self._validator.disconnect() * self._resetParserContext() */ - __Pyx_TraceLine(580,0,__PYX_ERR(2, 580, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_self->_validator) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -114797,7 +107536,6 @@ static int __pyx_f_4lxml_5etree_14_ParserContext_cleanup(struct __pyx_obj_4lxml_ * self._resetParserContext() * self.clear() */ - __Pyx_TraceLine(581,0,__PYX_ERR(2, 581, __pyx_L1_error)) __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_disconnect(__pyx_v_self->_validator); /* "src/lxml/parser.pxi":580 @@ -114816,7 +107554,6 @@ static int __pyx_f_4lxml_5etree_14_ParserContext_cleanup(struct __pyx_obj_4lxml_ * self.clear() * self._doc = None */ - __Pyx_TraceLine(582,0,__PYX_ERR(2, 582, __pyx_L1_error)) ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_resetParserContext(__pyx_v_self); /* "src/lxml/parser.pxi":583 @@ -114826,7 +107563,6 @@ static int __pyx_f_4lxml_5etree_14_ParserContext_cleanup(struct __pyx_obj_4lxml_ * self._doc = None * self._c_ctxt.sax.serror = NULL */ - __Pyx_TraceLine(583,0,__PYX_ERR(2, 583, __pyx_L1_error)) __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.clear(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_v_self)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 583, __pyx_L1_error) /* "src/lxml/parser.pxi":584 @@ -114836,7 +107572,6 @@ static int __pyx_f_4lxml_5etree_14_ParserContext_cleanup(struct __pyx_obj_4lxml_ * self._c_ctxt.sax.serror = NULL * if config.ENABLE_THREADING and self._lock is not NULL: */ - __Pyx_TraceLine(584,0,__PYX_ERR(2, 584, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_doc); @@ -114850,7 +107585,6 @@ static int __pyx_f_4lxml_5etree_14_ParserContext_cleanup(struct __pyx_obj_4lxml_ * if config.ENABLE_THREADING and self._lock is not NULL: * python.PyThread_release_lock(self._lock) */ - __Pyx_TraceLine(585,0,__PYX_ERR(2, 585, __pyx_L1_error)) __pyx_v_self->_c_ctxt->sax->serror = NULL; /* "src/lxml/parser.pxi":586 @@ -114860,7 +107594,6 @@ static int __pyx_f_4lxml_5etree_14_ParserContext_cleanup(struct __pyx_obj_4lxml_ * python.PyThread_release_lock(self._lock) * return 0 */ - __Pyx_TraceLine(586,0,__PYX_ERR(2, 586, __pyx_L1_error)) __pyx_t_1 = (ENABLE_THREADING != 0); if (__pyx_t_1) { } else { @@ -114879,7 +107612,6 @@ static int __pyx_f_4lxml_5etree_14_ParserContext_cleanup(struct __pyx_obj_4lxml_ * return 0 * */ - __Pyx_TraceLine(587,0,__PYX_ERR(2, 587, __pyx_L1_error)) PyThread_release_lock(__pyx_v_self->_lock); /* "src/lxml/parser.pxi":586 @@ -114898,7 +107630,6 @@ static int __pyx_f_4lxml_5etree_14_ParserContext_cleanup(struct __pyx_obj_4lxml_ * * cdef object _handleParseResult(self, _BaseParser parser, */ - __Pyx_TraceLine(588,0,__PYX_ERR(2, 588, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -114915,7 +107646,6 @@ static int __pyx_f_4lxml_5etree_14_ParserContext_cleanup(struct __pyx_obj_4lxml_ __Pyx_AddTraceback("lxml.etree._ParserContext.cleanup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -114931,7 +107661,6 @@ static int __pyx_f_4lxml_5etree_14_ParserContext_cleanup(struct __pyx_obj_4lxml_ static PyObject *__pyx_f_4lxml_5etree_14_ParserContext__handleParseResult(struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_v_self, struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_parser, xmlDoc *__pyx_v_result, PyObject *__pyx_v_filename) { xmlDoc *__pyx_v_c_doc; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlDoc *__pyx_t_1; int __pyx_t_2; @@ -114939,7 +107668,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ParserContext__handleParseResult(struct int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_handleParseResult", 0); - __Pyx_TraceCall("_handleParseResult", __pyx_f[2], 590, 0, __PYX_ERR(2, 590, __pyx_L1_error)); /* "src/lxml/parser.pxi":592 * cdef object _handleParseResult(self, _BaseParser parser, @@ -114948,7 +107676,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ParserContext__handleParseResult(struct * if self._doc is not None and self._doc._c_doc is c_doc: * return self._doc */ - __Pyx_TraceLine(592,0,__PYX_ERR(2, 592, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_handleParseResultDoc(__pyx_v_self, __pyx_v_parser, __pyx_v_result, __pyx_v_filename); if (unlikely(__pyx_t_1 == ((xmlDoc *)NULL))) __PYX_ERR(2, 592, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_1; @@ -114959,7 +107686,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ParserContext__handleParseResult(struct * return self._doc * else: */ - __Pyx_TraceLine(593,0,__PYX_ERR(2, 593, __pyx_L1_error)) __pyx_t_3 = (((PyObject *)__pyx_v_self->_doc) != Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { @@ -114979,7 +107705,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ParserContext__handleParseResult(struct * else: * return _documentFactory(c_doc, parser) */ - __Pyx_TraceLine(594,0,__PYX_ERR(2, 594, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->_doc)); __pyx_r = ((PyObject *)__pyx_v_self->_doc); @@ -115001,7 +107726,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ParserContext__handleParseResult(struct * * cdef xmlDoc* _handleParseResultDoc(self, _BaseParser parser, */ - __Pyx_TraceLine(596,0,__PYX_ERR(2, 596, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, __pyx_v_parser)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 596, __pyx_L1_error) @@ -115026,7 +107750,6 @@ static PyObject *__pyx_f_4lxml_5etree_14_ParserContext__handleParseResult(struct __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -115042,12 +107765,10 @@ static PyObject *__pyx_f_4lxml_5etree_14_ParserContext__handleParseResult(struct static xmlDoc *__pyx_f_4lxml_5etree_14_ParserContext__handleParseResultDoc(struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_v_self, struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_parser, xmlDoc *__pyx_v_result, PyObject *__pyx_v_filename) { int __pyx_v_recover; xmlDoc *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlDoc *__pyx_t_2; __Pyx_RefNannySetupContext("_handleParseResultDoc", 0); - __Pyx_TraceCall("_handleParseResultDoc", __pyx_f[2], 598, 0, __PYX_ERR(2, 598, __pyx_L1_error)); /* "src/lxml/parser.pxi":600 * cdef xmlDoc* _handleParseResultDoc(self, _BaseParser parser, @@ -115056,7 +107777,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_14_ParserContext__handleParseResultDoc(struc * return _handleParseResult(self, self._c_ctxt, result, * filename, recover, */ - __Pyx_TraceLine(600,0,__PYX_ERR(2, 600, __pyx_L1_error)) __pyx_v_recover = (__pyx_v_parser->_parse_options & XML_PARSE_RECOVER); /* "src/lxml/parser.pxi":603 @@ -115066,7 +107786,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_14_ParserContext__handleParseResultDoc(struc * * cdef _initParserContext(_ParserContext context, */ - __Pyx_TraceLine(603,0,__PYX_ERR(2, 603, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_self->_doc) == Py_None); /* "src/lxml/parser.pxi":601 @@ -115076,7 +107795,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_14_ParserContext__handleParseResultDoc(struc * filename, recover, * free_doc=self._doc is None) */ - __Pyx_TraceLine(601,0,__PYX_ERR(2, 601, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__handleParseResult(__pyx_v_self, __pyx_v_self->_c_ctxt, __pyx_v_result, __pyx_v_filename, __pyx_v_recover, __pyx_t_1); if (unlikely(__pyx_t_2 == ((xmlDoc *)NULL))) __PYX_ERR(2, 601, __pyx_L1_error) __pyx_r = __pyx_t_2; goto __pyx_L0; @@ -115094,7 +107812,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_14_ParserContext__handleParseResultDoc(struc __Pyx_AddTraceback("lxml.etree._ParserContext._handleParseResultDoc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -115109,12 +107826,10 @@ static xmlDoc *__pyx_f_4lxml_5etree_14_ParserContext__handleParseResultDoc(struc static PyObject *__pyx_f_4lxml_5etree__initParserContext(struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_v_context, struct __pyx_obj_4lxml_5etree__ResolverRegistry *__pyx_v_resolvers, xmlParserCtxt *__pyx_v_c_ctxt) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("_initParserContext", 0); - __Pyx_TraceCall("_initParserContext", __pyx_f[2], 605, 0, __PYX_ERR(2, 605, __pyx_L1_error)); /* "src/lxml/parser.pxi":608 * _ResolverRegistry resolvers, @@ -115123,7 +107838,6 @@ static PyObject *__pyx_f_4lxml_5etree__initParserContext(struct __pyx_obj_4lxml_ * if c_ctxt is not NULL: * context._initParserContext(c_ctxt) */ - __Pyx_TraceLine(608,0,__PYX_ERR(2, 608, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__initResolverContext(((struct __pyx_obj_4lxml_5etree__ResolverContext *)__pyx_v_context), __pyx_v_resolvers); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -115135,7 +107849,6 @@ static PyObject *__pyx_f_4lxml_5etree__initParserContext(struct __pyx_obj_4lxml_ * context._initParserContext(c_ctxt) * */ - __Pyx_TraceLine(609,0,__PYX_ERR(2, 609, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_ctxt != NULL) != 0); if (__pyx_t_2) { @@ -115146,7 +107859,6 @@ static PyObject *__pyx_f_4lxml_5etree__initParserContext(struct __pyx_obj_4lxml_ * * cdef void _forwardParserError(xmlparser.xmlParserCtxt* _parser_context, xmlerror.xmlError* error) with gil: */ - __Pyx_TraceLine(610,0,__PYX_ERR(2, 610, __pyx_L1_error)) ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->_initParserContext(__pyx_v_context, __pyx_v_c_ctxt); /* "src/lxml/parser.pxi":609 @@ -115175,7 +107887,6 @@ static PyObject *__pyx_f_4lxml_5etree__initParserContext(struct __pyx_obj_4lxml_ __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -115189,13 +107900,11 @@ static PyObject *__pyx_f_4lxml_5etree__initParserContext(struct __pyx_obj_4lxml_ */ static void __pyx_f_4lxml_5etree__forwardParserError(xmlParserCtxt *__pyx_v__parser_context, xmlError *__pyx_v_error) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_forwardParserError", 0); - __Pyx_TraceCall("_forwardParserError", __pyx_f[2], 612, 0, __PYX_ERR(2, 612, __pyx_L1_error)); /* "src/lxml/parser.pxi":613 * @@ -115204,7 +107913,6 @@ static void __pyx_f_4lxml_5etree__forwardParserError(xmlParserCtxt *__pyx_v__par * * cdef void _receiveParserError(void* c_context, xmlerror.xmlError* error) nogil: */ - __Pyx_TraceLine(613,0,__PYX_ERR(2, 613, __pyx_L1_error)) __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_v__parser_context->_private)->_error_log), __pyx_v_error); /* "src/lxml/parser.pxi":612 @@ -115216,11 +107924,6 @@ static void __pyx_f_4lxml_5etree__forwardParserError(xmlParserCtxt *__pyx_v__par */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._forwardParserError", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); @@ -115236,10 +107939,8 @@ static void __pyx_f_4lxml_5etree__forwardParserError(xmlParserCtxt *__pyx_v__par */ static void __pyx_f_4lxml_5etree__receiveParserError(void *__pyx_v_c_context, xmlError *__pyx_v_error) { - __Pyx_TraceDeclarations int __pyx_t_1; int __pyx_t_2; - __Pyx_TraceCall("_receiveParserError", __pyx_f[2], 615, 1, __PYX_ERR(2, 615, __pyx_L1_error)); /* "src/lxml/parser.pxi":617 * cdef void _receiveParserError(void* c_context, xmlerror.xmlError* error) nogil: @@ -115248,7 +107949,6 @@ static void __pyx_f_4lxml_5etree__receiveParserError(void *__pyx_v_c_context, xm * _forwardError(NULL, error) * else: */ - __Pyx_TraceLine(617,1,__PYX_ERR(2, 617, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_context == NULL) != 0); if (!__pyx_t_2) { } else { @@ -115267,7 +107967,6 @@ static void __pyx_f_4lxml_5etree__receiveParserError(void *__pyx_v_c_context, xm * else: * _forwardParserError(c_context, error) */ - __Pyx_TraceLine(618,1,__PYX_ERR(2, 618, __pyx_L1_error)) __pyx_f_4lxml_5etree__forwardError(NULL, __pyx_v_error); /* "src/lxml/parser.pxi":617 @@ -115287,7 +107986,6 @@ static void __pyx_f_4lxml_5etree__receiveParserError(void *__pyx_v_c_context, xm * * cdef int _raiseParseError(xmlparser.xmlParserCtxt* ctxt, filename, */ - __Pyx_TraceLine(620,1,__PYX_ERR(2, 620, __pyx_L1_error)) /*else*/ { __pyx_f_4lxml_5etree__forwardParserError(((xmlParserCtxt *)__pyx_v_c_context), __pyx_v_error); } @@ -115302,11 +108000,6 @@ static void __pyx_f_4lxml_5etree__receiveParserError(void *__pyx_v_c_context, xm */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._receiveParserError", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); } /* "src/lxml/parser.pxi":622 @@ -115323,7 +108016,6 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py int __pyx_v_line; int __pyx_v_column; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -115344,7 +108036,6 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; __Pyx_RefNannySetupContext("_raiseParseError", 0); - __Pyx_TraceCall("_raiseParseError", __pyx_f[2], 622, 0, __PYX_ERR(2, 622, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_filename); /* "src/lxml/parser.pxi":624 @@ -115354,7 +108045,6 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py * ctxt.lastError.domain == xmlerror.XML_FROM_IO: * if isinstance(filename, bytes): */ - __Pyx_TraceLine(624,0,__PYX_ERR(2, 624, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_filename != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -115370,7 +108060,6 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py * if isinstance(filename, bytes): * filename = _decodeFilenameWithLength( */ - __Pyx_TraceLine(625,0,__PYX_ERR(2, 625, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_ctxt->lastError.domain == XML_FROM_IO) != 0); __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; @@ -115382,7 +108071,6 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py * ctxt.lastError.domain == xmlerror.XML_FROM_IO: * if isinstance(filename, bytes): */ - __Pyx_TraceLine(624,0,__PYX_ERR(2, 624, __pyx_L1_error)) if (__pyx_t_1) { /* "src/lxml/parser.pxi":626 @@ -115392,7 +108080,6 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py * filename = _decodeFilenameWithLength( * filename, len(filename)) */ - __Pyx_TraceLine(626,0,__PYX_ERR(2, 626, __pyx_L1_error)) __pyx_t_1 = PyBytes_Check(__pyx_v_filename); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { @@ -115404,7 +108091,6 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py * if ctxt.lastError.message is not NULL: * try: */ - __Pyx_TraceLine(628,0,__PYX_ERR(2, 628, __pyx_L1_error)) if (unlikely(__pyx_v_filename == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); __PYX_ERR(2, 628, __pyx_L1_error) @@ -115423,7 +108109,6 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py * filename, len(filename)) * if ctxt.lastError.message is not NULL: */ - __Pyx_TraceLine(627,0,__PYX_ERR(2, 627, __pyx_L1_error)) __pyx_t_6 = __pyx_f_4lxml_5etree__decodeFilenameWithLength(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_6); @@ -115443,9 +108128,8 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py * filename, len(filename)) * if ctxt.lastError.message is not NULL: # <<<<<<<<<<<<<< * try: - * message = (ctxt.lastError.message).decode('utf-8') + * message = ctxt.lastError.message.decode('utf-8') */ - __Pyx_TraceLine(629,0,__PYX_ERR(2, 629, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_ctxt->lastError.message != NULL) != 0); if (__pyx_t_3) { @@ -115453,10 +108137,9 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py * filename, len(filename)) * if ctxt.lastError.message is not NULL: * try: # <<<<<<<<<<<<<< - * message = (ctxt.lastError.message).decode('utf-8') + * message = ctxt.lastError.message.decode('utf-8') * except UnicodeDecodeError: */ - __Pyx_TraceLine(630,0,__PYX_ERR(2, 630, __pyx_L8_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -115469,11 +108152,10 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py /* "src/lxml/parser.pxi":631 * if ctxt.lastError.message is not NULL: * try: - * message = (ctxt.lastError.message).decode('utf-8') # <<<<<<<<<<<<<< + * message = ctxt.lastError.message.decode('utf-8') # <<<<<<<<<<<<<< * except UnicodeDecodeError: * # the filename may be in there => play it safe */ - __Pyx_TraceLine(631,0,__PYX_ERR(2, 631, __pyx_L8_error)) __pyx_t_10 = __pyx_v_ctxt->lastError.message; __pyx_t_6 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 631, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); @@ -115485,7 +108167,7 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py * filename, len(filename)) * if ctxt.lastError.message is not NULL: * try: # <<<<<<<<<<<<<< - * message = (ctxt.lastError.message).decode('utf-8') + * message = ctxt.lastError.message.decode('utf-8') * except UnicodeDecodeError: */ } @@ -115498,12 +108180,11 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py /* "src/lxml/parser.pxi":632 * try: - * message = (ctxt.lastError.message).decode('utf-8') + * message = ctxt.lastError.message.decode('utf-8') * except UnicodeDecodeError: # <<<<<<<<<<<<<< * # the filename may be in there => play it safe - * message = (ctxt.lastError.message).decode('iso8859-1') + * message = ctxt.lastError.message.decode('iso8859-1') */ - __Pyx_TraceLine(632,0,__PYX_ERR(2, 632, __pyx_L10_except_error)) __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); if (__pyx_t_11) { __Pyx_AddTraceback("lxml.etree._raiseParseError", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -115515,20 +108196,19 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py /* "src/lxml/parser.pxi":634 * except UnicodeDecodeError: * # the filename may be in there => play it safe - * message = (ctxt.lastError.message).decode('iso8859-1') # <<<<<<<<<<<<<< + * message = ctxt.lastError.message.decode('iso8859-1') # <<<<<<<<<<<<<< * message = f"Error reading file '{filename}': {message.strip()}" * else: */ - __Pyx_TraceLine(634,0,__PYX_ERR(2, 634, __pyx_L10_except_error)) __pyx_t_10 = __pyx_v_ctxt->lastError.message; __pyx_t_14 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 634, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_INCREF(__pyx_t_14); __Pyx_XDECREF_SET(__pyx_v_message, __pyx_t_14); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L9_exception_handled; } goto __pyx_L10_except_error; @@ -115538,7 +108218,7 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py * filename, len(filename)) * if ctxt.lastError.message is not NULL: * try: # <<<<<<<<<<<<<< - * message = (ctxt.lastError.message).decode('utf-8') + * message = ctxt.lastError.message.decode('utf-8') * except UnicodeDecodeError: */ __Pyx_XGIVEREF(__pyx_t_7); @@ -115556,12 +108236,11 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py /* "src/lxml/parser.pxi":635 * # the filename may be in there => play it safe - * message = (ctxt.lastError.message).decode('iso8859-1') + * message = ctxt.lastError.message.decode('iso8859-1') * message = f"Error reading file '{filename}': {message.strip()}" # <<<<<<<<<<<<<< * else: * message = f"Error reading '{filename}'" */ - __Pyx_TraceLine(635,0,__PYX_ERR(2, 635, __pyx_L1_error)) __pyx_t_13 = PyTuple_New(4); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_5 = 0; @@ -115577,10 +108256,10 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_12); __pyx_t_12 = 0; - __Pyx_INCREF(__pyx_kp_u__234); + __Pyx_INCREF(__pyx_kp_u__52); __pyx_t_5 += 3; - __Pyx_GIVEREF(__pyx_kp_u__234); - PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_kp_u__234); + __Pyx_GIVEREF(__pyx_kp_u__52); + PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_kp_u__52); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_message, __pyx_n_s_strip); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_14 = NULL; @@ -115593,12 +108272,9 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (__pyx_t_14) { - __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 635, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - } else { - __pyx_t_12 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 635, __pyx_L1_error) - } + __pyx_t_12 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_12, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 635, __pyx_L1_error) @@ -115620,7 +108296,7 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py * filename, len(filename)) * if ctxt.lastError.message is not NULL: # <<<<<<<<<<<<<< * try: - * message = (ctxt.lastError.message).decode('utf-8') + * message = ctxt.lastError.message.decode('utf-8') */ goto __pyx_L7; } @@ -115632,7 +108308,6 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py * raise IOError, message * elif error_log: */ - __Pyx_TraceLine(637,0,__PYX_ERR(2, 637, __pyx_L1_error)) /*else*/ { __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); @@ -115649,10 +108324,10 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_13); __pyx_t_13 = 0; - __Pyx_INCREF(__pyx_kp_u__60); + __Pyx_INCREF(__pyx_kp_u__21); __pyx_t_5 += 1; - __Pyx_GIVEREF(__pyx_kp_u__60); - PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u__60); + __Pyx_GIVEREF(__pyx_kp_u__21); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u__21); __pyx_t_13 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_5, __pyx_t_15); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -115668,7 +108343,6 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py * elif error_log: * raise error_log._buildParseException( */ - __Pyx_TraceLine(638,0,__PYX_ERR(2, 638, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_IOError, __pyx_v_message, 0, 0); __PYX_ERR(2, 638, __pyx_L1_error) @@ -115688,7 +108362,6 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py * raise error_log._buildParseException( * XMLSyntaxError, u"Document is not well formed") */ - __Pyx_TraceLine(639,0,__PYX_ERR(2, 639, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_error_log)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 639, __pyx_L1_error) if (unlikely(__pyx_t_3)) { @@ -115697,10 +108370,9 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py * raise error_log._buildParseException( * XMLSyntaxError, u"Document is not well formed") # <<<<<<<<<<<<<< * elif ctxt.lastError.message is not NULL: - * message = (ctxt.lastError.message).strip() + * message = ctxt.lastError.message.strip() */ - __Pyx_TraceLine(641,0,__PYX_ERR(2, 641, __pyx_L1_error)) - __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_XMLSyntaxError); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 641, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_XMLSyntaxError); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); /* "src/lxml/parser.pxi":640 @@ -115710,7 +108382,6 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py * XMLSyntaxError, u"Document is not well formed") * elif ctxt.lastError.message is not NULL: */ - __Pyx_TraceLine(640,0,__PYX_ERR(2, 640, __pyx_L1_error)) __pyx_t_6 = __pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_error_log), __pyx_t_13, __pyx_kp_u_Document_is_not_well_formed); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; @@ -115731,21 +108402,19 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py * raise error_log._buildParseException( * XMLSyntaxError, u"Document is not well formed") * elif ctxt.lastError.message is not NULL: # <<<<<<<<<<<<<< - * message = (ctxt.lastError.message).strip() + * message = ctxt.lastError.message.strip() * code = ctxt.lastError.code */ - __Pyx_TraceLine(642,0,__PYX_ERR(2, 642, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_ctxt->lastError.message != NULL) != 0); if (likely(__pyx_t_3)) { /* "src/lxml/parser.pxi":643 * XMLSyntaxError, u"Document is not well formed") * elif ctxt.lastError.message is not NULL: - * message = (ctxt.lastError.message).strip() # <<<<<<<<<<<<<< + * message = ctxt.lastError.message.strip() # <<<<<<<<<<<<<< * code = ctxt.lastError.code * line = ctxt.lastError.line */ - __Pyx_TraceLine(643,0,__PYX_ERR(2, 643, __pyx_L1_error)) __pyx_t_13 = __Pyx_PyBytes_FromString(__pyx_v_ctxt->lastError.message); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_strip); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 643, __pyx_L1_error) @@ -115761,12 +108430,9 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py __Pyx_DECREF_SET(__pyx_t_12, function); } } - if (__pyx_t_13) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 643, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - } else { - __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 643, __pyx_L1_error) - } + __pyx_t_6 = (__pyx_t_13) ? __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_13) : __Pyx_PyObject_CallNoArg(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_v_message = __pyx_t_6; @@ -115774,23 +108440,21 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py /* "src/lxml/parser.pxi":644 * elif ctxt.lastError.message is not NULL: - * message = (ctxt.lastError.message).strip() + * message = ctxt.lastError.message.strip() * code = ctxt.lastError.code # <<<<<<<<<<<<<< * line = ctxt.lastError.line * column = ctxt.lastError.int2 */ - __Pyx_TraceLine(644,0,__PYX_ERR(2, 644, __pyx_L1_error)) __pyx_t_11 = __pyx_v_ctxt->lastError.code; __pyx_v_code = __pyx_t_11; /* "src/lxml/parser.pxi":645 - * message = (ctxt.lastError.message).strip() + * message = ctxt.lastError.message.strip() * code = ctxt.lastError.code * line = ctxt.lastError.line # <<<<<<<<<<<<<< * column = ctxt.lastError.int2 * if ctxt.lastError.line > 0: */ - __Pyx_TraceLine(645,0,__PYX_ERR(2, 645, __pyx_L1_error)) __pyx_t_11 = __pyx_v_ctxt->lastError.line; __pyx_v_line = __pyx_t_11; @@ -115801,7 +108465,6 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py * if ctxt.lastError.line > 0: * message = f"line {line}: {message}" */ - __Pyx_TraceLine(646,0,__PYX_ERR(2, 646, __pyx_L1_error)) __pyx_t_11 = __pyx_v_ctxt->lastError.int2; __pyx_v_column = __pyx_t_11; @@ -115812,7 +108475,6 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py * message = f"line {line}: {message}" * raise XMLSyntaxError(message, code, line, column, filename) */ - __Pyx_TraceLine(647,0,__PYX_ERR(2, 647, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_ctxt->lastError.line > 0) != 0); if (__pyx_t_3) { @@ -115823,7 +108485,6 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py * raise XMLSyntaxError(message, code, line, column, filename) * else: */ - __Pyx_TraceLine(648,0,__PYX_ERR(2, 648, __pyx_L1_error)) __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = 0; @@ -115838,10 +108499,10 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_12); __pyx_t_12 = 0; - __Pyx_INCREF(__pyx_kp_u__33); + __Pyx_INCREF(__pyx_kp_u__17); __pyx_t_5 += 2; - __Pyx_GIVEREF(__pyx_kp_u__33); - PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u__33); + __Pyx_GIVEREF(__pyx_kp_u__17); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u__17); __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_message, __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_15; @@ -115871,8 +108532,7 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py * else: * raise XMLSyntaxError(None, xmlerror.XML_ERR_INTERNAL_ERROR, 0, 0, */ - __Pyx_TraceLine(649,0,__PYX_ERR(2, 649, __pyx_L1_error)) - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_XMLSyntaxError); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 649, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_XMLSyntaxError); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_code); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); @@ -115948,7 +108608,7 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py * raise error_log._buildParseException( * XMLSyntaxError, u"Document is not well formed") * elif ctxt.lastError.message is not NULL: # <<<<<<<<<<<<<< - * message = (ctxt.lastError.message).strip() + * message = ctxt.lastError.message.strip() * code = ctxt.lastError.code */ } @@ -115960,9 +108620,8 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py * filename) * */ - __Pyx_TraceLine(651,0,__PYX_ERR(2, 651, __pyx_L1_error)) /*else*/ { - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_XMLSyntaxError); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 651, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_XMLSyntaxError); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_18 = __Pyx_PyInt_From_xmlParserErrors(XML_ERR_INTERNAL_ERROR); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); @@ -115974,7 +108633,6 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py * * cdef xmlDoc* _handleParseResult(_ParserContext context, */ - __Pyx_TraceLine(652,0,__PYX_ERR(2, 652, __pyx_L1_error)) __pyx_t_16 = NULL; __pyx_t_11 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { @@ -116057,7 +108715,6 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py __pyx_r = 0; __Pyx_XDECREF(__pyx_v_message); __Pyx_XDECREF(__pyx_v_filename); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -116074,7 +108731,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e int __pyx_v_well_formed; PyObject *__pyx_v_error = NULL; xmlDoc *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -116088,7 +108744,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e PyObject *__pyx_t_10 = NULL; int __pyx_t_11; __Pyx_RefNannySetupContext("_handleParseResult", 0); - __Pyx_TraceCall("_handleParseResult", __pyx_f[2], 654, 0, __PYX_ERR(2, 654, __pyx_L1_error)); /* "src/lxml/parser.pxi":659 * bint recover, bint free_doc) except NULL: @@ -116097,7 +108752,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * __GLOBAL_PARSER_CONTEXT.initDocDict(result) * */ - __Pyx_TraceLine(659,0,__PYX_ERR(2, 659, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_result != NULL) != 0); if (__pyx_t_1) { @@ -116108,7 +108762,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * * if c_ctxt.myDoc is not NULL: */ - __Pyx_TraceLine(660,0,__PYX_ERR(2, 660, __pyx_L1_error)) __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initDocDict(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, __pyx_v_result); /* "src/lxml/parser.pxi":659 @@ -116127,7 +108780,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * if c_ctxt.myDoc is not result: * __GLOBAL_PARSER_CONTEXT.initDocDict(c_ctxt.myDoc) */ - __Pyx_TraceLine(662,0,__PYX_ERR(2, 662, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_ctxt->myDoc != NULL) != 0); if (__pyx_t_1) { @@ -116138,7 +108790,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * __GLOBAL_PARSER_CONTEXT.initDocDict(c_ctxt.myDoc) * tree.xmlFreeDoc(c_ctxt.myDoc) */ - __Pyx_TraceLine(663,0,__PYX_ERR(2, 663, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_ctxt->myDoc != __pyx_v_result) != 0); if (__pyx_t_1) { @@ -116149,7 +108800,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * tree.xmlFreeDoc(c_ctxt.myDoc) * c_ctxt.myDoc = NULL */ - __Pyx_TraceLine(664,0,__PYX_ERR(2, 664, __pyx_L1_error)) __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initDocDict(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, __pyx_v_c_ctxt->myDoc); /* "src/lxml/parser.pxi":665 @@ -116159,7 +108809,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * c_ctxt.myDoc = NULL * */ - __Pyx_TraceLine(665,0,__PYX_ERR(2, 665, __pyx_L1_error)) xmlFreeDoc(__pyx_v_c_ctxt->myDoc); /* "src/lxml/parser.pxi":663 @@ -116178,7 +108827,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * * if result is not NULL: */ - __Pyx_TraceLine(666,0,__PYX_ERR(2, 666, __pyx_L1_error)) __pyx_v_c_ctxt->myDoc = NULL; /* "src/lxml/parser.pxi":662 @@ -116197,7 +108845,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * if (context._validator is not None and * not context._validator.isvalid()): */ - __Pyx_TraceLine(668,0,__PYX_ERR(2, 668, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_result != NULL) != 0); if (__pyx_t_1) { @@ -116208,7 +108855,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * not context._validator.isvalid()): * well_formed = 0 # actually not 'valid', but anyway ... */ - __Pyx_TraceLine(669,0,__PYX_ERR(2, 669, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)__pyx_v_context->_validator) != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -116224,7 +108870,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * well_formed = 0 # actually not 'valid', but anyway ... * elif (not c_ctxt.wellFormed and not c_ctxt.html and */ - __Pyx_TraceLine(670,0,__PYX_ERR(2, 670, __pyx_L1_error)) __pyx_t_3 = ((!(__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_isvalid(__pyx_v_context->_validator) != 0)) != 0); __pyx_t_1 = __pyx_t_3; __pyx_L8_bool_binop_done:; @@ -116236,7 +108881,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * not context._validator.isvalid()): * well_formed = 0 # actually not 'valid', but anyway ... */ - __Pyx_TraceLine(669,0,__PYX_ERR(2, 669, __pyx_L1_error)) if (__pyx_t_1) { /* "src/lxml/parser.pxi":671 @@ -116246,7 +108890,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * elif (not c_ctxt.wellFormed and not c_ctxt.html and * c_ctxt.charset == tree.XML_CHAR_ENCODING_8859_1 and */ - __Pyx_TraceLine(671,0,__PYX_ERR(2, 671, __pyx_L1_error)) __pyx_v_well_formed = 0; /* "src/lxml/parser.pxi":669 @@ -116266,7 +108909,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * c_ctxt.charset == tree.XML_CHAR_ENCODING_8859_1 and * [1 for error in context._error_log */ - __Pyx_TraceLine(672,0,__PYX_ERR(2, 672, __pyx_L1_error)) __pyx_t_3 = ((!(__pyx_v_c_ctxt->wellFormed != 0)) != 0); if (__pyx_t_3) { } else { @@ -116287,7 +108929,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * [1 for error in context._error_log * if error.type == ErrorTypes.ERR_INVALID_CHAR]): */ - __Pyx_TraceLine(673,0,__PYX_ERR(2, 673, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_ctxt->charset == XML_CHAR_ENCODING_8859_1) != 0); if (__pyx_t_3) { } else { @@ -116302,7 +108943,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * if error.type == ErrorTypes.ERR_INVALID_CHAR]): * # An encoding error occurred and libxml2 switched from UTF-8 */ - __Pyx_TraceLine(674,0,__PYX_ERR(2, 674, __pyx_L1_error)) __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(((PyObject *)__pyx_v_context->_error_log))) || PyTuple_CheckExact(((PyObject *)__pyx_v_context->_error_log))) { @@ -116354,10 +108994,9 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * # An encoding error occurred and libxml2 switched from UTF-8 * # input to (undecoded) Latin-1, at some arbitrary point in the */ - __Pyx_TraceLine(675,0,__PYX_ERR(2, 675, __pyx_L1_error)) __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_error, __pyx_n_s_type); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_ErrorTypes); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 675, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_ErrorTypes); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_ERR_INVALID_CHAR); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); @@ -116378,7 +109017,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * if error.type == ErrorTypes.ERR_INVALID_CHAR]): * # An encoding error occurred and libxml2 switched from UTF-8 */ - __Pyx_TraceLine(674,0,__PYX_ERR(2, 674, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (PyList_GET_SIZE(__pyx_t_4) != 0); @@ -116393,7 +109031,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * c_ctxt.charset == tree.XML_CHAR_ENCODING_8859_1 and * [1 for error in context._error_log */ - __Pyx_TraceLine(672,0,__PYX_ERR(2, 672, __pyx_L1_error)) if (__pyx_t_1) { /* "src/lxml/parser.pxi":680 @@ -116403,7 +109040,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * elif recover or (c_ctxt.wellFormed and * c_ctxt.lastError.level < xmlerror.XML_ERR_ERROR): */ - __Pyx_TraceLine(680,0,__PYX_ERR(2, 680, __pyx_L1_error)) __pyx_v_well_formed = 0; /* "src/lxml/parser.pxi":672 @@ -116423,7 +109059,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * c_ctxt.lastError.level < xmlerror.XML_ERR_ERROR): * well_formed = 1 */ - __Pyx_TraceLine(681,0,__PYX_ERR(2, 681, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_recover != 0); if (!__pyx_t_3) { } else { @@ -116444,7 +109079,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * well_formed = 1 * elif not c_ctxt.replaceEntities and not c_ctxt.validate \ */ - __Pyx_TraceLine(682,0,__PYX_ERR(2, 682, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_ctxt->lastError.level < XML_ERR_ERROR) != 0); __pyx_t_1 = __pyx_t_3; __pyx_L17_bool_binop_done:; @@ -116456,7 +109090,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * c_ctxt.lastError.level < xmlerror.XML_ERR_ERROR): * well_formed = 1 */ - __Pyx_TraceLine(681,0,__PYX_ERR(2, 681, __pyx_L1_error)) if (__pyx_t_1) { /* "src/lxml/parser.pxi":683 @@ -116466,7 +109099,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * elif not c_ctxt.replaceEntities and not c_ctxt.validate \ * and context is not None: */ - __Pyx_TraceLine(683,0,__PYX_ERR(2, 683, __pyx_L1_error)) __pyx_v_well_formed = 1; /* "src/lxml/parser.pxi":681 @@ -116486,7 +109118,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * and context is not None: * # in this mode, we ignore errors about undefined entities */ - __Pyx_TraceLine(684,0,__PYX_ERR(2, 684, __pyx_L1_error)) __pyx_t_3 = ((!(__pyx_v_c_ctxt->replaceEntities != 0)) != 0); if (__pyx_t_3) { } else { @@ -116501,7 +109132,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * # in this mode, we ignore errors about undefined entities * for error in context._error_log.filter_from_errors(): */ - __Pyx_TraceLine(685,0,__PYX_ERR(2, 685, __pyx_L1_error)) __pyx_t_3 = ((!(__pyx_v_c_ctxt->validate != 0)) != 0); if (__pyx_t_3) { } else { @@ -116520,7 +109150,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * and context is not None: * # in this mode, we ignore errors about undefined entities */ - __Pyx_TraceLine(684,0,__PYX_ERR(2, 684, __pyx_L1_error)) if (__pyx_t_1) { /* "src/lxml/parser.pxi":687 @@ -116530,7 +109159,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * if error.type != ErrorTypes.WAR_UNDECLARED_ENTITY and \ * error.type != ErrorTypes.ERR_UNDECLARED_ENTITY: */ - __Pyx_TraceLine(687,0,__PYX_ERR(2, 687, __pyx_L1_error)) __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_context->_error_log), __pyx_n_s_filter_from_errors); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = NULL; @@ -116543,12 +109171,9 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (__pyx_t_9) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 687, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 687, __pyx_L1_error) - } + __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { @@ -116601,10 +109226,9 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * error.type != ErrorTypes.ERR_UNDECLARED_ENTITY: * well_formed = 0 */ - __Pyx_TraceLine(688,0,__PYX_ERR(2, 688, __pyx_L1_error)) __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_error, __pyx_n_s_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_ErrorTypes); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 688, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_ErrorTypes); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_WAR_UNDECLARED_ENTITY); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); @@ -116627,10 +109251,9 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * well_formed = 0 * break */ - __Pyx_TraceLine(689,0,__PYX_ERR(2, 689, __pyx_L1_error)) __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_error, __pyx_n_s_type); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_ErrorTypes); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 689, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_ErrorTypes); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_ERR_UNDECLARED_ENTITY); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -116650,7 +109273,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * error.type != ErrorTypes.ERR_UNDECLARED_ENTITY: * well_formed = 0 */ - __Pyx_TraceLine(688,0,__PYX_ERR(2, 688, __pyx_L1_error)) if (__pyx_t_1) { /* "src/lxml/parser.pxi":690 @@ -116660,7 +109282,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * break * else: */ - __Pyx_TraceLine(690,0,__PYX_ERR(2, 690, __pyx_L1_error)) __pyx_v_well_formed = 0; /* "src/lxml/parser.pxi":691 @@ -116670,7 +109291,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * else: * well_formed = 1 */ - __Pyx_TraceLine(691,0,__PYX_ERR(2, 691, __pyx_L1_error)) goto __pyx_L24_break; /* "src/lxml/parser.pxi":688 @@ -116689,7 +109309,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * if error.type != ErrorTypes.WAR_UNDECLARED_ENTITY and \ * error.type != ErrorTypes.ERR_UNDECLARED_ENTITY: */ - __Pyx_TraceLine(687,0,__PYX_ERR(2, 687, __pyx_L1_error)) } /*else*/ { @@ -116700,7 +109319,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * else: * well_formed = 0 */ - __Pyx_TraceLine(693,0,__PYX_ERR(2, 693, __pyx_L1_error)) __pyx_v_well_formed = 1; } @@ -116711,7 +109329,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * if error.type != ErrorTypes.WAR_UNDECLARED_ENTITY and \ * error.type != ErrorTypes.ERR_UNDECLARED_ENTITY: */ - __Pyx_TraceLine(687,0,__PYX_ERR(2, 687, __pyx_L1_error)) __pyx_L24_break:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -116732,7 +109349,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * * if not well_formed: */ - __Pyx_TraceLine(695,0,__PYX_ERR(2, 695, __pyx_L1_error)) /*else*/ { __pyx_v_well_formed = 0; } @@ -116745,7 +109361,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * if free_doc: * tree.xmlFreeDoc(result) */ - __Pyx_TraceLine(697,0,__PYX_ERR(2, 697, __pyx_L1_error)) __pyx_t_1 = ((!(__pyx_v_well_formed != 0)) != 0); if (__pyx_t_1) { @@ -116756,7 +109371,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * tree.xmlFreeDoc(result) * result = NULL */ - __Pyx_TraceLine(698,0,__PYX_ERR(2, 698, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_free_doc != 0); if (__pyx_t_1) { @@ -116767,7 +109381,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * result = NULL * */ - __Pyx_TraceLine(699,0,__PYX_ERR(2, 699, __pyx_L1_error)) xmlFreeDoc(__pyx_v_result); /* "src/lxml/parser.pxi":698 @@ -116786,7 +109399,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * * if context is not None and context._has_raised(): */ - __Pyx_TraceLine(700,0,__PYX_ERR(2, 700, __pyx_L1_error)) __pyx_v_result = NULL; /* "src/lxml/parser.pxi":697 @@ -116814,7 +109426,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * if result is not NULL: * if free_doc: */ - __Pyx_TraceLine(702,0,__PYX_ERR(2, 702, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)__pyx_v_context) != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -116835,7 +109446,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * if free_doc: * tree.xmlFreeDoc(result) */ - __Pyx_TraceLine(703,0,__PYX_ERR(2, 703, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_result != NULL) != 0); if (__pyx_t_1) { @@ -116846,7 +109456,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * tree.xmlFreeDoc(result) * result = NULL */ - __Pyx_TraceLine(704,0,__PYX_ERR(2, 704, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_free_doc != 0); if (__pyx_t_1) { @@ -116857,7 +109466,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * result = NULL * context._raise_if_stored() */ - __Pyx_TraceLine(705,0,__PYX_ERR(2, 705, __pyx_L1_error)) xmlFreeDoc(__pyx_v_result); /* "src/lxml/parser.pxi":704 @@ -116876,7 +109484,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * context._raise_if_stored() * */ - __Pyx_TraceLine(706,0,__PYX_ERR(2, 706, __pyx_L1_error)) __pyx_v_result = NULL; /* "src/lxml/parser.pxi":703 @@ -116895,7 +109502,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * * if result is NULL: */ - __Pyx_TraceLine(707,0,__PYX_ERR(2, 707, __pyx_L1_error)) __pyx_t_11 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._raise_if_stored(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_v_context)); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 707, __pyx_L1_error) /* "src/lxml/parser.pxi":702 @@ -116914,7 +109520,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * if context is not None: * _raiseParseError(c_ctxt, filename, context._error_log) */ - __Pyx_TraceLine(709,0,__PYX_ERR(2, 709, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_result == NULL) != 0); if (__pyx_t_1) { @@ -116925,7 +109530,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * _raiseParseError(c_ctxt, filename, context._error_log) * else: */ - __Pyx_TraceLine(710,0,__PYX_ERR(2, 710, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_context) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -116937,7 +109541,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * else: * _raiseParseError(c_ctxt, filename, None) */ - __Pyx_TraceLine(711,0,__PYX_ERR(2, 711, __pyx_L1_error)) __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) @@ -116960,7 +109563,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * else: * if result.URL is NULL and filename is not None: */ - __Pyx_TraceLine(713,0,__PYX_ERR(2, 713, __pyx_L1_error)) /*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) } @@ -116983,7 +109585,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * result.URL = tree.xmlStrdup(_xcstr(filename)) * if result.encoding is NULL: */ - __Pyx_TraceLine(715,0,__PYX_ERR(2, 715, __pyx_L1_error)) /*else*/ { __pyx_t_1 = ((__pyx_v_result->URL == NULL) != 0); if (__pyx_t_1) { @@ -117004,7 +109605,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * if result.encoding is NULL: * result.encoding = tree.xmlStrdup("UTF-8") */ - __Pyx_TraceLine(716,0,__PYX_ERR(2, 716, __pyx_L1_error)) __pyx_v_result->URL = xmlStrdup((const xmlChar*)PyBytes_AS_STRING(__pyx_v_filename)); /* "src/lxml/parser.pxi":715 @@ -117023,7 +109623,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * result.encoding = tree.xmlStrdup("UTF-8") * */ - __Pyx_TraceLine(717,0,__PYX_ERR(2, 717, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_result->encoding == NULL) != 0); if (__pyx_t_2) { @@ -117034,7 +109633,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * * if context._validator is not None and \ */ - __Pyx_TraceLine(718,0,__PYX_ERR(2, 718, __pyx_L1_error)) __pyx_v_result->encoding = xmlStrdup(((unsigned char *)((unsigned char *)((char const *)"UTF-8")))); /* "src/lxml/parser.pxi":717 @@ -117055,7 +109653,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * context._validator._add_default_attributes: * # we currently need to do this here as libxml2 does not */ - __Pyx_TraceLine(720,0,__PYX_ERR(2, 720, __pyx_L1_error)) __pyx_t_3 = (((PyObject *)__pyx_v_context->_validator) != Py_None); __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { @@ -117071,7 +109668,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * # we currently need to do this here as libxml2 does not * # support inserting default attributes during parse-time */ - __Pyx_TraceLine(721,0,__PYX_ERR(2, 721, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_context->_validator->_add_default_attributes != 0); __pyx_t_2 = __pyx_t_1; __pyx_L43_bool_binop_done:; @@ -117083,7 +109679,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * context._validator._add_default_attributes: * # we currently need to do this here as libxml2 does not */ - __Pyx_TraceLine(720,0,__PYX_ERR(2, 720, __pyx_L1_error)) if (__pyx_t_2) { /* "src/lxml/parser.pxi":725 @@ -117093,7 +109688,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * * return result */ - __Pyx_TraceLine(725,0,__PYX_ERR(2, 725, __pyx_L1_error)) __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_inject_default_attributes(__pyx_v_context->_validator, __pyx_v_result); /* "src/lxml/parser.pxi":720 @@ -117112,7 +109706,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * * cdef int _fixHtmlDictNames(tree.xmlDict* c_dict, xmlDoc* c_doc) nogil: */ - __Pyx_TraceLine(727,0,__PYX_ERR(2, 727, __pyx_L1_error)) __pyx_r = __pyx_v_result; goto __pyx_L0; @@ -117135,7 +109728,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_error); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -117151,10 +109743,8 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e static int __pyx_f_4lxml_5etree__fixHtmlDictNames(xmlDict *__pyx_v_c_dict, xmlDoc *__pyx_v_c_doc) { xmlNode *__pyx_v_c_node; int __pyx_r; - __Pyx_TraceDeclarations int __pyx_t_1; xmlNode *__pyx_t_2; - __Pyx_TraceCall("_fixHtmlDictNames", __pyx_f[2], 729, 1, __PYX_ERR(2, 729, __pyx_L1_error)); /* "src/lxml/parser.pxi":731 * cdef int _fixHtmlDictNames(tree.xmlDict* c_dict, xmlDoc* c_doc) nogil: @@ -117163,7 +109753,6 @@ static int __pyx_f_4lxml_5etree__fixHtmlDictNames(xmlDict *__pyx_v_c_dict, xmlDo * return 0 * c_node = c_doc.children */ - __Pyx_TraceLine(731,1,__PYX_ERR(2, 731, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_doc == NULL) != 0); if (__pyx_t_1) { @@ -117174,7 +109763,6 @@ static int __pyx_f_4lxml_5etree__fixHtmlDictNames(xmlDict *__pyx_v_c_dict, xmlDo * c_node = c_doc.children * tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_doc, c_node, 1) */ - __Pyx_TraceLine(732,1,__PYX_ERR(2, 732, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -117194,7 +109782,6 @@ static int __pyx_f_4lxml_5etree__fixHtmlDictNames(xmlDict *__pyx_v_c_dict, xmlDo * tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_doc, c_node, 1) * if c_node.type == tree.XML_ELEMENT_NODE: */ - __Pyx_TraceLine(733,1,__PYX_ERR(2, 733, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_doc->children; __pyx_v_c_node = __pyx_t_2; @@ -117205,7 +109792,6 @@ static int __pyx_f_4lxml_5etree__fixHtmlDictNames(xmlDict *__pyx_v_c_dict, xmlDo * if c_node.type == tree.XML_ELEMENT_NODE: * if _fixHtmlDictNodeNames(c_dict, c_node) < 0: */ - __Pyx_TraceLine(734,1,__PYX_ERR(2, 734, __pyx_L1_error)) BEGIN_FOR_EACH_ELEMENT_FROM(((xmlNode *)__pyx_v_c_doc), __pyx_v_c_node, 1); /* "src/lxml/parser.pxi":735 @@ -117215,7 +109801,6 @@ static int __pyx_f_4lxml_5etree__fixHtmlDictNames(xmlDict *__pyx_v_c_dict, xmlDo * if _fixHtmlDictNodeNames(c_dict, c_node) < 0: * return -1 */ - __Pyx_TraceLine(735,1,__PYX_ERR(2, 735, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0); if (__pyx_t_1) { @@ -117226,7 +109811,6 @@ static int __pyx_f_4lxml_5etree__fixHtmlDictNames(xmlDict *__pyx_v_c_dict, xmlDo * return -1 * tree.END_FOR_EACH_ELEMENT_FROM(c_node) */ - __Pyx_TraceLine(736,1,__PYX_ERR(2, 736, __pyx_L1_error)) __pyx_t_1 = ((__pyx_f_4lxml_5etree__fixHtmlDictNodeNames(__pyx_v_c_dict, __pyx_v_c_node) < 0) != 0); if (__pyx_t_1) { @@ -117237,7 +109821,6 @@ static int __pyx_f_4lxml_5etree__fixHtmlDictNames(xmlDict *__pyx_v_c_dict, xmlDo * tree.END_FOR_EACH_ELEMENT_FROM(c_node) * return 0 */ - __Pyx_TraceLine(737,1,__PYX_ERR(2, 737, __pyx_L1_error)) __pyx_r = -1; goto __pyx_L0; @@ -117266,7 +109849,6 @@ static int __pyx_f_4lxml_5etree__fixHtmlDictNames(xmlDict *__pyx_v_c_dict, xmlDo * return 0 * */ - __Pyx_TraceLine(738,1,__PYX_ERR(2, 738, __pyx_L1_error)) END_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node); /* "src/lxml/parser.pxi":739 @@ -117276,7 +109858,6 @@ static int __pyx_f_4lxml_5etree__fixHtmlDictNames(xmlDict *__pyx_v_c_dict, xmlDo * * cdef int _fixHtmlDictSubtreeNames(tree.xmlDict* c_dict, xmlDoc* c_doc, */ - __Pyx_TraceLine(739,1,__PYX_ERR(2, 739, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -117289,11 +109870,7 @@ static int __pyx_f_4lxml_5etree__fixHtmlDictNames(xmlDict *__pyx_v_c_dict, xmlDo */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._fixHtmlDictNames", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); return __pyx_r; } @@ -117308,9 +109885,7 @@ static int __pyx_f_4lxml_5etree__fixHtmlDictNames(xmlDict *__pyx_v_c_dict, xmlDo static int __pyx_f_4lxml_5etree__fixHtmlDictSubtreeNames(xmlDict *__pyx_v_c_dict, xmlDoc *__pyx_v_c_doc, xmlNode *__pyx_v_c_start_node) { xmlNode *__pyx_v_c_node; int __pyx_r; - __Pyx_TraceDeclarations int __pyx_t_1; - __Pyx_TraceCall("_fixHtmlDictSubtreeNames", __pyx_f[2], 741, 1, __PYX_ERR(2, 741, __pyx_L1_error)); /* "src/lxml/parser.pxi":748 * """ @@ -117319,7 +109894,6 @@ static int __pyx_f_4lxml_5etree__fixHtmlDictSubtreeNames(xmlDict *__pyx_v_c_dict * return 0 * if not c_start_node: */ - __Pyx_TraceLine(748,1,__PYX_ERR(2, 748, __pyx_L1_error)) __pyx_t_1 = ((!(__pyx_v_c_doc != 0)) != 0); if (__pyx_t_1) { @@ -117330,7 +109904,6 @@ static int __pyx_f_4lxml_5etree__fixHtmlDictSubtreeNames(xmlDict *__pyx_v_c_dict * if not c_start_node: * return _fixHtmlDictNames(c_dict, c_doc) */ - __Pyx_TraceLine(749,1,__PYX_ERR(2, 749, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -117350,7 +109923,6 @@ static int __pyx_f_4lxml_5etree__fixHtmlDictSubtreeNames(xmlDict *__pyx_v_c_dict * return _fixHtmlDictNames(c_dict, c_doc) * c_node = c_start_node */ - __Pyx_TraceLine(750,1,__PYX_ERR(2, 750, __pyx_L1_error)) __pyx_t_1 = ((!(__pyx_v_c_start_node != 0)) != 0); if (__pyx_t_1) { @@ -117361,7 +109933,6 @@ static int __pyx_f_4lxml_5etree__fixHtmlDictSubtreeNames(xmlDict *__pyx_v_c_dict * c_node = c_start_node * tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_doc, c_node, 1) */ - __Pyx_TraceLine(751,1,__PYX_ERR(2, 751, __pyx_L1_error)) __pyx_r = __pyx_f_4lxml_5etree__fixHtmlDictNames(__pyx_v_c_dict, __pyx_v_c_doc); goto __pyx_L0; @@ -117381,7 +109952,6 @@ static int __pyx_f_4lxml_5etree__fixHtmlDictSubtreeNames(xmlDict *__pyx_v_c_dict * tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_doc, c_node, 1) * if c_node.type == tree.XML_ELEMENT_NODE: */ - __Pyx_TraceLine(752,1,__PYX_ERR(2, 752, __pyx_L1_error)) __pyx_v_c_node = __pyx_v_c_start_node; /* "src/lxml/parser.pxi":753 @@ -117391,7 +109961,6 @@ static int __pyx_f_4lxml_5etree__fixHtmlDictSubtreeNames(xmlDict *__pyx_v_c_dict * if c_node.type == tree.XML_ELEMENT_NODE: * if _fixHtmlDictNodeNames(c_dict, c_node) < 0: */ - __Pyx_TraceLine(753,1,__PYX_ERR(2, 753, __pyx_L1_error)) BEGIN_FOR_EACH_ELEMENT_FROM(((xmlNode *)__pyx_v_c_doc), __pyx_v_c_node, 1); /* "src/lxml/parser.pxi":754 @@ -117401,7 +109970,6 @@ static int __pyx_f_4lxml_5etree__fixHtmlDictSubtreeNames(xmlDict *__pyx_v_c_dict * if _fixHtmlDictNodeNames(c_dict, c_node) < 0: * return -1 */ - __Pyx_TraceLine(754,1,__PYX_ERR(2, 754, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0); if (__pyx_t_1) { @@ -117412,7 +109980,6 @@ static int __pyx_f_4lxml_5etree__fixHtmlDictSubtreeNames(xmlDict *__pyx_v_c_dict * return -1 * tree.END_FOR_EACH_ELEMENT_FROM(c_node) */ - __Pyx_TraceLine(755,1,__PYX_ERR(2, 755, __pyx_L1_error)) __pyx_t_1 = ((__pyx_f_4lxml_5etree__fixHtmlDictNodeNames(__pyx_v_c_dict, __pyx_v_c_node) < 0) != 0); if (__pyx_t_1) { @@ -117423,7 +109990,6 @@ static int __pyx_f_4lxml_5etree__fixHtmlDictSubtreeNames(xmlDict *__pyx_v_c_dict * tree.END_FOR_EACH_ELEMENT_FROM(c_node) * return 0 */ - __Pyx_TraceLine(756,1,__PYX_ERR(2, 756, __pyx_L1_error)) __pyx_r = -1; goto __pyx_L0; @@ -117452,7 +110018,6 @@ static int __pyx_f_4lxml_5etree__fixHtmlDictSubtreeNames(xmlDict *__pyx_v_c_dict * return 0 * */ - __Pyx_TraceLine(757,1,__PYX_ERR(2, 757, __pyx_L1_error)) END_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node); /* "src/lxml/parser.pxi":758 @@ -117462,7 +110027,6 @@ static int __pyx_f_4lxml_5etree__fixHtmlDictSubtreeNames(xmlDict *__pyx_v_c_dict * * cdef inline int _fixHtmlDictNodeNames(tree.xmlDict* c_dict, */ - __Pyx_TraceLine(758,1,__PYX_ERR(2, 758, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -117475,11 +110039,7 @@ static int __pyx_f_4lxml_5etree__fixHtmlDictSubtreeNames(xmlDict *__pyx_v_c_dict */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._fixHtmlDictSubtreeNames", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); return __pyx_r; } @@ -117495,10 +110055,8 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__fixHtmlDictNodeNames(xmlDict *__p xmlNode *__pyx_v_c_attr; const xmlChar *__pyx_v_c_name; int __pyx_r; - __Pyx_TraceDeclarations int __pyx_t_1; xmlNode *__pyx_t_2; - __Pyx_TraceCall("_fixHtmlDictNodeNames", __pyx_f[2], 760, 1, __PYX_ERR(2, 760, __pyx_L1_error)); /* "src/lxml/parser.pxi":763 * xmlNode* c_node) nogil: @@ -117507,7 +110065,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__fixHtmlDictNodeNames(xmlDict *__p * if c_name is NULL: * return -1 */ - __Pyx_TraceLine(763,1,__PYX_ERR(2, 763, __pyx_L1_error)) __pyx_v_c_name = xmlDictLookup(__pyx_v_c_dict, __pyx_v_c_node->name, -1); /* "src/lxml/parser.pxi":764 @@ -117517,7 +110074,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__fixHtmlDictNodeNames(xmlDict *__p * return -1 * if c_name is not c_node.name: */ - __Pyx_TraceLine(764,1,__PYX_ERR(2, 764, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_name == NULL) != 0); if (__pyx_t_1) { @@ -117528,7 +110084,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__fixHtmlDictNodeNames(xmlDict *__p * if c_name is not c_node.name: * tree.xmlFree(c_node.name) */ - __Pyx_TraceLine(765,1,__PYX_ERR(2, 765, __pyx_L1_error)) __pyx_r = -1; goto __pyx_L0; @@ -117548,7 +110103,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__fixHtmlDictNodeNames(xmlDict *__p * tree.xmlFree(c_node.name) * c_node.name = c_name */ - __Pyx_TraceLine(766,1,__PYX_ERR(2, 766, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_name != __pyx_v_c_node->name) != 0); if (__pyx_t_1) { @@ -117559,7 +110113,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__fixHtmlDictNodeNames(xmlDict *__p * c_node.name = c_name * c_attr = c_node.properties */ - __Pyx_TraceLine(767,1,__PYX_ERR(2, 767, __pyx_L1_error)) xmlFree(((char *)__pyx_v_c_node->name)); /* "src/lxml/parser.pxi":768 @@ -117569,7 +110122,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__fixHtmlDictNodeNames(xmlDict *__p * c_attr = c_node.properties * while c_attr is not NULL: */ - __Pyx_TraceLine(768,1,__PYX_ERR(2, 768, __pyx_L1_error)) __pyx_v_c_node->name = __pyx_v_c_name; /* "src/lxml/parser.pxi":766 @@ -117588,7 +110140,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__fixHtmlDictNodeNames(xmlDict *__p * while c_attr is not NULL: * c_name = tree.xmlDictLookup(c_dict, c_attr.name, -1) */ - __Pyx_TraceLine(769,1,__PYX_ERR(2, 769, __pyx_L1_error)) __pyx_v_c_attr = ((xmlNode *)__pyx_v_c_node->properties); /* "src/lxml/parser.pxi":770 @@ -117598,7 +110149,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__fixHtmlDictNodeNames(xmlDict *__p * c_name = tree.xmlDictLookup(c_dict, c_attr.name, -1) * if c_name is NULL: */ - __Pyx_TraceLine(770,1,__PYX_ERR(2, 770, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_attr != NULL) != 0); if (!__pyx_t_1) break; @@ -117610,7 +110160,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__fixHtmlDictNodeNames(xmlDict *__p * if c_name is NULL: * return -1 */ - __Pyx_TraceLine(771,1,__PYX_ERR(2, 771, __pyx_L1_error)) __pyx_v_c_name = xmlDictLookup(__pyx_v_c_dict, __pyx_v_c_attr->name, -1); /* "src/lxml/parser.pxi":772 @@ -117620,7 +110169,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__fixHtmlDictNodeNames(xmlDict *__p * return -1 * if c_name is not c_attr.name: */ - __Pyx_TraceLine(772,1,__PYX_ERR(2, 772, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_name == NULL) != 0); if (__pyx_t_1) { @@ -117631,7 +110179,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__fixHtmlDictNodeNames(xmlDict *__p * if c_name is not c_attr.name: * tree.xmlFree(c_attr.name) */ - __Pyx_TraceLine(773,1,__PYX_ERR(2, 773, __pyx_L1_error)) __pyx_r = -1; goto __pyx_L0; @@ -117651,7 +110198,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__fixHtmlDictNodeNames(xmlDict *__p * tree.xmlFree(c_attr.name) * c_attr.name = c_name */ - __Pyx_TraceLine(774,1,__PYX_ERR(2, 774, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_name != __pyx_v_c_attr->name) != 0); if (__pyx_t_1) { @@ -117662,7 +110208,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__fixHtmlDictNodeNames(xmlDict *__p * c_attr.name = c_name * c_attr = c_attr.next */ - __Pyx_TraceLine(775,1,__PYX_ERR(2, 775, __pyx_L1_error)) xmlFree(((char *)__pyx_v_c_attr->name)); /* "src/lxml/parser.pxi":776 @@ -117672,7 +110217,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__fixHtmlDictNodeNames(xmlDict *__p * c_attr = c_attr.next * return 0 */ - __Pyx_TraceLine(776,1,__PYX_ERR(2, 776, __pyx_L1_error)) __pyx_v_c_attr->name = __pyx_v_c_name; /* "src/lxml/parser.pxi":774 @@ -117691,7 +110235,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__fixHtmlDictNodeNames(xmlDict *__p * return 0 * */ - __Pyx_TraceLine(777,1,__PYX_ERR(2, 777, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_attr->next; __pyx_v_c_attr = __pyx_t_2; } @@ -117703,7 +110246,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__fixHtmlDictNodeNames(xmlDict *__p * * @cython.internal */ - __Pyx_TraceLine(778,1,__PYX_ERR(2, 778, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -117716,11 +110258,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__fixHtmlDictNodeNames(xmlDict *__p */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._fixHtmlDictNodeNames", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); return __pyx_r; } @@ -117878,7 +110416,6 @@ static int __pyx_pw_4lxml_5etree_11_BaseParser_1__init__(PyObject *__pyx_v_self, static int __pyx_pf_4lxml_5etree_11_BaseParser___init__(struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_self, int __pyx_v_parse_options, int __pyx_v_for_html, struct __pyx_obj_4lxml_5etree_XMLSchema *__pyx_v_schema, PyObject *__pyx_v_remove_comments, PyObject *__pyx_v_remove_pis, PyObject *__pyx_v_strip_cdata, PyObject *__pyx_v_collect_ids, PyObject *__pyx_v_target, PyObject *__pyx_v_encoding) { xmlCharEncodingHandler *__pyx_v_enchandler; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -117888,7 +110425,6 @@ static int __pyx_pf_4lxml_5etree_11_BaseParser___init__(struct __pyx_obj_4lxml_5 Py_UCS4 __pyx_t_6; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[2], 798, 0, __PYX_ERR(2, 798, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_encoding); /* "src/lxml/parser.pxi":803 @@ -117898,7 +110434,6 @@ static int __pyx_pf_4lxml_5etree_11_BaseParser___init__(struct __pyx_obj_4lxml_5 * raise TypeError, u"This class cannot be instantiated" * */ - __Pyx_TraceLine(803,0,__PYX_ERR(2, 803, __pyx_L1_error)) __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_self), __pyx_ptype_4lxml_5etree_XMLParser); __pyx_t_3 = (__pyx_t_2 != 0); if (!__pyx_t_3) { @@ -117920,7 +110455,6 @@ static int __pyx_pf_4lxml_5etree_11_BaseParser___init__(struct __pyx_obj_4lxml_5 * * self._parse_options = parse_options */ - __Pyx_TraceLine(804,0,__PYX_ERR(2, 804, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_This_class_cannot_be_instantiate, 0, 0); __PYX_ERR(2, 804, __pyx_L1_error) @@ -117940,7 +110474,6 @@ static int __pyx_pf_4lxml_5etree_11_BaseParser___init__(struct __pyx_obj_4lxml_5 * self.target = target * self._for_html = for_html */ - __Pyx_TraceLine(806,0,__PYX_ERR(2, 806, __pyx_L1_error)) __pyx_v_self->_parse_options = __pyx_v_parse_options; /* "src/lxml/parser.pxi":807 @@ -117950,7 +110483,6 @@ static int __pyx_pf_4lxml_5etree_11_BaseParser___init__(struct __pyx_obj_4lxml_5 * self._for_html = for_html * self._remove_comments = remove_comments */ - __Pyx_TraceLine(807,0,__PYX_ERR(2, 807, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_target); __Pyx_GIVEREF(__pyx_v_target); __Pyx_GOTREF(__pyx_v_self->target); @@ -117964,7 +110496,6 @@ static int __pyx_pf_4lxml_5etree_11_BaseParser___init__(struct __pyx_obj_4lxml_5 * self._remove_comments = remove_comments * self._remove_pis = remove_pis */ - __Pyx_TraceLine(808,0,__PYX_ERR(2, 808, __pyx_L1_error)) __pyx_v_self->_for_html = __pyx_v_for_html; /* "src/lxml/parser.pxi":809 @@ -117974,7 +110505,6 @@ static int __pyx_pf_4lxml_5etree_11_BaseParser___init__(struct __pyx_obj_4lxml_5 * self._remove_pis = remove_pis * self._strip_cdata = strip_cdata */ - __Pyx_TraceLine(809,0,__PYX_ERR(2, 809, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_remove_comments); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 809, __pyx_L1_error) __pyx_v_self->_remove_comments = __pyx_t_2; @@ -117985,7 +110515,6 @@ static int __pyx_pf_4lxml_5etree_11_BaseParser___init__(struct __pyx_obj_4lxml_5 * self._strip_cdata = strip_cdata * self._collect_ids = collect_ids */ - __Pyx_TraceLine(810,0,__PYX_ERR(2, 810, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_remove_pis); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 810, __pyx_L1_error) __pyx_v_self->_remove_pis = __pyx_t_2; @@ -117996,7 +110525,6 @@ static int __pyx_pf_4lxml_5etree_11_BaseParser___init__(struct __pyx_obj_4lxml_5 * self._collect_ids = collect_ids * self._schema = schema */ - __Pyx_TraceLine(811,0,__PYX_ERR(2, 811, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_strip_cdata); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 811, __pyx_L1_error) __pyx_v_self->_strip_cdata = __pyx_t_2; @@ -118007,7 +110535,6 @@ static int __pyx_pf_4lxml_5etree_11_BaseParser___init__(struct __pyx_obj_4lxml_5 * self._schema = schema * */ - __Pyx_TraceLine(812,0,__PYX_ERR(2, 812, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_collect_ids); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 812, __pyx_L1_error) __pyx_v_self->_collect_ids = __pyx_t_2; @@ -118018,7 +110545,6 @@ static int __pyx_pf_4lxml_5etree_11_BaseParser___init__(struct __pyx_obj_4lxml_5 * * self._resolvers = _ResolverRegistry() */ - __Pyx_TraceLine(813,0,__PYX_ERR(2, 813, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_schema)); __Pyx_GIVEREF(((PyObject *)__pyx_v_schema)); __Pyx_GOTREF(__pyx_v_self->_schema); @@ -118032,7 +110558,6 @@ static int __pyx_pf_4lxml_5etree_11_BaseParser___init__(struct __pyx_obj_4lxml_5 * * if encoding is None: */ - __Pyx_TraceLine(815,0,__PYX_ERR(2, 815, __pyx_L1_error)) __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__ResolverRegistry)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); @@ -118048,7 +110573,6 @@ static int __pyx_pf_4lxml_5etree_11_BaseParser___init__(struct __pyx_obj_4lxml_5 * self._default_encoding = None * else: */ - __Pyx_TraceLine(817,0,__PYX_ERR(2, 817, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_encoding == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -118060,7 +110584,6 @@ static int __pyx_pf_4lxml_5etree_11_BaseParser___init__(struct __pyx_obj_4lxml_5 * else: * encoding = _utf8(encoding) */ - __Pyx_TraceLine(818,0,__PYX_ERR(2, 818, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_default_encoding); @@ -118084,7 +110607,6 @@ static int __pyx_pf_4lxml_5etree_11_BaseParser___init__(struct __pyx_obj_4lxml_5 * enchandler = tree.xmlFindCharEncodingHandler(_cstr(encoding)) * if enchandler is NULL: */ - __Pyx_TraceLine(820,0,__PYX_ERR(2, 820, __pyx_L1_error)) /*else*/ { __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_v_encoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -118098,7 +110620,6 @@ static int __pyx_pf_4lxml_5etree_11_BaseParser___init__(struct __pyx_obj_4lxml_5 * if enchandler is NULL: * raise LookupError, f"unknown encoding: '{encoding}'" */ - __Pyx_TraceLine(821,0,__PYX_ERR(2, 821, __pyx_L1_error)) __pyx_v_enchandler = xmlFindCharEncodingHandler(PyBytes_AS_STRING(__pyx_v_encoding)); /* "src/lxml/parser.pxi":822 @@ -118108,7 +110629,6 @@ static int __pyx_pf_4lxml_5etree_11_BaseParser___init__(struct __pyx_obj_4lxml_5 * raise LookupError, f"unknown encoding: '{encoding}'" * tree.xmlCharEncCloseFunc(enchandler) */ - __Pyx_TraceLine(822,0,__PYX_ERR(2, 822, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_enchandler == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -118119,7 +110639,6 @@ static int __pyx_pf_4lxml_5etree_11_BaseParser___init__(struct __pyx_obj_4lxml_5 * tree.xmlCharEncCloseFunc(enchandler) * self._default_encoding = encoding */ - __Pyx_TraceLine(823,0,__PYX_ERR(2, 823, __pyx_L1_error)) __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 0; @@ -118135,10 +110654,10 @@ static int __pyx_pf_4lxml_5etree_11_BaseParser___init__(struct __pyx_obj_4lxml_5 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7); __pyx_t_7 = 0; - __Pyx_INCREF(__pyx_kp_u__60); + __Pyx_INCREF(__pyx_kp_u__21); __pyx_t_5 += 1; - __Pyx_GIVEREF(__pyx_kp_u__60); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__60); + __Pyx_GIVEREF(__pyx_kp_u__21); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__21); __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -118162,7 +110681,6 @@ static int __pyx_pf_4lxml_5etree_11_BaseParser___init__(struct __pyx_obj_4lxml_5 * self._default_encoding = encoding * */ - __Pyx_TraceLine(824,0,__PYX_ERR(2, 824, __pyx_L1_error)) (void)(xmlCharEncCloseFunc(__pyx_v_enchandler)); /* "src/lxml/parser.pxi":825 @@ -118172,7 +110690,6 @@ static int __pyx_pf_4lxml_5etree_11_BaseParser___init__(struct __pyx_obj_4lxml_5 * * cdef _setBaseURL(self, base_url): */ - __Pyx_TraceLine(825,0,__PYX_ERR(2, 825, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_encoding); __Pyx_GIVEREF(__pyx_v_encoding); __Pyx_GOTREF(__pyx_v_self->_default_encoding); @@ -118199,7 +110716,6 @@ static int __pyx_pf_4lxml_5etree_11_BaseParser___init__(struct __pyx_obj_4lxml_5 __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_encoding); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -118214,11 +110730,9 @@ static int __pyx_pf_4lxml_5etree_11_BaseParser___init__(struct __pyx_obj_4lxml_5 static PyObject *__pyx_f_4lxml_5etree_11_BaseParser__setBaseURL(struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_self, PyObject *__pyx_v_base_url) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_setBaseURL", 0); - __Pyx_TraceCall("_setBaseURL", __pyx_f[2], 827, 0, __PYX_ERR(2, 827, __pyx_L1_error)); /* "src/lxml/parser.pxi":828 * @@ -118227,7 +110741,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_BaseParser__setBaseURL(struct __pyx_obj * * cdef _collectEvents(self, event_types, tag): */ - __Pyx_TraceLine(828,0,__PYX_ERR(2, 828, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_base_url); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 828, __pyx_L1_error) @@ -118254,7 +110767,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_BaseParser__setBaseURL(struct __pyx_obj __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -118269,7 +110781,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_BaseParser__setBaseURL(struct __pyx_obj static PyObject *__pyx_f_4lxml_5etree_11_BaseParser__collectEvents(struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_self, PyObject *__pyx_v_event_types, PyObject *__pyx_v_tag) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -118277,7 +110788,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_BaseParser__collectEvents(struct __pyx_ PyObject *__pyx_t_4 = NULL; int __pyx_t_5; __Pyx_RefNannySetupContext("_collectEvents", 0); - __Pyx_TraceCall("_collectEvents", __pyx_f[2], 830, 0, __PYX_ERR(2, 830, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_event_types); /* "src/lxml/parser.pxi":831 @@ -118287,7 +110797,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_BaseParser__collectEvents(struct __pyx_ * event_types = () * else: */ - __Pyx_TraceLine(831,0,__PYX_ERR(2, 831, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_event_types == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -118299,7 +110808,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_BaseParser__collectEvents(struct __pyx_ * else: * event_types = tuple(set(event_types)) */ - __Pyx_TraceLine(832,0,__PYX_ERR(2, 832, __pyx_L1_error)) __Pyx_INCREF(__pyx_empty_tuple); __Pyx_DECREF_SET(__pyx_v_event_types, __pyx_empty_tuple); @@ -118320,7 +110828,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_BaseParser__collectEvents(struct __pyx_ * _buildParseEventFilter(event_types) # purely for validation * self._events_to_collect = (event_types, tag) */ - __Pyx_TraceLine(834,0,__PYX_ERR(2, 834, __pyx_L1_error)) /*else*/ { __pyx_t_3 = PySet_New(__pyx_v_event_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -118337,7 +110844,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_BaseParser__collectEvents(struct __pyx_ * self._events_to_collect = (event_types, tag) * */ - __Pyx_TraceLine(835,0,__PYX_ERR(2, 835, __pyx_L1_error)) __pyx_t_5 = __pyx_f_4lxml_5etree__buildParseEventFilter(__pyx_v_event_types); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 835, __pyx_L1_error) } __pyx_L3:; @@ -118349,7 +110855,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_BaseParser__collectEvents(struct __pyx_ * * cdef _ParserContext _getParserContext(self): */ - __Pyx_TraceLine(836,0,__PYX_ERR(2, 836, __pyx_L1_error)) __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_event_types); @@ -118383,7 +110888,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_BaseParser__collectEvents(struct __pyx_ __pyx_L0:; __Pyx_XDECREF(__pyx_v_event_types); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -118399,7 +110903,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_BaseParser__collectEvents(struct __pyx_ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_BaseParser__getParserContext(struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_self) { xmlParserCtxt *__pyx_v_pctxt; struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -118409,7 +110912,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas PyObject *__pyx_t_6 = NULL; int __pyx_t_7; __Pyx_RefNannySetupContext("_getParserContext", 0); - __Pyx_TraceCall("_getParserContext", __pyx_f[2], 838, 0, __PYX_ERR(2, 838, __pyx_L1_error)); /* "src/lxml/parser.pxi":840 * cdef _ParserContext _getParserContext(self): @@ -118418,7 +110920,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * self._parser_context = self._createContext(self.target, None) * self._parser_context._collect_ids = self._collect_ids */ - __Pyx_TraceLine(840,0,__PYX_ERR(2, 840, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_self->_parser_context) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -118430,7 +110931,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * self._parser_context._collect_ids = self._collect_ids * if self._schema is not None: */ - __Pyx_TraceLine(841,0,__PYX_ERR(2, 841, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->target; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_createContext(__pyx_v_self, __pyx_t_3, Py_None)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 841, __pyx_L1_error) @@ -118449,7 +110949,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * if self._schema is not None: * self._parser_context._validator = \ */ - __Pyx_TraceLine(842,0,__PYX_ERR(2, 842, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_collect_ids; __pyx_v_self->_parser_context->_collect_ids = __pyx_t_2; @@ -118460,7 +110959,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * self._parser_context._validator = \ * self._schema._newSaxValidator( */ - __Pyx_TraceLine(843,0,__PYX_ERR(2, 843, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)__pyx_v_self->_schema) != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -118472,7 +110970,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * self._parse_options & xmlparser.XML_PARSE_DTDATTR) * pctxt = self._newParserCtxt() */ - __Pyx_TraceLine(845,0,__PYX_ERR(2, 845, __pyx_L1_error)) __pyx_t_4 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree_XMLSchema *)__pyx_v_self->_schema->__pyx_base.__pyx_vtab)->_newSaxValidator(__pyx_v_self->_schema, (__pyx_v_self->_parse_options & XML_PARSE_DTDATTR))); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -118483,7 +110980,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * self._schema._newSaxValidator( * self._parse_options & xmlparser.XML_PARSE_DTDATTR) */ - __Pyx_TraceLine(844,0,__PYX_ERR(2, 844, __pyx_L1_error)) __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->_parser_context->_validator); __Pyx_DECREF(((PyObject *)__pyx_v_self->_parser_context->_validator)); @@ -118506,7 +111002,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * _initParserContext(self._parser_context, self._resolvers, pctxt) * self._configureSaxContext(pctxt) */ - __Pyx_TraceLine(847,0,__PYX_ERR(2, 847, __pyx_L1_error)) __pyx_t_5 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_newParserCtxt(__pyx_v_self); if (unlikely(__pyx_t_5 == ((xmlParserCtxt *)NULL))) __PYX_ERR(2, 847, __pyx_L1_error) __pyx_v_pctxt = __pyx_t_5; @@ -118517,7 +111012,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * self._configureSaxContext(pctxt) * return self._parser_context */ - __Pyx_TraceLine(848,0,__PYX_ERR(2, 848, __pyx_L1_error)) __pyx_t_4 = ((PyObject *)__pyx_v_self->_parser_context); __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = ((PyObject *)__pyx_v_self->_resolvers); @@ -118535,7 +111029,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * return self._parser_context * */ - __Pyx_TraceLine(849,0,__PYX_ERR(2, 849, __pyx_L1_error)) __pyx_t_7 = __pyx_f_4lxml_5etree_11_BaseParser__configureSaxContext(__pyx_v_self, __pyx_v_pctxt); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 849, __pyx_L1_error) /* "src/lxml/parser.pxi":840 @@ -118554,7 +111047,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * * cdef _ParserContext _getPushParserContext(self): */ - __Pyx_TraceLine(850,0,__PYX_ERR(2, 850, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_self->_parser_context)); __pyx_r = __pyx_v_self->_parser_context; @@ -118577,7 +111069,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -118593,7 +111084,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_BaseParser__getPushParserContext(struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_self) { xmlParserCtxt *__pyx_v_pctxt; struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -118603,7 +111093,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas xmlParserCtxt *__pyx_t_6; int __pyx_t_7; __Pyx_RefNannySetupContext("_getPushParserContext", 0); - __Pyx_TraceCall("_getPushParserContext", __pyx_f[2], 852, 0, __PYX_ERR(2, 852, __pyx_L1_error)); /* "src/lxml/parser.pxi":854 * cdef _ParserContext _getPushParserContext(self): @@ -118612,7 +111101,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * self._push_parser_context = self._createContext( * self.target, self._events_to_collect) */ - __Pyx_TraceLine(854,0,__PYX_ERR(2, 854, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_self->_push_parser_context) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -118624,7 +111112,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * self._push_parser_context._collect_ids = self._collect_ids * if self._schema is not None: */ - __Pyx_TraceLine(856,0,__PYX_ERR(2, 856, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->target; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = __pyx_v_self->_events_to_collect; @@ -118637,7 +111124,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * self.target, self._events_to_collect) * self._push_parser_context._collect_ids = self._collect_ids */ - __Pyx_TraceLine(855,0,__PYX_ERR(2, 855, __pyx_L1_error)) __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_createContext(__pyx_v_self, __pyx_t_3, __pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -118655,7 +111141,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * if self._schema is not None: * self._push_parser_context._validator = \ */ - __Pyx_TraceLine(857,0,__PYX_ERR(2, 857, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_collect_ids; __pyx_v_self->_push_parser_context->_collect_ids = __pyx_t_2; @@ -118666,7 +111151,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * self._push_parser_context._validator = \ * self._schema._newSaxValidator( */ - __Pyx_TraceLine(858,0,__PYX_ERR(2, 858, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)__pyx_v_self->_schema) != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -118678,7 +111162,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * self._parse_options & xmlparser.XML_PARSE_DTDATTR) * pctxt = self._newPushParserCtxt() */ - __Pyx_TraceLine(860,0,__PYX_ERR(2, 860, __pyx_L1_error)) __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree_XMLSchema *)__pyx_v_self->_schema->__pyx_base.__pyx_vtab)->_newSaxValidator(__pyx_v_self->_schema, (__pyx_v_self->_parse_options & XML_PARSE_DTDATTR))); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 860, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -118689,7 +111172,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * self._schema._newSaxValidator( * self._parse_options & xmlparser.XML_PARSE_DTDATTR) */ - __Pyx_TraceLine(859,0,__PYX_ERR(2, 859, __pyx_L1_error)) __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_self->_push_parser_context->_validator); __Pyx_DECREF(((PyObject *)__pyx_v_self->_push_parser_context->_validator)); @@ -118712,7 +111194,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * _initParserContext( * self._push_parser_context, self._resolvers, pctxt) */ - __Pyx_TraceLine(862,0,__PYX_ERR(2, 862, __pyx_L1_error)) __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_newPushParserCtxt(__pyx_v_self); if (unlikely(__pyx_t_6 == ((xmlParserCtxt *)NULL))) __PYX_ERR(2, 862, __pyx_L1_error) __pyx_v_pctxt = __pyx_t_6; @@ -118723,7 +111204,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * self._configureSaxContext(pctxt) * return self._push_parser_context */ - __Pyx_TraceLine(864,0,__PYX_ERR(2, 864, __pyx_L1_error)) __pyx_t_5 = ((PyObject *)__pyx_v_self->_push_parser_context); __Pyx_INCREF(__pyx_t_5); __pyx_t_4 = ((PyObject *)__pyx_v_self->_resolvers); @@ -118736,7 +111216,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * self._push_parser_context, self._resolvers, pctxt) * self._configureSaxContext(pctxt) */ - __Pyx_TraceLine(863,0,__PYX_ERR(2, 863, __pyx_L1_error)) __pyx_t_3 = __pyx_f_4lxml_5etree__initParserContext(((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_5), ((struct __pyx_obj_4lxml_5etree__ResolverRegistry *)__pyx_t_4), __pyx_v_pctxt); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -118750,7 +111229,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * return self._push_parser_context * */ - __Pyx_TraceLine(865,0,__PYX_ERR(2, 865, __pyx_L1_error)) __pyx_t_7 = __pyx_f_4lxml_5etree_11_BaseParser__configureSaxContext(__pyx_v_self, __pyx_v_pctxt); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 865, __pyx_L1_error) /* "src/lxml/parser.pxi":854 @@ -118769,7 +111247,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * * cdef _ParserContext _createContext(self, target, events_to_collect): */ - __Pyx_TraceLine(866,0,__PYX_ERR(2, 866, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_self->_push_parser_context)); __pyx_r = __pyx_v_self->_push_parser_context; @@ -118792,7 +111269,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -118810,7 +111286,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas PyObject *__pyx_v_events = NULL; PyObject *__pyx_v_tag = NULL; struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -118820,7 +111295,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas PyObject *__pyx_t_6 = NULL; PyObject *(*__pyx_t_7)(PyObject *); __Pyx_RefNannySetupContext("_createContext", 0); - __Pyx_TraceCall("_createContext", __pyx_f[2], 868, 0, __PYX_ERR(2, 868, __pyx_L1_error)); /* "src/lxml/parser.pxi":870 * cdef _ParserContext _createContext(self, target, events_to_collect): @@ -118829,7 +111303,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * sax_context = _TargetParserContext(self) * (<_TargetParserContext>sax_context)._setTarget(target) */ - __Pyx_TraceLine(870,0,__PYX_ERR(2, 870, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_target != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -118841,7 +111314,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * (<_TargetParserContext>sax_context)._setTarget(target) * elif events_to_collect: */ - __Pyx_TraceLine(871,0,__PYX_ERR(2, 871, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree__TargetParserContext), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_sax_context = ((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_t_3); @@ -118854,7 +111326,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * elif events_to_collect: * sax_context = _SaxParserContext(self) */ - __Pyx_TraceLine(872,0,__PYX_ERR(2, 872, __pyx_L1_error)) __pyx_t_4 = __pyx_f_4lxml_5etree_20_TargetParserContext__setTarget(((struct __pyx_obj_4lxml_5etree__TargetParserContext *)__pyx_v_sax_context), __pyx_v_target); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 872, __pyx_L1_error) /* "src/lxml/parser.pxi":870 @@ -118874,7 +111345,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * sax_context = _SaxParserContext(self) * else: */ - __Pyx_TraceLine(873,0,__PYX_ERR(2, 873, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_events_to_collect); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 873, __pyx_L1_error) if (__pyx_t_2) { @@ -118885,7 +111355,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * else: * # nothing special to configure */ - __Pyx_TraceLine(874,0,__PYX_ERR(2, 874, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree__SaxParserContext), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 874, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_sax_context = ((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_t_3); @@ -118908,7 +111377,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * if events_to_collect: * events, tag = events_to_collect */ - __Pyx_TraceLine(877,0,__PYX_ERR(2, 877, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__ParserContext)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 877, __pyx_L1_error) @@ -118926,7 +111394,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * events, tag = events_to_collect * sax_context._setEventFilter(events, tag) */ - __Pyx_TraceLine(878,0,__PYX_ERR(2, 878, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_events_to_collect); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 878, __pyx_L1_error) if (__pyx_t_2) { @@ -118937,7 +111404,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * sax_context._setEventFilter(events, tag) * return sax_context */ - __Pyx_TraceLine(879,0,__PYX_ERR(2, 879, __pyx_L1_error)) if ((likely(PyTuple_CheckExact(__pyx_v_events_to_collect))) || (PyList_CheckExact(__pyx_v_events_to_collect))) { PyObject* sequence = __pyx_v_events_to_collect; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); @@ -118994,7 +111460,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * return sax_context * */ - __Pyx_TraceLine(880,0,__PYX_ERR(2, 880, __pyx_L1_error)) __pyx_t_5 = ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)__pyx_v_sax_context->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_setEventFilter(__pyx_v_sax_context, __pyx_v_events, __pyx_v_tag); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -119015,7 +111480,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas * * @cython.final */ - __Pyx_TraceLine(881,0,__PYX_ERR(2, 881, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_sax_context)); __pyx_r = ((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_v_sax_context); @@ -119041,7 +111505,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas __Pyx_XDECREF(__pyx_v_events); __Pyx_XDECREF(__pyx_v_tag); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -119056,11 +111519,9 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_11_Bas static int __pyx_f_4lxml_5etree_11_BaseParser__configureSaxContext(struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_self, xmlParserCtxt *__pyx_v_pctxt) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_configureSaxContext", 0); - __Pyx_TraceCall("_configureSaxContext", __pyx_f[2], 884, 0, __PYX_ERR(2, 884, __pyx_L1_error)); /* "src/lxml/parser.pxi":885 * @cython.final @@ -119069,7 +111530,6 @@ static int __pyx_f_4lxml_5etree_11_BaseParser__configureSaxContext(struct __pyx_ * pctxt.sax.comment = NULL * if self._remove_pis: */ - __Pyx_TraceLine(885,0,__PYX_ERR(2, 885, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_remove_comments != 0); if (__pyx_t_1) { @@ -119080,7 +111540,6 @@ static int __pyx_f_4lxml_5etree_11_BaseParser__configureSaxContext(struct __pyx_ * if self._remove_pis: * pctxt.sax.processingInstruction = NULL */ - __Pyx_TraceLine(886,0,__PYX_ERR(2, 886, __pyx_L1_error)) __pyx_v_pctxt->sax->comment = NULL; /* "src/lxml/parser.pxi":885 @@ -119099,7 +111558,6 @@ static int __pyx_f_4lxml_5etree_11_BaseParser__configureSaxContext(struct __pyx_ * pctxt.sax.processingInstruction = NULL * if self._strip_cdata: */ - __Pyx_TraceLine(887,0,__PYX_ERR(2, 887, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_remove_pis != 0); if (__pyx_t_1) { @@ -119110,7 +111568,6 @@ static int __pyx_f_4lxml_5etree_11_BaseParser__configureSaxContext(struct __pyx_ * if self._strip_cdata: * # hard switch-off for CDATA nodes => makes them plain text */ - __Pyx_TraceLine(888,0,__PYX_ERR(2, 888, __pyx_L1_error)) __pyx_v_pctxt->sax->processingInstruction = NULL; /* "src/lxml/parser.pxi":887 @@ -119129,7 +111586,6 @@ static int __pyx_f_4lxml_5etree_11_BaseParser__configureSaxContext(struct __pyx_ * # hard switch-off for CDATA nodes => makes them plain text * pctxt.sax.cdataBlock = NULL */ - __Pyx_TraceLine(889,0,__PYX_ERR(2, 889, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_strip_cdata != 0); if (__pyx_t_1) { @@ -119140,7 +111596,6 @@ static int __pyx_f_4lxml_5etree_11_BaseParser__configureSaxContext(struct __pyx_ * * cdef int _registerHtmlErrorHandler(self, xmlparser.xmlParserCtxt* c_ctxt) except -1: */ - __Pyx_TraceLine(891,0,__PYX_ERR(2, 891, __pyx_L1_error)) __pyx_v_pctxt->sax->cdataBlock = NULL; /* "src/lxml/parser.pxi":889 @@ -119162,12 +111617,6 @@ static int __pyx_f_4lxml_5etree_11_BaseParser__configureSaxContext(struct __pyx_ /* function exit code */ __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._BaseParser._configureSaxContext", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -119183,13 +111632,11 @@ static int __pyx_f_4lxml_5etree_11_BaseParser__configureSaxContext(struct __pyx_ static int __pyx_f_4lxml_5etree_11_BaseParser__registerHtmlErrorHandler(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_self, xmlParserCtxt *__pyx_v_c_ctxt) { xmlSAXHandler *__pyx_v_sax; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlSAXHandler *__pyx_t_1; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("_registerHtmlErrorHandler", 0); - __Pyx_TraceCall("_registerHtmlErrorHandler", __pyx_f[2], 893, 0, __PYX_ERR(2, 893, __pyx_L1_error)); /* "src/lxml/parser.pxi":894 * @@ -119198,7 +111645,6 @@ static int __pyx_f_4lxml_5etree_11_BaseParser__registerHtmlErrorHandler(CYTHON_U * if sax is not NULL and sax.initialized and sax.initialized != xmlparser.XML_SAX2_MAGIC: * # need to extend SAX1 context to SAX2 to get proper error reports */ - __Pyx_TraceLine(894,0,__PYX_ERR(2, 894, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_ctxt->sax; __pyx_v_sax = __pyx_t_1; @@ -119209,7 +111655,6 @@ static int __pyx_f_4lxml_5etree_11_BaseParser__registerHtmlErrorHandler(CYTHON_U * # need to extend SAX1 context to SAX2 to get proper error reports * if sax is &htmlparser.htmlDefaultSAXHandler: */ - __Pyx_TraceLine(895,0,__PYX_ERR(2, 895, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_sax != NULL) != 0); if (__pyx_t_3) { } else { @@ -119234,7 +111679,6 @@ static int __pyx_f_4lxml_5etree_11_BaseParser__registerHtmlErrorHandler(CYTHON_U * sax = tree.xmlMalloc(sizeof(xmlparser.xmlSAXHandler)) * if sax is NULL: */ - __Pyx_TraceLine(897,0,__PYX_ERR(2, 897, __pyx_L1_error)) __pyx_t_2 = ((((xmlSAXHandlerV1 *)__pyx_v_sax) == (&htmlDefaultSAXHandler)) != 0); if (__pyx_t_2) { @@ -119245,7 +111689,6 @@ static int __pyx_f_4lxml_5etree_11_BaseParser__registerHtmlErrorHandler(CYTHON_U * if sax is NULL: * raise MemoryError() */ - __Pyx_TraceLine(898,0,__PYX_ERR(2, 898, __pyx_L1_error)) __pyx_v_sax = ((xmlSAXHandler *)xmlMalloc((sizeof(xmlSAXHandler)))); /* "src/lxml/parser.pxi":899 @@ -119255,7 +111698,6 @@ static int __pyx_f_4lxml_5etree_11_BaseParser__registerHtmlErrorHandler(CYTHON_U * raise MemoryError() * cstring_h.memcpy(sax, &htmlparser.htmlDefaultSAXHandler, */ - __Pyx_TraceLine(899,0,__PYX_ERR(2, 899, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_sax == NULL) != 0); if (unlikely(__pyx_t_2)) { @@ -119266,7 +111708,6 @@ static int __pyx_f_4lxml_5etree_11_BaseParser__registerHtmlErrorHandler(CYTHON_U * cstring_h.memcpy(sax, &htmlparser.htmlDefaultSAXHandler, * sizeof(htmlparser.htmlDefaultSAXHandler)) */ - __Pyx_TraceLine(900,0,__PYX_ERR(2, 900, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(2, 900, __pyx_L1_error) /* "src/lxml/parser.pxi":899 @@ -119285,7 +111726,6 @@ static int __pyx_f_4lxml_5etree_11_BaseParser__registerHtmlErrorHandler(CYTHON_U * sizeof(htmlparser.htmlDefaultSAXHandler)) * c_ctxt.sax = sax */ - __Pyx_TraceLine(901,0,__PYX_ERR(2, 901, __pyx_L1_error)) (void)(memcpy(__pyx_v_sax, (&htmlDefaultSAXHandler), (sizeof(htmlDefaultSAXHandler)))); /* "src/lxml/parser.pxi":903 @@ -119295,7 +111735,6 @@ static int __pyx_f_4lxml_5etree_11_BaseParser__registerHtmlErrorHandler(CYTHON_U * sax.initialized = xmlparser.XML_SAX2_MAGIC * sax.serror = _receiveParserError */ - __Pyx_TraceLine(903,0,__PYX_ERR(2, 903, __pyx_L1_error)) __pyx_v_c_ctxt->sax = __pyx_v_sax; /* "src/lxml/parser.pxi":897 @@ -119314,7 +111753,6 @@ static int __pyx_f_4lxml_5etree_11_BaseParser__registerHtmlErrorHandler(CYTHON_U * sax.serror = _receiveParserError * sax.startElementNs = NULL */ - __Pyx_TraceLine(904,0,__PYX_ERR(2, 904, __pyx_L1_error)) __pyx_v_sax->initialized = XML_SAX2_MAGIC; /* "src/lxml/parser.pxi":905 @@ -119324,7 +111762,6 @@ static int __pyx_f_4lxml_5etree_11_BaseParser__registerHtmlErrorHandler(CYTHON_U * sax.startElementNs = NULL * sax.endElementNs = NULL */ - __Pyx_TraceLine(905,0,__PYX_ERR(2, 905, __pyx_L1_error)) __pyx_v_sax->serror = __pyx_f_4lxml_5etree__receiveParserError; /* "src/lxml/parser.pxi":906 @@ -119334,7 +111771,6 @@ static int __pyx_f_4lxml_5etree_11_BaseParser__registerHtmlErrorHandler(CYTHON_U * sax.endElementNs = NULL * sax._private = NULL */ - __Pyx_TraceLine(906,0,__PYX_ERR(2, 906, __pyx_L1_error)) __pyx_v_sax->startElementNs = NULL; /* "src/lxml/parser.pxi":907 @@ -119344,7 +111780,6 @@ static int __pyx_f_4lxml_5etree_11_BaseParser__registerHtmlErrorHandler(CYTHON_U * sax._private = NULL * return 0 */ - __Pyx_TraceLine(907,0,__PYX_ERR(2, 907, __pyx_L1_error)) __pyx_v_sax->endElementNs = NULL; /* "src/lxml/parser.pxi":908 @@ -119354,7 +111789,6 @@ static int __pyx_f_4lxml_5etree_11_BaseParser__registerHtmlErrorHandler(CYTHON_U * return 0 * */ - __Pyx_TraceLine(908,0,__PYX_ERR(2, 908, __pyx_L1_error)) __pyx_v_sax->_private = NULL; /* "src/lxml/parser.pxi":895 @@ -119373,7 +111807,6 @@ static int __pyx_f_4lxml_5etree_11_BaseParser__registerHtmlErrorHandler(CYTHON_U * * cdef xmlparser.xmlParserCtxt* _newParserCtxt(self) except NULL: */ - __Pyx_TraceLine(909,0,__PYX_ERR(2, 909, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -119390,7 +111823,6 @@ static int __pyx_f_4lxml_5etree_11_BaseParser__registerHtmlErrorHandler(CYTHON_U __Pyx_AddTraceback("lxml.etree._BaseParser._registerHtmlErrorHandler", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -119406,12 +111838,10 @@ static int __pyx_f_4lxml_5etree_11_BaseParser__registerHtmlErrorHandler(CYTHON_U static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newParserCtxt(struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_self) { xmlParserCtxt *__pyx_v_c_ctxt; xmlParserCtxt *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_newParserCtxt", 0); - __Pyx_TraceCall("_newParserCtxt", __pyx_f[2], 911, 0, __PYX_ERR(2, 911, __pyx_L1_error)); /* "src/lxml/parser.pxi":913 * cdef xmlparser.xmlParserCtxt* _newParserCtxt(self) except NULL: @@ -119420,7 +111850,6 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newParserCtxt(struct _ * c_ctxt = htmlparser.htmlCreateMemoryParserCtxt('dummy', 5) * if c_ctxt is not NULL: */ - __Pyx_TraceLine(913,0,__PYX_ERR(2, 913, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_for_html != 0); if (__pyx_t_1) { @@ -119431,7 +111860,6 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newParserCtxt(struct _ * if c_ctxt is not NULL: * self._registerHtmlErrorHandler(c_ctxt) */ - __Pyx_TraceLine(914,0,__PYX_ERR(2, 914, __pyx_L1_error)) __pyx_v_c_ctxt = htmlCreateMemoryParserCtxt(((char *)"dummy"), 5); /* "src/lxml/parser.pxi":915 @@ -119441,7 +111869,6 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newParserCtxt(struct _ * self._registerHtmlErrorHandler(c_ctxt) * else: */ - __Pyx_TraceLine(915,0,__PYX_ERR(2, 915, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_ctxt != NULL) != 0); if (__pyx_t_1) { @@ -119452,7 +111879,6 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newParserCtxt(struct _ * else: * c_ctxt = xmlparser.xmlNewParserCtxt() */ - __Pyx_TraceLine(916,0,__PYX_ERR(2, 916, __pyx_L1_error)) __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_registerHtmlErrorHandler(__pyx_v_self, __pyx_v_c_ctxt); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(2, 916, __pyx_L1_error) /* "src/lxml/parser.pxi":915 @@ -119481,7 +111907,6 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newParserCtxt(struct _ * if c_ctxt is NULL: * raise MemoryError */ - __Pyx_TraceLine(918,0,__PYX_ERR(2, 918, __pyx_L1_error)) /*else*/ { __pyx_v_c_ctxt = xmlNewParserCtxt(); } @@ -119494,7 +111919,6 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newParserCtxt(struct _ * raise MemoryError * c_ctxt.sax.startDocument = _initSaxDocument */ - __Pyx_TraceLine(919,0,__PYX_ERR(2, 919, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_ctxt == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -119505,7 +111929,6 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newParserCtxt(struct _ * c_ctxt.sax.startDocument = _initSaxDocument * return c_ctxt */ - __Pyx_TraceLine(920,0,__PYX_ERR(2, 920, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(2, 920, __pyx_L1_error) /* "src/lxml/parser.pxi":919 @@ -119524,7 +111947,6 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newParserCtxt(struct _ * return c_ctxt * */ - __Pyx_TraceLine(921,0,__PYX_ERR(2, 921, __pyx_L1_error)) __pyx_v_c_ctxt->sax->startDocument = __pyx_f_4lxml_5etree__initSaxDocument; /* "src/lxml/parser.pxi":922 @@ -119534,7 +111956,6 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newParserCtxt(struct _ * * cdef xmlparser.xmlParserCtxt* _newPushParserCtxt(self) except NULL: */ - __Pyx_TraceLine(922,0,__PYX_ERR(2, 922, __pyx_L1_error)) __pyx_r = __pyx_v_c_ctxt; goto __pyx_L0; @@ -119551,7 +111972,6 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newParserCtxt(struct _ __Pyx_AddTraceback("lxml.etree._BaseParser._newParserCtxt", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -119568,14 +111988,12 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newPushParserCtxt(stru xmlParserCtxt *__pyx_v_c_ctxt; char *__pyx_v_c_filename; xmlParserCtxt *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations char *__pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("_newPushParserCtxt", 0); - __Pyx_TraceCall("_newPushParserCtxt", __pyx_f[2], 924, 0, __PYX_ERR(2, 924, __pyx_L1_error)); /* "src/lxml/parser.pxi":926 * cdef xmlparser.xmlParserCtxt* _newPushParserCtxt(self) except NULL: @@ -119584,7 +112002,6 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newPushParserCtxt(stru * if self._for_html: * c_ctxt = htmlparser.htmlCreatePushParserCtxt( */ - __Pyx_TraceLine(926,0,__PYX_ERR(2, 926, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_self->_filename != ((PyObject*)Py_None)); if ((__pyx_t_2 != 0)) { __pyx_t_3 = __pyx_v_self->_filename; @@ -119603,7 +112020,6 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newPushParserCtxt(stru * c_ctxt = htmlparser.htmlCreatePushParserCtxt( * NULL, NULL, NULL, 0, c_filename, tree.XML_CHAR_ENCODING_NONE) */ - __Pyx_TraceLine(927,0,__PYX_ERR(2, 927, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_self->_for_html != 0); if (__pyx_t_2) { @@ -119614,7 +112030,6 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newPushParserCtxt(stru * NULL, NULL, NULL, 0, c_filename, tree.XML_CHAR_ENCODING_NONE) * if c_ctxt is not NULL: */ - __Pyx_TraceLine(928,0,__PYX_ERR(2, 928, __pyx_L1_error)) __pyx_v_c_ctxt = htmlCreatePushParserCtxt(NULL, NULL, NULL, 0, __pyx_v_c_filename, XML_CHAR_ENCODING_NONE); /* "src/lxml/parser.pxi":930 @@ -119624,7 +112039,6 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newPushParserCtxt(stru * self._registerHtmlErrorHandler(c_ctxt) * htmlparser.htmlCtxtUseOptions(c_ctxt, self._parse_options) */ - __Pyx_TraceLine(930,0,__PYX_ERR(2, 930, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_ctxt != NULL) != 0); if (__pyx_t_2) { @@ -119635,7 +112049,6 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newPushParserCtxt(stru * htmlparser.htmlCtxtUseOptions(c_ctxt, self._parse_options) * else: */ - __Pyx_TraceLine(931,0,__PYX_ERR(2, 931, __pyx_L1_error)) __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_registerHtmlErrorHandler(__pyx_v_self, __pyx_v_c_ctxt); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 931, __pyx_L1_error) /* "src/lxml/parser.pxi":932 @@ -119645,7 +112058,6 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newPushParserCtxt(stru * else: * c_ctxt = xmlparser.xmlCreatePushParserCtxt( */ - __Pyx_TraceLine(932,0,__PYX_ERR(2, 932, __pyx_L1_error)) (void)(htmlCtxtUseOptions(__pyx_v_c_ctxt, __pyx_v_self->_parse_options)); /* "src/lxml/parser.pxi":930 @@ -119674,7 +112086,6 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newPushParserCtxt(stru * NULL, NULL, NULL, 0, c_filename) * if c_ctxt is not NULL: */ - __Pyx_TraceLine(934,0,__PYX_ERR(2, 934, __pyx_L1_error)) /*else*/ { /* "src/lxml/parser.pxi":935 @@ -119684,7 +112095,6 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newPushParserCtxt(stru * if c_ctxt is not NULL: * xmlparser.xmlCtxtUseOptions(c_ctxt, self._parse_options) */ - __Pyx_TraceLine(935,0,__PYX_ERR(2, 935, __pyx_L1_error)) __pyx_v_c_ctxt = xmlCreatePushParserCtxt(NULL, NULL, NULL, 0, __pyx_v_c_filename); /* "src/lxml/parser.pxi":936 @@ -119694,7 +112104,6 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newPushParserCtxt(stru * xmlparser.xmlCtxtUseOptions(c_ctxt, self._parse_options) * if c_ctxt is NULL: */ - __Pyx_TraceLine(936,0,__PYX_ERR(2, 936, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_ctxt != NULL) != 0); if (__pyx_t_2) { @@ -119705,7 +112114,6 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newPushParserCtxt(stru * if c_ctxt is NULL: * raise MemoryError() */ - __Pyx_TraceLine(937,0,__PYX_ERR(2, 937, __pyx_L1_error)) (void)(xmlCtxtUseOptions(__pyx_v_c_ctxt, __pyx_v_self->_parse_options)); /* "src/lxml/parser.pxi":936 @@ -119726,7 +112134,6 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newPushParserCtxt(stru * raise MemoryError() * c_ctxt.sax.startDocument = _initSaxDocument */ - __Pyx_TraceLine(938,0,__PYX_ERR(2, 938, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_ctxt == NULL) != 0); if (unlikely(__pyx_t_2)) { @@ -119737,7 +112144,6 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newPushParserCtxt(stru * c_ctxt.sax.startDocument = _initSaxDocument * return c_ctxt */ - __Pyx_TraceLine(939,0,__PYX_ERR(2, 939, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(2, 939, __pyx_L1_error) /* "src/lxml/parser.pxi":938 @@ -119756,7 +112162,6 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newPushParserCtxt(stru * return c_ctxt * */ - __Pyx_TraceLine(940,0,__PYX_ERR(2, 940, __pyx_L1_error)) __pyx_v_c_ctxt->sax->startDocument = __pyx_f_4lxml_5etree__initSaxDocument; /* "src/lxml/parser.pxi":941 @@ -119766,7 +112171,6 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newPushParserCtxt(stru * * property error_log: */ - __Pyx_TraceLine(941,0,__PYX_ERR(2, 941, __pyx_L1_error)) __pyx_r = __pyx_v_c_ctxt; goto __pyx_L0; @@ -119784,7 +112188,6 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newPushParserCtxt(stru __Pyx_AddTraceback("lxml.etree._BaseParser._newPushParserCtxt", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -119813,11 +112216,9 @@ static PyObject *__pyx_pw_4lxml_5etree_11_BaseParser_9error_log_1__get__(PyObjec static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_9error_log___get__(struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_self) { struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_v_context = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[2], 946, 0, __PYX_ERR(2, 946, __pyx_L1_error)); /* "src/lxml/parser.pxi":948 * def __get__(self): @@ -119826,7 +112227,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_9error_log___get__(struct _ * return context._error_log.copy() * */ - __Pyx_TraceLine(948,0,__PYX_ERR(2, 948, __pyx_L1_error)) __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) __Pyx_GOTREF(__pyx_t_1); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_1); @@ -119839,7 +112239,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_9error_log___get__(struct _ * * property resolvers: */ - __Pyx_TraceLine(949,0,__PYX_ERR(2, 949, __pyx_L1_error)) __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) __Pyx_GOTREF(__pyx_t_1); @@ -119863,7 +112262,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_9error_log___get__(struct _ __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -119891,10 +112289,8 @@ static PyObject *__pyx_pw_4lxml_5etree_11_BaseParser_9resolvers_1__get__(PyObjec static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_9resolvers___get__(struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[2], 953, 0, __PYX_ERR(2, 953, __pyx_L1_error)); /* "src/lxml/parser.pxi":954 * u"The custom resolver registry of this parser." @@ -119903,7 +112299,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_9resolvers___get__(struct _ * * property version: */ - __Pyx_TraceLine(954,0,__PYX_ERR(2, 954, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->_resolvers)); __pyx_r = ((PyObject *)__pyx_v_self->_resolvers); @@ -119918,12 +112313,8 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_9resolvers___get__(struct _ */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._BaseParser.resolvers.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -119951,12 +112342,10 @@ static PyObject *__pyx_pw_4lxml_5etree_11_BaseParser_7version_1__get__(PyObject static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_7version___get__(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[2], 958, 0, __PYX_ERR(2, 958, __pyx_L1_error)); /* "src/lxml/parser.pxi":959 * u"The version of the underlying XML parser." @@ -119965,11 +112354,10 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_7version___get__(CYTHON_UNU * * def setElementClassLookup(self, ElementClassLookup lookup = None): */ - __Pyx_TraceLine(959,0,__PYX_ERR(2, 959, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_LIBXML_VERSION); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 959, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_LIBXML_VERSION); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 959, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_libxml2_d_d_d, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 959, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_libxml2_d_d_d, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 959, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; @@ -119992,7 +112380,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_7version___get__(CYTHON_UNU __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -120008,7 +112395,7 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_7version___get__(CYTHON_UNU /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_11_BaseParser_3setElementClassLookup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_11_BaseParser_2setElementClassLookup[] = ":deprecated: use ``parser.set_element_class_lookup(lookup)`` instead."; -static PyMethodDef __pyx_mdef_4lxml_5etree_11_BaseParser_3setElementClassLookup = {"setElementClassLookup", (PyCFunction)__pyx_pw_4lxml_5etree_11_BaseParser_3setElementClassLookup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_11_BaseParser_2setElementClassLookup}; +static PyMethodDef __pyx_mdef_4lxml_5etree_11_BaseParser_3setElementClassLookup = {"setElementClassLookup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_11_BaseParser_3setElementClassLookup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_11_BaseParser_2setElementClassLookup}; static PyObject *__pyx_pw_4lxml_5etree_11_BaseParser_3setElementClassLookup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct LxmlElementClassLookup *__pyx_v_lookup = 0; PyObject *__pyx_r = 0; @@ -120070,15 +112457,11 @@ static PyObject *__pyx_pw_4lxml_5etree_11_BaseParser_3setElementClassLookup(PyOb static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_2setElementClassLookup(struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_self, struct LxmlElementClassLookup *__pyx_v_lookup) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__235) __Pyx_RefNannySetupContext("setElementClassLookup", 0); - __Pyx_TraceCall("setElementClassLookup", __pyx_f[2], 961, 0, __PYX_ERR(2, 961, __pyx_L1_error)); /* "src/lxml/parser.pxi":963 * def setElementClassLookup(self, ElementClassLookup lookup = None): @@ -120087,7 +112470,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_2setElementClassLookup(stru * * def set_element_class_lookup(self, ElementClassLookup lookup = None): */ - __Pyx_TraceLine(963,0,__PYX_ERR(2, 963, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_element_class_lookup); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 963, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; @@ -120100,38 +112482,10 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_2setElementClassLookup(stru __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_lookup)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 963, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)__pyx_v_lookup)}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 963, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)__pyx_v_lookup)}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 963, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 963, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_lookup)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_lookup)); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject *)__pyx_v_lookup)); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 963, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_lookup)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_lookup)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 963, __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; @@ -120150,12 +112504,10 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_2setElementClassLookup(stru __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("lxml.etree._BaseParser.setElementClassLookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -120171,7 +112523,7 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_2setElementClassLookup(stru /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_11_BaseParser_5set_element_class_lookup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_11_BaseParser_4set_element_class_lookup[] = "set_element_class_lookup(self, lookup = None)\n\n Set a lookup scheme for element classes generated from this parser.\n\n Reset it by passing None or nothing.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_11_BaseParser_5set_element_class_lookup = {"set_element_class_lookup", (PyCFunction)__pyx_pw_4lxml_5etree_11_BaseParser_5set_element_class_lookup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_11_BaseParser_4set_element_class_lookup}; +static PyMethodDef __pyx_mdef_4lxml_5etree_11_BaseParser_5set_element_class_lookup = {"set_element_class_lookup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_11_BaseParser_5set_element_class_lookup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_11_BaseParser_4set_element_class_lookup}; static PyObject *__pyx_pw_4lxml_5etree_11_BaseParser_5set_element_class_lookup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct LxmlElementClassLookup *__pyx_v_lookup = 0; PyObject *__pyx_r = 0; @@ -120233,11 +112585,8 @@ static PyObject *__pyx_pw_4lxml_5etree_11_BaseParser_5set_element_class_lookup(P static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_4set_element_class_lookup(struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_self, struct LxmlElementClassLookup *__pyx_v_lookup) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - __Pyx_TraceFrameInit(__pyx_codeobj__236) __Pyx_RefNannySetupContext("set_element_class_lookup", 0); - __Pyx_TraceCall("set_element_class_lookup", __pyx_f[2], 965, 0, __PYX_ERR(2, 965, __pyx_L1_error)); /* "src/lxml/parser.pxi":972 * Reset it by passing None or nothing. @@ -120246,7 +112595,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_4set_element_class_lookup(s * * cdef _BaseParser _copy(self): */ - __Pyx_TraceLine(972,0,__PYX_ERR(2, 972, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_lookup)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lookup)); __Pyx_GOTREF(__pyx_v_self->_class_lookup); @@ -120263,13 +112611,7 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_4set_element_class_lookup(s /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._BaseParser.set_element_class_lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -120285,7 +112627,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_4set_element_class_lookup(s static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_11_BaseParser__copy(struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_self) { struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_parser = 0; struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -120293,7 +112634,6 @@ static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_11_BasePa int __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("_copy", 0); - __Pyx_TraceCall("_copy", __pyx_f[2], 974, 0, __PYX_ERR(2, 974, __pyx_L1_error)); /* "src/lxml/parser.pxi":977 * u"Create a new parser with the same configuration." @@ -120302,7 +112642,6 @@ static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_11_BasePa * parser._parse_options = self._parse_options * parser._for_html = self._for_html */ - __Pyx_TraceLine(977,0,__PYX_ERR(2, 977, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; @@ -120315,12 +112654,9 @@ static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_11_BasePa __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 977, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 977, __pyx_L1_error) - } + __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(2, 977, __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__BaseParser))))) __PYX_ERR(2, 977, __pyx_L1_error) @@ -120334,7 +112670,6 @@ static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_11_BasePa * parser._for_html = self._for_html * parser._remove_comments = self._remove_comments */ - __Pyx_TraceLine(978,0,__PYX_ERR(2, 978, __pyx_L1_error)) __pyx_t_4 = __pyx_v_self->_parse_options; __pyx_v_parser->_parse_options = __pyx_t_4; @@ -120345,7 +112680,6 @@ static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_11_BasePa * parser._remove_comments = self._remove_comments * parser._remove_pis = self._remove_pis */ - __Pyx_TraceLine(979,0,__PYX_ERR(2, 979, __pyx_L1_error)) __pyx_t_5 = __pyx_v_self->_for_html; __pyx_v_parser->_for_html = __pyx_t_5; @@ -120356,7 +112690,6 @@ static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_11_BasePa * parser._remove_pis = self._remove_pis * parser._strip_cdata = self._strip_cdata */ - __Pyx_TraceLine(980,0,__PYX_ERR(2, 980, __pyx_L1_error)) __pyx_t_5 = __pyx_v_self->_remove_comments; __pyx_v_parser->_remove_comments = __pyx_t_5; @@ -120367,7 +112700,6 @@ static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_11_BasePa * parser._strip_cdata = self._strip_cdata * parser._filename = self._filename */ - __Pyx_TraceLine(981,0,__PYX_ERR(2, 981, __pyx_L1_error)) __pyx_t_5 = __pyx_v_self->_remove_pis; __pyx_v_parser->_remove_pis = __pyx_t_5; @@ -120378,7 +112710,6 @@ static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_11_BasePa * parser._filename = self._filename * parser._resolvers = self._resolvers */ - __Pyx_TraceLine(982,0,__PYX_ERR(2, 982, __pyx_L1_error)) __pyx_t_5 = __pyx_v_self->_strip_cdata; __pyx_v_parser->_strip_cdata = __pyx_t_5; @@ -120389,7 +112720,6 @@ static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_11_BasePa * parser._resolvers = self._resolvers * parser.target = self.target */ - __Pyx_TraceLine(983,0,__PYX_ERR(2, 983, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_filename; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -120405,7 +112735,6 @@ static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_11_BasePa * parser.target = self.target * parser._class_lookup = self._class_lookup */ - __Pyx_TraceLine(984,0,__PYX_ERR(2, 984, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_v_self->_resolvers); __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -120421,7 +112750,6 @@ static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_11_BasePa * parser._class_lookup = self._class_lookup * parser._default_encoding = self._default_encoding */ - __Pyx_TraceLine(985,0,__PYX_ERR(2, 985, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->target; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -120437,7 +112765,6 @@ static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_11_BasePa * parser._default_encoding = self._default_encoding * parser._schema = self._schema */ - __Pyx_TraceLine(986,0,__PYX_ERR(2, 986, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_v_self->_class_lookup); __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -120453,7 +112780,6 @@ static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_11_BasePa * parser._schema = self._schema * parser._events_to_collect = self._events_to_collect */ - __Pyx_TraceLine(987,0,__PYX_ERR(2, 987, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_default_encoding; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -120469,7 +112795,6 @@ static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_11_BasePa * parser._events_to_collect = self._events_to_collect * return parser */ - __Pyx_TraceLine(988,0,__PYX_ERR(2, 988, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_v_self->_schema); __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -120485,7 +112810,6 @@ static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_11_BasePa * return parser * */ - __Pyx_TraceLine(989,0,__PYX_ERR(2, 989, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_events_to_collect; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -120501,7 +112825,6 @@ static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_11_BasePa * * def copy(self): */ - __Pyx_TraceLine(990,0,__PYX_ERR(2, 990, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_parser)); __pyx_r = __pyx_v_parser; @@ -120525,7 +112848,6 @@ static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_11_BasePa __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_parser); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -120555,12 +112877,9 @@ static PyObject *__pyx_pw_4lxml_5etree_11_BaseParser_7copy(PyObject *__pyx_v_sel static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_6copy(struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__237) __Pyx_RefNannySetupContext("copy", 0); - __Pyx_TraceCall("copy", __pyx_f[2], 992, 0, __PYX_ERR(2, 992, __pyx_L1_error)); /* "src/lxml/parser.pxi":997 * Create a new parser with the same configuration. @@ -120569,7 +112888,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_6copy(struct __pyx_obj_4lxm * * def makeelement(self, _tag, attrib=None, nsmap=None, **_extra): */ - __Pyx_TraceLine(997,0,__PYX_ERR(2, 997, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_copy(__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -120592,7 +112910,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_6copy(struct __pyx_obj_4lxm __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -120608,7 +112925,7 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_6copy(struct __pyx_obj_4lxm /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_11_BaseParser_9makeelement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_11_BaseParser_8makeelement[] = "makeelement(self, _tag, attrib=None, nsmap=None, **_extra)\n\n Creates a new element associated with this parser.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_11_BaseParser_9makeelement = {"makeelement", (PyCFunction)__pyx_pw_4lxml_5etree_11_BaseParser_9makeelement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_11_BaseParser_8makeelement}; +static PyMethodDef __pyx_mdef_4lxml_5etree_11_BaseParser_9makeelement = {"makeelement", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_11_BaseParser_9makeelement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_11_BaseParser_8makeelement}; static PyObject *__pyx_pw_4lxml_5etree_11_BaseParser_9makeelement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v__tag = 0; PyObject *__pyx_v_attrib = 0; @@ -120692,12 +113009,9 @@ static PyObject *__pyx_pw_4lxml_5etree_11_BaseParser_9makeelement(PyObject *__py static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_8makeelement(struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_self, PyObject *__pyx_v__tag, PyObject *__pyx_v_attrib, PyObject *__pyx_v_nsmap, PyObject *__pyx_v__extra) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__238) __Pyx_RefNannySetupContext("makeelement", 0); - __Pyx_TraceCall("makeelement", __pyx_f[2], 999, 0, __PYX_ERR(2, 999, __pyx_L1_error)); /* "src/lxml/parser.pxi":1004 * Creates a new element associated with this parser. @@ -120706,7 +113020,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_8makeelement(struct __pyx_o * attrib, nsmap, _extra) * */ - __Pyx_TraceLine(1004,0,__PYX_ERR(2, 1004, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); /* "src/lxml/parser.pxi":1005 @@ -120716,7 +113029,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_8makeelement(struct __pyx_o * * # internal parser methods */ - __Pyx_TraceLine(1005,0,__PYX_ERR(2, 1005, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__makeElement(__pyx_v__tag, NULL, ((struct LxmlDocument *)Py_None), __pyx_v_self, Py_None, Py_None, __pyx_v_attrib, __pyx_v_nsmap, __pyx_v__extra)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; @@ -120738,7 +113050,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_8makeelement(struct __pyx_o __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -120763,7 +113074,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ int __pyx_v_is_pep393_string; int __pyx_v_orig_options; xmlDoc *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -120782,7 +113092,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ PyObject *__pyx_t_15 = NULL; int __pyx_t_16; __Pyx_RefNannySetupContext("_parseUnicodeDoc", 0); - __Pyx_TraceCall("_parseUnicodeDoc", __pyx_f[2], 1009, 0, __PYX_ERR(2, 1009, __pyx_L1_error)); /* "src/lxml/parser.pxi":1018 * cdef int buffer_len, c_kind @@ -120791,7 +113100,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * cdef bint is_pep393_string = ( * python.PEP393_ENABLED and python.PyUnicode_IS_READY(utext)) */ - __Pyx_TraceLine(1018,0,__PYX_ERR(2, 1018, __pyx_L1_error)) __pyx_v_c_encoding = __pyx_v_4lxml_5etree__UNICODE_ENCODING; /* "src/lxml/parser.pxi":1020 @@ -120801,7 +113109,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * if is_pep393_string: * c_text = python.PyUnicode_DATA(utext) */ - __Pyx_TraceLine(1020,0,__PYX_ERR(2, 1020, __pyx_L1_error)) __pyx_t_2 = (CYTHON_PEP393_ENABLED != 0); if (__pyx_t_2) { } else { @@ -120820,7 +113127,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * c_text = python.PyUnicode_DATA(utext) * py_buffer_len = python.PyUnicode_GET_LENGTH(utext) */ - __Pyx_TraceLine(1021,0,__PYX_ERR(2, 1021, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_is_pep393_string != 0); if (__pyx_t_1) { @@ -120831,7 +113137,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * py_buffer_len = python.PyUnicode_GET_LENGTH(utext) * c_kind = python.PyUnicode_KIND(utext) */ - __Pyx_TraceLine(1022,0,__PYX_ERR(2, 1022, __pyx_L1_error)) __pyx_v_c_text = ((const char *)PyUnicode_DATA(__pyx_v_utext)); /* "src/lxml/parser.pxi":1023 @@ -120841,7 +113146,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * c_kind = python.PyUnicode_KIND(utext) * if c_kind == 1: */ - __Pyx_TraceLine(1023,0,__PYX_ERR(2, 1023, __pyx_L1_error)) __pyx_v_py_buffer_len = PyUnicode_GET_LENGTH(__pyx_v_utext); /* "src/lxml/parser.pxi":1024 @@ -120851,7 +113155,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * if c_kind == 1: * c_encoding = 'ISO-8859-1' */ - __Pyx_TraceLine(1024,0,__PYX_ERR(2, 1024, __pyx_L1_error)) __pyx_v_c_kind = PyUnicode_KIND(__pyx_v_utext); /* "src/lxml/parser.pxi":1025 @@ -120861,7 +113164,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * c_encoding = 'ISO-8859-1' * elif c_kind == 2: */ - __Pyx_TraceLine(1025,0,__PYX_ERR(2, 1025, __pyx_L1_error)) switch (__pyx_v_c_kind) { case 1: @@ -120872,7 +113174,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * elif c_kind == 2: * py_buffer_len *= 2 */ - __Pyx_TraceLine(1026,0,__PYX_ERR(2, 1026, __pyx_L1_error)) __pyx_v_c_encoding = ((const char *)"ISO-8859-1"); /* "src/lxml/parser.pxi":1025 @@ -120883,15 +113184,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * elif c_kind == 2: */ break; - - /* "src/lxml/parser.pxi":1027 - * if c_kind == 1: - * c_encoding = 'ISO-8859-1' - * elif c_kind == 2: # <<<<<<<<<<<<<< - * py_buffer_len *= 2 - * if python.PY_BIG_ENDIAN: - */ - __Pyx_TraceLine(1027,0,__PYX_ERR(2, 1027, __pyx_L1_error)) case 2: /* "src/lxml/parser.pxi":1028 @@ -120901,7 +113193,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * if python.PY_BIG_ENDIAN: * c_encoding = 'UTF-16BE' # actually UCS-2 */ - __Pyx_TraceLine(1028,0,__PYX_ERR(2, 1028, __pyx_L1_error)) __pyx_v_py_buffer_len = (__pyx_v_py_buffer_len * 2); /* "src/lxml/parser.pxi":1029 @@ -120911,7 +113202,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * c_encoding = 'UTF-16BE' # actually UCS-2 * else: */ - __Pyx_TraceLine(1029,0,__PYX_ERR(2, 1029, __pyx_L1_error)) __pyx_t_1 = (PY_BIG_ENDIAN != 0); if (__pyx_t_1) { @@ -120922,7 +113212,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * else: * c_encoding = 'UTF-16LE' # actually UCS-2 */ - __Pyx_TraceLine(1030,0,__PYX_ERR(2, 1030, __pyx_L1_error)) __pyx_v_c_encoding = ((const char *)"UTF-16BE"); /* "src/lxml/parser.pxi":1029 @@ -120942,7 +113231,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * elif c_kind == 4: * py_buffer_len *= 4 */ - __Pyx_TraceLine(1032,0,__PYX_ERR(2, 1032, __pyx_L1_error)) /*else*/ { __pyx_v_c_encoding = ((const char *)"UTF-16LE"); } @@ -120956,15 +113244,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * if python.PY_BIG_ENDIAN: */ break; - - /* "src/lxml/parser.pxi":1033 - * else: - * c_encoding = 'UTF-16LE' # actually UCS-2 - * elif c_kind == 4: # <<<<<<<<<<<<<< - * py_buffer_len *= 4 - * if python.PY_BIG_ENDIAN: - */ - __Pyx_TraceLine(1033,0,__PYX_ERR(2, 1033, __pyx_L1_error)) case 4: /* "src/lxml/parser.pxi":1034 @@ -120974,7 +113253,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * if python.PY_BIG_ENDIAN: * c_encoding = 'UCS-4BE' */ - __Pyx_TraceLine(1034,0,__PYX_ERR(2, 1034, __pyx_L1_error)) __pyx_v_py_buffer_len = (__pyx_v_py_buffer_len * 4); /* "src/lxml/parser.pxi":1035 @@ -120984,7 +113262,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * c_encoding = 'UCS-4BE' * else: */ - __Pyx_TraceLine(1035,0,__PYX_ERR(2, 1035, __pyx_L1_error)) __pyx_t_1 = (PY_BIG_ENDIAN != 0); if (__pyx_t_1) { @@ -120995,7 +113272,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * else: * c_encoding = 'UCS-4LE' */ - __Pyx_TraceLine(1036,0,__PYX_ERR(2, 1036, __pyx_L1_error)) __pyx_v_c_encoding = ((const char *)"UCS-4BE"); /* "src/lxml/parser.pxi":1035 @@ -121015,7 +113291,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * else: * assert False, f"Illegal Unicode kind {c_kind}" */ - __Pyx_TraceLine(1038,0,__PYX_ERR(2, 1038, __pyx_L1_error)) /*else*/ { __pyx_v_c_encoding = ((const char *)"UCS-4LE"); } @@ -121038,7 +113313,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * else: * py_buffer_len = python.PyUnicode_GET_DATA_SIZE(utext) */ - __Pyx_TraceLine(1040,0,__PYX_ERR(2, 1040, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!0)) { @@ -121073,7 +113347,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * c_text = python.PyUnicode_AS_DATA(utext) * assert py_buffer_len <= limits.INT_MAX */ - __Pyx_TraceLine(1042,0,__PYX_ERR(2, 1042, __pyx_L1_error)) /*else*/ { __pyx_v_py_buffer_len = PyUnicode_GET_DATA_SIZE(__pyx_v_utext); @@ -121084,7 +113357,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * assert py_buffer_len <= limits.INT_MAX * buffer_len = py_buffer_len */ - __Pyx_TraceLine(1043,0,__PYX_ERR(2, 1043, __pyx_L1_error)) __pyx_v_c_text = PyUnicode_AS_DATA(__pyx_v_utext); } __pyx_L5:; @@ -121096,7 +113368,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * buffer_len = py_buffer_len * */ - __Pyx_TraceLine(1044,0,__PYX_ERR(2, 1044, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_py_buffer_len <= INT_MAX) != 0))) { @@ -121113,7 +113384,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * * context = self._getParserContext() */ - __Pyx_TraceLine(1045,0,__PYX_ERR(2, 1045, __pyx_L1_error)) __pyx_v_buffer_len = __pyx_v_py_buffer_len; /* "src/lxml/parser.pxi":1047 @@ -121123,7 +113393,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * context.prepare() * try: */ - __Pyx_TraceLine(1047,0,__PYX_ERR(2, 1047, __pyx_L1_error)) __pyx_t_4 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_getParserContext(__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_4); @@ -121136,7 +113405,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * try: * pctxt = context._c_ctxt */ - __Pyx_TraceLine(1048,0,__PYX_ERR(2, 1048, __pyx_L1_error)) __pyx_t_5 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->prepare(__pyx_v_context); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L1_error) /* "src/lxml/parser.pxi":1049 @@ -121146,7 +113414,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * pctxt = context._c_ctxt * __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt) */ - __Pyx_TraceLine(1049,0,__PYX_ERR(2, 1049, __pyx_L9_error)) /*try:*/ { /* "src/lxml/parser.pxi":1050 @@ -121156,7 +113423,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt) * orig_options = pctxt.options */ - __Pyx_TraceLine(1050,0,__PYX_ERR(2, 1050, __pyx_L9_error)) __pyx_t_6 = __pyx_v_context->_c_ctxt; __pyx_v_pctxt = __pyx_t_6; @@ -121167,7 +113433,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * orig_options = pctxt.options * with nogil: */ - __Pyx_TraceLine(1051,0,__PYX_ERR(2, 1051, __pyx_L9_error)) __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initParserDict(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, __pyx_v_pctxt); /* "src/lxml/parser.pxi":1052 @@ -121177,7 +113442,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * with nogil: * if self._for_html: */ - __Pyx_TraceLine(1052,0,__PYX_ERR(2, 1052, __pyx_L9_error)) __pyx_t_5 = __pyx_v_pctxt->options; __pyx_v_orig_options = __pyx_t_5; @@ -121188,7 +113452,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * if self._for_html: * result = htmlparser.htmlCtxtReadMemory( */ - __Pyx_TraceLine(1053,0,__PYX_ERR(2, 1053, __pyx_L9_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -121204,7 +113467,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * result = htmlparser.htmlCtxtReadMemory( * pctxt, c_text, buffer_len, c_filename, c_encoding, */ - __Pyx_TraceLine(1054,1,__PYX_ERR(2, 1054, __pyx_L12_error)) __pyx_t_1 = (__pyx_v_self->_for_html != 0); if (__pyx_t_1) { @@ -121215,7 +113477,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * pctxt, c_text, buffer_len, c_filename, c_encoding, * self._parse_options) */ - __Pyx_TraceLine(1055,1,__PYX_ERR(2, 1055, __pyx_L12_error)) __pyx_v_result = htmlCtxtReadMemory(__pyx_v_pctxt, __pyx_v_c_text, __pyx_v_buffer_len, __pyx_v_c_filename, __pyx_v_c_encoding, __pyx_v_self->_parse_options); /* "src/lxml/parser.pxi":1058 @@ -121225,7 +113486,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * if _fixHtmlDictNames(pctxt.dict, result) < 0: * tree.xmlFreeDoc(result) */ - __Pyx_TraceLine(1058,1,__PYX_ERR(2, 1058, __pyx_L12_error)) __pyx_t_1 = ((__pyx_v_result != NULL) != 0); if (__pyx_t_1) { @@ -121236,7 +113496,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * tree.xmlFreeDoc(result) * result = NULL */ - __Pyx_TraceLine(1059,1,__PYX_ERR(2, 1059, __pyx_L12_error)) __pyx_t_1 = ((__pyx_f_4lxml_5etree__fixHtmlDictNames(__pyx_v_pctxt->dict, __pyx_v_result) < 0) != 0); if (__pyx_t_1) { @@ -121247,7 +113506,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * result = NULL * else: */ - __Pyx_TraceLine(1060,1,__PYX_ERR(2, 1060, __pyx_L12_error)) xmlFreeDoc(__pyx_v_result); /* "src/lxml/parser.pxi":1061 @@ -121257,7 +113515,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * else: * result = xmlparser.xmlCtxtReadMemory( */ - __Pyx_TraceLine(1061,1,__PYX_ERR(2, 1061, __pyx_L12_error)) __pyx_v_result = NULL; /* "src/lxml/parser.pxi":1059 @@ -121295,7 +113552,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * pctxt, c_text, buffer_len, c_filename, c_encoding, * self._parse_options) */ - __Pyx_TraceLine(1063,1,__PYX_ERR(2, 1063, __pyx_L12_error)) /*else*/ { /* "src/lxml/parser.pxi":1065 @@ -121305,7 +113561,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * pctxt.options = orig_options # work around libxml2 problem * */ - __Pyx_TraceLine(1065,1,__PYX_ERR(2, 1065, __pyx_L12_error)) __pyx_v_result = xmlCtxtReadMemory(__pyx_v_pctxt, __pyx_v_c_text, __pyx_v_buffer_len, __pyx_v_c_filename, __pyx_v_c_encoding, __pyx_v_self->_parse_options); } __pyx_L14:; @@ -121318,7 +113573,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * if self._for_html: * result = htmlparser.htmlCtxtReadMemory( */ - __Pyx_TraceLine(1053,1,__PYX_ERR(2, 1053, __pyx_L9_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -121327,13 +113581,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ #endif goto __pyx_L13; } - __pyx_L12_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L9_error; - } __pyx_L13:; } } @@ -121345,7 +113592,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * * return context._handleParseResultDoc(self, result, None) */ - __Pyx_TraceLine(1066,0,__PYX_ERR(2, 1066, __pyx_L9_error)) __pyx_v_pctxt->options = __pyx_v_orig_options; /* "src/lxml/parser.pxi":1068 @@ -121355,7 +113601,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * finally: * context.cleanup() */ - __Pyx_TraceLine(1068,0,__PYX_ERR(2, 1068, __pyx_L9_error)) __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->_handleParseResultDoc(__pyx_v_context, __pyx_v_self, __pyx_v_result, Py_None); if (unlikely(__pyx_t_7 == ((xmlDoc *)NULL))) __PYX_ERR(2, 1068, __pyx_L9_error) __pyx_r = __pyx_t_7; goto __pyx_L8_return; @@ -121368,7 +113613,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ * * cdef xmlDoc* _parseDoc(self, char* c_text, int c_len, */ - __Pyx_TraceLine(1070,0,__PYX_ERR(2, 1070, __pyx_L1_error)) /*finally:*/ { __pyx_L9_error:; /*exception exit:*/{ @@ -121439,7 +113683,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc(struct __pyx_ __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -121460,7 +113703,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx xmlCharEncoding __pyx_v_enc; int __pyx_v_orig_options; xmlDoc *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -121478,7 +113720,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx PyObject *__pyx_t_14 = NULL; int __pyx_t_15; __Pyx_RefNannySetupContext("_parseDoc", 0); - __Pyx_TraceCall("_parseDoc", __pyx_f[2], 1072, 0, __PYX_ERR(2, 1072, __pyx_L1_error)); /* "src/lxml/parser.pxi":1081 * cdef char* c_encoding @@ -121487,7 +113728,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * context.prepare() * try: */ - __Pyx_TraceLine(1081,0,__PYX_ERR(2, 1081, __pyx_L1_error)) __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, 1081, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_1); @@ -121500,7 +113740,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * try: * pctxt = context._c_ctxt */ - __Pyx_TraceLine(1082,0,__PYX_ERR(2, 1082, __pyx_L1_error)) __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->prepare(__pyx_v_context); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(2, 1082, __pyx_L1_error) /* "src/lxml/parser.pxi":1083 @@ -121510,7 +113749,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * pctxt = context._c_ctxt * __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt) */ - __Pyx_TraceLine(1083,0,__PYX_ERR(2, 1083, __pyx_L4_error)) /*try:*/ { /* "src/lxml/parser.pxi":1084 @@ -121520,7 +113758,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt) * */ - __Pyx_TraceLine(1084,0,__PYX_ERR(2, 1084, __pyx_L4_error)) __pyx_t_3 = __pyx_v_context->_c_ctxt; __pyx_v_pctxt = __pyx_t_3; @@ -121531,7 +113768,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * * if self._default_encoding is None: */ - __Pyx_TraceLine(1085,0,__PYX_ERR(2, 1085, __pyx_L4_error)) __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initParserDict(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, __pyx_v_pctxt); /* "src/lxml/parser.pxi":1087 @@ -121541,7 +113777,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * c_encoding = NULL * # libxml2 (at least 2.9.3) does not recognise UTF-32 BOMs */ - __Pyx_TraceLine(1087,0,__PYX_ERR(2, 1087, __pyx_L4_error)) __pyx_t_4 = (__pyx_v_self->_default_encoding == Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { @@ -121553,7 +113788,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * # libxml2 (at least 2.9.3) does not recognise UTF-32 BOMs * # NOTE: limit to problematic cases because it changes character offsets */ - __Pyx_TraceLine(1088,0,__PYX_ERR(2, 1088, __pyx_L4_error)) __pyx_v_c_encoding = NULL; /* "src/lxml/parser.pxi":1091 @@ -121563,7 +113797,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * c_text[2] == 0 and c_text[3] == 0): * c_encoding = "UTF-32LE" */ - __Pyx_TraceLine(1091,0,__PYX_ERR(2, 1091, __pyx_L4_error)) __pyx_t_4 = ((__pyx_v_c_len >= 4) != 0); if (__pyx_t_4) { } else { @@ -121590,7 +113823,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * c_encoding = "UTF-32LE" * c_text += 4 */ - __Pyx_TraceLine(1092,0,__PYX_ERR(2, 1092, __pyx_L4_error)) __pyx_t_4 = (((__pyx_v_c_text[2]) == 0) != 0); if (__pyx_t_4) { } else { @@ -121608,7 +113840,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * c_text[2] == 0 and c_text[3] == 0): * c_encoding = "UTF-32LE" */ - __Pyx_TraceLine(1091,0,__PYX_ERR(2, 1091, __pyx_L4_error)) if (__pyx_t_5) { /* "src/lxml/parser.pxi":1093 @@ -121618,7 +113849,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * c_text += 4 * c_len -= 4 */ - __Pyx_TraceLine(1093,0,__PYX_ERR(2, 1093, __pyx_L4_error)) __pyx_v_c_encoding = ((char *)"UTF-32LE"); /* "src/lxml/parser.pxi":1094 @@ -121628,7 +113858,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * c_len -= 4 * elif c_len >= 4 and (c_text[0] == 0 and c_text[1] == 0 and */ - __Pyx_TraceLine(1094,0,__PYX_ERR(2, 1094, __pyx_L4_error)) __pyx_v_c_text = (__pyx_v_c_text + 4); /* "src/lxml/parser.pxi":1095 @@ -121638,7 +113867,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * elif c_len >= 4 and (c_text[0] == 0 and c_text[1] == 0 and * c_text[2] == '\xFE' and c_text[3] == '\xFF'): */ - __Pyx_TraceLine(1095,0,__PYX_ERR(2, 1095, __pyx_L4_error)) __pyx_v_c_len = (__pyx_v_c_len - 4); /* "src/lxml/parser.pxi":1091 @@ -121658,7 +113886,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * c_text[2] == '\xFE' and c_text[3] == '\xFF'): * c_encoding = "UTF-32BE" */ - __Pyx_TraceLine(1096,0,__PYX_ERR(2, 1096, __pyx_L4_error)) __pyx_t_4 = ((__pyx_v_c_len >= 4) != 0); if (__pyx_t_4) { } else { @@ -121685,7 +113912,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * c_encoding = "UTF-32BE" * c_text += 4 */ - __Pyx_TraceLine(1097,0,__PYX_ERR(2, 1097, __pyx_L4_error)) __pyx_t_4 = (((__pyx_v_c_text[2]) == '\xFE') != 0); if (__pyx_t_4) { } else { @@ -121703,7 +113929,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * c_text[2] == '\xFE' and c_text[3] == '\xFF'): * c_encoding = "UTF-32BE" */ - __Pyx_TraceLine(1096,0,__PYX_ERR(2, 1096, __pyx_L4_error)) if (__pyx_t_5) { /* "src/lxml/parser.pxi":1098 @@ -121713,7 +113938,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * c_text += 4 * c_len -= 4 */ - __Pyx_TraceLine(1098,0,__PYX_ERR(2, 1098, __pyx_L4_error)) __pyx_v_c_encoding = ((char *)"UTF-32BE"); /* "src/lxml/parser.pxi":1099 @@ -121723,7 +113947,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * c_len -= 4 * else: */ - __Pyx_TraceLine(1099,0,__PYX_ERR(2, 1099, __pyx_L4_error)) __pyx_v_c_text = (__pyx_v_c_text + 4); /* "src/lxml/parser.pxi":1100 @@ -121733,7 +113956,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * else: * # no BOM => try to determine encoding */ - __Pyx_TraceLine(1100,0,__PYX_ERR(2, 1100, __pyx_L4_error)) __pyx_v_c_len = (__pyx_v_c_len - 4); /* "src/lxml/parser.pxi":1096 @@ -121753,7 +113975,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * if enc == tree.XML_CHAR_ENCODING_UCS4LE: * c_encoding = 'UTF-32LE' */ - __Pyx_TraceLine(1103,0,__PYX_ERR(2, 1103, __pyx_L4_error)) /*else*/ { __pyx_v_enc = xmlDetectCharEncoding(((const xmlChar *)__pyx_v_c_text), __pyx_v_c_len); @@ -121764,7 +113985,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * c_encoding = 'UTF-32LE' * elif enc == tree.XML_CHAR_ENCODING_UCS4BE: */ - __Pyx_TraceLine(1104,0,__PYX_ERR(2, 1104, __pyx_L4_error)) switch (__pyx_v_enc) { case XML_CHAR_ENCODING_UCS4LE: @@ -121775,7 +113995,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * elif enc == tree.XML_CHAR_ENCODING_UCS4BE: * c_encoding = 'UTF-32BE' */ - __Pyx_TraceLine(1105,0,__PYX_ERR(2, 1105, __pyx_L4_error)) __pyx_v_c_encoding = ((char *)"UTF-32LE"); /* "src/lxml/parser.pxi":1104 @@ -121786,15 +114005,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * elif enc == tree.XML_CHAR_ENCODING_UCS4BE: */ break; - - /* "src/lxml/parser.pxi":1106 - * if enc == tree.XML_CHAR_ENCODING_UCS4LE: - * c_encoding = 'UTF-32LE' - * elif enc == tree.XML_CHAR_ENCODING_UCS4BE: # <<<<<<<<<<<<<< - * c_encoding = 'UTF-32BE' - * else: - */ - __Pyx_TraceLine(1106,0,__PYX_ERR(2, 1106, __pyx_L4_error)) case XML_CHAR_ENCODING_UCS4BE: /* "src/lxml/parser.pxi":1107 @@ -121804,7 +114014,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * else: * c_encoding = _cstr(self._default_encoding) */ - __Pyx_TraceLine(1107,0,__PYX_ERR(2, 1107, __pyx_L4_error)) __pyx_v_c_encoding = ((char *)"UTF-32BE"); /* "src/lxml/parser.pxi":1106 @@ -121837,7 +114046,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * * orig_options = pctxt.options */ - __Pyx_TraceLine(1109,0,__PYX_ERR(2, 1109, __pyx_L4_error)) /*else*/ { __pyx_t_1 = __pyx_v_self->_default_encoding; __Pyx_INCREF(__pyx_t_1); @@ -121853,7 +114061,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * with nogil: * if self._for_html: */ - __Pyx_TraceLine(1111,0,__PYX_ERR(2, 1111, __pyx_L4_error)) __pyx_t_2 = __pyx_v_pctxt->options; __pyx_v_orig_options = __pyx_t_2; @@ -121864,7 +114071,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * if self._for_html: * result = htmlparser.htmlCtxtReadMemory( */ - __Pyx_TraceLine(1112,0,__PYX_ERR(2, 1112, __pyx_L4_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -121880,7 +114086,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * result = htmlparser.htmlCtxtReadMemory( * pctxt, c_text, c_len, c_filename, */ - __Pyx_TraceLine(1113,1,__PYX_ERR(2, 1113, __pyx_L19_error)) __pyx_t_5 = (__pyx_v_self->_for_html != 0); if (__pyx_t_5) { @@ -121891,7 +114096,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * pctxt, c_text, c_len, c_filename, * c_encoding, self._parse_options) */ - __Pyx_TraceLine(1114,1,__PYX_ERR(2, 1114, __pyx_L19_error)) __pyx_v_result = htmlCtxtReadMemory(__pyx_v_pctxt, __pyx_v_c_text, __pyx_v_c_len, __pyx_v_c_filename, __pyx_v_c_encoding, __pyx_v_self->_parse_options); /* "src/lxml/parser.pxi":1117 @@ -121901,7 +114105,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * if _fixHtmlDictNames(pctxt.dict, result) < 0: * tree.xmlFreeDoc(result) */ - __Pyx_TraceLine(1117,1,__PYX_ERR(2, 1117, __pyx_L19_error)) __pyx_t_5 = ((__pyx_v_result != NULL) != 0); if (__pyx_t_5) { @@ -121912,7 +114115,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * tree.xmlFreeDoc(result) * result = NULL */ - __Pyx_TraceLine(1118,1,__PYX_ERR(2, 1118, __pyx_L19_error)) __pyx_t_5 = ((__pyx_f_4lxml_5etree__fixHtmlDictNames(__pyx_v_pctxt->dict, __pyx_v_result) < 0) != 0); if (__pyx_t_5) { @@ -121923,7 +114125,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * result = NULL * else: */ - __Pyx_TraceLine(1119,1,__PYX_ERR(2, 1119, __pyx_L19_error)) xmlFreeDoc(__pyx_v_result); /* "src/lxml/parser.pxi":1120 @@ -121933,7 +114134,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * else: * result = xmlparser.xmlCtxtReadMemory( */ - __Pyx_TraceLine(1120,1,__PYX_ERR(2, 1120, __pyx_L19_error)) __pyx_v_result = NULL; /* "src/lxml/parser.pxi":1118 @@ -121971,7 +114171,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * pctxt, c_text, c_len, c_filename, * c_encoding, self._parse_options) */ - __Pyx_TraceLine(1122,1,__PYX_ERR(2, 1122, __pyx_L19_error)) /*else*/ { /* "src/lxml/parser.pxi":1124 @@ -121981,7 +114180,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * pctxt.options = orig_options # work around libxml2 problem * */ - __Pyx_TraceLine(1124,1,__PYX_ERR(2, 1124, __pyx_L19_error)) __pyx_v_result = xmlCtxtReadMemory(__pyx_v_pctxt, __pyx_v_c_text, __pyx_v_c_len, __pyx_v_c_filename, __pyx_v_c_encoding, __pyx_v_self->_parse_options); } __pyx_L21:; @@ -121994,7 +114192,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * if self._for_html: * result = htmlparser.htmlCtxtReadMemory( */ - __Pyx_TraceLine(1112,1,__PYX_ERR(2, 1112, __pyx_L4_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -122003,13 +114200,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx #endif goto __pyx_L20; } - __pyx_L19_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L4_error; - } __pyx_L20:; } } @@ -122021,7 +114211,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * * return context._handleParseResultDoc(self, result, None) */ - __Pyx_TraceLine(1125,0,__PYX_ERR(2, 1125, __pyx_L4_error)) __pyx_v_pctxt->options = __pyx_v_orig_options; /* "src/lxml/parser.pxi":1127 @@ -122031,7 +114220,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * finally: * context.cleanup() */ - __Pyx_TraceLine(1127,0,__PYX_ERR(2, 1127, __pyx_L4_error)) __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->_handleParseResultDoc(__pyx_v_context, __pyx_v_self, __pyx_v_result, Py_None); if (unlikely(__pyx_t_6 == ((xmlDoc *)NULL))) __PYX_ERR(2, 1127, __pyx_L4_error) __pyx_r = __pyx_t_6; goto __pyx_L3_return; @@ -122044,7 +114232,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx * * cdef xmlDoc* _parseDocFromFile(self, char* c_filename) except NULL: */ - __Pyx_TraceLine(1129,0,__PYX_ERR(2, 1129, __pyx_L1_error)) /*finally:*/ { __pyx_L4_error:; /*exception exit:*/{ @@ -122113,7 +114300,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDoc(struct __pyx_obj_4lx __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -122133,7 +114319,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx char *__pyx_v_c_encoding; int __pyx_v_orig_options; xmlDoc *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -122151,7 +114336,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx PyObject *__pyx_t_14 = NULL; int __pyx_t_15; __Pyx_RefNannySetupContext("_parseDocFromFile", 0); - __Pyx_TraceCall("_parseDocFromFile", __pyx_f[2], 1131, 0, __PYX_ERR(2, 1131, __pyx_L1_error)); /* "src/lxml/parser.pxi":1136 * cdef xmlparser.xmlParserCtxt* pctxt @@ -122160,7 +114344,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx * * context = self._getParserContext() */ - __Pyx_TraceLine(1136,0,__PYX_ERR(2, 1136, __pyx_L1_error)) __pyx_v_result = NULL; /* "src/lxml/parser.pxi":1138 @@ -122170,7 +114353,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx * context.prepare() * try: */ - __Pyx_TraceLine(1138,0,__PYX_ERR(2, 1138, __pyx_L1_error)) __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, 1138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_1); @@ -122183,7 +114365,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx * try: * pctxt = context._c_ctxt */ - __Pyx_TraceLine(1139,0,__PYX_ERR(2, 1139, __pyx_L1_error)) __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->prepare(__pyx_v_context); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(2, 1139, __pyx_L1_error) /* "src/lxml/parser.pxi":1140 @@ -122193,7 +114374,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx * pctxt = context._c_ctxt * __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt) */ - __Pyx_TraceLine(1140,0,__PYX_ERR(2, 1140, __pyx_L4_error)) /*try:*/ { /* "src/lxml/parser.pxi":1141 @@ -122203,7 +114383,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx * __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt) * */ - __Pyx_TraceLine(1141,0,__PYX_ERR(2, 1141, __pyx_L4_error)) __pyx_t_3 = __pyx_v_context->_c_ctxt; __pyx_v_pctxt = __pyx_t_3; @@ -122214,7 +114393,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx * * if self._default_encoding is None: */ - __Pyx_TraceLine(1142,0,__PYX_ERR(2, 1142, __pyx_L4_error)) __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initParserDict(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, __pyx_v_pctxt); /* "src/lxml/parser.pxi":1144 @@ -122224,7 +114402,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx * c_encoding = NULL * else: */ - __Pyx_TraceLine(1144,0,__PYX_ERR(2, 1144, __pyx_L4_error)) __pyx_t_4 = (__pyx_v_self->_default_encoding == Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { @@ -122236,7 +114413,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx * else: * c_encoding = _cstr(self._default_encoding) */ - __Pyx_TraceLine(1145,0,__PYX_ERR(2, 1145, __pyx_L4_error)) __pyx_v_c_encoding = NULL; /* "src/lxml/parser.pxi":1144 @@ -122256,7 +114432,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx * * orig_options = pctxt.options */ - __Pyx_TraceLine(1147,0,__PYX_ERR(2, 1147, __pyx_L4_error)) /*else*/ { __pyx_t_1 = __pyx_v_self->_default_encoding; __Pyx_INCREF(__pyx_t_1); @@ -122272,7 +114447,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx * with nogil: * if self._for_html: */ - __Pyx_TraceLine(1149,0,__PYX_ERR(2, 1149, __pyx_L4_error)) __pyx_t_2 = __pyx_v_pctxt->options; __pyx_v_orig_options = __pyx_t_2; @@ -122283,7 +114457,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx * if self._for_html: * result = htmlparser.htmlCtxtReadFile( */ - __Pyx_TraceLine(1150,0,__PYX_ERR(2, 1150, __pyx_L4_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -122299,7 +114472,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx * result = htmlparser.htmlCtxtReadFile( * pctxt, c_filename, c_encoding, self._parse_options) */ - __Pyx_TraceLine(1151,1,__PYX_ERR(2, 1151, __pyx_L8_error)) __pyx_t_5 = (__pyx_v_self->_for_html != 0); if (__pyx_t_5) { @@ -122310,7 +114482,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx * pctxt, c_filename, c_encoding, self._parse_options) * if result is not NULL: */ - __Pyx_TraceLine(1152,1,__PYX_ERR(2, 1152, __pyx_L8_error)) __pyx_v_result = htmlCtxtReadFile(__pyx_v_pctxt, __pyx_v_c_filename, __pyx_v_c_encoding, __pyx_v_self->_parse_options); /* "src/lxml/parser.pxi":1154 @@ -122320,7 +114491,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx * if _fixHtmlDictNames(pctxt.dict, result) < 0: * tree.xmlFreeDoc(result) */ - __Pyx_TraceLine(1154,1,__PYX_ERR(2, 1154, __pyx_L8_error)) __pyx_t_5 = ((__pyx_v_result != NULL) != 0); if (__pyx_t_5) { @@ -122331,7 +114501,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx * tree.xmlFreeDoc(result) * result = NULL */ - __Pyx_TraceLine(1155,1,__PYX_ERR(2, 1155, __pyx_L8_error)) __pyx_t_5 = ((__pyx_f_4lxml_5etree__fixHtmlDictNames(__pyx_v_pctxt->dict, __pyx_v_result) < 0) != 0); if (__pyx_t_5) { @@ -122342,7 +114511,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx * result = NULL * else: */ - __Pyx_TraceLine(1156,1,__PYX_ERR(2, 1156, __pyx_L8_error)) xmlFreeDoc(__pyx_v_result); /* "src/lxml/parser.pxi":1157 @@ -122352,7 +114520,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx * else: * result = xmlparser.xmlCtxtReadFile( */ - __Pyx_TraceLine(1157,1,__PYX_ERR(2, 1157, __pyx_L8_error)) __pyx_v_result = NULL; /* "src/lxml/parser.pxi":1155 @@ -122390,7 +114557,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx * pctxt, c_filename, c_encoding, self._parse_options) * pctxt.options = orig_options # work around libxml2 problem */ - __Pyx_TraceLine(1159,1,__PYX_ERR(2, 1159, __pyx_L8_error)) /*else*/ { /* "src/lxml/parser.pxi":1160 @@ -122400,7 +114566,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx * pctxt.options = orig_options # work around libxml2 problem * */ - __Pyx_TraceLine(1160,1,__PYX_ERR(2, 1160, __pyx_L8_error)) __pyx_v_result = xmlCtxtReadFile(__pyx_v_pctxt, __pyx_v_c_filename, __pyx_v_c_encoding, __pyx_v_self->_parse_options); } __pyx_L10:; @@ -122413,7 +114578,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx * if self._for_html: * result = htmlparser.htmlCtxtReadFile( */ - __Pyx_TraceLine(1150,1,__PYX_ERR(2, 1150, __pyx_L4_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -122422,13 +114586,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx #endif goto __pyx_L9; } - __pyx_L8_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L4_error; - } __pyx_L9:; } } @@ -122440,7 +114597,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx * * return context._handleParseResultDoc(self, result, c_filename) */ - __Pyx_TraceLine(1161,0,__PYX_ERR(2, 1161, __pyx_L4_error)) __pyx_v_pctxt->options = __pyx_v_orig_options; /* "src/lxml/parser.pxi":1163 @@ -122450,7 +114606,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx * finally: * context.cleanup() */ - __Pyx_TraceLine(1163,0,__PYX_ERR(2, 1163, __pyx_L4_error)) __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_c_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1163, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->_handleParseResultDoc(__pyx_v_context, __pyx_v_self, __pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_6 == ((xmlDoc *)NULL))) __PYX_ERR(2, 1163, __pyx_L4_error) @@ -122466,7 +114621,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx * * cdef xmlDoc* _parseDocFromFilelike(self, filelike, filename, */ - __Pyx_TraceLine(1165,0,__PYX_ERR(2, 1165, __pyx_L1_error)) /*finally:*/ { __pyx_L4_error:; /*exception exit:*/{ @@ -122535,7 +114689,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile(struct __pyx __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -122554,7 +114707,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFilelike(struct _ xmlDoc *__pyx_v_result; xmlParserCtxt *__pyx_v_pctxt; xmlDoc *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -122573,7 +114725,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFilelike(struct _ PyObject *__pyx_t_15 = NULL; int __pyx_t_16; __Pyx_RefNannySetupContext("_parseDocFromFilelike", 0); - __Pyx_TraceCall("_parseDocFromFilelike", __pyx_f[2], 1167, 0, __PYX_ERR(2, 1167, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_filename); /* "src/lxml/parser.pxi":1174 @@ -122583,7 +114734,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFilelike(struct _ * filename = None * */ - __Pyx_TraceLine(1174,0,__PYX_ERR(2, 1174, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1174, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { @@ -122595,7 +114745,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFilelike(struct _ * * context = self._getParserContext() */ - __Pyx_TraceLine(1175,0,__PYX_ERR(2, 1175, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_filename, Py_None); @@ -122615,7 +114764,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFilelike(struct _ * context.prepare() * try: */ - __Pyx_TraceLine(1177,0,__PYX_ERR(2, 1177, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_getParserContext(__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_3); @@ -122628,7 +114776,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFilelike(struct _ * try: * pctxt = context._c_ctxt */ - __Pyx_TraceLine(1178,0,__PYX_ERR(2, 1178, __pyx_L1_error)) __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->prepare(__pyx_v_context); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1178, __pyx_L1_error) /* "src/lxml/parser.pxi":1179 @@ -122638,7 +114785,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFilelike(struct _ * pctxt = context._c_ctxt * __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt) */ - __Pyx_TraceLine(1179,0,__PYX_ERR(2, 1179, __pyx_L5_error)) /*try:*/ { /* "src/lxml/parser.pxi":1180 @@ -122648,7 +114794,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFilelike(struct _ * __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt) * file_context = _FileReaderContext( */ - __Pyx_TraceLine(1180,0,__PYX_ERR(2, 1180, __pyx_L5_error)) __pyx_t_5 = __pyx_v_context->_c_ctxt; __pyx_v_pctxt = __pyx_t_5; @@ -122659,7 +114804,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFilelike(struct _ * file_context = _FileReaderContext( * filelike, context, filename, */ - __Pyx_TraceLine(1181,0,__PYX_ERR(2, 1181, __pyx_L5_error)) __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initParserDict(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, __pyx_v_pctxt); /* "src/lxml/parser.pxi":1184 @@ -122669,7 +114813,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFilelike(struct _ * result = file_context._readDoc(pctxt, self._parse_options) * */ - __Pyx_TraceLine(1184,0,__PYX_ERR(2, 1184, __pyx_L5_error)) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_encoding); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 1184, __pyx_L5_error) if (!__pyx_t_2) { } else { @@ -122688,7 +114831,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFilelike(struct _ * filelike, context, filename, * encoding or self._default_encoding) */ - __Pyx_TraceLine(1182,0,__PYX_ERR(2, 1182, __pyx_L5_error)) __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1182, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_filelike); @@ -122716,7 +114858,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFilelike(struct _ * * return context._handleParseResultDoc( */ - __Pyx_TraceLine(1185,0,__PYX_ERR(2, 1185, __pyx_L5_error)) __pyx_v_result = __pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(__pyx_v_file_context, __pyx_v_pctxt, __pyx_v_self->_parse_options); /* "src/lxml/parser.pxi":1187 @@ -122726,7 +114867,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFilelike(struct _ * self, result, filename) * finally: */ - __Pyx_TraceLine(1187,0,__PYX_ERR(2, 1187, __pyx_L5_error)) __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->_handleParseResultDoc(__pyx_v_context, __pyx_v_self, __pyx_v_result, __pyx_v_filename); if (unlikely(__pyx_t_7 == ((xmlDoc *)NULL))) __PYX_ERR(2, 1187, __pyx_L5_error) __pyx_r = __pyx_t_7; goto __pyx_L4_return; @@ -122739,7 +114879,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFilelike(struct _ * * */ - __Pyx_TraceLine(1190,0,__PYX_ERR(2, 1190, __pyx_L1_error)) /*finally:*/ { __pyx_L5_error:; /*exception exit:*/{ @@ -122812,7 +114951,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFilelike(struct _ __Pyx_XDECREF((PyObject *)__pyx_v_context); __Pyx_XDECREF((PyObject *)__pyx_v_file_context); __Pyx_XDECREF(__pyx_v_filename); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -122840,22 +114978,16 @@ static PyObject *__pyx_pw_4lxml_5etree_11_BaseParser_6target_1__get__(PyObject * static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_6target___get__(struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[2], 794, 0, __PYX_ERR(2, 794, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->target); __pyx_r = __pyx_v_self->target; goto __pyx_L0; /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._BaseParser.target.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -122873,7 +115005,6 @@ static void __pyx_f_4lxml_5etree__initSaxDocument(void *__pyx_v_ctxt) { xmlDoc *__pyx_v_c_doc; struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_v_context = NULL; xmlDict *__pyx_v_c_dict; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlDoc *__pyx_t_1; int __pyx_t_2; @@ -122884,7 +115015,6 @@ static void __pyx_f_4lxml_5etree__initSaxDocument(void *__pyx_v_ctxt) { PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_initSaxDocument", 0); - __Pyx_TraceCall("_initSaxDocument", __pyx_f[2], 1193, 0, __PYX_ERR(2, 1193, __pyx_L1_error)); /* "src/lxml/parser.pxi":1194 * @@ -122893,7 +115023,6 @@ static void __pyx_f_4lxml_5etree__initSaxDocument(void *__pyx_v_ctxt) { * c_ctxt = ctxt * c_doc = c_ctxt.myDoc */ - __Pyx_TraceLine(1194,0,__PYX_ERR(2, 1194, __pyx_L1_error)) xmlSAX2StartDocument(__pyx_v_ctxt); /* "src/lxml/parser.pxi":1195 @@ -122903,7 +115032,6 @@ static void __pyx_f_4lxml_5etree__initSaxDocument(void *__pyx_v_ctxt) { * c_doc = c_ctxt.myDoc * */ - __Pyx_TraceLine(1195,0,__PYX_ERR(2, 1195, __pyx_L1_error)) __pyx_v_c_ctxt = ((xmlParserCtxt *)__pyx_v_ctxt); /* "src/lxml/parser.pxi":1196 @@ -122913,7 +115041,6 @@ static void __pyx_f_4lxml_5etree__initSaxDocument(void *__pyx_v_ctxt) { * * # set up document dict */ - __Pyx_TraceLine(1196,0,__PYX_ERR(2, 1196, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_ctxt->myDoc; __pyx_v_c_doc = __pyx_t_1; @@ -122924,7 +115051,6 @@ static void __pyx_f_4lxml_5etree__initSaxDocument(void *__pyx_v_ctxt) { * # I have no idea why libxml2 disables this - we need it * c_ctxt.dictNames = 1 */ - __Pyx_TraceLine(1199,0,__PYX_ERR(2, 1199, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_c_doc != 0); if (__pyx_t_3) { } else { @@ -122949,7 +115075,6 @@ static void __pyx_f_4lxml_5etree__initSaxDocument(void *__pyx_v_ctxt) { * c_doc.dict = c_ctxt.dict * xmlparser.xmlDictReference(c_ctxt.dict) */ - __Pyx_TraceLine(1201,0,__PYX_ERR(2, 1201, __pyx_L1_error)) __pyx_v_c_ctxt->dictNames = 1; /* "src/lxml/parser.pxi":1202 @@ -122959,7 +115084,6 @@ static void __pyx_f_4lxml_5etree__initSaxDocument(void *__pyx_v_ctxt) { * xmlparser.xmlDictReference(c_ctxt.dict) * */ - __Pyx_TraceLine(1202,0,__PYX_ERR(2, 1202, __pyx_L1_error)) __pyx_t_4 = __pyx_v_c_ctxt->dict; __pyx_v_c_doc->dict = __pyx_t_4; @@ -122970,7 +115094,6 @@ static void __pyx_f_4lxml_5etree__initSaxDocument(void *__pyx_v_ctxt) { * * # set up XML ID hash table */ - __Pyx_TraceLine(1203,0,__PYX_ERR(2, 1203, __pyx_L1_error)) (void)(xmlDictReference(__pyx_v_c_ctxt->dict)); /* "src/lxml/parser.pxi":1199 @@ -122989,7 +115112,6 @@ static void __pyx_f_4lxml_5etree__initSaxDocument(void *__pyx_v_ctxt) { * context = <_ParserContext>c_ctxt._private * if context._collect_ids: */ - __Pyx_TraceLine(1206,0,__PYX_ERR(2, 1206, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_c_ctxt->_private != 0); if (__pyx_t_2) { @@ -123000,7 +115122,6 @@ static void __pyx_f_4lxml_5etree__initSaxDocument(void *__pyx_v_ctxt) { * if context._collect_ids: * # keep the global parser dict from filling up with XML IDs */ - __Pyx_TraceLine(1207,0,__PYX_ERR(2, 1207, __pyx_L1_error)) __pyx_t_5 = ((PyObject *)__pyx_v_c_ctxt->_private); __Pyx_INCREF(__pyx_t_5); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_5); @@ -123013,7 +115134,6 @@ static void __pyx_f_4lxml_5etree__initSaxDocument(void *__pyx_v_ctxt) { * # keep the global parser dict from filling up with XML IDs * if c_doc and not c_doc.ids: */ - __Pyx_TraceLine(1208,0,__PYX_ERR(2, 1208, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_context->_collect_ids != 0); if (__pyx_t_2) { @@ -123024,7 +115144,6 @@ static void __pyx_f_4lxml_5etree__initSaxDocument(void *__pyx_v_ctxt) { * # memory errors are not fatal here * c_dict = xmlparser.xmlDictCreate() */ - __Pyx_TraceLine(1210,0,__PYX_ERR(2, 1210, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_c_doc != 0); if (__pyx_t_3) { } else { @@ -123043,7 +115162,6 @@ static void __pyx_f_4lxml_5etree__initSaxDocument(void *__pyx_v_ctxt) { * if c_dict: * c_doc.ids = tree.xmlHashCreateDict(0, c_dict) */ - __Pyx_TraceLine(1212,0,__PYX_ERR(2, 1212, __pyx_L1_error)) __pyx_v_c_dict = xmlDictCreate(); /* "src/lxml/parser.pxi":1213 @@ -123053,7 +115171,6 @@ static void __pyx_f_4lxml_5etree__initSaxDocument(void *__pyx_v_ctxt) { * c_doc.ids = tree.xmlHashCreateDict(0, c_dict) * xmlparser.xmlDictFree(c_dict) */ - __Pyx_TraceLine(1213,0,__PYX_ERR(2, 1213, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_c_dict != 0); if (__pyx_t_2) { @@ -123064,7 +115181,6 @@ static void __pyx_f_4lxml_5etree__initSaxDocument(void *__pyx_v_ctxt) { * xmlparser.xmlDictFree(c_dict) * else: */ - __Pyx_TraceLine(1214,0,__PYX_ERR(2, 1214, __pyx_L1_error)) __pyx_v_c_doc->ids = xmlHashCreateDict(0, __pyx_v_c_dict); /* "src/lxml/parser.pxi":1215 @@ -123074,7 +115190,6 @@ static void __pyx_f_4lxml_5etree__initSaxDocument(void *__pyx_v_ctxt) { * else: * c_doc.ids = tree.xmlHashCreate(0) */ - __Pyx_TraceLine(1215,0,__PYX_ERR(2, 1215, __pyx_L1_error)) xmlDictFree(__pyx_v_c_dict); /* "src/lxml/parser.pxi":1213 @@ -123094,7 +115209,6 @@ static void __pyx_f_4lxml_5etree__initSaxDocument(void *__pyx_v_ctxt) { * else: * c_ctxt.loadsubset |= xmlparser.XML_SKIP_IDS */ - __Pyx_TraceLine(1217,0,__PYX_ERR(2, 1217, __pyx_L1_error)) /*else*/ { __pyx_v_c_doc->ids = xmlHashCreate(0); } @@ -123126,7 +115240,6 @@ static void __pyx_f_4lxml_5etree__initSaxDocument(void *__pyx_v_ctxt) { * if c_doc and c_doc.ids and not tree.xmlHashSize(c_doc.ids): * # already initialised but empty => clear */ - __Pyx_TraceLine(1219,0,__PYX_ERR(2, 1219, __pyx_L1_error)) /*else*/ { __pyx_v_c_ctxt->loadsubset = (__pyx_v_c_ctxt->loadsubset | XML_SKIP_IDS); @@ -123137,7 +115250,6 @@ static void __pyx_f_4lxml_5etree__initSaxDocument(void *__pyx_v_ctxt) { * # already initialised but empty => clear * tree.xmlHashFree(c_doc.ids, NULL) */ - __Pyx_TraceLine(1220,0,__PYX_ERR(2, 1220, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_c_doc != 0); if (__pyx_t_3) { } else { @@ -123162,7 +115274,6 @@ static void __pyx_f_4lxml_5etree__initSaxDocument(void *__pyx_v_ctxt) { * c_doc.ids = NULL * */ - __Pyx_TraceLine(1222,0,__PYX_ERR(2, 1222, __pyx_L1_error)) xmlHashFree(__pyx_v_c_doc->ids, NULL); /* "src/lxml/parser.pxi":1223 @@ -123172,7 +115283,6 @@ static void __pyx_f_4lxml_5etree__initSaxDocument(void *__pyx_v_ctxt) { * * */ - __Pyx_TraceLine(1223,0,__PYX_ERR(2, 1223, __pyx_L1_error)) __pyx_v_c_doc->ids = NULL; /* "src/lxml/parser.pxi":1220 @@ -123204,13 +115314,7 @@ static void __pyx_f_4lxml_5etree__initSaxDocument(void *__pyx_v_ctxt) { */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_5); - __Pyx_WriteUnraisable("lxml.etree._initSaxDocument", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); @@ -123240,12 +115344,10 @@ static PyObject *__pyx_pw_4lxml_5etree_11_FeedParser_14feed_error_log_1__get__(P static PyObject *__pyx_pf_4lxml_5etree_11_FeedParser_14feed_error_log___get__(struct __pyx_obj_4lxml_5etree__FeedParser *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[2], 1239, 0, __PYX_ERR(2, 1239, __pyx_L1_error)); /* "src/lxml/parser.pxi":1240 * """ @@ -123254,7 +115356,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11_FeedParser_14feed_error_log___get__(st * * cpdef feed(self, data): */ - __Pyx_TraceLine(1240,0,__PYX_ERR(2, 1240, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__FeedParser *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._getPushParserContext(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -123281,7 +115382,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11_FeedParser_14feed_error_log___get__(st __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -123309,94 +115409,78 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ xmlNode *__pyx_v_c_node; PyObject *__pyx_v_entry = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; + int __pyx_t_5; int __pyx_t_6; - int __pyx_t_7; - const char *__pyx_t_8; - xmlParserCtxt *__pyx_t_9; - int __pyx_t_10; - char *__pyx_t_11; - xmlNode *__pyx_t_12; - xmlDict *__pyx_t_13; - Py_ssize_t __pyx_t_14; - PyObject *(*__pyx_t_15)(PyObject *); + const char *__pyx_t_7; + xmlParserCtxt *__pyx_t_8; + int __pyx_t_9; + char *__pyx_t_10; + xmlNode *__pyx_t_11; + xmlDict *__pyx_t_12; + Py_ssize_t __pyx_t_13; + PyObject *(*__pyx_t_14)(PyObject *); + int __pyx_t_15; int __pyx_t_16; - int __pyx_t_17; - char const *__pyx_t_18; + char const *__pyx_t_17; + PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; PyObject *__pyx_t_23 = NULL; - PyObject *__pyx_t_24 = NULL; - int __pyx_t_25; - __Pyx_TraceFrameInit(__pyx_codeobj__239) + int __pyx_t_24; __Pyx_RefNannySetupContext("feed", 0); - __Pyx_TraceCall("feed", __pyx_f[2], 1242, 0, __PYX_ERR(2, 1242, __pyx_L1_error)); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_feed); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1242, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4lxml_5etree_11_FeedParser_1feed)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); + 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 + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_feed); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1242, __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_11_FeedParser_1feed)) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } } - } - if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1242, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_data}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1242, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_data}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1242, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1242, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(__pyx_v_data); - __Pyx_GIVEREF(__pyx_v_data); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_data); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1242, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } /* "src/lxml/parser.pxi":1267 @@ -123406,7 +115490,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * if isinstance(data, bytes): * if self._default_encoding is None: */ - __Pyx_TraceLine(1267,0,__PYX_ERR(2, 1267, __pyx_L1_error)) __pyx_v_recover = (__pyx_v_self->__pyx_base._parse_options & XML_PARSE_RECOVER); /* "src/lxml/parser.pxi":1268 @@ -123416,10 +115499,9 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * if self._default_encoding is None: * c_encoding = NULL */ - __Pyx_TraceLine(1268,0,__PYX_ERR(2, 1268, __pyx_L1_error)) - __pyx_t_6 = PyBytes_Check(__pyx_v_data); - __pyx_t_7 = (__pyx_t_6 != 0); - if (__pyx_t_7) { + __pyx_t_5 = PyBytes_Check(__pyx_v_data); + __pyx_t_6 = (__pyx_t_5 != 0); + if (__pyx_t_6) { /* "src/lxml/parser.pxi":1269 * cdef bint recover = self._parse_options & xmlparser.XML_PARSE_RECOVER @@ -123428,10 +115510,9 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * c_encoding = NULL * else: */ - __Pyx_TraceLine(1269,0,__PYX_ERR(2, 1269, __pyx_L1_error)) - __pyx_t_7 = (__pyx_v_self->__pyx_base._default_encoding == Py_None); - __pyx_t_6 = (__pyx_t_7 != 0); - if (__pyx_t_6) { + __pyx_t_6 = (__pyx_v_self->__pyx_base._default_encoding == Py_None); + __pyx_t_5 = (__pyx_t_6 != 0); + if (__pyx_t_5) { /* "src/lxml/parser.pxi":1270 * if isinstance(data, bytes): @@ -123440,7 +115521,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * else: * c_encoding = self._default_encoding */ - __Pyx_TraceLine(1270,0,__PYX_ERR(2, 1270, __pyx_L1_error)) __pyx_v_c_encoding = NULL; /* "src/lxml/parser.pxi":1269 @@ -123460,10 +115540,9 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * c_data = _cstr(data) * py_buffer_len = python.PyBytes_GET_SIZE(data) */ - __Pyx_TraceLine(1272,0,__PYX_ERR(2, 1272, __pyx_L1_error)) /*else*/ { - __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_self->__pyx_base._default_encoding); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(2, 1272, __pyx_L1_error) - __pyx_v_c_encoding = __pyx_t_8; + __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_self->__pyx_base._default_encoding); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(2, 1272, __pyx_L1_error) + __pyx_v_c_encoding = __pyx_t_7; } __pyx_L4:; @@ -123474,7 +115553,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * py_buffer_len = python.PyBytes_GET_SIZE(data) * elif isinstance(data, unicode): */ - __Pyx_TraceLine(1273,0,__PYX_ERR(2, 1273, __pyx_L1_error)) __pyx_v_c_data = PyBytes_AS_STRING(__pyx_v_data); /* "src/lxml/parser.pxi":1274 @@ -123484,7 +115562,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * elif isinstance(data, unicode): * if _UNICODE_ENCODING is NULL: */ - __Pyx_TraceLine(1274,0,__PYX_ERR(2, 1274, __pyx_L1_error)) __pyx_v_py_buffer_len = PyBytes_GET_SIZE(__pyx_v_data); /* "src/lxml/parser.pxi":1268 @@ -123504,10 +115581,9 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * if _UNICODE_ENCODING is NULL: * raise ParserError, \ */ - __Pyx_TraceLine(1275,0,__PYX_ERR(2, 1275, __pyx_L1_error)) - __pyx_t_6 = PyUnicode_Check(__pyx_v_data); - __pyx_t_7 = (__pyx_t_6 != 0); - if (likely(__pyx_t_7)) { + __pyx_t_5 = PyUnicode_Check(__pyx_v_data); + __pyx_t_6 = (__pyx_t_5 != 0); + if (likely(__pyx_t_6)) { /* "src/lxml/parser.pxi":1276 * py_buffer_len = python.PyBytes_GET_SIZE(data) @@ -123516,9 +115592,8 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * raise ParserError, \ * u"Unicode parsing is not supported on this platform" */ - __Pyx_TraceLine(1276,0,__PYX_ERR(2, 1276, __pyx_L1_error)) - __pyx_t_7 = ((__pyx_v_4lxml_5etree__UNICODE_ENCODING == NULL) != 0); - if (unlikely(__pyx_t_7)) { + __pyx_t_6 = ((__pyx_v_4lxml_5etree__UNICODE_ENCODING == NULL) != 0); + if (unlikely(__pyx_t_6)) { /* "src/lxml/parser.pxi":1277 * elif isinstance(data, unicode): @@ -123527,7 +115602,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * u"Unicode parsing is not supported on this platform" * c_encoding = _UNICODE_ENCODING */ - __Pyx_TraceLine(1277,0,__PYX_ERR(2, 1277, __pyx_L1_error)) __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_ParserError), __pyx_kp_u_Unicode_parsing_is_not_supported, 0, 0); __PYX_ERR(2, 1277, __pyx_L1_error) @@ -123547,7 +115621,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * c_data = python.PyUnicode_AS_DATA(data) * py_buffer_len = python.PyUnicode_GET_DATA_SIZE(data) */ - __Pyx_TraceLine(1279,0,__PYX_ERR(2, 1279, __pyx_L1_error)) __pyx_v_c_encoding = __pyx_v_4lxml_5etree__UNICODE_ENCODING; /* "src/lxml/parser.pxi":1280 @@ -123557,7 +115630,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * py_buffer_len = python.PyUnicode_GET_DATA_SIZE(data) * else: */ - __Pyx_TraceLine(1280,0,__PYX_ERR(2, 1280, __pyx_L1_error)) __pyx_v_c_data = PyUnicode_AS_DATA(__pyx_v_data); /* "src/lxml/parser.pxi":1281 @@ -123567,7 +115639,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * else: * raise TypeError, u"Parsing requires string data" */ - __Pyx_TraceLine(1281,0,__PYX_ERR(2, 1281, __pyx_L1_error)) __pyx_v_py_buffer_len = PyUnicode_GET_DATA_SIZE(__pyx_v_data); /* "src/lxml/parser.pxi":1275 @@ -123587,7 +115658,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * * context = self._getPushParserContext() */ - __Pyx_TraceLine(1283,0,__PYX_ERR(2, 1283, __pyx_L1_error)) /*else*/ { __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Parsing_requires_string_data, 0, 0); __PYX_ERR(2, 1283, __pyx_L1_error) @@ -123601,7 +115671,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * pctxt = context._c_ctxt * error = 0 */ - __Pyx_TraceLine(1285,0,__PYX_ERR(2, 1285, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__FeedParser *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._getPushParserContext(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_1); @@ -123614,9 +115683,8 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * error = 0 * if not self._feed_parser_running: */ - __Pyx_TraceLine(1286,0,__PYX_ERR(2, 1286, __pyx_L1_error)) - __pyx_t_9 = __pyx_v_context->_c_ctxt; - __pyx_v_pctxt = __pyx_t_9; + __pyx_t_8 = __pyx_v_context->_c_ctxt; + __pyx_v_pctxt = __pyx_t_8; /* "src/lxml/parser.pxi":1287 * context = self._getPushParserContext() @@ -123625,7 +115693,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * if not self._feed_parser_running: * context.prepare() */ - __Pyx_TraceLine(1287,0,__PYX_ERR(2, 1287, __pyx_L1_error)) __pyx_v_error = 0; /* "src/lxml/parser.pxi":1288 @@ -123635,9 +115702,8 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * context.prepare() * self._feed_parser_running = 1 */ - __Pyx_TraceLine(1288,0,__PYX_ERR(2, 1288, __pyx_L1_error)) - __pyx_t_7 = ((!(__pyx_v_self->_feed_parser_running != 0)) != 0); - if (__pyx_t_7) { + __pyx_t_6 = ((!(__pyx_v_self->_feed_parser_running != 0)) != 0); + if (__pyx_t_6) { /* "src/lxml/parser.pxi":1289 * error = 0 @@ -123646,8 +115712,7 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * self._feed_parser_running = 1 * c_filename = (_cstr(self._filename) */ - __Pyx_TraceLine(1289,0,__PYX_ERR(2, 1289, __pyx_L1_error)) - __pyx_t_10 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->prepare(__pyx_v_context); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(2, 1289, __pyx_L1_error) + __pyx_t_9 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->prepare(__pyx_v_context); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(2, 1289, __pyx_L1_error) /* "src/lxml/parser.pxi":1290 * if not self._feed_parser_running: @@ -123656,7 +115721,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * c_filename = (_cstr(self._filename) * if self._filename is not None else NULL) */ - __Pyx_TraceLine(1290,0,__PYX_ERR(2, 1290, __pyx_L1_error)) __pyx_v_self->_feed_parser_running = 1; /* "src/lxml/parser.pxi":1292 @@ -123666,9 +115730,8 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * * # We have to give *mlCtxtResetPush() enough input to figure */ - __Pyx_TraceLine(1292,0,__PYX_ERR(2, 1292, __pyx_L1_error)) - __pyx_t_7 = (__pyx_v_self->__pyx_base._filename != ((PyObject*)Py_None)); - if ((__pyx_t_7 != 0)) { + __pyx_t_6 = (__pyx_v_self->__pyx_base._filename != ((PyObject*)Py_None)); + if ((__pyx_t_6 != 0)) { /* "src/lxml/parser.pxi":1291 * context.prepare() @@ -123677,10 +115740,9 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * if self._filename is not None else NULL) * */ - __Pyx_TraceLine(1291,0,__PYX_ERR(2, 1291, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->__pyx_base._filename; __Pyx_INCREF(__pyx_t_1); - __pyx_t_11 = PyBytes_AS_STRING(__pyx_t_1); + __pyx_t_10 = PyBytes_AS_STRING(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { @@ -123691,10 +115753,9 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * * # We have to give *mlCtxtResetPush() enough input to figure */ - __Pyx_TraceLine(1292,0,__PYX_ERR(2, 1292, __pyx_L1_error)) - __pyx_t_11 = NULL; + __pyx_t_10 = NULL; } - __pyx_v_c_filename = __pyx_t_11; + __pyx_v_c_filename = __pyx_t_10; /* "src/lxml/parser.pxi":1298 * # however if we give it all we got, we'll have nothing for @@ -123703,13 +115764,12 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * if self._for_html: * error = _htmlCtxtResetPush( */ - __Pyx_TraceLine(1298,0,__PYX_ERR(2, 1298, __pyx_L1_error)) if (((__pyx_v_py_buffer_len > 4) != 0)) { - __pyx_t_10 = 4; + __pyx_t_9 = 4; } else { - __pyx_t_10 = ((int)__pyx_v_py_buffer_len); + __pyx_t_9 = ((int)__pyx_v_py_buffer_len); } - __pyx_v_buffer_len = __pyx_t_10; + __pyx_v_buffer_len = __pyx_t_9; /* "src/lxml/parser.pxi":1299 * # *mlParseChunk() and things go wrong. @@ -123718,9 +115778,8 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * error = _htmlCtxtResetPush( * pctxt, c_data, buffer_len, c_filename, c_encoding, */ - __Pyx_TraceLine(1299,0,__PYX_ERR(2, 1299, __pyx_L1_error)) - __pyx_t_7 = (__pyx_v_self->__pyx_base._for_html != 0); - if (__pyx_t_7) { + __pyx_t_6 = (__pyx_v_self->__pyx_base._for_html != 0); + if (__pyx_t_6) { /* "src/lxml/parser.pxi":1300 * buffer_len = 4 if py_buffer_len > 4 else py_buffer_len @@ -123729,9 +115788,8 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * pctxt, c_data, buffer_len, c_filename, c_encoding, * self._parse_options) */ - __Pyx_TraceLine(1300,0,__PYX_ERR(2, 1300, __pyx_L1_error)) - __pyx_t_10 = __pyx_f_4lxml_5etree__htmlCtxtResetPush(__pyx_v_pctxt, __pyx_v_c_data, __pyx_v_buffer_len, __pyx_v_c_filename, __pyx_v_c_encoding, __pyx_v_self->__pyx_base._parse_options); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(2, 1300, __pyx_L1_error) - __pyx_v_error = __pyx_t_10; + __pyx_t_9 = __pyx_f_4lxml_5etree__htmlCtxtResetPush(__pyx_v_pctxt, __pyx_v_c_data, __pyx_v_buffer_len, __pyx_v_c_filename, __pyx_v_c_encoding, __pyx_v_self->__pyx_base._parse_options); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(2, 1300, __pyx_L1_error) + __pyx_v_error = __pyx_t_9; /* "src/lxml/parser.pxi":1299 * # *mlParseChunk() and things go wrong. @@ -123750,7 +115808,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * error = xmlparser.xmlCtxtResetPush( * pctxt, c_data, buffer_len, c_filename, c_encoding) */ - __Pyx_TraceLine(1304,0,__PYX_ERR(2, 1304, __pyx_L1_error)) /*else*/ { (void)(xmlCtxtUseOptions(__pyx_v_pctxt, __pyx_v_self->__pyx_base._parse_options)); @@ -123761,7 +115818,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * pctxt, c_data, buffer_len, c_filename, c_encoding) * py_buffer_len -= buffer_len */ - __Pyx_TraceLine(1305,0,__PYX_ERR(2, 1305, __pyx_L1_error)) __pyx_v_error = xmlCtxtResetPush(__pyx_v_pctxt, __pyx_v_c_data, __pyx_v_buffer_len, __pyx_v_c_filename, __pyx_v_c_encoding); } __pyx_L7:; @@ -123773,7 +115829,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * c_data += buffer_len * if error: */ - __Pyx_TraceLine(1307,0,__PYX_ERR(2, 1307, __pyx_L1_error)) __pyx_v_py_buffer_len = (__pyx_v_py_buffer_len - __pyx_v_buffer_len); /* "src/lxml/parser.pxi":1308 @@ -123783,7 +115838,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * if error: * raise MemoryError() */ - __Pyx_TraceLine(1308,0,__PYX_ERR(2, 1308, __pyx_L1_error)) __pyx_v_c_data = (__pyx_v_c_data + __pyx_v_buffer_len); /* "src/lxml/parser.pxi":1309 @@ -123793,9 +115847,8 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * raise MemoryError() * __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt) */ - __Pyx_TraceLine(1309,0,__PYX_ERR(2, 1309, __pyx_L1_error)) - __pyx_t_7 = (__pyx_v_error != 0); - if (unlikely(__pyx_t_7)) { + __pyx_t_6 = (__pyx_v_error != 0); + if (unlikely(__pyx_t_6)) { /* "src/lxml/parser.pxi":1310 * c_data += buffer_len @@ -123804,7 +115857,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt) * */ - __Pyx_TraceLine(1310,0,__PYX_ERR(2, 1310, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(2, 1310, __pyx_L1_error) /* "src/lxml/parser.pxi":1309 @@ -123823,7 +115875,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * * #print pctxt.charset, 'NONE' if c_encoding is NULL else c_encoding */ - __Pyx_TraceLine(1311,0,__PYX_ERR(2, 1311, __pyx_L1_error)) __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initParserDict(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, __pyx_v_pctxt); /* "src/lxml/parser.pxi":1288 @@ -123842,7 +115893,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * while py_buffer_len > 0 and (error == 0 or recover): * with nogil: */ - __Pyx_TraceLine(1315,0,__PYX_ERR(2, 1315, __pyx_L1_error)) __pyx_v_fixup_error = 0; /* "src/lxml/parser.pxi":1316 @@ -123852,24 +115902,23 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * with nogil: * if py_buffer_len > limits.INT_MAX: */ - __Pyx_TraceLine(1316,0,__PYX_ERR(2, 1316, __pyx_L1_error)) while (1) { - __pyx_t_6 = ((__pyx_v_py_buffer_len > 0) != 0); - if (__pyx_t_6) { + __pyx_t_5 = ((__pyx_v_py_buffer_len > 0) != 0); + if (__pyx_t_5) { } else { - __pyx_t_7 = __pyx_t_6; + __pyx_t_6 = __pyx_t_5; goto __pyx_L11_bool_binop_done; } - __pyx_t_6 = ((__pyx_v_error == 0) != 0); - if (!__pyx_t_6) { + __pyx_t_5 = ((__pyx_v_error == 0) != 0); + if (!__pyx_t_5) { } else { - __pyx_t_7 = __pyx_t_6; + __pyx_t_6 = __pyx_t_5; goto __pyx_L11_bool_binop_done; } - __pyx_t_6 = (__pyx_v_recover != 0); - __pyx_t_7 = __pyx_t_6; + __pyx_t_5 = (__pyx_v_recover != 0); + __pyx_t_6 = __pyx_t_5; __pyx_L11_bool_binop_done:; - if (!__pyx_t_7) break; + if (!__pyx_t_6) break; /* "src/lxml/parser.pxi":1317 * fixup_error = 0 @@ -123878,7 +115927,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * if py_buffer_len > limits.INT_MAX: * buffer_len = limits.INT_MAX */ - __Pyx_TraceLine(1317,0,__PYX_ERR(2, 1317, __pyx_L1_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -123894,9 +115942,8 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * buffer_len = limits.INT_MAX * else: */ - __Pyx_TraceLine(1318,1,__PYX_ERR(2, 1318, __pyx_L17_error)) - __pyx_t_7 = ((__pyx_v_py_buffer_len > INT_MAX) != 0); - if (__pyx_t_7) { + __pyx_t_6 = ((__pyx_v_py_buffer_len > INT_MAX) != 0); + if (__pyx_t_6) { /* "src/lxml/parser.pxi":1319 * with nogil: @@ -123905,7 +115952,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * else: * buffer_len = py_buffer_len */ - __Pyx_TraceLine(1319,1,__PYX_ERR(2, 1319, __pyx_L17_error)) __pyx_v_buffer_len = INT_MAX; /* "src/lxml/parser.pxi":1318 @@ -123925,7 +115971,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * if self._for_html: * c_node = pctxt.node # last node where the parser stopped */ - __Pyx_TraceLine(1321,1,__PYX_ERR(2, 1321, __pyx_L17_error)) /*else*/ { __pyx_v_buffer_len = ((int)__pyx_v_py_buffer_len); } @@ -123938,9 +115983,8 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * c_node = pctxt.node # last node where the parser stopped * error = htmlparser.htmlParseChunk(pctxt, c_data, buffer_len, 0) */ - __Pyx_TraceLine(1322,1,__PYX_ERR(2, 1322, __pyx_L17_error)) - __pyx_t_7 = (__pyx_v_self->__pyx_base._for_html != 0); - if (__pyx_t_7) { + __pyx_t_6 = (__pyx_v_self->__pyx_base._for_html != 0); + if (__pyx_t_6) { /* "src/lxml/parser.pxi":1323 * buffer_len = py_buffer_len @@ -123949,9 +115993,8 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * error = htmlparser.htmlParseChunk(pctxt, c_data, buffer_len, 0) * # and now for the fun part: move node names to the dict */ - __Pyx_TraceLine(1323,1,__PYX_ERR(2, 1323, __pyx_L17_error)) - __pyx_t_12 = __pyx_v_pctxt->node; - __pyx_v_c_node = __pyx_t_12; + __pyx_t_11 = __pyx_v_pctxt->node; + __pyx_v_c_node = __pyx_t_11; /* "src/lxml/parser.pxi":1324 * if self._for_html: @@ -123960,7 +116003,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * # and now for the fun part: move node names to the dict * if pctxt.myDoc: */ - __Pyx_TraceLine(1324,1,__PYX_ERR(2, 1324, __pyx_L17_error)) __pyx_v_error = htmlParseChunk(__pyx_v_pctxt, __pyx_v_c_data, __pyx_v_buffer_len, 0); /* "src/lxml/parser.pxi":1326 @@ -123970,9 +116012,8 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * fixup_error = _fixHtmlDictSubtreeNames( * pctxt.dict, pctxt.myDoc, c_node) */ - __Pyx_TraceLine(1326,1,__PYX_ERR(2, 1326, __pyx_L17_error)) - __pyx_t_7 = (__pyx_v_pctxt->myDoc != 0); - if (__pyx_t_7) { + __pyx_t_6 = (__pyx_v_pctxt->myDoc != 0); + if (__pyx_t_6) { /* "src/lxml/parser.pxi":1327 * # and now for the fun part: move node names to the dict @@ -123981,7 +116022,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * pctxt.dict, pctxt.myDoc, c_node) * if pctxt.myDoc.dict and pctxt.myDoc.dict is not pctxt.dict: */ - __Pyx_TraceLine(1327,1,__PYX_ERR(2, 1327, __pyx_L17_error)) __pyx_v_fixup_error = __pyx_f_4lxml_5etree__fixHtmlDictSubtreeNames(__pyx_v_pctxt->dict, __pyx_v_pctxt->myDoc, __pyx_v_c_node); /* "src/lxml/parser.pxi":1329 @@ -123991,17 +116031,16 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * xmlparser.xmlDictFree(pctxt.myDoc.dict) * pctxt.myDoc.dict = pctxt.dict */ - __Pyx_TraceLine(1329,1,__PYX_ERR(2, 1329, __pyx_L17_error)) - __pyx_t_6 = (__pyx_v_pctxt->myDoc->dict != 0); - if (__pyx_t_6) { + __pyx_t_5 = (__pyx_v_pctxt->myDoc->dict != 0); + if (__pyx_t_5) { } else { - __pyx_t_7 = __pyx_t_6; + __pyx_t_6 = __pyx_t_5; goto __pyx_L23_bool_binop_done; } - __pyx_t_6 = ((__pyx_v_pctxt->myDoc->dict != __pyx_v_pctxt->dict) != 0); - __pyx_t_7 = __pyx_t_6; + __pyx_t_5 = ((__pyx_v_pctxt->myDoc->dict != __pyx_v_pctxt->dict) != 0); + __pyx_t_6 = __pyx_t_5; __pyx_L23_bool_binop_done:; - if (__pyx_t_7) { + if (__pyx_t_6) { /* "src/lxml/parser.pxi":1330 * pctxt.dict, pctxt.myDoc, c_node) @@ -124010,7 +116049,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * pctxt.myDoc.dict = pctxt.dict * xmlparser.xmlDictReference(pctxt.dict) */ - __Pyx_TraceLine(1330,1,__PYX_ERR(2, 1330, __pyx_L17_error)) xmlDictFree(__pyx_v_pctxt->myDoc->dict); /* "src/lxml/parser.pxi":1331 @@ -124020,9 +116058,8 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * xmlparser.xmlDictReference(pctxt.dict) * else: */ - __Pyx_TraceLine(1331,1,__PYX_ERR(2, 1331, __pyx_L17_error)) - __pyx_t_13 = __pyx_v_pctxt->dict; - __pyx_v_pctxt->myDoc->dict = __pyx_t_13; + __pyx_t_12 = __pyx_v_pctxt->dict; + __pyx_v_pctxt->myDoc->dict = __pyx_t_12; /* "src/lxml/parser.pxi":1332 * xmlparser.xmlDictFree(pctxt.myDoc.dict) @@ -124031,7 +116068,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * else: * error = xmlparser.xmlParseChunk(pctxt, c_data, buffer_len, 0) */ - __Pyx_TraceLine(1332,1,__PYX_ERR(2, 1332, __pyx_L17_error)) (void)(xmlDictReference(__pyx_v_pctxt->dict)); /* "src/lxml/parser.pxi":1329 @@ -124069,7 +116105,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * py_buffer_len -= buffer_len * c_data += buffer_len */ - __Pyx_TraceLine(1334,1,__PYX_ERR(2, 1334, __pyx_L17_error)) /*else*/ { __pyx_v_error = xmlParseChunk(__pyx_v_pctxt, __pyx_v_c_data, __pyx_v_buffer_len, 0); } @@ -124082,7 +116117,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * c_data += buffer_len * */ - __Pyx_TraceLine(1335,1,__PYX_ERR(2, 1335, __pyx_L17_error)) __pyx_v_py_buffer_len = (__pyx_v_py_buffer_len - __pyx_v_buffer_len); /* "src/lxml/parser.pxi":1336 @@ -124092,7 +116126,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * * if fixup_error: */ - __Pyx_TraceLine(1336,1,__PYX_ERR(2, 1336, __pyx_L17_error)) __pyx_v_c_data = (__pyx_v_c_data + __pyx_v_buffer_len); } @@ -124103,7 +116136,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * if py_buffer_len > limits.INT_MAX: * buffer_len = limits.INT_MAX */ - __Pyx_TraceLine(1317,1,__PYX_ERR(2, 1317, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -124112,13 +116144,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ #endif goto __pyx_L18; } - __pyx_L17_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L1_error; - } __pyx_L18:; } } @@ -124130,9 +116155,8 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * context.store_exception(MemoryError()) * */ - __Pyx_TraceLine(1338,0,__PYX_ERR(2, 1338, __pyx_L1_error)) - __pyx_t_7 = (__pyx_v_fixup_error != 0); - if (__pyx_t_7) { + __pyx_t_6 = (__pyx_v_fixup_error != 0); + if (__pyx_t_6) { /* "src/lxml/parser.pxi":1339 * @@ -124141,56 +116165,25 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * * if context._has_raised(): */ - __Pyx_TraceLine(1339,0,__PYX_ERR(2, 1339, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_context), __pyx_n_s_store_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_builtin_MemoryError); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = NULL; + __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_5)) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1339, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1339, __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 - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1339, __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_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1339, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_3); - __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1339, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __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(2, 1339, __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; @@ -124210,10 +116203,9 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * # propagate Python exceptions immediately * recover = 0 */ - __Pyx_TraceLine(1341,0,__PYX_ERR(2, 1341, __pyx_L1_error)) - __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._has_raised(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_v_context)); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1341, __pyx_L1_error) - __pyx_t_6 = (__pyx_t_7 != 0); - if (__pyx_t_6) { + __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._has_raised(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_v_context)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(2, 1341, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_6 != 0); + if (__pyx_t_5) { /* "src/lxml/parser.pxi":1343 * if context._has_raised(): @@ -124222,7 +116214,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * error = 1 * break */ - __Pyx_TraceLine(1343,0,__PYX_ERR(2, 1343, __pyx_L1_error)) __pyx_v_recover = 0; /* "src/lxml/parser.pxi":1344 @@ -124232,7 +116223,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * break * */ - __Pyx_TraceLine(1344,0,__PYX_ERR(2, 1344, __pyx_L1_error)) __pyx_v_error = 1; /* "src/lxml/parser.pxi":1345 @@ -124242,7 +116232,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * * if error and not pctxt.replaceEntities and not pctxt.validate: */ - __Pyx_TraceLine(1345,0,__PYX_ERR(2, 1345, __pyx_L1_error)) goto __pyx_L10_break; /* "src/lxml/parser.pxi":1341 @@ -124261,23 +116250,22 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * # in this mode, we ignore errors about undefined entities * for entry in context._error_log.filter_from_errors(): */ - __Pyx_TraceLine(1347,0,__PYX_ERR(2, 1347, __pyx_L1_error)) - __pyx_t_7 = (__pyx_v_error != 0); - if (__pyx_t_7) { + __pyx_t_6 = (__pyx_v_error != 0); + if (__pyx_t_6) { } else { - __pyx_t_6 = __pyx_t_7; + __pyx_t_5 = __pyx_t_6; goto __pyx_L28_bool_binop_done; } - __pyx_t_7 = ((!(__pyx_v_pctxt->replaceEntities != 0)) != 0); - if (__pyx_t_7) { + __pyx_t_6 = ((!(__pyx_v_pctxt->replaceEntities != 0)) != 0); + if (__pyx_t_6) { } else { - __pyx_t_6 = __pyx_t_7; + __pyx_t_5 = __pyx_t_6; goto __pyx_L28_bool_binop_done; } - __pyx_t_7 = ((!(__pyx_v_pctxt->validate != 0)) != 0); - __pyx_t_6 = __pyx_t_7; + __pyx_t_6 = ((!(__pyx_v_pctxt->validate != 0)) != 0); + __pyx_t_5 = __pyx_t_6; __pyx_L28_bool_binop_done:; - if (__pyx_t_6) { + if (__pyx_t_5) { /* "src/lxml/parser.pxi":1349 * if error and not pctxt.replaceEntities and not pctxt.validate: @@ -124286,57 +116274,53 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * if entry.type != ErrorTypes.WAR_UNDECLARED_ENTITY and \ * entry.type != ErrorTypes.ERR_UNDECLARED_ENTITY: */ - __Pyx_TraceLine(1349,0,__PYX_ERR(2, 1349, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_context->_error_log), __pyx_n_s_filter_from_errors); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = NULL; + __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_4)) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1349, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1349, __pyx_L1_error) - } + __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(2, 1349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; 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_14 = 0; - __pyx_t_15 = NULL; + __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_13 = 0; + __pyx_t_14 = NULL; } else { - __pyx_t_14 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1349, __pyx_L1_error) + __pyx_t_13 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_15 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1349, __pyx_L1_error) + __pyx_t_14 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 1349, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { - if (likely(!__pyx_t_15)) { + if (likely(!__pyx_t_14)) { if (likely(PyList_CheckExact(__pyx_t_2))) { - if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_2)) break; + if (__pyx_t_13 >= 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_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(2, 1349, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(2, 1349, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1349, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { - if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_2)) break; + if (__pyx_t_13 >= 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_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(2, 1349, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(2, 1349, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1349, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } } else { - __pyx_t_1 = __pyx_t_15(__pyx_t_2); + __pyx_t_1 = __pyx_t_14(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { @@ -124357,22 +116341,21 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * entry.type != ErrorTypes.ERR_UNDECLARED_ENTITY: * break */ - __Pyx_TraceLine(1350,0,__PYX_ERR(2, 1350, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_entry, __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ErrorTypes); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1350, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_WAR_UNDECLARED_ENTITY); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1350, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ErrorTypes); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1350, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_WAR_UNDECLARED_ENTITY); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1350, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(2, 1350, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1350, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_7) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 1350, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { } else { - __pyx_t_6 = __pyx_t_7; + __pyx_t_5 = __pyx_t_6; goto __pyx_L34_bool_binop_done; } @@ -124383,20 +116366,19 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * break * else: */ - __Pyx_TraceLine(1351,0,__PYX_ERR(2, 1351, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_entry, __pyx_n_s_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1351, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ErrorTypes); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1351, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_entry, __pyx_n_s_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ERR_UNDECLARED_ENTITY); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1351, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ErrorTypes); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ERR_UNDECLARED_ENTITY); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1351, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(2, 1351, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1351, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __pyx_t_7; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 1351, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = __pyx_t_6; __pyx_L34_bool_binop_done:; /* "src/lxml/parser.pxi":1350 @@ -124406,8 +116388,7 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * entry.type != ErrorTypes.ERR_UNDECLARED_ENTITY: * break */ - __Pyx_TraceLine(1350,0,__PYX_ERR(2, 1350, __pyx_L1_error)) - if (__pyx_t_6) { + if (__pyx_t_5) { /* "src/lxml/parser.pxi":1352 * if entry.type != ErrorTypes.WAR_UNDECLARED_ENTITY and \ @@ -124416,7 +116397,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * else: * error = 0 */ - __Pyx_TraceLine(1352,0,__PYX_ERR(2, 1352, __pyx_L1_error)) goto __pyx_L32_break; /* "src/lxml/parser.pxi":1350 @@ -124435,7 +116415,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * if entry.type != ErrorTypes.WAR_UNDECLARED_ENTITY and \ * entry.type != ErrorTypes.ERR_UNDECLARED_ENTITY: */ - __Pyx_TraceLine(1349,0,__PYX_ERR(2, 1349, __pyx_L1_error)) } /*else*/ { @@ -124446,7 +116425,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * * if not pctxt.wellFormed and pctxt.disableSAX and context._has_raised(): */ - __Pyx_TraceLine(1354,0,__PYX_ERR(2, 1354, __pyx_L1_error)) __pyx_v_error = 0; } @@ -124457,7 +116435,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * if entry.type != ErrorTypes.WAR_UNDECLARED_ENTITY and \ * entry.type != ErrorTypes.ERR_UNDECLARED_ENTITY: */ - __Pyx_TraceLine(1349,0,__PYX_ERR(2, 1349, __pyx_L1_error)) __pyx_L32_break:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -124479,24 +116456,23 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * # propagate Python exceptions immediately * recover = 0 */ - __Pyx_TraceLine(1356,0,__PYX_ERR(2, 1356, __pyx_L1_error)) - __pyx_t_7 = ((!(__pyx_v_pctxt->wellFormed != 0)) != 0); - if (__pyx_t_7) { + __pyx_t_6 = ((!(__pyx_v_pctxt->wellFormed != 0)) != 0); + if (__pyx_t_6) { } else { - __pyx_t_6 = __pyx_t_7; + __pyx_t_5 = __pyx_t_6; goto __pyx_L38_bool_binop_done; } - __pyx_t_7 = (__pyx_v_pctxt->disableSAX != 0); - if (__pyx_t_7) { + __pyx_t_6 = (__pyx_v_pctxt->disableSAX != 0); + if (__pyx_t_6) { } else { - __pyx_t_6 = __pyx_t_7; + __pyx_t_5 = __pyx_t_6; goto __pyx_L38_bool_binop_done; } - __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._has_raised(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_v_context)); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1356, __pyx_L1_error) - __pyx_t_16 = (__pyx_t_7 != 0); - __pyx_t_6 = __pyx_t_16; + __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._has_raised(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_v_context)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(2, 1356, __pyx_L1_error) + __pyx_t_15 = (__pyx_t_6 != 0); + __pyx_t_5 = __pyx_t_15; __pyx_L38_bool_binop_done:; - if (__pyx_t_6) { + if (__pyx_t_5) { /* "src/lxml/parser.pxi":1358 * if not pctxt.wellFormed and pctxt.disableSAX and context._has_raised(): @@ -124505,7 +116481,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * error = 1 * */ - __Pyx_TraceLine(1358,0,__PYX_ERR(2, 1358, __pyx_L1_error)) __pyx_v_recover = 0; /* "src/lxml/parser.pxi":1359 @@ -124515,7 +116490,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * * if fixup_error or not recover and (error or not pctxt.wellFormed): */ - __Pyx_TraceLine(1359,0,__PYX_ERR(2, 1359, __pyx_L1_error)) __pyx_v_error = 1; /* "src/lxml/parser.pxi":1356 @@ -124534,29 +116508,28 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * self._feed_parser_running = 0 * try: */ - __Pyx_TraceLine(1361,0,__PYX_ERR(2, 1361, __pyx_L1_error)) - __pyx_t_16 = (__pyx_v_fixup_error != 0); - if (!__pyx_t_16) { + __pyx_t_15 = (__pyx_v_fixup_error != 0); + if (!__pyx_t_15) { } else { - __pyx_t_6 = __pyx_t_16; + __pyx_t_5 = __pyx_t_15; goto __pyx_L42_bool_binop_done; } - __pyx_t_16 = ((!(__pyx_v_recover != 0)) != 0); - if (__pyx_t_16) { + __pyx_t_15 = ((!(__pyx_v_recover != 0)) != 0); + if (__pyx_t_15) { } else { - __pyx_t_6 = __pyx_t_16; + __pyx_t_5 = __pyx_t_15; goto __pyx_L42_bool_binop_done; } - __pyx_t_16 = (__pyx_v_error != 0); - if (!__pyx_t_16) { + __pyx_t_15 = (__pyx_v_error != 0); + if (!__pyx_t_15) { } else { - __pyx_t_6 = __pyx_t_16; + __pyx_t_5 = __pyx_t_15; goto __pyx_L42_bool_binop_done; } - __pyx_t_16 = ((!(__pyx_v_pctxt->wellFormed != 0)) != 0); - __pyx_t_6 = __pyx_t_16; + __pyx_t_15 = ((!(__pyx_v_pctxt->wellFormed != 0)) != 0); + __pyx_t_5 = __pyx_t_15; __pyx_L42_bool_binop_done:; - if (__pyx_t_6) { + if (__pyx_t_5) { /* "src/lxml/parser.pxi":1362 * @@ -124565,7 +116538,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * try: * context._handleParseResult(self, pctxt.myDoc, None) */ - __Pyx_TraceLine(1362,0,__PYX_ERR(2, 1362, __pyx_L1_error)) __pyx_v_self->_feed_parser_running = 0; /* "src/lxml/parser.pxi":1363 @@ -124575,7 +116547,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * context._handleParseResult(self, pctxt.myDoc, None) * finally: */ - __Pyx_TraceLine(1363,0,__PYX_ERR(2, 1363, __pyx_L47_error)) /*try:*/ { /* "src/lxml/parser.pxi":1364 @@ -124585,7 +116556,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * finally: * context.cleanup() */ - __Pyx_TraceLine(1364,0,__PYX_ERR(2, 1364, __pyx_L47_error)) __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->_handleParseResult(__pyx_v_context, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self), __pyx_v_pctxt->myDoc, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1364, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -124598,58 +116568,56 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ * * cpdef close(self): */ - __Pyx_TraceLine(1366,0,__PYX_ERR(2, 1366, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ - __pyx_t_10 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(2, 1366, __pyx_L1_error) + __pyx_t_9 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(2, 1366, __pyx_L1_error) goto __pyx_L48; } __pyx_L47_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign - __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21); + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20); + __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_22); __Pyx_XGOTREF(__pyx_t_23); - __Pyx_XGOTREF(__pyx_t_24); - __pyx_t_10 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename; + __pyx_t_9 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename; { - __pyx_t_25 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_25 == ((int)-1))) __PYX_ERR(2, 1366, __pyx_L50_error) + __pyx_t_24 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_24 == ((int)-1))) __PYX_ERR(2, 1366, __pyx_L50_error) } if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_23); - __Pyx_XGIVEREF(__pyx_t_24); - __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24); + __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23); } + __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); - __Pyx_XGIVEREF(__pyx_t_21); - __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21); - __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; - __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18; + __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20); + __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; + __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17; goto __pyx_L1_error; __pyx_L50_error:; if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_23); - __Pyx_XGIVEREF(__pyx_t_24); - __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24); + __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23); } + __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; - __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; - __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; + __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; goto __pyx_L1_error; } __pyx_L48:; @@ -124680,14 +116648,12 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("lxml.etree._FeedParser.feed", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); __Pyx_XDECREF(__pyx_v_entry); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -124709,12 +116675,9 @@ static PyObject *__pyx_pw_4lxml_5etree_11_FeedParser_1feed(PyObject *__pyx_v_sel static PyObject *__pyx_pf_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_5etree__FeedParser *__pyx_v_self, PyObject *__pyx_v_data) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__239) __Pyx_RefNannySetupContext("feed", 0); - __Pyx_TraceCall("feed (wrapper)", __pyx_f[2], 1242, 0, __PYX_ERR(2, 1242, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4lxml_5etree_11_FeedParser_feed(__pyx_v_self, __pyx_v_data, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -124729,7 +116692,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -124748,7 +116710,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_close(struct __pyx_obj_4lxml xmlParserCtxt *__pyx_v_pctxt; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -124769,42 +116730,53 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_close(struct __pyx_obj_4lxml PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; int __pyx_t_19; - __Pyx_TraceFrameInit(__pyx_codeobj__240) __Pyx_RefNannySetupContext("close", 0); - __Pyx_TraceCall("close", __pyx_f[2], 1368, 0, __PYX_ERR(2, 1368, __pyx_L1_error)); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1368, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4lxml_5etree_11_FeedParser_3close)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); + 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 + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1368, __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_11_FeedParser_3close)) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } } + __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(2, 1368, __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; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1368, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1368, __pyx_L1_error) + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; } - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } /* "src/lxml/parser.pxi":1379 @@ -124814,7 +116786,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_close(struct __pyx_obj_4lxml * raise XMLSyntaxError(u"no element found", * xmlerror.XML_ERR_INTERNAL_ERROR, 0, 0, */ - __Pyx_TraceLine(1379,0,__PYX_ERR(2, 1379, __pyx_L1_error)) __pyx_t_5 = ((!(__pyx_v_self->_feed_parser_running != 0)) != 0); if (unlikely(__pyx_t_5)) { @@ -124825,8 +116796,7 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_close(struct __pyx_obj_4lxml * xmlerror.XML_ERR_INTERNAL_ERROR, 0, 0, * self._filename) */ - __Pyx_TraceLine(1380,0,__PYX_ERR(2, 1380, __pyx_L1_error)) - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_XMLSyntaxError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1380, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_XMLSyntaxError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "src/lxml/parser.pxi":1381 @@ -124836,7 +116806,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_close(struct __pyx_obj_4lxml * self._filename) * */ - __Pyx_TraceLine(1381,0,__PYX_ERR(2, 1381, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyInt_From_xmlParserErrors(XML_ERR_INTERNAL_ERROR); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -124847,7 +116816,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_close(struct __pyx_obj_4lxml * * context = self._getPushParserContext() */ - __Pyx_TraceLine(1382,0,__PYX_ERR(2, 1382, __pyx_L1_error)) __pyx_t_4 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -124924,7 +116892,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_close(struct __pyx_obj_4lxml * pctxt = context._c_ctxt * */ - __Pyx_TraceLine(1384,0,__PYX_ERR(2, 1384, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__FeedParser *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._getPushParserContext(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_1); @@ -124937,7 +116904,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_close(struct __pyx_obj_4lxml * * self._feed_parser_running = 0 */ - __Pyx_TraceLine(1385,0,__PYX_ERR(2, 1385, __pyx_L1_error)) __pyx_t_8 = __pyx_v_context->_c_ctxt; __pyx_v_pctxt = __pyx_t_8; @@ -124948,7 +116914,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_close(struct __pyx_obj_4lxml * if self._for_html: * htmlparser.htmlParseChunk(pctxt, NULL, 0, 1) */ - __Pyx_TraceLine(1387,0,__PYX_ERR(2, 1387, __pyx_L1_error)) __pyx_v_self->_feed_parser_running = 0; /* "src/lxml/parser.pxi":1388 @@ -124958,7 +116923,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_close(struct __pyx_obj_4lxml * htmlparser.htmlParseChunk(pctxt, NULL, 0, 1) * else: */ - __Pyx_TraceLine(1388,0,__PYX_ERR(2, 1388, __pyx_L1_error)) __pyx_t_5 = (__pyx_v_self->__pyx_base._for_html != 0); if (__pyx_t_5) { @@ -124969,7 +116933,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_close(struct __pyx_obj_4lxml * else: * xmlparser.xmlParseChunk(pctxt, NULL, 0, 1) */ - __Pyx_TraceLine(1389,0,__PYX_ERR(2, 1389, __pyx_L1_error)) (void)(htmlParseChunk(__pyx_v_pctxt, NULL, 0, 1)); /* "src/lxml/parser.pxi":1388 @@ -124989,7 +116952,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_close(struct __pyx_obj_4lxml * * if (pctxt.recovery and not pctxt.disableSAX and */ - __Pyx_TraceLine(1391,0,__PYX_ERR(2, 1391, __pyx_L1_error)) /*else*/ { (void)(xmlParseChunk(__pyx_v_pctxt, NULL, 0, 1)); } @@ -125002,7 +116964,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_close(struct __pyx_obj_4lxml * isinstance(context, _SaxParserContext)): * # apply any left-over 'end' events */ - __Pyx_TraceLine(1393,0,__PYX_ERR(2, 1393, __pyx_L1_error)) __pyx_t_9 = (__pyx_v_pctxt->recovery != 0); if (__pyx_t_9) { } else { @@ -125023,7 +116984,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_close(struct __pyx_obj_4lxml * # apply any left-over 'end' events * (<_SaxParserContext>context).flushEvents() */ - __Pyx_TraceLine(1394,0,__PYX_ERR(2, 1394, __pyx_L1_error)) __pyx_t_9 = __Pyx_TypeCheck(((PyObject *)__pyx_v_context), __pyx_ptype_4lxml_5etree__SaxParserContext); __pyx_t_10 = (__pyx_t_9 != 0); __pyx_t_5 = __pyx_t_10; @@ -125036,7 +116996,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_close(struct __pyx_obj_4lxml * isinstance(context, _SaxParserContext)): * # apply any left-over 'end' events */ - __Pyx_TraceLine(1393,0,__PYX_ERR(2, 1393, __pyx_L1_error)) if (__pyx_t_5) { /* "src/lxml/parser.pxi":1396 @@ -125046,7 +117005,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_close(struct __pyx_obj_4lxml * * try: */ - __Pyx_TraceLine(1396,0,__PYX_ERR(2, 1396, __pyx_L1_error)) __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_v_context)->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->flushEvents(((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_v_context)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(2, 1396, __pyx_L1_error) /* "src/lxml/parser.pxi":1393 @@ -125065,7 +117023,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_close(struct __pyx_obj_4lxml * result = context._handleParseResult(self, pctxt.myDoc, None) * finally: */ - __Pyx_TraceLine(1398,0,__PYX_ERR(2, 1398, __pyx_L10_error)) /*try:*/ { /* "src/lxml/parser.pxi":1399 @@ -125075,7 +117032,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_close(struct __pyx_obj_4lxml * finally: * context.cleanup() */ - __Pyx_TraceLine(1399,0,__PYX_ERR(2, 1399, __pyx_L10_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->_handleParseResult(__pyx_v_context, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self), __pyx_v_pctxt->myDoc, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1399, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = __pyx_t_1; @@ -125089,7 +117045,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_close(struct __pyx_obj_4lxml * * if isinstance(result, _Document): */ - __Pyx_TraceLine(1401,0,__PYX_ERR(2, 1401, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(2, 1401, __pyx_L1_error) @@ -125153,7 +117108,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_close(struct __pyx_obj_4lxml * return (<_Document>result).getroot() * else: */ - __Pyx_TraceLine(1403,0,__PYX_ERR(2, 1403, __pyx_L1_error)) __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_result, __pyx_ptype_4lxml_5etree__Document); __pyx_t_10 = (__pyx_t_5 != 0); if (__pyx_t_10) { @@ -125165,7 +117119,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_close(struct __pyx_obj_4lxml * else: * return result */ - __Pyx_TraceLine(1404,0,__PYX_ERR(2, 1404, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4lxml_5etree_9_Document_getroot(((struct LxmlDocument *)__pyx_v_result)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -125189,7 +117142,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_close(struct __pyx_obj_4lxml * * */ - __Pyx_TraceLine(1406,0,__PYX_ERR(2, 1406, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); @@ -125218,7 +117170,6 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_close(struct __pyx_obj_4lxml __Pyx_XDECREF((PyObject *)__pyx_v_context); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -125240,12 +117191,9 @@ static PyObject *__pyx_pw_4lxml_5etree_11_FeedParser_3close(PyObject *__pyx_v_se static PyObject *__pyx_pf_4lxml_5etree_11_FeedParser_2close(struct __pyx_obj_4lxml_5etree__FeedParser *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__240) __Pyx_RefNannySetupContext("close", 0); - __Pyx_TraceCall("close (wrapper)", __pyx_f[2], 1368, 0, __PYX_ERR(2, 1368, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4lxml_5etree_11_FeedParser_close(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -125260,7 +117208,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11_FeedParser_2close(struct __pyx_obj_4lx __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -125276,11 +117223,9 @@ static PyObject *__pyx_pf_4lxml_5etree_11_FeedParser_2close(struct __pyx_obj_4lx static int __pyx_f_4lxml_5etree__htmlCtxtResetPush(xmlParserCtxt *__pyx_v_c_ctxt, const char *__pyx_v_c_data, int __pyx_v_buffer_len, const char *__pyx_v_c_filename, const char *__pyx_v_c_encoding, int __pyx_v_parse_options) { int __pyx_v_error; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_htmlCtxtResetPush", 0); - __Pyx_TraceCall("_htmlCtxtResetPush", __pyx_f[2], 1409, 0, __PYX_ERR(2, 1409, __pyx_L1_error)); /* "src/lxml/parser.pxi":1415 * cdef xmlparser.xmlParserInput* c_input_stream @@ -125289,7 +117234,6 @@ static int __pyx_f_4lxml_5etree__htmlCtxtResetPush(xmlParserCtxt *__pyx_v_c_ctxt * c_ctxt, c_data, buffer_len, c_filename, c_encoding) * if error: */ - __Pyx_TraceLine(1415,0,__PYX_ERR(2, 1415, __pyx_L1_error)) __pyx_v_error = xmlCtxtResetPush(__pyx_v_c_ctxt, __pyx_v_c_data, __pyx_v_buffer_len, __pyx_v_c_filename, __pyx_v_c_encoding); /* "src/lxml/parser.pxi":1417 @@ -125299,7 +117243,6 @@ static int __pyx_f_4lxml_5etree__htmlCtxtResetPush(xmlParserCtxt *__pyx_v_c_ctxt * return error * */ - __Pyx_TraceLine(1417,0,__PYX_ERR(2, 1417, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_error != 0); if (__pyx_t_1) { @@ -125310,7 +117253,6 @@ static int __pyx_f_4lxml_5etree__htmlCtxtResetPush(xmlParserCtxt *__pyx_v_c_ctxt * * # fix libxml2 setup for HTML */ - __Pyx_TraceLine(1418,0,__PYX_ERR(2, 1418, __pyx_L1_error)) __pyx_r = __pyx_v_error; goto __pyx_L0; @@ -125330,7 +117272,6 @@ static int __pyx_f_4lxml_5etree__htmlCtxtResetPush(xmlParserCtxt *__pyx_v_c_ctxt * c_ctxt.html = 1 * htmlparser.htmlCtxtUseOptions(c_ctxt, parse_options) */ - __Pyx_TraceLine(1421,0,__PYX_ERR(2, 1421, __pyx_L1_error)) __pyx_v_c_ctxt->progressive = 1; /* "src/lxml/parser.pxi":1422 @@ -125340,7 +117281,6 @@ static int __pyx_f_4lxml_5etree__htmlCtxtResetPush(xmlParserCtxt *__pyx_v_c_ctxt * htmlparser.htmlCtxtUseOptions(c_ctxt, parse_options) * */ - __Pyx_TraceLine(1422,0,__PYX_ERR(2, 1422, __pyx_L1_error)) __pyx_v_c_ctxt->html = 1; /* "src/lxml/parser.pxi":1423 @@ -125350,7 +117290,6 @@ static int __pyx_f_4lxml_5etree__htmlCtxtResetPush(xmlParserCtxt *__pyx_v_c_ctxt * * return 0 */ - __Pyx_TraceLine(1423,0,__PYX_ERR(2, 1423, __pyx_L1_error)) (void)(htmlCtxtUseOptions(__pyx_v_c_ctxt, __pyx_v_parse_options)); /* "src/lxml/parser.pxi":1425 @@ -125360,7 +117299,6 @@ static int __pyx_f_4lxml_5etree__htmlCtxtResetPush(xmlParserCtxt *__pyx_v_c_ctxt * * */ - __Pyx_TraceLine(1425,0,__PYX_ERR(2, 1425, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -125373,11 +117311,7 @@ static int __pyx_f_4lxml_5etree__htmlCtxtResetPush(xmlParserCtxt *__pyx_v_c_ctxt */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._htmlCtxtResetPush", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -125544,7 +117478,6 @@ static int __pyx_pw_4lxml_5etree_9XMLParser_1__init__(PyObject *__pyx_v_self, Py static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etree_XMLParser *__pyx_v_self, PyObject *__pyx_v_encoding, PyObject *__pyx_v_attribute_defaults, PyObject *__pyx_v_dtd_validation, PyObject *__pyx_v_load_dtd, PyObject *__pyx_v_no_network, PyObject *__pyx_v_ns_clean, PyObject *__pyx_v_recover, struct __pyx_obj_4lxml_5etree_XMLSchema *__pyx_v_schema, PyObject *__pyx_v_huge_tree, PyObject *__pyx_v_remove_blank_text, PyObject *__pyx_v_resolve_entities, PyObject *__pyx_v_remove_comments, PyObject *__pyx_v_remove_pis, PyObject *__pyx_v_strip_cdata, PyObject *__pyx_v_collect_ids, PyObject *__pyx_v_target, PyObject *__pyx_v_compact) { int __pyx_v_parse_options; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -125555,7 +117488,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr int __pyx_t_7; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[2], 1486, 0, __PYX_ERR(2, 1486, __pyx_L1_error)); /* "src/lxml/parser.pxi":1493 * collect_ids=True, target=None, compact=True): @@ -125564,7 +117496,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * if load_dtd: * parse_options = parse_options | xmlparser.XML_PARSE_DTDLOAD */ - __Pyx_TraceLine(1493,0,__PYX_ERR(2, 1493, __pyx_L1_error)) __pyx_v_parse_options = __pyx_v_4lxml_5etree__XML_DEFAULT_PARSE_OPTIONS; /* "src/lxml/parser.pxi":1494 @@ -125574,7 +117505,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * parse_options = parse_options | xmlparser.XML_PARSE_DTDLOAD * if dtd_validation: */ - __Pyx_TraceLine(1494,0,__PYX_ERR(2, 1494, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_load_dtd); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1494, __pyx_L1_error) if (__pyx_t_1) { @@ -125585,7 +117515,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * if dtd_validation: * parse_options = parse_options | xmlparser.XML_PARSE_DTDVALID | \ */ - __Pyx_TraceLine(1495,0,__PYX_ERR(2, 1495, __pyx_L1_error)) __pyx_v_parse_options = (__pyx_v_parse_options | XML_PARSE_DTDLOAD); /* "src/lxml/parser.pxi":1494 @@ -125604,7 +117533,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * parse_options = parse_options | xmlparser.XML_PARSE_DTDVALID | \ * xmlparser.XML_PARSE_DTDLOAD */ - __Pyx_TraceLine(1496,0,__PYX_ERR(2, 1496, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_dtd_validation); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1496, __pyx_L1_error) if (__pyx_t_1) { @@ -125615,7 +117543,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * xmlparser.XML_PARSE_DTDLOAD * if attribute_defaults: */ - __Pyx_TraceLine(1497,0,__PYX_ERR(2, 1497, __pyx_L1_error)) __pyx_v_parse_options = ((__pyx_v_parse_options | XML_PARSE_DTDVALID) | XML_PARSE_DTDLOAD); /* "src/lxml/parser.pxi":1496 @@ -125634,7 +117561,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * parse_options = parse_options | xmlparser.XML_PARSE_DTDATTR * if schema is None: */ - __Pyx_TraceLine(1499,0,__PYX_ERR(2, 1499, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_attribute_defaults); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1499, __pyx_L1_error) if (__pyx_t_1) { @@ -125645,7 +117571,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * if schema is None: * parse_options = parse_options | xmlparser.XML_PARSE_DTDLOAD */ - __Pyx_TraceLine(1500,0,__PYX_ERR(2, 1500, __pyx_L1_error)) __pyx_v_parse_options = (__pyx_v_parse_options | XML_PARSE_DTDATTR); /* "src/lxml/parser.pxi":1501 @@ -125655,7 +117580,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * parse_options = parse_options | xmlparser.XML_PARSE_DTDLOAD * if ns_clean: */ - __Pyx_TraceLine(1501,0,__PYX_ERR(2, 1501, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_schema) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -125667,7 +117591,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * if ns_clean: * parse_options = parse_options | xmlparser.XML_PARSE_NSCLEAN */ - __Pyx_TraceLine(1502,0,__PYX_ERR(2, 1502, __pyx_L1_error)) __pyx_v_parse_options = (__pyx_v_parse_options | XML_PARSE_DTDLOAD); /* "src/lxml/parser.pxi":1501 @@ -125695,7 +117618,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * parse_options = parse_options | xmlparser.XML_PARSE_NSCLEAN * if recover: */ - __Pyx_TraceLine(1503,0,__PYX_ERR(2, 1503, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ns_clean); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 1503, __pyx_L1_error) if (__pyx_t_2) { @@ -125706,7 +117628,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * if recover: * parse_options = parse_options | xmlparser.XML_PARSE_RECOVER */ - __Pyx_TraceLine(1504,0,__PYX_ERR(2, 1504, __pyx_L1_error)) __pyx_v_parse_options = (__pyx_v_parse_options | XML_PARSE_NSCLEAN); /* "src/lxml/parser.pxi":1503 @@ -125725,7 +117646,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * parse_options = parse_options | xmlparser.XML_PARSE_RECOVER * if remove_blank_text: */ - __Pyx_TraceLine(1505,0,__PYX_ERR(2, 1505, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_recover); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 1505, __pyx_L1_error) if (__pyx_t_2) { @@ -125736,7 +117656,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * if remove_blank_text: * parse_options = parse_options | xmlparser.XML_PARSE_NOBLANKS */ - __Pyx_TraceLine(1506,0,__PYX_ERR(2, 1506, __pyx_L1_error)) __pyx_v_parse_options = (__pyx_v_parse_options | XML_PARSE_RECOVER); /* "src/lxml/parser.pxi":1505 @@ -125755,7 +117674,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * parse_options = parse_options | xmlparser.XML_PARSE_NOBLANKS * if huge_tree: */ - __Pyx_TraceLine(1507,0,__PYX_ERR(2, 1507, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_remove_blank_text); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 1507, __pyx_L1_error) if (__pyx_t_2) { @@ -125766,7 +117684,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * if huge_tree: * parse_options = parse_options | xmlparser.XML_PARSE_HUGE */ - __Pyx_TraceLine(1508,0,__PYX_ERR(2, 1508, __pyx_L1_error)) __pyx_v_parse_options = (__pyx_v_parse_options | XML_PARSE_NOBLANKS); /* "src/lxml/parser.pxi":1507 @@ -125785,7 +117702,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * parse_options = parse_options | xmlparser.XML_PARSE_HUGE * if not no_network: */ - __Pyx_TraceLine(1509,0,__PYX_ERR(2, 1509, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_huge_tree); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 1509, __pyx_L1_error) if (__pyx_t_2) { @@ -125796,7 +117712,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * if not no_network: * parse_options = parse_options ^ xmlparser.XML_PARSE_NONET */ - __Pyx_TraceLine(1510,0,__PYX_ERR(2, 1510, __pyx_L1_error)) __pyx_v_parse_options = (__pyx_v_parse_options | XML_PARSE_HUGE); /* "src/lxml/parser.pxi":1509 @@ -125815,7 +117730,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * parse_options = parse_options ^ xmlparser.XML_PARSE_NONET * if not compact: */ - __Pyx_TraceLine(1511,0,__PYX_ERR(2, 1511, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_no_network); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 1511, __pyx_L1_error) __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { @@ -125827,7 +117741,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * if not compact: * parse_options = parse_options ^ xmlparser.XML_PARSE_COMPACT */ - __Pyx_TraceLine(1512,0,__PYX_ERR(2, 1512, __pyx_L1_error)) __pyx_v_parse_options = (__pyx_v_parse_options ^ XML_PARSE_NONET); /* "src/lxml/parser.pxi":1511 @@ -125846,7 +117759,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * parse_options = parse_options ^ xmlparser.XML_PARSE_COMPACT * if not resolve_entities: */ - __Pyx_TraceLine(1513,0,__PYX_ERR(2, 1513, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_compact); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1513, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { @@ -125858,7 +117770,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * if not resolve_entities: * parse_options = parse_options ^ xmlparser.XML_PARSE_NOENT */ - __Pyx_TraceLine(1514,0,__PYX_ERR(2, 1514, __pyx_L1_error)) __pyx_v_parse_options = (__pyx_v_parse_options ^ XML_PARSE_COMPACT); /* "src/lxml/parser.pxi":1513 @@ -125877,7 +117788,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * parse_options = parse_options ^ xmlparser.XML_PARSE_NOENT * if not strip_cdata: */ - __Pyx_TraceLine(1515,0,__PYX_ERR(2, 1515, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_resolve_entities); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 1515, __pyx_L1_error) __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { @@ -125889,7 +117799,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * if not strip_cdata: * parse_options = parse_options ^ xmlparser.XML_PARSE_NOCDATA */ - __Pyx_TraceLine(1516,0,__PYX_ERR(2, 1516, __pyx_L1_error)) __pyx_v_parse_options = (__pyx_v_parse_options ^ XML_PARSE_NOENT); /* "src/lxml/parser.pxi":1515 @@ -125908,7 +117817,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * parse_options = parse_options ^ xmlparser.XML_PARSE_NOCDATA * */ - __Pyx_TraceLine(1517,0,__PYX_ERR(2, 1517, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_strip_cdata); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1517, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { @@ -125920,7 +117828,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * * _BaseParser.__init__(self, parse_options, 0, schema, */ - __Pyx_TraceLine(1518,0,__PYX_ERR(2, 1518, __pyx_L1_error)) __pyx_v_parse_options = (__pyx_v_parse_options ^ XML_PARSE_NOCDATA); /* "src/lxml/parser.pxi":1517 @@ -125939,7 +117846,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * remove_comments, remove_pis, strip_cdata, * collect_ids, target, encoding) */ - __Pyx_TraceLine(1520,0,__PYX_ERR(2, 1520, __pyx_L1_error)) __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree__BaseParser), __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_parse_options); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1520, __pyx_L1_error) @@ -125952,7 +117858,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr * * */ - __Pyx_TraceLine(1522,0,__PYX_ERR(2, 1522, __pyx_L1_error)) __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -126046,7 +117951,6 @@ static int __pyx_pf_4lxml_5etree_9XMLParser___init__(struct __pyx_obj_4lxml_5etr __Pyx_AddTraceback("lxml.etree.XMLParser.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -126135,7 +118039,6 @@ static int __pyx_pw_4lxml_5etree_13XMLPullParser_1__init__(PyObject *__pyx_v_sel static int __pyx_pf_4lxml_5etree_13XMLPullParser___init__(struct __pyx_obj_4lxml_5etree_XMLPullParser *__pyx_v_self, PyObject *__pyx_v_events, PyObject *__pyx_v_tag, PyObject *__pyx_v_base_url, PyObject *__pyx_v_kwargs) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -126143,7 +118046,6 @@ static int __pyx_pf_4lxml_5etree_13XMLPullParser___init__(struct __pyx_obj_4lxml int __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[2], 1543, 0, __PYX_ERR(2, 1543, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_events); /* "src/lxml/parser.pxi":1544 @@ -126153,7 +118055,6 @@ static int __pyx_pf_4lxml_5etree_13XMLPullParser___init__(struct __pyx_obj_4lxml * if events is None: * events = ('end',) */ - __Pyx_TraceLine(1544,0,__PYX_ERR(2, 1544, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree_XMLParser), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1544, __pyx_L1_error) @@ -126174,7 +118075,6 @@ static int __pyx_pf_4lxml_5etree_13XMLPullParser___init__(struct __pyx_obj_4lxml * events = ('end',) * self._setBaseURL(base_url) */ - __Pyx_TraceLine(1545,0,__PYX_ERR(2, 1545, __pyx_L1_error)) __pyx_t_4 = (__pyx_v_events == Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { @@ -126186,9 +118086,8 @@ static int __pyx_pf_4lxml_5etree_13XMLPullParser___init__(struct __pyx_obj_4lxml * self._setBaseURL(base_url) * self._collectEvents(events, tag) */ - __Pyx_TraceLine(1546,0,__PYX_ERR(2, 1546, __pyx_L1_error)) - __Pyx_INCREF(__pyx_tuple__241); - __Pyx_DECREF_SET(__pyx_v_events, __pyx_tuple__241); + __Pyx_INCREF(__pyx_tuple__53); + __Pyx_DECREF_SET(__pyx_v_events, __pyx_tuple__53); /* "src/lxml/parser.pxi":1545 * def __init__(self, events=None, *, tag=None, base_url=None, **kwargs): @@ -126206,7 +118105,6 @@ static int __pyx_pf_4lxml_5etree_13XMLPullParser___init__(struct __pyx_obj_4lxml * self._collectEvents(events, tag) * */ - __Pyx_TraceLine(1547,0,__PYX_ERR(2, 1547, __pyx_L1_error)) __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree_XMLPullParser *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._setBaseURL(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self), __pyx_v_base_url); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -126218,7 +118116,6 @@ static int __pyx_pf_4lxml_5etree_13XMLPullParser___init__(struct __pyx_obj_4lxml * * def read_events(self): */ - __Pyx_TraceLine(1548,0,__PYX_ERR(2, 1548, __pyx_L1_error)) __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree_XMLPullParser *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._collectEvents(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self), __pyx_v_events, __pyx_v_tag); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -126242,7 +118139,6 @@ static int __pyx_pf_4lxml_5etree_13XMLPullParser___init__(struct __pyx_obj_4lxml __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_events); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -126271,12 +118167,9 @@ static PyObject *__pyx_pw_4lxml_5etree_13XMLPullParser_3read_events(PyObject *__ static PyObject *__pyx_pf_4lxml_5etree_13XMLPullParser_2read_events(struct __pyx_obj_4lxml_5etree_XMLPullParser *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__242) __Pyx_RefNannySetupContext("read_events", 0); - __Pyx_TraceCall("read_events", __pyx_f[2], 1550, 0, __PYX_ERR(2, 1550, __pyx_L1_error)); /* "src/lxml/parser.pxi":1551 * @@ -126285,7 +118178,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XMLPullParser_2read_events(struct __pyx * * */ - __Pyx_TraceLine(1551,0,__PYX_ERR(2, 1551, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree_XMLPullParser *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._getPushParserContext(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -126310,7 +118202,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XMLPullParser_2read_events(struct __pyx __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -126468,14 +118359,12 @@ static int __pyx_pw_4lxml_5etree_17ETCompatXMLParser_1__init__(PyObject *__pyx_v static int __pyx_pf_4lxml_5etree_17ETCompatXMLParser___init__(struct __pyx_obj_4lxml_5etree_ETCompatXMLParser *__pyx_v_self, PyObject *__pyx_v_encoding, PyObject *__pyx_v_attribute_defaults, PyObject *__pyx_v_dtd_validation, PyObject *__pyx_v_load_dtd, PyObject *__pyx_v_no_network, PyObject *__pyx_v_ns_clean, PyObject *__pyx_v_recover, PyObject *__pyx_v_schema, PyObject *__pyx_v_huge_tree, PyObject *__pyx_v_remove_blank_text, PyObject *__pyx_v_resolve_entities, PyObject *__pyx_v_remove_comments, PyObject *__pyx_v_remove_pis, PyObject *__pyx_v_strip_cdata, PyObject *__pyx_v_target, PyObject *__pyx_v_compact) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[2], 1569, 0, __PYX_ERR(2, 1569, __pyx_L1_error)); /* "src/lxml/parser.pxi":1575 * remove_comments=True, remove_pis=True, strip_cdata=True, @@ -126484,7 +118373,6 @@ static int __pyx_pf_4lxml_5etree_17ETCompatXMLParser___init__(struct __pyx_obj_4 * attribute_defaults=attribute_defaults, * dtd_validation=dtd_validation, */ - __Pyx_TraceLine(1575,0,__PYX_ERR(2, 1575, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree_XMLParser), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1575, __pyx_L1_error) @@ -126500,7 +118388,6 @@ static int __pyx_pf_4lxml_5etree_17ETCompatXMLParser___init__(struct __pyx_obj_4 * dtd_validation=dtd_validation, * load_dtd=load_dtd, */ - __Pyx_TraceLine(1576,0,__PYX_ERR(2, 1576, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyDict_NewPresized(16); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_attribute_defaults, __pyx_v_attribute_defaults) < 0) __PYX_ERR(2, 1576, __pyx_L1_error) @@ -126512,7 +118399,6 @@ static int __pyx_pf_4lxml_5etree_17ETCompatXMLParser___init__(struct __pyx_obj_4 * load_dtd=load_dtd, * no_network=no_network, */ - __Pyx_TraceLine(1577,0,__PYX_ERR(2, 1577, __pyx_L1_error)) if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtd_validation, __pyx_v_dtd_validation) < 0) __PYX_ERR(2, 1576, __pyx_L1_error) /* "src/lxml/parser.pxi":1578 @@ -126522,7 +118408,6 @@ static int __pyx_pf_4lxml_5etree_17ETCompatXMLParser___init__(struct __pyx_obj_4 * no_network=no_network, * ns_clean=ns_clean, */ - __Pyx_TraceLine(1578,0,__PYX_ERR(2, 1578, __pyx_L1_error)) if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_load_dtd, __pyx_v_load_dtd) < 0) __PYX_ERR(2, 1576, __pyx_L1_error) /* "src/lxml/parser.pxi":1579 @@ -126532,7 +118417,6 @@ static int __pyx_pf_4lxml_5etree_17ETCompatXMLParser___init__(struct __pyx_obj_4 * ns_clean=ns_clean, * recover=recover, */ - __Pyx_TraceLine(1579,0,__PYX_ERR(2, 1579, __pyx_L1_error)) if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_no_network, __pyx_v_no_network) < 0) __PYX_ERR(2, 1576, __pyx_L1_error) /* "src/lxml/parser.pxi":1580 @@ -126542,7 +118426,6 @@ static int __pyx_pf_4lxml_5etree_17ETCompatXMLParser___init__(struct __pyx_obj_4 * recover=recover, * remove_blank_text=remove_blank_text, */ - __Pyx_TraceLine(1580,0,__PYX_ERR(2, 1580, __pyx_L1_error)) if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_ns_clean, __pyx_v_ns_clean) < 0) __PYX_ERR(2, 1576, __pyx_L1_error) /* "src/lxml/parser.pxi":1581 @@ -126552,7 +118435,6 @@ static int __pyx_pf_4lxml_5etree_17ETCompatXMLParser___init__(struct __pyx_obj_4 * remove_blank_text=remove_blank_text, * huge_tree=huge_tree, */ - __Pyx_TraceLine(1581,0,__PYX_ERR(2, 1581, __pyx_L1_error)) if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_recover, __pyx_v_recover) < 0) __PYX_ERR(2, 1576, __pyx_L1_error) /* "src/lxml/parser.pxi":1582 @@ -126562,7 +118444,6 @@ static int __pyx_pf_4lxml_5etree_17ETCompatXMLParser___init__(struct __pyx_obj_4 * huge_tree=huge_tree, * compact=compact, */ - __Pyx_TraceLine(1582,0,__PYX_ERR(2, 1582, __pyx_L1_error)) if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_remove_blank_text, __pyx_v_remove_blank_text) < 0) __PYX_ERR(2, 1576, __pyx_L1_error) /* "src/lxml/parser.pxi":1583 @@ -126572,7 +118453,6 @@ static int __pyx_pf_4lxml_5etree_17ETCompatXMLParser___init__(struct __pyx_obj_4 * compact=compact, * resolve_entities=resolve_entities, */ - __Pyx_TraceLine(1583,0,__PYX_ERR(2, 1583, __pyx_L1_error)) if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_huge_tree, __pyx_v_huge_tree) < 0) __PYX_ERR(2, 1576, __pyx_L1_error) /* "src/lxml/parser.pxi":1584 @@ -126582,7 +118462,6 @@ static int __pyx_pf_4lxml_5etree_17ETCompatXMLParser___init__(struct __pyx_obj_4 * resolve_entities=resolve_entities, * remove_comments=remove_comments, */ - __Pyx_TraceLine(1584,0,__PYX_ERR(2, 1584, __pyx_L1_error)) if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_compact, __pyx_v_compact) < 0) __PYX_ERR(2, 1576, __pyx_L1_error) /* "src/lxml/parser.pxi":1585 @@ -126592,7 +118471,6 @@ static int __pyx_pf_4lxml_5etree_17ETCompatXMLParser___init__(struct __pyx_obj_4 * remove_comments=remove_comments, * remove_pis=remove_pis, */ - __Pyx_TraceLine(1585,0,__PYX_ERR(2, 1585, __pyx_L1_error)) if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_resolve_entities, __pyx_v_resolve_entities) < 0) __PYX_ERR(2, 1576, __pyx_L1_error) /* "src/lxml/parser.pxi":1586 @@ -126602,7 +118480,6 @@ static int __pyx_pf_4lxml_5etree_17ETCompatXMLParser___init__(struct __pyx_obj_4 * remove_pis=remove_pis, * strip_cdata=strip_cdata, */ - __Pyx_TraceLine(1586,0,__PYX_ERR(2, 1586, __pyx_L1_error)) if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_remove_comments, __pyx_v_remove_comments) < 0) __PYX_ERR(2, 1576, __pyx_L1_error) /* "src/lxml/parser.pxi":1587 @@ -126612,7 +118489,6 @@ static int __pyx_pf_4lxml_5etree_17ETCompatXMLParser___init__(struct __pyx_obj_4 * strip_cdata=strip_cdata, * target=target, */ - __Pyx_TraceLine(1587,0,__PYX_ERR(2, 1587, __pyx_L1_error)) if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_remove_pis, __pyx_v_remove_pis) < 0) __PYX_ERR(2, 1576, __pyx_L1_error) /* "src/lxml/parser.pxi":1588 @@ -126622,7 +118498,6 @@ static int __pyx_pf_4lxml_5etree_17ETCompatXMLParser___init__(struct __pyx_obj_4 * target=target, * encoding=encoding, */ - __Pyx_TraceLine(1588,0,__PYX_ERR(2, 1588, __pyx_L1_error)) if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_strip_cdata, __pyx_v_strip_cdata) < 0) __PYX_ERR(2, 1576, __pyx_L1_error) /* "src/lxml/parser.pxi":1589 @@ -126632,7 +118507,6 @@ static int __pyx_pf_4lxml_5etree_17ETCompatXMLParser___init__(struct __pyx_obj_4 * encoding=encoding, * schema=schema) */ - __Pyx_TraceLine(1589,0,__PYX_ERR(2, 1589, __pyx_L1_error)) if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_target, __pyx_v_target) < 0) __PYX_ERR(2, 1576, __pyx_L1_error) /* "src/lxml/parser.pxi":1590 @@ -126642,7 +118516,6 @@ static int __pyx_pf_4lxml_5etree_17ETCompatXMLParser___init__(struct __pyx_obj_4 * schema=schema) * */ - __Pyx_TraceLine(1590,0,__PYX_ERR(2, 1590, __pyx_L1_error)) if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_encoding, __pyx_v_encoding) < 0) __PYX_ERR(2, 1576, __pyx_L1_error) /* "src/lxml/parser.pxi":1591 @@ -126652,7 +118525,6 @@ static int __pyx_pf_4lxml_5etree_17ETCompatXMLParser___init__(struct __pyx_obj_4 * * # ET 1.2 compatible name */ - __Pyx_TraceLine(1591,0,__PYX_ERR(2, 1591, __pyx_L1_error)) if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_schema, __pyx_v_schema) < 0) __PYX_ERR(2, 1576, __pyx_L1_error) /* "src/lxml/parser.pxi":1575 @@ -126662,7 +118534,6 @@ static int __pyx_pf_4lxml_5etree_17ETCompatXMLParser___init__(struct __pyx_obj_4 * attribute_defaults=attribute_defaults, * dtd_validation=dtd_validation, */ - __Pyx_TraceLine(1575,0,__PYX_ERR(2, 1575, __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(2, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -126689,7 +118560,6 @@ static int __pyx_pf_4lxml_5etree_17ETCompatXMLParser___init__(struct __pyx_obj_4 __Pyx_AddTraceback("lxml.etree.ETCompatXMLParser.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -126705,7 +118575,7 @@ static int __pyx_pf_4lxml_5etree_17ETCompatXMLParser___init__(struct __pyx_obj_4 /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_45set_default_parser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_44set_default_parser[] = "set_default_parser(parser=None)\n\n Set a default parser for the current thread. This parser is used\n globally whenever no parser is supplied to the various parse functions of\n the lxml API. If this function is called without a parser (or if it is\n None), the default parser is reset to the original configuration.\n\n Note that the pre-installed default parser is not thread-safe. Avoid the\n default parser in multi-threaded environments. You can create a separate\n parser for each thread explicitly or use a parser pool.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_45set_default_parser = {"set_default_parser", (PyCFunction)__pyx_pw_4lxml_5etree_45set_default_parser, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_44set_default_parser}; +static PyMethodDef __pyx_mdef_4lxml_5etree_45set_default_parser = {"set_default_parser", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_45set_default_parser, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_44set_default_parser}; static PyObject *__pyx_pw_4lxml_5etree_45set_default_parser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_parser = 0; PyObject *__pyx_r = 0; @@ -126767,13 +118637,10 @@ static PyObject *__pyx_pw_4lxml_5etree_45set_default_parser(PyObject *__pyx_self static PyObject *__pyx_pf_4lxml_5etree_44set_default_parser(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_parser) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; - __Pyx_TraceFrameInit(__pyx_codeobj__243) __Pyx_RefNannySetupContext("set_default_parser", 0); - __Pyx_TraceCall("set_default_parser", __pyx_f[2], 1602, 0, __PYX_ERR(2, 1602, __pyx_L1_error)); __Pyx_INCREF((PyObject *)__pyx_v_parser); /* "src/lxml/parser.pxi":1614 @@ -126783,7 +118650,6 @@ static PyObject *__pyx_pf_4lxml_5etree_44set_default_parser(CYTHON_UNUSED PyObje * parser = __DEFAULT_XML_PARSER * __GLOBAL_PARSER_CONTEXT.setDefaultParser(parser) */ - __Pyx_TraceLine(1614,0,__PYX_ERR(2, 1614, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_parser) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -126795,7 +118661,6 @@ static PyObject *__pyx_pf_4lxml_5etree_44set_default_parser(CYTHON_UNUSED PyObje * __GLOBAL_PARSER_CONTEXT.setDefaultParser(parser) * */ - __Pyx_TraceLine(1615,0,__PYX_ERR(2, 1615, __pyx_L1_error)) __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)); @@ -126815,7 +118680,6 @@ static PyObject *__pyx_pf_4lxml_5etree_44set_default_parser(CYTHON_UNUSED PyObje * * def get_default_parser(): */ - __Pyx_TraceLine(1616,0,__PYX_ERR(2, 1616, __pyx_L1_error)) __pyx_f_4lxml_5etree_24_ParserDictionaryContext_setDefaultParser(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, __pyx_v_parser); /* "src/lxml/parser.pxi":1602 @@ -126828,14 +118692,8 @@ static PyObject *__pyx_pf_4lxml_5etree_44set_default_parser(CYTHON_UNUSED PyObje /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.set_default_parser", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_parser); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -126865,12 +118723,9 @@ static PyObject *__pyx_pw_4lxml_5etree_47get_default_parser(PyObject *__pyx_self static PyObject *__pyx_pf_4lxml_5etree_46get_default_parser(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__244) __Pyx_RefNannySetupContext("get_default_parser", 0); - __Pyx_TraceCall("get_default_parser", __pyx_f[2], 1618, 0, __PYX_ERR(2, 1618, __pyx_L1_error)); /* "src/lxml/parser.pxi":1620 * def get_default_parser(): @@ -126879,7 +118734,6 @@ static PyObject *__pyx_pf_4lxml_5etree_46get_default_parser(CYTHON_UNUSED PyObje * * ############################################################ */ - __Pyx_TraceLine(1620,0,__PYX_ERR(2, 1620, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext_getDefaultParser(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -126902,7 +118756,6 @@ static PyObject *__pyx_pf_4lxml_5etree_46get_default_parser(CYTHON_UNUSED PyObje __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -127049,7 +118902,6 @@ static int __pyx_pw_4lxml_5etree_10HTMLParser_1__init__(PyObject *__pyx_v_self, static int __pyx_pf_4lxml_5etree_10HTMLParser___init__(struct __pyx_obj_4lxml_5etree_HTMLParser *__pyx_v_self, PyObject *__pyx_v_encoding, PyObject *__pyx_v_remove_blank_text, PyObject *__pyx_v_remove_comments, PyObject *__pyx_v_remove_pis, PyObject *__pyx_v_strip_cdata, PyObject *__pyx_v_no_network, PyObject *__pyx_v_target, struct __pyx_obj_4lxml_5etree_XMLSchema *__pyx_v_schema, PyObject *__pyx_v_recover, PyObject *__pyx_v_compact, PyObject *__pyx_v_default_doctype, PyObject *__pyx_v_collect_ids, PyObject *__pyx_v_huge_tree) { int __pyx_v_parse_options; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -127060,7 +118912,6 @@ static int __pyx_pf_4lxml_5etree_10HTMLParser___init__(struct __pyx_obj_4lxml_5e int __pyx_t_7; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[2], 1669, 0, __PYX_ERR(2, 1669, __pyx_L1_error)); /* "src/lxml/parser.pxi":1675 * collect_ids=True, huge_tree=False): @@ -127069,7 +118920,6 @@ static int __pyx_pf_4lxml_5etree_10HTMLParser___init__(struct __pyx_obj_4lxml_5e * if remove_blank_text: * parse_options = parse_options | htmlparser.HTML_PARSE_NOBLANKS */ - __Pyx_TraceLine(1675,0,__PYX_ERR(2, 1675, __pyx_L1_error)) __pyx_v_parse_options = __pyx_v_4lxml_5etree__HTML_DEFAULT_PARSE_OPTIONS; /* "src/lxml/parser.pxi":1676 @@ -127079,7 +118929,6 @@ static int __pyx_pf_4lxml_5etree_10HTMLParser___init__(struct __pyx_obj_4lxml_5e * parse_options = parse_options | htmlparser.HTML_PARSE_NOBLANKS * if not recover: */ - __Pyx_TraceLine(1676,0,__PYX_ERR(2, 1676, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_remove_blank_text); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1676, __pyx_L1_error) if (__pyx_t_1) { @@ -127090,7 +118939,6 @@ static int __pyx_pf_4lxml_5etree_10HTMLParser___init__(struct __pyx_obj_4lxml_5e * if not recover: * parse_options = parse_options ^ htmlparser.HTML_PARSE_RECOVER */ - __Pyx_TraceLine(1677,0,__PYX_ERR(2, 1677, __pyx_L1_error)) __pyx_v_parse_options = (__pyx_v_parse_options | HTML_PARSE_NOBLANKS); /* "src/lxml/parser.pxi":1676 @@ -127109,7 +118957,6 @@ static int __pyx_pf_4lxml_5etree_10HTMLParser___init__(struct __pyx_obj_4lxml_5e * parse_options = parse_options ^ htmlparser.HTML_PARSE_RECOVER * if not no_network: */ - __Pyx_TraceLine(1678,0,__PYX_ERR(2, 1678, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_recover); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1678, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { @@ -127121,7 +118968,6 @@ static int __pyx_pf_4lxml_5etree_10HTMLParser___init__(struct __pyx_obj_4lxml_5e * if not no_network: * parse_options = parse_options ^ htmlparser.HTML_PARSE_NONET */ - __Pyx_TraceLine(1679,0,__PYX_ERR(2, 1679, __pyx_L1_error)) __pyx_v_parse_options = (__pyx_v_parse_options ^ HTML_PARSE_RECOVER); /* "src/lxml/parser.pxi":1678 @@ -127140,7 +118986,6 @@ static int __pyx_pf_4lxml_5etree_10HTMLParser___init__(struct __pyx_obj_4lxml_5e * parse_options = parse_options ^ htmlparser.HTML_PARSE_NONET * if not compact: */ - __Pyx_TraceLine(1680,0,__PYX_ERR(2, 1680, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_no_network); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 1680, __pyx_L1_error) __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { @@ -127152,7 +118997,6 @@ static int __pyx_pf_4lxml_5etree_10HTMLParser___init__(struct __pyx_obj_4lxml_5e * if not compact: * parse_options = parse_options ^ htmlparser.HTML_PARSE_COMPACT */ - __Pyx_TraceLine(1681,0,__PYX_ERR(2, 1681, __pyx_L1_error)) __pyx_v_parse_options = (__pyx_v_parse_options ^ HTML_PARSE_NONET); /* "src/lxml/parser.pxi":1680 @@ -127171,7 +119015,6 @@ static int __pyx_pf_4lxml_5etree_10HTMLParser___init__(struct __pyx_obj_4lxml_5e * parse_options = parse_options ^ htmlparser.HTML_PARSE_COMPACT * if not default_doctype: */ - __Pyx_TraceLine(1682,0,__PYX_ERR(2, 1682, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_compact); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1682, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { @@ -127183,7 +119026,6 @@ static int __pyx_pf_4lxml_5etree_10HTMLParser___init__(struct __pyx_obj_4lxml_5e * if not default_doctype: * parse_options = parse_options ^ htmlparser.HTML_PARSE_NODEFDTD */ - __Pyx_TraceLine(1683,0,__PYX_ERR(2, 1683, __pyx_L1_error)) __pyx_v_parse_options = (__pyx_v_parse_options ^ HTML_PARSE_COMPACT); /* "src/lxml/parser.pxi":1682 @@ -127202,7 +119044,6 @@ static int __pyx_pf_4lxml_5etree_10HTMLParser___init__(struct __pyx_obj_4lxml_5e * parse_options = parse_options ^ htmlparser.HTML_PARSE_NODEFDTD * if huge_tree: */ - __Pyx_TraceLine(1684,0,__PYX_ERR(2, 1684, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_default_doctype); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 1684, __pyx_L1_error) __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { @@ -127214,7 +119055,6 @@ static int __pyx_pf_4lxml_5etree_10HTMLParser___init__(struct __pyx_obj_4lxml_5e * if huge_tree: * parse_options = parse_options | xmlparser.XML_PARSE_HUGE */ - __Pyx_TraceLine(1685,0,__PYX_ERR(2, 1685, __pyx_L1_error)) __pyx_v_parse_options = (__pyx_v_parse_options ^ HTML_PARSE_NODEFDTD); /* "src/lxml/parser.pxi":1684 @@ -127233,7 +119073,6 @@ static int __pyx_pf_4lxml_5etree_10HTMLParser___init__(struct __pyx_obj_4lxml_5e * parse_options = parse_options | xmlparser.XML_PARSE_HUGE * */ - __Pyx_TraceLine(1686,0,__PYX_ERR(2, 1686, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_huge_tree); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1686, __pyx_L1_error) if (__pyx_t_1) { @@ -127244,7 +119083,6 @@ static int __pyx_pf_4lxml_5etree_10HTMLParser___init__(struct __pyx_obj_4lxml_5e * * _BaseParser.__init__(self, parse_options, 1, schema, */ - __Pyx_TraceLine(1687,0,__PYX_ERR(2, 1687, __pyx_L1_error)) __pyx_v_parse_options = (__pyx_v_parse_options | XML_PARSE_HUGE); /* "src/lxml/parser.pxi":1686 @@ -127263,7 +119101,6 @@ static int __pyx_pf_4lxml_5etree_10HTMLParser___init__(struct __pyx_obj_4lxml_5e * remove_comments, remove_pis, strip_cdata, * collect_ids, target, encoding) */ - __Pyx_TraceLine(1689,0,__PYX_ERR(2, 1689, __pyx_L1_error)) __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree__BaseParser), __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_parse_options); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1689, __pyx_L1_error) @@ -127276,7 +119113,6 @@ static int __pyx_pf_4lxml_5etree_10HTMLParser___init__(struct __pyx_obj_4lxml_5e * * */ - __Pyx_TraceLine(1691,0,__PYX_ERR(2, 1691, __pyx_L1_error)) __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -127370,7 +119206,6 @@ static int __pyx_pf_4lxml_5etree_10HTMLParser___init__(struct __pyx_obj_4lxml_5e __Pyx_AddTraceback("lxml.etree.HTMLParser.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -127459,7 +119294,6 @@ static int __pyx_pw_4lxml_5etree_14HTMLPullParser_1__init__(PyObject *__pyx_v_se static int __pyx_pf_4lxml_5etree_14HTMLPullParser___init__(struct __pyx_obj_4lxml_5etree_HTMLPullParser *__pyx_v_self, PyObject *__pyx_v_events, PyObject *__pyx_v_tag, PyObject *__pyx_v_base_url, PyObject *__pyx_v_kwargs) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -127467,7 +119301,6 @@ static int __pyx_pf_4lxml_5etree_14HTMLPullParser___init__(struct __pyx_obj_4lxm int __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[2], 1716, 0, __PYX_ERR(2, 1716, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_events); /* "src/lxml/parser.pxi":1717 @@ -127477,7 +119310,6 @@ static int __pyx_pf_4lxml_5etree_14HTMLPullParser___init__(struct __pyx_obj_4lxm * if events is None: * events = ('end',) */ - __Pyx_TraceLine(1717,0,__PYX_ERR(2, 1717, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree_HTMLParser), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1717, __pyx_L1_error) @@ -127498,7 +119330,6 @@ static int __pyx_pf_4lxml_5etree_14HTMLPullParser___init__(struct __pyx_obj_4lxm * events = ('end',) * self._setBaseURL(base_url) */ - __Pyx_TraceLine(1718,0,__PYX_ERR(2, 1718, __pyx_L1_error)) __pyx_t_4 = (__pyx_v_events == Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { @@ -127510,9 +119341,8 @@ static int __pyx_pf_4lxml_5etree_14HTMLPullParser___init__(struct __pyx_obj_4lxm * self._setBaseURL(base_url) * self._collectEvents(events, tag) */ - __Pyx_TraceLine(1719,0,__PYX_ERR(2, 1719, __pyx_L1_error)) - __Pyx_INCREF(__pyx_tuple__245); - __Pyx_DECREF_SET(__pyx_v_events, __pyx_tuple__245); + __Pyx_INCREF(__pyx_tuple__53); + __Pyx_DECREF_SET(__pyx_v_events, __pyx_tuple__53); /* "src/lxml/parser.pxi":1718 * def __init__(self, events=None, *, tag=None, base_url=None, **kwargs): @@ -127530,7 +119360,6 @@ static int __pyx_pf_4lxml_5etree_14HTMLPullParser___init__(struct __pyx_obj_4lxm * self._collectEvents(events, tag) * */ - __Pyx_TraceLine(1720,0,__PYX_ERR(2, 1720, __pyx_L1_error)) __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree_HTMLPullParser *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._setBaseURL(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self), __pyx_v_base_url); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1720, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -127542,7 +119371,6 @@ static int __pyx_pf_4lxml_5etree_14HTMLPullParser___init__(struct __pyx_obj_4lxm * * def read_events(self): */ - __Pyx_TraceLine(1721,0,__PYX_ERR(2, 1721, __pyx_L1_error)) __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree_HTMLPullParser *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._collectEvents(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self), __pyx_v_events, __pyx_v_tag); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -127566,7 +119394,6 @@ static int __pyx_pf_4lxml_5etree_14HTMLPullParser___init__(struct __pyx_obj_4lxm __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_events); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -127595,12 +119422,9 @@ static PyObject *__pyx_pw_4lxml_5etree_14HTMLPullParser_3read_events(PyObject *_ static PyObject *__pyx_pf_4lxml_5etree_14HTMLPullParser_2read_events(struct __pyx_obj_4lxml_5etree_HTMLPullParser *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__246) __Pyx_RefNannySetupContext("read_events", 0); - __Pyx_TraceCall("read_events", __pyx_f[2], 1723, 0, __PYX_ERR(2, 1723, __pyx_L1_error)); /* "src/lxml/parser.pxi":1724 * @@ -127609,7 +119433,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14HTMLPullParser_2read_events(struct __py * * */ - __Pyx_TraceLine(1724,0,__PYX_ERR(2, 1724, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree_HTMLPullParser *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._getPushParserContext(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1724, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -127634,7 +119457,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14HTMLPullParser_2read_events(struct __py __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -127654,17 +119476,14 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * int __pyx_v_is_pep393_string; PyObject *__pyx_v_filename_utf = NULL; xmlDoc *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - xmlDoc *__pyx_t_7; + xmlDoc *__pyx_t_6; __Pyx_RefNannySetupContext("_parseDoc", 0); - __Pyx_TraceCall("_parseDoc", __pyx_f[2], 1731, 0, __PYX_ERR(2, 1731, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_text); __Pyx_INCREF((PyObject *)__pyx_v_parser); @@ -127675,7 +119494,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * if not filename: */ - __Pyx_TraceLine(1736,0,__PYX_ERR(2, 1736, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_parser) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -127687,7 +119505,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * * if not filename: * c_filename = NULL */ - __Pyx_TraceLine(1737,0,__PYX_ERR(2, 1737, __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(2, 1737, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_parser, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_3)); @@ -127709,7 +119526,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * * c_filename = NULL * else: */ - __Pyx_TraceLine(1738,0,__PYX_ERR(2, 1738, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 1738, __pyx_L1_error) __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { @@ -127721,7 +119537,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * * else: * filename_utf = _encodeFilenameUTF8(filename) */ - __Pyx_TraceLine(1739,0,__PYX_ERR(2, 1739, __pyx_L1_error)) __pyx_v_c_filename = NULL; /* "src/lxml/parser.pxi":1738 @@ -127741,7 +119556,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * * c_filename = _cstr(filename_utf) * if isinstance(text, unicode): */ - __Pyx_TraceLine(1741,0,__PYX_ERR(2, 1741, __pyx_L1_error)) /*else*/ { __pyx_t_3 = __pyx_f_4lxml_5etree__encodeFilenameUTF8(__pyx_v_filename); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -127755,7 +119569,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * * if isinstance(text, unicode): * is_pep393_string = ( */ - __Pyx_TraceLine(1742,0,__PYX_ERR(2, 1742, __pyx_L1_error)) __pyx_v_c_filename = PyBytes_AS_STRING(__pyx_v_filename_utf); } __pyx_L4:; @@ -127767,7 +119580,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * * is_pep393_string = ( * python.PEP393_ENABLED and python.PyUnicode_IS_READY(text)) */ - __Pyx_TraceLine(1743,0,__PYX_ERR(2, 1743, __pyx_L1_error)) __pyx_t_1 = PyUnicode_Check(__pyx_v_text); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -127779,7 +119591,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * * if is_pep393_string: * c_len = python.PyUnicode_GET_LENGTH(text) */ - __Pyx_TraceLine(1745,0,__PYX_ERR(2, 1745, __pyx_L1_error)) __pyx_t_1 = (CYTHON_PEP393_ENABLED != 0); if (__pyx_t_1) { } else { @@ -127798,7 +119609,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * * c_len = python.PyUnicode_GET_LENGTH(text) * c_len *= python.PyUnicode_KIND(text) */ - __Pyx_TraceLine(1746,0,__PYX_ERR(2, 1746, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_is_pep393_string != 0); if (__pyx_t_2) { @@ -127809,7 +119619,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * * c_len *= python.PyUnicode_KIND(text) * else: */ - __Pyx_TraceLine(1747,0,__PYX_ERR(2, 1747, __pyx_L1_error)) __pyx_v_c_len = PyUnicode_GET_LENGTH(__pyx_v_text); /* "src/lxml/parser.pxi":1748 @@ -127819,7 +119628,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * * else: * c_len = python.PyUnicode_GET_DATA_SIZE(text) */ - __Pyx_TraceLine(1748,0,__PYX_ERR(2, 1748, __pyx_L1_error)) __pyx_v_c_len = (__pyx_v_c_len * PyUnicode_KIND(__pyx_v_text)); /* "src/lxml/parser.pxi":1746 @@ -127839,7 +119647,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * * if c_len > limits.INT_MAX: * return (<_BaseParser>parser)._parseDocFromFilelike( */ - __Pyx_TraceLine(1750,0,__PYX_ERR(2, 1750, __pyx_L1_error)) /*else*/ { __pyx_v_c_len = PyUnicode_GET_DATA_SIZE(__pyx_v_text); } @@ -127852,7 +119659,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * * return (<_BaseParser>parser)._parseDocFromFilelike( * StringIO(text), filename, None) */ - __Pyx_TraceLine(1751,0,__PYX_ERR(2, 1751, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_len > INT_MAX) != 0); if (__pyx_t_2) { @@ -127863,7 +119669,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * * if _UNICODE_ENCODING is NULL and not is_pep393_string: * text = (text).encode('utf8') */ - __Pyx_TraceLine(1753,0,__PYX_ERR(2, 1753, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_4lxml_5etree_StringIO); __pyx_t_4 = __pyx_v_4lxml_5etree_StringIO; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -127875,38 +119680,10 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1753, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_text}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1753, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_text}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1753, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1753, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_INCREF(__pyx_v_text); - __Pyx_GIVEREF(__pyx_v_text); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_text); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1753, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_text) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_text); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1753, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "src/lxml/parser.pxi":1752 @@ -127916,10 +119693,9 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * * StringIO(text), filename, None) * if _UNICODE_ENCODING is NULL and not is_pep393_string: */ - __Pyx_TraceLine(1752,0,__PYX_ERR(2, 1752, __pyx_L1_error)) - __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser)->__pyx_vtab)->_parseDocFromFilelike(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), __pyx_t_3, __pyx_v_filename, Py_None); if (unlikely(__pyx_t_7 == ((xmlDoc *)NULL))) __PYX_ERR(2, 1752, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser)->__pyx_vtab)->_parseDocFromFilelike(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), __pyx_t_3, __pyx_v_filename, Py_None); if (unlikely(__pyx_t_6 == ((xmlDoc *)NULL))) __PYX_ERR(2, 1752, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_7; + __pyx_r = __pyx_t_6; goto __pyx_L0; /* "src/lxml/parser.pxi":1751 @@ -127938,7 +119714,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * * text = (text).encode('utf8') * return (<_BaseParser>parser)._parseDocFromFilelike( */ - __Pyx_TraceLine(1754,0,__PYX_ERR(2, 1754, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_4lxml_5etree__UNICODE_ENCODING == NULL) != 0); if (__pyx_t_1) { } else { @@ -127957,7 +119732,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * * return (<_BaseParser>parser)._parseDocFromFilelike( * BytesIO(text), filename, "UTF-8") */ - __Pyx_TraceLine(1755,0,__PYX_ERR(2, 1755, __pyx_L1_error)) if (unlikely(__pyx_v_text == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode"); __PYX_ERR(2, 1755, __pyx_L1_error) @@ -127974,50 +119748,21 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * * return (<_BaseParser>parser)._parseUnicodeDoc(text, c_filename) * else: */ - __Pyx_TraceLine(1757,0,__PYX_ERR(2, 1757, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_4lxml_5etree_BytesIO); - __pyx_t_4 = __pyx_v_4lxml_5etree_BytesIO; __pyx_t_6 = NULL; + __pyx_t_4 = __pyx_v_4lxml_5etree_BytesIO; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_6)) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1757, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_text}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1757, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_text}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1757, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1757, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_v_text); - __Pyx_GIVEREF(__pyx_v_text); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_text); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1757, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_text) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_text); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "src/lxml/parser.pxi":1756 @@ -128027,10 +119772,9 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * * BytesIO(text), filename, "UTF-8") * return (<_BaseParser>parser)._parseUnicodeDoc(text, c_filename) */ - __Pyx_TraceLine(1756,0,__PYX_ERR(2, 1756, __pyx_L1_error)) - __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser)->__pyx_vtab)->_parseDocFromFilelike(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), __pyx_t_3, __pyx_v_filename, __pyx_kp_s_UTF_8); if (unlikely(__pyx_t_7 == ((xmlDoc *)NULL))) __PYX_ERR(2, 1756, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser)->__pyx_vtab)->_parseDocFromFilelike(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), __pyx_t_3, __pyx_v_filename, __pyx_kp_s_UTF_8); if (unlikely(__pyx_t_6 == ((xmlDoc *)NULL))) __PYX_ERR(2, 1756, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_7; + __pyx_r = __pyx_t_6; goto __pyx_L0; /* "src/lxml/parser.pxi":1754 @@ -128049,9 +119793,8 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * * else: * c_len = python.PyBytes_GET_SIZE(text) */ - __Pyx_TraceLine(1758,0,__PYX_ERR(2, 1758, __pyx_L1_error)) - __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser)->__pyx_vtab)->_parseUnicodeDoc(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), __pyx_v_text, __pyx_v_c_filename); if (unlikely(__pyx_t_7 == ((xmlDoc *)NULL))) __PYX_ERR(2, 1758, __pyx_L1_error) - __pyx_r = __pyx_t_7; + __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser)->__pyx_vtab)->_parseUnicodeDoc(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), __pyx_v_text, __pyx_v_c_filename); if (unlikely(__pyx_t_6 == ((xmlDoc *)NULL))) __PYX_ERR(2, 1758, __pyx_L1_error) + __pyx_r = __pyx_t_6; goto __pyx_L0; /* "src/lxml/parser.pxi":1743 @@ -128070,7 +119813,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * * if c_len > limits.INT_MAX: * return (<_BaseParser>parser)._parseDocFromFilelike( */ - __Pyx_TraceLine(1760,0,__PYX_ERR(2, 1760, __pyx_L1_error)) /*else*/ { __pyx_v_c_len = PyBytes_GET_SIZE(__pyx_v_text); @@ -128081,7 +119823,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * * return (<_BaseParser>parser)._parseDocFromFilelike( * BytesIO(text), filename, None) */ - __Pyx_TraceLine(1761,0,__PYX_ERR(2, 1761, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_len > INT_MAX) != 0); if (__pyx_t_2) { @@ -128092,7 +119833,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * * c_text = _cstr(text) * return (<_BaseParser>parser)._parseDoc(c_text, c_len, c_filename) */ - __Pyx_TraceLine(1763,0,__PYX_ERR(2, 1763, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_4lxml_5etree_BytesIO); __pyx_t_4 = __pyx_v_4lxml_5etree_BytesIO; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -128104,38 +119844,10 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1763, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_text}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1763, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_text}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1763, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1763, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_INCREF(__pyx_v_text); - __Pyx_GIVEREF(__pyx_v_text); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_text); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1763, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_text) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_text); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1763, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "src/lxml/parser.pxi":1762 @@ -128145,10 +119857,9 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * * BytesIO(text), filename, None) * c_text = _cstr(text) */ - __Pyx_TraceLine(1762,0,__PYX_ERR(2, 1762, __pyx_L1_error)) - __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser)->__pyx_vtab)->_parseDocFromFilelike(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), __pyx_t_3, __pyx_v_filename, Py_None); if (unlikely(__pyx_t_7 == ((xmlDoc *)NULL))) __PYX_ERR(2, 1762, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser)->__pyx_vtab)->_parseDocFromFilelike(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), __pyx_t_3, __pyx_v_filename, Py_None); if (unlikely(__pyx_t_6 == ((xmlDoc *)NULL))) __PYX_ERR(2, 1762, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_7; + __pyx_r = __pyx_t_6; goto __pyx_L0; /* "src/lxml/parser.pxi":1761 @@ -128167,7 +119878,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * * return (<_BaseParser>parser)._parseDoc(c_text, c_len, c_filename) * */ - __Pyx_TraceLine(1764,0,__PYX_ERR(2, 1764, __pyx_L1_error)) __pyx_v_c_text = PyBytes_AS_STRING(__pyx_v_text); /* "src/lxml/parser.pxi":1765 @@ -128177,9 +119887,8 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * * * cdef xmlDoc* _parseDocFromFile(filename8, _BaseParser parser) except NULL: */ - __Pyx_TraceLine(1765,0,__PYX_ERR(2, 1765, __pyx_L1_error)) - __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser)->__pyx_vtab)->_parseDoc(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), __pyx_v_c_text, __pyx_v_c_len, __pyx_v_c_filename); if (unlikely(__pyx_t_7 == ((xmlDoc *)NULL))) __PYX_ERR(2, 1765, __pyx_L1_error) - __pyx_r = __pyx_t_7; + __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser)->__pyx_vtab)->_parseDoc(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), __pyx_v_c_text, __pyx_v_c_len, __pyx_v_c_filename); if (unlikely(__pyx_t_6 == ((xmlDoc *)NULL))) __PYX_ERR(2, 1765, __pyx_L1_error) + __pyx_r = __pyx_t_6; goto __pyx_L0; } @@ -128196,14 +119905,12 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("lxml.etree._parseDoc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_filename_utf); __Pyx_XDECREF(__pyx_v_text); __Pyx_XDECREF((PyObject *)__pyx_v_parser); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -128218,14 +119925,12 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *__pyx_v_text, PyObject * static xmlDoc *__pyx_f_4lxml_5etree__parseDocFromFile(PyObject *__pyx_v_filename8, struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_parser) { xmlDoc *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; xmlDoc *__pyx_t_4; __Pyx_RefNannySetupContext("_parseDocFromFile", 0); - __Pyx_TraceCall("_parseDocFromFile", __pyx_f[2], 1767, 0, __PYX_ERR(2, 1767, __pyx_L1_error)); __Pyx_INCREF((PyObject *)__pyx_v_parser); /* "src/lxml/parser.pxi":1768 @@ -128235,7 +119940,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDocFromFile(PyObject *__pyx_v_filename * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * return (<_BaseParser>parser)._parseDocFromFile(_cstr(filename8)) */ - __Pyx_TraceLine(1768,0,__PYX_ERR(2, 1768, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_parser) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -128247,7 +119951,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDocFromFile(PyObject *__pyx_v_filename * return (<_BaseParser>parser)._parseDocFromFile(_cstr(filename8)) * */ - __Pyx_TraceLine(1769,0,__PYX_ERR(2, 1769, __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(2, 1769, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_parser, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_3)); @@ -128269,7 +119972,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDocFromFile(PyObject *__pyx_v_filename * * cdef xmlDoc* _parseDocFromFilelike(source, filename, */ - __Pyx_TraceLine(1770,0,__PYX_ERR(2, 1770, __pyx_L1_error)) __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser)->__pyx_vtab)->_parseDocFromFile(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), PyBytes_AS_STRING(__pyx_v_filename8)); if (unlikely(__pyx_t_4 == ((xmlDoc *)NULL))) __PYX_ERR(2, 1770, __pyx_L1_error) __pyx_r = __pyx_t_4; goto __pyx_L0; @@ -128289,7 +119991,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDocFromFile(PyObject *__pyx_v_filename __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_parser); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -128304,14 +120005,12 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDocFromFile(PyObject *__pyx_v_filename static xmlDoc *__pyx_f_4lxml_5etree__parseDocFromFilelike(PyObject *__pyx_v_source, PyObject *__pyx_v_filename, struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_parser) { xmlDoc *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; xmlDoc *__pyx_t_4; __Pyx_RefNannySetupContext("_parseDocFromFilelike", 0); - __Pyx_TraceCall("_parseDocFromFilelike", __pyx_f[2], 1772, 0, __PYX_ERR(2, 1772, __pyx_L1_error)); __Pyx_INCREF((PyObject *)__pyx_v_parser); /* "src/lxml/parser.pxi":1774 @@ -128321,7 +120020,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDocFromFilelike(PyObject *__pyx_v_sour * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * return (<_BaseParser>parser)._parseDocFromFilelike(source, filename, None) */ - __Pyx_TraceLine(1774,0,__PYX_ERR(2, 1774, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_parser) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -128333,7 +120031,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDocFromFilelike(PyObject *__pyx_v_sour * return (<_BaseParser>parser)._parseDocFromFilelike(source, filename, None) * */ - __Pyx_TraceLine(1775,0,__PYX_ERR(2, 1775, __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(2, 1775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_parser, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_3)); @@ -128355,7 +120052,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDocFromFilelike(PyObject *__pyx_v_sour * * cdef xmlDoc* _newXMLDoc() except NULL: */ - __Pyx_TraceLine(1776,0,__PYX_ERR(2, 1776, __pyx_L1_error)) __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser)->__pyx_vtab)->_parseDocFromFilelike(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), __pyx_v_source, __pyx_v_filename, Py_None); if (unlikely(__pyx_t_4 == ((xmlDoc *)NULL))) __PYX_ERR(2, 1776, __pyx_L1_error) __pyx_r = __pyx_t_4; goto __pyx_L0; @@ -128375,7 +120071,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDocFromFilelike(PyObject *__pyx_v_sour __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_parser); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -128391,11 +120086,9 @@ static xmlDoc *__pyx_f_4lxml_5etree__parseDocFromFilelike(PyObject *__pyx_v_sour static xmlDoc *__pyx_f_4lxml_5etree__newXMLDoc(void) { xmlDoc *__pyx_v_result; xmlDoc *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_newXMLDoc", 0); - __Pyx_TraceCall("_newXMLDoc", __pyx_f[2], 1778, 0, __PYX_ERR(2, 1778, __pyx_L1_error)); /* "src/lxml/parser.pxi":1780 * cdef xmlDoc* _newXMLDoc() except NULL: @@ -128404,7 +120097,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__newXMLDoc(void) { * if result is NULL: * raise MemoryError() */ - __Pyx_TraceLine(1780,0,__PYX_ERR(2, 1780, __pyx_L1_error)) __pyx_v_result = xmlNewDoc(NULL); /* "src/lxml/parser.pxi":1781 @@ -128414,7 +120106,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__newXMLDoc(void) { * raise MemoryError() * if result.encoding is NULL: */ - __Pyx_TraceLine(1781,0,__PYX_ERR(2, 1781, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_result == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -128425,7 +120116,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__newXMLDoc(void) { * if result.encoding is NULL: * result.encoding = tree.xmlStrdup("UTF-8") */ - __Pyx_TraceLine(1782,0,__PYX_ERR(2, 1782, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(2, 1782, __pyx_L1_error) /* "src/lxml/parser.pxi":1781 @@ -128444,7 +120134,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__newXMLDoc(void) { * result.encoding = tree.xmlStrdup("UTF-8") * __GLOBAL_PARSER_CONTEXT.initDocDict(result) */ - __Pyx_TraceLine(1783,0,__PYX_ERR(2, 1783, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_result->encoding == NULL) != 0); if (__pyx_t_1) { @@ -128455,7 +120144,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__newXMLDoc(void) { * __GLOBAL_PARSER_CONTEXT.initDocDict(result) * return result */ - __Pyx_TraceLine(1784,0,__PYX_ERR(2, 1784, __pyx_L1_error)) __pyx_v_result->encoding = xmlStrdup(((unsigned char *)((unsigned char *)((char const *)"UTF-8")))); /* "src/lxml/parser.pxi":1783 @@ -128474,7 +120162,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__newXMLDoc(void) { * return result * */ - __Pyx_TraceLine(1785,0,__PYX_ERR(2, 1785, __pyx_L1_error)) __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initDocDict(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, __pyx_v_result); /* "src/lxml/parser.pxi":1786 @@ -128484,7 +120171,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__newXMLDoc(void) { * * cdef xmlDoc* _newHTMLDoc() except NULL: */ - __Pyx_TraceLine(1786,0,__PYX_ERR(2, 1786, __pyx_L1_error)) __pyx_r = __pyx_v_result; goto __pyx_L0; @@ -128501,7 +120187,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__newXMLDoc(void) { __Pyx_AddTraceback("lxml.etree._newXMLDoc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -128517,11 +120202,9 @@ static xmlDoc *__pyx_f_4lxml_5etree__newXMLDoc(void) { static xmlDoc *__pyx_f_4lxml_5etree__newHTMLDoc(void) { xmlDoc *__pyx_v_result; xmlDoc *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_newHTMLDoc", 0); - __Pyx_TraceCall("_newHTMLDoc", __pyx_f[2], 1788, 0, __PYX_ERR(2, 1788, __pyx_L1_error)); /* "src/lxml/parser.pxi":1790 * cdef xmlDoc* _newHTMLDoc() except NULL: @@ -128530,7 +120213,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__newHTMLDoc(void) { * if result is NULL: * raise MemoryError() */ - __Pyx_TraceLine(1790,0,__PYX_ERR(2, 1790, __pyx_L1_error)) __pyx_v_result = htmlNewDoc(NULL, NULL); /* "src/lxml/parser.pxi":1791 @@ -128540,7 +120222,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__newHTMLDoc(void) { * raise MemoryError() * __GLOBAL_PARSER_CONTEXT.initDocDict(result) */ - __Pyx_TraceLine(1791,0,__PYX_ERR(2, 1791, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_result == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -128551,7 +120232,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__newHTMLDoc(void) { * __GLOBAL_PARSER_CONTEXT.initDocDict(result) * return result */ - __Pyx_TraceLine(1792,0,__PYX_ERR(2, 1792, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(2, 1792, __pyx_L1_error) /* "src/lxml/parser.pxi":1791 @@ -128570,7 +120250,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__newHTMLDoc(void) { * return result * */ - __Pyx_TraceLine(1793,0,__PYX_ERR(2, 1793, __pyx_L1_error)) __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initDocDict(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, __pyx_v_result); /* "src/lxml/parser.pxi":1794 @@ -128580,7 +120259,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__newHTMLDoc(void) { * * cdef xmlDoc* _copyDoc(xmlDoc* c_doc, int recursive) except NULL: */ - __Pyx_TraceLine(1794,0,__PYX_ERR(2, 1794, __pyx_L1_error)) __pyx_r = __pyx_v_result; goto __pyx_L0; @@ -128597,7 +120275,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__newHTMLDoc(void) { __Pyx_AddTraceback("lxml.etree._newHTMLDoc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -128613,11 +120290,9 @@ static xmlDoc *__pyx_f_4lxml_5etree__newHTMLDoc(void) { static xmlDoc *__pyx_f_4lxml_5etree__copyDoc(xmlDoc *__pyx_v_c_doc, int __pyx_v_recursive) { xmlDoc *__pyx_v_result; xmlDoc *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_copyDoc", 0); - __Pyx_TraceCall("_copyDoc", __pyx_f[2], 1796, 0, __PYX_ERR(2, 1796, __pyx_L1_error)); /* "src/lxml/parser.pxi":1798 * cdef xmlDoc* _copyDoc(xmlDoc* c_doc, int recursive) except NULL: @@ -128626,7 +120301,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__copyDoc(xmlDoc *__pyx_v_c_doc, int __pyx_v_ * with nogil: * result = tree.xmlCopyDoc(c_doc, recursive) */ - __Pyx_TraceLine(1798,0,__PYX_ERR(2, 1798, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_recursive != 0); if (__pyx_t_1) { @@ -128637,7 +120311,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__copyDoc(xmlDoc *__pyx_v_c_doc, int __pyx_v_ * result = tree.xmlCopyDoc(c_doc, recursive) * else: */ - __Pyx_TraceLine(1799,0,__PYX_ERR(2, 1799, __pyx_L1_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -128653,7 +120326,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__copyDoc(xmlDoc *__pyx_v_c_doc, int __pyx_v_ * else: * result = tree.xmlCopyDoc(c_doc, 0) */ - __Pyx_TraceLine(1800,1,__PYX_ERR(2, 1800, __pyx_L5_error)) __pyx_v_result = xmlCopyDoc(__pyx_v_c_doc, __pyx_v_recursive); } @@ -128664,7 +120336,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__copyDoc(xmlDoc *__pyx_v_c_doc, int __pyx_v_ * result = tree.xmlCopyDoc(c_doc, recursive) * else: */ - __Pyx_TraceLine(1799,1,__PYX_ERR(2, 1799, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -128673,13 +120344,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__copyDoc(xmlDoc *__pyx_v_c_doc, int __pyx_v_ #endif goto __pyx_L6; } - __pyx_L5_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L1_error; - } __pyx_L6:; } } @@ -128701,7 +120365,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__copyDoc(xmlDoc *__pyx_v_c_doc, int __pyx_v_ * if result is NULL: * raise MemoryError() */ - __Pyx_TraceLine(1802,0,__PYX_ERR(2, 1802, __pyx_L1_error)) /*else*/ { __pyx_v_result = xmlCopyDoc(__pyx_v_c_doc, 0); } @@ -128714,7 +120377,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__copyDoc(xmlDoc *__pyx_v_c_doc, int __pyx_v_ * raise MemoryError() * __GLOBAL_PARSER_CONTEXT.initDocDict(result) */ - __Pyx_TraceLine(1803,0,__PYX_ERR(2, 1803, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_result == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -128725,7 +120387,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__copyDoc(xmlDoc *__pyx_v_c_doc, int __pyx_v_ * __GLOBAL_PARSER_CONTEXT.initDocDict(result) * return result */ - __Pyx_TraceLine(1804,0,__PYX_ERR(2, 1804, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(2, 1804, __pyx_L1_error) /* "src/lxml/parser.pxi":1803 @@ -128744,7 +120405,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__copyDoc(xmlDoc *__pyx_v_c_doc, int __pyx_v_ * return result * */ - __Pyx_TraceLine(1805,0,__PYX_ERR(2, 1805, __pyx_L1_error)) __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initDocDict(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, __pyx_v_result); /* "src/lxml/parser.pxi":1806 @@ -128754,7 +120414,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__copyDoc(xmlDoc *__pyx_v_c_doc, int __pyx_v_ * * cdef xmlDoc* _copyDocRoot(xmlDoc* c_doc, xmlNode* c_new_root) except NULL: */ - __Pyx_TraceLine(1806,0,__PYX_ERR(2, 1806, __pyx_L1_error)) __pyx_r = __pyx_v_result; goto __pyx_L0; @@ -128771,7 +120430,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__copyDoc(xmlDoc *__pyx_v_c_doc, int __pyx_v_ __Pyx_AddTraceback("lxml.etree._copyDoc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -128788,12 +120446,10 @@ static xmlDoc *__pyx_f_4lxml_5etree__copyDocRoot(xmlDoc *__pyx_v_c_doc, xmlNode xmlDoc *__pyx_v_result; xmlNode *__pyx_v_c_node; xmlDoc *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_copyDocRoot", 0); - __Pyx_TraceCall("_copyDocRoot", __pyx_f[2], 1808, 0, __PYX_ERR(2, 1808, __pyx_L1_error)); /* "src/lxml/parser.pxi":1812 * cdef xmlDoc* result @@ -128802,7 +120458,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__copyDocRoot(xmlDoc *__pyx_v_c_doc, xmlNode * __GLOBAL_PARSER_CONTEXT.initDocDict(result) * with nogil: */ - __Pyx_TraceLine(1812,0,__PYX_ERR(2, 1812, __pyx_L1_error)) __pyx_v_result = xmlCopyDoc(__pyx_v_c_doc, 0); /* "src/lxml/parser.pxi":1813 @@ -128812,7 +120467,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__copyDocRoot(xmlDoc *__pyx_v_c_doc, xmlNode * with nogil: * c_node = tree.xmlDocCopyNode(c_new_root, result, 1) # recursive */ - __Pyx_TraceLine(1813,0,__PYX_ERR(2, 1813, __pyx_L1_error)) __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initDocDict(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, __pyx_v_result); /* "src/lxml/parser.pxi":1814 @@ -128822,7 +120476,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__copyDocRoot(xmlDoc *__pyx_v_c_doc, xmlNode * c_node = tree.xmlDocCopyNode(c_new_root, result, 1) # recursive * if c_node is NULL: */ - __Pyx_TraceLine(1814,0,__PYX_ERR(2, 1814, __pyx_L1_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -128838,7 +120491,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__copyDocRoot(xmlDoc *__pyx_v_c_doc, xmlNode * if c_node is NULL: * raise MemoryError() */ - __Pyx_TraceLine(1815,1,__PYX_ERR(2, 1815, __pyx_L4_error)) __pyx_v_c_node = xmlDocCopyNode(__pyx_v_c_new_root, __pyx_v_result, 1); } @@ -128849,7 +120501,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__copyDocRoot(xmlDoc *__pyx_v_c_doc, xmlNode * c_node = tree.xmlDocCopyNode(c_new_root, result, 1) # recursive * if c_node is NULL: */ - __Pyx_TraceLine(1814,1,__PYX_ERR(2, 1814, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -128858,13 +120509,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__copyDocRoot(xmlDoc *__pyx_v_c_doc, xmlNode #endif goto __pyx_L5; } - __pyx_L4_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L1_error; - } __pyx_L5:; } } @@ -128876,7 +120520,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__copyDocRoot(xmlDoc *__pyx_v_c_doc, xmlNode * raise MemoryError() * tree.xmlDocSetRootElement(result, c_node) */ - __Pyx_TraceLine(1816,0,__PYX_ERR(2, 1816, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -128887,7 +120530,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__copyDocRoot(xmlDoc *__pyx_v_c_doc, xmlNode * tree.xmlDocSetRootElement(result, c_node) * _copyTail(c_new_root.next, c_node) */ - __Pyx_TraceLine(1817,0,__PYX_ERR(2, 1817, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(2, 1817, __pyx_L1_error) /* "src/lxml/parser.pxi":1816 @@ -128906,7 +120548,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__copyDocRoot(xmlDoc *__pyx_v_c_doc, xmlNode * _copyTail(c_new_root.next, c_node) * return result */ - __Pyx_TraceLine(1818,0,__PYX_ERR(2, 1818, __pyx_L1_error)) (void)(xmlDocSetRootElement(__pyx_v_result, __pyx_v_c_node)); /* "src/lxml/parser.pxi":1819 @@ -128916,7 +120557,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__copyDocRoot(xmlDoc *__pyx_v_c_doc, xmlNode * return result * */ - __Pyx_TraceLine(1819,0,__PYX_ERR(2, 1819, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__copyTail(__pyx_v_c_new_root->next, __pyx_v_c_node); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(2, 1819, __pyx_L1_error) /* "src/lxml/parser.pxi":1820 @@ -128926,7 +120566,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__copyDocRoot(xmlDoc *__pyx_v_c_doc, xmlNode * * cdef xmlNode* _copyNodeToDoc(xmlNode* c_node, xmlDoc* c_doc) except NULL: */ - __Pyx_TraceLine(1820,0,__PYX_ERR(2, 1820, __pyx_L1_error)) __pyx_r = __pyx_v_result; goto __pyx_L0; @@ -128943,7 +120582,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__copyDocRoot(xmlDoc *__pyx_v_c_doc, xmlNode __Pyx_AddTraceback("lxml.etree._copyDocRoot", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -128959,12 +120597,10 @@ static xmlDoc *__pyx_f_4lxml_5etree__copyDocRoot(xmlDoc *__pyx_v_c_doc, xmlNode static xmlNode *__pyx_f_4lxml_5etree__copyNodeToDoc(xmlNode *__pyx_v_c_node, xmlDoc *__pyx_v_c_doc) { xmlNode *__pyx_v_c_root; xmlNode *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_copyNodeToDoc", 0); - __Pyx_TraceCall("_copyNodeToDoc", __pyx_f[2], 1822, 0, __PYX_ERR(2, 1822, __pyx_L1_error)); /* "src/lxml/parser.pxi":1825 * u"Recursively copy the element into the document. c_doc is not modified." @@ -128973,7 +120609,6 @@ static xmlNode *__pyx_f_4lxml_5etree__copyNodeToDoc(xmlNode *__pyx_v_c_node, xml * if c_root is NULL: * raise MemoryError() */ - __Pyx_TraceLine(1825,0,__PYX_ERR(2, 1825, __pyx_L1_error)) __pyx_v_c_root = xmlDocCopyNode(__pyx_v_c_node, __pyx_v_c_doc, 1); /* "src/lxml/parser.pxi":1826 @@ -128983,7 +120618,6 @@ static xmlNode *__pyx_f_4lxml_5etree__copyNodeToDoc(xmlNode *__pyx_v_c_node, xml * raise MemoryError() * _copyTail(c_node.next, c_root) */ - __Pyx_TraceLine(1826,0,__PYX_ERR(2, 1826, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_root == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -128994,7 +120628,6 @@ static xmlNode *__pyx_f_4lxml_5etree__copyNodeToDoc(xmlNode *__pyx_v_c_node, xml * _copyTail(c_node.next, c_root) * return c_root */ - __Pyx_TraceLine(1827,0,__PYX_ERR(2, 1827, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(2, 1827, __pyx_L1_error) /* "src/lxml/parser.pxi":1826 @@ -129013,7 +120646,6 @@ static xmlNode *__pyx_f_4lxml_5etree__copyNodeToDoc(xmlNode *__pyx_v_c_node, xml * return c_root * */ - __Pyx_TraceLine(1828,0,__PYX_ERR(2, 1828, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__copyTail(__pyx_v_c_node->next, __pyx_v_c_root); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(2, 1828, __pyx_L1_error) /* "src/lxml/parser.pxi":1829 @@ -129023,7 +120655,6 @@ static xmlNode *__pyx_f_4lxml_5etree__copyNodeToDoc(xmlNode *__pyx_v_c_node, xml * * */ - __Pyx_TraceLine(1829,0,__PYX_ERR(2, 1829, __pyx_L1_error)) __pyx_r = __pyx_v_c_root; goto __pyx_L0; @@ -129040,7 +120671,6 @@ static xmlNode *__pyx_f_4lxml_5etree__copyNodeToDoc(xmlNode *__pyx_v_c_node, xml __Pyx_AddTraceback("lxml.etree._copyNodeToDoc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -129057,7 +120687,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocument(PyObject *__pyx_ struct LxmlDocument *__pyx_v_doc = 0; PyObject *__pyx_v_url = NULL; struct LxmlDocument *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -129069,7 +120698,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocument(PyObject *__pyx_ Py_UCS4 __pyx_t_8; const char *__pyx_t_9; __Pyx_RefNannySetupContext("_parseDocument", 0); - __Pyx_TraceCall("_parseDocument", __pyx_f[2], 1836, 0, __PYX_ERR(2, 1836, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_base_url); /* "src/lxml/parser.pxi":1838 @@ -129079,7 +120707,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocument(PyObject *__pyx_ * # parse the file directly from the filesystem * doc = _parseDocumentFromURL(_encodeFilename(source), parser) */ - __Pyx_TraceLine(1838,0,__PYX_ERR(2, 1838, __pyx_L1_error)) __pyx_t_1 = (_isString(__pyx_v_source) != 0); if (__pyx_t_1) { @@ -129090,7 +120717,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocument(PyObject *__pyx_ * # fix base URL if requested * if base_url is not None: */ - __Pyx_TraceLine(1840,0,__PYX_ERR(2, 1840, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_source); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__parseDocumentFromURL(__pyx_t_2, __pyx_v_parser)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1840, __pyx_L1_error) @@ -129106,7 +120732,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocument(PyObject *__pyx_ * base_url = _encodeFilenameUTF8(base_url) * if doc._c_doc.URL is not NULL: */ - __Pyx_TraceLine(1842,0,__PYX_ERR(2, 1842, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_base_url != Py_None); __pyx_t_4 = (__pyx_t_1 != 0); if (__pyx_t_4) { @@ -129118,7 +120743,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocument(PyObject *__pyx_ * if doc._c_doc.URL is not NULL: * tree.xmlFree(doc._c_doc.URL) */ - __Pyx_TraceLine(1843,0,__PYX_ERR(2, 1843, __pyx_L1_error)) __pyx_t_3 = __pyx_f_4lxml_5etree__encodeFilenameUTF8(__pyx_v_base_url); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_base_url, __pyx_t_3); @@ -129131,7 +120755,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocument(PyObject *__pyx_ * tree.xmlFree(doc._c_doc.URL) * doc._c_doc.URL = tree.xmlStrdup(_xcstr(base_url)) */ - __Pyx_TraceLine(1844,0,__PYX_ERR(2, 1844, __pyx_L1_error)) __pyx_t_4 = ((__pyx_v_doc->_c_doc->URL != NULL) != 0); if (__pyx_t_4) { @@ -129142,7 +120765,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocument(PyObject *__pyx_ * doc._c_doc.URL = tree.xmlStrdup(_xcstr(base_url)) * return doc */ - __Pyx_TraceLine(1845,0,__PYX_ERR(2, 1845, __pyx_L1_error)) xmlFree(((char *)__pyx_v_doc->_c_doc->URL)); /* "src/lxml/parser.pxi":1844 @@ -129161,7 +120783,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocument(PyObject *__pyx_ * return doc * */ - __Pyx_TraceLine(1846,0,__PYX_ERR(2, 1846, __pyx_L1_error)) __pyx_v_doc->_c_doc->URL = xmlStrdup((const xmlChar*)PyBytes_AS_STRING(__pyx_v_base_url)); /* "src/lxml/parser.pxi":1842 @@ -129180,7 +120801,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocument(PyObject *__pyx_ * * if base_url is not None: */ - __Pyx_TraceLine(1847,0,__PYX_ERR(2, 1847, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_doc)); __pyx_r = __pyx_v_doc; @@ -129202,7 +120822,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocument(PyObject *__pyx_ * url = base_url * else: */ - __Pyx_TraceLine(1849,0,__PYX_ERR(2, 1849, __pyx_L1_error)) __pyx_t_4 = (__pyx_v_base_url != Py_None); __pyx_t_1 = (__pyx_t_4 != 0); if (__pyx_t_1) { @@ -129214,7 +120833,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocument(PyObject *__pyx_ * else: * url = _getFilenameForFile(source) */ - __Pyx_TraceLine(1850,0,__PYX_ERR(2, 1850, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_base_url); __pyx_v_url = __pyx_v_base_url; @@ -129235,7 +120853,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocument(PyObject *__pyx_ * * if hasattr(source, u'getvalue') and hasattr(source, u'tell'): */ - __Pyx_TraceLine(1852,0,__PYX_ERR(2, 1852, __pyx_L1_error)) /*else*/ { __pyx_t_3 = __pyx_f_4lxml_5etree__getFilenameForFile(__pyx_v_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -129251,7 +120868,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocument(PyObject *__pyx_ * # StringIO - reading from start? * if source.tell() == 0: */ - __Pyx_TraceLine(1854,0,__PYX_ERR(2, 1854, __pyx_L1_error)) __pyx_t_4 = __Pyx_HasAttr(__pyx_v_source, __pyx_n_u_getvalue); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1854, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { @@ -129272,7 +120888,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocument(PyObject *__pyx_ * return _parseMemoryDocument(source.getvalue(), url, parser) * */ - __Pyx_TraceLine(1856,0,__PYX_ERR(2, 1856, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_tell); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; @@ -129285,12 +120900,9 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocument(PyObject *__pyx_ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1856, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1856, __pyx_L1_error) - } + __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_3, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1856, __pyx_L1_error) @@ -129307,7 +120919,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocument(PyObject *__pyx_ * * # Support for file-like objects (urlgrabber.urlopen, ...) */ - __Pyx_TraceLine(1857,0,__PYX_ERR(2, 1857, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_getvalue); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -129321,12 +120932,9 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocument(PyObject *__pyx_ __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (__pyx_t_6) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1857, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1857, __pyx_L1_error) - } + __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__parseMemoryDocument(__pyx_t_2, __pyx_v_url, __pyx_v_parser)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1857, __pyx_L1_error) @@ -129361,7 +120969,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocument(PyObject *__pyx_ * return _parseFilelikeDocument(source, url, parser) * */ - __Pyx_TraceLine(1860,0,__PYX_ERR(2, 1860, __pyx_L1_error)) __pyx_t_1 = __Pyx_HasAttr(__pyx_v_source, __pyx_n_u_read); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 1860, __pyx_L1_error) __pyx_t_4 = (__pyx_t_1 != 0); if (__pyx_t_4) { @@ -129373,7 +120980,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocument(PyObject *__pyx_ * * raise TypeError, f"cannot parse from '{python._fqtypename(source).decode('UTF-8')}'" */ - __Pyx_TraceLine(1861,0,__PYX_ERR(2, 1861, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__parseFilelikeDocument(__pyx_v_source, __pyx_v_url, __pyx_v_parser)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1861, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -129397,7 +121003,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocument(PyObject *__pyx_ * * cdef _Document _parseDocumentFromURL(url, _BaseParser parser): */ - __Pyx_TraceLine(1863,0,__PYX_ERR(2, 1863, __pyx_L1_error)) __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = 0; @@ -129415,10 +121020,10 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocument(PyObject *__pyx_ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_INCREF(__pyx_kp_u__60); + __Pyx_INCREF(__pyx_kp_u__21); __pyx_t_7 += 1; - __Pyx_GIVEREF(__pyx_kp_u__60); - PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__60); + __Pyx_GIVEREF(__pyx_kp_u__21); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__21); __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -129446,7 +121051,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocument(PyObject *__pyx_ __Pyx_XDECREF(__pyx_v_url); __Pyx_XDECREF(__pyx_v_base_url); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -129462,12 +121066,10 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocument(PyObject *__pyx_ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocumentFromURL(PyObject *__pyx_v_url, struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_parser) { xmlDoc *__pyx_v_c_doc; struct LxmlDocument *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlDoc *__pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_parseDocumentFromURL", 0); - __Pyx_TraceCall("_parseDocumentFromURL", __pyx_f[2], 1865, 0, __PYX_ERR(2, 1865, __pyx_L1_error)); /* "src/lxml/parser.pxi":1866 * @@ -129476,7 +121078,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocumentFromURL(PyObject * return _documentFactory(c_doc, parser) * */ - __Pyx_TraceLine(1866,0,__PYX_ERR(2, 1866, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__parseDocFromFile(__pyx_v_url, __pyx_v_parser); if (unlikely(__pyx_t_1 == ((xmlDoc *)NULL))) __PYX_ERR(2, 1866, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_1; @@ -129487,7 +121088,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocumentFromURL(PyObject * * cdef _Document _parseMemoryDocument(text, url, _BaseParser parser): */ - __Pyx_TraceLine(1867,0,__PYX_ERR(2, 1867, __pyx_L1_error)) __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(2, 1867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -129510,7 +121110,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocumentFromURL(PyObject __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -129526,14 +121125,12 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseDocumentFromURL(PyObject static struct LxmlDocument *__pyx_f_4lxml_5etree__parseMemoryDocument(PyObject *__pyx_v_text, PyObject *__pyx_v_url, struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_parser) { xmlDoc *__pyx_v_c_doc; struct LxmlDocument *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; xmlDoc *__pyx_t_4; __Pyx_RefNannySetupContext("_parseMemoryDocument", 0); - __Pyx_TraceCall("_parseMemoryDocument", __pyx_f[2], 1869, 0, __PYX_ERR(2, 1869, __pyx_L1_error)); /* "src/lxml/parser.pxi":1870 * @@ -129542,7 +121139,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseMemoryDocument(PyObject * * if _hasEncodingDeclaration(text): * raise ValueError( */ - __Pyx_TraceLine(1870,0,__PYX_ERR(2, 1870, __pyx_L1_error)) __pyx_t_1 = PyUnicode_Check(__pyx_v_text); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -129554,7 +121150,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseMemoryDocument(PyObject * * raise ValueError( * u"Unicode strings with encoding declaration are not supported. " */ - __Pyx_TraceLine(1871,0,__PYX_ERR(2, 1871, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__hasEncodingDeclaration(__pyx_v_text); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(2, 1871, __pyx_L1_error) __pyx_t_1 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_1)) { @@ -129566,8 +121161,7 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseMemoryDocument(PyObject * * u"Unicode strings with encoding declaration are not supported. " * u"Please use bytes input or XML fragments without declaration.") */ - __Pyx_TraceLine(1872,0,__PYX_ERR(2, 1872, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__247, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1872, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1872, __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; @@ -129599,7 +121193,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseMemoryDocument(PyObject * * raise ValueError, u"can only parse strings" * c_doc = _parseDoc(text, url, parser) */ - __Pyx_TraceLine(1875,0,__PYX_ERR(2, 1875, __pyx_L1_error)) __pyx_t_1 = PyBytes_Check(__pyx_v_text); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (unlikely(__pyx_t_2)) { @@ -129611,7 +121204,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseMemoryDocument(PyObject * * c_doc = _parseDoc(text, url, parser) * return _documentFactory(c_doc, parser) */ - __Pyx_TraceLine(1876,0,__PYX_ERR(2, 1876, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_can_only_parse_strings, 0, 0); __PYX_ERR(2, 1876, __pyx_L1_error) @@ -129632,7 +121224,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseMemoryDocument(PyObject * * return _documentFactory(c_doc, parser) * */ - __Pyx_TraceLine(1877,0,__PYX_ERR(2, 1877, __pyx_L1_error)) __pyx_t_4 = __pyx_f_4lxml_5etree__parseDoc(__pyx_v_text, __pyx_v_url, __pyx_v_parser); if (unlikely(__pyx_t_4 == ((xmlDoc *)NULL))) __PYX_ERR(2, 1877, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_4; @@ -129643,7 +121234,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseMemoryDocument(PyObject * * * cdef _Document _parseFilelikeDocument(source, url, _BaseParser parser): */ - __Pyx_TraceLine(1878,0,__PYX_ERR(2, 1878, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, __pyx_v_parser)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1878, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -129666,7 +121256,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseMemoryDocument(PyObject * __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -129682,12 +121271,10 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseMemoryDocument(PyObject * static struct LxmlDocument *__pyx_f_4lxml_5etree__parseFilelikeDocument(PyObject *__pyx_v_source, PyObject *__pyx_v_url, struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_parser) { xmlDoc *__pyx_v_c_doc; struct LxmlDocument *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlDoc *__pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_parseFilelikeDocument", 0); - __Pyx_TraceCall("_parseFilelikeDocument", __pyx_f[2], 1880, 0, __PYX_ERR(2, 1880, __pyx_L1_error)); /* "src/lxml/parser.pxi":1881 * @@ -129695,7 +121282,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseFilelikeDocument(PyObject * c_doc = _parseDocFromFilelike(source, url, parser) # <<<<<<<<<<<<<< * return _documentFactory(c_doc, parser) */ - __Pyx_TraceLine(1881,0,__PYX_ERR(2, 1881, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__parseDocFromFilelike(__pyx_v_source, __pyx_v_url, __pyx_v_parser); if (unlikely(__pyx_t_1 == ((xmlDoc *)NULL))) __PYX_ERR(2, 1881, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_1; @@ -129704,7 +121290,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseFilelikeDocument(PyObject * c_doc = _parseDocFromFilelike(source, url, parser) * return _documentFactory(c_doc, parser) # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(1882,0,__PYX_ERR(2, 1882, __pyx_L1_error)) __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(2, 1882, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -129727,7 +121312,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__parseFilelikeDocument(PyObject __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -129744,7 +121328,6 @@ static int __pyx_f_4lxml_5etree__buildParseEventFilter(PyObject *__pyx_v_events) int __pyx_v_event_filter; PyObject *__pyx_v_event = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; @@ -129755,7 +121338,6 @@ static int __pyx_f_4lxml_5etree__buildParseEventFilter(PyObject *__pyx_v_events) Py_UCS4 __pyx_t_7; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("_buildParseEventFilter", 0); - __Pyx_TraceCall("_buildParseEventFilter", __pyx_f[11], 20, 0, __PYX_ERR(11, 20, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":22 * cdef int _buildParseEventFilter(events) except -1: @@ -129764,7 +121346,6 @@ static int __pyx_f_4lxml_5etree__buildParseEventFilter(PyObject *__pyx_v_events) * for event in events: * if event == 'start': */ - __Pyx_TraceLine(22,0,__PYX_ERR(11, 22, __pyx_L1_error)) __pyx_v_event_filter = 0; /* "src/lxml/saxparser.pxi":23 @@ -129774,31 +121355,30 @@ static int __pyx_f_4lxml_5etree__buildParseEventFilter(PyObject *__pyx_v_events) * if event == 'start': * event_filter |= PARSE_EVENT_FILTER_START */ - __Pyx_TraceLine(23,0,__PYX_ERR(11, 23, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_v_events)) || PyTuple_CheckExact(__pyx_v_events)) { __pyx_t_1 = __pyx_v_events; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_events); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 23, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_events); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 23, __pyx_L1_error) + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 23, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_2 >= 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_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(11, 23, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(12, 23, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 23, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(11, 23, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(12, 23, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 23, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -129808,7 +121388,7 @@ static int __pyx_f_4lxml_5etree__buildParseEventFilter(PyObject *__pyx_v_events) PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(11, 23, __pyx_L1_error) + else __PYX_ERR(12, 23, __pyx_L1_error) } break; } @@ -129824,8 +121404,7 @@ static int __pyx_f_4lxml_5etree__buildParseEventFilter(PyObject *__pyx_v_events) * event_filter |= PARSE_EVENT_FILTER_START * elif event == 'end': */ - __Pyx_TraceLine(24,0,__PYX_ERR(11, 24, __pyx_L1_error)) - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_start, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(11, 24, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_start, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(12, 24, __pyx_L1_error) if (__pyx_t_5) { /* "src/lxml/saxparser.pxi":25 @@ -129835,7 +121414,6 @@ static int __pyx_f_4lxml_5etree__buildParseEventFilter(PyObject *__pyx_v_events) * elif event == 'end': * event_filter |= PARSE_EVENT_FILTER_END */ - __Pyx_TraceLine(25,0,__PYX_ERR(11, 25, __pyx_L1_error)) __pyx_v_event_filter = (__pyx_v_event_filter | __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_START); /* "src/lxml/saxparser.pxi":24 @@ -129855,8 +121433,7 @@ static int __pyx_f_4lxml_5etree__buildParseEventFilter(PyObject *__pyx_v_events) * event_filter |= PARSE_EVENT_FILTER_END * elif event == 'start-ns': */ - __Pyx_TraceLine(26,0,__PYX_ERR(11, 26, __pyx_L1_error)) - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_end, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(11, 26, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_end, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(12, 26, __pyx_L1_error) if (__pyx_t_5) { /* "src/lxml/saxparser.pxi":27 @@ -129866,7 +121443,6 @@ static int __pyx_f_4lxml_5etree__buildParseEventFilter(PyObject *__pyx_v_events) * elif event == 'start-ns': * event_filter |= PARSE_EVENT_FILTER_START_NS */ - __Pyx_TraceLine(27,0,__PYX_ERR(11, 27, __pyx_L1_error)) __pyx_v_event_filter = (__pyx_v_event_filter | __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_END); /* "src/lxml/saxparser.pxi":26 @@ -129886,8 +121462,7 @@ static int __pyx_f_4lxml_5etree__buildParseEventFilter(PyObject *__pyx_v_events) * event_filter |= PARSE_EVENT_FILTER_START_NS * elif event == 'end-ns': */ - __Pyx_TraceLine(28,0,__PYX_ERR(11, 28, __pyx_L1_error)) - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_kp_s_start_ns, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(11, 28, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_kp_s_start_ns, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(12, 28, __pyx_L1_error) if (__pyx_t_5) { /* "src/lxml/saxparser.pxi":29 @@ -129897,7 +121472,6 @@ static int __pyx_f_4lxml_5etree__buildParseEventFilter(PyObject *__pyx_v_events) * elif event == 'end-ns': * event_filter |= PARSE_EVENT_FILTER_END_NS */ - __Pyx_TraceLine(29,0,__PYX_ERR(11, 29, __pyx_L1_error)) __pyx_v_event_filter = (__pyx_v_event_filter | __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_START_NS); /* "src/lxml/saxparser.pxi":28 @@ -129917,8 +121491,7 @@ static int __pyx_f_4lxml_5etree__buildParseEventFilter(PyObject *__pyx_v_events) * event_filter |= PARSE_EVENT_FILTER_END_NS * elif event == 'comment': */ - __Pyx_TraceLine(30,0,__PYX_ERR(11, 30, __pyx_L1_error)) - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_kp_s_end_ns, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(11, 30, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_kp_s_end_ns, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(12, 30, __pyx_L1_error) if (__pyx_t_5) { /* "src/lxml/saxparser.pxi":31 @@ -129928,7 +121501,6 @@ static int __pyx_f_4lxml_5etree__buildParseEventFilter(PyObject *__pyx_v_events) * elif event == 'comment': * event_filter |= PARSE_EVENT_FILTER_COMMENT */ - __Pyx_TraceLine(31,0,__PYX_ERR(11, 31, __pyx_L1_error)) __pyx_v_event_filter = (__pyx_v_event_filter | __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_END_NS); /* "src/lxml/saxparser.pxi":30 @@ -129948,8 +121520,7 @@ static int __pyx_f_4lxml_5etree__buildParseEventFilter(PyObject *__pyx_v_events) * event_filter |= PARSE_EVENT_FILTER_COMMENT * elif event == 'pi': */ - __Pyx_TraceLine(32,0,__PYX_ERR(11, 32, __pyx_L1_error)) - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_comment, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(11, 32, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_comment, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(12, 32, __pyx_L1_error) if (__pyx_t_5) { /* "src/lxml/saxparser.pxi":33 @@ -129959,7 +121530,6 @@ static int __pyx_f_4lxml_5etree__buildParseEventFilter(PyObject *__pyx_v_events) * elif event == 'pi': * event_filter |= PARSE_EVENT_FILTER_PI */ - __Pyx_TraceLine(33,0,__PYX_ERR(11, 33, __pyx_L1_error)) __pyx_v_event_filter = (__pyx_v_event_filter | __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_COMMENT); /* "src/lxml/saxparser.pxi":32 @@ -129979,8 +121549,7 @@ static int __pyx_f_4lxml_5etree__buildParseEventFilter(PyObject *__pyx_v_events) * event_filter |= PARSE_EVENT_FILTER_PI * else: */ - __Pyx_TraceLine(34,0,__PYX_ERR(11, 34, __pyx_L1_error)) - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_pi, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(11, 34, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_pi, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(12, 34, __pyx_L1_error) if (likely(__pyx_t_5)) { /* "src/lxml/saxparser.pxi":35 @@ -129990,7 +121559,6 @@ static int __pyx_f_4lxml_5etree__buildParseEventFilter(PyObject *__pyx_v_events) * else: * raise ValueError, f"invalid event name '{event}'" */ - __Pyx_TraceLine(35,0,__PYX_ERR(11, 35, __pyx_L1_error)) __pyx_v_event_filter = (__pyx_v_event_filter | __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_PI); /* "src/lxml/saxparser.pxi":34 @@ -130010,9 +121578,8 @@ static int __pyx_f_4lxml_5etree__buildParseEventFilter(PyObject *__pyx_v_events) * return event_filter * */ - __Pyx_TraceLine(37,0,__PYX_ERR(11, 37, __pyx_L1_error)) /*else*/ { - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 37, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_7 = 127; @@ -130020,23 +121587,23 @@ static int __pyx_f_4lxml_5etree__buildParseEventFilter(PyObject *__pyx_v_events) __pyx_t_6 += 20; __Pyx_GIVEREF(__pyx_kp_u_invalid_event_name); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_invalid_event_name); - __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_event, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(11, 37, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_event, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 37, __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); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_8); __pyx_t_8 = 0; - __Pyx_INCREF(__pyx_kp_u__60); + __Pyx_INCREF(__pyx_kp_u__21); __pyx_t_6 += 1; - __Pyx_GIVEREF(__pyx_kp_u__60); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__60); - __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(11, 37, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__21); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__21); + __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_8, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(11, 37, __pyx_L1_error) + __PYX_ERR(12, 37, __pyx_L1_error) } __pyx_L5:; @@ -130047,7 +121614,6 @@ static int __pyx_f_4lxml_5etree__buildParseEventFilter(PyObject *__pyx_v_events) * if event == 'start': * event_filter |= PARSE_EVENT_FILTER_START */ - __Pyx_TraceLine(23,0,__PYX_ERR(11, 23, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -130058,7 +121624,6 @@ static int __pyx_f_4lxml_5etree__buildParseEventFilter(PyObject *__pyx_v_events) * * */ - __Pyx_TraceLine(38,0,__PYX_ERR(11, 38, __pyx_L1_error)) __pyx_r = __pyx_v_event_filter; goto __pyx_L0; @@ -130079,7 +121644,6 @@ static int __pyx_f_4lxml_5etree__buildParseEventFilter(PyObject *__pyx_v_events) __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_event); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -130110,10 +121674,8 @@ static int __pyx_pw_4lxml_5etree_16_SaxParserTarget_1__cinit__(PyObject *__pyx_v static int __pyx_pf_4lxml_5etree_16_SaxParserTarget___cinit__(struct __pyx_obj_4lxml_5etree__SaxParserTarget *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[11], 43, 0, __PYX_ERR(11, 43, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":44 * cdef int _sax_event_filter @@ -130122,7 +121684,6 @@ static int __pyx_pf_4lxml_5etree_16_SaxParserTarget___cinit__(struct __pyx_obj_4 * * cdef _handleSaxStart(self, tag, attrib, nsmap): */ - __Pyx_TraceLine(44,0,__PYX_ERR(11, 44, __pyx_L1_error)) __pyx_v_self->_sax_event_filter = 0; /* "src/lxml/saxparser.pxi":43 @@ -130135,12 +121696,6 @@ static int __pyx_pf_4lxml_5etree_16_SaxParserTarget___cinit__(struct __pyx_obj_4 /* function exit code */ __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._SaxParserTarget.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -130155,10 +121710,8 @@ static int __pyx_pf_4lxml_5etree_16_SaxParserTarget___cinit__(struct __pyx_obj_4 static PyObject *__pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxStart(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree__SaxParserTarget *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_tag, CYTHON_UNUSED PyObject *__pyx_v_attrib, CYTHON_UNUSED PyObject *__pyx_v_nsmap) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_handleSaxStart", 0); - __Pyx_TraceCall("_handleSaxStart", __pyx_f[11], 46, 0, __PYX_ERR(11, 46, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":47 * @@ -130167,7 +121720,6 @@ static PyObject *__pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxStart(CYTHON_ * cdef _handleSaxEnd(self, tag): * return None */ - __Pyx_TraceLine(47,0,__PYX_ERR(11, 47, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -130181,12 +121733,8 @@ static PyObject *__pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxStart(CYTHON_ */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._SaxParserTarget._handleSaxStart", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -130201,10 +121749,8 @@ static PyObject *__pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxStart(CYTHON_ static PyObject *__pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxEnd(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree__SaxParserTarget *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_tag) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_handleSaxEnd", 0); - __Pyx_TraceCall("_handleSaxEnd", __pyx_f[11], 48, 0, __PYX_ERR(11, 48, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":49 * return None @@ -130213,7 +121759,6 @@ static PyObject *__pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxEnd(CYTHON_UN * cdef int _handleSaxData(self, data) except -1: * return 0 */ - __Pyx_TraceLine(49,0,__PYX_ERR(11, 49, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -130227,12 +121772,8 @@ static PyObject *__pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxEnd(CYTHON_UN */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._SaxParserTarget._handleSaxEnd", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -130247,10 +121788,8 @@ static PyObject *__pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxEnd(CYTHON_UN static int __pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxData(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree__SaxParserTarget *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_data) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_handleSaxData", 0); - __Pyx_TraceCall("_handleSaxData", __pyx_f[11], 50, 0, __PYX_ERR(11, 50, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":51 * return None @@ -130259,7 +121798,6 @@ static int __pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxData(CYTHON_UNUSED * cdef int _handleSaxDoctype(self, root_tag, public_id, system_id) except -1: * return 0 */ - __Pyx_TraceLine(51,0,__PYX_ERR(11, 51, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -130272,11 +121810,7 @@ static int __pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxData(CYTHON_UNUSED */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._SaxParserTarget._handleSaxData", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -130291,10 +121825,8 @@ static int __pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxData(CYTHON_UNUSED static int __pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxDoctype(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree__SaxParserTarget *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_root_tag, CYTHON_UNUSED PyObject *__pyx_v_public_id, CYTHON_UNUSED PyObject *__pyx_v_system_id) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_handleSaxDoctype", 0); - __Pyx_TraceCall("_handleSaxDoctype", __pyx_f[11], 52, 0, __PYX_ERR(11, 52, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":53 * return 0 @@ -130303,7 +121835,6 @@ static int __pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxDoctype(CYTHON_UNUS * cdef _handleSaxPi(self, target, data): * return None */ - __Pyx_TraceLine(53,0,__PYX_ERR(11, 53, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -130316,11 +121847,7 @@ static int __pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxDoctype(CYTHON_UNUS */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._SaxParserTarget._handleSaxDoctype", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -130335,10 +121862,8 @@ static int __pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxDoctype(CYTHON_UNUS static PyObject *__pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxPi(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree__SaxParserTarget *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_target, CYTHON_UNUSED PyObject *__pyx_v_data) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_handleSaxPi", 0); - __Pyx_TraceCall("_handleSaxPi", __pyx_f[11], 54, 0, __PYX_ERR(11, 54, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":55 * return 0 @@ -130347,7 +121872,6 @@ static PyObject *__pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxPi(CYTHON_UNU * cdef _handleSaxComment(self, comment): * return None */ - __Pyx_TraceLine(55,0,__PYX_ERR(11, 55, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -130361,12 +121885,8 @@ static PyObject *__pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxPi(CYTHON_UNU */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._SaxParserTarget._handleSaxPi", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -130381,10 +121901,8 @@ static PyObject *__pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxPi(CYTHON_UNU static PyObject *__pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxComment(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree__SaxParserTarget *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_comment) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_handleSaxComment", 0); - __Pyx_TraceCall("_handleSaxComment", __pyx_f[11], 56, 0, __PYX_ERR(11, 56, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":57 * return None @@ -130393,7 +121911,6 @@ static PyObject *__pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxComment(CYTHO * * */ - __Pyx_TraceLine(57,0,__PYX_ERR(11, 57, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -130407,12 +121924,8 @@ static PyObject *__pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxComment(CYTHO */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._SaxParserTarget._handleSaxComment", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -130451,7 +121964,7 @@ static int __pyx_pw_4lxml_5etree_17_SaxParserContext_1__cinit__(PyObject *__pyx_ 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(11, 89, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(12, 89, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -130462,13 +121975,13 @@ static int __pyx_pw_4lxml_5etree_17_SaxParserContext_1__cinit__(PyObject *__pyx_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 89, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(12, 89, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._SaxParserContext.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) __PYX_ERR(11, 89, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) __PYX_ERR(12, 89, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_17_SaxParserContext___cinit__(((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_v_self), __pyx_v_parser); /* function exit code */ @@ -130482,11 +121995,9 @@ static int __pyx_pw_4lxml_5etree_17_SaxParserContext_1__cinit__(PyObject *__pyx_ static int __pyx_pf_4lxml_5etree_17_SaxParserContext___cinit__(struct __pyx_obj_4lxml_5etree__SaxParserContext *__pyx_v_self, struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_parser) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[11], 89, 0, __PYX_ERR(11, 89, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":90 * @@ -130495,8 +122006,7 @@ static int __pyx_pf_4lxml_5etree_17_SaxParserContext___cinit__(struct __pyx_obj_ * self._node_stack = [] * self._parser = parser */ - __Pyx_TraceLine(90,0,__PYX_ERR(11, 90, __pyx_L1_error)) - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 90, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_ns_stack); @@ -130511,8 +122021,7 @@ static int __pyx_pf_4lxml_5etree_17_SaxParserContext___cinit__(struct __pyx_obj_ * self._parser = parser * self.events_iterator = _ParseEventsIterator() */ - __Pyx_TraceLine(91,0,__PYX_ERR(11, 91, __pyx_L1_error)) - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 91, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_node_stack); @@ -130527,7 +122036,6 @@ static int __pyx_pf_4lxml_5etree_17_SaxParserContext___cinit__(struct __pyx_obj_ * self.events_iterator = _ParseEventsIterator() * */ - __Pyx_TraceLine(92,0,__PYX_ERR(11, 92, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_parser)); __Pyx_GIVEREF(((PyObject *)__pyx_v_parser)); __Pyx_GOTREF(__pyx_v_self->_parser); @@ -130541,8 +122049,7 @@ static int __pyx_pf_4lxml_5etree_17_SaxParserContext___cinit__(struct __pyx_obj_ * * cdef void _setSaxParserTarget(self, _SaxParserTarget target): */ - __Pyx_TraceLine(93,0,__PYX_ERR(11, 93, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__ParseEventsIterator)); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 93, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__ParseEventsIterator)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->events_iterator); @@ -130566,7 +122073,6 @@ static int __pyx_pf_4lxml_5etree_17_SaxParserContext___cinit__(struct __pyx_obj_ __Pyx_AddTraceback("lxml.etree._SaxParserContext.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -130580,10 +122086,8 @@ static int __pyx_pf_4lxml_5etree_17_SaxParserContext___cinit__(struct __pyx_obj_ */ static void __pyx_f_4lxml_5etree_17_SaxParserContext__setSaxParserTarget(struct __pyx_obj_4lxml_5etree__SaxParserContext *__pyx_v_self, struct __pyx_obj_4lxml_5etree__SaxParserTarget *__pyx_v_target) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_setSaxParserTarget", 0); - __Pyx_TraceCall("_setSaxParserTarget", __pyx_f[11], 95, 0, __PYX_ERR(11, 95, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":96 * @@ -130592,7 +122096,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__setSaxParserTarget(struct * * cdef void _initParserContext(self, xmlparser.xmlParserCtxt* c_ctxt): */ - __Pyx_TraceLine(96,0,__PYX_ERR(11, 96, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_target)); __Pyx_GIVEREF(((PyObject *)__pyx_v_target)); __Pyx_GOTREF(__pyx_v_self->_target); @@ -130608,11 +122111,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__setSaxParserTarget(struct */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._SaxParserContext._setSaxParserTarget", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -130625,12 +122123,10 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__setSaxParserTarget(struct */ static void __pyx_f_4lxml_5etree_17_SaxParserContext__initParserContext(struct __pyx_obj_4lxml_5etree__SaxParserContext *__pyx_v_self, xmlParserCtxt *__pyx_v_c_ctxt) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_initParserContext", 0); - __Pyx_TraceCall("_initParserContext", __pyx_f[11], 98, 0, __PYX_ERR(11, 98, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":99 * @@ -130639,7 +122135,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__initParserContext(struct _ * if self._target is not None: * self._connectTarget(c_ctxt) */ - __Pyx_TraceLine(99,0,__PYX_ERR(11, 99, __pyx_L1_error)) __pyx_f_4lxml_5etree_14_ParserContext__initParserContext(((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_v_self), __pyx_v_c_ctxt); /* "src/lxml/saxparser.pxi":100 @@ -130649,7 +122144,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__initParserContext(struct _ * self._connectTarget(c_ctxt) * elif self._event_filter: */ - __Pyx_TraceLine(100,0,__PYX_ERR(11, 100, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_self->_target) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -130661,7 +122155,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__initParserContext(struct _ * elif self._event_filter: * self._connectEvents(c_ctxt) */ - __Pyx_TraceLine(101,0,__PYX_ERR(11, 101, __pyx_L1_error)) ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_connectTarget(__pyx_v_self, __pyx_v_c_ctxt); /* "src/lxml/saxparser.pxi":100 @@ -130681,7 +122174,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__initParserContext(struct _ * self._connectEvents(c_ctxt) * */ - __Pyx_TraceLine(102,0,__PYX_ERR(11, 102, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_self->_event_filter != 0); if (__pyx_t_2) { @@ -130692,7 +122184,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__initParserContext(struct _ * * cdef void _connectTarget(self, xmlparser.xmlParserCtxt* c_ctxt): */ - __Pyx_TraceLine(103,0,__PYX_ERR(11, 103, __pyx_L1_error)) ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_connectEvents(__pyx_v_self, __pyx_v_c_ctxt); /* "src/lxml/saxparser.pxi":102 @@ -130714,11 +122205,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__initParserContext(struct _ */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._SaxParserContext._initParserContext", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -130732,13 +122218,11 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__initParserContext(struct _ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx_obj_4lxml_5etree__SaxParserContext *__pyx_v_self, xmlParserCtxt *__pyx_v_c_ctxt) { xmlSAXHandler *__pyx_v_sax; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlSAXHandler *__pyx_t_1; int __pyx_t_2; internalSubsetSAXFunc __pyx_t_3; __Pyx_RefNannySetupContext("_connectTarget", 0); - __Pyx_TraceCall("_connectTarget", __pyx_f[11], 105, 0, __PYX_ERR(11, 105, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":107 * cdef void _connectTarget(self, xmlparser.xmlParserCtxt* c_ctxt): @@ -130747,7 +122231,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * self._origSaxStart = sax.startElementNs = NULL * self._origSaxStartNoNs = sax.startElement = NULL */ - __Pyx_TraceLine(107,0,__PYX_ERR(11, 107, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_ctxt->sax; __pyx_v_sax = __pyx_t_1; @@ -130758,7 +122241,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * self._origSaxStartNoNs = sax.startElement = NULL * if self._target._sax_event_filter & SAX_EVENT_START: */ - __Pyx_TraceLine(108,0,__PYX_ERR(11, 108, __pyx_L1_error)) __pyx_v_self->_origSaxStart = NULL; __pyx_v_sax->startElementNs = NULL; @@ -130769,7 +122251,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * if self._target._sax_event_filter & SAX_EVENT_START: * # intercept => overwrite orig callback */ - __Pyx_TraceLine(109,0,__PYX_ERR(11, 109, __pyx_L1_error)) __pyx_v_self->_origSaxStartNoNs = NULL; __pyx_v_sax->startElement = NULL; @@ -130780,7 +122261,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * # intercept => overwrite orig callback * # FIXME: also intercept on when collecting END events */ - __Pyx_TraceLine(110,0,__PYX_ERR(11, 110, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->_target->_sax_event_filter & __pyx_e_4lxml_5etree_SAX_EVENT_START) != 0); if (__pyx_t_2) { @@ -130791,7 +122271,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * sax.startElementNs = _handleSaxTargetStart * sax.startElement = _handleSaxTargetStartNoNs */ - __Pyx_TraceLine(113,0,__PYX_ERR(11, 113, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_sax->initialized == XML_SAX2_MAGIC) != 0); if (__pyx_t_2) { @@ -130802,7 +122281,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * sax.startElement = _handleSaxTargetStartNoNs * */ - __Pyx_TraceLine(114,0,__PYX_ERR(11, 114, __pyx_L1_error)) __pyx_v_sax->startElementNs = __pyx_f_4lxml_5etree__handleSaxTargetStart; /* "src/lxml/saxparser.pxi":113 @@ -130821,7 +122299,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * * self._origSaxEnd = sax.endElementNs = NULL */ - __Pyx_TraceLine(115,0,__PYX_ERR(11, 115, __pyx_L1_error)) __pyx_v_sax->startElement = __pyx_f_4lxml_5etree__handleSaxTargetStartNoNs; /* "src/lxml/saxparser.pxi":110 @@ -130840,7 +122317,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * self._origSaxEndNoNs = sax.endElement = NULL * if self._target._sax_event_filter & SAX_EVENT_END: */ - __Pyx_TraceLine(117,0,__PYX_ERR(11, 117, __pyx_L1_error)) __pyx_v_self->_origSaxEnd = NULL; __pyx_v_sax->endElementNs = NULL; @@ -130851,7 +122327,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * if self._target._sax_event_filter & SAX_EVENT_END: * if sax.initialized == xmlparser.XML_SAX2_MAGIC: */ - __Pyx_TraceLine(118,0,__PYX_ERR(11, 118, __pyx_L1_error)) __pyx_v_self->_origSaxEndNoNs = NULL; __pyx_v_sax->endElement = NULL; @@ -130862,7 +122337,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * if sax.initialized == xmlparser.XML_SAX2_MAGIC: * sax.endElementNs = _handleSaxEnd */ - __Pyx_TraceLine(119,0,__PYX_ERR(11, 119, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->_target->_sax_event_filter & __pyx_e_4lxml_5etree_SAX_EVENT_END) != 0); if (__pyx_t_2) { @@ -130873,7 +122347,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * sax.endElementNs = _handleSaxEnd * sax.endElement = _handleSaxEndNoNs */ - __Pyx_TraceLine(120,0,__PYX_ERR(11, 120, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_sax->initialized == XML_SAX2_MAGIC) != 0); if (__pyx_t_2) { @@ -130884,7 +122357,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * sax.endElement = _handleSaxEndNoNs * */ - __Pyx_TraceLine(121,0,__PYX_ERR(11, 121, __pyx_L1_error)) __pyx_v_sax->endElementNs = __pyx_f_4lxml_5etree__handleSaxEnd; /* "src/lxml/saxparser.pxi":120 @@ -130903,7 +122375,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * * self._origSaxData = sax.characters = sax.cdataBlock = NULL */ - __Pyx_TraceLine(122,0,__PYX_ERR(11, 122, __pyx_L1_error)) __pyx_v_sax->endElement = __pyx_f_4lxml_5etree__handleSaxEndNoNs; /* "src/lxml/saxparser.pxi":119 @@ -130922,7 +122393,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * if self._target._sax_event_filter & SAX_EVENT_DATA: * sax.characters = sax.cdataBlock = _handleSaxData */ - __Pyx_TraceLine(124,0,__PYX_ERR(11, 124, __pyx_L1_error)) __pyx_v_self->_origSaxData = NULL; __pyx_v_sax->characters = NULL; __pyx_v_sax->cdataBlock = NULL; @@ -130934,7 +122404,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * sax.characters = sax.cdataBlock = _handleSaxData * */ - __Pyx_TraceLine(125,0,__PYX_ERR(11, 125, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->_target->_sax_event_filter & __pyx_e_4lxml_5etree_SAX_EVENT_DATA) != 0); if (__pyx_t_2) { @@ -130945,7 +122414,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * * # doctype propagation is always required for entity replacement */ - __Pyx_TraceLine(126,0,__PYX_ERR(11, 126, __pyx_L1_error)) __pyx_v_sax->characters = __pyx_f_4lxml_5etree__handleSaxData; __pyx_v_sax->cdataBlock = __pyx_f_4lxml_5etree__handleSaxData; @@ -130965,7 +122433,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * if self._target._sax_event_filter & SAX_EVENT_DOCTYPE: * sax.internalSubset = _handleSaxTargetDoctype */ - __Pyx_TraceLine(129,0,__PYX_ERR(11, 129, __pyx_L1_error)) __pyx_t_3 = __pyx_v_sax->internalSubset; __pyx_v_self->_origSaxDoctype = __pyx_t_3; @@ -130976,7 +122443,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * sax.internalSubset = _handleSaxTargetDoctype * */ - __Pyx_TraceLine(130,0,__PYX_ERR(11, 130, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->_target->_sax_event_filter & __pyx_e_4lxml_5etree_SAX_EVENT_DOCTYPE) != 0); if (__pyx_t_2) { @@ -130987,7 +122453,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * * self._origSaxPI = sax.processingInstruction = NULL */ - __Pyx_TraceLine(131,0,__PYX_ERR(11, 131, __pyx_L1_error)) __pyx_v_sax->internalSubset = __pyx_f_4lxml_5etree__handleSaxTargetDoctype; /* "src/lxml/saxparser.pxi":130 @@ -131006,7 +122471,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * if self._target._sax_event_filter & SAX_EVENT_PI: * sax.processingInstruction = _handleSaxPI */ - __Pyx_TraceLine(133,0,__PYX_ERR(11, 133, __pyx_L1_error)) __pyx_v_self->_origSaxPI = NULL; __pyx_v_sax->processingInstruction = NULL; @@ -131017,7 +122481,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * sax.processingInstruction = _handleSaxPI * */ - __Pyx_TraceLine(134,0,__PYX_ERR(11, 134, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->_target->_sax_event_filter & __pyx_e_4lxml_5etree_SAX_EVENT_PI) != 0); if (__pyx_t_2) { @@ -131028,7 +122491,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * * self._origSaxComment = sax.comment = NULL */ - __Pyx_TraceLine(135,0,__PYX_ERR(11, 135, __pyx_L1_error)) __pyx_v_sax->processingInstruction = __pyx_f_4lxml_5etree__handleSaxPI; /* "src/lxml/saxparser.pxi":134 @@ -131047,7 +122509,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * if self._target._sax_event_filter & SAX_EVENT_COMMENT: * sax.comment = _handleSaxTargetComment */ - __Pyx_TraceLine(137,0,__PYX_ERR(11, 137, __pyx_L1_error)) __pyx_v_self->_origSaxComment = NULL; __pyx_v_sax->comment = NULL; @@ -131058,7 +122519,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * sax.comment = _handleSaxTargetComment * */ - __Pyx_TraceLine(138,0,__PYX_ERR(11, 138, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->_target->_sax_event_filter & __pyx_e_4lxml_5etree_SAX_EVENT_COMMENT) != 0); if (__pyx_t_2) { @@ -131069,7 +122529,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * * # enforce entity replacement */ - __Pyx_TraceLine(139,0,__PYX_ERR(11, 139, __pyx_L1_error)) __pyx_v_sax->comment = __pyx_f_4lxml_5etree__handleSaxTargetComment; /* "src/lxml/saxparser.pxi":138 @@ -131088,7 +122547,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * c_ctxt.replaceEntities = 1 * */ - __Pyx_TraceLine(142,0,__PYX_ERR(11, 142, __pyx_L1_error)) __pyx_v_sax->reference = NULL; /* "src/lxml/saxparser.pxi":143 @@ -131098,7 +122556,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx * * cdef void _connectEvents(self, xmlparser.xmlParserCtxt* c_ctxt): */ - __Pyx_TraceLine(143,0,__PYX_ERR(11, 143, __pyx_L1_error)) __pyx_v_c_ctxt->replaceEntities = 1; /* "src/lxml/saxparser.pxi":105 @@ -131110,11 +122567,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._SaxParserContext._connectTarget", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -131128,7 +122580,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget(struct __pyx static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx_obj_4lxml_5etree__SaxParserContext *__pyx_v_self, xmlParserCtxt *__pyx_v_c_ctxt) { xmlSAXHandler *__pyx_v_sax; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlSAXHandler *__pyx_t_1; startDocumentSAXFunc __pyx_t_2; @@ -131141,7 +122592,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx commentSAXFunc __pyx_t_9; processingInstructionSAXFunc __pyx_t_10; __Pyx_RefNannySetupContext("_connectEvents", 0); - __Pyx_TraceCall("_connectEvents", __pyx_f[11], 145, 0, __PYX_ERR(11, 145, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":147 * cdef void _connectEvents(self, xmlparser.xmlParserCtxt* c_ctxt): @@ -131150,7 +122600,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx * self._origSaxStartDocument = sax.startDocument * sax.startDocument = _handleSaxStartDocument */ - __Pyx_TraceLine(147,0,__PYX_ERR(11, 147, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_ctxt->sax; __pyx_v_sax = __pyx_t_1; @@ -131161,7 +122610,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx * sax.startDocument = _handleSaxStartDocument * self._origSaxStart = sax.startElementNs */ - __Pyx_TraceLine(148,0,__PYX_ERR(11, 148, __pyx_L1_error)) __pyx_t_2 = __pyx_v_sax->startDocument; __pyx_v_self->_origSaxStartDocument = __pyx_t_2; @@ -131172,7 +122620,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx * self._origSaxStart = sax.startElementNs * self._origSaxStartNoNs = sax.startElement */ - __Pyx_TraceLine(149,0,__PYX_ERR(11, 149, __pyx_L1_error)) __pyx_v_sax->startDocument = __pyx_f_4lxml_5etree__handleSaxStartDocument; /* "src/lxml/saxparser.pxi":150 @@ -131182,7 +122629,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx * self._origSaxStartNoNs = sax.startElement * # only override start event handler if needed */ - __Pyx_TraceLine(150,0,__PYX_ERR(11, 150, __pyx_L1_error)) __pyx_t_3 = __pyx_v_sax->startElementNs; __pyx_v_self->_origSaxStart = __pyx_t_3; @@ -131193,7 +122639,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx * # only override start event handler if needed * if self._event_filter == 0 or \ */ - __Pyx_TraceLine(151,0,__PYX_ERR(11, 151, __pyx_L1_error)) __pyx_t_4 = __pyx_v_sax->startElement; __pyx_v_self->_origSaxStartNoNs = __pyx_t_4; @@ -131204,7 +122649,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx * self._event_filter & (PARSE_EVENT_FILTER_START | * PARSE_EVENT_FILTER_END | */ - __Pyx_TraceLine(153,0,__PYX_ERR(11, 153, __pyx_L1_error)) __pyx_t_6 = ((__pyx_v_self->_event_filter == 0) != 0); if (!__pyx_t_6) { } else { @@ -131219,7 +122663,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx * PARSE_EVENT_FILTER_END | * PARSE_EVENT_FILTER_START_NS | */ - __Pyx_TraceLine(154,0,__PYX_ERR(11, 154, __pyx_L1_error)) __pyx_t_6 = ((__pyx_v_self->_event_filter & (((__pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_START | __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_END) | __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_START_NS) | __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_END_NS)) != 0); __pyx_t_5 = __pyx_t_6; __pyx_L4_bool_binop_done:; @@ -131231,7 +122674,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx * self._event_filter & (PARSE_EVENT_FILTER_START | * PARSE_EVENT_FILTER_END | */ - __Pyx_TraceLine(153,0,__PYX_ERR(11, 153, __pyx_L1_error)) if (__pyx_t_5) { /* "src/lxml/saxparser.pxi":158 @@ -131241,7 +122683,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx * sax.startElement = _handleSaxStartNoNs * */ - __Pyx_TraceLine(158,0,__PYX_ERR(11, 158, __pyx_L1_error)) __pyx_v_sax->startElementNs = ((startElementNsSAX2Func)__pyx_f_4lxml_5etree__handleSaxStart); /* "src/lxml/saxparser.pxi":159 @@ -131251,7 +122692,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx * * self._origSaxEnd = sax.endElementNs */ - __Pyx_TraceLine(159,0,__PYX_ERR(11, 159, __pyx_L1_error)) __pyx_v_sax->startElement = ((startElementSAXFunc)__pyx_f_4lxml_5etree__handleSaxStartNoNs); /* "src/lxml/saxparser.pxi":153 @@ -131270,7 +122710,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx * self._origSaxEndNoNs = sax.endElement * # only override end event handler if needed */ - __Pyx_TraceLine(161,0,__PYX_ERR(11, 161, __pyx_L1_error)) __pyx_t_7 = __pyx_v_sax->endElementNs; __pyx_v_self->_origSaxEnd = __pyx_t_7; @@ -131281,7 +122720,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx * # only override end event handler if needed * if self._event_filter == 0 or \ */ - __Pyx_TraceLine(162,0,__PYX_ERR(11, 162, __pyx_L1_error)) __pyx_t_8 = __pyx_v_sax->endElement; __pyx_v_self->_origSaxEndNoNs = __pyx_t_8; @@ -131292,7 +122730,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx * self._event_filter & (PARSE_EVENT_FILTER_END | * PARSE_EVENT_FILTER_END_NS): */ - __Pyx_TraceLine(164,0,__PYX_ERR(11, 164, __pyx_L1_error)) __pyx_t_6 = ((__pyx_v_self->_event_filter == 0) != 0); if (!__pyx_t_6) { } else { @@ -131307,7 +122744,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx * PARSE_EVENT_FILTER_END_NS): * sax.endElementNs = _handleSaxEnd */ - __Pyx_TraceLine(165,0,__PYX_ERR(11, 165, __pyx_L1_error)) __pyx_t_6 = ((__pyx_v_self->_event_filter & (__pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_END | __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_END_NS)) != 0); __pyx_t_5 = __pyx_t_6; __pyx_L7_bool_binop_done:; @@ -131319,7 +122755,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx * self._event_filter & (PARSE_EVENT_FILTER_END | * PARSE_EVENT_FILTER_END_NS): */ - __Pyx_TraceLine(164,0,__PYX_ERR(11, 164, __pyx_L1_error)) if (__pyx_t_5) { /* "src/lxml/saxparser.pxi":167 @@ -131329,7 +122764,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx * sax.endElement = _handleSaxEndNoNs * */ - __Pyx_TraceLine(167,0,__PYX_ERR(11, 167, __pyx_L1_error)) __pyx_v_sax->endElementNs = ((endElementNsSAX2Func)__pyx_f_4lxml_5etree__handleSaxEnd); /* "src/lxml/saxparser.pxi":168 @@ -131339,7 +122773,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx * * self._origSaxComment = sax.comment */ - __Pyx_TraceLine(168,0,__PYX_ERR(11, 168, __pyx_L1_error)) __pyx_v_sax->endElement = ((endElementSAXFunc)__pyx_f_4lxml_5etree__handleSaxEndNoNs); /* "src/lxml/saxparser.pxi":164 @@ -131358,7 +122791,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx * if self._event_filter & PARSE_EVENT_FILTER_COMMENT: * sax.comment = _handleSaxComment */ - __Pyx_TraceLine(170,0,__PYX_ERR(11, 170, __pyx_L1_error)) __pyx_t_9 = __pyx_v_sax->comment; __pyx_v_self->_origSaxComment = __pyx_t_9; @@ -131369,7 +122801,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx * sax.comment = _handleSaxComment * */ - __Pyx_TraceLine(171,0,__PYX_ERR(11, 171, __pyx_L1_error)) __pyx_t_5 = ((__pyx_v_self->_event_filter & __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_COMMENT) != 0); if (__pyx_t_5) { @@ -131380,7 +122811,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx * * self._origSaxPI = sax.processingInstruction */ - __Pyx_TraceLine(172,0,__PYX_ERR(11, 172, __pyx_L1_error)) __pyx_v_sax->comment = ((commentSAXFunc)__pyx_f_4lxml_5etree__handleSaxComment); /* "src/lxml/saxparser.pxi":171 @@ -131399,7 +122829,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx * if self._event_filter & PARSE_EVENT_FILTER_PI: * sax.processingInstruction = _handleSaxPIEvent */ - __Pyx_TraceLine(174,0,__PYX_ERR(11, 174, __pyx_L1_error)) __pyx_t_10 = __pyx_v_sax->processingInstruction; __pyx_v_self->_origSaxPI = __pyx_t_10; @@ -131410,7 +122839,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx * sax.processingInstruction = _handleSaxPIEvent * */ - __Pyx_TraceLine(175,0,__PYX_ERR(11, 175, __pyx_L1_error)) __pyx_t_5 = ((__pyx_v_self->_event_filter & __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_PI) != 0); if (__pyx_t_5) { @@ -131421,7 +122849,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx * * cdef _setEventFilter(self, events, tag): */ - __Pyx_TraceLine(176,0,__PYX_ERR(11, 176, __pyx_L1_error)) __pyx_v_sax->processingInstruction = ((processingInstructionSAXFunc)__pyx_f_4lxml_5etree__handleSaxPIEvent); /* "src/lxml/saxparser.pxi":175 @@ -131442,11 +122869,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._SaxParserContext._connectEvents", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -131460,7 +122882,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents(struct __pyx static PyObject *__pyx_f_4lxml_5etree_17_SaxParserContext__setEventFilter(struct __pyx_obj_4lxml_5etree__SaxParserContext *__pyx_v_self, PyObject *__pyx_v_events, PyObject *__pyx_v_tag) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -131469,7 +122890,6 @@ static PyObject *__pyx_f_4lxml_5etree_17_SaxParserContext__setEventFilter(struct PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("_setEventFilter", 0); - __Pyx_TraceCall("_setEventFilter", __pyx_f[11], 178, 0, __PYX_ERR(11, 178, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":179 * @@ -131478,8 +122898,7 @@ static PyObject *__pyx_f_4lxml_5etree_17_SaxParserContext__setEventFilter(struct * if not self._event_filter or tag is None or tag == '*': * self._matcher = None */ - __Pyx_TraceLine(179,0,__PYX_ERR(11, 179, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__buildParseEventFilter(__pyx_v_events); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(11, 179, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__buildParseEventFilter(__pyx_v_events); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(12, 179, __pyx_L1_error) __pyx_v_self->_event_filter = __pyx_t_1; /* "src/lxml/saxparser.pxi":180 @@ -131489,7 +122908,6 @@ static PyObject *__pyx_f_4lxml_5etree_17_SaxParserContext__setEventFilter(struct * self._matcher = None * else: */ - __Pyx_TraceLine(180,0,__PYX_ERR(11, 180, __pyx_L1_error)) __pyx_t_3 = ((!(__pyx_v_self->_event_filter != 0)) != 0); if (!__pyx_t_3) { } else { @@ -131503,7 +122921,7 @@ static PyObject *__pyx_f_4lxml_5etree_17_SaxParserContext__setEventFilter(struct __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_tag, __pyx_kp_s__160, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(11, 180, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_tag, __pyx_kp_s__40, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(12, 180, __pyx_L1_error) __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { @@ -131515,7 +122933,6 @@ static PyObject *__pyx_f_4lxml_5etree_17_SaxParserContext__setEventFilter(struct * else: * self._matcher = _MultiTagMatcher.__new__(_MultiTagMatcher, tag) */ - __Pyx_TraceLine(181,0,__PYX_ERR(11, 181, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_matcher); @@ -131539,14 +122956,13 @@ static PyObject *__pyx_f_4lxml_5etree_17_SaxParserContext__setEventFilter(struct * * cdef int startDocument(self, xmlDoc* c_doc) except -1: */ - __Pyx_TraceLine(183,0,__PYX_ERR(11, 183, __pyx_L1_error)) /*else*/ { - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 183, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_tag); __Pyx_GIVEREF(__pyx_v_tag); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_tag); - __pyx_t_6 = ((PyObject *)__pyx_tp_new_4lxml_5etree__MultiTagMatcher(((PyTypeObject *)__pyx_ptype_4lxml_5etree__MultiTagMatcher), __pyx_t_5, NULL)); if (unlikely(!__pyx_t_6)) __PYX_ERR(11, 183, __pyx_L1_error) + __pyx_t_6 = ((PyObject *)__pyx_tp_new_4lxml_5etree__MultiTagMatcher(((PyTypeObject *)__pyx_ptype_4lxml_5etree__MultiTagMatcher), __pyx_t_5, NULL)); if (unlikely(!__pyx_t_6)) __PYX_ERR(12, 183, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); @@ -131575,7 +122991,6 @@ static PyObject *__pyx_f_4lxml_5etree_17_SaxParserContext__setEventFilter(struct __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -131590,7 +123005,6 @@ static PyObject *__pyx_f_4lxml_5etree_17_SaxParserContext__setEventFilter(struct static int __pyx_f_4lxml_5etree_17_SaxParserContext_startDocument(struct __pyx_obj_4lxml_5etree__SaxParserContext *__pyx_v_self, xmlDoc *__pyx_v_c_doc) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -131607,7 +123021,6 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_startDocument(struct __pyx_o int __pyx_t_13; struct __pyx_opt_args_4lxml_5etree_16_MultiTagMatcher_cacheTags __pyx_t_14; __Pyx_RefNannySetupContext("startDocument", 0); - __Pyx_TraceCall("startDocument", __pyx_f[11], 185, 0, __PYX_ERR(11, 185, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":186 * @@ -131616,7 +123029,6 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_startDocument(struct __pyx_o * self._doc = _documentFactory(c_doc, self._parser) * finally: */ - __Pyx_TraceLine(186,0,__PYX_ERR(11, 186, __pyx_L4_error)) /*try:*/ { /* "src/lxml/saxparser.pxi":187 @@ -131626,10 +123038,9 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_startDocument(struct __pyx_o * finally: * self._parser = None # clear circular reference ASAP */ - __Pyx_TraceLine(187,0,__PYX_ERR(11, 187, __pyx_L4_error)) __pyx_t_1 = ((PyObject *)__pyx_v_self->_parser); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 187, __pyx_L4_error) + __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 187, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -131646,7 +123057,6 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_startDocument(struct __pyx_o * if self._matcher is not None: * self._matcher.cacheTags(self._doc, True) # force entry in libxml2 dict */ - __Pyx_TraceLine(189,0,__PYX_ERR(11, 189, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ __Pyx_INCREF(Py_None); @@ -131703,7 +123113,6 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_startDocument(struct __pyx_o * self._matcher.cacheTags(self._doc, True) # force entry in libxml2 dict * return 0 */ - __Pyx_TraceLine(190,0,__PYX_ERR(11, 190, __pyx_L1_error)) __pyx_t_12 = (((PyObject *)__pyx_v_self->_matcher) != Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { @@ -131715,12 +123124,11 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_startDocument(struct __pyx_o * return 0 * */ - __Pyx_TraceLine(191,0,__PYX_ERR(11, 191, __pyx_L1_error)) __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base._doc); __Pyx_INCREF(__pyx_t_2); __pyx_t_14.__pyx_n = 1; __pyx_t_14.force_into_dict = 1; - __pyx_t_4 = __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(__pyx_v_self->_matcher, ((struct LxmlDocument *)__pyx_t_2), &__pyx_t_14); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(11, 191, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(__pyx_v_self->_matcher, ((struct LxmlDocument *)__pyx_t_2), &__pyx_t_14); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(12, 191, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/lxml/saxparser.pxi":190 @@ -131739,7 +123147,6 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_startDocument(struct __pyx_o * * cdef int pushEvent(self, event, xmlNode* c_node) except -1: */ - __Pyx_TraceLine(192,0,__PYX_ERR(11, 192, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -131758,7 +123165,6 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_startDocument(struct __pyx_o __Pyx_AddTraceback("lxml.etree._SaxParserContext.startDocument", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -131775,7 +123181,6 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_pushEvent(struct __pyx_obj_4 struct LxmlElement *__pyx_v_root = 0; struct LxmlElement *__pyx_v_node = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -131784,7 +123189,6 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_pushEvent(struct __pyx_obj_4 PyObject *__pyx_t_5 = NULL; int __pyx_t_6; __Pyx_RefNannySetupContext("pushEvent", 0); - __Pyx_TraceCall("pushEvent", __pyx_f[11], 194, 0, __PYX_ERR(11, 194, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":196 * cdef int pushEvent(self, event, xmlNode* c_node) except -1: @@ -131793,7 +123197,6 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_pushEvent(struct __pyx_obj_4 * root = self._doc.getroot() * if root is not None and root._c_node.type == tree.XML_ELEMENT_NODE: */ - __Pyx_TraceLine(196,0,__PYX_ERR(11, 196, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_self->_root) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -131805,10 +123208,9 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_pushEvent(struct __pyx_obj_4 * if root is not None and root._c_node.type == tree.XML_ELEMENT_NODE: * self._root = root */ - __Pyx_TraceLine(197,0,__PYX_ERR(11, 197, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree_9_Document_getroot(__pyx_v_self->__pyx_base._doc); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 197, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_9_Document_getroot(__pyx_v_self->__pyx_base._doc); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(11, 197, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(12, 197, __pyx_L1_error) __pyx_v_root = ((struct LxmlElement *)__pyx_t_3); __pyx_t_3 = 0; @@ -131819,7 +123221,6 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_pushEvent(struct __pyx_obj_4 * self._root = root * node = _elementFactory(self._doc, c_node) */ - __Pyx_TraceLine(198,0,__PYX_ERR(11, 198, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_root) != Py_None); __pyx_t_4 = (__pyx_t_1 != 0); if (__pyx_t_4) { @@ -131839,7 +123240,6 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_pushEvent(struct __pyx_obj_4 * node = _elementFactory(self._doc, c_node) * self.events_iterator._events.append( (event, node) ) */ - __Pyx_TraceLine(199,0,__PYX_ERR(11, 199, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_root)); __Pyx_GIVEREF(((PyObject *)__pyx_v_root)); __Pyx_GOTREF(__pyx_v_self->_root); @@ -131871,10 +123271,9 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_pushEvent(struct __pyx_obj_4 * self.events_iterator._events.append( (event, node) ) * return 0 */ - __Pyx_TraceLine(200,0,__PYX_ERR(11, 200, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_v_self->__pyx_base._doc); __Pyx_INCREF(__pyx_t_3); - __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_3), __pyx_v_c_node)); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 200, __pyx_L1_error) + __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_3), __pyx_v_c_node)); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_node = ((struct LxmlElement *)__pyx_t_5); @@ -131887,12 +123286,11 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_pushEvent(struct __pyx_obj_4 * return 0 * */ - __Pyx_TraceLine(201,0,__PYX_ERR(11, 201, __pyx_L1_error)) if (unlikely(__pyx_v_self->events_iterator->_events == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(11, 201, __pyx_L1_error) + __PYX_ERR(12, 201, __pyx_L1_error) } - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 201, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_event); __Pyx_GIVEREF(__pyx_v_event); @@ -131900,7 +123298,7 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_pushEvent(struct __pyx_obj_4 __Pyx_INCREF(((PyObject *)__pyx_v_node)); __Pyx_GIVEREF(((PyObject *)__pyx_v_node)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_node)); - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_self->events_iterator->_events, __pyx_t_5); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(11, 201, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_self->events_iterator->_events, __pyx_t_5); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(12, 201, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "src/lxml/saxparser.pxi":202 @@ -131910,7 +123308,6 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_pushEvent(struct __pyx_obj_4 * * cdef int flushEvents(self) except -1: */ - __Pyx_TraceLine(202,0,__PYX_ERR(11, 202, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -131931,7 +123328,6 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_pushEvent(struct __pyx_obj_4 __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_root); __Pyx_XDECREF((PyObject *)__pyx_v_node); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -131947,7 +123343,6 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_pushEvent(struct __pyx_obj_4 static int __pyx_f_4lxml_5etree_17_SaxParserContext_flushEvents(struct __pyx_obj_4lxml_5etree__SaxParserContext *__pyx_v_self) { PyObject *__pyx_v_events = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -131955,7 +123350,6 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_flushEvents(struct __pyx_obj int __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("flushEvents", 0); - __Pyx_TraceCall("flushEvents", __pyx_f[11], 204, 0, __PYX_ERR(11, 204, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":205 * @@ -131964,7 +123358,6 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_flushEvents(struct __pyx_obj * while self._node_stack: * events.append( ('end', self._node_stack.pop()) ) */ - __Pyx_TraceLine(205,0,__PYX_ERR(11, 205, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->events_iterator->_events; __Pyx_INCREF(__pyx_t_1); __pyx_v_events = ((PyObject*)__pyx_t_1); @@ -131977,7 +123370,6 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_flushEvents(struct __pyx_obj * events.append( ('end', self._node_stack.pop()) ) * _pushSaxNsEndEvents(self) */ - __Pyx_TraceLine(206,0,__PYX_ERR(11, 206, __pyx_L1_error)) while (1) { __pyx_t_2 = (__pyx_v_self->_node_stack != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_node_stack) != 0); if (!__pyx_t_2) break; @@ -131989,18 +123381,17 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_flushEvents(struct __pyx_obj * _pushSaxNsEndEvents(self) * while self._ns_stack: */ - __Pyx_TraceLine(207,0,__PYX_ERR(11, 207, __pyx_L1_error)) if (unlikely(__pyx_v_events == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(11, 207, __pyx_L1_error) + __PYX_ERR(12, 207, __pyx_L1_error) } if (unlikely(__pyx_v_self->_node_stack == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop"); - __PYX_ERR(11, 207, __pyx_L1_error) + __PYX_ERR(12, 207, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyList_Pop(__pyx_v_self->_node_stack); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 207, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyList_Pop(__pyx_v_self->_node_stack); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 207, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_end); __Pyx_GIVEREF(__pyx_n_s_end); @@ -132008,7 +123399,7 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_flushEvents(struct __pyx_obj __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_events, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(11, 207, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_events, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(12, 207, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/lxml/saxparser.pxi":208 @@ -132018,8 +123409,7 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_flushEvents(struct __pyx_obj * while self._ns_stack: * _pushSaxNsEndEvents(self) */ - __Pyx_TraceLine(208,0,__PYX_ERR(11, 208, __pyx_L1_error)) - __pyx_t_5 = __pyx_f_4lxml_5etree__pushSaxNsEndEvents(__pyx_v_self); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(11, 208, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree__pushSaxNsEndEvents(__pyx_v_self); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(12, 208, __pyx_L1_error) } /* "src/lxml/saxparser.pxi":209 @@ -132029,7 +123419,6 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_flushEvents(struct __pyx_obj * _pushSaxNsEndEvents(self) * */ - __Pyx_TraceLine(209,0,__PYX_ERR(11, 209, __pyx_L1_error)) while (1) { __pyx_t_2 = (__pyx_v_self->_ns_stack != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_ns_stack) != 0); if (!__pyx_t_2) break; @@ -132041,8 +123430,7 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_flushEvents(struct __pyx_obj * * cdef void _handleSaxException(self, xmlparser.xmlParserCtxt* c_ctxt): */ - __Pyx_TraceLine(210,0,__PYX_ERR(11, 210, __pyx_L1_error)) - __pyx_t_5 = __pyx_f_4lxml_5etree__pushSaxNsEndEvents(__pyx_v_self); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(11, 210, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree__pushSaxNsEndEvents(__pyx_v_self); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(12, 210, __pyx_L1_error) } /* "src/lxml/saxparser.pxi":204 @@ -132063,7 +123451,6 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_flushEvents(struct __pyx_obj __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_events); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -132077,11 +123464,9 @@ static int __pyx_f_4lxml_5etree_17_SaxParserContext_flushEvents(struct __pyx_obj */ static void __pyx_f_4lxml_5etree_17_SaxParserContext__handleSaxException(struct __pyx_obj_4lxml_5etree__SaxParserContext *__pyx_v_self, xmlParserCtxt *__pyx_v_c_ctxt) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_handleSaxException", 0); - __Pyx_TraceCall("_handleSaxException", __pyx_f[11], 212, 0, __PYX_ERR(11, 212, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":213 * @@ -132090,7 +123475,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__handleSaxException(struct * c_ctxt.errNo = xmlerror.XML_ERR_INTERNAL_ERROR * # stop parsing immediately */ - __Pyx_TraceLine(213,0,__PYX_ERR(11, 213, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_ctxt->errNo == XML_ERR_OK) != 0); if (__pyx_t_1) { @@ -132101,7 +123485,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__handleSaxException(struct * # stop parsing immediately * c_ctxt.wellFormed = 0 */ - __Pyx_TraceLine(214,0,__PYX_ERR(11, 214, __pyx_L1_error)) __pyx_v_c_ctxt->errNo = XML_ERR_INTERNAL_ERROR; /* "src/lxml/saxparser.pxi":213 @@ -132120,7 +123503,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__handleSaxException(struct * c_ctxt.disableSAX = 1 * c_ctxt.instate = xmlparser.XML_PARSER_EOF */ - __Pyx_TraceLine(216,0,__PYX_ERR(11, 216, __pyx_L1_error)) __pyx_v_c_ctxt->wellFormed = 0; /* "src/lxml/saxparser.pxi":217 @@ -132130,7 +123512,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__handleSaxException(struct * c_ctxt.instate = xmlparser.XML_PARSER_EOF * self._store_raised() */ - __Pyx_TraceLine(217,0,__PYX_ERR(11, 217, __pyx_L1_error)) __pyx_v_c_ctxt->disableSAX = 1; /* "src/lxml/saxparser.pxi":218 @@ -132140,7 +123521,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__handleSaxException(struct * self._store_raised() * */ - __Pyx_TraceLine(218,0,__PYX_ERR(11, 218, __pyx_L1_error)) __pyx_v_c_ctxt->instate = XML_PARSER_EOF; /* "src/lxml/saxparser.pxi":219 @@ -132150,7 +123530,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__handleSaxException(struct * * */ - __Pyx_TraceLine(219,0,__PYX_ERR(11, 219, __pyx_L1_error)) ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._store_raised(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_v_self)); /* "src/lxml/saxparser.pxi":212 @@ -132162,11 +123541,6 @@ static void __pyx_f_4lxml_5etree_17_SaxParserContext__handleSaxException(struct */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._SaxParserContext._handleSaxException", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -132196,11 +123570,9 @@ static int __pyx_pw_4lxml_5etree_20_ParseEventsIterator_1__cinit__(PyObject *__p static int __pyx_pf_4lxml_5etree_20_ParseEventsIterator___cinit__(struct __pyx_obj_4lxml_5etree__ParseEventsIterator *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[11], 229, 0, __PYX_ERR(11, 229, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":230 * @@ -132209,8 +123581,7 @@ static int __pyx_pf_4lxml_5etree_20_ParseEventsIterator___cinit__(struct __pyx_o * self._event_index = 0 * */ - __Pyx_TraceLine(230,0,__PYX_ERR(11, 230, __pyx_L1_error)) - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 230, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_events); @@ -132225,7 +123596,6 @@ static int __pyx_pf_4lxml_5etree_20_ParseEventsIterator___cinit__(struct __pyx_o * * def __iter__(self): */ - __Pyx_TraceLine(231,0,__PYX_ERR(11, 231, __pyx_L1_error)) __pyx_v_self->_event_index = 0; /* "src/lxml/saxparser.pxi":229 @@ -132244,7 +123614,6 @@ static int __pyx_pf_4lxml_5etree_20_ParseEventsIterator___cinit__(struct __pyx_o __Pyx_AddTraceback("lxml.etree._ParseEventsIterator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -132272,10 +123641,8 @@ static PyObject *__pyx_pw_4lxml_5etree_20_ParseEventsIterator_3__iter__(PyObject static PyObject *__pyx_pf_4lxml_5etree_20_ParseEventsIterator_2__iter__(struct __pyx_obj_4lxml_5etree__ParseEventsIterator *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 0); - __Pyx_TraceCall("__iter__", __pyx_f[11], 233, 0, __PYX_ERR(11, 233, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":234 * @@ -132284,7 +123651,6 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ParseEventsIterator_2__iter__(struct _ * * def __next__(self): */ - __Pyx_TraceLine(234,0,__PYX_ERR(11, 234, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); @@ -132299,12 +123665,8 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ParseEventsIterator_2__iter__(struct _ */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._ParseEventsIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -132335,7 +123697,6 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ParseEventsIterator_4__next__(struct _ PyObject *__pyx_v_events = NULL; PyObject *__pyx_v_item = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -132343,7 +123704,6 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ParseEventsIterator_4__next__(struct _ int __pyx_t_4; Py_ssize_t __pyx_t_5; __Pyx_RefNannySetupContext("__next__", 0); - __Pyx_TraceCall("__next__", __pyx_f[11], 236, 0, __PYX_ERR(11, 236, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":237 * @@ -132352,7 +123712,6 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ParseEventsIterator_4__next__(struct _ * events = self._events * if event_index >= 2**10 or event_index * 2 >= len(events): */ - __Pyx_TraceLine(237,0,__PYX_ERR(11, 237, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_event_index; __pyx_v_event_index = __pyx_t_1; @@ -132363,7 +123722,6 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ParseEventsIterator_4__next__(struct _ * if event_index >= 2**10 or event_index * 2 >= len(events): * if event_index: */ - __Pyx_TraceLine(238,0,__PYX_ERR(11, 238, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_events; __Pyx_INCREF(__pyx_t_2); __pyx_v_events = ((PyObject*)__pyx_t_2); @@ -132376,7 +123734,6 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ParseEventsIterator_4__next__(struct _ * if event_index: * # clean up from time to time */ - __Pyx_TraceLine(239,0,__PYX_ERR(11, 239, __pyx_L1_error)) __pyx_t_4 = ((__pyx_v_event_index >= 0x400) != 0); if (!__pyx_t_4) { } else { @@ -132385,9 +123742,9 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ParseEventsIterator_4__next__(struct _ } if (unlikely(__pyx_v_events == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(11, 239, __pyx_L1_error) + __PYX_ERR(12, 239, __pyx_L1_error) } - __pyx_t_5 = PyList_GET_SIZE(__pyx_v_events); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(11, 239, __pyx_L1_error) + __pyx_t_5 = PyList_GET_SIZE(__pyx_v_events); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(12, 239, __pyx_L1_error) __pyx_t_4 = (((__pyx_v_event_index * 2) >= __pyx_t_5) != 0); __pyx_t_3 = __pyx_t_4; __pyx_L4_bool_binop_done:; @@ -132400,7 +123757,6 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ParseEventsIterator_4__next__(struct _ * # clean up from time to time * del events[:event_index] */ - __Pyx_TraceLine(240,0,__PYX_ERR(11, 240, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_event_index != 0); if (__pyx_t_3) { @@ -132411,12 +123767,11 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ParseEventsIterator_4__next__(struct _ * self._event_index = event_index = 0 * if event_index >= len(events): */ - __Pyx_TraceLine(242,0,__PYX_ERR(11, 242, __pyx_L1_error)) if (unlikely(__pyx_v_events == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(11, 242, __pyx_L1_error) + __PYX_ERR(12, 242, __pyx_L1_error) } - if (__Pyx_PyObject_DelSlice(__pyx_v_events, 0, __pyx_v_event_index, NULL, NULL, NULL, 0, 1, 1) < 0) __PYX_ERR(11, 242, __pyx_L1_error) + if (__Pyx_PyObject_DelSlice(__pyx_v_events, 0, __pyx_v_event_index, NULL, NULL, NULL, 0, 1, 1) < 0) __PYX_ERR(12, 242, __pyx_L1_error) /* "src/lxml/saxparser.pxi":243 * # clean up from time to time @@ -132425,7 +123780,6 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ParseEventsIterator_4__next__(struct _ * if event_index >= len(events): * raise StopIteration */ - __Pyx_TraceLine(243,0,__PYX_ERR(11, 243, __pyx_L1_error)) __pyx_v_self->_event_index = 0; __pyx_v_event_index = 0; @@ -132445,12 +123799,11 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ParseEventsIterator_4__next__(struct _ * raise StopIteration * item = events[event_index] */ - __Pyx_TraceLine(244,0,__PYX_ERR(11, 244, __pyx_L1_error)) if (unlikely(__pyx_v_events == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(11, 244, __pyx_L1_error) + __PYX_ERR(12, 244, __pyx_L1_error) } - __pyx_t_5 = PyList_GET_SIZE(__pyx_v_events); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(11, 244, __pyx_L1_error) + __pyx_t_5 = PyList_GET_SIZE(__pyx_v_events); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(12, 244, __pyx_L1_error) __pyx_t_3 = ((__pyx_v_event_index >= __pyx_t_5) != 0); if (unlikely(__pyx_t_3)) { @@ -132461,9 +123814,8 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ParseEventsIterator_4__next__(struct _ * item = events[event_index] * self._event_index = event_index + 1 */ - __Pyx_TraceLine(245,0,__PYX_ERR(11, 245, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); - __PYX_ERR(11, 245, __pyx_L1_error) + __PYX_ERR(12, 245, __pyx_L1_error) /* "src/lxml/saxparser.pxi":244 * del events[:event_index] @@ -132490,12 +123842,11 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ParseEventsIterator_4__next__(struct _ * self._event_index = event_index + 1 * return item */ - __Pyx_TraceLine(246,0,__PYX_ERR(11, 246, __pyx_L1_error)) if (unlikely(__pyx_v_events == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(11, 246, __pyx_L1_error) + __PYX_ERR(12, 246, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_events, __pyx_v_event_index, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 246, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_events, __pyx_v_event_index, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_item = __pyx_t_2; __pyx_t_2 = 0; @@ -132507,7 +123858,6 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ParseEventsIterator_4__next__(struct _ * return item * */ - __Pyx_TraceLine(247,0,__PYX_ERR(11, 247, __pyx_L1_error)) __pyx_v_self->_event_index = (__pyx_v_event_index + 1); /* "src/lxml/saxparser.pxi":248 @@ -132517,7 +123867,6 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ParseEventsIterator_4__next__(struct _ * * */ - __Pyx_TraceLine(248,0,__PYX_ERR(11, 248, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_item); __pyx_r = __pyx_v_item; @@ -132540,7 +123889,6 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ParseEventsIterator_4__next__(struct _ __Pyx_XDECREF(__pyx_v_events); __Pyx_XDECREF(__pyx_v_item); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -132557,7 +123905,6 @@ static int __pyx_f_4lxml_5etree__appendNsEvents(struct __pyx_obj_4lxml_5etree__S CYTHON_UNUSED int __pyx_v_i; PyObject *__pyx_v_ns_tuple = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -132567,7 +123914,6 @@ static int __pyx_f_4lxml_5etree__appendNsEvents(struct __pyx_obj_4lxml_5etree__S PyObject *__pyx_t_6 = NULL; int __pyx_t_7; __Pyx_RefNannySetupContext("_appendNsEvents", 0); - __Pyx_TraceCall("_appendNsEvents", __pyx_f[11], 251, 0, __PYX_ERR(11, 251, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":254 * const_xmlChar** c_namespaces) except -1: @@ -132576,7 +123922,6 @@ static int __pyx_f_4lxml_5etree__appendNsEvents(struct __pyx_obj_4lxml_5etree__S * ns_tuple = (funicodeOrEmpty(c_namespaces[0]), * funicode(c_namespaces[1])) */ - __Pyx_TraceLine(254,0,__PYX_ERR(11, 254, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_nb_namespaces; __pyx_t_2 = __pyx_t_1; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { @@ -132589,8 +123934,7 @@ static int __pyx_f_4lxml_5etree__appendNsEvents(struct __pyx_obj_4lxml_5etree__S * funicode(c_namespaces[1])) * context.events_iterator._events.append( ("start-ns", ns_tuple) ) */ - __Pyx_TraceLine(255,0,__PYX_ERR(11, 255, __pyx_L1_error)) - __pyx_t_4 = __pyx_f_4lxml_5etree_funicodeOrEmpty((__pyx_v_c_namespaces[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 255, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree_funicodeOrEmpty((__pyx_v_c_namespaces[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "src/lxml/saxparser.pxi":256 @@ -132600,8 +123944,7 @@ static int __pyx_f_4lxml_5etree__appendNsEvents(struct __pyx_obj_4lxml_5etree__S * context.events_iterator._events.append( ("start-ns", ns_tuple) ) * c_namespaces += 2 */ - __Pyx_TraceLine(256,0,__PYX_ERR(11, 256, __pyx_L1_error)) - __pyx_t_5 = __pyx_f_4lxml_5etree_funicode((__pyx_v_c_namespaces[1])); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 256, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree_funicode((__pyx_v_c_namespaces[1])); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); /* "src/lxml/saxparser.pxi":255 @@ -132611,8 +123954,7 @@ static int __pyx_f_4lxml_5etree__appendNsEvents(struct __pyx_obj_4lxml_5etree__S * funicode(c_namespaces[1])) * context.events_iterator._events.append( ("start-ns", ns_tuple) ) */ - __Pyx_TraceLine(255,0,__PYX_ERR(11, 255, __pyx_L1_error)) - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(11, 255, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(12, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); @@ -132630,12 +123972,11 @@ static int __pyx_f_4lxml_5etree__appendNsEvents(struct __pyx_obj_4lxml_5etree__S * c_namespaces += 2 * return 0 */ - __Pyx_TraceLine(257,0,__PYX_ERR(11, 257, __pyx_L1_error)) if (unlikely(__pyx_v_context->events_iterator->_events == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(11, 257, __pyx_L1_error) + __PYX_ERR(12, 257, __pyx_L1_error) } - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(11, 257, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(12, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_kp_s_start_ns); __Pyx_GIVEREF(__pyx_kp_s_start_ns); @@ -132643,7 +123984,7 @@ static int __pyx_f_4lxml_5etree__appendNsEvents(struct __pyx_obj_4lxml_5etree__S __Pyx_INCREF(__pyx_v_ns_tuple); __Pyx_GIVEREF(__pyx_v_ns_tuple); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_ns_tuple); - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_context->events_iterator->_events, __pyx_t_6); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(11, 257, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_context->events_iterator->_events, __pyx_t_6); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(12, 257, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "src/lxml/saxparser.pxi":258 @@ -132653,7 +123994,6 @@ static int __pyx_f_4lxml_5etree__appendNsEvents(struct __pyx_obj_4lxml_5etree__S * return 0 * */ - __Pyx_TraceLine(258,0,__PYX_ERR(11, 258, __pyx_L1_error)) __pyx_v_c_namespaces = (__pyx_v_c_namespaces + 2); } @@ -132664,7 +124004,6 @@ static int __pyx_f_4lxml_5etree__appendNsEvents(struct __pyx_obj_4lxml_5etree__S * * */ - __Pyx_TraceLine(259,0,__PYX_ERR(11, 259, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -132685,7 +124024,6 @@ static int __pyx_f_4lxml_5etree__appendNsEvents(struct __pyx_obj_4lxml_5etree__S __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ns_tuple); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -132701,7 +124039,6 @@ static int __pyx_f_4lxml_5etree__appendNsEvents(struct __pyx_obj_4lxml_5etree__S static void __pyx_f_4lxml_5etree__handleSaxStart(void *__pyx_v_ctxt, const xmlChar *__pyx_v_c_localname, const xmlChar *__pyx_v_c_prefix, const xmlChar *__pyx_v_c_namespace, int __pyx_v_c_nb_namespaces, const xmlChar **__pyx_v_c_namespaces, int __pyx_v_c_nb_attributes, int __pyx_v_c_nb_defaulted, const xmlChar **__pyx_v_c_attributes) { xmlParserCtxt *__pyx_v_c_ctxt; struct __pyx_obj_4lxml_5etree__SaxParserContext *__pyx_v_context = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -132720,7 +124057,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStart(void *__pyx_v_ctxt, const xmlCh PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_handleSaxStart", 0); - __Pyx_TraceCall("_handleSaxStart", __pyx_f[11], 262, 0, __PYX_ERR(11, 262, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":270 * cdef int i @@ -132729,7 +124065,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStart(void *__pyx_v_ctxt, const xmlCh * if c_ctxt._private is NULL or c_ctxt.disableSAX: * return */ - __Pyx_TraceLine(270,0,__PYX_ERR(11, 270, __pyx_L1_error)) __pyx_v_c_ctxt = ((xmlParserCtxt *)__pyx_v_ctxt); /* "src/lxml/saxparser.pxi":271 @@ -132739,7 +124074,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStart(void *__pyx_v_ctxt, const xmlCh * return * context = <_SaxParserContext>c_ctxt._private */ - __Pyx_TraceLine(271,0,__PYX_ERR(11, 271, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_ctxt->_private == NULL) != 0); if (!__pyx_t_2) { } else { @@ -132758,7 +124092,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStart(void *__pyx_v_ctxt, const xmlCh * context = <_SaxParserContext>c_ctxt._private * try: */ - __Pyx_TraceLine(272,0,__PYX_ERR(11, 272, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/saxparser.pxi":271 @@ -132777,7 +124110,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStart(void *__pyx_v_ctxt, const xmlCh * try: * if (c_nb_namespaces and */ - __Pyx_TraceLine(273,0,__PYX_ERR(11, 273, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_v_c_ctxt->_private); __Pyx_INCREF(__pyx_t_3); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_t_3); @@ -132790,7 +124122,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStart(void *__pyx_v_ctxt, const xmlCh * if (c_nb_namespaces and * context._event_filter & PARSE_EVENT_FILTER_START_NS): */ - __Pyx_TraceLine(274,0,__PYX_ERR(11, 274, __pyx_L7_error)) /*try:*/ { { __Pyx_PyThreadState_declare @@ -132808,7 +124139,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStart(void *__pyx_v_ctxt, const xmlCh * context._event_filter & PARSE_EVENT_FILTER_START_NS): * _appendNsEvents(context, c_nb_namespaces, c_namespaces) */ - __Pyx_TraceLine(275,0,__PYX_ERR(11, 275, __pyx_L9_error)) __pyx_t_2 = (__pyx_v_c_nb_namespaces != 0); if (__pyx_t_2) { } else { @@ -132823,7 +124153,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStart(void *__pyx_v_ctxt, const xmlCh * _appendNsEvents(context, c_nb_namespaces, c_namespaces) * context._origSaxStart(c_ctxt, c_localname, c_prefix, c_namespace, */ - __Pyx_TraceLine(276,0,__PYX_ERR(11, 276, __pyx_L9_error)) __pyx_t_2 = ((__pyx_v_context->_event_filter & __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_START_NS) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L16_bool_binop_done:; @@ -132835,7 +124164,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStart(void *__pyx_v_ctxt, const xmlCh * context._event_filter & PARSE_EVENT_FILTER_START_NS): * _appendNsEvents(context, c_nb_namespaces, c_namespaces) */ - __Pyx_TraceLine(275,0,__PYX_ERR(11, 275, __pyx_L9_error)) if (__pyx_t_1) { /* "src/lxml/saxparser.pxi":277 @@ -132845,8 +124173,7 @@ static void __pyx_f_4lxml_5etree__handleSaxStart(void *__pyx_v_ctxt, const xmlCh * context._origSaxStart(c_ctxt, c_localname, c_prefix, c_namespace, * c_nb_namespaces, c_namespaces, c_nb_attributes, */ - __Pyx_TraceLine(277,0,__PYX_ERR(11, 277, __pyx_L9_error)) - __pyx_t_7 = __pyx_f_4lxml_5etree__appendNsEvents(__pyx_v_context, __pyx_v_c_nb_namespaces, __pyx_v_c_namespaces); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(11, 277, __pyx_L9_error) + __pyx_t_7 = __pyx_f_4lxml_5etree__appendNsEvents(__pyx_v_context, __pyx_v_c_nb_namespaces, __pyx_v_c_namespaces); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(12, 277, __pyx_L9_error) /* "src/lxml/saxparser.pxi":275 * context = <_SaxParserContext>c_ctxt._private @@ -132864,7 +124191,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStart(void *__pyx_v_ctxt, const xmlCh * c_nb_namespaces, c_namespaces, c_nb_attributes, * c_nb_defaulted, c_attributes) */ - __Pyx_TraceLine(278,0,__PYX_ERR(11, 278, __pyx_L9_error)) __pyx_v_context->_origSaxStart(__pyx_v_c_ctxt, __pyx_v_c_localname, __pyx_v_c_prefix, __pyx_v_c_namespace, __pyx_v_c_nb_namespaces, __pyx_v_c_namespaces, __pyx_v_c_nb_attributes, __pyx_v_c_nb_defaulted, __pyx_v_c_attributes); /* "src/lxml/saxparser.pxi":281 @@ -132874,7 +124200,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStart(void *__pyx_v_ctxt, const xmlCh * _fixHtmlDictNodeNames(c_ctxt.dict, c_ctxt.node) * */ - __Pyx_TraceLine(281,0,__PYX_ERR(11, 281, __pyx_L9_error)) __pyx_t_1 = (__pyx_v_c_ctxt->html != 0); if (__pyx_t_1) { @@ -132885,7 +124210,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStart(void *__pyx_v_ctxt, const xmlCh * * if context._event_filter & PARSE_EVENT_FILTER_END_NS: */ - __Pyx_TraceLine(282,0,__PYX_ERR(11, 282, __pyx_L9_error)) (void)(__pyx_f_4lxml_5etree__fixHtmlDictNodeNames(__pyx_v_c_ctxt->dict, __pyx_v_c_ctxt->node)); /* "src/lxml/saxparser.pxi":281 @@ -132904,7 +124228,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStart(void *__pyx_v_ctxt, const xmlCh * context._ns_stack.append(c_nb_namespaces) * if context._event_filter & (PARSE_EVENT_FILTER_END | */ - __Pyx_TraceLine(284,0,__PYX_ERR(11, 284, __pyx_L9_error)) __pyx_t_1 = ((__pyx_v_context->_event_filter & __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_END_NS) != 0); if (__pyx_t_1) { @@ -132915,14 +124238,13 @@ static void __pyx_f_4lxml_5etree__handleSaxStart(void *__pyx_v_ctxt, const xmlCh * if context._event_filter & (PARSE_EVENT_FILTER_END | * PARSE_EVENT_FILTER_START): */ - __Pyx_TraceLine(285,0,__PYX_ERR(11, 285, __pyx_L9_error)) if (unlikely(__pyx_v_context->_ns_stack == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(11, 285, __pyx_L9_error) + __PYX_ERR(12, 285, __pyx_L9_error) } - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_c_nb_namespaces); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 285, __pyx_L9_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_c_nb_namespaces); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 285, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_context->_ns_stack, __pyx_t_3); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(11, 285, __pyx_L9_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_context->_ns_stack, __pyx_t_3); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(12, 285, __pyx_L9_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/lxml/saxparser.pxi":284 @@ -132941,7 +124263,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStart(void *__pyx_v_ctxt, const xmlCh * PARSE_EVENT_FILTER_START): * _pushSaxStartEvent(context, c_ctxt, c_namespace, */ - __Pyx_TraceLine(286,0,__PYX_ERR(11, 286, __pyx_L9_error)) __pyx_t_1 = ((__pyx_v_context->_event_filter & (__pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_END | __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_START)) != 0); if (__pyx_t_1) { @@ -132952,8 +124273,7 @@ static void __pyx_f_4lxml_5etree__handleSaxStart(void *__pyx_v_ctxt, const xmlCh * c_localname, None) * except: */ - __Pyx_TraceLine(288,0,__PYX_ERR(11, 288, __pyx_L9_error)) - __pyx_t_7 = __pyx_f_4lxml_5etree__pushSaxStartEvent(__pyx_v_context, __pyx_v_c_ctxt, __pyx_v_c_namespace, __pyx_v_c_localname, Py_None); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(11, 288, __pyx_L9_error) + __pyx_t_7 = __pyx_f_4lxml_5etree__pushSaxStartEvent(__pyx_v_context, __pyx_v_c_ctxt, __pyx_v_c_namespace, __pyx_v_c_localname, Py_None); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(12, 288, __pyx_L9_error) /* "src/lxml/saxparser.pxi":286 * if context._event_filter & PARSE_EVENT_FILTER_END_NS: @@ -132986,10 +124306,9 @@ static void __pyx_f_4lxml_5etree__handleSaxStart(void *__pyx_v_ctxt, const xmlCh * context._handleSaxException(c_ctxt) * finally: */ - __Pyx_TraceLine(290,0,__PYX_ERR(11, 290, __pyx_L11_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._handleSaxStart", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(11, 290, __pyx_L11_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(12, 290, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_10); @@ -133001,11 +124320,10 @@ static void __pyx_f_4lxml_5etree__handleSaxStart(void *__pyx_v_ctxt, const xmlCh * finally: * return # swallow any further exceptions */ - __Pyx_TraceLine(291,0,__PYX_ERR(11, 291, __pyx_L11_except_error)) ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_handleSaxException(__pyx_v_context, __pyx_v_c_ctxt); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L10_exception_handled; } __pyx_L11_except_error:; @@ -133038,7 +124356,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStart(void *__pyx_v_ctxt, const xmlCh * * */ - __Pyx_TraceLine(293,0,__PYX_ERR(11, 293, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ goto __pyx_L0; @@ -133086,14 +124403,8 @@ static void __pyx_f_4lxml_5etree__handleSaxStart(void *__pyx_v_ctxt, const xmlCh */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_XDECREF(__pyx_t_10); - __Pyx_WriteUnraisable("lxml.etree._handleSaxStart", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); @@ -133119,7 +124430,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const PyObject *__pyx_v_nsmap = NULL; PyObject *__pyx_v_prefix = NULL; PyObject *__pyx_v_element = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -133140,7 +124450,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_handleSaxTargetStart", 0); - __Pyx_TraceCall("_handleSaxTargetStart", __pyx_f[11], 296, 0, __PYX_ERR(11, 296, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":304 * cdef int i @@ -133149,7 +124458,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * if c_ctxt._private is NULL or c_ctxt.disableSAX: * return */ - __Pyx_TraceLine(304,0,__PYX_ERR(11, 304, __pyx_L1_error)) __pyx_v_c_ctxt = ((xmlParserCtxt *)__pyx_v_ctxt); /* "src/lxml/saxparser.pxi":305 @@ -133159,7 +124467,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * return * context = <_SaxParserContext>c_ctxt._private */ - __Pyx_TraceLine(305,0,__PYX_ERR(11, 305, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_ctxt->_private == NULL) != 0); if (!__pyx_t_2) { } else { @@ -133178,7 +124485,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * context = <_SaxParserContext>c_ctxt._private * try: */ - __Pyx_TraceLine(306,0,__PYX_ERR(11, 306, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/saxparser.pxi":305 @@ -133197,7 +124503,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * try: * if (c_nb_namespaces and */ - __Pyx_TraceLine(307,0,__PYX_ERR(11, 307, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_v_c_ctxt->_private); __Pyx_INCREF(__pyx_t_3); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_t_3); @@ -133210,7 +124515,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * if (c_nb_namespaces and * context._event_filter & PARSE_EVENT_FILTER_START_NS): */ - __Pyx_TraceLine(308,0,__PYX_ERR(11, 308, __pyx_L7_error)) /*try:*/ { { __Pyx_PyThreadState_declare @@ -133228,7 +124532,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * context._event_filter & PARSE_EVENT_FILTER_START_NS): * _appendNsEvents(context, c_nb_namespaces, c_namespaces) */ - __Pyx_TraceLine(309,0,__PYX_ERR(11, 309, __pyx_L9_error)) __pyx_t_2 = (__pyx_v_c_nb_namespaces != 0); if (__pyx_t_2) { } else { @@ -133243,7 +124546,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * _appendNsEvents(context, c_nb_namespaces, c_namespaces) * if c_nb_defaulted > 0: */ - __Pyx_TraceLine(310,0,__PYX_ERR(11, 310, __pyx_L9_error)) __pyx_t_2 = ((__pyx_v_context->_event_filter & __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_START_NS) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L16_bool_binop_done:; @@ -133255,7 +124557,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * context._event_filter & PARSE_EVENT_FILTER_START_NS): * _appendNsEvents(context, c_nb_namespaces, c_namespaces) */ - __Pyx_TraceLine(309,0,__PYX_ERR(11, 309, __pyx_L9_error)) if (__pyx_t_1) { /* "src/lxml/saxparser.pxi":311 @@ -133265,8 +124566,7 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * if c_nb_defaulted > 0: * # only add default attributes if we asked for them */ - __Pyx_TraceLine(311,0,__PYX_ERR(11, 311, __pyx_L9_error)) - __pyx_t_7 = __pyx_f_4lxml_5etree__appendNsEvents(__pyx_v_context, __pyx_v_c_nb_namespaces, __pyx_v_c_namespaces); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(11, 311, __pyx_L9_error) + __pyx_t_7 = __pyx_f_4lxml_5etree__appendNsEvents(__pyx_v_context, __pyx_v_c_nb_namespaces, __pyx_v_c_namespaces); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(12, 311, __pyx_L9_error) /* "src/lxml/saxparser.pxi":309 * context = <_SaxParserContext>c_ctxt._private @@ -133284,7 +124584,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * # only add default attributes if we asked for them * if c_ctxt.loadsubset & xmlparser.XML_COMPLETE_ATTRS == 0: */ - __Pyx_TraceLine(312,0,__PYX_ERR(11, 312, __pyx_L9_error)) __pyx_t_1 = ((__pyx_v_c_nb_defaulted > 0) != 0); if (__pyx_t_1) { @@ -133295,7 +124594,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * c_nb_attributes -= c_nb_defaulted * if c_nb_attributes == 0: */ - __Pyx_TraceLine(314,0,__PYX_ERR(11, 314, __pyx_L9_error)) __pyx_t_1 = (((__pyx_v_c_ctxt->loadsubset & XML_COMPLETE_ATTRS) == 0) != 0); if (__pyx_t_1) { @@ -133306,7 +124604,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * if c_nb_attributes == 0: * attrib = IMMUTABLE_EMPTY_MAPPING */ - __Pyx_TraceLine(315,0,__PYX_ERR(11, 315, __pyx_L9_error)) __pyx_v_c_nb_attributes = (__pyx_v_c_nb_attributes - __pyx_v_c_nb_defaulted); /* "src/lxml/saxparser.pxi":314 @@ -133334,7 +124631,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * attrib = IMMUTABLE_EMPTY_MAPPING * else: */ - __Pyx_TraceLine(316,0,__PYX_ERR(11, 316, __pyx_L9_error)) __pyx_t_1 = ((__pyx_v_c_nb_attributes == 0) != 0); if (__pyx_t_1) { @@ -133345,7 +124641,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * else: * attrib = {} */ - __Pyx_TraceLine(317,0,__PYX_ERR(11, 317, __pyx_L9_error)) __Pyx_INCREF(__pyx_v_4lxml_5etree_IMMUTABLE_EMPTY_MAPPING); __pyx_v_attrib = __pyx_v_4lxml_5etree_IMMUTABLE_EMPTY_MAPPING; @@ -133366,9 +124661,8 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * for i in xrange(c_nb_attributes): * name = _namespacedNameFromNsName( */ - __Pyx_TraceLine(319,0,__PYX_ERR(11, 319, __pyx_L9_error)) /*else*/ { - __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 319, __pyx_L9_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 319, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_attrib = __pyx_t_3; __pyx_t_3 = 0; @@ -133380,7 +124674,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * name = _namespacedNameFromNsName( * c_attributes[2], c_attributes[0]) */ - __Pyx_TraceLine(320,0,__PYX_ERR(11, 320, __pyx_L9_error)) __pyx_t_7 = __pyx_v_c_nb_attributes; __pyx_t_8 = __pyx_t_7; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { @@ -133393,8 +124686,7 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * c_attributes[2], c_attributes[0]) * if c_attributes[3] is NULL: */ - __Pyx_TraceLine(321,0,__PYX_ERR(11, 321, __pyx_L9_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree__namespacedNameFromNsName((__pyx_v_c_attributes[2]), (__pyx_v_c_attributes[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 321, __pyx_L9_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__namespacedNameFromNsName((__pyx_v_c_attributes[2]), (__pyx_v_c_attributes[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 321, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3); __pyx_t_3 = 0; @@ -133406,7 +124698,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * value = '' * else: */ - __Pyx_TraceLine(323,0,__PYX_ERR(11, 323, __pyx_L9_error)) __pyx_t_1 = (((__pyx_v_c_attributes[3]) == NULL) != 0); if (__pyx_t_1) { @@ -133417,9 +124708,8 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * else: * c_len = c_attributes[4] - c_attributes[3] */ - __Pyx_TraceLine(324,0,__PYX_ERR(11, 324, __pyx_L9_error)) - __Pyx_INCREF(__pyx_kp_s__23); - __Pyx_XDECREF_SET(__pyx_v_value, __pyx_kp_s__23); + __Pyx_INCREF(__pyx_kp_s__11); + __Pyx_XDECREF_SET(__pyx_v_value, __pyx_kp_s__11); /* "src/lxml/saxparser.pxi":323 * name = _namespacedNameFromNsName( @@ -133438,7 +124728,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * value = c_attributes[3][:c_len].decode('utf8') * attrib[name] = value */ - __Pyx_TraceLine(326,0,__PYX_ERR(11, 326, __pyx_L9_error)) /*else*/ { __pyx_v_c_len = ((__pyx_v_c_attributes[4]) - (__pyx_v_c_attributes[3])); @@ -133449,8 +124738,7 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * attrib[name] = value * c_attributes += 5 */ - __Pyx_TraceLine(327,0,__PYX_ERR(11, 327, __pyx_L9_error)) - __pyx_t_3 = __Pyx_decode_c_string(((char const *)(__pyx_v_c_attributes[3])), 0, __pyx_v_c_len, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 327, __pyx_L9_error) + __pyx_t_3 = __Pyx_decode_c_string(((char const *)(__pyx_v_c_attributes[3])), 0, __pyx_v_c_len, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 327, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3); __pyx_t_3 = 0; @@ -133464,8 +124752,7 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * c_attributes += 5 * if c_nb_namespaces == 0: */ - __Pyx_TraceLine(328,0,__PYX_ERR(11, 328, __pyx_L9_error)) - if (unlikely(PyObject_SetItem(__pyx_v_attrib, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(11, 328, __pyx_L9_error) + if (unlikely(PyObject_SetItem(__pyx_v_attrib, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(12, 328, __pyx_L9_error) /* "src/lxml/saxparser.pxi":329 * value = c_attributes[3][:c_len].decode('utf8') @@ -133474,7 +124761,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * if c_nb_namespaces == 0: * nsmap = IMMUTABLE_EMPTY_MAPPING */ - __Pyx_TraceLine(329,0,__PYX_ERR(11, 329, __pyx_L9_error)) __pyx_v_c_attributes = (__pyx_v_c_attributes + 5); } } @@ -133487,7 +124773,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * nsmap = IMMUTABLE_EMPTY_MAPPING * else: */ - __Pyx_TraceLine(330,0,__PYX_ERR(11, 330, __pyx_L9_error)) __pyx_t_1 = ((__pyx_v_c_nb_namespaces == 0) != 0); if (__pyx_t_1) { @@ -133498,7 +124783,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * else: * nsmap = {} */ - __Pyx_TraceLine(331,0,__PYX_ERR(11, 331, __pyx_L9_error)) __Pyx_INCREF(__pyx_v_4lxml_5etree_IMMUTABLE_EMPTY_MAPPING); __pyx_v_nsmap = __pyx_v_4lxml_5etree_IMMUTABLE_EMPTY_MAPPING; @@ -133519,9 +124803,8 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * for i in xrange(c_nb_namespaces): * prefix = funicodeOrNone(c_namespaces[0]) */ - __Pyx_TraceLine(333,0,__PYX_ERR(11, 333, __pyx_L9_error)) /*else*/ { - __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 333, __pyx_L9_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 333, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_nsmap = __pyx_t_3; __pyx_t_3 = 0; @@ -133533,7 +124816,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * prefix = funicodeOrNone(c_namespaces[0]) * nsmap[prefix] = funicode(c_namespaces[1]) */ - __Pyx_TraceLine(334,0,__PYX_ERR(11, 334, __pyx_L9_error)) __pyx_t_7 = __pyx_v_c_nb_namespaces; __pyx_t_8 = __pyx_t_7; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { @@ -133546,8 +124828,7 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * nsmap[prefix] = funicode(c_namespaces[1]) * c_namespaces += 2 */ - __Pyx_TraceLine(335,0,__PYX_ERR(11, 335, __pyx_L9_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree_funicodeOrNone((__pyx_v_c_namespaces[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 335, __pyx_L9_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_funicodeOrNone((__pyx_v_c_namespaces[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 335, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_prefix, __pyx_t_3); __pyx_t_3 = 0; @@ -133559,10 +124840,9 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * c_namespaces += 2 * element = _callTargetSaxStart( */ - __Pyx_TraceLine(336,0,__PYX_ERR(11, 336, __pyx_L9_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree_funicode((__pyx_v_c_namespaces[1])); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 336, __pyx_L9_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_funicode((__pyx_v_c_namespaces[1])); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 336, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_3); - if (unlikely(PyObject_SetItem(__pyx_v_nsmap, __pyx_v_prefix, __pyx_t_3) < 0)) __PYX_ERR(11, 336, __pyx_L9_error) + if (unlikely(PyObject_SetItem(__pyx_v_nsmap, __pyx_v_prefix, __pyx_t_3) < 0)) __PYX_ERR(12, 336, __pyx_L9_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/lxml/saxparser.pxi":337 @@ -133572,7 +124852,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * element = _callTargetSaxStart( * context, c_ctxt, */ - __Pyx_TraceLine(337,0,__PYX_ERR(11, 337, __pyx_L9_error)) __pyx_v_c_namespaces = (__pyx_v_c_namespaces + 2); } } @@ -133585,8 +124864,7 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * attrib, nsmap) * */ - __Pyx_TraceLine(340,0,__PYX_ERR(11, 340, __pyx_L9_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree__namespacedNameFromNsName(__pyx_v_c_namespace, __pyx_v_c_localname); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 340, __pyx_L9_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__namespacedNameFromNsName(__pyx_v_c_namespace, __pyx_v_c_localname); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 340, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_3); /* "src/lxml/saxparser.pxi":338 @@ -133596,8 +124874,7 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * context, c_ctxt, * _namespacedNameFromNsName(c_namespace, c_localname), */ - __Pyx_TraceLine(338,0,__PYX_ERR(11, 338, __pyx_L9_error)) - __pyx_t_10 = __pyx_f_4lxml_5etree__callTargetSaxStart(__pyx_v_context, __pyx_v_c_ctxt, __pyx_t_3, __pyx_v_attrib, __pyx_v_nsmap); if (unlikely(!__pyx_t_10)) __PYX_ERR(11, 338, __pyx_L9_error) + __pyx_t_10 = __pyx_f_4lxml_5etree__callTargetSaxStart(__pyx_v_context, __pyx_v_c_ctxt, __pyx_t_3, __pyx_v_attrib, __pyx_v_nsmap); if (unlikely(!__pyx_t_10)) __PYX_ERR(12, 338, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_element = __pyx_t_10; @@ -133610,7 +124887,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * context._ns_stack.append(c_nb_namespaces) * if context._event_filter & (PARSE_EVENT_FILTER_END | */ - __Pyx_TraceLine(343,0,__PYX_ERR(11, 343, __pyx_L9_error)) __pyx_t_1 = ((__pyx_v_context->_event_filter & __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_END_NS) != 0); if (__pyx_t_1) { @@ -133621,14 +124897,13 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * if context._event_filter & (PARSE_EVENT_FILTER_END | * PARSE_EVENT_FILTER_START): */ - __Pyx_TraceLine(344,0,__PYX_ERR(11, 344, __pyx_L9_error)) if (unlikely(__pyx_v_context->_ns_stack == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(11, 344, __pyx_L9_error) + __PYX_ERR(12, 344, __pyx_L9_error) } - __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_c_nb_namespaces); if (unlikely(!__pyx_t_10)) __PYX_ERR(11, 344, __pyx_L9_error) + __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_c_nb_namespaces); if (unlikely(!__pyx_t_10)) __PYX_ERR(12, 344, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_context->_ns_stack, __pyx_t_10); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(11, 344, __pyx_L9_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_context->_ns_stack, __pyx_t_10); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(12, 344, __pyx_L9_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "src/lxml/saxparser.pxi":343 @@ -133647,7 +124922,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * PARSE_EVENT_FILTER_START): * _pushSaxStartEvent(context, c_ctxt, c_namespace, */ - __Pyx_TraceLine(345,0,__PYX_ERR(11, 345, __pyx_L9_error)) __pyx_t_1 = ((__pyx_v_context->_event_filter & (__pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_END | __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_START)) != 0); if (__pyx_t_1) { @@ -133658,8 +124932,7 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * c_localname, element) * except: */ - __Pyx_TraceLine(347,0,__PYX_ERR(11, 347, __pyx_L9_error)) - __pyx_t_7 = __pyx_f_4lxml_5etree__pushSaxStartEvent(__pyx_v_context, __pyx_v_c_ctxt, __pyx_v_c_namespace, __pyx_v_c_localname, __pyx_v_element); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(11, 347, __pyx_L9_error) + __pyx_t_7 = __pyx_f_4lxml_5etree__pushSaxStartEvent(__pyx_v_context, __pyx_v_c_ctxt, __pyx_v_c_namespace, __pyx_v_c_localname, __pyx_v_element); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(12, 347, __pyx_L9_error) /* "src/lxml/saxparser.pxi":345 * if context._event_filter & PARSE_EVENT_FILTER_END_NS: @@ -133693,10 +124966,9 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * context._handleSaxException(c_ctxt) * finally: */ - __Pyx_TraceLine(349,0,__PYX_ERR(11, 349, __pyx_L11_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._handleSaxTargetStart", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_3, &__pyx_t_12) < 0) __PYX_ERR(11, 349, __pyx_L11_except_error) + if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_3, &__pyx_t_12) < 0) __PYX_ERR(12, 349, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_12); @@ -133708,11 +124980,10 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * finally: * return # swallow any further exceptions */ - __Pyx_TraceLine(350,0,__PYX_ERR(11, 350, __pyx_L11_except_error)) ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_handleSaxException(__pyx_v_context, __pyx_v_c_ctxt); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L10_exception_handled; } __pyx_L11_except_error:; @@ -133745,7 +125016,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const * * */ - __Pyx_TraceLine(352,0,__PYX_ERR(11, 352, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ goto __pyx_L0; @@ -133793,11 +125063,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_10); - __Pyx_XDECREF(__pyx_t_12); - __Pyx_WriteUnraisable("lxml.etree._handleSaxTargetStart", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); __Pyx_XDECREF(__pyx_v_attrib); @@ -133806,7 +125071,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const __Pyx_XDECREF(__pyx_v_nsmap); __Pyx_XDECREF(__pyx_v_prefix); __Pyx_XDECREF(__pyx_v_element); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); @@ -133824,7 +125088,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStart(void *__pyx_v_ctxt, const static void __pyx_f_4lxml_5etree__handleSaxStartNoNs(void *__pyx_v_ctxt, const xmlChar *__pyx_v_c_name, const xmlChar **__pyx_v_c_attributes) { xmlParserCtxt *__pyx_v_c_ctxt; struct __pyx_obj_4lxml_5etree__SaxParserContext *__pyx_v_context = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -133842,7 +125105,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStartNoNs(void *__pyx_v_ctxt, const x PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_handleSaxStartNoNs", 0); - __Pyx_TraceCall("_handleSaxStartNoNs", __pyx_f[11], 355, 0, __PYX_ERR(11, 355, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":357 * cdef void _handleSaxStartNoNs(void* ctxt, const_xmlChar* c_name, @@ -133851,7 +125113,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStartNoNs(void *__pyx_v_ctxt, const x * if c_ctxt._private is NULL or c_ctxt.disableSAX: * return */ - __Pyx_TraceLine(357,0,__PYX_ERR(11, 357, __pyx_L1_error)) __pyx_v_c_ctxt = ((xmlParserCtxt *)__pyx_v_ctxt); /* "src/lxml/saxparser.pxi":358 @@ -133861,7 +125122,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStartNoNs(void *__pyx_v_ctxt, const x * return * context = <_SaxParserContext>c_ctxt._private */ - __Pyx_TraceLine(358,0,__PYX_ERR(11, 358, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_ctxt->_private == NULL) != 0); if (!__pyx_t_2) { } else { @@ -133880,7 +125140,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStartNoNs(void *__pyx_v_ctxt, const x * context = <_SaxParserContext>c_ctxt._private * try: */ - __Pyx_TraceLine(359,0,__PYX_ERR(11, 359, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/saxparser.pxi":358 @@ -133899,7 +125158,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStartNoNs(void *__pyx_v_ctxt, const x * try: * context._origSaxStartNoNs(c_ctxt, c_name, c_attributes) */ - __Pyx_TraceLine(360,0,__PYX_ERR(11, 360, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_v_c_ctxt->_private); __Pyx_INCREF(__pyx_t_3); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_t_3); @@ -133912,7 +125170,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStartNoNs(void *__pyx_v_ctxt, const x * context._origSaxStartNoNs(c_ctxt, c_name, c_attributes) * if c_ctxt.html: */ - __Pyx_TraceLine(361,0,__PYX_ERR(11, 361, __pyx_L7_error)) /*try:*/ { { __Pyx_PyThreadState_declare @@ -133930,7 +125187,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStartNoNs(void *__pyx_v_ctxt, const x * if c_ctxt.html: * _fixHtmlDictNodeNames(c_ctxt.dict, c_ctxt.node) */ - __Pyx_TraceLine(362,0,__PYX_ERR(11, 362, __pyx_L9_error)) __pyx_v_context->_origSaxStartNoNs(__pyx_v_c_ctxt, __pyx_v_c_name, __pyx_v_c_attributes); /* "src/lxml/saxparser.pxi":363 @@ -133940,7 +125196,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStartNoNs(void *__pyx_v_ctxt, const x * _fixHtmlDictNodeNames(c_ctxt.dict, c_ctxt.node) * if context._event_filter & (PARSE_EVENT_FILTER_END | */ - __Pyx_TraceLine(363,0,__PYX_ERR(11, 363, __pyx_L9_error)) __pyx_t_1 = (__pyx_v_c_ctxt->html != 0); if (__pyx_t_1) { @@ -133951,7 +125206,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStartNoNs(void *__pyx_v_ctxt, const x * if context._event_filter & (PARSE_EVENT_FILTER_END | * PARSE_EVENT_FILTER_START): */ - __Pyx_TraceLine(364,0,__PYX_ERR(11, 364, __pyx_L9_error)) (void)(__pyx_f_4lxml_5etree__fixHtmlDictNodeNames(__pyx_v_c_ctxt->dict, __pyx_v_c_ctxt->node)); /* "src/lxml/saxparser.pxi":363 @@ -133970,7 +125224,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStartNoNs(void *__pyx_v_ctxt, const x * PARSE_EVENT_FILTER_START): * _pushSaxStartEvent(context, c_ctxt, NULL, c_name, None) */ - __Pyx_TraceLine(365,0,__PYX_ERR(11, 365, __pyx_L9_error)) __pyx_t_1 = ((__pyx_v_context->_event_filter & (__pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_END | __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_START)) != 0); if (__pyx_t_1) { @@ -133981,8 +125234,7 @@ static void __pyx_f_4lxml_5etree__handleSaxStartNoNs(void *__pyx_v_ctxt, const x * except: * context._handleSaxException(c_ctxt) */ - __Pyx_TraceLine(367,0,__PYX_ERR(11, 367, __pyx_L9_error)) - __pyx_t_7 = __pyx_f_4lxml_5etree__pushSaxStartEvent(__pyx_v_context, __pyx_v_c_ctxt, NULL, __pyx_v_c_name, Py_None); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(11, 367, __pyx_L9_error) + __pyx_t_7 = __pyx_f_4lxml_5etree__pushSaxStartEvent(__pyx_v_context, __pyx_v_c_ctxt, NULL, __pyx_v_c_name, Py_None); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(12, 367, __pyx_L9_error) /* "src/lxml/saxparser.pxi":365 * if c_ctxt.html: @@ -134015,10 +125267,9 @@ static void __pyx_f_4lxml_5etree__handleSaxStartNoNs(void *__pyx_v_ctxt, const x * context._handleSaxException(c_ctxt) * finally: */ - __Pyx_TraceLine(368,0,__PYX_ERR(11, 368, __pyx_L11_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._handleSaxStartNoNs", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(11, 368, __pyx_L11_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(12, 368, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_9); @@ -134030,11 +125281,10 @@ static void __pyx_f_4lxml_5etree__handleSaxStartNoNs(void *__pyx_v_ctxt, const x * finally: * return # swallow any further exceptions */ - __Pyx_TraceLine(369,0,__PYX_ERR(11, 369, __pyx_L11_except_error)) ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_handleSaxException(__pyx_v_context, __pyx_v_c_ctxt); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L10_exception_handled; } __pyx_L11_except_error:; @@ -134067,7 +125317,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStartNoNs(void *__pyx_v_ctxt, const x * * */ - __Pyx_TraceLine(371,0,__PYX_ERR(11, 371, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ goto __pyx_L0; @@ -134115,14 +125364,8 @@ static void __pyx_f_4lxml_5etree__handleSaxStartNoNs(void *__pyx_v_ctxt, const x */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_WriteUnraisable("lxml.etree._handleSaxStartNoNs", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); @@ -134143,7 +125386,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStartNoNs(void *__pyx_v_ctxt, c PyObject *__pyx_v_attrib = NULL; PyObject *__pyx_v_name = NULL; PyObject *__pyx_v_element = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -134161,7 +125403,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStartNoNs(void *__pyx_v_ctxt, c PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_handleSaxTargetStartNoNs", 0); - __Pyx_TraceCall("_handleSaxTargetStartNoNs", __pyx_f[11], 374, 0, __PYX_ERR(11, 374, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":376 * cdef void _handleSaxTargetStartNoNs(void* ctxt, const_xmlChar* c_name, @@ -134170,7 +125411,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStartNoNs(void *__pyx_v_ctxt, c * if c_ctxt._private is NULL or c_ctxt.disableSAX: * return */ - __Pyx_TraceLine(376,0,__PYX_ERR(11, 376, __pyx_L1_error)) __pyx_v_c_ctxt = ((xmlParserCtxt *)__pyx_v_ctxt); /* "src/lxml/saxparser.pxi":377 @@ -134180,7 +125420,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStartNoNs(void *__pyx_v_ctxt, c * return * context = <_SaxParserContext>c_ctxt._private */ - __Pyx_TraceLine(377,0,__PYX_ERR(11, 377, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_ctxt->_private == NULL) != 0); if (!__pyx_t_2) { } else { @@ -134199,7 +125438,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStartNoNs(void *__pyx_v_ctxt, c * context = <_SaxParserContext>c_ctxt._private * try: */ - __Pyx_TraceLine(378,0,__PYX_ERR(11, 378, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/saxparser.pxi":377 @@ -134218,7 +125456,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStartNoNs(void *__pyx_v_ctxt, c * try: * if c_attributes is NULL: */ - __Pyx_TraceLine(379,0,__PYX_ERR(11, 379, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_v_c_ctxt->_private); __Pyx_INCREF(__pyx_t_3); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_t_3); @@ -134231,7 +125468,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStartNoNs(void *__pyx_v_ctxt, c * if c_attributes is NULL: * attrib = IMMUTABLE_EMPTY_MAPPING */ - __Pyx_TraceLine(380,0,__PYX_ERR(11, 380, __pyx_L7_error)) /*try:*/ { { __Pyx_PyThreadState_declare @@ -134249,7 +125485,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStartNoNs(void *__pyx_v_ctxt, c * attrib = IMMUTABLE_EMPTY_MAPPING * else: */ - __Pyx_TraceLine(381,0,__PYX_ERR(11, 381, __pyx_L9_error)) __pyx_t_1 = ((__pyx_v_c_attributes == NULL) != 0); if (__pyx_t_1) { @@ -134260,7 +125495,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStartNoNs(void *__pyx_v_ctxt, c * else: * attrib = {} */ - __Pyx_TraceLine(382,0,__PYX_ERR(11, 382, __pyx_L9_error)) __Pyx_INCREF(__pyx_v_4lxml_5etree_IMMUTABLE_EMPTY_MAPPING); __pyx_v_attrib = __pyx_v_4lxml_5etree_IMMUTABLE_EMPTY_MAPPING; @@ -134281,9 +125515,8 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStartNoNs(void *__pyx_v_ctxt, c * while c_attributes[0] is not NULL: * name = funicode(c_attributes[0]) */ - __Pyx_TraceLine(384,0,__PYX_ERR(11, 384, __pyx_L9_error)) /*else*/ { - __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 384, __pyx_L9_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 384, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_attrib = __pyx_t_3; __pyx_t_3 = 0; @@ -134295,7 +125528,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStartNoNs(void *__pyx_v_ctxt, c * name = funicode(c_attributes[0]) * attrib[name] = funicodeOrEmpty(c_attributes[1]) */ - __Pyx_TraceLine(385,0,__PYX_ERR(11, 385, __pyx_L9_error)) while (1) { __pyx_t_1 = (((__pyx_v_c_attributes[0]) != NULL) != 0); if (!__pyx_t_1) break; @@ -134307,8 +125539,7 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStartNoNs(void *__pyx_v_ctxt, c * attrib[name] = funicodeOrEmpty(c_attributes[1]) * c_attributes += 2 */ - __Pyx_TraceLine(386,0,__PYX_ERR(11, 386, __pyx_L9_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree_funicode((__pyx_v_c_attributes[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 386, __pyx_L9_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_funicode((__pyx_v_c_attributes[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 386, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3); __pyx_t_3 = 0; @@ -134320,10 +125551,9 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStartNoNs(void *__pyx_v_ctxt, c * c_attributes += 2 * element = _callTargetSaxStart( */ - __Pyx_TraceLine(387,0,__PYX_ERR(11, 387, __pyx_L9_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree_funicodeOrEmpty((__pyx_v_c_attributes[1])); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 387, __pyx_L9_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_funicodeOrEmpty((__pyx_v_c_attributes[1])); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 387, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_3); - if (unlikely(PyObject_SetItem(__pyx_v_attrib, __pyx_v_name, __pyx_t_3) < 0)) __PYX_ERR(11, 387, __pyx_L9_error) + if (unlikely(PyObject_SetItem(__pyx_v_attrib, __pyx_v_name, __pyx_t_3) < 0)) __PYX_ERR(12, 387, __pyx_L9_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/lxml/saxparser.pxi":388 @@ -134333,7 +125563,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStartNoNs(void *__pyx_v_ctxt, c * element = _callTargetSaxStart( * context, c_ctxt, funicode(c_name), */ - __Pyx_TraceLine(388,0,__PYX_ERR(11, 388, __pyx_L9_error)) __pyx_v_c_attributes = (__pyx_v_c_attributes + 2); } } @@ -134346,8 +125575,7 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStartNoNs(void *__pyx_v_ctxt, c * attrib, IMMUTABLE_EMPTY_MAPPING) * if context._event_filter & (PARSE_EVENT_FILTER_END | */ - __Pyx_TraceLine(390,0,__PYX_ERR(11, 390, __pyx_L9_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 390, __pyx_L9_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 390, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_3); /* "src/lxml/saxparser.pxi":391 @@ -134357,7 +125585,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStartNoNs(void *__pyx_v_ctxt, c * if context._event_filter & (PARSE_EVENT_FILTER_END | * PARSE_EVENT_FILTER_START): */ - __Pyx_TraceLine(391,0,__PYX_ERR(11, 391, __pyx_L9_error)) __pyx_t_7 = __pyx_v_4lxml_5etree_IMMUTABLE_EMPTY_MAPPING; __Pyx_INCREF(__pyx_t_7); @@ -134368,8 +125595,7 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStartNoNs(void *__pyx_v_ctxt, c * context, c_ctxt, funicode(c_name), * attrib, IMMUTABLE_EMPTY_MAPPING) */ - __Pyx_TraceLine(389,0,__PYX_ERR(11, 389, __pyx_L9_error)) - __pyx_t_8 = __pyx_f_4lxml_5etree__callTargetSaxStart(__pyx_v_context, __pyx_v_c_ctxt, __pyx_t_3, __pyx_v_attrib, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(11, 389, __pyx_L9_error) + __pyx_t_8 = __pyx_f_4lxml_5etree__callTargetSaxStart(__pyx_v_context, __pyx_v_c_ctxt, __pyx_t_3, __pyx_v_attrib, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 389, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -134383,7 +125609,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStartNoNs(void *__pyx_v_ctxt, c * PARSE_EVENT_FILTER_START): * _pushSaxStartEvent(context, c_ctxt, NULL, c_name, element) */ - __Pyx_TraceLine(392,0,__PYX_ERR(11, 392, __pyx_L9_error)) __pyx_t_1 = ((__pyx_v_context->_event_filter & (__pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_END | __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_START)) != 0); if (__pyx_t_1) { @@ -134394,8 +125619,7 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStartNoNs(void *__pyx_v_ctxt, c * except: * context._handleSaxException(c_ctxt) */ - __Pyx_TraceLine(394,0,__PYX_ERR(11, 394, __pyx_L9_error)) - __pyx_t_9 = __pyx_f_4lxml_5etree__pushSaxStartEvent(__pyx_v_context, __pyx_v_c_ctxt, NULL, __pyx_v_c_name, __pyx_v_element); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(11, 394, __pyx_L9_error) + __pyx_t_9 = __pyx_f_4lxml_5etree__pushSaxStartEvent(__pyx_v_context, __pyx_v_c_ctxt, NULL, __pyx_v_c_name, __pyx_v_element); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(12, 394, __pyx_L9_error) /* "src/lxml/saxparser.pxi":392 * context, c_ctxt, funicode(c_name), @@ -134430,10 +125654,9 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStartNoNs(void *__pyx_v_ctxt, c * context._handleSaxException(c_ctxt) * finally: */ - __Pyx_TraceLine(395,0,__PYX_ERR(11, 395, __pyx_L11_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._handleSaxTargetStartNoNs", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_3) < 0) __PYX_ERR(11, 395, __pyx_L11_except_error) + if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_3) < 0) __PYX_ERR(12, 395, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_3); @@ -134445,11 +125668,10 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStartNoNs(void *__pyx_v_ctxt, c * finally: * return # swallow any further exceptions */ - __Pyx_TraceLine(396,0,__PYX_ERR(11, 396, __pyx_L11_except_error)) ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_handleSaxException(__pyx_v_context, __pyx_v_c_ctxt); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_exception_handled; } __pyx_L11_except_error:; @@ -134482,7 +125704,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStartNoNs(void *__pyx_v_ctxt, c * * */ - __Pyx_TraceLine(398,0,__PYX_ERR(11, 398, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ goto __pyx_L0; @@ -134530,17 +125751,11 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStartNoNs(void *__pyx_v_ctxt, c */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_WriteUnraisable("lxml.etree._handleSaxTargetStartNoNs", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); __Pyx_XDECREF(__pyx_v_attrib); __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_element); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); @@ -134558,7 +125773,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetStartNoNs(void *__pyx_v_ctxt, c static PyObject *__pyx_f_4lxml_5etree__callTargetSaxStart(struct __pyx_obj_4lxml_5etree__SaxParserContext *__pyx_v_context, xmlParserCtxt *__pyx_v_c_ctxt, PyObject *__pyx_v_tag, PyObject *__pyx_v_attrib, PyObject *__pyx_v_nsmap) { PyObject *__pyx_v_element = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -134566,7 +125780,6 @@ static PyObject *__pyx_f_4lxml_5etree__callTargetSaxStart(struct __pyx_obj_4lxml int __pyx_t_4; unsigned short __pyx_t_5; __Pyx_RefNannySetupContext("_callTargetSaxStart", 0); - __Pyx_TraceCall("_callTargetSaxStart", __pyx_f[11], 401, 0, __PYX_ERR(11, 401, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":404 * xmlparser.xmlParserCtxt* c_ctxt, @@ -134575,8 +125788,7 @@ static PyObject *__pyx_f_4lxml_5etree__callTargetSaxStart(struct __pyx_obj_4lxml * if element is not None and c_ctxt.input is not NULL: * if isinstance(element, _Element): */ - __Pyx_TraceLine(404,0,__PYX_ERR(11, 404, __pyx_L1_error)) - __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserTarget *)__pyx_v_context->_target->__pyx_vtab)->_handleSaxStart(__pyx_v_context->_target, __pyx_v_tag, __pyx_v_attrib, __pyx_v_nsmap); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 404, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserTarget *)__pyx_v_context->_target->__pyx_vtab)->_handleSaxStart(__pyx_v_context->_target, __pyx_v_tag, __pyx_v_attrib, __pyx_v_nsmap); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_element = __pyx_t_1; __pyx_t_1 = 0; @@ -134588,7 +125800,6 @@ static PyObject *__pyx_f_4lxml_5etree__callTargetSaxStart(struct __pyx_obj_4lxml * if isinstance(element, _Element): * (<_Element>element)._c_node.line = ( */ - __Pyx_TraceLine(405,0,__PYX_ERR(11, 405, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_element != Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { @@ -134608,7 +125819,6 @@ static PyObject *__pyx_f_4lxml_5etree__callTargetSaxStart(struct __pyx_obj_4lxml * (<_Element>element)._c_node.line = ( * c_ctxt.input.line */ - __Pyx_TraceLine(406,0,__PYX_ERR(11, 406, __pyx_L1_error)) __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_element, __pyx_ptype_4lxml_5etree__Element); __pyx_t_4 = (__pyx_t_2 != 0); if (__pyx_t_4) { @@ -134620,7 +125830,6 @@ static PyObject *__pyx_f_4lxml_5etree__callTargetSaxStart(struct __pyx_obj_4lxml * return element * */ - __Pyx_TraceLine(409,0,__PYX_ERR(11, 409, __pyx_L1_error)) if (((__pyx_v_c_ctxt->input->line < 0xFFFF) != 0)) { /* "src/lxml/saxparser.pxi":408 @@ -134630,7 +125839,6 @@ static PyObject *__pyx_f_4lxml_5etree__callTargetSaxStart(struct __pyx_obj_4lxml * if c_ctxt.input.line < 65535 else 65535) * return element */ - __Pyx_TraceLine(408,0,__PYX_ERR(11, 408, __pyx_L1_error)) __pyx_t_5 = ((unsigned short)__pyx_v_c_ctxt->input->line); } else { __pyx_t_5 = 0xFFFF; @@ -134643,7 +125851,6 @@ static PyObject *__pyx_f_4lxml_5etree__callTargetSaxStart(struct __pyx_obj_4lxml * c_ctxt.input.line * if c_ctxt.input.line < 65535 else 65535) */ - __Pyx_TraceLine(407,0,__PYX_ERR(11, 407, __pyx_L1_error)) ((struct LxmlElement *)__pyx_v_element)->_c_node->line = __pyx_t_5; /* "src/lxml/saxparser.pxi":406 @@ -134671,7 +125878,6 @@ static PyObject *__pyx_f_4lxml_5etree__callTargetSaxStart(struct __pyx_obj_4lxml * * */ - __Pyx_TraceLine(410,0,__PYX_ERR(11, 410, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_element); __pyx_r = __pyx_v_element; @@ -134693,7 +125899,6 @@ static PyObject *__pyx_f_4lxml_5etree__callTargetSaxStart(struct __pyx_obj_4lxml __pyx_L0:; __Pyx_XDECREF(__pyx_v_element); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -134708,7 +125913,6 @@ static PyObject *__pyx_f_4lxml_5etree__callTargetSaxStart(struct __pyx_obj_4lxml static int __pyx_f_4lxml_5etree__pushSaxStartEvent(struct __pyx_obj_4lxml_5etree__SaxParserContext *__pyx_v_context, xmlParserCtxt *__pyx_v_c_ctxt, const xmlChar *__pyx_v_c_href, const xmlChar *__pyx_v_c_name, PyObject *__pyx_v_node) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -134717,7 +125921,6 @@ static int __pyx_f_4lxml_5etree__pushSaxStartEvent(struct __pyx_obj_4lxml_5etree PyObject *__pyx_t_5 = NULL; int __pyx_t_6; __Pyx_RefNannySetupContext("_pushSaxStartEvent", 0); - __Pyx_TraceCall("_pushSaxStartEvent", __pyx_f[11], 413, 0, __PYX_ERR(11, 413, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_node); /* "src/lxml/saxparser.pxi":417 @@ -134727,7 +125930,6 @@ static int __pyx_f_4lxml_5etree__pushSaxStartEvent(struct __pyx_obj_4lxml_5etree * context._matcher.matchesNsTag(c_href, c_name)): * if node is None and context._target is None: */ - __Pyx_TraceLine(417,0,__PYX_ERR(11, 417, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)__pyx_v_context->_matcher) == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (!__pyx_t_3) { @@ -134743,7 +125945,6 @@ static int __pyx_f_4lxml_5etree__pushSaxStartEvent(struct __pyx_obj_4lxml_5etree * if node is None and context._target is None: * assert context._doc is not None */ - __Pyx_TraceLine(418,0,__PYX_ERR(11, 418, __pyx_L1_error)) __pyx_t_3 = (__pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesNsTag(__pyx_v_context->_matcher, __pyx_v_c_href, __pyx_v_c_name) != 0); __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; @@ -134755,7 +125956,6 @@ static int __pyx_f_4lxml_5etree__pushSaxStartEvent(struct __pyx_obj_4lxml_5etree * context._matcher.matchesNsTag(c_href, c_name)): * if node is None and context._target is None: */ - __Pyx_TraceLine(417,0,__PYX_ERR(11, 417, __pyx_L1_error)) if (__pyx_t_1) { /* "src/lxml/saxparser.pxi":419 @@ -134765,7 +125965,6 @@ static int __pyx_f_4lxml_5etree__pushSaxStartEvent(struct __pyx_obj_4lxml_5etree * assert context._doc is not None * node = _elementFactory(context._doc, c_ctxt.node) */ - __Pyx_TraceLine(419,0,__PYX_ERR(11, 419, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_node == Py_None); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { @@ -134786,13 +125985,12 @@ static int __pyx_f_4lxml_5etree__pushSaxStartEvent(struct __pyx_obj_4lxml_5etree * node = _elementFactory(context._doc, c_ctxt.node) * if context._event_filter & PARSE_EVENT_FILTER_START: */ - __Pyx_TraceLine(420,0,__PYX_ERR(11, 420, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_1 = (((PyObject *)__pyx_v_context->__pyx_base._doc) != Py_None); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetNone(PyExc_AssertionError); - __PYX_ERR(11, 420, __pyx_L1_error) + __PYX_ERR(12, 420, __pyx_L1_error) } } #endif @@ -134804,10 +126002,9 @@ static int __pyx_f_4lxml_5etree__pushSaxStartEvent(struct __pyx_obj_4lxml_5etree * if context._event_filter & PARSE_EVENT_FILTER_START: * context.events_iterator._events.append(('start', node)) */ - __Pyx_TraceLine(421,0,__PYX_ERR(11, 421, __pyx_L1_error)) __pyx_t_4 = ((PyObject *)__pyx_v_context->__pyx_base._doc); __Pyx_INCREF(__pyx_t_4); - __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_4), __pyx_v_c_ctxt->node)); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 421, __pyx_L1_error) + __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_4), __pyx_v_c_ctxt->node)); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_node, __pyx_t_5); @@ -134829,7 +126026,6 @@ static int __pyx_f_4lxml_5etree__pushSaxStartEvent(struct __pyx_obj_4lxml_5etree * context.events_iterator._events.append(('start', node)) * if (context._target is None and */ - __Pyx_TraceLine(422,0,__PYX_ERR(11, 422, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_context->_event_filter & __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_START) != 0); if (__pyx_t_1) { @@ -134840,12 +126036,11 @@ static int __pyx_f_4lxml_5etree__pushSaxStartEvent(struct __pyx_obj_4lxml_5etree * if (context._target is None and * context._event_filter & PARSE_EVENT_FILTER_END): */ - __Pyx_TraceLine(423,0,__PYX_ERR(11, 423, __pyx_L1_error)) if (unlikely(__pyx_v_context->events_iterator->_events == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(11, 423, __pyx_L1_error) + __PYX_ERR(12, 423, __pyx_L1_error) } - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 423, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_start); __Pyx_GIVEREF(__pyx_n_s_start); @@ -134853,7 +126048,7 @@ static int __pyx_f_4lxml_5etree__pushSaxStartEvent(struct __pyx_obj_4lxml_5etree __Pyx_INCREF(__pyx_v_node); __Pyx_GIVEREF(__pyx_v_node); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_node); - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_context->events_iterator->_events, __pyx_t_5); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(11, 423, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_context->events_iterator->_events, __pyx_t_5); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(12, 423, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "src/lxml/saxparser.pxi":422 @@ -134872,7 +126067,6 @@ static int __pyx_f_4lxml_5etree__pushSaxStartEvent(struct __pyx_obj_4lxml_5etree * context._event_filter & PARSE_EVENT_FILTER_END): * context._node_stack.append(node) */ - __Pyx_TraceLine(424,0,__PYX_ERR(11, 424, __pyx_L1_error)) __pyx_t_3 = (((PyObject *)__pyx_v_context->_target) == Py_None); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { @@ -134888,7 +126082,6 @@ static int __pyx_f_4lxml_5etree__pushSaxStartEvent(struct __pyx_obj_4lxml_5etree * context._node_stack.append(node) * return 0 */ - __Pyx_TraceLine(425,0,__PYX_ERR(11, 425, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_context->_event_filter & __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_END) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L11_bool_binop_done:; @@ -134900,7 +126093,6 @@ static int __pyx_f_4lxml_5etree__pushSaxStartEvent(struct __pyx_obj_4lxml_5etree * context._event_filter & PARSE_EVENT_FILTER_END): * context._node_stack.append(node) */ - __Pyx_TraceLine(424,0,__PYX_ERR(11, 424, __pyx_L1_error)) if (__pyx_t_1) { /* "src/lxml/saxparser.pxi":426 @@ -134910,12 +126102,11 @@ static int __pyx_f_4lxml_5etree__pushSaxStartEvent(struct __pyx_obj_4lxml_5etree * return 0 * */ - __Pyx_TraceLine(426,0,__PYX_ERR(11, 426, __pyx_L1_error)) if (unlikely(__pyx_v_context->_node_stack == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(11, 426, __pyx_L1_error) + __PYX_ERR(12, 426, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_context->_node_stack, __pyx_v_node); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(11, 426, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_context->_node_stack, __pyx_v_node); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(12, 426, __pyx_L1_error) /* "src/lxml/saxparser.pxi":424 * if context._event_filter & PARSE_EVENT_FILTER_START: @@ -134942,7 +126133,6 @@ static int __pyx_f_4lxml_5etree__pushSaxStartEvent(struct __pyx_obj_4lxml_5etree * * */ - __Pyx_TraceLine(427,0,__PYX_ERR(11, 427, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -134962,7 +126152,6 @@ static int __pyx_f_4lxml_5etree__pushSaxStartEvent(struct __pyx_obj_4lxml_5etree __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_node); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -134979,7 +126168,6 @@ static void __pyx_f_4lxml_5etree__handleSaxEnd(void *__pyx_v_ctxt, const xmlChar xmlParserCtxt *__pyx_v_c_ctxt; struct __pyx_obj_4lxml_5etree__SaxParserContext *__pyx_v_context = NULL; PyObject *__pyx_v_node = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -134997,7 +126185,6 @@ static void __pyx_f_4lxml_5etree__handleSaxEnd(void *__pyx_v_ctxt, const xmlChar PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_handleSaxEnd", 0); - __Pyx_TraceCall("_handleSaxEnd", __pyx_f[11], 430, 0, __PYX_ERR(11, 430, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":433 * const_xmlChar* c_prefix, @@ -135006,7 +126193,6 @@ static void __pyx_f_4lxml_5etree__handleSaxEnd(void *__pyx_v_ctxt, const xmlChar * if c_ctxt._private is NULL or c_ctxt.disableSAX: * return */ - __Pyx_TraceLine(433,0,__PYX_ERR(11, 433, __pyx_L1_error)) __pyx_v_c_ctxt = ((xmlParserCtxt *)__pyx_v_ctxt); /* "src/lxml/saxparser.pxi":434 @@ -135016,7 +126202,6 @@ static void __pyx_f_4lxml_5etree__handleSaxEnd(void *__pyx_v_ctxt, const xmlChar * return * context = <_SaxParserContext>c_ctxt._private */ - __Pyx_TraceLine(434,0,__PYX_ERR(11, 434, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_ctxt->_private == NULL) != 0); if (!__pyx_t_2) { } else { @@ -135035,7 +126220,6 @@ static void __pyx_f_4lxml_5etree__handleSaxEnd(void *__pyx_v_ctxt, const xmlChar * context = <_SaxParserContext>c_ctxt._private * try: */ - __Pyx_TraceLine(435,0,__PYX_ERR(11, 435, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/saxparser.pxi":434 @@ -135054,7 +126238,6 @@ static void __pyx_f_4lxml_5etree__handleSaxEnd(void *__pyx_v_ctxt, const xmlChar * try: * if context._target is not None: */ - __Pyx_TraceLine(436,0,__PYX_ERR(11, 436, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_v_c_ctxt->_private); __Pyx_INCREF(__pyx_t_3); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_t_3); @@ -135067,7 +126250,6 @@ static void __pyx_f_4lxml_5etree__handleSaxEnd(void *__pyx_v_ctxt, const xmlChar * if context._target is not None: * node = context._target._handleSaxEnd( */ - __Pyx_TraceLine(437,0,__PYX_ERR(11, 437, __pyx_L7_error)) /*try:*/ { { __Pyx_PyThreadState_declare @@ -135085,7 +126267,6 @@ static void __pyx_f_4lxml_5etree__handleSaxEnd(void *__pyx_v_ctxt, const xmlChar * node = context._target._handleSaxEnd( * _namespacedNameFromNsName(c_namespace, c_localname)) */ - __Pyx_TraceLine(438,0,__PYX_ERR(11, 438, __pyx_L9_error)) __pyx_t_1 = (((PyObject *)__pyx_v_context->_target) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -135097,8 +126278,7 @@ static void __pyx_f_4lxml_5etree__handleSaxEnd(void *__pyx_v_ctxt, const xmlChar * else: * context._origSaxEnd(c_ctxt, c_localname, c_prefix, c_namespace) */ - __Pyx_TraceLine(440,0,__PYX_ERR(11, 440, __pyx_L9_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree__namespacedNameFromNsName(__pyx_v_c_namespace, __pyx_v_c_localname); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 440, __pyx_L9_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__namespacedNameFromNsName(__pyx_v_c_namespace, __pyx_v_c_localname); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 440, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_3); /* "src/lxml/saxparser.pxi":439 @@ -135108,8 +126288,7 @@ static void __pyx_f_4lxml_5etree__handleSaxEnd(void *__pyx_v_ctxt, const xmlChar * _namespacedNameFromNsName(c_namespace, c_localname)) * else: */ - __Pyx_TraceLine(439,0,__PYX_ERR(11, 439, __pyx_L9_error)) - __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserTarget *)__pyx_v_context->_target->__pyx_vtab)->_handleSaxEnd(__pyx_v_context->_target, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(11, 439, __pyx_L9_error) + __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserTarget *)__pyx_v_context->_target->__pyx_vtab)->_handleSaxEnd(__pyx_v_context->_target, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(12, 439, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_node = __pyx_t_7; @@ -135132,7 +126311,6 @@ static void __pyx_f_4lxml_5etree__handleSaxEnd(void *__pyx_v_ctxt, const xmlChar * node = None * _pushSaxEndEvent(context, c_namespace, c_localname, node) */ - __Pyx_TraceLine(442,0,__PYX_ERR(11, 442, __pyx_L9_error)) /*else*/ { __pyx_v_context->_origSaxEnd(__pyx_v_c_ctxt, __pyx_v_c_localname, __pyx_v_c_prefix, __pyx_v_c_namespace); @@ -135143,7 +126321,6 @@ static void __pyx_f_4lxml_5etree__handleSaxEnd(void *__pyx_v_ctxt, const xmlChar * _pushSaxEndEvent(context, c_namespace, c_localname, node) * _pushSaxNsEndEvents(context) */ - __Pyx_TraceLine(443,0,__PYX_ERR(11, 443, __pyx_L9_error)) __Pyx_INCREF(Py_None); __pyx_v_node = Py_None; } @@ -135156,8 +126333,7 @@ static void __pyx_f_4lxml_5etree__handleSaxEnd(void *__pyx_v_ctxt, const xmlChar * _pushSaxNsEndEvents(context) * except: */ - __Pyx_TraceLine(444,0,__PYX_ERR(11, 444, __pyx_L9_error)) - __pyx_t_8 = __pyx_f_4lxml_5etree__pushSaxEndEvent(__pyx_v_context, __pyx_v_c_namespace, __pyx_v_c_localname, __pyx_v_node); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(11, 444, __pyx_L9_error) + __pyx_t_8 = __pyx_f_4lxml_5etree__pushSaxEndEvent(__pyx_v_context, __pyx_v_c_namespace, __pyx_v_c_localname, __pyx_v_node); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(12, 444, __pyx_L9_error) /* "src/lxml/saxparser.pxi":445 * node = None @@ -135166,8 +126342,7 @@ static void __pyx_f_4lxml_5etree__handleSaxEnd(void *__pyx_v_ctxt, const xmlChar * except: * context._handleSaxException(c_ctxt) */ - __Pyx_TraceLine(445,0,__PYX_ERR(11, 445, __pyx_L9_error)) - __pyx_t_8 = __pyx_f_4lxml_5etree__pushSaxNsEndEvents(__pyx_v_context); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(11, 445, __pyx_L9_error) + __pyx_t_8 = __pyx_f_4lxml_5etree__pushSaxNsEndEvents(__pyx_v_context); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(12, 445, __pyx_L9_error) /* "src/lxml/saxparser.pxi":437 * return @@ -135192,10 +126367,9 @@ static void __pyx_f_4lxml_5etree__handleSaxEnd(void *__pyx_v_ctxt, const xmlChar * context._handleSaxException(c_ctxt) * finally: */ - __Pyx_TraceLine(446,0,__PYX_ERR(11, 446, __pyx_L11_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._handleSaxEnd", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_3, &__pyx_t_9) < 0) __PYX_ERR(11, 446, __pyx_L11_except_error) + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_3, &__pyx_t_9) < 0) __PYX_ERR(12, 446, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_9); @@ -135207,11 +126381,10 @@ static void __pyx_f_4lxml_5etree__handleSaxEnd(void *__pyx_v_ctxt, const xmlChar * finally: * return # swallow any further exceptions */ - __Pyx_TraceLine(447,0,__PYX_ERR(11, 447, __pyx_L11_except_error)) ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_handleSaxException(__pyx_v_context, __pyx_v_c_ctxt); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L10_exception_handled; } __pyx_L11_except_error:; @@ -135244,7 +126417,6 @@ static void __pyx_f_4lxml_5etree__handleSaxEnd(void *__pyx_v_ctxt, const xmlChar * * */ - __Pyx_TraceLine(449,0,__PYX_ERR(11, 449, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ goto __pyx_L0; @@ -135292,15 +126464,9 @@ static void __pyx_f_4lxml_5etree__handleSaxEnd(void *__pyx_v_ctxt, const xmlChar */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_WriteUnraisable("lxml.etree._handleSaxEnd", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); __Pyx_XDECREF(__pyx_v_node); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); @@ -135319,7 +126485,6 @@ static void __pyx_f_4lxml_5etree__handleSaxEndNoNs(void *__pyx_v_ctxt, const xml xmlParserCtxt *__pyx_v_c_ctxt; struct __pyx_obj_4lxml_5etree__SaxParserContext *__pyx_v_context = NULL; PyObject *__pyx_v_node = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -135337,7 +126502,6 @@ static void __pyx_f_4lxml_5etree__handleSaxEndNoNs(void *__pyx_v_ctxt, const xml PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_handleSaxEndNoNs", 0); - __Pyx_TraceCall("_handleSaxEndNoNs", __pyx_f[11], 452, 0, __PYX_ERR(11, 452, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":453 * @@ -135346,7 +126510,6 @@ static void __pyx_f_4lxml_5etree__handleSaxEndNoNs(void *__pyx_v_ctxt, const xml * if c_ctxt._private is NULL or c_ctxt.disableSAX: * return */ - __Pyx_TraceLine(453,0,__PYX_ERR(11, 453, __pyx_L1_error)) __pyx_v_c_ctxt = ((xmlParserCtxt *)__pyx_v_ctxt); /* "src/lxml/saxparser.pxi":454 @@ -135356,7 +126519,6 @@ static void __pyx_f_4lxml_5etree__handleSaxEndNoNs(void *__pyx_v_ctxt, const xml * return * context = <_SaxParserContext>c_ctxt._private */ - __Pyx_TraceLine(454,0,__PYX_ERR(11, 454, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_ctxt->_private == NULL) != 0); if (!__pyx_t_2) { } else { @@ -135375,7 +126537,6 @@ static void __pyx_f_4lxml_5etree__handleSaxEndNoNs(void *__pyx_v_ctxt, const xml * context = <_SaxParserContext>c_ctxt._private * try: */ - __Pyx_TraceLine(455,0,__PYX_ERR(11, 455, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/saxparser.pxi":454 @@ -135394,7 +126555,6 @@ static void __pyx_f_4lxml_5etree__handleSaxEndNoNs(void *__pyx_v_ctxt, const xml * try: * if context._target is not None: */ - __Pyx_TraceLine(456,0,__PYX_ERR(11, 456, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_v_c_ctxt->_private); __Pyx_INCREF(__pyx_t_3); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_t_3); @@ -135407,7 +126567,6 @@ static void __pyx_f_4lxml_5etree__handleSaxEndNoNs(void *__pyx_v_ctxt, const xml * if context._target is not None: * node = context._target._handleSaxEnd(funicode(c_name)) */ - __Pyx_TraceLine(457,0,__PYX_ERR(11, 457, __pyx_L7_error)) /*try:*/ { { __Pyx_PyThreadState_declare @@ -135425,7 +126584,6 @@ static void __pyx_f_4lxml_5etree__handleSaxEndNoNs(void *__pyx_v_ctxt, const xml * node = context._target._handleSaxEnd(funicode(c_name)) * else: */ - __Pyx_TraceLine(458,0,__PYX_ERR(11, 458, __pyx_L9_error)) __pyx_t_1 = (((PyObject *)__pyx_v_context->_target) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -135437,10 +126595,9 @@ static void __pyx_f_4lxml_5etree__handleSaxEndNoNs(void *__pyx_v_ctxt, const xml * else: * context._origSaxEndNoNs(c_ctxt, c_name) */ - __Pyx_TraceLine(459,0,__PYX_ERR(11, 459, __pyx_L9_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 459, __pyx_L9_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 459, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserTarget *)__pyx_v_context->_target->__pyx_vtab)->_handleSaxEnd(__pyx_v_context->_target, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(11, 459, __pyx_L9_error) + __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserTarget *)__pyx_v_context->_target->__pyx_vtab)->_handleSaxEnd(__pyx_v_context->_target, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(12, 459, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_node = __pyx_t_7; @@ -135463,7 +126620,6 @@ static void __pyx_f_4lxml_5etree__handleSaxEndNoNs(void *__pyx_v_ctxt, const xml * node = None * _pushSaxEndEvent(context, NULL, c_name, node) */ - __Pyx_TraceLine(461,0,__PYX_ERR(11, 461, __pyx_L9_error)) /*else*/ { __pyx_v_context->_origSaxEndNoNs(__pyx_v_c_ctxt, __pyx_v_c_name); @@ -135474,7 +126630,6 @@ static void __pyx_f_4lxml_5etree__handleSaxEndNoNs(void *__pyx_v_ctxt, const xml * _pushSaxEndEvent(context, NULL, c_name, node) * except: */ - __Pyx_TraceLine(462,0,__PYX_ERR(11, 462, __pyx_L9_error)) __Pyx_INCREF(Py_None); __pyx_v_node = Py_None; } @@ -135487,8 +126642,7 @@ static void __pyx_f_4lxml_5etree__handleSaxEndNoNs(void *__pyx_v_ctxt, const xml * except: * context._handleSaxException(c_ctxt) */ - __Pyx_TraceLine(463,0,__PYX_ERR(11, 463, __pyx_L9_error)) - __pyx_t_8 = __pyx_f_4lxml_5etree__pushSaxEndEvent(__pyx_v_context, NULL, __pyx_v_c_name, __pyx_v_node); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(11, 463, __pyx_L9_error) + __pyx_t_8 = __pyx_f_4lxml_5etree__pushSaxEndEvent(__pyx_v_context, NULL, __pyx_v_c_name, __pyx_v_node); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(12, 463, __pyx_L9_error) /* "src/lxml/saxparser.pxi":457 * return @@ -135513,10 +126667,9 @@ static void __pyx_f_4lxml_5etree__handleSaxEndNoNs(void *__pyx_v_ctxt, const xml * context._handleSaxException(c_ctxt) * finally: */ - __Pyx_TraceLine(464,0,__PYX_ERR(11, 464, __pyx_L11_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._handleSaxEndNoNs", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_3, &__pyx_t_9) < 0) __PYX_ERR(11, 464, __pyx_L11_except_error) + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_3, &__pyx_t_9) < 0) __PYX_ERR(12, 464, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_9); @@ -135528,11 +126681,10 @@ static void __pyx_f_4lxml_5etree__handleSaxEndNoNs(void *__pyx_v_ctxt, const xml * finally: * return # swallow any further exceptions */ - __Pyx_TraceLine(465,0,__PYX_ERR(11, 465, __pyx_L11_except_error)) ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_handleSaxException(__pyx_v_context, __pyx_v_c_ctxt); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L10_exception_handled; } __pyx_L11_except_error:; @@ -135565,7 +126717,6 @@ static void __pyx_f_4lxml_5etree__handleSaxEndNoNs(void *__pyx_v_ctxt, const xml * * */ - __Pyx_TraceLine(467,0,__PYX_ERR(11, 467, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ goto __pyx_L0; @@ -135613,15 +126764,9 @@ static void __pyx_f_4lxml_5etree__handleSaxEndNoNs(void *__pyx_v_ctxt, const xml */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_WriteUnraisable("lxml.etree._handleSaxEndNoNs", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); __Pyx_XDECREF(__pyx_v_node); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); @@ -135639,7 +126784,6 @@ static void __pyx_f_4lxml_5etree__handleSaxEndNoNs(void *__pyx_v_ctxt, const xml static int __pyx_f_4lxml_5etree__pushSaxNsEndEvents(struct __pyx_obj_4lxml_5etree__SaxParserContext *__pyx_v_context) { CYTHON_UNUSED int __pyx_v_i; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -135648,7 +126792,6 @@ static int __pyx_f_4lxml_5etree__pushSaxNsEndEvents(struct __pyx_obj_4lxml_5etre int __pyx_t_5; int __pyx_t_6; __Pyx_RefNannySetupContext("_pushSaxNsEndEvents", 0); - __Pyx_TraceCall("_pushSaxNsEndEvents", __pyx_f[11], 473, 0, __PYX_ERR(11, 473, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":475 * cdef int _pushSaxNsEndEvents(_SaxParserContext context) except -1: @@ -135657,7 +126800,6 @@ static int __pyx_f_4lxml_5etree__pushSaxNsEndEvents(struct __pyx_obj_4lxml_5etre * for i in range(context._ns_stack.pop()): * context.events_iterator._events.append(NS_END_EVENT) */ - __Pyx_TraceLine(475,0,__PYX_ERR(11, 475, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_context->_event_filter & __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_END_NS) != 0); if (__pyx_t_1) { @@ -135668,14 +126810,13 @@ static int __pyx_f_4lxml_5etree__pushSaxNsEndEvents(struct __pyx_obj_4lxml_5etre * context.events_iterator._events.append(NS_END_EVENT) * return 0 */ - __Pyx_TraceLine(476,0,__PYX_ERR(11, 476, __pyx_L1_error)) if (unlikely(__pyx_v_context->_ns_stack == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop"); - __PYX_ERR(11, 476, __pyx_L1_error) + __PYX_ERR(12, 476, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyList_Pop(__pyx_v_context->_ns_stack); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 476, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyList_Pop(__pyx_v_context->_ns_stack); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_As_long(__pyx_t_2); if (unlikely((__pyx_t_3 == (long)-1) && PyErr_Occurred())) __PYX_ERR(11, 476, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_long(__pyx_t_2); if (unlikely((__pyx_t_3 == (long)-1) && PyErr_Occurred())) __PYX_ERR(12, 476, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __pyx_t_3; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { @@ -135688,14 +126829,13 @@ static int __pyx_f_4lxml_5etree__pushSaxNsEndEvents(struct __pyx_obj_4lxml_5etre * return 0 * */ - __Pyx_TraceLine(477,0,__PYX_ERR(11, 477, __pyx_L1_error)) if (unlikely(__pyx_v_context->events_iterator->_events == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(11, 477, __pyx_L1_error) + __PYX_ERR(12, 477, __pyx_L1_error) } __pyx_t_2 = __pyx_v_4lxml_5etree_NS_END_EVENT; __Pyx_INCREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_context->events_iterator->_events, __pyx_t_2); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(11, 477, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_context->events_iterator->_events, __pyx_t_2); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(12, 477, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -135715,7 +126855,6 @@ static int __pyx_f_4lxml_5etree__pushSaxNsEndEvents(struct __pyx_obj_4lxml_5etre * * */ - __Pyx_TraceLine(478,0,__PYX_ERR(11, 478, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -135733,7 +126872,6 @@ static int __pyx_f_4lxml_5etree__pushSaxNsEndEvents(struct __pyx_obj_4lxml_5etre __Pyx_AddTraceback("lxml.etree._pushSaxNsEndEvents", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -135748,7 +126886,6 @@ static int __pyx_f_4lxml_5etree__pushSaxNsEndEvents(struct __pyx_obj_4lxml_5etre static int __pyx_f_4lxml_5etree__pushSaxEndEvent(struct __pyx_obj_4lxml_5etree__SaxParserContext *__pyx_v_context, const xmlChar *__pyx_v_c_href, const xmlChar *__pyx_v_c_name, PyObject *__pyx_v_node) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -135756,7 +126893,6 @@ static int __pyx_f_4lxml_5etree__pushSaxEndEvent(struct __pyx_obj_4lxml_5etree__ PyObject *__pyx_t_4 = NULL; int __pyx_t_5; __Pyx_RefNannySetupContext("_pushSaxEndEvent", 0); - __Pyx_TraceCall("_pushSaxEndEvent", __pyx_f[11], 481, 0, __PYX_ERR(11, 481, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_node); /* "src/lxml/saxparser.pxi":484 @@ -135766,7 +126902,6 @@ static int __pyx_f_4lxml_5etree__pushSaxEndEvent(struct __pyx_obj_4lxml_5etree__ * if (context._matcher is None or * context._matcher.matchesNsTag(c_href, c_name)): */ - __Pyx_TraceLine(484,0,__PYX_ERR(11, 484, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_context->_event_filter & __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_END) != 0); if (__pyx_t_1) { @@ -135777,7 +126912,6 @@ static int __pyx_f_4lxml_5etree__pushSaxEndEvent(struct __pyx_obj_4lxml_5etree__ * context._matcher.matchesNsTag(c_href, c_name)): * if context._target is None: */ - __Pyx_TraceLine(485,0,__PYX_ERR(11, 485, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)__pyx_v_context->_matcher) == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (!__pyx_t_3) { @@ -135793,7 +126927,6 @@ static int __pyx_f_4lxml_5etree__pushSaxEndEvent(struct __pyx_obj_4lxml_5etree__ * if context._target is None: * node = context._node_stack.pop() */ - __Pyx_TraceLine(486,0,__PYX_ERR(11, 486, __pyx_L1_error)) __pyx_t_3 = (__pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesNsTag(__pyx_v_context->_matcher, __pyx_v_c_href, __pyx_v_c_name) != 0); __pyx_t_1 = __pyx_t_3; __pyx_L5_bool_binop_done:; @@ -135805,7 +126938,6 @@ static int __pyx_f_4lxml_5etree__pushSaxEndEvent(struct __pyx_obj_4lxml_5etree__ * context._matcher.matchesNsTag(c_href, c_name)): * if context._target is None: */ - __Pyx_TraceLine(485,0,__PYX_ERR(11, 485, __pyx_L1_error)) if (__pyx_t_1) { /* "src/lxml/saxparser.pxi":487 @@ -135815,7 +126947,6 @@ static int __pyx_f_4lxml_5etree__pushSaxEndEvent(struct __pyx_obj_4lxml_5etree__ * node = context._node_stack.pop() * context.events_iterator._events.append(('end', node)) */ - __Pyx_TraceLine(487,0,__PYX_ERR(11, 487, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_context->_target) == Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { @@ -135827,12 +126958,11 @@ static int __pyx_f_4lxml_5etree__pushSaxEndEvent(struct __pyx_obj_4lxml_5etree__ * context.events_iterator._events.append(('end', node)) * return 0 */ - __Pyx_TraceLine(488,0,__PYX_ERR(11, 488, __pyx_L1_error)) if (unlikely(__pyx_v_context->_node_stack == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop"); - __PYX_ERR(11, 488, __pyx_L1_error) + __PYX_ERR(12, 488, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyList_Pop(__pyx_v_context->_node_stack); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 488, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyList_Pop(__pyx_v_context->_node_stack); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_node, __pyx_t_4); __pyx_t_4 = 0; @@ -135853,12 +126983,11 @@ static int __pyx_f_4lxml_5etree__pushSaxEndEvent(struct __pyx_obj_4lxml_5etree__ * return 0 * */ - __Pyx_TraceLine(489,0,__PYX_ERR(11, 489, __pyx_L1_error)) if (unlikely(__pyx_v_context->events_iterator->_events == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(11, 489, __pyx_L1_error) + __PYX_ERR(12, 489, __pyx_L1_error) } - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 489, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_end); __Pyx_GIVEREF(__pyx_n_s_end); @@ -135866,7 +126995,7 @@ static int __pyx_f_4lxml_5etree__pushSaxEndEvent(struct __pyx_obj_4lxml_5etree__ __Pyx_INCREF(__pyx_v_node); __Pyx_GIVEREF(__pyx_v_node); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_node); - __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_context->events_iterator->_events, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(11, 489, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_context->events_iterator->_events, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(12, 489, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "src/lxml/saxparser.pxi":485 @@ -135894,7 +127023,6 @@ static int __pyx_f_4lxml_5etree__pushSaxEndEvent(struct __pyx_obj_4lxml_5etree__ * * */ - __Pyx_TraceLine(490,0,__PYX_ERR(11, 490, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -135913,7 +127041,6 @@ static int __pyx_f_4lxml_5etree__pushSaxEndEvent(struct __pyx_obj_4lxml_5etree__ __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_node); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -135929,7 +127056,6 @@ static int __pyx_f_4lxml_5etree__pushSaxEndEvent(struct __pyx_obj_4lxml_5etree__ static void __pyx_f_4lxml_5etree__handleSaxData(void *__pyx_v_ctxt, const xmlChar *__pyx_v_c_data, int __pyx_v_data_len) { xmlParserCtxt *__pyx_v_c_ctxt; struct __pyx_obj_4lxml_5etree__SaxParserContext *__pyx_v_context = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -135947,7 +127073,6 @@ static void __pyx_f_4lxml_5etree__handleSaxData(void *__pyx_v_ctxt, const xmlCha PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_handleSaxData", 0); - __Pyx_TraceCall("_handleSaxData", __pyx_f[11], 493, 0, __PYX_ERR(11, 493, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":495 * cdef void _handleSaxData(void* ctxt, const_xmlChar* c_data, int data_len) with gil: @@ -135956,7 +127081,6 @@ static void __pyx_f_4lxml_5etree__handleSaxData(void *__pyx_v_ctxt, const xmlCha * if c_ctxt._private is NULL or c_ctxt.disableSAX: * return */ - __Pyx_TraceLine(495,0,__PYX_ERR(11, 495, __pyx_L1_error)) __pyx_v_c_ctxt = ((xmlParserCtxt *)__pyx_v_ctxt); /* "src/lxml/saxparser.pxi":496 @@ -135966,7 +127090,6 @@ static void __pyx_f_4lxml_5etree__handleSaxData(void *__pyx_v_ctxt, const xmlCha * return * context = <_SaxParserContext>c_ctxt._private */ - __Pyx_TraceLine(496,0,__PYX_ERR(11, 496, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_ctxt->_private == NULL) != 0); if (!__pyx_t_2) { } else { @@ -135985,7 +127108,6 @@ static void __pyx_f_4lxml_5etree__handleSaxData(void *__pyx_v_ctxt, const xmlCha * context = <_SaxParserContext>c_ctxt._private * try: */ - __Pyx_TraceLine(497,0,__PYX_ERR(11, 497, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/saxparser.pxi":496 @@ -136004,7 +127126,6 @@ static void __pyx_f_4lxml_5etree__handleSaxData(void *__pyx_v_ctxt, const xmlCha * try: * context._target._handleSaxData( */ - __Pyx_TraceLine(498,0,__PYX_ERR(11, 498, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_v_c_ctxt->_private); __Pyx_INCREF(__pyx_t_3); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_t_3); @@ -136017,7 +127138,6 @@ static void __pyx_f_4lxml_5etree__handleSaxData(void *__pyx_v_ctxt, const xmlCha * context._target._handleSaxData( * c_data[:data_len].decode('utf8')) */ - __Pyx_TraceLine(499,0,__PYX_ERR(11, 499, __pyx_L7_error)) /*try:*/ { { __Pyx_PyThreadState_declare @@ -136035,8 +127155,7 @@ static void __pyx_f_4lxml_5etree__handleSaxData(void *__pyx_v_ctxt, const xmlCha * except: * context._handleSaxException(c_ctxt) */ - __Pyx_TraceLine(501,0,__PYX_ERR(11, 501, __pyx_L9_error)) - __pyx_t_3 = __Pyx_decode_c_string(((char const *)__pyx_v_c_data), 0, __pyx_v_data_len, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 501, __pyx_L9_error) + __pyx_t_3 = __Pyx_decode_c_string(((char const *)__pyx_v_c_data), 0, __pyx_v_data_len, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 501, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_3); /* "src/lxml/saxparser.pxi":500 @@ -136046,8 +127165,7 @@ static void __pyx_f_4lxml_5etree__handleSaxData(void *__pyx_v_ctxt, const xmlCha * c_data[:data_len].decode('utf8')) * except: */ - __Pyx_TraceLine(500,0,__PYX_ERR(11, 500, __pyx_L9_error)) - __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserTarget *)__pyx_v_context->_target->__pyx_vtab)->_handleSaxData(__pyx_v_context->_target, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(11, 500, __pyx_L9_error) + __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserTarget *)__pyx_v_context->_target->__pyx_vtab)->_handleSaxData(__pyx_v_context->_target, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(12, 500, __pyx_L9_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/lxml/saxparser.pxi":499 @@ -136072,10 +127190,9 @@ static void __pyx_f_4lxml_5etree__handleSaxData(void *__pyx_v_ctxt, const xmlCha * context._handleSaxException(c_ctxt) * finally: */ - __Pyx_TraceLine(502,0,__PYX_ERR(11, 502, __pyx_L11_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._handleSaxData", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(11, 502, __pyx_L11_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(12, 502, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_9); @@ -136087,11 +127204,10 @@ static void __pyx_f_4lxml_5etree__handleSaxData(void *__pyx_v_ctxt, const xmlCha * finally: * return # swallow any further exceptions */ - __Pyx_TraceLine(503,0,__PYX_ERR(11, 503, __pyx_L11_except_error)) ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_handleSaxException(__pyx_v_context, __pyx_v_c_ctxt); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L10_exception_handled; } __pyx_L11_except_error:; @@ -136124,7 +127240,6 @@ static void __pyx_f_4lxml_5etree__handleSaxData(void *__pyx_v_ctxt, const xmlCha * * */ - __Pyx_TraceLine(505,0,__PYX_ERR(11, 505, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ goto __pyx_L0; @@ -136172,14 +127287,8 @@ static void __pyx_f_4lxml_5etree__handleSaxData(void *__pyx_v_ctxt, const xmlCha */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_WriteUnraisable("lxml.etree._handleSaxData", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); @@ -136197,7 +127306,6 @@ static void __pyx_f_4lxml_5etree__handleSaxData(void *__pyx_v_ctxt, const xmlCha static void __pyx_f_4lxml_5etree__handleSaxTargetDoctype(void *__pyx_v_ctxt, const xmlChar *__pyx_v_c_name, const xmlChar *__pyx_v_c_public, const xmlChar *__pyx_v_c_system) { xmlParserCtxt *__pyx_v_c_ctxt; struct __pyx_obj_4lxml_5etree__SaxParserContext *__pyx_v_context = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -136215,7 +127323,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetDoctype(void *__pyx_v_ctxt, con PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_handleSaxTargetDoctype", 0); - __Pyx_TraceCall("_handleSaxTargetDoctype", __pyx_f[11], 508, 0, __PYX_ERR(11, 508, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":512 * const_xmlChar* c_system) with gil: @@ -136224,7 +127331,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetDoctype(void *__pyx_v_ctxt, con * if c_ctxt._private is NULL or c_ctxt.disableSAX: * return */ - __Pyx_TraceLine(512,0,__PYX_ERR(11, 512, __pyx_L1_error)) __pyx_v_c_ctxt = ((xmlParserCtxt *)__pyx_v_ctxt); /* "src/lxml/saxparser.pxi":513 @@ -136234,7 +127340,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetDoctype(void *__pyx_v_ctxt, con * return * context = <_SaxParserContext>c_ctxt._private */ - __Pyx_TraceLine(513,0,__PYX_ERR(11, 513, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_ctxt->_private == NULL) != 0); if (!__pyx_t_2) { } else { @@ -136253,7 +127358,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetDoctype(void *__pyx_v_ctxt, con * context = <_SaxParserContext>c_ctxt._private * try: */ - __Pyx_TraceLine(514,0,__PYX_ERR(11, 514, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/saxparser.pxi":513 @@ -136272,7 +127376,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetDoctype(void *__pyx_v_ctxt, con * try: * context._target._handleSaxDoctype( */ - __Pyx_TraceLine(515,0,__PYX_ERR(11, 515, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_v_c_ctxt->_private); __Pyx_INCREF(__pyx_t_3); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_t_3); @@ -136285,7 +127388,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetDoctype(void *__pyx_v_ctxt, con * context._target._handleSaxDoctype( * funicodeOrNone(c_name), */ - __Pyx_TraceLine(516,0,__PYX_ERR(11, 516, __pyx_L7_error)) /*try:*/ { { __Pyx_PyThreadState_declare @@ -136303,8 +127405,7 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetDoctype(void *__pyx_v_ctxt, con * funicodeOrNone(c_public), * funicodeOrNone(c_system)) */ - __Pyx_TraceLine(518,0,__PYX_ERR(11, 518, __pyx_L9_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree_funicodeOrNone(__pyx_v_c_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 518, __pyx_L9_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_funicodeOrNone(__pyx_v_c_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 518, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_3); /* "src/lxml/saxparser.pxi":519 @@ -136314,8 +127415,7 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetDoctype(void *__pyx_v_ctxt, con * funicodeOrNone(c_system)) * except: */ - __Pyx_TraceLine(519,0,__PYX_ERR(11, 519, __pyx_L9_error)) - __pyx_t_7 = __pyx_f_4lxml_5etree_funicodeOrNone(__pyx_v_c_public); if (unlikely(!__pyx_t_7)) __PYX_ERR(11, 519, __pyx_L9_error) + __pyx_t_7 = __pyx_f_4lxml_5etree_funicodeOrNone(__pyx_v_c_public); if (unlikely(!__pyx_t_7)) __PYX_ERR(12, 519, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_7); /* "src/lxml/saxparser.pxi":520 @@ -136325,8 +127425,7 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetDoctype(void *__pyx_v_ctxt, con * except: * context._handleSaxException(c_ctxt) */ - __Pyx_TraceLine(520,0,__PYX_ERR(11, 520, __pyx_L9_error)) - __pyx_t_8 = __pyx_f_4lxml_5etree_funicodeOrNone(__pyx_v_c_system); if (unlikely(!__pyx_t_8)) __PYX_ERR(11, 520, __pyx_L9_error) + __pyx_t_8 = __pyx_f_4lxml_5etree_funicodeOrNone(__pyx_v_c_system); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 520, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_8); /* "src/lxml/saxparser.pxi":517 @@ -136336,8 +127435,7 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetDoctype(void *__pyx_v_ctxt, con * funicodeOrNone(c_name), * funicodeOrNone(c_public), */ - __Pyx_TraceLine(517,0,__PYX_ERR(11, 517, __pyx_L9_error)) - __pyx_t_9 = ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserTarget *)__pyx_v_context->_target->__pyx_vtab)->_handleSaxDoctype(__pyx_v_context->_target, __pyx_t_3, __pyx_t_7, __pyx_t_8); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(11, 517, __pyx_L9_error) + __pyx_t_9 = ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserTarget *)__pyx_v_context->_target->__pyx_vtab)->_handleSaxDoctype(__pyx_v_context->_target, __pyx_t_3, __pyx_t_7, __pyx_t_8); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(12, 517, __pyx_L9_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -136366,10 +127464,9 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetDoctype(void *__pyx_v_ctxt, con * context._handleSaxException(c_ctxt) * finally: */ - __Pyx_TraceLine(521,0,__PYX_ERR(11, 521, __pyx_L11_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._handleSaxTargetDoctype", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_3) < 0) __PYX_ERR(11, 521, __pyx_L11_except_error) + if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_3) < 0) __PYX_ERR(12, 521, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_3); @@ -136381,11 +127478,10 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetDoctype(void *__pyx_v_ctxt, con * finally: * return # swallow any further exceptions */ - __Pyx_TraceLine(522,0,__PYX_ERR(11, 522, __pyx_L11_except_error)) ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_handleSaxException(__pyx_v_context, __pyx_v_c_ctxt); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_exception_handled; } __pyx_L11_except_error:; @@ -136418,7 +127514,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetDoctype(void *__pyx_v_ctxt, con * * */ - __Pyx_TraceLine(524,0,__PYX_ERR(11, 524, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ goto __pyx_L0; @@ -136466,14 +127561,8 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetDoctype(void *__pyx_v_ctxt, con */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_WriteUnraisable("lxml.etree._handleSaxTargetDoctype", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); @@ -136492,7 +127581,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStartDocument(void *__pyx_v_ctxt) { xmlParserCtxt *__pyx_v_c_ctxt; struct __pyx_obj_4lxml_5etree__SaxParserContext *__pyx_v_context = NULL; xmlDoc *__pyx_v_c_doc; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -136511,7 +127599,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStartDocument(void *__pyx_v_ctxt) { PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_handleSaxStartDocument", 0); - __Pyx_TraceCall("_handleSaxStartDocument", __pyx_f[11], 527, 0, __PYX_ERR(11, 527, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":528 * @@ -136520,7 +127607,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStartDocument(void *__pyx_v_ctxt) { * if c_ctxt._private is NULL or c_ctxt.disableSAX: * return */ - __Pyx_TraceLine(528,0,__PYX_ERR(11, 528, __pyx_L1_error)) __pyx_v_c_ctxt = ((xmlParserCtxt *)__pyx_v_ctxt); /* "src/lxml/saxparser.pxi":529 @@ -136530,7 +127616,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStartDocument(void *__pyx_v_ctxt) { * return * context = <_SaxParserContext>c_ctxt._private */ - __Pyx_TraceLine(529,0,__PYX_ERR(11, 529, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_ctxt->_private == NULL) != 0); if (!__pyx_t_2) { } else { @@ -136549,7 +127634,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStartDocument(void *__pyx_v_ctxt) { * context = <_SaxParserContext>c_ctxt._private * context._origSaxStartDocument(ctxt) */ - __Pyx_TraceLine(530,0,__PYX_ERR(11, 530, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/saxparser.pxi":529 @@ -136568,7 +127652,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStartDocument(void *__pyx_v_ctxt) { * context._origSaxStartDocument(ctxt) * c_doc = c_ctxt.myDoc */ - __Pyx_TraceLine(531,0,__PYX_ERR(11, 531, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_v_c_ctxt->_private); __Pyx_INCREF(__pyx_t_3); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_t_3); @@ -136581,7 +127664,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStartDocument(void *__pyx_v_ctxt) { * c_doc = c_ctxt.myDoc * try: */ - __Pyx_TraceLine(532,0,__PYX_ERR(11, 532, __pyx_L1_error)) __pyx_v_context->_origSaxStartDocument(__pyx_v_ctxt); /* "src/lxml/saxparser.pxi":533 @@ -136591,7 +127673,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStartDocument(void *__pyx_v_ctxt) { * try: * context.startDocument(c_doc) */ - __Pyx_TraceLine(533,0,__PYX_ERR(11, 533, __pyx_L1_error)) __pyx_t_4 = __pyx_v_c_ctxt->myDoc; __pyx_v_c_doc = __pyx_t_4; @@ -136602,7 +127683,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStartDocument(void *__pyx_v_ctxt) { * context.startDocument(c_doc) * except: */ - __Pyx_TraceLine(534,0,__PYX_ERR(11, 534, __pyx_L7_error)) /*try:*/ { { __Pyx_PyThreadState_declare @@ -136620,8 +127700,7 @@ static void __pyx_f_4lxml_5etree__handleSaxStartDocument(void *__pyx_v_ctxt) { * except: * context._handleSaxException(c_ctxt) */ - __Pyx_TraceLine(535,0,__PYX_ERR(11, 535, __pyx_L9_error)) - __pyx_t_8 = ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->startDocument(__pyx_v_context, __pyx_v_c_doc); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(11, 535, __pyx_L9_error) + __pyx_t_8 = ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->startDocument(__pyx_v_context, __pyx_v_c_doc); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(12, 535, __pyx_L9_error) /* "src/lxml/saxparser.pxi":534 * context._origSaxStartDocument(ctxt) @@ -136645,10 +127724,9 @@ static void __pyx_f_4lxml_5etree__handleSaxStartDocument(void *__pyx_v_ctxt) { * context._handleSaxException(c_ctxt) * finally: */ - __Pyx_TraceLine(536,0,__PYX_ERR(11, 536, __pyx_L11_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._handleSaxStartDocument", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(11, 536, __pyx_L11_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(12, 536, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_10); @@ -136660,11 +127738,10 @@ static void __pyx_f_4lxml_5etree__handleSaxStartDocument(void *__pyx_v_ctxt) { * finally: * return # swallow any further exceptions */ - __Pyx_TraceLine(537,0,__PYX_ERR(11, 537, __pyx_L11_except_error)) ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_handleSaxException(__pyx_v_context, __pyx_v_c_ctxt); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L10_exception_handled; } __pyx_L11_except_error:; @@ -136697,7 +127774,6 @@ static void __pyx_f_4lxml_5etree__handleSaxStartDocument(void *__pyx_v_ctxt) { * * */ - __Pyx_TraceLine(539,0,__PYX_ERR(11, 539, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ goto __pyx_L0; @@ -136745,14 +127821,8 @@ static void __pyx_f_4lxml_5etree__handleSaxStartDocument(void *__pyx_v_ctxt) { */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_XDECREF(__pyx_t_10); - __Pyx_WriteUnraisable("lxml.etree._handleSaxStartDocument", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); @@ -136771,7 +127841,6 @@ static void __pyx_f_4lxml_5etree__handleSaxPI(void *__pyx_v_ctxt, const xmlChar xmlParserCtxt *__pyx_v_c_ctxt; struct __pyx_obj_4lxml_5etree__SaxParserContext *__pyx_v_context = NULL; PyObject *__pyx_v_pi = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -136789,7 +127858,6 @@ static void __pyx_f_4lxml_5etree__handleSaxPI(void *__pyx_v_ctxt, const xmlChar PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_handleSaxPI", 0); - __Pyx_TraceCall("_handleSaxPI", __pyx_f[11], 542, 0, __PYX_ERR(11, 542, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":545 * const_xmlChar* c_data) with gil: @@ -136798,7 +127866,6 @@ static void __pyx_f_4lxml_5etree__handleSaxPI(void *__pyx_v_ctxt, const xmlChar * if c_ctxt._private is NULL or c_ctxt.disableSAX: * return */ - __Pyx_TraceLine(545,0,__PYX_ERR(11, 545, __pyx_L1_error)) __pyx_v_c_ctxt = ((xmlParserCtxt *)__pyx_v_ctxt); /* "src/lxml/saxparser.pxi":546 @@ -136808,7 +127875,6 @@ static void __pyx_f_4lxml_5etree__handleSaxPI(void *__pyx_v_ctxt, const xmlChar * return * context = <_SaxParserContext>c_ctxt._private */ - __Pyx_TraceLine(546,0,__PYX_ERR(11, 546, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_ctxt->_private == NULL) != 0); if (!__pyx_t_2) { } else { @@ -136827,7 +127893,6 @@ static void __pyx_f_4lxml_5etree__handleSaxPI(void *__pyx_v_ctxt, const xmlChar * context = <_SaxParserContext>c_ctxt._private * try: */ - __Pyx_TraceLine(547,0,__PYX_ERR(11, 547, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/saxparser.pxi":546 @@ -136846,7 +127911,6 @@ static void __pyx_f_4lxml_5etree__handleSaxPI(void *__pyx_v_ctxt, const xmlChar * try: * pi = context._target._handleSaxPi( */ - __Pyx_TraceLine(548,0,__PYX_ERR(11, 548, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_v_c_ctxt->_private); __Pyx_INCREF(__pyx_t_3); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_t_3); @@ -136859,7 +127923,6 @@ static void __pyx_f_4lxml_5etree__handleSaxPI(void *__pyx_v_ctxt, const xmlChar * pi = context._target._handleSaxPi( * funicodeOrNone(c_target), */ - __Pyx_TraceLine(549,0,__PYX_ERR(11, 549, __pyx_L7_error)) /*try:*/ { { __Pyx_PyThreadState_declare @@ -136877,8 +127940,7 @@ static void __pyx_f_4lxml_5etree__handleSaxPI(void *__pyx_v_ctxt, const xmlChar * funicodeOrEmpty(c_data)) * if context._event_filter & PARSE_EVENT_FILTER_PI: */ - __Pyx_TraceLine(551,0,__PYX_ERR(11, 551, __pyx_L9_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree_funicodeOrNone(__pyx_v_c_target); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 551, __pyx_L9_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_funicodeOrNone(__pyx_v_c_target); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 551, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_3); /* "src/lxml/saxparser.pxi":552 @@ -136888,8 +127950,7 @@ static void __pyx_f_4lxml_5etree__handleSaxPI(void *__pyx_v_ctxt, const xmlChar * if context._event_filter & PARSE_EVENT_FILTER_PI: * context.events_iterator._events.append(('pi', pi)) */ - __Pyx_TraceLine(552,0,__PYX_ERR(11, 552, __pyx_L9_error)) - __pyx_t_7 = __pyx_f_4lxml_5etree_funicodeOrEmpty(__pyx_v_c_data); if (unlikely(!__pyx_t_7)) __PYX_ERR(11, 552, __pyx_L9_error) + __pyx_t_7 = __pyx_f_4lxml_5etree_funicodeOrEmpty(__pyx_v_c_data); if (unlikely(!__pyx_t_7)) __PYX_ERR(12, 552, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_7); /* "src/lxml/saxparser.pxi":550 @@ -136899,8 +127960,7 @@ static void __pyx_f_4lxml_5etree__handleSaxPI(void *__pyx_v_ctxt, const xmlChar * funicodeOrNone(c_target), * funicodeOrEmpty(c_data)) */ - __Pyx_TraceLine(550,0,__PYX_ERR(11, 550, __pyx_L9_error)) - __pyx_t_8 = ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserTarget *)__pyx_v_context->_target->__pyx_vtab)->_handleSaxPi(__pyx_v_context->_target, __pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(11, 550, __pyx_L9_error) + __pyx_t_8 = ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserTarget *)__pyx_v_context->_target->__pyx_vtab)->_handleSaxPi(__pyx_v_context->_target, __pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 550, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -136914,7 +127974,6 @@ static void __pyx_f_4lxml_5etree__handleSaxPI(void *__pyx_v_ctxt, const xmlChar * context.events_iterator._events.append(('pi', pi)) * except: */ - __Pyx_TraceLine(553,0,__PYX_ERR(11, 553, __pyx_L9_error)) __pyx_t_1 = ((__pyx_v_context->_event_filter & __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_PI) != 0); if (__pyx_t_1) { @@ -136925,12 +127984,11 @@ static void __pyx_f_4lxml_5etree__handleSaxPI(void *__pyx_v_ctxt, const xmlChar * except: * context._handleSaxException(c_ctxt) */ - __Pyx_TraceLine(554,0,__PYX_ERR(11, 554, __pyx_L9_error)) if (unlikely(__pyx_v_context->events_iterator->_events == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(11, 554, __pyx_L9_error) + __PYX_ERR(12, 554, __pyx_L9_error) } - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(11, 554, __pyx_L9_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 554, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_n_s_pi); __Pyx_GIVEREF(__pyx_n_s_pi); @@ -136938,7 +127996,7 @@ static void __pyx_f_4lxml_5etree__handleSaxPI(void *__pyx_v_ctxt, const xmlChar __Pyx_INCREF(__pyx_v_pi); __Pyx_GIVEREF(__pyx_v_pi); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_pi); - __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_context->events_iterator->_events, __pyx_t_8); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(11, 554, __pyx_L9_error) + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_context->events_iterator->_events, __pyx_t_8); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(12, 554, __pyx_L9_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "src/lxml/saxparser.pxi":553 @@ -136974,10 +128032,9 @@ static void __pyx_f_4lxml_5etree__handleSaxPI(void *__pyx_v_ctxt, const xmlChar * context._handleSaxException(c_ctxt) * finally: */ - __Pyx_TraceLine(555,0,__PYX_ERR(11, 555, __pyx_L11_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._handleSaxPI", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_3) < 0) __PYX_ERR(11, 555, __pyx_L11_except_error) + if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_3) < 0) __PYX_ERR(12, 555, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_3); @@ -136989,11 +128046,10 @@ static void __pyx_f_4lxml_5etree__handleSaxPI(void *__pyx_v_ctxt, const xmlChar * finally: * return # swallow any further exceptions */ - __Pyx_TraceLine(556,0,__PYX_ERR(11, 556, __pyx_L11_except_error)) ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_handleSaxException(__pyx_v_context, __pyx_v_c_ctxt); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_exception_handled; } __pyx_L11_except_error:; @@ -137026,7 +128082,6 @@ static void __pyx_f_4lxml_5etree__handleSaxPI(void *__pyx_v_ctxt, const xmlChar * * */ - __Pyx_TraceLine(558,0,__PYX_ERR(11, 558, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ goto __pyx_L0; @@ -137074,15 +128129,9 @@ static void __pyx_f_4lxml_5etree__handleSaxPI(void *__pyx_v_ctxt, const xmlChar */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_WriteUnraisable("lxml.etree._handleSaxPI", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); __Pyx_XDECREF(__pyx_v_pi); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); @@ -137101,7 +128150,6 @@ static void __pyx_f_4lxml_5etree__handleSaxPIEvent(void *__pyx_v_ctxt, const xml xmlParserCtxt *__pyx_v_c_ctxt; struct __pyx_obj_4lxml_5etree__SaxParserContext *__pyx_v_context = NULL; xmlNode *__pyx_v_c_node; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -137119,7 +128167,6 @@ static void __pyx_f_4lxml_5etree__handleSaxPIEvent(void *__pyx_v_ctxt, const xml PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_handleSaxPIEvent", 0); - __Pyx_TraceCall("_handleSaxPIEvent", __pyx_f[11], 561, 0, __PYX_ERR(11, 561, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":564 * const_xmlChar* data) with gil: @@ -137128,7 +128175,6 @@ static void __pyx_f_4lxml_5etree__handleSaxPIEvent(void *__pyx_v_ctxt, const xml * if c_ctxt._private is NULL or c_ctxt.disableSAX: * return */ - __Pyx_TraceLine(564,0,__PYX_ERR(11, 564, __pyx_L1_error)) __pyx_v_c_ctxt = ((xmlParserCtxt *)__pyx_v_ctxt); /* "src/lxml/saxparser.pxi":565 @@ -137138,7 +128184,6 @@ static void __pyx_f_4lxml_5etree__handleSaxPIEvent(void *__pyx_v_ctxt, const xml * return * context = <_SaxParserContext>c_ctxt._private */ - __Pyx_TraceLine(565,0,__PYX_ERR(11, 565, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_ctxt->_private == NULL) != 0); if (!__pyx_t_2) { } else { @@ -137157,7 +128202,6 @@ static void __pyx_f_4lxml_5etree__handleSaxPIEvent(void *__pyx_v_ctxt, const xml * context = <_SaxParserContext>c_ctxt._private * context._origSaxPI(ctxt, target, data) */ - __Pyx_TraceLine(566,0,__PYX_ERR(11, 566, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/saxparser.pxi":565 @@ -137176,7 +128220,6 @@ static void __pyx_f_4lxml_5etree__handleSaxPIEvent(void *__pyx_v_ctxt, const xml * context._origSaxPI(ctxt, target, data) * c_node = _findLastEventNode(c_ctxt) */ - __Pyx_TraceLine(567,0,__PYX_ERR(11, 567, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_v_c_ctxt->_private); __Pyx_INCREF(__pyx_t_3); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_t_3); @@ -137189,7 +128232,6 @@ static void __pyx_f_4lxml_5etree__handleSaxPIEvent(void *__pyx_v_ctxt, const xml * c_node = _findLastEventNode(c_ctxt) * if c_node is NULL: */ - __Pyx_TraceLine(568,0,__PYX_ERR(11, 568, __pyx_L1_error)) __pyx_v_context->_origSaxPI(__pyx_v_ctxt, __pyx_v_target, __pyx_v_data); /* "src/lxml/saxparser.pxi":569 @@ -137199,7 +128241,6 @@ static void __pyx_f_4lxml_5etree__handleSaxPIEvent(void *__pyx_v_ctxt, const xml * if c_node is NULL: * return */ - __Pyx_TraceLine(569,0,__PYX_ERR(11, 569, __pyx_L1_error)) __pyx_v_c_node = __pyx_f_4lxml_5etree__findLastEventNode(__pyx_v_c_ctxt); /* "src/lxml/saxparser.pxi":570 @@ -137209,7 +128250,6 @@ static void __pyx_f_4lxml_5etree__handleSaxPIEvent(void *__pyx_v_ctxt, const xml * return * try: */ - __Pyx_TraceLine(570,0,__PYX_ERR(11, 570, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_1) { @@ -137220,7 +128260,6 @@ static void __pyx_f_4lxml_5etree__handleSaxPIEvent(void *__pyx_v_ctxt, const xml * try: * context.pushEvent('pi', c_node) */ - __Pyx_TraceLine(571,0,__PYX_ERR(11, 571, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/saxparser.pxi":570 @@ -137239,7 +128278,6 @@ static void __pyx_f_4lxml_5etree__handleSaxPIEvent(void *__pyx_v_ctxt, const xml * context.pushEvent('pi', c_node) * except: */ - __Pyx_TraceLine(572,0,__PYX_ERR(11, 572, __pyx_L8_error)) /*try:*/ { { __Pyx_PyThreadState_declare @@ -137257,8 +128295,7 @@ static void __pyx_f_4lxml_5etree__handleSaxPIEvent(void *__pyx_v_ctxt, const xml * except: * context._handleSaxException(c_ctxt) */ - __Pyx_TraceLine(573,0,__PYX_ERR(11, 573, __pyx_L10_error)) - __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->pushEvent(__pyx_v_context, __pyx_n_s_pi, __pyx_v_c_node); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(11, 573, __pyx_L10_error) + __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->pushEvent(__pyx_v_context, __pyx_n_s_pi, __pyx_v_c_node); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(12, 573, __pyx_L10_error) /* "src/lxml/saxparser.pxi":572 * if c_node is NULL: @@ -137282,10 +128319,9 @@ static void __pyx_f_4lxml_5etree__handleSaxPIEvent(void *__pyx_v_ctxt, const xml * context._handleSaxException(c_ctxt) * finally: */ - __Pyx_TraceLine(574,0,__PYX_ERR(11, 574, __pyx_L12_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._handleSaxPIEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(11, 574, __pyx_L12_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(12, 574, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_9); @@ -137297,11 +128333,10 @@ static void __pyx_f_4lxml_5etree__handleSaxPIEvent(void *__pyx_v_ctxt, const xml * finally: * return # swallow any further exceptions */ - __Pyx_TraceLine(575,0,__PYX_ERR(11, 575, __pyx_L12_except_error)) ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_handleSaxException(__pyx_v_context, __pyx_v_c_ctxt); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L11_exception_handled; } __pyx_L12_except_error:; @@ -137334,7 +128369,6 @@ static void __pyx_f_4lxml_5etree__handleSaxPIEvent(void *__pyx_v_ctxt, const xml * * */ - __Pyx_TraceLine(577,0,__PYX_ERR(11, 577, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ goto __pyx_L0; @@ -137382,14 +128416,8 @@ static void __pyx_f_4lxml_5etree__handleSaxPIEvent(void *__pyx_v_ctxt, const xml */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_WriteUnraisable("lxml.etree._handleSaxPIEvent", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); @@ -137408,7 +128436,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetComment(void *__pyx_v_ctxt, con xmlParserCtxt *__pyx_v_c_ctxt; struct __pyx_obj_4lxml_5etree__SaxParserContext *__pyx_v_context = NULL; PyObject *__pyx_v_comment = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -137426,7 +128453,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetComment(void *__pyx_v_ctxt, con PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_handleSaxTargetComment", 0); - __Pyx_TraceCall("_handleSaxTargetComment", __pyx_f[11], 580, 0, __PYX_ERR(11, 580, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":582 * cdef void _handleSaxTargetComment(void* ctxt, const_xmlChar* c_data) with gil: @@ -137435,7 +128461,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetComment(void *__pyx_v_ctxt, con * if c_ctxt._private is NULL or c_ctxt.disableSAX: * return */ - __Pyx_TraceLine(582,0,__PYX_ERR(11, 582, __pyx_L1_error)) __pyx_v_c_ctxt = ((xmlParserCtxt *)__pyx_v_ctxt); /* "src/lxml/saxparser.pxi":583 @@ -137445,7 +128470,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetComment(void *__pyx_v_ctxt, con * return * context = <_SaxParserContext>c_ctxt._private */ - __Pyx_TraceLine(583,0,__PYX_ERR(11, 583, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_ctxt->_private == NULL) != 0); if (!__pyx_t_2) { } else { @@ -137464,7 +128488,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetComment(void *__pyx_v_ctxt, con * context = <_SaxParserContext>c_ctxt._private * try: */ - __Pyx_TraceLine(584,0,__PYX_ERR(11, 584, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/saxparser.pxi":583 @@ -137483,7 +128506,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetComment(void *__pyx_v_ctxt, con * try: * comment = context._target._handleSaxComment(funicodeOrEmpty(c_data)) */ - __Pyx_TraceLine(585,0,__PYX_ERR(11, 585, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_v_c_ctxt->_private); __Pyx_INCREF(__pyx_t_3); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_t_3); @@ -137496,7 +128518,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetComment(void *__pyx_v_ctxt, con * comment = context._target._handleSaxComment(funicodeOrEmpty(c_data)) * if context._event_filter & PARSE_EVENT_FILTER_COMMENT: */ - __Pyx_TraceLine(586,0,__PYX_ERR(11, 586, __pyx_L7_error)) /*try:*/ { { __Pyx_PyThreadState_declare @@ -137514,10 +128535,9 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetComment(void *__pyx_v_ctxt, con * if context._event_filter & PARSE_EVENT_FILTER_COMMENT: * context.events_iterator._events.append(('comment', comment)) */ - __Pyx_TraceLine(587,0,__PYX_ERR(11, 587, __pyx_L9_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree_funicodeOrEmpty(__pyx_v_c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 587, __pyx_L9_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_funicodeOrEmpty(__pyx_v_c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 587, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserTarget *)__pyx_v_context->_target->__pyx_vtab)->_handleSaxComment(__pyx_v_context->_target, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(11, 587, __pyx_L9_error) + __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserTarget *)__pyx_v_context->_target->__pyx_vtab)->_handleSaxComment(__pyx_v_context->_target, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(12, 587, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_comment = __pyx_t_7; @@ -137530,7 +128550,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetComment(void *__pyx_v_ctxt, con * context.events_iterator._events.append(('comment', comment)) * except: */ - __Pyx_TraceLine(588,0,__PYX_ERR(11, 588, __pyx_L9_error)) __pyx_t_1 = ((__pyx_v_context->_event_filter & __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_COMMENT) != 0); if (__pyx_t_1) { @@ -137541,12 +128560,11 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetComment(void *__pyx_v_ctxt, con * except: * context._handleSaxException(c_ctxt) */ - __Pyx_TraceLine(589,0,__PYX_ERR(11, 589, __pyx_L9_error)) if (unlikely(__pyx_v_context->events_iterator->_events == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(11, 589, __pyx_L9_error) + __PYX_ERR(12, 589, __pyx_L9_error) } - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(11, 589, __pyx_L9_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(12, 589, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_n_s_comment); __Pyx_GIVEREF(__pyx_n_s_comment); @@ -137554,7 +128572,7 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetComment(void *__pyx_v_ctxt, con __Pyx_INCREF(__pyx_v_comment); __Pyx_GIVEREF(__pyx_v_comment); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_comment); - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_context->events_iterator->_events, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(11, 589, __pyx_L9_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_context->events_iterator->_events, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(12, 589, __pyx_L9_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "src/lxml/saxparser.pxi":588 @@ -137589,10 +128607,9 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetComment(void *__pyx_v_ctxt, con * context._handleSaxException(c_ctxt) * finally: */ - __Pyx_TraceLine(590,0,__PYX_ERR(11, 590, __pyx_L11_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._handleSaxTargetComment", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_3, &__pyx_t_9) < 0) __PYX_ERR(11, 590, __pyx_L11_except_error) + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_3, &__pyx_t_9) < 0) __PYX_ERR(12, 590, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_9); @@ -137604,11 +128621,10 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetComment(void *__pyx_v_ctxt, con * finally: * return # swallow any further exceptions */ - __Pyx_TraceLine(591,0,__PYX_ERR(11, 591, __pyx_L11_except_error)) ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_handleSaxException(__pyx_v_context, __pyx_v_c_ctxt); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L10_exception_handled; } __pyx_L11_except_error:; @@ -137641,7 +128657,6 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetComment(void *__pyx_v_ctxt, con * * */ - __Pyx_TraceLine(593,0,__PYX_ERR(11, 593, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ goto __pyx_L0; @@ -137689,15 +128704,9 @@ static void __pyx_f_4lxml_5etree__handleSaxTargetComment(void *__pyx_v_ctxt, con */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_WriteUnraisable("lxml.etree._handleSaxTargetComment", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); __Pyx_XDECREF(__pyx_v_comment); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); @@ -137716,7 +128725,6 @@ static void __pyx_f_4lxml_5etree__handleSaxComment(void *__pyx_v_ctxt, const xml xmlParserCtxt *__pyx_v_c_ctxt; struct __pyx_obj_4lxml_5etree__SaxParserContext *__pyx_v_context = NULL; xmlNode *__pyx_v_c_node; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -137734,7 +128742,6 @@ static void __pyx_f_4lxml_5etree__handleSaxComment(void *__pyx_v_ctxt, const xml PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_handleSaxComment", 0); - __Pyx_TraceCall("_handleSaxComment", __pyx_f[11], 596, 0, __PYX_ERR(11, 596, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":598 * cdef void _handleSaxComment(void* ctxt, const_xmlChar* text) with gil: @@ -137743,7 +128750,6 @@ static void __pyx_f_4lxml_5etree__handleSaxComment(void *__pyx_v_ctxt, const xml * if c_ctxt._private is NULL or c_ctxt.disableSAX: * return */ - __Pyx_TraceLine(598,0,__PYX_ERR(11, 598, __pyx_L1_error)) __pyx_v_c_ctxt = ((xmlParserCtxt *)__pyx_v_ctxt); /* "src/lxml/saxparser.pxi":599 @@ -137753,7 +128759,6 @@ static void __pyx_f_4lxml_5etree__handleSaxComment(void *__pyx_v_ctxt, const xml * return * context = <_SaxParserContext>c_ctxt._private */ - __Pyx_TraceLine(599,0,__PYX_ERR(11, 599, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_ctxt->_private == NULL) != 0); if (!__pyx_t_2) { } else { @@ -137772,7 +128777,6 @@ static void __pyx_f_4lxml_5etree__handleSaxComment(void *__pyx_v_ctxt, const xml * context = <_SaxParserContext>c_ctxt._private * context._origSaxComment(ctxt, text) */ - __Pyx_TraceLine(600,0,__PYX_ERR(11, 600, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/saxparser.pxi":599 @@ -137791,7 +128795,6 @@ static void __pyx_f_4lxml_5etree__handleSaxComment(void *__pyx_v_ctxt, const xml * context._origSaxComment(ctxt, text) * c_node = _findLastEventNode(c_ctxt) */ - __Pyx_TraceLine(601,0,__PYX_ERR(11, 601, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_v_c_ctxt->_private); __Pyx_INCREF(__pyx_t_3); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_t_3); @@ -137804,7 +128807,6 @@ static void __pyx_f_4lxml_5etree__handleSaxComment(void *__pyx_v_ctxt, const xml * c_node = _findLastEventNode(c_ctxt) * if c_node is NULL: */ - __Pyx_TraceLine(602,0,__PYX_ERR(11, 602, __pyx_L1_error)) __pyx_v_context->_origSaxComment(__pyx_v_ctxt, __pyx_v_text); /* "src/lxml/saxparser.pxi":603 @@ -137814,7 +128816,6 @@ static void __pyx_f_4lxml_5etree__handleSaxComment(void *__pyx_v_ctxt, const xml * if c_node is NULL: * return */ - __Pyx_TraceLine(603,0,__PYX_ERR(11, 603, __pyx_L1_error)) __pyx_v_c_node = __pyx_f_4lxml_5etree__findLastEventNode(__pyx_v_c_ctxt); /* "src/lxml/saxparser.pxi":604 @@ -137824,7 +128825,6 @@ static void __pyx_f_4lxml_5etree__handleSaxComment(void *__pyx_v_ctxt, const xml * return * try: */ - __Pyx_TraceLine(604,0,__PYX_ERR(11, 604, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_1) { @@ -137835,7 +128835,6 @@ static void __pyx_f_4lxml_5etree__handleSaxComment(void *__pyx_v_ctxt, const xml * try: * context.pushEvent('comment', c_node) */ - __Pyx_TraceLine(605,0,__PYX_ERR(11, 605, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/saxparser.pxi":604 @@ -137854,7 +128853,6 @@ static void __pyx_f_4lxml_5etree__handleSaxComment(void *__pyx_v_ctxt, const xml * context.pushEvent('comment', c_node) * except: */ - __Pyx_TraceLine(606,0,__PYX_ERR(11, 606, __pyx_L8_error)) /*try:*/ { { __Pyx_PyThreadState_declare @@ -137872,8 +128870,7 @@ static void __pyx_f_4lxml_5etree__handleSaxComment(void *__pyx_v_ctxt, const xml * except: * context._handleSaxException(c_ctxt) */ - __Pyx_TraceLine(607,0,__PYX_ERR(11, 607, __pyx_L10_error)) - __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->pushEvent(__pyx_v_context, __pyx_n_s_comment, __pyx_v_c_node); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(11, 607, __pyx_L10_error) + __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->pushEvent(__pyx_v_context, __pyx_n_s_comment, __pyx_v_c_node); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(12, 607, __pyx_L10_error) /* "src/lxml/saxparser.pxi":606 * if c_node is NULL: @@ -137897,10 +128894,9 @@ static void __pyx_f_4lxml_5etree__handleSaxComment(void *__pyx_v_ctxt, const xml * context._handleSaxException(c_ctxt) * finally: */ - __Pyx_TraceLine(608,0,__PYX_ERR(11, 608, __pyx_L12_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._handleSaxComment", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(11, 608, __pyx_L12_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(12, 608, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_9); @@ -137912,11 +128908,10 @@ static void __pyx_f_4lxml_5etree__handleSaxComment(void *__pyx_v_ctxt, const xml * finally: * return # swallow any further exceptions */ - __Pyx_TraceLine(609,0,__PYX_ERR(11, 609, __pyx_L12_except_error)) ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_handleSaxException(__pyx_v_context, __pyx_v_c_ctxt); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L11_exception_handled; } __pyx_L12_except_error:; @@ -137949,7 +128944,6 @@ static void __pyx_f_4lxml_5etree__handleSaxComment(void *__pyx_v_ctxt, const xml * * */ - __Pyx_TraceLine(611,0,__PYX_ERR(11, 611, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ goto __pyx_L0; @@ -137997,14 +128991,8 @@ static void __pyx_f_4lxml_5etree__handleSaxComment(void *__pyx_v_ctxt, const xml */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_WriteUnraisable("lxml.etree._handleSaxComment", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); @@ -138021,11 +129009,9 @@ static void __pyx_f_4lxml_5etree__handleSaxComment(void *__pyx_v_ctxt, const xml static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__findLastEventNode(xmlParserCtxt *__pyx_v_c_ctxt) { xmlNode *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_findLastEventNode", 0); - __Pyx_TraceCall("_findLastEventNode", __pyx_f[11], 614, 0, __PYX_ERR(11, 614, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":616 * cdef inline xmlNode* _findLastEventNode(xmlparser.xmlParserCtxt* c_ctxt): @@ -138034,7 +129020,6 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__findLastEventNode(xmlParserC * return c_ctxt.myDoc.intSubset.last * elif c_ctxt.inSubset == 2: */ - __Pyx_TraceLine(616,0,__PYX_ERR(11, 616, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_ctxt->inSubset == 1) != 0); if (__pyx_t_1) { @@ -138045,7 +129030,6 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__findLastEventNode(xmlParserC * elif c_ctxt.inSubset == 2: * return c_ctxt.myDoc.extSubset.last */ - __Pyx_TraceLine(617,0,__PYX_ERR(11, 617, __pyx_L1_error)) __pyx_r = __pyx_v_c_ctxt->myDoc->intSubset->last; goto __pyx_L0; @@ -138065,7 +129049,6 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__findLastEventNode(xmlParserC * return c_ctxt.myDoc.extSubset.last * elif c_ctxt.node is NULL: */ - __Pyx_TraceLine(618,0,__PYX_ERR(11, 618, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_ctxt->inSubset == 2) != 0); if (__pyx_t_1) { @@ -138076,7 +129059,6 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__findLastEventNode(xmlParserC * elif c_ctxt.node is NULL: * return c_ctxt.myDoc.last */ - __Pyx_TraceLine(619,0,__PYX_ERR(11, 619, __pyx_L1_error)) __pyx_r = __pyx_v_c_ctxt->myDoc->extSubset->last; goto __pyx_L0; @@ -138096,7 +129078,6 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__findLastEventNode(xmlParserC * return c_ctxt.myDoc.last * elif c_ctxt.node.type == tree.XML_ELEMENT_NODE: */ - __Pyx_TraceLine(620,0,__PYX_ERR(11, 620, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_ctxt->node == NULL) != 0); if (__pyx_t_1) { @@ -138107,7 +129088,6 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__findLastEventNode(xmlParserC * elif c_ctxt.node.type == tree.XML_ELEMENT_NODE: * return c_ctxt.node.last */ - __Pyx_TraceLine(621,0,__PYX_ERR(11, 621, __pyx_L1_error)) __pyx_r = __pyx_v_c_ctxt->myDoc->last; goto __pyx_L0; @@ -138127,7 +129107,6 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__findLastEventNode(xmlParserC * return c_ctxt.node.last * else: */ - __Pyx_TraceLine(622,0,__PYX_ERR(11, 622, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_ctxt->node->type == XML_ELEMENT_NODE) != 0); if (__pyx_t_1) { @@ -138138,7 +129117,6 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__findLastEventNode(xmlParserC * else: * return c_ctxt.node.next */ - __Pyx_TraceLine(623,0,__PYX_ERR(11, 623, __pyx_L1_error)) __pyx_r = __pyx_v_c_ctxt->node->last; goto __pyx_L0; @@ -138158,7 +129136,6 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__findLastEventNode(xmlParserC * * */ - __Pyx_TraceLine(625,0,__PYX_ERR(11, 625, __pyx_L1_error)) /*else*/ { __pyx_r = __pyx_v_c_ctxt->node->next; goto __pyx_L0; @@ -138173,11 +129150,7 @@ static CYTHON_INLINE xmlNode *__pyx_f_4lxml_5etree__findLastEventNode(xmlParserC */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._findLastEventNode", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -138219,7 +129192,7 @@ static int __pyx_pw_4lxml_5etree_11TreeBuilder_1__init__(PyObject *__pyx_v_self, } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "__init__") < 0)) __PYX_ERR(11, 646, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "__init__") < 0)) __PYX_ERR(12, 646, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 0) { goto __pyx_L5_argtuple_error; @@ -138230,7 +129203,7 @@ static int __pyx_pw_4lxml_5etree_11TreeBuilder_1__init__(PyObject *__pyx_v_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 646, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(12, 646, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.TreeBuilder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -138245,11 +129218,9 @@ static int __pyx_pw_4lxml_5etree_11TreeBuilder_1__init__(PyObject *__pyx_v_self, static int __pyx_pf_4lxml_5etree_11TreeBuilder___init__(struct __pyx_obj_4lxml_5etree_TreeBuilder *__pyx_v_self, PyObject *__pyx_v_element_factory, PyObject *__pyx_v_parser) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[11], 646, 0, __PYX_ERR(11, 646, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":647 * @@ -138258,7 +129229,6 @@ static int __pyx_pf_4lxml_5etree_11TreeBuilder___init__(struct __pyx_obj_4lxml_5 * SAX_EVENT_START | SAX_EVENT_END | SAX_EVENT_DATA | \ * SAX_EVENT_PI | SAX_EVENT_COMMENT */ - __Pyx_TraceLine(647,0,__PYX_ERR(11, 647, __pyx_L1_error)) __pyx_v_self->__pyx_base._sax_event_filter = ((((__pyx_e_4lxml_5etree_SAX_EVENT_START | __pyx_e_4lxml_5etree_SAX_EVENT_END) | __pyx_e_4lxml_5etree_SAX_EVENT_DATA) | __pyx_e_4lxml_5etree_SAX_EVENT_PI) | __pyx_e_4lxml_5etree_SAX_EVENT_COMMENT); /* "src/lxml/saxparser.pxi":650 @@ -138268,8 +129238,7 @@ static int __pyx_pf_4lxml_5etree_11TreeBuilder___init__(struct __pyx_obj_4lxml_5 * self._element_stack = [] # element stack * self._element_stack_pop = self._element_stack.pop */ - __Pyx_TraceLine(650,0,__PYX_ERR(11, 650, __pyx_L1_error)) - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 650, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_data); @@ -138284,8 +129253,7 @@ static int __pyx_pf_4lxml_5etree_11TreeBuilder___init__(struct __pyx_obj_4lxml_5 * self._element_stack_pop = self._element_stack.pop * self._last = None # last element */ - __Pyx_TraceLine(651,0,__PYX_ERR(11, 651, __pyx_L1_error)) - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 651, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_element_stack); @@ -138300,8 +129268,7 @@ static int __pyx_pf_4lxml_5etree_11TreeBuilder___init__(struct __pyx_obj_4lxml_5 * self._last = None # last element * self._in_tail = 0 # true if we're after an end tag */ - __Pyx_TraceLine(652,0,__PYX_ERR(11, 652, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_element_stack, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 652, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_element_stack, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_element_stack_pop); @@ -138316,7 +129283,6 @@ static int __pyx_pf_4lxml_5etree_11TreeBuilder___init__(struct __pyx_obj_4lxml_5 * self._in_tail = 0 # true if we're after an end tag * self._factory = element_factory */ - __Pyx_TraceLine(653,0,__PYX_ERR(11, 653, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_last); @@ -138330,7 +129296,6 @@ static int __pyx_pf_4lxml_5etree_11TreeBuilder___init__(struct __pyx_obj_4lxml_5 * self._factory = element_factory * self._parser = parser */ - __Pyx_TraceLine(654,0,__PYX_ERR(11, 654, __pyx_L1_error)) __pyx_v_self->_in_tail = 0; /* "src/lxml/saxparser.pxi":655 @@ -138340,7 +129305,6 @@ static int __pyx_pf_4lxml_5etree_11TreeBuilder___init__(struct __pyx_obj_4lxml_5 * self._parser = parser * */ - __Pyx_TraceLine(655,0,__PYX_ERR(11, 655, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_element_factory); __Pyx_GIVEREF(__pyx_v_element_factory); __Pyx_GOTREF(__pyx_v_self->_factory); @@ -138354,8 +129318,7 @@ static int __pyx_pf_4lxml_5etree_11TreeBuilder___init__(struct __pyx_obj_4lxml_5 * * @cython.final */ - __Pyx_TraceLine(656,0,__PYX_ERR(11, 656, __pyx_L1_error)) - if (!(likely(((__pyx_v_parser) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_parser, __pyx_ptype_4lxml_5etree__BaseParser))))) __PYX_ERR(11, 656, __pyx_L1_error) + if (!(likely(((__pyx_v_parser) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_parser, __pyx_ptype_4lxml_5etree__BaseParser))))) __PYX_ERR(12, 656, __pyx_L1_error) __pyx_t_1 = __pyx_v_parser; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -138380,7 +129343,6 @@ static int __pyx_pf_4lxml_5etree_11TreeBuilder___init__(struct __pyx_obj_4lxml_5 __Pyx_AddTraceback("lxml.etree.TreeBuilder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -138396,14 +129358,12 @@ static int __pyx_pf_4lxml_5etree_11TreeBuilder___init__(struct __pyx_obj_4lxml_5 static int __pyx_f_4lxml_5etree_11TreeBuilder__flush(struct __pyx_obj_4lxml_5etree_TreeBuilder *__pyx_v_self) { PyObject *__pyx_v_text = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_flush", 0); - __Pyx_TraceCall("_flush", __pyx_f[11], 659, 0, __PYX_ERR(11, 659, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":660 * @cython.final @@ -138412,7 +129372,6 @@ static int __pyx_f_4lxml_5etree_11TreeBuilder__flush(struct __pyx_obj_4lxml_5etr * if self._last is not None: * text = u"".join(self._data) */ - __Pyx_TraceLine(660,0,__PYX_ERR(11, 660, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_data != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_data) != 0); if (__pyx_t_1) { @@ -138423,7 +129382,6 @@ static int __pyx_f_4lxml_5etree_11TreeBuilder__flush(struct __pyx_obj_4lxml_5etr * text = u"".join(self._data) * if self._in_tail: */ - __Pyx_TraceLine(661,0,__PYX_ERR(11, 661, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_self->_last) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -138435,10 +129393,9 @@ static int __pyx_f_4lxml_5etree_11TreeBuilder__flush(struct __pyx_obj_4lxml_5etr * if self._in_tail: * assert self._last.tail is None, u"internal error (tail)" */ - __Pyx_TraceLine(662,0,__PYX_ERR(11, 662, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->_data; __Pyx_INCREF(__pyx_t_3); - __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__23, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 662, __pyx_L1_error) + __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__11, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_text = ((PyObject*)__pyx_t_4); @@ -138451,7 +129408,6 @@ static int __pyx_f_4lxml_5etree_11TreeBuilder__flush(struct __pyx_obj_4lxml_5etr * assert self._last.tail is None, u"internal error (tail)" * self._last.tail = text */ - __Pyx_TraceLine(663,0,__PYX_ERR(11, 663, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_self->_in_tail != 0); if (__pyx_t_2) { @@ -138462,16 +129418,15 @@ static int __pyx_f_4lxml_5etree_11TreeBuilder__flush(struct __pyx_obj_4lxml_5etr * self._last.tail = text * else: */ - __Pyx_TraceLine(664,0,__PYX_ERR(11, 664, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_last), __pyx_n_s_tail); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 664, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_last), __pyx_n_s_tail); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = (__pyx_t_4 == Py_None); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!(__pyx_t_2 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_internal_error_tail); - __PYX_ERR(11, 664, __pyx_L1_error) + __PYX_ERR(12, 664, __pyx_L1_error) } } #endif @@ -138483,8 +129438,7 @@ static int __pyx_f_4lxml_5etree_11TreeBuilder__flush(struct __pyx_obj_4lxml_5etr * else: * assert self._last.text is None, u"internal error (text)" */ - __Pyx_TraceLine(665,0,__PYX_ERR(11, 665, __pyx_L1_error)) - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->_last), __pyx_n_s_tail, __pyx_v_text) < 0) __PYX_ERR(11, 665, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->_last), __pyx_n_s_tail, __pyx_v_text) < 0) __PYX_ERR(12, 665, __pyx_L1_error) /* "src/lxml/saxparser.pxi":663 * if self._last is not None: @@ -138503,17 +129457,16 @@ static int __pyx_f_4lxml_5etree_11TreeBuilder__flush(struct __pyx_obj_4lxml_5etr * self._last.text = text * del self._data[:] */ - __Pyx_TraceLine(667,0,__PYX_ERR(11, 667, __pyx_L1_error)) /*else*/ { #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_last), __pyx_n_s_text); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 667, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_last), __pyx_n_s_text); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = (__pyx_t_4 == Py_None); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!(__pyx_t_2 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_internal_error_text); - __PYX_ERR(11, 667, __pyx_L1_error) + __PYX_ERR(12, 667, __pyx_L1_error) } } #endif @@ -138525,8 +129478,7 @@ static int __pyx_f_4lxml_5etree_11TreeBuilder__flush(struct __pyx_obj_4lxml_5etr * del self._data[:] * return 0 */ - __Pyx_TraceLine(668,0,__PYX_ERR(11, 668, __pyx_L1_error)) - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->_last), __pyx_n_s_text, __pyx_v_text) < 0) __PYX_ERR(11, 668, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->_last), __pyx_n_s_text, __pyx_v_text) < 0) __PYX_ERR(12, 668, __pyx_L1_error) } __pyx_L5:; @@ -138546,12 +129498,11 @@ static int __pyx_f_4lxml_5etree_11TreeBuilder__flush(struct __pyx_obj_4lxml_5etr * return 0 * */ - __Pyx_TraceLine(669,0,__PYX_ERR(11, 669, __pyx_L1_error)) if (unlikely(__pyx_v_self->_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(11, 669, __pyx_L1_error) + __PYX_ERR(12, 669, __pyx_L1_error) } - if (__Pyx_PyObject_DelSlice(__pyx_v_self->_data, 0, 0, NULL, NULL, NULL, 0, 0, 1) < 0) __PYX_ERR(11, 669, __pyx_L1_error) + if (__Pyx_PyObject_DelSlice(__pyx_v_self->_data, 0, 0, NULL, NULL, NULL, 0, 0, 1) < 0) __PYX_ERR(12, 669, __pyx_L1_error) /* "src/lxml/saxparser.pxi":660 * @cython.final @@ -138569,7 +129520,6 @@ static int __pyx_f_4lxml_5etree_11TreeBuilder__flush(struct __pyx_obj_4lxml_5etr * * # internal SAX event handlers */ - __Pyx_TraceLine(670,0,__PYX_ERR(11, 670, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -138589,7 +129539,6 @@ static int __pyx_f_4lxml_5etree_11TreeBuilder__flush(struct __pyx_obj_4lxml_5etr __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_text); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -138604,7 +129553,6 @@ static int __pyx_f_4lxml_5etree_11TreeBuilder__flush(struct __pyx_obj_4lxml_5etr static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart(struct __pyx_obj_4lxml_5etree_TreeBuilder *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_attrib, PyObject *__pyx_v_nsmap) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -138615,7 +129563,6 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart(struct __pyx PyObject *__pyx_t_7 = NULL; int __pyx_t_8; __Pyx_RefNannySetupContext("_handleSaxStart", 0); - __Pyx_TraceCall("_handleSaxStart", __pyx_f[11], 675, 0, __PYX_ERR(11, 675, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":676 * @cython.final @@ -138624,8 +129571,7 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart(struct __pyx * if self._factory is not None: * self._last = self._factory(tag, attrib) */ - __Pyx_TraceLine(676,0,__PYX_ERR(11, 676, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_11TreeBuilder__flush(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(11, 676, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_11TreeBuilder__flush(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(12, 676, __pyx_L1_error) /* "src/lxml/saxparser.pxi":677 * cdef _handleSaxStart(self, tag, attrib, nsmap): @@ -138634,7 +129580,6 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart(struct __pyx * self._last = self._factory(tag, attrib) * if self._element_stack: */ - __Pyx_TraceLine(677,0,__PYX_ERR(11, 677, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_self->_factory != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -138646,7 +129591,6 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart(struct __pyx * if self._element_stack: * _appendChild(self._element_stack[-1], self._last) */ - __Pyx_TraceLine(678,0,__PYX_ERR(11, 678, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_self->_factory); __pyx_t_5 = __pyx_v_self->_factory; __pyx_t_6 = NULL; __pyx_t_1 = 0; @@ -138663,7 +129607,7 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart(struct __pyx #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_tag, __pyx_v_attrib}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 678, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 678, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -138671,13 +129615,13 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart(struct __pyx #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_tag, __pyx_v_attrib}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 678, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 678, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(11, 678, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(12, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -138688,12 +129632,12 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart(struct __pyx __Pyx_INCREF(__pyx_v_attrib); __Pyx_GIVEREF(__pyx_v_attrib); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_1, __pyx_v_attrib); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 678, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(11, 678, __pyx_L1_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(12, 678, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->_last); __Pyx_DECREF(((PyObject *)__pyx_v_self->_last)); @@ -138707,7 +129651,6 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart(struct __pyx * _appendChild(self._element_stack[-1], self._last) * elif self._element_stack: */ - __Pyx_TraceLine(679,0,__PYX_ERR(11, 679, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_self->_element_stack != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_element_stack) != 0); if (__pyx_t_3) { @@ -138718,17 +129661,16 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart(struct __pyx * elif self._element_stack: * self._last = _makeSubElement( */ - __Pyx_TraceLine(680,0,__PYX_ERR(11, 680, __pyx_L1_error)) if (unlikely(__pyx_v_self->_element_stack == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(11, 680, __pyx_L1_error) + __PYX_ERR(12, 680, __pyx_L1_error) } - __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_self->_element_stack, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 680, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_self->_element_stack, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 680, __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(11, 680, __pyx_L1_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(12, 680, __pyx_L1_error) __pyx_t_5 = ((PyObject *)__pyx_v_self->_last); __Pyx_INCREF(__pyx_t_5); - __pyx_t_1 = __pyx_f_4lxml_5etree__appendChild(((struct LxmlElement *)__pyx_t_4), ((struct LxmlElement *)__pyx_t_5)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(11, 680, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__appendChild(((struct LxmlElement *)__pyx_t_4), ((struct LxmlElement *)__pyx_t_5)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(12, 680, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -138758,7 +129700,6 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart(struct __pyx * self._last = _makeSubElement( * self._element_stack[-1], tag, None, None, attrib, nsmap, None) */ - __Pyx_TraceLine(681,0,__PYX_ERR(11, 681, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_self->_element_stack != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_element_stack) != 0); if (__pyx_t_3) { @@ -138769,14 +129710,13 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart(struct __pyx * else: * self._last = _makeElement( */ - __Pyx_TraceLine(683,0,__PYX_ERR(11, 683, __pyx_L1_error)) if (unlikely(__pyx_v_self->_element_stack == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(11, 683, __pyx_L1_error) + __PYX_ERR(12, 683, __pyx_L1_error) } - __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->_element_stack, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 683, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->_element_stack, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(11, 683, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(12, 683, __pyx_L1_error) /* "src/lxml/saxparser.pxi":682 * _appendChild(self._element_stack[-1], self._last) @@ -138785,8 +129725,7 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart(struct __pyx * self._element_stack[-1], tag, None, None, attrib, nsmap, None) * else: */ - __Pyx_TraceLine(682,0,__PYX_ERR(11, 682, __pyx_L1_error)) - __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__makeSubElement(((struct LxmlElement *)__pyx_t_5), __pyx_v_tag, Py_None, Py_None, __pyx_v_attrib, __pyx_v_nsmap, ((PyObject*)Py_None))); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 682, __pyx_L1_error) + __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__makeSubElement(((struct LxmlElement *)__pyx_t_5), __pyx_v_tag, Py_None, Py_None, __pyx_v_attrib, __pyx_v_nsmap, ((PyObject*)Py_None))); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_4); @@ -138812,7 +129751,6 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart(struct __pyx * tag, NULL, None, self._parser, None, None, attrib, nsmap, None) * self._element_stack.append(self._last) */ - __Pyx_TraceLine(685,0,__PYX_ERR(11, 685, __pyx_L1_error)) /*else*/ { /* "src/lxml/saxparser.pxi":686 @@ -138822,7 +129760,6 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart(struct __pyx * self._element_stack.append(self._last) * self._in_tail = 0 */ - __Pyx_TraceLine(686,0,__PYX_ERR(11, 686, __pyx_L1_error)) __pyx_t_4 = ((PyObject *)__pyx_v_self->_parser); __Pyx_INCREF(__pyx_t_4); @@ -138833,8 +129770,7 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart(struct __pyx * tag, NULL, None, self._parser, None, None, attrib, nsmap, None) * self._element_stack.append(self._last) */ - __Pyx_TraceLine(685,0,__PYX_ERR(11, 685, __pyx_L1_error)) - __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_5etree__makeElement(__pyx_v_tag, NULL, ((struct LxmlDocument *)Py_None), ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_4), Py_None, Py_None, __pyx_v_attrib, __pyx_v_nsmap, ((PyObject*)Py_None))); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 685, __pyx_L1_error) + __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_5etree__makeElement(__pyx_v_tag, NULL, ((struct LxmlDocument *)Py_None), ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_4), Py_None, Py_None, __pyx_v_attrib, __pyx_v_nsmap, ((PyObject*)Py_None))); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GIVEREF(__pyx_t_5); @@ -138852,14 +129788,13 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart(struct __pyx * self._in_tail = 0 * return self._last */ - __Pyx_TraceLine(687,0,__PYX_ERR(11, 687, __pyx_L1_error)) if (unlikely(__pyx_v_self->_element_stack == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(11, 687, __pyx_L1_error) + __PYX_ERR(12, 687, __pyx_L1_error) } __pyx_t_5 = ((PyObject *)__pyx_v_self->_last); __Pyx_INCREF(__pyx_t_5); - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_self->_element_stack, __pyx_t_5); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(11, 687, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_self->_element_stack, __pyx_t_5); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(12, 687, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "src/lxml/saxparser.pxi":688 @@ -138869,7 +129804,6 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart(struct __pyx * return self._last * */ - __Pyx_TraceLine(688,0,__PYX_ERR(11, 688, __pyx_L1_error)) __pyx_v_self->_in_tail = 0; /* "src/lxml/saxparser.pxi":689 @@ -138879,7 +129813,6 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart(struct __pyx * * @cython.final */ - __Pyx_TraceLine(689,0,__PYX_ERR(11, 689, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->_last)); __pyx_r = ((PyObject *)__pyx_v_self->_last); @@ -138903,7 +129836,6 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart(struct __pyx __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -138918,14 +129850,12 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart(struct __pyx static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxEnd(struct __pyx_obj_4lxml_5etree_TreeBuilder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_tag) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_handleSaxEnd", 0); - __Pyx_TraceCall("_handleSaxEnd", __pyx_f[11], 692, 0, __PYX_ERR(11, 692, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":693 * @cython.final @@ -138934,8 +129864,7 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxEnd(struct __pyx_o * self._last = self._element_stack_pop() * self._in_tail = 1 */ - __Pyx_TraceLine(693,0,__PYX_ERR(11, 693, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_11TreeBuilder__flush(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(11, 693, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_11TreeBuilder__flush(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(12, 693, __pyx_L1_error) /* "src/lxml/saxparser.pxi":694 * cdef _handleSaxEnd(self, tag): @@ -138944,7 +129873,6 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxEnd(struct __pyx_o * self._in_tail = 1 * return self._last */ - __Pyx_TraceLine(694,0,__PYX_ERR(11, 694, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_self->_element_stack_pop); __pyx_t_3 = __pyx_v_self->_element_stack_pop; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -138956,15 +129884,12 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxEnd(struct __pyx_o __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 694, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 694, __pyx_L1_error) - } + __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(12, 694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(11, 694, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(12, 694, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->_last); __Pyx_DECREF(((PyObject *)__pyx_v_self->_last)); @@ -138978,7 +129903,6 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxEnd(struct __pyx_o * return self._last * */ - __Pyx_TraceLine(695,0,__PYX_ERR(11, 695, __pyx_L1_error)) __pyx_v_self->_in_tail = 1; /* "src/lxml/saxparser.pxi":696 @@ -138988,7 +129912,6 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxEnd(struct __pyx_o * * @cython.final */ - __Pyx_TraceLine(696,0,__PYX_ERR(11, 696, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->_last)); __pyx_r = ((PyObject *)__pyx_v_self->_last); @@ -139011,7 +129934,6 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxEnd(struct __pyx_o __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -139026,11 +129948,9 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxEnd(struct __pyx_o static int __pyx_f_4lxml_5etree_11TreeBuilder__handleSaxData(struct __pyx_obj_4lxml_5etree_TreeBuilder *__pyx_v_self, PyObject *__pyx_v_data) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_handleSaxData", 0); - __Pyx_TraceCall("_handleSaxData", __pyx_f[11], 699, 0, __PYX_ERR(11, 699, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":700 * @cython.final @@ -139039,12 +129959,11 @@ static int __pyx_f_4lxml_5etree_11TreeBuilder__handleSaxData(struct __pyx_obj_4l * * @cython.final */ - __Pyx_TraceLine(700,0,__PYX_ERR(11, 700, __pyx_L1_error)) if (unlikely(__pyx_v_self->_data == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(11, 700, __pyx_L1_error) + __PYX_ERR(12, 700, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyList_Append(__pyx_v_self->_data, __pyx_v_data); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(11, 700, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyList_Append(__pyx_v_self->_data, __pyx_v_data); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(12, 700, __pyx_L1_error) /* "src/lxml/saxparser.pxi":699 * @@ -139061,7 +129980,6 @@ static int __pyx_f_4lxml_5etree_11TreeBuilder__handleSaxData(struct __pyx_obj_4l __Pyx_AddTraceback("lxml.etree.TreeBuilder._handleSaxData", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -139076,7 +129994,6 @@ static int __pyx_f_4lxml_5etree_11TreeBuilder__handleSaxData(struct __pyx_obj_4l static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxPi(struct __pyx_obj_4lxml_5etree_TreeBuilder *__pyx_v_self, PyObject *__pyx_v_target, PyObject *__pyx_v_data) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -139085,7 +130002,6 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxPi(struct __pyx_ob PyObject *__pyx_t_5 = NULL; int __pyx_t_6; __Pyx_RefNannySetupContext("_handleSaxPi", 0); - __Pyx_TraceCall("_handleSaxPi", __pyx_f[11], 703, 0, __PYX_ERR(11, 703, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":704 * @cython.final @@ -139094,8 +130010,7 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxPi(struct __pyx_ob * self._last = ProcessingInstruction(target, data) * if self._element_stack: */ - __Pyx_TraceLine(704,0,__PYX_ERR(11, 704, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_11TreeBuilder__flush(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(11, 704, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_11TreeBuilder__flush(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(12, 704, __pyx_L1_error) /* "src/lxml/saxparser.pxi":705 * cdef _handleSaxPi(self, target, data): @@ -139104,8 +130019,7 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxPi(struct __pyx_ob * if self._element_stack: * _appendChild(self._element_stack[-1], self._last) */ - __Pyx_TraceLine(705,0,__PYX_ERR(11, 705, __pyx_L1_error)) - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ProcessingInstruction); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 705, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ProcessingInstruction); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_1 = 0; @@ -139122,7 +130036,7 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxPi(struct __pyx_ob #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_target, __pyx_v_data}; - __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(11, 705, __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(12, 705, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -139130,13 +130044,13 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxPi(struct __pyx_ob #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_target, __pyx_v_data}; - __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(11, 705, __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(12, 705, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_5 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 705, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -139147,12 +130061,12 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxPi(struct __pyx_ob __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_1, __pyx_v_data); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 705, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(11, 705, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(12, 705, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->_last); __Pyx_DECREF(((PyObject *)__pyx_v_self->_last)); @@ -139166,7 +130080,6 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxPi(struct __pyx_ob * _appendChild(self._element_stack[-1], self._last) * self._in_tail = 1 */ - __Pyx_TraceLine(706,0,__PYX_ERR(11, 706, __pyx_L1_error)) __pyx_t_6 = (__pyx_v_self->_element_stack != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_element_stack) != 0); if (__pyx_t_6) { @@ -139177,17 +130090,16 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxPi(struct __pyx_ob * self._in_tail = 1 * return self._last */ - __Pyx_TraceLine(707,0,__PYX_ERR(11, 707, __pyx_L1_error)) if (unlikely(__pyx_v_self->_element_stack == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(11, 707, __pyx_L1_error) + __PYX_ERR(12, 707, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->_element_stack, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 707, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->_element_stack, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(11, 707, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(12, 707, __pyx_L1_error) __pyx_t_3 = ((PyObject *)__pyx_v_self->_last); __Pyx_INCREF(__pyx_t_3); - __pyx_t_1 = __pyx_f_4lxml_5etree__appendChild(((struct LxmlElement *)__pyx_t_2), ((struct LxmlElement *)__pyx_t_3)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(11, 707, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__appendChild(((struct LxmlElement *)__pyx_t_2), ((struct LxmlElement *)__pyx_t_3)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(12, 707, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -139207,7 +130119,6 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxPi(struct __pyx_ob * return self._last * */ - __Pyx_TraceLine(708,0,__PYX_ERR(11, 708, __pyx_L1_error)) __pyx_v_self->_in_tail = 1; /* "src/lxml/saxparser.pxi":709 @@ -139217,7 +130128,6 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxPi(struct __pyx_ob * * @cython.final */ - __Pyx_TraceLine(709,0,__PYX_ERR(11, 709, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->_last)); __pyx_r = ((PyObject *)__pyx_v_self->_last); @@ -139241,7 +130151,6 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxPi(struct __pyx_ob __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -139256,16 +130165,13 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxPi(struct __pyx_ob static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxComment(struct __pyx_obj_4lxml_5etree_TreeBuilder *__pyx_v_self, PyObject *__pyx_v_comment) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; + int __pyx_t_5; __Pyx_RefNannySetupContext("_handleSaxComment", 0); - __Pyx_TraceCall("_handleSaxComment", __pyx_f[11], 712, 0, __PYX_ERR(11, 712, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":713 * @cython.final @@ -139274,8 +130180,7 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxComment(struct __p * self._last = Comment(comment) * if self._element_stack: */ - __Pyx_TraceLine(713,0,__PYX_ERR(11, 713, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_11TreeBuilder__flush(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(11, 713, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_11TreeBuilder__flush(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(12, 713, __pyx_L1_error) /* "src/lxml/saxparser.pxi":714 * cdef _handleSaxComment(self, comment): @@ -139284,8 +130189,7 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxComment(struct __p * if self._element_stack: * _appendChild(self._element_stack[-1], self._last) */ - __Pyx_TraceLine(714,0,__PYX_ERR(11, 714, __pyx_L1_error)) - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Comment); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 714, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Comment); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 714, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -139297,40 +130201,12 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxComment(struct __p __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_comment); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 714, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_comment}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 714, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_comment}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 714, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 714, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(__pyx_v_comment); - __Pyx_GIVEREF(__pyx_v_comment); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_comment); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 714, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - } + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_comment) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_comment); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 714, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(11, 714, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(12, 714, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->_last); __Pyx_DECREF(((PyObject *)__pyx_v_self->_last)); @@ -139344,9 +130220,8 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxComment(struct __p * _appendChild(self._element_stack[-1], self._last) * self._in_tail = 1 */ - __Pyx_TraceLine(715,0,__PYX_ERR(11, 715, __pyx_L1_error)) - __pyx_t_6 = (__pyx_v_self->_element_stack != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_element_stack) != 0); - if (__pyx_t_6) { + __pyx_t_5 = (__pyx_v_self->_element_stack != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_element_stack) != 0); + if (__pyx_t_5) { /* "src/lxml/saxparser.pxi":716 * self._last = Comment(comment) @@ -139355,17 +130230,16 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxComment(struct __p * self._in_tail = 1 * return self._last */ - __Pyx_TraceLine(716,0,__PYX_ERR(11, 716, __pyx_L1_error)) if (unlikely(__pyx_v_self->_element_stack == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(11, 716, __pyx_L1_error) + __PYX_ERR(12, 716, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->_element_stack, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 716, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->_element_stack, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(11, 716, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(12, 716, __pyx_L1_error) __pyx_t_3 = ((PyObject *)__pyx_v_self->_last); __Pyx_INCREF(__pyx_t_3); - __pyx_t_1 = __pyx_f_4lxml_5etree__appendChild(((struct LxmlElement *)__pyx_t_2), ((struct LxmlElement *)__pyx_t_3)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(11, 716, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__appendChild(((struct LxmlElement *)__pyx_t_2), ((struct LxmlElement *)__pyx_t_3)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(12, 716, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -139385,7 +130259,6 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxComment(struct __p * return self._last * */ - __Pyx_TraceLine(717,0,__PYX_ERR(11, 717, __pyx_L1_error)) __pyx_v_self->_in_tail = 1; /* "src/lxml/saxparser.pxi":718 @@ -139395,7 +130268,6 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxComment(struct __p * * # Python level event handlers */ - __Pyx_TraceLine(718,0,__PYX_ERR(11, 718, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->_last)); __pyx_r = ((PyObject *)__pyx_v_self->_last); @@ -139414,12 +130286,10 @@ static PyObject *__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxComment(struct __p __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("lxml.etree.TreeBuilder._handleSaxComment", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -139449,12 +130319,9 @@ static PyObject *__pyx_pw_4lxml_5etree_11TreeBuilder_3close(PyObject *__pyx_v_se static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_2close(struct __pyx_obj_4lxml_5etree_TreeBuilder *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; - __Pyx_TraceFrameInit(__pyx_codeobj__248) __Pyx_RefNannySetupContext("close", 0); - __Pyx_TraceCall("close", __pyx_f[11], 722, 0, __PYX_ERR(11, 722, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":728 * element. @@ -139463,13 +130330,12 @@ static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_2close(struct __pyx_obj_4lx * assert self._last is not None, u"missing toplevel element" * return self._last */ - __Pyx_TraceLine(728,0,__PYX_ERR(11, 728, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_1 = (__pyx_v_self->_element_stack != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_element_stack) != 0); if (unlikely(!((!__pyx_t_1) != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_missing_end_tags); - __PYX_ERR(11, 728, __pyx_L1_error) + __PYX_ERR(12, 728, __pyx_L1_error) } } #endif @@ -139481,13 +130347,12 @@ static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_2close(struct __pyx_obj_4lx * return self._last * */ - __Pyx_TraceLine(729,0,__PYX_ERR(11, 729, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_1 = (((PyObject *)__pyx_v_self->_last) != Py_None); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_missing_toplevel_element); - __PYX_ERR(11, 729, __pyx_L1_error) + __PYX_ERR(12, 729, __pyx_L1_error) } } #endif @@ -139499,7 +130364,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_2close(struct __pyx_obj_4lx * * def data(self, data): */ - __Pyx_TraceLine(730,0,__PYX_ERR(11, 730, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->_last)); __pyx_r = ((PyObject *)__pyx_v_self->_last); @@ -139519,7 +130383,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_2close(struct __pyx_obj_4lx __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -139549,12 +130412,9 @@ static PyObject *__pyx_pw_4lxml_5etree_11TreeBuilder_5data(PyObject *__pyx_v_sel static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_4data(struct __pyx_obj_4lxml_5etree_TreeBuilder *__pyx_v_self, PyObject *__pyx_v_data) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; - __Pyx_TraceFrameInit(__pyx_codeobj__249) __Pyx_RefNannySetupContext("data", 0); - __Pyx_TraceCall("data", __pyx_f[11], 732, 0, __PYX_ERR(11, 732, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":738 * 8-bit string containing ASCII text, or a Unicode string. @@ -139563,8 +130423,7 @@ static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_4data(struct __pyx_obj_4lxm * * def start(self, tag, attrs, nsmap=None): */ - __Pyx_TraceLine(738,0,__PYX_ERR(11, 738, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_11TreeBuilder__handleSaxData(((struct __pyx_obj_4lxml_5etree__SaxParserTarget *)__pyx_v_self), __pyx_v_data); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(11, 738, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_11TreeBuilder__handleSaxData(((struct __pyx_obj_4lxml_5etree__SaxParserTarget *)__pyx_v_self), __pyx_v_data); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(12, 738, __pyx_L1_error) /* "src/lxml/saxparser.pxi":732 * return self._last @@ -139582,7 +130441,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_4data(struct __pyx_obj_4lxm __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -139598,7 +130456,7 @@ static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_4data(struct __pyx_obj_4lxm /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_11TreeBuilder_7start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_11TreeBuilder_6start[] = "start(self, tag, attrs, nsmap=None)\n\n Opens a new element.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_11TreeBuilder_7start = {"start", (PyCFunction)__pyx_pw_4lxml_5etree_11TreeBuilder_7start, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_11TreeBuilder_6start}; +static PyMethodDef __pyx_mdef_4lxml_5etree_11TreeBuilder_7start = {"start", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_11TreeBuilder_7start, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_11TreeBuilder_6start}; static PyObject *__pyx_pw_4lxml_5etree_11TreeBuilder_7start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tag = 0; PyObject *__pyx_v_attrs = 0; @@ -139632,7 +130490,7 @@ static PyObject *__pyx_pw_4lxml_5etree_11TreeBuilder_7start(PyObject *__pyx_v_se case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attrs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("start", 0, 2, 3, 1); __PYX_ERR(11, 740, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("start", 0, 2, 3, 1); __PYX_ERR(12, 740, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -139642,7 +130500,7 @@ static PyObject *__pyx_pw_4lxml_5etree_11TreeBuilder_7start(PyObject *__pyx_v_se } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "start") < 0)) __PYX_ERR(11, 740, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "start") < 0)) __PYX_ERR(12, 740, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -139660,7 +130518,7 @@ static PyObject *__pyx_pw_4lxml_5etree_11TreeBuilder_7start(PyObject *__pyx_v_se } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("start", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 740, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("start", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(12, 740, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.TreeBuilder.start", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -139675,14 +130533,11 @@ static PyObject *__pyx_pw_4lxml_5etree_11TreeBuilder_7start(PyObject *__pyx_v_se static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_6start(struct __pyx_obj_4lxml_5etree_TreeBuilder *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_attrs, PyObject *__pyx_v_nsmap) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__250) __Pyx_RefNannySetupContext("start", 0); - __Pyx_TraceCall("start", __pyx_f[11], 740, 0, __PYX_ERR(11, 740, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_nsmap); /* "src/lxml/saxparser.pxi":745 @@ -139692,7 +130547,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_6start(struct __pyx_obj_4lx * nsmap = IMMUTABLE_EMPTY_MAPPING * return self._handleSaxStart(tag, attrs, nsmap) */ - __Pyx_TraceLine(745,0,__PYX_ERR(11, 745, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_nsmap == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -139704,7 +130558,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_6start(struct __pyx_obj_4lx * return self._handleSaxStart(tag, attrs, nsmap) * */ - __Pyx_TraceLine(746,0,__PYX_ERR(11, 746, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_4lxml_5etree_IMMUTABLE_EMPTY_MAPPING); __Pyx_DECREF_SET(__pyx_v_nsmap, __pyx_v_4lxml_5etree_IMMUTABLE_EMPTY_MAPPING); @@ -139724,9 +130577,8 @@ static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_6start(struct __pyx_obj_4lx * * def end(self, tag): */ - __Pyx_TraceLine(747,0,__PYX_ERR(11, 747, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart(((struct __pyx_obj_4lxml_5etree__SaxParserTarget *)__pyx_v_self), __pyx_v_tag, __pyx_v_attrs, __pyx_v_nsmap); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 747, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart(((struct __pyx_obj_4lxml_5etree__SaxParserTarget *)__pyx_v_self), __pyx_v_tag, __pyx_v_attrs, __pyx_v_nsmap); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -139748,7 +130600,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_6start(struct __pyx_obj_4lx __pyx_L0:; __Pyx_XDECREF(__pyx_v_nsmap); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -139779,7 +130630,6 @@ static PyObject *__pyx_pw_4lxml_5etree_11TreeBuilder_9end(PyObject *__pyx_v_self static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_8end(struct __pyx_obj_4lxml_5etree_TreeBuilder *__pyx_v_self, PyObject *__pyx_v_tag) { PyObject *__pyx_v_element = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -139787,9 +130637,7 @@ static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_8end(struct __pyx_obj_4lxml Py_ssize_t __pyx_t_4; Py_UCS4 __pyx_t_5; PyObject *__pyx_t_6 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__251) __Pyx_RefNannySetupContext("end", 0); - __Pyx_TraceCall("end", __pyx_f[11], 749, 0, __PYX_ERR(11, 749, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":754 * Closes the current element. @@ -139798,8 +130646,7 @@ static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_8end(struct __pyx_obj_4lxml * assert self._last.tag == tag,\ * f"end tag mismatch (expected {self._last.tag}, got {tag})" */ - __Pyx_TraceLine(754,0,__PYX_ERR(11, 754, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_11TreeBuilder__handleSaxEnd(((struct __pyx_obj_4lxml_5etree__SaxParserTarget *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 754, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_11TreeBuilder__handleSaxEnd(((struct __pyx_obj_4lxml_5etree__SaxParserTarget *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_element = __pyx_t_1; __pyx_t_1 = 0; @@ -139811,14 +130658,13 @@ static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_8end(struct __pyx_obj_4lxml * f"end tag mismatch (expected {self._last.tag}, got {tag})" * return element */ - __Pyx_TraceLine(755,0,__PYX_ERR(11, 755, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_last), __pyx_n_s_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 755, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_last), __pyx_n_s_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 755, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_tag, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 755, __pyx_L1_error) + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_tag, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 755, __pyx_L1_error) __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(11, 755, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(12, 755, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) { @@ -139829,8 +130675,7 @@ static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_8end(struct __pyx_obj_4lxml * return element * */ - __Pyx_TraceLine(756,0,__PYX_ERR(11, 756, __pyx_L1_error)) - __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 756, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 756, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = 127; @@ -139838,9 +130683,9 @@ static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_8end(struct __pyx_obj_4lxml __pyx_t_4 += 27; __Pyx_GIVEREF(__pyx_kp_u_end_tag_mismatch_expected); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_end_tag_mismatch_expected); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_last), __pyx_n_s_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 756, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_last), __pyx_n_s_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 756, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(11, 756, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(12, 756, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __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; @@ -139852,23 +130697,23 @@ static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_8end(struct __pyx_obj_4lxml __pyx_t_4 += 6; __Pyx_GIVEREF(__pyx_kp_u_got); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_got); - __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_tag, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(11, 756, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_tag, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(12, 756, __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); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_6); __pyx_t_6 = 0; - __Pyx_INCREF(__pyx_kp_u__252); + __Pyx_INCREF(__pyx_kp_u__55); __pyx_t_4 += 1; - __Pyx_GIVEREF(__pyx_kp_u__252); - PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__252); - __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_2, 5, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(11, 756, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__55); + PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__55); + __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_2, 5, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(12, 756, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyErr_SetObject(PyExc_AssertionError, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(11, 755, __pyx_L1_error) + __PYX_ERR(12, 755, __pyx_L1_error) } } #endif @@ -139880,7 +130725,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_8end(struct __pyx_obj_4lxml * * def pi(self, target, data): */ - __Pyx_TraceLine(757,0,__PYX_ERR(11, 757, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_element); __pyx_r = __pyx_v_element; @@ -139904,7 +130748,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_8end(struct __pyx_obj_4lxml __pyx_L0:; __Pyx_XDECREF(__pyx_v_element); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -139920,7 +130763,7 @@ static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_8end(struct __pyx_obj_4lxml /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_11TreeBuilder_11pi(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_11TreeBuilder_10pi[] = "pi(self, target, data)\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_11TreeBuilder_11pi = {"pi", (PyCFunction)__pyx_pw_4lxml_5etree_11TreeBuilder_11pi, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_11TreeBuilder_10pi}; +static PyMethodDef __pyx_mdef_4lxml_5etree_11TreeBuilder_11pi = {"pi", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_11TreeBuilder_11pi, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_11TreeBuilder_10pi}; static PyObject *__pyx_pw_4lxml_5etree_11TreeBuilder_11pi(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_target = 0; PyObject *__pyx_v_data = 0; @@ -139950,11 +130793,11 @@ static PyObject *__pyx_pw_4lxml_5etree_11TreeBuilder_11pi(PyObject *__pyx_v_self case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("pi", 1, 2, 2, 1); __PYX_ERR(11, 759, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("pi", 1, 2, 2, 1); __PYX_ERR(12, 759, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pi") < 0)) __PYX_ERR(11, 759, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pi") < 0)) __PYX_ERR(12, 759, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -139967,7 +130810,7 @@ static PyObject *__pyx_pw_4lxml_5etree_11TreeBuilder_11pi(PyObject *__pyx_v_self } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("pi", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 759, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("pi", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(12, 759, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.TreeBuilder.pi", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -139982,12 +130825,9 @@ static PyObject *__pyx_pw_4lxml_5etree_11TreeBuilder_11pi(PyObject *__pyx_v_self static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_10pi(struct __pyx_obj_4lxml_5etree_TreeBuilder *__pyx_v_self, PyObject *__pyx_v_target, PyObject *__pyx_v_data) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__253) __Pyx_RefNannySetupContext("pi", 0); - __Pyx_TraceCall("pi", __pyx_f[11], 759, 0, __PYX_ERR(11, 759, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":762 * u"""pi(self, target, data) @@ -139996,9 +130836,8 @@ static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_10pi(struct __pyx_obj_4lxml * * def comment(self, comment): */ - __Pyx_TraceLine(762,0,__PYX_ERR(11, 762, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree_11TreeBuilder__handleSaxPi(((struct __pyx_obj_4lxml_5etree__SaxParserTarget *)__pyx_v_self), __pyx_v_target, __pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 762, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_11TreeBuilder__handleSaxPi(((struct __pyx_obj_4lxml_5etree__SaxParserTarget *)__pyx_v_self), __pyx_v_target, __pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -140019,7 +130858,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_10pi(struct __pyx_obj_4lxml __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -140049,21 +130887,17 @@ static PyObject *__pyx_pw_4lxml_5etree_11TreeBuilder_13comment(PyObject *__pyx_v static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_12comment(struct __pyx_obj_4lxml_5etree_TreeBuilder *__pyx_v_self, PyObject *__pyx_v_comment) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__254) __Pyx_RefNannySetupContext("comment", 0); - __Pyx_TraceCall("comment", __pyx_f[11], 764, 0, __PYX_ERR(11, 764, __pyx_L1_error)); /* "src/lxml/saxparser.pxi":767 * u"""comment(self, comment) * """ * return self._handleSaxComment(comment) # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(767,0,__PYX_ERR(11, 767, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree_11TreeBuilder__handleSaxComment(((struct __pyx_obj_4lxml_5etree__SaxParserTarget *)__pyx_v_self), __pyx_v_comment); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 767, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_11TreeBuilder__handleSaxComment(((struct __pyx_obj_4lxml_5etree__SaxParserTarget *)__pyx_v_self), __pyx_v_comment); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 767, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -140084,7 +130918,6 @@ static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_12comment(struct __pyx_obj_ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -140099,7 +130932,7 @@ static PyObject *__pyx_pf_4lxml_5etree_11TreeBuilder_12comment(struct __pyx_obj_ /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_19_TargetParserResult_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_5etree_19_TargetParserResult_1__init__ = {"__init__", (PyCFunction)__pyx_pw_4lxml_5etree_19_TargetParserResult_1__init__, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_5etree_19_TargetParserResult_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_19_TargetParserResult_1__init__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_5etree_19_TargetParserResult_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_result = 0; @@ -140129,11 +130962,11 @@ static PyObject *__pyx_pw_4lxml_5etree_19_TargetParserResult_1__init__(PyObject case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(12, 14, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(13, 14, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(12, 14, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(13, 14, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -140146,7 +130979,7 @@ static PyObject *__pyx_pw_4lxml_5etree_19_TargetParserResult_1__init__(PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(12, 14, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 14, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._TargetParserResult.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -140161,11 +130994,8 @@ static PyObject *__pyx_pw_4lxml_5etree_19_TargetParserResult_1__init__(PyObject static PyObject *__pyx_pf_4lxml_5etree_19_TargetParserResult___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_result) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - __Pyx_TraceFrameInit(__pyx_codeobj__255) __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[12], 14, 0, __PYX_ERR(12, 14, __pyx_L1_error)); /* "src/lxml/parsertarget.pxi":15 * # machinery towards the API level functions @@ -140174,8 +131004,7 @@ static PyObject *__pyx_pf_4lxml_5etree_19_TargetParserResult___init__(CYTHON_UNU * * */ - __Pyx_TraceLine(15,0,__PYX_ERR(12, 15, __pyx_L1_error)) - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_result, __pyx_v_result) < 0) __PYX_ERR(12, 15, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_result, __pyx_v_result) < 0) __PYX_ERR(13, 15, __pyx_L1_error) /* "src/lxml/parsertarget.pxi":14 * # to push the Python level parser result through the parser @@ -140193,7 +131022,6 @@ static PyObject *__pyx_pf_4lxml_5etree_19_TargetParserResult___init__(CYTHON_UNU __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -140232,7 +131060,7 @@ static int __pyx_pw_4lxml_5etree_22_PythonSaxParserTarget_1__cinit__(PyObject *_ 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(12, 29, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(13, 29, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -140243,7 +131071,7 @@ static int __pyx_pw_4lxml_5etree_22_PythonSaxParserTarget_1__cinit__(PyObject *_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(12, 29, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 29, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._PythonSaxParserTarget.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -140260,7 +131088,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx int __pyx_v_event_filter; PyObject *__pyx_v_arguments = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -140273,12 +131100,10 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; - PyObject *__pyx_t_12 = NULL; - Py_ssize_t __pyx_t_13; + Py_ssize_t __pyx_t_12; + int __pyx_t_13; int __pyx_t_14; - int __pyx_t_15; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[12], 29, 0, __PYX_ERR(12, 29, __pyx_L1_error)); /* "src/lxml/parsertarget.pxi":31 * def __cinit__(self, target): @@ -140287,7 +131112,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * self._start_takes_nsmap = 0 * try: */ - __Pyx_TraceLine(31,0,__PYX_ERR(12, 31, __pyx_L1_error)) __pyx_v_event_filter = 0; /* "src/lxml/parsertarget.pxi":32 @@ -140297,7 +131121,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * try: * self._target_start = target.start */ - __Pyx_TraceLine(32,0,__PYX_ERR(12, 32, __pyx_L1_error)) __pyx_v_self->_start_takes_nsmap = 0; /* "src/lxml/parsertarget.pxi":33 @@ -140307,7 +131130,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * self._target_start = target.start * if self._target_start is not None: */ - __Pyx_TraceLine(33,0,__PYX_ERR(12, 33, __pyx_L3_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -140324,8 +131146,7 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * if self._target_start is not None: * event_filter |= SAX_EVENT_START */ - __Pyx_TraceLine(34,0,__PYX_ERR(12, 34, __pyx_L3_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 34, __pyx_L3_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 34, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->_target_start); @@ -140340,7 +131161,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * event_filter |= SAX_EVENT_START * except AttributeError: */ - __Pyx_TraceLine(35,0,__PYX_ERR(12, 35, __pyx_L3_error)) __pyx_t_5 = (__pyx_v_self->_target_start != Py_None); __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { @@ -140352,7 +131172,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * except AttributeError: * pass */ - __Pyx_TraceLine(36,0,__PYX_ERR(12, 36, __pyx_L3_error)) __pyx_v_event_filter = (__pyx_v_event_filter | __pyx_e_4lxml_5etree_SAX_EVENT_START); /* "src/lxml/parsertarget.pxi":35 @@ -140380,7 +131199,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * arguments = inspect_getargspec(self._target_start) * if len(arguments[0]) > 3 or arguments[1] is not None: */ - __Pyx_TraceLine(40,0,__PYX_ERR(12, 40, __pyx_L5_except_error)) /*else:*/ { { __Pyx_PyThreadState_declare @@ -140398,7 +131216,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * if len(arguments[0]) > 3 or arguments[1] is not None: * self._start_takes_nsmap = 1 */ - __Pyx_TraceLine(41,0,__PYX_ERR(12, 41, __pyx_L10_error)) __Pyx_INCREF(__pyx_v_4lxml_5etree_inspect_getargspec); __pyx_t_10 = __pyx_v_4lxml_5etree_inspect_getargspec; __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { @@ -140410,38 +131227,10 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx __Pyx_DECREF_SET(__pyx_t_10, function); } } - if (!__pyx_t_11) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_self->_target_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 41, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_4); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_10)) { - PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_self->_target_start}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 41, __pyx_L10_error) - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { - PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_self->_target_start}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 41, __pyx_L10_error) - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - { - __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(12, 41, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL; - __Pyx_INCREF(__pyx_v_self->_target_start); - __Pyx_GIVEREF(__pyx_v_self->_target_start); - PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_self->_target_start); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 41, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } - } + __pyx_t_4 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_11, __pyx_v_self->_target_start) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_self->_target_start); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 41, __pyx_L10_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_arguments = __pyx_t_4; __pyx_t_4 = 0; @@ -140453,23 +131242,22 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * self._start_takes_nsmap = 1 * except TypeError: */ - __Pyx_TraceLine(42,0,__PYX_ERR(12, 42, __pyx_L10_error)) - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_arguments, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 42, __pyx_L10_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_arguments, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 42, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_13 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(12, 42, __pyx_L10_error) + __pyx_t_12 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(13, 42, __pyx_L10_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = ((__pyx_t_13 > 3) != 0); + __pyx_t_5 = ((__pyx_t_12 > 3) != 0); if (!__pyx_t_5) { } else { __pyx_t_6 = __pyx_t_5; goto __pyx_L17_bool_binop_done; } - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_arguments, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 42, __pyx_L10_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_arguments, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 42, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = (__pyx_t_4 != Py_None); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_14 = (__pyx_t_5 != 0); - __pyx_t_6 = __pyx_t_14; + __pyx_t_13 = (__pyx_t_5 != 0); + __pyx_t_6 = __pyx_t_13; __pyx_L17_bool_binop_done:; if (__pyx_t_6) { @@ -140480,7 +131268,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * except TypeError: * pass */ - __Pyx_TraceLine(43,0,__PYX_ERR(12, 43, __pyx_L10_error)) __pyx_v_self->_start_takes_nsmap = 1; /* "src/lxml/parsertarget.pxi":42 @@ -140506,7 +131293,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx goto __pyx_L15_try_end; __pyx_L10_error:; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -140517,9 +131303,8 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * pass * try: */ - __Pyx_TraceLine(44,0,__PYX_ERR(12, 44, __pyx_L12_except_error)) - __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError); - if (__pyx_t_15) { + __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError); + if (__pyx_t_14) { __Pyx_ErrRestore(0,0,0); goto __pyx_L11_exception_handled; } @@ -140560,9 +131345,8 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * pass * else: */ - __Pyx_TraceLine(37,0,__PYX_ERR(12, 37, __pyx_L5_except_error)) - __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); - if (__pyx_t_15) { + __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); + if (__pyx_t_14) { __Pyx_ErrRestore(0,0,0); goto __pyx_L4_exception_handled; } @@ -140596,7 +131380,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * self._target_end = target.end * if self._target_end is not None: */ - __Pyx_TraceLine(46,0,__PYX_ERR(12, 46, __pyx_L19_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -140613,8 +131396,7 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * if self._target_end is not None: * event_filter |= SAX_EVENT_END */ - __Pyx_TraceLine(47,0,__PYX_ERR(12, 47, __pyx_L19_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_end); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 47, __pyx_L19_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_end); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 47, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->_target_end); @@ -140629,10 +131411,9 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * event_filter |= SAX_EVENT_END * except AttributeError: */ - __Pyx_TraceLine(48,0,__PYX_ERR(12, 48, __pyx_L19_error)) __pyx_t_6 = (__pyx_v_self->_target_end != Py_None); - __pyx_t_14 = (__pyx_t_6 != 0); - if (__pyx_t_14) { + __pyx_t_13 = (__pyx_t_6 != 0); + if (__pyx_t_13) { /* "src/lxml/parsertarget.pxi":49 * self._target_end = target.end @@ -140641,7 +131422,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * except AttributeError: * pass */ - __Pyx_TraceLine(49,0,__PYX_ERR(12, 49, __pyx_L19_error)) __pyx_v_event_filter = (__pyx_v_event_filter | __pyx_e_4lxml_5etree_SAX_EVENT_END); /* "src/lxml/parsertarget.pxi":48 @@ -140667,7 +131447,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx goto __pyx_L24_try_end; __pyx_L19_error:; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -140678,9 +131457,8 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * pass * try: */ - __Pyx_TraceLine(50,0,__PYX_ERR(12, 50, __pyx_L21_except_error)) - __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); - if (__pyx_t_15) { + __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); + if (__pyx_t_14) { __Pyx_ErrRestore(0,0,0); goto __pyx_L20_exception_handled; } @@ -140714,7 +131492,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * self._target_data = target.data * if self._target_data is not None: */ - __Pyx_TraceLine(52,0,__PYX_ERR(12, 52, __pyx_L26_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -140731,8 +131508,7 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * if self._target_data is not None: * event_filter |= SAX_EVENT_DATA */ - __Pyx_TraceLine(53,0,__PYX_ERR(12, 53, __pyx_L26_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 53, __pyx_L26_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 53, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->_target_data); @@ -140747,9 +131523,8 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * event_filter |= SAX_EVENT_DATA * except AttributeError: */ - __Pyx_TraceLine(54,0,__PYX_ERR(12, 54, __pyx_L26_error)) - __pyx_t_14 = (__pyx_v_self->_target_data != Py_None); - __pyx_t_6 = (__pyx_t_14 != 0); + __pyx_t_13 = (__pyx_v_self->_target_data != Py_None); + __pyx_t_6 = (__pyx_t_13 != 0); if (__pyx_t_6) { /* "src/lxml/parsertarget.pxi":55 @@ -140759,7 +131534,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * except AttributeError: * pass */ - __Pyx_TraceLine(55,0,__PYX_ERR(12, 55, __pyx_L26_error)) __pyx_v_event_filter = (__pyx_v_event_filter | __pyx_e_4lxml_5etree_SAX_EVENT_DATA); /* "src/lxml/parsertarget.pxi":54 @@ -140785,7 +131559,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx goto __pyx_L31_try_end; __pyx_L26_error:; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -140796,9 +131569,8 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * pass * try: */ - __Pyx_TraceLine(56,0,__PYX_ERR(12, 56, __pyx_L28_except_error)) - __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); - if (__pyx_t_15) { + __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); + if (__pyx_t_14) { __Pyx_ErrRestore(0,0,0); goto __pyx_L27_exception_handled; } @@ -140832,7 +131604,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * self._target_doctype = target.doctype * if self._target_doctype is not None: */ - __Pyx_TraceLine(58,0,__PYX_ERR(12, 58, __pyx_L33_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -140849,8 +131620,7 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * if self._target_doctype is not None: * event_filter |= SAX_EVENT_DOCTYPE */ - __Pyx_TraceLine(59,0,__PYX_ERR(12, 59, __pyx_L33_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_doctype); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 59, __pyx_L33_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_doctype); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 59, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->_target_doctype); @@ -140865,10 +131635,9 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * event_filter |= SAX_EVENT_DOCTYPE * except AttributeError: */ - __Pyx_TraceLine(60,0,__PYX_ERR(12, 60, __pyx_L33_error)) __pyx_t_6 = (__pyx_v_self->_target_doctype != Py_None); - __pyx_t_14 = (__pyx_t_6 != 0); - if (__pyx_t_14) { + __pyx_t_13 = (__pyx_t_6 != 0); + if (__pyx_t_13) { /* "src/lxml/parsertarget.pxi":61 * self._target_doctype = target.doctype @@ -140877,7 +131646,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * except AttributeError: * pass */ - __Pyx_TraceLine(61,0,__PYX_ERR(12, 61, __pyx_L33_error)) __pyx_v_event_filter = (__pyx_v_event_filter | __pyx_e_4lxml_5etree_SAX_EVENT_DOCTYPE); /* "src/lxml/parsertarget.pxi":60 @@ -140903,7 +131671,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx goto __pyx_L38_try_end; __pyx_L33_error:; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -140914,9 +131681,8 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * pass * try: */ - __Pyx_TraceLine(62,0,__PYX_ERR(12, 62, __pyx_L35_except_error)) - __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); - if (__pyx_t_15) { + __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); + if (__pyx_t_14) { __Pyx_ErrRestore(0,0,0); goto __pyx_L34_exception_handled; } @@ -140950,7 +131716,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * self._target_pi = target.pi * if self._target_pi is not None: */ - __Pyx_TraceLine(64,0,__PYX_ERR(12, 64, __pyx_L40_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -140967,8 +131732,7 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * if self._target_pi is not None: * event_filter |= SAX_EVENT_PI */ - __Pyx_TraceLine(65,0,__PYX_ERR(12, 65, __pyx_L40_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_pi); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 65, __pyx_L40_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_pi); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 65, __pyx_L40_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->_target_pi); @@ -140983,9 +131747,8 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * event_filter |= SAX_EVENT_PI * except AttributeError: */ - __Pyx_TraceLine(66,0,__PYX_ERR(12, 66, __pyx_L40_error)) - __pyx_t_14 = (__pyx_v_self->_target_pi != Py_None); - __pyx_t_6 = (__pyx_t_14 != 0); + __pyx_t_13 = (__pyx_v_self->_target_pi != Py_None); + __pyx_t_6 = (__pyx_t_13 != 0); if (__pyx_t_6) { /* "src/lxml/parsertarget.pxi":67 @@ -140995,7 +131758,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * except AttributeError: * pass */ - __Pyx_TraceLine(67,0,__PYX_ERR(12, 67, __pyx_L40_error)) __pyx_v_event_filter = (__pyx_v_event_filter | __pyx_e_4lxml_5etree_SAX_EVENT_PI); /* "src/lxml/parsertarget.pxi":66 @@ -141021,7 +131783,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx goto __pyx_L45_try_end; __pyx_L40_error:; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -141032,9 +131793,8 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * pass * try: */ - __Pyx_TraceLine(68,0,__PYX_ERR(12, 68, __pyx_L42_except_error)) - __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); - if (__pyx_t_15) { + __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); + if (__pyx_t_14) { __Pyx_ErrRestore(0,0,0); goto __pyx_L41_exception_handled; } @@ -141068,7 +131828,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * self._target_comment = target.comment * if self._target_comment is not None: */ - __Pyx_TraceLine(70,0,__PYX_ERR(12, 70, __pyx_L47_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -141085,8 +131844,7 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * if self._target_comment is not None: * event_filter |= SAX_EVENT_COMMENT */ - __Pyx_TraceLine(71,0,__PYX_ERR(12, 71, __pyx_L47_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_comment); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 71, __pyx_L47_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_comment); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 71, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->_target_comment); @@ -141101,10 +131859,9 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * event_filter |= SAX_EVENT_COMMENT * except AttributeError: */ - __Pyx_TraceLine(72,0,__PYX_ERR(12, 72, __pyx_L47_error)) __pyx_t_6 = (__pyx_v_self->_target_comment != Py_None); - __pyx_t_14 = (__pyx_t_6 != 0); - if (__pyx_t_14) { + __pyx_t_13 = (__pyx_t_6 != 0); + if (__pyx_t_13) { /* "src/lxml/parsertarget.pxi":73 * self._target_comment = target.comment @@ -141113,7 +131870,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * except AttributeError: * pass */ - __Pyx_TraceLine(73,0,__PYX_ERR(12, 73, __pyx_L47_error)) __pyx_v_event_filter = (__pyx_v_event_filter | __pyx_e_4lxml_5etree_SAX_EVENT_COMMENT); /* "src/lxml/parsertarget.pxi":72 @@ -141139,7 +131895,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx goto __pyx_L52_try_end; __pyx_L47_error:; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -141150,9 +131905,8 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * pass * self._sax_event_filter = event_filter */ - __Pyx_TraceLine(74,0,__PYX_ERR(12, 74, __pyx_L49_except_error)) - __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); - if (__pyx_t_15) { + __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); + if (__pyx_t_14) { __Pyx_ErrRestore(0,0,0); goto __pyx_L48_exception_handled; } @@ -141186,7 +131940,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx * * cdef _handleSaxStart(self, tag, attrib, nsmap): */ - __Pyx_TraceLine(76,0,__PYX_ERR(12, 76, __pyx_L1_error)) __pyx_v_self->__pyx_base._sax_event_filter = __pyx_v_event_filter; /* "src/lxml/parsertarget.pxi":29 @@ -141204,12 +131957,10 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); - __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("lxml.etree._PythonSaxParserTarget.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_arguments); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -141224,7 +131975,6 @@ static int __pyx_pf_4lxml_5etree_22_PythonSaxParserTarget___cinit__(struct __pyx static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxStart(struct __pyx_obj_4lxml_5etree__PythonSaxParserTarget *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_attrib, PyObject *__pyx_v_nsmap) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -141233,7 +131983,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxStart(s int __pyx_t_5; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("_handleSaxStart", 0); - __Pyx_TraceCall("_handleSaxStart", __pyx_f[12], 78, 0, __PYX_ERR(12, 78, __pyx_L1_error)); /* "src/lxml/parsertarget.pxi":79 * @@ -141242,7 +131991,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxStart(s * return self._target_start(tag, attrib, nsmap) * else: */ - __Pyx_TraceLine(79,0,__PYX_ERR(12, 79, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_start_takes_nsmap != 0); if (__pyx_t_1) { @@ -141253,7 +132001,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxStart(s * else: * return self._target_start(tag, attrib) */ - __Pyx_TraceLine(80,0,__PYX_ERR(12, 80, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_target_start); __pyx_t_3 = __pyx_v_self->_target_start; __pyx_t_4 = NULL; @@ -141271,7 +132018,7 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxStart(s #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_tag, __pyx_v_attrib, __pyx_v_nsmap}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 80, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 80, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -141279,13 +132026,13 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxStart(s #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_tag, __pyx_v_attrib, __pyx_v_nsmap}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 80, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 80, __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_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(12, 80, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(13, 80, __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; @@ -141299,7 +132046,7 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxStart(s __Pyx_INCREF(__pyx_v_nsmap); __Pyx_GIVEREF(__pyx_v_nsmap); PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_nsmap); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 80, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -141324,7 +132071,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxStart(s * * cdef _handleSaxEnd(self, tag): */ - __Pyx_TraceLine(82,0,__PYX_ERR(12, 82, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_target_start); @@ -141343,7 +132089,7 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxStart(s #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_tag, __pyx_v_attrib}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 82, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 82, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -141351,13 +132097,13 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxStart(s #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_tag, __pyx_v_attrib}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 82, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 82, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_4 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 82, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -141368,7 +132114,7 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxStart(s __Pyx_INCREF(__pyx_v_attrib); __Pyx_GIVEREF(__pyx_v_attrib); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_v_attrib); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 82, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -141396,7 +132142,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxStart(s __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -141411,14 +132156,11 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxStart(s static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxEnd(struct __pyx_obj_4lxml_5etree__PythonSaxParserTarget *__pyx_v_self, PyObject *__pyx_v_tag) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_handleSaxEnd", 0); - __Pyx_TraceCall("_handleSaxEnd", __pyx_f[12], 84, 0, __PYX_ERR(12, 84, __pyx_L1_error)); /* "src/lxml/parsertarget.pxi":85 * @@ -141427,7 +132169,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxEnd(str * * cdef int _handleSaxData(self, data) except -1: */ - __Pyx_TraceLine(85,0,__PYX_ERR(12, 85, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_target_end); __pyx_t_2 = __pyx_v_self->_target_end; __pyx_t_3 = NULL; @@ -141440,38 +132181,10 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxEnd(str __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 85, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_tag}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 85, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_tag}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 85, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 85, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_v_tag); - __Pyx_GIVEREF(__pyx_v_tag); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_tag); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 85, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_tag) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_tag); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 85, __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; @@ -141490,12 +132203,10 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxEnd(str __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("lxml.etree._PythonSaxParserTarget._handleSaxEnd", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -141510,14 +132221,11 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxEnd(str static int __pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxData(struct __pyx_obj_4lxml_5etree__PythonSaxParserTarget *__pyx_v_self, PyObject *__pyx_v_data) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_handleSaxData", 0); - __Pyx_TraceCall("_handleSaxData", __pyx_f[12], 87, 0, __PYX_ERR(12, 87, __pyx_L1_error)); /* "src/lxml/parsertarget.pxi":88 * @@ -141526,7 +132234,6 @@ static int __pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxData(struct _ * * cdef int _handleSaxDoctype(self, root_tag, public_id, system_id) except -1: */ - __Pyx_TraceLine(88,0,__PYX_ERR(12, 88, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_self->_target_data); __pyx_t_2 = __pyx_v_self->_target_data; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -141538,38 +132245,10 @@ static int __pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxData(struct _ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 88, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_data}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 88, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_data}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 88, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 88, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_v_data); - __Pyx_GIVEREF(__pyx_v_data); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_data); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 88, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 88, __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; @@ -141588,11 +132267,9 @@ static int __pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxData(struct _ __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("lxml.etree._PythonSaxParserTarget._handleSaxData", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -141607,7 +132284,6 @@ static int __pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxData(struct _ static int __pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxDoctype(struct __pyx_obj_4lxml_5etree__PythonSaxParserTarget *__pyx_v_self, PyObject *__pyx_v_root_tag, PyObject *__pyx_v_public_id, PyObject *__pyx_v_system_id) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -141615,7 +132291,6 @@ static int __pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxDoctype(struc int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_handleSaxDoctype", 0); - __Pyx_TraceCall("_handleSaxDoctype", __pyx_f[12], 90, 0, __PYX_ERR(12, 90, __pyx_L1_error)); /* "src/lxml/parsertarget.pxi":91 * @@ -141624,7 +132299,6 @@ static int __pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxDoctype(struc * * cdef _handleSaxPi(self, target, data): */ - __Pyx_TraceLine(91,0,__PYX_ERR(12, 91, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_self->_target_doctype); __pyx_t_2 = __pyx_v_self->_target_doctype; __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -141641,7 +132315,7 @@ static int __pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxDoctype(struc #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_root_tag, __pyx_v_public_id, __pyx_v_system_id}; - __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(12, 91, __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(13, 91, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -141649,13 +132323,13 @@ static int __pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxDoctype(struc #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_root_tag, __pyx_v_public_id, __pyx_v_system_id}; - __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(12, 91, __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(13, 91, __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(12, 91, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 91, __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; @@ -141669,7 +132343,7 @@ static int __pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxDoctype(struc __Pyx_INCREF(__pyx_v_system_id); __Pyx_GIVEREF(__pyx_v_system_id); PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_system_id); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 91, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -141695,7 +132369,6 @@ static int __pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxDoctype(struc __Pyx_AddTraceback("lxml.etree._PythonSaxParserTarget._handleSaxDoctype", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -141710,7 +132383,6 @@ static int __pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxDoctype(struc static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxPi(struct __pyx_obj_4lxml_5etree__PythonSaxParserTarget *__pyx_v_self, PyObject *__pyx_v_target, PyObject *__pyx_v_data) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -141718,7 +132390,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxPi(stru int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_handleSaxPi", 0); - __Pyx_TraceCall("_handleSaxPi", __pyx_f[12], 93, 0, __PYX_ERR(12, 93, __pyx_L1_error)); /* "src/lxml/parsertarget.pxi":94 * @@ -141727,7 +132398,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxPi(stru * * cdef _handleSaxComment(self, comment): */ - __Pyx_TraceLine(94,0,__PYX_ERR(12, 94, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_target_pi); __pyx_t_2 = __pyx_v_self->_target_pi; __pyx_t_3 = NULL; @@ -141745,7 +132415,7 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxPi(stru #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_target, __pyx_v_data}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 94, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 94, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -141753,13 +132423,13 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxPi(stru #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_target, __pyx_v_data}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 94, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 94, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 94, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 94, __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; @@ -141770,7 +132440,7 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxPi(stru __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_data); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 94, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -141797,7 +132467,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxPi(stru __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -141812,14 +132481,11 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxPi(stru static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxComment(struct __pyx_obj_4lxml_5etree__PythonSaxParserTarget *__pyx_v_self, PyObject *__pyx_v_comment) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_handleSaxComment", 0); - __Pyx_TraceCall("_handleSaxComment", __pyx_f[12], 96, 0, __PYX_ERR(12, 96, __pyx_L1_error)); /* "src/lxml/parsertarget.pxi":97 * @@ -141828,7 +132494,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxComment * * */ - __Pyx_TraceLine(97,0,__PYX_ERR(12, 97, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_target_comment); __pyx_t_2 = __pyx_v_self->_target_comment; __pyx_t_3 = NULL; @@ -141841,38 +132506,10 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxComment __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_comment); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 97, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_comment}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 97, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_comment}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 97, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 97, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_v_comment); - __Pyx_GIVEREF(__pyx_v_comment); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_comment); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 97, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_comment) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_comment); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 97, __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; @@ -141891,12 +132528,10 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxComment __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("lxml.etree._PythonSaxParserTarget._handleSaxComment", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -141911,14 +132546,12 @@ static PyObject *__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxComment static int __pyx_f_4lxml_5etree_20_TargetParserContext__setTarget(struct __pyx_obj_4lxml_5etree__TargetParserContext *__pyx_v_self, PyObject *__pyx_v_target) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_setTarget", 0); - __Pyx_TraceCall("_setTarget", __pyx_f[12], 107, 0, __PYX_ERR(12, 107, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_target); /* "src/lxml/parsertarget.pxi":108 @@ -141928,7 +132561,6 @@ static int __pyx_f_4lxml_5etree_20_TargetParserContext__setTarget(struct __pyx_o * if not isinstance(target, _SaxParserTarget) or \ * hasattr(target, u'__dict__'): */ - __Pyx_TraceLine(108,0,__PYX_ERR(12, 108, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_target); __Pyx_GIVEREF(__pyx_v_target); __Pyx_GOTREF(__pyx_v_self->_python_target); @@ -141942,7 +132574,6 @@ static int __pyx_f_4lxml_5etree_20_TargetParserContext__setTarget(struct __pyx_o * hasattr(target, u'__dict__'): * target = _PythonSaxParserTarget(target) */ - __Pyx_TraceLine(109,0,__PYX_ERR(12, 109, __pyx_L1_error)) __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_target, __pyx_ptype_4lxml_5etree__SaxParserTarget); __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0); if (!__pyx_t_3) { @@ -141958,8 +132589,7 @@ static int __pyx_f_4lxml_5etree_20_TargetParserContext__setTarget(struct __pyx_o * target = _PythonSaxParserTarget(target) * self._setSaxParserTarget(target) */ - __Pyx_TraceLine(110,0,__PYX_ERR(12, 110, __pyx_L1_error)) - __pyx_t_3 = __Pyx_HasAttr(__pyx_v_target, __pyx_n_u_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(12, 110, __pyx_L1_error) + __pyx_t_3 = __Pyx_HasAttr(__pyx_v_target, __pyx_n_u_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(13, 110, __pyx_L1_error) __pyx_t_2 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; @@ -141971,7 +132601,6 @@ static int __pyx_f_4lxml_5etree_20_TargetParserContext__setTarget(struct __pyx_o * hasattr(target, u'__dict__'): * target = _PythonSaxParserTarget(target) */ - __Pyx_TraceLine(109,0,__PYX_ERR(12, 109, __pyx_L1_error)) if (__pyx_t_1) { /* "src/lxml/parsertarget.pxi":111 @@ -141981,8 +132610,7 @@ static int __pyx_f_4lxml_5etree_20_TargetParserContext__setTarget(struct __pyx_o * self._setSaxParserTarget(target) * return 0 */ - __Pyx_TraceLine(111,0,__PYX_ERR(12, 111, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree__PythonSaxParserTarget), __pyx_v_target); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 111, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree__PythonSaxParserTarget), __pyx_v_target); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_target, __pyx_t_4); __pyx_t_4 = 0; @@ -142003,8 +132631,7 @@ static int __pyx_f_4lxml_5etree_20_TargetParserContext__setTarget(struct __pyx_o * return 0 * */ - __Pyx_TraceLine(112,0,__PYX_ERR(12, 112, __pyx_L1_error)) - if (!(likely(((__pyx_v_target) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_target, __pyx_ptype_4lxml_5etree__SaxParserTarget))))) __PYX_ERR(12, 112, __pyx_L1_error) + if (!(likely(((__pyx_v_target) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_target, __pyx_ptype_4lxml_5etree__SaxParserTarget))))) __PYX_ERR(13, 112, __pyx_L1_error) ((struct __pyx_vtabstruct_4lxml_5etree__TargetParserContext *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._setSaxParserTarget(((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_v_self), ((struct __pyx_obj_4lxml_5etree__SaxParserTarget *)__pyx_v_target)); /* "src/lxml/parsertarget.pxi":113 @@ -142014,7 +132641,6 @@ static int __pyx_f_4lxml_5etree_20_TargetParserContext__setTarget(struct __pyx_o * * cdef _ParserContext _copy(self): */ - __Pyx_TraceLine(113,0,__PYX_ERR(12, 113, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -142033,7 +132659,6 @@ static int __pyx_f_4lxml_5etree_20_TargetParserContext__setTarget(struct __pyx_o __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_target); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -142049,12 +132674,10 @@ static int __pyx_f_4lxml_5etree_20_TargetParserContext__setTarget(struct __pyx_o static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_20_TargetParserContext__copy(struct __pyx_obj_4lxml_5etree__TargetParserContext *__pyx_v_self) { struct __pyx_obj_4lxml_5etree__TargetParserContext *__pyx_v_context = 0; struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("_copy", 0); - __Pyx_TraceCall("_copy", __pyx_f[12], 115, 0, __PYX_ERR(12, 115, __pyx_L1_error)); /* "src/lxml/parsertarget.pxi":117 * cdef _ParserContext _copy(self): @@ -142063,10 +132686,9 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_20_Tar * context._setTarget(self._python_target) * return context */ - __Pyx_TraceLine(117,0,__PYX_ERR(12, 117, __pyx_L1_error)) - __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_14_ParserContext__copy(((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 117, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_14_ParserContext__copy(((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 117, __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__TargetParserContext))))) __PYX_ERR(12, 117, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4lxml_5etree__TargetParserContext))))) __PYX_ERR(13, 117, __pyx_L1_error) __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__TargetParserContext *)__pyx_t_1); __pyx_t_1 = 0; @@ -142077,10 +132699,9 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_20_Tar * return context * */ - __Pyx_TraceLine(118,0,__PYX_ERR(12, 118, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_python_target; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree_20_TargetParserContext__setTarget(__pyx_v_context, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(12, 118, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_20_TargetParserContext__setTarget(__pyx_v_context, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(13, 118, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/lxml/parsertarget.pxi":119 @@ -142090,7 +132711,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_20_Tar * * cdef void _cleanupTargetParserContext(self, xmlDoc* result): */ - __Pyx_TraceLine(119,0,__PYX_ERR(12, 119, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_context)); __pyx_r = ((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_v_context); @@ -142112,7 +132732,6 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_20_Tar __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -142126,12 +132745,10 @@ static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_20_Tar */ static void __pyx_f_4lxml_5etree_20_TargetParserContext__cleanupTargetParserContext(struct __pyx_obj_4lxml_5etree__TargetParserContext *__pyx_v_self, xmlDoc *__pyx_v_result) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_cleanupTargetParserContext", 0); - __Pyx_TraceCall("_cleanupTargetParserContext", __pyx_f[12], 121, 0, __PYX_ERR(12, 121, __pyx_L1_error)); /* "src/lxml/parsertarget.pxi":122 * @@ -142140,7 +132757,6 @@ static void __pyx_f_4lxml_5etree_20_TargetParserContext__cleanupTargetParserCont * if self._c_ctxt.myDoc is not result and \ * self._c_ctxt.myDoc._private is NULL: */ - __Pyx_TraceLine(122,0,__PYX_ERR(12, 122, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->__pyx_base.__pyx_base._c_ctxt->myDoc != NULL) != 0); if (__pyx_t_1) { @@ -142151,7 +132767,6 @@ static void __pyx_f_4lxml_5etree_20_TargetParserContext__cleanupTargetParserCont * self._c_ctxt.myDoc._private is NULL: * # no _Document proxy => orphen */ - __Pyx_TraceLine(123,0,__PYX_ERR(12, 123, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->__pyx_base.__pyx_base._c_ctxt->myDoc != __pyx_v_result) != 0); if (__pyx_t_2) { } else { @@ -142166,7 +132781,6 @@ static void __pyx_f_4lxml_5etree_20_TargetParserContext__cleanupTargetParserCont * # no _Document proxy => orphen * tree.xmlFreeDoc(self._c_ctxt.myDoc) */ - __Pyx_TraceLine(124,0,__PYX_ERR(12, 124, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->__pyx_base.__pyx_base._c_ctxt->myDoc->_private == NULL) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L5_bool_binop_done:; @@ -142178,7 +132792,6 @@ static void __pyx_f_4lxml_5etree_20_TargetParserContext__cleanupTargetParserCont * self._c_ctxt.myDoc._private is NULL: * # no _Document proxy => orphen */ - __Pyx_TraceLine(123,0,__PYX_ERR(12, 123, __pyx_L1_error)) if (__pyx_t_1) { /* "src/lxml/parsertarget.pxi":126 @@ -142188,7 +132801,6 @@ static void __pyx_f_4lxml_5etree_20_TargetParserContext__cleanupTargetParserCont * self._c_ctxt.myDoc = NULL * */ - __Pyx_TraceLine(126,0,__PYX_ERR(12, 126, __pyx_L1_error)) xmlFreeDoc(__pyx_v_self->__pyx_base.__pyx_base._c_ctxt->myDoc); /* "src/lxml/parsertarget.pxi":123 @@ -142207,7 +132819,6 @@ static void __pyx_f_4lxml_5etree_20_TargetParserContext__cleanupTargetParserCont * * cdef object _handleParseResult(self, _BaseParser parser, xmlDoc* result, */ - __Pyx_TraceLine(127,0,__PYX_ERR(12, 127, __pyx_L1_error)) __pyx_v_self->__pyx_base.__pyx_base._c_ctxt->myDoc = NULL; /* "src/lxml/parsertarget.pxi":122 @@ -142228,11 +132839,6 @@ static void __pyx_f_4lxml_5etree_20_TargetParserContext__cleanupTargetParserCont */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._TargetParserContext._cleanupTargetParserContext", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -142248,7 +132854,6 @@ static PyObject *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult( int __pyx_v_recover; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -142266,7 +132871,6 @@ static PyObject *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult( PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; __Pyx_RefNannySetupContext("_handleParseResult", 0); - __Pyx_TraceCall("_handleParseResult", __pyx_f[12], 129, 0, __PYX_ERR(12, 129, __pyx_L1_error)); /* "src/lxml/parsertarget.pxi":132 * filename): @@ -142275,7 +132879,6 @@ static PyObject *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult( * try: * if self._has_raised(): */ - __Pyx_TraceLine(132,0,__PYX_ERR(12, 132, __pyx_L1_error)) __pyx_v_recover = (__pyx_v_parser->_parse_options & XML_PARSE_RECOVER); /* "src/lxml/parsertarget.pxi":133 @@ -142285,7 +132888,6 @@ static PyObject *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult( * if self._has_raised(): * self._cleanupTargetParserContext(result) */ - __Pyx_TraceLine(133,0,__PYX_ERR(12, 133, __pyx_L3_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -142302,8 +132904,7 @@ static PyObject *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult( * self._cleanupTargetParserContext(result) * self._raise_if_stored() */ - __Pyx_TraceLine(134,0,__PYX_ERR(12, 134, __pyx_L3_error)) - __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree__TargetParserContext *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._has_raised(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_v_self)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(12, 134, __pyx_L3_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree__TargetParserContext *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._has_raised(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_v_self)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(13, 134, __pyx_L3_error) __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { @@ -142314,7 +132915,6 @@ static PyObject *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult( * self._raise_if_stored() * if not self._c_ctxt.wellFormed and not recover: */ - __Pyx_TraceLine(135,0,__PYX_ERR(12, 135, __pyx_L3_error)) __pyx_f_4lxml_5etree_20_TargetParserContext__cleanupTargetParserContext(__pyx_v_self, __pyx_v_result); /* "src/lxml/parsertarget.pxi":136 @@ -142324,8 +132924,7 @@ static PyObject *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult( * if not self._c_ctxt.wellFormed and not recover: * _raiseParseError(self._c_ctxt, filename, self._error_log) */ - __Pyx_TraceLine(136,0,__PYX_ERR(12, 136, __pyx_L3_error)) - __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__TargetParserContext *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._raise_if_stored(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_v_self)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(12, 136, __pyx_L3_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__TargetParserContext *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._raise_if_stored(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_v_self)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(13, 136, __pyx_L3_error) /* "src/lxml/parsertarget.pxi":134 * recover = parser._parse_options & xmlparser.XML_PARSE_RECOVER @@ -142343,7 +132942,6 @@ static PyObject *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult( * _raiseParseError(self._c_ctxt, filename, self._error_log) * except: */ - __Pyx_TraceLine(137,0,__PYX_ERR(12, 137, __pyx_L3_error)) __pyx_t_4 = ((!(__pyx_v_self->__pyx_base.__pyx_base._c_ctxt->wellFormed != 0)) != 0); if (__pyx_t_4) { } else { @@ -142362,10 +132960,9 @@ static PyObject *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult( * except: * if python.IS_PYTHON2: */ - __Pyx_TraceLine(138,0,__PYX_ERR(12, 138, __pyx_L3_error)) __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(12, 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)0))) __PYX_ERR(13, 138, __pyx_L3_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "src/lxml/parsertarget.pxi":137 @@ -142399,10 +132996,9 @@ static PyObject *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult( * if python.IS_PYTHON2: * exc = sys.exc_info() */ - __Pyx_TraceLine(139,0,__PYX_ERR(12, 139, __pyx_L5_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._TargetParserContext._handleParseResult", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(12, 139, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(13, 139, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_9); @@ -142414,7 +133010,6 @@ static PyObject *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult( * exc = sys.exc_info() * # Python 2 can't chain exceptions */ - __Pyx_TraceLine(140,0,__PYX_ERR(12, 140, __pyx_L5_except_error)) __pyx_t_5 = (IS_PYTHON2 != 0); if (likely(__pyx_t_5)) { @@ -142425,8 +133020,7 @@ static PyObject *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult( * # Python 2 can't chain exceptions * try: self._python_target.close() */ - __Pyx_TraceLine(141,0,__PYX_ERR(12, 141, __pyx_L5_except_error)) - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_11)) __PYX_ERR(12, 141, __pyx_L5_except_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_11)) __PYX_ERR(13, 141, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { @@ -142438,12 +133032,9 @@ static PyObject *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult( __Pyx_DECREF_SET(__pyx_t_11, function); } } - if (__pyx_t_12) { - __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(12, 141, __pyx_L5_except_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } else { - __pyx_t_10 = __Pyx_PyObject_CallNoArg(__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(12, 141, __pyx_L5_except_error) - } + __pyx_t_10 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(13, 141, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_v_exc = __pyx_t_10; @@ -142456,7 +133047,6 @@ static PyObject *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult( * except: pass * raise exc[0], exc[1], exc[2] */ - __Pyx_TraceLine(143,0,__PYX_ERR(12, 143, __pyx_L16_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -142465,7 +133055,7 @@ static PyObject *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult( __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); /*try:*/ { - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_python_target, __pyx_n_s_close); if (unlikely(!__pyx_t_11)) __PYX_ERR(12, 143, __pyx_L16_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_python_target, __pyx_n_s_close); if (unlikely(!__pyx_t_11)) __PYX_ERR(13, 143, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { @@ -142477,12 +133067,9 @@ static PyObject *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult( __Pyx_DECREF_SET(__pyx_t_11, function); } } - if (__pyx_t_12) { - __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(12, 143, __pyx_L16_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } else { - __pyx_t_10 = __Pyx_PyObject_CallNoArg(__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(12, 143, __pyx_L16_error) - } + __pyx_t_10 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(13, 143, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -142503,25 +133090,10 @@ static PyObject *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult( * raise exc[0], exc[1], exc[2] * else: */ - __Pyx_TraceLine(144,0,__PYX_ERR(12, 144, __pyx_L18_except_error)) /*except:*/ { __Pyx_ErrRestore(0,0,0); goto __pyx_L17_exception_handled; } - __pyx_L18_except_error:; - - /* "src/lxml/parsertarget.pxi":143 - * exc = sys.exc_info() - * # Python 2 can't chain exceptions - * try: self._python_target.close() # <<<<<<<<<<<<<< - * except: pass - * raise exc[0], exc[1], exc[2] - */ - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_XGIVEREF(__pyx_t_15); - __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); - goto __pyx_L5_except_error; __pyx_L17_exception_handled:; __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); @@ -142537,18 +133109,17 @@ static PyObject *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult( * else: * self._python_target.close() */ - __Pyx_TraceLine(145,0,__PYX_ERR(12, 145, __pyx_L5_except_error)) - __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_exc, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(12, 145, __pyx_L5_except_error) + __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_exc, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(13, 145, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_exc, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(12, 145, __pyx_L5_except_error) + __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_exc, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(13, 145, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_exc, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(12, 145, __pyx_L5_except_error) + __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_exc, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(13, 145, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_Raise(__pyx_t_10, __pyx_t_11, __pyx_t_12, 0); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __PYX_ERR(12, 145, __pyx_L5_except_error) + __PYX_ERR(13, 145, __pyx_L5_except_error) /* "src/lxml/parsertarget.pxi":140 * _raiseParseError(self._c_ctxt, filename, self._error_log) @@ -142566,9 +133137,8 @@ static PyObject *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult( * raise * return self._python_target.close() */ - __Pyx_TraceLine(147,0,__PYX_ERR(12, 147, __pyx_L5_except_error)) /*else*/ { - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_python_target, __pyx_n_s_close); if (unlikely(!__pyx_t_11)) __PYX_ERR(12, 147, __pyx_L5_except_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_python_target, __pyx_n_s_close); if (unlikely(!__pyx_t_11)) __PYX_ERR(13, 147, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { @@ -142580,12 +133150,9 @@ static PyObject *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult( __Pyx_DECREF_SET(__pyx_t_11, function); } } - if (__pyx_t_10) { - __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(12, 147, __pyx_L5_except_error) - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } else { - __pyx_t_12 = __Pyx_PyObject_CallNoArg(__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(12, 147, __pyx_L5_except_error) - } + __pyx_t_12 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(13, 147, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; @@ -142597,13 +133164,12 @@ static PyObject *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult( * return self._python_target.close() * */ - __Pyx_TraceLine(148,0,__PYX_ERR(12, 148, __pyx_L5_except_error)) __Pyx_GIVEREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ErrRestoreWithState(__pyx_t_7, __pyx_t_8, __pyx_t_9); __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; - __PYX_ERR(12, 148, __pyx_L5_except_error) + __PYX_ERR(13, 148, __pyx_L5_except_error) } } __pyx_L5_except_error:; @@ -142630,9 +133196,8 @@ static PyObject *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult( * * cdef xmlDoc* _handleParseResultDoc(self, _BaseParser parser, */ - __Pyx_TraceLine(149,0,__PYX_ERR(12, 149, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_python_target, __pyx_n_s_close); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 149, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_python_target, __pyx_n_s_close); if (unlikely(!__pyx_t_8)) __PYX_ERR(13, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { @@ -142644,12 +133209,9 @@ static PyObject *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult( __Pyx_DECREF_SET(__pyx_t_8, function); } } - if (__pyx_t_7) { - __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 149, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else { - __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 149, __pyx_L1_error) - } + __pyx_t_9 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(13, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_r = __pyx_t_9; @@ -142677,7 +133239,6 @@ static PyObject *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult( __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -142695,7 +133256,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc PyObject *__pyx_v_exc = NULL; PyObject *__pyx_v_parse_result = NULL; xmlDoc *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -142713,7 +133273,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; __Pyx_RefNannySetupContext("_handleParseResultDoc", 0); - __Pyx_TraceCall("_handleParseResultDoc", __pyx_f[12], 151, 0, __PYX_ERR(12, 151, __pyx_L1_error)); /* "src/lxml/parsertarget.pxi":154 * xmlDoc* result, filename) except NULL: @@ -142722,7 +133281,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc * if result is not NULL and result._private is NULL: * # no _Document proxy => orphen */ - __Pyx_TraceLine(154,0,__PYX_ERR(12, 154, __pyx_L1_error)) __pyx_v_recover = (__pyx_v_parser->_parse_options & XML_PARSE_RECOVER); /* "src/lxml/parsertarget.pxi":155 @@ -142732,7 +133290,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc * # no _Document proxy => orphen * tree.xmlFreeDoc(result) */ - __Pyx_TraceLine(155,0,__PYX_ERR(12, 155, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_result != NULL) != 0); if (__pyx_t_2) { } else { @@ -142751,7 +133308,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc * try: * self._cleanupTargetParserContext(result) */ - __Pyx_TraceLine(157,0,__PYX_ERR(12, 157, __pyx_L1_error)) xmlFreeDoc(__pyx_v_result); /* "src/lxml/parsertarget.pxi":155 @@ -142770,7 +133326,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc * self._cleanupTargetParserContext(result) * self._raise_if_stored() */ - __Pyx_TraceLine(158,0,__PYX_ERR(12, 158, __pyx_L6_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -142787,7 +133342,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc * self._raise_if_stored() * if not self._c_ctxt.wellFormed and not recover: */ - __Pyx_TraceLine(159,0,__PYX_ERR(12, 159, __pyx_L6_error)) __pyx_f_4lxml_5etree_20_TargetParserContext__cleanupTargetParserContext(__pyx_v_self, __pyx_v_result); /* "src/lxml/parsertarget.pxi":160 @@ -142797,8 +133351,7 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc * if not self._c_ctxt.wellFormed and not recover: * _raiseParseError(self._c_ctxt, filename, self._error_log) */ - __Pyx_TraceLine(160,0,__PYX_ERR(12, 160, __pyx_L6_error)) - __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__TargetParserContext *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._raise_if_stored(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_v_self)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(12, 160, __pyx_L6_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__TargetParserContext *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._raise_if_stored(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_v_self)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(13, 160, __pyx_L6_error) /* "src/lxml/parsertarget.pxi":161 * self._cleanupTargetParserContext(result) @@ -142807,7 +133360,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc * _raiseParseError(self._c_ctxt, filename, self._error_log) * except: */ - __Pyx_TraceLine(161,0,__PYX_ERR(12, 161, __pyx_L6_error)) __pyx_t_2 = ((!(__pyx_v_self->__pyx_base.__pyx_base._c_ctxt->wellFormed != 0)) != 0); if (__pyx_t_2) { } else { @@ -142826,10 +133378,9 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc * except: * if python.IS_PYTHON2: */ - __Pyx_TraceLine(162,0,__PYX_ERR(12, 162, __pyx_L6_error)) __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(12, 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)0))) __PYX_ERR(13, 162, __pyx_L6_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "src/lxml/parsertarget.pxi":161 @@ -142863,10 +133414,9 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc * if python.IS_PYTHON2: * exc = sys.exc_info() */ - __Pyx_TraceLine(163,0,__PYX_ERR(12, 163, __pyx_L8_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._TargetParserContext._handleParseResultDoc", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(12, 163, __pyx_L8_except_error) + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(13, 163, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_9); @@ -142878,7 +133428,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc * exc = sys.exc_info() * # Python 2 can't chain exceptions */ - __Pyx_TraceLine(164,0,__PYX_ERR(12, 164, __pyx_L8_except_error)) __pyx_t_1 = (IS_PYTHON2 != 0); if (likely(__pyx_t_1)) { @@ -142889,8 +133438,7 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc * # Python 2 can't chain exceptions * try: self._python_target.close() */ - __Pyx_TraceLine(165,0,__PYX_ERR(12, 165, __pyx_L8_except_error)) - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_11)) __PYX_ERR(12, 165, __pyx_L8_except_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_11)) __PYX_ERR(13, 165, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { @@ -142902,12 +133450,9 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc __Pyx_DECREF_SET(__pyx_t_11, function); } } - if (__pyx_t_12) { - __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(12, 165, __pyx_L8_except_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } else { - __pyx_t_10 = __Pyx_PyObject_CallNoArg(__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(12, 165, __pyx_L8_except_error) - } + __pyx_t_10 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(13, 165, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_v_exc = __pyx_t_10; @@ -142920,7 +133465,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc * except: pass * raise exc[0], exc[1], exc[2] */ - __Pyx_TraceLine(167,0,__PYX_ERR(12, 167, __pyx_L18_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -142929,7 +133473,7 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); /*try:*/ { - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_python_target, __pyx_n_s_close); if (unlikely(!__pyx_t_11)) __PYX_ERR(12, 167, __pyx_L18_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_python_target, __pyx_n_s_close); if (unlikely(!__pyx_t_11)) __PYX_ERR(13, 167, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { @@ -142941,12 +133485,9 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc __Pyx_DECREF_SET(__pyx_t_11, function); } } - if (__pyx_t_12) { - __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(12, 167, __pyx_L18_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } else { - __pyx_t_10 = __Pyx_PyObject_CallNoArg(__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(12, 167, __pyx_L18_error) - } + __pyx_t_10 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(13, 167, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -142967,25 +133508,10 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc * raise exc[0], exc[1], exc[2] * else: */ - __Pyx_TraceLine(168,0,__PYX_ERR(12, 168, __pyx_L20_except_error)) /*except:*/ { __Pyx_ErrRestore(0,0,0); goto __pyx_L19_exception_handled; } - __pyx_L20_except_error:; - - /* "src/lxml/parsertarget.pxi":167 - * exc = sys.exc_info() - * # Python 2 can't chain exceptions - * try: self._python_target.close() # <<<<<<<<<<<<<< - * except: pass - * raise exc[0], exc[1], exc[2] - */ - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_XGIVEREF(__pyx_t_15); - __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); - goto __pyx_L8_except_error; __pyx_L19_exception_handled:; __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); @@ -143001,18 +133527,17 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc * else: * self._python_target.close() */ - __Pyx_TraceLine(169,0,__PYX_ERR(12, 169, __pyx_L8_except_error)) - __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_exc, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(12, 169, __pyx_L8_except_error) + __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_exc, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(13, 169, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_exc, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(12, 169, __pyx_L8_except_error) + __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_exc, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(13, 169, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_exc, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(12, 169, __pyx_L8_except_error) + __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_exc, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(13, 169, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_Raise(__pyx_t_10, __pyx_t_11, __pyx_t_12, 0); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __PYX_ERR(12, 169, __pyx_L8_except_error) + __PYX_ERR(13, 169, __pyx_L8_except_error) /* "src/lxml/parsertarget.pxi":164 * _raiseParseError(self._c_ctxt, filename, self._error_log) @@ -143030,9 +133555,8 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc * raise * parse_result = self._python_target.close() */ - __Pyx_TraceLine(171,0,__PYX_ERR(12, 171, __pyx_L8_except_error)) /*else*/ { - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_python_target, __pyx_n_s_close); if (unlikely(!__pyx_t_11)) __PYX_ERR(12, 171, __pyx_L8_except_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_python_target, __pyx_n_s_close); if (unlikely(!__pyx_t_11)) __PYX_ERR(13, 171, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { @@ -143044,12 +133568,9 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc __Pyx_DECREF_SET(__pyx_t_11, function); } } - if (__pyx_t_10) { - __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(12, 171, __pyx_L8_except_error) - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } else { - __pyx_t_12 = __Pyx_PyObject_CallNoArg(__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(12, 171, __pyx_L8_except_error) - } + __pyx_t_12 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(13, 171, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; @@ -143061,13 +133582,12 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc * parse_result = self._python_target.close() * raise _TargetParserResult(parse_result) */ - __Pyx_TraceLine(172,0,__PYX_ERR(12, 172, __pyx_L8_except_error)) __Pyx_GIVEREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ErrRestoreWithState(__pyx_t_7, __pyx_t_8, __pyx_t_9); __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; - __PYX_ERR(12, 172, __pyx_L8_except_error) + __PYX_ERR(13, 172, __pyx_L8_except_error) } } __pyx_L8_except_error:; @@ -143093,8 +133613,7 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc * parse_result = self._python_target.close() # <<<<<<<<<<<<<< * raise _TargetParserResult(parse_result) */ - __Pyx_TraceLine(173,0,__PYX_ERR(12, 173, __pyx_L1_error)) - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_python_target, __pyx_n_s_close); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 173, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_python_target, __pyx_n_s_close); if (unlikely(!__pyx_t_8)) __PYX_ERR(13, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { @@ -143106,12 +133625,9 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc __Pyx_DECREF_SET(__pyx_t_8, function); } } - if (__pyx_t_7) { - __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 173, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else { - __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 173, __pyx_L1_error) - } + __pyx_t_9 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(13, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_parse_result = __pyx_t_9; @@ -143122,8 +133638,7 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc * parse_result = self._python_target.close() * raise _TargetParserResult(parse_result) # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(174,0,__PYX_ERR(12, 174, __pyx_L1_error)) - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_TargetParserResult); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 174, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_TargetParserResult); if (unlikely(!__pyx_t_8)) __PYX_ERR(13, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { @@ -143135,42 +133650,14 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc __Pyx_DECREF_SET(__pyx_t_8, function); } } - if (!__pyx_t_7) { - __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_parse_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 174, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_8)) { - PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_parse_result}; - __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 174, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_9); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { - PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_parse_result}; - __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 174, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_9); - } else - #endif - { - __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(12, 174, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7); __pyx_t_7 = NULL; - __Pyx_INCREF(__pyx_v_parse_result); - __Pyx_GIVEREF(__pyx_v_parse_result); - PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_parse_result); - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_12, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 174, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } - } + __pyx_t_9 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_7, __pyx_v_parse_result) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_parse_result); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(13, 174, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_Raise(__pyx_t_9, 0, 0, 0); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __PYX_ERR(12, 174, __pyx_L1_error) + __PYX_ERR(13, 174, __pyx_L1_error) /* "src/lxml/parsertarget.pxi":151 * return self._python_target.close() @@ -143192,7 +133679,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc __pyx_r = NULL; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XDECREF(__pyx_v_parse_result); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -143207,7 +133693,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc static int __pyx_f_4lxml_5etree__findOutputMethod(PyObject *__pyx_v_method) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -143215,7 +133700,6 @@ static int __pyx_f_4lxml_5etree__findOutputMethod(PyObject *__pyx_v_method) { PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_findOutputMethod", 0); - __Pyx_TraceCall("_findOutputMethod", __pyx_f[8], 18, 0, __PYX_ERR(8, 18, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_method); /* "src/lxml/serializer.pxi":19 @@ -143225,7 +133709,6 @@ static int __pyx_f_4lxml_5etree__findOutputMethod(PyObject *__pyx_v_method) { * return OUTPUT_METHOD_XML * method = method.lower() */ - __Pyx_TraceLine(19,0,__PYX_ERR(8, 19, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_method == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -143237,7 +133720,6 @@ static int __pyx_f_4lxml_5etree__findOutputMethod(PyObject *__pyx_v_method) { * method = method.lower() * if method == "xml": */ - __Pyx_TraceLine(20,0,__PYX_ERR(8, 20, __pyx_L1_error)) __pyx_r = __pyx_e_4lxml_5etree_OUTPUT_METHOD_XML; goto __pyx_L0; @@ -143257,7 +133739,6 @@ static int __pyx_f_4lxml_5etree__findOutputMethod(PyObject *__pyx_v_method) { * if method == "xml": * return OUTPUT_METHOD_XML */ - __Pyx_TraceLine(21,0,__PYX_ERR(8, 21, __pyx_L1_error)) __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_method, __pyx_n_s_lower); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; @@ -143270,12 +133751,9 @@ static int __pyx_f_4lxml_5etree__findOutputMethod(PyObject *__pyx_v_method) { __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 21, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 21, __pyx_L1_error) - } + __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(8, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_method, __pyx_t_3); @@ -143288,7 +133766,6 @@ static int __pyx_f_4lxml_5etree__findOutputMethod(PyObject *__pyx_v_method) { * return OUTPUT_METHOD_XML * if method == "html": */ - __Pyx_TraceLine(22,0,__PYX_ERR(8, 22, __pyx_L1_error)) __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_method, __pyx_n_s_xml, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(8, 22, __pyx_L1_error) if (__pyx_t_2) { @@ -143299,7 +133776,6 @@ static int __pyx_f_4lxml_5etree__findOutputMethod(PyObject *__pyx_v_method) { * if method == "html": * return OUTPUT_METHOD_HTML */ - __Pyx_TraceLine(23,0,__PYX_ERR(8, 23, __pyx_L1_error)) __pyx_r = __pyx_e_4lxml_5etree_OUTPUT_METHOD_XML; goto __pyx_L0; @@ -143319,7 +133795,6 @@ static int __pyx_f_4lxml_5etree__findOutputMethod(PyObject *__pyx_v_method) { * return OUTPUT_METHOD_HTML * if method == "text": */ - __Pyx_TraceLine(24,0,__PYX_ERR(8, 24, __pyx_L1_error)) __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_method, __pyx_n_s_html, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(8, 24, __pyx_L1_error) if (__pyx_t_2) { @@ -143330,7 +133805,6 @@ static int __pyx_f_4lxml_5etree__findOutputMethod(PyObject *__pyx_v_method) { * if method == "text": * return OUTPUT_METHOD_TEXT */ - __Pyx_TraceLine(25,0,__PYX_ERR(8, 25, __pyx_L1_error)) __pyx_r = __pyx_e_4lxml_5etree_OUTPUT_METHOD_HTML; goto __pyx_L0; @@ -143350,7 +133824,6 @@ static int __pyx_f_4lxml_5etree__findOutputMethod(PyObject *__pyx_v_method) { * return OUTPUT_METHOD_TEXT * raise ValueError(f"unknown output method {method!r}") */ - __Pyx_TraceLine(26,0,__PYX_ERR(8, 26, __pyx_L1_error)) __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_method, __pyx_n_s_text, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(8, 26, __pyx_L1_error) if (__pyx_t_2) { @@ -143361,7 +133834,6 @@ static int __pyx_f_4lxml_5etree__findOutputMethod(PyObject *__pyx_v_method) { * raise ValueError(f"unknown output method {method!r}") * */ - __Pyx_TraceLine(27,0,__PYX_ERR(8, 27, __pyx_L1_error)) __pyx_r = __pyx_e_4lxml_5etree_OUTPUT_METHOD_TEXT; goto __pyx_L0; @@ -143381,7 +133853,6 @@ static int __pyx_f_4lxml_5etree__findOutputMethod(PyObject *__pyx_v_method) { * * */ - __Pyx_TraceLine(28,0,__PYX_ERR(8, 28, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_method), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_unknown_output_method, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 28, __pyx_L1_error) @@ -143411,7 +133882,6 @@ static int __pyx_f_4lxml_5etree__findOutputMethod(PyObject *__pyx_v_method) { __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_method); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -143432,7 +133902,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO int __pyx_v_error_result; PyObject *__pyx_v_text = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -143450,7 +133919,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; __Pyx_RefNannySetupContext("_textToString", 0); - __Pyx_TraceCall("_textToString", __pyx_f[8], 31, 0, __PYX_ERR(8, 31, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_encoding); /* "src/lxml/serializer.pxi":38 @@ -143460,7 +133928,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * if c_buffer is NULL: * raise MemoryError() */ - __Pyx_TraceLine(38,0,__PYX_ERR(8, 38, __pyx_L1_error)) __pyx_v_c_buffer = xmlBufferCreate(); /* "src/lxml/serializer.pxi":39 @@ -143470,7 +133937,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * raise MemoryError() * */ - __Pyx_TraceLine(39,0,__PYX_ERR(8, 39, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_buffer == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -143481,7 +133947,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * * with nogil: */ - __Pyx_TraceLine(40,0,__PYX_ERR(8, 40, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(8, 40, __pyx_L1_error) /* "src/lxml/serializer.pxi":39 @@ -143500,7 +133965,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * error_result = tree.xmlNodeBufGetContent(c_buffer, c_node) * if with_tail: */ - __Pyx_TraceLine(42,0,__PYX_ERR(8, 42, __pyx_L1_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -143516,7 +133980,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * if with_tail: * c_text_node = _textNodeOrSkip(c_node.next) */ - __Pyx_TraceLine(43,1,__PYX_ERR(8, 43, __pyx_L5_error)) __pyx_v_error_result = xmlNodeBufGetContent(__pyx_v_c_buffer, __pyx_v_c_node); /* "src/lxml/serializer.pxi":44 @@ -143526,7 +133989,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * c_text_node = _textNodeOrSkip(c_node.next) * while c_text_node is not NULL: */ - __Pyx_TraceLine(44,1,__PYX_ERR(8, 44, __pyx_L5_error)) __pyx_t_1 = (__pyx_v_with_tail != 0); if (__pyx_t_1) { @@ -143537,7 +133999,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * while c_text_node is not NULL: * tree.xmlBufferWriteChar(c_buffer, c_text_node.content) */ - __Pyx_TraceLine(45,1,__PYX_ERR(8, 45, __pyx_L5_error)) __pyx_v_c_text_node = __pyx_f_4lxml_5etree__textNodeOrSkip(__pyx_v_c_node->next); /* "src/lxml/serializer.pxi":46 @@ -143547,7 +134008,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * tree.xmlBufferWriteChar(c_buffer, c_text_node.content) * c_text_node = _textNodeOrSkip(c_text_node.next) */ - __Pyx_TraceLine(46,1,__PYX_ERR(8, 46, __pyx_L5_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_text_node != NULL) != 0); if (!__pyx_t_1) break; @@ -143559,7 +134019,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * c_text_node = _textNodeOrSkip(c_text_node.next) * c_text = tree.xmlBufferContent(c_buffer) */ - __Pyx_TraceLine(47,1,__PYX_ERR(8, 47, __pyx_L5_error)) xmlBufferWriteChar(__pyx_v_c_buffer, ((const char *)__pyx_v_c_text_node->content)); /* "src/lxml/serializer.pxi":48 @@ -143569,7 +134028,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * c_text = tree.xmlBufferContent(c_buffer) * */ - __Pyx_TraceLine(48,1,__PYX_ERR(8, 48, __pyx_L5_error)) __pyx_v_c_text_node = __pyx_f_4lxml_5etree__textNodeOrSkip(__pyx_v_c_text_node->next); } @@ -143589,7 +134047,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * * if error_result < 0 or c_text is NULL: */ - __Pyx_TraceLine(49,1,__PYX_ERR(8, 49, __pyx_L5_error)) __pyx_v_c_text = xmlBufferContent(__pyx_v_c_buffer); } @@ -143600,7 +134057,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * error_result = tree.xmlNodeBufGetContent(c_buffer, c_node) * if with_tail: */ - __Pyx_TraceLine(42,1,__PYX_ERR(8, 42, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -143609,13 +134065,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO #endif goto __pyx_L6; } - __pyx_L5_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L1_error; - } __pyx_L6:; } } @@ -143627,7 +134076,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * tree.xmlBufferFree(c_buffer) * raise SerialisationError, u"Error during serialisation (out of memory?)" */ - __Pyx_TraceLine(51,0,__PYX_ERR(8, 51, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_error_result < 0) != 0); if (!__pyx_t_2) { } else { @@ -143646,7 +134094,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * raise SerialisationError, u"Error during serialisation (out of memory?)" * */ - __Pyx_TraceLine(52,0,__PYX_ERR(8, 52, __pyx_L1_error)) xmlBufferFree(__pyx_v_c_buffer); /* "src/lxml/serializer.pxi":53 @@ -143656,7 +134103,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * * try: */ - __Pyx_TraceLine(53,0,__PYX_ERR(8, 53, __pyx_L1_error)) __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_SerialisationError), __pyx_kp_u_Error_during_serialisation_out_o, 0, 0); __PYX_ERR(8, 53, __pyx_L1_error) @@ -143676,7 +134122,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * needs_conversion = 0 * if encoding is unicode: */ - __Pyx_TraceLine(55,0,__PYX_ERR(8, 55, __pyx_L14_error)) /*try:*/ { /* "src/lxml/serializer.pxi":56 @@ -143686,7 +134131,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * if encoding is unicode: * needs_conversion = 1 */ - __Pyx_TraceLine(56,0,__PYX_ERR(8, 56, __pyx_L14_error)) __pyx_v_needs_conversion = 0; /* "src/lxml/serializer.pxi":57 @@ -143696,7 +134140,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * needs_conversion = 1 * elif encoding is not None: */ - __Pyx_TraceLine(57,0,__PYX_ERR(8, 57, __pyx_L14_error)) __pyx_t_1 = (__pyx_v_encoding == ((PyObject *)(&PyUnicode_Type))); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -143708,7 +134151,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * elif encoding is not None: * # Python prefers lower case encoding names */ - __Pyx_TraceLine(58,0,__PYX_ERR(8, 58, __pyx_L14_error)) __pyx_v_needs_conversion = 1; /* "src/lxml/serializer.pxi":57 @@ -143728,7 +134170,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * # Python prefers lower case encoding names * encoding = encoding.lower() */ - __Pyx_TraceLine(59,0,__PYX_ERR(8, 59, __pyx_L14_error)) __pyx_t_2 = (__pyx_v_encoding != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -143740,7 +134181,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * if encoding not in (u'utf8', u'utf-8'): * if encoding == u'ascii': */ - __Pyx_TraceLine(61,0,__PYX_ERR(8, 61, __pyx_L14_error)) __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s_lower); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 61, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; @@ -143753,12 +134193,9 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 61, __pyx_L14_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 61, __pyx_L14_error) - } + __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(8, 61, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_t_3); @@ -143769,9 +134206,8 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * encoding = encoding.lower() * if encoding not in (u'utf8', u'utf-8'): # <<<<<<<<<<<<<< * if encoding == u'ascii': - * if isutf8(c_text): + * if isutf8l(c_text, tree.xmlBufferLength(c_buffer)): */ - __Pyx_TraceLine(62,0,__PYX_ERR(8, 62, __pyx_L14_error)) __Pyx_INCREF(__pyx_v_encoding); __pyx_t_3 = __pyx_v_encoding; __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_utf8, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(8, 62, __pyx_L14_error) @@ -143791,38 +134227,35 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * encoding = encoding.lower() * if encoding not in (u'utf8', u'utf-8'): * if encoding == u'ascii': # <<<<<<<<<<<<<< - * if isutf8(c_text): + * if isutf8l(c_text, tree.xmlBufferLength(c_buffer)): * # will raise a decode error below */ - __Pyx_TraceLine(63,0,__PYX_ERR(8, 63, __pyx_L14_error)) __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_encoding, __pyx_n_u_ascii, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(8, 63, __pyx_L14_error) if (__pyx_t_2) { /* "src/lxml/serializer.pxi":64 * if encoding not in (u'utf8', u'utf-8'): * if encoding == u'ascii': - * if isutf8(c_text): # <<<<<<<<<<<<<< + * if isutf8l(c_text, tree.xmlBufferLength(c_buffer)): # <<<<<<<<<<<<<< * # will raise a decode error below * needs_conversion = 1 */ - __Pyx_TraceLine(64,0,__PYX_ERR(8, 64, __pyx_L14_error)) - __pyx_t_2 = (__pyx_f_4lxml_5etree_isutf8(__pyx_v_c_text) != 0); + __pyx_t_2 = (__pyx_f_4lxml_5etree_isutf8l(__pyx_v_c_text, xmlBufferLength(__pyx_v_c_buffer)) != 0); if (__pyx_t_2) { /* "src/lxml/serializer.pxi":66 - * if isutf8(c_text): + * if isutf8l(c_text, tree.xmlBufferLength(c_buffer)): * # will raise a decode error below * needs_conversion = 1 # <<<<<<<<<<<<<< * else: * needs_conversion = 1 */ - __Pyx_TraceLine(66,0,__PYX_ERR(8, 66, __pyx_L14_error)) __pyx_v_needs_conversion = 1; /* "src/lxml/serializer.pxi":64 * if encoding not in (u'utf8', u'utf-8'): * if encoding == u'ascii': - * if isutf8(c_text): # <<<<<<<<<<<<<< + * if isutf8l(c_text, tree.xmlBufferLength(c_buffer)): # <<<<<<<<<<<<<< * # will raise a decode error below * needs_conversion = 1 */ @@ -143832,7 +134265,7 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * encoding = encoding.lower() * if encoding not in (u'utf8', u'utf-8'): * if encoding == u'ascii': # <<<<<<<<<<<<<< - * if isutf8(c_text): + * if isutf8l(c_text, tree.xmlBufferLength(c_buffer)): * # will raise a decode error below */ goto __pyx_L20; @@ -143845,7 +134278,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * * if needs_conversion: */ - __Pyx_TraceLine(68,0,__PYX_ERR(8, 68, __pyx_L14_error)) /*else*/ { __pyx_v_needs_conversion = 1; } @@ -143856,7 +134288,7 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * encoding = encoding.lower() * if encoding not in (u'utf8', u'utf-8'): # <<<<<<<<<<<<<< * if encoding == u'ascii': - * if isutf8(c_text): + * if isutf8l(c_text, tree.xmlBufferLength(c_buffer)): */ } @@ -143877,7 +134309,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * text = python.PyUnicode_DecodeUTF8( * c_text, tree.xmlBufferLength(c_buffer), 'strict') */ - __Pyx_TraceLine(70,0,__PYX_ERR(8, 70, __pyx_L14_error)) __pyx_t_2 = (__pyx_v_needs_conversion != 0); if (__pyx_t_2) { @@ -143888,7 +134319,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * c_text, tree.xmlBufferLength(c_buffer), 'strict') * if encoding is not unicode: */ - __Pyx_TraceLine(71,0,__PYX_ERR(8, 71, __pyx_L14_error)) __pyx_t_3 = PyUnicode_DecodeUTF8(((const char *)__pyx_v_c_text), xmlBufferLength(__pyx_v_c_buffer), ((char *)"strict")); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 71, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_text = __pyx_t_3; @@ -143901,7 +134331,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * encoding = _utf8(encoding) * text = python.PyUnicode_AsEncodedString( */ - __Pyx_TraceLine(73,0,__PYX_ERR(8, 73, __pyx_L14_error)) __pyx_t_2 = (__pyx_v_encoding != ((PyObject *)(&PyUnicode_Type))); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -143913,7 +134342,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * text = python.PyUnicode_AsEncodedString( * text, encoding, 'strict') */ - __Pyx_TraceLine(74,0,__PYX_ERR(8, 74, __pyx_L14_error)) __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_encoding); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 74, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_t_3); @@ -143926,7 +134354,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * else: * text = (c_text)[:tree.xmlBufferLength(c_buffer)] */ - __Pyx_TraceLine(76,0,__PYX_ERR(8, 76, __pyx_L14_error)) __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_encoding); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(8, 76, __pyx_L14_error) /* "src/lxml/serializer.pxi":75 @@ -143936,7 +134363,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * text, encoding, 'strict') * else: */ - __Pyx_TraceLine(75,0,__PYX_ERR(8, 75, __pyx_L14_error)) __pyx_t_3 = PyUnicode_AsEncodedString(__pyx_v_text, __pyx_t_6, ((char *)"strict")); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 75, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_text, __pyx_t_3); @@ -143968,7 +134394,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * finally: * tree.xmlBufferFree(c_buffer) */ - __Pyx_TraceLine(78,0,__PYX_ERR(8, 78, __pyx_L14_error)) /*else*/ { __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize(((const char*)((unsigned char *)__pyx_v_c_text)) + 0, xmlBufferLength(__pyx_v_c_buffer) - 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 78, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_3); @@ -143985,7 +134410,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * return text * */ - __Pyx_TraceLine(80,0,__PYX_ERR(8, 80, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ xmlBufferFree(__pyx_v_c_buffer); @@ -144035,7 +134459,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO * * */ - __Pyx_TraceLine(81,0,__PYX_ERR(8, 81, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_text); __pyx_r = __pyx_v_text; @@ -144060,7 +134483,6 @@ static PyObject *__pyx_f_4lxml_5etree__textToString(xmlNode *__pyx_v_c_node, PyO __Pyx_XDECREF(__pyx_v_text); __Pyx_XDECREF(__pyx_v_encoding); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -144083,7 +134505,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem int __pyx_v_error_result; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -144091,19 +134512,19 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; - Py_ssize_t __pyx_t_7; - Py_UCS4 __pyx_t_8; - xmlBuf *__pyx_t_9; - int __pyx_t_10; - char const *__pyx_t_11; - PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_7 = NULL; + Py_ssize_t __pyx_t_8; + Py_UCS4 __pyx_t_9; + xmlBuf *__pyx_t_10; + int __pyx_t_11; + char const *__pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; + PyObject *__pyx_t_18 = NULL; __Pyx_RefNannySetupContext("_tostring", 0); - __Pyx_TraceCall("_tostring", __pyx_f[8], 84, 0, __PYX_ERR(8, 84, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_encoding); __Pyx_INCREF(__pyx_v_doctype); @@ -144114,7 +134535,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * return None * _assertValidNode(element) */ - __Pyx_TraceLine(98,0,__PYX_ERR(8, 98, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_element) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -144126,7 +134546,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * _assertValidNode(element) * c_method = _findOutputMethod(method) */ - __Pyx_TraceLine(99,0,__PYX_ERR(8, 99, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -144147,7 +134566,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * c_method = _findOutputMethod(method) * if c_method == OUTPUT_METHOD_TEXT: */ - __Pyx_TraceLine(100,0,__PYX_ERR(8, 100, __pyx_L1_error)) __pyx_t_3 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(8, 100, __pyx_L1_error) /* "src/lxml/serializer.pxi":101 @@ -144157,7 +134575,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * if c_method == OUTPUT_METHOD_TEXT: * return _textToString(element._c_node, encoding, with_tail) */ - __Pyx_TraceLine(101,0,__PYX_ERR(8, 101, __pyx_L1_error)) __pyx_t_3 = __pyx_f_4lxml_5etree__findOutputMethod(__pyx_v_method); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(8, 101, __pyx_L1_error) __pyx_v_c_method = __pyx_t_3; @@ -144168,7 +134585,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * return _textToString(element._c_node, encoding, with_tail) * if encoding is None or encoding is unicode: */ - __Pyx_TraceLine(102,0,__PYX_ERR(8, 102, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_method == __pyx_e_4lxml_5etree_OUTPUT_METHOD_TEXT) != 0); if (__pyx_t_2) { @@ -144179,7 +134595,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * if encoding is None or encoding is unicode: * c_enc = NULL */ - __Pyx_TraceLine(103,0,__PYX_ERR(8, 103, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __pyx_f_4lxml_5etree__textToString(__pyx_v_element->_c_node, __pyx_v_encoding, __pyx_v_with_tail); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -144203,7 +134618,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * c_enc = NULL * else: */ - __Pyx_TraceLine(104,0,__PYX_ERR(8, 104, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_encoding == Py_None); __pyx_t_5 = (__pyx_t_1 != 0); if (!__pyx_t_5) { @@ -144224,7 +134638,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * else: * encoding = _utf8(encoding) */ - __Pyx_TraceLine(105,0,__PYX_ERR(8, 105, __pyx_L1_error)) __pyx_v_c_enc = NULL; /* "src/lxml/serializer.pxi":104 @@ -144244,7 +134657,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * c_enc = _cstr(encoding) * if doctype is None: */ - __Pyx_TraceLine(107,0,__PYX_ERR(8, 107, __pyx_L1_error)) /*else*/ { __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_v_encoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -144258,7 +134670,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * if doctype is None: * c_doctype = NULL */ - __Pyx_TraceLine(108,0,__PYX_ERR(8, 108, __pyx_L1_error)) __pyx_v_c_enc = PyBytes_AS_STRING(__pyx_v_encoding); } __pyx_L5:; @@ -144270,7 +134681,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * c_doctype = NULL * else: */ - __Pyx_TraceLine(109,0,__PYX_ERR(8, 109, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_doctype == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -144282,7 +134692,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * else: * doctype = _utf8(doctype) */ - __Pyx_TraceLine(110,0,__PYX_ERR(8, 110, __pyx_L1_error)) __pyx_v_c_doctype = NULL; /* "src/lxml/serializer.pxi":109 @@ -144302,7 +134711,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * c_doctype = _xcstr(doctype) * # it is necessary to *and* find the encoding handler *and* use */ - __Pyx_TraceLine(112,0,__PYX_ERR(8, 112, __pyx_L1_error)) /*else*/ { __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_v_doctype); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -144316,7 +134724,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * # it is necessary to *and* find the encoding handler *and* use * # encoding during output */ - __Pyx_TraceLine(113,0,__PYX_ERR(8, 113, __pyx_L1_error)) __pyx_v_c_doctype = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_doctype); } __pyx_L8:; @@ -144328,7 +134735,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * if enchandler is NULL and c_enc is not NULL: * if encoding is not None: */ - __Pyx_TraceLine(116,0,__PYX_ERR(8, 116, __pyx_L1_error)) __pyx_v_enchandler = xmlFindCharEncodingHandler(__pyx_v_c_enc); /* "src/lxml/serializer.pxi":117 @@ -144338,7 +134744,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * if encoding is not None: * encoding = encoding.decode('UTF-8') */ - __Pyx_TraceLine(117,0,__PYX_ERR(8, 117, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_enchandler == NULL) != 0); if (__pyx_t_2) { } else { @@ -144357,7 +134762,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * encoding = encoding.decode('UTF-8') * raise LookupError, f"unknown encoding: '{encoding}'" */ - __Pyx_TraceLine(118,0,__PYX_ERR(8, 118, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_encoding != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -144369,14 +134773,25 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * raise LookupError, f"unknown encoding: '{encoding}'" * c_buffer = tree.xmlAllocOutputBuffer(enchandler) */ - __Pyx_TraceLine(119,0,__PYX_ERR(8, 119, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s_decode); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 119, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__256, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 119, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_t_6); - __pyx_t_6 = 0; + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_kp_s_UTF_8) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_kp_s_UTF_8); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 119, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_t_4); + __pyx_t_4 = 0; /* "src/lxml/serializer.pxi":118 * enchandler = tree.xmlFindCharEncodingHandler(c_enc) @@ -144394,31 +134809,30 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * c_buffer = tree.xmlAllocOutputBuffer(enchandler) * if c_buffer is NULL: */ - __Pyx_TraceLine(120,0,__PYX_ERR(8, 120, __pyx_L1_error)) - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 120, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = 0; - __pyx_t_8 = 127; + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = 0; + __pyx_t_9 = 127; __Pyx_INCREF(__pyx_kp_u_unknown_encoding); - __pyx_t_7 += 19; + __pyx_t_8 += 19; __Pyx_GIVEREF(__pyx_kp_u_unknown_encoding); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_unknown_encoding); - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_encoding, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 120, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_8; - __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4); - __pyx_t_4 = 0; - __Pyx_INCREF(__pyx_kp_u__60); - __pyx_t_7 += 1; - __Pyx_GIVEREF(__pyx_kp_u__60); - PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u__60); - __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 120, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_Raise(__pyx_builtin_LookupError, __pyx_t_4, 0, 0); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_unknown_encoding); + __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_encoding, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_9; + __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6); + __pyx_t_6 = 0; + __Pyx_INCREF(__pyx_kp_u__21); + __pyx_t_8 += 1; + __Pyx_GIVEREF(__pyx_kp_u__21); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__21); + __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_builtin_LookupError, __pyx_t_6, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(8, 120, __pyx_L1_error) /* "src/lxml/serializer.pxi":117 @@ -144437,7 +134851,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * if c_buffer is NULL: * tree.xmlCharEncCloseFunc(enchandler) */ - __Pyx_TraceLine(121,0,__PYX_ERR(8, 121, __pyx_L1_error)) __pyx_v_c_buffer = xmlAllocOutputBuffer(__pyx_v_enchandler); /* "src/lxml/serializer.pxi":122 @@ -144447,7 +134860,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * tree.xmlCharEncCloseFunc(enchandler) * raise MemoryError() */ - __Pyx_TraceLine(122,0,__PYX_ERR(8, 122, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_buffer == NULL) != 0); if (unlikely(__pyx_t_2)) { @@ -144458,7 +134870,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * raise MemoryError() * */ - __Pyx_TraceLine(123,0,__PYX_ERR(8, 123, __pyx_L1_error)) (void)(xmlCharEncCloseFunc(__pyx_v_enchandler)); /* "src/lxml/serializer.pxi":124 @@ -144468,7 +134879,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * * with nogil: */ - __Pyx_TraceLine(124,0,__PYX_ERR(8, 124, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(8, 124, __pyx_L1_error) /* "src/lxml/serializer.pxi":122 @@ -144487,7 +134897,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * _writeNodeToBuffer(c_buffer, element._c_node, c_enc, c_doctype, c_method, * write_xml_declaration, write_complete_document, */ - __Pyx_TraceLine(126,0,__PYX_ERR(8, 126, __pyx_L1_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -144503,7 +134912,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * write_xml_declaration, write_complete_document, * pretty_print, with_tail, standalone) */ - __Pyx_TraceLine(127,1,__PYX_ERR(8, 127, __pyx_L15_error)) __pyx_f_4lxml_5etree__writeNodeToBuffer(__pyx_v_c_buffer, __pyx_v_element->_c_node, __pyx_v_c_enc, __pyx_v_c_doctype, __pyx_v_c_method, __pyx_v_write_xml_declaration, __pyx_v_write_complete_document, __pyx_v_pretty_print, __pyx_v_with_tail, __pyx_v_standalone); /* "src/lxml/serializer.pxi":130 @@ -144513,7 +134921,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * if c_buffer.conv is not NULL: * c_result_buffer = c_buffer.conv */ - __Pyx_TraceLine(130,1,__PYX_ERR(8, 130, __pyx_L15_error)) (void)(xmlOutputBufferFlush(__pyx_v_c_buffer)); /* "src/lxml/serializer.pxi":131 @@ -144523,7 +134930,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * c_result_buffer = c_buffer.conv * else: */ - __Pyx_TraceLine(131,1,__PYX_ERR(8, 131, __pyx_L15_error)) __pyx_t_2 = ((__pyx_v_c_buffer->conv != NULL) != 0); if (__pyx_t_2) { @@ -144534,9 +134940,8 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * else: * c_result_buffer = c_buffer.buffer */ - __Pyx_TraceLine(132,1,__PYX_ERR(8, 132, __pyx_L15_error)) - __pyx_t_9 = __pyx_v_c_buffer->conv; - __pyx_v_c_result_buffer = __pyx_t_9; + __pyx_t_10 = __pyx_v_c_buffer->conv; + __pyx_v_c_result_buffer = __pyx_t_10; /* "src/lxml/serializer.pxi":131 * pretty_print, with_tail, standalone) @@ -144555,10 +134960,9 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * * error_result = c_buffer.error */ - __Pyx_TraceLine(134,1,__PYX_ERR(8, 134, __pyx_L15_error)) /*else*/ { - __pyx_t_9 = __pyx_v_c_buffer->buffer; - __pyx_v_c_result_buffer = __pyx_t_9; + __pyx_t_10 = __pyx_v_c_buffer->buffer; + __pyx_v_c_result_buffer = __pyx_t_10; } __pyx_L17:; } @@ -144570,7 +134974,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * _writeNodeToBuffer(c_buffer, element._c_node, c_enc, c_doctype, c_method, * write_xml_declaration, write_complete_document, */ - __Pyx_TraceLine(126,1,__PYX_ERR(8, 126, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -144579,13 +134982,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem #endif goto __pyx_L16; } - __pyx_L15_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L1_error; - } __pyx_L16:; } } @@ -144597,7 +134993,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * if error_result != xmlerror.XML_ERR_OK: * tree.xmlOutputBufferClose(c_buffer) */ - __Pyx_TraceLine(136,0,__PYX_ERR(8, 136, __pyx_L1_error)) __pyx_t_3 = __pyx_v_c_buffer->error; __pyx_v_error_result = __pyx_t_3; @@ -144608,7 +135003,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * tree.xmlOutputBufferClose(c_buffer) * _raiseSerialisationError(error_result) */ - __Pyx_TraceLine(137,0,__PYX_ERR(8, 137, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_error_result != XML_ERR_OK) != 0); if (__pyx_t_2) { @@ -144619,7 +135013,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * _raiseSerialisationError(error_result) * */ - __Pyx_TraceLine(138,0,__PYX_ERR(8, 138, __pyx_L1_error)) (void)(xmlOutputBufferClose(__pyx_v_c_buffer)); /* "src/lxml/serializer.pxi":139 @@ -144629,10 +135022,9 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * * try: */ - __Pyx_TraceLine(139,0,__PYX_ERR(8, 139, __pyx_L1_error)) - __pyx_t_4 = __pyx_f_4lxml_5etree__raiseSerialisationError(__pyx_v_error_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 139, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __pyx_f_4lxml_5etree__raiseSerialisationError(__pyx_v_error_result); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "src/lxml/serializer.pxi":137 * @@ -144650,7 +135042,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * if encoding is unicode: * result = (tree.xmlBufContent( */ - __Pyx_TraceLine(141,0,__PYX_ERR(8, 141, __pyx_L20_error)) /*try:*/ { /* "src/lxml/serializer.pxi":142 @@ -144660,7 +135051,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * result = (tree.xmlBufContent( * c_result_buffer))[:tree.xmlBufUse(c_result_buffer)].decode('UTF-8') */ - __Pyx_TraceLine(142,0,__PYX_ERR(8, 142, __pyx_L20_error)) __pyx_t_2 = (__pyx_v_encoding == ((PyObject *)(&PyUnicode_Type))); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -144672,11 +135062,10 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * else: * result = (tree.xmlBufContent( */ - __Pyx_TraceLine(144,0,__PYX_ERR(8, 144, __pyx_L20_error)) - __pyx_t_4 = __Pyx_decode_c_string(((char const *)((unsigned char *)xmlBufContent(__pyx_v_c_result_buffer))), 0, xmlBufUse(__pyx_v_c_result_buffer), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 144, __pyx_L20_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_v_result = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_decode_c_string(((char const *)((unsigned char *)xmlBufContent(__pyx_v_c_result_buffer))), 0, xmlBufUse(__pyx_v_c_result_buffer), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 144, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_result = __pyx_t_6; + __pyx_t_6 = 0; /* "src/lxml/serializer.pxi":142 * @@ -144695,7 +135084,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * c_result_buffer))[:tree.xmlBufUse(c_result_buffer)] * finally: */ - __Pyx_TraceLine(146,0,__PYX_ERR(8, 146, __pyx_L20_error)) /*else*/ { /* "src/lxml/serializer.pxi":147 @@ -144705,9 +135093,8 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * finally: * error_result = tree.xmlOutputBufferClose(c_buffer) */ - __Pyx_TraceLine(147,0,__PYX_ERR(8, 147, __pyx_L20_error)) - __pyx_t_4 = __Pyx_PyBytes_FromStringAndSize(((const char*)((unsigned char *)xmlBufContent(__pyx_v_c_result_buffer))) + 0, xmlBufUse(__pyx_v_c_result_buffer) - 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 147, __pyx_L20_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyBytes_FromStringAndSize(((const char*)((unsigned char *)xmlBufContent(__pyx_v_c_result_buffer))) + 0, xmlBufUse(__pyx_v_c_result_buffer) - 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 147, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_6); /* "src/lxml/serializer.pxi":146 * c_result_buffer))[:tree.xmlBufUse(c_result_buffer)].decode('UTF-8') @@ -144716,12 +135103,11 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * c_result_buffer))[:tree.xmlBufUse(c_result_buffer)] * finally: */ - __Pyx_TraceLine(146,0,__PYX_ERR(8, 146, __pyx_L20_error)) - __pyx_t_6 = __pyx_t_4; - __Pyx_INCREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_v_result = __pyx_t_6; - __pyx_t_6 = 0; + __pyx_t_4 = __pyx_t_6; + __Pyx_INCREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_result = __pyx_t_4; + __pyx_t_4 = 0; } __pyx_L22:; } @@ -144733,7 +135119,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * if error_result < 0: * _raiseSerialisationError(error_result) */ - __Pyx_TraceLine(149,0,__PYX_ERR(8, 149, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ __pyx_v_error_result = xmlOutputBufferClose(__pyx_v_c_buffer); @@ -144743,33 +135128,34 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign - __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); - __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); - __pyx_t_3 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename; + __Pyx_XGOTREF(__pyx_t_18); + __pyx_t_3 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename; { __pyx_v_error_result = xmlOutputBufferClose(__pyx_v_c_buffer); } if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); - __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); } - __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14); - __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; - __pyx_lineno = __pyx_t_3; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11; + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15); + __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; + __pyx_lineno = __pyx_t_3; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12; goto __pyx_L1_error; } __pyx_L21:; @@ -144782,7 +135168,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * _raiseSerialisationError(error_result) * return result */ - __Pyx_TraceLine(150,0,__PYX_ERR(8, 150, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_error_result < 0) != 0); if (__pyx_t_1) { @@ -144793,10 +135178,9 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * return result * */ - __Pyx_TraceLine(151,0,__PYX_ERR(8, 151, __pyx_L1_error)) - __pyx_t_6 = __pyx_f_4lxml_5etree__raiseSerialisationError(__pyx_v_error_result); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 151, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __pyx_f_4lxml_5etree__raiseSerialisationError(__pyx_v_error_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "src/lxml/serializer.pxi":150 * finally: @@ -144814,7 +135198,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem * * cdef bytes _tostringC14N(element_or_tree, bint exclusive, bint with_comments, inclusive_ns_prefixes): */ - __Pyx_TraceLine(152,0,__PYX_ERR(8, 152, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; @@ -144832,6 +135215,7 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("lxml.etree._tostring", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -144839,7 +135223,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostring(struct LxmlElement *__pyx_v_elem __Pyx_XDECREF(__pyx_v_encoding); __Pyx_XDECREF(__pyx_v_doctype); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -144860,7 +135243,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or struct LxmlDocument *__pyx_v_doc = 0; xmlChar **__pyx_v_c_inclusive_ns_prefixes; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -144877,9 +135259,7 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; - char const *__pyx_t_16; __Pyx_RefNannySetupContext("_tostringC14N", 0); - __Pyx_TraceCall("_tostringC14N", __pyx_f[8], 154, 0, __PYX_ERR(8, 154, __pyx_L1_error)); /* "src/lxml/serializer.pxi":156 * cdef bytes _tostringC14N(element_or_tree, bint exclusive, bint with_comments, inclusive_ns_prefixes): @@ -144888,7 +135268,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or * cdef int byte_count = -1 * cdef bytes result */ - __Pyx_TraceLine(156,0,__PYX_ERR(8, 156, __pyx_L1_error)) __pyx_v_c_buffer = NULL; /* "src/lxml/serializer.pxi":157 @@ -144898,7 +135277,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or * cdef bytes result * cdef _Document doc */ - __Pyx_TraceLine(157,0,__PYX_ERR(8, 157, __pyx_L1_error)) __pyx_v_byte_count = -1; /* "src/lxml/serializer.pxi":163 @@ -144908,7 +135286,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or * _assertValidNode(<_Element>element_or_tree) * doc = (<_Element>element_or_tree)._doc */ - __Pyx_TraceLine(163,0,__PYX_ERR(8, 163, __pyx_L1_error)) __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_element_or_tree, __pyx_ptype_4lxml_5etree__Element); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -144920,7 +135297,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or * doc = (<_Element>element_or_tree)._doc * c_doc = _plainFakeRootDoc(doc._c_doc, (<_Element>element_or_tree)._c_node, 0) */ - __Pyx_TraceLine(164,0,__PYX_ERR(8, 164, __pyx_L1_error)) __pyx_t_3 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_v_element_or_tree)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(8, 164, __pyx_L1_error) /* "src/lxml/serializer.pxi":165 @@ -144930,7 +135306,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or * c_doc = _plainFakeRootDoc(doc._c_doc, (<_Element>element_or_tree)._c_node, 0) * else: */ - __Pyx_TraceLine(165,0,__PYX_ERR(8, 165, __pyx_L1_error)) __pyx_t_4 = ((PyObject *)((struct LxmlElement *)__pyx_v_element_or_tree)->_doc); __Pyx_INCREF(__pyx_t_4); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_4); @@ -144943,7 +135318,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or * else: * doc = _documentOrRaise(element_or_tree) */ - __Pyx_TraceLine(166,0,__PYX_ERR(8, 166, __pyx_L1_error)) __pyx_t_5 = __pyx_f_4lxml_5etree__plainFakeRootDoc(__pyx_v_doc->_c_doc, ((struct LxmlElement *)__pyx_v_element_or_tree)->_c_node, 0); if (unlikely(__pyx_t_5 == ((xmlDoc *)NULL))) __PYX_ERR(8, 166, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_5; @@ -144964,7 +135338,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or * _assertValidDoc(doc) * c_doc = doc._c_doc */ - __Pyx_TraceLine(168,0,__PYX_ERR(8, 168, __pyx_L1_error)) /*else*/ { __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__documentOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -144978,7 +135351,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or * c_doc = doc._c_doc * */ - __Pyx_TraceLine(169,0,__PYX_ERR(8, 169, __pyx_L1_error)) __pyx_t_3 = __pyx_f_4lxml_5etree__assertValidDoc(__pyx_v_doc); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(8, 169, __pyx_L1_error) /* "src/lxml/serializer.pxi":170 @@ -144988,7 +135360,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or * * c_inclusive_ns_prefixes = _convert_ns_prefixes(c_doc.dict, inclusive_ns_prefixes) if inclusive_ns_prefixes else NULL */ - __Pyx_TraceLine(170,0,__PYX_ERR(8, 170, __pyx_L1_error)) __pyx_t_5 = __pyx_v_doc->_c_doc; __pyx_v_c_doc = __pyx_t_5; } @@ -145001,7 +135372,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or * try: * with nogil: */ - __Pyx_TraceLine(172,0,__PYX_ERR(8, 172, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_inclusive_ns_prefixes); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(8, 172, __pyx_L1_error) if (__pyx_t_2) { __pyx_t_7 = __pyx_f_4lxml_5etree__convert_ns_prefixes(__pyx_v_c_doc->dict, __pyx_v_inclusive_ns_prefixes); if (unlikely(__pyx_t_7 == ((xmlChar **)NULL))) __PYX_ERR(8, 172, __pyx_L1_error) @@ -145018,7 +135388,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or * with nogil: * byte_count = c14n.xmlC14NDocDumpMemory( */ - __Pyx_TraceLine(173,0,__PYX_ERR(8, 173, __pyx_L5_error)) /*try:*/ { /* "src/lxml/serializer.pxi":174 @@ -145028,7 +135397,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or * byte_count = c14n.xmlC14NDocDumpMemory( * c_doc, NULL, exclusive, c_inclusive_ns_prefixes, with_comments, &c_buffer) */ - __Pyx_TraceLine(174,0,__PYX_ERR(8, 174, __pyx_L5_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -145044,7 +135412,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or * c_doc, NULL, exclusive, c_inclusive_ns_prefixes, with_comments, &c_buffer) * */ - __Pyx_TraceLine(175,1,__PYX_ERR(8, 175, __pyx_L8_error)) __pyx_v_byte_count = xmlC14NDocDumpMemory(__pyx_v_c_doc, NULL, __pyx_v_exclusive, __pyx_v_c_inclusive_ns_prefixes, __pyx_v_with_comments, (&__pyx_v_c_buffer)); } @@ -145055,7 +135422,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or * byte_count = c14n.xmlC14NDocDumpMemory( * c_doc, NULL, exclusive, c_inclusive_ns_prefixes, with_comments, &c_buffer) */ - __Pyx_TraceLine(174,1,__PYX_ERR(8, 174, __pyx_L5_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -145064,13 +135430,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or #endif goto __pyx_L9; } - __pyx_L8_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L5_error; - } __pyx_L9:; } } @@ -145083,7 +135442,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or * if c_inclusive_ns_prefixes is not NULL: * python.lxml_free(c_inclusive_ns_prefixes) */ - __Pyx_TraceLine(179,0,__PYX_ERR(8, 179, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ __pyx_f_4lxml_5etree__destroyFakeDoc(__pyx_v_doc->_c_doc, __pyx_v_c_doc); @@ -145095,7 +135453,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or * python.lxml_free(c_inclusive_ns_prefixes) * */ - __Pyx_TraceLine(180,0,__PYX_ERR(8, 180, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_inclusive_ns_prefixes != NULL) != 0); if (__pyx_t_2) { @@ -145106,7 +135463,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or * * if byte_count < 0 or c_buffer is NULL: */ - __Pyx_TraceLine(181,0,__PYX_ERR(8, 181, __pyx_L1_error)) lxml_free(__pyx_v_c_inclusive_ns_prefixes); /* "src/lxml/serializer.pxi":180 @@ -145119,89 +135475,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or } goto __pyx_L6; } - __pyx_L5_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_13); - __Pyx_XGOTREF(__pyx_t_14); - __Pyx_XGOTREF(__pyx_t_15); - __pyx_t_3 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename; - { - - /* "src/lxml/serializer.pxi":179 - * - * finally: - * _destroyFakeDoc(doc._c_doc, c_doc) # <<<<<<<<<<<<<< - * if c_inclusive_ns_prefixes is not NULL: - * python.lxml_free(c_inclusive_ns_prefixes) - */ - __Pyx_TraceLine(179,0,__PYX_ERR(8, 179, __pyx_L12_error)) - __pyx_f_4lxml_5etree__destroyFakeDoc(__pyx_v_doc->_c_doc, __pyx_v_c_doc); - - /* "src/lxml/serializer.pxi":180 - * finally: - * _destroyFakeDoc(doc._c_doc, c_doc) - * if c_inclusive_ns_prefixes is not NULL: # <<<<<<<<<<<<<< - * python.lxml_free(c_inclusive_ns_prefixes) - * - */ - __Pyx_TraceLine(180,0,__PYX_ERR(8, 180, __pyx_L12_error)) - __pyx_t_2 = ((__pyx_v_c_inclusive_ns_prefixes != NULL) != 0); - if (__pyx_t_2) { - - /* "src/lxml/serializer.pxi":181 - * _destroyFakeDoc(doc._c_doc, c_doc) - * if c_inclusive_ns_prefixes is not NULL: - * python.lxml_free(c_inclusive_ns_prefixes) # <<<<<<<<<<<<<< - * - * if byte_count < 0 or c_buffer is NULL: - */ - __Pyx_TraceLine(181,0,__PYX_ERR(8, 181, __pyx_L12_error)) - lxml_free(__pyx_v_c_inclusive_ns_prefixes); - - /* "src/lxml/serializer.pxi":180 - * finally: - * _destroyFakeDoc(doc._c_doc, c_doc) - * if c_inclusive_ns_prefixes is not NULL: # <<<<<<<<<<<<<< - * python.lxml_free(c_inclusive_ns_prefixes) - * - */ - } - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_XGIVEREF(__pyx_t_15); - __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); - } - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12); - __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; - __pyx_lineno = __pyx_t_3; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9; - goto __pyx_L1_error; - __pyx_L12_error:; - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_XGIVEREF(__pyx_t_15); - __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); - } - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; - goto __pyx_L1_error; - } __pyx_L6:; } @@ -145212,16 +135485,15 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or * if c_buffer is not NULL: * tree.xmlFree(c_buffer) */ - __Pyx_TraceLine(183,0,__PYX_ERR(8, 183, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_byte_count < 0) != 0); if (!__pyx_t_1) { } else { __pyx_t_2 = __pyx_t_1; - goto __pyx_L15_bool_binop_done; + goto __pyx_L12_bool_binop_done; } __pyx_t_1 = ((__pyx_v_c_buffer == NULL) != 0); __pyx_t_2 = __pyx_t_1; - __pyx_L15_bool_binop_done:; + __pyx_L12_bool_binop_done:; if (__pyx_t_2) { /* "src/lxml/serializer.pxi":184 @@ -145231,7 +135503,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or * tree.xmlFree(c_buffer) * raise C14NError, u"C14N failed" */ - __Pyx_TraceLine(184,0,__PYX_ERR(8, 184, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_buffer != NULL) != 0); if (__pyx_t_2) { @@ -145242,7 +135513,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or * raise C14NError, u"C14N failed" * try: */ - __Pyx_TraceLine(185,0,__PYX_ERR(8, 185, __pyx_L1_error)) xmlFree(__pyx_v_c_buffer); /* "src/lxml/serializer.pxi":184 @@ -145261,7 +135531,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or * try: * result = c_buffer[:byte_count] */ - __Pyx_TraceLine(186,0,__PYX_ERR(8, 186, __pyx_L1_error)) __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_C14NError), __pyx_kp_u_C14N_failed, 0, 0); __PYX_ERR(8, 186, __pyx_L1_error) @@ -145281,7 +135550,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or * result = c_buffer[:byte_count] * finally: */ - __Pyx_TraceLine(187,0,__PYX_ERR(8, 187, __pyx_L19_error)) /*try:*/ { /* "src/lxml/serializer.pxi":188 @@ -145291,8 +135559,7 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or * finally: * tree.xmlFree(c_buffer) */ - __Pyx_TraceLine(188,0,__PYX_ERR(8, 188, __pyx_L19_error)) - __pyx_t_4 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_c_buffer) + 0, __pyx_v_byte_count - 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 188, __pyx_L19_error) + __pyx_t_4 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_c_buffer) + 0, __pyx_v_byte_count - 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 188, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_result = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; @@ -145305,45 +135572,44 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or * return result * */ - __Pyx_TraceLine(190,0,__PYX_ERR(8, 190, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ xmlFree(__pyx_v_c_buffer); - goto __pyx_L20; + goto __pyx_L17; } - __pyx_L19_error:; + __pyx_L16_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign - __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; + __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13); - __Pyx_XGOTREF(__pyx_t_15); - __Pyx_XGOTREF(__pyx_t_14); - __Pyx_XGOTREF(__pyx_t_13); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_11); + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); __Pyx_XGOTREF(__pyx_t_10); - __pyx_t_8 = __pyx_lineno; __pyx_t_3 = __pyx_clineno; __pyx_t_16 = __pyx_filename; + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_15); + __pyx_t_3 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename; { xmlFree(__pyx_v_c_buffer); } if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); } - __Pyx_XGIVEREF(__pyx_t_15); - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_ErrRestore(__pyx_t_15, __pyx_t_14, __pyx_t_13); - __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; - __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_3; __pyx_filename = __pyx_t_16; + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12); + __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; + __pyx_lineno = __pyx_t_3; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9; goto __pyx_L1_error; } - __pyx_L20:; + __pyx_L17:; } /* "src/lxml/serializer.pxi":191 @@ -145353,7 +135619,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or * * cdef _raiseSerialisationError(int error_result): */ - __Pyx_TraceLine(191,0,__PYX_ERR(8, 191, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; @@ -145376,7 +135641,6 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -145392,17 +135656,14 @@ static PyObject *__pyx_f_4lxml_5etree__tostringC14N(PyObject *__pyx_v_element_or static PyObject *__pyx_f_4lxml_5etree__raiseSerialisationError(int __pyx_v_error_result) { PyObject *__pyx_v_message = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; + int __pyx_t_6; __Pyx_RefNannySetupContext("_raiseSerialisationError", 0); - __Pyx_TraceCall("_raiseSerialisationError", __pyx_f[8], 193, 0, __PYX_ERR(8, 193, __pyx_L1_error)); /* "src/lxml/serializer.pxi":194 * @@ -145411,7 +135672,6 @@ static PyObject *__pyx_f_4lxml_5etree__raiseSerialisationError(int __pyx_v_error * raise MemoryError() * message = ErrorTypes._getName(error_result) */ - __Pyx_TraceLine(194,0,__PYX_ERR(8, 194, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_error_result == XML_ERR_NO_MEMORY) != 0); if (unlikely(__pyx_t_1)) { @@ -145422,7 +135682,6 @@ static PyObject *__pyx_f_4lxml_5etree__raiseSerialisationError(int __pyx_v_error * message = ErrorTypes._getName(error_result) * if message is None: */ - __Pyx_TraceLine(195,0,__PYX_ERR(8, 195, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(8, 195, __pyx_L1_error) /* "src/lxml/serializer.pxi":194 @@ -145441,8 +135700,7 @@ static PyObject *__pyx_f_4lxml_5etree__raiseSerialisationError(int __pyx_v_error * if message is None: * message = f"unknown error {error_result}" */ - __Pyx_TraceLine(196,0,__PYX_ERR(8, 196, __pyx_L1_error)) - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ErrorTypes); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 196, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ErrorTypes); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getName); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -145459,41 +135717,11 @@ static PyObject *__pyx_f_4lxml_5etree__raiseSerialisationError(int __pyx_v_error __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_5) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 196, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 196, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 196, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 196, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3); - __pyx_t_3 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 196, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_message = __pyx_t_2; __pyx_t_2 = 0; @@ -145505,10 +135733,9 @@ static PyObject *__pyx_f_4lxml_5etree__raiseSerialisationError(int __pyx_v_error * message = f"unknown error {error_result}" * raise SerialisationError, message */ - __Pyx_TraceLine(197,0,__PYX_ERR(8, 197, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_message == Py_None); - __pyx_t_7 = (__pyx_t_1 != 0); - if (__pyx_t_7) { + __pyx_t_6 = (__pyx_t_1 != 0); + if (__pyx_t_6) { /* "src/lxml/serializer.pxi":198 * message = ErrorTypes._getName(error_result) @@ -145517,7 +135744,6 @@ static PyObject *__pyx_f_4lxml_5etree__raiseSerialisationError(int __pyx_v_error * raise SerialisationError, message * */ - __Pyx_TraceLine(198,0,__PYX_ERR(8, 198, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyUnicode_From_int(__pyx_v_error_result, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_unknown_error_2, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 198, __pyx_L1_error) @@ -145542,7 +135768,6 @@ static PyObject *__pyx_f_4lxml_5etree__raiseSerialisationError(int __pyx_v_error * * ############################################################ */ - __Pyx_TraceLine(199,0,__PYX_ERR(8, 199, __pyx_L1_error)) __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_SerialisationError), __pyx_v_message, 0, 0); __PYX_ERR(8, 199, __pyx_L1_error) @@ -145560,12 +135785,10 @@ static PyObject *__pyx_f_4lxml_5etree__raiseSerialisationError(int __pyx_v_error __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("lxml.etree._raiseSerialisationError", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __Pyx_XDECREF(__pyx_v_message); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -145579,8 +135802,6 @@ static PyObject *__pyx_f_4lxml_5etree__raiseSerialisationError(int __pyx_v_error */ static void __pyx_f_4lxml_5etree__writeDoctype(xmlOutputBuffer *__pyx_v_c_buffer, const xmlChar *__pyx_v_c_doctype) { - __Pyx_TraceDeclarations - __Pyx_TraceCall("_writeDoctype", __pyx_f[8], 204, 1, __PYX_ERR(8, 204, __pyx_L1_error)); /* "src/lxml/serializer.pxi":206 * cdef void _writeDoctype(tree.xmlOutputBuffer* c_buffer, @@ -145589,7 +135810,6 @@ static void __pyx_f_4lxml_5etree__writeDoctype(xmlOutputBuffer *__pyx_v_c_buffer * c_doctype) * tree.xmlOutputBufferWriteString(c_buffer, "\n") */ - __Pyx_TraceLine(206,1,__PYX_ERR(8, 206, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_c_buffer, xmlStrlen(__pyx_v_c_doctype), ((const char *)__pyx_v_c_doctype))); /* "src/lxml/serializer.pxi":208 @@ -145599,7 +135819,6 @@ static void __pyx_f_4lxml_5etree__writeDoctype(xmlOutputBuffer *__pyx_v_c_buffer * * cdef void _writeNodeToBuffer(tree.xmlOutputBuffer* c_buffer, */ - __Pyx_TraceLine(208,1,__PYX_ERR(8, 208, __pyx_L1_error)) (void)(xmlOutputBufferWriteString(__pyx_v_c_buffer, ((const char *)"\n"))); /* "src/lxml/serializer.pxi":204 @@ -145611,11 +135830,6 @@ static void __pyx_f_4lxml_5etree__writeDoctype(xmlOutputBuffer *__pyx_v_c_buffer */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._writeDoctype", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); } /* "src/lxml/serializer.pxi":210 @@ -145629,12 +135843,10 @@ static void __pyx_f_4lxml_5etree__writeDoctype(xmlOutputBuffer *__pyx_v_c_buffer static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_buffer, xmlNode *__pyx_v_c_node, const char *__pyx_v_encoding, const xmlChar *__pyx_v_c_doctype, int __pyx_v_c_method, int __pyx_v_write_xml_declaration, int __pyx_v_write_complete_document, int __pyx_v_pretty_print, int __pyx_v_with_tail, int __pyx_v_standalone) { xmlNode *__pyx_v_c_nsdecl_node; xmlDoc *__pyx_v_c_doc; - __Pyx_TraceDeclarations xmlDoc *__pyx_t_1; int __pyx_t_2; int __pyx_t_3; xmlNode *__pyx_t_4; - __Pyx_TraceCall("_writeNodeToBuffer", __pyx_f[8], 210, 1, __PYX_ERR(8, 210, __pyx_L1_error)); /* "src/lxml/serializer.pxi":217 * int standalone) nogil: @@ -145643,7 +135855,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * if write_xml_declaration and c_method == OUTPUT_METHOD_XML: * _writeDeclarationToBuffer(c_buffer, c_doc.version, encoding, standalone) */ - __Pyx_TraceLine(217,1,__PYX_ERR(8, 217, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_node->doc; __pyx_v_c_doc = __pyx_t_1; @@ -145654,7 +135865,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * _writeDeclarationToBuffer(c_buffer, c_doc.version, encoding, standalone) * */ - __Pyx_TraceLine(218,1,__PYX_ERR(8, 218, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_write_xml_declaration != 0); if (__pyx_t_3) { } else { @@ -145673,7 +135883,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * * # comments/processing instructions before doctype declaration */ - __Pyx_TraceLine(219,1,__PYX_ERR(8, 219, __pyx_L1_error)) __pyx_f_4lxml_5etree__writeDeclarationToBuffer(__pyx_v_c_buffer, __pyx_v_c_doc->version, __pyx_v_encoding, __pyx_v_standalone); /* "src/lxml/serializer.pxi":218 @@ -145692,7 +135901,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * _writePrevSiblings(c_buffer, c_doc.intSubset, encoding, pretty_print) * */ - __Pyx_TraceLine(222,1,__PYX_ERR(8, 222, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_write_complete_document != 0); if (__pyx_t_3) { } else { @@ -145717,7 +135925,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * * if c_doctype: */ - __Pyx_TraceLine(223,1,__PYX_ERR(8, 223, __pyx_L1_error)) __pyx_f_4lxml_5etree__writePrevSiblings(__pyx_v_c_buffer, ((xmlNode *)__pyx_v_c_doc->intSubset), __pyx_v_encoding, __pyx_v_pretty_print); /* "src/lxml/serializer.pxi":222 @@ -145736,7 +135943,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * _writeDoctype(c_buffer, c_doctype) * # write internal DTD subset, preceding PIs/comments, etc. */ - __Pyx_TraceLine(225,1,__PYX_ERR(8, 225, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_c_doctype != 0); if (__pyx_t_2) { @@ -145747,7 +135953,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * # write internal DTD subset, preceding PIs/comments, etc. * if write_complete_document and not c_buffer.error: */ - __Pyx_TraceLine(226,1,__PYX_ERR(8, 226, __pyx_L1_error)) __pyx_f_4lxml_5etree__writeDoctype(__pyx_v_c_buffer, __pyx_v_c_doctype); /* "src/lxml/serializer.pxi":225 @@ -145766,7 +135971,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * if c_doctype is NULL: * _writeDtdToBuffer(c_buffer, c_doc, c_node.name, c_method, encoding) */ - __Pyx_TraceLine(228,1,__PYX_ERR(8, 228, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_write_complete_document != 0); if (__pyx_t_3) { } else { @@ -145785,7 +135989,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * _writeDtdToBuffer(c_buffer, c_doc, c_node.name, c_method, encoding) * _writePrevSiblings(c_buffer, c_node, encoding, pretty_print) */ - __Pyx_TraceLine(229,1,__PYX_ERR(8, 229, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_doctype == NULL) != 0); if (__pyx_t_2) { @@ -145796,7 +135999,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * _writePrevSiblings(c_buffer, c_node, encoding, pretty_print) * */ - __Pyx_TraceLine(230,1,__PYX_ERR(8, 230, __pyx_L1_error)) __pyx_f_4lxml_5etree__writeDtdToBuffer(__pyx_v_c_buffer, __pyx_v_c_doc, __pyx_v_c_node->name, __pyx_v_c_method, __pyx_v_encoding); /* "src/lxml/serializer.pxi":229 @@ -145815,7 +136017,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * * c_nsdecl_node = c_node */ - __Pyx_TraceLine(231,1,__PYX_ERR(8, 231, __pyx_L1_error)) __pyx_f_4lxml_5etree__writePrevSiblings(__pyx_v_c_buffer, __pyx_v_c_node, __pyx_v_encoding, __pyx_v_pretty_print); /* "src/lxml/serializer.pxi":228 @@ -145834,7 +136035,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * if not c_node.parent or c_node.parent.type != tree.XML_DOCUMENT_NODE: * # copy the node and add namespaces from parents */ - __Pyx_TraceLine(233,1,__PYX_ERR(8, 233, __pyx_L1_error)) __pyx_v_c_nsdecl_node = __pyx_v_c_node; /* "src/lxml/serializer.pxi":234 @@ -145844,7 +136044,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * # copy the node and add namespaces from parents * # this is required to make libxml write them */ - __Pyx_TraceLine(234,1,__PYX_ERR(8, 234, __pyx_L1_error)) __pyx_t_3 = ((!(__pyx_v_c_node->parent != 0)) != 0); if (!__pyx_t_3) { } else { @@ -145863,7 +136062,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * if not c_nsdecl_node: * c_buffer.error = xmlerror.XML_ERR_NO_MEMORY */ - __Pyx_TraceLine(237,1,__PYX_ERR(8, 237, __pyx_L1_error)) __pyx_v_c_nsdecl_node = xmlCopyNode(__pyx_v_c_node, 2); /* "src/lxml/serializer.pxi":238 @@ -145873,7 +136071,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * c_buffer.error = xmlerror.XML_ERR_NO_MEMORY * return */ - __Pyx_TraceLine(238,1,__PYX_ERR(8, 238, __pyx_L1_error)) __pyx_t_2 = ((!(__pyx_v_c_nsdecl_node != 0)) != 0); if (__pyx_t_2) { @@ -145884,7 +136081,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * return * _copyParentNamespaces(c_node, c_nsdecl_node) */ - __Pyx_TraceLine(239,1,__PYX_ERR(8, 239, __pyx_L1_error)) __pyx_v_c_buffer->error = XML_ERR_NO_MEMORY; /* "src/lxml/serializer.pxi":240 @@ -145894,7 +136090,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * _copyParentNamespaces(c_node, c_nsdecl_node) * */ - __Pyx_TraceLine(240,1,__PYX_ERR(8, 240, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/serializer.pxi":238 @@ -145913,7 +136108,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * * c_nsdecl_node.parent = c_node.parent */ - __Pyx_TraceLine(241,1,__PYX_ERR(8, 241, __pyx_L1_error)) __pyx_f_4lxml_5etree__copyParentNamespaces(__pyx_v_c_node, __pyx_v_c_nsdecl_node); /* "src/lxml/serializer.pxi":243 @@ -145923,7 +136117,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * c_nsdecl_node.children = c_node.children * c_nsdecl_node.last = c_node.last */ - __Pyx_TraceLine(243,1,__PYX_ERR(8, 243, __pyx_L1_error)) __pyx_t_4 = __pyx_v_c_node->parent; __pyx_v_c_nsdecl_node->parent = __pyx_t_4; @@ -145934,7 +136127,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * c_nsdecl_node.last = c_node.last * */ - __Pyx_TraceLine(244,1,__PYX_ERR(8, 244, __pyx_L1_error)) __pyx_t_4 = __pyx_v_c_node->children; __pyx_v_c_nsdecl_node->children = __pyx_t_4; @@ -145945,7 +136137,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * * # write node */ - __Pyx_TraceLine(245,1,__PYX_ERR(8, 245, __pyx_L1_error)) __pyx_t_4 = __pyx_v_c_node->last; __pyx_v_c_nsdecl_node->last = __pyx_t_4; @@ -145965,7 +136156,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * tree.htmlNodeDumpFormatOutput( * c_buffer, c_doc, c_nsdecl_node, encoding, pretty_print) */ - __Pyx_TraceLine(248,1,__PYX_ERR(8, 248, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_method == __pyx_e_4lxml_5etree_OUTPUT_METHOD_HTML) != 0); if (__pyx_t_2) { @@ -145976,7 +136166,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * c_buffer, c_doc, c_nsdecl_node, encoding, pretty_print) * else: */ - __Pyx_TraceLine(249,1,__PYX_ERR(8, 249, __pyx_L1_error)) htmlNodeDumpFormatOutput(__pyx_v_c_buffer, __pyx_v_c_doc, __pyx_v_c_nsdecl_node, __pyx_v_encoding, __pyx_v_pretty_print); /* "src/lxml/serializer.pxi":248 @@ -145996,7 +136185,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * c_buffer, c_doc, c_nsdecl_node, 0, pretty_print, encoding) * */ - __Pyx_TraceLine(252,1,__PYX_ERR(8, 252, __pyx_L1_error)) /*else*/ { /* "src/lxml/serializer.pxi":253 @@ -146006,7 +136194,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * * if c_nsdecl_node is not c_node: */ - __Pyx_TraceLine(253,1,__PYX_ERR(8, 253, __pyx_L1_error)) xmlNodeDumpOutput(__pyx_v_c_buffer, __pyx_v_c_doc, __pyx_v_c_nsdecl_node, 0, __pyx_v_pretty_print, __pyx_v_encoding); } __pyx_L19:; @@ -146018,7 +136205,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * # clean up * c_nsdecl_node.children = c_nsdecl_node.last = NULL */ - __Pyx_TraceLine(255,1,__PYX_ERR(8, 255, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_nsdecl_node != __pyx_v_c_node) != 0); if (__pyx_t_2) { @@ -146029,7 +136215,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * tree.xmlFreeNode(c_nsdecl_node) * */ - __Pyx_TraceLine(257,1,__PYX_ERR(8, 257, __pyx_L1_error)) __pyx_v_c_nsdecl_node->children = NULL; __pyx_v_c_nsdecl_node->last = NULL; @@ -146040,7 +136225,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * * if c_buffer.error: */ - __Pyx_TraceLine(258,1,__PYX_ERR(8, 258, __pyx_L1_error)) xmlFreeNode(__pyx_v_c_nsdecl_node); /* "src/lxml/serializer.pxi":255 @@ -146059,7 +136243,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * return * */ - __Pyx_TraceLine(260,1,__PYX_ERR(8, 260, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_c_buffer->error != 0); if (__pyx_t_2) { @@ -146070,7 +136253,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * * # write tail, trailing comments, etc. */ - __Pyx_TraceLine(261,1,__PYX_ERR(8, 261, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/serializer.pxi":260 @@ -146089,7 +136271,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * _writeTail(c_buffer, c_node, encoding, c_method, pretty_print) * if write_complete_document: */ - __Pyx_TraceLine(264,1,__PYX_ERR(8, 264, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_with_tail != 0); if (__pyx_t_2) { @@ -146100,7 +136281,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * if write_complete_document: * _writeNextSiblings(c_buffer, c_node, encoding, pretty_print) */ - __Pyx_TraceLine(265,1,__PYX_ERR(8, 265, __pyx_L1_error)) __pyx_f_4lxml_5etree__writeTail(__pyx_v_c_buffer, __pyx_v_c_node, __pyx_v_encoding, __pyx_v_c_method, __pyx_v_pretty_print); /* "src/lxml/serializer.pxi":264 @@ -146119,7 +136299,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * _writeNextSiblings(c_buffer, c_node, encoding, pretty_print) * if pretty_print: */ - __Pyx_TraceLine(266,1,__PYX_ERR(8, 266, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_write_complete_document != 0); if (__pyx_t_2) { @@ -146130,7 +136309,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * if pretty_print: * tree.xmlOutputBufferWrite(c_buffer, 1, "\n") */ - __Pyx_TraceLine(267,1,__PYX_ERR(8, 267, __pyx_L1_error)) __pyx_f_4lxml_5etree__writeNextSiblings(__pyx_v_c_buffer, __pyx_v_c_node, __pyx_v_encoding, __pyx_v_pretty_print); /* "src/lxml/serializer.pxi":266 @@ -146149,7 +136327,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * tree.xmlOutputBufferWrite(c_buffer, 1, "\n") * */ - __Pyx_TraceLine(268,1,__PYX_ERR(8, 268, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_pretty_print != 0); if (__pyx_t_2) { @@ -146160,7 +136337,6 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b * * cdef void _writeDeclarationToBuffer(tree.xmlOutputBuffer* c_buffer, */ - __Pyx_TraceLine(269,1,__PYX_ERR(8, 269, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_c_buffer, 1, ((const char *)"\n"))); /* "src/lxml/serializer.pxi":268 @@ -146181,11 +136357,7 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._writeNodeToBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); } /* "src/lxml/serializer.pxi":271 @@ -146197,9 +136369,7 @@ static void __pyx_f_4lxml_5etree__writeNodeToBuffer(xmlOutputBuffer *__pyx_v_c_b */ static void __pyx_f_4lxml_5etree__writeDeclarationToBuffer(xmlOutputBuffer *__pyx_v_c_buffer, const xmlChar *__pyx_v_version, const char *__pyx_v_encoding, int __pyx_v_standalone) { - __Pyx_TraceDeclarations int __pyx_t_1; - __Pyx_TraceCall("_writeDeclarationToBuffer", __pyx_f[8], 271, 1, __PYX_ERR(8, 271, __pyx_L1_error)); /* "src/lxml/serializer.pxi":274 * const_xmlChar* version, const_char* encoding, @@ -146208,7 +136378,6 @@ static void __pyx_f_4lxml_5etree__writeDeclarationToBuffer(xmlOutputBuffer *__py * version = "1.0" * tree.xmlOutputBufferWrite(c_buffer, 15, "version) */ - __Pyx_TraceLine(275,1,__PYX_ERR(8, 275, __pyx_L1_error)) __pyx_v_version = ((unsigned char *)((unsigned char *)((char const *)"1.0"))); /* "src/lxml/serializer.pxi":274 @@ -146238,7 +136406,6 @@ static void __pyx_f_4lxml_5etree__writeDeclarationToBuffer(xmlOutputBuffer *__py * tree.xmlOutputBufferWriteString(c_buffer, version) * tree.xmlOutputBufferWrite(c_buffer, 12, "' encoding='") */ - __Pyx_TraceLine(276,1,__PYX_ERR(8, 276, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_c_buffer, 15, ((const char *)"\n") */ - __Pyx_TraceLine(279,1,__PYX_ERR(8, 279, __pyx_L1_error)) (void)(xmlOutputBufferWriteString(__pyx_v_c_buffer, __pyx_v_encoding)); /* "src/lxml/serializer.pxi":280 @@ -146278,7 +136442,6 @@ static void __pyx_f_4lxml_5etree__writeDeclarationToBuffer(xmlOutputBuffer *__py * tree.xmlOutputBufferWrite(c_buffer, 20, "' standalone='no'?>\n") * elif standalone == 1: */ - __Pyx_TraceLine(280,1,__PYX_ERR(8, 280, __pyx_L1_error)) switch (__pyx_v_standalone) { case 0: @@ -146289,7 +136452,6 @@ static void __pyx_f_4lxml_5etree__writeDeclarationToBuffer(xmlOutputBuffer *__py * elif standalone == 1: * tree.xmlOutputBufferWrite(c_buffer, 21, "' standalone='yes'?>\n") */ - __Pyx_TraceLine(281,1,__PYX_ERR(8, 281, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_c_buffer, 20, ((const char *)"' standalone='no'?>\n"))); /* "src/lxml/serializer.pxi":280 @@ -146300,15 +136462,6 @@ static void __pyx_f_4lxml_5etree__writeDeclarationToBuffer(xmlOutputBuffer *__py * elif standalone == 1: */ break; - - /* "src/lxml/serializer.pxi":282 - * if standalone == 0: - * tree.xmlOutputBufferWrite(c_buffer, 20, "' standalone='no'?>\n") - * elif standalone == 1: # <<<<<<<<<<<<<< - * tree.xmlOutputBufferWrite(c_buffer, 21, "' standalone='yes'?>\n") - * else: - */ - __Pyx_TraceLine(282,1,__PYX_ERR(8, 282, __pyx_L1_error)) case 1: /* "src/lxml/serializer.pxi":283 @@ -146318,7 +136471,6 @@ static void __pyx_f_4lxml_5etree__writeDeclarationToBuffer(xmlOutputBuffer *__py * else: * tree.xmlOutputBufferWrite(c_buffer, 4, "'?>\n") */ - __Pyx_TraceLine(283,1,__PYX_ERR(8, 283, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_c_buffer, 21, ((const char *)"' standalone='yes'?>\n"))); /* "src/lxml/serializer.pxi":282 @@ -146338,7 +136490,6 @@ static void __pyx_f_4lxml_5etree__writeDeclarationToBuffer(xmlOutputBuffer *__py * * cdef void _writeDtdToBuffer(tree.xmlOutputBuffer* c_buffer, */ - __Pyx_TraceLine(285,1,__PYX_ERR(8, 285, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_c_buffer, 4, ((const char *)"'?>\n"))); break; } @@ -146352,11 +136503,6 @@ static void __pyx_f_4lxml_5etree__writeDeclarationToBuffer(xmlOutputBuffer *__py */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._writeDeclarationToBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); } /* "src/lxml/serializer.pxi":287 @@ -146374,13 +136520,11 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu const xmlChar *__pyx_v_public_id; const xmlChar *__pyx_v_sys_url; xmlBuffer *__pyx_v_c_buf; - __Pyx_TraceDeclarations xmlDtd *__pyx_t_1; int __pyx_t_2; int __pyx_t_3; const xmlChar *__pyx_t_4; xmlNode *__pyx_t_5; - __Pyx_TraceCall("_writeDtdToBuffer", __pyx_f[8], 287, 1, __PYX_ERR(8, 287, __pyx_L1_error)); /* "src/lxml/serializer.pxi":293 * cdef xmlNode* c_node @@ -146389,7 +136533,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * if not c_dtd or not c_dtd.name: * return */ - __Pyx_TraceLine(293,1,__PYX_ERR(8, 293, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_doc->intSubset; __pyx_v_c_dtd = __pyx_t_1; @@ -146400,7 +136543,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * return * */ - __Pyx_TraceLine(294,1,__PYX_ERR(8, 294, __pyx_L1_error)) __pyx_t_3 = ((!(__pyx_v_c_dtd != 0)) != 0); if (!__pyx_t_3) { } else { @@ -146419,7 +136561,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * * # Name in document type declaration must match the root element tag. */ - __Pyx_TraceLine(295,1,__PYX_ERR(8, 295, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/serializer.pxi":294 @@ -146438,7 +136579,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * if tree.xmlStrcasecmp(c_root_name, c_dtd.name) != 0: * return */ - __Pyx_TraceLine(299,1,__PYX_ERR(8, 299, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_method == __pyx_e_4lxml_5etree_OUTPUT_METHOD_HTML) != 0); if (__pyx_t_2) { @@ -146449,7 +136589,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * return * else: */ - __Pyx_TraceLine(300,1,__PYX_ERR(8, 300, __pyx_L1_error)) __pyx_t_2 = ((xmlStrcasecmp(__pyx_v_c_root_name, __pyx_v_c_dtd->name) != 0) != 0); if (__pyx_t_2) { @@ -146460,7 +136599,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * else: * if tree.xmlStrcmp(c_root_name, c_dtd.name) != 0: */ - __Pyx_TraceLine(301,1,__PYX_ERR(8, 301, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/serializer.pxi":300 @@ -146489,7 +136627,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * return * */ - __Pyx_TraceLine(303,1,__PYX_ERR(8, 303, __pyx_L1_error)) /*else*/ { __pyx_t_2 = ((xmlStrcmp(__pyx_v_c_root_name, __pyx_v_c_dtd->name) != 0) != 0); if (__pyx_t_2) { @@ -146501,7 +136638,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * * tree.xmlOutputBufferWrite(c_buffer, 10, "c_dtd.name) * */ - __Pyx_TraceLine(306,1,__PYX_ERR(8, 306, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_c_buffer, 10, ((const char *)"name))); /* "src/lxml/serializer.pxi":309 @@ -146542,7 +136676,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * cdef const_xmlChar* sys_url = c_dtd.SystemID * if public_id and public_id[0] == b'\0': */ - __Pyx_TraceLine(309,1,__PYX_ERR(8, 309, __pyx_L1_error)) __pyx_t_4 = __pyx_v_c_dtd->ExternalID; __pyx_v_public_id = __pyx_t_4; @@ -146553,7 +136686,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * if public_id and public_id[0] == b'\0': * public_id = NULL */ - __Pyx_TraceLine(310,1,__PYX_ERR(8, 310, __pyx_L1_error)) __pyx_t_4 = __pyx_v_c_dtd->SystemID; __pyx_v_sys_url = __pyx_t_4; @@ -146564,7 +136696,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * public_id = NULL * if sys_url and sys_url[0] == b'\0': */ - __Pyx_TraceLine(311,1,__PYX_ERR(8, 311, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_public_id != 0); if (__pyx_t_3) { } else { @@ -146583,7 +136714,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * if sys_url and sys_url[0] == b'\0': * sys_url = NULL */ - __Pyx_TraceLine(312,1,__PYX_ERR(8, 312, __pyx_L1_error)) __pyx_v_public_id = NULL; /* "src/lxml/serializer.pxi":311 @@ -146602,7 +136732,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * sys_url = NULL * */ - __Pyx_TraceLine(313,1,__PYX_ERR(8, 313, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_sys_url != 0); if (__pyx_t_3) { } else { @@ -146621,7 +136750,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * * if public_id: */ - __Pyx_TraceLine(314,1,__PYX_ERR(8, 314, __pyx_L1_error)) __pyx_v_sys_url = NULL; /* "src/lxml/serializer.pxi":313 @@ -146640,7 +136768,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * tree.xmlOutputBufferWrite(c_buffer, 9, ' PUBLIC "') * tree.xmlOutputBufferWriteString(c_buffer, public_id) */ - __Pyx_TraceLine(316,1,__PYX_ERR(8, 316, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_public_id != 0); if (__pyx_t_2) { @@ -146651,7 +136778,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * tree.xmlOutputBufferWriteString(c_buffer, public_id) * if sys_url: */ - __Pyx_TraceLine(317,1,__PYX_ERR(8, 317, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_c_buffer, 9, ((const char *)" PUBLIC \""))); /* "src/lxml/serializer.pxi":318 @@ -146661,7 +136787,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * if sys_url: * tree.xmlOutputBufferWrite(c_buffer, 2, '" ') */ - __Pyx_TraceLine(318,1,__PYX_ERR(8, 318, __pyx_L1_error)) (void)(xmlOutputBufferWriteString(__pyx_v_c_buffer, ((const char *)__pyx_v_public_id))); /* "src/lxml/serializer.pxi":319 @@ -146671,7 +136796,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * tree.xmlOutputBufferWrite(c_buffer, 2, '" ') * else: */ - __Pyx_TraceLine(319,1,__PYX_ERR(8, 319, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_sys_url != 0); if (__pyx_t_2) { @@ -146682,7 +136806,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * else: * tree.xmlOutputBufferWrite(c_buffer, 1, '"') */ - __Pyx_TraceLine(320,1,__PYX_ERR(8, 320, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_c_buffer, 2, ((const char *)"\" "))); /* "src/lxml/serializer.pxi":319 @@ -146702,7 +136825,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * elif sys_url: * tree.xmlOutputBufferWrite(c_buffer, 8, ' SYSTEM ') */ - __Pyx_TraceLine(322,1,__PYX_ERR(8, 322, __pyx_L1_error)) /*else*/ { (void)(xmlOutputBufferWrite(__pyx_v_c_buffer, 1, ((const char *)"\""))); } @@ -146725,7 +136847,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * tree.xmlOutputBufferWrite(c_buffer, 8, ' SYSTEM ') * */ - __Pyx_TraceLine(323,1,__PYX_ERR(8, 323, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_sys_url != 0); if (__pyx_t_2) { @@ -146736,7 +136857,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * * if sys_url: */ - __Pyx_TraceLine(324,1,__PYX_ERR(8, 324, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_c_buffer, 8, ((const char *)" SYSTEM "))); /* "src/lxml/serializer.pxi":323 @@ -146756,7 +136876,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * if tree.xmlStrchr(sys_url, b'"'): * quotechar = '\'' */ - __Pyx_TraceLine(326,1,__PYX_ERR(8, 326, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_sys_url != 0); if (__pyx_t_2) { @@ -146767,7 +136886,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * quotechar = '\'' * else: */ - __Pyx_TraceLine(327,1,__PYX_ERR(8, 327, __pyx_L1_error)) __pyx_t_2 = (xmlStrchr(__pyx_v_sys_url, '"') != 0); if (__pyx_t_2) { @@ -146778,7 +136896,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * else: * quotechar = '"' */ - __Pyx_TraceLine(328,1,__PYX_ERR(8, 328, __pyx_L1_error)) __pyx_v_quotechar = ((char *)"'"); /* "src/lxml/serializer.pxi":327 @@ -146798,7 +136915,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * tree.xmlOutputBufferWrite(c_buffer, 1, quotechar) * tree.xmlOutputBufferWriteString(c_buffer, sys_url) */ - __Pyx_TraceLine(330,1,__PYX_ERR(8, 330, __pyx_L1_error)) /*else*/ { __pyx_v_quotechar = ((char *)"\""); } @@ -146811,7 +136927,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * tree.xmlOutputBufferWriteString(c_buffer, sys_url) * tree.xmlOutputBufferWrite(c_buffer, 1, quotechar) */ - __Pyx_TraceLine(331,1,__PYX_ERR(8, 331, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_c_buffer, 1, __pyx_v_quotechar)); /* "src/lxml/serializer.pxi":332 @@ -146821,7 +136936,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * tree.xmlOutputBufferWrite(c_buffer, 1, quotechar) * */ - __Pyx_TraceLine(332,1,__PYX_ERR(8, 332, __pyx_L1_error)) (void)(xmlOutputBufferWriteString(__pyx_v_c_buffer, ((const char *)__pyx_v_sys_url))); /* "src/lxml/serializer.pxi":333 @@ -146831,7 +136945,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * * if (not c_dtd.entities and not c_dtd.elements and */ - __Pyx_TraceLine(333,1,__PYX_ERR(8, 333, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_c_buffer, 1, __pyx_v_quotechar)); /* "src/lxml/serializer.pxi":326 @@ -146850,7 +136963,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * not c_dtd.attributes and not c_dtd.notations and * not c_dtd.pentities): */ - __Pyx_TraceLine(335,1,__PYX_ERR(8, 335, __pyx_L1_error)) __pyx_t_3 = ((!(__pyx_v_c_dtd->entities != 0)) != 0); if (__pyx_t_3) { } else { @@ -146871,7 +136983,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * not c_dtd.pentities): * tree.xmlOutputBufferWrite(c_buffer, 2, '>\n') */ - __Pyx_TraceLine(336,1,__PYX_ERR(8, 336, __pyx_L1_error)) __pyx_t_3 = ((!(__pyx_v_c_dtd->attributes != 0)) != 0); if (__pyx_t_3) { } else { @@ -146892,7 +137003,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * tree.xmlOutputBufferWrite(c_buffer, 2, '>\n') * return */ - __Pyx_TraceLine(337,1,__PYX_ERR(8, 337, __pyx_L1_error)) __pyx_t_3 = ((!(__pyx_v_c_dtd->pentities != 0)) != 0); __pyx_t_2 = __pyx_t_3; __pyx_L20_bool_binop_done:; @@ -146904,7 +137014,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * not c_dtd.attributes and not c_dtd.notations and * not c_dtd.pentities): */ - __Pyx_TraceLine(335,1,__PYX_ERR(8, 335, __pyx_L1_error)) if (__pyx_t_2) { /* "src/lxml/serializer.pxi":338 @@ -146914,7 +137023,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * return * */ - __Pyx_TraceLine(338,1,__PYX_ERR(8, 338, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_c_buffer, 2, ((const char *)">\n"))); /* "src/lxml/serializer.pxi":339 @@ -146924,7 +137032,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * * tree.xmlOutputBufferWrite(c_buffer, 3, ' [\n') */ - __Pyx_TraceLine(339,1,__PYX_ERR(8, 339, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/serializer.pxi":335 @@ -146943,7 +137050,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * if c_dtd.notations and not c_buffer.error: * c_buf = tree.xmlBufferCreate() */ - __Pyx_TraceLine(341,1,__PYX_ERR(8, 341, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_c_buffer, 3, ((const char *)" [\n"))); /* "src/lxml/serializer.pxi":342 @@ -146953,7 +137059,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * c_buf = tree.xmlBufferCreate() * if not c_buf: */ - __Pyx_TraceLine(342,1,__PYX_ERR(8, 342, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_c_dtd->notations != 0); if (__pyx_t_3) { } else { @@ -146972,7 +137077,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * if not c_buf: * c_buffer.error = xmlerror.XML_ERR_NO_MEMORY */ - __Pyx_TraceLine(343,1,__PYX_ERR(8, 343, __pyx_L1_error)) __pyx_v_c_buf = xmlBufferCreate(); /* "src/lxml/serializer.pxi":344 @@ -146982,7 +137086,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * c_buffer.error = xmlerror.XML_ERR_NO_MEMORY * return */ - __Pyx_TraceLine(344,1,__PYX_ERR(8, 344, __pyx_L1_error)) __pyx_t_2 = ((!(__pyx_v_c_buf != 0)) != 0); if (__pyx_t_2) { @@ -146993,7 +137096,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * return * tree.xmlDumpNotationTable(c_buf, c_dtd.notations) */ - __Pyx_TraceLine(345,1,__PYX_ERR(8, 345, __pyx_L1_error)) __pyx_v_c_buffer->error = XML_ERR_NO_MEMORY; /* "src/lxml/serializer.pxi":346 @@ -147003,7 +137105,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * tree.xmlDumpNotationTable(c_buf, c_dtd.notations) * tree.xmlOutputBufferWrite( */ - __Pyx_TraceLine(346,1,__PYX_ERR(8, 346, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/serializer.pxi":344 @@ -147022,7 +137123,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * tree.xmlOutputBufferWrite( * c_buffer, tree.xmlBufferLength(c_buf), */ - __Pyx_TraceLine(347,1,__PYX_ERR(8, 347, __pyx_L1_error)) xmlDumpNotationTable(__pyx_v_c_buf, ((xmlNotationTable *)__pyx_v_c_dtd->notations)); /* "src/lxml/serializer.pxi":348 @@ -147032,7 +137132,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * c_buffer, tree.xmlBufferLength(c_buf), * tree.xmlBufferContent(c_buf)) */ - __Pyx_TraceLine(348,1,__PYX_ERR(8, 348, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_c_buffer, xmlBufferLength(__pyx_v_c_buf), ((const char *)xmlBufferContent(__pyx_v_c_buf)))); /* "src/lxml/serializer.pxi":351 @@ -147042,7 +137141,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * c_node = c_dtd.children * while c_node and not c_buffer.error: */ - __Pyx_TraceLine(351,1,__PYX_ERR(8, 351, __pyx_L1_error)) xmlBufferFree(__pyx_v_c_buf); /* "src/lxml/serializer.pxi":342 @@ -147061,7 +137159,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * while c_node and not c_buffer.error: * tree.xmlNodeDumpOutput(c_buffer, c_node.doc, c_node, 0, 0, encoding) */ - __Pyx_TraceLine(352,1,__PYX_ERR(8, 352, __pyx_L1_error)) __pyx_t_5 = __pyx_v_c_dtd->children; __pyx_v_c_node = __pyx_t_5; @@ -147072,7 +137169,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * tree.xmlNodeDumpOutput(c_buffer, c_node.doc, c_node, 0, 0, encoding) * c_node = c_node.next */ - __Pyx_TraceLine(353,1,__PYX_ERR(8, 353, __pyx_L1_error)) while (1) { __pyx_t_3 = (__pyx_v_c_node != 0); if (__pyx_t_3) { @@ -147092,7 +137188,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * c_node = c_node.next * tree.xmlOutputBufferWrite(c_buffer, 3, "]>\n") */ - __Pyx_TraceLine(354,1,__PYX_ERR(8, 354, __pyx_L1_error)) xmlNodeDumpOutput(__pyx_v_c_buffer, __pyx_v_c_node->doc, __pyx_v_c_node, 0, 0, __pyx_v_encoding); /* "src/lxml/serializer.pxi":355 @@ -147102,7 +137197,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * tree.xmlOutputBufferWrite(c_buffer, 3, "]>\n") * */ - __Pyx_TraceLine(355,1,__PYX_ERR(8, 355, __pyx_L1_error)) __pyx_t_5 = __pyx_v_c_node->next; __pyx_v_c_node = __pyx_t_5; } @@ -147114,7 +137208,6 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu * * cdef void _writeTail(tree.xmlOutputBuffer* c_buffer, xmlNode* c_node, */ - __Pyx_TraceLine(356,1,__PYX_ERR(8, 356, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_c_buffer, 3, ((const char *)"]>\n"))); /* "src/lxml/serializer.pxi":287 @@ -147126,11 +137219,7 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._writeDtdToBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); } /* "src/lxml/serializer.pxi":358 @@ -147142,12 +137231,10 @@ static void __pyx_f_4lxml_5etree__writeDtdToBuffer(xmlOutputBuffer *__pyx_v_c_bu */ static void __pyx_f_4lxml_5etree__writeTail(xmlOutputBuffer *__pyx_v_c_buffer, xmlNode *__pyx_v_c_node, const char *__pyx_v_encoding, int __pyx_v_c_method, int __pyx_v_pretty_print) { - __Pyx_TraceDeclarations xmlNode *__pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; - __Pyx_TraceCall("_writeTail", __pyx_f[8], 358, 1, __PYX_ERR(8, 358, __pyx_L1_error)); /* "src/lxml/serializer.pxi":361 * const_char* encoding, int c_method, bint pretty_print) nogil: @@ -147156,7 +137243,6 @@ static void __pyx_f_4lxml_5etree__writeTail(xmlOutputBuffer *__pyx_v_c_buffer, x * while c_node and not c_buffer.error and c_node.type in ( * tree.XML_TEXT_NODE, tree.XML_CDATA_SECTION_NODE): */ - __Pyx_TraceLine(361,1,__PYX_ERR(8, 361, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_node->next; __pyx_v_c_node = __pyx_t_1; @@ -147167,7 +137253,6 @@ static void __pyx_f_4lxml_5etree__writeTail(xmlOutputBuffer *__pyx_v_c_buffer, x * tree.XML_TEXT_NODE, tree.XML_CDATA_SECTION_NODE): * if c_method == OUTPUT_METHOD_HTML: */ - __Pyx_TraceLine(362,1,__PYX_ERR(8, 362, __pyx_L1_error)) while (1) { __pyx_t_3 = (__pyx_v_c_node != 0); if (__pyx_t_3) { @@ -147181,16 +137266,15 @@ static void __pyx_f_4lxml_5etree__writeTail(xmlOutputBuffer *__pyx_v_c_buffer, x __pyx_t_2 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } - switch (__pyx_v_c_node->type) { - /* "src/lxml/serializer.pxi":363 + /* "src/lxml/serializer.pxi":363 * c_node = c_node.next * while c_node and not c_buffer.error and c_node.type in ( * tree.XML_TEXT_NODE, tree.XML_CDATA_SECTION_NODE): # <<<<<<<<<<<<<< * if c_method == OUTPUT_METHOD_HTML: * tree.htmlNodeDumpFormatOutput( */ - __Pyx_TraceLine(363,1,__PYX_ERR(8, 363, __pyx_L1_error)) + switch (__pyx_v_c_node->type) { case XML_TEXT_NODE: case XML_CDATA_SECTION_NODE: @@ -147201,7 +137285,6 @@ static void __pyx_f_4lxml_5etree__writeTail(xmlOutputBuffer *__pyx_v_c_buffer, x * tree.XML_TEXT_NODE, tree.XML_CDATA_SECTION_NODE): * if c_method == OUTPUT_METHOD_HTML: */ - __Pyx_TraceLine(362,1,__PYX_ERR(8, 362, __pyx_L1_error)) __pyx_t_3 = 1; break; default: @@ -147220,7 +137303,6 @@ static void __pyx_f_4lxml_5etree__writeTail(xmlOutputBuffer *__pyx_v_c_buffer, x * tree.htmlNodeDumpFormatOutput( * c_buffer, c_node.doc, c_node, encoding, pretty_print) */ - __Pyx_TraceLine(364,1,__PYX_ERR(8, 364, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_method == __pyx_e_4lxml_5etree_OUTPUT_METHOD_HTML) != 0); if (__pyx_t_2) { @@ -147231,7 +137313,6 @@ static void __pyx_f_4lxml_5etree__writeTail(xmlOutputBuffer *__pyx_v_c_buffer, x * c_buffer, c_node.doc, c_node, encoding, pretty_print) * else: */ - __Pyx_TraceLine(365,1,__PYX_ERR(8, 365, __pyx_L1_error)) htmlNodeDumpFormatOutput(__pyx_v_c_buffer, __pyx_v_c_node->doc, __pyx_v_c_node, __pyx_v_encoding, __pyx_v_pretty_print); /* "src/lxml/serializer.pxi":364 @@ -147251,7 +137332,6 @@ static void __pyx_f_4lxml_5etree__writeTail(xmlOutputBuffer *__pyx_v_c_buffer, x * c_buffer, c_node.doc, c_node, 0, pretty_print, encoding) * c_node = c_node.next */ - __Pyx_TraceLine(368,1,__PYX_ERR(8, 368, __pyx_L1_error)) /*else*/ { /* "src/lxml/serializer.pxi":369 @@ -147261,7 +137341,6 @@ static void __pyx_f_4lxml_5etree__writeTail(xmlOutputBuffer *__pyx_v_c_buffer, x * c_node = c_node.next * */ - __Pyx_TraceLine(369,1,__PYX_ERR(8, 369, __pyx_L1_error)) xmlNodeDumpOutput(__pyx_v_c_buffer, __pyx_v_c_node->doc, __pyx_v_c_node, 0, __pyx_v_pretty_print, __pyx_v_encoding); } __pyx_L8:; @@ -147273,7 +137352,6 @@ static void __pyx_f_4lxml_5etree__writeTail(xmlOutputBuffer *__pyx_v_c_buffer, x * * cdef void _writePrevSiblings(tree.xmlOutputBuffer* c_buffer, xmlNode* c_node, */ - __Pyx_TraceLine(370,1,__PYX_ERR(8, 370, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_node->next; __pyx_v_c_node = __pyx_t_1; } @@ -147287,11 +137365,6 @@ static void __pyx_f_4lxml_5etree__writeTail(xmlOutputBuffer *__pyx_v_c_buffer, x */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._writeTail", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); } /* "src/lxml/serializer.pxi":372 @@ -147304,11 +137377,9 @@ static void __pyx_f_4lxml_5etree__writeTail(xmlOutputBuffer *__pyx_v_c_buffer, x static void __pyx_f_4lxml_5etree__writePrevSiblings(xmlOutputBuffer *__pyx_v_c_buffer, xmlNode *__pyx_v_c_node, const char *__pyx_v_encoding, int __pyx_v_pretty_print) { xmlNode *__pyx_v_c_sibling; - __Pyx_TraceDeclarations int __pyx_t_1; int __pyx_t_2; xmlNode *__pyx_t_3; - __Pyx_TraceCall("_writePrevSiblings", __pyx_f[8], 372, 1, __PYX_ERR(8, 372, __pyx_L1_error)); /* "src/lxml/serializer.pxi":375 * const_char* encoding, bint pretty_print) nogil: @@ -147317,7 +137388,6 @@ static void __pyx_f_4lxml_5etree__writePrevSiblings(xmlOutputBuffer *__pyx_v_c_b * return * # we are at a root node, so add PI and comment siblings */ - __Pyx_TraceLine(375,1,__PYX_ERR(8, 375, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_c_node->parent != 0); if (__pyx_t_2) { } else { @@ -147336,7 +137406,6 @@ static void __pyx_f_4lxml_5etree__writePrevSiblings(xmlOutputBuffer *__pyx_v_c_b * # we are at a root node, so add PI and comment siblings * c_sibling = c_node */ - __Pyx_TraceLine(376,1,__PYX_ERR(8, 376, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/serializer.pxi":375 @@ -147355,7 +137424,6 @@ static void __pyx_f_4lxml_5etree__writePrevSiblings(xmlOutputBuffer *__pyx_v_c_b * while c_sibling.prev and \ * (c_sibling.prev.type == tree.XML_PI_NODE or */ - __Pyx_TraceLine(378,1,__PYX_ERR(8, 378, __pyx_L1_error)) __pyx_v_c_sibling = __pyx_v_c_node; /* "src/lxml/serializer.pxi":379 @@ -147365,7 +137433,6 @@ static void __pyx_f_4lxml_5etree__writePrevSiblings(xmlOutputBuffer *__pyx_v_c_b * (c_sibling.prev.type == tree.XML_PI_NODE or * c_sibling.prev.type == tree.XML_COMMENT_NODE): */ - __Pyx_TraceLine(379,1,__PYX_ERR(8, 379, __pyx_L1_error)) while (1) { __pyx_t_2 = (__pyx_v_c_sibling->prev != 0); if (__pyx_t_2) { @@ -147381,9 +137448,9 @@ static void __pyx_f_4lxml_5etree__writePrevSiblings(xmlOutputBuffer *__pyx_v_c_b * c_sibling.prev.type == tree.XML_COMMENT_NODE): * c_sibling = c_sibling.prev */ - __Pyx_TraceLine(380,1,__PYX_ERR(8, 380, __pyx_L1_error)) switch (__pyx_v_c_sibling->prev->type) { case XML_PI_NODE: + case XML_COMMENT_NODE: /* "src/lxml/serializer.pxi":381 * while c_sibling.prev and \ @@ -147392,8 +137459,7 @@ static void __pyx_f_4lxml_5etree__writePrevSiblings(xmlOutputBuffer *__pyx_v_c_b * c_sibling = c_sibling.prev * while c_sibling is not c_node and not c_buffer.error: */ - __Pyx_TraceLine(381,1,__PYX_ERR(8, 381, __pyx_L1_error)) - case XML_COMMENT_NODE: + __pyx_t_2 = 1; /* "src/lxml/serializer.pxi":380 * c_sibling = c_node @@ -147402,8 +137468,6 @@ static void __pyx_f_4lxml_5etree__writePrevSiblings(xmlOutputBuffer *__pyx_v_c_b * c_sibling.prev.type == tree.XML_COMMENT_NODE): * c_sibling = c_sibling.prev */ - __Pyx_TraceLine(380,1,__PYX_ERR(8, 380, __pyx_L1_error)) - __pyx_t_2 = 1; break; default: __pyx_t_2 = 0; @@ -147420,7 +137484,6 @@ static void __pyx_f_4lxml_5etree__writePrevSiblings(xmlOutputBuffer *__pyx_v_c_b * while c_sibling is not c_node and not c_buffer.error: * tree.xmlNodeDumpOutput(c_buffer, c_node.doc, c_sibling, 0, */ - __Pyx_TraceLine(382,1,__PYX_ERR(8, 382, __pyx_L1_error)) __pyx_t_3 = __pyx_v_c_sibling->prev; __pyx_v_c_sibling = __pyx_t_3; } @@ -147432,7 +137495,6 @@ static void __pyx_f_4lxml_5etree__writePrevSiblings(xmlOutputBuffer *__pyx_v_c_b * tree.xmlNodeDumpOutput(c_buffer, c_node.doc, c_sibling, 0, * pretty_print, encoding) */ - __Pyx_TraceLine(383,1,__PYX_ERR(8, 383, __pyx_L1_error)) while (1) { __pyx_t_2 = ((__pyx_v_c_sibling != __pyx_v_c_node) != 0); if (__pyx_t_2) { @@ -147452,7 +137514,6 @@ static void __pyx_f_4lxml_5etree__writePrevSiblings(xmlOutputBuffer *__pyx_v_c_b * pretty_print, encoding) * if pretty_print: */ - __Pyx_TraceLine(384,1,__PYX_ERR(8, 384, __pyx_L1_error)) xmlNodeDumpOutput(__pyx_v_c_buffer, __pyx_v_c_node->doc, __pyx_v_c_sibling, 0, __pyx_v_pretty_print, __pyx_v_encoding); /* "src/lxml/serializer.pxi":386 @@ -147462,7 +137523,6 @@ static void __pyx_f_4lxml_5etree__writePrevSiblings(xmlOutputBuffer *__pyx_v_c_b * tree.xmlOutputBufferWriteString(c_buffer, "\n") * c_sibling = c_sibling.next */ - __Pyx_TraceLine(386,1,__PYX_ERR(8, 386, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_pretty_print != 0); if (__pyx_t_1) { @@ -147473,7 +137533,6 @@ static void __pyx_f_4lxml_5etree__writePrevSiblings(xmlOutputBuffer *__pyx_v_c_b * c_sibling = c_sibling.next * */ - __Pyx_TraceLine(387,1,__PYX_ERR(8, 387, __pyx_L1_error)) (void)(xmlOutputBufferWriteString(__pyx_v_c_buffer, ((const char *)"\n"))); /* "src/lxml/serializer.pxi":386 @@ -147492,7 +137551,6 @@ static void __pyx_f_4lxml_5etree__writePrevSiblings(xmlOutputBuffer *__pyx_v_c_b * * cdef void _writeNextSiblings(tree.xmlOutputBuffer* c_buffer, xmlNode* c_node, */ - __Pyx_TraceLine(388,1,__PYX_ERR(8, 388, __pyx_L1_error)) __pyx_t_3 = __pyx_v_c_sibling->next; __pyx_v_c_sibling = __pyx_t_3; } @@ -147506,11 +137564,7 @@ static void __pyx_f_4lxml_5etree__writePrevSiblings(xmlOutputBuffer *__pyx_v_c_b */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._writePrevSiblings", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); } /* "src/lxml/serializer.pxi":390 @@ -147523,11 +137577,9 @@ static void __pyx_f_4lxml_5etree__writePrevSiblings(xmlOutputBuffer *__pyx_v_c_b static void __pyx_f_4lxml_5etree__writeNextSiblings(xmlOutputBuffer *__pyx_v_c_buffer, xmlNode *__pyx_v_c_node, const char *__pyx_v_encoding, int __pyx_v_pretty_print) { xmlNode *__pyx_v_c_sibling; - __Pyx_TraceDeclarations int __pyx_t_1; int __pyx_t_2; xmlNode *__pyx_t_3; - __Pyx_TraceCall("_writeNextSiblings", __pyx_f[8], 390, 1, __PYX_ERR(8, 390, __pyx_L1_error)); /* "src/lxml/serializer.pxi":393 * const_char* encoding, bint pretty_print) nogil: @@ -147536,7 +137588,6 @@ static void __pyx_f_4lxml_5etree__writeNextSiblings(xmlOutputBuffer *__pyx_v_c_b * return * # we are at a root node, so add PI and comment siblings */ - __Pyx_TraceLine(393,1,__PYX_ERR(8, 393, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_c_node->parent != 0); if (__pyx_t_2) { } else { @@ -147555,7 +137606,6 @@ static void __pyx_f_4lxml_5etree__writeNextSiblings(xmlOutputBuffer *__pyx_v_c_b * # we are at a root node, so add PI and comment siblings * c_sibling = c_node.next */ - __Pyx_TraceLine(394,1,__PYX_ERR(8, 394, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/serializer.pxi":393 @@ -147574,7 +137624,6 @@ static void __pyx_f_4lxml_5etree__writeNextSiblings(xmlOutputBuffer *__pyx_v_c_b * while not c_buffer.error and c_sibling and \ * (c_sibling.type == tree.XML_PI_NODE or */ - __Pyx_TraceLine(396,1,__PYX_ERR(8, 396, __pyx_L1_error)) __pyx_t_3 = __pyx_v_c_node->next; __pyx_v_c_sibling = __pyx_t_3; @@ -147585,7 +137634,6 @@ static void __pyx_f_4lxml_5etree__writeNextSiblings(xmlOutputBuffer *__pyx_v_c_b * (c_sibling.type == tree.XML_PI_NODE or * c_sibling.type == tree.XML_COMMENT_NODE): */ - __Pyx_TraceLine(397,1,__PYX_ERR(8, 397, __pyx_L1_error)) while (1) { __pyx_t_2 = ((!(__pyx_v_c_buffer->error != 0)) != 0); if (__pyx_t_2) { @@ -147607,9 +137655,9 @@ static void __pyx_f_4lxml_5etree__writeNextSiblings(xmlOutputBuffer *__pyx_v_c_b * c_sibling.type == tree.XML_COMMENT_NODE): * if pretty_print: */ - __Pyx_TraceLine(398,1,__PYX_ERR(8, 398, __pyx_L1_error)) switch (__pyx_v_c_sibling->type) { case XML_PI_NODE: + case XML_COMMENT_NODE: /* "src/lxml/serializer.pxi":399 * while not c_buffer.error and c_sibling and \ @@ -147618,8 +137666,7 @@ static void __pyx_f_4lxml_5etree__writeNextSiblings(xmlOutputBuffer *__pyx_v_c_b * if pretty_print: * tree.xmlOutputBufferWriteString(c_buffer, "\n") */ - __Pyx_TraceLine(399,1,__PYX_ERR(8, 399, __pyx_L1_error)) - case XML_COMMENT_NODE: + __pyx_t_2 = 1; /* "src/lxml/serializer.pxi":398 * c_sibling = c_node.next @@ -147628,8 +137675,6 @@ static void __pyx_f_4lxml_5etree__writeNextSiblings(xmlOutputBuffer *__pyx_v_c_b * c_sibling.type == tree.XML_COMMENT_NODE): * if pretty_print: */ - __Pyx_TraceLine(398,1,__PYX_ERR(8, 398, __pyx_L1_error)) - __pyx_t_2 = 1; break; default: __pyx_t_2 = 0; @@ -147646,7 +137691,6 @@ static void __pyx_f_4lxml_5etree__writeNextSiblings(xmlOutputBuffer *__pyx_v_c_b * tree.xmlOutputBufferWriteString(c_buffer, "\n") * tree.xmlNodeDumpOutput(c_buffer, c_node.doc, c_sibling, 0, */ - __Pyx_TraceLine(400,1,__PYX_ERR(8, 400, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_pretty_print != 0); if (__pyx_t_1) { @@ -147657,7 +137701,6 @@ static void __pyx_f_4lxml_5etree__writeNextSiblings(xmlOutputBuffer *__pyx_v_c_b * tree.xmlNodeDumpOutput(c_buffer, c_node.doc, c_sibling, 0, * pretty_print, encoding) */ - __Pyx_TraceLine(401,1,__PYX_ERR(8, 401, __pyx_L1_error)) (void)(xmlOutputBufferWriteString(__pyx_v_c_buffer, ((const char *)"\n"))); /* "src/lxml/serializer.pxi":400 @@ -147676,7 +137719,6 @@ static void __pyx_f_4lxml_5etree__writeNextSiblings(xmlOutputBuffer *__pyx_v_c_b * pretty_print, encoding) * c_sibling = c_sibling.next */ - __Pyx_TraceLine(402,1,__PYX_ERR(8, 402, __pyx_L1_error)) xmlNodeDumpOutput(__pyx_v_c_buffer, __pyx_v_c_node->doc, __pyx_v_c_sibling, 0, __pyx_v_pretty_print, __pyx_v_encoding); /* "src/lxml/serializer.pxi":404 @@ -147686,7 +137728,6 @@ static void __pyx_f_4lxml_5etree__writeNextSiblings(xmlOutputBuffer *__pyx_v_c_b * * */ - __Pyx_TraceLine(404,1,__PYX_ERR(8, 404, __pyx_L1_error)) __pyx_t_3 = __pyx_v_c_sibling->next; __pyx_v_c_sibling = __pyx_t_3; } @@ -147700,11 +137741,7 @@ static void __pyx_f_4lxml_5etree__writeNextSiblings(xmlOutputBuffer *__pyx_v_c_b */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._writeNextSiblings", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); } /* "src/lxml/serializer.pxi":408 @@ -147719,11 +137756,9 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char xmlChar *__pyx_v_ptr; xmlChar __pyx_v_c; unsigned char *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("xmlSerializeHexCharRef", 0); - __Pyx_TraceCall("xmlSerializeHexCharRef", __pyx_f[8], 408, 0, __PYX_ERR(8, 408, __pyx_L1_error)); /* "src/lxml/serializer.pxi":412 * cdef xmlChar c @@ -147732,7 +137767,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * out += 1 * */ - __Pyx_TraceLine(412,0,__PYX_ERR(8, 412, __pyx_L1_error)) (__pyx_v_out[0]) = '&'; /* "src/lxml/serializer.pxi":413 @@ -147742,7 +137776,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * * out[0] = '#' */ - __Pyx_TraceLine(413,0,__PYX_ERR(8, 413, __pyx_L1_error)) __pyx_v_out = (__pyx_v_out + 1); /* "src/lxml/serializer.pxi":415 @@ -147752,7 +137785,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * out += 1 * */ - __Pyx_TraceLine(415,0,__PYX_ERR(8, 415, __pyx_L1_error)) (__pyx_v_out[0]) = '#'; /* "src/lxml/serializer.pxi":416 @@ -147762,7 +137794,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * * out[0] = 'x' */ - __Pyx_TraceLine(416,0,__PYX_ERR(8, 416, __pyx_L1_error)) __pyx_v_out = (__pyx_v_out + 1); /* "src/lxml/serializer.pxi":418 @@ -147772,7 +137803,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * out += 1 * */ - __Pyx_TraceLine(418,0,__PYX_ERR(8, 418, __pyx_L1_error)) (__pyx_v_out[0]) = 'x'; /* "src/lxml/serializer.pxi":419 @@ -147780,160 +137810,149 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * out[0] = 'x' * out += 1 # <<<<<<<<<<<<<< * - * if (val < 0x10): + * if val < 0x10: */ - __Pyx_TraceLine(419,0,__PYX_ERR(8, 419, __pyx_L1_error)) __pyx_v_out = (__pyx_v_out + 1); /* "src/lxml/serializer.pxi":421 * out += 1 * - * if (val < 0x10): # <<<<<<<<<<<<<< + * if val < 0x10: # <<<<<<<<<<<<<< * ptr = out - * elif (val < 0x100): + * elif val < 0x100: */ - __Pyx_TraceLine(421,0,__PYX_ERR(8, 421, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_val < 0x10) != 0); if (__pyx_t_1) { /* "src/lxml/serializer.pxi":422 * - * if (val < 0x10): + * if val < 0x10: * ptr = out # <<<<<<<<<<<<<< - * elif (val < 0x100): + * elif val < 0x100: * ptr = out + 1 */ - __Pyx_TraceLine(422,0,__PYX_ERR(8, 422, __pyx_L1_error)) __pyx_v_ptr = __pyx_v_out; /* "src/lxml/serializer.pxi":421 * out += 1 * - * if (val < 0x10): # <<<<<<<<<<<<<< + * if val < 0x10: # <<<<<<<<<<<<<< * ptr = out - * elif (val < 0x100): + * elif val < 0x100: */ goto __pyx_L3; } /* "src/lxml/serializer.pxi":423 - * if (val < 0x10): + * if val < 0x10: * ptr = out - * elif (val < 0x100): # <<<<<<<<<<<<<< + * elif val < 0x100: # <<<<<<<<<<<<<< * ptr = out + 1 - * elif (val < 0x1000): + * elif val < 0x1000: */ - __Pyx_TraceLine(423,0,__PYX_ERR(8, 423, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_val < 0x100) != 0); if (__pyx_t_1) { /* "src/lxml/serializer.pxi":424 * ptr = out - * elif (val < 0x100): + * elif val < 0x100: * ptr = out + 1 # <<<<<<<<<<<<<< - * elif (val < 0x1000): + * elif val < 0x1000: * ptr = out + 2 */ - __Pyx_TraceLine(424,0,__PYX_ERR(8, 424, __pyx_L1_error)) __pyx_v_ptr = (__pyx_v_out + 1); /* "src/lxml/serializer.pxi":423 - * if (val < 0x10): + * if val < 0x10: * ptr = out - * elif (val < 0x100): # <<<<<<<<<<<<<< + * elif val < 0x100: # <<<<<<<<<<<<<< * ptr = out + 1 - * elif (val < 0x1000): + * elif val < 0x1000: */ goto __pyx_L3; } /* "src/lxml/serializer.pxi":425 - * elif (val < 0x100): + * elif val < 0x100: * ptr = out + 1 - * elif (val < 0x1000): # <<<<<<<<<<<<<< + * elif val < 0x1000: # <<<<<<<<<<<<<< * ptr = out + 2 - * elif (val < 0x10000): + * elif val < 0x10000: */ - __Pyx_TraceLine(425,0,__PYX_ERR(8, 425, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_val < 0x1000) != 0); if (__pyx_t_1) { /* "src/lxml/serializer.pxi":426 * ptr = out + 1 - * elif (val < 0x1000): + * elif val < 0x1000: * ptr = out + 2 # <<<<<<<<<<<<<< - * elif (val < 0x10000): + * elif val < 0x10000: * ptr = out + 3 */ - __Pyx_TraceLine(426,0,__PYX_ERR(8, 426, __pyx_L1_error)) __pyx_v_ptr = (__pyx_v_out + 2); /* "src/lxml/serializer.pxi":425 - * elif (val < 0x100): + * elif val < 0x100: * ptr = out + 1 - * elif (val < 0x1000): # <<<<<<<<<<<<<< + * elif val < 0x1000: # <<<<<<<<<<<<<< * ptr = out + 2 - * elif (val < 0x10000): + * elif val < 0x10000: */ goto __pyx_L3; } /* "src/lxml/serializer.pxi":427 - * elif (val < 0x1000): + * elif val < 0x1000: * ptr = out + 2 - * elif (val < 0x10000): # <<<<<<<<<<<<<< + * elif val < 0x10000: # <<<<<<<<<<<<<< * ptr = out + 3 - * elif (val < 0x100000): + * elif val < 0x100000: */ - __Pyx_TraceLine(427,0,__PYX_ERR(8, 427, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_val < 0x10000) != 0); if (__pyx_t_1) { /* "src/lxml/serializer.pxi":428 * ptr = out + 2 - * elif (val < 0x10000): + * elif val < 0x10000: * ptr = out + 3 # <<<<<<<<<<<<<< - * elif (val < 0x100000): + * elif val < 0x100000: * ptr = out + 4 */ - __Pyx_TraceLine(428,0,__PYX_ERR(8, 428, __pyx_L1_error)) __pyx_v_ptr = (__pyx_v_out + 3); /* "src/lxml/serializer.pxi":427 - * elif (val < 0x1000): + * elif val < 0x1000: * ptr = out + 2 - * elif (val < 0x10000): # <<<<<<<<<<<<<< + * elif val < 0x10000: # <<<<<<<<<<<<<< * ptr = out + 3 - * elif (val < 0x100000): + * elif val < 0x100000: */ goto __pyx_L3; } /* "src/lxml/serializer.pxi":429 - * elif (val < 0x10000): + * elif val < 0x10000: * ptr = out + 3 - * elif (val < 0x100000): # <<<<<<<<<<<<<< + * elif val < 0x100000: # <<<<<<<<<<<<<< * ptr = out + 4 * else: */ - __Pyx_TraceLine(429,0,__PYX_ERR(8, 429, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_val < 0x100000) != 0); if (__pyx_t_1) { /* "src/lxml/serializer.pxi":430 * ptr = out + 3 - * elif (val < 0x100000): + * elif val < 0x100000: * ptr = out + 4 # <<<<<<<<<<<<<< * else: * ptr = out + 5 */ - __Pyx_TraceLine(430,0,__PYX_ERR(8, 430, __pyx_L1_error)) __pyx_v_ptr = (__pyx_v_out + 4); /* "src/lxml/serializer.pxi":429 - * elif (val < 0x10000): + * elif val < 0x10000: * ptr = out + 3 - * elif (val < 0x100000): # <<<<<<<<<<<<<< + * elif val < 0x100000: # <<<<<<<<<<<<<< * ptr = out + 4 * else: */ @@ -147947,7 +137966,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * * out = ptr + 1 */ - __Pyx_TraceLine(432,0,__PYX_ERR(8, 432, __pyx_L1_error)) /*else*/ { __pyx_v_ptr = (__pyx_v_out + 5); } @@ -147960,7 +137978,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * while val > 0: * c = (val & 0xF) */ - __Pyx_TraceLine(434,0,__PYX_ERR(8, 434, __pyx_L1_error)) __pyx_v_out = (__pyx_v_ptr + 1); /* "src/lxml/serializer.pxi":435 @@ -147970,7 +137987,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * c = (val & 0xF) * */ - __Pyx_TraceLine(435,0,__PYX_ERR(8, 435, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_val > 0) != 0); if (!__pyx_t_1) break; @@ -147982,7 +137998,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * * if c == 0: */ - __Pyx_TraceLine(436,0,__PYX_ERR(8, 436, __pyx_L1_error)) __pyx_v_c = (__pyx_v_val & 0xF); /* "src/lxml/serializer.pxi":438 @@ -147992,7 +138007,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * ptr[0] = '0' * elif c == 1: */ - __Pyx_TraceLine(438,0,__PYX_ERR(8, 438, __pyx_L1_error)) switch (__pyx_v_c) { case 0: @@ -148003,7 +138017,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 1: * ptr[0] = '1' */ - __Pyx_TraceLine(439,0,__PYX_ERR(8, 439, __pyx_L1_error)) (__pyx_v_ptr[0]) = '0'; /* "src/lxml/serializer.pxi":438 @@ -148014,15 +138027,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 1: */ break; - - /* "src/lxml/serializer.pxi":440 - * if c == 0: - * ptr[0] = '0' - * elif c == 1: # <<<<<<<<<<<<<< - * ptr[0] = '1' - * elif c == 2: - */ - __Pyx_TraceLine(440,0,__PYX_ERR(8, 440, __pyx_L1_error)) case 1: /* "src/lxml/serializer.pxi":441 @@ -148032,7 +138036,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 2: * ptr[0] = '2' */ - __Pyx_TraceLine(441,0,__PYX_ERR(8, 441, __pyx_L1_error)) (__pyx_v_ptr[0]) = '1'; /* "src/lxml/serializer.pxi":440 @@ -148043,15 +138046,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 2: */ break; - - /* "src/lxml/serializer.pxi":442 - * elif c == 1: - * ptr[0] = '1' - * elif c == 2: # <<<<<<<<<<<<<< - * ptr[0] = '2' - * elif c == 3: - */ - __Pyx_TraceLine(442,0,__PYX_ERR(8, 442, __pyx_L1_error)) case 2: /* "src/lxml/serializer.pxi":443 @@ -148061,7 +138055,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 3: * ptr[0] = '3' */ - __Pyx_TraceLine(443,0,__PYX_ERR(8, 443, __pyx_L1_error)) (__pyx_v_ptr[0]) = '2'; /* "src/lxml/serializer.pxi":442 @@ -148072,15 +138065,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 3: */ break; - - /* "src/lxml/serializer.pxi":444 - * elif c == 2: - * ptr[0] = '2' - * elif c == 3: # <<<<<<<<<<<<<< - * ptr[0] = '3' - * elif c == 4: - */ - __Pyx_TraceLine(444,0,__PYX_ERR(8, 444, __pyx_L1_error)) case 3: /* "src/lxml/serializer.pxi":445 @@ -148090,7 +138074,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 4: * ptr[0] = '4' */ - __Pyx_TraceLine(445,0,__PYX_ERR(8, 445, __pyx_L1_error)) (__pyx_v_ptr[0]) = '3'; /* "src/lxml/serializer.pxi":444 @@ -148101,15 +138084,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 4: */ break; - - /* "src/lxml/serializer.pxi":446 - * elif c == 3: - * ptr[0] = '3' - * elif c == 4: # <<<<<<<<<<<<<< - * ptr[0] = '4' - * elif c == 5: - */ - __Pyx_TraceLine(446,0,__PYX_ERR(8, 446, __pyx_L1_error)) case 4: /* "src/lxml/serializer.pxi":447 @@ -148119,7 +138093,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 5: * ptr[0] = '5' */ - __Pyx_TraceLine(447,0,__PYX_ERR(8, 447, __pyx_L1_error)) (__pyx_v_ptr[0]) = '4'; /* "src/lxml/serializer.pxi":446 @@ -148130,15 +138103,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 5: */ break; - - /* "src/lxml/serializer.pxi":448 - * elif c == 4: - * ptr[0] = '4' - * elif c == 5: # <<<<<<<<<<<<<< - * ptr[0] = '5' - * elif c == 6: - */ - __Pyx_TraceLine(448,0,__PYX_ERR(8, 448, __pyx_L1_error)) case 5: /* "src/lxml/serializer.pxi":449 @@ -148148,7 +138112,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 6: * ptr[0] = '6' */ - __Pyx_TraceLine(449,0,__PYX_ERR(8, 449, __pyx_L1_error)) (__pyx_v_ptr[0]) = '5'; /* "src/lxml/serializer.pxi":448 @@ -148159,15 +138122,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 6: */ break; - - /* "src/lxml/serializer.pxi":450 - * elif c == 5: - * ptr[0] = '5' - * elif c == 6: # <<<<<<<<<<<<<< - * ptr[0] = '6' - * elif c == 7: - */ - __Pyx_TraceLine(450,0,__PYX_ERR(8, 450, __pyx_L1_error)) case 6: /* "src/lxml/serializer.pxi":451 @@ -148177,7 +138131,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 7: * ptr[0] = '7' */ - __Pyx_TraceLine(451,0,__PYX_ERR(8, 451, __pyx_L1_error)) (__pyx_v_ptr[0]) = '6'; /* "src/lxml/serializer.pxi":450 @@ -148188,15 +138141,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 7: */ break; - - /* "src/lxml/serializer.pxi":452 - * elif c == 6: - * ptr[0] = '6' - * elif c == 7: # <<<<<<<<<<<<<< - * ptr[0] = '7' - * elif c == 8: - */ - __Pyx_TraceLine(452,0,__PYX_ERR(8, 452, __pyx_L1_error)) case 7: /* "src/lxml/serializer.pxi":453 @@ -148206,7 +138150,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 8: * ptr[0] = '8' */ - __Pyx_TraceLine(453,0,__PYX_ERR(8, 453, __pyx_L1_error)) (__pyx_v_ptr[0]) = '7'; /* "src/lxml/serializer.pxi":452 @@ -148217,15 +138160,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 8: */ break; - - /* "src/lxml/serializer.pxi":454 - * elif c == 7: - * ptr[0] = '7' - * elif c == 8: # <<<<<<<<<<<<<< - * ptr[0] = '8' - * elif c == 9: - */ - __Pyx_TraceLine(454,0,__PYX_ERR(8, 454, __pyx_L1_error)) case 8: /* "src/lxml/serializer.pxi":455 @@ -148235,7 +138169,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 9: * ptr[0] = '9' */ - __Pyx_TraceLine(455,0,__PYX_ERR(8, 455, __pyx_L1_error)) (__pyx_v_ptr[0]) = '8'; /* "src/lxml/serializer.pxi":454 @@ -148246,15 +138179,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 9: */ break; - - /* "src/lxml/serializer.pxi":456 - * elif c == 8: - * ptr[0] = '8' - * elif c == 9: # <<<<<<<<<<<<<< - * ptr[0] = '9' - * elif c == 0xA: - */ - __Pyx_TraceLine(456,0,__PYX_ERR(8, 456, __pyx_L1_error)) case 9: /* "src/lxml/serializer.pxi":457 @@ -148264,7 +138188,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 0xA: * ptr[0] = 'A' */ - __Pyx_TraceLine(457,0,__PYX_ERR(8, 457, __pyx_L1_error)) (__pyx_v_ptr[0]) = '9'; /* "src/lxml/serializer.pxi":456 @@ -148275,15 +138198,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 0xA: */ break; - - /* "src/lxml/serializer.pxi":458 - * elif c == 9: - * ptr[0] = '9' - * elif c == 0xA: # <<<<<<<<<<<<<< - * ptr[0] = 'A' - * elif c == 0xB: - */ - __Pyx_TraceLine(458,0,__PYX_ERR(8, 458, __pyx_L1_error)) case 0xA: /* "src/lxml/serializer.pxi":459 @@ -148293,7 +138207,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 0xB: * ptr[0] = 'B' */ - __Pyx_TraceLine(459,0,__PYX_ERR(8, 459, __pyx_L1_error)) (__pyx_v_ptr[0]) = 'A'; /* "src/lxml/serializer.pxi":458 @@ -148304,15 +138217,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 0xB: */ break; - - /* "src/lxml/serializer.pxi":460 - * elif c == 0xA: - * ptr[0] = 'A' - * elif c == 0xB: # <<<<<<<<<<<<<< - * ptr[0] = 'B' - * elif c == 0xC: - */ - __Pyx_TraceLine(460,0,__PYX_ERR(8, 460, __pyx_L1_error)) case 0xB: /* "src/lxml/serializer.pxi":461 @@ -148322,7 +138226,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 0xC: * ptr[0] = 'C' */ - __Pyx_TraceLine(461,0,__PYX_ERR(8, 461, __pyx_L1_error)) (__pyx_v_ptr[0]) = 'B'; /* "src/lxml/serializer.pxi":460 @@ -148333,15 +138236,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 0xC: */ break; - - /* "src/lxml/serializer.pxi":462 - * elif c == 0xB: - * ptr[0] = 'B' - * elif c == 0xC: # <<<<<<<<<<<<<< - * ptr[0] = 'C' - * elif c == 0xD: - */ - __Pyx_TraceLine(462,0,__PYX_ERR(8, 462, __pyx_L1_error)) case 0xC: /* "src/lxml/serializer.pxi":463 @@ -148351,7 +138245,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 0xD: * ptr[0] = 'D' */ - __Pyx_TraceLine(463,0,__PYX_ERR(8, 463, __pyx_L1_error)) (__pyx_v_ptr[0]) = 'C'; /* "src/lxml/serializer.pxi":462 @@ -148362,15 +138255,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 0xD: */ break; - - /* "src/lxml/serializer.pxi":464 - * elif c == 0xC: - * ptr[0] = 'C' - * elif c == 0xD: # <<<<<<<<<<<<<< - * ptr[0] = 'D' - * elif c == 0xE: - */ - __Pyx_TraceLine(464,0,__PYX_ERR(8, 464, __pyx_L1_error)) case 0xD: /* "src/lxml/serializer.pxi":465 @@ -148380,7 +138264,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 0xE: * ptr[0] = 'E' */ - __Pyx_TraceLine(465,0,__PYX_ERR(8, 465, __pyx_L1_error)) (__pyx_v_ptr[0]) = 'D'; /* "src/lxml/serializer.pxi":464 @@ -148391,15 +138274,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 0xE: */ break; - - /* "src/lxml/serializer.pxi":466 - * elif c == 0xD: - * ptr[0] = 'D' - * elif c == 0xE: # <<<<<<<<<<<<<< - * ptr[0] = 'E' - * elif c == 0xF: - */ - __Pyx_TraceLine(466,0,__PYX_ERR(8, 466, __pyx_L1_error)) case 0xE: /* "src/lxml/serializer.pxi":467 @@ -148409,7 +138283,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 0xF: * ptr[0] = 'F' */ - __Pyx_TraceLine(467,0,__PYX_ERR(8, 467, __pyx_L1_error)) (__pyx_v_ptr[0]) = 'E'; /* "src/lxml/serializer.pxi":466 @@ -148420,15 +138293,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * elif c == 0xF: */ break; - - /* "src/lxml/serializer.pxi":468 - * elif c == 0xE: - * ptr[0] = 'E' - * elif c == 0xF: # <<<<<<<<<<<<<< - * ptr[0] = 'F' - * else: - */ - __Pyx_TraceLine(468,0,__PYX_ERR(8, 468, __pyx_L1_error)) case 0xF: /* "src/lxml/serializer.pxi":469 @@ -148438,7 +138302,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * else: * ptr[0] = '0' */ - __Pyx_TraceLine(469,0,__PYX_ERR(8, 469, __pyx_L1_error)) (__pyx_v_ptr[0]) = 'F'; /* "src/lxml/serializer.pxi":468 @@ -148458,7 +138321,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * * ptr -= 1 */ - __Pyx_TraceLine(471,0,__PYX_ERR(8, 471, __pyx_L1_error)) (__pyx_v_ptr[0]) = '0'; break; } @@ -148470,7 +138332,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * * val >>= 4 */ - __Pyx_TraceLine(473,0,__PYX_ERR(8, 473, __pyx_L1_error)) __pyx_v_ptr = (__pyx_v_ptr - 1); /* "src/lxml/serializer.pxi":475 @@ -148480,7 +138341,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * * out[0] = ';' */ - __Pyx_TraceLine(475,0,__PYX_ERR(8, 475, __pyx_L1_error)) __pyx_v_val = (__pyx_v_val >> 4); } @@ -148491,7 +138351,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * out += 1 * out[0] = 0 */ - __Pyx_TraceLine(477,0,__PYX_ERR(8, 477, __pyx_L1_error)) (__pyx_v_out[0]) = ';'; /* "src/lxml/serializer.pxi":478 @@ -148501,7 +138360,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * out[0] = 0 * */ - __Pyx_TraceLine(478,0,__PYX_ERR(8, 478, __pyx_L1_error)) __pyx_v_out = (__pyx_v_out + 1); /* "src/lxml/serializer.pxi":479 @@ -148511,7 +138369,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * * return out */ - __Pyx_TraceLine(479,0,__PYX_ERR(8, 479, __pyx_L1_error)) (__pyx_v_out[0]) = 0; /* "src/lxml/serializer.pxi":481 @@ -148521,7 +138378,6 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char * * */ - __Pyx_TraceLine(481,0,__PYX_ERR(8, 481, __pyx_L1_error)) __pyx_r = __pyx_v_out; goto __pyx_L0; @@ -148534,11 +138390,7 @@ static unsigned char *__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(unsigned char */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.xmlSerializeHexCharRef", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -148559,7 +138411,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ int __pyx_v_val; int __pyx_v_l; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -148567,7 +138418,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; __Pyx_RefNannySetupContext("_write_attr_string", 0); - __Pyx_TraceCall("_write_attr_string", __pyx_f[8], 485, 0, __PYX_ERR(8, 485, __pyx_L1_error)); /* "src/lxml/serializer.pxi":491 * @@ -148576,7 +138426,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * cdef int l * */ - __Pyx_TraceLine(491,0,__PYX_ERR(8, 491, __pyx_L1_error)) __pyx_v_val = 0; /* "src/lxml/serializer.pxi":494 @@ -148586,7 +138435,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * return * */ - __Pyx_TraceLine(494,0,__PYX_ERR(8, 494, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_string == NULL) != 0); if (__pyx_t_1) { @@ -148597,7 +138445,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * * base = cur = string */ - __Pyx_TraceLine(495,0,__PYX_ERR(8, 495, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -148615,61 +138462,56 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * return * * base = cur = string # <<<<<<<<<<<<<< - * while (cur[0] != 0): - * if (cur[0] == '\n'): + * while cur[0] != 0: + * if cur[0] == '\n': */ - __Pyx_TraceLine(497,0,__PYX_ERR(8, 497, __pyx_L1_error)) __pyx_v_base = ((char const *)__pyx_v_string); __pyx_v_cur = ((char const *)__pyx_v_string); /* "src/lxml/serializer.pxi":498 * * base = cur = string - * while (cur[0] != 0): # <<<<<<<<<<<<<< - * if (cur[0] == '\n'): - * if (base != cur): + * while cur[0] != 0: # <<<<<<<<<<<<<< + * if cur[0] == '\n': + * if base != cur: */ - __Pyx_TraceLine(498,0,__PYX_ERR(8, 498, __pyx_L1_error)) while (1) { __pyx_t_1 = (((__pyx_v_cur[0]) != 0) != 0); if (!__pyx_t_1) break; /* "src/lxml/serializer.pxi":499 * base = cur = string - * while (cur[0] != 0): - * if (cur[0] == '\n'): # <<<<<<<<<<<<<< - * if (base != cur): + * while cur[0] != 0: + * if cur[0] == '\n': # <<<<<<<<<<<<<< + * if base != cur: * tree.xmlOutputBufferWrite(buf, cur - base, base) */ - __Pyx_TraceLine(499,0,__PYX_ERR(8, 499, __pyx_L1_error)) __pyx_t_1 = (((__pyx_v_cur[0]) == '\n') != 0); if (__pyx_t_1) { /* "src/lxml/serializer.pxi":500 - * while (cur[0] != 0): - * if (cur[0] == '\n'): - * if (base != cur): # <<<<<<<<<<<<<< + * while cur[0] != 0: + * if cur[0] == '\n': + * if base != cur: # <<<<<<<<<<<<<< * tree.xmlOutputBufferWrite(buf, cur - base, base) * */ - __Pyx_TraceLine(500,0,__PYX_ERR(8, 500, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_base != __pyx_v_cur) != 0); if (__pyx_t_1) { /* "src/lxml/serializer.pxi":501 - * if (cur[0] == '\n'): - * if (base != cur): + * if cur[0] == '\n': + * if base != cur: * tree.xmlOutputBufferWrite(buf, cur - base, base) # <<<<<<<<<<<<<< * * tree.xmlOutputBufferWrite(buf, 5, " ") */ - __Pyx_TraceLine(501,0,__PYX_ERR(8, 501, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_buf, (__pyx_v_cur - __pyx_v_base), __pyx_v_base)); /* "src/lxml/serializer.pxi":500 - * while (cur[0] != 0): - * if (cur[0] == '\n'): - * if (base != cur): # <<<<<<<<<<<<<< + * while cur[0] != 0: + * if cur[0] == '\n': + * if base != cur: # <<<<<<<<<<<<<< * tree.xmlOutputBufferWrite(buf, cur - base, base) * */ @@ -148682,7 +138524,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * cur += 1 * base = cur */ - __Pyx_TraceLine(503,0,__PYX_ERR(8, 503, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_buf, 5, ((const char *)" "))); /* "src/lxml/serializer.pxi":504 @@ -148692,7 +138533,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * base = cur * */ - __Pyx_TraceLine(504,0,__PYX_ERR(8, 504, __pyx_L1_error)) __pyx_v_cur = (__pyx_v_cur + 1); /* "src/lxml/serializer.pxi":505 @@ -148700,16 +138540,15 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * cur += 1 * base = cur # <<<<<<<<<<<<<< * - * elif (cur[0] == '\r'): + * elif cur[0] == '\r': */ - __Pyx_TraceLine(505,0,__PYX_ERR(8, 505, __pyx_L1_error)) __pyx_v_base = __pyx_v_cur; /* "src/lxml/serializer.pxi":499 * base = cur = string - * while (cur[0] != 0): - * if (cur[0] == '\n'): # <<<<<<<<<<<<<< - * if (base != cur): + * while cur[0] != 0: + * if cur[0] == '\n': # <<<<<<<<<<<<<< + * if base != cur: * tree.xmlOutputBufferWrite(buf, cur - base, base) */ goto __pyx_L6; @@ -148718,39 +138557,36 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ /* "src/lxml/serializer.pxi":507 * base = cur * - * elif (cur[0] == '\r'): # <<<<<<<<<<<<<< - * if (base != cur): + * elif cur[0] == '\r': # <<<<<<<<<<<<<< + * if base != cur: * tree.xmlOutputBufferWrite(buf, cur - base, base) */ - __Pyx_TraceLine(507,0,__PYX_ERR(8, 507, __pyx_L1_error)) __pyx_t_1 = (((__pyx_v_cur[0]) == '\r') != 0); if (__pyx_t_1) { /* "src/lxml/serializer.pxi":508 * - * elif (cur[0] == '\r'): - * if (base != cur): # <<<<<<<<<<<<<< + * elif cur[0] == '\r': + * if base != cur: # <<<<<<<<<<<<<< * tree.xmlOutputBufferWrite(buf, cur - base, base) * */ - __Pyx_TraceLine(508,0,__PYX_ERR(8, 508, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_base != __pyx_v_cur) != 0); if (__pyx_t_1) { /* "src/lxml/serializer.pxi":509 - * elif (cur[0] == '\r'): - * if (base != cur): + * elif cur[0] == '\r': + * if base != cur: * tree.xmlOutputBufferWrite(buf, cur - base, base) # <<<<<<<<<<<<<< * * tree.xmlOutputBufferWrite(buf, 5, " ") */ - __Pyx_TraceLine(509,0,__PYX_ERR(8, 509, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_buf, (__pyx_v_cur - __pyx_v_base), __pyx_v_base)); /* "src/lxml/serializer.pxi":508 * - * elif (cur[0] == '\r'): - * if (base != cur): # <<<<<<<<<<<<<< + * elif cur[0] == '\r': + * if base != cur: # <<<<<<<<<<<<<< * tree.xmlOutputBufferWrite(buf, cur - base, base) * */ @@ -148763,7 +138599,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * cur += 1 * base = cur */ - __Pyx_TraceLine(511,0,__PYX_ERR(8, 511, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_buf, 5, ((const char *)" "))); /* "src/lxml/serializer.pxi":512 @@ -148773,7 +138608,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * base = cur * */ - __Pyx_TraceLine(512,0,__PYX_ERR(8, 512, __pyx_L1_error)) __pyx_v_cur = (__pyx_v_cur + 1); /* "src/lxml/serializer.pxi":513 @@ -148781,16 +138615,15 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * cur += 1 * base = cur # <<<<<<<<<<<<<< * - * elif (cur[0] == '\t'): + * elif cur[0] == '\t': */ - __Pyx_TraceLine(513,0,__PYX_ERR(8, 513, __pyx_L1_error)) __pyx_v_base = __pyx_v_cur; /* "src/lxml/serializer.pxi":507 * base = cur * - * elif (cur[0] == '\r'): # <<<<<<<<<<<<<< - * if (base != cur): + * elif cur[0] == '\r': # <<<<<<<<<<<<<< + * if base != cur: * tree.xmlOutputBufferWrite(buf, cur - base, base) */ goto __pyx_L6; @@ -148799,39 +138632,36 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ /* "src/lxml/serializer.pxi":515 * base = cur * - * elif (cur[0] == '\t'): # <<<<<<<<<<<<<< - * if (base != cur): + * elif cur[0] == '\t': # <<<<<<<<<<<<<< + * if base != cur: * tree.xmlOutputBufferWrite(buf, cur - base, base) */ - __Pyx_TraceLine(515,0,__PYX_ERR(8, 515, __pyx_L1_error)) __pyx_t_1 = (((__pyx_v_cur[0]) == '\t') != 0); if (__pyx_t_1) { /* "src/lxml/serializer.pxi":516 * - * elif (cur[0] == '\t'): - * if (base != cur): # <<<<<<<<<<<<<< + * elif cur[0] == '\t': + * if base != cur: # <<<<<<<<<<<<<< * tree.xmlOutputBufferWrite(buf, cur - base, base) * */ - __Pyx_TraceLine(516,0,__PYX_ERR(8, 516, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_base != __pyx_v_cur) != 0); if (__pyx_t_1) { /* "src/lxml/serializer.pxi":517 - * elif (cur[0] == '\t'): - * if (base != cur): + * elif cur[0] == '\t': + * if base != cur: * tree.xmlOutputBufferWrite(buf, cur - base, base) # <<<<<<<<<<<<<< * * tree.xmlOutputBufferWrite(buf, 4, " ") */ - __Pyx_TraceLine(517,0,__PYX_ERR(8, 517, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_buf, (__pyx_v_cur - __pyx_v_base), __pyx_v_base)); /* "src/lxml/serializer.pxi":516 * - * elif (cur[0] == '\t'): - * if (base != cur): # <<<<<<<<<<<<<< + * elif cur[0] == '\t': + * if base != cur: # <<<<<<<<<<<<<< * tree.xmlOutputBufferWrite(buf, cur - base, base) * */ @@ -148844,7 +138674,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * cur += 1 * base = cur */ - __Pyx_TraceLine(519,0,__PYX_ERR(8, 519, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_buf, 4, ((const char *)" "))); /* "src/lxml/serializer.pxi":520 @@ -148854,7 +138683,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * base = cur * */ - __Pyx_TraceLine(520,0,__PYX_ERR(8, 520, __pyx_L1_error)) __pyx_v_cur = (__pyx_v_cur + 1); /* "src/lxml/serializer.pxi":521 @@ -148862,16 +138690,15 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * cur += 1 * base = cur # <<<<<<<<<<<<<< * - * elif (cur[0] == '"'): + * elif cur[0] == '"': */ - __Pyx_TraceLine(521,0,__PYX_ERR(8, 521, __pyx_L1_error)) __pyx_v_base = __pyx_v_cur; /* "src/lxml/serializer.pxi":515 * base = cur * - * elif (cur[0] == '\t'): # <<<<<<<<<<<<<< - * if (base != cur): + * elif cur[0] == '\t': # <<<<<<<<<<<<<< + * if base != cur: * tree.xmlOutputBufferWrite(buf, cur - base, base) */ goto __pyx_L6; @@ -148880,39 +138707,36 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ /* "src/lxml/serializer.pxi":523 * base = cur * - * elif (cur[0] == '"'): # <<<<<<<<<<<<<< - * if (base != cur): + * elif cur[0] == '"': # <<<<<<<<<<<<<< + * if base != cur: * tree.xmlOutputBufferWrite(buf, cur - base, base) */ - __Pyx_TraceLine(523,0,__PYX_ERR(8, 523, __pyx_L1_error)) __pyx_t_1 = (((__pyx_v_cur[0]) == '"') != 0); if (__pyx_t_1) { /* "src/lxml/serializer.pxi":524 * - * elif (cur[0] == '"'): - * if (base != cur): # <<<<<<<<<<<<<< + * elif cur[0] == '"': + * if base != cur: # <<<<<<<<<<<<<< * tree.xmlOutputBufferWrite(buf, cur - base, base) * */ - __Pyx_TraceLine(524,0,__PYX_ERR(8, 524, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_base != __pyx_v_cur) != 0); if (__pyx_t_1) { /* "src/lxml/serializer.pxi":525 - * elif (cur[0] == '"'): - * if (base != cur): + * elif cur[0] == '"': + * if base != cur: * tree.xmlOutputBufferWrite(buf, cur - base, base) # <<<<<<<<<<<<<< * * tree.xmlOutputBufferWrite(buf, 6, """) */ - __Pyx_TraceLine(525,0,__PYX_ERR(8, 525, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_buf, (__pyx_v_cur - __pyx_v_base), __pyx_v_base)); /* "src/lxml/serializer.pxi":524 * - * elif (cur[0] == '"'): - * if (base != cur): # <<<<<<<<<<<<<< + * elif cur[0] == '"': + * if base != cur: # <<<<<<<<<<<<<< * tree.xmlOutputBufferWrite(buf, cur - base, base) * */ @@ -148925,7 +138749,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * cur += 1 * base = cur */ - __Pyx_TraceLine(527,0,__PYX_ERR(8, 527, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_buf, 6, ((const char *)"""))); /* "src/lxml/serializer.pxi":528 @@ -148935,7 +138758,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * base = cur * */ - __Pyx_TraceLine(528,0,__PYX_ERR(8, 528, __pyx_L1_error)) __pyx_v_cur = (__pyx_v_cur + 1); /* "src/lxml/serializer.pxi":529 @@ -148943,16 +138765,15 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * cur += 1 * base = cur # <<<<<<<<<<<<<< * - * elif (cur[0] == '<'): + * elif cur[0] == '<': */ - __Pyx_TraceLine(529,0,__PYX_ERR(8, 529, __pyx_L1_error)) __pyx_v_base = __pyx_v_cur; /* "src/lxml/serializer.pxi":523 * base = cur * - * elif (cur[0] == '"'): # <<<<<<<<<<<<<< - * if (base != cur): + * elif cur[0] == '"': # <<<<<<<<<<<<<< + * if base != cur: * tree.xmlOutputBufferWrite(buf, cur - base, base) */ goto __pyx_L6; @@ -148961,39 +138782,36 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ /* "src/lxml/serializer.pxi":531 * base = cur * - * elif (cur[0] == '<'): # <<<<<<<<<<<<<< - * if (base != cur): + * elif cur[0] == '<': # <<<<<<<<<<<<<< + * if base != cur: * tree.xmlOutputBufferWrite(buf, cur - base, base) */ - __Pyx_TraceLine(531,0,__PYX_ERR(8, 531, __pyx_L1_error)) __pyx_t_1 = (((__pyx_v_cur[0]) == '<') != 0); if (__pyx_t_1) { /* "src/lxml/serializer.pxi":532 * - * elif (cur[0] == '<'): - * if (base != cur): # <<<<<<<<<<<<<< + * elif cur[0] == '<': + * if base != cur: # <<<<<<<<<<<<<< * tree.xmlOutputBufferWrite(buf, cur - base, base) * */ - __Pyx_TraceLine(532,0,__PYX_ERR(8, 532, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_base != __pyx_v_cur) != 0); if (__pyx_t_1) { /* "src/lxml/serializer.pxi":533 - * elif (cur[0] == '<'): - * if (base != cur): + * elif cur[0] == '<': + * if base != cur: * tree.xmlOutputBufferWrite(buf, cur - base, base) # <<<<<<<<<<<<<< * * tree.xmlOutputBufferWrite(buf, 4, "<") */ - __Pyx_TraceLine(533,0,__PYX_ERR(8, 533, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_buf, (__pyx_v_cur - __pyx_v_base), __pyx_v_base)); /* "src/lxml/serializer.pxi":532 * - * elif (cur[0] == '<'): - * if (base != cur): # <<<<<<<<<<<<<< + * elif cur[0] == '<': + * if base != cur: # <<<<<<<<<<<<<< * tree.xmlOutputBufferWrite(buf, cur - base, base) * */ @@ -149006,7 +138824,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * cur += 1 * base = cur */ - __Pyx_TraceLine(535,0,__PYX_ERR(8, 535, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_buf, 4, ((const char *)"<"))); /* "src/lxml/serializer.pxi":536 @@ -149016,7 +138833,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * base = cur * */ - __Pyx_TraceLine(536,0,__PYX_ERR(8, 536, __pyx_L1_error)) __pyx_v_cur = (__pyx_v_cur + 1); /* "src/lxml/serializer.pxi":537 @@ -149024,16 +138840,15 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * cur += 1 * base = cur # <<<<<<<<<<<<<< * - * elif (cur[0] == '>'): + * elif cur[0] == '>': */ - __Pyx_TraceLine(537,0,__PYX_ERR(8, 537, __pyx_L1_error)) __pyx_v_base = __pyx_v_cur; /* "src/lxml/serializer.pxi":531 * base = cur * - * elif (cur[0] == '<'): # <<<<<<<<<<<<<< - * if (base != cur): + * elif cur[0] == '<': # <<<<<<<<<<<<<< + * if base != cur: * tree.xmlOutputBufferWrite(buf, cur - base, base) */ goto __pyx_L6; @@ -149042,39 +138857,36 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ /* "src/lxml/serializer.pxi":539 * base = cur * - * elif (cur[0] == '>'): # <<<<<<<<<<<<<< - * if (base != cur): + * elif cur[0] == '>': # <<<<<<<<<<<<<< + * if base != cur: * tree.xmlOutputBufferWrite(buf, cur - base, base) */ - __Pyx_TraceLine(539,0,__PYX_ERR(8, 539, __pyx_L1_error)) __pyx_t_1 = (((__pyx_v_cur[0]) == '>') != 0); if (__pyx_t_1) { /* "src/lxml/serializer.pxi":540 * - * elif (cur[0] == '>'): - * if (base != cur): # <<<<<<<<<<<<<< + * elif cur[0] == '>': + * if base != cur: # <<<<<<<<<<<<<< * tree.xmlOutputBufferWrite(buf, cur - base, base) * */ - __Pyx_TraceLine(540,0,__PYX_ERR(8, 540, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_base != __pyx_v_cur) != 0); if (__pyx_t_1) { /* "src/lxml/serializer.pxi":541 - * elif (cur[0] == '>'): - * if (base != cur): + * elif cur[0] == '>': + * if base != cur: * tree.xmlOutputBufferWrite(buf, cur - base, base) # <<<<<<<<<<<<<< * * tree.xmlOutputBufferWrite(buf, 4, ">") */ - __Pyx_TraceLine(541,0,__PYX_ERR(8, 541, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_buf, (__pyx_v_cur - __pyx_v_base), __pyx_v_base)); /* "src/lxml/serializer.pxi":540 * - * elif (cur[0] == '>'): - * if (base != cur): # <<<<<<<<<<<<<< + * elif cur[0] == '>': + * if base != cur: # <<<<<<<<<<<<<< * tree.xmlOutputBufferWrite(buf, cur - base, base) * */ @@ -149087,7 +138899,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * cur += 1 * base = cur */ - __Pyx_TraceLine(543,0,__PYX_ERR(8, 543, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_buf, 4, ((const char *)">"))); /* "src/lxml/serializer.pxi":544 @@ -149095,26 +138906,24 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * tree.xmlOutputBufferWrite(buf, 4, ">") * cur += 1 # <<<<<<<<<<<<<< * base = cur - * elif (cur[0] == '&'): + * elif cur[0] == '&': */ - __Pyx_TraceLine(544,0,__PYX_ERR(8, 544, __pyx_L1_error)) __pyx_v_cur = (__pyx_v_cur + 1); /* "src/lxml/serializer.pxi":545 * tree.xmlOutputBufferWrite(buf, 4, ">") * cur += 1 * base = cur # <<<<<<<<<<<<<< - * elif (cur[0] == '&'): - * if (base != cur): + * elif cur[0] == '&': + * if base != cur: */ - __Pyx_TraceLine(545,0,__PYX_ERR(8, 545, __pyx_L1_error)) __pyx_v_base = __pyx_v_cur; /* "src/lxml/serializer.pxi":539 * base = cur * - * elif (cur[0] == '>'): # <<<<<<<<<<<<<< - * if (base != cur): + * elif cur[0] == '>': # <<<<<<<<<<<<<< + * if base != cur: * tree.xmlOutputBufferWrite(buf, cur - base, base) */ goto __pyx_L6; @@ -149123,39 +138932,36 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ /* "src/lxml/serializer.pxi":546 * cur += 1 * base = cur - * elif (cur[0] == '&'): # <<<<<<<<<<<<<< - * if (base != cur): + * elif cur[0] == '&': # <<<<<<<<<<<<<< + * if base != cur: * tree.xmlOutputBufferWrite(buf, cur - base, base) */ - __Pyx_TraceLine(546,0,__PYX_ERR(8, 546, __pyx_L1_error)) __pyx_t_1 = (((__pyx_v_cur[0]) == '&') != 0); if (__pyx_t_1) { /* "src/lxml/serializer.pxi":547 * base = cur - * elif (cur[0] == '&'): - * if (base != cur): # <<<<<<<<<<<<<< + * elif cur[0] == '&': + * if base != cur: # <<<<<<<<<<<<<< * tree.xmlOutputBufferWrite(buf, cur - base, base) * */ - __Pyx_TraceLine(547,0,__PYX_ERR(8, 547, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_base != __pyx_v_cur) != 0); if (__pyx_t_1) { /* "src/lxml/serializer.pxi":548 - * elif (cur[0] == '&'): - * if (base != cur): + * elif cur[0] == '&': + * if base != cur: * tree.xmlOutputBufferWrite(buf, cur - base, base) # <<<<<<<<<<<<<< * * tree.xmlOutputBufferWrite(buf, 5, "&") */ - __Pyx_TraceLine(548,0,__PYX_ERR(8, 548, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_buf, (__pyx_v_cur - __pyx_v_base), __pyx_v_base)); /* "src/lxml/serializer.pxi":547 * base = cur - * elif (cur[0] == '&'): - * if (base != cur): # <<<<<<<<<<<<<< + * elif cur[0] == '&': + * if base != cur: # <<<<<<<<<<<<<< * tree.xmlOutputBufferWrite(buf, cur - base, base) * */ @@ -149168,7 +138974,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * cur += 1 * base = cur */ - __Pyx_TraceLine(550,0,__PYX_ERR(8, 550, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_buf, 5, ((const char *)"&"))); /* "src/lxml/serializer.pxi":551 @@ -149178,7 +138983,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * base = cur * */ - __Pyx_TraceLine(551,0,__PYX_ERR(8, 551, __pyx_L1_error)) __pyx_v_cur = (__pyx_v_cur + 1); /* "src/lxml/serializer.pxi":552 @@ -149188,14 +138992,13 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * * elif (cur[0] >= 0x80) and (cur[1] != 0): */ - __Pyx_TraceLine(552,0,__PYX_ERR(8, 552, __pyx_L1_error)) __pyx_v_base = __pyx_v_cur; /* "src/lxml/serializer.pxi":546 * cur += 1 * base = cur - * elif (cur[0] == '&'): # <<<<<<<<<<<<<< - * if (base != cur): + * elif cur[0] == '&': # <<<<<<<<<<<<<< + * if base != cur: * tree.xmlOutputBufferWrite(buf, cur - base, base) */ goto __pyx_L6; @@ -149206,9 +139009,8 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * * elif (cur[0] >= 0x80) and (cur[1] != 0): # <<<<<<<<<<<<<< * - * if (base != cur): + * if base != cur: */ - __Pyx_TraceLine(554,0,__PYX_ERR(8, 554, __pyx_L1_error)) __pyx_t_2 = ((((unsigned char const )(__pyx_v_cur[0])) >= 0x80) != 0); if (__pyx_t_2) { } else { @@ -149223,28 +139025,26 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ /* "src/lxml/serializer.pxi":556 * elif (cur[0] >= 0x80) and (cur[1] != 0): * - * if (base != cur): # <<<<<<<<<<<<<< + * if base != cur: # <<<<<<<<<<<<<< * tree.xmlOutputBufferWrite(buf, cur - base, base) * */ - __Pyx_TraceLine(556,0,__PYX_ERR(8, 556, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_base != __pyx_v_cur) != 0); if (__pyx_t_1) { /* "src/lxml/serializer.pxi":557 * - * if (base != cur): + * if base != cur: * tree.xmlOutputBufferWrite(buf, cur - base, base) # <<<<<<<<<<<<<< * * ucur = cur */ - __Pyx_TraceLine(557,0,__PYX_ERR(8, 557, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_buf, (__pyx_v_cur - __pyx_v_base), __pyx_v_base)); /* "src/lxml/serializer.pxi":556 * elif (cur[0] >= 0x80) and (cur[1] != 0): * - * if (base != cur): # <<<<<<<<<<<<<< + * if base != cur: # <<<<<<<<<<<<<< * tree.xmlOutputBufferWrite(buf, cur - base, base) * */ @@ -149255,30 +139055,27 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * * ucur = cur # <<<<<<<<<<<<<< * - * if (ucur[0] < 0xC0): + * if ucur[0] < 0xC0: */ - __Pyx_TraceLine(559,0,__PYX_ERR(8, 559, __pyx_L1_error)) __pyx_v_ucur = ((unsigned char const *)__pyx_v_cur); /* "src/lxml/serializer.pxi":561 * ucur = cur * - * if (ucur[0] < 0xC0): # <<<<<<<<<<<<<< + * if ucur[0] < 0xC0: # <<<<<<<<<<<<<< * # invalid UTF-8 sequence * val = ucur[0] */ - __Pyx_TraceLine(561,0,__PYX_ERR(8, 561, __pyx_L1_error)) __pyx_t_1 = (((__pyx_v_ucur[0]) < 0xC0) != 0); if (__pyx_t_1) { /* "src/lxml/serializer.pxi":563 - * if (ucur[0] < 0xC0): + * if ucur[0] < 0xC0: * # invalid UTF-8 sequence * val = ucur[0] # <<<<<<<<<<<<<< * l = 1 * */ - __Pyx_TraceLine(563,0,__PYX_ERR(8, 563, __pyx_L1_error)) __pyx_v_val = (__pyx_v_ucur[0]); /* "src/lxml/serializer.pxi":564 @@ -149286,15 +139083,14 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * val = ucur[0] * l = 1 # <<<<<<<<<<<<<< * - * elif (ucur[0] < 0xE0): + * elif ucur[0] < 0xE0: */ - __Pyx_TraceLine(564,0,__PYX_ERR(8, 564, __pyx_L1_error)) __pyx_v_l = 1; /* "src/lxml/serializer.pxi":561 * ucur = cur * - * if (ucur[0] < 0xC0): # <<<<<<<<<<<<<< + * if ucur[0] < 0xC0: # <<<<<<<<<<<<<< * # invalid UTF-8 sequence * val = ucur[0] */ @@ -149304,32 +139100,29 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ /* "src/lxml/serializer.pxi":566 * l = 1 * - * elif (ucur[0] < 0xE0): # <<<<<<<<<<<<<< + * elif ucur[0] < 0xE0: # <<<<<<<<<<<<<< * val = (ucur[0]) & 0x1F * val <<= 6 */ - __Pyx_TraceLine(566,0,__PYX_ERR(8, 566, __pyx_L1_error)) __pyx_t_1 = (((__pyx_v_ucur[0]) < 0xE0) != 0); if (__pyx_t_1) { /* "src/lxml/serializer.pxi":567 * - * elif (ucur[0] < 0xE0): + * elif ucur[0] < 0xE0: * val = (ucur[0]) & 0x1F # <<<<<<<<<<<<<< * val <<= 6 * val |= (ucur[1]) & 0x3F */ - __Pyx_TraceLine(567,0,__PYX_ERR(8, 567, __pyx_L1_error)) __pyx_v_val = ((__pyx_v_ucur[0]) & 0x1F); /* "src/lxml/serializer.pxi":568 - * elif (ucur[0] < 0xE0): + * elif ucur[0] < 0xE0: * val = (ucur[0]) & 0x1F * val <<= 6 # <<<<<<<<<<<<<< * val |= (ucur[1]) & 0x3F * l = 2 */ - __Pyx_TraceLine(568,0,__PYX_ERR(8, 568, __pyx_L1_error)) __pyx_v_val = (__pyx_v_val << 6); /* "src/lxml/serializer.pxi":569 @@ -149339,7 +139132,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * l = 2 * */ - __Pyx_TraceLine(569,0,__PYX_ERR(8, 569, __pyx_L1_error)) __pyx_v_val = (__pyx_v_val | ((__pyx_v_ucur[1]) & 0x3F)); /* "src/lxml/serializer.pxi":570 @@ -149347,15 +139139,14 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * val |= (ucur[1]) & 0x3F * l = 2 # <<<<<<<<<<<<<< * - * elif ((ucur[0] < 0xF0) and (ucur[2] != 0)): + * elif (ucur[0] < 0xF0) and (ucur[2] != 0): */ - __Pyx_TraceLine(570,0,__PYX_ERR(8, 570, __pyx_L1_error)) __pyx_v_l = 2; /* "src/lxml/serializer.pxi":566 * l = 1 * - * elif (ucur[0] < 0xE0): # <<<<<<<<<<<<<< + * elif ucur[0] < 0xE0: # <<<<<<<<<<<<<< * val = (ucur[0]) & 0x1F * val <<= 6 */ @@ -149365,11 +139156,10 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ /* "src/lxml/serializer.pxi":572 * l = 2 * - * elif ((ucur[0] < 0xF0) and (ucur[2] != 0)): # <<<<<<<<<<<<<< + * elif (ucur[0] < 0xF0) and (ucur[2] != 0): # <<<<<<<<<<<<<< * val = (ucur[0]) & 0x0F * val <<= 6 */ - __Pyx_TraceLine(572,0,__PYX_ERR(8, 572, __pyx_L1_error)) __pyx_t_2 = (((__pyx_v_ucur[0]) < 0xF0) != 0); if (__pyx_t_2) { } else { @@ -149383,22 +139173,20 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ /* "src/lxml/serializer.pxi":573 * - * elif ((ucur[0] < 0xF0) and (ucur[2] != 0)): + * elif (ucur[0] < 0xF0) and (ucur[2] != 0): * val = (ucur[0]) & 0x0F # <<<<<<<<<<<<<< * val <<= 6 * val |= (ucur[1]) & 0x3F */ - __Pyx_TraceLine(573,0,__PYX_ERR(8, 573, __pyx_L1_error)) __pyx_v_val = ((__pyx_v_ucur[0]) & 0x0F); /* "src/lxml/serializer.pxi":574 - * elif ((ucur[0] < 0xF0) and (ucur[2] != 0)): + * elif (ucur[0] < 0xF0) and (ucur[2] != 0): * val = (ucur[0]) & 0x0F * val <<= 6 # <<<<<<<<<<<<<< * val |= (ucur[1]) & 0x3F * val <<= 6 */ - __Pyx_TraceLine(574,0,__PYX_ERR(8, 574, __pyx_L1_error)) __pyx_v_val = (__pyx_v_val << 6); /* "src/lxml/serializer.pxi":575 @@ -149408,7 +139196,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * val <<= 6 * val |= (ucur[2]) & 0x3F */ - __Pyx_TraceLine(575,0,__PYX_ERR(8, 575, __pyx_L1_error)) __pyx_v_val = (__pyx_v_val | ((__pyx_v_ucur[1]) & 0x3F)); /* "src/lxml/serializer.pxi":576 @@ -149418,7 +139205,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * val |= (ucur[2]) & 0x3F * l = 3 */ - __Pyx_TraceLine(576,0,__PYX_ERR(8, 576, __pyx_L1_error)) __pyx_v_val = (__pyx_v_val << 6); /* "src/lxml/serializer.pxi":577 @@ -149428,7 +139214,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * l = 3 * */ - __Pyx_TraceLine(577,0,__PYX_ERR(8, 577, __pyx_L1_error)) __pyx_v_val = (__pyx_v_val | ((__pyx_v_ucur[2]) & 0x3F)); /* "src/lxml/serializer.pxi":578 @@ -149436,15 +139221,14 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * val |= (ucur[2]) & 0x3F * l = 3 # <<<<<<<<<<<<<< * - * elif ((ucur[0] < 0xF8) and (ucur[2] != 0) and (ucur[3] != 0)): + * elif (ucur[0] < 0xF8) and (ucur[2] != 0) and (ucur[3] != 0): */ - __Pyx_TraceLine(578,0,__PYX_ERR(8, 578, __pyx_L1_error)) __pyx_v_l = 3; /* "src/lxml/serializer.pxi":572 * l = 2 * - * elif ((ucur[0] < 0xF0) and (ucur[2] != 0)): # <<<<<<<<<<<<<< + * elif (ucur[0] < 0xF0) and (ucur[2] != 0): # <<<<<<<<<<<<<< * val = (ucur[0]) & 0x0F * val <<= 6 */ @@ -149454,11 +139238,10 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ /* "src/lxml/serializer.pxi":580 * l = 3 * - * elif ((ucur[0] < 0xF8) and (ucur[2] != 0) and (ucur[3] != 0)): # <<<<<<<<<<<<<< + * elif (ucur[0] < 0xF8) and (ucur[2] != 0) and (ucur[3] != 0): # <<<<<<<<<<<<<< * val = (ucur[0]) & 0x07 * val <<= 6 */ - __Pyx_TraceLine(580,0,__PYX_ERR(8, 580, __pyx_L1_error)) __pyx_t_2 = (((__pyx_v_ucur[0]) < 0xF8) != 0); if (__pyx_t_2) { } else { @@ -149478,22 +139261,20 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ /* "src/lxml/serializer.pxi":581 * - * elif ((ucur[0] < 0xF8) and (ucur[2] != 0) and (ucur[3] != 0)): + * elif (ucur[0] < 0xF8) and (ucur[2] != 0) and (ucur[3] != 0): * val = (ucur[0]) & 0x07 # <<<<<<<<<<<<<< * val <<= 6 * val |= (ucur[1]) & 0x3F */ - __Pyx_TraceLine(581,0,__PYX_ERR(8, 581, __pyx_L1_error)) __pyx_v_val = ((__pyx_v_ucur[0]) & 0x07); /* "src/lxml/serializer.pxi":582 - * elif ((ucur[0] < 0xF8) and (ucur[2] != 0) and (ucur[3] != 0)): + * elif (ucur[0] < 0xF8) and (ucur[2] != 0) and (ucur[3] != 0): * val = (ucur[0]) & 0x07 * val <<= 6 # <<<<<<<<<<<<<< * val |= (ucur[1]) & 0x3F * val <<= 6 */ - __Pyx_TraceLine(582,0,__PYX_ERR(8, 582, __pyx_L1_error)) __pyx_v_val = (__pyx_v_val << 6); /* "src/lxml/serializer.pxi":583 @@ -149503,7 +139284,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * val <<= 6 * val |= (ucur[2]) & 0x3F */ - __Pyx_TraceLine(583,0,__PYX_ERR(8, 583, __pyx_L1_error)) __pyx_v_val = (__pyx_v_val | ((__pyx_v_ucur[1]) & 0x3F)); /* "src/lxml/serializer.pxi":584 @@ -149513,7 +139293,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * val |= (ucur[2]) & 0x3F * val <<= 6 */ - __Pyx_TraceLine(584,0,__PYX_ERR(8, 584, __pyx_L1_error)) __pyx_v_val = (__pyx_v_val << 6); /* "src/lxml/serializer.pxi":585 @@ -149523,7 +139302,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * val <<= 6 * val |= (ucur[3]) & 0x3F */ - __Pyx_TraceLine(585,0,__PYX_ERR(8, 585, __pyx_L1_error)) __pyx_v_val = (__pyx_v_val | ((__pyx_v_ucur[2]) & 0x3F)); /* "src/lxml/serializer.pxi":586 @@ -149533,7 +139311,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * val |= (ucur[3]) & 0x3F * l = 4 */ - __Pyx_TraceLine(586,0,__PYX_ERR(8, 586, __pyx_L1_error)) __pyx_v_val = (__pyx_v_val << 6); /* "src/lxml/serializer.pxi":587 @@ -149543,7 +139320,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * l = 4 * else: */ - __Pyx_TraceLine(587,0,__PYX_ERR(8, 587, __pyx_L1_error)) __pyx_v_val = (__pyx_v_val | ((__pyx_v_ucur[3]) & 0x3F)); /* "src/lxml/serializer.pxi":588 @@ -149553,13 +139329,12 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * else: * # invalid UTF-8 sequence */ - __Pyx_TraceLine(588,0,__PYX_ERR(8, 588, __pyx_L1_error)) __pyx_v_l = 4; /* "src/lxml/serializer.pxi":580 * l = 3 * - * elif ((ucur[0] < 0xF8) and (ucur[2] != 0) and (ucur[3] != 0)): # <<<<<<<<<<<<<< + * elif (ucur[0] < 0xF8) and (ucur[2] != 0) and (ucur[3] != 0): # <<<<<<<<<<<<<< * val = (ucur[0]) & 0x07 * val <<= 6 */ @@ -149573,7 +139348,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * l = 1 * */ - __Pyx_TraceLine(591,0,__PYX_ERR(8, 591, __pyx_L1_error)) /*else*/ { __pyx_v_val = (__pyx_v_ucur[0]); @@ -149582,9 +139356,8 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * val = ucur[0] * l = 1 # <<<<<<<<<<<<<< * - * if ((l == 1) or (not tree.xmlIsCharQ(val))): + * if (l == 1) or (not tree.xmlIsCharQ(val)): */ - __Pyx_TraceLine(592,0,__PYX_ERR(8, 592, __pyx_L1_error)) __pyx_v_l = 1; } __pyx_L17:; @@ -149592,11 +139365,10 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ /* "src/lxml/serializer.pxi":594 * l = 1 * - * if ((l == 1) or (not tree.xmlIsCharQ(val))): # <<<<<<<<<<<<<< + * if (l == 1) or (not tree.xmlIsCharQ(val)): # <<<<<<<<<<<<<< * raise ValueError(f"Invalid character: {val:X}") * */ - __Pyx_TraceLine(594,0,__PYX_ERR(8, 594, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_l == 1) != 0); if (!__pyx_t_2) { } else { @@ -149610,12 +139382,11 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ /* "src/lxml/serializer.pxi":595 * - * if ((l == 1) or (not tree.xmlIsCharQ(val))): + * if (l == 1) or (not tree.xmlIsCharQ(val)): * raise ValueError(f"Invalid character: {val:X}") # <<<<<<<<<<<<<< * * # We could do multiple things here. Just save */ - __Pyx_TraceLine(595,0,__PYX_ERR(8, 595, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_v_val, 0, ' ', 'X'); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Invalid_character, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 595, __pyx_L1_error) @@ -149631,7 +139402,7 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ /* "src/lxml/serializer.pxi":594 * l = 1 * - * if ((l == 1) or (not tree.xmlIsCharQ(val))): # <<<<<<<<<<<<<< + * if (l == 1) or (not tree.xmlIsCharQ(val)): # <<<<<<<<<<<<<< * raise ValueError(f"Invalid character: {val:X}") * */ @@ -149644,7 +139415,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * tree.xmlOutputBufferWrite(buf, len(tmp), tmp) * cur += l */ - __Pyx_TraceLine(599,0,__PYX_ERR(8, 599, __pyx_L1_error)) (void)(__pyx_f_4lxml_5etree_xmlSerializeHexCharRef(__pyx_v_tmp, __pyx_v_val)); /* "src/lxml/serializer.pxi":600 @@ -149654,7 +139424,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * cur += l * base = cur */ - __Pyx_TraceLine(600,0,__PYX_ERR(8, 600, __pyx_L1_error)) __pyx_t_5 = strlen(((char const *)__pyx_v_tmp)); (void)(xmlOutputBufferWrite(__pyx_v_buf, __pyx_t_5, ((char const *)__pyx_v_tmp))); @@ -149665,7 +139434,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * base = cur * */ - __Pyx_TraceLine(601,0,__PYX_ERR(8, 601, __pyx_L1_error)) __pyx_v_cur = (__pyx_v_cur + __pyx_v_l); /* "src/lxml/serializer.pxi":602 @@ -149675,7 +139443,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * * else: */ - __Pyx_TraceLine(602,0,__PYX_ERR(8, 602, __pyx_L1_error)) __pyx_v_base = __pyx_v_cur; /* "src/lxml/serializer.pxi":554 @@ -149683,7 +139450,7 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * * elif (cur[0] >= 0x80) and (cur[1] != 0): # <<<<<<<<<<<<<< * - * if (base != cur): + * if base != cur: */ goto __pyx_L6; } @@ -149693,9 +139460,8 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ * else: * cur += 1 # <<<<<<<<<<<<<< * - * if (base != cur): + * if base != cur: */ - __Pyx_TraceLine(605,0,__PYX_ERR(8, 605, __pyx_L1_error)) /*else*/ { __pyx_v_cur = (__pyx_v_cur + 1); } @@ -149705,28 +139471,26 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ /* "src/lxml/serializer.pxi":607 * cur += 1 * - * if (base != cur): # <<<<<<<<<<<<<< + * if base != cur: # <<<<<<<<<<<<<< * tree.xmlOutputBufferWrite(buf, cur - base, base) * */ - __Pyx_TraceLine(607,0,__PYX_ERR(8, 607, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_base != __pyx_v_cur) != 0); if (__pyx_t_1) { /* "src/lxml/serializer.pxi":608 * - * if (base != cur): + * if base != cur: * tree.xmlOutputBufferWrite(buf, cur - base, base) # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(608,0,__PYX_ERR(8, 608, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_buf, (__pyx_v_cur - __pyx_v_base), __pyx_v_base)); /* "src/lxml/serializer.pxi":607 * cur += 1 * - * if (base != cur): # <<<<<<<<<<<<<< + * if base != cur: # <<<<<<<<<<<<<< * tree.xmlOutputBufferWrite(buf, cur - base, base) * */ @@ -149750,7 +139514,6 @@ static PyObject *__pyx_f_4lxml_5etree__write_attr_string(xmlOutputBuffer *__pyx_ __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -149856,7 +139619,6 @@ static int __pyx_pw_4lxml_5etree_15_FilelikeWriter_1__cinit__(PyObject *__pyx_v_ static int __pyx_pf_4lxml_5etree_15_FilelikeWriter___cinit__(struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_v_self, PyObject *__pyx_v_filelike, PyObject *__pyx_v_exc_context, PyObject *__pyx_v_compression, PyObject *__pyx_v_close) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -149864,7 +139626,6 @@ static int __pyx_pf_4lxml_5etree_15_FilelikeWriter___cinit__(struct __pyx_obj_4l PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[8], 621, 0, __PYX_ERR(8, 621, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_filelike); /* "src/lxml/serializer.pxi":622 @@ -149874,7 +139635,6 @@ static int __pyx_pf_4lxml_5etree_15_FilelikeWriter___cinit__(struct __pyx_obj_4l * filelike = GzipFile( * fileobj=filelike, mode='wb', compresslevel=compression) */ - __Pyx_TraceLine(622,0,__PYX_ERR(8, 622, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_compression != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -149896,7 +139656,6 @@ static int __pyx_pf_4lxml_5etree_15_FilelikeWriter___cinit__(struct __pyx_obj_4l * self._close_filelike = filelike.close * elif close: */ - __Pyx_TraceLine(624,0,__PYX_ERR(8, 624, __pyx_L1_error)) __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_fileobj, __pyx_v_filelike) < 0) __PYX_ERR(8, 624, __pyx_L1_error) @@ -149910,7 +139669,6 @@ static int __pyx_pf_4lxml_5etree_15_FilelikeWriter___cinit__(struct __pyx_obj_4l * fileobj=filelike, mode='wb', compresslevel=compression) * self._close_filelike = filelike.close */ - __Pyx_TraceLine(623,0,__PYX_ERR(8, 623, __pyx_L1_error)) __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_4lxml_5etree_GzipFile, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -149924,7 +139682,6 @@ static int __pyx_pf_4lxml_5etree_15_FilelikeWriter___cinit__(struct __pyx_obj_4l * elif close: * self._close_filelike = filelike.close */ - __Pyx_TraceLine(625,0,__PYX_ERR(8, 625, __pyx_L1_error)) __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_filelike, __pyx_n_s_close); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); @@ -149950,7 +139707,6 @@ static int __pyx_pf_4lxml_5etree_15_FilelikeWriter___cinit__(struct __pyx_obj_4l * self._close_filelike = filelike.close * self._filelike = filelike */ - __Pyx_TraceLine(626,0,__PYX_ERR(8, 626, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_close); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(8, 626, __pyx_L1_error) if (__pyx_t_1) { @@ -149961,7 +139717,6 @@ static int __pyx_pf_4lxml_5etree_15_FilelikeWriter___cinit__(struct __pyx_obj_4l * self._filelike = filelike * if exc_context is None: */ - __Pyx_TraceLine(627,0,__PYX_ERR(8, 627, __pyx_L1_error)) __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_filelike, __pyx_n_s_close); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); @@ -149987,7 +139742,6 @@ static int __pyx_pf_4lxml_5etree_15_FilelikeWriter___cinit__(struct __pyx_obj_4l * if exc_context is None: * self._exc_context = _ExceptionContext() */ - __Pyx_TraceLine(628,0,__PYX_ERR(8, 628, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_filelike); __Pyx_GIVEREF(__pyx_v_filelike); __Pyx_GOTREF(__pyx_v_self->_filelike); @@ -150001,7 +139755,6 @@ static int __pyx_pf_4lxml_5etree_15_FilelikeWriter___cinit__(struct __pyx_obj_4l * self._exc_context = _ExceptionContext() * else: */ - __Pyx_TraceLine(629,0,__PYX_ERR(8, 629, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_exc_context == Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { @@ -150013,7 +139766,6 @@ static int __pyx_pf_4lxml_5etree_15_FilelikeWriter___cinit__(struct __pyx_obj_4l * else: * self._exc_context = exc_context */ - __Pyx_TraceLine(630,0,__PYX_ERR(8, 630, __pyx_L1_error)) __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__ExceptionContext)); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); @@ -150039,7 +139791,6 @@ static int __pyx_pf_4lxml_5etree_15_FilelikeWriter___cinit__(struct __pyx_obj_4l * self.error_log = _ErrorLog() * */ - __Pyx_TraceLine(632,0,__PYX_ERR(8, 632, __pyx_L1_error)) /*else*/ { if (!(likely(((__pyx_v_exc_context) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_exc_context, __pyx_ptype_4lxml_5etree__ExceptionContext))))) __PYX_ERR(8, 632, __pyx_L1_error) __pyx_t_5 = __pyx_v_exc_context; @@ -150059,7 +139810,6 @@ static int __pyx_pf_4lxml_5etree_15_FilelikeWriter___cinit__(struct __pyx_obj_4l * * cdef tree.xmlOutputBuffer* _createOutputBuffer( */ - __Pyx_TraceLine(633,0,__PYX_ERR(8, 633, __pyx_L1_error)) __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__ErrorLog)); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); @@ -150086,7 +139836,6 @@ static int __pyx_pf_4lxml_5etree_15_FilelikeWriter___cinit__(struct __pyx_obj_4l __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_filelike); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -150102,11 +139851,9 @@ static int __pyx_pf_4lxml_5etree_15_FilelikeWriter___cinit__(struct __pyx_obj_4l static xmlOutputBuffer *__pyx_f_4lxml_5etree_15_FilelikeWriter__createOutputBuffer(struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_v_self, xmlCharEncodingHandler *__pyx_v_enchandler) { xmlOutputBuffer *__pyx_v_c_buffer; xmlOutputBuffer *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_createOutputBuffer", 0); - __Pyx_TraceCall("_createOutputBuffer", __pyx_f[8], 635, 0, __PYX_ERR(8, 635, __pyx_L1_error)); /* "src/lxml/serializer.pxi":638 * self, tree.xmlCharEncodingHandler* enchandler) except NULL: @@ -150115,7 +139862,6 @@ static xmlOutputBuffer *__pyx_f_4lxml_5etree_15_FilelikeWriter__createOutputBuff * _writeFilelikeWriter, _closeFilelikeWriter, * self, enchandler) */ - __Pyx_TraceLine(638,0,__PYX_ERR(8, 638, __pyx_L1_error)) __pyx_v_c_buffer = xmlOutputBufferCreateIO(((xmlOutputWriteCallback)__pyx_f_4lxml_5etree__writeFilelikeWriter), __pyx_f_4lxml_5etree__closeFilelikeWriter, ((PyObject *)__pyx_v_self), __pyx_v_enchandler); /* "src/lxml/serializer.pxi":641 @@ -150125,7 +139871,6 @@ static xmlOutputBuffer *__pyx_f_4lxml_5etree_15_FilelikeWriter__createOutputBuff * raise IOError, u"Could not create I/O writer context." * return c_buffer */ - __Pyx_TraceLine(641,0,__PYX_ERR(8, 641, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_buffer == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -150136,7 +139881,6 @@ static xmlOutputBuffer *__pyx_f_4lxml_5etree_15_FilelikeWriter__createOutputBuff * return c_buffer * */ - __Pyx_TraceLine(642,0,__PYX_ERR(8, 642, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_IOError, __pyx_kp_u_Could_not_create_I_O_writer_cont, 0, 0); __PYX_ERR(8, 642, __pyx_L1_error) @@ -150156,7 +139900,6 @@ static xmlOutputBuffer *__pyx_f_4lxml_5etree_15_FilelikeWriter__createOutputBuff * * cdef int write(self, char* c_buffer, int size): */ - __Pyx_TraceLine(643,0,__PYX_ERR(8, 643, __pyx_L1_error)) __pyx_r = __pyx_v_c_buffer; goto __pyx_L0; @@ -150173,7 +139916,6 @@ static xmlOutputBuffer *__pyx_f_4lxml_5etree_15_FilelikeWriter__createOutputBuff __Pyx_AddTraceback("lxml.etree._FilelikeWriter._createOutputBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -150189,7 +139931,6 @@ static xmlOutputBuffer *__pyx_f_4lxml_5etree_15_FilelikeWriter__createOutputBuff static int __pyx_f_4lxml_5etree_15_FilelikeWriter_write(struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_v_self, char *__pyx_v_c_buffer, int __pyx_v_size) { PyObject *__pyx_v_py_buffer = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -150202,9 +139943,7 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_write(struct __pyx_obj_4lxml_5 PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; - PyObject *__pyx_t_12 = NULL; __Pyx_RefNannySetupContext("write", 0); - __Pyx_TraceCall("write", __pyx_f[8], 645, 0, __PYX_ERR(8, 645, __pyx_L1_error)); /* "src/lxml/serializer.pxi":646 * @@ -150213,7 +139952,6 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_write(struct __pyx_obj_4lxml_5 * if self._filelike is None: * raise IOError, u"File is already closed" */ - __Pyx_TraceLine(646,0,__PYX_ERR(8, 646, __pyx_L4_error)) /*try:*/ { { __Pyx_PyThreadState_declare @@ -150231,7 +139969,6 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_write(struct __pyx_obj_4lxml_5 * raise IOError, u"File is already closed" * py_buffer = c_buffer[:size] */ - __Pyx_TraceLine(647,0,__PYX_ERR(8, 647, __pyx_L6_error)) __pyx_t_4 = (__pyx_v_self->_filelike == Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (unlikely(__pyx_t_5)) { @@ -150243,7 +139980,6 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_write(struct __pyx_obj_4lxml_5 * py_buffer = c_buffer[:size] * self._filelike.write(py_buffer) */ - __Pyx_TraceLine(648,0,__PYX_ERR(8, 648, __pyx_L6_error)) __Pyx_Raise(__pyx_builtin_IOError, __pyx_kp_u_File_is_already_closed, 0, 0); __PYX_ERR(8, 648, __pyx_L6_error) @@ -150263,7 +139999,6 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_write(struct __pyx_obj_4lxml_5 * self._filelike.write(py_buffer) * except: */ - __Pyx_TraceLine(649,0,__PYX_ERR(8, 649, __pyx_L6_error)) __pyx_t_6 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_c_buffer + 0, __pyx_v_size - 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 649, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __pyx_t_6; @@ -150279,7 +140014,6 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_write(struct __pyx_obj_4lxml_5 * except: * size = -1 */ - __Pyx_TraceLine(650,0,__PYX_ERR(8, 650, __pyx_L6_error)) __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_filelike, __pyx_n_s_write); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 650, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; @@ -150292,38 +140026,10 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_write(struct __pyx_obj_4lxml_5 __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (!__pyx_t_8) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_py_buffer); if (unlikely(!__pyx_t_7)) __PYX_ERR(8, 650, __pyx_L6_error) - __Pyx_GOTREF(__pyx_t_7); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_py_buffer}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(8, 650, __pyx_L6_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_7); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_py_buffer}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(8, 650, __pyx_L6_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_7); - } else - #endif - { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(8, 650, __pyx_L6_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; - __Pyx_INCREF(__pyx_v_py_buffer); - __Pyx_GIVEREF(__pyx_v_py_buffer); - PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_py_buffer); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(8, 650, __pyx_L6_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } - } + __pyx_t_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_v_py_buffer) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_py_buffer); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(8, 650, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -150341,7 +140047,6 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_write(struct __pyx_obj_4lxml_5 goto __pyx_L11_try_end; __pyx_L6_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -150352,13 +140057,12 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_write(struct __pyx_obj_4lxml_5 * size = -1 * self._exc_context._store_raised() */ - __Pyx_TraceLine(651,0,__PYX_ERR(8, 651, __pyx_L8_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._FilelikeWriter.write", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_9) < 0) __PYX_ERR(8, 651, __pyx_L8_except_error) + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(8, 651, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_9); + __Pyx_GOTREF(__pyx_t_8); /* "src/lxml/serializer.pxi":652 * self._filelike.write(py_buffer) @@ -150367,7 +140071,6 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_write(struct __pyx_obj_4lxml_5 * self._exc_context._store_raised() * finally: */ - __Pyx_TraceLine(652,0,__PYX_ERR(8, 652, __pyx_L8_except_error)) __pyx_v_size = -1; /* "src/lxml/serializer.pxi":653 @@ -150377,11 +140080,10 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_write(struct __pyx_obj_4lxml_5 * finally: * return size # and swallow any further exceptions */ - __Pyx_TraceLine(653,0,__PYX_ERR(8, 653, __pyx_L8_except_error)) ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_self->_exc_context->__pyx_vtab)->_store_raised(__pyx_v_self->_exc_context); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_exception_handled; } __pyx_L8_except_error:; @@ -150414,7 +140116,6 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_write(struct __pyx_obj_4lxml_5 * * cdef int close(self): */ - __Pyx_TraceLine(655,0,__PYX_ERR(8, 655, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ __pyx_r = __pyx_v_size; @@ -150424,34 +140125,33 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_write(struct __pyx_obj_4lxml_5 /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign - __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0)) __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_12); { __pyx_r = __pyx_v_size; goto __pyx_L15_return; } __pyx_L15_return:; if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; + __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; goto __pyx_L0; } } @@ -150465,16 +140165,8 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_write(struct __pyx_obj_4lxml_5 */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_WriteUnraisable("lxml.etree._FilelikeWriter.write", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_py_buffer); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -150490,7 +140182,6 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_write(struct __pyx_obj_4lxml_5 static int __pyx_f_4lxml_5etree_15_FilelikeWriter_close(struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_v_self) { long __pyx_v_retval; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -150504,7 +140195,6 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_close(struct __pyx_obj_4lxml_5 PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; __Pyx_RefNannySetupContext("close", 0); - __Pyx_TraceCall("close", __pyx_f[8], 657, 0, __PYX_ERR(8, 657, __pyx_L1_error)); /* "src/lxml/serializer.pxi":658 * @@ -150513,7 +140203,6 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_close(struct __pyx_obj_4lxml_5 * try: * if self._close_filelike is not None: */ - __Pyx_TraceLine(658,0,__PYX_ERR(8, 658, __pyx_L1_error)) __pyx_v_retval = 0; /* "src/lxml/serializer.pxi":659 @@ -150523,7 +140212,6 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_close(struct __pyx_obj_4lxml_5 * if self._close_filelike is not None: * self._close_filelike() */ - __Pyx_TraceLine(659,0,__PYX_ERR(8, 659, __pyx_L4_error)) /*try:*/ { { __Pyx_PyThreadState_declare @@ -150541,7 +140229,6 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_close(struct __pyx_obj_4lxml_5 * self._close_filelike() * # we should not close the file here as we didn't open it */ - __Pyx_TraceLine(660,0,__PYX_ERR(8, 660, __pyx_L6_error)) __pyx_t_4 = (__pyx_v_self->_close_filelike != Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { @@ -150553,7 +140240,6 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_close(struct __pyx_obj_4lxml_5 * # we should not close the file here as we didn't open it * self._filelike = None */ - __Pyx_TraceLine(661,0,__PYX_ERR(8, 661, __pyx_L6_error)) __Pyx_INCREF(__pyx_v_self->_close_filelike); __pyx_t_7 = __pyx_v_self->_close_filelike; __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -150565,12 +140251,9 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_close(struct __pyx_obj_4lxml_5 __Pyx_DECREF_SET(__pyx_t_7, function); } } - if (__pyx_t_8) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 661, __pyx_L6_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } else { - __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 661, __pyx_L6_error) - } + __pyx_t_6 = (__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_6)) __PYX_ERR(8, 661, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -150591,7 +140274,6 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_close(struct __pyx_obj_4lxml_5 * except: * retval = -1 */ - __Pyx_TraceLine(663,0,__PYX_ERR(8, 663, __pyx_L6_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_filelike); @@ -150622,7 +140304,6 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_close(struct __pyx_obj_4lxml_5 * retval = -1 * self._exc_context._store_raised() */ - __Pyx_TraceLine(664,0,__PYX_ERR(8, 664, __pyx_L8_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._FilelikeWriter.close", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(8, 664, __pyx_L8_except_error) @@ -150637,7 +140318,6 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_close(struct __pyx_obj_4lxml_5 * self._exc_context._store_raised() * finally: */ - __Pyx_TraceLine(665,0,__PYX_ERR(8, 665, __pyx_L8_except_error)) __pyx_v_retval = -1L; /* "src/lxml/serializer.pxi":666 @@ -150647,11 +140327,10 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_close(struct __pyx_obj_4lxml_5 * finally: * return retval # and swallow any further exceptions */ - __Pyx_TraceLine(666,0,__PYX_ERR(8, 666, __pyx_L8_except_error)) ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_self->_exc_context->__pyx_vtab)->_store_raised(__pyx_v_self->_exc_context); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_exception_handled; } __pyx_L8_except_error:; @@ -150684,7 +140363,6 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_close(struct __pyx_obj_4lxml_5 * * cdef int _writeFilelikeWriter(void* ctxt, char* c_buffer, int length): */ - __Pyx_TraceLine(668,0,__PYX_ERR(8, 668, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ __pyx_r = __pyx_v_retval; @@ -150734,14 +140412,7 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_close(struct __pyx_obj_4lxml_5 */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_WriteUnraisable("lxml.etree._FilelikeWriter.close", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -150756,10 +140427,8 @@ static int __pyx_f_4lxml_5etree_15_FilelikeWriter_close(struct __pyx_obj_4lxml_5 static int __pyx_f_4lxml_5etree__writeFilelikeWriter(void *__pyx_v_ctxt, char *__pyx_v_c_buffer, int __pyx_v_length) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_writeFilelikeWriter", 0); - __Pyx_TraceCall("_writeFilelikeWriter", __pyx_f[8], 670, 0, __PYX_ERR(8, 670, __pyx_L1_error)); /* "src/lxml/serializer.pxi":671 * @@ -150768,7 +140437,6 @@ static int __pyx_f_4lxml_5etree__writeFilelikeWriter(void *__pyx_v_ctxt, char *_ * * cdef int _closeFilelikeWriter(void* ctxt): */ - __Pyx_TraceLine(671,0,__PYX_ERR(8, 671, __pyx_L1_error)) __pyx_r = __pyx_f_4lxml_5etree_15_FilelikeWriter_write(((struct __pyx_obj_4lxml_5etree__FilelikeWriter *)__pyx_v_ctxt), __pyx_v_c_buffer, __pyx_v_length); goto __pyx_L0; @@ -150781,11 +140449,7 @@ static int __pyx_f_4lxml_5etree__writeFilelikeWriter(void *__pyx_v_ctxt, char *_ */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._writeFilelikeWriter", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -150800,10 +140464,8 @@ static int __pyx_f_4lxml_5etree__writeFilelikeWriter(void *__pyx_v_ctxt, char *_ static int __pyx_f_4lxml_5etree__closeFilelikeWriter(void *__pyx_v_ctxt) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_closeFilelikeWriter", 0); - __Pyx_TraceCall("_closeFilelikeWriter", __pyx_f[8], 673, 0, __PYX_ERR(8, 673, __pyx_L1_error)); /* "src/lxml/serializer.pxi":674 * @@ -150812,7 +140474,6 @@ static int __pyx_f_4lxml_5etree__closeFilelikeWriter(void *__pyx_v_ctxt) { * * cdef _tofilelike(f, _Element element, encoding, doctype, method, */ - __Pyx_TraceLine(674,0,__PYX_ERR(8, 674, __pyx_L1_error)) __pyx_r = __pyx_f_4lxml_5etree_15_FilelikeWriter_close(((struct __pyx_obj_4lxml_5etree__FilelikeWriter *)__pyx_v_ctxt)); goto __pyx_L0; @@ -150825,11 +140486,7 @@ static int __pyx_f_4lxml_5etree__closeFilelikeWriter(void *__pyx_v_ctxt) { */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._closeFilelikeWriter", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -150854,26 +140511,23 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx PyObject *__pyx_v_gzip_file = NULL; PyObject *__pyx_v_filename8 = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; - char const *__pyx_t_8; + int __pyx_t_6; + char const *__pyx_t_7; + PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; - PyObject *__pyx_t_14 = NULL; - char const *__pyx_t_15; - int __pyx_t_16; + char const *__pyx_t_14; + int __pyx_t_15; __Pyx_RefNannySetupContext("_tofilelike", 0); - __Pyx_TraceCall("_tofilelike", __pyx_f[8], 676, 0, __PYX_ERR(8, 676, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_f); __Pyx_INCREF(__pyx_v_encoding); __Pyx_INCREF(__pyx_v_doctype); @@ -150885,7 +140539,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * cdef tree.xmlOutputBuffer* c_buffer * cdef tree.xmlCharEncodingHandler* enchandler */ - __Pyx_TraceLine(680,0,__PYX_ERR(8, 680, __pyx_L1_error)) __Pyx_INCREF(Py_None); __pyx_v_writer = ((struct __pyx_obj_4lxml_5etree__FilelikeWriter *)Py_None); @@ -150896,7 +140549,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * if c_method == OUTPUT_METHOD_TEXT: * data = _textToString(element._c_node, encoding, with_tail) */ - __Pyx_TraceLine(687,0,__PYX_ERR(8, 687, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__findOutputMethod(__pyx_v_method); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 687, __pyx_L1_error) __pyx_v_c_method = __pyx_t_1; @@ -150907,7 +140559,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * data = _textToString(element._c_node, encoding, with_tail) * if compression: */ - __Pyx_TraceLine(688,0,__PYX_ERR(8, 688, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_method == __pyx_e_4lxml_5etree_OUTPUT_METHOD_TEXT) != 0); if (__pyx_t_2) { @@ -150918,7 +140569,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * if compression: * bytes_out = BytesIO() */ - __Pyx_TraceLine(689,0,__PYX_ERR(8, 689, __pyx_L1_error)) __pyx_t_3 = __pyx_f_4lxml_5etree__textToString(__pyx_v_element->_c_node, __pyx_v_encoding, __pyx_v_with_tail); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_data = __pyx_t_3; @@ -150931,7 +140581,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * bytes_out = BytesIO() * gzip_file = GzipFile( */ - __Pyx_TraceLine(690,0,__PYX_ERR(8, 690, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_compression != 0); if (__pyx_t_2) { @@ -150942,7 +140591,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * gzip_file = GzipFile( * fileobj=bytes_out, mode='wb', compresslevel=compression) */ - __Pyx_TraceLine(691,0,__PYX_ERR(8, 691, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_4lxml_5etree_BytesIO); __pyx_t_4 = __pyx_v_4lxml_5etree_BytesIO; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -150954,12 +140602,9 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 691, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 691, __pyx_L1_error) - } + __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(8, 691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_bytes_out = __pyx_t_3; @@ -150972,7 +140617,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * try: * gzip_file.write(data) */ - __Pyx_TraceLine(693,0,__PYX_ERR(8, 693, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_fileobj, __pyx_v_bytes_out) < 0) __PYX_ERR(8, 693, __pyx_L1_error) @@ -150989,7 +140633,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * fileobj=bytes_out, mode='wb', compresslevel=compression) * try: */ - __Pyx_TraceLine(692,0,__PYX_ERR(8, 692, __pyx_L1_error)) __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_4lxml_5etree_GzipFile, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -151003,7 +140646,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * gzip_file.write(data) * finally: */ - __Pyx_TraceLine(694,0,__PYX_ERR(8, 694, __pyx_L6_error)) /*try:*/ { /* "src/lxml/serializer.pxi":695 @@ -151013,7 +140655,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * finally: * gzip_file.close() */ - __Pyx_TraceLine(695,0,__PYX_ERR(8, 695, __pyx_L6_error)) __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_gzip_file, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 695, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; @@ -151026,38 +140667,10 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (!__pyx_t_5) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 695, __pyx_L6_error) - __Pyx_GOTREF(__pyx_t_4); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_data}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 695, __pyx_L6_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_data}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 695, __pyx_L6_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 695, __pyx_L6_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_INCREF(__pyx_v_data); - __Pyx_GIVEREF(__pyx_v_data); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_data); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 695, __pyx_L6_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 695, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -151069,27 +140682,23 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * data = bytes_out.getvalue() * if _isString(f): */ - __Pyx_TraceLine(697,0,__PYX_ERR(8, 697, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_gzip_file, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = NULL; + __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_6)) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 697, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 697, __pyx_L1_error) - } + __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 697, __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; @@ -151099,67 +140708,63 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign - __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; + __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10) < 0)) __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); - __Pyx_XGOTREF(__pyx_t_14); - __pyx_t_1 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename; + __pyx_t_1 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_7 = __pyx_filename; { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_gzip_file, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 697, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = NULL; + __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_6)) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 697, __pyx_L9_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 697, __pyx_L9_error) - } + __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 697, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); } + __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11); - __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; - __pyx_lineno = __pyx_t_1; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8; + __Pyx_ErrRestore(__pyx_t_8, __pyx_t_9, __pyx_t_10); + __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; + __pyx_lineno = __pyx_t_1; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_7; goto __pyx_L1_error; __pyx_L9_error:; if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); } + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; + __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; goto __pyx_L1_error; } __pyx_L7:; @@ -151172,25 +140777,21 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * if _isString(f): * filename8 = _encodeFilename(f) */ - __Pyx_TraceLine(698,0,__PYX_ERR(8, 698, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_bytes_out, __pyx_n_s_getvalue); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = NULL; + __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_6)) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 698, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 698, __pyx_L1_error) - } + __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_4); @@ -151212,7 +140813,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * filename8 = _encodeFilename(f) * f = open(filename8, 'wb') */ - __Pyx_TraceLine(699,0,__PYX_ERR(8, 699, __pyx_L1_error)) __pyx_t_2 = (_isString(__pyx_v_f) != 0); if (__pyx_t_2) { @@ -151223,7 +140823,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * f = open(filename8, 'wb') * try: */ - __Pyx_TraceLine(700,0,__PYX_ERR(8, 700, __pyx_L1_error)) __pyx_t_4 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_f); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_filename8 = __pyx_t_4; @@ -151236,7 +140835,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * try: * f.write(data) */ - __Pyx_TraceLine(701,0,__PYX_ERR(8, 701, __pyx_L1_error)) __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_filename8); @@ -151258,7 +140856,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * f.write(data) * finally: */ - __Pyx_TraceLine(702,0,__PYX_ERR(8, 702, __pyx_L12_error)) /*try:*/ { /* "src/lxml/serializer.pxi":703 @@ -151268,51 +140865,22 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * finally: * f.close() */ - __Pyx_TraceLine(703,0,__PYX_ERR(8, 703, __pyx_L12_error)) __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 703, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = NULL; + __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_6)) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 703, __pyx_L12_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_data}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 703, __pyx_L12_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_data}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 703, __pyx_L12_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 703, __pyx_L12_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_v_data); - __Pyx_GIVEREF(__pyx_v_data); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_data); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 703, __pyx_L12_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - } + __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(8, 703, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -151324,7 +140892,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * else: * f.write(data) */ - __Pyx_TraceLine(705,0,__PYX_ERR(8, 705, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_close); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 705, __pyx_L1_error) @@ -151339,12 +140906,9 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 705, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 705, __pyx_L1_error) - } + __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(8, 705, __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; @@ -151354,20 +140918,19 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign - __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_14); + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); - __pyx_t_7 = __pyx_lineno; __pyx_t_1 = __pyx_clineno; __pyx_t_15 = __pyx_filename; + __Pyx_XGOTREF(__pyx_t_8); + __pyx_t_6 = __pyx_lineno; __pyx_t_1 = __pyx_clineno; __pyx_t_14 = __pyx_filename; { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_close); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 705, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_4); @@ -151381,40 +140944,37 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 705, __pyx_L15_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 705, __pyx_L15_error) - } + __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(8, 705, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); } - __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_ErrRestore(__pyx_t_14, __pyx_t_13, __pyx_t_12); - __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; - __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_1; __pyx_filename = __pyx_t_15; + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ErrRestore(__pyx_t_13, __pyx_t_12, __pyx_t_11); + __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_8 = 0; + __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_1; __pyx_filename = __pyx_t_14; goto __pyx_L1_error; __pyx_L15_error:; if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); } - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_8 = 0; goto __pyx_L1_error; } __pyx_L13:; @@ -151437,7 +140997,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * return * */ - __Pyx_TraceLine(707,0,__PYX_ERR(8, 707, __pyx_L1_error)) /*else*/ { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -151451,38 +141010,10 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 707, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_data}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 707, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_data}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 707, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 707, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_INCREF(__pyx_v_data); - __Pyx_GIVEREF(__pyx_v_data); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_data); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 707, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __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(8, 707, __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; } @@ -151495,7 +141026,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * * if encoding is None: */ - __Pyx_TraceLine(708,0,__PYX_ERR(8, 708, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -151516,10 +141046,9 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * c_enc = NULL * else: */ - __Pyx_TraceLine(710,0,__PYX_ERR(8, 710, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_encoding == Py_None); - __pyx_t_16 = (__pyx_t_2 != 0); - if (__pyx_t_16) { + __pyx_t_15 = (__pyx_t_2 != 0); + if (__pyx_t_15) { /* "src/lxml/serializer.pxi":711 * @@ -151528,7 +141057,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * else: * encoding = _utf8(encoding) */ - __Pyx_TraceLine(711,0,__PYX_ERR(8, 711, __pyx_L1_error)) __pyx_v_c_enc = NULL; /* "src/lxml/serializer.pxi":710 @@ -151548,7 +141076,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * c_enc = _cstr(encoding) * if doctype is None: */ - __Pyx_TraceLine(713,0,__PYX_ERR(8, 713, __pyx_L1_error)) /*else*/ { __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_encoding); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -151562,7 +141089,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * if doctype is None: * c_doctype = NULL */ - __Pyx_TraceLine(714,0,__PYX_ERR(8, 714, __pyx_L1_error)) __pyx_v_c_enc = PyBytes_AS_STRING(__pyx_v_encoding); } __pyx_L16:; @@ -151574,9 +141100,8 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * c_doctype = NULL * else: */ - __Pyx_TraceLine(715,0,__PYX_ERR(8, 715, __pyx_L1_error)) - __pyx_t_16 = (__pyx_v_doctype == Py_None); - __pyx_t_2 = (__pyx_t_16 != 0); + __pyx_t_15 = (__pyx_v_doctype == Py_None); + __pyx_t_2 = (__pyx_t_15 != 0); if (__pyx_t_2) { /* "src/lxml/serializer.pxi":716 @@ -151586,7 +141111,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * else: * doctype = _utf8(doctype) */ - __Pyx_TraceLine(716,0,__PYX_ERR(8, 716, __pyx_L1_error)) __pyx_v_c_doctype = NULL; /* "src/lxml/serializer.pxi":715 @@ -151606,7 +141130,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * c_doctype = _xcstr(doctype) * */ - __Pyx_TraceLine(718,0,__PYX_ERR(8, 718, __pyx_L1_error)) /*else*/ { __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_doctype); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -151620,7 +141143,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * * writer = _create_output_buffer(f, c_enc, compression, &c_buffer, close=False) */ - __Pyx_TraceLine(719,0,__PYX_ERR(8, 719, __pyx_L1_error)) __pyx_v_c_doctype = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_doctype); } __pyx_L17:; @@ -151632,7 +141154,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * if writer is None: * with nogil: */ - __Pyx_TraceLine(721,0,__PYX_ERR(8, 721, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__create_output_buffer(__pyx_v_f, __pyx_v_c_enc, __pyx_v_compression, (&__pyx_v_c_buffer), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_writer, ((struct __pyx_obj_4lxml_5etree__FilelikeWriter *)__pyx_t_3)); @@ -151645,10 +141166,9 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * with nogil: * error_result = _serialise_node( */ - __Pyx_TraceLine(722,0,__PYX_ERR(8, 722, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)__pyx_v_writer) == Py_None); - __pyx_t_16 = (__pyx_t_2 != 0); - if (__pyx_t_16) { + __pyx_t_15 = (__pyx_t_2 != 0); + if (__pyx_t_15) { /* "src/lxml/serializer.pxi":723 * writer = _create_output_buffer(f, c_enc, compression, &c_buffer, close=False) @@ -151657,7 +141177,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * error_result = _serialise_node( * c_buffer, c_doctype, c_enc, element._c_node, c_method, */ - __Pyx_TraceLine(723,0,__PYX_ERR(8, 723, __pyx_L1_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -151673,7 +141192,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * c_buffer, c_doctype, c_enc, element._c_node, c_method, * write_xml_declaration, write_doctype, pretty_print, with_tail, standalone) */ - __Pyx_TraceLine(724,1,__PYX_ERR(8, 724, __pyx_L20_error)) __pyx_v_error_result = __pyx_f_4lxml_5etree__serialise_node(__pyx_v_c_buffer, __pyx_v_c_doctype, __pyx_v_c_enc, __pyx_v_element->_c_node, __pyx_v_c_method, __pyx_v_write_xml_declaration, __pyx_v_write_doctype, __pyx_v_pretty_print, __pyx_v_with_tail, __pyx_v_standalone); } @@ -151684,7 +141202,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * error_result = _serialise_node( * c_buffer, c_doctype, c_enc, element._c_node, c_method, */ - __Pyx_TraceLine(723,1,__PYX_ERR(8, 723, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -151693,13 +141210,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx #endif goto __pyx_L21; } - __pyx_L20_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L1_error; - } __pyx_L21:; } } @@ -151721,7 +141231,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * c_buffer, c_doctype, c_enc, element._c_node, c_method, * write_xml_declaration, write_doctype, pretty_print, with_tail, standalone) */ - __Pyx_TraceLine(728,0,__PYX_ERR(8, 728, __pyx_L1_error)) /*else*/ { /* "src/lxml/serializer.pxi":730 @@ -151731,7 +141240,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * * if writer is not None: */ - __Pyx_TraceLine(730,0,__PYX_ERR(8, 730, __pyx_L1_error)) __pyx_v_error_result = __pyx_f_4lxml_5etree__serialise_node(__pyx_v_c_buffer, __pyx_v_c_doctype, __pyx_v_c_enc, __pyx_v_element->_c_node, __pyx_v_c_method, __pyx_v_write_xml_declaration, __pyx_v_write_doctype, __pyx_v_pretty_print, __pyx_v_with_tail, __pyx_v_standalone); } __pyx_L18:; @@ -151743,9 +141251,8 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * writer._exc_context._raise_if_stored() * if error_result != xmlerror.XML_ERR_OK: */ - __Pyx_TraceLine(732,0,__PYX_ERR(8, 732, __pyx_L1_error)) - __pyx_t_16 = (((PyObject *)__pyx_v_writer) != Py_None); - __pyx_t_2 = (__pyx_t_16 != 0); + __pyx_t_15 = (((PyObject *)__pyx_v_writer) != Py_None); + __pyx_t_2 = (__pyx_t_15 != 0); if (__pyx_t_2) { /* "src/lxml/serializer.pxi":733 @@ -151755,7 +141262,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * if error_result != xmlerror.XML_ERR_OK: * _raiseSerialisationError(error_result) */ - __Pyx_TraceLine(733,0,__PYX_ERR(8, 733, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_writer->_exc_context->__pyx_vtab)->_raise_if_stored(__pyx_v_writer->_exc_context); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 733, __pyx_L1_error) /* "src/lxml/serializer.pxi":732 @@ -151774,7 +141280,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * _raiseSerialisationError(error_result) * */ - __Pyx_TraceLine(734,0,__PYX_ERR(8, 734, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_error_result != XML_ERR_OK) != 0); if (__pyx_t_2) { @@ -151785,7 +141290,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx * * */ - __Pyx_TraceLine(735,0,__PYX_ERR(8, 735, __pyx_L1_error)) __pyx_t_3 = __pyx_f_4lxml_5etree__raiseSerialisationError(__pyx_v_error_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 735, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -151814,7 +141318,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("lxml.etree._tofilelike", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -151827,7 +141330,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx __Pyx_XDECREF(__pyx_v_encoding); __Pyx_XDECREF(__pyx_v_doctype); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -151843,10 +141345,8 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelike(PyObject *__pyx_v_f, struct Lx static int __pyx_f_4lxml_5etree__serialise_node(xmlOutputBuffer *__pyx_v_c_buffer, const xmlChar *__pyx_v_c_doctype, const char *__pyx_v_c_enc, xmlNode *__pyx_v_c_node, int __pyx_v_c_method, int __pyx_v_write_xml_declaration, int __pyx_v_write_doctype, int __pyx_v_pretty_print, int __pyx_v_with_tail, int __pyx_v_standalone) { int __pyx_v_error_result; int __pyx_r; - __Pyx_TraceDeclarations int __pyx_t_1; int __pyx_t_2; - __Pyx_TraceCall("_serialise_node", __pyx_f[8], 738, 1, __PYX_ERR(8, 738, __pyx_L1_error)); /* "src/lxml/serializer.pxi":742 * bint write_xml_declaration, bint write_doctype, bint pretty_print, @@ -151855,7 +141355,6 @@ static int __pyx_f_4lxml_5etree__serialise_node(xmlOutputBuffer *__pyx_v_c_buffe * c_buffer, c_node, c_enc, c_doctype, c_method, * write_xml_declaration, write_doctype, pretty_print, with_tail, standalone) */ - __Pyx_TraceLine(742,1,__PYX_ERR(8, 742, __pyx_L1_error)) __pyx_f_4lxml_5etree__writeNodeToBuffer(__pyx_v_c_buffer, __pyx_v_c_node, __pyx_v_c_enc, __pyx_v_c_doctype, __pyx_v_c_method, __pyx_v_write_xml_declaration, __pyx_v_write_doctype, __pyx_v_pretty_print, __pyx_v_with_tail, __pyx_v_standalone); /* "src/lxml/serializer.pxi":745 @@ -151865,7 +141364,6 @@ static int __pyx_f_4lxml_5etree__serialise_node(xmlOutputBuffer *__pyx_v_c_buffe * if error_result == xmlerror.XML_ERR_OK: * error_result = tree.xmlOutputBufferClose(c_buffer) */ - __Pyx_TraceLine(745,1,__PYX_ERR(8, 745, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_buffer->error; __pyx_v_error_result = __pyx_t_1; @@ -151876,7 +141374,6 @@ static int __pyx_f_4lxml_5etree__serialise_node(xmlOutputBuffer *__pyx_v_c_buffe * error_result = tree.xmlOutputBufferClose(c_buffer) * if error_result > 0: */ - __Pyx_TraceLine(746,1,__PYX_ERR(8, 746, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_error_result == XML_ERR_OK) != 0); if (__pyx_t_2) { @@ -151887,7 +141384,6 @@ static int __pyx_f_4lxml_5etree__serialise_node(xmlOutputBuffer *__pyx_v_c_buffe * if error_result > 0: * error_result = xmlerror.XML_ERR_OK */ - __Pyx_TraceLine(747,1,__PYX_ERR(8, 747, __pyx_L1_error)) __pyx_v_error_result = xmlOutputBufferClose(__pyx_v_c_buffer); /* "src/lxml/serializer.pxi":748 @@ -151897,7 +141393,6 @@ static int __pyx_f_4lxml_5etree__serialise_node(xmlOutputBuffer *__pyx_v_c_buffe * error_result = xmlerror.XML_ERR_OK * else: */ - __Pyx_TraceLine(748,1,__PYX_ERR(8, 748, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_error_result > 0) != 0); if (__pyx_t_2) { @@ -151908,7 +141403,6 @@ static int __pyx_f_4lxml_5etree__serialise_node(xmlOutputBuffer *__pyx_v_c_buffe * else: * tree.xmlOutputBufferClose(c_buffer) */ - __Pyx_TraceLine(749,1,__PYX_ERR(8, 749, __pyx_L1_error)) __pyx_v_error_result = XML_ERR_OK; /* "src/lxml/serializer.pxi":748 @@ -151937,7 +141431,6 @@ static int __pyx_f_4lxml_5etree__serialise_node(xmlOutputBuffer *__pyx_v_c_buffe * return error_result * */ - __Pyx_TraceLine(751,1,__PYX_ERR(8, 751, __pyx_L1_error)) /*else*/ { (void)(xmlOutputBufferClose(__pyx_v_c_buffer)); } @@ -151950,7 +141443,6 @@ static int __pyx_f_4lxml_5etree__serialise_node(xmlOutputBuffer *__pyx_v_c_buffe * * */ - __Pyx_TraceLine(752,1,__PYX_ERR(8, 752, __pyx_L1_error)) __pyx_r = __pyx_v_error_result; goto __pyx_L0; @@ -151963,11 +141455,7 @@ static int __pyx_f_4lxml_5etree__serialise_node(xmlOutputBuffer *__pyx_v_c_buffe */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._serialise_node", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); return __pyx_r; } @@ -151985,7 +141473,6 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea xmlCharEncodingHandler *__pyx_v_enchandler; PyObject *__pyx_v_filename8 = NULL; struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -152000,7 +141487,6 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea xmlOutputBuffer *__pyx_t_11; const char *__pyx_t_12; __Pyx_RefNannySetupContext("_create_output_buffer", 0); - __Pyx_TraceCall("_create_output_buffer", __pyx_f[8], 755, 0, __PYX_ERR(8, 755, __pyx_L1_error)); /* "src/lxml/serializer.pxi":760 * cdef tree.xmlOutputBuffer* c_buffer @@ -152009,7 +141495,6 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea * if enchandler is NULL: * raise LookupError( */ - __Pyx_TraceLine(760,0,__PYX_ERR(8, 760, __pyx_L1_error)) __pyx_v_enchandler = xmlFindCharEncodingHandler(__pyx_v_c_enc); /* "src/lxml/serializer.pxi":761 @@ -152019,7 +141504,6 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea * raise LookupError( * f"unknown encoding: '{c_enc.decode('UTF-8') if c_enc is not NULL else u''}'") */ - __Pyx_TraceLine(761,0,__PYX_ERR(8, 761, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_enchandler == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -152030,7 +141514,6 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea * try: * if _isString(f): */ - __Pyx_TraceLine(763,0,__PYX_ERR(8, 763, __pyx_L1_error)) __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 763, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = 0; @@ -152045,8 +141528,8 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea __pyx_t_5 = __pyx_t_6; __pyx_t_6 = 0; } else { - __Pyx_INCREF(__pyx_kp_u__23); - __pyx_t_5 = __pyx_kp_u__23; + __Pyx_INCREF(__pyx_kp_u__11); + __pyx_t_5 = __pyx_kp_u__11; } __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 763, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); @@ -152056,10 +141539,10 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6); __pyx_t_6 = 0; - __Pyx_INCREF(__pyx_kp_u__60); + __Pyx_INCREF(__pyx_kp_u__21); __pyx_t_3 += 1; - __Pyx_GIVEREF(__pyx_kp_u__60); - PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__60); + __Pyx_GIVEREF(__pyx_kp_u__21); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__21); __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 763, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -152071,7 +141554,6 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea * f"unknown encoding: '{c_enc.decode('UTF-8') if c_enc is not NULL else u''}'") * try: */ - __Pyx_TraceLine(762,0,__PYX_ERR(8, 762, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_LookupError, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -152095,7 +141577,6 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea * if _isString(f): * filename8 = _encodeFilename(f) */ - __Pyx_TraceLine(764,0,__PYX_ERR(8, 764, __pyx_L4_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -152112,7 +141593,6 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea * filename8 = _encodeFilename(f) * c_buffer = tree.xmlOutputBufferCreateFilename( */ - __Pyx_TraceLine(765,0,__PYX_ERR(8, 765, __pyx_L4_error)) __pyx_t_1 = (_isString(__pyx_v_f) != 0); if (__pyx_t_1) { @@ -152123,7 +141603,6 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea * c_buffer = tree.xmlOutputBufferCreateFilename( * _cstr(filename8), enchandler, c_compression) */ - __Pyx_TraceLine(766,0,__PYX_ERR(8, 766, __pyx_L4_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_f); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 766, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_filename8 = __pyx_t_2; @@ -152136,7 +141615,6 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea * _cstr(filename8), enchandler, c_compression) * if c_buffer is NULL: */ - __Pyx_TraceLine(767,0,__PYX_ERR(8, 767, __pyx_L4_error)) __pyx_v_c_buffer = xmlOutputBufferCreateFilename(PyBytes_AS_STRING(__pyx_v_filename8), __pyx_v_enchandler, __pyx_v_c_compression); /* "src/lxml/serializer.pxi":769 @@ -152146,7 +141624,6 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea * return python.PyErr_SetFromErrno(IOError) # raises IOError * writer = None */ - __Pyx_TraceLine(769,0,__PYX_ERR(8, 769, __pyx_L4_error)) __pyx_t_1 = ((__pyx_v_c_buffer == NULL) != 0); if (__pyx_t_1) { @@ -152157,7 +141634,6 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea * writer = None * elif hasattr(f, 'write'): */ - __Pyx_TraceLine(770,0,__PYX_ERR(8, 770, __pyx_L4_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_2 = PyErr_SetFromErrno(__pyx_builtin_IOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 770, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); @@ -152182,7 +141658,6 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea * elif hasattr(f, 'write'): * writer = _FilelikeWriter(f, compression=c_compression, close=close) */ - __Pyx_TraceLine(771,0,__PYX_ERR(8, 771, __pyx_L4_error)) __Pyx_INCREF(Py_None); __pyx_v_writer = ((struct __pyx_obj_4lxml_5etree__FilelikeWriter *)Py_None); @@ -152203,7 +141678,6 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea * writer = _FilelikeWriter(f, compression=c_compression, close=close) * c_buffer = writer._createOutputBuffer(enchandler) */ - __Pyx_TraceLine(772,0,__PYX_ERR(8, 772, __pyx_L4_error)) __pyx_t_1 = __Pyx_HasAttr(__pyx_v_f, __pyx_n_s_write); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 772, __pyx_L4_error) __pyx_t_10 = (__pyx_t_1 != 0); if (likely(__pyx_t_10)) { @@ -152215,7 +141689,6 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea * c_buffer = writer._createOutputBuffer(enchandler) * else: */ - __Pyx_TraceLine(773,0,__PYX_ERR(8, 773, __pyx_L4_error)) __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 773, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_f); @@ -152245,7 +141718,6 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea * else: * raise TypeError( */ - __Pyx_TraceLine(774,0,__PYX_ERR(8, 774, __pyx_L4_error)) __pyx_t_11 = __pyx_f_4lxml_5etree_15_FilelikeWriter__createOutputBuffer(__pyx_v_writer, __pyx_v_enchandler); if (unlikely(__pyx_t_11 == ((xmlOutputBuffer *)NULL))) __PYX_ERR(8, 774, __pyx_L4_error) __pyx_v_c_buffer = __pyx_t_11; @@ -152266,7 +141738,6 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea * f"File or filename expected, got '{python._fqtypename(f).decode('UTF-8')}'") * except: */ - __Pyx_TraceLine(776,0,__PYX_ERR(8, 776, __pyx_L4_error)) /*else*/ { /* "src/lxml/serializer.pxi":777 @@ -152276,7 +141747,6 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea * except: * tree.xmlCharEncCloseFunc(enchandler) */ - __Pyx_TraceLine(777,0,__PYX_ERR(8, 777, __pyx_L4_error)) __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 777, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = 0; @@ -152294,10 +141764,10 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_INCREF(__pyx_kp_u__60); + __Pyx_INCREF(__pyx_kp_u__21); __pyx_t_3 += 1; - __Pyx_GIVEREF(__pyx_kp_u__60); - PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__60); + __Pyx_GIVEREF(__pyx_kp_u__21); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__21); __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 777, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -152309,7 +141779,6 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea * f"File or filename expected, got '{python._fqtypename(f).decode('UTF-8')}'") * except: */ - __Pyx_TraceLine(776,0,__PYX_ERR(8, 776, __pyx_L4_error)) __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 776, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -152343,7 +141812,6 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea * tree.xmlCharEncCloseFunc(enchandler) * raise */ - __Pyx_TraceLine(778,0,__PYX_ERR(8, 778, __pyx_L6_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._create_output_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_2) < 0) __PYX_ERR(8, 778, __pyx_L6_except_error) @@ -152358,7 +141826,6 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea * raise * c_buffer_ret[0] = c_buffer */ - __Pyx_TraceLine(779,0,__PYX_ERR(8, 779, __pyx_L6_except_error)) (void)(xmlCharEncCloseFunc(__pyx_v_enchandler)); /* "src/lxml/serializer.pxi":780 @@ -152368,7 +141835,6 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea * c_buffer_ret[0] = c_buffer * return writer */ - __Pyx_TraceLine(780,0,__PYX_ERR(8, 780, __pyx_L6_except_error)) __Pyx_GIVEREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_2); @@ -152406,7 +141872,6 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea * return writer * */ - __Pyx_TraceLine(781,0,__PYX_ERR(8, 781, __pyx_L1_error)) (__pyx_v_c_buffer_ret[0]) = __pyx_v_c_buffer; /* "src/lxml/serializer.pxi":782 @@ -152416,7 +141881,6 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea * * cdef xmlChar **_convert_ns_prefixes(tree.xmlDict* c_dict, ns_prefixes) except NULL: */ - __Pyx_TraceLine(782,0,__PYX_ERR(8, 782, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_writer)); __pyx_r = __pyx_v_writer; @@ -152441,7 +141905,6 @@ static struct __pyx_obj_4lxml_5etree__FilelikeWriter *__pyx_f_4lxml_5etree__crea __Pyx_XDECREF((PyObject *)__pyx_v_writer); __Pyx_XDECREF(__pyx_v_filename8); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -152462,7 +141925,6 @@ static xmlChar **__pyx_f_4lxml_5etree__convert_ns_prefixes(xmlDict *__pyx_v_c_di PyObject *__pyx_v_prefix_utf = NULL; const xmlChar *__pyx_v_c_prefix; xmlChar **__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; @@ -152475,7 +141937,6 @@ static xmlChar **__pyx_f_4lxml_5etree__convert_ns_prefixes(xmlDict *__pyx_v_c_di Py_ssize_t __pyx_t_9; PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("_convert_ns_prefixes", 0); - __Pyx_TraceCall("_convert_ns_prefixes", __pyx_f[8], 784, 0, __PYX_ERR(8, 784, __pyx_L1_error)); /* "src/lxml/serializer.pxi":785 * @@ -152484,7 +141945,6 @@ static xmlChar **__pyx_f_4lxml_5etree__convert_ns_prefixes(xmlDict *__pyx_v_c_di * # Need to allocate one extra memory block to handle last NULL entry * c_ns_prefixes = python.lxml_malloc(num_ns_prefixes + 1, sizeof(xmlChar*)) */ - __Pyx_TraceLine(785,0,__PYX_ERR(8, 785, __pyx_L1_error)) __pyx_t_1 = PyObject_Length(__pyx_v_ns_prefixes); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(8, 785, __pyx_L1_error) __pyx_v_num_ns_prefixes = __pyx_t_1; @@ -152495,7 +141955,6 @@ static xmlChar **__pyx_f_4lxml_5etree__convert_ns_prefixes(xmlDict *__pyx_v_c_di * if not c_ns_prefixes: * raise MemoryError() */ - __Pyx_TraceLine(787,0,__PYX_ERR(8, 787, __pyx_L1_error)) __pyx_v_c_ns_prefixes = ((xmlChar **)lxml_malloc((__pyx_v_num_ns_prefixes + 1), (sizeof(xmlChar *)))); /* "src/lxml/serializer.pxi":788 @@ -152505,7 +141964,6 @@ static xmlChar **__pyx_f_4lxml_5etree__convert_ns_prefixes(xmlDict *__pyx_v_c_di * raise MemoryError() * i = 0 */ - __Pyx_TraceLine(788,0,__PYX_ERR(8, 788, __pyx_L1_error)) __pyx_t_2 = ((!(__pyx_v_c_ns_prefixes != 0)) != 0); if (unlikely(__pyx_t_2)) { @@ -152516,7 +141974,6 @@ static xmlChar **__pyx_f_4lxml_5etree__convert_ns_prefixes(xmlDict *__pyx_v_c_di * i = 0 * try: */ - __Pyx_TraceLine(789,0,__PYX_ERR(8, 789, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(8, 789, __pyx_L1_error) /* "src/lxml/serializer.pxi":788 @@ -152535,7 +141992,6 @@ static xmlChar **__pyx_f_4lxml_5etree__convert_ns_prefixes(xmlDict *__pyx_v_c_di * try: * for prefix in ns_prefixes: */ - __Pyx_TraceLine(790,0,__PYX_ERR(8, 790, __pyx_L1_error)) __pyx_v_i = 0; /* "src/lxml/serializer.pxi":791 @@ -152545,7 +142001,6 @@ static xmlChar **__pyx_f_4lxml_5etree__convert_ns_prefixes(xmlDict *__pyx_v_c_di * for prefix in ns_prefixes: * prefix_utf = _utf8(prefix) */ - __Pyx_TraceLine(791,0,__PYX_ERR(8, 791, __pyx_L4_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -152562,7 +142017,6 @@ static xmlChar **__pyx_f_4lxml_5etree__convert_ns_prefixes(xmlDict *__pyx_v_c_di * prefix_utf = _utf8(prefix) * c_prefix = tree.xmlDictExists(c_dict, _xcstr(prefix_utf), len(prefix_utf)) */ - __Pyx_TraceLine(792,0,__PYX_ERR(8, 792, __pyx_L4_error)) if (likely(PyList_CheckExact(__pyx_v_ns_prefixes)) || PyTuple_CheckExact(__pyx_v_ns_prefixes)) { __pyx_t_6 = __pyx_v_ns_prefixes; __Pyx_INCREF(__pyx_t_6); __pyx_t_1 = 0; __pyx_t_7 = NULL; @@ -152612,7 +142066,6 @@ static xmlChar **__pyx_f_4lxml_5etree__convert_ns_prefixes(xmlDict *__pyx_v_c_di * c_prefix = tree.xmlDictExists(c_dict, _xcstr(prefix_utf), len(prefix_utf)) * if c_prefix: */ - __Pyx_TraceLine(793,0,__PYX_ERR(8, 793, __pyx_L4_error)) __pyx_t_8 = __pyx_f_4lxml_5etree__utf8(__pyx_v_prefix); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 793, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_prefix_utf, ((PyObject*)__pyx_t_8)); @@ -152625,7 +142078,6 @@ static xmlChar **__pyx_f_4lxml_5etree__convert_ns_prefixes(xmlDict *__pyx_v_c_di * if c_prefix: * # unknown prefixes do not need to get serialised */ - __Pyx_TraceLine(794,0,__PYX_ERR(8, 794, __pyx_L4_error)) if (unlikely(__pyx_v_prefix_utf == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(8, 794, __pyx_L4_error) @@ -152640,7 +142092,6 @@ static xmlChar **__pyx_f_4lxml_5etree__convert_ns_prefixes(xmlDict *__pyx_v_c_di * # unknown prefixes do not need to get serialised * c_ns_prefixes[i] = c_prefix */ - __Pyx_TraceLine(795,0,__PYX_ERR(8, 795, __pyx_L4_error)) __pyx_t_2 = (__pyx_v_c_prefix != 0); if (__pyx_t_2) { @@ -152651,7 +142102,6 @@ static xmlChar **__pyx_f_4lxml_5etree__convert_ns_prefixes(xmlDict *__pyx_v_c_di * i += 1 * except: */ - __Pyx_TraceLine(797,0,__PYX_ERR(8, 797, __pyx_L4_error)) (__pyx_v_c_ns_prefixes[__pyx_v_i]) = ((xmlChar *)__pyx_v_c_prefix); /* "src/lxml/serializer.pxi":798 @@ -152661,7 +142111,6 @@ static xmlChar **__pyx_f_4lxml_5etree__convert_ns_prefixes(xmlDict *__pyx_v_c_di * except: * python.lxml_free(c_ns_prefixes) */ - __Pyx_TraceLine(798,0,__PYX_ERR(8, 798, __pyx_L4_error)) __pyx_v_i = (__pyx_v_i + 1); /* "src/lxml/serializer.pxi":795 @@ -152680,7 +142129,6 @@ static xmlChar **__pyx_f_4lxml_5etree__convert_ns_prefixes(xmlDict *__pyx_v_c_di * prefix_utf = _utf8(prefix) * c_prefix = tree.xmlDictExists(c_dict, _xcstr(prefix_utf), len(prefix_utf)) */ - __Pyx_TraceLine(792,0,__PYX_ERR(8, 792, __pyx_L4_error)) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -152707,7 +142155,6 @@ static xmlChar **__pyx_f_4lxml_5etree__convert_ns_prefixes(xmlDict *__pyx_v_c_di * python.lxml_free(c_ns_prefixes) * raise */ - __Pyx_TraceLine(799,0,__PYX_ERR(8, 799, __pyx_L6_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._convert_ns_prefixes", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_10) < 0) __PYX_ERR(8, 799, __pyx_L6_except_error) @@ -152722,7 +142169,6 @@ static xmlChar **__pyx_f_4lxml_5etree__convert_ns_prefixes(xmlDict *__pyx_v_c_di * raise * */ - __Pyx_TraceLine(800,0,__PYX_ERR(8, 800, __pyx_L6_except_error)) lxml_free(__pyx_v_c_ns_prefixes); /* "src/lxml/serializer.pxi":801 @@ -152732,7 +142178,6 @@ static xmlChar **__pyx_f_4lxml_5etree__convert_ns_prefixes(xmlDict *__pyx_v_c_di * * c_ns_prefixes[i] = NULL # append end marker */ - __Pyx_TraceLine(801,0,__PYX_ERR(8, 801, __pyx_L6_except_error)) __Pyx_GIVEREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_10); @@ -152764,7 +142209,6 @@ static xmlChar **__pyx_f_4lxml_5etree__convert_ns_prefixes(xmlDict *__pyx_v_c_di * return c_ns_prefixes * */ - __Pyx_TraceLine(803,0,__PYX_ERR(8, 803, __pyx_L1_error)) (__pyx_v_c_ns_prefixes[__pyx_v_i]) = NULL; /* "src/lxml/serializer.pxi":804 @@ -152774,7 +142218,6 @@ static xmlChar **__pyx_f_4lxml_5etree__convert_ns_prefixes(xmlDict *__pyx_v_c_di * * cdef _tofilelikeC14N(f, _Element element, bint exclusive, bint with_comments, */ - __Pyx_TraceLine(804,0,__PYX_ERR(8, 804, __pyx_L1_error)) __pyx_r = __pyx_v_c_ns_prefixes; goto __pyx_L0; @@ -152796,7 +142239,6 @@ static xmlChar **__pyx_f_4lxml_5etree__convert_ns_prefixes(xmlDict *__pyx_v_c_di __pyx_L0:; __Pyx_XDECREF(__pyx_v_prefix); __Pyx_XDECREF(__pyx_v_prefix_utf); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -152822,7 +142264,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc PyObject *__pyx_v_message = NULL; struct __pyx_obj_4lxml_5etree__ErrorLog *__pyx_v_errors = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlDoc *__pyx_t_1; xmlChar **__pyx_t_2; @@ -152838,16 +142279,14 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; - PyObject *__pyx_t_15 = NULL; - PyObject *__pyx_t_16 = NULL; - Py_ssize_t __pyx_t_17; - Py_UCS4 __pyx_t_18; - const char *__pyx_t_19; - int __pyx_t_20; - char const *__pyx_t_21; - PyObject *__pyx_t_22 = NULL; + Py_ssize_t __pyx_t_15; + Py_UCS4 __pyx_t_16; + const char *__pyx_t_17; + int __pyx_t_18; + char const *__pyx_t_19; + PyObject *__pyx_t_20 = NULL; + PyObject *__pyx_t_21 = NULL; __Pyx_RefNannySetupContext("_tofilelikeC14N", 0); - __Pyx_TraceCall("_tofilelikeC14N", __pyx_f[8], 806, 0, __PYX_ERR(8, 806, __pyx_L1_error)); /* "src/lxml/serializer.pxi":808 * cdef _tofilelikeC14N(f, _Element element, bint exclusive, bint with_comments, @@ -152856,7 +142295,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * cdef tree.xmlOutputBuffer* c_buffer * cdef xmlChar **c_inclusive_ns_prefixes = NULL */ - __Pyx_TraceLine(808,0,__PYX_ERR(8, 808, __pyx_L1_error)) __Pyx_INCREF(Py_None); __pyx_v_writer = ((struct __pyx_obj_4lxml_5etree__FilelikeWriter *)Py_None); @@ -152867,7 +142305,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * cdef char* c_filename * cdef xmlDoc* c_base_doc */ - __Pyx_TraceLine(810,0,__PYX_ERR(8, 810, __pyx_L1_error)) __pyx_v_c_inclusive_ns_prefixes = NULL; /* "src/lxml/serializer.pxi":814 @@ -152877,7 +142314,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * * c_base_doc = element._c_node.doc */ - __Pyx_TraceLine(814,0,__PYX_ERR(8, 814, __pyx_L1_error)) __pyx_v_error = 0; /* "src/lxml/serializer.pxi":816 @@ -152887,7 +142323,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * c_doc = _fakeRootDoc(c_base_doc, element._c_node) * try: */ - __Pyx_TraceLine(816,0,__PYX_ERR(8, 816, __pyx_L1_error)) __pyx_t_1 = __pyx_v_element->_c_node->doc; __pyx_v_c_base_doc = __pyx_t_1; @@ -152898,7 +142333,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * try: * c_inclusive_ns_prefixes = ( */ - __Pyx_TraceLine(817,0,__PYX_ERR(8, 817, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__fakeRootDoc(__pyx_v_c_base_doc, __pyx_v_element->_c_node); if (unlikely(__pyx_t_1 == ((xmlDoc *)NULL))) __PYX_ERR(8, 817, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_1; @@ -152909,7 +142343,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * c_inclusive_ns_prefixes = ( * _convert_ns_prefixes(c_doc.dict, inclusive_ns_prefixes) */ - __Pyx_TraceLine(818,0,__PYX_ERR(8, 818, __pyx_L4_error)) /*try:*/ { /* "src/lxml/serializer.pxi":821 @@ -152919,7 +142352,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * * if _isString(f): */ - __Pyx_TraceLine(821,0,__PYX_ERR(8, 821, __pyx_L4_error)) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_inclusive_ns_prefixes); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(8, 821, __pyx_L4_error) if (__pyx_t_3) { @@ -152930,7 +142362,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * if inclusive_ns_prefixes else NULL) * */ - __Pyx_TraceLine(820,0,__PYX_ERR(8, 820, __pyx_L4_error)) __pyx_t_4 = __pyx_f_4lxml_5etree__convert_ns_prefixes(__pyx_v_c_doc->dict, __pyx_v_inclusive_ns_prefixes); if (unlikely(__pyx_t_4 == ((xmlChar **)NULL))) __PYX_ERR(8, 820, __pyx_L4_error) __pyx_t_2 = __pyx_t_4; } else { @@ -152942,7 +142373,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * * if _isString(f): */ - __Pyx_TraceLine(821,0,__PYX_ERR(8, 821, __pyx_L4_error)) __pyx_t_2 = NULL; } __pyx_v_c_inclusive_ns_prefixes = __pyx_t_2; @@ -152954,7 +142384,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * filename8 = _encodeFilename(f) * c_filename = _cstr(filename8) */ - __Pyx_TraceLine(823,0,__PYX_ERR(8, 823, __pyx_L4_error)) __pyx_t_3 = (_isString(__pyx_v_f) != 0); if (__pyx_t_3) { @@ -152965,7 +142394,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * c_filename = _cstr(filename8) * with nogil: */ - __Pyx_TraceLine(824,0,__PYX_ERR(8, 824, __pyx_L4_error)) __pyx_t_5 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_f); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 824, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_filename8 = __pyx_t_5; @@ -152978,7 +142406,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * with nogil: * error = c14n.xmlC14NDocSave( */ - __Pyx_TraceLine(825,0,__PYX_ERR(8, 825, __pyx_L4_error)) __pyx_v_c_filename = PyBytes_AS_STRING(__pyx_v_filename8); /* "src/lxml/serializer.pxi":826 @@ -152988,7 +142415,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * error = c14n.xmlC14NDocSave( * c_doc, NULL, exclusive, c_inclusive_ns_prefixes, */ - __Pyx_TraceLine(826,0,__PYX_ERR(8, 826, __pyx_L4_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -153004,7 +142430,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * c_doc, NULL, exclusive, c_inclusive_ns_prefixes, * with_comments, c_filename, compression) */ - __Pyx_TraceLine(827,1,__PYX_ERR(8, 827, __pyx_L8_error)) __pyx_v_error = xmlC14NDocSave(__pyx_v_c_doc, NULL, __pyx_v_exclusive, __pyx_v_c_inclusive_ns_prefixes, __pyx_v_with_comments, __pyx_v_c_filename, __pyx_v_compression); } @@ -153015,7 +142440,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * error = c14n.xmlC14NDocSave( * c_doc, NULL, exclusive, c_inclusive_ns_prefixes, */ - __Pyx_TraceLine(826,1,__PYX_ERR(8, 826, __pyx_L4_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -153024,13 +142448,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc #endif goto __pyx_L9; } - __pyx_L8_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L4_error; - } __pyx_L9:; } } @@ -153052,7 +142469,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * writer = _FilelikeWriter(f, compression=compression) * c_buffer = writer._createOutputBuffer(NULL) */ - __Pyx_TraceLine(830,0,__PYX_ERR(8, 830, __pyx_L4_error)) __pyx_t_3 = __Pyx_HasAttr(__pyx_v_f, __pyx_n_s_write); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(8, 830, __pyx_L4_error) __pyx_t_6 = (__pyx_t_3 != 0); if (likely(__pyx_t_6)) { @@ -153064,7 +142480,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * c_buffer = writer._createOutputBuffer(NULL) * with writer.error_log: */ - __Pyx_TraceLine(831,0,__PYX_ERR(8, 831, __pyx_L4_error)) __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 831, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_f); @@ -153090,7 +142505,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * with writer.error_log: * bytes_count = c14n.xmlC14NDocSaveTo( */ - __Pyx_TraceLine(832,0,__PYX_ERR(8, 832, __pyx_L4_error)) __pyx_t_9 = __pyx_f_4lxml_5etree_15_FilelikeWriter__createOutputBuffer(__pyx_v_writer, NULL); if (unlikely(__pyx_t_9 == ((xmlOutputBuffer *)NULL))) __PYX_ERR(8, 832, __pyx_L4_error) __pyx_v_c_buffer = __pyx_t_9; @@ -153101,19 +142515,13 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * bytes_count = c14n.xmlC14NDocSaveTo( * c_doc, NULL, exclusive, c_inclusive_ns_prefixes, */ - __Pyx_TraceLine(833,0,__PYX_ERR(8, 833, __pyx_L4_error)) /*with:*/ { __pyx_t_10 = __Pyx_PyObject_LookupSpecial(((PyObject *)__pyx_v_writer->error_log), __pyx_n_s_exit); if (unlikely(!__pyx_t_10)) __PYX_ERR(8, 833, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __pyx_f_4lxml_5etree_9_ErrorLog___enter__(__pyx_v_writer->error_log); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(8, 833, __pyx_L10_error) /*try:*/ { { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_13); - __Pyx_XGOTREF(__pyx_t_14); + (void)__pyx_t_12; (void)__pyx_t_13; (void)__pyx_t_14; /* mark used */ /*try:*/ { /* "src/lxml/serializer.pxi":834 @@ -153123,7 +142531,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * c_doc, NULL, exclusive, c_inclusive_ns_prefixes, * with_comments, c_buffer) */ - __Pyx_TraceLine(834,0,__PYX_ERR(8, 834, __pyx_L14_error)) __pyx_v_bytes_count = xmlC14NDocSaveTo(__pyx_v_c_doc, NULL, __pyx_v_exclusive, __pyx_v_c_inclusive_ns_prefixes, __pyx_v_with_comments, __pyx_v_c_buffer); /* "src/lxml/serializer.pxi":837 @@ -153133,7 +142540,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * if bytes_count < 0: * error = bytes_count */ - __Pyx_TraceLine(837,0,__PYX_ERR(8, 837, __pyx_L14_error)) __pyx_v_error = xmlOutputBufferClose(__pyx_v_c_buffer); /* "src/lxml/serializer.pxi":838 @@ -153143,7 +142549,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * error = bytes_count * else: */ - __Pyx_TraceLine(838,0,__PYX_ERR(8, 838, __pyx_L14_error)) __pyx_t_6 = ((__pyx_v_bytes_count < 0) != 0); if (__pyx_t_6) { @@ -153154,7 +142559,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * else: * raise TypeError(f"File or filename expected, got '{python._fqtypename(f).decode('UTF-8')}'") */ - __Pyx_TraceLine(839,0,__PYX_ERR(8, 839, __pyx_L14_error)) __pyx_v_error = __pyx_v_bytes_count; /* "src/lxml/serializer.pxi":838 @@ -153174,62 +142578,12 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * c_doc, NULL, exclusive, c_inclusive_ns_prefixes, */ } - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - goto __pyx_L19_try_end; - __pyx_L14_error:; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - /*except:*/ { - __Pyx_AddTraceback("lxml.etree._tofilelikeC14N", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_5) < 0) __PYX_ERR(8, 833, __pyx_L16_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_15 = PyTuple_Pack(3, __pyx_t_8, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_15)) __PYX_ERR(8, 833, __pyx_L16_except_error) - __Pyx_GOTREF(__pyx_t_15); - __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_15, NULL); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - if (unlikely(!__pyx_t_16)) __PYX_ERR(8, 833, __pyx_L16_except_error) - __Pyx_GOTREF(__pyx_t_16); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_16); - __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; - if (__pyx_t_6 < 0) __PYX_ERR(8, 833, __pyx_L16_except_error) - __pyx_t_3 = ((!(__pyx_t_6 != 0)) != 0); - if (__pyx_t_3) { - __Pyx_GIVEREF(__pyx_t_8); - __Pyx_GIVEREF(__pyx_t_7); - __Pyx_XGIVEREF(__pyx_t_5); - __Pyx_ErrRestoreWithState(__pyx_t_8, __pyx_t_7, __pyx_t_5); - __pyx_t_8 = 0; __pyx_t_7 = 0; __pyx_t_5 = 0; - __PYX_ERR(8, 833, __pyx_L16_except_error) - } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - goto __pyx_L15_exception_handled; - } - __pyx_L16_except_error:; - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); - goto __pyx_L4_error; - __pyx_L15_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); - __pyx_L19_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_10) { - __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__257, NULL); + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__56, NULL); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(8, 833, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_14); @@ -153239,11 +142593,11 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc } __pyx_L13:; } - goto __pyx_L24; + goto __pyx_L21; __pyx_L10_error:; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L4_error; - __pyx_L24:; + __pyx_L21:; } /* "src/lxml/serializer.pxi":830 @@ -153263,37 +142617,36 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * finally: * _destroyFakeDoc(c_base_doc, c_doc) */ - __Pyx_TraceLine(841,0,__PYX_ERR(8, 841, __pyx_L4_error)) /*else*/ { - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 841, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_17 = 0; - __pyx_t_18 = 127; + __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 841, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_15 = 0; + __pyx_t_16 = 127; __Pyx_INCREF(__pyx_kp_u_File_or_filename_expected_got); - __pyx_t_17 += 32; + __pyx_t_15 += 32; __Pyx_GIVEREF(__pyx_kp_u_File_or_filename_expected_got); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_File_or_filename_expected_got); - __pyx_t_19 = _fqtypename(__pyx_v_f); - __pyx_t_7 = __Pyx_decode_c_string(__pyx_t_19, 0, strlen(__pyx_t_19), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_7)) __PYX_ERR(8, 841, __pyx_L4_error) + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_File_or_filename_expected_got); + __pyx_t_17 = _fqtypename(__pyx_v_f); + __pyx_t_7 = __Pyx_decode_c_string(__pyx_t_17, 0, strlen(__pyx_t_17), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_7)) __PYX_ERR(8, 841, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_7); - __pyx_t_18 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_18) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_18; - __pyx_t_17 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7); + __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_16; + __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_INCREF(__pyx_kp_u__60); - __pyx_t_17 += 1; - __Pyx_GIVEREF(__pyx_kp_u__60); - PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__60); - __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_17, __pyx_t_18); if (unlikely(!__pyx_t_7)) __PYX_ERR(8, 841, __pyx_L4_error) + __Pyx_INCREF(__pyx_kp_u__21); + __pyx_t_15 += 1; + __Pyx_GIVEREF(__pyx_kp_u__21); + PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u__21); + __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, __pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_7)) __PYX_ERR(8, 841, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 841, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 841, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_Raise(__pyx_t_5, 0, 0, 0); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(8, 841, __pyx_L4_error) } __pyx_L6:; @@ -153306,7 +142659,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * if c_inclusive_ns_prefixes is not NULL: * python.lxml_free(c_inclusive_ns_prefixes) */ - __Pyx_TraceLine(843,0,__PYX_ERR(8, 843, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ __pyx_f_4lxml_5etree__destroyFakeDoc(__pyx_v_c_base_doc, __pyx_v_c_doc); @@ -153318,9 +142670,8 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * python.lxml_free(c_inclusive_ns_prefixes) * */ - __Pyx_TraceLine(844,0,__PYX_ERR(8, 844, __pyx_L1_error)) - __pyx_t_3 = ((__pyx_v_c_inclusive_ns_prefixes != NULL) != 0); - if (__pyx_t_3) { + __pyx_t_6 = ((__pyx_v_c_inclusive_ns_prefixes != NULL) != 0); + if (__pyx_t_6) { /* "src/lxml/serializer.pxi":845 * _destroyFakeDoc(c_base_doc, c_doc) @@ -153329,7 +142680,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * * if writer is not None: */ - __Pyx_TraceLine(845,0,__PYX_ERR(8, 845, __pyx_L1_error)) lxml_free(__pyx_v_c_inclusive_ns_prefixes); /* "src/lxml/serializer.pxi":844 @@ -153346,20 +142696,19 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign - __pyx_t_10 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_16 = 0; __pyx_t_22 = 0; - __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_10 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_16, &__pyx_t_22); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_20, &__pyx_t_21); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_14, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_14, &__pyx_t_13); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_16); - __Pyx_XGOTREF(__pyx_t_22); - __pyx_t_11 = __pyx_lineno; __pyx_t_20 = __pyx_clineno; __pyx_t_21 = __pyx_filename; + __Pyx_XGOTREF(__pyx_t_20); + __Pyx_XGOTREF(__pyx_t_21); + __pyx_t_11 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_19 = __pyx_filename; { /* "src/lxml/serializer.pxi":843 @@ -153369,7 +142718,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * if c_inclusive_ns_prefixes is not NULL: * python.lxml_free(c_inclusive_ns_prefixes) */ - __Pyx_TraceLine(843,0,__PYX_ERR(8, 843, __pyx_L27_error)) __pyx_f_4lxml_5etree__destroyFakeDoc(__pyx_v_c_base_doc, __pyx_v_c_doc); /* "src/lxml/serializer.pxi":844 @@ -153379,9 +142727,8 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * python.lxml_free(c_inclusive_ns_prefixes) * */ - __Pyx_TraceLine(844,0,__PYX_ERR(8, 844, __pyx_L27_error)) - __pyx_t_3 = ((__pyx_v_c_inclusive_ns_prefixes != NULL) != 0); - if (__pyx_t_3) { + __pyx_t_6 = ((__pyx_v_c_inclusive_ns_prefixes != NULL) != 0); + if (__pyx_t_6) { /* "src/lxml/serializer.pxi":845 * _destroyFakeDoc(c_base_doc, c_doc) @@ -153390,7 +142737,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * * if writer is not None: */ - __Pyx_TraceLine(845,0,__PYX_ERR(8, 845, __pyx_L27_error)) lxml_free(__pyx_v_c_inclusive_ns_prefixes); /* "src/lxml/serializer.pxi":844 @@ -153404,28 +142750,16 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_16); - __Pyx_XGIVEREF(__pyx_t_22); - __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_16, __pyx_t_22); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_20, __pyx_t_21); } __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ErrRestore(__pyx_t_10, __pyx_t_14, __pyx_t_13); - __pyx_t_10 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_16 = 0; __pyx_t_22 = 0; - __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_20; __pyx_filename = __pyx_t_21; - goto __pyx_L1_error; - __pyx_L27_error:; - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_16); - __Pyx_XGIVEREF(__pyx_t_22); - __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_16, __pyx_t_22); - } - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_12 = 0; __pyx_t_16 = 0; __pyx_t_22 = 0; + __pyx_t_10 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; + __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_19; goto __pyx_L1_error; } __pyx_L5:; @@ -153438,10 +142772,9 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * writer._exc_context._raise_if_stored() * */ - __Pyx_TraceLine(847,0,__PYX_ERR(8, 847, __pyx_L1_error)) - __pyx_t_3 = (((PyObject *)__pyx_v_writer) != Py_None); - __pyx_t_6 = (__pyx_t_3 != 0); - if (__pyx_t_6) { + __pyx_t_6 = (((PyObject *)__pyx_v_writer) != Py_None); + __pyx_t_3 = (__pyx_t_6 != 0); + if (__pyx_t_3) { /* "src/lxml/serializer.pxi":848 * @@ -153450,8 +142783,7 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * * if error < 0: */ - __Pyx_TraceLine(848,0,__PYX_ERR(8, 848, __pyx_L1_error)) - __pyx_t_20 = ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_writer->_exc_context->__pyx_vtab)->_raise_if_stored(__pyx_v_writer->_exc_context); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(8, 848, __pyx_L1_error) + __pyx_t_18 = ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_writer->_exc_context->__pyx_vtab)->_raise_if_stored(__pyx_v_writer->_exc_context); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(8, 848, __pyx_L1_error) /* "src/lxml/serializer.pxi":847 * python.lxml_free(c_inclusive_ns_prefixes) @@ -153469,9 +142801,8 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * message = u"C14N failed" * if writer is not None: */ - __Pyx_TraceLine(850,0,__PYX_ERR(8, 850, __pyx_L1_error)) - __pyx_t_6 = ((__pyx_v_error < 0) != 0); - if (__pyx_t_6) { + __pyx_t_3 = ((__pyx_v_error < 0) != 0); + if (__pyx_t_3) { /* "src/lxml/serializer.pxi":851 * @@ -153480,7 +142811,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * if writer is not None: * errors = writer.error_log */ - __Pyx_TraceLine(851,0,__PYX_ERR(8, 851, __pyx_L1_error)) __Pyx_INCREF(__pyx_kp_u_C14N_failed); __pyx_v_message = __pyx_kp_u_C14N_failed; @@ -153491,10 +142821,9 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * errors = writer.error_log * if len(errors): */ - __Pyx_TraceLine(852,0,__PYX_ERR(8, 852, __pyx_L1_error)) - __pyx_t_6 = (((PyObject *)__pyx_v_writer) != Py_None); - __pyx_t_3 = (__pyx_t_6 != 0); - if (__pyx_t_3) { + __pyx_t_3 = (((PyObject *)__pyx_v_writer) != Py_None); + __pyx_t_6 = (__pyx_t_3 != 0); + if (__pyx_t_6) { /* "src/lxml/serializer.pxi":853 * message = u"C14N failed" @@ -153503,11 +142832,10 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * if len(errors): * message = errors[0].message */ - __Pyx_TraceLine(853,0,__PYX_ERR(8, 853, __pyx_L1_error)) - __pyx_t_5 = ((PyObject *)__pyx_v_writer->error_log); - __Pyx_INCREF(__pyx_t_5); - __pyx_v_errors = ((struct __pyx_obj_4lxml_5etree__ErrorLog *)__pyx_t_5); - __pyx_t_5 = 0; + __pyx_t_8 = ((PyObject *)__pyx_v_writer->error_log); + __Pyx_INCREF(__pyx_t_8); + __pyx_v_errors = ((struct __pyx_obj_4lxml_5etree__ErrorLog *)__pyx_t_8); + __pyx_t_8 = 0; /* "src/lxml/serializer.pxi":854 * if writer is not None: @@ -153516,10 +142844,9 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * message = errors[0].message * raise C14NError(message) */ - __Pyx_TraceLine(854,0,__PYX_ERR(8, 854, __pyx_L1_error)) - __pyx_t_17 = PyObject_Length(((PyObject *)__pyx_v_errors)); if (unlikely(__pyx_t_17 == ((Py_ssize_t)-1))) __PYX_ERR(8, 854, __pyx_L1_error) - __pyx_t_3 = (__pyx_t_17 != 0); - if (__pyx_t_3) { + __pyx_t_15 = PyObject_Length(((PyObject *)__pyx_v_errors)); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(8, 854, __pyx_L1_error) + __pyx_t_6 = (__pyx_t_15 != 0); + if (__pyx_t_6) { /* "src/lxml/serializer.pxi":855 * errors = writer.error_log @@ -153528,12 +142855,11 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * raise C14NError(message) * */ - __Pyx_TraceLine(855,0,__PYX_ERR(8, 855, __pyx_L1_error)) - __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_errors), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 855, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_message); if (unlikely(!__pyx_t_7)) __PYX_ERR(8, 855, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_errors), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_message); if (unlikely(!__pyx_t_7)) __PYX_ERR(8, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_message, __pyx_t_7); __pyx_t_7 = 0; @@ -153562,7 +142888,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc * * # incremental serialisation */ - __Pyx_TraceLine(856,0,__PYX_ERR(8, 856, __pyx_L1_error)) __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree_C14NError), __pyx_v_message); if (unlikely(!__pyx_t_7)) __PYX_ERR(8, 856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_Raise(__pyx_t_7, 0, 0, 0); @@ -153593,7 +142918,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_15); __Pyx_AddTraceback("lxml.etree._tofilelikeC14N", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -153602,7 +142926,6 @@ static PyObject *__pyx_f_4lxml_5etree__tofilelikeC14N(PyObject *__pyx_v_f, struc __Pyx_XDECREF(__pyx_v_message); __Pyx_XDECREF((PyObject *)__pyx_v_errors); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -153744,14 +143067,12 @@ static int __pyx_pw_4lxml_5etree_7xmlfile_1__init__(PyObject *__pyx_v_self, PyOb static int __pyx_pf_4lxml_5etree_7xmlfile___init__(struct __pyx_obj_4lxml_5etree_xmlfile *__pyx_v_self, PyObject *__pyx_v_output_file, PyObject *__pyx_v_encoding, PyObject *__pyx_v_compression, PyObject *__pyx_v_close, PyObject *__pyx_v_buffered) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[8], 905, 0, __PYX_ERR(8, 905, __pyx_L1_error)); /* "src/lxml/serializer.pxi":907 * def __init__(self, output_file not None, encoding=None, compression=None, @@ -153760,7 +143081,6 @@ static int __pyx_pf_4lxml_5etree_7xmlfile___init__(struct __pyx_obj_4lxml_5etree * self.encoding = _utf8orNone(encoding) * self.compresslevel = compression or 0 */ - __Pyx_TraceLine(907,0,__PYX_ERR(8, 907, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_output_file); __Pyx_GIVEREF(__pyx_v_output_file); __Pyx_GOTREF(__pyx_v_self->output_file); @@ -153774,7 +143094,6 @@ static int __pyx_pf_4lxml_5etree_7xmlfile___init__(struct __pyx_obj_4lxml_5etree * self.compresslevel = compression or 0 * self.close = close */ - __Pyx_TraceLine(908,0,__PYX_ERR(8, 908, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__utf8orNone(__pyx_v_encoding); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -153790,7 +143109,6 @@ static int __pyx_pf_4lxml_5etree_7xmlfile___init__(struct __pyx_obj_4lxml_5etree * self.close = close * self.buffered = buffered */ - __Pyx_TraceLine(909,0,__PYX_ERR(8, 909, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_compression); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(8, 909, __pyx_L1_error) if (!__pyx_t_3) { } else { @@ -153809,7 +143127,6 @@ static int __pyx_pf_4lxml_5etree_7xmlfile___init__(struct __pyx_obj_4lxml_5etree * self.buffered = buffered * self.method = OUTPUT_METHOD_XML */ - __Pyx_TraceLine(910,0,__PYX_ERR(8, 910, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_close); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(8, 910, __pyx_L1_error) __pyx_v_self->close = __pyx_t_3; @@ -153820,7 +143137,6 @@ static int __pyx_pf_4lxml_5etree_7xmlfile___init__(struct __pyx_obj_4lxml_5etree * self.method = OUTPUT_METHOD_XML * */ - __Pyx_TraceLine(911,0,__PYX_ERR(8, 911, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_buffered); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(8, 911, __pyx_L1_error) __pyx_v_self->buffered = __pyx_t_3; @@ -153831,7 +143147,6 @@ static int __pyx_pf_4lxml_5etree_7xmlfile___init__(struct __pyx_obj_4lxml_5etree * * def __enter__(self): */ - __Pyx_TraceLine(912,0,__PYX_ERR(8, 912, __pyx_L1_error)) __pyx_v_self->method = __pyx_e_4lxml_5etree_OUTPUT_METHOD_XML; /* "src/lxml/serializer.pxi":905 @@ -153850,7 +143165,6 @@ static int __pyx_pf_4lxml_5etree_7xmlfile___init__(struct __pyx_obj_4lxml_5etree __Pyx_AddTraceback("lxml.etree.xmlfile.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -153879,7 +143193,6 @@ static PyObject *__pyx_pw_4lxml_5etree_7xmlfile_3__enter__(PyObject *__pyx_v_sel static PyObject *__pyx_pf_4lxml_5etree_7xmlfile_2__enter__(struct __pyx_obj_4lxml_5etree_xmlfile *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -153887,9 +143200,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7xmlfile_2__enter__(struct __pyx_obj_4lxm PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__258) __Pyx_RefNannySetupContext("__enter__", 0); - __Pyx_TraceCall("__enter__", __pyx_f[8], 914, 0, __PYX_ERR(8, 914, __pyx_L1_error)); /* "src/lxml/serializer.pxi":915 * @@ -153898,7 +143209,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7xmlfile_2__enter__(struct __pyx_obj_4lxm * self.writer = _IncrementalFileWriter( * self.output_file, self.encoding, self.compresslevel, */ - __Pyx_TraceLine(915,0,__PYX_ERR(8, 915, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_1 = (__pyx_v_self->output_file != Py_None); @@ -153916,7 +143226,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7xmlfile_2__enter__(struct __pyx_obj_4lxm * self.close, self.buffered, self.method) * return self.writer */ - __Pyx_TraceLine(917,0,__PYX_ERR(8, 917, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->compresslevel); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -153927,7 +143236,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7xmlfile_2__enter__(struct __pyx_obj_4lxm * return self.writer * */ - __Pyx_TraceLine(918,0,__PYX_ERR(8, 918, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->close); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_self->buffered); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 918, __pyx_L1_error) @@ -153942,7 +143250,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7xmlfile_2__enter__(struct __pyx_obj_4lxm * self.output_file, self.encoding, self.compresslevel, * self.close, self.buffered, self.method) */ - __Pyx_TraceLine(916,0,__PYX_ERR(8, 916, __pyx_L1_error)) __pyx_t_6 = PyTuple_New(6); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 916, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_self->output_file); @@ -153979,7 +143286,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7xmlfile_2__enter__(struct __pyx_obj_4lxm * * def __exit__(self, exc_type, exc_val, exc_tb): */ - __Pyx_TraceLine(919,0,__PYX_ERR(8, 919, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->writer)); __pyx_r = ((PyObject *)__pyx_v_self->writer); @@ -154004,7 +143310,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7xmlfile_2__enter__(struct __pyx_obj_4lxm __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -154019,7 +143324,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7xmlfile_2__enter__(struct __pyx_obj_4lxm /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_7xmlfile_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_5etree_7xmlfile_5__exit__ = {"__exit__", (PyCFunction)__pyx_pw_4lxml_5etree_7xmlfile_5__exit__, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_5etree_7xmlfile_5__exit__ = {"__exit__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_7xmlfile_5__exit__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_5etree_7xmlfile_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_exc_type = 0; CYTHON_UNUSED PyObject *__pyx_v_exc_val = 0; @@ -154094,15 +143399,12 @@ static PyObject *__pyx_pf_4lxml_5etree_7xmlfile_4__exit__(struct __pyx_obj_4lxml struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *__pyx_v_old_writer = NULL; PyObject *__pyx_v_raise_on_error = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__259) __Pyx_RefNannySetupContext("__exit__", 0); - __Pyx_TraceCall("__exit__", __pyx_f[8], 921, 0, __PYX_ERR(8, 921, __pyx_L1_error)); /* "src/lxml/serializer.pxi":922 * @@ -154111,7 +143413,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7xmlfile_4__exit__(struct __pyx_obj_4lxml * old_writer, self.writer = self.writer, None * raise_on_error = exc_type is None */ - __Pyx_TraceLine(922,0,__PYX_ERR(8, 922, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_self->writer) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -154123,7 +143424,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7xmlfile_4__exit__(struct __pyx_obj_4lxml * raise_on_error = exc_type is None * old_writer._close(raise_on_error) */ - __Pyx_TraceLine(923,0,__PYX_ERR(8, 923, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_v_self->writer); __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = Py_None; @@ -154143,7 +143443,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7xmlfile_4__exit__(struct __pyx_obj_4lxml * old_writer._close(raise_on_error) * if self.close: */ - __Pyx_TraceLine(924,0,__PYX_ERR(8, 924, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_exc_type == Py_None); __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -154157,7 +143456,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7xmlfile_4__exit__(struct __pyx_obj_4lxml * if self.close: * self.output_file = None */ - __Pyx_TraceLine(925,0,__PYX_ERR(8, 925, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_raise_on_error); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(8, 925, __pyx_L1_error) __pyx_t_4 = __pyx_f_4lxml_5etree_22_IncrementalFileWriter__close(__pyx_v_old_writer, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 925, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -154170,7 +143468,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7xmlfile_4__exit__(struct __pyx_obj_4lxml * self.output_file = None * */ - __Pyx_TraceLine(926,0,__PYX_ERR(8, 926, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_self->close != 0); if (__pyx_t_2) { @@ -154181,7 +143478,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7xmlfile_4__exit__(struct __pyx_obj_4lxml * * async def __aenter__(self): */ - __Pyx_TraceLine(927,0,__PYX_ERR(8, 927, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->output_file); @@ -154226,7 +143522,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7xmlfile_4__exit__(struct __pyx_obj_4lxml __Pyx_XDECREF((PyObject *)__pyx_v_old_writer); __Pyx_XDECREF(__pyx_v_raise_on_error); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -154271,7 +143566,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7xmlfile_6__aenter__(struct __pyx_obj_4lx __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_7xmlfile_8generator, __pyx_codeobj__260, (PyObject *) __pyx_cur_scope, __pyx_n_s_aenter, __pyx_n_s_xmlfile___aenter, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(8, 929, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_7xmlfile_8generator, __pyx_codeobj__57, (PyObject *) __pyx_cur_scope, __pyx_n_s_aenter, __pyx_n_s_xmlfile___aenter, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(8, 929, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -154291,7 +143586,6 @@ static PyObject *__pyx_gb_4lxml_5etree_7xmlfile_8generator(__pyx_CoroutineObject { struct __pyx_obj_4lxml_5etree___pyx_scope_struct____aenter__ *__pyx_cur_scope = ((struct __pyx_obj_4lxml_5etree___pyx_scope_struct____aenter__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; @@ -154301,12 +143595,9 @@ static PyObject *__pyx_gb_4lxml_5etree_7xmlfile_8generator(__pyx_CoroutineObject PyObject *__pyx_t_7 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__aenter__", 0); - __Pyx_TraceFrameInit(__pyx_codeobj__260) - __Pyx_TraceCall("__aenter__", __pyx_f[8], 929, 0, __PYX_ERR(8, 929, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } @@ -154320,7 +143611,6 @@ static PyObject *__pyx_gb_4lxml_5etree_7xmlfile_8generator(__pyx_CoroutineObject * if isinstance(self.output_file, basestring): * raise TypeError("Cannot asynchronously write to a plain file") */ - __Pyx_TraceLine(930,0,__PYX_ERR(8, 930, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_1 = (__pyx_cur_scope->__pyx_v_self->output_file != Py_None); @@ -154338,7 +143628,6 @@ static PyObject *__pyx_gb_4lxml_5etree_7xmlfile_8generator(__pyx_CoroutineObject * raise TypeError("Cannot asynchronously write to a plain file") * if not hasattr(self.output_file, 'write'): */ - __Pyx_TraceLine(931,0,__PYX_ERR(8, 931, __pyx_L1_error)) __pyx_t_2 = __pyx_cur_scope->__pyx_v_self->output_file; __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_t_2); @@ -154353,8 +143642,7 @@ static PyObject *__pyx_gb_4lxml_5etree_7xmlfile_8generator(__pyx_CoroutineObject * if not hasattr(self.output_file, 'write'): * raise TypeError("Output file needs an async .write() method") */ - __Pyx_TraceLine(932,0,__PYX_ERR(8, 932, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__261, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 932, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 932, __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; @@ -154376,7 +143664,6 @@ static PyObject *__pyx_gb_4lxml_5etree_7xmlfile_8generator(__pyx_CoroutineObject * raise TypeError("Output file needs an async .write() method") * self.async_writer = _AsyncIncrementalFileWriter( */ - __Pyx_TraceLine(933,0,__PYX_ERR(8, 933, __pyx_L1_error)) __pyx_t_2 = __pyx_cur_scope->__pyx_v_self->output_file; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = __Pyx_HasAttr(__pyx_t_2, __pyx_n_s_write); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(8, 933, __pyx_L1_error) @@ -154391,8 +143678,7 @@ static PyObject *__pyx_gb_4lxml_5etree_7xmlfile_8generator(__pyx_CoroutineObject * self.async_writer = _AsyncIncrementalFileWriter( * self.output_file, self.encoding, self.compresslevel, */ - __Pyx_TraceLine(934,0,__PYX_ERR(8, 934, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__262, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 934, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 934, __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; @@ -154414,7 +143700,6 @@ static PyObject *__pyx_gb_4lxml_5etree_7xmlfile_8generator(__pyx_CoroutineObject * self.close, self.buffered, self.method) * return self.async_writer */ - __Pyx_TraceLine(936,0,__PYX_ERR(8, 936, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->compresslevel); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 936, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -154425,7 +143710,6 @@ static PyObject *__pyx_gb_4lxml_5etree_7xmlfile_8generator(__pyx_CoroutineObject * return self.async_writer * */ - __Pyx_TraceLine(937,0,__PYX_ERR(8, 937, __pyx_L1_error)) __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_cur_scope->__pyx_v_self->close); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_cur_scope->__pyx_v_self->buffered); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 937, __pyx_L1_error) @@ -154440,7 +143724,6 @@ static PyObject *__pyx_gb_4lxml_5etree_7xmlfile_8generator(__pyx_CoroutineObject * self.output_file, self.encoding, self.compresslevel, * self.close, self.buffered, self.method) */ - __Pyx_TraceLine(935,0,__PYX_ERR(8, 935, __pyx_L1_error)) __pyx_t_7 = PyTuple_New(6); if (unlikely(!__pyx_t_7)) __PYX_ERR(8, 935, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self->output_file); @@ -154477,7 +143760,6 @@ static PyObject *__pyx_gb_4lxml_5etree_7xmlfile_8generator(__pyx_CoroutineObject * * async def __aexit__(self, exc_type, exc_val, exc_tb): */ - __Pyx_TraceLine(938,0,__PYX_ERR(8, 938, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = NULL; __Pyx_ReturnWithStopIteration(((PyObject *)__pyx_cur_scope->__pyx_v_self->async_writer)); goto __pyx_L0; @@ -154501,10 +143783,11 @@ static PyObject *__pyx_gb_4lxml_5etree_7xmlfile_8generator(__pyx_CoroutineObject __Pyx_AddTraceback("__aenter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -154520,7 +143803,7 @@ static PyObject *__pyx_gb_4lxml_5etree_7xmlfile_11generator1(__pyx_CoroutineObje /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_7xmlfile_10__aexit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_5etree_7xmlfile_10__aexit__ = {"__aexit__", (PyCFunction)__pyx_pw_4lxml_5etree_7xmlfile_10__aexit__, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_5etree_7xmlfile_10__aexit__ = {"__aexit__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_7xmlfile_10__aexit__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_5etree_7xmlfile_10__aexit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_exc_type = 0; CYTHON_UNUSED PyObject *__pyx_v_exc_val = 0; @@ -154617,7 +143900,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7xmlfile_9__aexit__(struct __pyx_obj_4lxm __Pyx_INCREF(__pyx_cur_scope->__pyx_v_exc_tb); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_exc_tb); { - __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_7xmlfile_11generator1, __pyx_codeobj__263, (PyObject *) __pyx_cur_scope, __pyx_n_s_aexit, __pyx_n_s_xmlfile___aexit, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(8, 940, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_7xmlfile_11generator1, __pyx_codeobj__60, (PyObject *) __pyx_cur_scope, __pyx_n_s_aexit, __pyx_n_s_xmlfile___aexit, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(8, 940, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -154637,22 +143920,17 @@ static PyObject *__pyx_gb_4lxml_5etree_7xmlfile_11generator1(__pyx_CoroutineObje { struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1___aexit__ *__pyx_cur_scope = ((struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1___aexit__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__aexit__", 0); - __Pyx_TraceFrameInit(__pyx_codeobj__263) - __Pyx_TraceCall("__aexit__", __pyx_f[8], 940, 0, __PYX_ERR(8, 940, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L5_resume_from_await; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } @@ -154666,7 +143944,6 @@ static PyObject *__pyx_gb_4lxml_5etree_7xmlfile_11generator1(__pyx_CoroutineObje * old_writer, self.async_writer = self.async_writer, None * raise_on_error = exc_type is None */ - __Pyx_TraceLine(941,0,__PYX_ERR(8, 941, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_cur_scope->__pyx_v_self->async_writer) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -154678,7 +143955,6 @@ static PyObject *__pyx_gb_4lxml_5etree_7xmlfile_11generator1(__pyx_CoroutineObje * raise_on_error = exc_type is None * await old_writer._close(raise_on_error) */ - __Pyx_TraceLine(942,0,__PYX_ERR(8, 942, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_cur_scope->__pyx_v_self->async_writer); __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = Py_None; @@ -154699,7 +143975,6 @@ static PyObject *__pyx_gb_4lxml_5etree_7xmlfile_11generator1(__pyx_CoroutineObje * await old_writer._close(raise_on_error) * if self.close: */ - __Pyx_TraceLine(943,0,__PYX_ERR(8, 943, __pyx_L1_error)) __pyx_t_2 = (__pyx_cur_scope->__pyx_v_exc_type == Py_None); __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 943, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -154714,7 +143989,6 @@ static PyObject *__pyx_gb_4lxml_5etree_7xmlfile_11generator1(__pyx_CoroutineObje * if self.close: * self.output_file = None */ - __Pyx_TraceLine(944,0,__PYX_ERR(8, 944, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_old_writer), __pyx_n_s_close_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 944, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; @@ -154727,45 +144001,16 @@ static PyObject *__pyx_gb_4lxml_5etree_7xmlfile_11generator1(__pyx_CoroutineObje __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (!__pyx_t_5) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_cur_scope->__pyx_v_raise_on_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 944, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_raise_on_error}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 944, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_raise_on_error}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 944, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 944, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_INCREF(__pyx_cur_scope->__pyx_v_raise_on_error); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_raise_on_error); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_cur_scope->__pyx_v_raise_on_error); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 944, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_cur_scope->__pyx_v_raise_on_error) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_cur_scope->__pyx_v_raise_on_error); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 944, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, awaiting value */ @@ -154788,7 +144033,6 @@ static PyObject *__pyx_gb_4lxml_5etree_7xmlfile_11generator1(__pyx_CoroutineObje * self.output_file = None * */ - __Pyx_TraceLine(945,0,__PYX_ERR(8, 945, __pyx_L1_error)) __pyx_t_2 = (__pyx_cur_scope->__pyx_v_self->close != 0); if (__pyx_t_2) { @@ -154799,7 +144043,6 @@ static PyObject *__pyx_gb_4lxml_5etree_7xmlfile_11generator1(__pyx_CoroutineObje * * */ - __Pyx_TraceLine(946,0,__PYX_ERR(8, 946, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->output_file); @@ -154840,14 +144083,14 @@ static PyObject *__pyx_gb_4lxml_5etree_7xmlfile_11generator1(__pyx_CoroutineObje __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("__aexit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -154888,12 +144131,10 @@ static int __pyx_pw_4lxml_5etree_8htmlfile_1__init__(PyObject *__pyx_v_self, PyO static int __pyx_pf_4lxml_5etree_8htmlfile___init__(struct __pyx_obj_4lxml_5etree_htmlfile *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[8], 955, 0, __PYX_ERR(8, 955, __pyx_L1_error)); /* "src/lxml/serializer.pxi":956 * """ @@ -154902,7 +144143,6 @@ static int __pyx_pf_4lxml_5etree_8htmlfile___init__(struct __pyx_obj_4lxml_5etre * self.method = OUTPUT_METHOD_HTML * */ - __Pyx_TraceLine(956,0,__PYX_ERR(8, 956, __pyx_L1_error)) __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 956, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_5etree_htmlfile)); @@ -154929,7 +144169,6 @@ static int __pyx_pf_4lxml_5etree_8htmlfile___init__(struct __pyx_obj_4lxml_5etre * * */ - __Pyx_TraceLine(957,0,__PYX_ERR(8, 957, __pyx_L1_error)) __pyx_v_self->__pyx_base.method = __pyx_e_4lxml_5etree_OUTPUT_METHOD_HTML; /* "src/lxml/serializer.pxi":955 @@ -154949,7 +144188,6 @@ static int __pyx_pf_4lxml_5etree_8htmlfile___init__(struct __pyx_obj_4lxml_5etre __Pyx_AddTraceback("lxml.etree.htmlfile.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -155074,14 +144312,12 @@ static int __pyx_pw_4lxml_5etree_22_IncrementalFileWriter_1__cinit__(PyObject *_ static int __pyx_pf_4lxml_5etree_22_IncrementalFileWriter___cinit__(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *__pyx_v_self, PyObject *__pyx_v_outfile, PyObject *__pyx_v_encoding, int __pyx_v_compresslevel, int __pyx_v_close, int __pyx_v_buffered, int __pyx_v_method) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; char *__pyx_t_4; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[8], 980, 0, __PYX_ERR(8, 980, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_encoding); /* "src/lxml/serializer.pxi":982 @@ -155091,7 +144327,6 @@ static int __pyx_pf_4lxml_5etree_22_IncrementalFileWriter___cinit__(struct __pyx * self._element_stack = [] * if encoding is None: */ - __Pyx_TraceLine(982,0,__PYX_ERR(8, 982, __pyx_L1_error)) __pyx_v_self->_status = __pyx_e_4lxml_5etree_WRITER_STARTING; /* "src/lxml/serializer.pxi":983 @@ -155101,7 +144336,6 @@ static int __pyx_pf_4lxml_5etree_22_IncrementalFileWriter___cinit__(struct __pyx * if encoding is None: * encoding = b'ASCII' */ - __Pyx_TraceLine(983,0,__PYX_ERR(8, 983, __pyx_L1_error)) __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 983, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -155117,7 +144351,6 @@ static int __pyx_pf_4lxml_5etree_22_IncrementalFileWriter___cinit__(struct __pyx * encoding = b'ASCII' * self._encoding = encoding */ - __Pyx_TraceLine(984,0,__PYX_ERR(8, 984, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_encoding == ((PyObject*)Py_None)); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -155129,7 +144362,6 @@ static int __pyx_pf_4lxml_5etree_22_IncrementalFileWriter___cinit__(struct __pyx * self._encoding = encoding * self._c_encoding = _cstr(encoding) if encoding is not None else NULL */ - __Pyx_TraceLine(985,0,__PYX_ERR(8, 985, __pyx_L1_error)) __Pyx_INCREF(__pyx_n_b_ASCII); __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_n_b_ASCII); @@ -155149,7 +144381,6 @@ static int __pyx_pf_4lxml_5etree_22_IncrementalFileWriter___cinit__(struct __pyx * self._c_encoding = _cstr(encoding) if encoding is not None else NULL * self._buffered = buffered */ - __Pyx_TraceLine(986,0,__PYX_ERR(8, 986, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_encoding); __Pyx_GIVEREF(__pyx_v_encoding); __Pyx_GOTREF(__pyx_v_self->_encoding); @@ -155163,7 +144394,6 @@ static int __pyx_pf_4lxml_5etree_22_IncrementalFileWriter___cinit__(struct __pyx * self._buffered = buffered * self._target = _create_output_buffer( */ - __Pyx_TraceLine(987,0,__PYX_ERR(8, 987, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_encoding != ((PyObject*)Py_None)); if ((__pyx_t_3 != 0)) { __pyx_t_4 = PyBytes_AS_STRING(__pyx_v_encoding); @@ -155179,7 +144409,6 @@ static int __pyx_pf_4lxml_5etree_22_IncrementalFileWriter___cinit__(struct __pyx * self._target = _create_output_buffer( * outfile, self._c_encoding, compresslevel, &self._c_out, close) */ - __Pyx_TraceLine(988,0,__PYX_ERR(8, 988, __pyx_L1_error)) __pyx_v_self->_buffered = __pyx_v_buffered; /* "src/lxml/serializer.pxi":989 @@ -155189,7 +144418,6 @@ static int __pyx_pf_4lxml_5etree_22_IncrementalFileWriter___cinit__(struct __pyx * outfile, self._c_encoding, compresslevel, &self._c_out, close) * self._method = method */ - __Pyx_TraceLine(989,0,__PYX_ERR(8, 989, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__create_output_buffer(__pyx_v_outfile, __pyx_v_self->_c_encoding, __pyx_v_compresslevel, (&__pyx_v_self->_c_out), __pyx_v_close)); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -155205,7 +144433,6 @@ static int __pyx_pf_4lxml_5etree_22_IncrementalFileWriter___cinit__(struct __pyx * * def __dealloc__(self): */ - __Pyx_TraceLine(991,0,__PYX_ERR(8, 991, __pyx_L1_error)) __pyx_v_self->_method = __pyx_v_method; /* "src/lxml/serializer.pxi":980 @@ -155225,7 +144452,6 @@ static int __pyx_pf_4lxml_5etree_22_IncrementalFileWriter___cinit__(struct __pyx __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_encoding); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -155250,11 +144476,9 @@ static void __pyx_pw_4lxml_5etree_22_IncrementalFileWriter_3__dealloc__(PyObject } static void __pyx_pf_4lxml_5etree_22_IncrementalFileWriter_2__dealloc__(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *__pyx_v_self) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__dealloc__", 0); - __Pyx_TraceCall("__dealloc__", __pyx_f[8], 993, 0, __PYX_ERR(8, 993, __pyx_L1_error)); /* "src/lxml/serializer.pxi":994 * @@ -155263,7 +144487,6 @@ static void __pyx_pf_4lxml_5etree_22_IncrementalFileWriter_2__dealloc__(struct _ * tree.xmlOutputBufferClose(self._c_out) * */ - __Pyx_TraceLine(994,0,__PYX_ERR(8, 994, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_c_out != NULL) != 0); if (__pyx_t_1) { @@ -155274,7 +144497,6 @@ static void __pyx_pf_4lxml_5etree_22_IncrementalFileWriter_2__dealloc__(struct _ * * def write_declaration(self, version=None, standalone=None, doctype=None): */ - __Pyx_TraceLine(995,0,__PYX_ERR(8, 995, __pyx_L1_error)) (void)(xmlOutputBufferClose(__pyx_v_self->_c_out)); /* "src/lxml/serializer.pxi":994 @@ -155295,11 +144517,6 @@ static void __pyx_pf_4lxml_5etree_22_IncrementalFileWriter_2__dealloc__(struct _ */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._IncrementalFileWriter.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -155314,7 +144531,7 @@ static void __pyx_pf_4lxml_5etree_22_IncrementalFileWriter_2__dealloc__(struct _ /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_5write_declaration(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_22_IncrementalFileWriter_4write_declaration[] = "write_declaration(self, version=None, standalone=None, doctype=None)\n\n Write an XML declaration and (optionally) a doctype into the file.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_22_IncrementalFileWriter_5write_declaration = {"write_declaration", (PyCFunction)__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_5write_declaration, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_22_IncrementalFileWriter_4write_declaration}; +static PyMethodDef __pyx_mdef_4lxml_5etree_22_IncrementalFileWriter_5write_declaration = {"write_declaration", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_5write_declaration, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_22_IncrementalFileWriter_4write_declaration}; static PyObject *__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_5write_declaration(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_version = 0; PyObject *__pyx_v_standalone = 0; @@ -155399,17 +144616,15 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_4write_declarati const xmlChar *__pyx_v_c_version; int __pyx_v_c_standalone; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - const xmlChar *__pyx_t_4; - int __pyx_t_5; + PyObject *__pyx_t_4 = NULL; + const xmlChar *__pyx_t_5; int __pyx_t_6; - __Pyx_TraceFrameInit(__pyx_codeobj__264) + int __pyx_t_7; __Pyx_RefNannySetupContext("write_declaration", 0); - __Pyx_TraceCall("write_declaration", __pyx_f[8], 997, 0, __PYX_ERR(8, 997, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_version); __Pyx_INCREF(__pyx_v_doctype); @@ -155420,7 +144635,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_4write_declarati * cdef const_xmlChar* c_version * cdef int c_standalone */ - __Pyx_TraceLine(1002,0,__PYX_ERR(8, 1002, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_self->_c_out != NULL) != 0))) { @@ -155437,7 +144651,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_4write_declarati * raise LxmlSyntaxError("only XML documents have declarations") * if self._status >= WRITER_DECL_WRITTEN: */ - __Pyx_TraceLine(1005,0,__PYX_ERR(8, 1005, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_method != __pyx_e_4lxml_5etree_OUTPUT_METHOD_XML) != 0); if (unlikely(__pyx_t_1)) { @@ -155448,14 +144661,25 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_4write_declarati * if self._status >= WRITER_DECL_WRITTEN: * raise LxmlSyntaxError("XML declaration already written") */ - __Pyx_TraceLine(1006,0,__PYX_ERR(8, 1006, __pyx_L1_error)) - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1006, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__265, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1006, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1006, __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_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_only_XML_documents_have_declarat) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_only_XML_documents_have_declarat); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1006, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(8, 1006, __pyx_L1_error) /* "src/lxml/serializer.pxi":1005 @@ -155474,7 +144698,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_4write_declarati * raise LxmlSyntaxError("XML declaration already written") * version = _utf8orNone(version) */ - __Pyx_TraceLine(1007,0,__PYX_ERR(8, 1007, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_status >= __pyx_e_4lxml_5etree_WRITER_DECL_WRITTEN) != 0); if (unlikely(__pyx_t_1)) { @@ -155485,10 +144708,21 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_4write_declarati * version = _utf8orNone(version) * c_version = _xcstr(version) if version is not None else NULL */ - __Pyx_TraceLine(1008,0,__PYX_ERR(8, 1008, __pyx_L1_error)) - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1008, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__266, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1008, __pyx_L1_error) + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_XML_declaration_already_written) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_XML_declaration_already_written); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); @@ -155511,7 +144745,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_4write_declarati * c_version = _xcstr(version) if version is not None else NULL * doctype = _utf8orNone(doctype) */ - __Pyx_TraceLine(1009,0,__PYX_ERR(8, 1009, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__utf8orNone(__pyx_v_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1009, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_version, __pyx_t_2); @@ -155524,14 +144757,13 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_4write_declarati * doctype = _utf8orNone(doctype) * if standalone is None: */ - __Pyx_TraceLine(1010,0,__PYX_ERR(8, 1010, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_version != Py_None); if ((__pyx_t_1 != 0)) { - __pyx_t_4 = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_version); + __pyx_t_5 = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_version); } else { - __pyx_t_4 = NULL; + __pyx_t_5 = NULL; } - __pyx_v_c_version = __pyx_t_4; + __pyx_v_c_version = __pyx_t_5; /* "src/lxml/serializer.pxi":1011 * version = _utf8orNone(version) @@ -155540,7 +144772,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_4write_declarati * if standalone is None: * c_standalone = -1 */ - __Pyx_TraceLine(1011,0,__PYX_ERR(8, 1011, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__utf8orNone(__pyx_v_doctype); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_doctype, __pyx_t_2); @@ -155553,10 +144784,9 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_4write_declarati * c_standalone = -1 * else: */ - __Pyx_TraceLine(1012,0,__PYX_ERR(8, 1012, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_standalone == Py_None); - __pyx_t_5 = (__pyx_t_1 != 0); - if (__pyx_t_5) { + __pyx_t_6 = (__pyx_t_1 != 0); + if (__pyx_t_6) { /* "src/lxml/serializer.pxi":1013 * doctype = _utf8orNone(doctype) @@ -155565,7 +144795,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_4write_declarati * else: * c_standalone = 1 if standalone else 0 */ - __Pyx_TraceLine(1013,0,__PYX_ERR(8, 1013, __pyx_L1_error)) __pyx_v_c_standalone = -1; /* "src/lxml/serializer.pxi":1012 @@ -155585,15 +144814,14 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_4write_declarati * _writeDeclarationToBuffer(self._c_out, c_version, self._c_encoding, c_standalone) * if doctype is not None: */ - __Pyx_TraceLine(1015,0,__PYX_ERR(8, 1015, __pyx_L1_error)) /*else*/ { - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_standalone); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(8, 1015, __pyx_L1_error) - if (__pyx_t_5) { - __pyx_t_6 = 1; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_standalone); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(8, 1015, __pyx_L1_error) + if (__pyx_t_6) { + __pyx_t_7 = 1; } else { - __pyx_t_6 = 0; + __pyx_t_7 = 0; } - __pyx_v_c_standalone = __pyx_t_6; + __pyx_v_c_standalone = __pyx_t_7; } __pyx_L5:; @@ -155604,7 +144832,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_4write_declarati * if doctype is not None: * _writeDoctype(self._c_out, _xcstr(doctype)) */ - __Pyx_TraceLine(1016,0,__PYX_ERR(8, 1016, __pyx_L1_error)) __pyx_f_4lxml_5etree__writeDeclarationToBuffer(__pyx_v_self->_c_out, __pyx_v_c_version, __pyx_v_self->_c_encoding, __pyx_v_c_standalone); /* "src/lxml/serializer.pxi":1017 @@ -155614,9 +144841,8 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_4write_declarati * _writeDoctype(self._c_out, _xcstr(doctype)) * self._status = WRITER_DTD_WRITTEN */ - __Pyx_TraceLine(1017,0,__PYX_ERR(8, 1017, __pyx_L1_error)) - __pyx_t_5 = (__pyx_v_doctype != Py_None); - __pyx_t_1 = (__pyx_t_5 != 0); + __pyx_t_6 = (__pyx_v_doctype != Py_None); + __pyx_t_1 = (__pyx_t_6 != 0); if (__pyx_t_1) { /* "src/lxml/serializer.pxi":1018 @@ -155626,7 +144852,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_4write_declarati * self._status = WRITER_DTD_WRITTEN * else: */ - __Pyx_TraceLine(1018,0,__PYX_ERR(8, 1018, __pyx_L1_error)) __pyx_f_4lxml_5etree__writeDoctype(__pyx_v_self->_c_out, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_doctype)); /* "src/lxml/serializer.pxi":1019 @@ -155636,7 +144861,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_4write_declarati * else: * self._status = WRITER_DECL_WRITTEN */ - __Pyx_TraceLine(1019,0,__PYX_ERR(8, 1019, __pyx_L1_error)) __pyx_v_self->_status = __pyx_e_4lxml_5etree_WRITER_DTD_WRITTEN; /* "src/lxml/serializer.pxi":1017 @@ -155656,7 +144880,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_4write_declarati * if not self._buffered: * tree.xmlOutputBufferFlush(self._c_out) */ - __Pyx_TraceLine(1021,0,__PYX_ERR(8, 1021, __pyx_L1_error)) /*else*/ { __pyx_v_self->_status = __pyx_e_4lxml_5etree_WRITER_DECL_WRITTEN; } @@ -155669,7 +144892,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_4write_declarati * tree.xmlOutputBufferFlush(self._c_out) * self._handle_error(self._c_out.error) */ - __Pyx_TraceLine(1022,0,__PYX_ERR(8, 1022, __pyx_L1_error)) __pyx_t_1 = ((!(__pyx_v_self->_buffered != 0)) != 0); if (__pyx_t_1) { @@ -155680,7 +144902,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_4write_declarati * self._handle_error(self._c_out.error) * */ - __Pyx_TraceLine(1023,0,__PYX_ERR(8, 1023, __pyx_L1_error)) (void)(xmlOutputBufferFlush(__pyx_v_self->_c_out)); /* "src/lxml/serializer.pxi":1022 @@ -155699,7 +144920,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_4write_declarati * * def write_doctype(self, doctype): */ - __Pyx_TraceLine(1024,0,__PYX_ERR(8, 1024, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree_22_IncrementalFileWriter__handle_error(__pyx_v_self, __pyx_v_self->_c_out->error); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1024, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -155718,13 +144938,13 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_4write_declarati __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("lxml.etree._IncrementalFileWriter.write_declaration", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_version); __Pyx_XDECREF(__pyx_v_doctype); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -155754,15 +144974,13 @@ static PyObject *__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_7write_doctype(P static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_6write_doctype(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *__pyx_v_self, PyObject *__pyx_v_doctype) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__267) + PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("write_doctype", 0); - __Pyx_TraceCall("write_doctype", __pyx_f[8], 1026, 0, __PYX_ERR(8, 1026, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_doctype); /* "src/lxml/serializer.pxi":1031 @@ -155772,7 +144990,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_6write_doctype(s * if doctype is None: * return */ - __Pyx_TraceLine(1031,0,__PYX_ERR(8, 1031, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_self->_c_out != NULL) != 0))) { @@ -155789,7 +145006,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_6write_doctype(s * return * if self._status >= WRITER_DTD_WRITTEN: */ - __Pyx_TraceLine(1032,0,__PYX_ERR(8, 1032, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_doctype == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -155801,7 +145017,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_6write_doctype(s * if self._status >= WRITER_DTD_WRITTEN: * raise LxmlSyntaxError("DOCTYPE already written or cannot write it here") */ - __Pyx_TraceLine(1033,0,__PYX_ERR(8, 1033, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -155822,7 +145037,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_6write_doctype(s * raise LxmlSyntaxError("DOCTYPE already written or cannot write it here") * doctype = _utf8(doctype) */ - __Pyx_TraceLine(1034,0,__PYX_ERR(8, 1034, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->_status >= __pyx_e_4lxml_5etree_WRITER_DTD_WRITTEN) != 0); if (unlikely(__pyx_t_2)) { @@ -155833,14 +145047,25 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_6write_doctype(s * doctype = _utf8(doctype) * _writeDoctype(self._c_out, _xcstr(doctype)) */ - __Pyx_TraceLine(1035,0,__PYX_ERR(8, 1035, __pyx_L1_error)) - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1035, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__268, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 1035, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 1035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_DOCTYPE_already_written_or_canno) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_DOCTYPE_already_written_or_canno); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1035, __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(8, 1035, __pyx_L1_error) /* "src/lxml/serializer.pxi":1034 @@ -155859,11 +145084,10 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_6write_doctype(s * _writeDoctype(self._c_out, _xcstr(doctype)) * self._status = WRITER_DTD_WRITTEN */ - __Pyx_TraceLine(1036,0,__PYX_ERR(8, 1036, __pyx_L1_error)) - __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_v_doctype); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 1036, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF_SET(__pyx_v_doctype, __pyx_t_4); - __pyx_t_4 = 0; + __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_doctype); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1036, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_doctype, __pyx_t_3); + __pyx_t_3 = 0; /* "src/lxml/serializer.pxi":1037 * raise LxmlSyntaxError("DOCTYPE already written or cannot write it here") @@ -155872,7 +145096,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_6write_doctype(s * self._status = WRITER_DTD_WRITTEN * if not self._buffered: */ - __Pyx_TraceLine(1037,0,__PYX_ERR(8, 1037, __pyx_L1_error)) __pyx_f_4lxml_5etree__writeDoctype(__pyx_v_self->_c_out, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_doctype)); /* "src/lxml/serializer.pxi":1038 @@ -155882,7 +145105,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_6write_doctype(s * if not self._buffered: * tree.xmlOutputBufferFlush(self._c_out) */ - __Pyx_TraceLine(1038,0,__PYX_ERR(8, 1038, __pyx_L1_error)) __pyx_v_self->_status = __pyx_e_4lxml_5etree_WRITER_DTD_WRITTEN; /* "src/lxml/serializer.pxi":1039 @@ -155892,7 +145114,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_6write_doctype(s * tree.xmlOutputBufferFlush(self._c_out) * self._handle_error(self._c_out.error) */ - __Pyx_TraceLine(1039,0,__PYX_ERR(8, 1039, __pyx_L1_error)) __pyx_t_2 = ((!(__pyx_v_self->_buffered != 0)) != 0); if (__pyx_t_2) { @@ -155903,7 +145124,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_6write_doctype(s * self._handle_error(self._c_out.error) * */ - __Pyx_TraceLine(1040,0,__PYX_ERR(8, 1040, __pyx_L1_error)) (void)(xmlOutputBufferFlush(__pyx_v_self->_c_out)); /* "src/lxml/serializer.pxi":1039 @@ -155922,10 +145142,9 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_6write_doctype(s * * def method(self, method): */ - __Pyx_TraceLine(1041,0,__PYX_ERR(8, 1041, __pyx_L1_error)) - __pyx_t_4 = __pyx_f_4lxml_5etree_22_IncrementalFileWriter__handle_error(__pyx_v_self, __pyx_v_self->_c_out->error); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 1041, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = __pyx_f_4lxml_5etree_22_IncrementalFileWriter__handle_error(__pyx_v_self, __pyx_v_self->_c_out->error); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1041, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/lxml/serializer.pxi":1026 * self._handle_error(self._c_out.error) @@ -155941,12 +145160,12 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_6write_doctype(s __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("lxml.etree._IncrementalFileWriter.write_doctype", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_doctype); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -155977,16 +145196,13 @@ static PyObject *__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_9method(PyObject static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_8method(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *__pyx_v_self, PyObject *__pyx_v_method) { int __pyx_v_c_method; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__269) __Pyx_RefNannySetupContext("method", 0); - __Pyx_TraceCall("method", __pyx_f[8], 1043, 0, __PYX_ERR(8, 1043, __pyx_L1_error)); /* "src/lxml/serializer.pxi":1049 * method is one of (None, 'xml', 'html') where None means 'xml'. @@ -155995,7 +145211,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_8method(struct _ * c_method = self._method if method is None else _findOutputMethod(method) * return _MethodChanger(self, c_method) */ - __Pyx_TraceLine(1049,0,__PYX_ERR(8, 1049, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_self->_c_out != NULL) != 0))) { @@ -156012,7 +145227,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_8method(struct _ * return _MethodChanger(self, c_method) * */ - __Pyx_TraceLine(1050,0,__PYX_ERR(8, 1050, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_method == Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = __pyx_v_self->_method; @@ -156029,7 +145243,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_8method(struct _ * * def element(self, tag, attrib=None, nsmap=None, method=None, **_extra): */ - __Pyx_TraceLine(1051,0,__PYX_ERR(8, 1051, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_c_method); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 1051, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -156064,7 +145277,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_8method(struct _ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -156080,7 +145292,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_8method(struct _ /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_11element(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_22_IncrementalFileWriter_10element[] = "element(self, tag, attrib=None, nsmap=None, method, **_extra)\n\n Returns a context manager that writes an opening and closing tag.\n method is one of (None, 'xml', 'html') where None means 'xml'.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_22_IncrementalFileWriter_11element = {"element", (PyCFunction)__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_11element, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_22_IncrementalFileWriter_10element}; +static PyMethodDef __pyx_mdef_4lxml_5etree_22_IncrementalFileWriter_11element = {"element", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_11element, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_22_IncrementalFileWriter_10element}; static PyObject *__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_11element(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tag = 0; PyObject *__pyx_v_attrib = 0; @@ -156184,7 +145396,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct PyObject *__pyx_v_prefix = NULL; int __pyx_v_c_method; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -156200,9 +145411,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct Py_ssize_t __pyx_t_12; int __pyx_t_13; int __pyx_t_14; - __Pyx_TraceFrameInit(__pyx_codeobj__270) __Pyx_RefNannySetupContext("element", 0); - __Pyx_TraceCall("element", __pyx_f[8], 1053, 0, __PYX_ERR(8, 1053, __pyx_L1_error)); /* "src/lxml/serializer.pxi":1059 * method is one of (None, 'xml', 'html') where None means 'xml'. @@ -156211,7 +145420,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct * attributes = [] * if attrib is not None: */ - __Pyx_TraceLine(1059,0,__PYX_ERR(8, 1059, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_self->_c_out != NULL) != 0))) { @@ -156228,7 +145436,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct * if attrib is not None: * for name, value in _iter_attrib(attrib): */ - __Pyx_TraceLine(1060,0,__PYX_ERR(8, 1060, __pyx_L1_error)) __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_attributes = ((PyObject*)__pyx_t_1); @@ -156241,7 +145448,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct * for name, value in _iter_attrib(attrib): * if name not in _extra: */ - __Pyx_TraceLine(1061,0,__PYX_ERR(8, 1061, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_attrib != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -156253,7 +145459,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct * if name not in _extra: * ns, name = _getNsTag(name) */ - __Pyx_TraceLine(1062,0,__PYX_ERR(8, 1062, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__iter_attrib(__pyx_v_attrib); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { @@ -156354,7 +145559,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct * ns, name = _getNsTag(name) * attributes.append((ns, name, _utf8(value))) */ - __Pyx_TraceLine(1063,0,__PYX_ERR(8, 1063, __pyx_L1_error)) __pyx_t_3 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v__extra, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(8, 1063, __pyx_L1_error) __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { @@ -156366,7 +145570,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct * attributes.append((ns, name, _utf8(value))) * if _extra: */ - __Pyx_TraceLine(1064,0,__PYX_ERR(8, 1064, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(__pyx_t_1 != Py_None)) { @@ -156404,7 +145607,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct * if _extra: * for name, value in _extra.iteritems(): */ - __Pyx_TraceLine(1065,0,__PYX_ERR(8, 1065, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(8, 1065, __pyx_L1_error) @@ -156437,7 +145639,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct * if name not in _extra: * ns, name = _getNsTag(name) */ - __Pyx_TraceLine(1062,0,__PYX_ERR(8, 1062, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -156457,7 +145658,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct * for name, value in _extra.iteritems(): * ns, name = _getNsTag(name) */ - __Pyx_TraceLine(1066,0,__PYX_ERR(8, 1066, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__extra); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(8, 1066, __pyx_L1_error) if (__pyx_t_2) { @@ -156468,7 +145668,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct * ns, name = _getNsTag(name) * attributes.append((ns, name, _utf8(value))) */ - __Pyx_TraceLine(1067,0,__PYX_ERR(8, 1067, __pyx_L1_error)) __pyx_t_5 = 0; __pyx_t_7 = __Pyx_dict_iterator(__pyx_v__extra, 1, __pyx_n_s_iteritems, (&__pyx_t_12), (&__pyx_t_13)); if (unlikely(!__pyx_t_7)) __PYX_ERR(8, 1067, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); @@ -156493,7 +145692,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct * attributes.append((ns, name, _utf8(value))) * reversed_nsmap = {} */ - __Pyx_TraceLine(1068,0,__PYX_ERR(8, 1068, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(__pyx_t_1 != Py_None)) { @@ -156531,7 +145729,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct * reversed_nsmap = {} * if nsmap: */ - __Pyx_TraceLine(1069,0,__PYX_ERR(8, 1069, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 1069, __pyx_L1_error) @@ -156566,7 +145763,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct * if nsmap: * for prefix, ns in nsmap.items(): */ - __Pyx_TraceLine(1070,0,__PYX_ERR(8, 1070, __pyx_L1_error)) __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 1070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_reversed_nsmap = ((PyObject*)__pyx_t_4); @@ -156579,7 +145775,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct * for prefix, ns in nsmap.items(): * if prefix is not None: */ - __Pyx_TraceLine(1071,0,__PYX_ERR(8, 1071, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_nsmap); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(8, 1071, __pyx_L1_error) if (__pyx_t_2) { @@ -156590,7 +145785,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct * if prefix is not None: * prefix = _utf8(prefix) */ - __Pyx_TraceLine(1072,0,__PYX_ERR(8, 1072, __pyx_L1_error)) __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_nsmap, __pyx_n_s_items); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 1072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = NULL; @@ -156603,12 +145797,9 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct __Pyx_DECREF_SET(__pyx_t_8, function); } } - if (__pyx_t_1) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 1072, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 1072, __pyx_L1_error) - } + __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 1072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { @@ -156709,7 +145900,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct * prefix = _utf8(prefix) * _prefixValidOrRaise(prefix) */ - __Pyx_TraceLine(1073,0,__PYX_ERR(8, 1073, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_prefix != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -156721,7 +145911,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct * _prefixValidOrRaise(prefix) * reversed_nsmap[_utf8(ns)] = prefix */ - __Pyx_TraceLine(1074,0,__PYX_ERR(8, 1074, __pyx_L1_error)) __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_v_prefix); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 1074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_4); @@ -156734,7 +145923,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct * reversed_nsmap[_utf8(ns)] = prefix * ns, name = _getNsTag(tag) */ - __Pyx_TraceLine(1075,0,__PYX_ERR(8, 1075, __pyx_L1_error)) __pyx_t_13 = __pyx_f_4lxml_5etree__prefixValidOrRaise(__pyx_v_prefix); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(8, 1075, __pyx_L1_error) /* "src/lxml/serializer.pxi":1073 @@ -156753,7 +145941,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct * ns, name = _getNsTag(tag) * */ - __Pyx_TraceLine(1076,0,__PYX_ERR(8, 1076, __pyx_L1_error)) __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_v_ns); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 1076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(PyDict_SetItem(__pyx_v_reversed_nsmap, __pyx_t_4, __pyx_v_prefix) < 0)) __PYX_ERR(8, 1076, __pyx_L1_error) @@ -156766,7 +145953,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct * if prefix is not None: * prefix = _utf8(prefix) */ - __Pyx_TraceLine(1072,0,__PYX_ERR(8, 1072, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -156786,7 +145972,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct * * c_method = self._method if method is None else _findOutputMethod(method) */ - __Pyx_TraceLine(1077,0,__PYX_ERR(8, 1077, __pyx_L1_error)) __pyx_t_8 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_tag); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 1077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (likely(__pyx_t_8 != Py_None)) { @@ -156824,7 +146009,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct * * return _FileWriterElement(self, (ns, name, attributes, reversed_nsmap), c_method) */ - __Pyx_TraceLine(1079,0,__PYX_ERR(8, 1079, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_method == Py_None); if ((__pyx_t_3 != 0)) { __pyx_t_13 = __pyx_v_self->_method; @@ -156841,7 +146025,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct * * cdef _write_qname(self, bytes name, bytes prefix): */ - __Pyx_TraceLine(1081,0,__PYX_ERR(8, 1081, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 1081, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); @@ -156902,7 +146085,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct __Pyx_XDECREF(__pyx_v_reversed_nsmap); __Pyx_XDECREF(__pyx_v_prefix); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -156917,12 +146099,10 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_10element(struct static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_qname(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_prefix) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; Py_ssize_t __pyx_t_2; __Pyx_RefNannySetupContext("_write_qname", 0); - __Pyx_TraceCall("_write_qname", __pyx_f[8], 1083, 0, __PYX_ERR(8, 1083, __pyx_L1_error)); /* "src/lxml/serializer.pxi":1084 * @@ -156931,7 +146111,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_qname(stru * tree.xmlOutputBufferWrite(self._c_out, len(prefix), _cstr(prefix)) * tree.xmlOutputBufferWrite(self._c_out, 1, ':') */ - __Pyx_TraceLine(1084,0,__PYX_ERR(8, 1084, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_prefix != Py_None)&&(PyBytes_GET_SIZE(__pyx_v_prefix) != 0); if (__pyx_t_1) { @@ -156942,7 +146121,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_qname(stru * tree.xmlOutputBufferWrite(self._c_out, 1, ':') * tree.xmlOutputBufferWrite(self._c_out, len(name), _cstr(name)) */ - __Pyx_TraceLine(1085,0,__PYX_ERR(8, 1085, __pyx_L1_error)) if (unlikely(__pyx_v_prefix == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(8, 1085, __pyx_L1_error) @@ -156957,7 +146135,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_qname(stru * tree.xmlOutputBufferWrite(self._c_out, len(name), _cstr(name)) * */ - __Pyx_TraceLine(1086,0,__PYX_ERR(8, 1086, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_self->_c_out, 1, ((const char *)":"))); /* "src/lxml/serializer.pxi":1084 @@ -156976,7 +146153,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_qname(stru * * cdef _write_start_element(self, element_config): */ - __Pyx_TraceLine(1087,0,__PYX_ERR(8, 1087, __pyx_L1_error)) if (unlikely(__pyx_v_name == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(8, 1087, __pyx_L1_error) @@ -157000,7 +146176,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_qname(stru __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -157022,7 +146197,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_elem PyObject *__pyx_v_new_namespaces = NULL; PyObject *__pyx_v_prefix = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -157033,7 +146207,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_elem PyObject *(*__pyx_t_7)(PyObject *); int __pyx_t_8; __Pyx_RefNannySetupContext("_write_start_element", 0); - __Pyx_TraceCall("_write_start_element", __pyx_f[8], 1089, 0, __PYX_ERR(8, 1089, __pyx_L1_error)); /* "src/lxml/serializer.pxi":1090 * @@ -157042,7 +146215,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_elem * raise LxmlSyntaxError("cannot append trailing element to complete XML document") * ns, name, attributes, nsmap = element_config */ - __Pyx_TraceLine(1090,0,__PYX_ERR(8, 1090, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_status > __pyx_e_4lxml_5etree_WRITER_IN_ELEMENT) != 0); if (unlikely(__pyx_t_1)) { @@ -157053,14 +146225,25 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_elem * ns, name, attributes, nsmap = element_config * flat_namespace_map, new_namespaces = self._collect_namespaces(nsmap) */ - __Pyx_TraceLine(1091,0,__PYX_ERR(8, 1091, __pyx_L1_error)) - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1091, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__271, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1091, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1091, __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_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_cannot_append_trailing_element_t) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_cannot_append_trailing_element_t); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1091, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(8, 1091, __pyx_L1_error) /* "src/lxml/serializer.pxi":1090 @@ -157079,7 +146262,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_elem * flat_namespace_map, new_namespaces = self._collect_namespaces(nsmap) * prefix = self._find_prefix(ns, flat_namespace_map, new_namespaces) */ - __Pyx_TraceLine(1092,0,__PYX_ERR(8, 1092, __pyx_L1_error)) if ((likely(PyTuple_CheckExact(__pyx_v_element_config))) || (PyList_CheckExact(__pyx_v_element_config))) { PyObject* sequence = __pyx_v_element_config; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); @@ -157090,24 +146272,24 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_elem } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 3); } else { - __pyx_t_3 = PyList_GET_ITEM(sequence, 0); - __pyx_t_2 = PyList_GET_ITEM(sequence, 1); + __pyx_t_2 = PyList_GET_ITEM(sequence, 0); + __pyx_t_3 = PyList_GET_ITEM(sequence, 1); __pyx_t_4 = PyList_GET_ITEM(sequence, 2); __pyx_t_5 = PyList_GET_ITEM(sequence, 3); } - __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else { Py_ssize_t i; - PyObject** temps[4] = {&__pyx_t_3,&__pyx_t_2,&__pyx_t_4,&__pyx_t_5}; + PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5}; for (i=0; i < 4; i++) { PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(8, 1092, __pyx_L1_error) __Pyx_GOTREF(item); @@ -157117,7 +146299,7 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_elem #endif } else { Py_ssize_t index = -1; - PyObject** temps[4] = {&__pyx_t_3,&__pyx_t_2,&__pyx_t_4,&__pyx_t_5}; + PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5}; __pyx_t_6 = PyObject_GetIter(__pyx_v_element_config); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 1092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; @@ -157137,10 +146319,10 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_elem __PYX_ERR(8, 1092, __pyx_L1_error) __pyx_L5_unpacking_done:; } - __pyx_v_ns = __pyx_t_3; - __pyx_t_3 = 0; - __pyx_v_name = __pyx_t_2; + __pyx_v_ns = __pyx_t_2; __pyx_t_2 = 0; + __pyx_v_name = __pyx_t_3; + __pyx_t_3 = 0; __pyx_v_attributes = __pyx_t_4; __pyx_t_4 = 0; __pyx_v_nsmap = __pyx_t_5; @@ -157153,7 +146335,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_elem * prefix = self._find_prefix(ns, flat_namespace_map, new_namespaces) * tree.xmlOutputBufferWrite(self._c_out, 1, '<') */ - __Pyx_TraceLine(1093,0,__PYX_ERR(8, 1093, __pyx_L1_error)) if (!(likely(PyDict_CheckExact(__pyx_v_nsmap))||((__pyx_v_nsmap) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_nsmap)->tp_name), 0))) __PYX_ERR(8, 1093, __pyx_L1_error) __pyx_t_5 = __pyx_f_4lxml_5etree_22_IncrementalFileWriter__collect_namespaces(__pyx_v_self, ((PyObject*)__pyx_v_nsmap)); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 1093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -157168,36 +146349,36 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_elem #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_4 = PyList_GET_ITEM(sequence, 0); - __pyx_t_2 = PyList_GET_ITEM(sequence, 1); + __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); #else __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 1093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1093, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1093, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; - __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1093, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1093, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; - index = 0; __pyx_t_4 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed; + __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; + index = 0; __pyx_t_4 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed; - __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_3), 2) < 0) __PYX_ERR(8, 1093, __pyx_L1_error) + index = 1; __pyx_t_3 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_2), 2) < 0) __PYX_ERR(8, 1093, __pyx_L1_error) __pyx_t_7 = NULL; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L7_unpacking_done; __pyx_L6_unpacking_failed:; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(8, 1093, __pyx_L1_error) @@ -157205,8 +146386,8 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_elem } __pyx_v_flat_namespace_map = __pyx_t_4; __pyx_t_4 = 0; - __pyx_v_new_namespaces = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_v_new_namespaces = __pyx_t_3; + __pyx_t_3 = 0; /* "src/lxml/serializer.pxi":1094 * ns, name, attributes, nsmap = element_config @@ -157215,7 +146396,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_elem * tree.xmlOutputBufferWrite(self._c_out, 1, '<') * self._write_qname(name, prefix) */ - __Pyx_TraceLine(1094,0,__PYX_ERR(8, 1094, __pyx_L1_error)) if (!(likely(PyBytes_CheckExact(__pyx_v_ns))||((__pyx_v_ns) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_ns)->tp_name), 0))) __PYX_ERR(8, 1094, __pyx_L1_error) if (!(likely(PyDict_CheckExact(__pyx_v_flat_namespace_map))||((__pyx_v_flat_namespace_map) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_flat_namespace_map)->tp_name), 0))) __PYX_ERR(8, 1094, __pyx_L1_error) if (!(likely(PyList_CheckExact(__pyx_v_new_namespaces))||((__pyx_v_new_namespaces) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_new_namespaces)->tp_name), 0))) __PYX_ERR(8, 1094, __pyx_L1_error) @@ -157231,7 +146411,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_elem * self._write_qname(name, prefix) * */ - __Pyx_TraceLine(1095,0,__PYX_ERR(8, 1095, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_self->_c_out, 1, ((const char *)"<"))); /* "src/lxml/serializer.pxi":1096 @@ -157241,7 +146420,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_elem * * self._write_attributes_and_namespaces( */ - __Pyx_TraceLine(1096,0,__PYX_ERR(8, 1096, __pyx_L1_error)) if (!(likely(PyBytes_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_name)->tp_name), 0))) __PYX_ERR(8, 1096, __pyx_L1_error) if (!(likely(PyBytes_CheckExact(__pyx_v_prefix))||((__pyx_v_prefix) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_prefix)->tp_name), 0))) __PYX_ERR(8, 1096, __pyx_L1_error) __pyx_t_5 = __pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_qname(__pyx_v_self, ((PyObject*)__pyx_v_name), ((PyObject*)__pyx_v_prefix)); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 1096, __pyx_L1_error) @@ -157255,7 +146433,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_elem * * tree.xmlOutputBufferWrite(self._c_out, 1, '>') */ - __Pyx_TraceLine(1099,0,__PYX_ERR(8, 1099, __pyx_L1_error)) if (!(likely(PyList_CheckExact(__pyx_v_attributes))||((__pyx_v_attributes) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_attributes)->tp_name), 0))) __PYX_ERR(8, 1099, __pyx_L1_error) if (!(likely(PyDict_CheckExact(__pyx_v_flat_namespace_map))||((__pyx_v_flat_namespace_map) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_flat_namespace_map)->tp_name), 0))) __PYX_ERR(8, 1099, __pyx_L1_error) if (!(likely(PyList_CheckExact(__pyx_v_new_namespaces))||((__pyx_v_new_namespaces) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_new_namespaces)->tp_name), 0))) __PYX_ERR(8, 1099, __pyx_L1_error) @@ -157267,7 +146444,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_elem * attributes, flat_namespace_map, new_namespaces) * */ - __Pyx_TraceLine(1098,0,__PYX_ERR(8, 1098, __pyx_L1_error)) __pyx_t_5 = __pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes_and_namespaces(__pyx_v_self, ((PyObject*)__pyx_v_attributes), ((PyObject*)__pyx_v_flat_namespace_map), ((PyObject*)__pyx_v_new_namespaces)); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 1098, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -157279,7 +146455,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_elem * if not self._buffered: * tree.xmlOutputBufferFlush(self._c_out) */ - __Pyx_TraceLine(1101,0,__PYX_ERR(8, 1101, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_self->_c_out, 1, ((const char *)">"))); /* "src/lxml/serializer.pxi":1102 @@ -157289,7 +146464,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_elem * tree.xmlOutputBufferFlush(self._c_out) * self._handle_error(self._c_out.error) */ - __Pyx_TraceLine(1102,0,__PYX_ERR(8, 1102, __pyx_L1_error)) __pyx_t_1 = ((!(__pyx_v_self->_buffered != 0)) != 0); if (__pyx_t_1) { @@ -157300,7 +146474,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_elem * self._handle_error(self._c_out.error) * */ - __Pyx_TraceLine(1103,0,__PYX_ERR(8, 1103, __pyx_L1_error)) (void)(xmlOutputBufferFlush(__pyx_v_self->_c_out)); /* "src/lxml/serializer.pxi":1102 @@ -157319,7 +146492,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_elem * * self._element_stack.append((ns, name, prefix, flat_namespace_map)) */ - __Pyx_TraceLine(1104,0,__PYX_ERR(8, 1104, __pyx_L1_error)) __pyx_t_5 = __pyx_f_4lxml_5etree_22_IncrementalFileWriter__handle_error(__pyx_v_self, __pyx_v_self->_c_out->error); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 1104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -157331,7 +146503,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_elem * self._status = WRITER_IN_ELEMENT * */ - __Pyx_TraceLine(1106,0,__PYX_ERR(8, 1106, __pyx_L1_error)) if (unlikely(__pyx_v_self->_element_stack == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); __PYX_ERR(8, 1106, __pyx_L1_error) @@ -157360,7 +146531,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_elem * * cdef _write_attributes_and_namespaces(self, list attributes, */ - __Pyx_TraceLine(1107,0,__PYX_ERR(8, 1107, __pyx_L1_error)) __pyx_v_self->_status = __pyx_e_4lxml_5etree_WRITER_IN_ELEMENT; /* "src/lxml/serializer.pxi":1089 @@ -157391,7 +146561,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_elem __Pyx_XDECREF(__pyx_v_new_namespaces); __Pyx_XDECREF(__pyx_v_prefix); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -157409,7 +146578,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes PyObject *__pyx_v_name = NULL; PyObject *__pyx_v_value = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -157423,7 +146591,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes PyObject *(*__pyx_t_10)(PyObject *); int __pyx_t_11; __Pyx_RefNannySetupContext("_write_attributes_and_namespaces", 0); - __Pyx_TraceCall("_write_attributes_and_namespaces", __pyx_f[8], 1109, 0, __PYX_ERR(8, 1109, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_attributes); /* "src/lxml/serializer.pxi":1112 @@ -157433,7 +146600,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes * # _find_prefix() may append to new_namespaces => build them first * attributes = [ */ - __Pyx_TraceLine(1112,0,__PYX_ERR(8, 1112, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_attributes != Py_None)&&(PyList_GET_SIZE(__pyx_v_attributes) != 0); if (__pyx_t_1) { @@ -157444,7 +146610,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes * (self._find_prefix(ns, flat_namespace_map, new_namespaces), name, value) * for ns, name, value in attributes ] */ - __Pyx_TraceLine(1114,0,__PYX_ERR(8, 1114, __pyx_L1_error)) __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -157455,7 +146620,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes * if new_namespaces: * new_namespaces.sort() */ - __Pyx_TraceLine(1116,0,__PYX_ERR(8, 1116, __pyx_L1_error)) if (unlikely(__pyx_v_attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(8, 1116, __pyx_L1_error) @@ -157536,7 +146700,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes * for ns, name, value in attributes ] * if new_namespaces: */ - __Pyx_TraceLine(1115,0,__PYX_ERR(8, 1115, __pyx_L1_error)) if (!(likely(PyBytes_CheckExact(__pyx_v_ns))||((__pyx_v_ns) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_ns)->tp_name), 0))) __PYX_ERR(8, 1115, __pyx_L1_error) __pyx_t_5 = __pyx_f_4lxml_5etree_22_IncrementalFileWriter__find_prefix(__pyx_v_self, ((PyObject*)__pyx_v_ns), __pyx_v_flat_namespace_map, __pyx_v_new_namespaces); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 1115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -157561,7 +146724,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes * if new_namespaces: * new_namespaces.sort() */ - __Pyx_TraceLine(1116,0,__PYX_ERR(8, 1116, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_attributes, ((PyObject*)__pyx_t_2)); @@ -157583,7 +146745,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes * new_namespaces.sort() * self._write_attributes_list(new_namespaces) */ - __Pyx_TraceLine(1117,0,__PYX_ERR(8, 1117, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_new_namespaces != Py_None)&&(PyList_GET_SIZE(__pyx_v_new_namespaces) != 0); if (__pyx_t_1) { @@ -157594,7 +146755,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes * self._write_attributes_list(new_namespaces) * if attributes: */ - __Pyx_TraceLine(1118,0,__PYX_ERR(8, 1118, __pyx_L1_error)) if (unlikely(__pyx_v_new_namespaces == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sort"); __PYX_ERR(8, 1118, __pyx_L1_error) @@ -157608,7 +146768,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes * if attributes: * self._write_attributes_list(attributes) */ - __Pyx_TraceLine(1119,0,__PYX_ERR(8, 1119, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes_list(__pyx_v_self, __pyx_v_new_namespaces); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -157629,7 +146788,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes * self._write_attributes_list(attributes) * */ - __Pyx_TraceLine(1120,0,__PYX_ERR(8, 1120, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_attributes != Py_None)&&(PyList_GET_SIZE(__pyx_v_attributes) != 0); if (__pyx_t_1) { @@ -157640,7 +146798,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes * * cdef _write_attributes_list(self, list attributes): */ - __Pyx_TraceLine(1121,0,__PYX_ERR(8, 1121, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes_list(__pyx_v_self, __pyx_v_attributes); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -157681,7 +146838,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes __Pyx_XDECREF(__pyx_v_value); __Pyx_XDECREF(__pyx_v_attributes); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -157699,7 +146855,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes PyObject *__pyx_v_name = NULL; PyObject *__pyx_v_value = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; @@ -157710,7 +146865,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes PyObject *__pyx_t_7 = NULL; PyObject *(*__pyx_t_8)(PyObject *); __Pyx_RefNannySetupContext("_write_attributes_list", 0); - __Pyx_TraceCall("_write_attributes_list", __pyx_f[8], 1123, 0, __PYX_ERR(8, 1123, __pyx_L1_error)); /* "src/lxml/serializer.pxi":1124 * @@ -157719,7 +146873,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes * tree.xmlOutputBufferWrite(self._c_out, 1, ' ') * self._write_qname(name, prefix) */ - __Pyx_TraceLine(1124,0,__PYX_ERR(8, 1124, __pyx_L1_error)) if (unlikely(__pyx_v_attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(8, 1124, __pyx_L1_error) @@ -157800,7 +146953,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes * self._write_qname(name, prefix) * tree.xmlOutputBufferWrite(self._c_out, 2, '="') */ - __Pyx_TraceLine(1125,0,__PYX_ERR(8, 1125, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_self->_c_out, 1, ((const char *)" "))); /* "src/lxml/serializer.pxi":1126 @@ -157810,7 +146962,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes * tree.xmlOutputBufferWrite(self._c_out, 2, '="') * _write_attr_string(self._c_out, _cstr(value)) */ - __Pyx_TraceLine(1126,0,__PYX_ERR(8, 1126, __pyx_L1_error)) if (!(likely(PyBytes_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_name)->tp_name), 0))) __PYX_ERR(8, 1126, __pyx_L1_error) if (!(likely(PyBytes_CheckExact(__pyx_v_prefix))||((__pyx_v_prefix) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_prefix)->tp_name), 0))) __PYX_ERR(8, 1126, __pyx_L1_error) __pyx_t_3 = __pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_qname(__pyx_v_self, ((PyObject*)__pyx_v_name), ((PyObject*)__pyx_v_prefix)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1126, __pyx_L1_error) @@ -157824,7 +146975,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes * _write_attr_string(self._c_out, _cstr(value)) * */ - __Pyx_TraceLine(1127,0,__PYX_ERR(8, 1127, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_self->_c_out, 2, ((const char *)"=\""))); /* "src/lxml/serializer.pxi":1128 @@ -157834,7 +146984,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes * * tree.xmlOutputBufferWrite(self._c_out, 1, '"') */ - __Pyx_TraceLine(1128,0,__PYX_ERR(8, 1128, __pyx_L1_error)) __pyx_t_3 = __pyx_f_4lxml_5etree__write_attr_string(__pyx_v_self->_c_out, PyBytes_AS_STRING(__pyx_v_value)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -157846,7 +146995,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes * * cdef _write_end_element(self, element_config): */ - __Pyx_TraceLine(1130,0,__PYX_ERR(8, 1130, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_self->_c_out, 1, ((const char *)"\""))); /* "src/lxml/serializer.pxi":1124 @@ -157856,7 +147004,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes * tree.xmlOutputBufferWrite(self._c_out, 1, ' ') * self._write_qname(name, prefix) */ - __Pyx_TraceLine(1124,0,__PYX_ERR(8, 1124, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -157885,7 +147032,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_value); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -157903,18 +147049,16 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_end_elemen PyObject *__pyx_v_name = NULL; PyObject *__pyx_v_prefix = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; + PyObject *__pyx_t_4 = NULL; int __pyx_t_5; - PyObject *__pyx_t_6 = NULL; + int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *(*__pyx_t_8)(PyObject *); __Pyx_RefNannySetupContext("_write_end_element", 0); - __Pyx_TraceCall("_write_end_element", __pyx_f[8], 1132, 0, __PYX_ERR(8, 1132, __pyx_L1_error)); /* "src/lxml/serializer.pxi":1133 * @@ -157923,7 +147067,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_end_elemen * raise LxmlSyntaxError("not in an element") * if not self._element_stack or self._element_stack[-1][:2] != element_config[:2]: */ - __Pyx_TraceLine(1133,0,__PYX_ERR(8, 1133, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_status != __pyx_e_4lxml_5etree_WRITER_IN_ELEMENT) != 0); if (unlikely(__pyx_t_1)) { @@ -157934,14 +147077,25 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_end_elemen * if not self._element_stack or self._element_stack[-1][:2] != element_config[:2]: * raise LxmlSyntaxError("inconsistent exit action in context manager") */ - __Pyx_TraceLine(1134,0,__PYX_ERR(8, 1134, __pyx_L1_error)) - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1134, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__272, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1134, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1134, __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_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_not_in_an_element) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_not_in_an_element); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(8, 1134, __pyx_L1_error) /* "src/lxml/serializer.pxi":1133 @@ -157960,31 +147114,30 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_end_elemen * raise LxmlSyntaxError("inconsistent exit action in context manager") * */ - __Pyx_TraceLine(1135,0,__PYX_ERR(8, 1135, __pyx_L1_error)) - __pyx_t_4 = (__pyx_v_self->_element_stack != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_element_stack) != 0); - __pyx_t_5 = ((!__pyx_t_4) != 0); - if (!__pyx_t_5) { + __pyx_t_5 = (__pyx_v_self->_element_stack != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_element_stack) != 0); + __pyx_t_6 = ((!__pyx_t_5) != 0); + if (!__pyx_t_6) { } else { - __pyx_t_1 = __pyx_t_5; + __pyx_t_1 = __pyx_t_6; goto __pyx_L5_bool_binop_done; } if (unlikely(__pyx_v_self->_element_stack == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(8, 1135, __pyx_L1_error) } - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_self->_element_stack, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1135, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 2, NULL, NULL, &__pyx_slice__273, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1135, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->_element_stack, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_element_config, 0, 2, NULL, NULL, &__pyx_slice__274, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1135, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_2, 0, 2, NULL, NULL, &__pyx_slice__61, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 1135, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_element_config, 0, 2, NULL, NULL, &__pyx_slice__61, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 1135, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(8, 1135, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_1 = __pyx_t_5; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(8, 1135, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = __pyx_t_6; __pyx_L5_bool_binop_done:; if (unlikely(__pyx_t_1)) { @@ -157995,14 +147148,25 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_end_elemen * * # If previous write operations failed, the context manager exit might still call us. */ - __Pyx_TraceLine(1136,0,__PYX_ERR(8, 1136, __pyx_L1_error)) - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 1136, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__275, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1136, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_inconsistent_exit_action_in_cont) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_inconsistent_exit_action_in_cont); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 1136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(8, 1136, __pyx_L1_error) /* "src/lxml/serializer.pxi":1135 @@ -158021,11 +147185,10 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_end_elemen * * name, prefix = self._element_stack.pop()[1:3] */ - __Pyx_TraceLine(1141,0,__PYX_ERR(8, 1141, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_self->_c_out->error == XML_ERR_OK)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1141, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_v_ok_to_write = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_PyBool_FromLong((__pyx_v_self->_c_out->error == XML_ERR_OK)); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 1141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_ok_to_write = __pyx_t_4; + __pyx_t_4 = 0; /* "src/lxml/serializer.pxi":1143 * ok_to_write = self._c_out.error == xmlerror.XML_ERR_OK @@ -158034,18 +147197,17 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_end_elemen * if ok_to_write: * tree.xmlOutputBufferWrite(self._c_out, 2, '_element_stack == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop"); __PYX_ERR(8, 1143, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyList_Pop(__pyx_v_self->_element_stack); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1143, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_t_3, 1, 3, NULL, NULL, &__pyx_slice__276, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 1143, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { - PyObject* sequence = __pyx_t_6; + __pyx_t_4 = __Pyx_PyList_Pop(__pyx_v_self->_element_stack); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 1143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_4, 1, 3, NULL, NULL, &__pyx_slice__62, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { + PyObject* sequence = __pyx_t_2; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); @@ -158054,31 +147216,31 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_end_elemen } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { - __pyx_t_3 = PyList_GET_ITEM(sequence, 0); - __pyx_t_2 = PyList_GET_ITEM(sequence, 1); + __pyx_t_4 = PyList_GET_ITEM(sequence, 0); + __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); - __Pyx_INCREF(__pyx_t_2); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1143, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 1143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1143, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); #endif - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(8, 1143, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(8, 1143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; - index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L7_unpacking_failed; + index = 0; __pyx_t_4 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L7_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L7_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - index = 1; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L7_unpacking_failed; - __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(8, 1143, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -158090,10 +147252,10 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_end_elemen __PYX_ERR(8, 1143, __pyx_L1_error) __pyx_L8_unpacking_done:; } - __pyx_v_name = __pyx_t_3; + __pyx_v_name = __pyx_t_4; + __pyx_t_4 = 0; + __pyx_v_prefix = __pyx_t_3; __pyx_t_3 = 0; - __pyx_v_prefix = __pyx_t_2; - __pyx_t_2 = 0; /* "src/lxml/serializer.pxi":1144 * @@ -158102,7 +147264,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_end_elemen * tree.xmlOutputBufferWrite(self._c_out, 2, '') */ - __Pyx_TraceLine(1145,0,__PYX_ERR(8, 1145, __pyx_L1_error)) (void)(xmlOutputBufferWrite(__pyx_v_self->_c_out, 2, ((const char *)"') * */ - __Pyx_TraceLine(1146,0,__PYX_ERR(8, 1146, __pyx_L1_error)) if (!(likely(PyBytes_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_name)->tp_name), 0))) __PYX_ERR(8, 1146, __pyx_L1_error) if (!(likely(PyBytes_CheckExact(__pyx_v_prefix))||((__pyx_v_prefix) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_prefix)->tp_name), 0))) __PYX_ERR(8, 1146, __pyx_L1_error) - __pyx_t_6 = __pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_qname(__pyx_v_self, ((PyObject*)__pyx_v_name), ((PyObject*)__pyx_v_prefix)); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 1146, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = __pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_qname(__pyx_v_self, ((PyObject*)__pyx_v_name), ((PyObject*)__pyx_v_prefix)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/lxml/serializer.pxi":1147 * tree.xmlOutputBufferWrite(self._c_out, 2, '_c_out, 1, ((const char *)">"))); /* "src/lxml/serializer.pxi":1144 @@ -158156,10 +147314,9 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_end_elemen * self._status = WRITER_FINISHED * if ok_to_write: */ - __Pyx_TraceLine(1149,0,__PYX_ERR(8, 1149, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_element_stack != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_element_stack) != 0); - __pyx_t_5 = ((!__pyx_t_1) != 0); - if (__pyx_t_5) { + __pyx_t_6 = ((!__pyx_t_1) != 0); + if (__pyx_t_6) { /* "src/lxml/serializer.pxi":1150 * @@ -158168,7 +147325,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_end_elemen * if ok_to_write: * if not self._buffered: */ - __Pyx_TraceLine(1150,0,__PYX_ERR(8, 1150, __pyx_L1_error)) __pyx_v_self->_status = __pyx_e_4lxml_5etree_WRITER_FINISHED; /* "src/lxml/serializer.pxi":1149 @@ -158187,9 +147343,8 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_end_elemen * if not self._buffered: * tree.xmlOutputBufferFlush(self._c_out) */ - __Pyx_TraceLine(1151,0,__PYX_ERR(8, 1151, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_ok_to_write); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(8, 1151, __pyx_L1_error) - if (__pyx_t_5) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_ok_to_write); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(8, 1151, __pyx_L1_error) + if (__pyx_t_6) { /* "src/lxml/serializer.pxi":1152 * self._status = WRITER_FINISHED @@ -158198,9 +147353,8 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_end_elemen * tree.xmlOutputBufferFlush(self._c_out) * self._handle_error(self._c_out.error) */ - __Pyx_TraceLine(1152,0,__PYX_ERR(8, 1152, __pyx_L1_error)) - __pyx_t_5 = ((!(__pyx_v_self->_buffered != 0)) != 0); - if (__pyx_t_5) { + __pyx_t_6 = ((!(__pyx_v_self->_buffered != 0)) != 0); + if (__pyx_t_6) { /* "src/lxml/serializer.pxi":1153 * if ok_to_write: @@ -158209,7 +147363,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_end_elemen * self._handle_error(self._c_out.error) * */ - __Pyx_TraceLine(1153,0,__PYX_ERR(8, 1153, __pyx_L1_error)) (void)(xmlOutputBufferFlush(__pyx_v_self->_c_out)); /* "src/lxml/serializer.pxi":1152 @@ -158228,10 +147381,9 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_end_elemen * * cdef _find_prefix(self, bytes href, dict flat_namespaces_map, list new_namespaces): */ - __Pyx_TraceLine(1154,0,__PYX_ERR(8, 1154, __pyx_L1_error)) - __pyx_t_6 = __pyx_f_4lxml_5etree_22_IncrementalFileWriter__handle_error(__pyx_v_self, __pyx_v_self->_c_out->error); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 1154, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = __pyx_f_4lxml_5etree_22_IncrementalFileWriter__handle_error(__pyx_v_self, __pyx_v_self->_c_out->error); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/lxml/serializer.pxi":1151 * if not self._element_stack: @@ -158256,7 +147408,7 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_end_elemen __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("lxml.etree._IncrementalFileWriter._write_end_element", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; @@ -158265,7 +147417,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_end_elemen __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_prefix); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -158283,7 +147434,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__find_prefix(CYTH PyObject *__pyx_v_i = NULL; PyObject *__pyx_v_prefix = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -158291,7 +147441,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__find_prefix(CYTH PyObject *__pyx_t_4 = NULL; int __pyx_t_5; __Pyx_RefNannySetupContext("_find_prefix", 0); - __Pyx_TraceCall("_find_prefix", __pyx_f[8], 1156, 0, __PYX_ERR(8, 1156, __pyx_L1_error)); /* "src/lxml/serializer.pxi":1157 * @@ -158300,7 +147449,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__find_prefix(CYTH * return None * if href in flat_namespaces_map: */ - __Pyx_TraceLine(1157,0,__PYX_ERR(8, 1157, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_href == ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -158312,7 +147460,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__find_prefix(CYTH * if href in flat_namespaces_map: * return flat_namespaces_map[href] */ - __Pyx_TraceLine(1158,0,__PYX_ERR(8, 1158, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -158333,7 +147480,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__find_prefix(CYTH * return flat_namespaces_map[href] * # need to create a new prefix */ - __Pyx_TraceLine(1159,0,__PYX_ERR(8, 1159, __pyx_L1_error)) if (unlikely(__pyx_v_flat_namespaces_map == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(8, 1159, __pyx_L1_error) @@ -158349,7 +147495,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__find_prefix(CYTH * # need to create a new prefix * prefixes = flat_namespaces_map.values() */ - __Pyx_TraceLine(1160,0,__PYX_ERR(8, 1160, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_flat_namespaces_map == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); @@ -158377,7 +147522,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__find_prefix(CYTH * i = 0 * while True: */ - __Pyx_TraceLine(1162,0,__PYX_ERR(8, 1162, __pyx_L1_error)) if (unlikely(__pyx_v_flat_namespaces_map == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); __PYX_ERR(8, 1162, __pyx_L1_error) @@ -158394,7 +147538,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__find_prefix(CYTH * while True: * prefix = _utf8('ns%d' % i) */ - __Pyx_TraceLine(1163,0,__PYX_ERR(8, 1163, __pyx_L1_error)) __Pyx_INCREF(__pyx_int_0); __pyx_v_i = __pyx_int_0; @@ -158405,7 +147548,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__find_prefix(CYTH * prefix = _utf8('ns%d' % i) * if prefix not in prefixes: */ - __Pyx_TraceLine(1164,0,__PYX_ERR(8, 1164, __pyx_L1_error)) while (1) { /* "src/lxml/serializer.pxi":1165 @@ -158415,8 +147557,7 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__find_prefix(CYTH * if prefix not in prefixes: * new_namespaces.append((b'xmlns', prefix, href)) */ - __Pyx_TraceLine(1165,0,__PYX_ERR(8, 1165, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_ns_d, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1165, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyString_FormatSafe(__pyx_kp_s_ns_d, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 1165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -158431,7 +147572,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__find_prefix(CYTH * new_namespaces.append((b'xmlns', prefix, href)) * flat_namespaces_map[href] = prefix */ - __Pyx_TraceLine(1166,0,__PYX_ERR(8, 1166, __pyx_L1_error)) __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_prefix, __pyx_v_prefixes, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(8, 1166, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -158443,7 +147583,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__find_prefix(CYTH * flat_namespaces_map[href] = prefix * return prefix */ - __Pyx_TraceLine(1167,0,__PYX_ERR(8, 1167, __pyx_L1_error)) if (unlikely(__pyx_v_new_namespaces == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); __PYX_ERR(8, 1167, __pyx_L1_error) @@ -158469,7 +147608,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__find_prefix(CYTH * return prefix * i += 1 */ - __Pyx_TraceLine(1168,0,__PYX_ERR(8, 1168, __pyx_L1_error)) if (unlikely(__pyx_v_flat_namespaces_map == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(8, 1168, __pyx_L1_error) @@ -158483,7 +147621,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__find_prefix(CYTH * i += 1 * */ - __Pyx_TraceLine(1169,0,__PYX_ERR(8, 1169, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_prefix); __pyx_r = __pyx_v_prefix; @@ -158505,7 +147642,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__find_prefix(CYTH * * cdef _collect_namespaces(self, dict nsmap): */ - __Pyx_TraceLine(1170,0,__PYX_ERR(8, 1170, __pyx_L1_error)) __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 1170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_4); @@ -158533,7 +147669,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__find_prefix(CYTH __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_prefix); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -158552,7 +147687,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__collect_namespac PyObject *__pyx_v_ns = NULL; PyObject *__pyx_v_prefix = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; @@ -158565,7 +147699,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__collect_namespac int __pyx_t_9; int __pyx_t_10; __Pyx_RefNannySetupContext("_collect_namespaces", 0); - __Pyx_TraceCall("_collect_namespaces", __pyx_f[8], 1172, 0, __PYX_ERR(8, 1172, __pyx_L1_error)); /* "src/lxml/serializer.pxi":1173 * @@ -158574,7 +147707,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__collect_namespac * flat_namespaces_map = {} * for ns, prefix in nsmap.iteritems(): */ - __Pyx_TraceLine(1173,0,__PYX_ERR(8, 1173, __pyx_L1_error)) __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_new_namespaces = ((PyObject*)__pyx_t_1); @@ -158587,7 +147719,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__collect_namespac * for ns, prefix in nsmap.iteritems(): * flat_namespaces_map[ns] = prefix */ - __Pyx_TraceLine(1174,0,__PYX_ERR(8, 1174, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_flat_namespaces_map = ((PyObject*)__pyx_t_1); @@ -158600,7 +147731,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__collect_namespac * flat_namespaces_map[ns] = prefix * if prefix is None: */ - __Pyx_TraceLine(1175,0,__PYX_ERR(8, 1175, __pyx_L1_error)) __pyx_t_2 = 0; if (unlikely(__pyx_v_nsmap == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "iteritems"); @@ -158629,7 +147759,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__collect_namespac * if prefix is None: * # use empty bytes rather than None to allow sorting */ - __Pyx_TraceLine(1176,0,__PYX_ERR(8, 1176, __pyx_L1_error)) if (unlikely(PyDict_SetItem(__pyx_v_flat_namespaces_map, __pyx_v_ns, __pyx_v_prefix) < 0)) __PYX_ERR(8, 1176, __pyx_L1_error) /* "src/lxml/serializer.pxi":1177 @@ -158639,7 +147768,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__collect_namespac * # use empty bytes rather than None to allow sorting * new_namespaces.append((b'', b'xmlns', ns)) */ - __Pyx_TraceLine(1177,0,__PYX_ERR(8, 1177, __pyx_L1_error)) __pyx_t_8 = (__pyx_v_prefix == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { @@ -158651,12 +147779,11 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__collect_namespac * else: * new_namespaces.append((b'xmlns', prefix, ns)) */ - __Pyx_TraceLine(1179,0,__PYX_ERR(8, 1179, __pyx_L1_error)) __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 1179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_INCREF(__pyx_kp_b__23); - __Pyx_GIVEREF(__pyx_kp_b__23); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_b__23); + __Pyx_INCREF(__pyx_kp_b__11); + __Pyx_GIVEREF(__pyx_kp_b__11); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_b__11); __Pyx_INCREF(__pyx_n_b_xmlns); __Pyx_GIVEREF(__pyx_n_b_xmlns); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_b_xmlns); @@ -158683,7 +147810,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__collect_namespac * # merge in flat namespace map of parent * if self._element_stack: */ - __Pyx_TraceLine(1181,0,__PYX_ERR(8, 1181, __pyx_L1_error)) /*else*/ { __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 1181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); @@ -158710,7 +147836,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__collect_namespac * for ns, prefix in (self._element_stack[-1][-1]).iteritems(): * if flat_namespaces_map.get(ns) is None: */ - __Pyx_TraceLine(1183,0,__PYX_ERR(8, 1183, __pyx_L1_error)) __pyx_t_9 = (__pyx_v_self->_element_stack != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_element_stack) != 0); if (__pyx_t_9) { @@ -158721,7 +147846,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__collect_namespac * if flat_namespaces_map.get(ns) is None: * # unknown or empty prefix => prefer a 'real' prefix */ - __Pyx_TraceLine(1184,0,__PYX_ERR(8, 1184, __pyx_L1_error)) __pyx_t_3 = 0; if (unlikely(__pyx_v_self->_element_stack == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); @@ -158760,7 +147884,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__collect_namespac * # unknown or empty prefix => prefer a 'real' prefix * flat_namespaces_map[ns] = prefix */ - __Pyx_TraceLine(1185,0,__PYX_ERR(8, 1185, __pyx_L1_error)) __pyx_t_5 = __Pyx_PyDict_GetItemDefault(__pyx_v_flat_namespaces_map, __pyx_v_ns, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 1185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = (__pyx_t_5 == Py_None); @@ -158775,7 +147898,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__collect_namespac * return flat_namespaces_map, new_namespaces * */ - __Pyx_TraceLine(1187,0,__PYX_ERR(8, 1187, __pyx_L1_error)) if (unlikely(PyDict_SetItem(__pyx_v_flat_namespaces_map, __pyx_v_ns, __pyx_v_prefix) < 0)) __PYX_ERR(8, 1187, __pyx_L1_error) /* "src/lxml/serializer.pxi":1185 @@ -158805,7 +147927,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__collect_namespac * * def write(self, *args, bint with_tail=True, bint pretty_print=False, method=None): */ - __Pyx_TraceLine(1188,0,__PYX_ERR(8, 1188, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -158840,7 +147961,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__collect_namespac __Pyx_XDECREF(__pyx_v_ns); __Pyx_XDECREF(__pyx_v_prefix); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -158856,7 +147976,7 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__collect_namespac /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_13write(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_22_IncrementalFileWriter_12write[] = "write(self, *args, with_tail=True, pretty_print=False, method=None)\n\n Write subtrees or strings into the file.\n\n If method is not None, it should be one of ('html', 'xml', 'text')\n to temporarily override the output method.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_22_IncrementalFileWriter_13write = {"write", (PyCFunction)__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_13write, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_22_IncrementalFileWriter_12write}; +static PyMethodDef __pyx_mdef_4lxml_5etree_22_IncrementalFileWriter_13write = {"write", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_13write, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_22_IncrementalFileWriter_12write}; static PyObject *__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_13write(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_with_tail; int __pyx_v_pretty_print; @@ -158938,7 +148058,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ PyObject *__pyx_v_name = NULL; CYTHON_UNUSED PyObject *__pyx_v__ = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -158956,9 +148075,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ int __pyx_t_14; Py_ssize_t __pyx_t_15; Py_UCS4 __pyx_t_16; - __Pyx_TraceFrameInit(__pyx_codeobj__277) __Pyx_RefNannySetupContext("write", 0); - __Pyx_TraceCall("write", __pyx_f[8], 1190, 0, __PYX_ERR(8, 1190, __pyx_L1_error)); /* "src/lxml/serializer.pxi":1198 * to temporarily override the output method. @@ -158967,7 +148084,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * c_method = self._method if method is None else _findOutputMethod(method) * */ - __Pyx_TraceLine(1198,0,__PYX_ERR(8, 1198, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_self->_c_out != NULL) != 0))) { @@ -158984,7 +148100,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * * for content in args: */ - __Pyx_TraceLine(1199,0,__PYX_ERR(8, 1199, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_method == Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_1 = __pyx_v_self->_method; @@ -159001,7 +148116,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * if _isString(content): * if self._status != WRITER_IN_ELEMENT: */ - __Pyx_TraceLine(1201,0,__PYX_ERR(8, 1201, __pyx_L1_error)) __pyx_t_4 = __pyx_v_args; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; for (;;) { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break; @@ -159021,7 +148135,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * if self._status != WRITER_IN_ELEMENT: * if self._status > WRITER_IN_ELEMENT or content.strip(): */ - __Pyx_TraceLine(1202,0,__PYX_ERR(8, 1202, __pyx_L1_error)) __pyx_t_2 = (_isString(__pyx_v_content) != 0); if (__pyx_t_2) { @@ -159032,7 +148145,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * if self._status > WRITER_IN_ELEMENT or content.strip(): * raise LxmlSyntaxError("not in an element") */ - __Pyx_TraceLine(1203,0,__PYX_ERR(8, 1203, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->_status != __pyx_e_4lxml_5etree_WRITER_IN_ELEMENT) != 0); if (__pyx_t_2) { @@ -159043,7 +148155,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * raise LxmlSyntaxError("not in an element") * bstring = _utf8(content) */ - __Pyx_TraceLine(1204,0,__PYX_ERR(8, 1204, __pyx_L1_error)) __pyx_t_7 = ((__pyx_v_self->_status > __pyx_e_4lxml_5etree_WRITER_IN_ELEMENT) != 0); if (!__pyx_t_7) { } else { @@ -159062,12 +148173,9 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ __Pyx_DECREF_SET(__pyx_t_8, function); } } - if (__pyx_t_9) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 1204, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } else { - __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 1204, __pyx_L1_error) - } + __pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 1204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(8, 1204, __pyx_L1_error) @@ -159083,14 +148191,25 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * bstring = _utf8(content) * if not bstring: */ - __Pyx_TraceLine(1205,0,__PYX_ERR(8, 1205, __pyx_L1_error)) - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 1205, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__278, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 1205, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 1205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_kp_s_not_in_an_element) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_kp_s_not_in_an_element); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 1205, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(8, 1205, __pyx_L1_error) /* "src/lxml/serializer.pxi":1204 @@ -159118,11 +148237,10 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * if not bstring: * continue */ - __Pyx_TraceLine(1206,0,__PYX_ERR(8, 1206, __pyx_L1_error)) - __pyx_t_8 = __pyx_f_4lxml_5etree__utf8(__pyx_v_content); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 1206, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_XDECREF_SET(__pyx_v_bstring, ((PyObject*)__pyx_t_8)); - __pyx_t_8 = 0; + __pyx_t_6 = __pyx_f_4lxml_5etree__utf8(__pyx_v_content); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 1206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_bstring, ((PyObject*)__pyx_t_6)); + __pyx_t_6 = 0; /* "src/lxml/serializer.pxi":1207 * raise LxmlSyntaxError("not in an element") @@ -159131,7 +148249,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * continue * */ - __Pyx_TraceLine(1207,0,__PYX_ERR(8, 1207, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_bstring != Py_None)&&(PyBytes_GET_SIZE(__pyx_v_bstring) != 0); __pyx_t_7 = ((!__pyx_t_2) != 0); if (__pyx_t_7) { @@ -159143,7 +148260,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * * ns, name, _, _ = self._element_stack[-1] */ - __Pyx_TraceLine(1208,0,__PYX_ERR(8, 1208, __pyx_L1_error)) goto __pyx_L3_continue; /* "src/lxml/serializer.pxi":1207 @@ -159162,15 +148278,14 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * if (c_method == OUTPUT_METHOD_HTML and * ns in (None, b'http://www.w3.org/1999/xhtml') and */ - __Pyx_TraceLine(1210,0,__PYX_ERR(8, 1210, __pyx_L1_error)) if (unlikely(__pyx_v_self->_element_stack == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(8, 1210, __pyx_L1_error) } - __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_self->_element_stack, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 1210, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) { - PyObject* sequence = __pyx_t_8; + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_self->_element_stack, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 1210, __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; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 4)) { if (size > 4) __Pyx_RaiseTooManyValuesError(4); @@ -159179,24 +148294,24 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_10 = PyTuple_GET_ITEM(sequence, 2); __pyx_t_11 = PyTuple_GET_ITEM(sequence, 3); } else { - __pyx_t_6 = PyList_GET_ITEM(sequence, 0); + __pyx_t_8 = PyList_GET_ITEM(sequence, 0); __pyx_t_9 = PyList_GET_ITEM(sequence, 1); __pyx_t_10 = PyList_GET_ITEM(sequence, 2); __pyx_t_11 = PyList_GET_ITEM(sequence, 3); } - __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_11); #else { Py_ssize_t i; - PyObject** temps[4] = {&__pyx_t_6,&__pyx_t_9,&__pyx_t_10,&__pyx_t_11}; + PyObject** temps[4] = {&__pyx_t_8,&__pyx_t_9,&__pyx_t_10,&__pyx_t_11}; for (i=0; i < 4; i++) { PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(8, 1210, __pyx_L1_error) __Pyx_GOTREF(item); @@ -159204,13 +148319,13 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ } } #endif - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; - PyObject** temps[4] = {&__pyx_t_6,&__pyx_t_9,&__pyx_t_10,&__pyx_t_11}; - __pyx_t_12 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(8, 1210, __pyx_L1_error) + PyObject** temps[4] = {&__pyx_t_8,&__pyx_t_9,&__pyx_t_10,&__pyx_t_11}; + __pyx_t_12 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(8, 1210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; for (index=0; index < 4; index++) { PyObject* item = __pyx_t_13(__pyx_t_12); if (unlikely(!item)) goto __pyx_L11_unpacking_failed; @@ -159228,8 +148343,8 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ __PYX_ERR(8, 1210, __pyx_L1_error) __pyx_L12_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_v_ns, __pyx_t_6); - __pyx_t_6 = 0; + __Pyx_XDECREF_SET(__pyx_v_ns, __pyx_t_8); + __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_10); @@ -159244,7 +148359,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * ns in (None, b'http://www.w3.org/1999/xhtml') and * name in (b'script', b'style')): */ - __Pyx_TraceLine(1211,0,__PYX_ERR(8, 1211, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_method == __pyx_e_4lxml_5etree_OUTPUT_METHOD_HTML) != 0); if (__pyx_t_2) { } else { @@ -159259,10 +148373,9 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * name in (b'script', b'style')): * tree.xmlOutputBufferWrite(self._c_out, len(bstring), _cstr(bstring)) */ - __Pyx_TraceLine(1212,0,__PYX_ERR(8, 1212, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_ns); - __pyx_t_8 = __pyx_v_ns; - __pyx_t_11 = PyObject_RichCompare(__pyx_t_8, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 1212, __pyx_L1_error) + __pyx_t_6 = __pyx_v_ns; + __pyx_t_11 = PyObject_RichCompare(__pyx_t_6, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 1212, __pyx_L1_error) __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(8, 1212, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (!__pyx_t_14) { @@ -159270,10 +148383,10 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ __pyx_t_2 = __pyx_t_14; goto __pyx_L17_bool_binop_done; } - __pyx_t_14 = (__Pyx_PyBytes_Equals(__pyx_t_8, __pyx_kp_b_http_www_w3_org_1999_xhtml, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(8, 1212, __pyx_L1_error) + __pyx_t_14 = (__Pyx_PyBytes_Equals(__pyx_t_6, __pyx_kp_b_http_www_w3_org_1999_xhtml, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(8, 1212, __pyx_L1_error) __pyx_t_2 = __pyx_t_14; __pyx_L17_bool_binop_done:; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_14 = (__pyx_t_2 != 0); if (__pyx_t_14) { } else { @@ -159288,19 +148401,18 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * tree.xmlOutputBufferWrite(self._c_out, len(bstring), _cstr(bstring)) * */ - __Pyx_TraceLine(1213,0,__PYX_ERR(8, 1213, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_name); - __pyx_t_8 = __pyx_v_name; - __pyx_t_2 = (__Pyx_PyBytes_Equals(__pyx_t_8, __pyx_n_b_script, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(8, 1213, __pyx_L1_error) + __pyx_t_6 = __pyx_v_name; + __pyx_t_2 = (__Pyx_PyBytes_Equals(__pyx_t_6, __pyx_n_b_script, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(8, 1213, __pyx_L1_error) if (!__pyx_t_2) { } else { __pyx_t_14 = __pyx_t_2; goto __pyx_L19_bool_binop_done; } - __pyx_t_2 = (__Pyx_PyBytes_Equals(__pyx_t_8, __pyx_n_b_style, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(8, 1213, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyBytes_Equals(__pyx_t_6, __pyx_n_b_style, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(8, 1213, __pyx_L1_error) __pyx_t_14 = __pyx_t_2; __pyx_L19_bool_binop_done:; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_2 = (__pyx_t_14 != 0); __pyx_t_7 = __pyx_t_2; __pyx_L14_bool_binop_done:; @@ -159312,7 +148424,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * ns in (None, b'http://www.w3.org/1999/xhtml') and * name in (b'script', b'style')): */ - __Pyx_TraceLine(1211,0,__PYX_ERR(8, 1211, __pyx_L1_error)) if (__pyx_t_7) { /* "src/lxml/serializer.pxi":1214 @@ -159322,7 +148433,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * * else: */ - __Pyx_TraceLine(1214,0,__PYX_ERR(8, 1214, __pyx_L1_error)) if (unlikely(__pyx_v_bstring == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(8, 1214, __pyx_L1_error) @@ -159347,7 +148457,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * * elif iselement(content): */ - __Pyx_TraceLine(1217,0,__PYX_ERR(8, 1217, __pyx_L1_error)) /*else*/ { (void)(xmlOutputBufferWriteEscape(__pyx_v_self->_c_out, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_bstring), NULL)); } @@ -159370,8 +148479,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * if self._status > WRITER_IN_ELEMENT: * raise LxmlSyntaxError("cannot append trailing element to complete XML document") */ - __Pyx_TraceLine(1219,0,__PYX_ERR(8, 1219, __pyx_L1_error)) - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_iselement); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 1219, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_iselement); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 1219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) { @@ -159383,41 +148491,13 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ __Pyx_DECREF_SET(__pyx_t_11, function); } } - if (!__pyx_t_10) { - __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_content); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 1219, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_11)) { - PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_content}; - __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 1219, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_GOTREF(__pyx_t_8); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) { - PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_content}; - __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 1219, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_GOTREF(__pyx_t_8); - } else - #endif - { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(8, 1219, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __pyx_t_10 = NULL; - __Pyx_INCREF(__pyx_v_content); - __Pyx_GIVEREF(__pyx_v_content); - PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_content); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 1219, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } - } + __pyx_t_6 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_10, __pyx_v_content) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_content); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 1219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(8, 1219, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(8, 1219, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_7) { /* "src/lxml/serializer.pxi":1220 @@ -159427,7 +148507,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * raise LxmlSyntaxError("cannot append trailing element to complete XML document") * _writeNodeToBuffer(self._c_out, (<_Element>content)._c_node, */ - __Pyx_TraceLine(1220,0,__PYX_ERR(8, 1220, __pyx_L1_error)) __pyx_t_7 = ((__pyx_v_self->_status > __pyx_e_4lxml_5etree_WRITER_IN_ELEMENT) != 0); if (unlikely(__pyx_t_7)) { @@ -159438,14 +148517,25 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * _writeNodeToBuffer(self._c_out, (<_Element>content)._c_node, * self._c_encoding, NULL, c_method, */ - __Pyx_TraceLine(1221,0,__PYX_ERR(8, 1221, __pyx_L1_error)) - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 1221, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__279, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 1221, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 1221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_Raise(__pyx_t_11, 0, 0, 0); + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_11, function); + } + } + __pyx_t_6 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_10, __pyx_kp_s_cannot_append_trailing_element_t) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_kp_s_cannot_append_trailing_element_t); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 1221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(8, 1221, __pyx_L1_error) /* "src/lxml/serializer.pxi":1220 @@ -159464,7 +148554,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * self._c_encoding, NULL, c_method, * False, False, pretty_print, with_tail, False) */ - __Pyx_TraceLine(1222,0,__PYX_ERR(8, 1222, __pyx_L1_error)) __pyx_f_4lxml_5etree__writeNodeToBuffer(__pyx_v_self->_c_out, ((struct LxmlElement *)__pyx_v_content)->_c_node, __pyx_v_self->_c_encoding, NULL, __pyx_v_c_method, 0, 0, __pyx_v_pretty_print, __pyx_v_with_tail, 0); /* "src/lxml/serializer.pxi":1225 @@ -159474,7 +148563,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * if not self._element_stack: * self._status = WRITER_FINISHED */ - __Pyx_TraceLine(1225,0,__PYX_ERR(8, 1225, __pyx_L1_error)) __pyx_t_7 = ((((struct LxmlElement *)__pyx_v_content)->_c_node->type == XML_ELEMENT_NODE) != 0); if (__pyx_t_7) { @@ -159485,7 +148573,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * self._status = WRITER_FINISHED * */ - __Pyx_TraceLine(1226,0,__PYX_ERR(8, 1226, __pyx_L1_error)) __pyx_t_7 = (__pyx_v_self->_element_stack != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_element_stack) != 0); __pyx_t_2 = ((!__pyx_t_7) != 0); if (__pyx_t_2) { @@ -159497,7 +148584,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * * elif content is not None: */ - __Pyx_TraceLine(1227,0,__PYX_ERR(8, 1227, __pyx_L1_error)) __pyx_v_self->_status = __pyx_e_4lxml_5etree_WRITER_FINISHED; /* "src/lxml/serializer.pxi":1226 @@ -159535,7 +148621,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * raise TypeError( * f"got invalid input value of type {type(content)}, expected string or Element") */ - __Pyx_TraceLine(1229,0,__PYX_ERR(8, 1229, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_content != Py_None); __pyx_t_7 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_7)) { @@ -159547,29 +148632,28 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * self._handle_error(self._c_out.error) * if not self._buffered: */ - __Pyx_TraceLine(1231,0,__PYX_ERR(8, 1231, __pyx_L1_error)) - __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 1231, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 1231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __pyx_t_15 = 0; __pyx_t_16 = 127; __Pyx_INCREF(__pyx_kp_u_got_invalid_input_value_of_type); __pyx_t_15 += 32; __Pyx_GIVEREF(__pyx_kp_u_got_invalid_input_value_of_type); - PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_kp_u_got_invalid_input_value_of_type); - __pyx_t_8 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_content)), __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 1231, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_16; - __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8); - __Pyx_GIVEREF(__pyx_t_8); - PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_8); - __pyx_t_8 = 0; + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_got_invalid_input_value_of_type); + __pyx_t_11 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_content)), __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 1231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_16; + __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_11); + __pyx_t_11 = 0; __Pyx_INCREF(__pyx_kp_u_expected_string_or_Element); __pyx_t_15 += 28; __Pyx_GIVEREF(__pyx_kp_u_expected_string_or_Element); - PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_kp_u_expected_string_or_Element); - __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, __pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 1231, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_expected_string_or_Element); + __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 1231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "src/lxml/serializer.pxi":1230 * @@ -159578,12 +148662,11 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * f"got invalid input value of type {type(content)}, expected string or Element") * self._handle_error(self._c_out.error) */ - __Pyx_TraceLine(1230,0,__PYX_ERR(8, 1230, __pyx_L1_error)) - __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 1230, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_Raise(__pyx_t_11, 0, 0, 0); + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 1230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(8, 1230, __pyx_L1_error) /* "src/lxml/serializer.pxi":1229 @@ -159603,10 +148686,9 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * if not self._buffered: * tree.xmlOutputBufferFlush(self._c_out) */ - __Pyx_TraceLine(1232,0,__PYX_ERR(8, 1232, __pyx_L1_error)) - __pyx_t_11 = __pyx_f_4lxml_5etree_22_IncrementalFileWriter__handle_error(__pyx_v_self, __pyx_v_self->_c_out->error); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 1232, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_6 = __pyx_f_4lxml_5etree_22_IncrementalFileWriter__handle_error(__pyx_v_self, __pyx_v_self->_c_out->error); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 1232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "src/lxml/serializer.pxi":1201 * c_method = self._method if method is None else _findOutputMethod(method) @@ -159615,7 +148697,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * if _isString(content): * if self._status != WRITER_IN_ELEMENT: */ - __Pyx_TraceLine(1201,0,__PYX_ERR(8, 1201, __pyx_L1_error)) __pyx_L3_continue:; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -159627,7 +148708,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * tree.xmlOutputBufferFlush(self._c_out) * self._handle_error(self._c_out.error) */ - __Pyx_TraceLine(1233,0,__PYX_ERR(8, 1233, __pyx_L1_error)) __pyx_t_7 = ((!(__pyx_v_self->_buffered != 0)) != 0); if (__pyx_t_7) { @@ -159638,7 +148718,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * self._handle_error(self._c_out.error) * */ - __Pyx_TraceLine(1234,0,__PYX_ERR(8, 1234, __pyx_L1_error)) (void)(xmlOutputBufferFlush(__pyx_v_self->_c_out)); /* "src/lxml/serializer.pxi":1235 @@ -159648,7 +148727,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ * * def flush(self): */ - __Pyx_TraceLine(1235,0,__PYX_ERR(8, 1235, __pyx_L1_error)) __pyx_t_4 = __pyx_f_4lxml_5etree_22_IncrementalFileWriter__handle_error(__pyx_v_self, __pyx_v_self->_c_out->error); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 1235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -159690,7 +148768,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_12write(struct _ __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v__); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -159720,12 +148797,9 @@ static PyObject *__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_15flush(PyObject static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_14flush(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__280) __Pyx_RefNannySetupContext("flush", 0); - __Pyx_TraceCall("flush", __pyx_f[8], 1237, 0, __PYX_ERR(8, 1237, __pyx_L1_error)); /* "src/lxml/serializer.pxi":1242 * Write any pending content of the current output buffer to the stream. @@ -159734,7 +148808,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_14flush(struct _ * tree.xmlOutputBufferFlush(self._c_out) * self._handle_error(self._c_out.error) */ - __Pyx_TraceLine(1242,0,__PYX_ERR(8, 1242, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_self->_c_out != NULL) != 0))) { @@ -159751,7 +148824,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_14flush(struct _ * self._handle_error(self._c_out.error) * */ - __Pyx_TraceLine(1243,0,__PYX_ERR(8, 1243, __pyx_L1_error)) (void)(xmlOutputBufferFlush(__pyx_v_self->_c_out)); /* "src/lxml/serializer.pxi":1244 @@ -159761,7 +148833,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_14flush(struct _ * * cdef _close(self, bint raise_on_error): */ - __Pyx_TraceLine(1244,0,__PYX_ERR(8, 1244, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_22_IncrementalFileWriter__handle_error(__pyx_v_self, __pyx_v_self->_c_out->error); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -159783,7 +148854,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_14flush(struct _ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -159799,14 +148869,13 @@ static PyObject *__pyx_pf_4lxml_5etree_22_IncrementalFileWriter_14flush(struct _ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__close(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *__pyx_v_self, int __pyx_v_raise_on_error) { int __pyx_v_error_result; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; __Pyx_RefNannySetupContext("_close", 0); - __Pyx_TraceCall("_close", __pyx_f[8], 1246, 0, __PYX_ERR(8, 1246, __pyx_L1_error)); /* "src/lxml/serializer.pxi":1247 * @@ -159815,7 +148884,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__close(struct __p * if self._status < WRITER_IN_ELEMENT: * raise LxmlSyntaxError("no content written") */ - __Pyx_TraceLine(1247,0,__PYX_ERR(8, 1247, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_raise_on_error != 0); if (__pyx_t_1) { @@ -159826,7 +148894,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__close(struct __p * raise LxmlSyntaxError("no content written") * if self._element_stack: */ - __Pyx_TraceLine(1248,0,__PYX_ERR(8, 1248, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_status < __pyx_e_4lxml_5etree_WRITER_IN_ELEMENT) != 0); if (unlikely(__pyx_t_1)) { @@ -159837,14 +148904,25 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__close(struct __p * if self._element_stack: * raise LxmlSyntaxError("pending open tags on close") */ - __Pyx_TraceLine(1249,0,__PYX_ERR(8, 1249, __pyx_L1_error)) - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1249, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__281, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1249, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1249, __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_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_no_content_written) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_no_content_written); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(8, 1249, __pyx_L1_error) /* "src/lxml/serializer.pxi":1248 @@ -159863,7 +148941,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__close(struct __p * raise LxmlSyntaxError("pending open tags on close") * error_result = self._c_out.error */ - __Pyx_TraceLine(1250,0,__PYX_ERR(8, 1250, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_element_stack != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_element_stack) != 0); if (unlikely(__pyx_t_1)) { @@ -159874,10 +148951,21 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__close(struct __p * error_result = self._c_out.error * if error_result == xmlerror.XML_ERR_OK: */ - __Pyx_TraceLine(1251,0,__PYX_ERR(8, 1251, __pyx_L1_error)) - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1251, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__282, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1251, __pyx_L1_error) + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_pending_open_tags_on_close) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_pending_open_tags_on_close); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); @@ -159909,9 +148997,8 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__close(struct __p * if error_result == xmlerror.XML_ERR_OK: * error_result = tree.xmlOutputBufferClose(self._c_out) */ - __Pyx_TraceLine(1252,0,__PYX_ERR(8, 1252, __pyx_L1_error)) - __pyx_t_4 = __pyx_v_self->_c_out->error; - __pyx_v_error_result = __pyx_t_4; + __pyx_t_5 = __pyx_v_self->_c_out->error; + __pyx_v_error_result = __pyx_t_5; /* "src/lxml/serializer.pxi":1253 * raise LxmlSyntaxError("pending open tags on close") @@ -159920,7 +149007,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__close(struct __p * error_result = tree.xmlOutputBufferClose(self._c_out) * if error_result > 0: */ - __Pyx_TraceLine(1253,0,__PYX_ERR(8, 1253, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_error_result == XML_ERR_OK) != 0); if (__pyx_t_1) { @@ -159931,7 +149017,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__close(struct __p * if error_result > 0: * error_result = xmlerror.XML_ERR_OK */ - __Pyx_TraceLine(1254,0,__PYX_ERR(8, 1254, __pyx_L1_error)) __pyx_v_error_result = xmlOutputBufferClose(__pyx_v_self->_c_out); /* "src/lxml/serializer.pxi":1255 @@ -159941,7 +149026,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__close(struct __p * error_result = xmlerror.XML_ERR_OK * else: */ - __Pyx_TraceLine(1255,0,__PYX_ERR(8, 1255, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_error_result > 0) != 0); if (__pyx_t_1) { @@ -159952,7 +149036,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__close(struct __p * else: * tree.xmlOutputBufferClose(self._c_out) */ - __Pyx_TraceLine(1256,0,__PYX_ERR(8, 1256, __pyx_L1_error)) __pyx_v_error_result = XML_ERR_OK; /* "src/lxml/serializer.pxi":1255 @@ -159981,7 +149064,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__close(struct __p * self._status = WRITER_FINISHED * self._c_out = NULL */ - __Pyx_TraceLine(1258,0,__PYX_ERR(8, 1258, __pyx_L1_error)) /*else*/ { (void)(xmlOutputBufferClose(__pyx_v_self->_c_out)); } @@ -159994,7 +149076,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__close(struct __p * self._c_out = NULL * del self._element_stack[:] */ - __Pyx_TraceLine(1259,0,__PYX_ERR(8, 1259, __pyx_L1_error)) __pyx_v_self->_status = __pyx_e_4lxml_5etree_WRITER_FINISHED; /* "src/lxml/serializer.pxi":1260 @@ -160004,7 +149085,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__close(struct __p * del self._element_stack[:] * if raise_on_error: */ - __Pyx_TraceLine(1260,0,__PYX_ERR(8, 1260, __pyx_L1_error)) __pyx_v_self->_c_out = NULL; /* "src/lxml/serializer.pxi":1261 @@ -160014,7 +149094,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__close(struct __p * if raise_on_error: * self._handle_error(error_result) */ - __Pyx_TraceLine(1261,0,__PYX_ERR(8, 1261, __pyx_L1_error)) if (unlikely(__pyx_v_self->_element_stack == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(8, 1261, __pyx_L1_error) @@ -160028,7 +149107,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__close(struct __p * self._handle_error(error_result) * */ - __Pyx_TraceLine(1262,0,__PYX_ERR(8, 1262, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_raise_on_error != 0); if (__pyx_t_1) { @@ -160039,7 +149117,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__close(struct __p * * cdef _handle_error(self, int error_result): */ - __Pyx_TraceLine(1263,0,__PYX_ERR(8, 1263, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree_22_IncrementalFileWriter__handle_error(__pyx_v_self, __pyx_v_error_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -160067,11 +149144,11 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__close(struct __p __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("lxml.etree._IncrementalFileWriter._close", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -160086,14 +149163,12 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__close(struct __p static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__handle_error(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *__pyx_v_self, int __pyx_v_error_result) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_handle_error", 0); - __Pyx_TraceCall("_handle_error", __pyx_f[8], 1265, 0, __PYX_ERR(8, 1265, __pyx_L1_error)); /* "src/lxml/serializer.pxi":1266 * @@ -160102,7 +149177,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__handle_error(str * if self._target is not None: * self._target._exc_context._raise_if_stored() */ - __Pyx_TraceLine(1266,0,__PYX_ERR(8, 1266, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_error_result != XML_ERR_OK) != 0); if (__pyx_t_1) { @@ -160113,7 +149187,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__handle_error(str * self._target._exc_context._raise_if_stored() * _raiseSerialisationError(error_result) */ - __Pyx_TraceLine(1267,0,__PYX_ERR(8, 1267, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_self->_target) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -160125,7 +149198,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__handle_error(str * _raiseSerialisationError(error_result) * */ - __Pyx_TraceLine(1268,0,__PYX_ERR(8, 1268, __pyx_L1_error)) __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_self->_target->_exc_context->__pyx_vtab)->_raise_if_stored(__pyx_v_self->_target->_exc_context); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(8, 1268, __pyx_L1_error) /* "src/lxml/serializer.pxi":1267 @@ -160144,7 +149216,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__handle_error(str * * */ - __Pyx_TraceLine(1269,0,__PYX_ERR(8, 1269, __pyx_L1_error)) __pyx_t_4 = __pyx_f_4lxml_5etree__raiseSerialisationError(__pyx_v_error_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 1269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -160175,7 +149246,6 @@ static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__handle_error(str __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -160206,11 +149276,9 @@ static int __pyx_pw_4lxml_5etree_16_AsyncDataWriter_1__cinit__(PyObject *__pyx_v static int __pyx_pf_4lxml_5etree_16_AsyncDataWriter___cinit__(struct __pyx_obj_4lxml_5etree__AsyncDataWriter *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[8], 1276, 0, __PYX_ERR(8, 1276, __pyx_L1_error)); /* "src/lxml/serializer.pxi":1277 * cdef list _data @@ -160219,7 +149287,6 @@ static int __pyx_pf_4lxml_5etree_16_AsyncDataWriter___cinit__(struct __pyx_obj_4 * * cdef bytes collect(self): */ - __Pyx_TraceLine(1277,0,__PYX_ERR(8, 1277, __pyx_L1_error)) __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -160244,7 +149311,6 @@ static int __pyx_pf_4lxml_5etree_16_AsyncDataWriter___cinit__(struct __pyx_obj_4 __Pyx_AddTraceback("lxml.etree._AsyncDataWriter.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -160260,12 +149326,10 @@ static int __pyx_pf_4lxml_5etree_16_AsyncDataWriter___cinit__(struct __pyx_obj_4 static PyObject *__pyx_f_4lxml_5etree_16_AsyncDataWriter_collect(struct __pyx_obj_4lxml_5etree__AsyncDataWriter *__pyx_v_self) { PyObject *__pyx_v_data = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("collect", 0); - __Pyx_TraceCall("collect", __pyx_f[8], 1279, 0, __PYX_ERR(8, 1279, __pyx_L1_error)); /* "src/lxml/serializer.pxi":1280 * @@ -160274,10 +149338,9 @@ static PyObject *__pyx_f_4lxml_5etree_16_AsyncDataWriter_collect(struct __pyx_ob * del self._data[:] * return data */ - __Pyx_TraceLine(1280,0,__PYX_ERR(8, 1280, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_data; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyBytes_Join(__pyx_kp_b__23, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1280, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_Join(__pyx_kp_b__11, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_data = __pyx_t_2; @@ -160290,7 +149353,6 @@ static PyObject *__pyx_f_4lxml_5etree_16_AsyncDataWriter_collect(struct __pyx_ob * return data * */ - __Pyx_TraceLine(1281,0,__PYX_ERR(8, 1281, __pyx_L1_error)) if (unlikely(__pyx_v_self->_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(8, 1281, __pyx_L1_error) @@ -160304,7 +149366,6 @@ static PyObject *__pyx_f_4lxml_5etree_16_AsyncDataWriter_collect(struct __pyx_ob * * def write(self, data): */ - __Pyx_TraceLine(1282,0,__PYX_ERR(8, 1282, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); if (!(likely(PyBytes_CheckExact(__pyx_v_data))||((__pyx_v_data) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_data)->tp_name), 0))) __PYX_ERR(8, 1282, __pyx_L1_error) __Pyx_INCREF(__pyx_v_data); @@ -160328,7 +149389,6 @@ static PyObject *__pyx_f_4lxml_5etree_16_AsyncDataWriter_collect(struct __pyx_ob __pyx_L0:; __Pyx_XDECREF(__pyx_v_data); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -160357,12 +149417,9 @@ static PyObject *__pyx_pw_4lxml_5etree_16_AsyncDataWriter_3write(PyObject *__pyx static PyObject *__pyx_pf_4lxml_5etree_16_AsyncDataWriter_2write(struct __pyx_obj_4lxml_5etree__AsyncDataWriter *__pyx_v_self, PyObject *__pyx_v_data) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; - __Pyx_TraceFrameInit(__pyx_codeobj__283) __Pyx_RefNannySetupContext("write", 0); - __Pyx_TraceCall("write", __pyx_f[8], 1284, 0, __PYX_ERR(8, 1284, __pyx_L1_error)); /* "src/lxml/serializer.pxi":1285 * @@ -160371,7 +149428,6 @@ static PyObject *__pyx_pf_4lxml_5etree_16_AsyncDataWriter_2write(struct __pyx_ob * * def close(self): */ - __Pyx_TraceLine(1285,0,__PYX_ERR(8, 1285, __pyx_L1_error)) if (unlikely(__pyx_v_self->_data == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); __PYX_ERR(8, 1285, __pyx_L1_error) @@ -160394,7 +149450,6 @@ static PyObject *__pyx_pf_4lxml_5etree_16_AsyncDataWriter_2write(struct __pyx_ob __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -160423,21 +149478,12 @@ static PyObject *__pyx_pw_4lxml_5etree_16_AsyncDataWriter_5close(PyObject *__pyx static PyObject *__pyx_pf_4lxml_5etree_16_AsyncDataWriter_4close(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree__AsyncDataWriter *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - __Pyx_TraceFrameInit(__pyx_codeobj__284) __Pyx_RefNannySetupContext("close", 0); - __Pyx_TraceCall("close", __pyx_f[8], 1287, 0, __PYX_ERR(8, 1287, __pyx_L1_error)); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._AsyncDataWriter.close", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -160562,13 +149608,11 @@ static int __pyx_pw_4lxml_5etree_27_AsyncIncrementalFileWriter_1__cinit__(PyObje static int __pyx_pf_4lxml_5etree_27_AsyncIncrementalFileWriter___cinit__(struct __pyx_obj_4lxml_5etree__AsyncIncrementalFileWriter *__pyx_v_self, PyObject *__pyx_v_async_outfile, PyObject *__pyx_v_encoding, int __pyx_v_compresslevel, int __pyx_v_close, int __pyx_v_buffered, int __pyx_v_method) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[8], 1301, 0, __PYX_ERR(8, 1301, __pyx_L1_error)); /* "src/lxml/serializer.pxi":1303 * def __cinit__(self, async_outfile, bytes encoding, int compresslevel, bint close, @@ -160577,7 +149621,6 @@ static int __pyx_pf_4lxml_5etree_27_AsyncIncrementalFileWriter___cinit__(struct * self._async_outfile = async_outfile * self._should_close = close */ - __Pyx_TraceLine(1303,0,__PYX_ERR(8, 1303, __pyx_L1_error)) __pyx_v_self->_flush_after_writes = 20; /* "src/lxml/serializer.pxi":1304 @@ -160587,7 +149630,6 @@ static int __pyx_pf_4lxml_5etree_27_AsyncIncrementalFileWriter___cinit__(struct * self._should_close = close * self._buffered = buffered */ - __Pyx_TraceLine(1304,0,__PYX_ERR(8, 1304, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_async_outfile); __Pyx_GIVEREF(__pyx_v_async_outfile); __Pyx_GOTREF(__pyx_v_self->_async_outfile); @@ -160601,7 +149643,6 @@ static int __pyx_pf_4lxml_5etree_27_AsyncIncrementalFileWriter___cinit__(struct * self._buffered = buffered * self._buffer = _AsyncDataWriter() */ - __Pyx_TraceLine(1305,0,__PYX_ERR(8, 1305, __pyx_L1_error)) __pyx_v_self->_should_close = __pyx_v_close; /* "src/lxml/serializer.pxi":1306 @@ -160611,7 +149652,6 @@ static int __pyx_pf_4lxml_5etree_27_AsyncIncrementalFileWriter___cinit__(struct * self._buffer = _AsyncDataWriter() * self._writer = _IncrementalFileWriter( */ - __Pyx_TraceLine(1306,0,__PYX_ERR(8, 1306, __pyx_L1_error)) __pyx_v_self->_buffered = __pyx_v_buffered; /* "src/lxml/serializer.pxi":1307 @@ -160621,7 +149661,6 @@ static int __pyx_pf_4lxml_5etree_27_AsyncIncrementalFileWriter___cinit__(struct * self._writer = _IncrementalFileWriter( * self._buffer, encoding, compresslevel, close=True, buffered=False, method=method) */ - __Pyx_TraceLine(1307,0,__PYX_ERR(8, 1307, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__AsyncDataWriter)); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -160637,7 +149676,6 @@ static int __pyx_pf_4lxml_5etree_27_AsyncIncrementalFileWriter___cinit__(struct * * cdef bytes _flush(self): */ - __Pyx_TraceLine(1309,0,__PYX_ERR(8, 1309, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_compresslevel); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -160648,7 +149686,6 @@ static int __pyx_pf_4lxml_5etree_27_AsyncIncrementalFileWriter___cinit__(struct * self._buffer, encoding, compresslevel, close=True, buffered=False, method=method) * */ - __Pyx_TraceLine(1308,0,__PYX_ERR(8, 1308, __pyx_L1_error)) __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_self->_buffer)); @@ -160668,7 +149705,6 @@ static int __pyx_pf_4lxml_5etree_27_AsyncIncrementalFileWriter___cinit__(struct * * cdef bytes _flush(self): */ - __Pyx_TraceLine(1309,0,__PYX_ERR(8, 1309, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_close, Py_True) < 0) __PYX_ERR(8, 1309, __pyx_L1_error) @@ -160685,7 +149721,6 @@ static int __pyx_pf_4lxml_5etree_27_AsyncIncrementalFileWriter___cinit__(struct * self._buffer, encoding, compresslevel, close=True, buffered=False, method=method) * */ - __Pyx_TraceLine(1308,0,__PYX_ERR(8, 1308, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__IncrementalFileWriter), __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -160714,7 +149749,6 @@ static int __pyx_pf_4lxml_5etree_27_AsyncIncrementalFileWriter___cinit__(struct __Pyx_AddTraceback("lxml.etree._AsyncIncrementalFileWriter.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -160729,14 +149763,12 @@ static int __pyx_pf_4lxml_5etree_27_AsyncIncrementalFileWriter___cinit__(struct static PyObject *__pyx_f_4lxml_5etree_27_AsyncIncrementalFileWriter__flush(struct __pyx_obj_4lxml_5etree__AsyncIncrementalFileWriter *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __Pyx_RefNannySetupContext("_flush", 0); - __Pyx_TraceCall("_flush", __pyx_f[8], 1311, 0, __PYX_ERR(8, 1311, __pyx_L1_error)); /* "src/lxml/serializer.pxi":1312 * @@ -160745,7 +149777,6 @@ static PyObject *__pyx_f_4lxml_5etree_27_AsyncIncrementalFileWriter__flush(struc * return self._buffer.collect() * return None */ - __Pyx_TraceLine(1312,0,__PYX_ERR(8, 1312, __pyx_L1_error)) __pyx_t_2 = ((!(__pyx_v_self->_buffered != 0)) != 0); if (!__pyx_t_2) { } else { @@ -160772,7 +149803,6 @@ static PyObject *__pyx_f_4lxml_5etree_27_AsyncIncrementalFileWriter__flush(struc * return None * */ - __Pyx_TraceLine(1313,0,__PYX_ERR(8, 1313, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_f_4lxml_5etree_16_AsyncDataWriter_collect(__pyx_v_self->_buffer); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -160796,7 +149826,6 @@ static PyObject *__pyx_f_4lxml_5etree_27_AsyncIncrementalFileWriter__flush(struc * * async def flush(self): */ - __Pyx_TraceLine(1314,0,__PYX_ERR(8, 1314, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -160816,7 +149845,6 @@ static PyObject *__pyx_f_4lxml_5etree_27_AsyncIncrementalFileWriter__flush(struc __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -160861,7 +149889,7 @@ static PyObject *__pyx_pf_4lxml_5etree_27_AsyncIncrementalFileWriter_2flush(stru __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_4generator2, __pyx_codeobj__285, (PyObject *) __pyx_cur_scope, __pyx_n_s_flush, __pyx_n_s_AsyncIncrementalFileWriter_flus, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(8, 1316, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_4generator2, __pyx_codeobj__63, (PyObject *) __pyx_cur_scope, __pyx_n_s_flush, __pyx_n_s_AsyncIncrementalFileWriter_flus, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(8, 1316, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -160881,21 +149909,16 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_4generator2 { struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_flush *__pyx_cur_scope = ((struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_flush *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; - PyObject *__pyx_t_5 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("flush", 0); - __Pyx_TraceFrameInit(__pyx_codeobj__285) - __Pyx_TraceCall("flush", __pyx_f[8], 1316, 0, __PYX_ERR(8, 1316, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L5_resume_from_await; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } @@ -160909,7 +149932,6 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_4generator2 * data = self._buffer.collect() * if data: */ - __Pyx_TraceLine(1317,0,__PYX_ERR(8, 1317, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self->_writer), __pyx_n_s_flush); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; @@ -160922,12 +149944,9 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_4generator2 __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1317, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1317, __pyx_L1_error) - } + __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(8, 1317, __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; @@ -160939,7 +149958,6 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_4generator2 * if data: * await self._async_outfile.write(data) */ - __Pyx_TraceLine(1318,0,__PYX_ERR(8, 1318, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_16_AsyncDataWriter_collect(__pyx_cur_scope->__pyx_v_self->_buffer); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -160953,7 +149971,6 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_4generator2 * await self._async_outfile.write(data) * */ - __Pyx_TraceLine(1319,0,__PYX_ERR(8, 1319, __pyx_L1_error)) __pyx_t_4 = (__pyx_cur_scope->__pyx_v_data != Py_None)&&(PyBytes_GET_SIZE(__pyx_cur_scope->__pyx_v_data) != 0); if (__pyx_t_4) { @@ -160964,7 +149981,6 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_4generator2 * * async def write_declaration(self, version=None, standalone=None, doctype=None): */ - __Pyx_TraceLine(1320,0,__PYX_ERR(8, 1320, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->_async_outfile, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; @@ -160977,45 +149993,16 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_4generator2 __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_cur_scope->__pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1320, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_data}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1320, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_data}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1320, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 1320, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_cur_scope->__pyx_v_data); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_data); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_cur_scope->__pyx_v_data); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1320, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_cur_scope->__pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_cur_scope->__pyx_v_data); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1320, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, awaiting value */ @@ -161056,14 +150043,14 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_4generator2 __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("flush", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -161079,7 +150066,7 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_7generator3 /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_27_AsyncIncrementalFileWriter_6write_declaration(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_5etree_27_AsyncIncrementalFileWriter_6write_declaration = {"write_declaration", (PyCFunction)__pyx_pw_4lxml_5etree_27_AsyncIncrementalFileWriter_6write_declaration, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_5etree_27_AsyncIncrementalFileWriter_6write_declaration = {"write_declaration", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_27_AsyncIncrementalFileWriter_6write_declaration, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_5etree_27_AsyncIncrementalFileWriter_6write_declaration(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_version = 0; PyObject *__pyx_v_standalone = 0; @@ -161186,7 +150173,7 @@ static PyObject *__pyx_pf_4lxml_5etree_27_AsyncIncrementalFileWriter_5write_decl __Pyx_INCREF(__pyx_cur_scope->__pyx_v_doctype); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_doctype); { - __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_7generator3, __pyx_codeobj__286, (PyObject *) __pyx_cur_scope, __pyx_n_s_write_declaration, __pyx_n_s_AsyncIncrementalFileWriter_writ, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(8, 1322, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_7generator3, __pyx_codeobj__64, (PyObject *) __pyx_cur_scope, __pyx_n_s_write_declaration, __pyx_n_s_AsyncIncrementalFileWriter_writ, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(8, 1322, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -161206,7 +150193,6 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_7generator3 { struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_write_declaration *__pyx_cur_scope = ((struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_write_declaration *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; @@ -161215,13 +150201,10 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_7generator3 int __pyx_t_6; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write_declaration", 0); - __Pyx_TraceFrameInit(__pyx_codeobj__286) - __Pyx_TraceCall("write_declaration", __pyx_f[8], 1322, 0, __PYX_ERR(8, 1322, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L5_resume_from_await; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } @@ -161235,7 +150218,6 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_7generator3 * data = self._flush() * if data: */ - __Pyx_TraceLine(1323,0,__PYX_ERR(8, 1323, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self->_writer), __pyx_n_s_write_declaration); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; @@ -161295,7 +150277,6 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_7generator3 * if data: * await self._async_outfile.write(data) */ - __Pyx_TraceLine(1324,0,__PYX_ERR(8, 1324, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_27_AsyncIncrementalFileWriter__flush(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -161309,7 +150290,6 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_7generator3 * await self._async_outfile.write(data) * */ - __Pyx_TraceLine(1325,0,__PYX_ERR(8, 1325, __pyx_L1_error)) __pyx_t_6 = (__pyx_cur_scope->__pyx_v_data != Py_None)&&(PyBytes_GET_SIZE(__pyx_cur_scope->__pyx_v_data) != 0); if (__pyx_t_6) { @@ -161320,7 +150300,6 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_7generator3 * * async def write_doctype(self, doctype): */ - __Pyx_TraceLine(1326,0,__PYX_ERR(8, 1326, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->_async_outfile, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; @@ -161333,45 +150312,16 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_7generator3 __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_cur_scope->__pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1326, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_data}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1326, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_data}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1326, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1326, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_INCREF(__pyx_cur_scope->__pyx_v_data); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_data); - PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_cur_scope->__pyx_v_data); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1326, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_cur_scope->__pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_cur_scope->__pyx_v_data); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, awaiting value */ @@ -161416,10 +150366,11 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_7generator3 __Pyx_AddTraceback("write_declaration", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -161467,7 +150418,7 @@ static PyObject *__pyx_pf_4lxml_5etree_27_AsyncIncrementalFileWriter_8write_doct __Pyx_INCREF(__pyx_cur_scope->__pyx_v_doctype); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_doctype); { - __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_10generator4, __pyx_codeobj__287, (PyObject *) __pyx_cur_scope, __pyx_n_s_write_doctype, __pyx_n_s_AsyncIncrementalFileWriter_writ_2, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(8, 1328, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_10generator4, __pyx_codeobj__65, (PyObject *) __pyx_cur_scope, __pyx_n_s_write_doctype, __pyx_n_s_AsyncIncrementalFileWriter_writ_2, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(8, 1328, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -161487,21 +150438,16 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_10generator { struct __pyx_obj_4lxml_5etree___pyx_scope_struct_4_write_doctype *__pyx_cur_scope = ((struct __pyx_obj_4lxml_5etree___pyx_scope_struct_4_write_doctype *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; + int __pyx_t_4; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write_doctype", 0); - __Pyx_TraceFrameInit(__pyx_codeobj__287) - __Pyx_TraceCall("write_doctype", __pyx_f[8], 1328, 0, __PYX_ERR(8, 1328, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L5_resume_from_await; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } @@ -161515,7 +150461,6 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_10generator * data = self._flush() * if data: */ - __Pyx_TraceLine(1329,0,__PYX_ERR(8, 1329, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self->_writer), __pyx_n_s_write_doctype); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; @@ -161528,38 +150473,10 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_10generator __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_cur_scope->__pyx_v_doctype); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1329, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_doctype}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1329, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_doctype}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1329, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 1329, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_cur_scope->__pyx_v_doctype); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_doctype); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_cur_scope->__pyx_v_doctype); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1329, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_cur_scope->__pyx_v_doctype) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_cur_scope->__pyx_v_doctype); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1329, __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; @@ -161570,7 +150487,6 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_10generator * if data: * await self._async_outfile.write(data) */ - __Pyx_TraceLine(1330,0,__PYX_ERR(8, 1330, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_27_AsyncIncrementalFileWriter__flush(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -161584,9 +150500,8 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_10generator * await self._async_outfile.write(data) * */ - __Pyx_TraceLine(1331,0,__PYX_ERR(8, 1331, __pyx_L1_error)) - __pyx_t_5 = (__pyx_cur_scope->__pyx_v_data != Py_None)&&(PyBytes_GET_SIZE(__pyx_cur_scope->__pyx_v_data) != 0); - if (__pyx_t_5) { + __pyx_t_4 = (__pyx_cur_scope->__pyx_v_data != Py_None)&&(PyBytes_GET_SIZE(__pyx_cur_scope->__pyx_v_data) != 0); + if (__pyx_t_4) { /* "src/lxml/serializer.pxi":1332 * data = self._flush() @@ -161595,58 +150510,28 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_10generator * * async def write(self, *args, with_tail=True, pretty_print=False, method=None): */ - __Pyx_TraceLine(1332,0,__PYX_ERR(8, 1332, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->_async_outfile, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = NULL; + __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_4)) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_cur_scope->__pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1332, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_data}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1332, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_data}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1332, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1332, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(__pyx_cur_scope->__pyx_v_data); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_data); - PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_cur_scope->__pyx_v_data); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1332, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_cur_scope->__pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_cur_scope->__pyx_v_data); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, awaiting value */ @@ -161687,14 +150572,14 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_10generator __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("write_doctype", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -161710,7 +150595,7 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_13generator /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_27_AsyncIncrementalFileWriter_12write(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_5etree_27_AsyncIncrementalFileWriter_12write = {"write", (PyCFunction)__pyx_pw_4lxml_5etree_27_AsyncIncrementalFileWriter_12write, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_5etree_27_AsyncIncrementalFileWriter_12write = {"write", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_27_AsyncIncrementalFileWriter_12write, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_5etree_27_AsyncIncrementalFileWriter_12write(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_with_tail = 0; PyObject *__pyx_v_pretty_print = 0; @@ -161807,7 +150692,7 @@ static PyObject *__pyx_pf_4lxml_5etree_27_AsyncIncrementalFileWriter_11write(str __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args); { - __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_13generator5, __pyx_codeobj__288, (PyObject *) __pyx_cur_scope, __pyx_n_s_write, __pyx_n_s_AsyncIncrementalFileWriter_writ_3, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(8, 1334, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_13generator5, __pyx_codeobj__66, (PyObject *) __pyx_cur_scope, __pyx_n_s_write, __pyx_n_s_AsyncIncrementalFileWriter_writ_3, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(8, 1334, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -161827,21 +150712,16 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_13generator { struct __pyx_obj_4lxml_5etree___pyx_scope_struct_5_write *__pyx_cur_scope = ((struct __pyx_obj_4lxml_5etree___pyx_scope_struct_5_write *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; - PyObject *__pyx_t_5 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write", 0); - __Pyx_TraceFrameInit(__pyx_codeobj__288) - __Pyx_TraceCall("write", __pyx_f[8], 1334, 0, __PYX_ERR(8, 1334, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L5_resume_from_await; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } @@ -161855,7 +150735,6 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_13generator * data = self._flush() * if data: */ - __Pyx_TraceLine(1335,0,__PYX_ERR(8, 1335, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self->_writer), __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1335, __pyx_L1_error) @@ -161876,7 +150755,6 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_13generator * if data: * await self._async_outfile.write(data) */ - __Pyx_TraceLine(1336,0,__PYX_ERR(8, 1336, __pyx_L1_error)) __pyx_t_3 = __pyx_f_4lxml_5etree_27_AsyncIncrementalFileWriter__flush(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); @@ -161890,7 +150768,6 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_13generator * await self._async_outfile.write(data) * */ - __Pyx_TraceLine(1337,0,__PYX_ERR(8, 1337, __pyx_L1_error)) __pyx_t_4 = (__pyx_cur_scope->__pyx_v_data != Py_None)&&(PyBytes_GET_SIZE(__pyx_cur_scope->__pyx_v_data) != 0); if (__pyx_t_4) { @@ -161901,7 +150778,6 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_13generator * * def method(self, method): */ - __Pyx_TraceLine(1338,0,__PYX_ERR(8, 1338, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->_async_outfile, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; @@ -161914,45 +150790,16 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_13generator __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_1) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_cur_scope->__pyx_v_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1338, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_cur_scope->__pyx_v_data}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1338, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_cur_scope->__pyx_v_data}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1338, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 1338, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL; - __Pyx_INCREF(__pyx_cur_scope->__pyx_v_data); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_data); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_cur_scope->__pyx_v_data); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1338, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - } + __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_cur_scope->__pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_cur_scope->__pyx_v_data); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, awaiting value */ @@ -161993,14 +150840,14 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_13generator __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("write", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -162029,15 +150876,11 @@ static PyObject *__pyx_pw_4lxml_5etree_27_AsyncIncrementalFileWriter_15method(Py static PyObject *__pyx_pf_4lxml_5etree_27_AsyncIncrementalFileWriter_14method(struct __pyx_obj_4lxml_5etree__AsyncIncrementalFileWriter *__pyx_v_self, PyObject *__pyx_v_method) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__289) __Pyx_RefNannySetupContext("method", 0); - __Pyx_TraceCall("method", __pyx_f[8], 1340, 0, __PYX_ERR(8, 1340, __pyx_L1_error)); /* "src/lxml/serializer.pxi":1341 * @@ -162046,7 +150889,6 @@ static PyObject *__pyx_pf_4lxml_5etree_27_AsyncIncrementalFileWriter_14method(st * * def element(self, tag, attrib=None, nsmap=None, method=None, **_extra): */ - __Pyx_TraceLine(1341,0,__PYX_ERR(8, 1341, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_writer), __pyx_n_s_method); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -162060,38 +150902,10 @@ static PyObject *__pyx_pf_4lxml_5etree_27_AsyncIncrementalFileWriter_14method(st __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1341, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_method}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1341, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_method}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1341, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 1341, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_v_method); - __Pyx_GIVEREF(__pyx_v_method); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_method); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1341, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_method) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_method); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1341, __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; @@ -162110,12 +150924,10 @@ static PyObject *__pyx_pf_4lxml_5etree_27_AsyncIncrementalFileWriter_14method(st __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("lxml.etree._AsyncIncrementalFileWriter.method", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -162130,7 +150942,7 @@ static PyObject *__pyx_pf_4lxml_5etree_27_AsyncIncrementalFileWriter_14method(st /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_27_AsyncIncrementalFileWriter_17element(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_5etree_27_AsyncIncrementalFileWriter_17element = {"element", (PyCFunction)__pyx_pw_4lxml_5etree_27_AsyncIncrementalFileWriter_17element, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_5etree_27_AsyncIncrementalFileWriter_17element = {"element", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_27_AsyncIncrementalFileWriter_17element, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_5etree_27_AsyncIncrementalFileWriter_17element(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tag = 0; PyObject *__pyx_v_attrib = 0; @@ -162228,14 +151040,11 @@ static PyObject *__pyx_pw_4lxml_5etree_27_AsyncIncrementalFileWriter_17element(P static PyObject *__pyx_pf_4lxml_5etree_27_AsyncIncrementalFileWriter_16element(struct __pyx_obj_4lxml_5etree__AsyncIncrementalFileWriter *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_attrib, PyObject *__pyx_v_nsmap, PyObject *__pyx_v_method, PyObject *__pyx_v__extra) { PyObject *__pyx_v_element_writer = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__290) __Pyx_RefNannySetupContext("element", 0); - __Pyx_TraceCall("element", __pyx_f[8], 1343, 0, __PYX_ERR(8, 1343, __pyx_L1_error)); /* "src/lxml/serializer.pxi":1344 * @@ -162244,7 +151053,6 @@ static PyObject *__pyx_pf_4lxml_5etree_27_AsyncIncrementalFileWriter_16element(s * return _AsyncFileWriterElement(element_writer, self) * */ - __Pyx_TraceLine(1344,0,__PYX_ERR(8, 1344, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_writer), __pyx_n_s_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1344, __pyx_L1_error) @@ -162275,7 +151083,6 @@ static PyObject *__pyx_pf_4lxml_5etree_27_AsyncIncrementalFileWriter_16element(s * * async def _close(self, bint raise_on_error): */ - __Pyx_TraceLine(1345,0,__PYX_ERR(8, 1345, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -162310,7 +151117,6 @@ static PyObject *__pyx_pf_4lxml_5etree_27_AsyncIncrementalFileWriter_16element(s __pyx_L0:; __Pyx_XDECREF(__pyx_v_element_writer); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -162366,7 +151172,7 @@ static PyObject *__pyx_pf_4lxml_5etree_27_AsyncIncrementalFileWriter_18_close(st __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __pyx_cur_scope->__pyx_v_raise_on_error = __pyx_v_raise_on_error; { - __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_20generator6, __pyx_codeobj__291, (PyObject *) __pyx_cur_scope, __pyx_n_s_close_2, __pyx_n_s_AsyncIncrementalFileWriter__clo, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(8, 1347, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_20generator6, __pyx_codeobj__67, (PyObject *) __pyx_cur_scope, __pyx_n_s_close_2, __pyx_n_s_AsyncIncrementalFileWriter__clo, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(8, 1347, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -162386,22 +151192,17 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_20generator { struct __pyx_obj_4lxml_5etree___pyx_scope_struct_6__close *__pyx_cur_scope = ((struct __pyx_obj_4lxml_5etree___pyx_scope_struct_6__close *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_close", 0); - __Pyx_TraceFrameInit(__pyx_codeobj__291) - __Pyx_TraceCall("_close", __pyx_f[8], 1347, 0, __PYX_ERR(8, 1347, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L5_resume_from_await; case 2: goto __pyx_L7_resume_from_await; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } @@ -162415,7 +151216,6 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_20generator * data = self._buffer.collect() * if data: */ - __Pyx_TraceLine(1348,0,__PYX_ERR(8, 1348, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_22_IncrementalFileWriter__close(__pyx_cur_scope->__pyx_v_self->_writer, __pyx_cur_scope->__pyx_v_raise_on_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -162427,7 +151227,6 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_20generator * if data: * await self._async_outfile.write(data) */ - __Pyx_TraceLine(1349,0,__PYX_ERR(8, 1349, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_16_AsyncDataWriter_collect(__pyx_cur_scope->__pyx_v_self->_buffer); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -162441,7 +151240,6 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_20generator * await self._async_outfile.write(data) * if self._should_close: */ - __Pyx_TraceLine(1350,0,__PYX_ERR(8, 1350, __pyx_L1_error)) __pyx_t_2 = (__pyx_cur_scope->__pyx_v_data != Py_None)&&(PyBytes_GET_SIZE(__pyx_cur_scope->__pyx_v_data) != 0); if (__pyx_t_2) { @@ -162452,7 +151250,6 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_20generator * if self._should_close: * await self._async_outfile.close() */ - __Pyx_TraceLine(1351,0,__PYX_ERR(8, 1351, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->_async_outfile, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; @@ -162465,45 +151262,16 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_20generator __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (!__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_cur_scope->__pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1351, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_data}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1351, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_data}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1351, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 1351, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(__pyx_cur_scope->__pyx_v_data); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_data); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_cur_scope->__pyx_v_data); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1351, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_cur_scope->__pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_cur_scope->__pyx_v_data); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, awaiting value */ @@ -162535,7 +151303,6 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_20generator * await self._async_outfile.close() * */ - __Pyx_TraceLine(1352,0,__PYX_ERR(8, 1352, __pyx_L1_error)) __pyx_t_2 = (__pyx_cur_scope->__pyx_v_self->_should_close != 0); if (__pyx_t_2) { @@ -162546,25 +151313,21 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_20generator * * */ - __Pyx_TraceLine(1353,0,__PYX_ERR(8, 1353, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->_async_outfile, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = NULL; + __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_5)) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1353, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1353, __pyx_L1_error) - } + __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(8, 1353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_1); @@ -162572,7 +151335,6 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_20generator __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, awaiting value */ @@ -162613,14 +151375,14 @@ static PyObject *__pyx_gb_4lxml_5etree_27_AsyncIncrementalFileWriter_20generator __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("_close", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -162702,10 +151464,8 @@ static int __pyx_pw_4lxml_5etree_23_AsyncFileWriterElement_1__cinit__(PyObject * static int __pyx_pf_4lxml_5etree_23_AsyncFileWriterElement___cinit__(struct __pyx_obj_4lxml_5etree__AsyncFileWriterElement *__pyx_v_self, struct __pyx_obj_4lxml_5etree__FileWriterElement *__pyx_v_element_writer, struct __pyx_obj_4lxml_5etree__AsyncIncrementalFileWriter *__pyx_v_writer) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[8], 1362, 0, __PYX_ERR(8, 1362, __pyx_L1_error)); /* "src/lxml/serializer.pxi":1364 * def __cinit__(self, _FileWriterElement element_writer not None, @@ -162714,7 +151474,6 @@ static int __pyx_pf_4lxml_5etree_23_AsyncFileWriterElement___cinit__(struct __py * self._writer = writer * */ - __Pyx_TraceLine(1364,0,__PYX_ERR(8, 1364, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_element_writer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_element_writer)); __Pyx_GOTREF(__pyx_v_self->_element_writer); @@ -162728,7 +151487,6 @@ static int __pyx_pf_4lxml_5etree_23_AsyncFileWriterElement___cinit__(struct __py * * async def __aenter__(self): */ - __Pyx_TraceLine(1365,0,__PYX_ERR(8, 1365, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_writer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_writer)); __Pyx_GOTREF(__pyx_v_self->_writer); @@ -162745,12 +151503,6 @@ static int __pyx_pf_4lxml_5etree_23_AsyncFileWriterElement___cinit__(struct __py /* function exit code */ __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._AsyncFileWriterElement.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -162795,7 +151547,7 @@ static PyObject *__pyx_pf_4lxml_5etree_23_AsyncFileWriterElement_2__aenter__(str __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_23_AsyncFileWriterElement_4generator7, __pyx_codeobj__292, (PyObject *) __pyx_cur_scope, __pyx_n_s_aenter, __pyx_n_s_AsyncFileWriterElement___aenter, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(8, 1367, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_23_AsyncFileWriterElement_4generator7, __pyx_codeobj__68, (PyObject *) __pyx_cur_scope, __pyx_n_s_aenter, __pyx_n_s_AsyncFileWriterElement___aenter, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(8, 1367, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -162815,21 +151567,16 @@ static PyObject *__pyx_gb_4lxml_5etree_23_AsyncFileWriterElement_4generator7(__p { struct __pyx_obj_4lxml_5etree___pyx_scope_struct_7___aenter__ *__pyx_cur_scope = ((struct __pyx_obj_4lxml_5etree___pyx_scope_struct_7___aenter__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; - PyObject *__pyx_t_5 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__aenter__", 0); - __Pyx_TraceFrameInit(__pyx_codeobj__292) - __Pyx_TraceCall("__aenter__", __pyx_f[8], 1367, 0, __PYX_ERR(8, 1367, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L5_resume_from_await; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } @@ -162843,7 +151590,6 @@ static PyObject *__pyx_gb_4lxml_5etree_23_AsyncFileWriterElement_4generator7(__p * data = self._writer._flush() * if data: */ - __Pyx_TraceLine(1368,0,__PYX_ERR(8, 1368, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self->_element_writer), __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; @@ -162856,12 +151602,9 @@ static PyObject *__pyx_gb_4lxml_5etree_23_AsyncFileWriterElement_4generator7(__p __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1368, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1368, __pyx_L1_error) - } + __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(8, 1368, __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; @@ -162873,7 +151616,6 @@ static PyObject *__pyx_gb_4lxml_5etree_23_AsyncFileWriterElement_4generator7(__p * if data: * await self._writer._async_outfile.write(data) */ - __Pyx_TraceLine(1369,0,__PYX_ERR(8, 1369, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_27_AsyncIncrementalFileWriter__flush(__pyx_cur_scope->__pyx_v_self->_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -162887,7 +151629,6 @@ static PyObject *__pyx_gb_4lxml_5etree_23_AsyncFileWriterElement_4generator7(__p * await self._writer._async_outfile.write(data) * */ - __Pyx_TraceLine(1370,0,__PYX_ERR(8, 1370, __pyx_L1_error)) __pyx_t_4 = (__pyx_cur_scope->__pyx_v_data != Py_None)&&(PyBytes_GET_SIZE(__pyx_cur_scope->__pyx_v_data) != 0); if (__pyx_t_4) { @@ -162898,7 +151639,6 @@ static PyObject *__pyx_gb_4lxml_5etree_23_AsyncFileWriterElement_4generator7(__p * * async def __aexit__(self, *args): */ - __Pyx_TraceLine(1371,0,__PYX_ERR(8, 1371, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->_writer->_async_outfile, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; @@ -162911,45 +151651,16 @@ static PyObject *__pyx_gb_4lxml_5etree_23_AsyncFileWriterElement_4generator7(__p __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_cur_scope->__pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1371, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_data}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1371, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_data}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1371, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 1371, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_cur_scope->__pyx_v_data); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_data); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_cur_scope->__pyx_v_data); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1371, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_cur_scope->__pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_cur_scope->__pyx_v_data); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, awaiting value */ @@ -162990,14 +151701,14 @@ static PyObject *__pyx_gb_4lxml_5etree_23_AsyncFileWriterElement_4generator7(__p __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("__aenter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -163013,7 +151724,7 @@ static PyObject *__pyx_gb_4lxml_5etree_23_AsyncFileWriterElement_7generator8(__p /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_23_AsyncFileWriterElement_6__aexit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_5etree_23_AsyncFileWriterElement_6__aexit__ = {"__aexit__", (PyCFunction)__pyx_pw_4lxml_5etree_23_AsyncFileWriterElement_6__aexit__, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_5etree_23_AsyncFileWriterElement_6__aexit__ = {"__aexit__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_23_AsyncFileWriterElement_6__aexit__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_5etree_23_AsyncFileWriterElement_6__aexit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_r = 0; @@ -163050,7 +151761,7 @@ static PyObject *__pyx_pf_4lxml_5etree_23_AsyncFileWriterElement_5__aexit__(stru __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args); { - __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_23_AsyncFileWriterElement_7generator8, __pyx_codeobj__293, (PyObject *) __pyx_cur_scope, __pyx_n_s_aexit, __pyx_n_s_AsyncFileWriterElement___aexit, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(8, 1373, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_23_AsyncFileWriterElement_7generator8, __pyx_codeobj__69, (PyObject *) __pyx_cur_scope, __pyx_n_s_aexit, __pyx_n_s_AsyncFileWriterElement___aexit, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(8, 1373, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -163070,21 +151781,16 @@ static PyObject *__pyx_gb_4lxml_5etree_23_AsyncFileWriterElement_7generator8(__p { struct __pyx_obj_4lxml_5etree___pyx_scope_struct_8___aexit__ *__pyx_cur_scope = ((struct __pyx_obj_4lxml_5etree___pyx_scope_struct_8___aexit__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__aexit__", 0); - __Pyx_TraceFrameInit(__pyx_codeobj__293) - __Pyx_TraceCall("__aexit__", __pyx_f[8], 1373, 0, __PYX_ERR(8, 1373, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L5_resume_from_await; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } @@ -163098,7 +151804,6 @@ static PyObject *__pyx_gb_4lxml_5etree_23_AsyncFileWriterElement_7generator8(__p * data = self._writer._flush() * if data: */ - __Pyx_TraceLine(1374,0,__PYX_ERR(8, 1374, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self->_element_writer), __pyx_n_s_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_cur_scope->__pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1374, __pyx_L1_error) @@ -163113,7 +151818,6 @@ static PyObject *__pyx_gb_4lxml_5etree_23_AsyncFileWriterElement_7generator8(__p * if data: * await self._writer._async_outfile.write(data) */ - __Pyx_TraceLine(1375,0,__PYX_ERR(8, 1375, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree_27_AsyncIncrementalFileWriter__flush(__pyx_cur_scope->__pyx_v_self->_writer); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -163127,7 +151831,6 @@ static PyObject *__pyx_gb_4lxml_5etree_23_AsyncFileWriterElement_7generator8(__p * await self._writer._async_outfile.write(data) * */ - __Pyx_TraceLine(1376,0,__PYX_ERR(8, 1376, __pyx_L1_error)) __pyx_t_3 = (__pyx_cur_scope->__pyx_v_data != Py_None)&&(PyBytes_GET_SIZE(__pyx_cur_scope->__pyx_v_data) != 0); if (__pyx_t_3) { @@ -163138,7 +151841,6 @@ static PyObject *__pyx_gb_4lxml_5etree_23_AsyncFileWriterElement_7generator8(__p * * */ - __Pyx_TraceLine(1377,0,__PYX_ERR(8, 1377, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->_writer->_async_outfile, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; @@ -163151,45 +151853,16 @@ static PyObject *__pyx_gb_4lxml_5etree_23_AsyncFileWriterElement_7generator8(__p __Pyx_DECREF_SET(__pyx_t_1, function); } } - if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_cur_scope->__pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1377, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_1)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_data}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1377, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_data}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1377, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 1377, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(__pyx_cur_scope->__pyx_v_data); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_data); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_cur_scope->__pyx_v_data); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1377, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - } + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_cur_scope->__pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_cur_scope->__pyx_v_data); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, awaiting value */ @@ -163230,14 +151903,14 @@ static PyObject *__pyx_gb_4lxml_5etree_23_AsyncFileWriterElement_7generator8(__p __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("__aexit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -163329,11 +152002,9 @@ static int __pyx_pw_4lxml_5etree_18_FileWriterElement_1__cinit__(PyObject *__pyx static int __pyx_pf_4lxml_5etree_18_FileWriterElement___cinit__(struct __pyx_obj_4lxml_5etree__FileWriterElement *__pyx_v_self, struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *__pyx_v_writer, PyObject *__pyx_v_element_config, int __pyx_v_method) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[8], 1389, 0, __PYX_ERR(8, 1389, __pyx_L1_error)); /* "src/lxml/serializer.pxi":1390 * @@ -163342,7 +152013,6 @@ static int __pyx_pf_4lxml_5etree_18_FileWriterElement___cinit__(struct __pyx_obj * self._element = element_config * self._new_method = method */ - __Pyx_TraceLine(1390,0,__PYX_ERR(8, 1390, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_writer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_writer)); __Pyx_GOTREF(__pyx_v_self->_writer); @@ -163356,7 +152026,6 @@ static int __pyx_pf_4lxml_5etree_18_FileWriterElement___cinit__(struct __pyx_obj * self._new_method = method * self._old_method = writer._method */ - __Pyx_TraceLine(1391,0,__PYX_ERR(8, 1391, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_element_config); __Pyx_GIVEREF(__pyx_v_element_config); __Pyx_GOTREF(__pyx_v_self->_element); @@ -163370,7 +152039,6 @@ static int __pyx_pf_4lxml_5etree_18_FileWriterElement___cinit__(struct __pyx_obj * self._old_method = writer._method * */ - __Pyx_TraceLine(1392,0,__PYX_ERR(8, 1392, __pyx_L1_error)) __pyx_v_self->_new_method = __pyx_v_method; /* "src/lxml/serializer.pxi":1393 @@ -163380,7 +152048,6 @@ static int __pyx_pf_4lxml_5etree_18_FileWriterElement___cinit__(struct __pyx_obj * * def __enter__(self): */ - __Pyx_TraceLine(1393,0,__PYX_ERR(8, 1393, __pyx_L1_error)) __pyx_t_1 = __pyx_v_writer->_method; __pyx_v_self->_old_method = __pyx_t_1; @@ -163394,12 +152061,6 @@ static int __pyx_pf_4lxml_5etree_18_FileWriterElement___cinit__(struct __pyx_obj /* function exit code */ __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._FileWriterElement.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -163428,14 +152089,11 @@ static PyObject *__pyx_pw_4lxml_5etree_18_FileWriterElement_3__enter__(PyObject static PyObject *__pyx_pf_4lxml_5etree_18_FileWriterElement_2__enter__(struct __pyx_obj_4lxml_5etree__FileWriterElement *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__294) __Pyx_RefNannySetupContext("__enter__", 0); - __Pyx_TraceCall("__enter__", __pyx_f[8], 1395, 0, __PYX_ERR(8, 1395, __pyx_L1_error)); /* "src/lxml/serializer.pxi":1396 * @@ -163444,7 +152102,6 @@ static PyObject *__pyx_pf_4lxml_5etree_18_FileWriterElement_2__enter__(struct __ * self._writer._write_start_element(self._element) * */ - __Pyx_TraceLine(1396,0,__PYX_ERR(8, 1396, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_new_method; __pyx_v_self->_writer->_method = __pyx_t_1; @@ -163455,7 +152112,6 @@ static PyObject *__pyx_pf_4lxml_5etree_18_FileWriterElement_2__enter__(struct __ * * def __exit__(self, exc_type, exc_val, exc_tb): */ - __Pyx_TraceLine(1397,0,__PYX_ERR(8, 1397, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_element; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = __pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_element(__pyx_v_self->_writer, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1397, __pyx_L1_error) @@ -163481,7 +152137,6 @@ static PyObject *__pyx_pf_4lxml_5etree_18_FileWriterElement_2__enter__(struct __ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -163496,7 +152151,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18_FileWriterElement_2__enter__(struct __ /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_18_FileWriterElement_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_5etree_18_FileWriterElement_5__exit__ = {"__exit__", (PyCFunction)__pyx_pw_4lxml_5etree_18_FileWriterElement_5__exit__, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_5etree_18_FileWriterElement_5__exit__ = {"__exit__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_18_FileWriterElement_5__exit__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_5etree_18_FileWriterElement_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_exc_type = 0; CYTHON_UNUSED PyObject *__pyx_v_exc_val = 0; @@ -163569,14 +152224,11 @@ static PyObject *__pyx_pw_4lxml_5etree_18_FileWriterElement_5__exit__(PyObject * static PyObject *__pyx_pf_4lxml_5etree_18_FileWriterElement_4__exit__(struct __pyx_obj_4lxml_5etree__FileWriterElement *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v_exc_val, CYTHON_UNUSED PyObject *__pyx_v_exc_tb) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; - __Pyx_TraceFrameInit(__pyx_codeobj__295) __Pyx_RefNannySetupContext("__exit__", 0); - __Pyx_TraceCall("__exit__", __pyx_f[8], 1399, 0, __PYX_ERR(8, 1399, __pyx_L1_error)); /* "src/lxml/serializer.pxi":1400 * @@ -163585,7 +152237,6 @@ static PyObject *__pyx_pf_4lxml_5etree_18_FileWriterElement_4__exit__(struct __p * self._writer._method = self._old_method * */ - __Pyx_TraceLine(1400,0,__PYX_ERR(8, 1400, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_element; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_end_element(__pyx_v_self->_writer, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1400, __pyx_L1_error) @@ -163600,7 +152251,6 @@ static PyObject *__pyx_pf_4lxml_5etree_18_FileWriterElement_4__exit__(struct __p * * */ - __Pyx_TraceLine(1401,0,__PYX_ERR(8, 1401, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->_old_method; __pyx_v_self->_writer->_method = __pyx_t_3; @@ -163622,7 +152272,6 @@ static PyObject *__pyx_pf_4lxml_5etree_18_FileWriterElement_4__exit__(struct __p __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -163703,11 +152352,9 @@ static int __pyx_pw_4lxml_5etree_14_MethodChanger_1__cinit__(PyObject *__pyx_v_s static int __pyx_pf_4lxml_5etree_14_MethodChanger___cinit__(struct __pyx_obj_4lxml_5etree__MethodChanger *__pyx_v_self, struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *__pyx_v_writer, int __pyx_v_method) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[8], 1414, 0, __PYX_ERR(8, 1414, __pyx_L1_error)); /* "src/lxml/serializer.pxi":1415 * @@ -163716,7 +152363,6 @@ static int __pyx_pf_4lxml_5etree_14_MethodChanger___cinit__(struct __pyx_obj_4lx * self._new_method = method * self._old_method = writer._method */ - __Pyx_TraceLine(1415,0,__PYX_ERR(8, 1415, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_writer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_writer)); __Pyx_GOTREF(__pyx_v_self->_writer); @@ -163730,7 +152376,6 @@ static int __pyx_pf_4lxml_5etree_14_MethodChanger___cinit__(struct __pyx_obj_4lx * self._old_method = writer._method * self._entered = False */ - __Pyx_TraceLine(1416,0,__PYX_ERR(8, 1416, __pyx_L1_error)) __pyx_v_self->_new_method = __pyx_v_method; /* "src/lxml/serializer.pxi":1417 @@ -163740,7 +152385,6 @@ static int __pyx_pf_4lxml_5etree_14_MethodChanger___cinit__(struct __pyx_obj_4lx * self._entered = False * self._exited = False */ - __Pyx_TraceLine(1417,0,__PYX_ERR(8, 1417, __pyx_L1_error)) __pyx_t_1 = __pyx_v_writer->_method; __pyx_v_self->_old_method = __pyx_t_1; @@ -163751,7 +152395,6 @@ static int __pyx_pf_4lxml_5etree_14_MethodChanger___cinit__(struct __pyx_obj_4lx * self._exited = False * */ - __Pyx_TraceLine(1418,0,__PYX_ERR(8, 1418, __pyx_L1_error)) __pyx_v_self->_entered = 0; /* "src/lxml/serializer.pxi":1419 @@ -163761,7 +152404,6 @@ static int __pyx_pf_4lxml_5etree_14_MethodChanger___cinit__(struct __pyx_obj_4lx * * def __enter__(self): */ - __Pyx_TraceLine(1419,0,__PYX_ERR(8, 1419, __pyx_L1_error)) __pyx_v_self->_exited = 0; /* "src/lxml/serializer.pxi":1414 @@ -163774,12 +152416,6 @@ static int __pyx_pf_4lxml_5etree_14_MethodChanger___cinit__(struct __pyx_obj_4lx /* function exit code */ __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._MethodChanger.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -163808,15 +152444,13 @@ static PyObject *__pyx_pw_4lxml_5etree_14_MethodChanger_3__enter__(PyObject *__p static PyObject *__pyx_pf_4lxml_5etree_14_MethodChanger_2__enter__(struct __pyx_obj_4lxml_5etree__MethodChanger *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - __Pyx_TraceFrameInit(__pyx_codeobj__296) + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; __Pyx_RefNannySetupContext("__enter__", 0); - __Pyx_TraceCall("__enter__", __pyx_f[8], 1421, 0, __PYX_ERR(8, 1421, __pyx_L1_error)); /* "src/lxml/serializer.pxi":1422 * @@ -163825,7 +152459,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_MethodChanger_2__enter__(struct __pyx_ * raise LxmlSyntaxError("Inconsistent enter action in context manager") * self._writer._method = self._new_method */ - __Pyx_TraceLine(1422,0,__PYX_ERR(8, 1422, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_entered != 0); if (unlikely(__pyx_t_1)) { @@ -163836,14 +152469,25 @@ static PyObject *__pyx_pf_4lxml_5etree_14_MethodChanger_2__enter__(struct __pyx_ * self._writer._method = self._new_method * self._entered = True */ - __Pyx_TraceLine(1423,0,__PYX_ERR(8, 1423, __pyx_L1_error)) - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1423, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__297, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1423, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1423, __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_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_Inconsistent_enter_action_in_con) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_Inconsistent_enter_action_in_con); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1423, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(8, 1423, __pyx_L1_error) /* "src/lxml/serializer.pxi":1422 @@ -163862,9 +152506,8 @@ static PyObject *__pyx_pf_4lxml_5etree_14_MethodChanger_2__enter__(struct __pyx_ * self._entered = True * */ - __Pyx_TraceLine(1424,0,__PYX_ERR(8, 1424, __pyx_L1_error)) - __pyx_t_4 = __pyx_v_self->_new_method; - __pyx_v_self->_writer->_method = __pyx_t_4; + __pyx_t_5 = __pyx_v_self->_new_method; + __pyx_v_self->_writer->_method = __pyx_t_5; /* "src/lxml/serializer.pxi":1425 * raise LxmlSyntaxError("Inconsistent enter action in context manager") @@ -163873,7 +152516,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_MethodChanger_2__enter__(struct __pyx_ * * def __exit__(self, exc_type, exc_val, exc_tb): */ - __Pyx_TraceLine(1425,0,__PYX_ERR(8, 1425, __pyx_L1_error)) __pyx_v_self->_entered = 1; /* "src/lxml/serializer.pxi":1421 @@ -163890,11 +152532,11 @@ static PyObject *__pyx_pf_4lxml_5etree_14_MethodChanger_2__enter__(struct __pyx_ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("lxml.etree._MethodChanger.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -163909,7 +152551,7 @@ static PyObject *__pyx_pf_4lxml_5etree_14_MethodChanger_2__enter__(struct __pyx_ /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_14_MethodChanger_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_5etree_14_MethodChanger_5__exit__ = {"__exit__", (PyCFunction)__pyx_pw_4lxml_5etree_14_MethodChanger_5__exit__, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_5etree_14_MethodChanger_5__exit__ = {"__exit__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_14_MethodChanger_5__exit__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_5etree_14_MethodChanger_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_exc_type = 0; CYTHON_UNUSED PyObject *__pyx_v_exc_val = 0; @@ -163982,15 +152624,13 @@ static PyObject *__pyx_pw_4lxml_5etree_14_MethodChanger_5__exit__(PyObject *__py static PyObject *__pyx_pf_4lxml_5etree_14_MethodChanger_4__exit__(struct __pyx_obj_4lxml_5etree__MethodChanger *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v_exc_val, CYTHON_UNUSED PyObject *__pyx_v_exc_tb) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - __Pyx_TraceFrameInit(__pyx_codeobj__298) + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; __Pyx_RefNannySetupContext("__exit__", 0); - __Pyx_TraceCall("__exit__", __pyx_f[8], 1427, 0, __PYX_ERR(8, 1427, __pyx_L1_error)); /* "src/lxml/serializer.pxi":1428 * @@ -163999,7 +152639,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_MethodChanger_4__exit__(struct __pyx_o * raise LxmlSyntaxError("Inconsistent exit action in context manager") * if self._writer._method != self._new_method: */ - __Pyx_TraceLine(1428,0,__PYX_ERR(8, 1428, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_exited != 0); if (unlikely(__pyx_t_1)) { @@ -164010,14 +152649,25 @@ static PyObject *__pyx_pf_4lxml_5etree_14_MethodChanger_4__exit__(struct __pyx_o * if self._writer._method != self._new_method: * raise LxmlSyntaxError("Method changed outside of context manager") */ - __Pyx_TraceLine(1429,0,__PYX_ERR(8, 1429, __pyx_L1_error)) - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1429, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__299, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1429, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1429, __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_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_Inconsistent_exit_action_in_cont) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_Inconsistent_exit_action_in_cont); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(8, 1429, __pyx_L1_error) /* "src/lxml/serializer.pxi":1428 @@ -164036,7 +152686,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_MethodChanger_4__exit__(struct __pyx_o * raise LxmlSyntaxError("Method changed outside of context manager") * self._writer._method = self._old_method */ - __Pyx_TraceLine(1430,0,__PYX_ERR(8, 1430, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_writer->_method != __pyx_v_self->_new_method) != 0); if (unlikely(__pyx_t_1)) { @@ -164047,10 +152696,21 @@ static PyObject *__pyx_pf_4lxml_5etree_14_MethodChanger_4__exit__(struct __pyx_o * self._writer._method = self._old_method * self._exited = True */ - __Pyx_TraceLine(1431,0,__PYX_ERR(8, 1431, __pyx_L1_error)) - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1431, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 1431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__300, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1431, __pyx_L1_error) + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_Method_changed_outside_of_contex) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_Method_changed_outside_of_contex); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); @@ -164073,9 +152733,8 @@ static PyObject *__pyx_pf_4lxml_5etree_14_MethodChanger_4__exit__(struct __pyx_o * self._exited = True * */ - __Pyx_TraceLine(1432,0,__PYX_ERR(8, 1432, __pyx_L1_error)) - __pyx_t_4 = __pyx_v_self->_old_method; - __pyx_v_self->_writer->_method = __pyx_t_4; + __pyx_t_5 = __pyx_v_self->_old_method; + __pyx_v_self->_writer->_method = __pyx_t_5; /* "src/lxml/serializer.pxi":1433 * raise LxmlSyntaxError("Method changed outside of context manager") @@ -164084,7 +152743,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_MethodChanger_4__exit__(struct __pyx_o * * async def __aenter__(self): */ - __Pyx_TraceLine(1433,0,__PYX_ERR(8, 1433, __pyx_L1_error)) __pyx_v_self->_exited = 1; /* "src/lxml/serializer.pxi":1427 @@ -164101,11 +152759,11 @@ static PyObject *__pyx_pf_4lxml_5etree_14_MethodChanger_4__exit__(struct __pyx_o __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("lxml.etree._MethodChanger.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -164150,7 +152808,7 @@ static PyObject *__pyx_pf_4lxml_5etree_14_MethodChanger_6__aenter__(struct __pyx __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_14_MethodChanger_8generator9, __pyx_codeobj__301, (PyObject *) __pyx_cur_scope, __pyx_n_s_aenter, __pyx_n_s_MethodChanger___aenter, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(8, 1435, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_14_MethodChanger_8generator9, __pyx_codeobj__70, (PyObject *) __pyx_cur_scope, __pyx_n_s_aenter, __pyx_n_s_MethodChanger___aenter, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(8, 1435, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -164170,18 +152828,14 @@ static PyObject *__pyx_gb_4lxml_5etree_14_MethodChanger_8generator9(__pyx_Corout { struct __pyx_obj_4lxml_5etree___pyx_scope_struct_9___aenter__ *__pyx_cur_scope = ((struct __pyx_obj_4lxml_5etree___pyx_scope_struct_9___aenter__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__aenter__", 0); - __Pyx_TraceFrameInit(__pyx_codeobj__301) - __Pyx_TraceCall("__aenter__", __pyx_f[8], 1435, 0, __PYX_ERR(8, 1435, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } @@ -164195,7 +152849,6 @@ static PyObject *__pyx_gb_4lxml_5etree_14_MethodChanger_8generator9(__pyx_Corout * * async def __aexit__(self, *args): */ - __Pyx_TraceLine(1437,0,__PYX_ERR(8, 1437, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -164209,12 +152862,9 @@ static PyObject *__pyx_gb_4lxml_5etree_14_MethodChanger_8generator9(__pyx_Corout __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1437, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1437, __pyx_L1_error) - } + __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(8, 1437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_1); @@ -164239,10 +152889,11 @@ static PyObject *__pyx_gb_4lxml_5etree_14_MethodChanger_8generator9(__pyx_Corout __Pyx_AddTraceback("__aenter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -164258,7 +152909,7 @@ static PyObject *__pyx_gb_4lxml_5etree_14_MethodChanger_11generator10(__pyx_Coro /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_14_MethodChanger_10__aexit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_5etree_14_MethodChanger_10__aexit__ = {"__aexit__", (PyCFunction)__pyx_pw_4lxml_5etree_14_MethodChanger_10__aexit__, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_5etree_14_MethodChanger_10__aexit__ = {"__aexit__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_14_MethodChanger_10__aexit__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_5etree_14_MethodChanger_10__aexit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_r = 0; @@ -164295,7 +152946,7 @@ static PyObject *__pyx_pf_4lxml_5etree_14_MethodChanger_9__aexit__(struct __pyx_ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args); { - __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_14_MethodChanger_11generator10, __pyx_codeobj__302, (PyObject *) __pyx_cur_scope, __pyx_n_s_aexit, __pyx_n_s_MethodChanger___aexit, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(8, 1439, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_14_MethodChanger_11generator10, __pyx_codeobj__71, (PyObject *) __pyx_cur_scope, __pyx_n_s_aexit, __pyx_n_s_MethodChanger___aexit, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(8, 1439, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -164315,17 +152966,13 @@ static PyObject *__pyx_gb_4lxml_5etree_14_MethodChanger_11generator10(__pyx_Coro { struct __pyx_obj_4lxml_5etree___pyx_scope_struct_10___aexit__ *__pyx_cur_scope = ((struct __pyx_obj_4lxml_5etree___pyx_scope_struct_10___aexit__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__aexit__", 0); - __Pyx_TraceFrameInit(__pyx_codeobj__302) - __Pyx_TraceCall("__aexit__", __pyx_f[8], 1439, 0, __PYX_ERR(8, 1439, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } @@ -164337,7 +152984,6 @@ static PyObject *__pyx_gb_4lxml_5etree_14_MethodChanger_11generator10(__pyx_Coro * # for your async convenience * return self.__exit__(*args) # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(1441,0,__PYX_ERR(8, 1441, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 1441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -164365,10 +153011,11 @@ static PyObject *__pyx_gb_4lxml_5etree_14_MethodChanger_11generator10(__pyx_Coro __Pyx_AddTraceback("__aexit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -164409,7 +153056,7 @@ static int __pyx_pw_4lxml_5etree_9iterparse_1__init__(PyObject *__pyx_v_self, Py { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,&__pyx_n_s_events,&__pyx_n_s_tag,&__pyx_n_s_attribute_defaults,&__pyx_n_s_dtd_validation,&__pyx_n_s_load_dtd,&__pyx_n_s_no_network,&__pyx_n_s_remove_blank_text,&__pyx_n_s_compact,&__pyx_n_s_resolve_entities,&__pyx_n_s_remove_comments,&__pyx_n_s_remove_pis,&__pyx_n_s_strip_cdata,&__pyx_n_s_encoding,&__pyx_n_s_html,&__pyx_n_s_recover,&__pyx_n_s_huge_tree,&__pyx_n_s_collect_ids,&__pyx_n_s_schema,0}; PyObject* values[19] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; - values[1] = ((PyObject *)__pyx_tuple__303); + values[1] = ((PyObject *)__pyx_tuple__72); values[2] = ((PyObject *)Py_None); /* "src/lxml/iterparse.pxi":68 @@ -164506,7 +153153,7 @@ static int __pyx_pw_4lxml_5etree_9iterparse_1__init__(PyObject *__pyx_v_self, Py } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(13, 67, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(14, 67, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -164539,13 +153186,13 @@ static int __pyx_pw_4lxml_5etree_9iterparse_1__init__(PyObject *__pyx_v_self, Py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 67, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 67, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.iterparse.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_schema), __pyx_ptype_4lxml_5etree_XMLSchema, 1, "schema", 0))) __PYX_ERR(13, 73, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_schema), __pyx_ptype_4lxml_5etree_XMLSchema, 1, "schema", 0))) __PYX_ERR(14, 73, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_9iterparse___init__(((struct __pyx_obj_4lxml_5etree_iterparse *)__pyx_v_self), __pyx_v_source, __pyx_v_events, __pyx_v_tag, __pyx_v_attribute_defaults, __pyx_v_dtd_validation, __pyx_v_load_dtd, __pyx_v_no_network, __pyx_v_remove_blank_text, __pyx_v_compact, __pyx_v_resolve_entities, __pyx_v_remove_comments, __pyx_v_remove_pis, __pyx_v_strip_cdata, __pyx_v_encoding, __pyx_v_html, __pyx_v_recover, __pyx_v_huge_tree, __pyx_v_collect_ids, __pyx_v_schema); /* "src/lxml/iterparse.pxi":67 @@ -164569,7 +153216,6 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr struct __pyx_obj_4lxml_5etree__FeedParser *__pyx_v_parser = NULL; PyObject *__pyx_v_event = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -164579,7 +153225,6 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr PyObject *(*__pyx_t_6)(PyObject *); PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[13], 67, 0, __PYX_ERR(13, 67, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_source); __Pyx_INCREF(__pyx_v_events); __Pyx_INCREF(__pyx_v_recover); @@ -164591,8 +153236,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * self._filename = source * if python.IS_PYTHON2: */ - __Pyx_TraceLine(74,0,__PYX_ERR(13, 74, __pyx_L1_error)) - __pyx_t_1 = __Pyx_HasAttr(__pyx_v_source, __pyx_n_s_read); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(13, 74, __pyx_L1_error) + __pyx_t_1 = __Pyx_HasAttr(__pyx_v_source, __pyx_n_s_read); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(14, 74, __pyx_L1_error) __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { @@ -164603,7 +153247,6 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * if python.IS_PYTHON2: * source = _encodeFilename(source) */ - __Pyx_TraceLine(75,0,__PYX_ERR(13, 75, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_source); __Pyx_GIVEREF(__pyx_v_source); __Pyx_GOTREF(__pyx_v_self->_filename); @@ -164617,7 +153260,6 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * source = _encodeFilename(source) * source = open(source, 'rb') */ - __Pyx_TraceLine(76,0,__PYX_ERR(13, 76, __pyx_L1_error)) __pyx_t_2 = (IS_PYTHON2 != 0); if (__pyx_t_2) { @@ -164628,8 +153270,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * source = open(source, 'rb') * self._close_source_after_read = True */ - __Pyx_TraceLine(77,0,__PYX_ERR(13, 77, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 77, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_source, __pyx_t_3); __pyx_t_3 = 0; @@ -164650,8 +153291,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * self._close_source_after_read = True * else: */ - __Pyx_TraceLine(78,0,__PYX_ERR(13, 78, __pyx_L1_error)) - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 78, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_source); __Pyx_GIVEREF(__pyx_v_source); @@ -164659,7 +153299,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr __Pyx_INCREF(__pyx_n_s_rb); __Pyx_GIVEREF(__pyx_n_s_rb); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_rb); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 78, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_source, __pyx_t_4); @@ -164672,7 +153312,6 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * else: * self._filename = _getFilenameForFile(source) */ - __Pyx_TraceLine(79,0,__PYX_ERR(13, 79, __pyx_L1_error)) __pyx_v_self->_close_source_after_read = 1; /* "src/lxml/iterparse.pxi":74 @@ -164692,9 +153331,8 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * self._close_source_after_read = False * */ - __Pyx_TraceLine(81,0,__PYX_ERR(13, 81, __pyx_L1_error)) /*else*/ { - __pyx_t_4 = __pyx_f_4lxml_5etree__getFilenameForFile(__pyx_v_source); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 81, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__getFilenameForFile(__pyx_v_source); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->_filename); @@ -164709,7 +153347,6 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * * if recover is None: */ - __Pyx_TraceLine(82,0,__PYX_ERR(13, 82, __pyx_L1_error)) __pyx_v_self->_close_source_after_read = 0; } __pyx_L3:; @@ -164721,7 +153358,6 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * recover = html * */ - __Pyx_TraceLine(84,0,__PYX_ERR(13, 84, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_recover == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -164733,7 +153369,6 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * * if html: */ - __Pyx_TraceLine(85,0,__PYX_ERR(13, 85, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_html); __Pyx_DECREF_SET(__pyx_v_recover, __pyx_v_html); @@ -164753,8 +153388,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * # make sure we're not looking for namespaces * events = [event for event in events */ - __Pyx_TraceLine(87,0,__PYX_ERR(13, 87, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_html); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(13, 87, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_html); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(14, 87, __pyx_L1_error) if (__pyx_t_1) { /* "src/lxml/iterparse.pxi":89 @@ -164764,33 +153398,32 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * if event not in ('start-ns', 'end-ns')] * parser = HTMLPullParser( */ - __Pyx_TraceLine(89,0,__PYX_ERR(13, 89, __pyx_L1_error)) - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 89, __pyx_L1_error) + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_v_events)) || PyTuple_CheckExact(__pyx_v_events)) { __pyx_t_3 = __pyx_v_events; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_events); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 89, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_events); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(13, 89, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(14, 89, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(13, 89, __pyx_L1_error) + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(14, 89, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(13, 89, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(14, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(13, 89, __pyx_L1_error) + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(14, 89, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(13, 89, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(14, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -164800,7 +153433,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(13, 89, __pyx_L1_error) + else __PYX_ERR(14, 89, __pyx_L1_error) } break; } @@ -164816,16 +153449,15 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * parser = HTMLPullParser( * events, */ - __Pyx_TraceLine(90,0,__PYX_ERR(13, 90, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_event); __pyx_t_7 = __pyx_v_event; - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_kp_s_start_ns, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(13, 90, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_kp_s_start_ns, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(14, 90, __pyx_L1_error) if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L10_bool_binop_done; } - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_kp_s_end_ns, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(13, 90, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_kp_s_end_ns, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(14, 90, __pyx_L1_error) __pyx_t_1 = __pyx_t_2; __pyx_L10_bool_binop_done:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -164839,8 +153471,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * if event not in ('start-ns', 'end-ns')] * parser = HTMLPullParser( */ - __Pyx_TraceLine(89,0,__PYX_ERR(13, 89, __pyx_L1_error)) - if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_v_event))) __PYX_ERR(13, 89, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_v_event))) __PYX_ERR(14, 89, __pyx_L1_error) /* "src/lxml/iterparse.pxi":90 * # make sure we're not looking for namespaces @@ -164858,7 +153489,6 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * if event not in ('start-ns', 'end-ns')] * parser = HTMLPullParser( */ - __Pyx_TraceLine(89,0,__PYX_ERR(13, 89, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_events, __pyx_t_4); @@ -164871,8 +153501,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * events, * tag=tag, */ - __Pyx_TraceLine(91,0,__PYX_ERR(13, 91, __pyx_L1_error)) - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 91, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_events); __Pyx_GIVEREF(__pyx_v_events); @@ -164885,10 +153514,9 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * recover=recover, * base_url=self._filename, */ - __Pyx_TraceLine(93,0,__PYX_ERR(13, 93, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyDict_NewPresized(12); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 93, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(12); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_tag, __pyx_v_tag) < 0) __PYX_ERR(13, 93, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_tag, __pyx_v_tag) < 0) __PYX_ERR(14, 93, __pyx_L1_error) /* "src/lxml/iterparse.pxi":94 * events, @@ -164897,8 +153525,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * base_url=self._filename, * encoding=encoding, */ - __Pyx_TraceLine(94,0,__PYX_ERR(13, 94, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_recover, __pyx_v_recover) < 0) __PYX_ERR(13, 93, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_recover, __pyx_v_recover) < 0) __PYX_ERR(14, 93, __pyx_L1_error) /* "src/lxml/iterparse.pxi":95 * tag=tag, @@ -164907,8 +153534,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * encoding=encoding, * remove_blank_text=remove_blank_text, */ - __Pyx_TraceLine(95,0,__PYX_ERR(13, 95, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_base_url, __pyx_v_self->_filename) < 0) __PYX_ERR(13, 93, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_base_url, __pyx_v_self->_filename) < 0) __PYX_ERR(14, 93, __pyx_L1_error) /* "src/lxml/iterparse.pxi":96 * recover=recover, @@ -164917,8 +153543,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * remove_blank_text=remove_blank_text, * remove_comments=remove_comments, */ - __Pyx_TraceLine(96,0,__PYX_ERR(13, 96, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_encoding, __pyx_v_encoding) < 0) __PYX_ERR(13, 93, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_encoding, __pyx_v_encoding) < 0) __PYX_ERR(14, 93, __pyx_L1_error) /* "src/lxml/iterparse.pxi":97 * base_url=self._filename, @@ -164927,8 +153552,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * remove_comments=remove_comments, * remove_pis=remove_pis, */ - __Pyx_TraceLine(97,0,__PYX_ERR(13, 97, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_remove_blank_text, __pyx_v_remove_blank_text) < 0) __PYX_ERR(13, 93, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_remove_blank_text, __pyx_v_remove_blank_text) < 0) __PYX_ERR(14, 93, __pyx_L1_error) /* "src/lxml/iterparse.pxi":98 * encoding=encoding, @@ -164937,8 +153561,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * remove_pis=remove_pis, * strip_cdata=strip_cdata, */ - __Pyx_TraceLine(98,0,__PYX_ERR(13, 98, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_remove_comments, __pyx_v_remove_comments) < 0) __PYX_ERR(13, 93, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_remove_comments, __pyx_v_remove_comments) < 0) __PYX_ERR(14, 93, __pyx_L1_error) /* "src/lxml/iterparse.pxi":99 * remove_blank_text=remove_blank_text, @@ -164947,8 +153570,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * strip_cdata=strip_cdata, * no_network=no_network, */ - __Pyx_TraceLine(99,0,__PYX_ERR(13, 99, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_remove_pis, __pyx_v_remove_pis) < 0) __PYX_ERR(13, 93, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_remove_pis, __pyx_v_remove_pis) < 0) __PYX_ERR(14, 93, __pyx_L1_error) /* "src/lxml/iterparse.pxi":100 * remove_comments=remove_comments, @@ -164957,8 +153579,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * no_network=no_network, * target=None, # TODO */ - __Pyx_TraceLine(100,0,__PYX_ERR(13, 100, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_strip_cdata, __pyx_v_strip_cdata) < 0) __PYX_ERR(13, 93, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_strip_cdata, __pyx_v_strip_cdata) < 0) __PYX_ERR(14, 93, __pyx_L1_error) /* "src/lxml/iterparse.pxi":101 * remove_pis=remove_pis, @@ -164967,8 +153588,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * target=None, # TODO * schema=schema, */ - __Pyx_TraceLine(101,0,__PYX_ERR(13, 101, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_no_network, __pyx_v_no_network) < 0) __PYX_ERR(13, 93, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_no_network, __pyx_v_no_network) < 0) __PYX_ERR(14, 93, __pyx_L1_error) /* "src/lxml/iterparse.pxi":102 * strip_cdata=strip_cdata, @@ -164977,8 +153597,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * schema=schema, * compact=compact) */ - __Pyx_TraceLine(102,0,__PYX_ERR(13, 102, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_target, Py_None) < 0) __PYX_ERR(13, 93, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_target, Py_None) < 0) __PYX_ERR(14, 93, __pyx_L1_error) /* "src/lxml/iterparse.pxi":103 * no_network=no_network, @@ -164987,8 +153606,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * compact=compact) * else: */ - __Pyx_TraceLine(103,0,__PYX_ERR(13, 103, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_schema, ((PyObject *)__pyx_v_schema)) < 0) __PYX_ERR(13, 93, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_schema, ((PyObject *)__pyx_v_schema)) < 0) __PYX_ERR(14, 93, __pyx_L1_error) /* "src/lxml/iterparse.pxi":104 * target=None, # TODO @@ -164997,8 +153615,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * else: * parser = XMLPullParser( */ - __Pyx_TraceLine(104,0,__PYX_ERR(13, 104, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_compact, __pyx_v_compact) < 0) __PYX_ERR(13, 93, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_compact, __pyx_v_compact) < 0) __PYX_ERR(14, 93, __pyx_L1_error) /* "src/lxml/iterparse.pxi":91 * events = [event for event in events @@ -165007,8 +153624,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * events, * tag=tag, */ - __Pyx_TraceLine(91,0,__PYX_ERR(13, 91, __pyx_L1_error)) - __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_HTMLPullParser), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(13, 91, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_HTMLPullParser), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(14, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -165032,7 +153648,6 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * events, * tag=tag, */ - __Pyx_TraceLine(106,0,__PYX_ERR(13, 106, __pyx_L1_error)) /*else*/ { /* "src/lxml/iterparse.pxi":107 @@ -165042,8 +153657,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * tag=tag, * recover=recover, */ - __Pyx_TraceLine(107,0,__PYX_ERR(13, 107, __pyx_L1_error)) - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(13, 106, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(14, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_events); __Pyx_GIVEREF(__pyx_v_events); @@ -165056,10 +153670,9 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * recover=recover, * base_url=self._filename, */ - __Pyx_TraceLine(108,0,__PYX_ERR(13, 108, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyDict_NewPresized(18); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 108, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(18); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_tag, __pyx_v_tag) < 0) __PYX_ERR(13, 108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_tag, __pyx_v_tag) < 0) __PYX_ERR(14, 108, __pyx_L1_error) /* "src/lxml/iterparse.pxi":109 * events, @@ -165068,8 +153681,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * base_url=self._filename, * encoding=encoding, */ - __Pyx_TraceLine(109,0,__PYX_ERR(13, 109, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_recover, __pyx_v_recover) < 0) __PYX_ERR(13, 108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_recover, __pyx_v_recover) < 0) __PYX_ERR(14, 108, __pyx_L1_error) /* "src/lxml/iterparse.pxi":110 * tag=tag, @@ -165078,8 +153690,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * encoding=encoding, * attribute_defaults=attribute_defaults, */ - __Pyx_TraceLine(110,0,__PYX_ERR(13, 110, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_base_url, __pyx_v_self->_filename) < 0) __PYX_ERR(13, 108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_base_url, __pyx_v_self->_filename) < 0) __PYX_ERR(14, 108, __pyx_L1_error) /* "src/lxml/iterparse.pxi":111 * recover=recover, @@ -165088,8 +153699,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * attribute_defaults=attribute_defaults, * dtd_validation=dtd_validation, */ - __Pyx_TraceLine(111,0,__PYX_ERR(13, 111, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_encoding, __pyx_v_encoding) < 0) __PYX_ERR(13, 108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_encoding, __pyx_v_encoding) < 0) __PYX_ERR(14, 108, __pyx_L1_error) /* "src/lxml/iterparse.pxi":112 * base_url=self._filename, @@ -165098,8 +153708,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * dtd_validation=dtd_validation, * load_dtd=load_dtd, */ - __Pyx_TraceLine(112,0,__PYX_ERR(13, 112, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_attribute_defaults, __pyx_v_attribute_defaults) < 0) __PYX_ERR(13, 108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_attribute_defaults, __pyx_v_attribute_defaults) < 0) __PYX_ERR(14, 108, __pyx_L1_error) /* "src/lxml/iterparse.pxi":113 * encoding=encoding, @@ -165108,8 +153717,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * load_dtd=load_dtd, * no_network=no_network, */ - __Pyx_TraceLine(113,0,__PYX_ERR(13, 113, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtd_validation, __pyx_v_dtd_validation) < 0) __PYX_ERR(13, 108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtd_validation, __pyx_v_dtd_validation) < 0) __PYX_ERR(14, 108, __pyx_L1_error) /* "src/lxml/iterparse.pxi":114 * attribute_defaults=attribute_defaults, @@ -165118,8 +153726,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * no_network=no_network, * schema=schema, */ - __Pyx_TraceLine(114,0,__PYX_ERR(13, 114, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_load_dtd, __pyx_v_load_dtd) < 0) __PYX_ERR(13, 108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_load_dtd, __pyx_v_load_dtd) < 0) __PYX_ERR(14, 108, __pyx_L1_error) /* "src/lxml/iterparse.pxi":115 * dtd_validation=dtd_validation, @@ -165128,8 +153735,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * schema=schema, * huge_tree=huge_tree, */ - __Pyx_TraceLine(115,0,__PYX_ERR(13, 115, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_no_network, __pyx_v_no_network) < 0) __PYX_ERR(13, 108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_no_network, __pyx_v_no_network) < 0) __PYX_ERR(14, 108, __pyx_L1_error) /* "src/lxml/iterparse.pxi":116 * load_dtd=load_dtd, @@ -165138,8 +153744,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * huge_tree=huge_tree, * remove_blank_text=remove_blank_text, */ - __Pyx_TraceLine(116,0,__PYX_ERR(13, 116, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_schema, ((PyObject *)__pyx_v_schema)) < 0) __PYX_ERR(13, 108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_schema, ((PyObject *)__pyx_v_schema)) < 0) __PYX_ERR(14, 108, __pyx_L1_error) /* "src/lxml/iterparse.pxi":117 * no_network=no_network, @@ -165148,8 +153753,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * remove_blank_text=remove_blank_text, * resolve_entities=resolve_entities, */ - __Pyx_TraceLine(117,0,__PYX_ERR(13, 117, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_huge_tree, __pyx_v_huge_tree) < 0) __PYX_ERR(13, 108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_huge_tree, __pyx_v_huge_tree) < 0) __PYX_ERR(14, 108, __pyx_L1_error) /* "src/lxml/iterparse.pxi":118 * schema=schema, @@ -165158,8 +153762,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * resolve_entities=resolve_entities, * remove_comments=remove_comments, */ - __Pyx_TraceLine(118,0,__PYX_ERR(13, 118, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_remove_blank_text, __pyx_v_remove_blank_text) < 0) __PYX_ERR(13, 108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_remove_blank_text, __pyx_v_remove_blank_text) < 0) __PYX_ERR(14, 108, __pyx_L1_error) /* "src/lxml/iterparse.pxi":119 * huge_tree=huge_tree, @@ -165168,8 +153771,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * remove_comments=remove_comments, * remove_pis=remove_pis, */ - __Pyx_TraceLine(119,0,__PYX_ERR(13, 119, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_resolve_entities, __pyx_v_resolve_entities) < 0) __PYX_ERR(13, 108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_resolve_entities, __pyx_v_resolve_entities) < 0) __PYX_ERR(14, 108, __pyx_L1_error) /* "src/lxml/iterparse.pxi":120 * remove_blank_text=remove_blank_text, @@ -165178,8 +153780,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * remove_pis=remove_pis, * strip_cdata=strip_cdata, */ - __Pyx_TraceLine(120,0,__PYX_ERR(13, 120, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_remove_comments, __pyx_v_remove_comments) < 0) __PYX_ERR(13, 108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_remove_comments, __pyx_v_remove_comments) < 0) __PYX_ERR(14, 108, __pyx_L1_error) /* "src/lxml/iterparse.pxi":121 * resolve_entities=resolve_entities, @@ -165188,8 +153789,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * strip_cdata=strip_cdata, * collect_ids=True, */ - __Pyx_TraceLine(121,0,__PYX_ERR(13, 121, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_remove_pis, __pyx_v_remove_pis) < 0) __PYX_ERR(13, 108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_remove_pis, __pyx_v_remove_pis) < 0) __PYX_ERR(14, 108, __pyx_L1_error) /* "src/lxml/iterparse.pxi":122 * remove_comments=remove_comments, @@ -165198,8 +153798,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * collect_ids=True, * target=None, # TODO */ - __Pyx_TraceLine(122,0,__PYX_ERR(13, 122, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_strip_cdata, __pyx_v_strip_cdata) < 0) __PYX_ERR(13, 108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_strip_cdata, __pyx_v_strip_cdata) < 0) __PYX_ERR(14, 108, __pyx_L1_error) /* "src/lxml/iterparse.pxi":123 * remove_pis=remove_pis, @@ -165208,8 +153807,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * target=None, # TODO * compact=compact) */ - __Pyx_TraceLine(123,0,__PYX_ERR(13, 123, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_collect_ids, Py_True) < 0) __PYX_ERR(13, 108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_collect_ids, Py_True) < 0) __PYX_ERR(14, 108, __pyx_L1_error) /* "src/lxml/iterparse.pxi":124 * strip_cdata=strip_cdata, @@ -165218,8 +153816,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * compact=compact) * */ - __Pyx_TraceLine(124,0,__PYX_ERR(13, 124, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_target, Py_None) < 0) __PYX_ERR(13, 108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_target, Py_None) < 0) __PYX_ERR(14, 108, __pyx_L1_error) /* "src/lxml/iterparse.pxi":125 * collect_ids=True, @@ -165228,8 +153825,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * * self._events = parser.read_events() */ - __Pyx_TraceLine(125,0,__PYX_ERR(13, 125, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_compact, __pyx_v_compact) < 0) __PYX_ERR(13, 108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_compact, __pyx_v_compact) < 0) __PYX_ERR(14, 108, __pyx_L1_error) /* "src/lxml/iterparse.pxi":106 * compact=compact) @@ -165238,8 +153834,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * events, * tag=tag, */ - __Pyx_TraceLine(106,0,__PYX_ERR(13, 106, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_XMLPullParser), __pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 106, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_XMLPullParser), __pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -165255,8 +153850,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * self._parser = parser * self._source = source */ - __Pyx_TraceLine(127,0,__PYX_ERR(13, 127, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_parser), __pyx_n_s_read_events); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 127, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_parser), __pyx_n_s_read_events); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -165268,12 +153862,9 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (__pyx_t_7) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 127, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 127, __pyx_L1_error) - } + __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_4); @@ -165289,7 +153880,6 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * self._source = source * */ - __Pyx_TraceLine(128,0,__PYX_ERR(13, 128, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_parser)); __Pyx_GIVEREF(((PyObject *)__pyx_v_parser)); __Pyx_GOTREF(__pyx_v_self->_parser); @@ -165303,7 +153893,6 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * * property error_log: */ - __Pyx_TraceLine(129,0,__PYX_ERR(13, 129, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_source); __Pyx_GIVEREF(__pyx_v_source); __Pyx_GOTREF(__pyx_v_self->_source); @@ -165333,7 +153922,6 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr __Pyx_XDECREF(__pyx_v_source); __Pyx_XDECREF(__pyx_v_events); __Pyx_XDECREF(__pyx_v_recover); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -165361,11 +153949,9 @@ static PyObject *__pyx_pw_4lxml_5etree_9iterparse_9error_log_1__get__(PyObject * static PyObject *__pyx_pf_4lxml_5etree_9iterparse_9error_log___get__(struct __pyx_obj_4lxml_5etree_iterparse *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[13], 134, 0, __PYX_ERR(13, 134, __pyx_L1_error)); /* "src/lxml/iterparse.pxi":135 * """ @@ -165374,9 +153960,8 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_9error_log___get__(struct __py * * property resolvers: */ - __Pyx_TraceLine(135,0,__PYX_ERR(13, 135, __pyx_L1_error)) __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(13, 135, __pyx_L1_error) + __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) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -165397,7 +153982,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_9error_log___get__(struct __py __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -165425,11 +154009,9 @@ static PyObject *__pyx_pw_4lxml_5etree_9iterparse_9resolvers_1__get__(PyObject * static PyObject *__pyx_pf_4lxml_5etree_9iterparse_9resolvers___get__(struct __pyx_obj_4lxml_5etree_iterparse *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[13], 140, 0, __PYX_ERR(13, 140, __pyx_L1_error)); /* "src/lxml/iterparse.pxi":141 * """ @@ -165438,9 +154020,8 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_9resolvers___get__(struct __py * * property version: */ - __Pyx_TraceLine(141,0,__PYX_ERR(13, 141, __pyx_L1_error)) __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(13, 141, __pyx_L1_error) + __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) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -165461,7 +154042,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_9resolvers___get__(struct __py __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -165489,11 +154069,9 @@ static PyObject *__pyx_pw_4lxml_5etree_9iterparse_7version_1__get__(PyObject *__ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_7version___get__(struct __pyx_obj_4lxml_5etree_iterparse *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[13], 145, 0, __PYX_ERR(13, 145, __pyx_L1_error)); /* "src/lxml/iterparse.pxi":146 * u"""The version of the underlying XML parser.""" @@ -165502,9 +154080,8 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_7version___get__(struct __pyx_ * * def set_element_class_lookup(self, ElementClassLookup lookup = None): */ - __Pyx_TraceLine(146,0,__PYX_ERR(13, 146, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_parser), __pyx_n_s_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 146, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_parser), __pyx_n_s_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -165525,7 +154102,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_7version___get__(struct __pyx_ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -165541,7 +154117,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_7version___get__(struct __pyx_ /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_9iterparse_3set_element_class_lookup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_9iterparse_2set_element_class_lookup[] = "set_element_class_lookup(self, lookup = None)\n\n Set a lookup scheme for element classes generated from this parser.\n\n Reset it by passing None or nothing.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_9iterparse_3set_element_class_lookup = {"set_element_class_lookup", (PyCFunction)__pyx_pw_4lxml_5etree_9iterparse_3set_element_class_lookup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_9iterparse_2set_element_class_lookup}; +static PyMethodDef __pyx_mdef_4lxml_5etree_9iterparse_3set_element_class_lookup = {"set_element_class_lookup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_9iterparse_3set_element_class_lookup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_9iterparse_2set_element_class_lookup}; static PyObject *__pyx_pw_4lxml_5etree_9iterparse_3set_element_class_lookup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct LxmlElementClassLookup *__pyx_v_lookup = 0; PyObject *__pyx_r = 0; @@ -165569,7 +154145,7 @@ static PyObject *__pyx_pw_4lxml_5etree_9iterparse_3set_element_class_lookup(PyOb } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_element_class_lookup") < 0)) __PYX_ERR(13, 148, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_element_class_lookup") < 0)) __PYX_ERR(14, 148, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -165583,13 +154159,13 @@ static PyObject *__pyx_pw_4lxml_5etree_9iterparse_3set_element_class_lookup(PyOb } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_element_class_lookup", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 148, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_element_class_lookup", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 148, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.iterparse.set_element_class_lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lookup), __pyx_ptype_4lxml_5etree_ElementClassLookup, 1, "lookup", 0))) __PYX_ERR(13, 148, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lookup), __pyx_ptype_4lxml_5etree_ElementClassLookup, 1, "lookup", 0))) __PYX_ERR(14, 148, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_9iterparse_2set_element_class_lookup(((struct __pyx_obj_4lxml_5etree_iterparse *)__pyx_v_self), __pyx_v_lookup); /* function exit code */ @@ -165603,15 +154179,11 @@ static PyObject *__pyx_pw_4lxml_5etree_9iterparse_3set_element_class_lookup(PyOb static PyObject *__pyx_pf_4lxml_5etree_9iterparse_2set_element_class_lookup(struct __pyx_obj_4lxml_5etree_iterparse *__pyx_v_self, struct LxmlElementClassLookup *__pyx_v_lookup) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__304) __Pyx_RefNannySetupContext("set_element_class_lookup", 0); - __Pyx_TraceCall("set_element_class_lookup", __pyx_f[13], 148, 0, __PYX_ERR(13, 148, __pyx_L1_error)); /* "src/lxml/iterparse.pxi":155 * Reset it by passing None or nothing. @@ -165620,8 +154192,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_2set_element_class_lookup(stru * * def makeelement(self, _tag, attrib=None, nsmap=None, **_extra): */ - __Pyx_TraceLine(155,0,__PYX_ERR(13, 155, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_parser), __pyx_n_s_set_element_class_lookup); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 155, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_parser), __pyx_n_s_set_element_class_lookup); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -165633,38 +154204,10 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_2set_element_class_lookup(stru __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_lookup)); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 155, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)__pyx_v_lookup)}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 155, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)__pyx_v_lookup)}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 155, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 155, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_lookup)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_lookup)); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject *)__pyx_v_lookup)); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 155, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_lookup)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_lookup)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 155, __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; @@ -165683,12 +154226,10 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_2set_element_class_lookup(stru __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("lxml.etree.iterparse.set_element_class_lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -165704,7 +154245,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_2set_element_class_lookup(stru /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_9iterparse_5makeelement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_9iterparse_4makeelement[] = "makeelement(self, _tag, attrib=None, nsmap=None, **_extra)\n\n Creates a new element associated with this parser.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_9iterparse_5makeelement = {"makeelement", (PyCFunction)__pyx_pw_4lxml_5etree_9iterparse_5makeelement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_9iterparse_4makeelement}; +static PyMethodDef __pyx_mdef_4lxml_5etree_9iterparse_5makeelement = {"makeelement", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_9iterparse_5makeelement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_9iterparse_4makeelement}; static PyObject *__pyx_pw_4lxml_5etree_9iterparse_5makeelement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v__tag = 0; CYTHON_UNUSED PyObject *__pyx_v_attrib = 0; @@ -165752,7 +154293,7 @@ static PyObject *__pyx_pw_4lxml_5etree_9iterparse_5makeelement(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(13, 157, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__extra, values, pos_args, "makeelement") < 0)) __PYX_ERR(14, 157, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -165771,7 +154312,7 @@ static PyObject *__pyx_pw_4lxml_5etree_9iterparse_5makeelement(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(13, 157, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("makeelement", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 157, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v__extra); __pyx_v__extra = 0; __Pyx_AddTraceback("lxml.etree.iterparse.makeelement", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -165788,15 +154329,12 @@ static PyObject *__pyx_pw_4lxml_5etree_9iterparse_5makeelement(PyObject *__pyx_v static PyObject *__pyx_pf_4lxml_5etree_9iterparse_4makeelement(struct __pyx_obj_4lxml_5etree_iterparse *__pyx_v_self, PyObject *__pyx_v__tag, CYTHON_UNUSED PyObject *__pyx_v_attrib, CYTHON_UNUSED PyObject *__pyx_v_nsmap, PyObject *__pyx_v__extra) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__305) __Pyx_RefNannySetupContext("makeelement", 0); - __Pyx_TraceCall("makeelement", __pyx_f[13], 157, 0, __PYX_ERR(13, 157, __pyx_L1_error)); /* "src/lxml/iterparse.pxi":162 * Creates a new element associated with this parser. @@ -165805,8 +154343,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_4makeelement(struct __pyx_obj_ * _tag, attrib=None, nsmap=None, **_extra) * */ - __Pyx_TraceLine(162,0,__PYX_ERR(13, 162, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_parser), __pyx_n_s_makeelement); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 162, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_parser), __pyx_n_s_makeelement); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "src/lxml/iterparse.pxi":163 @@ -165816,8 +154353,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_4makeelement(struct __pyx_obj_ * * @cython.final */ - __Pyx_TraceLine(163,0,__PYX_ERR(13, 163, __pyx_L1_error)) - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 162, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v__tag); __Pyx_GIVEREF(__pyx_v__tag); @@ -165830,8 +154366,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_4makeelement(struct __pyx_obj_ * _tag, attrib=None, nsmap=None, **_extra) * */ - __Pyx_TraceLine(162,0,__PYX_ERR(13, 162, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 163, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "src/lxml/iterparse.pxi":163 @@ -165841,12 +154376,11 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_4makeelement(struct __pyx_obj_ * * @cython.final */ - __Pyx_TraceLine(163,0,__PYX_ERR(13, 163, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_attrib, Py_None) < 0) __PYX_ERR(13, 163, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_nsmap, Py_None) < 0) __PYX_ERR(13, 163, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_attrib, Py_None) < 0) __PYX_ERR(14, 163, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_nsmap, Py_None) < 0) __PYX_ERR(14, 163, __pyx_L1_error) __pyx_t_3 = __pyx_t_4; __pyx_t_4 = 0; - if (__Pyx_MergeKeywords(__pyx_t_3, __pyx_v__extra) < 0) __PYX_ERR(13, 163, __pyx_L1_error) + if (__Pyx_MergeKeywords(__pyx_t_3, __pyx_v__extra) < 0) __PYX_ERR(14, 163, __pyx_L1_error) /* "src/lxml/iterparse.pxi":162 * Creates a new element associated with this parser. @@ -165855,8 +154389,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_4makeelement(struct __pyx_obj_ * _tag, attrib=None, nsmap=None, **_extra) * */ - __Pyx_TraceLine(162,0,__PYX_ERR(13, 162, __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(13, 162, __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(14, 162, __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; @@ -165883,7 +154416,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_4makeelement(struct __pyx_obj_ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -165899,7 +154431,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_4makeelement(struct __pyx_obj_ static PyObject *__pyx_f_4lxml_5etree_9iterparse__close_source(struct __pyx_obj_4lxml_5etree_iterparse *__pyx_v_self) { PyObject *__pyx_v_close = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -165916,7 +154447,6 @@ static PyObject *__pyx_f_4lxml_5etree_9iterparse__close_source(struct __pyx_obj_ PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; __Pyx_RefNannySetupContext("_close_source", 0); - __Pyx_TraceCall("_close_source", __pyx_f[13], 166, 0, __PYX_ERR(13, 166, __pyx_L1_error)); /* "src/lxml/iterparse.pxi":167 * @cython.final @@ -165925,7 +154455,6 @@ static PyObject *__pyx_f_4lxml_5etree_9iterparse__close_source(struct __pyx_obj_ * return * if not self._close_source_after_read: */ - __Pyx_TraceLine(167,0,__PYX_ERR(13, 167, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_source == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -165937,7 +154466,6 @@ static PyObject *__pyx_f_4lxml_5etree_9iterparse__close_source(struct __pyx_obj_ * if not self._close_source_after_read: * self._source = None */ - __Pyx_TraceLine(168,0,__PYX_ERR(13, 168, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -165958,7 +154486,6 @@ static PyObject *__pyx_f_4lxml_5etree_9iterparse__close_source(struct __pyx_obj_ * self._source = None * return */ - __Pyx_TraceLine(169,0,__PYX_ERR(13, 169, __pyx_L1_error)) __pyx_t_2 = ((!(__pyx_v_self->_close_source_after_read != 0)) != 0); if (__pyx_t_2) { @@ -165969,7 +154496,6 @@ static PyObject *__pyx_f_4lxml_5etree_9iterparse__close_source(struct __pyx_obj_ * return * try: */ - __Pyx_TraceLine(170,0,__PYX_ERR(13, 170, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_source); @@ -165983,7 +154509,6 @@ static PyObject *__pyx_f_4lxml_5etree_9iterparse__close_source(struct __pyx_obj_ * try: * close = self._source.close */ - __Pyx_TraceLine(171,0,__PYX_ERR(13, 171, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -166004,7 +154529,6 @@ static PyObject *__pyx_f_4lxml_5etree_9iterparse__close_source(struct __pyx_obj_ * close = self._source.close * except AttributeError: */ - __Pyx_TraceLine(172,0,__PYX_ERR(13, 172, __pyx_L6_error)) /*try:*/ { { __Pyx_PyThreadState_declare @@ -166022,8 +154546,7 @@ static PyObject *__pyx_f_4lxml_5etree_9iterparse__close_source(struct __pyx_obj_ * except AttributeError: * close = None */ - __Pyx_TraceLine(173,0,__PYX_ERR(13, 173, __pyx_L8_error)) - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_source, __pyx_n_s_close); if (unlikely(!__pyx_t_6)) __PYX_ERR(13, 173, __pyx_L8_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_source, __pyx_n_s_close); if (unlikely(!__pyx_t_6)) __PYX_ERR(14, 173, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_close = __pyx_t_6; __pyx_t_6 = 0; @@ -166050,11 +154573,10 @@ static PyObject *__pyx_f_4lxml_5etree_9iterparse__close_source(struct __pyx_obj_ * close = None * finally: */ - __Pyx_TraceLine(174,0,__PYX_ERR(13, 174, __pyx_L10_except_error)) __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_7) { __Pyx_AddTraceback("lxml.etree.iterparse._close_source", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(13, 174, __pyx_L10_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(14, 174, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_9); @@ -166066,12 +154588,11 @@ static PyObject *__pyx_f_4lxml_5etree_9iterparse__close_source(struct __pyx_obj_ * finally: * self._source = None */ - __Pyx_TraceLine(175,0,__PYX_ERR(13, 175, __pyx_L10_except_error)) __Pyx_INCREF(Py_None); __Pyx_XDECREF_SET(__pyx_v_close, Py_None); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L9_exception_handled; } goto __pyx_L10_except_error; @@ -166105,7 +154626,6 @@ static PyObject *__pyx_f_4lxml_5etree_9iterparse__close_source(struct __pyx_obj_ * if close is not None: * close() */ - __Pyx_TraceLine(177,0,__PYX_ERR(13, 177, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ __Pyx_INCREF(Py_None); @@ -166163,7 +154683,6 @@ static PyObject *__pyx_f_4lxml_5etree_9iterparse__close_source(struct __pyx_obj_ * close() * */ - __Pyx_TraceLine(178,0,__PYX_ERR(13, 178, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_close != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -166175,7 +154694,6 @@ static PyObject *__pyx_f_4lxml_5etree_9iterparse__close_source(struct __pyx_obj_ * * def __iter__(self): */ - __Pyx_TraceLine(179,0,__PYX_ERR(13, 179, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_close); __pyx_t_8 = __pyx_v_close; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { @@ -166187,12 +154705,9 @@ static PyObject *__pyx_f_4lxml_5etree_9iterparse__close_source(struct __pyx_obj_ __Pyx_DECREF_SET(__pyx_t_8, function); } } - if (__pyx_t_6) { - __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(13, 179, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(13, 179, __pyx_L1_error) - } + __pyx_t_9 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(14, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -166226,7 +154741,6 @@ static PyObject *__pyx_f_4lxml_5etree_9iterparse__close_source(struct __pyx_obj_ __pyx_L0:; __Pyx_XDECREF(__pyx_v_close); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -166254,10 +154768,8 @@ static PyObject *__pyx_pw_4lxml_5etree_9iterparse_7__iter__(PyObject *__pyx_v_se static PyObject *__pyx_pf_4lxml_5etree_9iterparse_6__iter__(struct __pyx_obj_4lxml_5etree_iterparse *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 0); - __Pyx_TraceCall("__iter__", __pyx_f[13], 181, 0, __PYX_ERR(13, 181, __pyx_L1_error)); /* "src/lxml/iterparse.pxi":182 * @@ -166266,7 +154778,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_6__iter__(struct __pyx_obj_4lx * * def __next__(self): */ - __Pyx_TraceLine(182,0,__PYX_ERR(13, 182, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); @@ -166281,12 +154792,8 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_6__iter__(struct __pyx_obj_4lx */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.iterparse.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -166318,7 +154825,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx PyObject *__pyx_v_e = NULL; PyObject *__pyx_v_error = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -166337,7 +154843,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx PyObject *__pyx_t_15 = NULL; int __pyx_t_16; __Pyx_RefNannySetupContext("__next__", 0); - __Pyx_TraceCall("__next__", __pyx_f[13], 184, 0, __PYX_ERR(13, 184, __pyx_L1_error)); /* "src/lxml/iterparse.pxi":185 * @@ -166346,7 +154851,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * return next(self._events) * except StopIteration: */ - __Pyx_TraceLine(185,0,__PYX_ERR(13, 185, __pyx_L3_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -166363,11 +154867,10 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * except StopIteration: * pass */ - __Pyx_TraceLine(186,0,__PYX_ERR(13, 186, __pyx_L3_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __pyx_v_self->_events; __Pyx_INCREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyIter_Next(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 186, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyIter_Next(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 186, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; @@ -166393,7 +154896,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * pass * context = <_SaxParserContext>self._parser._getPushParserContext() */ - __Pyx_TraceLine(187,0,__PYX_ERR(13, 187, __pyx_L5_except_error)) __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_StopIteration); if (__pyx_t_6) { __Pyx_ErrRestore(0,0,0); @@ -166434,8 +154936,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * if self._source is not None: * done = False */ - __Pyx_TraceLine(189,0,__PYX_ERR(13, 189, __pyx_L1_error)) - __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__FeedParser *)__pyx_v_self->_parser->__pyx_base.__pyx_vtab)->__pyx_base._getPushParserContext(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self->_parser))); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 189, __pyx_L1_error) + __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__FeedParser *)__pyx_v_self->_parser->__pyx_base.__pyx_vtab)->__pyx_base._getPushParserContext(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self->_parser))); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); @@ -166450,7 +154951,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * done = False * while not done: */ - __Pyx_TraceLine(190,0,__PYX_ERR(13, 190, __pyx_L1_error)) __pyx_t_7 = (__pyx_v_self->_source != Py_None); __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { @@ -166462,7 +154962,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * while not done: * try: */ - __Pyx_TraceLine(191,0,__PYX_ERR(13, 191, __pyx_L1_error)) __pyx_v_done = 0; /* "src/lxml/iterparse.pxi":192 @@ -166472,7 +154971,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * try: * done = self._read_more_events(context) */ - __Pyx_TraceLine(192,0,__PYX_ERR(13, 192, __pyx_L1_error)) while (1) { __pyx_t_8 = ((!(__pyx_v_done != 0)) != 0); if (!__pyx_t_8) break; @@ -166484,7 +154982,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * done = self._read_more_events(context) * return next(self._events) */ - __Pyx_TraceLine(193,0,__PYX_ERR(13, 193, __pyx_L12_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -166501,8 +154998,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * return next(self._events) * except StopIteration: */ - __Pyx_TraceLine(194,0,__PYX_ERR(13, 194, __pyx_L12_error)) - __pyx_t_8 = __pyx_f_4lxml_5etree_9iterparse__read_more_events(__pyx_v_self, __pyx_v_context); if (unlikely(__pyx_t_8 == ((int)-123))) __PYX_ERR(13, 194, __pyx_L12_error) + __pyx_t_8 = __pyx_f_4lxml_5etree_9iterparse__read_more_events(__pyx_v_self, __pyx_v_context); if (unlikely(__pyx_t_8 == ((int)-123))) __PYX_ERR(14, 194, __pyx_L12_error) __pyx_v_done = __pyx_t_8; /* "src/lxml/iterparse.pxi":195 @@ -166512,11 +155008,10 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * except StopIteration: * pass # no events yet */ - __Pyx_TraceLine(195,0,__PYX_ERR(13, 195, __pyx_L12_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __pyx_v_self->_events; __Pyx_INCREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyIter_Next(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 195, __pyx_L12_error) + __pyx_t_5 = __Pyx_PyIter_Next(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 195, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; @@ -166542,7 +155037,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * pass # no events yet * except Exception as e: */ - __Pyx_TraceLine(196,0,__PYX_ERR(13, 196, __pyx_L14_except_error)) __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_StopIteration); if (__pyx_t_6) { __Pyx_ErrRestore(0,0,0); @@ -166556,11 +155050,10 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * self._error = e * self._close_source() */ - __Pyx_TraceLine(198,0,__PYX_ERR(13, 198, __pyx_L14_except_error)) __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_6) { __Pyx_AddTraceback("lxml.etree.iterparse.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_9) < 0) __PYX_ERR(13, 198, __pyx_L14_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_9) < 0) __PYX_ERR(14, 198, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_9); @@ -166574,7 +155067,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * self._close_source() * try: */ - __Pyx_TraceLine(199,0,__PYX_ERR(13, 199, __pyx_L14_except_error)) __Pyx_INCREF(__pyx_v_e); __Pyx_GIVEREF(__pyx_v_e); __Pyx_GOTREF(__pyx_v_self->_error); @@ -166588,8 +155080,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * try: * return next(self._events) */ - __Pyx_TraceLine(200,0,__PYX_ERR(13, 200, __pyx_L14_except_error)) - __pyx_t_10 = __pyx_f_4lxml_5etree_9iterparse__close_source(__pyx_v_self); if (unlikely(!__pyx_t_10)) __PYX_ERR(13, 200, __pyx_L14_except_error) + __pyx_t_10 = __pyx_f_4lxml_5etree_9iterparse__close_source(__pyx_v_self); if (unlikely(!__pyx_t_10)) __PYX_ERR(14, 200, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -166600,7 +155091,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * return next(self._events) * except StopIteration: */ - __Pyx_TraceLine(201,0,__PYX_ERR(13, 201, __pyx_L22_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -166617,11 +155107,10 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * except StopIteration: * break */ - __Pyx_TraceLine(202,0,__PYX_ERR(13, 202, __pyx_L22_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_10 = __pyx_v_self->_events; __Pyx_INCREF(__pyx_t_10); - __pyx_t_14 = __Pyx_PyIter_Next(__pyx_t_10); if (unlikely(!__pyx_t_14)) __PYX_ERR(13, 202, __pyx_L22_error) + __pyx_t_14 = __Pyx_PyIter_Next(__pyx_t_10); if (unlikely(!__pyx_t_14)) __PYX_ERR(14, 202, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_r = __pyx_t_14; @@ -166650,11 +155139,10 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * break * # nothing left to read or return */ - __Pyx_TraceLine(203,0,__PYX_ERR(13, 203, __pyx_L24_except_error)) __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_StopIteration); if (__pyx_t_6) { __Pyx_AddTraceback("lxml.etree.iterparse.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_14, &__pyx_t_10, &__pyx_t_15) < 0) __PYX_ERR(13, 203, __pyx_L24_except_error) + if (__Pyx_GetException(&__pyx_t_14, &__pyx_t_10, &__pyx_t_15) < 0) __PYX_ERR(14, 203, __pyx_L24_except_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_15); @@ -166666,7 +155154,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * # nothing left to read or return * if self._error is not None: */ - __Pyx_TraceLine(204,0,__PYX_ERR(13, 204, __pyx_L24_except_error)) goto __pyx_L30_except_break; __pyx_L30_except_break:; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; @@ -166766,7 +155253,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * error = self._error * self._error = None */ - __Pyx_TraceLine(206,0,__PYX_ERR(13, 206, __pyx_L1_error)) __pyx_t_8 = (__pyx_v_self->_error != Py_None); __pyx_t_7 = (__pyx_t_8 != 0); if (unlikely(__pyx_t_7)) { @@ -166778,7 +155264,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * self._error = None * raise error */ - __Pyx_TraceLine(207,0,__PYX_ERR(13, 207, __pyx_L1_error)) __pyx_t_9 = __pyx_v_self->_error; __Pyx_INCREF(__pyx_t_9); __pyx_v_error = __pyx_t_9; @@ -166791,7 +155276,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * raise error * if (context._validator is not None */ - __Pyx_TraceLine(208,0,__PYX_ERR(13, 208, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_error); @@ -166805,9 +155289,8 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * if (context._validator is not None * and not context._validator.isvalid()): */ - __Pyx_TraceLine(209,0,__PYX_ERR(13, 209, __pyx_L1_error)) __Pyx_Raise(__pyx_v_error, 0, 0, 0); - __PYX_ERR(13, 209, __pyx_L1_error) + __PYX_ERR(14, 209, __pyx_L1_error) /* "src/lxml/iterparse.pxi":206 * break @@ -166825,7 +155308,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * and not context._validator.isvalid()): * _raiseParseError(context._c_ctxt, self._filename, */ - __Pyx_TraceLine(210,0,__PYX_ERR(13, 210, __pyx_L1_error)) __pyx_t_8 = (((PyObject *)__pyx_v_context->__pyx_base._validator) != Py_None); __pyx_t_16 = (__pyx_t_8 != 0); if (__pyx_t_16) { @@ -166841,7 +155323,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * _raiseParseError(context._c_ctxt, self._filename, * context._error_log) */ - __Pyx_TraceLine(211,0,__PYX_ERR(13, 211, __pyx_L1_error)) __pyx_t_16 = ((!(__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_isvalid(__pyx_v_context->__pyx_base._validator) != 0)) != 0); __pyx_t_7 = __pyx_t_16; __pyx_L34_bool_binop_done:; @@ -166853,7 +155334,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * and not context._validator.isvalid()): * _raiseParseError(context._c_ctxt, self._filename, */ - __Pyx_TraceLine(210,0,__PYX_ERR(13, 210, __pyx_L1_error)) if (__pyx_t_7) { /* "src/lxml/iterparse.pxi":212 @@ -166863,7 +155343,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * context._error_log) * # no errors => all done */ - __Pyx_TraceLine(212,0,__PYX_ERR(13, 212, __pyx_L1_error)) __pyx_t_9 = __pyx_v_self->_filename; __Pyx_INCREF(__pyx_t_9); @@ -166874,7 +155353,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * # no errors => all done * raise StopIteration */ - __Pyx_TraceLine(213,0,__PYX_ERR(13, 213, __pyx_L1_error)) __pyx_t_4 = ((PyObject *)__pyx_v_context->__pyx_base._error_log); __Pyx_INCREF(__pyx_t_4); @@ -166885,8 +155363,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * context._error_log) * # no errors => all done */ - __Pyx_TraceLine(212,0,__PYX_ERR(13, 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)0))) __PYX_ERR(13, 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)0))) __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; @@ -166906,9 +155383,8 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * * @cython.final */ - __Pyx_TraceLine(215,0,__PYX_ERR(13, 215, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); - __PYX_ERR(13, 215, __pyx_L1_error) + __PYX_ERR(14, 215, __pyx_L1_error) /* "src/lxml/iterparse.pxi":184 * return self @@ -166933,7 +155409,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx __Pyx_XDECREF(__pyx_v_e); __Pyx_XDECREF(__pyx_v_error); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -166949,23 +155424,22 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx static int __pyx_f_4lxml_5etree_9iterparse__read_more_events(struct __pyx_obj_4lxml_5etree_iterparse *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_4lxml_5etree__SaxParserContext *__pyx_v_context) { PyObject *__pyx_v_data = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; - int __pyx_t_3; + PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; - char const *__pyx_t_7; - PyObject *__pyx_t_8 = NULL; + int __pyx_t_7; + char const *__pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; __Pyx_RefNannySetupContext("_read_more_events", 0); - __Pyx_TraceCall("_read_more_events", __pyx_f[13], 218, 0, __PYX_ERR(13, 218, __pyx_L1_error)); /* "src/lxml/iterparse.pxi":219 * @cython.final @@ -166974,14 +155448,25 @@ static int __pyx_f_4lxml_5etree_9iterparse__read_more_events(struct __pyx_obj_4l * if not isinstance(data, bytes): * self._close_source() */ - __Pyx_TraceLine(219,0,__PYX_ERR(13, 219, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_source, __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 219, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__306, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 219, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_source, __pyx_n_s_read); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_data = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_int_32768) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_32768); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_data = __pyx_t_1; + __pyx_t_1 = 0; /* "src/lxml/iterparse.pxi":220 * cdef bint _read_more_events(self, _SaxParserContext context) except -123: @@ -166990,10 +155475,9 @@ static int __pyx_f_4lxml_5etree_9iterparse__read_more_events(struct __pyx_obj_4l * self._close_source() * raise TypeError("reading file objects must return bytes objects") */ - __Pyx_TraceLine(220,0,__PYX_ERR(13, 220, __pyx_L1_error)) - __pyx_t_3 = PyBytes_Check(__pyx_v_data); - __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0); - if (unlikely(__pyx_t_4)) { + __pyx_t_4 = PyBytes_Check(__pyx_v_data); + __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0); + if (unlikely(__pyx_t_5)) { /* "src/lxml/iterparse.pxi":221 * data = self._source.read(__ITERPARSE_CHUNK_SIZE) @@ -167002,10 +155486,9 @@ static int __pyx_f_4lxml_5etree_9iterparse__read_more_events(struct __pyx_obj_4l * raise TypeError("reading file objects must return bytes objects") * if not data: */ - __Pyx_TraceLine(221,0,__PYX_ERR(13, 221, __pyx_L1_error)) - __pyx_t_2 = __pyx_f_4lxml_5etree_9iterparse__close_source(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 221, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __pyx_f_4lxml_5etree_9iterparse__close_source(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/lxml/iterparse.pxi":222 * if not isinstance(data, bytes): @@ -167014,12 +155497,11 @@ static int __pyx_f_4lxml_5etree_9iterparse__read_more_events(struct __pyx_obj_4l * if not data: * try: */ - __Pyx_TraceLine(222,0,__PYX_ERR(13, 222, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__307, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 222, __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(13, 222, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(14, 222, __pyx_L1_error) /* "src/lxml/iterparse.pxi":220 * cdef bint _read_more_events(self, _SaxParserContext context) except -123: @@ -167037,10 +155519,9 @@ static int __pyx_f_4lxml_5etree_9iterparse__read_more_events(struct __pyx_obj_4l * try: * self.root = self._parser.close() */ - __Pyx_TraceLine(223,0,__PYX_ERR(13, 223, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_data); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(13, 223, __pyx_L1_error) - __pyx_t_3 = ((!__pyx_t_4) != 0); - if (__pyx_t_3) { + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_data); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(14, 223, __pyx_L1_error) + __pyx_t_4 = ((!__pyx_t_5) != 0); + if (__pyx_t_4) { /* "src/lxml/iterparse.pxi":224 * raise TypeError("reading file objects must return bytes objects") @@ -167049,7 +155530,6 @@ static int __pyx_f_4lxml_5etree_9iterparse__read_more_events(struct __pyx_obj_4l * self.root = self._parser.close() * finally: */ - __Pyx_TraceLine(224,0,__PYX_ERR(13, 224, __pyx_L6_error)) /*try:*/ { /* "src/lxml/iterparse.pxi":225 @@ -167059,14 +155539,13 @@ static int __pyx_f_4lxml_5etree_9iterparse__read_more_events(struct __pyx_obj_4l * finally: * self._close_source() */ - __Pyx_TraceLine(225,0,__PYX_ERR(13, 225, __pyx_L6_error)) - __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree__FeedParser *)__pyx_v_self->_parser->__pyx_base.__pyx_vtab)->close(__pyx_v_self->_parser, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 225, __pyx_L6_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__FeedParser *)__pyx_v_self->_parser->__pyx_base.__pyx_vtab)->close(__pyx_v_self->_parser, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 225, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->root); __Pyx_DECREF(__pyx_v_self->root); - __pyx_v_self->root = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_v_self->root = __pyx_t_1; + __pyx_t_1 = 0; } /* "src/lxml/iterparse.pxi":227 @@ -167076,59 +155555,59 @@ static int __pyx_f_4lxml_5etree_9iterparse__read_more_events(struct __pyx_obj_4l * return True * self._parser.feed(data) */ - __Pyx_TraceLine(227,0,__PYX_ERR(13, 227, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ - __pyx_t_2 = __pyx_f_4lxml_5etree_9iterparse__close_source(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 227, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __pyx_f_4lxml_5etree_9iterparse__close_source(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 227, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L7; } __pyx_L6_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign - __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10) < 0)) __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); - __pyx_t_5 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_7 = __pyx_filename; + __Pyx_XGOTREF(__pyx_t_14); + __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename; { - __pyx_t_2 = __pyx_f_4lxml_5etree_9iterparse__close_source(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 227, __pyx_L9_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __pyx_f_4lxml_5etree_9iterparse__close_source(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 227, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); } - __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ErrRestore(__pyx_t_8, __pyx_t_9, __pyx_t_10); - __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; - __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_7; + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11); + __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; + __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8; goto __pyx_L1_error; __pyx_L9_error:; if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); } - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; goto __pyx_L1_error; } __pyx_L7:; @@ -167141,7 +155620,6 @@ static int __pyx_f_4lxml_5etree_9iterparse__read_more_events(struct __pyx_obj_4l * self._parser.feed(data) * return False */ - __Pyx_TraceLine(228,0,__PYX_ERR(13, 228, __pyx_L1_error)) __pyx_r = 1; goto __pyx_L0; @@ -167161,10 +155639,9 @@ static int __pyx_f_4lxml_5etree_9iterparse__read_more_events(struct __pyx_obj_4l * return False * */ - __Pyx_TraceLine(229,0,__PYX_ERR(13, 229, __pyx_L1_error)) - __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree__FeedParser *)__pyx_v_self->_parser->__pyx_base.__pyx_vtab)->feed(__pyx_v_self->_parser, __pyx_v_data, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 229, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__FeedParser *)__pyx_v_self->_parser->__pyx_base.__pyx_vtab)->feed(__pyx_v_self->_parser, __pyx_v_data, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/lxml/iterparse.pxi":230 * return True @@ -167173,7 +155650,6 @@ static int __pyx_f_4lxml_5etree_9iterparse__read_more_events(struct __pyx_obj_4l * * */ - __Pyx_TraceLine(230,0,__PYX_ERR(13, 230, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -167189,11 +155665,11 @@ static int __pyx_f_4lxml_5etree_9iterparse__read_more_events(struct __pyx_obj_4l __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("lxml.etree.iterparse._read_more_events", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -123; __pyx_L0:; __Pyx_XDECREF(__pyx_v_data); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -167221,22 +155697,16 @@ static PyObject *__pyx_pw_4lxml_5etree_9iterparse_4root_1__get__(PyObject *__pyx static PyObject *__pyx_pf_4lxml_5etree_9iterparse_4root___get__(struct __pyx_obj_4lxml_5etree_iterparse *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[13], 61, 0, __PYX_ERR(13, 61, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->root); __pyx_r = __pyx_v_self->root; goto __pyx_L0; /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.iterparse.root.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -167261,7 +155731,7 @@ static int __pyx_pw_4lxml_5etree_8iterwalk_1__init__(PyObject *__pyx_v_self, PyO { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_element_or_tree,&__pyx_n_s_events,&__pyx_n_s_tag,0}; PyObject* values[3] = {0,0,0}; - values[1] = ((PyObject *)__pyx_tuple__308); + values[1] = ((PyObject *)__pyx_tuple__72); values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -167295,7 +155765,7 @@ static int __pyx_pw_4lxml_5etree_8iterwalk_1__init__(PyObject *__pyx_v_self, PyO } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(13, 261, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(14, 261, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -167314,7 +155784,7 @@ static int __pyx_pw_4lxml_5etree_8iterwalk_1__init__(PyObject *__pyx_v_self, PyO } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 261, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 261, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.iterwalk.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -167331,7 +155801,6 @@ static int __pyx_pf_4lxml_5etree_8iterwalk___init__(struct __pyx_obj_4lxml_5etre struct LxmlElement *__pyx_v_root = 0; int __pyx_v_ns_count; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -167341,7 +155810,6 @@ static int __pyx_pf_4lxml_5etree_8iterwalk___init__(struct __pyx_obj_4lxml_5etre PyObject *__pyx_t_6 = NULL; int __pyx_t_7; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[13], 261, 0, __PYX_ERR(13, 261, __pyx_L1_error)); /* "src/lxml/iterparse.pxi":264 * cdef _Element root @@ -167350,8 +155818,7 @@ static int __pyx_pf_4lxml_5etree_8iterwalk___init__(struct __pyx_obj_4lxml_5etre * self._event_filter = _buildParseEventFilter(events) * if tag is None or tag == '*': */ - __Pyx_TraceLine(264,0,__PYX_ERR(13, 264, __pyx_L1_error)) - __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 264, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_root = ((struct LxmlElement *)__pyx_t_1); __pyx_t_1 = 0; @@ -167363,8 +155830,7 @@ static int __pyx_pf_4lxml_5etree_8iterwalk___init__(struct __pyx_obj_4lxml_5etre * if tag is None or tag == '*': * self._matcher = None */ - __Pyx_TraceLine(265,0,__PYX_ERR(13, 265, __pyx_L1_error)) - __pyx_t_2 = __pyx_f_4lxml_5etree__buildParseEventFilter(__pyx_v_events); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(13, 265, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__buildParseEventFilter(__pyx_v_events); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(14, 265, __pyx_L1_error) __pyx_v_self->_event_filter = __pyx_t_2; /* "src/lxml/iterparse.pxi":266 @@ -167374,7 +155840,6 @@ static int __pyx_pf_4lxml_5etree_8iterwalk___init__(struct __pyx_obj_4lxml_5etre * self._matcher = None * else: */ - __Pyx_TraceLine(266,0,__PYX_ERR(13, 266, __pyx_L1_error)) __pyx_t_4 = (__pyx_v_tag == Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (!__pyx_t_5) { @@ -167382,7 +155847,7 @@ static int __pyx_pf_4lxml_5etree_8iterwalk___init__(struct __pyx_obj_4lxml_5etre __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_tag, __pyx_kp_s__160, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(13, 266, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_tag, __pyx_kp_s__40, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(14, 266, __pyx_L1_error) __pyx_t_3 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_3) { @@ -167394,7 +155859,6 @@ static int __pyx_pf_4lxml_5etree_8iterwalk___init__(struct __pyx_obj_4lxml_5etre * else: * self._matcher = _MultiTagMatcher.__new__(_MultiTagMatcher, tag) */ - __Pyx_TraceLine(267,0,__PYX_ERR(13, 267, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_matcher); @@ -167418,14 +155882,13 @@ static int __pyx_pf_4lxml_5etree_8iterwalk___init__(struct __pyx_obj_4lxml_5etre * self._node_stack = [] * self._events = [] */ - __Pyx_TraceLine(269,0,__PYX_ERR(13, 269, __pyx_L1_error)) /*else*/ { - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 269, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 269, __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_6 = ((PyObject *)__pyx_tp_new_4lxml_5etree__MultiTagMatcher(((PyTypeObject *)__pyx_ptype_4lxml_5etree__MultiTagMatcher), __pyx_t_1, NULL)); if (unlikely(!__pyx_t_6)) __PYX_ERR(13, 269, __pyx_L1_error) + __pyx_t_6 = ((PyObject *)__pyx_tp_new_4lxml_5etree__MultiTagMatcher(((PyTypeObject *)__pyx_ptype_4lxml_5etree__MultiTagMatcher), __pyx_t_1, NULL)); if (unlikely(!__pyx_t_6)) __PYX_ERR(14, 269, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); @@ -167443,8 +155906,7 @@ static int __pyx_pf_4lxml_5etree_8iterwalk___init__(struct __pyx_obj_4lxml_5etre * self._events = [] * self._pop_event = self._events.pop */ - __Pyx_TraceLine(270,0,__PYX_ERR(13, 270, __pyx_L1_error)) - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(13, 270, __pyx_L1_error) + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(14, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF(__pyx_v_self->_node_stack); @@ -167459,8 +155921,7 @@ static int __pyx_pf_4lxml_5etree_8iterwalk___init__(struct __pyx_obj_4lxml_5etre * self._pop_event = self._events.pop * self._skip_state = IWSKIP_CANNOT_SKIP # ignore all skip requests by default */ - __Pyx_TraceLine(271,0,__PYX_ERR(13, 271, __pyx_L1_error)) - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(13, 271, __pyx_L1_error) + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(14, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF(__pyx_v_self->_events); @@ -167475,8 +155936,7 @@ static int __pyx_pf_4lxml_5etree_8iterwalk___init__(struct __pyx_obj_4lxml_5etre * self._skip_state = IWSKIP_CANNOT_SKIP # ignore all skip requests by default * */ - __Pyx_TraceLine(272,0,__PYX_ERR(13, 272, __pyx_L1_error)) - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_events, __pyx_n_s_pop); if (unlikely(!__pyx_t_6)) __PYX_ERR(13, 272, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_events, __pyx_n_s_pop); if (unlikely(!__pyx_t_6)) __PYX_ERR(14, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF(__pyx_v_self->_pop_event); @@ -167491,7 +155951,6 @@ static int __pyx_pf_4lxml_5etree_8iterwalk___init__(struct __pyx_obj_4lxml_5etre * * if self._event_filter: */ - __Pyx_TraceLine(273,0,__PYX_ERR(13, 273, __pyx_L1_error)) __pyx_v_self->_skip_state = __pyx_e_4lxml_5etree_IWSKIP_CANNOT_SKIP; /* "src/lxml/iterparse.pxi":275 @@ -167501,7 +155960,6 @@ static int __pyx_pf_4lxml_5etree_8iterwalk___init__(struct __pyx_obj_4lxml_5etre * self._index = 0 * if self._matcher is not None and self._event_filter & PARSE_EVENT_FILTER_START: */ - __Pyx_TraceLine(275,0,__PYX_ERR(13, 275, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_self->_event_filter != 0); if (__pyx_t_3) { @@ -167512,7 +155970,6 @@ static int __pyx_pf_4lxml_5etree_8iterwalk___init__(struct __pyx_obj_4lxml_5etre * if self._matcher is not None and self._event_filter & PARSE_EVENT_FILTER_START: * self._matcher.cacheTags(root._doc) */ - __Pyx_TraceLine(276,0,__PYX_ERR(13, 276, __pyx_L1_error)) __pyx_v_self->_index = 0; /* "src/lxml/iterparse.pxi":277 @@ -167522,7 +155979,6 @@ static int __pyx_pf_4lxml_5etree_8iterwalk___init__(struct __pyx_obj_4lxml_5etre * self._matcher.cacheTags(root._doc) * ns_count = self._start_node(root) */ - __Pyx_TraceLine(277,0,__PYX_ERR(13, 277, __pyx_L1_error)) __pyx_t_5 = (((PyObject *)__pyx_v_self->_matcher) != Py_None); __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { @@ -167542,10 +155998,9 @@ static int __pyx_pf_4lxml_5etree_8iterwalk___init__(struct __pyx_obj_4lxml_5etre * ns_count = self._start_node(root) * self._node_stack.append( (root, ns_count) ) */ - __Pyx_TraceLine(278,0,__PYX_ERR(13, 278, __pyx_L1_error)) __pyx_t_6 = ((PyObject *)__pyx_v_root->_doc); __Pyx_INCREF(__pyx_t_6); - __pyx_t_2 = __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(__pyx_v_self->_matcher, ((struct LxmlDocument *)__pyx_t_6), NULL); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(13, 278, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(__pyx_v_self->_matcher, ((struct LxmlDocument *)__pyx_t_6), NULL); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(14, 278, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "src/lxml/iterparse.pxi":277 @@ -167564,8 +156019,7 @@ static int __pyx_pf_4lxml_5etree_8iterwalk___init__(struct __pyx_obj_4lxml_5etre * self._node_stack.append( (root, ns_count) ) * else: */ - __Pyx_TraceLine(279,0,__PYX_ERR(13, 279, __pyx_L1_error)) - __pyx_t_2 = __pyx_f_4lxml_5etree_8iterwalk__start_node(__pyx_v_self, __pyx_v_root); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(13, 279, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_8iterwalk__start_node(__pyx_v_self, __pyx_v_root); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(14, 279, __pyx_L1_error) __pyx_v_ns_count = __pyx_t_2; /* "src/lxml/iterparse.pxi":280 @@ -167575,14 +156029,13 @@ static int __pyx_pf_4lxml_5etree_8iterwalk___init__(struct __pyx_obj_4lxml_5etre * else: * self._index = -1 */ - __Pyx_TraceLine(280,0,__PYX_ERR(13, 280, __pyx_L1_error)) if (unlikely(__pyx_v_self->_node_stack == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(13, 280, __pyx_L1_error) + __PYX_ERR(14, 280, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_ns_count); if (unlikely(!__pyx_t_6)) __PYX_ERR(13, 280, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_ns_count); if (unlikely(!__pyx_t_6)) __PYX_ERR(14, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 280, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_root)); __Pyx_GIVEREF(((PyObject *)__pyx_v_root)); @@ -167590,7 +156043,7 @@ static int __pyx_pf_4lxml_5etree_8iterwalk___init__(struct __pyx_obj_4lxml_5etre __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_self->_node_stack, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(13, 280, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_self->_node_stack, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(14, 280, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/lxml/iterparse.pxi":275 @@ -167610,7 +156063,6 @@ static int __pyx_pf_4lxml_5etree_8iterwalk___init__(struct __pyx_obj_4lxml_5etre * * def __iter__(self): */ - __Pyx_TraceLine(282,0,__PYX_ERR(13, 282, __pyx_L1_error)) /*else*/ { __pyx_v_self->_index = -1; } @@ -167634,7 +156086,6 @@ static int __pyx_pf_4lxml_5etree_8iterwalk___init__(struct __pyx_obj_4lxml_5etre __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_root); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -167662,10 +156113,8 @@ static PyObject *__pyx_pw_4lxml_5etree_8iterwalk_3__iter__(PyObject *__pyx_v_sel static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_2__iter__(struct __pyx_obj_4lxml_5etree_iterwalk *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 0); - __Pyx_TraceCall("__iter__", __pyx_f[13], 284, 0, __PYX_ERR(13, 284, __pyx_L1_error)); /* "src/lxml/iterparse.pxi":285 * @@ -167674,7 +156123,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_2__iter__(struct __pyx_obj_4lxm * * def __next__(self): */ - __Pyx_TraceLine(285,0,__PYX_ERR(13, 285, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); @@ -167689,12 +156137,8 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_2__iter__(struct __pyx_obj_4lxm */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.iterwalk.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -167726,7 +156170,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm struct LxmlElement *__pyx_v_next_node = 0; int __pyx_v_ns_count; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -167737,7 +156180,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm PyObject *__pyx_t_7 = NULL; int __pyx_t_8; __Pyx_RefNannySetupContext("__next__", 0); - __Pyx_TraceCall("__next__", __pyx_f[13], 287, 0, __PYX_ERR(13, 287, __pyx_L1_error)); /* "src/lxml/iterparse.pxi":291 * cdef _Element node @@ -167746,7 +156188,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * if self._events: * return self._next_event() */ - __Pyx_TraceLine(291,0,__PYX_ERR(13, 291, __pyx_L1_error)) __pyx_v_ns_count = 0; /* "src/lxml/iterparse.pxi":292 @@ -167756,7 +156197,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * return self._next_event() * if self._matcher is not None and self._index >= 0: */ - __Pyx_TraceLine(292,0,__PYX_ERR(13, 292, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_events != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_events) != 0); if (__pyx_t_1) { @@ -167767,9 +156207,8 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * if self._matcher is not None and self._index >= 0: * node = self._node_stack[self._index][0] */ - __Pyx_TraceLine(293,0,__PYX_ERR(13, 293, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_4lxml_5etree_8iterwalk__next_event(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 293, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_8iterwalk__next_event(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -167791,7 +156230,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * node = self._node_stack[self._index][0] * self._matcher.cacheTags(node._doc) */ - __Pyx_TraceLine(294,0,__PYX_ERR(13, 294, __pyx_L1_error)) __pyx_t_3 = (((PyObject *)__pyx_v_self->_matcher) != Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { @@ -167811,17 +156249,16 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * self._matcher.cacheTags(node._doc) * */ - __Pyx_TraceLine(295,0,__PYX_ERR(13, 295, __pyx_L1_error)) if (unlikely(__pyx_v_self->_node_stack == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(13, 295, __pyx_L1_error) + __PYX_ERR(14, 295, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->_node_stack, __pyx_v_self->_index, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 295, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->_node_stack, __pyx_v_self->_index, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 295, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(13, 295, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(14, 295, __pyx_L1_error) __pyx_v_node = ((struct LxmlElement *)__pyx_t_5); __pyx_t_5 = 0; @@ -167832,10 +156269,9 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * * # find next node */ - __Pyx_TraceLine(296,0,__PYX_ERR(13, 296, __pyx_L1_error)) __pyx_t_5 = ((PyObject *)__pyx_v_node->_doc); __Pyx_INCREF(__pyx_t_5); - __pyx_t_6 = __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(__pyx_v_self->_matcher, ((struct LxmlDocument *)__pyx_t_5), NULL); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(13, 296, __pyx_L1_error) + __pyx_t_6 = __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(__pyx_v_self->_matcher, ((struct LxmlDocument *)__pyx_t_5), NULL); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(14, 296, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "src/lxml/iterparse.pxi":294 @@ -167854,7 +156290,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * node = self._node_stack[self._index][0] * */ - __Pyx_TraceLine(299,0,__PYX_ERR(13, 299, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_self->_index >= 0) != 0); if (!__pyx_t_1) break; @@ -167866,17 +156301,16 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * * if self._skip_state == IWSKIP_SKIP_NEXT: */ - __Pyx_TraceLine(300,0,__PYX_ERR(13, 300, __pyx_L1_error)) if (unlikely(__pyx_v_self->_node_stack == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(13, 300, __pyx_L1_error) + __PYX_ERR(14, 300, __pyx_L1_error) } - __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->_node_stack, __pyx_v_self->_index, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 300, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->_node_stack, __pyx_v_self->_index, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 300, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(13, 300, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(14, 300, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_node, ((struct LxmlElement *)__pyx_t_2)); __pyx_t_2 = 0; @@ -167887,7 +156321,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * c_child = NULL * else: */ - __Pyx_TraceLine(302,0,__PYX_ERR(13, 302, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_skip_state == __pyx_e_4lxml_5etree_IWSKIP_SKIP_NEXT) != 0); if (__pyx_t_1) { @@ -167898,7 +156331,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * else: * c_child = _findChildForwards(node._c_node, 0) */ - __Pyx_TraceLine(303,0,__PYX_ERR(13, 303, __pyx_L1_error)) __pyx_v_c_child = NULL; /* "src/lxml/iterparse.pxi":302 @@ -167918,7 +156350,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * self._skip_state = IWSKIP_CANNOT_SKIP * */ - __Pyx_TraceLine(305,0,__PYX_ERR(13, 305, __pyx_L1_error)) /*else*/ { __pyx_v_c_child = __pyx_f_4lxml_5etree__findChildForwards(__pyx_v_node->_c_node, 0); } @@ -167931,7 +156362,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * * if c_child is not NULL: */ - __Pyx_TraceLine(306,0,__PYX_ERR(13, 306, __pyx_L1_error)) __pyx_v_self->_skip_state = __pyx_e_4lxml_5etree_IWSKIP_CANNOT_SKIP; /* "src/lxml/iterparse.pxi":308 @@ -167941,7 +156371,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * # try children * next_node = _elementFactory(node._doc, c_child) */ - __Pyx_TraceLine(308,0,__PYX_ERR(13, 308, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_child != NULL) != 0); if (__pyx_t_1) { @@ -167952,10 +156381,9 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * else: * # back off */ - __Pyx_TraceLine(310,0,__PYX_ERR(13, 310, __pyx_L1_error)) __pyx_t_2 = ((PyObject *)__pyx_v_node->_doc); __Pyx_INCREF(__pyx_t_2); - __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_2), __pyx_v_c_child)); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 310, __pyx_L1_error) + __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_2), __pyx_v_c_child)); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_next_node, ((struct LxmlElement *)__pyx_t_5)); @@ -167978,7 +156406,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * while next_node is None: * # back off through parents */ - __Pyx_TraceLine(313,0,__PYX_ERR(13, 313, __pyx_L1_error)) /*else*/ { __Pyx_INCREF(Py_None); __Pyx_XDECREF_SET(__pyx_v_next_node, ((struct LxmlElement *)Py_None)); @@ -167990,7 +156417,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * # back off through parents * self._index -= 1 */ - __Pyx_TraceLine(314,0,__PYX_ERR(13, 314, __pyx_L1_error)) while (1) { __pyx_t_1 = (((PyObject *)__pyx_v_next_node) == Py_None); __pyx_t_4 = (__pyx_t_1 != 0); @@ -168003,7 +156429,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * node = self._end_node() * if self._index < 0: */ - __Pyx_TraceLine(316,0,__PYX_ERR(13, 316, __pyx_L1_error)) __pyx_v_self->_index = (__pyx_v_self->_index - 1); /* "src/lxml/iterparse.pxi":317 @@ -168013,8 +156438,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * if self._index < 0: * break */ - __Pyx_TraceLine(317,0,__PYX_ERR(13, 317, __pyx_L1_error)) - __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_5etree_8iterwalk__end_node(__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 317, __pyx_L1_error) + __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_5etree_8iterwalk__end_node(__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_node, ((struct LxmlElement *)__pyx_t_5)); __pyx_t_5 = 0; @@ -168026,7 +156450,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * break * next_node = node.getnext() */ - __Pyx_TraceLine(318,0,__PYX_ERR(13, 318, __pyx_L1_error)) __pyx_t_4 = ((__pyx_v_self->_index < 0) != 0); if (__pyx_t_4) { @@ -168037,7 +156460,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * next_node = node.getnext() * if next_node is not None: */ - __Pyx_TraceLine(319,0,__PYX_ERR(13, 319, __pyx_L1_error)) goto __pyx_L12_break; /* "src/lxml/iterparse.pxi":318 @@ -168056,8 +156478,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * if next_node is not None: * if self._event_filter & (PARSE_EVENT_FILTER_START | */ - __Pyx_TraceLine(320,0,__PYX_ERR(13, 320, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_node), __pyx_n_s_getnext); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 320, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_node), __pyx_n_s_getnext); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -168069,15 +156490,12 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_7) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 320, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else { - __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 320, __pyx_L1_error) - } + __pyx_t_5 = (__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_5)) __PYX_ERR(14, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(13, 320, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(14, 320, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_next_node, ((struct LxmlElement *)__pyx_t_5)); __pyx_t_5 = 0; } @@ -168092,7 +156510,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * if self._event_filter & (PARSE_EVENT_FILTER_START | * PARSE_EVENT_FILTER_START_NS): */ - __Pyx_TraceLine(321,0,__PYX_ERR(13, 321, __pyx_L1_error)) __pyx_t_4 = (((PyObject *)__pyx_v_next_node) != Py_None); __pyx_t_1 = (__pyx_t_4 != 0); if (__pyx_t_1) { @@ -168104,7 +156521,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * PARSE_EVENT_FILTER_START_NS): * ns_count = self._start_node(next_node) */ - __Pyx_TraceLine(322,0,__PYX_ERR(13, 322, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_event_filter & (__pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_START | __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_START_NS)) != 0); if (__pyx_t_1) { @@ -168115,8 +156531,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * elif self._event_filter & PARSE_EVENT_FILTER_END_NS: * ns_count = _countNsDefs(next_node._c_node) */ - __Pyx_TraceLine(324,0,__PYX_ERR(13, 324, __pyx_L1_error)) - __pyx_t_6 = __pyx_f_4lxml_5etree_8iterwalk__start_node(__pyx_v_self, __pyx_v_next_node); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(13, 324, __pyx_L1_error) + __pyx_t_6 = __pyx_f_4lxml_5etree_8iterwalk__start_node(__pyx_v_self, __pyx_v_next_node); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(14, 324, __pyx_L1_error) __pyx_v_ns_count = __pyx_t_6; /* "src/lxml/iterparse.pxi":322 @@ -168136,7 +156551,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * ns_count = _countNsDefs(next_node._c_node) * self._node_stack.append( (next_node, ns_count) ) */ - __Pyx_TraceLine(325,0,__PYX_ERR(13, 325, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_event_filter & __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_END_NS) != 0); if (__pyx_t_1) { @@ -168147,7 +156561,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * self._node_stack.append( (next_node, ns_count) ) * self._index += 1 */ - __Pyx_TraceLine(326,0,__PYX_ERR(13, 326, __pyx_L1_error)) __pyx_v_ns_count = __pyx_f_4lxml_5etree__countNsDefs(__pyx_v_next_node->_c_node); /* "src/lxml/iterparse.pxi":325 @@ -168167,14 +156580,13 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * self._index += 1 * if self._events: */ - __Pyx_TraceLine(327,0,__PYX_ERR(13, 327, __pyx_L1_error)) if (unlikely(__pyx_v_self->_node_stack == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(13, 327, __pyx_L1_error) + __PYX_ERR(14, 327, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ns_count); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 327, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ns_count); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 327, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_next_node)); __Pyx_GIVEREF(((PyObject *)__pyx_v_next_node)); @@ -168182,7 +156594,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_self->_node_stack, __pyx_t_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(13, 327, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_self->_node_stack, __pyx_t_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(14, 327, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/lxml/iterparse.pxi":328 @@ -168192,7 +156604,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * if self._events: * return self._next_event() */ - __Pyx_TraceLine(328,0,__PYX_ERR(13, 328, __pyx_L1_error)) __pyx_v_self->_index = (__pyx_v_self->_index + 1); /* "src/lxml/iterparse.pxi":321 @@ -168211,7 +156622,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * return self._next_event() * raise StopIteration */ - __Pyx_TraceLine(329,0,__PYX_ERR(13, 329, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_events != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_events) != 0); if (__pyx_t_1) { @@ -168222,9 +156632,8 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * raise StopIteration * */ - __Pyx_TraceLine(330,0,__PYX_ERR(13, 330, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_4lxml_5etree_8iterwalk__next_event(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 330, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_8iterwalk__next_event(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -168247,9 +156656,8 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm * * @cython.final */ - __Pyx_TraceLine(331,0,__PYX_ERR(13, 331, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); - __PYX_ERR(13, 331, __pyx_L1_error) + __PYX_ERR(14, 331, __pyx_L1_error) /* "src/lxml/iterparse.pxi":287 * return self @@ -168270,7 +156678,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm __Pyx_XDECREF((PyObject *)__pyx_v_node); __Pyx_XDECREF((PyObject *)__pyx_v_next_node); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -168285,14 +156692,13 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_4__next__(struct __pyx_obj_4lxm static PyObject *__pyx_f_4lxml_5etree_8iterwalk__next_event(struct __pyx_obj_4lxml_5etree_iterwalk *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_next_event", 0); - __Pyx_TraceCall("_next_event", __pyx_f[13], 334, 0, __PYX_ERR(13, 334, __pyx_L1_error)); /* "src/lxml/iterparse.pxi":335 * @cython.final @@ -168301,7 +156707,6 @@ static PyObject *__pyx_f_4lxml_5etree_8iterwalk__next_event(struct __pyx_obj_4lx * if self._events[0][0] in ('start', 'start-ns'): * self._skip_state = IWSKIP_CAN_SKIP */ - __Pyx_TraceLine(335,0,__PYX_ERR(13, 335, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_skip_state == __pyx_e_4lxml_5etree_IWSKIP_NEXT_IS_START) != 0); if (__pyx_t_1) { @@ -168312,23 +156717,22 @@ static PyObject *__pyx_f_4lxml_5etree_8iterwalk__next_event(struct __pyx_obj_4lx * self._skip_state = IWSKIP_CAN_SKIP * return self._pop_event(0) */ - __Pyx_TraceLine(336,0,__PYX_ERR(13, 336, __pyx_L1_error)) if (unlikely(__pyx_v_self->_events == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(13, 336, __pyx_L1_error) + __PYX_ERR(14, 336, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->_events, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 336, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->_events, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 336, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_start, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(13, 336, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_start, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(14, 336, __pyx_L1_error) if (!__pyx_t_4) { } else { __pyx_t_1 = __pyx_t_4; goto __pyx_L5_bool_binop_done; } - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_kp_s_start_ns, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(13, 336, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_kp_s_start_ns, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(14, 336, __pyx_L1_error) __pyx_t_1 = __pyx_t_4; __pyx_L5_bool_binop_done:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -168342,7 +156746,6 @@ static PyObject *__pyx_f_4lxml_5etree_8iterwalk__next_event(struct __pyx_obj_4lx * return self._pop_event(0) * */ - __Pyx_TraceLine(337,0,__PYX_ERR(13, 337, __pyx_L1_error)) __pyx_v_self->_skip_state = __pyx_e_4lxml_5etree_IWSKIP_CAN_SKIP; /* "src/lxml/iterparse.pxi":336 @@ -168370,10 +156773,23 @@ static PyObject *__pyx_f_4lxml_5etree_8iterwalk__next_event(struct __pyx_obj_4lx * * def skip_subtree(self): */ - __Pyx_TraceLine(338,0,__PYX_ERR(13, 338, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_self->_pop_event, __pyx_tuple__309, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 338, __pyx_L1_error) + __Pyx_INCREF(__pyx_v_self->_pop_event); + __pyx_t_2 = __pyx_v_self->_pop_event; __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_0); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; @@ -168390,11 +156806,11 @@ static PyObject *__pyx_f_4lxml_5etree_8iterwalk__next_event(struct __pyx_obj_4lx __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("lxml.etree.iterwalk._next_event", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -168424,12 +156840,9 @@ static PyObject *__pyx_pw_4lxml_5etree_8iterwalk_7skip_subtree(PyObject *__pyx_v static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_6skip_subtree(struct __pyx_obj_4lxml_5etree_iterwalk *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; - __Pyx_TraceFrameInit(__pyx_codeobj__310) __Pyx_RefNannySetupContext("skip_subtree", 0); - __Pyx_TraceCall("skip_subtree", __pyx_f[13], 340, 0, __PYX_ERR(13, 340, __pyx_L1_error)); /* "src/lxml/iterparse.pxi":347 * This has no effect right after an 'end' or 'end-ns' event. @@ -168438,7 +156851,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_6skip_subtree(struct __pyx_obj_ * self._skip_state = IWSKIP_SKIP_NEXT * */ - __Pyx_TraceLine(347,0,__PYX_ERR(13, 347, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_skip_state == __pyx_e_4lxml_5etree_IWSKIP_CAN_SKIP) != 0); if (__pyx_t_1) { @@ -168449,7 +156861,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_6skip_subtree(struct __pyx_obj_ * * @cython.final */ - __Pyx_TraceLine(348,0,__PYX_ERR(13, 348, __pyx_L1_error)) __pyx_v_self->_skip_state = __pyx_e_4lxml_5etree_IWSKIP_SKIP_NEXT; /* "src/lxml/iterparse.pxi":347 @@ -168471,13 +156882,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_6skip_subtree(struct __pyx_obj_ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.iterwalk.skip_subtree", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -168493,7 +156898,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8iterwalk_6skip_subtree(struct __pyx_obj_ static int __pyx_f_4lxml_5etree_8iterwalk__start_node(struct __pyx_obj_4lxml_5etree_iterwalk *__pyx_v_self, struct LxmlElement *__pyx_v_node) { int __pyx_v_ns_count; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -168502,7 +156906,6 @@ static int __pyx_f_4lxml_5etree_8iterwalk__start_node(struct __pyx_obj_4lxml_5et int __pyx_t_5; int __pyx_t_6; __Pyx_RefNannySetupContext("_start_node", 0); - __Pyx_TraceCall("_start_node", __pyx_f[13], 351, 0, __PYX_ERR(13, 351, __pyx_L1_error)); /* "src/lxml/iterparse.pxi":353 * cdef int _start_node(self, _Element node) except -1: @@ -168511,7 +156914,6 @@ static int __pyx_f_4lxml_5etree_8iterwalk__start_node(struct __pyx_obj_4lxml_5et * ns_count = _appendStartNsEvents(node._c_node, self._events) * if self._events: */ - __Pyx_TraceLine(353,0,__PYX_ERR(13, 353, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_event_filter & __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_START_NS) != 0); if (__pyx_t_1) { @@ -168522,10 +156924,9 @@ static int __pyx_f_4lxml_5etree_8iterwalk__start_node(struct __pyx_obj_4lxml_5et * if self._events: * self._skip_state = IWSKIP_NEXT_IS_START */ - __Pyx_TraceLine(354,0,__PYX_ERR(13, 354, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_events; __Pyx_INCREF(__pyx_t_2); - __pyx_t_3 = __pyx_f_4lxml_5etree__appendStartNsEvents(__pyx_v_node->_c_node, ((PyObject*)__pyx_t_2)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(13, 354, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__appendStartNsEvents(__pyx_v_node->_c_node, ((PyObject*)__pyx_t_2)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(14, 354, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_ns_count = __pyx_t_3; @@ -168536,7 +156937,6 @@ static int __pyx_f_4lxml_5etree_8iterwalk__start_node(struct __pyx_obj_4lxml_5et * self._skip_state = IWSKIP_NEXT_IS_START * elif self._event_filter & PARSE_EVENT_FILTER_END_NS: */ - __Pyx_TraceLine(355,0,__PYX_ERR(13, 355, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_events != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_events) != 0); if (__pyx_t_1) { @@ -168547,7 +156947,6 @@ static int __pyx_f_4lxml_5etree_8iterwalk__start_node(struct __pyx_obj_4lxml_5et * elif self._event_filter & PARSE_EVENT_FILTER_END_NS: * ns_count = _countNsDefs(node._c_node) */ - __Pyx_TraceLine(356,0,__PYX_ERR(13, 356, __pyx_L1_error)) __pyx_v_self->_skip_state = __pyx_e_4lxml_5etree_IWSKIP_NEXT_IS_START; /* "src/lxml/iterparse.pxi":355 @@ -168576,7 +156975,6 @@ static int __pyx_f_4lxml_5etree_8iterwalk__start_node(struct __pyx_obj_4lxml_5et * ns_count = _countNsDefs(node._c_node) * else: */ - __Pyx_TraceLine(357,0,__PYX_ERR(13, 357, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_event_filter & __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_END_NS) != 0); if (__pyx_t_1) { @@ -168587,7 +156985,6 @@ static int __pyx_f_4lxml_5etree_8iterwalk__start_node(struct __pyx_obj_4lxml_5et * else: * ns_count = 0 */ - __Pyx_TraceLine(358,0,__PYX_ERR(13, 358, __pyx_L1_error)) __pyx_v_ns_count = __pyx_f_4lxml_5etree__countNsDefs(__pyx_v_node->_c_node); /* "src/lxml/iterparse.pxi":357 @@ -168607,7 +157004,6 @@ static int __pyx_f_4lxml_5etree_8iterwalk__start_node(struct __pyx_obj_4lxml_5et * if self._event_filter & PARSE_EVENT_FILTER_START: * if self._matcher is None or self._matcher.matches(node._c_node): */ - __Pyx_TraceLine(360,0,__PYX_ERR(13, 360, __pyx_L1_error)) /*else*/ { __pyx_v_ns_count = 0; } @@ -168620,7 +157016,6 @@ static int __pyx_f_4lxml_5etree_8iterwalk__start_node(struct __pyx_obj_4lxml_5et * if self._matcher is None or self._matcher.matches(node._c_node): * self._events.append( (u"start", node) ) */ - __Pyx_TraceLine(361,0,__PYX_ERR(13, 361, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_event_filter & __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_START) != 0); if (__pyx_t_1) { @@ -168631,7 +157026,6 @@ static int __pyx_f_4lxml_5etree_8iterwalk__start_node(struct __pyx_obj_4lxml_5et * self._events.append( (u"start", node) ) * self._skip_state = IWSKIP_NEXT_IS_START */ - __Pyx_TraceLine(362,0,__PYX_ERR(13, 362, __pyx_L1_error)) __pyx_t_4 = (((PyObject *)__pyx_v_self->_matcher) == Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (!__pyx_t_5) { @@ -168651,12 +157045,11 @@ static int __pyx_f_4lxml_5etree_8iterwalk__start_node(struct __pyx_obj_4lxml_5et * self._skip_state = IWSKIP_NEXT_IS_START * return ns_count */ - __Pyx_TraceLine(363,0,__PYX_ERR(13, 363, __pyx_L1_error)) if (unlikely(__pyx_v_self->_events == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(13, 363, __pyx_L1_error) + __PYX_ERR(14, 363, __pyx_L1_error) } - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 363, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_start); __Pyx_GIVEREF(__pyx_n_u_start); @@ -168664,7 +157057,7 @@ static int __pyx_f_4lxml_5etree_8iterwalk__start_node(struct __pyx_obj_4lxml_5et __Pyx_INCREF(((PyObject *)__pyx_v_node)); __Pyx_GIVEREF(((PyObject *)__pyx_v_node)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_node)); - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_self->_events, __pyx_t_2); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(13, 363, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_self->_events, __pyx_t_2); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(14, 363, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/lxml/iterparse.pxi":364 @@ -168674,7 +157067,6 @@ static int __pyx_f_4lxml_5etree_8iterwalk__start_node(struct __pyx_obj_4lxml_5et * return ns_count * */ - __Pyx_TraceLine(364,0,__PYX_ERR(13, 364, __pyx_L1_error)) __pyx_v_self->_skip_state = __pyx_e_4lxml_5etree_IWSKIP_NEXT_IS_START; /* "src/lxml/iterparse.pxi":362 @@ -168702,7 +157094,6 @@ static int __pyx_f_4lxml_5etree_8iterwalk__start_node(struct __pyx_obj_4lxml_5et * * @cython.final */ - __Pyx_TraceLine(365,0,__PYX_ERR(13, 365, __pyx_L1_error)) __pyx_r = __pyx_v_ns_count; goto __pyx_L0; @@ -168720,7 +157111,6 @@ static int __pyx_f_4lxml_5etree_8iterwalk__start_node(struct __pyx_obj_4lxml_5et __Pyx_AddTraceback("lxml.etree.iterwalk._start_node", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -168739,7 +157129,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree_8iterwalk__end_node(struct __pyx int __pyx_v_ns_count; PyObject *__pyx_v_event = NULL; struct LxmlElement *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -168754,7 +157143,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree_8iterwalk__end_node(struct __pyx int __pyx_t_11; int __pyx_t_12; __Pyx_RefNannySetupContext("_end_node", 0); - __Pyx_TraceCall("_end_node", __pyx_f[13], 368, 0, __PYX_ERR(13, 368, __pyx_L1_error)); /* "src/lxml/iterparse.pxi":371 * cdef _Element node @@ -168763,12 +157151,11 @@ static struct LxmlElement *__pyx_f_4lxml_5etree_8iterwalk__end_node(struct __pyx * if self._event_filter & PARSE_EVENT_FILTER_END: * if self._matcher is None or self._matcher.matches(node._c_node): */ - __Pyx_TraceLine(371,0,__PYX_ERR(13, 371, __pyx_L1_error)) if (unlikely(__pyx_v_self->_node_stack == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop"); - __PYX_ERR(13, 371, __pyx_L1_error) + __PYX_ERR(14, 371, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyList_Pop(__pyx_v_self->_node_stack); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 371, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyList_Pop(__pyx_v_self->_node_stack); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; @@ -168776,7 +157163,7 @@ static struct LxmlElement *__pyx_f_4lxml_5etree_8iterwalk__end_node(struct __pyx if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(13, 371, __pyx_L1_error) + __PYX_ERR(14, 371, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -168789,15 +157176,15 @@ static struct LxmlElement *__pyx_f_4lxml_5etree_8iterwalk__end_node(struct __pyx __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 371, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 371, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 371, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; @@ -168805,7 +157192,7 @@ static struct LxmlElement *__pyx_f_4lxml_5etree_8iterwalk__end_node(struct __pyx __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(13, 371, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(14, 371, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_unpacking_done; @@ -168813,11 +157200,11 @@ static struct LxmlElement *__pyx_f_4lxml_5etree_8iterwalk__end_node(struct __pyx __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(13, 371, __pyx_L1_error) + __PYX_ERR(14, 371, __pyx_L1_error) __pyx_L4_unpacking_done:; } - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(13, 371, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(13, 371, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(14, 371, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(14, 371, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_node = ((struct LxmlElement *)__pyx_t_2); __pyx_t_2 = 0; @@ -168830,7 +157217,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree_8iterwalk__end_node(struct __pyx * if self._matcher is None or self._matcher.matches(node._c_node): * self._events.append( (u"end", node) ) */ - __Pyx_TraceLine(372,0,__PYX_ERR(13, 372, __pyx_L1_error)) __pyx_t_7 = ((__pyx_v_self->_event_filter & __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_END) != 0); if (__pyx_t_7) { @@ -168841,7 +157227,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree_8iterwalk__end_node(struct __pyx * self._events.append( (u"end", node) ) * if self._event_filter & PARSE_EVENT_FILTER_END_NS and ns_count: */ - __Pyx_TraceLine(373,0,__PYX_ERR(13, 373, __pyx_L1_error)) __pyx_t_8 = (((PyObject *)__pyx_v_self->_matcher) == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (!__pyx_t_9) { @@ -168861,12 +157246,11 @@ static struct LxmlElement *__pyx_f_4lxml_5etree_8iterwalk__end_node(struct __pyx * if self._event_filter & PARSE_EVENT_FILTER_END_NS and ns_count: * event = (u"end-ns", None) */ - __Pyx_TraceLine(374,0,__PYX_ERR(13, 374, __pyx_L1_error)) if (unlikely(__pyx_v_self->_events == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(13, 374, __pyx_L1_error) + __PYX_ERR(14, 374, __pyx_L1_error) } - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 374, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_u_end); __Pyx_GIVEREF(__pyx_n_u_end); @@ -168874,7 +157258,7 @@ static struct LxmlElement *__pyx_f_4lxml_5etree_8iterwalk__end_node(struct __pyx __Pyx_INCREF(((PyObject *)__pyx_v_node)); __Pyx_GIVEREF(((PyObject *)__pyx_v_node)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_node)); - __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_self->_events, __pyx_t_1); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(13, 374, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_self->_events, __pyx_t_1); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(14, 374, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/lxml/iterparse.pxi":373 @@ -168902,7 +157286,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree_8iterwalk__end_node(struct __pyx * event = (u"end-ns", None) * for i in range(ns_count): */ - __Pyx_TraceLine(375,0,__PYX_ERR(13, 375, __pyx_L1_error)) __pyx_t_9 = ((__pyx_v_self->_event_filter & __pyx_e_4lxml_5etree_PARSE_EVENT_FILTER_END_NS) != 0); if (__pyx_t_9) { } else { @@ -168921,9 +157304,8 @@ static struct LxmlElement *__pyx_f_4lxml_5etree_8iterwalk__end_node(struct __pyx * for i in range(ns_count): * self._events.append(event) */ - __Pyx_TraceLine(376,0,__PYX_ERR(13, 376, __pyx_L1_error)) - __Pyx_INCREF(__pyx_tuple__311); - __pyx_v_event = __pyx_tuple__311; + __Pyx_INCREF(__pyx_tuple__74); + __pyx_v_event = __pyx_tuple__74; /* "src/lxml/iterparse.pxi":377 * if self._event_filter & PARSE_EVENT_FILTER_END_NS and ns_count: @@ -168932,7 +157314,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree_8iterwalk__end_node(struct __pyx * self._events.append(event) * return node */ - __Pyx_TraceLine(377,0,__PYX_ERR(13, 377, __pyx_L1_error)) __pyx_t_6 = __pyx_v_ns_count; __pyx_t_11 = __pyx_t_6; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { @@ -168945,12 +157326,11 @@ static struct LxmlElement *__pyx_f_4lxml_5etree_8iterwalk__end_node(struct __pyx * return node * */ - __Pyx_TraceLine(378,0,__PYX_ERR(13, 378, __pyx_L1_error)) if (unlikely(__pyx_v_self->_events == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(13, 378, __pyx_L1_error) + __PYX_ERR(14, 378, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_self->_events, __pyx_v_event); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(13, 378, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_self->_events, __pyx_v_event); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(14, 378, __pyx_L1_error) } /* "src/lxml/iterparse.pxi":375 @@ -168969,7 +157349,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree_8iterwalk__end_node(struct __pyx * * */ - __Pyx_TraceLine(379,0,__PYX_ERR(13, 379, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_node)); __pyx_r = __pyx_v_node; @@ -168995,7 +157374,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree_8iterwalk__end_node(struct __pyx __Pyx_XDECREF((PyObject *)__pyx_v_node); __Pyx_XDECREF(__pyx_v_event); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -169012,12 +157390,10 @@ static int __pyx_f_4lxml_5etree__countNsDefs(xmlNode *__pyx_v_c_node) { xmlNs *__pyx_v_c_ns; int __pyx_v_count; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlNs *__pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_countNsDefs", 0); - __Pyx_TraceCall("_countNsDefs", __pyx_f[13], 382, 0, __PYX_ERR(13, 382, __pyx_L1_error)); /* "src/lxml/iterparse.pxi":385 * cdef xmlNs* c_ns @@ -169026,7 +157402,6 @@ static int __pyx_f_4lxml_5etree__countNsDefs(xmlNode *__pyx_v_c_node) { * c_ns = c_node.nsDef * while c_ns is not NULL: */ - __Pyx_TraceLine(385,0,__PYX_ERR(13, 385, __pyx_L1_error)) __pyx_v_count = 0; /* "src/lxml/iterparse.pxi":386 @@ -169036,7 +157411,6 @@ static int __pyx_f_4lxml_5etree__countNsDefs(xmlNode *__pyx_v_c_node) { * while c_ns is not NULL: * count += 1 */ - __Pyx_TraceLine(386,0,__PYX_ERR(13, 386, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_node->nsDef; __pyx_v_c_ns = __pyx_t_1; @@ -169047,7 +157421,6 @@ static int __pyx_f_4lxml_5etree__countNsDefs(xmlNode *__pyx_v_c_node) { * count += 1 * c_ns = c_ns.next */ - __Pyx_TraceLine(387,0,__PYX_ERR(13, 387, __pyx_L1_error)) while (1) { __pyx_t_2 = ((__pyx_v_c_ns != NULL) != 0); if (!__pyx_t_2) break; @@ -169059,7 +157432,6 @@ static int __pyx_f_4lxml_5etree__countNsDefs(xmlNode *__pyx_v_c_node) { * c_ns = c_ns.next * return count */ - __Pyx_TraceLine(388,0,__PYX_ERR(13, 388, __pyx_L1_error)) __pyx_v_count = (__pyx_v_count + 1); /* "src/lxml/iterparse.pxi":389 @@ -169069,7 +157441,6 @@ static int __pyx_f_4lxml_5etree__countNsDefs(xmlNode *__pyx_v_c_node) { * return count * */ - __Pyx_TraceLine(389,0,__PYX_ERR(13, 389, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_ns->next; __pyx_v_c_ns = __pyx_t_1; } @@ -169081,7 +157452,6 @@ static int __pyx_f_4lxml_5etree__countNsDefs(xmlNode *__pyx_v_c_node) { * * */ - __Pyx_TraceLine(390,0,__PYX_ERR(13, 390, __pyx_L1_error)) __pyx_r = __pyx_v_count; goto __pyx_L0; @@ -169094,11 +157464,7 @@ static int __pyx_f_4lxml_5etree__countNsDefs(xmlNode *__pyx_v_c_node) { */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._countNsDefs", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -169116,7 +157482,6 @@ static int __pyx_f_4lxml_5etree__appendStartNsEvents(xmlNode *__pyx_v_c_node, Py int __pyx_v_count; PyObject *__pyx_v_ns_tuple = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlNs *__pyx_t_1; int __pyx_t_2; @@ -169125,7 +157490,6 @@ static int __pyx_f_4lxml_5etree__appendStartNsEvents(xmlNode *__pyx_v_c_node, Py PyObject *__pyx_t_5 = NULL; int __pyx_t_6; __Pyx_RefNannySetupContext("_appendStartNsEvents", 0); - __Pyx_TraceCall("_appendStartNsEvents", __pyx_f[13], 393, 0, __PYX_ERR(13, 393, __pyx_L1_error)); /* "src/lxml/iterparse.pxi":396 * cdef xmlNs* c_ns @@ -169134,7 +157498,6 @@ static int __pyx_f_4lxml_5etree__appendStartNsEvents(xmlNode *__pyx_v_c_node, Py * c_ns = c_node.nsDef * while c_ns is not NULL: */ - __Pyx_TraceLine(396,0,__PYX_ERR(13, 396, __pyx_L1_error)) __pyx_v_count = 0; /* "src/lxml/iterparse.pxi":397 @@ -169144,7 +157507,6 @@ static int __pyx_f_4lxml_5etree__appendStartNsEvents(xmlNode *__pyx_v_c_node, Py * while c_ns is not NULL: * ns_tuple = (funicode(c_ns.prefix) if c_ns.prefix is not NULL else '', */ - __Pyx_TraceLine(397,0,__PYX_ERR(13, 397, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_node->nsDef; __pyx_v_c_ns = __pyx_t_1; @@ -169155,7 +157517,6 @@ static int __pyx_f_4lxml_5etree__appendStartNsEvents(xmlNode *__pyx_v_c_node, Py * ns_tuple = (funicode(c_ns.prefix) if c_ns.prefix is not NULL else '', * funicode(c_ns.href)) */ - __Pyx_TraceLine(398,0,__PYX_ERR(13, 398, __pyx_L1_error)) while (1) { __pyx_t_2 = ((__pyx_v_c_ns != NULL) != 0); if (!__pyx_t_2) break; @@ -169167,15 +157528,14 @@ static int __pyx_f_4lxml_5etree__appendStartNsEvents(xmlNode *__pyx_v_c_node, Py * funicode(c_ns.href)) * event_list.append( (u"start-ns", ns_tuple) ) */ - __Pyx_TraceLine(399,0,__PYX_ERR(13, 399, __pyx_L1_error)) if (((__pyx_v_c_ns->prefix != NULL) != 0)) { - __pyx_t_4 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_ns->prefix); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 399, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_ns->prefix); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_t_4; __pyx_t_4 = 0; } else { - __Pyx_INCREF(__pyx_kp_s__23); - __pyx_t_3 = __pyx_kp_s__23; + __Pyx_INCREF(__pyx_kp_s__11); + __pyx_t_3 = __pyx_kp_s__11; } /* "src/lxml/iterparse.pxi":400 @@ -169185,8 +157545,7 @@ static int __pyx_f_4lxml_5etree__appendStartNsEvents(xmlNode *__pyx_v_c_node, Py * event_list.append( (u"start-ns", ns_tuple) ) * count += 1 */ - __Pyx_TraceLine(400,0,__PYX_ERR(13, 400, __pyx_L1_error)) - __pyx_t_4 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_ns->href); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 400, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_ns->href); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "src/lxml/iterparse.pxi":399 @@ -169196,8 +157555,7 @@ static int __pyx_f_4lxml_5etree__appendStartNsEvents(xmlNode *__pyx_v_c_node, Py * funicode(c_ns.href)) * event_list.append( (u"start-ns", ns_tuple) ) */ - __Pyx_TraceLine(399,0,__PYX_ERR(13, 399, __pyx_L1_error)) - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 399, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); @@ -169215,12 +157573,11 @@ static int __pyx_f_4lxml_5etree__appendStartNsEvents(xmlNode *__pyx_v_c_node, Py * count += 1 * c_ns = c_ns.next */ - __Pyx_TraceLine(401,0,__PYX_ERR(13, 401, __pyx_L1_error)) if (unlikely(__pyx_v_event_list == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(13, 401, __pyx_L1_error) + __PYX_ERR(14, 401, __pyx_L1_error) } - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 401, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_kp_u_start_ns); __Pyx_GIVEREF(__pyx_kp_u_start_ns); @@ -169228,7 +157585,7 @@ static int __pyx_f_4lxml_5etree__appendStartNsEvents(xmlNode *__pyx_v_c_node, Py __Pyx_INCREF(__pyx_v_ns_tuple); __Pyx_GIVEREF(__pyx_v_ns_tuple); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_ns_tuple); - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_event_list, __pyx_t_5); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(13, 401, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_event_list, __pyx_t_5); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(14, 401, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "src/lxml/iterparse.pxi":402 @@ -169238,7 +157595,6 @@ static int __pyx_f_4lxml_5etree__appendStartNsEvents(xmlNode *__pyx_v_c_node, Py * c_ns = c_ns.next * return count */ - __Pyx_TraceLine(402,0,__PYX_ERR(13, 402, __pyx_L1_error)) __pyx_v_count = (__pyx_v_count + 1); /* "src/lxml/iterparse.pxi":403 @@ -169247,7 +157603,6 @@ static int __pyx_f_4lxml_5etree__appendStartNsEvents(xmlNode *__pyx_v_c_node, Py * c_ns = c_ns.next # <<<<<<<<<<<<<< * return count */ - __Pyx_TraceLine(403,0,__PYX_ERR(13, 403, __pyx_L1_error)) __pyx_t_1 = __pyx_v_c_ns->next; __pyx_v_c_ns = __pyx_t_1; } @@ -169257,7 +157612,6 @@ static int __pyx_f_4lxml_5etree__appendStartNsEvents(xmlNode *__pyx_v_c_node, Py * c_ns = c_ns.next * return count # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(404,0,__PYX_ERR(13, 404, __pyx_L1_error)) __pyx_r = __pyx_v_count; goto __pyx_L0; @@ -169278,7 +157632,6 @@ static int __pyx_f_4lxml_5etree__appendStartNsEvents(xmlNode *__pyx_v_c_node, Py __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ns_tuple); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -169294,7 +157647,7 @@ static int __pyx_f_4lxml_5etree__appendStartNsEvents(xmlNode *__pyx_v_c_node, Py /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_49XMLID(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_48XMLID[] = "XMLID(text, parser=None, base_url=None)\n\n Parse the text and return a tuple (root node, ID dictionary). The root\n node is the same as returned by the XML() function. The dictionary\n contains string-element pairs. The dictionary keys are the values of 'id'\n attributes. The elements referenced by the ID are stored as dictionary\n values.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_49XMLID = {"XMLID", (PyCFunction)__pyx_pw_4lxml_5etree_49XMLID, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_48XMLID}; +static PyMethodDef __pyx_mdef_4lxml_5etree_49XMLID = {"XMLID", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_49XMLID, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_48XMLID}; static PyObject *__pyx_pw_4lxml_5etree_49XMLID(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_text = 0; PyObject *__pyx_v_parser = 0; @@ -169336,7 +157689,7 @@ static PyObject *__pyx_pw_4lxml_5etree_49XMLID(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, "XMLID") < 0)) __PYX_ERR(14, 3, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "XMLID") < 0)) __PYX_ERR(15, 3, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -169353,7 +157706,7 @@ static PyObject *__pyx_pw_4lxml_5etree_49XMLID(PyObject *__pyx_self, PyObject *_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("XMLID", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 3, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("XMLID", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 3, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.XMLID", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -169371,7 +157724,6 @@ static PyObject *__pyx_pf_4lxml_5etree_48XMLID(CYTHON_UNUSED PyObject *__pyx_sel PyObject *__pyx_v_root = NULL; PyObject *__pyx_v_elem = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -169381,9 +157733,7 @@ static PyObject *__pyx_pf_4lxml_5etree_48XMLID(CYTHON_UNUSED PyObject *__pyx_sel PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *(*__pyx_t_8)(PyObject *); - __Pyx_TraceFrameInit(__pyx_codeobj__312) __Pyx_RefNannySetupContext("XMLID", 0); - __Pyx_TraceCall("XMLID", __pyx_f[14], 3, 0, __PYX_ERR(14, 3, __pyx_L1_error)); /* "src/lxml/xmlid.pxi":14 * cdef dict dic @@ -169392,7 +157742,6 @@ static PyObject *__pyx_pf_4lxml_5etree_48XMLID(CYTHON_UNUSED PyObject *__pyx_sel * _find_id_attributes = XPath(u'//[inserted by cython to avoid comment start]*[string(@id)]') * */ - __Pyx_TraceLine(14,0,__PYX_ERR(14, 14, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_4lxml_5etree__find_id_attributes == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -169404,8 +157753,7 @@ static PyObject *__pyx_pf_4lxml_5etree_48XMLID(CYTHON_UNUSED PyObject *__pyx_sel * * # ElementTree compatible implementation: parse and look for 'id' attributes */ - __Pyx_TraceLine(15,0,__PYX_ERR(14, 15, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_XPath), __pyx_tuple__313, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 15, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_XPath), __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_v_4lxml_5etree__find_id_attributes); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree__find_id_attributes, __pyx_t_3); @@ -169428,10 +157776,9 @@ static PyObject *__pyx_pf_4lxml_5etree_48XMLID(CYTHON_UNUSED PyObject *__pyx_sel * dic = {} * for elem in _find_id_attributes(root): */ - __Pyx_TraceLine(18,0,__PYX_ERR(14, 18, __pyx_L1_error)) - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_XML); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 18, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_XML); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 18, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_text); __Pyx_GIVEREF(__pyx_v_text); @@ -169439,10 +157786,10 @@ static PyObject *__pyx_pf_4lxml_5etree_48XMLID(CYTHON_UNUSED PyObject *__pyx_sel __Pyx_INCREF(__pyx_v_parser); __Pyx_GIVEREF(__pyx_v_parser); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_parser); - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 18, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_base_url, __pyx_v_base_url) < 0) __PYX_ERR(14, 18, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(14, 18, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_base_url, __pyx_v_base_url) < 0) __PYX_ERR(15, 18, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -169457,8 +157804,7 @@ static PyObject *__pyx_pf_4lxml_5etree_48XMLID(CYTHON_UNUSED PyObject *__pyx_sel * for elem in _find_id_attributes(root): * dic[elem.get(u'id')] = elem */ - __Pyx_TraceLine(19,0,__PYX_ERR(14, 19, __pyx_L1_error)) - __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(14, 19, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dic = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; @@ -169468,9 +157814,8 @@ static PyObject *__pyx_pf_4lxml_5etree_48XMLID(CYTHON_UNUSED PyObject *__pyx_sel * dic = {} * for elem in _find_id_attributes(root): # <<<<<<<<<<<<<< * dic[elem.get(u'id')] = elem - * return (root, dic) + * return root, dic */ - __Pyx_TraceLine(20,0,__PYX_ERR(14, 20, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_4lxml_5etree__find_id_attributes); __pyx_t_5 = __pyx_v_4lxml_5etree__find_id_attributes; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -169482,46 +157827,18 @@ static PyObject *__pyx_pf_4lxml_5etree_48XMLID(CYTHON_UNUSED PyObject *__pyx_sel __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_4) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_root); if (unlikely(!__pyx_t_6)) __PYX_ERR(14, 20, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_root}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(14, 20, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_6); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_root}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(14, 20, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_6); - } else - #endif - { - __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 20, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(__pyx_v_root); - __Pyx_GIVEREF(__pyx_v_root); - PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_root); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(14, 20, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - } + __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_root) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_root); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 20, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { __pyx_t_5 = __pyx_t_6; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 20, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(14, 20, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(15, 20, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; for (;;) { @@ -169529,17 +157846,17 @@ static PyObject *__pyx_pf_4lxml_5etree_48XMLID(CYTHON_UNUSED PyObject *__pyx_sel if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_7 >= 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_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(14, 20, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(15, 20, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(14, 20, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(14, 20, __pyx_L1_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(15, 20, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(14, 20, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } @@ -169549,7 +157866,7 @@ static PyObject *__pyx_pf_4lxml_5etree_48XMLID(CYTHON_UNUSED PyObject *__pyx_sel PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(14, 20, __pyx_L1_error) + else __PYX_ERR(15, 20, __pyx_L1_error) } break; } @@ -169562,39 +157879,48 @@ static PyObject *__pyx_pf_4lxml_5etree_48XMLID(CYTHON_UNUSED PyObject *__pyx_sel * dic = {} * for elem in _find_id_attributes(root): * dic[elem.get(u'id')] = elem # <<<<<<<<<<<<<< - * return (root, dic) + * return root, dic * */ - __Pyx_TraceLine(21,0,__PYX_ERR(14, 21, __pyx_L1_error)) - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_elem, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(14, 21, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_elem, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 21, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_6 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_n_u_id) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_n_u_id); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__314, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 21, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(PyDict_SetItem(__pyx_v_dic, __pyx_t_6, __pyx_v_elem) < 0)) __PYX_ERR(15, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(PyDict_SetItem(__pyx_v_dic, __pyx_t_3, __pyx_v_elem) < 0)) __PYX_ERR(14, 21, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/lxml/xmlid.pxi":20 * root = XML(text, parser, base_url=base_url) * dic = {} * for elem in _find_id_attributes(root): # <<<<<<<<<<<<<< * dic[elem.get(u'id')] = elem - * return (root, dic) + * return root, dic */ - __Pyx_TraceLine(20,0,__PYX_ERR(14, 20, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "src/lxml/xmlid.pxi":22 * for elem in _find_id_attributes(root): * dic[elem.get(u'id')] = elem - * return (root, dic) # <<<<<<<<<<<<<< + * return root, dic # <<<<<<<<<<<<<< * * def XMLDTDID(text, parser=None, *, base_url=None): */ - __Pyx_TraceLine(22,0,__PYX_ERR(14, 22, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 22, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_root); __Pyx_GIVEREF(__pyx_v_root); @@ -169627,13 +157953,12 @@ static PyObject *__pyx_pf_4lxml_5etree_48XMLID(CYTHON_UNUSED PyObject *__pyx_sel __Pyx_XDECREF(__pyx_v_root); __Pyx_XDECREF(__pyx_v_elem); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/lxml/xmlid.pxi":24 - * return (root, dic) + * return root, dic * * def XMLDTDID(text, parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""XMLDTDID(text, parser=None, base_url=None) @@ -169643,7 +157968,7 @@ static PyObject *__pyx_pf_4lxml_5etree_48XMLID(CYTHON_UNUSED PyObject *__pyx_sel /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_51XMLDTDID(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_50XMLDTDID[] = "XMLDTDID(text, parser=None, base_url=None)\n\n Parse the text and return a tuple (root node, ID dictionary). The root\n node is the same as returned by the XML() function. The dictionary\n contains string-element pairs. The dictionary keys are the values of ID\n attributes as defined by the DTD. The elements referenced by the ID are\n stored as dictionary values.\n\n Note that you must not modify the XML tree if you use the ID dictionary.\n The results are undefined.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_51XMLDTDID = {"XMLDTDID", (PyCFunction)__pyx_pw_4lxml_5etree_51XMLDTDID, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_50XMLDTDID}; +static PyMethodDef __pyx_mdef_4lxml_5etree_51XMLDTDID = {"XMLDTDID", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_51XMLDTDID, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_50XMLDTDID}; static PyObject *__pyx_pw_4lxml_5etree_51XMLDTDID(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_text = 0; PyObject *__pyx_v_parser = 0; @@ -169685,7 +158010,7 @@ static PyObject *__pyx_pw_4lxml_5etree_51XMLDTDID(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, "XMLDTDID") < 0)) __PYX_ERR(14, 24, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "XMLDTDID") < 0)) __PYX_ERR(15, 24, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -169702,7 +158027,7 @@ static PyObject *__pyx_pw_4lxml_5etree_51XMLDTDID(PyObject *__pyx_self, PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("XMLDTDID", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 24, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("XMLDTDID", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 24, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.XMLDTDID", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -169718,16 +158043,13 @@ static PyObject *__pyx_pw_4lxml_5etree_51XMLDTDID(PyObject *__pyx_self, PyObject static PyObject *__pyx_pf_4lxml_5etree_50XMLDTDID(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_text, PyObject *__pyx_v_parser, PyObject *__pyx_v_base_url) { struct LxmlElement *__pyx_v_root = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; - __Pyx_TraceFrameInit(__pyx_codeobj__315) __Pyx_RefNannySetupContext("XMLDTDID", 0); - __Pyx_TraceCall("XMLDTDID", __pyx_f[14], 24, 0, __PYX_ERR(14, 24, __pyx_L1_error)); /* "src/lxml/xmlid.pxi":37 * """ @@ -169736,10 +158058,9 @@ static PyObject *__pyx_pf_4lxml_5etree_50XMLDTDID(CYTHON_UNUSED PyObject *__pyx_ * # xml:id spec compatible implementation: use DTD ID attributes from libxml2 * if root._doc._c_doc.ids is NULL: */ - __Pyx_TraceLine(37,0,__PYX_ERR(14, 37, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_XML); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 37, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_XML); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 37, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_text); __Pyx_GIVEREF(__pyx_v_text); @@ -169747,15 +158068,15 @@ static PyObject *__pyx_pf_4lxml_5etree_50XMLDTDID(CYTHON_UNUSED PyObject *__pyx_ __Pyx_INCREF(__pyx_v_parser); __Pyx_GIVEREF(__pyx_v_parser); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_parser); - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 37, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_base_url, __pyx_v_base_url) < 0) __PYX_ERR(14, 37, __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(14, 37, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_base_url, __pyx_v_base_url) < 0) __PYX_ERR(15, 37, __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(15, 37, __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; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(14, 37, __pyx_L1_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(15, 37, __pyx_L1_error) __pyx_v_root = ((struct LxmlElement *)__pyx_t_4); __pyx_t_4 = 0; @@ -169763,25 +158084,23 @@ static PyObject *__pyx_pf_4lxml_5etree_50XMLDTDID(CYTHON_UNUSED PyObject *__pyx_ * root = XML(text, parser, base_url=base_url) * # xml:id spec compatible implementation: use DTD ID attributes from libxml2 * if root._doc._c_doc.ids is NULL: # <<<<<<<<<<<<<< - * return (root, {}) + * return root, {} * else: */ - __Pyx_TraceLine(39,0,__PYX_ERR(14, 39, __pyx_L1_error)) __pyx_t_5 = ((__pyx_v_root->_doc->_c_doc->ids == NULL) != 0); if (__pyx_t_5) { /* "src/lxml/xmlid.pxi":40 * # xml:id spec compatible implementation: use DTD ID attributes from libxml2 * if root._doc._c_doc.ids is NULL: - * return (root, {}) # <<<<<<<<<<<<<< + * return root, {} # <<<<<<<<<<<<<< * else: - * return (root, _IDDict(root)) + * return root, _IDDict(root) */ - __Pyx_TraceLine(40,0,__PYX_ERR(14, 40, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 40, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 40, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_root)); __Pyx_GIVEREF(((PyObject *)__pyx_v_root)); @@ -169797,24 +158116,23 @@ static PyObject *__pyx_pf_4lxml_5etree_50XMLDTDID(CYTHON_UNUSED PyObject *__pyx_ * root = XML(text, parser, base_url=base_url) * # xml:id spec compatible implementation: use DTD ID attributes from libxml2 * if root._doc._c_doc.ids is NULL: # <<<<<<<<<<<<<< - * return (root, {}) + * return root, {} * else: */ } /* "src/lxml/xmlid.pxi":42 - * return (root, {}) + * return root, {} * else: - * return (root, _IDDict(root)) # <<<<<<<<<<<<<< + * return root, _IDDict(root) # <<<<<<<<<<<<<< * * def parseid(source, parser=None, *, base_url=None): */ - __Pyx_TraceLine(42,0,__PYX_ERR(14, 42, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree__IDDict), ((PyObject *)__pyx_v_root)); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 42, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree__IDDict), ((PyObject *)__pyx_v_root)); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 42, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_root)); __Pyx_GIVEREF(((PyObject *)__pyx_v_root)); @@ -169828,7 +158146,7 @@ static PyObject *__pyx_pf_4lxml_5etree_50XMLDTDID(CYTHON_UNUSED PyObject *__pyx_ } /* "src/lxml/xmlid.pxi":24 - * return (root, dic) + * return root, dic * * def XMLDTDID(text, parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""XMLDTDID(text, parser=None, base_url=None) @@ -169846,13 +158164,12 @@ static PyObject *__pyx_pf_4lxml_5etree_50XMLDTDID(CYTHON_UNUSED PyObject *__pyx_ __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_root); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "src/lxml/xmlid.pxi":44 - * return (root, _IDDict(root)) + * return root, _IDDict(root) * * def parseid(source, parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""parseid(source, parser=None) @@ -169862,7 +158179,7 @@ static PyObject *__pyx_pf_4lxml_5etree_50XMLDTDID(CYTHON_UNUSED PyObject *__pyx_ /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_53parseid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_52parseid[] = "parseid(source, parser=None)\n\n Parses the source into a tuple containing an ElementTree object and an\n ID dictionary. If no parser is provided as second argument, the default\n parser is used.\n\n Note that you must not modify the XML tree if you use the ID dictionary.\n The results are undefined.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_53parseid = {"parseid", (PyCFunction)__pyx_pw_4lxml_5etree_53parseid, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_52parseid}; +static PyMethodDef __pyx_mdef_4lxml_5etree_53parseid = {"parseid", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_53parseid, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_52parseid}; static PyObject *__pyx_pw_4lxml_5etree_53parseid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_source = 0; PyObject *__pyx_v_parser = 0; @@ -169904,7 +158221,7 @@ static PyObject *__pyx_pw_4lxml_5etree_53parseid(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, "parseid") < 0)) __PYX_ERR(14, 44, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parseid") < 0)) __PYX_ERR(15, 44, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -169921,7 +158238,7 @@ static PyObject *__pyx_pw_4lxml_5etree_53parseid(PyObject *__pyx_self, PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("parseid", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 44, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("parseid", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 44, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.parseid", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -169937,25 +158254,21 @@ static PyObject *__pyx_pw_4lxml_5etree_53parseid(PyObject *__pyx_self, PyObject static PyObject *__pyx_pf_4lxml_5etree_52parseid(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_source, PyObject *__pyx_v_parser, PyObject *__pyx_v_base_url) { struct LxmlDocument *__pyx_v_doc = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__316) __Pyx_RefNannySetupContext("parseid", 0); - __Pyx_TraceCall("parseid", __pyx_f[14], 44, 0, __PYX_ERR(14, 44, __pyx_L1_error)); /* "src/lxml/xmlid.pxi":55 * """ * cdef _Document doc * doc = _parseDocument(source, parser, base_url) # <<<<<<<<<<<<<< - * return (_elementTreeFactory(doc, None), _IDDict(doc)) + * return _elementTreeFactory(doc, None), _IDDict(doc) * */ - __Pyx_TraceLine(55,0,__PYX_ERR(14, 55, __pyx_L1_error)) - if (!(likely(((__pyx_v_parser) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_parser, __pyx_ptype_4lxml_5etree__BaseParser))))) __PYX_ERR(14, 55, __pyx_L1_error) - __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__parseDocument(__pyx_v_source, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), __pyx_v_base_url)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 55, __pyx_L1_error) + if (!(likely(((__pyx_v_parser) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_parser, __pyx_ptype_4lxml_5etree__BaseParser))))) __PYX_ERR(15, 55, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__parseDocument(__pyx_v_source, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), __pyx_v_base_url)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_1); __pyx_t_1 = 0; @@ -169963,17 +158276,16 @@ static PyObject *__pyx_pf_4lxml_5etree_52parseid(CYTHON_UNUSED PyObject *__pyx_s /* "src/lxml/xmlid.pxi":56 * cdef _Document doc * doc = _parseDocument(source, parser, base_url) - * return (_elementTreeFactory(doc, None), _IDDict(doc)) # <<<<<<<<<<<<<< + * return _elementTreeFactory(doc, None), _IDDict(doc) # <<<<<<<<<<<<<< * * cdef class _IDDict: */ - __Pyx_TraceLine(56,0,__PYX_ERR(14, 56, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__elementTreeFactory(__pyx_v_doc, ((struct LxmlElement *)Py_None))); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 56, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__elementTreeFactory(__pyx_v_doc, ((struct LxmlElement *)Py_None))); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree__IDDict), ((PyObject *)__pyx_v_doc)); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 56, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree__IDDict), ((PyObject *)__pyx_v_doc)); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 56, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); @@ -169986,7 +158298,7 @@ static PyObject *__pyx_pf_4lxml_5etree_52parseid(CYTHON_UNUSED PyObject *__pyx_s goto __pyx_L0; /* "src/lxml/xmlid.pxi":44 - * return (root, _IDDict(root)) + * return root, _IDDict(root) * * def parseid(source, parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""parseid(source, parser=None) @@ -170003,7 +158315,6 @@ static PyObject *__pyx_pf_4lxml_5etree_52parseid(CYTHON_UNUSED PyObject *__pyx_s __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -170042,7 +158353,7 @@ static int __pyx_pw_4lxml_5etree_7_IDDict_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(14, 69, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(15, 69, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -170053,7 +158364,7 @@ static int __pyx_pw_4lxml_5etree_7_IDDict_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(14, 69, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 69, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._IDDict.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -170069,12 +158380,10 @@ static int __pyx_pw_4lxml_5etree_7_IDDict_1__cinit__(PyObject *__pyx_v_self, PyO static int __pyx_pf_4lxml_5etree_7_IDDict___cinit__(struct __pyx_obj_4lxml_5etree__IDDict *__pyx_v_self, PyObject *__pyx_v_etree) { struct LxmlDocument *__pyx_v_doc = 0; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[14], 69, 0, __PYX_ERR(14, 69, __pyx_L1_error)); /* "src/lxml/xmlid.pxi":71 * def __cinit__(self, etree): @@ -170083,8 +158392,7 @@ static int __pyx_pf_4lxml_5etree_7_IDDict___cinit__(struct __pyx_obj_4lxml_5etre * if doc._c_doc.ids is NULL: * raise ValueError, u"No ID dictionary available." */ - __Pyx_TraceLine(71,0,__PYX_ERR(14, 71, __pyx_L1_error)) - __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__documentOrRaise(__pyx_v_etree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 71, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__documentOrRaise(__pyx_v_etree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_1); __pyx_t_1 = 0; @@ -170096,7 +158404,6 @@ static int __pyx_pf_4lxml_5etree_7_IDDict___cinit__(struct __pyx_obj_4lxml_5etre * raise ValueError, u"No ID dictionary available." * self._doc = doc */ - __Pyx_TraceLine(72,0,__PYX_ERR(14, 72, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_doc->_c_doc->ids == NULL) != 0); if (unlikely(__pyx_t_2)) { @@ -170107,9 +158414,8 @@ static int __pyx_pf_4lxml_5etree_7_IDDict___cinit__(struct __pyx_obj_4lxml_5etre * self._doc = doc * self._keys = None */ - __Pyx_TraceLine(73,0,__PYX_ERR(14, 73, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_No_ID_dictionary_available, 0, 0); - __PYX_ERR(14, 73, __pyx_L1_error) + __PYX_ERR(15, 73, __pyx_L1_error) /* "src/lxml/xmlid.pxi":72 * cdef _Document doc @@ -170127,7 +158433,6 @@ static int __pyx_pf_4lxml_5etree_7_IDDict___cinit__(struct __pyx_obj_4lxml_5etre * self._keys = None * self._items = None */ - __Pyx_TraceLine(74,0,__PYX_ERR(14, 74, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_doc)); __Pyx_GIVEREF(((PyObject *)__pyx_v_doc)); __Pyx_GOTREF(__pyx_v_self->_doc); @@ -170141,7 +158446,6 @@ static int __pyx_pf_4lxml_5etree_7_IDDict___cinit__(struct __pyx_obj_4lxml_5etre * self._items = None * */ - __Pyx_TraceLine(75,0,__PYX_ERR(14, 75, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_keys); @@ -170155,7 +158459,6 @@ static int __pyx_pf_4lxml_5etree_7_IDDict___cinit__(struct __pyx_obj_4lxml_5etre * * def copy(self): */ - __Pyx_TraceLine(76,0,__PYX_ERR(14, 76, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_items); @@ -170179,7 +158482,6 @@ static int __pyx_pf_4lxml_5etree_7_IDDict___cinit__(struct __pyx_obj_4lxml_5etre __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_doc); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -170208,12 +158510,9 @@ static PyObject *__pyx_pw_4lxml_5etree_7_IDDict_3copy(PyObject *__pyx_v_self, CY static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_2copy(struct __pyx_obj_4lxml_5etree__IDDict *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__317) __Pyx_RefNannySetupContext("copy", 0); - __Pyx_TraceCall("copy", __pyx_f[14], 78, 0, __PYX_ERR(14, 78, __pyx_L1_error)); /* "src/lxml/xmlid.pxi":79 * @@ -170222,9 +158521,8 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_2copy(struct __pyx_obj_4lxml_5et * * def __getitem__(self, id_name): */ - __Pyx_TraceLine(79,0,__PYX_ERR(14, 79, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree__IDDict), ((PyObject *)__pyx_v_self->_doc)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 79, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree__IDDict), ((PyObject *)__pyx_v_self->_doc)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -170245,7 +158543,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_2copy(struct __pyx_obj_4lxml_5et __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -170277,7 +158574,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_4__getitem__(struct __pyx_obj_4l xmlAttr *__pyx_v_c_attr; PyObject *__pyx_v_id_utf = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlHashTable *__pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -170286,7 +158582,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_4__getitem__(struct __pyx_obj_4l int __pyx_t_5; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__getitem__", 0); - __Pyx_TraceCall("__getitem__", __pyx_f[14], 81, 0, __PYX_ERR(14, 81, __pyx_L1_error)); /* "src/lxml/xmlid.pxi":85 * cdef tree.xmlID* c_id @@ -170295,7 +158590,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_4__getitem__(struct __pyx_obj_4l * id_utf = _utf8(id_name) * c_id = tree.xmlHashLookup(c_ids, _xcstr(id_utf)) */ - __Pyx_TraceLine(85,0,__PYX_ERR(14, 85, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_doc->_c_doc->ids; __pyx_v_c_ids = __pyx_t_1; @@ -170306,8 +158600,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_4__getitem__(struct __pyx_obj_4l * c_id = tree.xmlHashLookup(c_ids, _xcstr(id_utf)) * if c_id is NULL: */ - __Pyx_TraceLine(86,0,__PYX_ERR(14, 86, __pyx_L1_error)) - __pyx_t_2 = __pyx_f_4lxml_5etree__utf8(__pyx_v_id_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 86, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__utf8(__pyx_v_id_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_id_utf = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; @@ -170319,7 +158612,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_4__getitem__(struct __pyx_obj_4l * if c_id is NULL: * raise KeyError, u"key not found." */ - __Pyx_TraceLine(87,0,__PYX_ERR(14, 87, __pyx_L1_error)) __pyx_v_c_id = ((xmlID *)xmlHashLookup(__pyx_v_c_ids, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_id_utf))); /* "src/lxml/xmlid.pxi":88 @@ -170329,7 +158621,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_4__getitem__(struct __pyx_obj_4l * raise KeyError, u"key not found." * c_attr = c_id.attr */ - __Pyx_TraceLine(88,0,__PYX_ERR(14, 88, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_id == NULL) != 0); if (unlikely(__pyx_t_3)) { @@ -170340,9 +158631,8 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_4__getitem__(struct __pyx_obj_4l * c_attr = c_id.attr * if c_attr is NULL or c_attr.parent is NULL: */ - __Pyx_TraceLine(89,0,__PYX_ERR(14, 89, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_KeyError, __pyx_kp_u_key_not_found, 0, 0); - __PYX_ERR(14, 89, __pyx_L1_error) + __PYX_ERR(15, 89, __pyx_L1_error) /* "src/lxml/xmlid.pxi":88 * id_utf = _utf8(id_name) @@ -170360,7 +158650,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_4__getitem__(struct __pyx_obj_4l * if c_attr is NULL or c_attr.parent is NULL: * raise KeyError, u"ID attribute not found." */ - __Pyx_TraceLine(90,0,__PYX_ERR(14, 90, __pyx_L1_error)) __pyx_t_4 = __pyx_v_c_id->attr; __pyx_v_c_attr = __pyx_t_4; @@ -170371,7 +158660,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_4__getitem__(struct __pyx_obj_4l * raise KeyError, u"ID attribute not found." * return _elementFactory(self._doc, c_attr.parent) */ - __Pyx_TraceLine(91,0,__PYX_ERR(14, 91, __pyx_L1_error)) __pyx_t_5 = ((__pyx_v_c_attr == NULL) != 0); if (!__pyx_t_5) { } else { @@ -170390,9 +158678,8 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_4__getitem__(struct __pyx_obj_4l * return _elementFactory(self._doc, c_attr.parent) * */ - __Pyx_TraceLine(92,0,__PYX_ERR(14, 92, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_KeyError, __pyx_kp_u_ID_attribute_not_found, 0, 0); - __PYX_ERR(14, 92, __pyx_L1_error) + __PYX_ERR(15, 92, __pyx_L1_error) /* "src/lxml/xmlid.pxi":91 * raise KeyError, u"key not found." @@ -170410,11 +158697,10 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_4__getitem__(struct __pyx_obj_4l * * def get(self, id_name): */ - __Pyx_TraceLine(93,0,__PYX_ERR(14, 93, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = ((PyObject *)__pyx_v_self->_doc); __Pyx_INCREF(__pyx_t_2); - __pyx_t_6 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_2), __pyx_v_c_attr->parent)); if (unlikely(!__pyx_t_6)) __PYX_ERR(14, 93, __pyx_L1_error) + __pyx_t_6 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_2), __pyx_v_c_attr->parent)); if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_6; @@ -170438,7 +158724,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_4__getitem__(struct __pyx_obj_4l __pyx_L0:; __Pyx_XDECREF(__pyx_v_id_utf); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -170467,12 +158752,9 @@ static PyObject *__pyx_pw_4lxml_5etree_7_IDDict_7get(PyObject *__pyx_v_self, PyO static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_6get(struct __pyx_obj_4lxml_5etree__IDDict *__pyx_v_self, PyObject *__pyx_v_id_name) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__318) __Pyx_RefNannySetupContext("get", 0); - __Pyx_TraceCall("get", __pyx_f[14], 95, 0, __PYX_ERR(14, 95, __pyx_L1_error)); /* "src/lxml/xmlid.pxi":96 * @@ -170481,9 +158763,8 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_6get(struct __pyx_obj_4lxml_5etr * * def __contains__(self, id_name): */ - __Pyx_TraceLine(96,0,__PYX_ERR(14, 96, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_id_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 96, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_id_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -170504,7 +158785,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_6get(struct __pyx_obj_4lxml_5etr __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -170534,11 +158814,9 @@ static int __pyx_pf_4lxml_5etree_7_IDDict_8__contains__(struct __pyx_obj_4lxml_5 xmlID *__pyx_v_c_id; PyObject *__pyx_v_id_utf = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__contains__", 0); - __Pyx_TraceCall("__contains__", __pyx_f[14], 98, 0, __PYX_ERR(14, 98, __pyx_L1_error)); /* "src/lxml/xmlid.pxi":100 * def __contains__(self, id_name): @@ -170547,8 +158825,7 @@ static int __pyx_pf_4lxml_5etree_7_IDDict_8__contains__(struct __pyx_obj_4lxml_5 * c_id = tree.xmlHashLookup( * self._doc._c_doc.ids, _xcstr(id_utf)) */ - __Pyx_TraceLine(100,0,__PYX_ERR(14, 100, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_id_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 100, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_id_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_id_utf = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; @@ -170560,7 +158837,6 @@ static int __pyx_pf_4lxml_5etree_7_IDDict_8__contains__(struct __pyx_obj_4lxml_5 * self._doc._c_doc.ids, _xcstr(id_utf)) * return c_id is not NULL */ - __Pyx_TraceLine(101,0,__PYX_ERR(14, 101, __pyx_L1_error)) __pyx_v_c_id = ((xmlID *)xmlHashLookup(__pyx_v_self->_doc->_c_doc->ids, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_id_utf))); /* "src/lxml/xmlid.pxi":103 @@ -170570,7 +158846,6 @@ static int __pyx_pf_4lxml_5etree_7_IDDict_8__contains__(struct __pyx_obj_4lxml_5 * * def has_key(self, id_name): */ - __Pyx_TraceLine(103,0,__PYX_ERR(14, 103, __pyx_L1_error)) __pyx_r = (__pyx_v_c_id != NULL); goto __pyx_L0; @@ -170589,7 +158864,6 @@ static int __pyx_pf_4lxml_5etree_7_IDDict_8__contains__(struct __pyx_obj_4lxml_5 __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_id_utf); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -170618,13 +158892,10 @@ static PyObject *__pyx_pw_4lxml_5etree_7_IDDict_11has_key(PyObject *__pyx_v_self static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_10has_key(struct __pyx_obj_4lxml_5etree__IDDict *__pyx_v_self, PyObject *__pyx_v_id_name) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__319) __Pyx_RefNannySetupContext("has_key", 0); - __Pyx_TraceCall("has_key", __pyx_f[14], 105, 0, __PYX_ERR(14, 105, __pyx_L1_error)); /* "src/lxml/xmlid.pxi":106 * @@ -170633,10 +158904,9 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_10has_key(struct __pyx_obj_4lxml * * def __repr__(self): */ - __Pyx_TraceLine(106,0,__PYX_ERR(14, 106, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_id_name, ((PyObject *)__pyx_v_self), Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(14, 106, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 106, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_id_name, ((PyObject *)__pyx_v_self), Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(15, 106, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -170657,7 +158927,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_10has_key(struct __pyx_obj_4lxml __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -170685,12 +158954,10 @@ static PyObject *__pyx_pw_4lxml_5etree_7_IDDict_13__repr__(PyObject *__pyx_v_sel static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_12__repr__(struct __pyx_obj_4lxml_5etree__IDDict *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[14], 108, 0, __PYX_ERR(14, 108, __pyx_L1_error)); /* "src/lxml/xmlid.pxi":109 * @@ -170699,11 +158966,10 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_12__repr__(struct __pyx_obj_4lxm * * def keys(self): */ - __Pyx_TraceLine(109,0,__PYX_ERR(14, 109, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 109, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 109, __pyx_L1_error) + __pyx_t_2 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; @@ -170726,7 +158992,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_12__repr__(struct __pyx_obj_4lxm __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -170755,14 +159020,11 @@ static PyObject *__pyx_pw_4lxml_5etree_7_IDDict_15keys(PyObject *__pyx_v_self, C static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_14keys(struct __pyx_obj_4lxml_5etree__IDDict *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__320) __Pyx_RefNannySetupContext("keys", 0); - __Pyx_TraceCall("keys", __pyx_f[14], 111, 0, __PYX_ERR(14, 111, __pyx_L1_error)); /* "src/lxml/xmlid.pxi":112 * @@ -170771,7 +159033,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_14keys(struct __pyx_obj_4lxml_5e * self._keys = self._build_keys() * return self._keys[:] */ - __Pyx_TraceLine(112,0,__PYX_ERR(14, 112, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_keys == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -170783,8 +159044,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_14keys(struct __pyx_obj_4lxml_5e * return self._keys[:] * */ - __Pyx_TraceLine(113,0,__PYX_ERR(14, 113, __pyx_L1_error)) - __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree__IDDict *)__pyx_v_self->__pyx_vtab)->_build_keys(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 113, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree__IDDict *)__pyx_v_self->__pyx_vtab)->_build_keys(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_keys); @@ -170808,9 +159068,8 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_14keys(struct __pyx_obj_4lxml_5e * * def __iter__(self): */ - __Pyx_TraceLine(114,0,__PYX_ERR(14, 114, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_self->_keys, 0, 0, NULL, NULL, &__pyx_slice__321, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 114, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_self->_keys, 0, 0, NULL, NULL, &__pyx_slice__76, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -170831,7 +159090,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_14keys(struct __pyx_obj_4lxml_5e __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -170859,14 +159117,12 @@ static PyObject *__pyx_pw_4lxml_5etree_7_IDDict_17__iter__(PyObject *__pyx_v_sel static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_16__iter__(struct __pyx_obj_4lxml_5etree__IDDict *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__iter__", 0); - __Pyx_TraceCall("__iter__", __pyx_f[14], 116, 0, __PYX_ERR(14, 116, __pyx_L1_error)); /* "src/lxml/xmlid.pxi":117 * @@ -170875,7 +159131,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_16__iter__(struct __pyx_obj_4lxm * self._keys = self._build_keys() * return iter(self._keys) */ - __Pyx_TraceLine(117,0,__PYX_ERR(14, 117, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_keys == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -170887,8 +159142,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_16__iter__(struct __pyx_obj_4lxm * return iter(self._keys) * */ - __Pyx_TraceLine(118,0,__PYX_ERR(14, 118, __pyx_L1_error)) - __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree__IDDict *)__pyx_v_self->__pyx_vtab)->_build_keys(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 118, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree__IDDict *)__pyx_v_self->__pyx_vtab)->_build_keys(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_keys); @@ -170912,11 +159166,10 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_16__iter__(struct __pyx_obj_4lxm * * def iterkeys(self): */ - __Pyx_TraceLine(119,0,__PYX_ERR(14, 119, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_v_self->_keys; __Pyx_INCREF(__pyx_t_3); - __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 119, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; @@ -170939,7 +159192,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_16__iter__(struct __pyx_obj_4lxm __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -170968,11 +159220,8 @@ static PyObject *__pyx_pw_4lxml_5etree_7_IDDict_19iterkeys(PyObject *__pyx_v_sel static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_18iterkeys(struct __pyx_obj_4lxml_5etree__IDDict *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - __Pyx_TraceFrameInit(__pyx_codeobj__322) __Pyx_RefNannySetupContext("iterkeys", 0); - __Pyx_TraceCall("iterkeys", __pyx_f[14], 121, 0, __PYX_ERR(14, 121, __pyx_L1_error)); /* "src/lxml/xmlid.pxi":122 * @@ -170981,7 +159230,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_18iterkeys(struct __pyx_obj_4lxm * * def __len__(self): */ - __Pyx_TraceLine(122,0,__PYX_ERR(14, 122, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); @@ -170996,12 +159244,8 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_18iterkeys(struct __pyx_obj_4lxm */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._IDDict.iterkeys", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -171029,14 +159273,12 @@ static Py_ssize_t __pyx_pw_4lxml_5etree_7_IDDict_21__len__(PyObject *__pyx_v_sel static Py_ssize_t __pyx_pf_4lxml_5etree_7_IDDict_20__len__(struct __pyx_obj_4lxml_5etree__IDDict *__pyx_v_self) { Py_ssize_t __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; __Pyx_RefNannySetupContext("__len__", 0); - __Pyx_TraceCall("__len__", __pyx_f[14], 124, 0, __PYX_ERR(14, 124, __pyx_L1_error)); /* "src/lxml/xmlid.pxi":125 * @@ -171045,7 +159287,6 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_7_IDDict_20__len__(struct __pyx_obj_4lxm * self._keys = self._build_keys() * return len(self._keys) */ - __Pyx_TraceLine(125,0,__PYX_ERR(14, 125, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_keys == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -171057,8 +159298,7 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_7_IDDict_20__len__(struct __pyx_obj_4lxm * return len(self._keys) * */ - __Pyx_TraceLine(126,0,__PYX_ERR(14, 126, __pyx_L1_error)) - __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree__IDDict *)__pyx_v_self->__pyx_vtab)->_build_keys(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 126, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree__IDDict *)__pyx_v_self->__pyx_vtab)->_build_keys(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_keys); @@ -171082,10 +159322,9 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_7_IDDict_20__len__(struct __pyx_obj_4lxm * * def items(self): */ - __Pyx_TraceLine(127,0,__PYX_ERR(14, 127, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->_keys; __Pyx_INCREF(__pyx_t_3); - __pyx_t_4 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(14, 127, __pyx_L1_error) + __pyx_t_4 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(15, 127, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; goto __pyx_L0; @@ -171104,7 +159343,6 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_7_IDDict_20__len__(struct __pyx_obj_4lxm __Pyx_AddTraceback("lxml.etree._IDDict.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -171133,14 +159371,11 @@ static PyObject *__pyx_pw_4lxml_5etree_7_IDDict_23items(PyObject *__pyx_v_self, static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_22items(struct __pyx_obj_4lxml_5etree__IDDict *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__323) __Pyx_RefNannySetupContext("items", 0); - __Pyx_TraceCall("items", __pyx_f[14], 129, 0, __PYX_ERR(14, 129, __pyx_L1_error)); /* "src/lxml/xmlid.pxi":130 * @@ -171149,7 +159384,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_22items(struct __pyx_obj_4lxml_5 * self._items = self._build_items() * return self._items[:] */ - __Pyx_TraceLine(130,0,__PYX_ERR(14, 130, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_items == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -171161,8 +159395,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_22items(struct __pyx_obj_4lxml_5 * return self._items[:] * */ - __Pyx_TraceLine(131,0,__PYX_ERR(14, 131, __pyx_L1_error)) - __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree__IDDict *)__pyx_v_self->__pyx_vtab)->_build_items(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 131, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree__IDDict *)__pyx_v_self->__pyx_vtab)->_build_items(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_items); @@ -171186,9 +159419,8 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_22items(struct __pyx_obj_4lxml_5 * * def iteritems(self): */ - __Pyx_TraceLine(132,0,__PYX_ERR(14, 132, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_self->_items, 0, 0, NULL, NULL, &__pyx_slice__324, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 132, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_self->_items, 0, 0, NULL, NULL, &__pyx_slice__76, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -171209,7 +159441,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_22items(struct __pyx_obj_4lxml_5 __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -171238,15 +159469,12 @@ static PyObject *__pyx_pw_4lxml_5etree_7_IDDict_25iteritems(PyObject *__pyx_v_se static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_24iteritems(struct __pyx_obj_4lxml_5etree__IDDict *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__325) __Pyx_RefNannySetupContext("iteritems", 0); - __Pyx_TraceCall("iteritems", __pyx_f[14], 134, 0, __PYX_ERR(14, 134, __pyx_L1_error)); /* "src/lxml/xmlid.pxi":135 * @@ -171255,7 +159483,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_24iteritems(struct __pyx_obj_4lx * self._items = self._build_items() * return iter(self._items) */ - __Pyx_TraceLine(135,0,__PYX_ERR(14, 135, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_items == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -171267,8 +159494,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_24iteritems(struct __pyx_obj_4lx * return iter(self._items) * */ - __Pyx_TraceLine(136,0,__PYX_ERR(14, 136, __pyx_L1_error)) - __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree__IDDict *)__pyx_v_self->__pyx_vtab)->_build_items(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 136, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree__IDDict *)__pyx_v_self->__pyx_vtab)->_build_items(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_items); @@ -171292,11 +159518,10 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_24iteritems(struct __pyx_obj_4lx * * def values(self): */ - __Pyx_TraceLine(137,0,__PYX_ERR(14, 137, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_v_self->_items; __Pyx_INCREF(__pyx_t_3); - __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 137, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; @@ -171319,7 +159544,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_24iteritems(struct __pyx_obj_4lx __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -171351,7 +159575,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_26values(struct __pyx_obj_4lxml_ PyObject *__pyx_v_item = NULL; PyObject *__pyx_v_value = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -171360,9 +159583,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_26values(struct __pyx_obj_4lxml_ PyObject *(*__pyx_t_5)(PyObject *); PyObject *__pyx_t_6 = NULL; int __pyx_t_7; - __Pyx_TraceFrameInit(__pyx_codeobj__326) __Pyx_RefNannySetupContext("values", 0); - __Pyx_TraceCall("values", __pyx_f[14], 139, 0, __PYX_ERR(14, 139, __pyx_L1_error)); /* "src/lxml/xmlid.pxi":140 * @@ -171371,8 +159592,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_26values(struct __pyx_obj_4lxml_ * if self._items is None: * self._items = self._build_items() */ - __Pyx_TraceLine(140,0,__PYX_ERR(14, 140, __pyx_L1_error)) - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 140, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_values = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; @@ -171384,7 +159604,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_26values(struct __pyx_obj_4lxml_ * self._items = self._build_items() * for item in self._items: */ - __Pyx_TraceLine(141,0,__PYX_ERR(14, 141, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_self->_items == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -171396,8 +159615,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_26values(struct __pyx_obj_4lxml_ * for item in self._items: * value = python.PyTuple_GET_ITEM(item, 1) */ - __Pyx_TraceLine(142,0,__PYX_ERR(14, 142, __pyx_L1_error)) - __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__IDDict *)__pyx_v_self->__pyx_vtab)->_build_items(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 142, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__IDDict *)__pyx_v_self->__pyx_vtab)->_build_items(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_items); @@ -171421,31 +159639,30 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_26values(struct __pyx_obj_4lxml_ * value = python.PyTuple_GET_ITEM(item, 1) * python.Py_INCREF(value) */ - __Pyx_TraceLine(143,0,__PYX_ERR(14, 143, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_v_self->_items)) || PyTuple_CheckExact(__pyx_v_self->_items)) { __pyx_t_1 = __pyx_v_self->_items; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 143, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 143, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 143, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_5)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_4 >= 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_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(14, 143, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(15, 143, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(14, 143, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_4 >= 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_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(14, 143, __pyx_L1_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(15, 143, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(14, 143, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } @@ -171455,7 +159672,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_26values(struct __pyx_obj_4lxml_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(14, 143, __pyx_L1_error) + else __PYX_ERR(15, 143, __pyx_L1_error) } break; } @@ -171471,8 +159688,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_26values(struct __pyx_obj_4lxml_ * python.Py_INCREF(value) * values.append(value) */ - __Pyx_TraceLine(144,0,__PYX_ERR(14, 144, __pyx_L1_error)) - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_v_item, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(14, 144, __pyx_L1_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_v_item, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6); __pyx_t_6 = 0; @@ -171484,7 +159700,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_26values(struct __pyx_obj_4lxml_ * values.append(value) * return values */ - __Pyx_TraceLine(145,0,__PYX_ERR(14, 145, __pyx_L1_error)) Py_INCREF(__pyx_v_value); /* "src/lxml/xmlid.pxi":146 @@ -171494,8 +159709,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_26values(struct __pyx_obj_4lxml_ * return values * */ - __Pyx_TraceLine(146,0,__PYX_ERR(14, 146, __pyx_L1_error)) - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_values, __pyx_v_value); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(14, 146, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_values, __pyx_v_value); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(15, 146, __pyx_L1_error) /* "src/lxml/xmlid.pxi":143 * if self._items is None: @@ -171504,7 +159718,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_26values(struct __pyx_obj_4lxml_ * value = python.PyTuple_GET_ITEM(item, 1) * python.Py_INCREF(value) */ - __Pyx_TraceLine(143,0,__PYX_ERR(14, 143, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -171515,7 +159728,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_26values(struct __pyx_obj_4lxml_ * * def itervalues(self): */ - __Pyx_TraceLine(147,0,__PYX_ERR(14, 147, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_values); __pyx_r = __pyx_v_values; @@ -171540,7 +159752,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_26values(struct __pyx_obj_4lxml_ __Pyx_XDECREF(__pyx_v_item); __Pyx_XDECREF(__pyx_v_value); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -171569,14 +159780,11 @@ static PyObject *__pyx_pw_4lxml_5etree_7_IDDict_29itervalues(PyObject *__pyx_v_s static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_28itervalues(struct __pyx_obj_4lxml_5etree__IDDict *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__327) __Pyx_RefNannySetupContext("itervalues", 0); - __Pyx_TraceCall("itervalues", __pyx_f[14], 149, 0, __PYX_ERR(14, 149, __pyx_L1_error)); /* "src/lxml/xmlid.pxi":150 * @@ -171585,9 +159793,8 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_28itervalues(struct __pyx_obj_4l * * cdef object _build_keys(self): */ - __Pyx_TraceLine(150,0,__PYX_ERR(14, 150, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 150, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -171599,15 +159806,12 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_28itervalues(struct __pyx_obj_4l __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 150, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 150, __pyx_L1_error) - } + __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(15, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 150, __pyx_L1_error) + __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; @@ -171631,7 +159835,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_28itervalues(struct __pyx_obj_4l __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -171647,11 +159850,9 @@ static PyObject *__pyx_pf_4lxml_5etree_7_IDDict_28itervalues(struct __pyx_obj_4l static PyObject *__pyx_f_4lxml_5etree_7_IDDict__build_keys(struct __pyx_obj_4lxml_5etree__IDDict *__pyx_v_self) { PyObject *__pyx_v_keys = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_build_keys", 0); - __Pyx_TraceCall("_build_keys", __pyx_f[14], 152, 0, __PYX_ERR(14, 152, __pyx_L1_error)); /* "src/lxml/xmlid.pxi":153 * @@ -171660,8 +159861,7 @@ static PyObject *__pyx_f_4lxml_5etree_7_IDDict__build_keys(struct __pyx_obj_4lxm * tree.xmlHashScan(self._doc._c_doc.ids, * _collectIdHashKeys, keys) */ - __Pyx_TraceLine(153,0,__PYX_ERR(14, 153, __pyx_L1_error)) - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 153, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_keys = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; @@ -171673,7 +159873,6 @@ static PyObject *__pyx_f_4lxml_5etree_7_IDDict__build_keys(struct __pyx_obj_4lxm * _collectIdHashKeys, keys) * return keys */ - __Pyx_TraceLine(154,0,__PYX_ERR(14, 154, __pyx_L1_error)) xmlHashScan(((xmlHashTable *)__pyx_v_self->_doc->_c_doc->ids), ((xmlHashScanner)__pyx_f_4lxml_5etree__collectIdHashKeys), ((PyObject *)__pyx_v_keys)); /* "src/lxml/xmlid.pxi":156 @@ -171683,7 +159882,6 @@ static PyObject *__pyx_f_4lxml_5etree_7_IDDict__build_keys(struct __pyx_obj_4lxm * * cdef object _build_items(self): */ - __Pyx_TraceLine(156,0,__PYX_ERR(14, 156, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_keys); __pyx_r = __pyx_v_keys; @@ -171705,7 +159903,6 @@ static PyObject *__pyx_f_4lxml_5etree_7_IDDict__build_keys(struct __pyx_obj_4lxm __pyx_L0:; __Pyx_XDECREF(__pyx_v_keys); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -171722,11 +159919,9 @@ static PyObject *__pyx_f_4lxml_5etree_7_IDDict__build_items(struct __pyx_obj_4lx PyObject *__pyx_v_items = NULL; PyObject *__pyx_v_context = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_build_items", 0); - __Pyx_TraceCall("_build_items", __pyx_f[14], 158, 0, __PYX_ERR(14, 158, __pyx_L1_error)); /* "src/lxml/xmlid.pxi":159 * @@ -171735,8 +159930,7 @@ static PyObject *__pyx_f_4lxml_5etree_7_IDDict__build_items(struct __pyx_obj_4lx * context = (items, self._doc) * tree.xmlHashScan(self._doc._c_doc.ids, */ - __Pyx_TraceLine(159,0,__PYX_ERR(14, 159, __pyx_L1_error)) - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 159, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_items = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; @@ -171748,8 +159942,7 @@ static PyObject *__pyx_f_4lxml_5etree_7_IDDict__build_items(struct __pyx_obj_4lx * tree.xmlHashScan(self._doc._c_doc.ids, * _collectIdHashItemList, context) */ - __Pyx_TraceLine(160,0,__PYX_ERR(14, 160, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 160, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_items); __Pyx_GIVEREF(__pyx_v_items); @@ -171767,7 +159960,6 @@ static PyObject *__pyx_f_4lxml_5etree_7_IDDict__build_items(struct __pyx_obj_4lx * _collectIdHashItemList, context) * return items */ - __Pyx_TraceLine(161,0,__PYX_ERR(14, 161, __pyx_L1_error)) xmlHashScan(((xmlHashTable *)__pyx_v_self->_doc->_c_doc->ids), ((xmlHashScanner)__pyx_f_4lxml_5etree__collectIdHashItemList), ((PyObject *)__pyx_v_context)); /* "src/lxml/xmlid.pxi":163 @@ -171777,7 +159969,6 @@ static PyObject *__pyx_f_4lxml_5etree_7_IDDict__build_items(struct __pyx_obj_4lx * * cdef void _collectIdHashItemList(void* payload, void* context, xmlChar* name): */ - __Pyx_TraceLine(163,0,__PYX_ERR(14, 163, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_items); __pyx_r = __pyx_v_items; @@ -171800,7 +159991,6 @@ static PyObject *__pyx_f_4lxml_5etree_7_IDDict__build_items(struct __pyx_obj_4lx __Pyx_XDECREF(__pyx_v_items); __Pyx_XDECREF(__pyx_v_context); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -171818,7 +160008,6 @@ static void __pyx_f_4lxml_5etree__collectIdHashItemList(void *__pyx_v_payload, v xmlID *__pyx_v_c_id; PyObject *__pyx_v_doc = NULL; struct LxmlElement *__pyx_v_element = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -171827,7 +160016,6 @@ static void __pyx_f_4lxml_5etree__collectIdHashItemList(void *__pyx_v_payload, v PyObject *__pyx_t_5 = NULL; int __pyx_t_6; __Pyx_RefNannySetupContext("_collectIdHashItemList", 0); - __Pyx_TraceCall("_collectIdHashItemList", __pyx_f[14], 165, 0, __PYX_ERR(14, 165, __pyx_L1_error)); /* "src/lxml/xmlid.pxi":168 * # collect elements from ID attribute hash table @@ -171836,7 +160024,6 @@ static void __pyx_f_4lxml_5etree__collectIdHashItemList(void *__pyx_v_payload, v * if c_id is NULL or c_id.attr is NULL or c_id.attr.parent is NULL: * return */ - __Pyx_TraceLine(168,0,__PYX_ERR(14, 168, __pyx_L1_error)) __pyx_v_c_id = ((xmlID *)__pyx_v_payload); /* "src/lxml/xmlid.pxi":169 @@ -171846,7 +160033,6 @@ static void __pyx_f_4lxml_5etree__collectIdHashItemList(void *__pyx_v_payload, v * return * lst, doc = context */ - __Pyx_TraceLine(169,0,__PYX_ERR(14, 169, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_id == NULL) != 0); if (!__pyx_t_2) { } else { @@ -171871,7 +160057,6 @@ static void __pyx_f_4lxml_5etree__collectIdHashItemList(void *__pyx_v_payload, v * lst, doc = context * element = _elementFactory(doc, c_id.attr.parent) */ - __Pyx_TraceLine(170,0,__PYX_ERR(14, 170, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/xmlid.pxi":169 @@ -171890,7 +160075,6 @@ static void __pyx_f_4lxml_5etree__collectIdHashItemList(void *__pyx_v_payload, v * element = _elementFactory(doc, c_id.attr.parent) * lst.append( (funicode(name), element) ) */ - __Pyx_TraceLine(171,0,__PYX_ERR(14, 171, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_v_context); __Pyx_INCREF(__pyx_t_3); if (likely(__pyx_t_3 != Py_None)) { @@ -171899,7 +160083,7 @@ static void __pyx_f_4lxml_5etree__collectIdHashItemList(void *__pyx_v_payload, v if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(14, 171, __pyx_L1_error) + __PYX_ERR(15, 171, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); @@ -171907,16 +160091,16 @@ static void __pyx_f_4lxml_5etree__collectIdHashItemList(void *__pyx_v_payload, v __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(14, 171, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 171, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(14, 171, __pyx_L1_error) + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(15, 171, __pyx_L1_error) } - if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(14, 171, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(15, 171, __pyx_L1_error) __pyx_v_lst = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; __pyx_v_doc = __pyx_t_5; @@ -171929,9 +160113,8 @@ static void __pyx_f_4lxml_5etree__collectIdHashItemList(void *__pyx_v_payload, v * lst.append( (funicode(name), element) ) * */ - __Pyx_TraceLine(172,0,__PYX_ERR(14, 172, __pyx_L1_error)) - if (!(likely(((__pyx_v_doc) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_doc, __pyx_ptype_4lxml_5etree__Document))))) __PYX_ERR(14, 172, __pyx_L1_error) - __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_v_doc), __pyx_v_c_id->attr->parent)); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 172, __pyx_L1_error) + if (!(likely(((__pyx_v_doc) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_doc, __pyx_ptype_4lxml_5etree__Document))))) __PYX_ERR(15, 172, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_v_doc), __pyx_v_c_id->attr->parent)); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_element = ((struct LxmlElement *)__pyx_t_3); __pyx_t_3 = 0; @@ -171943,14 +160126,13 @@ static void __pyx_f_4lxml_5etree__collectIdHashItemList(void *__pyx_v_payload, v * * cdef void _collectIdHashKeys(void* payload, void* collect_list, xmlChar* name): */ - __Pyx_TraceLine(173,0,__PYX_ERR(14, 173, __pyx_L1_error)) if (unlikely(__pyx_v_lst == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(14, 173, __pyx_L1_error) + __PYX_ERR(15, 173, __pyx_L1_error) } - __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 173, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 173, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); @@ -171958,7 +160140,7 @@ static void __pyx_f_4lxml_5etree__collectIdHashItemList(void *__pyx_v_payload, v __Pyx_GIVEREF(((PyObject *)__pyx_v_element)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_element)); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_lst, __pyx_t_5); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(14, 173, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_lst, __pyx_t_5); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(15, 173, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "src/lxml/xmlid.pxi":165 @@ -171980,7 +160162,6 @@ static void __pyx_f_4lxml_5etree__collectIdHashItemList(void *__pyx_v_payload, v __Pyx_XDECREF(__pyx_v_lst); __Pyx_XDECREF(__pyx_v_doc); __Pyx_XDECREF((PyObject *)__pyx_v_element); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -171994,14 +160175,12 @@ static void __pyx_f_4lxml_5etree__collectIdHashItemList(void *__pyx_v_payload, v static void __pyx_f_4lxml_5etree__collectIdHashKeys(void *__pyx_v_payload, void *__pyx_v_collect_list, xmlChar *__pyx_v_name) { xmlID *__pyx_v_c_id; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("_collectIdHashKeys", 0); - __Pyx_TraceCall("_collectIdHashKeys", __pyx_f[14], 175, 0, __PYX_ERR(14, 175, __pyx_L1_error)); /* "src/lxml/xmlid.pxi":176 * @@ -172010,7 +160189,6 @@ static void __pyx_f_4lxml_5etree__collectIdHashKeys(void *__pyx_v_payload, void * if c_id is NULL or c_id.attr is NULL or c_id.attr.parent is NULL: * return */ - __Pyx_TraceLine(176,0,__PYX_ERR(14, 176, __pyx_L1_error)) __pyx_v_c_id = ((xmlID *)__pyx_v_payload); /* "src/lxml/xmlid.pxi":177 @@ -172020,7 +160198,6 @@ static void __pyx_f_4lxml_5etree__collectIdHashKeys(void *__pyx_v_payload, void * return * (collect_list).append(funicode(name)) */ - __Pyx_TraceLine(177,0,__PYX_ERR(14, 177, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_id == NULL) != 0); if (!__pyx_t_2) { } else { @@ -172044,7 +160221,6 @@ static void __pyx_f_4lxml_5etree__collectIdHashKeys(void *__pyx_v_payload, void * return # <<<<<<<<<<<<<< * (collect_list).append(funicode(name)) */ - __Pyx_TraceLine(178,0,__PYX_ERR(14, 178, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/xmlid.pxi":177 @@ -172061,14 +160237,13 @@ static void __pyx_f_4lxml_5etree__collectIdHashKeys(void *__pyx_v_payload, void * return * (collect_list).append(funicode(name)) # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(179,0,__PYX_ERR(14, 179, __pyx_L1_error)) if (unlikely(((PyObject *)__pyx_v_collect_list) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(14, 179, __pyx_L1_error) + __PYX_ERR(15, 179, __pyx_L1_error) } - __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 179, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyList_Append(((PyObject*)__pyx_v_collect_list), __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(14, 179, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyList_Append(((PyObject*)__pyx_v_collect_list), __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(15, 179, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/lxml/xmlid.pxi":175 @@ -172085,7 +160260,6 @@ static void __pyx_f_4lxml_5etree__collectIdHashKeys(void *__pyx_v_payload, void __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("lxml.etree._collectIdHashKeys", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -172115,11 +160289,9 @@ static int __pyx_pw_4lxml_5etree_8XInclude_1__init__(PyObject *__pyx_v_self, PyO static int __pyx_pf_4lxml_5etree_8XInclude___init__(struct __pyx_obj_4lxml_5etree_XInclude *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[15], 19, 0, __PYX_ERR(15, 19, __pyx_L1_error)); /* "src/lxml/xinclude.pxi":20 * cdef _ErrorLog _error_log @@ -172128,8 +160300,7 @@ static int __pyx_pf_4lxml_5etree_8XInclude___init__(struct __pyx_obj_4lxml_5etre * * property error_log: */ - __Pyx_TraceLine(20,0,__PYX_ERR(15, 20, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__ErrorLog)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 20, __pyx_L1_error) + __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); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_error_log); @@ -172153,7 +160324,6 @@ static int __pyx_pf_4lxml_5etree_8XInclude___init__(struct __pyx_obj_4lxml_5etre __Pyx_AddTraceback("lxml.etree.XInclude.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -172181,12 +160351,10 @@ static PyObject *__pyx_pw_4lxml_5etree_8XInclude_9error_log_1__get__(PyObject *_ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_9error_log___get__(struct __pyx_obj_4lxml_5etree_XInclude *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[15], 23, 0, __PYX_ERR(15, 23, __pyx_L1_error)); /* "src/lxml/xinclude.pxi":24 * property error_log: @@ -172195,13 +160363,12 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_9error_log___get__(struct __pyx * return self._error_log.copy() * */ - __Pyx_TraceLine(24,0,__PYX_ERR(15, 24, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_1 = (((PyObject *)__pyx_v_self->_error_log) != Py_None); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_XInclude_instance_not_initialise); - __PYX_ERR(15, 24, __pyx_L1_error) + __PYX_ERR(16, 24, __pyx_L1_error) } } #endif @@ -172213,9 +160380,8 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_9error_log___get__(struct __pyx * * def __call__(self, _Element node not None): */ - __Pyx_TraceLine(25,0,__PYX_ERR(15, 25, __pyx_L1_error)) __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(15, 25, __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(16, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -172236,7 +160402,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_9error_log___get__(struct __pyx __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -172279,7 +160444,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8XInclude_3__call__(PyObject *__pyx_v_sel else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(15, 27, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(16, 27, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -172290,13 +160455,13 @@ static PyObject *__pyx_pw_4lxml_5etree_8XInclude_3__call__(PyObject *__pyx_v_sel } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 27, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 27, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.XInclude.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_node), __pyx_ptype_4lxml_5etree__Element, 0, "node", 0))) __PYX_ERR(15, 27, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_node), __pyx_ptype_4lxml_5etree__Element, 0, "node", 0))) __PYX_ERR(16, 27, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_8XInclude_2__call__(((struct __pyx_obj_4lxml_5etree_XInclude *)__pyx_v_self), __pyx_v_node); /* function exit code */ @@ -172314,7 +160479,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_v_context = NULL; void *__pyx_v_c_context; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -172322,7 +160486,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[15], 27, 0, __PYX_ERR(15, 27, __pyx_L1_error)); /* "src/lxml/xinclude.pxi":37 * # i.e. as a sibling, which does not conflict with traversal. @@ -172331,8 +160494,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm * assert self._error_log is not None, "XInclude processor not initialised" * if node._doc._parser is not None: */ - __Pyx_TraceLine(37,0,__PYX_ERR(15, 37, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(15, 37, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(16, 37, __pyx_L1_error) /* "src/lxml/xinclude.pxi":38 * cdef int result @@ -172341,13 +160503,12 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm * if node._doc._parser is not None: * parse_options = node._doc._parser._parse_options */ - __Pyx_TraceLine(38,0,__PYX_ERR(15, 38, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_2 = (((PyObject *)__pyx_v_self->_error_log) != Py_None); if (unlikely(!(__pyx_t_2 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_XInclude_processor_not_initialis); - __PYX_ERR(15, 38, __pyx_L1_error) + __PYX_ERR(16, 38, __pyx_L1_error) } } #endif @@ -172359,7 +160520,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm * parse_options = node._doc._parser._parse_options * context = node._doc._parser._getParserContext() */ - __Pyx_TraceLine(39,0,__PYX_ERR(15, 39, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)__pyx_v_node->_doc->_parser) != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -172371,7 +160531,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm * context = node._doc._parser._getParserContext() * c_context = context */ - __Pyx_TraceLine(40,0,__PYX_ERR(15, 40, __pyx_L1_error)) __pyx_t_1 = __pyx_v_node->_doc->_parser->_parse_options; __pyx_v_parse_options = __pyx_t_1; @@ -172382,8 +160541,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm * c_context = context * else: */ - __Pyx_TraceLine(41,0,__PYX_ERR(15, 41, __pyx_L1_error)) - __pyx_t_4 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_node->_doc->_parser->__pyx_vtab)->_getParserContext(__pyx_v_node->_doc->_parser)); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 41, __pyx_L1_error) + __pyx_t_4 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_node->_doc->_parser->__pyx_vtab)->_getParserContext(__pyx_v_node->_doc->_parser)); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_4); __pyx_t_4 = 0; @@ -172395,7 +160553,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm * else: * parse_options = 0 */ - __Pyx_TraceLine(42,0,__PYX_ERR(15, 42, __pyx_L1_error)) __pyx_v_c_context = ((void *)__pyx_v_context); /* "src/lxml/xinclude.pxi":39 @@ -172415,7 +160572,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm * context = None * c_context = NULL */ - __Pyx_TraceLine(44,0,__PYX_ERR(15, 44, __pyx_L1_error)) /*else*/ { __pyx_v_parse_options = 0; @@ -172426,7 +160582,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm * c_context = NULL * */ - __Pyx_TraceLine(45,0,__PYX_ERR(15, 45, __pyx_L1_error)) __Pyx_INCREF(Py_None); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserContext *)Py_None); @@ -172437,7 +160592,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm * * self._error_log.connect() */ - __Pyx_TraceLine(46,0,__PYX_ERR(15, 46, __pyx_L1_error)) __pyx_v_c_context = NULL; } __pyx_L3:; @@ -172449,8 +160603,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm * if tree.LIBXML_VERSION < 20704 or not c_context: * __GLOBAL_PARSER_CONTEXT.pushImpliedContext(context) */ - __Pyx_TraceLine(48,0,__PYX_ERR(15, 48, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_9_ErrorLog_connect(__pyx_v_self->_error_log); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(15, 48, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_9_ErrorLog_connect(__pyx_v_self->_error_log); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(16, 48, __pyx_L1_error) /* "src/lxml/xinclude.pxi":49 * @@ -172459,7 +160612,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm * __GLOBAL_PARSER_CONTEXT.pushImpliedContext(context) * with nogil: */ - __Pyx_TraceLine(49,0,__PYX_ERR(15, 49, __pyx_L1_error)) __pyx_t_2 = ((LIBXML_VERSION < 0x50E0) != 0); if (!__pyx_t_2) { } else { @@ -172478,7 +160630,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm * with nogil: * if c_context: */ - __Pyx_TraceLine(50,0,__PYX_ERR(15, 50, __pyx_L1_error)) __pyx_f_4lxml_5etree_24_ParserDictionaryContext_pushImpliedContext(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, __pyx_v_context); /* "src/lxml/xinclude.pxi":49 @@ -172497,7 +160648,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm * if c_context: * result = xinclude.xmlXIncludeProcessTreeFlagsData( */ - __Pyx_TraceLine(51,0,__PYX_ERR(15, 51, __pyx_L1_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -172513,7 +160663,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm * result = xinclude.xmlXIncludeProcessTreeFlagsData( * node._c_node, parse_options, c_context) */ - __Pyx_TraceLine(52,1,__PYX_ERR(15, 52, __pyx_L8_error)) __pyx_t_3 = (__pyx_v_c_context != 0); if (__pyx_t_3) { @@ -172524,7 +160673,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm * node._c_node, parse_options, c_context) * else: */ - __Pyx_TraceLine(53,1,__PYX_ERR(15, 53, __pyx_L8_error)) __pyx_v_result = xmlXIncludeProcessTreeFlagsData(__pyx_v_node->_c_node, __pyx_v_parse_options, __pyx_v_c_context); /* "src/lxml/xinclude.pxi":52 @@ -172544,7 +160692,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm * if tree.LIBXML_VERSION < 20704 or not c_context: * __GLOBAL_PARSER_CONTEXT.popImpliedContext() */ - __Pyx_TraceLine(56,1,__PYX_ERR(15, 56, __pyx_L8_error)) /*else*/ { __pyx_v_result = xmlXIncludeProcessTree(__pyx_v_node->_c_node); } @@ -172558,7 +160705,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm * if c_context: * result = xinclude.xmlXIncludeProcessTreeFlagsData( */ - __Pyx_TraceLine(51,1,__PYX_ERR(15, 51, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -172567,13 +160713,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm #endif goto __pyx_L9; } - __pyx_L8_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L1_error; - } __pyx_L9:; } } @@ -172585,7 +160724,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm * __GLOBAL_PARSER_CONTEXT.popImpliedContext() * self._error_log.disconnect() */ - __Pyx_TraceLine(57,0,__PYX_ERR(15, 57, __pyx_L1_error)) __pyx_t_2 = ((LIBXML_VERSION < 0x50E0) != 0); if (!__pyx_t_2) { } else { @@ -172604,7 +160742,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm * self._error_log.disconnect() * */ - __Pyx_TraceLine(58,0,__PYX_ERR(15, 58, __pyx_L1_error)) __pyx_f_4lxml_5etree_24_ParserDictionaryContext_popImpliedContext(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT); /* "src/lxml/xinclude.pxi":57 @@ -172623,8 +160760,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm * * if result == -1: */ - __Pyx_TraceLine(59,0,__PYX_ERR(15, 59, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_9_ErrorLog_disconnect(__pyx_v_self->_error_log); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(15, 59, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_9_ErrorLog_disconnect(__pyx_v_self->_error_log); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(16, 59, __pyx_L1_error) /* "src/lxml/xinclude.pxi":61 * self._error_log.disconnect() @@ -172633,7 +160769,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm * raise XIncludeError( * self._error_log._buildExceptionMessage( */ - __Pyx_TraceLine(61,0,__PYX_ERR(15, 61, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_result == -1L) != 0); if (unlikely(__pyx_t_3)) { @@ -172644,8 +160779,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm * u"XInclude processing failed"), * self._error_log) */ - __Pyx_TraceLine(63,0,__PYX_ERR(15, 63, __pyx_L1_error)) - __pyx_t_4 = __pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_self->_error_log), __pyx_kp_u_XInclude_processing_failed); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 63, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_self->_error_log), __pyx_kp_u_XInclude_processing_failed); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "src/lxml/xinclude.pxi":62 @@ -172655,8 +160789,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm * self._error_log._buildExceptionMessage( * u"XInclude processing failed"), */ - __Pyx_TraceLine(62,0,__PYX_ERR(15, 62, __pyx_L1_error)) - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 62, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); @@ -172664,12 +160797,12 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_error_log)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_self->_error_log)); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_XIncludeError), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 62, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_XIncludeError), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 62, __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(15, 62, __pyx_L1_error) + __PYX_ERR(16, 62, __pyx_L1_error) /* "src/lxml/xinclude.pxi":61 * self._error_log.disconnect() @@ -172699,7 +160832,6 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -172715,7 +160847,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_55cleanup_namespaces(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_54cleanup_namespaces[] = "cleanup_namespaces(tree_or_element, top_nsmap=None, keep_ns_prefixes=None)\n\n Remove all namespace declarations from a subtree that are not used\n by any of the elements or attributes in that tree.\n\n If a 'top_nsmap' is provided, it must be a mapping from prefixes\n to namespace URIs. These namespaces will be declared on the top\n element of the subtree before running the cleanup, which allows\n moving namespace declarations to the top of the tree.\n\n If a 'keep_ns_prefixes' is provided, it must be a list of prefixes.\n These prefixes will not be removed as part of the cleanup.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_55cleanup_namespaces = {"cleanup_namespaces", (PyCFunction)__pyx_pw_4lxml_5etree_55cleanup_namespaces, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_54cleanup_namespaces}; +static PyMethodDef __pyx_mdef_4lxml_5etree_55cleanup_namespaces = {"cleanup_namespaces", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_55cleanup_namespaces, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_54cleanup_namespaces}; static PyObject *__pyx_pw_4lxml_5etree_55cleanup_namespaces(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tree_or_element = 0; PyObject *__pyx_v_top_nsmap = 0; @@ -172760,7 +160892,7 @@ static PyObject *__pyx_pw_4lxml_5etree_55cleanup_namespaces(PyObject *__pyx_self } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cleanup_namespaces") < 0)) __PYX_ERR(16, 3, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cleanup_namespaces") < 0)) __PYX_ERR(17, 3, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -172779,7 +160911,7 @@ static PyObject *__pyx_pw_4lxml_5etree_55cleanup_namespaces(PyObject *__pyx_self } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("cleanup_namespaces", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 3, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("cleanup_namespaces", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 3, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.cleanup_namespaces", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -172798,7 +160930,6 @@ static PyObject *__pyx_pf_4lxml_5etree_54cleanup_namespaces(CYTHON_UNUSED PyObje struct LxmlDocument *__pyx_v_doc = NULL; PyObject *__pyx_v_prefix = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; xmlNode *__pyx_t_2; @@ -172809,9 +160940,7 @@ static PyObject *__pyx_pf_4lxml_5etree_54cleanup_namespaces(CYTHON_UNUSED PyObje Py_ssize_t __pyx_t_7; PyObject *(*__pyx_t_8)(PyObject *); PyObject *__pyx_t_9 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__328) __Pyx_RefNannySetupContext("cleanup_namespaces", 0); - __Pyx_TraceCall("cleanup_namespaces", __pyx_f[16], 3, 0, __PYX_ERR(16, 3, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_keep_ns_prefixes); /* "src/lxml/cleanup.pxi":17 @@ -172821,8 +160950,7 @@ static PyObject *__pyx_pf_4lxml_5etree_54cleanup_namespaces(CYTHON_UNUSED PyObje * c_element = element._c_node * */ - __Pyx_TraceLine(17,0,__PYX_ERR(16, 17, __pyx_L1_error)) - __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__rootNodeOrRaise(__pyx_v_tree_or_element)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 17, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__rootNodeOrRaise(__pyx_v_tree_or_element)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_element = ((struct LxmlElement *)__pyx_t_1); __pyx_t_1 = 0; @@ -172834,7 +160962,6 @@ static PyObject *__pyx_pf_4lxml_5etree_54cleanup_namespaces(CYTHON_UNUSED PyObje * * if top_nsmap: */ - __Pyx_TraceLine(18,0,__PYX_ERR(16, 18, __pyx_L1_error)) __pyx_t_2 = __pyx_v_element->_c_node; __pyx_v_c_element = __pyx_t_2; @@ -172845,8 +160972,7 @@ static PyObject *__pyx_pf_4lxml_5etree_54cleanup_namespaces(CYTHON_UNUSED PyObje * doc = element._doc * # declare namespaces from nsmap, then apply them to the subtree */ - __Pyx_TraceLine(20,0,__PYX_ERR(16, 20, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_top_nsmap); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(16, 20, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_top_nsmap); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(17, 20, __pyx_L1_error) if (__pyx_t_3) { /* "src/lxml/cleanup.pxi":21 @@ -172856,7 +160982,6 @@ static PyObject *__pyx_pf_4lxml_5etree_54cleanup_namespaces(CYTHON_UNUSED PyObje * # declare namespaces from nsmap, then apply them to the subtree * _setNodeNamespaces(c_element, doc, None, top_nsmap) */ - __Pyx_TraceLine(21,0,__PYX_ERR(16, 21, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_v_element->_doc); __Pyx_INCREF(__pyx_t_1); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_1); @@ -172869,8 +160994,7 @@ static PyObject *__pyx_pf_4lxml_5etree_54cleanup_namespaces(CYTHON_UNUSED PyObje * moveNodeToDocument(doc, c_element.doc, c_element) * */ - __Pyx_TraceLine(23,0,__PYX_ERR(16, 23, __pyx_L1_error)) - __pyx_t_4 = __pyx_f_4lxml_5etree__setNodeNamespaces(__pyx_v_c_element, __pyx_v_doc, Py_None, __pyx_v_top_nsmap); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(16, 23, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__setNodeNamespaces(__pyx_v_c_element, __pyx_v_doc, Py_None, __pyx_v_top_nsmap); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(17, 23, __pyx_L1_error) /* "src/lxml/cleanup.pxi":24 * # declare namespaces from nsmap, then apply them to the subtree @@ -172879,8 +161003,7 @@ static PyObject *__pyx_pf_4lxml_5etree_54cleanup_namespaces(CYTHON_UNUSED PyObje * * keep_ns_prefixes = ( */ - __Pyx_TraceLine(24,0,__PYX_ERR(16, 24, __pyx_L1_error)) - __pyx_t_4 = __pyx_f_4lxml_5etree_moveNodeToDocument(__pyx_v_doc, __pyx_v_c_element->doc, __pyx_v_c_element); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(16, 24, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree_moveNodeToDocument(__pyx_v_doc, __pyx_v_c_element->doc, __pyx_v_c_element); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(17, 24, __pyx_L1_error) /* "src/lxml/cleanup.pxi":20 * c_element = element._c_node @@ -172898,8 +161021,7 @@ static PyObject *__pyx_pf_4lxml_5etree_54cleanup_namespaces(CYTHON_UNUSED PyObje * * _removeUnusedNamespaceDeclarations(c_element, keep_ns_prefixes) */ - __Pyx_TraceLine(28,0,__PYX_ERR(16, 28, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_keep_ns_prefixes); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(16, 28, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_keep_ns_prefixes); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(17, 28, __pyx_L1_error) if (__pyx_t_3) { /* "src/lxml/cleanup.pxi":27 @@ -172909,33 +161031,32 @@ static PyObject *__pyx_pf_4lxml_5etree_54cleanup_namespaces(CYTHON_UNUSED PyObje * if keep_ns_prefixes else None) * */ - __Pyx_TraceLine(27,0,__PYX_ERR(16, 27, __pyx_L1_error)) - __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 27, __pyx_L1_error) + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (likely(PyList_CheckExact(__pyx_v_keep_ns_prefixes)) || PyTuple_CheckExact(__pyx_v_keep_ns_prefixes)) { __pyx_t_6 = __pyx_v_keep_ns_prefixes; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_keep_ns_prefixes); if (unlikely(!__pyx_t_6)) __PYX_ERR(16, 27, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_keep_ns_prefixes); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(16, 27, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 27, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_8)) { if (likely(PyList_CheckExact(__pyx_t_6))) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_9 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(16, 27, __pyx_L1_error) + __pyx_t_9 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(17, 27, __pyx_L1_error) #else - __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(16, 27, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #endif } else { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(16, 27, __pyx_L1_error) + __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(17, 27, __pyx_L1_error) #else - __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(16, 27, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #endif } @@ -172945,7 +161066,7 @@ static PyObject *__pyx_pf_4lxml_5etree_54cleanup_namespaces(CYTHON_UNUSED PyObje PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(16, 27, __pyx_L1_error) + else __PYX_ERR(17, 27, __pyx_L1_error) } break; } @@ -172953,13 +161074,13 @@ static PyObject *__pyx_pf_4lxml_5etree_54cleanup_namespaces(CYTHON_UNUSED PyObje } __Pyx_XDECREF_SET(__pyx_v_prefix, __pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __pyx_f_4lxml_5etree__utf8(__pyx_v_prefix); if (unlikely(!__pyx_t_9)) __PYX_ERR(16, 27, __pyx_L1_error) + __pyx_t_9 = __pyx_f_4lxml_5etree__utf8(__pyx_v_prefix); if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_9))) __PYX_ERR(16, 27, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_9))) __PYX_ERR(17, 27, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PySet_New(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(16, 27, __pyx_L1_error) + __pyx_t_6 = PySet_New(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __pyx_t_6; @@ -172973,7 +161094,6 @@ static PyObject *__pyx_pf_4lxml_5etree_54cleanup_namespaces(CYTHON_UNUSED PyObje * * _removeUnusedNamespaceDeclarations(c_element, keep_ns_prefixes) */ - __Pyx_TraceLine(28,0,__PYX_ERR(16, 28, __pyx_L1_error)) __Pyx_INCREF(Py_None); __pyx_t_1 = Py_None; } @@ -172987,9 +161107,8 @@ static PyObject *__pyx_pf_4lxml_5etree_54cleanup_namespaces(CYTHON_UNUSED PyObje * * */ - __Pyx_TraceLine(30,0,__PYX_ERR(16, 30, __pyx_L1_error)) - if (!(likely(PySet_CheckExact(__pyx_v_keep_ns_prefixes))||((__pyx_v_keep_ns_prefixes) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "set", Py_TYPE(__pyx_v_keep_ns_prefixes)->tp_name), 0))) __PYX_ERR(16, 30, __pyx_L1_error) - __pyx_t_4 = __pyx_f_4lxml_5etree__removeUnusedNamespaceDeclarations(__pyx_v_c_element, ((PyObject*)__pyx_v_keep_ns_prefixes)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(16, 30, __pyx_L1_error) + if (!(likely(PySet_CheckExact(__pyx_v_keep_ns_prefixes))||((__pyx_v_keep_ns_prefixes) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "set", Py_TYPE(__pyx_v_keep_ns_prefixes)->tp_name), 0))) __PYX_ERR(17, 30, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__removeUnusedNamespaceDeclarations(__pyx_v_c_element, ((PyObject*)__pyx_v_keep_ns_prefixes)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(17, 30, __pyx_L1_error) /* "src/lxml/cleanup.pxi":3 * # functions for tree cleanup and removing elements from subtrees @@ -173015,7 +161134,6 @@ static PyObject *__pyx_pf_4lxml_5etree_54cleanup_namespaces(CYTHON_UNUSED PyObje __Pyx_XDECREF(__pyx_v_prefix); __Pyx_XDECREF(__pyx_v_keep_ns_prefixes); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -173031,7 +161149,7 @@ static PyObject *__pyx_pf_4lxml_5etree_54cleanup_namespaces(CYTHON_UNUSED PyObje /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_57strip_attributes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_56strip_attributes[] = "strip_attributes(tree_or_element, *attribute_names)\n\n Delete all attributes with the provided attribute names from an\n Element (or ElementTree) and its descendants.\n\n Attribute names can contain wildcards as in `_Element.iter`.\n\n Example usage::\n\n strip_attributes(root_element,\n 'simpleattr',\n '{http://some/ns}attrname',\n '{http://other/ns}*')\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_57strip_attributes = {"strip_attributes", (PyCFunction)__pyx_pw_4lxml_5etree_57strip_attributes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_56strip_attributes}; +static PyMethodDef __pyx_mdef_4lxml_5etree_57strip_attributes = {"strip_attributes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_57strip_attributes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_56strip_attributes}; static PyObject *__pyx_pw_4lxml_5etree_57strip_attributes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tree_or_element = 0; PyObject *__pyx_v_attribute_names = 0; @@ -173068,7 +161186,7 @@ static PyObject *__pyx_pw_4lxml_5etree_57strip_attributes(PyObject *__pyx_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, "strip_attributes") < 0)) __PYX_ERR(16, 33, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "strip_attributes") < 0)) __PYX_ERR(17, 33, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; @@ -173079,7 +161197,7 @@ static PyObject *__pyx_pw_4lxml_5etree_57strip_attributes(PyObject *__pyx_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("strip_attributes", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 33, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("strip_attributes", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 33, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_attribute_names); __pyx_v_attribute_names = 0; __Pyx_AddTraceback("lxml.etree.strip_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -173098,16 +161216,13 @@ static PyObject *__pyx_pf_4lxml_5etree_56strip_attributes(CYTHON_UNUSED PyObject struct __pyx_obj_4lxml_5etree__MultiTagMatcher *__pyx_v_matcher = 0; struct LxmlElement *__pyx_v_element = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; - __Pyx_TraceFrameInit(__pyx_codeobj__329) __Pyx_RefNannySetupContext("strip_attributes", 0); - __Pyx_TraceCall("strip_attributes", __pyx_f[16], 33, 0, __PYX_ERR(16, 33, __pyx_L1_error)); /* "src/lxml/cleanup.pxi":49 * """ @@ -173116,8 +161231,7 @@ static PyObject *__pyx_pf_4lxml_5etree_56strip_attributes(CYTHON_UNUSED PyObject * if not attribute_names: * return */ - __Pyx_TraceLine(49,0,__PYX_ERR(16, 49, __pyx_L1_error)) - __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__rootNodeOrRaise(__pyx_v_tree_or_element)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 49, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__rootNodeOrRaise(__pyx_v_tree_or_element)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_element = ((struct LxmlElement *)__pyx_t_1); __pyx_t_1 = 0; @@ -173129,7 +161243,6 @@ static PyObject *__pyx_pf_4lxml_5etree_56strip_attributes(CYTHON_UNUSED PyObject * return * */ - __Pyx_TraceLine(50,0,__PYX_ERR(16, 50, __pyx_L1_error)) __pyx_t_2 = (PyTuple_GET_SIZE(__pyx_v_attribute_names) != 0); __pyx_t_3 = ((!__pyx_t_2) != 0); if (__pyx_t_3) { @@ -173141,7 +161254,6 @@ static PyObject *__pyx_pf_4lxml_5etree_56strip_attributes(CYTHON_UNUSED PyObject * * matcher = _MultiTagMatcher.__new__(_MultiTagMatcher, attribute_names) */ - __Pyx_TraceLine(51,0,__PYX_ERR(16, 51, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -173162,13 +161274,12 @@ static PyObject *__pyx_pf_4lxml_5etree_56strip_attributes(CYTHON_UNUSED PyObject * matcher.cacheTags(element._doc) * if matcher.rejectsAllAttributes(): */ - __Pyx_TraceLine(53,0,__PYX_ERR(16, 53, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 53, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_attribute_names); __Pyx_GIVEREF(__pyx_v_attribute_names); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_attribute_names); - __pyx_t_4 = ((PyObject *)__pyx_tp_new_4lxml_5etree__MultiTagMatcher(((PyTypeObject *)__pyx_ptype_4lxml_5etree__MultiTagMatcher), __pyx_t_1, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 53, __pyx_L1_error) + __pyx_t_4 = ((PyObject *)__pyx_tp_new_4lxml_5etree__MultiTagMatcher(((PyTypeObject *)__pyx_ptype_4lxml_5etree__MultiTagMatcher), __pyx_t_1, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 53, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_matcher = ((struct __pyx_obj_4lxml_5etree__MultiTagMatcher *)__pyx_t_4); @@ -173181,10 +161292,9 @@ static PyObject *__pyx_pf_4lxml_5etree_56strip_attributes(CYTHON_UNUSED PyObject * if matcher.rejectsAllAttributes(): * return */ - __Pyx_TraceLine(54,0,__PYX_ERR(16, 54, __pyx_L1_error)) __pyx_t_4 = ((PyObject *)__pyx_v_element->_doc); __Pyx_INCREF(__pyx_t_4); - __pyx_t_5 = __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(__pyx_v_matcher, ((struct LxmlDocument *)__pyx_t_4), NULL); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(16, 54, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(__pyx_v_matcher, ((struct LxmlDocument *)__pyx_t_4), NULL); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(17, 54, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "src/lxml/cleanup.pxi":55 @@ -173194,7 +161304,6 @@ static PyObject *__pyx_pf_4lxml_5etree_56strip_attributes(CYTHON_UNUSED PyObject * return * _strip_attributes(element._c_node, matcher) */ - __Pyx_TraceLine(55,0,__PYX_ERR(16, 55, __pyx_L1_error)) __pyx_t_3 = (__pyx_f_4lxml_5etree_16_MultiTagMatcher_rejectsAllAttributes(__pyx_v_matcher) != 0); if (__pyx_t_3) { @@ -173205,7 +161314,6 @@ static PyObject *__pyx_pf_4lxml_5etree_56strip_attributes(CYTHON_UNUSED PyObject * _strip_attributes(element._c_node, matcher) * */ - __Pyx_TraceLine(56,0,__PYX_ERR(16, 56, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -173226,8 +161334,7 @@ static PyObject *__pyx_pf_4lxml_5etree_56strip_attributes(CYTHON_UNUSED PyObject * * */ - __Pyx_TraceLine(57,0,__PYX_ERR(16, 57, __pyx_L1_error)) - __pyx_t_4 = __pyx_f_4lxml_5etree__strip_attributes(__pyx_v_element->_c_node, __pyx_v_matcher); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 57, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__strip_attributes(__pyx_v_element->_c_node, __pyx_v_matcher); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -173251,7 +161358,6 @@ static PyObject *__pyx_pf_4lxml_5etree_56strip_attributes(CYTHON_UNUSED PyObject __Pyx_XDECREF((PyObject *)__pyx_v_matcher); __Pyx_XDECREF((PyObject *)__pyx_v_element); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -173268,12 +161374,10 @@ static PyObject *__pyx_f_4lxml_5etree__strip_attributes(xmlNode *__pyx_v_c_node, xmlAttr *__pyx_v_c_attr; xmlAttr *__pyx_v_c_next_attr; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlAttr *__pyx_t_2; __Pyx_RefNannySetupContext("_strip_attributes", 0); - __Pyx_TraceCall("_strip_attributes", __pyx_f[16], 60, 0, __PYX_ERR(16, 60, __pyx_L1_error)); /* "src/lxml/cleanup.pxi":63 * cdef xmlAttr* c_attr @@ -173282,7 +161386,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_attributes(xmlNode *__pyx_v_c_node, * if c_node.type == tree.XML_ELEMENT_NODE: * c_attr = c_node.properties */ - __Pyx_TraceLine(63,0,__PYX_ERR(16, 63, __pyx_L1_error)) BEGIN_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node, __pyx_v_c_node, 1); /* "src/lxml/cleanup.pxi":64 @@ -173292,7 +161395,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_attributes(xmlNode *__pyx_v_c_node, * c_attr = c_node.properties * while c_attr is not NULL: */ - __Pyx_TraceLine(64,0,__PYX_ERR(16, 64, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0); if (__pyx_t_1) { @@ -173303,7 +161405,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_attributes(xmlNode *__pyx_v_c_node, * while c_attr is not NULL: * c_next_attr = c_attr.next */ - __Pyx_TraceLine(65,0,__PYX_ERR(16, 65, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->properties; __pyx_v_c_attr = __pyx_t_2; @@ -173314,7 +161415,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_attributes(xmlNode *__pyx_v_c_node, * c_next_attr = c_attr.next * if matcher.matchesAttribute(c_attr): */ - __Pyx_TraceLine(66,0,__PYX_ERR(16, 66, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_attr != NULL) != 0); if (!__pyx_t_1) break; @@ -173326,7 +161426,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_attributes(xmlNode *__pyx_v_c_node, * if matcher.matchesAttribute(c_attr): * tree.xmlRemoveProp(c_attr) */ - __Pyx_TraceLine(67,0,__PYX_ERR(16, 67, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_attr->next; __pyx_v_c_next_attr = __pyx_t_2; @@ -173337,7 +161436,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_attributes(xmlNode *__pyx_v_c_node, * tree.xmlRemoveProp(c_attr) * c_attr = c_next_attr */ - __Pyx_TraceLine(68,0,__PYX_ERR(16, 68, __pyx_L1_error)) __pyx_t_1 = (__pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesAttribute(__pyx_v_matcher, __pyx_v_c_attr) != 0); if (__pyx_t_1) { @@ -173348,7 +161446,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_attributes(xmlNode *__pyx_v_c_node, * c_attr = c_next_attr * tree.END_FOR_EACH_ELEMENT_FROM(c_node) */ - __Pyx_TraceLine(69,0,__PYX_ERR(16, 69, __pyx_L1_error)) (void)(xmlRemoveProp(__pyx_v_c_attr)); /* "src/lxml/cleanup.pxi":68 @@ -173367,7 +161464,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_attributes(xmlNode *__pyx_v_c_node, * tree.END_FOR_EACH_ELEMENT_FROM(c_node) * */ - __Pyx_TraceLine(70,0,__PYX_ERR(16, 70, __pyx_L1_error)) __pyx_v_c_attr = __pyx_v_c_next_attr; } @@ -173387,7 +161483,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_attributes(xmlNode *__pyx_v_c_node, * * */ - __Pyx_TraceLine(71,0,__PYX_ERR(16, 71, __pyx_L1_error)) END_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node); /* "src/lxml/cleanup.pxi":60 @@ -173400,13 +161495,7 @@ static PyObject *__pyx_f_4lxml_5etree__strip_attributes(xmlNode *__pyx_v_c_node, /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._strip_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -173422,7 +161511,7 @@ static PyObject *__pyx_f_4lxml_5etree__strip_attributes(xmlNode *__pyx_v_c_node, /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_59strip_elements(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_58strip_elements[] = "strip_elements(tree_or_element, *tag_names, with_tail=True)\n\n Delete all elements with the provided tag names from a tree or\n subtree. This will remove the elements and their entire subtree,\n including all their attributes, text content and descendants. It\n will also remove the tail text of the element unless you\n explicitly set the ``with_tail`` keyword argument option to False.\n\n Tag names can contain wildcards as in `_Element.iter`.\n\n Note that this will not delete the element (or ElementTree root\n element) that you passed even if it matches. It will only treat\n its descendants. If you want to include the root element, check\n its tag name directly before even calling this function.\n\n Example usage::\n\n strip_elements(some_element,\n 'simpletagname', # non-namespaced tag\n '{http://some/ns}tagname', # namespaced tag\n '{http://some/other/ns}*' # any tag from a namespace\n lxml.etree.Comment # comments\n )\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_59strip_elements = {"strip_elements", (PyCFunction)__pyx_pw_4lxml_5etree_59strip_elements, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_58strip_elements}; +static PyMethodDef __pyx_mdef_4lxml_5etree_59strip_elements = {"strip_elements", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_59strip_elements, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_58strip_elements}; static PyObject *__pyx_pw_4lxml_5etree_59strip_elements(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tree_or_element = 0; int __pyx_v_with_tail; @@ -173465,7 +161554,7 @@ static PyObject *__pyx_pw_4lxml_5etree_59strip_elements(PyObject *__pyx_self, Py } 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, "strip_elements") < 0)) __PYX_ERR(16, 74, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "strip_elements") < 0)) __PYX_ERR(17, 74, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; @@ -173474,14 +161563,14 @@ static PyObject *__pyx_pw_4lxml_5etree_59strip_elements(PyObject *__pyx_self, Py } __pyx_v_tree_or_element = values[0]; if (values[1]) { - __pyx_v_with_tail = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_with_tail == (int)-1) && PyErr_Occurred())) __PYX_ERR(16, 74, __pyx_L3_error) + __pyx_v_with_tail = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_with_tail == (int)-1) && PyErr_Occurred())) __PYX_ERR(17, 74, __pyx_L3_error) } else { __pyx_v_with_tail = ((int)((int)1)); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("strip_elements", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 74, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("strip_elements", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 74, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_tag_names); __pyx_v_tag_names = 0; __Pyx_AddTraceback("lxml.etree.strip_elements", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -173501,16 +161590,13 @@ static PyObject *__pyx_pf_4lxml_5etree_58strip_elements(CYTHON_UNUSED PyObject * struct LxmlDocument *__pyx_v_doc = NULL; struct LxmlElement *__pyx_v_element = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; - __Pyx_TraceFrameInit(__pyx_codeobj__330) __Pyx_RefNannySetupContext("strip_elements", 0); - __Pyx_TraceCall("strip_elements", __pyx_f[16], 74, 0, __PYX_ERR(16, 74, __pyx_L1_error)); /* "src/lxml/cleanup.pxi":100 * """ @@ -173519,8 +161605,7 @@ static PyObject *__pyx_pf_4lxml_5etree_58strip_elements(CYTHON_UNUSED PyObject * * element = _rootNodeOrRaise(tree_or_element) * if not tag_names: */ - __Pyx_TraceLine(100,0,__PYX_ERR(16, 100, __pyx_L1_error)) - __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__documentOrRaise(__pyx_v_tree_or_element)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 100, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__documentOrRaise(__pyx_v_tree_or_element)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_1); __pyx_t_1 = 0; @@ -173532,8 +161617,7 @@ static PyObject *__pyx_pf_4lxml_5etree_58strip_elements(CYTHON_UNUSED PyObject * * if not tag_names: * return */ - __Pyx_TraceLine(101,0,__PYX_ERR(16, 101, __pyx_L1_error)) - __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__rootNodeOrRaise(__pyx_v_tree_or_element)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 101, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__rootNodeOrRaise(__pyx_v_tree_or_element)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_element = ((struct LxmlElement *)__pyx_t_1); __pyx_t_1 = 0; @@ -173545,7 +161629,6 @@ static PyObject *__pyx_pf_4lxml_5etree_58strip_elements(CYTHON_UNUSED PyObject * * return * */ - __Pyx_TraceLine(102,0,__PYX_ERR(16, 102, __pyx_L1_error)) __pyx_t_2 = (PyTuple_GET_SIZE(__pyx_v_tag_names) != 0); __pyx_t_3 = ((!__pyx_t_2) != 0); if (__pyx_t_3) { @@ -173557,7 +161640,6 @@ static PyObject *__pyx_pf_4lxml_5etree_58strip_elements(CYTHON_UNUSED PyObject * * * matcher = _MultiTagMatcher.__new__(_MultiTagMatcher, tag_names) */ - __Pyx_TraceLine(103,0,__PYX_ERR(16, 103, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -173578,13 +161660,12 @@ static PyObject *__pyx_pf_4lxml_5etree_58strip_elements(CYTHON_UNUSED PyObject * * matcher.cacheTags(doc) * if matcher.rejectsAll(): */ - __Pyx_TraceLine(105,0,__PYX_ERR(16, 105, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 105, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_tag_names); __Pyx_GIVEREF(__pyx_v_tag_names); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tag_names); - __pyx_t_4 = ((PyObject *)__pyx_tp_new_4lxml_5etree__MultiTagMatcher(((PyTypeObject *)__pyx_ptype_4lxml_5etree__MultiTagMatcher), __pyx_t_1, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 105, __pyx_L1_error) + __pyx_t_4 = ((PyObject *)__pyx_tp_new_4lxml_5etree__MultiTagMatcher(((PyTypeObject *)__pyx_ptype_4lxml_5etree__MultiTagMatcher), __pyx_t_1, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 105, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_matcher = ((struct __pyx_obj_4lxml_5etree__MultiTagMatcher *)__pyx_t_4); @@ -173597,8 +161678,7 @@ static PyObject *__pyx_pf_4lxml_5etree_58strip_elements(CYTHON_UNUSED PyObject * * if matcher.rejectsAll(): * return */ - __Pyx_TraceLine(106,0,__PYX_ERR(16, 106, __pyx_L1_error)) - __pyx_t_5 = __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(__pyx_v_matcher, __pyx_v_doc, NULL); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(16, 106, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(__pyx_v_matcher, __pyx_v_doc, NULL); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(17, 106, __pyx_L1_error) /* "src/lxml/cleanup.pxi":107 * matcher = _MultiTagMatcher.__new__(_MultiTagMatcher, tag_names) @@ -173607,7 +161687,6 @@ static PyObject *__pyx_pf_4lxml_5etree_58strip_elements(CYTHON_UNUSED PyObject * * return * */ - __Pyx_TraceLine(107,0,__PYX_ERR(16, 107, __pyx_L1_error)) __pyx_t_3 = (__pyx_f_4lxml_5etree_16_MultiTagMatcher_rejectsAll(__pyx_v_matcher) != 0); if (__pyx_t_3) { @@ -173618,7 +161697,6 @@ static PyObject *__pyx_pf_4lxml_5etree_58strip_elements(CYTHON_UNUSED PyObject * * * if isinstance(tree_or_element, _ElementTree): */ - __Pyx_TraceLine(108,0,__PYX_ERR(16, 108, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -173639,7 +161717,6 @@ static PyObject *__pyx_pf_4lxml_5etree_58strip_elements(CYTHON_UNUSED PyObject * * # include PIs and comments next to the root node * if matcher.matchesType(tree.XML_COMMENT_NODE): */ - __Pyx_TraceLine(110,0,__PYX_ERR(16, 110, __pyx_L1_error)) __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_tree_or_element, __pyx_ptype_4lxml_5etree__ElementTree); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { @@ -173651,7 +161728,6 @@ static PyObject *__pyx_pf_4lxml_5etree_58strip_elements(CYTHON_UNUSED PyObject * * _removeSiblings(element._c_node, tree.XML_COMMENT_NODE, with_tail) * if matcher.matchesType(tree.XML_PI_NODE): */ - __Pyx_TraceLine(112,0,__PYX_ERR(16, 112, __pyx_L1_error)) __pyx_t_2 = (__pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesType(__pyx_v_matcher, XML_COMMENT_NODE) != 0); if (__pyx_t_2) { @@ -173662,8 +161738,7 @@ static PyObject *__pyx_pf_4lxml_5etree_58strip_elements(CYTHON_UNUSED PyObject * * if matcher.matchesType(tree.XML_PI_NODE): * _removeSiblings(element._c_node, tree.XML_PI_NODE, with_tail) */ - __Pyx_TraceLine(113,0,__PYX_ERR(16, 113, __pyx_L1_error)) - __pyx_t_5 = __pyx_f_4lxml_5etree__removeSiblings(__pyx_v_element->_c_node, XML_COMMENT_NODE, __pyx_v_with_tail); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(16, 113, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree__removeSiblings(__pyx_v_element->_c_node, XML_COMMENT_NODE, __pyx_v_with_tail); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(17, 113, __pyx_L1_error) /* "src/lxml/cleanup.pxi":112 * if isinstance(tree_or_element, _ElementTree): @@ -173681,7 +161756,6 @@ static PyObject *__pyx_pf_4lxml_5etree_58strip_elements(CYTHON_UNUSED PyObject * * _removeSiblings(element._c_node, tree.XML_PI_NODE, with_tail) * _strip_elements(doc, element._c_node, matcher, with_tail) */ - __Pyx_TraceLine(114,0,__PYX_ERR(16, 114, __pyx_L1_error)) __pyx_t_2 = (__pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesType(__pyx_v_matcher, XML_PI_NODE) != 0); if (__pyx_t_2) { @@ -173692,8 +161766,7 @@ static PyObject *__pyx_pf_4lxml_5etree_58strip_elements(CYTHON_UNUSED PyObject * * _strip_elements(doc, element._c_node, matcher, with_tail) * */ - __Pyx_TraceLine(115,0,__PYX_ERR(16, 115, __pyx_L1_error)) - __pyx_t_5 = __pyx_f_4lxml_5etree__removeSiblings(__pyx_v_element->_c_node, XML_PI_NODE, __pyx_v_with_tail); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(16, 115, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree__removeSiblings(__pyx_v_element->_c_node, XML_PI_NODE, __pyx_v_with_tail); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(17, 115, __pyx_L1_error) /* "src/lxml/cleanup.pxi":114 * if matcher.matchesType(tree.XML_COMMENT_NODE): @@ -173720,8 +161793,7 @@ static PyObject *__pyx_pf_4lxml_5etree_58strip_elements(CYTHON_UNUSED PyObject * * * cdef _strip_elements(_Document doc, xmlNode* c_node, _MultiTagMatcher matcher, */ - __Pyx_TraceLine(116,0,__PYX_ERR(16, 116, __pyx_L1_error)) - __pyx_t_4 = __pyx_f_4lxml_5etree__strip_elements(__pyx_v_doc, __pyx_v_element->_c_node, __pyx_v_matcher, __pyx_v_with_tail); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 116, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__strip_elements(__pyx_v_doc, __pyx_v_element->_c_node, __pyx_v_matcher, __pyx_v_with_tail); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -173746,7 +161818,6 @@ static PyObject *__pyx_pf_4lxml_5etree_58strip_elements(CYTHON_UNUSED PyObject * __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XDECREF((PyObject *)__pyx_v_element); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -173763,12 +161834,10 @@ static PyObject *__pyx_f_4lxml_5etree__strip_elements(struct LxmlDocument *__pyx xmlNode *__pyx_v_c_child; xmlNode *__pyx_v_c_next; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_strip_elements", 0); - __Pyx_TraceCall("_strip_elements", __pyx_f[16], 118, 0, __PYX_ERR(16, 118, __pyx_L1_error)); /* "src/lxml/cleanup.pxi":123 * cdef xmlNode* c_next @@ -173777,7 +161846,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_elements(struct LxmlDocument *__pyx * if c_node.type == tree.XML_ELEMENT_NODE: * # we run through the children here to prevent any problems */ - __Pyx_TraceLine(123,0,__PYX_ERR(16, 123, __pyx_L1_error)) BEGIN_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node, __pyx_v_c_node, 1); /* "src/lxml/cleanup.pxi":124 @@ -173787,7 +161855,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_elements(struct LxmlDocument *__pyx * # we run through the children here to prevent any problems * # with the tree iteration which would occur if we unlinked the */ - __Pyx_TraceLine(124,0,__PYX_ERR(16, 124, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0); if (__pyx_t_1) { @@ -173798,7 +161865,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_elements(struct LxmlDocument *__pyx * while c_child is not NULL: * c_next = _nextElement(c_child) */ - __Pyx_TraceLine(128,0,__PYX_ERR(16, 128, __pyx_L1_error)) __pyx_v_c_child = __pyx_f_4lxml_5etree__findChildForwards(__pyx_v_c_node, 0); /* "src/lxml/cleanup.pxi":129 @@ -173808,7 +161874,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_elements(struct LxmlDocument *__pyx * c_next = _nextElement(c_child) * if matcher.matches(c_child): */ - __Pyx_TraceLine(129,0,__PYX_ERR(16, 129, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_child != NULL) != 0); if (!__pyx_t_1) break; @@ -173820,7 +161885,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_elements(struct LxmlDocument *__pyx * if matcher.matches(c_child): * if c_child.type == tree.XML_ELEMENT_NODE: */ - __Pyx_TraceLine(130,0,__PYX_ERR(16, 130, __pyx_L1_error)) __pyx_v_c_next = __pyx_f_4lxml_5etree__nextElement(__pyx_v_c_child); /* "src/lxml/cleanup.pxi":131 @@ -173830,7 +161894,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_elements(struct LxmlDocument *__pyx * if c_child.type == tree.XML_ELEMENT_NODE: * if not with_tail: */ - __Pyx_TraceLine(131,0,__PYX_ERR(16, 131, __pyx_L1_error)) __pyx_t_1 = (__pyx_f_4lxml_5etree_16_MultiTagMatcher_matches(__pyx_v_matcher, __pyx_v_c_child) != 0); if (__pyx_t_1) { @@ -173841,7 +161904,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_elements(struct LxmlDocument *__pyx * if not with_tail: * tree.xmlUnlinkNode(c_child) */ - __Pyx_TraceLine(132,0,__PYX_ERR(16, 132, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_child->type == XML_ELEMENT_NODE) != 0); if (__pyx_t_1) { @@ -173852,7 +161914,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_elements(struct LxmlDocument *__pyx * tree.xmlUnlinkNode(c_child) * _removeNode(doc, c_child) */ - __Pyx_TraceLine(133,0,__PYX_ERR(16, 133, __pyx_L1_error)) __pyx_t_1 = ((!(__pyx_v_with_tail != 0)) != 0); if (__pyx_t_1) { @@ -173863,7 +161924,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_elements(struct LxmlDocument *__pyx * _removeNode(doc, c_child) * else: */ - __Pyx_TraceLine(134,0,__PYX_ERR(16, 134, __pyx_L1_error)) xmlUnlinkNode(__pyx_v_c_child); /* "src/lxml/cleanup.pxi":133 @@ -173882,8 +161942,7 @@ static PyObject *__pyx_f_4lxml_5etree__strip_elements(struct LxmlDocument *__pyx * else: * if with_tail: */ - __Pyx_TraceLine(135,0,__PYX_ERR(16, 135, __pyx_L1_error)) - __pyx_t_2 = __pyx_f_4lxml_5etree__removeNode(__pyx_v_doc, __pyx_v_c_child); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(16, 135, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__removeNode(__pyx_v_doc, __pyx_v_c_child); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(17, 135, __pyx_L1_error) /* "src/lxml/cleanup.pxi":132 * c_next = _nextElement(c_child) @@ -173902,7 +161961,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_elements(struct LxmlDocument *__pyx * _removeText(c_child.next) * tree.xmlUnlinkNode(c_child) */ - __Pyx_TraceLine(137,0,__PYX_ERR(16, 137, __pyx_L1_error)) /*else*/ { __pyx_t_1 = (__pyx_v_with_tail != 0); if (__pyx_t_1) { @@ -173914,7 +161972,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_elements(struct LxmlDocument *__pyx * tree.xmlUnlinkNode(c_child) * attemptDeallocation(c_child) */ - __Pyx_TraceLine(138,0,__PYX_ERR(16, 138, __pyx_L1_error)) __pyx_f_4lxml_5etree__removeText(__pyx_v_c_child->next); /* "src/lxml/cleanup.pxi":137 @@ -173933,7 +161990,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_elements(struct LxmlDocument *__pyx * attemptDeallocation(c_child) * c_child = c_next */ - __Pyx_TraceLine(139,0,__PYX_ERR(16, 139, __pyx_L1_error)) xmlUnlinkNode(__pyx_v_c_child); /* "src/lxml/cleanup.pxi":140 @@ -173943,7 +161999,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_elements(struct LxmlDocument *__pyx * c_child = c_next * tree.END_FOR_EACH_ELEMENT_FROM(c_node) */ - __Pyx_TraceLine(140,0,__PYX_ERR(16, 140, __pyx_L1_error)) (void)(__pyx_f_4lxml_5etree_attemptDeallocation(__pyx_v_c_child)); } __pyx_L7:; @@ -173964,7 +162019,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_elements(struct LxmlDocument *__pyx * tree.END_FOR_EACH_ELEMENT_FROM(c_node) * */ - __Pyx_TraceLine(141,0,__PYX_ERR(16, 141, __pyx_L1_error)) __pyx_v_c_child = __pyx_v_c_next; } @@ -173984,7 +162038,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_elements(struct LxmlDocument *__pyx * * */ - __Pyx_TraceLine(142,0,__PYX_ERR(16, 142, __pyx_L1_error)) END_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node); /* "src/lxml/cleanup.pxi":118 @@ -174003,7 +162056,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_elements(struct LxmlDocument *__pyx __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -174019,7 +162071,7 @@ static PyObject *__pyx_f_4lxml_5etree__strip_elements(struct LxmlDocument *__pyx /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_61strip_tags(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_60strip_tags[] = "strip_tags(tree_or_element, *tag_names)\n\n Delete all elements with the provided tag names from a tree or\n subtree. This will remove the elements and their attributes, but\n *not* their text/tail content or descendants. Instead, it will\n merge the text content and children of the element into its\n parent.\n\n Tag names can contain wildcards as in `_Element.iter`.\n\n Note that this will not delete the element (or ElementTree root\n element) that you passed even if it matches. It will only treat\n its descendants.\n\n Example usage::\n\n strip_tags(some_element,\n 'simpletagname', # non-namespaced tag\n '{http://some/ns}tagname', # namespaced tag\n '{http://some/other/ns}*' # any tag from a namespace\n Comment # comments (including their text!)\n )\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_61strip_tags = {"strip_tags", (PyCFunction)__pyx_pw_4lxml_5etree_61strip_tags, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_60strip_tags}; +static PyMethodDef __pyx_mdef_4lxml_5etree_61strip_tags = {"strip_tags", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_61strip_tags, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_60strip_tags}; static PyObject *__pyx_pw_4lxml_5etree_61strip_tags(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_tree_or_element = 0; PyObject *__pyx_v_tag_names = 0; @@ -174056,7 +162108,7 @@ static PyObject *__pyx_pw_4lxml_5etree_61strip_tags(PyObject *__pyx_self, PyObje } 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, "strip_tags") < 0)) __PYX_ERR(16, 145, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "strip_tags") < 0)) __PYX_ERR(17, 145, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; @@ -174067,7 +162119,7 @@ static PyObject *__pyx_pw_4lxml_5etree_61strip_tags(PyObject *__pyx_self, PyObje } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("strip_tags", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 145, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("strip_tags", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 145, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_tag_names); __pyx_v_tag_names = 0; __Pyx_AddTraceback("lxml.etree.strip_tags", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -174087,16 +162139,13 @@ static PyObject *__pyx_pf_4lxml_5etree_60strip_tags(CYTHON_UNUSED PyObject *__py struct LxmlDocument *__pyx_v_doc = NULL; struct LxmlElement *__pyx_v_element = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; - __Pyx_TraceFrameInit(__pyx_codeobj__331) __Pyx_RefNannySetupContext("strip_tags", 0); - __Pyx_TraceCall("strip_tags", __pyx_f[16], 145, 0, __PYX_ERR(16, 145, __pyx_L1_error)); /* "src/lxml/cleanup.pxi":170 * """ @@ -174105,8 +162154,7 @@ static PyObject *__pyx_pf_4lxml_5etree_60strip_tags(CYTHON_UNUSED PyObject *__py * element = _rootNodeOrRaise(tree_or_element) * if not tag_names: */ - __Pyx_TraceLine(170,0,__PYX_ERR(16, 170, __pyx_L1_error)) - __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__documentOrRaise(__pyx_v_tree_or_element)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 170, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__documentOrRaise(__pyx_v_tree_or_element)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_1); __pyx_t_1 = 0; @@ -174118,8 +162166,7 @@ static PyObject *__pyx_pf_4lxml_5etree_60strip_tags(CYTHON_UNUSED PyObject *__py * if not tag_names: * return */ - __Pyx_TraceLine(171,0,__PYX_ERR(16, 171, __pyx_L1_error)) - __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__rootNodeOrRaise(__pyx_v_tree_or_element)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 171, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__rootNodeOrRaise(__pyx_v_tree_or_element)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_element = ((struct LxmlElement *)__pyx_t_1); __pyx_t_1 = 0; @@ -174131,7 +162178,6 @@ static PyObject *__pyx_pf_4lxml_5etree_60strip_tags(CYTHON_UNUSED PyObject *__py * return * */ - __Pyx_TraceLine(172,0,__PYX_ERR(16, 172, __pyx_L1_error)) __pyx_t_2 = (PyTuple_GET_SIZE(__pyx_v_tag_names) != 0); __pyx_t_3 = ((!__pyx_t_2) != 0); if (__pyx_t_3) { @@ -174143,7 +162189,6 @@ static PyObject *__pyx_pf_4lxml_5etree_60strip_tags(CYTHON_UNUSED PyObject *__py * * matcher = _MultiTagMatcher.__new__(_MultiTagMatcher, tag_names) */ - __Pyx_TraceLine(173,0,__PYX_ERR(16, 173, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -174164,13 +162209,12 @@ static PyObject *__pyx_pf_4lxml_5etree_60strip_tags(CYTHON_UNUSED PyObject *__py * matcher.cacheTags(doc) * if matcher.rejectsAll(): */ - __Pyx_TraceLine(175,0,__PYX_ERR(16, 175, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 175, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_tag_names); __Pyx_GIVEREF(__pyx_v_tag_names); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tag_names); - __pyx_t_4 = ((PyObject *)__pyx_tp_new_4lxml_5etree__MultiTagMatcher(((PyTypeObject *)__pyx_ptype_4lxml_5etree__MultiTagMatcher), __pyx_t_1, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 175, __pyx_L1_error) + __pyx_t_4 = ((PyObject *)__pyx_tp_new_4lxml_5etree__MultiTagMatcher(((PyTypeObject *)__pyx_ptype_4lxml_5etree__MultiTagMatcher), __pyx_t_1, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 175, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_matcher = ((struct __pyx_obj_4lxml_5etree__MultiTagMatcher *)__pyx_t_4); @@ -174183,8 +162227,7 @@ static PyObject *__pyx_pf_4lxml_5etree_60strip_tags(CYTHON_UNUSED PyObject *__py * if matcher.rejectsAll(): * return */ - __Pyx_TraceLine(176,0,__PYX_ERR(16, 176, __pyx_L1_error)) - __pyx_t_5 = __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(__pyx_v_matcher, __pyx_v_doc, NULL); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(16, 176, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(__pyx_v_matcher, __pyx_v_doc, NULL); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(17, 176, __pyx_L1_error) /* "src/lxml/cleanup.pxi":177 * matcher = _MultiTagMatcher.__new__(_MultiTagMatcher, tag_names) @@ -174193,7 +162236,6 @@ static PyObject *__pyx_pf_4lxml_5etree_60strip_tags(CYTHON_UNUSED PyObject *__py * return * */ - __Pyx_TraceLine(177,0,__PYX_ERR(16, 177, __pyx_L1_error)) __pyx_t_3 = (__pyx_f_4lxml_5etree_16_MultiTagMatcher_rejectsAll(__pyx_v_matcher) != 0); if (__pyx_t_3) { @@ -174204,7 +162246,6 @@ static PyObject *__pyx_pf_4lxml_5etree_60strip_tags(CYTHON_UNUSED PyObject *__py * * if isinstance(tree_or_element, _ElementTree): */ - __Pyx_TraceLine(178,0,__PYX_ERR(16, 178, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -174225,7 +162266,6 @@ static PyObject *__pyx_pf_4lxml_5etree_60strip_tags(CYTHON_UNUSED PyObject *__py * # include PIs and comments next to the root node * if matcher.matchesType(tree.XML_COMMENT_NODE): */ - __Pyx_TraceLine(180,0,__PYX_ERR(16, 180, __pyx_L1_error)) __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_tree_or_element, __pyx_ptype_4lxml_5etree__ElementTree); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { @@ -174237,7 +162277,6 @@ static PyObject *__pyx_pf_4lxml_5etree_60strip_tags(CYTHON_UNUSED PyObject *__py * _removeSiblings(element._c_node, tree.XML_COMMENT_NODE, 0) * if matcher.matchesType(tree.XML_PI_NODE): */ - __Pyx_TraceLine(182,0,__PYX_ERR(16, 182, __pyx_L1_error)) __pyx_t_2 = (__pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesType(__pyx_v_matcher, XML_COMMENT_NODE) != 0); if (__pyx_t_2) { @@ -174248,8 +162287,7 @@ static PyObject *__pyx_pf_4lxml_5etree_60strip_tags(CYTHON_UNUSED PyObject *__py * if matcher.matchesType(tree.XML_PI_NODE): * _removeSiblings(element._c_node, tree.XML_PI_NODE, 0) */ - __Pyx_TraceLine(183,0,__PYX_ERR(16, 183, __pyx_L1_error)) - __pyx_t_5 = __pyx_f_4lxml_5etree__removeSiblings(__pyx_v_element->_c_node, XML_COMMENT_NODE, 0); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(16, 183, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree__removeSiblings(__pyx_v_element->_c_node, XML_COMMENT_NODE, 0); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(17, 183, __pyx_L1_error) /* "src/lxml/cleanup.pxi":182 * if isinstance(tree_or_element, _ElementTree): @@ -174267,7 +162305,6 @@ static PyObject *__pyx_pf_4lxml_5etree_60strip_tags(CYTHON_UNUSED PyObject *__py * _removeSiblings(element._c_node, tree.XML_PI_NODE, 0) * _strip_tags(doc, element._c_node, matcher) */ - __Pyx_TraceLine(184,0,__PYX_ERR(16, 184, __pyx_L1_error)) __pyx_t_2 = (__pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesType(__pyx_v_matcher, XML_PI_NODE) != 0); if (__pyx_t_2) { @@ -174278,8 +162315,7 @@ static PyObject *__pyx_pf_4lxml_5etree_60strip_tags(CYTHON_UNUSED PyObject *__py * _strip_tags(doc, element._c_node, matcher) * */ - __Pyx_TraceLine(185,0,__PYX_ERR(16, 185, __pyx_L1_error)) - __pyx_t_5 = __pyx_f_4lxml_5etree__removeSiblings(__pyx_v_element->_c_node, XML_PI_NODE, 0); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(16, 185, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree__removeSiblings(__pyx_v_element->_c_node, XML_PI_NODE, 0); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(17, 185, __pyx_L1_error) /* "src/lxml/cleanup.pxi":184 * if matcher.matchesType(tree.XML_COMMENT_NODE): @@ -174306,8 +162342,7 @@ static PyObject *__pyx_pf_4lxml_5etree_60strip_tags(CYTHON_UNUSED PyObject *__py * * cdef _strip_tags(_Document doc, xmlNode* c_node, _MultiTagMatcher matcher): */ - __Pyx_TraceLine(186,0,__PYX_ERR(16, 186, __pyx_L1_error)) - __pyx_t_4 = __pyx_f_4lxml_5etree__strip_tags(__pyx_v_doc, __pyx_v_element->_c_node, __pyx_v_matcher); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 186, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__strip_tags(__pyx_v_doc, __pyx_v_element->_c_node, __pyx_v_matcher); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -174332,7 +162367,6 @@ static PyObject *__pyx_pf_4lxml_5etree_60strip_tags(CYTHON_UNUSED PyObject *__py __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XDECREF((PyObject *)__pyx_v_element); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -174349,14 +162383,12 @@ static PyObject *__pyx_f_4lxml_5etree__strip_tags(struct LxmlDocument *__pyx_v_d xmlNode *__pyx_v_c_child; xmlNode *__pyx_v_c_next; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlNode *__pyx_t_2; xmlNode *__pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("_strip_tags", 0); - __Pyx_TraceCall("_strip_tags", __pyx_f[16], 188, 0, __PYX_ERR(16, 188, __pyx_L1_error)); /* "src/lxml/cleanup.pxi":192 * cdef xmlNode* c_next @@ -174365,7 +162397,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_tags(struct LxmlDocument *__pyx_v_d * if c_node.type == tree.XML_ELEMENT_NODE: * # we run through the children here to prevent any problems */ - __Pyx_TraceLine(192,0,__PYX_ERR(16, 192, __pyx_L1_error)) BEGIN_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node, __pyx_v_c_node, 1); /* "src/lxml/cleanup.pxi":193 @@ -174375,7 +162406,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_tags(struct LxmlDocument *__pyx_v_d * # we run through the children here to prevent any problems * # with the tree iteration which would occur if we unlinked the */ - __Pyx_TraceLine(193,0,__PYX_ERR(16, 193, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0); if (__pyx_t_1) { @@ -174386,7 +162416,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_tags(struct LxmlDocument *__pyx_v_d * while c_child is not NULL: * if not matcher.matches(c_child): */ - __Pyx_TraceLine(197,0,__PYX_ERR(16, 197, __pyx_L1_error)) __pyx_v_c_child = __pyx_f_4lxml_5etree__findChildForwards(__pyx_v_c_node, 0); /* "src/lxml/cleanup.pxi":198 @@ -174396,7 +162425,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_tags(struct LxmlDocument *__pyx_v_d * if not matcher.matches(c_child): * c_child = _nextElement(c_child) */ - __Pyx_TraceLine(198,0,__PYX_ERR(16, 198, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_child != NULL) != 0); if (!__pyx_t_1) break; @@ -174408,7 +162436,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_tags(struct LxmlDocument *__pyx_v_d * c_child = _nextElement(c_child) * continue */ - __Pyx_TraceLine(199,0,__PYX_ERR(16, 199, __pyx_L1_error)) __pyx_t_1 = ((!(__pyx_f_4lxml_5etree_16_MultiTagMatcher_matches(__pyx_v_matcher, __pyx_v_c_child) != 0)) != 0); if (__pyx_t_1) { @@ -174419,7 +162446,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_tags(struct LxmlDocument *__pyx_v_d * continue * if c_child.type == tree.XML_ELEMENT_NODE: */ - __Pyx_TraceLine(200,0,__PYX_ERR(16, 200, __pyx_L1_error)) __pyx_v_c_child = __pyx_f_4lxml_5etree__nextElement(__pyx_v_c_child); /* "src/lxml/cleanup.pxi":201 @@ -174429,7 +162455,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_tags(struct LxmlDocument *__pyx_v_d * if c_child.type == tree.XML_ELEMENT_NODE: * c_next = _findChildForwards(c_child, 0) or _nextElement(c_child) */ - __Pyx_TraceLine(201,0,__PYX_ERR(16, 201, __pyx_L1_error)) goto __pyx_L4_continue; /* "src/lxml/cleanup.pxi":199 @@ -174448,7 +162473,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_tags(struct LxmlDocument *__pyx_v_d * c_next = _findChildForwards(c_child, 0) or _nextElement(c_child) * _replaceNodeByChildren(doc, c_child) */ - __Pyx_TraceLine(202,0,__PYX_ERR(16, 202, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_child->type == XML_ELEMENT_NODE) != 0); if (__pyx_t_1) { @@ -174459,7 +162483,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_tags(struct LxmlDocument *__pyx_v_d * _replaceNodeByChildren(doc, c_child) * if not attemptDeallocation(c_child): */ - __Pyx_TraceLine(203,0,__PYX_ERR(16, 203, __pyx_L1_error)) __pyx_t_3 = __pyx_f_4lxml_5etree__findChildForwards(__pyx_v_c_child, 0); if (!__pyx_t_3) { } else { @@ -174478,8 +162501,7 @@ static PyObject *__pyx_f_4lxml_5etree__strip_tags(struct LxmlDocument *__pyx_v_d * if not attemptDeallocation(c_child): * if c_child.nsDef is not NULL: */ - __Pyx_TraceLine(204,0,__PYX_ERR(16, 204, __pyx_L1_error)) - __pyx_t_4 = __pyx_f_4lxml_5etree__replaceNodeByChildren(__pyx_v_doc, __pyx_v_c_child); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(16, 204, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__replaceNodeByChildren(__pyx_v_doc, __pyx_v_c_child); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(17, 204, __pyx_L1_error) /* "src/lxml/cleanup.pxi":205 * c_next = _findChildForwards(c_child, 0) or _nextElement(c_child) @@ -174488,7 +162510,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_tags(struct LxmlDocument *__pyx_v_d * if c_child.nsDef is not NULL: * # make namespaces absolute */ - __Pyx_TraceLine(205,0,__PYX_ERR(16, 205, __pyx_L1_error)) __pyx_t_1 = ((!(__pyx_f_4lxml_5etree_attemptDeallocation(__pyx_v_c_child) != 0)) != 0); if (__pyx_t_1) { @@ -174499,7 +162520,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_tags(struct LxmlDocument *__pyx_v_d * # make namespaces absolute * moveNodeToDocument(doc, doc._c_doc, c_child) */ - __Pyx_TraceLine(206,0,__PYX_ERR(16, 206, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_child->nsDef != NULL) != 0); if (__pyx_t_1) { @@ -174510,8 +162530,7 @@ static PyObject *__pyx_f_4lxml_5etree__strip_tags(struct LxmlDocument *__pyx_v_d * c_child = c_next * else: */ - __Pyx_TraceLine(208,0,__PYX_ERR(16, 208, __pyx_L1_error)) - __pyx_t_4 = __pyx_f_4lxml_5etree_moveNodeToDocument(__pyx_v_doc, __pyx_v_doc->_c_doc, __pyx_v_c_child); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(16, 208, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree_moveNodeToDocument(__pyx_v_doc, __pyx_v_doc->_c_doc, __pyx_v_c_child); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(17, 208, __pyx_L1_error) /* "src/lxml/cleanup.pxi":206 * _replaceNodeByChildren(doc, c_child) @@ -174538,7 +162557,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_tags(struct LxmlDocument *__pyx_v_d * else: * c_next = _nextElement(c_child) */ - __Pyx_TraceLine(209,0,__PYX_ERR(16, 209, __pyx_L1_error)) __pyx_v_c_child = __pyx_v_c_next; /* "src/lxml/cleanup.pxi":202 @@ -174558,7 +162576,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_tags(struct LxmlDocument *__pyx_v_d * tree.xmlUnlinkNode(c_child) * attemptDeallocation(c_child) */ - __Pyx_TraceLine(211,0,__PYX_ERR(16, 211, __pyx_L1_error)) /*else*/ { __pyx_v_c_next = __pyx_f_4lxml_5etree__nextElement(__pyx_v_c_child); @@ -174569,7 +162586,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_tags(struct LxmlDocument *__pyx_v_d * attemptDeallocation(c_child) * c_child = c_next */ - __Pyx_TraceLine(212,0,__PYX_ERR(16, 212, __pyx_L1_error)) xmlUnlinkNode(__pyx_v_c_child); /* "src/lxml/cleanup.pxi":213 @@ -174579,7 +162595,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_tags(struct LxmlDocument *__pyx_v_d * c_child = c_next * tree.END_FOR_EACH_ELEMENT_FROM(c_node) */ - __Pyx_TraceLine(213,0,__PYX_ERR(16, 213, __pyx_L1_error)) (void)(__pyx_f_4lxml_5etree_attemptDeallocation(__pyx_v_c_child)); /* "src/lxml/cleanup.pxi":214 @@ -174588,7 +162603,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_tags(struct LxmlDocument *__pyx_v_d * c_child = c_next # <<<<<<<<<<<<<< * tree.END_FOR_EACH_ELEMENT_FROM(c_node) */ - __Pyx_TraceLine(214,0,__PYX_ERR(16, 214, __pyx_L1_error)) __pyx_v_c_child = __pyx_v_c_next; } __pyx_L7:; @@ -174609,7 +162623,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_tags(struct LxmlDocument *__pyx_v_d * c_child = c_next * tree.END_FOR_EACH_ELEMENT_FROM(c_node) # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(215,0,__PYX_ERR(16, 215, __pyx_L1_error)) END_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node); /* "src/lxml/cleanup.pxi":188 @@ -174628,7 +162641,6 @@ static PyObject *__pyx_f_4lxml_5etree__strip_tags(struct LxmlDocument *__pyx_v_d __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -174659,10 +162671,8 @@ static int __pyx_pw_4lxml_5etree_12_BaseContext_1__cinit__(PyObject *__pyx_v_sel static int __pyx_pf_4lxml_5etree_12_BaseContext___cinit__(struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[17], 45, 0, __PYX_ERR(17, 45, __pyx_L1_error)); /* "src/lxml/extensions.pxi":46 * @@ -174671,7 +162681,6 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext___cinit__(struct __pyx_obj_4lxml * * def __init__(self, namespaces, extensions, error_log, enable_regexp, */ - __Pyx_TraceLine(46,0,__PYX_ERR(17, 46, __pyx_L1_error)) __pyx_v_self->_xpathCtxt = NULL; /* "src/lxml/extensions.pxi":45 @@ -174684,12 +162693,6 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext___cinit__(struct __pyx_obj_4lxml /* function exit code */ __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._BaseContext.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -174742,29 +162745,29 @@ static int __pyx_pw_4lxml_5etree_12_BaseContext_3__init__(PyObject *__pyx_v_self case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_extensions)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); __PYX_ERR(17, 48, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); __PYX_ERR(9, 48, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_error_log)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); __PYX_ERR(17, 48, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); __PYX_ERR(9, 48, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enable_regexp)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); __PYX_ERR(17, 48, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); __PYX_ERR(9, 48, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_build_smart_strings)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); __PYX_ERR(17, 48, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); __PYX_ERR(9, 48, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(17, 48, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(9, 48, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { goto __pyx_L5_argtuple_error; @@ -174783,7 +162786,7 @@ static int __pyx_pw_4lxml_5etree_12_BaseContext_3__init__(PyObject *__pyx_v_self } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 48, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(9, 48, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._BaseContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -174810,7 +162813,6 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml PyObject *__pyx_v_prefix_utf = NULL; PyObject *__pyx_v_ns_uri_utf = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -174830,7 +162832,6 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml int __pyx_t_16; int __pyx_t_17; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[17], 48, 0, __PYX_ERR(17, 48, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_namespaces); __Pyx_INCREF(__pyx_v_extensions); @@ -174841,8 +162842,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * self._global_namespaces = [] * self._function_cache = {} */ - __Pyx_TraceLine(53,0,__PYX_ERR(17, 53, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 53, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_utf_refs); @@ -174857,8 +162857,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * self._function_cache = {} * self._eval_context_dict = None */ - __Pyx_TraceLine(54,0,__PYX_ERR(17, 54, __pyx_L1_error)) - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 54, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_global_namespaces); @@ -174873,8 +162872,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * self._eval_context_dict = None * self._error_log = error_log */ - __Pyx_TraceLine(55,0,__PYX_ERR(17, 55, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 55, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_function_cache); @@ -174889,7 +162887,6 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * self._error_log = error_log * */ - __Pyx_TraceLine(56,0,__PYX_ERR(17, 56, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_eval_context_dict); @@ -174903,8 +162900,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * * if extensions is not None: */ - __Pyx_TraceLine(57,0,__PYX_ERR(17, 57, __pyx_L1_error)) - if (!(likely(((__pyx_v_error_log) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_error_log, __pyx_ptype_4lxml_5etree__ErrorLog))))) __PYX_ERR(17, 57, __pyx_L1_error) + if (!(likely(((__pyx_v_error_log) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_error_log, __pyx_ptype_4lxml_5etree__ErrorLog))))) __PYX_ERR(9, 57, __pyx_L1_error) __pyx_t_1 = __pyx_v_error_log; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -174920,7 +162916,6 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * # convert extensions to UTF-8 * if isinstance(extensions, dict): */ - __Pyx_TraceLine(59,0,__PYX_ERR(17, 59, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_extensions != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -174932,7 +162927,6 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * extensions = (extensions,) * # format: [ {(ns, name):function} ] -> {(ns_utf, name_utf):function} */ - __Pyx_TraceLine(61,0,__PYX_ERR(17, 61, __pyx_L1_error)) __pyx_t_3 = PyDict_Check(__pyx_v_extensions); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { @@ -174944,8 +162938,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * # format: [ {(ns, name):function} ] -> {(ns_utf, name_utf):function} * new_extensions = {} */ - __Pyx_TraceLine(62,0,__PYX_ERR(17, 62, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 62, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_extensions); __Pyx_GIVEREF(__pyx_v_extensions); @@ -174969,8 +162962,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * for extension in extensions: * for (ns_uri, name), function in extension.items(): */ - __Pyx_TraceLine(64,0,__PYX_ERR(17, 64, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 64, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_new_extensions = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; @@ -174982,31 +162974,30 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * for (ns_uri, name), function in extension.items(): * if name is None: */ - __Pyx_TraceLine(65,0,__PYX_ERR(17, 65, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_v_extensions)) || PyTuple_CheckExact(__pyx_v_extensions)) { __pyx_t_1 = __pyx_v_extensions; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_extensions); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 65, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_extensions); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 65, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 65, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_5)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_4 >= 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_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(17, 65, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(9, 65, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 65, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_4 >= 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_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(17, 65, __pyx_L1_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(9, 65, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 65, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } @@ -175016,7 +163007,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(17, 65, __pyx_L1_error) + else __PYX_ERR(9, 65, __pyx_L1_error) } break; } @@ -175032,8 +163023,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * if name is None: * raise ValueError, u"extensions must have non empty names" */ - __Pyx_TraceLine(66,0,__PYX_ERR(17, 66, __pyx_L1_error)) - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_extension, __pyx_n_s_items); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 66, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_extension, __pyx_n_s_items); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -175045,21 +163035,18 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml __Pyx_DECREF_SET(__pyx_t_7, function); } } - if (__pyx_t_8) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 66, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } else { - __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 66, __pyx_L1_error) - } + __pyx_t_6 = (__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_6)) __PYX_ERR(9, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 66, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_10 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 66, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(9, 66, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; for (;;) { @@ -175067,17 +163054,17 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml if (likely(PyList_CheckExact(__pyx_t_7))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(17, 66, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(9, 66, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 66, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(17, 66, __pyx_L1_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(9, 66, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 66, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } @@ -175087,7 +163074,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(17, 66, __pyx_L1_error) + else __PYX_ERR(9, 66, __pyx_L1_error) } break; } @@ -175099,7 +163086,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(17, 66, __pyx_L1_error) + __PYX_ERR(9, 66, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -175112,15 +163099,15 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_11); #else - __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 66, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(9, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(17, 66, __pyx_L1_error) + __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; - __pyx_t_12 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 66, __pyx_L1_error) + __pyx_t_12 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(9, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; @@ -175128,7 +163115,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml __Pyx_GOTREF(__pyx_t_8); index = 1; __pyx_t_11 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_11)) goto __pyx_L9_unpacking_failed; __Pyx_GOTREF(__pyx_t_11); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) __PYX_ERR(17, 66, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) __PYX_ERR(9, 66, __pyx_L1_error) __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L10_unpacking_done; @@ -175136,7 +163123,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(17, 66, __pyx_L1_error) + __PYX_ERR(9, 66, __pyx_L1_error) __pyx_L10_unpacking_done:; } if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) { @@ -175145,7 +163132,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(17, 66, __pyx_L1_error) + __PYX_ERR(9, 66, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -175158,15 +163145,15 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(__pyx_t_14); #else - __pyx_t_12 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 66, __pyx_L1_error) + __pyx_t_12 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(9, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_14 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(17, 66, __pyx_L1_error) + __pyx_t_14 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(9, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #endif __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { Py_ssize_t index = -1; - __pyx_t_15 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(17, 66, __pyx_L1_error) + __pyx_t_15 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(9, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_15)->tp_iternext; @@ -175174,7 +163161,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml __Pyx_GOTREF(__pyx_t_12); index = 1; __pyx_t_14 = __pyx_t_13(__pyx_t_15); if (unlikely(!__pyx_t_14)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_14); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_15), 2) < 0) __PYX_ERR(17, 66, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_15), 2) < 0) __PYX_ERR(9, 66, __pyx_L1_error) __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; goto __pyx_L12_unpacking_done; @@ -175182,7 +163169,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(17, 66, __pyx_L1_error) + __PYX_ERR(9, 66, __pyx_L1_error) __pyx_L12_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_ns_uri, __pyx_t_12); @@ -175199,7 +163186,6 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * raise ValueError, u"extensions must have non empty names" * ns_utf = self._to_utf(ns_uri) */ - __Pyx_TraceLine(67,0,__PYX_ERR(17, 67, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_name == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_3)) { @@ -175211,9 +163197,8 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * ns_utf = self._to_utf(ns_uri) * name_utf = self._to_utf(name) */ - __Pyx_TraceLine(68,0,__PYX_ERR(17, 68, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_extensions_must_have_non_empty_n, 0, 0); - __PYX_ERR(17, 68, __pyx_L1_error) + __PYX_ERR(9, 68, __pyx_L1_error) /* "src/lxml/extensions.pxi":67 * for extension in extensions: @@ -175231,8 +163216,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * name_utf = self._to_utf(name) * new_extensions[(ns_utf, name_utf)] = function */ - __Pyx_TraceLine(69,0,__PYX_ERR(17, 69, __pyx_L1_error)) - __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseContext *)__pyx_v_self->__pyx_vtab)->_to_utf(__pyx_v_self, __pyx_v_ns_uri); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 69, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseContext *)__pyx_v_self->__pyx_vtab)->_to_utf(__pyx_v_self, __pyx_v_ns_uri); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_ns_utf, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; @@ -175244,8 +163228,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * new_extensions[(ns_utf, name_utf)] = function * extensions = new_extensions or None */ - __Pyx_TraceLine(70,0,__PYX_ERR(17, 70, __pyx_L1_error)) - __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseContext *)__pyx_v_self->__pyx_vtab)->_to_utf(__pyx_v_self, __pyx_v_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 70, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseContext *)__pyx_v_self->__pyx_vtab)->_to_utf(__pyx_v_self, __pyx_v_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_name_utf, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; @@ -175257,8 +163240,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * extensions = new_extensions or None * */ - __Pyx_TraceLine(71,0,__PYX_ERR(17, 71, __pyx_L1_error)) - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 71, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_ns_utf); __Pyx_GIVEREF(__pyx_v_ns_utf); @@ -175266,7 +163248,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml __Pyx_INCREF(__pyx_v_name_utf); __Pyx_GIVEREF(__pyx_v_name_utf); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_name_utf); - if (unlikely(PyDict_SetItem(__pyx_v_new_extensions, __pyx_t_6, __pyx_v_function) < 0)) __PYX_ERR(17, 71, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_new_extensions, __pyx_t_6, __pyx_v_function) < 0)) __PYX_ERR(9, 71, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "src/lxml/extensions.pxi":66 @@ -175276,7 +163258,6 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * if name is None: * raise ValueError, u"extensions must have non empty names" */ - __Pyx_TraceLine(66,0,__PYX_ERR(17, 66, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -175287,7 +163268,6 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * for (ns_uri, name), function in extension.items(): * if name is None: */ - __Pyx_TraceLine(65,0,__PYX_ERR(17, 65, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -175298,8 +163278,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * * if namespaces is not None: */ - __Pyx_TraceLine(72,0,__PYX_ERR(17, 72, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_new_extensions); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(17, 72, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_new_extensions); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(9, 72, __pyx_L1_error) if (!__pyx_t_3) { } else { __Pyx_INCREF(__pyx_v_new_extensions); @@ -175328,7 +163307,6 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * if isinstance(namespaces, dict): * namespaces = namespaces.items() */ - __Pyx_TraceLine(74,0,__PYX_ERR(17, 74, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_namespaces != Py_None); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { @@ -175340,7 +163318,6 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * namespaces = namespaces.items() * if namespaces: */ - __Pyx_TraceLine(75,0,__PYX_ERR(17, 75, __pyx_L1_error)) __pyx_t_2 = PyDict_Check(__pyx_v_namespaces); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -175352,8 +163329,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * if namespaces: * ns = [] */ - __Pyx_TraceLine(76,0,__PYX_ERR(17, 76, __pyx_L1_error)) - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_namespaces, __pyx_n_s_items); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 76, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_namespaces, __pyx_n_s_items); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -175365,12 +163341,9 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml __Pyx_DECREF_SET(__pyx_t_7, function); } } - if (__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 76, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 76, __pyx_L1_error) - } + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_namespaces, __pyx_t_1); @@ -175392,8 +163365,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * ns = [] * for prefix, ns_uri in namespaces: */ - __Pyx_TraceLine(77,0,__PYX_ERR(17, 77, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_namespaces); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(17, 77, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_namespaces); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(9, 77, __pyx_L1_error) if (__pyx_t_3) { /* "src/lxml/extensions.pxi":78 @@ -175403,8 +163375,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * for prefix, ns_uri in namespaces: * if prefix is None or not prefix: */ - __Pyx_TraceLine(78,0,__PYX_ERR(17, 78, __pyx_L1_error)) - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 78, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ns = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; @@ -175416,31 +163387,30 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * if prefix is None or not prefix: * raise TypeError, \ */ - __Pyx_TraceLine(79,0,__PYX_ERR(17, 79, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_v_namespaces)) || PyTuple_CheckExact(__pyx_v_namespaces)) { __pyx_t_1 = __pyx_v_namespaces; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_namespaces); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 79, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_namespaces); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 79, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 79, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_5)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(17, 79, __pyx_L1_error) + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(9, 79, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 79, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(17, 79, __pyx_L1_error) + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(9, 79, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 79, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -175450,7 +163420,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(17, 79, __pyx_L1_error) + else __PYX_ERR(9, 79, __pyx_L1_error) } break; } @@ -175462,7 +163432,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(17, 79, __pyx_L1_error) + __PYX_ERR(9, 79, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -175475,15 +163445,15 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_11); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 79, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(17, 79, __pyx_L1_error) + __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 79, __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_8 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 79, __pyx_L1_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(9, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_8)->tp_iternext; @@ -175491,7 +163461,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_11 = __pyx_t_13(__pyx_t_8); if (unlikely(!__pyx_t_11)) goto __pyx_L21_unpacking_failed; __Pyx_GOTREF(__pyx_t_11); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_8), 2) < 0) __PYX_ERR(17, 79, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_8), 2) < 0) __PYX_ERR(9, 79, __pyx_L1_error) __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L22_unpacking_done; @@ -175499,7 +163469,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(17, 79, __pyx_L1_error) + __PYX_ERR(9, 79, __pyx_L1_error) __pyx_L22_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_prefix, __pyx_t_6); @@ -175514,7 +163484,6 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * raise TypeError, \ * u"empty namespace prefix is not supported in XPath" */ - __Pyx_TraceLine(80,0,__PYX_ERR(17, 80, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_prefix == Py_None); __pyx_t_16 = (__pyx_t_2 != 0); if (!__pyx_t_16) { @@ -175522,7 +163491,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml __pyx_t_3 = __pyx_t_16; goto __pyx_L24_bool_binop_done; } - __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_v_prefix); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(17, 80, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_v_prefix); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(9, 80, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_16) != 0); __pyx_t_3 = __pyx_t_2; __pyx_L24_bool_binop_done:; @@ -175535,9 +163504,8 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * u"empty namespace prefix is not supported in XPath" * if ns_uri is None or not ns_uri: */ - __Pyx_TraceLine(81,0,__PYX_ERR(17, 81, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_empty_namespace_prefix_is_not_su, 0, 0); - __PYX_ERR(17, 81, __pyx_L1_error) + __PYX_ERR(9, 81, __pyx_L1_error) /* "src/lxml/extensions.pxi":80 * ns = [] @@ -175555,7 +163523,6 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * raise TypeError, \ * u"setting default namespace is not supported in XPath" */ - __Pyx_TraceLine(83,0,__PYX_ERR(17, 83, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_ns_uri == Py_None); __pyx_t_16 = (__pyx_t_2 != 0); if (!__pyx_t_16) { @@ -175563,7 +163530,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml __pyx_t_3 = __pyx_t_16; goto __pyx_L27_bool_binop_done; } - __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_v_ns_uri); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(17, 83, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_v_ns_uri); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(9, 83, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_16) != 0); __pyx_t_3 = __pyx_t_2; __pyx_L27_bool_binop_done:; @@ -175576,9 +163543,8 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * u"setting default namespace is not supported in XPath" * prefix_utf = self._to_utf(prefix) */ - __Pyx_TraceLine(84,0,__PYX_ERR(17, 84, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_setting_default_namespace_is_not, 0, 0); - __PYX_ERR(17, 84, __pyx_L1_error) + __PYX_ERR(9, 84, __pyx_L1_error) /* "src/lxml/extensions.pxi":83 * raise TypeError, \ @@ -175596,8 +163562,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * ns_uri_utf = self._to_utf(ns_uri) * ns.append( (prefix_utf, ns_uri_utf) ) */ - __Pyx_TraceLine(86,0,__PYX_ERR(17, 86, __pyx_L1_error)) - __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseContext *)__pyx_v_self->__pyx_vtab)->_to_utf(__pyx_v_self, __pyx_v_prefix); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 86, __pyx_L1_error) + __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseContext *)__pyx_v_self->__pyx_vtab)->_to_utf(__pyx_v_self, __pyx_v_prefix); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v_prefix_utf, ((PyObject*)__pyx_t_7)); __pyx_t_7 = 0; @@ -175609,8 +163574,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * ns.append( (prefix_utf, ns_uri_utf) ) * namespaces = ns */ - __Pyx_TraceLine(87,0,__PYX_ERR(17, 87, __pyx_L1_error)) - __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseContext *)__pyx_v_self->__pyx_vtab)->_to_utf(__pyx_v_self, __pyx_v_ns_uri); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 87, __pyx_L1_error) + __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseContext *)__pyx_v_self->__pyx_vtab)->_to_utf(__pyx_v_self, __pyx_v_ns_uri); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v_ns_uri_utf, ((PyObject*)__pyx_t_7)); __pyx_t_7 = 0; @@ -175622,8 +163586,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * namespaces = ns * else: */ - __Pyx_TraceLine(88,0,__PYX_ERR(17, 88, __pyx_L1_error)) - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 88, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_prefix_utf); __Pyx_GIVEREF(__pyx_v_prefix_utf); @@ -175631,7 +163594,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml __Pyx_INCREF(__pyx_v_ns_uri_utf); __Pyx_GIVEREF(__pyx_v_ns_uri_utf); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ns_uri_utf); - __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_ns, __pyx_t_7); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(17, 88, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_ns, __pyx_t_7); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(9, 88, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "src/lxml/extensions.pxi":79 @@ -175641,7 +163604,6 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * if prefix is None or not prefix: * raise TypeError, \ */ - __Pyx_TraceLine(79,0,__PYX_ERR(17, 79, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -175652,7 +163614,6 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * else: * namespaces = None */ - __Pyx_TraceLine(89,0,__PYX_ERR(17, 89, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_ns); __Pyx_DECREF_SET(__pyx_v_namespaces, __pyx_v_ns); @@ -175673,7 +163634,6 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * * self._doc = None */ - __Pyx_TraceLine(91,0,__PYX_ERR(17, 91, __pyx_L1_error)) /*else*/ { __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_namespaces, Py_None); @@ -175696,7 +163656,6 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * self._exc = _ExceptionContext() * self._extensions = extensions */ - __Pyx_TraceLine(93,0,__PYX_ERR(17, 93, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_doc); @@ -175710,8 +163669,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * self._extensions = extensions * self._namespaces = namespaces */ - __Pyx_TraceLine(94,0,__PYX_ERR(17, 94, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__ExceptionContext)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 94, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__ExceptionContext)); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_exc); @@ -175726,8 +163684,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * self._namespaces = namespaces * self._temp_refs = _TempStore() */ - __Pyx_TraceLine(95,0,__PYX_ERR(17, 95, __pyx_L1_error)) - if (!(likely(PyDict_CheckExact(__pyx_v_extensions))||((__pyx_v_extensions) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_extensions)->tp_name), 0))) __PYX_ERR(17, 95, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_extensions))||((__pyx_v_extensions) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_extensions)->tp_name), 0))) __PYX_ERR(9, 95, __pyx_L1_error) __pyx_t_1 = __pyx_v_extensions; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -175743,8 +163700,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * self._temp_refs = _TempStore() * self._temp_documents = set() */ - __Pyx_TraceLine(96,0,__PYX_ERR(17, 96, __pyx_L1_error)) - if (!(likely(PyList_CheckExact(__pyx_v_namespaces))||((__pyx_v_namespaces) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_namespaces)->tp_name), 0))) __PYX_ERR(17, 96, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_v_namespaces))||((__pyx_v_namespaces) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_namespaces)->tp_name), 0))) __PYX_ERR(9, 96, __pyx_L1_error) __pyx_t_1 = __pyx_v_namespaces; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -175760,8 +163716,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * self._temp_documents = set() * self._build_smart_strings = build_smart_strings */ - __Pyx_TraceLine(97,0,__PYX_ERR(17, 97, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__TempStore)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 97, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__TempStore)); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_temp_refs); @@ -175776,8 +163731,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * self._build_smart_strings = build_smart_strings * */ - __Pyx_TraceLine(98,0,__PYX_ERR(17, 98, __pyx_L1_error)) - __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 98, __pyx_L1_error) + __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_temp_documents); @@ -175792,8 +163746,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * * if enable_regexp: */ - __Pyx_TraceLine(99,0,__PYX_ERR(17, 99, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_build_smart_strings); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(17, 99, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_build_smart_strings); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(9, 99, __pyx_L1_error) __pyx_v_self->_build_smart_strings = __pyx_t_3; /* "src/lxml/extensions.pxi":101 @@ -175803,8 +163756,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * _regexp = _ExsltRegExp() * _regexp._register_in_context(self) */ - __Pyx_TraceLine(101,0,__PYX_ERR(17, 101, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_enable_regexp); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(17, 101, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_enable_regexp); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(9, 101, __pyx_L1_error) if (__pyx_t_3) { /* "src/lxml/extensions.pxi":102 @@ -175814,8 +163766,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * _regexp._register_in_context(self) * */ - __Pyx_TraceLine(102,0,__PYX_ERR(17, 102, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__ExsltRegExp)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 102, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__ExsltRegExp)); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__regexp = ((struct __pyx_obj_4lxml_5etree__ExsltRegExp *)__pyx_t_1); __pyx_t_1 = 0; @@ -175827,8 +163778,7 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml * * cdef _BaseContext _copy(self): */ - __Pyx_TraceLine(103,0,__PYX_ERR(17, 103, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_12_ExsltRegExp__register_in_context(__pyx_v__regexp, __pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 103, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_12_ExsltRegExp__register_in_context(__pyx_v__regexp, __pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -175878,7 +163828,6 @@ static int __pyx_pf_4lxml_5etree_12_BaseContext_2__init__(struct __pyx_obj_4lxml __Pyx_XDECREF(__pyx_v_ns_uri_utf); __Pyx_XDECREF(__pyx_v_namespaces); __Pyx_XDECREF(__pyx_v_extensions); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -175895,7 +163844,6 @@ static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_BaseC struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_v_context = 0; PyObject *__pyx_v_namespaces = NULL; struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -175906,7 +163854,6 @@ static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_BaseC int __pyx_t_7; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("_copy", 0); - __Pyx_TraceCall("_copy", __pyx_f[17], 105, 0, __PYX_ERR(17, 105, __pyx_L1_error)); /* "src/lxml/extensions.pxi":107 * cdef _BaseContext _copy(self): @@ -175915,7 +163862,6 @@ static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_BaseC * namespaces = self._namespaces[:] * else: */ - __Pyx_TraceLine(107,0,__PYX_ERR(17, 107, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_namespaces != ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -175927,12 +163873,11 @@ static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_BaseC * else: * namespaces = None */ - __Pyx_TraceLine(108,0,__PYX_ERR(17, 108, __pyx_L1_error)) if (unlikely(__pyx_v_self->_namespaces == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(17, 108, __pyx_L1_error) + __PYX_ERR(9, 108, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyList_GetSlice(__pyx_v_self->_namespaces, 0, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 108, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyList_GetSlice(__pyx_v_self->_namespaces, 0, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_namespaces = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; @@ -175954,7 +163899,6 @@ static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_BaseC * context = self.__class__(namespaces, None, self._error_log, False, * self._build_smart_strings) */ - __Pyx_TraceLine(110,0,__PYX_ERR(17, 110, __pyx_L1_error)) /*else*/ { __Pyx_INCREF(Py_None); __pyx_v_namespaces = ((PyObject*)Py_None); @@ -175968,8 +163912,7 @@ static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_BaseC * self._build_smart_strings) * if self._extensions is not None: */ - __Pyx_TraceLine(111,0,__PYX_ERR(17, 111, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 111, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "src/lxml/extensions.pxi":112 @@ -175979,8 +163922,7 @@ static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_BaseC * if self._extensions is not None: * context._extensions = self._extensions.copy() */ - __Pyx_TraceLine(112,0,__PYX_ERR(17, 112, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_self->_build_smart_strings); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 112, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_self->_build_smart_strings); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -175997,7 +163939,7 @@ static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_BaseC #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[6] = {__pyx_t_6, __pyx_v_namespaces, Py_None, ((PyObject *)__pyx_v_self->_error_log), Py_False, __pyx_t_5}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 5+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 111, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 5+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 111, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -176006,14 +163948,14 @@ static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_BaseC #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[6] = {__pyx_t_6, __pyx_v_namespaces, Py_None, ((PyObject *)__pyx_v_self->_error_log), Py_False, __pyx_t_5}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 5+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 111, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 5+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 111, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(5+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 111, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(5+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(9, 111, __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; @@ -176033,7 +163975,7 @@ static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_BaseC __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 4+__pyx_t_7, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 111, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -176046,8 +163988,7 @@ static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_BaseC * self._build_smart_strings) * if self._extensions is not None: */ - __Pyx_TraceLine(111,0,__PYX_ERR(17, 111, __pyx_L1_error)) - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4lxml_5etree__BaseContext))))) __PYX_ERR(17, 111, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4lxml_5etree__BaseContext))))) __PYX_ERR(9, 111, __pyx_L1_error) __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_t_3); __pyx_t_3 = 0; @@ -176058,7 +163999,6 @@ static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_BaseC * context._extensions = self._extensions.copy() * return context */ - __Pyx_TraceLine(113,0,__PYX_ERR(17, 113, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_self->_extensions != ((PyObject*)Py_None)); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -176070,12 +164010,11 @@ static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_BaseC * return context * */ - __Pyx_TraceLine(114,0,__PYX_ERR(17, 114, __pyx_L1_error)) if (unlikely(__pyx_v_self->_extensions == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "copy"); - __PYX_ERR(17, 114, __pyx_L1_error) + __PYX_ERR(9, 114, __pyx_L1_error) } - __pyx_t_3 = PyDict_Copy(__pyx_v_self->_extensions); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 114, __pyx_L1_error) + __pyx_t_3 = PyDict_Copy(__pyx_v_self->_extensions); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_context->_extensions); @@ -176099,7 +164038,6 @@ static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_BaseC * * cdef bytes _to_utf(self, s): */ - __Pyx_TraceLine(115,0,__PYX_ERR(17, 115, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_context)); __pyx_r = __pyx_v_context; @@ -176126,7 +164064,6 @@ static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_BaseC __Pyx_XDECREF((PyObject *)__pyx_v_context); __Pyx_XDECREF(__pyx_v_namespaces); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -176143,13 +164080,11 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__to_utf(struct __pyx_obj_4l PyObject *__pyx_v_dict_result; PyObject *__pyx_v_utf = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_to_utf", 0); - __Pyx_TraceCall("_to_utf", __pyx_f[17], 117, 0, __PYX_ERR(17, 117, __pyx_L1_error)); /* "src/lxml/extensions.pxi":120 * u"Convert to UTF-8 and keep a reference to the encoded string" @@ -176158,7 +164093,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__to_utf(struct __pyx_obj_4l * return None * dict_result = python.PyDict_GetItem(self._utf_refs, s) */ - __Pyx_TraceLine(120,0,__PYX_ERR(17, 120, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_s == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -176170,7 +164104,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__to_utf(struct __pyx_obj_4l * dict_result = python.PyDict_GetItem(self._utf_refs, s) * if dict_result is not NULL: */ - __Pyx_TraceLine(121,0,__PYX_ERR(17, 121, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -176191,7 +164124,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__to_utf(struct __pyx_obj_4l * if dict_result is not NULL: * return dict_result */ - __Pyx_TraceLine(122,0,__PYX_ERR(17, 122, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->_utf_refs; __Pyx_INCREF(__pyx_t_3); __pyx_v_dict_result = PyDict_GetItem(__pyx_t_3, __pyx_v_s); @@ -176204,7 +164136,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__to_utf(struct __pyx_obj_4l * return dict_result * utf = _utf8(s) */ - __Pyx_TraceLine(123,0,__PYX_ERR(17, 123, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_dict_result != NULL) != 0); if (__pyx_t_2) { @@ -176215,7 +164146,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__to_utf(struct __pyx_obj_4l * utf = _utf8(s) * self._utf_refs[s] = utf */ - __Pyx_TraceLine(124,0,__PYX_ERR(17, 124, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject*)__pyx_v_dict_result)); __pyx_r = ((PyObject*)__pyx_v_dict_result); @@ -176237,8 +164167,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__to_utf(struct __pyx_obj_4l * self._utf_refs[s] = utf * if python.IS_PYPY: */ - __Pyx_TraceLine(125,0,__PYX_ERR(17, 125, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_s); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 125, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_s); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_utf = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; @@ -176250,12 +164179,11 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__to_utf(struct __pyx_obj_4l * if python.IS_PYPY: * # use C level refs, PyPy refs are not enough! */ - __Pyx_TraceLine(126,0,__PYX_ERR(17, 126, __pyx_L1_error)) if (unlikely(__pyx_v_self->_utf_refs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(17, 126, __pyx_L1_error) + __PYX_ERR(9, 126, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_self->_utf_refs, __pyx_v_s, __pyx_v_utf) < 0)) __PYX_ERR(17, 126, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->_utf_refs, __pyx_v_s, __pyx_v_utf) < 0)) __PYX_ERR(9, 126, __pyx_L1_error) /* "src/lxml/extensions.pxi":127 * utf = _utf8(s) @@ -176264,7 +164192,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__to_utf(struct __pyx_obj_4l * # use C level refs, PyPy refs are not enough! * python.Py_INCREF(utf) */ - __Pyx_TraceLine(127,0,__PYX_ERR(17, 127, __pyx_L1_error)) __pyx_t_2 = (IS_PYPY != 0); if (__pyx_t_2) { @@ -176275,7 +164202,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__to_utf(struct __pyx_obj_4l * return utf * */ - __Pyx_TraceLine(129,0,__PYX_ERR(17, 129, __pyx_L1_error)) Py_INCREF(__pyx_v_utf); /* "src/lxml/extensions.pxi":127 @@ -176294,7 +164220,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__to_utf(struct __pyx_obj_4l * * cdef void _set_xpath_context(self, xpath.xmlXPathContext* xpathCtxt): */ - __Pyx_TraceLine(130,0,__PYX_ERR(17, 130, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_utf); __pyx_r = __pyx_v_utf; @@ -176316,7 +164241,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__to_utf(struct __pyx_obj_4l __pyx_L0:; __Pyx_XDECREF(__pyx_v_utf); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -176330,10 +164254,8 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__to_utf(struct __pyx_obj_4l */ static void __pyx_f_4lxml_5etree_12_BaseContext__set_xpath_context(struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_v_self, xmlXPathContext *__pyx_v_xpathCtxt) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_set_xpath_context", 0); - __Pyx_TraceCall("_set_xpath_context", __pyx_f[17], 132, 0, __PYX_ERR(17, 132, __pyx_L1_error)); /* "src/lxml/extensions.pxi":133 * @@ -176342,7 +164264,6 @@ static void __pyx_f_4lxml_5etree_12_BaseContext__set_xpath_context(struct __pyx_ * xpathCtxt.userData = self * xpathCtxt.error = _receiveXPathError */ - __Pyx_TraceLine(133,0,__PYX_ERR(17, 133, __pyx_L1_error)) __pyx_v_self->_xpathCtxt = __pyx_v_xpathCtxt; /* "src/lxml/extensions.pxi":134 @@ -176352,7 +164273,6 @@ static void __pyx_f_4lxml_5etree_12_BaseContext__set_xpath_context(struct __pyx_ * xpathCtxt.error = _receiveXPathError * */ - __Pyx_TraceLine(134,0,__PYX_ERR(17, 134, __pyx_L1_error)) __pyx_v_xpathCtxt->userData = ((void *)__pyx_v_self); /* "src/lxml/extensions.pxi":135 @@ -176362,7 +164282,6 @@ static void __pyx_f_4lxml_5etree_12_BaseContext__set_xpath_context(struct __pyx_ * * @cython.final */ - __Pyx_TraceLine(135,0,__PYX_ERR(17, 135, __pyx_L1_error)) __pyx_v_xpathCtxt->error = __pyx_f_4lxml_5etree__receiveXPathError; /* "src/lxml/extensions.pxi":132 @@ -176374,11 +164293,6 @@ static void __pyx_f_4lxml_5etree_12_BaseContext__set_xpath_context(struct __pyx_ */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._BaseContext._set_xpath_context", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -176392,11 +164306,9 @@ static void __pyx_f_4lxml_5etree_12_BaseContext__set_xpath_context(struct __pyx_ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__register_context(struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_v_self, struct LxmlDocument *__pyx_v_doc) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_register_context", 0); - __Pyx_TraceCall("_register_context", __pyx_f[17], 138, 0, __PYX_ERR(17, 138, __pyx_L1_error)); /* "src/lxml/extensions.pxi":139 * @cython.final @@ -176405,7 +164317,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__register_context(struct __ * self._exc.clear() * */ - __Pyx_TraceLine(139,0,__PYX_ERR(17, 139, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_doc)); __Pyx_GIVEREF(((PyObject *)__pyx_v_doc)); __Pyx_GOTREF(__pyx_v_self->_doc); @@ -176419,8 +164330,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__register_context(struct __ * * @cython.final */ - __Pyx_TraceLine(140,0,__PYX_ERR(17, 140, __pyx_L1_error)) - __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_self->_exc->__pyx_vtab)->clear(__pyx_v_self->_exc); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(17, 140, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_self->_exc->__pyx_vtab)->clear(__pyx_v_self->_exc); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(9, 140, __pyx_L1_error) /* "src/lxml/extensions.pxi":138 * @@ -176438,7 +164348,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__register_context(struct __ __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -176454,7 +164363,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__register_context(struct __ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__cleanup_context(struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_v_self) { PyObject *__pyx_v_ref = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -176465,7 +164373,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__cleanup_context(struct __p int __pyx_t_7; int __pyx_t_8; __Pyx_RefNannySetupContext("_cleanup_context", 0); - __Pyx_TraceCall("_cleanup_context", __pyx_f[17], 143, 0, __PYX_ERR(17, 143, __pyx_L1_error)); /* "src/lxml/extensions.pxi":146 * #xpath.xmlXPathRegisteredNsCleanup(self._xpathCtxt) @@ -176474,7 +164381,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__cleanup_context(struct __p * # clean up double refs in PyPy (see "_to_utf()" method) * for ref in self._utf_refs.itervalues(): */ - __Pyx_TraceLine(146,0,__PYX_ERR(17, 146, __pyx_L1_error)) __pyx_t_1 = (IS_PYPY != 0); if (__pyx_t_1) { @@ -176485,13 +164391,12 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__cleanup_context(struct __p * python.Py_DECREF(ref) * self._utf_refs.clear() */ - __Pyx_TraceLine(148,0,__PYX_ERR(17, 148, __pyx_L1_error)) __pyx_t_3 = 0; if (unlikely(__pyx_v_self->_utf_refs == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "itervalues"); - __PYX_ERR(17, 148, __pyx_L1_error) + __PYX_ERR(9, 148, __pyx_L1_error) } - __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_self->_utf_refs, 1, __pyx_n_s_itervalues, (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 148, __pyx_L1_error) + __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_self->_utf_refs, 1, __pyx_n_s_itervalues, (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_6; @@ -176499,7 +164404,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__cleanup_context(struct __p while (1) { __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_4, &__pyx_t_3, NULL, &__pyx_t_6, NULL, __pyx_t_5); if (unlikely(__pyx_t_7 == 0)) break; - if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(17, 148, __pyx_L1_error) + if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(9, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_ref, __pyx_t_6); __pyx_t_6 = 0; @@ -176511,7 +164416,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__cleanup_context(struct __p * self._utf_refs.clear() * self._eval_context_dict = None */ - __Pyx_TraceLine(149,0,__PYX_ERR(17, 149, __pyx_L1_error)) Py_DECREF(__pyx_v_ref); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -176532,12 +164436,11 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__cleanup_context(struct __p * self._eval_context_dict = None * self._doc = None */ - __Pyx_TraceLine(150,0,__PYX_ERR(17, 150, __pyx_L1_error)) if (unlikely(__pyx_v_self->_utf_refs == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "clear"); - __PYX_ERR(17, 150, __pyx_L1_error) + __PYX_ERR(9, 150, __pyx_L1_error) } - __pyx_t_8 = __Pyx_PyDict_Clear(__pyx_v_self->_utf_refs); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(17, 150, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyDict_Clear(__pyx_v_self->_utf_refs); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(9, 150, __pyx_L1_error) /* "src/lxml/extensions.pxi":151 * python.Py_DECREF(ref) @@ -176546,7 +164449,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__cleanup_context(struct __p * self._doc = None * */ - __Pyx_TraceLine(151,0,__PYX_ERR(17, 151, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_eval_context_dict); @@ -176560,7 +164462,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__cleanup_context(struct __p * * @cython.final */ - __Pyx_TraceLine(152,0,__PYX_ERR(17, 152, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_doc); @@ -176586,7 +164487,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__cleanup_context(struct __p __pyx_L0:; __Pyx_XDECREF(__pyx_v_ref); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -176601,11 +164501,9 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__cleanup_context(struct __p static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__release_context(struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_release_context", 0); - __Pyx_TraceCall("_release_context", __pyx_f[17], 155, 0, __PYX_ERR(17, 155, __pyx_L1_error)); /* "src/lxml/extensions.pxi":156 * @cython.final @@ -176614,7 +164512,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__release_context(struct __p * self._xpathCtxt.userData = NULL * self._xpathCtxt = NULL */ - __Pyx_TraceLine(156,0,__PYX_ERR(17, 156, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_xpathCtxt != NULL) != 0); if (__pyx_t_1) { @@ -176625,7 +164522,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__release_context(struct __p * self._xpathCtxt = NULL * */ - __Pyx_TraceLine(157,0,__PYX_ERR(17, 157, __pyx_L1_error)) __pyx_v_self->_xpathCtxt->userData = NULL; /* "src/lxml/extensions.pxi":158 @@ -176635,7 +164531,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__release_context(struct __p * * # namespaces (internal UTF-8 methods with leading '_') */ - __Pyx_TraceLine(158,0,__PYX_ERR(17, 158, __pyx_L1_error)) __pyx_v_self->_xpathCtxt = NULL; /* "src/lxml/extensions.pxi":156 @@ -176657,13 +164552,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__release_context(struct __p /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._BaseContext._release_context", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -176683,7 +164572,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_addNamespace(struct __pyx_o PyObject *__pyx_v_new_item = NULL; PyObject *__pyx_v_item = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -176692,7 +164580,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_addNamespace(struct __pyx_o PyObject *__pyx_t_5 = NULL; int __pyx_t_6; __Pyx_RefNannySetupContext("addNamespace", 0); - __Pyx_TraceCall("addNamespace", __pyx_f[17], 162, 0, __PYX_ERR(17, 162, __pyx_L1_error)); /* "src/lxml/extensions.pxi":164 * cdef addNamespace(self, prefix, ns_uri): @@ -176701,7 +164588,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_addNamespace(struct __pyx_o * raise TypeError, u"empty prefix is not supported in XPath" * prefix_utf = self._to_utf(prefix) */ - __Pyx_TraceLine(164,0,__PYX_ERR(17, 164, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_prefix == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { @@ -176713,9 +164599,8 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_addNamespace(struct __pyx_o * prefix_utf = self._to_utf(prefix) * ns_uri_utf = self._to_utf(ns_uri) */ - __Pyx_TraceLine(165,0,__PYX_ERR(17, 165, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_empty_prefix_is_not_supported_in, 0, 0); - __PYX_ERR(17, 165, __pyx_L1_error) + __PYX_ERR(9, 165, __pyx_L1_error) /* "src/lxml/extensions.pxi":164 * cdef addNamespace(self, prefix, ns_uri): @@ -176733,8 +164618,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_addNamespace(struct __pyx_o * ns_uri_utf = self._to_utf(ns_uri) * new_item = (prefix_utf, ns_uri_utf) */ - __Pyx_TraceLine(166,0,__PYX_ERR(17, 166, __pyx_L1_error)) - __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseContext *)__pyx_v_self->__pyx_vtab)->_to_utf(__pyx_v_self, __pyx_v_prefix); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 166, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseContext *)__pyx_v_self->__pyx_vtab)->_to_utf(__pyx_v_self, __pyx_v_prefix); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_prefix_utf = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; @@ -176746,8 +164630,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_addNamespace(struct __pyx_o * new_item = (prefix_utf, ns_uri_utf) * if self._namespaces is None: */ - __Pyx_TraceLine(167,0,__PYX_ERR(17, 167, __pyx_L1_error)) - __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseContext *)__pyx_v_self->__pyx_vtab)->_to_utf(__pyx_v_self, __pyx_v_ns_uri); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 167, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseContext *)__pyx_v_self->__pyx_vtab)->_to_utf(__pyx_v_self, __pyx_v_ns_uri); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_ns_uri_utf = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; @@ -176759,8 +164642,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_addNamespace(struct __pyx_o * if self._namespaces is None: * self._namespaces = [new_item] */ - __Pyx_TraceLine(168,0,__PYX_ERR(17, 168, __pyx_L1_error)) - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 168, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_prefix_utf); __Pyx_GIVEREF(__pyx_v_prefix_utf); @@ -176778,7 +164660,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_addNamespace(struct __pyx_o * self._namespaces = [new_item] * else: */ - __Pyx_TraceLine(169,0,__PYX_ERR(17, 169, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_self->_namespaces == ((PyObject*)Py_None)); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -176790,8 +164671,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_addNamespace(struct __pyx_o * else: * namespaces = [] */ - __Pyx_TraceLine(170,0,__PYX_ERR(17, 170, __pyx_L1_error)) - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 170, __pyx_L1_error) + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_new_item); __Pyx_GIVEREF(__pyx_v_new_item); @@ -176819,9 +164699,8 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_addNamespace(struct __pyx_o * for item in self._namespaces: * if item[0] == prefix_utf: */ - __Pyx_TraceLine(172,0,__PYX_ERR(17, 172, __pyx_L1_error)) /*else*/ { - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 172, __pyx_L1_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_namespaces = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; @@ -176833,18 +164712,17 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_addNamespace(struct __pyx_o * if item[0] == prefix_utf: * item = new_item */ - __Pyx_TraceLine(173,0,__PYX_ERR(17, 173, __pyx_L1_error)) if (unlikely(__pyx_v_self->_namespaces == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(17, 173, __pyx_L1_error) + __PYX_ERR(9, 173, __pyx_L1_error) } __pyx_t_3 = __pyx_v_self->_namespaces; __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(17, 173, __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(9, 173, __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(17, 173, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_5); @@ -176857,10 +164735,9 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_addNamespace(struct __pyx_o * item = new_item * new_item = None */ - __Pyx_TraceLine(174,0,__PYX_ERR(17, 174, __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(17, 174, __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(9, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_t_5, __pyx_v_prefix_utf, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(17, 174, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_t_5, __pyx_v_prefix_utf, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(9, 174, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { @@ -176871,7 +164748,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_addNamespace(struct __pyx_o * new_item = None * namespaces.append(item) */ - __Pyx_TraceLine(175,0,__PYX_ERR(17, 175, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_new_item); __Pyx_DECREF_SET(__pyx_v_item, __pyx_v_new_item); @@ -176882,7 +164758,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_addNamespace(struct __pyx_o * namespaces.append(item) * if new_item is not None: */ - __Pyx_TraceLine(176,0,__PYX_ERR(17, 176, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_new_item, ((PyObject*)Py_None)); @@ -176902,8 +164777,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_addNamespace(struct __pyx_o * if new_item is not None: * namespaces.append(new_item) */ - __Pyx_TraceLine(177,0,__PYX_ERR(17, 177, __pyx_L1_error)) - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_namespaces, __pyx_v_item); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(17, 177, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_namespaces, __pyx_v_item); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(9, 177, __pyx_L1_error) /* "src/lxml/extensions.pxi":173 * else: @@ -176912,7 +164786,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_addNamespace(struct __pyx_o * if item[0] == prefix_utf: * item = new_item */ - __Pyx_TraceLine(173,0,__PYX_ERR(17, 173, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -176923,7 +164796,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_addNamespace(struct __pyx_o * namespaces.append(new_item) * self._namespaces = namespaces */ - __Pyx_TraceLine(178,0,__PYX_ERR(17, 178, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_new_item != ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -176935,8 +164807,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_addNamespace(struct __pyx_o * self._namespaces = namespaces * if self._xpathCtxt is not NULL: */ - __Pyx_TraceLine(179,0,__PYX_ERR(17, 179, __pyx_L1_error)) - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_namespaces, __pyx_v_new_item); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(17, 179, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_namespaces, __pyx_v_new_item); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(9, 179, __pyx_L1_error) /* "src/lxml/extensions.pxi":178 * new_item = None @@ -176954,7 +164825,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_addNamespace(struct __pyx_o * if self._xpathCtxt is not NULL: * xpath.xmlXPathRegisterNs( */ - __Pyx_TraceLine(180,0,__PYX_ERR(17, 180, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_namespaces); __Pyx_GIVEREF(__pyx_v_namespaces); __Pyx_GOTREF(__pyx_v_self->_namespaces); @@ -176970,7 +164840,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_addNamespace(struct __pyx_o * xpath.xmlXPathRegisterNs( * self._xpathCtxt, _xcstr(prefix_utf), _xcstr(ns_uri_utf)) */ - __Pyx_TraceLine(181,0,__PYX_ERR(17, 181, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->_xpathCtxt != NULL) != 0); if (__pyx_t_2) { @@ -176981,7 +164850,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_addNamespace(struct __pyx_o * self._xpathCtxt, _xcstr(prefix_utf), _xcstr(ns_uri_utf)) * */ - __Pyx_TraceLine(182,0,__PYX_ERR(17, 182, __pyx_L1_error)) (void)(xmlXPathRegisterNs(__pyx_v_self->_xpathCtxt, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_prefix_utf), (const xmlChar*)PyBytes_AS_STRING(__pyx_v_ns_uri_utf))); /* "src/lxml/extensions.pxi":181 @@ -177016,7 +164884,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_addNamespace(struct __pyx_o __Pyx_XDECREF(__pyx_v_new_item); __Pyx_XDECREF(__pyx_v_item); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -177033,14 +164900,12 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerNamespace(struct __ PyObject *__pyx_v_prefix_utf = NULL; PyObject *__pyx_v_ns_uri_utf = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("registerNamespace", 0); - __Pyx_TraceCall("registerNamespace", __pyx_f[17], 185, 0, __PYX_ERR(17, 185, __pyx_L1_error)); /* "src/lxml/extensions.pxi":186 * @@ -177049,7 +164914,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerNamespace(struct __ * raise TypeError, u"empty prefix is not supported in XPath" * prefix_utf = self._to_utf(prefix) */ - __Pyx_TraceLine(186,0,__PYX_ERR(17, 186, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_prefix == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { @@ -177061,9 +164925,8 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerNamespace(struct __ * prefix_utf = self._to_utf(prefix) * ns_uri_utf = self._to_utf(ns_uri) */ - __Pyx_TraceLine(187,0,__PYX_ERR(17, 187, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_empty_prefix_is_not_supported_in, 0, 0); - __PYX_ERR(17, 187, __pyx_L1_error) + __PYX_ERR(9, 187, __pyx_L1_error) /* "src/lxml/extensions.pxi":186 * @@ -177081,8 +164944,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerNamespace(struct __ * ns_uri_utf = self._to_utf(ns_uri) * self._global_namespaces.append(prefix_utf) */ - __Pyx_TraceLine(188,0,__PYX_ERR(17, 188, __pyx_L1_error)) - __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseContext *)__pyx_v_self->__pyx_vtab)->_to_utf(__pyx_v_self, __pyx_v_prefix); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 188, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseContext *)__pyx_v_self->__pyx_vtab)->_to_utf(__pyx_v_self, __pyx_v_prefix); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_prefix_utf = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; @@ -177094,8 +164956,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerNamespace(struct __ * self._global_namespaces.append(prefix_utf) * xpath.xmlXPathRegisterNs(self._xpathCtxt, */ - __Pyx_TraceLine(189,0,__PYX_ERR(17, 189, __pyx_L1_error)) - __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseContext *)__pyx_v_self->__pyx_vtab)->_to_utf(__pyx_v_self, __pyx_v_ns_uri); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 189, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseContext *)__pyx_v_self->__pyx_vtab)->_to_utf(__pyx_v_self, __pyx_v_ns_uri); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_ns_uri_utf = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; @@ -177107,12 +164968,11 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerNamespace(struct __ * xpath.xmlXPathRegisterNs(self._xpathCtxt, * _xcstr(prefix_utf), _xcstr(ns_uri_utf)) */ - __Pyx_TraceLine(190,0,__PYX_ERR(17, 190, __pyx_L1_error)) if (unlikely(__pyx_v_self->_global_namespaces == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(17, 190, __pyx_L1_error) + __PYX_ERR(9, 190, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_self->_global_namespaces, __pyx_v_prefix_utf); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(17, 190, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_self->_global_namespaces, __pyx_v_prefix_utf); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(9, 190, __pyx_L1_error) /* "src/lxml/extensions.pxi":191 * ns_uri_utf = self._to_utf(ns_uri) @@ -177121,7 +164981,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerNamespace(struct __ * _xcstr(prefix_utf), _xcstr(ns_uri_utf)) * */ - __Pyx_TraceLine(191,0,__PYX_ERR(17, 191, __pyx_L1_error)) (void)(xmlXPathRegisterNs(__pyx_v_self->_xpathCtxt, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_prefix_utf), (const xmlChar*)PyBytes_AS_STRING(__pyx_v_ns_uri_utf))); /* "src/lxml/extensions.pxi":185 @@ -177143,7 +165002,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerNamespace(struct __ __Pyx_XDECREF(__pyx_v_prefix_utf); __Pyx_XDECREF(__pyx_v_ns_uri_utf); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -177160,7 +165018,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalNamespaces(str PyObject *__pyx_v_prefix_utf = NULL; PyObject *__pyx_v_ns_uri_utf = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -177172,7 +165029,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalNamespaces(str PyObject *__pyx_t_8 = NULL; PyObject *(*__pyx_t_9)(PyObject *); __Pyx_RefNannySetupContext("registerLocalNamespaces", 0); - __Pyx_TraceCall("registerLocalNamespaces", __pyx_f[17], 194, 0, __PYX_ERR(17, 194, __pyx_L1_error)); /* "src/lxml/extensions.pxi":195 * @@ -177181,7 +165037,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalNamespaces(str * return * for prefix_utf, ns_uri_utf in self._namespaces: */ - __Pyx_TraceLine(195,0,__PYX_ERR(17, 195, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_namespaces == ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -177193,7 +165048,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalNamespaces(str * for prefix_utf, ns_uri_utf in self._namespaces: * xpath.xmlXPathRegisterNs( */ - __Pyx_TraceLine(196,0,__PYX_ERR(17, 196, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -177214,18 +165068,17 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalNamespaces(str * xpath.xmlXPathRegisterNs( * self._xpathCtxt, _xcstr(prefix_utf), _xcstr(ns_uri_utf)) */ - __Pyx_TraceLine(197,0,__PYX_ERR(17, 197, __pyx_L1_error)) if (unlikely(__pyx_v_self->_namespaces == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(17, 197, __pyx_L1_error) + __PYX_ERR(9, 197, __pyx_L1_error) } __pyx_t_3 = __pyx_v_self->_namespaces; __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(17, 197, __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(9, 197, __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(17, 197, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { @@ -177234,7 +165087,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalNamespaces(str if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(17, 197, __pyx_L1_error) + __PYX_ERR(9, 197, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -177247,15 +165100,15 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalNamespaces(str __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(17, 197, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 197, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 197, __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(17, 197, __pyx_L1_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(9, 197, __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; @@ -177263,7 +165116,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalNamespaces(str __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(17, 197, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(9, 197, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_unpacking_done; @@ -177271,7 +165124,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalNamespaces(str __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(17, 197, __pyx_L1_error) + __PYX_ERR(9, 197, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_prefix_utf, __pyx_t_6); @@ -177286,7 +165139,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalNamespaces(str * self._xpathCtxt, _xcstr(prefix_utf), _xcstr(ns_uri_utf)) * */ - __Pyx_TraceLine(198,0,__PYX_ERR(17, 198, __pyx_L1_error)) (void)(xmlXPathRegisterNs(__pyx_v_self->_xpathCtxt, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_prefix_utf), (const xmlChar*)PyBytes_AS_STRING(__pyx_v_ns_uri_utf))); /* "src/lxml/extensions.pxi":197 @@ -177296,7 +165148,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalNamespaces(str * xpath.xmlXPathRegisterNs( * self._xpathCtxt, _xcstr(prefix_utf), _xcstr(ns_uri_utf)) */ - __Pyx_TraceLine(197,0,__PYX_ERR(17, 197, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -177323,7 +165174,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalNamespaces(str __Pyx_XDECREF(__pyx_v_prefix_utf); __Pyx_XDECREF(__pyx_v_ns_uri_utf); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -177341,7 +165191,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalNamespaces(st PyObject *__pyx_v_prefix_utf = NULL; PyObject *__pyx_v_ns_uri_utf = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -177353,7 +165202,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalNamespaces(st PyObject *(*__pyx_t_8)(PyObject *); int __pyx_t_9; __Pyx_RefNannySetupContext("registerGlobalNamespaces", 0); - __Pyx_TraceCall("registerGlobalNamespaces", __pyx_f[17], 201, 0, __PYX_ERR(17, 201, __pyx_L1_error)); /* "src/lxml/extensions.pxi":202 * @@ -177362,8 +165210,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalNamespaces(st * if python.PyList_GET_SIZE(ns_prefixes) > 0: * for prefix_utf, ns_uri_utf in ns_prefixes: */ - __Pyx_TraceLine(202,0,__PYX_ERR(17, 202, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__find_all_extension_prefixes(); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 202, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__find_all_extension_prefixes(); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ns_prefixes = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; @@ -177375,7 +165222,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalNamespaces(st * for prefix_utf, ns_uri_utf in ns_prefixes: * self._global_namespaces.append(prefix_utf) */ - __Pyx_TraceLine(203,0,__PYX_ERR(17, 203, __pyx_L1_error)) __pyx_t_2 = ((PyList_GET_SIZE(__pyx_v_ns_prefixes) > 0) != 0); if (__pyx_t_2) { @@ -177386,18 +165232,17 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalNamespaces(st * self._global_namespaces.append(prefix_utf) * xpath.xmlXPathRegisterNs( */ - __Pyx_TraceLine(204,0,__PYX_ERR(17, 204, __pyx_L1_error)) if (unlikely(__pyx_v_ns_prefixes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(17, 204, __pyx_L1_error) + __PYX_ERR(9, 204, __pyx_L1_error) } __pyx_t_1 = __pyx_v_ns_prefixes; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; for (;;) { if (__pyx_t_3 >= 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_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(17, 204, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(9, 204, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 204, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { @@ -177406,7 +165251,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalNamespaces(st if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(17, 204, __pyx_L1_error) + __PYX_ERR(9, 204, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -177419,15 +165264,15 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalNamespaces(st __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(17, 204, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 204, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 204, __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(17, 204, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 204, __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; @@ -177435,7 +165280,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalNamespaces(st __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(17, 204, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(9, 204, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L7_unpacking_done; @@ -177443,7 +165288,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalNamespaces(st __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(17, 204, __pyx_L1_error) + __PYX_ERR(9, 204, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_prefix_utf, __pyx_t_5); @@ -177458,12 +165303,11 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalNamespaces(st * xpath.xmlXPathRegisterNs( * self._xpathCtxt, _xcstr(prefix_utf), _xcstr(ns_uri_utf)) */ - __Pyx_TraceLine(205,0,__PYX_ERR(17, 205, __pyx_L1_error)) if (unlikely(__pyx_v_self->_global_namespaces == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(17, 205, __pyx_L1_error) + __PYX_ERR(9, 205, __pyx_L1_error) } - __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_self->_global_namespaces, __pyx_v_prefix_utf); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(17, 205, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_self->_global_namespaces, __pyx_v_prefix_utf); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(9, 205, __pyx_L1_error) /* "src/lxml/extensions.pxi":206 * for prefix_utf, ns_uri_utf in ns_prefixes: @@ -177472,7 +165316,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalNamespaces(st * self._xpathCtxt, _xcstr(prefix_utf), _xcstr(ns_uri_utf)) * */ - __Pyx_TraceLine(206,0,__PYX_ERR(17, 206, __pyx_L1_error)) (void)(xmlXPathRegisterNs(__pyx_v_self->_xpathCtxt, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_prefix_utf), (const xmlChar*)PyBytes_AS_STRING(__pyx_v_ns_uri_utf))); /* "src/lxml/extensions.pxi":204 @@ -177482,7 +165325,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalNamespaces(st * self._global_namespaces.append(prefix_utf) * xpath.xmlXPathRegisterNs( */ - __Pyx_TraceLine(204,0,__PYX_ERR(17, 204, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -177519,7 +165361,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalNamespaces(st __Pyx_XDECREF(__pyx_v_prefix_utf); __Pyx_XDECREF(__pyx_v_ns_uri_utf); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -177535,14 +165376,12 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalNamespaces(st static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalNamespaces(struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_v_self) { PyObject *__pyx_v_prefix_utf = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("unregisterGlobalNamespaces", 0); - __Pyx_TraceCall("unregisterGlobalNamespaces", __pyx_f[17], 209, 0, __PYX_ERR(17, 209, __pyx_L1_error)); /* "src/lxml/extensions.pxi":210 * @@ -177551,7 +165390,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalNamespaces( * for prefix_utf in self._global_namespaces: * xpath.xmlXPathRegisterNs(self._xpathCtxt, */ - __Pyx_TraceLine(210,0,__PYX_ERR(17, 210, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_global_namespaces; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = ((PyList_GET_SIZE(__pyx_t_1) > 0) != 0); @@ -177565,18 +165403,17 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalNamespaces( * xpath.xmlXPathRegisterNs(self._xpathCtxt, * _xcstr(prefix_utf), NULL) */ - __Pyx_TraceLine(211,0,__PYX_ERR(17, 211, __pyx_L1_error)) if (unlikely(__pyx_v_self->_global_namespaces == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(17, 211, __pyx_L1_error) + __PYX_ERR(9, 211, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->_global_namespaces; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; for (;;) { if (__pyx_t_3 >= 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_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(17, 211, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(9, 211, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 211, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_XDECREF_SET(__pyx_v_prefix_utf, __pyx_t_4); @@ -177589,7 +165426,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalNamespaces( * _xcstr(prefix_utf), NULL) * del self._global_namespaces[:] */ - __Pyx_TraceLine(212,0,__PYX_ERR(17, 212, __pyx_L1_error)) (void)(xmlXPathRegisterNs(__pyx_v_self->_xpathCtxt, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_prefix_utf), NULL)); /* "src/lxml/extensions.pxi":211 @@ -177599,7 +165435,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalNamespaces( * xpath.xmlXPathRegisterNs(self._xpathCtxt, * _xcstr(prefix_utf), NULL) */ - __Pyx_TraceLine(211,0,__PYX_ERR(17, 211, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -177610,12 +165445,11 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalNamespaces( * * cdef void _unregisterNamespace(self, prefix_utf): */ - __Pyx_TraceLine(214,0,__PYX_ERR(17, 214, __pyx_L1_error)) if (unlikely(__pyx_v_self->_global_namespaces == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(17, 214, __pyx_L1_error) + __PYX_ERR(9, 214, __pyx_L1_error) } - if (__Pyx_PyObject_DelSlice(__pyx_v_self->_global_namespaces, 0, 0, NULL, NULL, NULL, 0, 0, 1) < 0) __PYX_ERR(17, 214, __pyx_L1_error) + if (__Pyx_PyObject_DelSlice(__pyx_v_self->_global_namespaces, 0, 0, NULL, NULL, NULL, 0, 0, 1) < 0) __PYX_ERR(9, 214, __pyx_L1_error) /* "src/lxml/extensions.pxi":210 * @@ -177645,7 +165479,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalNamespaces( __pyx_L0:; __Pyx_XDECREF(__pyx_v_prefix_utf); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -177659,10 +165492,8 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalNamespaces( */ static void __pyx_f_4lxml_5etree_12_BaseContext__unregisterNamespace(struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_v_self, PyObject *__pyx_v_prefix_utf) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_unregisterNamespace", 0); - __Pyx_TraceCall("_unregisterNamespace", __pyx_f[17], 216, 0, __PYX_ERR(17, 216, __pyx_L1_error)); /* "src/lxml/extensions.pxi":217 * @@ -177671,7 +165502,6 @@ static void __pyx_f_4lxml_5etree_12_BaseContext__unregisterNamespace(struct __py * _xcstr(prefix_utf), NULL) * */ - __Pyx_TraceLine(217,0,__PYX_ERR(17, 217, __pyx_L1_error)) (void)(xmlXPathRegisterNs(__pyx_v_self->_xpathCtxt, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_prefix_utf), NULL)); /* "src/lxml/extensions.pxi":216 @@ -177683,11 +165513,6 @@ static void __pyx_f_4lxml_5etree_12_BaseContext__unregisterNamespace(struct __py */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._BaseContext._unregisterNamespace", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -177701,13 +165526,11 @@ static void __pyx_f_4lxml_5etree_12_BaseContext__unregisterNamespace(struct __py static int __pyx_f_4lxml_5etree_12_BaseContext__addLocalExtensionFunction(struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_v_self, PyObject *__pyx_v_ns_utf, PyObject *__pyx_v_name_utf, PyObject *__pyx_v_function) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_addLocalExtensionFunction", 0); - __Pyx_TraceCall("_addLocalExtensionFunction", __pyx_f[17], 222, 0, __PYX_ERR(17, 222, __pyx_L1_error)); /* "src/lxml/extensions.pxi":223 * @@ -177716,7 +165539,6 @@ static int __pyx_f_4lxml_5etree_12_BaseContext__addLocalExtensionFunction(struct * self._extensions = {} * self._extensions[(ns_utf, name_utf)] = function */ - __Pyx_TraceLine(223,0,__PYX_ERR(17, 223, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_extensions == ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -177728,8 +165550,7 @@ static int __pyx_f_4lxml_5etree_12_BaseContext__addLocalExtensionFunction(struct * self._extensions[(ns_utf, name_utf)] = function * return 0 */ - __Pyx_TraceLine(224,0,__PYX_ERR(17, 224, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 224, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_extensions); @@ -177753,12 +165574,11 @@ static int __pyx_f_4lxml_5etree_12_BaseContext__addLocalExtensionFunction(struct * return 0 * */ - __Pyx_TraceLine(225,0,__PYX_ERR(17, 225, __pyx_L1_error)) if (unlikely(__pyx_v_self->_extensions == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(17, 225, __pyx_L1_error) + __PYX_ERR(9, 225, __pyx_L1_error) } - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 225, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_ns_utf); __Pyx_GIVEREF(__pyx_v_ns_utf); @@ -177766,7 +165586,7 @@ static int __pyx_f_4lxml_5etree_12_BaseContext__addLocalExtensionFunction(struct __Pyx_INCREF(__pyx_v_name_utf); __Pyx_GIVEREF(__pyx_v_name_utf); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_name_utf); - if (unlikely(PyDict_SetItem(__pyx_v_self->_extensions, __pyx_t_3, __pyx_v_function) < 0)) __PYX_ERR(17, 225, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->_extensions, __pyx_t_3, __pyx_v_function) < 0)) __PYX_ERR(9, 225, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/lxml/extensions.pxi":226 @@ -177776,7 +165596,6 @@ static int __pyx_f_4lxml_5etree_12_BaseContext__addLocalExtensionFunction(struct * * cdef registerGlobalFunctions(self, void* ctxt, */ - __Pyx_TraceLine(226,0,__PYX_ERR(17, 226, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -177794,7 +165613,6 @@ static int __pyx_f_4lxml_5etree_12_BaseContext__addLocalExtensionFunction(struct __Pyx_AddTraceback("lxml.etree._BaseContext._addLocalExtensionFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -177815,7 +165633,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalFunctions(str PyObject *__pyx_v_name_utf = NULL; PyObject *__pyx_v_function = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; @@ -177830,7 +165647,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalFunctions(str PyObject *__pyx_t_11 = NULL; int __pyx_t_12; __Pyx_RefNannySetupContext("registerGlobalFunctions", 0); - __Pyx_TraceCall("registerGlobalFunctions", __pyx_f[17], 228, 0, __PYX_ERR(17, 228, __pyx_L1_error)); /* "src/lxml/extensions.pxi":232 * cdef python.PyObject* dict_result @@ -177839,13 +165655,12 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalFunctions(str * dict_result = python.PyDict_GetItem( * self._function_cache, ns_utf) */ - __Pyx_TraceLine(232,0,__PYX_ERR(17, 232, __pyx_L1_error)) __pyx_t_2 = 0; if (unlikely(__pyx_v_4lxml_5etree___FUNCTION_NAMESPACE_REGISTRIES == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "iteritems"); - __PYX_ERR(17, 232, __pyx_L1_error) + __PYX_ERR(9, 232, __pyx_L1_error) } - __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_4lxml_5etree___FUNCTION_NAMESPACE_REGISTRIES, 1, __pyx_n_s_iteritems, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 232, __pyx_L1_error) + __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_4lxml_5etree___FUNCTION_NAMESPACE_REGISTRIES, 1, __pyx_n_s_iteritems, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_5; @@ -177853,7 +165668,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalFunctions(str while (1) { __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4); if (unlikely(__pyx_t_7 == 0)) break; - if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(17, 232, __pyx_L1_error) + if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(9, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_ns_utf, __pyx_t_5); @@ -177868,7 +165683,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalFunctions(str * if dict_result is not NULL: * d = dict_result */ - __Pyx_TraceLine(234,0,__PYX_ERR(17, 234, __pyx_L1_error)) __pyx_t_6 = __pyx_v_self->_function_cache; __Pyx_INCREF(__pyx_t_6); @@ -177879,7 +165693,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalFunctions(str * self._function_cache, ns_utf) * if dict_result is not NULL: */ - __Pyx_TraceLine(233,0,__PYX_ERR(17, 233, __pyx_L1_error)) __pyx_v_dict_result = PyDict_GetItem(__pyx_t_6, __pyx_v_ns_utf); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -177890,7 +165703,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalFunctions(str * d = dict_result * else: */ - __Pyx_TraceLine(235,0,__PYX_ERR(17, 235, __pyx_L1_error)) __pyx_t_8 = ((__pyx_v_dict_result != NULL) != 0); if (__pyx_t_8) { @@ -177901,7 +165713,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalFunctions(str * else: * d = {} */ - __Pyx_TraceLine(236,0,__PYX_ERR(17, 236, __pyx_L1_error)) __pyx_t_6 = ((PyObject *)__pyx_v_dict_result); __Pyx_INCREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_d, ((PyObject*)__pyx_t_6)); @@ -177924,9 +165735,8 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalFunctions(str * self._function_cache[ns_utf] = d * for name_utf, function in ns_functions.iteritems(): */ - __Pyx_TraceLine(238,0,__PYX_ERR(17, 238, __pyx_L1_error)) /*else*/ { - __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 238, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_d, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; @@ -177938,12 +165748,11 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalFunctions(str * for name_utf, function in ns_functions.iteritems(): * d[name_utf] = function */ - __Pyx_TraceLine(239,0,__PYX_ERR(17, 239, __pyx_L1_error)) if (unlikely(__pyx_v_self->_function_cache == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(17, 239, __pyx_L1_error) + __PYX_ERR(9, 239, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_self->_function_cache, __pyx_v_ns_utf, __pyx_v_d) < 0)) __PYX_ERR(17, 239, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->_function_cache, __pyx_v_ns_utf, __pyx_v_d) < 0)) __PYX_ERR(9, 239, __pyx_L1_error) } __pyx_L5:; @@ -177954,13 +165763,12 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalFunctions(str * d[name_utf] = function * reg_func(ctxt, name_utf, ns_utf) */ - __Pyx_TraceLine(240,0,__PYX_ERR(17, 240, __pyx_L1_error)) __pyx_t_9 = 0; if (unlikely(__pyx_v_ns_functions == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "iteritems"); - __PYX_ERR(17, 240, __pyx_L1_error) + __PYX_ERR(9, 240, __pyx_L1_error) } - __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_ns_functions, 0, __pyx_n_s_iteritems, (&__pyx_t_10), (&__pyx_t_7)); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 240, __pyx_L1_error) + __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_ns_functions, 0, __pyx_n_s_iteritems, (&__pyx_t_10), (&__pyx_t_7)); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = __pyx_t_5; @@ -177968,7 +165776,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalFunctions(str while (1) { __pyx_t_12 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_10, &__pyx_t_9, &__pyx_t_5, &__pyx_t_11, NULL, __pyx_t_7); if (unlikely(__pyx_t_12 == 0)) break; - if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(17, 240, __pyx_L1_error) + if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(9, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_11); __Pyx_XDECREF_SET(__pyx_v_name_utf, __pyx_t_5); @@ -177983,12 +165791,11 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalFunctions(str * reg_func(ctxt, name_utf, ns_utf) * */ - __Pyx_TraceLine(241,0,__PYX_ERR(17, 241, __pyx_L1_error)) if (unlikely(__pyx_v_d == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(17, 241, __pyx_L1_error) + __PYX_ERR(9, 241, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_d, __pyx_v_name_utf, __pyx_v_function) < 0)) __PYX_ERR(17, 241, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_d, __pyx_v_name_utf, __pyx_v_function) < 0)) __PYX_ERR(9, 241, __pyx_L1_error) /* "src/lxml/extensions.pxi":242 * for name_utf, function in ns_functions.iteritems(): @@ -177997,7 +165804,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalFunctions(str * * cdef registerLocalFunctions(self, void* ctxt, */ - __Pyx_TraceLine(242,0,__PYX_ERR(17, 242, __pyx_L1_error)) (void)(__pyx_v_reg_func(__pyx_v_ctxt, __pyx_v_name_utf, __pyx_v_ns_utf)); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -178029,7 +165835,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerGlobalFunctions(str __Pyx_XDECREF(__pyx_v_name_utf); __Pyx_XDECREF(__pyx_v_function); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -178050,7 +165855,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalFunctions(stru PyObject *__pyx_v_name_utf = NULL; PyObject *__pyx_v_function = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -178067,7 +165871,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalFunctions(stru PyObject *(*__pyx_t_13)(PyObject *); int __pyx_t_14; __Pyx_RefNannySetupContext("registerLocalFunctions", 0); - __Pyx_TraceCall("registerLocalFunctions", __pyx_f[17], 244, 0, __PYX_ERR(17, 244, __pyx_L1_error)); /* "src/lxml/extensions.pxi":248 * cdef python.PyObject* dict_result @@ -178076,7 +165879,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalFunctions(stru * return # done * last_ns = None */ - __Pyx_TraceLine(248,0,__PYX_ERR(17, 248, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_extensions == ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -178088,7 +165890,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalFunctions(stru * last_ns = None * d = None */ - __Pyx_TraceLine(249,0,__PYX_ERR(17, 249, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -178109,7 +165910,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalFunctions(stru * d = None * for (ns_utf, name_utf), function in self._extensions.iteritems(): */ - __Pyx_TraceLine(250,0,__PYX_ERR(17, 250, __pyx_L1_error)) __Pyx_INCREF(Py_None); __pyx_v_last_ns = Py_None; @@ -178120,7 +165920,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalFunctions(stru * for (ns_utf, name_utf), function in self._extensions.iteritems(): * if ns_utf is not last_ns or d is None: */ - __Pyx_TraceLine(251,0,__PYX_ERR(17, 251, __pyx_L1_error)) __Pyx_INCREF(Py_None); __pyx_v_d = ((PyObject*)Py_None); @@ -178131,13 +165930,12 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalFunctions(stru * if ns_utf is not last_ns or d is None: * last_ns = ns_utf */ - __Pyx_TraceLine(252,0,__PYX_ERR(17, 252, __pyx_L1_error)) __pyx_t_4 = 0; if (unlikely(__pyx_v_self->_extensions == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "iteritems"); - __PYX_ERR(17, 252, __pyx_L1_error) + __PYX_ERR(9, 252, __pyx_L1_error) } - __pyx_t_7 = __Pyx_dict_iterator(__pyx_v_self->_extensions, 1, __pyx_n_s_iteritems, (&__pyx_t_5), (&__pyx_t_6)); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 252, __pyx_L1_error) + __pyx_t_7 = __Pyx_dict_iterator(__pyx_v_self->_extensions, 1, __pyx_n_s_iteritems, (&__pyx_t_5), (&__pyx_t_6)); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = __pyx_t_7; @@ -178145,7 +165943,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalFunctions(stru while (1) { __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_5, &__pyx_t_4, &__pyx_t_7, &__pyx_t_8, NULL, __pyx_t_6); if (unlikely(__pyx_t_9 == 0)) break; - if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(17, 252, __pyx_L1_error) + if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(9, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) { @@ -178154,7 +165952,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalFunctions(stru if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(17, 252, __pyx_L1_error) + __PYX_ERR(9, 252, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -178167,15 +165965,15 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalFunctions(stru __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_11); #else - __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 252, __pyx_L1_error) + __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(9, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(17, 252, __pyx_L1_error) + __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 252, __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(17, 252, __pyx_L1_error) + __pyx_t_12 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(9, 252, __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; @@ -178183,7 +165981,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalFunctions(stru __Pyx_GOTREF(__pyx_t_10); index = 1; __pyx_t_11 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_11)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_11); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) __PYX_ERR(17, 252, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) __PYX_ERR(9, 252, __pyx_L1_error) __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L7_unpacking_done; @@ -178191,7 +165989,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalFunctions(stru __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(17, 252, __pyx_L1_error) + __PYX_ERR(9, 252, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_ns_utf, __pyx_t_10); @@ -178208,7 +166006,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalFunctions(stru * last_ns = ns_utf * dict_result = python.PyDict_GetItem( */ - __Pyx_TraceLine(253,0,__PYX_ERR(17, 253, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_ns_utf != __pyx_v_last_ns); __pyx_t_14 = (__pyx_t_1 != 0); if (!__pyx_t_14) { @@ -178229,7 +166026,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalFunctions(stru * dict_result = python.PyDict_GetItem( * self._function_cache, ns_utf) */ - __Pyx_TraceLine(254,0,__PYX_ERR(17, 254, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_ns_utf); __Pyx_DECREF_SET(__pyx_v_last_ns, __pyx_v_ns_utf); @@ -178240,7 +166036,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalFunctions(stru * if dict_result is not NULL: * d = dict_result */ - __Pyx_TraceLine(256,0,__PYX_ERR(17, 256, __pyx_L1_error)) __pyx_t_8 = __pyx_v_self->_function_cache; __Pyx_INCREF(__pyx_t_8); @@ -178251,7 +166046,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalFunctions(stru * self._function_cache, ns_utf) * if dict_result is not NULL: */ - __Pyx_TraceLine(255,0,__PYX_ERR(17, 255, __pyx_L1_error)) __pyx_v_dict_result = PyDict_GetItem(__pyx_t_8, __pyx_v_ns_utf); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -178262,7 +166056,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalFunctions(stru * d = dict_result * else: */ - __Pyx_TraceLine(257,0,__PYX_ERR(17, 257, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_dict_result != NULL) != 0); if (__pyx_t_2) { @@ -178273,7 +166066,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalFunctions(stru * else: * d = {} */ - __Pyx_TraceLine(258,0,__PYX_ERR(17, 258, __pyx_L1_error)) __pyx_t_8 = ((PyObject *)__pyx_v_dict_result); __Pyx_INCREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_d, ((PyObject*)__pyx_t_8)); @@ -178296,9 +166088,8 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalFunctions(stru * self._function_cache[ns_utf] = d * d[name_utf] = function */ - __Pyx_TraceLine(260,0,__PYX_ERR(17, 260, __pyx_L1_error)) /*else*/ { - __pyx_t_8 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 260, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(9, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_d, ((PyObject*)__pyx_t_8)); __pyx_t_8 = 0; @@ -178310,12 +166101,11 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalFunctions(stru * d[name_utf] = function * reg_func(ctxt, name_utf, ns_utf) */ - __Pyx_TraceLine(261,0,__PYX_ERR(17, 261, __pyx_L1_error)) if (unlikely(__pyx_v_self->_function_cache == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(17, 261, __pyx_L1_error) + __PYX_ERR(9, 261, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_self->_function_cache, __pyx_v_ns_utf, __pyx_v_d) < 0)) __PYX_ERR(17, 261, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->_function_cache, __pyx_v_ns_utf, __pyx_v_d) < 0)) __PYX_ERR(9, 261, __pyx_L1_error) } __pyx_L11:; @@ -178335,12 +166125,11 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalFunctions(stru * reg_func(ctxt, name_utf, ns_utf) * */ - __Pyx_TraceLine(262,0,__PYX_ERR(17, 262, __pyx_L1_error)) if (unlikely(__pyx_v_d == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(17, 262, __pyx_L1_error) + __PYX_ERR(9, 262, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_d, __pyx_v_name_utf, __pyx_v_function) < 0)) __PYX_ERR(17, 262, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_d, __pyx_v_name_utf, __pyx_v_function) < 0)) __PYX_ERR(9, 262, __pyx_L1_error) /* "src/lxml/extensions.pxi":263 * self._function_cache[ns_utf] = d @@ -178349,7 +166138,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalFunctions(stru * * cdef unregisterAllFunctions(self, void* ctxt, */ - __Pyx_TraceLine(263,0,__PYX_ERR(17, 263, __pyx_L1_error)) (void)(__pyx_v_reg_func(__pyx_v_ctxt, __pyx_v_name_utf, __pyx_v_ns_utf)); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -178381,7 +166169,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_registerLocalFunctions(stru __Pyx_XDECREF(__pyx_v_name_utf); __Pyx_XDECREF(__pyx_v_function); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -178399,7 +166186,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterAllFunctions(stru PyObject *__pyx_v_functions = NULL; PyObject *__pyx_v_name_utf = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; @@ -178411,7 +166197,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterAllFunctions(stru Py_ssize_t __pyx_t_8; PyObject *(*__pyx_t_9)(PyObject *); __Pyx_RefNannySetupContext("unregisterAllFunctions", 0); - __Pyx_TraceCall("unregisterAllFunctions", __pyx_f[17], 265, 0, __PYX_ERR(17, 265, __pyx_L1_error)); /* "src/lxml/extensions.pxi":267 * cdef unregisterAllFunctions(self, void* ctxt, @@ -178420,13 +166205,12 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterAllFunctions(stru * for name_utf in functions: * unreg_func(ctxt, name_utf, ns_utf) */ - __Pyx_TraceLine(267,0,__PYX_ERR(17, 267, __pyx_L1_error)) __pyx_t_2 = 0; if (unlikely(__pyx_v_self->_function_cache == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "iteritems"); - __PYX_ERR(17, 267, __pyx_L1_error) + __PYX_ERR(9, 267, __pyx_L1_error) } - __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_self->_function_cache, 1, __pyx_n_s_iteritems, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 267, __pyx_L1_error) + __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_self->_function_cache, 1, __pyx_n_s_iteritems, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_5; @@ -178434,7 +166218,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterAllFunctions(stru while (1) { __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4); if (unlikely(__pyx_t_7 == 0)) break; - if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(17, 267, __pyx_L1_error) + if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(9, 267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_ns_utf, __pyx_t_5); @@ -178449,31 +166233,30 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterAllFunctions(stru * unreg_func(ctxt, name_utf, ns_utf) * */ - __Pyx_TraceLine(268,0,__PYX_ERR(17, 268, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_v_functions)) || PyTuple_CheckExact(__pyx_v_functions)) { __pyx_t_6 = __pyx_v_functions; __Pyx_INCREF(__pyx_t_6); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_functions); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 268, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_functions); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 268, __pyx_L1_error) + __pyx_t_9 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(9, 268, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_9)) { if (likely(PyList_CheckExact(__pyx_t_6))) { if (__pyx_t_8 >= 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_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(17, 268, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(9, 268, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 268, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_8 >= 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_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(17, 268, __pyx_L1_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(9, 268, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 268, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -178483,7 +166266,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterAllFunctions(stru PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(17, 268, __pyx_L1_error) + else __PYX_ERR(9, 268, __pyx_L1_error) } break; } @@ -178499,7 +166282,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterAllFunctions(stru * * cdef unregisterGlobalFunctions(self, void* ctxt, */ - __Pyx_TraceLine(269,0,__PYX_ERR(17, 269, __pyx_L1_error)) (void)(__pyx_v_unreg_func(__pyx_v_ctxt, __pyx_v_name_utf, __pyx_v_ns_utf)); /* "src/lxml/extensions.pxi":268 @@ -178509,7 +166291,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterAllFunctions(stru * unreg_func(ctxt, name_utf, ns_utf) * */ - __Pyx_TraceLine(268,0,__PYX_ERR(17, 268, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -178537,7 +166318,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterAllFunctions(stru __Pyx_XDECREF(__pyx_v_functions); __Pyx_XDECREF(__pyx_v_name_utf); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -178555,7 +166335,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalFunctions(s PyObject *__pyx_v_functions = NULL; PyObject *__pyx_v_name_utf = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -178571,7 +166350,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalFunctions(s int __pyx_t_12; int __pyx_t_13; __Pyx_RefNannySetupContext("unregisterGlobalFunctions", 0); - __Pyx_TraceCall("unregisterGlobalFunctions", __pyx_f[17], 271, 0, __PYX_ERR(17, 271, __pyx_L1_error)); /* "src/lxml/extensions.pxi":273 * cdef unregisterGlobalFunctions(self, void* ctxt, @@ -178580,20 +166358,19 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalFunctions(s * for name_utf in functions: * if self._extensions is None or \ */ - __Pyx_TraceLine(273,0,__PYX_ERR(17, 273, __pyx_L1_error)) if (unlikely(__pyx_v_self->_function_cache == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); - __PYX_ERR(17, 273, __pyx_L1_error) + __PYX_ERR(9, 273, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_self->_function_cache); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 273, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_self->_function_cache); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 273, __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_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 273, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 273, __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(17, 273, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 273, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -178601,17 +166378,17 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalFunctions(s 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_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(17, 273, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(9, 273, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 273, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= 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_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(17, 273, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(9, 273, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 273, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -178621,7 +166398,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalFunctions(s PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(17, 273, __pyx_L1_error) + else __PYX_ERR(9, 273, __pyx_L1_error) } break; } @@ -178633,7 +166410,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalFunctions(s if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(17, 273, __pyx_L1_error) + __PYX_ERR(9, 273, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -178646,15 +166423,15 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalFunctions(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(17, 273, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 273, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 273, __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(17, 273, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 273, __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; @@ -178662,7 +166439,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalFunctions(s __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(17, 273, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(9, 273, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -178670,7 +166447,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalFunctions(s __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(17, 273, __pyx_L1_error) + __PYX_ERR(9, 273, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_ns_utf, __pyx_t_5); @@ -178685,31 +166462,30 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalFunctions(s * if self._extensions is None or \ * (ns_utf, name_utf) not in self._extensions: */ - __Pyx_TraceLine(274,0,__PYX_ERR(17, 274, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_v_functions)) || PyTuple_CheckExact(__pyx_v_functions)) { __pyx_t_1 = __pyx_v_functions; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_functions); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 274, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_functions); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 274, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(9, 274, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_10)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_9 >= 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_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(17, 274, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(9, 274, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 274, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_9 >= 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_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(17, 274, __pyx_L1_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(9, 274, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 274, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } @@ -178719,7 +166495,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalFunctions(s PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(17, 274, __pyx_L1_error) + else __PYX_ERR(9, 274, __pyx_L1_error) } break; } @@ -178735,7 +166511,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalFunctions(s * (ns_utf, name_utf) not in self._extensions: * unreg_func(ctxt, name_utf, ns_utf) */ - __Pyx_TraceLine(275,0,__PYX_ERR(17, 275, __pyx_L1_error)) __pyx_t_12 = (__pyx_v_self->_extensions == ((PyObject*)Py_None)); __pyx_t_13 = (__pyx_t_12 != 0); if (!__pyx_t_13) { @@ -178751,8 +166526,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalFunctions(s * unreg_func(ctxt, name_utf, ns_utf) * */ - __Pyx_TraceLine(276,0,__PYX_ERR(17, 276, __pyx_L1_error)) - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 276, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_ns_utf); __Pyx_GIVEREF(__pyx_v_ns_utf); @@ -178762,9 +166536,9 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalFunctions(s PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_name_utf); if (unlikely(__pyx_v_self->_extensions == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(17, 276, __pyx_L1_error) + __PYX_ERR(9, 276, __pyx_L1_error) } - __pyx_t_13 = (__Pyx_PyDict_ContainsTF(__pyx_t_6, __pyx_v_self->_extensions, Py_NE)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(17, 276, __pyx_L1_error) + __pyx_t_13 = (__Pyx_PyDict_ContainsTF(__pyx_t_6, __pyx_v_self->_extensions, Py_NE)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(9, 276, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_12 = (__pyx_t_13 != 0); __pyx_t_11 = __pyx_t_12; @@ -178777,7 +166551,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalFunctions(s * (ns_utf, name_utf) not in self._extensions: * unreg_func(ctxt, name_utf, ns_utf) */ - __Pyx_TraceLine(275,0,__PYX_ERR(17, 275, __pyx_L1_error)) if (__pyx_t_11) { /* "src/lxml/extensions.pxi":277 @@ -178787,7 +166560,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalFunctions(s * * @cython.final */ - __Pyx_TraceLine(277,0,__PYX_ERR(17, 277, __pyx_L1_error)) (void)(__pyx_v_unreg_func(__pyx_v_ctxt, __pyx_v_name_utf, __pyx_v_ns_utf)); /* "src/lxml/extensions.pxi":275 @@ -178806,7 +166578,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalFunctions(s * if self._extensions is None or \ * (ns_utf, name_utf) not in self._extensions: */ - __Pyx_TraceLine(274,0,__PYX_ERR(17, 274, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -178817,7 +166588,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalFunctions(s * for name_utf in functions: * if self._extensions is None or \ */ - __Pyx_TraceLine(273,0,__PYX_ERR(17, 273, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -178845,7 +166615,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext_unregisterGlobalFunctions(s __Pyx_XDECREF(__pyx_v_functions); __Pyx_XDECREF(__pyx_v_name_utf); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -178862,14 +166631,12 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__find_cached_function(struc PyObject *__pyx_v_c_dict; PyObject *__pyx_v_dict_result; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("_find_cached_function", 0); - __Pyx_TraceCall("_find_cached_function", __pyx_f[17], 280, 0, __PYX_ERR(17, 280, __pyx_L1_error)); /* "src/lxml/extensions.pxi":288 * cdef python.PyObject* dict_result @@ -178878,14 +166645,13 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__find_cached_function(struc * if c_dict is not NULL: * dict_result = python.PyDict_GetItem( */ - __Pyx_TraceLine(288,0,__PYX_ERR(17, 288, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_function_cache; __Pyx_INCREF(__pyx_t_1); if (((__pyx_v_c_ns_uri == NULL) != 0)) { __Pyx_INCREF(Py_None); __pyx_t_2 = Py_None; } else { - __pyx_t_3 = __Pyx_PyBytes_FromCString(__pyx_v_c_ns_uri); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 288, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_FromCString(__pyx_v_c_ns_uri); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; @@ -178898,7 +166664,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__find_cached_function(struc * self._function_cache, None if c_ns_uri is NULL else c_ns_uri) * if c_dict is not NULL: */ - __Pyx_TraceLine(287,0,__PYX_ERR(17, 287, __pyx_L1_error)) __pyx_v_c_dict = PyDict_GetItem(__pyx_t_1, __pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -178910,7 +166675,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__find_cached_function(struc * dict_result = python.PyDict_GetItem( * c_dict, c_name) */ - __Pyx_TraceLine(289,0,__PYX_ERR(17, 289, __pyx_L1_error)) __pyx_t_4 = ((__pyx_v_c_dict != NULL) != 0); if (__pyx_t_4) { @@ -178921,8 +166685,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__find_cached_function(struc * if dict_result is not NULL: * return dict_result */ - __Pyx_TraceLine(291,0,__PYX_ERR(17, 291, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyBytes_FromCString(((unsigned char *)__pyx_v_c_name)); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 291, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromCString(((unsigned char *)__pyx_v_c_name)); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "src/lxml/extensions.pxi":290 @@ -178932,7 +166695,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__find_cached_function(struc * c_dict, c_name) * if dict_result is not NULL: */ - __Pyx_TraceLine(290,0,__PYX_ERR(17, 290, __pyx_L1_error)) __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_c_dict), __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -178943,7 +166705,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__find_cached_function(struc * return dict_result * return None */ - __Pyx_TraceLine(292,0,__PYX_ERR(17, 292, __pyx_L1_error)) __pyx_t_4 = ((__pyx_v_dict_result != NULL) != 0); if (__pyx_t_4) { @@ -178954,7 +166715,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__find_cached_function(struc * return None * */ - __Pyx_TraceLine(293,0,__PYX_ERR(17, 293, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_dict_result)); __pyx_r = ((PyObject *)__pyx_v_dict_result); @@ -178985,7 +166745,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__find_cached_function(struc * * # Python access to the XPath context for extension functions */ - __Pyx_TraceLine(294,0,__PYX_ERR(17, 294, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -179007,7 +166766,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__find_cached_function(struc __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -179036,7 +166794,6 @@ static PyObject *__pyx_pw_4lxml_5etree_12_BaseContext_12context_node_1__get__(Py static PyObject *__pyx_pf_4lxml_5etree_12_BaseContext_12context_node___get__(struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_v_self) { xmlNode *__pyx_v_c_node; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlNode *__pyx_t_2; @@ -179044,7 +166801,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_BaseContext_12context_node___get__(str PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[17], 299, 0, __PYX_ERR(17, 299, __pyx_L1_error)); /* "src/lxml/extensions.pxi":301 * def __get__(self): @@ -179053,7 +166809,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_BaseContext_12context_node___get__(str * raise XPathError, \ * u"XPath context is only usable during the evaluation" */ - __Pyx_TraceLine(301,0,__PYX_ERR(17, 301, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_xpathCtxt == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -179064,9 +166819,8 @@ static PyObject *__pyx_pf_4lxml_5etree_12_BaseContext_12context_node___get__(str * u"XPath context is only usable during the evaluation" * c_node = self._xpathCtxt.node */ - __Pyx_TraceLine(302,0,__PYX_ERR(17, 302, __pyx_L1_error)) __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_XPathError), __pyx_kp_u_XPath_context_is_only_usable_dur, 0, 0); - __PYX_ERR(17, 302, __pyx_L1_error) + __PYX_ERR(9, 302, __pyx_L1_error) /* "src/lxml/extensions.pxi":301 * def __get__(self): @@ -179084,7 +166838,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_BaseContext_12context_node___get__(str * if c_node is NULL: * raise XPathError, u"no context node" */ - __Pyx_TraceLine(304,0,__PYX_ERR(17, 304, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_xpathCtxt->node; __pyx_v_c_node = __pyx_t_2; @@ -179095,7 +166848,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_BaseContext_12context_node___get__(str * raise XPathError, u"no context node" * if c_node.doc != self._xpathCtxt.doc: */ - __Pyx_TraceLine(305,0,__PYX_ERR(17, 305, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -179106,9 +166858,8 @@ static PyObject *__pyx_pf_4lxml_5etree_12_BaseContext_12context_node___get__(str * if c_node.doc != self._xpathCtxt.doc: * raise XPathError, \ */ - __Pyx_TraceLine(306,0,__PYX_ERR(17, 306, __pyx_L1_error)) __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_XPathError), __pyx_kp_u_no_context_node, 0, 0); - __PYX_ERR(17, 306, __pyx_L1_error) + __PYX_ERR(9, 306, __pyx_L1_error) /* "src/lxml/extensions.pxi":305 * u"XPath context is only usable during the evaluation" @@ -179126,7 +166877,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_BaseContext_12context_node___get__(str * raise XPathError, \ * u"document-external context nodes are not supported" */ - __Pyx_TraceLine(307,0,__PYX_ERR(17, 307, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node->doc != __pyx_v_self->_xpathCtxt->doc) != 0); if (unlikely(__pyx_t_1)) { @@ -179137,9 +166887,8 @@ static PyObject *__pyx_pf_4lxml_5etree_12_BaseContext_12context_node___get__(str * u"document-external context nodes are not supported" * if self._doc is None: */ - __Pyx_TraceLine(308,0,__PYX_ERR(17, 308, __pyx_L1_error)) __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_XPathError), __pyx_kp_u_document_external_context_nodes, 0, 0); - __PYX_ERR(17, 308, __pyx_L1_error) + __PYX_ERR(9, 308, __pyx_L1_error) /* "src/lxml/extensions.pxi":307 * if c_node is NULL: @@ -179157,7 +166906,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_BaseContext_12context_node___get__(str * raise XPathError, u"document context is missing" * return _elementFactory(self._doc, c_node) */ - __Pyx_TraceLine(310,0,__PYX_ERR(17, 310, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_self->_doc) == Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_3)) { @@ -179169,9 +166917,8 @@ static PyObject *__pyx_pf_4lxml_5etree_12_BaseContext_12context_node___get__(str * return _elementFactory(self._doc, c_node) * */ - __Pyx_TraceLine(311,0,__PYX_ERR(17, 311, __pyx_L1_error)) __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_XPathError), __pyx_kp_u_document_context_is_missing, 0, 0); - __PYX_ERR(17, 311, __pyx_L1_error) + __PYX_ERR(9, 311, __pyx_L1_error) /* "src/lxml/extensions.pxi":310 * raise XPathError, \ @@ -179189,11 +166936,10 @@ static PyObject *__pyx_pf_4lxml_5etree_12_BaseContext_12context_node___get__(str * * property eval_context: */ - __Pyx_TraceLine(312,0,__PYX_ERR(17, 312, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_4 = ((PyObject *)__pyx_v_self->_doc); __Pyx_INCREF(__pyx_t_4); - __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_4), __pyx_v_c_node)); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 312, __pyx_L1_error) + __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_4), __pyx_v_c_node)); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; @@ -179216,7 +166962,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_BaseContext_12context_node___get__(str __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -179244,13 +166989,11 @@ static PyObject *__pyx_pw_4lxml_5etree_12_BaseContext_12eval_context_1__get__(Py static PyObject *__pyx_pf_4lxml_5etree_12_BaseContext_12eval_context___get__(struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[17], 315, 0, __PYX_ERR(17, 315, __pyx_L1_error)); /* "src/lxml/extensions.pxi":316 * property eval_context: @@ -179259,7 +167002,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_BaseContext_12eval_context___get__(str * self._eval_context_dict = {} * return self._eval_context_dict */ - __Pyx_TraceLine(316,0,__PYX_ERR(17, 316, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_eval_context_dict == ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -179271,8 +167013,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_BaseContext_12eval_context___get__(str * return self._eval_context_dict * */ - __Pyx_TraceLine(317,0,__PYX_ERR(17, 317, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 317, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_eval_context_dict); @@ -179296,7 +167037,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_BaseContext_12eval_context___get__(str * * # Python reference keeping during XPath function evaluation */ - __Pyx_TraceLine(318,0,__PYX_ERR(17, 318, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_eval_context_dict); __pyx_r = __pyx_v_self->_eval_context_dict; @@ -179317,7 +167057,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_BaseContext_12eval_context___get__(str __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -179332,12 +167071,10 @@ static PyObject *__pyx_pf_4lxml_5etree_12_BaseContext_12eval_context___get__(str static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__release_temp_refs(struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_release_temp_refs", 0); - __Pyx_TraceCall("_release_temp_refs", __pyx_f[17], 323, 0, __PYX_ERR(17, 323, __pyx_L1_error)); /* "src/lxml/extensions.pxi":325 * cdef _release_temp_refs(self): @@ -179346,8 +167083,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__release_temp_refs(struct _ * self._temp_documents.clear() * */ - __Pyx_TraceLine(325,0,__PYX_ERR(17, 325, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_10_TempStore_clear(__pyx_v_self->_temp_refs); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(17, 325, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_10_TempStore_clear(__pyx_v_self->_temp_refs); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(9, 325, __pyx_L1_error) /* "src/lxml/extensions.pxi":326 * u"Free temporarily referenced objects from this context." @@ -179356,12 +167092,11 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__release_temp_refs(struct _ * * @cython.final */ - __Pyx_TraceLine(326,0,__PYX_ERR(17, 326, __pyx_L1_error)) if (unlikely(__pyx_v_self->_temp_documents == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "clear"); - __PYX_ERR(17, 326, __pyx_L1_error) + __PYX_ERR(9, 326, __pyx_L1_error) } - __pyx_t_2 = PySet_Clear(__pyx_v_self->_temp_documents); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(17, 326, __pyx_L1_error) + __pyx_t_2 = PySet_Clear(__pyx_v_self->_temp_documents); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(9, 326, __pyx_L1_error) /* "src/lxml/extensions.pxi":323 * @@ -179379,7 +167114,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__release_temp_refs(struct _ __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -179395,7 +167129,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__release_temp_refs(struct _ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__hold(struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_v_self, PyObject *__pyx_v_obj) { PyObject *__pyx_v_o = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -179406,7 +167139,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__hold(struct __pyx_obj_4lxm PyObject *(*__pyx_t_7)(PyObject *); PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("_hold", 0); - __Pyx_TraceCall("_hold", __pyx_f[17], 329, 0, __PYX_ERR(17, 329, __pyx_L1_error)); /* "src/lxml/extensions.pxi":337 * """ @@ -179415,7 +167147,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__hold(struct __pyx_obj_4lxm * self._temp_refs.add(obj) * self._temp_documents.add((<_Element>obj)._doc) */ - __Pyx_TraceLine(337,0,__PYX_ERR(17, 337, __pyx_L1_error)) __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_ptype_4lxml_5etree__Element); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -179427,8 +167158,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__hold(struct __pyx_obj_4lxm * self._temp_documents.add((<_Element>obj)._doc) * return */ - __Pyx_TraceLine(338,0,__PYX_ERR(17, 338, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree_10_TempStore_add(__pyx_v_self->_temp_refs, __pyx_v_obj); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(17, 338, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_10_TempStore_add(__pyx_v_self->_temp_refs, __pyx_v_obj); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(9, 338, __pyx_L1_error) /* "src/lxml/extensions.pxi":339 * if isinstance(obj, _Element): @@ -179437,14 +167167,13 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__hold(struct __pyx_obj_4lxm * return * elif _isString(obj) or not python.PySequence_Check(obj): */ - __Pyx_TraceLine(339,0,__PYX_ERR(17, 339, __pyx_L1_error)) if (unlikely(__pyx_v_self->_temp_documents == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add"); - __PYX_ERR(17, 339, __pyx_L1_error) + __PYX_ERR(9, 339, __pyx_L1_error) } __pyx_t_4 = ((PyObject *)((struct LxmlElement *)__pyx_v_obj)->_doc); __Pyx_INCREF(__pyx_t_4); - __pyx_t_5 = PySet_Add(__pyx_v_self->_temp_documents, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(17, 339, __pyx_L1_error) + __pyx_t_5 = PySet_Add(__pyx_v_self->_temp_documents, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(9, 339, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "src/lxml/extensions.pxi":340 @@ -179454,7 +167183,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__hold(struct __pyx_obj_4lxm * elif _isString(obj) or not python.PySequence_Check(obj): * return */ - __Pyx_TraceLine(340,0,__PYX_ERR(17, 340, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -179475,7 +167203,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__hold(struct __pyx_obj_4lxm * return * for o in obj: */ - __Pyx_TraceLine(341,0,__PYX_ERR(17, 341, __pyx_L1_error)) __pyx_t_1 = (_isString(__pyx_v_obj) != 0); if (!__pyx_t_1) { } else { @@ -179494,7 +167221,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__hold(struct __pyx_obj_4lxm * for o in obj: * if isinstance(o, _Element): */ - __Pyx_TraceLine(342,0,__PYX_ERR(17, 342, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -179515,31 +167241,30 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__hold(struct __pyx_obj_4lxm * if isinstance(o, _Element): * #print "Holding element:", element._c_node */ - __Pyx_TraceLine(343,0,__PYX_ERR(17, 343, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_v_obj)) || PyTuple_CheckExact(__pyx_v_obj)) { __pyx_t_4 = __pyx_v_obj; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 343, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 343, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 343, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(17, 343, __pyx_L1_error) + __pyx_t_8 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(9, 343, __pyx_L1_error) #else - __pyx_t_8 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 343, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(9, 343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(17, 343, __pyx_L1_error) + __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(9, 343, __pyx_L1_error) #else - __pyx_t_8 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 343, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(9, 343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } @@ -179549,7 +167274,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__hold(struct __pyx_obj_4lxm PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(17, 343, __pyx_L1_error) + else __PYX_ERR(9, 343, __pyx_L1_error) } break; } @@ -179565,7 +167290,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__hold(struct __pyx_obj_4lxm * #print "Holding element:", element._c_node * self._temp_refs.add(o) */ - __Pyx_TraceLine(344,0,__PYX_ERR(17, 344, __pyx_L1_error)) __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_o, __pyx_ptype_4lxml_5etree__Element); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -179577,8 +167301,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__hold(struct __pyx_obj_4lxm * #print "Holding document:", element._doc._c_doc * self._temp_documents.add((<_Element>o)._doc) */ - __Pyx_TraceLine(346,0,__PYX_ERR(17, 346, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree_10_TempStore_add(__pyx_v_self->_temp_refs, __pyx_v_o); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(17, 346, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_10_TempStore_add(__pyx_v_self->_temp_refs, __pyx_v_o); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(9, 346, __pyx_L1_error) /* "src/lxml/extensions.pxi":348 * self._temp_refs.add(o) @@ -179587,14 +167310,13 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__hold(struct __pyx_obj_4lxm * * @cython.final */ - __Pyx_TraceLine(348,0,__PYX_ERR(17, 348, __pyx_L1_error)) if (unlikely(__pyx_v_self->_temp_documents == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add"); - __PYX_ERR(17, 348, __pyx_L1_error) + __PYX_ERR(9, 348, __pyx_L1_error) } __pyx_t_8 = ((PyObject *)((struct LxmlElement *)__pyx_v_o)->_doc); __Pyx_INCREF(__pyx_t_8); - __pyx_t_5 = PySet_Add(__pyx_v_self->_temp_documents, __pyx_t_8); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(17, 348, __pyx_L1_error) + __pyx_t_5 = PySet_Add(__pyx_v_self->_temp_documents, __pyx_t_8); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(9, 348, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "src/lxml/extensions.pxi":344 @@ -179613,7 +167335,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__hold(struct __pyx_obj_4lxm * if isinstance(o, _Element): * #print "Holding element:", element._c_node */ - __Pyx_TraceLine(343,0,__PYX_ERR(17, 343, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -179636,7 +167357,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__hold(struct __pyx_obj_4lxm __pyx_L0:; __Pyx_XDECREF(__pyx_v_o); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -179652,7 +167372,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__hold(struct __pyx_obj_4lxm static struct LxmlDocument *__pyx_f_4lxml_5etree_12_BaseContext__findDocumentForNode(struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_v_self, xmlNode *__pyx_v_c_node) { struct LxmlDocument *__pyx_v_doc = 0; struct LxmlDocument *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; @@ -179664,7 +167383,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree_12_BaseContext__findDocumentFor int __pyx_t_8; int __pyx_t_9; __Pyx_RefNannySetupContext("_findDocumentForNode", 0); - __Pyx_TraceCall("_findDocumentForNode", __pyx_f[17], 351, 0, __PYX_ERR(17, 351, __pyx_L1_error)); /* "src/lxml/extensions.pxi":358 * """ @@ -179673,9 +167391,8 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree_12_BaseContext__findDocumentFor * if doc is not None and doc._c_doc is c_node.doc: * return doc */ - __Pyx_TraceLine(358,0,__PYX_ERR(17, 358, __pyx_L1_error)) __pyx_t_2 = 0; - __pyx_t_5 = __Pyx_set_iterator(__pyx_v_self->_temp_documents, 1, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 358, __pyx_L1_error) + __pyx_t_5 = __Pyx_set_iterator(__pyx_v_self->_temp_documents, 1, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_5; @@ -179683,9 +167400,9 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree_12_BaseContext__findDocumentFor while (1) { __pyx_t_6 = __Pyx_set_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, __pyx_t_4); if (unlikely(__pyx_t_6 == 0)) break; - if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(17, 358, __pyx_L1_error) + if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(9, 358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_5etree__Document))))) __PYX_ERR(17, 358, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_5etree__Document))))) __PYX_ERR(9, 358, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_doc, ((struct LxmlDocument *)__pyx_t_5)); __pyx_t_5 = 0; @@ -179696,7 +167413,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree_12_BaseContext__findDocumentFor * return doc * return None */ - __Pyx_TraceLine(359,0,__PYX_ERR(17, 359, __pyx_L1_error)) __pyx_t_8 = (((PyObject *)__pyx_v_doc) != Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { @@ -179716,7 +167432,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree_12_BaseContext__findDocumentFor * return None * */ - __Pyx_TraceLine(360,0,__PYX_ERR(17, 360, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_doc)); __pyx_r = __pyx_v_doc; @@ -179741,7 +167456,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree_12_BaseContext__findDocumentFor * * */ - __Pyx_TraceLine(361,0,__PYX_ERR(17, 361, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_r = ((struct LxmlDocument *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -179763,7 +167477,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree_12_BaseContext__findDocumentFor __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -179779,7 +167492,6 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree_12_BaseContext__findDocumentFor static void __pyx_f_4lxml_5etree__forwardXPathError(void *__pyx_v_c_ctxt, xmlError *__pyx_v_c_error) { xmlError __pyx_v_error; int __pyx_v_xpath_code; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; char *__pyx_t_2; @@ -179792,7 +167504,6 @@ static void __pyx_f_4lxml_5etree__forwardXPathError(void *__pyx_v_c_ctxt, xmlErr PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_forwardXPathError", 0); - __Pyx_TraceCall("_forwardXPathError", __pyx_f[17], 396, 0, __PYX_ERR(17, 396, __pyx_L1_error)); /* "src/lxml/extensions.pxi":399 * cdef xmlerror.xmlError error @@ -179801,7 +167512,6 @@ static void __pyx_f_4lxml_5etree__forwardXPathError(void *__pyx_v_c_ctxt, xmlErr * error.message = c_error.message * else: */ - __Pyx_TraceLine(399,0,__PYX_ERR(17, 399, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_error->message != NULL) != 0); if (__pyx_t_1) { @@ -179812,7 +167522,6 @@ static void __pyx_f_4lxml_5etree__forwardXPathError(void *__pyx_v_c_ctxt, xmlErr * else: * xpath_code = c_error.code - xmlerror.XML_XPATH_EXPRESSION_OK */ - __Pyx_TraceLine(400,0,__PYX_ERR(17, 400, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_error->message; __pyx_v_error.message = __pyx_t_2; @@ -179833,7 +167542,6 @@ static void __pyx_f_4lxml_5etree__forwardXPathError(void *__pyx_v_c_ctxt, xmlErr * if 0 <= xpath_code < len(LIBXML2_XPATH_ERROR_MESSAGES): * error.message = _cstr(LIBXML2_XPATH_ERROR_MESSAGES[xpath_code]) */ - __Pyx_TraceLine(402,0,__PYX_ERR(17, 402, __pyx_L1_error)) /*else*/ { __pyx_v_xpath_code = (__pyx_v_c_error->code - XML_XPATH_EXPRESSION_OK); @@ -179844,16 +167552,15 @@ static void __pyx_f_4lxml_5etree__forwardXPathError(void *__pyx_v_c_ctxt, xmlErr * error.message = _cstr(LIBXML2_XPATH_ERROR_MESSAGES[xpath_code]) * else: */ - __Pyx_TraceLine(403,0,__PYX_ERR(17, 403, __pyx_L1_error)) __pyx_t_1 = (0 <= __pyx_v_xpath_code); if (__pyx_t_1) { __pyx_t_3 = __pyx_v_4lxml_5etree_LIBXML2_XPATH_ERROR_MESSAGES; __Pyx_INCREF(__pyx_t_3); if (unlikely(__pyx_t_3 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(17, 403, __pyx_L1_error) + __PYX_ERR(9, 403, __pyx_L1_error) } - __pyx_t_4 = PyTuple_GET_SIZE(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(17, 403, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_SIZE(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(9, 403, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__pyx_v_xpath_code < __pyx_t_4); } @@ -179867,12 +167574,11 @@ static void __pyx_f_4lxml_5etree__forwardXPathError(void *__pyx_v_c_ctxt, xmlErr * else: * error.message = b"unknown error" */ - __Pyx_TraceLine(404,0,__PYX_ERR(17, 404, __pyx_L1_error)) if (unlikely(__pyx_v_4lxml_5etree_LIBXML2_XPATH_ERROR_MESSAGES == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(17, 404, __pyx_L1_error) + __PYX_ERR(9, 404, __pyx_L1_error) } - __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_4lxml_5etree_LIBXML2_XPATH_ERROR_MESSAGES, __pyx_v_xpath_code, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 404, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_4lxml_5etree_LIBXML2_XPATH_ERROR_MESSAGES, __pyx_v_xpath_code, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_error.message = PyBytes_AS_STRING(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -179894,7 +167600,6 @@ static void __pyx_f_4lxml_5etree__forwardXPathError(void *__pyx_v_c_ctxt, xmlErr * error.domain = c_error.domain * error.code = c_error.code */ - __Pyx_TraceLine(406,0,__PYX_ERR(17, 406, __pyx_L1_error)) /*else*/ { __pyx_v_error.message = ((char *)"unknown error"); } @@ -179909,7 +167614,6 @@ static void __pyx_f_4lxml_5etree__forwardXPathError(void *__pyx_v_c_ctxt, xmlErr * error.code = c_error.code * error.level = c_error.level */ - __Pyx_TraceLine(407,0,__PYX_ERR(17, 407, __pyx_L1_error)) __pyx_t_6 = __pyx_v_c_error->domain; __pyx_v_error.domain = __pyx_t_6; @@ -179920,7 +167624,6 @@ static void __pyx_f_4lxml_5etree__forwardXPathError(void *__pyx_v_c_ctxt, xmlErr * error.level = c_error.level * error.line = c_error.line */ - __Pyx_TraceLine(408,0,__PYX_ERR(17, 408, __pyx_L1_error)) __pyx_t_6 = __pyx_v_c_error->code; __pyx_v_error.code = __pyx_t_6; @@ -179931,7 +167634,6 @@ static void __pyx_f_4lxml_5etree__forwardXPathError(void *__pyx_v_c_ctxt, xmlErr * error.line = c_error.line * error.int2 = c_error.int1 # column */ - __Pyx_TraceLine(409,0,__PYX_ERR(17, 409, __pyx_L1_error)) __pyx_t_7 = __pyx_v_c_error->level; __pyx_v_error.level = __pyx_t_7; @@ -179942,7 +167644,6 @@ static void __pyx_f_4lxml_5etree__forwardXPathError(void *__pyx_v_c_ctxt, xmlErr * error.int2 = c_error.int1 # column * error.file = c_error.file */ - __Pyx_TraceLine(410,0,__PYX_ERR(17, 410, __pyx_L1_error)) __pyx_t_6 = __pyx_v_c_error->line; __pyx_v_error.line = __pyx_t_6; @@ -179953,7 +167654,6 @@ static void __pyx_f_4lxml_5etree__forwardXPathError(void *__pyx_v_c_ctxt, xmlErr * error.file = c_error.file * error.node = NULL */ - __Pyx_TraceLine(411,0,__PYX_ERR(17, 411, __pyx_L1_error)) __pyx_t_6 = __pyx_v_c_error->int1; __pyx_v_error.int2 = __pyx_t_6; @@ -179964,7 +167664,6 @@ static void __pyx_f_4lxml_5etree__forwardXPathError(void *__pyx_v_c_ctxt, xmlErr * error.node = NULL * */ - __Pyx_TraceLine(412,0,__PYX_ERR(17, 412, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_error->file; __pyx_v_error.file = __pyx_t_2; @@ -179975,7 +167674,6 @@ static void __pyx_f_4lxml_5etree__forwardXPathError(void *__pyx_v_c_ctxt, xmlErr * * (<_BaseContext>c_ctxt)._error_log._receive(&error) */ - __Pyx_TraceLine(413,0,__PYX_ERR(17, 413, __pyx_L1_error)) __pyx_v_error.node = NULL; /* "src/lxml/extensions.pxi":415 @@ -179985,7 +167683,6 @@ static void __pyx_f_4lxml_5etree__forwardXPathError(void *__pyx_v_c_ctxt, xmlErr * * cdef void _receiveXPathError(void* c_context, xmlerror.xmlError* error) nogil: */ - __Pyx_TraceLine(415,0,__PYX_ERR(17, 415, __pyx_L1_error)) __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_c_ctxt)->_error_log), (&__pyx_v_error)); /* "src/lxml/extensions.pxi":396 @@ -180002,7 +167699,6 @@ static void __pyx_f_4lxml_5etree__forwardXPathError(void *__pyx_v_c_ctxt, xmlErr __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("lxml.etree._forwardXPathError", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); @@ -180018,9 +167714,7 @@ static void __pyx_f_4lxml_5etree__forwardXPathError(void *__pyx_v_c_ctxt, xmlErr */ static void __pyx_f_4lxml_5etree__receiveXPathError(void *__pyx_v_c_context, xmlError *__pyx_v_error) { - __Pyx_TraceDeclarations int __pyx_t_1; - __Pyx_TraceCall("_receiveXPathError", __pyx_f[17], 417, 1, __PYX_ERR(17, 417, __pyx_L1_error)); /* "src/lxml/extensions.pxi":420 * if not __DEBUG: @@ -180029,7 +167723,6 @@ static void __pyx_f_4lxml_5etree__receiveXPathError(void *__pyx_v_c_context, xml * _forwardError(NULL, error) * else: */ - __Pyx_TraceLine(420,1,__PYX_ERR(17, 420, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_context == NULL) != 0); if (__pyx_t_1) { @@ -180040,7 +167733,6 @@ static void __pyx_f_4lxml_5etree__receiveXPathError(void *__pyx_v_c_context, xml * else: * _forwardXPathError(c_context, error) */ - __Pyx_TraceLine(421,1,__PYX_ERR(17, 421, __pyx_L1_error)) __pyx_f_4lxml_5etree__forwardError(NULL, __pyx_v_error); /* "src/lxml/extensions.pxi":420 @@ -180060,7 +167752,6 @@ static void __pyx_f_4lxml_5etree__receiveXPathError(void *__pyx_v_c_context, xml * * */ - __Pyx_TraceLine(423,1,__PYX_ERR(17, 423, __pyx_L1_error)) /*else*/ { __pyx_f_4lxml_5etree__forwardXPathError(__pyx_v_c_context, __pyx_v_error); } @@ -180075,11 +167766,6 @@ static void __pyx_f_4lxml_5etree__receiveXPathError(void *__pyx_v_c_context, xml */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._receiveXPathError", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); } /* "src/lxml/extensions.pxi":426 @@ -180093,7 +167779,7 @@ static void __pyx_f_4lxml_5etree__receiveXPathError(void *__pyx_v_c_context, xml /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_63Extension(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_62Extension[] = "Extension(module, function_mapping=None, ns=None)\n\n Build a dictionary of extension functions from the functions\n defined in a module or the methods of an object.\n\n As second argument, you can pass an additional mapping of\n attribute names to XPath function names, or a list of function\n names that should be taken.\n\n The ``ns`` keyword argument accepts a namespace URI for the XPath\n functions.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_63Extension = {"Extension", (PyCFunction)__pyx_pw_4lxml_5etree_63Extension, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_62Extension}; +static PyMethodDef __pyx_mdef_4lxml_5etree_63Extension = {"Extension", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_63Extension, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_62Extension}; static PyObject *__pyx_pw_4lxml_5etree_63Extension(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_module = 0; PyObject *__pyx_v_function_mapping = 0; @@ -180135,7 +167821,7 @@ static PyObject *__pyx_pw_4lxml_5etree_63Extension(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, "Extension") < 0)) __PYX_ERR(17, 426, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Extension") < 0)) __PYX_ERR(9, 426, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -180152,7 +167838,7 @@ static PyObject *__pyx_pw_4lxml_5etree_63Extension(PyObject *__pyx_self, PyObjec } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("Extension", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 426, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("Extension", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(9, 426, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.Extension", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -180171,7 +167857,6 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx PyObject *__pyx_v_xpath_name = NULL; PyObject *__pyx_v_name = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -180183,9 +167868,7 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *(*__pyx_t_10)(PyObject *); - __Pyx_TraceFrameInit(__pyx_codeobj__332) __Pyx_RefNannySetupContext("Extension", 0); - __Pyx_TraceCall("Extension", __pyx_f[17], 426, 0, __PYX_ERR(17, 426, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_function_mapping); /* "src/lxml/extensions.pxi":439 @@ -180195,8 +167878,7 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx * if isinstance(function_mapping, dict): * for function_name, xpath_name in function_mapping.items(): */ - __Pyx_TraceLine(439,0,__PYX_ERR(17, 439, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 439, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_functions = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; @@ -180208,7 +167890,6 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx * for function_name, xpath_name in function_mapping.items(): * functions[(ns, xpath_name)] = getattr(module, function_name) */ - __Pyx_TraceLine(440,0,__PYX_ERR(17, 440, __pyx_L1_error)) __pyx_t_2 = PyDict_Check(__pyx_v_function_mapping); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -180220,8 +167901,7 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx * functions[(ns, xpath_name)] = getattr(module, function_name) * else: */ - __Pyx_TraceLine(441,0,__PYX_ERR(17, 441, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_function_mapping, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 441, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_function_mapping, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -180233,21 +167913,18 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 441, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 441, __pyx_L1_error) - } + __pyx_t_1 = (__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_1)) __PYX_ERR(9, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 441, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 441, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 441, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -180255,17 +167932,17 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(17, 441, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(9, 441, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 441, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(17, 441, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(9, 441, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 441, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -180275,7 +167952,7 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(17, 441, __pyx_L1_error) + else __PYX_ERR(9, 441, __pyx_L1_error) } break; } @@ -180287,7 +167964,7 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(17, 441, __pyx_L1_error) + __PYX_ERR(9, 441, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -180300,15 +167977,15 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_8); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 441, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 441, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(9, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 441, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(9, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; @@ -180316,7 +167993,7 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(17, 441, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(9, 441, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L7_unpacking_done; @@ -180324,7 +168001,7 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(17, 441, __pyx_L1_error) + __PYX_ERR(9, 441, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_function_name, __pyx_t_5); @@ -180339,10 +168016,9 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx * else: * if function_mapping is None: */ - __Pyx_TraceLine(442,0,__PYX_ERR(17, 442, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetAttr(__pyx_v_module, __pyx_v_function_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 442, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetAttr(__pyx_v_module, __pyx_v_function_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 442, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(9, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_ns); __Pyx_GIVEREF(__pyx_v_ns); @@ -180350,7 +168026,7 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx __Pyx_INCREF(__pyx_v_xpath_name); __Pyx_GIVEREF(__pyx_v_xpath_name); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_xpath_name); - if (unlikely(PyDict_SetItem(__pyx_v_functions, __pyx_t_8, __pyx_t_1) < 0)) __PYX_ERR(17, 442, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_functions, __pyx_t_8, __pyx_t_1) < 0)) __PYX_ERR(9, 442, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -180361,7 +168037,6 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx * functions[(ns, xpath_name)] = getattr(module, function_name) * else: */ - __Pyx_TraceLine(441,0,__PYX_ERR(17, 441, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -180382,7 +168057,6 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx * function_mapping = [ name for name in dir(module) * if not name.startswith(u'_') ] */ - __Pyx_TraceLine(444,0,__PYX_ERR(17, 444, __pyx_L1_error)) /*else*/ { __pyx_t_3 = (__pyx_v_function_mapping == Py_None); __pyx_t_2 = (__pyx_t_3 != 0); @@ -180395,18 +168069,17 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx * if not name.startswith(u'_') ] * for function_name in function_mapping: */ - __Pyx_TraceLine(445,0,__PYX_ERR(17, 445, __pyx_L1_error)) - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 445, __pyx_L1_error) + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyObject_Dir(__pyx_v_module); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 445, __pyx_L1_error) + __pyx_t_1 = PyObject_Dir(__pyx_v_module); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_8 = __pyx_t_1; __Pyx_INCREF(__pyx_t_8); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 445, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(9, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 445, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 445, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -180414,17 +168087,17 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx if (likely(PyList_CheckExact(__pyx_t_8))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_8)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(17, 445, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(9, 445, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 445, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_8)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(17, 445, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(9, 445, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 445, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -180434,7 +168107,7 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(17, 445, __pyx_L1_error) + else __PYX_ERR(9, 445, __pyx_L1_error) } break; } @@ -180450,14 +168123,25 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx * for function_name in function_mapping: * functions[(ns, function_name)] = getattr(module, function_name) */ - __Pyx_TraceLine(446,0,__PYX_ERR(17, 446, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 446, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__333, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 446, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_startswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(17, 446, __pyx_L1_error) + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_n_u__51) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_u__51); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 446, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(9, 446, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = ((!__pyx_t_2) != 0); if (__pyx_t_3) { @@ -180468,8 +168152,7 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx * if not name.startswith(u'_') ] * for function_name in function_mapping: */ - __Pyx_TraceLine(445,0,__PYX_ERR(17, 445, __pyx_L1_error)) - if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_v_name))) __PYX_ERR(17, 445, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_v_name))) __PYX_ERR(9, 445, __pyx_L1_error) /* "src/lxml/extensions.pxi":446 * if function_mapping is None: @@ -180487,7 +168170,6 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx * if not name.startswith(u'_') ] * for function_name in function_mapping: */ - __Pyx_TraceLine(445,0,__PYX_ERR(17, 445, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_function_mapping, __pyx_t_4); @@ -180509,31 +168191,30 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx * functions[(ns, function_name)] = getattr(module, function_name) * return functions */ - __Pyx_TraceLine(447,0,__PYX_ERR(17, 447, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_v_function_mapping)) || PyTuple_CheckExact(__pyx_v_function_mapping)) { __pyx_t_4 = __pyx_v_function_mapping; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_function_mapping); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 447, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_function_mapping); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 447, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 447, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(17, 447, __pyx_L1_error) + __pyx_t_8 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(9, 447, __pyx_L1_error) #else - __pyx_t_8 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 447, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(9, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(17, 447, __pyx_L1_error) + __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(9, 447, __pyx_L1_error) #else - __pyx_t_8 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 447, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(9, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } @@ -180543,7 +168224,7 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(17, 447, __pyx_L1_error) + else __PYX_ERR(9, 447, __pyx_L1_error) } break; } @@ -180559,19 +168240,18 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx * return functions * */ - __Pyx_TraceLine(448,0,__PYX_ERR(17, 448, __pyx_L1_error)) - __pyx_t_8 = __Pyx_GetAttr(__pyx_v_module, __pyx_v_function_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 448, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetAttr(__pyx_v_module, __pyx_v_function_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(9, 448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 448, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 448, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_ns); __Pyx_GIVEREF(__pyx_v_ns); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_ns); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_ns); __Pyx_INCREF(__pyx_v_function_name); __Pyx_GIVEREF(__pyx_v_function_name); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_function_name); - if (unlikely(PyDict_SetItem(__pyx_v_functions, __pyx_t_5, __pyx_t_8) < 0)) __PYX_ERR(17, 448, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_function_name); + if (unlikely(PyDict_SetItem(__pyx_v_functions, __pyx_t_1, __pyx_t_8) < 0)) __PYX_ERR(9, 448, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "src/lxml/extensions.pxi":447 @@ -180581,7 +168261,6 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx * functions[(ns, function_name)] = getattr(module, function_name) * return functions */ - __Pyx_TraceLine(447,0,__PYX_ERR(17, 447, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -180594,7 +168273,6 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx * * ################################################################################ */ - __Pyx_TraceLine(449,0,__PYX_ERR(17, 449, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_functions); __pyx_r = __pyx_v_functions; @@ -180624,7 +168302,6 @@ static PyObject *__pyx_pf_4lxml_5etree_62Extension(CYTHON_UNUSED PyObject *__pyx __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_function_mapping); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -180655,11 +168332,9 @@ static int __pyx_pw_4lxml_5etree_12_ExsltRegExp_1__cinit__(PyObject *__pyx_v_sel static int __pyx_pf_4lxml_5etree_12_ExsltRegExp___cinit__(struct __pyx_obj_4lxml_5etree__ExsltRegExp *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[17], 458, 0, __PYX_ERR(17, 458, __pyx_L1_error)); /* "src/lxml/extensions.pxi":459 * cdef dict _compile_map @@ -180668,8 +168343,7 @@ static int __pyx_pf_4lxml_5etree_12_ExsltRegExp___cinit__(struct __pyx_obj_4lxml * * cdef _make_string(self, value): */ - __Pyx_TraceLine(459,0,__PYX_ERR(17, 459, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 459, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_compile_map); @@ -180693,7 +168367,6 @@ static int __pyx_pf_4lxml_5etree_12_ExsltRegExp___cinit__(struct __pyx_obj_4lxml __Pyx_AddTraceback("lxml.etree._ExsltRegExp.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -180710,7 +168383,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(CYTHON_UNUSED PyObject *__pyx_v_firstnode = NULL; xmlChar *__pyx_v_c_text; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -180725,7 +168397,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(CYTHON_UNUSED PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; __Pyx_RefNannySetupContext("_make_string", 0); - __Pyx_TraceCall("_make_string", __pyx_f[17], 461, 0, __PYX_ERR(17, 461, __pyx_L1_error)); /* "src/lxml/extensions.pxi":462 * @@ -180734,7 +168405,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(CYTHON_UNUSED * return value * elif isinstance(value, list): */ - __Pyx_TraceLine(462,0,__PYX_ERR(17, 462, __pyx_L1_error)) __pyx_t_1 = (_isString(__pyx_v_value) != 0); if (__pyx_t_1) { @@ -180745,7 +168415,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(CYTHON_UNUSED * elif isinstance(value, list): * # node set: take recursive text concatenation of first element */ - __Pyx_TraceLine(463,0,__PYX_ERR(17, 463, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_value); __pyx_r = __pyx_v_value; @@ -180767,7 +168436,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(CYTHON_UNUSED * # node set: take recursive text concatenation of first element * if python.PyList_GET_SIZE(value) == 0: */ - __Pyx_TraceLine(464,0,__PYX_ERR(17, 464, __pyx_L1_error)) __pyx_t_1 = PyList_Check(__pyx_v_value); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -180779,7 +168447,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(CYTHON_UNUSED * return u'' * firstnode = value[0] */ - __Pyx_TraceLine(466,0,__PYX_ERR(17, 466, __pyx_L1_error)) __pyx_t_2 = ((PyList_GET_SIZE(__pyx_v_value) == 0) != 0); if (__pyx_t_2) { @@ -180790,10 +168457,9 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(CYTHON_UNUSED * firstnode = value[0] * if _isString(firstnode): */ - __Pyx_TraceLine(467,0,__PYX_ERR(17, 467, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_kp_u__23); - __pyx_r = __pyx_kp_u__23; + __Pyx_INCREF(__pyx_kp_u__11); + __pyx_r = __pyx_kp_u__11; goto __pyx_L0; /* "src/lxml/extensions.pxi":466 @@ -180812,8 +168478,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(CYTHON_UNUSED * if _isString(firstnode): * return firstnode */ - __Pyx_TraceLine(468,0,__PYX_ERR(17, 468, __pyx_L1_error)) - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 468, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_firstnode = __pyx_t_3; __pyx_t_3 = 0; @@ -180825,7 +168490,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(CYTHON_UNUSED * return firstnode * elif isinstance(firstnode, _Element): */ - __Pyx_TraceLine(469,0,__PYX_ERR(17, 469, __pyx_L1_error)) __pyx_t_2 = (_isString(__pyx_v_firstnode) != 0); if (__pyx_t_2) { @@ -180836,7 +168500,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(CYTHON_UNUSED * elif isinstance(firstnode, _Element): * c_text = tree.xmlNodeGetContent((<_Element>firstnode)._c_node) */ - __Pyx_TraceLine(470,0,__PYX_ERR(17, 470, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_firstnode); __pyx_r = __pyx_v_firstnode; @@ -180858,7 +168521,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(CYTHON_UNUSED * c_text = tree.xmlNodeGetContent((<_Element>firstnode)._c_node) * if c_text is NULL: */ - __Pyx_TraceLine(471,0,__PYX_ERR(17, 471, __pyx_L1_error)) __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_firstnode, __pyx_ptype_4lxml_5etree__Element); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -180870,7 +168532,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(CYTHON_UNUSED * if c_text is NULL: * raise MemoryError() */ - __Pyx_TraceLine(472,0,__PYX_ERR(17, 472, __pyx_L1_error)) __pyx_v_c_text = xmlNodeGetContent(((struct LxmlElement *)__pyx_v_firstnode)->_c_node); /* "src/lxml/extensions.pxi":473 @@ -180880,7 +168541,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(CYTHON_UNUSED * raise MemoryError() * try: */ - __Pyx_TraceLine(473,0,__PYX_ERR(17, 473, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_text == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -180891,8 +168551,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(CYTHON_UNUSED * try: * return funicode(c_text) */ - __Pyx_TraceLine(474,0,__PYX_ERR(17, 474, __pyx_L1_error)) - PyErr_NoMemory(); __PYX_ERR(17, 474, __pyx_L1_error) + PyErr_NoMemory(); __PYX_ERR(9, 474, __pyx_L1_error) /* "src/lxml/extensions.pxi":473 * elif isinstance(firstnode, _Element): @@ -180910,7 +168569,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(CYTHON_UNUSED * return funicode(c_text) * finally: */ - __Pyx_TraceLine(475,0,__PYX_ERR(17, 475, __pyx_L8_error)) /*try:*/ { /* "src/lxml/extensions.pxi":476 @@ -180920,9 +168578,8 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(CYTHON_UNUSED * finally: * tree.xmlFree(c_text) */ - __Pyx_TraceLine(476,0,__PYX_ERR(17, 476, __pyx_L8_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 476, __pyx_L8_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 476, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -180936,7 +168593,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(CYTHON_UNUSED * else: * return unicode(firstnode) */ - __Pyx_TraceLine(478,0,__PYX_ERR(17, 478, __pyx_L1_error)) /*finally:*/ { __pyx_L8_error:; /*exception exit:*/{ @@ -180996,10 +168652,9 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(CYTHON_UNUSED * else: * return unicode(value) */ - __Pyx_TraceLine(480,0,__PYX_ERR(17, 480, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_v_firstnode); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 480, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_v_firstnode); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -181022,10 +168677,9 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(CYTHON_UNUSED * * cdef _compile(self, rexp, ignore_case): */ - __Pyx_TraceLine(482,0,__PYX_ERR(17, 482, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 482, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -181048,7 +168702,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(CYTHON_UNUSED __pyx_L0:; __Pyx_XDECREF(__pyx_v_firstnode); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -181067,7 +168720,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__compile(struct __pyx_obj_4 PyObject *__pyx_v_py_flags = NULL; PyObject *__pyx_v_rexp_compiled = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -181076,7 +168728,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__compile(struct __pyx_obj_4 int __pyx_t_5; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("_compile", 0); - __Pyx_TraceCall("_compile", __pyx_f[17], 484, 0, __PYX_ERR(17, 484, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_rexp); /* "src/lxml/extensions.pxi":486 @@ -181086,8 +168737,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__compile(struct __pyx_obj_4 * key = (rexp, ignore_case) * c_result = python.PyDict_GetItem(self._compile_map, key) */ - __Pyx_TraceLine(486,0,__PYX_ERR(17, 486, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(__pyx_v_self, __pyx_v_rexp); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 486, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(__pyx_v_self, __pyx_v_rexp); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_rexp, __pyx_t_1); __pyx_t_1 = 0; @@ -181099,8 +168749,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__compile(struct __pyx_obj_4 * c_result = python.PyDict_GetItem(self._compile_map, key) * if c_result is not NULL: */ - __Pyx_TraceLine(487,0,__PYX_ERR(17, 487, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 487, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_rexp); __Pyx_GIVEREF(__pyx_v_rexp); @@ -181118,7 +168767,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__compile(struct __pyx_obj_4 * if c_result is not NULL: * return c_result */ - __Pyx_TraceLine(488,0,__PYX_ERR(17, 488, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_compile_map; __Pyx_INCREF(__pyx_t_1); __pyx_v_c_result = PyDict_GetItem(__pyx_t_1, __pyx_v_key); @@ -181131,7 +168779,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__compile(struct __pyx_obj_4 * return c_result * py_flags = re.UNICODE */ - __Pyx_TraceLine(489,0,__PYX_ERR(17, 489, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_result != NULL) != 0); if (__pyx_t_2) { @@ -181142,7 +168789,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__compile(struct __pyx_obj_4 * py_flags = re.UNICODE * if ignore_case: */ - __Pyx_TraceLine(490,0,__PYX_ERR(17, 490, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_c_result)); __pyx_r = ((PyObject *)__pyx_v_c_result); @@ -181164,8 +168810,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__compile(struct __pyx_obj_4 * if ignore_case: * py_flags = py_flags | re.IGNORECASE */ - __Pyx_TraceLine(491,0,__PYX_ERR(17, 491, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_UNICODE); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 491, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_UNICODE); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_py_flags = __pyx_t_1; __pyx_t_1 = 0; @@ -181177,8 +168822,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__compile(struct __pyx_obj_4 * py_flags = py_flags | re.IGNORECASE * rexp_compiled = re.compile(rexp, py_flags) */ - __Pyx_TraceLine(492,0,__PYX_ERR(17, 492, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_case); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(17, 492, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_case); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(9, 492, __pyx_L1_error) if (__pyx_t_2) { /* "src/lxml/extensions.pxi":493 @@ -181188,10 +168832,9 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__compile(struct __pyx_obj_4 * rexp_compiled = re.compile(rexp, py_flags) * self._compile_map[key] = rexp_compiled */ - __Pyx_TraceLine(493,0,__PYX_ERR(17, 493, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_IGNORECASE); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 493, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_IGNORECASE); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyNumber_Or(__pyx_v_py_flags, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 493, __pyx_L1_error) + __pyx_t_3 = PyNumber_Or(__pyx_v_py_flags, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_py_flags, __pyx_t_3); @@ -181213,8 +168856,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__compile(struct __pyx_obj_4 * self._compile_map[key] = rexp_compiled * return rexp_compiled */ - __Pyx_TraceLine(494,0,__PYX_ERR(17, 494, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_compile); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 494, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_compile); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -181231,7 +168873,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__compile(struct __pyx_obj_4 #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_rexp, __pyx_v_py_flags}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 494, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 494, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -181239,13 +168881,13 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__compile(struct __pyx_obj_4 #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_rexp, __pyx_v_py_flags}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 494, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 494, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 494, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 494, __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; @@ -181256,7 +168898,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__compile(struct __pyx_obj_4 __Pyx_INCREF(__pyx_v_py_flags); __Pyx_GIVEREF(__pyx_v_py_flags); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_py_flags); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 494, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -181271,12 +168913,11 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__compile(struct __pyx_obj_4 * return rexp_compiled * */ - __Pyx_TraceLine(495,0,__PYX_ERR(17, 495, __pyx_L1_error)) if (unlikely(__pyx_v_self->_compile_map == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(17, 495, __pyx_L1_error) + __PYX_ERR(9, 495, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_self->_compile_map, __pyx_v_key, __pyx_v_rexp_compiled) < 0)) __PYX_ERR(17, 495, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->_compile_map, __pyx_v_key, __pyx_v_rexp_compiled) < 0)) __PYX_ERR(9, 495, __pyx_L1_error) /* "src/lxml/extensions.pxi":496 * rexp_compiled = re.compile(rexp, py_flags) @@ -181285,7 +168926,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__compile(struct __pyx_obj_4 * * def test(self, ctxt, s, rexp, flags=u''): */ - __Pyx_TraceLine(496,0,__PYX_ERR(17, 496, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_rexp_compiled); __pyx_r = __pyx_v_rexp_compiled; @@ -181313,7 +168953,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__compile(struct __pyx_obj_4 __Pyx_XDECREF(__pyx_v_rexp_compiled); __Pyx_XDECREF(__pyx_v_rexp); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -181328,7 +168967,7 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__compile(struct __pyx_obj_4 /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_12_ExsltRegExp_3test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_5etree_12_ExsltRegExp_3test = {"test", (PyCFunction)__pyx_pw_4lxml_5etree_12_ExsltRegExp_3test, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_5etree_12_ExsltRegExp_3test = {"test", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ExsltRegExp_3test, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_5etree_12_ExsltRegExp_3test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_ctxt = 0; PyObject *__pyx_v_s = 0; @@ -181340,7 +168979,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ExsltRegExp_3test(PyObject *__pyx_v_se { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ctxt,&__pyx_n_s_s_4,&__pyx_n_s_rexp,&__pyx_n_s_flags,0}; PyObject* values[4] = {0,0,0,0}; - values[3] = ((PyObject *)__pyx_kp_u__23); + values[3] = ((PyObject *)__pyx_kp_u__11); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -181365,13 +169004,13 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ExsltRegExp_3test(PyObject *__pyx_v_se case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_s_4)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("test", 0, 3, 4, 1); __PYX_ERR(17, 498, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("test", 0, 3, 4, 1); __PYX_ERR(9, 498, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rexp)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("test", 0, 3, 4, 2); __PYX_ERR(17, 498, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("test", 0, 3, 4, 2); __PYX_ERR(9, 498, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -181381,7 +169020,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ExsltRegExp_3test(PyObject *__pyx_v_se } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "test") < 0)) __PYX_ERR(17, 498, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "test") < 0)) __PYX_ERR(9, 498, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -181401,7 +169040,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ExsltRegExp_3test(PyObject *__pyx_v_se } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("test", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 498, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("test", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(9, 498, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._ExsltRegExp.test", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -181417,17 +169056,13 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ExsltRegExp_3test(PyObject *__pyx_v_se static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_2test(struct __pyx_obj_4lxml_5etree__ExsltRegExp *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_ctxt, PyObject *__pyx_v_s, PyObject *__pyx_v_rexp, PyObject *__pyx_v_flags) { PyObject *__pyx_v_rexpc = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; - __Pyx_TraceFrameInit(__pyx_codeobj__334) + int __pyx_t_5; __Pyx_RefNannySetupContext("test", 0); - __Pyx_TraceCall("test", __pyx_f[17], 498, 0, __PYX_ERR(17, 498, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_s); __Pyx_INCREF(__pyx_v_flags); @@ -181438,8 +169073,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_2test(struct __pyx_obj_4lx * s = self._make_string(s) * rexpc = self._compile(rexp, u'i' in flags) */ - __Pyx_TraceLine(499,0,__PYX_ERR(17, 499, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(__pyx_v_self, __pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 499, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(__pyx_v_self, __pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_flags, __pyx_t_1); __pyx_t_1 = 0; @@ -181451,8 +169085,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_2test(struct __pyx_obj_4lx * rexpc = self._compile(rexp, u'i' in flags) * if rexpc.search(s) is None: */ - __Pyx_TraceLine(500,0,__PYX_ERR(17, 500, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(__pyx_v_self, __pyx_v_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 500, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(__pyx_v_self, __pyx_v_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_1); __pyx_t_1 = 0; @@ -181464,11 +169097,10 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_2test(struct __pyx_obj_4lx * if rexpc.search(s) is None: * return False */ - __Pyx_TraceLine(501,0,__PYX_ERR(17, 501, __pyx_L1_error)) - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_i, __pyx_v_flags, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(17, 501, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 501, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_i, __pyx_v_flags, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(9, 501, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __pyx_f_4lxml_5etree_12_ExsltRegExp__compile(__pyx_v_self, __pyx_v_rexp, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 501, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_12_ExsltRegExp__compile(__pyx_v_self, __pyx_v_rexp, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_rexpc = __pyx_t_3; @@ -181481,8 +169113,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_2test(struct __pyx_obj_4lx * return False * else: */ - __Pyx_TraceLine(502,0,__PYX_ERR(17, 502, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_rexpc, __pyx_n_s_search); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 502, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_rexpc, __pyx_n_s_search); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -181494,43 +169125,15 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_2test(struct __pyx_obj_4lx __Pyx_DECREF_SET(__pyx_t_1, function); } } - if (!__pyx_t_4) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_s); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 502, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_1)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_s}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 502, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_s}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 502, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 502, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(__pyx_v_s); - __Pyx_GIVEREF(__pyx_v_s); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_s); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 502, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_v_s) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_s); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 502, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = (__pyx_t_3 == Py_None); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = (__pyx_t_2 != 0); - if (__pyx_t_6) { + __pyx_t_5 = (__pyx_t_2 != 0); + if (__pyx_t_5) { /* "src/lxml/extensions.pxi":503 * rexpc = self._compile(rexp, u'i' in flags) @@ -181539,7 +169142,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_2test(struct __pyx_obj_4lx * else: * return True */ - __Pyx_TraceLine(503,0,__PYX_ERR(17, 503, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; @@ -181561,7 +169163,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_2test(struct __pyx_obj_4lx * * def match(self, ctxt, s, rexp, flags=u''): */ - __Pyx_TraceLine(505,0,__PYX_ERR(17, 505, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); @@ -181582,7 +169183,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_2test(struct __pyx_obj_4lx __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("lxml.etree._ExsltRegExp.test", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -181590,7 +169190,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_2test(struct __pyx_obj_4lx __Pyx_XDECREF(__pyx_v_s); __Pyx_XDECREF(__pyx_v_flags); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -181605,7 +169204,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_2test(struct __pyx_obj_4lx /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_12_ExsltRegExp_5match(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_5etree_12_ExsltRegExp_5match = {"match", (PyCFunction)__pyx_pw_4lxml_5etree_12_ExsltRegExp_5match, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_5etree_12_ExsltRegExp_5match = {"match", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ExsltRegExp_5match, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_5etree_12_ExsltRegExp_5match(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_ctxt = 0; PyObject *__pyx_v_s = 0; @@ -181617,7 +169216,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ExsltRegExp_5match(PyObject *__pyx_v_s { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ctxt,&__pyx_n_s_s_4,&__pyx_n_s_rexp,&__pyx_n_s_flags,0}; PyObject* values[4] = {0,0,0,0}; - values[3] = ((PyObject *)__pyx_kp_u__23); + values[3] = ((PyObject *)__pyx_kp_u__11); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -181642,13 +169241,13 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ExsltRegExp_5match(PyObject *__pyx_v_s case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_s_4)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("match", 0, 3, 4, 1); __PYX_ERR(17, 507, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("match", 0, 3, 4, 1); __PYX_ERR(9, 507, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rexp)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("match", 0, 3, 4, 2); __PYX_ERR(17, 507, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("match", 0, 3, 4, 2); __PYX_ERR(9, 507, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -181658,7 +169257,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ExsltRegExp_5match(PyObject *__pyx_v_s } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "match") < 0)) __PYX_ERR(17, 507, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "match") < 0)) __PYX_ERR(9, 507, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -181678,7 +169277,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ExsltRegExp_5match(PyObject *__pyx_v_s } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("match", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 507, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("match", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(9, 507, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._ExsltRegExp.match", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -181701,7 +169300,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l PyObject *__pyx_v_s_match = NULL; PyObject *__pyx_v_elem = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -181714,9 +169312,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l PyObject *(*__pyx_t_9)(PyObject *); int __pyx_t_10; int __pyx_t_11; - __Pyx_TraceFrameInit(__pyx_codeobj__335) __Pyx_RefNannySetupContext("match", 0); - __Pyx_TraceCall("match", __pyx_f[17], 507, 0, __PYX_ERR(17, 507, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_s); __Pyx_INCREF(__pyx_v_flags); @@ -181727,8 +169323,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l * s = self._make_string(s) * rexpc = self._compile(rexp, u'i' in flags) */ - __Pyx_TraceLine(509,0,__PYX_ERR(17, 509, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(__pyx_v_self, __pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 509, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(__pyx_v_self, __pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_flags, __pyx_t_1); __pyx_t_1 = 0; @@ -181740,8 +169335,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l * rexpc = self._compile(rexp, u'i' in flags) * if u'g' in flags: */ - __Pyx_TraceLine(510,0,__PYX_ERR(17, 510, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(__pyx_v_self, __pyx_v_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 510, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(__pyx_v_self, __pyx_v_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_1); __pyx_t_1 = 0; @@ -181753,11 +169347,10 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l * if u'g' in flags: * results = rexpc.findall(s) */ - __Pyx_TraceLine(511,0,__PYX_ERR(17, 511, __pyx_L1_error)) - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_i, __pyx_v_flags, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(17, 511, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 511, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_i, __pyx_v_flags, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(9, 511, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __pyx_f_4lxml_5etree_12_ExsltRegExp__compile(__pyx_v_self, __pyx_v_rexp, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 511, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_12_ExsltRegExp__compile(__pyx_v_self, __pyx_v_rexp, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_rexpc = __pyx_t_3; @@ -181770,8 +169363,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l * results = rexpc.findall(s) * if not results: */ - __Pyx_TraceLine(512,0,__PYX_ERR(17, 512, __pyx_L1_error)) - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_g, __pyx_v_flags, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(17, 512, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_g, __pyx_v_flags, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(9, 512, __pyx_L1_error) __pyx_t_4 = (__pyx_t_2 != 0); if (__pyx_t_4) { @@ -181782,8 +169374,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l * if not results: * return () */ - __Pyx_TraceLine(513,0,__PYX_ERR(17, 513, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_rexpc, __pyx_n_s_findall); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 513, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_rexpc, __pyx_n_s_findall); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -181795,38 +169386,10 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l __Pyx_DECREF_SET(__pyx_t_1, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_s); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 513, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_1)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_s}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 513, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_s}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 513, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 513, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_INCREF(__pyx_v_s); - __Pyx_GIVEREF(__pyx_v_s); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_s); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 513, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v_s) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_s); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 513, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_results = __pyx_t_3; __pyx_t_3 = 0; @@ -181838,8 +169401,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l * return () * else: */ - __Pyx_TraceLine(514,0,__PYX_ERR(17, 514, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_results); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(17, 514, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_results); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(9, 514, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_4) != 0); if (__pyx_t_2) { @@ -181850,7 +169412,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l * else: * result = rexpc.search(s) */ - __Pyx_TraceLine(515,0,__PYX_ERR(17, 515, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_empty_tuple); __pyx_r = __pyx_empty_tuple; @@ -181882,52 +169443,23 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l * if not result: * return () */ - __Pyx_TraceLine(517,0,__PYX_ERR(17, 517, __pyx_L1_error)) /*else*/ { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_rexpc, __pyx_n_s_search); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 517, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_rexpc, __pyx_n_s_search); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = NULL; + __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_6)) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } - if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_s); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 517, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_1)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_s}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 517, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_s}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 517, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 517, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_v_s); - __Pyx_GIVEREF(__pyx_v_s); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_s); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 517, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v_s) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_s); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 517, __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; @@ -181939,8 +169471,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l * return () * results = [ result.group() ] */ - __Pyx_TraceLine(518,0,__PYX_ERR(17, 518, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(17, 518, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(9, 518, __pyx_L1_error) __pyx_t_4 = ((!__pyx_t_2) != 0); if (__pyx_t_4) { @@ -181951,7 +169482,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l * results = [ result.group() ] * results.extend( result.groups(u'') ) */ - __Pyx_TraceLine(519,0,__PYX_ERR(17, 519, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_empty_tuple); __pyx_r = __pyx_empty_tuple; @@ -181973,8 +169503,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l * results.extend( result.groups(u'') ) * result_list = [] */ - __Pyx_TraceLine(520,0,__PYX_ERR(17, 520, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_group); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 520, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_group); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -181986,15 +169515,12 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l __Pyx_DECREF_SET(__pyx_t_1, function); } } - if (__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 520, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 520, __pyx_L1_error) - } + __pyx_t_3 = (__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_3)) __PYX_ERR(9, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 520, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); @@ -182009,59 +169535,40 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l * result_list = [] * root = Element(u'matches') */ - __Pyx_TraceLine(521,0,__PYX_ERR(17, 521, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_results, __pyx_n_s_extend); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 521, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_results, __pyx_n_s_extend); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_groups); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 521, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__336, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 521, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_groups); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_kp_u__11) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_kp_u__11); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 521, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_5)) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (!__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 521, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 521, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 521, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 521, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 521, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - } + __pyx_t_1 = (__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_1)) __PYX_ERR(9, 521, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -182074,8 +169581,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l * root = Element(u'matches') * join_groups = u''.join */ - __Pyx_TraceLine(522,0,__PYX_ERR(17, 522, __pyx_L1_error)) - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 522, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result_list = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; @@ -182087,14 +169593,25 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l * join_groups = u''.join * for s_match in results: */ - __Pyx_TraceLine(523,0,__PYX_ERR(17, 523, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Element); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 523, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__337, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 523, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Element); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_root = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_n_u_matches) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_u_matches); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 523, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_root = __pyx_t_1; + __pyx_t_1 = 0; /* "src/lxml/extensions.pxi":524 * result_list = [] @@ -182103,11 +169620,10 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l * for s_match in results: * if python.PyTuple_CheckExact(s_match): */ - __Pyx_TraceLine(524,0,__PYX_ERR(17, 524, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__23, __pyx_n_s_join); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 524, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_v_join_groups = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__11, __pyx_n_s_join); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 524, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_join_groups = __pyx_t_1; + __pyx_t_1 = 0; /* "src/lxml/extensions.pxi":525 * root = Element(u'matches') @@ -182116,48 +169632,47 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l * if python.PyTuple_CheckExact(s_match): * s_match = join_groups(s_match) */ - __Pyx_TraceLine(525,0,__PYX_ERR(17, 525, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_v_results)) || PyTuple_CheckExact(__pyx_v_results)) { - __pyx_t_3 = __pyx_v_results; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = 0; + __pyx_t_1 = __pyx_v_results; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_results); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 525, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 525, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_results); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 525, __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(9, 525, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_9)) { - if (likely(PyList_CheckExact(__pyx_t_3))) { - if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_3)) break; + 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_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(17, 525, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(9, 525, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 525, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 525, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); #endif } else { - if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(17, 525, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(9, 525, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 525, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 525, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); #endif } } else { - __pyx_t_1 = __pyx_t_9(__pyx_t_3); - if (unlikely(!__pyx_t_1)) { + __pyx_t_3 = __pyx_t_9(__pyx_t_1); + if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(17, 525, __pyx_L1_error) + else __PYX_ERR(9, 525, __pyx_L1_error) } break; } - __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_3); } - __Pyx_XDECREF_SET(__pyx_v_s_match, __pyx_t_1); - __pyx_t_1 = 0; + __Pyx_XDECREF_SET(__pyx_v_s_match, __pyx_t_3); + __pyx_t_3 = 0; /* "src/lxml/extensions.pxi":526 * join_groups = u''.join @@ -182166,7 +169681,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l * s_match = join_groups(s_match) * elem = SubElement(root, u'match') */ - __Pyx_TraceLine(526,0,__PYX_ERR(17, 526, __pyx_L1_error)) __pyx_t_4 = (PyTuple_CheckExact(__pyx_v_s_match) != 0); if (__pyx_t_4) { @@ -182177,53 +169691,24 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l * elem = SubElement(root, u'match') * elem.text = s_match */ - __Pyx_TraceLine(527,0,__PYX_ERR(17, 527, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_join_groups); - __pyx_t_7 = __pyx_v_join_groups; __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + __pyx_t_5 = __pyx_v_join_groups; __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_7, function); - } - } - if (!__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_s_match); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 527, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_s_match}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 527, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_s_match}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 527, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 527, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_v_s_match); - __Pyx_GIVEREF(__pyx_v_s_match); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_s_match); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 527, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF_SET(__pyx_t_5, function); } } - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF_SET(__pyx_v_s_match, __pyx_t_1); - __pyx_t_1 = 0; + __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_s_match) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_s_match); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 527, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF_SET(__pyx_v_s_match, __pyx_t_3); + __pyx_t_3 = 0; /* "src/lxml/extensions.pxi":526 * join_groups = u''.join @@ -182241,56 +169726,55 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l * elem.text = s_match * result_list.append(elem) */ - __Pyx_TraceLine(528,0,__PYX_ERR(17, 528, __pyx_L1_error)) - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_SubElement); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 528, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_SubElement); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; __pyx_t_10 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_5); + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_7, function); + __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_10 = 1; } } #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_root, __pyx_n_u_match}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 528, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_1); + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_root, __pyx_n_u_match}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 528, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_root, __pyx_n_u_match}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 528, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_root, __pyx_n_u_match}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 528, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 528, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - if (__pyx_t_5) { - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; + __pyx_t_7 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_v_root); __Pyx_GIVEREF(__pyx_v_root); - PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_10, __pyx_v_root); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_10, __pyx_v_root); __Pyx_INCREF(__pyx_n_u_match); __Pyx_GIVEREF(__pyx_n_u_match); - PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_10, __pyx_n_u_match); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 528, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_10, __pyx_n_u_match); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF_SET(__pyx_v_elem, __pyx_t_1); - __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_elem, __pyx_t_3); + __pyx_t_3 = 0; /* "src/lxml/extensions.pxi":529 * s_match = join_groups(s_match) @@ -182299,8 +169783,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l * result_list.append(elem) * return result_list */ - __Pyx_TraceLine(529,0,__PYX_ERR(17, 529, __pyx_L1_error)) - if (__Pyx_PyObject_SetAttrStr(__pyx_v_elem, __pyx_n_s_text, __pyx_v_s_match) < 0) __PYX_ERR(17, 529, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_elem, __pyx_n_s_text, __pyx_v_s_match) < 0) __PYX_ERR(9, 529, __pyx_L1_error) /* "src/lxml/extensions.pxi":530 * elem = SubElement(root, u'match') @@ -182309,8 +169792,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l * return result_list * */ - __Pyx_TraceLine(530,0,__PYX_ERR(17, 530, __pyx_L1_error)) - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_result_list, __pyx_v_elem); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(17, 530, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_result_list, __pyx_v_elem); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(9, 530, __pyx_L1_error) /* "src/lxml/extensions.pxi":525 * root = Element(u'matches') @@ -182319,9 +169801,8 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l * if python.PyTuple_CheckExact(s_match): * s_match = join_groups(s_match) */ - __Pyx_TraceLine(525,0,__PYX_ERR(17, 525, __pyx_L1_error)) } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/lxml/extensions.pxi":531 * elem.text = s_match @@ -182330,7 +169811,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l * * def replace(self, ctxt, s, rexp, flags, replacement): */ - __Pyx_TraceLine(531,0,__PYX_ERR(17, 531, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result_list); __pyx_r = __pyx_v_result_list; @@ -182365,7 +169845,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l __Pyx_XDECREF(__pyx_v_s); __Pyx_XDECREF(__pyx_v_flags); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -182380,7 +169859,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_4match(struct __pyx_obj_4l /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_12_ExsltRegExp_7replace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_5etree_12_ExsltRegExp_7replace = {"replace", (PyCFunction)__pyx_pw_4lxml_5etree_12_ExsltRegExp_7replace, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_5etree_12_ExsltRegExp_7replace = {"replace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ExsltRegExp_7replace, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_5etree_12_ExsltRegExp_7replace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_ctxt = 0; PyObject *__pyx_v_s = 0; @@ -182419,29 +169898,29 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ExsltRegExp_7replace(PyObject *__pyx_v case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_s_4)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("replace", 1, 5, 5, 1); __PYX_ERR(17, 533, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("replace", 1, 5, 5, 1); __PYX_ERR(9, 533, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rexp)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("replace", 1, 5, 5, 2); __PYX_ERR(17, 533, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("replace", 1, 5, 5, 2); __PYX_ERR(9, 533, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("replace", 1, 5, 5, 3); __PYX_ERR(17, 533, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("replace", 1, 5, 5, 3); __PYX_ERR(9, 533, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_replacement)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("replace", 1, 5, 5, 4); __PYX_ERR(17, 533, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("replace", 1, 5, 5, 4); __PYX_ERR(9, 533, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "replace") < 0)) __PYX_ERR(17, 533, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "replace") < 0)) __PYX_ERR(9, 533, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { goto __pyx_L5_argtuple_error; @@ -182460,7 +169939,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ExsltRegExp_7replace(PyObject *__pyx_v } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("replace", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 533, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("replace", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(9, 533, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._ExsltRegExp.replace", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -182477,7 +169956,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_6replace(struct __pyx_obj_ PyObject *__pyx_v_rexpc = NULL; long __pyx_v_count; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -182487,9 +169965,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_6replace(struct __pyx_obj_ PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__338) __Pyx_RefNannySetupContext("replace", 0); - __Pyx_TraceCall("replace", __pyx_f[17], 533, 0, __PYX_ERR(17, 533, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_s); __Pyx_INCREF(__pyx_v_flags); __Pyx_INCREF(__pyx_v_replacement); @@ -182501,8 +169977,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_6replace(struct __pyx_obj_ * flags = self._make_string(flags) * s = self._make_string(s) */ - __Pyx_TraceLine(534,0,__PYX_ERR(17, 534, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(__pyx_v_self, __pyx_v_replacement); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 534, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(__pyx_v_self, __pyx_v_replacement); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_replacement, __pyx_t_1); __pyx_t_1 = 0; @@ -182514,8 +169989,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_6replace(struct __pyx_obj_ * s = self._make_string(s) * rexpc = self._compile(rexp, u'i' in flags) */ - __Pyx_TraceLine(535,0,__PYX_ERR(17, 535, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(__pyx_v_self, __pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 535, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(__pyx_v_self, __pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_flags, __pyx_t_1); __pyx_t_1 = 0; @@ -182527,8 +170001,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_6replace(struct __pyx_obj_ * rexpc = self._compile(rexp, u'i' in flags) * if u'g' in flags: */ - __Pyx_TraceLine(536,0,__PYX_ERR(17, 536, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(__pyx_v_self, __pyx_v_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 536, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(__pyx_v_self, __pyx_v_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_1); __pyx_t_1 = 0; @@ -182540,11 +170013,10 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_6replace(struct __pyx_obj_ * if u'g' in flags: * count = 0 */ - __Pyx_TraceLine(537,0,__PYX_ERR(17, 537, __pyx_L1_error)) - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_i, __pyx_v_flags, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(17, 537, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 537, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_i, __pyx_v_flags, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(9, 537, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __pyx_f_4lxml_5etree_12_ExsltRegExp__compile(__pyx_v_self, __pyx_v_rexp, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 537, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_12_ExsltRegExp__compile(__pyx_v_self, __pyx_v_rexp, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_rexpc = __pyx_t_3; @@ -182557,8 +170029,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_6replace(struct __pyx_obj_ * count = 0 * else: */ - __Pyx_TraceLine(538,0,__PYX_ERR(17, 538, __pyx_L1_error)) - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_g, __pyx_v_flags, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(17, 538, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_g, __pyx_v_flags, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(9, 538, __pyx_L1_error) __pyx_t_4 = (__pyx_t_2 != 0); if (__pyx_t_4) { @@ -182569,7 +170040,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_6replace(struct __pyx_obj_ * else: * count = 1 */ - __Pyx_TraceLine(539,0,__PYX_ERR(17, 539, __pyx_L1_error)) __pyx_v_count = 0; /* "src/lxml/extensions.pxi":538 @@ -182589,7 +170059,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_6replace(struct __pyx_obj_ * return rexpc.sub(replacement, s, count) * */ - __Pyx_TraceLine(541,0,__PYX_ERR(17, 541, __pyx_L1_error)) /*else*/ { __pyx_v_count = 1; } @@ -182602,11 +170071,10 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_6replace(struct __pyx_obj_ * * cdef _register_in_context(self, _BaseContext context): */ - __Pyx_TraceLine(542,0,__PYX_ERR(17, 542, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_rexpc, __pyx_n_s_sub); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 542, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_rexpc, __pyx_n_s_sub); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_count); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 542, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_count); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -182623,7 +170091,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_6replace(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_replacement, __pyx_v_s, __pyx_t_5}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 542, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 542, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -182632,14 +170100,14 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_6replace(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_replacement, __pyx_v_s, __pyx_t_5}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 542, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 542, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 542, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(9, 542, __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; @@ -182653,7 +170121,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_6replace(struct __pyx_obj_ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 542, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -182685,7 +170153,6 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_6replace(struct __pyx_obj_ __Pyx_XDECREF(__pyx_v_flags); __Pyx_XDECREF(__pyx_v_replacement); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -182701,12 +170168,10 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ExsltRegExp_6replace(struct __pyx_obj_ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__register_in_context(struct __pyx_obj_4lxml_5etree__ExsltRegExp *__pyx_v_self, struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_v_context) { PyObject *__pyx_v_ns = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("_register_in_context", 0); - __Pyx_TraceCall("_register_in_context", __pyx_f[17], 544, 0, __PYX_ERR(17, 544, __pyx_L1_error)); /* "src/lxml/extensions.pxi":545 * @@ -182715,7 +170180,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__register_in_context(struct * context._addLocalExtensionFunction(ns, b"test", self.test) * context._addLocalExtensionFunction(ns, b"match", self.match) */ - __Pyx_TraceLine(545,0,__PYX_ERR(17, 545, __pyx_L1_error)) __Pyx_INCREF(__pyx_kp_b_http_exslt_org_regular_expressio); __pyx_v_ns = __pyx_kp_b_http_exslt_org_regular_expressio; @@ -182726,10 +170190,9 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__register_in_context(struct * context._addLocalExtensionFunction(ns, b"match", self.match) * context._addLocalExtensionFunction(ns, b"replace", self.replace) */ - __Pyx_TraceLine(546,0,__PYX_ERR(17, 546, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_test); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 546, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_test); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseContext *)__pyx_v_context->__pyx_vtab)->_addLocalExtensionFunction(__pyx_v_context, __pyx_v_ns, __pyx_n_b_test, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(17, 546, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseContext *)__pyx_v_context->__pyx_vtab)->_addLocalExtensionFunction(__pyx_v_context, __pyx_v_ns, __pyx_n_b_test, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(9, 546, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/lxml/extensions.pxi":547 @@ -182739,10 +170202,9 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__register_in_context(struct * context._addLocalExtensionFunction(ns, b"replace", self.replace) * */ - __Pyx_TraceLine(547,0,__PYX_ERR(17, 547, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_match); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 547, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_match); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseContext *)__pyx_v_context->__pyx_vtab)->_addLocalExtensionFunction(__pyx_v_context, __pyx_v_ns, __pyx_n_b_match, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(17, 547, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseContext *)__pyx_v_context->__pyx_vtab)->_addLocalExtensionFunction(__pyx_v_context, __pyx_v_ns, __pyx_n_b_match, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(9, 547, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/lxml/extensions.pxi":548 @@ -182752,10 +170214,9 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__register_in_context(struct * * */ - __Pyx_TraceLine(548,0,__PYX_ERR(17, 548, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 548, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseContext *)__pyx_v_context->__pyx_vtab)->_addLocalExtensionFunction(__pyx_v_context, __pyx_v_ns, __pyx_n_b_replace, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(17, 548, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseContext *)__pyx_v_context->__pyx_vtab)->_addLocalExtensionFunction(__pyx_v_context, __pyx_v_ns, __pyx_n_b_replace, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(9, 548, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/lxml/extensions.pxi":544 @@ -182776,7 +170237,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__register_in_context(struct __pyx_L0:; __Pyx_XDECREF(__pyx_v_ns); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -182795,7 +170255,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o xmlNode *__pyx_v_c_node; PyObject *__pyx_v_value = NULL; xmlXPathObject *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -182812,7 +170271,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o PyObject *__pyx_t_13 = NULL; const char *__pyx_t_14; __Pyx_RefNannySetupContext("_wrapXPathObject", 0); - __Pyx_TraceCall("_wrapXPathObject", __pyx_f[17], 554, 0, __PYX_ERR(17, 554, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_obj); /* "src/lxml/extensions.pxi":557 @@ -182822,7 +170280,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * cdef xmlNode* c_node * */ - __Pyx_TraceLine(557,0,__PYX_ERR(17, 557, __pyx_L1_error)) __Pyx_INCREF(Py_None); __pyx_v_fake_node = ((struct LxmlElement *)Py_None); @@ -182833,7 +170290,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * obj = _utf8(obj) * if isinstance(obj, bytes): */ - __Pyx_TraceLine(560,0,__PYX_ERR(17, 560, __pyx_L1_error)) __pyx_t_1 = PyUnicode_Check(__pyx_v_obj); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -182845,8 +170301,7 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * if isinstance(obj, bytes): * # libxml2 copies the string value */ - __Pyx_TraceLine(561,0,__PYX_ERR(17, 561, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_obj); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 561, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_obj); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_3); __pyx_t_3 = 0; @@ -182867,7 +170322,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * # libxml2 copies the string value * return xpath.xmlXPathNewCString(_cstr(obj)) */ - __Pyx_TraceLine(562,0,__PYX_ERR(17, 562, __pyx_L1_error)) __pyx_t_2 = PyBytes_Check(__pyx_v_obj); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -182879,7 +170333,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * if isinstance(obj, bool): * return xpath.xmlXPathNewBoolean(obj) */ - __Pyx_TraceLine(564,0,__PYX_ERR(17, 564, __pyx_L1_error)) __pyx_r = xmlXPathNewCString(PyBytes_AS_STRING(__pyx_v_obj)); goto __pyx_L0; @@ -182899,10 +170352,9 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * return xpath.xmlXPathNewBoolean(obj) * if python.PyNumber_Check(obj): */ - __Pyx_TraceLine(565,0,__PYX_ERR(17, 565, __pyx_L1_error)) __pyx_t_3 = ((PyObject*)&PyBool_Type); __Pyx_INCREF(__pyx_t_3); - __pyx_t_1 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_3); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(17, 565, __pyx_L1_error) + __pyx_t_1 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_3); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(9, 565, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -182914,8 +170366,7 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * if python.PyNumber_Check(obj): * return xpath.xmlXPathNewFloat(obj) */ - __Pyx_TraceLine(566,0,__PYX_ERR(17, 566, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_obj); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(17, 566, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_obj); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(9, 566, __pyx_L1_error) __pyx_r = xmlXPathNewBoolean(__pyx_t_4); goto __pyx_L0; @@ -182935,7 +170386,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * return xpath.xmlXPathNewFloat(obj) * if obj is None: */ - __Pyx_TraceLine(567,0,__PYX_ERR(17, 567, __pyx_L1_error)) __pyx_t_2 = (PyNumber_Check(__pyx_v_obj) != 0); if (__pyx_t_2) { @@ -182946,8 +170396,7 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * if obj is None: * resultSet = xpath.xmlXPathNodeSetCreate(NULL) */ - __Pyx_TraceLine(568,0,__PYX_ERR(17, 568, __pyx_L1_error)) - __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_obj); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(17, 568, __pyx_L1_error) + __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_obj); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(9, 568, __pyx_L1_error) __pyx_r = xmlXPathNewFloat(__pyx_t_5); goto __pyx_L0; @@ -182967,7 +170416,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * resultSet = xpath.xmlXPathNodeSetCreate(NULL) * elif isinstance(obj, _Element): */ - __Pyx_TraceLine(569,0,__PYX_ERR(17, 569, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_obj == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -182979,7 +170427,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * elif isinstance(obj, _Element): * resultSet = xpath.xmlXPathNodeSetCreate((<_Element>obj)._c_node) */ - __Pyx_TraceLine(570,0,__PYX_ERR(17, 570, __pyx_L1_error)) __pyx_v_resultSet = xmlXPathNodeSetCreate(NULL); /* "src/lxml/extensions.pxi":569 @@ -182999,7 +170446,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * resultSet = xpath.xmlXPathNodeSetCreate((<_Element>obj)._c_node) * elif python.PySequence_Check(obj): */ - __Pyx_TraceLine(571,0,__PYX_ERR(17, 571, __pyx_L1_error)) __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_ptype_4lxml_5etree__Element); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -183011,7 +170457,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * elif python.PySequence_Check(obj): * resultSet = xpath.xmlXPathNodeSetCreate(NULL) */ - __Pyx_TraceLine(572,0,__PYX_ERR(17, 572, __pyx_L1_error)) __pyx_v_resultSet = xmlXPathNodeSetCreate(((struct LxmlElement *)__pyx_v_obj)->_c_node); /* "src/lxml/extensions.pxi":571 @@ -183031,7 +170476,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * resultSet = xpath.xmlXPathNodeSetCreate(NULL) * try: */ - __Pyx_TraceLine(573,0,__PYX_ERR(17, 573, __pyx_L1_error)) __pyx_t_2 = (PySequence_Check(__pyx_v_obj) != 0); if (likely(__pyx_t_2)) { @@ -183042,7 +170486,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * try: * for value in obj: */ - __Pyx_TraceLine(574,0,__PYX_ERR(17, 574, __pyx_L1_error)) __pyx_v_resultSet = xmlXPathNodeSetCreate(NULL); /* "src/lxml/extensions.pxi":575 @@ -183052,7 +170495,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * for value in obj: * if isinstance(value, _Element): */ - __Pyx_TraceLine(575,0,__PYX_ERR(17, 575, __pyx_L8_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -183069,31 +170511,30 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * if isinstance(value, _Element): * if context is not None: */ - __Pyx_TraceLine(576,0,__PYX_ERR(17, 576, __pyx_L8_error)) if (likely(PyList_CheckExact(__pyx_v_obj)) || PyTuple_CheckExact(__pyx_v_obj)) { __pyx_t_3 = __pyx_v_obj; __Pyx_INCREF(__pyx_t_3); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_9 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_obj); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 576, __pyx_L8_error) + __pyx_t_9 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_obj); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 576, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_10 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 576, __pyx_L8_error) + __pyx_t_10 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(9, 576, __pyx_L8_error) } for (;;) { if (likely(!__pyx_t_10)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_11 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_11); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(17, 576, __pyx_L8_error) + __pyx_t_11 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_11); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(9, 576, __pyx_L8_error) #else - __pyx_t_11 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_11)) __PYX_ERR(17, 576, __pyx_L8_error) + __pyx_t_11 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 576, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_11); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_11); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(17, 576, __pyx_L8_error) + __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_11); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(9, 576, __pyx_L8_error) #else - __pyx_t_11 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_11)) __PYX_ERR(17, 576, __pyx_L8_error) + __pyx_t_11 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 576, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_11); #endif } @@ -183103,7 +170544,7 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(17, 576, __pyx_L8_error) + else __PYX_ERR(9, 576, __pyx_L8_error) } break; } @@ -183119,7 +170560,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * if context is not None: * context._hold(value) */ - __Pyx_TraceLine(577,0,__PYX_ERR(17, 577, __pyx_L8_error)) __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_4lxml_5etree__Element); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -183131,7 +170571,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * context._hold(value) * xpath.xmlXPathNodeSetAdd(resultSet, (<_Element>value)._c_node) */ - __Pyx_TraceLine(578,0,__PYX_ERR(17, 578, __pyx_L8_error)) __pyx_t_1 = (((PyObject *)__pyx_v_context) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -183143,8 +170582,7 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * xpath.xmlXPathNodeSetAdd(resultSet, (<_Element>value)._c_node) * else: */ - __Pyx_TraceLine(579,0,__PYX_ERR(17, 579, __pyx_L8_error)) - __pyx_t_11 = __pyx_f_4lxml_5etree_12_BaseContext__hold(__pyx_v_context, __pyx_v_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(17, 579, __pyx_L8_error) + __pyx_t_11 = __pyx_f_4lxml_5etree_12_BaseContext__hold(__pyx_v_context, __pyx_v_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 579, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -183164,7 +170602,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * else: * if context is None or doc is None: */ - __Pyx_TraceLine(580,0,__PYX_ERR(17, 580, __pyx_L8_error)) xmlXPathNodeSetAdd(__pyx_v_resultSet, ((struct LxmlElement *)__pyx_v_value)->_c_node); /* "src/lxml/extensions.pxi":577 @@ -183184,7 +170621,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * raise XPathResultError, \ * f"Non-Element values not supported at this point - got {value!r}" */ - __Pyx_TraceLine(582,0,__PYX_ERR(17, 582, __pyx_L8_error)) /*else*/ { __pyx_t_1 = (((PyObject *)__pyx_v_context) == Py_None); __pyx_t_12 = (__pyx_t_1 != 0); @@ -183206,15 +170642,14 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * # support strings by appending text nodes to an Element * if isinstance(value, unicode): */ - __Pyx_TraceLine(584,0,__PYX_ERR(17, 584, __pyx_L8_error)) - __pyx_t_11 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_value), __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(17, 584, __pyx_L8_error) + __pyx_t_11 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_value), __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 584, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Non_Element_values_not_supported, __pyx_t_11); if (unlikely(!__pyx_t_13)) __PYX_ERR(17, 584, __pyx_L8_error) + __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Non_Element_values_not_supported, __pyx_t_11); if (unlikely(!__pyx_t_13)) __PYX_ERR(9, 584, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_XPathResultError), __pyx_t_13, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(17, 583, __pyx_L8_error) + __PYX_ERR(9, 583, __pyx_L8_error) /* "src/lxml/extensions.pxi":582 * xpath.xmlXPathNodeSetAdd(resultSet, (<_Element>value)._c_node) @@ -183232,7 +170667,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * value = _utf8(value) * if isinstance(value, bytes): */ - __Pyx_TraceLine(586,0,__PYX_ERR(17, 586, __pyx_L8_error)) __pyx_t_2 = PyUnicode_Check(__pyx_v_value); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -183244,8 +170678,7 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * if isinstance(value, bytes): * if fake_node is None: */ - __Pyx_TraceLine(587,0,__PYX_ERR(17, 587, __pyx_L8_error)) - __pyx_t_13 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_13)) __PYX_ERR(17, 587, __pyx_L8_error) + __pyx_t_13 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_13)) __PYX_ERR(9, 587, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_13); __pyx_t_13 = 0; @@ -183266,7 +170699,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * if fake_node is None: * fake_node = _makeElement("text-root", NULL, doc, None, */ - __Pyx_TraceLine(588,0,__PYX_ERR(17, 588, __pyx_L8_error)) __pyx_t_1 = PyBytes_Check(__pyx_v_value); __pyx_t_2 = (__pyx_t_1 != 0); if (likely(__pyx_t_2)) { @@ -183278,7 +170710,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * fake_node = _makeElement("text-root", NULL, doc, None, * None, None, None, None, None) */ - __Pyx_TraceLine(589,0,__PYX_ERR(17, 589, __pyx_L8_error)) __pyx_t_2 = (((PyObject *)__pyx_v_fake_node) == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -183290,8 +170721,7 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * None, None, None, None, None) * context._hold(fake_node) */ - __Pyx_TraceLine(590,0,__PYX_ERR(17, 590, __pyx_L8_error)) - __pyx_t_13 = ((PyObject *)__pyx_f_4lxml_5etree__makeElement(__pyx_kp_s_text_root, NULL, __pyx_v_doc, ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None), Py_None, Py_None, Py_None, Py_None, ((PyObject*)Py_None))); if (unlikely(!__pyx_t_13)) __PYX_ERR(17, 590, __pyx_L8_error) + __pyx_t_13 = ((PyObject *)__pyx_f_4lxml_5etree__makeElement(__pyx_kp_s_text_root, NULL, __pyx_v_doc, ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None), Py_None, Py_None, Py_None, Py_None, ((PyObject*)Py_None))); if (unlikely(!__pyx_t_13)) __PYX_ERR(9, 590, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF_SET(__pyx_v_fake_node, ((struct LxmlElement *)__pyx_t_13)); __pyx_t_13 = 0; @@ -183303,8 +170733,7 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * else: * # append a comment node to keep the text nodes separate */ - __Pyx_TraceLine(592,0,__PYX_ERR(17, 592, __pyx_L8_error)) - __pyx_t_13 = __pyx_f_4lxml_5etree_12_BaseContext__hold(__pyx_v_context, ((PyObject *)__pyx_v_fake_node)); if (unlikely(!__pyx_t_13)) __PYX_ERR(17, 592, __pyx_L8_error) + __pyx_t_13 = __pyx_f_4lxml_5etree_12_BaseContext__hold(__pyx_v_context, ((PyObject *)__pyx_v_fake_node)); if (unlikely(!__pyx_t_13)) __PYX_ERR(9, 592, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; @@ -183325,7 +170754,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * if c_node is NULL: * raise MemoryError() */ - __Pyx_TraceLine(595,0,__PYX_ERR(17, 595, __pyx_L8_error)) /*else*/ { __pyx_v_c_node = xmlNewDocComment(__pyx_v_doc->_c_doc, ((unsigned char *)((unsigned char *)((char const *)"")))); @@ -183336,7 +170764,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * raise MemoryError() * tree.xmlAddChild(fake_node._c_node, c_node) */ - __Pyx_TraceLine(596,0,__PYX_ERR(17, 596, __pyx_L8_error)) __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -183347,8 +170774,7 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * tree.xmlAddChild(fake_node._c_node, c_node) * context._hold(value) */ - __Pyx_TraceLine(597,0,__PYX_ERR(17, 597, __pyx_L8_error)) - PyErr_NoMemory(); __PYX_ERR(17, 597, __pyx_L8_error) + PyErr_NoMemory(); __PYX_ERR(9, 597, __pyx_L8_error) /* "src/lxml/extensions.pxi":596 * # append a comment node to keep the text nodes separate @@ -183366,7 +170792,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * context._hold(value) * c_node = tree.xmlNewDocText(doc._c_doc, _xcstr(value)) */ - __Pyx_TraceLine(598,0,__PYX_ERR(17, 598, __pyx_L8_error)) (void)(xmlAddChild(__pyx_v_fake_node->_c_node, __pyx_v_c_node)); } __pyx_L23:; @@ -183378,8 +170803,7 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * c_node = tree.xmlNewDocText(doc._c_doc, _xcstr(value)) * if c_node is NULL: */ - __Pyx_TraceLine(599,0,__PYX_ERR(17, 599, __pyx_L8_error)) - __pyx_t_13 = __pyx_f_4lxml_5etree_12_BaseContext__hold(__pyx_v_context, __pyx_v_value); if (unlikely(!__pyx_t_13)) __PYX_ERR(17, 599, __pyx_L8_error) + __pyx_t_13 = __pyx_f_4lxml_5etree_12_BaseContext__hold(__pyx_v_context, __pyx_v_value); if (unlikely(!__pyx_t_13)) __PYX_ERR(9, 599, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; @@ -183390,7 +170814,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * if c_node is NULL: * raise MemoryError() */ - __Pyx_TraceLine(600,0,__PYX_ERR(17, 600, __pyx_L8_error)) __pyx_v_c_node = xmlNewDocText(__pyx_v_doc->_c_doc, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_value)); /* "src/lxml/extensions.pxi":601 @@ -183400,7 +170823,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * raise MemoryError() * tree.xmlAddChild(fake_node._c_node, c_node) */ - __Pyx_TraceLine(601,0,__PYX_ERR(17, 601, __pyx_L8_error)) __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -183411,8 +170833,7 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * tree.xmlAddChild(fake_node._c_node, c_node) * xpath.xmlXPathNodeSetAdd(resultSet, c_node) */ - __Pyx_TraceLine(602,0,__PYX_ERR(17, 602, __pyx_L8_error)) - PyErr_NoMemory(); __PYX_ERR(17, 602, __pyx_L8_error) + PyErr_NoMemory(); __PYX_ERR(9, 602, __pyx_L8_error) /* "src/lxml/extensions.pxi":601 * context._hold(value) @@ -183430,7 +170851,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * xpath.xmlXPathNodeSetAdd(resultSet, c_node) * else: */ - __Pyx_TraceLine(603,0,__PYX_ERR(17, 603, __pyx_L8_error)) (void)(xmlAddChild(__pyx_v_fake_node->_c_node, __pyx_v_c_node)); /* "src/lxml/extensions.pxi":604 @@ -183440,7 +170860,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * else: * raise XPathResultError, \ */ - __Pyx_TraceLine(604,0,__PYX_ERR(17, 604, __pyx_L8_error)) xmlXPathNodeSetAdd(__pyx_v_resultSet, __pyx_v_c_node); /* "src/lxml/extensions.pxi":588 @@ -183460,7 +170879,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * f"This is not a supported node-set result: {value!r}" * except: */ - __Pyx_TraceLine(606,0,__PYX_ERR(17, 606, __pyx_L8_error)) /*else*/ { /* "src/lxml/extensions.pxi":607 @@ -183470,15 +170888,14 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * except: * xpath.xmlXPathFreeNodeSet(resultSet) */ - __Pyx_TraceLine(607,0,__PYX_ERR(17, 607, __pyx_L8_error)) - __pyx_t_13 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_value), __pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(17, 607, __pyx_L8_error) + __pyx_t_13 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_value), __pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(9, 607, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_kp_u_This_is_not_a_supported_node_set, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(17, 607, __pyx_L8_error) + __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_kp_u_This_is_not_a_supported_node_set, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 607, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_XPathResultError), __pyx_t_11, 0, 0); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __PYX_ERR(17, 606, __pyx_L8_error) + __PYX_ERR(9, 606, __pyx_L8_error) } __pyx_L22:; } @@ -183491,7 +170908,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * if isinstance(value, _Element): * if context is not None: */ - __Pyx_TraceLine(576,0,__PYX_ERR(17, 576, __pyx_L8_error)) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -183519,10 +170935,9 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * xpath.xmlXPathFreeNodeSet(resultSet) * raise */ - __Pyx_TraceLine(608,0,__PYX_ERR(17, 608, __pyx_L10_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._wrapXPathObject", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_11, &__pyx_t_13) < 0) __PYX_ERR(17, 608, __pyx_L10_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_11, &__pyx_t_13) < 0) __PYX_ERR(9, 608, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_11); __Pyx_GOTREF(__pyx_t_13); @@ -183534,7 +170949,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * raise * else: */ - __Pyx_TraceLine(609,0,__PYX_ERR(17, 609, __pyx_L10_except_error)) xmlXPathFreeNodeSet(__pyx_v_resultSet); /* "src/lxml/extensions.pxi":610 @@ -183544,13 +170958,12 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * else: * raise XPathResultError, f"Unknown return type: {python._fqtypename(obj).decode('utf8')}" */ - __Pyx_TraceLine(610,0,__PYX_ERR(17, 610, __pyx_L10_except_error)) __Pyx_GIVEREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_11, __pyx_t_13); __pyx_t_3 = 0; __pyx_t_11 = 0; __pyx_t_13 = 0; - __PYX_ERR(17, 610, __pyx_L10_except_error) + __PYX_ERR(9, 610, __pyx_L10_except_error) } __pyx_L10_except_error:; @@ -183586,17 +170999,16 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * return xpath.xmlXPathWrapNodeSet(resultSet) * */ - __Pyx_TraceLine(612,0,__PYX_ERR(17, 612, __pyx_L1_error)) /*else*/ { __pyx_t_14 = _fqtypename(__pyx_v_obj); - __pyx_t_13 = __Pyx_decode_c_string(__pyx_t_14, 0, strlen(__pyx_t_14), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_13)) __PYX_ERR(17, 612, __pyx_L1_error) + __pyx_t_13 = __Pyx_decode_c_string(__pyx_t_14, 0, strlen(__pyx_t_14), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_13)) __PYX_ERR(9, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_return_type, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(17, 612, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_return_type, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_XPathResultError), __pyx_t_11, 0, 0); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __PYX_ERR(17, 612, __pyx_L1_error) + __PYX_ERR(9, 612, __pyx_L1_error) } __pyx_L7:; @@ -183607,7 +171019,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o * * cdef object _unwrapXPathObject(xpath.xmlXPathObject* xpathObj, */ - __Pyx_TraceLine(613,0,__PYX_ERR(17, 613, __pyx_L1_error)) __pyx_r = xmlXPathWrapNodeSet(__pyx_v_resultSet); goto __pyx_L0; @@ -183630,7 +171041,6 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o __Pyx_XDECREF((PyObject *)__pyx_v_fake_node); __Pyx_XDECREF(__pyx_v_value); __Pyx_XDECREF(__pyx_v_obj); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -183646,13 +171056,11 @@ static xmlXPathObject *__pyx_f_4lxml_5etree__wrapXPathObject(PyObject *__pyx_v_o static PyObject *__pyx_f_4lxml_5etree__unwrapXPathObject(xmlXPathObject *__pyx_v_xpathObj, struct LxmlDocument *__pyx_v_doc, struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_v_context) { PyObject *__pyx_v_stringval = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_unwrapXPathObject", 0); - __Pyx_TraceCall("_unwrapXPathObject", __pyx_f[17], 615, 0, __PYX_ERR(17, 615, __pyx_L1_error)); /* "src/lxml/extensions.pxi":617 * cdef object _unwrapXPathObject(xpath.xmlXPathObject* xpathObj, @@ -183661,7 +171069,6 @@ static PyObject *__pyx_f_4lxml_5etree__unwrapXPathObject(xmlXPathObject *__pyx_v * raise XPathResultError, u"Undefined xpath result" * elif xpathObj.type == xpath.XPATH_NODESET: */ - __Pyx_TraceLine(617,0,__PYX_ERR(17, 617, __pyx_L1_error)) switch (__pyx_v_xpathObj->type) { case XPATH_UNDEFINED: @@ -183672,9 +171079,8 @@ static PyObject *__pyx_f_4lxml_5etree__unwrapXPathObject(xmlXPathObject *__pyx_v * elif xpathObj.type == xpath.XPATH_NODESET: * return _createNodeSetResult(xpathObj, doc, context) */ - __Pyx_TraceLine(618,0,__PYX_ERR(17, 618, __pyx_L1_error)) __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_XPathResultError), __pyx_kp_u_Undefined_xpath_result, 0, 0); - __PYX_ERR(17, 618, __pyx_L1_error) + __PYX_ERR(9, 618, __pyx_L1_error) /* "src/lxml/extensions.pxi":617 * cdef object _unwrapXPathObject(xpath.xmlXPathObject* xpathObj, @@ -183684,15 +171090,6 @@ static PyObject *__pyx_f_4lxml_5etree__unwrapXPathObject(xmlXPathObject *__pyx_v * elif xpathObj.type == xpath.XPATH_NODESET: */ break; - - /* "src/lxml/extensions.pxi":619 - * if xpathObj.type == xpath.XPATH_UNDEFINED: - * raise XPathResultError, u"Undefined xpath result" - * elif xpathObj.type == xpath.XPATH_NODESET: # <<<<<<<<<<<<<< - * return _createNodeSetResult(xpathObj, doc, context) - * elif xpathObj.type == xpath.XPATH_BOOLEAN: - */ - __Pyx_TraceLine(619,0,__PYX_ERR(17, 619, __pyx_L1_error)) case XPATH_NODESET: /* "src/lxml/extensions.pxi":620 @@ -183702,9 +171099,8 @@ static PyObject *__pyx_f_4lxml_5etree__unwrapXPathObject(xmlXPathObject *__pyx_v * elif xpathObj.type == xpath.XPATH_BOOLEAN: * return xpathObj.boolval */ - __Pyx_TraceLine(620,0,__PYX_ERR(17, 620, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree__createNodeSetResult(__pyx_v_xpathObj, __pyx_v_doc, __pyx_v_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 620, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__createNodeSetResult(__pyx_v_xpathObj, __pyx_v_doc, __pyx_v_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -183718,15 +171114,6 @@ static PyObject *__pyx_f_4lxml_5etree__unwrapXPathObject(xmlXPathObject *__pyx_v * elif xpathObj.type == xpath.XPATH_BOOLEAN: */ break; - - /* "src/lxml/extensions.pxi":621 - * elif xpathObj.type == xpath.XPATH_NODESET: - * return _createNodeSetResult(xpathObj, doc, context) - * elif xpathObj.type == xpath.XPATH_BOOLEAN: # <<<<<<<<<<<<<< - * return xpathObj.boolval - * elif xpathObj.type == xpath.XPATH_NUMBER: - */ - __Pyx_TraceLine(621,0,__PYX_ERR(17, 621, __pyx_L1_error)) case XPATH_BOOLEAN: /* "src/lxml/extensions.pxi":622 @@ -183736,9 +171123,8 @@ static PyObject *__pyx_f_4lxml_5etree__unwrapXPathObject(xmlXPathObject *__pyx_v * elif xpathObj.type == xpath.XPATH_NUMBER: * return xpathObj.floatval */ - __Pyx_TraceLine(622,0,__PYX_ERR(17, 622, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_xpathObj->boolval); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 622, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_xpathObj->boolval); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -183752,15 +171138,6 @@ static PyObject *__pyx_f_4lxml_5etree__unwrapXPathObject(xmlXPathObject *__pyx_v * elif xpathObj.type == xpath.XPATH_NUMBER: */ break; - - /* "src/lxml/extensions.pxi":623 - * elif xpathObj.type == xpath.XPATH_BOOLEAN: - * return xpathObj.boolval - * elif xpathObj.type == xpath.XPATH_NUMBER: # <<<<<<<<<<<<<< - * return xpathObj.floatval - * elif xpathObj.type == xpath.XPATH_STRING: - */ - __Pyx_TraceLine(623,0,__PYX_ERR(17, 623, __pyx_L1_error)) case XPATH_NUMBER: /* "src/lxml/extensions.pxi":624 @@ -183770,9 +171147,8 @@ static PyObject *__pyx_f_4lxml_5etree__unwrapXPathObject(xmlXPathObject *__pyx_v * elif xpathObj.type == xpath.XPATH_STRING: * stringval = funicode(xpathObj.stringval) */ - __Pyx_TraceLine(624,0,__PYX_ERR(17, 624, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_xpathObj->floatval); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 624, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_xpathObj->floatval); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -183786,15 +171162,6 @@ static PyObject *__pyx_f_4lxml_5etree__unwrapXPathObject(xmlXPathObject *__pyx_v * elif xpathObj.type == xpath.XPATH_STRING: */ break; - - /* "src/lxml/extensions.pxi":625 - * elif xpathObj.type == xpath.XPATH_NUMBER: - * return xpathObj.floatval - * elif xpathObj.type == xpath.XPATH_STRING: # <<<<<<<<<<<<<< - * stringval = funicode(xpathObj.stringval) - * if context._build_smart_strings: - */ - __Pyx_TraceLine(625,0,__PYX_ERR(17, 625, __pyx_L1_error)) case XPATH_STRING: /* "src/lxml/extensions.pxi":626 @@ -183804,8 +171171,7 @@ static PyObject *__pyx_f_4lxml_5etree__unwrapXPathObject(xmlXPathObject *__pyx_v * if context._build_smart_strings: * stringval = _elementStringResultFactory( */ - __Pyx_TraceLine(626,0,__PYX_ERR(17, 626, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_funicode(__pyx_v_xpathObj->stringval); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 626, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_funicode(__pyx_v_xpathObj->stringval); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_stringval = __pyx_t_1; __pyx_t_1 = 0; @@ -183817,7 +171183,6 @@ static PyObject *__pyx_f_4lxml_5etree__unwrapXPathObject(xmlXPathObject *__pyx_v * stringval = _elementStringResultFactory( * stringval, None, None, 0) */ - __Pyx_TraceLine(627,0,__PYX_ERR(17, 627, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_context->_build_smart_strings != 0); if (__pyx_t_2) { @@ -183828,8 +171193,7 @@ static PyObject *__pyx_f_4lxml_5etree__unwrapXPathObject(xmlXPathObject *__pyx_v * stringval, None, None, 0) * return stringval */ - __Pyx_TraceLine(628,0,__PYX_ERR(17, 628, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__elementStringResultFactory(__pyx_v_stringval, ((struct LxmlElement *)Py_None), Py_None, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 628, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__elementStringResultFactory(__pyx_v_stringval, ((struct LxmlElement *)Py_None), Py_None, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_stringval, __pyx_t_1); __pyx_t_1 = 0; @@ -183850,7 +171214,6 @@ static PyObject *__pyx_f_4lxml_5etree__unwrapXPathObject(xmlXPathObject *__pyx_v * elif xpathObj.type == xpath.XPATH_POINT: * raise NotImplementedError, u"XPATH_POINT" */ - __Pyx_TraceLine(630,0,__PYX_ERR(17, 630, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_stringval); __pyx_r = __pyx_v_stringval; @@ -183864,15 +171227,6 @@ static PyObject *__pyx_f_4lxml_5etree__unwrapXPathObject(xmlXPathObject *__pyx_v * if context._build_smart_strings: */ break; - - /* "src/lxml/extensions.pxi":631 - * stringval, None, None, 0) - * return stringval - * elif xpathObj.type == xpath.XPATH_POINT: # <<<<<<<<<<<<<< - * raise NotImplementedError, u"XPATH_POINT" - * elif xpathObj.type == xpath.XPATH_RANGE: - */ - __Pyx_TraceLine(631,0,__PYX_ERR(17, 631, __pyx_L1_error)) case XPATH_POINT: /* "src/lxml/extensions.pxi":632 @@ -183882,9 +171236,8 @@ static PyObject *__pyx_f_4lxml_5etree__unwrapXPathObject(xmlXPathObject *__pyx_v * elif xpathObj.type == xpath.XPATH_RANGE: * raise NotImplementedError, u"XPATH_RANGE" */ - __Pyx_TraceLine(632,0,__PYX_ERR(17, 632, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_NotImplementedError, __pyx_n_u_XPATH_POINT, 0, 0); - __PYX_ERR(17, 632, __pyx_L1_error) + __PYX_ERR(9, 632, __pyx_L1_error) /* "src/lxml/extensions.pxi":631 * stringval, None, None, 0) @@ -183894,15 +171247,6 @@ static PyObject *__pyx_f_4lxml_5etree__unwrapXPathObject(xmlXPathObject *__pyx_v * elif xpathObj.type == xpath.XPATH_RANGE: */ break; - - /* "src/lxml/extensions.pxi":633 - * elif xpathObj.type == xpath.XPATH_POINT: - * raise NotImplementedError, u"XPATH_POINT" - * elif xpathObj.type == xpath.XPATH_RANGE: # <<<<<<<<<<<<<< - * raise NotImplementedError, u"XPATH_RANGE" - * elif xpathObj.type == xpath.XPATH_LOCATIONSET: - */ - __Pyx_TraceLine(633,0,__PYX_ERR(17, 633, __pyx_L1_error)) case XPATH_RANGE: /* "src/lxml/extensions.pxi":634 @@ -183912,9 +171256,8 @@ static PyObject *__pyx_f_4lxml_5etree__unwrapXPathObject(xmlXPathObject *__pyx_v * elif xpathObj.type == xpath.XPATH_LOCATIONSET: * raise NotImplementedError, u"XPATH_LOCATIONSET" */ - __Pyx_TraceLine(634,0,__PYX_ERR(17, 634, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_NotImplementedError, __pyx_n_u_XPATH_RANGE, 0, 0); - __PYX_ERR(17, 634, __pyx_L1_error) + __PYX_ERR(9, 634, __pyx_L1_error) /* "src/lxml/extensions.pxi":633 * elif xpathObj.type == xpath.XPATH_POINT: @@ -183924,15 +171267,6 @@ static PyObject *__pyx_f_4lxml_5etree__unwrapXPathObject(xmlXPathObject *__pyx_v * elif xpathObj.type == xpath.XPATH_LOCATIONSET: */ break; - - /* "src/lxml/extensions.pxi":635 - * elif xpathObj.type == xpath.XPATH_RANGE: - * raise NotImplementedError, u"XPATH_RANGE" - * elif xpathObj.type == xpath.XPATH_LOCATIONSET: # <<<<<<<<<<<<<< - * raise NotImplementedError, u"XPATH_LOCATIONSET" - * elif xpathObj.type == xpath.XPATH_USERS: - */ - __Pyx_TraceLine(635,0,__PYX_ERR(17, 635, __pyx_L1_error)) case XPATH_LOCATIONSET: /* "src/lxml/extensions.pxi":636 @@ -183942,9 +171276,8 @@ static PyObject *__pyx_f_4lxml_5etree__unwrapXPathObject(xmlXPathObject *__pyx_v * elif xpathObj.type == xpath.XPATH_USERS: * raise NotImplementedError, u"XPATH_USERS" */ - __Pyx_TraceLine(636,0,__PYX_ERR(17, 636, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_NotImplementedError, __pyx_n_u_XPATH_LOCATIONSET, 0, 0); - __PYX_ERR(17, 636, __pyx_L1_error) + __PYX_ERR(9, 636, __pyx_L1_error) /* "src/lxml/extensions.pxi":635 * elif xpathObj.type == xpath.XPATH_RANGE: @@ -183954,15 +171287,6 @@ static PyObject *__pyx_f_4lxml_5etree__unwrapXPathObject(xmlXPathObject *__pyx_v * elif xpathObj.type == xpath.XPATH_USERS: */ break; - - /* "src/lxml/extensions.pxi":637 - * elif xpathObj.type == xpath.XPATH_LOCATIONSET: - * raise NotImplementedError, u"XPATH_LOCATIONSET" - * elif xpathObj.type == xpath.XPATH_USERS: # <<<<<<<<<<<<<< - * raise NotImplementedError, u"XPATH_USERS" - * elif xpathObj.type == xpath.XPATH_XSLT_TREE: - */ - __Pyx_TraceLine(637,0,__PYX_ERR(17, 637, __pyx_L1_error)) case XPATH_USERS: /* "src/lxml/extensions.pxi":638 @@ -183972,9 +171296,8 @@ static PyObject *__pyx_f_4lxml_5etree__unwrapXPathObject(xmlXPathObject *__pyx_v * elif xpathObj.type == xpath.XPATH_XSLT_TREE: * return _createNodeSetResult(xpathObj, doc, context) */ - __Pyx_TraceLine(638,0,__PYX_ERR(17, 638, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_NotImplementedError, __pyx_n_u_XPATH_USERS, 0, 0); - __PYX_ERR(17, 638, __pyx_L1_error) + __PYX_ERR(9, 638, __pyx_L1_error) /* "src/lxml/extensions.pxi":637 * elif xpathObj.type == xpath.XPATH_LOCATIONSET: @@ -183984,15 +171307,6 @@ static PyObject *__pyx_f_4lxml_5etree__unwrapXPathObject(xmlXPathObject *__pyx_v * elif xpathObj.type == xpath.XPATH_XSLT_TREE: */ break; - - /* "src/lxml/extensions.pxi":639 - * elif xpathObj.type == xpath.XPATH_USERS: - * raise NotImplementedError, u"XPATH_USERS" - * elif xpathObj.type == xpath.XPATH_XSLT_TREE: # <<<<<<<<<<<<<< - * return _createNodeSetResult(xpathObj, doc, context) - * else: - */ - __Pyx_TraceLine(639,0,__PYX_ERR(17, 639, __pyx_L1_error)) case XPATH_XSLT_TREE: /* "src/lxml/extensions.pxi":640 @@ -184002,9 +171316,8 @@ static PyObject *__pyx_f_4lxml_5etree__unwrapXPathObject(xmlXPathObject *__pyx_v * else: * raise XPathResultError, f"Unknown xpath result {xpathObj.type}" */ - __Pyx_TraceLine(640,0,__PYX_ERR(17, 640, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree__createNodeSetResult(__pyx_v_xpathObj, __pyx_v_doc, __pyx_v_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 640, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__createNodeSetResult(__pyx_v_xpathObj, __pyx_v_doc, __pyx_v_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -184027,15 +171340,14 @@ static PyObject *__pyx_f_4lxml_5etree__unwrapXPathObject(xmlXPathObject *__pyx_v * * cdef object _createNodeSetResult(xpath.xmlXPathObject* xpathObj, _Document doc, */ - __Pyx_TraceLine(642,0,__PYX_ERR(17, 642, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyUnicode_From_xmlXPathObjectType(__pyx_v_xpathObj->type, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 642, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_From_xmlXPathObjectType(__pyx_v_xpathObj->type, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_xpath_result, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 642, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_xpath_result, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_XPathResultError), __pyx_t_3, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(17, 642, __pyx_L1_error) + __PYX_ERR(9, 642, __pyx_L1_error) break; } @@ -184056,7 +171368,6 @@ static PyObject *__pyx_f_4lxml_5etree__unwrapXPathObject(xmlXPathObject *__pyx_v __pyx_L0:; __Pyx_XDECREF(__pyx_v_stringval); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -184074,7 +171385,6 @@ static PyObject *__pyx_f_4lxml_5etree__createNodeSetResult(xmlXPathObject *__pyx int __pyx_v_i; PyObject *__pyx_v_result = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -184082,7 +171392,6 @@ static PyObject *__pyx_f_4lxml_5etree__createNodeSetResult(xmlXPathObject *__pyx int __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("_createNodeSetResult", 0); - __Pyx_TraceCall("_createNodeSetResult", __pyx_f[17], 644, 0, __PYX_ERR(17, 644, __pyx_L1_error)); /* "src/lxml/extensions.pxi":649 * cdef int i @@ -184091,8 +171400,7 @@ static PyObject *__pyx_f_4lxml_5etree__createNodeSetResult(xmlXPathObject *__pyx * if xpathObj.nodesetval is NULL: * return result */ - __Pyx_TraceLine(649,0,__PYX_ERR(17, 649, __pyx_L1_error)) - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 649, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; @@ -184104,7 +171412,6 @@ static PyObject *__pyx_f_4lxml_5etree__createNodeSetResult(xmlXPathObject *__pyx * return result * for i in range(xpathObj.nodesetval.nodeNr): */ - __Pyx_TraceLine(650,0,__PYX_ERR(17, 650, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_xpathObj->nodesetval == NULL) != 0); if (__pyx_t_2) { @@ -184115,7 +171422,6 @@ static PyObject *__pyx_f_4lxml_5etree__createNodeSetResult(xmlXPathObject *__pyx * for i in range(xpathObj.nodesetval.nodeNr): * c_node = xpathObj.nodesetval.nodeTab[i] */ - __Pyx_TraceLine(651,0,__PYX_ERR(17, 651, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; @@ -184137,7 +171443,6 @@ static PyObject *__pyx_f_4lxml_5etree__createNodeSetResult(xmlXPathObject *__pyx * c_node = xpathObj.nodesetval.nodeTab[i] * _unpackNodeSetEntry(result, c_node, doc, context, */ - __Pyx_TraceLine(652,0,__PYX_ERR(17, 652, __pyx_L1_error)) __pyx_t_3 = __pyx_v_xpathObj->nodesetval->nodeNr; __pyx_t_4 = __pyx_t_3; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { @@ -184150,7 +171455,6 @@ static PyObject *__pyx_f_4lxml_5etree__createNodeSetResult(xmlXPathObject *__pyx * _unpackNodeSetEntry(result, c_node, doc, context, * xpathObj.type == xpath.XPATH_XSLT_TREE) */ - __Pyx_TraceLine(653,0,__PYX_ERR(17, 653, __pyx_L1_error)) __pyx_v_c_node = (__pyx_v_xpathObj->nodesetval->nodeTab[__pyx_v_i]); /* "src/lxml/extensions.pxi":654 @@ -184160,8 +171464,7 @@ static PyObject *__pyx_f_4lxml_5etree__createNodeSetResult(xmlXPathObject *__pyx * xpathObj.type == xpath.XPATH_XSLT_TREE) * return result */ - __Pyx_TraceLine(654,0,__PYX_ERR(17, 654, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__unpackNodeSetEntry(__pyx_v_result, __pyx_v_c_node, __pyx_v_doc, __pyx_v_context, (__pyx_v_xpathObj->type == XPATH_XSLT_TREE)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 654, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__unpackNodeSetEntry(__pyx_v_result, __pyx_v_c_node, __pyx_v_doc, __pyx_v_context, (__pyx_v_xpathObj->type == XPATH_XSLT_TREE)); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -184173,7 +171476,6 @@ static PyObject *__pyx_f_4lxml_5etree__createNodeSetResult(xmlXPathObject *__pyx * * cdef _unpackNodeSetEntry(list results, xmlNode* c_node, _Document doc, */ - __Pyx_TraceLine(656,0,__PYX_ERR(17, 656, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; @@ -184195,7 +171497,6 @@ static PyObject *__pyx_f_4lxml_5etree__createNodeSetResult(xmlXPathObject *__pyx __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -184211,7 +171512,6 @@ static PyObject *__pyx_f_4lxml_5etree__createNodeSetResult(xmlXPathObject *__pyx static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_results, xmlNode *__pyx_v_c_node, struct LxmlDocument *__pyx_v_doc, struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_v_context, int __pyx_v_is_fragment) { xmlNode *__pyx_v_c_child; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -184221,7 +171521,6 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu PyObject *__pyx_t_6 = NULL; xmlNode *__pyx_t_7; __Pyx_RefNannySetupContext("_unpackNodeSetEntry", 0); - __Pyx_TraceCall("_unpackNodeSetEntry", __pyx_f[17], 658, 0, __PYX_ERR(17, 658, __pyx_L1_error)); /* "src/lxml/extensions.pxi":661 * _BaseContext context, bint is_fragment): @@ -184230,7 +171529,6 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * if c_node.doc != doc._c_doc and c_node.doc._private is NULL: * # XXX: works, but maybe not always the right thing to do? */ - __Pyx_TraceLine(661,0,__PYX_ERR(17, 661, __pyx_L1_error)) __pyx_t_1 = (_isElement(__pyx_v_c_node) != 0); if (__pyx_t_1) { @@ -184241,7 +171539,6 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * # XXX: works, but maybe not always the right thing to do? * # XPath: only runs when extensions create or copy trees */ - __Pyx_TraceLine(662,0,__PYX_ERR(17, 662, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node->doc != __pyx_v_doc->_c_doc) != 0); if (__pyx_t_2) { } else { @@ -184260,7 +171557,6 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * # FIXME: call _instantiateElementFromXPath() instead? * results.append( */ - __Pyx_TraceLine(667,0,__PYX_ERR(17, 667, __pyx_L1_error)) __pyx_v_c_node = xmlDocCopyNode(__pyx_v_c_node, __pyx_v_doc->_c_doc, 1); /* "src/lxml/extensions.pxi":662 @@ -184279,10 +171575,9 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * _fakeDocElementFactory(doc, c_node)) * elif c_node.type == tree.XML_TEXT_NODE or \ */ - __Pyx_TraceLine(669,0,__PYX_ERR(17, 669, __pyx_L1_error)) if (unlikely(__pyx_v_results == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(17, 669, __pyx_L1_error) + __PYX_ERR(9, 669, __pyx_L1_error) } /* "src/lxml/extensions.pxi":670 @@ -184292,8 +171587,7 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * elif c_node.type == tree.XML_TEXT_NODE or \ * c_node.type == tree.XML_CDATA_SECTION_NODE or \ */ - __Pyx_TraceLine(670,0,__PYX_ERR(17, 670, __pyx_L1_error)) - __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__fakeDocElementFactory(__pyx_v_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 670, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__fakeDocElementFactory(__pyx_v_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "src/lxml/extensions.pxi":669 @@ -184303,8 +171597,7 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * _fakeDocElementFactory(doc, c_node)) * elif c_node.type == tree.XML_TEXT_NODE or \ */ - __Pyx_TraceLine(669,0,__PYX_ERR(17, 669, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_results, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(17, 669, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_results, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(9, 669, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/lxml/extensions.pxi":661 @@ -184324,9 +171617,9 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * c_node.type == tree.XML_CDATA_SECTION_NODE or \ * c_node.type == tree.XML_ATTRIBUTE_NODE: */ - __Pyx_TraceLine(671,0,__PYX_ERR(17, 671, __pyx_L1_error)) switch (__pyx_v_c_node->type) { case XML_TEXT_NODE: + case XML_CDATA_SECTION_NODE: /* "src/lxml/extensions.pxi":672 * _fakeDocElementFactory(doc, c_node)) @@ -184335,17 +171628,6 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * c_node.type == tree.XML_ATTRIBUTE_NODE: * results.append( */ - __Pyx_TraceLine(672,0,__PYX_ERR(17, 672, __pyx_L1_error)) - case XML_CDATA_SECTION_NODE: - - /* "src/lxml/extensions.pxi":673 - * elif c_node.type == tree.XML_TEXT_NODE or \ - * c_node.type == tree.XML_CDATA_SECTION_NODE or \ - * c_node.type == tree.XML_ATTRIBUTE_NODE: # <<<<<<<<<<<<<< - * results.append( - * _buildElementStringResult(doc, c_node, context)) - */ - __Pyx_TraceLine(673,0,__PYX_ERR(17, 673, __pyx_L1_error)) case XML_ATTRIBUTE_NODE: /* "src/lxml/extensions.pxi":671 @@ -184355,7 +171637,6 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * c_node.type == tree.XML_CDATA_SECTION_NODE or \ * c_node.type == tree.XML_ATTRIBUTE_NODE: */ - __Pyx_TraceLine(671,0,__PYX_ERR(17, 671, __pyx_L1_error)) __pyx_t_1 = 1; break; default: @@ -184371,10 +171652,9 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * _buildElementStringResult(doc, c_node, context)) * elif c_node.type == tree.XML_NAMESPACE_DECL: */ - __Pyx_TraceLine(674,0,__PYX_ERR(17, 674, __pyx_L1_error)) if (unlikely(__pyx_v_results == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(17, 674, __pyx_L1_error) + __PYX_ERR(9, 674, __pyx_L1_error) } /* "src/lxml/extensions.pxi":675 @@ -184384,8 +171664,7 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * elif c_node.type == tree.XML_NAMESPACE_DECL: * results.append( (funicodeOrNone((c_node).prefix), */ - __Pyx_TraceLine(675,0,__PYX_ERR(17, 675, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree__buildElementStringResult(__pyx_v_doc, __pyx_v_c_node, __pyx_v_context); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 675, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__buildElementStringResult(__pyx_v_doc, __pyx_v_c_node, __pyx_v_context); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "src/lxml/extensions.pxi":674 @@ -184395,8 +171674,7 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * _buildElementStringResult(doc, c_node, context)) * elif c_node.type == tree.XML_NAMESPACE_DECL: */ - __Pyx_TraceLine(674,0,__PYX_ERR(17, 674, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_results, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(17, 674, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_results, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(9, 674, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/lxml/extensions.pxi":671 @@ -184416,7 +171694,6 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * results.append( (funicodeOrNone((c_node).prefix), * funicodeOrNone((c_node).href)) ) */ - __Pyx_TraceLine(676,0,__PYX_ERR(17, 676, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node->type == XML_NAMESPACE_DECL) != 0); if (__pyx_t_1) { @@ -184427,12 +171704,11 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * funicodeOrNone((c_node).href)) ) * elif c_node.type == tree.XML_DOCUMENT_NODE or \ */ - __Pyx_TraceLine(677,0,__PYX_ERR(17, 677, __pyx_L1_error)) if (unlikely(__pyx_v_results == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(17, 677, __pyx_L1_error) + __PYX_ERR(9, 677, __pyx_L1_error) } - __pyx_t_3 = __pyx_f_4lxml_5etree_funicodeOrNone(((xmlNs *)__pyx_v_c_node)->prefix); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 677, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_funicodeOrNone(((xmlNs *)__pyx_v_c_node)->prefix); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "src/lxml/extensions.pxi":678 @@ -184442,8 +171718,7 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * elif c_node.type == tree.XML_DOCUMENT_NODE or \ * c_node.type == tree.XML_HTML_DOCUMENT_NODE: */ - __Pyx_TraceLine(678,0,__PYX_ERR(17, 678, __pyx_L1_error)) - __pyx_t_5 = __pyx_f_4lxml_5etree_funicodeOrNone(((xmlNs *)__pyx_v_c_node)->href); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 678, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree_funicodeOrNone(((xmlNs *)__pyx_v_c_node)->href); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); /* "src/lxml/extensions.pxi":677 @@ -184453,8 +171728,7 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * funicodeOrNone((c_node).href)) ) * elif c_node.type == tree.XML_DOCUMENT_NODE or \ */ - __Pyx_TraceLine(677,0,__PYX_ERR(17, 677, __pyx_L1_error)) - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 677, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); @@ -184462,7 +171736,7 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_5 = 0; - __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_results, __pyx_t_6); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(17, 677, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_results, __pyx_t_6); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(9, 677, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "src/lxml/extensions.pxi":676 @@ -184482,9 +171756,9 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * c_node.type == tree.XML_HTML_DOCUMENT_NODE: * # ignored for everything but result tree fragments */ - __Pyx_TraceLine(679,0,__PYX_ERR(17, 679, __pyx_L1_error)) switch (__pyx_v_c_node->type) { case XML_DOCUMENT_NODE: + case XML_HTML_DOCUMENT_NODE: /* "src/lxml/extensions.pxi":680 * funicodeOrNone((c_node).href)) ) @@ -184493,8 +171767,7 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * # ignored for everything but result tree fragments * if is_fragment: */ - __Pyx_TraceLine(680,0,__PYX_ERR(17, 680, __pyx_L1_error)) - case XML_HTML_DOCUMENT_NODE: + __pyx_t_1 = 1; /* "src/lxml/extensions.pxi":679 * results.append( (funicodeOrNone((c_node).prefix), @@ -184503,8 +171776,6 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * c_node.type == tree.XML_HTML_DOCUMENT_NODE: * # ignored for everything but result tree fragments */ - __Pyx_TraceLine(679,0,__PYX_ERR(17, 679, __pyx_L1_error)) - __pyx_t_1 = 1; break; default: __pyx_t_1 = 0; @@ -184519,7 +171790,6 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * c_child = c_node.children * while c_child is not NULL: */ - __Pyx_TraceLine(682,0,__PYX_ERR(17, 682, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_is_fragment != 0); if (__pyx_t_1) { @@ -184530,7 +171800,6 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * while c_child is not NULL: * _unpackNodeSetEntry(results, c_child, doc, context, 0) */ - __Pyx_TraceLine(683,0,__PYX_ERR(17, 683, __pyx_L1_error)) __pyx_t_7 = __pyx_v_c_node->children; __pyx_v_c_child = __pyx_t_7; @@ -184541,7 +171810,6 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * _unpackNodeSetEntry(results, c_child, doc, context, 0) * c_child = c_child.next */ - __Pyx_TraceLine(684,0,__PYX_ERR(17, 684, __pyx_L1_error)) while (1) { __pyx_t_1 = ((__pyx_v_c_child != NULL) != 0); if (!__pyx_t_1) break; @@ -184553,8 +171821,7 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * c_child = c_child.next * elif c_node.type == tree.XML_XINCLUDE_START or \ */ - __Pyx_TraceLine(685,0,__PYX_ERR(17, 685, __pyx_L1_error)) - __pyx_t_6 = __pyx_f_4lxml_5etree__unpackNodeSetEntry(__pyx_v_results, __pyx_v_c_child, __pyx_v_doc, __pyx_v_context, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 685, __pyx_L1_error) + __pyx_t_6 = __pyx_f_4lxml_5etree__unpackNodeSetEntry(__pyx_v_results, __pyx_v_c_child, __pyx_v_doc, __pyx_v_context, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -184565,7 +171832,6 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * elif c_node.type == tree.XML_XINCLUDE_START or \ * c_node.type == tree.XML_XINCLUDE_END: */ - __Pyx_TraceLine(686,0,__PYX_ERR(17, 686, __pyx_L1_error)) __pyx_t_7 = __pyx_v_c_child->next; __pyx_v_c_child = __pyx_t_7; } @@ -184596,9 +171862,9 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * c_node.type == tree.XML_XINCLUDE_END: * pass */ - __Pyx_TraceLine(687,0,__PYX_ERR(17, 687, __pyx_L1_error)) switch (__pyx_v_c_node->type) { case XML_XINCLUDE_START: + case XML_XINCLUDE_END: /* "src/lxml/extensions.pxi":688 * c_child = c_child.next @@ -184607,8 +171873,7 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * pass * else: */ - __Pyx_TraceLine(688,0,__PYX_ERR(17, 688, __pyx_L1_error)) - case XML_XINCLUDE_END: + __pyx_t_1 = 1; /* "src/lxml/extensions.pxi":687 * _unpackNodeSetEntry(results, c_child, doc, context, 0) @@ -184617,8 +171882,6 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * c_node.type == tree.XML_XINCLUDE_END: * pass */ - __Pyx_TraceLine(687,0,__PYX_ERR(17, 687, __pyx_L1_error)) - __pyx_t_1 = 1; break; default: __pyx_t_1 = 0; @@ -184635,7 +171898,6 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * f"Not yet implemented result node type: {c_node.type}" * */ - __Pyx_TraceLine(691,0,__PYX_ERR(17, 691, __pyx_L1_error)) /*else*/ { /* "src/lxml/extensions.pxi":692 @@ -184645,15 +171907,14 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu * * cdef void _freeXPathObject(xpath.xmlXPathObject* xpathObj): */ - __Pyx_TraceLine(692,0,__PYX_ERR(17, 692, __pyx_L1_error)) - __pyx_t_6 = __Pyx_PyUnicode_From_xmlElementType(__pyx_v_c_node->type, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 692, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_From_xmlElementType(__pyx_v_c_node->type, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Not_yet_implemented_result_node, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 692, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Not_yet_implemented_result_node, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_builtin_NotImplementedError, __pyx_t_5, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(17, 691, __pyx_L1_error) + __PYX_ERR(9, 691, __pyx_L1_error) } __pyx_L3:; @@ -184676,7 +171937,6 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -184690,11 +171950,9 @@ static PyObject *__pyx_f_4lxml_5etree__unpackNodeSetEntry(PyObject *__pyx_v_resu */ static void __pyx_f_4lxml_5etree__freeXPathObject(xmlXPathObject *__pyx_v_xpathObj) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_freeXPathObject", 0); - __Pyx_TraceCall("_freeXPathObject", __pyx_f[17], 694, 0, __PYX_ERR(17, 694, __pyx_L1_error)); /* "src/lxml/extensions.pxi":698 * Python dealloc will do that for us. @@ -184703,7 +171961,6 @@ static void __pyx_f_4lxml_5etree__freeXPathObject(xmlXPathObject *__pyx_v_xpathO * xpath.xmlXPathFreeNodeSet(xpathObj.nodesetval) * xpathObj.nodesetval = NULL */ - __Pyx_TraceLine(698,0,__PYX_ERR(17, 698, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_xpathObj->nodesetval != NULL) != 0); if (__pyx_t_1) { @@ -184714,7 +171971,6 @@ static void __pyx_f_4lxml_5etree__freeXPathObject(xmlXPathObject *__pyx_v_xpathO * xpathObj.nodesetval = NULL * xpath.xmlXPathFreeObject(xpathObj) */ - __Pyx_TraceLine(699,0,__PYX_ERR(17, 699, __pyx_L1_error)) xmlXPathFreeNodeSet(__pyx_v_xpathObj->nodesetval); /* "src/lxml/extensions.pxi":700 @@ -184724,7 +171980,6 @@ static void __pyx_f_4lxml_5etree__freeXPathObject(xmlXPathObject *__pyx_v_xpathO * xpath.xmlXPathFreeObject(xpathObj) * */ - __Pyx_TraceLine(700,0,__PYX_ERR(17, 700, __pyx_L1_error)) __pyx_v_xpathObj->nodesetval = NULL; /* "src/lxml/extensions.pxi":698 @@ -184743,7 +171998,6 @@ static void __pyx_f_4lxml_5etree__freeXPathObject(xmlXPathObject *__pyx_v_xpathO * * cdef _Element _instantiateElementFromXPath(xmlNode* c_node, _Document doc, */ - __Pyx_TraceLine(701,0,__PYX_ERR(17, 701, __pyx_L1_error)) xmlXPathFreeObject(__pyx_v_xpathObj); /* "src/lxml/extensions.pxi":694 @@ -184755,11 +172009,6 @@ static void __pyx_f_4lxml_5etree__freeXPathObject(xmlXPathObject *__pyx_v_xpathO */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._freeXPathObject", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -184774,13 +172023,11 @@ static void __pyx_f_4lxml_5etree__freeXPathObject(xmlXPathObject *__pyx_v_xpathO static struct LxmlElement *__pyx_f_4lxml_5etree__instantiateElementFromXPath(xmlNode *__pyx_v_c_node, struct LxmlDocument *__pyx_v_doc, struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_v_context) { struct LxmlDocument *__pyx_v_node_doc = NULL; struct LxmlElement *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_instantiateElementFromXPath", 0); - __Pyx_TraceCall("_instantiateElementFromXPath", __pyx_f[17], 703, 0, __PYX_ERR(17, 703, __pyx_L1_error)); __Pyx_INCREF((PyObject *)__pyx_v_doc); /* "src/lxml/extensions.pxi":706 @@ -184790,7 +172037,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__instantiateElementFromXPath(xml * # not from the context document and not from a fake document * # either => may still be from a known document, e.g. one */ - __Pyx_TraceLine(706,0,__PYX_ERR(17, 706, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node->doc != __pyx_v_doc->_c_doc) != 0); if (__pyx_t_2) { } else { @@ -184809,8 +172055,7 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__instantiateElementFromXPath(xml * if node_doc is None: * # not from a known document at all! => can only make a */ - __Pyx_TraceLine(710,0,__PYX_ERR(17, 710, __pyx_L1_error)) - __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree_12_BaseContext__findDocumentForNode(__pyx_v_context, __pyx_v_c_node)); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 710, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree_12_BaseContext__findDocumentForNode(__pyx_v_context, __pyx_v_c_node)); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_node_doc = ((struct LxmlDocument *)__pyx_t_3); __pyx_t_3 = 0; @@ -184822,7 +172067,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__instantiateElementFromXPath(xml * # not from a known document at all! => can only make a * # safety copy here */ - __Pyx_TraceLine(711,0,__PYX_ERR(17, 711, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_node_doc) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -184834,7 +172078,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__instantiateElementFromXPath(xml * else: * doc = node_doc */ - __Pyx_TraceLine(714,0,__PYX_ERR(17, 714, __pyx_L1_error)) __pyx_v_c_node = xmlDocCopyNode(__pyx_v_c_node, __pyx_v_doc->_c_doc, 1); /* "src/lxml/extensions.pxi":711 @@ -184854,7 +172097,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__instantiateElementFromXPath(xml * return _fakeDocElementFactory(doc, c_node) * */ - __Pyx_TraceLine(716,0,__PYX_ERR(17, 716, __pyx_L1_error)) /*else*/ { __Pyx_INCREF(((PyObject *)__pyx_v_node_doc)); __Pyx_DECREF_SET(__pyx_v_doc, __pyx_v_node_doc); @@ -184877,9 +172119,8 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__instantiateElementFromXPath(xml * * ################################################################################ */ - __Pyx_TraceLine(717,0,__PYX_ERR(17, 717, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__fakeDocElementFactory(__pyx_v_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 717, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__fakeDocElementFactory(__pyx_v_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((struct LxmlElement *)__pyx_t_3); __pyx_t_3 = 0; @@ -184902,7 +172143,6 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__instantiateElementFromXPath(xml __Pyx_XDECREF((PyObject *)__pyx_v_node_doc); __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -184931,11 +172171,8 @@ static PyObject *__pyx_pw_4lxml_5etree_21_ElementUnicodeResult_1getparent(PyObje static PyObject *__pyx_pf_4lxml_5etree_21_ElementUnicodeResult_getparent(struct __pyx_obj_4lxml_5etree__ElementUnicodeResult *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - __Pyx_TraceFrameInit(__pyx_codeobj__339) __Pyx_RefNannySetupContext("getparent", 0); - __Pyx_TraceCall("getparent", __pyx_f[17], 730, 0, __PYX_ERR(17, 730, __pyx_L1_error)); /* "src/lxml/extensions.pxi":731 * @@ -184944,7 +172181,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ElementUnicodeResult_getparent(struct * * cdef object _PyElementUnicodeResult */ - __Pyx_TraceLine(731,0,__PYX_ERR(17, 731, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->_parent)); __pyx_r = ((PyObject *)__pyx_v_self->_parent); @@ -184959,12 +172195,8 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ElementUnicodeResult_getparent(struct */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._ElementUnicodeResult.getparent", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -184992,22 +172224,16 @@ static PyObject *__pyx_pw_4lxml_5etree_21_ElementUnicodeResult_8attrname_1__get_ static PyObject *__pyx_pf_4lxml_5etree_21_ElementUnicodeResult_8attrname___get__(struct __pyx_obj_4lxml_5etree__ElementUnicodeResult *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[17], 725, 0, __PYX_ERR(17, 725, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->attrname); __pyx_r = __pyx_v_self->attrname; goto __pyx_L0; /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._ElementUnicodeResult.attrname.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -185035,13 +172261,11 @@ static PyObject *__pyx_pw_4lxml_5etree_21_ElementUnicodeResult_7is_tail_1__get__ static PyObject *__pyx_pf_4lxml_5etree_21_ElementUnicodeResult_7is_tail___get__(struct __pyx_obj_4lxml_5etree__ElementUnicodeResult *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[17], 726, 0, __PYX_ERR(17, 726, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_tail); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 726, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_tail); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 726, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -185054,7 +172278,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ElementUnicodeResult_7is_tail___get__( __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -185082,13 +172305,11 @@ static PyObject *__pyx_pw_4lxml_5etree_21_ElementUnicodeResult_7is_text_1__get__ static PyObject *__pyx_pf_4lxml_5etree_21_ElementUnicodeResult_7is_text___get__(struct __pyx_obj_4lxml_5etree__ElementUnicodeResult *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[17], 727, 0, __PYX_ERR(17, 727, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 727, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -185101,7 +172322,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ElementUnicodeResult_7is_text___get__( __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -185129,13 +172349,11 @@ static PyObject *__pyx_pw_4lxml_5etree_21_ElementUnicodeResult_12is_attribute_1_ static PyObject *__pyx_pf_4lxml_5etree_21_ElementUnicodeResult_12is_attribute___get__(struct __pyx_obj_4lxml_5etree__ElementUnicodeResult *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[17], 728, 0, __PYX_ERR(17, 728, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_attribute); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 728, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_attribute); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -185148,7 +172366,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ElementUnicodeResult_12is_attribute___ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -185177,12 +172394,9 @@ static PyObject *__pyx_pw_4lxml_5etree_23_PyElementUnicodeResult_1getparent(PyOb static PyObject *__pyx_pf_4lxml_5etree_23_PyElementUnicodeResult_getparent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__340) __Pyx_RefNannySetupContext("getparent", 0); - __Pyx_TraceCall("getparent", __pyx_f[17], 738, 0, __PYX_ERR(17, 738, __pyx_L1_error)); /* "src/lxml/extensions.pxi":739 * # https://bitbucket.org/pypy/pypy/issues/2021/pypy3-pytype_ready-crashes-for-extension @@ -185191,9 +172405,8 @@ static PyObject *__pyx_pf_4lxml_5etree_23_PyElementUnicodeResult_getparent(CYTHO * * class _ElementStringResult(bytes): */ - __Pyx_TraceLine(739,0,__PYX_ERR(17, 739, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 739, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -185214,7 +172427,6 @@ static PyObject *__pyx_pf_4lxml_5etree_23_PyElementUnicodeResult_getparent(CYTHO __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -185243,12 +172455,9 @@ static PyObject *__pyx_pw_4lxml_5etree_20_ElementStringResult_1getparent(PyObjec static PyObject *__pyx_pf_4lxml_5etree_20_ElementStringResult_getparent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__341) __Pyx_RefNannySetupContext("getparent", 0); - __Pyx_TraceCall("getparent", __pyx_f[17], 744, 0, __PYX_ERR(17, 744, __pyx_L1_error)); /* "src/lxml/extensions.pxi":745 * # in Pyrex/Cython @@ -185257,9 +172466,8 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ElementStringResult_getparent(CYTHON_U * * cdef object _elementStringResultFactory(string_value, _Element parent, */ - __Pyx_TraceLine(745,0,__PYX_ERR(17, 745, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 745, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 745, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -185280,7 +172488,6 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ElementStringResult_getparent(CYTHON_U __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -185299,16 +172506,13 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py int __pyx_v_is_attribute; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("_elementStringResultFactory", 0); - __Pyx_TraceCall("_elementStringResultFactory", __pyx_f[17], 747, 0, __PYX_ERR(17, 747, __pyx_L1_error)); /* "src/lxml/extensions.pxi":751 * cdef _ElementUnicodeResult uresult @@ -185317,7 +172521,6 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * if parent is None: * is_text = 0 */ - __Pyx_TraceLine(751,0,__PYX_ERR(17, 751, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_attrname != Py_None); __pyx_v_is_attribute = __pyx_t_1; @@ -185328,7 +172531,6 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * is_text = 0 * else: */ - __Pyx_TraceLine(752,0,__PYX_ERR(17, 752, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_parent) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -185340,7 +172542,6 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * else: * is_text = not (is_tail or is_attribute) */ - __Pyx_TraceLine(753,0,__PYX_ERR(17, 753, __pyx_L1_error)) __pyx_v_is_text = 0; /* "src/lxml/extensions.pxi":752 @@ -185360,7 +172561,6 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * * if type(string_value) is bytes: */ - __Pyx_TraceLine(755,0,__PYX_ERR(17, 755, __pyx_L1_error)) /*else*/ { __pyx_t_1 = (__pyx_v_is_tail != 0); if (!__pyx_t_1) { @@ -185382,7 +172582,6 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * result = _ElementStringResult(string_value) * result._parent = parent */ - __Pyx_TraceLine(757,0,__PYX_ERR(17, 757, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_string_value)) == ((PyObject *)(&PyBytes_Type))); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -185394,8 +172593,7 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * result._parent = parent * result.is_attribute = is_attribute */ - __Pyx_TraceLine(758,0,__PYX_ERR(17, 758, __pyx_L1_error)) - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ElementStringResult); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 758, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ElementStringResult); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -185407,38 +172605,10 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_string_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 758, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_string_value}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 758, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_string_value}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 758, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(17, 758, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_INCREF(__pyx_v_string_value); - __Pyx_GIVEREF(__pyx_v_string_value); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_string_value); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 758, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_string_value) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_string_value); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 758, __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; @@ -185450,8 +172620,7 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * result.is_attribute = is_attribute * result.is_tail = is_tail */ - __Pyx_TraceLine(759,0,__PYX_ERR(17, 759, __pyx_L1_error)) - if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_n_s_parent, ((PyObject *)__pyx_v_parent)) < 0) __PYX_ERR(17, 759, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_n_s_parent, ((PyObject *)__pyx_v_parent)) < 0) __PYX_ERR(9, 759, __pyx_L1_error) /* "src/lxml/extensions.pxi":760 * result = _ElementStringResult(string_value) @@ -185460,10 +172629,9 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * result.is_tail = is_tail * result.is_text = is_text */ - __Pyx_TraceLine(760,0,__PYX_ERR(17, 760, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_is_attribute); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 760, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_is_attribute); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 760, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_n_s_is_attribute, __pyx_t_3) < 0) __PYX_ERR(17, 760, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_n_s_is_attribute, __pyx_t_3) < 0) __PYX_ERR(9, 760, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/lxml/extensions.pxi":761 @@ -185473,10 +172641,9 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * result.is_text = is_text * result.attrname = attrname */ - __Pyx_TraceLine(761,0,__PYX_ERR(17, 761, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_is_tail); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 761, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_is_tail); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 761, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_n_s_is_tail, __pyx_t_3) < 0) __PYX_ERR(17, 761, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_n_s_is_tail, __pyx_t_3) < 0) __PYX_ERR(9, 761, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/lxml/extensions.pxi":762 @@ -185486,10 +172653,9 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * result.attrname = attrname * return result */ - __Pyx_TraceLine(762,0,__PYX_ERR(17, 762, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_is_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 762, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_is_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_n_s_is_text, __pyx_t_3) < 0) __PYX_ERR(17, 762, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_n_s_is_text, __pyx_t_3) < 0) __PYX_ERR(9, 762, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/lxml/extensions.pxi":763 @@ -185499,8 +172665,7 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * return result * elif python.IS_PYPY: */ - __Pyx_TraceLine(763,0,__PYX_ERR(17, 763, __pyx_L1_error)) - if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_n_s_attrname, __pyx_v_attrname) < 0) __PYX_ERR(17, 763, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_n_s_attrname, __pyx_v_attrname) < 0) __PYX_ERR(9, 763, __pyx_L1_error) /* "src/lxml/extensions.pxi":764 * result.is_text = is_text @@ -185509,7 +172674,6 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * elif python.IS_PYPY: * result = _PyElementUnicodeResult(string_value) */ - __Pyx_TraceLine(764,0,__PYX_ERR(17, 764, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; @@ -185531,7 +172695,6 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * result = _PyElementUnicodeResult(string_value) * result._parent = parent */ - __Pyx_TraceLine(765,0,__PYX_ERR(17, 765, __pyx_L1_error)) __pyx_t_1 = (IS_PYPY != 0); if (__pyx_t_1) { @@ -185542,50 +172705,21 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * result._parent = parent * result.is_attribute = is_attribute */ - __Pyx_TraceLine(766,0,__PYX_ERR(17, 766, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_4lxml_5etree__PyElementUnicodeResult); - __pyx_t_4 = __pyx_v_4lxml_5etree__PyElementUnicodeResult; __pyx_t_6 = NULL; + __pyx_t_4 = __pyx_v_4lxml_5etree__PyElementUnicodeResult; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_6)) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_string_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 766, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_string_value}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 766, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_string_value}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 766, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 766, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_v_string_value); - __Pyx_GIVEREF(__pyx_v_string_value); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_string_value); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 766, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_string_value) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_string_value); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 766, __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; @@ -185597,8 +172731,7 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * result.is_attribute = is_attribute * result.is_tail = is_tail */ - __Pyx_TraceLine(767,0,__PYX_ERR(17, 767, __pyx_L1_error)) - if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_n_s_parent, ((PyObject *)__pyx_v_parent)) < 0) __PYX_ERR(17, 767, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_n_s_parent, ((PyObject *)__pyx_v_parent)) < 0) __PYX_ERR(9, 767, __pyx_L1_error) /* "src/lxml/extensions.pxi":768 * result = _PyElementUnicodeResult(string_value) @@ -185607,10 +172740,9 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * result.is_tail = is_tail * result.is_text = is_text */ - __Pyx_TraceLine(768,0,__PYX_ERR(17, 768, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_is_attribute); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 768, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_is_attribute); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_n_s_is_attribute, __pyx_t_3) < 0) __PYX_ERR(17, 768, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_n_s_is_attribute, __pyx_t_3) < 0) __PYX_ERR(9, 768, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/lxml/extensions.pxi":769 @@ -185620,10 +172752,9 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * result.is_text = is_text * result.attrname = attrname */ - __Pyx_TraceLine(769,0,__PYX_ERR(17, 769, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_is_tail); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 769, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_is_tail); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 769, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_n_s_is_tail, __pyx_t_3) < 0) __PYX_ERR(17, 769, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_n_s_is_tail, __pyx_t_3) < 0) __PYX_ERR(9, 769, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/lxml/extensions.pxi":770 @@ -185633,10 +172764,9 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * result.attrname = attrname * return result */ - __Pyx_TraceLine(770,0,__PYX_ERR(17, 770, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_is_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 770, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_is_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_n_s_is_text, __pyx_t_3) < 0) __PYX_ERR(17, 770, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_n_s_is_text, __pyx_t_3) < 0) __PYX_ERR(9, 770, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "src/lxml/extensions.pxi":771 @@ -185646,8 +172776,7 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * return result * else: */ - __Pyx_TraceLine(771,0,__PYX_ERR(17, 771, __pyx_L1_error)) - if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_n_s_attrname, __pyx_v_attrname) < 0) __PYX_ERR(17, 771, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_n_s_attrname, __pyx_v_attrname) < 0) __PYX_ERR(9, 771, __pyx_L1_error) /* "src/lxml/extensions.pxi":772 * result.is_text = is_text @@ -185656,7 +172785,6 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * else: * uresult = _ElementUnicodeResult(string_value) */ - __Pyx_TraceLine(772,0,__PYX_ERR(17, 772, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; @@ -185678,9 +172806,8 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * uresult._parent = parent * uresult.is_attribute = is_attribute */ - __Pyx_TraceLine(774,0,__PYX_ERR(17, 774, __pyx_L1_error)) /*else*/ { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree__ElementUnicodeResult), __pyx_v_string_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 774, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree__ElementUnicodeResult), __pyx_v_string_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 774, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_uresult = ((struct __pyx_obj_4lxml_5etree__ElementUnicodeResult *)__pyx_t_3); __pyx_t_3 = 0; @@ -185692,7 +172819,6 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * uresult.is_attribute = is_attribute * uresult.is_tail = is_tail */ - __Pyx_TraceLine(775,0,__PYX_ERR(17, 775, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_parent)); __Pyx_GIVEREF(((PyObject *)__pyx_v_parent)); __Pyx_GOTREF(__pyx_v_uresult->_parent); @@ -185706,7 +172832,6 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * uresult.is_tail = is_tail * uresult.is_text = is_text */ - __Pyx_TraceLine(776,0,__PYX_ERR(17, 776, __pyx_L1_error)) __pyx_v_uresult->is_attribute = __pyx_v_is_attribute; /* "src/lxml/extensions.pxi":777 @@ -185716,7 +172841,6 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * uresult.is_text = is_text * uresult.attrname = attrname */ - __Pyx_TraceLine(777,0,__PYX_ERR(17, 777, __pyx_L1_error)) __pyx_v_uresult->is_tail = __pyx_v_is_tail; /* "src/lxml/extensions.pxi":778 @@ -185726,7 +172850,6 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * uresult.attrname = attrname * return uresult */ - __Pyx_TraceLine(778,0,__PYX_ERR(17, 778, __pyx_L1_error)) __pyx_v_uresult->is_text = __pyx_v_is_text; /* "src/lxml/extensions.pxi":779 @@ -185736,7 +172859,6 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * return uresult * */ - __Pyx_TraceLine(779,0,__PYX_ERR(17, 779, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_attrname); __Pyx_GIVEREF(__pyx_v_attrname); __Pyx_GOTREF(__pyx_v_uresult->attrname); @@ -185750,7 +172872,6 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py * * cdef object _buildElementStringResult(_Document doc, xmlNode* c_node, */ - __Pyx_TraceLine(780,0,__PYX_ERR(17, 780, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_uresult)); __pyx_r = ((PyObject *)__pyx_v_uresult); @@ -185770,14 +172891,12 @@ static PyObject *__pyx_f_4lxml_5etree__elementStringResultFactory(PyObject *__py __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("lxml.etree._elementStringResultFactory", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_uresult); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -185798,7 +172917,6 @@ static PyObject *__pyx_f_4lxml_5etree__buildElementStringResult(struct LxmlDocum xmlChar *__pyx_v_s; PyObject *__pyx_v_value = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -185814,7 +172932,6 @@ static PyObject *__pyx_f_4lxml_5etree__buildElementStringResult(struct LxmlDocum xmlNode *__pyx_t_12; int __pyx_t_13; __Pyx_RefNannySetupContext("_buildElementStringResult", 0); - __Pyx_TraceCall("_buildElementStringResult", __pyx_f[17], 782, 0, __PYX_ERR(17, 782, __pyx_L1_error)); /* "src/lxml/extensions.pxi":784 * cdef object _buildElementStringResult(_Document doc, xmlNode* c_node, @@ -185823,7 +172940,6 @@ static PyObject *__pyx_f_4lxml_5etree__buildElementStringResult(struct LxmlDocum * cdef object attrname = None * cdef xmlNode* c_element */ - __Pyx_TraceLine(784,0,__PYX_ERR(17, 784, __pyx_L1_error)) __Pyx_INCREF(Py_None); __pyx_v_parent = ((struct LxmlElement *)Py_None); @@ -185834,7 +172950,6 @@ static PyObject *__pyx_f_4lxml_5etree__buildElementStringResult(struct LxmlDocum * cdef xmlNode* c_element * cdef bint is_tail */ - __Pyx_TraceLine(785,0,__PYX_ERR(17, 785, __pyx_L1_error)) __Pyx_INCREF(Py_None); __pyx_v_attrname = Py_None; @@ -185845,7 +172960,6 @@ static PyObject *__pyx_f_4lxml_5etree__buildElementStringResult(struct LxmlDocum * attrname = _namespacedName(c_node) * is_tail = 0 */ - __Pyx_TraceLine(789,0,__PYX_ERR(17, 789, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node->type == XML_ATTRIBUTE_NODE) != 0); if (__pyx_t_1) { @@ -185856,8 +172970,7 @@ static PyObject *__pyx_f_4lxml_5etree__buildElementStringResult(struct LxmlDocum * is_tail = 0 * s = tree.xmlNodeGetContent(c_node) */ - __Pyx_TraceLine(790,0,__PYX_ERR(17, 790, __pyx_L1_error)) - __pyx_t_2 = __pyx_f_4lxml_5etree__namespacedName(__pyx_v_c_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 790, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__namespacedName(__pyx_v_c_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_attrname, __pyx_t_2); __pyx_t_2 = 0; @@ -185869,7 +172982,6 @@ static PyObject *__pyx_f_4lxml_5etree__buildElementStringResult(struct LxmlDocum * s = tree.xmlNodeGetContent(c_node) * try: */ - __Pyx_TraceLine(791,0,__PYX_ERR(17, 791, __pyx_L1_error)) __pyx_v_is_tail = 0; /* "src/lxml/extensions.pxi":792 @@ -185879,7 +172991,6 @@ static PyObject *__pyx_f_4lxml_5etree__buildElementStringResult(struct LxmlDocum * try: * value = funicode(s) */ - __Pyx_TraceLine(792,0,__PYX_ERR(17, 792, __pyx_L1_error)) __pyx_v_s = xmlNodeGetContent(__pyx_v_c_node); /* "src/lxml/extensions.pxi":793 @@ -185889,7 +173000,6 @@ static PyObject *__pyx_f_4lxml_5etree__buildElementStringResult(struct LxmlDocum * value = funicode(s) * finally: */ - __Pyx_TraceLine(793,0,__PYX_ERR(17, 793, __pyx_L5_error)) /*try:*/ { /* "src/lxml/extensions.pxi":794 @@ -185899,8 +173009,7 @@ static PyObject *__pyx_f_4lxml_5etree__buildElementStringResult(struct LxmlDocum * finally: * tree.xmlFree(s) */ - __Pyx_TraceLine(794,0,__PYX_ERR(17, 794, __pyx_L5_error)) - __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 794, __pyx_L5_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 794, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_value = __pyx_t_2; __pyx_t_2 = 0; @@ -185913,7 +173022,6 @@ static PyObject *__pyx_f_4lxml_5etree__buildElementStringResult(struct LxmlDocum * c_element = NULL * else: */ - __Pyx_TraceLine(796,0,__PYX_ERR(17, 796, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ xmlFree(__pyx_v_s); @@ -185961,7 +173069,6 @@ static PyObject *__pyx_f_4lxml_5etree__buildElementStringResult(struct LxmlDocum * else: * #assert c_node.type == tree.XML_TEXT_NODE or c_node.type == tree.XML_CDATA_SECTION_NODE, "invalid node type" */ - __Pyx_TraceLine(797,0,__PYX_ERR(17, 797, __pyx_L1_error)) __pyx_v_c_element = NULL; /* "src/lxml/extensions.pxi":789 @@ -185981,9 +173088,8 @@ static PyObject *__pyx_f_4lxml_5etree__buildElementStringResult(struct LxmlDocum * c_element = _previousElement(c_node) * is_tail = c_element is not NULL */ - __Pyx_TraceLine(801,0,__PYX_ERR(17, 801, __pyx_L1_error)) /*else*/ { - __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_node->content); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 801, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_node->content); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_value = __pyx_t_2; __pyx_t_2 = 0; @@ -185995,7 +173101,6 @@ static PyObject *__pyx_f_4lxml_5etree__buildElementStringResult(struct LxmlDocum * is_tail = c_element is not NULL * */ - __Pyx_TraceLine(802,0,__PYX_ERR(17, 802, __pyx_L1_error)) __pyx_v_c_element = __pyx_f_4lxml_5etree__previousElement(__pyx_v_c_node); /* "src/lxml/extensions.pxi":803 @@ -186005,7 +173110,6 @@ static PyObject *__pyx_f_4lxml_5etree__buildElementStringResult(struct LxmlDocum * * if not context._build_smart_strings: */ - __Pyx_TraceLine(803,0,__PYX_ERR(17, 803, __pyx_L1_error)) __pyx_v_is_tail = (__pyx_v_c_element != NULL); } __pyx_L3:; @@ -186017,7 +173121,6 @@ static PyObject *__pyx_f_4lxml_5etree__buildElementStringResult(struct LxmlDocum * return value * */ - __Pyx_TraceLine(805,0,__PYX_ERR(17, 805, __pyx_L1_error)) __pyx_t_1 = ((!(__pyx_v_context->_build_smart_strings != 0)) != 0); if (__pyx_t_1) { @@ -186028,7 +173131,6 @@ static PyObject *__pyx_f_4lxml_5etree__buildElementStringResult(struct LxmlDocum * * if c_element is NULL: */ - __Pyx_TraceLine(806,0,__PYX_ERR(17, 806, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_value); __pyx_r = __pyx_v_value; @@ -186050,7 +173152,6 @@ static PyObject *__pyx_f_4lxml_5etree__buildElementStringResult(struct LxmlDocum * # non-tail text or attribute text * c_element = c_node.parent */ - __Pyx_TraceLine(808,0,__PYX_ERR(17, 808, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_element == NULL) != 0); if (__pyx_t_1) { @@ -186061,7 +173162,6 @@ static PyObject *__pyx_f_4lxml_5etree__buildElementStringResult(struct LxmlDocum * while c_element is not NULL and not _isElement(c_element): * c_element = c_element.parent */ - __Pyx_TraceLine(810,0,__PYX_ERR(17, 810, __pyx_L1_error)) __pyx_t_12 = __pyx_v_c_node->parent; __pyx_v_c_element = __pyx_t_12; @@ -186072,7 +173172,6 @@ static PyObject *__pyx_f_4lxml_5etree__buildElementStringResult(struct LxmlDocum * c_element = c_element.parent * */ - __Pyx_TraceLine(811,0,__PYX_ERR(17, 811, __pyx_L1_error)) while (1) { __pyx_t_13 = ((__pyx_v_c_element != NULL) != 0); if (__pyx_t_13) { @@ -186092,7 +173191,6 @@ static PyObject *__pyx_f_4lxml_5etree__buildElementStringResult(struct LxmlDocum * * if c_element is not NULL: */ - __Pyx_TraceLine(812,0,__PYX_ERR(17, 812, __pyx_L1_error)) __pyx_t_12 = __pyx_v_c_element->parent; __pyx_v_c_element = __pyx_t_12; } @@ -186113,7 +173211,6 @@ static PyObject *__pyx_f_4lxml_5etree__buildElementStringResult(struct LxmlDocum * parent = _instantiateElementFromXPath(c_element, doc, context) * */ - __Pyx_TraceLine(814,0,__PYX_ERR(17, 814, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_element != NULL) != 0); if (__pyx_t_1) { @@ -186124,8 +173221,7 @@ static PyObject *__pyx_f_4lxml_5etree__buildElementStringResult(struct LxmlDocum * * return _elementStringResultFactory( */ - __Pyx_TraceLine(815,0,__PYX_ERR(17, 815, __pyx_L1_error)) - __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__instantiateElementFromXPath(__pyx_v_c_element, __pyx_v_doc, __pyx_v_context)); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 815, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__instantiateElementFromXPath(__pyx_v_c_element, __pyx_v_doc, __pyx_v_context)); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_parent, ((struct LxmlElement *)__pyx_t_2)); __pyx_t_2 = 0; @@ -186146,7 +173242,6 @@ static PyObject *__pyx_f_4lxml_5etree__buildElementStringResult(struct LxmlDocum * value, parent, attrname, is_tail) * */ - __Pyx_TraceLine(817,0,__PYX_ERR(17, 817, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); /* "src/lxml/extensions.pxi":818 @@ -186156,8 +173251,7 @@ static PyObject *__pyx_f_4lxml_5etree__buildElementStringResult(struct LxmlDocum * * ################################################################################ */ - __Pyx_TraceLine(818,0,__PYX_ERR(17, 818, __pyx_L1_error)) - __pyx_t_2 = __pyx_f_4lxml_5etree__elementStringResultFactory(__pyx_v_value, __pyx_v_parent, __pyx_v_attrname, __pyx_v_is_tail); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 817, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__elementStringResultFactory(__pyx_v_value, __pyx_v_parent, __pyx_v_attrname, __pyx_v_is_tail); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 817, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -186181,7 +173275,6 @@ static PyObject *__pyx_f_4lxml_5etree__buildElementStringResult(struct LxmlDocum __Pyx_XDECREF(__pyx_v_attrname); __Pyx_XDECREF(__pyx_v_value); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -186201,7 +173294,6 @@ static void __pyx_f_4lxml_5etree__extension_function_call(struct __pyx_obj_4lxml CYTHON_UNUSED int __pyx_v_i; PyObject *__pyx_v_o = NULL; PyObject *__pyx_v_res = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -186218,7 +173310,6 @@ static void __pyx_f_4lxml_5etree__extension_function_call(struct __pyx_obj_4lxml PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; __Pyx_RefNannySetupContext("_extension_function_call", 0); - __Pyx_TraceCall("_extension_function_call", __pyx_f[17], 823, 0, __PYX_ERR(17, 823, __pyx_L1_error)); /* "src/lxml/extensions.pxi":829 * cdef list args @@ -186227,7 +173318,6 @@ static void __pyx_f_4lxml_5etree__extension_function_call(struct __pyx_obj_4lxml * try: * args = [] */ - __Pyx_TraceLine(829,0,__PYX_ERR(17, 829, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_v_context->_doc); __Pyx_INCREF(__pyx_t_1); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_1); @@ -186240,7 +173330,6 @@ static void __pyx_f_4lxml_5etree__extension_function_call(struct __pyx_obj_4lxml * args = [] * for i in range(nargs): */ - __Pyx_TraceLine(830,0,__PYX_ERR(17, 830, __pyx_L4_error)) /*try:*/ { { __Pyx_PyThreadState_declare @@ -186258,8 +173347,7 @@ static void __pyx_f_4lxml_5etree__extension_function_call(struct __pyx_obj_4lxml * for i in range(nargs): * obj = xpath.valuePop(ctxt) */ - __Pyx_TraceLine(831,0,__PYX_ERR(17, 831, __pyx_L6_error)) - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 831, __pyx_L6_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 831, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; @@ -186271,7 +173359,6 @@ static void __pyx_f_4lxml_5etree__extension_function_call(struct __pyx_obj_4lxml * obj = xpath.valuePop(ctxt) * o = _unwrapXPathObject(obj, doc, context) */ - __Pyx_TraceLine(832,0,__PYX_ERR(17, 832, __pyx_L6_error)) __pyx_t_5 = __pyx_v_nargs; __pyx_t_6 = __pyx_t_5; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { @@ -186284,7 +173371,6 @@ static void __pyx_f_4lxml_5etree__extension_function_call(struct __pyx_obj_4lxml * o = _unwrapXPathObject(obj, doc, context) * _freeXPathObject(obj) */ - __Pyx_TraceLine(833,0,__PYX_ERR(17, 833, __pyx_L6_error)) __pyx_v_obj = valuePop(__pyx_v_ctxt); /* "src/lxml/extensions.pxi":834 @@ -186294,8 +173380,7 @@ static void __pyx_f_4lxml_5etree__extension_function_call(struct __pyx_obj_4lxml * _freeXPathObject(obj) * args.append(o) */ - __Pyx_TraceLine(834,0,__PYX_ERR(17, 834, __pyx_L6_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__unwrapXPathObject(__pyx_v_obj, __pyx_v_doc, __pyx_v_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 834, __pyx_L6_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__unwrapXPathObject(__pyx_v_obj, __pyx_v_doc, __pyx_v_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 834, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_o, __pyx_t_1); __pyx_t_1 = 0; @@ -186307,7 +173392,6 @@ static void __pyx_f_4lxml_5etree__extension_function_call(struct __pyx_obj_4lxml * args.append(o) * args.reverse() */ - __Pyx_TraceLine(835,0,__PYX_ERR(17, 835, __pyx_L6_error)) __pyx_f_4lxml_5etree__freeXPathObject(__pyx_v_obj); /* "src/lxml/extensions.pxi":836 @@ -186317,8 +173401,7 @@ static void __pyx_f_4lxml_5etree__extension_function_call(struct __pyx_obj_4lxml * args.reverse() * */ - __Pyx_TraceLine(836,0,__PYX_ERR(17, 836, __pyx_L6_error)) - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_v_o); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(17, 836, __pyx_L6_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_v_o); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(9, 836, __pyx_L6_error) } /* "src/lxml/extensions.pxi":837 @@ -186328,8 +173411,7 @@ static void __pyx_f_4lxml_5etree__extension_function_call(struct __pyx_obj_4lxml * * res = function(context, *args) */ - __Pyx_TraceLine(837,0,__PYX_ERR(17, 837, __pyx_L6_error)) - __pyx_t_8 = PyList_Reverse(__pyx_v_args); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(17, 837, __pyx_L6_error) + __pyx_t_8 = PyList_Reverse(__pyx_v_args); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(9, 837, __pyx_L6_error) /* "src/lxml/extensions.pxi":839 * args.reverse() @@ -186338,19 +173420,18 @@ static void __pyx_f_4lxml_5etree__extension_function_call(struct __pyx_obj_4lxml * # wrap result for XPath consumption * obj = _wrapXPathObject(res, doc, context) */ - __Pyx_TraceLine(839,0,__PYX_ERR(17, 839, __pyx_L6_error)) - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 839, __pyx_L6_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 839, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_context)); __Pyx_GIVEREF(((PyObject *)__pyx_v_context)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_context)); - __pyx_t_9 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 839, __pyx_L6_error) + __pyx_t_9 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_9)) __PYX_ERR(9, 839, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = PyNumber_Add(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 839, __pyx_L6_error) + __pyx_t_10 = PyNumber_Add(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(9, 839, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_v_function, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 839, __pyx_L6_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_v_function, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(9, 839, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_res = __pyx_t_9; @@ -186363,8 +173444,7 @@ static void __pyx_f_4lxml_5etree__extension_function_call(struct __pyx_obj_4lxml * # prevent Python from deallocating elements handed to libxml2 * context._hold(res) */ - __Pyx_TraceLine(841,0,__PYX_ERR(17, 841, __pyx_L6_error)) - __pyx_t_11 = __pyx_f_4lxml_5etree__wrapXPathObject(__pyx_v_res, __pyx_v_doc, __pyx_v_context); if (unlikely(__pyx_t_11 == ((xmlXPathObject *)NULL))) __PYX_ERR(17, 841, __pyx_L6_error) + __pyx_t_11 = __pyx_f_4lxml_5etree__wrapXPathObject(__pyx_v_res, __pyx_v_doc, __pyx_v_context); if (unlikely(__pyx_t_11 == ((xmlXPathObject *)NULL))) __PYX_ERR(9, 841, __pyx_L6_error) __pyx_v_obj = __pyx_t_11; /* "src/lxml/extensions.pxi":843 @@ -186374,8 +173454,7 @@ static void __pyx_f_4lxml_5etree__extension_function_call(struct __pyx_obj_4lxml * xpath.valuePush(ctxt, obj) * except: */ - __Pyx_TraceLine(843,0,__PYX_ERR(17, 843, __pyx_L6_error)) - __pyx_t_9 = __pyx_f_4lxml_5etree_12_BaseContext__hold(__pyx_v_context, __pyx_v_res); if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 843, __pyx_L6_error) + __pyx_t_9 = __pyx_f_4lxml_5etree_12_BaseContext__hold(__pyx_v_context, __pyx_v_res); if (unlikely(!__pyx_t_9)) __PYX_ERR(9, 843, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -186386,7 +173465,6 @@ static void __pyx_f_4lxml_5etree__extension_function_call(struct __pyx_obj_4lxml * except: * xpath.xmlXPathErr(ctxt, xpath.XPATH_EXPR_ERROR) */ - __Pyx_TraceLine(844,0,__PYX_ERR(17, 844, __pyx_L6_error)) (void)(valuePush(__pyx_v_ctxt, __pyx_v_obj)); /* "src/lxml/extensions.pxi":830 @@ -186413,10 +173491,9 @@ static void __pyx_f_4lxml_5etree__extension_function_call(struct __pyx_obj_4lxml * xpath.xmlXPathErr(ctxt, xpath.XPATH_EXPR_ERROR) * context._exc._store_raised() */ - __Pyx_TraceLine(845,0,__PYX_ERR(17, 845, __pyx_L8_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._extension_function_call", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_1) < 0) __PYX_ERR(17, 845, __pyx_L8_except_error) + if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_1) < 0) __PYX_ERR(9, 845, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_1); @@ -186428,7 +173505,6 @@ static void __pyx_f_4lxml_5etree__extension_function_call(struct __pyx_obj_4lxml * context._exc._store_raised() * finally: */ - __Pyx_TraceLine(846,0,__PYX_ERR(17, 846, __pyx_L8_except_error)) xmlXPathErr(__pyx_v_ctxt, XPATH_EXPR_ERROR); /* "src/lxml/extensions.pxi":847 @@ -186438,11 +173514,10 @@ static void __pyx_f_4lxml_5etree__extension_function_call(struct __pyx_obj_4lxml * finally: * return # swallow any further exceptions */ - __Pyx_TraceLine(847,0,__PYX_ERR(17, 847, __pyx_L8_except_error)) ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_context->_exc->__pyx_vtab)->_store_raised(__pyx_v_context->_exc); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L7_exception_handled; } __pyx_L8_except_error:; @@ -186475,7 +173550,6 @@ static void __pyx_f_4lxml_5etree__extension_function_call(struct __pyx_obj_4lxml * * # lookup the function by name and call it */ - __Pyx_TraceLine(849,0,__PYX_ERR(17, 849, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ goto __pyx_L0; @@ -186523,17 +173597,11 @@ static void __pyx_f_4lxml_5etree__extension_function_call(struct __pyx_obj_4lxml */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_XDECREF(__pyx_t_10); - __Pyx_WriteUnraisable("lxml.etree._extension_function_call", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XDECREF(__pyx_v_args); __Pyx_XDECREF(__pyx_v_o); __Pyx_XDECREF(__pyx_v_res); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -186549,7 +173617,6 @@ static void __pyx_f_4lxml_5etree__xpath_function_call(xmlXPathParserContext *__p struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_v_context = 0; xmlXPathContext *__pyx_v_rctxt; PyObject *__pyx_v_function = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlXPathContext *__pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -186570,7 +173637,6 @@ static void __pyx_f_4lxml_5etree__xpath_function_call(xmlXPathParserContext *__p PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_xpath_function_call", 0); - __Pyx_TraceCall("_xpath_function_call", __pyx_f[17], 853, 0, __PYX_ERR(17, 853, __pyx_L1_error)); /* "src/lxml/extensions.pxi":856 * int nargs) with gil: @@ -186579,7 +173645,6 @@ static void __pyx_f_4lxml_5etree__xpath_function_call(xmlXPathParserContext *__p * context = <_BaseContext> rctxt.userData * try: */ - __Pyx_TraceLine(856,0,__PYX_ERR(17, 856, __pyx_L1_error)) __pyx_t_1 = __pyx_v_ctxt->context; __pyx_v_rctxt = __pyx_t_1; @@ -186590,7 +173655,6 @@ static void __pyx_f_4lxml_5etree__xpath_function_call(xmlXPathParserContext *__p * try: * function = context._find_cached_function(rctxt.functionURI, rctxt.function) */ - __Pyx_TraceLine(857,0,__PYX_ERR(17, 857, __pyx_L1_error)) __pyx_t_2 = ((PyObject *)__pyx_v_rctxt->userData); __Pyx_INCREF(__pyx_t_2); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_t_2); @@ -186603,7 +173667,6 @@ static void __pyx_f_4lxml_5etree__xpath_function_call(xmlXPathParserContext *__p * function = context._find_cached_function(rctxt.functionURI, rctxt.function) * if function is not None: */ - __Pyx_TraceLine(858,0,__PYX_ERR(17, 858, __pyx_L4_error)) /*try:*/ { { __Pyx_PyThreadState_declare @@ -186621,8 +173684,7 @@ static void __pyx_f_4lxml_5etree__xpath_function_call(xmlXPathParserContext *__p * if function is not None: * _extension_function_call(context, function, ctxt, nargs) */ - __Pyx_TraceLine(859,0,__PYX_ERR(17, 859, __pyx_L6_error)) - __pyx_t_2 = __pyx_f_4lxml_5etree_12_BaseContext__find_cached_function(__pyx_v_context, __pyx_v_rctxt->functionURI, __pyx_v_rctxt->function); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 859, __pyx_L6_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_12_BaseContext__find_cached_function(__pyx_v_context, __pyx_v_rctxt->functionURI, __pyx_v_rctxt->function); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 859, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_function = __pyx_t_2; __pyx_t_2 = 0; @@ -186634,7 +173696,6 @@ static void __pyx_f_4lxml_5etree__xpath_function_call(xmlXPathParserContext *__p * _extension_function_call(context, function, ctxt, nargs) * else: */ - __Pyx_TraceLine(860,0,__PYX_ERR(17, 860, __pyx_L6_error)) __pyx_t_6 = (__pyx_v_function != Py_None); __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { @@ -186646,7 +173707,6 @@ static void __pyx_f_4lxml_5etree__xpath_function_call(xmlXPathParserContext *__p * else: * xpath.xmlXPathErr(ctxt, xpath.XPATH_UNKNOWN_FUNC_ERROR) */ - __Pyx_TraceLine(861,0,__PYX_ERR(17, 861, __pyx_L6_error)) __pyx_f_4lxml_5etree__extension_function_call(__pyx_v_context, __pyx_v_function, __pyx_v_ctxt, __pyx_v_nargs); /* "src/lxml/extensions.pxi":860 @@ -186666,7 +173726,6 @@ static void __pyx_f_4lxml_5etree__xpath_function_call(xmlXPathParserContext *__p * context._exc._store_exception(XPathFunctionError( * f"XPath function '{_namespacedNameFromNsName(rctxt.functionURI, rctxt.function)}' not found")) */ - __Pyx_TraceLine(863,0,__PYX_ERR(17, 863, __pyx_L6_error)) /*else*/ { xmlXPathErr(__pyx_v_ctxt, XPATH_UNKNOWN_FUNC_ERROR); @@ -186677,8 +173736,7 @@ static void __pyx_f_4lxml_5etree__xpath_function_call(xmlXPathParserContext *__p * except: * # may not be the right error, but we need to tell libxml2 *something* */ - __Pyx_TraceLine(865,0,__PYX_ERR(17, 865, __pyx_L6_error)) - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 865, __pyx_L6_error) + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 865, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = 0; __pyx_t_9 = 127; @@ -186686,9 +173744,9 @@ static void __pyx_f_4lxml_5etree__xpath_function_call(xmlXPathParserContext *__p __pyx_t_8 += 16; __Pyx_GIVEREF(__pyx_kp_u_XPath_function); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_XPath_function); - __pyx_t_10 = __pyx_f_4lxml_5etree__namespacedNameFromNsName(__pyx_v_rctxt->functionURI, __pyx_v_rctxt->function); if (unlikely(!__pyx_t_10)) __PYX_ERR(17, 865, __pyx_L6_error) + __pyx_t_10 = __pyx_f_4lxml_5etree__namespacedNameFromNsName(__pyx_v_rctxt->functionURI, __pyx_v_rctxt->function); if (unlikely(!__pyx_t_10)) __PYX_ERR(9, 865, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_t_10, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(17, 865, __pyx_L6_error) + __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_t_10, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 865, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_9; @@ -186700,7 +173758,7 @@ static void __pyx_f_4lxml_5etree__xpath_function_call(xmlXPathParserContext *__p __pyx_t_8 += 11; __Pyx_GIVEREF(__pyx_kp_u_not_found); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_not_found); - __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(17, 865, __pyx_L6_error) + __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 865, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -186711,11 +173769,10 @@ static void __pyx_f_4lxml_5etree__xpath_function_call(xmlXPathParserContext *__p * f"XPath function '{_namespacedNameFromNsName(rctxt.functionURI, rctxt.function)}' not found")) * except: */ - __Pyx_TraceLine(864,0,__PYX_ERR(17, 864, __pyx_L6_error)) - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree_XPathFunctionError), __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 864, __pyx_L6_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree_XPathFunctionError), __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 864, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_12 = ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_context->_exc->__pyx_vtab)->_store_exception(__pyx_v_context->_exc, __pyx_t_2); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(17, 864, __pyx_L6_error) + __pyx_t_12 = ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_context->_exc->__pyx_vtab)->_store_exception(__pyx_v_context->_exc, __pyx_t_2); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(9, 864, __pyx_L6_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L12:; @@ -186744,10 +173801,9 @@ static void __pyx_f_4lxml_5etree__xpath_function_call(xmlXPathParserContext *__p * # may not be the right error, but we need to tell libxml2 *something* * xpath.xmlXPathErr(ctxt, xpath.XPATH_UNKNOWN_FUNC_ERROR) */ - __Pyx_TraceLine(866,0,__PYX_ERR(17, 866, __pyx_L8_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._xpath_function_call", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_11, &__pyx_t_10) < 0) __PYX_ERR(17, 866, __pyx_L8_except_error) + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_11, &__pyx_t_10) < 0) __PYX_ERR(9, 866, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_11); __Pyx_GOTREF(__pyx_t_10); @@ -186759,7 +173815,6 @@ static void __pyx_f_4lxml_5etree__xpath_function_call(xmlXPathParserContext *__p * context._exc._store_raised() * finally: */ - __Pyx_TraceLine(868,0,__PYX_ERR(17, 868, __pyx_L8_except_error)) xmlXPathErr(__pyx_v_ctxt, XPATH_UNKNOWN_FUNC_ERROR); /* "src/lxml/extensions.pxi":869 @@ -186769,11 +173824,10 @@ static void __pyx_f_4lxml_5etree__xpath_function_call(xmlXPathParserContext *__p * finally: * return # swallow any further exceptions */ - __Pyx_TraceLine(869,0,__PYX_ERR(17, 869, __pyx_L8_except_error)) ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_context->_exc->__pyx_vtab)->_store_raised(__pyx_v_context->_exc); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L7_exception_handled; } __pyx_L8_except_error:; @@ -186804,7 +173858,6 @@ static void __pyx_f_4lxml_5etree__xpath_function_call(xmlXPathParserContext *__p * finally: * return # swallow any further exceptions # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(871,0,__PYX_ERR(17, 871, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ goto __pyx_L0; @@ -186852,15 +173905,9 @@ static void __pyx_f_4lxml_5etree__xpath_function_call(xmlXPathParserContext *__p */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_10); - __Pyx_XDECREF(__pyx_t_11); - __Pyx_WriteUnraisable("lxml.etree._xpath_function_call", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); __Pyx_XDECREF(__pyx_v_function); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); @@ -186877,12 +173924,10 @@ static void __pyx_f_4lxml_5etree__xpath_function_call(xmlXPathParserContext *__p static int __pyx_f_4lxml_5etree__register_xpath_function(void *__pyx_v_ctxt, PyObject *__pyx_v_name_utf, PyObject *__pyx_v_ns_utf) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_register_xpath_function", 0); - __Pyx_TraceCall("_register_xpath_function", __pyx_f[18], 31, 0, __PYX_ERR(18, 31, __pyx_L1_error)); /* "src/lxml/xpath.pxi":32 * @@ -186891,7 +173936,6 @@ static int __pyx_f_4lxml_5etree__register_xpath_function(void *__pyx_v_ctxt, PyO * return xpath.xmlXPathRegisterFunc( * ctxt, _xcstr(name_utf), */ - __Pyx_TraceLine(32,0,__PYX_ERR(18, 32, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_ns_utf == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -186903,7 +173947,6 @@ static int __pyx_f_4lxml_5etree__register_xpath_function(void *__pyx_v_ctxt, PyO * ctxt, _xcstr(name_utf), * _xpath_function_call) */ - __Pyx_TraceLine(33,0,__PYX_ERR(18, 33, __pyx_L1_error)) __pyx_r = xmlXPathRegisterFunc(((xmlXPathContext *)__pyx_v_ctxt), (const xmlChar*)PyBytes_AS_STRING(__pyx_v_name_utf), __pyx_f_4lxml_5etree__xpath_function_call); goto __pyx_L0; @@ -186923,7 +173966,6 @@ static int __pyx_f_4lxml_5etree__register_xpath_function(void *__pyx_v_ctxt, PyO * ctxt, _xcstr(name_utf), _xcstr(ns_utf), * _xpath_function_call) */ - __Pyx_TraceLine(37,0,__PYX_ERR(18, 37, __pyx_L1_error)) /*else*/ { /* "src/lxml/xpath.pxi":39 @@ -186933,7 +173975,6 @@ static int __pyx_f_4lxml_5etree__register_xpath_function(void *__pyx_v_ctxt, PyO * * cdef int _unregister_xpath_function(void* ctxt, name_utf, ns_utf): */ - __Pyx_TraceLine(39,0,__PYX_ERR(18, 39, __pyx_L1_error)) __pyx_r = xmlXPathRegisterFuncNS(((xmlXPathContext *)__pyx_v_ctxt), (const xmlChar*)PyBytes_AS_STRING(__pyx_v_name_utf), (const xmlChar*)PyBytes_AS_STRING(__pyx_v_ns_utf), __pyx_f_4lxml_5etree__xpath_function_call); goto __pyx_L0; } @@ -186947,11 +173988,7 @@ static int __pyx_f_4lxml_5etree__register_xpath_function(void *__pyx_v_ctxt, PyO */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._register_xpath_function", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -186966,12 +174003,10 @@ static int __pyx_f_4lxml_5etree__register_xpath_function(void *__pyx_v_ctxt, PyO static int __pyx_f_4lxml_5etree__unregister_xpath_function(void *__pyx_v_ctxt, PyObject *__pyx_v_name_utf, PyObject *__pyx_v_ns_utf) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_unregister_xpath_function", 0); - __Pyx_TraceCall("_unregister_xpath_function", __pyx_f[18], 41, 0, __PYX_ERR(18, 41, __pyx_L1_error)); /* "src/lxml/xpath.pxi":42 * @@ -186980,7 +174015,6 @@ static int __pyx_f_4lxml_5etree__unregister_xpath_function(void *__pyx_v_ctxt, P * return xpath.xmlXPathRegisterFunc( * ctxt, _xcstr(name_utf), NULL) */ - __Pyx_TraceLine(42,0,__PYX_ERR(18, 42, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_ns_utf == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -186992,7 +174026,6 @@ static int __pyx_f_4lxml_5etree__unregister_xpath_function(void *__pyx_v_ctxt, P * ctxt, _xcstr(name_utf), NULL) * else: */ - __Pyx_TraceLine(43,0,__PYX_ERR(18, 43, __pyx_L1_error)) __pyx_r = xmlXPathRegisterFunc(((xmlXPathContext *)__pyx_v_ctxt), (const xmlChar*)PyBytes_AS_STRING(__pyx_v_name_utf), NULL); goto __pyx_L0; @@ -187012,7 +174045,6 @@ static int __pyx_f_4lxml_5etree__unregister_xpath_function(void *__pyx_v_ctxt, P * ctxt, _xcstr(name_utf), _xcstr(ns_utf), NULL) * */ - __Pyx_TraceLine(46,0,__PYX_ERR(18, 46, __pyx_L1_error)) /*else*/ { /* "src/lxml/xpath.pxi":47 @@ -187022,7 +174054,6 @@ static int __pyx_f_4lxml_5etree__unregister_xpath_function(void *__pyx_v_ctxt, P * * */ - __Pyx_TraceLine(47,0,__PYX_ERR(18, 47, __pyx_L1_error)) __pyx_r = xmlXPathRegisterFuncNS(((xmlXPathContext *)__pyx_v_ctxt), (const xmlChar*)PyBytes_AS_STRING(__pyx_v_name_utf), (const xmlChar*)PyBytes_AS_STRING(__pyx_v_ns_utf), NULL); goto __pyx_L0; } @@ -187036,11 +174067,7 @@ static int __pyx_f_4lxml_5etree__unregister_xpath_function(void *__pyx_v_ctxt, P */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._unregister_xpath_function", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -187160,7 +174187,6 @@ static int __pyx_pw_4lxml_5etree_13_XPathContext_1__init__(PyObject *__pyx_v_sel static int __pyx_pf_4lxml_5etree_13_XPathContext___init__(struct __pyx_obj_4lxml_5etree__XPathContext *__pyx_v_self, PyObject *__pyx_v_namespaces, PyObject *__pyx_v_extensions, PyObject *__pyx_v_error_log, PyObject *__pyx_v_enable_regexp, PyObject *__pyx_v_variables, PyObject *__pyx_v_build_smart_strings) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -187168,7 +174194,6 @@ static int __pyx_pf_4lxml_5etree_13_XPathContext___init__(struct __pyx_obj_4lxml int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[18], 54, 0, __PYX_ERR(18, 54, __pyx_L1_error)); /* "src/lxml/xpath.pxi":56 * def __init__(self, namespaces, extensions, error_log, enable_regexp, variables, @@ -187177,7 +174202,6 @@ static int __pyx_pf_4lxml_5etree_13_XPathContext___init__(struct __pyx_obj_4lxml * _BaseContext.__init__(self, namespaces, extensions, error_log, enable_regexp, * build_smart_strings) */ - __Pyx_TraceLine(56,0,__PYX_ERR(18, 56, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_variables); __Pyx_GIVEREF(__pyx_v_variables); __Pyx_GOTREF(__pyx_v_self->_variables); @@ -187191,7 +174215,6 @@ static int __pyx_pf_4lxml_5etree_13_XPathContext___init__(struct __pyx_obj_4lxml * build_smart_strings) * */ - __Pyx_TraceLine(57,0,__PYX_ERR(18, 57, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree__BaseContext), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -187202,7 +174225,6 @@ static int __pyx_pf_4lxml_5etree_13_XPathContext___init__(struct __pyx_obj_4lxml * * cdef set_context(self, xpath.xmlXPathContext* xpathCtxt): */ - __Pyx_TraceLine(58,0,__PYX_ERR(18, 58, __pyx_L1_error)) __pyx_t_3 = NULL; __pyx_t_4 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -187281,7 +174303,6 @@ static int __pyx_pf_4lxml_5etree_13_XPathContext___init__(struct __pyx_obj_4lxml __Pyx_AddTraceback("lxml.etree._XPathContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -187296,11 +174317,9 @@ static int __pyx_pf_4lxml_5etree_13_XPathContext___init__(struct __pyx_obj_4lxml static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_set_context(struct __pyx_obj_4lxml_5etree__XPathContext *__pyx_v_self, xmlXPathContext *__pyx_v_xpathCtxt) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("set_context", 0); - __Pyx_TraceCall("set_context", __pyx_f[18], 60, 0, __PYX_ERR(18, 60, __pyx_L1_error)); /* "src/lxml/xpath.pxi":61 * @@ -187309,7 +174328,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_set_context(struct __pyx_o * # This would be a good place to set up the XPath parser dict, but * # we cannot use the current thread dict as we do not know which */ - __Pyx_TraceLine(61,0,__PYX_ERR(18, 61, __pyx_L1_error)) ((struct __pyx_vtabstruct_4lxml_5etree__XPathContext *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._set_xpath_context(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self), __pyx_v_xpathCtxt); /* "src/lxml/xpath.pxi":65 @@ -187319,7 +174337,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_set_context(struct __pyx_o * self.registerLocalFunctions(xpathCtxt, _register_xpath_function) * */ - __Pyx_TraceLine(65,0,__PYX_ERR(18, 65, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__XPathContext *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.registerLocalNamespaces(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -187331,7 +174348,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_set_context(struct __pyx_o * * cdef register_context(self, _Document doc): */ - __Pyx_TraceLine(66,0,__PYX_ERR(18, 66, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__XPathContext *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.registerLocalFunctions(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self), __pyx_v_xpathCtxt, __pyx_f_4lxml_5etree__register_xpath_function); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -187353,7 +174369,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_set_context(struct __pyx_o __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -187368,14 +174383,12 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_set_context(struct __pyx_o static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_register_context(struct __pyx_obj_4lxml_5etree__XPathContext *__pyx_v_self, struct LxmlDocument *__pyx_v_doc) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("register_context", 0); - __Pyx_TraceCall("register_context", __pyx_f[18], 68, 0, __PYX_ERR(18, 68, __pyx_L1_error)); /* "src/lxml/xpath.pxi":69 * @@ -187384,7 +174397,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_register_context(struct __ * self.registerGlobalNamespaces() * self.registerGlobalFunctions(self._xpathCtxt, _register_xpath_function) */ - __Pyx_TraceLine(69,0,__PYX_ERR(18, 69, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_12_BaseContext__register_context(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self), __pyx_v_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -187396,7 +174408,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_register_context(struct __ * self.registerGlobalFunctions(self._xpathCtxt, _register_xpath_function) * self.registerExsltFunctions() */ - __Pyx_TraceLine(70,0,__PYX_ERR(18, 70, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__XPathContext *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.registerGlobalNamespaces(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -187408,7 +174419,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_register_context(struct __ * self.registerExsltFunctions() * if self._variables is not None: */ - __Pyx_TraceLine(71,0,__PYX_ERR(18, 71, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__XPathContext *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.registerGlobalFunctions(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self), __pyx_v_self->__pyx_base._xpathCtxt, __pyx_f_4lxml_5etree__register_xpath_function); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -187420,7 +174430,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_register_context(struct __ * if self._variables is not None: * self.registerVariables(self._variables) */ - __Pyx_TraceLine(72,0,__PYX_ERR(18, 72, __pyx_L1_error)) __pyx_f_4lxml_5etree_13_XPathContext_registerExsltFunctions(__pyx_v_self); /* "src/lxml/xpath.pxi":73 @@ -187430,7 +174439,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_register_context(struct __ * self.registerVariables(self._variables) * */ - __Pyx_TraceLine(73,0,__PYX_ERR(18, 73, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_self->_variables != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -187442,7 +174450,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_register_context(struct __ * * cdef unregister_context(self): */ - __Pyx_TraceLine(74,0,__PYX_ERR(18, 74, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_variables; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_f_4lxml_5etree_13_XPathContext_registerVariables(__pyx_v_self, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(18, 74, __pyx_L1_error) @@ -187477,7 +174484,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_register_context(struct __ __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -187492,11 +174498,9 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_register_context(struct __ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_unregister_context(struct __pyx_obj_4lxml_5etree__XPathContext *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("unregister_context", 0); - __Pyx_TraceCall("unregister_context", __pyx_f[18], 76, 0, __PYX_ERR(18, 76, __pyx_L1_error)); /* "src/lxml/xpath.pxi":77 * @@ -187505,7 +174509,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_unregister_context(struct * self._xpathCtxt, _unregister_xpath_function) * self.unregisterGlobalNamespaces() */ - __Pyx_TraceLine(77,0,__PYX_ERR(18, 77, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__XPathContext *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.unregisterGlobalFunctions(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self), __pyx_v_self->__pyx_base._xpathCtxt, __pyx_f_4lxml_5etree__unregister_xpath_function); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -187517,7 +174520,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_unregister_context(struct * xpath.xmlXPathRegisteredVariablesCleanup(self._xpathCtxt) * self._cleanup_context() */ - __Pyx_TraceLine(79,0,__PYX_ERR(18, 79, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__XPathContext *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.unregisterGlobalNamespaces(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -187529,7 +174531,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_unregister_context(struct * self._cleanup_context() * */ - __Pyx_TraceLine(80,0,__PYX_ERR(18, 80, __pyx_L1_error)) xmlXPathRegisteredVariablesCleanup(__pyx_v_self->__pyx_base._xpathCtxt); /* "src/lxml/xpath.pxi":81 @@ -187539,7 +174540,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_unregister_context(struct * * cdef void registerExsltFunctions(self): */ - __Pyx_TraceLine(81,0,__PYX_ERR(18, 81, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_12_BaseContext__cleanup_context(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -187561,7 +174561,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_unregister_context(struct __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -187575,11 +174574,9 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_unregister_context(struct */ static void __pyx_f_4lxml_5etree_13_XPathContext_registerExsltFunctions(struct __pyx_obj_4lxml_5etree__XPathContext *__pyx_v_self) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("registerExsltFunctions", 0); - __Pyx_TraceCall("registerExsltFunctions", __pyx_f[18], 83, 0, __PYX_ERR(18, 83, __pyx_L1_error)); /* "src/lxml/xpath.pxi":84 * @@ -187588,7 +174585,6 @@ static void __pyx_f_4lxml_5etree_13_XPathContext_registerExsltFunctions(struct _ * # we'd only execute dummy functions anyway * return */ - __Pyx_TraceLine(84,0,__PYX_ERR(18, 84, __pyx_L1_error)) __pyx_t_1 = ((LIBXSLT_VERSION < 0x278D) != 0); if (__pyx_t_1) { @@ -187599,7 +174595,6 @@ static void __pyx_f_4lxml_5etree_13_XPathContext_registerExsltFunctions(struct _ * tree.xmlHashScan( * self._xpathCtxt.nsHash, _registerExsltFunctionsForNamespaces, */ - __Pyx_TraceLine(86,0,__PYX_ERR(18, 86, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/xpath.pxi":84 @@ -187618,7 +174613,6 @@ static void __pyx_f_4lxml_5etree_13_XPathContext_registerExsltFunctions(struct _ * self._xpathCtxt.nsHash, _registerExsltFunctionsForNamespaces, * self._xpathCtxt) */ - __Pyx_TraceLine(87,0,__PYX_ERR(18, 87, __pyx_L1_error)) xmlHashScan(__pyx_v_self->__pyx_base._xpathCtxt->nsHash, __pyx_f_4lxml_5etree__registerExsltFunctionsForNamespaces, __pyx_v_self->__pyx_base._xpathCtxt); /* "src/lxml/xpath.pxi":83 @@ -187630,11 +174624,7 @@ static void __pyx_f_4lxml_5etree_13_XPathContext_registerExsltFunctions(struct _ */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._XPathContext.registerExsltFunctions", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -187651,7 +174641,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_registerVariables(struct _ PyObject *__pyx_v_value = NULL; PyObject *__pyx_v_name_utf = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -187663,7 +174652,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_registerVariables(struct _ PyObject *(*__pyx_t_8)(PyObject *); xmlXPathObject *__pyx_t_9; __Pyx_RefNannySetupContext("registerVariables", 0); - __Pyx_TraceCall("registerVariables", __pyx_f[18], 91, 0, __PYX_ERR(18, 91, __pyx_L1_error)); /* "src/lxml/xpath.pxi":92 * @@ -187672,7 +174660,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_registerVariables(struct _ * name_utf = self._to_utf(name) * xpath.xmlXPathRegisterVariable( */ - __Pyx_TraceLine(92,0,__PYX_ERR(18, 92, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_variable_dict, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; @@ -187685,12 +174672,9 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_registerVariables(struct _ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 92, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 92, __pyx_L1_error) - } + __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(18, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { @@ -187791,7 +174775,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_registerVariables(struct _ * xpath.xmlXPathRegisterVariable( * self._xpathCtxt, _xcstr(name_utf), _wrapXPathObject(value, None, None)) */ - __Pyx_TraceLine(93,0,__PYX_ERR(18, 93, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__XPathContext *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._to_utf(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self), __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_name_utf, ((PyObject*)__pyx_t_1)); @@ -187804,7 +174787,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_registerVariables(struct _ * * cdef registerVariable(self, name, value): */ - __Pyx_TraceLine(95,0,__PYX_ERR(18, 95, __pyx_L1_error)) __pyx_t_9 = __pyx_f_4lxml_5etree__wrapXPathObject(__pyx_v_value, ((struct LxmlDocument *)Py_None), ((struct __pyx_obj_4lxml_5etree__BaseContext *)Py_None)); if (unlikely(__pyx_t_9 == ((xmlXPathObject *)NULL))) __PYX_ERR(18, 95, __pyx_L1_error) /* "src/lxml/xpath.pxi":94 @@ -187814,7 +174796,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_registerVariables(struct _ * self._xpathCtxt, _xcstr(name_utf), _wrapXPathObject(value, None, None)) * */ - __Pyx_TraceLine(94,0,__PYX_ERR(18, 94, __pyx_L1_error)) (void)(xmlXPathRegisterVariable(__pyx_v_self->__pyx_base._xpathCtxt, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_name_utf), __pyx_t_9)); /* "src/lxml/xpath.pxi":92 @@ -187824,7 +174805,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_registerVariables(struct _ * name_utf = self._to_utf(name) * xpath.xmlXPathRegisterVariable( */ - __Pyx_TraceLine(92,0,__PYX_ERR(18, 92, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -187852,7 +174832,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_registerVariables(struct _ __Pyx_XDECREF(__pyx_v_value); __Pyx_XDECREF(__pyx_v_name_utf); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -187868,12 +174847,10 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_registerVariables(struct _ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_registerVariable(struct __pyx_obj_4lxml_5etree__XPathContext *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) { PyObject *__pyx_v_name_utf = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; xmlXPathObject *__pyx_t_2; __Pyx_RefNannySetupContext("registerVariable", 0); - __Pyx_TraceCall("registerVariable", __pyx_f[18], 97, 0, __PYX_ERR(18, 97, __pyx_L1_error)); /* "src/lxml/xpath.pxi":98 * @@ -187882,7 +174859,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_registerVariable(struct __ * xpath.xmlXPathRegisterVariable( * self._xpathCtxt, _xcstr(name_utf), _wrapXPathObject(value, None, None)) */ - __Pyx_TraceLine(98,0,__PYX_ERR(18, 98, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__XPathContext *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._to_utf(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self), __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_name_utf = ((PyObject*)__pyx_t_1); @@ -187895,7 +174871,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_registerVariable(struct __ * * */ - __Pyx_TraceLine(100,0,__PYX_ERR(18, 100, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__wrapXPathObject(__pyx_v_value, ((struct LxmlDocument *)Py_None), ((struct __pyx_obj_4lxml_5etree__BaseContext *)Py_None)); if (unlikely(__pyx_t_2 == ((xmlXPathObject *)NULL))) __PYX_ERR(18, 100, __pyx_L1_error) /* "src/lxml/xpath.pxi":99 @@ -187905,7 +174880,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_registerVariable(struct __ * self._xpathCtxt, _xcstr(name_utf), _wrapXPathObject(value, None, None)) * */ - __Pyx_TraceLine(99,0,__PYX_ERR(18, 99, __pyx_L1_error)) (void)(xmlXPathRegisterVariable(__pyx_v_self->__pyx_base._xpathCtxt, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_name_utf), __pyx_t_2)); /* "src/lxml/xpath.pxi":97 @@ -187926,7 +174900,6 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_registerVariable(struct __ __pyx_L0:; __Pyx_XDECREF(__pyx_v_name_utf); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -187935,37 +174908,33 @@ static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_registerVariable(struct __ * * * cdef void _registerExsltFunctionsForNamespaces( # <<<<<<<<<<<<<< - * void* _c_href, void* _ctxt, xmlChar* c_prefix): + * void* _c_href, void* _ctxt, const_xmlChar* c_prefix): * c_href = _c_href */ -static void __pyx_f_4lxml_5etree__registerExsltFunctionsForNamespaces(void *__pyx_v__c_href, void *__pyx_v__ctxt, xmlChar *__pyx_v_c_prefix) { +static void __pyx_f_4lxml_5etree__registerExsltFunctionsForNamespaces(void *__pyx_v__c_href, void *__pyx_v__ctxt, const xmlChar *__pyx_v_c_prefix) { const xmlChar *__pyx_v_c_href; xmlXPathContext *__pyx_v_ctxt; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_registerExsltFunctionsForNamespaces", 0); - __Pyx_TraceCall("_registerExsltFunctionsForNamespaces", __pyx_f[18], 103, 0, __PYX_ERR(18, 103, __pyx_L1_error)); /* "src/lxml/xpath.pxi":105 * cdef void _registerExsltFunctionsForNamespaces( - * void* _c_href, void* _ctxt, xmlChar* c_prefix): + * void* _c_href, void* _ctxt, const_xmlChar* c_prefix): * c_href = _c_href # <<<<<<<<<<<<<< * ctxt = _ctxt * */ - __Pyx_TraceLine(105,0,__PYX_ERR(18, 105, __pyx_L1_error)) __pyx_v_c_href = ((const xmlChar *)__pyx_v__c_href); /* "src/lxml/xpath.pxi":106 - * void* _c_href, void* _ctxt, xmlChar* c_prefix): + * void* _c_href, void* _ctxt, const_xmlChar* c_prefix): * c_href = _c_href * ctxt = _ctxt # <<<<<<<<<<<<<< * * if tree.xmlStrcmp(c_href, xslt.EXSLT_DATE_NAMESPACE) == 0: */ - __Pyx_TraceLine(106,0,__PYX_ERR(18, 106, __pyx_L1_error)) __pyx_v_ctxt = ((xmlXPathContext *)__pyx_v__ctxt); /* "src/lxml/xpath.pxi":108 @@ -187975,7 +174944,6 @@ static void __pyx_f_4lxml_5etree__registerExsltFunctionsForNamespaces(void *__py * xslt.exsltDateXpathCtxtRegister(ctxt, c_prefix) * elif tree.xmlStrcmp(c_href, xslt.EXSLT_SETS_NAMESPACE) == 0: */ - __Pyx_TraceLine(108,0,__PYX_ERR(18, 108, __pyx_L1_error)) __pyx_t_1 = ((xmlStrcmp(__pyx_v_c_href, EXSLT_DATE_NAMESPACE) == 0) != 0); if (__pyx_t_1) { @@ -187986,7 +174954,6 @@ static void __pyx_f_4lxml_5etree__registerExsltFunctionsForNamespaces(void *__py * elif tree.xmlStrcmp(c_href, xslt.EXSLT_SETS_NAMESPACE) == 0: * xslt.exsltSetsXpathCtxtRegister(ctxt, c_prefix) */ - __Pyx_TraceLine(109,0,__PYX_ERR(18, 109, __pyx_L1_error)) (void)(exsltDateXpathCtxtRegister(__pyx_v_ctxt, __pyx_v_c_prefix)); /* "src/lxml/xpath.pxi":108 @@ -188006,7 +174973,6 @@ static void __pyx_f_4lxml_5etree__registerExsltFunctionsForNamespaces(void *__py * xslt.exsltSetsXpathCtxtRegister(ctxt, c_prefix) * elif tree.xmlStrcmp(c_href, xslt.EXSLT_MATH_NAMESPACE) == 0: */ - __Pyx_TraceLine(110,0,__PYX_ERR(18, 110, __pyx_L1_error)) __pyx_t_1 = ((xmlStrcmp(__pyx_v_c_href, EXSLT_SETS_NAMESPACE) == 0) != 0); if (__pyx_t_1) { @@ -188017,7 +174983,6 @@ static void __pyx_f_4lxml_5etree__registerExsltFunctionsForNamespaces(void *__py * elif tree.xmlStrcmp(c_href, xslt.EXSLT_MATH_NAMESPACE) == 0: * xslt.exsltMathXpathCtxtRegister(ctxt, c_prefix) */ - __Pyx_TraceLine(111,0,__PYX_ERR(18, 111, __pyx_L1_error)) (void)(exsltSetsXpathCtxtRegister(__pyx_v_ctxt, __pyx_v_c_prefix)); /* "src/lxml/xpath.pxi":110 @@ -188037,7 +175002,6 @@ static void __pyx_f_4lxml_5etree__registerExsltFunctionsForNamespaces(void *__py * xslt.exsltMathXpathCtxtRegister(ctxt, c_prefix) * elif tree.xmlStrcmp(c_href, xslt.EXSLT_STRINGS_NAMESPACE) == 0: */ - __Pyx_TraceLine(112,0,__PYX_ERR(18, 112, __pyx_L1_error)) __pyx_t_1 = ((xmlStrcmp(__pyx_v_c_href, EXSLT_MATH_NAMESPACE) == 0) != 0); if (__pyx_t_1) { @@ -188048,7 +175012,6 @@ static void __pyx_f_4lxml_5etree__registerExsltFunctionsForNamespaces(void *__py * elif tree.xmlStrcmp(c_href, xslt.EXSLT_STRINGS_NAMESPACE) == 0: * xslt.exsltStrXpathCtxtRegister(ctxt, c_prefix) */ - __Pyx_TraceLine(113,0,__PYX_ERR(18, 113, __pyx_L1_error)) (void)(exsltMathXpathCtxtRegister(__pyx_v_ctxt, __pyx_v_c_prefix)); /* "src/lxml/xpath.pxi":112 @@ -188068,7 +175031,6 @@ static void __pyx_f_4lxml_5etree__registerExsltFunctionsForNamespaces(void *__py * xslt.exsltStrXpathCtxtRegister(ctxt, c_prefix) * */ - __Pyx_TraceLine(114,0,__PYX_ERR(18, 114, __pyx_L1_error)) __pyx_t_1 = ((xmlStrcmp(__pyx_v_c_href, EXSLT_STRINGS_NAMESPACE) == 0) != 0); if (__pyx_t_1) { @@ -188079,7 +175041,6 @@ static void __pyx_f_4lxml_5etree__registerExsltFunctionsForNamespaces(void *__py * * */ - __Pyx_TraceLine(115,0,__PYX_ERR(18, 115, __pyx_L1_error)) (void)(exsltStrXpathCtxtRegister(__pyx_v_ctxt, __pyx_v_c_prefix)); /* "src/lxml/xpath.pxi":114 @@ -188096,16 +175057,11 @@ static void __pyx_f_4lxml_5etree__registerExsltFunctionsForNamespaces(void *__py * * * cdef void _registerExsltFunctionsForNamespaces( # <<<<<<<<<<<<<< - * void* _c_href, void* _ctxt, xmlChar* c_prefix): + * void* _c_href, void* _ctxt, const_xmlChar* c_prefix): * c_href = _c_href */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._registerExsltFunctionsForNamespaces", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -188135,12 +175091,10 @@ static int __pyx_pw_4lxml_5etree_19_XPathEvaluatorBase_1__cinit__(PyObject *__py static int __pyx_pf_4lxml_5etree_19_XPathEvaluatorBase___cinit__(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[18], 123, 0, __PYX_ERR(18, 123, __pyx_L1_error)); /* "src/lxml/xpath.pxi":124 * cdef _ErrorLog _error_log @@ -188149,7 +175103,6 @@ static int __pyx_pf_4lxml_5etree_19_XPathEvaluatorBase___cinit__(struct __pyx_ob * if config.ENABLE_THREADING: * self._eval_lock = python.PyThread_allocate_lock() */ - __Pyx_TraceLine(124,0,__PYX_ERR(18, 124, __pyx_L1_error)) __pyx_v_self->_xpathCtxt = NULL; /* "src/lxml/xpath.pxi":125 @@ -188159,7 +175112,6 @@ static int __pyx_pf_4lxml_5etree_19_XPathEvaluatorBase___cinit__(struct __pyx_ob * self._eval_lock = python.PyThread_allocate_lock() * if self._eval_lock is NULL: */ - __Pyx_TraceLine(125,0,__PYX_ERR(18, 125, __pyx_L1_error)) __pyx_t_1 = (ENABLE_THREADING != 0); if (__pyx_t_1) { @@ -188170,7 +175122,6 @@ static int __pyx_pf_4lxml_5etree_19_XPathEvaluatorBase___cinit__(struct __pyx_ob * if self._eval_lock is NULL: * raise MemoryError() */ - __Pyx_TraceLine(126,0,__PYX_ERR(18, 126, __pyx_L1_error)) __pyx_v_self->_eval_lock = PyThread_allocate_lock(); /* "src/lxml/xpath.pxi":127 @@ -188180,7 +175131,6 @@ static int __pyx_pf_4lxml_5etree_19_XPathEvaluatorBase___cinit__(struct __pyx_ob * raise MemoryError() * self._error_log = _ErrorLog() */ - __Pyx_TraceLine(127,0,__PYX_ERR(18, 127, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_eval_lock == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -188191,7 +175141,6 @@ static int __pyx_pf_4lxml_5etree_19_XPathEvaluatorBase___cinit__(struct __pyx_ob * self._error_log = _ErrorLog() * */ - __Pyx_TraceLine(128,0,__PYX_ERR(18, 128, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(18, 128, __pyx_L1_error) /* "src/lxml/xpath.pxi":127 @@ -188219,7 +175168,6 @@ static int __pyx_pf_4lxml_5etree_19_XPathEvaluatorBase___cinit__(struct __pyx_ob * * def __init__(self, namespaces, extensions, enable_regexp, */ - __Pyx_TraceLine(129,0,__PYX_ERR(18, 129, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__ErrorLog)); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -188244,7 +175192,6 @@ static int __pyx_pf_4lxml_5etree_19_XPathEvaluatorBase___cinit__(struct __pyx_ob __Pyx_AddTraceback("lxml.etree._XPathEvaluatorBase.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -188342,12 +175289,10 @@ static int __pyx_pw_4lxml_5etree_19_XPathEvaluatorBase_3__init__(PyObject *__pyx static int __pyx_pf_4lxml_5etree_19_XPathEvaluatorBase_2__init__(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *__pyx_v_self, PyObject *__pyx_v_namespaces, PyObject *__pyx_v_extensions, PyObject *__pyx_v_enable_regexp, PyObject *__pyx_v_smart_strings) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[18], 131, 0, __PYX_ERR(18, 131, __pyx_L1_error)); /* "src/lxml/xpath.pxi":133 * def __init__(self, namespaces, extensions, enable_regexp, @@ -188356,7 +175301,6 @@ static int __pyx_pf_4lxml_5etree_19_XPathEvaluatorBase_2__init__(struct __pyx_ob * enable_regexp, None, smart_strings) * */ - __Pyx_TraceLine(133,0,__PYX_ERR(18, 133, __pyx_L1_error)) __pyx_t_1 = PyTuple_New(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_namespaces); @@ -188403,7 +175347,6 @@ static int __pyx_pf_4lxml_5etree_19_XPathEvaluatorBase_2__init__(struct __pyx_ob __Pyx_AddTraceback("lxml.etree._XPathEvaluatorBase.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -188431,12 +175374,10 @@ static PyObject *__pyx_pw_4lxml_5etree_19_XPathEvaluatorBase_9error_log_1__get__ static PyObject *__pyx_pf_4lxml_5etree_19_XPathEvaluatorBase_9error_log___get__(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[18], 137, 0, __PYX_ERR(18, 137, __pyx_L1_error)); /* "src/lxml/xpath.pxi":138 * property error_log: @@ -188445,7 +175386,6 @@ static PyObject *__pyx_pf_4lxml_5etree_19_XPathEvaluatorBase_9error_log___get__( * return self._error_log.copy() * */ - __Pyx_TraceLine(138,0,__PYX_ERR(18, 138, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_1 = (((PyObject *)__pyx_v_self->_error_log) != Py_None); @@ -188463,7 +175403,6 @@ static PyObject *__pyx_pf_4lxml_5etree_19_XPathEvaluatorBase_9error_log___get__( * * def __dealloc__(self): */ - __Pyx_TraceLine(139,0,__PYX_ERR(18, 139, __pyx_L1_error)) __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(18, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -188486,7 +175425,6 @@ static PyObject *__pyx_pf_4lxml_5etree_19_XPathEvaluatorBase_9error_log___get__( __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -188511,11 +175449,9 @@ static void __pyx_pw_4lxml_5etree_19_XPathEvaluatorBase_5__dealloc__(PyObject *_ } static void __pyx_pf_4lxml_5etree_19_XPathEvaluatorBase_4__dealloc__(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *__pyx_v_self) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__dealloc__", 0); - __Pyx_TraceCall("__dealloc__", __pyx_f[18], 141, 0, __PYX_ERR(18, 141, __pyx_L1_error)); /* "src/lxml/xpath.pxi":142 * @@ -188524,7 +175460,6 @@ static void __pyx_pf_4lxml_5etree_19_XPathEvaluatorBase_4__dealloc__(struct __py * xpath.xmlXPathFreeContext(self._xpathCtxt) * if config.ENABLE_THREADING: */ - __Pyx_TraceLine(142,0,__PYX_ERR(18, 142, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_xpathCtxt != NULL) != 0); if (__pyx_t_1) { @@ -188535,7 +175470,6 @@ static void __pyx_pf_4lxml_5etree_19_XPathEvaluatorBase_4__dealloc__(struct __py * if config.ENABLE_THREADING: * if self._eval_lock is not NULL: */ - __Pyx_TraceLine(143,0,__PYX_ERR(18, 143, __pyx_L1_error)) xmlXPathFreeContext(__pyx_v_self->_xpathCtxt); /* "src/lxml/xpath.pxi":142 @@ -188554,7 +175488,6 @@ static void __pyx_pf_4lxml_5etree_19_XPathEvaluatorBase_4__dealloc__(struct __py * if self._eval_lock is not NULL: * python.PyThread_free_lock(self._eval_lock) */ - __Pyx_TraceLine(144,0,__PYX_ERR(18, 144, __pyx_L1_error)) __pyx_t_1 = (ENABLE_THREADING != 0); if (__pyx_t_1) { @@ -188565,7 +175498,6 @@ static void __pyx_pf_4lxml_5etree_19_XPathEvaluatorBase_4__dealloc__(struct __py * python.PyThread_free_lock(self._eval_lock) * */ - __Pyx_TraceLine(145,0,__PYX_ERR(18, 145, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_eval_lock != NULL) != 0); if (__pyx_t_1) { @@ -188576,7 +175508,6 @@ static void __pyx_pf_4lxml_5etree_19_XPathEvaluatorBase_4__dealloc__(struct __py * * cdef set_context(self, xpath.xmlXPathContext* xpathCtxt): */ - __Pyx_TraceLine(146,0,__PYX_ERR(18, 146, __pyx_L1_error)) PyThread_free_lock(__pyx_v_self->_eval_lock); /* "src/lxml/xpath.pxi":145 @@ -188606,11 +175537,6 @@ static void __pyx_pf_4lxml_5etree_19_XPathEvaluatorBase_4__dealloc__(struct __py */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._XPathEvaluatorBase.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -188624,11 +175550,9 @@ static void __pyx_pf_4lxml_5etree_19_XPathEvaluatorBase_4__dealloc__(struct __py static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase_set_context(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *__pyx_v_self, xmlXPathContext *__pyx_v_xpathCtxt) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("set_context", 0); - __Pyx_TraceCall("set_context", __pyx_f[18], 148, 0, __PYX_ERR(18, 148, __pyx_L1_error)); /* "src/lxml/xpath.pxi":149 * @@ -188637,7 +175561,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase_set_context(struct _ * self._context.set_context(xpathCtxt) * */ - __Pyx_TraceLine(149,0,__PYX_ERR(18, 149, __pyx_L1_error)) __pyx_v_self->_xpathCtxt = __pyx_v_xpathCtxt; /* "src/lxml/xpath.pxi":150 @@ -188647,7 +175570,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase_set_context(struct _ * * def evaluate(self, _eval_arg, **_variables): */ - __Pyx_TraceLine(150,0,__PYX_ERR(18, 150, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_13_XPathContext_set_context(__pyx_v_self->_context, __pyx_v_xpathCtxt); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -188669,7 +175591,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase_set_context(struct _ __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -188685,7 +175606,7 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase_set_context(struct _ /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_19_XPathEvaluatorBase_7evaluate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_19_XPathEvaluatorBase_6evaluate[] = "evaluate(self, _eval_arg, **_variables)\n\n Evaluate an XPath expression.\n\n Instead of calling this method, you can also call the evaluator object\n itself.\n\n Variables may be provided as keyword arguments. Note that namespaces\n are currently not supported for variables.\n\n :deprecated: call the object, not its method.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_19_XPathEvaluatorBase_7evaluate = {"evaluate", (PyCFunction)__pyx_pw_4lxml_5etree_19_XPathEvaluatorBase_7evaluate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_19_XPathEvaluatorBase_6evaluate}; +static PyMethodDef __pyx_mdef_4lxml_5etree_19_XPathEvaluatorBase_7evaluate = {"evaluate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_19_XPathEvaluatorBase_7evaluate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_19_XPathEvaluatorBase_6evaluate}; static PyObject *__pyx_pw_4lxml_5etree_19_XPathEvaluatorBase_7evaluate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v__eval_arg = 0; PyObject *__pyx_v__variables = 0; @@ -188741,13 +175662,10 @@ static PyObject *__pyx_pw_4lxml_5etree_19_XPathEvaluatorBase_7evaluate(PyObject static PyObject *__pyx_pf_4lxml_5etree_19_XPathEvaluatorBase_6evaluate(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *__pyx_v_self, PyObject *__pyx_v__eval_arg, PyObject *__pyx_v__variables) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__342) __Pyx_RefNannySetupContext("evaluate", 0); - __Pyx_TraceCall("evaluate", __pyx_f[18], 152, 0, __PYX_ERR(18, 152, __pyx_L1_error)); /* "src/lxml/xpath.pxi":165 * :deprecated: call the object, not its method. @@ -188756,7 +175674,6 @@ static PyObject *__pyx_pf_4lxml_5etree_19_XPathEvaluatorBase_6evaluate(struct __ * * cdef bint _checkAbsolutePath(self, char* path): */ - __Pyx_TraceLine(165,0,__PYX_ERR(18, 165, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -188786,7 +175703,6 @@ static PyObject *__pyx_pf_4lxml_5etree_19_XPathEvaluatorBase_6evaluate(struct __ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -188802,11 +175718,9 @@ static PyObject *__pyx_pf_4lxml_5etree_19_XPathEvaluatorBase_6evaluate(struct __ static int __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__checkAbsolutePath(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *__pyx_v_self, char *__pyx_v_path) { char __pyx_v_c; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_checkAbsolutePath", 0); - __Pyx_TraceCall("_checkAbsolutePath", __pyx_f[18], 167, 0, __PYX_ERR(18, 167, __pyx_L1_error)); /* "src/lxml/xpath.pxi":169 * cdef bint _checkAbsolutePath(self, char* path): @@ -188815,7 +175729,6 @@ static int __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__checkAbsolutePath(CYTHON_ * return 0 * c = path[0] */ - __Pyx_TraceLine(169,0,__PYX_ERR(18, 169, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_path == NULL) != 0); if (__pyx_t_1) { @@ -188826,7 +175739,6 @@ static int __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__checkAbsolutePath(CYTHON_ * c = path[0] * while c == c' ' or c == c'\t': */ - __Pyx_TraceLine(170,0,__PYX_ERR(18, 170, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -188846,7 +175758,6 @@ static int __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__checkAbsolutePath(CYTHON_ * while c == c' ' or c == c'\t': * path = path + 1 */ - __Pyx_TraceLine(171,0,__PYX_ERR(18, 171, __pyx_L1_error)) __pyx_v_c = (__pyx_v_path[0]); /* "src/lxml/xpath.pxi":172 @@ -188856,7 +175767,6 @@ static int __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__checkAbsolutePath(CYTHON_ * path = path + 1 * c = path[0] */ - __Pyx_TraceLine(172,0,__PYX_ERR(18, 172, __pyx_L1_error)) while (1) { switch (__pyx_v_c) { case ' ': @@ -188876,7 +175786,6 @@ static int __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__checkAbsolutePath(CYTHON_ * c = path[0] * return c == c'/' */ - __Pyx_TraceLine(173,0,__PYX_ERR(18, 173, __pyx_L1_error)) __pyx_v_path = (__pyx_v_path + 1); /* "src/lxml/xpath.pxi":174 @@ -188886,7 +175795,6 @@ static int __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__checkAbsolutePath(CYTHON_ * return c == c'/' * */ - __Pyx_TraceLine(174,0,__PYX_ERR(18, 174, __pyx_L1_error)) __pyx_v_c = (__pyx_v_path[0]); } @@ -188897,7 +175805,6 @@ static int __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__checkAbsolutePath(CYTHON_ * * @cython.final */ - __Pyx_TraceLine(175,0,__PYX_ERR(18, 175, __pyx_L1_error)) __pyx_r = (__pyx_v_c == '/'); goto __pyx_L0; @@ -188910,11 +175817,7 @@ static int __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__checkAbsolutePath(CYTHON_ */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._XPathEvaluatorBase._checkAbsolutePath", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -188930,12 +175833,10 @@ static int __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__checkAbsolutePath(CYTHON_ static int __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__lock(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *__pyx_v_self) { int __pyx_v_result; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_lock", 0); - __Pyx_TraceCall("_lock", __pyx_f[18], 178, 0, __PYX_ERR(18, 178, __pyx_L1_error)); /* "src/lxml/xpath.pxi":180 * cdef int _lock(self) except -1: @@ -188944,7 +175845,6 @@ static int __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__lock(struct __pyx_obj_4lx * with nogil: * result = python.PyThread_acquire_lock( */ - __Pyx_TraceLine(180,0,__PYX_ERR(18, 180, __pyx_L1_error)) __pyx_t_2 = (ENABLE_THREADING != 0); if (__pyx_t_2) { } else { @@ -188963,7 +175863,6 @@ static int __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__lock(struct __pyx_obj_4lx * result = python.PyThread_acquire_lock( * self._eval_lock, python.WAIT_LOCK) */ - __Pyx_TraceLine(181,0,__PYX_ERR(18, 181, __pyx_L1_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -188979,7 +175878,6 @@ static int __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__lock(struct __pyx_obj_4lx * self._eval_lock, python.WAIT_LOCK) * if result == 0: */ - __Pyx_TraceLine(182,1,__PYX_ERR(18, 182, __pyx_L7_error)) __pyx_v_result = PyThread_acquire_lock(__pyx_v_self->_eval_lock, WAIT_LOCK); } @@ -188990,7 +175888,6 @@ static int __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__lock(struct __pyx_obj_4lx * result = python.PyThread_acquire_lock( * self._eval_lock, python.WAIT_LOCK) */ - __Pyx_TraceLine(181,1,__PYX_ERR(18, 181, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -188999,13 +175896,6 @@ static int __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__lock(struct __pyx_obj_4lx #endif goto __pyx_L8; } - __pyx_L7_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L1_error; - } __pyx_L8:; } } @@ -189017,7 +175907,6 @@ static int __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__lock(struct __pyx_obj_4lx * raise XPathError, u"XPath evaluator locking failed" * return 0 */ - __Pyx_TraceLine(184,0,__PYX_ERR(18, 184, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_result == 0) != 0); if (unlikely(__pyx_t_1)) { @@ -189028,7 +175917,6 @@ static int __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__lock(struct __pyx_obj_4lx * return 0 * */ - __Pyx_TraceLine(185,0,__PYX_ERR(18, 185, __pyx_L1_error)) __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_XPathError), __pyx_kp_u_XPath_evaluator_locking_failed, 0, 0); __PYX_ERR(18, 185, __pyx_L1_error) @@ -189057,7 +175945,6 @@ static int __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__lock(struct __pyx_obj_4lx * * @cython.final */ - __Pyx_TraceLine(186,0,__PYX_ERR(18, 186, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -189074,7 +175961,6 @@ static int __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__lock(struct __pyx_obj_4lx __Pyx_AddTraceback("lxml.etree._XPathEvaluatorBase._lock", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -189088,12 +175974,10 @@ static int __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__lock(struct __pyx_obj_4lx */ static void __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__unlock(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *__pyx_v_self) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_unlock", 0); - __Pyx_TraceCall("_unlock", __pyx_f[18], 189, 0, __PYX_ERR(18, 189, __pyx_L1_error)); /* "src/lxml/xpath.pxi":190 * @cython.final @@ -189102,7 +175986,6 @@ static void __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__unlock(struct __pyx_obj_ * python.PyThread_release_lock(self._eval_lock) * */ - __Pyx_TraceLine(190,0,__PYX_ERR(18, 190, __pyx_L1_error)) __pyx_t_2 = (ENABLE_THREADING != 0); if (__pyx_t_2) { } else { @@ -189121,7 +176004,6 @@ static void __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__unlock(struct __pyx_obj_ * * cdef _build_parse_error(self): */ - __Pyx_TraceLine(191,0,__PYX_ERR(18, 191, __pyx_L1_error)) PyThread_release_lock(__pyx_v_self->_eval_lock); /* "src/lxml/xpath.pxi":190 @@ -189142,11 +176024,6 @@ static void __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__unlock(struct __pyx_obj_ */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._XPathEvaluatorBase._unlock", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -189162,18 +176039,16 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__build_parse_error(s struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_v_entries = 0; PyObject *__pyx_v_message = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; + int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; - int __pyx_t_7; + PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("_build_parse_error", 0); - __Pyx_TraceCall("_build_parse_error", __pyx_f[18], 193, 0, __PYX_ERR(18, 193, __pyx_L1_error)); /* "src/lxml/xpath.pxi":195 * cdef _build_parse_error(self): @@ -189182,7 +176057,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__build_parse_error(s * if entries: * message = entries._buildExceptionMessage(None) */ - __Pyx_TraceLine(195,0,__PYX_ERR(18, 195, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_error_log), __pyx_n_s_filter_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; @@ -189195,38 +176069,10 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__build_parse_error(s __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_4lxml_5etree__XPATH_SYNTAX_ERRORS); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 195, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_4lxml_5etree__XPATH_SYNTAX_ERRORS}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 195, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_4lxml_5etree__XPATH_SYNTAX_ERRORS}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 195, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(18, 195, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_v_4lxml_5etree__XPATH_SYNTAX_ERRORS); - __Pyx_GIVEREF(__pyx_v_4lxml_5etree__XPATH_SYNTAX_ERRORS); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_4lxml_5etree__XPATH_SYNTAX_ERRORS); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 195, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_4lxml_5etree__XPATH_SYNTAX_ERRORS) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_4lxml_5etree__XPATH_SYNTAX_ERRORS); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 195, __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__BaseErrorLog))))) __PYX_ERR(18, 195, __pyx_L1_error) __pyx_v_entries = ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_t_1); @@ -189239,9 +176085,8 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__build_parse_error(s * message = entries._buildExceptionMessage(None) * if message is not None: */ - __Pyx_TraceLine(196,0,__PYX_ERR(18, 196, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_entries)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(18, 196, __pyx_L1_error) - if (__pyx_t_5) { + __pyx_t_4 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_entries)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(18, 196, __pyx_L1_error) + if (__pyx_t_4) { /* "src/lxml/xpath.pxi":197 * entries = self._error_log.filter_types(_XPATH_SYNTAX_ERRORS) @@ -189250,7 +176095,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__build_parse_error(s * if message is not None: * return XPathSyntaxError(message, self._error_log) */ - __Pyx_TraceLine(197,0,__PYX_ERR(18, 197, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(__pyx_v_entries, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_message = __pyx_t_1; @@ -189263,10 +176107,9 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__build_parse_error(s * return XPathSyntaxError(message, self._error_log) * return XPathSyntaxError( */ - __Pyx_TraceLine(198,0,__PYX_ERR(18, 198, __pyx_L1_error)) - __pyx_t_5 = (__pyx_v_message != Py_None); - __pyx_t_6 = (__pyx_t_5 != 0); - if (__pyx_t_6) { + __pyx_t_4 = (__pyx_v_message != Py_None); + __pyx_t_5 = (__pyx_t_4 != 0); + if (__pyx_t_5) { /* "src/lxml/xpath.pxi":199 * message = entries._buildExceptionMessage(None) @@ -189275,53 +176118,52 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__build_parse_error(s * return XPathSyntaxError( * self._error_log._buildExceptionMessage(u"Error in xpath expression"), */ - __Pyx_TraceLine(199,0,__PYX_ERR(18, 199, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_XPathSyntaxError); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 199, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_XPathSyntaxError); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = NULL; - __pyx_t_7 = 0; + __pyx_t_3 = NULL; + __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_4)) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); - __pyx_t_7 = 1; + __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_message, ((PyObject *)__pyx_v_self->_error_log)}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 199, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_message, ((PyObject *)__pyx_v_self->_error_log)}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 199, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_message, ((PyObject *)__pyx_v_self->_error_log)}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 199, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_message, ((PyObject *)__pyx_v_self->_error_log)}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 199, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 199, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__pyx_t_4) { - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL; + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(18, 199, __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; } __Pyx_INCREF(__pyx_v_message); __Pyx_GIVEREF(__pyx_v_message); - PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_7, __pyx_v_message); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_message); __Pyx_INCREF(((PyObject *)__pyx_v_self->_error_log)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_error_log)); - PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_7, ((PyObject *)__pyx_v_self->_error_log)); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 199, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_self->_error_log)); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; @@ -189353,9 +176195,8 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__build_parse_error(s * self._error_log._buildExceptionMessage(u"Error in xpath expression"), * self._error_log) */ - __Pyx_TraceLine(200,0,__PYX_ERR(18, 200, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_XPathSyntaxError); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 200, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_XPathSyntaxError); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "src/lxml/xpath.pxi":201 @@ -189365,9 +176206,8 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__build_parse_error(s * self._error_log) * */ - __Pyx_TraceLine(201,0,__PYX_ERR(18, 201, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_self->_error_log), __pyx_kp_u_Error_in_xpath_expression); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 201, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_self->_error_log), __pyx_kp_u_Error_in_xpath_expression); if (unlikely(!__pyx_t_7)) __PYX_ERR(18, 201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); /* "src/lxml/xpath.pxi":202 * return XPathSyntaxError( @@ -189376,49 +176216,48 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__build_parse_error(s * * cdef _build_eval_error(self): */ - __Pyx_TraceLine(202,0,__PYX_ERR(18, 202, __pyx_L1_error)) - __pyx_t_4 = NULL; - __pyx_t_7 = 0; + __pyx_t_3 = NULL; + __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_4)) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); - __pyx_t_7 = 1; + __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, ((PyObject *)__pyx_v_self->_error_log)}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 200, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_7, ((PyObject *)__pyx_v_self->_error_log)}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 200, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, ((PyObject *)__pyx_v_self->_error_log)}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 200, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_7, ((PyObject *)__pyx_v_self->_error_log)}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 200, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(18, 200, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(18, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (__pyx_t_4) { - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL; + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __pyx_t_3 = NULL; } - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_6, __pyx_t_7); __Pyx_INCREF(((PyObject *)__pyx_v_self->_error_log)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_error_log)); - PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, ((PyObject *)__pyx_v_self->_error_log)); - __pyx_t_3 = 0; + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_6, ((PyObject *)__pyx_v_self->_error_log)); + __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -189441,7 +176280,7 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__build_parse_error(s __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("lxml.etree._XPathEvaluatorBase._build_parse_error", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; @@ -189449,7 +176288,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__build_parse_error(s __Pyx_XDECREF((PyObject *)__pyx_v_entries); __Pyx_XDECREF(__pyx_v_message); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -189466,16 +176304,13 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__build_eval_error(st struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_v_entries = 0; PyObject *__pyx_v_message = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; + int __pyx_t_4; int __pyx_t_5; - int __pyx_t_6; __Pyx_RefNannySetupContext("_build_eval_error", 0); - __Pyx_TraceCall("_build_eval_error", __pyx_f[18], 204, 0, __PYX_ERR(18, 204, __pyx_L1_error)); /* "src/lxml/xpath.pxi":206 * cdef _build_eval_error(self): @@ -189484,7 +176319,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__build_eval_error(st * if not entries: * entries = self._error_log.filter_types(_XPATH_SYNTAX_ERRORS) */ - __Pyx_TraceLine(206,0,__PYX_ERR(18, 206, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_error_log), __pyx_n_s_filter_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; @@ -189497,38 +176331,10 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__build_eval_error(st __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_4lxml_5etree__XPATH_EVAL_ERRORS); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 206, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_4lxml_5etree__XPATH_EVAL_ERRORS}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 206, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_4lxml_5etree__XPATH_EVAL_ERRORS}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 206, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(18, 206, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_v_4lxml_5etree__XPATH_EVAL_ERRORS); - __Pyx_GIVEREF(__pyx_v_4lxml_5etree__XPATH_EVAL_ERRORS); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_4lxml_5etree__XPATH_EVAL_ERRORS); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 206, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_4lxml_5etree__XPATH_EVAL_ERRORS) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_4lxml_5etree__XPATH_EVAL_ERRORS); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 206, __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__BaseErrorLog))))) __PYX_ERR(18, 206, __pyx_L1_error) __pyx_v_entries = ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_t_1); @@ -189541,10 +176347,9 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__build_eval_error(st * entries = self._error_log.filter_types(_XPATH_SYNTAX_ERRORS) * if entries: */ - __Pyx_TraceLine(207,0,__PYX_ERR(18, 207, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_entries)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(18, 207, __pyx_L1_error) - __pyx_t_6 = ((!__pyx_t_5) != 0); - if (__pyx_t_6) { + __pyx_t_4 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_entries)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(18, 207, __pyx_L1_error) + __pyx_t_5 = ((!__pyx_t_4) != 0); + if (__pyx_t_5) { /* "src/lxml/xpath.pxi":208 * entries = self._error_log.filter_types(_XPATH_EVAL_ERRORS) @@ -189553,51 +176358,22 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__build_eval_error(st * if entries: * message = entries._buildExceptionMessage(None) */ - __Pyx_TraceLine(208,0,__PYX_ERR(18, 208, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_error_log), __pyx_n_s_filter_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = NULL; + __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_4)) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_4lxml_5etree__XPATH_SYNTAX_ERRORS); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 208, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_4lxml_5etree__XPATH_SYNTAX_ERRORS}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 208, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_4lxml_5etree__XPATH_SYNTAX_ERRORS}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 208, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 208, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(__pyx_v_4lxml_5etree__XPATH_SYNTAX_ERRORS); - __Pyx_GIVEREF(__pyx_v_4lxml_5etree__XPATH_SYNTAX_ERRORS); - PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_4lxml_5etree__XPATH_SYNTAX_ERRORS); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 208, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_4lxml_5etree__XPATH_SYNTAX_ERRORS) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_4lxml_5etree__XPATH_SYNTAX_ERRORS); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 208, __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__BaseErrorLog))))) __PYX_ERR(18, 208, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_entries, ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_t_1)); @@ -189619,9 +176395,8 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__build_eval_error(st * message = entries._buildExceptionMessage(None) * if message is not None: */ - __Pyx_TraceLine(209,0,__PYX_ERR(18, 209, __pyx_L1_error)) - __pyx_t_6 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_entries)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(18, 209, __pyx_L1_error) - if (__pyx_t_6) { + __pyx_t_5 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_entries)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(18, 209, __pyx_L1_error) + if (__pyx_t_5) { /* "src/lxml/xpath.pxi":210 * entries = self._error_log.filter_types(_XPATH_SYNTAX_ERRORS) @@ -189630,7 +176405,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__build_eval_error(st * if message is not None: * return XPathEvalError(message, self._error_log) */ - __Pyx_TraceLine(210,0,__PYX_ERR(18, 210, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(__pyx_v_entries, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_message = __pyx_t_1; @@ -189643,10 +176417,9 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__build_eval_error(st * return XPathEvalError(message, self._error_log) * return XPathEvalError( */ - __Pyx_TraceLine(211,0,__PYX_ERR(18, 211, __pyx_L1_error)) - __pyx_t_6 = (__pyx_v_message != Py_None); - __pyx_t_5 = (__pyx_t_6 != 0); - if (__pyx_t_5) { + __pyx_t_5 = (__pyx_v_message != Py_None); + __pyx_t_4 = (__pyx_t_5 != 0); + if (__pyx_t_4) { /* "src/lxml/xpath.pxi":212 * message = entries._buildExceptionMessage(None) @@ -189655,7 +176428,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__build_eval_error(st * return XPathEvalError( * self._error_log._buildExceptionMessage(u"Error in xpath expression"), */ - __Pyx_TraceLine(212,0,__PYX_ERR(18, 212, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -189697,7 +176469,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__build_eval_error(st * self._error_log._buildExceptionMessage(u"Error in xpath expression"), * self._error_log) */ - __Pyx_TraceLine(213,0,__PYX_ERR(18, 213, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); /* "src/lxml/xpath.pxi":214 @@ -189707,7 +176478,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__build_eval_error(st * self._error_log) * */ - __Pyx_TraceLine(214,0,__PYX_ERR(18, 214, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_self->_error_log), __pyx_kp_u_Error_in_xpath_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -189718,7 +176488,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__build_eval_error(st * self._error_log._buildExceptionMessage(u"Error in xpath expression"), * self._error_log) */ - __Pyx_TraceLine(213,0,__PYX_ERR(18, 213, __pyx_L1_error)) __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); @@ -189747,14 +176516,12 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__build_eval_error(st __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("lxml.etree._XPathEvaluatorBase._build_eval_error", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_entries); __Pyx_XDECREF(__pyx_v_message); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -189770,7 +176537,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__build_eval_error(st static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__handle_result(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *__pyx_v_self, xmlXPathObject *__pyx_v_xpathObj, struct LxmlDocument *__pyx_v_doc) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -189786,7 +176552,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__handle_result(struc PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; __Pyx_RefNannySetupContext("_handle_result", 0); - __Pyx_TraceCall("_handle_result", __pyx_f[18], 217, 0, __PYX_ERR(18, 217, __pyx_L1_error)); /* "src/lxml/xpath.pxi":218 * @@ -189795,7 +176560,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__handle_result(struc * if xpathObj is not NULL: * _freeXPathObject(xpathObj) */ - __Pyx_TraceLine(218,0,__PYX_ERR(18, 218, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_self->_context->__pyx_base._exc->__pyx_vtab)->_has_raised(__pyx_v_self->_context->__pyx_base._exc); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(18, 218, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -189807,7 +176571,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__handle_result(struc * _freeXPathObject(xpathObj) * xpathObj = NULL */ - __Pyx_TraceLine(219,0,__PYX_ERR(18, 219, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_xpathObj != NULL) != 0); if (__pyx_t_2) { @@ -189818,7 +176581,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__handle_result(struc * xpathObj = NULL * self._context._release_temp_refs() */ - __Pyx_TraceLine(220,0,__PYX_ERR(18, 220, __pyx_L1_error)) __pyx_f_4lxml_5etree__freeXPathObject(__pyx_v_xpathObj); /* "src/lxml/xpath.pxi":221 @@ -189828,7 +176590,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__handle_result(struc * self._context._release_temp_refs() * self._context._exc._raise_if_stored() */ - __Pyx_TraceLine(221,0,__PYX_ERR(18, 221, __pyx_L1_error)) __pyx_v_xpathObj = NULL; /* "src/lxml/xpath.pxi":219 @@ -189847,7 +176608,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__handle_result(struc * self._context._exc._raise_if_stored() * */ - __Pyx_TraceLine(222,0,__PYX_ERR(18, 222, __pyx_L1_error)) __pyx_t_3 = __pyx_f_4lxml_5etree_12_BaseContext__release_temp_refs(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self->_context)); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -189859,7 +176619,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__handle_result(struc * * if xpathObj is NULL: */ - __Pyx_TraceLine(223,0,__PYX_ERR(18, 223, __pyx_L1_error)) __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_self->_context->__pyx_base._exc->__pyx_vtab)->_raise_if_stored(__pyx_v_self->_context->__pyx_base._exc); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(18, 223, __pyx_L1_error) /* "src/lxml/xpath.pxi":218 @@ -189878,7 +176637,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__handle_result(struc * self._context._release_temp_refs() * raise self._build_eval_error() */ - __Pyx_TraceLine(225,0,__PYX_ERR(18, 225, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_xpathObj == NULL) != 0); if (unlikely(__pyx_t_2)) { @@ -189889,7 +176647,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__handle_result(struc * raise self._build_eval_error() * */ - __Pyx_TraceLine(226,0,__PYX_ERR(18, 226, __pyx_L1_error)) __pyx_t_3 = __pyx_f_4lxml_5etree_12_BaseContext__release_temp_refs(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self->_context)); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -189901,7 +176658,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__handle_result(struc * * try: */ - __Pyx_TraceLine(227,0,__PYX_ERR(18, 227, __pyx_L1_error)) __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree__XPathEvaluatorBase *)__pyx_v_self->__pyx_vtab)->_build_eval_error(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); @@ -189924,7 +176680,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__handle_result(struc * result = _unwrapXPathObject(xpathObj, doc, self._context) * finally: */ - __Pyx_TraceLine(229,0,__PYX_ERR(18, 229, __pyx_L7_error)) /*try:*/ { /* "src/lxml/xpath.pxi":230 @@ -189934,7 +176689,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__handle_result(struc * finally: * _freeXPathObject(xpathObj) */ - __Pyx_TraceLine(230,0,__PYX_ERR(18, 230, __pyx_L7_error)) __pyx_t_3 = ((PyObject *)__pyx_v_self->_context); __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = __pyx_f_4lxml_5etree__unwrapXPathObject(__pyx_v_xpathObj, __pyx_v_doc, ((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 230, __pyx_L7_error) @@ -189951,7 +176705,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__handle_result(struc * self._context._release_temp_refs() * */ - __Pyx_TraceLine(232,0,__PYX_ERR(18, 232, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ __pyx_f_4lxml_5etree__freeXPathObject(__pyx_v_xpathObj); @@ -189963,7 +176716,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__handle_result(struc * * return result */ - __Pyx_TraceLine(233,0,__PYX_ERR(18, 233, __pyx_L1_error)) __pyx_t_5 = __pyx_f_4lxml_5etree_12_BaseContext__release_temp_refs(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self->_context)); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -189994,7 +176746,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__handle_result(struc * self._context._release_temp_refs() * */ - __Pyx_TraceLine(232,0,__PYX_ERR(18, 232, __pyx_L10_error)) __pyx_f_4lxml_5etree__freeXPathObject(__pyx_v_xpathObj); /* "src/lxml/xpath.pxi":233 @@ -190004,7 +176755,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__handle_result(struc * * return result */ - __Pyx_TraceLine(233,0,__PYX_ERR(18, 233, __pyx_L10_error)) __pyx_t_5 = __pyx_f_4lxml_5etree_12_BaseContext__release_temp_refs(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self->_context)); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 233, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -190045,7 +176795,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__handle_result(struc * * */ - __Pyx_TraceLine(235,0,__PYX_ERR(18, 235, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; @@ -190068,7 +176817,6 @@ static PyObject *__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__handle_result(struc __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -190175,7 +176923,6 @@ static int __pyx_pf_4lxml_5etree_21XPathElementEvaluator___init__(struct __pyx_o xmlXPathContext *__pyx_v_xpathCtxt; struct LxmlDocument *__pyx_v_doc = 0; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -190184,7 +176931,6 @@ static int __pyx_pf_4lxml_5etree_21XPathElementEvaluator___init__(struct __pyx_o PyObject *__pyx_t_5 = NULL; int __pyx_t_6; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[18], 252, 0, __PYX_ERR(18, 252, __pyx_L1_error)); /* "src/lxml/xpath.pxi":257 * cdef int ns_register_status @@ -190193,7 +176939,6 @@ static int __pyx_pf_4lxml_5etree_21XPathElementEvaluator___init__(struct __pyx_o * _assertValidDoc(element._doc) * self._element = element */ - __Pyx_TraceLine(257,0,__PYX_ERR(18, 257, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(18, 257, __pyx_L1_error) /* "src/lxml/xpath.pxi":258 @@ -190203,7 +176948,6 @@ static int __pyx_pf_4lxml_5etree_21XPathElementEvaluator___init__(struct __pyx_o * self._element = element * doc = element._doc */ - __Pyx_TraceLine(258,0,__PYX_ERR(18, 258, __pyx_L1_error)) __pyx_t_2 = ((PyObject *)__pyx_v_element->_doc); __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidDoc(((struct LxmlDocument *)__pyx_t_2)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(18, 258, __pyx_L1_error) @@ -190216,7 +176960,6 @@ static int __pyx_pf_4lxml_5etree_21XPathElementEvaluator___init__(struct __pyx_o * doc = element._doc * _XPathEvaluatorBase.__init__(self, namespaces, extensions, */ - __Pyx_TraceLine(259,0,__PYX_ERR(18, 259, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_element)); __Pyx_GIVEREF(((PyObject *)__pyx_v_element)); __Pyx_GOTREF(__pyx_v_self->_element); @@ -190230,7 +176973,6 @@ static int __pyx_pf_4lxml_5etree_21XPathElementEvaluator___init__(struct __pyx_o * _XPathEvaluatorBase.__init__(self, namespaces, extensions, * regexp, smart_strings) */ - __Pyx_TraceLine(260,0,__PYX_ERR(18, 260, __pyx_L1_error)) __pyx_t_2 = ((PyObject *)__pyx_v_element->_doc); __Pyx_INCREF(__pyx_t_2); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_2); @@ -190243,7 +176985,6 @@ static int __pyx_pf_4lxml_5etree_21XPathElementEvaluator___init__(struct __pyx_o * regexp, smart_strings) * xpathCtxt = xpath.xmlXPathNewContext(doc._c_doc) */ - __Pyx_TraceLine(261,0,__PYX_ERR(18, 261, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree__XPathEvaluatorBase), __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -190254,7 +176995,6 @@ static int __pyx_pf_4lxml_5etree_21XPathElementEvaluator___init__(struct __pyx_o * xpathCtxt = xpath.xmlXPathNewContext(doc._c_doc) * if xpathCtxt is NULL: */ - __Pyx_TraceLine(262,0,__PYX_ERR(18, 262, __pyx_L1_error)) __pyx_t_4 = NULL; __pyx_t_1 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -190318,7 +177058,6 @@ static int __pyx_pf_4lxml_5etree_21XPathElementEvaluator___init__(struct __pyx_o * if xpathCtxt is NULL: * raise MemoryError() */ - __Pyx_TraceLine(263,0,__PYX_ERR(18, 263, __pyx_L1_error)) __pyx_v_xpathCtxt = xmlXPathNewContext(__pyx_v_doc->_c_doc); /* "src/lxml/xpath.pxi":264 @@ -190328,7 +177067,6 @@ static int __pyx_pf_4lxml_5etree_21XPathElementEvaluator___init__(struct __pyx_o * raise MemoryError() * self.set_context(xpathCtxt) */ - __Pyx_TraceLine(264,0,__PYX_ERR(18, 264, __pyx_L1_error)) __pyx_t_6 = ((__pyx_v_xpathCtxt == NULL) != 0); if (unlikely(__pyx_t_6)) { @@ -190339,7 +177077,6 @@ static int __pyx_pf_4lxml_5etree_21XPathElementEvaluator___init__(struct __pyx_o * self.set_context(xpathCtxt) * */ - __Pyx_TraceLine(265,0,__PYX_ERR(18, 265, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(18, 265, __pyx_L1_error) /* "src/lxml/xpath.pxi":264 @@ -190358,7 +177095,6 @@ static int __pyx_pf_4lxml_5etree_21XPathElementEvaluator___init__(struct __pyx_o * * def register_namespace(self, prefix, uri): */ - __Pyx_TraceLine(266,0,__PYX_ERR(18, 266, __pyx_L1_error)) __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree_XPathElementEvaluator *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.set_context(((struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *)__pyx_v_self), __pyx_v_xpathCtxt); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -190383,7 +177119,6 @@ static int __pyx_pf_4lxml_5etree_21XPathElementEvaluator___init__(struct __pyx_o __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_doc); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -190399,7 +177134,7 @@ static int __pyx_pf_4lxml_5etree_21XPathElementEvaluator___init__(struct __pyx_o /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_21XPathElementEvaluator_3register_namespace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_21XPathElementEvaluator_2register_namespace[] = "Register a namespace with the XPath context.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_21XPathElementEvaluator_3register_namespace = {"register_namespace", (PyCFunction)__pyx_pw_4lxml_5etree_21XPathElementEvaluator_3register_namespace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_21XPathElementEvaluator_2register_namespace}; +static PyMethodDef __pyx_mdef_4lxml_5etree_21XPathElementEvaluator_3register_namespace = {"register_namespace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_21XPathElementEvaluator_3register_namespace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_21XPathElementEvaluator_2register_namespace}; static PyObject *__pyx_pw_4lxml_5etree_21XPathElementEvaluator_3register_namespace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_prefix = 0; PyObject *__pyx_v_uri = 0; @@ -190461,12 +177196,9 @@ static PyObject *__pyx_pw_4lxml_5etree_21XPathElementEvaluator_3register_namespa static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_2register_namespace(struct __pyx_obj_4lxml_5etree_XPathElementEvaluator *__pyx_v_self, PyObject *__pyx_v_prefix, PyObject *__pyx_v_uri) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__343) __Pyx_RefNannySetupContext("register_namespace", 0); - __Pyx_TraceCall("register_namespace", __pyx_f[18], 268, 0, __PYX_ERR(18, 268, __pyx_L1_error)); /* "src/lxml/xpath.pxi":271 * u"""Register a namespace with the XPath context. @@ -190475,7 +177207,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_2register_namespa * self._context.addNamespace(prefix, uri) * */ - __Pyx_TraceLine(271,0,__PYX_ERR(18, 271, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_self->__pyx_base._xpathCtxt != NULL) != 0))) { @@ -190492,7 +177223,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_2register_namespa * * def register_namespaces(self, namespaces): */ - __Pyx_TraceLine(272,0,__PYX_ERR(18, 272, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__XPathContext *)__pyx_v_self->__pyx_base._context->__pyx_base.__pyx_vtab)->__pyx_base.addNamespace(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self->__pyx_base._context), __pyx_v_prefix, __pyx_v_uri); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -190514,7 +177244,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_2register_namespa __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -190546,7 +177275,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_4register_namespa PyObject *__pyx_v_prefix = NULL; PyObject *__pyx_v_uri = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -190556,9 +177284,7 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_4register_namespa PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *(*__pyx_t_8)(PyObject *); - __Pyx_TraceFrameInit(__pyx_codeobj__344) __Pyx_RefNannySetupContext("register_namespaces", 0); - __Pyx_TraceCall("register_namespaces", __pyx_f[18], 274, 0, __PYX_ERR(18, 274, __pyx_L1_error)); /* "src/lxml/xpath.pxi":277 * u"""Register a prefix -> uri dict. @@ -190567,7 +177293,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_4register_namespa * for prefix, uri in namespaces.items(): * self._context.addNamespace(prefix, uri) */ - __Pyx_TraceLine(277,0,__PYX_ERR(18, 277, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_self->__pyx_base._xpathCtxt != NULL) != 0))) { @@ -190584,7 +177309,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_4register_namespa * self._context.addNamespace(prefix, uri) * */ - __Pyx_TraceLine(278,0,__PYX_ERR(18, 278, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_namespaces, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; @@ -190597,12 +177321,9 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_4register_namespa __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 278, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 278, __pyx_L1_error) - } + __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(18, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { @@ -190703,7 +177424,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_4register_namespa * * def __call__(self, _path, **_variables): */ - __Pyx_TraceLine(279,0,__PYX_ERR(18, 279, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__XPathContext *)__pyx_v_self->__pyx_base._context->__pyx_base.__pyx_vtab)->__pyx_base.addNamespace(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self->__pyx_base._context), __pyx_v_prefix, __pyx_v_uri); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -190715,7 +177435,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_4register_namespa * self._context.addNamespace(prefix, uri) * */ - __Pyx_TraceLine(278,0,__PYX_ERR(18, 278, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -190742,7 +177461,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_4register_namespa __Pyx_XDECREF(__pyx_v_prefix); __Pyx_XDECREF(__pyx_v_uri); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -190821,7 +177539,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_6__call__(struct const xmlChar *__pyx_v_c_path; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -190835,7 +177552,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_6__call__(struct PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[18], 281, 0, __PYX_ERR(18, 281, __pyx_L1_error)); /* "src/lxml/xpath.pxi":294 * cdef xpath.xmlXPathObject* xpathObj @@ -190844,7 +177560,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_6__call__(struct * path = _utf8(_path) * doc = self._element._doc */ - __Pyx_TraceLine(294,0,__PYX_ERR(18, 294, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_self->__pyx_base._xpathCtxt != NULL) != 0))) { @@ -190861,7 +177576,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_6__call__(struct * doc = self._element._doc * */ - __Pyx_TraceLine(295,0,__PYX_ERR(18, 295, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v__path); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_path = ((PyObject*)__pyx_t_1); @@ -190874,7 +177588,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_6__call__(struct * * self._lock() */ - __Pyx_TraceLine(296,0,__PYX_ERR(18, 296, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_v_self->_element->_doc); __Pyx_INCREF(__pyx_t_1); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_1); @@ -190887,7 +177600,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_6__call__(struct * self._xpathCtxt.node = self._element._c_node * try: */ - __Pyx_TraceLine(298,0,__PYX_ERR(18, 298, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__lock(((struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *)__pyx_v_self)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(18, 298, __pyx_L1_error) /* "src/lxml/xpath.pxi":299 @@ -190897,7 +177609,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_6__call__(struct * try: * self._context.register_context(doc) */ - __Pyx_TraceLine(299,0,__PYX_ERR(18, 299, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->_element->_c_node; __pyx_v_self->__pyx_base._xpathCtxt->node = __pyx_t_3; @@ -190908,7 +177619,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_6__call__(struct * self._context.register_context(doc) * self._context.registerVariables(_variables) */ - __Pyx_TraceLine(300,0,__PYX_ERR(18, 300, __pyx_L4_error)) /*try:*/ { /* "src/lxml/xpath.pxi":301 @@ -190918,7 +177628,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_6__call__(struct * self._context.registerVariables(_variables) * c_path = _xcstr(path) */ - __Pyx_TraceLine(301,0,__PYX_ERR(18, 301, __pyx_L4_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_13_XPathContext_register_context(__pyx_v_self->__pyx_base._context, __pyx_v_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 301, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -190930,7 +177639,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_6__call__(struct * c_path = _xcstr(path) * with nogil: */ - __Pyx_TraceLine(302,0,__PYX_ERR(18, 302, __pyx_L4_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_13_XPathContext_registerVariables(__pyx_v_self->__pyx_base._context, __pyx_v__variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 302, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -190942,7 +177650,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_6__call__(struct * with nogil: * xpathObj = xpath.xmlXPathEvalExpression( */ - __Pyx_TraceLine(303,0,__PYX_ERR(18, 303, __pyx_L4_error)) __pyx_v_c_path = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_path); /* "src/lxml/xpath.pxi":304 @@ -190952,7 +177659,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_6__call__(struct * xpathObj = xpath.xmlXPathEvalExpression( * c_path, self._xpathCtxt) */ - __Pyx_TraceLine(304,0,__PYX_ERR(18, 304, __pyx_L4_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -190968,7 +177674,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_6__call__(struct * c_path, self._xpathCtxt) * result = self._handle_result(xpathObj, doc) */ - __Pyx_TraceLine(305,1,__PYX_ERR(18, 305, __pyx_L7_error)) __pyx_v_xpathObj = xmlXPathEvalExpression(__pyx_v_c_path, __pyx_v_self->__pyx_base._xpathCtxt); } @@ -190979,7 +177684,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_6__call__(struct * xpathObj = xpath.xmlXPathEvalExpression( * c_path, self._xpathCtxt) */ - __Pyx_TraceLine(304,1,__PYX_ERR(18, 304, __pyx_L4_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -190988,13 +177692,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_6__call__(struct #endif goto __pyx_L8; } - __pyx_L7_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L4_error; - } __pyx_L8:; } } @@ -191006,7 +177703,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_6__call__(struct * finally: * self._context.unregister_context() */ - __Pyx_TraceLine(307,0,__PYX_ERR(18, 307, __pyx_L4_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree_XPathElementEvaluator *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._handle_result(((struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *)__pyx_v_self), __pyx_v_xpathObj, __pyx_v_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 307, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = __pyx_t_1; @@ -191020,7 +177716,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_6__call__(struct * self._unlock() * */ - __Pyx_TraceLine(309,0,__PYX_ERR(18, 309, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ __pyx_t_1 = __pyx_f_4lxml_5etree_13_XPathContext_unregister_context(__pyx_v_self->__pyx_base._context); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 309, __pyx_L1_error) @@ -191034,7 +177729,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_6__call__(struct * * return result */ - __Pyx_TraceLine(310,0,__PYX_ERR(18, 310, __pyx_L1_error)) __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__unlock(((struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *)__pyx_v_self)); goto __pyx_L5; } @@ -191062,7 +177756,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_6__call__(struct * self._unlock() * */ - __Pyx_TraceLine(309,0,__PYX_ERR(18, 309, __pyx_L10_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_13_XPathContext_unregister_context(__pyx_v_self->__pyx_base._context); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 309, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -191074,7 +177767,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_6__call__(struct * * return result */ - __Pyx_TraceLine(310,0,__PYX_ERR(18, 310, __pyx_L10_error)) __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__unlock(((struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *)__pyx_v_self)); } if (PY_MAJOR_VERSION >= 3) { @@ -191113,7 +177805,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_6__call__(struct * * */ - __Pyx_TraceLine(312,0,__PYX_ERR(18, 312, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; @@ -191137,7 +177828,6 @@ static PyObject *__pyx_pf_4lxml_5etree_21XPathElementEvaluator_6__call__(struct __Pyx_XDECREF(__pyx_v_path); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -191242,14 +177932,12 @@ static int __pyx_pw_4lxml_5etree_22XPathDocumentEvaluator_1__init__(PyObject *__ static int __pyx_pf_4lxml_5etree_22XPathDocumentEvaluator___init__(struct __pyx_obj_4lxml_5etree_XPathDocumentEvaluator *__pyx_v_self, struct LxmlElementTree *__pyx_v_etree, PyObject *__pyx_v_namespaces, PyObject *__pyx_v_extensions, PyObject *__pyx_v_regexp, PyObject *__pyx_v_smart_strings) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[18], 325, 0, __PYX_ERR(18, 325, __pyx_L1_error)); /* "src/lxml/xpath.pxi":327 * def __init__(self, _ElementTree etree not None, *, namespaces=None, @@ -191258,7 +177946,6 @@ static int __pyx_pf_4lxml_5etree_22XPathDocumentEvaluator___init__(struct __pyx_ * self, etree._context_node, namespaces=namespaces, * extensions=extensions, regexp=regexp, */ - __Pyx_TraceLine(327,0,__PYX_ERR(18, 327, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree_XPathElementEvaluator), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -191269,7 +177956,6 @@ static int __pyx_pf_4lxml_5etree_22XPathDocumentEvaluator___init__(struct __pyx_ * extensions=extensions, regexp=regexp, * smart_strings=smart_strings) */ - __Pyx_TraceLine(328,0,__PYX_ERR(18, 328, __pyx_L1_error)) __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_self)); @@ -191289,7 +177975,6 @@ static int __pyx_pf_4lxml_5etree_22XPathDocumentEvaluator___init__(struct __pyx_ * smart_strings=smart_strings) * */ - __Pyx_TraceLine(329,0,__PYX_ERR(18, 329, __pyx_L1_error)) if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_extensions, __pyx_v_extensions) < 0) __PYX_ERR(18, 328, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_regexp, __pyx_v_regexp) < 0) __PYX_ERR(18, 328, __pyx_L1_error) @@ -191300,7 +177985,6 @@ static int __pyx_pf_4lxml_5etree_22XPathDocumentEvaluator___init__(struct __pyx_ * * def __call__(self, _path, **_variables): */ - __Pyx_TraceLine(330,0,__PYX_ERR(18, 330, __pyx_L1_error)) if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_smart_strings, __pyx_v_smart_strings) < 0) __PYX_ERR(18, 328, __pyx_L1_error) /* "src/lxml/xpath.pxi":327 @@ -191310,7 +177994,6 @@ static int __pyx_pf_4lxml_5etree_22XPathDocumentEvaluator___init__(struct __pyx_ * self, etree._context_node, namespaces=namespaces, * extensions=extensions, regexp=regexp, */ - __Pyx_TraceLine(327,0,__PYX_ERR(18, 327, __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(18, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -191337,7 +178020,6 @@ static int __pyx_pf_4lxml_5etree_22XPathDocumentEvaluator___init__(struct __pyx_ __Pyx_AddTraceback("lxml.etree.XPathDocumentEvaluator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -191417,7 +178099,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct const xmlChar *__pyx_v_c_path; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -191432,7 +178113,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct PyObject *__pyx_t_11 = NULL; char const *__pyx_t_12; __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[18], 332, 0, __PYX_ERR(18, 332, __pyx_L1_error)); /* "src/lxml/xpath.pxi":343 * cdef xmlDoc* c_doc @@ -191441,7 +178121,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct * path = _utf8(_path) * doc = self._element._doc */ - __Pyx_TraceLine(343,0,__PYX_ERR(18, 343, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_self->__pyx_base.__pyx_base._xpathCtxt != NULL) != 0))) { @@ -191458,7 +178137,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct * doc = self._element._doc * */ - __Pyx_TraceLine(344,0,__PYX_ERR(18, 344, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v__path); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_path = ((PyObject*)__pyx_t_1); @@ -191471,7 +178149,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct * * self._lock() */ - __Pyx_TraceLine(345,0,__PYX_ERR(18, 345, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base._element->_doc); __Pyx_INCREF(__pyx_t_1); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_1); @@ -191484,7 +178161,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct * try: * self._context.register_context(doc) */ - __Pyx_TraceLine(347,0,__PYX_ERR(18, 347, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__lock(((struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *)__pyx_v_self)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(18, 347, __pyx_L1_error) /* "src/lxml/xpath.pxi":348 @@ -191494,7 +178170,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct * self._context.register_context(doc) * c_doc = _fakeRootDoc(doc._c_doc, self._element._c_node) */ - __Pyx_TraceLine(348,0,__PYX_ERR(18, 348, __pyx_L4_error)) /*try:*/ { /* "src/lxml/xpath.pxi":349 @@ -191504,7 +178179,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct * c_doc = _fakeRootDoc(doc._c_doc, self._element._c_node) * try: */ - __Pyx_TraceLine(349,0,__PYX_ERR(18, 349, __pyx_L4_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_13_XPathContext_register_context(__pyx_v_self->__pyx_base.__pyx_base._context, __pyx_v_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 349, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -191516,7 +178190,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct * try: * self._context.registerVariables(_variables) */ - __Pyx_TraceLine(350,0,__PYX_ERR(18, 350, __pyx_L4_error)) __pyx_t_3 = __pyx_f_4lxml_5etree__fakeRootDoc(__pyx_v_doc->_c_doc, __pyx_v_self->__pyx_base._element->_c_node); if (unlikely(__pyx_t_3 == ((xmlDoc *)NULL))) __PYX_ERR(18, 350, __pyx_L4_error) __pyx_v_c_doc = __pyx_t_3; @@ -191527,7 +178200,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct * self._context.registerVariables(_variables) * c_path = _xcstr(path) */ - __Pyx_TraceLine(351,0,__PYX_ERR(18, 351, __pyx_L7_error)) /*try:*/ { /* "src/lxml/xpath.pxi":352 @@ -191537,7 +178209,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct * c_path = _xcstr(path) * with nogil: */ - __Pyx_TraceLine(352,0,__PYX_ERR(18, 352, __pyx_L7_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_13_XPathContext_registerVariables(__pyx_v_self->__pyx_base.__pyx_base._context, __pyx_v__variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 352, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -191549,7 +178220,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct * with nogil: * self._xpathCtxt.doc = c_doc */ - __Pyx_TraceLine(353,0,__PYX_ERR(18, 353, __pyx_L7_error)) __pyx_v_c_path = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_path); /* "src/lxml/xpath.pxi":354 @@ -191559,7 +178229,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct * self._xpathCtxt.doc = c_doc * self._xpathCtxt.node = tree.xmlDocGetRootElement(c_doc) */ - __Pyx_TraceLine(354,0,__PYX_ERR(18, 354, __pyx_L7_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -191575,7 +178244,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct * self._xpathCtxt.node = tree.xmlDocGetRootElement(c_doc) * xpathObj = xpath.xmlXPathEvalExpression( */ - __Pyx_TraceLine(355,1,__PYX_ERR(18, 355, __pyx_L10_error)) __pyx_v_self->__pyx_base.__pyx_base._xpathCtxt->doc = __pyx_v_c_doc; /* "src/lxml/xpath.pxi":356 @@ -191585,7 +178253,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct * xpathObj = xpath.xmlXPathEvalExpression( * c_path, self._xpathCtxt) */ - __Pyx_TraceLine(356,1,__PYX_ERR(18, 356, __pyx_L10_error)) __pyx_v_self->__pyx_base.__pyx_base._xpathCtxt->node = xmlDocGetRootElement(__pyx_v_c_doc); /* "src/lxml/xpath.pxi":357 @@ -191595,7 +178262,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct * c_path, self._xpathCtxt) * result = self._handle_result(xpathObj, doc) */ - __Pyx_TraceLine(357,1,__PYX_ERR(18, 357, __pyx_L10_error)) __pyx_v_xpathObj = xmlXPathEvalExpression(__pyx_v_c_path, __pyx_v_self->__pyx_base.__pyx_base._xpathCtxt); } @@ -191606,7 +178272,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct * self._xpathCtxt.doc = c_doc * self._xpathCtxt.node = tree.xmlDocGetRootElement(c_doc) */ - __Pyx_TraceLine(354,1,__PYX_ERR(18, 354, __pyx_L7_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -191615,13 +178280,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct #endif goto __pyx_L11; } - __pyx_L10_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L7_error; - } __pyx_L11:; } } @@ -191633,7 +178291,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct * finally: * _destroyFakeDoc(doc._c_doc, c_doc) */ - __Pyx_TraceLine(359,0,__PYX_ERR(18, 359, __pyx_L7_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree_XPathDocumentEvaluator *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._handle_result(((struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *)__pyx_v_self), __pyx_v_xpathObj, __pyx_v_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 359, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = __pyx_t_1; @@ -191647,7 +178304,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct * self._context.unregister_context() * finally: */ - __Pyx_TraceLine(361,0,__PYX_ERR(18, 361, __pyx_L4_error)) /*finally:*/ { /*normal exit:*/{ __pyx_f_4lxml_5etree__destroyFakeDoc(__pyx_v_doc->_c_doc, __pyx_v_c_doc); @@ -191659,7 +178315,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct * finally: * self._unlock() */ - __Pyx_TraceLine(362,0,__PYX_ERR(18, 362, __pyx_L4_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_13_XPathContext_unregister_context(__pyx_v_self->__pyx_base.__pyx_base._context); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 362, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -191689,7 +178344,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct * self._context.unregister_context() * finally: */ - __Pyx_TraceLine(361,0,__PYX_ERR(18, 361, __pyx_L13_error)) __pyx_f_4lxml_5etree__destroyFakeDoc(__pyx_v_doc->_c_doc, __pyx_v_c_doc); /* "src/lxml/xpath.pxi":362 @@ -191699,7 +178353,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct * finally: * self._unlock() */ - __Pyx_TraceLine(362,0,__PYX_ERR(18, 362, __pyx_L13_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_13_XPathContext_unregister_context(__pyx_v_self->__pyx_base.__pyx_base._context); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 362, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -191741,7 +178394,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct * * return result */ - __Pyx_TraceLine(364,0,__PYX_ERR(18, 364, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__unlock(((struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *)__pyx_v_self)); @@ -191789,7 +178441,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct * * */ - __Pyx_TraceLine(366,0,__PYX_ERR(18, 366, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; @@ -191813,7 +178464,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct __Pyx_XDECREF(__pyx_v_path); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -191829,7 +178479,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22XPathDocumentEvaluator_2__call__(struct /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_65XPathEvaluator(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_64XPathEvaluator[] = "XPathEvaluator(etree_or_element, namespaces=None, extensions=None, regexp=True, smart_strings=True)\n\n Creates an XPath evaluator for an ElementTree or an Element.\n\n The resulting object can be called with an XPath expression as argument\n and XPath variables provided as keyword arguments.\n\n Additional namespace declarations can be passed with the\n 'namespace' keyword argument. EXSLT regular expression support\n can be disabled with the 'regexp' boolean keyword (defaults to\n True). Smart strings will be returned for string results unless\n you pass ``smart_strings=False``.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_65XPathEvaluator = {"XPathEvaluator", (PyCFunction)__pyx_pw_4lxml_5etree_65XPathEvaluator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_64XPathEvaluator}; +static PyMethodDef __pyx_mdef_4lxml_5etree_65XPathEvaluator = {"XPathEvaluator", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_65XPathEvaluator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_64XPathEvaluator}; static PyObject *__pyx_pw_4lxml_5etree_65XPathEvaluator(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_etree_or_element = 0; PyObject *__pyx_v_namespaces = 0; @@ -191915,16 +178565,13 @@ static PyObject *__pyx_pw_4lxml_5etree_65XPathEvaluator(PyObject *__pyx_self, Py static PyObject *__pyx_pf_4lxml_5etree_64XPathEvaluator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_etree_or_element, PyObject *__pyx_v_namespaces, PyObject *__pyx_v_extensions, PyObject *__pyx_v_regexp, PyObject *__pyx_v_smart_strings) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__345) __Pyx_RefNannySetupContext("XPathEvaluator", 0); - __Pyx_TraceCall("XPathEvaluator", __pyx_f[18], 369, 0, __PYX_ERR(18, 369, __pyx_L1_error)); /* "src/lxml/xpath.pxi":384 * you pass ``smart_strings=False``. @@ -191933,7 +178580,6 @@ static PyObject *__pyx_pf_4lxml_5etree_64XPathEvaluator(CYTHON_UNUSED PyObject * * return XPathDocumentEvaluator( * etree_or_element, namespaces=namespaces, */ - __Pyx_TraceLine(384,0,__PYX_ERR(18, 384, __pyx_L1_error)) __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_etree_or_element, __pyx_ptype_4lxml_5etree__ElementTree); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -191945,7 +178591,6 @@ static PyObject *__pyx_pf_4lxml_5etree_64XPathEvaluator(CYTHON_UNUSED PyObject * * etree_or_element, namespaces=namespaces, * extensions=extensions, regexp=regexp, smart_strings=smart_strings) */ - __Pyx_TraceLine(385,0,__PYX_ERR(18, 385, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); /* "src/lxml/xpath.pxi":386 @@ -191955,7 +178600,6 @@ static PyObject *__pyx_pf_4lxml_5etree_64XPathEvaluator(CYTHON_UNUSED PyObject * * extensions=extensions, regexp=regexp, smart_strings=smart_strings) * else: */ - __Pyx_TraceLine(386,0,__PYX_ERR(18, 386, __pyx_L1_error)) __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 385, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_etree_or_element); @@ -191972,7 +178616,6 @@ static PyObject *__pyx_pf_4lxml_5etree_64XPathEvaluator(CYTHON_UNUSED PyObject * * else: * return XPathElementEvaluator( */ - __Pyx_TraceLine(387,0,__PYX_ERR(18, 387, __pyx_L1_error)) if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_extensions, __pyx_v_extensions) < 0) __PYX_ERR(18, 386, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_regexp, __pyx_v_regexp) < 0) __PYX_ERR(18, 386, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_smart_strings, __pyx_v_smart_strings) < 0) __PYX_ERR(18, 386, __pyx_L1_error) @@ -191984,7 +178627,6 @@ static PyObject *__pyx_pf_4lxml_5etree_64XPathEvaluator(CYTHON_UNUSED PyObject * * etree_or_element, namespaces=namespaces, * extensions=extensions, regexp=regexp, smart_strings=smart_strings) */ - __Pyx_TraceLine(385,0,__PYX_ERR(18, 385, __pyx_L1_error)) __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_XPathDocumentEvaluator), __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 385, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -192009,7 +178651,6 @@ static PyObject *__pyx_pf_4lxml_5etree_64XPathEvaluator(CYTHON_UNUSED PyObject * * etree_or_element, namespaces=namespaces, * extensions=extensions, regexp=regexp, smart_strings=smart_strings) */ - __Pyx_TraceLine(389,0,__PYX_ERR(18, 389, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); @@ -192020,7 +178661,6 @@ static PyObject *__pyx_pf_4lxml_5etree_64XPathEvaluator(CYTHON_UNUSED PyObject * * extensions=extensions, regexp=regexp, smart_strings=smart_strings) * */ - __Pyx_TraceLine(390,0,__PYX_ERR(18, 390, __pyx_L1_error)) __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_etree_or_element); @@ -192037,7 +178677,6 @@ static PyObject *__pyx_pf_4lxml_5etree_64XPathEvaluator(CYTHON_UNUSED PyObject * * * */ - __Pyx_TraceLine(391,0,__PYX_ERR(18, 391, __pyx_L1_error)) if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_extensions, __pyx_v_extensions) < 0) __PYX_ERR(18, 390, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_regexp, __pyx_v_regexp) < 0) __PYX_ERR(18, 390, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_smart_strings, __pyx_v_smart_strings) < 0) __PYX_ERR(18, 390, __pyx_L1_error) @@ -192049,7 +178688,6 @@ static PyObject *__pyx_pf_4lxml_5etree_64XPathEvaluator(CYTHON_UNUSED PyObject * * etree_or_element, namespaces=namespaces, * extensions=extensions, regexp=regexp, smart_strings=smart_strings) */ - __Pyx_TraceLine(389,0,__PYX_ERR(18, 389, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_XPathElementEvaluator), __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -192076,7 +178714,6 @@ static PyObject *__pyx_pf_4lxml_5etree_64XPathEvaluator(CYTHON_UNUSED PyObject * __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -192107,10 +178744,8 @@ static int __pyx_pw_4lxml_5etree_5XPath_1__cinit__(PyObject *__pyx_v_self, PyObj static int __pyx_pf_4lxml_5etree_5XPath___cinit__(struct __pyx_obj_4lxml_5etree_XPath *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[18], 408, 0, __PYX_ERR(18, 408, __pyx_L1_error)); /* "src/lxml/xpath.pxi":409 * cdef bytes _path @@ -192119,7 +178754,6 @@ static int __pyx_pf_4lxml_5etree_5XPath___cinit__(struct __pyx_obj_4lxml_5etree_ * * def __init__(self, path, *, namespaces=None, extensions=None, */ - __Pyx_TraceLine(409,0,__PYX_ERR(18, 409, __pyx_L1_error)) __pyx_v_self->_xpath = NULL; /* "src/lxml/xpath.pxi":408 @@ -192132,12 +178766,6 @@ static int __pyx_pf_4lxml_5etree_5XPath___cinit__(struct __pyx_obj_4lxml_5etree_ /* function exit code */ __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.XPath.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -192238,7 +178866,6 @@ static int __pyx_pw_4lxml_5etree_5XPath_3__init__(PyObject *__pyx_v_self, PyObje static int __pyx_pf_4lxml_5etree_5XPath_2__init__(struct __pyx_obj_4lxml_5etree_XPath *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_namespaces, PyObject *__pyx_v_extensions, PyObject *__pyx_v_regexp, PyObject *__pyx_v_smart_strings) { xmlXPathContext *__pyx_v_xpathCtxt; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -192247,7 +178874,6 @@ static int __pyx_pf_4lxml_5etree_5XPath_2__init__(struct __pyx_obj_4lxml_5etree_ PyObject *__pyx_t_5 = NULL; int __pyx_t_6; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[18], 411, 0, __PYX_ERR(18, 411, __pyx_L1_error)); /* "src/lxml/xpath.pxi":414 * regexp=True, smart_strings=True): @@ -192256,7 +178882,6 @@ static int __pyx_pf_4lxml_5etree_5XPath_2__init__(struct __pyx_obj_4lxml_5etree_ * regexp, smart_strings) * self._path = _utf8(path) */ - __Pyx_TraceLine(414,0,__PYX_ERR(18, 414, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree__XPathEvaluatorBase), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -192267,7 +178892,6 @@ static int __pyx_pf_4lxml_5etree_5XPath_2__init__(struct __pyx_obj_4lxml_5etree_ * self._path = _utf8(path) * xpathCtxt = xpath.xmlXPathNewContext(NULL) */ - __Pyx_TraceLine(415,0,__PYX_ERR(18, 415, __pyx_L1_error)) __pyx_t_3 = NULL; __pyx_t_4 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -192331,7 +178955,6 @@ static int __pyx_pf_4lxml_5etree_5XPath_2__init__(struct __pyx_obj_4lxml_5etree_ * xpathCtxt = xpath.xmlXPathNewContext(NULL) * if xpathCtxt is NULL: */ - __Pyx_TraceLine(416,0,__PYX_ERR(18, 416, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -192347,7 +178970,6 @@ static int __pyx_pf_4lxml_5etree_5XPath_2__init__(struct __pyx_obj_4lxml_5etree_ * if xpathCtxt is NULL: * raise MemoryError() */ - __Pyx_TraceLine(417,0,__PYX_ERR(18, 417, __pyx_L1_error)) __pyx_v_xpathCtxt = xmlXPathNewContext(NULL); /* "src/lxml/xpath.pxi":418 @@ -192357,7 +178979,6 @@ static int __pyx_pf_4lxml_5etree_5XPath_2__init__(struct __pyx_obj_4lxml_5etree_ * raise MemoryError() * self.set_context(xpathCtxt) */ - __Pyx_TraceLine(418,0,__PYX_ERR(18, 418, __pyx_L1_error)) __pyx_t_6 = ((__pyx_v_xpathCtxt == NULL) != 0); if (unlikely(__pyx_t_6)) { @@ -192368,7 +178989,6 @@ static int __pyx_pf_4lxml_5etree_5XPath_2__init__(struct __pyx_obj_4lxml_5etree_ * self.set_context(xpathCtxt) * self._xpath = xpath.xmlXPathCtxtCompile(xpathCtxt, _xcstr(self._path)) */ - __Pyx_TraceLine(419,0,__PYX_ERR(18, 419, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(18, 419, __pyx_L1_error) /* "src/lxml/xpath.pxi":418 @@ -192387,7 +179007,6 @@ static int __pyx_pf_4lxml_5etree_5XPath_2__init__(struct __pyx_obj_4lxml_5etree_ * self._xpath = xpath.xmlXPathCtxtCompile(xpathCtxt, _xcstr(self._path)) * if self._xpath is NULL: */ - __Pyx_TraceLine(420,0,__PYX_ERR(18, 420, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree_XPath *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.set_context(((struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *)__pyx_v_self), __pyx_v_xpathCtxt); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -192399,7 +179018,6 @@ static int __pyx_pf_4lxml_5etree_5XPath_2__init__(struct __pyx_obj_4lxml_5etree_ * if self._xpath is NULL: * raise self._build_parse_error() */ - __Pyx_TraceLine(421,0,__PYX_ERR(18, 421, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_path; __Pyx_INCREF(__pyx_t_1); __pyx_v_self->_xpath = xmlXPathCtxtCompile(__pyx_v_xpathCtxt, (const xmlChar*)PyBytes_AS_STRING(__pyx_t_1)); @@ -192412,7 +179030,6 @@ static int __pyx_pf_4lxml_5etree_5XPath_2__init__(struct __pyx_obj_4lxml_5etree_ * raise self._build_parse_error() * */ - __Pyx_TraceLine(422,0,__PYX_ERR(18, 422, __pyx_L1_error)) __pyx_t_6 = ((__pyx_v_self->_xpath == NULL) != 0); if (unlikely(__pyx_t_6)) { @@ -192423,7 +179040,6 @@ static int __pyx_pf_4lxml_5etree_5XPath_2__init__(struct __pyx_obj_4lxml_5etree_ * * def __call__(self, _etree_or_element, **_variables): */ - __Pyx_TraceLine(423,0,__PYX_ERR(18, 423, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree_XPath *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._build_parse_error(((struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); @@ -192458,7 +179074,6 @@ static int __pyx_pf_4lxml_5etree_5XPath_2__init__(struct __pyx_obj_4lxml_5etree_ __Pyx_AddTraceback("lxml.etree.XPath.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -192536,7 +179151,6 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4__call__(struct __pyx_obj_4lxml_5 struct LxmlElement *__pyx_v_element = 0; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -192551,7 +179165,6 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4__call__(struct __pyx_obj_4lxml_5 PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[18], 425, 0, __PYX_ERR(18, 425, __pyx_L1_error)); /* "src/lxml/xpath.pxi":431 * cdef _Element element @@ -192560,7 +179173,6 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4__call__(struct __pyx_obj_4lxml_5 * document = _documentOrRaise(_etree_or_element) * element = _rootNodeOrRaise(_etree_or_element) */ - __Pyx_TraceLine(431,0,__PYX_ERR(18, 431, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_self->__pyx_base._xpathCtxt != NULL) != 0))) { @@ -192577,7 +179189,6 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4__call__(struct __pyx_obj_4lxml_5 * element = _rootNodeOrRaise(_etree_or_element) * */ - __Pyx_TraceLine(432,0,__PYX_ERR(18, 432, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__documentOrRaise(__pyx_v__etree_or_element)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_document = ((struct LxmlDocument *)__pyx_t_1); @@ -192590,7 +179201,6 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4__call__(struct __pyx_obj_4lxml_5 * * self._lock() */ - __Pyx_TraceLine(433,0,__PYX_ERR(18, 433, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__rootNodeOrRaise(__pyx_v__etree_or_element)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_element = ((struct LxmlElement *)__pyx_t_1); @@ -192603,7 +179213,6 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4__call__(struct __pyx_obj_4lxml_5 * self._xpathCtxt.doc = document._c_doc * self._xpathCtxt.node = element._c_node */ - __Pyx_TraceLine(435,0,__PYX_ERR(18, 435, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__lock(((struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *)__pyx_v_self)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(18, 435, __pyx_L1_error) /* "src/lxml/xpath.pxi":436 @@ -192613,7 +179222,6 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4__call__(struct __pyx_obj_4lxml_5 * self._xpathCtxt.node = element._c_node * */ - __Pyx_TraceLine(436,0,__PYX_ERR(18, 436, __pyx_L1_error)) __pyx_t_3 = __pyx_v_document->_c_doc; __pyx_v_self->__pyx_base._xpathCtxt->doc = __pyx_t_3; @@ -192624,7 +179232,6 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4__call__(struct __pyx_obj_4lxml_5 * * try: */ - __Pyx_TraceLine(437,0,__PYX_ERR(18, 437, __pyx_L1_error)) __pyx_t_4 = __pyx_v_element->_c_node; __pyx_v_self->__pyx_base._xpathCtxt->node = __pyx_t_4; @@ -192635,7 +179242,6 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4__call__(struct __pyx_obj_4lxml_5 * self._context.register_context(document) * self._context.registerVariables(_variables) */ - __Pyx_TraceLine(439,0,__PYX_ERR(18, 439, __pyx_L4_error)) /*try:*/ { /* "src/lxml/xpath.pxi":440 @@ -192645,7 +179251,6 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4__call__(struct __pyx_obj_4lxml_5 * self._context.registerVariables(_variables) * with nogil: */ - __Pyx_TraceLine(440,0,__PYX_ERR(18, 440, __pyx_L4_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_13_XPathContext_register_context(__pyx_v_self->__pyx_base._context, __pyx_v_document); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 440, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -192657,7 +179262,6 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4__call__(struct __pyx_obj_4lxml_5 * with nogil: * xpathObj = xpath.xmlXPathCompiledEval( */ - __Pyx_TraceLine(441,0,__PYX_ERR(18, 441, __pyx_L4_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_13_XPathContext_registerVariables(__pyx_v_self->__pyx_base._context, __pyx_v__variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 441, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -192669,7 +179273,6 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4__call__(struct __pyx_obj_4lxml_5 * xpathObj = xpath.xmlXPathCompiledEval( * self._xpath, self._xpathCtxt) */ - __Pyx_TraceLine(442,0,__PYX_ERR(18, 442, __pyx_L4_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -192685,7 +179288,6 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4__call__(struct __pyx_obj_4lxml_5 * self._xpath, self._xpathCtxt) * result = self._handle_result(xpathObj, document) */ - __Pyx_TraceLine(443,1,__PYX_ERR(18, 443, __pyx_L7_error)) __pyx_v_xpathObj = xmlXPathCompiledEval(__pyx_v_self->_xpath, __pyx_v_self->__pyx_base._xpathCtxt); } @@ -192696,7 +179298,6 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4__call__(struct __pyx_obj_4lxml_5 * xpathObj = xpath.xmlXPathCompiledEval( * self._xpath, self._xpathCtxt) */ - __Pyx_TraceLine(442,1,__PYX_ERR(18, 442, __pyx_L4_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -192705,13 +179306,6 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4__call__(struct __pyx_obj_4lxml_5 #endif goto __pyx_L8; } - __pyx_L7_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L4_error; - } __pyx_L8:; } } @@ -192723,7 +179317,6 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4__call__(struct __pyx_obj_4lxml_5 * finally: * self._context.unregister_context() */ - __Pyx_TraceLine(445,0,__PYX_ERR(18, 445, __pyx_L4_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree_XPath *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._handle_result(((struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *)__pyx_v_self), __pyx_v_xpathObj, __pyx_v_document); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 445, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = __pyx_t_1; @@ -192737,7 +179330,6 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4__call__(struct __pyx_obj_4lxml_5 * self._unlock() * return result */ - __Pyx_TraceLine(447,0,__PYX_ERR(18, 447, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ __pyx_t_1 = __pyx_f_4lxml_5etree_13_XPathContext_unregister_context(__pyx_v_self->__pyx_base._context); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 447, __pyx_L1_error) @@ -192751,7 +179343,6 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4__call__(struct __pyx_obj_4lxml_5 * return result * */ - __Pyx_TraceLine(448,0,__PYX_ERR(18, 448, __pyx_L1_error)) __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__unlock(((struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *)__pyx_v_self)); goto __pyx_L5; } @@ -192779,7 +179370,6 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4__call__(struct __pyx_obj_4lxml_5 * self._unlock() * return result */ - __Pyx_TraceLine(447,0,__PYX_ERR(18, 447, __pyx_L10_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_13_XPathContext_unregister_context(__pyx_v_self->__pyx_base._context); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 447, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -192791,7 +179381,6 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4__call__(struct __pyx_obj_4lxml_5 * return result * */ - __Pyx_TraceLine(448,0,__PYX_ERR(18, 448, __pyx_L10_error)) __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__unlock(((struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *)__pyx_v_self)); } if (PY_MAJOR_VERSION >= 3) { @@ -192830,7 +179419,6 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4__call__(struct __pyx_obj_4lxml_5 * * property path: */ - __Pyx_TraceLine(449,0,__PYX_ERR(18, 449, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; @@ -192854,7 +179442,6 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4__call__(struct __pyx_obj_4lxml_5 __Pyx_XDECREF((PyObject *)__pyx_v_element); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -192882,11 +179469,9 @@ static PyObject *__pyx_pw_4lxml_5etree_5XPath_4path_1__get__(PyObject *__pyx_v_s static PyObject *__pyx_pf_4lxml_5etree_5XPath_4path___get__(struct __pyx_obj_4lxml_5etree_XPath *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[18], 454, 0, __PYX_ERR(18, 454, __pyx_L1_error)); /* "src/lxml/xpath.pxi":455 * """ @@ -192895,7 +179480,6 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4path___get__(struct __pyx_obj_4lx * * def __dealloc__(self): */ - __Pyx_TraceLine(455,0,__PYX_ERR(18, 455, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->_path == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); @@ -192922,7 +179506,6 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4path___get__(struct __pyx_obj_4lx __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -192947,11 +179530,9 @@ static void __pyx_pw_4lxml_5etree_5XPath_7__dealloc__(PyObject *__pyx_v_self) { } static void __pyx_pf_4lxml_5etree_5XPath_6__dealloc__(struct __pyx_obj_4lxml_5etree_XPath *__pyx_v_self) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__dealloc__", 0); - __Pyx_TraceCall("__dealloc__", __pyx_f[18], 457, 0, __PYX_ERR(18, 457, __pyx_L1_error)); /* "src/lxml/xpath.pxi":458 * @@ -192960,7 +179541,6 @@ static void __pyx_pf_4lxml_5etree_5XPath_6__dealloc__(struct __pyx_obj_4lxml_5et * xpath.xmlXPathFreeCompExpr(self._xpath) * */ - __Pyx_TraceLine(458,0,__PYX_ERR(18, 458, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_xpath != NULL) != 0); if (__pyx_t_1) { @@ -192971,7 +179551,6 @@ static void __pyx_pf_4lxml_5etree_5XPath_6__dealloc__(struct __pyx_obj_4lxml_5et * * def __repr__(self): */ - __Pyx_TraceLine(459,0,__PYX_ERR(18, 459, __pyx_L1_error)) xmlXPathFreeCompExpr(__pyx_v_self->_xpath); /* "src/lxml/xpath.pxi":458 @@ -192992,11 +179571,6 @@ static void __pyx_pf_4lxml_5etree_5XPath_6__dealloc__(struct __pyx_obj_4lxml_5et */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.XPath.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -193023,11 +179597,9 @@ static PyObject *__pyx_pw_4lxml_5etree_5XPath_9__repr__(PyObject *__pyx_v_self) static PyObject *__pyx_pf_4lxml_5etree_5XPath_8__repr__(struct __pyx_obj_4lxml_5etree_XPath *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[18], 461, 0, __PYX_ERR(18, 461, __pyx_L1_error)); /* "src/lxml/xpath.pxi":462 * @@ -193036,7 +179608,6 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_8__repr__(struct __pyx_obj_4lxml_5 * * */ - __Pyx_TraceLine(462,0,__PYX_ERR(18, 462, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -193059,7 +179630,6 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_8__repr__(struct __pyx_obj_4lxml_5 __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -193157,7 +179727,6 @@ static int __pyx_pw_4lxml_5etree_7ETXPath_1__init__(PyObject *__pyx_v_self, PyOb static int __pyx_pf_4lxml_5etree_7ETXPath___init__(struct __pyx_obj_4lxml_5etree_ETXPath *__pyx_v_self, PyObject *__pyx_v_path, PyObject *__pyx_v_extensions, PyObject *__pyx_v_regexp, PyObject *__pyx_v_smart_strings) { PyObject *__pyx_v_namespaces = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -193165,7 +179734,6 @@ static int __pyx_pf_4lxml_5etree_7ETXPath___init__(struct __pyx_obj_4lxml_5etree PyObject *__pyx_t_4 = NULL; PyObject *(*__pyx_t_5)(PyObject *); __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[18], 479, 0, __PYX_ERR(18, 479, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_path); /* "src/lxml/xpath.pxi":481 @@ -193175,7 +179743,6 @@ static int __pyx_pf_4lxml_5etree_7ETXPath___init__(struct __pyx_obj_4lxml_5etree * XPath.__init__(self, path, namespaces=namespaces, * extensions=extensions, regexp=regexp, */ - __Pyx_TraceLine(481,0,__PYX_ERR(18, 481, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree_ETXPath *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_nsextract_path(__pyx_v_self, __pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { @@ -193236,7 +179803,6 @@ static int __pyx_pf_4lxml_5etree_7ETXPath___init__(struct __pyx_obj_4lxml_5etree * extensions=extensions, regexp=regexp, * smart_strings=smart_strings) */ - __Pyx_TraceLine(482,0,__PYX_ERR(18, 482, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree_XPath), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 482, __pyx_L1_error) @@ -193258,7 +179824,6 @@ static int __pyx_pf_4lxml_5etree_7ETXPath___init__(struct __pyx_obj_4lxml_5etree * smart_strings=smart_strings) * */ - __Pyx_TraceLine(483,0,__PYX_ERR(18, 483, __pyx_L1_error)) if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_extensions, __pyx_v_extensions) < 0) __PYX_ERR(18, 482, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_regexp, __pyx_v_regexp) < 0) __PYX_ERR(18, 482, __pyx_L1_error) @@ -193269,7 +179834,6 @@ static int __pyx_pf_4lxml_5etree_7ETXPath___init__(struct __pyx_obj_4lxml_5etree * * cdef _nsextract_path(self, path): */ - __Pyx_TraceLine(484,0,__PYX_ERR(18, 484, __pyx_L1_error)) if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_smart_strings, __pyx_v_smart_strings) < 0) __PYX_ERR(18, 482, __pyx_L1_error) /* "src/lxml/xpath.pxi":482 @@ -193279,7 +179843,6 @@ static int __pyx_pf_4lxml_5etree_7ETXPath___init__(struct __pyx_obj_4lxml_5etree * extensions=extensions, regexp=regexp, * smart_strings=smart_strings) */ - __Pyx_TraceLine(482,0,__PYX_ERR(18, 482, __pyx_L1_error)) __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(18, 482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -193308,7 +179871,6 @@ static int __pyx_pf_4lxml_5etree_7ETXPath___init__(struct __pyx_obj_4lxml_5etree __pyx_L0:; __Pyx_XDECREF(__pyx_v_namespaces); __Pyx_XDECREF(__pyx_v_path); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -193332,7 +179894,6 @@ static PyObject *__pyx_f_4lxml_5etree_7ETXPath__nsextract_path(CYTHON_UNUSED str PyObject *__pyx_v_namespace = NULL; PyObject *__pyx_v_prefix_str = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -193346,7 +179907,6 @@ static PyObject *__pyx_f_4lxml_5etree_7ETXPath__nsextract_path(CYTHON_UNUSED str int __pyx_t_10; PyObject *__pyx_t_11 = NULL; __Pyx_RefNannySetupContext("_nsextract_path", 0); - __Pyx_TraceCall("_nsextract_path", __pyx_f[18], 486, 0, __PYX_ERR(18, 486, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_path); /* "src/lxml/xpath.pxi":488 @@ -193356,7 +179916,6 @@ static PyObject *__pyx_f_4lxml_5etree_7ETXPath__nsextract_path(CYTHON_UNUSED str * cdef list namespace_defs = [] * cdef int i */ - __Pyx_TraceLine(488,0,__PYX_ERR(18, 488, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_namespaces = ((PyObject*)__pyx_t_1); @@ -193369,7 +179928,6 @@ static PyObject *__pyx_f_4lxml_5etree_7ETXPath__nsextract_path(CYTHON_UNUSED str * cdef int i * path_utf = _utf8(path) */ - __Pyx_TraceLine(489,0,__PYX_ERR(18, 489, __pyx_L1_error)) __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_namespace_defs = ((PyObject*)__pyx_t_1); @@ -193382,7 +179940,6 @@ static PyObject *__pyx_f_4lxml_5etree_7ETXPath__nsextract_path(CYTHON_UNUSED str * stripped_path = _replace_strings(b'', path_utf) # remove string literals * i = 1 */ - __Pyx_TraceLine(491,0,__PYX_ERR(18, 491, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_path_utf = __pyx_t_1; @@ -193395,7 +179952,6 @@ static PyObject *__pyx_f_4lxml_5etree_7ETXPath__nsextract_path(CYTHON_UNUSED str * i = 1 * for namespace_def in _find_namespaces(stripped_path): */ - __Pyx_TraceLine(492,0,__PYX_ERR(18, 492, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_4lxml_5etree__replace_strings); __pyx_t_2 = __pyx_v_4lxml_5etree__replace_strings; __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -193411,7 +179967,7 @@ static PyObject *__pyx_f_4lxml_5etree_7ETXPath__nsextract_path(CYTHON_UNUSED str } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_b__23, __pyx_v_path_utf}; + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_b__11, __pyx_v_path_utf}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 492, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); @@ -193419,7 +179975,7 @@ static PyObject *__pyx_f_4lxml_5etree_7ETXPath__nsextract_path(CYTHON_UNUSED str #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_b__23, __pyx_v_path_utf}; + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_b__11, __pyx_v_path_utf}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 492, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); @@ -193431,9 +179987,9 @@ static PyObject *__pyx_f_4lxml_5etree_7ETXPath__nsextract_path(CYTHON_UNUSED str if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; } - __Pyx_INCREF(__pyx_kp_b__23); - __Pyx_GIVEREF(__pyx_kp_b__23); - PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_kp_b__23); + __Pyx_INCREF(__pyx_kp_b__11); + __Pyx_GIVEREF(__pyx_kp_b__11); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_kp_b__11); __Pyx_INCREF(__pyx_v_path_utf); __Pyx_GIVEREF(__pyx_v_path_utf); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_path_utf); @@ -193452,7 +180008,6 @@ static PyObject *__pyx_f_4lxml_5etree_7ETXPath__nsextract_path(CYTHON_UNUSED str * for namespace_def in _find_namespaces(stripped_path): * if namespace_def not in namespace_defs: */ - __Pyx_TraceLine(493,0,__PYX_ERR(18, 493, __pyx_L1_error)) __pyx_v_i = 1; /* "src/lxml/xpath.pxi":494 @@ -193462,7 +180017,6 @@ static PyObject *__pyx_f_4lxml_5etree_7ETXPath__nsextract_path(CYTHON_UNUSED str * if namespace_def not in namespace_defs: * prefix = python.PyBytes_FromFormat("__xpp%02d", i) */ - __Pyx_TraceLine(494,0,__PYX_ERR(18, 494, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_4lxml_5etree__find_namespaces); __pyx_t_2 = __pyx_v_4lxml_5etree__find_namespaces; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -193474,38 +180028,10 @@ static PyObject *__pyx_f_4lxml_5etree_7ETXPath__nsextract_path(CYTHON_UNUSED str __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_stripped_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 494, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_stripped_path}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 494, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_stripped_path}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 494, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 494, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_INCREF(__pyx_v_stripped_path); - __Pyx_GIVEREF(__pyx_v_stripped_path); - PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_stripped_path); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 494, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_v_stripped_path) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_stripped_path); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 494, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; 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; @@ -193557,7 +180083,6 @@ static PyObject *__pyx_f_4lxml_5etree_7ETXPath__nsextract_path(CYTHON_UNUSED str * prefix = python.PyBytes_FromFormat("__xpp%02d", i) * i += 1 */ - __Pyx_TraceLine(495,0,__PYX_ERR(18, 495, __pyx_L1_error)) __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_namespace_def, __pyx_v_namespace_defs, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(18, 495, __pyx_L1_error) __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { @@ -193569,7 +180094,6 @@ static PyObject *__pyx_f_4lxml_5etree_7ETXPath__nsextract_path(CYTHON_UNUSED str * i += 1 * namespace_defs.append(namespace_def) */ - __Pyx_TraceLine(496,0,__PYX_ERR(18, 496, __pyx_L1_error)) __pyx_t_1 = PyBytes_FromFormat(((char *)"__xpp%02d"), __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_prefix, ((PyObject*)__pyx_t_1)); @@ -193582,7 +180106,6 @@ static PyObject *__pyx_f_4lxml_5etree_7ETXPath__nsextract_path(CYTHON_UNUSED str * namespace_defs.append(namespace_def) * namespace = namespace_def[1:-1] # remove '{}' */ - __Pyx_TraceLine(497,0,__PYX_ERR(18, 497, __pyx_L1_error)) __pyx_v_i = (__pyx_v_i + 1); /* "src/lxml/xpath.pxi":498 @@ -193592,7 +180115,6 @@ static PyObject *__pyx_f_4lxml_5etree_7ETXPath__nsextract_path(CYTHON_UNUSED str * namespace = namespace_def[1:-1] # remove '{}' * namespace = (namespace).decode('utf8') */ - __Pyx_TraceLine(498,0,__PYX_ERR(18, 498, __pyx_L1_error)) __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_namespace_defs, __pyx_v_namespace_def); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(18, 498, __pyx_L1_error) /* "src/lxml/xpath.pxi":499 @@ -193602,8 +180124,7 @@ static PyObject *__pyx_f_4lxml_5etree_7ETXPath__nsextract_path(CYTHON_UNUSED str * namespace = (namespace).decode('utf8') * namespaces[prefix.decode('utf8')] = namespace */ - __Pyx_TraceLine(499,0,__PYX_ERR(18, 499, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_namespace_def, 1, -1L, NULL, NULL, &__pyx_slice__346, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 499, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_namespace_def, 1, -1L, NULL, NULL, &__pyx_slice__77, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_namespace, __pyx_t_1); __pyx_t_1 = 0; @@ -193615,7 +180136,6 @@ static PyObject *__pyx_f_4lxml_5etree_7ETXPath__nsextract_path(CYTHON_UNUSED str * namespaces[prefix.decode('utf8')] = namespace * prefix_str = prefix + b':' */ - __Pyx_TraceLine(500,0,__PYX_ERR(18, 500, __pyx_L1_error)) if (unlikely(__pyx_v_namespace == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); __PYX_ERR(18, 500, __pyx_L1_error) @@ -193632,7 +180152,6 @@ static PyObject *__pyx_f_4lxml_5etree_7ETXPath__nsextract_path(CYTHON_UNUSED str * prefix_str = prefix + b':' * # FIXME: this also replaces {namespaces} within strings! */ - __Pyx_TraceLine(501,0,__PYX_ERR(18, 501, __pyx_L1_error)) if (unlikely(__pyx_v_prefix == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); __PYX_ERR(18, 501, __pyx_L1_error) @@ -193649,8 +180168,7 @@ static PyObject *__pyx_f_4lxml_5etree_7ETXPath__nsextract_path(CYTHON_UNUSED str * # FIXME: this also replaces {namespaces} within strings! * path_utf = path_utf.replace(namespace_def, prefix_str) */ - __Pyx_TraceLine(502,0,__PYX_ERR(18, 502, __pyx_L1_error)) - __pyx_t_1 = PyNumber_Add(__pyx_v_prefix, __pyx_kp_b__31); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 502, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_prefix, __pyx_kp_b__16); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_prefix_str, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; @@ -193662,42 +180180,41 @@ static PyObject *__pyx_f_4lxml_5etree_7ETXPath__nsextract_path(CYTHON_UNUSED str * path = path_utf.decode('utf8') * return path, namespaces */ - __Pyx_TraceLine(504,0,__PYX_ERR(18, 504, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_path_utf, __pyx_n_s_replace); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 504, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = NULL; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_path_utf, __pyx_n_s_replace); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = NULL; __pyx_t_4 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_5); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); + __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_4 = 1; } } #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_namespace_def, __pyx_v_prefix_str}; - __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(18, 504, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_namespace_def, __pyx_v_prefix_str}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 504, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_namespace_def, __pyx_v_prefix_str}; - __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(18, 504, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_namespace_def, __pyx_v_prefix_str}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 504, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_11 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(18, 504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (__pyx_t_5) { - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5); __pyx_t_5 = NULL; + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(__pyx_v_namespace_def); __Pyx_GIVEREF(__pyx_v_namespace_def); @@ -193705,11 +180222,11 @@ static PyObject *__pyx_f_4lxml_5etree_7ETXPath__nsextract_path(CYTHON_UNUSED str __Pyx_INCREF(__pyx_v_prefix_str); __Pyx_GIVEREF(__pyx_v_prefix_str); PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_4, __pyx_v_prefix_str); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 504, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_path_utf, __pyx_t_1); __pyx_t_1 = 0; @@ -193729,7 +180246,6 @@ static PyObject *__pyx_f_4lxml_5etree_7ETXPath__nsextract_path(CYTHON_UNUSED str * if namespace_def not in namespace_defs: * prefix = python.PyBytes_FromFormat("__xpp%02d", i) */ - __Pyx_TraceLine(494,0,__PYX_ERR(18, 494, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -193739,32 +180255,42 @@ static PyObject *__pyx_f_4lxml_5etree_7ETXPath__nsextract_path(CYTHON_UNUSED str * path = path_utf.decode('utf8') # <<<<<<<<<<<<<< * return path, namespaces */ - __Pyx_TraceLine(505,0,__PYX_ERR(18, 505, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_path_utf, __pyx_n_s_decode); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 505, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__347, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 505, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_path_utf, __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_1); - __pyx_t_1 = 0; + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_n_s_utf8) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_n_s_utf8); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 505, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_2); + __pyx_t_2 = 0; /* "src/lxml/xpath.pxi":506 * path_utf = path_utf.replace(namespace_def, prefix_str) * path = path_utf.decode('utf8') * return path, namespaces # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(506,0,__PYX_ERR(18, 506, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 506, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_path); __Pyx_GIVEREF(__pyx_v_path); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_path); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_path); __Pyx_INCREF(__pyx_v_namespaces); __Pyx_GIVEREF(__pyx_v_namespaces); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_namespaces); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_namespaces); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; goto __pyx_L0; /* "src/lxml/xpath.pxi":486 @@ -193795,7 +180321,6 @@ static PyObject *__pyx_f_4lxml_5etree_7ETXPath__nsextract_path(CYTHON_UNUSED str __Pyx_XDECREF(__pyx_v_prefix_str); __Pyx_XDECREF(__pyx_v_path); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -193811,13 +180336,11 @@ static PyObject *__pyx_f_4lxml_5etree_7ETXPath__nsextract_path(CYTHON_UNUSED str static struct __pyx_obj_4lxml_5etree__XSLTResolverContext *__pyx_f_4lxml_5etree_20_XSLTResolverContext__copy(struct __pyx_obj_4lxml_5etree__XSLTResolverContext *__pyx_v_self) { struct __pyx_obj_4lxml_5etree__XSLTResolverContext *__pyx_v_context = 0; struct __pyx_obj_4lxml_5etree__XSLTResolverContext *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; xmlDoc *__pyx_t_3; __Pyx_RefNannySetupContext("_copy", 0); - __Pyx_TraceCall("_copy", __pyx_f[3], 53, 0, __PYX_ERR(3, 53, __pyx_L1_error)); /* "src/lxml/xslt.pxi":55 * cdef _XSLTResolverContext _copy(self): @@ -193826,7 +180349,6 @@ static struct __pyx_obj_4lxml_5etree__XSLTResolverContext *__pyx_f_4lxml_5etree_ * _initXSLTResolverContext(context, self._parser) * context._c_style_doc = self._c_style_doc */ - __Pyx_TraceLine(55,0,__PYX_ERR(3, 55, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__XSLTResolverContext)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__XSLTResolverContext *)__pyx_t_1); @@ -193839,7 +180361,6 @@ static struct __pyx_obj_4lxml_5etree__XSLTResolverContext *__pyx_f_4lxml_5etree_ * context._c_style_doc = self._c_style_doc * return context */ - __Pyx_TraceLine(56,0,__PYX_ERR(3, 56, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_v_self->_parser); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_4lxml_5etree__initXSLTResolverContext(__pyx_v_context, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 56, __pyx_L1_error) @@ -193854,7 +180375,6 @@ static struct __pyx_obj_4lxml_5etree__XSLTResolverContext *__pyx_f_4lxml_5etree_ * return context * */ - __Pyx_TraceLine(57,0,__PYX_ERR(3, 57, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->_c_style_doc; __pyx_v_context->_c_style_doc = __pyx_t_3; @@ -193865,7 +180385,6 @@ static struct __pyx_obj_4lxml_5etree__XSLTResolverContext *__pyx_f_4lxml_5etree_ * * cdef _initXSLTResolverContext(_XSLTResolverContext context, */ - __Pyx_TraceLine(58,0,__PYX_ERR(3, 58, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_context)); __pyx_r = __pyx_v_context; @@ -193888,7 +180407,6 @@ static struct __pyx_obj_4lxml_5etree__XSLTResolverContext *__pyx_f_4lxml_5etree_ __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -193903,12 +180421,10 @@ static struct __pyx_obj_4lxml_5etree__XSLTResolverContext *__pyx_f_4lxml_5etree_ static PyObject *__pyx_f_4lxml_5etree__initXSLTResolverContext(struct __pyx_obj_4lxml_5etree__XSLTResolverContext *__pyx_v_context, struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_v_parser) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_initXSLTResolverContext", 0); - __Pyx_TraceCall("_initXSLTResolverContext", __pyx_f[3], 60, 0, __PYX_ERR(3, 60, __pyx_L1_error)); /* "src/lxml/xslt.pxi":62 * cdef _initXSLTResolverContext(_XSLTResolverContext context, @@ -193917,7 +180433,6 @@ static PyObject *__pyx_f_4lxml_5etree__initXSLTResolverContext(struct __pyx_obj_ * context._parser = parser * context._c_style_doc = NULL */ - __Pyx_TraceLine(62,0,__PYX_ERR(3, 62, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_parser), __pyx_n_s_resolvers); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 62, __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__ResolverRegistry))))) __PYX_ERR(3, 62, __pyx_L1_error) @@ -193933,7 +180448,6 @@ static PyObject *__pyx_f_4lxml_5etree__initXSLTResolverContext(struct __pyx_obj_ * context._c_style_doc = NULL * */ - __Pyx_TraceLine(63,0,__PYX_ERR(3, 63, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_parser)); __Pyx_GIVEREF(((PyObject *)__pyx_v_parser)); __Pyx_GOTREF(__pyx_v_context->_parser); @@ -193947,7 +180461,6 @@ static PyObject *__pyx_f_4lxml_5etree__initXSLTResolverContext(struct __pyx_obj_ * * cdef xmlDoc* _xslt_resolve_from_python(const_xmlChar* c_uri, void* c_context, */ - __Pyx_TraceLine(64,0,__PYX_ERR(3, 64, __pyx_L1_error)) __pyx_v_context->_c_style_doc = NULL; /* "src/lxml/xslt.pxi":60 @@ -193968,7 +180481,6 @@ static PyObject *__pyx_f_4lxml_5etree__initXSLTResolverContext(struct __pyx_obj_ __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -193989,7 +180501,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p xmlDoc *__pyx_v_c_return_doc; PyObject *__pyx_v_uri = NULL; xmlDoc *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; xmlDoc *__pyx_t_2; @@ -194009,7 +180520,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_xslt_resolve_from_python", 0); - __Pyx_TraceCall("_xslt_resolve_from_python", __pyx_f[3], 66, 0, __PYX_ERR(3, 66, __pyx_L1_error)); /* "src/lxml/xslt.pxi":73 * cdef _InputDocument doc_ref @@ -194018,7 +180528,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * * error[0] = 0 */ - __Pyx_TraceLine(73,0,__PYX_ERR(3, 73, __pyx_L1_error)) __pyx_v_c_return_doc = NULL; /* "src/lxml/xslt.pxi":75 @@ -194028,7 +180537,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * context = <_XSLTResolverContext>c_context * */ - __Pyx_TraceLine(75,0,__PYX_ERR(3, 75, __pyx_L1_error)) (__pyx_v_error[0]) = 0; /* "src/lxml/xslt.pxi":76 @@ -194038,7 +180546,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * * # shortcut if we resolve the stylesheet itself */ - __Pyx_TraceLine(76,0,__PYX_ERR(3, 76, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_v_c_context); __Pyx_INCREF(__pyx_t_1); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__XSLTResolverContext *)__pyx_t_1); @@ -194051,7 +180558,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * try: * if c_doc is not NULL and c_doc.URL is not NULL: */ - __Pyx_TraceLine(79,0,__PYX_ERR(3, 79, __pyx_L1_error)) __pyx_t_2 = __pyx_v_context->_c_style_doc; __pyx_v_c_doc = __pyx_t_2; @@ -194062,7 +180568,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * if c_doc is not NULL and c_doc.URL is not NULL: * if tree.xmlStrcmp(c_uri, c_doc.URL) == 0: */ - __Pyx_TraceLine(80,0,__PYX_ERR(3, 80, __pyx_L4_error)) /*try:*/ { { __Pyx_PyThreadState_declare @@ -194080,7 +180585,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * if tree.xmlStrcmp(c_uri, c_doc.URL) == 0: * c_return_doc = _copyDoc(c_doc, 1) */ - __Pyx_TraceLine(81,0,__PYX_ERR(3, 81, __pyx_L6_error)) __pyx_t_7 = ((__pyx_v_c_doc != NULL) != 0); if (__pyx_t_7) { } else { @@ -194099,7 +180603,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * c_return_doc = _copyDoc(c_doc, 1) * return c_return_doc # 'goto', see 'finally' below */ - __Pyx_TraceLine(82,0,__PYX_ERR(3, 82, __pyx_L6_error)) __pyx_t_6 = ((xmlStrcmp(__pyx_v_c_uri, __pyx_v_c_doc->URL) == 0) != 0); if (__pyx_t_6) { @@ -194110,7 +180613,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * return c_return_doc # 'goto', see 'finally' below * */ - __Pyx_TraceLine(83,0,__PYX_ERR(3, 83, __pyx_L6_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__copyDoc(__pyx_v_c_doc, 1); if (unlikely(__pyx_t_2 == ((xmlDoc *)NULL))) __PYX_ERR(3, 83, __pyx_L6_error) __pyx_v_c_return_doc = __pyx_t_2; @@ -194121,7 +180623,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * * # delegate to the Python resolvers */ - __Pyx_TraceLine(84,0,__PYX_ERR(3, 84, __pyx_L6_error)) __pyx_r = __pyx_v_c_return_doc; goto __pyx_L10_try_return; @@ -194150,7 +180651,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * if tree.xmlStrncmp('string://__STRING__XSLT__/', c_uri, 26) == 0: * c_uri += 26 */ - __Pyx_TraceLine(87,0,__PYX_ERR(3, 87, __pyx_L6_error)) __pyx_t_1 = ((PyObject *)__pyx_v_context->__pyx_base._resolvers); __Pyx_INCREF(__pyx_t_1); __pyx_v_resolvers = ((struct __pyx_obj_4lxml_5etree__ResolverRegistry *)__pyx_t_1); @@ -194163,7 +180663,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * c_uri += 26 * uri = _decodeFilename(c_uri) */ - __Pyx_TraceLine(88,0,__PYX_ERR(3, 88, __pyx_L6_error)) __pyx_t_6 = ((xmlStrncmp(((unsigned char *)((unsigned char *)((char const *)"string://__STRING__XSLT__/"))), __pyx_v_c_uri, 26) == 0) != 0); if (__pyx_t_6) { @@ -194174,7 +180673,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * uri = _decodeFilename(c_uri) * doc_ref = resolvers.resolve(uri, None, context) */ - __Pyx_TraceLine(89,0,__PYX_ERR(3, 89, __pyx_L6_error)) __pyx_v_c_uri = (__pyx_v_c_uri + 26); /* "src/lxml/xslt.pxi":88 @@ -194193,7 +180691,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * doc_ref = resolvers.resolve(uri, None, context) * */ - __Pyx_TraceLine(90,0,__PYX_ERR(3, 90, __pyx_L6_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__decodeFilename(__pyx_v_c_uri); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 90, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_uri = __pyx_t_1; @@ -194206,7 +180703,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * * if doc_ref is not None: */ - __Pyx_TraceLine(91,0,__PYX_ERR(3, 91, __pyx_L6_error)) __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_resolvers), __pyx_n_s_resolve); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 91, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; @@ -194268,7 +180764,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * if doc_ref._type == PARSER_DATA_STRING: * c_return_doc = _parseDoc( */ - __Pyx_TraceLine(93,0,__PYX_ERR(3, 93, __pyx_L6_error)) __pyx_t_6 = (((PyObject *)__pyx_v_doc_ref) != Py_None); __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { @@ -194280,7 +180775,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * c_return_doc = _parseDoc( * doc_ref._data_bytes, doc_ref._filename, context._parser) */ - __Pyx_TraceLine(94,0,__PYX_ERR(3, 94, __pyx_L6_error)) switch (__pyx_v_doc_ref->_type) { case __pyx_e_4lxml_5etree_PARSER_DATA_STRING: @@ -194291,7 +180785,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * elif doc_ref._type == PARSER_DATA_FILENAME: * c_return_doc = _parseDocFromFile( */ - __Pyx_TraceLine(96,0,__PYX_ERR(3, 96, __pyx_L6_error)) __pyx_t_1 = __pyx_v_doc_ref->_data_bytes; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = __pyx_v_doc_ref->_filename; @@ -194306,7 +180799,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * doc_ref._data_bytes, doc_ref._filename, context._parser) * elif doc_ref._type == PARSER_DATA_FILENAME: */ - __Pyx_TraceLine(95,0,__PYX_ERR(3, 95, __pyx_L6_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__parseDoc(__pyx_t_1, __pyx_t_8, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_11)); if (unlikely(__pyx_t_2 == ((xmlDoc *)NULL))) __PYX_ERR(3, 95, __pyx_L6_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -194321,15 +180813,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * doc_ref._data_bytes, doc_ref._filename, context._parser) */ break; - - /* "src/lxml/xslt.pxi":97 - * c_return_doc = _parseDoc( - * doc_ref._data_bytes, doc_ref._filename, context._parser) - * elif doc_ref._type == PARSER_DATA_FILENAME: # <<<<<<<<<<<<<< - * c_return_doc = _parseDocFromFile( - * doc_ref._filename, context._parser) - */ - __Pyx_TraceLine(97,0,__PYX_ERR(3, 97, __pyx_L6_error)) case __pyx_e_4lxml_5etree_PARSER_DATA_FILENAME: /* "src/lxml/xslt.pxi":99 @@ -194339,7 +180822,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * elif doc_ref._type == PARSER_DATA_FILE: * c_return_doc = _parseDocFromFilelike( */ - __Pyx_TraceLine(99,0,__PYX_ERR(3, 99, __pyx_L6_error)) __pyx_t_11 = __pyx_v_doc_ref->_filename; __Pyx_INCREF(__pyx_t_11); __pyx_t_8 = ((PyObject *)__pyx_v_context->_parser); @@ -194352,7 +180834,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * doc_ref._filename, context._parser) * elif doc_ref._type == PARSER_DATA_FILE: */ - __Pyx_TraceLine(98,0,__PYX_ERR(3, 98, __pyx_L6_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__parseDocFromFile(__pyx_t_11, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_8)); if (unlikely(__pyx_t_2 == ((xmlDoc *)NULL))) __PYX_ERR(3, 98, __pyx_L6_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -194366,15 +180847,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * doc_ref._filename, context._parser) */ break; - - /* "src/lxml/xslt.pxi":100 - * c_return_doc = _parseDocFromFile( - * doc_ref._filename, context._parser) - * elif doc_ref._type == PARSER_DATA_FILE: # <<<<<<<<<<<<<< - * c_return_doc = _parseDocFromFilelike( - * doc_ref._file, doc_ref._filename, context._parser) - */ - __Pyx_TraceLine(100,0,__PYX_ERR(3, 100, __pyx_L6_error)) case __pyx_e_4lxml_5etree_PARSER_DATA_FILE: /* "src/lxml/xslt.pxi":102 @@ -194384,7 +180856,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * elif doc_ref._type == PARSER_DATA_EMPTY: * c_return_doc = _newXMLDoc() */ - __Pyx_TraceLine(102,0,__PYX_ERR(3, 102, __pyx_L6_error)) __pyx_t_8 = __pyx_v_doc_ref->_file; __Pyx_INCREF(__pyx_t_8); __pyx_t_11 = __pyx_v_doc_ref->_filename; @@ -194399,7 +180870,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * doc_ref._file, doc_ref._filename, context._parser) * elif doc_ref._type == PARSER_DATA_EMPTY: */ - __Pyx_TraceLine(101,0,__PYX_ERR(3, 101, __pyx_L6_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__parseDocFromFilelike(__pyx_t_8, __pyx_t_11, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((xmlDoc *)NULL))) __PYX_ERR(3, 101, __pyx_L6_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -194414,15 +180884,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * doc_ref._file, doc_ref._filename, context._parser) */ break; - - /* "src/lxml/xslt.pxi":103 - * c_return_doc = _parseDocFromFilelike( - * doc_ref._file, doc_ref._filename, context._parser) - * elif doc_ref._type == PARSER_DATA_EMPTY: # <<<<<<<<<<<<<< - * c_return_doc = _newXMLDoc() - * if c_return_doc is not NULL and c_return_doc.URL is NULL: - */ - __Pyx_TraceLine(103,0,__PYX_ERR(3, 103, __pyx_L6_error)) case __pyx_e_4lxml_5etree_PARSER_DATA_EMPTY: /* "src/lxml/xslt.pxi":104 @@ -194432,7 +180893,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * if c_return_doc is not NULL and c_return_doc.URL is NULL: * c_return_doc.URL = tree.xmlStrdup(c_uri) */ - __Pyx_TraceLine(104,0,__PYX_ERR(3, 104, __pyx_L6_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__newXMLDoc(); if (unlikely(__pyx_t_2 == ((xmlDoc *)NULL))) __PYX_ERR(3, 104, __pyx_L6_error) __pyx_v_c_return_doc = __pyx_t_2; @@ -194454,7 +180914,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * c_return_doc.URL = tree.xmlStrdup(c_uri) * except: */ - __Pyx_TraceLine(105,0,__PYX_ERR(3, 105, __pyx_L6_error)) __pyx_t_6 = ((__pyx_v_c_return_doc != NULL) != 0); if (__pyx_t_6) { } else { @@ -194473,7 +180932,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * except: * error[0] = 1 */ - __Pyx_TraceLine(106,0,__PYX_ERR(3, 106, __pyx_L6_error)) __pyx_v_c_return_doc->URL = xmlStrdup(__pyx_v_c_uri); /* "src/lxml/xslt.pxi":105 @@ -194519,7 +180977,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * error[0] = 1 * context._store_raised() */ - __Pyx_TraceLine(107,0,__PYX_ERR(3, 107, __pyx_L8_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._xslt_resolve_from_python", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_11, &__pyx_t_8) < 0) __PYX_ERR(3, 107, __pyx_L8_except_error) @@ -194534,7 +180991,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * context._store_raised() * finally: */ - __Pyx_TraceLine(108,0,__PYX_ERR(3, 108, __pyx_L8_except_error)) (__pyx_v_error[0]) = 1; /* "src/lxml/xslt.pxi":109 @@ -194544,11 +181000,10 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * finally: * return c_return_doc # and swallow any further exceptions */ - __Pyx_TraceLine(109,0,__PYX_ERR(3, 109, __pyx_L8_except_error)) ((struct __pyx_vtabstruct_4lxml_5etree__XSLTResolverContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._store_raised(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_v_context)); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_exception_handled; } __pyx_L8_except_error:; @@ -194587,7 +181042,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p * * */ - __Pyx_TraceLine(111,0,__PYX_ERR(3, 111, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ __pyx_r = __pyx_v_c_return_doc; @@ -194642,19 +181096,11 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *__p */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_XDECREF(__pyx_t_11); - __Pyx_WriteUnraisable("lxml.etree._xslt_resolve_from_python", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); __Pyx_XDECREF((PyObject *)__pyx_v_resolvers); __Pyx_XDECREF((PyObject *)__pyx_v_doc_ref); __Pyx_XDECREF(__pyx_v_uri); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); @@ -194674,7 +181120,6 @@ static void __pyx_f_4lxml_5etree__xslt_store_resolver_exception(const xmlChar *_ PyObject *__pyx_v_message = NULL; struct __pyx_obj_4lxml_5etree_XSLTError *__pyx_v_exception = NULL; PyObject *__pyx_v_e = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -194691,7 +181136,6 @@ static void __pyx_f_4lxml_5etree__xslt_store_resolver_exception(const xmlChar *_ PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_xslt_store_resolver_exception", 0); - __Pyx_TraceCall("_xslt_store_resolver_exception", __pyx_f[3], 114, 0, __PYX_ERR(3, 114, __pyx_L1_error)); /* "src/lxml/xslt.pxi":116 * cdef void _xslt_store_resolver_exception(const_xmlChar* c_uri, void* context, @@ -194700,7 +181144,6 @@ static void __pyx_f_4lxml_5etree__xslt_store_resolver_exception(const xmlChar *_ * message = f"Cannot resolve URI {_decodeFilename(c_uri)}" * if c_type == xslt.XSLT_LOAD_DOCUMENT: */ - __Pyx_TraceLine(116,0,__PYX_ERR(3, 116, __pyx_L4_error)) /*try:*/ { { __Pyx_PyThreadState_declare @@ -194718,7 +181161,6 @@ static void __pyx_f_4lxml_5etree__xslt_store_resolver_exception(const xmlChar *_ * if c_type == xslt.XSLT_LOAD_DOCUMENT: * exception = XSLTApplyError(message) */ - __Pyx_TraceLine(117,0,__PYX_ERR(3, 117, __pyx_L6_error)) __pyx_t_4 = __pyx_f_4lxml_5etree__decodeFilename(__pyx_v_c_uri); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 117, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 117, __pyx_L6_error) @@ -194737,7 +181179,6 @@ static void __pyx_f_4lxml_5etree__xslt_store_resolver_exception(const xmlChar *_ * exception = XSLTApplyError(message) * else: */ - __Pyx_TraceLine(118,0,__PYX_ERR(3, 118, __pyx_L6_error)) __pyx_t_6 = ((__pyx_v_c_type == XSLT_LOAD_DOCUMENT) != 0); if (__pyx_t_6) { @@ -194748,7 +181189,6 @@ static void __pyx_f_4lxml_5etree__xslt_store_resolver_exception(const xmlChar *_ * else: * exception = XSLTParseError(message) */ - __Pyx_TraceLine(119,0,__PYX_ERR(3, 119, __pyx_L6_error)) __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree_XSLTApplyError), __pyx_v_message); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 119, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_exception = ((struct __pyx_obj_4lxml_5etree_XSLTError *)__pyx_t_4); @@ -194771,7 +181211,6 @@ static void __pyx_f_4lxml_5etree__xslt_store_resolver_exception(const xmlChar *_ * (<_XSLTResolverContext>context)._store_exception(exception) * except BaseException as e: */ - __Pyx_TraceLine(121,0,__PYX_ERR(3, 121, __pyx_L6_error)) /*else*/ { __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree_XSLTParseError), __pyx_v_message); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 121, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_4); @@ -194787,7 +181226,6 @@ static void __pyx_f_4lxml_5etree__xslt_store_resolver_exception(const xmlChar *_ * except BaseException as e: * (<_XSLTResolverContext>context)._store_exception(e) */ - __Pyx_TraceLine(122,0,__PYX_ERR(3, 122, __pyx_L6_error)) __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__XSLTResolverContext *)((struct __pyx_obj_4lxml_5etree__XSLTResolverContext *)__pyx_v_context)->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._store_exception(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)((struct __pyx_obj_4lxml_5etree__XSLTResolverContext *)__pyx_v_context)), ((PyObject *)__pyx_v_exception)); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(3, 122, __pyx_L6_error) /* "src/lxml/xslt.pxi":116 @@ -194813,7 +181251,6 @@ static void __pyx_f_4lxml_5etree__xslt_store_resolver_exception(const xmlChar *_ * (<_XSLTResolverContext>context)._store_exception(e) * finally: */ - __Pyx_TraceLine(123,0,__PYX_ERR(3, 123, __pyx_L8_except_error)) __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException); if (__pyx_t_7) { __Pyx_AddTraceback("lxml.etree._xslt_store_resolver_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -194831,11 +181268,10 @@ static void __pyx_f_4lxml_5etree__xslt_store_resolver_exception(const xmlChar *_ * finally: * return # and swallow any further exceptions */ - __Pyx_TraceLine(124,0,__PYX_ERR(3, 124, __pyx_L8_except_error)) __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__XSLTResolverContext *)((struct __pyx_obj_4lxml_5etree__XSLTResolverContext *)__pyx_v_context)->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._store_exception(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)((struct __pyx_obj_4lxml_5etree__XSLTResolverContext *)__pyx_v_context)), __pyx_v_e); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(3, 124, __pyx_L8_except_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_exception_handled; } goto __pyx_L8_except_error; @@ -194869,7 +181305,6 @@ static void __pyx_f_4lxml_5etree__xslt_store_resolver_exception(const xmlChar *_ * * */ - __Pyx_TraceLine(126,0,__PYX_ERR(3, 126, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ goto __pyx_L0; @@ -194917,16 +181352,10 @@ static void __pyx_f_4lxml_5etree__xslt_store_resolver_exception(const xmlChar *_ */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_WriteUnraisable("lxml.etree._xslt_store_resolver_exception", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF(__pyx_v_message); __Pyx_XDECREF((PyObject *)__pyx_v_exception); __Pyx_XDECREF(__pyx_v_e); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); @@ -194946,11 +181375,9 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_doc_loader(const xmlChar *__pyx_v_c_ur void *__pyx_v_c_pcontext; int __pyx_v_error; xmlDoc *__pyx_r; - __Pyx_TraceDeclarations void *__pyx_t_1; int __pyx_t_2; int __pyx_t_3; - __Pyx_TraceCall("_xslt_doc_loader", __pyx_f[3], 129, 1, __PYX_ERR(3, 129, __pyx_L1_error)); /* "src/lxml/xslt.pxi":136 * cdef xmlDoc* result @@ -194959,7 +181386,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_doc_loader(const xmlChar *__pyx_v_c_ur * # find resolver contexts of stylesheet and transformed doc * if c_type == xslt.XSLT_LOAD_DOCUMENT: */ - __Pyx_TraceLine(136,1,__PYX_ERR(3, 136, __pyx_L1_error)) __pyx_v_error = 0; /* "src/lxml/xslt.pxi":138 @@ -194969,7 +181395,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_doc_loader(const xmlChar *__pyx_v_c_ur * # transformation time * c_pcontext = (c_ctxt)._private */ - __Pyx_TraceLine(138,1,__PYX_ERR(3, 138, __pyx_L1_error)) switch (__pyx_v_c_type) { case XSLT_LOAD_DOCUMENT: @@ -194980,7 +181405,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_doc_loader(const xmlChar *__pyx_v_c_ur * elif c_type == xslt.XSLT_LOAD_STYLESHEET: * # include/import resolution while parsing */ - __Pyx_TraceLine(140,1,__PYX_ERR(3, 140, __pyx_L1_error)) __pyx_t_1 = ((xsltTransformContext *)__pyx_v_c_ctxt)->_private; __pyx_v_c_pcontext = __pyx_t_1; @@ -194992,15 +181416,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_doc_loader(const xmlChar *__pyx_v_c_ur * c_pcontext = (c_ctxt)._private */ break; - - /* "src/lxml/xslt.pxi":141 - * # transformation time - * c_pcontext = (c_ctxt)._private - * elif c_type == xslt.XSLT_LOAD_STYLESHEET: # <<<<<<<<<<<<<< - * # include/import resolution while parsing - * c_pcontext = (c_ctxt).doc._private - */ - __Pyx_TraceLine(141,1,__PYX_ERR(3, 141, __pyx_L1_error)) case XSLT_LOAD_STYLESHEET: /* "src/lxml/xslt.pxi":143 @@ -195010,7 +181425,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_doc_loader(const xmlChar *__pyx_v_c_ur * else: * c_pcontext = NULL */ - __Pyx_TraceLine(143,1,__PYX_ERR(3, 143, __pyx_L1_error)) __pyx_t_1 = ((xsltStylesheet *)__pyx_v_c_ctxt)->doc->_private; __pyx_v_c_pcontext = __pyx_t_1; @@ -195031,7 +181445,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_doc_loader(const xmlChar *__pyx_v_c_ur * * if c_pcontext is NULL: */ - __Pyx_TraceLine(145,1,__PYX_ERR(3, 145, __pyx_L1_error)) __pyx_v_c_pcontext = NULL; break; } @@ -195043,7 +181456,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_doc_loader(const xmlChar *__pyx_v_c_ur * # can't call Python without context, fall back to default loader * return XSLT_DOC_DEFAULT_LOADER( */ - __Pyx_TraceLine(147,1,__PYX_ERR(3, 147, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_pcontext == NULL) != 0); if (__pyx_t_2) { @@ -195054,7 +181466,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_doc_loader(const xmlChar *__pyx_v_c_ur * c_uri, c_dict, parse_options, c_ctxt, c_type) * */ - __Pyx_TraceLine(149,1,__PYX_ERR(3, 149, __pyx_L1_error)) __pyx_r = __pyx_v_4lxml_5etree_XSLT_DOC_DEFAULT_LOADER(__pyx_v_c_uri, __pyx_v_c_dict, __pyx_v_parse_options, __pyx_v_c_ctxt, __pyx_v_c_type); goto __pyx_L0; @@ -195074,7 +181485,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_doc_loader(const xmlChar *__pyx_v_c_ur * if c_doc is NULL and not error: * c_doc = XSLT_DOC_DEFAULT_LOADER( */ - __Pyx_TraceLine(152,1,__PYX_ERR(3, 152, __pyx_L1_error)) __pyx_v_c_doc = __pyx_f_4lxml_5etree__xslt_resolve_from_python(__pyx_v_c_uri, __pyx_v_c_pcontext, __pyx_v_parse_options, (&__pyx_v_error)); /* "src/lxml/xslt.pxi":153 @@ -195084,7 +181494,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_doc_loader(const xmlChar *__pyx_v_c_ur * c_doc = XSLT_DOC_DEFAULT_LOADER( * c_uri, c_dict, parse_options, c_ctxt, c_type) */ - __Pyx_TraceLine(153,1,__PYX_ERR(3, 153, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_doc == NULL) != 0); if (__pyx_t_3) { } else { @@ -195103,7 +181512,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_doc_loader(const xmlChar *__pyx_v_c_ur * c_uri, c_dict, parse_options, c_ctxt, c_type) * if c_doc is NULL: */ - __Pyx_TraceLine(154,1,__PYX_ERR(3, 154, __pyx_L1_error)) __pyx_v_c_doc = __pyx_v_4lxml_5etree_XSLT_DOC_DEFAULT_LOADER(__pyx_v_c_uri, __pyx_v_c_dict, __pyx_v_parse_options, __pyx_v_c_ctxt, __pyx_v_c_type); /* "src/lxml/xslt.pxi":156 @@ -195113,7 +181521,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_doc_loader(const xmlChar *__pyx_v_c_ur * _xslt_store_resolver_exception(c_uri, c_pcontext, c_type) * */ - __Pyx_TraceLine(156,1,__PYX_ERR(3, 156, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_doc == NULL) != 0); if (__pyx_t_2) { @@ -195124,7 +181531,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_doc_loader(const xmlChar *__pyx_v_c_ur * * if c_doc is not NULL and c_type == xslt.XSLT_LOAD_STYLESHEET: */ - __Pyx_TraceLine(157,1,__PYX_ERR(3, 157, __pyx_L1_error)) __pyx_f_4lxml_5etree__xslt_store_resolver_exception(__pyx_v_c_uri, __pyx_v_c_pcontext, __pyx_v_c_type); /* "src/lxml/xslt.pxi":156 @@ -195152,7 +181558,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_doc_loader(const xmlChar *__pyx_v_c_ur * c_doc._private = c_pcontext * return c_doc */ - __Pyx_TraceLine(159,1,__PYX_ERR(3, 159, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_doc != NULL) != 0); if (__pyx_t_3) { } else { @@ -195171,7 +181576,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_doc_loader(const xmlChar *__pyx_v_c_ur * return c_doc * */ - __Pyx_TraceLine(160,1,__PYX_ERR(3, 160, __pyx_L1_error)) __pyx_v_c_doc->_private = __pyx_v_c_pcontext; /* "src/lxml/xslt.pxi":159 @@ -195190,7 +181594,6 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_doc_loader(const xmlChar *__pyx_v_c_ur * * cdef xslt.xsltDocLoaderFunc XSLT_DOC_DEFAULT_LOADER = xslt.xsltDocDefaultLoader */ - __Pyx_TraceLine(161,1,__PYX_ERR(3, 161, __pyx_L1_error)) __pyx_r = __pyx_v_c_doc; goto __pyx_L0; @@ -195203,11 +181606,7 @@ static xmlDoc *__pyx_f_4lxml_5etree__xslt_doc_loader(const xmlChar *__pyx_v_c_ur */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._xslt_doc_loader", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 1); return __pyx_r; } @@ -195237,11 +181636,9 @@ static int __pyx_pw_4lxml_5etree_17XSLTAccessControl_1__cinit__(PyObject *__pyx_ static int __pyx_pf_4lxml_5etree_17XSLTAccessControl___cinit__(struct __pyx_obj_4lxml_5etree_XSLTAccessControl *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[3], 191, 0, __PYX_ERR(3, 191, __pyx_L1_error)); /* "src/lxml/xslt.pxi":192 * cdef xslt.xsltSecurityPrefs* _prefs @@ -195250,7 +181647,6 @@ static int __pyx_pf_4lxml_5etree_17XSLTAccessControl___cinit__(struct __pyx_obj_ * if self._prefs is NULL: * raise MemoryError() */ - __Pyx_TraceLine(192,0,__PYX_ERR(3, 192, __pyx_L1_error)) __pyx_v_self->_prefs = xsltNewSecurityPrefs(); /* "src/lxml/xslt.pxi":193 @@ -195260,7 +181656,6 @@ static int __pyx_pf_4lxml_5etree_17XSLTAccessControl___cinit__(struct __pyx_obj_ * raise MemoryError() * */ - __Pyx_TraceLine(193,0,__PYX_ERR(3, 193, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_prefs == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -195271,7 +181666,6 @@ static int __pyx_pf_4lxml_5etree_17XSLTAccessControl___cinit__(struct __pyx_obj_ * * def __init__(self, *, bint read_file=True, bint write_file=True, bint create_dir=True, */ - __Pyx_TraceLine(194,0,__PYX_ERR(3, 194, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(3, 194, __pyx_L1_error) /* "src/lxml/xslt.pxi":193 @@ -195298,7 +181692,6 @@ static int __pyx_pf_4lxml_5etree_17XSLTAccessControl___cinit__(struct __pyx_obj_ __Pyx_AddTraceback("lxml.etree.XSLTAccessControl.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -195406,11 +181799,9 @@ static int __pyx_pw_4lxml_5etree_17XSLTAccessControl_3__init__(PyObject *__pyx_v static int __pyx_pf_4lxml_5etree_17XSLTAccessControl_2__init__(struct __pyx_obj_4lxml_5etree_XSLTAccessControl *__pyx_v_self, int __pyx_v_read_file, int __pyx_v_write_file, int __pyx_v_create_dir, int __pyx_v_read_network, int __pyx_v_write_network) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[3], 196, 0, __PYX_ERR(3, 196, __pyx_L1_error)); /* "src/lxml/xslt.pxi":198 * def __init__(self, *, bint read_file=True, bint write_file=True, bint create_dir=True, @@ -195419,7 +181810,6 @@ static int __pyx_pf_4lxml_5etree_17XSLTAccessControl_2__init__(struct __pyx_obj_ * self._setAccess(xslt.XSLT_SECPREF_WRITE_FILE, write_file) * self._setAccess(xslt.XSLT_SECPREF_CREATE_DIRECTORY, create_dir) */ - __Pyx_TraceLine(198,0,__PYX_ERR(3, 198, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_17XSLTAccessControl__setAccess(__pyx_v_self, XSLT_SECPREF_READ_FILE, __pyx_v_read_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -195431,7 +181821,6 @@ static int __pyx_pf_4lxml_5etree_17XSLTAccessControl_2__init__(struct __pyx_obj_ * self._setAccess(xslt.XSLT_SECPREF_CREATE_DIRECTORY, create_dir) * self._setAccess(xslt.XSLT_SECPREF_READ_NETWORK, read_network) */ - __Pyx_TraceLine(199,0,__PYX_ERR(3, 199, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_17XSLTAccessControl__setAccess(__pyx_v_self, XSLT_SECPREF_WRITE_FILE, __pyx_v_write_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -195443,7 +181832,6 @@ static int __pyx_pf_4lxml_5etree_17XSLTAccessControl_2__init__(struct __pyx_obj_ * self._setAccess(xslt.XSLT_SECPREF_READ_NETWORK, read_network) * self._setAccess(xslt.XSLT_SECPREF_WRITE_NETWORK, write_network) */ - __Pyx_TraceLine(200,0,__PYX_ERR(3, 200, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_17XSLTAccessControl__setAccess(__pyx_v_self, XSLT_SECPREF_CREATE_DIRECTORY, __pyx_v_create_dir); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -195455,7 +181843,6 @@ static int __pyx_pf_4lxml_5etree_17XSLTAccessControl_2__init__(struct __pyx_obj_ * self._setAccess(xslt.XSLT_SECPREF_WRITE_NETWORK, write_network) * */ - __Pyx_TraceLine(201,0,__PYX_ERR(3, 201, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_17XSLTAccessControl__setAccess(__pyx_v_self, XSLT_SECPREF_READ_NETWORK, __pyx_v_read_network); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -195467,7 +181854,6 @@ static int __pyx_pf_4lxml_5etree_17XSLTAccessControl_2__init__(struct __pyx_obj_ * * DENY_ALL = XSLTAccessControl( */ - __Pyx_TraceLine(202,0,__PYX_ERR(3, 202, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_17XSLTAccessControl__setAccess(__pyx_v_self, XSLT_SECPREF_WRITE_NETWORK, __pyx_v_write_network); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -195488,7 +181874,6 @@ static int __pyx_pf_4lxml_5etree_17XSLTAccessControl_2__init__(struct __pyx_obj_ __Pyx_AddTraceback("lxml.etree.XSLTAccessControl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -195513,11 +181898,9 @@ static void __pyx_pw_4lxml_5etree_17XSLTAccessControl_5__dealloc__(PyObject *__p } static void __pyx_pf_4lxml_5etree_17XSLTAccessControl_4__dealloc__(struct __pyx_obj_4lxml_5etree_XSLTAccessControl *__pyx_v_self) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__dealloc__", 0); - __Pyx_TraceCall("__dealloc__", __pyx_f[3], 212, 0, __PYX_ERR(3, 212, __pyx_L1_error)); /* "src/lxml/xslt.pxi":213 * @@ -195526,7 +181909,6 @@ static void __pyx_pf_4lxml_5etree_17XSLTAccessControl_4__dealloc__(struct __pyx_ * xslt.xsltFreeSecurityPrefs(self._prefs) * */ - __Pyx_TraceLine(213,0,__PYX_ERR(3, 213, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_prefs != NULL) != 0); if (__pyx_t_1) { @@ -195537,7 +181919,6 @@ static void __pyx_pf_4lxml_5etree_17XSLTAccessControl_4__dealloc__(struct __pyx_ * * @cython.final */ - __Pyx_TraceLine(214,0,__PYX_ERR(3, 214, __pyx_L1_error)) xsltFreeSecurityPrefs(__pyx_v_self->_prefs); /* "src/lxml/xslt.pxi":213 @@ -195558,11 +181939,6 @@ static void __pyx_pf_4lxml_5etree_17XSLTAccessControl_4__dealloc__(struct __pyx_ */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.XSLTAccessControl.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -195577,11 +181953,9 @@ static void __pyx_pf_4lxml_5etree_17XSLTAccessControl_4__dealloc__(struct __pyx_ static PyObject *__pyx_f_4lxml_5etree_17XSLTAccessControl__setAccess(struct __pyx_obj_4lxml_5etree_XSLTAccessControl *__pyx_v_self, xsltSecurityOption __pyx_v_option, int __pyx_v_allow) { xsltSecurityCheck __pyx_v_function; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_setAccess", 0); - __Pyx_TraceCall("_setAccess", __pyx_f[3], 217, 0, __PYX_ERR(3, 217, __pyx_L1_error)); /* "src/lxml/xslt.pxi":219 * cdef _setAccess(self, xslt.xsltSecurityOption option, bint allow): @@ -195590,7 +181964,6 @@ static PyObject *__pyx_f_4lxml_5etree_17XSLTAccessControl__setAccess(struct __py * function = xslt.xsltSecurityAllow * else: */ - __Pyx_TraceLine(219,0,__PYX_ERR(3, 219, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_allow != 0); if (__pyx_t_1) { @@ -195601,7 +181974,6 @@ static PyObject *__pyx_f_4lxml_5etree_17XSLTAccessControl__setAccess(struct __py * else: * function = xslt.xsltSecurityForbid */ - __Pyx_TraceLine(220,0,__PYX_ERR(3, 220, __pyx_L1_error)) __pyx_v_function = xsltSecurityAllow; /* "src/lxml/xslt.pxi":219 @@ -195621,7 +181993,6 @@ static PyObject *__pyx_f_4lxml_5etree_17XSLTAccessControl__setAccess(struct __py * xslt.xsltSetSecurityPrefs(self._prefs, option, function) * */ - __Pyx_TraceLine(222,0,__PYX_ERR(3, 222, __pyx_L1_error)) /*else*/ { __pyx_v_function = xsltSecurityForbid; } @@ -195634,7 +182005,6 @@ static PyObject *__pyx_f_4lxml_5etree_17XSLTAccessControl__setAccess(struct __py * * @cython.final */ - __Pyx_TraceLine(223,0,__PYX_ERR(3, 223, __pyx_L1_error)) (void)(xsltSetSecurityPrefs(__pyx_v_self->_prefs, __pyx_v_option, __pyx_v_function)); /* "src/lxml/xslt.pxi":217 @@ -195647,13 +182017,7 @@ static PyObject *__pyx_f_4lxml_5etree_17XSLTAccessControl__setAccess(struct __py /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.XSLTAccessControl._setAccess", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -195667,10 +182031,8 @@ static PyObject *__pyx_f_4lxml_5etree_17XSLTAccessControl__setAccess(struct __py */ static void __pyx_f_4lxml_5etree_17XSLTAccessControl__register_in_context(struct __pyx_obj_4lxml_5etree_XSLTAccessControl *__pyx_v_self, xsltTransformContext *__pyx_v_ctxt) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_register_in_context", 0); - __Pyx_TraceCall("_register_in_context", __pyx_f[3], 226, 0, __PYX_ERR(3, 226, __pyx_L1_error)); /* "src/lxml/xslt.pxi":227 * @cython.final @@ -195679,7 +182041,6 @@ static void __pyx_f_4lxml_5etree_17XSLTAccessControl__register_in_context(struct * * property options: */ - __Pyx_TraceLine(227,0,__PYX_ERR(3, 227, __pyx_L1_error)) (void)(xsltSetCtxtSecurityPrefs(__pyx_v_self->_prefs, __pyx_v_ctxt)); /* "src/lxml/xslt.pxi":226 @@ -195691,11 +182052,6 @@ static void __pyx_f_4lxml_5etree_17XSLTAccessControl__register_in_context(struct */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.XSLTAccessControl._register_in_context", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -195722,12 +182078,10 @@ static PyObject *__pyx_pw_4lxml_5etree_17XSLTAccessControl_7options_1__get__(PyO static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_7options___get__(struct __pyx_obj_4lxml_5etree_XSLTAccessControl *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[3], 231, 0, __PYX_ERR(3, 231, __pyx_L1_error)); /* "src/lxml/xslt.pxi":232 * u"The access control configuration as a map of options." @@ -195736,7 +182090,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_7options___get__(stru * u'read_file': self._optval(xslt.XSLT_SECPREF_READ_FILE), * u'write_file': self._optval(xslt.XSLT_SECPREF_WRITE_FILE), */ - __Pyx_TraceLine(232,0,__PYX_ERR(3, 232, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); /* "src/lxml/xslt.pxi":233 @@ -195746,7 +182099,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_7options___get__(stru * u'write_file': self._optval(xslt.XSLT_SECPREF_WRITE_FILE), * u'create_dir': self._optval(xslt.XSLT_SECPREF_CREATE_DIRECTORY), */ - __Pyx_TraceLine(233,0,__PYX_ERR(3, 233, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_f_4lxml_5etree_17XSLTAccessControl__optval(__pyx_v_self, XSLT_SECPREF_READ_FILE); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 233, __pyx_L1_error) @@ -195761,7 +182113,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_7options___get__(stru * u'create_dir': self._optval(xslt.XSLT_SECPREF_CREATE_DIRECTORY), * u'read_network': self._optval(xslt.XSLT_SECPREF_READ_NETWORK), */ - __Pyx_TraceLine(234,0,__PYX_ERR(3, 234, __pyx_L1_error)) __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); if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_write_file, __pyx_t_2) < 0) __PYX_ERR(3, 233, __pyx_L1_error) @@ -195774,7 +182125,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_7options___get__(stru * u'read_network': self._optval(xslt.XSLT_SECPREF_READ_NETWORK), * u'write_network': self._optval(xslt.XSLT_SECPREF_WRITE_NETWORK), */ - __Pyx_TraceLine(235,0,__PYX_ERR(3, 235, __pyx_L1_error)) __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); if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_create_dir, __pyx_t_2) < 0) __PYX_ERR(3, 233, __pyx_L1_error) @@ -195787,7 +182137,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_7options___get__(stru * u'write_network': self._optval(xslt.XSLT_SECPREF_WRITE_NETWORK), * } */ - __Pyx_TraceLine(236,0,__PYX_ERR(3, 236, __pyx_L1_error)) __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); if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_read_network, __pyx_t_2) < 0) __PYX_ERR(3, 233, __pyx_L1_error) @@ -195800,7 +182149,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_7options___get__(stru * } * */ - __Pyx_TraceLine(237,0,__PYX_ERR(3, 237, __pyx_L1_error)) __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) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_write_network, __pyx_t_2) < 0) __PYX_ERR(3, 233, __pyx_L1_error) @@ -195825,7 +182173,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_7options___get__(stru __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -195841,11 +182188,9 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_7options___get__(stru static PyObject *__pyx_f_4lxml_5etree_17XSLTAccessControl__optval(struct __pyx_obj_4lxml_5etree_XSLTAccessControl *__pyx_v_self, xsltSecurityOption __pyx_v_option) { xsltSecurityCheck __pyx_v_function; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_optval", 0); - __Pyx_TraceCall("_optval", __pyx_f[3], 241, 0, __PYX_ERR(3, 241, __pyx_L1_error)); /* "src/lxml/xslt.pxi":243 * cdef _optval(self, xslt.xsltSecurityOption option): @@ -195854,7 +182199,6 @@ static PyObject *__pyx_f_4lxml_5etree_17XSLTAccessControl__optval(struct __pyx_o * if function is xslt.xsltSecurityAllow: * return True */ - __Pyx_TraceLine(243,0,__PYX_ERR(3, 243, __pyx_L1_error)) __pyx_v_function = xsltGetSecurityPrefs(__pyx_v_self->_prefs, __pyx_v_option); /* "src/lxml/xslt.pxi":244 @@ -195864,7 +182208,6 @@ static PyObject *__pyx_f_4lxml_5etree_17XSLTAccessControl__optval(struct __pyx_o * return True * elif function is xslt.xsltSecurityForbid: */ - __Pyx_TraceLine(244,0,__PYX_ERR(3, 244, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_function == ((xsltSecurityCheck)xsltSecurityAllow)) != 0); if (__pyx_t_1) { @@ -195875,7 +182218,6 @@ static PyObject *__pyx_f_4lxml_5etree_17XSLTAccessControl__optval(struct __pyx_o * elif function is xslt.xsltSecurityForbid: * return False */ - __Pyx_TraceLine(245,0,__PYX_ERR(3, 245, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; @@ -195897,7 +182239,6 @@ static PyObject *__pyx_f_4lxml_5etree_17XSLTAccessControl__optval(struct __pyx_o * return False * else: */ - __Pyx_TraceLine(246,0,__PYX_ERR(3, 246, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_function == ((xsltSecurityCheck)xsltSecurityForbid)) != 0); if (__pyx_t_1) { @@ -195908,7 +182249,6 @@ static PyObject *__pyx_f_4lxml_5etree_17XSLTAccessControl__optval(struct __pyx_o * else: * return None */ - __Pyx_TraceLine(247,0,__PYX_ERR(3, 247, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; @@ -195930,7 +182270,6 @@ static PyObject *__pyx_f_4lxml_5etree_17XSLTAccessControl__optval(struct __pyx_o * * def __repr__(self): */ - __Pyx_TraceLine(249,0,__PYX_ERR(3, 249, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -195946,12 +182285,8 @@ static PyObject *__pyx_f_4lxml_5etree_17XSLTAccessControl__optval(struct __pyx_o */ /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.XSLTAccessControl._optval", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -195981,7 +182316,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_6__repr__(struct __py PyObject *__pyx_v_items = NULL; PyObject *__pyx_v_item = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -195993,7 +182327,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_6__repr__(struct __py const char *__pyx_t_8; Py_ssize_t __pyx_t_9; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[3], 251, 0, __PYX_ERR(3, 251, __pyx_L1_error)); /* "src/lxml/xslt.pxi":252 * @@ -196002,7 +182335,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_6__repr__(struct __py * return u"%s(%s)" % ( * python._fqtypename(self).decode('UTF-8').split(u'.')[-1], */ - __Pyx_TraceLine(252,0,__PYX_ERR(3, 252, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_options); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 252, __pyx_L1_error) @@ -196018,12 +182350,9 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_6__repr__(struct __py __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_3) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 252, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 252, __pyx_L1_error) - } + __pyx_t_2 = (__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_2)) __PYX_ERR(3, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 252, __pyx_L1_error) @@ -196042,7 +182371,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_6__repr__(struct __py * python._fqtypename(self).decode('UTF-8').split(u'.')[-1], * u', '.join([u"%s=%r" % item for item in items])) */ - __Pyx_TraceLine(253,0,__PYX_ERR(3, 253, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -196056,11 +182384,10 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_6__repr__(struct __py * u', '.join([u"%s=%r" % item for item in items])) * */ - __Pyx_TraceLine(254,0,__PYX_ERR(3, 254, __pyx_L1_error)) __pyx_t_8 = _fqtypename(((PyObject *)__pyx_v_self)); __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_8, 0, strlen(__pyx_t_8), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = PyUnicode_Split(__pyx_t_4, __pyx_kp_u__11, -1L); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 254, __pyx_L1_error) + __pyx_t_2 = PyUnicode_Split(__pyx_t_4, __pyx_kp_u__3, -1L); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_t_2, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 254, __pyx_L1_error) @@ -196074,10 +182401,10 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_6__repr__(struct __py __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = 0; - __Pyx_INCREF(__pyx_kp_u__348); + __Pyx_INCREF(__pyx_kp_u__78); __pyx_t_6 += 1; - __Pyx_GIVEREF(__pyx_kp_u__348); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u__348); + __Pyx_GIVEREF(__pyx_kp_u__78); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u__78); /* "src/lxml/xslt.pxi":255 * return u"%s(%s)" % ( @@ -196086,7 +182413,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_6__repr__(struct __py * * ################################################################################ */ - __Pyx_TraceLine(255,0,__PYX_ERR(3, 255, __pyx_L1_error)) __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__pyx_v_items == Py_None)) { @@ -196104,13 +182430,13 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_6__repr__(struct __py #endif __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_s_r, __pyx_v_item); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 255, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_s_r, __pyx_v_item); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(3, 255, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__349, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 255, __pyx_L1_error) + __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__79, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_7; @@ -196118,10 +182444,10 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_6__repr__(struct __py __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4); __pyx_t_4 = 0; - __Pyx_INCREF(__pyx_kp_u__252); + __Pyx_INCREF(__pyx_kp_u__55); __pyx_t_6 += 1; - __Pyx_GIVEREF(__pyx_kp_u__252); - PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_kp_u__252); + __Pyx_GIVEREF(__pyx_kp_u__55); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_kp_u__55); /* "src/lxml/xslt.pxi":253 * def __repr__(self): @@ -196130,7 +182456,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_6__repr__(struct __py * python._fqtypename(self).decode('UTF-8').split(u'.')[-1], * u', '.join([u"%s=%r" % item for item in items])) */ - __Pyx_TraceLine(253,0,__PYX_ERR(3, 253, __pyx_L1_error)) __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 4, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -196158,7 +182483,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_6__repr__(struct __py __Pyx_XDECREF(__pyx_v_items); __Pyx_XDECREF(__pyx_v_item); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -196173,12 +182497,10 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_6__repr__(struct __py static int __pyx_f_4lxml_5etree__register_xslt_function(void *__pyx_v_ctxt, PyObject *__pyx_v_name_utf, PyObject *__pyx_v_ns_utf) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_register_xslt_function", 0); - __Pyx_TraceCall("_register_xslt_function", __pyx_f[3], 260, 0, __PYX_ERR(3, 260, __pyx_L1_error)); /* "src/lxml/xslt.pxi":261 * @@ -196187,7 +182509,6 @@ static int __pyx_f_4lxml_5etree__register_xslt_function(void *__pyx_v_ctxt, PyOb * return 0 * # libxml2 internalises the strings if ctxt has a dict */ - __Pyx_TraceLine(261,0,__PYX_ERR(3, 261, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_ns_utf == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -196199,7 +182520,6 @@ static int __pyx_f_4lxml_5etree__register_xslt_function(void *__pyx_v_ctxt, PyOb * # libxml2 internalises the strings if ctxt has a dict * return xslt.xsltRegisterExtFunction( */ - __Pyx_TraceLine(262,0,__PYX_ERR(3, 262, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -196219,7 +182539,6 @@ static int __pyx_f_4lxml_5etree__register_xslt_function(void *__pyx_v_ctxt, PyOb * ctxt, _xcstr(name_utf), _xcstr(ns_utf), * _xpath_function_call) */ - __Pyx_TraceLine(264,0,__PYX_ERR(3, 264, __pyx_L1_error)) __pyx_r = xsltRegisterExtFunction(((xsltTransformContext *)__pyx_v_ctxt), (const xmlChar*)PyBytes_AS_STRING(__pyx_v_name_utf), (const xmlChar*)PyBytes_AS_STRING(__pyx_v_ns_utf), ((xmlXPathFunction)__pyx_f_4lxml_5etree__xpath_function_call)); goto __pyx_L0; @@ -196232,11 +182551,7 @@ static int __pyx_f_4lxml_5etree__register_xslt_function(void *__pyx_v_ctxt, PyOb */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._register_xslt_function", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -196267,10 +182582,8 @@ static int __pyx_pw_4lxml_5etree_12_XSLTContext_1__cinit__(PyObject *__pyx_v_sel static int __pyx_pf_4lxml_5etree_12_XSLTContext___cinit__(struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[3], 276, 0, __PYX_ERR(3, 276, __pyx_L1_error)); /* "src/lxml/xslt.pxi":277 * cdef dict _extension_elements @@ -196279,7 +182592,6 @@ static int __pyx_pf_4lxml_5etree_12_XSLTContext___cinit__(struct __pyx_obj_4lxml * self._extension_elements = EMPTY_DICT * */ - __Pyx_TraceLine(277,0,__PYX_ERR(3, 277, __pyx_L1_error)) __pyx_v_self->_xsltCtxt = NULL; /* "src/lxml/xslt.pxi":278 @@ -196289,7 +182601,6 @@ static int __pyx_pf_4lxml_5etree_12_XSLTContext___cinit__(struct __pyx_obj_4lxml * * def __init__(self, namespaces, extensions, error_log, enable_regexp, */ - __Pyx_TraceLine(278,0,__PYX_ERR(3, 278, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_4lxml_5etree_EMPTY_DICT); __Pyx_GIVEREF(__pyx_v_4lxml_5etree_EMPTY_DICT); __Pyx_GOTREF(__pyx_v_self->_extension_elements); @@ -196306,12 +182617,6 @@ static int __pyx_pf_4lxml_5etree_12_XSLTContext___cinit__(struct __pyx_obj_4lxml /* function exit code */ __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._XSLTContext.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -196424,7 +182729,6 @@ static int __pyx_pf_4lxml_5etree_12_XSLTContext_2__init__(struct __pyx_obj_4lxml PyObject *__pyx_v_ns_utf = NULL; PyObject *__pyx_v_name_utf = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -196439,7 +182743,6 @@ static int __pyx_pf_4lxml_5etree_12_XSLTContext_2__init__(struct __pyx_obj_4lxml PyObject *(*__pyx_t_11)(PyObject *); int __pyx_t_12; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[3], 280, 0, __PYX_ERR(3, 280, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_extensions); /* "src/lxml/xslt.pxi":282 @@ -196449,7 +182752,6 @@ static int __pyx_pf_4lxml_5etree_12_XSLTContext_2__init__(struct __pyx_obj_4lxml * for ns_name_tuple, extension in extensions.items(): * if ns_name_tuple[0] is None: */ - __Pyx_TraceLine(282,0,__PYX_ERR(3, 282, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_extensions != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -196469,7 +182771,6 @@ static int __pyx_pf_4lxml_5etree_12_XSLTContext_2__init__(struct __pyx_obj_4lxml * if ns_name_tuple[0] is None: * raise XSLTExtensionError, \ */ - __Pyx_TraceLine(283,0,__PYX_ERR(3, 283, __pyx_L1_error)) __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_extensions, __pyx_n_s_items); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; @@ -196482,12 +182783,9 @@ static int __pyx_pf_4lxml_5etree_12_XSLTContext_2__init__(struct __pyx_obj_4lxml __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 283, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 283, __pyx_L1_error) - } + __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(3, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { @@ -196588,7 +182886,6 @@ static int __pyx_pf_4lxml_5etree_12_XSLTContext_2__init__(struct __pyx_obj_4lxml * raise XSLTExtensionError, \ * u"extensions must not have empty namespaces" */ - __Pyx_TraceLine(284,0,__PYX_ERR(3, 284, __pyx_L1_error)) __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_ns_name_tuple, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = (__pyx_t_4 == Py_None); @@ -196603,7 +182900,6 @@ static int __pyx_pf_4lxml_5etree_12_XSLTContext_2__init__(struct __pyx_obj_4lxml * u"extensions must not have empty namespaces" * if isinstance(extension, XSLTExtension): */ - __Pyx_TraceLine(285,0,__PYX_ERR(3, 285, __pyx_L1_error)) __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_XSLTExtensionError), __pyx_kp_u_extensions_must_not_have_empty_n, 0, 0); __PYX_ERR(3, 285, __pyx_L1_error) @@ -196623,7 +182919,6 @@ static int __pyx_pf_4lxml_5etree_12_XSLTContext_2__init__(struct __pyx_obj_4lxml * if self._extension_elements is EMPTY_DICT: * self._extension_elements = {} */ - __Pyx_TraceLine(287,0,__PYX_ERR(3, 287, __pyx_L1_error)) __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_extension, __pyx_ptype_4lxml_5etree_XSLTExtension); __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { @@ -196635,7 +182930,6 @@ static int __pyx_pf_4lxml_5etree_12_XSLTContext_2__init__(struct __pyx_obj_4lxml * self._extension_elements = {} * extensions = extensions.copy() */ - __Pyx_TraceLine(288,0,__PYX_ERR(3, 288, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_extension_elements == __pyx_v_4lxml_5etree_EMPTY_DICT); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { @@ -196647,7 +182941,6 @@ static int __pyx_pf_4lxml_5etree_12_XSLTContext_2__init__(struct __pyx_obj_4lxml * extensions = extensions.copy() * ns_utf = _utf8(ns_name_tuple[0]) */ - __Pyx_TraceLine(289,0,__PYX_ERR(3, 289, __pyx_L1_error)) __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); @@ -196663,7 +182956,6 @@ static int __pyx_pf_4lxml_5etree_12_XSLTContext_2__init__(struct __pyx_obj_4lxml * ns_utf = _utf8(ns_name_tuple[0]) * name_utf = _utf8(ns_name_tuple[1]) */ - __Pyx_TraceLine(290,0,__PYX_ERR(3, 290, __pyx_L1_error)) __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_extensions, __pyx_n_s_copy); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = NULL; @@ -196676,12 +182968,9 @@ static int __pyx_pf_4lxml_5etree_12_XSLTContext_2__init__(struct __pyx_obj_4lxml __Pyx_DECREF_SET(__pyx_t_9, function); } } - if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 290, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 290, __pyx_L1_error) - } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF_SET(__pyx_v_extensions, __pyx_t_4); @@ -196703,7 +182992,6 @@ static int __pyx_pf_4lxml_5etree_12_XSLTContext_2__init__(struct __pyx_obj_4lxml * name_utf = _utf8(ns_name_tuple[1]) * self._extension_elements[(ns_utf, name_utf)] = extension */ - __Pyx_TraceLine(291,0,__PYX_ERR(3, 291, __pyx_L1_error)) __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_ns_name_tuple, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = __pyx_f_4lxml_5etree__utf8(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 291, __pyx_L1_error) @@ -196719,7 +183007,6 @@ static int __pyx_pf_4lxml_5etree_12_XSLTContext_2__init__(struct __pyx_obj_4lxml * self._extension_elements[(ns_utf, name_utf)] = extension * del extensions[ns_name_tuple] */ - __Pyx_TraceLine(292,0,__PYX_ERR(3, 292, __pyx_L1_error)) __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_ns_name_tuple, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 292, __pyx_L1_error) @@ -196735,7 +183022,6 @@ static int __pyx_pf_4lxml_5etree_12_XSLTContext_2__init__(struct __pyx_obj_4lxml * del extensions[ns_name_tuple] * _BaseContext.__init__(self, namespaces, extensions, error_log, enable_regexp, */ - __Pyx_TraceLine(293,0,__PYX_ERR(3, 293, __pyx_L1_error)) if (unlikely(__pyx_v_self->_extension_elements == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(3, 293, __pyx_L1_error) @@ -196758,7 +183044,6 @@ static int __pyx_pf_4lxml_5etree_12_XSLTContext_2__init__(struct __pyx_obj_4lxml * _BaseContext.__init__(self, namespaces, extensions, error_log, enable_regexp, * build_smart_strings) */ - __Pyx_TraceLine(294,0,__PYX_ERR(3, 294, __pyx_L1_error)) if (unlikely(PyObject_DelItem(__pyx_v_extensions, __pyx_v_ns_name_tuple) < 0)) __PYX_ERR(3, 294, __pyx_L1_error) /* "src/lxml/xslt.pxi":287 @@ -196777,7 +183062,6 @@ static int __pyx_pf_4lxml_5etree_12_XSLTContext_2__init__(struct __pyx_obj_4lxml * if ns_name_tuple[0] is None: * raise XSLTExtensionError, \ */ - __Pyx_TraceLine(283,0,__PYX_ERR(3, 283, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -196797,7 +183081,6 @@ static int __pyx_pf_4lxml_5etree_12_XSLTContext_2__init__(struct __pyx_obj_4lxml * build_smart_strings) * */ - __Pyx_TraceLine(295,0,__PYX_ERR(3, 295, __pyx_L1_error)) __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree__BaseContext), __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -196808,7 +183091,6 @@ static int __pyx_pf_4lxml_5etree_12_XSLTContext_2__init__(struct __pyx_obj_4lxml * * cdef _BaseContext _copy(self): */ - __Pyx_TraceLine(296,0,__PYX_ERR(3, 296, __pyx_L1_error)) __pyx_t_9 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -196893,7 +183175,6 @@ static int __pyx_pf_4lxml_5etree_12_XSLTContext_2__init__(struct __pyx_obj_4lxml __Pyx_XDECREF(__pyx_v_ns_utf); __Pyx_XDECREF(__pyx_v_name_utf); __Pyx_XDECREF(__pyx_v_extensions); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -196909,12 +183190,10 @@ static int __pyx_pf_4lxml_5etree_12_XSLTContext_2__init__(struct __pyx_obj_4lxml static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_XSLTContext__copy(struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_self) { struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_context = 0; struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_copy", 0); - __Pyx_TraceCall("_copy", __pyx_f[3], 298, 0, __PYX_ERR(3, 298, __pyx_L1_error)); /* "src/lxml/xslt.pxi":300 * cdef _BaseContext _copy(self): @@ -196923,7 +183202,6 @@ static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_XSLTC * context._extension_elements = self._extension_elements * return context */ - __Pyx_TraceLine(300,0,__PYX_ERR(3, 300, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_12_BaseContext__copy(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; @@ -196939,7 +183217,6 @@ static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_XSLTC * return context * */ - __Pyx_TraceLine(301,0,__PYX_ERR(3, 301, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_extension_elements; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -196955,7 +183232,6 @@ static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_XSLTC * * cdef register_context(self, xslt.xsltTransformContext* xsltCtxt, */ - __Pyx_TraceLine(302,0,__PYX_ERR(3, 302, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_context)); __pyx_r = ((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_context); @@ -196978,7 +183254,6 @@ static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_XSLTC __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -196993,12 +183268,10 @@ static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_XSLTC static PyObject *__pyx_f_4lxml_5etree_12_XSLTContext_register_context(struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_self, xsltTransformContext *__pyx_v_xsltCtxt, struct LxmlDocument *__pyx_v_doc) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("register_context", 0); - __Pyx_TraceCall("register_context", __pyx_f[3], 304, 0, __PYX_ERR(3, 304, __pyx_L1_error)); /* "src/lxml/xslt.pxi":306 * cdef register_context(self, xslt.xsltTransformContext* xsltCtxt, @@ -197007,7 +183280,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_XSLTContext_register_context(struct __p * self._set_xpath_context(xsltCtxt.xpathCtxt) * self._register_context(doc) */ - __Pyx_TraceLine(306,0,__PYX_ERR(3, 306, __pyx_L1_error)) __pyx_v_self->_xsltCtxt = __pyx_v_xsltCtxt; /* "src/lxml/xslt.pxi":307 @@ -197017,7 +183289,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_XSLTContext_register_context(struct __p * self._register_context(doc) * self.registerLocalFunctions(xsltCtxt, _register_xslt_function) */ - __Pyx_TraceLine(307,0,__PYX_ERR(3, 307, __pyx_L1_error)) ((struct __pyx_vtabstruct_4lxml_5etree__XSLTContext *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._set_xpath_context(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self), __pyx_v_xsltCtxt->xpathCtxt); /* "src/lxml/xslt.pxi":308 @@ -197027,7 +183298,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_XSLTContext_register_context(struct __p * self.registerLocalFunctions(xsltCtxt, _register_xslt_function) * self.registerGlobalFunctions(xsltCtxt, _register_xslt_function) */ - __Pyx_TraceLine(308,0,__PYX_ERR(3, 308, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_12_BaseContext__register_context(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self), __pyx_v_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -197039,7 +183309,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_XSLTContext_register_context(struct __p * self.registerGlobalFunctions(xsltCtxt, _register_xslt_function) * _registerXSLTExtensions(xsltCtxt, self._extension_elements) */ - __Pyx_TraceLine(309,0,__PYX_ERR(3, 309, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__XSLTContext *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.registerLocalFunctions(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self), __pyx_v_xsltCtxt, __pyx_f_4lxml_5etree__register_xslt_function); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -197051,7 +183320,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_XSLTContext_register_context(struct __p * _registerXSLTExtensions(xsltCtxt, self._extension_elements) * */ - __Pyx_TraceLine(310,0,__PYX_ERR(3, 310, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__XSLTContext *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.registerGlobalFunctions(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self), __pyx_v_xsltCtxt, __pyx_f_4lxml_5etree__register_xslt_function); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -197063,7 +183331,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_XSLTContext_register_context(struct __p * * cdef free_context(self): */ - __Pyx_TraceLine(311,0,__PYX_ERR(3, 311, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->_extension_elements; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_4lxml_5etree__registerXSLTExtensions(__pyx_v_xsltCtxt, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 311, __pyx_L1_error) @@ -197089,7 +183356,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_XSLTContext_register_context(struct __p __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -197104,12 +183370,10 @@ static PyObject *__pyx_f_4lxml_5etree_12_XSLTContext_register_context(struct __p static PyObject *__pyx_f_4lxml_5etree_12_XSLTContext_free_context(struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("free_context", 0); - __Pyx_TraceCall("free_context", __pyx_f[3], 313, 0, __PYX_ERR(3, 313, __pyx_L1_error)); /* "src/lxml/xslt.pxi":314 * @@ -197118,7 +183382,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_XSLTContext_free_context(struct __pyx_o * self._release_context() * if self._xsltCtxt is not NULL: */ - __Pyx_TraceLine(314,0,__PYX_ERR(3, 314, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_12_BaseContext__cleanup_context(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -197130,7 +183393,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_XSLTContext_free_context(struct __pyx_o * if self._xsltCtxt is not NULL: * xslt.xsltFreeTransformContext(self._xsltCtxt) */ - __Pyx_TraceLine(315,0,__PYX_ERR(3, 315, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_12_BaseContext__release_context(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -197142,7 +183404,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_XSLTContext_free_context(struct __pyx_o * xslt.xsltFreeTransformContext(self._xsltCtxt) * self._xsltCtxt = NULL */ - __Pyx_TraceLine(316,0,__PYX_ERR(3, 316, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->_xsltCtxt != NULL) != 0); if (__pyx_t_2) { @@ -197153,7 +183414,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_XSLTContext_free_context(struct __pyx_o * self._xsltCtxt = NULL * self._release_temp_refs() */ - __Pyx_TraceLine(317,0,__PYX_ERR(3, 317, __pyx_L1_error)) xsltFreeTransformContext(__pyx_v_self->_xsltCtxt); /* "src/lxml/xslt.pxi":318 @@ -197163,7 +183423,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_XSLTContext_free_context(struct __pyx_o * self._release_temp_refs() * */ - __Pyx_TraceLine(318,0,__PYX_ERR(3, 318, __pyx_L1_error)) __pyx_v_self->_xsltCtxt = NULL; /* "src/lxml/xslt.pxi":316 @@ -197182,7 +183441,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_XSLTContext_free_context(struct __pyx_o * * */ - __Pyx_TraceLine(319,0,__PYX_ERR(3, 319, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_12_BaseContext__release_temp_refs(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -197204,7 +183462,6 @@ static PyObject *__pyx_f_4lxml_5etree_12_XSLTContext_free_context(struct __pyx_o __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -197269,11 +183526,9 @@ static int __pyx_pw_4lxml_5etree_22_XSLTQuotedStringParam_1__cinit__(PyObject *_ static int __pyx_pf_4lxml_5etree_22_XSLTQuotedStringParam___cinit__(struct __pyx_obj_4lxml_5etree__XSLTQuotedStringParam *__pyx_v_self, PyObject *__pyx_v_strval) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[3], 330, 0, __PYX_ERR(3, 330, __pyx_L1_error)); /* "src/lxml/xslt.pxi":331 * cdef bytes strval @@ -197282,7 +183537,6 @@ static int __pyx_pf_4lxml_5etree_22_XSLTQuotedStringParam___cinit__(struct __pyx * * */ - __Pyx_TraceLine(331,0,__PYX_ERR(3, 331, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_strval); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -197307,7 +183561,6 @@ static int __pyx_pf_4lxml_5etree_22_XSLTQuotedStringParam___cinit__(struct __pyx __Pyx_AddTraceback("lxml.etree._XSLTQuotedStringParam.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -197338,10 +183591,8 @@ static int __pyx_pw_4lxml_5etree_4XSLT_1__cinit__(PyObject *__pyx_v_self, PyObje static int __pyx_pf_4lxml_5etree_4XSLT___cinit__(struct __pyx_obj_4lxml_5etree_XSLT *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[3], 367, 0, __PYX_ERR(3, 367, __pyx_L1_error)); /* "src/lxml/xslt.pxi":368 * @@ -197350,7 +183601,6 @@ static int __pyx_pf_4lxml_5etree_4XSLT___cinit__(struct __pyx_obj_4lxml_5etree_X * * def __init__(self, xslt_input, *, extensions=None, regexp=True, */ - __Pyx_TraceLine(368,0,__PYX_ERR(3, 368, __pyx_L1_error)) __pyx_v_self->_c_style = NULL; /* "src/lxml/xslt.pxi":367 @@ -197363,12 +183613,6 @@ static int __pyx_pf_4lxml_5etree_4XSLT___cinit__(struct __pyx_obj_4lxml_5etree_X /* function exit code */ __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.XSLT.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -197470,7 +183714,6 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X struct LxmlElement *__pyx_v_root_node = 0; PyObject *__pyx_v_doc_url_utf = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; xmlDoc *__pyx_t_2; @@ -197484,12 +183727,9 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; - PyObject *__pyx_t_13 = NULL; - PyObject *__pyx_t_14 = NULL; - int __pyx_t_15; - int __pyx_t_16; + int __pyx_t_13; + int __pyx_t_14; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[3], 370, 0, __PYX_ERR(3, 370, __pyx_L1_error)); /* "src/lxml/xslt.pxi":372 * def __init__(self, xslt_input, *, extensions=None, regexp=True, @@ -197498,7 +183738,6 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * cdef xmlDoc* c_doc * cdef _Document doc */ - __Pyx_TraceLine(372,0,__PYX_ERR(3, 372, __pyx_L1_error)) __pyx_v_c_style = NULL; /* "src/lxml/xslt.pxi":377 @@ -197508,7 +183747,6 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * root_node = _rootNodeOrRaise(xslt_input) * */ - __Pyx_TraceLine(377,0,__PYX_ERR(3, 377, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__documentOrRaise(__pyx_v_xslt_input)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_1); @@ -197521,7 +183759,6 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * * # set access control or raise TypeError */ - __Pyx_TraceLine(378,0,__PYX_ERR(3, 378, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__rootNodeOrRaise(__pyx_v_xslt_input)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_root_node = ((struct LxmlElement *)__pyx_t_1); @@ -197534,7 +183771,6 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * * # make a copy of the document as stylesheet parsing modifies it */ - __Pyx_TraceLine(381,0,__PYX_ERR(3, 381, __pyx_L1_error)) if (!(likely(((__pyx_v_access_control) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_access_control, __pyx_ptype_4lxml_5etree_XSLTAccessControl))))) __PYX_ERR(3, 381, __pyx_L1_error) __pyx_t_1 = __pyx_v_access_control; __Pyx_INCREF(__pyx_t_1); @@ -197551,7 +183787,6 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * * # make sure we always have a stylesheet URL */ - __Pyx_TraceLine(384,0,__PYX_ERR(3, 384, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__copyDocRoot(__pyx_v_doc->_c_doc, __pyx_v_root_node->_c_node); if (unlikely(__pyx_t_2 == ((xmlDoc *)NULL))) __PYX_ERR(3, 384, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_2; @@ -197562,7 +183797,6 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * doc_url_utf = python.PyUnicode_AsASCIIString( * f"string://__STRING__XSLT__/{id(self)}.xslt") */ - __Pyx_TraceLine(387,0,__PYX_ERR(3, 387, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_doc->URL == NULL) != 0); if (__pyx_t_3) { @@ -197573,7 +183807,6 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * c_doc.URL = tree.xmlStrdup(_xcstr(doc_url_utf)) * */ - __Pyx_TraceLine(389,0,__PYX_ERR(3, 389, __pyx_L1_error)) __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = 0; @@ -197607,7 +183840,6 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * f"string://__STRING__XSLT__/{id(self)}.xslt") * c_doc.URL = tree.xmlStrdup(_xcstr(doc_url_utf)) */ - __Pyx_TraceLine(388,0,__PYX_ERR(3, 388, __pyx_L1_error)) __pyx_t_1 = PyUnicode_AsASCIIString(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -197621,7 +183853,6 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * * self._error_log = _ErrorLog() */ - __Pyx_TraceLine(390,0,__PYX_ERR(3, 390, __pyx_L1_error)) __pyx_v_c_doc->URL = xmlStrdup((const xmlChar*)PyBytes_AS_STRING(__pyx_v_doc_url_utf)); /* "src/lxml/xslt.pxi":387 @@ -197640,7 +183871,6 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * self._xslt_resolver_context = _XSLTResolverContext() * _initXSLTResolverContext(self._xslt_resolver_context, doc._parser) */ - __Pyx_TraceLine(392,0,__PYX_ERR(3, 392, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__ErrorLog)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -197656,7 +183886,6 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * _initXSLTResolverContext(self._xslt_resolver_context, doc._parser) * # keep a copy in case we need to access the stylesheet via 'document()' */ - __Pyx_TraceLine(393,0,__PYX_ERR(3, 393, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__XSLTResolverContext)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -197672,7 +183901,6 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * # keep a copy in case we need to access the stylesheet via 'document()' * self._xslt_resolver_context._c_style_doc = _copyDoc(c_doc, 1) */ - __Pyx_TraceLine(394,0,__PYX_ERR(3, 394, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_v_self->_xslt_resolver_context); __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = ((PyObject *)__pyx_v_doc->_parser); @@ -197690,7 +183918,6 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * c_doc._private = self._xslt_resolver_context * */ - __Pyx_TraceLine(396,0,__PYX_ERR(3, 396, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__copyDoc(__pyx_v_c_doc, 1); if (unlikely(__pyx_t_2 == ((xmlDoc *)NULL))) __PYX_ERR(3, 396, __pyx_L1_error) __pyx_v_self->_xslt_resolver_context->_c_style_doc = __pyx_t_2; @@ -197701,7 +183928,6 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * * with self._error_log: */ - __Pyx_TraceLine(397,0,__PYX_ERR(3, 397, __pyx_L1_error)) __pyx_v_c_doc->_private = ((PyObject *)__pyx_v_self->_xslt_resolver_context); /* "src/lxml/xslt.pxi":399 @@ -197711,19 +183937,13 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * c_style = xslt.xsltParseStylesheetDoc(c_doc) * */ - __Pyx_TraceLine(399,0,__PYX_ERR(3, 399, __pyx_L1_error)) /*with:*/ { __pyx_t_8 = __Pyx_PyObject_LookupSpecial(((PyObject *)__pyx_v_self->_error_log), __pyx_n_s_exit); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __pyx_f_4lxml_5etree_9_ErrorLog___enter__(__pyx_v_self->_error_log); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 399, __pyx_L4_error) /*try:*/ { { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_12); + (void)__pyx_t_10; (void)__pyx_t_11; (void)__pyx_t_12; /* mark used */ /*try:*/ { /* "src/lxml/xslt.pxi":400 @@ -197733,7 +183953,6 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * * if c_style is NULL or c_style.errors: */ - __Pyx_TraceLine(400,0,__PYX_ERR(3, 400, __pyx_L8_error)) __pyx_v_c_style = xsltParseStylesheetDoc(__pyx_v_c_doc); /* "src/lxml/xslt.pxi":399 @@ -197744,62 +183963,12 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * */ } - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - goto __pyx_L13_try_end; - __pyx_L8_error:; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /*except:*/ { - __Pyx_AddTraceback("lxml.etree.XSLT.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_1) < 0) __PYX_ERR(3, 399, __pyx_L10_except_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_13 = PyTuple_Pack(3, __pyx_t_6, __pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 399, __pyx_L10_except_error) - __Pyx_GOTREF(__pyx_t_13); - __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_13, NULL); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 399, __pyx_L10_except_error) - __Pyx_GOTREF(__pyx_t_14); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_14); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - if (__pyx_t_3 < 0) __PYX_ERR(3, 399, __pyx_L10_except_error) - __pyx_t_15 = ((!(__pyx_t_3 != 0)) != 0); - if (__pyx_t_15) { - __Pyx_GIVEREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_7); - __Pyx_XGIVEREF(__pyx_t_1); - __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_7, __pyx_t_1); - __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_1 = 0; - __PYX_ERR(3, 399, __pyx_L10_except_error) - } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L9_exception_handled; - } - __pyx_L10_except_error:; - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); - goto __pyx_L1_error; - __pyx_L9_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); - __pyx_L13_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_8) { - __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__350, NULL); + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__56, NULL); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); @@ -197809,11 +183978,11 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X } __pyx_L7:; } - goto __pyx_L17; + goto __pyx_L14; __pyx_L4_error:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L1_error; - __pyx_L17:; + __pyx_L14:; } /* "src/lxml/xslt.pxi":402 @@ -197823,17 +183992,16 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * tree.xmlFreeDoc(c_doc) * if c_style is not NULL: */ - __Pyx_TraceLine(402,0,__PYX_ERR(3, 402, __pyx_L1_error)) - __pyx_t_3 = ((__pyx_v_c_style == NULL) != 0); - if (!__pyx_t_3) { + __pyx_t_13 = ((__pyx_v_c_style == NULL) != 0); + if (!__pyx_t_13) { } else { - __pyx_t_15 = __pyx_t_3; - goto __pyx_L19_bool_binop_done; + __pyx_t_3 = __pyx_t_13; + goto __pyx_L16_bool_binop_done; } - __pyx_t_3 = (__pyx_v_c_style->errors != 0); - __pyx_t_15 = __pyx_t_3; - __pyx_L19_bool_binop_done:; - if (__pyx_t_15) { + __pyx_t_13 = (__pyx_v_c_style->errors != 0); + __pyx_t_3 = __pyx_t_13; + __pyx_L16_bool_binop_done:; + if (__pyx_t_3) { /* "src/lxml/xslt.pxi":403 * @@ -197842,7 +184010,6 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * if c_style is not NULL: * xslt.xsltFreeStylesheet(c_style) */ - __Pyx_TraceLine(403,0,__PYX_ERR(3, 403, __pyx_L1_error)) xmlFreeDoc(__pyx_v_c_doc); /* "src/lxml/xslt.pxi":404 @@ -197852,9 +184019,8 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * xslt.xsltFreeStylesheet(c_style) * self._xslt_resolver_context._raise_if_stored() */ - __Pyx_TraceLine(404,0,__PYX_ERR(3, 404, __pyx_L1_error)) - __pyx_t_15 = ((__pyx_v_c_style != NULL) != 0); - if (__pyx_t_15) { + __pyx_t_3 = ((__pyx_v_c_style != NULL) != 0); + if (__pyx_t_3) { /* "src/lxml/xslt.pxi":405 * tree.xmlFreeDoc(c_doc) @@ -197863,7 +184029,6 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * self._xslt_resolver_context._raise_if_stored() * # last error seems to be the most accurate here */ - __Pyx_TraceLine(405,0,__PYX_ERR(3, 405, __pyx_L1_error)) xsltFreeStylesheet(__pyx_v_c_style); /* "src/lxml/xslt.pxi":404 @@ -197882,7 +184047,6 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * # last error seems to be the most accurate here * if self._error_log.last_error is not None and \ */ - __Pyx_TraceLine(406,0,__PYX_ERR(3, 406, __pyx_L1_error)) __pyx_t_9 = ((struct __pyx_vtabstruct_4lxml_5etree__XSLTResolverContext *)__pyx_v_self->_xslt_resolver_context->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._raise_if_stored(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_v_self->_xslt_resolver_context)); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 406, __pyx_L1_error) /* "src/lxml/xslt.pxi":408 @@ -197892,13 +184056,12 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * self._error_log.last_error.message: * raise XSLTParseError(self._error_log.last_error.message, */ - __Pyx_TraceLine(408,0,__PYX_ERR(3, 408, __pyx_L1_error)) - __pyx_t_3 = (__pyx_v_self->_error_log->__pyx_base.__pyx_base.last_error != Py_None); - __pyx_t_16 = (__pyx_t_3 != 0); - if (__pyx_t_16) { + __pyx_t_13 = (__pyx_v_self->_error_log->__pyx_base.__pyx_base.last_error != Py_None); + __pyx_t_14 = (__pyx_t_13 != 0); + if (__pyx_t_14) { } else { - __pyx_t_15 = __pyx_t_16; - goto __pyx_L23_bool_binop_done; + __pyx_t_3 = __pyx_t_14; + goto __pyx_L20_bool_binop_done; } /* "src/lxml/xslt.pxi":409 @@ -197908,13 +184071,12 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * raise XSLTParseError(self._error_log.last_error.message, * self._error_log) */ - __Pyx_TraceLine(409,0,__PYX_ERR(3, 409, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_error_log->__pyx_base.__pyx_base.last_error, __pyx_n_s_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 409, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(3, 409, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_15 = __pyx_t_16; - __pyx_L23_bool_binop_done:; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_error_log->__pyx_base.__pyx_base.last_error, __pyx_n_s_message); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 409, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(3, 409, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_3 = __pyx_t_14; + __pyx_L20_bool_binop_done:; /* "src/lxml/xslt.pxi":408 * self._xslt_resolver_context._raise_if_stored() @@ -197923,8 +184085,7 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * self._error_log.last_error.message: * raise XSLTParseError(self._error_log.last_error.message, */ - __Pyx_TraceLine(408,0,__PYX_ERR(3, 408, __pyx_L1_error)) - if (unlikely(__pyx_t_15)) { + if (unlikely(__pyx_t_3)) { /* "src/lxml/xslt.pxi":410 * if self._error_log.last_error is not None and \ @@ -197933,9 +184094,8 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * self._error_log) * else: */ - __Pyx_TraceLine(410,0,__PYX_ERR(3, 410, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_error_log->__pyx_base.__pyx_base.last_error, __pyx_n_s_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 410, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_error_log->__pyx_base.__pyx_base.last_error, __pyx_n_s_message); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 410, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); /* "src/lxml/xslt.pxi":411 * self._error_log.last_error.message: @@ -197944,15 +184104,14 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * else: * raise XSLTParseError( */ - __Pyx_TraceLine(411,0,__PYX_ERR(3, 411, __pyx_L1_error)) __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_self->_error_log)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_error_log)); PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_self->_error_log)); - __pyx_t_1 = 0; + __pyx_t_6 = 0; /* "src/lxml/xslt.pxi":410 * if self._error_log.last_error is not None and \ @@ -197961,12 +184120,11 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * self._error_log) * else: */ - __Pyx_TraceLine(410,0,__PYX_ERR(3, 410, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_XSLTParseError), __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 410, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_XSLTParseError), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 410, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_Raise(__pyx_t_1, 0, 0, 0); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(3, 410, __pyx_L1_error) /* "src/lxml/xslt.pxi":408 @@ -197985,7 +184143,6 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * self._error_log._buildExceptionMessage( * u"Cannot parse stylesheet"), */ - __Pyx_TraceLine(413,0,__PYX_ERR(3, 413, __pyx_L1_error)) /*else*/ { /* "src/lxml/xslt.pxi":414 @@ -197995,9 +184152,8 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * u"Cannot parse stylesheet"), * self._error_log) */ - __Pyx_TraceLine(414,0,__PYX_ERR(3, 414, __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_Cannot_parse_stylesheet); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 414, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_self->_error_log), __pyx_kp_u_Cannot_parse_stylesheet); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 414, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); /* "src/lxml/xslt.pxi":413 * self._error_log) @@ -198006,20 +184162,19 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * self._error_log._buildExceptionMessage( * u"Cannot parse stylesheet"), */ - __Pyx_TraceLine(413,0,__PYX_ERR(3, 413, __pyx_L1_error)) __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_self->_error_log)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_error_log)); PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_self->_error_log)); - __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_XSLTParseError), __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 413, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_XSLTParseError), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 413, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_Raise(__pyx_t_1, 0, 0, 0); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(3, 413, __pyx_L1_error) } @@ -198039,7 +184194,6 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * self._c_style = c_style * self._context = _XSLTContext(None, extensions, self._error_log, regexp, True) */ - __Pyx_TraceLine(418,0,__PYX_ERR(3, 418, __pyx_L1_error)) __pyx_v_c_doc->_private = NULL; /* "src/lxml/xslt.pxi":419 @@ -198049,7 +184203,6 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * self._context = _XSLTContext(None, extensions, self._error_log, regexp, True) * */ - __Pyx_TraceLine(419,0,__PYX_ERR(3, 419, __pyx_L1_error)) __pyx_v_self->_c_style = __pyx_v_c_style; /* "src/lxml/xslt.pxi":420 @@ -198059,27 +184212,26 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X * * def __dealloc__(self): */ - __Pyx_TraceLine(420,0,__PYX_ERR(3, 420, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 420, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 420, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - PyTuple_SET_ITEM(__pyx_t_1, 0, Py_None); + PyTuple_SET_ITEM(__pyx_t_6, 0, Py_None); __Pyx_INCREF(__pyx_v_extensions); __Pyx_GIVEREF(__pyx_v_extensions); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_extensions); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_extensions); __Pyx_INCREF(((PyObject *)__pyx_v_self->_error_log)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_error_log)); - PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_self->_error_log)); + PyTuple_SET_ITEM(__pyx_t_6, 2, ((PyObject *)__pyx_v_self->_error_log)); __Pyx_INCREF(__pyx_v_regexp); __Pyx_GIVEREF(__pyx_v_regexp); - PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_regexp); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_regexp); __Pyx_INCREF(Py_True); __Pyx_GIVEREF(Py_True); - PyTuple_SET_ITEM(__pyx_t_1, 4, Py_True); - __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__XSLTContext), __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 420, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_6, 4, Py_True); + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__XSLTContext), __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GIVEREF(__pyx_t_7); __Pyx_GOTREF(__pyx_v_self->_context); __Pyx_DECREF(((PyObject *)__pyx_v_self->_context)); @@ -198101,14 +184253,12 @@ static int __pyx_pf_4lxml_5etree_4XSLT_2__init__(struct __pyx_obj_4lxml_5etree_X __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("lxml.etree.XSLT.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XDECREF((PyObject *)__pyx_v_root_node); __Pyx_XDECREF(__pyx_v_doc_url_utf); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -198133,13 +184283,11 @@ static void __pyx_pw_4lxml_5etree_4XSLT_5__dealloc__(PyObject *__pyx_v_self) { } static void __pyx_pf_4lxml_5etree_4XSLT_4__dealloc__(struct __pyx_obj_4lxml_5etree_XSLT *__pyx_v_self) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("__dealloc__", 0); - __Pyx_TraceCall("__dealloc__", __pyx_f[3], 422, 0, __PYX_ERR(3, 422, __pyx_L1_error)); /* "src/lxml/xslt.pxi":423 * @@ -198148,7 +184296,6 @@ static void __pyx_pf_4lxml_5etree_4XSLT_4__dealloc__(struct __pyx_obj_4lxml_5etr * self._xslt_resolver_context._c_style_doc is not NULL: * tree.xmlFreeDoc(self._xslt_resolver_context._c_style_doc) */ - __Pyx_TraceLine(423,0,__PYX_ERR(3, 423, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)__pyx_v_self->_xslt_resolver_context) != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -198164,7 +184311,6 @@ static void __pyx_pf_4lxml_5etree_4XSLT_4__dealloc__(struct __pyx_obj_4lxml_5etr * tree.xmlFreeDoc(self._xslt_resolver_context._c_style_doc) * # this cleans up the doc copy as well */ - __Pyx_TraceLine(424,0,__PYX_ERR(3, 424, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_self->_xslt_resolver_context->_c_style_doc != NULL) != 0); __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; @@ -198176,7 +184322,6 @@ static void __pyx_pf_4lxml_5etree_4XSLT_4__dealloc__(struct __pyx_obj_4lxml_5etr * self._xslt_resolver_context._c_style_doc is not NULL: * tree.xmlFreeDoc(self._xslt_resolver_context._c_style_doc) */ - __Pyx_TraceLine(423,0,__PYX_ERR(3, 423, __pyx_L1_error)) if (__pyx_t_1) { /* "src/lxml/xslt.pxi":425 @@ -198186,7 +184331,6 @@ static void __pyx_pf_4lxml_5etree_4XSLT_4__dealloc__(struct __pyx_obj_4lxml_5etr * # this cleans up the doc copy as well * if self._c_style is not NULL: */ - __Pyx_TraceLine(425,0,__PYX_ERR(3, 425, __pyx_L1_error)) xmlFreeDoc(__pyx_v_self->_xslt_resolver_context->_c_style_doc); /* "src/lxml/xslt.pxi":423 @@ -198205,7 +184349,6 @@ static void __pyx_pf_4lxml_5etree_4XSLT_4__dealloc__(struct __pyx_obj_4lxml_5etr * xslt.xsltFreeStylesheet(self._c_style) * */ - __Pyx_TraceLine(427,0,__PYX_ERR(3, 427, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_c_style != NULL) != 0); if (__pyx_t_1) { @@ -198216,7 +184359,6 @@ static void __pyx_pf_4lxml_5etree_4XSLT_4__dealloc__(struct __pyx_obj_4lxml_5etr * * property error_log: */ - __Pyx_TraceLine(428,0,__PYX_ERR(3, 428, __pyx_L1_error)) xsltFreeStylesheet(__pyx_v_self->_c_style); /* "src/lxml/xslt.pxi":427 @@ -198237,11 +184379,6 @@ static void __pyx_pf_4lxml_5etree_4XSLT_4__dealloc__(struct __pyx_obj_4lxml_5etr */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.XSLT.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -198268,11 +184405,9 @@ static PyObject *__pyx_pw_4lxml_5etree_4XSLT_9error_log_1__get__(PyObject *__pyx static PyObject *__pyx_pf_4lxml_5etree_4XSLT_9error_log___get__(struct __pyx_obj_4lxml_5etree_XSLT *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[3], 432, 0, __PYX_ERR(3, 432, __pyx_L1_error)); /* "src/lxml/xslt.pxi":433 * u"The log of errors and warnings of an XSLT execution." @@ -198281,7 +184416,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_9error_log___get__(struct __pyx_obj * * @staticmethod */ - __Pyx_TraceLine(433,0,__PYX_ERR(3, 433, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((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_1)) __PYX_ERR(3, 433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -198304,7 +184438,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_9error_log___get__(struct __pyx_obj __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -198320,7 +184453,7 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_9error_log___get__(struct __pyx_obj /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_4XSLT_7strparam(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_4XSLT_6strparam[] = "strparam(strval)\n\n Mark an XSLT string parameter that requires quote escaping\n before passing it into the transformation. Use it like this::\n\n result = transform(doc, some_strval = XSLT.strparam(\n '''it's \"Monty Python's\" ...'''))\n\n Escaped string parameters can be reused without restriction.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_4XSLT_7strparam = {"strparam", (PyCFunction)__pyx_pw_4lxml_5etree_4XSLT_7strparam, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_4XSLT_6strparam}; +static PyMethodDef __pyx_mdef_4lxml_5etree_4XSLT_7strparam = {"strparam", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_4XSLT_7strparam, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_4XSLT_6strparam}; static PyObject *__pyx_pw_4lxml_5etree_4XSLT_7strparam(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_strval = 0; PyObject *__pyx_r = 0; @@ -198371,12 +184504,9 @@ static PyObject *__pyx_pw_4lxml_5etree_4XSLT_7strparam(CYTHON_UNUSED PyObject *_ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_6strparam(PyObject *__pyx_v_strval) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__351) __Pyx_RefNannySetupContext("strparam", 0); - __Pyx_TraceCall("strparam", __pyx_f[3], 436, 0, __PYX_ERR(3, 436, __pyx_L1_error)); /* "src/lxml/xslt.pxi":447 * Escaped string parameters can be reused without restriction. @@ -198385,7 +184515,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_6strparam(PyObject *__pyx_v_strval) * * @staticmethod */ - __Pyx_TraceLine(447,0,__PYX_ERR(3, 447, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree__XSLTQuotedStringParam), __pyx_v_strval); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -198408,7 +184537,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_6strparam(PyObject *__pyx_v_strval) __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -198424,7 +184552,7 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_6strparam(PyObject *__pyx_v_strval) /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_4XSLT_9set_global_max_depth(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_4XSLT_8set_global_max_depth[] = "set_global_max_depth(max_depth)\n\n The maximum traversal depth that the stylesheet engine will allow.\n This does not only count the template recursion depth but also takes\n the number of variables/parameters into account. The required setting\n for a run depends on both the stylesheet and the input data.\n\n Example::\n\n XSLT.set_global_max_depth(5000)\n\n Note that this is currently a global, module-wide setting because\n libxslt does not support it at a per-stylesheet level.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_4XSLT_9set_global_max_depth = {"set_global_max_depth", (PyCFunction)__pyx_pw_4lxml_5etree_4XSLT_9set_global_max_depth, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_4XSLT_8set_global_max_depth}; +static PyMethodDef __pyx_mdef_4lxml_5etree_4XSLT_9set_global_max_depth = {"set_global_max_depth", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_4XSLT_9set_global_max_depth, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_4XSLT_8set_global_max_depth}; static PyObject *__pyx_pw_4lxml_5etree_4XSLT_9set_global_max_depth(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_max_depth; PyObject *__pyx_r = 0; @@ -198475,13 +184603,10 @@ static PyObject *__pyx_pw_4lxml_5etree_4XSLT_9set_global_max_depth(CYTHON_UNUSED static PyObject *__pyx_pf_4lxml_5etree_4XSLT_8set_global_max_depth(int __pyx_v_max_depth) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__352) __Pyx_RefNannySetupContext("set_global_max_depth", 0); - __Pyx_TraceCall("set_global_max_depth", __pyx_f[3], 450, 0, __PYX_ERR(3, 450, __pyx_L1_error)); /* "src/lxml/xslt.pxi":465 * libxslt does not support it at a per-stylesheet level. @@ -198490,7 +184615,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_8set_global_max_depth(int __pyx_v_m * raise ValueError("cannot set a maximum stylesheet traversal depth < 0") * xslt.xsltMaxDepth = max_depth */ - __Pyx_TraceLine(465,0,__PYX_ERR(3, 465, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_max_depth < 0) != 0); if (unlikely(__pyx_t_1)) { @@ -198501,8 +184625,7 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_8set_global_max_depth(int __pyx_v_m * xslt.xsltMaxDepth = max_depth * */ - __Pyx_TraceLine(466,0,__PYX_ERR(3, 466, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__353, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 466, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__80, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 466, __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; @@ -198524,7 +184647,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_8set_global_max_depth(int __pyx_v_m * * def apply(self, _input, *, profile_run=False, **kw): */ - __Pyx_TraceLine(467,0,__PYX_ERR(3, 467, __pyx_L1_error)) xsltMaxDepth = __pyx_v_max_depth; /* "src/lxml/xslt.pxi":450 @@ -198544,7 +184666,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_8set_global_max_depth(int __pyx_v_m __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -198560,7 +184681,7 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_8set_global_max_depth(int __pyx_v_m /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_4XSLT_11apply(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_4XSLT_10apply[] = "apply(self, _input, profile_run=False, **kw)\n \n :deprecated: call the object, not this method."; -static PyMethodDef __pyx_mdef_4lxml_5etree_4XSLT_11apply = {"apply", (PyCFunction)__pyx_pw_4lxml_5etree_4XSLT_11apply, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_4XSLT_10apply}; +static PyMethodDef __pyx_mdef_4lxml_5etree_4XSLT_11apply = {"apply", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_4XSLT_11apply, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_4XSLT_10apply}; static PyObject *__pyx_pw_4lxml_5etree_4XSLT_11apply(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v__input = 0; PyObject *__pyx_v_profile_run = 0; @@ -198624,14 +184745,11 @@ static PyObject *__pyx_pw_4lxml_5etree_4XSLT_11apply(PyObject *__pyx_v_self, PyO static PyObject *__pyx_pf_4lxml_5etree_4XSLT_10apply(struct __pyx_obj_4lxml_5etree_XSLT *__pyx_v_self, PyObject *__pyx_v__input, PyObject *__pyx_v_profile_run, PyObject *__pyx_v_kw) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__354) __Pyx_RefNannySetupContext("apply", 0); - __Pyx_TraceCall("apply", __pyx_f[3], 469, 0, __PYX_ERR(3, 469, __pyx_L1_error)); /* "src/lxml/xslt.pxi":473 * @@ -198640,7 +184758,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_10apply(struct __pyx_obj_4lxml_5etr * * def tostring(self, _ElementTree result_tree): */ - __Pyx_TraceLine(473,0,__PYX_ERR(3, 473, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -198678,7 +184795,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_10apply(struct __pyx_obj_4lxml_5etr __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -198713,12 +184829,9 @@ static PyObject *__pyx_pw_4lxml_5etree_4XSLT_13tostring(PyObject *__pyx_v_self, static PyObject *__pyx_pf_4lxml_5etree_4XSLT_12tostring(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree_XSLT *__pyx_v_self, struct LxmlElementTree *__pyx_v_result_tree) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__355) __Pyx_RefNannySetupContext("tostring", 0); - __Pyx_TraceCall("tostring", __pyx_f[3], 475, 0, __PYX_ERR(3, 475, __pyx_L1_error)); /* "src/lxml/xslt.pxi":482 * :deprecated: use str(result_tree) instead. @@ -198727,7 +184840,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_12tostring(CYTHON_UNUSED struct __p * * def __deepcopy__(self, memo): */ - __Pyx_TraceLine(482,0,__PYX_ERR(3, 482, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)__pyx_v_result_tree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -198750,7 +184862,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_12tostring(CYTHON_UNUSED struct __p __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -198779,14 +184890,11 @@ static PyObject *__pyx_pw_4lxml_5etree_4XSLT_15__deepcopy__(PyObject *__pyx_v_se static PyObject *__pyx_pf_4lxml_5etree_4XSLT_14__deepcopy__(struct __pyx_obj_4lxml_5etree_XSLT *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_memo) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__356) __Pyx_RefNannySetupContext("__deepcopy__", 0); - __Pyx_TraceCall("__deepcopy__", __pyx_f[3], 484, 0, __PYX_ERR(3, 484, __pyx_L1_error)); /* "src/lxml/xslt.pxi":485 * @@ -198795,7 +184903,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_14__deepcopy__(struct __pyx_obj_4lx * * def __copy__(self): */ - __Pyx_TraceLine(485,0,__PYX_ERR(3, 485, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -198809,12 +184916,9 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_14__deepcopy__(struct __pyx_obj_4lx __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 485, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 485, __pyx_L1_error) - } + __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(3, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; @@ -198838,7 +184942,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_14__deepcopy__(struct __pyx_obj_4lx __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -198867,12 +184970,9 @@ static PyObject *__pyx_pw_4lxml_5etree_4XSLT_17__copy__(PyObject *__pyx_v_self, static PyObject *__pyx_pf_4lxml_5etree_4XSLT_16__copy__(struct __pyx_obj_4lxml_5etree_XSLT *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__357) __Pyx_RefNannySetupContext("__copy__", 0); - __Pyx_TraceCall("__copy__", __pyx_f[3], 487, 0, __PYX_ERR(3, 487, __pyx_L1_error)); /* "src/lxml/xslt.pxi":488 * @@ -198881,7 +184981,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_16__copy__(struct __pyx_obj_4lxml_5 * * def __call__(self, _input, *, profile_run=False, **kw): */ - __Pyx_TraceLine(488,0,__PYX_ERR(3, 488, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__copyXSLT(__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -198904,7 +185003,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_16__copy__(struct __pyx_obj_4lxml_5 __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -199000,7 +185098,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 PyObject *__pyx_v_error = NULL; PyObject *__pyx_v_message = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; xmlDoc *__pyx_t_2; @@ -199024,7 +185121,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 char const *__pyx_t_20; int __pyx_t_21; __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[3], 490, 0, __PYX_ERR(3, 490, __pyx_L1_error)); /* "src/lxml/xslt.pxi":499 * xslt_profile that holds an XML tree with profiling data. @@ -199033,7 +185129,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * cdef _XSLTResolverContext resolver_context * cdef _Document input_doc */ - __Pyx_TraceLine(499,0,__PYX_ERR(3, 499, __pyx_L1_error)) __Pyx_INCREF(Py_None); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__XSLTContext *)Py_None); @@ -199044,7 +185139,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * cdef xmlDoc* c_profile_doc * cdef xslt.xsltTransformContext* transform_ctxt */ - __Pyx_TraceLine(504,0,__PYX_ERR(3, 504, __pyx_L1_error)) __Pyx_INCREF(Py_None); __pyx_v_profile_doc = ((struct LxmlDocument *)Py_None); @@ -199055,7 +185149,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * cdef xmlDoc* c_doc * cdef tree.xmlDict* c_dict */ - __Pyx_TraceLine(507,0,__PYX_ERR(3, 507, __pyx_L1_error)) __pyx_v_c_result = NULL; /* "src/lxml/xslt.pxi":510 @@ -199065,7 +185158,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * * assert self._c_style is not NULL, "XSLT stylesheet not initialised" */ - __Pyx_TraceLine(510,0,__PYX_ERR(3, 510, __pyx_L1_error)) __pyx_v_params = NULL; /* "src/lxml/xslt.pxi":512 @@ -199075,7 +185167,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * input_doc = _documentOrRaise(_input) * root_node = _rootNodeOrRaise(_input) */ - __Pyx_TraceLine(512,0,__PYX_ERR(3, 512, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_self->_c_style != NULL) != 0))) { @@ -199092,7 +185183,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * root_node = _rootNodeOrRaise(_input) * */ - __Pyx_TraceLine(513,0,__PYX_ERR(3, 513, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__documentOrRaise(__pyx_v__input)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_input_doc = ((struct LxmlDocument *)__pyx_t_1); @@ -199105,7 +185195,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * * c_doc = _fakeRootDoc(input_doc._c_doc, root_node._c_node) */ - __Pyx_TraceLine(514,0,__PYX_ERR(3, 514, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__rootNodeOrRaise(__pyx_v__input)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_root_node = ((struct LxmlElement *)__pyx_t_1); @@ -199118,7 +185207,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * * transform_ctxt = xslt.xsltNewTransformContext(self._c_style, c_doc) */ - __Pyx_TraceLine(516,0,__PYX_ERR(3, 516, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__fakeRootDoc(__pyx_v_input_doc->_c_doc, __pyx_v_root_node->_c_node); if (unlikely(__pyx_t_2 == ((xmlDoc *)NULL))) __PYX_ERR(3, 516, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_2; @@ -199129,7 +185217,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * if transform_ctxt is NULL: * _destroyFakeDoc(input_doc._c_doc, c_doc) */ - __Pyx_TraceLine(518,0,__PYX_ERR(3, 518, __pyx_L1_error)) __pyx_v_transform_ctxt = xsltNewTransformContext(__pyx_v_self->_c_style, __pyx_v_c_doc); /* "src/lxml/xslt.pxi":519 @@ -199139,7 +185226,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * _destroyFakeDoc(input_doc._c_doc, c_doc) * raise MemoryError() */ - __Pyx_TraceLine(519,0,__PYX_ERR(3, 519, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_transform_ctxt == NULL) != 0); if (unlikely(__pyx_t_3)) { @@ -199150,7 +185236,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * raise MemoryError() * */ - __Pyx_TraceLine(520,0,__PYX_ERR(3, 520, __pyx_L1_error)) __pyx_f_4lxml_5etree__destroyFakeDoc(__pyx_v_input_doc->_c_doc, __pyx_v_c_doc); /* "src/lxml/xslt.pxi":521 @@ -199160,7 +185245,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * * # using the stylesheet dict is safer than using a possibly */ - __Pyx_TraceLine(521,0,__PYX_ERR(3, 521, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(3, 521, __pyx_L1_error) /* "src/lxml/xslt.pxi":519 @@ -199179,7 +185263,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * xmlparser.xmlDictFree(transform_ctxt.dict) * if kw: */ - __Pyx_TraceLine(527,0,__PYX_ERR(3, 527, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_transform_ctxt->dict != NULL) != 0); if (__pyx_t_3) { @@ -199190,7 +185273,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * if kw: * # parameter values are stored in the dict */ - __Pyx_TraceLine(528,0,__PYX_ERR(3, 528, __pyx_L1_error)) xmlDictFree(__pyx_v_transform_ctxt->dict); /* "src/lxml/xslt.pxi":527 @@ -199209,7 +185291,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * # parameter values are stored in the dict * # => avoid unnecessarily cluttering the global dict */ - __Pyx_TraceLine(529,0,__PYX_ERR(3, 529, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kw); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 529, __pyx_L1_error) if (__pyx_t_3) { @@ -199220,7 +185301,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * if transform_ctxt.dict is NULL: * xslt.xsltFreeTransformContext(transform_ctxt) */ - __Pyx_TraceLine(532,0,__PYX_ERR(3, 532, __pyx_L1_error)) __pyx_v_transform_ctxt->dict = xmlDictCreateSub(__pyx_v_self->_c_style->doc->dict); /* "src/lxml/xslt.pxi":533 @@ -199230,7 +185310,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * xslt.xsltFreeTransformContext(transform_ctxt) * raise MemoryError() */ - __Pyx_TraceLine(533,0,__PYX_ERR(3, 533, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_transform_ctxt->dict == NULL) != 0); if (unlikely(__pyx_t_3)) { @@ -199241,7 +185320,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * raise MemoryError() * else: */ - __Pyx_TraceLine(534,0,__PYX_ERR(3, 534, __pyx_L1_error)) xsltFreeTransformContext(__pyx_v_transform_ctxt); /* "src/lxml/xslt.pxi":535 @@ -199251,7 +185329,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * else: * transform_ctxt.dict = self._c_style.doc.dict */ - __Pyx_TraceLine(535,0,__PYX_ERR(3, 535, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(3, 535, __pyx_L1_error) /* "src/lxml/xslt.pxi":533 @@ -199280,7 +185357,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * xmlparser.xmlDictReference(transform_ctxt.dict) * */ - __Pyx_TraceLine(537,0,__PYX_ERR(3, 537, __pyx_L1_error)) /*else*/ { __pyx_t_4 = __pyx_v_self->_c_style->doc->dict; __pyx_v_transform_ctxt->dict = __pyx_t_4; @@ -199292,7 +185368,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * * xslt.xsltSetCtxtParseOptions( */ - __Pyx_TraceLine(538,0,__PYX_ERR(3, 538, __pyx_L1_error)) (void)(xmlDictReference(__pyx_v_transform_ctxt->dict)); } __pyx_L5:; @@ -199304,7 +185379,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * transform_ctxt, input_doc._parser._parse_options) * */ - __Pyx_TraceLine(540,0,__PYX_ERR(3, 540, __pyx_L1_error)) xsltSetCtxtParseOptions(__pyx_v_transform_ctxt, __pyx_v_input_doc->_parser->_parse_options); /* "src/lxml/xslt.pxi":543 @@ -199314,7 +185388,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * transform_ctxt.profile = 1 * */ - __Pyx_TraceLine(543,0,__PYX_ERR(3, 543, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_profile_run); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 543, __pyx_L1_error) if (__pyx_t_3) { @@ -199325,7 +185398,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * * try: */ - __Pyx_TraceLine(544,0,__PYX_ERR(3, 544, __pyx_L1_error)) __pyx_v_transform_ctxt->profile = 1; /* "src/lxml/xslt.pxi":543 @@ -199344,7 +185416,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * context = self._context._copy() * context.register_context(transform_ctxt, input_doc) */ - __Pyx_TraceLine(546,0,__PYX_ERR(3, 546, __pyx_L9_error)) /*try:*/ { /* "src/lxml/xslt.pxi":547 @@ -199354,7 +185425,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * context.register_context(transform_ctxt, input_doc) * */ - __Pyx_TraceLine(547,0,__PYX_ERR(3, 547, __pyx_L9_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_12_XSLTContext__copy(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self->_context))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 547, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4lxml_5etree__XSLTContext))))) __PYX_ERR(3, 547, __pyx_L9_error) @@ -199368,7 +185438,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * * resolver_context = self._xslt_resolver_context._copy() */ - __Pyx_TraceLine(548,0,__PYX_ERR(3, 548, __pyx_L9_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_12_XSLTContext_register_context(__pyx_v_context, __pyx_v_transform_ctxt, __pyx_v_input_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 548, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -199380,7 +185449,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * transform_ctxt._private = resolver_context * */ - __Pyx_TraceLine(550,0,__PYX_ERR(3, 550, __pyx_L9_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_20_XSLTResolverContext__copy(__pyx_v_self->_xslt_resolver_context)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 550, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_resolver_context = ((struct __pyx_obj_4lxml_5etree__XSLTResolverContext *)__pyx_t_1); @@ -199393,7 +185461,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * * _convert_xslt_parameters(transform_ctxt, kw, ¶ms) */ - __Pyx_TraceLine(551,0,__PYX_ERR(3, 551, __pyx_L9_error)) __pyx_v_transform_ctxt->_private = ((PyObject *)__pyx_v_resolver_context); /* "src/lxml/xslt.pxi":553 @@ -199403,7 +185470,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * c_result = self._run_transform( * c_doc, params, context, transform_ctxt) */ - __Pyx_TraceLine(553,0,__PYX_ERR(3, 553, __pyx_L9_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__convert_xslt_parameters(__pyx_v_transform_ctxt, __pyx_v_kw, (&__pyx_v_params)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 553, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -199415,7 +185481,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * c_doc, params, context, transform_ctxt) * if params is not NULL: */ - __Pyx_TraceLine(554,0,__PYX_ERR(3, 554, __pyx_L9_error)) __pyx_v_c_result = ((struct __pyx_vtabstruct_4lxml_5etree_XSLT *)__pyx_v_self->__pyx_vtab)->_run_transform(__pyx_v_self, __pyx_v_c_doc, __pyx_v_params, __pyx_v_context, __pyx_v_transform_ctxt); /* "src/lxml/xslt.pxi":556 @@ -199425,7 +185490,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * # deallocate space for parameters * python.lxml_free(params) */ - __Pyx_TraceLine(556,0,__PYX_ERR(3, 556, __pyx_L9_error)) __pyx_t_3 = ((__pyx_v_params != NULL) != 0); if (__pyx_t_3) { @@ -199436,7 +185500,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * * if transform_ctxt.state != xslt.XSLT_STATE_OK: */ - __Pyx_TraceLine(558,0,__PYX_ERR(3, 558, __pyx_L9_error)) lxml_free(__pyx_v_params); /* "src/lxml/xslt.pxi":556 @@ -199455,7 +185518,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * if c_result is not NULL: * tree.xmlFreeDoc(c_result) */ - __Pyx_TraceLine(560,0,__PYX_ERR(3, 560, __pyx_L9_error)) __pyx_t_3 = ((__pyx_v_transform_ctxt->state != XSLT_STATE_OK) != 0); if (__pyx_t_3) { @@ -199466,7 +185528,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * tree.xmlFreeDoc(c_result) * c_result = NULL */ - __Pyx_TraceLine(561,0,__PYX_ERR(3, 561, __pyx_L9_error)) __pyx_t_3 = ((__pyx_v_c_result != NULL) != 0); if (__pyx_t_3) { @@ -199477,7 +185538,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * c_result = NULL * */ - __Pyx_TraceLine(562,0,__PYX_ERR(3, 562, __pyx_L9_error)) xmlFreeDoc(__pyx_v_c_result); /* "src/lxml/xslt.pxi":563 @@ -199487,7 +185547,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * * if transform_ctxt.profile: */ - __Pyx_TraceLine(563,0,__PYX_ERR(3, 563, __pyx_L9_error)) __pyx_v_c_result = NULL; /* "src/lxml/xslt.pxi":561 @@ -199515,7 +185574,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * c_profile_doc = xslt.xsltGetProfileInformation(transform_ctxt) * if c_profile_doc is not NULL: */ - __Pyx_TraceLine(565,0,__PYX_ERR(3, 565, __pyx_L9_error)) __pyx_t_3 = (__pyx_v_transform_ctxt->profile != 0); if (__pyx_t_3) { @@ -199526,7 +185584,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * if c_profile_doc is not NULL: * profile_doc = _documentFactory( */ - __Pyx_TraceLine(566,0,__PYX_ERR(3, 566, __pyx_L9_error)) __pyx_v_c_profile_doc = xsltGetProfileInformation(__pyx_v_transform_ctxt); /* "src/lxml/xslt.pxi":567 @@ -199536,7 +185593,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * profile_doc = _documentFactory( * c_profile_doc, input_doc._parser) */ - __Pyx_TraceLine(567,0,__PYX_ERR(3, 567, __pyx_L9_error)) __pyx_t_3 = ((__pyx_v_c_profile_doc != NULL) != 0); if (__pyx_t_3) { @@ -199547,7 +185603,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * finally: * if context is not None: */ - __Pyx_TraceLine(569,0,__PYX_ERR(3, 569, __pyx_L9_error)) __pyx_t_1 = ((PyObject *)__pyx_v_input_doc->_parser); __Pyx_INCREF(__pyx_t_1); @@ -199558,7 +185613,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * c_profile_doc, input_doc._parser) * finally: */ - __Pyx_TraceLine(568,0,__PYX_ERR(3, 568, __pyx_L9_error)) __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_profile_doc, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_1))); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 568, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -199591,7 +185645,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * context.free_context() * _destroyFakeDoc(input_doc._c_doc, c_doc) */ - __Pyx_TraceLine(571,0,__PYX_ERR(3, 571, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ __pyx_t_3 = (((PyObject *)__pyx_v_context) != Py_None); @@ -199605,7 +185658,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * _destroyFakeDoc(input_doc._c_doc, c_doc) * */ - __Pyx_TraceLine(572,0,__PYX_ERR(3, 572, __pyx_L1_error)) __pyx_t_5 = __pyx_f_4lxml_5etree_12_XSLTContext_free_context(__pyx_v_context); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -199626,7 +185678,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * * try: */ - __Pyx_TraceLine(573,0,__PYX_ERR(3, 573, __pyx_L1_error)) __pyx_f_4lxml_5etree__destroyFakeDoc(__pyx_v_input_doc->_c_doc, __pyx_v_c_doc); goto __pyx_L10; } @@ -199655,7 +185706,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * context.free_context() * _destroyFakeDoc(input_doc._c_doc, c_doc) */ - __Pyx_TraceLine(571,0,__PYX_ERR(3, 571, __pyx_L18_error)) __pyx_t_6 = (((PyObject *)__pyx_v_context) != Py_None); __pyx_t_3 = (__pyx_t_6 != 0); if (__pyx_t_3) { @@ -199667,7 +185717,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * _destroyFakeDoc(input_doc._c_doc, c_doc) * */ - __Pyx_TraceLine(572,0,__PYX_ERR(3, 572, __pyx_L18_error)) __pyx_t_5 = __pyx_f_4lxml_5etree_12_XSLTContext_free_context(__pyx_v_context); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 572, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -199688,7 +185737,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * * try: */ - __Pyx_TraceLine(573,0,__PYX_ERR(3, 573, __pyx_L18_error)) __pyx_f_4lxml_5etree__destroyFakeDoc(__pyx_v_input_doc->_c_doc, __pyx_v_c_doc); } if (PY_MAJOR_VERSION >= 3) { @@ -199727,7 +185775,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * if resolver_context is not None and resolver_context._has_raised(): * if c_result is not NULL: */ - __Pyx_TraceLine(575,0,__PYX_ERR(3, 575, __pyx_L21_error)) /*try:*/ { /* "src/lxml/xslt.pxi":576 @@ -199737,7 +185784,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * if c_result is not NULL: * tree.xmlFreeDoc(c_result) */ - __Pyx_TraceLine(576,0,__PYX_ERR(3, 576, __pyx_L21_error)) __pyx_t_6 = (((PyObject *)__pyx_v_resolver_context) != Py_None); __pyx_t_16 = (__pyx_t_6 != 0); if (__pyx_t_16) { @@ -199758,7 +185804,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * tree.xmlFreeDoc(c_result) * c_result = NULL */ - __Pyx_TraceLine(577,0,__PYX_ERR(3, 577, __pyx_L21_error)) __pyx_t_3 = ((__pyx_v_c_result != NULL) != 0); if (__pyx_t_3) { @@ -199769,7 +185814,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * c_result = NULL * resolver_context._raise_if_stored() */ - __Pyx_TraceLine(578,0,__PYX_ERR(3, 578, __pyx_L21_error)) xmlFreeDoc(__pyx_v_c_result); /* "src/lxml/xslt.pxi":579 @@ -199779,7 +185823,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * resolver_context._raise_if_stored() * */ - __Pyx_TraceLine(579,0,__PYX_ERR(3, 579, __pyx_L21_error)) __pyx_v_c_result = NULL; /* "src/lxml/xslt.pxi":577 @@ -199798,7 +185841,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * * if context._exc._has_raised(): */ - __Pyx_TraceLine(580,0,__PYX_ERR(3, 580, __pyx_L21_error)) __pyx_t_8 = ((struct __pyx_vtabstruct_4lxml_5etree__XSLTResolverContext *)__pyx_v_resolver_context->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._raise_if_stored(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_v_resolver_context)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(3, 580, __pyx_L21_error) /* "src/lxml/xslt.pxi":576 @@ -199817,7 +185859,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * if c_result is not NULL: * tree.xmlFreeDoc(c_result) */ - __Pyx_TraceLine(582,0,__PYX_ERR(3, 582, __pyx_L21_error)) __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_context->__pyx_base._exc->__pyx_vtab)->_has_raised(__pyx_v_context->__pyx_base._exc); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 582, __pyx_L21_error) __pyx_t_6 = (__pyx_t_3 != 0); if (__pyx_t_6) { @@ -199829,7 +185870,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * tree.xmlFreeDoc(c_result) * c_result = NULL */ - __Pyx_TraceLine(583,0,__PYX_ERR(3, 583, __pyx_L21_error)) __pyx_t_6 = ((__pyx_v_c_result != NULL) != 0); if (__pyx_t_6) { @@ -199840,7 +185880,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * c_result = NULL * context._exc._raise_if_stored() */ - __Pyx_TraceLine(584,0,__PYX_ERR(3, 584, __pyx_L21_error)) xmlFreeDoc(__pyx_v_c_result); /* "src/lxml/xslt.pxi":585 @@ -199850,7 +185889,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * context._exc._raise_if_stored() * */ - __Pyx_TraceLine(585,0,__PYX_ERR(3, 585, __pyx_L21_error)) __pyx_v_c_result = NULL; /* "src/lxml/xslt.pxi":583 @@ -199869,7 +185907,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * * if c_result is NULL: */ - __Pyx_TraceLine(586,0,__PYX_ERR(3, 586, __pyx_L21_error)) __pyx_t_8 = ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_context->__pyx_base._exc->__pyx_vtab)->_raise_if_stored(__pyx_v_context->__pyx_base._exc); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(3, 586, __pyx_L21_error) /* "src/lxml/xslt.pxi":582 @@ -199888,7 +185925,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * # last error seems to be the most accurate here * error = self._error_log.last_error */ - __Pyx_TraceLine(588,0,__PYX_ERR(3, 588, __pyx_L21_error)) __pyx_t_6 = ((__pyx_v_c_result == NULL) != 0); if (__pyx_t_6) { @@ -199899,7 +185935,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * if error is not None and error.message: * if error.line > 0: */ - __Pyx_TraceLine(590,0,__PYX_ERR(3, 590, __pyx_L21_error)) __pyx_t_5 = __pyx_v_self->_error_log->__pyx_base.__pyx_base.last_error; __Pyx_INCREF(__pyx_t_5); __pyx_v_error = __pyx_t_5; @@ -199912,7 +185947,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * if error.line > 0: * message = f"{error.message}, line {error.line}" */ - __Pyx_TraceLine(591,0,__PYX_ERR(3, 591, __pyx_L21_error)) __pyx_t_3 = (__pyx_v_error != Py_None); __pyx_t_16 = (__pyx_t_3 != 0); if (__pyx_t_16) { @@ -199935,7 +185969,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * message = f"{error.message}, line {error.line}" * else: */ - __Pyx_TraceLine(592,0,__PYX_ERR(3, 592, __pyx_L21_error)) __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_error, __pyx_n_s_line_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 592, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 592, __pyx_L21_error) @@ -199951,7 +185984,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * else: * message = error.message */ - __Pyx_TraceLine(593,0,__PYX_ERR(3, 593, __pyx_L21_error)) __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 593, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_17 = 0; @@ -200003,7 +186035,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * elif error is not None and error.line > 0: * message = f"Error applying stylesheet, line {error.line}" */ - __Pyx_TraceLine(595,0,__PYX_ERR(3, 595, __pyx_L21_error)) /*else*/ { __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_error, __pyx_n_s_message); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 595, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_5); @@ -200029,7 +186060,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * message = f"Error applying stylesheet, line {error.line}" * else: */ - __Pyx_TraceLine(596,0,__PYX_ERR(3, 596, __pyx_L21_error)) __pyx_t_16 = (__pyx_v_error != Py_None); __pyx_t_3 = (__pyx_t_16 != 0); if (__pyx_t_3) { @@ -200054,7 +186084,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * else: * message = u"Error applying stylesheet" */ - __Pyx_TraceLine(597,0,__PYX_ERR(3, 597, __pyx_L21_error)) __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_error, __pyx_n_s_line_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 597, __pyx_L21_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(3, 597, __pyx_L21_error) @@ -200083,7 +186112,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * raise XSLTApplyError(message, self._error_log) * finally: */ - __Pyx_TraceLine(599,0,__PYX_ERR(3, 599, __pyx_L21_error)) /*else*/ { __Pyx_INCREF(__pyx_kp_u_Error_applying_stylesheet); __pyx_v_message = __pyx_kp_u_Error_applying_stylesheet; @@ -200097,7 +186125,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * finally: * if resolver_context is not None: */ - __Pyx_TraceLine(600,0,__PYX_ERR(3, 600, __pyx_L21_error)) __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 600, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_message); @@ -200130,7 +186157,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * resolver_context.clear() * */ - __Pyx_TraceLine(602,0,__PYX_ERR(3, 602, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ __pyx_t_6 = (((PyObject *)__pyx_v_resolver_context) != Py_None); @@ -200144,7 +186170,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * * result_doc = _documentFactory(c_result, input_doc._parser) */ - __Pyx_TraceLine(603,0,__PYX_ERR(3, 603, __pyx_L1_error)) __pyx_t_8 = ((struct __pyx_vtabstruct_4lxml_5etree__XSLTResolverContext *)__pyx_v_resolver_context->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.clear(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_v_resolver_context)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(3, 603, __pyx_L1_error) /* "src/lxml/xslt.pxi":602 @@ -200186,7 +186211,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * * result_doc = _documentFactory(c_result, input_doc._parser) */ - __Pyx_TraceLine(603,0,__PYX_ERR(3, 603, __pyx_L38_error)) __pyx_t_21 = ((struct __pyx_vtabstruct_4lxml_5etree__XSLTResolverContext *)__pyx_v_resolver_context->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.clear(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_v_resolver_context)); if (unlikely(__pyx_t_21 == ((int)-1))) __PYX_ERR(3, 603, __pyx_L38_error) /* "src/lxml/xslt.pxi":602 @@ -200234,7 +186258,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * * c_dict = c_result.dict */ - __Pyx_TraceLine(605,0,__PYX_ERR(3, 605, __pyx_L1_error)) __pyx_t_5 = ((PyObject *)__pyx_v_input_doc->_parser); __Pyx_INCREF(__pyx_t_5); __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_result, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_5))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 605, __pyx_L1_error) @@ -200250,7 +186273,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * xmlparser.xmlDictReference(c_dict) * __GLOBAL_PARSER_CONTEXT.initThreadDictRef(&c_result.dict) */ - __Pyx_TraceLine(607,0,__PYX_ERR(3, 607, __pyx_L1_error)) __pyx_t_4 = __pyx_v_c_result->dict; __pyx_v_c_dict = __pyx_t_4; @@ -200261,7 +186283,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * __GLOBAL_PARSER_CONTEXT.initThreadDictRef(&c_result.dict) * if c_dict is not c_result.dict or \ */ - __Pyx_TraceLine(608,0,__PYX_ERR(3, 608, __pyx_L1_error)) (void)(xmlDictReference(__pyx_v_c_dict)); /* "src/lxml/xslt.pxi":609 @@ -200271,7 +186292,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * if c_dict is not c_result.dict or \ * self._c_style.doc.dict is not c_result.dict or \ */ - __Pyx_TraceLine(609,0,__PYX_ERR(3, 609, __pyx_L1_error)) __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initThreadDictRef(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, (&__pyx_v_c_result->dict)); /* "src/lxml/xslt.pxi":610 @@ -200281,7 +186301,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * self._c_style.doc.dict is not c_result.dict or \ * input_doc._c_doc.dict is not c_result.dict: */ - __Pyx_TraceLine(610,0,__PYX_ERR(3, 610, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_c_dict != __pyx_v_c_result->dict) != 0); if (!__pyx_t_3) { } else { @@ -200296,7 +186315,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * input_doc._c_doc.dict is not c_result.dict: * with nogil: */ - __Pyx_TraceLine(611,0,__PYX_ERR(3, 611, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_self->_c_style->doc->dict != __pyx_v_c_result->dict) != 0); if (!__pyx_t_3) { } else { @@ -200311,7 +186329,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * with nogil: * if c_dict is not c_result.dict: */ - __Pyx_TraceLine(612,0,__PYX_ERR(3, 612, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_input_doc->_c_doc->dict != __pyx_v_c_result->dict) != 0); __pyx_t_6 = __pyx_t_3; __pyx_L41_bool_binop_done:; @@ -200323,7 +186340,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * self._c_style.doc.dict is not c_result.dict or \ * input_doc._c_doc.dict is not c_result.dict: */ - __Pyx_TraceLine(610,0,__PYX_ERR(3, 610, __pyx_L1_error)) if (__pyx_t_6) { /* "src/lxml/xslt.pxi":613 @@ -200333,7 +186349,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * if c_dict is not c_result.dict: * fixThreadDictNames(c_result, */ - __Pyx_TraceLine(613,0,__PYX_ERR(3, 613, __pyx_L1_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -200349,7 +186364,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * fixThreadDictNames(c_result, * c_dict, c_result.dict) */ - __Pyx_TraceLine(614,1,__PYX_ERR(3, 614, __pyx_L45_error)) __pyx_t_6 = ((__pyx_v_c_dict != __pyx_v_c_result->dict) != 0); if (__pyx_t_6) { @@ -200360,7 +186374,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * c_dict, c_result.dict) * if self._c_style.doc.dict is not c_result.dict: */ - __Pyx_TraceLine(615,1,__PYX_ERR(3, 615, __pyx_L45_error)) __pyx_f_4lxml_5etree_fixThreadDictNames(((xmlNode *)__pyx_v_c_result), __pyx_v_c_dict, __pyx_v_c_result->dict); /* "src/lxml/xslt.pxi":614 @@ -200379,7 +186392,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * fixThreadDictNames(c_result, * self._c_style.doc.dict, c_result.dict) */ - __Pyx_TraceLine(617,1,__PYX_ERR(3, 617, __pyx_L45_error)) __pyx_t_6 = ((__pyx_v_self->_c_style->doc->dict != __pyx_v_c_result->dict) != 0); if (__pyx_t_6) { @@ -200390,7 +186402,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * self._c_style.doc.dict, c_result.dict) * if input_doc._c_doc.dict is not c_result.dict: */ - __Pyx_TraceLine(618,1,__PYX_ERR(3, 618, __pyx_L45_error)) __pyx_f_4lxml_5etree_fixThreadDictNames(((xmlNode *)__pyx_v_c_result), __pyx_v_self->_c_style->doc->dict, __pyx_v_c_result->dict); /* "src/lxml/xslt.pxi":617 @@ -200409,7 +186420,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * fixThreadDictNames(c_result, * input_doc._c_doc.dict, c_result.dict) */ - __Pyx_TraceLine(620,1,__PYX_ERR(3, 620, __pyx_L45_error)) __pyx_t_6 = ((__pyx_v_input_doc->_c_doc->dict != __pyx_v_c_result->dict) != 0); if (__pyx_t_6) { @@ -200420,7 +186430,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * input_doc._c_doc.dict, c_result.dict) * xmlparser.xmlDictFree(c_dict) */ - __Pyx_TraceLine(621,1,__PYX_ERR(3, 621, __pyx_L45_error)) __pyx_f_4lxml_5etree_fixThreadDictNames(((xmlNode *)__pyx_v_c_result), __pyx_v_input_doc->_c_doc->dict, __pyx_v_c_result->dict); /* "src/lxml/xslt.pxi":620 @@ -200440,7 +186449,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * if c_dict is not c_result.dict: * fixThreadDictNames(c_result, */ - __Pyx_TraceLine(613,1,__PYX_ERR(3, 613, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -200449,13 +186457,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 #endif goto __pyx_L46; } - __pyx_L45_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L1_error; - } __pyx_L46:; } } @@ -200476,7 +186477,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * * return _xsltResultTreeFactory(result_doc, self, profile_doc) */ - __Pyx_TraceLine(623,0,__PYX_ERR(3, 623, __pyx_L1_error)) xmlDictFree(__pyx_v_c_dict); /* "src/lxml/xslt.pxi":625 @@ -200486,7 +186486,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 * * cdef xmlDoc* _run_transform(self, xmlDoc* c_input_doc, */ - __Pyx_TraceLine(625,0,__PYX_ERR(3, 625, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4lxml_5etree__xsltResultTreeFactory(__pyx_v_result_doc, __pyx_v_self, __pyx_v_profile_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -200519,7 +186518,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 __Pyx_XDECREF(__pyx_v_error); __Pyx_XDECREF(__pyx_v_message); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -200535,7 +186533,6 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_18__call__(struct __pyx_obj_4lxml_5 static xmlDoc *__pyx_f_4lxml_5etree_4XSLT__run_transform(struct __pyx_obj_4lxml_5etree_XSLT *__pyx_v_self, xmlDoc *__pyx_v_c_input_doc, const char **__pyx_v_params, CYTHON_UNUSED struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_context, xsltTransformContext *__pyx_v_transform_ctxt) { xmlDoc *__pyx_v_c_result; xmlDoc *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -200544,13 +186541,7 @@ static xmlDoc *__pyx_f_4lxml_5etree_4XSLT__run_transform(struct __pyx_obj_4lxml_ PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - PyObject *__pyx_t_12 = NULL; __Pyx_RefNannySetupContext("_run_transform", 0); - __Pyx_TraceCall("_run_transform", __pyx_f[3], 627, 0, __PYX_ERR(3, 627, __pyx_L1_error)); /* "src/lxml/xslt.pxi":631 * xslt.xsltTransformContext* transform_ctxt): @@ -200559,7 +186550,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_4XSLT__run_transform(struct __pyx_obj_4lxml_ * _receiveXSLTError) * if self._access_control is not None: */ - __Pyx_TraceLine(631,0,__PYX_ERR(3, 631, __pyx_L1_error)) xsltSetTransformErrorFunc(__pyx_v_transform_ctxt, ((void *)__pyx_v_self->_error_log), ((xmlGenericErrorFunc)__pyx_f_4lxml_5etree__receiveXSLTError)); /* "src/lxml/xslt.pxi":633 @@ -200569,7 +186559,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_4XSLT__run_transform(struct __pyx_obj_4lxml_ * self._access_control._register_in_context(transform_ctxt) * with self._error_log, nogil: */ - __Pyx_TraceLine(633,0,__PYX_ERR(3, 633, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_self->_access_control) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -200581,7 +186570,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_4XSLT__run_transform(struct __pyx_obj_4lxml_ * with self._error_log, nogil: * c_result = xslt.xsltApplyStylesheetUser( */ - __Pyx_TraceLine(634,0,__PYX_ERR(3, 634, __pyx_L1_error)) __pyx_f_4lxml_5etree_17XSLTAccessControl__register_in_context(__pyx_v_self->_access_control, __pyx_v_transform_ctxt); /* "src/lxml/xslt.pxi":633 @@ -200600,19 +186588,13 @@ static xmlDoc *__pyx_f_4lxml_5etree_4XSLT__run_transform(struct __pyx_obj_4lxml_ * c_result = xslt.xsltApplyStylesheetUser( * self._c_style, c_input_doc, params, NULL, NULL, transform_ctxt) */ - __Pyx_TraceLine(635,0,__PYX_ERR(3, 635, __pyx_L1_error)) /*with:*/ { __pyx_t_3 = __Pyx_PyObject_LookupSpecial(((PyObject *)__pyx_v_self->_error_log), __pyx_n_s_exit); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_f_4lxml_5etree_9_ErrorLog___enter__(__pyx_v_self->_error_log); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 635, __pyx_L4_error) /*try:*/ { { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); - __Pyx_XGOTREF(__pyx_t_5); - __Pyx_XGOTREF(__pyx_t_6); - __Pyx_XGOTREF(__pyx_t_7); + (void)__pyx_t_5; (void)__pyx_t_6; (void)__pyx_t_7; /* mark used */ /*try:*/ { { #ifdef WITH_THREAD @@ -200629,7 +186611,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_4XSLT__run_transform(struct __pyx_obj_4lxml_ * self._c_style, c_input_doc, params, NULL, NULL, transform_ctxt) * return c_result */ - __Pyx_TraceLine(636,1,__PYX_ERR(3, 636, __pyx_L15_error)) __pyx_v_c_result = xsltApplyStylesheetUser(__pyx_v_self->_c_style, __pyx_v_c_input_doc, __pyx_v_params, NULL, NULL, __pyx_v_transform_ctxt); } @@ -200640,7 +186621,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_4XSLT__run_transform(struct __pyx_obj_4lxml_ * c_result = xslt.xsltApplyStylesheetUser( * self._c_style, c_input_doc, params, NULL, NULL, transform_ctxt) */ - __Pyx_TraceLine(635,1,__PYX_ERR(3, 635, __pyx_L8_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -200649,70 +186629,16 @@ static xmlDoc *__pyx_f_4lxml_5etree_4XSLT__run_transform(struct __pyx_obj_4lxml_ #endif goto __pyx_L16; } - __pyx_L15_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L8_error; - } __pyx_L16:; } } } - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - goto __pyx_L13_try_end; - __pyx_L8_error:; - /*except:*/ { - __Pyx_AddTraceback("lxml.etree.XSLT._run_transform", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(3, 635, __pyx_L10_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_GOTREF(__pyx_t_9); - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = PyTuple_Pack(3, __pyx_t_8, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 635, __pyx_L10_except_error) - __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 635, __pyx_L10_except_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_12); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (__pyx_t_2 < 0) __PYX_ERR(3, 635, __pyx_L10_except_error) - __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); - if (__pyx_t_1) { - __Pyx_GIVEREF(__pyx_t_8); - __Pyx_GIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ErrRestoreWithState(__pyx_t_8, __pyx_t_9, __pyx_t_10); - __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; - __PYX_ERR(3, 635, __pyx_L10_except_error) - } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - goto __pyx_L9_exception_handled; - } - __pyx_L10_except_error:; - __Pyx_XGIVEREF(__pyx_t_5); - __Pyx_XGIVEREF(__pyx_t_6); - __Pyx_XGIVEREF(__pyx_t_7); - __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); - goto __pyx_L1_error; - __pyx_L9_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_5); - __Pyx_XGIVEREF(__pyx_t_6); - __Pyx_XGIVEREF(__pyx_t_7); - __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); - __pyx_L13_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_3) { - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__358, NULL); + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__56, NULL); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); @@ -200722,11 +186648,11 @@ static xmlDoc *__pyx_f_4lxml_5etree_4XSLT__run_transform(struct __pyx_obj_4lxml_ } __pyx_L7:; } - goto __pyx_L20; + goto __pyx_L17; __pyx_L4_error:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L1_error; - __pyx_L20:; + __pyx_L17:; } /* "src/lxml/xslt.pxi":638 @@ -200736,7 +186662,6 @@ static xmlDoc *__pyx_f_4lxml_5etree_4XSLT__run_transform(struct __pyx_obj_4lxml_ * * */ - __Pyx_TraceLine(638,0,__PYX_ERR(3, 638, __pyx_L1_error)) __pyx_r = __pyx_v_c_result; goto __pyx_L0; @@ -200750,14 +186675,9 @@ static xmlDoc *__pyx_f_4lxml_5etree_4XSLT__run_transform(struct __pyx_obj_4lxml_ /* function exit code */ __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_XDECREF(__pyx_t_10); - __Pyx_XDECREF(__pyx_t_11); __Pyx_WriteUnraisable("lxml.etree.XSLT._run_transform", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -200780,7 +186700,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont PyObject *__pyx_v_k = NULL; PyObject *__pyx_v_v = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlDict *__pyx_t_1; Py_ssize_t __pyx_t_2; @@ -200797,7 +186716,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont int __pyx_t_13; Py_ssize_t __pyx_t_14; __Pyx_RefNannySetupContext("_convert_xslt_parameters", 0); - __Pyx_TraceCall("_convert_xslt_parameters", __pyx_f[3], 641, 0, __PYX_ERR(3, 641, __pyx_L1_error)); /* "src/lxml/xslt.pxi":645 * cdef Py_ssize_t i, parameter_count @@ -200806,7 +186724,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * params_ptr[0] = NULL * parameter_count = len(parameters) */ - __Pyx_TraceLine(645,0,__PYX_ERR(3, 645, __pyx_L1_error)) __pyx_t_1 = __pyx_v_transform_ctxt->dict; __pyx_v_c_dict = __pyx_t_1; @@ -200817,7 +186734,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * parameter_count = len(parameters) * if parameter_count == 0: */ - __Pyx_TraceLine(646,0,__PYX_ERR(3, 646, __pyx_L1_error)) (__pyx_v_params_ptr[0]) = NULL; /* "src/lxml/xslt.pxi":647 @@ -200827,7 +186743,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * if parameter_count == 0: * return */ - __Pyx_TraceLine(647,0,__PYX_ERR(3, 647, __pyx_L1_error)) if (unlikely(__pyx_v_parameters == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(3, 647, __pyx_L1_error) @@ -200842,7 +186757,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * return * # allocate space for parameters */ - __Pyx_TraceLine(648,0,__PYX_ERR(3, 648, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_parameter_count == 0) != 0); if (__pyx_t_3) { @@ -200853,7 +186767,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * # allocate space for parameters * # * 2 as we want an entry for both key and value, */ - __Pyx_TraceLine(649,0,__PYX_ERR(3, 649, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -200874,7 +186787,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * if not params: * raise MemoryError() */ - __Pyx_TraceLine(653,0,__PYX_ERR(3, 653, __pyx_L1_error)) __pyx_v_params = ((const char **)lxml_malloc(((__pyx_v_parameter_count * 2) + 1), (sizeof(const char *)))); /* "src/lxml/xslt.pxi":654 @@ -200884,7 +186796,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * raise MemoryError() * try: */ - __Pyx_TraceLine(654,0,__PYX_ERR(3, 654, __pyx_L1_error)) __pyx_t_3 = ((!(__pyx_v_params != 0)) != 0); if (unlikely(__pyx_t_3)) { @@ -200895,7 +186806,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * try: * i = 0 */ - __Pyx_TraceLine(655,0,__PYX_ERR(3, 655, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(3, 655, __pyx_L1_error) /* "src/lxml/xslt.pxi":654 @@ -200914,7 +186824,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * i = 0 * for key, value in parameters.iteritems(): */ - __Pyx_TraceLine(656,0,__PYX_ERR(3, 656, __pyx_L5_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -200931,7 +186840,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * for key, value in parameters.iteritems(): * k = _utf8(key) */ - __Pyx_TraceLine(657,0,__PYX_ERR(3, 657, __pyx_L5_error)) __pyx_v_i = 0; /* "src/lxml/xslt.pxi":658 @@ -200941,7 +186849,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * k = _utf8(key) * if isinstance(value, _XSLTQuotedStringParam): */ - __Pyx_TraceLine(658,0,__PYX_ERR(3, 658, __pyx_L5_error)) __pyx_t_2 = 0; if (unlikely(__pyx_v_parameters == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "iteritems"); @@ -200970,7 +186877,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * if isinstance(value, _XSLTQuotedStringParam): * v = (<_XSLTQuotedStringParam>value).strval */ - __Pyx_TraceLine(659,0,__PYX_ERR(3, 659, __pyx_L5_error)) __pyx_t_11 = __pyx_f_4lxml_5etree__utf8(__pyx_v_key); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 659, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_XDECREF_SET(__pyx_v_k, ((PyObject*)__pyx_t_11)); @@ -200983,7 +186889,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * v = (<_XSLTQuotedStringParam>value).strval * xslt.xsltQuoteOneUserParam( */ - __Pyx_TraceLine(660,0,__PYX_ERR(3, 660, __pyx_L5_error)) __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_4lxml_5etree__XSLTQuotedStringParam); __pyx_t_13 = (__pyx_t_3 != 0); if (__pyx_t_13) { @@ -200995,7 +186900,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * xslt.xsltQuoteOneUserParam( * transform_ctxt, _xcstr(k), _xcstr(v)) */ - __Pyx_TraceLine(661,0,__PYX_ERR(3, 661, __pyx_L5_error)) __pyx_t_11 = ((struct __pyx_obj_4lxml_5etree__XSLTQuotedStringParam *)__pyx_v_value)->strval; __Pyx_INCREF(__pyx_t_11); __Pyx_XDECREF_SET(__pyx_v_v, ((PyObject*)__pyx_t_11)); @@ -201008,7 +186912,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * transform_ctxt, _xcstr(k), _xcstr(v)) * else: */ - __Pyx_TraceLine(662,0,__PYX_ERR(3, 662, __pyx_L5_error)) (void)(xsltQuoteOneUserParam(__pyx_v_transform_ctxt, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_k), (const xmlChar*)PyBytes_AS_STRING(__pyx_v_v))); /* "src/lxml/xslt.pxi":660 @@ -201028,7 +186931,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * v = (value)._path * else: */ - __Pyx_TraceLine(665,0,__PYX_ERR(3, 665, __pyx_L5_error)) /*else*/ { __pyx_t_13 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_4lxml_5etree_XPath); __pyx_t_3 = (__pyx_t_13 != 0); @@ -201041,7 +186943,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * else: * v = _utf8(value) */ - __Pyx_TraceLine(666,0,__PYX_ERR(3, 666, __pyx_L5_error)) __pyx_t_11 = ((struct __pyx_obj_4lxml_5etree_XPath *)__pyx_v_value)->_path; __Pyx_INCREF(__pyx_t_11); __Pyx_XDECREF_SET(__pyx_v_v, ((PyObject*)__pyx_t_11)); @@ -201064,7 +186965,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * params[i] = tree.xmlDictLookup(c_dict, _xcstr(k), len(k)) * i += 1 */ - __Pyx_TraceLine(668,0,__PYX_ERR(3, 668, __pyx_L5_error)) /*else*/ { __pyx_t_11 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 668, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_11); @@ -201080,7 +186980,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * i += 1 * params[i] = tree.xmlDictLookup(c_dict, _xcstr(v), len(v)) */ - __Pyx_TraceLine(669,0,__PYX_ERR(3, 669, __pyx_L5_error)) if (unlikely(__pyx_v_k == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(3, 669, __pyx_L5_error) @@ -201095,7 +186994,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * params[i] = tree.xmlDictLookup(c_dict, _xcstr(v), len(v)) * i += 1 */ - __Pyx_TraceLine(670,0,__PYX_ERR(3, 670, __pyx_L5_error)) __pyx_v_i = (__pyx_v_i + 1); /* "src/lxml/xslt.pxi":671 @@ -201105,7 +187003,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * i += 1 * except: */ - __Pyx_TraceLine(671,0,__PYX_ERR(3, 671, __pyx_L5_error)) if (unlikely(__pyx_v_v == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(3, 671, __pyx_L5_error) @@ -201120,7 +187017,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * except: * python.lxml_free(params) */ - __Pyx_TraceLine(672,0,__PYX_ERR(3, 672, __pyx_L5_error)) __pyx_v_i = (__pyx_v_i + 1); } __pyx_L13:; @@ -201151,7 +187047,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * python.lxml_free(params) * raise */ - __Pyx_TraceLine(673,0,__PYX_ERR(3, 673, __pyx_L7_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._convert_xslt_parameters", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_11, &__pyx_t_10) < 0) __PYX_ERR(3, 673, __pyx_L7_except_error) @@ -201166,7 +187061,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * raise * params[i] = NULL */ - __Pyx_TraceLine(674,0,__PYX_ERR(3, 674, __pyx_L7_except_error)) lxml_free(__pyx_v_params); /* "src/lxml/xslt.pxi":675 @@ -201176,7 +187070,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * params[i] = NULL * params_ptr[0] = params */ - __Pyx_TraceLine(675,0,__PYX_ERR(3, 675, __pyx_L7_except_error)) __Pyx_GIVEREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); @@ -201208,7 +187101,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * params_ptr[0] = params * */ - __Pyx_TraceLine(676,0,__PYX_ERR(3, 676, __pyx_L1_error)) (__pyx_v_params[__pyx_v_i]) = NULL; /* "src/lxml/xslt.pxi":677 @@ -201218,7 +187110,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont * * cdef XSLT _copyXSLT(XSLT stylesheet): */ - __Pyx_TraceLine(677,0,__PYX_ERR(3, 677, __pyx_L1_error)) (__pyx_v_params_ptr[0]) = __pyx_v_params; /* "src/lxml/xslt.pxi":641 @@ -201244,7 +187135,6 @@ static PyObject *__pyx_f_4lxml_5etree__convert_xslt_parameters(xsltTransformCont __Pyx_XDECREF(__pyx_v_k); __Pyx_XDECREF(__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -201261,13 +187151,11 @@ static struct __pyx_obj_4lxml_5etree_XSLT *__pyx_f_4lxml_5etree__copyXSLT(struct struct __pyx_obj_4lxml_5etree_XSLT *__pyx_v_new_xslt = 0; xmlDoc *__pyx_v_c_doc; struct __pyx_obj_4lxml_5etree_XSLT *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; xmlDoc *__pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("_copyXSLT", 0); - __Pyx_TraceCall("_copyXSLT", __pyx_f[3], 679, 0, __PYX_ERR(3, 679, __pyx_L1_error)); /* "src/lxml/xslt.pxi":682 * cdef XSLT new_xslt @@ -201276,7 +187164,6 @@ static struct __pyx_obj_4lxml_5etree_XSLT *__pyx_f_4lxml_5etree__copyXSLT(struct * new_xslt = XSLT.__new__(XSLT) * new_xslt._access_control = stylesheet._access_control */ - __Pyx_TraceLine(682,0,__PYX_ERR(3, 682, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_stylesheet->_c_style != NULL) != 0))) { @@ -201293,7 +187180,6 @@ static struct __pyx_obj_4lxml_5etree_XSLT *__pyx_f_4lxml_5etree__copyXSLT(struct * new_xslt._access_control = stylesheet._access_control * new_xslt._error_log = _ErrorLog() */ - __Pyx_TraceLine(683,0,__PYX_ERR(3, 683, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_tp_new_4lxml_5etree_XSLT(((PyTypeObject *)__pyx_ptype_4lxml_5etree_XSLT), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 683, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_new_xslt = ((struct __pyx_obj_4lxml_5etree_XSLT *)__pyx_t_1); @@ -201306,7 +187192,6 @@ static struct __pyx_obj_4lxml_5etree_XSLT *__pyx_f_4lxml_5etree__copyXSLT(struct * new_xslt._error_log = _ErrorLog() * new_xslt._context = stylesheet._context._copy() */ - __Pyx_TraceLine(684,0,__PYX_ERR(3, 684, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_v_stylesheet->_access_control); __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -201322,7 +187207,6 @@ static struct __pyx_obj_4lxml_5etree_XSLT *__pyx_f_4lxml_5etree__copyXSLT(struct * new_xslt._context = stylesheet._context._copy() * */ - __Pyx_TraceLine(685,0,__PYX_ERR(3, 685, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__ErrorLog)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -201338,7 +187222,6 @@ static struct __pyx_obj_4lxml_5etree_XSLT *__pyx_f_4lxml_5etree__copyXSLT(struct * * new_xslt._xslt_resolver_context = stylesheet._xslt_resolver_context._copy() */ - __Pyx_TraceLine(686,0,__PYX_ERR(3, 686, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_12_XSLTContext__copy(((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_stylesheet->_context))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 686, __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__XSLTContext))))) __PYX_ERR(3, 686, __pyx_L1_error) @@ -201355,7 +187238,6 @@ static struct __pyx_obj_4lxml_5etree_XSLT *__pyx_f_4lxml_5etree__copyXSLT(struct * new_xslt._xslt_resolver_context._c_style_doc = _copyDoc( * stylesheet._xslt_resolver_context._c_style_doc, 1) */ - __Pyx_TraceLine(688,0,__PYX_ERR(3, 688, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_20_XSLTResolverContext__copy(__pyx_v_stylesheet->_xslt_resolver_context)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -201371,7 +187253,6 @@ static struct __pyx_obj_4lxml_5etree_XSLT *__pyx_f_4lxml_5etree__copyXSLT(struct * stylesheet._xslt_resolver_context._c_style_doc, 1) * */ - __Pyx_TraceLine(689,0,__PYX_ERR(3, 689, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__copyDoc(__pyx_v_stylesheet->_xslt_resolver_context->_c_style_doc, 1); if (unlikely(__pyx_t_2 == ((xmlDoc *)NULL))) __PYX_ERR(3, 689, __pyx_L1_error) __pyx_v_new_xslt->_xslt_resolver_context->_c_style_doc = __pyx_t_2; @@ -201382,7 +187263,6 @@ static struct __pyx_obj_4lxml_5etree_XSLT *__pyx_f_4lxml_5etree__copyXSLT(struct * new_xslt._c_style = xslt.xsltParseStylesheetDoc(c_doc) * if new_xslt._c_style is NULL: */ - __Pyx_TraceLine(692,0,__PYX_ERR(3, 692, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__copyDoc(__pyx_v_stylesheet->_c_style->doc, 1); if (unlikely(__pyx_t_2 == ((xmlDoc *)NULL))) __PYX_ERR(3, 692, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_2; @@ -201393,7 +187273,6 @@ static struct __pyx_obj_4lxml_5etree_XSLT *__pyx_f_4lxml_5etree__copyXSLT(struct * if new_xslt._c_style is NULL: * tree.xmlFreeDoc(c_doc) */ - __Pyx_TraceLine(693,0,__PYX_ERR(3, 693, __pyx_L1_error)) __pyx_v_new_xslt->_c_style = xsltParseStylesheetDoc(__pyx_v_c_doc); /* "src/lxml/xslt.pxi":694 @@ -201403,7 +187282,6 @@ static struct __pyx_obj_4lxml_5etree_XSLT *__pyx_f_4lxml_5etree__copyXSLT(struct * tree.xmlFreeDoc(c_doc) * raise MemoryError() */ - __Pyx_TraceLine(694,0,__PYX_ERR(3, 694, __pyx_L1_error)) __pyx_t_3 = ((__pyx_v_new_xslt->_c_style == NULL) != 0); if (unlikely(__pyx_t_3)) { @@ -201414,7 +187292,6 @@ static struct __pyx_obj_4lxml_5etree_XSLT *__pyx_f_4lxml_5etree__copyXSLT(struct * raise MemoryError() * */ - __Pyx_TraceLine(695,0,__PYX_ERR(3, 695, __pyx_L1_error)) xmlFreeDoc(__pyx_v_c_doc); /* "src/lxml/xslt.pxi":696 @@ -201424,7 +187301,6 @@ static struct __pyx_obj_4lxml_5etree_XSLT *__pyx_f_4lxml_5etree__copyXSLT(struct * * return new_xslt */ - __Pyx_TraceLine(696,0,__PYX_ERR(3, 696, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(3, 696, __pyx_L1_error) /* "src/lxml/xslt.pxi":694 @@ -201443,7 +187319,6 @@ static struct __pyx_obj_4lxml_5etree_XSLT *__pyx_f_4lxml_5etree__copyXSLT(struct * * @cython.final */ - __Pyx_TraceLine(698,0,__PYX_ERR(3, 698, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_new_xslt)); __pyx_r = __pyx_v_new_xslt; @@ -201465,7 +187340,6 @@ static struct __pyx_obj_4lxml_5etree_XSLT *__pyx_f_4lxml_5etree__copyXSLT(struct __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_new_xslt); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -201481,7 +187355,7 @@ static struct __pyx_obj_4lxml_5etree_XSLT *__pyx_f_4lxml_5etree__copyXSLT(struct /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_15_XSLTResultTree_1write_output(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_15_XSLTResultTree_write_output[] = "write_output(self, file, *, compression=0)\n\n Serialise the XSLT output to a file or file-like object.\n\n As opposed to the generic ``.write()`` method, ``.write_output()`` serialises\n the result as defined by the ```` tag.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_15_XSLTResultTree_1write_output = {"write_output", (PyCFunction)__pyx_pw_4lxml_5etree_15_XSLTResultTree_1write_output, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_15_XSLTResultTree_write_output}; +static PyMethodDef __pyx_mdef_4lxml_5etree_15_XSLTResultTree_1write_output = {"write_output", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_15_XSLTResultTree_1write_output, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_15_XSLTResultTree_write_output}; static PyObject *__pyx_pw_4lxml_5etree_15_XSLTResultTree_1write_output(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_file = 0; PyObject *__pyx_v_compression = 0; @@ -201548,17 +187422,15 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p PyObject *__pyx_v_file_path = NULL; char *__pyx_v_c_filename; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; + PyObject *__pyx_t_5 = NULL; int __pyx_t_6; - __Pyx_TraceFrameInit(__pyx_codeobj__359) + int __pyx_t_7; __Pyx_RefNannySetupContext("write_output", 0); - __Pyx_TraceCall("write_output", __pyx_f[3], 713, 0, __PYX_ERR(3, 713, __pyx_L1_error)); /* "src/lxml/xslt.pxi":721 * the result as defined by the ```` tag. @@ -201567,7 +187439,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * cdef _Document doc * cdef int r, c_compression */ - __Pyx_TraceLine(721,0,__PYX_ERR(3, 721, __pyx_L1_error)) __Pyx_INCREF(Py_None); __pyx_v_writer = ((struct __pyx_obj_4lxml_5etree__FilelikeWriter *)Py_None); @@ -201578,7 +187449,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * cdef tree.xmlOutputBuffer* c_buffer * */ - __Pyx_TraceLine(724,0,__PYX_ERR(3, 724, __pyx_L1_error)) __pyx_v_c_encoding = NULL; /* "src/lxml/xslt.pxi":727 @@ -201588,7 +187458,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * doc = self._context_node._doc * else: */ - __Pyx_TraceLine(727,0,__PYX_ERR(3, 727, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_self->__pyx_base._context_node) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -201600,7 +187469,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * else: * doc = None */ - __Pyx_TraceLine(728,0,__PYX_ERR(3, 728, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_v_self->__pyx_base._context_node->_doc); __Pyx_INCREF(__pyx_t_3); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_3); @@ -201623,7 +187491,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * if doc is None: * doc = self._doc */ - __Pyx_TraceLine(730,0,__PYX_ERR(3, 730, __pyx_L1_error)) /*else*/ { __Pyx_INCREF(Py_None); __pyx_v_doc = ((struct LxmlDocument *)Py_None); @@ -201637,7 +187504,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * doc = self._doc * if doc is None: */ - __Pyx_TraceLine(731,0,__PYX_ERR(3, 731, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)__pyx_v_doc) == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -201649,7 +187515,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * if doc is None: * raise XSLTSaveError("No document to serialise") */ - __Pyx_TraceLine(732,0,__PYX_ERR(3, 732, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_v_self->__pyx_base._doc); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_doc, ((struct LxmlDocument *)__pyx_t_3)); @@ -201662,7 +187527,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * raise XSLTSaveError("No document to serialise") * c_compression = compression or 0 */ - __Pyx_TraceLine(733,0,__PYX_ERR(3, 733, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_doc) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { @@ -201674,14 +187538,25 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * c_compression = compression or 0 * if _isString(file): */ - __Pyx_TraceLine(734,0,__PYX_ERR(3, 734, __pyx_L1_error)) - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_XSLTSaveError); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 734, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__360, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 734, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_XSLTSaveError); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_No_document_to_serialise) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_No_document_to_serialise); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 734, __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(3, 734, __pyx_L1_error) /* "src/lxml/xslt.pxi":733 @@ -201709,17 +187584,16 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * if _isString(file): * file_path = _encodeFilename(file) */ - __Pyx_TraceLine(735,0,__PYX_ERR(3, 735, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_compression); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 735, __pyx_L1_error) if (!__pyx_t_2) { } else { - __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_compression); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 735, __pyx_L1_error) - __pyx_t_5 = __pyx_t_6; + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_compression); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 735, __pyx_L1_error) + __pyx_t_6 = __pyx_t_7; goto __pyx_L6_bool_binop_done; } - __pyx_t_5 = 0; + __pyx_t_6 = 0; __pyx_L6_bool_binop_done:; - __pyx_v_c_compression = __pyx_t_5; + __pyx_v_c_compression = __pyx_t_6; /* "src/lxml/xslt.pxi":736 * raise XSLTSaveError("No document to serialise") @@ -201728,7 +187602,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * file_path = _encodeFilename(file) * c_filename = _cstr(file_path) */ - __Pyx_TraceLine(736,0,__PYX_ERR(3, 736, __pyx_L1_error)) __pyx_t_2 = (_isString(__pyx_v_file) != 0); if (__pyx_t_2) { @@ -201739,11 +187612,10 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * c_filename = _cstr(file_path) * with nogil: */ - __Pyx_TraceLine(737,0,__PYX_ERR(3, 737, __pyx_L1_error)) - __pyx_t_4 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_file); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 737, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_v_file_path = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_t_3 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_file); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 737, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_file_path = __pyx_t_3; + __pyx_t_3 = 0; /* "src/lxml/xslt.pxi":738 * if _isString(file): @@ -201752,7 +187624,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * with nogil: * r = xslt.xsltSaveResultToFilename( */ - __Pyx_TraceLine(738,0,__PYX_ERR(3, 738, __pyx_L1_error)) __pyx_v_c_filename = PyBytes_AS_STRING(__pyx_v_file_path); /* "src/lxml/xslt.pxi":739 @@ -201762,7 +187633,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * r = xslt.xsltSaveResultToFilename( * c_filename, doc._c_doc, self._xslt._c_style, c_compression) */ - __Pyx_TraceLine(739,0,__PYX_ERR(3, 739, __pyx_L1_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -201778,7 +187648,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * c_filename, doc._c_doc, self._xslt._c_style, c_compression) * else: */ - __Pyx_TraceLine(740,1,__PYX_ERR(3, 740, __pyx_L10_error)) __pyx_v_r = xsltSaveResultToFilename(__pyx_v_c_filename, __pyx_v_doc->_c_doc, __pyx_v_self->_xslt->_c_style, __pyx_v_c_compression); } @@ -201789,7 +187658,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * r = xslt.xsltSaveResultToFilename( * c_filename, doc._c_doc, self._xslt._c_style, c_compression) */ - __Pyx_TraceLine(739,1,__PYX_ERR(3, 739, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -201798,13 +187666,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p #endif goto __pyx_L11; } - __pyx_L10_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L1_error; - } __pyx_L11:; } } @@ -201826,7 +187687,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * writer = _create_output_buffer(file, c_encoding, compression, &c_buffer, close=False) * if writer is None: */ - __Pyx_TraceLine(743,0,__PYX_ERR(3, 743, __pyx_L1_error)) /*else*/ { LXML_GET_XSLT_ENCODING(__pyx_v_c_encoding, __pyx_v_self->_xslt->_c_style); @@ -201837,12 +187697,11 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * if writer is None: * with nogil: */ - __Pyx_TraceLine(744,0,__PYX_ERR(3, 744, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_compression); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 744, __pyx_L1_error) - __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__create_output_buffer(__pyx_v_file, ((const char *)__pyx_v_c_encoding), __pyx_t_5, (&__pyx_v_c_buffer), 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 744, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF_SET(__pyx_v_writer, ((struct __pyx_obj_4lxml_5etree__FilelikeWriter *)__pyx_t_4)); - __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_compression); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 744, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__create_output_buffer(__pyx_v_file, ((const char *)__pyx_v_c_encoding), __pyx_t_6, (&__pyx_v_c_buffer), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 744, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_writer, ((struct __pyx_obj_4lxml_5etree__FilelikeWriter *)__pyx_t_3)); + __pyx_t_3 = 0; /* "src/lxml/xslt.pxi":745 * xslt.LXML_GET_XSLT_ENCODING(c_encoding, self._xslt._c_style) @@ -201851,7 +187710,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * with nogil: * r = xslt.xsltSaveResultTo(c_buffer, doc._c_doc, self._xslt._c_style) */ - __Pyx_TraceLine(745,0,__PYX_ERR(3, 745, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)__pyx_v_writer) == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -201863,7 +187721,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * r = xslt.xsltSaveResultTo(c_buffer, doc._c_doc, self._xslt._c_style) * else: */ - __Pyx_TraceLine(746,0,__PYX_ERR(3, 746, __pyx_L1_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -201879,7 +187736,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * else: * r = xslt.xsltSaveResultTo(c_buffer, doc._c_doc, self._xslt._c_style) */ - __Pyx_TraceLine(747,1,__PYX_ERR(3, 747, __pyx_L14_error)) __pyx_v_r = xsltSaveResultTo(__pyx_v_c_buffer, __pyx_v_doc->_c_doc, __pyx_v_self->_xslt->_c_style); } @@ -201890,7 +187746,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * r = xslt.xsltSaveResultTo(c_buffer, doc._c_doc, self._xslt._c_style) * else: */ - __Pyx_TraceLine(746,1,__PYX_ERR(3, 746, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -201899,13 +187754,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p #endif goto __pyx_L15; } - __pyx_L14_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L1_error; - } __pyx_L15:; } } @@ -201927,7 +187775,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * if writer is not None: * writer._exc_context._raise_if_stored() */ - __Pyx_TraceLine(749,0,__PYX_ERR(3, 749, __pyx_L1_error)) /*else*/ { __pyx_v_r = xsltSaveResultTo(__pyx_v_c_buffer, __pyx_v_doc->_c_doc, __pyx_v_self->_xslt->_c_style); } @@ -201942,7 +187789,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * writer._exc_context._raise_if_stored() * if r == -1: */ - __Pyx_TraceLine(750,0,__PYX_ERR(3, 750, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_writer) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -201954,8 +187800,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * if r == -1: * python.PyErr_SetFromErrno(XSLTSaveError) # raises */ - __Pyx_TraceLine(751,0,__PYX_ERR(3, 751, __pyx_L1_error)) - __pyx_t_5 = ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_writer->_exc_context->__pyx_vtab)->_raise_if_stored(__pyx_v_writer->_exc_context); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 751, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_writer->_exc_context->__pyx_vtab)->_raise_if_stored(__pyx_v_writer->_exc_context); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(3, 751, __pyx_L1_error) /* "src/lxml/xslt.pxi":750 * else: @@ -201973,7 +187818,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * python.PyErr_SetFromErrno(XSLTSaveError) # raises * */ - __Pyx_TraceLine(752,0,__PYX_ERR(3, 752, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_r == -1L) != 0); if (__pyx_t_2) { @@ -201984,13 +187828,12 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p * * cdef _saveToStringAndSize(self, xmlChar** s, int* l): */ - __Pyx_TraceLine(753,0,__PYX_ERR(3, 753, __pyx_L1_error)) - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_XSLTSaveError); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 753, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyErr_SetFromErrno(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 753, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_XSLTSaveError); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 753, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyErr_SetFromErrno(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 753, __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; /* "src/lxml/xslt.pxi":752 * if writer is not None: @@ -202015,6 +187858,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("lxml.etree._XSLTResultTree.write_output", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -202022,7 +187866,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_write_output(struct __p __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XDECREF(__pyx_v_file_path); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -202039,13 +187882,11 @@ static PyObject *__pyx_f_4lxml_5etree_15_XSLTResultTree__saveToStringAndSize(str struct LxmlDocument *__pyx_v_doc = 0; int __pyx_v_r; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_saveToStringAndSize", 0); - __Pyx_TraceCall("_saveToStringAndSize", __pyx_f[3], 755, 0, __PYX_ERR(3, 755, __pyx_L1_error)); /* "src/lxml/xslt.pxi":758 * cdef _Document doc @@ -202054,7 +187895,6 @@ static PyObject *__pyx_f_4lxml_5etree_15_XSLTResultTree__saveToStringAndSize(str * doc = self._context_node._doc * else: */ - __Pyx_TraceLine(758,0,__PYX_ERR(3, 758, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_self->__pyx_base._context_node) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -202066,7 +187906,6 @@ static PyObject *__pyx_f_4lxml_5etree_15_XSLTResultTree__saveToStringAndSize(str * else: * doc = None */ - __Pyx_TraceLine(759,0,__PYX_ERR(3, 759, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_v_self->__pyx_base._context_node->_doc); __Pyx_INCREF(__pyx_t_3); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_3); @@ -202089,7 +187928,6 @@ static PyObject *__pyx_f_4lxml_5etree_15_XSLTResultTree__saveToStringAndSize(str * if doc is None: * doc = self._doc */ - __Pyx_TraceLine(761,0,__PYX_ERR(3, 761, __pyx_L1_error)) /*else*/ { __Pyx_INCREF(Py_None); __pyx_v_doc = ((struct LxmlDocument *)Py_None); @@ -202103,7 +187941,6 @@ static PyObject *__pyx_f_4lxml_5etree_15_XSLTResultTree__saveToStringAndSize(str * doc = self._doc * if doc is None: */ - __Pyx_TraceLine(762,0,__PYX_ERR(3, 762, __pyx_L1_error)) __pyx_t_2 = (((PyObject *)__pyx_v_doc) == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -202115,7 +187952,6 @@ static PyObject *__pyx_f_4lxml_5etree_15_XSLTResultTree__saveToStringAndSize(str * if doc is None: * s[0] = NULL */ - __Pyx_TraceLine(763,0,__PYX_ERR(3, 763, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_v_self->__pyx_base._doc); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_doc, ((struct LxmlDocument *)__pyx_t_3)); @@ -202128,7 +187964,6 @@ static PyObject *__pyx_f_4lxml_5etree_15_XSLTResultTree__saveToStringAndSize(str * s[0] = NULL * return */ - __Pyx_TraceLine(764,0,__PYX_ERR(3, 764, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_doc) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -202140,7 +187975,6 @@ static PyObject *__pyx_f_4lxml_5etree_15_XSLTResultTree__saveToStringAndSize(str * return * with nogil: */ - __Pyx_TraceLine(765,0,__PYX_ERR(3, 765, __pyx_L1_error)) (__pyx_v_s[0]) = NULL; /* "src/lxml/xslt.pxi":766 @@ -202150,7 +187984,6 @@ static PyObject *__pyx_f_4lxml_5etree_15_XSLTResultTree__saveToStringAndSize(str * with nogil: * r = xslt.xsltSaveResultToString(s, l, doc._c_doc, */ - __Pyx_TraceLine(766,0,__PYX_ERR(3, 766, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -202180,7 +188013,6 @@ static PyObject *__pyx_f_4lxml_5etree_15_XSLTResultTree__saveToStringAndSize(str * r = xslt.xsltSaveResultToString(s, l, doc._c_doc, * self._xslt._c_style) */ - __Pyx_TraceLine(767,0,__PYX_ERR(3, 767, __pyx_L1_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -202196,7 +188028,6 @@ static PyObject *__pyx_f_4lxml_5etree_15_XSLTResultTree__saveToStringAndSize(str * self._xslt._c_style) * if r == -1: */ - __Pyx_TraceLine(768,1,__PYX_ERR(3, 768, __pyx_L7_error)) __pyx_v_r = xsltSaveResultToString(__pyx_v_s, __pyx_v_l, __pyx_v_doc->_c_doc, __pyx_v_self->_xslt->_c_style); } @@ -202207,7 +188038,6 @@ static PyObject *__pyx_f_4lxml_5etree_15_XSLTResultTree__saveToStringAndSize(str * r = xslt.xsltSaveResultToString(s, l, doc._c_doc, * self._xslt._c_style) */ - __Pyx_TraceLine(767,1,__PYX_ERR(3, 767, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -202216,13 +188046,6 @@ static PyObject *__pyx_f_4lxml_5etree_15_XSLTResultTree__saveToStringAndSize(str #endif goto __pyx_L8; } - __pyx_L7_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L1_error; - } __pyx_L8:; } } @@ -202234,7 +188057,6 @@ static PyObject *__pyx_f_4lxml_5etree_15_XSLTResultTree__saveToStringAndSize(str * raise MemoryError() * */ - __Pyx_TraceLine(770,0,__PYX_ERR(3, 770, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_r == -1L) != 0); if (unlikely(__pyx_t_2)) { @@ -202245,7 +188067,6 @@ static PyObject *__pyx_f_4lxml_5etree_15_XSLTResultTree__saveToStringAndSize(str * * def __str__(self): */ - __Pyx_TraceLine(771,0,__PYX_ERR(3, 771, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(3, 771, __pyx_L1_error) /* "src/lxml/xslt.pxi":770 @@ -202275,7 +188096,6 @@ static PyObject *__pyx_f_4lxml_5etree_15_XSLTResultTree__saveToStringAndSize(str __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -202306,7 +188126,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_2__str__(struct __pyx_o int __pyx_v_l; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -202322,7 +188141,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_2__str__(struct __pyx_o PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; __Pyx_RefNannySetupContext("__str__", 0); - __Pyx_TraceCall("__str__", __pyx_f[3], 773, 0, __PYX_ERR(3, 773, __pyx_L1_error)); /* "src/lxml/xslt.pxi":774 * @@ -202331,7 +188149,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_2__str__(struct __pyx_o * cdef int l = 0 * if not python.IS_PYTHON2: */ - __Pyx_TraceLine(774,0,__PYX_ERR(3, 774, __pyx_L1_error)) __pyx_v_s = NULL; /* "src/lxml/xslt.pxi":775 @@ -202341,7 +188158,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_2__str__(struct __pyx_o * if not python.IS_PYTHON2: * return self.__unicode__() */ - __Pyx_TraceLine(775,0,__PYX_ERR(3, 775, __pyx_L1_error)) __pyx_v_l = 0; /* "src/lxml/xslt.pxi":776 @@ -202351,7 +188167,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_2__str__(struct __pyx_o * return self.__unicode__() * self._saveToStringAndSize(&s, &l) */ - __Pyx_TraceLine(776,0,__PYX_ERR(3, 776, __pyx_L1_error)) __pyx_t_1 = ((!(IS_PYTHON2 != 0)) != 0); if (__pyx_t_1) { @@ -202362,7 +188177,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_2__str__(struct __pyx_o * self._saveToStringAndSize(&s, &l) * if s is NULL: */ - __Pyx_TraceLine(777,0,__PYX_ERR(3, 777, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unicode_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 777, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -202376,12 +188190,9 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_2__str__(struct __pyx_o __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 777, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 777, __pyx_L1_error) - } + __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(3, 777, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -202404,7 +188215,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_2__str__(struct __pyx_o * if s is NULL: * return '' */ - __Pyx_TraceLine(778,0,__PYX_ERR(3, 778, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree_15_XSLTResultTree__saveToStringAndSize(__pyx_v_self, (&__pyx_v_s), (&__pyx_v_l)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -202416,7 +188226,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_2__str__(struct __pyx_o * return '' * # we must not use 'funicode()' here as this is not always UTF-8 */ - __Pyx_TraceLine(779,0,__PYX_ERR(3, 779, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_s == NULL) != 0); if (__pyx_t_1) { @@ -202427,10 +188236,9 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_2__str__(struct __pyx_o * # we must not use 'funicode()' here as this is not always UTF-8 * try: */ - __Pyx_TraceLine(780,0,__PYX_ERR(3, 780, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_kp_s__23); - __pyx_r = __pyx_kp_s__23; + __Pyx_INCREF(__pyx_kp_s__11); + __pyx_r = __pyx_kp_s__11; goto __pyx_L0; /* "src/lxml/xslt.pxi":779 @@ -202449,7 +188257,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_2__str__(struct __pyx_o * result = s[:l] * finally: */ - __Pyx_TraceLine(782,0,__PYX_ERR(3, 782, __pyx_L6_error)) /*try:*/ { /* "src/lxml/xslt.pxi":783 @@ -202459,7 +188266,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_2__str__(struct __pyx_o * finally: * tree.xmlFree(s) */ - __Pyx_TraceLine(783,0,__PYX_ERR(3, 783, __pyx_L6_error)) __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_s) + 0, __pyx_v_l - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 783, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_t_2; @@ -202476,7 +188282,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_2__str__(struct __pyx_o * return result * */ - __Pyx_TraceLine(785,0,__PYX_ERR(3, 785, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ xmlFree(__pyx_v_s); @@ -202526,7 +188331,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_2__str__(struct __pyx_o * * def __unicode__(self): */ - __Pyx_TraceLine(786,0,__PYX_ERR(3, 786, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; @@ -202550,7 +188354,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_2__str__(struct __pyx_o __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -202583,7 +188386,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_4__unicode__(struct __p int __pyx_v_l; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -202597,9 +188399,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_4__unicode__(struct __p PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__361) __Pyx_RefNannySetupContext("__unicode__", 0); - __Pyx_TraceCall("__unicode__", __pyx_f[3], 788, 0, __PYX_ERR(3, 788, __pyx_L1_error)); /* "src/lxml/xslt.pxi":790 * def __unicode__(self): @@ -202608,7 +188408,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_4__unicode__(struct __p * cdef int l = 0 * self._saveToStringAndSize(&s, &l) */ - __Pyx_TraceLine(790,0,__PYX_ERR(3, 790, __pyx_L1_error)) __pyx_v_s = NULL; /* "src/lxml/xslt.pxi":791 @@ -202618,7 +188417,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_4__unicode__(struct __p * self._saveToStringAndSize(&s, &l) * if s is NULL: */ - __Pyx_TraceLine(791,0,__PYX_ERR(3, 791, __pyx_L1_error)) __pyx_v_l = 0; /* "src/lxml/xslt.pxi":792 @@ -202628,7 +188426,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_4__unicode__(struct __p * if s is NULL: * return u'' */ - __Pyx_TraceLine(792,0,__PYX_ERR(3, 792, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_15_XSLTResultTree__saveToStringAndSize(__pyx_v_self, (&__pyx_v_s), (&__pyx_v_l)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -202640,7 +188437,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_4__unicode__(struct __p * return u'' * encoding = self._xslt._c_style.encoding */ - __Pyx_TraceLine(793,0,__PYX_ERR(3, 793, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_s == NULL) != 0); if (__pyx_t_2) { @@ -202651,10 +188447,9 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_4__unicode__(struct __p * encoding = self._xslt._c_style.encoding * try: */ - __Pyx_TraceLine(794,0,__PYX_ERR(3, 794, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_kp_u__23); - __pyx_r = __pyx_kp_u__23; + __Pyx_INCREF(__pyx_kp_u__11); + __pyx_r = __pyx_kp_u__11; goto __pyx_L0; /* "src/lxml/xslt.pxi":793 @@ -202673,7 +188468,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_4__unicode__(struct __p * try: * if encoding is NULL: */ - __Pyx_TraceLine(795,0,__PYX_ERR(3, 795, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->_xslt->_c_style->encoding; __pyx_v_encoding = __pyx_t_3; @@ -202684,7 +188478,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_4__unicode__(struct __p * if encoding is NULL: * result = s[:l].decode('UTF-8') */ - __Pyx_TraceLine(796,0,__PYX_ERR(3, 796, __pyx_L5_error)) /*try:*/ { /* "src/lxml/xslt.pxi":797 @@ -202694,7 +188487,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_4__unicode__(struct __p * result = s[:l].decode('UTF-8') * else: */ - __Pyx_TraceLine(797,0,__PYX_ERR(3, 797, __pyx_L5_error)) __pyx_t_2 = ((__pyx_v_encoding == NULL) != 0); if (__pyx_t_2) { @@ -202705,7 +188497,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_4__unicode__(struct __p * else: * result = s[:l].decode(encoding) */ - __Pyx_TraceLine(798,0,__PYX_ERR(3, 798, __pyx_L5_error)) __pyx_t_1 = __Pyx_decode_c_string(((char const *)__pyx_v_s), 0, __pyx_v_l, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 798, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = __pyx_t_1; @@ -202728,7 +188519,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_4__unicode__(struct __p * finally: * tree.xmlFree(s) */ - __Pyx_TraceLine(800,0,__PYX_ERR(3, 800, __pyx_L5_error)) /*else*/ { __pyx_t_1 = __Pyx_decode_c_string(((char const *)__pyx_v_s), 0, __pyx_v_l, ((char const *)__pyx_v_encoding), NULL, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 800, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); @@ -202745,7 +188535,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_4__unicode__(struct __p * return _stripEncodingDeclaration(result) * */ - __Pyx_TraceLine(802,0,__PYX_ERR(3, 802, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ xmlFree(__pyx_v_s); @@ -202793,7 +188582,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_4__unicode__(struct __p * * def __getbuffer__(self, Py_buffer* buffer, int flags): */ - __Pyx_TraceLine(803,0,__PYX_ERR(3, 803, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4lxml_5etree__stripEncodingDeclaration(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 803, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -202817,7 +188605,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_4__unicode__(struct __p __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -202846,7 +188633,6 @@ static CYTHON_UNUSED int __pyx_pw_4lxml_5etree_15_XSLTResultTree_7__getbuffer__( static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_obj_4lxml_5etree__XSLTResultTree *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags) { int __pyx_v_l; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -202860,7 +188646,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o __Pyx_RefNannySetupContext("__getbuffer__", 0); __pyx_v_buffer->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_buffer->obj); - __Pyx_TraceCall("__getbuffer__", __pyx_f[3], 805, 0, __PYX_ERR(3, 805, __pyx_L1_error)); /* "src/lxml/xslt.pxi":806 * @@ -202869,7 +188654,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * if buffer is NULL: * return */ - __Pyx_TraceLine(806,0,__PYX_ERR(3, 806, __pyx_L1_error)) __pyx_v_l = 0; /* "src/lxml/xslt.pxi":807 @@ -202879,7 +188663,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * return * if self._buffer is NULL or flags & python.PyBUF_WRITABLE: */ - __Pyx_TraceLine(807,0,__PYX_ERR(3, 807, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_buffer == NULL) != 0); if (__pyx_t_1) { @@ -202890,7 +188673,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * if self._buffer is NULL or flags & python.PyBUF_WRITABLE: * self._saveToStringAndSize(&buffer.buf, &l) */ - __Pyx_TraceLine(808,0,__PYX_ERR(3, 808, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -202910,7 +188692,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * self._saveToStringAndSize(&buffer.buf, &l) * buffer.len = l */ - __Pyx_TraceLine(809,0,__PYX_ERR(3, 809, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->_buffer == NULL) != 0); if (!__pyx_t_2) { } else { @@ -202929,7 +188710,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * buffer.len = l * if self._buffer is NULL and not flags & python.PyBUF_WRITABLE: */ - __Pyx_TraceLine(810,0,__PYX_ERR(3, 810, __pyx_L1_error)) __pyx_t_3 = __pyx_f_4lxml_5etree_15_XSLTResultTree__saveToStringAndSize(__pyx_v_self, ((xmlChar **)(&__pyx_v_buffer->buf)), (&__pyx_v_l)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 810, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -202941,7 +188721,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * if self._buffer is NULL and not flags & python.PyBUF_WRITABLE: * self._buffer = buffer.buf */ - __Pyx_TraceLine(811,0,__PYX_ERR(3, 811, __pyx_L1_error)) __pyx_v_buffer->len = __pyx_v_l; /* "src/lxml/xslt.pxi":812 @@ -202951,7 +188730,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * self._buffer = buffer.buf * self._buffer_len = l */ - __Pyx_TraceLine(812,0,__PYX_ERR(3, 812, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->_buffer == NULL) != 0); if (__pyx_t_2) { } else { @@ -202970,7 +188748,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * self._buffer_len = l * self._buffer_refcnt = 1 */ - __Pyx_TraceLine(813,0,__PYX_ERR(3, 813, __pyx_L1_error)) __pyx_v_self->_buffer = ((xmlChar *)__pyx_v_buffer->buf); /* "src/lxml/xslt.pxi":814 @@ -202980,7 +188757,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * self._buffer_refcnt = 1 * else: */ - __Pyx_TraceLine(814,0,__PYX_ERR(3, 814, __pyx_L1_error)) __pyx_v_self->_buffer_len = __pyx_v_l; /* "src/lxml/xslt.pxi":815 @@ -202990,7 +188766,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * else: * buffer.buf = self._buffer */ - __Pyx_TraceLine(815,0,__PYX_ERR(3, 815, __pyx_L1_error)) __pyx_v_self->_buffer_refcnt = 1; /* "src/lxml/xslt.pxi":812 @@ -203019,7 +188794,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * buffer.len = self._buffer_len * self._buffer_refcnt += 1 */ - __Pyx_TraceLine(817,0,__PYX_ERR(3, 817, __pyx_L1_error)) /*else*/ { __pyx_t_4 = __pyx_v_self->_buffer; __pyx_v_buffer->buf = __pyx_t_4; @@ -203031,7 +188805,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * self._buffer_refcnt += 1 * if flags & python.PyBUF_WRITABLE: */ - __Pyx_TraceLine(818,0,__PYX_ERR(3, 818, __pyx_L1_error)) __pyx_t_5 = __pyx_v_self->_buffer_len; __pyx_v_buffer->len = __pyx_t_5; @@ -203042,7 +188815,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * if flags & python.PyBUF_WRITABLE: * buffer.readonly = 0 */ - __Pyx_TraceLine(819,0,__PYX_ERR(3, 819, __pyx_L1_error)) __pyx_v_self->_buffer_refcnt = (__pyx_v_self->_buffer_refcnt + 1); } __pyx_L4:; @@ -203054,7 +188826,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * buffer.readonly = 0 * else: */ - __Pyx_TraceLine(820,0,__PYX_ERR(3, 820, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0); if (__pyx_t_1) { @@ -203065,7 +188836,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * else: * buffer.readonly = 1 */ - __Pyx_TraceLine(821,0,__PYX_ERR(3, 821, __pyx_L1_error)) __pyx_v_buffer->readonly = 0; /* "src/lxml/xslt.pxi":820 @@ -203085,7 +188855,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * if flags & python.PyBUF_FORMAT: * buffer.format = "B" */ - __Pyx_TraceLine(823,0,__PYX_ERR(3, 823, __pyx_L1_error)) /*else*/ { __pyx_v_buffer->readonly = 1; } @@ -203098,7 +188867,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * buffer.format = "B" * else: */ - __Pyx_TraceLine(824,0,__PYX_ERR(3, 824, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0); if (__pyx_t_1) { @@ -203109,7 +188877,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * else: * buffer.format = NULL */ - __Pyx_TraceLine(825,0,__PYX_ERR(3, 825, __pyx_L1_error)) __pyx_v_buffer->format = ((char *)"B"); /* "src/lxml/xslt.pxi":824 @@ -203129,7 +188896,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * buffer.ndim = 0 * buffer.shape = NULL */ - __Pyx_TraceLine(827,0,__PYX_ERR(3, 827, __pyx_L1_error)) /*else*/ { __pyx_v_buffer->format = NULL; } @@ -203142,7 +188908,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * buffer.shape = NULL * buffer.strides = NULL */ - __Pyx_TraceLine(828,0,__PYX_ERR(3, 828, __pyx_L1_error)) __pyx_v_buffer->ndim = 0; /* "src/lxml/xslt.pxi":829 @@ -203152,7 +188917,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * buffer.strides = NULL * buffer.suboffsets = NULL */ - __Pyx_TraceLine(829,0,__PYX_ERR(3, 829, __pyx_L1_error)) __pyx_v_buffer->shape = NULL; /* "src/lxml/xslt.pxi":830 @@ -203162,7 +188926,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * buffer.suboffsets = NULL * buffer.itemsize = 1 */ - __Pyx_TraceLine(830,0,__PYX_ERR(3, 830, __pyx_L1_error)) __pyx_v_buffer->strides = NULL; /* "src/lxml/xslt.pxi":831 @@ -203172,7 +188935,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * buffer.itemsize = 1 * buffer.internal = NULL */ - __Pyx_TraceLine(831,0,__PYX_ERR(3, 831, __pyx_L1_error)) __pyx_v_buffer->suboffsets = NULL; /* "src/lxml/xslt.pxi":832 @@ -203182,7 +188944,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * buffer.internal = NULL * if buffer.obj is not self: # set by Cython? */ - __Pyx_TraceLine(832,0,__PYX_ERR(3, 832, __pyx_L1_error)) __pyx_v_buffer->itemsize = 1; /* "src/lxml/xslt.pxi":833 @@ -203192,7 +188953,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * if buffer.obj is not self: # set by Cython? * buffer.obj = self */ - __Pyx_TraceLine(833,0,__PYX_ERR(3, 833, __pyx_L1_error)) __pyx_v_buffer->internal = NULL; /* "src/lxml/xslt.pxi":834 @@ -203202,7 +188962,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * buffer.obj = self * */ - __Pyx_TraceLine(834,0,__PYX_ERR(3, 834, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_buffer->obj != ((PyObject *)__pyx_v_self)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -203214,7 +188973,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o * * def __releasebuffer__(self, Py_buffer* buffer): */ - __Pyx_TraceLine(835,0,__PYX_ERR(3, 835, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); __Pyx_GOTREF(__pyx_v_buffer->obj); @@ -203256,7 +189014,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_6__getbuffer__(struct __pyx_o __Pyx_DECREF(__pyx_v_buffer->obj); __pyx_v_buffer->obj = 0; } __pyx_L2:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -203281,11 +189038,9 @@ static CYTHON_UNUSED void __pyx_pw_4lxml_5etree_15_XSLTResultTree_9__releasebuff } static void __pyx_pf_4lxml_5etree_15_XSLTResultTree_8__releasebuffer__(struct __pyx_obj_4lxml_5etree__XSLTResultTree *__pyx_v_self, Py_buffer *__pyx_v_buffer) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__releasebuffer__", 0); - __Pyx_TraceCall("__releasebuffer__", __pyx_f[3], 837, 0, __PYX_ERR(3, 837, __pyx_L1_error)); /* "src/lxml/xslt.pxi":838 * @@ -203294,7 +189049,6 @@ static void __pyx_pf_4lxml_5etree_15_XSLTResultTree_8__releasebuffer__(struct __ * return * if buffer.buf is self._buffer: */ - __Pyx_TraceLine(838,0,__PYX_ERR(3, 838, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_buffer == NULL) != 0); if (__pyx_t_1) { @@ -203305,7 +189059,6 @@ static void __pyx_pf_4lxml_5etree_15_XSLTResultTree_8__releasebuffer__(struct __ * if buffer.buf is self._buffer: * self._buffer_refcnt -= 1 */ - __Pyx_TraceLine(839,0,__PYX_ERR(3, 839, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/xslt.pxi":838 @@ -203324,7 +189077,6 @@ static void __pyx_pf_4lxml_5etree_15_XSLTResultTree_8__releasebuffer__(struct __ * self._buffer_refcnt -= 1 * if self._buffer_refcnt == 0: */ - __Pyx_TraceLine(840,0,__PYX_ERR(3, 840, __pyx_L1_error)) __pyx_t_1 = ((((xmlChar *)__pyx_v_buffer->buf) == __pyx_v_self->_buffer) != 0); if (__pyx_t_1) { @@ -203335,7 +189087,6 @@ static void __pyx_pf_4lxml_5etree_15_XSLTResultTree_8__releasebuffer__(struct __ * if self._buffer_refcnt == 0: * tree.xmlFree(self._buffer) */ - __Pyx_TraceLine(841,0,__PYX_ERR(3, 841, __pyx_L1_error)) __pyx_v_self->_buffer_refcnt = (__pyx_v_self->_buffer_refcnt - 1); /* "src/lxml/xslt.pxi":842 @@ -203345,7 +189096,6 @@ static void __pyx_pf_4lxml_5etree_15_XSLTResultTree_8__releasebuffer__(struct __ * tree.xmlFree(self._buffer) * self._buffer = NULL */ - __Pyx_TraceLine(842,0,__PYX_ERR(3, 842, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_buffer_refcnt == 0) != 0); if (__pyx_t_1) { @@ -203356,7 +189106,6 @@ static void __pyx_pf_4lxml_5etree_15_XSLTResultTree_8__releasebuffer__(struct __ * self._buffer = NULL * else: */ - __Pyx_TraceLine(843,0,__PYX_ERR(3, 843, __pyx_L1_error)) xmlFree(((char *)__pyx_v_self->_buffer)); /* "src/lxml/xslt.pxi":844 @@ -203366,7 +189115,6 @@ static void __pyx_pf_4lxml_5etree_15_XSLTResultTree_8__releasebuffer__(struct __ * else: * tree.xmlFree(buffer.buf) */ - __Pyx_TraceLine(844,0,__PYX_ERR(3, 844, __pyx_L1_error)) __pyx_v_self->_buffer = NULL; /* "src/lxml/xslt.pxi":842 @@ -203395,7 +189143,6 @@ static void __pyx_pf_4lxml_5etree_15_XSLTResultTree_8__releasebuffer__(struct __ * buffer.buf = NULL * */ - __Pyx_TraceLine(846,0,__PYX_ERR(3, 846, __pyx_L1_error)) /*else*/ { xmlFree(((char *)__pyx_v_buffer->buf)); } @@ -203408,7 +189155,6 @@ static void __pyx_pf_4lxml_5etree_15_XSLTResultTree_8__releasebuffer__(struct __ * * property xslt_profile: */ - __Pyx_TraceLine(847,0,__PYX_ERR(3, 847, __pyx_L1_error)) __pyx_v_buffer->buf = NULL; /* "src/lxml/xslt.pxi":837 @@ -203420,11 +189166,7 @@ static void __pyx_pf_4lxml_5etree_15_XSLTResultTree_8__releasebuffer__(struct __ */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._XSLTResultTree.__releasebuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -203452,16 +189194,13 @@ static PyObject *__pyx_pw_4lxml_5etree_15_XSLTResultTree_12xslt_profile_1__get__ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_12xslt_profile___get__(struct __pyx_obj_4lxml_5etree__XSLTResultTree *__pyx_v_self) { PyObject *__pyx_v_root = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[3], 852, 0, __PYX_ERR(3, 852, __pyx_L1_error)); /* "src/lxml/xslt.pxi":854 * def __get__(self): @@ -203470,7 +189209,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_12xslt_profile___get__( * return None * root = self._profile.getroot() */ - __Pyx_TraceLine(854,0,__PYX_ERR(3, 854, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_self->_profile) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -203482,7 +189220,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_12xslt_profile___get__( * root = self._profile.getroot() * if root is None: */ - __Pyx_TraceLine(855,0,__PYX_ERR(3, 855, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -203503,7 +189240,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_12xslt_profile___get__( * if root is None: * return None */ - __Pyx_TraceLine(856,0,__PYX_ERR(3, 856, __pyx_L1_error)) __pyx_t_3 = __pyx_f_4lxml_5etree_9_Document_getroot(__pyx_v_self->_profile); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_root = __pyx_t_3; @@ -203516,7 +189252,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_12xslt_profile___get__( * return None * return ElementTree(root) */ - __Pyx_TraceLine(857,0,__PYX_ERR(3, 857, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_root == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -203528,7 +189263,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_12xslt_profile___get__( * return ElementTree(root) * */ - __Pyx_TraceLine(858,0,__PYX_ERR(3, 858, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -203549,9 +189283,8 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_12xslt_profile___get__( * * def __del__(self): */ - __Pyx_TraceLine(859,0,__PYX_ERR(3, 859, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ElementTree); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 859, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ElementTree); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 859, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -203563,38 +189296,10 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_12xslt_profile___get__( __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_root); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 859, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_root}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 859, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_root}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 859, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 859, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_INCREF(__pyx_v_root); - __Pyx_GIVEREF(__pyx_v_root); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_root); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 859, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_root) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_root); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 859, __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; @@ -203613,13 +189318,11 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_12xslt_profile___get__( __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("lxml.etree._XSLTResultTree.xslt_profile.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_root); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -203647,10 +189350,8 @@ static int __pyx_pw_4lxml_5etree_15_XSLTResultTree_12xslt_profile_3__del__(PyObj static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_12xslt_profile_2__del__(struct __pyx_obj_4lxml_5etree__XSLTResultTree *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); - __Pyx_TraceCall("__del__", __pyx_f[3], 861, 0, __PYX_ERR(3, 861, __pyx_L1_error)); /* "src/lxml/xslt.pxi":862 * @@ -203659,7 +189360,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_12xslt_profile_2__del__(struc * * cdef _xsltResultTreeFactory(_Document doc, XSLT xslt, _Document profile): */ - __Pyx_TraceLine(862,0,__PYX_ERR(3, 862, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_profile); @@ -203676,12 +189376,6 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_12xslt_profile_2__del__(struc /* function exit code */ __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._XSLTResultTree.xslt_profile.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -203697,12 +189391,10 @@ static int __pyx_pf_4lxml_5etree_15_XSLTResultTree_12xslt_profile_2__del__(struc static PyObject *__pyx_f_4lxml_5etree__xsltResultTreeFactory(struct LxmlDocument *__pyx_v_doc, struct __pyx_obj_4lxml_5etree_XSLT *__pyx_v_xslt, struct LxmlDocument *__pyx_v_profile) { struct __pyx_obj_4lxml_5etree__XSLTResultTree *__pyx_v_result = 0; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_xsltResultTreeFactory", 0); - __Pyx_TraceCall("_xsltResultTreeFactory", __pyx_f[3], 864, 0, __PYX_ERR(3, 864, __pyx_L1_error)); /* "src/lxml/xslt.pxi":866 * cdef _xsltResultTreeFactory(_Document doc, XSLT xslt, _Document profile): @@ -203711,7 +189403,6 @@ static PyObject *__pyx_f_4lxml_5etree__xsltResultTreeFactory(struct LxmlDocument * result._xslt = xslt * result._profile = profile */ - __Pyx_TraceLine(866,0,__PYX_ERR(3, 866, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__newElementTree(__pyx_v_doc, ((struct LxmlElement *)Py_None), ((PyObject *)__pyx_ptype_4lxml_5etree__XSLTResultTree))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 866, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; @@ -203727,7 +189418,6 @@ static PyObject *__pyx_f_4lxml_5etree__xsltResultTreeFactory(struct LxmlDocument * result._profile = profile * return result */ - __Pyx_TraceLine(867,0,__PYX_ERR(3, 867, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_xslt)); __Pyx_GIVEREF(((PyObject *)__pyx_v_xslt)); __Pyx_GOTREF(__pyx_v_result->_xslt); @@ -203741,7 +189431,6 @@ static PyObject *__pyx_f_4lxml_5etree__xsltResultTreeFactory(struct LxmlDocument * return result * */ - __Pyx_TraceLine(868,0,__PYX_ERR(3, 868, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_profile)); __Pyx_GIVEREF(((PyObject *)__pyx_v_profile)); __Pyx_GOTREF(__pyx_v_result->_profile); @@ -203755,7 +189444,6 @@ static PyObject *__pyx_f_4lxml_5etree__xsltResultTreeFactory(struct LxmlDocument * * # functions like "output" and "write" are a potential security risk, but we */ - __Pyx_TraceLine(869,0,__PYX_ERR(3, 869, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyObject *)__pyx_v_result); @@ -203778,7 +189466,6 @@ static PyObject *__pyx_f_4lxml_5etree__xsltResultTreeFactory(struct LxmlDocument __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -203793,7 +189480,6 @@ static PyObject *__pyx_f_4lxml_5etree__xsltResultTreeFactory(struct LxmlDocument static PyObject *__pyx_f_4lxml_5etree__findStylesheetByID(struct LxmlDocument *__pyx_v_doc, PyObject *__pyx_v_id) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -203801,7 +189487,6 @@ static PyObject *__pyx_f_4lxml_5etree__findStylesheetByID(struct LxmlDocument *_ PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_findStylesheetByID", 0); - __Pyx_TraceCall("_findStylesheetByID", __pyx_f[3], 887, 0, __PYX_ERR(3, 887, __pyx_L1_error)); /* "src/lxml/xslt.pxi":889 * cdef _findStylesheetByID(_Document doc, id): @@ -203810,7 +189495,6 @@ static PyObject *__pyx_f_4lxml_5etree__findStylesheetByID(struct LxmlDocument *_ * __findStylesheetByID = XPath( * u"//xsl:stylesheet[@xml:id = $id]", */ - __Pyx_TraceLine(889,0,__PYX_ERR(3, 889, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_4lxml_5etree___findStylesheetByID) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -203822,7 +189506,6 @@ static PyObject *__pyx_f_4lxml_5etree__findStylesheetByID(struct LxmlDocument *_ * return __findStylesheetByID(doc, id=id) * */ - __Pyx_TraceLine(892,0,__PYX_ERR(3, 892, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 892, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 892, __pyx_L1_error) @@ -203838,8 +189521,7 @@ static PyObject *__pyx_f_4lxml_5etree__findStylesheetByID(struct LxmlDocument *_ * u"//xsl:stylesheet[@xml:id = $id]", * namespaces={u"xsl" : u"http://www.w3.org/1999/XSL/Transform"}) */ - __Pyx_TraceLine(890,0,__PYX_ERR(3, 890, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_XPath), __pyx_tuple__362, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 890, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_XPath), __pyx_tuple__81, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XGOTREF(((PyObject *)__pyx_v_4lxml_5etree___findStylesheetByID)); @@ -203863,7 +189545,6 @@ static PyObject *__pyx_f_4lxml_5etree__findStylesheetByID(struct LxmlDocument *_ * * cdef class _XSLTProcessingInstruction(PIBase): */ - __Pyx_TraceLine(893,0,__PYX_ERR(3, 893, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -203898,7 +189579,6 @@ static PyObject *__pyx_f_4lxml_5etree__findStylesheetByID(struct LxmlDocument *_ __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -203914,7 +189594,7 @@ static PyObject *__pyx_f_4lxml_5etree__findStylesheetByID(struct LxmlDocument *_ /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_26_XSLTProcessingInstruction_1parseXSL(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL[] = "parseXSL(self, parser=None)\n\n Try to parse the stylesheet referenced by this PI and return\n an ElementTree for it. If the stylesheet is embedded in the\n same document (referenced via xml:id), find and return an\n ElementTree for the stylesheet Element.\n\n The optional ``parser`` keyword argument can be passed to specify the\n parser used to read from external stylesheet URLs.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_26_XSLTProcessingInstruction_1parseXSL = {"parseXSL", (PyCFunction)__pyx_pw_4lxml_5etree_26_XSLTProcessingInstruction_1parseXSL, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL}; +static PyMethodDef __pyx_mdef_4lxml_5etree_26_XSLTProcessingInstruction_1parseXSL = {"parseXSL", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_26_XSLTProcessingInstruction_1parseXSL, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL}; static PyObject *__pyx_pw_4lxml_5etree_26_XSLTProcessingInstruction_1parseXSL(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_parser = 0; PyObject *__pyx_r = 0; @@ -203978,7 +189658,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str PyObject *__pyx_v_hrefs = NULL; PyObject *__pyx_v_root = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -203987,20 +189666,17 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; - Py_ssize_t __pyx_t_9; - int __pyx_t_10; - char const *__pyx_t_11; + Py_ssize_t __pyx_t_8; + int __pyx_t_9; + char const *__pyx_t_10; + PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; - PyObject *__pyx_t_17 = NULL; - int __pyx_t_18; - __Pyx_TraceFrameInit(__pyx_codeobj__363) + int __pyx_t_17; __Pyx_RefNannySetupContext("parseXSL", 0); - __Pyx_TraceCall("parseXSL", __pyx_f[3], 896, 0, __PYX_ERR(3, 896, __pyx_L1_error)); /* "src/lxml/xslt.pxi":912 * cdef const_xmlChar* c_href @@ -204009,7 +189685,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * if self._c_node.content is NULL: * raise ValueError, u"PI lacks content" */ - __Pyx_TraceLine(912,0,__PYX_ERR(3, 912, __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(3, 912, __pyx_L1_error) /* "src/lxml/xslt.pxi":913 @@ -204019,7 +189694,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * raise ValueError, u"PI lacks content" * hrefs = _FIND_PI_HREF(u' ' + (self._c_node.content).decode('UTF-8')) */ - __Pyx_TraceLine(913,0,__PYX_ERR(3, 913, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node->content == NULL) != 0); if (unlikely(__pyx_t_2)) { @@ -204030,7 +189704,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * hrefs = _FIND_PI_HREF(u' ' + (self._c_node.content).decode('UTF-8')) * if len(hrefs) != 1: */ - __Pyx_TraceLine(914,0,__PYX_ERR(3, 914, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_PI_lacks_content, 0, 0); __PYX_ERR(3, 914, __pyx_L1_error) @@ -204050,11 +189723,10 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * if len(hrefs) != 1: * raise ValueError, u"malformed PI attributes" */ - __Pyx_TraceLine(915,0,__PYX_ERR(3, 915, __pyx_L1_error)) __pyx_t_4 = ((unsigned char *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node->content); __pyx_t_5 = __Pyx_decode_c_string(((char const *)__pyx_t_4), 0, strlen(((char const *)__pyx_t_4)), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u__22, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 915, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u__10, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_INCREF(__pyx_v_4lxml_5etree__FIND_PI_HREF); @@ -204068,41 +189740,11 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_7) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 915, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 915, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 915, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 915, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 915, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } - } + __pyx_t_3 = (__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_3)) __PYX_ERR(3, 915, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_hrefs = __pyx_t_3; __pyx_t_3 = 0; @@ -204114,9 +189756,8 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * raise ValueError, u"malformed PI attributes" * hrefs = hrefs[0] */ - __Pyx_TraceLine(916,0,__PYX_ERR(3, 916, __pyx_L1_error)) - __pyx_t_9 = PyObject_Length(__pyx_v_hrefs); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(3, 916, __pyx_L1_error) - __pyx_t_2 = ((__pyx_t_9 != 1) != 0); + __pyx_t_8 = PyObject_Length(__pyx_v_hrefs); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(3, 916, __pyx_L1_error) + __pyx_t_2 = ((__pyx_t_8 != 1) != 0); if (unlikely(__pyx_t_2)) { /* "src/lxml/xslt.pxi":917 @@ -204126,7 +189767,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * hrefs = hrefs[0] * href_utf = utf8(hrefs[0] or hrefs[1]) */ - __Pyx_TraceLine(917,0,__PYX_ERR(3, 917, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_malformed_PI_attributes, 0, 0); __PYX_ERR(3, 917, __pyx_L1_error) @@ -204146,7 +189786,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * href_utf = utf8(hrefs[0] or hrefs[1]) * c_href = _xcstr(href_utf) */ - __Pyx_TraceLine(918,0,__PYX_ERR(3, 918, __pyx_L1_error)) __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_hrefs, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_hrefs, __pyx_t_3); @@ -204159,7 +189798,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * c_href = _xcstr(href_utf) * */ - __Pyx_TraceLine(919,0,__PYX_ERR(3, 919, __pyx_L1_error)) __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_hrefs, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 919, __pyx_L1_error) @@ -204190,7 +189828,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * * if c_href[0] != c'#': */ - __Pyx_TraceLine(920,0,__PYX_ERR(3, 920, __pyx_L1_error)) __pyx_v_c_href = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_href_utf); /* "src/lxml/xslt.pxi":922 @@ -204200,7 +189837,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * # normal URL, try to parse from it * c_href = tree.xmlBuildURI( */ - __Pyx_TraceLine(922,0,__PYX_ERR(3, 922, __pyx_L1_error)) __pyx_t_2 = (((__pyx_v_c_href[0]) != '#') != 0); if (__pyx_t_2) { @@ -204211,7 +189847,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * c_href, * tree.xmlNodeGetBase(self._c_node.doc, self._c_node)) */ - __Pyx_TraceLine(924,0,__PYX_ERR(3, 924, __pyx_L1_error)) __pyx_v_c_href = xmlBuildURI(__pyx_v_c_href, xmlNodeGetBase(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node->doc, __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node)); /* "src/lxml/xslt.pxi":927 @@ -204221,7 +189856,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * try: * href_utf = c_href */ - __Pyx_TraceLine(927,0,__PYX_ERR(3, 927, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_href != NULL) != 0); if (__pyx_t_2) { @@ -204232,7 +189866,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * href_utf = c_href * finally: */ - __Pyx_TraceLine(928,0,__PYX_ERR(3, 928, __pyx_L10_error)) /*try:*/ { /* "src/lxml/xslt.pxi":929 @@ -204242,7 +189875,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * finally: * tree.xmlFree(c_href) */ - __Pyx_TraceLine(929,0,__PYX_ERR(3, 929, __pyx_L10_error)) __pyx_t_5 = __Pyx_PyBytes_FromCString(((unsigned char *)__pyx_v_c_href)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 929, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_href_utf, ((PyObject*)__pyx_t_5)); @@ -204256,7 +189888,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * result_doc = _parseDocumentFromURL(href_utf, parser) * return _elementTreeFactory(result_doc, None) */ - __Pyx_TraceLine(931,0,__PYX_ERR(3, 931, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ xmlFree(((char *)__pyx_v_c_href)); @@ -204266,36 +189897,35 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign - __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; + __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); - __Pyx_XGOTREF(__pyx_t_17); - __pyx_t_1 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename; + __pyx_t_1 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename; { xmlFree(((char *)__pyx_v_c_href)); } if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); - __Pyx_XGIVEREF(__pyx_t_17); - __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); } + __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14); - __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; - __pyx_lineno = __pyx_t_1; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11; + __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13); + __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; + __pyx_lineno = __pyx_t_1; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10; goto __pyx_L1_error; } __pyx_L11:; @@ -204317,7 +189947,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * return _elementTreeFactory(result_doc, None) * */ - __Pyx_TraceLine(932,0,__PYX_ERR(3, 932, __pyx_L1_error)) if (!(likely(((__pyx_v_parser) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_parser, __pyx_ptype_4lxml_5etree__BaseParser))))) __PYX_ERR(3, 932, __pyx_L1_error) __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_5etree__parseDocumentFromURL(__pyx_v_href_utf, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser))); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 932, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -204331,7 +189960,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * * # ID reference to embedded stylesheet */ - __Pyx_TraceLine(933,0,__PYX_ERR(3, 933, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_5etree__elementTreeFactory(__pyx_v_result_doc, ((struct LxmlElement *)Py_None))); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 933, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -204355,10 +189983,9 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * c_href += 1 # skip leading '#' * c_attr = tree.xmlGetID(self._c_node.doc, c_href) */ - __Pyx_TraceLine(937,0,__PYX_ERR(3, 937, __pyx_L1_error)) __pyx_t_5 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._doc); __Pyx_INCREF(__pyx_t_5); - __pyx_t_10 = __pyx_f_4lxml_5etree__assertValidDoc(((struct LxmlDocument *)__pyx_t_5)); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(3, 937, __pyx_L1_error) + __pyx_t_9 = __pyx_f_4lxml_5etree__assertValidDoc(((struct LxmlDocument *)__pyx_t_5)); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 937, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "src/lxml/xslt.pxi":938 @@ -204368,7 +189995,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * c_attr = tree.xmlGetID(self._c_node.doc, c_href) * if c_attr is not NULL and c_attr.doc is self._c_node.doc: */ - __Pyx_TraceLine(938,0,__PYX_ERR(3, 938, __pyx_L1_error)) __pyx_v_c_href = (__pyx_v_c_href + 1); /* "src/lxml/xslt.pxi":939 @@ -204378,7 +190004,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * if c_attr is not NULL and c_attr.doc is self._c_node.doc: * result_node = _elementFactory(self._doc, c_attr.parent) */ - __Pyx_TraceLine(939,0,__PYX_ERR(3, 939, __pyx_L1_error)) __pyx_v_c_attr = xmlGetID(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node->doc, __pyx_v_c_href); /* "src/lxml/xslt.pxi":940 @@ -204388,15 +190013,14 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * result_node = _elementFactory(self._doc, c_attr.parent) * return _elementTreeFactory(result_node._doc, result_node) */ - __Pyx_TraceLine(940,0,__PYX_ERR(3, 940, __pyx_L1_error)) - __pyx_t_18 = ((__pyx_v_c_attr != NULL) != 0); - if (__pyx_t_18) { + __pyx_t_17 = ((__pyx_v_c_attr != NULL) != 0); + if (__pyx_t_17) { } else { - __pyx_t_2 = __pyx_t_18; + __pyx_t_2 = __pyx_t_17; goto __pyx_L15_bool_binop_done; } - __pyx_t_18 = ((__pyx_v_c_attr->doc == __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node->doc) != 0); - __pyx_t_2 = __pyx_t_18; + __pyx_t_17 = ((__pyx_v_c_attr->doc == __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node->doc) != 0); + __pyx_t_2 = __pyx_t_17; __pyx_L15_bool_binop_done:; if (__pyx_t_2) { @@ -204407,7 +190031,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * return _elementTreeFactory(result_node._doc, result_node) * */ - __Pyx_TraceLine(941,0,__PYX_ERR(3, 941, __pyx_L1_error)) __pyx_t_5 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._doc); __Pyx_INCREF(__pyx_t_5); __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_5), __pyx_v_c_attr->parent)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 941, __pyx_L1_error) @@ -204423,7 +190046,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * * # try XPath search */ - __Pyx_TraceLine(942,0,__PYX_ERR(3, 942, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_3 = ((PyObject *)__pyx_v_result_node->_doc); __Pyx_INCREF(__pyx_t_3); @@ -204450,17 +190072,16 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * if not root: * raise ValueError, u"reference to non-existing embedded stylesheet" */ - __Pyx_TraceLine(945,0,__PYX_ERR(3, 945, __pyx_L1_error)) __pyx_t_5 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._doc); __Pyx_INCREF(__pyx_t_5); __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_href); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 945, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __pyx_f_4lxml_5etree__findStylesheetByID(((struct LxmlDocument *)__pyx_t_5), __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 945, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = __pyx_f_4lxml_5etree__findStylesheetByID(((struct LxmlDocument *)__pyx_t_5), __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 945, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_root = __pyx_t_8; - __pyx_t_8 = 0; + __pyx_v_root = __pyx_t_6; + __pyx_t_6 = 0; /* "src/lxml/xslt.pxi":946 * # try XPath search @@ -204469,10 +190090,9 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * raise ValueError, u"reference to non-existing embedded stylesheet" * elif len(root) > 1: */ - __Pyx_TraceLine(946,0,__PYX_ERR(3, 946, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_root); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 946, __pyx_L1_error) - __pyx_t_18 = ((!__pyx_t_2) != 0); - if (unlikely(__pyx_t_18)) { + __pyx_t_17 = ((!__pyx_t_2) != 0); + if (unlikely(__pyx_t_17)) { /* "src/lxml/xslt.pxi":947 * root = _findStylesheetByID(self._doc, funicode(c_href)) @@ -204481,7 +190101,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * elif len(root) > 1: * raise ValueError, u"ambiguous reference to embedded stylesheet" */ - __Pyx_TraceLine(947,0,__PYX_ERR(3, 947, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_reference_to_non_existing_embedd, 0, 0); __PYX_ERR(3, 947, __pyx_L1_error) @@ -204501,10 +190120,9 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * raise ValueError, u"ambiguous reference to embedded stylesheet" * result_node = root[0] */ - __Pyx_TraceLine(948,0,__PYX_ERR(3, 948, __pyx_L1_error)) - __pyx_t_9 = PyObject_Length(__pyx_v_root); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(3, 948, __pyx_L1_error) - __pyx_t_18 = ((__pyx_t_9 > 1) != 0); - if (unlikely(__pyx_t_18)) { + __pyx_t_8 = PyObject_Length(__pyx_v_root); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(3, 948, __pyx_L1_error) + __pyx_t_17 = ((__pyx_t_8 > 1) != 0); + if (unlikely(__pyx_t_17)) { /* "src/lxml/xslt.pxi":949 * raise ValueError, u"reference to non-existing embedded stylesheet" @@ -204513,7 +190131,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * result_node = root[0] * return _elementTreeFactory(result_node._doc, result_node) */ - __Pyx_TraceLine(949,0,__PYX_ERR(3, 949, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_ambiguous_reference_to_embedded, 0, 0); __PYX_ERR(3, 949, __pyx_L1_error) @@ -204533,12 +190150,11 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * return _elementTreeFactory(result_node._doc, result_node) * */ - __Pyx_TraceLine(950,0,__PYX_ERR(3, 950, __pyx_L1_error)) - __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_root, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 950, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(3, 950, __pyx_L1_error) - __pyx_v_result_node = ((struct LxmlElement *)__pyx_t_8); - __pyx_t_8 = 0; + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_root, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 950, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(3, 950, __pyx_L1_error) + __pyx_v_result_node = ((struct LxmlElement *)__pyx_t_6); + __pyx_t_6 = 0; /* "src/lxml/xslt.pxi":951 * raise ValueError, u"ambiguous reference to embedded stylesheet" @@ -204547,13 +190163,12 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str * * def set(self, key, value): */ - __Pyx_TraceLine(951,0,__PYX_ERR(3, 951, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_8 = ((PyObject *)__pyx_v_result_node->_doc); - __Pyx_INCREF(__pyx_t_8); - __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__elementTreeFactory(((struct LxmlDocument *)__pyx_t_8), __pyx_v_result_node)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 951, __pyx_L1_error) + __pyx_t_6 = ((PyObject *)__pyx_v_result_node->_doc); + __Pyx_INCREF(__pyx_t_6); + __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__elementTreeFactory(((struct LxmlDocument *)__pyx_t_6), __pyx_v_result_node)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; @@ -204572,7 +190187,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("lxml.etree._XSLTProcessingInstruction.parseXSL", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -204582,7 +190196,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str __Pyx_XDECREF(__pyx_v_hrefs); __Pyx_XDECREF(__pyx_v_root); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -204598,7 +190211,7 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL(str /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_26_XSLTProcessingInstruction_3set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_26_XSLTProcessingInstruction_2set[] = "set(self, key, value)\n\n Supports setting the 'href' pseudo-attribute in the text of\n the processing instruction.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_26_XSLTProcessingInstruction_3set = {"set", (PyCFunction)__pyx_pw_4lxml_5etree_26_XSLTProcessingInstruction_3set, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_26_XSLTProcessingInstruction_2set}; +static PyMethodDef __pyx_mdef_4lxml_5etree_26_XSLTProcessingInstruction_3set = {"set", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_26_XSLTProcessingInstruction_3set, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_26_XSLTProcessingInstruction_2set}; static PyObject *__pyx_pw_4lxml_5etree_26_XSLTProcessingInstruction_3set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_key = 0; PyObject *__pyx_v_value = 0; @@ -204662,7 +190275,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_2set(struct PyObject *__pyx_v_attrib = NULL; PyObject *__pyx_v_text = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -204672,11 +190284,9 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_2set(struct Py_UCS4 __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; - int __pyx_t_10; - __Pyx_TraceFrameInit(__pyx_codeobj__364) + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("set", 0); - __Pyx_TraceCall("set", __pyx_f[3], 953, 0, __PYX_ERR(3, 953, __pyx_L1_error)); /* "src/lxml/xslt.pxi":959 * the processing instruction. @@ -204685,7 +190295,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_2set(struct * raise AttributeError, \ * u"only setting the 'href' attribute is supported on XSLT-PIs" */ - __Pyx_TraceLine(959,0,__PYX_ERR(3, 959, __pyx_L1_error)) __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_n_u_href, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 959, __pyx_L1_error) if (unlikely(__pyx_t_1)) { @@ -204696,7 +190305,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_2set(struct * u"only setting the 'href' attribute is supported on XSLT-PIs" * if value is None: */ - __Pyx_TraceLine(960,0,__PYX_ERR(3, 960, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_AttributeError, __pyx_kp_u_only_setting_the_href_attribute, 0, 0); __PYX_ERR(3, 960, __pyx_L1_error) @@ -204716,7 +190324,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_2set(struct * attrib = u"" * elif u'"' in value or u'>' in value: */ - __Pyx_TraceLine(962,0,__PYX_ERR(3, 962, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_value == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -204728,9 +190335,8 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_2set(struct * elif u'"' in value or u'>' in value: * raise ValueError, u"Invalid URL, must not contain '\"' or '>'" */ - __Pyx_TraceLine(963,0,__PYX_ERR(3, 963, __pyx_L1_error)) - __Pyx_INCREF(__pyx_kp_u__23); - __pyx_v_attrib = __pyx_kp_u__23; + __Pyx_INCREF(__pyx_kp_u__11); + __pyx_v_attrib = __pyx_kp_u__11; /* "src/lxml/xslt.pxi":962 * raise AttributeError, \ @@ -204749,15 +190355,14 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_2set(struct * raise ValueError, u"Invalid URL, must not contain '\"' or '>'" * else: */ - __Pyx_TraceLine(964,0,__PYX_ERR(3, 964, __pyx_L1_error)) - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__61, __pyx_v_value, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 964, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__22, __pyx_v_value, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 964, __pyx_L1_error) __pyx_t_3 = (__pyx_t_1 != 0); if (!__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } - __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__64, __pyx_v_value, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 964, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__25, __pyx_v_value, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 964, __pyx_L1_error) __pyx_t_1 = (__pyx_t_3 != 0); __pyx_t_2 = __pyx_t_1; __pyx_L5_bool_binop_done:; @@ -204770,7 +190375,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_2set(struct * else: * attrib = f' href="{value}"' */ - __Pyx_TraceLine(965,0,__PYX_ERR(3, 965, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Invalid_URL_must_not_contain_or, 0, 0); __PYX_ERR(3, 965, __pyx_L1_error) @@ -204790,7 +190394,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_2set(struct * text = u' ' + self.text * if _FIND_PI_HREF(text): */ - __Pyx_TraceLine(967,0,__PYX_ERR(3, 967, __pyx_L1_error)) /*else*/ { __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -204807,10 +190410,10 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_2set(struct __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7); __pyx_t_7 = 0; - __Pyx_INCREF(__pyx_kp_u__61); + __Pyx_INCREF(__pyx_kp_u__22); __pyx_t_5 += 1; - __Pyx_GIVEREF(__pyx_kp_u__61); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__61); + __Pyx_GIVEREF(__pyx_kp_u__22); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__22); __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -204826,10 +190429,9 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_2set(struct * if _FIND_PI_HREF(text): * self.text = _REPLACE_PI_HREF(attrib, text) */ - __Pyx_TraceLine(968,0,__PYX_ERR(3, 968, __pyx_L1_error)) __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_text); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = PyNumber_Add(__pyx_kp_u__22, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 968, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_kp_u__10, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_text = __pyx_t_4; @@ -204842,7 +190444,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_2set(struct * self.text = _REPLACE_PI_HREF(attrib, text) * else: */ - __Pyx_TraceLine(969,0,__PYX_ERR(3, 969, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_4lxml_5etree__FIND_PI_HREF); __pyx_t_7 = __pyx_v_4lxml_5etree__FIND_PI_HREF; __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { @@ -204854,38 +190455,10 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_2set(struct __Pyx_DECREF_SET(__pyx_t_7, function); } } - if (!__pyx_t_8) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_text); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 969, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_text}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 969, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_text}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 969, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 969, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; - __Pyx_INCREF(__pyx_v_text); - __Pyx_GIVEREF(__pyx_v_text); - PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_text); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 969, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } - } + __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_text) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_text); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 969, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 969, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -204898,51 +190471,50 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_2set(struct * else: * self.text = text + attrib */ - __Pyx_TraceLine(970,0,__PYX_ERR(3, 970, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_4lxml_5etree__REPLACE_PI_HREF); - __pyx_t_7 = __pyx_v_4lxml_5etree__REPLACE_PI_HREF; __pyx_t_9 = NULL; - __pyx_t_10 = 0; + __pyx_t_7 = __pyx_v_4lxml_5etree__REPLACE_PI_HREF; __pyx_t_8 = NULL; + __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_9)) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); - __pyx_t_10 = 1; + __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_attrib, __pyx_v_text}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 970, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_attrib, __pyx_v_text}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 970, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_attrib, __pyx_v_text}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 970, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_attrib, __pyx_v_text}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 970, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 970, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - if (__pyx_t_9) { - __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __pyx_t_9 = NULL; + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 970, __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; } __Pyx_INCREF(__pyx_v_attrib); __Pyx_GIVEREF(__pyx_v_attrib); - PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_10, __pyx_v_attrib); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_attrib); __Pyx_INCREF(__pyx_v_text); __Pyx_GIVEREF(__pyx_v_text); - PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_10, __pyx_v_text); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 970, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_text); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 970, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_text, __pyx_t_4) < 0) __PYX_ERR(3, 970, __pyx_L1_error) @@ -204963,7 +190535,6 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_2set(struct * else: * self.text = text + attrib # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(972,0,__PYX_ERR(3, 972, __pyx_L1_error)) /*else*/ { __pyx_t_4 = PyNumber_Add(__pyx_v_text, __pyx_v_attrib); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -204987,14 +190558,13 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_2set(struct __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("lxml.etree._XSLTProcessingInstruction.set", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_attrib); __Pyx_XDECREF(__pyx_v_text); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -205010,7 +190580,7 @@ static PyObject *__pyx_pf_4lxml_5etree_26_XSLTProcessingInstruction_2set(struct /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_13XSLTExtension_1execute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_13XSLTExtension_execute[] = "execute(self, context, self_node, input_node, output_parent)\n Execute this extension element.\n\n Subclasses must override this method. They may append\n elements to the `output_parent` element here, or set its text\n content. To this end, the `input_node` provides read-only\n access to the current node in the input document, and the\n `self_node` points to the extension element in the stylesheet.\n\n Note that the `output_parent` parameter may be `None` if there\n is no parent element in the current context (e.g. no content\n was added to the output tree yet).\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_13XSLTExtension_1execute = {"execute", (PyCFunction)__pyx_pw_4lxml_5etree_13XSLTExtension_1execute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_13XSLTExtension_execute}; +static PyMethodDef __pyx_mdef_4lxml_5etree_13XSLTExtension_1execute = {"execute", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_13XSLTExtension_1execute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_13XSLTExtension_execute}; static PyObject *__pyx_pw_4lxml_5etree_13XSLTExtension_1execute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_context = 0; CYTHON_UNUSED PyObject *__pyx_v_self_node = 0; @@ -205094,21 +190664,12 @@ static PyObject *__pyx_pw_4lxml_5etree_13XSLTExtension_1execute(PyObject *__pyx_ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_execute(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree_XSLTExtension *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_context, CYTHON_UNUSED PyObject *__pyx_v_self_node, CYTHON_UNUSED PyObject *__pyx_v_input_node, CYTHON_UNUSED PyObject *__pyx_v_output_parent) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - __Pyx_TraceFrameInit(__pyx_codeobj__365) __Pyx_RefNannySetupContext("execute", 0); - __Pyx_TraceCall("execute", __pyx_f[19], 6, 0, __PYX_ERR(19, 6, __pyx_L1_error)); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.XSLTExtension.execute", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -205124,7 +190685,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_execute(CYTHON_UNUSED str /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_13XSLTExtension_3apply_templates(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_13XSLTExtension_2apply_templates[] = "apply_templates(self, context, node, output_parent=None, elements_only=False, remove_blank_text=False)\n\n Call this method to retrieve the result of applying templates\n to an element.\n\n The return value is a list of elements or text strings that\n were generated by the XSLT processor. If you pass\n ``elements_only=True``, strings will be discarded from the result\n list. The option ``remove_blank_text=True`` will only discard\n strings that consist entirely of whitespace (e.g. formatting).\n These options do not apply to Elements, only to bare string results.\n\n If you pass an Element as `output_parent` parameter, the result\n will instead be appended to the element (including attributes\n etc.) and the return value will be `None`. This is a safe way\n to generate content into the output document directly, without\n having to take care of special values like text or attributes.\n Note that the string discarding options will be ignored in this\n case.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_13XSLTExtension_3apply_templates = {"apply_templates", (PyCFunction)__pyx_pw_4lxml_5etree_13XSLTExtension_3apply_templates, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_13XSLTExtension_2apply_templates}; +static PyMethodDef __pyx_mdef_4lxml_5etree_13XSLTExtension_3apply_templates = {"apply_templates", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_13XSLTExtension_3apply_templates, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_13XSLTExtension_2apply_templates}; static PyObject *__pyx_pw_4lxml_5etree_13XSLTExtension_3apply_templates(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_context = 0; PyObject *__pyx_v_node = 0; @@ -205238,7 +190799,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_2apply_templates(struct _ xmlNode *__pyx_v_c_node; xmlNode *__pyx_v_c_context_node; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlNode *__pyx_t_1; int __pyx_t_2; @@ -205253,9 +190813,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_2apply_templates(struct _ PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__366) __Pyx_RefNannySetupContext("apply_templates", 0); - __Pyx_TraceCall("apply_templates", __pyx_f[19], 22, 0, __PYX_ERR(19, 22, __pyx_L1_error)); /* "src/lxml/xsltext.pxi":47 * cdef xmlNode* c_node @@ -205264,7 +190822,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_2apply_templates(struct _ * c_context_node = _roNodeOf(node) * #assert c_context_node.doc is context._xsltContext.node.doc, \ */ - __Pyx_TraceLine(47,0,__PYX_ERR(19, 47, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_context->_xsltCtxt != NULL) != 0))) { @@ -205281,7 +190838,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_2apply_templates(struct _ * #assert c_context_node.doc is context._xsltContext.node.doc, \ * # "switching input documents during transformation is not currently supported" */ - __Pyx_TraceLine(48,0,__PYX_ERR(19, 48, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__roNodeOf(__pyx_v_node); if (unlikely(__pyx_t_1 == ((xmlNode *)NULL))) __PYX_ERR(19, 48, __pyx_L1_error) __pyx_v_c_context_node = __pyx_t_1; @@ -205292,7 +190848,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_2apply_templates(struct _ * c_parent = _nonRoNodeOf(output_parent) * else: */ - __Pyx_TraceLine(52,0,__PYX_ERR(19, 52, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_output_parent != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { @@ -205304,7 +190859,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_2apply_templates(struct _ * else: * c_parent = tree.xmlNewDocNode( */ - __Pyx_TraceLine(53,0,__PYX_ERR(19, 53, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__nonRoNodeOf(__pyx_v_output_parent); if (unlikely(__pyx_t_1 == ((xmlNode *)NULL))) __PYX_ERR(19, 53, __pyx_L1_error) __pyx_v_c_parent = __pyx_t_1; @@ -205325,7 +190879,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_2apply_templates(struct _ * context._xsltCtxt.output, NULL, "fake-parent", NULL) * */ - __Pyx_TraceLine(55,0,__PYX_ERR(19, 55, __pyx_L1_error)) /*else*/ { /* "src/lxml/xsltext.pxi":56 @@ -205335,7 +190888,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_2apply_templates(struct _ * * c_node = context._xsltCtxt.insert */ - __Pyx_TraceLine(56,0,__PYX_ERR(19, 56, __pyx_L1_error)) __pyx_v_c_parent = xmlNewDocNode(__pyx_v_context->_xsltCtxt->output, NULL, ((unsigned char *)((unsigned char *)((char const *)"fake-parent"))), NULL); } __pyx_L3:; @@ -205347,7 +190899,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_2apply_templates(struct _ * context._xsltCtxt.insert = c_parent * xslt.xsltProcessOneNode( */ - __Pyx_TraceLine(58,0,__PYX_ERR(19, 58, __pyx_L1_error)) __pyx_t_1 = __pyx_v_context->_xsltCtxt->insert; __pyx_v_c_node = __pyx_t_1; @@ -205358,7 +190909,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_2apply_templates(struct _ * xslt.xsltProcessOneNode( * context._xsltCtxt, c_context_node, NULL) */ - __Pyx_TraceLine(59,0,__PYX_ERR(19, 59, __pyx_L1_error)) __pyx_v_context->_xsltCtxt->insert = __pyx_v_c_parent; /* "src/lxml/xsltext.pxi":60 @@ -205368,7 +190918,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_2apply_templates(struct _ * context._xsltCtxt, c_context_node, NULL) * context._xsltCtxt.insert = c_node */ - __Pyx_TraceLine(60,0,__PYX_ERR(19, 60, __pyx_L1_error)) xsltProcessOneNode(__pyx_v_context->_xsltCtxt, __pyx_v_c_context_node, NULL); /* "src/lxml/xsltext.pxi":62 @@ -205378,7 +190927,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_2apply_templates(struct _ * * if output_parent is not None: */ - __Pyx_TraceLine(62,0,__PYX_ERR(19, 62, __pyx_L1_error)) __pyx_v_context->_xsltCtxt->insert = __pyx_v_c_node; /* "src/lxml/xsltext.pxi":64 @@ -205388,7 +190936,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_2apply_templates(struct _ * return None * */ - __Pyx_TraceLine(64,0,__PYX_ERR(19, 64, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_output_parent != Py_None); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { @@ -205400,7 +190947,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_2apply_templates(struct _ * * try: */ - __Pyx_TraceLine(65,0,__PYX_ERR(19, 65, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -205421,7 +190967,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_2apply_templates(struct _ * return self._collectXSLTResultContent( * context, c_parent, elements_only, remove_blank_text) */ - __Pyx_TraceLine(67,0,__PYX_ERR(19, 67, __pyx_L6_error)) /*try:*/ { /* "src/lxml/xsltext.pxi":68 @@ -205431,7 +190976,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_2apply_templates(struct _ * context, c_parent, elements_only, remove_blank_text) * finally: */ - __Pyx_TraceLine(68,0,__PYX_ERR(19, 68, __pyx_L6_error)) __Pyx_XDECREF(__pyx_r); /* "src/lxml/xsltext.pxi":69 @@ -205441,7 +190985,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_2apply_templates(struct _ * finally: * # free all intermediate nodes that will not be freed by proxies */ - __Pyx_TraceLine(69,0,__PYX_ERR(19, 69, __pyx_L6_error)) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_elements_only); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 69, __pyx_L6_error) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_remove_blank_text); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 69, __pyx_L6_error) @@ -205452,7 +190995,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_2apply_templates(struct _ * context, c_parent, elements_only, remove_blank_text) * finally: */ - __Pyx_TraceLine(68,0,__PYX_ERR(19, 68, __pyx_L6_error)) __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree_XSLTExtension *)__pyx_v_self->__pyx_vtab)->_collectXSLTResultContent(__pyx_v_self, __pyx_v_context, __pyx_v_c_parent, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 68, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; @@ -205467,7 +191009,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_2apply_templates(struct _ * * def process_children(self, _XSLTContext context not None, output_parent=None, */ - __Pyx_TraceLine(72,0,__PYX_ERR(19, 72, __pyx_L1_error)) /*finally:*/ { __pyx_L6_error:; /*exception exit:*/{ @@ -205526,7 +191067,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_2apply_templates(struct _ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -205542,7 +191082,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_2apply_templates(struct _ /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_13XSLTExtension_5process_children(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_13XSLTExtension_4process_children[] = "process_children(self, context, output_parent=None, elements_only=False, remove_blank_text=False)\n\n Call this method to process the XSLT content of the extension\n element itself.\n\n The return value is a list of elements or text strings that\n were generated by the XSLT processor. If you pass\n ``elements_only=True``, strings will be discarded from the result\n list. The option ``remove_blank_text=True`` will only discard\n strings that consist entirely of whitespace (e.g. formatting).\n These options do not apply to Elements, only to bare string results.\n\n If you pass an Element as `output_parent` parameter, the result\n will instead be appended to the element (including attributes\n etc.) and the return value will be `None`. This is a safe way\n to generate content into the output document directly, without\n having to take care of special values like text or attributes.\n Note that the string discarding options will be ignored in this\n case.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_13XSLTExtension_5process_children = {"process_children", (PyCFunction)__pyx_pw_4lxml_5etree_13XSLTExtension_5process_children, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_13XSLTExtension_4process_children}; +static PyMethodDef __pyx_mdef_4lxml_5etree_13XSLTExtension_5process_children = {"process_children", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_13XSLTExtension_5process_children, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_13XSLTExtension_4process_children}; static PyObject *__pyx_pw_4lxml_5etree_13XSLTExtension_5process_children(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_context = 0; PyObject *__pyx_v_output_parent = 0; @@ -205645,7 +191185,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_4process_children(struct xsltTransformContext *__pyx_v_c_ctxt; xmlNode *__pyx_v_c_old_output_parent; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xsltTransformContext *__pyx_t_1; xmlNode *__pyx_t_2; @@ -205661,9 +191200,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_4process_children(struct PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__367) __Pyx_RefNannySetupContext("process_children", 0); - __Pyx_TraceCall("process_children", __pyx_f[19], 74, 0, __PYX_ERR(19, 74, __pyx_L1_error)); /* "src/lxml/xsltext.pxi":97 * """ @@ -205672,7 +191209,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_4process_children(struct * cdef xmlNode* c_old_output_parent = c_ctxt.insert * assert context._xsltCtxt is not NULL, "XSLT context not initialised" */ - __Pyx_TraceLine(97,0,__PYX_ERR(19, 97, __pyx_L1_error)) __pyx_t_1 = __pyx_v_context->_xsltCtxt; __pyx_v_c_ctxt = __pyx_t_1; @@ -205683,7 +191219,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_4process_children(struct * assert context._xsltCtxt is not NULL, "XSLT context not initialised" * */ - __Pyx_TraceLine(98,0,__PYX_ERR(19, 98, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_ctxt->insert; __pyx_v_c_old_output_parent = __pyx_t_2; @@ -205694,7 +191229,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_4process_children(struct * * # output_parent node is used for adding results instead of */ - __Pyx_TraceLine(99,0,__PYX_ERR(19, 99, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_context->_xsltCtxt != NULL) != 0))) { @@ -205711,7 +191245,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_4process_children(struct * c_parent = _nonRoNodeOf(output_parent) * else: */ - __Pyx_TraceLine(105,0,__PYX_ERR(19, 105, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_output_parent != Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { @@ -205723,7 +191256,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_4process_children(struct * else: * c_parent = tree.xmlNewDocNode( */ - __Pyx_TraceLine(106,0,__PYX_ERR(19, 106, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__nonRoNodeOf(__pyx_v_output_parent); if (unlikely(__pyx_t_2 == ((xmlNode *)NULL))) __PYX_ERR(19, 106, __pyx_L1_error) __pyx_v_c_parent = __pyx_t_2; @@ -205744,7 +191276,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_4process_children(struct * context._xsltCtxt.output, NULL, "fake-parent", NULL) * */ - __Pyx_TraceLine(108,0,__PYX_ERR(19, 108, __pyx_L1_error)) /*else*/ { /* "src/lxml/xsltext.pxi":109 @@ -205754,7 +191285,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_4process_children(struct * * c_ctxt.insert = c_parent */ - __Pyx_TraceLine(109,0,__PYX_ERR(19, 109, __pyx_L1_error)) __pyx_v_c_parent = xmlNewDocNode(__pyx_v_context->_xsltCtxt->output, NULL, ((unsigned char *)((unsigned char *)((char const *)"fake-parent"))), NULL); } __pyx_L3:; @@ -205766,7 +191296,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_4process_children(struct * xslt.xsltApplyOneTemplate(c_ctxt, * c_ctxt.node, c_ctxt.inst.children, NULL, NULL) */ - __Pyx_TraceLine(111,0,__PYX_ERR(19, 111, __pyx_L1_error)) __pyx_v_c_ctxt->insert = __pyx_v_c_parent; /* "src/lxml/xsltext.pxi":112 @@ -205776,7 +191305,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_4process_children(struct * c_ctxt.node, c_ctxt.inst.children, NULL, NULL) * c_ctxt.insert = c_old_output_parent */ - __Pyx_TraceLine(112,0,__PYX_ERR(19, 112, __pyx_L1_error)) xsltApplyOneTemplate(__pyx_v_c_ctxt, __pyx_v_c_ctxt->node, __pyx_v_c_ctxt->inst->children, NULL, NULL); /* "src/lxml/xsltext.pxi":114 @@ -205786,7 +191314,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_4process_children(struct * * if output_parent is not None: */ - __Pyx_TraceLine(114,0,__PYX_ERR(19, 114, __pyx_L1_error)) __pyx_v_c_ctxt->insert = __pyx_v_c_old_output_parent; /* "src/lxml/xsltext.pxi":116 @@ -205796,7 +191323,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_4process_children(struct * return None * */ - __Pyx_TraceLine(116,0,__PYX_ERR(19, 116, __pyx_L1_error)) __pyx_t_4 = (__pyx_v_output_parent != Py_None); __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { @@ -205808,7 +191334,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_4process_children(struct * * try: */ - __Pyx_TraceLine(117,0,__PYX_ERR(19, 117, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -205829,7 +191354,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_4process_children(struct * return self._collectXSLTResultContent( * context, c_parent, elements_only, remove_blank_text) */ - __Pyx_TraceLine(119,0,__PYX_ERR(19, 119, __pyx_L6_error)) /*try:*/ { /* "src/lxml/xsltext.pxi":120 @@ -205839,7 +191363,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_4process_children(struct * context, c_parent, elements_only, remove_blank_text) * finally: */ - __Pyx_TraceLine(120,0,__PYX_ERR(19, 120, __pyx_L6_error)) __Pyx_XDECREF(__pyx_r); /* "src/lxml/xsltext.pxi":121 @@ -205849,7 +191372,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_4process_children(struct * finally: * # free all intermediate nodes that will not be freed by proxies */ - __Pyx_TraceLine(121,0,__PYX_ERR(19, 121, __pyx_L6_error)) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_elements_only); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 121, __pyx_L6_error) __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_remove_blank_text); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 121, __pyx_L6_error) @@ -205860,7 +191382,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_4process_children(struct * context, c_parent, elements_only, remove_blank_text) * finally: */ - __Pyx_TraceLine(120,0,__PYX_ERR(19, 120, __pyx_L6_error)) __pyx_t_5 = ((struct __pyx_vtabstruct_4lxml_5etree_XSLTExtension *)__pyx_v_self->__pyx_vtab)->_collectXSLTResultContent(__pyx_v_self, __pyx_v_context, __pyx_v_c_parent, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 120, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; @@ -205875,7 +191396,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_4process_children(struct * * cdef _collectXSLTResultContent(self, _XSLTContext context, xmlNode* c_parent, */ - __Pyx_TraceLine(124,0,__PYX_ERR(19, 124, __pyx_L1_error)) /*finally:*/ { __pyx_L6_error:; /*exception exit:*/{ @@ -205934,7 +191454,6 @@ static PyObject *__pyx_pf_4lxml_5etree_13XSLTExtension_4process_children(struct __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -205954,7 +191473,6 @@ static PyObject *__pyx_f_4lxml_5etree_13XSLTExtension__collectXSLTResultContent( PyObject *__pyx_v_results = 0; PyObject *__pyx_v_s = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; xmlNode *__pyx_t_2; @@ -205964,7 +191482,6 @@ static PyObject *__pyx_f_4lxml_5etree_13XSLTExtension__collectXSLTResultContent( PyObject *__pyx_t_6 = NULL; int __pyx_t_7; __Pyx_RefNannySetupContext("_collectXSLTResultContent", 0); - __Pyx_TraceCall("_collectXSLTResultContent", __pyx_f[19], 126, 0, __PYX_ERR(19, 126, __pyx_L1_error)); /* "src/lxml/xsltext.pxi":131 * cdef xmlNode* c_next @@ -205973,7 +191490,6 @@ static PyObject *__pyx_f_4lxml_5etree_13XSLTExtension__collectXSLTResultContent( * c_node = c_parent.children * while c_node is not NULL: */ - __Pyx_TraceLine(131,0,__PYX_ERR(19, 131, __pyx_L1_error)) __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_results = ((PyObject*)__pyx_t_1); @@ -205986,7 +191502,6 @@ static PyObject *__pyx_f_4lxml_5etree_13XSLTExtension__collectXSLTResultContent( * while c_node is not NULL: * c_next = c_node.next */ - __Pyx_TraceLine(132,0,__PYX_ERR(19, 132, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_parent->children; __pyx_v_c_node = __pyx_t_2; @@ -205997,7 +191512,6 @@ static PyObject *__pyx_f_4lxml_5etree_13XSLTExtension__collectXSLTResultContent( * c_next = c_node.next * if c_node.type == tree.XML_TEXT_NODE: */ - __Pyx_TraceLine(133,0,__PYX_ERR(19, 133, __pyx_L1_error)) while (1) { __pyx_t_3 = ((__pyx_v_c_node != NULL) != 0); if (!__pyx_t_3) break; @@ -206009,7 +191523,6 @@ static PyObject *__pyx_f_4lxml_5etree_13XSLTExtension__collectXSLTResultContent( * if c_node.type == tree.XML_TEXT_NODE: * if not elements_only: */ - __Pyx_TraceLine(134,0,__PYX_ERR(19, 134, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->next; __pyx_v_c_next = __pyx_t_2; @@ -206020,7 +191533,6 @@ static PyObject *__pyx_f_4lxml_5etree_13XSLTExtension__collectXSLTResultContent( * if not elements_only: * s = funicode(c_node.content) */ - __Pyx_TraceLine(135,0,__PYX_ERR(19, 135, __pyx_L1_error)) switch (__pyx_v_c_node->type) { case XML_TEXT_NODE: @@ -206031,7 +191543,6 @@ static PyObject *__pyx_f_4lxml_5etree_13XSLTExtension__collectXSLTResultContent( * s = funicode(c_node.content) * if not remove_blank_text or s.strip(): */ - __Pyx_TraceLine(136,0,__PYX_ERR(19, 136, __pyx_L1_error)) __pyx_t_3 = ((!(__pyx_v_elements_only != 0)) != 0); if (__pyx_t_3) { @@ -206042,7 +191553,6 @@ static PyObject *__pyx_f_4lxml_5etree_13XSLTExtension__collectXSLTResultContent( * if not remove_blank_text or s.strip(): * results.append(s) */ - __Pyx_TraceLine(137,0,__PYX_ERR(19, 137, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_node->content); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_1); @@ -206055,7 +191565,6 @@ static PyObject *__pyx_f_4lxml_5etree_13XSLTExtension__collectXSLTResultContent( * results.append(s) * s = None */ - __Pyx_TraceLine(138,0,__PYX_ERR(19, 138, __pyx_L1_error)) __pyx_t_4 = ((!(__pyx_v_remove_blank_text != 0)) != 0); if (!__pyx_t_4) { } else { @@ -206074,12 +191583,9 @@ static PyObject *__pyx_f_4lxml_5etree_13XSLTExtension__collectXSLTResultContent( __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 138, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 138, __pyx_L1_error) - } + __pyx_t_1 = (__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_1)) __PYX_ERR(19, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(19, 138, __pyx_L1_error) @@ -206095,7 +191601,6 @@ static PyObject *__pyx_f_4lxml_5etree_13XSLTExtension__collectXSLTResultContent( * s = None * elif c_node.type == tree.XML_ELEMENT_NODE: */ - __Pyx_TraceLine(139,0,__PYX_ERR(19, 139, __pyx_L1_error)) __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_results, __pyx_v_s); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(19, 139, __pyx_L1_error) /* "src/lxml/xsltext.pxi":138 @@ -206114,7 +191619,6 @@ static PyObject *__pyx_f_4lxml_5etree_13XSLTExtension__collectXSLTResultContent( * elif c_node.type == tree.XML_ELEMENT_NODE: * proxy = _newReadOnlyProxy( */ - __Pyx_TraceLine(140,0,__PYX_ERR(19, 140, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_s, Py_None); @@ -206135,15 +191639,6 @@ static PyObject *__pyx_f_4lxml_5etree_13XSLTExtension__collectXSLTResultContent( * s = funicode(c_node.content) */ break; - - /* "src/lxml/xsltext.pxi":141 - * results.append(s) - * s = None - * elif c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< - * proxy = _newReadOnlyProxy( - * context._extension_element_proxy, c_node) - */ - __Pyx_TraceLine(141,0,__PYX_ERR(19, 141, __pyx_L1_error)) case XML_ELEMENT_NODE: /* "src/lxml/xsltext.pxi":143 @@ -206153,7 +191648,6 @@ static PyObject *__pyx_f_4lxml_5etree_13XSLTExtension__collectXSLTResultContent( * results.append(proxy) * # unlink node and make sure it will be freed later on */ - __Pyx_TraceLine(143,0,__PYX_ERR(19, 143, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_v_context->_extension_element_proxy); __Pyx_INCREF(__pyx_t_1); @@ -206164,7 +191658,6 @@ static PyObject *__pyx_f_4lxml_5etree_13XSLTExtension__collectXSLTResultContent( * context._extension_element_proxy, c_node) * results.append(proxy) */ - __Pyx_TraceLine(142,0,__PYX_ERR(19, 142, __pyx_L1_error)) __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_5etree__newReadOnlyProxy(((struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *)__pyx_t_1), __pyx_v_c_node)); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -206178,7 +191671,6 @@ static PyObject *__pyx_f_4lxml_5etree_13XSLTExtension__collectXSLTResultContent( * # unlink node and make sure it will be freed later on * tree.xmlUnlinkNode(c_node) */ - __Pyx_TraceLine(144,0,__PYX_ERR(19, 144, __pyx_L1_error)) __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_results, ((PyObject *)__pyx_v_proxy)); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(19, 144, __pyx_L1_error) /* "src/lxml/xsltext.pxi":146 @@ -206188,7 +191680,6 @@ static PyObject *__pyx_f_4lxml_5etree_13XSLTExtension__collectXSLTResultContent( * proxy.free_after_use() * else: */ - __Pyx_TraceLine(146,0,__PYX_ERR(19, 146, __pyx_L1_error)) xmlUnlinkNode(__pyx_v_c_node); /* "src/lxml/xsltext.pxi":147 @@ -206198,7 +191689,6 @@ static PyObject *__pyx_f_4lxml_5etree_13XSLTExtension__collectXSLTResultContent( * else: * raise TypeError, \ */ - __Pyx_TraceLine(147,0,__PYX_ERR(19, 147, __pyx_L1_error)) ((struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy *)__pyx_v_proxy->__pyx_vtab)->free_after_use(__pyx_v_proxy); /* "src/lxml/xsltext.pxi":141 @@ -206218,7 +191708,6 @@ static PyObject *__pyx_f_4lxml_5etree_13XSLTExtension__collectXSLTResultContent( * c_node = c_next * return results */ - __Pyx_TraceLine(150,0,__PYX_ERR(19, 150, __pyx_L1_error)) __pyx_t_5 = __Pyx_PyUnicode_From_xmlElementType(__pyx_v_c_node->type, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_unsupported_XSLT_result_type, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 150, __pyx_L1_error) @@ -206237,7 +191726,6 @@ static PyObject *__pyx_f_4lxml_5etree_13XSLTExtension__collectXSLTResultContent( * return results * */ - __Pyx_TraceLine(151,0,__PYX_ERR(19, 151, __pyx_L1_error)) __pyx_v_c_node = __pyx_v_c_next; } @@ -206248,7 +191736,6 @@ static PyObject *__pyx_f_4lxml_5etree_13XSLTExtension__collectXSLTResultContent( * * */ - __Pyx_TraceLine(152,0,__PYX_ERR(19, 152, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_results); __pyx_r = __pyx_v_results; @@ -206274,7 +191761,6 @@ static PyObject *__pyx_f_4lxml_5etree_13XSLTExtension__collectXSLTResultContent( __Pyx_XDECREF(__pyx_v_results); __Pyx_XDECREF(__pyx_v_s); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -206291,7 +191777,6 @@ static PyObject *__pyx_f_4lxml_5etree__registerXSLTExtensions(xsltTransformConte PyObject *__pyx_v_ns_utf = NULL; PyObject *__pyx_v_name_utf = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; @@ -206302,7 +191787,6 @@ static PyObject *__pyx_f_4lxml_5etree__registerXSLTExtensions(xsltTransformConte PyObject *__pyx_t_7 = NULL; PyObject *(*__pyx_t_8)(PyObject *); __Pyx_RefNannySetupContext("_registerXSLTExtensions", 0); - __Pyx_TraceCall("_registerXSLTExtensions", __pyx_f[19], 155, 0, __PYX_ERR(19, 155, __pyx_L1_error)); /* "src/lxml/xsltext.pxi":157 * cdef _registerXSLTExtensions(xslt.xsltTransformContext* c_ctxt, @@ -206311,7 +191795,6 @@ static PyObject *__pyx_f_4lxml_5etree__registerXSLTExtensions(xsltTransformConte * xslt.xsltRegisterExtElement( * c_ctxt, _xcstr(name_utf), _xcstr(ns_utf), */ - __Pyx_TraceLine(157,0,__PYX_ERR(19, 157, __pyx_L1_error)) if (likely(PyList_CheckExact(__pyx_v_extension_dict)) || PyTuple_CheckExact(__pyx_v_extension_dict)) { __pyx_t_1 = __pyx_v_extension_dict; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; @@ -206409,7 +191892,6 @@ static PyObject *__pyx_f_4lxml_5etree__registerXSLTExtensions(xsltTransformConte * c_ctxt, _xcstr(name_utf), _xcstr(ns_utf), * _callExtensionElement) */ - __Pyx_TraceLine(158,0,__PYX_ERR(19, 158, __pyx_L1_error)) (void)(xsltRegisterExtElement(__pyx_v_c_ctxt, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_name_utf), (const xmlChar*)PyBytes_AS_STRING(__pyx_v_ns_utf), ((xsltTransformFunction)__pyx_f_4lxml_5etree__callExtensionElement))); /* "src/lxml/xsltext.pxi":157 @@ -206419,7 +191901,6 @@ static PyObject *__pyx_f_4lxml_5etree__registerXSLTExtensions(xsltTransformConte * xslt.xsltRegisterExtElement( * c_ctxt, _xcstr(name_utf), _xcstr(ns_utf), */ - __Pyx_TraceLine(157,0,__PYX_ERR(19, 157, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -206446,7 +191927,6 @@ static PyObject *__pyx_f_4lxml_5etree__registerXSLTExtensions(xsltTransformConte __Pyx_XDECREF(__pyx_v_ns_utf); __Pyx_XDECREF(__pyx_v_name_utf); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -206470,7 +191950,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p const xmlChar *__pyx_v_c_uri; PyObject *__pyx_v_e = NULL; PyObject *__pyx_v_message = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -206499,12 +191978,12 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p PyObject *__pyx_t_25 = NULL; PyObject *__pyx_t_26 = NULL; PyObject *__pyx_t_27 = NULL; - char *__pyx_t_28; + PyObject *__pyx_t_28 = NULL; + char *__pyx_t_29; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("_callExtensionElement", 0); - __Pyx_TraceCall("_callExtensionElement", __pyx_f[19], 162, 0, __PYX_ERR(19, 162, __pyx_L1_error)); /* "src/lxml/xsltext.pxi":170 * cdef python.PyObject* dict_result @@ -206513,7 +191992,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * cdef object output_parent # not restricted to ro-nodes * c_uri = _getNs(c_inst_node) */ - __Pyx_TraceLine(170,0,__PYX_ERR(19, 170, __pyx_L1_error)) __Pyx_INCREF(Py_None); __pyx_v_context_node = ((struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *)Py_None); __Pyx_INCREF(Py_None); @@ -206526,7 +192004,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * if c_uri is NULL: * # not allowed, and should never happen */ - __Pyx_TraceLine(172,0,__PYX_ERR(19, 172, __pyx_L1_error)) __pyx_v_c_uri = _getNs(__pyx_v_c_inst_node); /* "src/lxml/xsltext.pxi":173 @@ -206536,7 +192013,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * # not allowed, and should never happen * return */ - __Pyx_TraceLine(173,0,__PYX_ERR(19, 173, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_uri == NULL) != 0); if (__pyx_t_1) { @@ -206547,7 +192023,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * if c_ctxt.xpathCtxt.userData is NULL: * # just for safety, should never happen */ - __Pyx_TraceLine(175,0,__PYX_ERR(19, 175, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/xsltext.pxi":173 @@ -206566,7 +192041,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * # just for safety, should never happen * return */ - __Pyx_TraceLine(176,0,__PYX_ERR(19, 176, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_ctxt->xpathCtxt->userData == NULL) != 0); if (__pyx_t_1) { @@ -206577,7 +192051,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * context = <_XSLTContext>c_ctxt.xpathCtxt.userData * try: */ - __Pyx_TraceLine(178,0,__PYX_ERR(19, 178, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/xsltext.pxi":176 @@ -206596,7 +192069,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * try: * try: */ - __Pyx_TraceLine(179,0,__PYX_ERR(19, 179, __pyx_L1_error)) __pyx_t_2 = ((PyObject *)__pyx_v_c_ctxt->xpathCtxt->userData); __Pyx_INCREF(__pyx_t_2); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__XSLTContext *)__pyx_t_2); @@ -206609,7 +192081,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * try: * dict_result = python.PyDict_GetItem( */ - __Pyx_TraceLine(180,0,__PYX_ERR(19, 180, __pyx_L6_error)) /*try:*/ { { __Pyx_PyThreadState_declare @@ -206627,7 +192098,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * dict_result = python.PyDict_GetItem( * context._extension_elements, (c_uri, c_inst_node.name)) */ - __Pyx_TraceLine(181,0,__PYX_ERR(19, 181, __pyx_L14_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -206644,7 +192114,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * if dict_result is NULL: * raise KeyError, f"extension element {funicode(c_inst_node.name)} not found" */ - __Pyx_TraceLine(183,0,__PYX_ERR(19, 183, __pyx_L14_error)) __pyx_t_2 = __pyx_v_context->_extension_elements; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = __Pyx_PyBytes_FromCString(__pyx_v_c_uri); if (unlikely(!__pyx_t_9)) __PYX_ERR(19, 183, __pyx_L14_error) @@ -206667,7 +192136,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * context._extension_elements, (c_uri, c_inst_node.name)) * if dict_result is NULL: */ - __Pyx_TraceLine(182,0,__PYX_ERR(19, 182, __pyx_L14_error)) __pyx_v_dict_result = PyDict_GetItem(__pyx_t_2, __pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -206679,7 +192147,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * raise KeyError, f"extension element {funicode(c_inst_node.name)} not found" * extension = dict_result */ - __Pyx_TraceLine(184,0,__PYX_ERR(19, 184, __pyx_L14_error)) __pyx_t_1 = ((__pyx_v_dict_result == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -206690,7 +192157,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * extension = dict_result * */ - __Pyx_TraceLine(185,0,__PYX_ERR(19, 185, __pyx_L14_error)) __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(19, 185, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = 0; @@ -206736,7 +192202,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * * try: */ - __Pyx_TraceLine(186,0,__PYX_ERR(19, 186, __pyx_L14_error)) if (!(likely(((((PyObject *)__pyx_v_dict_result)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_dict_result), __pyx_ptype_4lxml_5etree_XSLTExtension))))) __PYX_ERR(19, 186, __pyx_L14_error) __pyx_t_10 = ((PyObject *)__pyx_v_dict_result); __Pyx_INCREF(__pyx_t_10); @@ -206750,7 +192215,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * # build the context proxy nodes * self_node = _newReadOnlyProxy(None, c_inst_node) */ - __Pyx_TraceLine(188,0,__PYX_ERR(19, 188, __pyx_L22_error)) /*try:*/ { /* "src/lxml/xsltext.pxi":190 @@ -206760,7 +192224,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * if _isElement(c_ctxt.insert): * output_parent = _newAppendOnlyProxy(self_node, c_ctxt.insert) */ - __Pyx_TraceLine(190,0,__PYX_ERR(19, 190, __pyx_L22_error)) __pyx_t_10 = ((PyObject *)__pyx_f_4lxml_5etree__newReadOnlyProxy(((struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *)Py_None), __pyx_v_c_inst_node)); if (unlikely(!__pyx_t_10)) __PYX_ERR(19, 190, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF_SET(__pyx_v_self_node, ((struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *)__pyx_t_10)); @@ -206773,7 +192236,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * output_parent = _newAppendOnlyProxy(self_node, c_ctxt.insert) * else: */ - __Pyx_TraceLine(191,0,__PYX_ERR(19, 191, __pyx_L22_error)) __pyx_t_1 = (_isElement(__pyx_v_c_ctxt->insert) != 0); if (__pyx_t_1) { @@ -206784,7 +192246,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * else: * # may be the document node or other stuff */ - __Pyx_TraceLine(192,0,__PYX_ERR(19, 192, __pyx_L22_error)) __pyx_t_10 = ((PyObject *)__pyx_f_4lxml_5etree__newAppendOnlyProxy(__pyx_v_self_node, __pyx_v_c_ctxt->insert)); if (unlikely(!__pyx_t_10)) __PYX_ERR(19, 192, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_10); __pyx_v_output_parent = __pyx_t_10; @@ -206807,7 +192268,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * if c_context_node.type in (tree.XML_DOCUMENT_NODE, * tree.XML_HTML_DOCUMENT_NODE): */ - __Pyx_TraceLine(195,0,__PYX_ERR(19, 195, __pyx_L22_error)) /*else*/ { __pyx_t_10 = ((PyObject *)__pyx_f_4lxml_5etree__newOpaqueAppendOnlyNodeWrapper(__pyx_v_c_ctxt->insert)); if (unlikely(!__pyx_t_10)) __PYX_ERR(19, 195, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_10); @@ -206823,18 +192283,8 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * tree.XML_HTML_DOCUMENT_NODE): * c_node = tree.xmlDocGetRootElement(c_context_node) */ - __Pyx_TraceLine(196,0,__PYX_ERR(19, 196, __pyx_L22_error)) switch (__pyx_v_c_context_node->type) { case XML_DOCUMENT_NODE: - - /* "src/lxml/xsltext.pxi":197 - * output_parent = _newOpaqueAppendOnlyNodeWrapper(c_ctxt.insert) - * if c_context_node.type in (tree.XML_DOCUMENT_NODE, - * tree.XML_HTML_DOCUMENT_NODE): # <<<<<<<<<<<<<< - * c_node = tree.xmlDocGetRootElement(c_context_node) - * if c_node is not NULL: - */ - __Pyx_TraceLine(197,0,__PYX_ERR(19, 197, __pyx_L22_error)) case XML_HTML_DOCUMENT_NODE: /* "src/lxml/xsltext.pxi":198 @@ -206844,7 +192294,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * if c_node is not NULL: * context_node = _newReadOnlyProxy(self_node, c_node) */ - __Pyx_TraceLine(198,0,__PYX_ERR(19, 198, __pyx_L22_error)) __pyx_v_c_node = xmlDocGetRootElement(((xmlDoc *)__pyx_v_c_context_node)); /* "src/lxml/xsltext.pxi":199 @@ -206854,7 +192303,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * context_node = _newReadOnlyProxy(self_node, c_node) * else: */ - __Pyx_TraceLine(199,0,__PYX_ERR(19, 199, __pyx_L22_error)) __pyx_t_1 = ((__pyx_v_c_node != NULL) != 0); if (__pyx_t_1) { @@ -206865,7 +192313,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * else: * context_node = None */ - __Pyx_TraceLine(200,0,__PYX_ERR(19, 200, __pyx_L22_error)) __pyx_t_10 = ((PyObject *)__pyx_f_4lxml_5etree__newReadOnlyProxy(__pyx_v_self_node, __pyx_v_c_node)); if (unlikely(!__pyx_t_10)) __PYX_ERR(19, 200, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF_SET(__pyx_v_context_node, ((struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *)__pyx_t_10)); @@ -206888,7 +192335,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * elif c_context_node.type in (tree.XML_ATTRIBUTE_NODE, * tree.XML_TEXT_NODE, */ - __Pyx_TraceLine(202,0,__PYX_ERR(19, 202, __pyx_L22_error)) /*else*/ { __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_context_node, ((struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *)Py_None)); @@ -206903,6 +192349,7 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * c_node = tree.xmlDocGetRootElement(c_context_node) */ break; + case XML_ATTRIBUTE_NODE: /* "src/lxml/xsltext.pxi":203 * else: @@ -206911,8 +192358,7 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * tree.XML_TEXT_NODE, * tree.XML_CDATA_SECTION_NODE): */ - __Pyx_TraceLine(203,0,__PYX_ERR(19, 203, __pyx_L22_error)) - case XML_ATTRIBUTE_NODE: + case XML_TEXT_NODE: /* "src/lxml/xsltext.pxi":204 * context_node = None @@ -206921,17 +192367,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * tree.XML_CDATA_SECTION_NODE): * # this isn't easy to support using read-only */ - __Pyx_TraceLine(204,0,__PYX_ERR(19, 204, __pyx_L22_error)) - case XML_TEXT_NODE: - - /* "src/lxml/xsltext.pxi":205 - * elif c_context_node.type in (tree.XML_ATTRIBUTE_NODE, - * tree.XML_TEXT_NODE, - * tree.XML_CDATA_SECTION_NODE): # <<<<<<<<<<<<<< - * # this isn't easy to support using read-only - * # nodes, as the smart-string factory must - */ - __Pyx_TraceLine(205,0,__PYX_ERR(19, 205, __pyx_L22_error)) case XML_CDATA_SECTION_NODE: /* "src/lxml/xsltext.pxi":209 @@ -206941,7 +192376,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * else: * context_node = _newReadOnlyProxy(self_node, c_context_node) */ - __Pyx_TraceLine(209,0,__PYX_ERR(19, 209, __pyx_L22_error)) __pyx_t_10 = __Pyx_PyUnicode_From_xmlElementType(__pyx_v_c_context_node->type, 0, ' ', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(19, 209, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unsupported_element_type, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(19, 209, __pyx_L22_error) @@ -206971,7 +192405,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * * # run the XSLT extension */ - __Pyx_TraceLine(211,0,__PYX_ERR(19, 211, __pyx_L22_error)) __pyx_t_10 = ((PyObject *)__pyx_f_4lxml_5etree__newReadOnlyProxy(__pyx_v_self_node, __pyx_v_c_context_node)); if (unlikely(!__pyx_t_10)) __PYX_ERR(19, 211, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF_SET(__pyx_v_context_node, ((struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *)__pyx_t_10)); @@ -206986,7 +192419,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * extension.execute(context, self_node, context_node, output_parent) * finally: */ - __Pyx_TraceLine(214,0,__PYX_ERR(19, 214, __pyx_L22_error)) if (!(likely(((((PyObject *)__pyx_v_self_node)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_self_node), __pyx_ptype_4lxml_5etree__ReadOnlyElementProxy))))) __PYX_ERR(19, 214, __pyx_L22_error) __pyx_t_10 = ((PyObject *)__pyx_v_self_node); __Pyx_INCREF(__pyx_t_10); @@ -207003,7 +192435,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * finally: * context._extension_element_proxy = None */ - __Pyx_TraceLine(215,0,__PYX_ERR(19, 215, __pyx_L22_error)) __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_extension), __pyx_n_s_execute); if (unlikely(!__pyx_t_11)) __PYX_ERR(19, 215, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_2 = NULL; @@ -207067,7 +192498,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * if self_node is not None: * _freeReadOnlyProxies(self_node) */ - __Pyx_TraceLine(217,0,__PYX_ERR(19, 217, __pyx_L14_error)) /*finally:*/ { /*normal exit:*/{ __Pyx_INCREF(Py_None); @@ -207083,7 +192513,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * _freeReadOnlyProxies(self_node) * except Exception as e: */ - __Pyx_TraceLine(218,0,__PYX_ERR(19, 218, __pyx_L14_error)) __pyx_t_1 = (((PyObject *)__pyx_v_self_node) != Py_None); __pyx_t_15 = (__pyx_t_1 != 0); if (__pyx_t_15) { @@ -207095,7 +192524,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * except Exception as e: * try: */ - __Pyx_TraceLine(219,0,__PYX_ERR(19, 219, __pyx_L14_error)) __pyx_t_10 = __pyx_f_4lxml_5etree__freeReadOnlyProxies(__pyx_v_self_node); if (unlikely(!__pyx_t_10)) __PYX_ERR(19, 219, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -207137,7 +192565,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * if self_node is not None: * _freeReadOnlyProxies(self_node) */ - __Pyx_TraceLine(217,0,__PYX_ERR(19, 217, __pyx_L28_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_context->_extension_element_proxy); @@ -207151,7 +192578,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * _freeReadOnlyProxies(self_node) * except Exception as e: */ - __Pyx_TraceLine(218,0,__PYX_ERR(19, 218, __pyx_L28_error)) __pyx_t_15 = (((PyObject *)__pyx_v_self_node) != Py_None); __pyx_t_1 = (__pyx_t_15 != 0); if (__pyx_t_1) { @@ -207163,7 +192589,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * except Exception as e: * try: */ - __Pyx_TraceLine(219,0,__PYX_ERR(19, 219, __pyx_L28_error)) __pyx_t_10 = __pyx_f_4lxml_5etree__freeReadOnlyProxies(__pyx_v_self_node); if (unlikely(!__pyx_t_10)) __PYX_ERR(19, 219, __pyx_L28_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -207231,7 +192656,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * try: * e = unicode(e).encode(u"UTF-8") */ - __Pyx_TraceLine(220,0,__PYX_ERR(19, 220, __pyx_L16_except_error)) __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_16) { __Pyx_AddTraceback("lxml.etree._callExtensionElement", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -207249,7 +192673,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * e = unicode(e).encode(u"UTF-8") * except: */ - __Pyx_TraceLine(221,0,__PYX_ERR(19, 221, __pyx_L32_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -207266,7 +192689,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * except: * e = repr(e).encode(u"UTF-8") */ - __Pyx_TraceLine(222,0,__PYX_ERR(19, 222, __pyx_L32_error)) __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_v_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 222, __pyx_L32_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_24 = PyUnicode_AsUTF8String(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_24)) __PYX_ERR(19, 222, __pyx_L32_error) @@ -207298,7 +192720,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * e = repr(e).encode(u"UTF-8") * message = python.PyBytes_FromFormat( */ - __Pyx_TraceLine(223,0,__PYX_ERR(19, 223, __pyx_L34_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._callExtensionElement", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_24, &__pyx_t_2, &__pyx_t_25) < 0) __PYX_ERR(19, 223, __pyx_L34_except_error) @@ -207313,20 +192734,31 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * message = python.PyBytes_FromFormat( * "Error executing extension element '%s': %s", */ - __Pyx_TraceLine(224,0,__PYX_ERR(19, 224, __pyx_L34_except_error)) - __pyx_t_26 = PyObject_Repr(__pyx_v_e); if (unlikely(!__pyx_t_26)) __PYX_ERR(19, 224, __pyx_L34_except_error) - __Pyx_GOTREF(__pyx_t_26); - __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_26, __pyx_n_s_encode); if (unlikely(!__pyx_t_27)) __PYX_ERR(19, 224, __pyx_L34_except_error) + __pyx_t_27 = PyObject_Repr(__pyx_v_e); if (unlikely(!__pyx_t_27)) __PYX_ERR(19, 224, __pyx_L34_except_error) __Pyx_GOTREF(__pyx_t_27); - __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; - __pyx_t_26 = __Pyx_PyObject_Call(__pyx_t_27, __pyx_tuple__368, NULL); if (unlikely(!__pyx_t_26)) __PYX_ERR(19, 224, __pyx_L34_except_error) - __Pyx_GOTREF(__pyx_t_26); + __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_encode); if (unlikely(!__pyx_t_28)) __PYX_ERR(19, 224, __pyx_L34_except_error) + __Pyx_GOTREF(__pyx_t_28); __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; + __pyx_t_27 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_28))) { + __pyx_t_27 = PyMethod_GET_SELF(__pyx_t_28); + if (likely(__pyx_t_27)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_28); + __Pyx_INCREF(__pyx_t_27); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_28, function); + } + } + __pyx_t_26 = (__pyx_t_27) ? __Pyx_PyObject_Call2Args(__pyx_t_28, __pyx_t_27, __pyx_kp_u_UTF_8) : __Pyx_PyObject_CallOneArg(__pyx_t_28, __pyx_kp_u_UTF_8); + __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0; + if (unlikely(!__pyx_t_26)) __PYX_ERR(19, 224, __pyx_L34_except_error) + __Pyx_GOTREF(__pyx_t_26); + __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; __Pyx_DECREF_SET(__pyx_v_e, __pyx_t_26); __pyx_t_26 = 0; - __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; + __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0; goto __pyx_L33_exception_handled; } __pyx_L34_except_error:; @@ -207358,7 +192790,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * "Error executing extension element '%s': %s", * c_inst_node.name, _cstr(e)) */ - __Pyx_TraceLine(225,0,__PYX_ERR(19, 225, __pyx_L16_except_error)) __pyx_t_25 = PyBytes_FromFormat(((char *)"Error executing extension element '%s': %s"), __pyx_v_c_inst_node->name, PyBytes_AS_STRING(__pyx_v_e)); if (unlikely(!__pyx_t_25)) __PYX_ERR(19, 225, __pyx_L16_except_error) __Pyx_GOTREF(__pyx_t_25); __pyx_v_message = ((PyObject*)__pyx_t_25); @@ -207371,13 +192802,12 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * context._exc._store_raised() * except: */ - __Pyx_TraceLine(228,0,__PYX_ERR(19, 228, __pyx_L16_except_error)) if (unlikely(__pyx_v_message == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); __PYX_ERR(19, 228, __pyx_L16_except_error) } - __pyx_t_28 = __Pyx_PyBytes_AsWritableString(__pyx_v_message); if (unlikely((!__pyx_t_28) && PyErr_Occurred())) __PYX_ERR(19, 228, __pyx_L16_except_error) - xsltTransformError(__pyx_v_c_ctxt, NULL, __pyx_v_c_inst_node, ((char *)"%s"), __pyx_t_28); + __pyx_t_29 = __Pyx_PyBytes_AsWritableString(__pyx_v_message); if (unlikely((!__pyx_t_29) && PyErr_Occurred())) __PYX_ERR(19, 228, __pyx_L16_except_error) + xsltTransformError(__pyx_v_c_ctxt, NULL, __pyx_v_c_inst_node, ((char *)"%s"), __pyx_t_29); /* "src/lxml/xsltext.pxi":229 * c_inst_node.name, _cstr(e)) @@ -207386,11 +192816,10 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * except: * # just in case */ - __Pyx_TraceLine(229,0,__PYX_ERR(19, 229, __pyx_L16_except_error)) ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_context->__pyx_base._exc->__pyx_vtab)->_store_raised(__pyx_v_context->__pyx_base._exc); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L15_exception_handled; } @@ -207401,7 +192830,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * # just in case * message = python.PyBytes_FromFormat( */ - __Pyx_TraceLine(230,0,__PYX_ERR(19, 230, __pyx_L16_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._callExtensionElement", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_11, &__pyx_t_10) < 0) __PYX_ERR(19, 230, __pyx_L16_except_error) @@ -207416,7 +192844,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * "Error executing extension element '%s'", c_inst_node.name) * xslt.xsltTransformError(c_ctxt, NULL, c_inst_node, "%s", message) */ - __Pyx_TraceLine(232,0,__PYX_ERR(19, 232, __pyx_L16_except_error)) __pyx_t_25 = PyBytes_FromFormat(((char *)"Error executing extension element '%s'"), __pyx_v_c_inst_node->name); if (unlikely(!__pyx_t_25)) __PYX_ERR(19, 232, __pyx_L16_except_error) __Pyx_GOTREF(__pyx_t_25); __pyx_v_message = ((PyObject*)__pyx_t_25); @@ -207429,13 +192856,12 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * context._exc._store_raised() * except: */ - __Pyx_TraceLine(234,0,__PYX_ERR(19, 234, __pyx_L16_except_error)) if (unlikely(__pyx_v_message == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); __PYX_ERR(19, 234, __pyx_L16_except_error) } - __pyx_t_28 = __Pyx_PyBytes_AsWritableString(__pyx_v_message); if (unlikely((!__pyx_t_28) && PyErr_Occurred())) __PYX_ERR(19, 234, __pyx_L16_except_error) - xsltTransformError(__pyx_v_c_ctxt, NULL, __pyx_v_c_inst_node, ((char *)"%s"), __pyx_t_28); + __pyx_t_29 = __Pyx_PyBytes_AsWritableString(__pyx_v_message); if (unlikely((!__pyx_t_29) && PyErr_Occurred())) __PYX_ERR(19, 234, __pyx_L16_except_error) + xsltTransformError(__pyx_v_c_ctxt, NULL, __pyx_v_c_inst_node, ((char *)"%s"), __pyx_t_29); /* "src/lxml/xsltext.pxi":235 * "Error executing extension element '%s'", c_inst_node.name) @@ -207444,11 +192870,10 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * except: * # no Python functions here - everything can fail... */ - __Pyx_TraceLine(235,0,__PYX_ERR(19, 235, __pyx_L16_except_error)) ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_context->__pyx_base._exc->__pyx_vtab)->_store_raised(__pyx_v_context->__pyx_base._exc); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L15_exception_handled; } __pyx_L16_except_error:; @@ -207487,6 +192912,7 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p goto __pyx_L13_try_end; __pyx_L8_error:; __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0; + __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0; __Pyx_XDECREF(__pyx_t_26); __pyx_t_26 = 0; __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -207502,7 +192928,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * # no Python functions here - everything can fail... * xslt.xsltTransformError(c_ctxt, NULL, c_inst_node, */ - __Pyx_TraceLine(236,0,__PYX_ERR(19, 236, __pyx_L10_except_error)) /*except:*/ { __Pyx_AddTraceback("lxml.etree._callExtensionElement", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_9) < 0) __PYX_ERR(19, 236, __pyx_L10_except_error) @@ -207517,7 +192942,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * "Error during XSLT extension element evaluation") * context._exc._store_raised() */ - __Pyx_TraceLine(238,0,__PYX_ERR(19, 238, __pyx_L10_except_error)) xsltTransformError(__pyx_v_c_ctxt, NULL, __pyx_v_c_inst_node, ((char *)"Error during XSLT extension element evaluation")); /* "src/lxml/xsltext.pxi":240 @@ -207527,11 +192951,10 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * finally: * return # swallow any further exceptions */ - __Pyx_TraceLine(240,0,__PYX_ERR(19, 240, __pyx_L10_except_error)) ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_context->__pyx_base._exc->__pyx_vtab)->_store_raised(__pyx_v_context->__pyx_base._exc); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L9_exception_handled; } __pyx_L10_except_error:; @@ -207562,7 +192985,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p * finally: * return # swallow any further exceptions # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(242,0,__PYX_ERR(19, 242, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ goto __pyx_L0; @@ -207573,6 +192995,7 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p __Pyx_PyThreadState_assign __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_8 = 0; __pyx_t_7 = 0; __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0; + __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0; __Pyx_XDECREF(__pyx_t_26); __pyx_t_26 = 0; __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -207615,16 +193038,6 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_XDECREF(__pyx_t_10); - __Pyx_XDECREF(__pyx_t_11); - __Pyx_XDECREF(__pyx_t_24); - __Pyx_XDECREF(__pyx_t_25); - __Pyx_XDECREF(__pyx_t_26); - __Pyx_XDECREF(__pyx_t_27); - __Pyx_WriteUnraisable("lxml.etree._callExtensionElement", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); __Pyx_XDECREF((PyObject *)__pyx_v_extension); @@ -207633,14 +193046,13 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p __Pyx_XDECREF(__pyx_v_output_parent); __Pyx_XDECREF(__pyx_v_e); __Pyx_XDECREF(__pyx_v_message); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif } -/* "lxml/etree.pyx":3514 +/* "lxml/etree.pyx":3508 * u"Base class for XML validators." * cdef _ErrorLog _error_log * def __cinit__(self): # <<<<<<<<<<<<<< @@ -207666,21 +193078,18 @@ static int __pyx_pw_4lxml_5etree_10_Validator_1__cinit__(PyObject *__pyx_v_self, static int __pyx_pf_4lxml_5etree_10_Validator___cinit__(struct __pyx_obj_4lxml_5etree__Validator *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[0], 3514, 0, __PYX_ERR(0, 3514, __pyx_L1_error)); - /* "lxml/etree.pyx":3515 + /* "lxml/etree.pyx":3509 * cdef _ErrorLog _error_log * def __cinit__(self): * self._error_log = _ErrorLog() # <<<<<<<<<<<<<< * * def validate(self, etree): */ - __Pyx_TraceLine(3515,0,__PYX_ERR(0, 3515, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__ErrorLog)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3515, __pyx_L1_error) + __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_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_error_log); @@ -207688,7 +193097,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":3514 + /* "lxml/etree.pyx":3508 * u"Base class for XML validators." * cdef _ErrorLog _error_log * def __cinit__(self): # <<<<<<<<<<<<<< @@ -207704,12 +193113,11 @@ static int __pyx_pf_4lxml_5etree_10_Validator___cinit__(struct __pyx_obj_4lxml_5 __Pyx_AddTraceback("lxml.etree._Validator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":3517 +/* "lxml/etree.pyx":3511 * self._error_log = _ErrorLog() * * def validate(self, etree): # <<<<<<<<<<<<<< @@ -207734,24 +193142,19 @@ static PyObject *__pyx_pw_4lxml_5etree_10_Validator_3validate(PyObject *__pyx_v_ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_2validate(struct __pyx_obj_4lxml_5etree__Validator *__pyx_v_self, PyObject *__pyx_v_etree) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__369) __Pyx_RefNannySetupContext("validate", 0); - __Pyx_TraceCall("validate", __pyx_f[0], 3517, 0, __PYX_ERR(0, 3517, __pyx_L1_error)); - /* "lxml/etree.pyx":3524 + /* "lxml/etree.pyx":3518 * Returns true if document is valid, false if not. * """ * return self(etree) # <<<<<<<<<<<<<< * * def assertValid(self, etree): */ - __Pyx_TraceLine(3524,0,__PYX_ERR(0, 3524, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_t_2 = ((PyObject *)__pyx_v_self); __pyx_t_3 = NULL; @@ -207764,44 +193167,16 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_2validate(struct __pyx_obj_4 __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_etree); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3524, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_etree}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3524, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_etree}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3524, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3524, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_v_etree); - __Pyx_GIVEREF(__pyx_v_etree); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_etree); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3524, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __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) + __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":3517 + /* "lxml/etree.pyx":3511 * self._error_log = _ErrorLog() * * def validate(self, etree): # <<<<<<<<<<<<<< @@ -207814,17 +193189,15 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_2validate(struct __pyx_obj_4 __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("lxml.etree._Validator.validate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":3526 +/* "lxml/etree.pyx":3520 * return self(etree) * * def assertValid(self, etree): # <<<<<<<<<<<<<< @@ -207849,26 +193222,21 @@ static PyObject *__pyx_pw_4lxml_5etree_10_Validator_5assertValid(PyObject *__pyx static PyObject *__pyx_pf_4lxml_5etree_10_Validator_4assertValid(struct __pyx_obj_4lxml_5etree__Validator *__pyx_v_self, PyObject *__pyx_v_etree) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; + int __pyx_t_4; int __pyx_t_5; - int __pyx_t_6; - __Pyx_TraceFrameInit(__pyx_codeobj__370) __Pyx_RefNannySetupContext("assertValid", 0); - __Pyx_TraceCall("assertValid", __pyx_f[0], 3526, 0, __PYX_ERR(0, 3526, __pyx_L1_error)); - /* "lxml/etree.pyx":3531 + /* "lxml/etree.pyx":3525 * Raises `DocumentInvalid` if the document does not comply with the schema. * """ * if not self(etree): # <<<<<<<<<<<<<< * raise DocumentInvalid(self._error_log._buildExceptionMessage( * u"Document does not comply with schema"), */ - __Pyx_TraceLine(3531,0,__PYX_ERR(0, 3531, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_t_2 = ((PyObject *)__pyx_v_self); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -207880,64 +193248,34 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_4assertValid(struct __pyx_ob __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_etree); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3531, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_etree}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3531, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_etree}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3531, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3531, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_v_etree); - __Pyx_GIVEREF(__pyx_v_etree); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_etree); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3531, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __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) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3531, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3525, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = ((!__pyx_t_5) != 0); - if (unlikely(__pyx_t_6)) { + __pyx_t_5 = ((!__pyx_t_4) != 0); + if (unlikely(__pyx_t_5)) { - /* "lxml/etree.pyx":3532 + /* "lxml/etree.pyx":3526 * """ * if not self(etree): * raise DocumentInvalid(self._error_log._buildExceptionMessage( # <<<<<<<<<<<<<< * u"Document does not comply with schema"), * self._error_log) */ - __Pyx_TraceLine(3532,0,__PYX_ERR(0, 3532, __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, 3532, __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, 3526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "lxml/etree.pyx":3534 + /* "lxml/etree.pyx":3528 * raise DocumentInvalid(self._error_log._buildExceptionMessage( * u"Document does not comply with schema"), * self._error_log) # <<<<<<<<<<<<<< * * def assert_(self, etree): */ - __Pyx_TraceLine(3534,0,__PYX_ERR(0, 3534, __pyx_L1_error)) - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3532, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -207946,22 +193284,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":3532 + /* "lxml/etree.pyx":3526 * """ * if not self(etree): * raise DocumentInvalid(self._error_log._buildExceptionMessage( # <<<<<<<<<<<<<< * u"Document does not comply with schema"), * self._error_log) */ - __Pyx_TraceLine(3532,0,__PYX_ERR(0, 3532, __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, 3532, __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, 3526, __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, 3532, __pyx_L1_error) + __PYX_ERR(0, 3526, __pyx_L1_error) - /* "lxml/etree.pyx":3531 + /* "lxml/etree.pyx":3525 * Raises `DocumentInvalid` if the document does not comply with the schema. * """ * if not self(etree): # <<<<<<<<<<<<<< @@ -207970,7 +193307,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_4assertValid(struct __pyx_ob */ } - /* "lxml/etree.pyx":3526 + /* "lxml/etree.pyx":3520 * return self(etree) * * def assertValid(self, etree): # <<<<<<<<<<<<<< @@ -207985,17 +193322,15 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_4assertValid(struct __pyx_ob __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("lxml.etree._Validator.assertValid", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":3536 +/* "lxml/etree.pyx":3530 * self._error_log) * * def assert_(self, etree): # <<<<<<<<<<<<<< @@ -208020,26 +193355,21 @@ static PyObject *__pyx_pw_4lxml_5etree_10_Validator_7assert_(PyObject *__pyx_v_s static PyObject *__pyx_pf_4lxml_5etree_10_Validator_6assert_(struct __pyx_obj_4lxml_5etree__Validator *__pyx_v_self, PyObject *__pyx_v_etree) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; + int __pyx_t_4; int __pyx_t_5; - int __pyx_t_6; - __Pyx_TraceFrameInit(__pyx_codeobj__371) __Pyx_RefNannySetupContext("assert_", 0); - __Pyx_TraceCall("assert_", __pyx_f[0], 3536, 0, __PYX_ERR(0, 3536, __pyx_L1_error)); - /* "lxml/etree.pyx":3541 + /* "lxml/etree.pyx":3535 * Raises `AssertionError` if the document does not comply with the schema. * """ * if not self(etree): # <<<<<<<<<<<<<< * raise AssertionError, self._error_log._buildExceptionMessage( * u"Document does not comply with schema") */ - __Pyx_TraceLine(3541,0,__PYX_ERR(0, 3541, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_t_2 = ((PyObject *)__pyx_v_self); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -208051,59 +193381,30 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_6assert_(struct __pyx_obj_4l __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_etree); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3541, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_etree}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3541, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_etree}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3541, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3541, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_v_etree); - __Pyx_GIVEREF(__pyx_v_etree); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_etree); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3541, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __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) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3541, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3535, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = ((!__pyx_t_5) != 0); - if (unlikely(__pyx_t_6)) { + __pyx_t_5 = ((!__pyx_t_4) != 0); + if (unlikely(__pyx_t_5)) { - /* "lxml/etree.pyx":3542 + /* "lxml/etree.pyx":3536 * """ * if not self(etree): * raise AssertionError, self._error_log._buildExceptionMessage( # <<<<<<<<<<<<<< * u"Document does not comply with schema") * */ - __Pyx_TraceLine(3542,0,__PYX_ERR(0, 3542, __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, 3542, __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, 3536, __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, 3542, __pyx_L1_error) + __PYX_ERR(0, 3536, __pyx_L1_error) - /* "lxml/etree.pyx":3541 + /* "lxml/etree.pyx":3535 * Raises `AssertionError` if the document does not comply with the schema. * """ * if not self(etree): # <<<<<<<<<<<<<< @@ -208112,7 +193413,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_6assert_(struct __pyx_obj_4l */ } - /* "lxml/etree.pyx":3536 + /* "lxml/etree.pyx":3530 * self._error_log) * * def assert_(self, etree): # <<<<<<<<<<<<<< @@ -208127,17 +193428,15 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_6assert_(struct __pyx_obj_4l __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("lxml.etree._Validator.assert_", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":3545 +/* "lxml/etree.pyx":3539 * u"Document does not comply with schema") * * cpdef _append_log_message(self, int domain, int type, int level, int line, # <<<<<<<<<<<<<< @@ -208148,7 +193447,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_6assert_(struct __pyx_obj_4l static PyObject *__pyx_pw_4lxml_5etree_10_Validator_9_append_log_message(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_4lxml_5etree_10_Validator__append_log_message(struct __pyx_obj_4lxml_5etree__Validator *__pyx_v_self, int __pyx_v_domain, int __pyx_v_type, int __pyx_v_level, int __pyx_v_line, PyObject *__pyx_v_message, PyObject *__pyx_v_filename, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -208160,110 +193458,123 @@ static PyObject *__pyx_f_4lxml_5etree_10_Validator__append_log_message(struct __ PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__372) __Pyx_RefNannySetupContext("_append_log_message", 0); - __Pyx_TraceCall("_append_log_message", __pyx_f[0], 3545, 0, __PYX_ERR(0, 3545, __pyx_L1_error)); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_append_log_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3545, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__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, 3545, __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, 3545, __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, 3545, __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, 3545, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_7 = __pyx_t_1; __pyx_t_8 = NULL; - __pyx_t_9 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_7, function); - __pyx_t_9 = 1; - } - } - #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, 3545, __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; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - #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, 3545, __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; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else + 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 + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif - { - __pyx_t_10 = PyTuple_New(6+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3545, __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; + __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_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_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_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_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_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_7 = __pyx_t_1; __pyx_t_8 = NULL; + __pyx_t_9 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } } - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_5); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_9, __pyx_t_6); - __Pyx_INCREF(__pyx_v_message); - __Pyx_GIVEREF(__pyx_v_message); - PyTuple_SET_ITEM(__pyx_t_10, 4+__pyx_t_9, __pyx_v_message); - __Pyx_INCREF(__pyx_v_filename); - __Pyx_GIVEREF(__pyx_v_filename); - PyTuple_SET_ITEM(__pyx_t_10, 5+__pyx_t_9, __pyx_v_filename); - __pyx_t_3 = 0; - __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, 3545, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + #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_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else + #endif + #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_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else + #endif + { + __pyx_t_10 = PyTuple_New(6+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3539, __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; + } + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_9, __pyx_t_6); + __Pyx_INCREF(__pyx_v_message); + __Pyx_GIVEREF(__pyx_v_message); + PyTuple_SET_ITEM(__pyx_t_10, 4+__pyx_t_9, __pyx_v_message); + __Pyx_INCREF(__pyx_v_filename); + __Pyx_GIVEREF(__pyx_v_filename); + PyTuple_SET_ITEM(__pyx_t_10, 5+__pyx_t_9, __pyx_v_filename); + __pyx_t_3 = 0; + __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_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } - /* "lxml/etree.pyx":3547 + /* "lxml/etree.pyx":3541 * cpdef _append_log_message(self, int domain, int type, int level, int line, * message, filename): * self._error_log._receiveGeneric(domain, type, level, line, message, # <<<<<<<<<<<<<< * filename) * */ - __Pyx_TraceLine(3547,0,__PYX_ERR(0, 3547, __pyx_L1_error)) __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":3545 + /* "lxml/etree.pyx":3539 * u"Document does not comply with schema") * * cpdef _append_log_message(self, int domain, int type, int level, int line, # <<<<<<<<<<<<<< @@ -208288,14 +193599,13 @@ static PyObject *__pyx_f_4lxml_5etree_10_Validator__append_log_message(struct __ __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_10_Validator_9_append_log_message(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_5etree_10_Validator_9_append_log_message = {"_append_log_message", (PyCFunction)__pyx_pw_4lxml_5etree_10_Validator_9_append_log_message, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_5etree_10_Validator_9_append_log_message = {"_append_log_message", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_10_Validator_9_append_log_message, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_5etree_10_Validator_9_append_log_message(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_domain; int __pyx_v_type; @@ -208337,35 +193647,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, 3545, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_append_log_message", 1, 6, 6, 1); __PYX_ERR(0, 3539, __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, 3545, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_append_log_message", 1, 6, 6, 2); __PYX_ERR(0, 3539, __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, 3545, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_append_log_message", 1, 6, 6, 3); __PYX_ERR(0, 3539, __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, 3545, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_append_log_message", 1, 6, 6, 4); __PYX_ERR(0, 3539, __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, 3545, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_append_log_message", 1, 6, 6, 5); __PYX_ERR(0, 3539, __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, 3545, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_append_log_message") < 0)) __PYX_ERR(0, 3539, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; @@ -208377,16 +193687,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, 3545, __pyx_L3_error) - __pyx_v_type = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_type == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3545, __pyx_L3_error) - __pyx_v_level = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3545, __pyx_L3_error) - __pyx_v_line = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_line == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3545, __pyx_L3_error) + __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_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, 3545, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_append_log_message", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3539, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._Validator._append_log_message", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -208401,14 +193711,11 @@ static PyObject *__pyx_pw_4lxml_5etree_10_Validator_9_append_log_message(PyObjec static PyObject *__pyx_pf_4lxml_5etree_10_Validator_8_append_log_message(struct __pyx_obj_4lxml_5etree__Validator *__pyx_v_self, int __pyx_v_domain, int __pyx_v_type, int __pyx_v_level, int __pyx_v_line, PyObject *__pyx_v_message, PyObject *__pyx_v_filename) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__372) __Pyx_RefNannySetupContext("_append_log_message", 0); - __Pyx_TraceCall("_append_log_message (wrapper)", __pyx_f[0], 3545, 0, __PYX_ERR(0, 3545, __pyx_L1_error)); __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, 3545, __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, 3539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -208421,12 +193728,11 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_8_append_log_message(struct __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":3550 +/* "lxml/etree.pyx":3544 * filename) * * cpdef _clear_error_log(self): # <<<<<<<<<<<<<< @@ -208437,63 +193743,72 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_8_append_log_message(struct static PyObject *__pyx_pw_4lxml_5etree_10_Validator_11_clear_error_log(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_4lxml_5etree_10_Validator__clear_error_log(struct __pyx_obj_4lxml_5etree__Validator *__pyx_v_self, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__373) __Pyx_RefNannySetupContext("_clear_error_log", 0); - __Pyx_TraceCall("_clear_error_log", __pyx_f[0], 3550, 0, __PYX_ERR(0, 3550, __pyx_L1_error)); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_clear_error_log); 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)__pyx_pw_4lxml_5etree_10_Validator_11_clear_error_log)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); + 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 + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #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_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); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } } + __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) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3550, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3550, __pyx_L1_error) + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; } - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } - /* "lxml/etree.pyx":3551 + /* "lxml/etree.pyx":3545 * * cpdef _clear_error_log(self): * self._error_log.clear() # <<<<<<<<<<<<<< * * property error_log: */ - __Pyx_TraceLine(3551,0,__PYX_ERR(0, 3551, __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, 3551, __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, 3545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3550 + /* "lxml/etree.pyx":3544 * filename) * * cpdef _clear_error_log(self): # <<<<<<<<<<<<<< @@ -208513,7 +193828,6 @@ static PyObject *__pyx_f_4lxml_5etree_10_Validator__clear_error_log(struct __pyx __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -208534,14 +193848,11 @@ static PyObject *__pyx_pw_4lxml_5etree_10_Validator_11_clear_error_log(PyObject static PyObject *__pyx_pf_4lxml_5etree_10_Validator_10_clear_error_log(struct __pyx_obj_4lxml_5etree__Validator *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__373) __Pyx_RefNannySetupContext("_clear_error_log", 0); - __Pyx_TraceCall("_clear_error_log (wrapper)", __pyx_f[0], 3550, 0, __PYX_ERR(0, 3550, __pyx_L1_error)); __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, 3550, __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, 3544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -208554,12 +193865,11 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_10_clear_error_log(struct __ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "lxml/etree.pyx":3555 +/* "lxml/etree.pyx":3549 * property error_log: * u"The log of validation errors and warnings." * def __get__(self): # <<<<<<<<<<<<<< @@ -208582,47 +193892,43 @@ static PyObject *__pyx_pw_4lxml_5etree_10_Validator_9error_log_1__get__(PyObject static PyObject *__pyx_pf_4lxml_5etree_10_Validator_9error_log___get__(struct __pyx_obj_4lxml_5etree__Validator *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 3555, 0, __PYX_ERR(0, 3555, __pyx_L1_error)); - /* "lxml/etree.pyx":3556 + /* "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() * */ - __Pyx_TraceLine(3556,0,__PYX_ERR(0, 3556, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __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, 3556, __pyx_L1_error) + __PYX_ERR(0, 3550, __pyx_L1_error) } } #endif - /* "lxml/etree.pyx":3557 + /* "lxml/etree.pyx":3551 * def __get__(self): * assert self._error_log is not None, "XPath evaluator not initialised" * return self._error_log.copy() # <<<<<<<<<<<<<< * * include "dtd.pxi" # DTD */ - __Pyx_TraceLine(3557,0,__PYX_ERR(0, 3557, __pyx_L1_error)) __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, 3557, __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, 3551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3555 + /* "lxml/etree.pyx":3549 * property error_log: * u"The log of validation errors and warnings." * def __get__(self): # <<<<<<<<<<<<<< @@ -208637,7 +193943,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_9error_log___get__(struct __ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -208652,12 +193957,10 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_9error_log___get__(struct __ static CYTHON_INLINE int __pyx_f_4lxml_5etree__assertValidDTDNode(PyObject *__pyx_v_node, void *__pyx_v_c_node) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_assertValidDTDNode", 0); - __Pyx_TraceCall("_assertValidDTDNode", __pyx_f[20], 17, 0, __PYX_ERR(20, 17, __pyx_L1_error)); /* "src/lxml/dtd.pxi":18 * @@ -208666,13 +193969,12 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__assertValidDTDNode(PyObject *__py * * */ - __Pyx_TraceLine(18,0,__PYX_ERR(20, 18, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_c_node != NULL) != 0))) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_invalid_DTD_proxy_at_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 18, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_invalid_DTD_proxy_at_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyErr_SetObject(PyExc_AssertionError, __pyx_t_2); @@ -208699,7 +194001,6 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__assertValidDTDNode(PyObject *__py __Pyx_AddTraceback("lxml.etree._assertValidDTDNode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -208727,7 +194028,6 @@ static PyObject *__pyx_pw_4lxml_5etree_22_DTDElementContentDecl_1__repr__(PyObje static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl___repr__(struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -208737,7 +194037,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl___repr__(struct PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[20], 28, 0, __PYX_ERR(20, 28, __pyx_L1_error)); /* "src/lxml/dtd.pxi":29 * @@ -208746,7 +194045,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl___repr__(struct * * property name: */ - __Pyx_TraceLine(29,0,__PYX_ERR(20, 29, __pyx_L1_error)) __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) __Pyx_GOTREF(__pyx_t_1); @@ -208814,7 +194112,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl___repr__(struct __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -208842,13 +194139,11 @@ static PyObject *__pyx_pw_4lxml_5etree_22_DTDElementContentDecl_4name_1__get__(P static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4name___get__(struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[20], 32, 0, __PYX_ERR(20, 32, __pyx_L1_error)); /* "src/lxml/dtd.pxi":33 * property name: @@ -208857,7 +194152,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4name___get__(st * return funicode(self._c_node.name) if self._c_node.name is not NULL else None * */ - __Pyx_TraceLine(33,0,__PYX_ERR(20, 33, __pyx_L1_error)) __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 @@ -208867,7 +194161,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4name___get__(st * * property type: */ - __Pyx_TraceLine(34,0,__PYX_ERR(20, 34, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); if (((__pyx_v_self->_c_node->name != NULL) != 0)) { __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->_c_node->name); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 34, __pyx_L1_error) @@ -208898,7 +194191,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4name___get__(st __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -208927,12 +194219,10 @@ static PyObject *__pyx_pw_4lxml_5etree_22_DTDElementContentDecl_4type_1__get__(P static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4type___get__(struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *__pyx_v_self) { int __pyx_v_type; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlElementContentType __pyx_t_2; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[20], 37, 0, __PYX_ERR(20, 37, __pyx_L1_error)); /* "src/lxml/dtd.pxi":38 * property type: @@ -208941,7 +194231,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4type___get__(st * cdef int type = self._c_node.type * if type == tree.XML_ELEMENT_CONTENT_PCDATA: */ - __Pyx_TraceLine(38,0,__PYX_ERR(20, 38, __pyx_L1_error)) __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 @@ -208951,7 +194240,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4type___get__(st * if type == tree.XML_ELEMENT_CONTENT_PCDATA: * return "pcdata" */ - __Pyx_TraceLine(39,0,__PYX_ERR(20, 39, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_c_node->type; __pyx_v_type = __pyx_t_2; @@ -208962,7 +194250,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4type___get__(st * return "pcdata" * elif type == tree.XML_ELEMENT_CONTENT_ELEMENT: */ - __Pyx_TraceLine(40,0,__PYX_ERR(20, 40, __pyx_L1_error)) switch (__pyx_v_type) { case XML_ELEMENT_CONTENT_PCDATA: @@ -208973,7 +194260,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4type___get__(st * elif type == tree.XML_ELEMENT_CONTENT_ELEMENT: * return "element" */ - __Pyx_TraceLine(41,0,__PYX_ERR(20, 41, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_pcdata); __pyx_r = __pyx_n_s_pcdata; @@ -208987,15 +194273,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4type___get__(st * elif type == tree.XML_ELEMENT_CONTENT_ELEMENT: */ break; - - /* "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: - */ - __Pyx_TraceLine(42,0,__PYX_ERR(20, 42, __pyx_L1_error)) case XML_ELEMENT_CONTENT_ELEMENT: /* "src/lxml/dtd.pxi":43 @@ -209005,7 +194282,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4type___get__(st * elif type == tree.XML_ELEMENT_CONTENT_SEQ: * return "seq" */ - __Pyx_TraceLine(43,0,__PYX_ERR(20, 43, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_element); __pyx_r = __pyx_n_s_element; @@ -209019,15 +194295,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4type___get__(st * elif type == tree.XML_ELEMENT_CONTENT_SEQ: */ break; - - /* "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: - */ - __Pyx_TraceLine(44,0,__PYX_ERR(20, 44, __pyx_L1_error)) case XML_ELEMENT_CONTENT_SEQ: /* "src/lxml/dtd.pxi":45 @@ -209037,7 +194304,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4type___get__(st * elif type == tree.XML_ELEMENT_CONTENT_OR: * return "or" */ - __Pyx_TraceLine(45,0,__PYX_ERR(20, 45, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_seq); __pyx_r = __pyx_n_s_seq; @@ -209051,15 +194317,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4type___get__(st * elif type == tree.XML_ELEMENT_CONTENT_OR: */ break; - - /* "src/lxml/dtd.pxi":46 - * elif type == tree.XML_ELEMENT_CONTENT_SEQ: - * return "seq" - * elif type == tree.XML_ELEMENT_CONTENT_OR: # <<<<<<<<<<<<<< - * return "or" - * else: - */ - __Pyx_TraceLine(46,0,__PYX_ERR(20, 46, __pyx_L1_error)) case XML_ELEMENT_CONTENT_OR: /* "src/lxml/dtd.pxi":47 @@ -209069,7 +194326,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4type___get__(st * else: * return None */ - __Pyx_TraceLine(47,0,__PYX_ERR(20, 47, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_or); __pyx_r = __pyx_n_s_or; @@ -209092,7 +194348,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4type___get__(st * * property occur: */ - __Pyx_TraceLine(49,0,__PYX_ERR(20, 49, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -209113,7 +194368,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4type___get__(st __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -209142,12 +194396,10 @@ static PyObject *__pyx_pw_4lxml_5etree_22_DTDElementContentDecl_5occur_1__get__( static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5occur___get__(struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *__pyx_v_self) { int __pyx_v_occur; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlElementContentOccur __pyx_t_2; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[20], 52, 0, __PYX_ERR(20, 52, __pyx_L1_error)); /* "src/lxml/dtd.pxi":53 * property occur: @@ -209156,7 +194408,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5occur___get__(s * cdef int occur = self._c_node.ocur * if occur == tree.XML_ELEMENT_CONTENT_ONCE: */ - __Pyx_TraceLine(53,0,__PYX_ERR(20, 53, __pyx_L1_error)) __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 @@ -209166,7 +194417,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5occur___get__(s * if occur == tree.XML_ELEMENT_CONTENT_ONCE: * return "once" */ - __Pyx_TraceLine(54,0,__PYX_ERR(20, 54, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_c_node->ocur; __pyx_v_occur = __pyx_t_2; @@ -209177,7 +194427,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5occur___get__(s * return "once" * elif occur == tree.XML_ELEMENT_CONTENT_OPT: */ - __Pyx_TraceLine(55,0,__PYX_ERR(20, 55, __pyx_L1_error)) switch (__pyx_v_occur) { case XML_ELEMENT_CONTENT_ONCE: @@ -209188,7 +194437,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5occur___get__(s * elif occur == tree.XML_ELEMENT_CONTENT_OPT: * return "opt" */ - __Pyx_TraceLine(56,0,__PYX_ERR(20, 56, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_once); __pyx_r = __pyx_n_s_once; @@ -209202,15 +194450,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5occur___get__(s * elif occur == tree.XML_ELEMENT_CONTENT_OPT: */ break; - - /* "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: - */ - __Pyx_TraceLine(57,0,__PYX_ERR(20, 57, __pyx_L1_error)) case XML_ELEMENT_CONTENT_OPT: /* "src/lxml/dtd.pxi":58 @@ -209220,7 +194459,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5occur___get__(s * elif occur == tree.XML_ELEMENT_CONTENT_MULT: * return "mult" */ - __Pyx_TraceLine(58,0,__PYX_ERR(20, 58, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_opt); __pyx_r = __pyx_n_s_opt; @@ -209234,15 +194472,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5occur___get__(s * elif occur == tree.XML_ELEMENT_CONTENT_MULT: */ break; - - /* "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: - */ - __Pyx_TraceLine(59,0,__PYX_ERR(20, 59, __pyx_L1_error)) case XML_ELEMENT_CONTENT_MULT: /* "src/lxml/dtd.pxi":60 @@ -209252,7 +194481,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5occur___get__(s * elif occur == tree.XML_ELEMENT_CONTENT_PLUS: * return "plus" */ - __Pyx_TraceLine(60,0,__PYX_ERR(20, 60, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_mult); __pyx_r = __pyx_n_s_mult; @@ -209266,15 +194494,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5occur___get__(s * elif occur == tree.XML_ELEMENT_CONTENT_PLUS: */ break; - - /* "src/lxml/dtd.pxi":61 - * elif occur == tree.XML_ELEMENT_CONTENT_MULT: - * return "mult" - * elif occur == tree.XML_ELEMENT_CONTENT_PLUS: # <<<<<<<<<<<<<< - * return "plus" - * else: - */ - __Pyx_TraceLine(61,0,__PYX_ERR(20, 61, __pyx_L1_error)) case XML_ELEMENT_CONTENT_PLUS: /* "src/lxml/dtd.pxi":62 @@ -209284,7 +194503,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5occur___get__(s * else: * return None */ - __Pyx_TraceLine(62,0,__PYX_ERR(20, 62, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_plus); __pyx_r = __pyx_n_s_plus; @@ -209307,7 +194525,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5occur___get__(s * * property left: */ - __Pyx_TraceLine(64,0,__PYX_ERR(20, 64, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -209328,7 +194545,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5occur___get__(s __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -209358,7 +194574,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4left___get__(st xmlElementContent *__pyx_v_c1; struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *__pyx_v_node = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlElementContent *__pyx_t_2; @@ -209366,7 +194581,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4left___get__(st PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[20], 67, 0, __PYX_ERR(20, 67, __pyx_L1_error)); /* "src/lxml/dtd.pxi":68 * property left: @@ -209375,7 +194589,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4left___get__(st * c1 = self._c_node.c1 * if c1: */ - __Pyx_TraceLine(68,0,__PYX_ERR(20, 68, __pyx_L1_error)) __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 @@ -209385,7 +194598,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4left___get__(st * if c1: * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) */ - __Pyx_TraceLine(69,0,__PYX_ERR(20, 69, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_c_node->c1; __pyx_v_c1 = __pyx_t_2; @@ -209396,7 +194608,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4left___get__(st * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) * node._dtd = self._dtd */ - __Pyx_TraceLine(70,0,__PYX_ERR(20, 70, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_c1 != 0); if (__pyx_t_3) { @@ -209407,7 +194618,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4left___get__(st * node._dtd = self._dtd * node._c_node = c1 */ - __Pyx_TraceLine(71,0,__PYX_ERR(20, 71, __pyx_L1_error)) __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)); __pyx_t_5 = ((PyObject *)__pyx_t_4); @@ -209423,7 +194633,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4left___get__(st * node._c_node = c1 * return node */ - __Pyx_TraceLine(72,0,__PYX_ERR(20, 72, __pyx_L1_error)) __pyx_t_5 = ((PyObject *)__pyx_v_self->_dtd); __Pyx_INCREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); @@ -209439,7 +194648,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4left___get__(st * return node * else: */ - __Pyx_TraceLine(73,0,__PYX_ERR(20, 73, __pyx_L1_error)) __pyx_v_node->_c_node = ((xmlElementContent *)__pyx_v_c1); /* "src/lxml/dtd.pxi":74 @@ -209449,7 +194657,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4left___get__(st * else: * return None */ - __Pyx_TraceLine(74,0,__PYX_ERR(20, 74, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_node)); __pyx_r = ((PyObject *)__pyx_v_node); @@ -209471,7 +194678,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4left___get__(st * * property right: */ - __Pyx_TraceLine(76,0,__PYX_ERR(20, 76, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -209495,7 +194701,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4left___get__(st __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_node); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -209525,7 +194730,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5right___get__(s xmlElementContent *__pyx_v_c2; struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *__pyx_v_node = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlElementContent *__pyx_t_2; @@ -209533,7 +194737,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5right___get__(s PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[20], 79, 0, __PYX_ERR(20, 79, __pyx_L1_error)); /* "src/lxml/dtd.pxi":80 * property right: @@ -209542,7 +194745,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5right___get__(s * c2 = self._c_node.c2 * if c2: */ - __Pyx_TraceLine(80,0,__PYX_ERR(20, 80, __pyx_L1_error)) __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 @@ -209552,7 +194754,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5right___get__(s * if c2: * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) */ - __Pyx_TraceLine(81,0,__PYX_ERR(20, 81, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_c_node->c2; __pyx_v_c2 = __pyx_t_2; @@ -209563,7 +194764,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5right___get__(s * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) * node._dtd = self._dtd */ - __Pyx_TraceLine(82,0,__PYX_ERR(20, 82, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_c2 != 0); if (__pyx_t_3) { @@ -209574,7 +194774,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5right___get__(s * node._dtd = self._dtd * node._c_node = c2 */ - __Pyx_TraceLine(83,0,__PYX_ERR(20, 83, __pyx_L1_error)) __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)); __pyx_t_5 = ((PyObject *)__pyx_t_4); @@ -209590,7 +194789,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5right___get__(s * node._c_node = c2 * return node */ - __Pyx_TraceLine(84,0,__PYX_ERR(20, 84, __pyx_L1_error)) __pyx_t_5 = ((PyObject *)__pyx_v_self->_dtd); __Pyx_INCREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); @@ -209606,7 +194804,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5right___get__(s * return node * else: */ - __Pyx_TraceLine(85,0,__PYX_ERR(20, 85, __pyx_L1_error)) __pyx_v_node->_c_node = ((xmlElementContent *)__pyx_v_c2); /* "src/lxml/dtd.pxi":86 @@ -209616,7 +194813,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5right___get__(s * else: * return None */ - __Pyx_TraceLine(86,0,__PYX_ERR(20, 86, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_node)); __pyx_r = ((PyObject *)__pyx_v_node); @@ -209638,7 +194834,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5right___get__(s * * */ - __Pyx_TraceLine(88,0,__PYX_ERR(20, 88, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -209662,7 +194857,6 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5right___get__(s __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_node); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -209690,7 +194884,6 @@ static PyObject *__pyx_pw_4lxml_5etree_17_DTDAttributeDecl_1__repr__(PyObject *_ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl___repr__(struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -209703,7 +194896,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl___repr__(struct __pyx PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[20], 98, 0, __PYX_ERR(20, 98, __pyx_L1_error)); /* "src/lxml/dtd.pxi":99 * @@ -209712,7 +194904,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl___repr__(struct __pyx * * property name: */ - __Pyx_TraceLine(99,0,__PYX_ERR(20, 99, __pyx_L1_error)) __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) __Pyx_GOTREF(__pyx_t_1); @@ -209798,7 +194989,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl___repr__(struct __pyx __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -209826,13 +195016,11 @@ static PyObject *__pyx_pw_4lxml_5etree_17_DTDAttributeDecl_4name_1__get__(PyObje static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4name___get__(struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[20], 102, 0, __PYX_ERR(20, 102, __pyx_L1_error)); /* "src/lxml/dtd.pxi":103 * property name: @@ -209841,7 +195029,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4name___get__(struct * return funicode(self._c_node.name) if self._c_node.name is not NULL else None * */ - __Pyx_TraceLine(103,0,__PYX_ERR(20, 103, __pyx_L1_error)) __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 @@ -209851,7 +195038,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4name___get__(struct * * property elemname: */ - __Pyx_TraceLine(104,0,__PYX_ERR(20, 104, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); if (((__pyx_v_self->_c_node->name != NULL) != 0)) { __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->_c_node->name); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 104, __pyx_L1_error) @@ -209882,7 +195068,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4name___get__(struct __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -209910,13 +195095,11 @@ static PyObject *__pyx_pw_4lxml_5etree_17_DTDAttributeDecl_8elemname_1__get__(Py static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_8elemname___get__(struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[20], 107, 0, __PYX_ERR(20, 107, __pyx_L1_error)); /* "src/lxml/dtd.pxi":108 * property elemname: @@ -209925,7 +195108,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_8elemname___get__(str * return funicode(self._c_node.elem) if self._c_node.elem is not NULL else None * */ - __Pyx_TraceLine(108,0,__PYX_ERR(20, 108, __pyx_L1_error)) __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 @@ -209935,7 +195117,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_8elemname___get__(str * * property prefix: */ - __Pyx_TraceLine(109,0,__PYX_ERR(20, 109, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); if (((__pyx_v_self->_c_node->elem != NULL) != 0)) { __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->_c_node->elem); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 109, __pyx_L1_error) @@ -209966,7 +195147,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_8elemname___get__(str __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -209994,13 +195174,11 @@ static PyObject *__pyx_pw_4lxml_5etree_17_DTDAttributeDecl_6prefix_1__get__(PyOb static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_6prefix___get__(struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[20], 112, 0, __PYX_ERR(20, 112, __pyx_L1_error)); /* "src/lxml/dtd.pxi":113 * property prefix: @@ -210009,7 +195187,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_6prefix___get__(struc * return funicode(self._c_node.prefix) if self._c_node.prefix is not NULL else None * */ - __Pyx_TraceLine(113,0,__PYX_ERR(20, 113, __pyx_L1_error)) __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 @@ -210019,7 +195196,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_6prefix___get__(struc * * property type: */ - __Pyx_TraceLine(114,0,__PYX_ERR(20, 114, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); if (((__pyx_v_self->_c_node->prefix != NULL) != 0)) { __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->_c_node->prefix); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 114, __pyx_L1_error) @@ -210050,7 +195226,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_6prefix___get__(struc __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -210079,12 +195254,10 @@ static PyObject *__pyx_pw_4lxml_5etree_17_DTDAttributeDecl_4type_1__get__(PyObje static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *__pyx_v_self) { int __pyx_v_type; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlAttributeType __pyx_t_2; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[20], 117, 0, __PYX_ERR(20, 117, __pyx_L1_error)); /* "src/lxml/dtd.pxi":118 * property type: @@ -210093,7 +195266,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct * cdef int type = self._c_node.atype * if type == tree.XML_ATTRIBUTE_CDATA: */ - __Pyx_TraceLine(118,0,__PYX_ERR(20, 118, __pyx_L1_error)) __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 @@ -210103,7 +195275,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct * if type == tree.XML_ATTRIBUTE_CDATA: * return "cdata" */ - __Pyx_TraceLine(119,0,__PYX_ERR(20, 119, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_c_node->atype; __pyx_v_type = __pyx_t_2; @@ -210114,7 +195285,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct * return "cdata" * elif type == tree.XML_ATTRIBUTE_ID: */ - __Pyx_TraceLine(120,0,__PYX_ERR(20, 120, __pyx_L1_error)) switch (__pyx_v_type) { case XML_ATTRIBUTE_CDATA: @@ -210125,7 +195295,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct * elif type == tree.XML_ATTRIBUTE_ID: * return "id" */ - __Pyx_TraceLine(121,0,__PYX_ERR(20, 121, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_cdata); __pyx_r = __pyx_n_s_cdata; @@ -210139,15 +195308,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct * elif type == tree.XML_ATTRIBUTE_ID: */ break; - - /* "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: - */ - __Pyx_TraceLine(122,0,__PYX_ERR(20, 122, __pyx_L1_error)) case XML_ATTRIBUTE_ID: /* "src/lxml/dtd.pxi":123 @@ -210157,7 +195317,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct * elif type == tree.XML_ATTRIBUTE_IDREF: * return "idref" */ - __Pyx_TraceLine(123,0,__PYX_ERR(20, 123, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_id); __pyx_r = __pyx_n_s_id; @@ -210171,15 +195330,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct * elif type == tree.XML_ATTRIBUTE_IDREF: */ break; - - /* "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: - */ - __Pyx_TraceLine(124,0,__PYX_ERR(20, 124, __pyx_L1_error)) case XML_ATTRIBUTE_IDREF: /* "src/lxml/dtd.pxi":125 @@ -210189,7 +195339,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct * elif type == tree.XML_ATTRIBUTE_IDREFS: * return "idrefs" */ - __Pyx_TraceLine(125,0,__PYX_ERR(20, 125, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_idref); __pyx_r = __pyx_n_s_idref; @@ -210203,15 +195352,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct * elif type == tree.XML_ATTRIBUTE_IDREFS: */ break; - - /* "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: - */ - __Pyx_TraceLine(126,0,__PYX_ERR(20, 126, __pyx_L1_error)) case XML_ATTRIBUTE_IDREFS: /* "src/lxml/dtd.pxi":127 @@ -210221,7 +195361,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct * elif type == tree.XML_ATTRIBUTE_ENTITY: * return "entity" */ - __Pyx_TraceLine(127,0,__PYX_ERR(20, 127, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_idrefs); __pyx_r = __pyx_n_s_idrefs; @@ -210235,15 +195374,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct * elif type == tree.XML_ATTRIBUTE_ENTITY: */ break; - - /* "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: - */ - __Pyx_TraceLine(128,0,__PYX_ERR(20, 128, __pyx_L1_error)) case XML_ATTRIBUTE_ENTITY: /* "src/lxml/dtd.pxi":129 @@ -210253,7 +195383,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct * elif type == tree.XML_ATTRIBUTE_ENTITIES: * return "entities" */ - __Pyx_TraceLine(129,0,__PYX_ERR(20, 129, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_entity); __pyx_r = __pyx_n_s_entity; @@ -210267,15 +195396,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct * elif type == tree.XML_ATTRIBUTE_ENTITIES: */ break; - - /* "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: - */ - __Pyx_TraceLine(130,0,__PYX_ERR(20, 130, __pyx_L1_error)) case XML_ATTRIBUTE_ENTITIES: /* "src/lxml/dtd.pxi":131 @@ -210285,7 +195405,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct * elif type == tree.XML_ATTRIBUTE_NMTOKEN: * return "nmtoken" */ - __Pyx_TraceLine(131,0,__PYX_ERR(20, 131, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_entities); __pyx_r = __pyx_n_s_entities; @@ -210299,15 +195418,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct * elif type == tree.XML_ATTRIBUTE_NMTOKEN: */ break; - - /* "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: - */ - __Pyx_TraceLine(132,0,__PYX_ERR(20, 132, __pyx_L1_error)) case XML_ATTRIBUTE_NMTOKEN: /* "src/lxml/dtd.pxi":133 @@ -210317,7 +195427,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct * elif type == tree.XML_ATTRIBUTE_NMTOKENS: * return "nmtokens" */ - __Pyx_TraceLine(133,0,__PYX_ERR(20, 133, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_nmtoken); __pyx_r = __pyx_n_s_nmtoken; @@ -210331,15 +195440,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct * elif type == tree.XML_ATTRIBUTE_NMTOKENS: */ break; - - /* "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: - */ - __Pyx_TraceLine(134,0,__PYX_ERR(20, 134, __pyx_L1_error)) case XML_ATTRIBUTE_NMTOKENS: /* "src/lxml/dtd.pxi":135 @@ -210349,7 +195449,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct * elif type == tree.XML_ATTRIBUTE_ENUMERATION: * return "enumeration" */ - __Pyx_TraceLine(135,0,__PYX_ERR(20, 135, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_nmtokens); __pyx_r = __pyx_n_s_nmtokens; @@ -210363,15 +195462,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct * elif type == tree.XML_ATTRIBUTE_ENUMERATION: */ break; - - /* "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: - */ - __Pyx_TraceLine(136,0,__PYX_ERR(20, 136, __pyx_L1_error)) case XML_ATTRIBUTE_ENUMERATION: /* "src/lxml/dtd.pxi":137 @@ -210381,7 +195471,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct * elif type == tree.XML_ATTRIBUTE_NOTATION: * return "notation" */ - __Pyx_TraceLine(137,0,__PYX_ERR(20, 137, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_enumeration); __pyx_r = __pyx_n_s_enumeration; @@ -210395,15 +195484,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct * elif type == tree.XML_ATTRIBUTE_NOTATION: */ break; - - /* "src/lxml/dtd.pxi":138 - * elif type == tree.XML_ATTRIBUTE_ENUMERATION: - * return "enumeration" - * elif type == tree.XML_ATTRIBUTE_NOTATION: # <<<<<<<<<<<<<< - * return "notation" - * else: - */ - __Pyx_TraceLine(138,0,__PYX_ERR(20, 138, __pyx_L1_error)) case XML_ATTRIBUTE_NOTATION: /* "src/lxml/dtd.pxi":139 @@ -210413,7 +195493,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct * else: * return None */ - __Pyx_TraceLine(139,0,__PYX_ERR(20, 139, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_notation); __pyx_r = __pyx_n_s_notation; @@ -210436,7 +195515,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct * * property default: */ - __Pyx_TraceLine(141,0,__PYX_ERR(20, 141, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -210457,7 +195535,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -210486,12 +195563,10 @@ static PyObject *__pyx_pw_4lxml_5etree_17_DTDAttributeDecl_7default_1__get__(PyO static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_7default___get__(struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *__pyx_v_self) { int __pyx_v_default; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlAttributeDefault __pyx_t_2; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[20], 144, 0, __PYX_ERR(20, 144, __pyx_L1_error)); /* "src/lxml/dtd.pxi":145 * property default: @@ -210500,7 +195575,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_7default___get__(stru * cdef int default = self._c_node.def_ * if default == tree.XML_ATTRIBUTE_NONE: */ - __Pyx_TraceLine(145,0,__PYX_ERR(20, 145, __pyx_L1_error)) __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 @@ -210510,7 +195584,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_7default___get__(stru * if default == tree.XML_ATTRIBUTE_NONE: * return "none" */ - __Pyx_TraceLine(146,0,__PYX_ERR(20, 146, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_c_node->def; __pyx_v_default = __pyx_t_2; @@ -210521,7 +195594,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_7default___get__(stru * return "none" * elif default == tree.XML_ATTRIBUTE_REQUIRED: */ - __Pyx_TraceLine(147,0,__PYX_ERR(20, 147, __pyx_L1_error)) switch (__pyx_v_default) { case XML_ATTRIBUTE_NONE: @@ -210532,7 +195604,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_7default___get__(stru * elif default == tree.XML_ATTRIBUTE_REQUIRED: * return "required" */ - __Pyx_TraceLine(148,0,__PYX_ERR(20, 148, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_none); __pyx_r = __pyx_n_s_none; @@ -210546,15 +195617,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_7default___get__(stru * elif default == tree.XML_ATTRIBUTE_REQUIRED: */ break; - - /* "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: - */ - __Pyx_TraceLine(149,0,__PYX_ERR(20, 149, __pyx_L1_error)) case XML_ATTRIBUTE_REQUIRED: /* "src/lxml/dtd.pxi":150 @@ -210564,7 +195626,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_7default___get__(stru * elif default == tree.XML_ATTRIBUTE_IMPLIED: * return "implied" */ - __Pyx_TraceLine(150,0,__PYX_ERR(20, 150, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_required); __pyx_r = __pyx_n_s_required; @@ -210578,15 +195639,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_7default___get__(stru * elif default == tree.XML_ATTRIBUTE_IMPLIED: */ break; - - /* "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: - */ - __Pyx_TraceLine(151,0,__PYX_ERR(20, 151, __pyx_L1_error)) case XML_ATTRIBUTE_IMPLIED: /* "src/lxml/dtd.pxi":152 @@ -210596,7 +195648,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_7default___get__(stru * elif default == tree.XML_ATTRIBUTE_FIXED: * return "fixed" */ - __Pyx_TraceLine(152,0,__PYX_ERR(20, 152, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_implied); __pyx_r = __pyx_n_s_implied; @@ -210610,15 +195661,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_7default___get__(stru * elif default == tree.XML_ATTRIBUTE_FIXED: */ break; - - /* "src/lxml/dtd.pxi":153 - * elif default == tree.XML_ATTRIBUTE_IMPLIED: - * return "implied" - * elif default == tree.XML_ATTRIBUTE_FIXED: # <<<<<<<<<<<<<< - * return "fixed" - * else: - */ - __Pyx_TraceLine(153,0,__PYX_ERR(20, 153, __pyx_L1_error)) case XML_ATTRIBUTE_FIXED: /* "src/lxml/dtd.pxi":154 @@ -210628,7 +195670,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_7default___get__(stru * else: * return None */ - __Pyx_TraceLine(154,0,__PYX_ERR(20, 154, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_fixed); __pyx_r = __pyx_n_s_fixed; @@ -210651,7 +195692,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_7default___get__(stru * * property default_value: */ - __Pyx_TraceLine(156,0,__PYX_ERR(20, 156, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -210672,7 +195712,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_7default___get__(stru __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -210700,13 +195739,11 @@ static PyObject *__pyx_pw_4lxml_5etree_17_DTDAttributeDecl_13default_value_1__ge static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_13default_value___get__(struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[20], 159, 0, __PYX_ERR(20, 159, __pyx_L1_error)); /* "src/lxml/dtd.pxi":160 * property default_value: @@ -210715,7 +195752,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_13default_value___get * return funicode(self._c_node.defaultValue) if self._c_node.defaultValue is not NULL else None * */ - __Pyx_TraceLine(160,0,__PYX_ERR(20, 160, __pyx_L1_error)) __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 @@ -210725,7 +195761,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_13default_value___get * * def itervalues(self): */ - __Pyx_TraceLine(161,0,__PYX_ERR(20, 161, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); if (((__pyx_v_self->_c_node->defaultValue != NULL) != 0)) { __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->_c_node->defaultValue); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 161, __pyx_L1_error) @@ -210756,7 +195791,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_13default_value___get __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -210801,7 +195835,7 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_2itervalues(struct __ __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_17_DTDAttributeDecl_4generator11, __pyx_codeobj__374, (PyObject *) __pyx_cur_scope, __pyx_n_s_itervalues, __pyx_n_s_DTDAttributeDecl_itervalues, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(20, 163, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_17_DTDAttributeDecl_4generator11, __pyx_codeobj__82, (PyObject *) __pyx_cur_scope, __pyx_n_s_itervalues, __pyx_n_s_DTDAttributeDecl_itervalues, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(20, 163, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -210821,20 +195855,16 @@ static PyObject *__pyx_gb_4lxml_5etree_17_DTDAttributeDecl_4generator11(__pyx_Co { struct __pyx_obj_4lxml_5etree___pyx_scope_struct_11_itervalues *__pyx_cur_scope = ((struct __pyx_obj_4lxml_5etree___pyx_scope_struct_11_itervalues *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations int __pyx_t_1; xmlEnumeration *__pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("itervalues", 0); - __Pyx_TraceFrameInit(__pyx_codeobj__374) - __Pyx_TraceCall("itervalues", __pyx_f[20], 163, 0, __PYX_ERR(20, 163, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L6_resume_from_yield; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } @@ -210848,7 +195878,6 @@ static PyObject *__pyx_gb_4lxml_5etree_17_DTDAttributeDecl_4generator11(__pyx_Co * cdef tree.xmlEnumeration *c_node = self._c_node.tree * while c_node is not NULL: */ - __Pyx_TraceLine(164,0,__PYX_ERR(20, 164, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidDTDNode(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_self->_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(20, 164, __pyx_L1_error) /* "src/lxml/dtd.pxi":165 @@ -210858,7 +195887,6 @@ static PyObject *__pyx_gb_4lxml_5etree_17_DTDAttributeDecl_4generator11(__pyx_Co * while c_node is not NULL: * yield funicode(c_node.name) */ - __Pyx_TraceLine(165,0,__PYX_ERR(20, 165, __pyx_L1_error)) __pyx_t_2 = __pyx_cur_scope->__pyx_v_self->_c_node->tree; __pyx_cur_scope->__pyx_v_c_node = __pyx_t_2; @@ -210869,7 +195897,6 @@ static PyObject *__pyx_gb_4lxml_5etree_17_DTDAttributeDecl_4generator11(__pyx_Co * yield funicode(c_node.name) * c_node = c_node.next */ - __Pyx_TraceLine(166,0,__PYX_ERR(20, 166, __pyx_L1_error)) while (1) { __pyx_t_3 = ((__pyx_cur_scope->__pyx_v_c_node != NULL) != 0); if (!__pyx_t_3) break; @@ -210881,13 +195908,11 @@ static PyObject *__pyx_gb_4lxml_5etree_17_DTDAttributeDecl_4generator11(__pyx_Co * c_node = c_node.next * */ - __Pyx_TraceLine(167,0,__PYX_ERR(20, 167, __pyx_L1_error)) __pyx_t_4 = __pyx_f_4lxml_5etree_funicode(__pyx_cur_scope->__pyx_v_c_node->name); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ @@ -210903,7 +195928,6 @@ static PyObject *__pyx_gb_4lxml_5etree_17_DTDAttributeDecl_4generator11(__pyx_Co * * def values(self): */ - __Pyx_TraceLine(168,0,__PYX_ERR(20, 168, __pyx_L1_error)) __pyx_t_2 = __pyx_cur_scope->__pyx_v_c_node->next; __pyx_cur_scope->__pyx_v_c_node = __pyx_t_2; } @@ -210925,10 +195949,11 @@ static PyObject *__pyx_gb_4lxml_5etree_17_DTDAttributeDecl_4generator11(__pyx_Co __Pyx_AddTraceback("itervalues", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -210957,14 +195982,11 @@ static PyObject *__pyx_pw_4lxml_5etree_17_DTDAttributeDecl_6values(PyObject *__p static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_5values(struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__375) __Pyx_RefNannySetupContext("values", 0); - __Pyx_TraceCall("values", __pyx_f[20], 170, 0, __PYX_ERR(20, 170, __pyx_L1_error)); /* "src/lxml/dtd.pxi":171 * @@ -210973,7 +195995,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_5values(struct __pyx_ * * */ - __Pyx_TraceLine(171,0,__PYX_ERR(20, 171, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_itervalues); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -210987,12 +196008,9 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_5values(struct __pyx_ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 171, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 171, __pyx_L1_error) - } + __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(20, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 171, __pyx_L1_error) @@ -211019,7 +196037,6 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_5values(struct __pyx_ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -211047,7 +196064,6 @@ static PyObject *__pyx_pw_4lxml_5etree_15_DTDElementDecl_1__repr__(PyObject *__p static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl___repr__(struct __pyx_obj_4lxml_5etree__DTDElementDecl *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -211057,7 +196073,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl___repr__(struct __pyx_o PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[20], 181, 0, __PYX_ERR(20, 181, __pyx_L1_error)); /* "src/lxml/dtd.pxi":182 * @@ -211066,7 +196081,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl___repr__(struct __pyx_o * * property name: */ - __Pyx_TraceLine(182,0,__PYX_ERR(20, 182, __pyx_L1_error)) __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) __Pyx_GOTREF(__pyx_t_1); @@ -211134,7 +196148,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl___repr__(struct __pyx_o __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -211162,13 +196175,11 @@ static PyObject *__pyx_pw_4lxml_5etree_15_DTDElementDecl_4name_1__get__(PyObject static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4name___get__(struct __pyx_obj_4lxml_5etree__DTDElementDecl *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[20], 185, 0, __PYX_ERR(20, 185, __pyx_L1_error)); /* "src/lxml/dtd.pxi":186 * property name: @@ -211177,7 +196188,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4name___get__(struct __ * return funicode(self._c_node.name) if self._c_node.name is not NULL else None * */ - __Pyx_TraceLine(186,0,__PYX_ERR(20, 186, __pyx_L1_error)) __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 @@ -211187,7 +196197,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4name___get__(struct __ * * property prefix: */ - __Pyx_TraceLine(187,0,__PYX_ERR(20, 187, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); if (((__pyx_v_self->_c_node->name != NULL) != 0)) { __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->_c_node->name); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 187, __pyx_L1_error) @@ -211218,7 +196227,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4name___get__(struct __ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -211246,13 +196254,11 @@ static PyObject *__pyx_pw_4lxml_5etree_15_DTDElementDecl_6prefix_1__get__(PyObje static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_6prefix___get__(struct __pyx_obj_4lxml_5etree__DTDElementDecl *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[20], 190, 0, __PYX_ERR(20, 190, __pyx_L1_error)); /* "src/lxml/dtd.pxi":191 * property prefix: @@ -211261,7 +196267,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_6prefix___get__(struct * return funicode(self._c_node.prefix) if self._c_node.prefix is not NULL else None * */ - __Pyx_TraceLine(191,0,__PYX_ERR(20, 191, __pyx_L1_error)) __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 @@ -211271,7 +196276,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_6prefix___get__(struct * * property type: */ - __Pyx_TraceLine(192,0,__PYX_ERR(20, 192, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); if (((__pyx_v_self->_c_node->prefix != NULL) != 0)) { __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->_c_node->prefix); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 192, __pyx_L1_error) @@ -211302,7 +196306,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_6prefix___get__(struct __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -211331,12 +196334,10 @@ static PyObject *__pyx_pw_4lxml_5etree_15_DTDElementDecl_4type_1__get__(PyObject static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4type___get__(struct __pyx_obj_4lxml_5etree__DTDElementDecl *__pyx_v_self) { int __pyx_v_type; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlElementTypeVal __pyx_t_2; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[20], 195, 0, __PYX_ERR(20, 195, __pyx_L1_error)); /* "src/lxml/dtd.pxi":196 * property type: @@ -211345,7 +196346,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4type___get__(struct __ * cdef int type = self._c_node.etype * if type == tree.XML_ELEMENT_TYPE_UNDEFINED: */ - __Pyx_TraceLine(196,0,__PYX_ERR(20, 196, __pyx_L1_error)) __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 @@ -211355,7 +196355,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4type___get__(struct __ * if type == tree.XML_ELEMENT_TYPE_UNDEFINED: * return "undefined" */ - __Pyx_TraceLine(197,0,__PYX_ERR(20, 197, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_c_node->etype; __pyx_v_type = __pyx_t_2; @@ -211366,7 +196365,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4type___get__(struct __ * return "undefined" * elif type == tree.XML_ELEMENT_TYPE_EMPTY: */ - __Pyx_TraceLine(198,0,__PYX_ERR(20, 198, __pyx_L1_error)) switch (__pyx_v_type) { case XML_ELEMENT_TYPE_UNDEFINED: @@ -211377,7 +196375,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4type___get__(struct __ * elif type == tree.XML_ELEMENT_TYPE_EMPTY: * return "empty" */ - __Pyx_TraceLine(199,0,__PYX_ERR(20, 199, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_undefined); __pyx_r = __pyx_n_s_undefined; @@ -211391,15 +196388,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4type___get__(struct __ * elif type == tree.XML_ELEMENT_TYPE_EMPTY: */ break; - - /* "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: - */ - __Pyx_TraceLine(200,0,__PYX_ERR(20, 200, __pyx_L1_error)) case XML_ELEMENT_TYPE_EMPTY: /* "src/lxml/dtd.pxi":201 @@ -211409,7 +196397,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4type___get__(struct __ * elif type == tree.XML_ELEMENT_TYPE_ANY: * return "any" */ - __Pyx_TraceLine(201,0,__PYX_ERR(20, 201, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_empty); __pyx_r = __pyx_n_s_empty; @@ -211423,15 +196410,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4type___get__(struct __ * elif type == tree.XML_ELEMENT_TYPE_ANY: */ break; - - /* "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: - */ - __Pyx_TraceLine(202,0,__PYX_ERR(20, 202, __pyx_L1_error)) case XML_ELEMENT_TYPE_ANY: /* "src/lxml/dtd.pxi":203 @@ -211441,7 +196419,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4type___get__(struct __ * elif type == tree.XML_ELEMENT_TYPE_MIXED: * return "mixed" */ - __Pyx_TraceLine(203,0,__PYX_ERR(20, 203, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_any); __pyx_r = __pyx_n_s_any; @@ -211455,15 +196432,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4type___get__(struct __ * elif type == tree.XML_ELEMENT_TYPE_MIXED: */ break; - - /* "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: - */ - __Pyx_TraceLine(204,0,__PYX_ERR(20, 204, __pyx_L1_error)) case XML_ELEMENT_TYPE_MIXED: /* "src/lxml/dtd.pxi":205 @@ -211473,7 +196441,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4type___get__(struct __ * elif type == tree.XML_ELEMENT_TYPE_ELEMENT: * return "element" */ - __Pyx_TraceLine(205,0,__PYX_ERR(20, 205, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_mixed); __pyx_r = __pyx_n_s_mixed; @@ -211487,15 +196454,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4type___get__(struct __ * elif type == tree.XML_ELEMENT_TYPE_ELEMENT: */ break; - - /* "src/lxml/dtd.pxi":206 - * elif type == tree.XML_ELEMENT_TYPE_MIXED: - * return "mixed" - * elif type == tree.XML_ELEMENT_TYPE_ELEMENT: # <<<<<<<<<<<<<< - * return "element" - * else: - */ - __Pyx_TraceLine(206,0,__PYX_ERR(20, 206, __pyx_L1_error)) case XML_ELEMENT_TYPE_ELEMENT: /* "src/lxml/dtd.pxi":207 @@ -211505,7 +196463,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4type___get__(struct __ * else: * return None */ - __Pyx_TraceLine(207,0,__PYX_ERR(20, 207, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_element); __pyx_r = __pyx_n_s_element; @@ -211528,7 +196485,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4type___get__(struct __ * * property content: */ - __Pyx_TraceLine(209,0,__PYX_ERR(20, 209, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -211549,7 +196505,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4type___get__(struct __ __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -211579,7 +196534,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_7content___get__(struct xmlElementContent *__pyx_v_content; struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *__pyx_v_node = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlElementContent *__pyx_t_2; @@ -211587,7 +196541,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_7content___get__(struct PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[20], 212, 0, __PYX_ERR(20, 212, __pyx_L1_error)); /* "src/lxml/dtd.pxi":213 * property content: @@ -211596,7 +196549,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_7content___get__(struct * cdef tree.xmlElementContent *content = self._c_node.content * if content: */ - __Pyx_TraceLine(213,0,__PYX_ERR(20, 213, __pyx_L1_error)) __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 @@ -211606,7 +196558,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_7content___get__(struct * if content: * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) */ - __Pyx_TraceLine(214,0,__PYX_ERR(20, 214, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_c_node->content; __pyx_v_content = __pyx_t_2; @@ -211617,7 +196568,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_7content___get__(struct * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) * node._dtd = self._dtd */ - __Pyx_TraceLine(215,0,__PYX_ERR(20, 215, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_content != 0); if (__pyx_t_3) { @@ -211628,7 +196578,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_7content___get__(struct * node._dtd = self._dtd * node._c_node = content */ - __Pyx_TraceLine(216,0,__PYX_ERR(20, 216, __pyx_L1_error)) __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)); __pyx_t_5 = ((PyObject *)__pyx_t_4); @@ -211644,7 +196593,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_7content___get__(struct * node._c_node = content * return node */ - __Pyx_TraceLine(217,0,__PYX_ERR(20, 217, __pyx_L1_error)) __pyx_t_5 = ((PyObject *)__pyx_v_self->_dtd); __Pyx_INCREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); @@ -211660,7 +196608,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_7content___get__(struct * return node * else: */ - __Pyx_TraceLine(218,0,__PYX_ERR(20, 218, __pyx_L1_error)) __pyx_v_node->_c_node = __pyx_v_content; /* "src/lxml/dtd.pxi":219 @@ -211670,7 +196617,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_7content___get__(struct * else: * return None */ - __Pyx_TraceLine(219,0,__PYX_ERR(20, 219, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_node)); __pyx_r = ((PyObject *)__pyx_v_node); @@ -211692,7 +196638,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_7content___get__(struct * * def iterattributes(self): */ - __Pyx_TraceLine(221,0,__PYX_ERR(20, 221, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -211716,7 +196661,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_7content___get__(struct __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_node); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -211761,7 +196705,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_2iterattributes(struct __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_15_DTDElementDecl_4generator12, __pyx_codeobj__376, (PyObject *) __pyx_cur_scope, __pyx_n_s_iterattributes, __pyx_n_s_DTDElementDecl_iterattributes, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(20, 223, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_15_DTDElementDecl_4generator12, __pyx_codeobj__83, (PyObject *) __pyx_cur_scope, __pyx_n_s_iterattributes, __pyx_n_s_DTDElementDecl_iterattributes, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(20, 223, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -211781,7 +196725,6 @@ static PyObject *__pyx_gb_4lxml_5etree_15_DTDElementDecl_4generator12(__pyx_Coro { struct __pyx_obj_4lxml_5etree___pyx_scope_struct_12_iterattributes *__pyx_cur_scope = ((struct __pyx_obj_4lxml_5etree___pyx_scope_struct_12_iterattributes *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations int __pyx_t_1; xmlAttribute *__pyx_t_2; int __pyx_t_3; @@ -211789,13 +196732,10 @@ static PyObject *__pyx_gb_4lxml_5etree_15_DTDElementDecl_4generator12(__pyx_Coro PyObject *__pyx_t_5 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("iterattributes", 0); - __Pyx_TraceFrameInit(__pyx_codeobj__376) - __Pyx_TraceCall("iterattributes", __pyx_f[20], 223, 0, __PYX_ERR(20, 223, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L6_resume_from_yield; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } @@ -211809,7 +196749,6 @@ static PyObject *__pyx_gb_4lxml_5etree_15_DTDElementDecl_4generator12(__pyx_Coro * cdef tree.xmlAttribute *c_node = self._c_node.attributes * while c_node: */ - __Pyx_TraceLine(224,0,__PYX_ERR(20, 224, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidDTDNode(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_self->_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(20, 224, __pyx_L1_error) /* "src/lxml/dtd.pxi":225 @@ -211819,7 +196758,6 @@ static PyObject *__pyx_gb_4lxml_5etree_15_DTDElementDecl_4generator12(__pyx_Coro * while c_node: * node = <_DTDAttributeDecl>_DTDAttributeDecl.__new__(_DTDAttributeDecl) */ - __Pyx_TraceLine(225,0,__PYX_ERR(20, 225, __pyx_L1_error)) __pyx_t_2 = __pyx_cur_scope->__pyx_v_self->_c_node->attributes; __pyx_cur_scope->__pyx_v_c_node = __pyx_t_2; @@ -211830,7 +196768,6 @@ static PyObject *__pyx_gb_4lxml_5etree_15_DTDElementDecl_4generator12(__pyx_Coro * node = <_DTDAttributeDecl>_DTDAttributeDecl.__new__(_DTDAttributeDecl) * node._dtd = self._dtd */ - __Pyx_TraceLine(226,0,__PYX_ERR(20, 226, __pyx_L1_error)) while (1) { __pyx_t_3 = (__pyx_cur_scope->__pyx_v_c_node != 0); if (!__pyx_t_3) break; @@ -211842,7 +196779,6 @@ static PyObject *__pyx_gb_4lxml_5etree_15_DTDElementDecl_4generator12(__pyx_Coro * node._dtd = self._dtd * node._c_node = c_node */ - __Pyx_TraceLine(227,0,__PYX_ERR(20, 227, __pyx_L1_error)) __pyx_t_4 = ((PyObject *)__pyx_tp_new_4lxml_5etree__DTDAttributeDecl(((PyTypeObject *)__pyx_ptype_4lxml_5etree__DTDAttributeDecl), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 227, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_5 = ((PyObject *)__pyx_t_4); @@ -211860,7 +196796,6 @@ static PyObject *__pyx_gb_4lxml_5etree_15_DTDElementDecl_4generator12(__pyx_Coro * node._c_node = c_node * yield node */ - __Pyx_TraceLine(228,0,__PYX_ERR(20, 228, __pyx_L1_error)) __pyx_t_5 = ((PyObject *)__pyx_cur_scope->__pyx_v_self->_dtd); __Pyx_INCREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); @@ -211876,7 +196811,6 @@ static PyObject *__pyx_gb_4lxml_5etree_15_DTDElementDecl_4generator12(__pyx_Coro * yield node * c_node = c_node.nexth */ - __Pyx_TraceLine(229,0,__PYX_ERR(20, 229, __pyx_L1_error)) __pyx_cur_scope->__pyx_v_node->_c_node = __pyx_cur_scope->__pyx_v_c_node; /* "src/lxml/dtd.pxi":230 @@ -211886,11 +196820,9 @@ static PyObject *__pyx_gb_4lxml_5etree_15_DTDElementDecl_4generator12(__pyx_Coro * c_node = c_node.nexth * */ - __Pyx_TraceLine(230,0,__PYX_ERR(20, 230, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_node)); __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_node); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ @@ -211906,7 +196838,6 @@ static PyObject *__pyx_gb_4lxml_5etree_15_DTDElementDecl_4generator12(__pyx_Coro * * def attributes(self): */ - __Pyx_TraceLine(231,0,__PYX_ERR(20, 231, __pyx_L1_error)) __pyx_t_2 = __pyx_cur_scope->__pyx_v_c_node->nexth; __pyx_cur_scope->__pyx_v_c_node = __pyx_t_2; } @@ -211929,10 +196860,11 @@ static PyObject *__pyx_gb_4lxml_5etree_15_DTDElementDecl_4generator12(__pyx_Coro __Pyx_AddTraceback("iterattributes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -211961,14 +196893,11 @@ static PyObject *__pyx_pw_4lxml_5etree_15_DTDElementDecl_6attributes(PyObject *_ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_5attributes(struct __pyx_obj_4lxml_5etree__DTDElementDecl *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__377) __Pyx_RefNannySetupContext("attributes", 0); - __Pyx_TraceCall("attributes", __pyx_f[20], 233, 0, __PYX_ERR(20, 233, __pyx_L1_error)); /* "src/lxml/dtd.pxi":234 * @@ -211977,7 +196906,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_5attributes(struct __py * * */ - __Pyx_TraceLine(234,0,__PYX_ERR(20, 234, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_iterattributes); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -211991,12 +196919,9 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_5attributes(struct __py __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 234, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 234, __pyx_L1_error) - } + __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(20, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 234, __pyx_L1_error) @@ -212023,7 +196948,6 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_5attributes(struct __py __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -212051,7 +196975,6 @@ static PyObject *__pyx_pw_4lxml_5etree_14_DTDEntityDecl_1__repr__(PyObject *__py static PyObject *__pyx_pf_4lxml_5etree_14_DTDEntityDecl___repr__(struct __pyx_obj_4lxml_5etree__DTDEntityDecl *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -212059,7 +196982,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_DTDEntityDecl___repr__(struct __pyx_ob PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[20], 243, 0, __PYX_ERR(20, 243, __pyx_L1_error)); /* "src/lxml/dtd.pxi":244 * cdef tree.xmlEntity* _c_node @@ -212068,7 +196990,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_DTDEntityDecl___repr__(struct __pyx_ob * * property name: */ - __Pyx_TraceLine(244,0,__PYX_ERR(20, 244, __pyx_L1_error)) __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) __Pyx_GOTREF(__pyx_t_1); @@ -212124,7 +197045,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_DTDEntityDecl___repr__(struct __pyx_ob __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -212152,13 +197072,11 @@ static PyObject *__pyx_pw_4lxml_5etree_14_DTDEntityDecl_4name_1__get__(PyObject static PyObject *__pyx_pf_4lxml_5etree_14_DTDEntityDecl_4name___get__(struct __pyx_obj_4lxml_5etree__DTDEntityDecl *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[20], 247, 0, __PYX_ERR(20, 247, __pyx_L1_error)); /* "src/lxml/dtd.pxi":248 * property name: @@ -212167,7 +197085,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_DTDEntityDecl_4name___get__(struct __p * return funicode(self._c_node.name) if self._c_node.name is not NULL else None * */ - __Pyx_TraceLine(248,0,__PYX_ERR(20, 248, __pyx_L1_error)) __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 @@ -212177,7 +197094,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_DTDEntityDecl_4name___get__(struct __p * * property orig: */ - __Pyx_TraceLine(249,0,__PYX_ERR(20, 249, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); if (((__pyx_v_self->_c_node->name != NULL) != 0)) { __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->_c_node->name); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 249, __pyx_L1_error) @@ -212208,7 +197124,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_DTDEntityDecl_4name___get__(struct __p __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -212236,13 +197151,11 @@ static PyObject *__pyx_pw_4lxml_5etree_14_DTDEntityDecl_4orig_1__get__(PyObject static PyObject *__pyx_pf_4lxml_5etree_14_DTDEntityDecl_4orig___get__(struct __pyx_obj_4lxml_5etree__DTDEntityDecl *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[20], 252, 0, __PYX_ERR(20, 252, __pyx_L1_error)); /* "src/lxml/dtd.pxi":253 * property orig: @@ -212251,7 +197164,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_DTDEntityDecl_4orig___get__(struct __p * return funicode(self._c_node.orig) if self._c_node.orig is not NULL else None * */ - __Pyx_TraceLine(253,0,__PYX_ERR(20, 253, __pyx_L1_error)) __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 @@ -212261,7 +197173,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_DTDEntityDecl_4orig___get__(struct __p * * property content: */ - __Pyx_TraceLine(254,0,__PYX_ERR(20, 254, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); if (((__pyx_v_self->_c_node->orig != NULL) != 0)) { __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->_c_node->orig); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 254, __pyx_L1_error) @@ -212292,7 +197203,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_DTDEntityDecl_4orig___get__(struct __p __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -212320,13 +197230,11 @@ static PyObject *__pyx_pw_4lxml_5etree_14_DTDEntityDecl_7content_1__get__(PyObje static PyObject *__pyx_pf_4lxml_5etree_14_DTDEntityDecl_7content___get__(struct __pyx_obj_4lxml_5etree__DTDEntityDecl *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[20], 257, 0, __PYX_ERR(20, 257, __pyx_L1_error)); /* "src/lxml/dtd.pxi":258 * property content: @@ -212335,7 +197243,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_DTDEntityDecl_7content___get__(struct * return funicode(self._c_node.content) if self._c_node.content is not NULL else None * */ - __Pyx_TraceLine(258,0,__PYX_ERR(20, 258, __pyx_L1_error)) __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 @@ -212345,7 +197252,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_DTDEntityDecl_7content___get__(struct * * */ - __Pyx_TraceLine(259,0,__PYX_ERR(20, 259, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); if (((__pyx_v_self->_c_node->content != NULL) != 0)) { __pyx_t_3 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->_c_node->content); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 259, __pyx_L1_error) @@ -212376,7 +197282,6 @@ static PyObject *__pyx_pf_4lxml_5etree_14_DTDEntityDecl_7content___get__(struct __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -212455,24 +197360,22 @@ static int __pyx_pw_4lxml_5etree_3DTD_1__init__(PyObject *__pyx_v_self, PyObject static int __pyx_pf_4lxml_5etree_3DTD___init__(struct __pyx_obj_4lxml_5etree_DTD *__pyx_v_self, PyObject *__pyx_v_file, PyObject *__pyx_v_external_id) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; + int __pyx_t_4; int __pyx_t_5; - int __pyx_t_6; - PyObject *__pyx_t_7 = NULL; - int __pyx_t_8; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - PyObject *__pyx_t_12 = NULL; - xmlDtd *__pyx_t_13; - const xmlChar *__pyx_t_14; + xmlDtd *__pyx_t_11; + const xmlChar *__pyx_t_12; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[20], 274, 0, __PYX_ERR(20, 274, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_file); /* "src/lxml/dtd.pxi":275 @@ -212482,7 +197385,6 @@ static int __pyx_pf_4lxml_5etree_3DTD___init__(struct __pyx_obj_4lxml_5etree_DTD * if file is not None: * if _isString(file): */ - __Pyx_TraceLine(275,0,__PYX_ERR(20, 275, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree__Validator), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; @@ -212495,38 +197397,10 @@ static int __pyx_pf_4lxml_5etree_3DTD___init__(struct __pyx_obj_4lxml_5etree_DTD __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 275, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 275, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 275, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 275, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_self)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject *)__pyx_v_self)); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 275, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __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(20, 275, __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; @@ -212537,10 +197411,9 @@ static int __pyx_pf_4lxml_5etree_3DTD___init__(struct __pyx_obj_4lxml_5etree_DTD * if _isString(file): * file = _encodeFilename(file) */ - __Pyx_TraceLine(276,0,__PYX_ERR(20, 276, __pyx_L1_error)) - __pyx_t_5 = (__pyx_v_file != Py_None); - __pyx_t_6 = (__pyx_t_5 != 0); - if (__pyx_t_6) { + __pyx_t_4 = (__pyx_v_file != Py_None); + __pyx_t_5 = (__pyx_t_4 != 0); + if (__pyx_t_5) { /* "src/lxml/dtd.pxi":277 * _Validator.__init__(self) @@ -212549,9 +197422,8 @@ static int __pyx_pf_4lxml_5etree_3DTD___init__(struct __pyx_obj_4lxml_5etree_DTD * file = _encodeFilename(file) * with self._error_log: */ - __Pyx_TraceLine(277,0,__PYX_ERR(20, 277, __pyx_L1_error)) - __pyx_t_6 = (_isString(__pyx_v_file) != 0); - if (__pyx_t_6) { + __pyx_t_5 = (_isString(__pyx_v_file) != 0); + if (__pyx_t_5) { /* "src/lxml/dtd.pxi":278 * if file is not None: @@ -212560,7 +197432,6 @@ static int __pyx_pf_4lxml_5etree_3DTD___init__(struct __pyx_obj_4lxml_5etree_DTD * with self._error_log: * self._c_dtd = xmlparser.xmlParseDTD(NULL, _xcstr(file)) */ - __Pyx_TraceLine(278,0,__PYX_ERR(20, 278, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_file, __pyx_t_1); @@ -212573,19 +197444,13 @@ static int __pyx_pf_4lxml_5etree_3DTD___init__(struct __pyx_obj_4lxml_5etree_DTD * self._c_dtd = xmlparser.xmlParseDTD(NULL, _xcstr(file)) * elif hasattr(file, 'read'): */ - __Pyx_TraceLine(279,0,__PYX_ERR(20, 279, __pyx_L1_error)) /*with:*/ { - __pyx_t_7 = __Pyx_PyObject_LookupSpecial(((PyObject *)__pyx_v_self->__pyx_base._error_log), __pyx_n_s_exit); if (unlikely(!__pyx_t_7)) __PYX_ERR(20, 279, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __pyx_f_4lxml_5etree_9_ErrorLog___enter__(__pyx_v_self->__pyx_base._error_log); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(20, 279, __pyx_L5_error) + __pyx_t_6 = __Pyx_PyObject_LookupSpecial(((PyObject *)__pyx_v_self->__pyx_base._error_log), __pyx_n_s_exit); if (unlikely(!__pyx_t_6)) __PYX_ERR(20, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __pyx_f_4lxml_5etree_9_ErrorLog___enter__(__pyx_v_self->__pyx_base._error_log); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(20, 279, __pyx_L5_error) /*try:*/ { { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_9); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_11); + (void)__pyx_t_8; (void)__pyx_t_9; (void)__pyx_t_10; /* mark used */ /*try:*/ { /* "src/lxml/dtd.pxi":280 @@ -212595,7 +197460,6 @@ static int __pyx_pf_4lxml_5etree_3DTD___init__(struct __pyx_obj_4lxml_5etree_DTD * elif hasattr(file, 'read'): * self._c_dtd = _parseDtdFromFilelike(file) */ - __Pyx_TraceLine(280,0,__PYX_ERR(20, 280, __pyx_L9_error)) __pyx_v_self->_c_dtd = xmlParseDTD(NULL, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_file)); /* "src/lxml/dtd.pxi":279 @@ -212606,77 +197470,26 @@ static int __pyx_pf_4lxml_5etree_3DTD___init__(struct __pyx_obj_4lxml_5etree_DTD * elif hasattr(file, 'read'): */ } - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - goto __pyx_L14_try_end; - __pyx_L9_error:; - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /*except:*/ { - __Pyx_AddTraceback("lxml.etree.DTD.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_4) < 0) __PYX_ERR(20, 279, __pyx_L11_except_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_t_2); - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 279, __pyx_L11_except_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_3, NULL); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(20, 279, __pyx_L11_except_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_12); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (__pyx_t_6 < 0) __PYX_ERR(20, 279, __pyx_L11_except_error) - __pyx_t_5 = ((!(__pyx_t_6 != 0)) != 0); - if (__pyx_t_5) { - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_2); - __Pyx_XGIVEREF(__pyx_t_4); - __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_2, __pyx_t_4); - __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_4 = 0; - __PYX_ERR(20, 279, __pyx_L11_except_error) - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - goto __pyx_L10_exception_handled; - } - __pyx_L11_except_error:; - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); - goto __pyx_L1_error; - __pyx_L10_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); - __pyx_L14_try_end:; } } /*finally:*/ { /*normal exit:*/{ - if (__pyx_t_7) { - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__378, NULL); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(20, 279, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (__pyx_t_6) { + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__56, NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(20, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } goto __pyx_L8; } __pyx_L8:; } - goto __pyx_L18; + goto __pyx_L15; __pyx_L5_error:; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L1_error; - __pyx_L18:; + __pyx_L15:; } /* "src/lxml/dtd.pxi":277 @@ -212696,10 +197509,9 @@ static int __pyx_pf_4lxml_5etree_3DTD___init__(struct __pyx_obj_4lxml_5etree_DTD * self._c_dtd = _parseDtdFromFilelike(file) * else: */ - __Pyx_TraceLine(281,0,__PYX_ERR(20, 281, __pyx_L1_error)) __pyx_t_5 = __Pyx_HasAttr(__pyx_v_file, __pyx_n_s_read); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(20, 281, __pyx_L1_error) - __pyx_t_6 = (__pyx_t_5 != 0); - if (likely(__pyx_t_6)) { + __pyx_t_4 = (__pyx_t_5 != 0); + if (likely(__pyx_t_4)) { /* "src/lxml/dtd.pxi":282 * self._c_dtd = xmlparser.xmlParseDTD(NULL, _xcstr(file)) @@ -212708,9 +197520,8 @@ static int __pyx_pf_4lxml_5etree_3DTD___init__(struct __pyx_obj_4lxml_5etree_DTD * else: * raise DTDParseError, u"file must be a filename or file-like object" */ - __Pyx_TraceLine(282,0,__PYX_ERR(20, 282, __pyx_L1_error)) - __pyx_t_13 = __pyx_f_4lxml_5etree__parseDtdFromFilelike(__pyx_v_file); if (unlikely(__pyx_t_13 == ((xmlDtd *)NULL))) __PYX_ERR(20, 282, __pyx_L1_error) - __pyx_v_self->_c_dtd = __pyx_t_13; + __pyx_t_11 = __pyx_f_4lxml_5etree__parseDtdFromFilelike(__pyx_v_file); if (unlikely(__pyx_t_11 == ((xmlDtd *)NULL))) __PYX_ERR(20, 282, __pyx_L1_error) + __pyx_v_self->_c_dtd = __pyx_t_11; /* "src/lxml/dtd.pxi":281 * with self._error_log: @@ -212729,7 +197540,6 @@ static int __pyx_pf_4lxml_5etree_3DTD___init__(struct __pyx_obj_4lxml_5etree_DTD * elif external_id is not None: * with self._error_log: */ - __Pyx_TraceLine(284,0,__PYX_ERR(20, 284, __pyx_L1_error)) /*else*/ { __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_DTDParseError), __pyx_kp_u_file_must_be_a_filename_or_file, 0, 0); __PYX_ERR(20, 284, __pyx_L1_error) @@ -212753,9 +197563,8 @@ static int __pyx_pf_4lxml_5etree_3DTD___init__(struct __pyx_obj_4lxml_5etree_DTD * with self._error_log: * self._c_dtd = xmlparser.xmlParseDTD(external_id, NULL) */ - __Pyx_TraceLine(285,0,__PYX_ERR(20, 285, __pyx_L1_error)) - __pyx_t_6 = (__pyx_v_external_id != Py_None); - __pyx_t_5 = (__pyx_t_6 != 0); + __pyx_t_4 = (__pyx_v_external_id != Py_None); + __pyx_t_5 = (__pyx_t_4 != 0); if (likely(__pyx_t_5)) { /* "src/lxml/dtd.pxi":286 @@ -212765,19 +197574,18 @@ static int __pyx_pf_4lxml_5etree_3DTD___init__(struct __pyx_obj_4lxml_5etree_DTD * self._c_dtd = xmlparser.xmlParseDTD(external_id, NULL) * else: */ - __Pyx_TraceLine(286,0,__PYX_ERR(20, 286, __pyx_L1_error)) /*with:*/ { - __pyx_t_7 = __Pyx_PyObject_LookupSpecial(((PyObject *)__pyx_v_self->__pyx_base._error_log), __pyx_n_s_exit); if (unlikely(!__pyx_t_7)) __PYX_ERR(20, 286, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __pyx_f_4lxml_5etree_9_ErrorLog___enter__(__pyx_v_self->__pyx_base._error_log); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(20, 286, __pyx_L19_error) + __pyx_t_6 = __Pyx_PyObject_LookupSpecial(((PyObject *)__pyx_v_self->__pyx_base._error_log), __pyx_n_s_exit); if (unlikely(!__pyx_t_6)) __PYX_ERR(20, 286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __pyx_f_4lxml_5etree_9_ErrorLog___enter__(__pyx_v_self->__pyx_base._error_log); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(20, 286, __pyx_L16_error) /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); - __Pyx_XGOTREF(__pyx_t_11); + __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "src/lxml/dtd.pxi":287 @@ -212787,9 +197595,8 @@ static int __pyx_pf_4lxml_5etree_3DTD___init__(struct __pyx_obj_4lxml_5etree_DTD * else: * raise DTDParseError, u"either filename or external ID required" */ - __Pyx_TraceLine(287,0,__PYX_ERR(20, 287, __pyx_L23_error)) - __pyx_t_14 = __Pyx_PyObject_AsUString(__pyx_v_external_id); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) __PYX_ERR(20, 287, __pyx_L23_error) - __pyx_v_self->_c_dtd = xmlParseDTD(((const xmlChar *)__pyx_t_14), NULL); + __pyx_t_12 = __Pyx_PyObject_AsUString(__pyx_v_external_id); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(20, 287, __pyx_L20_error) + __pyx_v_self->_c_dtd = xmlParseDTD(((const xmlChar *)__pyx_t_12), NULL); /* "src/lxml/dtd.pxi":286 * raise DTDParseError, u"file must be a filename or file-like object" @@ -212799,77 +197606,76 @@ static int __pyx_pf_4lxml_5etree_3DTD___init__(struct __pyx_obj_4lxml_5etree_DTD * else: */ } - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - goto __pyx_L28_try_end; - __pyx_L23_error:; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L25_try_end; + __pyx_L20_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /*except:*/ { __Pyx_AddTraceback("lxml.etree.DTD.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(20, 286, __pyx_L25_except_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(20, 286, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_Pack(3, __pyx_t_4, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 286, __pyx_L25_except_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); - __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_3, NULL); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(20, 286, __pyx_L25_except_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_12); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (__pyx_t_5 < 0) __PYX_ERR(20, 286, __pyx_L25_except_error) - __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0); - if (__pyx_t_6) { - __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_13 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(20, 286, __pyx_L22_except_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_13, NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_14)) __PYX_ERR(20, 286, __pyx_L22_except_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_14); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (__pyx_t_5 < 0) __PYX_ERR(20, 286, __pyx_L22_except_error) + __pyx_t_4 = ((!(__pyx_t_5 != 0)) != 0); + if (__pyx_t_4) { + __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); - __Pyx_XGIVEREF(__pyx_t_1); - __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_2, __pyx_t_1); - __pyx_t_4 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; - __PYX_ERR(20, 286, __pyx_L25_except_error) + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; + __PYX_ERR(20, 286, __pyx_L22_except_error) } - __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; - goto __pyx_L24_exception_handled; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L21_exception_handled; } - __pyx_L25_except_error:; - __Pyx_XGIVEREF(__pyx_t_11); + __pyx_L22_except_error:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); goto __pyx_L1_error; - __pyx_L24_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_11); + __pyx_L21_exception_handled:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); - __pyx_L28_try_end:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); + __pyx_L25_try_end:; } } /*finally:*/ { /*normal exit:*/{ - if (__pyx_t_7) { - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__379, NULL); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(20, 286, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (__pyx_t_6) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__56, NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(20, 286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } - goto __pyx_L22; + goto __pyx_L19; } - __pyx_L22:; + __pyx_L19:; } - goto __pyx_L32; - __pyx_L19_error:; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L29; + __pyx_L16_error:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L1_error; - __pyx_L32:; + __pyx_L29:; } /* "src/lxml/dtd.pxi":285 @@ -212889,7 +197695,6 @@ static int __pyx_pf_4lxml_5etree_3DTD___init__(struct __pyx_obj_4lxml_5etree_DTD * * if self._c_dtd is NULL: */ - __Pyx_TraceLine(289,0,__PYX_ERR(20, 289, __pyx_L1_error)) /*else*/ { __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_DTDParseError), __pyx_kp_u_either_filename_or_external_ID_r, 0, 0); __PYX_ERR(20, 289, __pyx_L1_error) @@ -212903,9 +197708,8 @@ static int __pyx_pf_4lxml_5etree_3DTD___init__(struct __pyx_obj_4lxml_5etree_DTD * raise DTDParseError( * self._error_log._buildExceptionMessage(u"error parsing DTD"), */ - __Pyx_TraceLine(291,0,__PYX_ERR(20, 291, __pyx_L1_error)) - __pyx_t_6 = ((__pyx_v_self->_c_dtd == NULL) != 0); - if (unlikely(__pyx_t_6)) { + __pyx_t_4 = ((__pyx_v_self->_c_dtd == NULL) != 0); + if (unlikely(__pyx_t_4)) { /* "src/lxml/dtd.pxi":293 * if self._c_dtd is NULL: @@ -212914,9 +197718,8 @@ static int __pyx_pf_4lxml_5etree_3DTD___init__(struct __pyx_obj_4lxml_5etree_DTD * self._error_log) * */ - __Pyx_TraceLine(293,0,__PYX_ERR(20, 293, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_self->__pyx_base._error_log), __pyx_kp_u_error_parsing_DTD); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 293, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_self->__pyx_base._error_log), __pyx_kp_u_error_parsing_DTD); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 293, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); /* "src/lxml/dtd.pxi":292 * @@ -212925,20 +197728,19 @@ static int __pyx_pf_4lxml_5etree_3DTD___init__(struct __pyx_obj_4lxml_5etree_DTD * self._error_log._buildExceptionMessage(u"error parsing DTD"), * self._error_log) */ - __Pyx_TraceLine(292,0,__PYX_ERR(20, 292, __pyx_L1_error)) __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base._error_log)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base._error_log)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->__pyx_base._error_log)); - __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_DTDParseError), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 292, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_DTDParseError), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __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_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(20, 292, __pyx_L1_error) /* "src/lxml/dtd.pxi":291 @@ -212965,12 +197767,11 @@ static int __pyx_pf_4lxml_5etree_3DTD___init__(struct __pyx_obj_4lxml_5etree_DTD __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("lxml.etree.DTD.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_file); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -212998,12 +197799,10 @@ static PyObject *__pyx_pw_4lxml_5etree_3DTD_4name_1__get__(PyObject *__pyx_v_sel static PyObject *__pyx_pf_4lxml_5etree_3DTD_4name___get__(struct __pyx_obj_4lxml_5etree_DTD *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[20], 297, 0, __PYX_ERR(20, 297, __pyx_L1_error)); /* "src/lxml/dtd.pxi":298 * property name: @@ -213012,7 +197811,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_4name___get__(struct __pyx_obj_4lxml * return None * return funicodeOrNone(self._c_dtd.name) */ - __Pyx_TraceLine(298,0,__PYX_ERR(20, 298, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_c_dtd == NULL) != 0); if (__pyx_t_1) { @@ -213023,7 +197821,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_4name___get__(struct __pyx_obj_4lxml * return funicodeOrNone(self._c_dtd.name) * */ - __Pyx_TraceLine(299,0,__PYX_ERR(20, 299, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -213044,7 +197841,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_4name___get__(struct __pyx_obj_4lxml * * property external_id: */ - __Pyx_TraceLine(300,0,__PYX_ERR(20, 300, __pyx_L1_error)) __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) __Pyx_GOTREF(__pyx_t_2); @@ -213067,7 +197863,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_4name___get__(struct __pyx_obj_4lxml __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -213095,12 +197890,10 @@ static PyObject *__pyx_pw_4lxml_5etree_3DTD_11external_id_1__get__(PyObject *__p static PyObject *__pyx_pf_4lxml_5etree_3DTD_11external_id___get__(struct __pyx_obj_4lxml_5etree_DTD *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[20], 303, 0, __PYX_ERR(20, 303, __pyx_L1_error)); /* "src/lxml/dtd.pxi":304 * property external_id: @@ -213109,7 +197902,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_11external_id___get__(struct __pyx_o * return None * return funicodeOrNone(self._c_dtd.ExternalID) */ - __Pyx_TraceLine(304,0,__PYX_ERR(20, 304, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_c_dtd == NULL) != 0); if (__pyx_t_1) { @@ -213120,7 +197912,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_11external_id___get__(struct __pyx_o * return funicodeOrNone(self._c_dtd.ExternalID) * */ - __Pyx_TraceLine(305,0,__PYX_ERR(20, 305, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -213141,7 +197932,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_11external_id___get__(struct __pyx_o * * property system_url: */ - __Pyx_TraceLine(306,0,__PYX_ERR(20, 306, __pyx_L1_error)) __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) __Pyx_GOTREF(__pyx_t_2); @@ -213164,7 +197954,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_11external_id___get__(struct __pyx_o __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -213192,12 +197981,10 @@ static PyObject *__pyx_pw_4lxml_5etree_3DTD_10system_url_1__get__(PyObject *__py static PyObject *__pyx_pf_4lxml_5etree_3DTD_10system_url___get__(struct __pyx_obj_4lxml_5etree_DTD *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[20], 309, 0, __PYX_ERR(20, 309, __pyx_L1_error)); /* "src/lxml/dtd.pxi":310 * property system_url: @@ -213206,7 +197993,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_10system_url___get__(struct __pyx_ob * return None * return funicodeOrNone(self._c_dtd.SystemID) */ - __Pyx_TraceLine(310,0,__PYX_ERR(20, 310, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_c_dtd == NULL) != 0); if (__pyx_t_1) { @@ -213217,7 +198003,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_10system_url___get__(struct __pyx_ob * return funicodeOrNone(self._c_dtd.SystemID) * */ - __Pyx_TraceLine(311,0,__PYX_ERR(20, 311, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -213238,7 +198023,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_10system_url___get__(struct __pyx_ob * * def iterelements(self): */ - __Pyx_TraceLine(312,0,__PYX_ERR(20, 312, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_4lxml_5etree_funicodeOrNone(__pyx_v_self->_c_dtd->SystemID); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -213261,7 +198045,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_10system_url___get__(struct __pyx_ob __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -213306,7 +198089,7 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_2iterelements(struct __pyx_obj_4lxml __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_3DTD_4generator13, __pyx_codeobj__380, (PyObject *) __pyx_cur_scope, __pyx_n_s_iterelements, __pyx_n_s_DTD_iterelements, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(20, 314, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_3DTD_4generator13, __pyx_codeobj__84, (PyObject *) __pyx_cur_scope, __pyx_n_s_iterelements, __pyx_n_s_DTD_iterelements, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(20, 314, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -213326,19 +198109,15 @@ static PyObject *__pyx_gb_4lxml_5etree_3DTD_4generator13(__pyx_CoroutineObject * { struct __pyx_obj_4lxml_5etree___pyx_scope_struct_13_iterelements *__pyx_cur_scope = ((struct __pyx_obj_4lxml_5etree___pyx_scope_struct_13_iterelements *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations xmlNode *__pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("iterelements", 0); - __Pyx_TraceFrameInit(__pyx_codeobj__380) - __Pyx_TraceCall("iterelements", __pyx_f[20], 314, 0, __PYX_ERR(20, 314, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L7_resume_from_yield; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } @@ -213352,7 +198131,6 @@ static PyObject *__pyx_gb_4lxml_5etree_3DTD_4generator13(__pyx_CoroutineObject * * while c_node is not NULL: * if c_node.type == tree.XML_ELEMENT_DECL: */ - __Pyx_TraceLine(315,0,__PYX_ERR(20, 315, __pyx_L1_error)) if (((__pyx_cur_scope->__pyx_v_self->_c_dtd != NULL) != 0)) { __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->_c_dtd->children; } else { @@ -213367,7 +198145,6 @@ static PyObject *__pyx_gb_4lxml_5etree_3DTD_4generator13(__pyx_CoroutineObject * * if c_node.type == tree.XML_ELEMENT_DECL: * node = _DTDElementDecl() */ - __Pyx_TraceLine(316,0,__PYX_ERR(20, 316, __pyx_L1_error)) while (1) { __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_c_node != NULL) != 0); if (!__pyx_t_2) break; @@ -213379,7 +198156,6 @@ static PyObject *__pyx_gb_4lxml_5etree_3DTD_4generator13(__pyx_CoroutineObject * * node = _DTDElementDecl() * node._dtd = self */ - __Pyx_TraceLine(317,0,__PYX_ERR(20, 317, __pyx_L1_error)) __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_c_node->type == XML_ELEMENT_DECL) != 0); if (__pyx_t_2) { @@ -213390,7 +198166,6 @@ static PyObject *__pyx_gb_4lxml_5etree_3DTD_4generator13(__pyx_CoroutineObject * * node._dtd = self * node._c_node = c_node */ - __Pyx_TraceLine(318,0,__PYX_ERR(20, 318, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__DTDElementDecl)); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_node)); @@ -213405,7 +198180,6 @@ static PyObject *__pyx_gb_4lxml_5etree_3DTD_4generator13(__pyx_CoroutineObject * * node._c_node = c_node * yield node */ - __Pyx_TraceLine(319,0,__PYX_ERR(20, 319, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_node->_dtd); @@ -213419,7 +198193,6 @@ static PyObject *__pyx_gb_4lxml_5etree_3DTD_4generator13(__pyx_CoroutineObject * * yield node * c_node = c_node.next */ - __Pyx_TraceLine(320,0,__PYX_ERR(20, 320, __pyx_L1_error)) __pyx_cur_scope->__pyx_v_node->_c_node = ((xmlElement *)__pyx_cur_scope->__pyx_v_c_node); /* "src/lxml/dtd.pxi":321 @@ -213429,11 +198202,9 @@ static PyObject *__pyx_gb_4lxml_5etree_3DTD_4generator13(__pyx_CoroutineObject * * c_node = c_node.next * */ - __Pyx_TraceLine(321,0,__PYX_ERR(20, 321, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_node)); __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_node); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ @@ -213458,7 +198229,6 @@ static PyObject *__pyx_gb_4lxml_5etree_3DTD_4generator13(__pyx_CoroutineObject * * * def elements(self): */ - __Pyx_TraceLine(322,0,__PYX_ERR(20, 322, __pyx_L1_error)) __pyx_t_1 = __pyx_cur_scope->__pyx_v_c_node->next; __pyx_cur_scope->__pyx_v_c_node = __pyx_t_1; } @@ -213480,10 +198250,11 @@ static PyObject *__pyx_gb_4lxml_5etree_3DTD_4generator13(__pyx_CoroutineObject * __Pyx_AddTraceback("iterelements", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -213512,14 +198283,11 @@ static PyObject *__pyx_pw_4lxml_5etree_3DTD_6elements(PyObject *__pyx_v_self, CY static PyObject *__pyx_pf_4lxml_5etree_3DTD_5elements(struct __pyx_obj_4lxml_5etree_DTD *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__381) __Pyx_RefNannySetupContext("elements", 0); - __Pyx_TraceCall("elements", __pyx_f[20], 324, 0, __PYX_ERR(20, 324, __pyx_L1_error)); /* "src/lxml/dtd.pxi":325 * @@ -213528,7 +198296,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_5elements(struct __pyx_obj_4lxml_5et * * def iterentities(self): */ - __Pyx_TraceLine(325,0,__PYX_ERR(20, 325, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_iterelements); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -213542,12 +198309,9 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_5elements(struct __pyx_obj_4lxml_5et __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 325, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 325, __pyx_L1_error) - } + __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(20, 325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 325, __pyx_L1_error) @@ -213574,7 +198338,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_5elements(struct __pyx_obj_4lxml_5et __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -213619,7 +198382,7 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_7iterentities(struct __pyx_obj_4lxml __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_3DTD_9generator14, __pyx_codeobj__382, (PyObject *) __pyx_cur_scope, __pyx_n_s_iterentities, __pyx_n_s_DTD_iterentities, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(20, 327, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4lxml_5etree_3DTD_9generator14, __pyx_codeobj__85, (PyObject *) __pyx_cur_scope, __pyx_n_s_iterentities, __pyx_n_s_DTD_iterentities, __pyx_n_s_lxml_etree); if (unlikely(!gen)) __PYX_ERR(20, 327, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -213639,19 +198402,15 @@ static PyObject *__pyx_gb_4lxml_5etree_3DTD_9generator14(__pyx_CoroutineObject * { struct __pyx_obj_4lxml_5etree___pyx_scope_struct_14_iterentities *__pyx_cur_scope = ((struct __pyx_obj_4lxml_5etree___pyx_scope_struct_14_iterentities *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations xmlNode *__pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("iterentities", 0); - __Pyx_TraceFrameInit(__pyx_codeobj__382) - __Pyx_TraceCall("iterentities", __pyx_f[20], 327, 0, __PYX_ERR(20, 327, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L7_resume_from_yield; default: /* CPython raises the right error here */ - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return NULL; } @@ -213665,7 +198424,6 @@ static PyObject *__pyx_gb_4lxml_5etree_3DTD_9generator14(__pyx_CoroutineObject * * while c_node is not NULL: * if c_node.type == tree.XML_ENTITY_DECL: */ - __Pyx_TraceLine(328,0,__PYX_ERR(20, 328, __pyx_L1_error)) if (((__pyx_cur_scope->__pyx_v_self->_c_dtd != NULL) != 0)) { __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->_c_dtd->children; } else { @@ -213680,7 +198438,6 @@ static PyObject *__pyx_gb_4lxml_5etree_3DTD_9generator14(__pyx_CoroutineObject * * if c_node.type == tree.XML_ENTITY_DECL: * node = _DTDEntityDecl() */ - __Pyx_TraceLine(329,0,__PYX_ERR(20, 329, __pyx_L1_error)) while (1) { __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_c_node != NULL) != 0); if (!__pyx_t_2) break; @@ -213692,7 +198449,6 @@ static PyObject *__pyx_gb_4lxml_5etree_3DTD_9generator14(__pyx_CoroutineObject * * node = _DTDEntityDecl() * node._dtd = self */ - __Pyx_TraceLine(330,0,__PYX_ERR(20, 330, __pyx_L1_error)) __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_c_node->type == XML_ENTITY_DECL) != 0); if (__pyx_t_2) { @@ -213703,7 +198459,6 @@ static PyObject *__pyx_gb_4lxml_5etree_3DTD_9generator14(__pyx_CoroutineObject * * node._dtd = self * node._c_node = c_node */ - __Pyx_TraceLine(331,0,__PYX_ERR(20, 331, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__DTDEntityDecl)); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_node)); @@ -213718,7 +198473,6 @@ static PyObject *__pyx_gb_4lxml_5etree_3DTD_9generator14(__pyx_CoroutineObject * * node._c_node = c_node * yield node */ - __Pyx_TraceLine(332,0,__PYX_ERR(20, 332, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_node->_dtd); @@ -213732,7 +198486,6 @@ static PyObject *__pyx_gb_4lxml_5etree_3DTD_9generator14(__pyx_CoroutineObject * * yield node * c_node = c_node.next */ - __Pyx_TraceLine(333,0,__PYX_ERR(20, 333, __pyx_L1_error)) __pyx_cur_scope->__pyx_v_node->_c_node = ((xmlEntity *)__pyx_cur_scope->__pyx_v_c_node); /* "src/lxml/dtd.pxi":334 @@ -213742,11 +198495,9 @@ static PyObject *__pyx_gb_4lxml_5etree_3DTD_9generator14(__pyx_CoroutineObject * * c_node = c_node.next * */ - __Pyx_TraceLine(334,0,__PYX_ERR(20, 334, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_node)); __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_node); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ @@ -213771,7 +198522,6 @@ static PyObject *__pyx_gb_4lxml_5etree_3DTD_9generator14(__pyx_CoroutineObject * * * def entities(self): */ - __Pyx_TraceLine(335,0,__PYX_ERR(20, 335, __pyx_L1_error)) __pyx_t_1 = __pyx_cur_scope->__pyx_v_c_node->next; __pyx_cur_scope->__pyx_v_c_node = __pyx_t_1; } @@ -213793,10 +198543,11 @@ static PyObject *__pyx_gb_4lxml_5etree_3DTD_9generator14(__pyx_CoroutineObject * __Pyx_AddTraceback("iterentities", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -213825,14 +198576,11 @@ static PyObject *__pyx_pw_4lxml_5etree_3DTD_11entities(PyObject *__pyx_v_self, C static PyObject *__pyx_pf_4lxml_5etree_3DTD_10entities(struct __pyx_obj_4lxml_5etree_DTD *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__383) __Pyx_RefNannySetupContext("entities", 0); - __Pyx_TraceCall("entities", __pyx_f[20], 337, 0, __PYX_ERR(20, 337, __pyx_L1_error)); /* "src/lxml/dtd.pxi":338 * @@ -213841,7 +198589,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_10entities(struct __pyx_obj_4lxml_5e * * def __dealloc__(self): */ - __Pyx_TraceLine(338,0,__PYX_ERR(20, 338, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_iterentities); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -213855,12 +198602,9 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_10entities(struct __pyx_obj_4lxml_5e __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 338, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 338, __pyx_L1_error) - } + __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(20, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 338, __pyx_L1_error) @@ -213887,7 +198631,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_10entities(struct __pyx_obj_4lxml_5e __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -213912,10 +198655,8 @@ static void __pyx_pw_4lxml_5etree_3DTD_13__dealloc__(PyObject *__pyx_v_self) { } static void __pyx_pf_4lxml_5etree_3DTD_12__dealloc__(struct __pyx_obj_4lxml_5etree_DTD *__pyx_v_self) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - __Pyx_TraceCall("__dealloc__", __pyx_f[20], 340, 0, __PYX_ERR(20, 340, __pyx_L1_error)); /* "src/lxml/dtd.pxi":341 * @@ -213924,7 +198665,6 @@ static void __pyx_pf_4lxml_5etree_3DTD_12__dealloc__(struct __pyx_obj_4lxml_5etr * * def __call__(self, etree): */ - __Pyx_TraceLine(341,0,__PYX_ERR(20, 341, __pyx_L1_error)) xmlFreeDtd(__pyx_v_self->_c_dtd); /* "src/lxml/dtd.pxi":340 @@ -213936,11 +198676,6 @@ static void __pyx_pf_4lxml_5etree_3DTD_12__dealloc__(struct __pyx_obj_4lxml_5etr */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.DTD.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -214013,7 +198748,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_14__call__(struct __pyx_obj_4lxml_5e xmlValidCtxt *__pyx_v_valid_ctxt; int __pyx_v_ret; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -214032,7 +198766,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_14__call__(struct __pyx_obj_4lxml_5e char const *__pyx_t_15; PyObject *__pyx_t_16 = NULL; __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[20], 343, 0, __PYX_ERR(20, 343, __pyx_L1_error)); /* "src/lxml/dtd.pxi":354 * cdef xmlDoc* c_doc @@ -214041,7 +198774,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_14__call__(struct __pyx_obj_4lxml_5e * * assert self._c_dtd is not NULL, "DTD not initialised" */ - __Pyx_TraceLine(354,0,__PYX_ERR(20, 354, __pyx_L1_error)) __pyx_v_ret = -1; /* "src/lxml/dtd.pxi":356 @@ -214051,7 +198783,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_14__call__(struct __pyx_obj_4lxml_5e * doc = _documentOrRaise(etree) * root_node = _rootNodeOrRaise(etree) */ - __Pyx_TraceLine(356,0,__PYX_ERR(20, 356, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_self->_c_dtd != NULL) != 0))) { @@ -214068,7 +198799,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_14__call__(struct __pyx_obj_4lxml_5e * root_node = _rootNodeOrRaise(etree) * */ - __Pyx_TraceLine(357,0,__PYX_ERR(20, 357, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__documentOrRaise(__pyx_v_etree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_1); @@ -214081,7 +198811,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_14__call__(struct __pyx_obj_4lxml_5e * * valid_ctxt = dtdvalid.xmlNewValidCtxt() */ - __Pyx_TraceLine(358,0,__PYX_ERR(20, 358, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__rootNodeOrRaise(__pyx_v_etree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_root_node = ((struct LxmlElement *)__pyx_t_1); @@ -214094,7 +198823,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_14__call__(struct __pyx_obj_4lxml_5e * if valid_ctxt is NULL: * raise DTDError(u"Failed to create validation context") */ - __Pyx_TraceLine(360,0,__PYX_ERR(20, 360, __pyx_L1_error)) __pyx_v_valid_ctxt = xmlNewValidCtxt(); /* "src/lxml/dtd.pxi":361 @@ -214104,7 +198832,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_14__call__(struct __pyx_obj_4lxml_5e * raise DTDError(u"Failed to create validation context") * */ - __Pyx_TraceLine(361,0,__PYX_ERR(20, 361, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_valid_ctxt == NULL) != 0); if (unlikely(__pyx_t_2)) { @@ -214115,8 +198842,7 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_14__call__(struct __pyx_obj_4lxml_5e * * # work around error reporting bug in libxml2 <= 2.9.1 (and later?) */ - __Pyx_TraceLine(362,0,__PYX_ERR(20, 362, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_DTDError), __pyx_tuple__384, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 362, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_DTDError), __pyx_tuple__86, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -214138,7 +198864,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_14__call__(struct __pyx_obj_4lxml_5e * valid_ctxt.userData = NULL * */ - __Pyx_TraceLine(366,0,__PYX_ERR(20, 366, __pyx_L1_error)) __pyx_v_valid_ctxt->error = ((xmlValidityErrorFunc)__pyx_f_4lxml_5etree__nullGenericErrorFunc); /* "src/lxml/dtd.pxi":367 @@ -214148,7 +198873,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_14__call__(struct __pyx_obj_4lxml_5e * * try: */ - __Pyx_TraceLine(367,0,__PYX_ERR(20, 367, __pyx_L1_error)) __pyx_v_valid_ctxt->userData = NULL; /* "src/lxml/dtd.pxi":369 @@ -214158,7 +198882,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_14__call__(struct __pyx_obj_4lxml_5e * with self._error_log: * c_doc = _fakeRootDoc(doc._c_doc, root_node._c_node) */ - __Pyx_TraceLine(369,0,__PYX_ERR(20, 369, __pyx_L5_error)) /*try:*/ { /* "src/lxml/dtd.pxi":370 @@ -214168,7 +198891,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_14__call__(struct __pyx_obj_4lxml_5e * c_doc = _fakeRootDoc(doc._c_doc, root_node._c_node) * ret = dtdvalid.xmlValidateDtd(valid_ctxt, c_doc, self._c_dtd) */ - __Pyx_TraceLine(370,0,__PYX_ERR(20, 370, __pyx_L5_error)) /*with:*/ { __pyx_t_3 = __Pyx_PyObject_LookupSpecial(((PyObject *)__pyx_v_self->__pyx_base._error_log), __pyx_n_s_exit); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 370, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); @@ -214190,7 +198912,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_14__call__(struct __pyx_obj_4lxml_5e * ret = dtdvalid.xmlValidateDtd(valid_ctxt, c_doc, self._c_dtd) * _destroyFakeDoc(doc._c_doc, c_doc) */ - __Pyx_TraceLine(371,0,__PYX_ERR(20, 371, __pyx_L11_error)) __pyx_t_8 = __pyx_f_4lxml_5etree__fakeRootDoc(__pyx_v_doc->_c_doc, __pyx_v_root_node->_c_node); if (unlikely(__pyx_t_8 == ((xmlDoc *)NULL))) __PYX_ERR(20, 371, __pyx_L11_error) __pyx_v_c_doc = __pyx_t_8; @@ -214201,7 +198922,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_14__call__(struct __pyx_obj_4lxml_5e * _destroyFakeDoc(doc._c_doc, c_doc) * finally: */ - __Pyx_TraceLine(372,0,__PYX_ERR(20, 372, __pyx_L11_error)) __pyx_v_ret = xmlValidateDtd(__pyx_v_valid_ctxt, __pyx_v_c_doc, __pyx_v_self->_c_dtd); /* "src/lxml/dtd.pxi":373 @@ -214211,7 +198931,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_14__call__(struct __pyx_obj_4lxml_5e * finally: * dtdvalid.xmlFreeValidCtxt(valid_ctxt) */ - __Pyx_TraceLine(373,0,__PYX_ERR(20, 373, __pyx_L11_error)) __pyx_f_4lxml_5etree__destroyFakeDoc(__pyx_v_doc->_c_doc, __pyx_v_c_doc); /* "src/lxml/dtd.pxi":370 @@ -214253,9 +198972,9 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_14__call__(struct __pyx_obj_4lxml_5e __pyx_t_1 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __PYX_ERR(20, 370, __pyx_L13_except_error) } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L12_exception_handled; } __pyx_L13_except_error:; @@ -214275,7 +198994,7 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_14__call__(struct __pyx_obj_4lxml_5e /*finally:*/ { /*normal exit:*/{ if (__pyx_t_3) { - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__385, NULL); + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__56, NULL); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(20, 370, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_7); @@ -214300,7 +199019,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_14__call__(struct __pyx_obj_4lxml_5e * * if ret == -1: */ - __Pyx_TraceLine(375,0,__PYX_ERR(20, 375, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ xmlFreeValidCtxt(__pyx_v_valid_ctxt); @@ -214351,7 +199069,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_14__call__(struct __pyx_obj_4lxml_5e * raise DTDValidateError(u"Internal error in DTD validation", * self._error_log) */ - __Pyx_TraceLine(377,0,__PYX_ERR(20, 377, __pyx_L1_error)) __pyx_t_13 = ((__pyx_v_ret == -1L) != 0); if (unlikely(__pyx_t_13)) { @@ -214362,7 +199079,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_14__call__(struct __pyx_obj_4lxml_5e * self._error_log) * return ret == 1 */ - __Pyx_TraceLine(378,0,__PYX_ERR(20, 378, __pyx_L1_error)) __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(20, 378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_kp_u_Internal_error_in_DTD_validation); @@ -214394,7 +199110,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_14__call__(struct __pyx_obj_4lxml_5e * * */ - __Pyx_TraceLine(380,0,__PYX_ERR(20, 380, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyBool_FromLong((__pyx_v_ret == 1)); if (unlikely(!__pyx_t_9)) __PYX_ERR(20, 380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); @@ -214422,7 +199137,6 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_14__call__(struct __pyx_obj_4lxml_5e __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XDECREF((PyObject *)__pyx_v_root_node); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -214441,7 +199155,6 @@ static xmlDtd *__pyx_f_4lxml_5etree__parseDtdFromFilelike(PyObject *__pyx_v_file struct __pyx_obj_4lxml_5etree__ErrorLog *__pyx_v_error_log = 0; xmlDtd *__pyx_v_c_dtd; xmlDtd *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -214450,13 +199163,8 @@ static xmlDtd *__pyx_f_4lxml_5etree__parseDtdFromFilelike(PyObject *__pyx_v_file PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; - int __pyx_t_11; - int __pyx_t_12; + int __pyx_t_8; __Pyx_RefNannySetupContext("_parseDtdFromFilelike", 0); - __Pyx_TraceCall("_parseDtdFromFilelike", __pyx_f[20], 383, 0, __PYX_ERR(20, 383, __pyx_L1_error)); /* "src/lxml/dtd.pxi":387 * cdef _FileReaderContext dtd_parser @@ -214465,7 +199173,6 @@ static xmlDtd *__pyx_f_4lxml_5etree__parseDtdFromFilelike(PyObject *__pyx_v_file * exc_context = _ExceptionContext() * dtd_parser = _FileReaderContext(file, exc_context, None) */ - __Pyx_TraceLine(387,0,__PYX_ERR(20, 387, __pyx_L1_error)) __pyx_v_c_dtd = NULL; /* "src/lxml/dtd.pxi":388 @@ -214475,7 +199182,6 @@ static xmlDtd *__pyx_f_4lxml_5etree__parseDtdFromFilelike(PyObject *__pyx_v_file * dtd_parser = _FileReaderContext(file, exc_context, None) * error_log = _ErrorLog() */ - __Pyx_TraceLine(388,0,__PYX_ERR(20, 388, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__ExceptionContext)); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_exc_context = ((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_t_1); @@ -214488,7 +199194,6 @@ static xmlDtd *__pyx_f_4lxml_5etree__parseDtdFromFilelike(PyObject *__pyx_v_file * error_log = _ErrorLog() * */ - __Pyx_TraceLine(389,0,__PYX_ERR(20, 389, __pyx_L1_error)) __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_file); @@ -214513,7 +199218,6 @@ static xmlDtd *__pyx_f_4lxml_5etree__parseDtdFromFilelike(PyObject *__pyx_v_file * * with error_log: */ - __Pyx_TraceLine(390,0,__PYX_ERR(20, 390, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__ErrorLog)); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_error_log = ((struct __pyx_obj_4lxml_5etree__ErrorLog *)__pyx_t_2); @@ -214526,19 +199230,13 @@ static xmlDtd *__pyx_f_4lxml_5etree__parseDtdFromFilelike(PyObject *__pyx_v_file * c_dtd = dtd_parser._readDtd() * */ - __Pyx_TraceLine(392,0,__PYX_ERR(20, 392, __pyx_L1_error)) /*with:*/ { __pyx_t_3 = __Pyx_PyObject_LookupSpecial(((PyObject *)__pyx_v_error_log), __pyx_n_s_exit); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_f_4lxml_5etree_9_ErrorLog___enter__(__pyx_v_error_log); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(20, 392, __pyx_L3_error) /*try:*/ { { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); - __Pyx_XGOTREF(__pyx_t_5); - __Pyx_XGOTREF(__pyx_t_6); - __Pyx_XGOTREF(__pyx_t_7); + (void)__pyx_t_5; (void)__pyx_t_6; (void)__pyx_t_7; /* mark used */ /*try:*/ { /* "src/lxml/dtd.pxi":393 @@ -214548,7 +199246,6 @@ static xmlDtd *__pyx_f_4lxml_5etree__parseDtdFromFilelike(PyObject *__pyx_v_file * * exc_context._raise_if_stored() */ - __Pyx_TraceLine(393,0,__PYX_ERR(20, 393, __pyx_L7_error)) __pyx_v_c_dtd = __pyx_f_4lxml_5etree_18_FileReaderContext__readDtd(__pyx_v_dtd_parser); /* "src/lxml/dtd.pxi":392 @@ -214559,61 +199256,12 @@ static xmlDtd *__pyx_f_4lxml_5etree__parseDtdFromFilelike(PyObject *__pyx_v_file * */ } - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - goto __pyx_L12_try_end; - __pyx_L7_error:; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - /*except:*/ { - __Pyx_AddTraceback("lxml.etree._parseDtdFromFilelike", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_8) < 0) __PYX_ERR(20, 392, __pyx_L9_except_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(20, 392, __pyx_L9_except_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_10)) __PYX_ERR(20, 392, __pyx_L9_except_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (__pyx_t_11 < 0) __PYX_ERR(20, 392, __pyx_L9_except_error) - __pyx_t_12 = ((!(__pyx_t_11 != 0)) != 0); - if (__pyx_t_12) { - __Pyx_GIVEREF(__pyx_t_2); - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_1, __pyx_t_8); - __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_8 = 0; - __PYX_ERR(20, 392, __pyx_L9_except_error) - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - goto __pyx_L8_exception_handled; - } - __pyx_L9_except_error:; - __Pyx_XGIVEREF(__pyx_t_5); - __Pyx_XGIVEREF(__pyx_t_6); - __Pyx_XGIVEREF(__pyx_t_7); - __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); - goto __pyx_L1_error; - __pyx_L8_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_5); - __Pyx_XGIVEREF(__pyx_t_6); - __Pyx_XGIVEREF(__pyx_t_7); - __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); - __pyx_L12_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_3) { - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__386, NULL); + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__56, NULL); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(20, 392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); @@ -214623,11 +199271,11 @@ static xmlDtd *__pyx_f_4lxml_5etree__parseDtdFromFilelike(PyObject *__pyx_v_file } __pyx_L6:; } - goto __pyx_L16; + goto __pyx_L13; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L1_error; - __pyx_L16:; + __pyx_L13:; } /* "src/lxml/dtd.pxi":395 @@ -214637,7 +199285,6 @@ static xmlDtd *__pyx_f_4lxml_5etree__parseDtdFromFilelike(PyObject *__pyx_v_file * if c_dtd is NULL: * raise DTDParseError(u"error parsing DTD", error_log) */ - __Pyx_TraceLine(395,0,__PYX_ERR(20, 395, __pyx_L1_error)) __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_exc_context->__pyx_vtab)->_raise_if_stored(__pyx_v_exc_context); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(20, 395, __pyx_L1_error) /* "src/lxml/dtd.pxi":396 @@ -214647,9 +199294,8 @@ static xmlDtd *__pyx_f_4lxml_5etree__parseDtdFromFilelike(PyObject *__pyx_v_file * raise DTDParseError(u"error parsing DTD", error_log) * return c_dtd */ - __Pyx_TraceLine(396,0,__PYX_ERR(20, 396, __pyx_L1_error)) - __pyx_t_12 = ((__pyx_v_c_dtd == NULL) != 0); - if (unlikely(__pyx_t_12)) { + __pyx_t_8 = ((__pyx_v_c_dtd == NULL) != 0); + if (unlikely(__pyx_t_8)) { /* "src/lxml/dtd.pxi":397 * exc_context._raise_if_stored() @@ -214658,18 +199304,17 @@ static xmlDtd *__pyx_f_4lxml_5etree__parseDtdFromFilelike(PyObject *__pyx_v_file * return c_dtd * */ - __Pyx_TraceLine(397,0,__PYX_ERR(20, 397, __pyx_L1_error)) - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(20, 397, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 397, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_kp_u_error_parsing_DTD); __Pyx_GIVEREF(__pyx_kp_u_error_parsing_DTD); - PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_error_parsing_DTD); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_error_parsing_DTD); __Pyx_INCREF(((PyObject *)__pyx_v_error_log)); __Pyx_GIVEREF(((PyObject *)__pyx_v_error_log)); - PyTuple_SET_ITEM(__pyx_t_8, 1, ((PyObject *)__pyx_v_error_log)); - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_DTDParseError), __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 397, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_error_log)); + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_DTDParseError), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 397, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __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(20, 397, __pyx_L1_error) @@ -214690,7 +199335,6 @@ static xmlDtd *__pyx_f_4lxml_5etree__parseDtdFromFilelike(PyObject *__pyx_v_file * * cdef DTD _dtdFactory(tree.xmlDtd* c_dtd): */ - __Pyx_TraceLine(398,0,__PYX_ERR(20, 398, __pyx_L1_error)) __pyx_r = __pyx_v_c_dtd; goto __pyx_L0; @@ -214706,15 +199350,12 @@ static xmlDtd *__pyx_f_4lxml_5etree__parseDtdFromFilelike(PyObject *__pyx_v_file __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("lxml.etree._parseDtdFromFilelike", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_exc_context); __Pyx_XDECREF((PyObject *)__pyx_v_dtd_parser); __Pyx_XDECREF((PyObject *)__pyx_v_error_log); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -214730,16 +199371,13 @@ static xmlDtd *__pyx_f_4lxml_5etree__parseDtdFromFilelike(PyObject *__pyx_v_file static struct __pyx_obj_4lxml_5etree_DTD *__pyx_f_4lxml_5etree__dtdFactory(xmlDtd *__pyx_v_c_dtd) { struct __pyx_obj_4lxml_5etree_DTD *__pyx_v_dtd = 0; struct __pyx_obj_4lxml_5etree_DTD *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; xmlDtd *__pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("_dtdFactory", 0); - __Pyx_TraceCall("_dtdFactory", __pyx_f[20], 400, 0, __PYX_ERR(20, 400, __pyx_L1_error)); /* "src/lxml/dtd.pxi":403 * # do not run through DTD.__init__()! @@ -214748,7 +199386,6 @@ static struct __pyx_obj_4lxml_5etree_DTD *__pyx_f_4lxml_5etree__dtdFactory(xmlDt * return None * dtd = DTD.__new__(DTD) */ - __Pyx_TraceLine(403,0,__PYX_ERR(20, 403, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_dtd == NULL) != 0); if (__pyx_t_1) { @@ -214759,7 +199396,6 @@ static struct __pyx_obj_4lxml_5etree_DTD *__pyx_f_4lxml_5etree__dtdFactory(xmlDt * dtd = DTD.__new__(DTD) * dtd._c_dtd = _copyDtd(c_dtd) */ - __Pyx_TraceLine(404,0,__PYX_ERR(20, 404, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_r = ((struct __pyx_obj_4lxml_5etree_DTD *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -214780,7 +199416,6 @@ static struct __pyx_obj_4lxml_5etree_DTD *__pyx_f_4lxml_5etree__dtdFactory(xmlDt * dtd._c_dtd = _copyDtd(c_dtd) * _Validator.__init__(dtd) */ - __Pyx_TraceLine(405,0,__PYX_ERR(20, 405, __pyx_L1_error)) __pyx_t_2 = ((PyObject *)__pyx_tp_new_4lxml_5etree_DTD(((PyTypeObject *)__pyx_ptype_4lxml_5etree_DTD), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 405, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_v_dtd = ((struct __pyx_obj_4lxml_5etree_DTD *)__pyx_t_2); @@ -214793,7 +199428,6 @@ static struct __pyx_obj_4lxml_5etree_DTD *__pyx_f_4lxml_5etree__dtdFactory(xmlDt * _Validator.__init__(dtd) * return dtd */ - __Pyx_TraceLine(406,0,__PYX_ERR(20, 406, __pyx_L1_error)) __pyx_t_3 = __pyx_f_4lxml_5etree__copyDtd(__pyx_v_c_dtd); if (unlikely(__pyx_t_3 == ((xmlDtd *)NULL))) __PYX_ERR(20, 406, __pyx_L1_error) __pyx_v_dtd->_c_dtd = __pyx_t_3; @@ -214804,7 +199438,6 @@ static struct __pyx_obj_4lxml_5etree_DTD *__pyx_f_4lxml_5etree__dtdFactory(xmlDt * return dtd * */ - __Pyx_TraceLine(407,0,__PYX_ERR(20, 407, __pyx_L1_error)) __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree__Validator), __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; @@ -214817,38 +199450,10 @@ static struct __pyx_obj_4lxml_5etree_DTD *__pyx_f_4lxml_5etree__dtdFactory(xmlDt __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_5) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_dtd)); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 407, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, ((PyObject *)__pyx_v_dtd)}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 407, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, ((PyObject *)__pyx_v_dtd)}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 407, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(20, 407, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_dtd)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_dtd)); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, ((PyObject *)__pyx_v_dtd)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 407, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, ((PyObject *)__pyx_v_dtd)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_dtd)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -214859,7 +199464,6 @@ static struct __pyx_obj_4lxml_5etree_DTD *__pyx_f_4lxml_5etree__dtdFactory(xmlDt * * */ - __Pyx_TraceLine(408,0,__PYX_ERR(20, 408, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_dtd)); __pyx_r = __pyx_v_dtd; @@ -214878,13 +199482,11 @@ static struct __pyx_obj_4lxml_5etree_DTD *__pyx_f_4lxml_5etree__dtdFactory(xmlDt __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("lxml.etree._dtdFactory", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_dtd); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -214901,12 +199503,10 @@ static xmlDtd *__pyx_f_4lxml_5etree__copyDtd(xmlDtd *__pyx_v_c_orig_dtd) { xmlDtd *__pyx_v_c_dtd; xmlNode *__pyx_v_c_node; xmlDtd *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlNode *__pyx_t_2; __Pyx_RefNannySetupContext("_copyDtd", 0); - __Pyx_TraceCall("_copyDtd", __pyx_f[20], 411, 0, __PYX_ERR(20, 411, __pyx_L1_error)); /* "src/lxml/dtd.pxi":416 * links when copying DTDs, so we have to rebuild them here. @@ -214915,7 +199515,6 @@ static xmlDtd *__pyx_f_4lxml_5etree__copyDtd(xmlDtd *__pyx_v_c_orig_dtd) { * if not c_dtd: * raise MemoryError */ - __Pyx_TraceLine(416,0,__PYX_ERR(20, 416, __pyx_L1_error)) __pyx_v_c_dtd = xmlCopyDtd(__pyx_v_c_orig_dtd); /* "src/lxml/dtd.pxi":417 @@ -214925,7 +199524,6 @@ static xmlDtd *__pyx_f_4lxml_5etree__copyDtd(xmlDtd *__pyx_v_c_orig_dtd) { * raise MemoryError * cdef tree.xmlNode* c_node = c_dtd.children */ - __Pyx_TraceLine(417,0,__PYX_ERR(20, 417, __pyx_L1_error)) __pyx_t_1 = ((!(__pyx_v_c_dtd != 0)) != 0); if (unlikely(__pyx_t_1)) { @@ -214936,7 +199534,6 @@ static xmlDtd *__pyx_f_4lxml_5etree__copyDtd(xmlDtd *__pyx_v_c_orig_dtd) { * cdef tree.xmlNode* c_node = c_dtd.children * while c_node: */ - __Pyx_TraceLine(418,0,__PYX_ERR(20, 418, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(20, 418, __pyx_L1_error) /* "src/lxml/dtd.pxi":417 @@ -214955,7 +199552,6 @@ static xmlDtd *__pyx_f_4lxml_5etree__copyDtd(xmlDtd *__pyx_v_c_orig_dtd) { * while c_node: * if c_node.type == tree.XML_ATTRIBUTE_DECL: */ - __Pyx_TraceLine(419,0,__PYX_ERR(20, 419, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_dtd->children; __pyx_v_c_node = __pyx_t_2; @@ -214966,7 +199562,6 @@ static xmlDtd *__pyx_f_4lxml_5etree__copyDtd(xmlDtd *__pyx_v_c_orig_dtd) { * if c_node.type == tree.XML_ATTRIBUTE_DECL: * _linkDtdAttribute(c_dtd, c_node) */ - __Pyx_TraceLine(420,0,__PYX_ERR(20, 420, __pyx_L1_error)) while (1) { __pyx_t_1 = (__pyx_v_c_node != 0); if (!__pyx_t_1) break; @@ -214978,7 +199573,6 @@ static xmlDtd *__pyx_f_4lxml_5etree__copyDtd(xmlDtd *__pyx_v_c_orig_dtd) { * _linkDtdAttribute(c_dtd, c_node) * c_node = c_node.next */ - __Pyx_TraceLine(421,0,__PYX_ERR(20, 421, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node->type == XML_ATTRIBUTE_DECL) != 0); if (__pyx_t_1) { @@ -214989,7 +199583,6 @@ static xmlDtd *__pyx_f_4lxml_5etree__copyDtd(xmlDtd *__pyx_v_c_orig_dtd) { * c_node = c_node.next * return c_dtd */ - __Pyx_TraceLine(422,0,__PYX_ERR(20, 422, __pyx_L1_error)) __pyx_f_4lxml_5etree__linkDtdAttribute(__pyx_v_c_dtd, ((xmlAttribute *)__pyx_v_c_node)); /* "src/lxml/dtd.pxi":421 @@ -215008,7 +199601,6 @@ static xmlDtd *__pyx_f_4lxml_5etree__copyDtd(xmlDtd *__pyx_v_c_orig_dtd) { * return c_dtd * */ - __Pyx_TraceLine(423,0,__PYX_ERR(20, 423, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_node->next; __pyx_v_c_node = __pyx_t_2; } @@ -215020,7 +199612,6 @@ static xmlDtd *__pyx_f_4lxml_5etree__copyDtd(xmlDtd *__pyx_v_c_orig_dtd) { * * */ - __Pyx_TraceLine(424,0,__PYX_ERR(20, 424, __pyx_L1_error)) __pyx_r = __pyx_v_c_dtd; goto __pyx_L0; @@ -215037,7 +199628,6 @@ static xmlDtd *__pyx_f_4lxml_5etree__copyDtd(xmlDtd *__pyx_v_c_orig_dtd) { __Pyx_AddTraceback("lxml.etree._copyDtd", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -215053,13 +199643,11 @@ static xmlDtd *__pyx_f_4lxml_5etree__copyDtd(xmlDtd *__pyx_v_c_orig_dtd) { static void __pyx_f_4lxml_5etree__linkDtdAttribute(xmlDtd *__pyx_v_c_dtd, xmlAttribute *__pyx_v_c_attr) { xmlElement *__pyx_v_c_elem; xmlAttribute *__pyx_v_c_pos; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; xmlAttribute *__pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("_linkDtdAttribute", 0); - __Pyx_TraceCall("_linkDtdAttribute", __pyx_f[20], 427, 0, __PYX_ERR(20, 427, __pyx_L1_error)); /* "src/lxml/dtd.pxi":432 * element declaration. @@ -215068,7 +199656,6 @@ static void __pyx_f_4lxml_5etree__linkDtdAttribute(xmlDtd *__pyx_v_c_dtd, xmlAtt * if not c_elem: * # no such element? something is wrong with the DTD ... */ - __Pyx_TraceLine(432,0,__PYX_ERR(20, 432, __pyx_L1_error)) __pyx_v_c_elem = xmlGetDtdElementDesc(__pyx_v_c_dtd, __pyx_v_c_attr->elem); /* "src/lxml/dtd.pxi":433 @@ -215078,7 +199665,6 @@ static void __pyx_f_4lxml_5etree__linkDtdAttribute(xmlDtd *__pyx_v_c_dtd, xmlAtt * # no such element? something is wrong with the DTD ... * return */ - __Pyx_TraceLine(433,0,__PYX_ERR(20, 433, __pyx_L1_error)) __pyx_t_1 = ((!(__pyx_v_c_elem != 0)) != 0); if (__pyx_t_1) { @@ -215089,7 +199675,6 @@ static void __pyx_f_4lxml_5etree__linkDtdAttribute(xmlDtd *__pyx_v_c_dtd, xmlAtt * c_pos = c_elem.attributes * if not c_pos: */ - __Pyx_TraceLine(435,0,__PYX_ERR(20, 435, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/dtd.pxi":433 @@ -215108,7 +199693,6 @@ static void __pyx_f_4lxml_5etree__linkDtdAttribute(xmlDtd *__pyx_v_c_dtd, xmlAtt * if not c_pos: * c_elem.attributes = c_attr */ - __Pyx_TraceLine(436,0,__PYX_ERR(20, 436, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_elem->attributes; __pyx_v_c_pos = __pyx_t_2; @@ -215119,7 +199703,6 @@ static void __pyx_f_4lxml_5etree__linkDtdAttribute(xmlDtd *__pyx_v_c_dtd, xmlAtt * c_elem.attributes = c_attr * c_attr.nexth = NULL */ - __Pyx_TraceLine(437,0,__PYX_ERR(20, 437, __pyx_L1_error)) __pyx_t_1 = ((!(__pyx_v_c_pos != 0)) != 0); if (__pyx_t_1) { @@ -215130,7 +199713,6 @@ static void __pyx_f_4lxml_5etree__linkDtdAttribute(xmlDtd *__pyx_v_c_dtd, xmlAtt * c_attr.nexth = NULL * return */ - __Pyx_TraceLine(438,0,__PYX_ERR(20, 438, __pyx_L1_error)) __pyx_v_c_elem->attributes = __pyx_v_c_attr; /* "src/lxml/dtd.pxi":439 @@ -215140,7 +199722,6 @@ static void __pyx_f_4lxml_5etree__linkDtdAttribute(xmlDtd *__pyx_v_c_dtd, xmlAtt * return * # libxml2 keeps namespace declarations first, and we need to make */ - __Pyx_TraceLine(439,0,__PYX_ERR(20, 439, __pyx_L1_error)) __pyx_v_c_attr->nexth = NULL; /* "src/lxml/dtd.pxi":440 @@ -215150,7 +199731,6 @@ static void __pyx_f_4lxml_5etree__linkDtdAttribute(xmlDtd *__pyx_v_c_dtd, xmlAtt * # libxml2 keeps namespace declarations first, and we need to make * # sure we don't re-insert attributes that are already there */ - __Pyx_TraceLine(440,0,__PYX_ERR(20, 440, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/dtd.pxi":437 @@ -215169,7 +199749,6 @@ static void __pyx_f_4lxml_5etree__linkDtdAttribute(xmlDtd *__pyx_v_c_dtd, xmlAtt * if not _isDtdNsDecl(c_pos): * c_elem.attributes = c_attr */ - __Pyx_TraceLine(443,0,__PYX_ERR(20, 443, __pyx_L1_error)) __pyx_t_1 = (__pyx_f_4lxml_5etree__isDtdNsDecl(__pyx_v_c_attr) != 0); if (__pyx_t_1) { @@ -215180,7 +199759,6 @@ static void __pyx_f_4lxml_5etree__linkDtdAttribute(xmlDtd *__pyx_v_c_dtd, xmlAtt * c_elem.attributes = c_attr * c_attr.nexth = c_pos */ - __Pyx_TraceLine(444,0,__PYX_ERR(20, 444, __pyx_L1_error)) __pyx_t_1 = ((!(__pyx_f_4lxml_5etree__isDtdNsDecl(__pyx_v_c_pos) != 0)) != 0); if (__pyx_t_1) { @@ -215191,7 +199769,6 @@ static void __pyx_f_4lxml_5etree__linkDtdAttribute(xmlDtd *__pyx_v_c_dtd, xmlAtt * c_attr.nexth = c_pos * return */ - __Pyx_TraceLine(445,0,__PYX_ERR(20, 445, __pyx_L1_error)) __pyx_v_c_elem->attributes = __pyx_v_c_attr; /* "src/lxml/dtd.pxi":446 @@ -215201,7 +199778,6 @@ static void __pyx_f_4lxml_5etree__linkDtdAttribute(xmlDtd *__pyx_v_c_dtd, xmlAtt * return * while c_pos != c_attr and c_pos.nexth and _isDtdNsDecl(c_pos.nexth): */ - __Pyx_TraceLine(446,0,__PYX_ERR(20, 446, __pyx_L1_error)) __pyx_v_c_attr->nexth = __pyx_v_c_pos; /* "src/lxml/dtd.pxi":447 @@ -215211,7 +199787,6 @@ static void __pyx_f_4lxml_5etree__linkDtdAttribute(xmlDtd *__pyx_v_c_dtd, xmlAtt * while c_pos != c_attr and c_pos.nexth and _isDtdNsDecl(c_pos.nexth): * c_pos = c_pos.nexth */ - __Pyx_TraceLine(447,0,__PYX_ERR(20, 447, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/dtd.pxi":444 @@ -215230,7 +199805,6 @@ static void __pyx_f_4lxml_5etree__linkDtdAttribute(xmlDtd *__pyx_v_c_dtd, xmlAtt * c_pos = c_pos.nexth * else: */ - __Pyx_TraceLine(448,0,__PYX_ERR(20, 448, __pyx_L1_error)) while (1) { __pyx_t_3 = ((__pyx_v_c_pos != __pyx_v_c_attr) != 0); if (__pyx_t_3) { @@ -215256,7 +199830,6 @@ static void __pyx_f_4lxml_5etree__linkDtdAttribute(xmlDtd *__pyx_v_c_dtd, xmlAtt * else: * # append at end */ - __Pyx_TraceLine(449,0,__PYX_ERR(20, 449, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_pos->nexth; __pyx_v_c_pos = __pyx_t_2; } @@ -215278,7 +199851,6 @@ static void __pyx_f_4lxml_5etree__linkDtdAttribute(xmlDtd *__pyx_v_c_dtd, xmlAtt * c_pos = c_pos.nexth * if c_pos == c_attr: */ - __Pyx_TraceLine(452,0,__PYX_ERR(20, 452, __pyx_L1_error)) /*else*/ { while (1) { __pyx_t_3 = ((__pyx_v_c_pos != __pyx_v_c_attr) != 0); @@ -215299,7 +199871,6 @@ static void __pyx_f_4lxml_5etree__linkDtdAttribute(xmlDtd *__pyx_v_c_dtd, xmlAtt * if c_pos == c_attr: * return */ - __Pyx_TraceLine(453,0,__PYX_ERR(20, 453, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_pos->nexth; __pyx_v_c_pos = __pyx_t_2; } @@ -215313,7 +199884,6 @@ static void __pyx_f_4lxml_5etree__linkDtdAttribute(xmlDtd *__pyx_v_c_dtd, xmlAtt * return * c_attr.nexth = c_pos.nexth */ - __Pyx_TraceLine(454,0,__PYX_ERR(20, 454, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_pos == __pyx_v_c_attr) != 0); if (__pyx_t_1) { @@ -215324,7 +199894,6 @@ static void __pyx_f_4lxml_5etree__linkDtdAttribute(xmlDtd *__pyx_v_c_dtd, xmlAtt * c_attr.nexth = c_pos.nexth * c_pos.nexth = c_attr */ - __Pyx_TraceLine(455,0,__PYX_ERR(20, 455, __pyx_L1_error)) goto __pyx_L0; /* "src/lxml/dtd.pxi":454 @@ -215343,7 +199912,6 @@ static void __pyx_f_4lxml_5etree__linkDtdAttribute(xmlDtd *__pyx_v_c_dtd, xmlAtt * c_pos.nexth = c_attr * */ - __Pyx_TraceLine(456,0,__PYX_ERR(20, 456, __pyx_L1_error)) __pyx_t_2 = __pyx_v_c_pos->nexth; __pyx_v_c_attr->nexth = __pyx_t_2; @@ -215354,7 +199922,6 @@ static void __pyx_f_4lxml_5etree__linkDtdAttribute(xmlDtd *__pyx_v_c_dtd, xmlAtt * * */ - __Pyx_TraceLine(457,0,__PYX_ERR(20, 457, __pyx_L1_error)) __pyx_v_c_pos->nexth = __pyx_v_c_attr; /* "src/lxml/dtd.pxi":427 @@ -215366,11 +199933,7 @@ static void __pyx_f_4lxml_5etree__linkDtdAttribute(xmlDtd *__pyx_v_c_dtd, xmlAtt */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._linkDtdAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -215384,12 +199947,10 @@ static void __pyx_f_4lxml_5etree__linkDtdAttribute(xmlDtd *__pyx_v_c_dtd, xmlAtt static int __pyx_f_4lxml_5etree__isDtdNsDecl(xmlAttribute *__pyx_v_c_attr) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_isDtdNsDecl", 0); - __Pyx_TraceCall("_isDtdNsDecl", __pyx_f[20], 460, 0, __PYX_ERR(20, 460, __pyx_L1_error)); /* "src/lxml/dtd.pxi":461 * @@ -215398,7 +199959,6 @@ static int __pyx_f_4lxml_5etree__isDtdNsDecl(xmlAttribute *__pyx_v_c_attr) { * return True * if (c_attr.prefix is not NULL and */ - __Pyx_TraceLine(461,0,__PYX_ERR(20, 461, __pyx_L1_error)) __pyx_t_1 = ((strcmp(((const char *)__pyx_v_c_attr->name), ((char const *)"xmlns")) == 0) != 0); if (__pyx_t_1) { @@ -215409,7 +199969,6 @@ static int __pyx_f_4lxml_5etree__isDtdNsDecl(xmlAttribute *__pyx_v_c_attr) { * if (c_attr.prefix is not NULL and * cstring_h.strcmp(c_attr.prefix, "xmlns") == 0): */ - __Pyx_TraceLine(462,0,__PYX_ERR(20, 462, __pyx_L1_error)) __pyx_r = 1; goto __pyx_L0; @@ -215429,7 +199988,6 @@ static int __pyx_f_4lxml_5etree__isDtdNsDecl(xmlAttribute *__pyx_v_c_attr) { * cstring_h.strcmp(c_attr.prefix, "xmlns") == 0): * return True */ - __Pyx_TraceLine(463,0,__PYX_ERR(20, 463, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_attr->prefix != NULL) != 0); if (__pyx_t_2) { } else { @@ -215444,7 +200002,6 @@ static int __pyx_f_4lxml_5etree__isDtdNsDecl(xmlAttribute *__pyx_v_c_attr) { * return True * return False */ - __Pyx_TraceLine(464,0,__PYX_ERR(20, 464, __pyx_L1_error)) __pyx_t_2 = ((strcmp(((const char *)__pyx_v_c_attr->prefix), ((char const *)"xmlns")) == 0) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L5_bool_binop_done:; @@ -215456,7 +200013,6 @@ static int __pyx_f_4lxml_5etree__isDtdNsDecl(xmlAttribute *__pyx_v_c_attr) { * cstring_h.strcmp(c_attr.prefix, "xmlns") == 0): * return True */ - __Pyx_TraceLine(463,0,__PYX_ERR(20, 463, __pyx_L1_error)) if (__pyx_t_1) { /* "src/lxml/dtd.pxi":465 @@ -215465,7 +200021,6 @@ static int __pyx_f_4lxml_5etree__isDtdNsDecl(xmlAttribute *__pyx_v_c_attr) { * return True # <<<<<<<<<<<<<< * return False */ - __Pyx_TraceLine(465,0,__PYX_ERR(20, 465, __pyx_L1_error)) __pyx_r = 1; goto __pyx_L0; @@ -215483,7 +200038,6 @@ static int __pyx_f_4lxml_5etree__isDtdNsDecl(xmlAttribute *__pyx_v_c_attr) { * return True * return False # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(466,0,__PYX_ERR(20, 466, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -215496,11 +200050,7 @@ static int __pyx_f_4lxml_5etree__isDtdNsDecl(xmlAttribute *__pyx_v_c_attr) { */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._isDtdNsDecl", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -215515,13 +200065,11 @@ static int __pyx_f_4lxml_5etree__isDtdNsDecl(xmlAttribute *__pyx_v_c_attr) { static int __pyx_f_4lxml_5etree__require_rnc2rng(void) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_require_rnc2rng", 0); - __Pyx_TraceCall("_require_rnc2rng", __pyx_f[21], 11, 0, __PYX_ERR(21, 11, __pyx_L1_error)); /* "src/lxml/relaxng.pxi":12 * @@ -215530,7 +200078,6 @@ static int __pyx_f_4lxml_5etree__require_rnc2rng(void) { * raise RelaxNGParseError( * 'compact syntax not supported (please install rnc2rng)') */ - __Pyx_TraceLine(12,0,__PYX_ERR(21, 12, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_4lxml_5etree__rnc2rng == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { @@ -215542,8 +200089,7 @@ static int __pyx_f_4lxml_5etree__require_rnc2rng(void) { * 'compact syntax not supported (please install rnc2rng)') * return 0 */ - __Pyx_TraceLine(13,0,__PYX_ERR(21, 13, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_RelaxNGParseError), __pyx_tuple__387, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 13, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_RelaxNGParseError), __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 13, __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; @@ -215565,7 +200111,6 @@ static int __pyx_f_4lxml_5etree__require_rnc2rng(void) { * * */ - __Pyx_TraceLine(15,0,__PYX_ERR(21, 15, __pyx_L1_error)) __pyx_r = 0; goto __pyx_L0; @@ -215583,7 +200128,6 @@ static int __pyx_f_4lxml_5etree__require_rnc2rng(void) { __Pyx_AddTraceback("lxml.etree._require_rnc2rng", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -215614,10 +200158,8 @@ static int __pyx_pw_4lxml_5etree_7RelaxNG_1__cinit__(PyObject *__pyx_v_self, PyO static int __pyx_pf_4lxml_5etree_7RelaxNG___cinit__(struct __pyx_obj_4lxml_5etree_RelaxNG *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[21], 42, 0, __PYX_ERR(21, 42, __pyx_L1_error)); /* "src/lxml/relaxng.pxi":43 * cdef relaxng.xmlRelaxNG* _c_schema @@ -215626,7 +200168,6 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG___cinit__(struct __pyx_obj_4lxml_5etre * * def __init__(self, etree=None, *, file=None): */ - __Pyx_TraceLine(43,0,__PYX_ERR(21, 43, __pyx_L1_error)) __pyx_v_self->_c_schema = NULL; /* "src/lxml/relaxng.pxi":42 @@ -215639,12 +200180,6 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG___cinit__(struct __pyx_obj_4lxml_5etre /* function exit code */ __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.RelaxNG.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -215729,26 +200264,22 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre PyObject *__pyx_v_rng_data = NULL; PyObject *__pyx_v_filename = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; + int __pyx_t_4; int __pyx_t_5; - int __pyx_t_6; - xmlDoc *__pyx_t_7; - int __pyx_t_8; + xmlDoc *__pyx_t_6; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; - PyObject *__pyx_t_14 = NULL; - PyObject *__pyx_t_15 = NULL; - struct __pyx_opt_args_4lxml_5etree__connectGenericErrorLog __pyx_t_16; + struct __pyx_opt_args_4lxml_5etree__connectGenericErrorLog __pyx_t_14; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[21], 45, 0, __PYX_ERR(21, 45, __pyx_L1_error)); /* "src/lxml/relaxng.pxi":48 * cdef _Document doc @@ -215757,7 +200288,6 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * cdef relaxng.xmlRelaxNGParserCtxt* parser_ctxt = NULL * _Validator.__init__(self) */ - __Pyx_TraceLine(48,0,__PYX_ERR(21, 48, __pyx_L1_error)) __pyx_v_fake_c_doc = NULL; /* "src/lxml/relaxng.pxi":49 @@ -215767,7 +200297,6 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * _Validator.__init__(self) * if etree is not None: */ - __Pyx_TraceLine(49,0,__PYX_ERR(21, 49, __pyx_L1_error)) __pyx_v_parser_ctxt = NULL; /* "src/lxml/relaxng.pxi":50 @@ -215777,7 +200306,6 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * if etree is not None: * doc = _documentOrRaise(etree) */ - __Pyx_TraceLine(50,0,__PYX_ERR(21, 50, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree__Validator), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; @@ -215790,38 +200318,10 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 50, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 50, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 50, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 50, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_self)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject *)__pyx_v_self)); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 50, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __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(21, 50, __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; @@ -215832,10 +200332,9 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * doc = _documentOrRaise(etree) * root_node = _rootNodeOrRaise(etree) */ - __Pyx_TraceLine(51,0,__PYX_ERR(21, 51, __pyx_L1_error)) - __pyx_t_5 = (__pyx_v_etree != Py_None); - __pyx_t_6 = (__pyx_t_5 != 0); - if (__pyx_t_6) { + __pyx_t_4 = (__pyx_v_etree != Py_None); + __pyx_t_5 = (__pyx_t_4 != 0); + if (__pyx_t_5) { /* "src/lxml/relaxng.pxi":52 * _Validator.__init__(self) @@ -215844,7 +200343,6 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * root_node = _rootNodeOrRaise(etree) * fake_c_doc = _fakeRootDoc(doc._c_doc, root_node._c_node) */ - __Pyx_TraceLine(52,0,__PYX_ERR(21, 52, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__documentOrRaise(__pyx_v_etree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_1); @@ -215857,7 +200355,6 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * fake_c_doc = _fakeRootDoc(doc._c_doc, root_node._c_node) * parser_ctxt = relaxng.xmlRelaxNGNewDocParserCtxt(fake_c_doc) */ - __Pyx_TraceLine(53,0,__PYX_ERR(21, 53, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__rootNodeOrRaise(__pyx_v_etree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_root_node = ((struct LxmlElement *)__pyx_t_1); @@ -215870,9 +200367,8 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * parser_ctxt = relaxng.xmlRelaxNGNewDocParserCtxt(fake_c_doc) * elif file is not None: */ - __Pyx_TraceLine(54,0,__PYX_ERR(21, 54, __pyx_L1_error)) - __pyx_t_7 = __pyx_f_4lxml_5etree__fakeRootDoc(__pyx_v_doc->_c_doc, __pyx_v_root_node->_c_node); if (unlikely(__pyx_t_7 == ((xmlDoc *)NULL))) __PYX_ERR(21, 54, __pyx_L1_error) - __pyx_v_fake_c_doc = __pyx_t_7; + __pyx_t_6 = __pyx_f_4lxml_5etree__fakeRootDoc(__pyx_v_doc->_c_doc, __pyx_v_root_node->_c_node); if (unlikely(__pyx_t_6 == ((xmlDoc *)NULL))) __PYX_ERR(21, 54, __pyx_L1_error) + __pyx_v_fake_c_doc = __pyx_t_6; /* "src/lxml/relaxng.pxi":55 * root_node = _rootNodeOrRaise(etree) @@ -215881,7 +200377,6 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * elif file is not None: * if _isString(file): */ - __Pyx_TraceLine(55,0,__PYX_ERR(21, 55, __pyx_L1_error)) __pyx_v_parser_ctxt = xmlRelaxNGNewDocParserCtxt(__pyx_v_fake_c_doc); /* "src/lxml/relaxng.pxi":51 @@ -215901,10 +200396,9 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * if _isString(file): * if file[-4:].lower() == '.rnc': */ - __Pyx_TraceLine(56,0,__PYX_ERR(21, 56, __pyx_L1_error)) - __pyx_t_6 = (__pyx_v_file != Py_None); - __pyx_t_5 = (__pyx_t_6 != 0); - if (likely(__pyx_t_5)) { + __pyx_t_5 = (__pyx_v_file != Py_None); + __pyx_t_4 = (__pyx_t_5 != 0); + if (likely(__pyx_t_4)) { /* "src/lxml/relaxng.pxi":57 * parser_ctxt = relaxng.xmlRelaxNGNewDocParserCtxt(fake_c_doc) @@ -215913,9 +200407,8 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * if file[-4:].lower() == '.rnc': * _require_rnc2rng() */ - __Pyx_TraceLine(57,0,__PYX_ERR(21, 57, __pyx_L1_error)) - __pyx_t_5 = (_isString(__pyx_v_file) != 0); - if (__pyx_t_5) { + __pyx_t_4 = (_isString(__pyx_v_file) != 0); + if (__pyx_t_4) { /* "src/lxml/relaxng.pxi":58 * elif file is not None: @@ -215924,33 +200417,29 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * _require_rnc2rng() * rng_data = _rnc2rng.dumps(_rnc2rng.load(file)) */ - __Pyx_TraceLine(58,0,__PYX_ERR(21, 58, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_file, -4L, 0, NULL, NULL, &__pyx_slice__388, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 58, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_file, -4L, 0, NULL, NULL, &__pyx_slice__88, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lower); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 58, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lower); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); + __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 58, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 58, __pyx_L1_error) - } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_rnc, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(21, 58, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_rnc, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(21, 58, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_5) { + if (__pyx_t_4) { /* "src/lxml/relaxng.pxi":59 * if _isString(file): @@ -215959,8 +200448,7 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * rng_data = _rnc2rng.dumps(_rnc2rng.load(file)) * doc = _parseMemoryDocument(rng_data, parser=None, url=None) */ - __Pyx_TraceLine(59,0,__PYX_ERR(21, 59, __pyx_L1_error)) - __pyx_t_8 = __pyx_f_4lxml_5etree__require_rnc2rng(); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(21, 59, __pyx_L1_error) + __pyx_t_7 = __pyx_f_4lxml_5etree__require_rnc2rng(); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(21, 59, __pyx_L1_error) /* "src/lxml/relaxng.pxi":60 * if file[-4:].lower() == '.rnc': @@ -215969,100 +200457,41 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * doc = _parseMemoryDocument(rng_data, parser=None, url=None) * root_node = doc.getroot() */ - __Pyx_TraceLine(60,0,__PYX_ERR(21, 60, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree__rnc2rng, __pyx_n_s_dumps); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 60, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree__rnc2rng, __pyx_n_s_load); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 60, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree__rnc2rng, __pyx_n_s_dumps); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree__rnc2rng, __pyx_n_s_load); if (unlikely(!__pyx_t_8)) __PYX_ERR(21, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); - } - } - if (!__pyx_t_9) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_file); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 60, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_file}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 60, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_file}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 60, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(21, 60, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; - __Pyx_INCREF(__pyx_v_file); - __Pyx_GIVEREF(__pyx_v_file); - PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_file); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 60, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF_SET(__pyx_t_8, function); } } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_3)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_3); + __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_v_file) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_file); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - } - } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 60, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_2}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 60, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_2}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 60, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } else - #endif - { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(21, 60, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_2); - __pyx_t_2 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 60, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF_SET(__pyx_t_3, function); } } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_rng_data = __pyx_t_1; __pyx_t_1 = 0; @@ -216073,7 +200502,6 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * root_node = doc.getroot() * fake_c_doc = _fakeRootDoc(doc._c_doc, root_node._c_node) */ - __Pyx_TraceLine(61,0,__PYX_ERR(21, 61, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__parseMemoryDocument(__pyx_v_rng_data, Py_None, ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None))); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_1); @@ -216086,7 +200514,6 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * fake_c_doc = _fakeRootDoc(doc._c_doc, root_node._c_node) * parser_ctxt = relaxng.xmlRelaxNGNewDocParserCtxt(fake_c_doc) */ - __Pyx_TraceLine(62,0,__PYX_ERR(21, 62, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree_9_Document_getroot(__pyx_v_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 62, __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(21, 62, __pyx_L1_error) @@ -216100,9 +200527,8 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * parser_ctxt = relaxng.xmlRelaxNGNewDocParserCtxt(fake_c_doc) * else: */ - __Pyx_TraceLine(63,0,__PYX_ERR(21, 63, __pyx_L1_error)) - __pyx_t_7 = __pyx_f_4lxml_5etree__fakeRootDoc(__pyx_v_doc->_c_doc, __pyx_v_root_node->_c_node); if (unlikely(__pyx_t_7 == ((xmlDoc *)NULL))) __PYX_ERR(21, 63, __pyx_L1_error) - __pyx_v_fake_c_doc = __pyx_t_7; + __pyx_t_6 = __pyx_f_4lxml_5etree__fakeRootDoc(__pyx_v_doc->_c_doc, __pyx_v_root_node->_c_node); if (unlikely(__pyx_t_6 == ((xmlDoc *)NULL))) __PYX_ERR(21, 63, __pyx_L1_error) + __pyx_v_fake_c_doc = __pyx_t_6; /* "src/lxml/relaxng.pxi":64 * root_node = doc.getroot() @@ -216111,7 +200537,6 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * else: * doc = None */ - __Pyx_TraceLine(64,0,__PYX_ERR(21, 64, __pyx_L1_error)) __pyx_v_parser_ctxt = xmlRelaxNGNewDocParserCtxt(__pyx_v_fake_c_doc); /* "src/lxml/relaxng.pxi":58 @@ -216131,7 +200556,6 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * filename = _encodeFilename(file) * with self._error_log: */ - __Pyx_TraceLine(66,0,__PYX_ERR(21, 66, __pyx_L1_error)) /*else*/ { __Pyx_INCREF(Py_None); __pyx_v_doc = ((struct LxmlDocument *)Py_None); @@ -216143,7 +200567,6 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * with self._error_log: * parser_ctxt = relaxng.xmlRelaxNGNewParserCtxt(_cstr(filename)) */ - __Pyx_TraceLine(67,0,__PYX_ERR(21, 67, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_filename = __pyx_t_1; @@ -216156,19 +200579,13 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * parser_ctxt = relaxng.xmlRelaxNGNewParserCtxt(_cstr(filename)) * elif (_getFilenameForFile(file) or '')[-4:].lower() == '.rnc': */ - __Pyx_TraceLine(68,0,__PYX_ERR(21, 68, __pyx_L1_error)) /*with:*/ { - __pyx_t_11 = __Pyx_PyObject_LookupSpecial(((PyObject *)__pyx_v_self->__pyx_base._error_log), __pyx_n_s_exit); if (unlikely(!__pyx_t_11)) __PYX_ERR(21, 68, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); - __pyx_t_8 = __pyx_f_4lxml_5etree_9_ErrorLog___enter__(__pyx_v_self->__pyx_base._error_log); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(21, 68, __pyx_L6_error) + __pyx_t_10 = __Pyx_PyObject_LookupSpecial(((PyObject *)__pyx_v_self->__pyx_base._error_log), __pyx_n_s_exit); if (unlikely(!__pyx_t_10)) __PYX_ERR(21, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_7 = __pyx_f_4lxml_5etree_9_ErrorLog___enter__(__pyx_v_self->__pyx_base._error_log); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(21, 68, __pyx_L6_error) /*try:*/ { { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_13); - __Pyx_XGOTREF(__pyx_t_14); + (void)__pyx_t_11; (void)__pyx_t_12; (void)__pyx_t_13; /* mark used */ /*try:*/ { /* "src/lxml/relaxng.pxi":69 @@ -216178,7 +200595,6 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * elif (_getFilenameForFile(file) or '')[-4:].lower() == '.rnc': * _require_rnc2rng() */ - __Pyx_TraceLine(69,0,__PYX_ERR(21, 69, __pyx_L10_error)) __pyx_v_parser_ctxt = xmlRelaxNGNewParserCtxt(PyBytes_AS_STRING(__pyx_v_filename)); /* "src/lxml/relaxng.pxi":68 @@ -216189,79 +200605,26 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * elif (_getFilenameForFile(file) or '')[-4:].lower() == '.rnc': */ } - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - goto __pyx_L15_try_end; - __pyx_L10_error:; - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /*except:*/ { - __Pyx_AddTraceback("lxml.etree.RelaxNG.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_10) < 0) __PYX_ERR(21, 68, __pyx_L12_except_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_2 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 68, __pyx_L12_except_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, NULL); - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_15)) __PYX_ERR(21, 68, __pyx_L12_except_error) - __Pyx_GOTREF(__pyx_t_15); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_15); - __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - if (__pyx_t_5 < 0) __PYX_ERR(21, 68, __pyx_L12_except_error) - __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0); - if (__pyx_t_6) { - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_4); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_4, __pyx_t_10); - __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_10 = 0; - __PYX_ERR(21, 68, __pyx_L12_except_error) - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - goto __pyx_L11_exception_handled; - } - __pyx_L12_except_error:; - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); - goto __pyx_L1_error; - __pyx_L11_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); - __pyx_L15_try_end:; } } /*finally:*/ { /*normal exit:*/{ - if (__pyx_t_11) { - __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__389, NULL); - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_14)) __PYX_ERR(21, 68, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (__pyx_t_10) { + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__56, NULL); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_13)) __PYX_ERR(21, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } goto __pyx_L9; } __pyx_L9:; } - goto __pyx_L19; + goto __pyx_L16; __pyx_L6_error:; - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L1_error; - __pyx_L19:; + __pyx_L16:; } } __pyx_L5:; @@ -216283,48 +200646,44 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * _require_rnc2rng() * rng_data = _rnc2rng.dumps(_rnc2rng.load(file)) */ - __Pyx_TraceLine(70,0,__PYX_ERR(21, 70, __pyx_L1_error)) - __pyx_t_1 = __pyx_f_4lxml_5etree__getFilenameForFile(__pyx_v_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 70, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(21, 70, __pyx_L1_error) - if (!__pyx_t_6) { - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = __pyx_f_4lxml_5etree__getFilenameForFile(__pyx_v_file); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(21, 70, __pyx_L1_error) + if (!__pyx_t_4) { + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { - __Pyx_INCREF(__pyx_t_1); - __pyx_t_4 = __pyx_t_1; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L20_bool_binop_done; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = __pyx_t_2; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L17_bool_binop_done; } - __Pyx_INCREF(__pyx_kp_s__23); - __pyx_t_4 = __pyx_kp_s__23; - __pyx_L20_bool_binop_done:; - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_4, -4L, 0, NULL, NULL, &__pyx_slice__390, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 70, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_lower); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 70, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_s__11); + __pyx_t_3 = __pyx_kp_s__11; + __pyx_L17_bool_binop_done:; + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_3, -4L, 0, NULL, NULL, &__pyx_slice__88, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lower); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); + __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (__pyx_t_1) { - __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(21, 70, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else { - __pyx_t_10 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(21, 70, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_10, __pyx_kp_s_rnc, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(21, 70, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (__pyx_t_6) { + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_rnc, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(21, 70, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_4) { /* "src/lxml/relaxng.pxi":71 * parser_ctxt = relaxng.xmlRelaxNGNewParserCtxt(_cstr(filename)) @@ -216333,8 +200692,7 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * rng_data = _rnc2rng.dumps(_rnc2rng.load(file)) * doc = _parseMemoryDocument(rng_data, parser=None, url=None) */ - __Pyx_TraceLine(71,0,__PYX_ERR(21, 71, __pyx_L1_error)) - __pyx_t_8 = __pyx_f_4lxml_5etree__require_rnc2rng(); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(21, 71, __pyx_L1_error) + __pyx_t_7 = __pyx_f_4lxml_5etree__require_rnc2rng(); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(21, 71, __pyx_L1_error) /* "src/lxml/relaxng.pxi":72 * elif (_getFilenameForFile(file) or '')[-4:].lower() == '.rnc': @@ -216343,102 +200701,43 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * doc = _parseMemoryDocument(rng_data, parser=None, url=None) * root_node = doc.getroot() */ - __Pyx_TraceLine(72,0,__PYX_ERR(21, 72, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree__rnc2rng, __pyx_n_s_dumps); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 72, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree__rnc2rng, __pyx_n_s_load); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 72, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_3)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_3); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree__rnc2rng, __pyx_n_s_dumps); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree__rnc2rng, __pyx_n_s_load); if (unlikely(!__pyx_t_8)) __PYX_ERR(21, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); + __Pyx_DECREF_SET(__pyx_t_8, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 72, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_file}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 72, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_file}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 72, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(21, 72, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_v_file); - __Pyx_GIVEREF(__pyx_v_file); - PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_file); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 72, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_2)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_2); + __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_v_file) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_file); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - } - } - if (!__pyx_t_2) { - __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(21, 72, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_10); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_1}; - __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(21, 72, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_1}; - __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(21, 72, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else - #endif - { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(21, 72, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2); __pyx_t_2 = NULL; - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_1); - __pyx_t_1 = 0; - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(21, 72, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF_SET(__pyx_t_3, function); } } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_v_rng_data = __pyx_t_10; - __pyx_t_10 = 0; + __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_rng_data = __pyx_t_1; + __pyx_t_1 = 0; /* "src/lxml/relaxng.pxi":73 * _require_rnc2rng() @@ -216447,11 +200746,10 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * root_node = doc.getroot() * fake_c_doc = _fakeRootDoc(doc._c_doc, root_node._c_node) */ - __Pyx_TraceLine(73,0,__PYX_ERR(21, 73, __pyx_L1_error)) - __pyx_t_10 = ((PyObject *)__pyx_f_4lxml_5etree__parseMemoryDocument(__pyx_v_rng_data, Py_None, ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None))); if (unlikely(!__pyx_t_10)) __PYX_ERR(21, 73, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_10); - __pyx_t_10 = 0; + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__parseMemoryDocument(__pyx_v_rng_data, Py_None, ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None))); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 73, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_1); + __pyx_t_1 = 0; /* "src/lxml/relaxng.pxi":74 * rng_data = _rnc2rng.dumps(_rnc2rng.load(file)) @@ -216460,12 +200758,11 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * fake_c_doc = _fakeRootDoc(doc._c_doc, root_node._c_node) * parser_ctxt = relaxng.xmlRelaxNGNewDocParserCtxt(fake_c_doc) */ - __Pyx_TraceLine(74,0,__PYX_ERR(21, 74, __pyx_L1_error)) - __pyx_t_10 = __pyx_f_4lxml_5etree_9_Document_getroot(__pyx_v_doc); if (unlikely(!__pyx_t_10)) __PYX_ERR(21, 74, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(21, 74, __pyx_L1_error) - __pyx_v_root_node = ((struct LxmlElement *)__pyx_t_10); - __pyx_t_10 = 0; + __pyx_t_1 = __pyx_f_4lxml_5etree_9_Document_getroot(__pyx_v_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 74, __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(21, 74, __pyx_L1_error) + __pyx_v_root_node = ((struct LxmlElement *)__pyx_t_1); + __pyx_t_1 = 0; /* "src/lxml/relaxng.pxi":75 * doc = _parseMemoryDocument(rng_data, parser=None, url=None) @@ -216474,9 +200771,8 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * parser_ctxt = relaxng.xmlRelaxNGNewDocParserCtxt(fake_c_doc) * else: */ - __Pyx_TraceLine(75,0,__PYX_ERR(21, 75, __pyx_L1_error)) - __pyx_t_7 = __pyx_f_4lxml_5etree__fakeRootDoc(__pyx_v_doc->_c_doc, __pyx_v_root_node->_c_node); if (unlikely(__pyx_t_7 == ((xmlDoc *)NULL))) __PYX_ERR(21, 75, __pyx_L1_error) - __pyx_v_fake_c_doc = __pyx_t_7; + __pyx_t_6 = __pyx_f_4lxml_5etree__fakeRootDoc(__pyx_v_doc->_c_doc, __pyx_v_root_node->_c_node); if (unlikely(__pyx_t_6 == ((xmlDoc *)NULL))) __PYX_ERR(21, 75, __pyx_L1_error) + __pyx_v_fake_c_doc = __pyx_t_6; /* "src/lxml/relaxng.pxi":76 * root_node = doc.getroot() @@ -216485,7 +200781,6 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * else: * doc = _parseDocument(file, parser=None, base_url=None) */ - __Pyx_TraceLine(76,0,__PYX_ERR(21, 76, __pyx_L1_error)) __pyx_v_parser_ctxt = xmlRelaxNGNewDocParserCtxt(__pyx_v_fake_c_doc); /* "src/lxml/relaxng.pxi":70 @@ -216505,12 +200800,11 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * parser_ctxt = relaxng.xmlRelaxNGNewDocParserCtxt(doc._c_doc) * else: */ - __Pyx_TraceLine(78,0,__PYX_ERR(21, 78, __pyx_L1_error)) /*else*/ { - __pyx_t_10 = ((PyObject *)__pyx_f_4lxml_5etree__parseDocument(__pyx_v_file, ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None), Py_None)); if (unlikely(!__pyx_t_10)) __PYX_ERR(21, 78, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_10); - __pyx_t_10 = 0; + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__parseDocument(__pyx_v_file, ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None), Py_None)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_1); + __pyx_t_1 = 0; /* "src/lxml/relaxng.pxi":79 * else: @@ -216519,7 +200813,6 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * else: * raise RelaxNGParseError, u"No tree or file given" */ - __Pyx_TraceLine(79,0,__PYX_ERR(21, 79, __pyx_L1_error)) __pyx_v_parser_ctxt = xmlRelaxNGNewDocParserCtxt(__pyx_v_doc->_c_doc); } __pyx_L4:; @@ -216541,7 +200834,6 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * * if parser_ctxt is NULL: */ - __Pyx_TraceLine(81,0,__PYX_ERR(21, 81, __pyx_L1_error)) /*else*/ { __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_RelaxNGParseError), __pyx_kp_u_No_tree_or_file_given, 0, 0); __PYX_ERR(21, 81, __pyx_L1_error) @@ -216555,9 +200847,8 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * if fake_c_doc is not NULL: * _destroyFakeDoc(doc._c_doc, fake_c_doc) */ - __Pyx_TraceLine(83,0,__PYX_ERR(21, 83, __pyx_L1_error)) - __pyx_t_6 = ((__pyx_v_parser_ctxt == NULL) != 0); - if (__pyx_t_6) { + __pyx_t_4 = ((__pyx_v_parser_ctxt == NULL) != 0); + if (__pyx_t_4) { /* "src/lxml/relaxng.pxi":84 * @@ -216566,9 +200857,8 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * _destroyFakeDoc(doc._c_doc, fake_c_doc) * raise RelaxNGParseError( */ - __Pyx_TraceLine(84,0,__PYX_ERR(21, 84, __pyx_L1_error)) - __pyx_t_6 = ((__pyx_v_fake_c_doc != NULL) != 0); - if (__pyx_t_6) { + __pyx_t_4 = ((__pyx_v_fake_c_doc != NULL) != 0); + if (__pyx_t_4) { /* "src/lxml/relaxng.pxi":85 * if parser_ctxt is NULL: @@ -216577,7 +200867,6 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * raise RelaxNGParseError( * self._error_log._buildExceptionMessage( */ - __Pyx_TraceLine(85,0,__PYX_ERR(21, 85, __pyx_L1_error)) __pyx_f_4lxml_5etree__destroyFakeDoc(__pyx_v_doc->_c_doc, __pyx_v_fake_c_doc); /* "src/lxml/relaxng.pxi":84 @@ -216596,9 +200885,8 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * u"Document is not parsable as Relax NG"), * self._error_log) */ - __Pyx_TraceLine(87,0,__PYX_ERR(21, 87, __pyx_L1_error)) - __pyx_t_10 = __pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_self->__pyx_base._error_log), __pyx_kp_u_Document_is_not_parsable_as_Rela); if (unlikely(!__pyx_t_10)) __PYX_ERR(21, 87, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); + __pyx_t_1 = __pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_self->__pyx_base._error_log), __pyx_kp_u_Document_is_not_parsable_as_Rela); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 87, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); /* "src/lxml/relaxng.pxi":86 * if fake_c_doc is not NULL: @@ -216607,20 +200895,19 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * self._error_log._buildExceptionMessage( * u"Document is not parsable as Relax NG"), */ - __Pyx_TraceLine(86,0,__PYX_ERR(21, 86, __pyx_L1_error)) - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 86, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_10); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_10); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 86, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base._error_log)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base._error_log)); - PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self->__pyx_base._error_log)); - __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_RelaxNGParseError), __pyx_t_4, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(21, 86, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_Raise(__pyx_t_10, 0, 0, 0); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self->__pyx_base._error_log)); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_RelaxNGParseError), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 86, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(21, 86, __pyx_L1_error) /* "src/lxml/relaxng.pxi":83 @@ -216639,7 +200926,6 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * parser_ctxt, _receiveError, self._error_log) * _connectGenericErrorLog(self._error_log, xmlerror.XML_FROM_RELAXNGP) */ - __Pyx_TraceLine(91,0,__PYX_ERR(21, 91, __pyx_L1_error)) xmlRelaxNGSetParserStructuredErrors(__pyx_v_parser_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log)); /* "src/lxml/relaxng.pxi":93 @@ -216649,13 +200935,12 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * self._c_schema = relaxng.xmlRelaxNGParse(parser_ctxt) * _connectGenericErrorLog(None) */ - __Pyx_TraceLine(93,0,__PYX_ERR(21, 93, __pyx_L1_error)) - __pyx_t_10 = ((PyObject *)__pyx_v_self->__pyx_base._error_log); - __Pyx_INCREF(__pyx_t_10); - __pyx_t_16.__pyx_n = 1; - __pyx_t_16.c_domain = XML_FROM_RELAXNGP; - __pyx_f_4lxml_5etree__connectGenericErrorLog(__pyx_t_10, &__pyx_t_16); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base._error_log); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_14.__pyx_n = 1; + __pyx_t_14.c_domain = XML_FROM_RELAXNGP; + __pyx_f_4lxml_5etree__connectGenericErrorLog(__pyx_t_1, &__pyx_t_14); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/lxml/relaxng.pxi":94 * parser_ctxt, _receiveError, self._error_log) @@ -216664,7 +200949,6 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * _connectGenericErrorLog(None) * */ - __Pyx_TraceLine(94,0,__PYX_ERR(21, 94, __pyx_L1_error)) __pyx_v_self->_c_schema = xmlRelaxNGParse(__pyx_v_parser_ctxt); /* "src/lxml/relaxng.pxi":95 @@ -216674,7 +200958,6 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * * relaxng.xmlRelaxNGFreeParserCtxt(parser_ctxt) */ - __Pyx_TraceLine(95,0,__PYX_ERR(21, 95, __pyx_L1_error)) __pyx_f_4lxml_5etree__connectGenericErrorLog(Py_None, NULL); /* "src/lxml/relaxng.pxi":97 @@ -216684,7 +200967,6 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * if self._c_schema is NULL: * if fake_c_doc is not NULL: */ - __Pyx_TraceLine(97,0,__PYX_ERR(21, 97, __pyx_L1_error)) xmlRelaxNGFreeParserCtxt(__pyx_v_parser_ctxt); /* "src/lxml/relaxng.pxi":98 @@ -216694,9 +200976,8 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * if fake_c_doc is not NULL: * _destroyFakeDoc(doc._c_doc, fake_c_doc) */ - __Pyx_TraceLine(98,0,__PYX_ERR(21, 98, __pyx_L1_error)) - __pyx_t_6 = ((__pyx_v_self->_c_schema == NULL) != 0); - if (__pyx_t_6) { + __pyx_t_4 = ((__pyx_v_self->_c_schema == NULL) != 0); + if (__pyx_t_4) { /* "src/lxml/relaxng.pxi":99 * relaxng.xmlRelaxNGFreeParserCtxt(parser_ctxt) @@ -216705,9 +200986,8 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * _destroyFakeDoc(doc._c_doc, fake_c_doc) * raise RelaxNGParseError( */ - __Pyx_TraceLine(99,0,__PYX_ERR(21, 99, __pyx_L1_error)) - __pyx_t_6 = ((__pyx_v_fake_c_doc != NULL) != 0); - if (__pyx_t_6) { + __pyx_t_4 = ((__pyx_v_fake_c_doc != NULL) != 0); + if (__pyx_t_4) { /* "src/lxml/relaxng.pxi":100 * if self._c_schema is NULL: @@ -216716,7 +200996,6 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * raise RelaxNGParseError( * self._error_log._buildExceptionMessage( */ - __Pyx_TraceLine(100,0,__PYX_ERR(21, 100, __pyx_L1_error)) __pyx_f_4lxml_5etree__destroyFakeDoc(__pyx_v_doc->_c_doc, __pyx_v_fake_c_doc); /* "src/lxml/relaxng.pxi":99 @@ -216735,9 +201014,8 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * u"Document is not valid Relax NG"), * self._error_log) */ - __Pyx_TraceLine(102,0,__PYX_ERR(21, 102, __pyx_L1_error)) - __pyx_t_10 = __pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_self->__pyx_base._error_log), __pyx_kp_u_Document_is_not_valid_Relax_NG); if (unlikely(!__pyx_t_10)) __PYX_ERR(21, 102, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); + __pyx_t_1 = __pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_self->__pyx_base._error_log), __pyx_kp_u_Document_is_not_valid_Relax_NG); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); /* "src/lxml/relaxng.pxi":101 * if fake_c_doc is not NULL: @@ -216746,20 +201024,19 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * self._error_log._buildExceptionMessage( * u"Document is not valid Relax NG"), */ - __Pyx_TraceLine(101,0,__PYX_ERR(21, 101, __pyx_L1_error)) - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 101, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_10); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_10); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base._error_log)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base._error_log)); - PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self->__pyx_base._error_log)); - __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_RelaxNGParseError), __pyx_t_4, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(21, 101, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_Raise(__pyx_t_10, 0, 0, 0); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self->__pyx_base._error_log)); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_RelaxNGParseError), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(21, 101, __pyx_L1_error) /* "src/lxml/relaxng.pxi":98 @@ -216778,9 +201055,8 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * _destroyFakeDoc(doc._c_doc, fake_c_doc) * */ - __Pyx_TraceLine(105,0,__PYX_ERR(21, 105, __pyx_L1_error)) - __pyx_t_6 = ((__pyx_v_fake_c_doc != NULL) != 0); - if (__pyx_t_6) { + __pyx_t_4 = ((__pyx_v_fake_c_doc != NULL) != 0); + if (__pyx_t_4) { /* "src/lxml/relaxng.pxi":106 * self._error_log) @@ -216789,7 +201065,6 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre * * def __dealloc__(self): */ - __Pyx_TraceLine(106,0,__PYX_ERR(21, 106, __pyx_L1_error)) __pyx_f_4lxml_5etree__destroyFakeDoc(__pyx_v_doc->_c_doc, __pyx_v_fake_c_doc); /* "src/lxml/relaxng.pxi":105 @@ -216816,9 +201091,8 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); - __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("lxml.etree.RelaxNG.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -216826,7 +201100,6 @@ static int __pyx_pf_4lxml_5etree_7RelaxNG_2__init__(struct __pyx_obj_4lxml_5etre __Pyx_XDECREF((PyObject *)__pyx_v_root_node); __Pyx_XDECREF(__pyx_v_rng_data); __Pyx_XDECREF(__pyx_v_filename); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -216851,10 +201124,8 @@ static void __pyx_pw_4lxml_5etree_7RelaxNG_5__dealloc__(PyObject *__pyx_v_self) } static void __pyx_pf_4lxml_5etree_7RelaxNG_4__dealloc__(struct __pyx_obj_4lxml_5etree_RelaxNG *__pyx_v_self) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - __Pyx_TraceCall("__dealloc__", __pyx_f[21], 108, 0, __PYX_ERR(21, 108, __pyx_L1_error)); /* "src/lxml/relaxng.pxi":109 * @@ -216863,7 +201134,6 @@ static void __pyx_pf_4lxml_5etree_7RelaxNG_4__dealloc__(struct __pyx_obj_4lxml_5 * * def __call__(self, etree): */ - __Pyx_TraceLine(109,0,__PYX_ERR(21, 109, __pyx_L1_error)) xmlRelaxNGFree(__pyx_v_self->_c_schema); /* "src/lxml/relaxng.pxi":108 @@ -216875,11 +201145,6 @@ static void __pyx_pf_4lxml_5etree_7RelaxNG_4__dealloc__(struct __pyx_obj_4lxml_5 */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.RelaxNG.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -216952,7 +201217,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml xmlRelaxNGValidCtxt *__pyx_v_valid_ctxt; int __pyx_v_ret; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -216969,7 +201233,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[21], 111, 0, __PYX_ERR(21, 111, __pyx_L1_error)); /* "src/lxml/relaxng.pxi":123 * cdef int ret @@ -216978,7 +201241,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml * doc = _documentOrRaise(etree) * root_node = _rootNodeOrRaise(etree) */ - __Pyx_TraceLine(123,0,__PYX_ERR(21, 123, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_self->_c_schema != NULL) != 0))) { @@ -216995,7 +201257,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml * root_node = _rootNodeOrRaise(etree) * */ - __Pyx_TraceLine(124,0,__PYX_ERR(21, 124, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__documentOrRaise(__pyx_v_etree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_1); @@ -217008,7 +201269,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml * * valid_ctxt = relaxng.xmlRelaxNGNewValidCtxt(self._c_schema) */ - __Pyx_TraceLine(125,0,__PYX_ERR(21, 125, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__rootNodeOrRaise(__pyx_v_etree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_root_node = ((struct LxmlElement *)__pyx_t_1); @@ -217021,7 +201281,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml * if valid_ctxt is NULL: * raise MemoryError() */ - __Pyx_TraceLine(127,0,__PYX_ERR(21, 127, __pyx_L1_error)) __pyx_v_valid_ctxt = xmlRelaxNGNewValidCtxt(__pyx_v_self->_c_schema); /* "src/lxml/relaxng.pxi":128 @@ -217031,7 +201290,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml * raise MemoryError() * */ - __Pyx_TraceLine(128,0,__PYX_ERR(21, 128, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_valid_ctxt == NULL) != 0); if (unlikely(__pyx_t_2)) { @@ -217042,7 +201300,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml * * try: */ - __Pyx_TraceLine(129,0,__PYX_ERR(21, 129, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(21, 129, __pyx_L1_error) /* "src/lxml/relaxng.pxi":128 @@ -217061,7 +201318,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml * self._error_log.clear() * relaxng.xmlRelaxNGSetValidStructuredErrors( */ - __Pyx_TraceLine(131,0,__PYX_ERR(21, 131, __pyx_L5_error)) /*try:*/ { /* "src/lxml/relaxng.pxi":132 @@ -217071,7 +201327,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml * relaxng.xmlRelaxNGSetValidStructuredErrors( * valid_ctxt, _receiveError, self._error_log) */ - __Pyx_TraceLine(132,0,__PYX_ERR(21, 132, __pyx_L5_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ErrorLog *)__pyx_v_self->__pyx_base._error_log->__pyx_base.__pyx_base.__pyx_vtab)->clear(__pyx_v_self->__pyx_base._error_log, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 132, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -217083,7 +201338,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml * valid_ctxt, _receiveError, self._error_log) * _connectGenericErrorLog(self._error_log, xmlerror.XML_FROM_RELAXNGV) */ - __Pyx_TraceLine(133,0,__PYX_ERR(21, 133, __pyx_L5_error)) xmlRelaxNGSetValidStructuredErrors(__pyx_v_valid_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log)); /* "src/lxml/relaxng.pxi":135 @@ -217093,7 +201347,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml * c_doc = _fakeRootDoc(doc._c_doc, root_node._c_node) * with nogil: */ - __Pyx_TraceLine(135,0,__PYX_ERR(21, 135, __pyx_L5_error)) __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base._error_log); __Pyx_INCREF(__pyx_t_1); __pyx_t_3.__pyx_n = 1; @@ -217108,7 +201361,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml * with nogil: * ret = relaxng.xmlRelaxNGValidateDoc(valid_ctxt, c_doc) */ - __Pyx_TraceLine(136,0,__PYX_ERR(21, 136, __pyx_L5_error)) __pyx_t_4 = __pyx_f_4lxml_5etree__fakeRootDoc(__pyx_v_doc->_c_doc, __pyx_v_root_node->_c_node); if (unlikely(__pyx_t_4 == ((xmlDoc *)NULL))) __PYX_ERR(21, 136, __pyx_L5_error) __pyx_v_c_doc = __pyx_t_4; @@ -217119,7 +201371,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml * ret = relaxng.xmlRelaxNGValidateDoc(valid_ctxt, c_doc) * _destroyFakeDoc(doc._c_doc, c_doc) */ - __Pyx_TraceLine(137,0,__PYX_ERR(21, 137, __pyx_L5_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -217135,7 +201386,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml * _destroyFakeDoc(doc._c_doc, c_doc) * finally: */ - __Pyx_TraceLine(138,1,__PYX_ERR(21, 138, __pyx_L8_error)) __pyx_v_ret = xmlRelaxNGValidateDoc(__pyx_v_valid_ctxt, __pyx_v_c_doc); } @@ -217146,7 +201396,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml * ret = relaxng.xmlRelaxNGValidateDoc(valid_ctxt, c_doc) * _destroyFakeDoc(doc._c_doc, c_doc) */ - __Pyx_TraceLine(137,1,__PYX_ERR(21, 137, __pyx_L5_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -217155,13 +201404,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml #endif goto __pyx_L9; } - __pyx_L8_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L5_error; - } __pyx_L9:; } } @@ -217173,7 +201415,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml * finally: * _connectGenericErrorLog(None) */ - __Pyx_TraceLine(139,0,__PYX_ERR(21, 139, __pyx_L5_error)) __pyx_f_4lxml_5etree__destroyFakeDoc(__pyx_v_doc->_c_doc, __pyx_v_c_doc); } @@ -217184,7 +201425,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml * relaxng.xmlRelaxNGFreeValidCtxt(valid_ctxt) * */ - __Pyx_TraceLine(141,0,__PYX_ERR(21, 141, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ __pyx_f_4lxml_5etree__connectGenericErrorLog(Py_None, NULL); @@ -217196,7 +201436,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml * * if ret == -1: */ - __Pyx_TraceLine(142,0,__PYX_ERR(21, 142, __pyx_L1_error)) xmlRelaxNGFreeValidCtxt(__pyx_v_valid_ctxt); goto __pyx_L6; } @@ -217224,7 +201463,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml * relaxng.xmlRelaxNGFreeValidCtxt(valid_ctxt) * */ - __Pyx_TraceLine(141,0,__PYX_ERR(21, 141, __pyx_L11_error)) __pyx_f_4lxml_5etree__connectGenericErrorLog(Py_None, NULL); /* "src/lxml/relaxng.pxi":142 @@ -217234,7 +201472,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml * * if ret == -1: */ - __Pyx_TraceLine(142,0,__PYX_ERR(21, 142, __pyx_L11_error)) xmlRelaxNGFreeValidCtxt(__pyx_v_valid_ctxt); } if (PY_MAJOR_VERSION >= 3) { @@ -217250,18 +201487,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_7; goto __pyx_L1_error; - __pyx_L11_error:; - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); - } - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; - goto __pyx_L1_error; } __pyx_L6:; } @@ -217273,7 +201498,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml * raise RelaxNGValidateError( * u"Internal error in Relax NG validation", */ - __Pyx_TraceLine(144,0,__PYX_ERR(21, 144, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_ret == -1L) != 0); if (unlikely(__pyx_t_2)) { @@ -217284,7 +201508,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml * u"Internal error in Relax NG validation", * self._error_log) */ - __Pyx_TraceLine(145,0,__PYX_ERR(21, 145, __pyx_L1_error)) __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_kp_u_Internal_error_in_Relax_NG_valid); @@ -217316,7 +201539,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml * return True * else: */ - __Pyx_TraceLine(148,0,__PYX_ERR(21, 148, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_ret == 0) != 0); if (__pyx_t_2) { @@ -217327,7 +201549,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml * else: * return False */ - __Pyx_TraceLine(149,0,__PYX_ERR(21, 149, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; @@ -217349,7 +201570,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml * * @classmethod */ - __Pyx_TraceLine(151,0,__PYX_ERR(21, 151, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); @@ -217375,7 +201595,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XDECREF((PyObject *)__pyx_v_root_node); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -217391,7 +201610,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_6__call__(struct __pyx_obj_4lxml /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_7RelaxNG_9from_rnc_string(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_7RelaxNG_8from_rnc_string[] = "Parse a RelaxNG schema in compact syntax from a text string\n\n Requires the rnc2rng package to be installed.\n\n Passing the source URL or file path of the source as 'base_url'\n will enable resolving resource references relative to the source.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_7RelaxNG_9from_rnc_string = {"from_rnc_string", (PyCFunction)__pyx_pw_4lxml_5etree_7RelaxNG_9from_rnc_string, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_7RelaxNG_8from_rnc_string}; +static PyMethodDef __pyx_mdef_4lxml_5etree_7RelaxNG_9from_rnc_string = {"from_rnc_string", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_7RelaxNG_9from_rnc_string, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_7RelaxNG_8from_rnc_string}; static PyObject *__pyx_pw_4lxml_5etree_7RelaxNG_9from_rnc_string(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_src = 0; PyObject *__pyx_v_base_url = 0; @@ -217458,7 +201677,6 @@ static PyObject *__pyx_pw_4lxml_5etree_7RelaxNG_9from_rnc_string(PyObject *__pyx static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_8from_rnc_string(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_src, PyObject *__pyx_v_base_url) { PyObject *__pyx_v_rng_str = NULL; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -217466,10 +201684,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_8from_rnc_string(PyTypeObject *_ PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__391) __Pyx_RefNannySetupContext("from_rnc_string", 0); - __Pyx_TraceCall("from_rnc_string", __pyx_f[21], 154, 0, __PYX_ERR(21, 154, __pyx_L1_error)); /* "src/lxml/relaxng.pxi":162 * will enable resolving resource references relative to the source. @@ -217478,7 +201693,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_8from_rnc_string(PyTypeObject *_ * rng_str = _rnc2rng.dumps(_rnc2rng.loads(src)) * return cls(_parseMemoryDocument(rng_str, parser=None, url=base_url)) */ - __Pyx_TraceLine(162,0,__PYX_ERR(21, 162, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__require_rnc2rng(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 162, __pyx_L1_error) /* "src/lxml/relaxng.pxi":163 @@ -217487,7 +201701,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_8from_rnc_string(PyTypeObject *_ * rng_str = _rnc2rng.dumps(_rnc2rng.loads(src)) # <<<<<<<<<<<<<< * return cls(_parseMemoryDocument(rng_str, parser=None, url=base_url)) */ - __Pyx_TraceLine(163,0,__PYX_ERR(21, 163, __pyx_L1_error)) __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree__rnc2rng, __pyx_n_s_dumps); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree__rnc2rng, __pyx_n_s_loads); if (unlikely(!__pyx_t_5)) __PYX_ERR(21, 163, __pyx_L1_error) @@ -217502,38 +201715,10 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_8from_rnc_string(PyTypeObject *_ __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_src); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 163, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_src}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 163, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_src}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 163, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(21, 163, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_v_src); - __Pyx_GIVEREF(__pyx_v_src); - PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_src); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 163, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_src) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_src); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 163, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -217545,41 +201730,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_8from_rnc_string(PyTypeObject *_ __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (!__pyx_t_5) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 163, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 163, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 163, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(21, 163, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 163, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - } + __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(21, 163, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_rng_str = __pyx_t_2; __pyx_t_2 = 0; @@ -217589,7 +201744,6 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_8from_rnc_string(PyTypeObject *_ * rng_str = _rnc2rng.dumps(_rnc2rng.loads(src)) * return cls(_parseMemoryDocument(rng_str, parser=None, url=base_url)) # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(164,0,__PYX_ERR(21, 164, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__parseMemoryDocument(__pyx_v_rng_str, __pyx_v_base_url, ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None))); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -217615,13 +201769,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7RelaxNG_8from_rnc_string(PyTypeObject *_ __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("lxml.etree.RelaxNG.from_rnc_string", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_rng_str); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -217652,10 +201804,8 @@ static int __pyx_pw_4lxml_5etree_9XMLSchema_1__cinit__(PyObject *__pyx_v_self, P static int __pyx_pf_4lxml_5etree_9XMLSchema___cinit__(struct __pyx_obj_4lxml_5etree_XMLSchema *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[22], 41, 0, __PYX_ERR(22, 41, __pyx_L1_error)); /* "src/lxml/xmlschema.pxi":42 * @@ -217664,7 +201814,6 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema___cinit__(struct __pyx_obj_4lxml_5et * self._add_attribute_defaults = False * */ - __Pyx_TraceLine(42,0,__PYX_ERR(22, 42, __pyx_L1_error)) __pyx_v_self->_has_default_attributes = 1; /* "src/lxml/xmlschema.pxi":43 @@ -217674,7 +201823,6 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema___cinit__(struct __pyx_obj_4lxml_5et * * def __init__(self, etree=None, *, file=None, bint attribute_defaults=False): */ - __Pyx_TraceLine(43,0,__PYX_ERR(22, 43, __pyx_L1_error)) __pyx_v_self->_add_attribute_defaults = 0; /* "src/lxml/xmlschema.pxi":41 @@ -217687,12 +201835,6 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema___cinit__(struct __pyx_obj_4lxml_5et /* function exit code */ __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.XMLSchema.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -217784,17 +201926,14 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et struct LxmlElement *__pyx_v_root_node = NULL; PyObject *__pyx_v_filename = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; + int __pyx_t_4; int __pyx_t_5; - int __pyx_t_6; - xmlDoc *__pyx_t_7; + xmlDoc *__pyx_t_6; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[22], 45, 0, __PYX_ERR(22, 45, __pyx_L1_error)); /* "src/lxml/xmlschema.pxi":49 * cdef xmlDoc* c_doc @@ -217803,7 +201942,6 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * _Validator.__init__(self) * c_doc = NULL */ - __Pyx_TraceLine(49,0,__PYX_ERR(22, 49, __pyx_L1_error)) __pyx_v_self->_add_attribute_defaults = __pyx_v_attribute_defaults; /* "src/lxml/xmlschema.pxi":50 @@ -217813,7 +201951,6 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * c_doc = NULL * if etree is not None: */ - __Pyx_TraceLine(50,0,__PYX_ERR(22, 50, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree__Validator), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; @@ -217826,38 +201963,10 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 50, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 50, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 50, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 50, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_self)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject *)__pyx_v_self)); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 50, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __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(22, 50, __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; @@ -217868,7 +201977,6 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * if etree is not None: * doc = _documentOrRaise(etree) */ - __Pyx_TraceLine(51,0,__PYX_ERR(22, 51, __pyx_L1_error)) __pyx_v_c_doc = NULL; /* "src/lxml/xmlschema.pxi":52 @@ -217878,10 +201986,9 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * doc = _documentOrRaise(etree) * root_node = _rootNodeOrRaise(etree) */ - __Pyx_TraceLine(52,0,__PYX_ERR(22, 52, __pyx_L1_error)) - __pyx_t_5 = (__pyx_v_etree != Py_None); - __pyx_t_6 = (__pyx_t_5 != 0); - if (__pyx_t_6) { + __pyx_t_4 = (__pyx_v_etree != Py_None); + __pyx_t_5 = (__pyx_t_4 != 0); + if (__pyx_t_5) { /* "src/lxml/xmlschema.pxi":53 * c_doc = NULL @@ -217890,7 +201997,6 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * root_node = _rootNodeOrRaise(etree) * c_doc = _copyDocRoot(doc._c_doc, root_node._c_node) */ - __Pyx_TraceLine(53,0,__PYX_ERR(22, 53, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__documentOrRaise(__pyx_v_etree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_1); @@ -217903,7 +202009,6 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * c_doc = _copyDocRoot(doc._c_doc, root_node._c_node) * self._doc = _documentFactory(c_doc, doc._parser) */ - __Pyx_TraceLine(54,0,__PYX_ERR(22, 54, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__rootNodeOrRaise(__pyx_v_etree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_root_node = ((struct LxmlElement *)__pyx_t_1); @@ -217916,9 +202021,8 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * self._doc = _documentFactory(c_doc, doc._parser) * parser_ctxt = xmlschema.xmlSchemaNewDocParserCtxt(c_doc) */ - __Pyx_TraceLine(55,0,__PYX_ERR(22, 55, __pyx_L1_error)) - __pyx_t_7 = __pyx_f_4lxml_5etree__copyDocRoot(__pyx_v_doc->_c_doc, __pyx_v_root_node->_c_node); if (unlikely(__pyx_t_7 == ((xmlDoc *)NULL))) __PYX_ERR(22, 55, __pyx_L1_error) - __pyx_v_c_doc = __pyx_t_7; + __pyx_t_6 = __pyx_f_4lxml_5etree__copyDocRoot(__pyx_v_doc->_c_doc, __pyx_v_root_node->_c_node); if (unlikely(__pyx_t_6 == ((xmlDoc *)NULL))) __PYX_ERR(22, 55, __pyx_L1_error) + __pyx_v_c_doc = __pyx_t_6; /* "src/lxml/xmlschema.pxi":56 * root_node = _rootNodeOrRaise(etree) @@ -217927,7 +202031,6 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * parser_ctxt = xmlschema.xmlSchemaNewDocParserCtxt(c_doc) * elif file is not None: */ - __Pyx_TraceLine(56,0,__PYX_ERR(22, 56, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_v_doc->_parser); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 56, __pyx_L1_error) @@ -217946,7 +202049,6 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * elif file is not None: * if _isString(file): */ - __Pyx_TraceLine(57,0,__PYX_ERR(22, 57, __pyx_L1_error)) __pyx_v_parser_ctxt = xmlSchemaNewDocParserCtxt(__pyx_v_c_doc); /* "src/lxml/xmlschema.pxi":52 @@ -217966,10 +202068,9 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * if _isString(file): * filename = _encodeFilename(file) */ - __Pyx_TraceLine(58,0,__PYX_ERR(22, 58, __pyx_L1_error)) - __pyx_t_6 = (__pyx_v_file != Py_None); - __pyx_t_5 = (__pyx_t_6 != 0); - if (likely(__pyx_t_5)) { + __pyx_t_5 = (__pyx_v_file != Py_None); + __pyx_t_4 = (__pyx_t_5 != 0); + if (likely(__pyx_t_4)) { /* "src/lxml/xmlschema.pxi":59 * parser_ctxt = xmlschema.xmlSchemaNewDocParserCtxt(c_doc) @@ -217978,9 +202079,8 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * filename = _encodeFilename(file) * parser_ctxt = xmlschema.xmlSchemaNewParserCtxt(_cstr(filename)) */ - __Pyx_TraceLine(59,0,__PYX_ERR(22, 59, __pyx_L1_error)) - __pyx_t_5 = (_isString(__pyx_v_file) != 0); - if (__pyx_t_5) { + __pyx_t_4 = (_isString(__pyx_v_file) != 0); + if (__pyx_t_4) { /* "src/lxml/xmlschema.pxi":60 * elif file is not None: @@ -217989,7 +202089,6 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * parser_ctxt = xmlschema.xmlSchemaNewParserCtxt(_cstr(filename)) * else: */ - __Pyx_TraceLine(60,0,__PYX_ERR(22, 60, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_file); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_filename = __pyx_t_2; @@ -218002,7 +202101,6 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * else: * self._doc = _parseDocument(file, None, None) */ - __Pyx_TraceLine(61,0,__PYX_ERR(22, 61, __pyx_L1_error)) __pyx_v_parser_ctxt = xmlSchemaNewParserCtxt(PyBytes_AS_STRING(__pyx_v_filename)); /* "src/lxml/xmlschema.pxi":59 @@ -218022,7 +202120,6 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * parser_ctxt = xmlschema.xmlSchemaNewDocParserCtxt(self._doc._c_doc) * else: */ - __Pyx_TraceLine(63,0,__PYX_ERR(22, 63, __pyx_L1_error)) /*else*/ { __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__parseDocument(__pyx_v_file, ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None), Py_None)); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -218039,7 +202136,6 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * else: * raise XMLSchemaParseError, u"No tree or file given" */ - __Pyx_TraceLine(64,0,__PYX_ERR(22, 64, __pyx_L1_error)) __pyx_v_parser_ctxt = xmlSchemaNewDocParserCtxt(__pyx_v_self->_doc->_c_doc); } __pyx_L4:; @@ -218061,7 +202157,6 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * * if parser_ctxt is NULL: */ - __Pyx_TraceLine(66,0,__PYX_ERR(22, 66, __pyx_L1_error)) /*else*/ { __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_XMLSchemaParseError), __pyx_kp_u_No_tree_or_file_given, 0, 0); __PYX_ERR(22, 66, __pyx_L1_error) @@ -218075,9 +202170,8 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * raise MemoryError() * */ - __Pyx_TraceLine(68,0,__PYX_ERR(22, 68, __pyx_L1_error)) - __pyx_t_5 = ((__pyx_v_parser_ctxt == NULL) != 0); - if (unlikely(__pyx_t_5)) { + __pyx_t_4 = ((__pyx_v_parser_ctxt == NULL) != 0); + if (unlikely(__pyx_t_4)) { /* "src/lxml/xmlschema.pxi":69 * @@ -218086,7 +202180,6 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * * xmlschema.xmlSchemaSetParserStructuredErrors( */ - __Pyx_TraceLine(69,0,__PYX_ERR(22, 69, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(22, 69, __pyx_L1_error) /* "src/lxml/xmlschema.pxi":68 @@ -218105,7 +202198,6 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * parser_ctxt, _receiveError, self._error_log) * if self._doc is not None: */ - __Pyx_TraceLine(71,0,__PYX_ERR(22, 71, __pyx_L1_error)) xmlSchemaSetParserStructuredErrors(__pyx_v_parser_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log)); /* "src/lxml/xmlschema.pxi":73 @@ -218115,10 +202207,9 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * # calling xmlSchemaParse on a schema with imports or * # includes will cause libxml2 to create an internal */ - __Pyx_TraceLine(73,0,__PYX_ERR(22, 73, __pyx_L1_error)) - __pyx_t_5 = (((PyObject *)__pyx_v_self->_doc) != Py_None); - __pyx_t_6 = (__pyx_t_5 != 0); - if (__pyx_t_6) { + __pyx_t_4 = (((PyObject *)__pyx_v_self->_doc) != Py_None); + __pyx_t_5 = (__pyx_t_4 != 0); + if (__pyx_t_5) { /* "src/lxml/xmlschema.pxi":78 * # context for parsing, so push an implied context to route @@ -218127,7 +202218,6 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * with nogil: * self._c_schema = xmlschema.xmlSchemaParse(parser_ctxt) */ - __Pyx_TraceLine(78,0,__PYX_ERR(22, 78, __pyx_L1_error)) __pyx_t_2 = ((PyObject *)__pyx_v_self->_doc->_parser); __Pyx_INCREF(__pyx_t_2); __pyx_f_4lxml_5etree_24_ParserDictionaryContext_pushImpliedContextFromParser(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_2)); @@ -218149,7 +202239,6 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * self._c_schema = xmlschema.xmlSchemaParse(parser_ctxt) * if self._doc is not None: */ - __Pyx_TraceLine(79,0,__PYX_ERR(22, 79, __pyx_L1_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -218165,7 +202254,6 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * if self._doc is not None: * __GLOBAL_PARSER_CONTEXT.popImpliedContext() */ - __Pyx_TraceLine(80,1,__PYX_ERR(22, 80, __pyx_L8_error)) __pyx_v_self->_c_schema = xmlSchemaParse(__pyx_v_parser_ctxt); } @@ -218176,7 +202264,6 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * self._c_schema = xmlschema.xmlSchemaParse(parser_ctxt) * if self._doc is not None: */ - __Pyx_TraceLine(79,1,__PYX_ERR(22, 79, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -218185,13 +202272,6 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et #endif goto __pyx_L9; } - __pyx_L8_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L1_error; - } __pyx_L9:; } } @@ -218203,10 +202283,9 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * __GLOBAL_PARSER_CONTEXT.popImpliedContext() * xmlschema.xmlSchemaFreeParserCtxt(parser_ctxt) */ - __Pyx_TraceLine(81,0,__PYX_ERR(22, 81, __pyx_L1_error)) - __pyx_t_6 = (((PyObject *)__pyx_v_self->_doc) != Py_None); - __pyx_t_5 = (__pyx_t_6 != 0); - if (__pyx_t_5) { + __pyx_t_5 = (((PyObject *)__pyx_v_self->_doc) != Py_None); + __pyx_t_4 = (__pyx_t_5 != 0); + if (__pyx_t_4) { /* "src/lxml/xmlschema.pxi":82 * self._c_schema = xmlschema.xmlSchemaParse(parser_ctxt) @@ -218215,7 +202294,6 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * xmlschema.xmlSchemaFreeParserCtxt(parser_ctxt) * */ - __Pyx_TraceLine(82,0,__PYX_ERR(22, 82, __pyx_L1_error)) __pyx_f_4lxml_5etree_24_ParserDictionaryContext_popImpliedContext(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT); /* "src/lxml/xmlschema.pxi":81 @@ -218234,7 +202312,6 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * * if self._c_schema is NULL: */ - __Pyx_TraceLine(83,0,__PYX_ERR(22, 83, __pyx_L1_error)) xmlSchemaFreeParserCtxt(__pyx_v_parser_ctxt); /* "src/lxml/xmlschema.pxi":85 @@ -218244,9 +202321,8 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * raise XMLSchemaParseError( * self._error_log._buildExceptionMessage( */ - __Pyx_TraceLine(85,0,__PYX_ERR(22, 85, __pyx_L1_error)) - __pyx_t_5 = ((__pyx_v_self->_c_schema == NULL) != 0); - if (unlikely(__pyx_t_5)) { + __pyx_t_4 = ((__pyx_v_self->_c_schema == NULL) != 0); + if (unlikely(__pyx_t_4)) { /* "src/lxml/xmlschema.pxi":87 * if self._c_schema is NULL: @@ -218255,7 +202331,6 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * u"Document is not valid XML Schema"), * self._error_log) */ - __Pyx_TraceLine(87,0,__PYX_ERR(22, 87, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_self->__pyx_base._error_log), __pyx_kp_u_Document_is_not_valid_XML_Schema); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -218266,7 +202341,6 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * self._error_log._buildExceptionMessage( * u"Document is not valid XML Schema"), */ - __Pyx_TraceLine(86,0,__PYX_ERR(22, 86, __pyx_L1_error)) __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); @@ -218298,10 +202372,9 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * self._has_default_attributes = _check_for_default_attributes(self._doc) * self._add_attribute_defaults = attribute_defaults and self._has_default_attributes */ - __Pyx_TraceLine(91,0,__PYX_ERR(22, 91, __pyx_L1_error)) - __pyx_t_5 = (((PyObject *)__pyx_v_self->_doc) != Py_None); - __pyx_t_6 = (__pyx_t_5 != 0); - if (__pyx_t_6) { + __pyx_t_4 = (((PyObject *)__pyx_v_self->_doc) != Py_None); + __pyx_t_5 = (__pyx_t_4 != 0); + if (__pyx_t_5) { /* "src/lxml/xmlschema.pxi":92 * @@ -218310,54 +202383,25 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * self._add_attribute_defaults = attribute_defaults and self._has_default_attributes * */ - __Pyx_TraceLine(92,0,__PYX_ERR(22, 92, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_4lxml_5etree__check_for_default_attributes)); - __pyx_t_1 = ((PyObject *)__pyx_v_4lxml_5etree__check_for_default_attributes); __pyx_t_4 = NULL; + __pyx_t_1 = ((PyObject *)__pyx_v_4lxml_5etree__check_for_default_attributes); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_4)) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } - if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_v_self->_doc)); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 92, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_1)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_self->_doc)}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 92, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_self->_doc)}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 92, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 92, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_self->_doc)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_doc)); - PyTuple_SET_ITEM(__pyx_t_3, 0+1, ((PyObject *)__pyx_v_self->_doc)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 92, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - } + __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, ((PyObject *)__pyx_v_self->_doc)) : __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_v_self->_doc)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 92, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(22, 92, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(22, 92, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_v_self->_has_default_attributes = __pyx_t_6; + __pyx_v_self->_has_default_attributes = __pyx_t_5; /* "src/lxml/xmlschema.pxi":91 * self._error_log) @@ -218375,17 +202419,16 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et * * def __dealloc__(self): */ - __Pyx_TraceLine(93,0,__PYX_ERR(22, 93, __pyx_L1_error)) - __pyx_t_5 = (__pyx_v_attribute_defaults != 0); - if (__pyx_t_5) { + __pyx_t_4 = (__pyx_v_attribute_defaults != 0); + if (__pyx_t_4) { } else { - __pyx_t_6 = __pyx_t_5; + __pyx_t_5 = __pyx_t_4; goto __pyx_L13_bool_binop_done; } - __pyx_t_5 = (__pyx_v_self->_has_default_attributes != 0); - __pyx_t_6 = __pyx_t_5; + __pyx_t_4 = (__pyx_v_self->_has_default_attributes != 0); + __pyx_t_5 = __pyx_t_4; __pyx_L13_bool_binop_done:; - __pyx_v_self->_add_attribute_defaults = __pyx_t_6; + __pyx_v_self->_add_attribute_defaults = __pyx_t_5; /* "src/lxml/xmlschema.pxi":45 * self._add_attribute_defaults = False @@ -218402,14 +202445,12 @@ static int __pyx_pf_4lxml_5etree_9XMLSchema_2__init__(struct __pyx_obj_4lxml_5et __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("lxml.etree.XMLSchema.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XDECREF((PyObject *)__pyx_v_root_node); __Pyx_XDECREF(__pyx_v_filename); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -218434,10 +202475,8 @@ static void __pyx_pw_4lxml_5etree_9XMLSchema_5__dealloc__(PyObject *__pyx_v_self } static void __pyx_pf_4lxml_5etree_9XMLSchema_4__dealloc__(struct __pyx_obj_4lxml_5etree_XMLSchema *__pyx_v_self) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - __Pyx_TraceCall("__dealloc__", __pyx_f[22], 95, 0, __PYX_ERR(22, 95, __pyx_L1_error)); /* "src/lxml/xmlschema.pxi":96 * @@ -218446,7 +202485,6 @@ static void __pyx_pf_4lxml_5etree_9XMLSchema_4__dealloc__(struct __pyx_obj_4lxml * * def __call__(self, etree): */ - __Pyx_TraceLine(96,0,__PYX_ERR(22, 96, __pyx_L1_error)) xmlSchemaFree(__pyx_v_self->_c_schema); /* "src/lxml/xmlschema.pxi":95 @@ -218458,11 +202496,6 @@ static void __pyx_pf_4lxml_5etree_9XMLSchema_4__dealloc__(struct __pyx_obj_4lxml */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.XMLSchema.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -218535,7 +202568,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx xmlDoc *__pyx_v_c_doc; int __pyx_v_ret; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -218551,7 +202583,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[22], 98, 0, __PYX_ERR(22, 98, __pyx_L1_error)); /* "src/lxml/xmlschema.pxi":111 * cdef int ret @@ -218560,7 +202591,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx * doc = _documentOrRaise(etree) * root_node = _rootNodeOrRaise(etree) */ - __Pyx_TraceLine(111,0,__PYX_ERR(22, 111, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_self->_c_schema != NULL) != 0))) { @@ -218577,7 +202607,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx * root_node = _rootNodeOrRaise(etree) * */ - __Pyx_TraceLine(112,0,__PYX_ERR(22, 112, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__documentOrRaise(__pyx_v_etree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_1); @@ -218590,7 +202619,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx * * valid_ctxt = xmlschema.xmlSchemaNewValidCtxt(self._c_schema) */ - __Pyx_TraceLine(113,0,__PYX_ERR(22, 113, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__rootNodeOrRaise(__pyx_v_etree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_root_node = ((struct LxmlElement *)__pyx_t_1); @@ -218603,7 +202631,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx * if valid_ctxt is NULL: * raise MemoryError() */ - __Pyx_TraceLine(115,0,__PYX_ERR(22, 115, __pyx_L1_error)) __pyx_v_valid_ctxt = xmlSchemaNewValidCtxt(__pyx_v_self->_c_schema); /* "src/lxml/xmlschema.pxi":116 @@ -218613,7 +202640,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx * raise MemoryError() * */ - __Pyx_TraceLine(116,0,__PYX_ERR(22, 116, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_valid_ctxt == NULL) != 0); if (unlikely(__pyx_t_2)) { @@ -218624,7 +202650,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx * * try: */ - __Pyx_TraceLine(117,0,__PYX_ERR(22, 117, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(22, 117, __pyx_L1_error) /* "src/lxml/xmlschema.pxi":116 @@ -218643,7 +202668,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx * if self._add_attribute_defaults: * xmlschema.xmlSchemaSetValidOptions( */ - __Pyx_TraceLine(119,0,__PYX_ERR(22, 119, __pyx_L5_error)) /*try:*/ { /* "src/lxml/xmlschema.pxi":120 @@ -218653,7 +202677,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx * xmlschema.xmlSchemaSetValidOptions( * valid_ctxt, xmlschema.XML_SCHEMA_VAL_VC_I_CREATE) */ - __Pyx_TraceLine(120,0,__PYX_ERR(22, 120, __pyx_L5_error)) __pyx_t_2 = (__pyx_v_self->_add_attribute_defaults != 0); if (__pyx_t_2) { @@ -218664,7 +202687,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx * valid_ctxt, xmlschema.XML_SCHEMA_VAL_VC_I_CREATE) * */ - __Pyx_TraceLine(121,0,__PYX_ERR(22, 121, __pyx_L5_error)) (void)(xmlSchemaSetValidOptions(__pyx_v_valid_ctxt, XML_SCHEMA_VAL_VC_I_CREATE)); /* "src/lxml/xmlschema.pxi":120 @@ -218683,7 +202705,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx * xmlschema.xmlSchemaSetValidStructuredErrors( * valid_ctxt, _receiveError, self._error_log) */ - __Pyx_TraceLine(124,0,__PYX_ERR(22, 124, __pyx_L5_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ErrorLog *)__pyx_v_self->__pyx_base._error_log->__pyx_base.__pyx_base.__pyx_vtab)->clear(__pyx_v_self->__pyx_base._error_log, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 124, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -218695,7 +202716,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx * valid_ctxt, _receiveError, self._error_log) * */ - __Pyx_TraceLine(125,0,__PYX_ERR(22, 125, __pyx_L5_error)) xmlSchemaSetValidStructuredErrors(__pyx_v_valid_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log)); /* "src/lxml/xmlschema.pxi":128 @@ -218705,7 +202725,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx * with nogil: * ret = xmlschema.xmlSchemaValidateDoc(valid_ctxt, c_doc) */ - __Pyx_TraceLine(128,0,__PYX_ERR(22, 128, __pyx_L5_error)) __pyx_t_3 = __pyx_f_4lxml_5etree__fakeRootDoc(__pyx_v_doc->_c_doc, __pyx_v_root_node->_c_node); if (unlikely(__pyx_t_3 == ((xmlDoc *)NULL))) __PYX_ERR(22, 128, __pyx_L5_error) __pyx_v_c_doc = __pyx_t_3; @@ -218716,7 +202735,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx * ret = xmlschema.xmlSchemaValidateDoc(valid_ctxt, c_doc) * _destroyFakeDoc(doc._c_doc, c_doc) */ - __Pyx_TraceLine(129,0,__PYX_ERR(22, 129, __pyx_L5_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -218732,7 +202750,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx * _destroyFakeDoc(doc._c_doc, c_doc) * finally: */ - __Pyx_TraceLine(130,1,__PYX_ERR(22, 130, __pyx_L9_error)) __pyx_v_ret = xmlSchemaValidateDoc(__pyx_v_valid_ctxt, __pyx_v_c_doc); } @@ -218743,7 +202760,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx * ret = xmlschema.xmlSchemaValidateDoc(valid_ctxt, c_doc) * _destroyFakeDoc(doc._c_doc, c_doc) */ - __Pyx_TraceLine(129,1,__PYX_ERR(22, 129, __pyx_L5_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -218752,13 +202768,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx #endif goto __pyx_L10; } - __pyx_L9_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L5_error; - } __pyx_L10:; } } @@ -218770,7 +202779,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx * finally: * xmlschema.xmlSchemaFreeValidCtxt(valid_ctxt) */ - __Pyx_TraceLine(131,0,__PYX_ERR(22, 131, __pyx_L5_error)) __pyx_f_4lxml_5etree__destroyFakeDoc(__pyx_v_doc->_c_doc, __pyx_v_c_doc); } @@ -218781,7 +202789,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx * * if ret == -1: */ - __Pyx_TraceLine(133,0,__PYX_ERR(22, 133, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ xmlSchemaFreeValidCtxt(__pyx_v_valid_ctxt); @@ -218829,7 +202836,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx * raise XMLSchemaValidateError( * u"Internal error in XML Schema validation.", */ - __Pyx_TraceLine(135,0,__PYX_ERR(22, 135, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_ret == -1L) != 0); if (unlikely(__pyx_t_2)) { @@ -218840,7 +202846,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx * u"Internal error in XML Schema validation.", * self._error_log) */ - __Pyx_TraceLine(136,0,__PYX_ERR(22, 136, __pyx_L1_error)) __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_kp_u_Internal_error_in_XML_Schema_val); @@ -218872,7 +202877,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx * return True * else: */ - __Pyx_TraceLine(139,0,__PYX_ERR(22, 139, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_ret == 0) != 0); if (__pyx_t_2) { @@ -218883,7 +202887,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx * else: * return False */ - __Pyx_TraceLine(140,0,__PYX_ERR(22, 140, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; @@ -218905,7 +202908,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx * * cdef _ParserSchemaValidationContext _newSaxValidator( */ - __Pyx_TraceLine(142,0,__PYX_ERR(22, 142, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); @@ -218931,7 +202933,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XDECREF((PyObject *)__pyx_v_root_node); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -218947,13 +202948,11 @@ static PyObject *__pyx_pf_4lxml_5etree_9XMLSchema_6__call__(struct __pyx_obj_4lx static struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *__pyx_f_4lxml_5etree_9XMLSchema__newSaxValidator(struct __pyx_obj_4lxml_5etree_XMLSchema *__pyx_v_self, int __pyx_v_add_default_attributes) { struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *__pyx_v_context = 0; struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("_newSaxValidator", 0); - __Pyx_TraceCall("_newSaxValidator", __pyx_f[22], 144, 0, __PYX_ERR(22, 144, __pyx_L1_error)); /* "src/lxml/xmlschema.pxi":147 * self, bint add_default_attributes): @@ -218962,7 +202961,6 @@ static struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *__pyx_f_4lx * context._schema = self * context._add_default_attributes = (self._has_default_attributes and ( */ - __Pyx_TraceLine(147,0,__PYX_ERR(22, 147, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_tp_new_4lxml_5etree__ParserSchemaValidationContext(((PyTypeObject *)__pyx_ptype_4lxml_5etree__ParserSchemaValidationContext), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 147, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *)__pyx_t_1); @@ -218975,7 +202973,6 @@ static struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *__pyx_f_4lx * context._add_default_attributes = (self._has_default_attributes and ( * add_default_attributes or self._add_attribute_defaults)) */ - __Pyx_TraceLine(148,0,__PYX_ERR(22, 148, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); __Pyx_GOTREF(__pyx_v_context->_schema); @@ -218989,7 +202986,6 @@ static struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *__pyx_f_4lx * add_default_attributes or self._add_attribute_defaults)) * return context */ - __Pyx_TraceLine(149,0,__PYX_ERR(22, 149, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_self->_has_default_attributes != 0); if (__pyx_t_3) { } else { @@ -219004,7 +203000,6 @@ static struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *__pyx_f_4lx * return context * */ - __Pyx_TraceLine(150,0,__PYX_ERR(22, 150, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_add_default_attributes != 0); if (!__pyx_t_3) { } else { @@ -219022,7 +203017,6 @@ static struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *__pyx_f_4lx * add_default_attributes or self._add_attribute_defaults)) * return context */ - __Pyx_TraceLine(149,0,__PYX_ERR(22, 149, __pyx_L1_error)) __pyx_v_context->_add_default_attributes = __pyx_t_2; /* "src/lxml/xmlschema.pxi":151 @@ -219032,7 +203026,6 @@ static struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *__pyx_f_4lx * * @cython.final */ - __Pyx_TraceLine(151,0,__PYX_ERR(22, 151, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_context)); __pyx_r = __pyx_v_context; @@ -219054,7 +203047,6 @@ static struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *__pyx_f_4lx __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_context); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -219085,10 +203077,8 @@ static int __pyx_pw_4lxml_5etree_30_ParserSchemaValidationContext_1__cinit__(PyO static int __pyx_pf_4lxml_5etree_30_ParserSchemaValidationContext___cinit__(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[22], 160, 0, __PYX_ERR(22, 160, __pyx_L1_error)); /* "src/lxml/xmlschema.pxi":161 * cdef bint _add_default_attributes @@ -219097,7 +203087,6 @@ static int __pyx_pf_4lxml_5etree_30_ParserSchemaValidationContext___cinit__(stru * self._sax_plug = NULL * self._add_default_attributes = False */ - __Pyx_TraceLine(161,0,__PYX_ERR(22, 161, __pyx_L1_error)) __pyx_v_self->_valid_ctxt = NULL; /* "src/lxml/xmlschema.pxi":162 @@ -219107,7 +203096,6 @@ static int __pyx_pf_4lxml_5etree_30_ParserSchemaValidationContext___cinit__(stru * self._add_default_attributes = False * */ - __Pyx_TraceLine(162,0,__PYX_ERR(22, 162, __pyx_L1_error)) __pyx_v_self->_sax_plug = NULL; /* "src/lxml/xmlschema.pxi":163 @@ -219117,7 +203105,6 @@ static int __pyx_pf_4lxml_5etree_30_ParserSchemaValidationContext___cinit__(stru * * def __dealloc__(self): */ - __Pyx_TraceLine(163,0,__PYX_ERR(22, 163, __pyx_L1_error)) __pyx_v_self->_add_default_attributes = 0; /* "src/lxml/xmlschema.pxi":160 @@ -219130,12 +203117,6 @@ static int __pyx_pf_4lxml_5etree_30_ParserSchemaValidationContext___cinit__(stru /* function exit code */ __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree._ParserSchemaValidationContext.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -219160,11 +203141,9 @@ static void __pyx_pw_4lxml_5etree_30_ParserSchemaValidationContext_3__dealloc__( } static void __pyx_pf_4lxml_5etree_30_ParserSchemaValidationContext_2__dealloc__(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *__pyx_v_self) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__dealloc__", 0); - __Pyx_TraceCall("__dealloc__", __pyx_f[22], 165, 0, __PYX_ERR(22, 165, __pyx_L1_error)); /* "src/lxml/xmlschema.pxi":166 * @@ -219173,7 +203152,6 @@ static void __pyx_pf_4lxml_5etree_30_ParserSchemaValidationContext_2__dealloc__( * if self._valid_ctxt: * xmlschema.xmlSchemaFreeValidCtxt(self._valid_ctxt) */ - __Pyx_TraceLine(166,0,__PYX_ERR(22, 166, __pyx_L1_error)) __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_disconnect(__pyx_v_self); /* "src/lxml/xmlschema.pxi":167 @@ -219183,7 +203161,6 @@ static void __pyx_pf_4lxml_5etree_30_ParserSchemaValidationContext_2__dealloc__( * xmlschema.xmlSchemaFreeValidCtxt(self._valid_ctxt) * */ - __Pyx_TraceLine(167,0,__PYX_ERR(22, 167, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_valid_ctxt != 0); if (__pyx_t_1) { @@ -219194,7 +203171,6 @@ static void __pyx_pf_4lxml_5etree_30_ParserSchemaValidationContext_2__dealloc__( * * cdef _ParserSchemaValidationContext copy(self): */ - __Pyx_TraceLine(168,0,__PYX_ERR(22, 168, __pyx_L1_error)) xmlSchemaFreeValidCtxt(__pyx_v_self->_valid_ctxt); /* "src/lxml/xmlschema.pxi":167 @@ -219215,11 +203191,6 @@ static void __pyx_pf_4lxml_5etree_30_ParserSchemaValidationContext_2__dealloc__( */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._ParserSchemaValidationContext.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -219233,12 +203204,10 @@ static void __pyx_pf_4lxml_5etree_30_ParserSchemaValidationContext_2__dealloc__( static struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_copy(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *__pyx_v_self) { struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("copy", 0); - __Pyx_TraceCall("copy", __pyx_f[22], 170, 0, __PYX_ERR(22, 170, __pyx_L1_error)); /* "src/lxml/xmlschema.pxi":171 * @@ -219247,7 +203216,6 @@ static struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *__pyx_f_4lx * return self._schema._newSaxValidator( * self._add_default_attributes) */ - __Pyx_TraceLine(171,0,__PYX_ERR(22, 171, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_1 = (((PyObject *)__pyx_v_self->_schema) != Py_None); @@ -219265,7 +203233,6 @@ static struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *__pyx_f_4lx * self._add_default_attributes) * */ - __Pyx_TraceLine(172,0,__PYX_ERR(22, 172, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); /* "src/lxml/xmlschema.pxi":173 @@ -219275,7 +203242,6 @@ static struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *__pyx_f_4lx * * cdef void inject_default_attributes(self, xmlDoc* c_doc): */ - __Pyx_TraceLine(173,0,__PYX_ERR(22, 173, __pyx_L1_error)) __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree_XMLSchema *)__pyx_v_self->_schema->__pyx_base.__pyx_vtab)->_newSaxValidator(__pyx_v_self->_schema, __pyx_v_self->_add_default_attributes)); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *)__pyx_t_2); @@ -219297,7 +203263,6 @@ static struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *__pyx_f_4lx __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -219311,11 +203276,9 @@ static struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *__pyx_f_4lx */ static void __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_inject_default_attributes(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *__pyx_v_self, xmlDoc *__pyx_v_c_doc) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("inject_default_attributes", 0); - __Pyx_TraceCall("inject_default_attributes", __pyx_f[22], 175, 0, __PYX_ERR(22, 175, __pyx_L1_error)); /* "src/lxml/xmlschema.pxi":179 * # after parsing, as libxml2 does not support this at parse @@ -219324,7 +203287,6 @@ static void __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_inject_default * with nogil: * xmlschema.xmlSchemaValidateDoc(self._valid_ctxt, c_doc) */ - __Pyx_TraceLine(179,0,__PYX_ERR(22, 179, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_add_default_attributes != 0); if (__pyx_t_1) { @@ -219335,7 +203297,6 @@ static void __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_inject_default * xmlschema.xmlSchemaValidateDoc(self._valid_ctxt, c_doc) * */ - __Pyx_TraceLine(180,0,__PYX_ERR(22, 180, __pyx_L1_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -219351,7 +203312,6 @@ static void __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_inject_default * * cdef int connect(self, xmlparser.xmlParserCtxt* c_ctxt, _BaseErrorLog error_log) except -1: */ - __Pyx_TraceLine(181,1,__PYX_ERR(22, 181, __pyx_L5_error)) (void)(xmlSchemaValidateDoc(__pyx_v_self->_valid_ctxt, __pyx_v_c_doc)); } @@ -219362,7 +203322,6 @@ static void __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_inject_default * xmlschema.xmlSchemaValidateDoc(self._valid_ctxt, c_doc) * */ - __Pyx_TraceLine(180,1,__PYX_ERR(22, 180, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -219371,13 +203330,6 @@ static void __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_inject_default #endif goto __pyx_L6; } - __pyx_L5_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L1_error; - } __pyx_L6:; } } @@ -219400,11 +203352,6 @@ static void __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_inject_default */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._ParserSchemaValidationContext.inject_default_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -219418,12 +203365,10 @@ static void __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_inject_default static int __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_connect(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *__pyx_v_self, xmlParserCtxt *__pyx_v_c_ctxt, struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_v_error_log) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("connect", 0); - __Pyx_TraceCall("connect", __pyx_f[22], 183, 0, __PYX_ERR(22, 183, __pyx_L1_error)); /* "src/lxml/xmlschema.pxi":184 * @@ -219432,7 +203377,6 @@ static int __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_connect(struct * self._valid_ctxt = xmlschema.xmlSchemaNewValidCtxt( * self._schema._c_schema) */ - __Pyx_TraceLine(184,0,__PYX_ERR(22, 184, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_valid_ctxt == NULL) != 0); if (__pyx_t_1) { @@ -219443,7 +203387,6 @@ static int __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_connect(struct * self._schema._c_schema) * if self._valid_ctxt is NULL: */ - __Pyx_TraceLine(185,0,__PYX_ERR(22, 185, __pyx_L1_error)) __pyx_v_self->_valid_ctxt = xmlSchemaNewValidCtxt(__pyx_v_self->_schema->_c_schema); /* "src/lxml/xmlschema.pxi":187 @@ -219453,7 +203396,6 @@ static int __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_connect(struct * raise MemoryError() * if self._add_default_attributes: */ - __Pyx_TraceLine(187,0,__PYX_ERR(22, 187, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_valid_ctxt == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -219464,7 +203406,6 @@ static int __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_connect(struct * if self._add_default_attributes: * xmlschema.xmlSchemaSetValidOptions( */ - __Pyx_TraceLine(188,0,__PYX_ERR(22, 188, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(22, 188, __pyx_L1_error) /* "src/lxml/xmlschema.pxi":187 @@ -219483,7 +203424,6 @@ static int __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_connect(struct * xmlschema.xmlSchemaSetValidOptions( * self._valid_ctxt, xmlschema.XML_SCHEMA_VAL_VC_I_CREATE) */ - __Pyx_TraceLine(189,0,__PYX_ERR(22, 189, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_add_default_attributes != 0); if (__pyx_t_1) { @@ -219494,7 +203434,6 @@ static int __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_connect(struct * self._valid_ctxt, xmlschema.XML_SCHEMA_VAL_VC_I_CREATE) * if error_log is not None: */ - __Pyx_TraceLine(190,0,__PYX_ERR(22, 190, __pyx_L1_error)) (void)(xmlSchemaSetValidOptions(__pyx_v_self->_valid_ctxt, XML_SCHEMA_VAL_VC_I_CREATE)); /* "src/lxml/xmlschema.pxi":189 @@ -219522,7 +203461,6 @@ static int __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_connect(struct * xmlschema.xmlSchemaSetValidStructuredErrors( * self._valid_ctxt, _receiveError, error_log) */ - __Pyx_TraceLine(192,0,__PYX_ERR(22, 192, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_error_log) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -219534,7 +203472,6 @@ static int __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_connect(struct * self._valid_ctxt, _receiveError, error_log) * self._sax_plug = xmlschema.xmlSchemaSAXPlug( */ - __Pyx_TraceLine(193,0,__PYX_ERR(22, 193, __pyx_L1_error)) xmlSchemaSetValidStructuredErrors(__pyx_v_self->_valid_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_error_log)); /* "src/lxml/xmlschema.pxi":192 @@ -219553,7 +203490,6 @@ static int __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_connect(struct * self._valid_ctxt, &c_ctxt.sax, &c_ctxt.userData) * */ - __Pyx_TraceLine(195,0,__PYX_ERR(22, 195, __pyx_L1_error)) __pyx_v_self->_sax_plug = xmlSchemaSAXPlug(__pyx_v_self->_valid_ctxt, (&__pyx_v_c_ctxt->sax), (&__pyx_v_c_ctxt->userData)); /* "src/lxml/xmlschema.pxi":183 @@ -219571,7 +203507,6 @@ static int __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_connect(struct __Pyx_AddTraceback("lxml.etree._ParserSchemaValidationContext.connect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -219585,11 +203520,9 @@ static int __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_connect(struct */ static void __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_disconnect(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *__pyx_v_self) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("disconnect", 0); - __Pyx_TraceCall("disconnect", __pyx_f[22], 198, 0, __PYX_ERR(22, 198, __pyx_L1_error)); /* "src/lxml/xmlschema.pxi":199 * @@ -219598,7 +203531,6 @@ static void __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_disconnect(str * xmlschema.xmlSchemaSAXUnplug(self._sax_plug) * self._sax_plug = NULL */ - __Pyx_TraceLine(199,0,__PYX_ERR(22, 199, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_sax_plug != NULL) != 0); if (__pyx_t_1) { @@ -219609,7 +203541,6 @@ static void __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_disconnect(str * self._sax_plug = NULL * if self._valid_ctxt is not NULL: */ - __Pyx_TraceLine(200,0,__PYX_ERR(22, 200, __pyx_L1_error)) (void)(xmlSchemaSAXUnplug(__pyx_v_self->_sax_plug)); /* "src/lxml/xmlschema.pxi":201 @@ -219619,7 +203550,6 @@ static void __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_disconnect(str * if self._valid_ctxt is not NULL: * xmlschema.xmlSchemaSetValidStructuredErrors( */ - __Pyx_TraceLine(201,0,__PYX_ERR(22, 201, __pyx_L1_error)) __pyx_v_self->_sax_plug = NULL; /* "src/lxml/xmlschema.pxi":199 @@ -219638,7 +203568,6 @@ static void __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_disconnect(str * xmlschema.xmlSchemaSetValidStructuredErrors( * self._valid_ctxt, NULL, NULL) */ - __Pyx_TraceLine(202,0,__PYX_ERR(22, 202, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_valid_ctxt != NULL) != 0); if (__pyx_t_1) { @@ -219649,7 +203578,6 @@ static void __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_disconnect(str * self._valid_ctxt, NULL, NULL) * */ - __Pyx_TraceLine(203,0,__PYX_ERR(22, 203, __pyx_L1_error)) xmlSchemaSetValidStructuredErrors(__pyx_v_self->_valid_ctxt, NULL, NULL); /* "src/lxml/xmlschema.pxi":202 @@ -219670,11 +203598,6 @@ static void __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_disconnect(str */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._ParserSchemaValidationContext.disconnect", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -219688,11 +203611,9 @@ static void __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_disconnect(str static int __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_isvalid(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("isvalid", 0); - __Pyx_TraceCall("isvalid", __pyx_f[22], 206, 0, __PYX_ERR(22, 206, __pyx_L1_error)); /* "src/lxml/xmlschema.pxi":207 * @@ -219701,7 +203622,6 @@ static int __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_isvalid(struct * return 1 # valid * return xmlschema.xmlSchemaIsValid(self._valid_ctxt) */ - __Pyx_TraceLine(207,0,__PYX_ERR(22, 207, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_valid_ctxt == NULL) != 0); if (__pyx_t_1) { @@ -219711,7 +203631,6 @@ static int __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_isvalid(struct * return 1 # valid # <<<<<<<<<<<<<< * return xmlschema.xmlSchemaIsValid(self._valid_ctxt) */ - __Pyx_TraceLine(208,0,__PYX_ERR(22, 208, __pyx_L1_error)) __pyx_r = 1; goto __pyx_L0; @@ -219729,7 +203648,6 @@ static int __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_isvalid(struct * return 1 # valid * return xmlschema.xmlSchemaIsValid(self._valid_ctxt) # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(209,0,__PYX_ERR(22, 209, __pyx_L1_error)) __pyx_r = xmlSchemaIsValid(__pyx_v_self->_valid_ctxt); goto __pyx_L0; @@ -219742,11 +203660,7 @@ static int __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_isvalid(struct */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree._ParserSchemaValidationContext.isvalid", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -219777,10 +203691,8 @@ static int __pyx_pw_4lxml_5etree_10Schematron_1__cinit__(PyObject *__pyx_v_self, static int __pyx_pf_4lxml_5etree_10Schematron___cinit__(struct __pyx_obj_4lxml_5etree_Schematron *__pyx_v_self) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_TraceCall("__cinit__", __pyx_f[23], 72, 0, __PYX_ERR(23, 72, __pyx_L1_error)); /* "src/lxml/schematron.pxi":73 * cdef xmlDoc* _c_schema_doc @@ -219789,7 +203701,6 @@ static int __pyx_pf_4lxml_5etree_10Schematron___cinit__(struct __pyx_obj_4lxml_5 * self._c_schema_doc = NULL * */ - __Pyx_TraceLine(73,0,__PYX_ERR(23, 73, __pyx_L1_error)) __pyx_v_self->_c_schema = NULL; /* "src/lxml/schematron.pxi":74 @@ -219799,7 +203710,6 @@ static int __pyx_pf_4lxml_5etree_10Schematron___cinit__(struct __pyx_obj_4lxml_5 * * def __init__(self, etree=None, *, file=None): */ - __Pyx_TraceLine(74,0,__PYX_ERR(23, 74, __pyx_L1_error)) __pyx_v_self->_c_schema_doc = NULL; /* "src/lxml/schematron.pxi":72 @@ -219812,12 +203722,6 @@ static int __pyx_pf_4lxml_5etree_10Schematron___cinit__(struct __pyx_obj_4lxml_5 /* function exit code */ __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("lxml.etree.Schematron.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -219900,26 +203804,23 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 xmlSchematronParserCtxt *__pyx_v_parser_ctxt; PyObject *__pyx_v_filename = NULL; int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; + int __pyx_t_4; int __pyx_t_5; - int __pyx_t_6; - xmlDoc *__pyx_t_7; - PyObject *__pyx_t_8 = NULL; - int __pyx_t_9; + xmlDoc *__pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; - PyObject *__pyx_t_12 = NULL; - PyObject *__pyx_t_13 = NULL; - int __pyx_t_14; - char const *__pyx_t_15; - PyObject *__pyx_t_16 = NULL; + int __pyx_t_12; + char const *__pyx_t_13; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[23], 76, 0, __PYX_ERR(23, 76, __pyx_L1_error)); /* "src/lxml/schematron.pxi":81 * cdef xmlNode* c_node @@ -219928,7 +203829,6 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * _Validator.__init__(self) * if not config.ENABLE_SCHEMATRON: */ - __Pyx_TraceLine(81,0,__PYX_ERR(23, 81, __pyx_L1_error)) __pyx_v_parser_ctxt = NULL; /* "src/lxml/schematron.pxi":82 @@ -219938,7 +203838,6 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * if not config.ENABLE_SCHEMATRON: * raise SchematronError, \ */ - __Pyx_TraceLine(82,0,__PYX_ERR(23, 82, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree__Validator), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(23, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; @@ -219951,38 +203850,10 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 82, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 82, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 82, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(23, 82, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_self)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject *)__pyx_v_self)); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 82, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __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(23, 82, __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; @@ -219993,9 +203864,8 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * raise SchematronError, \ * u"lxml.etree was compiled without Schematron support." */ - __Pyx_TraceLine(83,0,__PYX_ERR(23, 83, __pyx_L1_error)) - __pyx_t_5 = ((!(ENABLE_SCHEMATRON != 0)) != 0); - if (unlikely(__pyx_t_5)) { + __pyx_t_4 = ((!(ENABLE_SCHEMATRON != 0)) != 0); + if (unlikely(__pyx_t_4)) { /* "src/lxml/schematron.pxi":84 * _Validator.__init__(self) @@ -220004,7 +203874,6 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * u"lxml.etree was compiled without Schematron support." * if etree is not None: */ - __Pyx_TraceLine(84,0,__PYX_ERR(23, 84, __pyx_L1_error)) __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_SchematronError), __pyx_kp_u_lxml_etree_was_compiled_without, 0, 0); __PYX_ERR(23, 84, __pyx_L1_error) @@ -220024,10 +203893,9 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * doc = _documentOrRaise(etree) * root_node = _rootNodeOrRaise(etree) */ - __Pyx_TraceLine(86,0,__PYX_ERR(23, 86, __pyx_L1_error)) - __pyx_t_5 = (__pyx_v_etree != Py_None); - __pyx_t_6 = (__pyx_t_5 != 0); - if (__pyx_t_6) { + __pyx_t_4 = (__pyx_v_etree != Py_None); + __pyx_t_5 = (__pyx_t_4 != 0); + if (__pyx_t_5) { /* "src/lxml/schematron.pxi":87 * u"lxml.etree was compiled without Schematron support." @@ -220036,7 +203904,6 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * root_node = _rootNodeOrRaise(etree) * self._c_schema_doc = _copyDocRoot(doc._c_doc, root_node._c_node) */ - __Pyx_TraceLine(87,0,__PYX_ERR(23, 87, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__documentOrRaise(__pyx_v_etree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_1); @@ -220049,7 +203916,6 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * self._c_schema_doc = _copyDocRoot(doc._c_doc, root_node._c_node) * parser_ctxt = schematron.xmlSchematronNewDocParserCtxt(self._c_schema_doc) */ - __Pyx_TraceLine(88,0,__PYX_ERR(23, 88, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__rootNodeOrRaise(__pyx_v_etree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_root_node = ((struct LxmlElement *)__pyx_t_1); @@ -220062,9 +203928,8 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * parser_ctxt = schematron.xmlSchematronNewDocParserCtxt(self._c_schema_doc) * elif file is not None: */ - __Pyx_TraceLine(89,0,__PYX_ERR(23, 89, __pyx_L1_error)) - __pyx_t_7 = __pyx_f_4lxml_5etree__copyDocRoot(__pyx_v_doc->_c_doc, __pyx_v_root_node->_c_node); if (unlikely(__pyx_t_7 == ((xmlDoc *)NULL))) __PYX_ERR(23, 89, __pyx_L1_error) - __pyx_v_self->_c_schema_doc = __pyx_t_7; + __pyx_t_6 = __pyx_f_4lxml_5etree__copyDocRoot(__pyx_v_doc->_c_doc, __pyx_v_root_node->_c_node); if (unlikely(__pyx_t_6 == ((xmlDoc *)NULL))) __PYX_ERR(23, 89, __pyx_L1_error) + __pyx_v_self->_c_schema_doc = __pyx_t_6; /* "src/lxml/schematron.pxi":90 * root_node = _rootNodeOrRaise(etree) @@ -220073,7 +203938,6 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * elif file is not None: * filename = _getFilenameForFile(file) */ - __Pyx_TraceLine(90,0,__PYX_ERR(23, 90, __pyx_L1_error)) __pyx_v_parser_ctxt = xmlSchematronNewDocParserCtxt(__pyx_v_self->_c_schema_doc); /* "src/lxml/schematron.pxi":86 @@ -220093,10 +203957,9 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * filename = _getFilenameForFile(file) * if filename is None: */ - __Pyx_TraceLine(91,0,__PYX_ERR(23, 91, __pyx_L1_error)) - __pyx_t_6 = (__pyx_v_file != Py_None); - __pyx_t_5 = (__pyx_t_6 != 0); - if (likely(__pyx_t_5)) { + __pyx_t_5 = (__pyx_v_file != Py_None); + __pyx_t_4 = (__pyx_t_5 != 0); + if (likely(__pyx_t_4)) { /* "src/lxml/schematron.pxi":92 * parser_ctxt = schematron.xmlSchematronNewDocParserCtxt(self._c_schema_doc) @@ -220105,7 +203968,6 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * if filename is None: * # XXX assume a string object */ - __Pyx_TraceLine(92,0,__PYX_ERR(23, 92, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__getFilenameForFile(__pyx_v_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_filename = __pyx_t_1; @@ -220118,10 +203980,9 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * # XXX assume a string object * filename = file */ - __Pyx_TraceLine(93,0,__PYX_ERR(23, 93, __pyx_L1_error)) - __pyx_t_5 = (__pyx_v_filename == Py_None); - __pyx_t_6 = (__pyx_t_5 != 0); - if (__pyx_t_6) { + __pyx_t_4 = (__pyx_v_filename == Py_None); + __pyx_t_5 = (__pyx_t_4 != 0); + if (__pyx_t_5) { /* "src/lxml/schematron.pxi":95 * if filename is None: @@ -220130,7 +203991,6 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * filename = _encodeFilename(filename) * with self._error_log: */ - __Pyx_TraceLine(95,0,__PYX_ERR(23, 95, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_file); __Pyx_DECREF_SET(__pyx_v_filename, __pyx_v_file); @@ -220150,7 +204010,6 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * with self._error_log: * parser_ctxt = schematron.xmlSchematronNewParserCtxt(_cstr(filename)) */ - __Pyx_TraceLine(96,0,__PYX_ERR(23, 96, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_1); @@ -220163,19 +204022,13 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * parser_ctxt = schematron.xmlSchematronNewParserCtxt(_cstr(filename)) * else: */ - __Pyx_TraceLine(97,0,__PYX_ERR(23, 97, __pyx_L1_error)) /*with:*/ { - __pyx_t_8 = __Pyx_PyObject_LookupSpecial(((PyObject *)__pyx_v_self->__pyx_base._error_log), __pyx_n_s_exit); if (unlikely(!__pyx_t_8)) __PYX_ERR(23, 97, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = __pyx_f_4lxml_5etree_9_ErrorLog___enter__(__pyx_v_self->__pyx_base._error_log); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(23, 97, __pyx_L6_error) + __pyx_t_7 = __Pyx_PyObject_LookupSpecial(((PyObject *)__pyx_v_self->__pyx_base._error_log), __pyx_n_s_exit); if (unlikely(!__pyx_t_7)) __PYX_ERR(23, 97, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __pyx_f_4lxml_5etree_9_ErrorLog___enter__(__pyx_v_self->__pyx_base._error_log); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(23, 97, __pyx_L6_error) /*try:*/ { { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_12); + (void)__pyx_t_9; (void)__pyx_t_10; (void)__pyx_t_11; /* mark used */ /*try:*/ { /* "src/lxml/schematron.pxi":98 @@ -220185,7 +204038,6 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * else: * raise SchematronParseError, u"No tree or file given" */ - __Pyx_TraceLine(98,0,__PYX_ERR(23, 98, __pyx_L10_error)) __pyx_v_parser_ctxt = xmlSchematronNewParserCtxt(PyBytes_AS_STRING(__pyx_v_filename)); /* "src/lxml/schematron.pxi":97 @@ -220196,77 +204048,26 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * else: */ } - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - goto __pyx_L15_try_end; - __pyx_L10_error:; - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /*except:*/ { - __Pyx_AddTraceback("lxml.etree.Schematron.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_4) < 0) __PYX_ERR(23, 97, __pyx_L12_except_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_t_2); - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(23, 97, __pyx_L12_except_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_13)) __PYX_ERR(23, 97, __pyx_L12_except_error) - __Pyx_GOTREF(__pyx_t_13); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_13); - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - if (__pyx_t_6 < 0) __PYX_ERR(23, 97, __pyx_L12_except_error) - __pyx_t_5 = ((!(__pyx_t_6 != 0)) != 0); - if (__pyx_t_5) { - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_2); - __Pyx_XGIVEREF(__pyx_t_4); - __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_2, __pyx_t_4); - __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_4 = 0; - __PYX_ERR(23, 97, __pyx_L12_except_error) - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - goto __pyx_L11_exception_handled; - } - __pyx_L12_except_error:; - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); - goto __pyx_L1_error; - __pyx_L11_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); - __pyx_L15_try_end:; } } /*finally:*/ { /*normal exit:*/{ - if (__pyx_t_8) { - __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__392, NULL); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(23, 97, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (__pyx_t_7) { + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__56, NULL); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(23, 97, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } goto __pyx_L9; } __pyx_L9:; } - goto __pyx_L19; + goto __pyx_L16; __pyx_L6_error:; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L1_error; - __pyx_L19:; + __pyx_L16:; } /* "src/lxml/schematron.pxi":91 @@ -220286,7 +204087,6 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * * if parser_ctxt is NULL: */ - __Pyx_TraceLine(100,0,__PYX_ERR(23, 100, __pyx_L1_error)) /*else*/ { __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_SchematronParseError), __pyx_kp_u_No_tree_or_file_given, 0, 0); __PYX_ERR(23, 100, __pyx_L1_error) @@ -220300,7 +204100,6 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * if self._c_schema_doc is not NULL: * tree.xmlFreeDoc(self._c_schema_doc) */ - __Pyx_TraceLine(102,0,__PYX_ERR(23, 102, __pyx_L1_error)) __pyx_t_5 = ((__pyx_v_parser_ctxt == NULL) != 0); if (__pyx_t_5) { @@ -220311,7 +204110,6 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * tree.xmlFreeDoc(self._c_schema_doc) * self._c_schema_doc = NULL */ - __Pyx_TraceLine(103,0,__PYX_ERR(23, 103, __pyx_L1_error)) __pyx_t_5 = ((__pyx_v_self->_c_schema_doc != NULL) != 0); if (__pyx_t_5) { @@ -220322,7 +204120,6 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * self._c_schema_doc = NULL * raise MemoryError() */ - __Pyx_TraceLine(104,0,__PYX_ERR(23, 104, __pyx_L1_error)) xmlFreeDoc(__pyx_v_self->_c_schema_doc); /* "src/lxml/schematron.pxi":105 @@ -220332,7 +204129,6 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * raise MemoryError() * */ - __Pyx_TraceLine(105,0,__PYX_ERR(23, 105, __pyx_L1_error)) __pyx_v_self->_c_schema_doc = NULL; /* "src/lxml/schematron.pxi":103 @@ -220351,7 +204147,6 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * * try: */ - __Pyx_TraceLine(106,0,__PYX_ERR(23, 106, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(23, 106, __pyx_L1_error) /* "src/lxml/schematron.pxi":102 @@ -220370,7 +204165,6 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * with self._error_log: * self._c_schema = schematron.xmlSchematronParse(parser_ctxt) */ - __Pyx_TraceLine(108,0,__PYX_ERR(23, 108, __pyx_L23_error)) /*try:*/ { /* "src/lxml/schematron.pxi":109 @@ -220380,19 +204174,13 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * self._c_schema = schematron.xmlSchematronParse(parser_ctxt) * finally: */ - __Pyx_TraceLine(109,0,__PYX_ERR(23, 109, __pyx_L23_error)) /*with:*/ { - __pyx_t_8 = __Pyx_PyObject_LookupSpecial(((PyObject *)__pyx_v_self->__pyx_base._error_log), __pyx_n_s_exit); if (unlikely(!__pyx_t_8)) __PYX_ERR(23, 109, __pyx_L23_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = __pyx_f_4lxml_5etree_9_ErrorLog___enter__(__pyx_v_self->__pyx_base._error_log); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(23, 109, __pyx_L25_error) + __pyx_t_7 = __Pyx_PyObject_LookupSpecial(((PyObject *)__pyx_v_self->__pyx_base._error_log), __pyx_n_s_exit); if (unlikely(!__pyx_t_7)) __PYX_ERR(23, 109, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __pyx_f_4lxml_5etree_9_ErrorLog___enter__(__pyx_v_self->__pyx_base._error_log); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(23, 109, __pyx_L22_error) /*try:*/ { { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_10); + (void)__pyx_t_11; (void)__pyx_t_10; (void)__pyx_t_9; /* mark used */ /*try:*/ { /* "src/lxml/schematron.pxi":110 @@ -220402,7 +204190,6 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * finally: * schematron.xmlSchematronFreeParserCtxt(parser_ctxt) */ - __Pyx_TraceLine(110,0,__PYX_ERR(23, 110, __pyx_L29_error)) __pyx_v_self->_c_schema = xmlSchematronParse(__pyx_v_parser_ctxt); /* "src/lxml/schematron.pxi":109 @@ -220413,77 +204200,26 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * finally: */ } - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - goto __pyx_L34_try_end; - __pyx_L29_error:; - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /*except:*/ { - __Pyx_AddTraceback("lxml.etree.Schematron.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(23, 109, __pyx_L31_except_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GOTREF(__pyx_t_2); - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_Pack(3, __pyx_t_4, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(23, 109, __pyx_L31_except_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_13)) __PYX_ERR(23, 109, __pyx_L31_except_error) - __Pyx_GOTREF(__pyx_t_13); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_13); - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - if (__pyx_t_5 < 0) __PYX_ERR(23, 109, __pyx_L31_except_error) - __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0); - if (__pyx_t_6) { - __Pyx_GIVEREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_2); - __Pyx_XGIVEREF(__pyx_t_1); - __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_2, __pyx_t_1); - __pyx_t_4 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; - __PYX_ERR(23, 109, __pyx_L31_except_error) - } - __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; - goto __pyx_L30_exception_handled; - } - __pyx_L31_except_error:; - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10); - goto __pyx_L23_error; - __pyx_L30_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10); - __pyx_L34_try_end:; } } /*finally:*/ { /*normal exit:*/{ - if (__pyx_t_8) { - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__393, NULL); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_10)) __PYX_ERR(23, 109, __pyx_L23_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (__pyx_t_7) { + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__56, NULL); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(23, 109, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } - goto __pyx_L28; + goto __pyx_L25; } - __pyx_L28:; + __pyx_L25:; } - goto __pyx_L38; - __pyx_L25_error:; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - goto __pyx_L23_error; - __pyx_L38:; + goto __pyx_L32; + __pyx_L22_error:; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L20_error; + __pyx_L32:; } } @@ -220494,48 +204230,46 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * * if self._c_schema is NULL: */ - __Pyx_TraceLine(112,0,__PYX_ERR(23, 112, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ xmlSchematronFreeParserCtxt(__pyx_v_parser_ctxt); - goto __pyx_L24; + goto __pyx_L21; } - __pyx_L23_error:; + __pyx_L20_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign - __pyx_t_8 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_16 = 0; + __pyx_t_7 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_16); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_8, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_10, &__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_8); + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_11, &__pyx_t_14, &__pyx_t_15); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_9, &__pyx_t_10) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_9, &__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_13); - __Pyx_XGOTREF(__pyx_t_16); - __pyx_t_9 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename; + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_15); + __pyx_t_8 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename; { xmlSchematronFreeParserCtxt(__pyx_v_parser_ctxt); } if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_XGIVEREF(__pyx_t_16); - __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_14, __pyx_t_15); } - __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_ErrRestore(__pyx_t_8, __pyx_t_10, __pyx_t_11); - __pyx_t_8 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_16 = 0; - __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15; + __Pyx_ErrRestore(__pyx_t_7, __pyx_t_9, __pyx_t_10); + __pyx_t_7 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; + __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13; goto __pyx_L1_error; } - __pyx_L24:; + __pyx_L21:; } /* "src/lxml/schematron.pxi":114 @@ -220545,9 +204279,8 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * raise SchematronParseError( * u"Document is not a valid Schematron schema", */ - __Pyx_TraceLine(114,0,__PYX_ERR(23, 114, __pyx_L1_error)) - __pyx_t_6 = ((__pyx_v_self->_c_schema == NULL) != 0); - if (unlikely(__pyx_t_6)) { + __pyx_t_5 = ((__pyx_v_self->_c_schema == NULL) != 0); + if (unlikely(__pyx_t_5)) { /* "src/lxml/schematron.pxi":115 * @@ -220556,7 +204289,6 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 * u"Document is not a valid Schematron schema", * self._error_log) */ - __Pyx_TraceLine(115,0,__PYX_ERR(23, 115, __pyx_L1_error)) __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_kp_u_Document_is_not_a_valid_Schematr); @@ -220596,14 +204328,12 @@ static int __pyx_pf_4lxml_5etree_10Schematron_2__init__(struct __pyx_obj_4lxml_5 __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("lxml.etree.Schematron.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XDECREF((PyObject *)__pyx_v_root_node); __Pyx_XDECREF(__pyx_v_filename); - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -220628,11 +204358,9 @@ static void __pyx_pw_4lxml_5etree_10Schematron_5__dealloc__(PyObject *__pyx_v_se } static void __pyx_pf_4lxml_5etree_10Schematron_4__dealloc__(struct __pyx_obj_4lxml_5etree_Schematron *__pyx_v_self) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__dealloc__", 0); - __Pyx_TraceCall("__dealloc__", __pyx_f[23], 119, 0, __PYX_ERR(23, 119, __pyx_L1_error)); /* "src/lxml/schematron.pxi":120 * @@ -220641,7 +204369,6 @@ static void __pyx_pf_4lxml_5etree_10Schematron_4__dealloc__(struct __pyx_obj_4lx * if self._c_schema_doc is not NULL: * tree.xmlFreeDoc(self._c_schema_doc) */ - __Pyx_TraceLine(120,0,__PYX_ERR(23, 120, __pyx_L1_error)) xmlSchematronFree(__pyx_v_self->_c_schema); /* "src/lxml/schematron.pxi":121 @@ -220651,7 +204378,6 @@ static void __pyx_pf_4lxml_5etree_10Schematron_4__dealloc__(struct __pyx_obj_4lx * tree.xmlFreeDoc(self._c_schema_doc) * */ - __Pyx_TraceLine(121,0,__PYX_ERR(23, 121, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->_c_schema_doc != NULL) != 0); if (__pyx_t_1) { @@ -220662,7 +204388,6 @@ static void __pyx_pf_4lxml_5etree_10Schematron_4__dealloc__(struct __pyx_obj_4lx * * def __call__(self, etree): */ - __Pyx_TraceLine(122,0,__PYX_ERR(23, 122, __pyx_L1_error)) xmlFreeDoc(__pyx_v_self->_c_schema_doc); /* "src/lxml/schematron.pxi":121 @@ -220683,11 +204408,6 @@ static void __pyx_pf_4lxml_5etree_10Schematron_4__dealloc__(struct __pyx_obj_4lx */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.Schematron.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -220760,7 +204480,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10Schematron_6__call__(struct __pyx_obj_4 xmlSchematronValidCtxt *__pyx_v_valid_ctxt; int __pyx_v_ret; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -220776,7 +204495,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10Schematron_6__call__(struct __pyx_obj_4 PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[23], 124, 0, __PYX_ERR(23, 124, __pyx_L1_error)); /* "src/lxml/schematron.pxi":136 * cdef int ret @@ -220785,7 +204503,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10Schematron_6__call__(struct __pyx_obj_4 * doc = _documentOrRaise(etree) * root_node = _rootNodeOrRaise(etree) */ - __Pyx_TraceLine(136,0,__PYX_ERR(23, 136, __pyx_L1_error)) #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_self->_c_schema != NULL) != 0))) { @@ -220802,7 +204519,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10Schematron_6__call__(struct __pyx_obj_4 * root_node = _rootNodeOrRaise(etree) * */ - __Pyx_TraceLine(137,0,__PYX_ERR(23, 137, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__documentOrRaise(__pyx_v_etree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_1); @@ -220815,7 +204531,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10Schematron_6__call__(struct __pyx_obj_4 * * valid_ctxt = schematron.xmlSchematronNewValidCtxt( */ - __Pyx_TraceLine(138,0,__PYX_ERR(23, 138, __pyx_L1_error)) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__rootNodeOrRaise(__pyx_v_etree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_root_node = ((struct LxmlElement *)__pyx_t_1); @@ -220828,7 +204543,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10Schematron_6__call__(struct __pyx_obj_4 * self._c_schema, schematron.XML_SCHEMATRON_OUT_ERROR) * if valid_ctxt is NULL: */ - __Pyx_TraceLine(140,0,__PYX_ERR(23, 140, __pyx_L1_error)) __pyx_v_valid_ctxt = xmlSchematronNewValidCtxt(__pyx_v_self->_c_schema, XML_SCHEMATRON_OUT_ERROR); /* "src/lxml/schematron.pxi":142 @@ -220838,7 +204552,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10Schematron_6__call__(struct __pyx_obj_4 * raise MemoryError() * */ - __Pyx_TraceLine(142,0,__PYX_ERR(23, 142, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_valid_ctxt == NULL) != 0); if (unlikely(__pyx_t_2)) { @@ -220849,7 +204562,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10Schematron_6__call__(struct __pyx_obj_4 * * try: */ - __Pyx_TraceLine(143,0,__PYX_ERR(23, 143, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(23, 143, __pyx_L1_error) /* "src/lxml/schematron.pxi":142 @@ -220868,7 +204580,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10Schematron_6__call__(struct __pyx_obj_4 * self._error_log.clear() * schematron.xmlSchematronSetValidStructuredErrors( */ - __Pyx_TraceLine(145,0,__PYX_ERR(23, 145, __pyx_L5_error)) /*try:*/ { /* "src/lxml/schematron.pxi":146 @@ -220878,7 +204589,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10Schematron_6__call__(struct __pyx_obj_4 * schematron.xmlSchematronSetValidStructuredErrors( * valid_ctxt, _receiveError, self._error_log) */ - __Pyx_TraceLine(146,0,__PYX_ERR(23, 146, __pyx_L5_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ErrorLog *)__pyx_v_self->__pyx_base._error_log->__pyx_base.__pyx_base.__pyx_vtab)->clear(__pyx_v_self->__pyx_base._error_log, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 146, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -220890,7 +204600,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10Schematron_6__call__(struct __pyx_obj_4 * valid_ctxt, _receiveError, self._error_log) * c_doc = _fakeRootDoc(doc._c_doc, root_node._c_node) */ - __Pyx_TraceLine(147,0,__PYX_ERR(23, 147, __pyx_L5_error)) xmlSchematronSetValidStructuredErrors(__pyx_v_valid_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log)); /* "src/lxml/schematron.pxi":149 @@ -220900,7 +204609,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10Schematron_6__call__(struct __pyx_obj_4 * with nogil: * ret = schematron.xmlSchematronValidateDoc(valid_ctxt, c_doc) */ - __Pyx_TraceLine(149,0,__PYX_ERR(23, 149, __pyx_L5_error)) __pyx_t_3 = __pyx_f_4lxml_5etree__fakeRootDoc(__pyx_v_doc->_c_doc, __pyx_v_root_node->_c_node); if (unlikely(__pyx_t_3 == ((xmlDoc *)NULL))) __PYX_ERR(23, 149, __pyx_L5_error) __pyx_v_c_doc = __pyx_t_3; @@ -220911,7 +204619,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10Schematron_6__call__(struct __pyx_obj_4 * ret = schematron.xmlSchematronValidateDoc(valid_ctxt, c_doc) * _destroyFakeDoc(doc._c_doc, c_doc) */ - __Pyx_TraceLine(150,0,__PYX_ERR(23, 150, __pyx_L5_error)) { #ifdef WITH_THREAD PyThreadState *_save; @@ -220927,7 +204634,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10Schematron_6__call__(struct __pyx_obj_4 * _destroyFakeDoc(doc._c_doc, c_doc) * finally: */ - __Pyx_TraceLine(151,1,__PYX_ERR(23, 151, __pyx_L8_error)) __pyx_v_ret = xmlSchematronValidateDoc(__pyx_v_valid_ctxt, __pyx_v_c_doc); } @@ -220938,7 +204644,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10Schematron_6__call__(struct __pyx_obj_4 * ret = schematron.xmlSchematronValidateDoc(valid_ctxt, c_doc) * _destroyFakeDoc(doc._c_doc, c_doc) */ - __Pyx_TraceLine(150,1,__PYX_ERR(23, 150, __pyx_L5_error)) /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD @@ -220947,13 +204652,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10Schematron_6__call__(struct __pyx_obj_4 #endif goto __pyx_L9; } - __pyx_L8_error: { - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L5_error; - } __pyx_L9:; } } @@ -220965,7 +204663,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10Schematron_6__call__(struct __pyx_obj_4 * finally: * schematron.xmlSchematronFreeValidCtxt(valid_ctxt) */ - __Pyx_TraceLine(152,0,__PYX_ERR(23, 152, __pyx_L5_error)) __pyx_f_4lxml_5etree__destroyFakeDoc(__pyx_v_doc->_c_doc, __pyx_v_c_doc); } @@ -220976,7 +204673,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10Schematron_6__call__(struct __pyx_obj_4 * * if ret == -1: */ - __Pyx_TraceLine(154,0,__PYX_ERR(23, 154, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ xmlSchematronFreeValidCtxt(__pyx_v_valid_ctxt); @@ -221024,7 +204720,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10Schematron_6__call__(struct __pyx_obj_4 * raise SchematronValidateError( * u"Internal error in Schematron validation", */ - __Pyx_TraceLine(156,0,__PYX_ERR(23, 156, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_ret == -1L) != 0); if (unlikely(__pyx_t_2)) { @@ -221035,7 +204730,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10Schematron_6__call__(struct __pyx_obj_4 * u"Internal error in Schematron validation", * self._error_log) */ - __Pyx_TraceLine(157,0,__PYX_ERR(23, 157, __pyx_L1_error)) __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(23, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_kp_u_Internal_error_in_Schematron_val); @@ -221067,7 +204761,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10Schematron_6__call__(struct __pyx_obj_4 * return True * else: */ - __Pyx_TraceLine(160,0,__PYX_ERR(23, 160, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_ret == 0) != 0); if (__pyx_t_2) { @@ -221078,7 +204771,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10Schematron_6__call__(struct __pyx_obj_4 * else: * return False */ - __Pyx_TraceLine(161,0,__PYX_ERR(23, 161, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; @@ -221098,7 +204790,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10Schematron_6__call__(struct __pyx_obj_4 * else: * return False # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(163,0,__PYX_ERR(23, 163, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); @@ -221124,7 +204815,6 @@ static PyObject *__pyx_pf_4lxml_5etree_10Schematron_6__call__(struct __pyx_obj_4 __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XDECREF((PyObject *)__pyx_v_root_node); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -221140,12 +204830,10 @@ static PyObject *__pyx_pf_4lxml_5etree_10Schematron_6__call__(struct __pyx_obj_4 struct LxmlElement *deepcopyNodeToDocument(struct LxmlDocument *__pyx_v_doc, xmlNode *__pyx_v_c_root) { xmlNode *__pyx_v_c_node; struct LxmlElement *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations xmlNode *__pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("deepcopyNodeToDocument", 0); - __Pyx_TraceCall("deepcopyNodeToDocument", __pyx_f[24], 3, 0, __PYX_ERR(24, 3, __pyx_L1_error)); /* "src/lxml/public-api.pxi":6 * u"Recursively copy the element into the document. doc is not modified." @@ -221154,7 +204842,6 @@ struct LxmlElement *deepcopyNodeToDocument(struct LxmlDocument *__pyx_v_doc, xml * return _elementFactory(doc, c_node) * */ - __Pyx_TraceLine(6,0,__PYX_ERR(24, 6, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__copyNodeToDoc(__pyx_v_c_root, __pyx_v_doc->_c_doc); if (unlikely(__pyx_t_1 == ((xmlNode *)NULL))) __PYX_ERR(24, 6, __pyx_L1_error) __pyx_v_c_node = __pyx_t_1; @@ -221165,7 +204852,6 @@ struct LxmlElement *deepcopyNodeToDocument(struct LxmlDocument *__pyx_v_doc, xml * * cdef public api _ElementTree elementTreeFactory(_Element context_node): */ - __Pyx_TraceLine(7,0,__PYX_ERR(24, 7, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(__pyx_v_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_2)) __PYX_ERR(24, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -221188,7 +204874,6 @@ struct LxmlElement *deepcopyNodeToDocument(struct LxmlDocument *__pyx_v_doc, xml __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -221203,12 +204888,10 @@ struct LxmlElement *deepcopyNodeToDocument(struct LxmlDocument *__pyx_v_doc, xml struct LxmlElementTree *elementTreeFactory(struct LxmlElement *__pyx_v_context_node) { struct LxmlElementTree *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("elementTreeFactory", 0); - __Pyx_TraceCall("elementTreeFactory", __pyx_f[24], 9, 0, __PYX_ERR(24, 9, __pyx_L1_error)); /* "src/lxml/public-api.pxi":10 * @@ -221217,7 +204900,6 @@ struct LxmlElementTree *elementTreeFactory(struct LxmlElement *__pyx_v_context_n * return newElementTree(context_node, _ElementTree) * */ - __Pyx_TraceLine(10,0,__PYX_ERR(24, 10, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_context_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(24, 10, __pyx_L1_error) /* "src/lxml/public-api.pxi":11 @@ -221227,7 +204909,6 @@ struct LxmlElementTree *elementTreeFactory(struct LxmlElement *__pyx_v_context_n * * cdef public api _ElementTree newElementTree(_Element context_node, */ - __Pyx_TraceLine(11,0,__PYX_ERR(24, 11, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_2 = ((PyObject *)newElementTree(__pyx_v_context_node, ((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree))); if (unlikely(!__pyx_t_2)) __PYX_ERR(24, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -221250,7 +204931,6 @@ struct LxmlElementTree *elementTreeFactory(struct LxmlElement *__pyx_v_context_n __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -221265,7 +204945,6 @@ struct LxmlElementTree *elementTreeFactory(struct LxmlElement *__pyx_v_context_n struct LxmlElementTree *newElementTree(struct LxmlElement *__pyx_v_context_node, PyObject *__pyx_v_subclass) { struct LxmlElementTree *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -221274,7 +204953,6 @@ struct LxmlElementTree *newElementTree(struct LxmlElement *__pyx_v_context_node, PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("newElementTree", 0); - __Pyx_TraceCall("newElementTree", __pyx_f[24], 13, 0, __PYX_ERR(24, 13, __pyx_L1_error)); /* "src/lxml/public-api.pxi":15 * cdef public api _ElementTree newElementTree(_Element context_node, @@ -221283,7 +204961,6 @@ struct LxmlElementTree *newElementTree(struct LxmlElement *__pyx_v_context_node, * raise TypeError * _assertValidNode(context_node) */ - __Pyx_TraceLine(15,0,__PYX_ERR(24, 15, __pyx_L1_error)) __pyx_t_2 = ((((void *)__pyx_v_context_node) == NULL) != 0); if (!__pyx_t_2) { } else { @@ -221303,7 +204980,6 @@ struct LxmlElementTree *newElementTree(struct LxmlElement *__pyx_v_context_node, * _assertValidNode(context_node) * return _newElementTree(context_node._doc, context_node, subclass) */ - __Pyx_TraceLine(16,0,__PYX_ERR(24, 16, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0); __PYX_ERR(24, 16, __pyx_L1_error) @@ -221323,7 +204999,6 @@ struct LxmlElementTree *newElementTree(struct LxmlElement *__pyx_v_context_node, * return _newElementTree(context_node._doc, context_node, subclass) * */ - __Pyx_TraceLine(17,0,__PYX_ERR(24, 17, __pyx_L1_error)) __pyx_t_4 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_context_node); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(24, 17, __pyx_L1_error) /* "src/lxml/public-api.pxi":18 @@ -221333,7 +205008,6 @@ struct LxmlElementTree *newElementTree(struct LxmlElement *__pyx_v_context_node, * * cdef public api _ElementTree adoptExternalDocument(xmlDoc* c_doc, parser, bint is_owned): */ - __Pyx_TraceLine(18,0,__PYX_ERR(24, 18, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_5 = ((PyObject *)__pyx_v_context_node->_doc); __Pyx_INCREF(__pyx_t_5); @@ -221360,7 +205034,6 @@ struct LxmlElementTree *newElementTree(struct LxmlElement *__pyx_v_context_node, __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -221376,13 +205049,11 @@ struct LxmlElementTree *newElementTree(struct LxmlElement *__pyx_v_context_node, struct LxmlElementTree *adoptExternalDocument(xmlDoc *__pyx_v_c_doc, PyObject *__pyx_v_parser, int __pyx_v_is_owned) { struct LxmlDocument *__pyx_v_doc = NULL; struct LxmlElementTree *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; struct __pyx_opt_args_4lxml_5etree__adoptForeignDoc __pyx_t_3; __Pyx_RefNannySetupContext("adoptExternalDocument", 0); - __Pyx_TraceCall("adoptExternalDocument", __pyx_f[24], 20, 0, __PYX_ERR(24, 20, __pyx_L1_error)); /* "src/lxml/public-api.pxi":21 * @@ -221391,7 +205062,6 @@ struct LxmlElementTree *adoptExternalDocument(xmlDoc *__pyx_v_c_doc, PyObject *_ * raise TypeError * doc = _adoptForeignDoc(c_doc, parser, is_owned) */ - __Pyx_TraceLine(21,0,__PYX_ERR(24, 21, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_doc == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -221402,7 +205072,6 @@ struct LxmlElementTree *adoptExternalDocument(xmlDoc *__pyx_v_c_doc, PyObject *_ * doc = _adoptForeignDoc(c_doc, parser, is_owned) * return _elementTreeFactory(doc, None) */ - __Pyx_TraceLine(22,0,__PYX_ERR(24, 22, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0); __PYX_ERR(24, 22, __pyx_L1_error) @@ -221422,7 +205091,6 @@ struct LxmlElementTree *adoptExternalDocument(xmlDoc *__pyx_v_c_doc, PyObject *_ * return _elementTreeFactory(doc, None) * */ - __Pyx_TraceLine(23,0,__PYX_ERR(24, 23, __pyx_L1_error)) if (!(likely(((__pyx_v_parser) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_parser, __pyx_ptype_4lxml_5etree__BaseParser))))) __PYX_ERR(24, 23, __pyx_L1_error) __pyx_t_3.__pyx_n = 2; __pyx_t_3.parser = ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser); @@ -221439,7 +205107,6 @@ struct LxmlElementTree *adoptExternalDocument(xmlDoc *__pyx_v_c_doc, PyObject *_ * * cdef public api _Element elementFactory(_Document doc, xmlNode* c_node): */ - __Pyx_TraceLine(24,0,__PYX_ERR(24, 24, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__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(24, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -221463,7 +205130,6 @@ struct LxmlElementTree *adoptExternalDocument(xmlDoc *__pyx_v_c_doc, PyObject *_ __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_doc); __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -221478,14 +205144,12 @@ struct LxmlElementTree *adoptExternalDocument(xmlDoc *__pyx_v_c_doc, PyObject *_ struct LxmlElement *elementFactory(struct LxmlDocument *__pyx_v_doc, xmlNode *__pyx_v_c_node) { struct LxmlElement *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("elementFactory", 0); - __Pyx_TraceCall("elementFactory", __pyx_f[24], 26, 0, __PYX_ERR(24, 26, __pyx_L1_error)); /* "src/lxml/public-api.pxi":27 * @@ -221494,7 +205158,6 @@ struct LxmlElement *elementFactory(struct LxmlDocument *__pyx_v_doc, xmlNode *__ * raise TypeError * return _elementFactory(doc, c_node) */ - __Pyx_TraceLine(27,0,__PYX_ERR(24, 27, __pyx_L1_error)) __pyx_t_2 = ((__pyx_v_c_node == NULL) != 0); if (!__pyx_t_2) { } else { @@ -221514,7 +205177,6 @@ struct LxmlElement *elementFactory(struct LxmlDocument *__pyx_v_doc, xmlNode *__ * return _elementFactory(doc, c_node) * */ - __Pyx_TraceLine(28,0,__PYX_ERR(24, 28, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0); __PYX_ERR(24, 28, __pyx_L1_error) @@ -221534,7 +205196,6 @@ struct LxmlElement *elementFactory(struct LxmlDocument *__pyx_v_doc, xmlNode *__ * * cdef public api _Element makeElement(tag, _Document doc, parser, */ - __Pyx_TraceLine(29,0,__PYX_ERR(24, 29, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(__pyx_v_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_4)) __PYX_ERR(24, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -221557,7 +205218,6 @@ struct LxmlElement *elementFactory(struct LxmlDocument *__pyx_v_doc, xmlNode *__ __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -221572,11 +205232,9 @@ struct LxmlElement *elementFactory(struct LxmlDocument *__pyx_v_doc, xmlNode *__ struct LxmlElement *makeElement(PyObject *__pyx_v_tag, struct LxmlDocument *__pyx_v_doc, PyObject *__pyx_v_parser, PyObject *__pyx_v_text, PyObject *__pyx_v_tail, PyObject *__pyx_v_attrib, PyObject *__pyx_v_nsmap) { struct LxmlElement *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("makeElement", 0); - __Pyx_TraceCall("makeElement", __pyx_f[24], 31, 0, __PYX_ERR(24, 31, __pyx_L1_error)); /* "src/lxml/public-api.pxi":33 * cdef public api _Element makeElement(tag, _Document doc, parser, @@ -221585,7 +205243,6 @@ struct LxmlElement *makeElement(PyObject *__pyx_v_tag, struct LxmlDocument *__py * * cdef public api _Element makeSubElement(_Element parent, tag, text, tail, */ - __Pyx_TraceLine(33,0,__PYX_ERR(24, 33, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); if (!(likely(((__pyx_v_parser) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_parser, __pyx_ptype_4lxml_5etree__BaseParser))))) __PYX_ERR(24, 33, __pyx_L1_error) __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__makeElement(__pyx_v_tag, NULL, __pyx_v_doc, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), __pyx_v_text, __pyx_v_tail, __pyx_v_attrib, __pyx_v_nsmap, ((PyObject*)Py_None))); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 33, __pyx_L1_error) @@ -221609,7 +205266,6 @@ struct LxmlElement *makeElement(PyObject *__pyx_v_tag, struct LxmlDocument *__py __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -221624,12 +205280,10 @@ struct LxmlElement *makeElement(PyObject *__pyx_v_tag, struct LxmlDocument *__py struct LxmlElement *makeSubElement(struct LxmlElement *__pyx_v_parent, PyObject *__pyx_v_tag, PyObject *__pyx_v_text, PyObject *__pyx_v_tail, PyObject *__pyx_v_attrib, PyObject *__pyx_v_nsmap) { struct LxmlElement *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("makeSubElement", 0); - __Pyx_TraceCall("makeSubElement", __pyx_f[24], 35, 0, __PYX_ERR(24, 35, __pyx_L1_error)); /* "src/lxml/public-api.pxi":37 * cdef public api _Element makeSubElement(_Element parent, tag, text, tail, @@ -221638,7 +205292,6 @@ struct LxmlElement *makeSubElement(struct LxmlElement *__pyx_v_parent, PyObject * return _makeSubElement(parent, tag, text, tail, attrib, nsmap, None) * */ - __Pyx_TraceLine(37,0,__PYX_ERR(24, 37, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_parent); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(24, 37, __pyx_L1_error) /* "src/lxml/public-api.pxi":38 @@ -221648,7 +205301,6 @@ struct LxmlElement *makeSubElement(struct LxmlElement *__pyx_v_parent, PyObject * * cdef public api void setElementClassLookupFunction( */ - __Pyx_TraceLine(38,0,__PYX_ERR(24, 38, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__makeSubElement(__pyx_v_parent, __pyx_v_tag, __pyx_v_text, __pyx_v_tail, __pyx_v_attrib, __pyx_v_nsmap, ((PyObject*)Py_None))); if (unlikely(!__pyx_t_2)) __PYX_ERR(24, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -221671,7 +205323,6 @@ struct LxmlElement *makeSubElement(struct LxmlElement *__pyx_v_parent, PyObject __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -221685,10 +205336,8 @@ struct LxmlElement *makeSubElement(struct LxmlElement *__pyx_v_parent, PyObject */ void setElementClassLookupFunction(_element_class_lookup_function __pyx_v_function, PyObject *__pyx_v_state) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setElementClassLookupFunction", 0); - __Pyx_TraceCall("setElementClassLookupFunction", __pyx_f[24], 40, 0, __PYX_ERR(24, 40, __pyx_L1_error)); /* "src/lxml/public-api.pxi":42 * cdef public api void setElementClassLookupFunction( @@ -221697,7 +205346,6 @@ void setElementClassLookupFunction(_element_class_lookup_function __pyx_v_functi * * cdef public api object lookupDefaultElementClass(state, doc, xmlNode* c_node): */ - __Pyx_TraceLine(42,0,__PYX_ERR(24, 42, __pyx_L1_error)) __pyx_f_4lxml_5etree__setElementClassLookupFunction(__pyx_v_function, __pyx_v_state); /* "src/lxml/public-api.pxi":40 @@ -221709,11 +205357,6 @@ void setElementClassLookupFunction(_element_class_lookup_function __pyx_v_functi */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.setElementClassLookupFunction", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -221727,11 +205370,9 @@ void setElementClassLookupFunction(_element_class_lookup_function __pyx_v_functi PyObject *lookupDefaultElementClass(PyObject *__pyx_v_state, PyObject *__pyx_v_doc, xmlNode *__pyx_v_c_node) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("lookupDefaultElementClass", 0); - __Pyx_TraceCall("lookupDefaultElementClass", __pyx_f[24], 44, 0, __PYX_ERR(24, 44, __pyx_L1_error)); /* "src/lxml/public-api.pxi":45 * @@ -221740,7 +205381,6 @@ PyObject *lookupDefaultElementClass(PyObject *__pyx_v_state, PyObject *__pyx_v_d * * cdef public api object lookupNamespaceElementClass(state, doc, xmlNode* c_node): */ - __Pyx_TraceLine(45,0,__PYX_ERR(24, 45, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); if (!(likely(((__pyx_v_doc) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_doc, __pyx_ptype_4lxml_5etree__Document))))) __PYX_ERR(24, 45, __pyx_L1_error) __pyx_t_1 = __pyx_f_4lxml_5etree__lookupDefaultElementClass(__pyx_v_state, ((struct LxmlDocument *)__pyx_v_doc), __pyx_v_c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 45, __pyx_L1_error) @@ -221764,7 +205404,6 @@ PyObject *lookupDefaultElementClass(PyObject *__pyx_v_state, PyObject *__pyx_v_d __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -221779,11 +205418,9 @@ PyObject *lookupDefaultElementClass(PyObject *__pyx_v_state, PyObject *__pyx_v_d PyObject *lookupNamespaceElementClass(PyObject *__pyx_v_state, PyObject *__pyx_v_doc, xmlNode *__pyx_v_c_node) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("lookupNamespaceElementClass", 0); - __Pyx_TraceCall("lookupNamespaceElementClass", __pyx_f[24], 47, 0, __PYX_ERR(24, 47, __pyx_L1_error)); /* "src/lxml/public-api.pxi":48 * @@ -221792,7 +205429,6 @@ PyObject *lookupNamespaceElementClass(PyObject *__pyx_v_state, PyObject *__pyx_v * * cdef public api object callLookupFallback(FallbackElementClassLookup lookup, */ - __Pyx_TraceLine(48,0,__PYX_ERR(24, 48, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); if (!(likely(((__pyx_v_doc) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_doc, __pyx_ptype_4lxml_5etree__Document))))) __PYX_ERR(24, 48, __pyx_L1_error) __pyx_t_1 = __pyx_f_4lxml_5etree__find_nselement_class(__pyx_v_state, ((struct LxmlDocument *)__pyx_v_doc), __pyx_v_c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 48, __pyx_L1_error) @@ -221816,7 +205452,6 @@ PyObject *lookupNamespaceElementClass(PyObject *__pyx_v_state, PyObject *__pyx_v __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -221831,11 +205466,9 @@ PyObject *lookupNamespaceElementClass(PyObject *__pyx_v_state, PyObject *__pyx_v PyObject *callLookupFallback(struct LxmlFallbackElementClassLookup *__pyx_v_lookup, struct LxmlDocument *__pyx_v_doc, xmlNode *__pyx_v_c_node) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("callLookupFallback", 0); - __Pyx_TraceCall("callLookupFallback", __pyx_f[24], 50, 0, __PYX_ERR(24, 50, __pyx_L1_error)); /* "src/lxml/public-api.pxi":52 * cdef public api object callLookupFallback(FallbackElementClassLookup lookup, @@ -221844,7 +205477,6 @@ PyObject *callLookupFallback(struct LxmlFallbackElementClassLookup *__pyx_v_look * * cdef public api int tagMatches(xmlNode* c_node, const_xmlChar* c_href, const_xmlChar* c_name): */ - __Pyx_TraceLine(52,0,__PYX_ERR(24, 52, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4lxml_5etree__callLookupFallback(__pyx_v_lookup, __pyx_v_doc, __pyx_v_c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -221867,7 +205499,6 @@ PyObject *callLookupFallback(struct LxmlFallbackElementClassLookup *__pyx_v_look __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -221882,11 +205513,9 @@ PyObject *callLookupFallback(struct LxmlFallbackElementClassLookup *__pyx_v_look int tagMatches(xmlNode *__pyx_v_c_node, const xmlChar *__pyx_v_c_href, const xmlChar *__pyx_v_c_name) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("tagMatches", 0); - __Pyx_TraceCall("tagMatches", __pyx_f[24], 54, 0, __PYX_ERR(24, 54, __pyx_L1_error)); /* "src/lxml/public-api.pxi":55 * @@ -221895,7 +205524,6 @@ int tagMatches(xmlNode *__pyx_v_c_node, const xmlChar *__pyx_v_c_href, const xml * return -1 * return _tagMatches(c_node, c_href, c_name) */ - __Pyx_TraceLine(55,0,__PYX_ERR(24, 55, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_1) { @@ -221906,7 +205534,6 @@ int tagMatches(xmlNode *__pyx_v_c_node, const xmlChar *__pyx_v_c_href, const xml * return _tagMatches(c_node, c_href, c_name) * */ - __Pyx_TraceLine(56,0,__PYX_ERR(24, 56, __pyx_L1_error)) __pyx_r = -1; goto __pyx_L0; @@ -221926,7 +205553,6 @@ int tagMatches(xmlNode *__pyx_v_c_node, const xmlChar *__pyx_v_c_href, const xml * * cdef public api _Document documentOrRaise(object input): */ - __Pyx_TraceLine(57,0,__PYX_ERR(24, 57, __pyx_L1_error)) __pyx_r = __pyx_f_4lxml_5etree__tagMatches(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_name); goto __pyx_L0; @@ -221939,11 +205565,7 @@ int tagMatches(xmlNode *__pyx_v_c_node, const xmlChar *__pyx_v_c_href, const xml */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.tagMatches", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -221958,11 +205580,9 @@ int tagMatches(xmlNode *__pyx_v_c_node, const xmlChar *__pyx_v_c_href, const xml struct LxmlDocument *documentOrRaise(PyObject *__pyx_v_input) { struct LxmlDocument *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("documentOrRaise", 0); - __Pyx_TraceCall("documentOrRaise", __pyx_f[24], 59, 0, __PYX_ERR(24, 59, __pyx_L1_error)); /* "src/lxml/public-api.pxi":60 * @@ -221971,7 +205591,6 @@ struct LxmlDocument *documentOrRaise(PyObject *__pyx_v_input) { * * cdef public api _Element rootNodeOrRaise(object input): */ - __Pyx_TraceLine(60,0,__PYX_ERR(24, 60, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__documentOrRaise(__pyx_v_input)); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -221994,7 +205613,6 @@ struct LxmlDocument *documentOrRaise(PyObject *__pyx_v_input) { __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -222009,11 +205627,9 @@ struct LxmlDocument *documentOrRaise(PyObject *__pyx_v_input) { struct LxmlElement *rootNodeOrRaise(PyObject *__pyx_v_input) { struct LxmlElement *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("rootNodeOrRaise", 0); - __Pyx_TraceCall("rootNodeOrRaise", __pyx_f[24], 62, 0, __PYX_ERR(24, 62, __pyx_L1_error)); /* "src/lxml/public-api.pxi":63 * @@ -222022,7 +205638,6 @@ struct LxmlElement *rootNodeOrRaise(PyObject *__pyx_v_input) { * * cdef public api bint hasText(xmlNode* c_node): */ - __Pyx_TraceLine(63,0,__PYX_ERR(24, 63, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__rootNodeOrRaise(__pyx_v_input)); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -222045,7 +205660,6 @@ struct LxmlElement *rootNodeOrRaise(PyObject *__pyx_v_input) { __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -222060,10 +205674,8 @@ struct LxmlElement *rootNodeOrRaise(PyObject *__pyx_v_input) { int hasText(xmlNode *__pyx_v_c_node) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("hasText", 0); - __Pyx_TraceCall("hasText", __pyx_f[24], 65, 0, __PYX_ERR(24, 65, __pyx_L1_error)); /* "src/lxml/public-api.pxi":66 * @@ -222072,7 +205684,6 @@ int hasText(xmlNode *__pyx_v_c_node) { * * cdef public api bint hasTail(xmlNode* c_node): */ - __Pyx_TraceLine(66,0,__PYX_ERR(24, 66, __pyx_L1_error)) __pyx_r = __pyx_f_4lxml_5etree__hasText(__pyx_v_c_node); goto __pyx_L0; @@ -222085,11 +205696,7 @@ int hasText(xmlNode *__pyx_v_c_node) { */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.hasText", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -222104,10 +205711,8 @@ int hasText(xmlNode *__pyx_v_c_node) { int hasTail(xmlNode *__pyx_v_c_node) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("hasTail", 0); - __Pyx_TraceCall("hasTail", __pyx_f[24], 68, 0, __PYX_ERR(24, 68, __pyx_L1_error)); /* "src/lxml/public-api.pxi":69 * @@ -222116,7 +205721,6 @@ int hasTail(xmlNode *__pyx_v_c_node) { * * cdef public api object textOf(xmlNode* c_node): */ - __Pyx_TraceLine(69,0,__PYX_ERR(24, 69, __pyx_L1_error)) __pyx_r = __pyx_f_4lxml_5etree__hasTail(__pyx_v_c_node); goto __pyx_L0; @@ -222129,11 +205733,7 @@ int hasTail(xmlNode *__pyx_v_c_node) { */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.hasTail", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -222148,12 +205748,10 @@ int hasTail(xmlNode *__pyx_v_c_node) { PyObject *textOf(xmlNode *__pyx_v_c_node) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("textOf", 0); - __Pyx_TraceCall("textOf", __pyx_f[24], 71, 0, __PYX_ERR(24, 71, __pyx_L1_error)); /* "src/lxml/public-api.pxi":72 * @@ -222162,7 +205760,6 @@ PyObject *textOf(xmlNode *__pyx_v_c_node) { * return None * return _collectText(c_node.children) */ - __Pyx_TraceLine(72,0,__PYX_ERR(24, 72, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_1) { @@ -222173,7 +205770,6 @@ PyObject *textOf(xmlNode *__pyx_v_c_node) { * return _collectText(c_node.children) * */ - __Pyx_TraceLine(73,0,__PYX_ERR(24, 73, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -222194,7 +205790,6 @@ PyObject *textOf(xmlNode *__pyx_v_c_node) { * * cdef public api object tailOf(xmlNode* c_node): */ - __Pyx_TraceLine(74,0,__PYX_ERR(24, 74, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_4lxml_5etree__collectText(__pyx_v_c_node->children); if (unlikely(!__pyx_t_2)) __PYX_ERR(24, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -222217,7 +205812,6 @@ PyObject *textOf(xmlNode *__pyx_v_c_node) { __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -222232,12 +205826,10 @@ PyObject *textOf(xmlNode *__pyx_v_c_node) { PyObject *tailOf(xmlNode *__pyx_v_c_node) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("tailOf", 0); - __Pyx_TraceCall("tailOf", __pyx_f[24], 76, 0, __PYX_ERR(24, 76, __pyx_L1_error)); /* "src/lxml/public-api.pxi":77 * @@ -222246,7 +205838,6 @@ PyObject *tailOf(xmlNode *__pyx_v_c_node) { * return None * return _collectText(c_node.next) */ - __Pyx_TraceLine(77,0,__PYX_ERR(24, 77, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_1) { @@ -222257,7 +205848,6 @@ PyObject *tailOf(xmlNode *__pyx_v_c_node) { * return _collectText(c_node.next) * */ - __Pyx_TraceLine(78,0,__PYX_ERR(24, 78, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; @@ -222278,7 +205868,6 @@ PyObject *tailOf(xmlNode *__pyx_v_c_node) { * * cdef public api int setNodeText(xmlNode* c_node, text) except -1: */ - __Pyx_TraceLine(79,0,__PYX_ERR(24, 79, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_4lxml_5etree__collectText(__pyx_v_c_node->next); if (unlikely(!__pyx_t_2)) __PYX_ERR(24, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -222301,7 +205890,6 @@ PyObject *tailOf(xmlNode *__pyx_v_c_node) { __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -222316,12 +205904,10 @@ PyObject *tailOf(xmlNode *__pyx_v_c_node) { int setNodeText(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_text) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setNodeText", 0); - __Pyx_TraceCall("setNodeText", __pyx_f[24], 81, 0, __PYX_ERR(24, 81, __pyx_L1_error)); /* "src/lxml/public-api.pxi":82 * @@ -222330,7 +205916,6 @@ int setNodeText(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_text) { * raise ValueError * return _setNodeText(c_node, text) */ - __Pyx_TraceLine(82,0,__PYX_ERR(24, 82, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -222341,7 +205926,6 @@ int setNodeText(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_text) { * return _setNodeText(c_node, text) * */ - __Pyx_TraceLine(83,0,__PYX_ERR(24, 83, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, 0, 0, 0); __PYX_ERR(24, 83, __pyx_L1_error) @@ -222361,7 +205945,6 @@ int setNodeText(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_text) { * * cdef public api int setTailText(xmlNode* c_node, text) except -1: */ - __Pyx_TraceLine(84,0,__PYX_ERR(24, 84, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__setNodeText(__pyx_v_c_node, __pyx_v_text); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(24, 84, __pyx_L1_error) __pyx_r = __pyx_t_2; goto __pyx_L0; @@ -222379,7 +205962,6 @@ int setNodeText(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_text) { __Pyx_AddTraceback("lxml.etree.setNodeText", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -222394,12 +205976,10 @@ int setNodeText(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_text) { int setTailText(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_text) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("setTailText", 0); - __Pyx_TraceCall("setTailText", __pyx_f[24], 86, 0, __PYX_ERR(24, 86, __pyx_L1_error)); /* "src/lxml/public-api.pxi":87 * @@ -222408,7 +205988,6 @@ int setTailText(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_text) { * raise ValueError * return _setTailText(c_node, text) */ - __Pyx_TraceLine(87,0,__PYX_ERR(24, 87, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -222419,7 +205998,6 @@ int setTailText(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_text) { * return _setTailText(c_node, text) * */ - __Pyx_TraceLine(88,0,__PYX_ERR(24, 88, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_ValueError, 0, 0, 0); __PYX_ERR(24, 88, __pyx_L1_error) @@ -222439,7 +206017,6 @@ int setTailText(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_text) { * * cdef public api object attributeValue(xmlNode* c_element, xmlAttr* c_attrib_node): */ - __Pyx_TraceLine(89,0,__PYX_ERR(24, 89, __pyx_L1_error)) __pyx_t_2 = __pyx_f_4lxml_5etree__setTailText(__pyx_v_c_node, __pyx_v_text); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(24, 89, __pyx_L1_error) __pyx_r = __pyx_t_2; goto __pyx_L0; @@ -222457,7 +206034,6 @@ int setTailText(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_text) { __Pyx_AddTraceback("lxml.etree.setTailText", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -222472,11 +206048,9 @@ int setTailText(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_text) { PyObject *attributeValue(xmlNode *__pyx_v_c_element, xmlAttr *__pyx_v_c_attrib_node) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("attributeValue", 0); - __Pyx_TraceCall("attributeValue", __pyx_f[24], 91, 0, __PYX_ERR(24, 91, __pyx_L1_error)); /* "src/lxml/public-api.pxi":92 * @@ -222485,7 +206059,6 @@ PyObject *attributeValue(xmlNode *__pyx_v_c_element, xmlAttr *__pyx_v_c_attrib_n * * cdef public api object attributeValueFromNsName(xmlNode* c_element, */ - __Pyx_TraceLine(92,0,__PYX_ERR(24, 92, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4lxml_5etree__attributeValue(__pyx_v_c_element, __pyx_v_c_attrib_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -222508,7 +206081,6 @@ PyObject *attributeValue(xmlNode *__pyx_v_c_element, xmlAttr *__pyx_v_c_attrib_n __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -222523,11 +206095,9 @@ PyObject *attributeValue(xmlNode *__pyx_v_c_element, xmlAttr *__pyx_v_c_attrib_n PyObject *attributeValueFromNsName(xmlNode *__pyx_v_c_element, const xmlChar *__pyx_v_ns, const xmlChar *__pyx_v_name) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("attributeValueFromNsName", 0); - __Pyx_TraceCall("attributeValueFromNsName", __pyx_f[24], 94, 0, __PYX_ERR(24, 94, __pyx_L1_error)); /* "src/lxml/public-api.pxi":96 * cdef public api object attributeValueFromNsName(xmlNode* c_element, @@ -222536,7 +206106,6 @@ PyObject *attributeValueFromNsName(xmlNode *__pyx_v_c_element, const xmlChar *__ * * cdef public api object getAttributeValue(_Element element, key, default): */ - __Pyx_TraceLine(96,0,__PYX_ERR(24, 96, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4lxml_5etree__attributeValueFromNsName(__pyx_v_c_element, __pyx_v_ns, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -222559,7 +206128,6 @@ PyObject *attributeValueFromNsName(xmlNode *__pyx_v_c_element, const xmlChar *__ __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -222574,12 +206142,10 @@ PyObject *attributeValueFromNsName(xmlNode *__pyx_v_c_element, const xmlChar *__ PyObject *getAttributeValue(struct LxmlElement *__pyx_v_element, PyObject *__pyx_v_key, PyObject *__pyx_v_default) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getAttributeValue", 0); - __Pyx_TraceCall("getAttributeValue", __pyx_f[24], 98, 0, __PYX_ERR(24, 98, __pyx_L1_error)); /* "src/lxml/public-api.pxi":99 * @@ -222588,7 +206154,6 @@ PyObject *getAttributeValue(struct LxmlElement *__pyx_v_element, PyObject *__pyx * return _getAttributeValue(element, key, default) * */ - __Pyx_TraceLine(99,0,__PYX_ERR(24, 99, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(24, 99, __pyx_L1_error) /* "src/lxml/public-api.pxi":100 @@ -222598,7 +206163,6 @@ PyObject *getAttributeValue(struct LxmlElement *__pyx_v_element, PyObject *__pyx * * cdef public api object iterattributes(_Element element, int keysvalues): */ - __Pyx_TraceLine(100,0,__PYX_ERR(24, 100, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_4lxml_5etree__getAttributeValue(__pyx_v_element, __pyx_v_key, __pyx_v_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(24, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -222621,7 +206185,6 @@ PyObject *getAttributeValue(struct LxmlElement *__pyx_v_element, PyObject *__pyx __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -222636,12 +206199,10 @@ PyObject *getAttributeValue(struct LxmlElement *__pyx_v_element, PyObject *__pyx PyObject *iterattributes(struct LxmlElement *__pyx_v_element, int __pyx_v_keysvalues) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("iterattributes", 0); - __Pyx_TraceCall("iterattributes", __pyx_f[24], 102, 0, __PYX_ERR(24, 102, __pyx_L1_error)); /* "src/lxml/public-api.pxi":103 * @@ -222650,7 +206211,6 @@ PyObject *iterattributes(struct LxmlElement *__pyx_v_element, int __pyx_v_keysva * return _attributeIteratorFactory(element, keysvalues) * */ - __Pyx_TraceLine(103,0,__PYX_ERR(24, 103, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(24, 103, __pyx_L1_error) /* "src/lxml/public-api.pxi":104 @@ -222660,7 +206220,6 @@ PyObject *iterattributes(struct LxmlElement *__pyx_v_element, int __pyx_v_keysva * * cdef public api list collectAttributes(xmlNode* c_element, int keysvalues): */ - __Pyx_TraceLine(104,0,__PYX_ERR(24, 104, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_4lxml_5etree__attributeIteratorFactory(__pyx_v_element, __pyx_v_keysvalues); if (unlikely(!__pyx_t_2)) __PYX_ERR(24, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -222683,7 +206242,6 @@ PyObject *iterattributes(struct LxmlElement *__pyx_v_element, int __pyx_v_keysva __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -222698,11 +206256,9 @@ PyObject *iterattributes(struct LxmlElement *__pyx_v_element, int __pyx_v_keysva PyObject *collectAttributes(xmlNode *__pyx_v_c_element, int __pyx_v_keysvalues) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("collectAttributes", 0); - __Pyx_TraceCall("collectAttributes", __pyx_f[24], 106, 0, __PYX_ERR(24, 106, __pyx_L1_error)); /* "src/lxml/public-api.pxi":107 * @@ -222711,7 +206267,6 @@ PyObject *collectAttributes(xmlNode *__pyx_v_c_element, int __pyx_v_keysvalues) * * cdef public api int setAttributeValue(_Element element, key, value) except -1: */ - __Pyx_TraceLine(107,0,__PYX_ERR(24, 107, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_c_element, __pyx_v_keysvalues); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -222734,7 +206289,6 @@ PyObject *collectAttributes(xmlNode *__pyx_v_c_element, int __pyx_v_keysvalues) __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -222749,11 +206303,9 @@ PyObject *collectAttributes(xmlNode *__pyx_v_c_element, int __pyx_v_keysvalues) int setAttributeValue(struct LxmlElement *__pyx_v_element, PyObject *__pyx_v_key, PyObject *__pyx_v_value) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("setAttributeValue", 0); - __Pyx_TraceCall("setAttributeValue", __pyx_f[24], 109, 0, __PYX_ERR(24, 109, __pyx_L1_error)); /* "src/lxml/public-api.pxi":110 * @@ -222762,7 +206314,6 @@ int setAttributeValue(struct LxmlElement *__pyx_v_element, PyObject *__pyx_v_key * return _setAttributeValue(element, key, value) * */ - __Pyx_TraceLine(110,0,__PYX_ERR(24, 110, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(24, 110, __pyx_L1_error) /* "src/lxml/public-api.pxi":111 @@ -222772,7 +206323,6 @@ int setAttributeValue(struct LxmlElement *__pyx_v_element, PyObject *__pyx_v_key * * cdef public api int delAttribute(_Element element, key) except -1: */ - __Pyx_TraceLine(111,0,__PYX_ERR(24, 111, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__setAttributeValue(__pyx_v_element, __pyx_v_key, __pyx_v_value); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(24, 111, __pyx_L1_error) __pyx_r = __pyx_t_1; goto __pyx_L0; @@ -222790,7 +206340,6 @@ int setAttributeValue(struct LxmlElement *__pyx_v_element, PyObject *__pyx_v_key __Pyx_AddTraceback("lxml.etree.setAttributeValue", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -222805,11 +206354,9 @@ int setAttributeValue(struct LxmlElement *__pyx_v_element, PyObject *__pyx_v_key int delAttribute(struct LxmlElement *__pyx_v_element, PyObject *__pyx_v_key) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("delAttribute", 0); - __Pyx_TraceCall("delAttribute", __pyx_f[24], 113, 0, __PYX_ERR(24, 113, __pyx_L1_error)); /* "src/lxml/public-api.pxi":114 * @@ -222818,7 +206365,6 @@ int delAttribute(struct LxmlElement *__pyx_v_element, PyObject *__pyx_v_key) { * return _delAttribute(element, key) * */ - __Pyx_TraceLine(114,0,__PYX_ERR(24, 114, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(24, 114, __pyx_L1_error) /* "src/lxml/public-api.pxi":115 @@ -222828,7 +206374,6 @@ int delAttribute(struct LxmlElement *__pyx_v_element, PyObject *__pyx_v_key) { * * cdef public api int delAttributeFromNsName(tree.xmlNode* c_element, */ - __Pyx_TraceLine(115,0,__PYX_ERR(24, 115, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__delAttribute(__pyx_v_element, __pyx_v_key); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(24, 115, __pyx_L1_error) __pyx_r = __pyx_t_1; goto __pyx_L0; @@ -222846,7 +206391,6 @@ int delAttribute(struct LxmlElement *__pyx_v_element, PyObject *__pyx_v_key) { __Pyx_AddTraceback("lxml.etree.delAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -222861,10 +206405,8 @@ int delAttribute(struct LxmlElement *__pyx_v_element, PyObject *__pyx_v_key) { int delAttributeFromNsName(xmlNode *__pyx_v_c_element, const xmlChar *__pyx_v_c_href, const xmlChar *__pyx_v_c_name) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("delAttributeFromNsName", 0); - __Pyx_TraceCall("delAttributeFromNsName", __pyx_f[24], 117, 0, __PYX_ERR(24, 117, __pyx_L1_error)); /* "src/lxml/public-api.pxi":119 * cdef public api int delAttributeFromNsName(tree.xmlNode* c_element, @@ -222873,7 +206415,6 @@ int delAttributeFromNsName(xmlNode *__pyx_v_c_element, const xmlChar *__pyx_v_c_ * * cdef public api bint hasChild(xmlNode* c_node): */ - __Pyx_TraceLine(119,0,__PYX_ERR(24, 119, __pyx_L1_error)) __pyx_r = __pyx_f_4lxml_5etree__delAttributeFromNsName(__pyx_v_c_element, __pyx_v_c_href, __pyx_v_c_name); goto __pyx_L0; @@ -222886,11 +206427,7 @@ int delAttributeFromNsName(xmlNode *__pyx_v_c_element, const xmlChar *__pyx_v_c_ */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.delAttributeFromNsName", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -222905,10 +206442,8 @@ int delAttributeFromNsName(xmlNode *__pyx_v_c_element, const xmlChar *__pyx_v_c_ int hasChild(xmlNode *__pyx_v_c_node) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("hasChild", 0); - __Pyx_TraceCall("hasChild", __pyx_f[24], 121, 0, __PYX_ERR(24, 121, __pyx_L1_error)); /* "src/lxml/public-api.pxi":122 * @@ -222917,7 +206452,6 @@ int hasChild(xmlNode *__pyx_v_c_node) { * * cdef public api xmlNode* findChild(xmlNode* c_node, Py_ssize_t index): */ - __Pyx_TraceLine(122,0,__PYX_ERR(24, 122, __pyx_L1_error)) __pyx_r = __pyx_f_4lxml_5etree__hasChild(__pyx_v_c_node); goto __pyx_L0; @@ -222930,11 +206464,7 @@ int hasChild(xmlNode *__pyx_v_c_node) { */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.hasChild", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -222949,10 +206479,8 @@ int hasChild(xmlNode *__pyx_v_c_node) { xmlNode *findChild(xmlNode *__pyx_v_c_node, Py_ssize_t __pyx_v_index) { xmlNode *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("findChild", 0); - __Pyx_TraceCall("findChild", __pyx_f[24], 124, 0, __PYX_ERR(24, 124, __pyx_L1_error)); /* "src/lxml/public-api.pxi":125 * @@ -222961,7 +206489,6 @@ xmlNode *findChild(xmlNode *__pyx_v_c_node, Py_ssize_t __pyx_v_index) { * * cdef public api xmlNode* findChildForwards(xmlNode* c_node, Py_ssize_t index): */ - __Pyx_TraceLine(125,0,__PYX_ERR(24, 125, __pyx_L1_error)) __pyx_r = __pyx_f_4lxml_5etree__findChild(__pyx_v_c_node, __pyx_v_index); goto __pyx_L0; @@ -222974,11 +206501,7 @@ xmlNode *findChild(xmlNode *__pyx_v_c_node, Py_ssize_t __pyx_v_index) { */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.findChild", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -222993,10 +206516,8 @@ xmlNode *findChild(xmlNode *__pyx_v_c_node, Py_ssize_t __pyx_v_index) { xmlNode *findChildForwards(xmlNode *__pyx_v_c_node, Py_ssize_t __pyx_v_index) { xmlNode *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("findChildForwards", 0); - __Pyx_TraceCall("findChildForwards", __pyx_f[24], 127, 0, __PYX_ERR(24, 127, __pyx_L1_error)); /* "src/lxml/public-api.pxi":128 * @@ -223005,7 +206526,6 @@ xmlNode *findChildForwards(xmlNode *__pyx_v_c_node, Py_ssize_t __pyx_v_index) { * * cdef public api xmlNode* findChildBackwards(xmlNode* c_node, Py_ssize_t index): */ - __Pyx_TraceLine(128,0,__PYX_ERR(24, 128, __pyx_L1_error)) __pyx_r = __pyx_f_4lxml_5etree__findChildForwards(__pyx_v_c_node, __pyx_v_index); goto __pyx_L0; @@ -223018,11 +206538,7 @@ xmlNode *findChildForwards(xmlNode *__pyx_v_c_node, Py_ssize_t __pyx_v_index) { */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.findChildForwards", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -223037,10 +206553,8 @@ xmlNode *findChildForwards(xmlNode *__pyx_v_c_node, Py_ssize_t __pyx_v_index) { xmlNode *findChildBackwards(xmlNode *__pyx_v_c_node, Py_ssize_t __pyx_v_index) { xmlNode *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("findChildBackwards", 0); - __Pyx_TraceCall("findChildBackwards", __pyx_f[24], 130, 0, __PYX_ERR(24, 130, __pyx_L1_error)); /* "src/lxml/public-api.pxi":131 * @@ -223049,7 +206563,6 @@ xmlNode *findChildBackwards(xmlNode *__pyx_v_c_node, Py_ssize_t __pyx_v_index) { * * cdef public api xmlNode* nextElement(xmlNode* c_node): */ - __Pyx_TraceLine(131,0,__PYX_ERR(24, 131, __pyx_L1_error)) __pyx_r = __pyx_f_4lxml_5etree__findChildBackwards(__pyx_v_c_node, __pyx_v_index); goto __pyx_L0; @@ -223062,11 +206575,7 @@ xmlNode *findChildBackwards(xmlNode *__pyx_v_c_node, Py_ssize_t __pyx_v_index) { */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.findChildBackwards", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -223081,10 +206590,8 @@ xmlNode *findChildBackwards(xmlNode *__pyx_v_c_node, Py_ssize_t __pyx_v_index) { xmlNode *nextElement(xmlNode *__pyx_v_c_node) { xmlNode *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("nextElement", 0); - __Pyx_TraceCall("nextElement", __pyx_f[24], 133, 0, __PYX_ERR(24, 133, __pyx_L1_error)); /* "src/lxml/public-api.pxi":134 * @@ -223093,7 +206600,6 @@ xmlNode *nextElement(xmlNode *__pyx_v_c_node) { * * cdef public api xmlNode* previousElement(xmlNode* c_node): */ - __Pyx_TraceLine(134,0,__PYX_ERR(24, 134, __pyx_L1_error)) __pyx_r = __pyx_f_4lxml_5etree__nextElement(__pyx_v_c_node); goto __pyx_L0; @@ -223106,11 +206612,7 @@ xmlNode *nextElement(xmlNode *__pyx_v_c_node) { */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.nextElement", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -223125,10 +206627,8 @@ xmlNode *nextElement(xmlNode *__pyx_v_c_node) { xmlNode *previousElement(xmlNode *__pyx_v_c_node) { xmlNode *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("previousElement", 0); - __Pyx_TraceCall("previousElement", __pyx_f[24], 136, 0, __PYX_ERR(24, 136, __pyx_L1_error)); /* "src/lxml/public-api.pxi":137 * @@ -223137,7 +206637,6 @@ xmlNode *previousElement(xmlNode *__pyx_v_c_node) { * * cdef public api void appendChild(_Element parent, _Element child): */ - __Pyx_TraceLine(137,0,__PYX_ERR(24, 137, __pyx_L1_error)) __pyx_r = __pyx_f_4lxml_5etree__previousElement(__pyx_v_c_node); goto __pyx_L0; @@ -223150,11 +206649,7 @@ xmlNode *previousElement(xmlNode *__pyx_v_c_node) { */ /* function exit code */ - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.previousElement", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_r = 0; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -223168,11 +206663,9 @@ xmlNode *previousElement(xmlNode *__pyx_v_c_node) { */ void appendChild(struct LxmlElement *__pyx_v_parent, struct LxmlElement *__pyx_v_child) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("appendChild", 0); - __Pyx_TraceCall("appendChild", __pyx_f[24], 139, 0, __PYX_ERR(24, 139, __pyx_L1_error)); /* "src/lxml/public-api.pxi":141 * cdef public api void appendChild(_Element parent, _Element child): @@ -223181,7 +206674,6 @@ void appendChild(struct LxmlElement *__pyx_v_parent, struct LxmlElement *__pyx_v * * cdef public api int appendChildToElement(_Element parent, _Element child) except -1: */ - __Pyx_TraceLine(141,0,__PYX_ERR(24, 141, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__appendChild(__pyx_v_parent, __pyx_v_child); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(24, 141, __pyx_L1_error) /* "src/lxml/public-api.pxi":139 @@ -223197,7 +206689,6 @@ void appendChild(struct LxmlElement *__pyx_v_parent, struct LxmlElement *__pyx_v __pyx_L1_error:; __Pyx_WriteUnraisable("lxml.etree.appendChild", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -223211,11 +206702,9 @@ void appendChild(struct LxmlElement *__pyx_v_parent, struct LxmlElement *__pyx_v int appendChildToElement(struct LxmlElement *__pyx_v_parent, struct LxmlElement *__pyx_v_child) { int __pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("appendChildToElement", 0); - __Pyx_TraceCall("appendChildToElement", __pyx_f[24], 143, 0, __PYX_ERR(24, 143, __pyx_L1_error)); /* "src/lxml/public-api.pxi":144 * @@ -223224,7 +206713,6 @@ int appendChildToElement(struct LxmlElement *__pyx_v_parent, struct LxmlElement * * cdef public api object pyunicode(const_xmlChar* s): */ - __Pyx_TraceLine(144,0,__PYX_ERR(24, 144, __pyx_L1_error)) __pyx_t_1 = __pyx_f_4lxml_5etree__appendChild(__pyx_v_parent, __pyx_v_child); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(24, 144, __pyx_L1_error) __pyx_r = __pyx_t_1; goto __pyx_L0; @@ -223242,7 +206730,6 @@ int appendChildToElement(struct LxmlElement *__pyx_v_parent, struct LxmlElement __Pyx_AddTraceback("lxml.etree.appendChildToElement", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -223257,12 +206744,10 @@ int appendChildToElement(struct LxmlElement *__pyx_v_parent, struct LxmlElement PyObject *pyunicode(const xmlChar *__pyx_v_s) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("pyunicode", 0); - __Pyx_TraceCall("pyunicode", __pyx_f[24], 146, 0, __PYX_ERR(24, 146, __pyx_L1_error)); /* "src/lxml/public-api.pxi":147 * @@ -223271,7 +206756,6 @@ PyObject *pyunicode(const xmlChar *__pyx_v_s) { * raise TypeError * return funicode(s) */ - __Pyx_TraceLine(147,0,__PYX_ERR(24, 147, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_s == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -223282,7 +206766,6 @@ PyObject *pyunicode(const xmlChar *__pyx_v_s) { * return funicode(s) * */ - __Pyx_TraceLine(148,0,__PYX_ERR(24, 148, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0); __PYX_ERR(24, 148, __pyx_L1_error) @@ -223302,7 +206785,6 @@ PyObject *pyunicode(const xmlChar *__pyx_v_s) { * * cdef public api bytes utf8(object s): */ - __Pyx_TraceLine(149,0,__PYX_ERR(24, 149, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(24, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -223325,7 +206807,6 @@ PyObject *pyunicode(const xmlChar *__pyx_v_s) { __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -223340,11 +206821,9 @@ PyObject *pyunicode(const xmlChar *__pyx_v_s) { PyObject *utf8(PyObject *__pyx_v_s) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("utf8", 0); - __Pyx_TraceCall("utf8", __pyx_f[24], 151, 0, __PYX_ERR(24, 151, __pyx_L1_error)); /* "src/lxml/public-api.pxi":152 * @@ -223353,7 +206832,6 @@ PyObject *utf8(PyObject *__pyx_v_s) { * * cdef public api tuple getNsTag(object tag): */ - __Pyx_TraceLine(152,0,__PYX_ERR(24, 152, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -223376,7 +206854,6 @@ PyObject *utf8(PyObject *__pyx_v_s) { __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -223391,11 +206868,9 @@ PyObject *utf8(PyObject *__pyx_v_s) { PyObject *getNsTag(PyObject *__pyx_v_tag) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("getNsTag", 0); - __Pyx_TraceCall("getNsTag", __pyx_f[24], 154, 0, __PYX_ERR(24, 154, __pyx_L1_error)); /* "src/lxml/public-api.pxi":155 * @@ -223404,7 +206879,6 @@ PyObject *getNsTag(PyObject *__pyx_v_tag) { * * cdef public api tuple getNsTagWithEmptyNs(object tag): */ - __Pyx_TraceLine(155,0,__PYX_ERR(24, 155, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -223427,7 +206901,6 @@ PyObject *getNsTag(PyObject *__pyx_v_tag) { __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -223442,11 +206915,9 @@ PyObject *getNsTag(PyObject *__pyx_v_tag) { PyObject *getNsTagWithEmptyNs(PyObject *__pyx_v_tag) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("getNsTagWithEmptyNs", 0); - __Pyx_TraceCall("getNsTagWithEmptyNs", __pyx_f[24], 157, 0, __PYX_ERR(24, 157, __pyx_L1_error)); /* "src/lxml/public-api.pxi":158 * @@ -223455,7 +206926,6 @@ PyObject *getNsTagWithEmptyNs(PyObject *__pyx_v_tag) { * * cdef public api object namespacedName(xmlNode* c_node): */ - __Pyx_TraceLine(158,0,__PYX_ERR(24, 158, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4lxml_5etree__getNsTagWithEmptyNs(__pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -223478,7 +206948,6 @@ PyObject *getNsTagWithEmptyNs(PyObject *__pyx_v_tag) { __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -223493,11 +206962,9 @@ PyObject *getNsTagWithEmptyNs(PyObject *__pyx_v_tag) { PyObject *namespacedName(xmlNode *__pyx_v_c_node) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("namespacedName", 0); - __Pyx_TraceCall("namespacedName", __pyx_f[24], 160, 0, __PYX_ERR(24, 160, __pyx_L1_error)); /* "src/lxml/public-api.pxi":161 * @@ -223506,7 +206973,6 @@ PyObject *namespacedName(xmlNode *__pyx_v_c_node) { * * cdef public api object namespacedNameFromNsName(const_xmlChar* href, const_xmlChar* name): */ - __Pyx_TraceLine(161,0,__PYX_ERR(24, 161, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4lxml_5etree__namespacedName(__pyx_v_c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -223529,7 +206995,6 @@ PyObject *namespacedName(xmlNode *__pyx_v_c_node) { __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -223544,11 +207009,9 @@ PyObject *namespacedName(xmlNode *__pyx_v_c_node) { PyObject *namespacedNameFromNsName(const xmlChar *__pyx_v_href, const xmlChar *__pyx_v_name) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("namespacedNameFromNsName", 0); - __Pyx_TraceCall("namespacedNameFromNsName", __pyx_f[24], 163, 0, __PYX_ERR(24, 163, __pyx_L1_error)); /* "src/lxml/public-api.pxi":164 * @@ -223557,7 +207020,6 @@ PyObject *namespacedNameFromNsName(const xmlChar *__pyx_v_href, const xmlChar *_ * * cdef public api void iteratorStoreNext(_ElementIterator iterator, _Element node): */ - __Pyx_TraceLine(164,0,__PYX_ERR(24, 164, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4lxml_5etree__namespacedNameFromNsName(__pyx_v_href, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -223580,7 +207042,6 @@ PyObject *namespacedNameFromNsName(const xmlChar *__pyx_v_href, const xmlChar *_ __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -223594,10 +207055,8 @@ PyObject *namespacedNameFromNsName(const xmlChar *__pyx_v_href, const xmlChar *_ */ void iteratorStoreNext(struct LxmlElementIterator *__pyx_v_iterator, struct LxmlElement *__pyx_v_node) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("iteratorStoreNext", 0); - __Pyx_TraceCall("iteratorStoreNext", __pyx_f[24], 166, 0, __PYX_ERR(24, 166, __pyx_L1_error)); /* "src/lxml/public-api.pxi":168 * cdef public api void iteratorStoreNext(_ElementIterator iterator, _Element node): @@ -223606,7 +207065,6 @@ void iteratorStoreNext(struct LxmlElementIterator *__pyx_v_iterator, struct Lxml * * cdef public api void initTagMatch(_ElementTagMatcher matcher, tag): */ - __Pyx_TraceLine(168,0,__PYX_ERR(24, 168, __pyx_L1_error)) ((struct __pyx_vtabstruct_4lxml_5etree__ElementIterator *)__pyx_v_iterator->__pyx_base.__pyx_vtab)->_storeNext(__pyx_v_iterator, __pyx_v_node); /* "src/lxml/public-api.pxi":166 @@ -223618,11 +207076,6 @@ void iteratorStoreNext(struct LxmlElementIterator *__pyx_v_iterator, struct Lxml */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("lxml.etree.iteratorStoreNext", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -223635,11 +207088,9 @@ void iteratorStoreNext(struct LxmlElementIterator *__pyx_v_iterator, struct Lxml */ void initTagMatch(struct LxmlElementTagMatcher *__pyx_v_matcher, PyObject *__pyx_v_tag) { - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("initTagMatch", 0); - __Pyx_TraceCall("initTagMatch", __pyx_f[24], 170, 0, __PYX_ERR(24, 170, __pyx_L1_error)); /* "src/lxml/public-api.pxi":172 * cdef public api void initTagMatch(_ElementTagMatcher matcher, tag): @@ -223648,7 +207099,6 @@ void initTagMatch(struct LxmlElementTagMatcher *__pyx_v_matcher, PyObject *__pyx * * cdef public api tree.xmlNs* findOrBuildNodeNsPrefix( */ - __Pyx_TraceLine(172,0,__PYX_ERR(24, 172, __pyx_L1_error)) __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ElementTagMatcher *)__pyx_v_matcher->__pyx_vtab)->_initTagMatch(__pyx_v_matcher, __pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -223667,7 +207117,6 @@ void initTagMatch(struct LxmlElementTagMatcher *__pyx_v_matcher, PyObject *__pyx __Pyx_XDECREF(__pyx_t_1); __Pyx_WriteUnraisable("lxml.etree.initTagMatch", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); } @@ -223681,13 +207130,11 @@ void initTagMatch(struct LxmlElementTagMatcher *__pyx_v_matcher, PyObject *__pyx xmlNs *findOrBuildNodeNsPrefix(struct LxmlDocument *__pyx_v_doc, xmlNode *__pyx_v_c_node, const xmlChar *__pyx_v_href, const xmlChar *__pyx_v_prefix) { xmlNs *__pyx_r; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; xmlNs *__pyx_t_3; __Pyx_RefNannySetupContext("findOrBuildNodeNsPrefix", 0); - __Pyx_TraceCall("findOrBuildNodeNsPrefix", __pyx_f[24], 174, 0, __PYX_ERR(24, 174, __pyx_L1_error)); /* "src/lxml/public-api.pxi":176 * cdef public api tree.xmlNs* findOrBuildNodeNsPrefix( @@ -223696,7 +207143,6 @@ xmlNs *findOrBuildNodeNsPrefix(struct LxmlDocument *__pyx_v_doc, xmlNode *__pyx_ * raise TypeError * return doc._findOrBuildNodeNs(c_node, href, prefix, 0) */ - __Pyx_TraceLine(176,0,__PYX_ERR(24, 176, __pyx_L1_error)) __pyx_t_1 = (((PyObject *)__pyx_v_doc) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { @@ -223707,7 +207153,6 @@ xmlNs *findOrBuildNodeNsPrefix(struct LxmlDocument *__pyx_v_doc, xmlNode *__pyx_ * raise TypeError # <<<<<<<<<<<<<< * return doc._findOrBuildNodeNs(c_node, href, prefix, 0) */ - __Pyx_TraceLine(177,0,__PYX_ERR(24, 177, __pyx_L1_error)) __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0); __PYX_ERR(24, 177, __pyx_L1_error) @@ -223725,7 +207170,6 @@ xmlNs *findOrBuildNodeNsPrefix(struct LxmlDocument *__pyx_v_doc, xmlNode *__pyx_ * raise TypeError * return doc._findOrBuildNodeNs(c_node, href, prefix, 0) # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(178,0,__PYX_ERR(24, 178, __pyx_L1_error)) __pyx_t_3 = __pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(__pyx_v_doc, __pyx_v_c_node, __pyx_v_href, __pyx_v_prefix, 0); if (unlikely(__pyx_t_3 == ((xmlNs *)NULL))) __PYX_ERR(24, 178, __pyx_L1_error) __pyx_r = __pyx_t_3; goto __pyx_L0; @@ -223743,7 +207187,6 @@ xmlNs *findOrBuildNodeNsPrefix(struct LxmlDocument *__pyx_v_doc, xmlNode *__pyx_ __Pyx_AddTraceback("lxml.etree.findOrBuildNodeNsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -223773,12 +207216,9 @@ static PyObject *__pyx_pw_4lxml_5etree_9_MemDebug_1bytes_used(PyObject *__pyx_v_ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_bytes_used(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree__MemDebug *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__394) __Pyx_RefNannySetupContext("bytes_used", 0); - __Pyx_TraceCall("bytes_used", __pyx_f[25], 7, 0, __PYX_ERR(25, 7, __pyx_L1_error)); /* "src/lxml/debug.pxi":14 * the accuracy on 64 bit systems. @@ -223787,7 +207227,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_bytes_used(CYTHON_UNUSED struc * * def blocks_used(self): */ - __Pyx_TraceLine(14,0,__PYX_ERR(25, 14, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(xmlMemUsed()); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -223810,7 +207249,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_bytes_used(CYTHON_UNUSED struc __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -223840,12 +207278,9 @@ static PyObject *__pyx_pw_4lxml_5etree_9_MemDebug_3blocks_used(PyObject *__pyx_v static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_2blocks_used(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree__MemDebug *__pyx_v_self) { PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__395) __Pyx_RefNannySetupContext("blocks_used", 0); - __Pyx_TraceCall("blocks_used", __pyx_f[25], 16, 0, __PYX_ERR(25, 16, __pyx_L1_error)); /* "src/lxml/debug.pxi":23 * the accuracy on 64 bit systems. @@ -223854,7 +207289,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_2blocks_used(CYTHON_UNUSED str * * def dict_size(self): */ - __Pyx_TraceLine(23,0,__PYX_ERR(25, 23, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(xmlMemBlocks()); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -223877,7 +207311,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_2blocks_used(CYTHON_UNUSED str __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -223908,13 +207341,10 @@ static PyObject *__pyx_pw_4lxml_5etree_9_MemDebug_5dict_size(PyObject *__pyx_v_s static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_4dict_size(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree__MemDebug *__pyx_v_self) { xmlDict *__pyx_v_c_dict; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__396) __Pyx_RefNannySetupContext("dict_size", 0); - __Pyx_TraceCall("dict_size", __pyx_f[25], 25, 0, __PYX_ERR(25, 25, __pyx_L1_error)); /* "src/lxml/debug.pxi":31 * for the current thread. Each thread has its own dictionary. @@ -223923,7 +207353,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_4dict_size(CYTHON_UNUSED struc * if c_dict is NULL: * raise MemoryError() */ - __Pyx_TraceLine(31,0,__PYX_ERR(25, 31, __pyx_L1_error)) __pyx_v_c_dict = __pyx_f_4lxml_5etree_24_ParserDictionaryContext__getThreadDict(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, NULL); /* "src/lxml/debug.pxi":32 @@ -223933,7 +207362,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_4dict_size(CYTHON_UNUSED struc * raise MemoryError() * return tree.xmlDictSize(c_dict) */ - __Pyx_TraceLine(32,0,__PYX_ERR(25, 32, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_c_dict == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -223944,7 +207372,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_4dict_size(CYTHON_UNUSED struc * return tree.xmlDictSize(c_dict) * */ - __Pyx_TraceLine(33,0,__PYX_ERR(25, 33, __pyx_L1_error)) PyErr_NoMemory(); __PYX_ERR(25, 33, __pyx_L1_error) /* "src/lxml/debug.pxi":32 @@ -223963,7 +207390,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_4dict_size(CYTHON_UNUSED struc * * def dump(self, output_file=None, byte_count=None): */ - __Pyx_TraceLine(34,0,__PYX_ERR(25, 34, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_FromSize_t(xmlDictSize(__pyx_v_c_dict)); if (unlikely(!__pyx_t_2)) __PYX_ERR(25, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -223986,7 +207412,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_4dict_size(CYTHON_UNUSED struc __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -224002,7 +207427,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_4dict_size(CYTHON_UNUSED struc /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_9_MemDebug_7dump(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_9_MemDebug_6dump[] = "dump(self, output_file=None, byte_count=None)\n\n Dumps the current memory blocks allocated by libxml2 to a file.\n\n The optional parameter 'output_file' specifies the file path. It defaults\n to the file \".memorylist\" in the current directory.\n\n The optional parameter 'byte_count' limits the number of bytes in the dump.\n Note that this parameter is ignored when lxml is compiled against a libxml2\n version before 2.7.0.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_9_MemDebug_7dump = {"dump", (PyCFunction)__pyx_pw_4lxml_5etree_9_MemDebug_7dump, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_9_MemDebug_6dump}; +static PyMethodDef __pyx_mdef_4lxml_5etree_9_MemDebug_7dump = {"dump", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_9_MemDebug_7dump, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_9_MemDebug_6dump}; static PyObject *__pyx_pw_4lxml_5etree_9_MemDebug_7dump(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_output_file = 0; PyObject *__pyx_v_byte_count = 0; @@ -224074,7 +207499,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_6dump(CYTHON_UNUSED struct __p Py_ssize_t __pyx_v_c_count; FILE *__pyx_v_f; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -224094,9 +207518,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_6dump(CYTHON_UNUSED struct __p PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__397) __Pyx_RefNannySetupContext("dump", 0); - __Pyx_TraceCall("dump", __pyx_f[25], 36, 0, __PYX_ERR(25, 36, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_output_file); /* "src/lxml/debug.pxi":49 @@ -224106,7 +207528,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_6dump(CYTHON_UNUSED struct __p * output_file = b'.memorylist' * elif isinstance(output_file, unicode): */ - __Pyx_TraceLine(49,0,__PYX_ERR(25, 49, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_output_file == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -224118,7 +207539,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_6dump(CYTHON_UNUSED struct __p * elif isinstance(output_file, unicode): * output_file.encode(sys.getfilesystemencoding()) */ - __Pyx_TraceLine(50,0,__PYX_ERR(25, 50, __pyx_L1_error)) __Pyx_INCREF(__pyx_kp_b_memorylist); __Pyx_DECREF_SET(__pyx_v_output_file, __pyx_kp_b_memorylist); @@ -224139,7 +207559,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_6dump(CYTHON_UNUSED struct __p * output_file.encode(sys.getfilesystemencoding()) * */ - __Pyx_TraceLine(51,0,__PYX_ERR(25, 51, __pyx_L1_error)) __pyx_t_2 = PyUnicode_Check(__pyx_v_output_file); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -224151,7 +207570,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_6dump(CYTHON_UNUSED struct __p * * f = stdio.fopen(output_file, "w") */ - __Pyx_TraceLine(52,0,__PYX_ERR(25, 52, __pyx_L1_error)) __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_output_file, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(25, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_getfilesystemencoding); if (unlikely(!__pyx_t_6)) __PYX_ERR(25, 52, __pyx_L1_error) @@ -224166,12 +207584,9 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_6dump(CYTHON_UNUSED struct __p __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (__pyx_t_7) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(25, 52, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else { - __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(25, 52, __pyx_L1_error) - } + __pyx_t_5 = (__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_5)) __PYX_ERR(25, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -224184,41 +207599,11 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_6dump(CYTHON_UNUSED struct __p __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 52, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 52, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 52, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else - #endif - { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(25, 52, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5); - __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 52, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - } + __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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_3)) __PYX_ERR(25, 52, __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; @@ -224239,7 +207624,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_6dump(CYTHON_UNUSED struct __p * if f is NULL: * raise IOError(f"Failed to create file {output_file.decode(sys.getfilesystemencoding())}") */ - __Pyx_TraceLine(54,0,__PYX_ERR(25, 54, __pyx_L1_error)) __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_output_file); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(25, 54, __pyx_L1_error) __pyx_v_f = fopen(__pyx_t_8, ((char const *)"w")); @@ -224250,7 +207634,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_6dump(CYTHON_UNUSED struct __p * raise IOError(f"Failed to create file {output_file.decode(sys.getfilesystemencoding())}") * try: */ - __Pyx_TraceLine(55,0,__PYX_ERR(25, 55, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_f == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -224261,74 +207644,40 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_6dump(CYTHON_UNUSED struct __p * try: * if byte_count is None: */ - __Pyx_TraceLine(56,0,__PYX_ERR(25, 56, __pyx_L1_error)) __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_output_file, __pyx_n_s_decode); if (unlikely(!__pyx_t_4)) __PYX_ERR(25, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_getfilesystemencoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(25, 56, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_getfilesystemencoding); if (unlikely(!__pyx_t_6)) __PYX_ERR(25, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); + __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (__pyx_t_6) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(25, 56, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(25, 56, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; + __pyx_t_5 = (__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_5)) __PYX_ERR(25, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 56, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 56, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 56, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(25, 56, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7); - __pyx_t_7 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 56, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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_3)) __PYX_ERR(25, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(25, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -224359,7 +207708,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_6dump(CYTHON_UNUSED struct __p * if byte_count is None: * tree.xmlMemDisplay(f) */ - __Pyx_TraceLine(57,0,__PYX_ERR(25, 57, __pyx_L6_error)) /*try:*/ { /* "src/lxml/debug.pxi":58 @@ -224369,7 +207717,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_6dump(CYTHON_UNUSED struct __p * tree.xmlMemDisplay(f) * else: */ - __Pyx_TraceLine(58,0,__PYX_ERR(25, 58, __pyx_L6_error)) __pyx_t_1 = (__pyx_v_byte_count == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -224381,7 +207728,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_6dump(CYTHON_UNUSED struct __p * else: * c_count = byte_count */ - __Pyx_TraceLine(59,0,__PYX_ERR(25, 59, __pyx_L6_error)) xmlMemDisplay(__pyx_v_f); /* "src/lxml/debug.pxi":58 @@ -224401,7 +207747,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_6dump(CYTHON_UNUSED struct __p * tree.xmlMemDisplayLast(f, c_count) * finally: */ - __Pyx_TraceLine(61,0,__PYX_ERR(25, 61, __pyx_L6_error)) /*else*/ { __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_byte_count); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(25, 61, __pyx_L6_error) __pyx_v_c_count = __pyx_t_9; @@ -224413,7 +207758,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_6dump(CYTHON_UNUSED struct __p * finally: * stdio.fclose(f) */ - __Pyx_TraceLine(62,0,__PYX_ERR(25, 62, __pyx_L6_error)) xmlMemDisplayLast(__pyx_v_f, __pyx_v_c_count); } __pyx_L8:; @@ -224426,7 +207770,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_6dump(CYTHON_UNUSED struct __p * * def show(self, output_file=None, block_count=None): */ - __Pyx_TraceLine(64,0,__PYX_ERR(25, 64, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ (void)(fclose(__pyx_v_f)); @@ -224437,9 +207780,9 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_6dump(CYTHON_UNUSED struct __p __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); @@ -224493,7 +207836,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_6dump(CYTHON_UNUSED struct __p __pyx_L0:; __Pyx_XDECREF(__pyx_v_output_file); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -224509,7 +207851,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_6dump(CYTHON_UNUSED struct __p /* Python wrapper */ static PyObject *__pyx_pw_4lxml_5etree_9_MemDebug_9show(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_5etree_9_MemDebug_8show[] = "show(self, output_file=None, block_count=None)\n\n Dumps the current memory blocks allocated by libxml2 to a file.\n The output file format is suitable for line diffing.\n\n The optional parameter 'output_file' specifies the file path. It defaults\n to the file \".memorydump\" in the current directory.\n\n The optional parameter 'block_count' limits the number of blocks\n in the dump.\n "; -static PyMethodDef __pyx_mdef_4lxml_5etree_9_MemDebug_9show = {"show", (PyCFunction)__pyx_pw_4lxml_5etree_9_MemDebug_9show, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_9_MemDebug_8show}; +static PyMethodDef __pyx_mdef_4lxml_5etree_9_MemDebug_9show = {"show", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_9_MemDebug_9show, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_9_MemDebug_8show}; static PyObject *__pyx_pw_4lxml_5etree_9_MemDebug_9show(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_output_file = 0; PyObject *__pyx_v_block_count = 0; @@ -224580,7 +207922,6 @@ static PyObject *__pyx_pw_4lxml_5etree_9_MemDebug_9show(PyObject *__pyx_v_self, static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_8show(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree__MemDebug *__pyx_v_self, PyObject *__pyx_v_output_file, PyObject *__pyx_v_block_count) { FILE *__pyx_v_f; PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -224599,9 +207940,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_8show(CYTHON_UNUSED struct __p PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; - __Pyx_TraceFrameInit(__pyx_codeobj__398) __Pyx_RefNannySetupContext("show", 0); - __Pyx_TraceCall("show", __pyx_f[25], 66, 0, __PYX_ERR(25, 66, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_output_file); /* "src/lxml/debug.pxi":78 @@ -224611,7 +207950,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_8show(CYTHON_UNUSED struct __p * output_file = b'.memorydump' * elif isinstance(output_file, unicode): */ - __Pyx_TraceLine(78,0,__PYX_ERR(25, 78, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_output_file == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { @@ -224623,7 +207961,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_8show(CYTHON_UNUSED struct __p * elif isinstance(output_file, unicode): * output_file.encode(sys.getfilesystemencoding()) */ - __Pyx_TraceLine(79,0,__PYX_ERR(25, 79, __pyx_L1_error)) __Pyx_INCREF(__pyx_kp_b_memorydump); __Pyx_DECREF_SET(__pyx_v_output_file, __pyx_kp_b_memorydump); @@ -224644,7 +207981,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_8show(CYTHON_UNUSED struct __p * output_file.encode(sys.getfilesystemencoding()) * */ - __Pyx_TraceLine(80,0,__PYX_ERR(25, 80, __pyx_L1_error)) __pyx_t_2 = PyUnicode_Check(__pyx_v_output_file); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { @@ -224656,7 +207992,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_8show(CYTHON_UNUSED struct __p * * f = stdio.fopen(output_file, "w") */ - __Pyx_TraceLine(81,0,__PYX_ERR(25, 81, __pyx_L1_error)) __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_output_file, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(25, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_getfilesystemencoding); if (unlikely(!__pyx_t_6)) __PYX_ERR(25, 81, __pyx_L1_error) @@ -224671,12 +208006,9 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_8show(CYTHON_UNUSED struct __p __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (__pyx_t_7) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(25, 81, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else { - __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(25, 81, __pyx_L1_error) - } + __pyx_t_5 = (__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_5)) __PYX_ERR(25, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -224689,41 +208021,11 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_8show(CYTHON_UNUSED struct __p __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 81, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 81, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 81, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else - #endif - { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(25, 81, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5); - __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 81, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - } + __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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_3)) __PYX_ERR(25, 81, __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; @@ -224744,7 +208046,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_8show(CYTHON_UNUSED struct __p * if f is NULL: * raise IOError(f"Failed to create file {output_file.decode(sys.getfilesystemencoding())}") */ - __Pyx_TraceLine(83,0,__PYX_ERR(25, 83, __pyx_L1_error)) __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_output_file); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(25, 83, __pyx_L1_error) __pyx_v_f = fopen(__pyx_t_8, ((char const *)"w")); @@ -224755,7 +208056,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_8show(CYTHON_UNUSED struct __p * raise IOError(f"Failed to create file {output_file.decode(sys.getfilesystemencoding())}") * try: */ - __Pyx_TraceLine(84,0,__PYX_ERR(25, 84, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_f == NULL) != 0); if (unlikely(__pyx_t_1)) { @@ -224766,74 +208066,40 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_8show(CYTHON_UNUSED struct __p * try: * tree.xmlMemShow(f, block_count if block_count is not None else tree.xmlMemBlocks()) */ - __Pyx_TraceLine(85,0,__PYX_ERR(25, 85, __pyx_L1_error)) __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_output_file, __pyx_n_s_decode); if (unlikely(!__pyx_t_4)) __PYX_ERR(25, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_getfilesystemencoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(25, 85, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_getfilesystemencoding); if (unlikely(!__pyx_t_6)) __PYX_ERR(25, 85, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); + __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (__pyx_t_6) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(25, 85, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(25, 85, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; + __pyx_t_5 = (__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_5)) __PYX_ERR(25, 85, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 85, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 85, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 85, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(25, 85, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7); - __pyx_t_7 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 85, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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_3)) __PYX_ERR(25, 85, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(25, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -224864,7 +208130,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_8show(CYTHON_UNUSED struct __p * tree.xmlMemShow(f, block_count if block_count is not None else tree.xmlMemBlocks()) * finally: */ - __Pyx_TraceLine(86,0,__PYX_ERR(25, 86, __pyx_L6_error)) /*try:*/ { /* "src/lxml/debug.pxi":87 @@ -224874,7 +208139,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_8show(CYTHON_UNUSED struct __p * finally: * stdio.fclose(f) */ - __Pyx_TraceLine(87,0,__PYX_ERR(25, 87, __pyx_L6_error)) __pyx_t_1 = (__pyx_v_block_count != Py_None); if ((__pyx_t_1 != 0)) { __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_block_count); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(25, 87, __pyx_L6_error) @@ -224892,7 +208156,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_8show(CYTHON_UNUSED struct __p * * memory_debugger = _MemDebug() */ - __Pyx_TraceLine(89,0,__PYX_ERR(25, 89, __pyx_L1_error)) /*finally:*/ { /*normal exit:*/{ (void)(fclose(__pyx_v_f)); @@ -224903,9 +208166,9 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_8show(CYTHON_UNUSED struct __p __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); @@ -224959,7 +208222,6 @@ static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_8show(CYTHON_UNUSED struct __p __pyx_L0:; __Pyx_XDECREF(__pyx_v_output_file); __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -226001,7 +209263,7 @@ static int __pyx_tp_clear_4lxml_5etree__ErrorLog(PyObject *o) { } static PyMethodDef __pyx_methods_4lxml_5etree__ErrorLog[] = { - {"__exit__", (PyCFunction)__pyx_pw_4lxml_5etree_9_ErrorLog_5__exit__, METH_VARARGS|METH_KEYWORDS, 0}, + {"__exit__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_9_ErrorLog_5__exit__, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; @@ -226285,7 +209547,7 @@ static PyObject *__pyx_getprop_4lxml_5etree_10PyErrorLog_level_map(PyObject *o, } static PyMethodDef __pyx_methods_4lxml_5etree_PyErrorLog[] = { - {"log", (PyCFunction)__pyx_pw_4lxml_5etree_10PyErrorLog_5log, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_10PyErrorLog_4log}, + {"log", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_10PyErrorLog_5log, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_10PyErrorLog_4log}, {0, 0, 0, 0} }; @@ -226820,18 +210082,18 @@ static PyMethodDef __pyx_methods_4lxml_5etree__Element[] = { {"_init", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_1_init, METH_NOARGS, __pyx_doc_4lxml_5etree_8_Element__init}, {"__deepcopy__", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_9__deepcopy__, METH_O, __pyx_doc_4lxml_5etree_8_Element_8__deepcopy__}, {"__copy__", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_11__copy__, METH_NOARGS, __pyx_doc_4lxml_5etree_8_Element_10__copy__}, - {"set", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_13set, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_12set}, + {"set", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_13set, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_12set}, {"append", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_15append, METH_O, __pyx_doc_4lxml_5etree_8_Element_14append}, {"addnext", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_17addnext, METH_O, __pyx_doc_4lxml_5etree_8_Element_16addnext}, {"addprevious", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_19addprevious, METH_O, __pyx_doc_4lxml_5etree_8_Element_18addprevious}, {"extend", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_21extend, METH_O, __pyx_doc_4lxml_5etree_8_Element_20extend}, {"clear", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_23clear, METH_NOARGS, __pyx_doc_4lxml_5etree_8_Element_22clear}, - {"insert", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_25insert, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_24insert}, + {"insert", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_25insert, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_24insert}, {"remove", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_27remove, METH_O, __pyx_doc_4lxml_5etree_8_Element_26remove}, - {"replace", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_29replace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_28replace}, + {"replace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_29replace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_28replace}, {"__reversed__", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_43__reversed__, METH_NOARGS, __pyx_doc_4lxml_5etree_8_Element_42__reversed__}, - {"index", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_45index, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_44index}, - {"get", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_47get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_46get}, + {"index", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_45index, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_44index}, + {"get", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_47get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_46get}, {"keys", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_49keys, METH_NOARGS, __pyx_doc_4lxml_5etree_8_Element_48keys}, {"values", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_51values, METH_NOARGS, __pyx_doc_4lxml_5etree_8_Element_50values}, {"items", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_53items, METH_NOARGS, __pyx_doc_4lxml_5etree_8_Element_52items}, @@ -226839,21 +210101,21 @@ static PyMethodDef __pyx_methods_4lxml_5etree__Element[] = { {"getparent", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_57getparent, METH_NOARGS, __pyx_doc_4lxml_5etree_8_Element_56getparent}, {"getnext", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_59getnext, METH_NOARGS, __pyx_doc_4lxml_5etree_8_Element_58getnext}, {"getprevious", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_61getprevious, METH_NOARGS, __pyx_doc_4lxml_5etree_8_Element_60getprevious}, - {"itersiblings", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_63itersiblings, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_62itersiblings}, - {"iterancestors", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_65iterancestors, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_64iterancestors}, - {"iterdescendants", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_67iterdescendants, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_66iterdescendants}, - {"iterchildren", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_69iterchildren, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_68iterchildren}, + {"itersiblings", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_63itersiblings, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_62itersiblings}, + {"iterancestors", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_65iterancestors, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_64iterancestors}, + {"iterdescendants", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_67iterdescendants, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_66iterdescendants}, + {"iterchildren", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_69iterchildren, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_68iterchildren}, {"getroottree", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_71getroottree, METH_NOARGS, __pyx_doc_4lxml_5etree_8_Element_70getroottree}, - {"getiterator", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_73getiterator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_72getiterator}, - {"iter", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_75iter, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_74iter}, - {"itertext", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_77itertext, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_76itertext}, - {"makeelement", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_79makeelement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_78makeelement}, - {"find", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_81find, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_80find}, - {"findtext", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_83findtext, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_82findtext}, - {"findall", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_85findall, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_84findall}, - {"iterfind", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_87iterfind, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_86iterfind}, - {"xpath", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_89xpath, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_88xpath}, - {"cssselect", (PyCFunction)__pyx_pw_4lxml_5etree_8_Element_91cssselect, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_90cssselect}, + {"getiterator", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_73getiterator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_72getiterator}, + {"iter", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_75iter, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_74iter}, + {"itertext", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_77itertext, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_76itertext}, + {"makeelement", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_79makeelement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_78makeelement}, + {"find", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_81find, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_80find}, + {"findtext", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_83findtext, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_82findtext}, + {"findall", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_85findall, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_84findall}, + {"iterfind", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_87iterfind, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_86iterfind}, + {"xpath", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_89xpath, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_88xpath}, + {"cssselect", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8_Element_91cssselect, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8_Element_90cssselect}, {0, 0, 0, 0} }; @@ -227057,10 +210319,10 @@ static int __pyx_setprop_4lxml_5etree_20__ContentOnlyElement_text(PyObject *o, P } static PyMethodDef __pyx_methods_4lxml_5etree___ContentOnlyElement[] = { - {"set", (PyCFunction)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_1set, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_20__ContentOnlyElement_set}, + {"set", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_1set, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_20__ContentOnlyElement_set}, {"append", (PyCFunction)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_3append, METH_O, __pyx_doc_4lxml_5etree_20__ContentOnlyElement_2append}, - {"insert", (PyCFunction)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_5insert, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_20__ContentOnlyElement_4insert}, - {"get", (PyCFunction)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_13get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_20__ContentOnlyElement_12get}, + {"insert", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_5insert, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_20__ContentOnlyElement_4insert}, + {"get", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_13get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_20__ContentOnlyElement_12get}, {"keys", (PyCFunction)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_15keys, METH_NOARGS, __pyx_doc_4lxml_5etree_20__ContentOnlyElement_14keys}, {"items", (PyCFunction)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_17items, METH_NOARGS, __pyx_doc_4lxml_5etree_20__ContentOnlyElement_16items}, {"values", (PyCFunction)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_19values, METH_NOARGS, __pyx_doc_4lxml_5etree_20__ContentOnlyElement_18values}, @@ -227280,7 +210542,7 @@ static PyObject *__pyx_getprop_4lxml_5etree_22_ProcessingInstruction_attrib(PyOb } static PyMethodDef __pyx_methods_4lxml_5etree__ProcessingInstruction[] = { - {"get", (PyCFunction)__pyx_pw_4lxml_5etree_22_ProcessingInstruction_3get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_22_ProcessingInstruction_2get}, + {"get", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_22_ProcessingInstruction_3get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_22_ProcessingInstruction_2get}, {0, 0, 0, 0} }; @@ -227626,26 +210888,26 @@ static PyObject *__pyx_getprop_4lxml_5etree_12_ElementTree_parser(PyObject *o, C } static PyMethodDef __pyx_methods_4lxml_5etree__ElementTree[] = { - {"parse", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_1parse, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_parse}, + {"parse", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ElementTree_1parse, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_parse}, {"_setroot", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_3_setroot, METH_O, __pyx_doc_4lxml_5etree_12_ElementTree_2_setroot}, {"getroot", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_5getroot, METH_NOARGS, __pyx_doc_4lxml_5etree_12_ElementTree_4getroot}, {"__copy__", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_7__copy__, METH_NOARGS, 0}, {"__deepcopy__", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_9__deepcopy__, METH_O, 0}, - {"write", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_11write, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_10write}, + {"write", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ElementTree_11write, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_10write}, {"getpath", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_13getpath, METH_O, __pyx_doc_4lxml_5etree_12_ElementTree_12getpath}, {"getelementpath", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_15getelementpath, METH_O, __pyx_doc_4lxml_5etree_12_ElementTree_14getelementpath}, - {"getiterator", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_17getiterator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_16getiterator}, - {"iter", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_19iter, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_18iter}, - {"find", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_21find, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_20find}, - {"findtext", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_23findtext, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_22findtext}, - {"findall", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_25findall, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_24findall}, - {"iterfind", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_27iterfind, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_26iterfind}, - {"xpath", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_29xpath, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_28xpath}, - {"xslt", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_31xslt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_30xslt}, + {"getiterator", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ElementTree_17getiterator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_16getiterator}, + {"iter", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ElementTree_19iter, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_18iter}, + {"find", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ElementTree_21find, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_20find}, + {"findtext", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ElementTree_23findtext, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_22findtext}, + {"findall", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ElementTree_25findall, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_24findall}, + {"iterfind", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ElementTree_27iterfind, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_26iterfind}, + {"xpath", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ElementTree_29xpath, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_28xpath}, + {"xslt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ElementTree_31xslt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_30xslt}, {"relaxng", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_33relaxng, METH_O, __pyx_doc_4lxml_5etree_12_ElementTree_32relaxng}, {"xmlschema", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_35xmlschema, METH_O, __pyx_doc_4lxml_5etree_12_ElementTree_34xmlschema}, {"xinclude", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_37xinclude, METH_NOARGS, __pyx_doc_4lxml_5etree_12_ElementTree_36xinclude}, - {"write_c14n", (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_39write_c14n, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_38write_c14n}, + {"write_c14n", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ElementTree_39write_c14n, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_12_ElementTree_38write_c14n}, {0, 0, 0, 0} }; @@ -227781,11 +211043,11 @@ static int __pyx_mp_ass_subscript_4lxml_5etree__Attrib(PyObject *o, PyObject *i, static PyMethodDef __pyx_methods_4lxml_5etree__Attrib[] = { {"update", (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_7update, METH_O, 0}, - {"pop", (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_9pop, METH_VARARGS|METH_KEYWORDS, 0}, + {"pop", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_7_Attrib_9pop, METH_VARARGS|METH_KEYWORDS, 0}, {"clear", (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_11clear, METH_NOARGS, 0}, {"__copy__", (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_15__copy__, METH_NOARGS, 0}, {"__deepcopy__", (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_17__deepcopy__, METH_O, 0}, - {"get", (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_25get, METH_VARARGS|METH_KEYWORDS, 0}, + {"get", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_7_Attrib_25get, METH_VARARGS|METH_KEYWORDS, 0}, {"keys", (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_27keys, METH_NOARGS, 0}, {"iterkeys", (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_31iterkeys, METH_NOARGS, 0}, {"values", (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_33values, METH_NOARGS, 0}, @@ -227967,8 +211229,10 @@ static int __pyx_tp_clear_4lxml_5etree__AttribIterator(PyObject *o) { return 0; } +static PyObject *__pyx_specialmethod___pyx_pw_4lxml_5etree_15_AttribIterator_3__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_4lxml_5etree_15_AttribIterator_3__next__(self);} + static PyMethodDef __pyx_methods_4lxml_5etree__AttribIterator[] = { - {"__next__", (PyCFunction)__pyx_pw_4lxml_5etree_15_AttribIterator_3__next__, METH_NOARGS|METH_COEXIST, 0}, + {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_4lxml_5etree_15_AttribIterator_3__next__, METH_NOARGS|METH_COEXIST, 0}, {0, 0, 0, 0} }; @@ -228172,8 +211436,10 @@ static int __pyx_tp_clear_4lxml_5etree__ElementIterator(PyObject *o) { return 0; } +static PyObject *__pyx_specialmethod___pyx_pw_4lxml_5etree_16_ElementIterator_3__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_4lxml_5etree_16_ElementIterator_3__next__(self);} + static PyMethodDef __pyx_methods_4lxml_5etree__ElementIterator[] = { - {"__next__", (PyCFunction)__pyx_pw_4lxml_5etree_16_ElementIterator_3__next__, METH_NOARGS|METH_COEXIST, 0}, + {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_4lxml_5etree_16_ElementIterator_3__next__, METH_NOARGS|METH_COEXIST, 0}, {0, 0, 0, 0} }; @@ -228398,8 +211664,10 @@ static int __pyx_tp_clear_4lxml_5etree__ElementMatchIterator(PyObject *o) { return 0; } +static PyObject *__pyx_specialmethod___pyx_pw_4lxml_5etree_21_ElementMatchIterator_3__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_4lxml_5etree_21_ElementMatchIterator_3__next__(self);} + static PyMethodDef __pyx_methods_4lxml_5etree__ElementMatchIterator[] = { - {"__next__", (PyCFunction)__pyx_pw_4lxml_5etree_21_ElementMatchIterator_3__next__, METH_NOARGS|METH_COEXIST, 0}, + {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_4lxml_5etree_21_ElementMatchIterator_3__next__, METH_NOARGS|METH_COEXIST, 0}, {0, 0, 0, 0} }; @@ -228772,8 +212040,10 @@ static int __pyx_tp_clear_4lxml_5etree_ElementDepthFirstIterator(PyObject *o) { return 0; } +static PyObject *__pyx_specialmethod___pyx_pw_4lxml_5etree_25ElementDepthFirstIterator_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_4lxml_5etree_25ElementDepthFirstIterator_5__next__(self);} + static PyMethodDef __pyx_methods_4lxml_5etree_ElementDepthFirstIterator[] = { - {"__next__", (PyCFunction)__pyx_pw_4lxml_5etree_25ElementDepthFirstIterator_5__next__, METH_NOARGS|METH_COEXIST, 0}, + {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_4lxml_5etree_25ElementDepthFirstIterator_5__next__, METH_NOARGS|METH_COEXIST, 0}, {0, 0, 0, 0} }; @@ -228886,8 +212156,10 @@ static int __pyx_tp_clear_4lxml_5etree_ElementTextIterator(PyObject *o) { return 0; } +static PyObject *__pyx_specialmethod___pyx_pw_4lxml_5etree_19ElementTextIterator_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_4lxml_5etree_19ElementTextIterator_5__next__(self);} + static PyMethodDef __pyx_methods_4lxml_5etree_ElementTextIterator[] = { - {"__next__", (PyCFunction)__pyx_pw_4lxml_5etree_19ElementTextIterator_5__next__, METH_NOARGS|METH_COEXIST, 0}, + {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_4lxml_5etree_19ElementTextIterator_5__next__, METH_NOARGS|METH_COEXIST, 0}, {0, 0, 0, 0} }; @@ -229118,7 +212390,7 @@ static PyObject *__pyx_getprop_4lxml_5etree_14_ReadOnlyProxy_sourceline(PyObject static PyMethodDef __pyx_methods_4lxml_5etree__ReadOnlyProxy[] = { {"__deepcopy__", (PyCFunction)__pyx_pw_4lxml_5etree_14_ReadOnlyProxy_11__deepcopy__, METH_O, __pyx_doc_4lxml_5etree_14_ReadOnlyProxy_10__deepcopy__}, - {"iterchildren", (PyCFunction)__pyx_pw_4lxml_5etree_14_ReadOnlyProxy_17iterchildren, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_14_ReadOnlyProxy_16iterchildren}, + {"iterchildren", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_14_ReadOnlyProxy_17iterchildren, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_14_ReadOnlyProxy_16iterchildren}, {"getparent", (PyCFunction)__pyx_pw_4lxml_5etree_14_ReadOnlyProxy_21getparent, METH_NOARGS, __pyx_doc_4lxml_5etree_14_ReadOnlyProxy_20getparent}, {"getnext", (PyCFunction)__pyx_pw_4lxml_5etree_14_ReadOnlyProxy_23getnext, METH_NOARGS, __pyx_doc_4lxml_5etree_14_ReadOnlyProxy_22getnext}, {"getprevious", (PyCFunction)__pyx_pw_4lxml_5etree_14_ReadOnlyProxy_25getprevious, METH_NOARGS, __pyx_doc_4lxml_5etree_14_ReadOnlyProxy_24getprevious}, @@ -229476,7 +212748,7 @@ static PyObject *__pyx_getprop_4lxml_5etree_21_ReadOnlyElementProxy_prefix(PyObj } static PyMethodDef __pyx_methods_4lxml_5etree__ReadOnlyElementProxy[] = { - {"get", (PyCFunction)__pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_1get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_21_ReadOnlyElementProxy_get}, + {"get", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_1get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_21_ReadOnlyElementProxy_get}, {"keys", (PyCFunction)__pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_3keys, METH_NOARGS, __pyx_doc_4lxml_5etree_21_ReadOnlyElementProxy_2keys}, {"values", (PyCFunction)__pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_5values, METH_NOARGS, __pyx_doc_4lxml_5etree_21_ReadOnlyElementProxy_4values}, {"items", (PyCFunction)__pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_7items, METH_NOARGS, __pyx_doc_4lxml_5etree_21_ReadOnlyElementProxy_6items}, @@ -230971,7 +214243,7 @@ static PyObject *__pyx_tp_new_4lxml_5etree_CustomElementClassLookup(PyTypeObject } static PyMethodDef __pyx_methods_4lxml_5etree_CustomElementClassLookup[] = { - {"lookup", (PyCFunction)__pyx_pw_4lxml_5etree_24CustomElementClassLookup_3lookup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_24CustomElementClassLookup_2lookup}, + {"lookup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_24CustomElementClassLookup_3lookup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_24CustomElementClassLookup_2lookup}, {0, 0, 0, 0} }; @@ -231052,7 +214324,7 @@ static PyObject *__pyx_tp_new_4lxml_5etree_PythonElementClassLookup(PyTypeObject } static PyMethodDef __pyx_methods_4lxml_5etree_PythonElementClassLookup[] = { - {"lookup", (PyCFunction)__pyx_pw_4lxml_5etree_24PythonElementClassLookup_3lookup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_24PythonElementClassLookup_2lookup}, + {"lookup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_24PythonElementClassLookup_3lookup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_24PythonElementClassLookup_2lookup}, {0, 0, 0, 0} }; @@ -231332,7 +214604,7 @@ static PyMethodDef __pyx_methods_4lxml_5etree__NamespaceRegistry[] = { {"items", (PyCFunction)__pyx_pw_4lxml_5etree_18_NamespaceRegistry_11items, METH_NOARGS, 0}, {"iteritems", (PyCFunction)__pyx_pw_4lxml_5etree_18_NamespaceRegistry_13iteritems, METH_NOARGS, 0}, {"clear", (PyCFunction)__pyx_pw_4lxml_5etree_18_NamespaceRegistry_15clear, METH_NOARGS, 0}, - {"__deco", (PyCFunction)__pyx_pw_4lxml_5etree_18_NamespaceRegistry_19__deco, METH_VARARGS|METH_KEYWORDS, 0}, + {"__deco", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_18_NamespaceRegistry_19__deco, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; @@ -231980,11 +215252,11 @@ static void __pyx_tp_dealloc_4lxml_5etree_Resolver(PyObject *o) { } static PyMethodDef __pyx_methods_4lxml_5etree_Resolver[] = { - {"resolve", (PyCFunction)__pyx_pw_4lxml_5etree_8Resolver_1resolve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8Resolver_resolve}, + {"resolve", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8Resolver_1resolve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8Resolver_resolve}, {"resolve_empty", (PyCFunction)__pyx_pw_4lxml_5etree_8Resolver_3resolve_empty, METH_O, __pyx_doc_4lxml_5etree_8Resolver_2resolve_empty}, - {"resolve_string", (PyCFunction)__pyx_pw_4lxml_5etree_8Resolver_5resolve_string, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8Resolver_4resolve_string}, - {"resolve_filename", (PyCFunction)__pyx_pw_4lxml_5etree_8Resolver_7resolve_filename, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8Resolver_6resolve_filename}, - {"resolve_file", (PyCFunction)__pyx_pw_4lxml_5etree_8Resolver_9resolve_file, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8Resolver_8resolve_file}, + {"resolve_string", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8Resolver_5resolve_string, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8Resolver_4resolve_string}, + {"resolve_filename", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8Resolver_7resolve_filename, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8Resolver_6resolve_filename}, + {"resolve_file", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_8Resolver_9resolve_file, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_8Resolver_8resolve_file}, {0, 0, 0, 0} }; @@ -232094,7 +215366,7 @@ static PyMethodDef __pyx_methods_4lxml_5etree__ResolverRegistry[] = { {"add", (PyCFunction)__pyx_pw_4lxml_5etree_17_ResolverRegistry_3add, METH_O, __pyx_doc_4lxml_5etree_17_ResolverRegistry_2add}, {"remove", (PyCFunction)__pyx_pw_4lxml_5etree_17_ResolverRegistry_5remove, METH_O, __pyx_doc_4lxml_5etree_17_ResolverRegistry_4remove}, {"copy", (PyCFunction)__pyx_pw_4lxml_5etree_17_ResolverRegistry_7copy, METH_NOARGS, __pyx_doc_4lxml_5etree_17_ResolverRegistry_6copy}, - {"resolve", (PyCFunction)__pyx_pw_4lxml_5etree_17_ResolverRegistry_9resolve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_17_ResolverRegistry_8resolve}, + {"resolve", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_17_ResolverRegistry_9resolve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_17_ResolverRegistry_8resolve}, {0, 0, 0, 0} }; @@ -232789,10 +216061,10 @@ static PyObject *__pyx_getprop_4lxml_5etree_11_BaseParser_target(PyObject *o, CY } static PyMethodDef __pyx_methods_4lxml_5etree__BaseParser[] = { - {"setElementClassLookup", (PyCFunction)__pyx_pw_4lxml_5etree_11_BaseParser_3setElementClassLookup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_11_BaseParser_2setElementClassLookup}, - {"set_element_class_lookup", (PyCFunction)__pyx_pw_4lxml_5etree_11_BaseParser_5set_element_class_lookup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_11_BaseParser_4set_element_class_lookup}, + {"setElementClassLookup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_11_BaseParser_3setElementClassLookup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_11_BaseParser_2setElementClassLookup}, + {"set_element_class_lookup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_11_BaseParser_5set_element_class_lookup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_11_BaseParser_4set_element_class_lookup}, {"copy", (PyCFunction)__pyx_pw_4lxml_5etree_11_BaseParser_7copy, METH_NOARGS, __pyx_doc_4lxml_5etree_11_BaseParser_6copy}, - {"makeelement", (PyCFunction)__pyx_pw_4lxml_5etree_11_BaseParser_9makeelement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_11_BaseParser_8makeelement}, + {"makeelement", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_11_BaseParser_9makeelement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_11_BaseParser_8makeelement}, {0, 0, 0, 0} }; @@ -233565,8 +216837,10 @@ static int __pyx_tp_clear_4lxml_5etree__ParseEventsIterator(PyObject *o) { return 0; } +static PyObject *__pyx_specialmethod___pyx_pw_4lxml_5etree_20_ParseEventsIterator_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_4lxml_5etree_20_ParseEventsIterator_5__next__(self);} + static PyMethodDef __pyx_methods_4lxml_5etree__ParseEventsIterator[] = { - {"__next__", (PyCFunction)__pyx_pw_4lxml_5etree_20_ParseEventsIterator_5__next__, METH_NOARGS|METH_COEXIST, 0}, + {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_4lxml_5etree_20_ParseEventsIterator_5__next__, METH_NOARGS|METH_COEXIST, 0}, {0, 0, 0, 0} }; @@ -233705,9 +216979,9 @@ static int __pyx_tp_clear_4lxml_5etree_TreeBuilder(PyObject *o) { static PyMethodDef __pyx_methods_4lxml_5etree_TreeBuilder[] = { {"close", (PyCFunction)__pyx_pw_4lxml_5etree_11TreeBuilder_3close, METH_NOARGS, __pyx_doc_4lxml_5etree_11TreeBuilder_2close}, {"data", (PyCFunction)__pyx_pw_4lxml_5etree_11TreeBuilder_5data, METH_O, __pyx_doc_4lxml_5etree_11TreeBuilder_4data}, - {"start", (PyCFunction)__pyx_pw_4lxml_5etree_11TreeBuilder_7start, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_11TreeBuilder_6start}, + {"start", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_11TreeBuilder_7start, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_11TreeBuilder_6start}, {"end", (PyCFunction)__pyx_pw_4lxml_5etree_11TreeBuilder_9end, METH_O, __pyx_doc_4lxml_5etree_11TreeBuilder_8end}, - {"pi", (PyCFunction)__pyx_pw_4lxml_5etree_11TreeBuilder_11pi, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_11TreeBuilder_10pi}, + {"pi", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_11TreeBuilder_11pi, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_11TreeBuilder_10pi}, {"comment", (PyCFunction)__pyx_pw_4lxml_5etree_11TreeBuilder_13comment, METH_O, __pyx_doc_4lxml_5etree_11TreeBuilder_12comment}, {0, 0, 0, 0} }; @@ -234235,9 +217509,9 @@ static int __pyx_tp_clear_4lxml_5etree_xmlfile(PyObject *o) { static PyMethodDef __pyx_methods_4lxml_5etree_xmlfile[] = { {"__enter__", (PyCFunction)__pyx_pw_4lxml_5etree_7xmlfile_3__enter__, METH_NOARGS, 0}, - {"__exit__", (PyCFunction)__pyx_pw_4lxml_5etree_7xmlfile_5__exit__, METH_VARARGS|METH_KEYWORDS, 0}, + {"__exit__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_7xmlfile_5__exit__, METH_VARARGS|METH_KEYWORDS, 0}, {"__aenter__", (PyCFunction)__pyx_pw_4lxml_5etree_7xmlfile_7__aenter__, METH_NOARGS, 0}, - {"__aexit__", (PyCFunction)__pyx_pw_4lxml_5etree_7xmlfile_10__aexit__, METH_VARARGS|METH_KEYWORDS, 0}, + {"__aexit__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_7xmlfile_10__aexit__, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; @@ -234422,11 +217696,11 @@ static int __pyx_tp_clear_4lxml_5etree__IncrementalFileWriter(PyObject *o) { } static PyMethodDef __pyx_methods_4lxml_5etree__IncrementalFileWriter[] = { - {"write_declaration", (PyCFunction)__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_5write_declaration, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_22_IncrementalFileWriter_4write_declaration}, + {"write_declaration", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_5write_declaration, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_22_IncrementalFileWriter_4write_declaration}, {"write_doctype", (PyCFunction)__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_7write_doctype, METH_O, __pyx_doc_4lxml_5etree_22_IncrementalFileWriter_6write_doctype}, {"method", (PyCFunction)__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_9method, METH_O, __pyx_doc_4lxml_5etree_22_IncrementalFileWriter_8method}, - {"element", (PyCFunction)__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_11element, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_22_IncrementalFileWriter_10element}, - {"write", (PyCFunction)__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_13write, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_22_IncrementalFileWriter_12write}, + {"element", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_11element, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_22_IncrementalFileWriter_10element}, + {"write", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_13write, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_22_IncrementalFileWriter_12write}, {"flush", (PyCFunction)__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_15flush, METH_NOARGS, __pyx_doc_4lxml_5etree_22_IncrementalFileWriter_14flush}, {0, 0, 0, 0} }; @@ -234643,11 +217917,11 @@ static int __pyx_tp_clear_4lxml_5etree__AsyncIncrementalFileWriter(PyObject *o) static PyMethodDef __pyx_methods_4lxml_5etree__AsyncIncrementalFileWriter[] = { {"flush", (PyCFunction)__pyx_pw_4lxml_5etree_27_AsyncIncrementalFileWriter_3flush, METH_NOARGS, 0}, - {"write_declaration", (PyCFunction)__pyx_pw_4lxml_5etree_27_AsyncIncrementalFileWriter_6write_declaration, METH_VARARGS|METH_KEYWORDS, 0}, + {"write_declaration", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_27_AsyncIncrementalFileWriter_6write_declaration, METH_VARARGS|METH_KEYWORDS, 0}, {"write_doctype", (PyCFunction)__pyx_pw_4lxml_5etree_27_AsyncIncrementalFileWriter_9write_doctype, METH_O, 0}, - {"write", (PyCFunction)__pyx_pw_4lxml_5etree_27_AsyncIncrementalFileWriter_12write, METH_VARARGS|METH_KEYWORDS, 0}, + {"write", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_27_AsyncIncrementalFileWriter_12write, METH_VARARGS|METH_KEYWORDS, 0}, {"method", (PyCFunction)__pyx_pw_4lxml_5etree_27_AsyncIncrementalFileWriter_15method, METH_O, 0}, - {"element", (PyCFunction)__pyx_pw_4lxml_5etree_27_AsyncIncrementalFileWriter_17element, METH_VARARGS|METH_KEYWORDS, 0}, + {"element", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_27_AsyncIncrementalFileWriter_17element, METH_VARARGS|METH_KEYWORDS, 0}, {"_close", (PyCFunction)__pyx_pw_4lxml_5etree_27_AsyncIncrementalFileWriter_19_close, METH_O, 0}, {0, 0, 0, 0} }; @@ -234754,7 +218028,7 @@ static int __pyx_tp_clear_4lxml_5etree__AsyncFileWriterElement(PyObject *o) { static PyMethodDef __pyx_methods_4lxml_5etree__AsyncFileWriterElement[] = { {"__aenter__", (PyCFunction)__pyx_pw_4lxml_5etree_23_AsyncFileWriterElement_3__aenter__, METH_NOARGS, 0}, - {"__aexit__", (PyCFunction)__pyx_pw_4lxml_5etree_23_AsyncFileWriterElement_6__aexit__, METH_VARARGS|METH_KEYWORDS, 0}, + {"__aexit__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_23_AsyncFileWriterElement_6__aexit__, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; @@ -234874,7 +218148,7 @@ static int __pyx_tp_clear_4lxml_5etree__FileWriterElement(PyObject *o) { static PyMethodDef __pyx_methods_4lxml_5etree__FileWriterElement[] = { {"__enter__", (PyCFunction)__pyx_pw_4lxml_5etree_18_FileWriterElement_3__enter__, METH_NOARGS, 0}, - {"__exit__", (PyCFunction)__pyx_pw_4lxml_5etree_18_FileWriterElement_5__exit__, METH_VARARGS|METH_KEYWORDS, 0}, + {"__exit__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_18_FileWriterElement_5__exit__, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; @@ -234988,9 +218262,9 @@ static int __pyx_tp_clear_4lxml_5etree__MethodChanger(PyObject *o) { static PyMethodDef __pyx_methods_4lxml_5etree__MethodChanger[] = { {"__enter__", (PyCFunction)__pyx_pw_4lxml_5etree_14_MethodChanger_3__enter__, METH_NOARGS, 0}, - {"__exit__", (PyCFunction)__pyx_pw_4lxml_5etree_14_MethodChanger_5__exit__, METH_VARARGS|METH_KEYWORDS, 0}, + {"__exit__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_14_MethodChanger_5__exit__, METH_VARARGS|METH_KEYWORDS, 0}, {"__aenter__", (PyCFunction)__pyx_pw_4lxml_5etree_14_MethodChanger_7__aenter__, METH_NOARGS, 0}, - {"__aexit__", (PyCFunction)__pyx_pw_4lxml_5etree_14_MethodChanger_10__aexit__, METH_VARARGS|METH_KEYWORDS, 0}, + {"__aexit__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_14_MethodChanger_10__aexit__, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; @@ -235147,10 +218421,12 @@ static PyObject *__pyx_getprop_4lxml_5etree_9iterparse_root(PyObject *o, CYTHON_ return __pyx_pw_4lxml_5etree_9iterparse_4root_1__get__(o); } +static PyObject *__pyx_specialmethod___pyx_pw_4lxml_5etree_9iterparse_9__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_4lxml_5etree_9iterparse_9__next__(self);} + static PyMethodDef __pyx_methods_4lxml_5etree_iterparse[] = { - {"set_element_class_lookup", (PyCFunction)__pyx_pw_4lxml_5etree_9iterparse_3set_element_class_lookup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_9iterparse_2set_element_class_lookup}, - {"makeelement", (PyCFunction)__pyx_pw_4lxml_5etree_9iterparse_5makeelement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_9iterparse_4makeelement}, - {"__next__", (PyCFunction)__pyx_pw_4lxml_5etree_9iterparse_9__next__, METH_NOARGS|METH_COEXIST, 0}, + {"set_element_class_lookup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_9iterparse_3set_element_class_lookup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_9iterparse_2set_element_class_lookup}, + {"makeelement", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_9iterparse_5makeelement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_9iterparse_4makeelement}, + {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_4lxml_5etree_9iterparse_9__next__, METH_NOARGS|METH_COEXIST, 0}, {0, 0, 0, 0} }; @@ -235281,8 +218557,10 @@ static int __pyx_tp_clear_4lxml_5etree_iterwalk(PyObject *o) { return 0; } +static PyObject *__pyx_specialmethod___pyx_pw_4lxml_5etree_8iterwalk_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_4lxml_5etree_8iterwalk_5__next__(self);} + static PyMethodDef __pyx_methods_4lxml_5etree_iterwalk[] = { - {"__next__", (PyCFunction)__pyx_pw_4lxml_5etree_8iterwalk_5__next__, METH_NOARGS|METH_COEXIST, 0}, + {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_4lxml_5etree_8iterwalk_5__next__, METH_NOARGS|METH_COEXIST, 0}, {"skip_subtree", (PyCFunction)__pyx_pw_4lxml_5etree_8iterwalk_7skip_subtree, METH_NOARGS, __pyx_doc_4lxml_5etree_8iterwalk_6skip_subtree}, {0, 0, 0, 0} }; @@ -235992,9 +219270,9 @@ static int __pyx_tp_clear_4lxml_5etree__ExsltRegExp(PyObject *o) { } static PyMethodDef __pyx_methods_4lxml_5etree__ExsltRegExp[] = { - {"test", (PyCFunction)__pyx_pw_4lxml_5etree_12_ExsltRegExp_3test, METH_VARARGS|METH_KEYWORDS, 0}, - {"match", (PyCFunction)__pyx_pw_4lxml_5etree_12_ExsltRegExp_5match, METH_VARARGS|METH_KEYWORDS, 0}, - {"replace", (PyCFunction)__pyx_pw_4lxml_5etree_12_ExsltRegExp_7replace, METH_VARARGS|METH_KEYWORDS, 0}, + {"test", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ExsltRegExp_3test, METH_VARARGS|METH_KEYWORDS, 0}, + {"match", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ExsltRegExp_5match, METH_VARARGS|METH_KEYWORDS, 0}, + {"replace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_12_ExsltRegExp_7replace, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; @@ -236533,7 +219811,7 @@ static PyObject *__pyx_getprop_4lxml_5etree_19_XPathEvaluatorBase_error_log(PyOb } static PyMethodDef __pyx_methods_4lxml_5etree__XPathEvaluatorBase[] = { - {"evaluate", (PyCFunction)__pyx_pw_4lxml_5etree_19_XPathEvaluatorBase_7evaluate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_19_XPathEvaluatorBase_6evaluate}, + {"evaluate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_19_XPathEvaluatorBase_7evaluate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_19_XPathEvaluatorBase_6evaluate}, {0, 0, 0, 0} }; @@ -236642,7 +219920,7 @@ static int __pyx_tp_clear_4lxml_5etree_XPathElementEvaluator(PyObject *o) { } static PyMethodDef __pyx_methods_4lxml_5etree_XPathElementEvaluator[] = { - {"register_namespace", (PyCFunction)__pyx_pw_4lxml_5etree_21XPathElementEvaluator_3register_namespace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_21XPathElementEvaluator_2register_namespace}, + {"register_namespace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_21XPathElementEvaluator_3register_namespace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_21XPathElementEvaluator_2register_namespace}, {"register_namespaces", (PyCFunction)__pyx_pw_4lxml_5etree_21XPathElementEvaluator_5register_namespaces, METH_O, __pyx_doc_4lxml_5etree_21XPathElementEvaluator_4register_namespaces}, {0, 0, 0, 0} }; @@ -237709,9 +220987,9 @@ static PyObject *__pyx_getprop_4lxml_5etree_4XSLT_error_log(PyObject *o, CYTHON_ } static PyMethodDef __pyx_methods_4lxml_5etree_XSLT[] = { - {"strparam", (PyCFunction)__pyx_pw_4lxml_5etree_4XSLT_7strparam, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_4XSLT_6strparam}, - {"set_global_max_depth", (PyCFunction)__pyx_pw_4lxml_5etree_4XSLT_9set_global_max_depth, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_4XSLT_8set_global_max_depth}, - {"apply", (PyCFunction)__pyx_pw_4lxml_5etree_4XSLT_11apply, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_4XSLT_10apply}, + {"strparam", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_4XSLT_7strparam, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_4XSLT_6strparam}, + {"set_global_max_depth", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_4XSLT_9set_global_max_depth, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_4XSLT_8set_global_max_depth}, + {"apply", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_4XSLT_11apply, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_4XSLT_10apply}, {"tostring", (PyCFunction)__pyx_pw_4lxml_5etree_4XSLT_13tostring, METH_O, __pyx_doc_4lxml_5etree_4XSLT_12tostring}, {"__deepcopy__", (PyCFunction)__pyx_pw_4lxml_5etree_4XSLT_15__deepcopy__, METH_O, 0}, {"__copy__", (PyCFunction)__pyx_pw_4lxml_5etree_4XSLT_17__copy__, METH_NOARGS, 0}, @@ -237838,7 +221116,7 @@ static int __pyx_setprop_4lxml_5etree_15_XSLTResultTree_xslt_profile(PyObject *o } static PyMethodDef __pyx_methods_4lxml_5etree__XSLTResultTree[] = { - {"write_output", (PyCFunction)__pyx_pw_4lxml_5etree_15_XSLTResultTree_1write_output, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_15_XSLTResultTree_write_output}, + {"write_output", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_15_XSLTResultTree_1write_output, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_15_XSLTResultTree_write_output}, {"__unicode__", (PyCFunction)__pyx_pw_4lxml_5etree_15_XSLTResultTree_5__unicode__, METH_NOARGS, 0}, {0, 0, 0, 0} }; @@ -237934,8 +221212,8 @@ static PyObject *__pyx_tp_new_4lxml_5etree__XSLTProcessingInstruction(PyTypeObje } static PyMethodDef __pyx_methods_4lxml_5etree__XSLTProcessingInstruction[] = { - {"parseXSL", (PyCFunction)__pyx_pw_4lxml_5etree_26_XSLTProcessingInstruction_1parseXSL, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL}, - {"set", (PyCFunction)__pyx_pw_4lxml_5etree_26_XSLTProcessingInstruction_3set, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_26_XSLTProcessingInstruction_2set}, + {"parseXSL", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_26_XSLTProcessingInstruction_1parseXSL, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL}, + {"set", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_26_XSLTProcessingInstruction_3set, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_26_XSLTProcessingInstruction_2set}, {0, 0, 0, 0} }; @@ -238034,9 +221312,9 @@ static void __pyx_tp_dealloc_4lxml_5etree_XSLTExtension(PyObject *o) { } static PyMethodDef __pyx_methods_4lxml_5etree_XSLTExtension[] = { - {"execute", (PyCFunction)__pyx_pw_4lxml_5etree_13XSLTExtension_1execute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_13XSLTExtension_execute}, - {"apply_templates", (PyCFunction)__pyx_pw_4lxml_5etree_13XSLTExtension_3apply_templates, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_13XSLTExtension_2apply_templates}, - {"process_children", (PyCFunction)__pyx_pw_4lxml_5etree_13XSLTExtension_5process_children, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_13XSLTExtension_4process_children}, + {"execute", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_13XSLTExtension_1execute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_13XSLTExtension_execute}, + {"apply_templates", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_13XSLTExtension_3apply_templates, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_13XSLTExtension_2apply_templates}, + {"process_children", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_13XSLTExtension_5process_children, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_13XSLTExtension_4process_children}, {0, 0, 0, 0} }; @@ -239385,7 +222663,7 @@ static void __pyx_tp_dealloc_4lxml_5etree_RelaxNG(PyObject *o) { } static PyMethodDef __pyx_methods_4lxml_5etree_RelaxNG[] = { - {"from_rnc_string", (PyCFunction)__pyx_pw_4lxml_5etree_7RelaxNG_9from_rnc_string, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_7RelaxNG_8from_rnc_string}, + {"from_rnc_string", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_7RelaxNG_9from_rnc_string, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_7RelaxNG_8from_rnc_string}, {0, 0, 0, 0} }; @@ -240188,8 +223466,8 @@ static PyMethodDef __pyx_methods_4lxml_5etree__MemDebug[] = { {"bytes_used", (PyCFunction)__pyx_pw_4lxml_5etree_9_MemDebug_1bytes_used, METH_NOARGS, __pyx_doc_4lxml_5etree_9_MemDebug_bytes_used}, {"blocks_used", (PyCFunction)__pyx_pw_4lxml_5etree_9_MemDebug_3blocks_used, METH_NOARGS, __pyx_doc_4lxml_5etree_9_MemDebug_2blocks_used}, {"dict_size", (PyCFunction)__pyx_pw_4lxml_5etree_9_MemDebug_5dict_size, METH_NOARGS, __pyx_doc_4lxml_5etree_9_MemDebug_4dict_size}, - {"dump", (PyCFunction)__pyx_pw_4lxml_5etree_9_MemDebug_7dump, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_9_MemDebug_6dump}, - {"show", (PyCFunction)__pyx_pw_4lxml_5etree_9_MemDebug_9show, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_9_MemDebug_8show}, + {"dump", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_9_MemDebug_7dump, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_9_MemDebug_6dump}, + {"show", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_5etree_9_MemDebug_9show, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_5etree_9_MemDebug_8show}, {0, 0, 0, 0} }; @@ -241790,6 +225068,15 @@ static struct PyModuleDef __pyx_moduledef = { (freefunc)__pyx_module_cleanup /* m_free */ }; #endif +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_u_0_9, __pyx_k_0_9, sizeof(__pyx_k_0_9), 0, 1, 0, 0}, @@ -241798,6 +225085,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_b_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 0, 1}, {&__pyx_n_u_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 1, 0, 1}, {&__pyx_kp_s_All_strings_must_be_XML_compatib, __pyx_k_All_strings_must_be_XML_compatib, sizeof(__pyx_k_All_strings_must_be_XML_compatib), 0, 0, 1, 0}, + {&__pyx_n_s_AncestorsIterator, __pyx_k_AncestorsIterator, sizeof(__pyx_k_AncestorsIterator), 0, 0, 1, 1}, {&__pyx_n_s_AppendOnlyElementProxy_append, __pyx_k_AppendOnlyElementProxy_append, sizeof(__pyx_k_AppendOnlyElementProxy_append), 0, 0, 1, 1}, {&__pyx_n_s_AppendOnlyElementProxy_extend, __pyx_k_AppendOnlyElementProxy_extend, sizeof(__pyx_k_AppendOnlyElementProxy_extend), 0, 0, 1, 1}, {&__pyx_kp_u_Argument_is_not_a_file_like_obje, __pyx_k_Argument_is_not_a_file_like_obje, sizeof(__pyx_k_Argument_is_not_a_file_like_obje), 0, 1, 0, 0}, @@ -241815,6 +225103,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_AsyncIncrementalFileWriter_writ, __pyx_k_AsyncIncrementalFileWriter_writ, sizeof(__pyx_k_AsyncIncrementalFileWriter_writ), 0, 0, 1, 1}, {&__pyx_n_s_AsyncIncrementalFileWriter_writ_2, __pyx_k_AsyncIncrementalFileWriter_writ_2, sizeof(__pyx_k_AsyncIncrementalFileWriter_writ_2), 0, 0, 1, 1}, {&__pyx_n_s_AsyncIncrementalFileWriter_writ_3, __pyx_k_AsyncIncrementalFileWriter_writ_3, sizeof(__pyx_k_AsyncIncrementalFileWriter_writ_3), 0, 0, 1, 1}, + {&__pyx_n_s_Attrib, __pyx_k_Attrib, sizeof(__pyx_k_Attrib), 0, 0, 1, 1}, {&__pyx_n_s_Attrib___copy, __pyx_k_Attrib___copy, sizeof(__pyx_k_Attrib___copy), 0, 0, 1, 1}, {&__pyx_n_s_Attrib___deepcopy, __pyx_k_Attrib___deepcopy, sizeof(__pyx_k_Attrib___deepcopy), 0, 0, 1, 1}, {&__pyx_n_s_Attrib_clear, __pyx_k_Attrib_clear, sizeof(__pyx_k_Attrib_clear), 0, 0, 1, 1}, @@ -241830,6 +225119,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_Attrib_values, __pyx_k_Attrib_values, sizeof(__pyx_k_Attrib_values), 0, 0, 1, 1}, {&__pyx_n_s_AttributeBasedElementClassLookup, __pyx_k_AttributeBasedElementClassLookup, sizeof(__pyx_k_AttributeBasedElementClassLookup), 0, 0, 1, 1}, {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1}, + {&__pyx_n_s_BaseErrorLog, __pyx_k_BaseErrorLog, sizeof(__pyx_k_BaseErrorLog), 0, 0, 1, 1}, {&__pyx_n_s_BaseErrorLog_copy, __pyx_k_BaseErrorLog_copy, sizeof(__pyx_k_BaseErrorLog_copy), 0, 0, 1, 1}, {&__pyx_n_s_BaseErrorLog_receive, __pyx_k_BaseErrorLog_receive, sizeof(__pyx_k_BaseErrorLog_receive), 0, 0, 1, 1}, {&__pyx_n_s_BaseException, __pyx_k_BaseException, sizeof(__pyx_k_BaseException), 0, 0, 1, 1}, @@ -241853,6 +225143,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_b_Char_out_of_XML_range, __pyx_k_Char_out_of_XML_range, sizeof(__pyx_k_Char_out_of_XML_range), 0, 0, 0, 0}, {&__pyx_n_s_Comment, __pyx_k_Comment, sizeof(__pyx_k_Comment), 0, 0, 1, 1}, {&__pyx_n_s_CommentBase, __pyx_k_CommentBase, sizeof(__pyx_k_CommentBase), 0, 0, 1, 1}, + {&__pyx_n_s_Comment_2, __pyx_k_Comment_2, sizeof(__pyx_k_Comment_2), 0, 0, 1, 1}, {&__pyx_kp_s_Comment_may_not_contain_or_end_w, __pyx_k_Comment_may_not_contain_or_end_w, sizeof(__pyx_k_Comment_may_not_contain_or_end_w), 0, 0, 1, 0}, {&__pyx_n_s_ContentOnlyElement_append, __pyx_k_ContentOnlyElement_append, sizeof(__pyx_k_ContentOnlyElement_append), 0, 0, 1, 1}, {&__pyx_n_s_ContentOnlyElement_get, __pyx_k_ContentOnlyElement_get, sizeof(__pyx_k_ContentOnlyElement_get), 0, 0, 1, 1}, @@ -241884,7 +225175,9 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_DTD_iterentities, __pyx_k_DTD_iterentities, sizeof(__pyx_k_DTD_iterentities), 0, 0, 1, 1}, {&__pyx_kp_s_DTD_not_initialised, __pyx_k_DTD_not_initialised, sizeof(__pyx_k_DTD_not_initialised), 0, 0, 1, 0}, {&__pyx_n_s_DeprecationWarning, __pyx_k_DeprecationWarning, sizeof(__pyx_k_DeprecationWarning), 0, 0, 1, 1}, + {&__pyx_n_s_DocInfo, __pyx_k_DocInfo, sizeof(__pyx_k_DocInfo), 0, 0, 1, 1}, {&__pyx_n_s_DocInfo_clear, __pyx_k_DocInfo_clear, sizeof(__pyx_k_DocInfo_clear), 0, 0, 1, 1}, + {&__pyx_n_s_Document, __pyx_k_Document, sizeof(__pyx_k_Document), 0, 0, 1, 1}, {&__pyx_n_s_DocumentInvalid, __pyx_k_DocumentInvalid, sizeof(__pyx_k_DocumentInvalid), 0, 0, 1, 1}, {&__pyx_kp_u_Document_does_not_comply_with_sc, __pyx_k_Document_does_not_comply_with_sc, sizeof(__pyx_k_Document_does_not_comply_with_sc), 0, 1, 0, 0}, {&__pyx_kp_u_Document_is_not_a_valid_Schematr, __pyx_k_Document_is_not_a_valid_Schematr, sizeof(__pyx_k_Document_is_not_a_valid_Schematr), 0, 1, 0, 0}, @@ -241892,6 +225185,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_u_Document_is_not_valid_Relax_NG, __pyx_k_Document_is_not_valid_Relax_NG, sizeof(__pyx_k_Document_is_not_valid_Relax_NG), 0, 1, 0, 0}, {&__pyx_kp_u_Document_is_not_valid_XML_Schema, __pyx_k_Document_is_not_valid_XML_Schema, sizeof(__pyx_k_Document_is_not_valid_XML_Schema), 0, 1, 0, 0}, {&__pyx_kp_u_Document_is_not_well_formed, __pyx_k_Document_is_not_well_formed, sizeof(__pyx_k_Document_is_not_well_formed), 0, 1, 0, 0}, + {&__pyx_n_s_DomainErrorLog, __pyx_k_DomainErrorLog, sizeof(__pyx_k_DomainErrorLog), 0, 0, 1, 1}, {&__pyx_n_s_DomainErrorLog_receive, __pyx_k_DomainErrorLog_receive, sizeof(__pyx_k_DomainErrorLog_receive), 0, 0, 1, 1}, {&__pyx_n_s_ERROR, __pyx_k_ERROR, sizeof(__pyx_k_ERROR), 0, 0, 1, 1}, {&__pyx_n_s_ERR_INVALID_CHAR, __pyx_k_ERR_INVALID_CHAR, sizeof(__pyx_k_ERR_INVALID_CHAR), 0, 0, 1, 1}, @@ -241901,13 +225195,20 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_ETXPath, __pyx_k_ETXPath, sizeof(__pyx_k_ETXPath), 0, 0, 1, 1}, {&__pyx_n_s_Element, __pyx_k_Element, sizeof(__pyx_k_Element), 0, 0, 1, 1}, {&__pyx_n_s_ElementBase, __pyx_k_ElementBase, sizeof(__pyx_k_ElementBase), 0, 0, 1, 1}, + {&__pyx_n_s_ElementChildIterator, __pyx_k_ElementChildIterator, sizeof(__pyx_k_ElementChildIterator), 0, 0, 1, 1}, {&__pyx_n_s_ElementClassLookup, __pyx_k_ElementClassLookup, sizeof(__pyx_k_ElementClassLookup), 0, 0, 1, 1}, {&__pyx_n_s_ElementDefaultClassLookup, __pyx_k_ElementDefaultClassLookup, sizeof(__pyx_k_ElementDefaultClassLookup), 0, 0, 1, 1}, + {&__pyx_n_s_ElementDepthFirstIterator, __pyx_k_ElementDepthFirstIterator, sizeof(__pyx_k_ElementDepthFirstIterator), 0, 0, 1, 1}, + {&__pyx_n_s_ElementIterator, __pyx_k_ElementIterator, sizeof(__pyx_k_ElementIterator), 0, 0, 1, 1}, + {&__pyx_n_s_ElementMatchIterator, __pyx_k_ElementMatchIterator, sizeof(__pyx_k_ElementMatchIterator), 0, 0, 1, 1}, {&__pyx_n_s_ElementNamespaceClassLookup, __pyx_k_ElementNamespaceClassLookup, sizeof(__pyx_k_ElementNamespaceClassLookup), 0, 0, 1, 1}, {&__pyx_n_s_ElementNamespaceClassLookup_get, __pyx_k_ElementNamespaceClassLookup_get, sizeof(__pyx_k_ElementNamespaceClassLookup_get), 0, 0, 1, 1}, {&__pyx_n_s_ElementStringResult, __pyx_k_ElementStringResult, sizeof(__pyx_k_ElementStringResult), 0, 0, 1, 1}, {&__pyx_n_s_ElementStringResult_getparent, __pyx_k_ElementStringResult_getparent, sizeof(__pyx_k_ElementStringResult_getparent), 0, 0, 1, 1}, + {&__pyx_n_s_ElementTagMatcher, __pyx_k_ElementTagMatcher, sizeof(__pyx_k_ElementTagMatcher), 0, 0, 1, 1}, + {&__pyx_n_s_ElementTextIterator, __pyx_k_ElementTextIterator, sizeof(__pyx_k_ElementTextIterator), 0, 0, 1, 1}, {&__pyx_n_s_ElementTree, __pyx_k_ElementTree, sizeof(__pyx_k_ElementTree), 0, 0, 1, 1}, + {&__pyx_n_s_ElementTree_2, __pyx_k_ElementTree_2, sizeof(__pyx_k_ElementTree_2), 0, 0, 1, 1}, {&__pyx_n_s_ElementTree___copy, __pyx_k_ElementTree___copy, sizeof(__pyx_k_ElementTree___copy), 0, 0, 1, 1}, {&__pyx_n_s_ElementTree___deepcopy, __pyx_k_ElementTree___deepcopy, sizeof(__pyx_k_ElementTree___deepcopy), 0, 0, 1, 1}, {&__pyx_n_s_ElementTree__setroot, __pyx_k_ElementTree__setroot, sizeof(__pyx_k_ElementTree__setroot), 0, 0, 1, 1}, @@ -241929,7 +225230,9 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_ElementTree_xmlschema, __pyx_k_ElementTree_xmlschema, sizeof(__pyx_k_ElementTree_xmlschema), 0, 0, 1, 1}, {&__pyx_n_s_ElementTree_xpath, __pyx_k_ElementTree_xpath, sizeof(__pyx_k_ElementTree_xpath), 0, 0, 1, 1}, {&__pyx_n_s_ElementTree_xslt, __pyx_k_ElementTree_xslt, sizeof(__pyx_k_ElementTree_xslt), 0, 0, 1, 1}, + {&__pyx_n_s_ElementUnicodeResult, __pyx_k_ElementUnicodeResult, sizeof(__pyx_k_ElementUnicodeResult), 0, 0, 1, 1}, {&__pyx_n_s_ElementUnicodeResult_getparent, __pyx_k_ElementUnicodeResult_getparent, sizeof(__pyx_k_ElementUnicodeResult_getparent), 0, 0, 1, 1}, + {&__pyx_n_s_Element_2, __pyx_k_Element_2, sizeof(__pyx_k_Element_2), 0, 0, 1, 1}, {&__pyx_n_s_Element___copy, __pyx_k_Element___copy, sizeof(__pyx_k_Element___copy), 0, 0, 1, 1}, {&__pyx_n_s_Element___deepcopy, __pyx_k_Element___deepcopy, sizeof(__pyx_k_Element___deepcopy), 0, 0, 1, 1}, {&__pyx_n_s_Element___reversed, __pyx_k_Element___reversed, sizeof(__pyx_k_Element___reversed), 0, 0, 1, 1}, @@ -241975,10 +225278,12 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_b_Encoding_error, __pyx_k_Encoding_error, sizeof(__pyx_k_Encoding_error), 0, 0, 0, 0}, {&__pyx_n_s_Entity, __pyx_k_Entity, sizeof(__pyx_k_Entity), 0, 0, 1, 1}, {&__pyx_n_s_EntityBase, __pyx_k_EntityBase, sizeof(__pyx_k_EntityBase), 0, 0, 1, 1}, + {&__pyx_n_s_Entity_2, __pyx_k_Entity_2, sizeof(__pyx_k_Entity_2), 0, 0, 1, 1}, {&__pyx_kp_u_Entity_class_must_be_subclass_of, __pyx_k_Entity_class_must_be_subclass_of, sizeof(__pyx_k_Entity_class_must_be_subclass_of), 0, 1, 0, 0}, {&__pyx_n_s_Error, __pyx_k_Error, sizeof(__pyx_k_Error), 0, 0, 1, 1}, {&__pyx_n_s_ErrorDomains, __pyx_k_ErrorDomains, sizeof(__pyx_k_ErrorDomains), 0, 0, 1, 1}, {&__pyx_n_s_ErrorLevels, __pyx_k_ErrorLevels, sizeof(__pyx_k_ErrorLevels), 0, 0, 1, 1}, + {&__pyx_n_s_ErrorLog, __pyx_k_ErrorLog, sizeof(__pyx_k_ErrorLog), 0, 0, 1, 1}, {&__pyx_n_s_ErrorLog___exit, __pyx_k_ErrorLog___exit, sizeof(__pyx_k_ErrorLog___exit), 0, 0, 1, 1}, {&__pyx_n_s_ErrorLog_clear, __pyx_k_ErrorLog_clear, sizeof(__pyx_k_ErrorLog_clear), 0, 0, 1, 1}, {&__pyx_n_s_ErrorLog_copy, __pyx_k_ErrorLog_copy, sizeof(__pyx_k_ErrorLog_copy), 0, 0, 1, 1}, @@ -242001,6 +225306,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_u_Failed_to_create_validation_cont, __pyx_k_Failed_to_create_validation_cont, sizeof(__pyx_k_Failed_to_create_validation_cont), 0, 1, 0, 0}, {&__pyx_n_s_FallbackElementClassLookup, __pyx_k_FallbackElementClassLookup, sizeof(__pyx_k_FallbackElementClassLookup), 0, 0, 1, 1}, {&__pyx_n_s_FallbackElementClassLookup_set_f, __pyx_k_FallbackElementClassLookup_set_f, sizeof(__pyx_k_FallbackElementClassLookup_set_f), 0, 0, 1, 1}, + {&__pyx_n_s_FeedParser, __pyx_k_FeedParser, sizeof(__pyx_k_FeedParser), 0, 0, 1, 1}, {&__pyx_n_s_FeedParser_close, __pyx_k_FeedParser_close, sizeof(__pyx_k_FeedParser_close), 0, 0, 1, 1}, {&__pyx_n_s_FeedParser_feed, __pyx_k_FeedParser_feed, sizeof(__pyx_k_FeedParser_feed), 0, 0, 1, 1}, {&__pyx_n_s_FileWriterElement___enter, __pyx_k_FileWriterElement___enter, sizeof(__pyx_k_FileWriterElement___enter), 0, 0, 1, 1}, @@ -242017,7 +225323,9 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_GzipFile, __pyx_k_GzipFile, sizeof(__pyx_k_GzipFile), 0, 0, 1, 1}, {&__pyx_n_s_HTML, __pyx_k_HTML, sizeof(__pyx_k_HTML), 0, 0, 1, 1}, {&__pyx_n_s_HTMLParser, __pyx_k_HTMLParser, sizeof(__pyx_k_HTMLParser), 0, 0, 1, 1}, + {&__pyx_n_s_HTMLPullParser, __pyx_k_HTMLPullParser, sizeof(__pyx_k_HTMLPullParser), 0, 0, 1, 1}, {&__pyx_n_s_HTMLPullParser_read_events, __pyx_k_HTMLPullParser_read_events, sizeof(__pyx_k_HTMLPullParser_read_events), 0, 0, 1, 1}, + {&__pyx_n_s_IDDict, __pyx_k_IDDict, sizeof(__pyx_k_IDDict), 0, 0, 1, 1}, {&__pyx_n_s_IDDict_copy, __pyx_k_IDDict_copy, sizeof(__pyx_k_IDDict_copy), 0, 0, 1, 1}, {&__pyx_n_s_IDDict_get, __pyx_k_IDDict_get, sizeof(__pyx_k_IDDict_get), 0, 0, 1, 1}, {&__pyx_n_s_IDDict_has_key, __pyx_k_IDDict_has_key, sizeof(__pyx_k_IDDict_has_key), 0, 0, 1, 1}, @@ -242091,6 +225399,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_Libxml2_error_domains, __pyx_k_Libxml2_error_domains, sizeof(__pyx_k_Libxml2_error_domains), 0, 0, 1, 0}, {&__pyx_kp_s_Libxml2_error_levels, __pyx_k_Libxml2_error_levels, sizeof(__pyx_k_Libxml2_error_levels), 0, 0, 1, 0}, {&__pyx_kp_s_Libxml2_error_types, __pyx_k_Libxml2_error_types, sizeof(__pyx_k_Libxml2_error_types), 0, 0, 1, 0}, + {&__pyx_n_s_ListErrorLog, __pyx_k_ListErrorLog, sizeof(__pyx_k_ListErrorLog), 0, 0, 1, 1}, {&__pyx_n_s_ListErrorLog_copy, __pyx_k_ListErrorLog_copy, sizeof(__pyx_k_ListErrorLog_copy), 0, 0, 1, 1}, {&__pyx_n_s_ListErrorLog_filter_domains, __pyx_k_ListErrorLog_filter_domains, sizeof(__pyx_k_ListErrorLog_filter_domains), 0, 0, 1, 1}, {&__pyx_n_s_ListErrorLog_filter_from_errors, __pyx_k_ListErrorLog_filter_from_errors, sizeof(__pyx_k_ListErrorLog_filter_from_errors), 0, 0, 1, 1}, @@ -242099,6 +225408,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_ListErrorLog_filter_from_warnin, __pyx_k_ListErrorLog_filter_from_warnin, sizeof(__pyx_k_ListErrorLog_filter_from_warnin), 0, 0, 1, 1}, {&__pyx_n_s_ListErrorLog_filter_levels, __pyx_k_ListErrorLog_filter_levels, sizeof(__pyx_k_ListErrorLog_filter_levels), 0, 0, 1, 1}, {&__pyx_n_s_ListErrorLog_filter_types, __pyx_k_ListErrorLog_filter_types, sizeof(__pyx_k_ListErrorLog_filter_types), 0, 0, 1, 1}, + {&__pyx_n_s_LogEntry, __pyx_k_LogEntry, sizeof(__pyx_k_LogEntry), 0, 0, 1, 1}, {&__pyx_n_s_LookupError, __pyx_k_LookupError, sizeof(__pyx_k_LookupError), 0, 0, 1, 1}, {&__pyx_n_s_LxmlError, __pyx_k_LxmlError, sizeof(__pyx_k_LxmlError), 0, 0, 1, 1}, {&__pyx_n_s_LxmlRegistryError, __pyx_k_LxmlRegistryError, sizeof(__pyx_k_LxmlRegistryError), 0, 0, 1, 1}, @@ -242163,10 +225473,10 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_u_Parsing_requires_string_data, __pyx_k_Parsing_requires_string_data, sizeof(__pyx_k_Parsing_requires_string_data), 0, 1, 0, 0}, {&__pyx_kp_s_Prefix_format_reserved_for_inter, __pyx_k_Prefix_format_reserved_for_inter, sizeof(__pyx_k_Prefix_format_reserved_for_inter), 0, 0, 1, 0}, {&__pyx_n_s_ProcessingInstruction, __pyx_k_ProcessingInstruction, sizeof(__pyx_k_ProcessingInstruction), 0, 0, 1, 1}, + {&__pyx_n_s_ProcessingInstruction_2, __pyx_k_ProcessingInstruction_2, sizeof(__pyx_k_ProcessingInstruction_2), 0, 0, 1, 1}, {&__pyx_n_s_ProcessingInstruction_get, __pyx_k_ProcessingInstruction_get, sizeof(__pyx_k_ProcessingInstruction_get), 0, 0, 1, 1}, {&__pyx_kp_s_Proxy_invalidated, __pyx_k_Proxy_invalidated, sizeof(__pyx_k_Proxy_invalidated), 0, 0, 1, 0}, {&__pyx_kp_u_Proxy_invalidated, __pyx_k_Proxy_invalidated, sizeof(__pyx_k_Proxy_invalidated), 0, 1, 0, 0}, - {&__pyx_kp_s_PyCapsule_usage_requires_Python, __pyx_k_PyCapsule_usage_requires_Python, sizeof(__pyx_k_PyCapsule_usage_requires_Python), 0, 0, 1, 0}, {&__pyx_n_s_PyElementUnicodeResult, __pyx_k_PyElementUnicodeResult, sizeof(__pyx_k_PyElementUnicodeResult), 0, 0, 1, 1}, {&__pyx_n_s_PyElementUnicodeResult_getparen, __pyx_k_PyElementUnicodeResult_getparen, sizeof(__pyx_k_PyElementUnicodeResult_getparen), 0, 0, 1, 1}, {&__pyx_n_s_PyErrorLog, __pyx_k_PyErrorLog, sizeof(__pyx_k_PyErrorLog), 0, 0, 1, 1}, @@ -242210,8 +225520,10 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_Resolver_resolve_filename, __pyx_k_Resolver_resolve_filename, sizeof(__pyx_k_Resolver_resolve_filename), 0, 0, 1, 1}, {&__pyx_n_s_Resolver_resolve_string, __pyx_k_Resolver_resolve_string, sizeof(__pyx_k_Resolver_resolve_string), 0, 0, 1, 1}, {&__pyx_kp_b_Resource_error, __pyx_k_Resource_error, sizeof(__pyx_k_Resource_error), 0, 0, 0, 0}, + {&__pyx_n_s_RotatingErrorLog, __pyx_k_RotatingErrorLog, sizeof(__pyx_k_RotatingErrorLog), 0, 0, 1, 1}, {&__pyx_n_s_RotatingErrorLog_receive, __pyx_k_RotatingErrorLog_receive, sizeof(__pyx_k_RotatingErrorLog_receive), 0, 0, 1, 1}, {&__pyx_kp_u_SYSTEM, __pyx_k_SYSTEM, sizeof(__pyx_k_SYSTEM), 0, 1, 0, 0}, + {&__pyx_n_s_SaxParserTarget, __pyx_k_SaxParserTarget, sizeof(__pyx_k_SaxParserTarget), 0, 0, 1, 1}, {&__pyx_kp_s_Schema_instance_not_initialised, __pyx_k_Schema_instance_not_initialised, sizeof(__pyx_k_Schema_instance_not_initialised), 0, 0, 1, 0}, {&__pyx_n_s_Schematron, __pyx_k_Schematron, sizeof(__pyx_k_Schematron), 0, 0, 1, 1}, {&__pyx_n_s_SchematronError, __pyx_k_SchematronError, sizeof(__pyx_k_SchematronError), 0, 0, 1, 1}, @@ -242220,6 +225532,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_Schematron_instance_not_initiali, __pyx_k_Schematron_instance_not_initiali, sizeof(__pyx_k_Schematron_instance_not_initiali), 0, 0, 1, 0}, {&__pyx_n_s_SerialisationError, __pyx_k_SerialisationError, sizeof(__pyx_k_SerialisationError), 0, 0, 1, 1}, {&__pyx_kp_u_Serialisation_to_unicode_must_no, __pyx_k_Serialisation_to_unicode_must_no, sizeof(__pyx_k_Serialisation_to_unicode_must_no), 0, 1, 0, 0}, + {&__pyx_n_s_SiblingsIterator, __pyx_k_SiblingsIterator, sizeof(__pyx_k_SiblingsIterator), 0, 0, 1, 1}, {&__pyx_kp_b_Stack_usage_error, __pyx_k_Stack_usage_error, sizeof(__pyx_k_Stack_usage_error), 0, 0, 0, 0}, {&__pyx_kp_b_Start_of_literal, __pyx_k_Start_of_literal, sizeof(__pyx_k_Start_of_literal), 0, 0, 0, 0}, {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1}, @@ -242271,6 +225584,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_b_Unregistered_function, __pyx_k_Unregistered_function, sizeof(__pyx_k_Unregistered_function), 0, 0, 0, 0}, {&__pyx_kp_u_Unsupported_element_type, __pyx_k_Unsupported_element_type, sizeof(__pyx_k_Unsupported_element_type), 0, 1, 0, 0}, {&__pyx_kp_u_Unsupported_node_type, __pyx_k_Unsupported_node_type, sizeof(__pyx_k_Unsupported_node_type), 0, 1, 0, 0}, + {&__pyx_n_s_Validator, __pyx_k_Validator, sizeof(__pyx_k_Validator), 0, 0, 1, 1}, {&__pyx_n_s_Validator__append_log_message, __pyx_k_Validator__append_log_message, sizeof(__pyx_k_Validator__append_log_message), 0, 0, 1, 1}, {&__pyx_n_s_Validator__clear_error_log, __pyx_k_Validator__clear_error_log, sizeof(__pyx_k_Validator__clear_error_log), 0, 0, 1, 1}, {&__pyx_n_s_Validator_assert, __pyx_k_Validator_assert, sizeof(__pyx_k_Validator_assert), 0, 0, 1, 1}, @@ -242289,6 +225603,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_XMLDTDID, __pyx_k_XMLDTDID, sizeof(__pyx_k_XMLDTDID), 0, 0, 1, 1}, {&__pyx_n_s_XMLID, __pyx_k_XMLID, sizeof(__pyx_k_XMLID), 0, 0, 1, 1}, {&__pyx_n_s_XMLParser, __pyx_k_XMLParser, sizeof(__pyx_k_XMLParser), 0, 0, 1, 1}, + {&__pyx_n_s_XMLPullParser, __pyx_k_XMLPullParser, sizeof(__pyx_k_XMLPullParser), 0, 0, 1, 1}, {&__pyx_n_s_XMLPullParser_read_events, __pyx_k_XMLPullParser_read_events, sizeof(__pyx_k_XMLPullParser_read_events), 0, 0, 1, 1}, {&__pyx_n_s_XMLSchema, __pyx_k_XMLSchema, sizeof(__pyx_k_XMLSchema), 0, 0, 1, 1}, {&__pyx_n_s_XMLSchemaError, __pyx_k_XMLSchemaError, sizeof(__pyx_k_XMLSchemaError), 0, 0, 1, 1}, @@ -242297,7 +225612,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_3167, __pyx_k_XML_line_3167, sizeof(__pyx_k_XML_line_3167), 0, 1, 0, 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_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}, @@ -242305,11 +225620,13 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_u_XPATH_USERS, __pyx_k_XPATH_USERS, sizeof(__pyx_k_XPATH_USERS), 0, 1, 0, 1}, {&__pyx_n_s_XPath, __pyx_k_XPath, sizeof(__pyx_k_XPath), 0, 0, 1, 1}, {&__pyx_n_s_XPathDocumentEvaluator, __pyx_k_XPathDocumentEvaluator, sizeof(__pyx_k_XPathDocumentEvaluator), 0, 0, 1, 1}, + {&__pyx_n_s_XPathElementEvaluator, __pyx_k_XPathElementEvaluator, sizeof(__pyx_k_XPathElementEvaluator), 0, 0, 1, 1}, {&__pyx_n_s_XPathElementEvaluator_register_n, __pyx_k_XPathElementEvaluator_register_n, sizeof(__pyx_k_XPathElementEvaluator_register_n), 0, 0, 1, 1}, {&__pyx_n_s_XPathElementEvaluator_register_n_2, __pyx_k_XPathElementEvaluator_register_n_2, sizeof(__pyx_k_XPathElementEvaluator_register_n_2), 0, 0, 1, 1}, {&__pyx_n_s_XPathError, __pyx_k_XPathError, sizeof(__pyx_k_XPathError), 0, 0, 1, 1}, {&__pyx_n_s_XPathEvalError, __pyx_k_XPathEvalError, sizeof(__pyx_k_XPathEvalError), 0, 0, 1, 1}, {&__pyx_n_s_XPathEvaluator, __pyx_k_XPathEvaluator, sizeof(__pyx_k_XPathEvaluator), 0, 0, 1, 1}, + {&__pyx_n_s_XPathEvaluatorBase, __pyx_k_XPathEvaluatorBase, sizeof(__pyx_k_XPathEvaluatorBase), 0, 0, 1, 1}, {&__pyx_n_s_XPathEvaluatorBase_evaluate, __pyx_k_XPathEvaluatorBase_evaluate, sizeof(__pyx_k_XPathEvaluatorBase_evaluate), 0, 0, 1, 1}, {&__pyx_n_s_XPathFunctionError, __pyx_k_XPathFunctionError, sizeof(__pyx_k_XPathFunctionError), 0, 0, 1, 1}, {&__pyx_n_s_XPathResultError, __pyx_k_XPathResultError, sizeof(__pyx_k_XPathResultError), 0, 0, 1, 1}, @@ -242330,8 +225647,10 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_XSLTExtension_execute, __pyx_k_XSLTExtension_execute, sizeof(__pyx_k_XSLTExtension_execute), 0, 0, 1, 1}, {&__pyx_n_s_XSLTExtension_process_children, __pyx_k_XSLTExtension_process_children, sizeof(__pyx_k_XSLTExtension_process_children), 0, 0, 1, 1}, {&__pyx_n_s_XSLTParseError, __pyx_k_XSLTParseError, sizeof(__pyx_k_XSLTParseError), 0, 0, 1, 1}, + {&__pyx_n_s_XSLTProcessingInstruction, __pyx_k_XSLTProcessingInstruction, sizeof(__pyx_k_XSLTProcessingInstruction), 0, 0, 1, 1}, {&__pyx_n_s_XSLTProcessingInstruction_parse, __pyx_k_XSLTProcessingInstruction_parse, sizeof(__pyx_k_XSLTProcessingInstruction_parse), 0, 0, 1, 1}, {&__pyx_n_s_XSLTProcessingInstruction_set, __pyx_k_XSLTProcessingInstruction_set, sizeof(__pyx_k_XSLTProcessingInstruction_set), 0, 0, 1, 1}, + {&__pyx_n_s_XSLTResultTree, __pyx_k_XSLTResultTree, sizeof(__pyx_k_XSLTResultTree), 0, 0, 1, 1}, {&__pyx_n_s_XSLTResultTree___unicode, __pyx_k_XSLTResultTree___unicode, sizeof(__pyx_k_XSLTResultTree___unicode), 0, 0, 1, 1}, {&__pyx_n_s_XSLTResultTree_write_output, __pyx_k_XSLTResultTree_write_output, sizeof(__pyx_k_XSLTResultTree_write_output), 0, 0, 1, 1}, {&__pyx_n_s_XSLTSaveError, __pyx_k_XSLTSaveError, sizeof(__pyx_k_XSLTSaveError), 0, 0, 1, 1}, @@ -242343,52 +225662,52 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_XSLT_strparam, __pyx_k_XSLT_strparam, sizeof(__pyx_k_XSLT_strparam), 0, 0, 1, 1}, {&__pyx_kp_s_XSLT_stylesheet_not_initialised, __pyx_k_XSLT_stylesheet_not_initialised, sizeof(__pyx_k_XSLT_stylesheet_not_initialised), 0, 0, 1, 0}, {&__pyx_n_s_XSLT_tostring, __pyx_k_XSLT_tostring, sizeof(__pyx_k_XSLT_tostring), 0, 0, 1, 1}, - {&__pyx_kp_b__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 0, 0, 0}, {&__pyx_kp_u__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 1, 0, 0}, {&__pyx_kp_b__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 0, 0, 0}, {&__pyx_kp_s__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 0, 1, 0}, {&__pyx_kp_u__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 1, 0, 0}, - {&__pyx_kp_b__112, __pyx_k__112, sizeof(__pyx_k__112), 0, 0, 0, 0}, - {&__pyx_kp_u__112, __pyx_k__112, sizeof(__pyx_k__112), 0, 1, 0, 0}, - {&__pyx_kp_b__113, __pyx_k__113, sizeof(__pyx_k__113), 0, 0, 0, 0}, - {&__pyx_kp_u__113, __pyx_k__113, sizeof(__pyx_k__113), 0, 1, 0, 0}, - {&__pyx_kp_u__114, __pyx_k__114, sizeof(__pyx_k__114), 0, 1, 0, 0}, - {&__pyx_kp_u__115, __pyx_k__115, sizeof(__pyx_k__115), 0, 1, 0, 0}, - {&__pyx_kp_u__128, __pyx_k__128, sizeof(__pyx_k__128), 0, 1, 0, 0}, - {&__pyx_kp_u__129, __pyx_k__129, sizeof(__pyx_k__129), 0, 1, 0, 0}, - {&__pyx_kp_s__130, __pyx_k__130, sizeof(__pyx_k__130), 0, 0, 1, 0}, - {&__pyx_kp_b__160, __pyx_k__160, sizeof(__pyx_k__160), 0, 0, 0, 0}, - {&__pyx_kp_s__160, __pyx_k__160, sizeof(__pyx_k__160), 0, 0, 1, 0}, - {&__pyx_kp_s__161, __pyx_k__161, sizeof(__pyx_k__161), 0, 0, 1, 0}, - {&__pyx_kp_b__166, __pyx_k__166, sizeof(__pyx_k__166), 0, 0, 0, 0}, - {&__pyx_kp_b__170, __pyx_k__170, sizeof(__pyx_k__170), 0, 0, 0, 0}, - {&__pyx_kp_b__171, __pyx_k__171, sizeof(__pyx_k__171), 0, 0, 0, 0}, - {&__pyx_n_s__214, __pyx_k__214, sizeof(__pyx_k__214), 0, 0, 1, 1}, - {&__pyx_n_u__214, __pyx_k__214, sizeof(__pyx_k__214), 0, 1, 0, 1}, + {&__pyx_kp_b__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 0, 0, 0}, + {&__pyx_kp_u__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 1, 0, 0}, + {&__pyx_kp_u__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 1, 0, 0}, + {&__pyx_kp_s__18, __pyx_k__18, sizeof(__pyx_k__18), 0, 0, 1, 0}, + {&__pyx_kp_u__18, __pyx_k__18, sizeof(__pyx_k__18), 0, 1, 0, 0}, + {&__pyx_kp_b__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 0, 0}, + {&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0}, + {&__pyx_kp_s__20, __pyx_k__20, sizeof(__pyx_k__20), 0, 0, 1, 0}, + {&__pyx_kp_b__21, __pyx_k__21, sizeof(__pyx_k__21), 0, 0, 0, 0}, + {&__pyx_kp_u__21, __pyx_k__21, sizeof(__pyx_k__21), 0, 1, 0, 0}, + {&__pyx_kp_b__22, __pyx_k__22, sizeof(__pyx_k__22), 0, 0, 0, 0}, + {&__pyx_kp_s__22, __pyx_k__22, sizeof(__pyx_k__22), 0, 0, 1, 0}, {&__pyx_kp_u__22, __pyx_k__22, sizeof(__pyx_k__22), 0, 1, 0, 0}, - {&__pyx_kp_b__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 0, 0, 0}, - {&__pyx_kp_s__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 0, 1, 0}, - {&__pyx_kp_u__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 1, 0, 0}, - {&__pyx_kp_u__234, __pyx_k__234, sizeof(__pyx_k__234), 0, 1, 0, 0}, - {&__pyx_kp_u__252, __pyx_k__252, sizeof(__pyx_k__252), 0, 1, 0, 0}, - {&__pyx_kp_b__31, __pyx_k__31, sizeof(__pyx_k__31), 0, 0, 0, 0}, + {&__pyx_kp_u__24, __pyx_k__24, sizeof(__pyx_k__24), 0, 1, 0, 0}, + {&__pyx_kp_u__25, __pyx_k__25, sizeof(__pyx_k__25), 0, 1, 0, 0}, + {&__pyx_kp_u__26, __pyx_k__26, sizeof(__pyx_k__26), 0, 1, 0, 0}, + {&__pyx_kp_b__28, __pyx_k__28, sizeof(__pyx_k__28), 0, 0, 0, 0}, + {&__pyx_kp_u__28, __pyx_k__28, sizeof(__pyx_k__28), 0, 1, 0, 0}, + {&__pyx_kp_b__29, __pyx_k__29, sizeof(__pyx_k__29), 0, 0, 0, 0}, + {&__pyx_kp_u__29, __pyx_k__29, sizeof(__pyx_k__29), 0, 1, 0, 0}, + {&__pyx_kp_b__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 0, 0}, + {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0}, + {&__pyx_kp_u__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0, 0}, + {&__pyx_kp_u__30, __pyx_k__30, sizeof(__pyx_k__30), 0, 1, 0, 0}, {&__pyx_kp_u__31, __pyx_k__31, sizeof(__pyx_k__31), 0, 1, 0, 0}, - {&__pyx_kp_u__33, __pyx_k__33, sizeof(__pyx_k__33), 0, 1, 0, 0}, - {&__pyx_kp_u__348, __pyx_k__348, sizeof(__pyx_k__348), 0, 1, 0, 0}, - {&__pyx_kp_u__349, __pyx_k__349, sizeof(__pyx_k__349), 0, 1, 0, 0}, - {&__pyx_kp_s__37, __pyx_k__37, sizeof(__pyx_k__37), 0, 0, 1, 0}, + {&__pyx_kp_u__36, __pyx_k__36, sizeof(__pyx_k__36), 0, 1, 0, 0}, {&__pyx_kp_u__37, __pyx_k__37, sizeof(__pyx_k__37), 0, 1, 0, 0}, - {&__pyx_kp_s__56, __pyx_k__56, sizeof(__pyx_k__56), 0, 0, 1, 0}, - {&__pyx_kp_b__60, __pyx_k__60, sizeof(__pyx_k__60), 0, 0, 0, 0}, - {&__pyx_kp_u__60, __pyx_k__60, sizeof(__pyx_k__60), 0, 1, 0, 0}, - {&__pyx_kp_b__61, __pyx_k__61, sizeof(__pyx_k__61), 0, 0, 0, 0}, - {&__pyx_kp_s__61, __pyx_k__61, sizeof(__pyx_k__61), 0, 0, 1, 0}, - {&__pyx_kp_u__61, __pyx_k__61, sizeof(__pyx_k__61), 0, 1, 0, 0}, - {&__pyx_kp_u__63, __pyx_k__63, sizeof(__pyx_k__63), 0, 1, 0, 0}, - {&__pyx_kp_u__64, __pyx_k__64, sizeof(__pyx_k__64), 0, 1, 0, 0}, - {&__pyx_kp_u__65, __pyx_k__65, sizeof(__pyx_k__65), 0, 1, 0, 0}, - {&__pyx_kp_b__663, __pyx_k__663, sizeof(__pyx_k__663), 0, 0, 0, 0}, - {&__pyx_kp_b__665, __pyx_k__665, sizeof(__pyx_k__665), 0, 0, 0, 0}, + {&__pyx_kp_s__38, __pyx_k__38, sizeof(__pyx_k__38), 0, 0, 1, 0}, + {&__pyx_kp_b__40, __pyx_k__40, sizeof(__pyx_k__40), 0, 0, 0, 0}, + {&__pyx_kp_s__40, __pyx_k__40, sizeof(__pyx_k__40), 0, 0, 1, 0}, + {&__pyx_kp_s__41, __pyx_k__41, sizeof(__pyx_k__41), 0, 0, 1, 0}, + {&__pyx_kp_b__44, __pyx_k__44, sizeof(__pyx_k__44), 0, 0, 0, 0}, + {&__pyx_kp_b__46, __pyx_k__46, sizeof(__pyx_k__46), 0, 0, 0, 0}, + {&__pyx_kp_b__47, __pyx_k__47, sizeof(__pyx_k__47), 0, 0, 0, 0}, + {&__pyx_n_s__51, __pyx_k__51, sizeof(__pyx_k__51), 0, 0, 1, 1}, + {&__pyx_n_u__51, __pyx_k__51, sizeof(__pyx_k__51), 0, 1, 0, 1}, + {&__pyx_kp_u__52, __pyx_k__52, sizeof(__pyx_k__52), 0, 1, 0, 0}, + {&__pyx_kp_u__55, __pyx_k__55, sizeof(__pyx_k__55), 0, 1, 0, 0}, + {&__pyx_kp_b__577, __pyx_k__577, sizeof(__pyx_k__577), 0, 0, 0, 0}, + {&__pyx_kp_b__579, __pyx_k__579, sizeof(__pyx_k__579), 0, 0, 0, 0}, + {&__pyx_kp_u__78, __pyx_k__78, sizeof(__pyx_k__78), 0, 1, 0, 0}, + {&__pyx_kp_u__79, __pyx_k__79, sizeof(__pyx_k__79), 0, 1, 0, 0}, {&__pyx_n_s_abspath, __pyx_k_abspath, sizeof(__pyx_k_abspath), 0, 0, 1, 1}, {&__pyx_n_s_accepted_domains, __pyx_k_accepted_domains, sizeof(__pyx_k_accepted_domains), 0, 0, 1, 1}, {&__pyx_n_s_access_control, __pyx_k_access_control, sizeof(__pyx_k_access_control), 0, 0, 1, 1}, @@ -242679,6 +225998,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_hrefs, __pyx_k_hrefs, sizeof(__pyx_k_hrefs), 0, 0, 1, 1}, {&__pyx_n_b_html, __pyx_k_html, sizeof(__pyx_k_html), 0, 0, 0, 1}, {&__pyx_n_s_html, __pyx_k_html, sizeof(__pyx_k_html), 0, 0, 1, 1}, + {&__pyx_n_s_htmlfile, __pyx_k_htmlfile, sizeof(__pyx_k_htmlfile), 0, 0, 1, 1}, {&__pyx_kp_b_http_codespeak_net_lxml_objectif, __pyx_k_http_codespeak_net_lxml_objectif, sizeof(__pyx_k_http_codespeak_net_lxml_objectif), 0, 0, 0, 0}, {&__pyx_kp_b_http_exslt_org_regular_expressio, __pyx_k_http_exslt_org_regular_expressio, sizeof(__pyx_k_http_exslt_org_regular_expressio), 0, 0, 0, 0}, {&__pyx_kp_b_http_purl_org_dc_elements_1_1, __pyx_k_http_purl_org_dc_elements_1_1, sizeof(__pyx_k_http_purl_org_dc_elements_1_1), 0, 0, 0, 0}, @@ -243118,6 +226438,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_u_xml, __pyx_k_xml, sizeof(__pyx_k_xml), 0, 1, 0, 1}, {&__pyx_n_s_xml_declaration, __pyx_k_xml_declaration, sizeof(__pyx_k_xml_declaration), 0, 0, 1, 1}, {&__pyx_kp_u_xml_s_encoding_s_s_s, __pyx_k_xml_s_encoding_s_s_s, sizeof(__pyx_k_xml_s_encoding_s_s_s), 0, 1, 0, 0}, + {&__pyx_n_s_xmlfile, __pyx_k_xmlfile, sizeof(__pyx_k_xmlfile), 0, 0, 1, 1}, {&__pyx_n_s_xmlfile___aenter, __pyx_k_xmlfile___aenter, sizeof(__pyx_k_xmlfile___aenter), 0, 0, 1, 1}, {&__pyx_n_s_xmlfile___aexit, __pyx_k_xmlfile___aexit, sizeof(__pyx_k_xmlfile___aexit), 0, 0, 1, 1}, {&__pyx_n_s_xmlfile___enter, __pyx_k_xmlfile___enter, sizeof(__pyx_k_xmlfile___enter), 0, 0, 1, 1}, @@ -243139,145 +226460,106 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_xslt_input, __pyx_k_xslt_input, sizeof(__pyx_k_xslt_input), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; -static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 71, __pyx_L1_error) - __pyx_builtin_SyntaxError = __Pyx_GetBuiltinName(__pyx_n_s_SyntaxError); if (!__pyx_builtin_SyntaxError) __PYX_ERR(0, 213, __pyx_L1_error) +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_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, 98, __pyx_L1_error) - __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 184, __pyx_L1_error) - __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 203, __pyx_L1_error) - __pyx_builtin_BaseException = __Pyx_GetBuiltinName(__pyx_n_s_BaseException); if (!__pyx_builtin_BaseException) __PYX_ERR(0, 296, __pyx_L1_error) + __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 182, __pyx_L1_error) + __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 201, __pyx_L1_error) + __pyx_builtin_BaseException = __Pyx_GetBuiltinName(__pyx_n_s_BaseException); if (!__pyx_builtin_BaseException) __PYX_ERR(0, 294, __pyx_L1_error) __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(4, 234, __pyx_L1_error) __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(4, 362, __pyx_L1_error) __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(5, 19, __pyx_L1_error) __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(5, 41, __pyx_L1_error) #if PY_MAJOR_VERSION >= 3 - __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) __PYX_ERR(5, 1005, __pyx_L1_error) + __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) __PYX_ERR(5, 1004, __pyx_L1_error) #else - __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) __PYX_ERR(5, 1005, __pyx_L1_error) + __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, 1490, __pyx_L1_error) - __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(5, 1508, __pyx_L1_error) + __pyx_builtin_UnicodeEncodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeEncodeError); if (!__pyx_builtin_UnicodeEncodeError) __PYX_ERR(5, 1525, __pyx_L1_error) + __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(5, 1543, __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_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 743, __pyx_L1_error) - __pyx_builtin_FutureWarning = __Pyx_GetBuiltinName(__pyx_n_s_FutureWarning); if (!__pyx_builtin_FutureWarning) __PYX_ERR(0, 1184, __pyx_L1_error) - __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 1845, __pyx_L1_error) - __pyx_builtin_DeprecationWarning = __Pyx_GetBuiltinName(__pyx_n_s_DeprecationWarning); if (!__pyx_builtin_DeprecationWarning) __PYX_ERR(0, 2036, __pyx_L1_error) - __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 2548, __pyx_L1_error) - __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 3465, __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_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_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(0, 3542, __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) return 0; __pyx_L1_error:; return -1; } -static int __Pyx_InitCachedConstants(void) { +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "lxml/etree.pyx":184 + /* "lxml/etree.pyx":182 * prefix_utf, uri_utf = _utf8(prefix), _utf8(uri) * if _check_internal_prefix(prefix_utf): * raise ValueError("Prefix format reserved for internal use") # <<<<<<<<<<<<<< * _tagValidOrRaise(prefix_utf) * _uriValidOrRaise(uri_utf) */ - __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_Prefix_format_reserved_for_inter); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 184, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__8); - __Pyx_GIVEREF(__pyx_tuple__8); + __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_Prefix_format_reserved_for_inter); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple_); + __Pyx_GIVEREF(__pyx_tuple_); - /* "lxml/etree.pyx":224 + /* "lxml/etree.pyx":222 * cdef __unpackDottedVersion(version): * version_list = [] * l = (version.decode("ascii").replace(u'-', u'.').split(u'.') + [0]*4)[:4] # <<<<<<<<<<<<<< * for item in l: * try: */ - __pyx_tuple__9 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 224, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__9); - __Pyx_GIVEREF(__pyx_tuple__9); - __pyx_tuple__12 = PyTuple_Pack(2, __pyx_kp_u__10, __pyx_kp_u__11); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 224, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__12); - __Pyx_GIVEREF(__pyx_tuple__12); - __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_u__11); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 224, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__13); - __Pyx_GIVEREF(__pyx_tuple__13); - __pyx_slice__14 = PySlice_New(Py_None, __pyx_int_4, Py_None); if (unlikely(!__pyx_slice__14)) __PYX_ERR(0, 224, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__14); - __Pyx_GIVEREF(__pyx_slice__14); - - /* "lxml/etree.pyx":229 - * item = int(item) - * except ValueError: - * if item.startswith(u'dev'): # <<<<<<<<<<<<<< - * count = item[3:] - * item = -300 - */ - __pyx_tuple__15 = PyTuple_Pack(1, __pyx_n_u_dev); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 229, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__15); - __Pyx_GIVEREF(__pyx_tuple__15); + __pyx_tuple__4 = PyTuple_Pack(2, __pyx_kp_u__2, __pyx_kp_u__3); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__4); + __Pyx_GIVEREF(__pyx_tuple__4); + __pyx_slice__5 = PySlice_New(Py_None, __pyx_int_4, Py_None); if (unlikely(!__pyx_slice__5)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__5); + __Pyx_GIVEREF(__pyx_slice__5); - /* "lxml/etree.pyx":230 + /* "lxml/etree.pyx":228 * except ValueError: * if item.startswith(u'dev'): * count = item[3:] # <<<<<<<<<<<<<< * item = -300 * elif item.startswith(u'alpha'): */ - __pyx_slice__16 = PySlice_New(__pyx_int_3, Py_None, Py_None); if (unlikely(!__pyx_slice__16)) __PYX_ERR(0, 230, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__16); - __Pyx_GIVEREF(__pyx_slice__16); - - /* "lxml/etree.pyx":232 - * count = item[3:] - * item = -300 - * elif item.startswith(u'alpha'): # <<<<<<<<<<<<<< - * count = item[5:] - * item = -200 - */ - __pyx_tuple__17 = PyTuple_Pack(1, __pyx_n_u_alpha); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 232, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__17); - __Pyx_GIVEREF(__pyx_tuple__17); + __pyx_slice__6 = PySlice_New(__pyx_int_3, Py_None, Py_None); if (unlikely(!__pyx_slice__6)) __PYX_ERR(0, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__6); + __Pyx_GIVEREF(__pyx_slice__6); - /* "lxml/etree.pyx":233 + /* "lxml/etree.pyx":231 * item = -300 * elif item.startswith(u'alpha'): * count = item[5:] # <<<<<<<<<<<<<< * item = -200 * elif item.startswith(u'beta'): */ - __pyx_slice__18 = PySlice_New(__pyx_int_5, Py_None, Py_None); if (unlikely(!__pyx_slice__18)) __PYX_ERR(0, 233, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__18); - __Pyx_GIVEREF(__pyx_slice__18); - - /* "lxml/etree.pyx":235 - * count = item[5:] - * item = -200 - * elif item.startswith(u'beta'): # <<<<<<<<<<<<<< - * count = item[4:] - * item = -100 - */ - __pyx_tuple__19 = PyTuple_Pack(1, __pyx_n_u_beta); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 235, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__19); - __Pyx_GIVEREF(__pyx_tuple__19); + __pyx_slice__7 = PySlice_New(__pyx_int_5, Py_None, Py_None); if (unlikely(!__pyx_slice__7)) __PYX_ERR(0, 231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__7); + __Pyx_GIVEREF(__pyx_slice__7); - /* "lxml/etree.pyx":236 + /* "lxml/etree.pyx":234 * item = -200 * elif item.startswith(u'beta'): * count = item[4:] # <<<<<<<<<<<<<< * item = -100 * else: */ - __pyx_slice__20 = PySlice_New(__pyx_int_4, Py_None, Py_None); if (unlikely(!__pyx_slice__20)) __PYX_ERR(0, 236, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__20); - __Pyx_GIVEREF(__pyx_slice__20); + __pyx_slice__8 = PySlice_New(__pyx_int_4, Py_None, Py_None); if (unlikely(!__pyx_slice__8)) __PYX_ERR(0, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__8); + __Pyx_GIVEREF(__pyx_slice__8); /* "src/lxml/proxy.pxi":566 * """ @@ -243286,86 +226568,53 @@ static int __Pyx_InitCachedConstants(void) { * if c_doc.type not in (tree.XML_DOCUMENT_NODE, tree.XML_HTML_DOCUMENT_NODE): * doc_type = c_doc.type */ - __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_Illegal_document_provided_NULL); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(4, 566, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__21); - __Pyx_GIVEREF(__pyx_tuple__21); - - /* "src/lxml/apihelpers.pxi":1278 - * # 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__24 = PyTuple_Pack(1, __pyx_kp_s_cannot_append_parent_to_itself); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(5, 1278, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__24); - __Pyx_GIVEREF(__pyx_tuple__24); + __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_Illegal_document_provided_NULL); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(4, 566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__9); + __Pyx_GIVEREF(__pyx_tuple__9); - /* "src/lxml/apihelpers.pxi":1297 + /* "src/lxml/apihelpers.pxi":1277 * # 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__25 = PyTuple_Pack(1, __pyx_kp_s_cannot_append_parent_to_itself); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(5, 1297, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__25); - __Pyx_GIVEREF(__pyx_tuple__25); + __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_cannot_append_parent_to_itself); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(5, 1277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__12); + __Pyx_GIVEREF(__pyx_tuple__12); - /* "src/lxml/apihelpers.pxi":1330 + /* "src/lxml/apihelpers.pxi":1329 * 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__26 = PyTuple_Pack(1, __pyx_kp_s_cannot_add_ancestor_as_sibling_p); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(5, 1330, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__26); - __Pyx_GIVEREF(__pyx_tuple__26); + __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_cannot_add_ancestor_as_sibling_p); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(5, 1329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__13); + __Pyx_GIVEREF(__pyx_tuple__13); - /* "src/lxml/apihelpers.pxi":1439 + /* "src/lxml/apihelpers.pxi":1474 * 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__27 = PyTuple_Pack(1, __pyx_kp_s_All_strings_must_be_XML_compatib); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(5, 1439, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__27); - __Pyx_GIVEREF(__pyx_tuple__27); - - /* "src/lxml/apihelpers.pxi":1452 - * methods, e.g. _Element.__repr__(). - * """ - * return s.encode('unicode-escape') if python.IS_PYTHON2 else s # <<<<<<<<<<<<<< - * - * - */ - __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_unicode_escape); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(5, 1452, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__28); - __Pyx_GIVEREF(__pyx_tuple__28); + __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_All_strings_must_be_XML_compatib); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(5, 1474, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__14); + __Pyx_GIVEREF(__pyx_tuple__14); - /* "src/lxml/apihelpers.pxi":1494 + /* "src/lxml/apihelpers.pxi":1529 * return filename8 * else: * raise TypeError("Argument must be string or unicode.") # <<<<<<<<<<<<<< * * cdef object _decodeFilename(const_xmlChar* c_path): */ - __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_Argument_must_be_string_or_unico); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(5, 1494, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__29); - __Pyx_GIVEREF(__pyx_tuple__29); - - /* "src/lxml/apihelpers.pxi":1543 - * return (filename).encode('utf8') - * else: - * raise TypeError("Argument must be string or unicode.") # <<<<<<<<<<<<<< - * - * cdef tuple _getNsTag(tag): - */ - __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_Argument_must_be_string_or_unico); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(5, 1543, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__30); - __Pyx_GIVEREF(__pyx_tuple__30); + __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_Argument_must_be_string_or_unico); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(5, 1529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__15); + __Pyx_GIVEREF(__pyx_tuple__15); /* "src/lxml/xmlerror.pxi":595 * except KeyError: @@ -243374,240 +226623,130 @@ static int __Pyx_InitCachedConstants(void) { * return log * */ - __pyx_tuple__54 = PyTuple_Pack(1, __pyx_int_100); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(1, 595, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__54); - __Pyx_GIVEREF(__pyx_tuple__54); - - /* "src/lxml/xmlerror.pxi":795 - * if not line: - * continue - * name, value = line.split('=') # <<<<<<<<<<<<<< - * value = int(value) - * setattr(cls, name, value) - */ - __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_s__56); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(1, 795, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__57); - __Pyx_GIVEREF(__pyx_tuple__57); - - /* "lxml/etree.pyx":564 - * match = _find_invalid_public_id_characters(value) - * if match: - * raise ValueError, f'Invalid character(s) {match.group(0)!r} in public_id.' # <<<<<<<<<<<<<< - * value = _utf8(value) - * c_value = tree.xmlStrdup(_xcstr(value)) - */ - __pyx_tuple__59 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 564, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__59); - __Pyx_GIVEREF(__pyx_tuple__59); + __pyx_tuple__19 = PyTuple_Pack(1, __pyx_int_100); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 595, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__19); + __Pyx_GIVEREF(__pyx_tuple__19); - /* "lxml/etree.pyx":595 + /* "lxml/etree.pyx":593 * # enclosed in single quotes or quotes. * if b"'" in bvalue and b'"' in bvalue: * raise ValueError( # <<<<<<<<<<<<<< * 'System URL may not contain both single (\') and double quotes (").') * c_value = tree.xmlStrdup(_xcstr(bvalue)) */ - __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_s_System_URL_may_not_contain_both); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 595, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__62); - __Pyx_GIVEREF(__pyx_tuple__62); + __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_System_URL_may_not_contain_both); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__23); + __Pyx_GIVEREF(__pyx_tuple__23); - /* "lxml/etree.pyx":1181 + /* "lxml/etree.pyx":1179 * #u"__nonzero__(self)" # currently fails in Py3.1 * import warnings * warnings.warn( # <<<<<<<<<<<<<< * u"The behavior of this method will change in future versions. " * u"Use specific 'len(elem)' or 'elem is not None' test instead.", */ - __pyx_tuple__78 = PyTuple_Pack(2, __pyx_kp_u_The_behavior_of_this_method_will, __pyx_builtin_FutureWarning); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 1181, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__78); - __Pyx_GIVEREF(__pyx_tuple__78); + __pyx_tuple__27 = PyTuple_Pack(2, __pyx_kp_u_The_behavior_of_this_method_will, __pyx_builtin_FutureWarning); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 1179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__27); + __Pyx_GIVEREF(__pyx_tuple__27); - /* "lxml/etree.pyx":2000 + /* "lxml/etree.pyx":1998 * 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__122 = PyTuple_Pack(1, __pyx_kp_s_Cannot_specify_encoding_with_C14); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 2000, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__122); - __Pyx_GIVEREF(__pyx_tuple__122); + __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_GOTREF(__pyx_tuple__32); + __Pyx_GIVEREF(__pyx_tuple__32); - /* "lxml/etree.pyx":2002 + /* "lxml/etree.pyx":2000 * 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__123 = PyTuple_Pack(1, __pyx_kp_s_Cannot_enable_XML_declaration_in); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(0, 2002, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__123); - __Pyx_GIVEREF(__pyx_tuple__123); + __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_GOTREF(__pyx_tuple__33); + __Pyx_GIVEREF(__pyx_tuple__33); - /* "lxml/etree.pyx":2008 + /* "lxml/etree.pyx":2006 * 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__124 = PyTuple_Pack(1, __pyx_kp_s_Can_only_discard_comments_in_C14); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 2008, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__124); - __Pyx_GIVEREF(__pyx_tuple__124); + __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_GOTREF(__pyx_tuple__34); + __Pyx_GIVEREF(__pyx_tuple__34); - /* "lxml/etree.pyx":2034 + /* "lxml/etree.pyx":2032 * if docstring is not None and doctype is None: * import warnings * warnings.warn( # <<<<<<<<<<<<<< * "The 'docstring' option is deprecated. Use 'doctype' instead.", * DeprecationWarning) */ - __pyx_tuple__125 = PyTuple_Pack(2, __pyx_kp_s_The_docstring_option_is_deprecat, __pyx_builtin_DeprecationWarning); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(0, 2034, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__125); - __Pyx_GIVEREF(__pyx_tuple__125); + __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_GOTREF(__pyx_tuple__35); + __Pyx_GIVEREF(__pyx_tuple__35); - /* "lxml/etree.pyx":2200 + /* "lxml/etree.pyx":2198 * root = self.getroot() * if _isString(path): * if path[:1] == "/": # <<<<<<<<<<<<<< * path = "." + path * return root.find(path, namespaces) */ - __pyx_slice__134 = PySlice_New(Py_None, __pyx_int_1, Py_None); if (unlikely(!__pyx_slice__134)) __PYX_ERR(0, 2200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__134); - __Pyx_GIVEREF(__pyx_slice__134); - - /* "lxml/etree.pyx":2217 - * root = self.getroot() - * if _isString(path): - * if path[:1] == "/": # <<<<<<<<<<<<<< - * path = "." + path - * return root.findtext(path, default, namespaces) - */ - __pyx_slice__136 = PySlice_New(Py_None, __pyx_int_1, Py_None); if (unlikely(!__pyx_slice__136)) __PYX_ERR(0, 2217, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__136); - __Pyx_GIVEREF(__pyx_slice__136); - - /* "lxml/etree.pyx":2234 - * root = self.getroot() - * if _isString(path): - * if path[:1] == "/": # <<<<<<<<<<<<<< - * path = "." + path - * return root.findall(path, namespaces) - */ - __pyx_slice__138 = PySlice_New(Py_None, __pyx_int_1, Py_None); if (unlikely(!__pyx_slice__138)) __PYX_ERR(0, 2234, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__138); - __Pyx_GIVEREF(__pyx_slice__138); - - /* "lxml/etree.pyx":2251 - * root = self.getroot() - * if _isString(path): - * if path[:1] == "/": # <<<<<<<<<<<<<< - * path = "." + path - * return root.iterfind(path, namespaces) - */ - __pyx_slice__140 = PySlice_New(Py_None, __pyx_int_1, Py_None); if (unlikely(!__pyx_slice__140)) __PYX_ERR(0, 2251, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__140); - __Pyx_GIVEREF(__pyx_slice__140); + __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_GOTREF(__pyx_slice__39); + __Pyx_GIVEREF(__pyx_slice__39); - /* "lxml/etree.pyx":2946 + /* "lxml/etree.pyx":2944 * _assertValidNode(element) * if with_tail: * events = (u"start", u"end") # <<<<<<<<<<<<<< * else: * events = (u"start",) */ - __pyx_tuple__162 = PyTuple_Pack(2, __pyx_n_u_start, __pyx_n_u_end); if (unlikely(!__pyx_tuple__162)) __PYX_ERR(0, 2946, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__162); - __Pyx_GIVEREF(__pyx_tuple__162); + __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_GOTREF(__pyx_tuple__42); + __Pyx_GIVEREF(__pyx_tuple__42); - /* "lxml/etree.pyx":2948 + /* "lxml/etree.pyx":2946 * events = (u"start", u"end") * else: * events = (u"start",) # <<<<<<<<<<<<<< * self._start_element = element * self._nextEvent = iterwalk(element, events=events, tag=tag).__next__ */ - __pyx_tuple__163 = PyTuple_Pack(1, __pyx_n_u_start); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(0, 2948, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__163); - __Pyx_GIVEREF(__pyx_tuple__163); - - /* "lxml/etree.pyx":3016 - * else: - * text = _utf8(text) - * if b'--' in text or text.endswith(b'-'): # <<<<<<<<<<<<<< - * raise ValueError("Comment may not contain '--' or end with '-'") - * - */ - __pyx_tuple__167 = PyTuple_Pack(1, __pyx_kp_b__10); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(0, 3016, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__167); - __Pyx_GIVEREF(__pyx_tuple__167); + __pyx_tuple__43 = PyTuple_Pack(1, __pyx_n_u_start); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 2946, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__43); + __Pyx_GIVEREF(__pyx_tuple__43); - /* "lxml/etree.pyx":3017 + /* "lxml/etree.pyx":3015 * 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__168 = PyTuple_Pack(1, __pyx_kp_s_Comment_may_not_contain_or_end_w); if (unlikely(!__pyx_tuple__168)) __PYX_ERR(0, 3017, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__168); - __Pyx_GIVEREF(__pyx_tuple__168); + __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_GOTREF(__pyx_tuple__45); + __Pyx_GIVEREF(__pyx_tuple__45); - /* "lxml/etree.pyx":3230 + /* "lxml/etree.pyx":3228 * 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__179 = PyTuple_Pack(1, __pyx_kp_s_passing_a_single_string_into_fro); if (unlikely(!__pyx_tuple__179)) __PYX_ERR(0, 3230, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__179); - __Pyx_GIVEREF(__pyx_tuple__179); - - /* "lxml/etree.pyx":3312 - * 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__183 = PyTuple_Pack(1, __pyx_kp_s_Cannot_specify_encoding_with_C14); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(0, 3312, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__183); - __Pyx_GIVEREF(__pyx_tuple__183); - - /* "lxml/etree.pyx":3314 - * 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_tuple__184 = PyTuple_Pack(1, __pyx_kp_s_Cannot_enable_XML_declaration_in); if (unlikely(!__pyx_tuple__184)) __PYX_ERR(0, 3314, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__184); - __Pyx_GIVEREF(__pyx_tuple__184); - - /* "lxml/etree.pyx":3317 - * 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_tuple__185 = PyTuple_Pack(1, __pyx_kp_s_Can_only_discard_comments_in_C14); if (unlikely(!__pyx_tuple__185)) __PYX_ERR(0, 3317, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__185); - __Pyx_GIVEREF(__pyx_tuple__185); - - /* "lxml/etree.pyx":3465 - * """ - * if python.PY_VERSION_HEX < 0x02070000: - * raise NotImplementedError("PyCapsule usage requires Python 2.7+") # <<<<<<<<<<<<<< - * - * cdef xmlDoc* c_doc - */ - __pyx_tuple__190 = PyTuple_Pack(1, __pyx_kp_s_PyCapsule_usage_requires_Python); if (unlikely(!__pyx_tuple__190)) __PYX_ERR(0, 3465, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__190); - __Pyx_GIVEREF(__pyx_tuple__190); + __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_GOTREF(__pyx_tuple__48); + __Pyx_GIVEREF(__pyx_tuple__48); /* "src/lxml/readonlytree.pxi":18 * """ @@ -243616,9 +226755,9 @@ static int __Pyx_InitCachedConstants(void) { * return 0 * */ - __pyx_tuple__191 = PyTuple_Pack(1, __pyx_kp_s_Proxy_invalidated); if (unlikely(!__pyx_tuple__191)) __PYX_ERR(6, 18, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__191); - __Pyx_GIVEREF(__pyx_tuple__191); + __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_Proxy_invalidated); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(6, 18, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__49); + __Pyx_GIVEREF(__pyx_tuple__49); /* "src/lxml/readonlytree.pxi":196 * children = [ el for el in children if el.tag == tag ] @@ -243627,31 +226766,9 @@ static int __Pyx_InitCachedConstants(void) { * return iter(children) * */ - __pyx_slice__195 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__195)) __PYX_ERR(6, 196, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__195); - __Pyx_GIVEREF(__pyx_slice__195); - - /* "src/lxml/nsclasses.pxi":44 - * class_dict_iterable = class_dict_iterable.items() - * for name, item in class_dict_iterable: - * if (name is None or name[:1] != '_') and callable(item): # <<<<<<<<<<<<<< - * self[name] = item - * - */ - __pyx_slice__213 = PySlice_New(Py_None, __pyx_int_1, Py_None); if (unlikely(!__pyx_slice__213)) __PYX_ERR(9, 44, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__213); - __Pyx_GIVEREF(__pyx_slice__213); - - /* "src/lxml/parser.pxi":461 - * elif not isinstance(filename, bytes): - * # most likely a text URL - * filename = filename.encode('utf8') # <<<<<<<<<<<<<< - * if not isinstance(filename, bytes): - * filename = None - */ - __pyx_tuple__233 = PyTuple_Pack(1, __pyx_n_s_utf8); if (unlikely(!__pyx_tuple__233)) __PYX_ERR(2, 461, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__233); - __Pyx_GIVEREF(__pyx_tuple__233); + __pyx_slice__50 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__50)) __PYX_ERR(6, 196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__50); + __Pyx_GIVEREF(__pyx_slice__50); /* "src/lxml/parser.pxi":1546 * XMLParser.__init__(self, **kwargs) @@ -243660,20 +226777,9 @@ static int __Pyx_InitCachedConstants(void) { * self._setBaseURL(base_url) * self._collectEvents(events, tag) */ - __pyx_tuple__241 = PyTuple_Pack(1, __pyx_n_s_end); if (unlikely(!__pyx_tuple__241)) __PYX_ERR(2, 1546, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__241); - __Pyx_GIVEREF(__pyx_tuple__241); - - /* "src/lxml/parser.pxi":1719 - * HTMLParser.__init__(self, **kwargs) - * if events is None: - * events = ('end',) # <<<<<<<<<<<<<< - * self._setBaseURL(base_url) - * self._collectEvents(events, tag) - */ - __pyx_tuple__245 = PyTuple_Pack(1, __pyx_n_s_end); if (unlikely(!__pyx_tuple__245)) __PYX_ERR(2, 1719, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__245); - __Pyx_GIVEREF(__pyx_tuple__245); + __pyx_tuple__53 = PyTuple_Pack(1, __pyx_n_s_end); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(2, 1546, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__53); + __Pyx_GIVEREF(__pyx_tuple__53); /* "src/lxml/parser.pxi":1872 * if isinstance(text, unicode): @@ -243682,20 +226788,9 @@ static int __Pyx_InitCachedConstants(void) { * u"Unicode strings with encoding declaration are not supported. " * u"Please use bytes input or XML fragments without declaration.") */ - __pyx_tuple__247 = PyTuple_Pack(1, __pyx_kp_u_Unicode_strings_with_encoding_de); if (unlikely(!__pyx_tuple__247)) __PYX_ERR(2, 1872, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__247); - __Pyx_GIVEREF(__pyx_tuple__247); - - /* "src/lxml/serializer.pxi":119 - * if enchandler is NULL and c_enc is not NULL: - * if encoding is not None: - * encoding = encoding.decode('UTF-8') # <<<<<<<<<<<<<< - * raise LookupError, f"unknown encoding: '{encoding}'" - * c_buffer = tree.xmlAllocOutputBuffer(enchandler) - */ - __pyx_tuple__256 = PyTuple_Pack(1, __pyx_kp_s_UTF_8); if (unlikely(!__pyx_tuple__256)) __PYX_ERR(8, 119, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__256); - __Pyx_GIVEREF(__pyx_tuple__256); + __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_u_Unicode_strings_with_encoding_de); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(2, 1872, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__54); + __Pyx_GIVEREF(__pyx_tuple__54); /* "src/lxml/serializer.pxi":833 * writer = _FilelikeWriter(f, compression=compression) @@ -243704,9 +226799,9 @@ static int __Pyx_InitCachedConstants(void) { * bytes_count = c14n.xmlC14NDocSaveTo( * c_doc, NULL, exclusive, c_inclusive_ns_prefixes, */ - __pyx_tuple__257 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__257)) __PYX_ERR(8, 833, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__257); - __Pyx_GIVEREF(__pyx_tuple__257); + __pyx_tuple__56 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(8, 833, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__56); + __Pyx_GIVEREF(__pyx_tuple__56); /* "src/lxml/serializer.pxi":932 * assert self.output_file is not None @@ -243715,9 +226810,9 @@ static int __Pyx_InitCachedConstants(void) { * if not hasattr(self.output_file, 'write'): * raise TypeError("Output file needs an async .write() method") */ - __pyx_tuple__261 = PyTuple_Pack(1, __pyx_kp_s_Cannot_asynchronously_write_to_a); if (unlikely(!__pyx_tuple__261)) __PYX_ERR(8, 932, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__261); - __Pyx_GIVEREF(__pyx_tuple__261); + __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_s_Cannot_asynchronously_write_to_a); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(8, 932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__58); + __Pyx_GIVEREF(__pyx_tuple__58); /* "src/lxml/serializer.pxi":934 * raise TypeError("Cannot asynchronously write to a plain file") @@ -243726,64 +226821,9 @@ static int __Pyx_InitCachedConstants(void) { * self.async_writer = _AsyncIncrementalFileWriter( * self.output_file, self.encoding, self.compresslevel, */ - __pyx_tuple__262 = PyTuple_Pack(1, __pyx_kp_s_Output_file_needs_an_async_write); if (unlikely(!__pyx_tuple__262)) __PYX_ERR(8, 934, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__262); - __Pyx_GIVEREF(__pyx_tuple__262); - - /* "src/lxml/serializer.pxi":1006 - * cdef int c_standalone - * if self._method != OUTPUT_METHOD_XML: - * raise LxmlSyntaxError("only XML documents have declarations") # <<<<<<<<<<<<<< - * if self._status >= WRITER_DECL_WRITTEN: - * raise LxmlSyntaxError("XML declaration already written") - */ - __pyx_tuple__265 = PyTuple_Pack(1, __pyx_kp_s_only_XML_documents_have_declarat); if (unlikely(!__pyx_tuple__265)) __PYX_ERR(8, 1006, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__265); - __Pyx_GIVEREF(__pyx_tuple__265); - - /* "src/lxml/serializer.pxi":1008 - * raise LxmlSyntaxError("only XML documents have declarations") - * if self._status >= WRITER_DECL_WRITTEN: - * raise LxmlSyntaxError("XML declaration already written") # <<<<<<<<<<<<<< - * version = _utf8orNone(version) - * c_version = _xcstr(version) if version is not None else NULL - */ - __pyx_tuple__266 = PyTuple_Pack(1, __pyx_kp_s_XML_declaration_already_written); if (unlikely(!__pyx_tuple__266)) __PYX_ERR(8, 1008, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__266); - __Pyx_GIVEREF(__pyx_tuple__266); - - /* "src/lxml/serializer.pxi":1035 - * return - * if self._status >= WRITER_DTD_WRITTEN: - * raise LxmlSyntaxError("DOCTYPE already written or cannot write it here") # <<<<<<<<<<<<<< - * doctype = _utf8(doctype) - * _writeDoctype(self._c_out, _xcstr(doctype)) - */ - __pyx_tuple__268 = PyTuple_Pack(1, __pyx_kp_s_DOCTYPE_already_written_or_canno); if (unlikely(!__pyx_tuple__268)) __PYX_ERR(8, 1035, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__268); - __Pyx_GIVEREF(__pyx_tuple__268); - - /* "src/lxml/serializer.pxi":1091 - * cdef _write_start_element(self, element_config): - * if self._status > WRITER_IN_ELEMENT: - * raise LxmlSyntaxError("cannot append trailing element to complete XML document") # <<<<<<<<<<<<<< - * ns, name, attributes, nsmap = element_config - * flat_namespace_map, new_namespaces = self._collect_namespaces(nsmap) - */ - __pyx_tuple__271 = PyTuple_Pack(1, __pyx_kp_s_cannot_append_trailing_element_t); if (unlikely(!__pyx_tuple__271)) __PYX_ERR(8, 1091, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__271); - __Pyx_GIVEREF(__pyx_tuple__271); - - /* "src/lxml/serializer.pxi":1134 - * cdef _write_end_element(self, element_config): - * if self._status != WRITER_IN_ELEMENT: - * raise LxmlSyntaxError("not in an element") # <<<<<<<<<<<<<< - * if not self._element_stack or self._element_stack[-1][:2] != element_config[:2]: - * raise LxmlSyntaxError("inconsistent exit action in context manager") - */ - __pyx_tuple__272 = PyTuple_Pack(1, __pyx_kp_s_not_in_an_element); if (unlikely(!__pyx_tuple__272)) __PYX_ERR(8, 1134, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__272); - __Pyx_GIVEREF(__pyx_tuple__272); + __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_s_Output_file_needs_an_async_write); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(8, 934, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__59); + __Pyx_GIVEREF(__pyx_tuple__59); /* "src/lxml/serializer.pxi":1135 * if self._status != WRITER_IN_ELEMENT: @@ -243792,23 +226832,9 @@ static int __Pyx_InitCachedConstants(void) { * raise LxmlSyntaxError("inconsistent exit action in context manager") * */ - __pyx_slice__273 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__273)) __PYX_ERR(8, 1135, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__273); - __Pyx_GIVEREF(__pyx_slice__273); - __pyx_slice__274 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__274)) __PYX_ERR(8, 1135, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__274); - __Pyx_GIVEREF(__pyx_slice__274); - - /* "src/lxml/serializer.pxi":1136 - * raise LxmlSyntaxError("not in an element") - * if not self._element_stack or self._element_stack[-1][:2] != element_config[:2]: - * raise LxmlSyntaxError("inconsistent exit action in context manager") # <<<<<<<<<<<<<< - * - * # If previous write operations failed, the context manager exit might still call us. - */ - __pyx_tuple__275 = PyTuple_Pack(1, __pyx_kp_s_inconsistent_exit_action_in_cont); if (unlikely(!__pyx_tuple__275)) __PYX_ERR(8, 1136, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__275); - __Pyx_GIVEREF(__pyx_tuple__275); + __pyx_slice__61 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__61)) __PYX_ERR(8, 1135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__61); + __Pyx_GIVEREF(__pyx_slice__61); /* "src/lxml/serializer.pxi":1143 * ok_to_write = self._c_out.error == xmlerror.XML_ERR_OK @@ -243817,86 +226843,9 @@ static int __Pyx_InitCachedConstants(void) { * if ok_to_write: * tree.xmlOutputBufferWrite(self._c_out, 2, ' WRITER_IN_ELEMENT or content.strip(): - * raise LxmlSyntaxError("not in an element") # <<<<<<<<<<<<<< - * bstring = _utf8(content) - * if not bstring: - */ - __pyx_tuple__278 = PyTuple_Pack(1, __pyx_kp_s_not_in_an_element); if (unlikely(!__pyx_tuple__278)) __PYX_ERR(8, 1205, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__278); - __Pyx_GIVEREF(__pyx_tuple__278); - - /* "src/lxml/serializer.pxi":1221 - * elif iselement(content): - * if self._status > WRITER_IN_ELEMENT: - * raise LxmlSyntaxError("cannot append trailing element to complete XML document") # <<<<<<<<<<<<<< - * _writeNodeToBuffer(self._c_out, (<_Element>content)._c_node, - * self._c_encoding, NULL, c_method, - */ - __pyx_tuple__279 = PyTuple_Pack(1, __pyx_kp_s_cannot_append_trailing_element_t); if (unlikely(!__pyx_tuple__279)) __PYX_ERR(8, 1221, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__279); - __Pyx_GIVEREF(__pyx_tuple__279); - - /* "src/lxml/serializer.pxi":1249 - * if raise_on_error: - * if self._status < WRITER_IN_ELEMENT: - * raise LxmlSyntaxError("no content written") # <<<<<<<<<<<<<< - * if self._element_stack: - * raise LxmlSyntaxError("pending open tags on close") - */ - __pyx_tuple__281 = PyTuple_Pack(1, __pyx_kp_s_no_content_written); if (unlikely(!__pyx_tuple__281)) __PYX_ERR(8, 1249, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__281); - __Pyx_GIVEREF(__pyx_tuple__281); - - /* "src/lxml/serializer.pxi":1251 - * raise LxmlSyntaxError("no content written") - * if self._element_stack: - * raise LxmlSyntaxError("pending open tags on close") # <<<<<<<<<<<<<< - * error_result = self._c_out.error - * if error_result == xmlerror.XML_ERR_OK: - */ - __pyx_tuple__282 = PyTuple_Pack(1, __pyx_kp_s_pending_open_tags_on_close); if (unlikely(!__pyx_tuple__282)) __PYX_ERR(8, 1251, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__282); - __Pyx_GIVEREF(__pyx_tuple__282); - - /* "src/lxml/serializer.pxi":1423 - * def __enter__(self): - * if self._entered: - * raise LxmlSyntaxError("Inconsistent enter action in context manager") # <<<<<<<<<<<<<< - * self._writer._method = self._new_method - * self._entered = True - */ - __pyx_tuple__297 = PyTuple_Pack(1, __pyx_kp_s_Inconsistent_enter_action_in_con); if (unlikely(!__pyx_tuple__297)) __PYX_ERR(8, 1423, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__297); - __Pyx_GIVEREF(__pyx_tuple__297); - - /* "src/lxml/serializer.pxi":1429 - * def __exit__(self, exc_type, exc_val, exc_tb): - * if self._exited: - * raise LxmlSyntaxError("Inconsistent exit action in context manager") # <<<<<<<<<<<<<< - * if self._writer._method != self._new_method: - * raise LxmlSyntaxError("Method changed outside of context manager") - */ - __pyx_tuple__299 = PyTuple_Pack(1, __pyx_kp_s_Inconsistent_exit_action_in_cont); if (unlikely(!__pyx_tuple__299)) __PYX_ERR(8, 1429, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__299); - __Pyx_GIVEREF(__pyx_tuple__299); - - /* "src/lxml/serializer.pxi":1431 - * raise LxmlSyntaxError("Inconsistent exit action in context manager") - * if self._writer._method != self._new_method: - * raise LxmlSyntaxError("Method changed outside of context manager") # <<<<<<<<<<<<<< - * self._writer._method = self._old_method - * self._exited = True - */ - __pyx_tuple__300 = PyTuple_Pack(1, __pyx_kp_s_Method_changed_outside_of_contex); if (unlikely(!__pyx_tuple__300)) __PYX_ERR(8, 1431, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__300); - __Pyx_GIVEREF(__pyx_tuple__300); + __pyx_slice__62 = PySlice_New(__pyx_int_1, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__62)) __PYX_ERR(8, 1143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__62); + __Pyx_GIVEREF(__pyx_slice__62); /* "src/lxml/iterparse.pxi":67 * cdef bint _close_source_after_read @@ -243905,20 +226854,9 @@ static int __Pyx_InitCachedConstants(void) { * attribute_defaults=False, dtd_validation=False, * load_dtd=False, no_network=True, remove_blank_text=False, */ - __pyx_tuple__303 = PyTuple_Pack(1, __pyx_n_u_end); if (unlikely(!__pyx_tuple__303)) __PYX_ERR(13, 67, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__303); - __Pyx_GIVEREF(__pyx_tuple__303); - - /* "src/lxml/iterparse.pxi":219 - * @cython.final - * cdef bint _read_more_events(self, _SaxParserContext context) except -123: - * data = self._source.read(__ITERPARSE_CHUNK_SIZE) # <<<<<<<<<<<<<< - * if not isinstance(data, bytes): - * self._close_source() - */ - __pyx_tuple__306 = PyTuple_Pack(1, __pyx_int_32768); if (unlikely(!__pyx_tuple__306)) __PYX_ERR(13, 219, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__306); - __Pyx_GIVEREF(__pyx_tuple__306); + __pyx_tuple__72 = PyTuple_Pack(1, __pyx_n_u_end); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(14, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__72); + __Pyx_GIVEREF(__pyx_tuple__72); /* "src/lxml/iterparse.pxi":222 * if not isinstance(data, bytes): @@ -243927,31 +226865,9 @@ static int __Pyx_InitCachedConstants(void) { * if not data: * try: */ - __pyx_tuple__307 = PyTuple_Pack(1, __pyx_kp_s_reading_file_objects_must_return); if (unlikely(!__pyx_tuple__307)) __PYX_ERR(13, 222, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__307); - __Pyx_GIVEREF(__pyx_tuple__307); - - /* "src/lxml/iterparse.pxi":261 - * cdef _IterwalkSkipStates _skip_state - * - * def __init__(self, element_or_tree, events=(u"end",), tag=None): # <<<<<<<<<<<<<< - * cdef _Element root - * cdef int ns_count - */ - __pyx_tuple__308 = PyTuple_Pack(1, __pyx_n_u_end); if (unlikely(!__pyx_tuple__308)) __PYX_ERR(13, 261, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__308); - __Pyx_GIVEREF(__pyx_tuple__308); - - /* "src/lxml/iterparse.pxi":338 - * if self._events[0][0] in ('start', 'start-ns'): - * self._skip_state = IWSKIP_CAN_SKIP - * return self._pop_event(0) # <<<<<<<<<<<<<< - * - * def skip_subtree(self): - */ - __pyx_tuple__309 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__309)) __PYX_ERR(13, 338, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__309); - __Pyx_GIVEREF(__pyx_tuple__309); + __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_s_reading_file_objects_must_return); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(14, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__73); + __Pyx_GIVEREF(__pyx_tuple__73); /* "src/lxml/iterparse.pxi":376 * self._events.append( (u"end", node) ) @@ -243960,9 +226876,9 @@ static int __Pyx_InitCachedConstants(void) { * for i in range(ns_count): * self._events.append(event) */ - __pyx_tuple__311 = PyTuple_Pack(2, __pyx_kp_u_end_ns, Py_None); if (unlikely(!__pyx_tuple__311)) __PYX_ERR(13, 376, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__311); - __Pyx_GIVEREF(__pyx_tuple__311); + __pyx_tuple__74 = PyTuple_Pack(2, __pyx_kp_u_end_ns, Py_None); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(14, 376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__74); + __Pyx_GIVEREF(__pyx_tuple__74); /* "src/lxml/xmlid.pxi":15 * global _find_id_attributes @@ -243971,20 +226887,9 @@ static int __Pyx_InitCachedConstants(void) { * * # ElementTree compatible implementation: parse and look for 'id' attributes */ - __pyx_tuple__313 = PyTuple_Pack(1, __pyx_kp_u_string_id); if (unlikely(!__pyx_tuple__313)) __PYX_ERR(14, 15, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__313); - __Pyx_GIVEREF(__pyx_tuple__313); - - /* "src/lxml/xmlid.pxi":21 - * dic = {} - * for elem in _find_id_attributes(root): - * dic[elem.get(u'id')] = elem # <<<<<<<<<<<<<< - * return (root, dic) - * - */ - __pyx_tuple__314 = PyTuple_Pack(1, __pyx_n_u_id); if (unlikely(!__pyx_tuple__314)) __PYX_ERR(14, 21, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__314); - __Pyx_GIVEREF(__pyx_tuple__314); + __pyx_tuple__75 = PyTuple_Pack(1, __pyx_kp_u_string_id); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(15, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__75); + __Pyx_GIVEREF(__pyx_tuple__75); /* "src/lxml/xmlid.pxi":114 * if self._keys is None: @@ -243993,53 +226898,9 @@ static int __Pyx_InitCachedConstants(void) { * * def __iter__(self): */ - __pyx_slice__321 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__321)) __PYX_ERR(14, 114, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__321); - __Pyx_GIVEREF(__pyx_slice__321); - - /* "src/lxml/xmlid.pxi":132 - * if self._items is None: - * self._items = self._build_items() - * return self._items[:] # <<<<<<<<<<<<<< - * - * def iteritems(self): - */ - __pyx_slice__324 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__324)) __PYX_ERR(14, 132, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__324); - __Pyx_GIVEREF(__pyx_slice__324); - - /* "src/lxml/extensions.pxi":446 - * if function_mapping is None: - * function_mapping = [ name for name in dir(module) - * if not name.startswith(u'_') ] # <<<<<<<<<<<<<< - * for function_name in function_mapping: - * functions[(ns, function_name)] = getattr(module, function_name) - */ - __pyx_tuple__333 = PyTuple_Pack(1, __pyx_n_u__214); if (unlikely(!__pyx_tuple__333)) __PYX_ERR(17, 446, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__333); - __Pyx_GIVEREF(__pyx_tuple__333); - - /* "src/lxml/extensions.pxi":521 - * return () - * results = [ result.group() ] - * results.extend( result.groups(u'') ) # <<<<<<<<<<<<<< - * result_list = [] - * root = Element(u'matches') - */ - __pyx_tuple__336 = PyTuple_Pack(1, __pyx_kp_u__23); if (unlikely(!__pyx_tuple__336)) __PYX_ERR(17, 521, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__336); - __Pyx_GIVEREF(__pyx_tuple__336); - - /* "src/lxml/extensions.pxi":523 - * results.extend( result.groups(u'') ) - * result_list = [] - * root = Element(u'matches') # <<<<<<<<<<<<<< - * join_groups = u''.join - * for s_match in results: - */ - __pyx_tuple__337 = PyTuple_Pack(1, __pyx_n_u_matches); if (unlikely(!__pyx_tuple__337)) __PYX_ERR(17, 523, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__337); - __Pyx_GIVEREF(__pyx_tuple__337); + __pyx_slice__76 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__76)) __PYX_ERR(15, 114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__76); + __Pyx_GIVEREF(__pyx_slice__76); /* "src/lxml/xpath.pxi":499 * i += 1 @@ -244048,30 +226909,9 @@ static int __Pyx_InitCachedConstants(void) { * namespace = (namespace).decode('utf8') * namespaces[prefix.decode('utf8')] = namespace */ - __pyx_slice__346 = PySlice_New(__pyx_int_1, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__346)) __PYX_ERR(18, 499, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__346); - __Pyx_GIVEREF(__pyx_slice__346); - - /* "src/lxml/xpath.pxi":505 - * # FIXME: this also replaces {namespaces} within strings! - * path_utf = path_utf.replace(namespace_def, prefix_str) - * path = path_utf.decode('utf8') # <<<<<<<<<<<<<< - * return path, namespaces - */ - __pyx_tuple__347 = PyTuple_Pack(1, __pyx_n_s_utf8); if (unlikely(!__pyx_tuple__347)) __PYX_ERR(18, 505, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__347); - __Pyx_GIVEREF(__pyx_tuple__347); - - /* "src/lxml/xslt.pxi":399 - * c_doc._private = self._xslt_resolver_context - * - * with self._error_log: # <<<<<<<<<<<<<< - * c_style = xslt.xsltParseStylesheetDoc(c_doc) - * - */ - __pyx_tuple__350 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__350)) __PYX_ERR(3, 399, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__350); - __Pyx_GIVEREF(__pyx_tuple__350); + __pyx_slice__77 = PySlice_New(__pyx_int_1, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__77)) __PYX_ERR(18, 499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__77); + __Pyx_GIVEREF(__pyx_slice__77); /* "src/lxml/xslt.pxi":466 * """ @@ -244080,31 +226920,9 @@ static int __Pyx_InitCachedConstants(void) { * xslt.xsltMaxDepth = max_depth * */ - __pyx_tuple__353 = PyTuple_Pack(1, __pyx_kp_s_cannot_set_a_maximum_stylesheet); if (unlikely(!__pyx_tuple__353)) __PYX_ERR(3, 466, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__353); - __Pyx_GIVEREF(__pyx_tuple__353); - - /* "src/lxml/xslt.pxi":635 - * if self._access_control is not None: - * self._access_control._register_in_context(transform_ctxt) - * with self._error_log, nogil: # <<<<<<<<<<<<<< - * c_result = xslt.xsltApplyStylesheetUser( - * self._c_style, c_input_doc, params, NULL, NULL, transform_ctxt) - */ - __pyx_tuple__358 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__358)) __PYX_ERR(3, 635, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__358); - __Pyx_GIVEREF(__pyx_tuple__358); - - /* "src/lxml/xslt.pxi":734 - * doc = self._doc - * if doc is None: - * raise XSLTSaveError("No document to serialise") # <<<<<<<<<<<<<< - * c_compression = compression or 0 - * if _isString(file): - */ - __pyx_tuple__360 = PyTuple_Pack(1, __pyx_kp_s_No_document_to_serialise); if (unlikely(!__pyx_tuple__360)) __PYX_ERR(3, 734, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__360); - __Pyx_GIVEREF(__pyx_tuple__360); + __pyx_tuple__80 = PyTuple_Pack(1, __pyx_kp_s_cannot_set_a_maximum_stylesheet); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(3, 466, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__80); + __Pyx_GIVEREF(__pyx_tuple__80); /* "src/lxml/xslt.pxi":890 * global __findStylesheetByID @@ -244113,42 +226931,9 @@ static int __Pyx_InitCachedConstants(void) { * u"//xsl:stylesheet[@xml:id = $id]", * namespaces={u"xsl" : u"http://www.w3.org/1999/XSL/Transform"}) */ - __pyx_tuple__362 = PyTuple_Pack(1, __pyx_kp_u_xsl_stylesheet_xml_id_id); if (unlikely(!__pyx_tuple__362)) __PYX_ERR(3, 890, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__362); - __Pyx_GIVEREF(__pyx_tuple__362); - - /* "src/lxml/xsltext.pxi":224 - * e = unicode(e).encode(u"UTF-8") - * except: - * e = repr(e).encode(u"UTF-8") # <<<<<<<<<<<<<< - * message = python.PyBytes_FromFormat( - * "Error executing extension element '%s': %s", - */ - __pyx_tuple__368 = PyTuple_Pack(1, __pyx_kp_u_UTF_8); if (unlikely(!__pyx_tuple__368)) __PYX_ERR(19, 224, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__368); - __Pyx_GIVEREF(__pyx_tuple__368); - - /* "src/lxml/dtd.pxi":279 - * if _isString(file): - * file = _encodeFilename(file) - * with self._error_log: # <<<<<<<<<<<<<< - * self._c_dtd = xmlparser.xmlParseDTD(NULL, _xcstr(file)) - * elif hasattr(file, 'read'): - */ - __pyx_tuple__378 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__378)) __PYX_ERR(20, 279, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__378); - __Pyx_GIVEREF(__pyx_tuple__378); - - /* "src/lxml/dtd.pxi":286 - * raise DTDParseError, u"file must be a filename or file-like object" - * elif external_id is not None: - * with self._error_log: # <<<<<<<<<<<<<< - * self._c_dtd = xmlparser.xmlParseDTD(external_id, NULL) - * else: - */ - __pyx_tuple__379 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__379)) __PYX_ERR(20, 286, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__379); - __Pyx_GIVEREF(__pyx_tuple__379); + __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_u_xsl_stylesheet_xml_id_id); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(3, 890, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__81); + __Pyx_GIVEREF(__pyx_tuple__81); /* "src/lxml/dtd.pxi":362 * valid_ctxt = dtdvalid.xmlNewValidCtxt() @@ -244157,31 +226942,9 @@ static int __Pyx_InitCachedConstants(void) { * * # work around error reporting bug in libxml2 <= 2.9.1 (and later?) */ - __pyx_tuple__384 = PyTuple_Pack(1, __pyx_kp_u_Failed_to_create_validation_cont); if (unlikely(!__pyx_tuple__384)) __PYX_ERR(20, 362, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__384); - __Pyx_GIVEREF(__pyx_tuple__384); - - /* "src/lxml/dtd.pxi":370 - * - * try: - * with self._error_log: # <<<<<<<<<<<<<< - * c_doc = _fakeRootDoc(doc._c_doc, root_node._c_node) - * ret = dtdvalid.xmlValidateDtd(valid_ctxt, c_doc, self._c_dtd) - */ - __pyx_tuple__385 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__385)) __PYX_ERR(20, 370, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__385); - __Pyx_GIVEREF(__pyx_tuple__385); - - /* "src/lxml/dtd.pxi":392 - * error_log = _ErrorLog() - * - * with error_log: # <<<<<<<<<<<<<< - * c_dtd = dtd_parser._readDtd() - * - */ - __pyx_tuple__386 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__386)) __PYX_ERR(20, 392, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__386); - __Pyx_GIVEREF(__pyx_tuple__386); + __pyx_tuple__86 = PyTuple_Pack(1, __pyx_kp_u_Failed_to_create_validation_cont); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(20, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__86); + __Pyx_GIVEREF(__pyx_tuple__86); /* "src/lxml/relaxng.pxi":13 * cdef int _require_rnc2rng() except -1: @@ -244190,9 +226953,9 @@ static int __Pyx_InitCachedConstants(void) { * 'compact syntax not supported (please install rnc2rng)') * return 0 */ - __pyx_tuple__387 = PyTuple_Pack(1, __pyx_kp_s_compact_syntax_not_supported_ple); if (unlikely(!__pyx_tuple__387)) __PYX_ERR(21, 13, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__387); - __Pyx_GIVEREF(__pyx_tuple__387); + __pyx_tuple__87 = PyTuple_Pack(1, __pyx_kp_s_compact_syntax_not_supported_ple); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(21, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__87); + __Pyx_GIVEREF(__pyx_tuple__87); /* "src/lxml/relaxng.pxi":58 * elif file is not None: @@ -244201,170 +226964,126 @@ static int __Pyx_InitCachedConstants(void) { * _require_rnc2rng() * rng_data = _rnc2rng.dumps(_rnc2rng.load(file)) */ - __pyx_slice__388 = PySlice_New(__pyx_int_neg_4, Py_None, Py_None); if (unlikely(!__pyx_slice__388)) __PYX_ERR(21, 58, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__388); - __Pyx_GIVEREF(__pyx_slice__388); + __pyx_slice__88 = PySlice_New(__pyx_int_neg_4, Py_None, Py_None); if (unlikely(!__pyx_slice__88)) __PYX_ERR(21, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__88); + __Pyx_GIVEREF(__pyx_slice__88); - /* "src/lxml/relaxng.pxi":68 - * doc = None - * filename = _encodeFilename(file) - * with self._error_log: # <<<<<<<<<<<<<< - * parser_ctxt = relaxng.xmlRelaxNGNewParserCtxt(_cstr(filename)) - * elif (_getFilenameForFile(file) or '')[-4:].lower() == '.rnc': - */ - __pyx_tuple__389 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__389)) __PYX_ERR(21, 68, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__389); - __Pyx_GIVEREF(__pyx_tuple__389); - - /* "src/lxml/relaxng.pxi":70 - * with self._error_log: - * parser_ctxt = relaxng.xmlRelaxNGNewParserCtxt(_cstr(filename)) - * elif (_getFilenameForFile(file) or '')[-4:].lower() == '.rnc': # <<<<<<<<<<<<<< - * _require_rnc2rng() - * rng_data = _rnc2rng.dumps(_rnc2rng.load(file)) - */ - __pyx_slice__390 = PySlice_New(__pyx_int_neg_4, Py_None, Py_None); if (unlikely(!__pyx_slice__390)) __PYX_ERR(21, 70, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__390); - __Pyx_GIVEREF(__pyx_slice__390); - - /* "src/lxml/schematron.pxi":97 - * filename = file - * filename = _encodeFilename(filename) - * with self._error_log: # <<<<<<<<<<<<<< - * parser_ctxt = schematron.xmlSchematronNewParserCtxt(_cstr(filename)) - * else: - */ - __pyx_tuple__392 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__392)) __PYX_ERR(23, 97, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__392); - __Pyx_GIVEREF(__pyx_tuple__392); - - /* "src/lxml/schematron.pxi":109 - * - * try: - * with self._error_log: # <<<<<<<<<<<<<< - * self._c_schema = schematron.xmlSchematronParse(parser_ctxt) - * finally: - */ - __pyx_tuple__393 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__393)) __PYX_ERR(23, 109, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__393); - __Pyx_GIVEREF(__pyx_tuple__393); - - /* "lxml/etree.pyx":97 + /* "lxml/etree.pyx":95 * * class _ImmutableMapping(MutableMapping): * def __getitem__(self, key): # <<<<<<<<<<<<<< * raise KeyError, key * */ - __pyx_tuple__399 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_key); if (unlikely(!__pyx_tuple__399)) __PYX_ERR(0, 97, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__399); - __Pyx_GIVEREF(__pyx_tuple__399); - __pyx_codeobj_ = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__399, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getitem, 97, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj_)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_tuple__89 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_key); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 95, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__89); + __Pyx_GIVEREF(__pyx_tuple__89); + __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getitem, 95, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 95, __pyx_L1_error) - /* "lxml/etree.pyx":100 + /* "lxml/etree.pyx":98 * raise KeyError, key * * def __setitem__(self, key, value): # <<<<<<<<<<<<<< * raise KeyError, key * */ - __pyx_tuple__400 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_value); if (unlikely(!__pyx_tuple__400)) __PYX_ERR(0, 100, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__400); - __Pyx_GIVEREF(__pyx_tuple__400); - __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__400, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_setitem, 100, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 100, __pyx_L1_error) + __pyx_tuple__91 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_value); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__91); + __Pyx_GIVEREF(__pyx_tuple__91); + __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__91, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_setitem, 98, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 98, __pyx_L1_error) - /* "lxml/etree.pyx":103 + /* "lxml/etree.pyx":101 * raise KeyError, key * * def __delitem__(self, key): # <<<<<<<<<<<<<< * raise KeyError, key * */ - __pyx_tuple__401 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_key); if (unlikely(!__pyx_tuple__401)) __PYX_ERR(0, 103, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__401); - __Pyx_GIVEREF(__pyx_tuple__401); - __pyx_codeobj__3 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__401, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_delitem, 103, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__3)) __PYX_ERR(0, 103, __pyx_L1_error) + __pyx_tuple__93 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_key); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__93); + __Pyx_GIVEREF(__pyx_tuple__93); + __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_delitem, 101, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 101, __pyx_L1_error) - /* "lxml/etree.pyx":106 + /* "lxml/etree.pyx":104 * raise KeyError, key * * def __contains__(self, key): # <<<<<<<<<<<<<< * return False * */ - __pyx_tuple__402 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_key); if (unlikely(!__pyx_tuple__402)) __PYX_ERR(0, 106, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__402); - __Pyx_GIVEREF(__pyx_tuple__402); - __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__402, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_contains, 106, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_tuple__95 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_key); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__95); + __Pyx_GIVEREF(__pyx_tuple__95); + __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_etree_pyx, __pyx_n_s_contains, 104, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 104, __pyx_L1_error) - /* "lxml/etree.pyx":109 + /* "lxml/etree.pyx":107 * return False * * def __len__(self): # <<<<<<<<<<<<<< * return 0 * */ - __pyx_tuple__403 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__403)) __PYX_ERR(0, 109, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__403); - __Pyx_GIVEREF(__pyx_tuple__403); - __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__403, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_len, 109, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(0, 109, __pyx_L1_error) + __pyx_tuple__97 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 107, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__97); + __Pyx_GIVEREF(__pyx_tuple__97); + __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__97, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_len, 107, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 107, __pyx_L1_error) - /* "lxml/etree.pyx":112 + /* "lxml/etree.pyx":110 * return 0 * * def __iter__(self): # <<<<<<<<<<<<<< * return ITER_EMPTY * iterkeys = itervalues = iteritems = __iter__ */ - __pyx_tuple__404 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__404)) __PYX_ERR(0, 112, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__404); - __Pyx_GIVEREF(__pyx_tuple__404); - __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__404, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iter_2, 112, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_tuple__99 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__99); + __Pyx_GIVEREF(__pyx_tuple__99); + __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iter_2, 110, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 110, __pyx_L1_error) - /* "lxml/etree.pyx":155 + /* "lxml/etree.pyx":153 * * # filename encoding * cdef bytes _FILENAME_ENCODING = (sys.getfilesystemencoding() or sys.getdefaultencoding() or 'ascii').encode("UTF-8") # <<<<<<<<<<<<<< * cdef char* _C_FILENAME_ENCODING = _cstr(_FILENAME_ENCODING) * */ - __pyx_tuple__405 = PyTuple_Pack(1, __pyx_kp_s_UTF_8); if (unlikely(!__pyx_tuple__405)) __PYX_ERR(0, 155, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__405); - __Pyx_GIVEREF(__pyx_tuple__405); + __pyx_tuple__101 = PyTuple_Pack(1, __pyx_kp_s_UTF_8); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__101); + __Pyx_GIVEREF(__pyx_tuple__101); - /* "lxml/etree.pyx":174 + /* "lxml/etree.pyx":172 * } * * cdef object _check_internal_prefix = re.compile(b"ns\d+$").match # <<<<<<<<<<<<<< * * def register_namespace(prefix, uri): */ - __pyx_tuple__406 = PyTuple_Pack(1, __pyx_kp_b_ns_d_2); if (unlikely(!__pyx_tuple__406)) __PYX_ERR(0, 174, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__406); - __Pyx_GIVEREF(__pyx_tuple__406); + __pyx_tuple__102 = PyTuple_Pack(1, __pyx_kp_b_ns_d_2); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__102); + __Pyx_GIVEREF(__pyx_tuple__102); - /* "lxml/etree.pyx":176 + /* "lxml/etree.pyx":174 * cdef object _check_internal_prefix = re.compile(b"ns\d+$").match * * def register_namespace(prefix, uri): # <<<<<<<<<<<<<< * u"""Registers a namespace prefix that newly created Elements in that * namespace will use. The registry is global, and any existing */ - __pyx_tuple__407 = PyTuple_Pack(6, __pyx_n_s_prefix, __pyx_n_s_uri, __pyx_n_s_prefix_utf, __pyx_n_s_uri_utf, __pyx_n_s_k, __pyx_n_s_v); if (unlikely(!__pyx_tuple__407)) __PYX_ERR(0, 176, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__407); - __Pyx_GIVEREF(__pyx_tuple__407); - __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__407, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_register_namespace, 176, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(0, 176, __pyx_L1_error) + __pyx_tuple__103 = PyTuple_Pack(6, __pyx_n_s_prefix, __pyx_n_s_uri, __pyx_n_s_prefix_utf, __pyx_n_s_uri_utf, __pyx_n_s_k, __pyx_n_s_v); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 174, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__103); + __Pyx_GIVEREF(__pyx_tuple__103); + __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__103, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_register_namespace, 174, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(0, 174, __pyx_L1_error) - /* "lxml/etree.pyx":255 + /* "lxml/etree.pyx":253 * try: * _LIBXML_VERSION_INT = int( * re.match(u'[0-9]+', (tree.xmlParserVersion).decode("ascii")).group(0)) # <<<<<<<<<<<<<< * except Exception: * print u"Unknown libxml2 version: %s" % (tree.xmlParserVersion).decode("latin1") */ - __pyx_tuple__408 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__408)) __PYX_ERR(0, 255, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__408); - __Pyx_GIVEREF(__pyx_tuple__408); + __pyx_tuple__105 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 253, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__105); + __Pyx_GIVEREF(__pyx_tuple__105); /* "src/lxml/xmlerror.pxi":11 * # module level API functions @@ -244373,7 +227092,7 @@ static int __Pyx_InitCachedConstants(void) { * u"""clear_error_log() * */ - __pyx_codeobj__32 = (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__32)) __PYX_ERR(1, 11, __pyx_L1_error) + __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 * self.last_error = last_error @@ -244382,10 +227101,10 @@ static int __Pyx_InitCachedConstants(void) { * return _BaseErrorLog(self._first_error, self.last_error) * */ - __pyx_tuple__409 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__409)) __PYX_ERR(1, 187, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__409); - __Pyx_GIVEREF(__pyx_tuple__409); - __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__409, __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__34)) __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, 187, __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) /* "src/lxml/xmlerror.pxi":193 * return u'' @@ -244394,10 +227113,10 @@ static int __Pyx_InitCachedConstants(void) { * pass * */ - __pyx_tuple__410 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_entry); if (unlikely(!__pyx_tuple__410)) __PYX_ERR(1, 193, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__410); - __Pyx_GIVEREF(__pyx_tuple__410); - __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__410, __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__35)) __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, 193, __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) /* "src/lxml/xmlerror.pxi":283 * self._entries = entries @@ -244406,10 +227125,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""Creates a shallow copy of this error log. Reuses the list of * entries. */ - __pyx_tuple__411 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__411)) __PYX_ERR(1, 283, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__411); - __Pyx_GIVEREF(__pyx_tuple__411); - __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__411, __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__36)) __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, 283, __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) /* "src/lxml/xmlerror.pxi":321 * return len(self._entries) > self._offset @@ -244418,10 +227137,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""Filter the errors by the given domains and return a new error log * containing the matches. */ - __pyx_tuple__412 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_domains, __pyx_n_s_entry, __pyx_n_s_filtered); if (unlikely(!__pyx_tuple__412)) __PYX_ERR(1, 321, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__412); - __Pyx_GIVEREF(__pyx_tuple__412); - __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__412, __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__38)) __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, 321, __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) /* "src/lxml/xmlerror.pxi":331 * return _ListErrorLog(filtered, None, None) @@ -244430,10 +227149,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""filter_types(self, types) * */ - __pyx_tuple__413 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_types, __pyx_n_s_entry, __pyx_n_s_filtered); if (unlikely(!__pyx_tuple__413)) __PYX_ERR(1, 331, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__413); - __Pyx_GIVEREF(__pyx_tuple__413); - __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__413, __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__39)) __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, 331, __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) /* "src/lxml/xmlerror.pxi":343 * return _ListErrorLog(filtered, None, None) @@ -244442,10 +227161,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""filter_levels(self, levels) * */ - __pyx_tuple__414 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_levels, __pyx_n_s_entry, __pyx_n_s_filtered); if (unlikely(!__pyx_tuple__414)) __PYX_ERR(1, 343, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__414); - __Pyx_GIVEREF(__pyx_tuple__414); - __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__414, __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__40)) __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, 343, __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) /* "src/lxml/xmlerror.pxi":355 * return _ListErrorLog(filtered, None, None) @@ -244454,10 +227173,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""filter_from_level(self, level) * */ - __pyx_tuple__415 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_level, __pyx_n_s_entry, __pyx_n_s_filtered); if (unlikely(!__pyx_tuple__415)) __PYX_ERR(1, 355, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__415); - __Pyx_GIVEREF(__pyx_tuple__415); - __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__415, __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__41)) __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, 355, __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) /* "src/lxml/xmlerror.pxi":364 * return _ListErrorLog(filtered, None, None) @@ -244466,10 +227185,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""filter_from_fatals(self) * */ - __pyx_tuple__416 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__416)) __PYX_ERR(1, 364, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__416); - __Pyx_GIVEREF(__pyx_tuple__416); - __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__416, __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__42)) __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, 364, __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) /* "src/lxml/xmlerror.pxi":371 * return self.filter_from_level(ErrorLevels.FATAL) @@ -244478,10 +227197,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""filter_from_errors(self) * */ - __pyx_tuple__417 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__417)) __PYX_ERR(1, 371, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__417); - __Pyx_GIVEREF(__pyx_tuple__417); - __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__417, __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__43)) __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, 371, __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) /* "src/lxml/xmlerror.pxi":378 * return self.filter_from_level(ErrorLevels.ERROR) @@ -244490,10 +227209,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""filter_from_warnings(self) * */ - __pyx_tuple__418 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__418)) __PYX_ERR(1, 378, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__418); - __Pyx_GIVEREF(__pyx_tuple__418); - __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__418, __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__44)) __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, 378, __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) /* "src/lxml/xmlerror.pxi":437 * return self.connect() @@ -244502,10 +227221,10 @@ static int __Pyx_InitCachedConstants(void) { * # TODO: make this a cdef function when Cython supports it * self.disconnect() */ - __pyx_tuple__419 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_args); if (unlikely(!__pyx_tuple__419)) __PYX_ERR(1, 437, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__419); - __Pyx_GIVEREF(__pyx_tuple__419); - __pyx_codeobj__45 = (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__419, __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__45)) __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, 437, __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) /* "src/lxml/xmlerror.pxi":457 * return 0 @@ -244514,10 +227233,10 @@ static int __Pyx_InitCachedConstants(void) { * self._first_error = None * self.last_error = None */ - __pyx_tuple__420 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__420)) __PYX_ERR(1, 457, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__420); - __Pyx_GIVEREF(__pyx_tuple__420); - __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__420, __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__46)) __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, 457, __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) /* "src/lxml/xmlerror.pxi":463 * del self._entries[:] @@ -244526,10 +227245,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""Creates a shallow copy of this error log and the list of entries. * """ */ - __pyx_tuple__421 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__421)) __PYX_ERR(1, 463, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__421); - __Pyx_GIVEREF(__pyx_tuple__421); - __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__421, __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__47)) __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, 463, __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) /* "src/lxml/xmlerror.pxi":473 * return iter(self._entries[self._offset:]) @@ -244538,10 +227257,10 @@ static int __Pyx_InitCachedConstants(void) { * if self._first_error is None and entry.level >= xmlerror.XML_ERR_ERROR: * self._first_error = entry */ - __pyx_tuple__422 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_entry); if (unlikely(!__pyx_tuple__422)) __PYX_ERR(1, 473, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__422); - __Pyx_GIVEREF(__pyx_tuple__422); - __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__422, __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__48)) __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, 473, __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) /* "src/lxml/xmlerror.pxi":483 * self._accepted_domains = tuple(domains) @@ -244550,10 +227269,10 @@ static int __Pyx_InitCachedConstants(void) { * if entry.domain in self._accepted_domains: * _ErrorLog.receive(self, entry) */ - __pyx_tuple__423 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_entry); if (unlikely(!__pyx_tuple__423)) __PYX_ERR(1, 483, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__423); - __Pyx_GIVEREF(__pyx_tuple__423); - __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__423, __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__49)) __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, 483, __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) /* "src/lxml/xmlerror.pxi":493 * self._max_len = max_len @@ -244562,10 +227281,10 @@ static int __Pyx_InitCachedConstants(void) { * if self._first_error is None and entry.level >= xmlerror.XML_ERR_ERROR: * self._first_error = entry */ - __pyx_tuple__424 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_entry); if (unlikely(!__pyx_tuple__424)) __PYX_ERR(1, 493, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__424); - __Pyx_GIVEREF(__pyx_tuple__424); - __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__424, __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__50)) __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, 493, __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) /* "src/lxml/xmlerror.pxi":544 * self._log = logger.log @@ -244574,10 +227293,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""Dummy method that returns an empty error log. * """ */ - __pyx_tuple__425 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__425)) __PYX_ERR(1, 544, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__425); - __Pyx_GIVEREF(__pyx_tuple__425); - __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__425, __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__51)) __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, 544, __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) /* "src/lxml/xmlerror.pxi":549 * return _ListErrorLog([], None, None) @@ -244586,10 +227305,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""log(self, log_entry, message, *args) * */ - __pyx_tuple__426 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_log_entry, __pyx_n_s_message, __pyx_n_s_args); if (unlikely(!__pyx_tuple__426)) __PYX_ERR(1, 549, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__426); - __Pyx_GIVEREF(__pyx_tuple__426); - __pyx_codeobj__52 = (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__426, __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__52)) __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, 549, __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) /* "src/lxml/xmlerror.pxi":566 * ) @@ -244598,21 +227317,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""receive(self, log_entry) * */ - __pyx_tuple__427 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_log_entry); if (unlikely(!__pyx_tuple__427)) __PYX_ERR(1, 566, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__427); - __Pyx_GIVEREF(__pyx_tuple__427); - __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__427, __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__53)) __PYX_ERR(1, 566, __pyx_L1_error) - - /* "src/lxml/xmlerror.pxi":582 - * # libxml2/libxslt - * - * cdef _BaseErrorLog __GLOBAL_ERROR_LOG = _RotatingErrorLog(__MAX_LOG_SIZE) # <<<<<<<<<<<<<< - * - * - */ - __pyx_tuple__428 = PyTuple_Pack(1, __pyx_int_100); if (unlikely(!__pyx_tuple__428)) __PYX_ERR(1, 582, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__428); - __Pyx_GIVEREF(__pyx_tuple__428); + __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_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) /* "src/lxml/xmlerror.pxi":616 * @@ -244621,10 +227329,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""use_global_python_log(log) * */ - __pyx_tuple__429 = PyTuple_Pack(1, __pyx_n_s_log); if (unlikely(!__pyx_tuple__429)) __PYX_ERR(1, 616, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__429); - __Pyx_GIVEREF(__pyx_tuple__429); - __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__429, __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__55)) __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, 616, __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) /* "src/lxml/xmlerror.pxi":804 * @@ -244633,9 +227341,9 @@ static int __Pyx_InitCachedConstants(void) { * u"Libxml2 error levels" * */ - __pyx_tuple__430 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__430)) __PYX_ERR(1, 804, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__430); - __Pyx_GIVEREF(__pyx_tuple__430); + __pyx_tuple__147 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(1, 804, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__147); + __Pyx_GIVEREF(__pyx_tuple__147); /* "src/lxml/xmlerror.pxi":807 * u"Libxml2 error levels" @@ -244644,9 +227352,9 @@ static int __Pyx_InitCachedConstants(void) { * u"Libxml2 error domains" * */ - __pyx_tuple__431 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__431)) __PYX_ERR(1, 807, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__431); - __Pyx_GIVEREF(__pyx_tuple__431); + __pyx_tuple__148 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(1, 807, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__148); + __Pyx_GIVEREF(__pyx_tuple__148); /* "src/lxml/xmlerror.pxi":810 * u"Libxml2 error domains" @@ -244655,9 +227363,9 @@ static int __Pyx_InitCachedConstants(void) { * u"Libxml2 error types" * */ - __pyx_tuple__432 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__432)) __PYX_ERR(1, 810, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__432); - __Pyx_GIVEREF(__pyx_tuple__432); + __pyx_tuple__149 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(1, 810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__149); + __Pyx_GIVEREF(__pyx_tuple__149); /* "src/lxml/xmlerror.pxi":813 * u"Libxml2 error types" @@ -244666,1205 +227374,1205 @@ static int __Pyx_InitCachedConstants(void) { * u"Libxml2 RelaxNG error types" * */ - __pyx_tuple__433 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__433)) __PYX_ERR(1, 813, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__433); - __Pyx_GIVEREF(__pyx_tuple__433); + __pyx_tuple__150 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(1, 813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__150); + __Pyx_GIVEREF(__pyx_tuple__150); - /* "lxml/etree.pyx":506 + /* "lxml/etree.pyx":504 * * * cdef object _find_invalid_public_id_characters = re.compile( # <<<<<<<<<<<<<< * ur"[^\x20\x0D\x0Aa-zA-Z0-9'()+,./:=?;!*#@$_%-]+").search * */ - __pyx_tuple__434 = PyTuple_Pack(1, __pyx_kp_u_x20_x0D_x0Aa_zA_Z0_9); if (unlikely(!__pyx_tuple__434)) __PYX_ERR(0, 506, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__434); - __Pyx_GIVEREF(__pyx_tuple__434); + __pyx_tuple__151 = PyTuple_Pack(1, __pyx_kp_u_x20_x0D_x0Aa_zA_Z0_9); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__151); + __Pyx_GIVEREF(__pyx_tuple__151); - /* "lxml/etree.pyx":540 + /* "lxml/etree.pyx":538 * return tree.xmlCreateIntSubset(c_doc, c_name, NULL, NULL) * * def clear(self): # <<<<<<<<<<<<<< * u"""Removes DOCTYPE and internal subset from the document.""" * cdef xmlDoc* c_doc = self._doc._c_doc */ - __pyx_tuple__435 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_c_doc, __pyx_n_s_c_dtd); if (unlikely(!__pyx_tuple__435)) __PYX_ERR(0, 540, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__435); - __Pyx_GIVEREF(__pyx_tuple__435); - __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__435, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_clear, 540, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 540, __pyx_L1_error) + __pyx_tuple__152 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_c_doc, __pyx_n_s_c_dtd); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(0, 538, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__152); + __Pyx_GIVEREF(__pyx_tuple__152); + __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__152, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_clear, 538, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) __PYX_ERR(0, 538, __pyx_L1_error) - /* "lxml/etree.pyx":697 + /* "lxml/etree.pyx":695 * cdef object _tag * * def _init(self): # <<<<<<<<<<<<<< * u"""_init(self) * */ - __pyx_tuple__436 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__436)) __PYX_ERR(0, 697, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__436); - __Pyx_GIVEREF(__pyx_tuple__436); - __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__436, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_init_2, 697, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 697, __pyx_L1_error) + __pyx_tuple__154 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(0, 695, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__154); + __Pyx_GIVEREF(__pyx_tuple__154); + __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__154, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_init_2, 695, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) __PYX_ERR(0, 695, __pyx_L1_error) - /* "lxml/etree.pyx":784 + /* "lxml/etree.pyx":782 * _removeNode(self._doc, c_node) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< * u"__deepcopy__(self, memo)" * return self.__copy__() */ - __pyx_tuple__437 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_memo); if (unlikely(!__pyx_tuple__437)) __PYX_ERR(0, 784, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__437); - __Pyx_GIVEREF(__pyx_tuple__437); - __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__437, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_deepcopy, 784, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 784, __pyx_L1_error) + __pyx_tuple__156 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_memo); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(0, 782, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__156); + __Pyx_GIVEREF(__pyx_tuple__156); + __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__156, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_deepcopy, 782, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) __PYX_ERR(0, 782, __pyx_L1_error) - /* "lxml/etree.pyx":788 + /* "lxml/etree.pyx":786 * return self.__copy__() * * def __copy__(self): # <<<<<<<<<<<<<< * u"__copy__(self)" * cdef xmlDoc* c_doc */ - __pyx_tuple__438 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_c_doc, __pyx_n_s_c_node, __pyx_n_s_new_doc, __pyx_n_s_root); if (unlikely(!__pyx_tuple__438)) __PYX_ERR(0, 788, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__438); - __Pyx_GIVEREF(__pyx_tuple__438); - __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__438, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_copy_2, 788, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 788, __pyx_L1_error) + __pyx_tuple__158 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_c_doc, __pyx_n_s_c_node, __pyx_n_s_new_doc, __pyx_n_s_root); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(0, 786, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__158); + __Pyx_GIVEREF(__pyx_tuple__158); + __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__158, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_copy_2, 786, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) __PYX_ERR(0, 786, __pyx_L1_error) - /* "lxml/etree.pyx":807 + /* "lxml/etree.pyx":805 * return _elementFactory(new_doc, c_node) * * def set(self, key, value): # <<<<<<<<<<<<<< * u"""set(self, key, value) * */ - __pyx_tuple__439 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_value); if (unlikely(!__pyx_tuple__439)) __PYX_ERR(0, 807, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__439); - __Pyx_GIVEREF(__pyx_tuple__439); - __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__439, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_set, 807, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 807, __pyx_L1_error) + __pyx_tuple__160 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_value); if (unlikely(!__pyx_tuple__160)) __PYX_ERR(0, 805, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__160); + __Pyx_GIVEREF(__pyx_tuple__160); + __pyx_codeobj__161 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__160, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_set, 805, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) __PYX_ERR(0, 805, __pyx_L1_error) - /* "lxml/etree.pyx":815 + /* "lxml/etree.pyx":813 * _setAttributeValue(self, key, value) * * def append(self, _Element element not None): # <<<<<<<<<<<<<< * u"""append(self, element) * */ - __pyx_tuple__440 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_element); if (unlikely(!__pyx_tuple__440)) __PYX_ERR(0, 815, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__440); - __Pyx_GIVEREF(__pyx_tuple__440); - __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__440, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_append, 815, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 815, __pyx_L1_error) + __pyx_tuple__162 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_element); if (unlikely(!__pyx_tuple__162)) __PYX_ERR(0, 813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__162); + __Pyx_GIVEREF(__pyx_tuple__162); + __pyx_codeobj__163 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__162, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_append, 813, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__163)) __PYX_ERR(0, 813, __pyx_L1_error) - /* "lxml/etree.pyx":824 + /* "lxml/etree.pyx":822 * _appendChild(self, element) * * def addnext(self, _Element element not None): # <<<<<<<<<<<<<< * u"""addnext(self, element) * */ - __pyx_tuple__441 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_element); if (unlikely(!__pyx_tuple__441)) __PYX_ERR(0, 824, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__441); - __Pyx_GIVEREF(__pyx_tuple__441); - __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__441, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_addnext, 824, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 824, __pyx_L1_error) + __pyx_tuple__164 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_element); if (unlikely(!__pyx_tuple__164)) __PYX_ERR(0, 822, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__164); + __Pyx_GIVEREF(__pyx_tuple__164); + __pyx_codeobj__165 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__164, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_addnext, 822, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__165)) __PYX_ERR(0, 822, __pyx_L1_error) - /* "lxml/etree.pyx":843 + /* "lxml/etree.pyx":841 * _appendSibling(self, element) * * def addprevious(self, _Element element not None): # <<<<<<<<<<<<<< * u"""addprevious(self, element) * */ - __pyx_tuple__442 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_element); if (unlikely(!__pyx_tuple__442)) __PYX_ERR(0, 843, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__442); - __Pyx_GIVEREF(__pyx_tuple__442); - __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__442, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_addprevious, 843, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 843, __pyx_L1_error) + __pyx_tuple__166 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_element); if (unlikely(!__pyx_tuple__166)) __PYX_ERR(0, 841, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__166); + __Pyx_GIVEREF(__pyx_tuple__166); + __pyx_codeobj__167 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__166, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_addprevious, 841, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__167)) __PYX_ERR(0, 841, __pyx_L1_error) - /* "lxml/etree.pyx":862 + /* "lxml/etree.pyx":860 * _prependSibling(self, element) * * def extend(self, elements): # <<<<<<<<<<<<<< * u"""extend(self, elements) * */ - __pyx_tuple__443 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_elements, __pyx_n_s_element); if (unlikely(!__pyx_tuple__443)) __PYX_ERR(0, 862, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__443); - __Pyx_GIVEREF(__pyx_tuple__443); - __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__443, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_extend, 862, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 862, __pyx_L1_error) + __pyx_tuple__168 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_elements, __pyx_n_s_element); if (unlikely(!__pyx_tuple__168)) __PYX_ERR(0, 860, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__168); + __Pyx_GIVEREF(__pyx_tuple__168); + __pyx_codeobj__169 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__168, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_extend, 860, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__169)) __PYX_ERR(0, 860, __pyx_L1_error) - /* "lxml/etree.pyx":875 + /* "lxml/etree.pyx":873 * _appendChild(self, element) * * def clear(self): # <<<<<<<<<<<<<< * u"""clear(self) * */ - __pyx_tuple__444 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_c_attr, __pyx_n_s_c_attr_next, __pyx_n_s_c_node, __pyx_n_s_c_node_next); if (unlikely(!__pyx_tuple__444)) __PYX_ERR(0, 875, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__444); - __Pyx_GIVEREF(__pyx_tuple__444); - __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__444, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_clear, 875, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 875, __pyx_L1_error) + __pyx_tuple__170 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_c_attr, __pyx_n_s_c_attr_next, __pyx_n_s_c_node, __pyx_n_s_c_node_next); if (unlikely(!__pyx_tuple__170)) __PYX_ERR(0, 873, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__170); + __Pyx_GIVEREF(__pyx_tuple__170); + __pyx_codeobj__171 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__170, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_clear, 873, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__171)) __PYX_ERR(0, 873, __pyx_L1_error) - /* "lxml/etree.pyx":906 + /* "lxml/etree.pyx":904 * c_node = c_node_next * * def insert(self, index, _Element element not None): # <<<<<<<<<<<<<< * u"""insert(self, index, element) * */ - __pyx_tuple__445 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_index, __pyx_n_s_element, __pyx_n_s_c_node, __pyx_n_s_c_next, __pyx_n_s_c_source_doc); if (unlikely(!__pyx_tuple__445)) __PYX_ERR(0, 906, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__445); - __Pyx_GIVEREF(__pyx_tuple__445); - __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__445, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_insert, 906, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(0, 906, __pyx_L1_error) + __pyx_tuple__172 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_index, __pyx_n_s_element, __pyx_n_s_c_node, __pyx_n_s_c_next, __pyx_n_s_c_source_doc); if (unlikely(!__pyx_tuple__172)) __PYX_ERR(0, 904, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__172); + __Pyx_GIVEREF(__pyx_tuple__172); + __pyx_codeobj__173 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__172, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_insert, 904, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__173)) __PYX_ERR(0, 904, __pyx_L1_error) - /* "lxml/etree.pyx":926 + /* "lxml/etree.pyx":924 * moveNodeToDocument(self._doc, c_source_doc, element._c_node) * * def remove(self, _Element element not None): # <<<<<<<<<<<<<< * u"""remove(self, element) * */ - __pyx_tuple__446 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_element, __pyx_n_s_c_node, __pyx_n_s_c_next); if (unlikely(!__pyx_tuple__446)) __PYX_ERR(0, 926, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__446); - __Pyx_GIVEREF(__pyx_tuple__446); - __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__446, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_remove, 926, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 926, __pyx_L1_error) + __pyx_tuple__174 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_element, __pyx_n_s_c_node, __pyx_n_s_c_next); if (unlikely(!__pyx_tuple__174)) __PYX_ERR(0, 924, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__174); + __Pyx_GIVEREF(__pyx_tuple__174); + __pyx_codeobj__175 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__174, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_remove, 924, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__175)) __PYX_ERR(0, 924, __pyx_L1_error) - /* "lxml/etree.pyx":946 + /* "lxml/etree.pyx":944 * moveNodeToDocument(self._doc, c_node.doc, c_node) * * def replace(self, _Element old_element not None, # <<<<<<<<<<<<<< * _Element new_element not None): * u"""replace(self, old_element, new_element) */ - __pyx_tuple__447 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_old_element, __pyx_n_s_new_element, __pyx_n_s_c_old_node, __pyx_n_s_c_old_next, __pyx_n_s_c_new_node, __pyx_n_s_c_new_next, __pyx_n_s_c_source_doc); if (unlikely(!__pyx_tuple__447)) __PYX_ERR(0, 946, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__447); - __Pyx_GIVEREF(__pyx_tuple__447); - __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__447, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_replace, 946, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 946, __pyx_L1_error) + __pyx_tuple__176 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_old_element, __pyx_n_s_new_element, __pyx_n_s_c_old_node, __pyx_n_s_c_old_next, __pyx_n_s_c_new_node, __pyx_n_s_c_new_next, __pyx_n_s_c_source_doc); if (unlikely(!__pyx_tuple__176)) __PYX_ERR(0, 944, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__176); + __Pyx_GIVEREF(__pyx_tuple__176); + __pyx_codeobj__177 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__176, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_replace, 944, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__177)) __PYX_ERR(0, 944, __pyx_L1_error) - /* "lxml/etree.pyx":1203 + /* "lxml/etree.pyx":1201 * return ElementChildIterator(self) * * def __reversed__(self): # <<<<<<<<<<<<<< * u"__reversed__(self)" * return ElementChildIterator(self, reversed=True) */ - __pyx_tuple__448 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__448)) __PYX_ERR(0, 1203, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__448); - __Pyx_GIVEREF(__pyx_tuple__448); - __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__448, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_reversed_2, 1203, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(0, 1203, __pyx_L1_error) + __pyx_tuple__178 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__178)) __PYX_ERR(0, 1201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__178); + __Pyx_GIVEREF(__pyx_tuple__178); + __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_reversed_2, 1201, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) __PYX_ERR(0, 1201, __pyx_L1_error) - /* "lxml/etree.pyx":1207 + /* "lxml/etree.pyx":1205 * return ElementChildIterator(self, reversed=True) * * def index(self, _Element child not None, start=None, stop=None): # <<<<<<<<<<<<<< * u"""index(self, child, start=None, stop=None) * */ - __pyx_tuple__449 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_child, __pyx_n_s_start, __pyx_n_s_stop, __pyx_n_s_k, __pyx_n_s_l, __pyx_n_s_c_start, __pyx_n_s_c_stop, __pyx_n_s_c_child, __pyx_n_s_c_start_node); if (unlikely(!__pyx_tuple__449)) __PYX_ERR(0, 1207, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__449); - __Pyx_GIVEREF(__pyx_tuple__449); - __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__449, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_index, 1207, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 1207, __pyx_L1_error) + __pyx_tuple__180 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_child, __pyx_n_s_start, __pyx_n_s_stop, __pyx_n_s_k, __pyx_n_s_l, __pyx_n_s_c_start, __pyx_n_s_c_stop, __pyx_n_s_c_child, __pyx_n_s_c_start_node); if (unlikely(!__pyx_tuple__180)) __PYX_ERR(0, 1205, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__180); + __Pyx_GIVEREF(__pyx_tuple__180); + __pyx_codeobj__181 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__180, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_index, 1205, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__181)) __PYX_ERR(0, 1205, __pyx_L1_error) - /* "lxml/etree.pyx":1294 + /* "lxml/etree.pyx":1292 * raise ValueError, u"list.index(x): x not in list" * * def get(self, key, default=None): # <<<<<<<<<<<<<< * u"""get(self, key, default=None) * */ - __pyx_tuple__450 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_default); if (unlikely(!__pyx_tuple__450)) __PYX_ERR(0, 1294, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__450); - __Pyx_GIVEREF(__pyx_tuple__450); - __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__450, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_get, 1294, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(0, 1294, __pyx_L1_error) + __pyx_tuple__182 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_default); if (unlikely(!__pyx_tuple__182)) __PYX_ERR(0, 1292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__182); + __Pyx_GIVEREF(__pyx_tuple__182); + __pyx_codeobj__183 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__182, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_get, 1292, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__183)) __PYX_ERR(0, 1292, __pyx_L1_error) - /* "lxml/etree.pyx":1302 + /* "lxml/etree.pyx":1300 * return _getAttributeValue(self, key, default) * * def keys(self): # <<<<<<<<<<<<<< * u"""keys(self) * */ - __pyx_tuple__451 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__451)) __PYX_ERR(0, 1302, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__451); - __Pyx_GIVEREF(__pyx_tuple__451); - __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__451, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_keys, 1302, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 1302, __pyx_L1_error) + __pyx_tuple__184 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__184)) __PYX_ERR(0, 1300, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__184); + __Pyx_GIVEREF(__pyx_tuple__184); + __pyx_codeobj__185 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_keys, 1300, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) __PYX_ERR(0, 1300, __pyx_L1_error) - /* "lxml/etree.pyx":1311 + /* "lxml/etree.pyx":1309 * return _collectAttributes(self._c_node, 1) * * def values(self): # <<<<<<<<<<<<<< * u"""values(self) * */ - __pyx_tuple__452 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__452)) __PYX_ERR(0, 1311, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__452); - __Pyx_GIVEREF(__pyx_tuple__452); - __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__452, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_values, 1311, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 1311, __pyx_L1_error) + __pyx_tuple__186 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__186)) __PYX_ERR(0, 1309, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__186); + __Pyx_GIVEREF(__pyx_tuple__186); + __pyx_codeobj__187 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__186, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_values, 1309, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__187)) __PYX_ERR(0, 1309, __pyx_L1_error) - /* "lxml/etree.pyx":1320 + /* "lxml/etree.pyx":1318 * return _collectAttributes(self._c_node, 2) * * def items(self): # <<<<<<<<<<<<<< * u"""items(self) * */ - __pyx_tuple__453 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__453)) __PYX_ERR(0, 1320, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__453); - __Pyx_GIVEREF(__pyx_tuple__453); - __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__453, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_items, 1320, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 1320, __pyx_L1_error) + __pyx_tuple__188 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__188)) __PYX_ERR(0, 1318, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__188); + __Pyx_GIVEREF(__pyx_tuple__188); + __pyx_codeobj__189 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__188, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_items, 1318, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__189)) __PYX_ERR(0, 1318, __pyx_L1_error) - /* "lxml/etree.pyx":1329 + /* "lxml/etree.pyx":1327 * return _collectAttributes(self._c_node, 3) * * def getchildren(self): # <<<<<<<<<<<<<< * u"""getchildren(self) * */ - __pyx_tuple__454 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__454)) __PYX_ERR(0, 1329, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__454); - __Pyx_GIVEREF(__pyx_tuple__454); - __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__454, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getchildren, 1329, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(0, 1329, __pyx_L1_error) + __pyx_tuple__190 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__190)) __PYX_ERR(0, 1327, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__190); + __Pyx_GIVEREF(__pyx_tuple__190); + __pyx_codeobj__191 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__190, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getchildren, 1327, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__191)) __PYX_ERR(0, 1327, __pyx_L1_error) - /* "lxml/etree.pyx":1342 + /* "lxml/etree.pyx":1340 * return _collectChildren(self) * * def getparent(self): # <<<<<<<<<<<<<< * u"""getparent(self) * */ - __pyx_tuple__455 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_c_node); if (unlikely(!__pyx_tuple__455)) __PYX_ERR(0, 1342, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__455); - __Pyx_GIVEREF(__pyx_tuple__455); - __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__455, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getparent, 1342, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 1342, __pyx_L1_error) + __pyx_tuple__192 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_c_node); if (unlikely(!__pyx_tuple__192)) __PYX_ERR(0, 1340, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__192); + __Pyx_GIVEREF(__pyx_tuple__192); + __pyx_codeobj__193 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__192, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getparent, 1340, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__193)) __PYX_ERR(0, 1340, __pyx_L1_error) - /* "lxml/etree.pyx":1354 + /* "lxml/etree.pyx":1352 * return _elementFactory(self._doc, c_node) * * def getnext(self): # <<<<<<<<<<<<<< * u"""getnext(self) * */ - __pyx_tuple__456 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_c_node); if (unlikely(!__pyx_tuple__456)) __PYX_ERR(0, 1354, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__456); - __Pyx_GIVEREF(__pyx_tuple__456); - __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__456, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getnext, 1354, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_tuple__194 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_c_node); if (unlikely(!__pyx_tuple__194)) __PYX_ERR(0, 1352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__194); + __Pyx_GIVEREF(__pyx_tuple__194); + __pyx_codeobj__195 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__194, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getnext, 1352, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__195)) __PYX_ERR(0, 1352, __pyx_L1_error) - /* "lxml/etree.pyx":1366 + /* "lxml/etree.pyx":1364 * return _elementFactory(self._doc, c_node) * * def getprevious(self): # <<<<<<<<<<<<<< * u"""getprevious(self) * */ - __pyx_tuple__457 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_c_node); if (unlikely(!__pyx_tuple__457)) __PYX_ERR(0, 1366, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__457); - __Pyx_GIVEREF(__pyx_tuple__457); - __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__457, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getprevious, 1366, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(0, 1366, __pyx_L1_error) + __pyx_tuple__196 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_c_node); if (unlikely(!__pyx_tuple__196)) __PYX_ERR(0, 1364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__196); + __Pyx_GIVEREF(__pyx_tuple__196); + __pyx_codeobj__197 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__196, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getprevious, 1364, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__197)) __PYX_ERR(0, 1364, __pyx_L1_error) - /* "lxml/etree.pyx":1378 + /* "lxml/etree.pyx":1376 * return _elementFactory(self._doc, c_node) * * def itersiblings(self, tag=None, *tags, preceding=False): # <<<<<<<<<<<<<< * u"""itersiblings(self, tag=None, *tags, preceding=False) * */ - __pyx_tuple__458 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_preceding, __pyx_n_s_tags); if (unlikely(!__pyx_tuple__458)) __PYX_ERR(0, 1378, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__458); - __Pyx_GIVEREF(__pyx_tuple__458); - __pyx_codeobj__89 = (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__458, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_itersiblings, 1378, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 1378, __pyx_L1_error) + __pyx_tuple__198 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_preceding, __pyx_n_s_tags); if (unlikely(!__pyx_tuple__198)) __PYX_ERR(0, 1376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__198); + __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":1396 + /* "lxml/etree.pyx":1394 * return SiblingsIterator(self, tags, preceding=preceding) * * def iterancestors(self, tag=None, *tags): # <<<<<<<<<<<<<< * u"""iterancestors(self, tag=None, *tags) * */ - __pyx_tuple__459 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_tags); if (unlikely(!__pyx_tuple__459)) __PYX_ERR(0, 1396, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__459); - __Pyx_GIVEREF(__pyx_tuple__459); - __pyx_codeobj__90 = (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__459, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iterancestors, 1396, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 1396, __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, 1394, __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) - /* "lxml/etree.pyx":1408 + /* "lxml/etree.pyx":1406 * return AncestorsIterator(self, tags) * * def iterdescendants(self, tag=None, *tags): # <<<<<<<<<<<<<< * u"""iterdescendants(self, tag=None, *tags) * */ - __pyx_tuple__460 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_tags); if (unlikely(!__pyx_tuple__460)) __PYX_ERR(0, 1408, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__460); - __Pyx_GIVEREF(__pyx_tuple__460); - __pyx_codeobj__91 = (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__460, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iterdescendants, 1408, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 1408, __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, 1406, __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) - /* "lxml/etree.pyx":1421 + /* "lxml/etree.pyx":1419 * return ElementDepthFirstIterator(self, tags, inclusive=False) * * def iterchildren(self, tag=None, *tags, reversed=False): # <<<<<<<<<<<<<< * u"""iterchildren(self, tag=None, *tags, reversed=False) * */ - __pyx_tuple__461 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_reversed, __pyx_n_s_tags); if (unlikely(!__pyx_tuple__461)) __PYX_ERR(0, 1421, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__461); - __Pyx_GIVEREF(__pyx_tuple__461); - __pyx_codeobj__92 = (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__461, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iterchildren, 1421, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 1421, __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, 1419, __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) - /* "lxml/etree.pyx":1434 + /* "lxml/etree.pyx":1432 * return ElementChildIterator(self, tags, reversed=reversed) * * def getroottree(self): # <<<<<<<<<<<<<< * u"""getroottree(self) * */ - __pyx_tuple__462 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__462)) __PYX_ERR(0, 1434, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__462); - __Pyx_GIVEREF(__pyx_tuple__462); - __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__462, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getroottree, 1434, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 1434, __pyx_L1_error) + __pyx_tuple__206 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__206)) __PYX_ERR(0, 1432, __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) - /* "lxml/etree.pyx":1446 + /* "lxml/etree.pyx":1444 * return _elementTreeFactory(self._doc, None) * * def getiterator(self, tag=None, *tags): # <<<<<<<<<<<<<< * u"""getiterator(self, tag=None, *tags) * */ - __pyx_tuple__463 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_tags); if (unlikely(!__pyx_tuple__463)) __PYX_ERR(0, 1446, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__463); - __Pyx_GIVEREF(__pyx_tuple__463); - __pyx_codeobj__94 = (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__463, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getiterator, 1446, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 1446, __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, 1444, __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) - /* "lxml/etree.pyx":1468 + /* "lxml/etree.pyx":1466 * return ElementDepthFirstIterator(self, tags) * * def iter(self, tag=None, *tags): # <<<<<<<<<<<<<< * u"""iter(self, tag=None, *tags) * */ - __pyx_tuple__464 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_tags); if (unlikely(!__pyx_tuple__464)) __PYX_ERR(0, 1468, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__464); - __Pyx_GIVEREF(__pyx_tuple__464); - __pyx_codeobj__95 = (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__464, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iter, 1468, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(0, 1468, __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, 1466, __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) - /* "lxml/etree.pyx":1492 + /* "lxml/etree.pyx":1490 * return ElementDepthFirstIterator(self, tags) * * def itertext(self, tag=None, *tags, with_tail=True): # <<<<<<<<<<<<<< * u"""itertext(self, tag=None, *tags, with_tail=True) * */ - __pyx_tuple__465 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_with_tail, __pyx_n_s_tags); if (unlikely(!__pyx_tuple__465)) __PYX_ERR(0, 1492, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__465); - __Pyx_GIVEREF(__pyx_tuple__465); - __pyx_codeobj__96 = (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__465, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_itertext, 1492, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 1492, __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, 1490, __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) - /* "lxml/etree.pyx":1507 + /* "lxml/etree.pyx":1505 * 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__466 = 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__466)) __PYX_ERR(0, 1507, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__466); - __Pyx_GIVEREF(__pyx_tuple__466); - __pyx_codeobj__97 = (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__466, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_makeelement, 1507, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 1507, __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, 1505, __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) - /* "lxml/etree.pyx":1516 + /* "lxml/etree.pyx":1514 * attrib, nsmap, _extra) * * def find(self, path, namespaces=None): # <<<<<<<<<<<<<< * u"""find(self, path, namespaces=None) * */ - __pyx_tuple__467 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_path, __pyx_n_s_namespaces); if (unlikely(!__pyx_tuple__467)) __PYX_ERR(0, 1516, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__467); - __Pyx_GIVEREF(__pyx_tuple__467); - __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__467, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_find, 1516, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 1516, __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, 1514, __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) - /* "lxml/etree.pyx":1529 + /* "lxml/etree.pyx":1527 * return _elementpath.find(self, path, namespaces) * * def findtext(self, path, default=None, namespaces=None): # <<<<<<<<<<<<<< * u"""findtext(self, path, default=None, namespaces=None) * */ - __pyx_tuple__468 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_path, __pyx_n_s_default, __pyx_n_s_namespaces); if (unlikely(!__pyx_tuple__468)) __PYX_ERR(0, 1529, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__468); - __Pyx_GIVEREF(__pyx_tuple__468); - __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__468, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_findtext, 1529, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 1529, __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, 1527, __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) - /* "lxml/etree.pyx":1542 + /* "lxml/etree.pyx":1540 * return _elementpath.findtext(self, path, default, namespaces) * * def findall(self, path, namespaces=None): # <<<<<<<<<<<<<< * u"""findall(self, path, namespaces=None) * */ - __pyx_tuple__469 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_path, __pyx_n_s_namespaces); if (unlikely(!__pyx_tuple__469)) __PYX_ERR(0, 1542, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__469); - __Pyx_GIVEREF(__pyx_tuple__469); - __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__469, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_findall, 1542, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 1542, __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, 1540, __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) - /* "lxml/etree.pyx":1555 + /* "lxml/etree.pyx":1553 * return _elementpath.findall(self, path, namespaces) * * def iterfind(self, path, namespaces=None): # <<<<<<<<<<<<<< * u"""iterfind(self, path, namespaces=None) * */ - __pyx_tuple__470 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_path, __pyx_n_s_namespaces); if (unlikely(!__pyx_tuple__470)) __PYX_ERR(0, 1555, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__470); - __Pyx_GIVEREF(__pyx_tuple__470); - __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__470, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iterfind, 1555, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 1555, __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, 1553, __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) - /* "lxml/etree.pyx":1568 + /* "lxml/etree.pyx":1566 * 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__471 = 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__471)) __PYX_ERR(0, 1568, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__471); - __Pyx_GIVEREF(__pyx_tuple__471); - __pyx_codeobj__102 = (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__471, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_xpath, 1568, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 1568, __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, 1566, __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) - /* "lxml/etree.pyx":1579 + /* "lxml/etree.pyx":1577 * return evaluator(_path, **_variables) * * def cssselect(self, expr, *, translator='xml'): # <<<<<<<<<<<<<< * """ * Run the CSS expression on this element and its children, */ - __pyx_tuple__472 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_expr, __pyx_n_s_translator, __pyx_n_s_CSSSelector); if (unlikely(!__pyx_tuple__472)) __PYX_ERR(0, 1579, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__472); - __Pyx_GIVEREF(__pyx_tuple__472); - __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(2, 1, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__472, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_cssselect, 1579, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(0, 1579, __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, 1577, __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) - /* "lxml/etree.pyx":1629 + /* "lxml/etree.pyx":1627 * 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__473 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_value); if (unlikely(!__pyx_tuple__473)) __PYX_ERR(0, 1629, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__473); - __Pyx_GIVEREF(__pyx_tuple__473); - __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__473, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_set, 1629, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(0, 1629, __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, 1627, __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) - /* "lxml/etree.pyx":1633 + /* "lxml/etree.pyx":1631 * self._raiseImmutable() * * def append(self, value): # <<<<<<<<<<<<<< * u"append(self, value)" * self._raiseImmutable() */ - __pyx_tuple__474 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__474)) __PYX_ERR(0, 1633, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__474); - __Pyx_GIVEREF(__pyx_tuple__474); - __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__474, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_append, 1633, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 1633, __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, 1631, __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) - /* "lxml/etree.pyx":1637 + /* "lxml/etree.pyx":1635 * self._raiseImmutable() * * def insert(self, index, value): # <<<<<<<<<<<<<< * u"insert(self, index, value)" * self._raiseImmutable() */ - __pyx_tuple__475 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_index, __pyx_n_s_value); if (unlikely(!__pyx_tuple__475)) __PYX_ERR(0, 1637, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__475); - __Pyx_GIVEREF(__pyx_tuple__475); - __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__475, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_insert, 1637, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) __PYX_ERR(0, 1637, __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, 1635, __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) - /* "lxml/etree.pyx":1676 + /* "lxml/etree.pyx":1674 * return 0 * * def get(self, key, default=None): # <<<<<<<<<<<<<< * u"get(self, key, default=None)" * return None */ - __pyx_tuple__476 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_default); if (unlikely(!__pyx_tuple__476)) __PYX_ERR(0, 1676, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__476); - __Pyx_GIVEREF(__pyx_tuple__476); - __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__476, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_get, 1676, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 1676, __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, 1674, __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) - /* "lxml/etree.pyx":1680 + /* "lxml/etree.pyx":1678 * return None * * def keys(self): # <<<<<<<<<<<<<< * u"keys(self)" * return [] */ - __pyx_tuple__477 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__477)) __PYX_ERR(0, 1680, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__477); - __Pyx_GIVEREF(__pyx_tuple__477); - __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__477, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_keys, 1680, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(0, 1680, __pyx_L1_error) + __pyx_tuple__236 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__236)) __PYX_ERR(0, 1678, __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) - /* "lxml/etree.pyx":1684 + /* "lxml/etree.pyx":1682 * return [] * * def items(self): # <<<<<<<<<<<<<< * u"items(self)" * return [] */ - __pyx_tuple__478 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__478)) __PYX_ERR(0, 1684, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__478); - __Pyx_GIVEREF(__pyx_tuple__478); - __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__478, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_items, 1684, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 1684, __pyx_L1_error) + __pyx_tuple__238 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__238)) __PYX_ERR(0, 1682, __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) - /* "lxml/etree.pyx":1688 + /* "lxml/etree.pyx":1686 * return [] * * def values(self): # <<<<<<<<<<<<<< * u"values(self)" * return [] */ - __pyx_tuple__479 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__479)) __PYX_ERR(0, 1688, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__479); - __Pyx_GIVEREF(__pyx_tuple__479); - __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__479, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_values, 1688, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(0, 1688, __pyx_L1_error) + __pyx_tuple__240 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__240)) __PYX_ERR(0, 1686, __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) - /* "lxml/etree.pyx":1725 + /* "lxml/etree.pyx":1723 * return "" % strrepr(self.target) * * def get(self, key, default=None): # <<<<<<<<<<<<<< * u"""get(self, key, default=None) * */ - __pyx_tuple__480 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_default); if (unlikely(!__pyx_tuple__480)) __PYX_ERR(0, 1725, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__480); - __Pyx_GIVEREF(__pyx_tuple__480); - __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__480, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_get, 1725, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(0, 1725, __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, 1723, __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) - /* "lxml/etree.pyx":1869 + /* "lxml/etree.pyx":1867 * return 0 * * def parse(self, source, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""parse(self, source, parser=None, base_url=None) * */ - __pyx_tuple__481 = 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__481)) __PYX_ERR(0, 1869, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__481); - __Pyx_GIVEREF(__pyx_tuple__481); - __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(3, 1, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__481, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_parse, 1869, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) __PYX_ERR(0, 1869, __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, 1867, __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) - /* "lxml/etree.pyx":1885 + /* "lxml/etree.pyx":1883 * return self._context_node * * def _setroot(self, _Element root not None): # <<<<<<<<<<<<<< * u"""_setroot(self, root) * */ - __pyx_tuple__482 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_root); if (unlikely(!__pyx_tuple__482)) __PYX_ERR(0, 1885, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__482); - __Pyx_GIVEREF(__pyx_tuple__482); - __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__482, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_setroot, 1885, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(0, 1885, __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, 1883, __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) - /* "lxml/etree.pyx":1896 + /* "lxml/etree.pyx":1894 * self._doc = None * * def getroot(self): # <<<<<<<<<<<<<< * u"""getroot(self) * */ - __pyx_tuple__483 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__483)) __PYX_ERR(0, 1896, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__483); - __Pyx_GIVEREF(__pyx_tuple__483); - __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__483, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getroot, 1896, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(0, 1896, __pyx_L1_error) + __pyx_tuple__248 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__248)) __PYX_ERR(0, 1894, __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) - /* "lxml/etree.pyx":1903 + /* "lxml/etree.pyx":1901 * return self._context_node * * def __copy__(self): # <<<<<<<<<<<<<< * return _elementTreeFactory(self._doc, self._context_node) * */ - __pyx_tuple__484 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__484)) __PYX_ERR(0, 1903, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__484); - __Pyx_GIVEREF(__pyx_tuple__484); - __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__484, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_copy_2, 1903, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 1903, __pyx_L1_error) + __pyx_tuple__250 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__250)) __PYX_ERR(0, 1901, __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) - /* "lxml/etree.pyx":1906 + /* "lxml/etree.pyx":1904 * return _elementTreeFactory(self._doc, self._context_node) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< * cdef _Element root * cdef _Document doc */ - __pyx_tuple__485 = 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__485)) __PYX_ERR(0, 1906, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__485); - __Pyx_GIVEREF(__pyx_tuple__485); - __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__485, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_deepcopy, 1906, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(0, 1906, __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, 1904, __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) - /* "lxml/etree.pyx":1946 + /* "lxml/etree.pyx":1944 * 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__486 = 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__486)) __PYX_ERR(0, 1946, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__486); - __Pyx_GIVEREF(__pyx_tuple__486); - __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(2, 12, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__486, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_write, 1946, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 1946, __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, 1944, __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) - /* "lxml/etree.pyx":2043 + /* "lxml/etree.pyx":2041 * is_standalone, compression) * * def getpath(self, _Element element not None): # <<<<<<<<<<<<<< * u"""getpath(self, element) * */ - __pyx_tuple__487 = 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__487)) __PYX_ERR(0, 2043, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__487); - __Pyx_GIVEREF(__pyx_tuple__487); - __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__487, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getpath, 2043, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) __PYX_ERR(0, 2043, __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, 2041, __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) - /* "lxml/etree.pyx":2081 + /* "lxml/etree.pyx":2079 * return path * * def getelementpath(self, _Element element not None): # <<<<<<<<<<<<<< * u"""getelementpath(self, element) * */ - __pyx_tuple__488 = 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__488)) __PYX_ERR(0, 2081, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__488); - __Pyx_GIVEREF(__pyx_tuple__488); - __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__488, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getelementpath, 2081, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) __PYX_ERR(0, 2081, __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, 2079, __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) - /* "lxml/etree.pyx":2145 + /* "lxml/etree.pyx":2143 * return '/'.join(path) * * def getiterator(self, tag=None, *tags): # <<<<<<<<<<<<<< * u"""getiterator(self, *tags, tag=None) * */ - __pyx_tuple__489 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_tags, __pyx_n_s_root); if (unlikely(!__pyx_tuple__489)) __PYX_ERR(0, 2145, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__489); - __Pyx_GIVEREF(__pyx_tuple__489); - __pyx_codeobj__131 = (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__489, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getiterator, 2145, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(0, 2145, __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, 2143, __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) - /* "lxml/etree.pyx":2169 + /* "lxml/etree.pyx":2167 * return root.getiterator(*tags) * * def iter(self, tag=None, *tags): # <<<<<<<<<<<<<< * u"""iter(self, tag=None, *tags) * */ - __pyx_tuple__490 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_tags, __pyx_n_s_root); if (unlikely(!__pyx_tuple__490)) __PYX_ERR(0, 2169, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__490); - __Pyx_GIVEREF(__pyx_tuple__490); - __pyx_codeobj__132 = (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__490, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iter, 2169, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(0, 2169, __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, 2167, __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) - /* "lxml/etree.pyx":2187 + /* "lxml/etree.pyx":2185 * return root.iter(*tags) * * def find(self, path, namespaces=None): # <<<<<<<<<<<<<< * u"""find(self, path, namespaces=None) * */ - __pyx_tuple__491 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_path, __pyx_n_s_namespaces, __pyx_n_s_root); if (unlikely(!__pyx_tuple__491)) __PYX_ERR(0, 2187, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__491); - __Pyx_GIVEREF(__pyx_tuple__491); - __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__491, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_find, 2187, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(0, 2187, __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, 2185, __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) - /* "lxml/etree.pyx":2204 + /* "lxml/etree.pyx":2202 * return root.find(path, namespaces) * * def findtext(self, path, default=None, namespaces=None): # <<<<<<<<<<<<<< * u"""findtext(self, path, default=None, namespaces=None) * */ - __pyx_tuple__492 = 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__492)) __PYX_ERR(0, 2204, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__492); - __Pyx_GIVEREF(__pyx_tuple__492); - __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__492, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_findtext, 2204, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(0, 2204, __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, 2202, __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) - /* "lxml/etree.pyx":2221 + /* "lxml/etree.pyx":2219 * return root.findtext(path, default, namespaces) * * def findall(self, path, namespaces=None): # <<<<<<<<<<<<<< * u"""findall(self, path, namespaces=None) * */ - __pyx_tuple__493 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_path, __pyx_n_s_namespaces, __pyx_n_s_root); if (unlikely(!__pyx_tuple__493)) __PYX_ERR(0, 2221, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__493); - __Pyx_GIVEREF(__pyx_tuple__493); - __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__493, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_findall, 2221, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) __PYX_ERR(0, 2221, __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, 2219, __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) - /* "lxml/etree.pyx":2238 + /* "lxml/etree.pyx":2236 * return root.findall(path, namespaces) * * def iterfind(self, path, namespaces=None): # <<<<<<<<<<<<<< * u"""iterfind(self, path, namespaces=None) * */ - __pyx_tuple__494 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_path, __pyx_n_s_namespaces, __pyx_n_s_root); if (unlikely(!__pyx_tuple__494)) __PYX_ERR(0, 2238, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__494); - __Pyx_GIVEREF(__pyx_tuple__494); - __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__494, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iterfind, 2238, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 2238, __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, 2236, __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) - /* "lxml/etree.pyx":2255 + /* "lxml/etree.pyx":2253 * 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__495 = 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__495)) __PYX_ERR(0, 2255, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__495); - __Pyx_GIVEREF(__pyx_tuple__495); - __pyx_codeobj__141 = (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__495, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_xpath, 2255, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(0, 2255, __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, 2253, __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) - /* "lxml/etree.pyx":2280 + /* "lxml/etree.pyx":2278 * 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__496 = 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__496)) __PYX_ERR(0, 2280, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__496); - __Pyx_GIVEREF(__pyx_tuple__496); - __pyx_codeobj__142 = (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__496, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_xslt_3, 2280, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(0, 2280, __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, 2278, __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) - /* "lxml/etree.pyx":2299 + /* "lxml/etree.pyx":2297 * return style(self, **_kw) * * def relaxng(self, relaxng): # <<<<<<<<<<<<<< * u"""relaxng(self, relaxng) * */ - __pyx_tuple__497 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_relaxng, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__497)) __PYX_ERR(0, 2299, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__497); - __Pyx_GIVEREF(__pyx_tuple__497); - __pyx_codeobj__143 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__497, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_relaxng, 2299, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__143)) __PYX_ERR(0, 2299, __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, 2297, __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) - /* "lxml/etree.pyx":2317 + /* "lxml/etree.pyx":2315 * return schema.validate(self) * * def xmlschema(self, xmlschema): # <<<<<<<<<<<<<< * u"""xmlschema(self, xmlschema) * */ - __pyx_tuple__498 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_xmlschema, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__498)) __PYX_ERR(0, 2317, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__498); - __Pyx_GIVEREF(__pyx_tuple__498); - __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__498, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_xmlschema, 2317, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(0, 2317, __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, 2315, __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) - /* "lxml/etree.pyx":2335 + /* "lxml/etree.pyx":2333 * return schema.validate(self) * * def xinclude(self): # <<<<<<<<<<<<<< * u"""xinclude(self) * */ - __pyx_tuple__499 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__499)) __PYX_ERR(0, 2335, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__499); - __Pyx_GIVEREF(__pyx_tuple__499); - __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__499, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_xinclude, 2335, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(0, 2335, __pyx_L1_error) + __pyx_tuple__280 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__280)) __PYX_ERR(0, 2333, __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) - /* "lxml/etree.pyx":2350 + /* "lxml/etree.pyx":2348 * 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__500 = 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__500)) __PYX_ERR(0, 2350, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__500); - __Pyx_GIVEREF(__pyx_tuple__500); - __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(2, 4, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__500, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_write_c14n, 2350, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(0, 2350, __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, 2348, __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) - /* "lxml/etree.pyx":2414 + /* "lxml/etree.pyx":2412 * _delAttribute(self._element, key) * * def update(self, sequence_or_dict): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * if isinstance(sequence_or_dict, (dict, _Attrib)): */ - __pyx_tuple__501 = 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__501)) __PYX_ERR(0, 2414, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__501); - __Pyx_GIVEREF(__pyx_tuple__501); - __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__501, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_update, 2414, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) __PYX_ERR(0, 2414, __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, 2412, __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) - /* "lxml/etree.pyx":2421 + /* "lxml/etree.pyx":2419 * _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__502 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_default, __pyx_n_s_result); if (unlikely(!__pyx_tuple__502)) __PYX_ERR(0, 2421, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__502); - __Pyx_GIVEREF(__pyx_tuple__502); - __pyx_codeobj__148 = (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__502, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_pop, 2421, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 2421, __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, 2419, __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) - /* "lxml/etree.pyx":2434 + /* "lxml/etree.pyx":2432 * return result * * def clear(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * cdef xmlNode* c_node = self._element._c_node */ - __pyx_tuple__503 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_c_node); if (unlikely(!__pyx_tuple__503)) __PYX_ERR(0, 2434, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__503); - __Pyx_GIVEREF(__pyx_tuple__503); - __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__503, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_clear, 2434, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(0, 2434, __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, 2432, __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) - /* "lxml/etree.pyx":2445 + /* "lxml/etree.pyx":2443 * 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__504 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__504)) __PYX_ERR(0, 2445, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__504); - __Pyx_GIVEREF(__pyx_tuple__504); - __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__504, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_copy_2, 2445, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(0, 2445, __pyx_L1_error) + __pyx_tuple__290 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__290)) __PYX_ERR(0, 2443, __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) - /* "lxml/etree.pyx":2449 + /* "lxml/etree.pyx":2447 * 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__505 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_memo); if (unlikely(!__pyx_tuple__505)) __PYX_ERR(0, 2449, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__505); - __Pyx_GIVEREF(__pyx_tuple__505); - __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__505, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_deepcopy, 2449, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) __PYX_ERR(0, 2449, __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, 2447, __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) - /* "lxml/etree.pyx":2479 + /* "lxml/etree.pyx":2477 * return c * * def get(self, key, default=None): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return _getAttributeValue(self._element, key, default) */ - __pyx_tuple__506 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_default); if (unlikely(!__pyx_tuple__506)) __PYX_ERR(0, 2479, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__506); - __Pyx_GIVEREF(__pyx_tuple__506); - __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__506, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_get, 2479, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(0, 2479, __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, 2477, __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) - /* "lxml/etree.pyx":2483 + /* "lxml/etree.pyx":2481 * return _getAttributeValue(self._element, key, default) * * def keys(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return _collectAttributes(self._element._c_node, 1) */ - __pyx_tuple__507 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__507)) __PYX_ERR(0, 2483, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__507); - __Pyx_GIVEREF(__pyx_tuple__507); - __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__507, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_keys, 2483, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) __PYX_ERR(0, 2483, __pyx_L1_error) + __pyx_tuple__296 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__296)) __PYX_ERR(0, 2481, __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) - /* "lxml/etree.pyx":2491 + /* "lxml/etree.pyx":2489 * return iter(_collectAttributes(self._element._c_node, 1)) * * def iterkeys(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return iter(_collectAttributes(self._element._c_node, 1)) */ - __pyx_tuple__508 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__508)) __PYX_ERR(0, 2491, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__508); - __Pyx_GIVEREF(__pyx_tuple__508); - __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__508, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iterkeys, 2491, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 2491, __pyx_L1_error) + __pyx_tuple__298 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__298)) __PYX_ERR(0, 2489, __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) - /* "lxml/etree.pyx":2495 + /* "lxml/etree.pyx":2493 * return iter(_collectAttributes(self._element._c_node, 1)) * * def values(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return _collectAttributes(self._element._c_node, 2) */ - __pyx_tuple__509 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__509)) __PYX_ERR(0, 2495, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__509); - __Pyx_GIVEREF(__pyx_tuple__509); - __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__509, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_values, 2495, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) __PYX_ERR(0, 2495, __pyx_L1_error) + __pyx_tuple__300 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__300)) __PYX_ERR(0, 2493, __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) - /* "lxml/etree.pyx":2499 + /* "lxml/etree.pyx":2497 * return _collectAttributes(self._element._c_node, 2) * * def itervalues(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return iter(_collectAttributes(self._element._c_node, 2)) */ - __pyx_tuple__510 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__510)) __PYX_ERR(0, 2499, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__510); - __Pyx_GIVEREF(__pyx_tuple__510); - __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__510, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_itervalues, 2499, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(0, 2499, __pyx_L1_error) + __pyx_tuple__302 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__302)) __PYX_ERR(0, 2497, __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) - /* "lxml/etree.pyx":2503 + /* "lxml/etree.pyx":2501 * return iter(_collectAttributes(self._element._c_node, 2)) * * def items(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return _collectAttributes(self._element._c_node, 3) */ - __pyx_tuple__511 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__511)) __PYX_ERR(0, 2503, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__511); - __Pyx_GIVEREF(__pyx_tuple__511); - __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__511, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_items, 2503, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) __PYX_ERR(0, 2503, __pyx_L1_error) + __pyx_tuple__304 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__304)) __PYX_ERR(0, 2501, __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) - /* "lxml/etree.pyx":2507 + /* "lxml/etree.pyx":2505 * return _collectAttributes(self._element._c_node, 3) * * def iteritems(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return iter(_collectAttributes(self._element._c_node, 3)) */ - __pyx_tuple__512 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__512)) __PYX_ERR(0, 2507, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__512); - __Pyx_GIVEREF(__pyx_tuple__512); - __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__512, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iteritems, 2507, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(0, 2507, __pyx_L1_error) + __pyx_tuple__306 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__306)) __PYX_ERR(0, 2505, __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) - /* "lxml/etree.pyx":2511 + /* "lxml/etree.pyx":2509 * return iter(_collectAttributes(self._element._c_node, 3)) * * def has_key(self, key): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return key in self */ - __pyx_tuple__513 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_key); if (unlikely(!__pyx_tuple__513)) __PYX_ERR(0, 2511, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__513); - __Pyx_GIVEREF(__pyx_tuple__513); - __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__513, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_has_key, 2511, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) __PYX_ERR(0, 2511, __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, 2509, __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) - /* "lxml/etree.pyx":2988 + /* "lxml/etree.pyx":2986 * # module-level API for ElementTree * * def Element(_tag, attrib=None, nsmap=None, **_extra): # <<<<<<<<<<<<<< * u"""Element(_tag, attrib=None, nsmap=None, **_extra) * */ - __pyx_tuple__514 = PyTuple_Pack(4, __pyx_n_s_tag_2, __pyx_n_s_attrib, __pyx_n_s_nsmap, __pyx_n_s_extra); if (unlikely(!__pyx_tuple__514)) __PYX_ERR(0, 2988, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__514); - __Pyx_GIVEREF(__pyx_tuple__514); - __pyx_codeobj__164 = (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__514, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_Element, 2988, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(0, 2988, __pyx_L1_error) - __pyx_tuple__515 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__515)) __PYX_ERR(0, 2988, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__515); - __Pyx_GIVEREF(__pyx_tuple__515); + __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_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_GOTREF(__pyx_tuple__312); + __Pyx_GIVEREF(__pyx_tuple__312); - /* "lxml/etree.pyx":3002 + /* "lxml/etree.pyx":3000 * * * def Comment(text=None): # <<<<<<<<<<<<<< * u"""Comment(text=None) * */ - __pyx_tuple__516 = 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__516)) __PYX_ERR(0, 3002, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__516); - __Pyx_GIVEREF(__pyx_tuple__516); - __pyx_codeobj__165 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__516, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_Comment, 3002, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__165)) __PYX_ERR(0, 3002, __pyx_L1_error) - __pyx_tuple__517 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__517)) __PYX_ERR(0, 3002, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__517); - __Pyx_GIVEREF(__pyx_tuple__517); + __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_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_GOTREF(__pyx_tuple__315); + __Pyx_GIVEREF(__pyx_tuple__315); - /* "lxml/etree.pyx":3026 + /* "lxml/etree.pyx":3024 * * * def ProcessingInstruction(target, text=None): # <<<<<<<<<<<<<< * u"""ProcessingInstruction(target, text=None) * */ - __pyx_tuple__518 = 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__518)) __PYX_ERR(0, 3026, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__518); - __Pyx_GIVEREF(__pyx_tuple__518); - __pyx_codeobj__169 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__518, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_ProcessingInstruction, 3026, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__169)) __PYX_ERR(0, 3026, __pyx_L1_error) - __pyx_tuple__519 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__519)) __PYX_ERR(0, 3026, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__519); - __Pyx_GIVEREF(__pyx_tuple__519); + __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_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_GOTREF(__pyx_tuple__318); + __Pyx_GIVEREF(__pyx_tuple__318); - /* "lxml/etree.pyx":3079 + /* "lxml/etree.pyx":3077 * * * def Entity(name): # <<<<<<<<<<<<<< * u"""Entity(name) * */ - __pyx_tuple__520 = 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__520)) __PYX_ERR(0, 3079, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__520); - __Pyx_GIVEREF(__pyx_tuple__520); - __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__520, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_Entity, 3079, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) __PYX_ERR(0, 3079, __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, 3077, __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) - /* "lxml/etree.pyx":3105 + /* "lxml/etree.pyx":3103 * * * def SubElement(_Element _parent not None, _tag, # <<<<<<<<<<<<<< * attrib=None, nsmap=None, **_extra): * u"""SubElement(_parent, _tag, attrib=None, nsmap=None, **_extra) */ - __pyx_tuple__521 = 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__521)) __PYX_ERR(0, 3105, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__521); - __Pyx_GIVEREF(__pyx_tuple__521); - __pyx_codeobj__173 = (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__521, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_SubElement, 3105, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__173)) __PYX_ERR(0, 3105, __pyx_L1_error) - __pyx_tuple__522 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__522)) __PYX_ERR(0, 3105, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__522); - __Pyx_GIVEREF(__pyx_tuple__522); + __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_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_GOTREF(__pyx_tuple__323); + __Pyx_GIVEREF(__pyx_tuple__323); - /* "lxml/etree.pyx":3115 + /* "lxml/etree.pyx":3113 * * * def ElementTree(_Element element=None, *, file=None, _BaseParser parser=None): # <<<<<<<<<<<<<< * u"""ElementTree(element=None, file=None, parser=None) * */ - __pyx_tuple__523 = 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__523)) __PYX_ERR(0, 3115, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__523); - __Pyx_GIVEREF(__pyx_tuple__523); - __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(1, 2, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__523, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_ElementTree, 3115, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(0, 3115, __pyx_L1_error) - __pyx_tuple__524 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__524)) __PYX_ERR(0, 3115, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__524); - __Pyx_GIVEREF(__pyx_tuple__524); + __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_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_GOTREF(__pyx_tuple__326); + __Pyx_GIVEREF(__pyx_tuple__326); - /* "lxml/etree.pyx":3141 + /* "lxml/etree.pyx":3139 * * * def HTML(text, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""HTML(text, parser=None, base_url=None) * */ - __pyx_tuple__525 = 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__525)) __PYX_ERR(0, 3141, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__525); - __Pyx_GIVEREF(__pyx_tuple__525); - __pyx_codeobj__175 = (PyObject*)__Pyx_PyCode_New(2, 1, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__525, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_HTML, 3141, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__175)) __PYX_ERR(0, 3141, __pyx_L1_error) - __pyx_tuple__526 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__526)) __PYX_ERR(0, 3141, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__526); - __Pyx_GIVEREF(__pyx_tuple__526); + __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_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_GOTREF(__pyx_tuple__329); + __Pyx_GIVEREF(__pyx_tuple__329); - /* "lxml/etree.pyx":3167 + /* "lxml/etree.pyx":3165 * * * def XML(text, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""XML(text, parser=None, base_url=None) * */ - __pyx_tuple__527 = 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__527)) __PYX_ERR(0, 3167, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__527); - __Pyx_GIVEREF(__pyx_tuple__527); - __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(2, 1, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__527, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_XML, 3167, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) __PYX_ERR(0, 3167, __pyx_L1_error) - __pyx_tuple__528 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__528)) __PYX_ERR(0, 3167, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__528); - __Pyx_GIVEREF(__pyx_tuple__528); + __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_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_GOTREF(__pyx_tuple__332); + __Pyx_GIVEREF(__pyx_tuple__332); - /* "lxml/etree.pyx":3198 + /* "lxml/etree.pyx":3196 * * * def fromstring(text, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""fromstring(text, parser=None, base_url=None) * */ - __pyx_tuple__529 = 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__529)) __PYX_ERR(0, 3198, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__529); - __Pyx_GIVEREF(__pyx_tuple__529); - __pyx_codeobj__177 = (PyObject*)__Pyx_PyCode_New(2, 1, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__529, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_fromstring, 3198, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__177)) __PYX_ERR(0, 3198, __pyx_L1_error) - __pyx_tuple__530 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__530)) __PYX_ERR(0, 3198, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__530); - __Pyx_GIVEREF(__pyx_tuple__530); + __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_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_GOTREF(__pyx_tuple__335); + __Pyx_GIVEREF(__pyx_tuple__335); - /* "lxml/etree.pyx":3219 + /* "lxml/etree.pyx":3217 * * * def fromstringlist(strings, _BaseParser parser=None): # <<<<<<<<<<<<<< * u"""fromstringlist(strings, parser=None) * */ - __pyx_tuple__531 = 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__531)) __PYX_ERR(0, 3219, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__531); - __Pyx_GIVEREF(__pyx_tuple__531); - __pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__531, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_fromstringlist, 3219, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) __PYX_ERR(0, 3219, __pyx_L1_error) - __pyx_tuple__532 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__532)) __PYX_ERR(0, 3219, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__532); - __Pyx_GIVEREF(__pyx_tuple__532); + __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_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_GOTREF(__pyx_tuple__338); + __Pyx_GIVEREF(__pyx_tuple__338); - /* "lxml/etree.pyx":3240 + /* "lxml/etree.pyx":3238 * * * def iselement(element): # <<<<<<<<<<<<<< * u"""iselement(element) * */ - __pyx_tuple__533 = PyTuple_Pack(1, __pyx_n_s_element); if (unlikely(!__pyx_tuple__533)) __PYX_ERR(0, 3240, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__533); - __Pyx_GIVEREF(__pyx_tuple__533); - __pyx_codeobj__180 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__533, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iselement, 3240, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__180)) __PYX_ERR(0, 3240, __pyx_L1_error) + __pyx_tuple__339 = PyTuple_Pack(1, __pyx_n_s_element); if (unlikely(!__pyx_tuple__339)) __PYX_ERR(0, 3238, __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) - /* "lxml/etree.pyx":3248 + /* "lxml/etree.pyx":3246 * * * def dump(_Element elem not None, *, bint pretty_print=True, with_tail=True): # <<<<<<<<<<<<<< * u"""dump(elem, pretty_print=True, with_tail=True) * */ - __pyx_tuple__534 = 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__534)) __PYX_ERR(0, 3248, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__534); - __Pyx_GIVEREF(__pyx_tuple__534); - __pyx_codeobj__181 = (PyObject*)__Pyx_PyCode_New(1, 2, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__534, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_dump, 3248, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__181)) __PYX_ERR(0, 3248, __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, 3246, __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) - /* "lxml/etree.pyx":3261 + /* "lxml/etree.pyx":3259 * * * 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__535 = 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__535)) __PYX_ERR(0, 3261, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__535); - __Pyx_GIVEREF(__pyx_tuple__535); - __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(1, 10, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__535, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_tostring, 3261, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) __PYX_ERR(0, 3261, __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, 3259, __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) - /* "lxml/etree.pyx":3354 + /* "lxml/etree.pyx":3352 * * * def tostringlist(element_or_tree, *args, **kwargs): # <<<<<<<<<<<<<< * u"""tostringlist(element_or_tree, *args, **kwargs) * */ - __pyx_tuple__536 = PyTuple_Pack(3, __pyx_n_s_element_or_tree, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__536)) __PYX_ERR(0, 3354, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__536); - __Pyx_GIVEREF(__pyx_tuple__536); - __pyx_codeobj__186 = (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__536, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_tostringlist, 3354, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__186)) __PYX_ERR(0, 3354, __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, 3352, __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) - /* "lxml/etree.pyx":3366 + /* "lxml/etree.pyx":3364 * * * 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__537 = 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__537)) __PYX_ERR(0, 3366, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__537); - __Pyx_GIVEREF(__pyx_tuple__537); - __pyx_codeobj__187 = (PyObject*)__Pyx_PyCode_New(1, 4, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__537, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_tounicode, 3366, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__187)) __PYX_ERR(0, 3366, __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, 3364, __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) - /* "lxml/etree.pyx":3400 + /* "lxml/etree.pyx":3398 * * * def parse(source, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""parse(source, parser=None, base_url=None) * */ - __pyx_tuple__538 = 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__538)) __PYX_ERR(0, 3400, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__538); - __Pyx_GIVEREF(__pyx_tuple__538); - __pyx_codeobj__188 = (PyObject*)__Pyx_PyCode_New(2, 1, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__538, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_parse, 3400, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__188)) __PYX_ERR(0, 3400, __pyx_L1_error) - __pyx_tuple__539 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__539)) __PYX_ERR(0, 3400, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__539); - __Pyx_GIVEREF(__pyx_tuple__539); + __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_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_GOTREF(__pyx_tuple__351); + __Pyx_GIVEREF(__pyx_tuple__351); - /* "lxml/etree.pyx":3432 + /* "lxml/etree.pyx":3430 * * * def adopt_external_document(capsule, _BaseParser parser=None): # <<<<<<<<<<<<<< * """adopt_external_document(capsule, parser=None) * */ - __pyx_tuple__540 = 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__540)) __PYX_ERR(0, 3432, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__540); - __Pyx_GIVEREF(__pyx_tuple__540); - __pyx_codeobj__189 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__540, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_adopt_external_document, 3432, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__189)) __PYX_ERR(0, 3432, __pyx_L1_error) - __pyx_tuple__541 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__541)) __PYX_ERR(0, 3432, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__541); - __Pyx_GIVEREF(__pyx_tuple__541); + __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_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_GOTREF(__pyx_tuple__354); + __Pyx_GIVEREF(__pyx_tuple__354); /* "src/lxml/readonlytree.pxi":160 * return c_node != NULL @@ -245873,10 +228581,10 @@ static int __Pyx_InitCachedConstants(void) { * u"__deepcopy__(self, memo)" * return self.__copy__() */ - __pyx_tuple__542 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_memo); if (unlikely(!__pyx_tuple__542)) __PYX_ERR(6, 160, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__542); - __Pyx_GIVEREF(__pyx_tuple__542); - __pyx_codeobj__192 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__542, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_deepcopy, 160, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__192)) __PYX_ERR(6, 160, __pyx_L1_error) + __pyx_tuple__355 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_memo); if (unlikely(!__pyx_tuple__355)) __PYX_ERR(6, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__355); + __Pyx_GIVEREF(__pyx_tuple__355); + __pyx_codeobj__356 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__355, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_deepcopy, 160, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__356)) __PYX_ERR(6, 160, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":164 * return self.__copy__() @@ -245885,10 +228593,10 @@ static int __Pyx_InitCachedConstants(void) { * u"__copy__(self)" * cdef xmlDoc* c_doc */ - __pyx_tuple__543 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__543)) __PYX_ERR(6, 164, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__543); - __Pyx_GIVEREF(__pyx_tuple__543); - __pyx_codeobj__193 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__543, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_copy_2, 164, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__193)) __PYX_ERR(6, 164, __pyx_L1_error) + __pyx_tuple__357 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__357)) __PYX_ERR(6, 164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__357); + __Pyx_GIVEREF(__pyx_tuple__357); + __pyx_codeobj__358 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__357, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_copy_2, 164, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__358)) __PYX_ERR(6, 164, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":187 * return iter(self.getchildren()) @@ -245897,10 +228605,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""iterchildren(self, tag=None, reversed=False) * */ - __pyx_tuple__544 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_reversed, __pyx_n_s_children, __pyx_n_s_el); if (unlikely(!__pyx_tuple__544)) __PYX_ERR(6, 187, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__544); - __Pyx_GIVEREF(__pyx_tuple__544); - __pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(2, 1, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__544, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_iterchildren, 187, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__194)) __PYX_ERR(6, 187, __pyx_L1_error) + __pyx_tuple__359 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_reversed, __pyx_n_s_children, __pyx_n_s_el); if (unlikely(!__pyx_tuple__359)) __PYX_ERR(6, 187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__359); + __Pyx_GIVEREF(__pyx_tuple__359); + __pyx_codeobj__360 = (PyObject*)__Pyx_PyCode_New(2, 1, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__359, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_iterchildren, 187, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__360)) __PYX_ERR(6, 187, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":199 * return iter(children) @@ -245909,10 +228617,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""Returns all subelements. The elements are returned in document * order. */ - __pyx_tuple__545 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__545)) __PYX_ERR(6, 199, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__545); - __Pyx_GIVEREF(__pyx_tuple__545); - __pyx_codeobj__196 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__545, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_getchildren, 199, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) __PYX_ERR(6, 199, __pyx_L1_error) + __pyx_tuple__361 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__361)) __PYX_ERR(6, 199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__361); + __Pyx_GIVEREF(__pyx_tuple__361); + __pyx_codeobj__362 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__361, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_getchildren, 199, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__362)) __PYX_ERR(6, 199, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":214 * return result @@ -245921,10 +228629,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""Returns the parent of this element or None for the root element. * """ */ - __pyx_tuple__546 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_c_parent); if (unlikely(!__pyx_tuple__546)) __PYX_ERR(6, 214, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__546); - __Pyx_GIVEREF(__pyx_tuple__546); - __pyx_codeobj__197 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__546, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_getparent, 214, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__197)) __PYX_ERR(6, 214, __pyx_L1_error) + __pyx_tuple__363 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_c_parent); if (unlikely(!__pyx_tuple__363)) __PYX_ERR(6, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__363); + __Pyx_GIVEREF(__pyx_tuple__363); + __pyx_codeobj__364 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__363, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_getparent, 214, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__364)) __PYX_ERR(6, 214, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":225 * return _newReadOnlyProxy(self._source_proxy, c_parent) @@ -245933,10 +228641,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""Returns the following sibling of this element or None. * """ */ - __pyx_tuple__547 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_c_node); if (unlikely(!__pyx_tuple__547)) __PYX_ERR(6, 225, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__547); - __Pyx_GIVEREF(__pyx_tuple__547); - __pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__547, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_getnext, 225, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) __PYX_ERR(6, 225, __pyx_L1_error) + __pyx_tuple__365 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_c_node); if (unlikely(!__pyx_tuple__365)) __PYX_ERR(6, 225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__365); + __Pyx_GIVEREF(__pyx_tuple__365); + __pyx_codeobj__366 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__365, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_getnext, 225, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__366)) __PYX_ERR(6, 225, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":235 * return None @@ -245945,10 +228653,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""Returns the preceding sibling of this element or None. * """ */ - __pyx_tuple__548 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_c_node); if (unlikely(!__pyx_tuple__548)) __PYX_ERR(6, 235, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__548); - __Pyx_GIVEREF(__pyx_tuple__548); - __pyx_codeobj__199 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__548, __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__199)) __PYX_ERR(6, 235, __pyx_L1_error) + __pyx_tuple__367 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_c_node); if (unlikely(!__pyx_tuple__367)) __PYX_ERR(6, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__367); + __Pyx_GIVEREF(__pyx_tuple__367); + __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 @@ -245957,10 +228665,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""Gets an element attribute. * """ */ - __pyx_tuple__549 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_default); if (unlikely(!__pyx_tuple__549)) __PYX_ERR(6, 293, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__549); - __Pyx_GIVEREF(__pyx_tuple__549); - __pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__549, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_get, 293, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(6, 293, __pyx_L1_error) + __pyx_tuple__369 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_default); if (unlikely(!__pyx_tuple__369)) __PYX_ERR(6, 293, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__369); + __Pyx_GIVEREF(__pyx_tuple__369); + __pyx_codeobj__370 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__369, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_get, 293, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__370)) __PYX_ERR(6, 293, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":299 * return _getNodeAttributeValue(self._c_node, key, default) @@ -245969,10 +228677,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""Gets a list of attribute names. The names are returned in an * arbitrary order (just like for an ordinary Python dictionary). */ - __pyx_tuple__550 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__550)) __PYX_ERR(6, 299, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__550); - __Pyx_GIVEREF(__pyx_tuple__550); - __pyx_codeobj__201 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__550, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_keys, 299, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__201)) __PYX_ERR(6, 299, __pyx_L1_error) + __pyx_tuple__371 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__371)) __PYX_ERR(6, 299, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__371); + __Pyx_GIVEREF(__pyx_tuple__371); + __pyx_codeobj__372 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__371, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_keys, 299, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__372)) __PYX_ERR(6, 299, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":306 * return _collectAttributes(self._c_node, 1) @@ -245981,10 +228689,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""Gets element attributes, as a sequence. The attributes are returned * in an arbitrary order. */ - __pyx_tuple__551 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__551)) __PYX_ERR(6, 306, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__551); - __Pyx_GIVEREF(__pyx_tuple__551); - __pyx_codeobj__202 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__551, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_values, 306, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) __PYX_ERR(6, 306, __pyx_L1_error) + __pyx_tuple__373 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__373)) __PYX_ERR(6, 306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__373); + __Pyx_GIVEREF(__pyx_tuple__373); + __pyx_codeobj__374 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__373, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_values, 306, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__374)) __PYX_ERR(6, 306, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":313 * return _collectAttributes(self._c_node, 2) @@ -245993,10 +228701,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""Gets element attributes, as a sequence. The attributes are returned * in an arbitrary order. */ - __pyx_tuple__552 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__552)) __PYX_ERR(6, 313, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__552); - __Pyx_GIVEREF(__pyx_tuple__552); - __pyx_codeobj__203 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__552, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_items, 313, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__203)) __PYX_ERR(6, 313, __pyx_L1_error) + __pyx_tuple__375 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__375)) __PYX_ERR(6, 313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__375); + __Pyx_GIVEREF(__pyx_tuple__375); + __pyx_codeobj__376 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__375, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_items, 313, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__376)) __PYX_ERR(6, 313, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":379 * return 0 @@ -246005,10 +228713,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""Append a copy of an Element to the list of children. * """ */ - __pyx_tuple__553 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_other_element); if (unlikely(!__pyx_tuple__553)) __PYX_ERR(6, 379, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__553); - __Pyx_GIVEREF(__pyx_tuple__553); - __pyx_codeobj__204 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__553, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_append, 379, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__204)) __PYX_ERR(6, 379, __pyx_L1_error) + __pyx_tuple__377 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_other_element); if (unlikely(!__pyx_tuple__377)) __PYX_ERR(6, 379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__377); + __Pyx_GIVEREF(__pyx_tuple__377); + __pyx_codeobj__378 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__377, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_append, 379, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__378)) __PYX_ERR(6, 379, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":396 * _moveTail(c_next, c_node) @@ -246017,10 +228725,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""Append a copy of all Elements from a sequence to the list of * children. */ - __pyx_tuple__554 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_elements, __pyx_n_s_element); if (unlikely(!__pyx_tuple__554)) __PYX_ERR(6, 396, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__554); - __Pyx_GIVEREF(__pyx_tuple__554); - __pyx_codeobj__205 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__554, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_extend, 396, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__205)) __PYX_ERR(6, 396, __pyx_L1_error) + __pyx_tuple__379 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_elements, __pyx_n_s_element); if (unlikely(!__pyx_tuple__379)) __PYX_ERR(6, 396, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__379); + __Pyx_GIVEREF(__pyx_tuple__379); + __pyx_codeobj__380 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__379, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_extend, 396, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__380)) __PYX_ERR(6, 396, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":476 * text content (i.e. everything that adds to the subtree). @@ -246029,10 +228737,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""Append a copy of an Element to the list of children. * """ */ - __pyx_tuple__555 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_other_element); if (unlikely(!__pyx_tuple__555)) __PYX_ERR(6, 476, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__555); - __Pyx_GIVEREF(__pyx_tuple__555); - __pyx_codeobj__206 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__555, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_append, 476, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) __PYX_ERR(6, 476, __pyx_L1_error) + __pyx_tuple__381 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_other_element); if (unlikely(!__pyx_tuple__381)) __PYX_ERR(6, 476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__381); + __Pyx_GIVEREF(__pyx_tuple__381); + __pyx_codeobj__382 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__381, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_append, 476, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__382)) __PYX_ERR(6, 476, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":488 * _moveTail(c_next, c_node) @@ -246041,10 +228749,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""Append a copy of all Elements from a sequence to the list of * children. */ - __pyx_tuple__556 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_elements, __pyx_n_s_element); if (unlikely(!__pyx_tuple__556)) __PYX_ERR(6, 488, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__556); - __Pyx_GIVEREF(__pyx_tuple__556); - __pyx_codeobj__207 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__556, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_extend, 488, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__207)) __PYX_ERR(6, 488, __pyx_L1_error) + __pyx_tuple__383 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_elements, __pyx_n_s_element); if (unlikely(!__pyx_tuple__383)) __PYX_ERR(6, 488, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__383); + __Pyx_GIVEREF(__pyx_tuple__383); + __pyx_codeobj__384 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__383, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_extend, 488, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__384)) __PYX_ERR(6, 488, __pyx_L1_error) /* "src/lxml/classlookup.pxi":248 * self._fallback_function = _lookupDefaultElementClass @@ -246053,10 +228761,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""set_fallback(self, lookup) * */ - __pyx_tuple__557 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_lookup); if (unlikely(!__pyx_tuple__557)) __PYX_ERR(7, 248, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__557); - __Pyx_GIVEREF(__pyx_tuple__557); - __pyx_codeobj__208 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__557, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_classlookup_pxi, __pyx_n_s_set_fallback, 248, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__208)) __PYX_ERR(7, 248, __pyx_L1_error) + __pyx_tuple__385 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_lookup); if (unlikely(!__pyx_tuple__385)) __PYX_ERR(7, 248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__385); + __Pyx_GIVEREF(__pyx_tuple__385); + __pyx_codeobj__386 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__385, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_classlookup_pxi, __pyx_n_s_set_fallback, 248, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__386)) __PYX_ERR(7, 248, __pyx_L1_error) /* "src/lxml/classlookup.pxi":430 * self._lookup_function = _custom_class_lookup @@ -246065,10 +228773,10 @@ static int __Pyx_InitCachedConstants(void) { * u"lookup(self, type, doc, namespace, name)" * return None */ - __pyx_tuple__558 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_type, __pyx_n_s_doc_2, __pyx_n_s_namespace, __pyx_n_s_name_2); if (unlikely(!__pyx_tuple__558)) __PYX_ERR(7, 430, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__558); - __Pyx_GIVEREF(__pyx_tuple__558); - __pyx_codeobj__209 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__558, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_classlookup_pxi, __pyx_n_s_lookup, 430, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__209)) __PYX_ERR(7, 430, __pyx_L1_error) + __pyx_tuple__387 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_type, __pyx_n_s_doc_2, __pyx_n_s_namespace, __pyx_n_s_name_2); if (unlikely(!__pyx_tuple__387)) __PYX_ERR(7, 430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__387); + __Pyx_GIVEREF(__pyx_tuple__387); + __pyx_codeobj__388 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__387, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_classlookup_pxi, __pyx_n_s_lookup, 430, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__388)) __PYX_ERR(7, 430, __pyx_L1_error) /* "src/lxml/classlookup.pxi":512 * self._lookup_function = _python_class_lookup @@ -246077,10 +228785,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""lookup(self, doc, element) * */ - __pyx_tuple__559 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_doc_2, __pyx_n_s_element); if (unlikely(!__pyx_tuple__559)) __PYX_ERR(7, 512, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__559); - __Pyx_GIVEREF(__pyx_tuple__559); - __pyx_codeobj__210 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__559, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_classlookup_pxi, __pyx_n_s_lookup, 512, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__210)) __PYX_ERR(7, 512, __pyx_L1_error) + __pyx_tuple__389 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_doc_2, __pyx_n_s_element); if (unlikely(!__pyx_tuple__389)) __PYX_ERR(7, 512, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__389); + __Pyx_GIVEREF(__pyx_tuple__389); + __pyx_codeobj__390 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__389, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_classlookup_pxi, __pyx_n_s_lookup, 512, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__390)) __PYX_ERR(7, 512, __pyx_L1_error) /* "src/lxml/classlookup.pxi":549 * LOOKUP_ELEMENT_CLASS = function @@ -246089,13 +228797,13 @@ static int __Pyx_InitCachedConstants(void) { * u"""set_element_class_lookup(lookup = None) * */ - __pyx_tuple__560 = PyTuple_Pack(1, __pyx_n_s_lookup); if (unlikely(!__pyx_tuple__560)) __PYX_ERR(7, 549, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__560); - __Pyx_GIVEREF(__pyx_tuple__560); - __pyx_codeobj__211 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__560, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_classlookup_pxi, __pyx_n_s_set_element_class_lookup, 549, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__211)) __PYX_ERR(7, 549, __pyx_L1_error) - __pyx_tuple__561 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__561)) __PYX_ERR(7, 549, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__561); - __Pyx_GIVEREF(__pyx_tuple__561); + __pyx_tuple__391 = PyTuple_Pack(1, __pyx_n_s_lookup); if (unlikely(!__pyx_tuple__391)) __PYX_ERR(7, 549, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__391); + __Pyx_GIVEREF(__pyx_tuple__391); + __pyx_codeobj__392 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__391, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_classlookup_pxi, __pyx_n_s_set_element_class_lookup, 549, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__392)) __PYX_ERR(7, 549, __pyx_L1_error) + __pyx_tuple__393 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__393)) __PYX_ERR(7, 549, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__393); + __Pyx_GIVEREF(__pyx_tuple__393); /* "src/lxml/nsclasses.pxi":29 * self._entries = {} @@ -246104,10 +228812,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""update(self, class_dict_iterable) * */ - __pyx_tuple__562 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_class_dict_iterable, __pyx_n_s_name_2, __pyx_n_s_item); if (unlikely(!__pyx_tuple__562)) __PYX_ERR(9, 29, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__562); - __Pyx_GIVEREF(__pyx_tuple__562); - __pyx_codeobj__212 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__562, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_nsclasses_pxi, __pyx_n_s_update, 29, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__212)) __PYX_ERR(9, 29, __pyx_L1_error) + __pyx_tuple__394 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_class_dict_iterable, __pyx_n_s_name_2, __pyx_n_s_item); if (unlikely(!__pyx_tuple__394)) __PYX_ERR(10, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__394); + __Pyx_GIVEREF(__pyx_tuple__394); + __pyx_codeobj__395 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__394, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_nsclasses_pxi, __pyx_n_s_update, 29, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__395)) __PYX_ERR(10, 29, __pyx_L1_error) /* "src/lxml/nsclasses.pxi":74 * return iter(self._entries) @@ -246116,10 +228824,10 @@ static int __Pyx_InitCachedConstants(void) { * return list(self._entries.items()) * */ - __pyx_tuple__563 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__563)) __PYX_ERR(9, 74, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__563); - __Pyx_GIVEREF(__pyx_tuple__563); - __pyx_codeobj__215 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__563, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_nsclasses_pxi, __pyx_n_s_items, 74, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__215)) __PYX_ERR(9, 74, __pyx_L1_error) + __pyx_tuple__396 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__396)) __PYX_ERR(10, 74, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__396); + __Pyx_GIVEREF(__pyx_tuple__396); + __pyx_codeobj__397 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__396, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_nsclasses_pxi, __pyx_n_s_items, 74, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__397)) __PYX_ERR(10, 74, __pyx_L1_error) /* "src/lxml/nsclasses.pxi":77 * return list(self._entries.items()) @@ -246128,10 +228836,10 @@ static int __Pyx_InitCachedConstants(void) { * return iter(self._entries.items()) * */ - __pyx_tuple__564 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__564)) __PYX_ERR(9, 77, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__564); - __Pyx_GIVEREF(__pyx_tuple__564); - __pyx_codeobj__216 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__564, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_nsclasses_pxi, __pyx_n_s_iteritems, 77, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__216)) __PYX_ERR(9, 77, __pyx_L1_error) + __pyx_tuple__398 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__398)) __PYX_ERR(10, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__398); + __Pyx_GIVEREF(__pyx_tuple__398); + __pyx_codeobj__399 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__398, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_nsclasses_pxi, __pyx_n_s_iteritems, 77, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__399)) __PYX_ERR(10, 77, __pyx_L1_error) /* "src/lxml/nsclasses.pxi":80 * return iter(self._entries.items()) @@ -246140,10 +228848,10 @@ static int __Pyx_InitCachedConstants(void) { * self._entries.clear() * */ - __pyx_tuple__565 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__565)) __PYX_ERR(9, 80, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__565); - __Pyx_GIVEREF(__pyx_tuple__565); - __pyx_codeobj__217 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__565, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_nsclasses_pxi, __pyx_n_s_clear, 80, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__217)) __PYX_ERR(9, 80, __pyx_L1_error) + __pyx_tuple__400 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__400)) __PYX_ERR(10, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__400); + __Pyx_GIVEREF(__pyx_tuple__400); + __pyx_codeobj__401 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__400, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_nsclasses_pxi, __pyx_n_s_clear, 80, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__401)) __PYX_ERR(10, 80, __pyx_L1_error) /* "src/lxml/nsclasses.pxi":99 * return obj @@ -246152,10 +228860,10 @@ static int __Pyx_InitCachedConstants(void) { * self[name] = obj * return obj */ - __pyx_tuple__566 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_name_2, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__566)) __PYX_ERR(9, 99, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__566); - __Pyx_GIVEREF(__pyx_tuple__566); - __pyx_codeobj__218 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__566, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_nsclasses_pxi, __pyx_n_s_deco, 99, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__218)) __PYX_ERR(9, 99, __pyx_L1_error) + __pyx_tuple__402 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_name_2, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__402)) __PYX_ERR(10, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__402); + __Pyx_GIVEREF(__pyx_tuple__402); + __pyx_codeobj__403 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__402, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_nsclasses_pxi, __pyx_n_s_deco, 99, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__403)) __PYX_ERR(10, 99, __pyx_L1_error) /* "src/lxml/nsclasses.pxi":147 * self._lookup_function = _find_nselement_class @@ -246164,10 +228872,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""get_namespace(self, ns_uri) * */ - __pyx_tuple__567 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_ns_uri, __pyx_n_s_ns_utf, __pyx_n_s_registry); if (unlikely(!__pyx_tuple__567)) __PYX_ERR(9, 147, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__567); - __Pyx_GIVEREF(__pyx_tuple__567); - __pyx_codeobj__219 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__567, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_nsclasses_pxi, __pyx_n_s_get_namespace, 147, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__219)) __PYX_ERR(9, 147, __pyx_L1_error) + __pyx_tuple__404 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_ns_uri, __pyx_n_s_ns_utf, __pyx_n_s_registry); if (unlikely(!__pyx_tuple__404)) __PYX_ERR(10, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__404); + __Pyx_GIVEREF(__pyx_tuple__404); + __pyx_codeobj__405 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__404, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_nsclasses_pxi, __pyx_n_s_get_namespace, 147, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__405)) __PYX_ERR(10, 147, __pyx_L1_error) /* "src/lxml/nsclasses.pxi":207 * __FUNCTION_NAMESPACE_REGISTRIES = {} @@ -246176,10 +228884,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""FunctionNamespace(ns_uri) * */ - __pyx_tuple__568 = PyTuple_Pack(3, __pyx_n_s_ns_uri, __pyx_n_s_ns_utf, __pyx_n_s_registry); if (unlikely(!__pyx_tuple__568)) __PYX_ERR(9, 207, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__568); - __Pyx_GIVEREF(__pyx_tuple__568); - __pyx_codeobj__220 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__568, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_nsclasses_pxi, __pyx_n_s_FunctionNamespace, 207, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__220)) __PYX_ERR(9, 207, __pyx_L1_error) + __pyx_tuple__406 = PyTuple_Pack(3, __pyx_n_s_ns_uri, __pyx_n_s_ns_utf, __pyx_n_s_registry); if (unlikely(!__pyx_tuple__406)) __PYX_ERR(10, 207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__406); + __Pyx_GIVEREF(__pyx_tuple__406); + __pyx_codeobj__407 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__406, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_nsclasses_pxi, __pyx_n_s_FunctionNamespace, 207, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__407)) __PYX_ERR(10, 207, __pyx_L1_error) /* "src/lxml/docloader.pxi":25 * cdef class Resolver: @@ -246188,10 +228896,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""resolve(self, system_url, public_id, context) * */ - __pyx_tuple__569 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_system_url, __pyx_n_s_public_id, __pyx_n_s_context); if (unlikely(!__pyx_tuple__569)) __PYX_ERR(10, 25, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__569); - __Pyx_GIVEREF(__pyx_tuple__569); - __pyx_codeobj__221 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__569, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_docloader_pxi, __pyx_n_s_resolve, 25, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__221)) __PYX_ERR(10, 25, __pyx_L1_error) + __pyx_tuple__408 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_system_url, __pyx_n_s_public_id, __pyx_n_s_context); if (unlikely(!__pyx_tuple__408)) __PYX_ERR(11, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__408); + __Pyx_GIVEREF(__pyx_tuple__408); + __pyx_codeobj__409 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__408, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_docloader_pxi, __pyx_n_s_resolve, 25, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__409)) __PYX_ERR(11, 25, __pyx_L1_error) /* "src/lxml/docloader.pxi":36 * return None @@ -246200,10 +228908,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""resolve_empty(self, context) * */ - __pyx_tuple__570 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_context, __pyx_n_s_doc_ref); if (unlikely(!__pyx_tuple__570)) __PYX_ERR(10, 36, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__570); - __Pyx_GIVEREF(__pyx_tuple__570); - __pyx_codeobj__222 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__570, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_docloader_pxi, __pyx_n_s_resolve_empty, 36, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__222)) __PYX_ERR(10, 36, __pyx_L1_error) + __pyx_tuple__410 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_context, __pyx_n_s_doc_ref); if (unlikely(!__pyx_tuple__410)) __PYX_ERR(11, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__410); + __Pyx_GIVEREF(__pyx_tuple__410); + __pyx_codeobj__411 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__410, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_docloader_pxi, __pyx_n_s_resolve_empty, 36, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__411)) __PYX_ERR(11, 36, __pyx_L1_error) /* "src/lxml/docloader.pxi":48 * return doc_ref @@ -246212,10 +228920,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""resolve_string(self, string, context, base_url=None) * */ - __pyx_tuple__571 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_string_2, __pyx_n_s_context, __pyx_n_s_base_url, __pyx_n_s_doc_ref); if (unlikely(!__pyx_tuple__571)) __PYX_ERR(10, 48, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__571); - __Pyx_GIVEREF(__pyx_tuple__571); - __pyx_codeobj__223 = (PyObject*)__Pyx_PyCode_New(3, 1, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__571, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_docloader_pxi, __pyx_n_s_resolve_string, 48, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__223)) __PYX_ERR(10, 48, __pyx_L1_error) + __pyx_tuple__412 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_string_2, __pyx_n_s_context, __pyx_n_s_base_url, __pyx_n_s_doc_ref); if (unlikely(!__pyx_tuple__412)) __PYX_ERR(11, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__412); + __Pyx_GIVEREF(__pyx_tuple__412); + __pyx_codeobj__413 = (PyObject*)__Pyx_PyCode_New(3, 1, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__412, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_docloader_pxi, __pyx_n_s_resolve_string, 48, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__413)) __PYX_ERR(11, 48, __pyx_L1_error) /* "src/lxml/docloader.pxi":69 * return doc_ref @@ -246224,10 +228932,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""resolve_filename(self, filename, context) * */ - __pyx_tuple__572 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_filename, __pyx_n_s_context, __pyx_n_s_doc_ref); if (unlikely(!__pyx_tuple__572)) __PYX_ERR(10, 69, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__572); - __Pyx_GIVEREF(__pyx_tuple__572); - __pyx_codeobj__224 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__572, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_docloader_pxi, __pyx_n_s_resolve_filename, 69, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__224)) __PYX_ERR(10, 69, __pyx_L1_error) + __pyx_tuple__414 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_filename, __pyx_n_s_context, __pyx_n_s_doc_ref); if (unlikely(!__pyx_tuple__414)) __PYX_ERR(11, 69, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__414); + __Pyx_GIVEREF(__pyx_tuple__414); + __pyx_codeobj__415 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__414, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_docloader_pxi, __pyx_n_s_resolve_filename, 69, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__415)) __PYX_ERR(11, 69, __pyx_L1_error) /* "src/lxml/docloader.pxi":83 * return doc_ref @@ -246236,10 +228944,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""resolve_file(self, f, context, base_url=None, close=True) * */ - __pyx_tuple__573 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_f, __pyx_n_s_context, __pyx_n_s_base_url, __pyx_n_s_close, __pyx_n_s_doc_ref); if (unlikely(!__pyx_tuple__573)) __PYX_ERR(10, 83, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__573); - __Pyx_GIVEREF(__pyx_tuple__573); - __pyx_codeobj__225 = (PyObject*)__Pyx_PyCode_New(3, 2, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__573, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_docloader_pxi, __pyx_n_s_resolve_file, 83, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__225)) __PYX_ERR(10, 83, __pyx_L1_error) + __pyx_tuple__416 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_f, __pyx_n_s_context, __pyx_n_s_base_url, __pyx_n_s_close, __pyx_n_s_doc_ref); if (unlikely(!__pyx_tuple__416)) __PYX_ERR(11, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__416); + __Pyx_GIVEREF(__pyx_tuple__416); + __pyx_codeobj__417 = (PyObject*)__Pyx_PyCode_New(3, 2, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__416, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_docloader_pxi, __pyx_n_s_resolve_file, 83, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__417)) __PYX_ERR(11, 83, __pyx_L1_error) /* "src/lxml/docloader.pxi":120 * self._default_resolver = default_resolver @@ -246248,10 +228956,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""add(self, resolver) * */ - __pyx_tuple__574 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_resolver); if (unlikely(!__pyx_tuple__574)) __PYX_ERR(10, 120, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__574); - __Pyx_GIVEREF(__pyx_tuple__574); - __pyx_codeobj__226 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__574, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_docloader_pxi, __pyx_n_s_add, 120, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__226)) __PYX_ERR(10, 120, __pyx_L1_error) + __pyx_tuple__418 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_resolver); if (unlikely(!__pyx_tuple__418)) __PYX_ERR(11, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__418); + __Pyx_GIVEREF(__pyx_tuple__418); + __pyx_codeobj__419 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__418, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_docloader_pxi, __pyx_n_s_add, 120, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__419)) __PYX_ERR(11, 120, __pyx_L1_error) /* "src/lxml/docloader.pxi":133 * self._resolvers.add(resolver) @@ -246260,10 +228968,10 @@ static int __Pyx_InitCachedConstants(void) { * u"remove(self, resolver)" * self._resolvers.discard(resolver) */ - __pyx_tuple__575 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_resolver); if (unlikely(!__pyx_tuple__575)) __PYX_ERR(10, 133, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__575); - __Pyx_GIVEREF(__pyx_tuple__575); - __pyx_codeobj__227 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__575, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_docloader_pxi, __pyx_n_s_remove, 133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__227)) __PYX_ERR(10, 133, __pyx_L1_error) + __pyx_tuple__420 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_resolver); if (unlikely(!__pyx_tuple__420)) __PYX_ERR(11, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__420); + __Pyx_GIVEREF(__pyx_tuple__420); + __pyx_codeobj__421 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__420, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_docloader_pxi, __pyx_n_s_remove, 133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__421)) __PYX_ERR(11, 133, __pyx_L1_error) /* "src/lxml/docloader.pxi":143 * return registry @@ -246272,10 +228980,10 @@ static int __Pyx_InitCachedConstants(void) { * u"copy(self)" * return self._copy() */ - __pyx_tuple__576 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__576)) __PYX_ERR(10, 143, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__576); - __Pyx_GIVEREF(__pyx_tuple__576); - __pyx_codeobj__228 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__576, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_docloader_pxi, __pyx_n_s_copy, 143, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__228)) __PYX_ERR(10, 143, __pyx_L1_error) + __pyx_tuple__422 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__422)) __PYX_ERR(11, 143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__422); + __Pyx_GIVEREF(__pyx_tuple__422); + __pyx_codeobj__423 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__422, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_docloader_pxi, __pyx_n_s_copy, 143, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__423)) __PYX_ERR(11, 143, __pyx_L1_error) /* "src/lxml/docloader.pxi":147 * return self._copy() @@ -246284,10 +228992,10 @@ static int __Pyx_InitCachedConstants(void) { * u"resolve(self, system_url, public_id, context)" * for resolver in self._resolvers: */ - __pyx_tuple__577 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_system_url, __pyx_n_s_public_id, __pyx_n_s_context, __pyx_n_s_resolver, __pyx_n_s_result); if (unlikely(!__pyx_tuple__577)) __PYX_ERR(10, 147, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__577); - __Pyx_GIVEREF(__pyx_tuple__577); - __pyx_codeobj__229 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__577, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_docloader_pxi, __pyx_n_s_resolve, 147, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__229)) __PYX_ERR(10, 147, __pyx_L1_error) + __pyx_tuple__424 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_system_url, __pyx_n_s_public_id, __pyx_n_s_context, __pyx_n_s_resolver, __pyx_n_s_result); if (unlikely(!__pyx_tuple__424)) __PYX_ERR(11, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__424); + __Pyx_GIVEREF(__pyx_tuple__424); + __pyx_codeobj__425 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__424, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_docloader_pxi, __pyx_n_s_resolve, 147, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__425)) __PYX_ERR(11, 147, __pyx_L1_error) /* "src/lxml/parser.pxi":12 * For compatibility with ElementTree 1.3 and later. @@ -246296,13 +229004,13 @@ static int __Pyx_InitCachedConstants(void) { * super(_ParseError, self).__init__(message) * self.lineno, self.offset = (line, column - 1) */ - __pyx_tuple__578 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_code, __pyx_n_s_line_2, __pyx_n_s_column_2, __pyx_n_s_filename); if (unlikely(!__pyx_tuple__578)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__578); - __Pyx_GIVEREF(__pyx_tuple__578); - __pyx_codeobj__230 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__578, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_parser_pxi, __pyx_n_s_init, 12, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__230)) __PYX_ERR(2, 12, __pyx_L1_error) - __pyx_tuple__579 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__579)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__579); - __Pyx_GIVEREF(__pyx_tuple__579); + __pyx_tuple__426 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_code, __pyx_n_s_line_2, __pyx_n_s_column_2, __pyx_n_s_filename); if (unlikely(!__pyx_tuple__426)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__426); + __Pyx_GIVEREF(__pyx_tuple__426); + __pyx_codeobj__427 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__426, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_parser_pxi, __pyx_n_s_init, 12, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__427)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_tuple__428 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__428)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__428); + __Pyx_GIVEREF(__pyx_tuple__428); /* "src/lxml/parser.pxi":19 * @@ -246311,10 +229019,10 @@ static int __Pyx_InitCachedConstants(void) { * return self.lineno, self.offset + 1 * */ - __pyx_tuple__580 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__580)) __PYX_ERR(2, 19, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__580); - __Pyx_GIVEREF(__pyx_tuple__580); - __pyx_codeobj__231 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__580, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_parser_pxi, __pyx_n_s_position, 19, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__231)) __PYX_ERR(2, 19, __pyx_L1_error) + __pyx_tuple__429 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__429)) __PYX_ERR(2, 19, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__429); + __Pyx_GIVEREF(__pyx_tuple__429); + __pyx_codeobj__430 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__429, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_parser_pxi, __pyx_n_s_position, 19, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__430)) __PYX_ERR(2, 19, __pyx_L1_error) /* "src/lxml/parser.pxi":23 * @@ -246323,10 +229031,10 @@ static int __Pyx_InitCachedConstants(void) { * self.lineno, column = new_pos * self.offset = column - 1 */ - __pyx_tuple__581 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_new_pos, __pyx_n_s_column_2); if (unlikely(!__pyx_tuple__581)) __PYX_ERR(2, 23, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__581); - __Pyx_GIVEREF(__pyx_tuple__581); - __pyx_codeobj__232 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__581, __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__232)) __PYX_ERR(2, 23, __pyx_L1_error) + __pyx_tuple__431 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_new_pos, __pyx_n_s_column_2); if (unlikely(!__pyx_tuple__431)) __PYX_ERR(2, 23, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__431); + __Pyx_GIVEREF(__pyx_tuple__431); + __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 @@ -246335,10 +229043,10 @@ static int __Pyx_InitCachedConstants(void) { * u":deprecated: use ``parser.set_element_class_lookup(lookup)`` instead." * self.set_element_class_lookup(lookup) */ - __pyx_tuple__582 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_lookup); if (unlikely(!__pyx_tuple__582)) __PYX_ERR(2, 961, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__582); - __Pyx_GIVEREF(__pyx_tuple__582); - __pyx_codeobj__235 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__582, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_parser_pxi, __pyx_n_s_setElementClassLookup, 961, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__235)) __PYX_ERR(2, 961, __pyx_L1_error) + __pyx_tuple__433 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_lookup); if (unlikely(!__pyx_tuple__433)) __PYX_ERR(2, 961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__433); + __Pyx_GIVEREF(__pyx_tuple__433); + __pyx_codeobj__434 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__433, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_parser_pxi, __pyx_n_s_setElementClassLookup, 961, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__434)) __PYX_ERR(2, 961, __pyx_L1_error) /* "src/lxml/parser.pxi":965 * self.set_element_class_lookup(lookup) @@ -246347,10 +229055,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""set_element_class_lookup(self, lookup = None) * */ - __pyx_tuple__583 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_lookup); if (unlikely(!__pyx_tuple__583)) __PYX_ERR(2, 965, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__583); - __Pyx_GIVEREF(__pyx_tuple__583); - __pyx_codeobj__236 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__583, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_parser_pxi, __pyx_n_s_set_element_class_lookup, 965, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__236)) __PYX_ERR(2, 965, __pyx_L1_error) + __pyx_tuple__435 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_lookup); if (unlikely(!__pyx_tuple__435)) __PYX_ERR(2, 965, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__435); + __Pyx_GIVEREF(__pyx_tuple__435); + __pyx_codeobj__436 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__435, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_parser_pxi, __pyx_n_s_set_element_class_lookup, 965, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__436)) __PYX_ERR(2, 965, __pyx_L1_error) /* "src/lxml/parser.pxi":992 * return parser @@ -246359,10 +229067,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""copy(self) * */ - __pyx_tuple__584 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__584)) __PYX_ERR(2, 992, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__584); - __Pyx_GIVEREF(__pyx_tuple__584); - __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__584, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_parser_pxi, __pyx_n_s_copy, 992, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__237)) __PYX_ERR(2, 992, __pyx_L1_error) + __pyx_tuple__437 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__437)) __PYX_ERR(2, 992, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__437); + __Pyx_GIVEREF(__pyx_tuple__437); + __pyx_codeobj__438 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__437, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_parser_pxi, __pyx_n_s_copy, 992, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__438)) __PYX_ERR(2, 992, __pyx_L1_error) /* "src/lxml/parser.pxi":999 * return self._copy() @@ -246371,10 +229079,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""makeelement(self, _tag, attrib=None, nsmap=None, **_extra) * */ - __pyx_tuple__585 = 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__585)) __PYX_ERR(2, 999, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__585); - __Pyx_GIVEREF(__pyx_tuple__585); - __pyx_codeobj__238 = (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__585, __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__238)) __PYX_ERR(2, 999, __pyx_L1_error) + __pyx_tuple__439 = 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__439)) __PYX_ERR(2, 999, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__439); + __Pyx_GIVEREF(__pyx_tuple__439); + __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() @@ -246383,10 +229091,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""feed(self, data) * */ - __pyx_tuple__586 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__586)) __PYX_ERR(2, 1242, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__586); - __Pyx_GIVEREF(__pyx_tuple__586); - __pyx_codeobj__239 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__586, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_parser_pxi, __pyx_n_s_feed, 1242, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__239)) __PYX_ERR(2, 1242, __pyx_L1_error) + __pyx_tuple__441 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__441)) __PYX_ERR(2, 1242, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__441); + __Pyx_GIVEREF(__pyx_tuple__441); + __pyx_codeobj__442 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__441, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_parser_pxi, __pyx_n_s_feed, 1242, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__442)) __PYX_ERR(2, 1242, __pyx_L1_error) /* "src/lxml/parser.pxi":1368 * context.cleanup() @@ -246395,10 +229103,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""close(self) * */ - __pyx_tuple__587 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__587)) __PYX_ERR(2, 1368, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__587); - __Pyx_GIVEREF(__pyx_tuple__587); - __pyx_codeobj__240 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__587, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_parser_pxi, __pyx_n_s_close, 1368, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__240)) __PYX_ERR(2, 1368, __pyx_L1_error) + __pyx_tuple__443 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__443)) __PYX_ERR(2, 1368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__443); + __Pyx_GIVEREF(__pyx_tuple__443); + __pyx_codeobj__444 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__443, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_parser_pxi, __pyx_n_s_close, 1368, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__444)) __PYX_ERR(2, 1368, __pyx_L1_error) /* "src/lxml/parser.pxi":1550 * self._collectEvents(events, tag) @@ -246407,10 +229115,10 @@ static int __Pyx_InitCachedConstants(void) { * return (<_SaxParserContext?>self._getPushParserContext()).events_iterator * */ - __pyx_tuple__588 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__588)) __PYX_ERR(2, 1550, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__588); - __Pyx_GIVEREF(__pyx_tuple__588); - __pyx_codeobj__242 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__588, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_parser_pxi, __pyx_n_s_read_events, 1550, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__242)) __PYX_ERR(2, 1550, __pyx_L1_error) + __pyx_tuple__445 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__445)) __PYX_ERR(2, 1550, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__445); + __Pyx_GIVEREF(__pyx_tuple__445); + __pyx_codeobj__446 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__445, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_parser_pxi, __pyx_n_s_read_events, 1550, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__446)) __PYX_ERR(2, 1550, __pyx_L1_error) /* "src/lxml/parser.pxi":1602 * __GLOBAL_PARSER_CONTEXT.setDefaultParser(__DEFAULT_XML_PARSER) @@ -246419,13 +229127,13 @@ static int __Pyx_InitCachedConstants(void) { * u"""set_default_parser(parser=None) * */ - __pyx_tuple__589 = PyTuple_Pack(1, __pyx_n_s_parser); if (unlikely(!__pyx_tuple__589)) __PYX_ERR(2, 1602, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__589); - __Pyx_GIVEREF(__pyx_tuple__589); - __pyx_codeobj__243 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__589, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_parser_pxi, __pyx_n_s_set_default_parser, 1602, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__243)) __PYX_ERR(2, 1602, __pyx_L1_error) - __pyx_tuple__590 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__590)) __PYX_ERR(2, 1602, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__590); - __Pyx_GIVEREF(__pyx_tuple__590); + __pyx_tuple__447 = PyTuple_Pack(1, __pyx_n_s_parser); if (unlikely(!__pyx_tuple__447)) __PYX_ERR(2, 1602, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__447); + __Pyx_GIVEREF(__pyx_tuple__447); + __pyx_codeobj__448 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__447, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_parser_pxi, __pyx_n_s_set_default_parser, 1602, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__448)) __PYX_ERR(2, 1602, __pyx_L1_error) + __pyx_tuple__449 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__449)) __PYX_ERR(2, 1602, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__449); + __Pyx_GIVEREF(__pyx_tuple__449); /* "src/lxml/parser.pxi":1618 * __GLOBAL_PARSER_CONTEXT.setDefaultParser(parser) @@ -246434,7 +229142,7 @@ static int __Pyx_InitCachedConstants(void) { * u"get_default_parser()" * return __GLOBAL_PARSER_CONTEXT.getDefaultParser() */ - __pyx_codeobj__244 = (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_parser_pxi, __pyx_n_s_get_default_parser, 1618, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__244)) __PYX_ERR(2, 1618, __pyx_L1_error) + __pyx_codeobj__450 = (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_parser_pxi, __pyx_n_s_get_default_parser, 1618, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__450)) __PYX_ERR(2, 1618, __pyx_L1_error) /* "src/lxml/parser.pxi":1723 * self._collectEvents(events, tag) @@ -246443,10 +229151,10 @@ static int __Pyx_InitCachedConstants(void) { * return (<_SaxParserContext?>self._getPushParserContext()).events_iterator * */ - __pyx_tuple__591 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__591)) __PYX_ERR(2, 1723, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__591); - __Pyx_GIVEREF(__pyx_tuple__591); - __pyx_codeobj__246 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__591, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_parser_pxi, __pyx_n_s_read_events, 1723, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__246)) __PYX_ERR(2, 1723, __pyx_L1_error) + __pyx_tuple__451 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__451)) __PYX_ERR(2, 1723, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__451); + __Pyx_GIVEREF(__pyx_tuple__451); + __pyx_codeobj__452 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__451, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_parser_pxi, __pyx_n_s_read_events, 1723, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__452)) __PYX_ERR(2, 1723, __pyx_L1_error) /* "src/lxml/saxparser.pxi":470 * @@ -246455,9 +229163,9 @@ static int __Pyx_InitCachedConstants(void) { * * */ - __pyx_tuple__592 = PyTuple_Pack(2, __pyx_kp_s_end_ns, Py_None); if (unlikely(!__pyx_tuple__592)) __PYX_ERR(11, 470, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__592); - __Pyx_GIVEREF(__pyx_tuple__592); + __pyx_tuple__453 = PyTuple_Pack(2, __pyx_kp_s_end_ns, Py_None); if (unlikely(!__pyx_tuple__453)) __PYX_ERR(12, 470, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__453); + __Pyx_GIVEREF(__pyx_tuple__453); /* "src/lxml/saxparser.pxi":722 * # Python level event handlers @@ -246466,10 +229174,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""close(self) * */ - __pyx_tuple__593 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__593)) __PYX_ERR(11, 722, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__593); - __Pyx_GIVEREF(__pyx_tuple__593); - __pyx_codeobj__248 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__593, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_saxparser_pxi, __pyx_n_s_close, 722, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__248)) __PYX_ERR(11, 722, __pyx_L1_error) + __pyx_tuple__454 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__454)) __PYX_ERR(12, 722, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__454); + __Pyx_GIVEREF(__pyx_tuple__454); + __pyx_codeobj__455 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__454, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_saxparser_pxi, __pyx_n_s_close, 722, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__455)) __PYX_ERR(12, 722, __pyx_L1_error) /* "src/lxml/saxparser.pxi":732 * return self._last @@ -246478,10 +229186,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""data(self, data) * */ - __pyx_tuple__594 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__594)) __PYX_ERR(11, 732, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__594); - __Pyx_GIVEREF(__pyx_tuple__594); - __pyx_codeobj__249 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__594, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_saxparser_pxi, __pyx_n_s_data, 732, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__249)) __PYX_ERR(11, 732, __pyx_L1_error) + __pyx_tuple__456 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__456)) __PYX_ERR(12, 732, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__456); + __Pyx_GIVEREF(__pyx_tuple__456); + __pyx_codeobj__457 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__456, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_saxparser_pxi, __pyx_n_s_data, 732, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__457)) __PYX_ERR(12, 732, __pyx_L1_error) /* "src/lxml/saxparser.pxi":740 * self._handleSaxData(data) @@ -246490,10 +229198,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""start(self, tag, attrs, nsmap=None) * */ - __pyx_tuple__595 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_attrs, __pyx_n_s_nsmap); if (unlikely(!__pyx_tuple__595)) __PYX_ERR(11, 740, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__595); - __Pyx_GIVEREF(__pyx_tuple__595); - __pyx_codeobj__250 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__595, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_saxparser_pxi, __pyx_n_s_start, 740, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__250)) __PYX_ERR(11, 740, __pyx_L1_error) + __pyx_tuple__458 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_attrs, __pyx_n_s_nsmap); if (unlikely(!__pyx_tuple__458)) __PYX_ERR(12, 740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__458); + __Pyx_GIVEREF(__pyx_tuple__458); + __pyx_codeobj__459 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__458, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_saxparser_pxi, __pyx_n_s_start, 740, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__459)) __PYX_ERR(12, 740, __pyx_L1_error) /* "src/lxml/saxparser.pxi":749 * return self._handleSaxStart(tag, attrs, nsmap) @@ -246502,10 +229210,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""end(self, tag) * */ - __pyx_tuple__596 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_element); if (unlikely(!__pyx_tuple__596)) __PYX_ERR(11, 749, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__596); - __Pyx_GIVEREF(__pyx_tuple__596); - __pyx_codeobj__251 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__596, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_saxparser_pxi, __pyx_n_s_end, 749, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__251)) __PYX_ERR(11, 749, __pyx_L1_error) + __pyx_tuple__460 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_element); if (unlikely(!__pyx_tuple__460)) __PYX_ERR(12, 749, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__460); + __Pyx_GIVEREF(__pyx_tuple__460); + __pyx_codeobj__461 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__460, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_saxparser_pxi, __pyx_n_s_end, 749, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__461)) __PYX_ERR(12, 749, __pyx_L1_error) /* "src/lxml/saxparser.pxi":759 * return element @@ -246514,10 +229222,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""pi(self, target, data) * """ */ - __pyx_tuple__597 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_target, __pyx_n_s_data); if (unlikely(!__pyx_tuple__597)) __PYX_ERR(11, 759, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__597); - __Pyx_GIVEREF(__pyx_tuple__597); - __pyx_codeobj__253 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__597, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_saxparser_pxi, __pyx_n_s_pi, 759, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__253)) __PYX_ERR(11, 759, __pyx_L1_error) + __pyx_tuple__462 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_target, __pyx_n_s_data); if (unlikely(!__pyx_tuple__462)) __PYX_ERR(12, 759, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__462); + __Pyx_GIVEREF(__pyx_tuple__462); + __pyx_codeobj__463 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__462, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_saxparser_pxi, __pyx_n_s_pi, 759, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__463)) __PYX_ERR(12, 759, __pyx_L1_error) /* "src/lxml/saxparser.pxi":764 * return self._handleSaxPi(target, data) @@ -246526,10 +229234,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""comment(self, comment) * """ */ - __pyx_tuple__598 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_comment); if (unlikely(!__pyx_tuple__598)) __PYX_ERR(11, 764, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__598); - __Pyx_GIVEREF(__pyx_tuple__598); - __pyx_codeobj__254 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__598, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_saxparser_pxi, __pyx_n_s_comment, 764, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__254)) __PYX_ERR(11, 764, __pyx_L1_error) + __pyx_tuple__464 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_comment); if (unlikely(!__pyx_tuple__464)) __PYX_ERR(12, 764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__464); + __Pyx_GIVEREF(__pyx_tuple__464); + __pyx_codeobj__465 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__464, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_saxparser_pxi, __pyx_n_s_comment, 764, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__465)) __PYX_ERR(12, 764, __pyx_L1_error) /* "src/lxml/parsertarget.pxi":14 * # to push the Python level parser result through the parser @@ -246538,10 +229246,10 @@ static int __Pyx_InitCachedConstants(void) { * self.result = result * */ - __pyx_tuple__599 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_result); if (unlikely(!__pyx_tuple__599)) __PYX_ERR(12, 14, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__599); - __Pyx_GIVEREF(__pyx_tuple__599); - __pyx_codeobj__255 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__599, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_parsertarget_pxi, __pyx_n_s_init, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__255)) __PYX_ERR(12, 14, __pyx_L1_error) + __pyx_tuple__466 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_result); if (unlikely(!__pyx_tuple__466)) __PYX_ERR(13, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__466); + __Pyx_GIVEREF(__pyx_tuple__466); + __pyx_codeobj__467 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__466, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_parsertarget_pxi, __pyx_n_s_init, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__467)) __PYX_ERR(13, 14, __pyx_L1_error) /* "src/lxml/serializer.pxi":914 * self.method = OUTPUT_METHOD_XML @@ -246550,10 +229258,10 @@ static int __Pyx_InitCachedConstants(void) { * assert self.output_file is not None * self.writer = _IncrementalFileWriter( */ - __pyx_tuple__600 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__600)) __PYX_ERR(8, 914, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__600); - __Pyx_GIVEREF(__pyx_tuple__600); - __pyx_codeobj__258 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__600, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_enter, 914, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__258)) __PYX_ERR(8, 914, __pyx_L1_error) + __pyx_tuple__468 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__468)) __PYX_ERR(8, 914, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__468); + __Pyx_GIVEREF(__pyx_tuple__468); + __pyx_codeobj__469 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__468, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_enter, 914, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__469)) __PYX_ERR(8, 914, __pyx_L1_error) /* "src/lxml/serializer.pxi":921 * return self.writer @@ -246562,10 +229270,10 @@ static int __Pyx_InitCachedConstants(void) { * if self.writer is not None: * old_writer, self.writer = self.writer, None */ - __pyx_tuple__601 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_exc_type, __pyx_n_s_exc_val, __pyx_n_s_exc_tb, __pyx_n_s_old_writer, __pyx_n_s_raise_on_error); if (unlikely(!__pyx_tuple__601)) __PYX_ERR(8, 921, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__601); - __Pyx_GIVEREF(__pyx_tuple__601); - __pyx_codeobj__259 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__601, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_exit, 921, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__259)) __PYX_ERR(8, 921, __pyx_L1_error) + __pyx_tuple__470 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_exc_type, __pyx_n_s_exc_val, __pyx_n_s_exc_tb, __pyx_n_s_old_writer, __pyx_n_s_raise_on_error); if (unlikely(!__pyx_tuple__470)) __PYX_ERR(8, 921, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__470); + __Pyx_GIVEREF(__pyx_tuple__470); + __pyx_codeobj__471 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__470, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_exit, 921, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__471)) __PYX_ERR(8, 921, __pyx_L1_error) /* "src/lxml/serializer.pxi":929 * self.output_file = None @@ -246574,10 +229282,10 @@ static int __Pyx_InitCachedConstants(void) { * assert self.output_file is not None * if isinstance(self.output_file, basestring): */ - __pyx_tuple__602 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__602)) __PYX_ERR(8, 929, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__602); - __Pyx_GIVEREF(__pyx_tuple__602); - __pyx_codeobj__260 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__602, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_aenter, 929, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__260)) __PYX_ERR(8, 929, __pyx_L1_error) + __pyx_tuple__472 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__472)) __PYX_ERR(8, 929, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__472); + __Pyx_GIVEREF(__pyx_tuple__472); + __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__472, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_aenter, 929, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(8, 929, __pyx_L1_error) /* "src/lxml/serializer.pxi":940 * return self.async_writer @@ -246586,10 +229294,10 @@ static int __Pyx_InitCachedConstants(void) { * if self.async_writer is not None: * old_writer, self.async_writer = self.async_writer, None */ - __pyx_tuple__603 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_exc_type, __pyx_n_s_exc_val, __pyx_n_s_exc_tb, __pyx_n_s_old_writer, __pyx_n_s_raise_on_error); if (unlikely(!__pyx_tuple__603)) __PYX_ERR(8, 940, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__603); - __Pyx_GIVEREF(__pyx_tuple__603); - __pyx_codeobj__263 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__603, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_aexit, 940, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__263)) __PYX_ERR(8, 940, __pyx_L1_error) + __pyx_tuple__473 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_exc_type, __pyx_n_s_exc_val, __pyx_n_s_exc_tb, __pyx_n_s_old_writer, __pyx_n_s_raise_on_error); if (unlikely(!__pyx_tuple__473)) __PYX_ERR(8, 940, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__473); + __Pyx_GIVEREF(__pyx_tuple__473); + __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__473, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_aexit, 940, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(8, 940, __pyx_L1_error) /* "src/lxml/serializer.pxi":997 * tree.xmlOutputBufferClose(self._c_out) @@ -246598,10 +229306,10 @@ static int __Pyx_InitCachedConstants(void) { * """write_declaration(self, version=None, standalone=None, doctype=None) * */ - __pyx_tuple__604 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_version, __pyx_n_s_standalone, __pyx_n_s_doctype, __pyx_n_s_c_version, __pyx_n_s_c_standalone); if (unlikely(!__pyx_tuple__604)) __PYX_ERR(8, 997, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__604); - __Pyx_GIVEREF(__pyx_tuple__604); - __pyx_codeobj__264 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__604, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_write_declaration, 997, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__264)) __PYX_ERR(8, 997, __pyx_L1_error) + __pyx_tuple__474 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_version, __pyx_n_s_standalone, __pyx_n_s_doctype, __pyx_n_s_c_version, __pyx_n_s_c_standalone); if (unlikely(!__pyx_tuple__474)) __PYX_ERR(8, 997, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__474); + __Pyx_GIVEREF(__pyx_tuple__474); + __pyx_codeobj__475 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__474, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_write_declaration, 997, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__475)) __PYX_ERR(8, 997, __pyx_L1_error) /* "src/lxml/serializer.pxi":1026 * self._handle_error(self._c_out.error) @@ -246610,10 +229318,10 @@ static int __Pyx_InitCachedConstants(void) { * """write_doctype(self, doctype) * */ - __pyx_tuple__605 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_doctype); if (unlikely(!__pyx_tuple__605)) __PYX_ERR(8, 1026, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__605); - __Pyx_GIVEREF(__pyx_tuple__605); - __pyx_codeobj__267 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__605, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_write_doctype, 1026, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__267)) __PYX_ERR(8, 1026, __pyx_L1_error) + __pyx_tuple__476 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_doctype); if (unlikely(!__pyx_tuple__476)) __PYX_ERR(8, 1026, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__476); + __Pyx_GIVEREF(__pyx_tuple__476); + __pyx_codeobj__477 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__476, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_write_doctype, 1026, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__477)) __PYX_ERR(8, 1026, __pyx_L1_error) /* "src/lxml/serializer.pxi":1043 * self._handle_error(self._c_out.error) @@ -246622,10 +229330,10 @@ static int __Pyx_InitCachedConstants(void) { * """method(self, method) * */ - __pyx_tuple__606 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_method, __pyx_n_s_c_method); if (unlikely(!__pyx_tuple__606)) __PYX_ERR(8, 1043, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__606); - __Pyx_GIVEREF(__pyx_tuple__606); - __pyx_codeobj__269 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 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_serializer_pxi, __pyx_n_s_method, 1043, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__269)) __PYX_ERR(8, 1043, __pyx_L1_error) + __pyx_tuple__478 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_method, __pyx_n_s_c_method); if (unlikely(!__pyx_tuple__478)) __PYX_ERR(8, 1043, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__478); + __Pyx_GIVEREF(__pyx_tuple__478); + __pyx_codeobj__479 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__478, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_method, 1043, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__479)) __PYX_ERR(8, 1043, __pyx_L1_error) /* "src/lxml/serializer.pxi":1053 * return _MethodChanger(self, c_method) @@ -246634,10 +229342,10 @@ static int __Pyx_InitCachedConstants(void) { * """element(self, tag, attrib=None, nsmap=None, method, **_extra) * */ - __pyx_tuple__607 = PyTuple_Pack(13, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_attrib, __pyx_n_s_nsmap, __pyx_n_s_method, __pyx_n_s_extra, __pyx_n_s_attributes, __pyx_n_s_name_2, __pyx_n_s_value, __pyx_n_s_ns, __pyx_n_s_reversed_nsmap, __pyx_n_s_prefix, __pyx_n_s_c_method); if (unlikely(!__pyx_tuple__607)) __PYX_ERR(8, 1053, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__607); - __Pyx_GIVEREF(__pyx_tuple__607); - __pyx_codeobj__270 = (PyObject*)__Pyx_PyCode_New(5, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__607, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_element, 1053, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__270)) __PYX_ERR(8, 1053, __pyx_L1_error) + __pyx_tuple__480 = PyTuple_Pack(13, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_attrib, __pyx_n_s_nsmap, __pyx_n_s_method, __pyx_n_s_extra, __pyx_n_s_attributes, __pyx_n_s_name_2, __pyx_n_s_value, __pyx_n_s_ns, __pyx_n_s_reversed_nsmap, __pyx_n_s_prefix, __pyx_n_s_c_method); if (unlikely(!__pyx_tuple__480)) __PYX_ERR(8, 1053, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__480); + __Pyx_GIVEREF(__pyx_tuple__480); + __pyx_codeobj__481 = (PyObject*)__Pyx_PyCode_New(5, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__480, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_element, 1053, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__481)) __PYX_ERR(8, 1053, __pyx_L1_error) /* "src/lxml/serializer.pxi":1190 * return flat_namespaces_map, new_namespaces @@ -246646,10 +229354,10 @@ static int __Pyx_InitCachedConstants(void) { * """write(self, *args, with_tail=True, pretty_print=False, method=None) * */ - __pyx_tuple__608 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_with_tail, __pyx_n_s_pretty_print, __pyx_n_s_method, __pyx_n_s_args, __pyx_n_s_c_method, __pyx_n_s_content, __pyx_n_s_bstring, __pyx_n_s_ns, __pyx_n_s_name_2, __pyx_n_s__214); if (unlikely(!__pyx_tuple__608)) __PYX_ERR(8, 1190, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__608); - __Pyx_GIVEREF(__pyx_tuple__608); - __pyx_codeobj__277 = (PyObject*)__Pyx_PyCode_New(1, 3, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__608, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_write, 1190, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__277)) __PYX_ERR(8, 1190, __pyx_L1_error) + __pyx_tuple__482 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_with_tail, __pyx_n_s_pretty_print, __pyx_n_s_method, __pyx_n_s_args, __pyx_n_s_c_method, __pyx_n_s_content, __pyx_n_s_bstring, __pyx_n_s_ns, __pyx_n_s_name_2, __pyx_n_s__51); if (unlikely(!__pyx_tuple__482)) __PYX_ERR(8, 1190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__482); + __Pyx_GIVEREF(__pyx_tuple__482); + __pyx_codeobj__483 = (PyObject*)__Pyx_PyCode_New(1, 3, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__482, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_write, 1190, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__483)) __PYX_ERR(8, 1190, __pyx_L1_error) /* "src/lxml/serializer.pxi":1237 * self._handle_error(self._c_out.error) @@ -246658,10 +229366,10 @@ static int __Pyx_InitCachedConstants(void) { * """flush(self) * */ - __pyx_tuple__609 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__609)) __PYX_ERR(8, 1237, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__609); - __Pyx_GIVEREF(__pyx_tuple__609); - __pyx_codeobj__280 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__609, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_flush, 1237, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__280)) __PYX_ERR(8, 1237, __pyx_L1_error) + __pyx_tuple__484 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__484)) __PYX_ERR(8, 1237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__484); + __Pyx_GIVEREF(__pyx_tuple__484); + __pyx_codeobj__485 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__484, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_flush, 1237, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__485)) __PYX_ERR(8, 1237, __pyx_L1_error) /* "src/lxml/serializer.pxi":1284 * return data @@ -246670,10 +229378,10 @@ static int __Pyx_InitCachedConstants(void) { * self._data.append(data) * */ - __pyx_tuple__610 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__610)) __PYX_ERR(8, 1284, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__610); - __Pyx_GIVEREF(__pyx_tuple__610); - __pyx_codeobj__283 = (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_serializer_pxi, __pyx_n_s_write, 1284, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__283)) __PYX_ERR(8, 1284, __pyx_L1_error) + __pyx_tuple__486 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__486)) __PYX_ERR(8, 1284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__486); + __Pyx_GIVEREF(__pyx_tuple__486); + __pyx_codeobj__487 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__486, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_write, 1284, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__487)) __PYX_ERR(8, 1284, __pyx_L1_error) /* "src/lxml/serializer.pxi":1287 * self._data.append(data) @@ -246682,10 +229390,10 @@ static int __Pyx_InitCachedConstants(void) { * pass * */ - __pyx_tuple__611 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__611)) __PYX_ERR(8, 1287, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__611); - __Pyx_GIVEREF(__pyx_tuple__611); - __pyx_codeobj__284 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__611, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_close, 1287, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__284)) __PYX_ERR(8, 1287, __pyx_L1_error) + __pyx_tuple__488 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__488)) __PYX_ERR(8, 1287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__488); + __Pyx_GIVEREF(__pyx_tuple__488); + __pyx_codeobj__489 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__488, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_close, 1287, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__489)) __PYX_ERR(8, 1287, __pyx_L1_error) /* "src/lxml/serializer.pxi":1316 * return None @@ -246694,10 +229402,10 @@ static int __Pyx_InitCachedConstants(void) { * self._writer.flush() * data = self._buffer.collect() */ - __pyx_tuple__612 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__612)) __PYX_ERR(8, 1316, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__612); - __Pyx_GIVEREF(__pyx_tuple__612); - __pyx_codeobj__285 = (PyObject*)__Pyx_PyCode_New(1, 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_serializer_pxi, __pyx_n_s_flush, 1316, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__285)) __PYX_ERR(8, 1316, __pyx_L1_error) + __pyx_tuple__490 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__490)) __PYX_ERR(8, 1316, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__490); + __Pyx_GIVEREF(__pyx_tuple__490); + __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__490, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_flush, 1316, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(8, 1316, __pyx_L1_error) /* "src/lxml/serializer.pxi":1322 * await self._async_outfile.write(data) @@ -246706,10 +229414,10 @@ static int __Pyx_InitCachedConstants(void) { * self._writer.write_declaration(version, standalone, doctype) * data = self._flush() */ - __pyx_tuple__613 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_version, __pyx_n_s_standalone, __pyx_n_s_doctype, __pyx_n_s_data); if (unlikely(!__pyx_tuple__613)) __PYX_ERR(8, 1322, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__613); - __Pyx_GIVEREF(__pyx_tuple__613); - __pyx_codeobj__286 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__613, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_write_declaration, 1322, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__286)) __PYX_ERR(8, 1322, __pyx_L1_error) + __pyx_tuple__491 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_version, __pyx_n_s_standalone, __pyx_n_s_doctype, __pyx_n_s_data); if (unlikely(!__pyx_tuple__491)) __PYX_ERR(8, 1322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__491); + __Pyx_GIVEREF(__pyx_tuple__491); + __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__491, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_write_declaration, 1322, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(8, 1322, __pyx_L1_error) /* "src/lxml/serializer.pxi":1328 * await self._async_outfile.write(data) @@ -246718,10 +229426,10 @@ static int __Pyx_InitCachedConstants(void) { * self._writer.write_doctype(doctype) * data = self._flush() */ - __pyx_tuple__614 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_doctype, __pyx_n_s_data); if (unlikely(!__pyx_tuple__614)) __PYX_ERR(8, 1328, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__614); - __Pyx_GIVEREF(__pyx_tuple__614); - __pyx_codeobj__287 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 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_serializer_pxi, __pyx_n_s_write_doctype, 1328, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__287)) __PYX_ERR(8, 1328, __pyx_L1_error) + __pyx_tuple__492 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_doctype, __pyx_n_s_data); if (unlikely(!__pyx_tuple__492)) __PYX_ERR(8, 1328, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__492); + __Pyx_GIVEREF(__pyx_tuple__492); + __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__492, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_write_doctype, 1328, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(8, 1328, __pyx_L1_error) /* "src/lxml/serializer.pxi":1334 * await self._async_outfile.write(data) @@ -246730,10 +229438,10 @@ static int __Pyx_InitCachedConstants(void) { * self._writer.write(*args, with_tail=with_tail, pretty_print=pretty_print, method=method) * data = self._flush() */ - __pyx_tuple__615 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_with_tail, __pyx_n_s_pretty_print, __pyx_n_s_method, __pyx_n_s_args, __pyx_n_s_data); if (unlikely(!__pyx_tuple__615)) __PYX_ERR(8, 1334, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__615); - __Pyx_GIVEREF(__pyx_tuple__615); - __pyx_codeobj__288 = (PyObject*)__Pyx_PyCode_New(1, 3, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__615, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_write, 1334, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__288)) __PYX_ERR(8, 1334, __pyx_L1_error) + __pyx_tuple__493 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_with_tail, __pyx_n_s_pretty_print, __pyx_n_s_method, __pyx_n_s_args, __pyx_n_s_data); if (unlikely(!__pyx_tuple__493)) __PYX_ERR(8, 1334, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__493); + __Pyx_GIVEREF(__pyx_tuple__493); + __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(1, 3, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__493, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_write, 1334, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(8, 1334, __pyx_L1_error) /* "src/lxml/serializer.pxi":1340 * await self._async_outfile.write(data) @@ -246742,10 +229450,10 @@ static int __Pyx_InitCachedConstants(void) { * return self._writer.method(method) * */ - __pyx_tuple__616 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_method); if (unlikely(!__pyx_tuple__616)) __PYX_ERR(8, 1340, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__616); - __Pyx_GIVEREF(__pyx_tuple__616); - __pyx_codeobj__289 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_serializer_pxi, __pyx_n_s_method, 1340, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__289)) __PYX_ERR(8, 1340, __pyx_L1_error) + __pyx_tuple__494 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_method); if (unlikely(!__pyx_tuple__494)) __PYX_ERR(8, 1340, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__494); + __Pyx_GIVEREF(__pyx_tuple__494); + __pyx_codeobj__495 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__494, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_method, 1340, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__495)) __PYX_ERR(8, 1340, __pyx_L1_error) /* "src/lxml/serializer.pxi":1343 * return self._writer.method(method) @@ -246754,10 +229462,10 @@ static int __Pyx_InitCachedConstants(void) { * element_writer = self._writer.element(tag, attrib, nsmap, method, **_extra) * return _AsyncFileWriterElement(element_writer, self) */ - __pyx_tuple__617 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_attrib, __pyx_n_s_nsmap, __pyx_n_s_method, __pyx_n_s_extra, __pyx_n_s_element_writer); if (unlikely(!__pyx_tuple__617)) __PYX_ERR(8, 1343, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__617); - __Pyx_GIVEREF(__pyx_tuple__617); - __pyx_codeobj__290 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__617, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_element, 1343, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__290)) __PYX_ERR(8, 1343, __pyx_L1_error) + __pyx_tuple__496 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_attrib, __pyx_n_s_nsmap, __pyx_n_s_method, __pyx_n_s_extra, __pyx_n_s_element_writer); if (unlikely(!__pyx_tuple__496)) __PYX_ERR(8, 1343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__496); + __Pyx_GIVEREF(__pyx_tuple__496); + __pyx_codeobj__497 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__496, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_element, 1343, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__497)) __PYX_ERR(8, 1343, __pyx_L1_error) /* "src/lxml/serializer.pxi":1347 * return _AsyncFileWriterElement(element_writer, self) @@ -246766,10 +229474,10 @@ static int __Pyx_InitCachedConstants(void) { * self._writer._close(raise_on_error) * data = self._buffer.collect() */ - __pyx_tuple__618 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_raise_on_error, __pyx_n_s_raise_on_error, __pyx_n_s_data); if (unlikely(!__pyx_tuple__618)) __PYX_ERR(8, 1347, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__618); - __Pyx_GIVEREF(__pyx_tuple__618); - __pyx_codeobj__291 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__618, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_close_2, 1347, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__291)) __PYX_ERR(8, 1347, __pyx_L1_error) + __pyx_tuple__498 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_raise_on_error, __pyx_n_s_raise_on_error, __pyx_n_s_data); if (unlikely(!__pyx_tuple__498)) __PYX_ERR(8, 1347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__498); + __Pyx_GIVEREF(__pyx_tuple__498); + __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__498, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_close_2, 1347, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(8, 1347, __pyx_L1_error) /* "src/lxml/serializer.pxi":1367 * self._writer = writer @@ -246778,10 +229486,10 @@ static int __Pyx_InitCachedConstants(void) { * self._element_writer.__enter__() * data = self._writer._flush() */ - __pyx_tuple__619 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__619)) __PYX_ERR(8, 1367, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__619); - __Pyx_GIVEREF(__pyx_tuple__619); - __pyx_codeobj__292 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 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_serializer_pxi, __pyx_n_s_aenter, 1367, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__292)) __PYX_ERR(8, 1367, __pyx_L1_error) + __pyx_tuple__499 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__499)) __PYX_ERR(8, 1367, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__499); + __Pyx_GIVEREF(__pyx_tuple__499); + __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__499, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_aenter, 1367, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(8, 1367, __pyx_L1_error) /* "src/lxml/serializer.pxi":1373 * await self._writer._async_outfile.write(data) @@ -246790,10 +229498,10 @@ static int __Pyx_InitCachedConstants(void) { * self._element_writer.__exit__(*args) * data = self._writer._flush() */ - __pyx_tuple__620 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_data); if (unlikely(!__pyx_tuple__620)) __PYX_ERR(8, 1373, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__620); - __Pyx_GIVEREF(__pyx_tuple__620); - __pyx_codeobj__293 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__620, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_aexit, 1373, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__293)) __PYX_ERR(8, 1373, __pyx_L1_error) + __pyx_tuple__500 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_data); if (unlikely(!__pyx_tuple__500)) __PYX_ERR(8, 1373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__500); + __Pyx_GIVEREF(__pyx_tuple__500); + __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__500, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_aexit, 1373, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(8, 1373, __pyx_L1_error) /* "src/lxml/serializer.pxi":1395 * self._old_method = writer._method @@ -246802,10 +229510,10 @@ static int __Pyx_InitCachedConstants(void) { * self._writer._method = self._new_method * self._writer._write_start_element(self._element) */ - __pyx_tuple__621 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__621)) __PYX_ERR(8, 1395, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__621); - __Pyx_GIVEREF(__pyx_tuple__621); - __pyx_codeobj__294 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__621, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_enter, 1395, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__294)) __PYX_ERR(8, 1395, __pyx_L1_error) + __pyx_tuple__501 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__501)) __PYX_ERR(8, 1395, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__501); + __Pyx_GIVEREF(__pyx_tuple__501); + __pyx_codeobj__502 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__501, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_enter, 1395, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__502)) __PYX_ERR(8, 1395, __pyx_L1_error) /* "src/lxml/serializer.pxi":1399 * self._writer._write_start_element(self._element) @@ -246814,10 +229522,10 @@ static int __Pyx_InitCachedConstants(void) { * self._writer._write_end_element(self._element) * self._writer._method = self._old_method */ - __pyx_tuple__622 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_exc_type, __pyx_n_s_exc_val, __pyx_n_s_exc_tb); if (unlikely(!__pyx_tuple__622)) __PYX_ERR(8, 1399, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__622); - __Pyx_GIVEREF(__pyx_tuple__622); - __pyx_codeobj__295 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 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_serializer_pxi, __pyx_n_s_exit, 1399, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__295)) __PYX_ERR(8, 1399, __pyx_L1_error) + __pyx_tuple__503 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_exc_type, __pyx_n_s_exc_val, __pyx_n_s_exc_tb); if (unlikely(!__pyx_tuple__503)) __PYX_ERR(8, 1399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__503); + __Pyx_GIVEREF(__pyx_tuple__503); + __pyx_codeobj__504 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__503, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_exit, 1399, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__504)) __PYX_ERR(8, 1399, __pyx_L1_error) /* "src/lxml/serializer.pxi":1421 * self._exited = False @@ -246826,10 +229534,10 @@ static int __Pyx_InitCachedConstants(void) { * if self._entered: * raise LxmlSyntaxError("Inconsistent enter action in context manager") */ - __pyx_tuple__623 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__623)) __PYX_ERR(8, 1421, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__623); - __Pyx_GIVEREF(__pyx_tuple__623); - __pyx_codeobj__296 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__623, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_enter, 1421, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__296)) __PYX_ERR(8, 1421, __pyx_L1_error) + __pyx_tuple__505 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__505)) __PYX_ERR(8, 1421, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__505); + __Pyx_GIVEREF(__pyx_tuple__505); + __pyx_codeobj__506 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__505, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_enter, 1421, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__506)) __PYX_ERR(8, 1421, __pyx_L1_error) /* "src/lxml/serializer.pxi":1427 * self._entered = True @@ -246838,10 +229546,10 @@ static int __Pyx_InitCachedConstants(void) { * if self._exited: * raise LxmlSyntaxError("Inconsistent exit action in context manager") */ - __pyx_tuple__624 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_exc_type, __pyx_n_s_exc_val, __pyx_n_s_exc_tb); if (unlikely(!__pyx_tuple__624)) __PYX_ERR(8, 1427, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__624); - __Pyx_GIVEREF(__pyx_tuple__624); - __pyx_codeobj__298 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__624, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_exit, 1427, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__298)) __PYX_ERR(8, 1427, __pyx_L1_error) + __pyx_tuple__507 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_exc_type, __pyx_n_s_exc_val, __pyx_n_s_exc_tb); if (unlikely(!__pyx_tuple__507)) __PYX_ERR(8, 1427, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__507); + __Pyx_GIVEREF(__pyx_tuple__507); + __pyx_codeobj__508 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__507, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_exit, 1427, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__508)) __PYX_ERR(8, 1427, __pyx_L1_error) /* "src/lxml/serializer.pxi":1435 * self._exited = True @@ -246850,10 +229558,10 @@ static int __Pyx_InitCachedConstants(void) { * # for your async convenience * return self.__enter__() */ - __pyx_tuple__625 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__625)) __PYX_ERR(8, 1435, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__625); - __Pyx_GIVEREF(__pyx_tuple__625); - __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__625, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_aenter, 1435, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__301)) __PYX_ERR(8, 1435, __pyx_L1_error) + __pyx_tuple__509 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__509)) __PYX_ERR(8, 1435, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__509); + __Pyx_GIVEREF(__pyx_tuple__509); + __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__509, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_aenter, 1435, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(8, 1435, __pyx_L1_error) /* "src/lxml/serializer.pxi":1439 * return self.__enter__() @@ -246862,10 +229570,10 @@ static int __Pyx_InitCachedConstants(void) { * # for your async convenience * return self.__exit__(*args) */ - __pyx_tuple__626 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_args); if (unlikely(!__pyx_tuple__626)) __PYX_ERR(8, 1439, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__626); - __Pyx_GIVEREF(__pyx_tuple__626); - __pyx_codeobj__302 = (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__626, __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__302)) __PYX_ERR(8, 1439, __pyx_L1_error) + __pyx_tuple__510 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_args); if (unlikely(!__pyx_tuple__510)) __PYX_ERR(8, 1439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__510); + __Pyx_GIVEREF(__pyx_tuple__510); + __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 @@ -246874,10 +229582,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""set_element_class_lookup(self, lookup = None) * */ - __pyx_tuple__627 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_lookup); if (unlikely(!__pyx_tuple__627)) __PYX_ERR(13, 148, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__627); - __Pyx_GIVEREF(__pyx_tuple__627); - __pyx_codeobj__304 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__627, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_iterparse_pxi, __pyx_n_s_set_element_class_lookup, 148, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__304)) __PYX_ERR(13, 148, __pyx_L1_error) + __pyx_tuple__511 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_lookup); if (unlikely(!__pyx_tuple__511)) __PYX_ERR(14, 148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__511); + __Pyx_GIVEREF(__pyx_tuple__511); + __pyx_codeobj__512 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__511, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_iterparse_pxi, __pyx_n_s_set_element_class_lookup, 148, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__512)) __PYX_ERR(14, 148, __pyx_L1_error) /* "src/lxml/iterparse.pxi":157 * self._parser.set_element_class_lookup(lookup) @@ -246886,10 +229594,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""makeelement(self, _tag, attrib=None, nsmap=None, **_extra) * */ - __pyx_tuple__628 = 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__628)) __PYX_ERR(13, 157, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__628); - __Pyx_GIVEREF(__pyx_tuple__628); - __pyx_codeobj__305 = (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__628, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_iterparse_pxi, __pyx_n_s_makeelement, 157, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__305)) __PYX_ERR(13, 157, __pyx_L1_error) + __pyx_tuple__513 = 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__513)) __PYX_ERR(14, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__513); + __Pyx_GIVEREF(__pyx_tuple__513); + __pyx_codeobj__514 = (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__513, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_iterparse_pxi, __pyx_n_s_makeelement, 157, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__514)) __PYX_ERR(14, 157, __pyx_L1_error) /* "src/lxml/iterparse.pxi":340 * return self._pop_event(0) @@ -246898,10 +229606,10 @@ static int __Pyx_InitCachedConstants(void) { * """Prevent descending into the current subtree. * Instead, the next returned event will be the 'end' event of the current element */ - __pyx_tuple__629 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__629)) __PYX_ERR(13, 340, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__629); - __Pyx_GIVEREF(__pyx_tuple__629); - __pyx_codeobj__310 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__629, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_iterparse_pxi, __pyx_n_s_skip_subtree, 340, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__310)) __PYX_ERR(13, 340, __pyx_L1_error) + __pyx_tuple__515 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__515)) __PYX_ERR(14, 340, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__515); + __Pyx_GIVEREF(__pyx_tuple__515); + __pyx_codeobj__516 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__515, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_iterparse_pxi, __pyx_n_s_skip_subtree, 340, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__516)) __PYX_ERR(14, 340, __pyx_L1_error) /* "src/lxml/xmlid.pxi":3 * cdef object _find_id_attributes @@ -246910,43 +229618,43 @@ static int __Pyx_InitCachedConstants(void) { * u"""XMLID(text, parser=None, base_url=None) * */ - __pyx_tuple__630 = PyTuple_Pack(6, __pyx_n_s_text, __pyx_n_s_parser, __pyx_n_s_base_url, __pyx_n_s_dic, __pyx_n_s_root, __pyx_n_s_elem); if (unlikely(!__pyx_tuple__630)) __PYX_ERR(14, 3, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__630); - __Pyx_GIVEREF(__pyx_tuple__630); - __pyx_codeobj__312 = (PyObject*)__Pyx_PyCode_New(2, 1, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__630, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlid_pxi, __pyx_n_s_XMLID, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__312)) __PYX_ERR(14, 3, __pyx_L1_error) - __pyx_tuple__631 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__631)) __PYX_ERR(14, 3, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__631); - __Pyx_GIVEREF(__pyx_tuple__631); + __pyx_tuple__517 = PyTuple_Pack(6, __pyx_n_s_text, __pyx_n_s_parser, __pyx_n_s_base_url, __pyx_n_s_dic, __pyx_n_s_root, __pyx_n_s_elem); if (unlikely(!__pyx_tuple__517)) __PYX_ERR(15, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__517); + __Pyx_GIVEREF(__pyx_tuple__517); + __pyx_codeobj__518 = (PyObject*)__Pyx_PyCode_New(2, 1, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__517, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlid_pxi, __pyx_n_s_XMLID, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__518)) __PYX_ERR(15, 3, __pyx_L1_error) + __pyx_tuple__519 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__519)) __PYX_ERR(15, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__519); + __Pyx_GIVEREF(__pyx_tuple__519); /* "src/lxml/xmlid.pxi":24 - * return (root, dic) + * return root, dic * * def XMLDTDID(text, parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""XMLDTDID(text, parser=None, base_url=None) * */ - __pyx_tuple__632 = PyTuple_Pack(4, __pyx_n_s_text, __pyx_n_s_parser, __pyx_n_s_base_url, __pyx_n_s_root); if (unlikely(!__pyx_tuple__632)) __PYX_ERR(14, 24, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__632); - __Pyx_GIVEREF(__pyx_tuple__632); - __pyx_codeobj__315 = (PyObject*)__Pyx_PyCode_New(2, 1, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__632, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlid_pxi, __pyx_n_s_XMLDTDID, 24, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__315)) __PYX_ERR(14, 24, __pyx_L1_error) - __pyx_tuple__633 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__633)) __PYX_ERR(14, 24, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__633); - __Pyx_GIVEREF(__pyx_tuple__633); + __pyx_tuple__520 = PyTuple_Pack(4, __pyx_n_s_text, __pyx_n_s_parser, __pyx_n_s_base_url, __pyx_n_s_root); if (unlikely(!__pyx_tuple__520)) __PYX_ERR(15, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__520); + __Pyx_GIVEREF(__pyx_tuple__520); + __pyx_codeobj__521 = (PyObject*)__Pyx_PyCode_New(2, 1, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__520, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlid_pxi, __pyx_n_s_XMLDTDID, 24, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__521)) __PYX_ERR(15, 24, __pyx_L1_error) + __pyx_tuple__522 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__522)) __PYX_ERR(15, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__522); + __Pyx_GIVEREF(__pyx_tuple__522); /* "src/lxml/xmlid.pxi":44 - * return (root, _IDDict(root)) + * return root, _IDDict(root) * * def parseid(source, parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""parseid(source, parser=None) * */ - __pyx_tuple__634 = PyTuple_Pack(4, __pyx_n_s_source, __pyx_n_s_parser, __pyx_n_s_base_url, __pyx_n_s_doc_2); if (unlikely(!__pyx_tuple__634)) __PYX_ERR(14, 44, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__634); - __Pyx_GIVEREF(__pyx_tuple__634); - __pyx_codeobj__316 = (PyObject*)__Pyx_PyCode_New(2, 1, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__634, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlid_pxi, __pyx_n_s_parseid, 44, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__316)) __PYX_ERR(14, 44, __pyx_L1_error) - __pyx_tuple__635 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__635)) __PYX_ERR(14, 44, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__635); - __Pyx_GIVEREF(__pyx_tuple__635); + __pyx_tuple__523 = PyTuple_Pack(4, __pyx_n_s_source, __pyx_n_s_parser, __pyx_n_s_base_url, __pyx_n_s_doc_2); if (unlikely(!__pyx_tuple__523)) __PYX_ERR(15, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__523); + __Pyx_GIVEREF(__pyx_tuple__523); + __pyx_codeobj__524 = (PyObject*)__Pyx_PyCode_New(2, 1, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__523, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlid_pxi, __pyx_n_s_parseid, 44, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__524)) __PYX_ERR(15, 44, __pyx_L1_error) + __pyx_tuple__525 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__525)) __PYX_ERR(15, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__525); + __Pyx_GIVEREF(__pyx_tuple__525); /* "src/lxml/xmlid.pxi":78 * self._items = None @@ -246955,10 +229663,10 @@ static int __Pyx_InitCachedConstants(void) { * return _IDDict(self._doc) * */ - __pyx_tuple__636 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__636)) __PYX_ERR(14, 78, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__636); - __Pyx_GIVEREF(__pyx_tuple__636); - __pyx_codeobj__317 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__636, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlid_pxi, __pyx_n_s_copy, 78, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__317)) __PYX_ERR(14, 78, __pyx_L1_error) + __pyx_tuple__526 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__526)) __PYX_ERR(15, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__526); + __Pyx_GIVEREF(__pyx_tuple__526); + __pyx_codeobj__527 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__526, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlid_pxi, __pyx_n_s_copy, 78, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__527)) __PYX_ERR(15, 78, __pyx_L1_error) /* "src/lxml/xmlid.pxi":95 * return _elementFactory(self._doc, c_attr.parent) @@ -246967,10 +229675,10 @@ static int __Pyx_InitCachedConstants(void) { * return self[id_name] * */ - __pyx_tuple__637 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_id_name); if (unlikely(!__pyx_tuple__637)) __PYX_ERR(14, 95, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__637); - __Pyx_GIVEREF(__pyx_tuple__637); - __pyx_codeobj__318 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__637, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlid_pxi, __pyx_n_s_get, 95, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__318)) __PYX_ERR(14, 95, __pyx_L1_error) + __pyx_tuple__528 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_id_name); if (unlikely(!__pyx_tuple__528)) __PYX_ERR(15, 95, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__528); + __Pyx_GIVEREF(__pyx_tuple__528); + __pyx_codeobj__529 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__528, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlid_pxi, __pyx_n_s_get, 95, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__529)) __PYX_ERR(15, 95, __pyx_L1_error) /* "src/lxml/xmlid.pxi":105 * return c_id is not NULL @@ -246979,10 +229687,10 @@ static int __Pyx_InitCachedConstants(void) { * return id_name in self * */ - __pyx_tuple__638 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_id_name); if (unlikely(!__pyx_tuple__638)) __PYX_ERR(14, 105, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__638); - __Pyx_GIVEREF(__pyx_tuple__638); - __pyx_codeobj__319 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__638, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlid_pxi, __pyx_n_s_has_key, 105, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__319)) __PYX_ERR(14, 105, __pyx_L1_error) + __pyx_tuple__530 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_id_name); if (unlikely(!__pyx_tuple__530)) __PYX_ERR(15, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__530); + __Pyx_GIVEREF(__pyx_tuple__530); + __pyx_codeobj__531 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__530, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlid_pxi, __pyx_n_s_has_key, 105, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__531)) __PYX_ERR(15, 105, __pyx_L1_error) /* "src/lxml/xmlid.pxi":111 * return repr(dict(self)) @@ -246991,10 +229699,10 @@ static int __Pyx_InitCachedConstants(void) { * if self._keys is None: * self._keys = self._build_keys() */ - __pyx_tuple__639 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__639)) __PYX_ERR(14, 111, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__639); - __Pyx_GIVEREF(__pyx_tuple__639); - __pyx_codeobj__320 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__639, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlid_pxi, __pyx_n_s_keys, 111, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__320)) __PYX_ERR(14, 111, __pyx_L1_error) + __pyx_tuple__532 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__532)) __PYX_ERR(15, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__532); + __Pyx_GIVEREF(__pyx_tuple__532); + __pyx_codeobj__533 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__532, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlid_pxi, __pyx_n_s_keys, 111, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__533)) __PYX_ERR(15, 111, __pyx_L1_error) /* "src/lxml/xmlid.pxi":121 * return iter(self._keys) @@ -247003,10 +229711,10 @@ static int __Pyx_InitCachedConstants(void) { * return self * */ - __pyx_tuple__640 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__640)) __PYX_ERR(14, 121, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__640); - __Pyx_GIVEREF(__pyx_tuple__640); - __pyx_codeobj__322 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__640, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlid_pxi, __pyx_n_s_iterkeys, 121, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__322)) __PYX_ERR(14, 121, __pyx_L1_error) + __pyx_tuple__534 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__534)) __PYX_ERR(15, 121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__534); + __Pyx_GIVEREF(__pyx_tuple__534); + __pyx_codeobj__535 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__534, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlid_pxi, __pyx_n_s_iterkeys, 121, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__535)) __PYX_ERR(15, 121, __pyx_L1_error) /* "src/lxml/xmlid.pxi":129 * return len(self._keys) @@ -247015,10 +229723,10 @@ static int __Pyx_InitCachedConstants(void) { * if self._items is None: * self._items = self._build_items() */ - __pyx_tuple__641 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__641)) __PYX_ERR(14, 129, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__641); - __Pyx_GIVEREF(__pyx_tuple__641); - __pyx_codeobj__323 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__641, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlid_pxi, __pyx_n_s_items, 129, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__323)) __PYX_ERR(14, 129, __pyx_L1_error) + __pyx_tuple__536 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__536)) __PYX_ERR(15, 129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__536); + __Pyx_GIVEREF(__pyx_tuple__536); + __pyx_codeobj__537 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__536, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlid_pxi, __pyx_n_s_items, 129, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__537)) __PYX_ERR(15, 129, __pyx_L1_error) /* "src/lxml/xmlid.pxi":134 * return self._items[:] @@ -247027,10 +229735,10 @@ static int __Pyx_InitCachedConstants(void) { * if self._items is None: * self._items = self._build_items() */ - __pyx_tuple__642 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__642)) __PYX_ERR(14, 134, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__642); - __Pyx_GIVEREF(__pyx_tuple__642); - __pyx_codeobj__325 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__642, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlid_pxi, __pyx_n_s_iteritems, 134, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__325)) __PYX_ERR(14, 134, __pyx_L1_error) + __pyx_tuple__538 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__538)) __PYX_ERR(15, 134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__538); + __Pyx_GIVEREF(__pyx_tuple__538); + __pyx_codeobj__539 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__538, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlid_pxi, __pyx_n_s_iteritems, 134, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__539)) __PYX_ERR(15, 134, __pyx_L1_error) /* "src/lxml/xmlid.pxi":139 * return iter(self._items) @@ -247039,10 +229747,10 @@ static int __Pyx_InitCachedConstants(void) { * cdef list values = [] * if self._items is None: */ - __pyx_tuple__643 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_values, __pyx_n_s_item, __pyx_n_s_value); if (unlikely(!__pyx_tuple__643)) __PYX_ERR(14, 139, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__643); - __Pyx_GIVEREF(__pyx_tuple__643); - __pyx_codeobj__326 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__643, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlid_pxi, __pyx_n_s_values, 139, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__326)) __PYX_ERR(14, 139, __pyx_L1_error) + __pyx_tuple__540 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_values, __pyx_n_s_item, __pyx_n_s_value); if (unlikely(!__pyx_tuple__540)) __PYX_ERR(15, 139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__540); + __Pyx_GIVEREF(__pyx_tuple__540); + __pyx_codeobj__541 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__540, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlid_pxi, __pyx_n_s_values, 139, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__541)) __PYX_ERR(15, 139, __pyx_L1_error) /* "src/lxml/xmlid.pxi":149 * return values @@ -247051,10 +229759,10 @@ static int __Pyx_InitCachedConstants(void) { * return iter(self.values()) * */ - __pyx_tuple__644 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__644)) __PYX_ERR(14, 149, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__644); - __Pyx_GIVEREF(__pyx_tuple__644); - __pyx_codeobj__327 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__644, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlid_pxi, __pyx_n_s_itervalues, 149, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__327)) __PYX_ERR(14, 149, __pyx_L1_error) + __pyx_tuple__542 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__542)) __PYX_ERR(15, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__542); + __Pyx_GIVEREF(__pyx_tuple__542); + __pyx_codeobj__543 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__542, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlid_pxi, __pyx_n_s_itervalues, 149, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__543)) __PYX_ERR(15, 149, __pyx_L1_error) /* "src/lxml/cleanup.pxi":3 * # functions for tree cleanup and removing elements from subtrees @@ -247063,13 +229771,13 @@ static int __Pyx_InitCachedConstants(void) { * u"""cleanup_namespaces(tree_or_element, top_nsmap=None, keep_ns_prefixes=None) * */ - __pyx_tuple__645 = PyTuple_Pack(7, __pyx_n_s_tree_or_element, __pyx_n_s_top_nsmap, __pyx_n_s_keep_ns_prefixes, __pyx_n_s_element, __pyx_n_s_c_element, __pyx_n_s_doc_2, __pyx_n_s_prefix); if (unlikely(!__pyx_tuple__645)) __PYX_ERR(16, 3, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__645); - __Pyx_GIVEREF(__pyx_tuple__645); - __pyx_codeobj__328 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__645, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_cleanup_pxi, __pyx_n_s_cleanup_namespaces, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__328)) __PYX_ERR(16, 3, __pyx_L1_error) - __pyx_tuple__646 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__646)) __PYX_ERR(16, 3, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__646); - __Pyx_GIVEREF(__pyx_tuple__646); + __pyx_tuple__544 = PyTuple_Pack(7, __pyx_n_s_tree_or_element, __pyx_n_s_top_nsmap, __pyx_n_s_keep_ns_prefixes, __pyx_n_s_element, __pyx_n_s_c_element, __pyx_n_s_doc_2, __pyx_n_s_prefix); if (unlikely(!__pyx_tuple__544)) __PYX_ERR(17, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__544); + __Pyx_GIVEREF(__pyx_tuple__544); + __pyx_codeobj__545 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__544, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_cleanup_pxi, __pyx_n_s_cleanup_namespaces, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__545)) __PYX_ERR(17, 3, __pyx_L1_error) + __pyx_tuple__546 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__546)) __PYX_ERR(17, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__546); + __Pyx_GIVEREF(__pyx_tuple__546); /* "src/lxml/cleanup.pxi":33 * @@ -247078,10 +229786,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""strip_attributes(tree_or_element, *attribute_names) * */ - __pyx_tuple__647 = PyTuple_Pack(4, __pyx_n_s_tree_or_element, __pyx_n_s_attribute_names, __pyx_n_s_matcher, __pyx_n_s_element); if (unlikely(!__pyx_tuple__647)) __PYX_ERR(16, 33, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__647); - __Pyx_GIVEREF(__pyx_tuple__647); - __pyx_codeobj__329 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__647, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_cleanup_pxi, __pyx_n_s_strip_attributes, 33, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__329)) __PYX_ERR(16, 33, __pyx_L1_error) + __pyx_tuple__547 = PyTuple_Pack(4, __pyx_n_s_tree_or_element, __pyx_n_s_attribute_names, __pyx_n_s_matcher, __pyx_n_s_element); if (unlikely(!__pyx_tuple__547)) __PYX_ERR(17, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__547); + __Pyx_GIVEREF(__pyx_tuple__547); + __pyx_codeobj__548 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__547, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_cleanup_pxi, __pyx_n_s_strip_attributes, 33, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__548)) __PYX_ERR(17, 33, __pyx_L1_error) /* "src/lxml/cleanup.pxi":74 * @@ -247090,10 +229798,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""strip_elements(tree_or_element, *tag_names, with_tail=True) * */ - __pyx_tuple__648 = PyTuple_Pack(6, __pyx_n_s_tree_or_element, __pyx_n_s_with_tail, __pyx_n_s_tag_names, __pyx_n_s_matcher, __pyx_n_s_doc_2, __pyx_n_s_element); if (unlikely(!__pyx_tuple__648)) __PYX_ERR(16, 74, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__648); - __Pyx_GIVEREF(__pyx_tuple__648); - __pyx_codeobj__330 = (PyObject*)__Pyx_PyCode_New(1, 1, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__648, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_cleanup_pxi, __pyx_n_s_strip_elements, 74, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__330)) __PYX_ERR(16, 74, __pyx_L1_error) + __pyx_tuple__549 = PyTuple_Pack(6, __pyx_n_s_tree_or_element, __pyx_n_s_with_tail, __pyx_n_s_tag_names, __pyx_n_s_matcher, __pyx_n_s_doc_2, __pyx_n_s_element); if (unlikely(!__pyx_tuple__549)) __PYX_ERR(17, 74, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__549); + __Pyx_GIVEREF(__pyx_tuple__549); + __pyx_codeobj__550 = (PyObject*)__Pyx_PyCode_New(1, 1, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__549, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_cleanup_pxi, __pyx_n_s_strip_elements, 74, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__550)) __PYX_ERR(17, 74, __pyx_L1_error) /* "src/lxml/cleanup.pxi":145 * @@ -247102,10 +229810,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""strip_tags(tree_or_element, *tag_names) * */ - __pyx_tuple__649 = PyTuple_Pack(5, __pyx_n_s_tree_or_element, __pyx_n_s_tag_names, __pyx_n_s_matcher, __pyx_n_s_doc_2, __pyx_n_s_element); if (unlikely(!__pyx_tuple__649)) __PYX_ERR(16, 145, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__649); - __Pyx_GIVEREF(__pyx_tuple__649); - __pyx_codeobj__331 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__649, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_cleanup_pxi, __pyx_n_s_strip_tags, 145, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__331)) __PYX_ERR(16, 145, __pyx_L1_error) + __pyx_tuple__551 = PyTuple_Pack(5, __pyx_n_s_tree_or_element, __pyx_n_s_tag_names, __pyx_n_s_matcher, __pyx_n_s_doc_2, __pyx_n_s_element); if (unlikely(!__pyx_tuple__551)) __PYX_ERR(17, 145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__551); + __Pyx_GIVEREF(__pyx_tuple__551); + __pyx_codeobj__552 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__551, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_cleanup_pxi, __pyx_n_s_strip_tags, 145, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__552)) __PYX_ERR(17, 145, __pyx_L1_error) /* "src/lxml/extensions.pxi":368 * @@ -247114,9 +229822,9 @@ static int __Pyx_InitCachedConstants(void) { * b"Number encoding", * b"Unfinished literal", */ - __pyx_tuple__650 = PyTuple_Pack(26, __pyx_n_b_Ok, __pyx_kp_b_Number_encoding, __pyx_kp_b_Unfinished_literal, __pyx_kp_b_Start_of_literal, __pyx_kp_b_Expected_for_variable_reference, __pyx_kp_b_Undefined_variable, __pyx_kp_b_Invalid_predicate, __pyx_kp_b_Invalid_expression, __pyx_kp_b_Missing_closing_curly_brace, __pyx_kp_b_Unregistered_function, __pyx_kp_b_Invalid_operand, __pyx_kp_b_Invalid_type, __pyx_kp_b_Invalid_number_of_arguments, __pyx_kp_b_Invalid_context_size, __pyx_kp_b_Invalid_context_position, __pyx_kp_b_Memory_allocation_error, __pyx_kp_b_Syntax_error, __pyx_kp_b_Resource_error, __pyx_kp_b_Sub_resource_error, __pyx_kp_b_Undefined_namespace_prefix, __pyx_kp_b_Encoding_error, __pyx_kp_b_Char_out_of_XML_range, __pyx_kp_b_Invalid_or_incomplete_context, __pyx_kp_b_Stack_usage_error, __pyx_kp_b_Forbidden_variable, __pyx_kp_b_Unknown_error); if (unlikely(!__pyx_tuple__650)) __PYX_ERR(17, 368, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__650); - __Pyx_GIVEREF(__pyx_tuple__650); + __pyx_tuple__553 = PyTuple_Pack(26, __pyx_n_b_Ok, __pyx_kp_b_Number_encoding, __pyx_kp_b_Unfinished_literal, __pyx_kp_b_Start_of_literal, __pyx_kp_b_Expected_for_variable_reference, __pyx_kp_b_Undefined_variable, __pyx_kp_b_Invalid_predicate, __pyx_kp_b_Invalid_expression, __pyx_kp_b_Missing_closing_curly_brace, __pyx_kp_b_Unregistered_function, __pyx_kp_b_Invalid_operand, __pyx_kp_b_Invalid_type, __pyx_kp_b_Invalid_number_of_arguments, __pyx_kp_b_Invalid_context_size, __pyx_kp_b_Invalid_context_position, __pyx_kp_b_Memory_allocation_error, __pyx_kp_b_Syntax_error, __pyx_kp_b_Resource_error, __pyx_kp_b_Sub_resource_error, __pyx_kp_b_Undefined_namespace_prefix, __pyx_kp_b_Encoding_error, __pyx_kp_b_Char_out_of_XML_range, __pyx_kp_b_Invalid_or_incomplete_context, __pyx_kp_b_Stack_usage_error, __pyx_kp_b_Forbidden_variable, __pyx_kp_b_Unknown_error); if (unlikely(!__pyx_tuple__553)) __PYX_ERR(9, 368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__553); + __Pyx_GIVEREF(__pyx_tuple__553); /* "src/lxml/extensions.pxi":426 * @@ -247125,13 +229833,13 @@ static int __Pyx_InitCachedConstants(void) { * u"""Extension(module, function_mapping=None, ns=None) * */ - __pyx_tuple__651 = PyTuple_Pack(7, __pyx_n_s_module, __pyx_n_s_function_mapping, __pyx_n_s_ns, __pyx_n_s_functions, __pyx_n_s_function_name, __pyx_n_s_xpath_name, __pyx_n_s_name_2); if (unlikely(!__pyx_tuple__651)) __PYX_ERR(17, 426, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__651); - __Pyx_GIVEREF(__pyx_tuple__651); - __pyx_codeobj__332 = (PyObject*)__Pyx_PyCode_New(2, 1, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__651, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_extensions_pxi, __pyx_n_s_Extension, 426, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__332)) __PYX_ERR(17, 426, __pyx_L1_error) - __pyx_tuple__652 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__652)) __PYX_ERR(17, 426, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__652); - __Pyx_GIVEREF(__pyx_tuple__652); + __pyx_tuple__554 = PyTuple_Pack(7, __pyx_n_s_module, __pyx_n_s_function_mapping, __pyx_n_s_ns, __pyx_n_s_functions, __pyx_n_s_function_name, __pyx_n_s_xpath_name, __pyx_n_s_name_2); if (unlikely(!__pyx_tuple__554)) __PYX_ERR(9, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__554); + __Pyx_GIVEREF(__pyx_tuple__554); + __pyx_codeobj__555 = (PyObject*)__Pyx_PyCode_New(2, 1, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__554, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_extensions_pxi, __pyx_n_s_Extension, 426, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__555)) __PYX_ERR(9, 426, __pyx_L1_error) + __pyx_tuple__556 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__556)) __PYX_ERR(9, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__556); + __Pyx_GIVEREF(__pyx_tuple__556); /* "src/lxml/extensions.pxi":498 * return rexp_compiled @@ -247140,10 +229848,10 @@ static int __Pyx_InitCachedConstants(void) { * flags = self._make_string(flags) * s = self._make_string(s) */ - __pyx_tuple__653 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_ctxt, __pyx_n_s_s_4, __pyx_n_s_rexp, __pyx_n_s_flags, __pyx_n_s_rexpc); if (unlikely(!__pyx_tuple__653)) __PYX_ERR(17, 498, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__653); - __Pyx_GIVEREF(__pyx_tuple__653); - __pyx_codeobj__334 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__653, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_extensions_pxi, __pyx_n_s_test, 498, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__334)) __PYX_ERR(17, 498, __pyx_L1_error) + __pyx_tuple__557 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_ctxt, __pyx_n_s_s_4, __pyx_n_s_rexp, __pyx_n_s_flags, __pyx_n_s_rexpc); if (unlikely(!__pyx_tuple__557)) __PYX_ERR(9, 498, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__557); + __Pyx_GIVEREF(__pyx_tuple__557); + __pyx_codeobj__558 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__557, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_extensions_pxi, __pyx_n_s_test, 498, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__558)) __PYX_ERR(9, 498, __pyx_L1_error) /* "src/lxml/extensions.pxi":507 * return True @@ -247152,10 +229860,10 @@ static int __Pyx_InitCachedConstants(void) { * cdef list result_list * flags = self._make_string(flags) */ - __pyx_tuple__654 = PyTuple_Pack(13, __pyx_n_s_self, __pyx_n_s_ctxt, __pyx_n_s_s_4, __pyx_n_s_rexp, __pyx_n_s_flags, __pyx_n_s_result_list, __pyx_n_s_rexpc, __pyx_n_s_results, __pyx_n_s_result, __pyx_n_s_root, __pyx_n_s_join_groups, __pyx_n_s_s_match, __pyx_n_s_elem); if (unlikely(!__pyx_tuple__654)) __PYX_ERR(17, 507, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__654); - __Pyx_GIVEREF(__pyx_tuple__654); - __pyx_codeobj__335 = (PyObject*)__Pyx_PyCode_New(5, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__654, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_extensions_pxi, __pyx_n_s_match, 507, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__335)) __PYX_ERR(17, 507, __pyx_L1_error) + __pyx_tuple__559 = PyTuple_Pack(13, __pyx_n_s_self, __pyx_n_s_ctxt, __pyx_n_s_s_4, __pyx_n_s_rexp, __pyx_n_s_flags, __pyx_n_s_result_list, __pyx_n_s_rexpc, __pyx_n_s_results, __pyx_n_s_result, __pyx_n_s_root, __pyx_n_s_join_groups, __pyx_n_s_s_match, __pyx_n_s_elem); if (unlikely(!__pyx_tuple__559)) __PYX_ERR(9, 507, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__559); + __Pyx_GIVEREF(__pyx_tuple__559); + __pyx_codeobj__560 = (PyObject*)__Pyx_PyCode_New(5, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__559, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_extensions_pxi, __pyx_n_s_match, 507, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__560)) __PYX_ERR(9, 507, __pyx_L1_error) /* "src/lxml/extensions.pxi":533 * return result_list @@ -247164,10 +229872,10 @@ static int __Pyx_InitCachedConstants(void) { * replacement = self._make_string(replacement) * flags = self._make_string(flags) */ - __pyx_tuple__655 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_ctxt, __pyx_n_s_s_4, __pyx_n_s_rexp, __pyx_n_s_flags, __pyx_n_s_replacement, __pyx_n_s_rexpc, __pyx_n_s_count); if (unlikely(!__pyx_tuple__655)) __PYX_ERR(17, 533, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__655); - __Pyx_GIVEREF(__pyx_tuple__655); - __pyx_codeobj__338 = (PyObject*)__Pyx_PyCode_New(6, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__655, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_extensions_pxi, __pyx_n_s_replace, 533, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__338)) __PYX_ERR(17, 533, __pyx_L1_error) + __pyx_tuple__561 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_ctxt, __pyx_n_s_s_4, __pyx_n_s_rexp, __pyx_n_s_flags, __pyx_n_s_replacement, __pyx_n_s_rexpc, __pyx_n_s_count); if (unlikely(!__pyx_tuple__561)) __PYX_ERR(9, 533, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__561); + __Pyx_GIVEREF(__pyx_tuple__561); + __pyx_codeobj__562 = (PyObject*)__Pyx_PyCode_New(6, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__561, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_extensions_pxi, __pyx_n_s_replace, 533, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__562)) __PYX_ERR(9, 533, __pyx_L1_error) /* "src/lxml/extensions.pxi":730 * cdef readonly bint is_attribute @@ -247176,10 +229884,10 @@ static int __Pyx_InitCachedConstants(void) { * return self._parent * */ - __pyx_tuple__656 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__656)) __PYX_ERR(17, 730, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__656); - __Pyx_GIVEREF(__pyx_tuple__656); - __pyx_codeobj__339 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__656, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_extensions_pxi, __pyx_n_s_getparent, 730, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__339)) __PYX_ERR(17, 730, __pyx_L1_error) + __pyx_tuple__563 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__563)) __PYX_ERR(9, 730, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__563); + __Pyx_GIVEREF(__pyx_tuple__563); + __pyx_codeobj__564 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__563, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_extensions_pxi, __pyx_n_s_getparent, 730, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__564)) __PYX_ERR(9, 730, __pyx_L1_error) /* "src/lxml/extensions.pxi":738 * # we need to use a Python class here, or PyPy will crash on creation @@ -247188,10 +229896,10 @@ static int __Pyx_InitCachedConstants(void) { * return self._parent * */ - __pyx_tuple__657 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__657)) __PYX_ERR(17, 738, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__657); - __Pyx_GIVEREF(__pyx_tuple__657); - __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__657, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_extensions_pxi, __pyx_n_s_getparent, 738, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__340)) __PYX_ERR(17, 738, __pyx_L1_error) + __pyx_tuple__565 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__565)) __PYX_ERR(9, 738, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__565); + __Pyx_GIVEREF(__pyx_tuple__565); + __pyx_codeobj__566 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__565, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_extensions_pxi, __pyx_n_s_getparent, 738, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__566)) __PYX_ERR(9, 738, __pyx_L1_error) /* "src/lxml/extensions.pxi":744 * # we need to use a Python class here, bytes cannot be C-subclassed @@ -247200,10 +229908,10 @@ static int __Pyx_InitCachedConstants(void) { * return self._parent * */ - __pyx_tuple__658 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__658)) __PYX_ERR(17, 744, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__658); - __Pyx_GIVEREF(__pyx_tuple__658); - __pyx_codeobj__341 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__658, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_extensions_pxi, __pyx_n_s_getparent, 744, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__341)) __PYX_ERR(17, 744, __pyx_L1_error) + __pyx_tuple__567 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__567)) __PYX_ERR(9, 744, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__567); + __Pyx_GIVEREF(__pyx_tuple__567); + __pyx_codeobj__568 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__567, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_extensions_pxi, __pyx_n_s_getparent, 744, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__568)) __PYX_ERR(9, 744, __pyx_L1_error) /* "src/lxml/xpath.pxi":152 * self._context.set_context(xpathCtxt) @@ -247212,10 +229920,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""evaluate(self, _eval_arg, **_variables) * */ - __pyx_tuple__659 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_eval_arg, __pyx_n_s_variables_2); if (unlikely(!__pyx_tuple__659)) __PYX_ERR(18, 152, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__659); - __Pyx_GIVEREF(__pyx_tuple__659); - __pyx_codeobj__342 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__659, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xpath_pxi, __pyx_n_s_evaluate, 152, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__342)) __PYX_ERR(18, 152, __pyx_L1_error) + __pyx_tuple__569 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_eval_arg, __pyx_n_s_variables_2); if (unlikely(!__pyx_tuple__569)) __PYX_ERR(18, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__569); + __Pyx_GIVEREF(__pyx_tuple__569); + __pyx_codeobj__570 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__569, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xpath_pxi, __pyx_n_s_evaluate, 152, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__570)) __PYX_ERR(18, 152, __pyx_L1_error) /* "src/lxml/xpath.pxi":268 * self.set_context(xpathCtxt) @@ -247224,10 +229932,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""Register a namespace with the XPath context. * """ */ - __pyx_tuple__660 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_prefix, __pyx_n_s_uri); if (unlikely(!__pyx_tuple__660)) __PYX_ERR(18, 268, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__660); - __Pyx_GIVEREF(__pyx_tuple__660); - __pyx_codeobj__343 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__660, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xpath_pxi, __pyx_n_s_register_namespace, 268, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__343)) __PYX_ERR(18, 268, __pyx_L1_error) + __pyx_tuple__571 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_prefix, __pyx_n_s_uri); if (unlikely(!__pyx_tuple__571)) __PYX_ERR(18, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__571); + __Pyx_GIVEREF(__pyx_tuple__571); + __pyx_codeobj__572 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__571, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xpath_pxi, __pyx_n_s_register_namespace, 268, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__572)) __PYX_ERR(18, 268, __pyx_L1_error) /* "src/lxml/xpath.pxi":274 * self._context.addNamespace(prefix, uri) @@ -247236,10 +229944,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""Register a prefix -> uri dict. * """ */ - __pyx_tuple__661 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_namespaces, __pyx_n_s_prefix, __pyx_n_s_uri); if (unlikely(!__pyx_tuple__661)) __PYX_ERR(18, 274, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__661); - __Pyx_GIVEREF(__pyx_tuple__661); - __pyx_codeobj__344 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__661, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xpath_pxi, __pyx_n_s_register_namespaces, 274, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__344)) __PYX_ERR(18, 274, __pyx_L1_error) + __pyx_tuple__573 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_namespaces, __pyx_n_s_prefix, __pyx_n_s_uri); if (unlikely(!__pyx_tuple__573)) __PYX_ERR(18, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__573); + __Pyx_GIVEREF(__pyx_tuple__573); + __pyx_codeobj__574 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__573, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xpath_pxi, __pyx_n_s_register_namespaces, 274, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__574)) __PYX_ERR(18, 274, __pyx_L1_error) /* "src/lxml/xpath.pxi":369 * @@ -247248,10 +229956,10 @@ static int __Pyx_InitCachedConstants(void) { * regexp=True, smart_strings=True): * u"""XPathEvaluator(etree_or_element, namespaces=None, extensions=None, regexp=True, smart_strings=True) */ - __pyx_tuple__662 = PyTuple_Pack(5, __pyx_n_s_etree_or_element, __pyx_n_s_namespaces, __pyx_n_s_extensions, __pyx_n_s_regexp, __pyx_n_s_smart_strings); if (unlikely(!__pyx_tuple__662)) __PYX_ERR(18, 369, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__662); - __Pyx_GIVEREF(__pyx_tuple__662); - __pyx_codeobj__345 = (PyObject*)__Pyx_PyCode_New(1, 4, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__662, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xpath_pxi, __pyx_n_s_XPathEvaluator, 369, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__345)) __PYX_ERR(18, 369, __pyx_L1_error) + __pyx_tuple__575 = PyTuple_Pack(5, __pyx_n_s_etree_or_element, __pyx_n_s_namespaces, __pyx_n_s_extensions, __pyx_n_s_regexp, __pyx_n_s_smart_strings); if (unlikely(!__pyx_tuple__575)) __PYX_ERR(18, 369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__575); + __Pyx_GIVEREF(__pyx_tuple__575); + __pyx_codeobj__576 = (PyObject*)__Pyx_PyCode_New(1, 4, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__575, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xpath_pxi, __pyx_n_s_XPathEvaluator, 369, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__576)) __PYX_ERR(18, 369, __pyx_L1_error) /* "src/lxml/xpath.pxi":467 * cdef object _replace_strings @@ -247260,9 +229968,9 @@ static int __Pyx_InitCachedConstants(void) { * _find_namespaces = re.compile(b'({[^}]+})').findall * */ - __pyx_tuple__664 = PyTuple_Pack(1, __pyx_kp_b__663); if (unlikely(!__pyx_tuple__664)) __PYX_ERR(18, 467, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__664); - __Pyx_GIVEREF(__pyx_tuple__664); + __pyx_tuple__578 = PyTuple_Pack(1, __pyx_kp_b__577); if (unlikely(!__pyx_tuple__578)) __PYX_ERR(18, 467, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__578); + __Pyx_GIVEREF(__pyx_tuple__578); /* "src/lxml/xpath.pxi":468 * cdef object _find_namespaces @@ -247271,9 +229979,9 @@ static int __Pyx_InitCachedConstants(void) { * * cdef class ETXPath(XPath): */ - __pyx_tuple__666 = PyTuple_Pack(1, __pyx_kp_b__665); if (unlikely(!__pyx_tuple__666)) __PYX_ERR(18, 468, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__666); - __Pyx_GIVEREF(__pyx_tuple__666); + __pyx_tuple__580 = PyTuple_Pack(1, __pyx_kp_b__579); if (unlikely(!__pyx_tuple__580)) __PYX_ERR(18, 468, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__580); + __Pyx_GIVEREF(__pyx_tuple__580); /* "src/lxml/xslt.pxi":436 * @@ -247282,10 +229990,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""strparam(strval) * */ - __pyx_tuple__667 = PyTuple_Pack(1, __pyx_n_s_strval); if (unlikely(!__pyx_tuple__667)) __PYX_ERR(3, 436, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__667); - __Pyx_GIVEREF(__pyx_tuple__667); - __pyx_codeobj__351 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__667, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xslt_pxi, __pyx_n_s_strparam, 436, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__351)) __PYX_ERR(3, 436, __pyx_L1_error) + __pyx_tuple__581 = PyTuple_Pack(1, __pyx_n_s_strval); if (unlikely(!__pyx_tuple__581)) __PYX_ERR(3, 436, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__581); + __Pyx_GIVEREF(__pyx_tuple__581); + __pyx_codeobj__582 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__581, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xslt_pxi, __pyx_n_s_strparam, 436, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__582)) __PYX_ERR(3, 436, __pyx_L1_error) /* "src/lxml/xslt.pxi":450 * @@ -247294,10 +230002,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""set_global_max_depth(max_depth) * */ - __pyx_tuple__668 = PyTuple_Pack(1, __pyx_n_s_max_depth); if (unlikely(!__pyx_tuple__668)) __PYX_ERR(3, 450, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__668); - __Pyx_GIVEREF(__pyx_tuple__668); - __pyx_codeobj__352 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__668, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xslt_pxi, __pyx_n_s_set_global_max_depth, 450, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__352)) __PYX_ERR(3, 450, __pyx_L1_error) + __pyx_tuple__583 = PyTuple_Pack(1, __pyx_n_s_max_depth); if (unlikely(!__pyx_tuple__583)) __PYX_ERR(3, 450, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__583); + __Pyx_GIVEREF(__pyx_tuple__583); + __pyx_codeobj__584 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__583, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xslt_pxi, __pyx_n_s_set_global_max_depth, 450, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__584)) __PYX_ERR(3, 450, __pyx_L1_error) /* "src/lxml/xslt.pxi":469 * xslt.xsltMaxDepth = max_depth @@ -247306,10 +230014,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""apply(self, _input, profile_run=False, **kw) * */ - __pyx_tuple__669 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_input, __pyx_n_s_profile_run, __pyx_n_s_kw_2); if (unlikely(!__pyx_tuple__669)) __PYX_ERR(3, 469, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__669); - __Pyx_GIVEREF(__pyx_tuple__669); - __pyx_codeobj__354 = (PyObject*)__Pyx_PyCode_New(2, 1, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__669, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xslt_pxi, __pyx_n_s_apply, 469, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__354)) __PYX_ERR(3, 469, __pyx_L1_error) + __pyx_tuple__585 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_input, __pyx_n_s_profile_run, __pyx_n_s_kw_2); if (unlikely(!__pyx_tuple__585)) __PYX_ERR(3, 469, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__585); + __Pyx_GIVEREF(__pyx_tuple__585); + __pyx_codeobj__586 = (PyObject*)__Pyx_PyCode_New(2, 1, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__585, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xslt_pxi, __pyx_n_s_apply, 469, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__586)) __PYX_ERR(3, 469, __pyx_L1_error) /* "src/lxml/xslt.pxi":475 * return self(_input, profile_run=profile_run, **kw) @@ -247318,10 +230026,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""tostring(self, result_tree) * */ - __pyx_tuple__670 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_result_tree); if (unlikely(!__pyx_tuple__670)) __PYX_ERR(3, 475, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__670); - __Pyx_GIVEREF(__pyx_tuple__670); - __pyx_codeobj__355 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__670, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xslt_pxi, __pyx_n_s_tostring, 475, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__355)) __PYX_ERR(3, 475, __pyx_L1_error) + __pyx_tuple__587 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_result_tree); if (unlikely(!__pyx_tuple__587)) __PYX_ERR(3, 475, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__587); + __Pyx_GIVEREF(__pyx_tuple__587); + __pyx_codeobj__588 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__587, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xslt_pxi, __pyx_n_s_tostring, 475, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__588)) __PYX_ERR(3, 475, __pyx_L1_error) /* "src/lxml/xslt.pxi":484 * return str(result_tree) @@ -247330,10 +230038,10 @@ static int __Pyx_InitCachedConstants(void) { * return self.__copy__() * */ - __pyx_tuple__671 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_memo); if (unlikely(!__pyx_tuple__671)) __PYX_ERR(3, 484, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__671); - __Pyx_GIVEREF(__pyx_tuple__671); - __pyx_codeobj__356 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__671, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xslt_pxi, __pyx_n_s_deepcopy, 484, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__356)) __PYX_ERR(3, 484, __pyx_L1_error) + __pyx_tuple__589 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_memo); if (unlikely(!__pyx_tuple__589)) __PYX_ERR(3, 484, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__589); + __Pyx_GIVEREF(__pyx_tuple__589); + __pyx_codeobj__590 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__589, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xslt_pxi, __pyx_n_s_deepcopy, 484, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__590)) __PYX_ERR(3, 484, __pyx_L1_error) /* "src/lxml/xslt.pxi":487 * return self.__copy__() @@ -247342,10 +230050,10 @@ static int __Pyx_InitCachedConstants(void) { * return _copyXSLT(self) * */ - __pyx_tuple__672 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__672)) __PYX_ERR(3, 487, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__672); - __Pyx_GIVEREF(__pyx_tuple__672); - __pyx_codeobj__357 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__672, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xslt_pxi, __pyx_n_s_copy_2, 487, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__357)) __PYX_ERR(3, 487, __pyx_L1_error) + __pyx_tuple__591 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__591)) __PYX_ERR(3, 487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__591); + __Pyx_GIVEREF(__pyx_tuple__591); + __pyx_codeobj__592 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__591, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xslt_pxi, __pyx_n_s_copy_2, 487, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__592)) __PYX_ERR(3, 487, __pyx_L1_error) /* "src/lxml/xslt.pxi":713 * cdef Py_ssize_t _buffer_refcnt @@ -247354,10 +230062,10 @@ static int __Pyx_InitCachedConstants(void) { * """write_output(self, file, *, compression=0) * */ - __pyx_tuple__673 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_file, __pyx_n_s_compression, __pyx_n_s_writer, __pyx_n_s_doc_2, __pyx_n_s_r, __pyx_n_s_c_compression, __pyx_n_s_c_encoding, __pyx_n_s_c_buffer, __pyx_n_s_file_path, __pyx_n_s_c_filename); if (unlikely(!__pyx_tuple__673)) __PYX_ERR(3, 713, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__673); - __Pyx_GIVEREF(__pyx_tuple__673); - __pyx_codeobj__359 = (PyObject*)__Pyx_PyCode_New(2, 1, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__673, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xslt_pxi, __pyx_n_s_write_output, 713, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__359)) __PYX_ERR(3, 713, __pyx_L1_error) + __pyx_tuple__593 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_file, __pyx_n_s_compression, __pyx_n_s_writer, __pyx_n_s_doc_2, __pyx_n_s_r, __pyx_n_s_c_compression, __pyx_n_s_c_encoding, __pyx_n_s_c_buffer, __pyx_n_s_file_path, __pyx_n_s_c_filename); if (unlikely(!__pyx_tuple__593)) __PYX_ERR(3, 713, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__593); + __Pyx_GIVEREF(__pyx_tuple__593); + __pyx_codeobj__594 = (PyObject*)__Pyx_PyCode_New(2, 1, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__593, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xslt_pxi, __pyx_n_s_write_output, 713, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__594)) __PYX_ERR(3, 713, __pyx_L1_error) /* "src/lxml/xslt.pxi":788 * return result @@ -247366,10 +230074,10 @@ static int __Pyx_InitCachedConstants(void) { * cdef xmlChar* encoding * cdef xmlChar* s = NULL */ - __pyx_tuple__674 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_encoding, __pyx_n_s_s_4, __pyx_n_s_l, __pyx_n_s_result); if (unlikely(!__pyx_tuple__674)) __PYX_ERR(3, 788, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__674); - __Pyx_GIVEREF(__pyx_tuple__674); - __pyx_codeobj__361 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__674, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xslt_pxi, __pyx_n_s_unicode_2, 788, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__361)) __PYX_ERR(3, 788, __pyx_L1_error) + __pyx_tuple__595 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_encoding, __pyx_n_s_s_4, __pyx_n_s_l, __pyx_n_s_result); if (unlikely(!__pyx_tuple__595)) __PYX_ERR(3, 788, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__595); + __Pyx_GIVEREF(__pyx_tuple__595); + __pyx_codeobj__596 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__595, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xslt_pxi, __pyx_n_s_unicode_2, 788, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__596)) __PYX_ERR(3, 788, __pyx_L1_error) /* "src/lxml/xslt.pxi":882 * # XSLT PI support @@ -247378,9 +230086,9 @@ static int __Pyx_InitCachedConstants(void) { * cdef object _FIND_PI_HREF = _RE_PI_HREF.findall * cdef object _REPLACE_PI_HREF = _RE_PI_HREF.sub */ - __pyx_tuple__675 = PyTuple_Pack(1, __pyx_kp_u_s_href_s_s); if (unlikely(!__pyx_tuple__675)) __PYX_ERR(3, 882, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__675); - __Pyx_GIVEREF(__pyx_tuple__675); + __pyx_tuple__597 = PyTuple_Pack(1, __pyx_kp_u_s_href_s_s); if (unlikely(!__pyx_tuple__597)) __PYX_ERR(3, 882, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__597); + __Pyx_GIVEREF(__pyx_tuple__597); /* "src/lxml/xslt.pxi":896 * @@ -247389,10 +230097,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""parseXSL(self, parser=None) * */ - __pyx_tuple__676 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_parser, __pyx_n_s_result_doc, __pyx_n_s_result_node, __pyx_n_s_href_utf, __pyx_n_s_c_href, __pyx_n_s_c_attr, __pyx_n_s_hrefs, __pyx_n_s_root); if (unlikely(!__pyx_tuple__676)) __PYX_ERR(3, 896, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__676); - __Pyx_GIVEREF(__pyx_tuple__676); - __pyx_codeobj__363 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__676, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xslt_pxi, __pyx_n_s_parseXSL, 896, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__363)) __PYX_ERR(3, 896, __pyx_L1_error) + __pyx_tuple__598 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_parser, __pyx_n_s_result_doc, __pyx_n_s_result_node, __pyx_n_s_href_utf, __pyx_n_s_c_href, __pyx_n_s_c_attr, __pyx_n_s_hrefs, __pyx_n_s_root); if (unlikely(!__pyx_tuple__598)) __PYX_ERR(3, 896, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__598); + __Pyx_GIVEREF(__pyx_tuple__598); + __pyx_codeobj__599 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__598, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xslt_pxi, __pyx_n_s_parseXSL, 896, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__599)) __PYX_ERR(3, 896, __pyx_L1_error) /* "src/lxml/xslt.pxi":953 * return _elementTreeFactory(result_node._doc, result_node) @@ -247401,10 +230109,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""set(self, key, value) * */ - __pyx_tuple__677 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_attrib, __pyx_n_s_text); if (unlikely(!__pyx_tuple__677)) __PYX_ERR(3, 953, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__677); - __Pyx_GIVEREF(__pyx_tuple__677); - __pyx_codeobj__364 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__677, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xslt_pxi, __pyx_n_s_set, 953, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__364)) __PYX_ERR(3, 953, __pyx_L1_error) + __pyx_tuple__600 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_attrib, __pyx_n_s_text); if (unlikely(!__pyx_tuple__600)) __PYX_ERR(3, 953, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__600); + __Pyx_GIVEREF(__pyx_tuple__600); + __pyx_codeobj__601 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__600, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xslt_pxi, __pyx_n_s_set, 953, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__601)) __PYX_ERR(3, 953, __pyx_L1_error) /* "src/lxml/xsltext.pxi":6 * u"""Base class of an XSLT extension element. @@ -247413,10 +230121,10 @@ static int __Pyx_InitCachedConstants(void) { * u"""execute(self, context, self_node, input_node, output_parent) * Execute this extension element. */ - __pyx_tuple__678 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_context, __pyx_n_s_self_node, __pyx_n_s_input_node, __pyx_n_s_output_parent); if (unlikely(!__pyx_tuple__678)) __PYX_ERR(19, 6, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__678); - __Pyx_GIVEREF(__pyx_tuple__678); - __pyx_codeobj__365 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__678, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xsltext_pxi, __pyx_n_s_execute, 6, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__365)) __PYX_ERR(19, 6, __pyx_L1_error) + __pyx_tuple__602 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_context, __pyx_n_s_self_node, __pyx_n_s_input_node, __pyx_n_s_output_parent); if (unlikely(!__pyx_tuple__602)) __PYX_ERR(19, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__602); + __Pyx_GIVEREF(__pyx_tuple__602); + __pyx_codeobj__603 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__602, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xsltext_pxi, __pyx_n_s_execute, 6, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__603)) __PYX_ERR(19, 6, __pyx_L1_error) /* "src/lxml/xsltext.pxi":22 * pass @@ -247425,10 +230133,10 @@ static int __Pyx_InitCachedConstants(void) { * *, elements_only=False, remove_blank_text=False): * u"""apply_templates(self, context, node, output_parent=None, elements_only=False, remove_blank_text=False) */ - __pyx_tuple__679 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_context, __pyx_n_s_node, __pyx_n_s_output_parent, __pyx_n_s_elements_only, __pyx_n_s_remove_blank_text, __pyx_n_s_c_parent, __pyx_n_s_c_node, __pyx_n_s_c_context_node); if (unlikely(!__pyx_tuple__679)) __PYX_ERR(19, 22, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__679); - __Pyx_GIVEREF(__pyx_tuple__679); - __pyx_codeobj__366 = (PyObject*)__Pyx_PyCode_New(4, 2, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__679, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xsltext_pxi, __pyx_n_s_apply_templates, 22, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__366)) __PYX_ERR(19, 22, __pyx_L1_error) + __pyx_tuple__604 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_context, __pyx_n_s_node, __pyx_n_s_output_parent, __pyx_n_s_elements_only, __pyx_n_s_remove_blank_text, __pyx_n_s_c_parent, __pyx_n_s_c_node, __pyx_n_s_c_context_node); if (unlikely(!__pyx_tuple__604)) __PYX_ERR(19, 22, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__604); + __Pyx_GIVEREF(__pyx_tuple__604); + __pyx_codeobj__605 = (PyObject*)__Pyx_PyCode_New(4, 2, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__604, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xsltext_pxi, __pyx_n_s_apply_templates, 22, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__605)) __PYX_ERR(19, 22, __pyx_L1_error) /* "src/lxml/xsltext.pxi":74 * tree.xmlFreeNode(c_parent) @@ -247437,70 +230145,70 @@ static int __Pyx_InitCachedConstants(void) { * *, elements_only=False, remove_blank_text=False): * u"""process_children(self, context, output_parent=None, elements_only=False, remove_blank_text=False) */ - __pyx_tuple__680 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_context, __pyx_n_s_output_parent, __pyx_n_s_elements_only, __pyx_n_s_remove_blank_text, __pyx_n_s_c_parent, __pyx_n_s_c_ctxt, __pyx_n_s_c_old_output_parent); if (unlikely(!__pyx_tuple__680)) __PYX_ERR(19, 74, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__680); - __Pyx_GIVEREF(__pyx_tuple__680); - __pyx_codeobj__367 = (PyObject*)__Pyx_PyCode_New(3, 2, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__680, __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__367)) __PYX_ERR(19, 74, __pyx_L1_error) + __pyx_tuple__606 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_context, __pyx_n_s_output_parent, __pyx_n_s_elements_only, __pyx_n_s_remove_blank_text, __pyx_n_s_c_parent, __pyx_n_s_c_ctxt, __pyx_n_s_c_old_output_parent); if (unlikely(!__pyx_tuple__606)) __PYX_ERR(19, 74, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__606); + __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":3517 + /* "lxml/etree.pyx":3511 * self._error_log = _ErrorLog() * * def validate(self, etree): # <<<<<<<<<<<<<< * u"""validate(self, etree) * */ - __pyx_tuple__681 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_etree); if (unlikely(!__pyx_tuple__681)) __PYX_ERR(0, 3517, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__681); - __Pyx_GIVEREF(__pyx_tuple__681); - __pyx_codeobj__369 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__681, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_validate, 3517, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__369)) __PYX_ERR(0, 3517, __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, 3511, __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) - /* "lxml/etree.pyx":3526 + /* "lxml/etree.pyx":3520 * return self(etree) * * def assertValid(self, etree): # <<<<<<<<<<<<<< * u"""assertValid(self, etree) * */ - __pyx_tuple__682 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_etree); if (unlikely(!__pyx_tuple__682)) __PYX_ERR(0, 3526, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__682); - __Pyx_GIVEREF(__pyx_tuple__682); - __pyx_codeobj__370 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__682, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_assertValid, 3526, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__370)) __PYX_ERR(0, 3526, __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, 3520, __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) - /* "lxml/etree.pyx":3536 + /* "lxml/etree.pyx":3530 * self._error_log) * * def assert_(self, etree): # <<<<<<<<<<<<<< * u"""assert_(self, etree) * */ - __pyx_tuple__683 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_etree); if (unlikely(!__pyx_tuple__683)) __PYX_ERR(0, 3536, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__683); - __Pyx_GIVEREF(__pyx_tuple__683); - __pyx_codeobj__371 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__683, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_assert, 3536, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__371)) __PYX_ERR(0, 3536, __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, 3530, __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) - /* "lxml/etree.pyx":3545 + /* "lxml/etree.pyx":3539 * 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__684 = 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__684)) __PYX_ERR(0, 3545, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__684); - __Pyx_GIVEREF(__pyx_tuple__684); - __pyx_codeobj__372 = (PyObject*)__Pyx_PyCode_New(7, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__684, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_append_log_message, 3545, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__372)) __PYX_ERR(0, 3545, __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, 3539, __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) - /* "lxml/etree.pyx":3550 + /* "lxml/etree.pyx":3544 * filename) * * cpdef _clear_error_log(self): # <<<<<<<<<<<<<< * self._error_log.clear() * */ - __pyx_tuple__685 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__685)) __PYX_ERR(0, 3550, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__685); - __Pyx_GIVEREF(__pyx_tuple__685); - __pyx_codeobj__373 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__685, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_clear_error_log, 3550, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__373)) __PYX_ERR(0, 3550, __pyx_L1_error) + __pyx_tuple__616 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__616)) __PYX_ERR(0, 3544, __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) /* "src/lxml/dtd.pxi":163 * return funicode(self._c_node.defaultValue) if self._c_node.defaultValue is not NULL else None @@ -247509,10 +230217,10 @@ static int __Pyx_InitCachedConstants(void) { * _assertValidDTDNode(self, self._c_node) * cdef tree.xmlEnumeration *c_node = self._c_node.tree */ - __pyx_tuple__686 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_c_node); if (unlikely(!__pyx_tuple__686)) __PYX_ERR(20, 163, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__686); - __Pyx_GIVEREF(__pyx_tuple__686); - __pyx_codeobj__374 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__686, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_dtd_pxi, __pyx_n_s_itervalues, 163, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__374)) __PYX_ERR(20, 163, __pyx_L1_error) + __pyx_tuple__618 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_c_node); if (unlikely(!__pyx_tuple__618)) __PYX_ERR(20, 163, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__618); + __Pyx_GIVEREF(__pyx_tuple__618); + __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__618, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_dtd_pxi, __pyx_n_s_itervalues, 163, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(20, 163, __pyx_L1_error) /* "src/lxml/dtd.pxi":170 * c_node = c_node.next @@ -247521,10 +230229,10 @@ static int __Pyx_InitCachedConstants(void) { * return list(self.itervalues()) * */ - __pyx_tuple__687 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__687)) __PYX_ERR(20, 170, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__687); - __Pyx_GIVEREF(__pyx_tuple__687); - __pyx_codeobj__375 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__687, __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__375)) __PYX_ERR(20, 170, __pyx_L1_error) + __pyx_tuple__619 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__619)) __PYX_ERR(20, 170, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__619); + __Pyx_GIVEREF(__pyx_tuple__619); + __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 @@ -247533,10 +230241,10 @@ static int __Pyx_InitCachedConstants(void) { * _assertValidDTDNode(self, self._c_node) * cdef tree.xmlAttribute *c_node = self._c_node.attributes */ - __pyx_tuple__688 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_c_node, __pyx_n_s_node); if (unlikely(!__pyx_tuple__688)) __PYX_ERR(20, 223, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__688); - __Pyx_GIVEREF(__pyx_tuple__688); - __pyx_codeobj__376 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__688, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_dtd_pxi, __pyx_n_s_iterattributes, 223, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__376)) __PYX_ERR(20, 223, __pyx_L1_error) + __pyx_tuple__621 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_c_node, __pyx_n_s_node); if (unlikely(!__pyx_tuple__621)) __PYX_ERR(20, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__621); + __Pyx_GIVEREF(__pyx_tuple__621); + __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__621, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_dtd_pxi, __pyx_n_s_iterattributes, 223, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(20, 223, __pyx_L1_error) /* "src/lxml/dtd.pxi":233 * c_node = c_node.nexth @@ -247545,10 +230253,10 @@ static int __Pyx_InitCachedConstants(void) { * return list(self.iterattributes()) * */ - __pyx_tuple__689 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__689)) __PYX_ERR(20, 233, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__689); - __Pyx_GIVEREF(__pyx_tuple__689); - __pyx_codeobj__377 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__689, __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__377)) __PYX_ERR(20, 233, __pyx_L1_error) + __pyx_tuple__622 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__622)) __PYX_ERR(20, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__622); + __Pyx_GIVEREF(__pyx_tuple__622); + __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) @@ -247557,10 +230265,10 @@ static int __Pyx_InitCachedConstants(void) { * cdef tree.xmlNode *c_node = self._c_dtd.children if self._c_dtd is not NULL else NULL * while c_node is not NULL: */ - __pyx_tuple__690 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_c_node, __pyx_n_s_node); if (unlikely(!__pyx_tuple__690)) __PYX_ERR(20, 314, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__690); - __Pyx_GIVEREF(__pyx_tuple__690); - __pyx_codeobj__380 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__690, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_dtd_pxi, __pyx_n_s_iterelements, 314, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__380)) __PYX_ERR(20, 314, __pyx_L1_error) + __pyx_tuple__624 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_c_node, __pyx_n_s_node); if (unlikely(!__pyx_tuple__624)) __PYX_ERR(20, 314, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__624); + __Pyx_GIVEREF(__pyx_tuple__624); + __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__624, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_dtd_pxi, __pyx_n_s_iterelements, 314, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(20, 314, __pyx_L1_error) /* "src/lxml/dtd.pxi":324 * c_node = c_node.next @@ -247569,10 +230277,10 @@ static int __Pyx_InitCachedConstants(void) { * return list(self.iterelements()) * */ - __pyx_tuple__691 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__691)) __PYX_ERR(20, 324, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__691); - __Pyx_GIVEREF(__pyx_tuple__691); - __pyx_codeobj__381 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__691, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_dtd_pxi, __pyx_n_s_elements, 324, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__381)) __PYX_ERR(20, 324, __pyx_L1_error) + __pyx_tuple__625 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__625)) __PYX_ERR(20, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__625); + __Pyx_GIVEREF(__pyx_tuple__625); + __pyx_codeobj__626 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__625, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_dtd_pxi, __pyx_n_s_elements, 324, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__626)) __PYX_ERR(20, 324, __pyx_L1_error) /* "src/lxml/dtd.pxi":327 * return list(self.iterelements()) @@ -247581,10 +230289,10 @@ static int __Pyx_InitCachedConstants(void) { * cdef tree.xmlNode *c_node = self._c_dtd.children if self._c_dtd is not NULL else NULL * while c_node is not NULL: */ - __pyx_tuple__692 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_c_node, __pyx_n_s_node); if (unlikely(!__pyx_tuple__692)) __PYX_ERR(20, 327, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__692); - __Pyx_GIVEREF(__pyx_tuple__692); - __pyx_codeobj__382 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__692, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_dtd_pxi, __pyx_n_s_iterentities, 327, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__382)) __PYX_ERR(20, 327, __pyx_L1_error) + __pyx_tuple__627 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_c_node, __pyx_n_s_node); if (unlikely(!__pyx_tuple__627)) __PYX_ERR(20, 327, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__627); + __Pyx_GIVEREF(__pyx_tuple__627); + __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__627, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_dtd_pxi, __pyx_n_s_iterentities, 327, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(20, 327, __pyx_L1_error) /* "src/lxml/dtd.pxi":337 * c_node = c_node.next @@ -247593,10 +230301,10 @@ static int __Pyx_InitCachedConstants(void) { * return list(self.iterentities()) * */ - __pyx_tuple__693 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__693)) __PYX_ERR(20, 337, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__693); - __Pyx_GIVEREF(__pyx_tuple__693); - __pyx_codeobj__383 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__693, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_dtd_pxi, __pyx_n_s_entities, 337, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__383)) __PYX_ERR(20, 337, __pyx_L1_error) + __pyx_tuple__628 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__628)) __PYX_ERR(20, 337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__628); + __Pyx_GIVEREF(__pyx_tuple__628); + __pyx_codeobj__629 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__628, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_dtd_pxi, __pyx_n_s_entities, 337, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__629)) __PYX_ERR(20, 337, __pyx_L1_error) /* "src/lxml/relaxng.pxi":154 * @@ -247605,10 +230313,10 @@ static int __Pyx_InitCachedConstants(void) { * """Parse a RelaxNG schema in compact syntax from a text string * */ - __pyx_tuple__694 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_src, __pyx_n_s_base_url, __pyx_n_s_rng_str); if (unlikely(!__pyx_tuple__694)) __PYX_ERR(21, 154, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__694); - __Pyx_GIVEREF(__pyx_tuple__694); - __pyx_codeobj__391 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__694, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_relaxng_pxi, __pyx_n_s_from_rnc_string, 154, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__391)) __PYX_ERR(21, 154, __pyx_L1_error) + __pyx_tuple__630 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_src, __pyx_n_s_base_url, __pyx_n_s_rng_str); if (unlikely(!__pyx_tuple__630)) __PYX_ERR(21, 154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__630); + __Pyx_GIVEREF(__pyx_tuple__630); + __pyx_codeobj__631 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__630, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_relaxng_pxi, __pyx_n_s_from_rnc_string, 154, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__631)) __PYX_ERR(21, 154, __pyx_L1_error) /* "src/lxml/xmlschema.pxi":21 * # XMLSchema @@ -247617,9 +230325,9 @@ static int __Pyx_InitCachedConstants(void) { * u"boolean(//xs:attribute[@default or @fixed][1])", * namespaces={u'xs': u'http://www.w3.org/2001/XMLSchema'}) */ - __pyx_tuple__695 = PyTuple_Pack(1, __pyx_kp_u_boolean_xs_attribute_default_or); if (unlikely(!__pyx_tuple__695)) __PYX_ERR(22, 21, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__695); - __Pyx_GIVEREF(__pyx_tuple__695); + __pyx_tuple__632 = PyTuple_Pack(1, __pyx_kp_u_boolean_xs_attribute_default_or); if (unlikely(!__pyx_tuple__632)) __PYX_ERR(22, 21, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__632); + __Pyx_GIVEREF(__pyx_tuple__632); /* "src/lxml/debug.pxi":7 * """Debugging support for the memory allocation in libxml2. @@ -247628,10 +230336,10 @@ static int __Pyx_InitCachedConstants(void) { * """bytes_used(self) * */ - __pyx_tuple__696 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__696)) __PYX_ERR(25, 7, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__696); - __Pyx_GIVEREF(__pyx_tuple__696); - __pyx_codeobj__394 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__696, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_debug_pxi, __pyx_n_s_bytes_used, 7, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__394)) __PYX_ERR(25, 7, __pyx_L1_error) + __pyx_tuple__633 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__633)) __PYX_ERR(25, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__633); + __Pyx_GIVEREF(__pyx_tuple__633); + __pyx_codeobj__634 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__633, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_debug_pxi, __pyx_n_s_bytes_used, 7, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__634)) __PYX_ERR(25, 7, __pyx_L1_error) /* "src/lxml/debug.pxi":16 * return tree.xmlMemUsed() @@ -247640,10 +230348,10 @@ static int __Pyx_InitCachedConstants(void) { * """blocks_used(self) * */ - __pyx_tuple__697 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__697)) __PYX_ERR(25, 16, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__697); - __Pyx_GIVEREF(__pyx_tuple__697); - __pyx_codeobj__395 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__697, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_debug_pxi, __pyx_n_s_blocks_used, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__395)) __PYX_ERR(25, 16, __pyx_L1_error) + __pyx_tuple__635 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__635)) __PYX_ERR(25, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__635); + __Pyx_GIVEREF(__pyx_tuple__635); + __pyx_codeobj__636 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__635, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_debug_pxi, __pyx_n_s_blocks_used, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__636)) __PYX_ERR(25, 16, __pyx_L1_error) /* "src/lxml/debug.pxi":25 * return tree.xmlMemBlocks() @@ -247652,10 +230360,10 @@ static int __Pyx_InitCachedConstants(void) { * """dict_size(self) * */ - __pyx_tuple__698 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_c_dict); if (unlikely(!__pyx_tuple__698)) __PYX_ERR(25, 25, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__698); - __Pyx_GIVEREF(__pyx_tuple__698); - __pyx_codeobj__396 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__698, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_debug_pxi, __pyx_n_s_dict_size, 25, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__396)) __PYX_ERR(25, 25, __pyx_L1_error) + __pyx_tuple__637 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_c_dict); if (unlikely(!__pyx_tuple__637)) __PYX_ERR(25, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__637); + __Pyx_GIVEREF(__pyx_tuple__637); + __pyx_codeobj__638 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__637, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_debug_pxi, __pyx_n_s_dict_size, 25, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__638)) __PYX_ERR(25, 25, __pyx_L1_error) /* "src/lxml/debug.pxi":36 * return tree.xmlDictSize(c_dict) @@ -247664,10 +230372,10 @@ static int __Pyx_InitCachedConstants(void) { * """dump(self, output_file=None, byte_count=None) * */ - __pyx_tuple__699 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_output_file, __pyx_n_s_byte_count, __pyx_n_s_c_count, __pyx_n_s_f); if (unlikely(!__pyx_tuple__699)) __PYX_ERR(25, 36, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__699); - __Pyx_GIVEREF(__pyx_tuple__699); - __pyx_codeobj__397 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__699, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_debug_pxi, __pyx_n_s_dump, 36, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__397)) __PYX_ERR(25, 36, __pyx_L1_error) + __pyx_tuple__639 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_output_file, __pyx_n_s_byte_count, __pyx_n_s_c_count, __pyx_n_s_f); if (unlikely(!__pyx_tuple__639)) __PYX_ERR(25, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__639); + __Pyx_GIVEREF(__pyx_tuple__639); + __pyx_codeobj__640 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__639, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_debug_pxi, __pyx_n_s_dump, 36, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__640)) __PYX_ERR(25, 36, __pyx_L1_error) /* "src/lxml/debug.pxi":66 * stdio.fclose(f) @@ -247676,10 +230384,10 @@ static int __Pyx_InitCachedConstants(void) { * """show(self, output_file=None, block_count=None) * */ - __pyx_tuple__700 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_output_file, __pyx_n_s_block_count, __pyx_n_s_f); if (unlikely(!__pyx_tuple__700)) __PYX_ERR(25, 66, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__700); - __Pyx_GIVEREF(__pyx_tuple__700); - __pyx_codeobj__398 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__700, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_debug_pxi, __pyx_n_s_show, 66, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__398)) __PYX_ERR(25, 66, __pyx_L1_error) + __pyx_tuple__641 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_output_file, __pyx_n_s_block_count, __pyx_n_s_f); if (unlikely(!__pyx_tuple__641)) __PYX_ERR(25, 66, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__641); + __Pyx_GIVEREF(__pyx_tuple__641); + __pyx_codeobj__642 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__641, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_debug_pxi, __pyx_n_s_show, 66, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__642)) __PYX_ERR(25, 66, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -247687,7 +230395,7 @@ static int __Pyx_InitCachedConstants(void) { return -1; } -static int __Pyx_InitGlobals(void) { +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { __pyx_umethod_PyBytes_Type_split.type = (PyObject*)&PyBytes_Type; __pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type; __pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; @@ -247712,13 +230420,13 @@ static int __Pyx_InitGlobals(void) { return -1; } -static int __Pyx_modinit_global_init_code(void); /*proto*/ -static int __Pyx_modinit_variable_export_code(void); /*proto*/ -static int __Pyx_modinit_function_export_code(void); /*proto*/ -static int __Pyx_modinit_type_init_code(void); /*proto*/ -static int __Pyx_modinit_type_import_code(void); /*proto*/ -static int __Pyx_modinit_variable_import_code(void); /*proto*/ -static int __Pyx_modinit_function_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ static int __Pyx_modinit_global_init_code(void) { __Pyx_RefNannyDeclarations @@ -247847,38 +230555,38 @@ static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ __pyx_type_4lxml_5etree_Error.tp_base = (&((PyTypeObject*)PyExc_Exception)[0]); - if (PyType_Ready(&__pyx_type_4lxml_5etree_Error) < 0) __PYX_ERR(0, 194, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_Error) < 0) __PYX_ERR(0, 192, __pyx_L1_error) __pyx_type_4lxml_5etree_Error.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_Error.tp_dictoffset && __pyx_type_4lxml_5etree_Error.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_Error.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "Error", (PyObject *)&__pyx_type_4lxml_5etree_Error) < 0) __PYX_ERR(0, 194, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Error, (PyObject *)&__pyx_type_4lxml_5etree_Error) < 0) __PYX_ERR(0, 192, __pyx_L1_error) __pyx_ptype_4lxml_5etree_Error = &__pyx_type_4lxml_5etree_Error; __pyx_type_4lxml_5etree_LxmlError.tp_base = __pyx_ptype_4lxml_5etree_Error; - if (PyType_Ready(&__pyx_type_4lxml_5etree_LxmlError) < 0) __PYX_ERR(0, 198, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_LxmlError) < 0) __PYX_ERR(0, 196, __pyx_L1_error) __pyx_type_4lxml_5etree_LxmlError.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_LxmlError.tp_dictoffset && __pyx_type_4lxml_5etree_LxmlError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_LxmlError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "LxmlError", (PyObject *)&__pyx_type_4lxml_5etree_LxmlError) < 0) __PYX_ERR(0, 198, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LxmlError, (PyObject *)&__pyx_type_4lxml_5etree_LxmlError) < 0) __PYX_ERR(0, 196, __pyx_L1_error) __pyx_ptype_4lxml_5etree_LxmlError = &__pyx_type_4lxml_5etree_LxmlError; __pyx_type_4lxml_5etree_C14NError.tp_base = __pyx_ptype_4lxml_5etree_LxmlError; - if (PyType_Ready(&__pyx_type_4lxml_5etree_C14NError) < 0) __PYX_ERR(0, 217, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_C14NError) < 0) __PYX_ERR(0, 215, __pyx_L1_error) __pyx_type_4lxml_5etree_C14NError.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_C14NError.tp_dictoffset && __pyx_type_4lxml_5etree_C14NError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_C14NError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "C14NError", (PyObject *)&__pyx_type_4lxml_5etree_C14NError) < 0) __PYX_ERR(0, 217, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_C14NError, (PyObject *)&__pyx_type_4lxml_5etree_C14NError) < 0) __PYX_ERR(0, 215, __pyx_L1_error) __pyx_ptype_4lxml_5etree_C14NError = &__pyx_type_4lxml_5etree_C14NError; __pyx_vtabptr_4lxml_5etree__TempStore = &__pyx_vtable_4lxml_5etree__TempStore; __pyx_vtable_4lxml_5etree__TempStore.add = (int (*)(struct __pyx_obj_4lxml_5etree__TempStore *, PyObject *))__pyx_f_4lxml_5etree_10_TempStore_add; __pyx_vtable_4lxml_5etree__TempStore.clear = (int (*)(struct __pyx_obj_4lxml_5etree__TempStore *))__pyx_f_4lxml_5etree_10_TempStore_clear; - if (PyType_Ready(&__pyx_type_4lxml_5etree__TempStore) < 0) __PYX_ERR(0, 271, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__TempStore) < 0) __PYX_ERR(0, 269, __pyx_L1_error) __pyx_type_4lxml_5etree__TempStore.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__TempStore.tp_dictoffset && __pyx_type_4lxml_5etree__TempStore.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__TempStore.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__TempStore.tp_dict, __pyx_vtabptr_4lxml_5etree__TempStore) < 0) __PYX_ERR(0, 271, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__TempStore.tp_dict, __pyx_vtabptr_4lxml_5etree__TempStore) < 0) __PYX_ERR(0, 269, __pyx_L1_error) __pyx_ptype_4lxml_5etree__TempStore = &__pyx_type_4lxml_5etree__TempStore; __pyx_vtabptr_4lxml_5etree__ExceptionContext = &__pyx_vtable_4lxml_5etree__ExceptionContext; __pyx_vtable_4lxml_5etree__ExceptionContext.clear = (int (*)(struct __pyx_obj_4lxml_5etree__ExceptionContext *))__pyx_f_4lxml_5etree_17_ExceptionContext_clear; @@ -247886,12 +230594,12 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_4lxml_5etree__ExceptionContext._store_exception = (int (*)(struct __pyx_obj_4lxml_5etree__ExceptionContext *, PyObject *))__pyx_f_4lxml_5etree_17_ExceptionContext__store_exception; __pyx_vtable_4lxml_5etree__ExceptionContext._has_raised = (int (*)(struct __pyx_obj_4lxml_5etree__ExceptionContext *))__pyx_f_4lxml_5etree_17_ExceptionContext__has_raised; __pyx_vtable_4lxml_5etree__ExceptionContext._raise_if_stored = (int (*)(struct __pyx_obj_4lxml_5etree__ExceptionContext *))__pyx_f_4lxml_5etree_17_ExceptionContext__raise_if_stored; - if (PyType_Ready(&__pyx_type_4lxml_5etree__ExceptionContext) < 0) __PYX_ERR(0, 287, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__ExceptionContext) < 0) __PYX_ERR(0, 285, __pyx_L1_error) __pyx_type_4lxml_5etree__ExceptionContext.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__ExceptionContext.tp_dictoffset && __pyx_type_4lxml_5etree__ExceptionContext.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__ExceptionContext.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ExceptionContext.tp_dict, __pyx_vtabptr_4lxml_5etree__ExceptionContext) < 0) __PYX_ERR(0, 287, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ExceptionContext.tp_dict, __pyx_vtabptr_4lxml_5etree__ExceptionContext) < 0) __PYX_ERR(0, 285, __pyx_L1_error) __pyx_ptype_4lxml_5etree__ExceptionContext = &__pyx_type_4lxml_5etree__ExceptionContext; __pyx_vtabptr_4lxml_5etree__LogEntry = &__pyx_vtable_4lxml_5etree__LogEntry; __pyx_vtable_4lxml_5etree__LogEntry._setError = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__LogEntry *, xmlError *))__pyx_f_4lxml_5etree_9_LogEntry__setError; @@ -247902,7 +230610,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_4lxml_5etree__LogEntry.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__LogEntry.tp_dict, __pyx_vtabptr_4lxml_5etree__LogEntry) < 0) __PYX_ERR(1, 38, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "_LogEntry", (PyObject *)&__pyx_type_4lxml_5etree__LogEntry) < 0) __PYX_ERR(1, 38, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LogEntry, (PyObject *)&__pyx_type_4lxml_5etree__LogEntry) < 0) __PYX_ERR(1, 38, __pyx_L1_error) __pyx_ptype_4lxml_5etree__LogEntry = &__pyx_type_4lxml_5etree__LogEntry; __pyx_vtabptr_4lxml_5etree__BaseErrorLog = &__pyx_vtable_4lxml_5etree__BaseErrorLog; __pyx_vtable_4lxml_5etree__BaseErrorLog.copy = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_13_BaseErrorLog_copy; @@ -247917,7 +230625,7 @@ static int __Pyx_modinit_type_init_code(void) { __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_SetAttrString(__pyx_m, "_BaseErrorLog", (PyObject *)&__pyx_type_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) __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; @@ -247929,7 +230637,7 @@ static int __Pyx_modinit_type_init_code(void) { __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_SetAttrString(__pyx_m, "_ListErrorLog", (PyObject *)&__pyx_type_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) __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; @@ -247956,7 +230664,7 @@ static int __Pyx_modinit_type_init_code(void) { __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_SetAttrString(__pyx_m, "_ErrorLog", (PyObject *)&__pyx_type_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) __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; @@ -247968,7 +230676,7 @@ static int __Pyx_modinit_type_init_code(void) { __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_SetAttrString(__pyx_m, "_DomainErrorLog", (PyObject *)&__pyx_type_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) __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; @@ -247980,7 +230688,7 @@ static int __Pyx_modinit_type_init_code(void) { __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_SetAttrString(__pyx_m, "_RotatingErrorLog", (PyObject *)&__pyx_type_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) __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; @@ -247993,7 +230701,7 @@ static int __Pyx_modinit_type_init_code(void) { __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_SetAttrString(__pyx_m, "PyErrorLog", (PyObject *)&__pyx_type_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) __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; @@ -248004,32 +230712,32 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_4lxml_5etree__Document.buildNewPrefix = (PyObject *(*)(struct LxmlDocument *))__pyx_f_4lxml_5etree_9_Document_buildNewPrefix; __pyx_vtable_4lxml_5etree__Document._findOrBuildNodeNs = (xmlNs *(*)(struct LxmlDocument *, xmlNode *, const xmlChar *, const xmlChar *, int))__pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs; __pyx_vtable_4lxml_5etree__Document._setNodeNs = (int (*)(struct LxmlDocument *, xmlNode *, const xmlChar *))__pyx_f_4lxml_5etree_9_Document__setNodeNs; - if (PyType_Ready(&LxmlDocumentType) < 0) __PYX_ERR(0, 336, __pyx_L1_error) + if (PyType_Ready(&LxmlDocumentType) < 0) __PYX_ERR(0, 334, __pyx_L1_error) LxmlDocumentType.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!LxmlDocumentType.tp_dictoffset && LxmlDocumentType.tp_getattro == PyObject_GenericGetAttr)) { LxmlDocumentType.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } - if (__Pyx_SetVtable(LxmlDocumentType.tp_dict, __pyx_vtabptr_4lxml_5etree__Document) < 0) __PYX_ERR(0, 336, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "_Document", (PyObject *)&LxmlDocumentType) < 0) __PYX_ERR(0, 336, __pyx_L1_error) + if (__Pyx_SetVtable(LxmlDocumentType.tp_dict, __pyx_vtabptr_4lxml_5etree__Document) < 0) __PYX_ERR(0, 334, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Document, (PyObject *)&LxmlDocumentType) < 0) __PYX_ERR(0, 334, __pyx_L1_error) __pyx_ptype_4lxml_5etree__Document = &LxmlDocumentType; __pyx_vtabptr_4lxml_5etree_DocInfo = &__pyx_vtable_4lxml_5etree_DocInfo; __pyx_vtable_4lxml_5etree_DocInfo._get_c_dtd = (xmlDtd *(*)(struct __pyx_obj_4lxml_5etree_DocInfo *))__pyx_f_4lxml_5etree_7DocInfo__get_c_dtd; - if (PyType_Ready(&__pyx_type_4lxml_5etree_DocInfo) < 0) __PYX_ERR(0, 510, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_DocInfo) < 0) __PYX_ERR(0, 508, __pyx_L1_error) __pyx_type_4lxml_5etree_DocInfo.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_DocInfo.tp_dictoffset && __pyx_type_4lxml_5etree_DocInfo.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_DocInfo.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_DocInfo.tp_dict, __pyx_vtabptr_4lxml_5etree_DocInfo) < 0) __PYX_ERR(0, 510, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "DocInfo", (PyObject *)&__pyx_type_4lxml_5etree_DocInfo) < 0) __PYX_ERR(0, 510, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_DocInfo.tp_dict, __pyx_vtabptr_4lxml_5etree_DocInfo) < 0) __PYX_ERR(0, 508, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DocInfo, (PyObject *)&__pyx_type_4lxml_5etree_DocInfo) < 0) __PYX_ERR(0, 508, __pyx_L1_error) __pyx_ptype_4lxml_5etree_DocInfo = &__pyx_type_4lxml_5etree_DocInfo; - if (PyType_Ready(&LxmlElementType) < 0) __PYX_ERR(0, 685, __pyx_L1_error) + if (PyType_Ready(&LxmlElementType) < 0) __PYX_ERR(0, 683, __pyx_L1_error) LxmlElementType.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!LxmlElementType.tp_dictoffset && LxmlElementType.tp_getattro == PyObject_GenericGetAttr)) { LxmlElementType.tp_getattro = __Pyx_PyObject_GenericGetAttr; } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&LxmlElementType, "__setitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 685, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&LxmlElementType, "__setitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 683, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_4lxml_5etree_8_Element_4__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_4lxml_5etree_8_Element_4__setitem__.doc = __pyx_doc_4lxml_5etree_8_Element_4__setitem__; @@ -248039,7 +230747,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&LxmlElementType, "__delitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 685, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&LxmlElementType, "__delitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 683, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_4lxml_5etree_8_Element_6__delitem__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_4lxml_5etree_8_Element_6__delitem__.doc = __pyx_doc_4lxml_5etree_8_Element_6__delitem__; @@ -248049,7 +230757,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&LxmlElementType, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 685, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&LxmlElementType, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 683, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_4lxml_5etree_8_Element_30__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_4lxml_5etree_8_Element_30__repr__.doc = __pyx_doc_4lxml_5etree_8_Element_30__repr__; @@ -248059,7 +230767,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&LxmlElementType, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 685, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&LxmlElementType, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 683, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_4lxml_5etree_8_Element_32__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_4lxml_5etree_8_Element_32__getitem__.doc = __pyx_doc_4lxml_5etree_8_Element_32__getitem__; @@ -248069,7 +230777,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&LxmlElementType, "__len__"); if (unlikely(!wrapper)) __PYX_ERR(0, 685, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&LxmlElementType, "__len__"); if (unlikely(!wrapper)) __PYX_ERR(0, 683, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_4lxml_5etree_8_Element_34__len__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_4lxml_5etree_8_Element_34__len__.doc = __pyx_doc_4lxml_5etree_8_Element_34__len__; @@ -248079,7 +230787,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&LxmlElementType, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 685, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&LxmlElementType, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 683, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_4lxml_5etree_8_Element_38__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_4lxml_5etree_8_Element_38__contains__.doc = __pyx_doc_4lxml_5etree_8_Element_38__contains__; @@ -248089,7 +230797,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&LxmlElementType, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 685, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&LxmlElementType, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 683, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_4lxml_5etree_8_Element_40__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_4lxml_5etree_8_Element_40__iter__.doc = __pyx_doc_4lxml_5etree_8_Element_40__iter__; @@ -248097,19 +230805,19 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (PyObject_SetAttrString(__pyx_m, "_Element", (PyObject *)&LxmlElementType) < 0) __PYX_ERR(0, 685, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Element_2, (PyObject *)&LxmlElementType) < 0) __PYX_ERR(0, 683, __pyx_L1_error) __pyx_ptype_4lxml_5etree__Element = &LxmlElementType; __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, 1625, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree___ContentOnlyElement) < 0) __PYX_ERR(0, 1623, __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, 1625, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree___ContentOnlyElement, "__setitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1623, __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__; @@ -248119,7 +230827,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, 1625, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree___ContentOnlyElement, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1623, __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__; @@ -248129,7 +230837,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, 1625, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree___ContentOnlyElement, "__len__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1623, __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__; @@ -248137,66 +230845,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, 1625, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree___ContentOnlyElement.tp_dict, __pyx_vtabptr_4lxml_5etree___ContentOnlyElement) < 0) __PYX_ERR(0, 1623, __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, 1692, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__Comment) < 0) __PYX_ERR(0, 1690, __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, 1692, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "_Comment", (PyObject *)&__pyx_type_4lxml_5etree__Comment) < 0) __PYX_ERR(0, 1692, __pyx_L1_error) + 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) __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, 1700, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__ProcessingInstruction) < 0) __PYX_ERR(0, 1698, __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, 1700, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "_ProcessingInstruction", (PyObject *)&__pyx_type_4lxml_5etree__ProcessingInstruction) < 0) __PYX_ERR(0, 1700, __pyx_L1_error) + 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) __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, 1751, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__Entity) < 0) __PYX_ERR(0, 1749, __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, 1751, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "_Entity", (PyObject *)&__pyx_type_4lxml_5etree__Entity) < 0) __PYX_ERR(0, 1751, __pyx_L1_error) + 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) __pyx_ptype_4lxml_5etree__Entity = &__pyx_type_4lxml_5etree__Entity; - if (PyType_Ready(&__pyx_type_4lxml_5etree_QName) < 0) __PYX_ERR(0, 1780, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_QName) < 0) __PYX_ERR(0, 1778, __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_SetAttrString(__pyx_m, "QName", (PyObject *)&__pyx_type_4lxml_5etree_QName) < 0) __PYX_ERR(0, 1780, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_QName, (PyObject *)&__pyx_type_4lxml_5etree_QName) < 0) __PYX_ERR(0, 1778, __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, 1849, __pyx_L1_error) + if (PyType_Ready(&LxmlElementTreeType) < 0) __PYX_ERR(0, 1847, __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, 1849, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "_ElementTree", (PyObject *)&LxmlElementTreeType) < 0) __PYX_ERR(0, 1849, __pyx_L1_error) + 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) __pyx_ptype_4lxml_5etree__ElementTree = &LxmlElementTreeType; - if (PyType_Ready(&__pyx_type_4lxml_5etree__Attrib) < 0) __PYX_ERR(0, 2397, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__Attrib) < 0) __PYX_ERR(0, 2395, __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_SetAttrString(__pyx_m, "_Attrib", (PyObject *)&__pyx_type_4lxml_5etree__Attrib) < 0) __PYX_ERR(0, 2397, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Attrib, (PyObject *)&__pyx_type_4lxml_5etree__Attrib) < 0) __PYX_ERR(0, 2395, __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, 2535, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__AttribIterator) < 0) __PYX_ERR(0, 2533, __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; @@ -248204,25 +230912,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, 2576, __pyx_L1_error) + if (PyType_Ready(&LxmlElementTagMatcherType) < 0) __PYX_ERR(0, 2574, __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, 2576, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "_ElementTagMatcher", (PyObject *)&LxmlElementTagMatcherType) < 0) __PYX_ERR(0, 2576, __pyx_L1_error) + 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) __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, 2607, __pyx_L1_error) + if (PyType_Ready(&LxmlElementIteratorType) < 0) __PYX_ERR(0, 2605, __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, 2607, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "_ElementIterator", (PyObject *)&LxmlElementIteratorType) < 0) __PYX_ERR(0, 2607, __pyx_L1_error) + 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) __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; @@ -248235,81 +230943,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, 2644, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__MultiTagMatcher) < 0) __PYX_ERR(0, 2642, __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, 2644, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__MultiTagMatcher.tp_dict, __pyx_vtabptr_4lxml_5etree__MultiTagMatcher) < 0) __PYX_ERR(0, 2642, __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, 2781, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__ElementMatchIterator) < 0) __PYX_ERR(0, 2779, __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, 2781, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "_ElementMatchIterator", (PyObject *)&__pyx_type_4lxml_5etree__ElementMatchIterator) < 0) __PYX_ERR(0, 2781, __pyx_L1_error) + 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) __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, 2810, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_ElementChildIterator) < 0) __PYX_ERR(0, 2808, __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, 2810, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "ElementChildIterator", (PyObject *)&__pyx_type_4lxml_5etree_ElementChildIterator) < 0) __PYX_ERR(0, 2810, __pyx_L1_error) + 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) __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, 2830, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_SiblingsIterator) < 0) __PYX_ERR(0, 2828, __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, 2830, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "SiblingsIterator", (PyObject *)&__pyx_type_4lxml_5etree_SiblingsIterator) < 0) __PYX_ERR(0, 2830, __pyx_L1_error) + 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) __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, 2845, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_AncestorsIterator) < 0) __PYX_ERR(0, 2843, __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, 2845, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "AncestorsIterator", (PyObject *)&__pyx_type_4lxml_5etree_AncestorsIterator) < 0) __PYX_ERR(0, 2845, __pyx_L1_error) + 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) __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, 2855, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_ElementDepthFirstIterator) < 0) __PYX_ERR(0, 2853, __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, 2855, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "ElementDepthFirstIterator", (PyObject *)&__pyx_type_4lxml_5etree_ElementDepthFirstIterator) < 0) __PYX_ERR(0, 2855, __pyx_L1_error) + 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) __pyx_ptype_4lxml_5etree_ElementDepthFirstIterator = &__pyx_type_4lxml_5etree_ElementDepthFirstIterator; - if (PyType_Ready(&__pyx_type_4lxml_5etree_ElementTextIterator) < 0) __PYX_ERR(0, 2931, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_ElementTextIterator) < 0) __PYX_ERR(0, 2929, __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_SetAttrString(__pyx_m, "ElementTextIterator", (PyObject *)&__pyx_type_4lxml_5etree_ElementTextIterator) < 0) __PYX_ERR(0, 2931, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ElementTextIterator, (PyObject *)&__pyx_type_4lxml_5etree_ElementTextIterator) < 0) __PYX_ERR(0, 2929, __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, 3057, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_CDATA) < 0) __PYX_ERR(0, 3055, __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_SetAttrString(__pyx_m, "CDATA", (PyObject *)&__pyx_type_4lxml_5etree_CDATA) < 0) __PYX_ERR(0, 3057, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CDATA, (PyObject *)&__pyx_type_4lxml_5etree_CDATA) < 0) __PYX_ERR(0, 3055, __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; @@ -248448,7 +231156,7 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (PyObject_SetAttrString(__pyx_m, "ElementBase", (PyObject *)&LxmlElementBaseType) < 0) __PYX_ERR(7, 6, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ElementBase, (PyObject *)&LxmlElementBaseType) < 0) __PYX_ERR(7, 6, __pyx_L1_error) __pyx_ptype_4lxml_5etree_ElementBase = &LxmlElementBaseType; __pyx_vtabptr_4lxml_5etree_CommentBase = &__pyx_vtable_4lxml_5etree_CommentBase; __pyx_vtable_4lxml_5etree_CommentBase.__pyx_base = *__pyx_vtabptr_4lxml_5etree__Comment; @@ -248459,7 +231167,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_4lxml_5etree_CommentBase.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_CommentBase.tp_dict, __pyx_vtabptr_4lxml_5etree_CommentBase) < 0) __PYX_ERR(7, 97, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "CommentBase", (PyObject *)&__pyx_type_4lxml_5etree_CommentBase) < 0) __PYX_ERR(7, 97, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CommentBase, (PyObject *)&__pyx_type_4lxml_5etree_CommentBase) < 0) __PYX_ERR(7, 97, __pyx_L1_error) __pyx_ptype_4lxml_5etree_CommentBase = &__pyx_type_4lxml_5etree_CommentBase; __pyx_vtabptr_4lxml_5etree_PIBase = &__pyx_vtable_4lxml_5etree_PIBase; __pyx_vtable_4lxml_5etree_PIBase.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ProcessingInstruction; @@ -248470,7 +231178,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_4lxml_5etree_PIBase.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_PIBase.tp_dict, __pyx_vtabptr_4lxml_5etree_PIBase) < 0) __PYX_ERR(7, 126, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "PIBase", (PyObject *)&__pyx_type_4lxml_5etree_PIBase) < 0) __PYX_ERR(7, 126, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PIBase, (PyObject *)&__pyx_type_4lxml_5etree_PIBase) < 0) __PYX_ERR(7, 126, __pyx_L1_error) __pyx_ptype_4lxml_5etree_PIBase = &__pyx_type_4lxml_5etree_PIBase; __pyx_vtabptr_4lxml_5etree_EntityBase = &__pyx_vtable_4lxml_5etree_EntityBase; __pyx_vtable_4lxml_5etree_EntityBase.__pyx_base = *__pyx_vtabptr_4lxml_5etree__Entity; @@ -248481,14 +231189,14 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_4lxml_5etree_EntityBase.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_EntityBase.tp_dict, __pyx_vtabptr_4lxml_5etree_EntityBase) < 0) __PYX_ERR(7, 157, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "EntityBase", (PyObject *)&__pyx_type_4lxml_5etree_EntityBase) < 0) __PYX_ERR(7, 157, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EntityBase, (PyObject *)&__pyx_type_4lxml_5etree_EntityBase) < 0) __PYX_ERR(7, 157, __pyx_L1_error) __pyx_ptype_4lxml_5etree_EntityBase = &__pyx_type_4lxml_5etree_EntityBase; if (PyType_Ready(&LxmlElementClassLookupType) < 0) __PYX_ERR(7, 213, __pyx_L1_error) LxmlElementClassLookupType.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!LxmlElementClassLookupType.tp_dictoffset && LxmlElementClassLookupType.tp_getattro == PyObject_GenericGetAttr)) { LxmlElementClassLookupType.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "ElementClassLookup", (PyObject *)&LxmlElementClassLookupType) < 0) __PYX_ERR(7, 213, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ElementClassLookup, (PyObject *)&LxmlElementClassLookupType) < 0) __PYX_ERR(7, 213, __pyx_L1_error) __pyx_ptype_4lxml_5etree_ElementClassLookup = &LxmlElementClassLookupType; __pyx_vtabptr_4lxml_5etree_FallbackElementClassLookup = &__pyx_vtable_4lxml_5etree_FallbackElementClassLookup; __pyx_vtable_4lxml_5etree_FallbackElementClassLookup._setFallback = (void (*)(struct LxmlFallbackElementClassLookup *, struct LxmlElementClassLookup *))__pyx_f_4lxml_5etree_26FallbackElementClassLookup__setFallback; @@ -248499,7 +231207,7 @@ static int __Pyx_modinit_type_init_code(void) { LxmlFallbackElementClassLookupType.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(LxmlFallbackElementClassLookupType.tp_dict, __pyx_vtabptr_4lxml_5etree_FallbackElementClassLookup) < 0) __PYX_ERR(7, 221, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "FallbackElementClassLookup", (PyObject *)&LxmlFallbackElementClassLookupType) < 0) __PYX_ERR(7, 221, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FallbackElementClassLookup, (PyObject *)&LxmlFallbackElementClassLookupType) < 0) __PYX_ERR(7, 221, __pyx_L1_error) __pyx_ptype_4lxml_5etree_FallbackElementClassLookup = &LxmlFallbackElementClassLookupType; __pyx_type_4lxml_5etree_ElementDefaultClassLookup.tp_base = __pyx_ptype_4lxml_5etree_ElementClassLookup; if (PyType_Ready(&__pyx_type_4lxml_5etree_ElementDefaultClassLookup) < 0) __PYX_ERR(7, 263, __pyx_L1_error) @@ -248507,7 +231215,7 @@ static int __Pyx_modinit_type_init_code(void) { if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_ElementDefaultClassLookup.tp_dictoffset && __pyx_type_4lxml_5etree_ElementDefaultClassLookup.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_ElementDefaultClassLookup.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "ElementDefaultClassLookup", (PyObject *)&__pyx_type_4lxml_5etree_ElementDefaultClassLookup) < 0) __PYX_ERR(7, 263, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ElementDefaultClassLookup, (PyObject *)&__pyx_type_4lxml_5etree_ElementDefaultClassLookup) < 0) __PYX_ERR(7, 263, __pyx_L1_error) __pyx_ptype_4lxml_5etree_ElementDefaultClassLookup = &__pyx_type_4lxml_5etree_ElementDefaultClassLookup; __pyx_vtabptr_4lxml_5etree_AttributeBasedElementClassLookup = &__pyx_vtable_4lxml_5etree_AttributeBasedElementClassLookup; __pyx_vtable_4lxml_5etree_AttributeBasedElementClassLookup.__pyx_base = *__pyx_vtabptr_4lxml_5etree_FallbackElementClassLookup; @@ -248518,7 +231226,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_4lxml_5etree_AttributeBasedElementClassLookup.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_AttributeBasedElementClassLookup.tp_dict, __pyx_vtabptr_4lxml_5etree_AttributeBasedElementClassLookup) < 0) __PYX_ERR(7, 342, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "AttributeBasedElementClassLookup", (PyObject *)&__pyx_type_4lxml_5etree_AttributeBasedElementClassLookup) < 0) __PYX_ERR(7, 342, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AttributeBasedElementClassLookup, (PyObject *)&__pyx_type_4lxml_5etree_AttributeBasedElementClassLookup) < 0) __PYX_ERR(7, 342, __pyx_L1_error) __pyx_ptype_4lxml_5etree_AttributeBasedElementClassLookup = &__pyx_type_4lxml_5etree_AttributeBasedElementClassLookup; __pyx_vtabptr_4lxml_5etree_ParserBasedElementClassLookup = &__pyx_vtable_4lxml_5etree_ParserBasedElementClassLookup; __pyx_vtable_4lxml_5etree_ParserBasedElementClassLookup.__pyx_base = *__pyx_vtabptr_4lxml_5etree_FallbackElementClassLookup; @@ -248529,7 +231237,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_4lxml_5etree_ParserBasedElementClassLookup.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_ParserBasedElementClassLookup.tp_dict, __pyx_vtabptr_4lxml_5etree_ParserBasedElementClassLookup) < 0) __PYX_ERR(7, 394, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "ParserBasedElementClassLookup", (PyObject *)&__pyx_type_4lxml_5etree_ParserBasedElementClassLookup) < 0) __PYX_ERR(7, 394, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ParserBasedElementClassLookup, (PyObject *)&__pyx_type_4lxml_5etree_ParserBasedElementClassLookup) < 0) __PYX_ERR(7, 394, __pyx_L1_error) __pyx_ptype_4lxml_5etree_ParserBasedElementClassLookup = &__pyx_type_4lxml_5etree_ParserBasedElementClassLookup; __pyx_vtabptr_4lxml_5etree_CustomElementClassLookup = &__pyx_vtable_4lxml_5etree_CustomElementClassLookup; __pyx_vtable_4lxml_5etree_CustomElementClassLookup.__pyx_base = *__pyx_vtabptr_4lxml_5etree_FallbackElementClassLookup; @@ -248540,7 +231248,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_4lxml_5etree_CustomElementClassLookup.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_CustomElementClassLookup.tp_dict, __pyx_vtabptr_4lxml_5etree_CustomElementClassLookup) < 0) __PYX_ERR(7, 411, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "CustomElementClassLookup", (PyObject *)&__pyx_type_4lxml_5etree_CustomElementClassLookup) < 0) __PYX_ERR(7, 411, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CustomElementClassLookup, (PyObject *)&__pyx_type_4lxml_5etree_CustomElementClassLookup) < 0) __PYX_ERR(7, 411, __pyx_L1_error) __pyx_ptype_4lxml_5etree_CustomElementClassLookup = &__pyx_type_4lxml_5etree_CustomElementClassLookup; __pyx_vtabptr_4lxml_5etree_PythonElementClassLookup = &__pyx_vtable_4lxml_5etree_PythonElementClassLookup; __pyx_vtable_4lxml_5etree_PythonElementClassLookup.__pyx_base = *__pyx_vtabptr_4lxml_5etree_FallbackElementClassLookup; @@ -248551,107 +231259,107 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_4lxml_5etree_PythonElementClassLookup.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_PythonElementClassLookup.tp_dict, __pyx_vtabptr_4lxml_5etree_PythonElementClassLookup) < 0) __PYX_ERR(7, 466, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "PythonElementClassLookup", (PyObject *)&__pyx_type_4lxml_5etree_PythonElementClassLookup) < 0) __PYX_ERR(7, 466, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PythonElementClassLookup, (PyObject *)&__pyx_type_4lxml_5etree_PythonElementClassLookup) < 0) __PYX_ERR(7, 466, __pyx_L1_error) __pyx_ptype_4lxml_5etree_PythonElementClassLookup = &__pyx_type_4lxml_5etree_PythonElementClassLookup; __pyx_type_4lxml_5etree_LxmlRegistryError.tp_base = __pyx_ptype_4lxml_5etree_LxmlError; - if (PyType_Ready(&__pyx_type_4lxml_5etree_LxmlRegistryError) < 0) __PYX_ERR(9, 3, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_LxmlRegistryError) < 0) __PYX_ERR(10, 3, __pyx_L1_error) __pyx_type_4lxml_5etree_LxmlRegistryError.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_LxmlRegistryError.tp_dictoffset && __pyx_type_4lxml_5etree_LxmlRegistryError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_LxmlRegistryError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "LxmlRegistryError", (PyObject *)&__pyx_type_4lxml_5etree_LxmlRegistryError) < 0) __PYX_ERR(9, 3, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LxmlRegistryError, (PyObject *)&__pyx_type_4lxml_5etree_LxmlRegistryError) < 0) __PYX_ERR(10, 3, __pyx_L1_error) __pyx_ptype_4lxml_5etree_LxmlRegistryError = &__pyx_type_4lxml_5etree_LxmlRegistryError; __pyx_type_4lxml_5etree_NamespaceRegistryError.tp_base = __pyx_ptype_4lxml_5etree_LxmlRegistryError; - if (PyType_Ready(&__pyx_type_4lxml_5etree_NamespaceRegistryError) < 0) __PYX_ERR(9, 7, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_NamespaceRegistryError) < 0) __PYX_ERR(10, 7, __pyx_L1_error) __pyx_type_4lxml_5etree_NamespaceRegistryError.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_NamespaceRegistryError.tp_dictoffset && __pyx_type_4lxml_5etree_NamespaceRegistryError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_NamespaceRegistryError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "NamespaceRegistryError", (PyObject *)&__pyx_type_4lxml_5etree_NamespaceRegistryError) < 0) __PYX_ERR(9, 7, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_NamespaceRegistryError, (PyObject *)&__pyx_type_4lxml_5etree_NamespaceRegistryError) < 0) __PYX_ERR(10, 7, __pyx_L1_error) __pyx_ptype_4lxml_5etree_NamespaceRegistryError = &__pyx_type_4lxml_5etree_NamespaceRegistryError; __pyx_vtabptr_4lxml_5etree__NamespaceRegistry = &__pyx_vtable_4lxml_5etree__NamespaceRegistry; __pyx_vtable_4lxml_5etree__NamespaceRegistry._get = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__NamespaceRegistry *, PyObject *))__pyx_f_4lxml_5etree_18_NamespaceRegistry__get; __pyx_vtable_4lxml_5etree__NamespaceRegistry._getForString = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__NamespaceRegistry *, char *))__pyx_f_4lxml_5etree_18_NamespaceRegistry__getForString; - if (PyType_Ready(&__pyx_type_4lxml_5etree__NamespaceRegistry) < 0) __PYX_ERR(9, 13, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__NamespaceRegistry) < 0) __PYX_ERR(10, 13, __pyx_L1_error) __pyx_type_4lxml_5etree__NamespaceRegistry.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__NamespaceRegistry.tp_dictoffset && __pyx_type_4lxml_5etree__NamespaceRegistry.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__NamespaceRegistry.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__NamespaceRegistry.tp_dict, __pyx_vtabptr_4lxml_5etree__NamespaceRegistry) < 0) __PYX_ERR(9, 13, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__NamespaceRegistry.tp_dict, __pyx_vtabptr_4lxml_5etree__NamespaceRegistry) < 0) __PYX_ERR(10, 13, __pyx_L1_error) __pyx_ptype_4lxml_5etree__NamespaceRegistry = &__pyx_type_4lxml_5etree__NamespaceRegistry; __pyx_vtabptr_4lxml_5etree__ClassNamespaceRegistry = &__pyx_vtable_4lxml_5etree__ClassNamespaceRegistry; __pyx_vtable_4lxml_5etree__ClassNamespaceRegistry.__pyx_base = *__pyx_vtabptr_4lxml_5etree__NamespaceRegistry; __pyx_type_4lxml_5etree__ClassNamespaceRegistry.tp_base = __pyx_ptype_4lxml_5etree__NamespaceRegistry; - if (PyType_Ready(&__pyx_type_4lxml_5etree__ClassNamespaceRegistry) < 0) __PYX_ERR(9, 106, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__ClassNamespaceRegistry) < 0) __PYX_ERR(10, 106, __pyx_L1_error) __pyx_type_4lxml_5etree__ClassNamespaceRegistry.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__ClassNamespaceRegistry.tp_dictoffset && __pyx_type_4lxml_5etree__ClassNamespaceRegistry.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__ClassNamespaceRegistry.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ClassNamespaceRegistry.tp_dict, __pyx_vtabptr_4lxml_5etree__ClassNamespaceRegistry) < 0) __PYX_ERR(9, 106, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ClassNamespaceRegistry.tp_dict, __pyx_vtabptr_4lxml_5etree__ClassNamespaceRegistry) < 0) __PYX_ERR(10, 106, __pyx_L1_error) __pyx_ptype_4lxml_5etree__ClassNamespaceRegistry = &__pyx_type_4lxml_5etree__ClassNamespaceRegistry; __pyx_vtabptr_4lxml_5etree_ElementNamespaceClassLookup = &__pyx_vtable_4lxml_5etree_ElementNamespaceClassLookup; __pyx_vtable_4lxml_5etree_ElementNamespaceClassLookup.__pyx_base = *__pyx_vtabptr_4lxml_5etree_FallbackElementClassLookup; __pyx_type_4lxml_5etree_ElementNamespaceClassLookup.tp_base = __pyx_ptype_4lxml_5etree_FallbackElementClassLookup; - if (PyType_Ready(&__pyx_type_4lxml_5etree_ElementNamespaceClassLookup) < 0) __PYX_ERR(9, 120, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_ElementNamespaceClassLookup) < 0) __PYX_ERR(10, 120, __pyx_L1_error) __pyx_type_4lxml_5etree_ElementNamespaceClassLookup.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_ElementNamespaceClassLookup.tp_dictoffset && __pyx_type_4lxml_5etree_ElementNamespaceClassLookup.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_ElementNamespaceClassLookup.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_ElementNamespaceClassLookup.tp_dict, __pyx_vtabptr_4lxml_5etree_ElementNamespaceClassLookup) < 0) __PYX_ERR(9, 120, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "ElementNamespaceClassLookup", (PyObject *)&__pyx_type_4lxml_5etree_ElementNamespaceClassLookup) < 0) __PYX_ERR(9, 120, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_ElementNamespaceClassLookup.tp_dict, __pyx_vtabptr_4lxml_5etree_ElementNamespaceClassLookup) < 0) __PYX_ERR(10, 120, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ElementNamespaceClassLookup, (PyObject *)&__pyx_type_4lxml_5etree_ElementNamespaceClassLookup) < 0) __PYX_ERR(10, 120, __pyx_L1_error) __pyx_ptype_4lxml_5etree_ElementNamespaceClassLookup = &__pyx_type_4lxml_5etree_ElementNamespaceClassLookup; __pyx_vtabptr_4lxml_5etree__FunctionNamespaceRegistry = &__pyx_vtable_4lxml_5etree__FunctionNamespaceRegistry; __pyx_vtable_4lxml_5etree__FunctionNamespaceRegistry.__pyx_base = *__pyx_vtabptr_4lxml_5etree__NamespaceRegistry; __pyx_type_4lxml_5etree__FunctionNamespaceRegistry.tp_base = __pyx_ptype_4lxml_5etree__NamespaceRegistry; - if (PyType_Ready(&__pyx_type_4lxml_5etree__FunctionNamespaceRegistry) < 0) __PYX_ERR(9, 237, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__FunctionNamespaceRegistry) < 0) __PYX_ERR(10, 237, __pyx_L1_error) __pyx_type_4lxml_5etree__FunctionNamespaceRegistry.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__FunctionNamespaceRegistry.tp_dictoffset && __pyx_type_4lxml_5etree__FunctionNamespaceRegistry.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__FunctionNamespaceRegistry.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__FunctionNamespaceRegistry.tp_dict, __pyx_vtabptr_4lxml_5etree__FunctionNamespaceRegistry) < 0) __PYX_ERR(9, 237, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__FunctionNamespaceRegistry.tp_dict, __pyx_vtabptr_4lxml_5etree__FunctionNamespaceRegistry) < 0) __PYX_ERR(10, 237, __pyx_L1_error) __pyx_ptype_4lxml_5etree__FunctionNamespaceRegistry = &__pyx_type_4lxml_5etree__FunctionNamespaceRegistry; __pyx_vtabptr_4lxml_5etree__XPathFunctionNamespaceRegistry = &__pyx_vtable_4lxml_5etree__XPathFunctionNamespaceRegistry; __pyx_vtable_4lxml_5etree__XPathFunctionNamespaceRegistry.__pyx_base = *__pyx_vtabptr_4lxml_5etree__FunctionNamespaceRegistry; __pyx_type_4lxml_5etree__XPathFunctionNamespaceRegistry.tp_base = __pyx_ptype_4lxml_5etree__FunctionNamespaceRegistry; - if (PyType_Ready(&__pyx_type_4lxml_5etree__XPathFunctionNamespaceRegistry) < 0) __PYX_ERR(9, 252, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__XPathFunctionNamespaceRegistry) < 0) __PYX_ERR(10, 252, __pyx_L1_error) __pyx_type_4lxml_5etree__XPathFunctionNamespaceRegistry.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__XPathFunctionNamespaceRegistry.tp_dictoffset && __pyx_type_4lxml_5etree__XPathFunctionNamespaceRegistry.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__XPathFunctionNamespaceRegistry.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__XPathFunctionNamespaceRegistry.tp_dict, __pyx_vtabptr_4lxml_5etree__XPathFunctionNamespaceRegistry) < 0) __PYX_ERR(9, 252, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__XPathFunctionNamespaceRegistry.tp_dict, __pyx_vtabptr_4lxml_5etree__XPathFunctionNamespaceRegistry) < 0) __PYX_ERR(10, 252, __pyx_L1_error) __pyx_ptype_4lxml_5etree__XPathFunctionNamespaceRegistry = &__pyx_type_4lxml_5etree__XPathFunctionNamespaceRegistry; - if (PyType_Ready(&__pyx_type_4lxml_5etree__InputDocument) < 0) __PYX_ERR(10, 12, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__InputDocument) < 0) __PYX_ERR(11, 12, __pyx_L1_error) __pyx_type_4lxml_5etree__InputDocument.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__InputDocument.tp_dictoffset && __pyx_type_4lxml_5etree__InputDocument.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__InputDocument.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_4lxml_5etree__InputDocument = &__pyx_type_4lxml_5etree__InputDocument; - if (PyType_Ready(&__pyx_type_4lxml_5etree_Resolver) < 0) __PYX_ERR(10, 23, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_Resolver) < 0) __PYX_ERR(11, 23, __pyx_L1_error) __pyx_type_4lxml_5etree_Resolver.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_Resolver.tp_dictoffset && __pyx_type_4lxml_5etree_Resolver.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_Resolver.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "Resolver", (PyObject *)&__pyx_type_4lxml_5etree_Resolver) < 0) __PYX_ERR(10, 23, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Resolver, (PyObject *)&__pyx_type_4lxml_5etree_Resolver) < 0) __PYX_ERR(11, 23, __pyx_L1_error) __pyx_ptype_4lxml_5etree_Resolver = &__pyx_type_4lxml_5etree_Resolver; __pyx_vtabptr_4lxml_5etree__ResolverRegistry = &__pyx_vtable_4lxml_5etree__ResolverRegistry; __pyx_vtable_4lxml_5etree__ResolverRegistry._copy = (struct __pyx_obj_4lxml_5etree__ResolverRegistry *(*)(struct __pyx_obj_4lxml_5etree__ResolverRegistry *))__pyx_f_4lxml_5etree_17_ResolverRegistry__copy; - if (PyType_Ready(&__pyx_type_4lxml_5etree__ResolverRegistry) < 0) __PYX_ERR(10, 113, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__ResolverRegistry) < 0) __PYX_ERR(11, 113, __pyx_L1_error) __pyx_type_4lxml_5etree__ResolverRegistry.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__ResolverRegistry.tp_dictoffset && __pyx_type_4lxml_5etree__ResolverRegistry.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__ResolverRegistry.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ResolverRegistry.tp_dict, __pyx_vtabptr_4lxml_5etree__ResolverRegistry) < 0) __PYX_ERR(10, 113, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ResolverRegistry.tp_dict, __pyx_vtabptr_4lxml_5etree__ResolverRegistry) < 0) __PYX_ERR(11, 113, __pyx_L1_error) __pyx_ptype_4lxml_5etree__ResolverRegistry = &__pyx_type_4lxml_5etree__ResolverRegistry; __pyx_vtabptr_4lxml_5etree__ResolverContext = &__pyx_vtable_4lxml_5etree__ResolverContext; __pyx_vtable_4lxml_5etree__ResolverContext.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ExceptionContext; __pyx_vtable_4lxml_5etree__ResolverContext.__pyx_base.clear = (int (*)(struct __pyx_obj_4lxml_5etree__ExceptionContext *))__pyx_f_4lxml_5etree_16_ResolverContext_clear; __pyx_type_4lxml_5etree__ResolverContext.tp_base = __pyx_ptype_4lxml_5etree__ExceptionContext; - if (PyType_Ready(&__pyx_type_4lxml_5etree__ResolverContext) < 0) __PYX_ERR(10, 162, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__ResolverContext) < 0) __PYX_ERR(11, 162, __pyx_L1_error) __pyx_type_4lxml_5etree__ResolverContext.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__ResolverContext.tp_dictoffset && __pyx_type_4lxml_5etree__ResolverContext.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__ResolverContext.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ResolverContext.tp_dict, __pyx_vtabptr_4lxml_5etree__ResolverContext) < 0) __PYX_ERR(10, 162, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ResolverContext.tp_dict, __pyx_vtabptr_4lxml_5etree__ResolverContext) < 0) __PYX_ERR(11, 162, __pyx_L1_error) __pyx_ptype_4lxml_5etree__ResolverContext = &__pyx_type_4lxml_5etree__ResolverContext; __pyx_type_4lxml_5etree_ParserError.tp_base = __pyx_ptype_4lxml_5etree_LxmlError; if (PyType_Ready(&__pyx_type_4lxml_5etree_ParserError) < 0) __PYX_ERR(2, 34, __pyx_L1_error) @@ -248659,7 +231367,7 @@ static int __Pyx_modinit_type_init_code(void) { if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_ParserError.tp_dictoffset && __pyx_type_4lxml_5etree_ParserError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_ParserError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "ParserError", (PyObject *)&__pyx_type_4lxml_5etree_ParserError) < 0) __PYX_ERR(2, 34, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ParserError, (PyObject *)&__pyx_type_4lxml_5etree_ParserError) < 0) __PYX_ERR(2, 34, __pyx_L1_error) __pyx_ptype_4lxml_5etree_ParserError = &__pyx_type_4lxml_5etree_ParserError; __pyx_vtabptr_4lxml_5etree__ParserDictionaryContext = &__pyx_vtable_4lxml_5etree__ParserDictionaryContext; __pyx_vtable_4lxml_5etree__ParserDictionaryContext.initMainParserContext = (void (*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *))__pyx_f_4lxml_5etree_24_ParserDictionaryContext_initMainParserContext; @@ -248746,7 +231454,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_4lxml_5etree__FeedParser.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__FeedParser.tp_dict, __pyx_vtabptr_4lxml_5etree__FeedParser) < 0) __PYX_ERR(2, 1230, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "_FeedParser", (PyObject *)&__pyx_type_4lxml_5etree__FeedParser) < 0) __PYX_ERR(2, 1230, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FeedParser, (PyObject *)&__pyx_type_4lxml_5etree__FeedParser) < 0) __PYX_ERR(2, 1230, __pyx_L1_error) __pyx_ptype_4lxml_5etree__FeedParser = &__pyx_type_4lxml_5etree__FeedParser; __pyx_vtabptr_4lxml_5etree_XMLParser = &__pyx_vtable_4lxml_5etree_XMLParser; __pyx_vtable_4lxml_5etree_XMLParser.__pyx_base = *__pyx_vtabptr_4lxml_5etree__FeedParser; @@ -248757,7 +231465,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_4lxml_5etree_XMLParser.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XMLParser.tp_dict, __pyx_vtabptr_4lxml_5etree_XMLParser) < 0) __PYX_ERR(2, 1441, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "XMLParser", (PyObject *)&__pyx_type_4lxml_5etree_XMLParser) < 0) __PYX_ERR(2, 1441, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_XMLParser, (PyObject *)&__pyx_type_4lxml_5etree_XMLParser) < 0) __PYX_ERR(2, 1441, __pyx_L1_error) __pyx_ptype_4lxml_5etree_XMLParser = &__pyx_type_4lxml_5etree_XMLParser; __pyx_vtabptr_4lxml_5etree_XMLPullParser = &__pyx_vtable_4lxml_5etree_XMLPullParser; __pyx_vtable_4lxml_5etree_XMLPullParser.__pyx_base = *__pyx_vtabptr_4lxml_5etree_XMLParser; @@ -248768,7 +231476,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_4lxml_5etree_XMLPullParser.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XMLPullParser.tp_dict, __pyx_vtabptr_4lxml_5etree_XMLPullParser) < 0) __PYX_ERR(2, 1525, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "XMLPullParser", (PyObject *)&__pyx_type_4lxml_5etree_XMLPullParser) < 0) __PYX_ERR(2, 1525, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_XMLPullParser, (PyObject *)&__pyx_type_4lxml_5etree_XMLPullParser) < 0) __PYX_ERR(2, 1525, __pyx_L1_error) __pyx_ptype_4lxml_5etree_XMLPullParser = &__pyx_type_4lxml_5etree_XMLPullParser; __pyx_vtabptr_4lxml_5etree_ETCompatXMLParser = &__pyx_vtable_4lxml_5etree_ETCompatXMLParser; __pyx_vtable_4lxml_5etree_ETCompatXMLParser.__pyx_base = *__pyx_vtabptr_4lxml_5etree_XMLParser; @@ -248779,7 +231487,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_4lxml_5etree_ETCompatXMLParser.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_ETCompatXMLParser.tp_dict, __pyx_vtabptr_4lxml_5etree_ETCompatXMLParser) < 0) __PYX_ERR(2, 1554, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "ETCompatXMLParser", (PyObject *)&__pyx_type_4lxml_5etree_ETCompatXMLParser) < 0) __PYX_ERR(2, 1554, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ETCompatXMLParser, (PyObject *)&__pyx_type_4lxml_5etree_ETCompatXMLParser) < 0) __PYX_ERR(2, 1554, __pyx_L1_error) __pyx_ptype_4lxml_5etree_ETCompatXMLParser = &__pyx_type_4lxml_5etree_ETCompatXMLParser; __pyx_vtabptr_4lxml_5etree_HTMLParser = &__pyx_vtable_4lxml_5etree_HTMLParser; __pyx_vtable_4lxml_5etree_HTMLParser.__pyx_base = *__pyx_vtabptr_4lxml_5etree__FeedParser; @@ -248790,7 +231498,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_4lxml_5etree_HTMLParser.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_HTMLParser.tp_dict, __pyx_vtabptr_4lxml_5etree_HTMLParser) < 0) __PYX_ERR(2, 1633, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "HTMLParser", (PyObject *)&__pyx_type_4lxml_5etree_HTMLParser) < 0) __PYX_ERR(2, 1633, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_HTMLParser, (PyObject *)&__pyx_type_4lxml_5etree_HTMLParser) < 0) __PYX_ERR(2, 1633, __pyx_L1_error) __pyx_ptype_4lxml_5etree_HTMLParser = &__pyx_type_4lxml_5etree_HTMLParser; __pyx_vtabptr_4lxml_5etree_HTMLPullParser = &__pyx_vtable_4lxml_5etree_HTMLPullParser; __pyx_vtable_4lxml_5etree_HTMLPullParser.__pyx_base = *__pyx_vtabptr_4lxml_5etree_HTMLParser; @@ -248801,7 +231509,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_4lxml_5etree_HTMLPullParser.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_HTMLPullParser.tp_dict, __pyx_vtabptr_4lxml_5etree_HTMLPullParser) < 0) __PYX_ERR(2, 1698, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "HTMLPullParser", (PyObject *)&__pyx_type_4lxml_5etree_HTMLPullParser) < 0) __PYX_ERR(2, 1698, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_HTMLPullParser, (PyObject *)&__pyx_type_4lxml_5etree_HTMLPullParser) < 0) __PYX_ERR(2, 1698, __pyx_L1_error) __pyx_ptype_4lxml_5etree_HTMLPullParser = &__pyx_type_4lxml_5etree_HTMLPullParser; __pyx_vtabptr_4lxml_5etree__SaxParserTarget = &__pyx_vtable_4lxml_5etree__SaxParserTarget; __pyx_vtable_4lxml_5etree__SaxParserTarget._handleSaxStart = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__SaxParserTarget *, PyObject *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxStart; @@ -248810,13 +231518,13 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_4lxml_5etree__SaxParserTarget._handleSaxDoctype = (int (*)(struct __pyx_obj_4lxml_5etree__SaxParserTarget *, PyObject *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxDoctype; __pyx_vtable_4lxml_5etree__SaxParserTarget._handleSaxPi = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__SaxParserTarget *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxPi; __pyx_vtable_4lxml_5etree__SaxParserTarget._handleSaxComment = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__SaxParserTarget *, PyObject *))__pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxComment; - if (PyType_Ready(&__pyx_type_4lxml_5etree__SaxParserTarget) < 0) __PYX_ERR(11, 41, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__SaxParserTarget) < 0) __PYX_ERR(12, 41, __pyx_L1_error) __pyx_type_4lxml_5etree__SaxParserTarget.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__SaxParserTarget.tp_dictoffset && __pyx_type_4lxml_5etree__SaxParserTarget.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__SaxParserTarget.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__SaxParserTarget.tp_dict, __pyx_vtabptr_4lxml_5etree__SaxParserTarget) < 0) __PYX_ERR(11, 41, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "_SaxParserTarget", (PyObject *)&__pyx_type_4lxml_5etree__SaxParserTarget) < 0) __PYX_ERR(11, 41, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__SaxParserTarget.tp_dict, __pyx_vtabptr_4lxml_5etree__SaxParserTarget) < 0) __PYX_ERR(12, 41, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SaxParserTarget, (PyObject *)&__pyx_type_4lxml_5etree__SaxParserTarget) < 0) __PYX_ERR(12, 41, __pyx_L1_error) __pyx_ptype_4lxml_5etree__SaxParserTarget = &__pyx_type_4lxml_5etree__SaxParserTarget; __pyx_vtabptr_4lxml_5etree__SaxParserContext = &__pyx_vtable_4lxml_5etree__SaxParserContext; __pyx_vtable_4lxml_5etree__SaxParserContext.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ParserContext; @@ -248830,14 +231538,14 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_4lxml_5etree__SaxParserContext.flushEvents = (int (*)(struct __pyx_obj_4lxml_5etree__SaxParserContext *))__pyx_f_4lxml_5etree_17_SaxParserContext_flushEvents; __pyx_vtable_4lxml_5etree__SaxParserContext._handleSaxException = (void (*)(struct __pyx_obj_4lxml_5etree__SaxParserContext *, xmlParserCtxt *))__pyx_f_4lxml_5etree_17_SaxParserContext__handleSaxException; __pyx_type_4lxml_5etree__SaxParserContext.tp_base = __pyx_ptype_4lxml_5etree__ParserContext; - if (PyType_Ready(&__pyx_type_4lxml_5etree__SaxParserContext) < 0) __PYX_ERR(11, 63, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__SaxParserContext) < 0) __PYX_ERR(12, 63, __pyx_L1_error) __pyx_type_4lxml_5etree__SaxParserContext.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__SaxParserContext.tp_dictoffset && __pyx_type_4lxml_5etree__SaxParserContext.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__SaxParserContext.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__SaxParserContext.tp_dict, __pyx_vtabptr_4lxml_5etree__SaxParserContext) < 0) __PYX_ERR(11, 63, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__SaxParserContext.tp_dict, __pyx_vtabptr_4lxml_5etree__SaxParserContext) < 0) __PYX_ERR(12, 63, __pyx_L1_error) __pyx_ptype_4lxml_5etree__SaxParserContext = &__pyx_type_4lxml_5etree__SaxParserContext; - if (PyType_Ready(&__pyx_type_4lxml_5etree__ParseEventsIterator) < 0) __PYX_ERR(11, 224, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__ParseEventsIterator) < 0) __PYX_ERR(12, 224, __pyx_L1_error) __pyx_type_4lxml_5etree__ParseEventsIterator.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__ParseEventsIterator.tp_dictoffset && __pyx_type_4lxml_5etree__ParseEventsIterator.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__ParseEventsIterator.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; @@ -248852,13 +231560,13 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_4lxml_5etree_TreeBuilder.__pyx_base._handleSaxComment = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__SaxParserTarget *, PyObject *))__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxComment; __pyx_vtable_4lxml_5etree_TreeBuilder._flush = (int (*)(struct __pyx_obj_4lxml_5etree_TreeBuilder *))__pyx_f_4lxml_5etree_11TreeBuilder__flush; __pyx_type_4lxml_5etree_TreeBuilder.tp_base = __pyx_ptype_4lxml_5etree__SaxParserTarget; - if (PyType_Ready(&__pyx_type_4lxml_5etree_TreeBuilder) < 0) __PYX_ERR(11, 632, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_TreeBuilder) < 0) __PYX_ERR(12, 632, __pyx_L1_error) __pyx_type_4lxml_5etree_TreeBuilder.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_TreeBuilder.tp_dictoffset && __pyx_type_4lxml_5etree_TreeBuilder.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_TreeBuilder.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_TreeBuilder.tp_dict, __pyx_vtabptr_4lxml_5etree_TreeBuilder) < 0) __PYX_ERR(11, 632, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "TreeBuilder", (PyObject *)&__pyx_type_4lxml_5etree_TreeBuilder) < 0) __PYX_ERR(11, 632, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_TreeBuilder.tp_dict, __pyx_vtabptr_4lxml_5etree_TreeBuilder) < 0) __PYX_ERR(12, 632, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TreeBuilder, (PyObject *)&__pyx_type_4lxml_5etree_TreeBuilder) < 0) __PYX_ERR(12, 632, __pyx_L1_error) __pyx_ptype_4lxml_5etree_TreeBuilder = &__pyx_type_4lxml_5etree_TreeBuilder; __pyx_vtabptr_4lxml_5etree__PythonSaxParserTarget = &__pyx_vtable_4lxml_5etree__PythonSaxParserTarget; __pyx_vtable_4lxml_5etree__PythonSaxParserTarget.__pyx_base = *__pyx_vtabptr_4lxml_5etree__SaxParserTarget; @@ -248869,12 +231577,12 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_4lxml_5etree__PythonSaxParserTarget.__pyx_base._handleSaxPi = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__SaxParserTarget *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxPi; __pyx_vtable_4lxml_5etree__PythonSaxParserTarget.__pyx_base._handleSaxComment = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__SaxParserTarget *, PyObject *))__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxComment; __pyx_type_4lxml_5etree__PythonSaxParserTarget.tp_base = __pyx_ptype_4lxml_5etree__SaxParserTarget; - if (PyType_Ready(&__pyx_type_4lxml_5etree__PythonSaxParserTarget) < 0) __PYX_ERR(12, 20, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__PythonSaxParserTarget) < 0) __PYX_ERR(13, 20, __pyx_L1_error) __pyx_type_4lxml_5etree__PythonSaxParserTarget.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__PythonSaxParserTarget.tp_dictoffset && __pyx_type_4lxml_5etree__PythonSaxParserTarget.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__PythonSaxParserTarget.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__PythonSaxParserTarget.tp_dict, __pyx_vtabptr_4lxml_5etree__PythonSaxParserTarget) < 0) __PYX_ERR(12, 20, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__PythonSaxParserTarget.tp_dict, __pyx_vtabptr_4lxml_5etree__PythonSaxParserTarget) < 0) __PYX_ERR(13, 20, __pyx_L1_error) __pyx_ptype_4lxml_5etree__PythonSaxParserTarget = &__pyx_type_4lxml_5etree__PythonSaxParserTarget; __pyx_vtabptr_4lxml_5etree__TargetParserContext = &__pyx_vtable_4lxml_5etree__TargetParserContext; __pyx_vtable_4lxml_5etree__TargetParserContext.__pyx_base = *__pyx_vtabptr_4lxml_5etree__SaxParserContext; @@ -248884,12 +231592,12 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_4lxml_5etree__TargetParserContext._setTarget = (int (*)(struct __pyx_obj_4lxml_5etree__TargetParserContext *, PyObject *))__pyx_f_4lxml_5etree_20_TargetParserContext__setTarget; __pyx_vtable_4lxml_5etree__TargetParserContext._cleanupTargetParserContext = (void (*)(struct __pyx_obj_4lxml_5etree__TargetParserContext *, xmlDoc *))__pyx_f_4lxml_5etree_20_TargetParserContext__cleanupTargetParserContext; __pyx_type_4lxml_5etree__TargetParserContext.tp_base = __pyx_ptype_4lxml_5etree__SaxParserContext; - if (PyType_Ready(&__pyx_type_4lxml_5etree__TargetParserContext) < 0) __PYX_ERR(12, 103, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__TargetParserContext) < 0) __PYX_ERR(13, 103, __pyx_L1_error) __pyx_type_4lxml_5etree__TargetParserContext.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__TargetParserContext.tp_dictoffset && __pyx_type_4lxml_5etree__TargetParserContext.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__TargetParserContext.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__TargetParserContext.tp_dict, __pyx_vtabptr_4lxml_5etree__TargetParserContext) < 0) __PYX_ERR(12, 103, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__TargetParserContext.tp_dict, __pyx_vtabptr_4lxml_5etree__TargetParserContext) < 0) __PYX_ERR(13, 103, __pyx_L1_error) __pyx_ptype_4lxml_5etree__TargetParserContext = &__pyx_type_4lxml_5etree__TargetParserContext; __pyx_type_4lxml_5etree_SerialisationError.tp_base = __pyx_ptype_4lxml_5etree_LxmlError; if (PyType_Ready(&__pyx_type_4lxml_5etree_SerialisationError) < 0) __PYX_ERR(8, 7, __pyx_L1_error) @@ -248897,7 +231605,7 @@ static int __Pyx_modinit_type_init_code(void) { if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_SerialisationError.tp_dictoffset && __pyx_type_4lxml_5etree_SerialisationError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_SerialisationError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "SerialisationError", (PyObject *)&__pyx_type_4lxml_5etree_SerialisationError) < 0) __PYX_ERR(8, 7, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SerialisationError, (PyObject *)&__pyx_type_4lxml_5etree_SerialisationError) < 0) __PYX_ERR(8, 7, __pyx_L1_error) __pyx_ptype_4lxml_5etree_SerialisationError = &__pyx_type_4lxml_5etree_SerialisationError; __pyx_vtabptr_4lxml_5etree__FilelikeWriter = &__pyx_vtable_4lxml_5etree__FilelikeWriter; __pyx_vtable_4lxml_5etree__FilelikeWriter._createOutputBuffer = (xmlOutputBuffer *(*)(struct __pyx_obj_4lxml_5etree__FilelikeWriter *, xmlCharEncodingHandler *))__pyx_f_4lxml_5etree_15_FilelikeWriter__createOutputBuffer; @@ -248915,7 +231623,7 @@ static int __Pyx_modinit_type_init_code(void) { if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_xmlfile.tp_dictoffset && __pyx_type_4lxml_5etree_xmlfile.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_xmlfile.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "xmlfile", (PyObject *)&__pyx_type_4lxml_5etree_xmlfile) < 0) __PYX_ERR(8, 860, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_xmlfile, (PyObject *)&__pyx_type_4lxml_5etree_xmlfile) < 0) __PYX_ERR(8, 860, __pyx_L1_error) __pyx_ptype_4lxml_5etree_xmlfile = &__pyx_type_4lxml_5etree_xmlfile; __pyx_type_4lxml_5etree_htmlfile.tp_base = __pyx_ptype_4lxml_5etree_xmlfile; if (PyType_Ready(&__pyx_type_4lxml_5etree_htmlfile) < 0) __PYX_ERR(8, 949, __pyx_L1_error) @@ -248923,7 +231631,7 @@ static int __Pyx_modinit_type_init_code(void) { if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_htmlfile.tp_dictoffset && __pyx_type_4lxml_5etree_htmlfile.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_htmlfile.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "htmlfile", (PyObject *)&__pyx_type_4lxml_5etree_htmlfile) < 0) __PYX_ERR(8, 949, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_htmlfile, (PyObject *)&__pyx_type_4lxml_5etree_htmlfile) < 0) __PYX_ERR(8, 949, __pyx_L1_error) __pyx_ptype_4lxml_5etree_htmlfile = &__pyx_type_4lxml_5etree_htmlfile; __pyx_vtabptr_4lxml_5etree__IncrementalFileWriter = &__pyx_vtable_4lxml_5etree__IncrementalFileWriter; __pyx_vtable_4lxml_5etree__IncrementalFileWriter._write_qname = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_qname; @@ -248981,53 +231689,53 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtabptr_4lxml_5etree_iterparse = &__pyx_vtable_4lxml_5etree_iterparse; __pyx_vtable_4lxml_5etree_iterparse._close_source = (PyObject *(*)(struct __pyx_obj_4lxml_5etree_iterparse *))__pyx_f_4lxml_5etree_9iterparse__close_source; __pyx_vtable_4lxml_5etree_iterparse._read_more_events = (int (*)(struct __pyx_obj_4lxml_5etree_iterparse *, struct __pyx_obj_4lxml_5etree__SaxParserContext *))__pyx_f_4lxml_5etree_9iterparse__read_more_events; - if (PyType_Ready(&__pyx_type_4lxml_5etree_iterparse) < 0) __PYX_ERR(13, 5, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_iterparse) < 0) __PYX_ERR(14, 5, __pyx_L1_error) __pyx_type_4lxml_5etree_iterparse.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_iterparse.tp_dictoffset && __pyx_type_4lxml_5etree_iterparse.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_iterparse.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_iterparse.tp_dict, __pyx_vtabptr_4lxml_5etree_iterparse) < 0) __PYX_ERR(13, 5, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "iterparse", (PyObject *)&__pyx_type_4lxml_5etree_iterparse) < 0) __PYX_ERR(13, 5, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_iterparse.tp_dict, __pyx_vtabptr_4lxml_5etree_iterparse) < 0) __PYX_ERR(14, 5, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_iterparse, (PyObject *)&__pyx_type_4lxml_5etree_iterparse) < 0) __PYX_ERR(14, 5, __pyx_L1_error) __pyx_ptype_4lxml_5etree_iterparse = &__pyx_type_4lxml_5etree_iterparse; __pyx_vtabptr_4lxml_5etree_iterwalk = &__pyx_vtable_4lxml_5etree_iterwalk; __pyx_vtable_4lxml_5etree_iterwalk._next_event = (PyObject *(*)(struct __pyx_obj_4lxml_5etree_iterwalk *))__pyx_f_4lxml_5etree_8iterwalk__next_event; __pyx_vtable_4lxml_5etree_iterwalk._start_node = (int (*)(struct __pyx_obj_4lxml_5etree_iterwalk *, struct LxmlElement *))__pyx_f_4lxml_5etree_8iterwalk__start_node; __pyx_vtable_4lxml_5etree_iterwalk._end_node = (struct LxmlElement *(*)(struct __pyx_obj_4lxml_5etree_iterwalk *))__pyx_f_4lxml_5etree_8iterwalk__end_node; - if (PyType_Ready(&__pyx_type_4lxml_5etree_iterwalk) < 0) __PYX_ERR(13, 240, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_iterwalk) < 0) __PYX_ERR(14, 240, __pyx_L1_error) __pyx_type_4lxml_5etree_iterwalk.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_iterwalk.tp_dictoffset && __pyx_type_4lxml_5etree_iterwalk.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_iterwalk.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_iterwalk.tp_dict, __pyx_vtabptr_4lxml_5etree_iterwalk) < 0) __PYX_ERR(13, 240, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "iterwalk", (PyObject *)&__pyx_type_4lxml_5etree_iterwalk) < 0) __PYX_ERR(13, 240, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_iterwalk.tp_dict, __pyx_vtabptr_4lxml_5etree_iterwalk) < 0) __PYX_ERR(14, 240, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_iterwalk, (PyObject *)&__pyx_type_4lxml_5etree_iterwalk) < 0) __PYX_ERR(14, 240, __pyx_L1_error) __pyx_ptype_4lxml_5etree_iterwalk = &__pyx_type_4lxml_5etree_iterwalk; __pyx_vtabptr_4lxml_5etree__IDDict = &__pyx_vtable_4lxml_5etree__IDDict; __pyx_vtable_4lxml_5etree__IDDict._build_keys = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__IDDict *))__pyx_f_4lxml_5etree_7_IDDict__build_keys; __pyx_vtable_4lxml_5etree__IDDict._build_items = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__IDDict *))__pyx_f_4lxml_5etree_7_IDDict__build_items; - if (PyType_Ready(&__pyx_type_4lxml_5etree__IDDict) < 0) __PYX_ERR(14, 58, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__IDDict) < 0) __PYX_ERR(15, 58, __pyx_L1_error) __pyx_type_4lxml_5etree__IDDict.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__IDDict.tp_dictoffset && __pyx_type_4lxml_5etree__IDDict.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__IDDict.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__IDDict.tp_dict, __pyx_vtabptr_4lxml_5etree__IDDict) < 0) __PYX_ERR(14, 58, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "_IDDict", (PyObject *)&__pyx_type_4lxml_5etree__IDDict) < 0) __PYX_ERR(14, 58, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__IDDict.tp_dict, __pyx_vtabptr_4lxml_5etree__IDDict) < 0) __PYX_ERR(15, 58, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_IDDict, (PyObject *)&__pyx_type_4lxml_5etree__IDDict) < 0) __PYX_ERR(15, 58, __pyx_L1_error) __pyx_ptype_4lxml_5etree__IDDict = &__pyx_type_4lxml_5etree__IDDict; __pyx_type_4lxml_5etree_XIncludeError.tp_base = __pyx_ptype_4lxml_5etree_LxmlError; - if (PyType_Ready(&__pyx_type_4lxml_5etree_XIncludeError) < 0) __PYX_ERR(15, 6, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_XIncludeError) < 0) __PYX_ERR(16, 6, __pyx_L1_error) __pyx_type_4lxml_5etree_XIncludeError.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_XIncludeError.tp_dictoffset && __pyx_type_4lxml_5etree_XIncludeError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_XIncludeError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "XIncludeError", (PyObject *)&__pyx_type_4lxml_5etree_XIncludeError) < 0) __PYX_ERR(15, 6, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_XIncludeError, (PyObject *)&__pyx_type_4lxml_5etree_XIncludeError) < 0) __PYX_ERR(16, 6, __pyx_L1_error) __pyx_ptype_4lxml_5etree_XIncludeError = &__pyx_type_4lxml_5etree_XIncludeError; - if (PyType_Ready(&__pyx_type_4lxml_5etree_XInclude) < 0) __PYX_ERR(15, 11, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_XInclude) < 0) __PYX_ERR(16, 11, __pyx_L1_error) __pyx_type_4lxml_5etree_XInclude.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_XInclude.tp_dictoffset && __pyx_type_4lxml_5etree_XInclude.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_XInclude.tp_getattro = __Pyx_PyObject_GenericGetAttr; } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree_XInclude, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(15, 11, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree_XInclude, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(16, 11, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_4lxml_5etree_8XInclude_2__call__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_4lxml_5etree_8XInclude_2__call__.doc = __pyx_doc_4lxml_5etree_8XInclude_2__call__; @@ -249035,50 +231743,50 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (PyObject_SetAttrString(__pyx_m, "XInclude", (PyObject *)&__pyx_type_4lxml_5etree_XInclude) < 0) __PYX_ERR(15, 11, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_XInclude, (PyObject *)&__pyx_type_4lxml_5etree_XInclude) < 0) __PYX_ERR(16, 11, __pyx_L1_error) __pyx_ptype_4lxml_5etree_XInclude = &__pyx_type_4lxml_5etree_XInclude; __pyx_type_4lxml_5etree_XPathError.tp_base = __pyx_ptype_4lxml_5etree_LxmlError; - if (PyType_Ready(&__pyx_type_4lxml_5etree_XPathError) < 0) __PYX_ERR(17, 3, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_XPathError) < 0) __PYX_ERR(9, 3, __pyx_L1_error) __pyx_type_4lxml_5etree_XPathError.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_XPathError.tp_dictoffset && __pyx_type_4lxml_5etree_XPathError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_XPathError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "XPathError", (PyObject *)&__pyx_type_4lxml_5etree_XPathError) < 0) __PYX_ERR(17, 3, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_XPathError, (PyObject *)&__pyx_type_4lxml_5etree_XPathError) < 0) __PYX_ERR(9, 3, __pyx_L1_error) __pyx_ptype_4lxml_5etree_XPathError = &__pyx_type_4lxml_5etree_XPathError; __pyx_type_4lxml_5etree_XPathEvalError.tp_base = __pyx_ptype_4lxml_5etree_XPathError; - if (PyType_Ready(&__pyx_type_4lxml_5etree_XPathEvalError) < 0) __PYX_ERR(17, 7, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_XPathEvalError) < 0) __PYX_ERR(9, 7, __pyx_L1_error) __pyx_type_4lxml_5etree_XPathEvalError.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_XPathEvalError.tp_dictoffset && __pyx_type_4lxml_5etree_XPathEvalError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_XPathEvalError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "XPathEvalError", (PyObject *)&__pyx_type_4lxml_5etree_XPathEvalError) < 0) __PYX_ERR(17, 7, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_XPathEvalError, (PyObject *)&__pyx_type_4lxml_5etree_XPathEvalError) < 0) __PYX_ERR(9, 7, __pyx_L1_error) __pyx_ptype_4lxml_5etree_XPathEvalError = &__pyx_type_4lxml_5etree_XPathEvalError; __pyx_type_4lxml_5etree_XPathFunctionError.tp_base = __pyx_ptype_4lxml_5etree_XPathEvalError; - if (PyType_Ready(&__pyx_type_4lxml_5etree_XPathFunctionError) < 0) __PYX_ERR(17, 11, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_XPathFunctionError) < 0) __PYX_ERR(9, 11, __pyx_L1_error) __pyx_type_4lxml_5etree_XPathFunctionError.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_XPathFunctionError.tp_dictoffset && __pyx_type_4lxml_5etree_XPathFunctionError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_XPathFunctionError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "XPathFunctionError", (PyObject *)&__pyx_type_4lxml_5etree_XPathFunctionError) < 0) __PYX_ERR(17, 11, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_XPathFunctionError, (PyObject *)&__pyx_type_4lxml_5etree_XPathFunctionError) < 0) __PYX_ERR(9, 11, __pyx_L1_error) __pyx_ptype_4lxml_5etree_XPathFunctionError = &__pyx_type_4lxml_5etree_XPathFunctionError; __pyx_type_4lxml_5etree_XPathResultError.tp_base = __pyx_ptype_4lxml_5etree_XPathEvalError; - if (PyType_Ready(&__pyx_type_4lxml_5etree_XPathResultError) < 0) __PYX_ERR(17, 15, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_XPathResultError) < 0) __PYX_ERR(9, 15, __pyx_L1_error) __pyx_type_4lxml_5etree_XPathResultError.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_XPathResultError.tp_dictoffset && __pyx_type_4lxml_5etree_XPathResultError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_XPathResultError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "XPathResultError", (PyObject *)&__pyx_type_4lxml_5etree_XPathResultError) < 0) __PYX_ERR(17, 15, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_XPathResultError, (PyObject *)&__pyx_type_4lxml_5etree_XPathResultError) < 0) __PYX_ERR(9, 15, __pyx_L1_error) __pyx_ptype_4lxml_5etree_XPathResultError = &__pyx_type_4lxml_5etree_XPathResultError; __pyx_vtabptr_4lxml_5etree__ExsltRegExp = &__pyx_vtable_4lxml_5etree__ExsltRegExp; __pyx_vtable_4lxml_5etree__ExsltRegExp._make_string = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__ExsltRegExp *, PyObject *))__pyx_f_4lxml_5etree_12_ExsltRegExp__make_string; __pyx_vtable_4lxml_5etree__ExsltRegExp._compile = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__ExsltRegExp *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_12_ExsltRegExp__compile; __pyx_vtable_4lxml_5etree__ExsltRegExp._register_in_context = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__ExsltRegExp *, struct __pyx_obj_4lxml_5etree__BaseContext *))__pyx_f_4lxml_5etree_12_ExsltRegExp__register_in_context; - if (PyType_Ready(&__pyx_type_4lxml_5etree__ExsltRegExp) < 0) __PYX_ERR(17, 456, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__ExsltRegExp) < 0) __PYX_ERR(9, 456, __pyx_L1_error) __pyx_type_4lxml_5etree__ExsltRegExp.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__ExsltRegExp.tp_dictoffset && __pyx_type_4lxml_5etree__ExsltRegExp.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__ExsltRegExp.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ExsltRegExp.tp_dict, __pyx_vtabptr_4lxml_5etree__ExsltRegExp) < 0) __PYX_ERR(17, 456, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ExsltRegExp.tp_dict, __pyx_vtabptr_4lxml_5etree__ExsltRegExp) < 0) __PYX_ERR(9, 456, __pyx_L1_error) __pyx_ptype_4lxml_5etree__ExsltRegExp = &__pyx_type_4lxml_5etree__ExsltRegExp; __pyx_vtabptr_4lxml_5etree__BaseContext = &__pyx_vtable_4lxml_5etree__BaseContext; __pyx_vtable_4lxml_5etree__BaseContext._copy = (struct __pyx_obj_4lxml_5etree__BaseContext *(*)(struct __pyx_obj_4lxml_5etree__BaseContext *))__pyx_f_4lxml_5etree_12_BaseContext__copy; @@ -249102,20 +231810,20 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_4lxml_5etree__BaseContext._release_temp_refs = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseContext *))__pyx_f_4lxml_5etree_12_BaseContext__release_temp_refs; __pyx_vtable_4lxml_5etree__BaseContext._hold = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseContext *, PyObject *))__pyx_f_4lxml_5etree_12_BaseContext__hold; __pyx_vtable_4lxml_5etree__BaseContext._findDocumentForNode = (struct LxmlDocument *(*)(struct __pyx_obj_4lxml_5etree__BaseContext *, xmlNode *))__pyx_f_4lxml_5etree_12_BaseContext__findDocumentForNode; - if (PyType_Ready(&__pyx_type_4lxml_5etree__BaseContext) < 0) __PYX_ERR(17, 29, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__BaseContext) < 0) __PYX_ERR(9, 29, __pyx_L1_error) __pyx_type_4lxml_5etree__BaseContext.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__BaseContext.tp_dictoffset && __pyx_type_4lxml_5etree__BaseContext.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__BaseContext.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__BaseContext.tp_dict, __pyx_vtabptr_4lxml_5etree__BaseContext) < 0) __PYX_ERR(17, 29, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__BaseContext.tp_dict, __pyx_vtabptr_4lxml_5etree__BaseContext) < 0) __PYX_ERR(9, 29, __pyx_L1_error) __pyx_ptype_4lxml_5etree__BaseContext = &__pyx_type_4lxml_5etree__BaseContext; __pyx_type_4lxml_5etree__ElementUnicodeResult.tp_base = (&PyUnicode_Type); - if (PyType_Ready(&__pyx_type_4lxml_5etree__ElementUnicodeResult) < 0) __PYX_ERR(17, 723, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__ElementUnicodeResult) < 0) __PYX_ERR(9, 723, __pyx_L1_error) __pyx_type_4lxml_5etree__ElementUnicodeResult.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__ElementUnicodeResult.tp_dictoffset && __pyx_type_4lxml_5etree__ElementUnicodeResult.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__ElementUnicodeResult.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } - if (PyObject_SetAttrString(__pyx_m, "_ElementUnicodeResult", (PyObject *)&__pyx_type_4lxml_5etree__ElementUnicodeResult) < 0) __PYX_ERR(17, 723, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ElementUnicodeResult, (PyObject *)&__pyx_type_4lxml_5etree__ElementUnicodeResult) < 0) __PYX_ERR(9, 723, __pyx_L1_error) __pyx_ptype_4lxml_5etree__ElementUnicodeResult = &__pyx_type_4lxml_5etree__ElementUnicodeResult; __pyx_vtabptr_4lxml_5etree__XPathContext = &__pyx_vtable_4lxml_5etree__XPathContext; __pyx_vtable_4lxml_5etree__XPathContext.__pyx_base = *__pyx_vtabptr_4lxml_5etree__BaseContext; @@ -249147,7 +231855,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_4lxml_5etree__XPathEvaluatorBase.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__XPathEvaluatorBase.tp_dict, __pyx_vtabptr_4lxml_5etree__XPathEvaluatorBase) < 0) __PYX_ERR(18, 118, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "_XPathEvaluatorBase", (PyObject *)&__pyx_type_4lxml_5etree__XPathEvaluatorBase) < 0) __PYX_ERR(18, 118, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_XPathEvaluatorBase, (PyObject *)&__pyx_type_4lxml_5etree__XPathEvaluatorBase) < 0) __PYX_ERR(18, 118, __pyx_L1_error) __pyx_ptype_4lxml_5etree__XPathEvaluatorBase = &__pyx_type_4lxml_5etree__XPathEvaluatorBase; __pyx_vtabptr_4lxml_5etree_XPathElementEvaluator = &__pyx_vtable_4lxml_5etree_XPathElementEvaluator; __pyx_vtable_4lxml_5etree_XPathElementEvaluator.__pyx_base = *__pyx_vtabptr_4lxml_5etree__XPathEvaluatorBase; @@ -249168,7 +231876,7 @@ static int __Pyx_modinit_type_init_code(void) { } #endif if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XPathElementEvaluator.tp_dict, __pyx_vtabptr_4lxml_5etree_XPathElementEvaluator) < 0) __PYX_ERR(18, 238, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "XPathElementEvaluator", (PyObject *)&__pyx_type_4lxml_5etree_XPathElementEvaluator) < 0) __PYX_ERR(18, 238, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_XPathElementEvaluator, (PyObject *)&__pyx_type_4lxml_5etree_XPathElementEvaluator) < 0) __PYX_ERR(18, 238, __pyx_L1_error) __pyx_ptype_4lxml_5etree_XPathElementEvaluator = &__pyx_type_4lxml_5etree_XPathElementEvaluator; __pyx_vtabptr_4lxml_5etree_XPathDocumentEvaluator = &__pyx_vtable_4lxml_5etree_XPathDocumentEvaluator; __pyx_vtable_4lxml_5etree_XPathDocumentEvaluator.__pyx_base = *__pyx_vtabptr_4lxml_5etree_XPathElementEvaluator; @@ -249189,7 +231897,7 @@ static int __Pyx_modinit_type_init_code(void) { } #endif if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XPathDocumentEvaluator.tp_dict, __pyx_vtabptr_4lxml_5etree_XPathDocumentEvaluator) < 0) __PYX_ERR(18, 315, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "XPathDocumentEvaluator", (PyObject *)&__pyx_type_4lxml_5etree_XPathDocumentEvaluator) < 0) __PYX_ERR(18, 315, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_XPathDocumentEvaluator, (PyObject *)&__pyx_type_4lxml_5etree_XPathDocumentEvaluator) < 0) __PYX_ERR(18, 315, __pyx_L1_error) __pyx_ptype_4lxml_5etree_XPathDocumentEvaluator = &__pyx_type_4lxml_5etree_XPathDocumentEvaluator; __pyx_vtabptr_4lxml_5etree_XPath = &__pyx_vtable_4lxml_5etree_XPath; __pyx_vtable_4lxml_5etree_XPath.__pyx_base = *__pyx_vtabptr_4lxml_5etree__XPathEvaluatorBase; @@ -249210,7 +231918,7 @@ static int __Pyx_modinit_type_init_code(void) { } #endif if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XPath.tp_dict, __pyx_vtabptr_4lxml_5etree_XPath) < 0) __PYX_ERR(18, 394, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "XPath", (PyObject *)&__pyx_type_4lxml_5etree_XPath) < 0) __PYX_ERR(18, 394, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_XPath, (PyObject *)&__pyx_type_4lxml_5etree_XPath) < 0) __PYX_ERR(18, 394, __pyx_L1_error) __pyx_ptype_4lxml_5etree_XPath = &__pyx_type_4lxml_5etree_XPath; __pyx_vtabptr_4lxml_5etree_ETXPath = &__pyx_vtable_4lxml_5etree_ETXPath; __pyx_vtable_4lxml_5etree_ETXPath.__pyx_base = *__pyx_vtabptr_4lxml_5etree_XPath; @@ -249222,7 +231930,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_4lxml_5etree_ETXPath.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_ETXPath.tp_dict, __pyx_vtabptr_4lxml_5etree_ETXPath) < 0) __PYX_ERR(18, 470, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "ETXPath", (PyObject *)&__pyx_type_4lxml_5etree_ETXPath) < 0) __PYX_ERR(18, 470, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ETXPath, (PyObject *)&__pyx_type_4lxml_5etree_ETXPath) < 0) __PYX_ERR(18, 470, __pyx_L1_error) __pyx_ptype_4lxml_5etree_ETXPath = &__pyx_type_4lxml_5etree_ETXPath; __pyx_type_4lxml_5etree_XSLTError.tp_base = __pyx_ptype_4lxml_5etree_LxmlError; if (PyType_Ready(&__pyx_type_4lxml_5etree_XSLTError) < 0) __PYX_ERR(3, 6, __pyx_L1_error) @@ -249230,7 +231938,7 @@ static int __Pyx_modinit_type_init_code(void) { if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_XSLTError.tp_dictoffset && __pyx_type_4lxml_5etree_XSLTError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_XSLTError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "XSLTError", (PyObject *)&__pyx_type_4lxml_5etree_XSLTError) < 0) __PYX_ERR(3, 6, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_XSLTError, (PyObject *)&__pyx_type_4lxml_5etree_XSLTError) < 0) __PYX_ERR(3, 6, __pyx_L1_error) __pyx_ptype_4lxml_5etree_XSLTError = &__pyx_type_4lxml_5etree_XSLTError; __pyx_type_4lxml_5etree_XSLTParseError.tp_base = __pyx_ptype_4lxml_5etree_XSLTError; if (PyType_Ready(&__pyx_type_4lxml_5etree_XSLTParseError) < 0) __PYX_ERR(3, 10, __pyx_L1_error) @@ -249238,7 +231946,7 @@ static int __Pyx_modinit_type_init_code(void) { if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_XSLTParseError.tp_dictoffset && __pyx_type_4lxml_5etree_XSLTParseError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_XSLTParseError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "XSLTParseError", (PyObject *)&__pyx_type_4lxml_5etree_XSLTParseError) < 0) __PYX_ERR(3, 10, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_XSLTParseError, (PyObject *)&__pyx_type_4lxml_5etree_XSLTParseError) < 0) __PYX_ERR(3, 10, __pyx_L1_error) __pyx_ptype_4lxml_5etree_XSLTParseError = &__pyx_type_4lxml_5etree_XSLTParseError; __pyx_type_4lxml_5etree_XSLTApplyError.tp_base = __pyx_ptype_4lxml_5etree_XSLTError; if (PyType_Ready(&__pyx_type_4lxml_5etree_XSLTApplyError) < 0) __PYX_ERR(3, 14, __pyx_L1_error) @@ -249246,7 +231954,7 @@ static int __Pyx_modinit_type_init_code(void) { if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_XSLTApplyError.tp_dictoffset && __pyx_type_4lxml_5etree_XSLTApplyError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_XSLTApplyError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "XSLTApplyError", (PyObject *)&__pyx_type_4lxml_5etree_XSLTApplyError) < 0) __PYX_ERR(3, 14, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_XSLTApplyError, (PyObject *)&__pyx_type_4lxml_5etree_XSLTApplyError) < 0) __PYX_ERR(3, 14, __pyx_L1_error) __pyx_ptype_4lxml_5etree_XSLTApplyError = &__pyx_type_4lxml_5etree_XSLTApplyError; __pyx_type_4lxml_5etree_XSLTExtensionError.tp_base = __pyx_ptype_4lxml_5etree_XSLTError; if (PyType_Ready(&__pyx_type_4lxml_5etree_XSLTExtensionError) < 0) __PYX_ERR(3, 22, __pyx_L1_error) @@ -249254,7 +231962,7 @@ static int __Pyx_modinit_type_init_code(void) { if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_XSLTExtensionError.tp_dictoffset && __pyx_type_4lxml_5etree_XSLTExtensionError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_XSLTExtensionError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "XSLTExtensionError", (PyObject *)&__pyx_type_4lxml_5etree_XSLTExtensionError) < 0) __PYX_ERR(3, 22, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_XSLTExtensionError, (PyObject *)&__pyx_type_4lxml_5etree_XSLTExtensionError) < 0) __PYX_ERR(3, 22, __pyx_L1_error) __pyx_ptype_4lxml_5etree_XSLTExtensionError = &__pyx_type_4lxml_5etree_XSLTExtensionError; __pyx_vtabptr_4lxml_5etree__XSLTResolverContext = &__pyx_vtable_4lxml_5etree__XSLTResolverContext; __pyx_vtable_4lxml_5etree__XSLTResolverContext.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ResolverContext; @@ -249277,7 +231985,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_4lxml_5etree_XSLTAccessControl.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XSLTAccessControl.tp_dict, __pyx_vtabptr_4lxml_5etree_XSLTAccessControl) < 0) __PYX_ERR(3, 169, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "XSLTAccessControl", (PyObject *)&__pyx_type_4lxml_5etree_XSLTAccessControl) < 0) __PYX_ERR(3, 169, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_XSLTAccessControl, (PyObject *)&__pyx_type_4lxml_5etree_XSLTAccessControl) < 0) __PYX_ERR(3, 169, __pyx_L1_error) __pyx_ptype_4lxml_5etree_XSLTAccessControl = &__pyx_type_4lxml_5etree_XSLTAccessControl; __pyx_vtabptr_4lxml_5etree__XSLTContext = &__pyx_vtable_4lxml_5etree__XSLTContext; __pyx_vtable_4lxml_5etree__XSLTContext.__pyx_base = *__pyx_vtabptr_4lxml_5etree__BaseContext; @@ -249316,7 +232024,7 @@ static int __Pyx_modinit_type_init_code(void) { } #endif if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XSLT.tp_dict, __pyx_vtabptr_4lxml_5etree_XSLT) < 0) __PYX_ERR(3, 335, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "XSLT", (PyObject *)&__pyx_type_4lxml_5etree_XSLT) < 0) __PYX_ERR(3, 335, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_XSLT, (PyObject *)&__pyx_type_4lxml_5etree_XSLT) < 0) __PYX_ERR(3, 335, __pyx_L1_error) __pyx_ptype_4lxml_5etree_XSLT = &__pyx_type_4lxml_5etree_XSLT; __pyx_vtabptr_4lxml_5etree__XSLTResultTree = &__pyx_vtable_4lxml_5etree__XSLTResultTree; __pyx_vtable_4lxml_5etree__XSLTResultTree.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ElementTree; @@ -249328,7 +232036,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_4lxml_5etree__XSLTResultTree.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__XSLTResultTree.tp_dict, __pyx_vtabptr_4lxml_5etree__XSLTResultTree) < 0) __PYX_ERR(3, 701, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "_XSLTResultTree", (PyObject *)&__pyx_type_4lxml_5etree__XSLTResultTree) < 0) __PYX_ERR(3, 701, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_XSLTResultTree, (PyObject *)&__pyx_type_4lxml_5etree__XSLTResultTree) < 0) __PYX_ERR(3, 701, __pyx_L1_error) __pyx_ptype_4lxml_5etree__XSLTResultTree = &__pyx_type_4lxml_5etree__XSLTResultTree; __pyx_vtabptr_4lxml_5etree__XSLTProcessingInstruction = &__pyx_vtable_4lxml_5etree__XSLTProcessingInstruction; __pyx_vtable_4lxml_5etree__XSLTProcessingInstruction.__pyx_base = *__pyx_vtabptr_4lxml_5etree_PIBase; @@ -249339,7 +232047,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_4lxml_5etree__XSLTProcessingInstruction.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__XSLTProcessingInstruction.tp_dict, __pyx_vtabptr_4lxml_5etree__XSLTProcessingInstruction) < 0) __PYX_ERR(3, 895, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "_XSLTProcessingInstruction", (PyObject *)&__pyx_type_4lxml_5etree__XSLTProcessingInstruction) < 0) __PYX_ERR(3, 895, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_XSLTProcessingInstruction, (PyObject *)&__pyx_type_4lxml_5etree__XSLTProcessingInstruction) < 0) __PYX_ERR(3, 895, __pyx_L1_error) __pyx_ptype_4lxml_5etree__XSLTProcessingInstruction = &__pyx_type_4lxml_5etree__XSLTProcessingInstruction; __pyx_vtabptr_4lxml_5etree_XSLTExtension = &__pyx_vtable_4lxml_5etree_XSLTExtension; __pyx_vtable_4lxml_5etree_XSLTExtension._collectXSLTResultContent = (PyObject *(*)(struct __pyx_obj_4lxml_5etree_XSLTExtension *, struct __pyx_obj_4lxml_5etree__XSLTContext *, xmlNode *, int, int))__pyx_f_4lxml_5etree_13XSLTExtension__collectXSLTResultContent; @@ -249349,26 +232057,26 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_4lxml_5etree_XSLTExtension.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XSLTExtension.tp_dict, __pyx_vtabptr_4lxml_5etree_XSLTExtension) < 0) __PYX_ERR(19, 3, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "XSLTExtension", (PyObject *)&__pyx_type_4lxml_5etree_XSLTExtension) < 0) __PYX_ERR(19, 3, __pyx_L1_error) + 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, 3503, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_DocumentInvalid) < 0) __PYX_ERR(0, 3497, __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_SetAttrString(__pyx_m, "DocumentInvalid", (PyObject *)&__pyx_type_4lxml_5etree_DocumentInvalid) < 0) __PYX_ERR(0, 3503, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DocumentInvalid, (PyObject *)&__pyx_type_4lxml_5etree_DocumentInvalid) < 0) __PYX_ERR(0, 3497, __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, 3511, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__Validator) < 0) __PYX_ERR(0, 3505, __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, 3511, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "_Validator", (PyObject *)&__pyx_type_4lxml_5etree__Validator) < 0) __PYX_ERR(0, 3511, __pyx_L1_error) + 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) __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) @@ -249376,7 +232084,7 @@ static int __Pyx_modinit_type_init_code(void) { if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_DTDError.tp_dictoffset && __pyx_type_4lxml_5etree_DTDError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_DTDError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "DTDError", (PyObject *)&__pyx_type_4lxml_5etree_DTDError) < 0) __PYX_ERR(20, 4, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DTDError, (PyObject *)&__pyx_type_4lxml_5etree_DTDError) < 0) __PYX_ERR(20, 4, __pyx_L1_error) __pyx_ptype_4lxml_5etree_DTDError = &__pyx_type_4lxml_5etree_DTDError; __pyx_type_4lxml_5etree_DTDParseError.tp_base = __pyx_ptype_4lxml_5etree_DTDError; if (PyType_Ready(&__pyx_type_4lxml_5etree_DTDParseError) < 0) __PYX_ERR(20, 8, __pyx_L1_error) @@ -249384,7 +232092,7 @@ static int __Pyx_modinit_type_init_code(void) { if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_DTDParseError.tp_dictoffset && __pyx_type_4lxml_5etree_DTDParseError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_DTDParseError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "DTDParseError", (PyObject *)&__pyx_type_4lxml_5etree_DTDParseError) < 0) __PYX_ERR(20, 8, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DTDParseError, (PyObject *)&__pyx_type_4lxml_5etree_DTDParseError) < 0) __PYX_ERR(20, 8, __pyx_L1_error) __pyx_ptype_4lxml_5etree_DTDParseError = &__pyx_type_4lxml_5etree_DTDParseError; __pyx_type_4lxml_5etree_DTDValidateError.tp_base = __pyx_ptype_4lxml_5etree_DTDError; if (PyType_Ready(&__pyx_type_4lxml_5etree_DTDValidateError) < 0) __PYX_ERR(20, 12, __pyx_L1_error) @@ -249392,7 +232100,7 @@ static int __Pyx_modinit_type_init_code(void) { if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_DTDValidateError.tp_dictoffset && __pyx_type_4lxml_5etree_DTDValidateError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_DTDValidateError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "DTDValidateError", (PyObject *)&__pyx_type_4lxml_5etree_DTDValidateError) < 0) __PYX_ERR(20, 12, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DTDValidateError, (PyObject *)&__pyx_type_4lxml_5etree_DTDValidateError) < 0) __PYX_ERR(20, 12, __pyx_L1_error) __pyx_ptype_4lxml_5etree_DTDValidateError = &__pyx_type_4lxml_5etree_DTDValidateError; if (PyType_Ready(&__pyx_type_4lxml_5etree__DTDElementContentDecl) < 0) __PYX_ERR(20, 24, __pyx_L1_error) __pyx_type_4lxml_5etree__DTDElementContentDecl.tp_print = 0; @@ -249437,7 +232145,7 @@ static int __Pyx_modinit_type_init_code(void) { } #endif if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_DTD.tp_dict, __pyx_vtabptr_4lxml_5etree_DTD) < 0) __PYX_ERR(20, 265, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "DTD", (PyObject *)&__pyx_type_4lxml_5etree_DTD) < 0) __PYX_ERR(20, 265, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DTD, (PyObject *)&__pyx_type_4lxml_5etree_DTD) < 0) __PYX_ERR(20, 265, __pyx_L1_error) __pyx_ptype_4lxml_5etree_DTD = &__pyx_type_4lxml_5etree_DTD; __pyx_type_4lxml_5etree_RelaxNGError.tp_base = __pyx_ptype_4lxml_5etree_LxmlError; if (PyType_Ready(&__pyx_type_4lxml_5etree_RelaxNGError) < 0) __PYX_ERR(21, 18, __pyx_L1_error) @@ -249445,7 +232153,7 @@ static int __Pyx_modinit_type_init_code(void) { if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_RelaxNGError.tp_dictoffset && __pyx_type_4lxml_5etree_RelaxNGError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_RelaxNGError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "RelaxNGError", (PyObject *)&__pyx_type_4lxml_5etree_RelaxNGError) < 0) __PYX_ERR(21, 18, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RelaxNGError, (PyObject *)&__pyx_type_4lxml_5etree_RelaxNGError) < 0) __PYX_ERR(21, 18, __pyx_L1_error) __pyx_ptype_4lxml_5etree_RelaxNGError = &__pyx_type_4lxml_5etree_RelaxNGError; __pyx_type_4lxml_5etree_RelaxNGParseError.tp_base = __pyx_ptype_4lxml_5etree_RelaxNGError; if (PyType_Ready(&__pyx_type_4lxml_5etree_RelaxNGParseError) < 0) __PYX_ERR(21, 22, __pyx_L1_error) @@ -249453,7 +232161,7 @@ static int __Pyx_modinit_type_init_code(void) { if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_RelaxNGParseError.tp_dictoffset && __pyx_type_4lxml_5etree_RelaxNGParseError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_RelaxNGParseError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "RelaxNGParseError", (PyObject *)&__pyx_type_4lxml_5etree_RelaxNGParseError) < 0) __PYX_ERR(21, 22, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RelaxNGParseError, (PyObject *)&__pyx_type_4lxml_5etree_RelaxNGParseError) < 0) __PYX_ERR(21, 22, __pyx_L1_error) __pyx_ptype_4lxml_5etree_RelaxNGParseError = &__pyx_type_4lxml_5etree_RelaxNGParseError; __pyx_type_4lxml_5etree_RelaxNGValidateError.tp_base = __pyx_ptype_4lxml_5etree_RelaxNGError; if (PyType_Ready(&__pyx_type_4lxml_5etree_RelaxNGValidateError) < 0) __PYX_ERR(21, 26, __pyx_L1_error) @@ -249461,7 +232169,7 @@ static int __Pyx_modinit_type_init_code(void) { if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_RelaxNGValidateError.tp_dictoffset && __pyx_type_4lxml_5etree_RelaxNGValidateError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_RelaxNGValidateError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "RelaxNGValidateError", (PyObject *)&__pyx_type_4lxml_5etree_RelaxNGValidateError) < 0) __PYX_ERR(21, 26, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RelaxNGValidateError, (PyObject *)&__pyx_type_4lxml_5etree_RelaxNGValidateError) < 0) __PYX_ERR(21, 26, __pyx_L1_error) __pyx_ptype_4lxml_5etree_RelaxNGValidateError = &__pyx_type_4lxml_5etree_RelaxNGValidateError; __pyx_vtabptr_4lxml_5etree_RelaxNG = &__pyx_vtable_4lxml_5etree_RelaxNG; __pyx_vtable_4lxml_5etree_RelaxNG.__pyx_base = *__pyx_vtabptr_4lxml_5etree__Validator; @@ -249482,7 +232190,7 @@ static int __Pyx_modinit_type_init_code(void) { } #endif if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_RelaxNG.tp_dict, __pyx_vtabptr_4lxml_5etree_RelaxNG) < 0) __PYX_ERR(21, 34, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "RelaxNG", (PyObject *)&__pyx_type_4lxml_5etree_RelaxNG) < 0) __PYX_ERR(21, 34, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RelaxNG, (PyObject *)&__pyx_type_4lxml_5etree_RelaxNG) < 0) __PYX_ERR(21, 34, __pyx_L1_error) __pyx_ptype_4lxml_5etree_RelaxNG = &__pyx_type_4lxml_5etree_RelaxNG; __pyx_type_4lxml_5etree_XMLSchemaError.tp_base = __pyx_ptype_4lxml_5etree_LxmlError; if (PyType_Ready(&__pyx_type_4lxml_5etree_XMLSchemaError) < 0) __PYX_ERR(22, 5, __pyx_L1_error) @@ -249490,7 +232198,7 @@ static int __Pyx_modinit_type_init_code(void) { if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_XMLSchemaError.tp_dictoffset && __pyx_type_4lxml_5etree_XMLSchemaError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_XMLSchemaError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "XMLSchemaError", (PyObject *)&__pyx_type_4lxml_5etree_XMLSchemaError) < 0) __PYX_ERR(22, 5, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_XMLSchemaError, (PyObject *)&__pyx_type_4lxml_5etree_XMLSchemaError) < 0) __PYX_ERR(22, 5, __pyx_L1_error) __pyx_ptype_4lxml_5etree_XMLSchemaError = &__pyx_type_4lxml_5etree_XMLSchemaError; __pyx_type_4lxml_5etree_XMLSchemaParseError.tp_base = __pyx_ptype_4lxml_5etree_XMLSchemaError; if (PyType_Ready(&__pyx_type_4lxml_5etree_XMLSchemaParseError) < 0) __PYX_ERR(22, 9, __pyx_L1_error) @@ -249498,7 +232206,7 @@ static int __Pyx_modinit_type_init_code(void) { if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_XMLSchemaParseError.tp_dictoffset && __pyx_type_4lxml_5etree_XMLSchemaParseError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_XMLSchemaParseError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "XMLSchemaParseError", (PyObject *)&__pyx_type_4lxml_5etree_XMLSchemaParseError) < 0) __PYX_ERR(22, 9, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_XMLSchemaParseError, (PyObject *)&__pyx_type_4lxml_5etree_XMLSchemaParseError) < 0) __PYX_ERR(22, 9, __pyx_L1_error) __pyx_ptype_4lxml_5etree_XMLSchemaParseError = &__pyx_type_4lxml_5etree_XMLSchemaParseError; __pyx_type_4lxml_5etree_XMLSchemaValidateError.tp_base = __pyx_ptype_4lxml_5etree_XMLSchemaError; if (PyType_Ready(&__pyx_type_4lxml_5etree_XMLSchemaValidateError) < 0) __PYX_ERR(22, 13, __pyx_L1_error) @@ -249506,7 +232214,7 @@ static int __Pyx_modinit_type_init_code(void) { if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_XMLSchemaValidateError.tp_dictoffset && __pyx_type_4lxml_5etree_XMLSchemaValidateError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_XMLSchemaValidateError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "XMLSchemaValidateError", (PyObject *)&__pyx_type_4lxml_5etree_XMLSchemaValidateError) < 0) __PYX_ERR(22, 13, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_XMLSchemaValidateError, (PyObject *)&__pyx_type_4lxml_5etree_XMLSchemaValidateError) < 0) __PYX_ERR(22, 13, __pyx_L1_error) __pyx_ptype_4lxml_5etree_XMLSchemaValidateError = &__pyx_type_4lxml_5etree_XMLSchemaValidateError; __pyx_vtabptr_4lxml_5etree_XMLSchema = &__pyx_vtable_4lxml_5etree_XMLSchema; __pyx_vtable_4lxml_5etree_XMLSchema.__pyx_base = *__pyx_vtabptr_4lxml_5etree__Validator; @@ -249528,7 +232236,7 @@ static int __Pyx_modinit_type_init_code(void) { } #endif if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XMLSchema.tp_dict, __pyx_vtabptr_4lxml_5etree_XMLSchema) < 0) __PYX_ERR(22, 26, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "XMLSchema", (PyObject *)&__pyx_type_4lxml_5etree_XMLSchema) < 0) __PYX_ERR(22, 26, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_XMLSchema, (PyObject *)&__pyx_type_4lxml_5etree_XMLSchema) < 0) __PYX_ERR(22, 26, __pyx_L1_error) __pyx_ptype_4lxml_5etree_XMLSchema = &__pyx_type_4lxml_5etree_XMLSchema; __pyx_vtabptr_4lxml_5etree__ParserSchemaValidationContext = &__pyx_vtable_4lxml_5etree__ParserSchemaValidationContext; __pyx_vtable_4lxml_5etree__ParserSchemaValidationContext.copy = (struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *(*)(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *))__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_copy; @@ -249549,7 +232257,7 @@ static int __Pyx_modinit_type_init_code(void) { if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_SchematronError.tp_dictoffset && __pyx_type_4lxml_5etree_SchematronError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_SchematronError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "SchematronError", (PyObject *)&__pyx_type_4lxml_5etree_SchematronError) < 0) __PYX_ERR(23, 5, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SchematronError, (PyObject *)&__pyx_type_4lxml_5etree_SchematronError) < 0) __PYX_ERR(23, 5, __pyx_L1_error) __pyx_ptype_4lxml_5etree_SchematronError = &__pyx_type_4lxml_5etree_SchematronError; __pyx_type_4lxml_5etree_SchematronParseError.tp_base = __pyx_ptype_4lxml_5etree_SchematronError; if (PyType_Ready(&__pyx_type_4lxml_5etree_SchematronParseError) < 0) __PYX_ERR(23, 9, __pyx_L1_error) @@ -249557,7 +232265,7 @@ static int __Pyx_modinit_type_init_code(void) { if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_SchematronParseError.tp_dictoffset && __pyx_type_4lxml_5etree_SchematronParseError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_SchematronParseError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "SchematronParseError", (PyObject *)&__pyx_type_4lxml_5etree_SchematronParseError) < 0) __PYX_ERR(23, 9, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SchematronParseError, (PyObject *)&__pyx_type_4lxml_5etree_SchematronParseError) < 0) __PYX_ERR(23, 9, __pyx_L1_error) __pyx_ptype_4lxml_5etree_SchematronParseError = &__pyx_type_4lxml_5etree_SchematronParseError; __pyx_type_4lxml_5etree_SchematronValidateError.tp_base = __pyx_ptype_4lxml_5etree_SchematronError; if (PyType_Ready(&__pyx_type_4lxml_5etree_SchematronValidateError) < 0) __PYX_ERR(23, 13, __pyx_L1_error) @@ -249565,7 +232273,7 @@ static int __Pyx_modinit_type_init_code(void) { if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_SchematronValidateError.tp_dictoffset && __pyx_type_4lxml_5etree_SchematronValidateError.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_SchematronValidateError.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "SchematronValidateError", (PyObject *)&__pyx_type_4lxml_5etree_SchematronValidateError) < 0) __PYX_ERR(23, 13, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SchematronValidateError, (PyObject *)&__pyx_type_4lxml_5etree_SchematronValidateError) < 0) __PYX_ERR(23, 13, __pyx_L1_error) __pyx_ptype_4lxml_5etree_SchematronValidateError = &__pyx_type_4lxml_5etree_SchematronValidateError; __pyx_vtabptr_4lxml_5etree_Schematron = &__pyx_vtable_4lxml_5etree_Schematron; __pyx_vtable_4lxml_5etree_Schematron.__pyx_base = *__pyx_vtabptr_4lxml_5etree__Validator; @@ -249586,7 +232294,7 @@ static int __Pyx_modinit_type_init_code(void) { } #endif if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_Schematron.tp_dict, __pyx_vtabptr_4lxml_5etree_Schematron) < 0) __PYX_ERR(23, 21, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "Schematron", (PyObject *)&__pyx_type_4lxml_5etree_Schematron) < 0) __PYX_ERR(23, 21, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Schematron, (PyObject *)&__pyx_type_4lxml_5etree_Schematron) < 0) __PYX_ERR(23, 21, __pyx_L1_error) __pyx_ptype_4lxml_5etree_Schematron = &__pyx_type_4lxml_5etree_Schematron; if (PyType_Ready(&__pyx_type_4lxml_5etree__MemDebug) < 0) __PYX_ERR(25, 4, __pyx_L1_error) __pyx_type_4lxml_5etree__MemDebug.tp_print = 0; @@ -249693,18 +232401,24 @@ static int __Pyx_modinit_type_init_code(void) { static int __Pyx_modinit_type_import_code(void) { __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); /*--- Type import code ---*/ - __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 sizeof(PyTypeObject), #else sizeof(PyHeapTypeObject), #endif - 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) __PYX_ERR(26, 9, __pyx_L1_error) + __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(26, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); __Pyx_RefNannyFinishContext(); return -1; } @@ -249739,15 +232453,6 @@ static int __Pyx_modinit_function_import_code(void) { #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC #endif #endif -#ifndef CYTHON_SMALL_CODE -#if defined(__clang__) - #define CYTHON_SMALL_CODE -#elif defined(__GNUC__) && (!(defined(__cplusplus)) || (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4))) - #define CYTHON_SMALL_CODE __attribute__((cold)) -#else - #define CYTHON_SMALL_CODE -#endif -#endif #if PY_MAJOR_VERSION < 3 @@ -249760,11 +232465,36 @@ __Pyx_PyMODINIT_FUNC PyInit_etree(void) { return PyModuleDef_Init(&__pyx_moduledef); } -static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name) { +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + #if PY_VERSION_HEX >= 0x030700A1 + static PY_INT64_T main_interpreter_id = -1; + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return (unlikely(current_id == -1)) ? -1 : 0; + } else if (unlikely(main_interpreter_id != current_id)) + #else + static PyInterpreterState *main_interpreter = NULL; + PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; + if (!main_interpreter) { + main_interpreter = current_interpreter; + } else if (unlikely(main_interpreter != current_interpreter)) + #endif + { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) { PyObject *value = PyObject_GetAttrString(spec, from_name); int result = 0; if (likely(value)) { - result = PyDict_SetItemString(moddict, to_name, value); + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } Py_DECREF(value); } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); @@ -249773,8 +232503,10 @@ static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const ch } return result; } -static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { PyObject *module = NULL, *moddict, *modname; + if (__Pyx_check_single_interpreter()) + return NULL; if (__pyx_m) return __Pyx_NewRef(__pyx_m); modname = PyObject_GetAttrString(spec, "name"); @@ -249784,10 +232516,10 @@ static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *d if (unlikely(!module)) goto bad; moddict = PyModule_GetDict(module); if (unlikely(!moddict)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__") < 0)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; return module; bad: Py_XDECREF(module); @@ -249795,11 +232527,10 @@ bad: } -static int __pyx_pymod_exec_etree(PyObject *__pyx_pyinit_module) +static CYTHON_SMALL_CODE int __pyx_pymod_exec_etree(PyObject *__pyx_pyinit_module) #endif #endif { - __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; @@ -249817,7 +232548,11 @@ static int __pyx_pymod_exec_etree(PyObject *__pyx_pyinit_module) PyObject *__pyx_t_15 = NULL; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT - if (__pyx_m && __pyx_m == __pyx_pyinit_module) return 0; + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'etree' has already been imported. Re-initialisation is not supported."); + return -1; + } #elif PY_MAJOR_VERSION >= 3 if (__pyx_m) return __Pyx_NewRef(__pyx_m); #endif @@ -249832,6 +232567,9 @@ if (!__Pyx_RefNanny) { #endif __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_etree(void)", 0); if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) @@ -249886,7 +232624,7 @@ if (!__Pyx_RefNanny) { if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif if (__pyx_module_is_main_lxml__etree) { - if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) } #if PY_MAJOR_VERSION >= 3 { @@ -249912,27 +232650,24 @@ if (!__Pyx_RefNanny) { #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif - __Pyx_TraceCall("__Pyx_PyMODINIT_FUNC PyInit_etree(void)", __pyx_f[0], 1, 0, __PYX_ERR(0, 1, __pyx_L1_error)); - /* "lxml/etree.pyx":10 + /* "lxml/etree.pyx":11 * from __future__ import absolute_import * * __docformat__ = u"restructuredtext en" # <<<<<<<<<<<<<< * * __all__ = [ */ - __Pyx_TraceLine(10,0,__PYX_ERR(0, 10, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_d, __pyx_n_s_docformat, __pyx_kp_u_restructuredtext_en) < 0) __PYX_ERR(0, 10, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_docformat, __pyx_kp_u_restructuredtext_en) < 0) __PYX_ERR(0, 11, __pyx_L1_error) - /* "lxml/etree.pyx":12 + /* "lxml/etree.pyx":13 * __docformat__ = u"restructuredtext en" * * __all__ = [ # <<<<<<<<<<<<<< * 'AttributeBasedElementClassLookup', 'C14NError', 'CDATA', * 'Comment', 'CommentBase', 'CustomElementClassLookup', 'DEBUG', */ - __Pyx_TraceLine(12,0,__PYX_ERR(0, 12, __pyx_L1_error)) - __pyx_t_1 = PyList_New(111); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) + __pyx_t_1 = PyList_New(111); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_AttributeBasedElementClassLookup); __Pyx_GIVEREF(__pyx_n_s_AttributeBasedElementClassLookup); @@ -250267,26 +233002,25 @@ if (!__Pyx_RefNanny) { __Pyx_INCREF(__pyx_n_s_use_global_python_log); __Pyx_GIVEREF(__pyx_n_s_use_global_python_log); PyList_SET_ITEM(__pyx_t_1, 110, __pyx_n_s_use_global_python_log); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_1) < 0) __PYX_ERR(0, 12, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_1) < 0) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":63 + /* "lxml/etree.pyx":64 * * cdef object os_path_abspath * from os.path import abspath as os_path_abspath # <<<<<<<<<<<<<< * * cdef object BytesIO, StringIO */ - __Pyx_TraceLine(63,0,__PYX_ERR(0, 63, __pyx_L1_error)) - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_abspath); __Pyx_GIVEREF(__pyx_n_s_abspath); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_abspath); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_os_path, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_t_2 = __Pyx_Import(__pyx_n_s_os_path, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __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_abspath); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_abspath); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_v_4lxml_5etree_os_path_abspath); @@ -250295,15 +233029,14 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":66 + /* "lxml/etree.pyx":67 * * cdef object BytesIO, StringIO * from io import BytesIO, StringIO # <<<<<<<<<<<<<< * - * cdef object OrderedDict = None + * cdef object OrderedDict */ - __Pyx_TraceLine(66,0,__PYX_ERR(0, 66, __pyx_L1_error)) - __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_BytesIO); __Pyx_GIVEREF(__pyx_n_s_BytesIO); @@ -250311,17 +233044,17 @@ if (!__Pyx_RefNanny) { __Pyx_INCREF(__pyx_n_s_StringIO); __Pyx_GIVEREF(__pyx_n_s_StringIO); PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_StringIO); - __pyx_t_1 = __Pyx_Import(__pyx_n_s_io, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_n_s_io, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_BytesIO); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_BytesIO); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_v_4lxml_5etree_BytesIO); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree_BytesIO, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_StringIO); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_StringIO); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_v_4lxml_5etree_StringIO); @@ -250330,130 +233063,46 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":68 - * from io import BytesIO, StringIO + /* "lxml/etree.pyx":70 * - * cdef object OrderedDict = None # <<<<<<<<<<<<<< - * try: - * from collections import OrderedDict - */ - __Pyx_TraceLine(68,0,__PYX_ERR(0, 68, __pyx_L1_error)) - __Pyx_INCREF(Py_None); - __Pyx_XGOTREF(__pyx_v_4lxml_5etree_OrderedDict); - __Pyx_DECREF_SET(__pyx_v_4lxml_5etree_OrderedDict, Py_None); - __Pyx_GIVEREF(Py_None); - - /* "lxml/etree.pyx":69 - * - * cdef object OrderedDict = None - * try: # <<<<<<<<<<<<<< - * from collections import OrderedDict - * except ImportError: - */ - __Pyx_TraceLine(69,0,__PYX_ERR(0, 69, __pyx_L2_error)) - { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); - __Pyx_XGOTREF(__pyx_t_3); - __Pyx_XGOTREF(__pyx_t_4); - __Pyx_XGOTREF(__pyx_t_5); - /*try:*/ { - - /* "lxml/etree.pyx":70 - * cdef object OrderedDict = None - * try: - * from collections import OrderedDict # <<<<<<<<<<<<<< - * except ImportError: - * pass - */ - __Pyx_TraceLine(70,0,__PYX_ERR(0, 70, __pyx_L2_error)) - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L2_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_n_s_OrderedDict); - __Pyx_GIVEREF(__pyx_n_s_OrderedDict); - PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_OrderedDict); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L2_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_OrderedDict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L2_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_t_1); - __Pyx_XGOTREF(__pyx_v_4lxml_5etree_OrderedDict); - __Pyx_DECREF_SET(__pyx_v_4lxml_5etree_OrderedDict, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "lxml/etree.pyx":69 - * - * cdef object OrderedDict = None - * try: # <<<<<<<<<<<<<< - * from collections import OrderedDict - * except ImportError: - */ - } - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - goto __pyx_L7_try_end; - __pyx_L2_error:; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "lxml/etree.pyx":71 - * try: - * from collections import OrderedDict - * except ImportError: # <<<<<<<<<<<<<< - * pass - * - */ - __Pyx_TraceLine(71,0,__PYX_ERR(0, 71, __pyx_L4_except_error)) - __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError); - if (__pyx_t_6) { - __Pyx_ErrRestore(0,0,0); - goto __pyx_L3_exception_handled; - } - goto __pyx_L4_except_error; - __pyx_L4_except_error:; - - /* "lxml/etree.pyx":69 + * cdef object OrderedDict + * from collections import OrderedDict # <<<<<<<<<<<<<< * - * cdef object OrderedDict = None - * try: # <<<<<<<<<<<<<< - * from collections import OrderedDict - * except ImportError: + * cdef object _elementpath */ - __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_XGIVEREF(__pyx_t_4); - __Pyx_XGIVEREF(__pyx_t_5); - __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); - goto __pyx_L1_error; - __pyx_L3_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_XGIVEREF(__pyx_t_4); - __Pyx_XGIVEREF(__pyx_t_5); - __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); - __pyx_L7_try_end:; - } + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_OrderedDict); + __Pyx_GIVEREF(__pyx_n_s_OrderedDict); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_OrderedDict); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __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_OrderedDict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_v_4lxml_5etree_OrderedDict); + __Pyx_DECREF_SET(__pyx_v_4lxml_5etree_OrderedDict, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":75 + /* "lxml/etree.pyx":73 * * cdef object _elementpath * from lxml import _elementpath # <<<<<<<<<<<<<< * * cdef object sys */ - __Pyx_TraceLine(75,0,__PYX_ERR(0, 75, __pyx_L1_error)) - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_elementpath); __Pyx_GIVEREF(__pyx_n_s_elementpath); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_elementpath); - __pyx_t_1 = __Pyx_Import(__pyx_n_s_lxml, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_n_s_lxml, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_elementpath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_elementpath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_v_4lxml_5etree__elementpath); @@ -250462,53 +233111,50 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":78 + /* "lxml/etree.pyx":76 * * cdef object sys * import sys # <<<<<<<<<<<<<< * * cdef object re */ - __Pyx_TraceLine(78,0,__PYX_ERR(0, 78, __pyx_L1_error)) - __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_v_4lxml_5etree_sys); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree_sys, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":81 + /* "lxml/etree.pyx":79 * * cdef object re * import re # <<<<<<<<<<<<<< * * cdef object partial */ - __Pyx_TraceLine(81,0,__PYX_ERR(0, 81, __pyx_L1_error)) - __pyx_t_1 = __Pyx_Import(__pyx_n_s_re, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_n_s_re, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_v_4lxml_5etree_re); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree_re, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":84 + /* "lxml/etree.pyx":82 * * cdef object partial * from functools import partial # <<<<<<<<<<<<<< * * cdef object islice */ - __Pyx_TraceLine(84,0,__PYX_ERR(0, 84, __pyx_L1_error)) - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_partial); __Pyx_GIVEREF(__pyx_n_s_partial); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_partial); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_functools, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error) + __pyx_t_2 = __Pyx_Import(__pyx_n_s_functools, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __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_partial); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error) + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_partial); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_v_4lxml_5etree_partial); @@ -250517,23 +233163,22 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":87 + /* "lxml/etree.pyx":85 * * cdef object islice * from itertools import islice # <<<<<<<<<<<<<< * * cdef object ITER_EMPTY = iter(()) */ - __Pyx_TraceLine(87,0,__PYX_ERR(0, 87, __pyx_L1_error)) - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_islice); __Pyx_GIVEREF(__pyx_n_s_islice); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_islice); - __pyx_t_1 = __Pyx_Import(__pyx_n_s_itertools, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_n_s_itertools, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_islice); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_islice); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_v_4lxml_5etree_islice); @@ -250542,61 +233187,58 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":89 + /* "lxml/etree.pyx":87 * from itertools import islice * * cdef object ITER_EMPTY = iter(()) # <<<<<<<<<<<<<< * * try: */ - __Pyx_TraceLine(89,0,__PYX_ERR(0, 89, __pyx_L1_error)) - __pyx_t_1 = PyObject_GetIter(__pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_1 = PyObject_GetIter(__pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_v_4lxml_5etree_ITER_EMPTY); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree_ITER_EMPTY, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":91 + /* "lxml/etree.pyx":89 * cdef object ITER_EMPTY = iter(()) * * try: # <<<<<<<<<<<<<< * from collections.abc import MutableMapping # Py3.3+ * except ImportError: */ - __Pyx_TraceLine(91,0,__PYX_ERR(0, 91, __pyx_L8_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3); - __Pyx_XGOTREF(__pyx_t_5); - __Pyx_XGOTREF(__pyx_t_4); + __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { - /* "lxml/etree.pyx":92 + /* "lxml/etree.pyx":90 * * try: * from collections.abc import MutableMapping # Py3.3+ # <<<<<<<<<<<<<< * except ImportError: - * from collections import MutableMapping # Py2.6+ + * from collections import MutableMapping # Py2.7 */ - __Pyx_TraceLine(92,0,__PYX_ERR(0, 92, __pyx_L8_error)) - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L8_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_MutableMapping); __Pyx_GIVEREF(__pyx_n_s_MutableMapping); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_MutableMapping); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_collections_abc, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L8_error) + __pyx_t_2 = __Pyx_Import(__pyx_n_s_collections_abc, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L2_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_MutableMapping); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L8_error) + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_MutableMapping); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_MutableMapping, __pyx_t_1) < 0) __PYX_ERR(0, 92, __pyx_L8_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_MutableMapping, __pyx_t_1) < 0) __PYX_ERR(0, 90, __pyx_L2_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":91 + /* "lxml/etree.pyx":89 * cdef object ITER_EMPTY = iter(()) * * try: # <<<<<<<<<<<<<< @@ -250604,224 +233246,212 @@ if (!__Pyx_RefNanny) { * except ImportError: */ } - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - goto __pyx_L13_try_end; - __pyx_L8_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L7_try_end; + __pyx_L2_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":93 + /* "lxml/etree.pyx":91 * try: * from collections.abc import MutableMapping # Py3.3+ * except ImportError: # <<<<<<<<<<<<<< - * from collections import MutableMapping # Py2.6+ + * from collections import MutableMapping # Py2.7 * */ - __Pyx_TraceLine(93,0,__PYX_ERR(0, 93, __pyx_L10_except_error)) __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_6) { __Pyx_AddTraceback("lxml.etree", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(0, 93, __pyx_L10_except_error) + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(0, 91, __pyx_L4_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_7); - /* "lxml/etree.pyx":94 + /* "lxml/etree.pyx":92 * from collections.abc import MutableMapping # Py3.3+ * except ImportError: - * from collections import MutableMapping # Py2.6+ # <<<<<<<<<<<<<< + * from collections import MutableMapping # Py2.7 # <<<<<<<<<<<<<< * * class _ImmutableMapping(MutableMapping): */ - __Pyx_TraceLine(94,0,__PYX_ERR(0, 94, __pyx_L10_except_error)) - __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 94, __pyx_L10_except_error) + __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 92, __pyx_L4_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_n_s_MutableMapping); __Pyx_GIVEREF(__pyx_n_s_MutableMapping); PyList_SET_ITEM(__pyx_t_8, 0, __pyx_n_s_MutableMapping); - __pyx_t_9 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_8, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 94, __pyx_L10_except_error) + __pyx_t_9 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_8, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 92, __pyx_L4_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_ImportFrom(__pyx_t_9, __pyx_n_s_MutableMapping); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 94, __pyx_L10_except_error) + __pyx_t_8 = __Pyx_ImportFrom(__pyx_t_9, __pyx_n_s_MutableMapping); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 92, __pyx_L4_except_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_MutableMapping, __pyx_t_8) < 0) __PYX_ERR(0, 94, __pyx_L10_except_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_MutableMapping, __pyx_t_8) < 0) __PYX_ERR(0, 92, __pyx_L4_except_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - goto __pyx_L9_exception_handled; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L3_exception_handled; } - goto __pyx_L10_except_error; - __pyx_L10_except_error:; + goto __pyx_L4_except_error; + __pyx_L4_except_error:; - /* "lxml/etree.pyx":91 + /* "lxml/etree.pyx":89 * cdef object ITER_EMPTY = iter(()) * * try: # <<<<<<<<<<<<<< * from collections.abc import MutableMapping # Py3.3+ * except ImportError: */ - __Pyx_XGIVEREF(__pyx_t_5); - __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3); - goto __pyx_L1_error; - __pyx_L9_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); + goto __pyx_L1_error; + __pyx_L3_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3); - __pyx_L13_try_end:; + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); + __pyx_L7_try_end:; } - /* "lxml/etree.pyx":96 - * from collections import MutableMapping # Py2.6+ + /* "lxml/etree.pyx":94 + * from collections import MutableMapping # Py2.7 * * class _ImmutableMapping(MutableMapping): # <<<<<<<<<<<<<< * def __getitem__(self, key): * raise KeyError, key */ - __Pyx_TraceLine(96,0,__PYX_ERR(0, 96, __pyx_L1_error)) - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_MutableMapping); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 96, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_MutableMapping); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_1, __pyx_n_s_ImmutableMapping, __pyx_n_s_ImmutableMapping, (PyObject *) NULL, __pyx_n_s_lxml_etree, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_1, __pyx_n_s_ImmutableMapping, __pyx_n_s_ImmutableMapping, (PyObject *) NULL, __pyx_n_s_lxml_etree, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "lxml/etree.pyx":97 + /* "lxml/etree.pyx":95 * * class _ImmutableMapping(MutableMapping): * def __getitem__(self, key): # <<<<<<<<<<<<<< * raise KeyError, key * */ - __Pyx_TraceLine(97,0,__PYX_ERR(0, 97, __pyx_L1_error)) - __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17_ImmutableMapping_1__getitem__, 0, __pyx_n_s_ImmutableMapping___getitem, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj_)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17_ImmutableMapping_1__getitem__, 0, __pyx_n_s_ImmutableMapping___getitem, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getitem, __pyx_t_9) < 0) __PYX_ERR(0, 97, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getitem, __pyx_t_9) < 0) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "lxml/etree.pyx":100 + /* "lxml/etree.pyx":98 * raise KeyError, key * * def __setitem__(self, key, value): # <<<<<<<<<<<<<< * raise KeyError, key * */ - __Pyx_TraceLine(100,0,__PYX_ERR(0, 100, __pyx_L1_error)) - __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17_ImmutableMapping_3__setitem__, 0, __pyx_n_s_ImmutableMapping___setitem, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 100, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17_ImmutableMapping_3__setitem__, 0, __pyx_n_s_ImmutableMapping___setitem, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__92)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_setitem, __pyx_t_9) < 0) __PYX_ERR(0, 100, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_setitem, __pyx_t_9) < 0) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "lxml/etree.pyx":103 + /* "lxml/etree.pyx":101 * raise KeyError, key * * def __delitem__(self, key): # <<<<<<<<<<<<<< * raise KeyError, key * */ - __Pyx_TraceLine(103,0,__PYX_ERR(0, 103, __pyx_L1_error)) - __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17_ImmutableMapping_5__delitem__, 0, __pyx_n_s_ImmutableMapping___delitem, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__3)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 103, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17_ImmutableMapping_5__delitem__, 0, __pyx_n_s_ImmutableMapping___delitem, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_delitem, __pyx_t_9) < 0) __PYX_ERR(0, 103, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_delitem, __pyx_t_9) < 0) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "lxml/etree.pyx":106 + /* "lxml/etree.pyx":104 * raise KeyError, key * * def __contains__(self, key): # <<<<<<<<<<<<<< * return False * */ - __Pyx_TraceLine(106,0,__PYX_ERR(0, 106, __pyx_L1_error)) - __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17_ImmutableMapping_7__contains__, 0, __pyx_n_s_ImmutableMapping___contains, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__4)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17_ImmutableMapping_7__contains__, 0, __pyx_n_s_ImmutableMapping___contains, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_contains, __pyx_t_9) < 0) __PYX_ERR(0, 106, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_contains, __pyx_t_9) < 0) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "lxml/etree.pyx":109 + /* "lxml/etree.pyx":107 * return False * * def __len__(self): # <<<<<<<<<<<<<< * return 0 * */ - __Pyx_TraceLine(109,0,__PYX_ERR(0, 109, __pyx_L1_error)) - __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17_ImmutableMapping_9__len__, 0, __pyx_n_s_ImmutableMapping___len, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__5)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 109, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17_ImmutableMapping_9__len__, 0, __pyx_n_s_ImmutableMapping___len, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_len, __pyx_t_9) < 0) __PYX_ERR(0, 109, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_len, __pyx_t_9) < 0) __PYX_ERR(0, 107, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "lxml/etree.pyx":112 + /* "lxml/etree.pyx":110 * return 0 * * def __iter__(self): # <<<<<<<<<<<<<< * return ITER_EMPTY * iterkeys = itervalues = iteritems = __iter__ */ - __Pyx_TraceLine(112,0,__PYX_ERR(0, 112, __pyx_L1_error)) - __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17_ImmutableMapping_11__iter__, 0, __pyx_n_s_ImmutableMapping___iter, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__6)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17_ImmutableMapping_11__iter__, 0, __pyx_n_s_ImmutableMapping___iter, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__100)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_iter_2, __pyx_t_9) < 0) __PYX_ERR(0, 112, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_iter_2, __pyx_t_9) < 0) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "lxml/etree.pyx":114 + /* "lxml/etree.pyx":112 * def __iter__(self): * return ITER_EMPTY * iterkeys = itervalues = iteritems = __iter__ # <<<<<<<<<<<<<< * * cdef object IMMUTABLE_EMPTY_MAPPING = _ImmutableMapping() */ - __Pyx_TraceLine(114,0,__PYX_ERR(0, 114, __pyx_L1_error)) __pyx_t_9 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_iter_2); if (unlikely(!__pyx_t_9)) { PyErr_Clear(); - __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_iter_2); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_iter_2); } - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 114, __pyx_L1_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_iterkeys, __pyx_t_9) < 0) __PYX_ERR(0, 114, __pyx_L1_error) - if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_itervalues, __pyx_t_9) < 0) __PYX_ERR(0, 114, __pyx_L1_error) - if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_iteritems, __pyx_t_9) < 0) __PYX_ERR(0, 114, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_iterkeys, __pyx_t_9) < 0) __PYX_ERR(0, 112, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_itervalues, __pyx_t_9) < 0) __PYX_ERR(0, 112, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_iteritems, __pyx_t_9) < 0) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "lxml/etree.pyx":96 - * from collections import MutableMapping # Py2.6+ + /* "lxml/etree.pyx":94 + * from collections import MutableMapping # Py2.7 * * class _ImmutableMapping(MutableMapping): # <<<<<<<<<<<<<< * def __getitem__(self, key): * raise KeyError, key */ - __Pyx_TraceLine(96,0,__PYX_ERR(0, 96, __pyx_L1_error)) - __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ImmutableMapping, __pyx_t_1, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ImmutableMapping, __pyx_t_1, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ImmutableMapping, __pyx_t_9) < 0) __PYX_ERR(0, 96, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ImmutableMapping, __pyx_t_9) < 0) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":116 + /* "lxml/etree.pyx":114 * iterkeys = itervalues = iteritems = __iter__ * * cdef object IMMUTABLE_EMPTY_MAPPING = _ImmutableMapping() # <<<<<<<<<<<<<< * del MutableMapping, _ImmutableMapping * */ - __Pyx_TraceLine(116,0,__PYX_ERR(0, 116, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ImmutableMapping); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ImmutableMapping); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 116, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_v_4lxml_5etree_IMMUTABLE_EMPTY_MAPPING); @@ -250829,169 +233459,159 @@ if (!__Pyx_RefNanny) { __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; - /* "lxml/etree.pyx":117 + /* "lxml/etree.pyx":115 * * cdef object IMMUTABLE_EMPTY_MAPPING = _ImmutableMapping() * del MutableMapping, _ImmutableMapping # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(117,0,__PYX_ERR(0, 117, __pyx_L1_error)) - if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_MutableMapping) < 0) __PYX_ERR(0, 117, __pyx_L1_error) - if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_ImmutableMapping) < 0) __PYX_ERR(0, 117, __pyx_L1_error) + if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_MutableMapping) < 0) __PYX_ERR(0, 115, __pyx_L1_error) + if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_ImmutableMapping) < 0) __PYX_ERR(0, 115, __pyx_L1_error) - /* "lxml/etree.pyx":135 + /* "lxml/etree.pyx":133 * * # make the compiled-in debug state publicly available * DEBUG = __DEBUG # <<<<<<<<<<<<<< * * # A struct to store a cached qualified tag name+href pair. */ - __Pyx_TraceLine(135,0,__PYX_ERR(0, 135, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG, __pyx_int_1) < 0) __PYX_ERR(0, 135, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG, __pyx_int_1) < 0) __PYX_ERR(0, 133, __pyx_L1_error) - /* "lxml/etree.pyx":146 + /* "lxml/etree.pyx":144 * * # global per-thread setup * tree.xmlThrDefIndentTreeOutput(1) # <<<<<<<<<<<<<< * tree.xmlThrDefLineNumbersDefaultValue(1) * */ - __Pyx_TraceLine(146,0,__PYX_ERR(0, 146, __pyx_L1_error)) (void)(xmlThrDefIndentTreeOutput(1)); - /* "lxml/etree.pyx":147 + /* "lxml/etree.pyx":145 * # global per-thread setup * tree.xmlThrDefIndentTreeOutput(1) * tree.xmlThrDefLineNumbersDefaultValue(1) # <<<<<<<<<<<<<< * * _initThreadLogging() */ - __Pyx_TraceLine(147,0,__PYX_ERR(0, 147, __pyx_L1_error)) (void)(xmlThrDefLineNumbersDefaultValue(1)); - /* "lxml/etree.pyx":149 + /* "lxml/etree.pyx":147 * tree.xmlThrDefLineNumbersDefaultValue(1) * * _initThreadLogging() # <<<<<<<<<<<<<< * * # initialize parser (and threading) */ - __Pyx_TraceLine(149,0,__PYX_ERR(0, 149, __pyx_L1_error)) __pyx_f_4lxml_5etree__initThreadLogging(); - /* "lxml/etree.pyx":152 + /* "lxml/etree.pyx":150 * * # initialize parser (and threading) * xmlparser.xmlInitParser() # <<<<<<<<<<<<<< * * # filename encoding */ - __Pyx_TraceLine(152,0,__PYX_ERR(0, 152, __pyx_L1_error)) xmlInitParser(); - /* "lxml/etree.pyx":155 + /* "lxml/etree.pyx":153 * * # filename encoding * cdef bytes _FILENAME_ENCODING = (sys.getfilesystemencoding() or sys.getdefaultencoding() or 'ascii').encode("UTF-8") # <<<<<<<<<<<<<< * cdef char* _C_FILENAME_ENCODING = _cstr(_FILENAME_ENCODING) * */ - __Pyx_TraceLine(155,0,__PYX_ERR(0, 155, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_getfilesystemencoding); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_getfilesystemencoding); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 153, __pyx_L1_error) if (!__pyx_t_10) { __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - goto __pyx_L16_bool_binop_done; + goto __pyx_L10_bool_binop_done; } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_getdefaultencoding); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_getdefaultencoding); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 153, __pyx_L1_error) if (!__pyx_t_10) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L16_bool_binop_done; + goto __pyx_L10_bool_binop_done; } __Pyx_INCREF(__pyx_n_s_ascii); __pyx_t_7 = __pyx_n_s_ascii; - __pyx_L16_bool_binop_done:; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_L10_bool_binop_done:; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__405, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__101, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(PyBytes_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_7)->tp_name), 0))) __PYX_ERR(0, 155, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_7)->tp_name), 0))) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_XGOTREF(__pyx_v_4lxml_5etree__FILENAME_ENCODING); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree__FILENAME_ENCODING, ((PyObject*)__pyx_t_7)); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; - /* "lxml/etree.pyx":156 + /* "lxml/etree.pyx":154 * # filename encoding * cdef bytes _FILENAME_ENCODING = (sys.getfilesystemencoding() or sys.getdefaultencoding() or 'ascii').encode("UTF-8") * cdef char* _C_FILENAME_ENCODING = _cstr(_FILENAME_ENCODING) # <<<<<<<<<<<<<< * * # set up some default namespace prefixes */ - __Pyx_TraceLine(156,0,__PYX_ERR(0, 156, __pyx_L1_error)) __pyx_t_7 = __pyx_v_4lxml_5etree__FILENAME_ENCODING; __Pyx_INCREF(__pyx_t_7); __pyx_v_4lxml_5etree__C_FILENAME_ENCODING = PyBytes_AS_STRING(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "lxml/etree.pyx":160 + /* "lxml/etree.pyx":158 * # set up some default namespace prefixes * cdef dict _DEFAULT_NAMESPACE_PREFIXES = { * b"http://www.w3.org/XML/1998/namespace": b'xml', # <<<<<<<<<<<<<< * b"http://www.w3.org/1999/xhtml": b"html", * b"http://www.w3.org/1999/XSL/Transform": b"xsl", */ - __Pyx_TraceLine(160,0,__PYX_ERR(0, 160, __pyx_L1_error)) - __pyx_t_7 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 160, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_t_7, __pyx_kp_b_http_www_w3_org_XML_1998_namespa, __pyx_n_b_xml) < 0) __PYX_ERR(0, 160, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_kp_b_http_www_w3_org_1999_xhtml, __pyx_n_b_html) < 0) __PYX_ERR(0, 160, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_kp_b_http_www_w3_org_1999_XSL_Transfo, __pyx_n_b_xsl) < 0) __PYX_ERR(0, 160, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_kp_b_http_www_w3_org_1999_02_22_rdf_s, __pyx_n_b_rdf) < 0) __PYX_ERR(0, 160, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_kp_b_http_schemas_xmlsoap_org_wsdl, __pyx_n_b_wsdl) < 0) __PYX_ERR(0, 160, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_kp_b_http_www_w3_org_2001_XMLSchema, __pyx_n_b_xs) < 0) __PYX_ERR(0, 160, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_kp_b_http_www_w3_org_2001_XMLSchema_i, __pyx_n_b_xsi) < 0) __PYX_ERR(0, 160, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_kp_b_http_purl_org_dc_elements_1_1, __pyx_n_b_dc) < 0) __PYX_ERR(0, 160, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_kp_b_http_codespeak_net_lxml_objectif, __pyx_n_b_py) < 0) __PYX_ERR(0, 160, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_kp_b_http_www_w3_org_XML_1998_namespa, __pyx_n_b_xml) < 0) __PYX_ERR(0, 158, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_kp_b_http_www_w3_org_1999_xhtml, __pyx_n_b_html) < 0) __PYX_ERR(0, 158, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_kp_b_http_www_w3_org_1999_XSL_Transfo, __pyx_n_b_xsl) < 0) __PYX_ERR(0, 158, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_kp_b_http_www_w3_org_1999_02_22_rdf_s, __pyx_n_b_rdf) < 0) __PYX_ERR(0, 158, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_kp_b_http_schemas_xmlsoap_org_wsdl, __pyx_n_b_wsdl) < 0) __PYX_ERR(0, 158, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_kp_b_http_www_w3_org_2001_XMLSchema, __pyx_n_b_xs) < 0) __PYX_ERR(0, 158, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_kp_b_http_www_w3_org_2001_XMLSchema_i, __pyx_n_b_xsi) < 0) __PYX_ERR(0, 158, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_kp_b_http_purl_org_dc_elements_1_1, __pyx_n_b_dc) < 0) __PYX_ERR(0, 158, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_kp_b_http_codespeak_net_lxml_objectif, __pyx_n_b_py) < 0) __PYX_ERR(0, 158, __pyx_L1_error) __Pyx_XGOTREF(__pyx_v_4lxml_5etree__DEFAULT_NAMESPACE_PREFIXES); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree__DEFAULT_NAMESPACE_PREFIXES, ((PyObject*)__pyx_t_7)); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; - /* "lxml/etree.pyx":174 + /* "lxml/etree.pyx":172 * } * * cdef object _check_internal_prefix = re.compile(b"ns\d+$").match # <<<<<<<<<<<<<< * * def register_namespace(prefix, uri): */ - __Pyx_TraceLine(174,0,__PYX_ERR(0, 174, __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, 174, __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, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__406, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__102, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_match); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_match); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_v_4lxml_5etree__check_internal_prefix); @@ -250999,41 +233619,38 @@ if (!__Pyx_RefNanny) { __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; - /* "lxml/etree.pyx":176 + /* "lxml/etree.pyx":174 * cdef object _check_internal_prefix = re.compile(b"ns\d+$").match * * def register_namespace(prefix, uri): # <<<<<<<<<<<<<< * u"""Registers a namespace prefix that newly created Elements in that * namespace will use. The registry is global, and any existing */ - __Pyx_TraceLine(176,0,__PYX_ERR(0, 176, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_1register_namespace, 0, __pyx_n_s_register_namespace, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__7)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 176, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_1register_namespace, 0, __pyx_n_s_register_namespace, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__104)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_register_namespace, __pyx_t_7) < 0) __PYX_ERR(0, 176, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_register_namespace, __pyx_t_7) < 0) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "lxml/etree.pyx":209 + /* "lxml/etree.pyx":207 * self.error_log = error_log.copy() * * cdef object _Error = Error # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(209,0,__PYX_ERR(0, 209, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_5etree_Error)); __Pyx_XGOTREF(__pyx_v_4lxml_5etree__Error); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree__Error, ((PyObject *)__pyx_ptype_4lxml_5etree_Error)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_5etree_Error)); - /* "lxml/etree.pyx":213 + /* "lxml/etree.pyx":211 * * # superclass for all syntax errors * class LxmlSyntaxError(LxmlError, SyntaxError): # <<<<<<<<<<<<<< * """Base class for all syntax errors. * """ */ - __Pyx_TraceLine(213,0,__PYX_ERR(0, 213, __pyx_L1_error)) - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_5etree_LxmlError)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_5etree_LxmlError)); @@ -251041,49 +233658,47 @@ if (!__Pyx_RefNanny) { __Pyx_INCREF(__pyx_builtin_SyntaxError); __Pyx_GIVEREF(__pyx_builtin_SyntaxError); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_builtin_SyntaxError); - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_7, __pyx_n_s_LxmlSyntaxError, __pyx_n_s_LxmlSyntaxError, (PyObject *) NULL, __pyx_n_s_lxml_etree, __pyx_kp_s_Base_class_for_all_syntax_errors); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_7, __pyx_n_s_LxmlSyntaxError, __pyx_n_s_LxmlSyntaxError, (PyObject *) NULL, __pyx_n_s_lxml_etree, __pyx_kp_s_Base_class_for_all_syntax_errors); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_LxmlSyntaxError, __pyx_t_7, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_LxmlSyntaxError, __pyx_t_7, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_LxmlSyntaxError, __pyx_t_9) < 0) __PYX_ERR(0, 213, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_LxmlSyntaxError, __pyx_t_9) < 0) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "lxml/etree.pyx":253 + /* "lxml/etree.pyx":251 * * cdef int _LIBXML_VERSION_INT * try: # <<<<<<<<<<<<<< * _LIBXML_VERSION_INT = int( * re.match(u'[0-9]+', (tree.xmlParserVersion).decode("ascii")).group(0)) */ - __Pyx_TraceLine(253,0,__PYX_ERR(0, 253, __pyx_L19_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); - __Pyx_XGOTREF(__pyx_t_3); - __Pyx_XGOTREF(__pyx_t_4); + __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "lxml/etree.pyx":255 + /* "lxml/etree.pyx":253 * try: * _LIBXML_VERSION_INT = int( * re.match(u'[0-9]+', (tree.xmlParserVersion).decode("ascii")).group(0)) # <<<<<<<<<<<<<< * except Exception: * print u"Unknown libxml2 version: %s" % (tree.xmlParserVersion).decode("latin1") */ - __Pyx_TraceLine(255,0,__PYX_ERR(0, 255, __pyx_L19_error)) - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_match); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 255, __pyx_L19_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_match); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 253, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = ((unsigned char *)xmlParserVersion); - __pyx_t_1 = __Pyx_decode_c_string(((char const *)__pyx_t_11), 0, strlen(((char const *)__pyx_t_11)), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 255, __pyx_L19_error) + __pyx_t_1 = __Pyx_decode_c_string(((char const *)__pyx_t_11), 0, strlen(((char const *)__pyx_t_11)), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 255, __pyx_L19_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 253, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_kp_u_0_9); __Pyx_GIVEREF(__pyx_kp_u_0_9); @@ -251092,33 +233707,32 @@ if (!__Pyx_RefNanny) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 255, __pyx_L19_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_group); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 255, __pyx_L19_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_group); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 253, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__408, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 255, __pyx_L19_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__105, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":254 + /* "lxml/etree.pyx":252 * cdef int _LIBXML_VERSION_INT * try: * _LIBXML_VERSION_INT = int( # <<<<<<<<<<<<<< * re.match(u'[0-9]+', (tree.xmlParserVersion).decode("ascii")).group(0)) * except Exception: */ - __Pyx_TraceLine(254,0,__PYX_ERR(0, 254, __pyx_L19_error)) - __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 254, __pyx_L19_error) + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 254, __pyx_L19_error) + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 252, __pyx_L13_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_4lxml_5etree__LIBXML_VERSION_INT = __pyx_t_6; - /* "lxml/etree.pyx":253 + /* "lxml/etree.pyx":251 * * cdef int _LIBXML_VERSION_INT * try: # <<<<<<<<<<<<<< @@ -251126,173 +233740,163 @@ if (!__Pyx_RefNanny) { * re.match(u'[0-9]+', (tree.xmlParserVersion).decode("ascii")).group(0)) */ } - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - goto __pyx_L24_try_end; - __pyx_L19_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L18_try_end; + __pyx_L13_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":256 + /* "lxml/etree.pyx":254 * _LIBXML_VERSION_INT = int( * re.match(u'[0-9]+', (tree.xmlParserVersion).decode("ascii")).group(0)) * except Exception: # <<<<<<<<<<<<<< * print u"Unknown libxml2 version: %s" % (tree.xmlParserVersion).decode("latin1") * _LIBXML_VERSION_INT = 0 */ - __Pyx_TraceLine(256,0,__PYX_ERR(0, 256, __pyx_L21_except_error)) __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_6) { __Pyx_AddTraceback("lxml.etree", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(0, 256, __pyx_L21_except_error) + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(0, 254, __pyx_L15_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_7); - /* "lxml/etree.pyx":257 + /* "lxml/etree.pyx":255 * re.match(u'[0-9]+', (tree.xmlParserVersion).decode("ascii")).group(0)) * except Exception: * print u"Unknown libxml2 version: %s" % (tree.xmlParserVersion).decode("latin1") # <<<<<<<<<<<<<< * _LIBXML_VERSION_INT = 0 * */ - __Pyx_TraceLine(257,0,__PYX_ERR(0, 257, __pyx_L21_except_error)) __pyx_t_11 = ((unsigned char *)xmlParserVersion); - __pyx_t_9 = __Pyx_decode_c_string(((char const *)__pyx_t_11), 0, strlen(((char const *)__pyx_t_11)), NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 257, __pyx_L21_except_error) + __pyx_t_9 = __Pyx_decode_c_string(((char const *)__pyx_t_11), 0, strlen(((char const *)__pyx_t_11)), NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 255, __pyx_L15_except_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_Unknown_libxml2_version_s, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 257, __pyx_L21_except_error) + __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_Unknown_libxml2_version_s, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 255, __pyx_L15_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (__Pyx_PrintOne(0, __pyx_t_8) < 0) __PYX_ERR(0, 257, __pyx_L21_except_error) + if (__Pyx_PrintOne(0, __pyx_t_8) < 0) __PYX_ERR(0, 255, __pyx_L15_except_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "lxml/etree.pyx":258 + /* "lxml/etree.pyx":256 * except Exception: * print u"Unknown libxml2 version: %s" % (tree.xmlParserVersion).decode("latin1") * _LIBXML_VERSION_INT = 0 # <<<<<<<<<<<<<< * * LIBXML_VERSION = __unpackIntVersion(_LIBXML_VERSION_INT) */ - __Pyx_TraceLine(258,0,__PYX_ERR(0, 258, __pyx_L21_except_error)) __pyx_v_4lxml_5etree__LIBXML_VERSION_INT = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - goto __pyx_L20_exception_handled; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L14_exception_handled; } - goto __pyx_L21_except_error; - __pyx_L21_except_error:; + goto __pyx_L15_except_error; + __pyx_L15_except_error:; - /* "lxml/etree.pyx":253 + /* "lxml/etree.pyx":251 * * cdef int _LIBXML_VERSION_INT * try: # <<<<<<<<<<<<<< * _LIBXML_VERSION_INT = int( * re.match(u'[0-9]+', (tree.xmlParserVersion).decode("ascii")).group(0)) */ - __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); - __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); - goto __pyx_L1_error; - __pyx_L20_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L14_exception_handled:; __Pyx_XGIVEREF(__pyx_t_5); - __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); - __pyx_L24_try_end:; + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3); + __pyx_L18_try_end:; } - /* "lxml/etree.pyx":260 + /* "lxml/etree.pyx":258 * _LIBXML_VERSION_INT = 0 * * LIBXML_VERSION = __unpackIntVersion(_LIBXML_VERSION_INT) # <<<<<<<<<<<<<< * LIBXML_COMPILED_VERSION = __unpackIntVersion(tree.LIBXML_VERSION) * LXML_VERSION = __unpackDottedVersion(tree.LXML_VERSION_STRING) */ - __Pyx_TraceLine(260,0,__PYX_ERR(0, 260, __pyx_L1_error)) - __pyx_t_7 = __pyx_f_4lxml_5etree___unpackIntVersion(__pyx_v_4lxml_5etree__LIBXML_VERSION_INT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 260, __pyx_L1_error) + __pyx_t_7 = __pyx_f_4lxml_5etree___unpackIntVersion(__pyx_v_4lxml_5etree__LIBXML_VERSION_INT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_LIBXML_VERSION, __pyx_t_7) < 0) __PYX_ERR(0, 260, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_LIBXML_VERSION, __pyx_t_7) < 0) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "lxml/etree.pyx":261 + /* "lxml/etree.pyx":259 * * LIBXML_VERSION = __unpackIntVersion(_LIBXML_VERSION_INT) * LIBXML_COMPILED_VERSION = __unpackIntVersion(tree.LIBXML_VERSION) # <<<<<<<<<<<<<< * LXML_VERSION = __unpackDottedVersion(tree.LXML_VERSION_STRING) * */ - __Pyx_TraceLine(261,0,__PYX_ERR(0, 261, __pyx_L1_error)) - __pyx_t_7 = __pyx_f_4lxml_5etree___unpackIntVersion(LIBXML_VERSION); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 261, __pyx_L1_error) + __pyx_t_7 = __pyx_f_4lxml_5etree___unpackIntVersion(LIBXML_VERSION); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_LIBXML_COMPILED_VERSION, __pyx_t_7) < 0) __PYX_ERR(0, 261, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_LIBXML_COMPILED_VERSION, __pyx_t_7) < 0) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "lxml/etree.pyx":262 + /* "lxml/etree.pyx":260 * LIBXML_VERSION = __unpackIntVersion(_LIBXML_VERSION_INT) * LIBXML_COMPILED_VERSION = __unpackIntVersion(tree.LIBXML_VERSION) * LXML_VERSION = __unpackDottedVersion(tree.LXML_VERSION_STRING) # <<<<<<<<<<<<<< * * __version__ = tree.LXML_VERSION_STRING.decode("ascii") */ - __Pyx_TraceLine(262,0,__PYX_ERR(0, 262, __pyx_L1_error)) - __pyx_t_7 = __Pyx_PyBytes_FromString(LXML_VERSION_STRING); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 262, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyBytes_FromString(LXML_VERSION_STRING); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = __pyx_f_4lxml_5etree___unpackDottedVersion(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree___unpackDottedVersion(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_LXML_VERSION, __pyx_t_1) < 0) __PYX_ERR(0, 262, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_LXML_VERSION, __pyx_t_1) < 0) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":264 + /* "lxml/etree.pyx":262 * LXML_VERSION = __unpackDottedVersion(tree.LXML_VERSION_STRING) * * __version__ = tree.LXML_VERSION_STRING.decode("ascii") # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(264,0,__PYX_ERR(0, 264, __pyx_L1_error)) - __pyx_t_1 = __Pyx_decode_c_string(LXML_VERSION_STRING, 0, strlen(LXML_VERSION_STRING), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error) + __pyx_t_1 = __Pyx_decode_c_string(LXML_VERSION_STRING, 0, strlen(LXML_VERSION_STRING), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_version_2, __pyx_t_1) < 0) __PYX_ERR(0, 264, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_version_2, __pyx_t_1) < 0) __PYX_ERR(0, 262, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/apihelpers.pxi":626 + /* "src/lxml/apihelpers.pxi":625 * return attributes * * cdef object __RE_XML_ENCODING = re.compile( # <<<<<<<<<<<<<< * ur'^(<\?xml[^>]+)\s+encoding\s*=\s*["\'][^"\']*["\'](\s*\?>|)', re.U) * */ - __Pyx_TraceLine(626,0,__PYX_ERR(5, 626, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_compile); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 626, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_compile); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "src/lxml/apihelpers.pxi":627 + /* "src/lxml/apihelpers.pxi":626 * * cdef object __RE_XML_ENCODING = re.compile( * ur'^(<\?xml[^>]+)\s+encoding\s*=\s*["\'][^"\']*["\'](\s*\?>|)', re.U) # <<<<<<<<<<<<<< * * cdef object __REPLACE_XML_ENCODING = __RE_XML_ENCODING.sub */ - __Pyx_TraceLine(627,0,__PYX_ERR(5, 627, __pyx_L1_error)) - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_U); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 627, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_U); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - /* "src/lxml/apihelpers.pxi":626 + /* "src/lxml/apihelpers.pxi":625 * return attributes * * cdef object __RE_XML_ENCODING = re.compile( # <<<<<<<<<<<<<< * ur'^(<\?xml[^>]+)\s+encoding\s*=\s*["\'][^"\']*["\'](\s*\?>|)', re.U) * */ - __Pyx_TraceLine(626,0,__PYX_ERR(5, 626, __pyx_L1_error)) - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 626, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_kp_u_xml_s_encoding_s_s_s); __Pyx_GIVEREF(__pyx_kp_u_xml_s_encoding_s_s_s); @@ -251300,7 +233904,7 @@ if (!__Pyx_RefNanny) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 626, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -251309,30 +233913,28 @@ if (!__Pyx_RefNanny) { __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; - /* "src/lxml/apihelpers.pxi":629 + /* "src/lxml/apihelpers.pxi":628 * ur'^(<\?xml[^>]+)\s+encoding\s*=\s*["\'][^"\']*["\'](\s*\?>|)', re.U) * * cdef object __REPLACE_XML_ENCODING = __RE_XML_ENCODING.sub # <<<<<<<<<<<<<< * cdef object __HAS_XML_ENCODING = __RE_XML_ENCODING.match * */ - __Pyx_TraceLine(629,0,__PYX_ERR(5, 629, __pyx_L1_error)) - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree___RE_XML_ENCODING, __pyx_n_s_sub); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 629, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree___RE_XML_ENCODING, __pyx_n_s_sub); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_v_4lxml_5etree___REPLACE_XML_ENCODING); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree___REPLACE_XML_ENCODING, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; - /* "src/lxml/apihelpers.pxi":630 + /* "src/lxml/apihelpers.pxi":629 * * cdef object __REPLACE_XML_ENCODING = __RE_XML_ENCODING.sub * cdef object __HAS_XML_ENCODING = __RE_XML_ENCODING.match # <<<<<<<<<<<<<< * * cdef object _stripEncodingDeclaration(object xml_string): */ - __Pyx_TraceLine(630,0,__PYX_ERR(5, 630, __pyx_L1_error)) - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree___RE_XML_ENCODING, __pyx_n_s_match); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 630, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree___RE_XML_ENCODING, __pyx_n_s_match); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_v_4lxml_5etree___HAS_XML_ENCODING); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree___HAS_XML_ENCODING, __pyx_t_7); @@ -251346,8 +233948,7 @@ if (!__Pyx_RefNanny) { * u"""clear_error_log() * */ - __Pyx_TraceLine(11,0,__PYX_ERR(1, 11, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_3clear_error_log, 0, __pyx_n_s_clear_error_log_2, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 11, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_3clear_error_log, 0, __pyx_n_s_clear_error_log_2, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__106)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); 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; @@ -251359,8 +233960,7 @@ if (!__Pyx_RefNanny) { * return _BaseErrorLog(self._first_error, self.last_error) * */ - __Pyx_TraceLine(187,0,__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__34)); 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, 187, __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) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -251373,8 +233973,7 @@ if (!__Pyx_RefNanny) { * pass * */ - __Pyx_TraceLine(193,0,__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__35)); 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, 193, __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) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -251387,8 +233986,7 @@ if (!__Pyx_RefNanny) { * u"""Creates a shallow copy of this error log. Reuses the list of * entries. */ - __Pyx_TraceLine(283,0,__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__36)); 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, 283, __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) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -251401,8 +233999,7 @@ if (!__Pyx_RefNanny) { * u"""Filter the errors by the given domains and return a new error log * containing the matches. */ - __Pyx_TraceLine(321,0,__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__38)); 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, 321, __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) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -251415,8 +234012,7 @@ if (!__Pyx_RefNanny) { * u"""filter_types(self, types) * */ - __Pyx_TraceLine(331,0,__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__39)); 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, 331, __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) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -251429,8 +234025,7 @@ if (!__Pyx_RefNanny) { * u"""filter_levels(self, levels) * */ - __Pyx_TraceLine(343,0,__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__40)); 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, 343, __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) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -251443,8 +234038,7 @@ if (!__Pyx_RefNanny) { * u"""filter_from_level(self, level) * */ - __Pyx_TraceLine(355,0,__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__41)); 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, 355, __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) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -251457,8 +234051,7 @@ if (!__Pyx_RefNanny) { * u"""filter_from_fatals(self) * */ - __Pyx_TraceLine(364,0,__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__42)); 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, 364, __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) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -251471,8 +234064,7 @@ if (!__Pyx_RefNanny) { * u"""filter_from_errors(self) * */ - __Pyx_TraceLine(371,0,__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__43)); 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, 371, __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) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -251485,8 +234077,7 @@ if (!__Pyx_RefNanny) { * u"""filter_from_warnings(self) * */ - __Pyx_TraceLine(378,0,__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__44)); 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, 378, __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) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -251499,8 +234090,7 @@ if (!__Pyx_RefNanny) { * # TODO: make this a cdef function when Cython supports it * self.disconnect() */ - __Pyx_TraceLine(437,0,__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__45)); 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, 437, __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) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -251513,8 +234103,7 @@ if (!__Pyx_RefNanny) { * self._first_error = None * self.last_error = None */ - __Pyx_TraceLine(457,0,__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__46)); 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, 457, __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) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -251527,8 +234116,7 @@ if (!__Pyx_RefNanny) { * u"""Creates a shallow copy of this error log and the list of entries. * """ */ - __Pyx_TraceLine(463,0,__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__47)); 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, 463, __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) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -251541,8 +234129,7 @@ if (!__Pyx_RefNanny) { * if self._first_error is None and entry.level >= xmlerror.XML_ERR_ERROR: * self._first_error = entry */ - __Pyx_TraceLine(473,0,__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__48)); 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, 473, __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) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -251555,8 +234142,7 @@ if (!__Pyx_RefNanny) { * if entry.domain in self._accepted_domains: * _ErrorLog.receive(self, entry) */ - __Pyx_TraceLine(483,0,__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__49)); 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, 483, __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) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -251569,8 +234155,7 @@ if (!__Pyx_RefNanny) { * if self._first_error is None and entry.level >= xmlerror.XML_ERR_ERROR: * self._first_error = entry */ - __Pyx_TraceLine(493,0,__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__50)); 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, 493, __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) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -251583,8 +234168,7 @@ if (!__Pyx_RefNanny) { * u"""Dummy method that returns an empty error log. * """ */ - __Pyx_TraceLine(544,0,__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__51)); 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, 544, __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) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -251597,8 +234181,7 @@ if (!__Pyx_RefNanny) { * u"""log(self, log_entry, message, *args) * */ - __Pyx_TraceLine(549,0,__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__52)); 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, 549, __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) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -251611,8 +234194,7 @@ if (!__Pyx_RefNanny) { * u"""receive(self, log_entry) * */ - __Pyx_TraceLine(566,0,__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__53)); 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, 566, __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) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -251625,8 +234207,7 @@ if (!__Pyx_RefNanny) { * * */ - __Pyx_TraceLine(582,0,__PYX_ERR(1, 582, __pyx_L1_error)) - __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__RotatingErrorLog), __pyx_tuple__428, 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, 582, __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)); @@ -251640,8 +234221,7 @@ if (!__Pyx_RefNanny) { * u"""use_global_python_log(log) * */ - __Pyx_TraceLine(616,0,__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__55)); 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, 616, __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) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -251653,12 +234233,11 @@ if (!__Pyx_RefNanny) { * u"Libxml2 error levels" * */ - __Pyx_TraceLine(804,0,__PYX_ERR(1, 804, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__430); 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, 804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_tuple__430, __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, 804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ErrorLevels, __pyx_tuple__430, __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, 804, __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) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -251672,12 +234251,11 @@ if (!__Pyx_RefNanny) { * u"Libxml2 error domains" * */ - __Pyx_TraceLine(807,0,__PYX_ERR(1, 807, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__431); 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, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_tuple__431, __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, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ErrorDomains, __pyx_tuple__431, __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, 807, __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) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -251691,12 +234269,11 @@ if (!__Pyx_RefNanny) { * u"Libxml2 error types" * */ - __Pyx_TraceLine(810,0,__PYX_ERR(1, 810, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__432); 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, 810, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_tuple__432, __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, 810, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ErrorTypes, __pyx_tuple__432, __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, 810, __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) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -251710,12 +234287,11 @@ if (!__Pyx_RefNanny) { * u"Libxml2 RelaxNG error types" * */ - __Pyx_TraceLine(813,0,__PYX_ERR(1, 813, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__433); 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, 813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_tuple__433, __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, 813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_RelaxNGErrorTypes, __pyx_tuple__433, __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, 813, __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) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -251729,7 +234305,6 @@ if (!__Pyx_RefNanny) { * NONE=0 * WARNING=1 */ - __Pyx_TraceLine(820,0,__PYX_ERR(1, 820, __pyx_L1_error)) __Pyx_INCREF(__pyx_kp_s_NONE_0_WARNING_1_ERROR_2_FATAL_3); __Pyx_XGOTREF(__pyx_v_4lxml_5etree___ERROR_LEVELS); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree___ERROR_LEVELS, __pyx_kp_s_NONE_0_WARNING_1_ERROR_2_FATAL_3); @@ -251742,7 +234317,6 @@ if (!__Pyx_RefNanny) { * NONE=0 * PARSER=1 */ - __Pyx_TraceLine(827,0,__PYX_ERR(1, 827, __pyx_L1_error)) __Pyx_INCREF(__pyx_kp_s_NONE_0_PARSER_1_TREE_2_NAMESPACE); __Pyx_XGOTREF(__pyx_v_4lxml_5etree___ERROR_DOMAINS); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree___ERROR_DOMAINS, __pyx_kp_s_NONE_0_PARSER_1_TREE_2_NAMESPACE); @@ -251755,7 +234329,6 @@ if (!__Pyx_RefNanny) { * ERR_OK=0 * ERR_INTERNAL_ERROR=1 */ - __Pyx_TraceLine(861,0,__PYX_ERR(1, 861, __pyx_L1_error)) __Pyx_INCREF(__pyx_kp_s_ERR_OK_0_ERR_INTERNAL_ERROR_1_ER); __Pyx_XGOTREF(__pyx_v_4lxml_5etree___PARSER_ERROR_TYPES); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree___PARSER_ERROR_TYPES, __pyx_kp_s_ERR_OK_0_ERR_INTERNAL_ERROR_1_ER); @@ -251768,7 +234341,6 @@ if (!__Pyx_RefNanny) { * RELAXNG_OK=0 * RELAXNG_ERR_MEMORY=1 */ - __Pyx_TraceLine(1598,0,__PYX_ERR(1, 1598, __pyx_L1_error)) __Pyx_INCREF(__pyx_kp_s_RELAXNG_OK_0_RELAXNG_ERR_MEMORY); __Pyx_XGOTREF(__pyx_v_4lxml_5etree___RELAXNG_ERROR_TYPES); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree___RELAXNG_ERROR_TYPES, __pyx_kp_s_RELAXNG_OK_0_RELAXNG_ERR_MEMORY); @@ -251779,49 +234351,45 @@ if (!__Pyx_RefNanny) { * * __initErrorConstants() # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(1642,0,__PYX_ERR(1, 1642, __pyx_L1_error)) __pyx_t_7 = __pyx_f_4lxml_5etree___initErrorConstants(); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "lxml/etree.pyx":492 + /* "lxml/etree.pyx":490 * for i in range(30) ]) * * cdef tuple _PREFIX_CACHE = __initPrefixCache() # <<<<<<<<<<<<<< * * cdef _Document _documentFactory(xmlDoc* c_doc, _BaseParser parser): */ - __Pyx_TraceLine(492,0,__PYX_ERR(0, 492, __pyx_L1_error)) - __pyx_t_7 = __pyx_f_4lxml_5etree___initPrefixCache(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 492, __pyx_L1_error) + __pyx_t_7 = __pyx_f_4lxml_5etree___initPrefixCache(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_v_4lxml_5etree__PREFIX_CACHE); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree__PREFIX_CACHE, ((PyObject*)__pyx_t_7)); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; - /* "lxml/etree.pyx":506 + /* "lxml/etree.pyx":504 * * * cdef object _find_invalid_public_id_characters = re.compile( # <<<<<<<<<<<<<< * ur"[^\x20\x0D\x0Aa-zA-Z0-9'()+,./:=?;!*#@$_%-]+").search * */ - __Pyx_TraceLine(506,0,__PYX_ERR(0, 506, __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, 506, __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, 504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__434, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 506, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__151, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "lxml/etree.pyx":507 + /* "lxml/etree.pyx":505 * * cdef object _find_invalid_public_id_characters = re.compile( * ur"[^\x20\x0D\x0Aa-zA-Z0-9'()+,./:=?;!*#@$_%-]+").search # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(507,0,__PYX_ERR(0, 507, __pyx_L1_error)) - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_search); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 507, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_search); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_4lxml_5etree__find_invalid_public_id_characters); @@ -251829,663 +234397,616 @@ if (!__Pyx_RefNanny) { __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; - /* "lxml/etree.pyx":540 + /* "lxml/etree.pyx":538 * return tree.xmlCreateIntSubset(c_doc, c_name, NULL, NULL) * * def clear(self): # <<<<<<<<<<<<<< * u"""Removes DOCTYPE and internal subset from the document.""" * cdef xmlDoc* c_doc = self._doc._c_doc */ - __Pyx_TraceLine(540,0,__PYX_ERR(0, 540, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7DocInfo_3clear, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DocInfo_clear, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 540, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7DocInfo_3clear, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DocInfo_clear, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__153)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_DocInfo->tp_dict, __pyx_n_s_clear, __pyx_t_7) < 0) __PYX_ERR(0, 540, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_DocInfo->tp_dict, __pyx_n_s_clear, __pyx_t_7) < 0) __PYX_ERR(0, 538, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_DocInfo); - /* "lxml/etree.pyx":697 + /* "lxml/etree.pyx":695 * cdef object _tag * * def _init(self): # <<<<<<<<<<<<<< * u"""_init(self) * */ - __Pyx_TraceLine(697,0,__PYX_ERR(0, 697, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_1_init, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element__init, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 697, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_1_init, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element__init, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__155)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_init_2, __pyx_t_7) < 0) __PYX_ERR(0, 697, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_init_2, __pyx_t_7) < 0) __PYX_ERR(0, 695, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":784 + /* "lxml/etree.pyx":782 * _removeNode(self._doc, c_node) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< * u"__deepcopy__(self, memo)" * return self.__copy__() */ - __Pyx_TraceLine(784,0,__PYX_ERR(0, 784, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_9__deepcopy__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element___deepcopy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 784, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_9__deepcopy__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element___deepcopy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__157)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 782, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_deepcopy, __pyx_t_7) < 0) __PYX_ERR(0, 784, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_deepcopy, __pyx_t_7) < 0) __PYX_ERR(0, 782, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":788 + /* "lxml/etree.pyx":786 * return self.__copy__() * * def __copy__(self): # <<<<<<<<<<<<<< * u"__copy__(self)" * cdef xmlDoc* c_doc */ - __Pyx_TraceLine(788,0,__PYX_ERR(0, 788, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_11__copy__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element___copy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 788, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_11__copy__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element___copy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__159)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 786, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_copy_2, __pyx_t_7) < 0) __PYX_ERR(0, 788, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_copy_2, __pyx_t_7) < 0) __PYX_ERR(0, 786, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":807 + /* "lxml/etree.pyx":805 * return _elementFactory(new_doc, c_node) * * def set(self, key, value): # <<<<<<<<<<<<<< * u"""set(self, key, value) * */ - __Pyx_TraceLine(807,0,__PYX_ERR(0, 807, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_13set, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_set, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 807, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_13set, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_set, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__161)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_set, __pyx_t_7) < 0) __PYX_ERR(0, 807, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_set, __pyx_t_7) < 0) __PYX_ERR(0, 805, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":815 + /* "lxml/etree.pyx":813 * _setAttributeValue(self, key, value) * * def append(self, _Element element not None): # <<<<<<<<<<<<<< * u"""append(self, element) * */ - __Pyx_TraceLine(815,0,__PYX_ERR(0, 815, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_15append, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_append, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 815, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_15append, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_append, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__163)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_append, __pyx_t_7) < 0) __PYX_ERR(0, 815, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_append, __pyx_t_7) < 0) __PYX_ERR(0, 813, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":824 + /* "lxml/etree.pyx":822 * _appendChild(self, element) * * def addnext(self, _Element element not None): # <<<<<<<<<<<<<< * u"""addnext(self, element) * */ - __Pyx_TraceLine(824,0,__PYX_ERR(0, 824, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_17addnext, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_addnext, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 824, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_17addnext, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_addnext, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__165)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_addnext, __pyx_t_7) < 0) __PYX_ERR(0, 824, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_addnext, __pyx_t_7) < 0) __PYX_ERR(0, 822, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":843 + /* "lxml/etree.pyx":841 * _appendSibling(self, element) * * def addprevious(self, _Element element not None): # <<<<<<<<<<<<<< * u"""addprevious(self, element) * */ - __Pyx_TraceLine(843,0,__PYX_ERR(0, 843, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_19addprevious, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_addprevious, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 843, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_19addprevious, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_addprevious, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__167)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_addprevious, __pyx_t_7) < 0) __PYX_ERR(0, 843, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_addprevious, __pyx_t_7) < 0) __PYX_ERR(0, 841, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":862 + /* "lxml/etree.pyx":860 * _prependSibling(self, element) * * def extend(self, elements): # <<<<<<<<<<<<<< * u"""extend(self, elements) * */ - __Pyx_TraceLine(862,0,__PYX_ERR(0, 862, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_21extend, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_extend, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 862, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_21extend, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_extend, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__169)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 860, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_extend, __pyx_t_7) < 0) __PYX_ERR(0, 862, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_extend, __pyx_t_7) < 0) __PYX_ERR(0, 860, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":875 + /* "lxml/etree.pyx":873 * _appendChild(self, element) * * def clear(self): # <<<<<<<<<<<<<< * u"""clear(self) * */ - __Pyx_TraceLine(875,0,__PYX_ERR(0, 875, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_23clear, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_clear, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 875, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_23clear, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_clear, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__171)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_clear, __pyx_t_7) < 0) __PYX_ERR(0, 875, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_clear, __pyx_t_7) < 0) __PYX_ERR(0, 873, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":906 + /* "lxml/etree.pyx":904 * c_node = c_node_next * * def insert(self, index, _Element element not None): # <<<<<<<<<<<<<< * u"""insert(self, index, element) * */ - __Pyx_TraceLine(906,0,__PYX_ERR(0, 906, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_25insert, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_insert, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 906, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_25insert, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_insert, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__173)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_insert, __pyx_t_7) < 0) __PYX_ERR(0, 906, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_insert, __pyx_t_7) < 0) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":926 + /* "lxml/etree.pyx":924 * moveNodeToDocument(self._doc, c_source_doc, element._c_node) * * def remove(self, _Element element not None): # <<<<<<<<<<<<<< * u"""remove(self, element) * */ - __Pyx_TraceLine(926,0,__PYX_ERR(0, 926, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_27remove, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_remove, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 926, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_27remove, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_remove, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__175)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_remove, __pyx_t_7) < 0) __PYX_ERR(0, 926, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_remove, __pyx_t_7) < 0) __PYX_ERR(0, 924, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":946 + /* "lxml/etree.pyx":944 * moveNodeToDocument(self._doc, c_node.doc, c_node) * * def replace(self, _Element old_element not None, # <<<<<<<<<<<<<< * _Element new_element not None): * u"""replace(self, old_element, new_element) */ - __Pyx_TraceLine(946,0,__PYX_ERR(0, 946, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_29replace, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_replace, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__77)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 946, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_29replace, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_replace, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__177)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 944, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_replace, __pyx_t_7) < 0) __PYX_ERR(0, 946, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_replace, __pyx_t_7) < 0) __PYX_ERR(0, 944, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1203 + /* "lxml/etree.pyx":1201 * return ElementChildIterator(self) * * def __reversed__(self): # <<<<<<<<<<<<<< * u"__reversed__(self)" * return ElementChildIterator(self, reversed=True) */ - __Pyx_TraceLine(1203,0,__PYX_ERR(0, 1203, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_43__reversed__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element___reversed, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1203, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_43__reversed__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element___reversed, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__179)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_reversed_2, __pyx_t_7) < 0) __PYX_ERR(0, 1203, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_reversed_2, __pyx_t_7) < 0) __PYX_ERR(0, 1201, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1207 + /* "lxml/etree.pyx":1205 * return ElementChildIterator(self, reversed=True) * * def index(self, _Element child not None, start=None, stop=None): # <<<<<<<<<<<<<< * u"""index(self, child, start=None, stop=None) * */ - __Pyx_TraceLine(1207,0,__PYX_ERR(0, 1207, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_45index, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_index, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1207, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_45index, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_index, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__181)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_index, __pyx_t_7) < 0) __PYX_ERR(0, 1207, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_index, __pyx_t_7) < 0) __PYX_ERR(0, 1205, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1294 + /* "lxml/etree.pyx":1292 * raise ValueError, u"list.index(x): x not in list" * * def get(self, key, default=None): # <<<<<<<<<<<<<< * u"""get(self, key, default=None) * */ - __Pyx_TraceLine(1294,0,__PYX_ERR(0, 1294, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_47get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_get, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__81)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1294, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_47get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_get, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__183)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_get, __pyx_t_7) < 0) __PYX_ERR(0, 1294, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_get, __pyx_t_7) < 0) __PYX_ERR(0, 1292, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1302 + /* "lxml/etree.pyx":1300 * return _getAttributeValue(self, key, default) * * def keys(self): # <<<<<<<<<<<<<< * u"""keys(self) * */ - __Pyx_TraceLine(1302,0,__PYX_ERR(0, 1302, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_49keys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_keys, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1302, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_49keys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_keys, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__185)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_keys, __pyx_t_7) < 0) __PYX_ERR(0, 1302, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_keys, __pyx_t_7) < 0) __PYX_ERR(0, 1300, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1311 + /* "lxml/etree.pyx":1309 * return _collectAttributes(self._c_node, 1) * * def values(self): # <<<<<<<<<<<<<< * u"""values(self) * */ - __Pyx_TraceLine(1311,0,__PYX_ERR(0, 1311, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_51values, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_values, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1311, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_51values, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_values, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__187)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_values, __pyx_t_7) < 0) __PYX_ERR(0, 1311, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_values, __pyx_t_7) < 0) __PYX_ERR(0, 1309, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1320 + /* "lxml/etree.pyx":1318 * return _collectAttributes(self._c_node, 2) * * def items(self): # <<<<<<<<<<<<<< * u"""items(self) * */ - __Pyx_TraceLine(1320,0,__PYX_ERR(0, 1320, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_53items, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_items, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1320, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_53items, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_items, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__189)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_items, __pyx_t_7) < 0) __PYX_ERR(0, 1320, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_items, __pyx_t_7) < 0) __PYX_ERR(0, 1318, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1329 + /* "lxml/etree.pyx":1327 * return _collectAttributes(self._c_node, 3) * * def getchildren(self): # <<<<<<<<<<<<<< * u"""getchildren(self) * */ - __Pyx_TraceLine(1329,0,__PYX_ERR(0, 1329, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_55getchildren, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_getchildren, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1329, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_55getchildren, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_getchildren, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__191)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_getchildren, __pyx_t_7) < 0) __PYX_ERR(0, 1329, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_getchildren, __pyx_t_7) < 0) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1342 + /* "lxml/etree.pyx":1340 * return _collectChildren(self) * * def getparent(self): # <<<<<<<<<<<<<< * u"""getparent(self) * */ - __Pyx_TraceLine(1342,0,__PYX_ERR(0, 1342, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_57getparent, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_getparent, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1342, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_57getparent, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_getparent, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__193)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_getparent, __pyx_t_7) < 0) __PYX_ERR(0, 1342, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_getparent, __pyx_t_7) < 0) __PYX_ERR(0, 1340, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1354 + /* "lxml/etree.pyx":1352 * return _elementFactory(self._doc, c_node) * * def getnext(self): # <<<<<<<<<<<<<< * u"""getnext(self) * */ - __Pyx_TraceLine(1354,0,__PYX_ERR(0, 1354, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_59getnext, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_getnext, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_59getnext, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_getnext, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__195)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_getnext, __pyx_t_7) < 0) __PYX_ERR(0, 1354, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_getnext, __pyx_t_7) < 0) __PYX_ERR(0, 1352, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1366 + /* "lxml/etree.pyx":1364 * return _elementFactory(self._doc, c_node) * * def getprevious(self): # <<<<<<<<<<<<<< * u"""getprevious(self) * */ - __Pyx_TraceLine(1366,0,__PYX_ERR(0, 1366, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_61getprevious, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_getprevious, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__88)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1366, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_61getprevious, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_getprevious, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__197)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_getprevious, __pyx_t_7) < 0) __PYX_ERR(0, 1366, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_getprevious, __pyx_t_7) < 0) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1378 + /* "lxml/etree.pyx":1376 * return _elementFactory(self._doc, c_node) * * def itersiblings(self, tag=None, *tags, preceding=False): # <<<<<<<<<<<<<< * u"""itersiblings(self, tag=None, *tags, preceding=False) * */ - __Pyx_TraceLine(1378,0,__PYX_ERR(0, 1378, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_63itersiblings, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_itersiblings, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1378, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_63itersiblings, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_itersiblings, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__199)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_itersiblings, __pyx_t_7) < 0) __PYX_ERR(0, 1378, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_itersiblings, __pyx_t_7) < 0) __PYX_ERR(0, 1376, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1396 + /* "lxml/etree.pyx":1394 * return SiblingsIterator(self, tags, preceding=preceding) * * def iterancestors(self, tag=None, *tags): # <<<<<<<<<<<<<< * u"""iterancestors(self, tag=None, *tags) * */ - __Pyx_TraceLine(1396,0,__PYX_ERR(0, 1396, __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__90)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1396, __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, 1394, __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, 1396, __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, 1394, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1408 + /* "lxml/etree.pyx":1406 * return AncestorsIterator(self, tags) * * def iterdescendants(self, tag=None, *tags): # <<<<<<<<<<<<<< * u"""iterdescendants(self, tag=None, *tags) * */ - __Pyx_TraceLine(1408,0,__PYX_ERR(0, 1408, __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__91)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1408, __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, 1406, __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, 1408, __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, 1406, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1421 + /* "lxml/etree.pyx":1419 * return ElementDepthFirstIterator(self, tags, inclusive=False) * * def iterchildren(self, tag=None, *tags, reversed=False): # <<<<<<<<<<<<<< * u"""iterchildren(self, tag=None, *tags, reversed=False) * */ - __Pyx_TraceLine(1421,0,__PYX_ERR(0, 1421, __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__92)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1421, __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, 1419, __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, 1421, __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, 1419, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1434 + /* "lxml/etree.pyx":1432 * return ElementChildIterator(self, tags, reversed=reversed) * * def getroottree(self): # <<<<<<<<<<<<<< * u"""getroottree(self) * */ - __Pyx_TraceLine(1434,0,__PYX_ERR(0, 1434, __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__93)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1434, __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, 1432, __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, 1434, __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, 1432, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1446 + /* "lxml/etree.pyx":1444 * return _elementTreeFactory(self._doc, None) * * def getiterator(self, tag=None, *tags): # <<<<<<<<<<<<<< * u"""getiterator(self, tag=None, *tags) * */ - __Pyx_TraceLine(1446,0,__PYX_ERR(0, 1446, __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__94)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1446, __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, 1444, __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, 1446, __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, 1444, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1468 + /* "lxml/etree.pyx":1466 * return ElementDepthFirstIterator(self, tags) * * def iter(self, tag=None, *tags): # <<<<<<<<<<<<<< * u"""iter(self, tag=None, *tags) * */ - __Pyx_TraceLine(1468,0,__PYX_ERR(0, 1468, __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__95)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1468, __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, 1466, __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, 1468, __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, 1466, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1492 + /* "lxml/etree.pyx":1490 * return ElementDepthFirstIterator(self, tags) * * def itertext(self, tag=None, *tags, with_tail=True): # <<<<<<<<<<<<<< * u"""itertext(self, tag=None, *tags, with_tail=True) * */ - __Pyx_TraceLine(1492,0,__PYX_ERR(0, 1492, __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__96)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1492, __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, 1490, __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, 1492, __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, 1490, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1507 + /* "lxml/etree.pyx":1505 * 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_TraceLine(1507,0,__PYX_ERR(0, 1507, __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__97)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1507, __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, 1505, __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, 1507, __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, 1505, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1516 + /* "lxml/etree.pyx":1514 * attrib, nsmap, _extra) * * def find(self, path, namespaces=None): # <<<<<<<<<<<<<< * u"""find(self, path, namespaces=None) * */ - __Pyx_TraceLine(1516,0,__PYX_ERR(0, 1516, __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__98)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1516, __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, 1514, __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, 1516, __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, 1514, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1529 + /* "lxml/etree.pyx":1527 * return _elementpath.find(self, path, namespaces) * * def findtext(self, path, default=None, namespaces=None): # <<<<<<<<<<<<<< * u"""findtext(self, path, default=None, namespaces=None) * */ - __Pyx_TraceLine(1529,0,__PYX_ERR(0, 1529, __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__99)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1529, __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, 1527, __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, 1529, __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, 1527, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1542 + /* "lxml/etree.pyx":1540 * return _elementpath.findtext(self, path, default, namespaces) * * def findall(self, path, namespaces=None): # <<<<<<<<<<<<<< * u"""findall(self, path, namespaces=None) * */ - __Pyx_TraceLine(1542,0,__PYX_ERR(0, 1542, __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__100)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1542, __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, 1540, __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, 1542, __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, 1540, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1555 + /* "lxml/etree.pyx":1553 * return _elementpath.findall(self, path, namespaces) * * def iterfind(self, path, namespaces=None): # <<<<<<<<<<<<<< * u"""iterfind(self, path, namespaces=None) * */ - __Pyx_TraceLine(1555,0,__PYX_ERR(0, 1555, __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__101)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1555, __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, 1553, __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, 1555, __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, 1553, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1568 + /* "lxml/etree.pyx":1566 * 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_TraceLine(1568,0,__PYX_ERR(0, 1568, __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__102)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1568, __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, 1566, __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, 1568, __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, 1566, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1579 + /* "lxml/etree.pyx":1577 * return evaluator(_path, **_variables) * * def cssselect(self, expr, *, translator='xml'): # <<<<<<<<<<<<<< * """ * Run the CSS expression on this element and its children, */ - __Pyx_TraceLine(1579,0,__PYX_ERR(0, 1579, __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__103)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1579, __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, 1577, __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, 1579, __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, 1577, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1629 + /* "lxml/etree.pyx":1627 * raise TypeError, u"this element does not have children or attributes" * * def set(self, key, value): # <<<<<<<<<<<<<< * u"set(self, key, value)" * self._raiseImmutable() */ - __Pyx_TraceLine(1629,0,__PYX_ERR(0, 1629, __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__104)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1629, __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, 1627, __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, 1629, __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, 1627, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree___ContentOnlyElement); - /* "lxml/etree.pyx":1633 + /* "lxml/etree.pyx":1631 * self._raiseImmutable() * * def append(self, value): # <<<<<<<<<<<<<< * u"append(self, value)" * self._raiseImmutable() */ - __Pyx_TraceLine(1633,0,__PYX_ERR(0, 1633, __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__105)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1633, __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, 1631, __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, 1633, __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, 1631, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree___ContentOnlyElement); - /* "lxml/etree.pyx":1637 + /* "lxml/etree.pyx":1635 * self._raiseImmutable() * * def insert(self, index, value): # <<<<<<<<<<<<<< * u"insert(self, index, value)" * self._raiseImmutable() */ - __Pyx_TraceLine(1637,0,__PYX_ERR(0, 1637, __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__106)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1637, __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, 1635, __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, 1637, __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, 1635, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree___ContentOnlyElement); - /* "lxml/etree.pyx":1676 + /* "lxml/etree.pyx":1674 * return 0 * * def get(self, key, default=None): # <<<<<<<<<<<<<< * u"get(self, key, default=None)" * return None */ - __Pyx_TraceLine(1676,0,__PYX_ERR(0, 1676, __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__107)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1676, __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, 1674, __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, 1676, __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, 1674, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree___ContentOnlyElement); - /* "lxml/etree.pyx":1680 + /* "lxml/etree.pyx":1678 * return None * * def keys(self): # <<<<<<<<<<<<<< * u"keys(self)" * return [] */ - __Pyx_TraceLine(1680,0,__PYX_ERR(0, 1680, __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__108)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1680, __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, 1678, __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, 1680, __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, 1678, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree___ContentOnlyElement); - /* "lxml/etree.pyx":1684 + /* "lxml/etree.pyx":1682 * return [] * * def items(self): # <<<<<<<<<<<<<< * u"items(self)" * return [] */ - __Pyx_TraceLine(1684,0,__PYX_ERR(0, 1684, __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__109)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1684, __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, 1682, __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, 1684, __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, 1682, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree___ContentOnlyElement); - /* "lxml/etree.pyx":1688 + /* "lxml/etree.pyx":1686 * return [] * * def values(self): # <<<<<<<<<<<<<< * u"values(self)" * return [] */ - __Pyx_TraceLine(1688,0,__PYX_ERR(0, 1688, __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__110)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1688, __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, 1686, __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, 1688, __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, 1686, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree___ContentOnlyElement); - /* "lxml/etree.pyx":1725 + /* "lxml/etree.pyx":1723 * return "" % strrepr(self.target) * * def get(self, key, default=None): # <<<<<<<<<<<<<< * u"""get(self, key, default=None) * */ - __Pyx_TraceLine(1725,0,__PYX_ERR(0, 1725, __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__111)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1725, __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, 1723, __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, 1725, __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, 1723, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ProcessingInstruction); - /* "lxml/etree.pyx":1749 + /* "lxml/etree.pyx":1747 * 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_TraceLine(1749,0,__PYX_ERR(0, 1749, __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, 1749, __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, 1747, __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, 1749, __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, 1747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1749, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1747, __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); @@ -252493,11 +235014,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, 1749, __pyx_L1_error) + __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_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, 1749, __pyx_L1_error) + __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_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_4lxml_5etree__FIND_PI_ATTRIBUTES); @@ -252505,831 +235026,775 @@ if (!__Pyx_RefNanny) { __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":1869 + /* "lxml/etree.pyx":1867 * return 0 * * def parse(self, source, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""parse(self, source, parser=None, base_url=None) * */ - __Pyx_TraceLine(1869,0,__PYX_ERR(0, 1869, __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__116)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1869, __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, 1867, __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, 1869, __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, 1867, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":1885 + /* "lxml/etree.pyx":1883 * return self._context_node * * def _setroot(self, _Element root not None): # <<<<<<<<<<<<<< * u"""_setroot(self, root) * */ - __Pyx_TraceLine(1885,0,__PYX_ERR(0, 1885, __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__117)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1885, __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, 1883, __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, 1885, __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, 1883, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":1896 + /* "lxml/etree.pyx":1894 * self._doc = None * * def getroot(self): # <<<<<<<<<<<<<< * u"""getroot(self) * */ - __Pyx_TraceLine(1896,0,__PYX_ERR(0, 1896, __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__118)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1896, __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, 1894, __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, 1896, __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, 1894, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":1903 + /* "lxml/etree.pyx":1901 * return self._context_node * * def __copy__(self): # <<<<<<<<<<<<<< * return _elementTreeFactory(self._doc, self._context_node) * */ - __Pyx_TraceLine(1903,0,__PYX_ERR(0, 1903, __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__119)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1903, __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, 1901, __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, 1903, __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, 1901, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":1906 + /* "lxml/etree.pyx":1904 * return _elementTreeFactory(self._doc, self._context_node) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< * cdef _Element root * cdef _Document doc */ - __Pyx_TraceLine(1906,0,__PYX_ERR(0, 1906, __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__120)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1906, __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, 1904, __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, 1906, __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, 1904, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":1946 + /* "lxml/etree.pyx":1944 * 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_TraceLine(1946,0,__PYX_ERR(0, 1946, __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__121)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1946, __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, 1944, __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, 1946, __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, 1944, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2043 + /* "lxml/etree.pyx":2041 * is_standalone, compression) * * def getpath(self, _Element element not None): # <<<<<<<<<<<<<< * u"""getpath(self, element) * */ - __Pyx_TraceLine(2043,0,__PYX_ERR(0, 2043, __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__126)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2043, __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, 2041, __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, 2043, __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, 2041, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2081 + /* "lxml/etree.pyx":2079 * return path * * def getelementpath(self, _Element element not None): # <<<<<<<<<<<<<< * u"""getelementpath(self, element) * */ - __Pyx_TraceLine(2081,0,__PYX_ERR(0, 2081, __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__127)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2081, __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, 2079, __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, 2081, __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, 2079, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2145 + /* "lxml/etree.pyx":2143 * return '/'.join(path) * * def getiterator(self, tag=None, *tags): # <<<<<<<<<<<<<< * u"""getiterator(self, *tags, tag=None) * */ - __Pyx_TraceLine(2145,0,__PYX_ERR(0, 2145, __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__131)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2145, __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, 2143, __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, 2145, __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, 2143, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2169 + /* "lxml/etree.pyx":2167 * return root.getiterator(*tags) * * def iter(self, tag=None, *tags): # <<<<<<<<<<<<<< * u"""iter(self, tag=None, *tags) * */ - __Pyx_TraceLine(2169,0,__PYX_ERR(0, 2169, __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__132)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2169, __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, 2167, __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, 2169, __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, 2167, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2187 + /* "lxml/etree.pyx":2185 * return root.iter(*tags) * * def find(self, path, namespaces=None): # <<<<<<<<<<<<<< * u"""find(self, path, namespaces=None) * */ - __Pyx_TraceLine(2187,0,__PYX_ERR(0, 2187, __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__133)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2187, __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, 2185, __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, 2187, __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, 2185, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2204 + /* "lxml/etree.pyx":2202 * return root.find(path, namespaces) * * def findtext(self, path, default=None, namespaces=None): # <<<<<<<<<<<<<< * u"""findtext(self, path, default=None, namespaces=None) * */ - __Pyx_TraceLine(2204,0,__PYX_ERR(0, 2204, __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__135)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2204, __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, 2202, __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, 2204, __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, 2202, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2221 + /* "lxml/etree.pyx":2219 * return root.findtext(path, default, namespaces) * * def findall(self, path, namespaces=None): # <<<<<<<<<<<<<< * u"""findall(self, path, namespaces=None) * */ - __Pyx_TraceLine(2221,0,__PYX_ERR(0, 2221, __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__137)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2221, __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, 2219, __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, 2221, __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, 2219, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2238 + /* "lxml/etree.pyx":2236 * return root.findall(path, namespaces) * * def iterfind(self, path, namespaces=None): # <<<<<<<<<<<<<< * u"""iterfind(self, path, namespaces=None) * */ - __Pyx_TraceLine(2238,0,__PYX_ERR(0, 2238, __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__139)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2238, __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, 2236, __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, 2238, __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, 2236, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2255 + /* "lxml/etree.pyx":2253 * 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_TraceLine(2255,0,__PYX_ERR(0, 2255, __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__141)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2255, __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, 2253, __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, 2255, __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, 2253, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2280 + /* "lxml/etree.pyx":2278 * 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_TraceLine(2280,0,__PYX_ERR(0, 2280, __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__142)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2280, __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, 2278, __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, 2280, __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, 2278, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2299 + /* "lxml/etree.pyx":2297 * return style(self, **_kw) * * def relaxng(self, relaxng): # <<<<<<<<<<<<<< * u"""relaxng(self, relaxng) * */ - __Pyx_TraceLine(2299,0,__PYX_ERR(0, 2299, __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__143)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2299, __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, 2297, __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, 2299, __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, 2297, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2317 + /* "lxml/etree.pyx":2315 * return schema.validate(self) * * def xmlschema(self, xmlschema): # <<<<<<<<<<<<<< * u"""xmlschema(self, xmlschema) * */ - __Pyx_TraceLine(2317,0,__PYX_ERR(0, 2317, __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__144)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2317, __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, 2315, __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, 2317, __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, 2315, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2335 + /* "lxml/etree.pyx":2333 * return schema.validate(self) * * def xinclude(self): # <<<<<<<<<<<<<< * u"""xinclude(self) * */ - __Pyx_TraceLine(2335,0,__PYX_ERR(0, 2335, __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__145)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2335, __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, 2333, __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, 2335, __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, 2333, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2350 + /* "lxml/etree.pyx":2348 * 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_TraceLine(2350,0,__PYX_ERR(0, 2350, __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__146)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2350, __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, 2348, __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, 2350, __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, 2348, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2414 + /* "lxml/etree.pyx":2412 * _delAttribute(self._element, key) * * def update(self, sequence_or_dict): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * if isinstance(sequence_or_dict, (dict, _Attrib)): */ - __Pyx_TraceLine(2414,0,__PYX_ERR(0, 2414, __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__147)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2414, __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, 2412, __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, 2414, __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, 2412, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Attrib); - /* "lxml/etree.pyx":2421 + /* "lxml/etree.pyx":2419 * _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_TraceLine(2421,0,__PYX_ERR(0, 2421, __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__148)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2421, __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, 2419, __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, 2421, __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, 2419, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Attrib); - /* "lxml/etree.pyx":2434 + /* "lxml/etree.pyx":2432 * return result * * def clear(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * cdef xmlNode* c_node = self._element._c_node */ - __Pyx_TraceLine(2434,0,__PYX_ERR(0, 2434, __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__149)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2434, __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, 2432, __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, 2434, __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, 2432, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Attrib); - /* "lxml/etree.pyx":2445 + /* "lxml/etree.pyx":2443 * return repr(dict( _collectAttributes(self._element._c_node, 3) )) * * def __copy__(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return dict(_collectAttributes(self._element._c_node, 3)) */ - __Pyx_TraceLine(2445,0,__PYX_ERR(0, 2445, __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__150)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2445, __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, 2443, __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, 2445, __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, 2443, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Attrib); - /* "lxml/etree.pyx":2449 + /* "lxml/etree.pyx":2447 * return dict(_collectAttributes(self._element._c_node, 3)) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return dict(_collectAttributes(self._element._c_node, 3)) */ - __Pyx_TraceLine(2449,0,__PYX_ERR(0, 2449, __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__151)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2449, __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, 2447, __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, 2449, __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, 2447, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Attrib); - /* "lxml/etree.pyx":2479 + /* "lxml/etree.pyx":2477 * return c * * def get(self, key, default=None): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return _getAttributeValue(self._element, key, default) */ - __Pyx_TraceLine(2479,0,__PYX_ERR(0, 2479, __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__152)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2479, __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, 2477, __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, 2479, __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, 2477, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Attrib); - /* "lxml/etree.pyx":2483 + /* "lxml/etree.pyx":2481 * return _getAttributeValue(self._element, key, default) * * def keys(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return _collectAttributes(self._element._c_node, 1) */ - __Pyx_TraceLine(2483,0,__PYX_ERR(0, 2483, __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__153)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2483, __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, 2481, __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, 2483, __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, 2481, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Attrib); - /* "lxml/etree.pyx":2491 + /* "lxml/etree.pyx":2489 * return iter(_collectAttributes(self._element._c_node, 1)) * * def iterkeys(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return iter(_collectAttributes(self._element._c_node, 1)) */ - __Pyx_TraceLine(2491,0,__PYX_ERR(0, 2491, __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__154)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2491, __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, 2489, __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, 2491, __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, 2489, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Attrib); - /* "lxml/etree.pyx":2495 + /* "lxml/etree.pyx":2493 * return iter(_collectAttributes(self._element._c_node, 1)) * * def values(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return _collectAttributes(self._element._c_node, 2) */ - __Pyx_TraceLine(2495,0,__PYX_ERR(0, 2495, __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__155)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2495, __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, 2493, __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, 2495, __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, 2493, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Attrib); - /* "lxml/etree.pyx":2499 + /* "lxml/etree.pyx":2497 * return _collectAttributes(self._element._c_node, 2) * * def itervalues(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return iter(_collectAttributes(self._element._c_node, 2)) */ - __Pyx_TraceLine(2499,0,__PYX_ERR(0, 2499, __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__156)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2499, __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, 2497, __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, 2499, __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, 2497, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Attrib); - /* "lxml/etree.pyx":2503 + /* "lxml/etree.pyx":2501 * return iter(_collectAttributes(self._element._c_node, 2)) * * def items(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return _collectAttributes(self._element._c_node, 3) */ - __Pyx_TraceLine(2503,0,__PYX_ERR(0, 2503, __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__157)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2503, __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, 2501, __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, 2503, __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, 2501, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Attrib); - /* "lxml/etree.pyx":2507 + /* "lxml/etree.pyx":2505 * return _collectAttributes(self._element._c_node, 3) * * def iteritems(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return iter(_collectAttributes(self._element._c_node, 3)) */ - __Pyx_TraceLine(2507,0,__PYX_ERR(0, 2507, __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__158)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2507, __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, 2505, __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, 2507, __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, 2505, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Attrib); - /* "lxml/etree.pyx":2511 + /* "lxml/etree.pyx":2509 * return iter(_collectAttributes(self._element._c_node, 3)) * * def has_key(self, key): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return key in self */ - __Pyx_TraceLine(2511,0,__PYX_ERR(0, 2511, __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__159)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2511, __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, 2509, __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, 2511, __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, 2509, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Attrib); - /* "lxml/etree.pyx":2988 + /* "lxml/etree.pyx":2986 * # module-level API for ElementTree * * def Element(_tag, attrib=None, nsmap=None, **_extra): # <<<<<<<<<<<<<< * u"""Element(_tag, attrib=None, nsmap=None, **_extra) * */ - __Pyx_TraceLine(2988,0,__PYX_ERR(0, 2988, __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__164)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2988, __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, 2986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__515); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_Element, __pyx_t_1) < 0) __PYX_ERR(0, 2988, __pyx_L1_error) + __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) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3002 + /* "lxml/etree.pyx":3000 * * * def Comment(text=None): # <<<<<<<<<<<<<< * u"""Comment(text=None) * */ - __Pyx_TraceLine(3002,0,__PYX_ERR(0, 3002, __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__165)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3002, __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, 3000, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__517); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_Comment, __pyx_t_1) < 0) __PYX_ERR(0, 3002, __pyx_L1_error) + __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) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3026 + /* "lxml/etree.pyx":3024 * * * def ProcessingInstruction(target, text=None): # <<<<<<<<<<<<<< * u"""ProcessingInstruction(target, text=None) * */ - __Pyx_TraceLine(3026,0,__PYX_ERR(0, 3026, __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__169)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3026, __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, 3024, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__519); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProcessingInstruction, __pyx_t_1) < 0) __PYX_ERR(0, 3026, __pyx_L1_error) + __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) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3054 + /* "lxml/etree.pyx":3052 * return _elementFactory(doc, c_node) * * PI = ProcessingInstruction # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(3054,0,__PYX_ERR(0, 3054, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ProcessingInstruction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3054, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ProcessingInstruction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_PI, __pyx_t_1) < 0) __PYX_ERR(0, 3054, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_PI, __pyx_t_1) < 0) __PYX_ERR(0, 3052, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3079 + /* "lxml/etree.pyx":3077 * * * def Entity(name): # <<<<<<<<<<<<<< * u"""Entity(name) * */ - __Pyx_TraceLine(3079,0,__PYX_ERR(0, 3079, __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__172)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3079, __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, 3077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_Entity, __pyx_t_1) < 0) __PYX_ERR(0, 3079, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Entity, __pyx_t_1) < 0) __PYX_ERR(0, 3077, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3105 + /* "lxml/etree.pyx":3103 * * * def SubElement(_Element _parent not None, _tag, # <<<<<<<<<<<<<< * attrib=None, nsmap=None, **_extra): * u"""SubElement(_parent, _tag, attrib=None, nsmap=None, **_extra) */ - __Pyx_TraceLine(3105,0,__PYX_ERR(0, 3105, __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__173)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3105, __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, 3103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__522); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SubElement, __pyx_t_1) < 0) __PYX_ERR(0, 3105, __pyx_L1_error) + __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) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3115 + /* "lxml/etree.pyx":3113 * * * def ElementTree(_Element element=None, *, file=None, _BaseParser parser=None): # <<<<<<<<<<<<<< * u"""ElementTree(element=None, file=None, parser=None) * */ - __Pyx_TraceLine(3115,0,__PYX_ERR(0, 3115, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3115, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3113, __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, 3115, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_parser, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3115, __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__174)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3115, __pyx_L1_error) + 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) __Pyx_GOTREF(__pyx_t_2); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__524); + __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, 3115, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ElementTree, __pyx_t_2) < 0) __PYX_ERR(0, 3113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":3141 + /* "lxml/etree.pyx":3139 * * * def HTML(text, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""HTML(text, parser=None, base_url=None) * */ - __Pyx_TraceLine(3141,0,__PYX_ERR(0, 3141, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3141, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3139, __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, 3141, __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__175)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3141, __pyx_L1_error) + 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) __Pyx_GOTREF(__pyx_t_1); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__526); + __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, 3141, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_HTML, __pyx_t_1) < 0) __PYX_ERR(0, 3139, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3167 + /* "lxml/etree.pyx":3165 * * * def XML(text, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""XML(text, parser=None, base_url=None) * */ - __Pyx_TraceLine(3167,0,__PYX_ERR(0, 3167, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3167, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3165, __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, 3167, __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__176)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3167, __pyx_L1_error) + 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) __Pyx_GOTREF(__pyx_t_2); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__528); + __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, 3167, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_XML, __pyx_t_2) < 0) __PYX_ERR(0, 3165, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":3198 + /* "lxml/etree.pyx":3196 * * * def fromstring(text, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""fromstring(text, parser=None, base_url=None) * */ - __Pyx_TraceLine(3198,0,__PYX_ERR(0, 3198, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3198, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3196, __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, 3198, __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__177)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3198, __pyx_L1_error) + 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) __Pyx_GOTREF(__pyx_t_1); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__530); + __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, 3198, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_fromstring, __pyx_t_1) < 0) __PYX_ERR(0, 3196, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3219 + /* "lxml/etree.pyx":3217 * * * def fromstringlist(strings, _BaseParser parser=None): # <<<<<<<<<<<<<< * u"""fromstringlist(strings, parser=None) * */ - __Pyx_TraceLine(3219,0,__PYX_ERR(0, 3219, __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__178)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3219, __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, 3217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__532); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_fromstringlist, __pyx_t_1) < 0) __PYX_ERR(0, 3219, __pyx_L1_error) + __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) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3240 + /* "lxml/etree.pyx":3238 * * * def iselement(element): # <<<<<<<<<<<<<< * u"""iselement(element) * */ - __Pyx_TraceLine(3240,0,__PYX_ERR(0, 3240, __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__180)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3240, __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, 3238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_iselement, __pyx_t_1) < 0) __PYX_ERR(0, 3240, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_iselement, __pyx_t_1) < 0) __PYX_ERR(0, 3238, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3248 + /* "lxml/etree.pyx":3246 * * * def dump(_Element elem not None, *, bint pretty_print=True, with_tail=True): # <<<<<<<<<<<<<< * u"""dump(elem, pretty_print=True, with_tail=True) * */ - __Pyx_TraceLine(3248,0,__PYX_ERR(0, 3248, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3248, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3248, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3246, __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, 3248, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pretty_print, __pyx_t_2) < 0) __PYX_ERR(0, 3246, __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, 3248, __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__181)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3248, __pyx_L1_error) + 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) __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, 3248, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_dump, __pyx_t_2) < 0) __PYX_ERR(0, 3246, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":3261 + /* "lxml/etree.pyx":3259 * * * 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_TraceLine(3261,0,__PYX_ERR(0, 3261, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyDict_NewPresized(10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3261, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3259, __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, 3261, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_method, ((PyObject*)__pyx_n_s_xml)) < 0) __PYX_ERR(0, 3261, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_xml_declaration, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3261, __pyx_L1_error) + 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) - /* "lxml/etree.pyx":3262 + /* "lxml/etree.pyx":3260 * * 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_TraceLine(3262,0,__PYX_ERR(0, 3262, __pyx_L1_error)) - __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, 3260, __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, 3261, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_pretty_print, __pyx_t_1) < 0) __PYX_ERR(0, 3259, __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, 3260, __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, 3261, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_with_tail, __pyx_t_1) < 0) __PYX_ERR(0, 3259, __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, 3261, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_doctype, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3261, __pyx_L1_error) + 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) - /* "lxml/etree.pyx":3264 + /* "lxml/etree.pyx":3262 * 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_TraceLine(3264,0,__PYX_ERR(0, 3264, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3264, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3262, __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, 3261, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_exclusive, __pyx_t_1) < 0) __PYX_ERR(0, 3259, __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, 3264, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3262, __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, 3261, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_with_comments, __pyx_t_1) < 0) __PYX_ERR(0, 3259, __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, 3261, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_inclusive_ns_prefixes, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3259, __pyx_L1_error) - /* "lxml/etree.pyx":3261 + /* "lxml/etree.pyx":3259 * * * 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_TraceLine(3261,0,__PYX_ERR(0, 3261, __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__182)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3261, __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, 3259, __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, 3261, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_tostring, __pyx_t_1) < 0) __PYX_ERR(0, 3259, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3354 + /* "lxml/etree.pyx":3352 * * * def tostringlist(element_or_tree, *args, **kwargs): # <<<<<<<<<<<<<< * u"""tostringlist(element_or_tree, *args, **kwargs) * */ - __Pyx_TraceLine(3354,0,__PYX_ERR(0, 3354, __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__186)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3354, __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, 3352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_tostringlist, __pyx_t_1) < 0) __PYX_ERR(0, 3354, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_tostringlist, __pyx_t_1) < 0) __PYX_ERR(0, 3352, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3366 + /* "lxml/etree.pyx":3364 * * * 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_TraceLine(3366,0,__PYX_ERR(0, 3366, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3366, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3364, __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, 3366, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3366, __pyx_L1_error) + 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) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pretty_print, __pyx_t_2) < 0) __PYX_ERR(0, 3366, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pretty_print, __pyx_t_2) < 0) __PYX_ERR(0, 3364, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":3367 + /* "lxml/etree.pyx":3365 * * 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_TraceLine(3367,0,__PYX_ERR(0, 3367, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3367, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3365, __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, 3366, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_with_tail, __pyx_t_2) < 0) __PYX_ERR(0, 3364, __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, 3366, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_doctype, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3364, __pyx_L1_error) - /* "lxml/etree.pyx":3366 + /* "lxml/etree.pyx":3364 * * * 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_TraceLine(3366,0,__PYX_ERR(0, 3366, __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__187)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3366, __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, 3364, __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, 3366, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_tounicode, __pyx_t_2) < 0) __PYX_ERR(0, 3364, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":3400 + /* "lxml/etree.pyx":3398 * * * def parse(source, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""parse(source, parser=None, base_url=None) * */ - __Pyx_TraceLine(3400,0,__PYX_ERR(0, 3400, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3400, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3398, __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, 3400, __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__188)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3400, __pyx_L1_error) + 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) __Pyx_GOTREF(__pyx_t_1); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__539); + __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, 3400, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse, __pyx_t_1) < 0) __PYX_ERR(0, 3398, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3432 + /* "lxml/etree.pyx":3430 * * * def adopt_external_document(capsule, _BaseParser parser=None): # <<<<<<<<<<<<<< * """adopt_external_document(capsule, parser=None) * */ - __Pyx_TraceLine(3432,0,__PYX_ERR(0, 3432, __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__189)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3432, __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, 3430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__541); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_adopt_external_document, __pyx_t_1) < 0) __PYX_ERR(0, 3432, __pyx_L1_error) + __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) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/lxml/readonlytree.pxi":160 @@ -253339,8 +235804,7 @@ if (!__Pyx_RefNanny) { * u"__deepcopy__(self, memo)" * return self.__copy__() */ - __Pyx_TraceLine(160,0,__PYX_ERR(6, 160, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_14_ReadOnlyProxy_11__deepcopy__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ReadOnlyProxy___deepcopy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__192)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 160, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_14_ReadOnlyProxy_11__deepcopy__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ReadOnlyProxy___deepcopy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__356)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ReadOnlyProxy->tp_dict, __pyx_n_s_deepcopy, __pyx_t_1) < 0) __PYX_ERR(6, 160, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -253353,8 +235817,7 @@ if (!__Pyx_RefNanny) { * u"__copy__(self)" * cdef xmlDoc* c_doc */ - __Pyx_TraceLine(164,0,__PYX_ERR(6, 164, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_14_ReadOnlyProxy_13__copy__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ReadOnlyProxy___copy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__193)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 164, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_14_ReadOnlyProxy_13__copy__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ReadOnlyProxy___copy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__358)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ReadOnlyProxy->tp_dict, __pyx_n_s_copy_2, __pyx_t_1) < 0) __PYX_ERR(6, 164, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -253367,8 +235830,7 @@ if (!__Pyx_RefNanny) { * u"""iterchildren(self, tag=None, reversed=False) * */ - __Pyx_TraceLine(187,0,__PYX_ERR(6, 187, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_14_ReadOnlyProxy_17iterchildren, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ReadOnlyProxy_iterchildren, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__194)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 187, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_14_ReadOnlyProxy_17iterchildren, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ReadOnlyProxy_iterchildren, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__360)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ReadOnlyProxy->tp_dict, __pyx_n_s_iterchildren, __pyx_t_1) < 0) __PYX_ERR(6, 187, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -253381,8 +235843,7 @@ if (!__Pyx_RefNanny) { * u"""Returns all subelements. The elements are returned in document * order. */ - __Pyx_TraceLine(199,0,__PYX_ERR(6, 199, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_14_ReadOnlyProxy_19getchildren, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ReadOnlyProxy_getchildren, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__196)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 199, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_14_ReadOnlyProxy_19getchildren, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ReadOnlyProxy_getchildren, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__362)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ReadOnlyProxy->tp_dict, __pyx_n_s_getchildren, __pyx_t_1) < 0) __PYX_ERR(6, 199, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -253395,8 +235856,7 @@ if (!__Pyx_RefNanny) { * u"""Returns the parent of this element or None for the root element. * """ */ - __Pyx_TraceLine(214,0,__PYX_ERR(6, 214, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_14_ReadOnlyProxy_21getparent, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ReadOnlyProxy_getparent, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__197)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 214, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_14_ReadOnlyProxy_21getparent, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ReadOnlyProxy_getparent, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__364)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ReadOnlyProxy->tp_dict, __pyx_n_s_getparent, __pyx_t_1) < 0) __PYX_ERR(6, 214, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -253409,8 +235869,7 @@ if (!__Pyx_RefNanny) { * u"""Returns the following sibling of this element or None. * """ */ - __Pyx_TraceLine(225,0,__PYX_ERR(6, 225, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_14_ReadOnlyProxy_23getnext, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ReadOnlyProxy_getnext, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__198)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 225, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_14_ReadOnlyProxy_23getnext, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ReadOnlyProxy_getnext, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__366)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ReadOnlyProxy->tp_dict, __pyx_n_s_getnext, __pyx_t_1) < 0) __PYX_ERR(6, 225, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -253423,8 +235882,7 @@ if (!__Pyx_RefNanny) { * u"""Returns the preceding sibling of this element or None. * """ */ - __Pyx_TraceLine(235,0,__PYX_ERR(6, 235, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_14_ReadOnlyProxy_25getprevious, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ReadOnlyProxy_getprevious, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__199)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 235, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_14_ReadOnlyProxy_25getprevious, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ReadOnlyProxy_getprevious, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__368)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ReadOnlyProxy->tp_dict, __pyx_n_s_getprevious, __pyx_t_1) < 0) __PYX_ERR(6, 235, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -253437,8 +235895,7 @@ if (!__Pyx_RefNanny) { * u"""Gets an element attribute. * """ */ - __Pyx_TraceLine(293,0,__PYX_ERR(6, 293, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_21_ReadOnlyElementProxy_1get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ReadOnlyElementProxy_get, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__200)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 293, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_21_ReadOnlyElementProxy_1get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ReadOnlyElementProxy_get, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__370)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ReadOnlyElementProxy->tp_dict, __pyx_n_s_get, __pyx_t_1) < 0) __PYX_ERR(6, 293, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -253451,8 +235908,7 @@ if (!__Pyx_RefNanny) { * u"""Gets a list of attribute names. The names are returned in an * arbitrary order (just like for an ordinary Python dictionary). */ - __Pyx_TraceLine(299,0,__PYX_ERR(6, 299, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_21_ReadOnlyElementProxy_3keys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ReadOnlyElementProxy_keys, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__201)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 299, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_21_ReadOnlyElementProxy_3keys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ReadOnlyElementProxy_keys, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__372)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ReadOnlyElementProxy->tp_dict, __pyx_n_s_keys, __pyx_t_1) < 0) __PYX_ERR(6, 299, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -253465,8 +235921,7 @@ if (!__Pyx_RefNanny) { * u"""Gets element attributes, as a sequence. The attributes are returned * in an arbitrary order. */ - __Pyx_TraceLine(306,0,__PYX_ERR(6, 306, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_21_ReadOnlyElementProxy_5values, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ReadOnlyElementProxy_values, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__202)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 306, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_21_ReadOnlyElementProxy_5values, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ReadOnlyElementProxy_values, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__374)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ReadOnlyElementProxy->tp_dict, __pyx_n_s_values, __pyx_t_1) < 0) __PYX_ERR(6, 306, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -253479,8 +235934,7 @@ if (!__Pyx_RefNanny) { * u"""Gets element attributes, as a sequence. The attributes are returned * in an arbitrary order. */ - __Pyx_TraceLine(313,0,__PYX_ERR(6, 313, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_21_ReadOnlyElementProxy_7items, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ReadOnlyElementProxy_items, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__203)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 313, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_21_ReadOnlyElementProxy_7items, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ReadOnlyElementProxy_items, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__376)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ReadOnlyElementProxy->tp_dict, __pyx_n_s_items, __pyx_t_1) < 0) __PYX_ERR(6, 313, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -253493,8 +235947,7 @@ if (!__Pyx_RefNanny) { * u"""Append a copy of an Element to the list of children. * """ */ - __Pyx_TraceLine(379,0,__PYX_ERR(6, 379, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_22_OpaqueDocumentWrapper_1append, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_OpaqueDocumentWrapper_append, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__204)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 379, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_22_OpaqueDocumentWrapper_1append, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_OpaqueDocumentWrapper_append, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__378)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__OpaqueDocumentWrapper->tp_dict, __pyx_n_s_append, __pyx_t_1) < 0) __PYX_ERR(6, 379, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -253507,8 +235960,7 @@ if (!__Pyx_RefNanny) { * u"""Append a copy of all Elements from a sequence to the list of * children. */ - __Pyx_TraceLine(396,0,__PYX_ERR(6, 396, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_22_OpaqueDocumentWrapper_3extend, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_OpaqueDocumentWrapper_extend, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__205)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 396, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_22_OpaqueDocumentWrapper_3extend, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_OpaqueDocumentWrapper_extend, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__380)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__OpaqueDocumentWrapper->tp_dict, __pyx_n_s_extend, __pyx_t_1) < 0) __PYX_ERR(6, 396, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -253521,8 +235973,7 @@ if (!__Pyx_RefNanny) { * u"""Append a copy of an Element to the list of children. * """ */ - __Pyx_TraceLine(476,0,__PYX_ERR(6, 476, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_23_AppendOnlyElementProxy_1append, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AppendOnlyElementProxy_append, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__206)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 476, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_23_AppendOnlyElementProxy_1append, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AppendOnlyElementProxy_append, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__382)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__AppendOnlyElementProxy->tp_dict, __pyx_n_s_append, __pyx_t_1) < 0) __PYX_ERR(6, 476, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -253535,8 +235986,7 @@ if (!__Pyx_RefNanny) { * u"""Append a copy of all Elements from a sequence to the list of * children. */ - __Pyx_TraceLine(488,0,__PYX_ERR(6, 488, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_23_AppendOnlyElementProxy_3extend, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AppendOnlyElementProxy_extend, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__207)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 488, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_23_AppendOnlyElementProxy_3extend, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AppendOnlyElementProxy_extend, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__384)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__AppendOnlyElementProxy->tp_dict, __pyx_n_s_extend, __pyx_t_1) < 0) __PYX_ERR(6, 488, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -253549,8 +235999,7 @@ if (!__Pyx_RefNanny) { * u"""set_fallback(self, lookup) * */ - __Pyx_TraceLine(248,0,__PYX_ERR(7, 248, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_26FallbackElementClassLookup_5set_fallback, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FallbackElementClassLookup_set_f, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__208)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 248, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_26FallbackElementClassLookup_5set_fallback, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FallbackElementClassLookup_set_f, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__386)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_FallbackElementClassLookup->tp_dict, __pyx_n_s_set_fallback, __pyx_t_1) < 0) __PYX_ERR(7, 248, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -253563,8 +236012,7 @@ if (!__Pyx_RefNanny) { * u"lookup(self, type, doc, namespace, name)" * return None */ - __Pyx_TraceLine(430,0,__PYX_ERR(7, 430, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_24CustomElementClassLookup_3lookup, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CustomElementClassLookup_lookup, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__209)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 430, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_24CustomElementClassLookup_3lookup, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CustomElementClassLookup_lookup, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__388)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_CustomElementClassLookup->tp_dict, __pyx_n_s_lookup, __pyx_t_1) < 0) __PYX_ERR(7, 430, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -253577,8 +236025,7 @@ if (!__Pyx_RefNanny) { * u"""lookup(self, doc, element) * */ - __Pyx_TraceLine(512,0,__PYX_ERR(7, 512, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_24PythonElementClassLookup_3lookup, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PythonElementClassLookup_lookup, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__210)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 512, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_24PythonElementClassLookup_3lookup, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PythonElementClassLookup_lookup, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__390)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_PythonElementClassLookup->tp_dict, __pyx_n_s_lookup, __pyx_t_1) < 0) __PYX_ERR(7, 512, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -253591,10 +236038,9 @@ if (!__Pyx_RefNanny) { * u"""set_element_class_lookup(lookup = None) * */ - __Pyx_TraceLine(549,0,__PYX_ERR(7, 549, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_41set_element_class_lookup, 0, __pyx_n_s_set_element_class_lookup, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__211)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 549, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_41set_element_class_lookup, 0, __pyx_n_s_set_element_class_lookup, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__392)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__561); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__393); if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_element_class_lookup, __pyx_t_1) < 0) __PYX_ERR(7, 549, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -253605,7 +236051,6 @@ if (!__Pyx_RefNanny) { * * set_element_class_lookup(DEFAULT_ELEMENT_CLASS_LOOKUP) */ - __Pyx_TraceLine(561,0,__PYX_ERR(7, 561, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree_ParserBasedElementClassLookup)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_4lxml_5etree_DEFAULT_ELEMENT_CLASS_LOOKUP)); @@ -253618,8 +236063,7 @@ if (!__Pyx_RefNanny) { * * set_element_class_lookup(DEFAULT_ELEMENT_CLASS_LOOKUP) # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(563,0,__PYX_ERR(7, 563, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_set_element_class_lookup); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 563, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_set_element_class_lookup); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_v_4lxml_5etree_DEFAULT_ELEMENT_CLASS_LOOKUP)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -253633,10 +236077,9 @@ if (!__Pyx_RefNanny) { * u"""update(self, class_dict_iterable) * */ - __Pyx_TraceLine(29,0,__PYX_ERR(9, 29, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_18_NamespaceRegistry_3update, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_NamespaceRegistry_update, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__212)); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 29, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_18_NamespaceRegistry_3update, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_NamespaceRegistry_update, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__395)); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__NamespaceRegistry->tp_dict, __pyx_n_s_update, __pyx_t_2) < 0) __PYX_ERR(9, 29, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__NamespaceRegistry->tp_dict, __pyx_n_s_update, __pyx_t_2) < 0) __PYX_ERR(10, 29, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__NamespaceRegistry); @@ -253647,10 +236090,9 @@ if (!__Pyx_RefNanny) { * return list(self._entries.items()) * */ - __Pyx_TraceLine(74,0,__PYX_ERR(9, 74, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_18_NamespaceRegistry_11items, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_NamespaceRegistry_items, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__215)); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 74, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_18_NamespaceRegistry_11items, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_NamespaceRegistry_items, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__397)); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__NamespaceRegistry->tp_dict, __pyx_n_s_items, __pyx_t_2) < 0) __PYX_ERR(9, 74, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__NamespaceRegistry->tp_dict, __pyx_n_s_items, __pyx_t_2) < 0) __PYX_ERR(10, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__NamespaceRegistry); @@ -253661,10 +236103,9 @@ if (!__Pyx_RefNanny) { * return iter(self._entries.items()) * */ - __Pyx_TraceLine(77,0,__PYX_ERR(9, 77, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_18_NamespaceRegistry_13iteritems, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_NamespaceRegistry_iteritems, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__216)); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 77, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_18_NamespaceRegistry_13iteritems, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_NamespaceRegistry_iteritems, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__399)); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__NamespaceRegistry->tp_dict, __pyx_n_s_iteritems, __pyx_t_2) < 0) __PYX_ERR(9, 77, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__NamespaceRegistry->tp_dict, __pyx_n_s_iteritems, __pyx_t_2) < 0) __PYX_ERR(10, 77, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__NamespaceRegistry); @@ -253675,10 +236116,9 @@ if (!__Pyx_RefNanny) { * self._entries.clear() * */ - __Pyx_TraceLine(80,0,__PYX_ERR(9, 80, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_18_NamespaceRegistry_15clear, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_NamespaceRegistry_clear, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__217)); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 80, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_18_NamespaceRegistry_15clear, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_NamespaceRegistry_clear, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__401)); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__NamespaceRegistry->tp_dict, __pyx_n_s_clear, __pyx_t_2) < 0) __PYX_ERR(9, 80, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__NamespaceRegistry->tp_dict, __pyx_n_s_clear, __pyx_t_2) < 0) __PYX_ERR(10, 80, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__NamespaceRegistry); @@ -253689,10 +236129,9 @@ if (!__Pyx_RefNanny) { * self[name] = obj * return obj */ - __Pyx_TraceLine(99,0,__PYX_ERR(9, 99, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_18_NamespaceRegistry_19__deco, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_NamespaceRegistry___deco, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__218)); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 99, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_18_NamespaceRegistry_19__deco, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_NamespaceRegistry___deco, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__403)); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__NamespaceRegistry->tp_dict, __pyx_n_s_deco, __pyx_t_2) < 0) __PYX_ERR(9, 99, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__NamespaceRegistry->tp_dict, __pyx_n_s_deco, __pyx_t_2) < 0) __PYX_ERR(10, 99, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__NamespaceRegistry); @@ -253703,10 +236142,9 @@ if (!__Pyx_RefNanny) { * u"""get_namespace(self, ns_uri) * */ - __Pyx_TraceLine(147,0,__PYX_ERR(9, 147, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_27ElementNamespaceClassLookup_5get_namespace, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementNamespaceClassLookup_get, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__219)); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 147, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_27ElementNamespaceClassLookup_5get_namespace, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementNamespaceClassLookup_get, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__405)); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_ElementNamespaceClassLookup->tp_dict, __pyx_n_s_get_namespace, __pyx_t_2) < 0) __PYX_ERR(9, 147, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_ElementNamespaceClassLookup->tp_dict, __pyx_n_s_get_namespace, __pyx_t_2) < 0) __PYX_ERR(10, 147, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_ElementNamespaceClassLookup); @@ -253717,8 +236155,7 @@ if (!__Pyx_RefNanny) { * * def FunctionNamespace(ns_uri): */ - __Pyx_TraceLine(205,0,__PYX_ERR(9, 205, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 205, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_v_4lxml_5etree___FUNCTION_NAMESPACE_REGISTRIES); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree___FUNCTION_NAMESPACE_REGISTRIES, ((PyObject*)__pyx_t_2)); @@ -253732,10 +236169,9 @@ if (!__Pyx_RefNanny) { * u"""FunctionNamespace(ns_uri) * */ - __Pyx_TraceLine(207,0,__PYX_ERR(9, 207, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_43FunctionNamespace, 0, __pyx_n_s_FunctionNamespace, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__220)); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 207, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_43FunctionNamespace, 0, __pyx_n_s_FunctionNamespace, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__407)); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_FunctionNamespace, __pyx_t_2) < 0) __PYX_ERR(9, 207, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_FunctionNamespace, __pyx_t_2) < 0) __PYX_ERR(10, 207, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/lxml/docloader.pxi":25 @@ -253745,10 +236181,9 @@ if (!__Pyx_RefNanny) { * u"""resolve(self, system_url, public_id, context) * */ - __Pyx_TraceLine(25,0,__PYX_ERR(10, 25, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8Resolver_1resolve, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Resolver_resolve, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__221)); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 25, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8Resolver_1resolve, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Resolver_resolve, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__409)); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_Resolver->tp_dict, __pyx_n_s_resolve, __pyx_t_2) < 0) __PYX_ERR(10, 25, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_Resolver->tp_dict, __pyx_n_s_resolve, __pyx_t_2) < 0) __PYX_ERR(11, 25, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_Resolver); @@ -253759,10 +236194,9 @@ if (!__Pyx_RefNanny) { * u"""resolve_empty(self, context) * */ - __Pyx_TraceLine(36,0,__PYX_ERR(10, 36, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8Resolver_3resolve_empty, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Resolver_resolve_empty, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__222)); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 36, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8Resolver_3resolve_empty, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Resolver_resolve_empty, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__411)); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_Resolver->tp_dict, __pyx_n_s_resolve_empty, __pyx_t_2) < 0) __PYX_ERR(10, 36, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_Resolver->tp_dict, __pyx_n_s_resolve_empty, __pyx_t_2) < 0) __PYX_ERR(11, 36, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_Resolver); @@ -253773,10 +236207,9 @@ if (!__Pyx_RefNanny) { * u"""resolve_string(self, string, context, base_url=None) * */ - __Pyx_TraceLine(48,0,__PYX_ERR(10, 48, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8Resolver_5resolve_string, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Resolver_resolve_string, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__223)); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 48, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8Resolver_5resolve_string, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Resolver_resolve_string, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__413)); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_Resolver->tp_dict, __pyx_n_s_resolve_string, __pyx_t_2) < 0) __PYX_ERR(10, 48, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_Resolver->tp_dict, __pyx_n_s_resolve_string, __pyx_t_2) < 0) __PYX_ERR(11, 48, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_Resolver); @@ -253787,10 +236220,9 @@ if (!__Pyx_RefNanny) { * u"""resolve_filename(self, filename, context) * */ - __Pyx_TraceLine(69,0,__PYX_ERR(10, 69, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8Resolver_7resolve_filename, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Resolver_resolve_filename, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__224)); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 69, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8Resolver_7resolve_filename, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Resolver_resolve_filename, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__415)); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_Resolver->tp_dict, __pyx_n_s_resolve_filename, __pyx_t_2) < 0) __PYX_ERR(10, 69, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_Resolver->tp_dict, __pyx_n_s_resolve_filename, __pyx_t_2) < 0) __PYX_ERR(11, 69, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_Resolver); @@ -253801,10 +236233,9 @@ if (!__Pyx_RefNanny) { * u"""resolve_file(self, f, context, base_url=None, close=True) * */ - __Pyx_TraceLine(83,0,__PYX_ERR(10, 83, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8Resolver_9resolve_file, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Resolver_resolve_file, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__225)); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 83, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8Resolver_9resolve_file, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Resolver_resolve_file, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__417)); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_Resolver->tp_dict, __pyx_n_s_resolve_file, __pyx_t_2) < 0) __PYX_ERR(10, 83, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_Resolver->tp_dict, __pyx_n_s_resolve_file, __pyx_t_2) < 0) __PYX_ERR(11, 83, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_Resolver); @@ -253815,10 +236246,9 @@ if (!__Pyx_RefNanny) { * u"""add(self, resolver) * */ - __Pyx_TraceLine(120,0,__PYX_ERR(10, 120, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17_ResolverRegistry_3add, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ResolverRegistry_add, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__226)); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 120, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17_ResolverRegistry_3add, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ResolverRegistry_add, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__419)); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ResolverRegistry->tp_dict, __pyx_n_s_add, __pyx_t_2) < 0) __PYX_ERR(10, 120, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ResolverRegistry->tp_dict, __pyx_n_s_add, __pyx_t_2) < 0) __PYX_ERR(11, 120, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ResolverRegistry); @@ -253829,10 +236259,9 @@ if (!__Pyx_RefNanny) { * u"remove(self, resolver)" * self._resolvers.discard(resolver) */ - __Pyx_TraceLine(133,0,__PYX_ERR(10, 133, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17_ResolverRegistry_5remove, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ResolverRegistry_remove, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__227)); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 133, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17_ResolverRegistry_5remove, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ResolverRegistry_remove, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__421)); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ResolverRegistry->tp_dict, __pyx_n_s_remove, __pyx_t_2) < 0) __PYX_ERR(10, 133, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ResolverRegistry->tp_dict, __pyx_n_s_remove, __pyx_t_2) < 0) __PYX_ERR(11, 133, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ResolverRegistry); @@ -253843,10 +236272,9 @@ if (!__Pyx_RefNanny) { * u"copy(self)" * return self._copy() */ - __Pyx_TraceLine(143,0,__PYX_ERR(10, 143, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17_ResolverRegistry_7copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ResolverRegistry_copy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__228)); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 143, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17_ResolverRegistry_7copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ResolverRegistry_copy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__423)); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ResolverRegistry->tp_dict, __pyx_n_s_copy, __pyx_t_2) < 0) __PYX_ERR(10, 143, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ResolverRegistry->tp_dict, __pyx_n_s_copy, __pyx_t_2) < 0) __PYX_ERR(11, 143, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ResolverRegistry); @@ -253857,10 +236285,9 @@ if (!__Pyx_RefNanny) { * u"resolve(self, system_url, public_id, context)" * for resolver in self._resolvers: */ - __Pyx_TraceLine(147,0,__PYX_ERR(10, 147, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17_ResolverRegistry_9resolve, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ResolverRegistry_resolve, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__229)); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 147, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17_ResolverRegistry_9resolve, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ResolverRegistry_resolve, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__425)); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ResolverRegistry->tp_dict, __pyx_n_s_resolve, __pyx_t_2) < 0) __PYX_ERR(10, 147, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ResolverRegistry->tp_dict, __pyx_n_s_resolve, __pyx_t_2) < 0) __PYX_ERR(11, 147, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ResolverRegistry); @@ -253871,8 +236298,7 @@ if (!__Pyx_RefNanny) { * """Syntax error while parsing an XML document. * */ - __Pyx_TraceLine(7,0,__PYX_ERR(2, 7, __pyx_L1_error)) - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -253891,10 +236317,9 @@ if (!__Pyx_RefNanny) { * super(_ParseError, self).__init__(message) * self.lineno, self.offset = (line, column - 1) */ - __Pyx_TraceLine(12,0,__PYX_ERR(2, 12, __pyx_L1_error)) - __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_10ParseError_1__init__, 0, __pyx_n_s_ParseError___init, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__230)); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_10ParseError_1__init__, 0, __pyx_n_s_ParseError___init, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__427)); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__579); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__428); if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_init, __pyx_t_8) < 0) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -253905,8 +236330,7 @@ if (!__Pyx_RefNanny) { * return self.lineno, self.offset + 1 * */ - __Pyx_TraceLine(19,0,__PYX_ERR(2, 19, __pyx_L1_error)) - __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_10ParseError_3position, 0, __pyx_n_s_ParseError_position, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__231)); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 19, __pyx_L1_error) + __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_10ParseError_3position, 0, __pyx_n_s_ParseError_position, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__430)); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); /* "src/lxml/parser.pxi":18 @@ -253916,7 +236340,6 @@ if (!__Pyx_RefNanny) { * def position(self): * return self.lineno, self.offset + 1 */ - __Pyx_TraceLine(18,0,__PYX_ERR(2, 18, __pyx_L1_error)) __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -253930,11 +236353,10 @@ if (!__Pyx_RefNanny) { * def position(self, new_pos): * self.lineno, column = new_pos */ - __Pyx_TraceLine(22,0,__PYX_ERR(2, 22, __pyx_L1_error)) __pyx_t_8 = PyObject_GetItem(__pyx_t_7, __pyx_n_s_position); if (unlikely(!__pyx_t_8)) { PyErr_Clear(); - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_position); + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_position); } if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); @@ -253949,8 +236371,7 @@ if (!__Pyx_RefNanny) { * self.lineno, column = new_pos * self.offset = column - 1 */ - __Pyx_TraceLine(23,0,__PYX_ERR(2, 23, __pyx_L1_error)) - __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_10ParseError_5position, 0, __pyx_n_s_ParseError_position, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__232)); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 23, __pyx_L1_error) + __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_10ParseError_5position, 0, __pyx_n_s_ParseError_position, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__432)); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) { @@ -253962,41 +236383,11 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF_SET(__pyx_t_12, function); } } - if (!__pyx_t_13) { - __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 22, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_9); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_12)) { - PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_8}; - __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 22, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) { - PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_8}; - __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 22, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } else - #endif - { - __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 22, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL; - __Pyx_GIVEREF(__pyx_t_8); - PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_8); - __pyx_t_8 = 0; - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_14, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 22, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - } - } + __pyx_t_9 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_13, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_8); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 22, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_position, __pyx_t_9) < 0) __PYX_ERR(2, 23, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -254008,7 +236399,6 @@ if (!__Pyx_RefNanny) { * """Syntax error while parsing an XML document. * */ - __Pyx_TraceLine(7,0,__PYX_ERR(2, 7, __pyx_L1_error)) __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ParseError, __pyx_t_1, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ParseError, __pyx_t_9) < 0) __PYX_ERR(2, 7, __pyx_L1_error) @@ -254024,8 +236414,7 @@ if (!__Pyx_RefNanny) { * * */ - __Pyx_TraceLine(27,0,__PYX_ERR(2, 27, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ParseError); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 27, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ParseError); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_v_4lxml_5etree__ParseError); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree__ParseError, __pyx_t_1); @@ -254039,8 +236428,7 @@ if (!__Pyx_RefNanny) { * """Syntax error while parsing an XML document. * """ */ - __Pyx_TraceLine(30,0,__PYX_ERR(2, 30, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ParseError); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 30, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ParseError); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -254066,7 +236454,6 @@ if (!__Pyx_RefNanny) { * __GLOBAL_PARSER_CONTEXT.initMainParserContext() * */ - __Pyx_TraceLine(178,0,__PYX_ERR(2, 178, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__ParserDictionaryContext)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XGOTREF(((PyObject *)__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT)); @@ -254081,7 +236468,6 @@ if (!__Pyx_RefNanny) { * * ############################################################ */ - __Pyx_TraceLine(179,0,__PYX_ERR(2, 179, __pyx_L1_error)) __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initMainParserContext(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT); /* "src/lxml/parser.pxi":186 @@ -254091,7 +236477,6 @@ if (!__Pyx_RefNanny) { * * cdef int _setupPythonUnicode() except -1: */ - __Pyx_TraceLine(186,0,__PYX_ERR(2, 186, __pyx_L1_error)) __pyx_v_4lxml_5etree__UNICODE_ENCODING = NULL; /* "src/lxml/parser.pxi":242 @@ -254101,7 +236486,6 @@ if (!__Pyx_RefNanny) { * * ############################################################ */ - __Pyx_TraceLine(242,0,__PYX_ERR(2, 242, __pyx_L1_error)) __pyx_t_6 = __pyx_f_4lxml_5etree__setupPythonUnicode(); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(2, 242, __pyx_L1_error) /* "src/lxml/parser.pxi":503 @@ -254111,7 +236495,6 @@ if (!__Pyx_RefNanny) { * * xmlparser.xmlSetExternalEntityLoader(_local_resolver) */ - __Pyx_TraceLine(503,0,__PYX_ERR(2, 503, __pyx_L1_error)) __pyx_v_4lxml_5etree___DEFAULT_ENTITY_LOADER = xmlGetExternalEntityLoader(); /* "src/lxml/parser.pxi":505 @@ -254121,7 +236504,6 @@ if (!__Pyx_RefNanny) { * * ############################################################ */ - __Pyx_TraceLine(505,0,__PYX_ERR(2, 505, __pyx_L1_error)) xmlSetExternalEntityLoader(((xmlExternalEntityLoader)__pyx_f_4lxml_5etree__local_resolver)); /* "src/lxml/parser.pxi":961 @@ -254131,8 +236513,7 @@ if (!__Pyx_RefNanny) { * u":deprecated: use ``parser.set_element_class_lookup(lookup)`` instead." * self.set_element_class_lookup(lookup) */ - __Pyx_TraceLine(961,0,__PYX_ERR(2, 961, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_11_BaseParser_3setElementClassLookup, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseParser_setElementClassLooku, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__235)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 961, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_11_BaseParser_3setElementClassLookup, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseParser_setElementClassLooku, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__434)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 961, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__BaseParser->tp_dict, __pyx_n_s_setElementClassLookup, __pyx_t_2) < 0) __PYX_ERR(2, 961, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254145,8 +236526,7 @@ if (!__Pyx_RefNanny) { * u"""set_element_class_lookup(self, lookup = None) * */ - __Pyx_TraceLine(965,0,__PYX_ERR(2, 965, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_11_BaseParser_5set_element_class_lookup, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseParser_set_element_class_lo, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__236)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 965, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_11_BaseParser_5set_element_class_lookup, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseParser_set_element_class_lo, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__436)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 965, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__BaseParser->tp_dict, __pyx_n_s_set_element_class_lookup, __pyx_t_2) < 0) __PYX_ERR(2, 965, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254159,8 +236539,7 @@ if (!__Pyx_RefNanny) { * u"""copy(self) * */ - __Pyx_TraceLine(992,0,__PYX_ERR(2, 992, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_11_BaseParser_7copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseParser_copy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__237)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 992, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_11_BaseParser_7copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseParser_copy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__438)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 992, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__BaseParser->tp_dict, __pyx_n_s_copy, __pyx_t_2) < 0) __PYX_ERR(2, 992, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254173,8 +236552,7 @@ if (!__Pyx_RefNanny) { * u"""makeelement(self, _tag, attrib=None, nsmap=None, **_extra) * */ - __Pyx_TraceLine(999,0,__PYX_ERR(2, 999, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_11_BaseParser_9makeelement, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseParser_makeelement, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__238)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 999, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_11_BaseParser_9makeelement, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseParser_makeelement, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__440)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 999, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__BaseParser->tp_dict, __pyx_n_s_makeelement, __pyx_t_2) < 0) __PYX_ERR(2, 999, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254187,8 +236565,7 @@ if (!__Pyx_RefNanny) { * u"""feed(self, data) * */ - __Pyx_TraceLine(1242,0,__PYX_ERR(2, 1242, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_11_FeedParser_1feed, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FeedParser_feed, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__239)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1242, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_11_FeedParser_1feed, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FeedParser_feed, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__442)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__FeedParser->tp_dict, __pyx_n_s_feed, __pyx_t_2) < 0) __PYX_ERR(2, 1242, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254201,8 +236578,7 @@ if (!__Pyx_RefNanny) { * u"""close(self) * */ - __Pyx_TraceLine(1368,0,__PYX_ERR(2, 1368, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_11_FeedParser_3close, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FeedParser_close, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__240)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1368, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_11_FeedParser_3close, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FeedParser_close, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__444)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__FeedParser->tp_dict, __pyx_n_s_close, __pyx_t_2) < 0) __PYX_ERR(2, 1368, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254215,7 +236591,6 @@ if (!__Pyx_RefNanny) { * xmlparser.XML_PARSE_BIG_LINES * ) */ - __Pyx_TraceLine(1437,0,__PYX_ERR(2, 1437, __pyx_L1_error)) __pyx_v_4lxml_5etree__XML_DEFAULT_PARSE_OPTIONS = ((((XML_PARSE_NOENT | XML_PARSE_NOCDATA) | XML_PARSE_NONET) | XML_PARSE_COMPACT) | XML_PARSE_BIG_LINES); /* "src/lxml/parser.pxi":1550 @@ -254225,8 +236600,7 @@ if (!__Pyx_RefNanny) { * return (<_SaxParserContext?>self._getPushParserContext()).events_iterator * */ - __Pyx_TraceLine(1550,0,__PYX_ERR(2, 1550, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13XMLPullParser_3read_events, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XMLPullParser_read_events, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__242)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1550, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13XMLPullParser_3read_events, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XMLPullParser_read_events, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__446)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XMLPullParser->tp_dict, __pyx_n_s_read_events, __pyx_t_2) < 0) __PYX_ERR(2, 1550, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254239,7 +236613,6 @@ if (!__Pyx_RefNanny) { * * */ - __Pyx_TraceLine(1594,0,__PYX_ERR(2, 1594, __pyx_L1_error)) if (PyDict_SetItem(__pyx_d, __pyx_n_s_XMLTreeBuilder, ((PyObject *)__pyx_ptype_4lxml_5etree_ETCompatXMLParser)) < 0) __PYX_ERR(2, 1594, __pyx_L1_error) /* "src/lxml/parser.pxi":1598 @@ -254249,7 +236622,6 @@ if (!__Pyx_RefNanny) { * * __GLOBAL_PARSER_CONTEXT.setDefaultParser(__DEFAULT_XML_PARSER) */ - __Pyx_TraceLine(1598,0,__PYX_ERR(2, 1598, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree_XMLParser)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XGOTREF(((PyObject *)__pyx_v_4lxml_5etree___DEFAULT_XML_PARSER)); @@ -254264,7 +236636,6 @@ if (!__Pyx_RefNanny) { * * def set_default_parser(_BaseParser parser=None): */ - __Pyx_TraceLine(1600,0,__PYX_ERR(2, 1600, __pyx_L1_error)) __pyx_t_2 = ((PyObject *)__pyx_v_4lxml_5etree___DEFAULT_XML_PARSER); __Pyx_INCREF(__pyx_t_2); __pyx_f_4lxml_5etree_24_ParserDictionaryContext_setDefaultParser(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_2)); @@ -254277,10 +236648,9 @@ if (!__Pyx_RefNanny) { * u"""set_default_parser(parser=None) * */ - __Pyx_TraceLine(1602,0,__PYX_ERR(2, 1602, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_45set_default_parser, 0, __pyx_n_s_set_default_parser, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__243)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1602, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_45set_default_parser, 0, __pyx_n_s_set_default_parser, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__448)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__590); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__449); if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_default_parser, __pyx_t_2) < 0) __PYX_ERR(2, 1602, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254291,8 +236661,7 @@ if (!__Pyx_RefNanny) { * u"get_default_parser()" * return __GLOBAL_PARSER_CONTEXT.getDefaultParser() */ - __Pyx_TraceLine(1618,0,__PYX_ERR(2, 1618, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_47get_default_parser, 0, __pyx_n_s_get_default_parser, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__244)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1618, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_47get_default_parser, 0, __pyx_n_s_get_default_parser, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__450)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_default_parser, __pyx_t_2) < 0) __PYX_ERR(2, 1618, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254304,7 +236673,6 @@ if (!__Pyx_RefNanny) { * htmlparser.HTML_PARSE_COMPACT * ) */ - __Pyx_TraceLine(1629,0,__PYX_ERR(2, 1629, __pyx_L1_error)) __pyx_v_4lxml_5etree__HTML_DEFAULT_PARSE_OPTIONS = ((HTML_PARSE_RECOVER | HTML_PARSE_NONET) | HTML_PARSE_COMPACT); /* "src/lxml/parser.pxi":1695 @@ -254314,7 +236682,6 @@ if (!__Pyx_RefNanny) { * * */ - __Pyx_TraceLine(1695,0,__PYX_ERR(2, 1695, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree_HTMLParser)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XGOTREF(((PyObject *)__pyx_v_4lxml_5etree___DEFAULT_HTML_PARSER)); @@ -254329,8 +236696,7 @@ if (!__Pyx_RefNanny) { * return (<_SaxParserContext?>self._getPushParserContext()).events_iterator * */ - __Pyx_TraceLine(1723,0,__PYX_ERR(2, 1723, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_14HTMLPullParser_3read_events, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_HTMLPullParser_read_events, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__246)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1723, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_14HTMLPullParser_3read_events, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_HTMLPullParser_read_events, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__452)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_HTMLPullParser->tp_dict, __pyx_n_s_read_events, __pyx_t_2) < 0) __PYX_ERR(2, 1723, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254343,11 +236709,10 @@ if (!__Pyx_RefNanny) { * * */ - __Pyx_TraceLine(470,0,__PYX_ERR(11, 470, __pyx_L1_error)) - __Pyx_INCREF(__pyx_tuple__592); + __Pyx_INCREF(__pyx_tuple__453); __Pyx_XGOTREF(__pyx_v_4lxml_5etree_NS_END_EVENT); - __Pyx_DECREF_SET(__pyx_v_4lxml_5etree_NS_END_EVENT, __pyx_tuple__592); - __Pyx_GIVEREF(__pyx_tuple__592); + __Pyx_DECREF_SET(__pyx_v_4lxml_5etree_NS_END_EVENT, __pyx_tuple__453); + __Pyx_GIVEREF(__pyx_tuple__453); /* "src/lxml/saxparser.pxi":722 * # Python level event handlers @@ -254356,10 +236721,9 @@ if (!__Pyx_RefNanny) { * u"""close(self) * */ - __Pyx_TraceLine(722,0,__PYX_ERR(11, 722, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_11TreeBuilder_3close, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TreeBuilder_close, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__248)); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 722, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_11TreeBuilder_3close, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TreeBuilder_close, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__455)); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_TreeBuilder->tp_dict, __pyx_n_s_close, __pyx_t_2) < 0) __PYX_ERR(11, 722, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_TreeBuilder->tp_dict, __pyx_n_s_close, __pyx_t_2) < 0) __PYX_ERR(12, 722, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_TreeBuilder); @@ -254370,10 +236734,9 @@ if (!__Pyx_RefNanny) { * u"""data(self, data) * */ - __Pyx_TraceLine(732,0,__PYX_ERR(11, 732, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_11TreeBuilder_5data, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TreeBuilder_data, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__249)); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 732, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_11TreeBuilder_5data, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TreeBuilder_data, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__457)); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_TreeBuilder->tp_dict, __pyx_n_s_data, __pyx_t_2) < 0) __PYX_ERR(11, 732, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_TreeBuilder->tp_dict, __pyx_n_s_data, __pyx_t_2) < 0) __PYX_ERR(12, 732, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_TreeBuilder); @@ -254384,10 +236747,9 @@ if (!__Pyx_RefNanny) { * u"""start(self, tag, attrs, nsmap=None) * */ - __Pyx_TraceLine(740,0,__PYX_ERR(11, 740, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_11TreeBuilder_7start, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TreeBuilder_start, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__250)); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 740, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_11TreeBuilder_7start, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TreeBuilder_start, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__459)); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 740, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_TreeBuilder->tp_dict, __pyx_n_s_start, __pyx_t_2) < 0) __PYX_ERR(11, 740, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_TreeBuilder->tp_dict, __pyx_n_s_start, __pyx_t_2) < 0) __PYX_ERR(12, 740, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_TreeBuilder); @@ -254398,10 +236760,9 @@ if (!__Pyx_RefNanny) { * u"""end(self, tag) * */ - __Pyx_TraceLine(749,0,__PYX_ERR(11, 749, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_11TreeBuilder_9end, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TreeBuilder_end, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__251)); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 749, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_11TreeBuilder_9end, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TreeBuilder_end, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__461)); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 749, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_TreeBuilder->tp_dict, __pyx_n_s_end, __pyx_t_2) < 0) __PYX_ERR(11, 749, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_TreeBuilder->tp_dict, __pyx_n_s_end, __pyx_t_2) < 0) __PYX_ERR(12, 749, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_TreeBuilder); @@ -254412,10 +236773,9 @@ if (!__Pyx_RefNanny) { * u"""pi(self, target, data) * """ */ - __Pyx_TraceLine(759,0,__PYX_ERR(11, 759, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_11TreeBuilder_11pi, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TreeBuilder_pi, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__253)); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 759, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_11TreeBuilder_11pi, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TreeBuilder_pi, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__463)); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 759, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_TreeBuilder->tp_dict, __pyx_n_s_pi, __pyx_t_2) < 0) __PYX_ERR(11, 759, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_TreeBuilder->tp_dict, __pyx_n_s_pi, __pyx_t_2) < 0) __PYX_ERR(12, 759, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_TreeBuilder); @@ -254426,10 +236786,9 @@ if (!__Pyx_RefNanny) { * u"""comment(self, comment) * """ */ - __Pyx_TraceLine(764,0,__PYX_ERR(11, 764, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_11TreeBuilder_13comment, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TreeBuilder_comment, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__254)); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 764, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_11TreeBuilder_13comment, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TreeBuilder_comment, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__465)); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_TreeBuilder->tp_dict, __pyx_n_s_comment, __pyx_t_2) < 0) __PYX_ERR(11, 764, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_TreeBuilder->tp_dict, __pyx_n_s_comment, __pyx_t_2) < 0) __PYX_ERR(12, 764, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_TreeBuilder); @@ -254440,14 +236799,13 @@ if (!__Pyx_RefNanny) { * from inspect import getfullargspec as inspect_getargspec * except ImportError: */ - __Pyx_TraceLine(4,0,__PYX_ERR(12, 4, __pyx_L27_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3); - __Pyx_XGOTREF(__pyx_t_5); - __Pyx_XGOTREF(__pyx_t_4); + __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "src/lxml/parsertarget.pxi":5 @@ -254457,16 +236815,15 @@ if (!__Pyx_RefNanny) { * except ImportError: * from inspect import getargspec as inspect_getargspec */ - __Pyx_TraceLine(5,0,__PYX_ERR(12, 5, __pyx_L27_error)) - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 5, __pyx_L27_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 5, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_getfullargspec); __Pyx_GIVEREF(__pyx_n_s_getfullargspec); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_getfullargspec); - __pyx_t_1 = __Pyx_patch_inspect(__Pyx_Import(__pyx_n_s_inspect, __pyx_t_2, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 5, __pyx_L27_error) + __pyx_t_1 = __Pyx_patch_inspect(__Pyx_Import(__pyx_n_s_inspect, __pyx_t_2, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 5, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_getfullargspec); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 5, __pyx_L27_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_getfullargspec); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 5, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_v_4lxml_5etree_inspect_getargspec); @@ -254483,14 +236840,13 @@ if (!__Pyx_RefNanny) { * except ImportError: */ } - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - goto __pyx_L32_try_end; - __pyx_L27_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L26_try_end; + __pyx_L21_error:; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -254504,11 +236860,10 @@ if (!__Pyx_RefNanny) { * from inspect import getargspec as inspect_getargspec * */ - __Pyx_TraceLine(6,0,__PYX_ERR(12, 6, __pyx_L29_except_error)) __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_6) { __Pyx_AddTraceback("lxml.etree", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_7) < 0) __PYX_ERR(12, 6, __pyx_L29_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_7) < 0) __PYX_ERR(13, 6, __pyx_L23_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_7); @@ -254520,16 +236875,15 @@ if (!__Pyx_RefNanny) { * * */ - __Pyx_TraceLine(7,0,__PYX_ERR(12, 7, __pyx_L29_except_error)) - __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 7, __pyx_L29_except_error) + __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(13, 7, __pyx_L23_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_n_s_getargspec); __Pyx_GIVEREF(__pyx_n_s_getargspec); PyList_SET_ITEM(__pyx_t_9, 0, __pyx_n_s_getargspec); - __pyx_t_12 = __Pyx_patch_inspect(__Pyx_Import(__pyx_n_s_inspect, __pyx_t_9, 0)); if (unlikely(!__pyx_t_12)) __PYX_ERR(12, 7, __pyx_L29_except_error) + __pyx_t_12 = __Pyx_patch_inspect(__Pyx_Import(__pyx_n_s_inspect, __pyx_t_9, 0)); if (unlikely(!__pyx_t_12)) __PYX_ERR(13, 7, __pyx_L23_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_ImportFrom(__pyx_t_12, __pyx_n_s_getargspec); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 7, __pyx_L29_except_error) + __pyx_t_9 = __Pyx_ImportFrom(__pyx_t_12, __pyx_n_s_getargspec); if (unlikely(!__pyx_t_9)) __PYX_ERR(13, 7, __pyx_L23_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_v_4lxml_5etree_inspect_getargspec); @@ -254537,13 +236891,13 @@ if (!__Pyx_RefNanny) { __Pyx_GIVEREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __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; - goto __pyx_L28_exception_handled; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L22_exception_handled; } - goto __pyx_L29_except_error; - __pyx_L29_except_error:; + goto __pyx_L23_except_error; + __pyx_L23_except_error:; /* "src/lxml/parsertarget.pxi":4 * @@ -254552,17 +236906,17 @@ if (!__Pyx_RefNanny) { * from inspect import getfullargspec as inspect_getargspec * except ImportError: */ - __Pyx_XGIVEREF(__pyx_t_5); - __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3); - goto __pyx_L1_error; - __pyx_L28_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); + goto __pyx_L1_error; + __pyx_L22_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3); - __pyx_L32_try_end:; + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); + __pyx_L26_try_end:; } /* "src/lxml/parsertarget.pxi":10 @@ -254572,15 +236926,14 @@ if (!__Pyx_RefNanny) { * # Admittedly, this is somewhat ugly, but it's the easiest way * # to push the Python level parser result through the parser */ - __Pyx_TraceLine(10,0,__PYX_ERR(12, 10, __pyx_L1_error)) - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(12, 10, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(13, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 10, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_7, __pyx_n_s_TargetParserResult, __pyx_n_s_TargetParserResult, (PyObject *) NULL, __pyx_n_s_lxml_etree, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_7, __pyx_n_s_TargetParserResult, __pyx_n_s_TargetParserResult, (PyObject *) NULL, __pyx_n_s_lxml_etree, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "src/lxml/parsertarget.pxi":14 @@ -254590,10 +236943,9 @@ if (!__Pyx_RefNanny) { * self.result = result * */ - __Pyx_TraceLine(14,0,__PYX_ERR(12, 14, __pyx_L1_error)) - __pyx_t_12 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_19_TargetParserResult_1__init__, 0, __pyx_n_s_TargetParserResult___init, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__255)); if (unlikely(!__pyx_t_12)) __PYX_ERR(12, 14, __pyx_L1_error) + __pyx_t_12 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_19_TargetParserResult_1__init__, 0, __pyx_n_s_TargetParserResult___init, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__467)); if (unlikely(!__pyx_t_12)) __PYX_ERR(13, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_12) < 0) __PYX_ERR(12, 14, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_12) < 0) __PYX_ERR(13, 14, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "src/lxml/parsertarget.pxi":10 @@ -254603,10 +236955,9 @@ if (!__Pyx_RefNanny) { * # Admittedly, this is somewhat ugly, but it's the easiest way * # to push the Python level parser result through the parser */ - __Pyx_TraceLine(10,0,__PYX_ERR(12, 10, __pyx_L1_error)) - __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_TargetParserResult, __pyx_t_7, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(12, 10, __pyx_L1_error) + __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_TargetParserResult, __pyx_t_7, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(13, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_TargetParserResult, __pyx_t_12) < 0) __PYX_ERR(12, 10, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_TargetParserResult, __pyx_t_12) < 0) __PYX_ERR(13, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254619,7 +236970,6 @@ if (!__Pyx_RefNanny) { * * */ - __Pyx_TraceLine(4,0,__PYX_ERR(8, 4, __pyx_L1_error)) __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(8, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_n_s_GzipFile); @@ -254644,8 +236994,7 @@ if (!__Pyx_RefNanny) { * assert self.output_file is not None * self.writer = _IncrementalFileWriter( */ - __Pyx_TraceLine(914,0,__PYX_ERR(8, 914, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7xmlfile_3__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_xmlfile___enter, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__258)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 914, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7xmlfile_3__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_xmlfile___enter, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__469)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_xmlfile->tp_dict, __pyx_n_s_enter, __pyx_t_2) < 0) __PYX_ERR(8, 914, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254658,8 +237007,7 @@ if (!__Pyx_RefNanny) { * if self.writer is not None: * old_writer, self.writer = self.writer, None */ - __Pyx_TraceLine(921,0,__PYX_ERR(8, 921, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7xmlfile_5__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_xmlfile___exit, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__259)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 921, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7xmlfile_5__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_xmlfile___exit, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__471)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 921, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_xmlfile->tp_dict, __pyx_n_s_exit, __pyx_t_2) < 0) __PYX_ERR(8, 921, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254672,8 +237020,7 @@ if (!__Pyx_RefNanny) { * assert self.output_file is not None * if isinstance(self.output_file, basestring): */ - __Pyx_TraceLine(929,0,__PYX_ERR(8, 929, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7xmlfile_7__aenter__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_xmlfile___aenter, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__260)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 929, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7xmlfile_7__aenter__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_xmlfile___aenter, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 929, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_xmlfile->tp_dict, __pyx_n_s_aenter, __pyx_t_2) < 0) __PYX_ERR(8, 929, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254686,8 +237033,7 @@ if (!__Pyx_RefNanny) { * if self.async_writer is not None: * old_writer, self.async_writer = self.async_writer, None */ - __Pyx_TraceLine(940,0,__PYX_ERR(8, 940, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7xmlfile_10__aexit__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_xmlfile___aexit, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__263)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 940, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7xmlfile_10__aexit__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_xmlfile___aexit, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 940, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_xmlfile->tp_dict, __pyx_n_s_aexit, __pyx_t_2) < 0) __PYX_ERR(8, 940, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254700,8 +237046,7 @@ if (!__Pyx_RefNanny) { * """write_declaration(self, version=None, standalone=None, doctype=None) * */ - __Pyx_TraceLine(997,0,__PYX_ERR(8, 997, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_22_IncrementalFileWriter_5write_declaration, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IncrementalFileWriter_write_dec, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__264)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 997, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_22_IncrementalFileWriter_5write_declaration, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IncrementalFileWriter_write_dec, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__475)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__IncrementalFileWriter->tp_dict, __pyx_n_s_write_declaration, __pyx_t_2) < 0) __PYX_ERR(8, 997, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254714,8 +237059,7 @@ if (!__Pyx_RefNanny) { * """write_doctype(self, doctype) * */ - __Pyx_TraceLine(1026,0,__PYX_ERR(8, 1026, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_22_IncrementalFileWriter_7write_doctype, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IncrementalFileWriter_write_doc, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__267)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1026, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_22_IncrementalFileWriter_7write_doctype, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IncrementalFileWriter_write_doc, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__477)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__IncrementalFileWriter->tp_dict, __pyx_n_s_write_doctype, __pyx_t_2) < 0) __PYX_ERR(8, 1026, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254728,8 +237072,7 @@ if (!__Pyx_RefNanny) { * """method(self, method) * */ - __Pyx_TraceLine(1043,0,__PYX_ERR(8, 1043, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_22_IncrementalFileWriter_9method, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IncrementalFileWriter_method, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__269)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1043, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_22_IncrementalFileWriter_9method, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IncrementalFileWriter_method, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__479)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__IncrementalFileWriter->tp_dict, __pyx_n_s_method, __pyx_t_2) < 0) __PYX_ERR(8, 1043, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254742,8 +237085,7 @@ if (!__Pyx_RefNanny) { * """element(self, tag, attrib=None, nsmap=None, method, **_extra) * */ - __Pyx_TraceLine(1053,0,__PYX_ERR(8, 1053, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_22_IncrementalFileWriter_11element, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IncrementalFileWriter_element, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__270)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1053, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_22_IncrementalFileWriter_11element, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IncrementalFileWriter_element, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__481)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__IncrementalFileWriter->tp_dict, __pyx_n_s_element, __pyx_t_2) < 0) __PYX_ERR(8, 1053, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254756,8 +237098,7 @@ if (!__Pyx_RefNanny) { * """write(self, *args, with_tail=True, pretty_print=False, method=None) * */ - __Pyx_TraceLine(1190,0,__PYX_ERR(8, 1190, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_22_IncrementalFileWriter_13write, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IncrementalFileWriter_write, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__277)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1190, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_22_IncrementalFileWriter_13write, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IncrementalFileWriter_write, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__483)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__IncrementalFileWriter->tp_dict, __pyx_n_s_write, __pyx_t_2) < 0) __PYX_ERR(8, 1190, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254770,8 +237111,7 @@ if (!__Pyx_RefNanny) { * """flush(self) * */ - __Pyx_TraceLine(1237,0,__PYX_ERR(8, 1237, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_22_IncrementalFileWriter_15flush, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IncrementalFileWriter_flush, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__280)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1237, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_22_IncrementalFileWriter_15flush, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IncrementalFileWriter_flush, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__485)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__IncrementalFileWriter->tp_dict, __pyx_n_s_flush, __pyx_t_2) < 0) __PYX_ERR(8, 1237, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254784,8 +237124,7 @@ if (!__Pyx_RefNanny) { * self._data.append(data) * */ - __Pyx_TraceLine(1284,0,__PYX_ERR(8, 1284, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_16_AsyncDataWriter_3write, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncDataWriter_write, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__283)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1284, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_16_AsyncDataWriter_3write, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncDataWriter_write, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__487)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__AsyncDataWriter->tp_dict, __pyx_n_s_write, __pyx_t_2) < 0) __PYX_ERR(8, 1284, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254798,8 +237137,7 @@ if (!__Pyx_RefNanny) { * pass * */ - __Pyx_TraceLine(1287,0,__PYX_ERR(8, 1287, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_16_AsyncDataWriter_5close, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncDataWriter_close, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__284)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1287, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_16_AsyncDataWriter_5close, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncDataWriter_close, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__489)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__AsyncDataWriter->tp_dict, __pyx_n_s_close, __pyx_t_2) < 0) __PYX_ERR(8, 1287, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254812,8 +237150,7 @@ if (!__Pyx_RefNanny) { * self._writer.flush() * data = self._buffer.collect() */ - __Pyx_TraceLine(1316,0,__PYX_ERR(8, 1316, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_27_AsyncIncrementalFileWriter_3flush, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncIncrementalFileWriter_flus, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__285)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1316, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_27_AsyncIncrementalFileWriter_3flush, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncIncrementalFileWriter_flus, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__AsyncIncrementalFileWriter->tp_dict, __pyx_n_s_flush, __pyx_t_2) < 0) __PYX_ERR(8, 1316, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254826,8 +237163,7 @@ if (!__Pyx_RefNanny) { * self._writer.write_declaration(version, standalone, doctype) * data = self._flush() */ - __Pyx_TraceLine(1322,0,__PYX_ERR(8, 1322, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_27_AsyncIncrementalFileWriter_6write_declaration, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncIncrementalFileWriter_writ, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__286)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1322, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_27_AsyncIncrementalFileWriter_6write_declaration, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncIncrementalFileWriter_writ, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__AsyncIncrementalFileWriter->tp_dict, __pyx_n_s_write_declaration, __pyx_t_2) < 0) __PYX_ERR(8, 1322, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254840,8 +237176,7 @@ if (!__Pyx_RefNanny) { * self._writer.write_doctype(doctype) * data = self._flush() */ - __Pyx_TraceLine(1328,0,__PYX_ERR(8, 1328, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_27_AsyncIncrementalFileWriter_9write_doctype, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncIncrementalFileWriter_writ_2, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__287)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1328, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_27_AsyncIncrementalFileWriter_9write_doctype, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncIncrementalFileWriter_writ_2, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__AsyncIncrementalFileWriter->tp_dict, __pyx_n_s_write_doctype, __pyx_t_2) < 0) __PYX_ERR(8, 1328, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254854,8 +237189,7 @@ if (!__Pyx_RefNanny) { * self._writer.write(*args, with_tail=with_tail, pretty_print=pretty_print, method=method) * data = self._flush() */ - __Pyx_TraceLine(1334,0,__PYX_ERR(8, 1334, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_27_AsyncIncrementalFileWriter_12write, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncIncrementalFileWriter_writ_3, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__288)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1334, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_27_AsyncIncrementalFileWriter_12write, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncIncrementalFileWriter_writ_3, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__AsyncIncrementalFileWriter->tp_dict, __pyx_n_s_write, __pyx_t_2) < 0) __PYX_ERR(8, 1334, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254868,8 +237202,7 @@ if (!__Pyx_RefNanny) { * return self._writer.method(method) * */ - __Pyx_TraceLine(1340,0,__PYX_ERR(8, 1340, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_27_AsyncIncrementalFileWriter_15method, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncIncrementalFileWriter_meth, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__289)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1340, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_27_AsyncIncrementalFileWriter_15method, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncIncrementalFileWriter_meth, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__495)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__AsyncIncrementalFileWriter->tp_dict, __pyx_n_s_method, __pyx_t_2) < 0) __PYX_ERR(8, 1340, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254882,8 +237215,7 @@ if (!__Pyx_RefNanny) { * element_writer = self._writer.element(tag, attrib, nsmap, method, **_extra) * return _AsyncFileWriterElement(element_writer, self) */ - __Pyx_TraceLine(1343,0,__PYX_ERR(8, 1343, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_27_AsyncIncrementalFileWriter_17element, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncIncrementalFileWriter_elem, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__290)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1343, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_27_AsyncIncrementalFileWriter_17element, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncIncrementalFileWriter_elem, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__497)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__AsyncIncrementalFileWriter->tp_dict, __pyx_n_s_element, __pyx_t_2) < 0) __PYX_ERR(8, 1343, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254896,8 +237228,7 @@ if (!__Pyx_RefNanny) { * self._writer._close(raise_on_error) * data = self._buffer.collect() */ - __Pyx_TraceLine(1347,0,__PYX_ERR(8, 1347, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_27_AsyncIncrementalFileWriter_19_close, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncIncrementalFileWriter__clo, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__291)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1347, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_27_AsyncIncrementalFileWriter_19_close, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncIncrementalFileWriter__clo, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__AsyncIncrementalFileWriter->tp_dict, __pyx_n_s_close_2, __pyx_t_2) < 0) __PYX_ERR(8, 1347, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254910,8 +237241,7 @@ if (!__Pyx_RefNanny) { * self._element_writer.__enter__() * data = self._writer._flush() */ - __Pyx_TraceLine(1367,0,__PYX_ERR(8, 1367, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_23_AsyncFileWriterElement_3__aenter__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncFileWriterElement___aenter, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__292)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1367, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_23_AsyncFileWriterElement_3__aenter__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncFileWriterElement___aenter, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__AsyncFileWriterElement->tp_dict, __pyx_n_s_aenter, __pyx_t_2) < 0) __PYX_ERR(8, 1367, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254924,8 +237254,7 @@ if (!__Pyx_RefNanny) { * self._element_writer.__exit__(*args) * data = self._writer._flush() */ - __Pyx_TraceLine(1373,0,__PYX_ERR(8, 1373, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_23_AsyncFileWriterElement_6__aexit__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncFileWriterElement___aexit, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__293)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1373, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_23_AsyncFileWriterElement_6__aexit__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncFileWriterElement___aexit, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__AsyncFileWriterElement->tp_dict, __pyx_n_s_aexit, __pyx_t_2) < 0) __PYX_ERR(8, 1373, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254938,8 +237267,7 @@ if (!__Pyx_RefNanny) { * self._writer._method = self._new_method * self._writer._write_start_element(self._element) */ - __Pyx_TraceLine(1395,0,__PYX_ERR(8, 1395, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_18_FileWriterElement_3__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FileWriterElement___enter, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__294)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1395, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_18_FileWriterElement_3__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FileWriterElement___enter, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__502)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__FileWriterElement->tp_dict, __pyx_n_s_enter, __pyx_t_2) < 0) __PYX_ERR(8, 1395, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254952,8 +237280,7 @@ if (!__Pyx_RefNanny) { * self._writer._write_end_element(self._element) * self._writer._method = self._old_method */ - __Pyx_TraceLine(1399,0,__PYX_ERR(8, 1399, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_18_FileWriterElement_5__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FileWriterElement___exit, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__295)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1399, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_18_FileWriterElement_5__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FileWriterElement___exit, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__504)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__FileWriterElement->tp_dict, __pyx_n_s_exit, __pyx_t_2) < 0) __PYX_ERR(8, 1399, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254966,8 +237293,7 @@ if (!__Pyx_RefNanny) { * if self._entered: * raise LxmlSyntaxError("Inconsistent enter action in context manager") */ - __Pyx_TraceLine(1421,0,__PYX_ERR(8, 1421, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_14_MethodChanger_3__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MethodChanger___enter, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__296)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1421, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_14_MethodChanger_3__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MethodChanger___enter, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__506)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__MethodChanger->tp_dict, __pyx_n_s_enter, __pyx_t_2) < 0) __PYX_ERR(8, 1421, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254980,8 +237306,7 @@ if (!__Pyx_RefNanny) { * if self._exited: * raise LxmlSyntaxError("Inconsistent exit action in context manager") */ - __Pyx_TraceLine(1427,0,__PYX_ERR(8, 1427, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_14_MethodChanger_5__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MethodChanger___exit, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__298)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1427, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_14_MethodChanger_5__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MethodChanger___exit, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__508)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__MethodChanger->tp_dict, __pyx_n_s_exit, __pyx_t_2) < 0) __PYX_ERR(8, 1427, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -254994,8 +237319,7 @@ if (!__Pyx_RefNanny) { * # for your async convenience * return self.__enter__() */ - __Pyx_TraceLine(1435,0,__PYX_ERR(8, 1435, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_14_MethodChanger_7__aenter__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MethodChanger___aenter, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__301)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1435, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_14_MethodChanger_7__aenter__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MethodChanger___aenter, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__MethodChanger->tp_dict, __pyx_n_s_aenter, __pyx_t_2) < 0) __PYX_ERR(8, 1435, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -255008,8 +237332,7 @@ if (!__Pyx_RefNanny) { * # for your async convenience * return self.__exit__(*args) */ - __Pyx_TraceLine(1439,0,__PYX_ERR(8, 1439, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_14_MethodChanger_10__aexit__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MethodChanger___aexit, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__302)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1439, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_14_MethodChanger_10__aexit__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MethodChanger___aexit, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 1439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__MethodChanger->tp_dict, __pyx_n_s_aexit, __pyx_t_2) < 0) __PYX_ERR(8, 1439, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -255022,10 +237345,9 @@ if (!__Pyx_RefNanny) { * u"""set_element_class_lookup(self, lookup = None) * */ - __Pyx_TraceLine(148,0,__PYX_ERR(13, 148, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_9iterparse_3set_element_class_lookup, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_iterparse_set_element_class_look, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__304)); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 148, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_9iterparse_3set_element_class_lookup, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_iterparse_set_element_class_look, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__512)); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_iterparse->tp_dict, __pyx_n_s_set_element_class_lookup, __pyx_t_2) < 0) __PYX_ERR(13, 148, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_iterparse->tp_dict, __pyx_n_s_set_element_class_lookup, __pyx_t_2) < 0) __PYX_ERR(14, 148, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_iterparse); @@ -255036,10 +237358,9 @@ if (!__Pyx_RefNanny) { * u"""makeelement(self, _tag, attrib=None, nsmap=None, **_extra) * */ - __Pyx_TraceLine(157,0,__PYX_ERR(13, 157, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_9iterparse_5makeelement, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_iterparse_makeelement, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__305)); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 157, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_9iterparse_5makeelement, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_iterparse_makeelement, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__514)); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_iterparse->tp_dict, __pyx_n_s_makeelement, __pyx_t_2) < 0) __PYX_ERR(13, 157, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_iterparse->tp_dict, __pyx_n_s_makeelement, __pyx_t_2) < 0) __PYX_ERR(14, 157, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_iterparse); @@ -255050,10 +237371,9 @@ if (!__Pyx_RefNanny) { * """Prevent descending into the current subtree. * Instead, the next returned event will be the 'end' event of the current element */ - __Pyx_TraceLine(340,0,__PYX_ERR(13, 340, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8iterwalk_7skip_subtree, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_iterwalk_skip_subtree, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__310)); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 340, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8iterwalk_7skip_subtree, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_iterwalk_skip_subtree, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__516)); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_iterwalk->tp_dict, __pyx_n_s_skip_subtree, __pyx_t_2) < 0) __PYX_ERR(13, 340, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_iterwalk->tp_dict, __pyx_n_s_skip_subtree, __pyx_t_2) < 0) __PYX_ERR(14, 340, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_iterwalk); @@ -255064,54 +237384,51 @@ if (!__Pyx_RefNanny) { * u"""XMLID(text, parser=None, base_url=None) * */ - __Pyx_TraceLine(3,0,__PYX_ERR(14, 3, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 3, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 3, __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(14, 3, __pyx_L1_error) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_49XMLID, 0, __pyx_n_s_XMLID, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__312)); if (unlikely(!__pyx_t_7)) __PYX_ERR(14, 3, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_base_url, ((PyObject *)Py_None)) < 0) __PYX_ERR(15, 3, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_49XMLID, 0, __pyx_n_s_XMLID, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__518)); if (unlikely(!__pyx_t_7)) __PYX_ERR(15, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__631); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__519); __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_7, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_XMLID, __pyx_t_7) < 0) __PYX_ERR(14, 3, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_XMLID, __pyx_t_7) < 0) __PYX_ERR(15, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "src/lxml/xmlid.pxi":24 - * return (root, dic) + * return root, dic * * def XMLDTDID(text, parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""XMLDTDID(text, parser=None, base_url=None) * */ - __Pyx_TraceLine(24,0,__PYX_ERR(14, 24, __pyx_L1_error)) - __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(14, 24, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(15, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_base_url, ((PyObject *)Py_None)) < 0) __PYX_ERR(14, 24, __pyx_L1_error) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_51XMLDTDID, 0, __pyx_n_s_XMLDTDID, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__315)); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 24, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_base_url, ((PyObject *)Py_None)) < 0) __PYX_ERR(15, 24, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_51XMLDTDID, 0, __pyx_n_s_XMLDTDID, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__521)); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__633); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__522); __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_2, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_XMLDTDID, __pyx_t_2) < 0) __PYX_ERR(14, 24, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_XMLDTDID, __pyx_t_2) < 0) __PYX_ERR(15, 24, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/lxml/xmlid.pxi":44 - * return (root, _IDDict(root)) + * return root, _IDDict(root) * * def parseid(source, parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""parseid(source, parser=None) * */ - __Pyx_TraceLine(44,0,__PYX_ERR(14, 44, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 44, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 44, __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(14, 44, __pyx_L1_error) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_53parseid, 0, __pyx_n_s_parseid, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__316)); if (unlikely(!__pyx_t_7)) __PYX_ERR(14, 44, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_base_url, ((PyObject *)Py_None)) < 0) __PYX_ERR(15, 44, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_53parseid, 0, __pyx_n_s_parseid, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__524)); if (unlikely(!__pyx_t_7)) __PYX_ERR(15, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__635); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__525); __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_7, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_parseid, __pyx_t_7) < 0) __PYX_ERR(14, 44, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_parseid, __pyx_t_7) < 0) __PYX_ERR(15, 44, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "src/lxml/xmlid.pxi":78 @@ -255121,10 +237438,9 @@ if (!__Pyx_RefNanny) { * return _IDDict(self._doc) * */ - __Pyx_TraceLine(78,0,__PYX_ERR(14, 78, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_IDDict_3copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IDDict_copy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__317)); if (unlikely(!__pyx_t_7)) __PYX_ERR(14, 78, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_IDDict_3copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IDDict_copy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__527)); if (unlikely(!__pyx_t_7)) __PYX_ERR(15, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__IDDict->tp_dict, __pyx_n_s_copy, __pyx_t_7) < 0) __PYX_ERR(14, 78, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__IDDict->tp_dict, __pyx_n_s_copy, __pyx_t_7) < 0) __PYX_ERR(15, 78, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__IDDict); @@ -255135,10 +237451,9 @@ if (!__Pyx_RefNanny) { * return self[id_name] * */ - __Pyx_TraceLine(95,0,__PYX_ERR(14, 95, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_IDDict_7get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IDDict_get, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__318)); if (unlikely(!__pyx_t_7)) __PYX_ERR(14, 95, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_IDDict_7get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IDDict_get, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__529)); if (unlikely(!__pyx_t_7)) __PYX_ERR(15, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__IDDict->tp_dict, __pyx_n_s_get, __pyx_t_7) < 0) __PYX_ERR(14, 95, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__IDDict->tp_dict, __pyx_n_s_get, __pyx_t_7) < 0) __PYX_ERR(15, 95, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__IDDict); @@ -255149,10 +237464,9 @@ if (!__Pyx_RefNanny) { * return id_name in self * */ - __Pyx_TraceLine(105,0,__PYX_ERR(14, 105, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_IDDict_11has_key, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IDDict_has_key, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__319)); if (unlikely(!__pyx_t_7)) __PYX_ERR(14, 105, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_IDDict_11has_key, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IDDict_has_key, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__531)); if (unlikely(!__pyx_t_7)) __PYX_ERR(15, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__IDDict->tp_dict, __pyx_n_s_has_key, __pyx_t_7) < 0) __PYX_ERR(14, 105, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__IDDict->tp_dict, __pyx_n_s_has_key, __pyx_t_7) < 0) __PYX_ERR(15, 105, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__IDDict); @@ -255163,10 +237477,9 @@ if (!__Pyx_RefNanny) { * if self._keys is None: * self._keys = self._build_keys() */ - __Pyx_TraceLine(111,0,__PYX_ERR(14, 111, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_IDDict_15keys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IDDict_keys, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__320)); if (unlikely(!__pyx_t_7)) __PYX_ERR(14, 111, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_IDDict_15keys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IDDict_keys, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__533)); if (unlikely(!__pyx_t_7)) __PYX_ERR(15, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__IDDict->tp_dict, __pyx_n_s_keys, __pyx_t_7) < 0) __PYX_ERR(14, 111, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__IDDict->tp_dict, __pyx_n_s_keys, __pyx_t_7) < 0) __PYX_ERR(15, 111, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__IDDict); @@ -255177,10 +237490,9 @@ if (!__Pyx_RefNanny) { * return self * */ - __Pyx_TraceLine(121,0,__PYX_ERR(14, 121, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_IDDict_19iterkeys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IDDict_iterkeys, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__322)); if (unlikely(!__pyx_t_7)) __PYX_ERR(14, 121, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_IDDict_19iterkeys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IDDict_iterkeys, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__535)); if (unlikely(!__pyx_t_7)) __PYX_ERR(15, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__IDDict->tp_dict, __pyx_n_s_iterkeys, __pyx_t_7) < 0) __PYX_ERR(14, 121, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__IDDict->tp_dict, __pyx_n_s_iterkeys, __pyx_t_7) < 0) __PYX_ERR(15, 121, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__IDDict); @@ -255191,10 +237503,9 @@ if (!__Pyx_RefNanny) { * if self._items is None: * self._items = self._build_items() */ - __Pyx_TraceLine(129,0,__PYX_ERR(14, 129, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_IDDict_23items, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IDDict_items, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__323)); if (unlikely(!__pyx_t_7)) __PYX_ERR(14, 129, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_IDDict_23items, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IDDict_items, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__537)); if (unlikely(!__pyx_t_7)) __PYX_ERR(15, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__IDDict->tp_dict, __pyx_n_s_items, __pyx_t_7) < 0) __PYX_ERR(14, 129, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__IDDict->tp_dict, __pyx_n_s_items, __pyx_t_7) < 0) __PYX_ERR(15, 129, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__IDDict); @@ -255205,10 +237516,9 @@ if (!__Pyx_RefNanny) { * if self._items is None: * self._items = self._build_items() */ - __Pyx_TraceLine(134,0,__PYX_ERR(14, 134, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_IDDict_25iteritems, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IDDict_iteritems, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__325)); if (unlikely(!__pyx_t_7)) __PYX_ERR(14, 134, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_IDDict_25iteritems, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IDDict_iteritems, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__539)); if (unlikely(!__pyx_t_7)) __PYX_ERR(15, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__IDDict->tp_dict, __pyx_n_s_iteritems, __pyx_t_7) < 0) __PYX_ERR(14, 134, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__IDDict->tp_dict, __pyx_n_s_iteritems, __pyx_t_7) < 0) __PYX_ERR(15, 134, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__IDDict); @@ -255219,10 +237529,9 @@ if (!__Pyx_RefNanny) { * cdef list values = [] * if self._items is None: */ - __Pyx_TraceLine(139,0,__PYX_ERR(14, 139, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_IDDict_27values, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IDDict_values, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__326)); if (unlikely(!__pyx_t_7)) __PYX_ERR(14, 139, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_IDDict_27values, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IDDict_values, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__541)); if (unlikely(!__pyx_t_7)) __PYX_ERR(15, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__IDDict->tp_dict, __pyx_n_s_values, __pyx_t_7) < 0) __PYX_ERR(14, 139, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__IDDict->tp_dict, __pyx_n_s_values, __pyx_t_7) < 0) __PYX_ERR(15, 139, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__IDDict); @@ -255233,10 +237542,9 @@ if (!__Pyx_RefNanny) { * return iter(self.values()) * */ - __Pyx_TraceLine(149,0,__PYX_ERR(14, 149, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_IDDict_29itervalues, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IDDict_itervalues, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__327)); if (unlikely(!__pyx_t_7)) __PYX_ERR(14, 149, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_IDDict_29itervalues, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IDDict_itervalues, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__543)); if (unlikely(!__pyx_t_7)) __PYX_ERR(15, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__IDDict->tp_dict, __pyx_n_s_itervalues, __pyx_t_7) < 0) __PYX_ERR(14, 149, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__IDDict->tp_dict, __pyx_n_s_itervalues, __pyx_t_7) < 0) __PYX_ERR(15, 149, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__IDDict); @@ -255247,11 +237555,10 @@ if (!__Pyx_RefNanny) { * u"""cleanup_namespaces(tree_or_element, top_nsmap=None, keep_ns_prefixes=None) * */ - __Pyx_TraceLine(3,0,__PYX_ERR(16, 3, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_55cleanup_namespaces, 0, __pyx_n_s_cleanup_namespaces, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__328)); if (unlikely(!__pyx_t_7)) __PYX_ERR(16, 3, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_55cleanup_namespaces, 0, __pyx_n_s_cleanup_namespaces, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__545)); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__646); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_cleanup_namespaces, __pyx_t_7) < 0) __PYX_ERR(16, 3, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__546); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_cleanup_namespaces, __pyx_t_7) < 0) __PYX_ERR(17, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "src/lxml/cleanup.pxi":33 @@ -255261,10 +237568,9 @@ if (!__Pyx_RefNanny) { * u"""strip_attributes(tree_or_element, *attribute_names) * */ - __Pyx_TraceLine(33,0,__PYX_ERR(16, 33, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_57strip_attributes, 0, __pyx_n_s_strip_attributes, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__329)); if (unlikely(!__pyx_t_7)) __PYX_ERR(16, 33, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_57strip_attributes, 0, __pyx_n_s_strip_attributes, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__548)); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_strip_attributes, __pyx_t_7) < 0) __PYX_ERR(16, 33, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_strip_attributes, __pyx_t_7) < 0) __PYX_ERR(17, 33, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "src/lxml/cleanup.pxi":74 @@ -255274,18 +237580,17 @@ if (!__Pyx_RefNanny) { * u"""strip_elements(tree_or_element, *tag_names, with_tail=True) * */ - __Pyx_TraceLine(74,0,__PYX_ERR(16, 74, __pyx_L1_error)) - __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(16, 74, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 74, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_with_tail, __pyx_t_2) < 0) __PYX_ERR(16, 74, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_with_tail, __pyx_t_2) < 0) __PYX_ERR(17, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_59strip_elements, 0, __pyx_n_s_strip_elements, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__330)); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 74, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_59strip_elements, 0, __pyx_n_s_strip_elements, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__550)); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_2, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_strip_elements, __pyx_t_2) < 0) __PYX_ERR(16, 74, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_strip_elements, __pyx_t_2) < 0) __PYX_ERR(17, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/lxml/cleanup.pxi":145 @@ -255295,10 +237600,9 @@ if (!__Pyx_RefNanny) { * u"""strip_tags(tree_or_element, *tag_names) * */ - __Pyx_TraceLine(145,0,__PYX_ERR(16, 145, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_61strip_tags, 0, __pyx_n_s_strip_tags, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__331)); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 145, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_61strip_tags, 0, __pyx_n_s_strip_tags, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__552)); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_strip_tags, __pyx_t_2) < 0) __PYX_ERR(16, 145, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_strip_tags, __pyx_t_2) < 0) __PYX_ERR(17, 145, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/lxml/extensions.pxi":368 @@ -255308,11 +237612,10 @@ if (!__Pyx_RefNanny) { * b"Number encoding", * b"Unfinished literal", */ - __Pyx_TraceLine(368,0,__PYX_ERR(17, 368, __pyx_L1_error)) - __Pyx_INCREF(__pyx_tuple__650); + __Pyx_INCREF(__pyx_tuple__553); __Pyx_XGOTREF(__pyx_v_4lxml_5etree_LIBXML2_XPATH_ERROR_MESSAGES); - __Pyx_DECREF_SET(__pyx_v_4lxml_5etree_LIBXML2_XPATH_ERROR_MESSAGES, __pyx_tuple__650); - __Pyx_GIVEREF(__pyx_tuple__650); + __Pyx_DECREF_SET(__pyx_v_4lxml_5etree_LIBXML2_XPATH_ERROR_MESSAGES, __pyx_tuple__553); + __Pyx_GIVEREF(__pyx_tuple__553); /* "src/lxml/extensions.pxi":426 * @@ -255321,16 +237624,15 @@ if (!__Pyx_RefNanny) { * u"""Extension(module, function_mapping=None, ns=None) * */ - __Pyx_TraceLine(426,0,__PYX_ERR(17, 426, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 426, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ns, ((PyObject *)Py_None)) < 0) __PYX_ERR(17, 426, __pyx_L1_error) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_63Extension, 0, __pyx_n_s_Extension, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__332)); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 426, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ns, ((PyObject *)Py_None)) < 0) __PYX_ERR(9, 426, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_63Extension, 0, __pyx_n_s_Extension, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__555)); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__652); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__556); __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_7, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_Extension, __pyx_t_7) < 0) __PYX_ERR(17, 426, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Extension, __pyx_t_7) < 0) __PYX_ERR(9, 426, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "src/lxml/extensions.pxi":498 @@ -255340,10 +237642,9 @@ if (!__Pyx_RefNanny) { * flags = self._make_string(flags) * s = self._make_string(s) */ - __Pyx_TraceLine(498,0,__PYX_ERR(17, 498, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ExsltRegExp_3test, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ExsltRegExp_test, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__334)); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 498, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ExsltRegExp_3test, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ExsltRegExp_test, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__558)); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ExsltRegExp->tp_dict, __pyx_n_s_test, __pyx_t_7) < 0) __PYX_ERR(17, 498, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ExsltRegExp->tp_dict, __pyx_n_s_test, __pyx_t_7) < 0) __PYX_ERR(9, 498, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ExsltRegExp); @@ -255354,10 +237655,9 @@ if (!__Pyx_RefNanny) { * cdef list result_list * flags = self._make_string(flags) */ - __Pyx_TraceLine(507,0,__PYX_ERR(17, 507, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ExsltRegExp_5match, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ExsltRegExp_match, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__335)); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 507, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ExsltRegExp_5match, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ExsltRegExp_match, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__560)); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ExsltRegExp->tp_dict, __pyx_n_s_match, __pyx_t_7) < 0) __PYX_ERR(17, 507, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ExsltRegExp->tp_dict, __pyx_n_s_match, __pyx_t_7) < 0) __PYX_ERR(9, 507, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ExsltRegExp); @@ -255368,10 +237668,9 @@ if (!__Pyx_RefNanny) { * replacement = self._make_string(replacement) * flags = self._make_string(flags) */ - __Pyx_TraceLine(533,0,__PYX_ERR(17, 533, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ExsltRegExp_7replace, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ExsltRegExp_replace, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__338)); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 533, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ExsltRegExp_7replace, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ExsltRegExp_replace, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__562)); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ExsltRegExp->tp_dict, __pyx_n_s_replace, __pyx_t_7) < 0) __PYX_ERR(17, 533, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ExsltRegExp->tp_dict, __pyx_n_s_replace, __pyx_t_7) < 0) __PYX_ERR(9, 533, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ExsltRegExp); @@ -255382,10 +237681,9 @@ if (!__Pyx_RefNanny) { * return self._parent * */ - __Pyx_TraceLine(730,0,__PYX_ERR(17, 730, __pyx_L1_error)) - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_21_ElementUnicodeResult_1getparent, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementUnicodeResult_getparent, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__339)); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 730, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_21_ElementUnicodeResult_1getparent, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementUnicodeResult_getparent, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__564)); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementUnicodeResult->tp_dict, __pyx_n_s_getparent, __pyx_t_7) < 0) __PYX_ERR(17, 730, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementUnicodeResult->tp_dict, __pyx_n_s_getparent, __pyx_t_7) < 0) __PYX_ERR(9, 730, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementUnicodeResult); @@ -255396,7 +237694,6 @@ if (!__Pyx_RefNanny) { * class _PyElementUnicodeResult(unicode): * # we need to use a Python class here, or PyPy will crash on creation */ - __Pyx_TraceLine(734,0,__PYX_ERR(17, 734, __pyx_L1_error)) __pyx_t_10 = (IS_PYPY != 0); if (__pyx_t_10) { @@ -255407,15 +237704,14 @@ if (!__Pyx_RefNanny) { * # we need to use a Python class here, or PyPy will crash on creation * # https://bitbucket.org/pypy/pypy/issues/2021/pypy3-pytype_ready-crashes-for-extension */ - __Pyx_TraceLine(735,0,__PYX_ERR(17, 735, __pyx_L1_error)) - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 735, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 735, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(((PyObject *)(&PyUnicode_Type))); __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type))); PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&PyUnicode_Type))); - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 735, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 735, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_7, __pyx_n_s_PyElementUnicodeResult, __pyx_n_s_PyElementUnicodeResult, (PyObject *) NULL, __pyx_n_s_lxml_etree, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 735, __pyx_L1_error) + __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_7, __pyx_n_s_PyElementUnicodeResult, __pyx_n_s_PyElementUnicodeResult, (PyObject *) NULL, __pyx_n_s_lxml_etree, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 735, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "src/lxml/extensions.pxi":738 @@ -255425,10 +237721,9 @@ if (!__Pyx_RefNanny) { * return self._parent * */ - __Pyx_TraceLine(738,0,__PYX_ERR(17, 738, __pyx_L1_error)) - __pyx_t_12 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_23_PyElementUnicodeResult_1getparent, 0, __pyx_n_s_PyElementUnicodeResult_getparen, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__340)); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 738, __pyx_L1_error) + __pyx_t_12 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_23_PyElementUnicodeResult_1getparent, 0, __pyx_n_s_PyElementUnicodeResult_getparen, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__566)); if (unlikely(!__pyx_t_12)) __PYX_ERR(9, 738, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_getparent, __pyx_t_12) < 0) __PYX_ERR(17, 738, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_getparent, __pyx_t_12) < 0) __PYX_ERR(9, 738, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "src/lxml/extensions.pxi":735 @@ -255438,8 +237733,7 @@ if (!__Pyx_RefNanny) { * # we need to use a Python class here, or PyPy will crash on creation * # https://bitbucket.org/pypy/pypy/issues/2021/pypy3-pytype_ready-crashes-for-extension */ - __Pyx_TraceLine(735,0,__PYX_ERR(17, 735, __pyx_L1_error)) - __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_PyElementUnicodeResult, __pyx_t_7, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 735, __pyx_L1_error) + __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_PyElementUnicodeResult, __pyx_t_7, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(9, 735, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_v_4lxml_5etree__PyElementUnicodeResult); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree__PyElementUnicodeResult, __pyx_t_12); @@ -255465,15 +237759,14 @@ if (!__Pyx_RefNanny) { * # we need to use a Python class here, bytes cannot be C-subclassed * # in Pyrex/Cython */ - __Pyx_TraceLine(741,0,__PYX_ERR(17, 741, __pyx_L1_error)) - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 741, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(((PyObject *)(&PyBytes_Type))); __Pyx_GIVEREF(((PyObject *)(&PyBytes_Type))); PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&PyBytes_Type))); - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 741, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_7, __pyx_n_s_ElementStringResult, __pyx_n_s_ElementStringResult, (PyObject *) NULL, __pyx_n_s_lxml_etree, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 741, __pyx_L1_error) + __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_7, __pyx_n_s_ElementStringResult, __pyx_n_s_ElementStringResult, (PyObject *) NULL, __pyx_n_s_lxml_etree, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "src/lxml/extensions.pxi":744 @@ -255483,10 +237776,9 @@ if (!__Pyx_RefNanny) { * return self._parent * */ - __Pyx_TraceLine(744,0,__PYX_ERR(17, 744, __pyx_L1_error)) - __pyx_t_12 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_20_ElementStringResult_1getparent, 0, __pyx_n_s_ElementStringResult_getparent, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__341)); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 744, __pyx_L1_error) + __pyx_t_12 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_20_ElementStringResult_1getparent, 0, __pyx_n_s_ElementStringResult_getparent, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__568)); if (unlikely(!__pyx_t_12)) __PYX_ERR(9, 744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_getparent, __pyx_t_12) < 0) __PYX_ERR(17, 744, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_getparent, __pyx_t_12) < 0) __PYX_ERR(9, 744, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "src/lxml/extensions.pxi":741 @@ -255496,10 +237788,9 @@ if (!__Pyx_RefNanny) { * # we need to use a Python class here, bytes cannot be C-subclassed * # in Pyrex/Cython */ - __Pyx_TraceLine(741,0,__PYX_ERR(17, 741, __pyx_L1_error)) - __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ElementStringResult, __pyx_t_7, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(17, 741, __pyx_L1_error) + __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ElementStringResult, __pyx_t_7, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(9, 741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ElementStringResult, __pyx_t_12) < 0) __PYX_ERR(17, 741, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ElementStringResult, __pyx_t_12) < 0) __PYX_ERR(9, 741, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -255512,8 +237803,7 @@ if (!__Pyx_RefNanny) { * pass * */ - __Pyx_TraceLine(3,0,__PYX_ERR(18, 3, __pyx_L1_error)) - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_7)) __PYX_ERR(18, 3, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_7)) __PYX_ERR(18, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -255542,7 +237832,6 @@ if (!__Pyx_RefNanny) { * xmlerror.XML_XPATH_UNFINISHED_LITERAL_ERROR, * xmlerror.XML_XPATH_VARIABLE_REF_ERROR, */ - __Pyx_TraceLine(11,0,__PYX_ERR(18, 11, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyInt_From_xmlParserErrors(XML_XPATH_NUMBER_ERROR); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -255553,7 +237842,6 @@ if (!__Pyx_RefNanny) { * xmlerror.XML_XPATH_VARIABLE_REF_ERROR, * xmlerror.XML_XPATH_INVALID_PREDICATE_ERROR, */ - __Pyx_TraceLine(12,0,__PYX_ERR(18, 12, __pyx_L1_error)) __pyx_t_7 = __Pyx_PyInt_From_xmlParserErrors(XML_XPATH_UNFINISHED_LITERAL_ERROR); if (unlikely(!__pyx_t_7)) __PYX_ERR(18, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); @@ -255564,7 +237852,6 @@ if (!__Pyx_RefNanny) { * xmlerror.XML_XPATH_INVALID_PREDICATE_ERROR, * xmlerror.XML_XPATH_UNCLOSED_ERROR, */ - __Pyx_TraceLine(13,0,__PYX_ERR(18, 13, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyInt_From_xmlParserErrors(XML_XPATH_VARIABLE_REF_ERROR); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -255575,7 +237862,6 @@ if (!__Pyx_RefNanny) { * xmlerror.XML_XPATH_UNCLOSED_ERROR, * xmlerror.XML_XPATH_INVALID_CHAR_ERROR */ - __Pyx_TraceLine(14,0,__PYX_ERR(18, 14, __pyx_L1_error)) __pyx_t_12 = __Pyx_PyInt_From_xmlParserErrors(XML_XPATH_INVALID_PREDICATE_ERROR); if (unlikely(!__pyx_t_12)) __PYX_ERR(18, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); @@ -255586,7 +237872,6 @@ if (!__Pyx_RefNanny) { * xmlerror.XML_XPATH_INVALID_CHAR_ERROR * ) */ - __Pyx_TraceLine(15,0,__PYX_ERR(18, 15, __pyx_L1_error)) __pyx_t_9 = __Pyx_PyInt_From_xmlParserErrors(XML_XPATH_UNCLOSED_ERROR); if (unlikely(!__pyx_t_9)) __PYX_ERR(18, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); @@ -255597,9 +237882,8 @@ if (!__Pyx_RefNanny) { * ) * */ - __Pyx_TraceLine(16,0,__PYX_ERR(18, 16, __pyx_L1_error)) - __pyx_t_14 = __Pyx_PyInt_From_xmlParserErrors(XML_XPATH_INVALID_CHAR_ERROR); if (unlikely(!__pyx_t_14)) __PYX_ERR(18, 16, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); + __pyx_t_8 = __Pyx_PyInt_From_xmlParserErrors(XML_XPATH_INVALID_CHAR_ERROR); if (unlikely(!__pyx_t_8)) __PYX_ERR(18, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); /* "src/lxml/xpath.pxi":11 * cdef object _XPATH_SYNTAX_ERRORS @@ -255608,31 +237892,30 @@ if (!__Pyx_RefNanny) { * xmlerror.XML_XPATH_UNFINISHED_LITERAL_ERROR, * xmlerror.XML_XPATH_VARIABLE_REF_ERROR, */ - __Pyx_TraceLine(11,0,__PYX_ERR(18, 11, __pyx_L1_error)) - __pyx_t_8 = PyTuple_New(6); if (unlikely(!__pyx_t_8)) __PYX_ERR(18, 11, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_13 = PyTuple_New(6); if (unlikely(!__pyx_t_13)) __PYX_ERR(18, 11, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_12); - PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_12); + PyTuple_SET_ITEM(__pyx_t_13, 3, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_9); - PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_t_9); - __Pyx_GIVEREF(__pyx_t_14); - PyTuple_SET_ITEM(__pyx_t_8, 5, __pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_13, 4, __pyx_t_9); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_13, 5, __pyx_t_8); __pyx_t_2 = 0; __pyx_t_7 = 0; __pyx_t_1 = 0; __pyx_t_12 = 0; __pyx_t_9 = 0; - __pyx_t_14 = 0; - __Pyx_XGOTREF(__pyx_v_4lxml_5etree__XPATH_SYNTAX_ERRORS); - __Pyx_DECREF_SET(__pyx_v_4lxml_5etree__XPATH_SYNTAX_ERRORS, __pyx_t_8); - __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XGOTREF(__pyx_v_4lxml_5etree__XPATH_SYNTAX_ERRORS); + __Pyx_DECREF_SET(__pyx_v_4lxml_5etree__XPATH_SYNTAX_ERRORS, __pyx_t_13); + __Pyx_GIVEREF(__pyx_t_13); + __pyx_t_13 = 0; /* "src/lxml/xpath.pxi":21 * cdef object _XPATH_EVAL_ERRORS @@ -255641,9 +237924,8 @@ if (!__Pyx_RefNanny) { * xmlerror.XML_XPATH_UNDEF_PREFIX_ERROR, * xmlerror.XML_XPATH_UNKNOWN_FUNC_ERROR, */ - __Pyx_TraceLine(21,0,__PYX_ERR(18, 21, __pyx_L1_error)) - __pyx_t_8 = __Pyx_PyInt_From_xmlParserErrors(XML_XPATH_UNDEF_VARIABLE_ERROR); if (unlikely(!__pyx_t_8)) __PYX_ERR(18, 21, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_13 = __Pyx_PyInt_From_xmlParserErrors(XML_XPATH_UNDEF_VARIABLE_ERROR); if (unlikely(!__pyx_t_13)) __PYX_ERR(18, 21, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); /* "src/lxml/xpath.pxi":22 * _XPATH_EVAL_ERRORS = ( @@ -255652,9 +237934,8 @@ if (!__Pyx_RefNanny) { * xmlerror.XML_XPATH_UNKNOWN_FUNC_ERROR, * xmlerror.XML_XPATH_INVALID_OPERAND, */ - __Pyx_TraceLine(22,0,__PYX_ERR(18, 22, __pyx_L1_error)) - __pyx_t_14 = __Pyx_PyInt_From_xmlParserErrors(XML_XPATH_UNDEF_PREFIX_ERROR); if (unlikely(!__pyx_t_14)) __PYX_ERR(18, 22, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); + __pyx_t_8 = __Pyx_PyInt_From_xmlParserErrors(XML_XPATH_UNDEF_PREFIX_ERROR); if (unlikely(!__pyx_t_8)) __PYX_ERR(18, 22, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); /* "src/lxml/xpath.pxi":23 * xmlerror.XML_XPATH_UNDEF_VARIABLE_ERROR, @@ -255663,7 +237944,6 @@ if (!__Pyx_RefNanny) { * xmlerror.XML_XPATH_INVALID_OPERAND, * xmlerror.XML_XPATH_INVALID_TYPE, */ - __Pyx_TraceLine(23,0,__PYX_ERR(18, 23, __pyx_L1_error)) __pyx_t_9 = __Pyx_PyInt_From_xmlParserErrors(XML_XPATH_UNKNOWN_FUNC_ERROR); if (unlikely(!__pyx_t_9)) __PYX_ERR(18, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); @@ -255674,7 +237954,6 @@ if (!__Pyx_RefNanny) { * xmlerror.XML_XPATH_INVALID_TYPE, * xmlerror.XML_XPATH_INVALID_ARITY, */ - __Pyx_TraceLine(24,0,__PYX_ERR(18, 24, __pyx_L1_error)) __pyx_t_12 = __Pyx_PyInt_From_xmlParserErrors(XML_XPATH_INVALID_OPERAND); if (unlikely(!__pyx_t_12)) __PYX_ERR(18, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); @@ -255685,7 +237964,6 @@ if (!__Pyx_RefNanny) { * xmlerror.XML_XPATH_INVALID_ARITY, * xmlerror.XML_XPATH_INVALID_CTXT_SIZE, */ - __Pyx_TraceLine(25,0,__PYX_ERR(18, 25, __pyx_L1_error)) __pyx_t_1 = __Pyx_PyInt_From_xmlParserErrors(XML_XPATH_INVALID_TYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -255696,7 +237974,6 @@ if (!__Pyx_RefNanny) { * xmlerror.XML_XPATH_INVALID_CTXT_SIZE, * xmlerror.XML_XPATH_INVALID_CTXT_POSITION */ - __Pyx_TraceLine(26,0,__PYX_ERR(18, 26, __pyx_L1_error)) __pyx_t_7 = __Pyx_PyInt_From_xmlParserErrors(XML_XPATH_INVALID_ARITY); if (unlikely(!__pyx_t_7)) __PYX_ERR(18, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); @@ -255707,7 +237984,6 @@ if (!__Pyx_RefNanny) { * xmlerror.XML_XPATH_INVALID_CTXT_POSITION * ) */ - __Pyx_TraceLine(27,0,__PYX_ERR(18, 27, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyInt_From_xmlParserErrors(XML_XPATH_INVALID_CTXT_SIZE); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -255718,9 +237994,8 @@ if (!__Pyx_RefNanny) { * ) * */ - __Pyx_TraceLine(28,0,__PYX_ERR(18, 28, __pyx_L1_error)) - __pyx_t_13 = __Pyx_PyInt_From_xmlParserErrors(XML_XPATH_INVALID_CTXT_POSITION); if (unlikely(!__pyx_t_13)) __PYX_ERR(18, 28, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); + __pyx_t_14 = __Pyx_PyInt_From_xmlParserErrors(XML_XPATH_INVALID_CTXT_POSITION); if (unlikely(!__pyx_t_14)) __PYX_ERR(18, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); /* "src/lxml/xpath.pxi":21 * cdef object _XPATH_EVAL_ERRORS @@ -255729,13 +238004,12 @@ if (!__Pyx_RefNanny) { * xmlerror.XML_XPATH_UNDEF_PREFIX_ERROR, * xmlerror.XML_XPATH_UNKNOWN_FUNC_ERROR, */ - __Pyx_TraceLine(21,0,__PYX_ERR(18, 21, __pyx_L1_error)) __pyx_t_15 = PyTuple_New(8); if (unlikely(!__pyx_t_15)) __PYX_ERR(18, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); + __Pyx_GIVEREF(__pyx_t_13); + PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_8); - PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_8); - __Pyx_GIVEREF(__pyx_t_14); - PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_12); @@ -255746,16 +238020,16 @@ if (!__Pyx_RefNanny) { PyTuple_SET_ITEM(__pyx_t_15, 5, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_15, 6, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_13); - PyTuple_SET_ITEM(__pyx_t_15, 7, __pyx_t_13); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_15, 7, __pyx_t_14); + __pyx_t_13 = 0; __pyx_t_8 = 0; - __pyx_t_14 = 0; __pyx_t_9 = 0; __pyx_t_12 = 0; __pyx_t_1 = 0; __pyx_t_7 = 0; __pyx_t_2 = 0; - __pyx_t_13 = 0; + __pyx_t_14 = 0; __Pyx_XGOTREF(__pyx_v_4lxml_5etree__XPATH_EVAL_ERRORS); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree__XPATH_EVAL_ERRORS, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); @@ -255768,8 +238042,7 @@ if (!__Pyx_RefNanny) { * u"""evaluate(self, _eval_arg, **_variables) * */ - __Pyx_TraceLine(152,0,__PYX_ERR(18, 152, __pyx_L1_error)) - __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_19_XPathEvaluatorBase_7evaluate, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XPathEvaluatorBase_evaluate, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__342)); if (unlikely(!__pyx_t_15)) __PYX_ERR(18, 152, __pyx_L1_error) + __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_19_XPathEvaluatorBase_7evaluate, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XPathEvaluatorBase_evaluate, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__570)); if (unlikely(!__pyx_t_15)) __PYX_ERR(18, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__XPathEvaluatorBase->tp_dict, __pyx_n_s_evaluate, __pyx_t_15) < 0) __PYX_ERR(18, 152, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -255782,8 +238055,7 @@ if (!__Pyx_RefNanny) { * u"""Register a namespace with the XPath context. * """ */ - __Pyx_TraceLine(268,0,__PYX_ERR(18, 268, __pyx_L1_error)) - __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_21XPathElementEvaluator_3register_namespace, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XPathElementEvaluator_register_n, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__343)); if (unlikely(!__pyx_t_15)) __PYX_ERR(18, 268, __pyx_L1_error) + __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_21XPathElementEvaluator_3register_namespace, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XPathElementEvaluator_register_n, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__572)); if (unlikely(!__pyx_t_15)) __PYX_ERR(18, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XPathElementEvaluator->tp_dict, __pyx_n_s_register_namespace, __pyx_t_15) < 0) __PYX_ERR(18, 268, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -255796,8 +238068,7 @@ if (!__Pyx_RefNanny) { * u"""Register a prefix -> uri dict. * """ */ - __Pyx_TraceLine(274,0,__PYX_ERR(18, 274, __pyx_L1_error)) - __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_21XPathElementEvaluator_5register_namespaces, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XPathElementEvaluator_register_n_2, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__344)); if (unlikely(!__pyx_t_15)) __PYX_ERR(18, 274, __pyx_L1_error) + __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_21XPathElementEvaluator_5register_namespaces, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XPathElementEvaluator_register_n_2, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__574)); if (unlikely(!__pyx_t_15)) __PYX_ERR(18, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XPathElementEvaluator->tp_dict, __pyx_n_s_register_namespaces, __pyx_t_15) < 0) __PYX_ERR(18, 274, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -255810,19 +238081,18 @@ if (!__Pyx_RefNanny) { * regexp=True, smart_strings=True): * u"""XPathEvaluator(etree_or_element, namespaces=None, extensions=None, regexp=True, smart_strings=True) */ - __Pyx_TraceLine(369,0,__PYX_ERR(18, 369, __pyx_L1_error)) __pyx_t_15 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_15)) __PYX_ERR(18, 369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_namespaces, ((PyObject *)Py_None)) < 0) __PYX_ERR(18, 369, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_extensions, ((PyObject *)Py_None)) < 0) __PYX_ERR(18, 369, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_regexp, ((PyObject *)Py_True)) < 0) __PYX_ERR(18, 369, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_smart_strings, ((PyObject *)Py_True)) < 0) __PYX_ERR(18, 369, __pyx_L1_error) - __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_65XPathEvaluator, 0, __pyx_n_s_XPathEvaluator, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__345)); if (unlikely(!__pyx_t_13)) __PYX_ERR(18, 369, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_13, __pyx_t_15); + __pyx_t_14 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_65XPathEvaluator, 0, __pyx_n_s_XPathEvaluator, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__576)); if (unlikely(!__pyx_t_14)) __PYX_ERR(18, 369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_14, __pyx_t_15); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_XPathEvaluator, __pyx_t_13) < 0) __PYX_ERR(18, 369, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_XPathEvaluator, __pyx_t_14) < 0) __PYX_ERR(18, 369, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "src/lxml/xpath.pxi":467 * cdef object _replace_strings @@ -255831,19 +238101,18 @@ if (!__Pyx_RefNanny) { * _find_namespaces = re.compile(b'({[^}]+})').findall * */ - __Pyx_TraceLine(467,0,__PYX_ERR(18, 467, __pyx_L1_error)) - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_compile); if (unlikely(!__pyx_t_13)) __PYX_ERR(18, 467, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_tuple__664, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(18, 467, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_compile); if (unlikely(!__pyx_t_14)) __PYX_ERR(18, 467, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_tuple__578, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(18, 467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_sub); if (unlikely(!__pyx_t_13)) __PYX_ERR(18, 467, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_sub); if (unlikely(!__pyx_t_14)) __PYX_ERR(18, 467, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XGOTREF(__pyx_v_4lxml_5etree__replace_strings); - __Pyx_DECREF_SET(__pyx_v_4lxml_5etree__replace_strings, __pyx_t_13); - __Pyx_GIVEREF(__pyx_t_13); - __pyx_t_13 = 0; + __Pyx_DECREF_SET(__pyx_v_4lxml_5etree__replace_strings, __pyx_t_14); + __Pyx_GIVEREF(__pyx_t_14); + __pyx_t_14 = 0; /* "src/lxml/xpath.pxi":468 * cdef object _find_namespaces @@ -255852,19 +238121,18 @@ if (!__Pyx_RefNanny) { * * cdef class ETXPath(XPath): */ - __Pyx_TraceLine(468,0,__PYX_ERR(18, 468, __pyx_L1_error)) - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_compile); if (unlikely(!__pyx_t_13)) __PYX_ERR(18, 468, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_tuple__666, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(18, 468, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_compile); if (unlikely(!__pyx_t_14)) __PYX_ERR(18, 468, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_tuple__580, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(18, 468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_findall); if (unlikely(!__pyx_t_13)) __PYX_ERR(18, 468, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_findall); if (unlikely(!__pyx_t_14)) __PYX_ERR(18, 468, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XGOTREF(__pyx_v_4lxml_5etree__find_namespaces); - __Pyx_DECREF_SET(__pyx_v_4lxml_5etree__find_namespaces, __pyx_t_13); - __Pyx_GIVEREF(__pyx_t_13); - __pyx_t_13 = 0; + __Pyx_DECREF_SET(__pyx_v_4lxml_5etree__find_namespaces, __pyx_t_14); + __Pyx_GIVEREF(__pyx_t_14); + __pyx_t_14 = 0; /* "src/lxml/xslt.pxi":18 * """ @@ -255873,26 +238141,25 @@ if (!__Pyx_RefNanny) { * """Error serialising an XSLT result. * """ */ - __Pyx_TraceLine(18,0,__PYX_ERR(3, 18, __pyx_L1_error)) - __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 18, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); + __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 18, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_5etree_XSLTError)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_5etree_XSLTError)); - PyTuple_SET_ITEM(__pyx_t_13, 0, ((PyObject *)__pyx_ptype_4lxml_5etree_XSLTError)); + PyTuple_SET_ITEM(__pyx_t_14, 0, ((PyObject *)__pyx_ptype_4lxml_5etree_XSLTError)); __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_5etree_SerialisationError)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_5etree_SerialisationError)); - PyTuple_SET_ITEM(__pyx_t_13, 1, ((PyObject *)__pyx_ptype_4lxml_5etree_SerialisationError)); - __pyx_t_15 = __Pyx_CalculateMetaclass(NULL, __pyx_t_13); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 18, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_14, 1, ((PyObject *)__pyx_ptype_4lxml_5etree_SerialisationError)); + __pyx_t_15 = __Pyx_CalculateMetaclass(NULL, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_15, __pyx_t_13, __pyx_n_s_XSLTSaveError, __pyx_n_s_XSLTSaveError, (PyObject *) NULL, __pyx_n_s_lxml_etree, __pyx_kp_s_Error_serialising_an_XSLT_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 18, __pyx_L1_error) + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_15, __pyx_t_14, __pyx_n_s_XSLTSaveError, __pyx_n_s_XSLTSaveError, (PyObject *) NULL, __pyx_n_s_lxml_etree, __pyx_kp_s_Error_serialising_an_XSLT_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_15, __pyx_n_s_XSLTSaveError, __pyx_t_13, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 18, __pyx_L1_error) + __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_15, __pyx_n_s_XSLTSaveError, __pyx_t_14, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_XSLTSaveError, __pyx_t_7) < 0) __PYX_ERR(3, 18, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "src/lxml/xslt.pxi":28 * @@ -255901,11 +238168,10 @@ if (!__Pyx_RefNanny) { * LIBXSLT_VERSION = __unpackIntVersion(xslt.xsltLibxsltVersion) * */ - __Pyx_TraceLine(28,0,__PYX_ERR(3, 28, __pyx_L1_error)) - __pyx_t_13 = __pyx_f_4lxml_5etree___unpackIntVersion(LIBXSLT_VERSION); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 28, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_LIBXSLT_COMPILED_VERSION, __pyx_t_13) < 0) __PYX_ERR(3, 28, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_14 = __pyx_f_4lxml_5etree___unpackIntVersion(LIBXSLT_VERSION); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_LIBXSLT_COMPILED_VERSION, __pyx_t_14) < 0) __PYX_ERR(3, 28, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "src/lxml/xslt.pxi":29 * # version information @@ -255914,11 +238180,10 @@ if (!__Pyx_RefNanny) { * * */ - __Pyx_TraceLine(29,0,__PYX_ERR(3, 29, __pyx_L1_error)) - __pyx_t_13 = __pyx_f_4lxml_5etree___unpackIntVersion(xsltLibxsltVersion); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 29, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_LIBXSLT_VERSION, __pyx_t_13) < 0) __PYX_ERR(3, 29, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_14 = __pyx_f_4lxml_5etree___unpackIntVersion(xsltLibxsltVersion); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_LIBXSLT_VERSION, __pyx_t_14) < 0) __PYX_ERR(3, 29, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "src/lxml/xslt.pxi":163 * return c_doc @@ -255927,7 +238192,6 @@ if (!__Pyx_RefNanny) { * xslt.xsltSetLoaderFunc(_xslt_doc_loader) * */ - __Pyx_TraceLine(163,0,__PYX_ERR(3, 163, __pyx_L1_error)) __pyx_v_4lxml_5etree_XSLT_DOC_DEFAULT_LOADER = xsltDocDefaultLoader; /* "src/lxml/xslt.pxi":164 @@ -255937,7 +238201,6 @@ if (!__Pyx_RefNanny) { * * ################################################################################ */ - __Pyx_TraceLine(164,0,__PYX_ERR(3, 164, __pyx_L1_error)) xsltSetLoaderFunc(((xsltDocLoaderFunc)__pyx_f_4lxml_5etree__xslt_doc_loader)); /* "src/lxml/xslt.pxi":205 @@ -255947,12 +238210,11 @@ if (!__Pyx_RefNanny) { * read_network=False, write_network=False) * */ - __Pyx_TraceLine(205,0,__PYX_ERR(3, 205, __pyx_L1_error)) - __pyx_t_13 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 205, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_read_file, Py_False) < 0) __PYX_ERR(3, 205, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_write_file, Py_False) < 0) __PYX_ERR(3, 205, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_create_dir, Py_False) < 0) __PYX_ERR(3, 205, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 205, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_read_file, Py_False) < 0) __PYX_ERR(3, 205, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_write_file, Py_False) < 0) __PYX_ERR(3, 205, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_create_dir, Py_False) < 0) __PYX_ERR(3, 205, __pyx_L1_error) /* "src/lxml/xslt.pxi":206 * DENY_ALL = XSLTAccessControl( @@ -255961,9 +238223,8 @@ if (!__Pyx_RefNanny) { * * DENY_WRITE = XSLTAccessControl( */ - __Pyx_TraceLine(206,0,__PYX_ERR(3, 206, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_read_network, Py_False) < 0) __PYX_ERR(3, 205, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_write_network, Py_False) < 0) __PYX_ERR(3, 205, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_read_network, Py_False) < 0) __PYX_ERR(3, 205, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_write_network, Py_False) < 0) __PYX_ERR(3, 205, __pyx_L1_error) /* "src/lxml/xslt.pxi":204 * self._setAccess(xslt.XSLT_SECPREF_WRITE_NETWORK, write_network) @@ -255972,10 +238233,9 @@ if (!__Pyx_RefNanny) { * read_file=False, write_file=False, create_dir=False, * read_network=False, write_network=False) */ - __Pyx_TraceLine(204,0,__PYX_ERR(3, 204, __pyx_L1_error)) - __pyx_t_15 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_XSLTAccessControl), __pyx_empty_tuple, __pyx_t_13); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 204, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_XSLTAccessControl), __pyx_empty_tuple, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XSLTAccessControl->tp_dict, __pyx_n_s_DENY_ALL, __pyx_t_15) < 0) __PYX_ERR(3, 204, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_XSLTAccessControl); @@ -255987,7 +238247,6 @@ if (!__Pyx_RefNanny) { * read_network=True, write_network=False) * */ - __Pyx_TraceLine(209,0,__PYX_ERR(3, 209, __pyx_L1_error)) __pyx_t_15 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_read_file, Py_True) < 0) __PYX_ERR(3, 209, __pyx_L1_error) @@ -256001,7 +238260,6 @@ if (!__Pyx_RefNanny) { * * def __dealloc__(self): */ - __Pyx_TraceLine(210,0,__PYX_ERR(3, 210, __pyx_L1_error)) if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_read_network, Py_True) < 0) __PYX_ERR(3, 209, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_write_network, Py_False) < 0) __PYX_ERR(3, 209, __pyx_L1_error) @@ -256012,12 +238270,11 @@ if (!__Pyx_RefNanny) { * read_file=True, write_file=False, create_dir=False, * read_network=True, write_network=False) */ - __Pyx_TraceLine(208,0,__PYX_ERR(3, 208, __pyx_L1_error)) - __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_XSLTAccessControl), __pyx_empty_tuple, __pyx_t_15); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 208, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); + __pyx_t_14 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_XSLTAccessControl), __pyx_empty_tuple, __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XSLTAccessControl->tp_dict, __pyx_n_s_DENY_WRITE, __pyx_t_13) < 0) __PYX_ERR(3, 208, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XSLTAccessControl->tp_dict, __pyx_n_s_DENY_WRITE, __pyx_t_14) < 0) __PYX_ERR(3, 208, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_XSLTAccessControl); /* "src/lxml/xslt.pxi":268 @@ -256027,13 +238284,12 @@ if (!__Pyx_RefNanny) { * * @cython.final */ - __Pyx_TraceLine(268,0,__PYX_ERR(3, 268, __pyx_L1_error)) - __pyx_t_13 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 268, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); + __pyx_t_14 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_v_4lxml_5etree_EMPTY_DICT); - __Pyx_DECREF_SET(__pyx_v_4lxml_5etree_EMPTY_DICT, ((PyObject*)__pyx_t_13)); - __Pyx_GIVEREF(__pyx_t_13); - __pyx_t_13 = 0; + __Pyx_DECREF_SET(__pyx_v_4lxml_5etree_EMPTY_DICT, ((PyObject*)__pyx_t_14)); + __Pyx_GIVEREF(__pyx_t_14); + __pyx_t_14 = 0; /* "src/lxml/xslt.pxi":436 * @@ -256042,11 +238298,10 @@ if (!__Pyx_RefNanny) { * u"""strparam(strval) * */ - __Pyx_TraceLine(436,0,__PYX_ERR(3, 436, __pyx_L1_error)) - __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_4XSLT_7strparam, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XSLT_strparam, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__351)); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 436, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XSLT->tp_dict, __pyx_n_s_strparam, __pyx_t_13) < 0) __PYX_ERR(3, 436, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_14 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_4XSLT_7strparam, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XSLT_strparam, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__582)); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 436, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XSLT->tp_dict, __pyx_n_s_strparam, __pyx_t_14) < 0) __PYX_ERR(3, 436, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_XSLT); /* "src/lxml/xslt.pxi":435 @@ -256056,12 +238311,11 @@ if (!__Pyx_RefNanny) { * def strparam(strval): * u"""strparam(strval) */ - __Pyx_TraceLine(435,0,__PYX_ERR(3, 435, __pyx_L1_error)) - __pyx_t_13 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_4lxml_5etree_XSLT, __pyx_n_s_strparam); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 436, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_13); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 435, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_14, (PyObject *)__pyx_ptype_4lxml_5etree_XSLT, __pyx_n_s_strparam); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 436, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XSLT->tp_dict, __pyx_n_s_strparam, __pyx_t_15) < 0) __PYX_ERR(3, 436, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_XSLT); @@ -256073,8 +238327,7 @@ if (!__Pyx_RefNanny) { * u"""set_global_max_depth(max_depth) * */ - __Pyx_TraceLine(450,0,__PYX_ERR(3, 450, __pyx_L1_error)) - __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_4XSLT_9set_global_max_depth, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XSLT_set_global_max_depth, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__352)); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 450, __pyx_L1_error) + __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_4XSLT_9set_global_max_depth, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XSLT_set_global_max_depth, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__584)); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XSLT->tp_dict, __pyx_n_s_set_global_max_depth, __pyx_t_15) < 0) __PYX_ERR(3, 450, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -256087,14 +238340,13 @@ if (!__Pyx_RefNanny) { * def set_global_max_depth(int max_depth): * u"""set_global_max_depth(max_depth) */ - __Pyx_TraceLine(449,0,__PYX_ERR(3, 449, __pyx_L1_error)) - __pyx_t_15 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_4lxml_5etree_XSLT, __pyx_n_s_set_global_max_depth); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 450, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_15, (PyObject *)__pyx_ptype_4lxml_5etree_XSLT, __pyx_n_s_set_global_max_depth); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_15); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 449, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); + __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XSLT->tp_dict, __pyx_n_s_set_global_max_depth, __pyx_t_13) < 0) __PYX_ERR(3, 450, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XSLT->tp_dict, __pyx_n_s_set_global_max_depth, __pyx_t_14) < 0) __PYX_ERR(3, 450, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_XSLT); /* "src/lxml/xslt.pxi":469 @@ -256104,11 +238356,10 @@ if (!__Pyx_RefNanny) { * u"""apply(self, _input, profile_run=False, **kw) * */ - __Pyx_TraceLine(469,0,__PYX_ERR(3, 469, __pyx_L1_error)) - __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_4XSLT_11apply, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XSLT_apply, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__354)); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 469, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XSLT->tp_dict, __pyx_n_s_apply, __pyx_t_13) < 0) __PYX_ERR(3, 469, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_14 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_4XSLT_11apply, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XSLT_apply, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__586)); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 469, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XSLT->tp_dict, __pyx_n_s_apply, __pyx_t_14) < 0) __PYX_ERR(3, 469, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_XSLT); /* "src/lxml/xslt.pxi":475 @@ -256118,11 +238369,10 @@ if (!__Pyx_RefNanny) { * u"""tostring(self, result_tree) * */ - __Pyx_TraceLine(475,0,__PYX_ERR(3, 475, __pyx_L1_error)) - __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_4XSLT_13tostring, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XSLT_tostring, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__355)); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 475, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XSLT->tp_dict, __pyx_n_s_tostring, __pyx_t_13) < 0) __PYX_ERR(3, 475, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_14 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_4XSLT_13tostring, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XSLT_tostring, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__588)); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 475, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XSLT->tp_dict, __pyx_n_s_tostring, __pyx_t_14) < 0) __PYX_ERR(3, 475, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_XSLT); /* "src/lxml/xslt.pxi":484 @@ -256132,11 +238382,10 @@ if (!__Pyx_RefNanny) { * return self.__copy__() * */ - __Pyx_TraceLine(484,0,__PYX_ERR(3, 484, __pyx_L1_error)) - __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_4XSLT_15__deepcopy__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XSLT___deepcopy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__356)); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 484, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XSLT->tp_dict, __pyx_n_s_deepcopy, __pyx_t_13) < 0) __PYX_ERR(3, 484, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_14 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_4XSLT_15__deepcopy__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XSLT___deepcopy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__590)); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 484, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XSLT->tp_dict, __pyx_n_s_deepcopy, __pyx_t_14) < 0) __PYX_ERR(3, 484, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_XSLT); /* "src/lxml/xslt.pxi":487 @@ -256146,11 +238395,10 @@ if (!__Pyx_RefNanny) { * return _copyXSLT(self) * */ - __Pyx_TraceLine(487,0,__PYX_ERR(3, 487, __pyx_L1_error)) - __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_4XSLT_17__copy__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XSLT___copy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__357)); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 487, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XSLT->tp_dict, __pyx_n_s_copy_2, __pyx_t_13) < 0) __PYX_ERR(3, 487, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_14 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_4XSLT_17__copy__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XSLT___copy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__592)); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XSLT->tp_dict, __pyx_n_s_copy_2, __pyx_t_14) < 0) __PYX_ERR(3, 487, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_XSLT); /* "src/lxml/xslt.pxi":713 @@ -256160,11 +238408,10 @@ if (!__Pyx_RefNanny) { * """write_output(self, file, *, compression=0) * */ - __Pyx_TraceLine(713,0,__PYX_ERR(3, 713, __pyx_L1_error)) - __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_15_XSLTResultTree_1write_output, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XSLTResultTree_write_output, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__359)); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 713, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__XSLTResultTree->tp_dict, __pyx_n_s_write_output, __pyx_t_13) < 0) __PYX_ERR(3, 713, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_14 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_15_XSLTResultTree_1write_output, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XSLTResultTree_write_output, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__594)); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 713, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__XSLTResultTree->tp_dict, __pyx_n_s_write_output, __pyx_t_14) < 0) __PYX_ERR(3, 713, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__XSLTResultTree); /* "src/lxml/xslt.pxi":788 @@ -256174,11 +238421,10 @@ if (!__Pyx_RefNanny) { * cdef xmlChar* encoding * cdef xmlChar* s = NULL */ - __Pyx_TraceLine(788,0,__PYX_ERR(3, 788, __pyx_L1_error)) - __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_15_XSLTResultTree_5__unicode__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XSLTResultTree___unicode, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__361)); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 788, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__XSLTResultTree->tp_dict, __pyx_n_s_unicode_2, __pyx_t_13) < 0) __PYX_ERR(3, 788, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_14 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_15_XSLTResultTree_5__unicode__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XSLTResultTree___unicode, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__596)); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 788, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__XSLTResultTree->tp_dict, __pyx_n_s_unicode_2, __pyx_t_14) < 0) __PYX_ERR(3, 788, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__XSLTResultTree); /* "src/lxml/xslt.pxi":873 @@ -256188,7 +238434,6 @@ if (!__Pyx_RefNanny) { * * # enable EXSLT support for XSLT */ - __Pyx_TraceLine(873,0,__PYX_ERR(3, 873, __pyx_L1_error)) xsltRegisterAllExtras(); /* "src/lxml/xslt.pxi":876 @@ -256198,7 +238443,6 @@ if (!__Pyx_RefNanny) { * * */ - __Pyx_TraceLine(876,0,__PYX_ERR(3, 876, __pyx_L1_error)) exsltRegisterAll(); /* "src/lxml/xslt.pxi":882 @@ -256208,12 +238452,11 @@ if (!__Pyx_RefNanny) { * cdef object _FIND_PI_HREF = _RE_PI_HREF.findall * cdef object _REPLACE_PI_HREF = _RE_PI_HREF.sub */ - __Pyx_TraceLine(882,0,__PYX_ERR(3, 882, __pyx_L1_error)) - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_compile); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 882, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_tuple__675, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 882, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_compile); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 882, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_tuple__597, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 882, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XGOTREF(__pyx_v_4lxml_5etree__RE_PI_HREF); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree__RE_PI_HREF, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); @@ -256226,7 +238469,6 @@ if (!__Pyx_RefNanny) { * cdef object _REPLACE_PI_HREF = _RE_PI_HREF.sub * cdef XPath __findStylesheetByID = None */ - __Pyx_TraceLine(883,0,__PYX_ERR(3, 883, __pyx_L1_error)) __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree__RE_PI_HREF, __pyx_n_s_findall); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 883, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_v_4lxml_5etree__FIND_PI_HREF); @@ -256241,7 +238483,6 @@ if (!__Pyx_RefNanny) { * cdef XPath __findStylesheetByID = None * */ - __Pyx_TraceLine(884,0,__PYX_ERR(3, 884, __pyx_L1_error)) __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree__RE_PI_HREF, __pyx_n_s_sub); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_v_4lxml_5etree__REPLACE_PI_HREF); @@ -256256,7 +238497,6 @@ if (!__Pyx_RefNanny) { * * cdef _findStylesheetByID(_Document doc, id): */ - __Pyx_TraceLine(885,0,__PYX_ERR(3, 885, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_XGOTREF(((PyObject *)__pyx_v_4lxml_5etree___findStylesheetByID)); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree___findStylesheetByID, ((struct __pyx_obj_4lxml_5etree_XPath *)Py_None)); @@ -256269,8 +238509,7 @@ if (!__Pyx_RefNanny) { * u"""parseXSL(self, parser=None) * */ - __Pyx_TraceLine(896,0,__PYX_ERR(3, 896, __pyx_L1_error)) - __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_26_XSLTProcessingInstruction_1parseXSL, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XSLTProcessingInstruction_parse, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__363)); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 896, __pyx_L1_error) + __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_26_XSLTProcessingInstruction_1parseXSL, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XSLTProcessingInstruction_parse, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__599)); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__XSLTProcessingInstruction->tp_dict, __pyx_n_s_parseXSL, __pyx_t_15) < 0) __PYX_ERR(3, 896, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -256283,8 +238522,7 @@ if (!__Pyx_RefNanny) { * u"""set(self, key, value) * */ - __Pyx_TraceLine(953,0,__PYX_ERR(3, 953, __pyx_L1_error)) - __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_26_XSLTProcessingInstruction_3set, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XSLTProcessingInstruction_set, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__364)); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 953, __pyx_L1_error) + __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_26_XSLTProcessingInstruction_3set, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XSLTProcessingInstruction_set, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__601)); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__XSLTProcessingInstruction->tp_dict, __pyx_n_s_set, __pyx_t_15) < 0) __PYX_ERR(3, 953, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -256297,8 +238535,7 @@ if (!__Pyx_RefNanny) { * u"""execute(self, context, self_node, input_node, output_parent) * Execute this extension element. */ - __Pyx_TraceLine(6,0,__PYX_ERR(19, 6, __pyx_L1_error)) - __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13XSLTExtension_1execute, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XSLTExtension_execute, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__365)); if (unlikely(!__pyx_t_15)) __PYX_ERR(19, 6, __pyx_L1_error) + __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13XSLTExtension_1execute, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XSLTExtension_execute, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__603)); if (unlikely(!__pyx_t_15)) __PYX_ERR(19, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XSLTExtension->tp_dict, __pyx_n_s_execute, __pyx_t_15) < 0) __PYX_ERR(19, 6, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -256311,8 +238548,7 @@ if (!__Pyx_RefNanny) { * *, elements_only=False, remove_blank_text=False): * u"""apply_templates(self, context, node, output_parent=None, elements_only=False, remove_blank_text=False) */ - __Pyx_TraceLine(22,0,__PYX_ERR(19, 22, __pyx_L1_error)) - __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13XSLTExtension_3apply_templates, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XSLTExtension_apply_templates, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__366)); if (unlikely(!__pyx_t_15)) __PYX_ERR(19, 22, __pyx_L1_error) + __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13XSLTExtension_3apply_templates, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XSLTExtension_apply_templates, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__605)); if (unlikely(!__pyx_t_15)) __PYX_ERR(19, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XSLTExtension->tp_dict, __pyx_n_s_apply_templates, __pyx_t_15) < 0) __PYX_ERR(19, 22, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -256325,80 +238561,74 @@ if (!__Pyx_RefNanny) { * *, elements_only=False, remove_blank_text=False): * u"""process_children(self, context, output_parent=None, elements_only=False, remove_blank_text=False) */ - __Pyx_TraceLine(74,0,__PYX_ERR(19, 74, __pyx_L1_error)) - __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13XSLTExtension_5process_children, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XSLTExtension_process_children, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__367)); if (unlikely(!__pyx_t_15)) __PYX_ERR(19, 74, __pyx_L1_error) + __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13XSLTExtension_5process_children, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_XSLTExtension_process_children, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__607)); if (unlikely(!__pyx_t_15)) __PYX_ERR(19, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XSLTExtension->tp_dict, __pyx_n_s_process_children, __pyx_t_15) < 0) __PYX_ERR(19, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_XSLTExtension); - /* "lxml/etree.pyx":3517 + /* "lxml/etree.pyx":3511 * self._error_log = _ErrorLog() * * def validate(self, etree): # <<<<<<<<<<<<<< * u"""validate(self, etree) * */ - __Pyx_TraceLine(3517,0,__PYX_ERR(0, 3517, __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__369)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3517, __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, 3511, __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, 3517, __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, 3511, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Validator); - /* "lxml/etree.pyx":3526 + /* "lxml/etree.pyx":3520 * return self(etree) * * def assertValid(self, etree): # <<<<<<<<<<<<<< * u"""assertValid(self, etree) * */ - __Pyx_TraceLine(3526,0,__PYX_ERR(0, 3526, __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__370)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3526, __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, 3520, __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, 3526, __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, 3520, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Validator); - /* "lxml/etree.pyx":3536 + /* "lxml/etree.pyx":3530 * self._error_log) * * def assert_(self, etree): # <<<<<<<<<<<<<< * u"""assert_(self, etree) * */ - __Pyx_TraceLine(3536,0,__PYX_ERR(0, 3536, __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__371)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3536, __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, 3530, __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, 3536, __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, 3530, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Validator); - /* "lxml/etree.pyx":3545 + /* "lxml/etree.pyx":3539 * 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_TraceLine(3545,0,__PYX_ERR(0, 3545, __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__372)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3545, __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, 3539, __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, 3545, __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, 3539, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Validator); - /* "lxml/etree.pyx":3550 + /* "lxml/etree.pyx":3544 * filename) * * cpdef _clear_error_log(self): # <<<<<<<<<<<<<< * self._error_log.clear() * */ - __Pyx_TraceLine(3550,0,__PYX_ERR(0, 3550, __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__373)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3550, __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, 3544, __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, 3550, __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, 3544, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Validator); @@ -256409,8 +238639,7 @@ if (!__Pyx_RefNanny) { * _assertValidDTDNode(self, self._c_node) * cdef tree.xmlEnumeration *c_node = self._c_node.tree */ - __Pyx_TraceLine(163,0,__PYX_ERR(20, 163, __pyx_L1_error)) - __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17_DTDAttributeDecl_3itervalues, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DTDAttributeDecl_itervalues, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__374)); if (unlikely(!__pyx_t_15)) __PYX_ERR(20, 163, __pyx_L1_error) + __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17_DTDAttributeDecl_3itervalues, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DTDAttributeDecl_itervalues, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_15)) __PYX_ERR(20, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__DTDAttributeDecl->tp_dict, __pyx_n_s_itervalues, __pyx_t_15) < 0) __PYX_ERR(20, 163, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -256423,8 +238652,7 @@ if (!__Pyx_RefNanny) { * return list(self.itervalues()) * */ - __Pyx_TraceLine(170,0,__PYX_ERR(20, 170, __pyx_L1_error)) - __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17_DTDAttributeDecl_6values, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DTDAttributeDecl_values, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__375)); if (unlikely(!__pyx_t_15)) __PYX_ERR(20, 170, __pyx_L1_error) + __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17_DTDAttributeDecl_6values, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DTDAttributeDecl_values, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__620)); if (unlikely(!__pyx_t_15)) __PYX_ERR(20, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__DTDAttributeDecl->tp_dict, __pyx_n_s_values, __pyx_t_15) < 0) __PYX_ERR(20, 170, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -256437,8 +238665,7 @@ if (!__Pyx_RefNanny) { * _assertValidDTDNode(self, self._c_node) * cdef tree.xmlAttribute *c_node = self._c_node.attributes */ - __Pyx_TraceLine(223,0,__PYX_ERR(20, 223, __pyx_L1_error)) - __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_15_DTDElementDecl_3iterattributes, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DTDElementDecl_iterattributes, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__376)); if (unlikely(!__pyx_t_15)) __PYX_ERR(20, 223, __pyx_L1_error) + __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_15_DTDElementDecl_3iterattributes, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DTDElementDecl_iterattributes, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_15)) __PYX_ERR(20, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__DTDElementDecl->tp_dict, __pyx_n_s_iterattributes, __pyx_t_15) < 0) __PYX_ERR(20, 223, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -256451,8 +238678,7 @@ if (!__Pyx_RefNanny) { * return list(self.iterattributes()) * */ - __Pyx_TraceLine(233,0,__PYX_ERR(20, 233, __pyx_L1_error)) - __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_15_DTDElementDecl_6attributes, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DTDElementDecl_attributes, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__377)); if (unlikely(!__pyx_t_15)) __PYX_ERR(20, 233, __pyx_L1_error) + __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_15_DTDElementDecl_6attributes, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DTDElementDecl_attributes, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__623)); if (unlikely(!__pyx_t_15)) __PYX_ERR(20, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__DTDElementDecl->tp_dict, __pyx_n_s_attributes, __pyx_t_15) < 0) __PYX_ERR(20, 233, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -256465,8 +238691,7 @@ if (!__Pyx_RefNanny) { * cdef tree.xmlNode *c_node = self._c_dtd.children if self._c_dtd is not NULL else NULL * while c_node is not NULL: */ - __Pyx_TraceLine(314,0,__PYX_ERR(20, 314, __pyx_L1_error)) - __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_3DTD_3iterelements, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DTD_iterelements, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__380)); if (unlikely(!__pyx_t_15)) __PYX_ERR(20, 314, __pyx_L1_error) + __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_3DTD_3iterelements, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DTD_iterelements, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_15)) __PYX_ERR(20, 314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_DTD->tp_dict, __pyx_n_s_iterelements, __pyx_t_15) < 0) __PYX_ERR(20, 314, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -256479,8 +238704,7 @@ if (!__Pyx_RefNanny) { * return list(self.iterelements()) * */ - __Pyx_TraceLine(324,0,__PYX_ERR(20, 324, __pyx_L1_error)) - __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_3DTD_6elements, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DTD_elements, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__381)); if (unlikely(!__pyx_t_15)) __PYX_ERR(20, 324, __pyx_L1_error) + __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_3DTD_6elements, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DTD_elements, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__626)); if (unlikely(!__pyx_t_15)) __PYX_ERR(20, 324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_DTD->tp_dict, __pyx_n_s_elements, __pyx_t_15) < 0) __PYX_ERR(20, 324, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -256493,8 +238717,7 @@ if (!__Pyx_RefNanny) { * cdef tree.xmlNode *c_node = self._c_dtd.children if self._c_dtd is not NULL else NULL * while c_node is not NULL: */ - __Pyx_TraceLine(327,0,__PYX_ERR(20, 327, __pyx_L1_error)) - __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_3DTD_8iterentities, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DTD_iterentities, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__382)); if (unlikely(!__pyx_t_15)) __PYX_ERR(20, 327, __pyx_L1_error) + __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_3DTD_8iterentities, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DTD_iterentities, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_15)) __PYX_ERR(20, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_DTD->tp_dict, __pyx_n_s_iterentities, __pyx_t_15) < 0) __PYX_ERR(20, 327, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -256507,8 +238730,7 @@ if (!__Pyx_RefNanny) { * return list(self.iterentities()) * */ - __Pyx_TraceLine(337,0,__PYX_ERR(20, 337, __pyx_L1_error)) - __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_3DTD_11entities, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DTD_entities, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__383)); if (unlikely(!__pyx_t_15)) __PYX_ERR(20, 337, __pyx_L1_error) + __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_3DTD_11entities, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DTD_entities, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__629)); if (unlikely(!__pyx_t_15)) __PYX_ERR(20, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_DTD->tp_dict, __pyx_n_s_entities, __pyx_t_15) < 0) __PYX_ERR(20, 337, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -256521,14 +238743,13 @@ if (!__Pyx_RefNanny) { * import rnc2rng as _rnc2rng * except ImportError: */ - __Pyx_TraceLine(5,0,__PYX_ERR(21, 5, __pyx_L36_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); - __Pyx_XGOTREF(__pyx_t_3); - __Pyx_XGOTREF(__pyx_t_4); + __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "src/lxml/relaxng.pxi":6 @@ -256538,8 +238759,7 @@ if (!__Pyx_RefNanny) { * except ImportError: * _rnc2rng = None */ - __Pyx_TraceLine(6,0,__PYX_ERR(21, 6, __pyx_L36_error)) - __pyx_t_15 = __Pyx_Import(__pyx_n_s_rnc2rng, 0, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(21, 6, __pyx_L36_error) + __pyx_t_15 = __Pyx_Import(__pyx_n_s_rnc2rng, 0, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(21, 6, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_v_4lxml_5etree__rnc2rng); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree__rnc2rng, __pyx_t_15); @@ -256554,19 +238774,19 @@ if (!__Pyx_RefNanny) { * except ImportError: */ } - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - goto __pyx_L41_try_end; - __pyx_L36_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L35_try_end; + __pyx_L30_error:; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; /* "src/lxml/relaxng.pxi":7 @@ -256576,13 +238796,12 @@ if (!__Pyx_RefNanny) { * _rnc2rng = None * */ - __Pyx_TraceLine(7,0,__PYX_ERR(21, 7, __pyx_L38_except_error)) __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_6) { __Pyx_AddTraceback("lxml.etree", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_15, &__pyx_t_13, &__pyx_t_2) < 0) __PYX_ERR(21, 7, __pyx_L38_except_error) + if (__Pyx_GetException(&__pyx_t_15, &__pyx_t_14, &__pyx_t_2) < 0) __PYX_ERR(21, 7, __pyx_L32_except_error) __Pyx_GOTREF(__pyx_t_15); - __Pyx_GOTREF(__pyx_t_13); + __Pyx_GOTREF(__pyx_t_14); __Pyx_GOTREF(__pyx_t_2); /* "src/lxml/relaxng.pxi":8 @@ -256592,18 +238811,17 @@ if (!__Pyx_RefNanny) { * * */ - __Pyx_TraceLine(8,0,__PYX_ERR(21, 8, __pyx_L38_except_error)) __Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_4lxml_5etree__rnc2rng); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree__rnc2rng, Py_None); __Pyx_GIVEREF(Py_None); - __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - goto __pyx_L37_exception_handled; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L31_exception_handled; } - goto __pyx_L38_except_error; - __pyx_L38_except_error:; + goto __pyx_L32_except_error; + __pyx_L32_except_error:; /* "src/lxml/relaxng.pxi":5 * @@ -256612,17 +238830,17 @@ if (!__Pyx_RefNanny) { * import rnc2rng as _rnc2rng * except ImportError: */ - __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); - __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); - goto __pyx_L1_error; - __pyx_L37_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L31_exception_handled:; __Pyx_XGIVEREF(__pyx_t_5); - __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); - __pyx_L41_try_end:; + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3); + __pyx_L35_try_end:; } /* "src/lxml/relaxng.pxi":154 @@ -256632,8 +238850,7 @@ if (!__Pyx_RefNanny) { * """Parse a RelaxNG schema in compact syntax from a text string * */ - __Pyx_TraceLine(154,0,__PYX_ERR(21, 154, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7RelaxNG_9from_rnc_string, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RelaxNG_from_rnc_string, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__391)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 154, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7RelaxNG_9from_rnc_string, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RelaxNG_from_rnc_string, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__631)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_RelaxNG->tp_dict, __pyx_n_s_from_rnc_string, __pyx_t_2) < 0) __PYX_ERR(21, 154, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -256646,14 +238863,13 @@ if (!__Pyx_RefNanny) { * def from_rnc_string(cls, src, base_url=None): * """Parse a RelaxNG schema in compact syntax from a text string */ - __Pyx_TraceLine(153,0,__PYX_ERR(21, 153, __pyx_L1_error)) - __pyx_t_2 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_4lxml_5etree_RelaxNG, __pyx_n_s_from_rnc_string); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 154, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_4lxml_5etree_RelaxNG, __pyx_n_s_from_rnc_string); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_13 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(21, 153, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); + __pyx_t_14 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(21, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_RelaxNG->tp_dict, __pyx_n_s_from_rnc_string, __pyx_t_13) < 0) __PYX_ERR(21, 154, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_RelaxNG->tp_dict, __pyx_n_s_from_rnc_string, __pyx_t_14) < 0) __PYX_ERR(21, 154, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_RelaxNG); /* "src/lxml/xmlschema.pxi":23 @@ -256663,13 +238879,12 @@ if (!__Pyx_RefNanny) { * * */ - __Pyx_TraceLine(23,0,__PYX_ERR(22, 23, __pyx_L1_error)) - __pyx_t_13 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(22, 23, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); + __pyx_t_14 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(22, 23, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_xs, __pyx_kp_u_http_www_w3_org_2001_XMLSchema) < 0) __PYX_ERR(22, 23, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_namespaces, __pyx_t_2) < 0) __PYX_ERR(22, 23, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_namespaces, __pyx_t_2) < 0) __PYX_ERR(22, 23, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/lxml/xmlschema.pxi":21 @@ -256679,10 +238894,9 @@ if (!__Pyx_RefNanny) { * u"boolean(//xs:attribute[@default or @fixed][1])", * namespaces={u'xs': u'http://www.w3.org/2001/XMLSchema'}) */ - __Pyx_TraceLine(21,0,__PYX_ERR(22, 21, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_XPath), __pyx_tuple__695, __pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 21, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_XPath), __pyx_tuple__632, __pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XGOTREF(((PyObject *)__pyx_v_4lxml_5etree__check_for_default_attributes)); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree__check_for_default_attributes, ((struct __pyx_obj_4lxml_5etree_XPath *)__pyx_t_2)); __Pyx_GIVEREF(__pyx_t_2); @@ -256695,8 +238909,7 @@ if (!__Pyx_RefNanny) { * """bytes_used(self) * */ - __Pyx_TraceLine(7,0,__PYX_ERR(25, 7, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_9_MemDebug_1bytes_used, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MemDebug_bytes_used, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__394)); if (unlikely(!__pyx_t_2)) __PYX_ERR(25, 7, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_9_MemDebug_1bytes_used, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MemDebug_bytes_used, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__634)); if (unlikely(!__pyx_t_2)) __PYX_ERR(25, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__MemDebug->tp_dict, __pyx_n_s_bytes_used, __pyx_t_2) < 0) __PYX_ERR(25, 7, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -256709,8 +238922,7 @@ if (!__Pyx_RefNanny) { * """blocks_used(self) * */ - __Pyx_TraceLine(16,0,__PYX_ERR(25, 16, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_9_MemDebug_3blocks_used, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MemDebug_blocks_used, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__395)); if (unlikely(!__pyx_t_2)) __PYX_ERR(25, 16, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_9_MemDebug_3blocks_used, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MemDebug_blocks_used, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__636)); if (unlikely(!__pyx_t_2)) __PYX_ERR(25, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__MemDebug->tp_dict, __pyx_n_s_blocks_used, __pyx_t_2) < 0) __PYX_ERR(25, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -256723,8 +238935,7 @@ if (!__Pyx_RefNanny) { * """dict_size(self) * */ - __Pyx_TraceLine(25,0,__PYX_ERR(25, 25, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_9_MemDebug_5dict_size, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MemDebug_dict_size, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__396)); if (unlikely(!__pyx_t_2)) __PYX_ERR(25, 25, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_9_MemDebug_5dict_size, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MemDebug_dict_size, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__638)); if (unlikely(!__pyx_t_2)) __PYX_ERR(25, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__MemDebug->tp_dict, __pyx_n_s_dict_size, __pyx_t_2) < 0) __PYX_ERR(25, 25, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -256737,8 +238948,7 @@ if (!__Pyx_RefNanny) { * """dump(self, output_file=None, byte_count=None) * */ - __Pyx_TraceLine(36,0,__PYX_ERR(25, 36, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_9_MemDebug_7dump, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MemDebug_dump, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__397)); if (unlikely(!__pyx_t_2)) __PYX_ERR(25, 36, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_9_MemDebug_7dump, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MemDebug_dump, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__640)); if (unlikely(!__pyx_t_2)) __PYX_ERR(25, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__MemDebug->tp_dict, __pyx_n_s_dump, __pyx_t_2) < 0) __PYX_ERR(25, 36, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -256751,8 +238961,7 @@ if (!__Pyx_RefNanny) { * """show(self, output_file=None, block_count=None) * */ - __Pyx_TraceLine(66,0,__PYX_ERR(25, 66, __pyx_L1_error)) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_9_MemDebug_9show, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MemDebug_show, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__398)); if (unlikely(!__pyx_t_2)) __PYX_ERR(25, 66, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_9_MemDebug_9show, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MemDebug_show, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__642)); if (unlikely(!__pyx_t_2)) __PYX_ERR(25, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__MemDebug->tp_dict, __pyx_n_s_show, __pyx_t_2) < 0) __PYX_ERR(25, 66, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -256763,7 +238972,6 @@ if (!__Pyx_RefNanny) { * * memory_debugger = _MemDebug() # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(91,0,__PYX_ERR(25, 91, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__MemDebug)); if (unlikely(!__pyx_t_2)) __PYX_ERR(25, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_memory_debugger, __pyx_t_2) < 0) __PYX_ERR(25, 91, __pyx_L1_error) @@ -256772,16 +238980,14 @@ if (!__Pyx_RefNanny) { /* "lxml/etree.pyx":1 * # cython: binding=True # <<<<<<<<<<<<<< * # cython: auto_pickle=False - * + * # cython: language_level=2 */ - __Pyx_TraceLine(1,0,__PYX_ERR(0, 1, __pyx_L1_error)) __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_3167, __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_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_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; - __Pyx_TraceReturn(Py_None, 0); /*--- Wrapped vars code ---*/ @@ -256799,9 +239005,9 @@ if (!__Pyx_RefNanny) { __Pyx_XDECREF(__pyx_t_15); if (__pyx_m) { if (__pyx_d) { - __Pyx_AddTraceback("init lxml.etree", 0, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("init lxml.etree", __pyx_clineno, __pyx_lineno, __pyx_filename); } - Py_DECREF(__pyx_m); __pyx_m = 0; + Py_CLEAR(__pyx_m); } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init lxml.etree"); } @@ -256816,675 +239022,617 @@ if (!__Pyx_RefNanny) { #endif } -static void __Pyx_CleanupGlobals(void) { - Py_CLEAR(__pyx_codeobj_); - Py_CLEAR(__pyx_codeobj__2); - Py_CLEAR(__pyx_codeobj__3); - Py_CLEAR(__pyx_codeobj__4); - Py_CLEAR(__pyx_codeobj__5); - Py_CLEAR(__pyx_codeobj__6); - Py_CLEAR(__pyx_codeobj__7); - Py_CLEAR(__pyx_tuple__8); +static CYTHON_SMALL_CODE void __Pyx_CleanupGlobals(void) { + Py_CLEAR(__pyx_tuple_); + Py_CLEAR(__pyx_tuple__4); + Py_CLEAR(__pyx_slice__5); + Py_CLEAR(__pyx_slice__6); + Py_CLEAR(__pyx_slice__7); + Py_CLEAR(__pyx_slice__8); Py_CLEAR(__pyx_tuple__9); Py_CLEAR(__pyx_tuple__12); Py_CLEAR(__pyx_tuple__13); - Py_CLEAR(__pyx_slice__14); + Py_CLEAR(__pyx_tuple__14); Py_CLEAR(__pyx_tuple__15); - Py_CLEAR(__pyx_slice__16); - Py_CLEAR(__pyx_tuple__17); - Py_CLEAR(__pyx_slice__18); Py_CLEAR(__pyx_tuple__19); - Py_CLEAR(__pyx_slice__20); - Py_CLEAR(__pyx_tuple__21); - Py_CLEAR(__pyx_tuple__24); - Py_CLEAR(__pyx_tuple__25); - Py_CLEAR(__pyx_tuple__26); + Py_CLEAR(__pyx_tuple__23); Py_CLEAR(__pyx_tuple__27); - Py_CLEAR(__pyx_tuple__28); - Py_CLEAR(__pyx_tuple__29); - Py_CLEAR(__pyx_tuple__30); - Py_CLEAR(__pyx_codeobj__32); - Py_CLEAR(__pyx_codeobj__34); - Py_CLEAR(__pyx_codeobj__35); - Py_CLEAR(__pyx_codeobj__36); - Py_CLEAR(__pyx_codeobj__38); - Py_CLEAR(__pyx_codeobj__39); - Py_CLEAR(__pyx_codeobj__40); - Py_CLEAR(__pyx_codeobj__41); - Py_CLEAR(__pyx_codeobj__42); - Py_CLEAR(__pyx_codeobj__43); - Py_CLEAR(__pyx_codeobj__44); - Py_CLEAR(__pyx_codeobj__45); - Py_CLEAR(__pyx_codeobj__46); - Py_CLEAR(__pyx_codeobj__47); - Py_CLEAR(__pyx_codeobj__48); - Py_CLEAR(__pyx_codeobj__49); - Py_CLEAR(__pyx_codeobj__50); - Py_CLEAR(__pyx_codeobj__51); - Py_CLEAR(__pyx_codeobj__52); - Py_CLEAR(__pyx_codeobj__53); + Py_CLEAR(__pyx_tuple__32); + Py_CLEAR(__pyx_tuple__33); + Py_CLEAR(__pyx_tuple__34); + Py_CLEAR(__pyx_tuple__35); + Py_CLEAR(__pyx_slice__39); + Py_CLEAR(__pyx_tuple__42); + Py_CLEAR(__pyx_tuple__43); + Py_CLEAR(__pyx_tuple__45); + Py_CLEAR(__pyx_tuple__48); + Py_CLEAR(__pyx_tuple__49); + Py_CLEAR(__pyx_slice__50); + Py_CLEAR(__pyx_tuple__53); Py_CLEAR(__pyx_tuple__54); - Py_CLEAR(__pyx_codeobj__55); - Py_CLEAR(__pyx_tuple__57); - Py_CLEAR(__pyx_codeobj__58); + Py_CLEAR(__pyx_tuple__56); + Py_CLEAR(__pyx_codeobj__57); + Py_CLEAR(__pyx_tuple__58); Py_CLEAR(__pyx_tuple__59); - Py_CLEAR(__pyx_tuple__62); + Py_CLEAR(__pyx_codeobj__60); + Py_CLEAR(__pyx_slice__61); + Py_CLEAR(__pyx_slice__62); + Py_CLEAR(__pyx_codeobj__63); + Py_CLEAR(__pyx_codeobj__64); + Py_CLEAR(__pyx_codeobj__65); Py_CLEAR(__pyx_codeobj__66); Py_CLEAR(__pyx_codeobj__67); Py_CLEAR(__pyx_codeobj__68); Py_CLEAR(__pyx_codeobj__69); Py_CLEAR(__pyx_codeobj__70); Py_CLEAR(__pyx_codeobj__71); - Py_CLEAR(__pyx_codeobj__72); - Py_CLEAR(__pyx_codeobj__73); - Py_CLEAR(__pyx_codeobj__74); - Py_CLEAR(__pyx_codeobj__75); - Py_CLEAR(__pyx_codeobj__76); - Py_CLEAR(__pyx_codeobj__77); - Py_CLEAR(__pyx_tuple__78); - Py_CLEAR(__pyx_codeobj__79); - Py_CLEAR(__pyx_codeobj__80); - Py_CLEAR(__pyx_codeobj__81); + Py_CLEAR(__pyx_tuple__72); + Py_CLEAR(__pyx_tuple__73); + Py_CLEAR(__pyx_tuple__74); + Py_CLEAR(__pyx_tuple__75); + Py_CLEAR(__pyx_slice__76); + Py_CLEAR(__pyx_slice__77); + Py_CLEAR(__pyx_tuple__80); + Py_CLEAR(__pyx_tuple__81); Py_CLEAR(__pyx_codeobj__82); Py_CLEAR(__pyx_codeobj__83); Py_CLEAR(__pyx_codeobj__84); Py_CLEAR(__pyx_codeobj__85); - Py_CLEAR(__pyx_codeobj__86); - Py_CLEAR(__pyx_codeobj__87); - Py_CLEAR(__pyx_codeobj__88); - Py_CLEAR(__pyx_codeobj__89); + Py_CLEAR(__pyx_tuple__86); + Py_CLEAR(__pyx_tuple__87); + Py_CLEAR(__pyx_slice__88); + Py_CLEAR(__pyx_tuple__89); Py_CLEAR(__pyx_codeobj__90); - Py_CLEAR(__pyx_codeobj__91); + Py_CLEAR(__pyx_tuple__91); Py_CLEAR(__pyx_codeobj__92); - Py_CLEAR(__pyx_codeobj__93); + Py_CLEAR(__pyx_tuple__93); Py_CLEAR(__pyx_codeobj__94); - Py_CLEAR(__pyx_codeobj__95); + Py_CLEAR(__pyx_tuple__95); Py_CLEAR(__pyx_codeobj__96); - Py_CLEAR(__pyx_codeobj__97); + Py_CLEAR(__pyx_tuple__97); Py_CLEAR(__pyx_codeobj__98); - Py_CLEAR(__pyx_codeobj__99); + Py_CLEAR(__pyx_tuple__99); Py_CLEAR(__pyx_codeobj__100); - Py_CLEAR(__pyx_codeobj__101); - Py_CLEAR(__pyx_codeobj__102); - Py_CLEAR(__pyx_codeobj__103); + Py_CLEAR(__pyx_tuple__101); + Py_CLEAR(__pyx_tuple__102); + Py_CLEAR(__pyx_tuple__103); Py_CLEAR(__pyx_codeobj__104); - Py_CLEAR(__pyx_codeobj__105); + Py_CLEAR(__pyx_tuple__105); Py_CLEAR(__pyx_codeobj__106); - Py_CLEAR(__pyx_codeobj__107); + Py_CLEAR(__pyx_tuple__107); Py_CLEAR(__pyx_codeobj__108); - Py_CLEAR(__pyx_codeobj__109); + Py_CLEAR(__pyx_tuple__109); Py_CLEAR(__pyx_codeobj__110); - Py_CLEAR(__pyx_codeobj__111); + Py_CLEAR(__pyx_tuple__111); + Py_CLEAR(__pyx_codeobj__112); + Py_CLEAR(__pyx_tuple__113); + Py_CLEAR(__pyx_codeobj__114); + Py_CLEAR(__pyx_tuple__115); Py_CLEAR(__pyx_codeobj__116); - Py_CLEAR(__pyx_codeobj__117); + Py_CLEAR(__pyx_tuple__117); Py_CLEAR(__pyx_codeobj__118); - Py_CLEAR(__pyx_codeobj__119); + Py_CLEAR(__pyx_tuple__119); Py_CLEAR(__pyx_codeobj__120); - Py_CLEAR(__pyx_codeobj__121); - Py_CLEAR(__pyx_tuple__122); + Py_CLEAR(__pyx_tuple__121); + Py_CLEAR(__pyx_codeobj__122); Py_CLEAR(__pyx_tuple__123); - Py_CLEAR(__pyx_tuple__124); + Py_CLEAR(__pyx_codeobj__124); Py_CLEAR(__pyx_tuple__125); Py_CLEAR(__pyx_codeobj__126); - Py_CLEAR(__pyx_codeobj__127); - Py_CLEAR(__pyx_codeobj__131); + Py_CLEAR(__pyx_tuple__127); + Py_CLEAR(__pyx_codeobj__128); + Py_CLEAR(__pyx_tuple__129); + Py_CLEAR(__pyx_codeobj__130); + Py_CLEAR(__pyx_tuple__131); Py_CLEAR(__pyx_codeobj__132); - Py_CLEAR(__pyx_codeobj__133); - Py_CLEAR(__pyx_slice__134); - Py_CLEAR(__pyx_codeobj__135); - Py_CLEAR(__pyx_slice__136); - Py_CLEAR(__pyx_codeobj__137); - Py_CLEAR(__pyx_slice__138); - Py_CLEAR(__pyx_codeobj__139); - Py_CLEAR(__pyx_slice__140); - Py_CLEAR(__pyx_codeobj__141); + Py_CLEAR(__pyx_tuple__133); + Py_CLEAR(__pyx_codeobj__134); + Py_CLEAR(__pyx_tuple__135); + Py_CLEAR(__pyx_codeobj__136); + Py_CLEAR(__pyx_tuple__137); + Py_CLEAR(__pyx_codeobj__138); + Py_CLEAR(__pyx_tuple__139); + Py_CLEAR(__pyx_codeobj__140); + Py_CLEAR(__pyx_tuple__141); Py_CLEAR(__pyx_codeobj__142); - Py_CLEAR(__pyx_codeobj__143); + Py_CLEAR(__pyx_tuple__143); Py_CLEAR(__pyx_codeobj__144); - Py_CLEAR(__pyx_codeobj__145); + Py_CLEAR(__pyx_tuple__145); Py_CLEAR(__pyx_codeobj__146); - Py_CLEAR(__pyx_codeobj__147); - Py_CLEAR(__pyx_codeobj__148); - Py_CLEAR(__pyx_codeobj__149); - Py_CLEAR(__pyx_codeobj__150); - Py_CLEAR(__pyx_codeobj__151); - Py_CLEAR(__pyx_codeobj__152); + Py_CLEAR(__pyx_tuple__147); + Py_CLEAR(__pyx_tuple__148); + Py_CLEAR(__pyx_tuple__149); + Py_CLEAR(__pyx_tuple__150); + Py_CLEAR(__pyx_tuple__151); + Py_CLEAR(__pyx_tuple__152); Py_CLEAR(__pyx_codeobj__153); - Py_CLEAR(__pyx_codeobj__154); + Py_CLEAR(__pyx_tuple__154); Py_CLEAR(__pyx_codeobj__155); - Py_CLEAR(__pyx_codeobj__156); + Py_CLEAR(__pyx_tuple__156); Py_CLEAR(__pyx_codeobj__157); - Py_CLEAR(__pyx_codeobj__158); + Py_CLEAR(__pyx_tuple__158); Py_CLEAR(__pyx_codeobj__159); + Py_CLEAR(__pyx_tuple__160); + Py_CLEAR(__pyx_codeobj__161); Py_CLEAR(__pyx_tuple__162); - Py_CLEAR(__pyx_tuple__163); - Py_CLEAR(__pyx_codeobj__164); + Py_CLEAR(__pyx_codeobj__163); + Py_CLEAR(__pyx_tuple__164); Py_CLEAR(__pyx_codeobj__165); - Py_CLEAR(__pyx_tuple__167); + Py_CLEAR(__pyx_tuple__166); + Py_CLEAR(__pyx_codeobj__167); Py_CLEAR(__pyx_tuple__168); Py_CLEAR(__pyx_codeobj__169); - Py_CLEAR(__pyx_codeobj__172); + Py_CLEAR(__pyx_tuple__170); + Py_CLEAR(__pyx_codeobj__171); + Py_CLEAR(__pyx_tuple__172); Py_CLEAR(__pyx_codeobj__173); - Py_CLEAR(__pyx_codeobj__174); + Py_CLEAR(__pyx_tuple__174); Py_CLEAR(__pyx_codeobj__175); - Py_CLEAR(__pyx_codeobj__176); + Py_CLEAR(__pyx_tuple__176); Py_CLEAR(__pyx_codeobj__177); - Py_CLEAR(__pyx_codeobj__178); - Py_CLEAR(__pyx_tuple__179); - Py_CLEAR(__pyx_codeobj__180); + Py_CLEAR(__pyx_tuple__178); + Py_CLEAR(__pyx_codeobj__179); + Py_CLEAR(__pyx_tuple__180); Py_CLEAR(__pyx_codeobj__181); - Py_CLEAR(__pyx_codeobj__182); - Py_CLEAR(__pyx_tuple__183); + Py_CLEAR(__pyx_tuple__182); + Py_CLEAR(__pyx_codeobj__183); Py_CLEAR(__pyx_tuple__184); - Py_CLEAR(__pyx_tuple__185); - Py_CLEAR(__pyx_codeobj__186); + Py_CLEAR(__pyx_codeobj__185); + Py_CLEAR(__pyx_tuple__186); Py_CLEAR(__pyx_codeobj__187); - Py_CLEAR(__pyx_codeobj__188); + Py_CLEAR(__pyx_tuple__188); Py_CLEAR(__pyx_codeobj__189); Py_CLEAR(__pyx_tuple__190); - Py_CLEAR(__pyx_tuple__191); - Py_CLEAR(__pyx_codeobj__192); + Py_CLEAR(__pyx_codeobj__191); + Py_CLEAR(__pyx_tuple__192); Py_CLEAR(__pyx_codeobj__193); - Py_CLEAR(__pyx_codeobj__194); - Py_CLEAR(__pyx_slice__195); - Py_CLEAR(__pyx_codeobj__196); + Py_CLEAR(__pyx_tuple__194); + Py_CLEAR(__pyx_codeobj__195); + Py_CLEAR(__pyx_tuple__196); Py_CLEAR(__pyx_codeobj__197); - Py_CLEAR(__pyx_codeobj__198); + Py_CLEAR(__pyx_tuple__198); Py_CLEAR(__pyx_codeobj__199); - Py_CLEAR(__pyx_codeobj__200); + Py_CLEAR(__pyx_tuple__200); Py_CLEAR(__pyx_codeobj__201); - Py_CLEAR(__pyx_codeobj__202); + Py_CLEAR(__pyx_tuple__202); Py_CLEAR(__pyx_codeobj__203); - Py_CLEAR(__pyx_codeobj__204); + Py_CLEAR(__pyx_tuple__204); Py_CLEAR(__pyx_codeobj__205); - Py_CLEAR(__pyx_codeobj__206); + Py_CLEAR(__pyx_tuple__206); Py_CLEAR(__pyx_codeobj__207); - Py_CLEAR(__pyx_codeobj__208); + Py_CLEAR(__pyx_tuple__208); Py_CLEAR(__pyx_codeobj__209); - Py_CLEAR(__pyx_codeobj__210); + Py_CLEAR(__pyx_tuple__210); Py_CLEAR(__pyx_codeobj__211); - Py_CLEAR(__pyx_codeobj__212); - Py_CLEAR(__pyx_slice__213); + Py_CLEAR(__pyx_tuple__212); + Py_CLEAR(__pyx_codeobj__213); + Py_CLEAR(__pyx_tuple__214); Py_CLEAR(__pyx_codeobj__215); - Py_CLEAR(__pyx_codeobj__216); + Py_CLEAR(__pyx_tuple__216); Py_CLEAR(__pyx_codeobj__217); - Py_CLEAR(__pyx_codeobj__218); + Py_CLEAR(__pyx_tuple__218); Py_CLEAR(__pyx_codeobj__219); - Py_CLEAR(__pyx_codeobj__220); + Py_CLEAR(__pyx_tuple__220); Py_CLEAR(__pyx_codeobj__221); - Py_CLEAR(__pyx_codeobj__222); + Py_CLEAR(__pyx_tuple__222); Py_CLEAR(__pyx_codeobj__223); - Py_CLEAR(__pyx_codeobj__224); + Py_CLEAR(__pyx_tuple__224); Py_CLEAR(__pyx_codeobj__225); - Py_CLEAR(__pyx_codeobj__226); + Py_CLEAR(__pyx_tuple__226); Py_CLEAR(__pyx_codeobj__227); - Py_CLEAR(__pyx_codeobj__228); + Py_CLEAR(__pyx_tuple__228); Py_CLEAR(__pyx_codeobj__229); - Py_CLEAR(__pyx_codeobj__230); + Py_CLEAR(__pyx_tuple__230); Py_CLEAR(__pyx_codeobj__231); - Py_CLEAR(__pyx_codeobj__232); - Py_CLEAR(__pyx_tuple__233); + Py_CLEAR(__pyx_tuple__232); + Py_CLEAR(__pyx_codeobj__233); + Py_CLEAR(__pyx_tuple__234); Py_CLEAR(__pyx_codeobj__235); - Py_CLEAR(__pyx_codeobj__236); + Py_CLEAR(__pyx_tuple__236); Py_CLEAR(__pyx_codeobj__237); - Py_CLEAR(__pyx_codeobj__238); + Py_CLEAR(__pyx_tuple__238); Py_CLEAR(__pyx_codeobj__239); - Py_CLEAR(__pyx_codeobj__240); - Py_CLEAR(__pyx_tuple__241); - Py_CLEAR(__pyx_codeobj__242); + Py_CLEAR(__pyx_tuple__240); + Py_CLEAR(__pyx_codeobj__241); + Py_CLEAR(__pyx_tuple__242); Py_CLEAR(__pyx_codeobj__243); - Py_CLEAR(__pyx_codeobj__244); - Py_CLEAR(__pyx_tuple__245); - Py_CLEAR(__pyx_codeobj__246); - Py_CLEAR(__pyx_tuple__247); - Py_CLEAR(__pyx_codeobj__248); + Py_CLEAR(__pyx_tuple__244); + Py_CLEAR(__pyx_codeobj__245); + Py_CLEAR(__pyx_tuple__246); + Py_CLEAR(__pyx_codeobj__247); + Py_CLEAR(__pyx_tuple__248); Py_CLEAR(__pyx_codeobj__249); - Py_CLEAR(__pyx_codeobj__250); + Py_CLEAR(__pyx_tuple__250); Py_CLEAR(__pyx_codeobj__251); + Py_CLEAR(__pyx_tuple__252); Py_CLEAR(__pyx_codeobj__253); - Py_CLEAR(__pyx_codeobj__254); + Py_CLEAR(__pyx_tuple__254); Py_CLEAR(__pyx_codeobj__255); Py_CLEAR(__pyx_tuple__256); - Py_CLEAR(__pyx_tuple__257); - Py_CLEAR(__pyx_codeobj__258); + Py_CLEAR(__pyx_codeobj__257); + Py_CLEAR(__pyx_tuple__258); Py_CLEAR(__pyx_codeobj__259); - Py_CLEAR(__pyx_codeobj__260); - Py_CLEAR(__pyx_tuple__261); + Py_CLEAR(__pyx_tuple__260); + Py_CLEAR(__pyx_codeobj__261); Py_CLEAR(__pyx_tuple__262); Py_CLEAR(__pyx_codeobj__263); - Py_CLEAR(__pyx_codeobj__264); - Py_CLEAR(__pyx_tuple__265); + Py_CLEAR(__pyx_tuple__264); + Py_CLEAR(__pyx_codeobj__265); Py_CLEAR(__pyx_tuple__266); Py_CLEAR(__pyx_codeobj__267); Py_CLEAR(__pyx_tuple__268); Py_CLEAR(__pyx_codeobj__269); - Py_CLEAR(__pyx_codeobj__270); - Py_CLEAR(__pyx_tuple__271); + Py_CLEAR(__pyx_tuple__270); + Py_CLEAR(__pyx_codeobj__271); Py_CLEAR(__pyx_tuple__272); - Py_CLEAR(__pyx_slice__273); - Py_CLEAR(__pyx_slice__274); - Py_CLEAR(__pyx_tuple__275); - Py_CLEAR(__pyx_slice__276); + Py_CLEAR(__pyx_codeobj__273); + Py_CLEAR(__pyx_tuple__274); + Py_CLEAR(__pyx_codeobj__275); + Py_CLEAR(__pyx_tuple__276); Py_CLEAR(__pyx_codeobj__277); Py_CLEAR(__pyx_tuple__278); - Py_CLEAR(__pyx_tuple__279); - Py_CLEAR(__pyx_codeobj__280); - Py_CLEAR(__pyx_tuple__281); + Py_CLEAR(__pyx_codeobj__279); + Py_CLEAR(__pyx_tuple__280); + Py_CLEAR(__pyx_codeobj__281); Py_CLEAR(__pyx_tuple__282); Py_CLEAR(__pyx_codeobj__283); - Py_CLEAR(__pyx_codeobj__284); + Py_CLEAR(__pyx_tuple__284); Py_CLEAR(__pyx_codeobj__285); - Py_CLEAR(__pyx_codeobj__286); + Py_CLEAR(__pyx_tuple__286); Py_CLEAR(__pyx_codeobj__287); - Py_CLEAR(__pyx_codeobj__288); + Py_CLEAR(__pyx_tuple__288); Py_CLEAR(__pyx_codeobj__289); - Py_CLEAR(__pyx_codeobj__290); + Py_CLEAR(__pyx_tuple__290); Py_CLEAR(__pyx_codeobj__291); - Py_CLEAR(__pyx_codeobj__292); + Py_CLEAR(__pyx_tuple__292); Py_CLEAR(__pyx_codeobj__293); - Py_CLEAR(__pyx_codeobj__294); + Py_CLEAR(__pyx_tuple__294); Py_CLEAR(__pyx_codeobj__295); - Py_CLEAR(__pyx_codeobj__296); - Py_CLEAR(__pyx_tuple__297); - Py_CLEAR(__pyx_codeobj__298); - Py_CLEAR(__pyx_tuple__299); + Py_CLEAR(__pyx_tuple__296); + Py_CLEAR(__pyx_codeobj__297); + Py_CLEAR(__pyx_tuple__298); + Py_CLEAR(__pyx_codeobj__299); Py_CLEAR(__pyx_tuple__300); Py_CLEAR(__pyx_codeobj__301); - Py_CLEAR(__pyx_codeobj__302); - Py_CLEAR(__pyx_tuple__303); - Py_CLEAR(__pyx_codeobj__304); + Py_CLEAR(__pyx_tuple__302); + Py_CLEAR(__pyx_codeobj__303); + Py_CLEAR(__pyx_tuple__304); Py_CLEAR(__pyx_codeobj__305); Py_CLEAR(__pyx_tuple__306); - Py_CLEAR(__pyx_tuple__307); + Py_CLEAR(__pyx_codeobj__307); Py_CLEAR(__pyx_tuple__308); - Py_CLEAR(__pyx_tuple__309); - Py_CLEAR(__pyx_codeobj__310); - Py_CLEAR(__pyx_tuple__311); - Py_CLEAR(__pyx_codeobj__312); + Py_CLEAR(__pyx_codeobj__309); + Py_CLEAR(__pyx_tuple__310); + Py_CLEAR(__pyx_codeobj__311); + Py_CLEAR(__pyx_tuple__312); Py_CLEAR(__pyx_tuple__313); - Py_CLEAR(__pyx_tuple__314); - Py_CLEAR(__pyx_codeobj__315); - Py_CLEAR(__pyx_codeobj__316); + Py_CLEAR(__pyx_codeobj__314); + Py_CLEAR(__pyx_tuple__315); + Py_CLEAR(__pyx_tuple__316); Py_CLEAR(__pyx_codeobj__317); - Py_CLEAR(__pyx_codeobj__318); - Py_CLEAR(__pyx_codeobj__319); + Py_CLEAR(__pyx_tuple__318); + Py_CLEAR(__pyx_tuple__319); Py_CLEAR(__pyx_codeobj__320); - Py_CLEAR(__pyx_slice__321); + Py_CLEAR(__pyx_tuple__321); Py_CLEAR(__pyx_codeobj__322); - Py_CLEAR(__pyx_codeobj__323); - Py_CLEAR(__pyx_slice__324); + Py_CLEAR(__pyx_tuple__323); + Py_CLEAR(__pyx_tuple__324); Py_CLEAR(__pyx_codeobj__325); - Py_CLEAR(__pyx_codeobj__326); - Py_CLEAR(__pyx_codeobj__327); + Py_CLEAR(__pyx_tuple__326); + Py_CLEAR(__pyx_tuple__327); Py_CLEAR(__pyx_codeobj__328); - Py_CLEAR(__pyx_codeobj__329); - Py_CLEAR(__pyx_codeobj__330); + Py_CLEAR(__pyx_tuple__329); + Py_CLEAR(__pyx_tuple__330); Py_CLEAR(__pyx_codeobj__331); - Py_CLEAR(__pyx_codeobj__332); + Py_CLEAR(__pyx_tuple__332); Py_CLEAR(__pyx_tuple__333); Py_CLEAR(__pyx_codeobj__334); - Py_CLEAR(__pyx_codeobj__335); + Py_CLEAR(__pyx_tuple__335); Py_CLEAR(__pyx_tuple__336); - Py_CLEAR(__pyx_tuple__337); - Py_CLEAR(__pyx_codeobj__338); - Py_CLEAR(__pyx_codeobj__339); + Py_CLEAR(__pyx_codeobj__337); + Py_CLEAR(__pyx_tuple__338); + Py_CLEAR(__pyx_tuple__339); Py_CLEAR(__pyx_codeobj__340); - Py_CLEAR(__pyx_codeobj__341); + Py_CLEAR(__pyx_tuple__341); Py_CLEAR(__pyx_codeobj__342); - Py_CLEAR(__pyx_codeobj__343); + Py_CLEAR(__pyx_tuple__343); Py_CLEAR(__pyx_codeobj__344); - Py_CLEAR(__pyx_codeobj__345); - Py_CLEAR(__pyx_slice__346); + Py_CLEAR(__pyx_tuple__345); + Py_CLEAR(__pyx_codeobj__346); Py_CLEAR(__pyx_tuple__347); - Py_CLEAR(__pyx_tuple__350); - Py_CLEAR(__pyx_codeobj__351); - Py_CLEAR(__pyx_codeobj__352); - Py_CLEAR(__pyx_tuple__353); - Py_CLEAR(__pyx_codeobj__354); - Py_CLEAR(__pyx_codeobj__355); + Py_CLEAR(__pyx_codeobj__348); + Py_CLEAR(__pyx_tuple__349); + Py_CLEAR(__pyx_codeobj__350); + Py_CLEAR(__pyx_tuple__351); + Py_CLEAR(__pyx_tuple__352); + Py_CLEAR(__pyx_codeobj__353); + Py_CLEAR(__pyx_tuple__354); + Py_CLEAR(__pyx_tuple__355); Py_CLEAR(__pyx_codeobj__356); - Py_CLEAR(__pyx_codeobj__357); - Py_CLEAR(__pyx_tuple__358); - Py_CLEAR(__pyx_codeobj__359); - Py_CLEAR(__pyx_tuple__360); - Py_CLEAR(__pyx_codeobj__361); - Py_CLEAR(__pyx_tuple__362); - Py_CLEAR(__pyx_codeobj__363); + Py_CLEAR(__pyx_tuple__357); + Py_CLEAR(__pyx_codeobj__358); + Py_CLEAR(__pyx_tuple__359); + Py_CLEAR(__pyx_codeobj__360); + Py_CLEAR(__pyx_tuple__361); + Py_CLEAR(__pyx_codeobj__362); + Py_CLEAR(__pyx_tuple__363); Py_CLEAR(__pyx_codeobj__364); - Py_CLEAR(__pyx_codeobj__365); + Py_CLEAR(__pyx_tuple__365); Py_CLEAR(__pyx_codeobj__366); - Py_CLEAR(__pyx_codeobj__367); - Py_CLEAR(__pyx_tuple__368); - Py_CLEAR(__pyx_codeobj__369); + Py_CLEAR(__pyx_tuple__367); + Py_CLEAR(__pyx_codeobj__368); + Py_CLEAR(__pyx_tuple__369); Py_CLEAR(__pyx_codeobj__370); - Py_CLEAR(__pyx_codeobj__371); + Py_CLEAR(__pyx_tuple__371); Py_CLEAR(__pyx_codeobj__372); - Py_CLEAR(__pyx_codeobj__373); + Py_CLEAR(__pyx_tuple__373); Py_CLEAR(__pyx_codeobj__374); - Py_CLEAR(__pyx_codeobj__375); + Py_CLEAR(__pyx_tuple__375); Py_CLEAR(__pyx_codeobj__376); - Py_CLEAR(__pyx_codeobj__377); - Py_CLEAR(__pyx_tuple__378); + Py_CLEAR(__pyx_tuple__377); + Py_CLEAR(__pyx_codeobj__378); Py_CLEAR(__pyx_tuple__379); Py_CLEAR(__pyx_codeobj__380); - Py_CLEAR(__pyx_codeobj__381); + Py_CLEAR(__pyx_tuple__381); Py_CLEAR(__pyx_codeobj__382); - Py_CLEAR(__pyx_codeobj__383); - Py_CLEAR(__pyx_tuple__384); + Py_CLEAR(__pyx_tuple__383); + Py_CLEAR(__pyx_codeobj__384); Py_CLEAR(__pyx_tuple__385); - Py_CLEAR(__pyx_tuple__386); + Py_CLEAR(__pyx_codeobj__386); Py_CLEAR(__pyx_tuple__387); - Py_CLEAR(__pyx_slice__388); + Py_CLEAR(__pyx_codeobj__388); Py_CLEAR(__pyx_tuple__389); - Py_CLEAR(__pyx_slice__390); - Py_CLEAR(__pyx_codeobj__391); - Py_CLEAR(__pyx_tuple__392); + Py_CLEAR(__pyx_codeobj__390); + Py_CLEAR(__pyx_tuple__391); + Py_CLEAR(__pyx_codeobj__392); Py_CLEAR(__pyx_tuple__393); - Py_CLEAR(__pyx_codeobj__394); + Py_CLEAR(__pyx_tuple__394); Py_CLEAR(__pyx_codeobj__395); - Py_CLEAR(__pyx_codeobj__396); + Py_CLEAR(__pyx_tuple__396); Py_CLEAR(__pyx_codeobj__397); - Py_CLEAR(__pyx_codeobj__398); - Py_CLEAR(__pyx_tuple__399); + Py_CLEAR(__pyx_tuple__398); + Py_CLEAR(__pyx_codeobj__399); Py_CLEAR(__pyx_tuple__400); - Py_CLEAR(__pyx_tuple__401); + Py_CLEAR(__pyx_codeobj__401); Py_CLEAR(__pyx_tuple__402); - Py_CLEAR(__pyx_tuple__403); + Py_CLEAR(__pyx_codeobj__403); Py_CLEAR(__pyx_tuple__404); - Py_CLEAR(__pyx_tuple__405); + Py_CLEAR(__pyx_codeobj__405); Py_CLEAR(__pyx_tuple__406); - Py_CLEAR(__pyx_tuple__407); + Py_CLEAR(__pyx_codeobj__407); Py_CLEAR(__pyx_tuple__408); - Py_CLEAR(__pyx_tuple__409); + Py_CLEAR(__pyx_codeobj__409); Py_CLEAR(__pyx_tuple__410); - Py_CLEAR(__pyx_tuple__411); + Py_CLEAR(__pyx_codeobj__411); Py_CLEAR(__pyx_tuple__412); - Py_CLEAR(__pyx_tuple__413); + Py_CLEAR(__pyx_codeobj__413); Py_CLEAR(__pyx_tuple__414); - Py_CLEAR(__pyx_tuple__415); + Py_CLEAR(__pyx_codeobj__415); Py_CLEAR(__pyx_tuple__416); - Py_CLEAR(__pyx_tuple__417); + Py_CLEAR(__pyx_codeobj__417); Py_CLEAR(__pyx_tuple__418); - Py_CLEAR(__pyx_tuple__419); + Py_CLEAR(__pyx_codeobj__419); Py_CLEAR(__pyx_tuple__420); - Py_CLEAR(__pyx_tuple__421); + Py_CLEAR(__pyx_codeobj__421); Py_CLEAR(__pyx_tuple__422); - Py_CLEAR(__pyx_tuple__423); + Py_CLEAR(__pyx_codeobj__423); Py_CLEAR(__pyx_tuple__424); - Py_CLEAR(__pyx_tuple__425); + Py_CLEAR(__pyx_codeobj__425); Py_CLEAR(__pyx_tuple__426); - Py_CLEAR(__pyx_tuple__427); + Py_CLEAR(__pyx_codeobj__427); Py_CLEAR(__pyx_tuple__428); Py_CLEAR(__pyx_tuple__429); - Py_CLEAR(__pyx_tuple__430); + Py_CLEAR(__pyx_codeobj__430); Py_CLEAR(__pyx_tuple__431); - Py_CLEAR(__pyx_tuple__432); + Py_CLEAR(__pyx_codeobj__432); Py_CLEAR(__pyx_tuple__433); - Py_CLEAR(__pyx_tuple__434); + Py_CLEAR(__pyx_codeobj__434); Py_CLEAR(__pyx_tuple__435); - Py_CLEAR(__pyx_tuple__436); + Py_CLEAR(__pyx_codeobj__436); Py_CLEAR(__pyx_tuple__437); - Py_CLEAR(__pyx_tuple__438); + Py_CLEAR(__pyx_codeobj__438); Py_CLEAR(__pyx_tuple__439); - Py_CLEAR(__pyx_tuple__440); + Py_CLEAR(__pyx_codeobj__440); Py_CLEAR(__pyx_tuple__441); - Py_CLEAR(__pyx_tuple__442); + Py_CLEAR(__pyx_codeobj__442); Py_CLEAR(__pyx_tuple__443); - Py_CLEAR(__pyx_tuple__444); + Py_CLEAR(__pyx_codeobj__444); Py_CLEAR(__pyx_tuple__445); - Py_CLEAR(__pyx_tuple__446); + Py_CLEAR(__pyx_codeobj__446); Py_CLEAR(__pyx_tuple__447); - Py_CLEAR(__pyx_tuple__448); + Py_CLEAR(__pyx_codeobj__448); Py_CLEAR(__pyx_tuple__449); - Py_CLEAR(__pyx_tuple__450); + Py_CLEAR(__pyx_codeobj__450); Py_CLEAR(__pyx_tuple__451); - Py_CLEAR(__pyx_tuple__452); + Py_CLEAR(__pyx_codeobj__452); Py_CLEAR(__pyx_tuple__453); Py_CLEAR(__pyx_tuple__454); - Py_CLEAR(__pyx_tuple__455); + Py_CLEAR(__pyx_codeobj__455); Py_CLEAR(__pyx_tuple__456); - Py_CLEAR(__pyx_tuple__457); + Py_CLEAR(__pyx_codeobj__457); Py_CLEAR(__pyx_tuple__458); - Py_CLEAR(__pyx_tuple__459); + Py_CLEAR(__pyx_codeobj__459); Py_CLEAR(__pyx_tuple__460); - Py_CLEAR(__pyx_tuple__461); + Py_CLEAR(__pyx_codeobj__461); Py_CLEAR(__pyx_tuple__462); - Py_CLEAR(__pyx_tuple__463); + Py_CLEAR(__pyx_codeobj__463); Py_CLEAR(__pyx_tuple__464); - Py_CLEAR(__pyx_tuple__465); + Py_CLEAR(__pyx_codeobj__465); Py_CLEAR(__pyx_tuple__466); - Py_CLEAR(__pyx_tuple__467); + Py_CLEAR(__pyx_codeobj__467); Py_CLEAR(__pyx_tuple__468); - Py_CLEAR(__pyx_tuple__469); + Py_CLEAR(__pyx_codeobj__469); Py_CLEAR(__pyx_tuple__470); - Py_CLEAR(__pyx_tuple__471); + Py_CLEAR(__pyx_codeobj__471); Py_CLEAR(__pyx_tuple__472); Py_CLEAR(__pyx_tuple__473); Py_CLEAR(__pyx_tuple__474); - Py_CLEAR(__pyx_tuple__475); + Py_CLEAR(__pyx_codeobj__475); Py_CLEAR(__pyx_tuple__476); - Py_CLEAR(__pyx_tuple__477); + Py_CLEAR(__pyx_codeobj__477); Py_CLEAR(__pyx_tuple__478); - Py_CLEAR(__pyx_tuple__479); + Py_CLEAR(__pyx_codeobj__479); Py_CLEAR(__pyx_tuple__480); - Py_CLEAR(__pyx_tuple__481); + Py_CLEAR(__pyx_codeobj__481); Py_CLEAR(__pyx_tuple__482); - Py_CLEAR(__pyx_tuple__483); + Py_CLEAR(__pyx_codeobj__483); Py_CLEAR(__pyx_tuple__484); - Py_CLEAR(__pyx_tuple__485); + Py_CLEAR(__pyx_codeobj__485); Py_CLEAR(__pyx_tuple__486); - Py_CLEAR(__pyx_tuple__487); + Py_CLEAR(__pyx_codeobj__487); Py_CLEAR(__pyx_tuple__488); - Py_CLEAR(__pyx_tuple__489); + Py_CLEAR(__pyx_codeobj__489); Py_CLEAR(__pyx_tuple__490); Py_CLEAR(__pyx_tuple__491); Py_CLEAR(__pyx_tuple__492); Py_CLEAR(__pyx_tuple__493); Py_CLEAR(__pyx_tuple__494); - Py_CLEAR(__pyx_tuple__495); + Py_CLEAR(__pyx_codeobj__495); Py_CLEAR(__pyx_tuple__496); - Py_CLEAR(__pyx_tuple__497); + Py_CLEAR(__pyx_codeobj__497); Py_CLEAR(__pyx_tuple__498); Py_CLEAR(__pyx_tuple__499); Py_CLEAR(__pyx_tuple__500); Py_CLEAR(__pyx_tuple__501); - Py_CLEAR(__pyx_tuple__502); + Py_CLEAR(__pyx_codeobj__502); Py_CLEAR(__pyx_tuple__503); - Py_CLEAR(__pyx_tuple__504); + Py_CLEAR(__pyx_codeobj__504); Py_CLEAR(__pyx_tuple__505); - Py_CLEAR(__pyx_tuple__506); + Py_CLEAR(__pyx_codeobj__506); Py_CLEAR(__pyx_tuple__507); - Py_CLEAR(__pyx_tuple__508); + Py_CLEAR(__pyx_codeobj__508); Py_CLEAR(__pyx_tuple__509); Py_CLEAR(__pyx_tuple__510); Py_CLEAR(__pyx_tuple__511); - Py_CLEAR(__pyx_tuple__512); + Py_CLEAR(__pyx_codeobj__512); Py_CLEAR(__pyx_tuple__513); - Py_CLEAR(__pyx_tuple__514); + Py_CLEAR(__pyx_codeobj__514); Py_CLEAR(__pyx_tuple__515); - Py_CLEAR(__pyx_tuple__516); + Py_CLEAR(__pyx_codeobj__516); Py_CLEAR(__pyx_tuple__517); - Py_CLEAR(__pyx_tuple__518); + Py_CLEAR(__pyx_codeobj__518); Py_CLEAR(__pyx_tuple__519); Py_CLEAR(__pyx_tuple__520); - Py_CLEAR(__pyx_tuple__521); + Py_CLEAR(__pyx_codeobj__521); Py_CLEAR(__pyx_tuple__522); Py_CLEAR(__pyx_tuple__523); - Py_CLEAR(__pyx_tuple__524); + Py_CLEAR(__pyx_codeobj__524); Py_CLEAR(__pyx_tuple__525); Py_CLEAR(__pyx_tuple__526); - Py_CLEAR(__pyx_tuple__527); + Py_CLEAR(__pyx_codeobj__527); Py_CLEAR(__pyx_tuple__528); - Py_CLEAR(__pyx_tuple__529); + Py_CLEAR(__pyx_codeobj__529); Py_CLEAR(__pyx_tuple__530); - Py_CLEAR(__pyx_tuple__531); + Py_CLEAR(__pyx_codeobj__531); Py_CLEAR(__pyx_tuple__532); - Py_CLEAR(__pyx_tuple__533); + Py_CLEAR(__pyx_codeobj__533); Py_CLEAR(__pyx_tuple__534); - Py_CLEAR(__pyx_tuple__535); + Py_CLEAR(__pyx_codeobj__535); Py_CLEAR(__pyx_tuple__536); - Py_CLEAR(__pyx_tuple__537); + Py_CLEAR(__pyx_codeobj__537); Py_CLEAR(__pyx_tuple__538); - Py_CLEAR(__pyx_tuple__539); + Py_CLEAR(__pyx_codeobj__539); Py_CLEAR(__pyx_tuple__540); - Py_CLEAR(__pyx_tuple__541); + Py_CLEAR(__pyx_codeobj__541); Py_CLEAR(__pyx_tuple__542); - Py_CLEAR(__pyx_tuple__543); + Py_CLEAR(__pyx_codeobj__543); Py_CLEAR(__pyx_tuple__544); - Py_CLEAR(__pyx_tuple__545); + Py_CLEAR(__pyx_codeobj__545); Py_CLEAR(__pyx_tuple__546); Py_CLEAR(__pyx_tuple__547); - Py_CLEAR(__pyx_tuple__548); + Py_CLEAR(__pyx_codeobj__548); Py_CLEAR(__pyx_tuple__549); - Py_CLEAR(__pyx_tuple__550); + Py_CLEAR(__pyx_codeobj__550); Py_CLEAR(__pyx_tuple__551); - Py_CLEAR(__pyx_tuple__552); + Py_CLEAR(__pyx_codeobj__552); Py_CLEAR(__pyx_tuple__553); Py_CLEAR(__pyx_tuple__554); - Py_CLEAR(__pyx_tuple__555); + Py_CLEAR(__pyx_codeobj__555); Py_CLEAR(__pyx_tuple__556); Py_CLEAR(__pyx_tuple__557); - Py_CLEAR(__pyx_tuple__558); + Py_CLEAR(__pyx_codeobj__558); Py_CLEAR(__pyx_tuple__559); - Py_CLEAR(__pyx_tuple__560); + Py_CLEAR(__pyx_codeobj__560); Py_CLEAR(__pyx_tuple__561); - Py_CLEAR(__pyx_tuple__562); + Py_CLEAR(__pyx_codeobj__562); Py_CLEAR(__pyx_tuple__563); - Py_CLEAR(__pyx_tuple__564); + Py_CLEAR(__pyx_codeobj__564); Py_CLEAR(__pyx_tuple__565); - Py_CLEAR(__pyx_tuple__566); + Py_CLEAR(__pyx_codeobj__566); Py_CLEAR(__pyx_tuple__567); - Py_CLEAR(__pyx_tuple__568); + Py_CLEAR(__pyx_codeobj__568); Py_CLEAR(__pyx_tuple__569); - Py_CLEAR(__pyx_tuple__570); + Py_CLEAR(__pyx_codeobj__570); Py_CLEAR(__pyx_tuple__571); - Py_CLEAR(__pyx_tuple__572); + Py_CLEAR(__pyx_codeobj__572); Py_CLEAR(__pyx_tuple__573); - Py_CLEAR(__pyx_tuple__574); + Py_CLEAR(__pyx_codeobj__574); Py_CLEAR(__pyx_tuple__575); - Py_CLEAR(__pyx_tuple__576); - Py_CLEAR(__pyx_tuple__577); + Py_CLEAR(__pyx_codeobj__576); Py_CLEAR(__pyx_tuple__578); - Py_CLEAR(__pyx_tuple__579); Py_CLEAR(__pyx_tuple__580); Py_CLEAR(__pyx_tuple__581); - Py_CLEAR(__pyx_tuple__582); + Py_CLEAR(__pyx_codeobj__582); Py_CLEAR(__pyx_tuple__583); - Py_CLEAR(__pyx_tuple__584); + Py_CLEAR(__pyx_codeobj__584); Py_CLEAR(__pyx_tuple__585); - Py_CLEAR(__pyx_tuple__586); + Py_CLEAR(__pyx_codeobj__586); Py_CLEAR(__pyx_tuple__587); - Py_CLEAR(__pyx_tuple__588); + Py_CLEAR(__pyx_codeobj__588); Py_CLEAR(__pyx_tuple__589); - Py_CLEAR(__pyx_tuple__590); + Py_CLEAR(__pyx_codeobj__590); Py_CLEAR(__pyx_tuple__591); - Py_CLEAR(__pyx_tuple__592); + Py_CLEAR(__pyx_codeobj__592); Py_CLEAR(__pyx_tuple__593); - Py_CLEAR(__pyx_tuple__594); + Py_CLEAR(__pyx_codeobj__594); Py_CLEAR(__pyx_tuple__595); - Py_CLEAR(__pyx_tuple__596); + Py_CLEAR(__pyx_codeobj__596); Py_CLEAR(__pyx_tuple__597); Py_CLEAR(__pyx_tuple__598); - Py_CLEAR(__pyx_tuple__599); + Py_CLEAR(__pyx_codeobj__599); Py_CLEAR(__pyx_tuple__600); - Py_CLEAR(__pyx_tuple__601); + Py_CLEAR(__pyx_codeobj__601); Py_CLEAR(__pyx_tuple__602); - Py_CLEAR(__pyx_tuple__603); + Py_CLEAR(__pyx_codeobj__603); Py_CLEAR(__pyx_tuple__604); - Py_CLEAR(__pyx_tuple__605); + Py_CLEAR(__pyx_codeobj__605); Py_CLEAR(__pyx_tuple__606); - Py_CLEAR(__pyx_tuple__607); + Py_CLEAR(__pyx_codeobj__607); Py_CLEAR(__pyx_tuple__608); - Py_CLEAR(__pyx_tuple__609); + Py_CLEAR(__pyx_codeobj__609); Py_CLEAR(__pyx_tuple__610); - Py_CLEAR(__pyx_tuple__611); + Py_CLEAR(__pyx_codeobj__611); Py_CLEAR(__pyx_tuple__612); - Py_CLEAR(__pyx_tuple__613); + Py_CLEAR(__pyx_codeobj__613); Py_CLEAR(__pyx_tuple__614); - Py_CLEAR(__pyx_tuple__615); + Py_CLEAR(__pyx_codeobj__615); Py_CLEAR(__pyx_tuple__616); - Py_CLEAR(__pyx_tuple__617); + Py_CLEAR(__pyx_codeobj__617); Py_CLEAR(__pyx_tuple__618); Py_CLEAR(__pyx_tuple__619); - Py_CLEAR(__pyx_tuple__620); + Py_CLEAR(__pyx_codeobj__620); Py_CLEAR(__pyx_tuple__621); Py_CLEAR(__pyx_tuple__622); - Py_CLEAR(__pyx_tuple__623); + Py_CLEAR(__pyx_codeobj__623); Py_CLEAR(__pyx_tuple__624); Py_CLEAR(__pyx_tuple__625); - Py_CLEAR(__pyx_tuple__626); + Py_CLEAR(__pyx_codeobj__626); Py_CLEAR(__pyx_tuple__627); Py_CLEAR(__pyx_tuple__628); - Py_CLEAR(__pyx_tuple__629); + Py_CLEAR(__pyx_codeobj__629); Py_CLEAR(__pyx_tuple__630); - Py_CLEAR(__pyx_tuple__631); + Py_CLEAR(__pyx_codeobj__631); Py_CLEAR(__pyx_tuple__632); Py_CLEAR(__pyx_tuple__633); - Py_CLEAR(__pyx_tuple__634); + Py_CLEAR(__pyx_codeobj__634); Py_CLEAR(__pyx_tuple__635); - Py_CLEAR(__pyx_tuple__636); + Py_CLEAR(__pyx_codeobj__636); Py_CLEAR(__pyx_tuple__637); - Py_CLEAR(__pyx_tuple__638); + Py_CLEAR(__pyx_codeobj__638); Py_CLEAR(__pyx_tuple__639); - Py_CLEAR(__pyx_tuple__640); + Py_CLEAR(__pyx_codeobj__640); Py_CLEAR(__pyx_tuple__641); - Py_CLEAR(__pyx_tuple__642); - Py_CLEAR(__pyx_tuple__643); - Py_CLEAR(__pyx_tuple__644); - Py_CLEAR(__pyx_tuple__645); - Py_CLEAR(__pyx_tuple__646); - Py_CLEAR(__pyx_tuple__647); - Py_CLEAR(__pyx_tuple__648); - Py_CLEAR(__pyx_tuple__649); - Py_CLEAR(__pyx_tuple__650); - Py_CLEAR(__pyx_tuple__651); - Py_CLEAR(__pyx_tuple__652); - Py_CLEAR(__pyx_tuple__653); - Py_CLEAR(__pyx_tuple__654); - Py_CLEAR(__pyx_tuple__655); - Py_CLEAR(__pyx_tuple__656); - Py_CLEAR(__pyx_tuple__657); - Py_CLEAR(__pyx_tuple__658); - Py_CLEAR(__pyx_tuple__659); - Py_CLEAR(__pyx_tuple__660); - Py_CLEAR(__pyx_tuple__661); - Py_CLEAR(__pyx_tuple__662); - Py_CLEAR(__pyx_tuple__664); - Py_CLEAR(__pyx_tuple__666); - Py_CLEAR(__pyx_tuple__667); - Py_CLEAR(__pyx_tuple__668); - Py_CLEAR(__pyx_tuple__669); - Py_CLEAR(__pyx_tuple__670); - Py_CLEAR(__pyx_tuple__671); - Py_CLEAR(__pyx_tuple__672); - Py_CLEAR(__pyx_tuple__673); - Py_CLEAR(__pyx_tuple__674); - Py_CLEAR(__pyx_tuple__675); - Py_CLEAR(__pyx_tuple__676); - Py_CLEAR(__pyx_tuple__677); - Py_CLEAR(__pyx_tuple__678); - Py_CLEAR(__pyx_tuple__679); - Py_CLEAR(__pyx_tuple__680); - Py_CLEAR(__pyx_tuple__681); - Py_CLEAR(__pyx_tuple__682); - Py_CLEAR(__pyx_tuple__683); - Py_CLEAR(__pyx_tuple__684); - Py_CLEAR(__pyx_tuple__685); - Py_CLEAR(__pyx_tuple__686); - Py_CLEAR(__pyx_tuple__687); - Py_CLEAR(__pyx_tuple__688); - Py_CLEAR(__pyx_tuple__689); - Py_CLEAR(__pyx_tuple__690); - Py_CLEAR(__pyx_tuple__691); - Py_CLEAR(__pyx_tuple__692); - Py_CLEAR(__pyx_tuple__693); - Py_CLEAR(__pyx_tuple__694); - Py_CLEAR(__pyx_tuple__695); - Py_CLEAR(__pyx_tuple__696); - Py_CLEAR(__pyx_tuple__697); - Py_CLEAR(__pyx_tuple__698); - Py_CLEAR(__pyx_tuple__699); - Py_CLEAR(__pyx_tuple__700); + Py_CLEAR(__pyx_codeobj__642); /* CodeObjectCache.cleanup */ if (__pyx_code_cache.entries) { __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; @@ -257588,12 +239736,12 @@ static void __pyx_module_cleanup(CYTHON_UNUSED PyObject *self) { Py_CLEAR(__pyx_builtin_NotImplemented); Py_CLEAR(__pyx_builtin_DeprecationWarning); Py_CLEAR(__pyx_builtin_StopIteration); - Py_CLEAR(__pyx_builtin_NotImplementedError); Py_CLEAR(__pyx_builtin_ReferenceError); Py_CLEAR(__pyx_builtin_AttributeError); Py_CLEAR(__pyx_builtin_IOError); Py_CLEAR(__pyx_builtin_LookupError); Py_CLEAR(__pyx_builtin_open); + Py_CLEAR(__pyx_builtin_NotImplementedError); Py_CLEAR(__pyx_builtin_AssertionError); /*--- Intern cleanup code ---*/ Py_CLEAR(__pyx_empty_tuple); @@ -257709,9 +239857,9 @@ static void __pyx_module_cleanup(CYTHON_UNUSED PyObject *self) { static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; - m = PyImport_ImportModule((char *)modname); + m = PyImport_ImportModule(modname); if (!m) goto end; - p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); + p = PyObject_GetAttrString(m, "RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: @@ -257915,99 +240063,6 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject } #endif -/* Profile */ -#if CYTHON_PROFILE -static int __Pyx_TraceSetupAndCall(PyCodeObject** code, - PyFrameObject** frame, - PyThreadState* tstate, - const char *funcname, - const char *srcfile, - int firstlineno) { - PyObject *type, *value, *traceback; - int retval; - if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) { - if (*code == NULL) { - *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno); - if (*code == NULL) return 0; - } - *frame = PyFrame_New( - tstate, /*PyThreadState *tstate*/ - *code, /*PyCodeObject *code*/ - __pyx_d, /*PyObject *globals*/ - 0 /*PyObject *locals*/ - ); - if (*frame == NULL) return 0; - if (CYTHON_TRACE && (*frame)->f_trace == NULL) { - Py_INCREF(Py_None); - (*frame)->f_trace = Py_None; - } -#if PY_VERSION_HEX < 0x030400B1 - } else { - (*frame)->f_tstate = tstate; -#endif - } - __Pyx_PyFrame_SetLineNumber(*frame, firstlineno); - retval = 1; - tstate->tracing++; - tstate->use_tracing = 0; - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); - #if CYTHON_TRACE - if (tstate->c_tracefunc) - retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0; - if (retval && tstate->c_profilefunc) - #endif - retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0; - tstate->use_tracing = (tstate->c_profilefunc || - (CYTHON_TRACE && tstate->c_tracefunc)); - tstate->tracing--; - if (retval) { - __Pyx_ErrRestoreInState(tstate, type, value, traceback); - return tstate->use_tracing && retval; - } else { - Py_XDECREF(type); - Py_XDECREF(value); - Py_XDECREF(traceback); - return -1; - } -} -static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) { - PyObject *py_srcfile = 0; - PyObject *py_funcname = 0; - PyCodeObject *py_code = 0; - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); - py_srcfile = PyString_FromString(srcfile); - #else - py_funcname = PyUnicode_FromString(funcname); - py_srcfile = PyUnicode_FromString(srcfile); - #endif - if (!py_funcname | !py_srcfile) goto bad; - py_code = PyCode_New( - 0, - #if PY_MAJOR_VERSION >= 3 - 0, - #endif - 0, - 0, - CO_OPTIMIZED | CO_NEWLOCALS, - __pyx_empty_bytes, /*PyObject *code,*/ - __pyx_empty_tuple, /*PyObject *consts,*/ - __pyx_empty_tuple, /*PyObject *names,*/ - __pyx_empty_tuple, /*PyObject *varnames,*/ - __pyx_empty_tuple, /*PyObject *freevars,*/ - __pyx_empty_tuple, /*PyObject *cellvars,*/ - py_srcfile, /*PyObject *filename,*/ - py_funcname, /*PyObject *name,*/ - firstlineno, - __pyx_empty_bytes /*PyObject *lnotab*/ - ); -bad: - Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); - return py_code; -} -#endif - /* RaiseException */ #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, @@ -258175,7 +240230,7 @@ static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, P PyObject *self = PyCFunction_GET_SELF(func); int flags = PyCFunction_GET_FLAGS(func); assert(PyCFunction_Check(func)); - assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS))); + assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); assert(nargs >= 0); assert(nargs == 0 || args != NULL); /* _PyCFunction_FastCallDict() must not be called with an exception set, @@ -258183,16 +240238,15 @@ static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, P caller loses its exception */ assert(!PyErr_Occurred()); if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { - return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL); + return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); } else { - return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs); + return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); } } #endif /* PyFunctionFastCall */ #if CYTHON_FAST_PYCALL -#include "frameobject.h" static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, PyObject *globals) { PyFrameObject *f; @@ -258210,7 +240264,7 @@ static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args if (f == NULL) { return NULL; } - fastlocals = f->f_localsplus; + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); for (i = 0; i < na; i++) { Py_INCREF(*args); fastlocals[i] = *args++; @@ -258330,6 +240384,35 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg } #endif +/* PyObjectCall2Args */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args, *result = NULL; + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyFunction_FastCall(function, args, 2); + } + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyCFunction_FastCall(function, args, 2); + } + #endif + args = PyTuple_New(2); + if (unlikely(!args)) goto done; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + Py_INCREF(function); + result = __Pyx_PyObject_Call(function, args, NULL); + Py_DECREF(args); + Py_DECREF(function); +done: + return result; +} + /* PyObjectCallMethO */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { @@ -258404,7 +240487,7 @@ static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { { PyMethodDescrObject *descr = (PyMethodDescrObject*) method; target->func = descr->d_method->ml_meth; - target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST); + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); } #endif return 0; @@ -258567,10 +240650,11 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { } #endif #ifdef __Pyx_CyFunction_USED - if (likely(PyCFunction_Check(func) || __Pyx_TypeCheck(func, __pyx_CyFunctionType))) { + if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func))) #else - if (likely(PyCFunction_Check(func))) { + if (likely(PyCFunction_Check(func))) #endif + { if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { return __Pyx_PyObject_CallMethO(func, NULL); } @@ -258580,7 +240664,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { #endif /* SliceObject */ - static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { @@ -258676,13 +240760,29 @@ bad: return NULL; } +/* GetTopmostException */ +#if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + /* SaveResetException */ - #if CYTHON_FAST_THREAD_STATE +#if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { - #if PY_VERSION_HEX >= 0x030700A3 - *type = tstate->exc_state.exc_type; - *value = tstate->exc_state.exc_value; - *tb = tstate->exc_state.exc_traceback; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; #else *type = tstate->exc_type; *value = tstate->exc_value; @@ -258694,13 +240794,14 @@ static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject * } static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; - #if PY_VERSION_HEX >= 0x030700A3 - tmp_type = tstate->exc_state.exc_type; - tmp_value = tstate->exc_state.exc_value; - tmp_tb = tstate->exc_state.exc_traceback; - tstate->exc_state.exc_type = type; - tstate->exc_state.exc_value = value; - tstate->exc_state.exc_traceback = tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; @@ -258716,7 +240817,7 @@ static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject #endif /* PyErrExceptionMatches */ - #if CYTHON_FAST_THREAD_STATE +#if CYTHON_FAST_THREAD_STATE static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(tuple); @@ -258741,11 +240842,12 @@ static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tsta #endif /* GetException */ - #if CYTHON_FAST_THREAD_STATE -static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) #else -static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) #endif +{ PyObject *local_type, *local_value, *local_tb; #if CYTHON_FAST_THREAD_STATE PyObject *tmp_type, *tmp_value, *tmp_tb; @@ -258778,13 +240880,16 @@ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) *value = local_value; *tb = local_tb; #if CYTHON_FAST_THREAD_STATE - #if PY_VERSION_HEX >= 0x030700A3 - tmp_type = tstate->exc_state.exc_type; - tmp_value = tstate->exc_state.exc_value; - tmp_tb = tstate->exc_state.exc_traceback; - tstate->exc_state.exc_type = local_type; - tstate->exc_state.exc_value = local_value; - tstate->exc_state.exc_traceback = local_tb; + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + } #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; @@ -258811,14 +240916,14 @@ bad: } /* None */ - static CYTHON_INLINE long __Pyx_mod_long(long a, long b) { +static CYTHON_INLINE long __Pyx_mod_long(long a, long b) { long r = a % b; r += ((r != 0) & ((r ^ b) < 0)) * b; return r; } /* None */ - static CYTHON_INLINE long __Pyx_div_long(long a, long b) { +static CYTHON_INLINE long __Pyx_div_long(long a, long b) { long q = a / b; long r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); @@ -258826,7 +240931,7 @@ bad: } /* KeywordStringCheck */ - static int __Pyx_CheckKeywordStrings( +static int __Pyx_CheckKeywordStrings( PyObject *kwdict, const char* function_name, int kw_allowed) @@ -258866,7 +240971,7 @@ invalid_keyword: } /* SliceObject */ - static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value, +static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { @@ -258964,16 +241069,17 @@ bad: } /* SwapException */ - #if CYTHON_FAST_THREAD_STATE +#if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; - #if PY_VERSION_HEX >= 0x030700A3 - tmp_type = tstate->exc_state.exc_type; - tmp_value = tstate->exc_state.exc_value; - tmp_tb = tstate->exc_state.exc_traceback; - tstate->exc_state.exc_type = *type; - tstate->exc_state.exc_value = *value; - tstate->exc_state.exc_traceback = *tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = *type; + exc_info->exc_value = *value; + exc_info->exc_traceback = *tb; #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; @@ -258998,7 +241104,7 @@ static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, #endif /* WriteUnraisableException */ - static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, +static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, int full_traceback, CYTHON_UNUSED int nogil) { PyObject *old_exc, *old_val, *old_tb; @@ -259040,7 +241146,7 @@ static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, } /* CIntToDigits */ - static const char DIGIT_PAIRS_10[2*10*10+1] = { +static const char DIGIT_PAIRS_10[2*10*10+1] = { "00010203040506070809" "10111213141516171819" "20212223242526272829" @@ -259068,7 +241174,7 @@ static const char DIGITS_HEX[2*16+1] = { }; /* BuildPyUnicode */ - static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength, +static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength, int prepend_sign, char padding_char) { PyObject *uval; Py_ssize_t uoffset = ulength - clength; @@ -259142,7 +241248,7 @@ done_or_error: } /* CIntToPyUnicode */ - #ifdef _MSC_VER +#ifdef _MSC_VER #ifndef _MSC_STDINT_H_ #if _MSC_VER < 1300 typedef unsigned short uint16_t; @@ -259160,7 +241266,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_xmlElementType(xmlElementTyp Py_ssize_t length, ulength; int prepend_sign, last_one_off; xmlElementType remaining; - const xmlElementType neg_one = (xmlElementType) -1, const_zero = (xmlElementType) 0; + const xmlElementType neg_one = (xmlElementType) ((xmlElementType) 0 - (xmlElementType) 1), const_zero = (xmlElementType) 0; const int is_unsigned = neg_one > const_zero; if (format_char == 'X') { hex_digits += 16; @@ -259221,7 +241327,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_xmlElementType(xmlElementTyp } /* PyIntBinop */ - #if !CYTHON_COMPILING_IN_PYPY +#if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { @@ -259343,7 +241449,7 @@ static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED #endif /* decode_c_string */ - static CYTHON_INLINE PyObject* __Pyx_decode_c_string( +static CYTHON_INLINE PyObject* __Pyx_decode_c_string( const char* cstring, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { @@ -259376,7 +241482,7 @@ static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED } /* ExtTypeTest */ - static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; @@ -259389,12 +241495,12 @@ static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED } /* RaiseNoneIterError */ - static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } /* GetItemInt */ - static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); @@ -259409,7 +241515,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_ if (wraparound & unlikely(i < 0)) { wrapped_i += PyList_GET_SIZE(o); } - if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyList_GET_SIZE(o)))) { + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; @@ -259427,7 +241533,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize if (wraparound & unlikely(i < 0)) { wrapped_i += PyTuple_GET_SIZE(o); } - if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyTuple_GET_SIZE(o)))) { + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; @@ -259443,7 +241549,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); - if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { + if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; @@ -259451,7 +241557,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); - if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; @@ -259481,7 +241587,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, } /* ObjectGetItem */ - #if CYTHON_USE_TYPE_SLOTS +#if CYTHON_USE_TYPE_SLOTS static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) { PyObject *runerr; Py_ssize_t key_value; @@ -259510,7 +241616,7 @@ static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) { #endif /* GetAttr */ - static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { #if CYTHON_USE_TYPE_SLOTS #if PY_MAJOR_VERSION >= 3 if (likely(PyUnicode_Check(n))) @@ -259523,7 +241629,7 @@ static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) { } /* HasAttr */ - static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { PyObject *r; if (unlikely(!__Pyx_PyBaseString_Check(n))) { PyErr_SetString(PyExc_TypeError, @@ -259541,7 +241647,7 @@ static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) { } /* pyfrozenset_new */ - static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) { +static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) { if (it) { PyObject* result; #if CYTHON_COMPILING_IN_PYPY @@ -259573,7 +241679,7 @@ static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) { } /* PySetContains */ - static int __Pyx_PySet_ContainsUnhashable(PyObject *set, PyObject *key) { +static int __Pyx_PySet_ContainsUnhashable(PyObject *set, PyObject *key) { int result = -1; if (PySet_Check(key) && PyErr_ExceptionMatches(PyExc_TypeError)) { PyObject *tmpkey; @@ -259595,7 +241701,7 @@ static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, in } /* SetItemInt */ - static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { +static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { int r; if (!j) return -1; r = PyObject_SetItem(o, j, v); @@ -259607,7 +241713,7 @@ static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObje #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); - if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) { PyObject* old = PyList_GET_ITEM(o, n); Py_INCREF(v); PyList_SET_ITEM(o, n, v); @@ -259632,10 +241738,11 @@ static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObje } #else #if CYTHON_COMPILING_IN_PYPY - if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) { + if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) #else - if (is_list || PySequence_Check(o)) { + if (is_list || PySequence_Check(o)) #endif + { return PySequence_SetItem(o, i, v); } #endif @@ -259643,7 +241750,7 @@ static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObje } /* None */ - static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { +static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { Py_ssize_t q = a / b; Py_ssize_t r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); @@ -259651,7 +241758,7 @@ static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObje } /* CIntToPyUnicode */ - #ifdef _MSC_VER +#ifdef _MSC_VER #ifndef _MSC_STDINT_H_ #if _MSC_VER < 1300 typedef unsigned short uint16_t; @@ -259669,7 +241776,7 @@ 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; - const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0; + const Py_ssize_t neg_one = (Py_ssize_t) ((Py_ssize_t) 0 - (Py_ssize_t) 1), const_zero = (Py_ssize_t) 0; const int is_unsigned = neg_one > const_zero; if (format_char == 'X') { hex_digits += 16; @@ -259730,7 +241837,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, } /* JoinPyUnicode */ - static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, +static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, CYTHON_UNUSED Py_UCS4 max_char) { #if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS PyObject *result_uval; @@ -259792,7 +241899,7 @@ bad: } /* decode_c_bytes */ - static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( +static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { @@ -259819,7 +241926,7 @@ bad: } /* PyObjectFormatAndDecref */ - static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) { +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) { if (unlikely(!s)) return NULL; if (likely(PyUnicode_CheckExact(s))) return s; #if PY_MAJOR_VERSION < 3 @@ -259838,7 +241945,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObj } /* CIntToPyUnicode */ - #ifdef _MSC_VER +#ifdef _MSC_VER #ifndef _MSC_STDINT_H_ #if _MSC_VER < 1300 typedef unsigned short uint16_t; @@ -259856,7 +241963,7 @@ 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; - const int neg_one = (int) -1, const_zero = (int) 0; + const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; if (format_char == 'X') { hex_digits += 16; @@ -259917,34 +242024,42 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t wi } /* GetModuleGlobalName */ - static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ PyObject *result; #if !CYTHON_AVOID_BORROWED_REFS #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { - Py_INCREF(result); + return __Pyx_NewRef(result); } else if (unlikely(PyErr_Occurred())) { - result = NULL; - } else { + return NULL; + } #else result = PyDict_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { - Py_INCREF(result); - } else { + return __Pyx_NewRef(result); + } #endif #else result = PyObject_GetItem(__pyx_d, name); - if (!result) { - PyErr_Clear(); -#endif - result = __Pyx_GetBuiltinName(name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); } - return result; + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); } /* ArgTypeTest */ - static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); @@ -259964,22 +242079,112 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t wi return 0; } -/* PyObjectCallMethod0 */ - static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { - PyObject *method, *result = NULL; - method = __Pyx_PyObject_GetAttrStr(obj, method_name); - if (unlikely(!method)) goto bad; -#if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(method))) { - PyObject *self = PyMethod_GET_SELF(method); - if (likely(self)) { - PyObject *function = PyMethod_GET_FUNCTION(method); - result = __Pyx_PyObject_CallOneArg(function, self); - Py_DECREF(method); - return result; +/* PyObjectGetMethod */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if PY_MAJOR_VERSION >= 3 + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type))) + #endif +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } } } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (descr != NULL) { + *method = descr; + return 0; + } + PyErr_Format(PyExc_AttributeError, +#if PY_MAJOR_VERSION >= 3 + "'%.50s' object has no attribute '%U'", + tp->tp_name, name); +#else + "'%.50s' object has no attribute '%.400s'", + tp->tp_name, PyString_AS_STRING(name)); +#endif + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } #endif + *method = attr; + return 0; +} + +/* PyObjectCallMethod0 */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; result = __Pyx_PyObject_CallNoArg(method); Py_DECREF(method); bad: @@ -259987,7 +242192,7 @@ bad: } /* pop */ - static CYTHON_INLINE PyObject* __Pyx__PyObject_Pop(PyObject* L) { +static CYTHON_INLINE PyObject* __Pyx__PyObject_Pop(PyObject* L) { if (Py_TYPE(L) == &PySet_Type) { return PySet_Pop(L); } @@ -260004,7 +242209,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyList_Pop(PyObject* L) { #endif /* SliceTupleAndList */ - #if CYTHON_COMPILING_IN_CPYTHON +#if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) { Py_ssize_t start = *_start, stop = *_stop, length = *_length; if (start < 0) { @@ -260063,7 +242268,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice( #endif /* Import */ - static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; @@ -260110,7 +242315,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice( if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, - name, global_dict, empty_dict, list, py_level, NULL); + name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( @@ -260128,7 +242333,7 @@ bad: } /* UnicodeEquals */ - static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else @@ -260230,13 +242435,12 @@ return_ne: } /* None */ - static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { +static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); } -/* PyIntBinop */ - #if !CYTHON_COMPILING_IN_PYPY -static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { +/* PyIntCompare */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) { if (op1 == op2) { Py_RETURN_TRUE; } @@ -260244,89 +242448,66 @@ static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED if (likely(PyInt_CheckExact(op1))) { const long b = intval; long a = PyInt_AS_LONG(op1); - if (a == b) { - Py_RETURN_TRUE; - } else { - Py_RETURN_FALSE; - } + if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE; } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { - const long b = intval; - long a; + int unequal; + unsigned long uintval; + Py_ssize_t size = Py_SIZE(op1); const digit* digits = ((PyLongObject*)op1)->ob_digit; - const Py_ssize_t size = Py_SIZE(op1); - if (likely(__Pyx_sst_abs(size) <= 1)) { - a = likely(size) ? digits[0] : 0; - if (size == -1) a = -a; + if (intval == 0) { + if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } else if (intval < 0) { + if (size >= 0) + Py_RETURN_FALSE; + intval = -intval; + size = -size; } else { - switch (size) { - case -2: - if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - } - CYTHON_FALLTHROUGH; - case 2: - if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - } - CYTHON_FALLTHROUGH; - case -3: - if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - } - CYTHON_FALLTHROUGH; - case 3: - if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - } - CYTHON_FALLTHROUGH; - case -4: - if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { - a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - } - CYTHON_FALLTHROUGH; - case 4: - if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { - a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - } - CYTHON_FALLTHROUGH; - #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15 - default: return PyLong_Type.tp_richcompare(op1, op2, Py_EQ); - #else - default: Py_RETURN_FALSE; - #endif - } - } - if (a == b) { - Py_RETURN_TRUE; - } else { + if (size <= 0) Py_RETURN_FALSE; - } + } + uintval = (unsigned long) intval; +#if PyLong_SHIFT * 4 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 4)) { + unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 3 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 3)) { + unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 2 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 2)) { + unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 1 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 1)) { + unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif + unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); + if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; double a = PyFloat_AS_DOUBLE(op1); - if ((double)a == (double)b) { - Py_RETURN_TRUE; - } else { - Py_RETURN_FALSE; - } + if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE; } - return PyObject_RichCompare(op1, op2, Py_EQ); + return ( + PyObject_RichCompare(op1, op2, Py_EQ)); } -#endif /* ImportFrom */ - static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Format(PyExc_ImportError, @@ -260340,14 +242521,14 @@ static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED } /* PyUnicode_Unicode */ - static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) { +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) { if (unlikely(obj == Py_None)) obj = __pyx_kp_u_None; return __Pyx_NewRef(obj); } /* FastTypeChecks */ - #if CYTHON_COMPILING_IN_CPYTHON +#if CYTHON_COMPILING_IN_CPYTHON static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { while (a) { a = a->tp_base; @@ -260447,14 +242628,14 @@ static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObj #endif /* StringJoin */ - #if !CYTHON_COMPILING_IN_CPYTHON +#if !CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) { return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL); } #endif /* IterNext */ - static PyObject *__Pyx_PyIter_Next2Default(PyObject* defval) { +static PyObject *__Pyx_PyIter_Next2Default(PyObject* defval) { PyObject* exc_type; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -260509,7 +242690,7 @@ static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject* } /* CallUnboundCMethod1 */ - #if CYTHON_COMPILING_IN_CPYTHON +#if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) { if (likely(cfunc->func)) { int flag = cfunc->flag; @@ -260517,12 +242698,12 @@ static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* return (*(cfunc->func))(self, arg); } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) { if (PY_VERSION_HEX >= 0x030700A0) { - return (*(__Pyx_PyCFunctionFast)cfunc->func)(self, &arg, 1); + return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1); } else { - return (*(__Pyx_PyCFunctionFastWithKeywords)cfunc->func)(self, &arg, 1, NULL); + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); } } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) { - return (*(__Pyx_PyCFunctionFastWithKeywords)cfunc->func)(self, &arg, 1, NULL); + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); } } return __Pyx__CallUnboundCMethod1(cfunc, self, arg); @@ -260538,7 +242719,7 @@ static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObje Py_INCREF(arg); PyTuple_SET_ITEM(args, 0, arg); if (cfunc->flag & METH_KEYWORDS) - result = (*(PyCFunctionWithKeywords)cfunc->func)(self, args, NULL); + result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); else result = (*cfunc->func)(self, args); } else { @@ -260561,16 +242742,21 @@ bad: } /* DictGetItem */ - #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY +#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { PyObject *value; value = PyDict_GetItemWithError(d, key); if (unlikely(!value)) { if (!PyErr_Occurred()) { - PyObject* args = PyTuple_Pack(1, key); - if (likely(args)) - PyErr_SetObject(PyExc_KeyError, args); - Py_XDECREF(args); + if (unlikely(PyTuple_Check(key))) { + PyObject* args = PyTuple_Pack(1, key); + if (likely(args)) { + PyErr_SetObject(PyExc_KeyError, args); + Py_DECREF(args); + } + } else { + PyErr_SetObject(PyExc_KeyError, key); + } } return NULL; } @@ -260580,7 +242766,7 @@ static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { #endif /* UnpackTupleError */ - static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { +static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { if (t == Py_None) { __Pyx_RaiseNoneNotIterableError(); } else if (PyTuple_GET_SIZE(t) < index) { @@ -260591,7 +242777,7 @@ static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { } /* UnpackTuple2 */ - static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { PyObject *value1 = NULL, *value2 = NULL; #if CYTHON_COMPILING_IN_PYPY @@ -260643,7 +242829,7 @@ bad: } /* dict_iter */ - static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_source_is_dict) { is_dict = is_dict || likely(PyDict_CheckExact(iterable)); *p_source_is_dict = is_dict; @@ -260756,7 +242942,7 @@ static CYTHON_INLINE int __Pyx_dict_iter_next( } /* PyIntBinop */ - #if !CYTHON_COMPILING_IN_PYPY +#if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { @@ -260878,7 +243064,7 @@ static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_U #endif /* ReturnWithStopIteration */ - static void __Pyx__ReturnWithStopIteration(PyObject* value) { +static void __Pyx__ReturnWithStopIteration(PyObject* value) { PyObject *exc, *args; #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_PYSTON __Pyx_PyThreadState_declare @@ -260897,8 +243083,8 @@ static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_U } #if CYTHON_FAST_THREAD_STATE __Pyx_PyThreadState_assign - #if PY_VERSION_HEX >= 0x030700A3 - if (!__pyx_tstate->exc_state.exc_type) + #if CYTHON_USE_EXC_INFO_STACK + if (!__pyx_tstate->exc_info->exc_type) #else if (!__pyx_tstate->exc_type) #endif @@ -260920,7 +243106,7 @@ static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_U } /* FetchCommonType */ - static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* fake_module; PyTypeObject* cached_type = NULL; fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); @@ -260959,58 +243145,25 @@ bad: } /* PyObjectCallMethod1 */ - static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { - PyObject *result = NULL; -#if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(method))) { - PyObject *self = PyMethod_GET_SELF(method); - if (likely(self)) { - PyObject *args; - PyObject *function = PyMethod_GET_FUNCTION(method); - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(function)) { - PyObject *args[2] = {self, arg}; - result = __Pyx_PyFunction_FastCall(function, args, 2); - goto done; - } - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(function)) { - PyObject *args[2] = {self, arg}; - result = __Pyx_PyCFunction_FastCall(function, args, 2); - goto done; - } - #endif - args = PyTuple_New(2); - if (unlikely(!args)) goto done; - Py_INCREF(self); - PyTuple_SET_ITEM(args, 0, self); - Py_INCREF(arg); - PyTuple_SET_ITEM(args, 1, arg); - Py_INCREF(function); - result = __Pyx_PyObject_Call(function, args, NULL); - Py_DECREF(args); - Py_DECREF(function); - return result; - } - } -#endif - result = __Pyx_PyObject_CallOneArg(method, arg); - goto done; -done: +static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { + PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); + Py_DECREF(method); return result; } static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { - PyObject *method, *result; - method = __Pyx_PyObject_GetAttrStr(obj, method_name); + PyObject *method = NULL, *result; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_Call2Args(method, obj, arg); + Py_DECREF(method); + return result; + } if (unlikely(!method)) return NULL; - result = __Pyx__PyObject_CallMethod1(method, arg); - Py_DECREF(method); - return result; + return __Pyx__PyObject_CallMethod1(method, arg); } /* CoroutineBase */ - #include +#include #include #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom) static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) { @@ -261093,21 +243246,22 @@ static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__p return 0; } static CYTHON_INLINE -void __Pyx_Coroutine_ExceptionClear(__pyx_CoroutineObject *self) { - PyObject *exc_type = self->exc_type; - PyObject *exc_value = self->exc_value; - PyObject *exc_traceback = self->exc_traceback; - self->exc_type = NULL; - self->exc_value = NULL; - self->exc_traceback = NULL; - Py_XDECREF(exc_type); - Py_XDECREF(exc_value); - Py_XDECREF(exc_traceback); +void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) { + PyObject *t, *v, *tb; + t = exc_state->exc_type; + v = exc_state->exc_value; + tb = exc_state->exc_traceback; + exc_state->exc_type = NULL; + exc_state->exc_value = NULL; + exc_state->exc_traceback = NULL; + Py_XDECREF(t); + Py_XDECREF(v); + Py_XDECREF(tb); } #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL) static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) { const char *msg; - if (0) { + if ((0)) { #ifdef __Pyx_Coroutine_USED } else if (__Pyx_Coroutine_Check((PyObject*)gen)) { msg = "coroutine already executing"; @@ -261124,7 +243278,7 @@ static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineOb #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL) static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) { const char *msg; - if (0) { + if ((0)) { #ifdef __Pyx_Coroutine_USED } else if (__Pyx_Coroutine_Check(gen)) { msg = "can't send non-None value to a just-started coroutine"; @@ -261158,6 +243312,7 @@ static PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) { __Pyx_PyThreadState_declare PyThreadState *tstate; + __Pyx_ExcInfoStruct *exc_state; PyObject *retval; assert(!self->is_running); if (unlikely(self->resume_label == 0)) { @@ -261174,33 +243329,47 @@ PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, i #else tstate = __Pyx_PyThreadState_Current; #endif - if (self->exc_type) { -#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON -#else - if (self->exc_traceback) { - PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback; + exc_state = &self->gi_exc_state; + if (exc_state->exc_type) { + #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON + #else + if (exc_state->exc_traceback) { + PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback; PyFrameObject *f = tb->tb_frame; Py_XINCREF(tstate->frame); assert(f->f_back == NULL); f->f_back = tstate->frame; } -#endif - __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value, - &self->exc_traceback); + #endif + } +#if CYTHON_USE_EXC_INFO_STACK + exc_state->previous_item = tstate->exc_info; + tstate->exc_info = exc_state; +#else + if (exc_state->exc_type) { + __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); } else { - __Pyx_Coroutine_ExceptionClear(self); - __Pyx_ExceptionSave(&self->exc_type, &self->exc_value, &self->exc_traceback); + __Pyx_Coroutine_ExceptionClear(exc_state); + __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); } +#endif self->is_running = 1; retval = self->body((PyObject *) self, tstate, value); self->is_running = 0; +#if CYTHON_USE_EXC_INFO_STACK + exc_state = &self->gi_exc_state; + tstate->exc_info = exc_state->previous_item; + exc_state->previous_item = NULL; + __Pyx_Coroutine_ResetFrameBackpointer(exc_state); +#endif return retval; } -static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__pyx_CoroutineObject *self) { - if (likely(self->exc_traceback)) { +static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) { + PyObject *exc_tb = exc_state->exc_traceback; + if (likely(exc_tb)) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON #else - PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback; + PyTracebackObject *tb = (PyTracebackObject *) exc_tb; PyFrameObject *f = tb->tb_frame; Py_CLEAR(f->f_back); #endif @@ -261299,7 +243468,7 @@ static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) { return -1; } else if (__Pyx_CoroutineAwait_CheckExact(yf)) { - retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf); + retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL); if (!retval) return -1; } else @@ -261364,6 +243533,9 @@ static PyObject *__Pyx_Generator_Next(PyObject *self) { } return __Pyx_Coroutine_SendEx(gen, Py_None, 0); } +static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) { + return __Pyx_Coroutine_Close(self); +} static PyObject *__Pyx_Coroutine_Close(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; PyObject *retval, *raised_exception; @@ -261480,23 +243652,24 @@ static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) { return NULL; return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1); } +static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) { + Py_VISIT(exc_state->exc_type); + Py_VISIT(exc_state->exc_value); + Py_VISIT(exc_state->exc_traceback); + return 0; +} static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) { Py_VISIT(gen->closure); Py_VISIT(gen->classobj); Py_VISIT(gen->yieldfrom); - Py_VISIT(gen->exc_type); - Py_VISIT(gen->exc_value); - Py_VISIT(gen->exc_traceback); - return 0; + return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg); } static int __Pyx_Coroutine_clear(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; Py_CLEAR(gen->closure); Py_CLEAR(gen->classobj); Py_CLEAR(gen->yieldfrom); - Py_CLEAR(gen->exc_type); - Py_CLEAR(gen->exc_value); - Py_CLEAR(gen->exc_traceback); + __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state); #ifdef __Pyx_AsyncGen_USED if (__Pyx_AsyncGen_CheckExact(self)) { Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer); @@ -261634,7 +243807,7 @@ static void __Pyx_Coroutine_del(PyObject *self) { #endif } static PyObject * -__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self) +__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context) { PyObject *name = self->gi_name; if (unlikely(!name)) name = Py_None; @@ -261642,14 +243815,15 @@ __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self) return name; } static int -__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value) +__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 - if (unlikely(value == NULL || !PyUnicode_Check(value))) { + if (unlikely(value == NULL || !PyUnicode_Check(value))) #else - if (unlikely(value == NULL || !PyString_Check(value))) { + if (unlikely(value == NULL || !PyString_Check(value))) #endif + { PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; @@ -261661,7 +243835,7 @@ __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value) return 0; } static PyObject * -__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self) +__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context) { PyObject *name = self->gi_qualname; if (unlikely(!name)) name = Py_None; @@ -261669,14 +243843,15 @@ __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self) return name; } static int -__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value) +__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 - if (unlikely(value == NULL || !PyUnicode_Check(value))) { + if (unlikely(value == NULL || !PyUnicode_Check(value))) #else - if (unlikely(value == NULL || !PyString_Check(value))) { + if (unlikely(value == NULL || !PyString_Check(value))) #endif + { PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; @@ -261705,9 +243880,12 @@ static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( gen->resume_label = 0; gen->classobj = NULL; gen->yieldfrom = NULL; - gen->exc_type = NULL; - gen->exc_value = NULL; - gen->exc_traceback = NULL; + gen->gi_exc_state.exc_type = NULL; + gen->gi_exc_state.exc_value = NULL; + gen->gi_exc_state.exc_traceback = NULL; +#if CYTHON_USE_EXC_INFO_STACK + gen->gi_exc_state.previous_item = NULL; +#endif gen->gi_weakreflist = NULL; Py_XINCREF(qualname); gen->gi_qualname = qualname; @@ -261722,7 +243900,7 @@ static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( } /* PyObject_GenericGetAttrNoDict */ - #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 @@ -261762,7 +243940,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj #endif /* PatchModuleWithCoroutine */ - static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) { +static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) { #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) int result; PyObject *globals, *result_obj; @@ -261802,7 +243980,7 @@ ignore: } /* PatchGeneratorABC */ - #ifndef CYTHON_REGISTER_ABCS +#ifndef CYTHON_REGISTER_ABCS #define CYTHON_REGISTER_ABCS 1 #endif #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) @@ -261859,7 +244037,7 @@ static int __Pyx_patch_abc(void) { } /* Coroutine */ - static void __Pyx_CoroutineAwait_dealloc(PyObject *self) { +static void __Pyx_CoroutineAwait_dealloc(PyObject *self) { PyObject_GC_UnTrack(self); Py_CLEAR(((__pyx_CoroutineAwaitObject*)self)->coroutine); PyObject_GC_Del(self); @@ -261881,7 +244059,7 @@ static PyObject *__Pyx_CoroutineAwait_Send(__pyx_CoroutineAwaitObject *self, PyO static PyObject *__Pyx_CoroutineAwait_Throw(__pyx_CoroutineAwaitObject *self, PyObject *args) { return __Pyx_Coroutine_Throw(self->coroutine, args); } -static PyObject *__Pyx_CoroutineAwait_Close(__pyx_CoroutineAwaitObject *self) { +static PyObject *__Pyx_CoroutineAwait_Close(__pyx_CoroutineAwaitObject *self, CYTHON_UNUSED PyObject *arg) { return __Pyx_Coroutine_Close(self->coroutine); } static PyObject *__Pyx_CoroutineAwait_self(PyObject *self) { @@ -261959,6 +244137,7 @@ static PyTypeObject __pyx_CoroutineAwaitType_type = { 0, #endif }; +#if PY_VERSION_HEX < 0x030500B1 || defined(__Pyx_IterableCoroutine_USED) || CYTHON_USE_ASYNC_SLOTS static CYTHON_INLINE PyObject *__Pyx__Coroutine_await(PyObject *coroutine) { __pyx_CoroutineAwaitObject *await = PyObject_GC_New(__pyx_CoroutineAwaitObject, __pyx_CoroutineAwaitType); if (unlikely(!await)) return NULL; @@ -261967,6 +244146,13 @@ static CYTHON_INLINE PyObject *__Pyx__Coroutine_await(PyObject *coroutine) { PyObject_GC_Track(await); return (PyObject*)await; } +#endif +#if PY_VERSION_HEX < 0x030500B1 +static PyObject *__Pyx_Coroutine_await_method(PyObject *coroutine, CYTHON_UNUSED PyObject *arg) { + return __Pyx__Coroutine_await(coroutine); +} +#endif +#if defined(__Pyx_IterableCoroutine_USED) || CYTHON_USE_ASYNC_SLOTS static PyObject *__Pyx_Coroutine_await(PyObject *coroutine) { if (unlikely(!coroutine || !__Pyx_Coroutine_Check(coroutine))) { PyErr_SetString(PyExc_TypeError, "invalid input, expected coroutine"); @@ -261974,8 +244160,9 @@ static PyObject *__Pyx_Coroutine_await(PyObject *coroutine) { } return __Pyx__Coroutine_await(coroutine); } +#endif static PyObject * -__Pyx_Coroutine_get_frame(CYTHON_UNUSED __pyx_CoroutineObject *self) +__Pyx_Coroutine_get_frame(CYTHON_UNUSED __pyx_CoroutineObject *self, CYTHON_UNUSED void *context) { Py_RETURN_NONE; } @@ -261997,10 +244184,10 @@ static PyMethodDef __pyx_Coroutine_methods[] = { (char*) PyDoc_STR("send(arg) -> send 'arg' into coroutine,\nreturn next iterated value or raise StopIteration.")}, {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS, (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in coroutine,\nreturn next iterated value or raise StopIteration.")}, - {"close", (PyCFunction) __Pyx_Coroutine_Close, METH_NOARGS, + {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS, (char*) PyDoc_STR("close() -> raise GeneratorExit inside coroutine.")}, #if PY_VERSION_HEX < 0x030500B1 - {"__await__", (PyCFunction) __Pyx_Coroutine_await, METH_NOARGS, + {"__await__", (PyCFunction) __Pyx_Coroutine_await_method, METH_NOARGS, (char*) PyDoc_STR("__await__() -> return an iterator to be used in await expression.")}, #endif {0, 0, 0, 0} @@ -262111,7 +244298,7 @@ static int __pyx_Coroutine_init(void) { } /* GetAwaitIter */ - static CYTHON_INLINE PyObject *__Pyx_Coroutine_GetAwaitableIter(PyObject *o) { +static CYTHON_INLINE PyObject *__Pyx_Coroutine_GetAwaitableIter(PyObject *o) { #ifdef __Pyx_Coroutine_USED if (__Pyx_Coroutine_Check(o)) { return __Pyx_NewRef(o); @@ -262171,19 +244358,14 @@ static PyObject *__Pyx__Coroutine_GetAwaitableIter(PyObject *obj) { } else #endif { - PyObject *method = __Pyx_PyObject_GetAttrStr(obj, __pyx_n_s_await); - if (unlikely(!method)) goto slot_error; - #if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(method))) { - PyObject *self = PyMethod_GET_SELF(method); - if (likely(self)) { - PyObject *function = PyMethod_GET_FUNCTION(method); - res = __Pyx_PyObject_CallOneArg(function, self); - } else - res = __Pyx_PyObject_CallNoArg(method); - } else - #endif + PyObject *method = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, __pyx_n_s_await, &method); + if (likely(is_method)) { + res = __Pyx_PyObject_CallOneArg(method, obj); + } else if (likely(method)) { res = __Pyx_PyObject_CallNoArg(method); + } else + goto slot_error; Py_DECREF(method); } if (unlikely(!res)) { @@ -262221,7 +244403,7 @@ bad: } /* CoroutineYieldFrom */ - static PyObject* __Pyx__Coroutine_Yield_From_Generic(__pyx_CoroutineObject *gen, PyObject *source) { +static PyObject* __Pyx__Coroutine_Yield_From_Generic(__pyx_CoroutineObject *gen, PyObject *source) { PyObject *retval; PyObject *source_gen = __Pyx__Coroutine_GetAwaitableIter(source); if (unlikely(!source_gen)) { @@ -262268,7 +244450,7 @@ static CYTHON_INLINE PyObject* __Pyx_Coroutine_Yield_From(__pyx_CoroutineObject } /* py_dict_values */ - static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { if (PY_MAJOR_VERSION >= 3) return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_values, d); else @@ -262276,20 +244458,20 @@ static CYTHON_INLINE PyObject* __Pyx_Coroutine_Yield_From(__pyx_CoroutineObject } /* CallUnboundCMethod2 */ - #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1 +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1 static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { if (likely(cfunc->func)) { PyObject *args[2] = {arg1, arg2}; if (cfunc->flag == METH_FASTCALL) { #if PY_VERSION_HEX >= 0x030700A0 - return (*(__Pyx_PyCFunctionFast)cfunc->func)(self, args, 2); + return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2); #else - return (*(__Pyx_PyCFunctionFastWithKeywords)cfunc->func)(self, args, 2, NULL); + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL); #endif } #if PY_VERSION_HEX >= 0x030700A0 if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) - return (*(__Pyx_PyCFunctionFastWithKeywords)cfunc->func)(self, args, 2, NULL); + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL); #endif } return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); @@ -262307,7 +244489,7 @@ static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObje Py_INCREF(arg2); PyTuple_SET_ITEM(args, 1, arg2); if (cfunc->flag & METH_KEYWORDS) - result = (*(PyCFunctionWithKeywords)cfunc->func)(self, args, NULL); + result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); else result = (*cfunc->func)(self, args); } else { @@ -262332,7 +244514,7 @@ bad: } /* dict_getitem_default */ - static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { +static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { PyObject* value; #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY value = PyDict_GetItemWithError(d, key); @@ -262362,7 +244544,7 @@ bad: } /* MergeKeywords */ - static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping) { +static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping) { PyObject *iter, *key = NULL, *value = NULL; int source_is_dict, result; Py_ssize_t orig_length, ppos = 0; @@ -262404,7 +244586,7 @@ bad: } /* set_iter */ - static CYTHON_INLINE PyObject* __Pyx_set_iterator(PyObject* iterable, int is_set, +static CYTHON_INLINE PyObject* __Pyx_set_iterator(PyObject* iterable, int is_set, Py_ssize_t* p_orig_length, int* p_source_is_set) { #if CYTHON_COMPILING_IN_CPYTHON is_set = is_set || likely(PySet_CheckExact(iterable) || PyFrozenSet_CheckExact(iterable)); @@ -262455,7 +244637,7 @@ static CYTHON_INLINE int __Pyx_set_iter_next( } /* CIntToPyUnicode */ - #ifdef _MSC_VER +#ifdef _MSC_VER #ifndef _MSC_STDINT_H_ #if _MSC_VER < 1300 typedef unsigned short uint16_t; @@ -262473,7 +244655,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_xmlXPathObjectType(xmlXPathO Py_ssize_t length, ulength; int prepend_sign, last_one_off; xmlXPathObjectType remaining; - const xmlXPathObjectType neg_one = (xmlXPathObjectType) -1, const_zero = (xmlXPathObjectType) 0; + const xmlXPathObjectType neg_one = (xmlXPathObjectType) ((xmlXPathObjectType) 0 - (xmlXPathObjectType) 1), const_zero = (xmlXPathObjectType) 0; const int is_unsigned = neg_one > const_zero; if (format_char == 'X') { hex_digits += 16; @@ -262534,7 +244716,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_xmlXPathObjectType(xmlXPathO } /* CallNextTpTraverse */ - static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) { +static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) { PyTypeObject* type = Py_TYPE(obj); while (type && type->tp_traverse != current_tp_traverse) type = type->tp_base; @@ -262546,7 +244728,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_xmlXPathObjectType(xmlXPathO } /* CallNextTpClear */ - static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) { +static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) { PyTypeObject* type = Py_TYPE(obj); while (type && type->tp_clear != current_tp_clear) type = type->tp_base; @@ -262557,7 +244739,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_xmlXPathObjectType(xmlXPathO } /* PyObject_GenericGetAttr */ - #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { return PyObject_GenericGetAttr(obj, attr_name); @@ -262567,7 +244749,7 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam #endif /* SetVTable */ - static int __Pyx_SetVtable(PyObject *dict, void *vtable) { +static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 PyObject *ob = PyCapsule_New(vtable, 0, 0); #else @@ -262584,8 +244766,69 @@ bad: return -1; } +/* TypeImport */ +#ifndef __PYX_HAVE_RT_ImportType +#define __PYX_HAVE_RT_ImportType +static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name, + size_t size, enum __Pyx_ImportType_CheckSize check_size) +{ + PyObject *result = 0; + char warning[200]; + Py_ssize_t basicsize; +#ifdef Py_LIMITED_API + PyObject *py_basicsize; +#endif + result = PyObject_GetAttrString(module, class_name); + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#ifndef Py_LIMITED_API + basicsize = ((PyTypeObject *)result)->tp_basicsize; +#else + py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); + if (!py_basicsize) + goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; +#endif + if ((size_t)basicsize < size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + goto bad; + } + if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + goto bad; + } + else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) { + PyOS_snprintf(warning, sizeof(warning), + "%s.%s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(result); + return NULL; +} +#endif + /* CalculateMetaclass */ - static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases); for (i=0; i < nbases; i++) { PyTypeObject *tmptype; @@ -262624,7 +244867,7 @@ bad: } /* CythonFunction */ - #include +#include static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) { @@ -262646,7 +244889,7 @@ __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure return op->func_doc; } static int -__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value) +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp = op->func_doc; if (value == NULL) { @@ -262658,7 +244901,7 @@ __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value) return 0; } static PyObject * -__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { if (unlikely(op->func_name == NULL)) { #if PY_MAJOR_VERSION >= 3 @@ -262673,14 +244916,15 @@ __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op) return op->func_name; } static int -__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value) +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 - if (unlikely(value == NULL || !PyUnicode_Check(value))) { + if (unlikely(value == NULL || !PyUnicode_Check(value))) #else - if (unlikely(value == NULL || !PyString_Check(value))) { + if (unlikely(value == NULL || !PyString_Check(value))) #endif + { PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; @@ -262692,20 +244936,21 @@ __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value) return 0; } static PyObject * -__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(op->func_qualname); return op->func_qualname; } static int -__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value) +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 - if (unlikely(value == NULL || !PyUnicode_Check(value))) { + if (unlikely(value == NULL || !PyUnicode_Check(value))) #else - if (unlikely(value == NULL || !PyString_Check(value))) { + if (unlikely(value == NULL || !PyString_Check(value))) #endif + { PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; @@ -262727,7 +244972,7 @@ __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure return self; } static PyObject * -__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); @@ -262738,7 +244983,7 @@ __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op) return op->func_dict; } static int -__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value) +__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; if (unlikely(value == NULL)) { @@ -262758,19 +245003,19 @@ __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value) return 0; } static PyObject * -__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(op->func_globals); return op->func_globals; } static PyObject * -__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(Py_None); return Py_None; } static PyObject * -__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = (op->func_code) ? op->func_code : Py_None; Py_INCREF(result); @@ -262799,7 +245044,7 @@ __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { return result; } static int -__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) { +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value) { value = Py_None; @@ -262815,7 +245060,7 @@ __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) { return 0; } static PyObject * -__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) { +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->defaults_tuple; if (unlikely(!result)) { if (op->defaults_getter) { @@ -262829,7 +245074,7 @@ __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) { return result; } static int -__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) { +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value) { value = Py_None; @@ -262845,7 +245090,7 @@ __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) { return 0; } static PyObject * -__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) { +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->defaults_kwdict; if (unlikely(!result)) { if (op->defaults_getter) { @@ -262859,7 +245104,7 @@ __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) { return result; } static int -__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) { +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value || value == Py_None) { value = NULL; @@ -262875,7 +245120,7 @@ __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) { return 0; } static PyObject * -__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) { +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->func_annotations; if (unlikely(!result)) { result = PyDict_New(); @@ -263055,7 +245300,7 @@ static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, Py return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: - return (*(PyCFunctionWithKeywords)meth)(self, arg, kw); + return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { size = PyTuple_GET_SIZE(arg); @@ -263218,7 +245463,7 @@ static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, Py } /* Py3ClassCreate */ - static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { PyObject *ns; if (metaclass) { @@ -263285,7 +245530,7 @@ static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObj } /* PatchInspect */ - static PyObject* __Pyx_patch_inspect(PyObject* module) { +static PyObject* __Pyx_patch_inspect(PyObject* module) { #if defined(__Pyx_Generator_USED) && (!defined(CYTHON_PATCH_INSPECT) || CYTHON_PATCH_INSPECT) static int inspect_patched = 0; if (unlikely((!inspect_patched) && module)) { @@ -263310,15 +245555,17 @@ static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObj } /* GetNameInClass */ - static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) { +static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) { + PyObject *result; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) return NULL; __Pyx_PyErr_Clear(); - return __Pyx_GetModuleGlobalName(name); + __Pyx_GetModuleGlobalNameUncached(result, name); + return result; } -static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name) { +static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) { PyObject *result; result = __Pyx_PyObject_GetAttrStr(nmspace, name); if (!result) { @@ -263328,14 +245575,14 @@ static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name) { } /* ClassMethod */ - static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { +static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM <= 0x05080000 if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) { return PyClassMethod_New(method); } #else #if CYTHON_COMPILING_IN_PYSTON || CYTHON_COMPILING_IN_PYPY - if (PyMethodDescr_Check(method)) { + if (PyMethodDescr_Check(method)) #else static PyTypeObject *methoddescr_type = NULL; if (methoddescr_type == NULL) { @@ -263344,8 +245591,9 @@ static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name) { methoddescr_type = Py_TYPE(meth); Py_DECREF(meth); } - if (__Pyx_TypeCheck(method, methoddescr_type)) { + if (__Pyx_TypeCheck(method, methoddescr_type)) #endif + { PyMethodDescrObject *descr = (PyMethodDescrObject *)method; #if PY_VERSION_HEX < 0x03020000 PyTypeObject *d_type = descr->d_type; @@ -263362,7 +245610,7 @@ static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name) { return PyClassMethod_New(method); } #ifdef __Pyx_CyFunction_USED - else if (__Pyx_TypeCheck(method, __pyx_CyFunctionType)) { + else if (__Pyx_CyFunction_Check(method)) { return PyClassMethod_New(method); } #endif @@ -263372,26 +245620,8 @@ static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name) { return NULL; } -/* ModuleImport */ - #ifndef __PYX_HAVE_RT_ImportModule -#define __PYX_HAVE_RT_ImportModule -static PyObject *__Pyx_ImportModule(const char *name) { - PyObject *py_name = 0; - PyObject *py_module = 0; - py_name = __Pyx_PyIdentifier_FromString(name); - if (!py_name) - goto bad; - py_module = PyImport_Import(py_name); - Py_DECREF(py_name); - return py_module; -bad: - Py_XDECREF(py_name); - return 0; -} -#endif - /* RegisterModuleCleanup */ - #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY +#if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY static PyObject* __pyx_module_cleanup_atexit(PyObject *module, CYTHON_UNUSED PyObject *unused) { __pyx_module_cleanup(module); Py_INCREF(Py_None); return Py_None; @@ -263408,7 +245638,7 @@ static int __Pyx_RegisterCleanup(void) { cleanup_func = PyCFunction_New(&cleanup_def, 0); if (!cleanup_func) goto bad; - atexit = __Pyx_ImportModule("atexit"); + atexit = PyImport_ImportModule("atexit"); if (!atexit) goto bad; reg = PyObject_GetAttrString(atexit, "_exithandlers"); @@ -263450,16 +245680,11 @@ bad: Py_XDECREF(res); return ret; } -#else -static int __Pyx_RegisterCleanup(void) { - (void)__Pyx_ImportModule; - return 0; -} #endif /* CLineInTraceback */ - #ifndef CYTHON_CLINE_IN_TRACEBACK -static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) { +#ifndef CYTHON_CLINE_IN_TRACEBACK +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON @@ -263472,7 +245697,9 @@ static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_li #if CYTHON_COMPILING_IN_CPYTHON cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); if (likely(cython_runtime_dict)) { - use_cline = __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback); + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) } else #endif { @@ -263489,7 +245716,7 @@ static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_li c_line = 0; PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); } - else if (PyObject_Not(use_cline) != 0) { + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { c_line = 0; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); @@ -263498,7 +245725,7 @@ static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_li #endif /* CodeObjectCache */ - static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; @@ -263578,7 +245805,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { } /* AddTraceback */ - #include "compile.h" +#include "compile.h" #include "frameobject.h" #include "traceback.h" static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( @@ -263663,7 +245890,7 @@ bad: } /* CIntFromPyVerify */ - #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) @@ -263685,7 +245912,7 @@ bad: } /* Print */ - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 +#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 static PyObject *__Pyx_GetStdout(void) { PyObject *f = PySys_GetObject((char *)"stdout"); if (!f) { @@ -263791,8 +246018,8 @@ bad: #endif /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_xmlParserErrors(xmlParserErrors value) { - const xmlParserErrors neg_one = (xmlParserErrors) -1, const_zero = (xmlParserErrors) 0; +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_xmlParserErrors(xmlParserErrors value) { + const xmlParserErrors neg_one = (xmlParserErrors) ((xmlParserErrors) 0 - (xmlParserErrors) 1), const_zero = (xmlParserErrors) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(xmlParserErrors) < sizeof(long)) { @@ -263822,8 +246049,8 @@ bad: } /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { - const long neg_one = (long) -1, const_zero = (long) 0; +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { @@ -263853,8 +246080,8 @@ bad: } /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - const int neg_one = (int) -1, const_zero = (int) 0; +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { + const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { @@ -263884,8 +246111,8 @@ bad: } /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value) { - const char neg_one = (char) -1, const_zero = (char) 0; +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value) { + const char neg_one = (char) ((char) 0 - (char) 1), const_zero = (char) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(char) < sizeof(long)) { @@ -263915,8 +246142,8 @@ bad: } /* CIntFromPy */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - const int neg_one = (int) -1, const_zero = (int) 0; +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { + const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { @@ -264104,7 +246331,7 @@ raise_neg_overflow: } /* PrintOne */ - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 +#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 static int __Pyx_PrintOne(PyObject* f, PyObject *o) { if (!f) { if (!(f = __Pyx_GetStdout())) @@ -264141,8 +246368,8 @@ static int __Pyx_PrintOne(PyObject* stream, PyObject *o) { #endif /* CIntFromPy */ - static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { - const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; +static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { + const size_t neg_one = (size_t) ((size_t) 0 - (size_t) 1), const_zero = (size_t) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { @@ -264330,8 +246557,8 @@ raise_neg_overflow: } /* CIntFromPy */ - static CYTHON_INLINE signed char __Pyx_PyInt_As_signed__char(PyObject *x) { - const signed char neg_one = (signed char) -1, const_zero = (signed char) 0; +static CYTHON_INLINE signed char __Pyx_PyInt_As_signed__char(PyObject *x) { + const signed char neg_one = (signed char) ((signed char) 0 - (signed char) 1), const_zero = (signed char) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { @@ -264519,8 +246746,8 @@ raise_neg_overflow: } /* CIntFromPy */ - static CYTHON_INLINE unsigned short __Pyx_PyInt_As_unsigned_short(PyObject *x) { - const unsigned short neg_one = (unsigned short) -1, const_zero = (unsigned short) 0; +static CYTHON_INLINE unsigned short __Pyx_PyInt_As_unsigned_short(PyObject *x) { + const unsigned short neg_one = (unsigned short) ((unsigned short) 0 - (unsigned short) 1), const_zero = (unsigned short) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { @@ -264708,8 +246935,8 @@ raise_neg_overflow: } /* CIntFromPy */ - static CYTHON_INLINE xmlChar __Pyx_PyInt_As_xmlChar(PyObject *x) { - const xmlChar neg_one = (xmlChar) -1, const_zero = (xmlChar) 0; +static CYTHON_INLINE xmlChar __Pyx_PyInt_As_xmlChar(PyObject *x) { + const xmlChar neg_one = (xmlChar) ((xmlChar) 0 - (xmlChar) 1), const_zero = (xmlChar) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { @@ -264897,8 +247124,8 @@ raise_neg_overflow: } /* CIntFromPy */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - const long neg_one = (long) -1, const_zero = (long) 0; +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { @@ -265086,19 +247313,19 @@ raise_neg_overflow: } /* BytesContains */ - static CYTHON_INLINE int __Pyx_BytesContains(PyObject* bytes, char character) { +static CYTHON_INLINE int __Pyx_BytesContains(PyObject* bytes, char character) { const Py_ssize_t length = PyBytes_GET_SIZE(bytes); char* char_start = PyBytes_AS_STRING(bytes); return memchr(char_start, (unsigned char)character, (size_t)length) != NULL; } /* Generator */ - static PyMethodDef __pyx_Generator_methods[] = { +static PyMethodDef __pyx_Generator_methods[] = { {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O, (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")}, {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS, (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")}, - {"close", (PyCFunction) __Pyx_Coroutine_Close, METH_NOARGS, + {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS, (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")}, {0, 0, 0, 0} }; @@ -265185,7 +247412,7 @@ static int __pyx_Generator_init(void) { } /* CheckBinaryVersion */ - static int __Pyx_check_binary_version(void) { +static int __Pyx_check_binary_version(void) { char ctversion[4], rtversion[4]; PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion()); @@ -265201,7 +247428,7 @@ static int __pyx_Generator_init(void) { } /* FunctionExport */ - static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { PyObject *d = 0; PyObject *cobj = 0; union { @@ -265237,73 +247464,8 @@ bad: return -1; } -/* TypeImport */ - #ifndef __PYX_HAVE_RT_ImportType -#define __PYX_HAVE_RT_ImportType -static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, - size_t size, int strict) -{ - PyObject *py_module = 0; - PyObject *result = 0; - PyObject *py_name = 0; - char warning[200]; - Py_ssize_t basicsize; -#ifdef Py_LIMITED_API - PyObject *py_basicsize; -#endif - py_module = __Pyx_ImportModule(module_name); - if (!py_module) - goto bad; - py_name = __Pyx_PyIdentifier_FromString(class_name); - if (!py_name) - goto bad; - result = PyObject_GetAttr(py_module, py_name); - Py_DECREF(py_name); - py_name = 0; - Py_DECREF(py_module); - py_module = 0; - if (!result) - goto bad; - if (!PyType_Check(result)) { - PyErr_Format(PyExc_TypeError, - "%.200s.%.200s is not a type object", - module_name, class_name); - goto bad; - } -#ifndef Py_LIMITED_API - basicsize = ((PyTypeObject *)result)->tp_basicsize; -#else - py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); - if (!py_basicsize) - goto bad; - basicsize = PyLong_AsSsize_t(py_basicsize); - Py_DECREF(py_basicsize); - py_basicsize = 0; - if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) - goto bad; -#endif - if (!strict && (size_t)basicsize > size) { - PyOS_snprintf(warning, sizeof(warning), - "%s.%s size changed, may indicate binary incompatibility. Expected %zd, got %zd", - module_name, class_name, basicsize, size); - if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; - } - else if ((size_t)basicsize != size) { - PyErr_Format(PyExc_ValueError, - "%.200s.%.200s has the wrong size, try recompiling. Expected %zd, got %zd", - module_name, class_name, basicsize, size); - goto bad; - } - return (PyTypeObject *)result; -bad: - Py_XDECREF(py_module); - Py_XDECREF(result); - return NULL; -} -#endif - /* InitStrings */ - static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { +static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 if (t->is_unicode) { @@ -265412,6 +247574,13 @@ static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { #if PY_MAJOR_VERSION >= 3 if (PyLong_Check(result)) { @@ -265489,7 +247658,7 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else - return PyInt_AsSsize_t(x); + return PyInt_AsSsize_t(b); } #endif if (likely(PyLong_CheckExact(b))) { diff --git a/src/lxml/etree.h b/src/lxml/etree.h index a2fcf33..dcf7398 100644 --- a/src/lxml/etree.h +++ b/src/lxml/etree.h @@ -1,4 +1,4 @@ -/* Generated by Cython 0.28.5 */ +/* Generated by Cython 0.29.2 */ #ifndef __PYX_HAVE__lxml__etree #define __PYX_HAVE__lxml__etree @@ -12,7 +12,7 @@ struct LxmlElementBase; struct LxmlElementClassLookup; struct LxmlFallbackElementClassLookup; -/* "lxml/etree.pyx":320 +/* "lxml/etree.pyx":318 * * # type of a function that steps from node to node * ctypedef public xmlNode* (*_node_to_node_function)(xmlNode*) # <<<<<<<<<<<<<< @@ -21,7 +21,7 @@ struct LxmlFallbackElementClassLookup; */ typedef xmlNode *(*_node_to_node_function)(xmlNode *); -/* "lxml/etree.pyx":336 +/* "lxml/etree.pyx":334 * @cython.final * @cython.freelist(8) * cdef public class _Document [ type LxmlDocumentType, object LxmlDocument ]: # <<<<<<<<<<<<<< @@ -37,7 +37,7 @@ struct LxmlDocument { struct __pyx_obj_4lxml_5etree__BaseParser *_parser; }; -/* "lxml/etree.pyx":685 +/* "lxml/etree.pyx":683 * * @cython.no_gc_clear * cdef public class _Element [ type LxmlElementType, object LxmlElement ]: # <<<<<<<<<<<<<< @@ -51,7 +51,7 @@ struct LxmlElement { PyObject *_tag; }; -/* "lxml/etree.pyx":1849 +/* "lxml/etree.pyx":1847 * * * cdef public class _ElementTree [ type LxmlElementTreeType, # <<<<<<<<<<<<<< @@ -65,7 +65,7 @@ struct LxmlElementTree { struct LxmlElement *_context_node; }; -/* "lxml/etree.pyx":2576 +/* "lxml/etree.pyx":2574 * * * cdef public class _ElementTagMatcher [ object LxmlElementTagMatcher, # <<<<<<<<<<<<<< @@ -81,7 +81,7 @@ struct LxmlElementTagMatcher { char *_name; }; -/* "lxml/etree.pyx":2607 +/* "lxml/etree.pyx":2605 * self._name = NULL * * cdef public class _ElementIterator(_ElementTagMatcher) [ # <<<<<<<<<<<<<< diff --git a/src/lxml/etree.pyx b/src/lxml/etree.pyx index acea9d2..3ba5079 100644 --- a/src/lxml/etree.pyx +++ b/src/lxml/etree.pyx @@ -1,5 +1,6 @@ # cython: binding=True # cython: auto_pickle=False +# cython: language_level=2 """ The ``lxml.etree`` module implements the extended ElementTree API for XML. @@ -65,11 +66,8 @@ from os.path import abspath as os_path_abspath cdef object BytesIO, StringIO from io import BytesIO, StringIO -cdef object OrderedDict = None -try: - from collections import OrderedDict -except ImportError: - pass +cdef object OrderedDict +from collections import OrderedDict cdef object _elementpath from lxml import _elementpath @@ -91,7 +89,7 @@ cdef object ITER_EMPTY = iter(()) try: from collections.abc import MutableMapping # Py3.3+ except ImportError: - from collections import MutableMapping # Py2.6+ + from collections import MutableMapping # Py2.7 class _ImmutableMapping(MutableMapping): def __getitem__(self, key): @@ -388,7 +386,7 @@ cdef public class _Document [ type LxmlDocumentType, object LxmlDocument ]: root_name = None else: root_name = funicode(c_root_node.name) - return (root_name, public_id, sys_url) + return root_name, public_id, sys_url @cython.final cdef getxmlinfo(self): @@ -402,7 +400,7 @@ cdef public class _Document [ type LxmlDocumentType, object LxmlDocument ]: encoding = None else: encoding = funicode(c_doc.encoding) - return (version, encoding) + return version, encoding @cython.final cdef isstandalone(self): @@ -3277,9 +3275,9 @@ def tostring(element_or_tree, *, encoding=None, method="xml", declaration by default. You can also serialise to a Unicode string without declaration by - passing the ``unicode`` function as encoding (or ``str`` in Py3), - or the name 'unicode'. This changes the return value from a byte - string to an unencoded unicode string. + passing the name ``'unicode'`` as encoding (or the ``str`` function + in Py3 or ``unicode`` in Py2). This changes the return value from + a byte string to an unencoded unicode string. The keyword argument 'pretty_print' (bool) enables formatted XML. @@ -3437,7 +3435,6 @@ def adopt_external_document(capsule, _BaseParser parser=None): This allows external libraries to build XML/HTML trees using libxml2 and then pass them efficiently into lxml for further processing. - Requires Python 2.7 or later. If a ``parser`` is provided, it will be used for configuring the lxml document. No parsing will be done. @@ -3461,9 +3458,6 @@ def adopt_external_document(capsule, _BaseParser parser=None): If no copy is made, later modifications of the tree outside of lxml should not be attempted after transferring the ownership. """ - if python.PY_VERSION_HEX < 0x02070000: - raise NotImplementedError("PyCapsule usage requires Python 2.7+") - cdef xmlDoc* c_doc cdef bint is_owned = False c_doc = python.lxml_unpack_xmldoc_capsule(capsule, &is_owned) diff --git a/src/lxml/etree_api.h b/src/lxml/etree_api.h index a5dd0e1..912f48c 100644 --- a/src/lxml/etree_api.h +++ b/src/lxml/etree_api.h @@ -1,7 +1,10 @@ -/* Generated by Cython 0.28.5 */ +/* Generated by Cython 0.29.2 */ #ifndef __PYX_HAVE_API__lxml__etree #define __PYX_HAVE_API__lxml__etree +#ifdef __MINGW64__ +#define MS_WIN64 +#endif #include "Python.h" #include "etree.h" @@ -103,23 +106,6 @@ static xmlNs *(*__pyx_api_f_4lxml_5etree_findOrBuildNodeNsPrefix)(struct LxmlDoc #endif #endif -#ifndef __PYX_HAVE_RT_ImportModule -#define __PYX_HAVE_RT_ImportModule -static PyObject *__Pyx_ImportModule(const char *name) { - PyObject *py_name = 0; - PyObject *py_module = 0; - py_name = __Pyx_PyIdentifier_FromString(name); - if (!py_name) - goto bad; - py_module = PyImport_Import(py_name); - Py_DECREF(py_name); - return py_module; -bad: - Py_XDECREF(py_name); - return 0; -} -#endif - #ifndef __PYX_HAVE_RT_ImportFunction #define __PYX_HAVE_RT_ImportFunction static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { @@ -176,7 +162,7 @@ bad: static int import_lxml__etree(void) { PyObject *module = 0; - module = __Pyx_ImportModule("lxml.etree"); + module = PyImport_ImportModule("lxml.etree"); if (!module) goto bad; if (__Pyx_ImportFunction(module, "deepcopyNodeToDocument", (void (**)(void))&__pyx_api_f_4lxml_5etree_deepcopyNodeToDocument, "struct LxmlElement *(struct LxmlDocument *, xmlNode *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "elementTreeFactory", (void (**)(void))&__pyx_api_f_4lxml_5etree_elementTreeFactory, "struct LxmlElementTree *(struct LxmlElement *)") < 0) goto bad; diff --git a/src/lxml/html/__init__.py b/src/lxml/html/__init__.py index 4502373..5751f70 100644 --- a/src/lxml/html/__init__.py +++ b/src/lxml/html/__init__.py @@ -46,7 +46,6 @@ import re from functools import partial try: - # while unnecessary, importing from 'collections.abc' is the right way to do it from collections.abc import MutableMapping, MutableSet except ImportError: from collections import MutableMapping, MutableSet diff --git a/src/lxml/html/_setmixin.py b/src/lxml/html/_setmixin.py index c14a3eb..c99738e 100644 --- a/src/lxml/html/_setmixin.py +++ b/src/lxml/html/_setmixin.py @@ -1,4 +1,8 @@ -from collections import MutableSet +try: + from collections.abc import MutableSet +except ImportError: + from collections import MutableSet + class SetMixin(MutableSet): diff --git a/src/lxml/html/clean.c b/src/lxml/html/clean.c index fd6bb14..e730f6d 100644 --- a/src/lxml/html/clean.c +++ b/src/lxml/html/clean.c @@ -1,27 +1,27 @@ -/* Generated by Cython 0.28.5 */ +/* Generated by Cython 0.29.2 */ /* BEGIN: Cython Metadata { "distutils": { "define_macros": [ [ - "CYTHON_CLINE_IN_TRACEBACK", + "CYTHON_CLINE_IN_TRACEBACK", "0" ] - ], + ], "extra_compile_args": [ "-w" - ], + ], "include_dirs": [ - "/usr/include/libxml2", - "src", + "/usr/include/libxml2", + "src", "src/lxml/includes" - ], - "name": "lxml.html.clean", + ], + "name": "lxml.html.clean", "sources": [ "src/lxml/html/clean.py" ] - }, + }, "module_name": "lxml.html.clean" } END: Cython Metadata */ @@ -33,7 +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_28_5" +#define CYTHON_ABI "0_29_2" +#define CYTHON_HEX_VERSION 0x001D02F0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof @@ -104,6 +105,10 @@ END: Cython Metadata */ #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 #elif defined(PYSTON_VERSION) #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 1 @@ -141,6 +146,10 @@ END: Cython Metadata */ #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 0 @@ -194,11 +203,17 @@ END: Cython Metadata */ #define CYTHON_FAST_PYCALL 1 #endif #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (0 && PY_VERSION_HEX >= 0x03050000) + #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) #endif #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) #endif + #ifndef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) + #endif #endif #if !defined(CYTHON_FAST_PYCCALL) #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) @@ -208,6 +223,9 @@ END: Cython Metadata */ #undef SHIFT #undef BASE #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif #endif #ifndef __has_attribute #define __has_attribute(x) 0 @@ -334,6 +352,9 @@ END: Cython Metadata */ #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) #ifndef METH_FASTCALL #define METH_FASTCALL 0x80 @@ -347,15 +368,40 @@ END: Cython Metadata */ #endif #if CYTHON_FAST_PYCCALL #define __Pyx_PyFastCFunction_Check(func)\ - ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS))))) + ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))))) #else #define __Pyx_PyFastCFunction_Check(func) 0 #endif +#if CYTHON_USE_DICT_VERSIONS +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ + } +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) #define PyObject_Malloc(s) PyMem_Malloc(s) #define PyObject_Free(p) PyMem_Free(p) #define PyObject_Realloc(p) PyMem_Realloc(p) #endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 + #define PyMem_RawMalloc(n) PyMem_Malloc(n) + #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) + #define PyMem_RawFree(p) PyMem_Free(p) +#endif #if CYTHON_COMPILING_IN_PYSTON #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) @@ -463,8 +509,8 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) #endif -#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) -#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else @@ -616,6 +662,9 @@ typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* enc (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) @@ -674,6 +723,7 @@ static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); #define __Pyx_PySequence_Tuple(obj)\ (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) @@ -754,7 +804,7 @@ static int __Pyx_init_sys_getdefaultencoding_params(void) { if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; - __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); + __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); @@ -886,7 +936,25 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject static PyObject *__Pyx_GetBuiltinName(PyObject *name); /* GetModuleGlobalName.proto */ -static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +#define __Pyx_GetModuleGlobalNameUncached(var, name) {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif /* PyCFunctionFastCall.proto */ #if CYTHON_FAST_PYCCALL @@ -904,6 +972,18 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, #else #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) #endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) #endif /* PyObjectCall.proto */ @@ -913,6 +993,9 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif +/* PyObjectCall2Args.proto */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + /* PyObjectCallMethO.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); @@ -953,11 +1036,11 @@ static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObje (likely((cfunc)->flag == METH_NOARGS) ? (*((cfunc)->func))(self, NULL) :\ (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ?\ (PY_VERSION_HEX >= 0x030700A0 ?\ - (*(__Pyx_PyCFunctionFast)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\ - (*(__Pyx_PyCFunctionFastWithKeywords)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\ + (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\ + (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\ (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\ - (*(__Pyx_PyCFunctionFastWithKeywords)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\ - (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\ + (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\ + (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\ ((cfunc)->flag == METH_VARARGS ? (*((cfunc)->func))(self, __pyx_empty_tuple) :\ __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\ __Pyx__CallUnboundCMethod0(cfunc, self)) @@ -1119,9 +1202,11 @@ static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); +/* PyObjectGetMethod.proto */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); + /* PyObjectCallMethod1.proto */ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); -static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg); /* pop_index.proto */ static PyObject* __Pyx__PyObject_PopNewIndex(PyObject* L, PyObject* py_ix); @@ -1191,6 +1276,7 @@ typedef struct { PyObject *func_annotations; } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; +#define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType)) #define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\ __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code) static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, @@ -1248,6 +1334,11 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /* ImportFrom.proto */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); +/* GetTopmostException.proto */ +#if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + /* SaveResetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) @@ -1295,21 +1386,13 @@ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); -/* PyIdentifierFromString.proto */ -#if !defined(__Pyx_PyIdentifier_FromString) -#if PY_MAJOR_VERSION < 3 - #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) -#else - #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) -#endif -#endif - -/* ModuleImport.proto */ -static PyObject *__Pyx_ImportModule(const char *name); - /* RegisterModuleCleanup.proto */ static void __pyx_module_cleanup(PyObject *self); +#if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY static int __Pyx_RegisterCleanup(void); +#else +#define __Pyx_RegisterCleanup() (0) +#endif /* CLineInTraceback.proto */ #ifdef CYTHON_CLINE_IN_TRACEBACK @@ -1378,21 +1461,21 @@ static PyObject *__pyx_builtin_chr; static PyObject *__pyx_builtin_object; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_ValueError; +static const char __pyx_k_[] = ""; static const char __pyx_k_I[] = "I"; static const char __pyx_k_S[] = "S"; static const char __pyx_k_a[] = "a"; static const char __pyx_k_s[] = " %s "; static const char __pyx_k_x[] = "x"; -static const char __pyx_k__4[] = ""; static const char __pyx_k_el[] = "el"; static const char __pyx_k_kw[] = "kw"; static const char __pyx_k_on[] = "on"; static const char __pyx_k_re[] = "re"; -static const char __pyx_k__17[] = ":"; -static const char __pyx_k__19[] = "\\"; -static const char __pyx_k__25[] = "."; -static const char __pyx_k__27[] = ","; -static const char __pyx_k__59[] = "/\\*.*?\\*/"; +static const char __pyx_k__10[] = ":"; +static const char __pyx_k__12[] = "\\"; +static const char __pyx_k__15[] = "."; +static const char __pyx_k__16[] = ","; +static const char __pyx_k__41[] = "/\\*.*?\\*/"; static const char __pyx_k_a_z[] = "[^a-z]"; static const char __pyx_k_all[] = "__all__"; static const char __pyx_k_bad[] = "bad"; @@ -1435,7 +1518,7 @@ static const char __pyx_k_link[] = "link"; static const char __pyx_k_lxml[] = "lxml"; static const char __pyx_k_main[] = "__main__"; static const char __pyx_k_meta[] = "meta"; -static const char __pyx_k_name[] = "name"; +static const char __pyx_k_name[] = "__name__"; static const char __pyx_k_path[] = "path"; static const char __pyx_k_self[] = "self"; static const char __pyx_k_tags[] = "tags"; @@ -1448,7 +1531,6 @@ static const char __pyx_k_XPath[] = "XPath"; static const char __pyx_k_aname[] = "aname"; static const char __pyx_k_avoid[] = "avoid"; static const char __pyx_k_blink[] = "blink"; -static const char __pyx_k_bytes[] = "bytes"; static const char __pyx_k_child[] = "child"; static const char __pyx_k_class[] = "class"; static const char __pyx_k_clean[] = "clean"; @@ -1487,6 +1569,7 @@ static const char __pyx_k_frames[] = "frames"; static const char __pyx_k_iframe[] = "iframe"; static const char __pyx_k_import[] = "__import__"; static const char __pyx_k_module[] = "__module__"; +static const char __pyx_k_name_2[] = "name"; static const char __pyx_k_netloc[] = "netloc"; static const char __pyx_k_nolink[] = "nolink"; static const char __pyx_k_object[] = "object"; @@ -1658,6 +1741,7 @@ static const char __pyx_k_Cleaner_kill_conditional_comment[] = "Cleaner.kill_con static const char __pyx_k_It_does_not_make_sense_to_pass_i[] = "It does not make sense to pass in both allow_tags and remove_unknown_tags"; static const char __pyx_k_descendant_or_self_a_normalize_s[] = "descendant-or-self::a [normalize-space(@href) and substring(normalize-space(@href),1,1) != '#'] |descendant-or-self::x:a[normalize-space(@href) and substring(normalize-space(@href),1,1) != '#']"; static const char __pyx_k_Cleaner_kill_conditional_comment_2[] = "Cleaner.kill_conditional_comments"; +static PyObject *__pyx_kp_s_; static PyObject *__pyx_kp_s_127_0_0_1; static PyObject *__pyx_n_s_Cleaner; static PyObject *__pyx_n_s_Cleaner___call; @@ -1686,12 +1770,11 @@ static PyObject *__pyx_kp_s_Unknown_parameter_s_r; static PyObject *__pyx_n_s_ValueError; static PyObject *__pyx_n_s_XHTML_NAMESPACE; static PyObject *__pyx_n_s_XPath; -static PyObject *__pyx_kp_s__17; -static PyObject *__pyx_kp_s__19; -static PyObject *__pyx_kp_s__25; -static PyObject *__pyx_kp_s__27; -static PyObject *__pyx_kp_s__4; -static PyObject *__pyx_kp_s__59; +static PyObject *__pyx_kp_s__10; +static PyObject *__pyx_kp_s__12; +static PyObject *__pyx_kp_s__15; +static PyObject *__pyx_kp_s__16; +static PyObject *__pyx_kp_s__41; static PyObject *__pyx_n_s_a; static PyObject *__pyx_kp_s_a_z; static PyObject *__pyx_n_s_add_nofollow; @@ -1730,7 +1813,6 @@ static PyObject *__pyx_n_s_break_prefer_re; static PyObject *__pyx_n_s_break_text; static PyObject *__pyx_n_s_breaks; static PyObject *__pyx_n_s_button; -static PyObject *__pyx_n_s_bytes; static PyObject *__pyx_n_s_call; static PyObject *__pyx_n_s_child; static PyObject *__pyx_n_s_chr; @@ -1842,6 +1924,7 @@ static PyObject *__pyx_n_s_meta; static PyObject *__pyx_n_s_metaclass; static PyObject *__pyx_n_s_module; static PyObject *__pyx_n_s_name; +static PyObject *__pyx_n_s_name_2; static PyObject *__pyx_n_s_namespaces; static PyObject *__pyx_n_s_netloc; static PyObject *__pyx_n_s_new; @@ -1966,82 +2049,64 @@ static PyObject *__pyx_int_10; static PyObject *__pyx_int_40; static PyObject *__pyx_int_8203; static PyObject *__pyx_int_neg_1; -static PyObject *__pyx_tuple_; static PyObject *__pyx_tuple__2; static PyObject *__pyx_tuple__3; +static PyObject *__pyx_tuple__4; static PyObject *__pyx_tuple__5; static PyObject *__pyx_tuple__6; static PyObject *__pyx_tuple__7; static PyObject *__pyx_tuple__8; static PyObject *__pyx_tuple__9; -static PyObject *__pyx_slice__22; -static PyObject *__pyx_slice__29; -static PyObject *__pyx_slice__34; -static PyObject *__pyx_tuple__10; +static PyObject *__pyx_slice__14; +static PyObject *__pyx_slice__17; static PyObject *__pyx_tuple__11; -static PyObject *__pyx_tuple__12; static PyObject *__pyx_tuple__13; -static PyObject *__pyx_tuple__14; -static PyObject *__pyx_tuple__15; -static PyObject *__pyx_tuple__16; static PyObject *__pyx_tuple__18; static PyObject *__pyx_tuple__20; static PyObject *__pyx_tuple__21; +static PyObject *__pyx_tuple__22; static PyObject *__pyx_tuple__23; static PyObject *__pyx_tuple__24; static PyObject *__pyx_tuple__26; static PyObject *__pyx_tuple__28; static PyObject *__pyx_tuple__30; -static PyObject *__pyx_tuple__31; static PyObject *__pyx_tuple__32; -static PyObject *__pyx_tuple__33; -static PyObject *__pyx_tuple__35; +static PyObject *__pyx_tuple__34; static PyObject *__pyx_tuple__36; static PyObject *__pyx_tuple__38; static PyObject *__pyx_tuple__39; -static PyObject *__pyx_tuple__40; -static PyObject *__pyx_tuple__41; static PyObject *__pyx_tuple__42; static PyObject *__pyx_tuple__44; static PyObject *__pyx_tuple__46; -static PyObject *__pyx_tuple__48; -static PyObject *__pyx_tuple__50; -static PyObject *__pyx_tuple__52; -static PyObject *__pyx_tuple__54; +static PyObject *__pyx_tuple__47; +static PyObject *__pyx_tuple__49; +static PyObject *__pyx_tuple__51; +static PyObject *__pyx_tuple__53; +static PyObject *__pyx_tuple__55; static PyObject *__pyx_tuple__56; -static PyObject *__pyx_tuple__57; +static PyObject *__pyx_tuple__58; static PyObject *__pyx_tuple__60; -static PyObject *__pyx_tuple__62; -static PyObject *__pyx_tuple__64; -static PyObject *__pyx_tuple__65; -static PyObject *__pyx_tuple__67; -static PyObject *__pyx_tuple__69; -static PyObject *__pyx_tuple__71; -static PyObject *__pyx_tuple__73; -static PyObject *__pyx_tuple__74; -static PyObject *__pyx_tuple__76; -static PyObject *__pyx_tuple__78; +static PyObject *__pyx_codeobj__19; +static PyObject *__pyx_codeobj__25; +static PyObject *__pyx_codeobj__27; +static PyObject *__pyx_codeobj__29; +static PyObject *__pyx_codeobj__31; +static PyObject *__pyx_codeobj__33; +static PyObject *__pyx_codeobj__35; static PyObject *__pyx_codeobj__37; +static PyObject *__pyx_codeobj__40; static PyObject *__pyx_codeobj__43; static PyObject *__pyx_codeobj__45; -static PyObject *__pyx_codeobj__47; -static PyObject *__pyx_codeobj__49; -static PyObject *__pyx_codeobj__51; -static PyObject *__pyx_codeobj__53; -static PyObject *__pyx_codeobj__55; -static PyObject *__pyx_codeobj__58; +static PyObject *__pyx_codeobj__48; +static PyObject *__pyx_codeobj__50; +static PyObject *__pyx_codeobj__52; +static PyObject *__pyx_codeobj__54; +static PyObject *__pyx_codeobj__57; +static PyObject *__pyx_codeobj__59; static PyObject *__pyx_codeobj__61; -static PyObject *__pyx_codeobj__63; -static PyObject *__pyx_codeobj__66; -static PyObject *__pyx_codeobj__68; -static PyObject *__pyx_codeobj__70; -static PyObject *__pyx_codeobj__72; -static PyObject *__pyx_codeobj__75; -static PyObject *__pyx_codeobj__77; -static PyObject *__pyx_codeobj__79; /* Late includes */ -/* "lxml/html/clean.py":79 +/* "lxml/html/clean.py":78 * r'(?:javascript|jscript|livescript|vbscript|data|about|mocha):', * re.I).search * def _is_javascript_scheme(s): # <<<<<<<<<<<<<< @@ -2069,18 +2134,17 @@ static PyObject *__pyx_pf_4lxml_4html_5clean__is_javascript_scheme(CYTHON_UNUSED PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; + int __pyx_t_4; __Pyx_RefNannySetupContext("_is_javascript_scheme", 0); - /* "lxml/html/clean.py":80 + /* "lxml/html/clean.py":79 * re.I).search * def _is_javascript_scheme(s): * if _is_image_dataurl(s): # <<<<<<<<<<<<<< * return None * return _is_possibly_malicious_scheme(s) */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_image_dataurl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_is_image_dataurl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -2092,44 +2156,16 @@ static PyObject *__pyx_pf_4lxml_4html_5clean__is_javascript_scheme(CYTHON_UNUSED __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_s}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_s}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_v_s); - __Pyx_GIVEREF(__pyx_v_s); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_s); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_s) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_s); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 80, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_5) { + if (__pyx_t_4) { - /* "lxml/html/clean.py":81 + /* "lxml/html/clean.py":80 * def _is_javascript_scheme(s): * if _is_image_dataurl(s): * return None # <<<<<<<<<<<<<< @@ -2140,7 +2176,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean__is_javascript_scheme(CYTHON_UNUSED __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/html/clean.py":80 + /* "lxml/html/clean.py":79 * re.I).search * def _is_javascript_scheme(s): * if _is_image_dataurl(s): # <<<<<<<<<<<<<< @@ -2149,7 +2185,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean__is_javascript_scheme(CYTHON_UNUSED */ } - /* "lxml/html/clean.py":82 + /* "lxml/html/clean.py":81 * if _is_image_dataurl(s): * return None * return _is_possibly_malicious_scheme(s) # <<<<<<<<<<<<<< @@ -2157,56 +2193,28 @@ static PyObject *__pyx_pf_4lxml_4html_5clean__is_javascript_scheme(CYTHON_UNUSED * _substitute_whitespace = re.compile(r'[\s\x00-\x08\x0B\x0C\x0E-\x19]+').sub */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_possibly_malicious_scheme); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_is_possibly_malicious_scheme); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = NULL; + __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_4)) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_s}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_s}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 82, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(__pyx_v_s); - __Pyx_GIVEREF(__pyx_v_s); - PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_s); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_s) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_s); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __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/html/clean.py":79 + /* "lxml/html/clean.py":78 * r'(?:javascript|jscript|livescript|vbscript|data|about|mocha):', * re.I).search * def _is_javascript_scheme(s): # <<<<<<<<<<<<<< @@ -2219,7 +2227,6 @@ static PyObject *__pyx_pf_4lxml_4html_5clean__is_javascript_scheme(CYTHON_UNUSED __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("lxml.html.clean._is_javascript_scheme", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -2228,8 +2235,8 @@ static PyObject *__pyx_pf_4lxml_4html_5clean__is_javascript_scheme(CYTHON_UNUSED return __pyx_r; } -/* "lxml/html/clean.py":218 - * whitelist_tags = set(['iframe', 'embed']) +/* "lxml/html/clean.py":217 + * whitelist_tags = {'iframe', 'embed'} * * def __init__(self, **kw): # <<<<<<<<<<<<<< * for name, value in kw.items(): @@ -2238,7 +2245,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean__is_javascript_scheme(CYTHON_UNUSED /* Python wrapper */ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_4html_5clean_7Cleaner_1__init__ = {"__init__", (PyCFunction)__pyx_pw_4lxml_4html_5clean_7Cleaner_1__init__, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_4html_5clean_7Cleaner_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_4html_5clean_7Cleaner_1__init__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_kw = 0; @@ -2266,7 +2273,7 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_1__init__(PyObject *__pyx_ else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kw, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 218, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kw, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 217, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -2277,7 +2284,7 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_1__init__(PyObject *__pyx_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 218, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 217, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kw); __pyx_v_kw = 0; __Pyx_AddTraceback("lxml.html.clean.Cleaner.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -2311,22 +2318,22 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner___init__(CYTHON_UNUSED PyO int __pyx_t_12; __Pyx_RefNannySetupContext("__init__", 0); - /* "lxml/html/clean.py":219 + /* "lxml/html/clean.py":218 * * def __init__(self, **kw): * for name, value in kw.items(): # <<<<<<<<<<<<<< * if not hasattr(self, name): * raise TypeError( */ - __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_kw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_kw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __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_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __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(0, 219, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 218, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -2334,17 +2341,17 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner___init__(CYTHON_UNUSED PyO 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_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 218, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= 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_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 218, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -2354,7 +2361,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner___init__(CYTHON_UNUSED PyO PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 219, __pyx_L1_error) + else __PYX_ERR(0, 218, __pyx_L1_error) } break; } @@ -2366,7 +2373,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner___init__(CYTHON_UNUSED PyO if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 219, __pyx_L1_error) + __PYX_ERR(0, 218, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -2379,15 +2386,15 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner___init__(CYTHON_UNUSED PyO __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, 219, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 218, __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, 219, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 218, __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; @@ -2395,7 +2402,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner___init__(CYTHON_UNUSED PyO __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 219, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 218, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -2403,7 +2410,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner___init__(CYTHON_UNUSED PyO __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 219, __pyx_L1_error) + __PYX_ERR(0, 218, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5); @@ -2411,25 +2418,25 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner___init__(CYTHON_UNUSED PyO __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6); __pyx_t_6 = 0; - /* "lxml/html/clean.py":220 + /* "lxml/html/clean.py":219 * def __init__(self, **kw): * for name, value in kw.items(): * if not hasattr(self, name): # <<<<<<<<<<<<<< * raise TypeError( * "Unknown parameter: %s=%r" % (name, value)) */ - __pyx_t_9 = __Pyx_HasAttr(__pyx_v_self, __pyx_v_name); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_t_9 = __Pyx_HasAttr(__pyx_v_self, __pyx_v_name); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 219, __pyx_L1_error) __pyx_t_10 = ((!(__pyx_t_9 != 0)) != 0); if (unlikely(__pyx_t_10)) { - /* "lxml/html/clean.py":222 + /* "lxml/html/clean.py":221 * if not hasattr(self, name): * raise TypeError( * "Unknown parameter: %s=%r" % (name, value)) # <<<<<<<<<<<<<< * setattr(self, name, value) * if self.inline_style is None and 'inline_style' not in kw: */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); @@ -2437,25 +2444,25 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner___init__(CYTHON_UNUSED PyO __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value); - __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Unknown_parameter_s_r, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 222, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Unknown_parameter_s_r, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/html/clean.py":221 + /* "lxml/html/clean.py":220 * for name, value in kw.items(): * if not hasattr(self, name): * raise TypeError( # <<<<<<<<<<<<<< * "Unknown parameter: %s=%r" % (name, value)) * setattr(self, name, value) */ - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 221, __pyx_L1_error) + __PYX_ERR(0, 220, __pyx_L1_error) - /* "lxml/html/clean.py":220 + /* "lxml/html/clean.py":219 * def __init__(self, **kw): * for name, value in kw.items(): * if not hasattr(self, name): # <<<<<<<<<<<<<< @@ -2464,16 +2471,16 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner___init__(CYTHON_UNUSED PyO */ } - /* "lxml/html/clean.py":223 + /* "lxml/html/clean.py":222 * raise TypeError( * "Unknown parameter: %s=%r" % (name, value)) * setattr(self, name, value) # <<<<<<<<<<<<<< * if self.inline_style is None and 'inline_style' not in kw: * self.inline_style = self.style */ - __pyx_t_11 = PyObject_SetAttr(__pyx_v_self, __pyx_v_name, __pyx_v_value); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 223, __pyx_L1_error) + __pyx_t_11 = PyObject_SetAttr(__pyx_v_self, __pyx_v_name, __pyx_v_value); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 222, __pyx_L1_error) - /* "lxml/html/clean.py":219 + /* "lxml/html/clean.py":218 * * def __init__(self, **kw): * for name, value in kw.items(): # <<<<<<<<<<<<<< @@ -2483,14 +2490,14 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner___init__(CYTHON_UNUSED PyO } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/html/clean.py":224 + /* "lxml/html/clean.py":223 * "Unknown parameter: %s=%r" % (name, value)) * setattr(self, name, value) * if self.inline_style is None and 'inline_style' not in kw: # <<<<<<<<<<<<<< * self.inline_style = self.style * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inline_style); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inline_style); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = (__pyx_t_2 == Py_None); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -2500,25 +2507,25 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner___init__(CYTHON_UNUSED PyO __pyx_t_10 = __pyx_t_12; goto __pyx_L9_bool_binop_done; } - __pyx_t_12 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_inline_style, __pyx_v_kw, Py_NE)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_12 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_inline_style, __pyx_v_kw, Py_NE)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 223, __pyx_L1_error) __pyx_t_9 = (__pyx_t_12 != 0); __pyx_t_10 = __pyx_t_9; __pyx_L9_bool_binop_done:; if (__pyx_t_10) { - /* "lxml/html/clean.py":225 + /* "lxml/html/clean.py":224 * setattr(self, name, value) * if self.inline_style is None and 'inline_style' not in kw: * self.inline_style = self.style # <<<<<<<<<<<<<< * * # Used to lookup the primary URL for a given tag that is up for */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 225, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_inline_style, __pyx_t_2) < 0) __PYX_ERR(0, 225, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_inline_style, __pyx_t_2) < 0) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/html/clean.py":224 + /* "lxml/html/clean.py":223 * "Unknown parameter: %s=%r" % (name, value)) * setattr(self, name, value) * if self.inline_style is None and 'inline_style' not in kw: # <<<<<<<<<<<<<< @@ -2527,8 +2534,8 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner___init__(CYTHON_UNUSED PyO */ } - /* "lxml/html/clean.py":218 - * whitelist_tags = set(['iframe', 'embed']) + /* "lxml/html/clean.py":217 + * whitelist_tags = {'iframe', 'embed'} * * def __init__(self, **kw): # <<<<<<<<<<<<<< * for name, value in kw.items(): @@ -2554,7 +2561,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner___init__(CYTHON_UNUSED PyO return __pyx_r; } -/* "lxml/html/clean.py":249 +/* "lxml/html/clean.py":248 * ) * * def __call__(self, doc): # <<<<<<<<<<<<<< @@ -2565,7 +2572,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner___init__(CYTHON_UNUSED PyO /* Python wrapper */ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_3__call__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_4html_5clean_7Cleaner_2__call__[] = "\n Cleans the document.\n "; -static PyMethodDef __pyx_mdef_4lxml_4html_5clean_7Cleaner_3__call__ = {"__call__", (PyCFunction)__pyx_pw_4lxml_4html_5clean_7Cleaner_3__call__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_4html_5clean_7Cleaner_2__call__}; +static PyMethodDef __pyx_mdef_4lxml_4html_5clean_7Cleaner_3__call__ = {"__call__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_4html_5clean_7Cleaner_3__call__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_4html_5clean_7Cleaner_2__call__}; static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_3__call__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_doc = 0; @@ -2595,11 +2602,11 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_3__call__(PyObject *__pyx_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_doc)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__call__", 1, 2, 2, 1); __PYX_ERR(0, 249, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 2, 2, 1); __PYX_ERR(0, 248, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 249, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 248, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -2612,7 +2619,7 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_3__call__(PyObject *__pyx_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 249, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 248, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.html.clean.Cleaner.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -2648,37 +2655,37 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - Py_ssize_t __pyx_t_7; - PyObject *(*__pyx_t_8)(PyObject *); - int __pyx_t_9; - PyObject *__pyx_t_10 = NULL; - Py_ssize_t __pyx_t_11; - PyObject *(*__pyx_t_12)(PyObject *); + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + Py_ssize_t __pyx_t_10; + PyObject *(*__pyx_t_11)(PyObject *); + PyObject *__pyx_t_12 = NULL; int __pyx_t_13; int __pyx_t_14; __Pyx_RefNannySetupContext("__call__", 0); __Pyx_INCREF(__pyx_v_doc); - /* "lxml/html/clean.py":253 + /* "lxml/html/clean.py":252 * Cleans the document. * """ * if hasattr(doc, 'getroot'): # <<<<<<<<<<<<<< * # ElementTree instance, instead of an element * doc = doc.getroot() */ - __pyx_t_1 = __Pyx_HasAttr(__pyx_v_doc, __pyx_n_s_getroot); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 253, __pyx_L1_error) + __pyx_t_1 = __Pyx_HasAttr(__pyx_v_doc, __pyx_n_s_getroot); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 252, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/html/clean.py":255 + /* "lxml/html/clean.py":254 * if hasattr(doc, 'getroot'): * # ElementTree instance, instead of an element * doc = doc.getroot() # <<<<<<<<<<<<<< * # convert XHTML to HTML * xhtml_to_html(doc) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_doc, __pyx_n_s_getroot); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 255, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_doc, __pyx_n_s_getroot); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -2690,18 +2697,15 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 255, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 255, __pyx_L1_error) - } + __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, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_doc, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/html/clean.py":253 + /* "lxml/html/clean.py":252 * Cleans the document. * """ * if hasattr(doc, 'getroot'): # <<<<<<<<<<<<<< @@ -2710,14 +2714,14 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":257 + /* "lxml/html/clean.py":256 * doc = doc.getroot() * # convert XHTML to HTML * xhtml_to_html(doc) # <<<<<<<<<<<<<< * # Normalize a case that IE treats like , and that * # can confuse either this step or later steps. */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_xhtml_to_html); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 257, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_xhtml_to_html); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -2729,106 +2733,90 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_doc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 257, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_doc}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 257, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_doc}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 257, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 257, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_INCREF(__pyx_v_doc); - __Pyx_GIVEREF(__pyx_v_doc); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_doc); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 257, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_doc) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_doc); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 256, __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/html/clean.py":260 + /* "lxml/html/clean.py":259 * # Normalize a case that IE treats like , and that * # can confuse either this step or later steps. * for el in doc.iter('image'): # <<<<<<<<<<<<<< * el.tag = 'img' * if not self.comments: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_doc, __pyx_n_s_iter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 260, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 260, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_doc, __pyx_n_s_iter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { - __pyx_t_3 = __pyx_t_4; __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_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 260, __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(0, 260, __pyx_L1_error) + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_n_s_image) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_n_s_image); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 259, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { - if (likely(!__pyx_t_8)) { - if (likely(PyList_CheckExact(__pyx_t_3))) { - if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break; + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 260, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 259, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 260, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); #endif } else { - if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 260, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 259, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 260, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); #endif } } else { - __pyx_t_4 = __pyx_t_8(__pyx_t_3); - if (unlikely(!__pyx_t_4)) { + __pyx_t_3 = __pyx_t_7(__pyx_t_4); + if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 260, __pyx_L1_error) + else __PYX_ERR(0, 259, __pyx_L1_error) } break; } - __Pyx_GOTREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_t_3); } - __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_4); - __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_3); + __pyx_t_3 = 0; - /* "lxml/html/clean.py":261 + /* "lxml/html/clean.py":260 * # can confuse either this step or later steps. * for el in doc.iter('image'): * el.tag = 'img' # <<<<<<<<<<<<<< * if not self.comments: * # Of course, if we were going to kill comments anyway, we don't */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_el, __pyx_n_s_tag, __pyx_n_s_img) < 0) __PYX_ERR(0, 261, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_el, __pyx_n_s_tag, __pyx_n_s_img) < 0) __PYX_ERR(0, 260, __pyx_L1_error) - /* "lxml/html/clean.py":260 + /* "lxml/html/clean.py":259 * # Normalize a case that IE treats like , and that * # can confuse either this step or later steps. * for el in doc.iter('image'): # <<<<<<<<<<<<<< @@ -2836,77 +2824,49 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py * if not self.comments: */ } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/html/clean.py":262 + /* "lxml/html/clean.py":261 * for el in doc.iter('image'): * el.tag = 'img' * if not self.comments: # <<<<<<<<<<<<<< * # Of course, if we were going to kill comments anyway, we don't * # need to worry about this */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_comments); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 262, __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(0, 262, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_comments); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 261, __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, 261, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { - /* "lxml/html/clean.py":265 + /* "lxml/html/clean.py":264 * # Of course, if we were going to kill comments anyway, we don't * # need to worry about this * self.kill_conditional_comments(doc) # <<<<<<<<<<<<<< * * kill_tags = set(self.kill_tags or ()) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_kill_conditional_comments); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 265, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_kill_conditional_comments); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 264, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - } - } - if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_doc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 265, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_doc}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 265, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_doc}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 265, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 265, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_v_doc); - __Pyx_GIVEREF(__pyx_v_doc); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_doc); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 265, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF_SET(__pyx_t_3, function); } } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_v_doc) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_doc); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 264, __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/html/clean.py":262 + /* "lxml/html/clean.py":261 * for el in doc.iter('image'): * el.tag = 'img' * if not self.comments: # <<<<<<<<<<<<<< @@ -2915,14 +2875,41 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":267 + /* "lxml/html/clean.py":266 * self.kill_conditional_comments(doc) * * kill_tags = set(self.kill_tags or ()) # <<<<<<<<<<<<<< * remove_tags = set(self.remove_tags or ()) * allow_tags = set(self.allow_tags or ()) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_kill_tags); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 267, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_kill_tags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 266, __pyx_L1_error) + if (!__pyx_t_1) { + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else { + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L7_bool_binop_done; + } + __Pyx_INCREF(__pyx_empty_tuple); + __pyx_t_4 = __pyx_empty_tuple; + __pyx_L7_bool_binop_done:; + __pyx_t_3 = PySet_New(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_kill_tags = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "lxml/html/clean.py":267 + * + * kill_tags = set(self.kill_tags or ()) + * remove_tags = set(self.remove_tags or ()) # <<<<<<<<<<<<<< + * allow_tags = set(self.allow_tags or ()) + * + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_remove_tags); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 267, __pyx_L1_error) if (!__pyx_t_1) { @@ -2931,25 +2918,25 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = __pyx_t_4; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - goto __pyx_L7_bool_binop_done; + goto __pyx_L9_bool_binop_done; } __Pyx_INCREF(__pyx_empty_tuple); __pyx_t_3 = __pyx_empty_tuple; - __pyx_L7_bool_binop_done:; + __pyx_L9_bool_binop_done:; __pyx_t_4 = PySet_New(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_kill_tags = ((PyObject*)__pyx_t_4); + __pyx_v_remove_tags = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; /* "lxml/html/clean.py":268 - * * kill_tags = set(self.kill_tags or ()) - * remove_tags = set(self.remove_tags or ()) # <<<<<<<<<<<<<< - * allow_tags = set(self.allow_tags or ()) + * remove_tags = set(self.remove_tags or ()) + * allow_tags = set(self.allow_tags or ()) # <<<<<<<<<<<<<< * + * if self.scripts: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_remove_tags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 268, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_allow_tags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 268, __pyx_L1_error) if (!__pyx_t_1) { @@ -2958,67 +2945,40 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - goto __pyx_L9_bool_binop_done; + goto __pyx_L11_bool_binop_done; } __Pyx_INCREF(__pyx_empty_tuple); __pyx_t_4 = __pyx_empty_tuple; - __pyx_L9_bool_binop_done:; + __pyx_L11_bool_binop_done:; __pyx_t_3 = PySet_New(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_v_remove_tags = ((PyObject*)__pyx_t_3); + __pyx_v_allow_tags = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/html/clean.py":269 - * kill_tags = set(self.kill_tags or ()) - * remove_tags = set(self.remove_tags or ()) - * allow_tags = set(self.allow_tags or ()) # <<<<<<<<<<<<<< + /* "lxml/html/clean.py":270 + * allow_tags = set(self.allow_tags or ()) * - * if self.scripts: + * if self.scripts: # <<<<<<<<<<<<<< + * kill_tags.add('script') + * if self.safe_attrs_only: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_allow_tags); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 269, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 269, __pyx_L1_error) - if (!__pyx_t_1) { - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __Pyx_INCREF(__pyx_t_4); - __pyx_t_3 = __pyx_t_4; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - goto __pyx_L11_bool_binop_done; - } - __Pyx_INCREF(__pyx_empty_tuple); - __pyx_t_3 = __pyx_empty_tuple; - __pyx_L11_bool_binop_done:; - __pyx_t_4 = PySet_New(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 269, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_scripts); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_allow_tags = ((PyObject*)__pyx_t_4); - __pyx_t_4 = 0; - - /* "lxml/html/clean.py":271 - * allow_tags = set(self.allow_tags or ()) - * - * if self.scripts: # <<<<<<<<<<<<<< - * kill_tags.add('script') - * if self.safe_attrs_only: - */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_scripts); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 271, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 271, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_1) { - /* "lxml/html/clean.py":272 + /* "lxml/html/clean.py":271 * * if self.scripts: * kill_tags.add('script') # <<<<<<<<<<<<<< * if self.safe_attrs_only: * safe_attrs = set(self.safe_attrs) */ - __pyx_t_9 = PySet_Add(__pyx_v_kill_tags, __pyx_n_s_script); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 272, __pyx_L1_error) + __pyx_t_8 = PySet_Add(__pyx_v_kill_tags, __pyx_n_s_script); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 271, __pyx_L1_error) - /* "lxml/html/clean.py":271 + /* "lxml/html/clean.py":270 * allow_tags = set(self.allow_tags or ()) * * if self.scripts: # <<<<<<<<<<<<<< @@ -3027,240 +2987,207 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":273 + /* "lxml/html/clean.py":272 * if self.scripts: * kill_tags.add('script') * if self.safe_attrs_only: # <<<<<<<<<<<<<< * safe_attrs = set(self.safe_attrs) * for el in doc.iter(etree.Element): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_safe_attrs_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 273, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 273, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_safe_attrs_only); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 272, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "lxml/html/clean.py":274 + /* "lxml/html/clean.py":273 * kill_tags.add('script') * if self.safe_attrs_only: * safe_attrs = set(self.safe_attrs) # <<<<<<<<<<<<<< * for el in doc.iter(etree.Element): * attrib = el.attrib */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_safe_attrs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 274, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PySet_New(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 274, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_safe_attrs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_v_safe_attrs = ((PyObject*)__pyx_t_3); - __pyx_t_3 = 0; + __pyx_t_4 = PySet_New(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_safe_attrs = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; - /* "lxml/html/clean.py":275 + /* "lxml/html/clean.py":274 * if self.safe_attrs_only: * safe_attrs = set(self.safe_attrs) * for el in doc.iter(etree.Element): # <<<<<<<<<<<<<< * attrib = el.attrib * for aname in attrib.keys(): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_doc, __pyx_n_s_iter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 275, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_etree); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 275, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_doc, __pyx_n_s_iter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_etree); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Element); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 275, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Element); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); + __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 275, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_9); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { + __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; + __pyx_t_7 = NULL; } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 275, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 275, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 275, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 275, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } + __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 274, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { - __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0; - __pyx_t_8 = NULL; - } else { - __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 275, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 275, __pyx_L1_error) - } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { - if (likely(!__pyx_t_8)) { - if (likely(PyList_CheckExact(__pyx_t_4))) { - if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break; + if (likely(!__pyx_t_7)) { + 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_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 275, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 274, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 275, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); #endif } else { - if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_4)) break; + if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 275, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 274, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 275, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); #endif } } else { - __pyx_t_3 = __pyx_t_8(__pyx_t_4); - if (unlikely(!__pyx_t_3)) { + __pyx_t_4 = __pyx_t_7(__pyx_t_3); + if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 275, __pyx_L1_error) + else __PYX_ERR(0, 274, __pyx_L1_error) } break; } - __Pyx_GOTREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_t_4); } - __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_3); - __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_4); + __pyx_t_4 = 0; - /* "lxml/html/clean.py":276 + /* "lxml/html/clean.py":275 * safe_attrs = set(self.safe_attrs) * for el in doc.iter(etree.Element): * attrib = el.attrib # <<<<<<<<<<<<<< * for aname in attrib.keys(): * if aname not in safe_attrs: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_attrib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_XDECREF_SET(__pyx_v_attrib, __pyx_t_3); - __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_attrib); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 275, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_attrib, __pyx_t_4); + __pyx_t_4 = 0; - /* "lxml/html/clean.py":277 + /* "lxml/html/clean.py":276 * for el in doc.iter(etree.Element): * attrib = el.attrib * for aname in attrib.keys(): # <<<<<<<<<<<<<< * if aname not in safe_attrs: * del attrib[aname] */ - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrib, __pyx_n_s_keys); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 277, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrib, __pyx_n_s_keys); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_10, function); + __Pyx_DECREF_SET(__pyx_t_9, function); } } - if (__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 277, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 277, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { - __pyx_t_10 = __pyx_t_3; __Pyx_INCREF(__pyx_t_10); __pyx_t_11 = 0; - __pyx_t_12 = NULL; + __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { + __pyx_t_9 = __pyx_t_4; __Pyx_INCREF(__pyx_t_9); __pyx_t_10 = 0; + __pyx_t_11 = NULL; } else { - __pyx_t_11 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 277, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_12 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_t_10 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_11 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 276, __pyx_L1_error) } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { - if (likely(!__pyx_t_12)) { - if (likely(PyList_CheckExact(__pyx_t_10))) { - if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_10)) break; + if (likely(!__pyx_t_11)) { + if (likely(PyList_CheckExact(__pyx_t_9))) { + if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_9)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 276, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_10, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 277, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PySequence_ITEM(__pyx_t_9, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); #endif } else { - if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_10)) break; + if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_9)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 276, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_10, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 277, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PySequence_ITEM(__pyx_t_9, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); #endif } } else { - __pyx_t_3 = __pyx_t_12(__pyx_t_10); - if (unlikely(!__pyx_t_3)) { + __pyx_t_4 = __pyx_t_11(__pyx_t_9); + if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 277, __pyx_L1_error) + else __PYX_ERR(0, 276, __pyx_L1_error) } break; } - __Pyx_GOTREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_t_4); } - __Pyx_XDECREF_SET(__pyx_v_aname, __pyx_t_3); - __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_v_aname, __pyx_t_4); + __pyx_t_4 = 0; - /* "lxml/html/clean.py":278 + /* "lxml/html/clean.py":277 * attrib = el.attrib * for aname in attrib.keys(): * if aname not in safe_attrs: # <<<<<<<<<<<<<< * del attrib[aname] * if self.javascript: */ - __pyx_t_1 = (__Pyx_PySet_ContainsTF(__pyx_v_aname, __pyx_v_safe_attrs, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 278, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySet_ContainsTF(__pyx_v_aname, __pyx_v_safe_attrs, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 277, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/html/clean.py":279 + /* "lxml/html/clean.py":278 * for aname in attrib.keys(): * if aname not in safe_attrs: * del attrib[aname] # <<<<<<<<<<<<<< * if self.javascript: * if not (self.safe_attrs_only and */ - if (unlikely(PyObject_DelItem(__pyx_v_attrib, __pyx_v_aname) < 0)) __PYX_ERR(0, 279, __pyx_L1_error) + if (unlikely(PyObject_DelItem(__pyx_v_attrib, __pyx_v_aname) < 0)) __PYX_ERR(0, 278, __pyx_L1_error) - /* "lxml/html/clean.py":278 + /* "lxml/html/clean.py":277 * attrib = el.attrib * for aname in attrib.keys(): * if aname not in safe_attrs: # <<<<<<<<<<<<<< @@ -3269,7 +3196,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":277 + /* "lxml/html/clean.py":276 * for el in doc.iter(etree.Element): * attrib = el.attrib * for aname in attrib.keys(): # <<<<<<<<<<<<<< @@ -3277,9 +3204,9 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py * del attrib[aname] */ } - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "lxml/html/clean.py":275 + /* "lxml/html/clean.py":274 * if self.safe_attrs_only: * safe_attrs = set(self.safe_attrs) * for el in doc.iter(etree.Element): # <<<<<<<<<<<<<< @@ -3287,9 +3214,9 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py * for aname in attrib.keys(): */ } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/html/clean.py":273 + /* "lxml/html/clean.py":272 * if self.scripts: * kill_tags.add('script') * if self.safe_attrs_only: # <<<<<<<<<<<<<< @@ -3298,59 +3225,59 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":280 + /* "lxml/html/clean.py":279 * if aname not in safe_attrs: * del attrib[aname] * if self.javascript: # <<<<<<<<<<<<<< * if not (self.safe_attrs_only and * self.safe_attrs == defs.safe_attrs): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_javascript); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 280, __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, 280, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_javascript); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 279, __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(0, 279, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "lxml/html/clean.py":281 + /* "lxml/html/clean.py":280 * del attrib[aname] * if self.javascript: * if not (self.safe_attrs_only and # <<<<<<<<<<<<<< * self.safe_attrs == defs.safe_attrs): * # safe_attrs handles events attributes itself */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_safe_attrs_only); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 281, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 281, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_safe_attrs_only); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { } else { __pyx_t_2 = __pyx_t_1; goto __pyx_L22_bool_binop_done; } - /* "lxml/html/clean.py":282 + /* "lxml/html/clean.py":281 * if self.javascript: * if not (self.safe_attrs_only and * self.safe_attrs == defs.safe_attrs): # <<<<<<<<<<<<<< * # safe_attrs handles events attributes itself * for el in doc.iter(etree.Element): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_safe_attrs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 282, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_defs); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 282, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_safe_attrs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 282, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_safe_attrs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 282, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_defs); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 281, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_safe_attrs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 281, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 281, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 282, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 281, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_2 = __pyx_t_1; __pyx_L22_bool_binop_done:; - /* "lxml/html/clean.py":281 + /* "lxml/html/clean.py":280 * del attrib[aname] * if self.javascript: * if not (self.safe_attrs_only and # <<<<<<<<<<<<<< @@ -3360,217 +3287,196 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { - /* "lxml/html/clean.py":284 + /* "lxml/html/clean.py":283 * self.safe_attrs == defs.safe_attrs): * # safe_attrs handles events attributes itself * for el in doc.iter(etree.Element): # <<<<<<<<<<<<<< * attrib = el.attrib * for aname in attrib.keys(): */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_doc, __pyx_n_s_iter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 284, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_etree); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 284, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_doc, __pyx_n_s_iter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Element); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 284, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_etree); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Element); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 283, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); - } - } - if (!__pyx_t_4) { - __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 284, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_10); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_6}; - __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 284, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_6}; - __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 284, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 284, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 284, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF_SET(__pyx_t_4, function); } } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (likely(PyList_CheckExact(__pyx_t_10)) || PyTuple_CheckExact(__pyx_t_10)) { - __pyx_t_3 = __pyx_t_10; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; - __pyx_t_8 = NULL; + __pyx_t_9 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 283, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) { + __pyx_t_4 = __pyx_t_9; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; + __pyx_t_7 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 284, __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(0, 284, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 283, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 283, __pyx_L1_error) } - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; for (;;) { - if (likely(!__pyx_t_8)) { - if (likely(PyList_CheckExact(__pyx_t_3))) { - if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break; + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_10 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_10); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 284, __pyx_L1_error) + __pyx_t_9 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_9); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 283, __pyx_L1_error) #else - __pyx_t_10 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 284, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 283, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); #endif } else { - if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_10); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 284, __pyx_L1_error) + __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_9); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 283, __pyx_L1_error) #else - __pyx_t_10 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 284, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 283, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); #endif } } else { - __pyx_t_10 = __pyx_t_8(__pyx_t_3); - if (unlikely(!__pyx_t_10)) { + __pyx_t_9 = __pyx_t_7(__pyx_t_4); + if (unlikely(!__pyx_t_9)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 284, __pyx_L1_error) + else __PYX_ERR(0, 283, __pyx_L1_error) } break; } - __Pyx_GOTREF(__pyx_t_10); + __Pyx_GOTREF(__pyx_t_9); } - __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_10); - __pyx_t_10 = 0; + __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_9); + __pyx_t_9 = 0; - /* "lxml/html/clean.py":285 + /* "lxml/html/clean.py":284 * # safe_attrs handles events attributes itself * for el in doc.iter(etree.Element): * attrib = el.attrib # <<<<<<<<<<<<<< * for aname in attrib.keys(): * if aname.startswith('on'): */ - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_attrib); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 285, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_XDECREF_SET(__pyx_v_attrib, __pyx_t_10); - __pyx_t_10 = 0; + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_attrib); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_v_attrib, __pyx_t_9); + __pyx_t_9 = 0; - /* "lxml/html/clean.py":286 + /* "lxml/html/clean.py":285 * for el in doc.iter(etree.Element): * attrib = el.attrib * for aname in attrib.keys(): # <<<<<<<<<<<<<< * if aname.startswith('on'): * del attrib[aname] */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrib, __pyx_n_s_keys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 286, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrib, __pyx_n_s_keys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = NULL; + __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_6)) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (__pyx_t_6) { - __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 286, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_10 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 286, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (likely(PyList_CheckExact(__pyx_t_10)) || PyTuple_CheckExact(__pyx_t_10)) { - __pyx_t_5 = __pyx_t_10; __Pyx_INCREF(__pyx_t_5); __pyx_t_11 = 0; - __pyx_t_12 = NULL; + if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) { + __pyx_t_5 = __pyx_t_9; __Pyx_INCREF(__pyx_t_5); __pyx_t_10 = 0; + __pyx_t_11 = NULL; } else { - __pyx_t_11 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 286, __pyx_L1_error) + __pyx_t_10 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 286, __pyx_L1_error) + __pyx_t_11 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 285, __pyx_L1_error) } - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; for (;;) { - if (likely(!__pyx_t_12)) { + if (likely(!__pyx_t_11)) { if (likely(PyList_CheckExact(__pyx_t_5))) { - if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_5)) break; + if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_10 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_11); __Pyx_INCREF(__pyx_t_10); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 286, __pyx_L1_error) + __pyx_t_9 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 285, __pyx_L1_error) #else - __pyx_t_10 = PySequence_ITEM(__pyx_t_5, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 286, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); #endif } else { - if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_5)) break; + if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_11); __Pyx_INCREF(__pyx_t_10); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 286, __pyx_L1_error) + __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 285, __pyx_L1_error) #else - __pyx_t_10 = PySequence_ITEM(__pyx_t_5, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 286, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); #endif } } else { - __pyx_t_10 = __pyx_t_12(__pyx_t_5); - if (unlikely(!__pyx_t_10)) { + __pyx_t_9 = __pyx_t_11(__pyx_t_5); + if (unlikely(!__pyx_t_9)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 286, __pyx_L1_error) + else __PYX_ERR(0, 285, __pyx_L1_error) } break; } - __Pyx_GOTREF(__pyx_t_10); + __Pyx_GOTREF(__pyx_t_9); } - __Pyx_XDECREF_SET(__pyx_v_aname, __pyx_t_10); - __pyx_t_10 = 0; + __Pyx_XDECREF_SET(__pyx_v_aname, __pyx_t_9); + __pyx_t_9 = 0; - /* "lxml/html/clean.py":287 + /* "lxml/html/clean.py":286 * attrib = el.attrib * for aname in attrib.keys(): * if aname.startswith('on'): # <<<<<<<<<<<<<< * del attrib[aname] * doc.rewrite_links(self._remove_javascript_link, */ - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_aname, __pyx_n_s_startswith); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 287, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 287, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 287, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_aname, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_12 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_9 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_12, __pyx_n_s_on) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s_on); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 286, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_1) { - /* "lxml/html/clean.py":288 + /* "lxml/html/clean.py":287 * for aname in attrib.keys(): * if aname.startswith('on'): * del attrib[aname] # <<<<<<<<<<<<<< * doc.rewrite_links(self._remove_javascript_link, * resolve_base_href=False) */ - if (unlikely(PyObject_DelItem(__pyx_v_attrib, __pyx_v_aname) < 0)) __PYX_ERR(0, 288, __pyx_L1_error) + if (unlikely(PyObject_DelItem(__pyx_v_attrib, __pyx_v_aname) < 0)) __PYX_ERR(0, 287, __pyx_L1_error) - /* "lxml/html/clean.py":287 + /* "lxml/html/clean.py":286 * attrib = el.attrib * for aname in attrib.keys(): * if aname.startswith('on'): # <<<<<<<<<<<<<< @@ -3579,7 +3485,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":286 + /* "lxml/html/clean.py":285 * for el in doc.iter(etree.Element): * attrib = el.attrib * for aname in attrib.keys(): # <<<<<<<<<<<<<< @@ -3589,7 +3495,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/html/clean.py":284 + /* "lxml/html/clean.py":283 * self.safe_attrs == defs.safe_attrs): * # safe_attrs handles events attributes itself * for el in doc.iter(etree.Element): # <<<<<<<<<<<<<< @@ -3597,9 +3503,9 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py * for aname in attrib.keys(): */ } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/html/clean.py":281 + /* "lxml/html/clean.py":280 * del attrib[aname] * if self.javascript: * if not (self.safe_attrs_only and # <<<<<<<<<<<<<< @@ -3608,361 +3514,317 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":289 + /* "lxml/html/clean.py":288 * if aname.startswith('on'): * del attrib[aname] * doc.rewrite_links(self._remove_javascript_link, # <<<<<<<<<<<<<< * resolve_base_href=False) * # If we're deleting style then we don't have to remove JS links */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_doc, __pyx_n_s_rewrite_links); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_remove_javascript_link); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_doc, __pyx_n_s_rewrite_links); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_remove_javascript_link); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 289, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = 0; - /* "lxml/html/clean.py":290 + /* "lxml/html/clean.py":289 * del attrib[aname] * doc.rewrite_links(self._remove_javascript_link, * resolve_base_href=False) # <<<<<<<<<<<<<< * # If we're deleting style then we don't have to remove JS links * # from styles, otherwise... */ - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 290, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_resolve_base_href, Py_False) < 0) __PYX_ERR(0, 290, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_resolve_base_href, Py_False) < 0) __PYX_ERR(0, 289, __pyx_L1_error) - /* "lxml/html/clean.py":289 + /* "lxml/html/clean.py":288 * if aname.startswith('on'): * del attrib[aname] * doc.rewrite_links(self._remove_javascript_link, # <<<<<<<<<<<<<< * resolve_base_href=False) * # If we're deleting style then we don't have to remove JS links */ - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 289, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/html/clean.py":293 + /* "lxml/html/clean.py":292 * # If we're deleting style then we don't have to remove JS links * # from styles, otherwise... * if not self.inline_style: # <<<<<<<<<<<<<< * for el in _find_styled_elements(doc): * old = el.get('style') */ - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inline_style); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 293, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 293, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inline_style); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 292, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "lxml/html/clean.py":294 + /* "lxml/html/clean.py":293 * # from styles, otherwise... * if not self.inline_style: * for el in _find_styled_elements(doc): # <<<<<<<<<<<<<< * old = el.get('style') * new = _css_javascript_re.sub('', old) */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_styled_elements); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 294, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_find_styled_elements); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = NULL; + __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_6)) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_6) { - __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_doc); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 294, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_doc}; - __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 294, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_10); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_doc}; - __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 294, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_10); - } else - #endif - { - __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 294, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_v_doc); - __Pyx_GIVEREF(__pyx_v_doc); - PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_doc); - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 294, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - } + __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_v_doc) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_doc); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 293, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (likely(PyList_CheckExact(__pyx_t_10)) || PyTuple_CheckExact(__pyx_t_10)) { - __pyx_t_5 = __pyx_t_10; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; - __pyx_t_8 = NULL; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; + __pyx_t_7 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 294, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 294, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 293, __pyx_L1_error) } - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { - if (likely(!__pyx_t_8)) { + if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_5))) { - if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break; + if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_10 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_10); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 294, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 293, __pyx_L1_error) #else - __pyx_t_10 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 294, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); + __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 293, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); #endif } else { - if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break; + if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_10); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 294, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 293, __pyx_L1_error) #else - __pyx_t_10 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 294, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); + __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 293, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); #endif } } else { - __pyx_t_10 = __pyx_t_8(__pyx_t_5); - if (unlikely(!__pyx_t_10)) { + __pyx_t_3 = __pyx_t_7(__pyx_t_5); + if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 294, __pyx_L1_error) + else __PYX_ERR(0, 293, __pyx_L1_error) } break; } - __Pyx_GOTREF(__pyx_t_10); + __Pyx_GOTREF(__pyx_t_3); } - __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_10); - __pyx_t_10 = 0; + __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_3); + __pyx_t_3 = 0; - /* "lxml/html/clean.py":295 + /* "lxml/html/clean.py":294 * if not self.inline_style: * for el in _find_styled_elements(doc): * old = el.get('style') # <<<<<<<<<<<<<< * new = _css_javascript_re.sub('', old) * new = _css_import_re.sub('', new) */ - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_get); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 295, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 295, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_get); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 294, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_4, __pyx_n_s_style) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_n_s_style); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_v_old, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/html/clean.py":296 + /* "lxml/html/clean.py":295 * for el in _find_styled_elements(doc): * old = el.get('style') * new = _css_javascript_re.sub('', old) # <<<<<<<<<<<<<< * new = _css_import_re.sub('', new) * if self._has_sneaky_javascript(new): */ - __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_css_javascript_re); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 296, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_sub); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 296, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_css_javascript_re); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 295, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_sub); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 295, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = NULL; __pyx_t_13 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_10)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_10); + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); + __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_13 = 1; } } #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_kp_s__4, __pyx_v_old}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 296, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_kp_s_, __pyx_v_old}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 295, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_kp_s__4, __pyx_v_old}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 296, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_kp_s_, __pyx_v_old}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 295, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_4 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 296, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__pyx_t_10) { - __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_10); __pyx_t_10 = NULL; + __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 295, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + if (__pyx_t_9) { + __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9); __pyx_t_9 = NULL; } - __Pyx_INCREF(__pyx_kp_s__4); - __Pyx_GIVEREF(__pyx_kp_s__4); - PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_13, __pyx_kp_s__4); + __Pyx_INCREF(__pyx_kp_s_); + __Pyx_GIVEREF(__pyx_kp_s_); + PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_kp_s_); __Pyx_INCREF(__pyx_v_old); __Pyx_GIVEREF(__pyx_v_old); - PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_13, __pyx_v_old); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 296, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_v_old); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_new, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/html/clean.py":297 + /* "lxml/html/clean.py":296 * old = el.get('style') * new = _css_javascript_re.sub('', old) * new = _css_import_re.sub('', new) # <<<<<<<<<<<<<< * if self._has_sneaky_javascript(new): * # Something tricky is going on... */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_css_import_re); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 297, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sub); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 297, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_css_import_re); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = NULL; + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sub); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 296, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; __pyx_t_13 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_6); + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_12); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); + __Pyx_DECREF_SET(__pyx_t_12, function); __pyx_t_13 = 1; } } #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_s__4, __pyx_v_new}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 297, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyFunction_Check(__pyx_t_12)) { + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_s_, __pyx_v_new}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 296, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_s__4, __pyx_v_new}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 297, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) { + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_s_, __pyx_v_new}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 296, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 297, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - if (__pyx_t_6) { - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6); __pyx_t_6 = NULL; + __pyx_t_9 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 296, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_4) { + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL; } - __Pyx_INCREF(__pyx_kp_s__4); - __Pyx_GIVEREF(__pyx_kp_s__4); - PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_kp_s__4); + __Pyx_INCREF(__pyx_kp_s_); + __Pyx_GIVEREF(__pyx_kp_s_); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_13, __pyx_kp_s_); __Pyx_INCREF(__pyx_v_new); __Pyx_GIVEREF(__pyx_v_new); - PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_v_new); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 297, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_13, __pyx_v_new); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF_SET(__pyx_v_new, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/html/clean.py":298 + /* "lxml/html/clean.py":297 * new = _css_javascript_re.sub('', old) * new = _css_import_re.sub('', new) * if self._has_sneaky_javascript(new): # <<<<<<<<<<<<<< * # Something tricky is going on... * del el.attrib['style'] */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_sneaky_javascript); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 298, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_10 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_10)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_10); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_sneaky_javascript); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 297, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_12); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); + __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); + __Pyx_DECREF_SET(__pyx_t_12, function); } } - if (!__pyx_t_10) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 298, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_new}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 298, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_new}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 298, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 298, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_10); __pyx_t_10 = NULL; - __Pyx_INCREF(__pyx_v_new); - __Pyx_GIVEREF(__pyx_v_new); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_new); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 298, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_9, __pyx_v_new) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_new); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 297, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "lxml/html/clean.py":300 + /* "lxml/html/clean.py":299 * if self._has_sneaky_javascript(new): * # Something tricky is going on... * del el.attrib['style'] # <<<<<<<<<<<<<< * elif new != old: * el.set('style', new) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_attrib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_attrib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (unlikely(PyObject_DelItem(__pyx_t_3, __pyx_n_s_style) < 0)) __PYX_ERR(0, 300, __pyx_L1_error) + if (unlikely(PyObject_DelItem(__pyx_t_3, __pyx_n_s_style) < 0)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/html/clean.py":298 + /* "lxml/html/clean.py":297 * new = _css_javascript_re.sub('', old) * new = _css_import_re.sub('', new) * if self._has_sneaky_javascript(new): # <<<<<<<<<<<<<< @@ -3972,75 +3834,75 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py goto __pyx_L32; } - /* "lxml/html/clean.py":301 + /* "lxml/html/clean.py":300 * # Something tricky is going on... * del el.attrib['style'] * elif new != old: # <<<<<<<<<<<<<< * el.set('style', new) * if not self.style: */ - __pyx_t_3 = PyObject_RichCompare(__pyx_v_new, __pyx_v_old, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_new, __pyx_v_old, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 300, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "lxml/html/clean.py":302 + /* "lxml/html/clean.py":301 * del el.attrib['style'] * elif new != old: * el.set('style', new) # <<<<<<<<<<<<<< * if not self.style: * for el in list(doc.iter('style')): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_set); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 302, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = NULL; + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_set); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_9 = NULL; __pyx_t_13 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_6); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_12); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); + __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); + __Pyx_DECREF_SET(__pyx_t_12, function); __pyx_t_13 = 1; } } #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_style, __pyx_v_new}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 302, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyFunction_Check(__pyx_t_12)) { + PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_n_s_style, __pyx_v_new}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_style, __pyx_v_new}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 302, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) { + PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_n_s_style, __pyx_v_new}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 302, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - if (__pyx_t_6) { - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6); __pyx_t_6 = NULL; + __pyx_t_4 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__pyx_t_9) { + __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9); __pyx_t_9 = NULL; } __Pyx_INCREF(__pyx_n_s_style); __Pyx_GIVEREF(__pyx_n_s_style); - PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_n_s_style); + PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_13, __pyx_n_s_style); __Pyx_INCREF(__pyx_v_new); __Pyx_GIVEREF(__pyx_v_new); - PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_v_new); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 302, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_13, __pyx_v_new); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/html/clean.py":301 + /* "lxml/html/clean.py":300 * # Something tricky is going on... * del el.attrib['style'] * elif new != old: # <<<<<<<<<<<<<< @@ -4050,7 +3912,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py } __pyx_L32:; - /* "lxml/html/clean.py":294 + /* "lxml/html/clean.py":293 * # from styles, otherwise... * if not self.inline_style: * for el in _find_styled_elements(doc): # <<<<<<<<<<<<<< @@ -4060,7 +3922,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/html/clean.py":293 + /* "lxml/html/clean.py":292 * # If we're deleting style then we don't have to remove JS links * # from styles, otherwise... * if not self.inline_style: # <<<<<<<<<<<<<< @@ -4069,136 +3931,139 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":303 + /* "lxml/html/clean.py":302 * elif new != old: * el.set('style', new) * if not self.style: # <<<<<<<<<<<<<< * for el in list(doc.iter('style')): * if el.get('type', '').lower().strip() == 'text/javascript': */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { - /* "lxml/html/clean.py":304 + /* "lxml/html/clean.py":303 * el.set('style', new) * if not self.style: * for el in list(doc.iter('style')): # <<<<<<<<<<<<<< * if el.get('type', '').lower().strip() == 'text/javascript': * el.drop_tree() */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_doc, __pyx_n_s_iter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 304, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 304, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_doc, __pyx_n_s_iter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PySequence_List(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 304, __pyx_L1_error) + __pyx_t_12 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_5 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_12, __pyx_n_s_style) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s_style); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; + __pyx_t_3 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 303, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { - if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break; + if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) 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(0, 304, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 303, __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(0, 304, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 303, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); #endif - __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_5); - __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_3); + __pyx_t_3 = 0; - /* "lxml/html/clean.py":305 + /* "lxml/html/clean.py":304 * if not self.style: * for el in list(doc.iter('style')): * if el.get('type', '').lower().strip() == 'text/javascript': # <<<<<<<<<<<<<< * el.drop_tree() * continue */ - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_get); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 305, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 305, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_lower); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 305, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 304, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 304, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_lower); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 304, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_10, function); + __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 305, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 305, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_strip); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 305, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); + __pyx_t_12 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 304, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_10); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); - __Pyx_INCREF(__pyx_t_4); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_strip); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 304, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_12 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_10, function); + __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_4) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 305, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 305, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_kp_s_text_javascript, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 305, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_3 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 304, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_kp_s_text_javascript, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 304, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "lxml/html/clean.py":306 + /* "lxml/html/clean.py":305 * for el in list(doc.iter('style')): * if el.get('type', '').lower().strip() == 'text/javascript': * el.drop_tree() # <<<<<<<<<<<<<< * continue * old = el.text or '' */ - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_drop_tree); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 306, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_10); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); - __Pyx_INCREF(__pyx_t_4); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_drop_tree); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_10, function); + __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_4) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 306, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 306, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_3 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 305, __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/html/clean.py":307 + /* "lxml/html/clean.py":306 * if el.get('type', '').lower().strip() == 'text/javascript': * el.drop_tree() * continue # <<<<<<<<<<<<<< @@ -4207,7 +4072,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ goto __pyx_L34_continue; - /* "lxml/html/clean.py":305 + /* "lxml/html/clean.py":304 * if not self.style: * for el in list(doc.iter('style')): * if el.get('type', '').lower().strip() == 'text/javascript': # <<<<<<<<<<<<<< @@ -4216,216 +4081,188 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":308 + /* "lxml/html/clean.py":307 * el.drop_tree() * continue * old = el.text or '' # <<<<<<<<<<<<<< * new = _css_javascript_re.sub('', old) * # The imported CSS can do anything; we just can't allow: */ - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_text); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 308, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 308, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_text); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 307, __pyx_L1_error) if (!__pyx_t_1) { - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __Pyx_INCREF(__pyx_t_10); - __pyx_t_5 = __pyx_t_10; - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_3 = __pyx_t_4; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L37_bool_binop_done; } - __Pyx_INCREF(__pyx_kp_s__4); - __pyx_t_5 = __pyx_kp_s__4; + __Pyx_INCREF(__pyx_kp_s_); + __pyx_t_3 = __pyx_kp_s_; __pyx_L37_bool_binop_done:; - __Pyx_XDECREF_SET(__pyx_v_old, __pyx_t_5); - __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_old, __pyx_t_3); + __pyx_t_3 = 0; - /* "lxml/html/clean.py":309 + /* "lxml/html/clean.py":308 * continue * old = el.text or '' * new = _css_javascript_re.sub('', old) # <<<<<<<<<<<<<< * # The imported CSS can do anything; we just can't allow: * new = _css_import_re.sub('', old) */ - __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_css_javascript_re); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 309, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_sub); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 309, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_css_javascript_re); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = NULL; + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sub); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; __pyx_t_13 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_10)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_10); + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_12); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); + __Pyx_DECREF_SET(__pyx_t_12, function); __pyx_t_13 = 1; } } #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_kp_s__4, __pyx_v_old}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 309, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_GOTREF(__pyx_t_5); + if (PyFunction_Check(__pyx_t_12)) { + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_s_, __pyx_v_old}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 308, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_kp_s__4, __pyx_v_old}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 309, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) { + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_s_, __pyx_v_old}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 308, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 309, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - if (__pyx_t_10) { - __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_10); __pyx_t_10 = NULL; + __pyx_t_9 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_4) { + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL; } - __Pyx_INCREF(__pyx_kp_s__4); - __Pyx_GIVEREF(__pyx_kp_s__4); - PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_13, __pyx_kp_s__4); + __Pyx_INCREF(__pyx_kp_s_); + __Pyx_GIVEREF(__pyx_kp_s_); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_13, __pyx_kp_s_); __Pyx_INCREF(__pyx_v_old); __Pyx_GIVEREF(__pyx_v_old); - PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_13, __pyx_v_old); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 309, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_13, __pyx_v_old); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF_SET(__pyx_v_new, __pyx_t_5); - __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF_SET(__pyx_v_new, __pyx_t_3); + __pyx_t_3 = 0; - /* "lxml/html/clean.py":311 + /* "lxml/html/clean.py":310 * new = _css_javascript_re.sub('', old) * # The imported CSS can do anything; we just can't allow: * new = _css_import_re.sub('', old) # <<<<<<<<<<<<<< * if self._has_sneaky_javascript(new): * # Something tricky is going on... */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_css_import_re); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 311, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sub); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 311, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_css_import_re); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 310, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_sub); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 310, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_12 = NULL; __pyx_t_13 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_4); + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); + __Pyx_DECREF_SET(__pyx_t_9, function); __pyx_t_13 = 1; } } #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_s__4, __pyx_v_old}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 311, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_5); + if (PyFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_kp_s_, __pyx_v_old}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_s__4, __pyx_v_old}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 311, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_kp_s_, __pyx_v_old}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 311, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - if (__pyx_t_4) { - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); __pyx_t_4 = NULL; + __pyx_t_4 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 310, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__pyx_t_12) { + __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_12); __pyx_t_12 = NULL; } - __Pyx_INCREF(__pyx_kp_s__4); - __Pyx_GIVEREF(__pyx_kp_s__4); - PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_kp_s__4); + __Pyx_INCREF(__pyx_kp_s_); + __Pyx_GIVEREF(__pyx_kp_s_); + PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_13, __pyx_kp_s_); __Pyx_INCREF(__pyx_v_old); __Pyx_GIVEREF(__pyx_v_old); - PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_v_old); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 311, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_13, __pyx_v_old); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF_SET(__pyx_v_new, __pyx_t_5); - __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF_SET(__pyx_v_new, __pyx_t_3); + __pyx_t_3 = 0; - /* "lxml/html/clean.py":312 + /* "lxml/html/clean.py":311 * # The imported CSS can do anything; we just can't allow: * new = _css_import_re.sub('', old) * if self._has_sneaky_javascript(new): # <<<<<<<<<<<<<< * # Something tricky is going on... * el.text = '/[inserted by cython to avoid comment start]* deleted *[inserted by cython to avoid comment closer]/' */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_sneaky_javascript); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 312, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_10)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_10); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_sneaky_javascript); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 311, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - } - } - if (!__pyx_t_10) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_new); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 312, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_new}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 312, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_GOTREF(__pyx_t_5); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_new}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 312, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_GOTREF(__pyx_t_5); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 312, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_10); __pyx_t_10 = NULL; - __Pyx_INCREF(__pyx_v_new); - __Pyx_GIVEREF(__pyx_v_new); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_new); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 312, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_t_9, function); } } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 312, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_4, __pyx_v_new) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_new); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 311, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 311, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "lxml/html/clean.py":314 + /* "lxml/html/clean.py":313 * if self._has_sneaky_javascript(new): * # Something tricky is going on... * el.text = '/[inserted by cython to avoid comment start]* deleted *[inserted by cython to avoid comment closer]/' # <<<<<<<<<<<<<< * elif new != old: * el.text = new */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_el, __pyx_n_s_text, __pyx_kp_s_deleted) < 0) __PYX_ERR(0, 314, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_el, __pyx_n_s_text, __pyx_kp_s_deleted) < 0) __PYX_ERR(0, 313, __pyx_L1_error) - /* "lxml/html/clean.py":312 + /* "lxml/html/clean.py":311 * # The imported CSS can do anything; we just can't allow: * new = _css_import_re.sub('', old) * if self._has_sneaky_javascript(new): # <<<<<<<<<<<<<< @@ -4435,28 +4272,28 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py goto __pyx_L39; } - /* "lxml/html/clean.py":315 + /* "lxml/html/clean.py":314 * # Something tricky is going on... * el.text = '/[inserted by cython to avoid comment start]* deleted *[inserted by cython to avoid comment closer]/' * elif new != old: # <<<<<<<<<<<<<< * el.text = new * if self.comments or self.processing_instructions: */ - __pyx_t_5 = PyObject_RichCompare(__pyx_v_new, __pyx_v_old, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 315, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 315, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_3 = PyObject_RichCompare(__pyx_v_new, __pyx_v_old, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 314, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 314, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "lxml/html/clean.py":316 + /* "lxml/html/clean.py":315 * el.text = '/[inserted by cython to avoid comment start]* deleted *[inserted by cython to avoid comment closer]/' * elif new != old: * el.text = new # <<<<<<<<<<<<<< * if self.comments or self.processing_instructions: * # FIXME: why either? I feel like there's some obscure reason */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_el, __pyx_n_s_text, __pyx_v_new) < 0) __PYX_ERR(0, 316, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_el, __pyx_n_s_text, __pyx_v_new) < 0) __PYX_ERR(0, 315, __pyx_L1_error) - /* "lxml/html/clean.py":315 + /* "lxml/html/clean.py":314 * # Something tricky is going on... * el.text = '/[inserted by cython to avoid comment start]* deleted *[inserted by cython to avoid comment closer]/' * elif new != old: # <<<<<<<<<<<<<< @@ -4466,7 +4303,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py } __pyx_L39:; - /* "lxml/html/clean.py":304 + /* "lxml/html/clean.py":303 * el.set('style', new) * if not self.style: * for el in list(doc.iter('style')): # <<<<<<<<<<<<<< @@ -4475,9 +4312,9 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ __pyx_L34_continue:; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/html/clean.py":303 + /* "lxml/html/clean.py":302 * elif new != old: * el.set('style', new) * if not self.style: # <<<<<<<<<<<<<< @@ -4486,7 +4323,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":280 + /* "lxml/html/clean.py":279 * if aname not in safe_attrs: * del attrib[aname] * if self.javascript: # <<<<<<<<<<<<<< @@ -4495,46 +4332,46 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":317 + /* "lxml/html/clean.py":316 * elif new != old: * el.text = new * if self.comments or self.processing_instructions: # <<<<<<<<<<<<<< * # FIXME: why either? I feel like there's some obscure reason * # because you can put PIs in comments...? But I've already */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_comments); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __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(0, 317, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_comments); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 316, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 316, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L41_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_processing_instructions); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __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(0, 317, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_processing_instructions); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 316, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 316, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __pyx_t_2; __pyx_L41_bool_binop_done:; if (__pyx_t_1) { - /* "lxml/html/clean.py":321 + /* "lxml/html/clean.py":320 * # because you can put PIs in comments...? But I've already * # forgotten it * kill_tags.add(etree.Comment) # <<<<<<<<<<<<<< * if self.processing_instructions: * kill_tags.add(etree.ProcessingInstruction) */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_etree); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 321, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Comment); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 321, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_etree); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_9 = PySet_Add(__pyx_v_kill_tags, __pyx_t_5); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 321, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Comment); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 320, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_8 = PySet_Add(__pyx_v_kill_tags, __pyx_t_3); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 320, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/html/clean.py":317 + /* "lxml/html/clean.py":316 * elif new != old: * el.text = new * if self.comments or self.processing_instructions: # <<<<<<<<<<<<<< @@ -4543,35 +4380,35 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":322 + /* "lxml/html/clean.py":321 * # forgotten it * kill_tags.add(etree.Comment) * if self.processing_instructions: # <<<<<<<<<<<<<< * kill_tags.add(etree.ProcessingInstruction) * if self.style: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_processing_instructions); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 322, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 322, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_processing_instructions); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 321, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 321, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "lxml/html/clean.py":323 + /* "lxml/html/clean.py":322 * kill_tags.add(etree.Comment) * if self.processing_instructions: * kill_tags.add(etree.ProcessingInstruction) # <<<<<<<<<<<<<< * if self.style: * kill_tags.add('style') */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_etree); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 323, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_ProcessingInstruction); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_etree); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_9 = PySet_Add(__pyx_v_kill_tags, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 323, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ProcessingInstruction); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = PySet_Add(__pyx_v_kill_tags, __pyx_t_5); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 322, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/html/clean.py":322 + /* "lxml/html/clean.py":321 * # forgotten it * kill_tags.add(etree.Comment) * if self.processing_instructions: # <<<<<<<<<<<<<< @@ -4580,29 +4417,29 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":324 + /* "lxml/html/clean.py":323 * if self.processing_instructions: * kill_tags.add(etree.ProcessingInstruction) * if self.style: # <<<<<<<<<<<<<< * kill_tags.add('style') * if self.inline_style: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 324, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 324, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { - /* "lxml/html/clean.py":325 + /* "lxml/html/clean.py":324 * kill_tags.add(etree.ProcessingInstruction) * if self.style: * kill_tags.add('style') # <<<<<<<<<<<<<< * if self.inline_style: * etree.strip_attributes(doc, 'style') */ - __pyx_t_9 = PySet_Add(__pyx_v_kill_tags, __pyx_n_s_style); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 325, __pyx_L1_error) + __pyx_t_8 = PySet_Add(__pyx_v_kill_tags, __pyx_n_s_style); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 324, __pyx_L1_error) - /* "lxml/html/clean.py":324 + /* "lxml/html/clean.py":323 * if self.processing_instructions: * kill_tags.add(etree.ProcessingInstruction) * if self.style: # <<<<<<<<<<<<<< @@ -4611,64 +4448,64 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":326 + /* "lxml/html/clean.py":325 * if self.style: * kill_tags.add('style') * if self.inline_style: # <<<<<<<<<<<<<< * etree.strip_attributes(doc, 'style') * if self.links: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inline_style); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 326, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 326, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inline_style); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 325, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { - /* "lxml/html/clean.py":327 + /* "lxml/html/clean.py":326 * kill_tags.add('style') * if self.inline_style: * etree.strip_attributes(doc, 'style') # <<<<<<<<<<<<<< * if self.links: * kill_tags.add('link') */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_etree); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 327, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_strip_attributes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 327, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_etree); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strip_attributes); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; __pyx_t_13 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_5); + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); + __Pyx_DECREF_SET(__pyx_t_9, function); __pyx_t_13 = 1; } } #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_doc, __pyx_n_s_style}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 327, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); + if (PyFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_doc, __pyx_n_s_style}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 326, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_5); } else #endif #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_doc, __pyx_n_s_style}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 327, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_doc, __pyx_n_s_style}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 326, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_4 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 327, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__pyx_t_5) { - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(__pyx_v_doc); __Pyx_GIVEREF(__pyx_v_doc); @@ -4676,14 +4513,14 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py __Pyx_INCREF(__pyx_n_s_style); __Pyx_GIVEREF(__pyx_n_s_style); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_13, __pyx_n_s_style); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 327, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/html/clean.py":326 + /* "lxml/html/clean.py":325 * if self.style: * kill_tags.add('style') * if self.inline_style: # <<<<<<<<<<<<<< @@ -4692,29 +4529,29 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":328 + /* "lxml/html/clean.py":327 * if self.inline_style: * etree.strip_attributes(doc, 'style') * if self.links: # <<<<<<<<<<<<<< * kill_tags.add('link') * elif self.style or self.javascript: - */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_links); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 328, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 328, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_links); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 327, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 327, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { - /* "lxml/html/clean.py":329 + /* "lxml/html/clean.py":328 * etree.strip_attributes(doc, 'style') * if self.links: * kill_tags.add('link') # <<<<<<<<<<<<<< * elif self.style or self.javascript: * # We must get rid of included stylesheets if Javascript is not */ - __pyx_t_9 = PySet_Add(__pyx_v_kill_tags, __pyx_n_s_link); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 329, __pyx_L1_error) + __pyx_t_8 = PySet_Add(__pyx_v_kill_tags, __pyx_n_s_link); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 328, __pyx_L1_error) - /* "lxml/html/clean.py":328 + /* "lxml/html/clean.py":327 * if self.inline_style: * etree.strip_attributes(doc, 'style') * if self.links: # <<<<<<<<<<<<<< @@ -4724,183 +4561,161 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py goto __pyx_L46; } - /* "lxml/html/clean.py":330 + /* "lxml/html/clean.py":329 * if self.links: * kill_tags.add('link') * elif self.style or self.javascript: # <<<<<<<<<<<<<< * # We must get rid of included stylesheets if Javascript is not * # allowed, as you can put Javascript in them */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 330, __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(0, 330, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L47_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_javascript); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 330, __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(0, 330, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_javascript); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __pyx_t_2; __pyx_L47_bool_binop_done:; if (__pyx_t_1) { - /* "lxml/html/clean.py":333 + /* "lxml/html/clean.py":332 * # We must get rid of included stylesheets if Javascript is not * # allowed, as you can put Javascript in them * for el in list(doc.iter('link')): # <<<<<<<<<<<<<< * if 'stylesheet' in el.get('rel', '').lower(): * # Note this kills alternate stylesheets as well */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_doc, __pyx_n_s_iter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 333, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 333, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PySequence_List(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 333, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_doc, __pyx_n_s_iter); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_4, __pyx_n_s_link) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_n_s_link); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __pyx_t_9; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; for (;;) { - if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break; + if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 333, __pyx_L1_error) + __pyx_t_9 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_9); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 332, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 333, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); #endif - __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_3); - __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_9); + __pyx_t_9 = 0; - /* "lxml/html/clean.py":334 + /* "lxml/html/clean.py":333 * # allowed, as you can put Javascript in them * for el in list(doc.iter('link')): * if 'stylesheet' in el.get('rel', '').lower(): # <<<<<<<<<<<<<< * # Note this kills alternate stylesheets as well * if not self.allow_element(el): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 334, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 334, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_lower); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 334, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_lower); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 334, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 334, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = (__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_9)) __PYX_ERR(0, 333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_stylesheet, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 334, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_stylesheet, __pyx_t_9, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 333, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/html/clean.py":336 + /* "lxml/html/clean.py":335 * if 'stylesheet' in el.get('rel', '').lower(): * # Note this kills alternate stylesheets as well * if not self.allow_element(el): # <<<<<<<<<<<<<< * el.drop_tree() * if self.meta: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_allow_element); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 336, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_allow_element); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = NULL; + __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_el); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 336, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_el}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 336, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_el}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 336, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 336, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_INCREF(__pyx_v_el); - __Pyx_GIVEREF(__pyx_v_el); - PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_el); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 336, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } - } + __pyx_t_9 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_v_el) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_el); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 336, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 335, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { - /* "lxml/html/clean.py":337 + /* "lxml/html/clean.py":336 * # Note this kills alternate stylesheets as well * if not self.allow_element(el): * el.drop_tree() # <<<<<<<<<<<<<< * if self.meta: * kill_tags.add('meta') */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_drop_tree); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_drop_tree); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_10 = NULL; + __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_10)) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_10) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 337, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 337, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = (__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_9)) __PYX_ERR(0, 336, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "lxml/html/clean.py":336 + /* "lxml/html/clean.py":335 * if 'stylesheet' in el.get('rel', '').lower(): * # Note this kills alternate stylesheets as well * if not self.allow_element(el): # <<<<<<<<<<<<<< @@ -4909,7 +4724,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":334 + /* "lxml/html/clean.py":333 * # allowed, as you can put Javascript in them * for el in list(doc.iter('link')): * if 'stylesheet' in el.get('rel', '').lower(): # <<<<<<<<<<<<<< @@ -4918,7 +4733,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":333 + /* "lxml/html/clean.py":332 * # We must get rid of included stylesheets if Javascript is not * # allowed, as you can put Javascript in them * for el in list(doc.iter('link')): # <<<<<<<<<<<<<< @@ -4926,9 +4741,9 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py * # Note this kills alternate stylesheets as well */ } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/html/clean.py":330 + /* "lxml/html/clean.py":329 * if self.links: * kill_tags.add('link') * elif self.style or self.javascript: # <<<<<<<<<<<<<< @@ -4938,29 +4753,29 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py } __pyx_L46:; - /* "lxml/html/clean.py":338 + /* "lxml/html/clean.py":337 * if not self.allow_element(el): * el.drop_tree() * if self.meta: # <<<<<<<<<<<<<< * kill_tags.add('meta') * if self.page_structure: */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_meta); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 338, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 338, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_meta); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 337, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { - /* "lxml/html/clean.py":339 + /* "lxml/html/clean.py":338 * el.drop_tree() * if self.meta: * kill_tags.add('meta') # <<<<<<<<<<<<<< * if self.page_structure: * remove_tags.update(('head', 'html', 'title')) */ - __pyx_t_9 = PySet_Add(__pyx_v_kill_tags, __pyx_n_s_meta); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_8 = PySet_Add(__pyx_v_kill_tags, __pyx_n_s_meta); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 338, __pyx_L1_error) - /* "lxml/html/clean.py":338 + /* "lxml/html/clean.py":337 * if not self.allow_element(el): * el.drop_tree() * if self.meta: # <<<<<<<<<<<<<< @@ -4969,31 +4784,31 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":340 + /* "lxml/html/clean.py":339 * if self.meta: * kill_tags.add('meta') * if self.page_structure: # <<<<<<<<<<<<<< * remove_tags.update(('head', 'html', 'title')) * if self.embedded: */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_page_structure); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 340, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 340, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_page_structure); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { - /* "lxml/html/clean.py":341 + /* "lxml/html/clean.py":340 * kill_tags.add('meta') * if self.page_structure: * remove_tags.update(('head', 'html', 'title')) # <<<<<<<<<<<<<< * if self.embedded: * # FIXME: is really embedded? */ - __pyx_t_6 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PySet_Type_update, __pyx_v_remove_tags, __pyx_tuple__9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 341, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PySet_Type_update, __pyx_v_remove_tags, __pyx_tuple__4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 340, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/html/clean.py":340 + /* "lxml/html/clean.py":339 * if self.meta: * kill_tags.add('meta') * if self.page_structure: # <<<<<<<<<<<<<< @@ -5002,48 +4817,60 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":342 + /* "lxml/html/clean.py":341 * if self.page_structure: * remove_tags.update(('head', 'html', 'title')) * if self.embedded: # <<<<<<<<<<<<<< * # FIXME: is really embedded? * # We should get rid of any tags not inside ; */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_embedded); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 342, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 342, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_embedded); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 341, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { - /* "lxml/html/clean.py":346 + /* "lxml/html/clean.py":345 * # We should get rid of any tags not inside ; * # These are not really valid anyway. * for el in list(doc.iter('param')): # <<<<<<<<<<<<<< * found_parent = False * parent = el.getparent() */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_doc, __pyx_n_s_iter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 346, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PySequence_List(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __pyx_t_6; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_doc, __pyx_n_s_iter); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_4, __pyx_n_s_param) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_n_s_param); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __pyx_t_9; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; for (;;) { - if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break; + if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_9 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_9); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 345, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); #endif - __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_6); - __pyx_t_6 = 0; + __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_9); + __pyx_t_9 = 0; - /* "lxml/html/clean.py":347 + /* "lxml/html/clean.py":346 * # These are not really valid anyway. * for el in list(doc.iter('param')): * found_parent = False # <<<<<<<<<<<<<< @@ -5052,37 +4879,34 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ __pyx_v_found_parent = 0; - /* "lxml/html/clean.py":348 + /* "lxml/html/clean.py":347 * for el in list(doc.iter('param')): * found_parent = False * parent = el.getparent() # <<<<<<<<<<<<<< * while parent is not None and parent.tag not in ('applet', 'object'): * parent = parent.getparent() */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_getparent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 348, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_getparent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_10 = NULL; + __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_10)) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_10) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 348, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } else { - __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 348, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = (__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_9)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF_SET(__pyx_v_parent, __pyx_t_6); - __pyx_t_6 = 0; + __Pyx_XDECREF_SET(__pyx_v_parent, __pyx_t_9); + __pyx_t_9 = 0; - /* "lxml/html/clean.py":349 + /* "lxml/html/clean.py":348 * found_parent = False * parent = el.getparent() * while parent is not None and parent.tag not in ('applet', 'object'): # <<<<<<<<<<<<<< @@ -5097,55 +4921,52 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py __pyx_t_1 = __pyx_t_14; goto __pyx_L60_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_tag); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 349, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_applet, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 349, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_tag); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 348, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_applet, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 348, __pyx_L1_error) if (__pyx_t_2) { } else { __pyx_t_14 = __pyx_t_2; goto __pyx_L62_bool_binop_done; } - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_object, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 349, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_object, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 348, __pyx_L1_error) __pyx_t_14 = __pyx_t_2; __pyx_L62_bool_binop_done:; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_2 = (__pyx_t_14 != 0); __pyx_t_1 = __pyx_t_2; __pyx_L60_bool_binop_done:; if (!__pyx_t_1) break; - /* "lxml/html/clean.py":350 + /* "lxml/html/clean.py":349 * parent = el.getparent() * while parent is not None and parent.tag not in ('applet', 'object'): * parent = parent.getparent() # <<<<<<<<<<<<<< * if parent is None: * el.drop_tree() */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_getparent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 350, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_getparent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_10 = NULL; + __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_10)) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_10) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 350, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } else { - __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 350, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = (__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_9)) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF_SET(__pyx_v_parent, __pyx_t_6); - __pyx_t_6 = 0; + __Pyx_DECREF_SET(__pyx_v_parent, __pyx_t_9); + __pyx_t_9 = 0; } - /* "lxml/html/clean.py":351 + /* "lxml/html/clean.py":350 * while parent is not None and parent.tag not in ('applet', 'object'): * parent = parent.getparent() * if parent is None: # <<<<<<<<<<<<<< @@ -5156,36 +4977,33 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/html/clean.py":352 + /* "lxml/html/clean.py":351 * parent = parent.getparent() * if parent is None: * el.drop_tree() # <<<<<<<<<<<<<< * kill_tags.update(('applet',)) * # The alternate contents that are in an iframe are a good fallback: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_drop_tree); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 352, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_drop_tree); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_10 = NULL; + __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_10)) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_10) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 352, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } else { - __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 352, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = (__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_9)) __PYX_ERR(0, 351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "lxml/html/clean.py":351 + /* "lxml/html/clean.py":350 * while parent is not None and parent.tag not in ('applet', 'object'): * parent = parent.getparent() * if parent is None: # <<<<<<<<<<<<<< @@ -5194,7 +5012,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":346 + /* "lxml/html/clean.py":345 * # We should get rid of any tags not inside ; * # These are not really valid anyway. * for el in list(doc.iter('param')): # <<<<<<<<<<<<<< @@ -5202,31 +5020,31 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py * parent = el.getparent() */ } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/html/clean.py":353 + /* "lxml/html/clean.py":352 * if parent is None: * el.drop_tree() * kill_tags.update(('applet',)) # <<<<<<<<<<<<<< * # The alternate contents that are in an iframe are a good fallback: * remove_tags.update(('iframe', 'embed', 'layer', 'object', 'param')) */ - __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PySet_Type_update, __pyx_v_kill_tags, __pyx_tuple__11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 353, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PySet_Type_update, __pyx_v_kill_tags, __pyx_tuple__5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/html/clean.py":355 + /* "lxml/html/clean.py":354 * kill_tags.update(('applet',)) * # The alternate contents that are in an iframe are a good fallback: * remove_tags.update(('iframe', 'embed', 'layer', 'object', 'param')) # <<<<<<<<<<<<<< * if self.frames: * # FIXME: ideally we should look at the frame links, but */ - __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PySet_Type_update, __pyx_v_remove_tags, __pyx_tuple__12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 355, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PySet_Type_update, __pyx_v_remove_tags, __pyx_tuple__6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/html/clean.py":342 + /* "lxml/html/clean.py":341 * if self.page_structure: * remove_tags.update(('head', 'html', 'title')) * if self.embedded: # <<<<<<<<<<<<<< @@ -5235,37 +5053,37 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":356 + /* "lxml/html/clean.py":355 * # The alternate contents that are in an iframe are a good fallback: * remove_tags.update(('iframe', 'embed', 'layer', 'object', 'param')) * if self.frames: # <<<<<<<<<<<<<< * # FIXME: ideally we should look at the frame links, but * # generally frames don't mix properly with an HTML */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_frames); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 356, __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(0, 356, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_frames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 355, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { - /* "lxml/html/clean.py":360 + /* "lxml/html/clean.py":359 * # generally frames don't mix properly with an HTML * # fragment anyway. * kill_tags.update(defs.frame_tags) # <<<<<<<<<<<<<< * if self.forms: * remove_tags.add('form') */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_defs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_frame_tags); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 360, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PySet_Type_update, __pyx_v_kill_tags, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_defs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_frame_tags); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PySet_Type_update, __pyx_v_kill_tags, __pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/html/clean.py":356 + /* "lxml/html/clean.py":355 * # The alternate contents that are in an iframe are a good fallback: * remove_tags.update(('iframe', 'embed', 'layer', 'object', 'param')) * if self.frames: # <<<<<<<<<<<<<< @@ -5274,40 +5092,40 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":361 + /* "lxml/html/clean.py":360 * # fragment anyway. * kill_tags.update(defs.frame_tags) * if self.forms: # <<<<<<<<<<<<<< * remove_tags.add('form') * kill_tags.update(('button', 'input', 'select', 'textarea')) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_forms); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 361, __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(0, 361, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_forms); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 360, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { - /* "lxml/html/clean.py":362 + /* "lxml/html/clean.py":361 * kill_tags.update(defs.frame_tags) * if self.forms: * remove_tags.add('form') # <<<<<<<<<<<<<< * kill_tags.update(('button', 'input', 'select', 'textarea')) * if self.annoying_tags: */ - __pyx_t_9 = PySet_Add(__pyx_v_remove_tags, __pyx_n_s_form); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 362, __pyx_L1_error) + __pyx_t_8 = PySet_Add(__pyx_v_remove_tags, __pyx_n_s_form); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 361, __pyx_L1_error) - /* "lxml/html/clean.py":363 + /* "lxml/html/clean.py":362 * if self.forms: * remove_tags.add('form') * kill_tags.update(('button', 'input', 'select', 'textarea')) # <<<<<<<<<<<<<< * if self.annoying_tags: * remove_tags.update(('blink', 'marquee')) */ - __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PySet_Type_update, __pyx_v_kill_tags, __pyx_tuple__13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 363, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PySet_Type_update, __pyx_v_kill_tags, __pyx_tuple__7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/html/clean.py":361 + /* "lxml/html/clean.py":360 * # fragment anyway. * kill_tags.update(defs.frame_tags) * if self.forms: # <<<<<<<<<<<<<< @@ -5316,31 +5134,31 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":364 + /* "lxml/html/clean.py":363 * remove_tags.add('form') * kill_tags.update(('button', 'input', 'select', 'textarea')) * if self.annoying_tags: # <<<<<<<<<<<<<< * remove_tags.update(('blink', 'marquee')) * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_annoying_tags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 364, __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(0, 364, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_annoying_tags); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 363, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { - /* "lxml/html/clean.py":365 + /* "lxml/html/clean.py":364 * kill_tags.update(('button', 'input', 'select', 'textarea')) * if self.annoying_tags: * remove_tags.update(('blink', 'marquee')) # <<<<<<<<<<<<<< * * _remove = [] */ - __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PySet_Type_update, __pyx_v_remove_tags, __pyx_tuple__14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 365, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PySet_Type_update, __pyx_v_remove_tags, __pyx_tuple__8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/html/clean.py":364 + /* "lxml/html/clean.py":363 * remove_tags.add('form') * kill_tags.update(('button', 'input', 'select', 'textarea')) * if self.annoying_tags: # <<<<<<<<<<<<<< @@ -5349,171 +5167,140 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":367 + /* "lxml/html/clean.py":366 * remove_tags.update(('blink', 'marquee')) * * _remove = [] # <<<<<<<<<<<<<< * _kill = [] * for el in doc.iter(): */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 367, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_v__remove = ((PyObject*)__pyx_t_3); - __pyx_t_3 = 0; + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v__remove = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; - /* "lxml/html/clean.py":368 + /* "lxml/html/clean.py":367 * * _remove = [] * _kill = [] # <<<<<<<<<<<<<< * for el in doc.iter(): * if el.tag in kill_tags: */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 368, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_v__kill = ((PyObject*)__pyx_t_3); - __pyx_t_3 = 0; + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 367, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v__kill = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; - /* "lxml/html/clean.py":369 + /* "lxml/html/clean.py":368 * _remove = [] * _kill = [] * for el in doc.iter(): # <<<<<<<<<<<<<< * if el.tag in kill_tags: * if self.allow_element(el): */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_doc, __pyx_n_s_iter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_doc, __pyx_n_s_iter); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); + __Pyx_DECREF_SET(__pyx_t_9, function); } } - if (__pyx_t_4) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 369, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 369, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { - __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; - __pyx_t_8 = NULL; + __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { + __pyx_t_9 = __pyx_t_5; __Pyx_INCREF(__pyx_t_9); __pyx_t_6 = 0; + __pyx_t_7 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 369, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_7 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 368, __pyx_L1_error) } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { - if (likely(!__pyx_t_8)) { - if (likely(PyList_CheckExact(__pyx_t_6))) { - if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break; + if (likely(!__pyx_t_7)) { + 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_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 369, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 368, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 369, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PySequence_ITEM(__pyx_t_9, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); #endif } else { - if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)) break; + if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_9)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 369, __pyx_L1_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 368, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 369, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PySequence_ITEM(__pyx_t_9, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); #endif } } else { - __pyx_t_3 = __pyx_t_8(__pyx_t_6); - if (unlikely(!__pyx_t_3)) { + __pyx_t_5 = __pyx_t_7(__pyx_t_9); + if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 369, __pyx_L1_error) + else __PYX_ERR(0, 368, __pyx_L1_error) } break; } - __Pyx_GOTREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_t_5); } - __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_3); - __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_5); + __pyx_t_5 = 0; - /* "lxml/html/clean.py":370 + /* "lxml/html/clean.py":369 * _kill = [] * for el in doc.iter(): * if el.tag in kill_tags: # <<<<<<<<<<<<<< * if self.allow_element(el): * continue */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_tag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 370, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = (__Pyx_PySet_ContainsTF(__pyx_t_3, __pyx_v_kill_tags, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 370, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_tag); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = (__Pyx_PySet_ContainsTF(__pyx_t_5, __pyx_v_kill_tags, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 369, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/html/clean.py":371 + /* "lxml/html/clean.py":370 * for el in doc.iter(): * if el.tag in kill_tags: * if self.allow_element(el): # <<<<<<<<<<<<<< * continue * _kill.append(el) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_allow_element); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_allow_element); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_10 = NULL; + __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_10)) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_10) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_el); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_el}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_el}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 371, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_10); __pyx_t_10 = NULL; - __Pyx_INCREF(__pyx_v_el); - __Pyx_GIVEREF(__pyx_v_el); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_el); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - } + __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_v_el) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_el); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 371, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { - /* "lxml/html/clean.py":372 + /* "lxml/html/clean.py":371 * if el.tag in kill_tags: * if self.allow_element(el): * continue # <<<<<<<<<<<<<< @@ -5522,7 +5309,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ goto __pyx_L68_continue; - /* "lxml/html/clean.py":371 + /* "lxml/html/clean.py":370 * for el in doc.iter(): * if el.tag in kill_tags: * if self.allow_element(el): # <<<<<<<<<<<<<< @@ -5531,16 +5318,16 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":373 + /* "lxml/html/clean.py":372 * if self.allow_element(el): * continue * _kill.append(el) # <<<<<<<<<<<<<< * elif el.tag in remove_tags: * if self.allow_element(el): */ - __pyx_t_9 = __Pyx_PyList_Append(__pyx_v__kill, __pyx_v_el); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 373, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v__kill, __pyx_v_el); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 372, __pyx_L1_error) - /* "lxml/html/clean.py":370 + /* "lxml/html/clean.py":369 * _kill = [] * for el in doc.iter(): * if el.tag in kill_tags: # <<<<<<<<<<<<<< @@ -5550,77 +5337,49 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py goto __pyx_L70; } - /* "lxml/html/clean.py":374 + /* "lxml/html/clean.py":373 * continue * _kill.append(el) * elif el.tag in remove_tags: # <<<<<<<<<<<<<< * if self.allow_element(el): * continue */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_tag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = (__Pyx_PySet_ContainsTF(__pyx_t_3, __pyx_v_remove_tags, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 374, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_tag); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = (__Pyx_PySet_ContainsTF(__pyx_t_5, __pyx_v_remove_tags, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 373, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/html/clean.py":375 + /* "lxml/html/clean.py":374 * _kill.append(el) * elif el.tag in remove_tags: * if self.allow_element(el): # <<<<<<<<<<<<<< * continue * _remove.append(el) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_allow_element); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 375, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_allow_element); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = NULL; + __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_el); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 375, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_el}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 375, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_el}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 375, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 375, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_INCREF(__pyx_v_el); - __Pyx_GIVEREF(__pyx_v_el); - PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_el); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 375, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } - } + __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_v_el) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_el); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 375, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { - /* "lxml/html/clean.py":376 + /* "lxml/html/clean.py":375 * elif el.tag in remove_tags: * if self.allow_element(el): * continue # <<<<<<<<<<<<<< @@ -5629,7 +5388,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ goto __pyx_L68_continue; - /* "lxml/html/clean.py":375 + /* "lxml/html/clean.py":374 * _kill.append(el) * elif el.tag in remove_tags: * if self.allow_element(el): # <<<<<<<<<<<<<< @@ -5638,16 +5397,16 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":377 + /* "lxml/html/clean.py":376 * if self.allow_element(el): * continue * _remove.append(el) # <<<<<<<<<<<<<< * * if _remove and _remove[0] == doc: */ - __pyx_t_9 = __Pyx_PyList_Append(__pyx_v__remove, __pyx_v_el); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 377, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v__remove, __pyx_v_el); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 376, __pyx_L1_error) - /* "lxml/html/clean.py":374 + /* "lxml/html/clean.py":373 * continue * _kill.append(el) * elif el.tag in remove_tags: # <<<<<<<<<<<<<< @@ -5657,7 +5416,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py } __pyx_L70:; - /* "lxml/html/clean.py":369 + /* "lxml/html/clean.py":368 * _remove = [] * _kill = [] * for el in doc.iter(): # <<<<<<<<<<<<<< @@ -5666,9 +5425,9 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ __pyx_L68_continue:; } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "lxml/html/clean.py":379 + /* "lxml/html/clean.py":378 * _remove.append(el) * * if _remove and _remove[0] == doc: # <<<<<<<<<<<<<< @@ -5681,70 +5440,67 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py __pyx_t_2 = __pyx_t_1; goto __pyx_L74_bool_binop_done; } - __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v__remove, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 379, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, __pyx_v_doc, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 379, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 379, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v__remove, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_9, __pyx_v_doc, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __pyx_t_1; __pyx_L74_bool_binop_done:; if (__pyx_t_2) { - /* "lxml/html/clean.py":382 + /* "lxml/html/clean.py":381 * # We have to drop the parent-most tag, which we can't * # do. Instead we'll rewrite it: * el = _remove.pop(0) # <<<<<<<<<<<<<< * el.tag = 'div' * el.attrib.clear() */ - __pyx_t_3 = __Pyx_PyList_PopIndex(__pyx_v__remove, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 382, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_3); - __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyList_PopIndex(__pyx_v__remove, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_5); + __pyx_t_5 = 0; - /* "lxml/html/clean.py":383 + /* "lxml/html/clean.py":382 * # do. Instead we'll rewrite it: * el = _remove.pop(0) * el.tag = 'div' # <<<<<<<<<<<<<< * el.attrib.clear() * elif _kill and _kill[0] == doc: */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_el, __pyx_n_s_tag, __pyx_n_s_div) < 0) __PYX_ERR(0, 383, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_el, __pyx_n_s_tag, __pyx_n_s_div) < 0) __PYX_ERR(0, 382, __pyx_L1_error) - /* "lxml/html/clean.py":384 + /* "lxml/html/clean.py":383 * el = _remove.pop(0) * el.tag = 'div' * el.attrib.clear() # <<<<<<<<<<<<<< * elif _kill and _kill[0] == doc: * # We have to drop the parent-most element, which we can't */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_attrib); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 384, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_clear); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 384, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_attrib); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 383, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_clear); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_6)) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 384, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 384, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 383, __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; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/html/clean.py":379 + /* "lxml/html/clean.py":378 * _remove.append(el) * * if _remove and _remove[0] == doc: # <<<<<<<<<<<<<< @@ -5754,7 +5510,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py goto __pyx_L73; } - /* "lxml/html/clean.py":385 + /* "lxml/html/clean.py":384 * el.tag = 'div' * el.attrib.clear() * elif _kill and _kill[0] == doc: # <<<<<<<<<<<<<< @@ -5767,51 +5523,51 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py __pyx_t_2 = __pyx_t_1; goto __pyx_L76_bool_binop_done; } - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v__kill, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 385, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_doc, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 385, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 385, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v__kill, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 384, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_v_doc, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 384, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 384, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __pyx_t_1; __pyx_L76_bool_binop_done:; if (__pyx_t_2) { - /* "lxml/html/clean.py":388 + /* "lxml/html/clean.py":387 * # We have to drop the parent-most element, which we can't * # do. Instead we'll clear it: * el = _kill.pop(0) # <<<<<<<<<<<<<< * if el.tag != 'html': * el.tag = 'div' */ - __pyx_t_4 = __Pyx_PyList_PopIndex(__pyx_v__kill, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 388, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyList_PopIndex(__pyx_v__kill, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_4); __pyx_t_4 = 0; - /* "lxml/html/clean.py":389 + /* "lxml/html/clean.py":388 * # do. Instead we'll clear it: * el = _kill.pop(0) * if el.tag != 'html': # <<<<<<<<<<<<<< * el.tag = 'div' * el.clear() */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 389, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_html, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 389, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_html, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 388, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { - /* "lxml/html/clean.py":390 + /* "lxml/html/clean.py":389 * el = _kill.pop(0) * if el.tag != 'html': * el.tag = 'div' # <<<<<<<<<<<<<< * el.clear() * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_el, __pyx_n_s_tag, __pyx_n_s_div) < 0) __PYX_ERR(0, 390, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_el, __pyx_n_s_tag, __pyx_n_s_div) < 0) __PYX_ERR(0, 389, __pyx_L1_error) - /* "lxml/html/clean.py":389 + /* "lxml/html/clean.py":388 * # do. Instead we'll clear it: * el = _kill.pop(0) * if el.tag != 'html': # <<<<<<<<<<<<<< @@ -5820,36 +5576,33 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":391 + /* "lxml/html/clean.py":390 * if el.tag != 'html': * el.tag = 'div' * el.clear() # <<<<<<<<<<<<<< * * _kill.reverse() # start with innermost tags */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_clear); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 391, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_clear); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 390, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); + __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 391, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 391, __pyx_L1_error) - } + __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/html/clean.py":385 + /* "lxml/html/clean.py":384 * el.tag = 'div' * el.attrib.clear() * elif _kill and _kill[0] == doc: # <<<<<<<<<<<<<< @@ -5859,64 +5612,61 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py } __pyx_L73:; - /* "lxml/html/clean.py":393 + /* "lxml/html/clean.py":392 * el.clear() * * _kill.reverse() # start with innermost tags # <<<<<<<<<<<<<< * for el in _kill: * el.drop_tree() */ - __pyx_t_9 = PyList_Reverse(__pyx_v__kill); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 393, __pyx_L1_error) + __pyx_t_8 = PyList_Reverse(__pyx_v__kill); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 392, __pyx_L1_error) - /* "lxml/html/clean.py":394 + /* "lxml/html/clean.py":393 * * _kill.reverse() # start with innermost tags * for el in _kill: # <<<<<<<<<<<<<< * el.drop_tree() * for el in _remove: */ - __pyx_t_4 = __pyx_v__kill; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0; + __pyx_t_4 = __pyx_v__kill; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; for (;;) { - if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break; + if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 394, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 393, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 394, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 393, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); #endif - __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_3); - __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_5); + __pyx_t_5 = 0; - /* "lxml/html/clean.py":395 + /* "lxml/html/clean.py":394 * _kill.reverse() # start with innermost tags * for el in _kill: * el.drop_tree() # <<<<<<<<<<<<<< * for el in _remove: * el.drop_tag() */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_drop_tree); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 395, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_10)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_10); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_drop_tree); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 394, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); + __Pyx_DECREF_SET(__pyx_t_9, function); } } - if (__pyx_t_10) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 395, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 395, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 394, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/html/clean.py":394 + /* "lxml/html/clean.py":393 * * _kill.reverse() # start with innermost tags * for el in _kill: # <<<<<<<<<<<<<< @@ -5926,55 +5676,52 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/html/clean.py":396 + /* "lxml/html/clean.py":395 * for el in _kill: * el.drop_tree() * for el in _remove: # <<<<<<<<<<<<<< * el.drop_tag() * */ - __pyx_t_4 = __pyx_v__remove; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0; + __pyx_t_4 = __pyx_v__remove; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; for (;;) { - if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break; + if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 396, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 395, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 396, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 395, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); #endif - __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_3); - __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_5); + __pyx_t_5 = 0; - /* "lxml/html/clean.py":397 + /* "lxml/html/clean.py":396 * el.drop_tree() * for el in _remove: * el.drop_tag() # <<<<<<<<<<<<<< * * if self.remove_unknown_tags: */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_drop_tag); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 397, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_10)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_10); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_drop_tag); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 396, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); + __Pyx_DECREF_SET(__pyx_t_9, function); } } - if (__pyx_t_10) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 397, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 397, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 396, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/html/clean.py":396 + /* "lxml/html/clean.py":395 * for el in _kill: * el.drop_tree() * for el in _remove: # <<<<<<<<<<<<<< @@ -5984,20 +5731,20 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/html/clean.py":399 + /* "lxml/html/clean.py":398 * el.drop_tag() * * if self.remove_unknown_tags: # <<<<<<<<<<<<<< * if allow_tags: * raise ValueError( */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_remove_unknown_tags); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 399, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_remove_unknown_tags); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 398, __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, 399, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 398, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { - /* "lxml/html/clean.py":400 + /* "lxml/html/clean.py":399 * * if self.remove_unknown_tags: * if allow_tags: # <<<<<<<<<<<<<< @@ -6007,20 +5754,20 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py __pyx_t_2 = (PySet_GET_SIZE(__pyx_v_allow_tags) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/html/clean.py":401 + /* "lxml/html/clean.py":400 * if self.remove_unknown_tags: * if allow_tags: * raise ValueError( # <<<<<<<<<<<<<< * "It does not make sense to pass in both allow_tags and remove_unknown_tags") * allow_tags = set(defs.tags) */ - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 401, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 400, __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, 401, __pyx_L1_error) + __PYX_ERR(0, 400, __pyx_L1_error) - /* "lxml/html/clean.py":400 + /* "lxml/html/clean.py":399 * * if self.remove_unknown_tags: * if allow_tags: # <<<<<<<<<<<<<< @@ -6029,25 +5776,25 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":403 + /* "lxml/html/clean.py":402 * raise ValueError( * "It does not make sense to pass in both allow_tags and remove_unknown_tags") * allow_tags = set(defs.tags) # <<<<<<<<<<<<<< * if allow_tags: * bad = [] */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_defs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 403, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_defs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_tags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 403, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_tags); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 402, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PySet_New(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 403, __pyx_L1_error) + __pyx_t_4 = PySet_New(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_allow_tags, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "lxml/html/clean.py":399 + /* "lxml/html/clean.py":398 * el.drop_tag() * * if self.remove_unknown_tags: # <<<<<<<<<<<<<< @@ -6056,7 +5803,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":404 + /* "lxml/html/clean.py":403 * "It does not make sense to pass in both allow_tags and remove_unknown_tags") * allow_tags = set(defs.tags) * if allow_tags: # <<<<<<<<<<<<<< @@ -6066,80 +5813,77 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py __pyx_t_2 = (PySet_GET_SIZE(__pyx_v_allow_tags) != 0); if (__pyx_t_2) { - /* "lxml/html/clean.py":405 + /* "lxml/html/clean.py":404 * allow_tags = set(defs.tags) * if allow_tags: * bad = [] # <<<<<<<<<<<<<< * for el in doc.iter(): * if el.tag not in allow_tags: */ - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 405, __pyx_L1_error) + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_bad = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/html/clean.py":406 + /* "lxml/html/clean.py":405 * if allow_tags: * bad = [] * for el in doc.iter(): # <<<<<<<<<<<<<< * if el.tag not in allow_tags: * bad.append(el) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_doc, __pyx_n_s_iter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 406, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_doc, __pyx_n_s_iter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); + __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 406, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 406, __pyx_L1_error) - } + __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { - __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; - __pyx_t_8 = NULL; + __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; + __pyx_t_7 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 406, __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(0, 406, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 405, __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(0, 405, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { - if (likely(!__pyx_t_8)) { - if (likely(PyList_CheckExact(__pyx_t_3))) { - if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break; + 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_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 406, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 405, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 406, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { - if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 406, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 405, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 406, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { - __pyx_t_4 = __pyx_t_8(__pyx_t_3); + __pyx_t_4 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 406, __pyx_L1_error) + else __PYX_ERR(0, 405, __pyx_L1_error) } break; } @@ -6148,30 +5892,30 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_4); __pyx_t_4 = 0; - /* "lxml/html/clean.py":407 + /* "lxml/html/clean.py":406 * bad = [] * for el in doc.iter(): * if el.tag not in allow_tags: # <<<<<<<<<<<<<< * bad.append(el) * if bad: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 407, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = (__Pyx_PySet_ContainsTF(__pyx_t_4, __pyx_v_allow_tags, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 407, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySet_ContainsTF(__pyx_t_4, __pyx_v_allow_tags, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 406, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/html/clean.py":408 + /* "lxml/html/clean.py":407 * for el in doc.iter(): * if el.tag not in allow_tags: * bad.append(el) # <<<<<<<<<<<<<< * if bad: * if bad[0] is doc: */ - __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_bad, __pyx_v_el); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 408, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_bad, __pyx_v_el); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 407, __pyx_L1_error) - /* "lxml/html/clean.py":407 + /* "lxml/html/clean.py":406 * bad = [] * for el in doc.iter(): * if el.tag not in allow_tags: # <<<<<<<<<<<<<< @@ -6180,7 +5924,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":406 + /* "lxml/html/clean.py":405 * if allow_tags: * bad = [] * for el in doc.iter(): # <<<<<<<<<<<<<< @@ -6188,9 +5932,9 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py * bad.append(el) */ } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/html/clean.py":409 + /* "lxml/html/clean.py":408 * if el.tag not in allow_tags: * bad.append(el) * if bad: # <<<<<<<<<<<<<< @@ -6200,74 +5944,71 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py __pyx_t_1 = (PyList_GET_SIZE(__pyx_v_bad) != 0); if (__pyx_t_1) { - /* "lxml/html/clean.py":410 + /* "lxml/html/clean.py":409 * bad.append(el) * if bad: * if bad[0] is doc: # <<<<<<<<<<<<<< * el = bad.pop(0) * el.tag = 'div' */ - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_bad, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 410, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = (__pyx_t_3 == __pyx_v_doc); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_bad, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 409, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = (__pyx_t_5 == __pyx_v_doc); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/html/clean.py":411 + /* "lxml/html/clean.py":410 * if bad: * if bad[0] is doc: * el = bad.pop(0) # <<<<<<<<<<<<<< * el.tag = 'div' * el.attrib.clear() */ - __pyx_t_3 = __Pyx_PyList_PopIndex(__pyx_v_bad, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 411, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_3); - __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyList_PopIndex(__pyx_v_bad, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 410, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_5); + __pyx_t_5 = 0; - /* "lxml/html/clean.py":412 + /* "lxml/html/clean.py":411 * if bad[0] is doc: * el = bad.pop(0) * el.tag = 'div' # <<<<<<<<<<<<<< * el.attrib.clear() * for el in bad: */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_el, __pyx_n_s_tag, __pyx_n_s_div) < 0) __PYX_ERR(0, 412, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_el, __pyx_n_s_tag, __pyx_n_s_div) < 0) __PYX_ERR(0, 411, __pyx_L1_error) - /* "lxml/html/clean.py":413 + /* "lxml/html/clean.py":412 * el = bad.pop(0) * el.tag = 'div' * el.attrib.clear() # <<<<<<<<<<<<<< * for el in bad: * el.drop_tag() */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_attrib); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 413, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_attrib); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_clear); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 413, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_clear); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); + __Pyx_DECREF_SET(__pyx_t_9, function); } } - if (__pyx_t_4) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 413, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 413, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/html/clean.py":410 + /* "lxml/html/clean.py":409 * bad.append(el) * if bad: * if bad[0] is doc: # <<<<<<<<<<<<<< @@ -6276,55 +6017,52 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":414 + /* "lxml/html/clean.py":413 * el.tag = 'div' * el.attrib.clear() * for el in bad: # <<<<<<<<<<<<<< * el.drop_tag() * if self.add_nofollow: */ - __pyx_t_3 = __pyx_v_bad; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; + __pyx_t_5 = __pyx_v_bad; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; for (;;) { - if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break; + if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 414, __pyx_L1_error) + __pyx_t_9 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_9); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 413, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 414, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 413, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); #endif - __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_6); - __pyx_t_6 = 0; + __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_9); + __pyx_t_9 = 0; - /* "lxml/html/clean.py":415 + /* "lxml/html/clean.py":414 * el.attrib.clear() * for el in bad: * el.drop_tag() # <<<<<<<<<<<<<< * if self.add_nofollow: * for el in _find_external_links(doc): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_drop_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 415, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_drop_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_10 = NULL; + __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_10)) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_10) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 415, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } else { - __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 415, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = (__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_9)) __PYX_ERR(0, 414, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "lxml/html/clean.py":414 + /* "lxml/html/clean.py":413 * el.tag = 'div' * el.attrib.clear() * for el in bad: # <<<<<<<<<<<<<< @@ -6332,9 +6070,9 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py * if self.add_nofollow: */ } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/html/clean.py":409 + /* "lxml/html/clean.py":408 * if el.tag not in allow_tags: * bad.append(el) * if bad: # <<<<<<<<<<<<<< @@ -6343,7 +6081,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":404 + /* "lxml/html/clean.py":403 * "It does not make sense to pass in both allow_tags and remove_unknown_tags") * allow_tags = set(defs.tags) * if allow_tags: # <<<<<<<<<<<<<< @@ -6352,204 +6090,160 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":416 + /* "lxml/html/clean.py":415 * for el in bad: * el.drop_tag() * if self.add_nofollow: # <<<<<<<<<<<<<< * for el in _find_external_links(doc): * if not self.allow_follow(el): */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_nofollow); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 416, __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(0, 416, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_nofollow); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 415, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { - /* "lxml/html/clean.py":417 + /* "lxml/html/clean.py":416 * el.drop_tag() * if self.add_nofollow: * for el in _find_external_links(doc): # <<<<<<<<<<<<<< * if not self.allow_follow(el): * rel = el.get('rel') */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_external_links); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 417, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_find_external_links); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - } - } - if (!__pyx_t_4) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_doc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 417, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_doc}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 417, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_doc}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 417, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 417, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(__pyx_v_doc); - __Pyx_GIVEREF(__pyx_v_doc); - PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_doc); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 417, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF_SET(__pyx_t_9, function); } } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { - __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; - __pyx_t_8 = NULL; + __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_4, __pyx_v_doc) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_doc); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { + __pyx_t_9 = __pyx_t_5; __Pyx_INCREF(__pyx_t_9); __pyx_t_6 = 0; + __pyx_t_7 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 417, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 417, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_7 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 416, __pyx_L1_error) } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { - if (likely(!__pyx_t_8)) { - if (likely(PyList_CheckExact(__pyx_t_6))) { - if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break; + if (likely(!__pyx_t_7)) { + 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_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 417, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 416, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 417, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PySequence_ITEM(__pyx_t_9, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); #endif } else { - if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)) break; + if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_9)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 417, __pyx_L1_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 416, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 417, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PySequence_ITEM(__pyx_t_9, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); #endif } } else { - __pyx_t_3 = __pyx_t_8(__pyx_t_6); - if (unlikely(!__pyx_t_3)) { + __pyx_t_5 = __pyx_t_7(__pyx_t_9); + if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 417, __pyx_L1_error) + else __PYX_ERR(0, 416, __pyx_L1_error) } break; } - __Pyx_GOTREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_t_5); } - __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_3); - __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_5); + __pyx_t_5 = 0; - /* "lxml/html/clean.py":418 + /* "lxml/html/clean.py":417 * if self.add_nofollow: * for el in _find_external_links(doc): * if not self.allow_follow(el): # <<<<<<<<<<<<<< * rel = el.get('rel') * if rel: */ - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_allow_follow); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 418, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_10); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); - __Pyx_INCREF(__pyx_t_4); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_allow_follow); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 417, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_10, function); - } - } - if (!__pyx_t_4) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_el); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 418, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_10)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_el}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 418, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_el}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 418, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 418, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(__pyx_v_el); - __Pyx_GIVEREF(__pyx_v_el); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_el); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 418, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF_SET(__pyx_t_4, function); } } - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 418, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_v_el) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_el); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 417, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 417, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { - /* "lxml/html/clean.py":419 + /* "lxml/html/clean.py":418 * for el in _find_external_links(doc): * if not self.allow_follow(el): * rel = el.get('rel') # <<<<<<<<<<<<<< * if rel: * if ('nofollow' in rel */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 419, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 419, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF_SET(__pyx_v_rel, __pyx_t_10); - __pyx_t_10 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 418, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_n_s_rel) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_n_s_rel); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 418, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_rel, __pyx_t_5); + __pyx_t_5 = 0; - /* "lxml/html/clean.py":420 + /* "lxml/html/clean.py":419 * if not self.allow_follow(el): * rel = el.get('rel') * if rel: # <<<<<<<<<<<<<< * if ('nofollow' in rel * and ' nofollow ' in (' %s ' % rel)): */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_rel); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 420, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_rel); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 419, __pyx_L1_error) if (__pyx_t_1) { - /* "lxml/html/clean.py":421 + /* "lxml/html/clean.py":420 * rel = el.get('rel') * if rel: * if ('nofollow' in rel # <<<<<<<<<<<<<< * and ' nofollow ' in (' %s ' % rel)): * continue */ - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_nofollow, __pyx_v_rel, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 421, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_nofollow, __pyx_v_rel, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 420, __pyx_L1_error) __pyx_t_14 = (__pyx_t_2 != 0); if (__pyx_t_14) { } else { @@ -6557,22 +6251,22 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py goto __pyx_L99_bool_binop_done; } - /* "lxml/html/clean.py":422 + /* "lxml/html/clean.py":421 * if rel: * if ('nofollow' in rel * and ' nofollow ' in (' %s ' % rel)): # <<<<<<<<<<<<<< * continue * rel = '%s nofollow' % rel */ - __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_s, __pyx_v_rel); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 422, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_14 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s_nofollow_2, __pyx_t_10, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 422, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_5 = __Pyx_PyString_FormatSafe(__pyx_kp_s_s, __pyx_v_rel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 421, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s_nofollow_2, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 421, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = (__pyx_t_14 != 0); __pyx_t_1 = __pyx_t_2; __pyx_L99_bool_binop_done:; - /* "lxml/html/clean.py":421 + /* "lxml/html/clean.py":420 * rel = el.get('rel') * if rel: * if ('nofollow' in rel # <<<<<<<<<<<<<< @@ -6581,7 +6275,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ if (__pyx_t_1) { - /* "lxml/html/clean.py":423 + /* "lxml/html/clean.py":422 * if ('nofollow' in rel * and ' nofollow ' in (' %s ' % rel)): * continue # <<<<<<<<<<<<<< @@ -6590,7 +6284,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ goto __pyx_L94_continue; - /* "lxml/html/clean.py":421 + /* "lxml/html/clean.py":420 * rel = el.get('rel') * if rel: * if ('nofollow' in rel # <<<<<<<<<<<<<< @@ -6599,19 +6293,19 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":424 + /* "lxml/html/clean.py":423 * and ' nofollow ' in (' %s ' % rel)): * continue * rel = '%s nofollow' % rel # <<<<<<<<<<<<<< * else: * rel = 'nofollow' */ - __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_s_nofollow, __pyx_v_rel); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 424, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF_SET(__pyx_v_rel, __pyx_t_10); - __pyx_t_10 = 0; + __pyx_t_5 = __Pyx_PyString_FormatSafe(__pyx_kp_s_s_nofollow, __pyx_v_rel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 423, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_rel, __pyx_t_5); + __pyx_t_5 = 0; - /* "lxml/html/clean.py":420 + /* "lxml/html/clean.py":419 * if not self.allow_follow(el): * rel = el.get('rel') * if rel: # <<<<<<<<<<<<<< @@ -6621,7 +6315,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py goto __pyx_L97; } - /* "lxml/html/clean.py":426 + /* "lxml/html/clean.py":425 * rel = '%s nofollow' % rel * else: * rel = 'nofollow' # <<<<<<<<<<<<<< @@ -6634,63 +6328,63 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py } __pyx_L97:; - /* "lxml/html/clean.py":427 + /* "lxml/html/clean.py":426 * else: * rel = 'nofollow' * el.set('rel', rel) # <<<<<<<<<<<<<< * * def allow_follow(self, anchor): */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 427, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = NULL; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_set); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = NULL; __pyx_t_13 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_5); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); + __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_13 = 1; } } #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_s_rel, __pyx_v_rel}; - __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 427, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_10); + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_n_s_rel, __pyx_v_rel}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_5); } else #endif #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_s_rel, __pyx_v_rel}; - __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 427, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_n_s_rel, __pyx_v_rel}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_4 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__pyx_t_5) { - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; + __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(__pyx_n_s_rel); __Pyx_GIVEREF(__pyx_n_s_rel); - PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_13, __pyx_n_s_rel); + PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_n_s_rel); __Pyx_INCREF(__pyx_v_rel); __Pyx_GIVEREF(__pyx_v_rel); - PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_13, __pyx_v_rel); - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 427, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_v_rel); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_12, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/html/clean.py":418 + /* "lxml/html/clean.py":417 * if self.add_nofollow: * for el in _find_external_links(doc): * if not self.allow_follow(el): # <<<<<<<<<<<<<< @@ -6699,7 +6393,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":417 + /* "lxml/html/clean.py":416 * el.drop_tag() * if self.add_nofollow: * for el in _find_external_links(doc): # <<<<<<<<<<<<<< @@ -6708,9 +6402,9 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ __pyx_L94_continue:; } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "lxml/html/clean.py":416 + /* "lxml/html/clean.py":415 * for el in bad: * el.drop_tag() * if self.add_nofollow: # <<<<<<<<<<<<<< @@ -6719,7 +6413,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py */ } - /* "lxml/html/clean.py":249 + /* "lxml/html/clean.py":248 * ) * * def __call__(self, doc): # <<<<<<<<<<<<<< @@ -6734,8 +6428,8 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("lxml.html.clean.Cleaner.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -6759,7 +6453,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py return __pyx_r; } -/* "lxml/html/clean.py":429 +/* "lxml/html/clean.py":428 * el.set('rel', rel) * * def allow_follow(self, anchor): # <<<<<<<<<<<<<< @@ -6770,7 +6464,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_2__call__(CYTHON_UNUSED Py /* Python wrapper */ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_5allow_follow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_4html_5clean_7Cleaner_4allow_follow[] = "\n Override to suppress rel=\"nofollow\" on some anchors.\n "; -static PyMethodDef __pyx_mdef_4lxml_4html_5clean_7Cleaner_5allow_follow = {"allow_follow", (PyCFunction)__pyx_pw_4lxml_4html_5clean_7Cleaner_5allow_follow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_4html_5clean_7Cleaner_4allow_follow}; +static PyMethodDef __pyx_mdef_4lxml_4html_5clean_7Cleaner_5allow_follow = {"allow_follow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_4html_5clean_7Cleaner_5allow_follow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_4html_5clean_7Cleaner_4allow_follow}; static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_5allow_follow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_self = 0; CYTHON_UNUSED PyObject *__pyx_v_anchor = 0; @@ -6800,11 +6494,11 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_5allow_follow(PyObject *__ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_anchor)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("allow_follow", 1, 2, 2, 1); __PYX_ERR(0, 429, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("allow_follow", 1, 2, 2, 1); __PYX_ERR(0, 428, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "allow_follow") < 0)) __PYX_ERR(0, 429, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "allow_follow") < 0)) __PYX_ERR(0, 428, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -6817,7 +6511,7 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_5allow_follow(PyObject *__ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("allow_follow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 429, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("allow_follow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 428, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.html.clean.Cleaner.allow_follow", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -6835,7 +6529,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_4allow_follow(CYTHON_UNUSE __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("allow_follow", 0); - /* "lxml/html/clean.py":433 + /* "lxml/html/clean.py":432 * Override to suppress rel="nofollow" on some anchors. * """ * return False # <<<<<<<<<<<<<< @@ -6847,7 +6541,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_4allow_follow(CYTHON_UNUSE __pyx_r = Py_False; goto __pyx_L0; - /* "lxml/html/clean.py":429 + /* "lxml/html/clean.py":428 * el.set('rel', rel) * * def allow_follow(self, anchor): # <<<<<<<<<<<<<< @@ -6862,7 +6556,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_4allow_follow(CYTHON_UNUSE return __pyx_r; } -/* "lxml/html/clean.py":435 +/* "lxml/html/clean.py":434 * return False * * def allow_element(self, el): # <<<<<<<<<<<<<< @@ -6872,7 +6566,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_4allow_follow(CYTHON_UNUSE /* Python wrapper */ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_7allow_element(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_4html_5clean_7Cleaner_7allow_element = {"allow_element", (PyCFunction)__pyx_pw_4lxml_4html_5clean_7Cleaner_7allow_element, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_4html_5clean_7Cleaner_7allow_element = {"allow_element", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_4html_5clean_7Cleaner_7allow_element, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_7allow_element(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_el = 0; @@ -6902,11 +6596,11 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_7allow_element(PyObject *_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_el)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("allow_element", 1, 2, 2, 1); __PYX_ERR(0, 435, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("allow_element", 1, 2, 2, 1); __PYX_ERR(0, 434, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "allow_element") < 0)) __PYX_ERR(0, 435, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "allow_element") < 0)) __PYX_ERR(0, 434, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -6919,7 +6613,7 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_7allow_element(PyObject *_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("allow_element", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 435, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("allow_element", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 434, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.html.clean.Cleaner.allow_element", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -6947,28 +6641,28 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_6allow_element(CYTHON_UNUS Py_ssize_t __pyx_t_7; PyObject *(*__pyx_t_8)(PyObject *); PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; - int __pyx_t_11; + int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; __Pyx_RefNannySetupContext("allow_element", 0); - /* "lxml/html/clean.py":436 + /* "lxml/html/clean.py":435 * * def allow_element(self, el): * if el.tag not in self._tag_link_attrs: # <<<<<<<<<<<<<< * return False * attr = self._tag_link_attrs[el.tag] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tag_link_attrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 436, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tag_link_attrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 436, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 435, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { - /* "lxml/html/clean.py":437 + /* "lxml/html/clean.py":436 * def allow_element(self, el): * if el.tag not in self._tag_link_attrs: * return False # <<<<<<<<<<<<<< @@ -6980,7 +6674,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_6allow_element(CYTHON_UNUS __pyx_r = Py_False; goto __pyx_L0; - /* "lxml/html/clean.py":436 + /* "lxml/html/clean.py":435 * * def allow_element(self, el): * if el.tag not in self._tag_link_attrs: # <<<<<<<<<<<<<< @@ -6989,25 +6683,25 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_6allow_element(CYTHON_UNUS */ } - /* "lxml/html/clean.py":438 + /* "lxml/html/clean.py":437 * if el.tag not in self._tag_link_attrs: * return False * attr = self._tag_link_attrs[el.tag] # <<<<<<<<<<<<<< * if isinstance(attr, (list, tuple)): * for one_attr in attr: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tag_link_attrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 438, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tag_link_attrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 438, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_attr = __pyx_t_5; __pyx_t_5 = 0; - /* "lxml/html/clean.py":439 + /* "lxml/html/clean.py":438 * return False * attr = self._tag_link_attrs[el.tag] * if isinstance(attr, (list, tuple)): # <<<<<<<<<<<<<< @@ -7028,7 +6722,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_6allow_element(CYTHON_UNUS __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { - /* "lxml/html/clean.py":440 + /* "lxml/html/clean.py":439 * attr = self._tag_link_attrs[el.tag] * if isinstance(attr, (list, tuple)): * for one_attr in attr: # <<<<<<<<<<<<<< @@ -7039,26 +6733,26 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_6allow_element(CYTHON_UNUS __pyx_t_5 = __pyx_v_attr; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_attr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 440, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_attr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 440, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 439, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_8)) { if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 440, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 439, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 440, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 440, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 439, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 440, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -7068,7 +6762,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_6allow_element(CYTHON_UNUS PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 440, __pyx_L1_error) + else __PYX_ERR(0, 439, __pyx_L1_error) } break; } @@ -7077,14 +6771,14 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_6allow_element(CYTHON_UNUS __Pyx_XDECREF_SET(__pyx_v_one_attr, __pyx_t_1); __pyx_t_1 = 0; - /* "lxml/html/clean.py":441 + /* "lxml/html/clean.py":440 * if isinstance(attr, (list, tuple)): * for one_attr in attr: * url = el.get(one_attr) # <<<<<<<<<<<<<< * if not url: * return False */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 441, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -7096,54 +6790,26 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_6allow_element(CYTHON_UNUS __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_9) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_one_attr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_one_attr}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_one_attr}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 441, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; - __Pyx_INCREF(__pyx_v_one_attr); - __Pyx_GIVEREF(__pyx_v_one_attr); - PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_one_attr); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } - } + __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_9, __pyx_v_one_attr) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_one_attr); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 440, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_url, __pyx_t_1); __pyx_t_1 = 0; - /* "lxml/html/clean.py":442 + /* "lxml/html/clean.py":441 * for one_attr in attr: * url = el.get(one_attr) * if not url: # <<<<<<<<<<<<<< * return False * if not self.allow_embedded_url(el, url): */ - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_url); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 442, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_url); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 441, __pyx_L1_error) __pyx_t_4 = ((!__pyx_t_3) != 0); if (__pyx_t_4) { - /* "lxml/html/clean.py":443 + /* "lxml/html/clean.py":442 * url = el.get(one_attr) * if not url: * return False # <<<<<<<<<<<<<< @@ -7156,7 +6822,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_6allow_element(CYTHON_UNUS __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; - /* "lxml/html/clean.py":442 + /* "lxml/html/clean.py":441 * for one_attr in attr: * url = el.get(one_attr) * if not url: # <<<<<<<<<<<<<< @@ -7165,66 +6831,66 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_6allow_element(CYTHON_UNUS */ } - /* "lxml/html/clean.py":444 + /* "lxml/html/clean.py":443 * if not url: * return False * if not self.allow_embedded_url(el, url): # <<<<<<<<<<<<<< * return False * return True */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_allow_embedded_url); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_allow_embedded_url); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_10 = NULL; - __pyx_t_11 = 0; + __pyx_t_9 = NULL; + __pyx_t_10 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_10)) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); - __pyx_t_11 = 1; + __pyx_t_10 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_el, __pyx_v_url}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_el, __pyx_v_url}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_el, __pyx_v_url}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_el, __pyx_v_url}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 444, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - if (__pyx_t_10) { - __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __pyx_t_10 = NULL; + __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 443, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (__pyx_t_9) { + __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL; } __Pyx_INCREF(__pyx_v_el); __Pyx_GIVEREF(__pyx_v_el); - PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_11, __pyx_v_el); + PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_v_el); __Pyx_INCREF(__pyx_v_url); __Pyx_GIVEREF(__pyx_v_url); - PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_11, __pyx_v_url); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_v_url); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __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, 444, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 443, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = ((!__pyx_t_4) != 0); if (__pyx_t_3) { - /* "lxml/html/clean.py":445 + /* "lxml/html/clean.py":444 * return False * if not self.allow_embedded_url(el, url): * return False # <<<<<<<<<<<<<< @@ -7237,7 +6903,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_6allow_element(CYTHON_UNUS __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; - /* "lxml/html/clean.py":444 + /* "lxml/html/clean.py":443 * if not url: * return False * if not self.allow_embedded_url(el, url): # <<<<<<<<<<<<<< @@ -7246,7 +6912,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_6allow_element(CYTHON_UNUS */ } - /* "lxml/html/clean.py":440 + /* "lxml/html/clean.py":439 * attr = self._tag_link_attrs[el.tag] * if isinstance(attr, (list, tuple)): * for one_attr in attr: # <<<<<<<<<<<<<< @@ -7256,7 +6922,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_6allow_element(CYTHON_UNUS } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/html/clean.py":446 + /* "lxml/html/clean.py":445 * if not self.allow_embedded_url(el, url): * return False * return True # <<<<<<<<<<<<<< @@ -7268,7 +6934,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_6allow_element(CYTHON_UNUS __pyx_r = Py_True; goto __pyx_L0; - /* "lxml/html/clean.py":439 + /* "lxml/html/clean.py":438 * return False * attr = self._tag_link_attrs[el.tag] * if isinstance(attr, (list, tuple)): # <<<<<<<<<<<<<< @@ -7277,7 +6943,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_6allow_element(CYTHON_UNUS */ } - /* "lxml/html/clean.py":448 + /* "lxml/html/clean.py":447 * return True * else: * url = el.get(attr) # <<<<<<<<<<<<<< @@ -7285,7 +6951,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_6allow_element(CYTHON_UNUS * return False */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 448, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -7297,54 +6963,26 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_6allow_element(CYTHON_UNUS __Pyx_DECREF_SET(__pyx_t_1, function); } } - if (!__pyx_t_2) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 448, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_1)) { - PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_attr}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 448, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_5); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { - PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_attr}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 448, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_5); - } else - #endif - { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 448, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2); __pyx_t_2 = NULL; - __Pyx_INCREF(__pyx_v_attr); - __Pyx_GIVEREF(__pyx_v_attr); - PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_attr); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 448, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } - } + __pyx_t_5 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_v_attr) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_attr); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 447, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_url = __pyx_t_5; __pyx_t_5 = 0; - /* "lxml/html/clean.py":449 + /* "lxml/html/clean.py":448 * else: * url = el.get(attr) * if not url: # <<<<<<<<<<<<<< * return False * return self.allow_embedded_url(el, url) */ - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_url); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 449, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_url); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 448, __pyx_L1_error) __pyx_t_4 = ((!__pyx_t_3) != 0); if (__pyx_t_4) { - /* "lxml/html/clean.py":450 + /* "lxml/html/clean.py":449 * url = el.get(attr) * if not url: * return False # <<<<<<<<<<<<<< @@ -7356,7 +6994,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_6allow_element(CYTHON_UNUS __pyx_r = Py_False; goto __pyx_L0; - /* "lxml/html/clean.py":449 + /* "lxml/html/clean.py":448 * else: * url = el.get(attr) * if not url: # <<<<<<<<<<<<<< @@ -7365,7 +7003,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_6allow_element(CYTHON_UNUS */ } - /* "lxml/html/clean.py":451 + /* "lxml/html/clean.py":450 * if not url: * return False * return self.allow_embedded_url(el, url) # <<<<<<<<<<<<<< @@ -7373,51 +7011,51 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_6allow_element(CYTHON_UNUS * def allow_embedded_url(self, el, url): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_allow_embedded_url); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_allow_embedded_url); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = NULL; - __pyx_t_11 = 0; + __pyx_t_2 = NULL; + __pyx_t_10 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_9)) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); - __pyx_t_11 = 1; + __pyx_t_10 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { - PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_el, __pyx_v_url}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 451, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_el, __pyx_v_url}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 450, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { - PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_el, __pyx_v_url}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 451, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_el, __pyx_v_url}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 450, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_2 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (__pyx_t_9) { - __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_9); __pyx_t_9 = NULL; + __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 450, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (__pyx_t_2) { + __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2); __pyx_t_2 = NULL; } __Pyx_INCREF(__pyx_v_el); __Pyx_GIVEREF(__pyx_v_el); - PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_11, __pyx_v_el); + PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_v_el); __Pyx_INCREF(__pyx_v_url); __Pyx_GIVEREF(__pyx_v_url); - PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_11, __pyx_v_url); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 451, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_v_url); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; @@ -7425,7 +7063,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_6allow_element(CYTHON_UNUS goto __pyx_L0; } - /* "lxml/html/clean.py":435 + /* "lxml/html/clean.py":434 * return False * * def allow_element(self, el): # <<<<<<<<<<<<<< @@ -7439,7 +7077,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_6allow_element(CYTHON_UNUS __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_9); - __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("lxml.html.clean.Cleaner.allow_element", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -7451,7 +7089,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_6allow_element(CYTHON_UNUS return __pyx_r; } -/* "lxml/html/clean.py":453 +/* "lxml/html/clean.py":452 * return self.allow_embedded_url(el, url) * * def allow_embedded_url(self, el, url): # <<<<<<<<<<<<<< @@ -7461,7 +7099,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_6allow_element(CYTHON_UNUS /* Python wrapper */ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_9allow_embedded_url(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_4html_5clean_7Cleaner_9allow_embedded_url = {"allow_embedded_url", (PyCFunction)__pyx_pw_4lxml_4html_5clean_7Cleaner_9allow_embedded_url, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_4html_5clean_7Cleaner_9allow_embedded_url = {"allow_embedded_url", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_4html_5clean_7Cleaner_9allow_embedded_url, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_9allow_embedded_url(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_el = 0; @@ -7494,17 +7132,17 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_9allow_embedded_url(PyObje case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_el)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("allow_embedded_url", 1, 3, 3, 1); __PYX_ERR(0, 453, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("allow_embedded_url", 1, 3, 3, 1); __PYX_ERR(0, 452, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_url)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("allow_embedded_url", 1, 3, 3, 2); __PYX_ERR(0, 453, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("allow_embedded_url", 1, 3, 3, 2); __PYX_ERR(0, 452, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "allow_embedded_url") < 0)) __PYX_ERR(0, 453, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "allow_embedded_url") < 0)) __PYX_ERR(0, 452, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -7519,7 +7157,7 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_9allow_embedded_url(PyObje } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("allow_embedded_url", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 453, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("allow_embedded_url", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 452, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.html.clean.Cleaner.allow_embedded_url", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -7553,14 +7191,14 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_8allow_embedded_url(CYTHON PyObject *(*__pyx_t_11)(PyObject *); __Pyx_RefNannySetupContext("allow_embedded_url", 0); - /* "lxml/html/clean.py":454 + /* "lxml/html/clean.py":453 * * def allow_embedded_url(self, el, url): * if (self.whitelist_tags is not None # <<<<<<<<<<<<<< * and el.tag not in self.whitelist_tags): * return False */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_whitelist_tags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_whitelist_tags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = (__pyx_t_2 != Py_None); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -7571,25 +7209,25 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_8allow_embedded_url(CYTHON goto __pyx_L4_bool_binop_done; } - /* "lxml/html/clean.py":455 + /* "lxml/html/clean.py":454 * def allow_embedded_url(self, el, url): * if (self.whitelist_tags is not None * and el.tag not in self.whitelist_tags): # <<<<<<<<<<<<<< * return False * scheme, netloc, path, query, fragment = urlsplit(url) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 455, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_whitelist_tags); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 455, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_whitelist_tags); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_5, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 455, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_5, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 454, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__pyx_t_4 != 0); __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; - /* "lxml/html/clean.py":454 + /* "lxml/html/clean.py":453 * * def allow_embedded_url(self, el, url): * if (self.whitelist_tags is not None # <<<<<<<<<<<<<< @@ -7598,7 +7236,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_8allow_embedded_url(CYTHON */ if (__pyx_t_1) { - /* "lxml/html/clean.py":456 + /* "lxml/html/clean.py":455 * if (self.whitelist_tags is not None * and el.tag not in self.whitelist_tags): * return False # <<<<<<<<<<<<<< @@ -7610,7 +7248,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_8allow_embedded_url(CYTHON __pyx_r = Py_False; goto __pyx_L0; - /* "lxml/html/clean.py":454 + /* "lxml/html/clean.py":453 * * def allow_embedded_url(self, el, url): * if (self.whitelist_tags is not None # <<<<<<<<<<<<<< @@ -7619,14 +7257,14 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_8allow_embedded_url(CYTHON */ } - /* "lxml/html/clean.py":457 + /* "lxml/html/clean.py":456 * and el.tag not in self.whitelist_tags): * return False * scheme, netloc, path, query, fragment = urlsplit(url) # <<<<<<<<<<<<<< * netloc = netloc.lower().split(':', 1)[0] * if scheme not in ('http', 'https'): */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_urlsplit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_urlsplit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -7638,38 +7276,10 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_8allow_embedded_url(CYTHON __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_6) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_url); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 457, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_url}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 457, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_5); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_url}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 457, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_5); - } else - #endif - { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 457, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_v_url); - __Pyx_GIVEREF(__pyx_v_url); - PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_url); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 457, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - } + __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_v_url) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_url); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; @@ -7677,33 +7287,33 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_8allow_embedded_url(CYTHON if (unlikely(size != 5)) { if (size > 5) __Pyx_RaiseTooManyValuesError(5); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 457, __pyx_L1_error) + __PYX_ERR(0, 456, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); - __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); __pyx_t_8 = PyTuple_GET_ITEM(sequence, 3); __pyx_t_9 = PyTuple_GET_ITEM(sequence, 4); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); - __pyx_t_7 = PyList_GET_ITEM(sequence, 1); - __pyx_t_6 = PyList_GET_ITEM(sequence, 2); + __pyx_t_6 = PyList_GET_ITEM(sequence, 1); + __pyx_t_7 = PyList_GET_ITEM(sequence, 2); __pyx_t_8 = PyList_GET_ITEM(sequence, 3); __pyx_t_9 = PyList_GET_ITEM(sequence, 4); } __Pyx_INCREF(__pyx_t_2); - __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); #else { Py_ssize_t i; - PyObject** temps[5] = {&__pyx_t_2,&__pyx_t_7,&__pyx_t_6,&__pyx_t_8,&__pyx_t_9}; + PyObject** temps[5] = {&__pyx_t_2,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9}; for (i=0; i < 5; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 457, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 456, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -7712,8 +7322,8 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_8allow_embedded_url(CYTHON __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; - PyObject** temps[5] = {&__pyx_t_2,&__pyx_t_7,&__pyx_t_6,&__pyx_t_8,&__pyx_t_9}; - __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 457, __pyx_L1_error) + PyObject** temps[5] = {&__pyx_t_2,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9}; + __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext; @@ -7722,7 +7332,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_8allow_embedded_url(CYTHON __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 5) < 0) __PYX_ERR(0, 457, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 5) < 0) __PYX_ERR(0, 456, __pyx_L1_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L7_unpacking_done; @@ -7730,28 +7340,28 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_8allow_embedded_url(CYTHON __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 457, __pyx_L1_error) + __PYX_ERR(0, 456, __pyx_L1_error) __pyx_L7_unpacking_done:; } __pyx_v_scheme = __pyx_t_2; __pyx_t_2 = 0; - __pyx_v_netloc = __pyx_t_7; - __pyx_t_7 = 0; - __pyx_v_path = __pyx_t_6; + __pyx_v_netloc = __pyx_t_6; __pyx_t_6 = 0; + __pyx_v_path = __pyx_t_7; + __pyx_t_7 = 0; __pyx_v_query = __pyx_t_8; __pyx_t_8 = 0; __pyx_v_fragment = __pyx_t_9; __pyx_t_9 = 0; - /* "lxml/html/clean.py":458 + /* "lxml/html/clean.py":457 * return False * scheme, netloc, path, query, fragment = urlsplit(url) * netloc = netloc.lower().split(':', 1)[0] # <<<<<<<<<<<<<< * if scheme not in ('http', 'https'): * return False */ - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_netloc, __pyx_n_s_lower); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 458, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_netloc, __pyx_n_s_lower); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { @@ -7763,27 +7373,24 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_8allow_embedded_url(CYTHON __Pyx_DECREF_SET(__pyx_t_9, function); } } - if (__pyx_t_8) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 458, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } else { - __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 458, __pyx_L1_error) - } + __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 458, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 458, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 458, __pyx_L1_error) + __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_netloc, __pyx_t_9); __pyx_t_9 = 0; - /* "lxml/html/clean.py":459 + /* "lxml/html/clean.py":458 * scheme, netloc, path, query, fragment = urlsplit(url) * netloc = netloc.lower().split(':', 1)[0] * if scheme not in ('http', 'https'): # <<<<<<<<<<<<<< @@ -7792,20 +7399,20 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_8allow_embedded_url(CYTHON */ __Pyx_INCREF(__pyx_v_scheme); __pyx_t_9 = __pyx_v_scheme; - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_http, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 459, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_http, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 458, __pyx_L1_error) if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L9_bool_binop_done; } - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_https, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 459, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_https, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 458, __pyx_L1_error) __pyx_t_1 = __pyx_t_3; __pyx_L9_bool_binop_done:; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { - /* "lxml/html/clean.py":460 + /* "lxml/html/clean.py":459 * netloc = netloc.lower().split(':', 1)[0] * if scheme not in ('http', 'https'): * return False # <<<<<<<<<<<<<< @@ -7817,7 +7424,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_8allow_embedded_url(CYTHON __pyx_r = Py_False; goto __pyx_L0; - /* "lxml/html/clean.py":459 + /* "lxml/html/clean.py":458 * scheme, netloc, path, query, fragment = urlsplit(url) * netloc = netloc.lower().split(':', 1)[0] * if scheme not in ('http', 'https'): # <<<<<<<<<<<<<< @@ -7826,21 +7433,21 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_8allow_embedded_url(CYTHON */ } - /* "lxml/html/clean.py":461 + /* "lxml/html/clean.py":460 * if scheme not in ('http', 'https'): * return False * if netloc in self.host_whitelist: # <<<<<<<<<<<<<< * return True * return False */ - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_host_whitelist); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 461, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_host_whitelist); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_netloc, __pyx_t_9, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 461, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_netloc, __pyx_t_9, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 460, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { - /* "lxml/html/clean.py":462 + /* "lxml/html/clean.py":461 * return False * if netloc in self.host_whitelist: * return True # <<<<<<<<<<<<<< @@ -7852,7 +7459,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_8allow_embedded_url(CYTHON __pyx_r = Py_True; goto __pyx_L0; - /* "lxml/html/clean.py":461 + /* "lxml/html/clean.py":460 * if scheme not in ('http', 'https'): * return False * if netloc in self.host_whitelist: # <<<<<<<<<<<<<< @@ -7861,7 +7468,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_8allow_embedded_url(CYTHON */ } - /* "lxml/html/clean.py":463 + /* "lxml/html/clean.py":462 * if netloc in self.host_whitelist: * return True * return False # <<<<<<<<<<<<<< @@ -7873,7 +7480,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_8allow_embedded_url(CYTHON __pyx_r = Py_False; goto __pyx_L0; - /* "lxml/html/clean.py":453 + /* "lxml/html/clean.py":452 * return self.allow_embedded_url(el, url) * * def allow_embedded_url(self, el, url): # <<<<<<<<<<<<<< @@ -7903,7 +7510,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_8allow_embedded_url(CYTHON return __pyx_r; } -/* "lxml/html/clean.py":465 +/* "lxml/html/clean.py":464 * return False * * def kill_conditional_comments(self, doc): # <<<<<<<<<<<<<< @@ -7914,7 +7521,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_8allow_embedded_url(CYTHON /* Python wrapper */ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_11kill_conditional_comments(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_4html_5clean_7Cleaner_10kill_conditional_comments[] = "\n IE conditional comments basically embed HTML that the parser\n doesn't normally see. We can't allow anything like that, so\n we'll kill any comments that could be conditional.\n "; -static PyMethodDef __pyx_mdef_4lxml_4html_5clean_7Cleaner_11kill_conditional_comments = {"kill_conditional_comments", (PyCFunction)__pyx_pw_4lxml_4html_5clean_7Cleaner_11kill_conditional_comments, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_4html_5clean_7Cleaner_10kill_conditional_comments}; +static PyMethodDef __pyx_mdef_4lxml_4html_5clean_7Cleaner_11kill_conditional_comments = {"kill_conditional_comments", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_4html_5clean_7Cleaner_11kill_conditional_comments, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_4html_5clean_7Cleaner_10kill_conditional_comments}; static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_11kill_conditional_comments(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_doc = 0; @@ -7944,11 +7551,11 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_11kill_conditional_comment case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_doc)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("kill_conditional_comments", 1, 2, 2, 1); __PYX_ERR(0, 465, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("kill_conditional_comments", 1, 2, 2, 1); __PYX_ERR(0, 464, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "kill_conditional_comments") < 0)) __PYX_ERR(0, 465, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "kill_conditional_comments") < 0)) __PYX_ERR(0, 464, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -7961,7 +7568,7 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_11kill_conditional_comment } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("kill_conditional_comments", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 465, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("kill_conditional_comments", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 464, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.html.clean.Cleaner.kill_conditional_comments", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -7974,7 +7581,7 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_11kill_conditional_comment return __pyx_r; } -/* "lxml/html/clean.py":473 +/* "lxml/html/clean.py":472 * bad = [] * self._kill_elements( * doc, lambda el: _conditional_comment_re.search(el.text), # <<<<<<<<<<<<<< @@ -8003,15 +7610,14 @@ static PyObject *__pyx_lambda_funcdef_lambda(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("lambda", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_conditional_comment_re); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 473, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_conditional_comment_re); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_search); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 473, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_search); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_text); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 473, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_text); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -8023,41 +7629,11 @@ static PyObject *__pyx_lambda_funcdef_lambda(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (!__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __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 - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __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_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 473, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2); - __pyx_t_2 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - } + __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, 472, __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; @@ -8069,7 +7645,6 @@ static PyObject *__pyx_lambda_funcdef_lambda(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("lxml.html.clean.Cleaner.kill_conditional_comments.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -8078,7 +7653,7 @@ static PyObject *__pyx_lambda_funcdef_lambda(CYTHON_UNUSED PyObject *__pyx_self, return __pyx_r; } -/* "lxml/html/clean.py":465 +/* "lxml/html/clean.py":464 * return False * * def kill_conditional_comments(self, doc): # <<<<<<<<<<<<<< @@ -8099,48 +7674,48 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_10kill_conditional_comment PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("kill_conditional_comments", 0); - /* "lxml/html/clean.py":471 + /* "lxml/html/clean.py":470 * we'll kill any comments that could be conditional. * """ * bad = [] # <<<<<<<<<<<<<< * self._kill_elements( * doc, lambda el: _conditional_comment_re.search(el.text), */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bad = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/html/clean.py":472 + /* "lxml/html/clean.py":471 * """ * bad = [] * self._kill_elements( # <<<<<<<<<<<<<< * doc, lambda el: _conditional_comment_re.search(el.text), * etree.Comment) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_kill_elements); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 472, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_kill_elements); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "lxml/html/clean.py":473 + /* "lxml/html/clean.py":472 * bad = [] * self._kill_elements( * doc, lambda el: _conditional_comment_re.search(el.text), # <<<<<<<<<<<<<< * etree.Comment) * */ - __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_4html_5clean_7Cleaner_25kill_conditional_comments_lambda, 0, __pyx_n_s_Cleaner_kill_conditional_comment, NULL, __pyx_n_s_lxml_html_clean, __pyx_d, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 473, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_4html_5clean_7Cleaner_25kill_conditional_comments_lambda, 0, __pyx_n_s_Cleaner_kill_conditional_comment, NULL, __pyx_n_s_lxml_html_clean, __pyx_d, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "lxml/html/clean.py":474 + /* "lxml/html/clean.py":473 * self._kill_elements( * doc, lambda el: _conditional_comment_re.search(el.text), * etree.Comment) # <<<<<<<<<<<<<< * * def _kill_elements(self, doc, condition, iterate=None): */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_etree); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 474, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_etree); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Comment); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 474, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Comment); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -8158,7 +7733,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_10kill_conditional_comment #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_doc, __pyx_t_3, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 472, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __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; @@ -8168,7 +7743,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_10kill_conditional_comment #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_doc, __pyx_t_3, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 472, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __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; @@ -8176,7 +7751,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_10kill_conditional_comment } else #endif { - __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 472, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -8190,14 +7765,14 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_10kill_conditional_comment PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 472, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/html/clean.py":465 + /* "lxml/html/clean.py":464 * return False * * def kill_conditional_comments(self, doc): # <<<<<<<<<<<<<< @@ -8224,7 +7799,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_10kill_conditional_comment return __pyx_r; } -/* "lxml/html/clean.py":476 +/* "lxml/html/clean.py":475 * etree.Comment) * * def _kill_elements(self, doc, condition, iterate=None): # <<<<<<<<<<<<<< @@ -8234,7 +7809,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_10kill_conditional_comment /* Python wrapper */ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_13_kill_elements(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_4html_5clean_7Cleaner_13_kill_elements = {"_kill_elements", (PyCFunction)__pyx_pw_4lxml_4html_5clean_7Cleaner_13_kill_elements, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_4html_5clean_7Cleaner_13_kill_elements = {"_kill_elements", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_4html_5clean_7Cleaner_13_kill_elements, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_13_kill_elements(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_self = 0; PyObject *__pyx_v_doc = 0; @@ -8271,13 +7846,13 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_13_kill_elements(PyObject case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_doc)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_kill_elements", 0, 3, 4, 1); __PYX_ERR(0, 476, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_kill_elements", 0, 3, 4, 1); __PYX_ERR(0, 475, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_condition)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_kill_elements", 0, 3, 4, 2); __PYX_ERR(0, 476, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_kill_elements", 0, 3, 4, 2); __PYX_ERR(0, 475, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -8287,7 +7862,7 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_13_kill_elements(PyObject } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_kill_elements") < 0)) __PYX_ERR(0, 476, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_kill_elements") < 0)) __PYX_ERR(0, 475, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -8307,7 +7882,7 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_13_kill_elements(PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_kill_elements", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 476, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_kill_elements", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 475, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.html.clean.Cleaner._kill_elements", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -8328,34 +7903,33 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_12_kill_elements(CYTHON_UN PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - Py_ssize_t __pyx_t_5; - PyObject *(*__pyx_t_6)(PyObject *); - PyObject *__pyx_t_7 = NULL; + Py_ssize_t __pyx_t_4; + PyObject *(*__pyx_t_5)(PyObject *); + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; int __pyx_t_8; - int __pyx_t_9; __Pyx_RefNannySetupContext("_kill_elements", 0); - /* "lxml/html/clean.py":477 + /* "lxml/html/clean.py":476 * * def _kill_elements(self, doc, condition, iterate=None): * bad = [] # <<<<<<<<<<<<<< * for el in doc.iter(iterate): * if condition(el): */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bad = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/html/clean.py":478 + /* "lxml/html/clean.py":477 * def _kill_elements(self, doc, condition, iterate=None): * bad = [] * for el in doc.iter(iterate): # <<<<<<<<<<<<<< * if condition(el): * bad.append(el) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_doc, __pyx_n_s_iter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 478, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_doc, __pyx_n_s_iter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -8367,74 +7941,46 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_12_kill_elements(CYTHON_UN __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_iterate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_iterate}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_iterate}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 478, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_v_iterate); - __Pyx_GIVEREF(__pyx_v_iterate); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_iterate); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_iterate) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_iterate); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; 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_5 = 0; - __pyx_t_6 = NULL; + __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; + __pyx_t_5 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 478, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 478, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 477, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { - if (likely(!__pyx_t_6)) { + if (likely(!__pyx_t_5)) { if (likely(PyList_CheckExact(__pyx_t_2))) { - if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break; + if (__pyx_t_4 >= 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_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 478, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 477, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { - if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break; + if (__pyx_t_4 >= 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_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 478, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 477, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } } else { - __pyx_t_1 = __pyx_t_6(__pyx_t_2); + __pyx_t_1 = __pyx_t_5(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 478, __pyx_L1_error) + else __PYX_ERR(0, 477, __pyx_L1_error) } break; } @@ -8443,7 +7989,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_12_kill_elements(CYTHON_UN __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_1); __pyx_t_1 = 0; - /* "lxml/html/clean.py":479 + /* "lxml/html/clean.py":478 * bad = [] * for el in doc.iter(iterate): * if condition(el): # <<<<<<<<<<<<<< @@ -8451,63 +7997,35 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_12_kill_elements(CYTHON_UN * for el in bad: */ __Pyx_INCREF(__pyx_v_condition); - __pyx_t_4 = __pyx_v_condition; __pyx_t_3 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_3)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_3); + __pyx_t_3 = __pyx_v_condition; __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - } - } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_el); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_el}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_el}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 479, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_v_el); - __Pyx_GIVEREF(__pyx_v_el); - PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_el); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF_SET(__pyx_t_3, function); } } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 479, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_v_el) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_el); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 478, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_8) { + if (__pyx_t_7) { - /* "lxml/html/clean.py":480 + /* "lxml/html/clean.py":479 * for el in doc.iter(iterate): * if condition(el): * bad.append(el) # <<<<<<<<<<<<<< * for el in bad: * el.drop_tree() */ - __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_bad, __pyx_v_el); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 480, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_bad, __pyx_v_el); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 479, __pyx_L1_error) - /* "lxml/html/clean.py":479 + /* "lxml/html/clean.py":478 * bad = [] * for el in doc.iter(iterate): * if condition(el): # <<<<<<<<<<<<<< @@ -8516,7 +8034,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_12_kill_elements(CYTHON_UN */ } - /* "lxml/html/clean.py":478 + /* "lxml/html/clean.py":477 * def _kill_elements(self, doc, condition, iterate=None): * bad = [] * for el in doc.iter(iterate): # <<<<<<<<<<<<<< @@ -8526,55 +8044,52 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_12_kill_elements(CYTHON_UN } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/html/clean.py":481 + /* "lxml/html/clean.py":480 * if condition(el): * bad.append(el) * for el in bad: # <<<<<<<<<<<<<< * el.drop_tree() * */ - __pyx_t_2 = __pyx_v_bad; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; + __pyx_t_2 = __pyx_v_bad; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; for (;;) { - if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break; + if (__pyx_t_4 >= 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_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 481, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 480, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 481, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_1); __pyx_t_1 = 0; - /* "lxml/html/clean.py":482 + /* "lxml/html/clean.py":481 * bad.append(el) * for el in bad: * el.drop_tree() # <<<<<<<<<<<<<< * * def _remove_javascript_link(self, link): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_drop_tree); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 482, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_7); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_drop_tree); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 481, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); + __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (__pyx_t_7) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 482, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 482, __pyx_L1_error) - } + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/html/clean.py":481 + /* "lxml/html/clean.py":480 * if condition(el): * bad.append(el) * for el in bad: # <<<<<<<<<<<<<< @@ -8584,7 +8099,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_12_kill_elements(CYTHON_UN } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/html/clean.py":476 + /* "lxml/html/clean.py":475 * etree.Comment) * * def _kill_elements(self, doc, condition, iterate=None): # <<<<<<<<<<<<<< @@ -8599,8 +8114,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_12_kill_elements(CYTHON_UN __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("lxml.html.clean.Cleaner._kill_elements", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -8611,7 +8125,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_12_kill_elements(CYTHON_UN return __pyx_r; } -/* "lxml/html/clean.py":484 +/* "lxml/html/clean.py":483 * el.drop_tree() * * def _remove_javascript_link(self, link): # <<<<<<<<<<<<<< @@ -8621,7 +8135,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_12_kill_elements(CYTHON_UN /* Python wrapper */ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_15_remove_javascript_link(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_4html_5clean_7Cleaner_15_remove_javascript_link = {"_remove_javascript_link", (PyCFunction)__pyx_pw_4lxml_4html_5clean_7Cleaner_15_remove_javascript_link, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_4html_5clean_7Cleaner_15_remove_javascript_link = {"_remove_javascript_link", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_4html_5clean_7Cleaner_15_remove_javascript_link, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_15_remove_javascript_link(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_self = 0; PyObject *__pyx_v_link = 0; @@ -8651,11 +8165,11 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_15_remove_javascript_link( case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_link)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_remove_javascript_link", 1, 2, 2, 1); __PYX_ERR(0, 484, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_remove_javascript_link", 1, 2, 2, 1); __PYX_ERR(0, 483, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_remove_javascript_link") < 0)) __PYX_ERR(0, 484, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_remove_javascript_link") < 0)) __PYX_ERR(0, 483, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -8668,7 +8182,7 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_15_remove_javascript_link( } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_remove_javascript_link", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 484, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_remove_javascript_link", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 483, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.html.clean.Cleaner._remove_javascript_link", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -8690,21 +8204,20 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_14_remove_javascript_link( PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; + int __pyx_t_6; int __pyx_t_7; - int __pyx_t_8; __Pyx_RefNannySetupContext("_remove_javascript_link", 0); - /* "lxml/html/clean.py":486 + /* "lxml/html/clean.py":485 * def _remove_javascript_link(self, link): * # links like "j a v a s c r i p t:" might be interpreted in IE * new = _substitute_whitespace('', unquote_plus(link)) # <<<<<<<<<<<<<< * if _is_javascript_scheme(new): * # FIXME: should this be None to delete? */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_substitute_whitespace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_substitute_whitespace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_unquote_plus); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 486, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_unquote_plus); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -8716,41 +8229,13 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_14_remove_javascript_link( __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_link); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 486, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_link}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 486, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_link}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 486, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 486, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_INCREF(__pyx_v_link); - __Pyx_GIVEREF(__pyx_v_link); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_link); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 486, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_link) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_link); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 485, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; - __pyx_t_7 = 0; + __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { @@ -8758,13 +8243,13 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_14_remove_javascript_link( __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); - __pyx_t_7 = 1; + __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_s__4, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error) + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_s_, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __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; @@ -8772,90 +8257,62 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_14_remove_javascript_link( #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_s__4, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error) + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_s_, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __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_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 486, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 485, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_4) { - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; } - __Pyx_INCREF(__pyx_kp_s__4); - __Pyx_GIVEREF(__pyx_kp_s__4); - PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_kp_s__4); + __Pyx_INCREF(__pyx_kp_s_); + __Pyx_GIVEREF(__pyx_kp_s_); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_kp_s_); __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __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(0, 486, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_new = __pyx_t_1; - __pyx_t_1 = 0; - - /* "lxml/html/clean.py":487 - * # links like "j a v a s c r i p t:" might be interpreted in IE - * new = _substitute_whitespace('', unquote_plus(link)) - * if _is_javascript_scheme(new): # <<<<<<<<<<<<<< - * # FIXME: should this be None to delete? - * return '' - */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_javascript_scheme); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 487, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_6); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); - } - } - if (!__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_new}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_new}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 487, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_v_new); - __Pyx_GIVEREF(__pyx_v_new); - PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_new); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = 0; + + /* "lxml/html/clean.py":486 + * # links like "j a v a s c r i p t:" might be interpreted in IE + * new = _substitute_whitespace('', unquote_plus(link)) + * if _is_javascript_scheme(new): # <<<<<<<<<<<<<< + * # FIXME: should this be None to delete? + * return '' + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_is_javascript_scheme); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); } } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_v_new) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_new); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 487, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 486, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_8) { + if (__pyx_t_7) { - /* "lxml/html/clean.py":489 + /* "lxml/html/clean.py":488 * if _is_javascript_scheme(new): * # FIXME: should this be None to delete? * return '' # <<<<<<<<<<<<<< @@ -8863,11 +8320,11 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_14_remove_javascript_link( * */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_kp_s__4); - __pyx_r = __pyx_kp_s__4; + __Pyx_INCREF(__pyx_kp_s_); + __pyx_r = __pyx_kp_s_; goto __pyx_L0; - /* "lxml/html/clean.py":487 + /* "lxml/html/clean.py":486 * # links like "j a v a s c r i p t:" might be interpreted in IE * new = _substitute_whitespace('', unquote_plus(link)) * if _is_javascript_scheme(new): # <<<<<<<<<<<<<< @@ -8876,7 +8333,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_14_remove_javascript_link( */ } - /* "lxml/html/clean.py":490 + /* "lxml/html/clean.py":489 * # FIXME: should this be None to delete? * return '' * return link # <<<<<<<<<<<<<< @@ -8888,7 +8345,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_14_remove_javascript_link( __pyx_r = __pyx_v_link; goto __pyx_L0; - /* "lxml/html/clean.py":484 + /* "lxml/html/clean.py":483 * el.drop_tree() * * def _remove_javascript_link(self, link): # <<<<<<<<<<<<<< @@ -8903,7 +8360,6 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_14_remove_javascript_link( __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("lxml.html.clean.Cleaner._remove_javascript_link", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -8913,7 +8369,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_14_remove_javascript_link( return __pyx_r; } -/* "lxml/html/clean.py":494 +/* "lxml/html/clean.py":493 * _substitute_comments = re.compile(r'/\*.*?\*[inserted by cython to avoid comment closer]/', re.S).sub * * def _has_sneaky_javascript(self, style): # <<<<<<<<<<<<<< @@ -8924,7 +8380,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_14_remove_javascript_link( /* Python wrapper */ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_17_has_sneaky_javascript(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_4html_5clean_7Cleaner_16_has_sneaky_javascript[] = "\n Depending on the browser, stuff like ``e x p r e s s i o n(...)``\n can get interpreted, or ``expre/* stuff */ssion(...)``. This\n checks for attempt to do stuff like this.\n\n Typically the response will be to kill the entire style; if you\n have just a bit of Javascript in the style another rule will catch\n that and remove only the Javascript from the style; this catches\n more sneaky attempts.\n "; -static PyMethodDef __pyx_mdef_4lxml_4html_5clean_7Cleaner_17_has_sneaky_javascript = {"_has_sneaky_javascript", (PyCFunction)__pyx_pw_4lxml_4html_5clean_7Cleaner_17_has_sneaky_javascript, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_4html_5clean_7Cleaner_16_has_sneaky_javascript}; +static PyMethodDef __pyx_mdef_4lxml_4html_5clean_7Cleaner_17_has_sneaky_javascript = {"_has_sneaky_javascript", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_4html_5clean_7Cleaner_17_has_sneaky_javascript, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_4html_5clean_7Cleaner_16_has_sneaky_javascript}; static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_17_has_sneaky_javascript(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_style = 0; @@ -8954,11 +8410,11 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_17_has_sneaky_javascript(P case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_style)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_has_sneaky_javascript", 1, 2, 2, 1); __PYX_ERR(0, 494, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_has_sneaky_javascript", 1, 2, 2, 1); __PYX_ERR(0, 493, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_has_sneaky_javascript") < 0)) __PYX_ERR(0, 494, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_has_sneaky_javascript") < 0)) __PYX_ERR(0, 493, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -8971,7 +8427,7 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_17_has_sneaky_javascript(P } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_has_sneaky_javascript", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 494, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_has_sneaky_javascript", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 493, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.html.clean.Cleaner._has_sneaky_javascript", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -8997,14 +8453,14 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_16_has_sneaky_javascript(C __Pyx_RefNannySetupContext("_has_sneaky_javascript", 0); __Pyx_INCREF(__pyx_v_style); - /* "lxml/html/clean.py":505 + /* "lxml/html/clean.py":504 * more sneaky attempts. * """ * style = self._substitute_comments('', style) # <<<<<<<<<<<<<< * style = style.replace('\\', '') * style = _substitute_whitespace('', style) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_substitute_comments); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_substitute_comments); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -9020,33 +8476,33 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_16_has_sneaky_javascript(C } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_s__4, __pyx_v_style}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error) + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_s_, __pyx_v_style}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_s__4, __pyx_v_style}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error) + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_s_, __pyx_v_style}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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, 505, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 504, __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; } - __Pyx_INCREF(__pyx_kp_s__4); - __Pyx_GIVEREF(__pyx_kp_s__4); - PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_kp_s__4); + __Pyx_INCREF(__pyx_kp_s_); + __Pyx_GIVEREF(__pyx_kp_s_); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_kp_s_); __Pyx_INCREF(__pyx_v_style); __Pyx_GIVEREF(__pyx_v_style); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_style); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -9054,29 +8510,29 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_16_has_sneaky_javascript(C __Pyx_DECREF_SET(__pyx_v_style, __pyx_t_1); __pyx_t_1 = 0; - /* "lxml/html/clean.py":506 + /* "lxml/html/clean.py":505 * """ * style = self._substitute_comments('', style) * style = style.replace('\\', '') # <<<<<<<<<<<<<< * style = _substitute_whitespace('', style) * style = style.lower() */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_style, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_style, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 506, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_style, __pyx_t_2); __pyx_t_2 = 0; - /* "lxml/html/clean.py":507 + /* "lxml/html/clean.py":506 * style = self._substitute_comments('', style) * style = style.replace('\\', '') * style = _substitute_whitespace('', style) # <<<<<<<<<<<<<< * style = style.lower() * if 'javascript:' in style: */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_substitute_whitespace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_substitute_whitespace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; __pyx_t_4 = 0; @@ -9092,33 +8548,33 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_16_has_sneaky_javascript(C } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s__4, __pyx_v_style}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error) + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_, __pyx_v_style}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 506, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s__4, __pyx_v_style}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error) + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_, __pyx_v_style}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 506, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL; } - __Pyx_INCREF(__pyx_kp_s__4); - __Pyx_GIVEREF(__pyx_kp_s__4); - PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_kp_s__4); + __Pyx_INCREF(__pyx_kp_s_); + __Pyx_GIVEREF(__pyx_kp_s_); + PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_kp_s_); __Pyx_INCREF(__pyx_v_style); __Pyx_GIVEREF(__pyx_v_style); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_v_style); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -9126,14 +8582,14 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_16_has_sneaky_javascript(C __Pyx_DECREF_SET(__pyx_v_style, __pyx_t_2); __pyx_t_2 = 0; - /* "lxml/html/clean.py":508 + /* "lxml/html/clean.py":507 * style = style.replace('\\', '') * style = _substitute_whitespace('', style) * style = style.lower() # <<<<<<<<<<<<<< * if 'javascript:' in style: * return True */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_style, __pyx_n_s_lower); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_style, __pyx_n_s_lower); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -9145,29 +8601,26 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_16_has_sneaky_javascript(C __Pyx_DECREF_SET(__pyx_t_1, function); } } - if (__pyx_t_3) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 508, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 508, __pyx_L1_error) - } + __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, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_style, __pyx_t_2); __pyx_t_2 = 0; - /* "lxml/html/clean.py":509 + /* "lxml/html/clean.py":508 * style = _substitute_whitespace('', style) * style = style.lower() * if 'javascript:' in style: # <<<<<<<<<<<<<< * return True * if 'expression(' in style: */ - __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s_javascript_2, __pyx_v_style, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 509, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s_javascript_2, __pyx_v_style, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 508, __pyx_L1_error) __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { - /* "lxml/html/clean.py":510 + /* "lxml/html/clean.py":509 * style = style.lower() * if 'javascript:' in style: * return True # <<<<<<<<<<<<<< @@ -9179,7 +8632,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_16_has_sneaky_javascript(C __pyx_r = Py_True; goto __pyx_L0; - /* "lxml/html/clean.py":509 + /* "lxml/html/clean.py":508 * style = _substitute_whitespace('', style) * style = style.lower() * if 'javascript:' in style: # <<<<<<<<<<<<<< @@ -9188,18 +8641,18 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_16_has_sneaky_javascript(C */ } - /* "lxml/html/clean.py":511 + /* "lxml/html/clean.py":510 * if 'javascript:' in style: * return True * if 'expression(' in style: # <<<<<<<<<<<<<< * return True * return False */ - __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s_expression, __pyx_v_style, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 511, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s_expression, __pyx_v_style, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 510, __pyx_L1_error) __pyx_t_6 = (__pyx_t_7 != 0); if (__pyx_t_6) { - /* "lxml/html/clean.py":512 + /* "lxml/html/clean.py":511 * return True * if 'expression(' in style: * return True # <<<<<<<<<<<<<< @@ -9211,7 +8664,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_16_has_sneaky_javascript(C __pyx_r = Py_True; goto __pyx_L0; - /* "lxml/html/clean.py":511 + /* "lxml/html/clean.py":510 * if 'javascript:' in style: * return True * if 'expression(' in style: # <<<<<<<<<<<<<< @@ -9220,7 +8673,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_16_has_sneaky_javascript(C */ } - /* "lxml/html/clean.py":513 + /* "lxml/html/clean.py":512 * if 'expression(' in style: * return True * return False # <<<<<<<<<<<<<< @@ -9232,7 +8685,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_16_has_sneaky_javascript(C __pyx_r = Py_False; goto __pyx_L0; - /* "lxml/html/clean.py":494 + /* "lxml/html/clean.py":493 * _substitute_comments = re.compile(r'/\*.*?\*[inserted by cython to avoid comment closer]/', re.S).sub * * def _has_sneaky_javascript(self, style): # <<<<<<<<<<<<<< @@ -9255,7 +8708,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_16_has_sneaky_javascript(C return __pyx_r; } -/* "lxml/html/clean.py":515 +/* "lxml/html/clean.py":514 * return False * * def clean_html(self, html): # <<<<<<<<<<<<<< @@ -9265,7 +8718,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_16_has_sneaky_javascript(C /* Python wrapper */ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_19clean_html(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_4html_5clean_7Cleaner_19clean_html = {"clean_html", (PyCFunction)__pyx_pw_4lxml_4html_5clean_7Cleaner_19clean_html, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_4html_5clean_7Cleaner_19clean_html = {"clean_html", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_4html_5clean_7Cleaner_19clean_html, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_19clean_html(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_html = 0; @@ -9295,11 +8748,11 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_19clean_html(PyObject *__p case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_html)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("clean_html", 1, 2, 2, 1); __PYX_ERR(0, 515, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("clean_html", 1, 2, 2, 1); __PYX_ERR(0, 514, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "clean_html") < 0)) __PYX_ERR(0, 515, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "clean_html") < 0)) __PYX_ERR(0, 514, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -9312,7 +8765,7 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_7Cleaner_19clean_html(PyObject *__p } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("clean_html", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 515, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("clean_html", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 514, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.html.clean.Cleaner.clean_html", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -9335,11 +8788,11 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_18clean_html(CYTHON_UNUSED int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("clean_html", 0); - /* "lxml/html/clean.py":516 + /* "lxml/html/clean.py":515 * * def clean_html(self, html): * result_type = type(html) # <<<<<<<<<<<<<< @@ -9349,28 +8802,28 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_18clean_html(CYTHON_UNUSED __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_html))); __pyx_v_result_type = ((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_html))); - /* "lxml/html/clean.py":517 + /* "lxml/html/clean.py":516 * def clean_html(self, html): * result_type = type(html) * if isinstance(html, basestring): # <<<<<<<<<<<<<< * doc = fromstring(html) * else: */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_basestring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_IsInstance(__pyx_v_html, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 517, __pyx_L1_error) + __pyx_t_2 = PyObject_IsInstance(__pyx_v_html, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 516, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/html/clean.py":518 + /* "lxml/html/clean.py":517 * result_type = type(html) * if isinstance(html, basestring): * doc = fromstring(html) # <<<<<<<<<<<<<< * else: * doc = copy.deepcopy(html) */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_fromstring); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 518, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_fromstring); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -9382,43 +8835,15 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_18clean_html(CYTHON_UNUSED __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_html); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_html}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_html}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 518, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_INCREF(__pyx_v_html); - __Pyx_GIVEREF(__pyx_v_html); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_html); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_html) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_html); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_doc = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/html/clean.py":517 + /* "lxml/html/clean.py":516 * def clean_html(self, html): * result_type = type(html) * if isinstance(html, basestring): # <<<<<<<<<<<<<< @@ -9428,7 +8853,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_18clean_html(CYTHON_UNUSED goto __pyx_L3; } - /* "lxml/html/clean.py":520 + /* "lxml/html/clean.py":519 * doc = fromstring(html) * else: * doc = copy.deepcopy(html) # <<<<<<<<<<<<<< @@ -9436,60 +8861,32 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_18clean_html(CYTHON_UNUSED * return _transform_result(result_type, doc) */ /*else*/ { - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 520, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 520, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - } - } - if (!__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_html); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_html}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_html}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 520, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(__pyx_v_html); - __Pyx_GIVEREF(__pyx_v_html); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_html); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF_SET(__pyx_t_5, function); } } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_html) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_html); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_doc = __pyx_t_1; __pyx_t_1 = 0; } __pyx_L3:; - /* "lxml/html/clean.py":521 + /* "lxml/html/clean.py":520 * else: * doc = copy.deepcopy(html) * self(doc) # <<<<<<<<<<<<<< @@ -9497,52 +8894,24 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_18clean_html(CYTHON_UNUSED * */ __Pyx_INCREF(__pyx_v_self); - __pyx_t_6 = __pyx_v_self; __pyx_t_5 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_5); + __pyx_t_5 = __pyx_v_self; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - } - } - if (!__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_doc}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_doc}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 521, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_INCREF(__pyx_v_doc); - __Pyx_GIVEREF(__pyx_v_doc); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_doc); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_t_5, function); } } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_doc) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_doc); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/html/clean.py":522 + /* "lxml/html/clean.py":521 * doc = copy.deepcopy(html) * self(doc) * return _transform_result(result_type, doc) # <<<<<<<<<<<<<< @@ -9550,58 +8919,58 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_18clean_html(CYTHON_UNUSED * clean = Cleaner() */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_transform_result); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 522, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_transform_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 521, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = NULL; - __pyx_t_7 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_7 = 1; + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_6)) { + if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_result_type), __pyx_v_doc}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_result_type), __pyx_v_doc}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 522, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 521, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_4) { - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_result_type)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result_type)); - PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, ((PyObject *)__pyx_v_result_type)); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_result_type)); __Pyx_INCREF(__pyx_v_doc); __Pyx_GIVEREF(__pyx_v_doc); - PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_v_doc); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_doc); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/html/clean.py":515 + /* "lxml/html/clean.py":514 * return False * * def clean_html(self, html): # <<<<<<<<<<<<<< @@ -9614,7 +8983,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_18clean_html(CYTHON_UNUSED __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("lxml.html.clean.Cleaner.clean_html", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -9625,7 +8994,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_7Cleaner_18clean_html(CYTHON_UNUSED return __pyx_r; } -/* "lxml/html/clean.py":547 +/* "lxml/html/clean.py":546 * _avoid_classes = ['nolink'] * * def autolink(el, link_regexes=_link_regexes, # <<<<<<<<<<<<<< @@ -9640,7 +9009,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_16__defaults__(CYTHON_UNUSED PyObje PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_link_regexes); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_link_regexes); @@ -9654,7 +9023,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_16__defaults__(CYTHON_UNUSED PyObje __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_avoid_classes); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_avoid_classes); PyTuple_SET_ITEM(__pyx_t_1, 3, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_avoid_classes); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 547, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -9681,7 +9050,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_16__defaults__(CYTHON_UNUSED PyObje /* Python wrapper */ static PyObject *__pyx_pw_4lxml_4html_5clean_3autolink(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_4html_5clean_2autolink[] = "\n Turn any URLs into links.\n\n It will search for links identified by the given regular\n expressions (by default mailto and http(s) links).\n\n It won't link text in an element in avoid_elements, or an element\n with a class in avoid_classes. It won't link to anything with a\n host that matches one of the regular expressions in avoid_hosts\n (default localhost and 127.0.0.1).\n\n If you pass in an element, the element's tail will not be\n substituted, only the contents of the element.\n "; -static PyMethodDef __pyx_mdef_4lxml_4html_5clean_3autolink = {"autolink", (PyCFunction)__pyx_pw_4lxml_4html_5clean_3autolink, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_4html_5clean_2autolink}; +static PyMethodDef __pyx_mdef_4lxml_4html_5clean_3autolink = {"autolink", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_4html_5clean_3autolink, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_4html_5clean_2autolink}; static PyObject *__pyx_pw_4lxml_4html_5clean_3autolink(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_el = 0; PyObject *__pyx_v_link_regexes = 0; @@ -9747,7 +9116,7 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_3autolink(PyObject *__pyx_self, PyO } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "autolink") < 0)) __PYX_ERR(0, 547, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "autolink") < 0)) __PYX_ERR(0, 546, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -9772,7 +9141,7 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_3autolink(PyObject *__pyx_self, PyO } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("autolink", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 547, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("autolink", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 546, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.html.clean.autolink", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -9807,21 +9176,21 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_2autolink(CYTHON_UNUSED PyObject *_ PyObject *(*__pyx_t_10)(PyObject *); __Pyx_RefNannySetupContext("autolink", 0); - /* "lxml/html/clean.py":565 + /* "lxml/html/clean.py":564 * substituted, only the contents of the element. * """ * if el.tag in avoid_elements: # <<<<<<<<<<<<<< * return * class_name = el.get('class') */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_v_avoid_elements, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 565, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_v_avoid_elements, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 564, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/html/clean.py":566 + /* "lxml/html/clean.py":565 * """ * if el.tag in avoid_elements: * return # <<<<<<<<<<<<<< @@ -9832,7 +9201,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_2autolink(CYTHON_UNUSED PyObject *_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/html/clean.py":565 + /* "lxml/html/clean.py":564 * substituted, only the contents of the element. * """ * if el.tag in avoid_elements: # <<<<<<<<<<<<<< @@ -9841,62 +9210,71 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_2autolink(CYTHON_UNUSED PyObject *_ */ } - /* "lxml/html/clean.py":567 + /* "lxml/html/clean.py":566 * if el.tag in avoid_elements: * return * class_name = el.get('class') # <<<<<<<<<<<<<< * if class_name: * class_name = class_name.split() */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 567, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 567, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_class_name = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_n_s_class) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_n_s_class); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_class_name = __pyx_t_1; + __pyx_t_1 = 0; - /* "lxml/html/clean.py":568 + /* "lxml/html/clean.py":567 * return * class_name = el.get('class') * if class_name: # <<<<<<<<<<<<<< * class_name = class_name.split() * for match_class in avoid_classes: */ - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_class_name); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 568, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_class_name); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 567, __pyx_L1_error) if (__pyx_t_3) { - /* "lxml/html/clean.py":569 + /* "lxml/html/clean.py":568 * class_name = el.get('class') * if class_name: * class_name = class_name.split() # <<<<<<<<<<<<<< * for match_class in avoid_classes: * if match_class in class_name: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_class_name, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 569, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_class_name, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); + __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_5) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 569, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 569, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF_SET(__pyx_v_class_name, __pyx_t_4); - __pyx_t_4 = 0; + __pyx_t_1 = (__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_1)) __PYX_ERR(0, 568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_class_name, __pyx_t_1); + __pyx_t_1 = 0; - /* "lxml/html/clean.py":570 + /* "lxml/html/clean.py":569 * if class_name: * class_name = class_name.split() * for match_class in avoid_classes: # <<<<<<<<<<<<<< @@ -9904,59 +9282,59 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_2autolink(CYTHON_UNUSED PyObject *_ * return */ if (likely(PyList_CheckExact(__pyx_v_avoid_classes)) || PyTuple_CheckExact(__pyx_v_avoid_classes)) { - __pyx_t_4 = __pyx_v_avoid_classes; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; + __pyx_t_1 = __pyx_v_avoid_classes; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_avoid_classes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 570, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 570, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_avoid_classes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 569, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 569, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { - if (likely(PyList_CheckExact(__pyx_t_4))) { - if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; + if (likely(PyList_CheckExact(__pyx_t_1))) { + if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 570, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 569, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 569, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); #endif } else { - if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break; + if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 570, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 569, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 569, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); #endif } } else { - __pyx_t_1 = __pyx_t_7(__pyx_t_4); - if (unlikely(!__pyx_t_1)) { + __pyx_t_4 = __pyx_t_7(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 570, __pyx_L1_error) + else __PYX_ERR(0, 569, __pyx_L1_error) } break; } - __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_4); } - __Pyx_XDECREF_SET(__pyx_v_match_class, __pyx_t_1); - __pyx_t_1 = 0; + __Pyx_XDECREF_SET(__pyx_v_match_class, __pyx_t_4); + __pyx_t_4 = 0; - /* "lxml/html/clean.py":571 + /* "lxml/html/clean.py":570 * class_name = class_name.split() * for match_class in avoid_classes: * if match_class in class_name: # <<<<<<<<<<<<<< * return * for child in list(el): */ - __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_match_class, __pyx_v_class_name, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 571, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_match_class, __pyx_v_class_name, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 570, __pyx_L1_error) __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "lxml/html/clean.py":572 + /* "lxml/html/clean.py":571 * for match_class in avoid_classes: * if match_class in class_name: * return # <<<<<<<<<<<<<< @@ -9965,10 +9343,10 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_2autolink(CYTHON_UNUSED PyObject *_ */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/html/clean.py":571 + /* "lxml/html/clean.py":570 * class_name = class_name.split() * for match_class in avoid_classes: * if match_class in class_name: # <<<<<<<<<<<<<< @@ -9977,7 +9355,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_2autolink(CYTHON_UNUSED PyObject *_ */ } - /* "lxml/html/clean.py":570 + /* "lxml/html/clean.py":569 * if class_name: * class_name = class_name.split() * for match_class in avoid_classes: # <<<<<<<<<<<<<< @@ -9985,9 +9363,9 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_2autolink(CYTHON_UNUSED PyObject *_ * return */ } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/html/clean.py":568 + /* "lxml/html/clean.py":567 * return * class_name = el.get('class') * if class_name: # <<<<<<<<<<<<<< @@ -9996,128 +9374,128 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_2autolink(CYTHON_UNUSED PyObject *_ */ } - /* "lxml/html/clean.py":573 + /* "lxml/html/clean.py":572 * if match_class in class_name: * return * for child in list(el): # <<<<<<<<<<<<<< * autolink(child, link_regexes=link_regexes, * avoid_elements=avoid_elements, */ - __pyx_t_4 = PySequence_List(__pyx_v_el); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 573, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = PySequence_List(__pyx_v_el); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { - if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break; + if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 573, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 572, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 573, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); #endif - __Pyx_XDECREF_SET(__pyx_v_child, __pyx_t_4); - __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_child, __pyx_t_1); + __pyx_t_1 = 0; - /* "lxml/html/clean.py":574 + /* "lxml/html/clean.py":573 * return * for child in list(el): * autolink(child, link_regexes=link_regexes, # <<<<<<<<<<<<<< * avoid_elements=avoid_elements, * avoid_hosts=avoid_hosts, */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_autolink); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 574, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 574, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_autolink); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 573, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_child); __Pyx_GIVEREF(__pyx_v_child); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_child); - __pyx_t_8 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 574, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_link_regexes, __pyx_v_link_regexes) < 0) __PYX_ERR(0, 574, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_link_regexes, __pyx_v_link_regexes) < 0) __PYX_ERR(0, 573, __pyx_L1_error) - /* "lxml/html/clean.py":575 + /* "lxml/html/clean.py":574 * for child in list(el): * autolink(child, link_regexes=link_regexes, * avoid_elements=avoid_elements, # <<<<<<<<<<<<<< * avoid_hosts=avoid_hosts, * avoid_classes=avoid_classes) */ - if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_avoid_elements, __pyx_v_avoid_elements) < 0) __PYX_ERR(0, 574, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_avoid_elements, __pyx_v_avoid_elements) < 0) __PYX_ERR(0, 573, __pyx_L1_error) - /* "lxml/html/clean.py":576 + /* "lxml/html/clean.py":575 * autolink(child, link_regexes=link_regexes, * avoid_elements=avoid_elements, * avoid_hosts=avoid_hosts, # <<<<<<<<<<<<<< * avoid_classes=avoid_classes) * if child.tail: */ - if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_avoid_hosts, __pyx_v_avoid_hosts) < 0) __PYX_ERR(0, 574, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_avoid_hosts, __pyx_v_avoid_hosts) < 0) __PYX_ERR(0, 573, __pyx_L1_error) - /* "lxml/html/clean.py":577 + /* "lxml/html/clean.py":576 * avoid_elements=avoid_elements, * avoid_hosts=avoid_hosts, * avoid_classes=avoid_classes) # <<<<<<<<<<<<<< * if child.tail: * text, tail_children = _link_text( */ - if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_avoid_classes, __pyx_v_avoid_classes) < 0) __PYX_ERR(0, 574, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_avoid_classes, __pyx_v_avoid_classes) < 0) __PYX_ERR(0, 573, __pyx_L1_error) - /* "lxml/html/clean.py":574 + /* "lxml/html/clean.py":573 * return * for child in list(el): * autolink(child, link_regexes=link_regexes, # <<<<<<<<<<<<<< * avoid_elements=avoid_elements, * avoid_hosts=avoid_hosts, */ - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 574, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "lxml/html/clean.py":578 + /* "lxml/html/clean.py":577 * avoid_hosts=avoid_hosts, * avoid_classes=avoid_classes) * if child.tail: # <<<<<<<<<<<<<< * text, tail_children = _link_text( * child.tail, link_regexes, avoid_hosts, factory=el.makeelement) */ - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_child, __pyx_n_s_tail); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 578, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_child, __pyx_n_s_tail); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 578, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_2) { - /* "lxml/html/clean.py":579 + /* "lxml/html/clean.py":578 * avoid_classes=avoid_classes) * if child.tail: * text, tail_children = _link_text( # <<<<<<<<<<<<<< * child.tail, link_regexes, avoid_hosts, factory=el.makeelement) * if tail_children: */ - __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_link_text); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 579, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_link_text); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - /* "lxml/html/clean.py":580 + /* "lxml/html/clean.py":579 * if child.tail: * text, tail_children = _link_text( * child.tail, link_regexes, avoid_hosts, factory=el.makeelement) # <<<<<<<<<<<<<< * if tail_children: * child.tail = text */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_child, __pyx_n_s_tail); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 580, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_child, __pyx_n_s_tail); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - /* "lxml/html/clean.py":579 + /* "lxml/html/clean.py":578 * avoid_classes=avoid_classes) * if child.tail: * text, tail_children = _link_text( # <<<<<<<<<<<<<< * child.tail, link_regexes, avoid_hosts, factory=el.makeelement) * if tail_children: */ - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 579, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); @@ -10129,39 +9507,39 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_2autolink(CYTHON_UNUSED PyObject *_ PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_avoid_hosts); __pyx_t_8 = 0; - /* "lxml/html/clean.py":580 + /* "lxml/html/clean.py":579 * if child.tail: * text, tail_children = _link_text( * child.tail, link_regexes, avoid_hosts, factory=el.makeelement) # <<<<<<<<<<<<<< * if tail_children: * child.tail = text */ - __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 580, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_makeelement); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 580, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_factory, __pyx_t_4) < 0) __PYX_ERR(0, 580, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_makeelement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 579, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_factory, __pyx_t_1) < 0) __PYX_ERR(0, 579, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/html/clean.py":579 + /* "lxml/html/clean.py":578 * avoid_classes=avoid_classes) * if child.tail: * text, tail_children = _link_text( # <<<<<<<<<<<<<< * child.tail, link_regexes, avoid_hosts, factory=el.makeelement) * if tail_children: */ - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 579, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { - PyObject* sequence = __pyx_t_4; + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 579, __pyx_L1_error) + __PYX_ERR(0, 578, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -10174,23 +9552,23 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_2autolink(CYTHON_UNUSED PyObject *_ __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 579, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 579, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 579, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; index = 0; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); index = 1; __pyx_t_5 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_5)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 579, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 578, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L12_unpacking_done; @@ -10198,7 +9576,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_2autolink(CYTHON_UNUSED PyObject *_ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 579, __pyx_L1_error) + __PYX_ERR(0, 578, __pyx_L1_error) __pyx_L12_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_text, __pyx_t_8); @@ -10206,33 +9584,33 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_2autolink(CYTHON_UNUSED PyObject *_ __Pyx_XDECREF_SET(__pyx_v_tail_children, __pyx_t_5); __pyx_t_5 = 0; - /* "lxml/html/clean.py":581 + /* "lxml/html/clean.py":580 * text, tail_children = _link_text( * child.tail, link_regexes, avoid_hosts, factory=el.makeelement) * if tail_children: # <<<<<<<<<<<<<< * child.tail = text * index = el.index(child) */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_tail_children); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 581, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_tail_children); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 580, __pyx_L1_error) if (__pyx_t_2) { - /* "lxml/html/clean.py":582 + /* "lxml/html/clean.py":581 * child.tail, link_regexes, avoid_hosts, factory=el.makeelement) * if tail_children: * child.tail = text # <<<<<<<<<<<<<< * index = el.index(child) * el[index+1:index+1] = tail_children */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_child, __pyx_n_s_tail, __pyx_v_text) < 0) __PYX_ERR(0, 582, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_child, __pyx_n_s_tail, __pyx_v_text) < 0) __PYX_ERR(0, 581, __pyx_L1_error) - /* "lxml/html/clean.py":583 + /* "lxml/html/clean.py":582 * if tail_children: * child.tail = text * index = el.index(child) # <<<<<<<<<<<<<< * el[index+1:index+1] = tail_children * if el.text: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 583, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -10244,58 +9622,30 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_2autolink(CYTHON_UNUSED PyObject *_ __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_8) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_child); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 583, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_child}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 583, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_child}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 583, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 583, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; - __Pyx_INCREF(__pyx_v_child); - __Pyx_GIVEREF(__pyx_v_child); - PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_child); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 583, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } - } + __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_v_child) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_child); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_4); - __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_1); + __pyx_t_1 = 0; - /* "lxml/html/clean.py":584 + /* "lxml/html/clean.py":583 * child.tail = text * index = el.index(child) * el[index+1:index+1] = tail_children # <<<<<<<<<<<<<< * if el.text: * text, pre_children = _link_text( */ - __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_index, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 584, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_v_index, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 584, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_index, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_v_index, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_PyObject_SetSlice(__pyx_v_el, __pyx_v_tail_children, 0, 0, &__pyx_t_4, &__pyx_t_5, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 584, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_PyObject_SetSlice(__pyx_v_el, __pyx_v_tail_children, 0, 0, &__pyx_t_1, &__pyx_t_5, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 583, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/html/clean.py":581 + /* "lxml/html/clean.py":580 * text, tail_children = _link_text( * child.tail, link_regexes, avoid_hosts, factory=el.makeelement) * if tail_children: # <<<<<<<<<<<<<< @@ -10304,7 +9654,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_2autolink(CYTHON_UNUSED PyObject *_ */ } - /* "lxml/html/clean.py":578 + /* "lxml/html/clean.py":577 * avoid_hosts=avoid_hosts, * avoid_classes=avoid_classes) * if child.tail: # <<<<<<<<<<<<<< @@ -10313,7 +9663,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_2autolink(CYTHON_UNUSED PyObject *_ */ } - /* "lxml/html/clean.py":573 + /* "lxml/html/clean.py":572 * if match_class in class_name: * return * for child in list(el): # <<<<<<<<<<<<<< @@ -10321,166 +9671,166 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_2autolink(CYTHON_UNUSED PyObject *_ * avoid_elements=avoid_elements, */ } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/html/clean.py":585 + /* "lxml/html/clean.py":584 * index = el.index(child) * el[index+1:index+1] = tail_children * if el.text: # <<<<<<<<<<<<<< * text, pre_children = _link_text( * el.text, link_regexes, avoid_hosts, factory=el.makeelement) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 585, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_text); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 584, __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, 584, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { - /* "lxml/html/clean.py":586 + /* "lxml/html/clean.py":585 * el[index+1:index+1] = tail_children * if el.text: * text, pre_children = _link_text( # <<<<<<<<<<<<<< * el.text, link_regexes, avoid_hosts, factory=el.makeelement) * if pre_children: */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_link_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_link_text); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); - /* "lxml/html/clean.py":587 + /* "lxml/html/clean.py":586 * if el.text: * text, pre_children = _link_text( * el.text, link_regexes, avoid_hosts, factory=el.makeelement) # <<<<<<<<<<<<<< * if pre_children: * el.text = text */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_text); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 587, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_text); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - /* "lxml/html/clean.py":586 + /* "lxml/html/clean.py":585 * el[index+1:index+1] = tail_children * if el.text: * text, pre_children = _link_text( # <<<<<<<<<<<<<< * el.text, link_regexes, avoid_hosts, factory=el.makeelement) * if pre_children: */ - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 586, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __Pyx_INCREF(__pyx_v_link_regexes); __Pyx_GIVEREF(__pyx_v_link_regexes); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_link_regexes); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_link_regexes); __Pyx_INCREF(__pyx_v_avoid_hosts); __Pyx_GIVEREF(__pyx_v_avoid_hosts); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_avoid_hosts); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_avoid_hosts); __pyx_t_5 = 0; - /* "lxml/html/clean.py":587 + /* "lxml/html/clean.py":586 * if el.text: * text, pre_children = _link_text( * el.text, link_regexes, avoid_hosts, factory=el.makeelement) # <<<<<<<<<<<<<< * if pre_children: * el.text = text */ - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 587, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_makeelement); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 587, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_factory, __pyx_t_9) < 0) __PYX_ERR(0, 587, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_el, __pyx_n_s_makeelement); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 586, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_factory, __pyx_t_8) < 0) __PYX_ERR(0, 586, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "lxml/html/clean.py":586 + /* "lxml/html/clean.py":585 * el[index+1:index+1] = tail_children * if el.text: * text, pre_children = _link_text( # <<<<<<<<<<<<<< * el.text, link_regexes, avoid_hosts, factory=el.makeelement) * if pre_children: */ - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 586, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) { - PyObject* sequence = __pyx_t_9; + if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) { + PyObject* sequence = __pyx_t_8; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 586, __pyx_L1_error) + __PYX_ERR(0, 585, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); - __pyx_t_4 = PyList_GET_ITEM(sequence, 1); + __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); - __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_1); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 586, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 586, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); #endif - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { Py_ssize_t index = -1; - __pyx_t_1 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; - index = 0; __pyx_t_5 = __pyx_t_10(__pyx_t_1); if (unlikely(!__pyx_t_5)) goto __pyx_L15_unpacking_failed; - __Pyx_GOTREF(__pyx_t_5); - index = 1; __pyx_t_4 = __pyx_t_10(__pyx_t_1); if (unlikely(!__pyx_t_4)) goto __pyx_L15_unpacking_failed; + __pyx_t_4 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_1), 2) < 0) __PYX_ERR(0, 586, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; + index = 0; __pyx_t_5 = __pyx_t_10(__pyx_t_4); if (unlikely(!__pyx_t_5)) goto __pyx_L15_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + index = 1; __pyx_t_1 = __pyx_t_10(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L15_unpacking_failed; + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_4), 2) < 0) __PYX_ERR(0, 585, __pyx_L1_error) __pyx_t_10 = NULL; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L16_unpacking_done; __pyx_L15_unpacking_failed:; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 586, __pyx_L1_error) + __PYX_ERR(0, 585, __pyx_L1_error) __pyx_L16_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_text, __pyx_t_5); __pyx_t_5 = 0; - __pyx_v_pre_children = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_v_pre_children = __pyx_t_1; + __pyx_t_1 = 0; - /* "lxml/html/clean.py":588 + /* "lxml/html/clean.py":587 * text, pre_children = _link_text( * el.text, link_regexes, avoid_hosts, factory=el.makeelement) * if pre_children: # <<<<<<<<<<<<<< * el.text = text * el[:0] = pre_children */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_pre_children); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 588, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_pre_children); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 587, __pyx_L1_error) if (__pyx_t_2) { - /* "lxml/html/clean.py":589 + /* "lxml/html/clean.py":588 * el.text, link_regexes, avoid_hosts, factory=el.makeelement) * if pre_children: * el.text = text # <<<<<<<<<<<<<< * el[:0] = pre_children * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_el, __pyx_n_s_text, __pyx_v_text) < 0) __PYX_ERR(0, 589, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_el, __pyx_n_s_text, __pyx_v_text) < 0) __PYX_ERR(0, 588, __pyx_L1_error) - /* "lxml/html/clean.py":590 + /* "lxml/html/clean.py":589 * if pre_children: * el.text = text * el[:0] = pre_children # <<<<<<<<<<<<<< * * def _link_text(text, link_regexes, avoid_hosts, factory): */ - if (__Pyx_PyObject_SetSlice(__pyx_v_el, __pyx_v_pre_children, 0, 0, NULL, NULL, &__pyx_slice__22, 0, 1, 1) < 0) __PYX_ERR(0, 590, __pyx_L1_error) + if (__Pyx_PyObject_SetSlice(__pyx_v_el, __pyx_v_pre_children, 0, 0, NULL, NULL, &__pyx_slice__14, 0, 1, 1) < 0) __PYX_ERR(0, 589, __pyx_L1_error) - /* "lxml/html/clean.py":588 + /* "lxml/html/clean.py":587 * text, pre_children = _link_text( * el.text, link_regexes, avoid_hosts, factory=el.makeelement) * if pre_children: # <<<<<<<<<<<<<< @@ -10489,7 +9839,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_2autolink(CYTHON_UNUSED PyObject *_ */ } - /* "lxml/html/clean.py":585 + /* "lxml/html/clean.py":584 * index = el.index(child) * el[index+1:index+1] = tail_children * if el.text: # <<<<<<<<<<<<<< @@ -10498,7 +9848,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_2autolink(CYTHON_UNUSED PyObject *_ */ } - /* "lxml/html/clean.py":547 + /* "lxml/html/clean.py":546 * _avoid_classes = ['nolink'] * * def autolink(el, link_regexes=_link_regexes, # <<<<<<<<<<<<<< @@ -10530,7 +9880,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_2autolink(CYTHON_UNUSED PyObject *_ return __pyx_r; } -/* "lxml/html/clean.py":592 +/* "lxml/html/clean.py":591 * el[:0] = pre_children * * def _link_text(text, link_regexes, avoid_hosts, factory): # <<<<<<<<<<<<<< @@ -10540,7 +9890,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_2autolink(CYTHON_UNUSED PyObject *_ /* Python wrapper */ static PyObject *__pyx_pw_4lxml_4html_5clean_5_link_text(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_4html_5clean_5_link_text = {"_link_text", (PyCFunction)__pyx_pw_4lxml_4html_5clean_5_link_text, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_4html_5clean_5_link_text = {"_link_text", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_4html_5clean_5_link_text, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_4html_5clean_5_link_text(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_text = 0; PyObject *__pyx_v_link_regexes = 0; @@ -10576,23 +9926,23 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_5_link_text(PyObject *__pyx_self, P case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_link_regexes)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_link_text", 1, 4, 4, 1); __PYX_ERR(0, 592, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_link_text", 1, 4, 4, 1); __PYX_ERR(0, 591, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_avoid_hosts)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_link_text", 1, 4, 4, 2); __PYX_ERR(0, 592, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_link_text", 1, 4, 4, 2); __PYX_ERR(0, 591, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_factory)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_link_text", 1, 4, 4, 3); __PYX_ERR(0, 592, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_link_text", 1, 4, 4, 3); __PYX_ERR(0, 591, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_link_text") < 0)) __PYX_ERR(0, 592, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_link_text") < 0)) __PYX_ERR(0, 591, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; @@ -10609,7 +9959,7 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_5_link_text(PyObject *__pyx_self, P } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_link_text", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 592, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_link_text", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 591, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.html.clean._link_text", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -10651,36 +10001,35 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject int __pyx_t_9; Py_ssize_t __pyx_t_10; PyObject *(*__pyx_t_11)(PyObject *); - PyObject *__pyx_t_12 = NULL; + int __pyx_t_12; int __pyx_t_13; int __pyx_t_14; - int __pyx_t_15; __Pyx_RefNannySetupContext("_link_text", 0); __Pyx_INCREF(__pyx_v_text); - /* "lxml/html/clean.py":593 + /* "lxml/html/clean.py":592 * * def _link_text(text, link_regexes, avoid_hosts, factory): * leading_text = '' # <<<<<<<<<<<<<< * links = [] * last_pos = 0 */ - __Pyx_INCREF(__pyx_kp_s__4); - __pyx_v_leading_text = __pyx_kp_s__4; + __Pyx_INCREF(__pyx_kp_s_); + __pyx_v_leading_text = __pyx_kp_s_; - /* "lxml/html/clean.py":594 + /* "lxml/html/clean.py":593 * def _link_text(text, link_regexes, avoid_hosts, factory): * leading_text = '' * links = [] # <<<<<<<<<<<<<< * last_pos = 0 * while 1: */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 594, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_links = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/html/clean.py":595 + /* "lxml/html/clean.py":594 * leading_text = '' * links = [] * last_pos = 0 # <<<<<<<<<<<<<< @@ -10689,7 +10038,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject */ __pyx_v_last_pos = 0; - /* "lxml/html/clean.py":596 + /* "lxml/html/clean.py":595 * links = [] * last_pos = 0 * while 1: # <<<<<<<<<<<<<< @@ -10698,7 +10047,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject */ while (1) { - /* "lxml/html/clean.py":597 + /* "lxml/html/clean.py":596 * last_pos = 0 * while 1: * best_match, best_pos = None, None # <<<<<<<<<<<<<< @@ -10714,7 +10063,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject __Pyx_XDECREF_SET(__pyx_v_best_pos, __pyx_t_2); __pyx_t_2 = 0; - /* "lxml/html/clean.py":598 + /* "lxml/html/clean.py":597 * while 1: * best_match, best_pos = None, None * for regex in link_regexes: # <<<<<<<<<<<<<< @@ -10725,26 +10074,26 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject __pyx_t_2 = __pyx_v_link_regexes; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_link_regexes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 598, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_link_regexes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 597, __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(0, 598, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 597, __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_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 598, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 597, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= 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_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 598, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 597, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -10754,7 +10103,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(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, 598, __pyx_L1_error) + else __PYX_ERR(0, 597, __pyx_L1_error) } break; } @@ -10763,19 +10112,19 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject __Pyx_XDECREF_SET(__pyx_v_regex, __pyx_t_1); __pyx_t_1 = 0; - /* "lxml/html/clean.py":599 + /* "lxml/html/clean.py":598 * best_match, best_pos = None, None * for regex in link_regexes: * regex_pos = last_pos # <<<<<<<<<<<<<< * while 1: * match = regex.search(text, pos=regex_pos) */ - __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_last_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 599, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_last_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_regex_pos, __pyx_t_1); __pyx_t_1 = 0; - /* "lxml/html/clean.py":600 + /* "lxml/html/clean.py":599 * for regex in link_regexes: * regex_pos = last_pos * while 1: # <<<<<<<<<<<<<< @@ -10784,24 +10133,24 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject */ while (1) { - /* "lxml/html/clean.py":601 + /* "lxml/html/clean.py":600 * regex_pos = last_pos * while 1: * match = regex.search(text, pos=regex_pos) # <<<<<<<<<<<<<< * if match is None: * break */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_regex, __pyx_n_s_search); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_regex, __pyx_n_s_search); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 601, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_text); __Pyx_GIVEREF(__pyx_v_text); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_text); - __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 601, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_pos, __pyx_v_regex_pos) < 0) __PYX_ERR(0, 601, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 601, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_pos, __pyx_v_regex_pos) < 0) __PYX_ERR(0, 600, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -10809,7 +10158,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject __Pyx_XDECREF_SET(__pyx_v_match, __pyx_t_7); __pyx_t_7 = 0; - /* "lxml/html/clean.py":602 + /* "lxml/html/clean.py":601 * while 1: * match = regex.search(text, pos=regex_pos) * if match is None: # <<<<<<<<<<<<<< @@ -10820,7 +10169,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { - /* "lxml/html/clean.py":603 + /* "lxml/html/clean.py":602 * match = regex.search(text, pos=regex_pos) * if match is None: * break # <<<<<<<<<<<<<< @@ -10829,7 +10178,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject */ goto __pyx_L8_break; - /* "lxml/html/clean.py":602 + /* "lxml/html/clean.py":601 * while 1: * match = regex.search(text, pos=regex_pos) * if match is None: # <<<<<<<<<<<<<< @@ -10838,22 +10187,34 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject */ } - /* "lxml/html/clean.py":604 + /* "lxml/html/clean.py":603 * if match is None: * break * host = match.group('host') # <<<<<<<<<<<<<< * for host_regex in avoid_hosts: * if host_regex.search(host): */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 604, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 604, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF_SET(__pyx_v_host, __pyx_t_6); - __pyx_t_6 = 0; + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_n_s_host) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_s_host); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF_SET(__pyx_v_host, __pyx_t_7); + __pyx_t_7 = 0; - /* "lxml/html/clean.py":605 + /* "lxml/html/clean.py":604 * break * host = match.group('host') * for host_regex in avoid_hosts: # <<<<<<<<<<<<<< @@ -10861,55 +10222,55 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject * regex_pos = match.end() */ if (likely(PyList_CheckExact(__pyx_v_avoid_hosts)) || PyTuple_CheckExact(__pyx_v_avoid_hosts)) { - __pyx_t_6 = __pyx_v_avoid_hosts; __Pyx_INCREF(__pyx_t_6); __pyx_t_10 = 0; + __pyx_t_7 = __pyx_v_avoid_hosts; __Pyx_INCREF(__pyx_t_7); __pyx_t_10 = 0; __pyx_t_11 = NULL; } else { - __pyx_t_10 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_avoid_hosts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 605, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 605, __pyx_L1_error) + __pyx_t_10 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_avoid_hosts); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 604, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_11)) { - if (likely(PyList_CheckExact(__pyx_t_6))) { - if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_6)) break; + if (likely(PyList_CheckExact(__pyx_t_7))) { + if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 605, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 604, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 605, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); #endif } else { - if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_6)) break; + if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 605, __pyx_L1_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 604, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 605, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); #endif } } else { - __pyx_t_7 = __pyx_t_11(__pyx_t_6); - if (unlikely(!__pyx_t_7)) { + __pyx_t_6 = __pyx_t_11(__pyx_t_7); + if (unlikely(!__pyx_t_6)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 605, __pyx_L1_error) + else __PYX_ERR(0, 604, __pyx_L1_error) } break; } - __Pyx_GOTREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_t_6); } - __Pyx_XDECREF_SET(__pyx_v_host_regex, __pyx_t_7); - __pyx_t_7 = 0; + __Pyx_XDECREF_SET(__pyx_v_host_regex, __pyx_t_6); + __pyx_t_6 = 0; - /* "lxml/html/clean.py":606 + /* "lxml/html/clean.py":605 * host = match.group('host') * for host_regex in avoid_hosts: * if host_regex.search(host): # <<<<<<<<<<<<<< * regex_pos = match.end() * break */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_host_regex, __pyx_n_s_search); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 606, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_host_regex, __pyx_n_s_search); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -10921,74 +10282,43 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_1) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_host); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 606, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_host}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 606, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_7); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_host}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 606, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_7); - } else - #endif - { - __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 606, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_1); __pyx_t_1 = NULL; - __Pyx_INCREF(__pyx_v_host); - __Pyx_GIVEREF(__pyx_v_host); - PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_host); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 606, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } - } + __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_1, __pyx_v_host) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_host); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 605, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 606, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 605, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_9) { - /* "lxml/html/clean.py":607 + /* "lxml/html/clean.py":606 * for host_regex in avoid_hosts: * if host_regex.search(host): * regex_pos = match.end() # <<<<<<<<<<<<<< * break * else: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_end); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 607, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_end); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_12 = NULL; + __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_12)) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (__pyx_t_12) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 607, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } else { - __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 607, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 606, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF_SET(__pyx_v_regex_pos, __pyx_t_7); - __pyx_t_7 = 0; + __Pyx_DECREF_SET(__pyx_v_regex_pos, __pyx_t_6); + __pyx_t_6 = 0; - /* "lxml/html/clean.py":608 + /* "lxml/html/clean.py":607 * if host_regex.search(host): * regex_pos = match.end() * break # <<<<<<<<<<<<<< @@ -10997,7 +10327,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject */ goto __pyx_L11_break; - /* "lxml/html/clean.py":606 + /* "lxml/html/clean.py":605 * host = match.group('host') * for host_regex in avoid_hosts: * if host_regex.search(host): # <<<<<<<<<<<<<< @@ -11006,7 +10336,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject */ } - /* "lxml/html/clean.py":605 + /* "lxml/html/clean.py":604 * break * host = match.group('host') * for host_regex in avoid_hosts: # <<<<<<<<<<<<<< @@ -11016,7 +10346,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject } /*else*/ { - /* "lxml/html/clean.py":610 + /* "lxml/html/clean.py":609 * break * else: * break # <<<<<<<<<<<<<< @@ -11026,7 +10356,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject goto __pyx_L8_break; } - /* "lxml/html/clean.py":605 + /* "lxml/html/clean.py":604 * break * host = match.group('host') * for host_regex in avoid_hosts: # <<<<<<<<<<<<<< @@ -11034,23 +10364,23 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject * regex_pos = match.end() */ __pyx_L11_break:; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_L8_break:; - /* "lxml/html/clean.py":611 + /* "lxml/html/clean.py":610 * else: * break * if match is None: # <<<<<<<<<<<<<< * continue * if best_pos is None or match.start() < best_pos: */ - if (unlikely(!__pyx_v_match)) { __Pyx_RaiseUnboundLocalError("match"); __PYX_ERR(0, 611, __pyx_L1_error) } + if (unlikely(!__pyx_v_match)) { __Pyx_RaiseUnboundLocalError("match"); __PYX_ERR(0, 610, __pyx_L1_error) } __pyx_t_9 = (__pyx_v_match == Py_None); __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { - /* "lxml/html/clean.py":612 + /* "lxml/html/clean.py":611 * break * if match is None: * continue # <<<<<<<<<<<<<< @@ -11059,7 +10389,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject */ goto __pyx_L5_continue; - /* "lxml/html/clean.py":611 + /* "lxml/html/clean.py":610 * else: * break * if match is None: # <<<<<<<<<<<<<< @@ -11068,7 +10398,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject */ } - /* "lxml/html/clean.py":613 + /* "lxml/html/clean.py":612 * if match is None: * continue * if best_pos is None or match.start() < best_pos: # <<<<<<<<<<<<<< @@ -11076,84 +10406,78 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject * best_pos = match.start() */ __pyx_t_9 = (__pyx_v_best_pos == Py_None); - __pyx_t_13 = (__pyx_t_9 != 0); - if (!__pyx_t_13) { + __pyx_t_12 = (__pyx_t_9 != 0); + if (!__pyx_t_12) { } else { - __pyx_t_8 = __pyx_t_13; + __pyx_t_8 = __pyx_t_12; goto __pyx_L16_bool_binop_done; } - if (unlikely(!__pyx_v_match)) { __Pyx_RaiseUnboundLocalError("match"); __PYX_ERR(0, 613, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_start); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 613, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + if (unlikely(!__pyx_v_match)) { __Pyx_RaiseUnboundLocalError("match"); __PYX_ERR(0, 612, __pyx_L1_error) } + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 612, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_7, function); + __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (__pyx_t_5) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 613, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 613, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_v_best_pos, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 613, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 612, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 613, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_v_best_pos, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_8 = __pyx_t_13; + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 612, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = __pyx_t_12; __pyx_L16_bool_binop_done:; if (__pyx_t_8) { - /* "lxml/html/clean.py":614 + /* "lxml/html/clean.py":613 * continue * if best_pos is None or match.start() < best_pos: * best_match = match # <<<<<<<<<<<<<< * best_pos = match.start() * if best_match is None: */ - if (unlikely(!__pyx_v_match)) { __Pyx_RaiseUnboundLocalError("match"); __PYX_ERR(0, 614, __pyx_L1_error) } + if (unlikely(!__pyx_v_match)) { __Pyx_RaiseUnboundLocalError("match"); __PYX_ERR(0, 613, __pyx_L1_error) } __Pyx_INCREF(__pyx_v_match); __Pyx_DECREF_SET(__pyx_v_best_match, __pyx_v_match); - /* "lxml/html/clean.py":615 + /* "lxml/html/clean.py":614 * if best_pos is None or match.start() < best_pos: * best_match = match * best_pos = match.start() # <<<<<<<<<<<<<< * if best_match is None: * # No more matches */ - if (unlikely(!__pyx_v_match)) { __Pyx_RaiseUnboundLocalError("match"); __PYX_ERR(0, 615, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 615, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + if (unlikely(!__pyx_v_match)) { __Pyx_RaiseUnboundLocalError("match"); __PYX_ERR(0, 614, __pyx_L1_error) } + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_start); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 614, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); + __Pyx_DECREF_SET(__pyx_t_7, function); } } - if (__pyx_t_5) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF_SET(__pyx_v_best_pos, __pyx_t_7); - __pyx_t_7 = 0; + __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 614, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF_SET(__pyx_v_best_pos, __pyx_t_6); + __pyx_t_6 = 0; - /* "lxml/html/clean.py":613 + /* "lxml/html/clean.py":612 * if match is None: * continue * if best_pos is None or match.start() < best_pos: # <<<<<<<<<<<<<< @@ -11162,7 +10486,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject */ } - /* "lxml/html/clean.py":598 + /* "lxml/html/clean.py":597 * while 1: * best_match, best_pos = None, None * for regex in link_regexes: # <<<<<<<<<<<<<< @@ -11173,7 +10497,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/html/clean.py":616 + /* "lxml/html/clean.py":615 * best_match = match * best_pos = match.start() * if best_match is None: # <<<<<<<<<<<<<< @@ -11181,20 +10505,20 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject * if links: */ __pyx_t_8 = (__pyx_v_best_match == Py_None); - __pyx_t_13 = (__pyx_t_8 != 0); - if (__pyx_t_13) { + __pyx_t_12 = (__pyx_t_8 != 0); + if (__pyx_t_12) { - /* "lxml/html/clean.py":618 + /* "lxml/html/clean.py":617 * if best_match is None: * # No more matches * if links: # <<<<<<<<<<<<<< * assert not links[-1].tail * links[-1].tail = text */ - __pyx_t_13 = (PyList_GET_SIZE(__pyx_v_links) != 0); - if (__pyx_t_13) { + __pyx_t_12 = (PyList_GET_SIZE(__pyx_v_links) != 0); + if (__pyx_t_12) { - /* "lxml/html/clean.py":619 + /* "lxml/html/clean.py":618 * # No more matches * if links: * assert not links[-1].tail # <<<<<<<<<<<<<< @@ -11203,33 +10527,33 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_links, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 619, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_links, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tail); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 619, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tail); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 618, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 619, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!((!__pyx_t_13) != 0))) { + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 618, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!((!__pyx_t_12) != 0))) { PyErr_SetNone(PyExc_AssertionError); - __PYX_ERR(0, 619, __pyx_L1_error) + __PYX_ERR(0, 618, __pyx_L1_error) } } #endif - /* "lxml/html/clean.py":620 + /* "lxml/html/clean.py":619 * if links: * assert not links[-1].tail * links[-1].tail = text # <<<<<<<<<<<<<< * else: * assert not leading_text */ - __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_links, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 620, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_PyObject_SetAttrStr(__pyx_t_7, __pyx_n_s_tail, __pyx_v_text) < 0) __PYX_ERR(0, 620, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_links, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_PyObject_SetAttrStr(__pyx_t_6, __pyx_n_s_tail, __pyx_v_text) < 0) __PYX_ERR(0, 619, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "lxml/html/clean.py":618 + /* "lxml/html/clean.py":617 * if best_match is None: * # No more matches * if links: # <<<<<<<<<<<<<< @@ -11239,7 +10563,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject goto __pyx_L19; } - /* "lxml/html/clean.py":622 + /* "lxml/html/clean.py":621 * links[-1].tail = text * else: * assert not leading_text # <<<<<<<<<<<<<< @@ -11249,15 +10573,15 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject /*else*/ { #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_leading_text); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 622, __pyx_L1_error) - if (unlikely(!((!__pyx_t_13) != 0))) { + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_leading_text); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 621, __pyx_L1_error) + if (unlikely(!((!__pyx_t_12) != 0))) { PyErr_SetNone(PyExc_AssertionError); - __PYX_ERR(0, 622, __pyx_L1_error) + __PYX_ERR(0, 621, __pyx_L1_error) } } #endif - /* "lxml/html/clean.py":623 + /* "lxml/html/clean.py":622 * else: * assert not leading_text * leading_text = text # <<<<<<<<<<<<<< @@ -11269,7 +10593,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject } __pyx_L19:; - /* "lxml/html/clean.py":624 + /* "lxml/html/clean.py":623 * assert not leading_text * leading_text = text * break # <<<<<<<<<<<<<< @@ -11278,7 +10602,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject */ goto __pyx_L4_break; - /* "lxml/html/clean.py":616 + /* "lxml/html/clean.py":615 * best_match = match * best_pos = match.start() * if best_match is None: # <<<<<<<<<<<<<< @@ -11287,106 +10611,139 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject */ } - /* "lxml/html/clean.py":625 + /* "lxml/html/clean.py":624 * leading_text = text * break * link = best_match.group(0) # <<<<<<<<<<<<<< * end = best_match.end() * if link.endswith('.') or link.endswith(','): */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_best_match, __pyx_n_s_group); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 625, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 625, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_best_match, __pyx_n_s_group); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF_SET(__pyx_v_link, __pyx_t_2); - __pyx_t_2 = 0; + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_0); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 624, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF_SET(__pyx_v_link, __pyx_t_6); + __pyx_t_6 = 0; - /* "lxml/html/clean.py":626 + /* "lxml/html/clean.py":625 * break * link = best_match.group(0) * end = best_match.end() # <<<<<<<<<<<<<< * if link.endswith('.') or link.endswith(','): * # These punctuation marks shouldn't end a link */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_best_match, __pyx_n_s_end); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 626, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_best_match, __pyx_n_s_end); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 625, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_7, function); + __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_6) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF_SET(__pyx_v_end, __pyx_t_2); - __pyx_t_2 = 0; + __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, 625, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF_SET(__pyx_v_end, __pyx_t_6); + __pyx_t_6 = 0; - /* "lxml/html/clean.py":627 + /* "lxml/html/clean.py":626 * link = best_match.group(0) * end = best_match.end() * if link.endswith('.') or link.endswith(','): # <<<<<<<<<<<<<< * # These punctuation marks shouldn't end a link * end -= 1 */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_link, __pyx_n_s_endswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_link, __pyx_n_s_endswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 627, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_kp_s__15) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s__15); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 626, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 627, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 626, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!__pyx_t_8) { } else { - __pyx_t_13 = __pyx_t_8; + __pyx_t_12 = __pyx_t_8; goto __pyx_L21_bool_binop_done; } - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_link, __pyx_n_s_endswith); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 627, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_link, __pyx_n_s_endswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 627, __pyx_L1_error) + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_kp_s__16) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s__16); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 626, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_13 = __pyx_t_8; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 626, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_12 = __pyx_t_8; __pyx_L21_bool_binop_done:; - if (__pyx_t_13) { + if (__pyx_t_12) { - /* "lxml/html/clean.py":629 + /* "lxml/html/clean.py":628 * if link.endswith('.') or link.endswith(','): * # These punctuation marks shouldn't end a link * end -= 1 # <<<<<<<<<<<<<< * link = link[:-1] * prev_text = text[:best_match.start()] */ - __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_v_end, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF_SET(__pyx_v_end, __pyx_t_2); - __pyx_t_2 = 0; + __pyx_t_6 = __Pyx_PyInt_SubtractObjC(__pyx_v_end, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_end, __pyx_t_6); + __pyx_t_6 = 0; - /* "lxml/html/clean.py":630 + /* "lxml/html/clean.py":629 * # These punctuation marks shouldn't end a link * end -= 1 * link = link[:-1] # <<<<<<<<<<<<<< * prev_text = text[:best_match.start()] * if links: */ - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_link, 0, -1L, NULL, NULL, &__pyx_slice__29, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 630, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF_SET(__pyx_v_link, __pyx_t_2); - __pyx_t_2 = 0; + __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_link, 0, -1L, NULL, NULL, &__pyx_slice__17, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 629, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_link, __pyx_t_6); + __pyx_t_6 = 0; - /* "lxml/html/clean.py":627 + /* "lxml/html/clean.py":626 * link = best_match.group(0) * end = best_match.end() * if link.endswith('.') or link.endswith(','): # <<<<<<<<<<<<<< @@ -11395,50 +10752,47 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject */ } - /* "lxml/html/clean.py":631 + /* "lxml/html/clean.py":630 * end -= 1 * link = link[:-1] * prev_text = text[:best_match.start()] # <<<<<<<<<<<<<< * if links: * assert not links[-1].tail */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_best_match, __pyx_n_s_start); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 631, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_best_match, __pyx_n_s_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 630, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_7, function); + __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_6) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 631, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 631, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, NULL, &__pyx_t_2, NULL, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 631, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __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, 630, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF_SET(__pyx_v_prev_text, __pyx_t_7); - __pyx_t_7 = 0; + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, NULL, &__pyx_t_6, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 630, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF_SET(__pyx_v_prev_text, __pyx_t_2); + __pyx_t_2 = 0; - /* "lxml/html/clean.py":632 + /* "lxml/html/clean.py":631 * link = link[:-1] * prev_text = text[:best_match.start()] * if links: # <<<<<<<<<<<<<< * assert not links[-1].tail * links[-1].tail = prev_text */ - __pyx_t_13 = (PyList_GET_SIZE(__pyx_v_links) != 0); - if (__pyx_t_13) { + __pyx_t_12 = (PyList_GET_SIZE(__pyx_v_links) != 0); + if (__pyx_t_12) { - /* "lxml/html/clean.py":633 + /* "lxml/html/clean.py":632 * prev_text = text[:best_match.start()] * if links: * assert not links[-1].tail # <<<<<<<<<<<<<< @@ -11447,33 +10801,33 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { - __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_links, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 633, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_tail); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 633, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_links, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 633, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tail); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!((!__pyx_t_13) != 0))) { + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 632, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!((!__pyx_t_12) != 0))) { PyErr_SetNone(PyExc_AssertionError); - __PYX_ERR(0, 633, __pyx_L1_error) + __PYX_ERR(0, 632, __pyx_L1_error) } } #endif - /* "lxml/html/clean.py":634 + /* "lxml/html/clean.py":633 * if links: * assert not links[-1].tail * links[-1].tail = prev_text # <<<<<<<<<<<<<< * else: * assert not leading_text */ - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_links, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 634, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_PyObject_SetAttrStr(__pyx_t_2, __pyx_n_s_tail, __pyx_v_prev_text) < 0) __PYX_ERR(0, 634, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_links, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 633, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_PyObject_SetAttrStr(__pyx_t_6, __pyx_n_s_tail, __pyx_v_prev_text) < 0) __PYX_ERR(0, 633, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "lxml/html/clean.py":632 + /* "lxml/html/clean.py":631 * link = link[:-1] * prev_text = text[:best_match.start()] * if links: # <<<<<<<<<<<<<< @@ -11483,7 +10837,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject goto __pyx_L23; } - /* "lxml/html/clean.py":636 + /* "lxml/html/clean.py":635 * links[-1].tail = prev_text * else: * assert not leading_text # <<<<<<<<<<<<<< @@ -11493,15 +10847,15 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject /*else*/ { #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_leading_text); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 636, __pyx_L1_error) - if (unlikely(!((!__pyx_t_13) != 0))) { + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_leading_text); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 635, __pyx_L1_error) + if (unlikely(!((!__pyx_t_12) != 0))) { PyErr_SetNone(PyExc_AssertionError); - __PYX_ERR(0, 636, __pyx_L1_error) + __PYX_ERR(0, 635, __pyx_L1_error) } } #endif - /* "lxml/html/clean.py":637 + /* "lxml/html/clean.py":636 * else: * assert not leading_text * leading_text = prev_text # <<<<<<<<<<<<<< @@ -11513,101 +10867,127 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject } __pyx_L23:; - /* "lxml/html/clean.py":638 + /* "lxml/html/clean.py":637 * assert not leading_text * leading_text = prev_text * anchor = factory('a') # <<<<<<<<<<<<<< * anchor.set('href', link) * body = best_match.group('body') */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_factory, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 638, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_XDECREF_SET(__pyx_v_anchor, __pyx_t_2); - __pyx_t_2 = 0; + __Pyx_INCREF(__pyx_v_factory); + __pyx_t_2 = __pyx_v_factory; __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_n_s_a) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_s_a); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF_SET(__pyx_v_anchor, __pyx_t_6); + __pyx_t_6 = 0; - /* "lxml/html/clean.py":639 + /* "lxml/html/clean.py":638 * leading_text = prev_text * anchor = factory('a') * anchor.set('href', link) # <<<<<<<<<<<<<< * body = best_match.group('body') * if not body: */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_anchor, __pyx_n_s_set); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 639, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = NULL; - __pyx_t_14 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_anchor, __pyx_n_s_set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 638, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = NULL; + __pyx_t_13 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_7, function); - __pyx_t_14 = 1; + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_13 = 1; } } #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_href, __pyx_v_link}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_2); + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_n_s_href, __pyx_v_link}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 638, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_6); } else #endif #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_href, __pyx_v_link}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_n_s_href, __pyx_v_link}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 638, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_6); } else #endif { - __pyx_t_5 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 638, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__pyx_t_6) { - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_INCREF(__pyx_n_s_href); __Pyx_GIVEREF(__pyx_n_s_href); - PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_14, __pyx_n_s_href); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_13, __pyx_n_s_href); __Pyx_INCREF(__pyx_v_link); __Pyx_GIVEREF(__pyx_v_link); - PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_14, __pyx_v_link); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_13, __pyx_v_link); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 638, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "lxml/html/clean.py":640 + /* "lxml/html/clean.py":639 * anchor = factory('a') * anchor.set('href', link) * body = best_match.group('body') # <<<<<<<<<<<<<< * if not body: * body = link */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_best_match, __pyx_n_s_group); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 640, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_best_match, __pyx_n_s_group); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 640, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_n_s_body) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_s_body); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 639, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF_SET(__pyx_v_body, __pyx_t_7); - __pyx_t_7 = 0; + __Pyx_XDECREF_SET(__pyx_v_body, __pyx_t_6); + __pyx_t_6 = 0; - /* "lxml/html/clean.py":641 + /* "lxml/html/clean.py":640 * anchor.set('href', link) * body = best_match.group('body') * if not body: # <<<<<<<<<<<<<< * body = link * if body.endswith('.') or body.endswith(','): */ - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_body); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 641, __pyx_L1_error) - __pyx_t_8 = ((!__pyx_t_13) != 0); + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_body); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 640, __pyx_L1_error) + __pyx_t_8 = ((!__pyx_t_12) != 0); if (__pyx_t_8) { - /* "lxml/html/clean.py":642 + /* "lxml/html/clean.py":641 * body = best_match.group('body') * if not body: * body = link # <<<<<<<<<<<<<< @@ -11617,7 +10997,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject __Pyx_INCREF(__pyx_v_link); __Pyx_DECREF_SET(__pyx_v_body, __pyx_v_link); - /* "lxml/html/clean.py":641 + /* "lxml/html/clean.py":640 * anchor.set('href', link) * body = best_match.group('body') * if not body: # <<<<<<<<<<<<<< @@ -11626,49 +11006,73 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject */ } - /* "lxml/html/clean.py":643 + /* "lxml/html/clean.py":642 * if not body: * body = link * if body.endswith('.') or body.endswith(','): # <<<<<<<<<<<<<< * body = body[:-1] * anchor.text = body */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_body, __pyx_n_s_endswith); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 643, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 643, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_body, __pyx_n_s_endswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 643, __pyx_L1_error) + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_kp_s__15) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s__15); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 642, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!__pyx_t_13) { + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 642, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (!__pyx_t_12) { } else { - __pyx_t_8 = __pyx_t_13; + __pyx_t_8 = __pyx_t_12; goto __pyx_L26_bool_binop_done; } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_body, __pyx_n_s_endswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 643, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_body, __pyx_n_s_endswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 643, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_kp_s__16) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s__16); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 642, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 643, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_8 = __pyx_t_13; + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 642, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = __pyx_t_12; __pyx_L26_bool_binop_done:; if (__pyx_t_8) { - /* "lxml/html/clean.py":644 + /* "lxml/html/clean.py":643 * body = link * if body.endswith('.') or body.endswith(','): * body = body[:-1] # <<<<<<<<<<<<<< * anchor.text = body * links.append(anchor) */ - __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_body, 0, -1L, NULL, NULL, &__pyx_slice__34, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 644, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF_SET(__pyx_v_body, __pyx_t_7); - __pyx_t_7 = 0; + __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_body, 0, -1L, NULL, NULL, &__pyx_slice__17, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 643, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_body, __pyx_t_6); + __pyx_t_6 = 0; - /* "lxml/html/clean.py":643 + /* "lxml/html/clean.py":642 * if not body: * body = link * if body.endswith('.') or body.endswith(','): # <<<<<<<<<<<<<< @@ -11677,39 +11081,39 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject */ } - /* "lxml/html/clean.py":645 + /* "lxml/html/clean.py":644 * if body.endswith('.') or body.endswith(','): * body = body[:-1] * anchor.text = body # <<<<<<<<<<<<<< * links.append(anchor) * text = text[end:] */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_anchor, __pyx_n_s_text, __pyx_v_body) < 0) __PYX_ERR(0, 645, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_anchor, __pyx_n_s_text, __pyx_v_body) < 0) __PYX_ERR(0, 644, __pyx_L1_error) - /* "lxml/html/clean.py":646 + /* "lxml/html/clean.py":645 * body = body[:-1] * anchor.text = body * links.append(anchor) # <<<<<<<<<<<<<< * text = text[end:] * return leading_text, links */ - __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_links, __pyx_v_anchor); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 646, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_links, __pyx_v_anchor); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 645, __pyx_L1_error) - /* "lxml/html/clean.py":647 + /* "lxml/html/clean.py":646 * anchor.text = body * links.append(anchor) * text = text[end:] # <<<<<<<<<<<<<< * return leading_text, links * */ - __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, &__pyx_v_end, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 647, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF_SET(__pyx_v_text, __pyx_t_7); - __pyx_t_7 = 0; + __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, &__pyx_v_end, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 646, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_text, __pyx_t_6); + __pyx_t_6 = 0; } __pyx_L4_break:; - /* "lxml/html/clean.py":648 + /* "lxml/html/clean.py":647 * links.append(anchor) * text = text[end:] * return leading_text, links # <<<<<<<<<<<<<< @@ -11717,19 +11121,19 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject * def autolink_html(html, *args, **kw): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 648, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 647, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_leading_text); __Pyx_GIVEREF(__pyx_v_leading_text); - PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_leading_text); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_leading_text); __Pyx_INCREF(__pyx_v_links); __Pyx_GIVEREF(__pyx_v_links); - PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_links); - __pyx_r = __pyx_t_7; - __pyx_t_7 = 0; + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_links); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; goto __pyx_L0; - /* "lxml/html/clean.py":592 + /* "lxml/html/clean.py":591 * el[:0] = pre_children * * def _link_text(text, link_regexes, avoid_hosts, factory): # <<<<<<<<<<<<<< @@ -11744,7 +11148,6 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("lxml.html.clean._link_text", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -11768,7 +11171,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject return __pyx_r; } -/* "lxml/html/clean.py":650 +/* "lxml/html/clean.py":649 * return leading_text, links * * def autolink_html(html, *args, **kw): # <<<<<<<<<<<<<< @@ -11778,7 +11181,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_4_link_text(CYTHON_UNUSED PyObject /* Python wrapper */ static PyObject *__pyx_pw_4lxml_4html_5clean_7autolink_html(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4lxml_4html_5clean_7autolink_html = {"autolink_html", (PyCFunction)__pyx_pw_4lxml_4html_5clean_7autolink_html, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_4lxml_4html_5clean_7autolink_html = {"autolink_html", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_4html_5clean_7autolink_html, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4lxml_4html_5clean_7autolink_html(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_html = 0; PyObject *__pyx_v_args = 0; @@ -11819,7 +11222,7 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_7autolink_html(PyObject *__pyx_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, __pyx_v_kw, values, used_pos_args, "autolink_html") < 0)) __PYX_ERR(0, 650, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kw, values, used_pos_args, "autolink_html") < 0)) __PYX_ERR(0, 649, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; @@ -11830,7 +11233,7 @@ static PyObject *__pyx_pw_4lxml_4html_5clean_7autolink_html(PyObject *__pyx_self } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("autolink_html", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 650, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("autolink_html", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 649, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kw); __pyx_v_kw = 0; @@ -11857,11 +11260,11 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_6autolink_html(CYTHON_UNUSED PyObje int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("autolink_html", 0); - /* "lxml/html/clean.py":651 + /* "lxml/html/clean.py":650 * * def autolink_html(html, *args, **kw): * result_type = type(html) # <<<<<<<<<<<<<< @@ -11871,28 +11274,28 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_6autolink_html(CYTHON_UNUSED PyObje __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_html))); __pyx_v_result_type = ((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_html))); - /* "lxml/html/clean.py":652 + /* "lxml/html/clean.py":651 * def autolink_html(html, *args, **kw): * result_type = type(html) * if isinstance(html, basestring): # <<<<<<<<<<<<<< * doc = fromstring(html) * else: */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_basestring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_IsInstance(__pyx_v_html, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 652, __pyx_L1_error) + __pyx_t_2 = PyObject_IsInstance(__pyx_v_html, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 651, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/html/clean.py":653 + /* "lxml/html/clean.py":652 * result_type = type(html) * if isinstance(html, basestring): * doc = fromstring(html) # <<<<<<<<<<<<<< * else: * doc = copy.deepcopy(html) */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_fromstring); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 653, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_fromstring); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -11904,43 +11307,15 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_6autolink_html(CYTHON_UNUSED PyObje __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_html); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_html}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_html}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 653, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_INCREF(__pyx_v_html); - __Pyx_GIVEREF(__pyx_v_html); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_html); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_html) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_html); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_doc = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/html/clean.py":652 + /* "lxml/html/clean.py":651 * def autolink_html(html, *args, **kw): * result_type = type(html) * if isinstance(html, basestring): # <<<<<<<<<<<<<< @@ -11950,7 +11325,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_6autolink_html(CYTHON_UNUSED PyObje goto __pyx_L3; } - /* "lxml/html/clean.py":655 + /* "lxml/html/clean.py":654 * doc = fromstring(html) * else: * doc = copy.deepcopy(html) # <<<<<<<<<<<<<< @@ -11958,83 +11333,55 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_6autolink_html(CYTHON_UNUSED PyObje * return _transform_result(result_type, doc) */ /*else*/ { - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 655, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 655, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - } - } - if (!__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_html); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_html}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_html}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 655, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(__pyx_v_html); - __Pyx_GIVEREF(__pyx_v_html); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_html); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF_SET(__pyx_t_5, function); } } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_html) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_html); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_doc = __pyx_t_1; __pyx_t_1 = 0; } __pyx_L3:; - /* "lxml/html/clean.py":656 + /* "lxml/html/clean.py":655 * else: * doc = copy.deepcopy(html) * autolink(doc, *args, **kw) # <<<<<<<<<<<<<< * return _transform_result(result_type, doc) * */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_autolink); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 656, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_autolink); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 656, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 655, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_doc); __Pyx_GIVEREF(__pyx_v_doc); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_doc); - __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_v_args); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 656, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_doc); + __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 655, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_v_kw); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, __pyx_v_kw); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 656, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "lxml/html/clean.py":657 + /* "lxml/html/clean.py":656 * doc = copy.deepcopy(html) * autolink(doc, *args, **kw) * return _transform_result(result_type, doc) # <<<<<<<<<<<<<< @@ -12042,58 +11389,58 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_6autolink_html(CYTHON_UNUSED PyObje * autolink_html.__doc__ = autolink.__doc__ */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_transform_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 657, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_transform_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = NULL; - __pyx_t_7 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); - __pyx_t_7 = 1; + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { + if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_result_type), __pyx_v_doc}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 657, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 656, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_5); } else #endif #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_result_type), __pyx_v_doc}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 657, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 656, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 657, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_1) { - __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = NULL; + __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_result_type)); __Pyx_GIVEREF(((PyObject *)__pyx_v_result_type)); - PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_7, ((PyObject *)__pyx_v_result_type)); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_result_type)); __Pyx_INCREF(__pyx_v_doc); __Pyx_GIVEREF(__pyx_v_doc); - PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_v_doc); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 657, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_doc); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_r = __pyx_t_6; - __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; goto __pyx_L0; - /* "lxml/html/clean.py":650 + /* "lxml/html/clean.py":649 * return leading_text, links * * def autolink_html(html, *args, **kw): # <<<<<<<<<<<<<< @@ -12106,7 +11453,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_6autolink_html(CYTHON_UNUSED PyObje __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("lxml.html.clean.autolink_html", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -12117,7 +11464,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_6autolink_html(CYTHON_UNUSED PyObje return __pyx_r; } -/* "lxml/html/clean.py":668 +/* "lxml/html/clean.py":667 * _avoid_word_break_classes = ['nobreak'] * * def word_break(el, max_width=40, # <<<<<<<<<<<<<< @@ -12132,7 +11479,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_18__defaults__(CYTHON_UNUSED PyObje PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_int_40)); __Pyx_GIVEREF(((PyObject *)__pyx_int_40)); @@ -12146,7 +11493,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_18__defaults__(CYTHON_UNUSED PyObje __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_break_character); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_break_character); PyTuple_SET_ITEM(__pyx_t_1, 3, __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_break_character); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 668, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -12173,7 +11520,7 @@ static PyObject *__pyx_pf_4lxml_4html_5clean_18__defaults__(CYTHON_UNUSED PyObje /* Python wrapper */ static PyObject *__pyx_pw_4lxml_4html_5clean_9word_break(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4lxml_4html_5clean_8word_break[] = "\n Breaks any long words found in the body of the text (not attributes).\n\n Doesn't effect any of the tags in avoid_elements, by default\n ``